iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
61 lines (50 loc) • 35.6 kB
JavaScript
/*! For license information please see chunk.5dbd9f3c15195302d68e.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[7924],{25782:(t,e,n)=>{"use strict";n(43437),n(65660),n(47686),n(97968);var o=n(9672),i=n(50856),r=n(33760);(0,o.k)({_template:i.d`
<style include="paper-item-shared-styles"></style>
<style>
:host {
--layout-horizontal;
--layout-center;
--paper-font-subhead;
--paper-item;
--paper-icon-item;
}
.content-icon {
--layout-horizontal;
--layout-center;
width: var(--paper-item-icon-width, 56px);
--paper-item-icon;
}
</style>
<div id="contentIcon" class="content-icon">
<slot name="item-icon"></slot>
</div>
<slot></slot>
`,is:"paper-icon-item",behaviors:[r.U]})},89194:(t,e,n)=>{"use strict";n(43437),n(65660),n(1656),n(47686);var o=n(9672),i=n(50856);(0,o.k)({_template:i.d`
<style>
:host {
overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
--layout-vertical;
--layout-center-justified;
--layout-flex;
}
:host([two-line]) {
min-height: var(--paper-item-body-two-line-min-height, 72px);
}
:host([three-line]) {
min-height: var(--paper-item-body-three-line-min-height, 88px);
}
:host > ::slotted(*) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
:host > ::slotted([secondary]) {
--paper-font-body1;
color: var(--paper-item-body-secondary-color, var(--secondary-text-color));
--paper-item-body-secondary;
}
</style>
<slot></slot>
`,is:"paper-item-body"})},1275:(t,e,n)=>{"use strict";n.d(e,{l:()=>r});var o=n(94707);const i=new WeakMap,r=(0,o.XM)(((t,e)=>n=>{const o=i.get(n);if(Array.isArray(t)){if(Array.isArray(o)&&o.length===t.length&&t.every(((t,e)=>t===o[e])))return}else if(o===t&&(void 0!==t||i.has(n)))return;n.setValue(e()),i.set(n,Array.isArray(t)?Array.from(t):t)}))},56087:(t,e,n)=>{"use strict";function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function i(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}n.d(e,{ZP:()=>ee,lK:()=>Qt,V8:()=>qt});var r=i(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),a=i(/Edge/i),l=i(/firefox/i),s=i(/safari/i)&&!i(/chrome/i)&&!i(/android/i),c=i(/iP(ad|od|hone)/i),d=i(/chrome/i)&&i(/android/i),u={capture:!1,passive:!1};function h(t,e,n){t.addEventListener(e,n,!r&&u)}function p(t,e,n){t.removeEventListener(e,n,!r&&u)}function f(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function g(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function v(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&f(t,e):f(t,e))||o&&t===n)return t;if(t===n)break}while(t=g(t))}return null}var m,b=/\s+/g;function y(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(b," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(b," ")}}function w(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function E(t,e){var n="";if("string"==typeof t)n=t;else do{var o=w(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function _(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function D(){return document.scrollingElement||document.documentElement}function S(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var a,l,s,c,d,u,h;if(t!==window&&t!==D()?(l=(a=t.getBoundingClientRect()).top,s=a.left,c=a.bottom,d=a.right,u=a.height,h=a.width):(l=0,s=0,c=window.innerHeight,d=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!r))do{if(i&&i.getBoundingClientRect&&("none"!==w(i,"transform")||n&&"static"!==w(i,"position"))){var p=i.getBoundingClientRect();l-=p.top+parseInt(w(i,"border-top-width")),s-=p.left+parseInt(w(i,"border-left-width")),c=l+a.height,d=s+a.width;break}}while(i=i.parentNode);if(o&&t!==window){var f=E(i||t),g=f&&f.a,v=f&&f.d;f&&(c=(l/=v)+(u/=v),d=(s/=g)+(h/=g))}return{top:l,left:s,bottom:c,right:d,width:h,height:u}}}function T(t,e,n){for(var o=N(t,!0),i=S(t)[e];o;){var r=S(o)[n];if(!("top"===n||"left"===n?i>=r:i<=r))return o;if(o===D())break;o=N(o,!1)}return!1}function C(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Ot.ghost&&r[i]!==Ot.dragged&&v(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function x(t,e){for(var n=t.lastElementChild;n&&(n===Ot.ghost||"none"===w(n,"display")||e&&!f(n,e));)n=n.previousElementSibling;return n||null}function M(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ot.clone||e&&!f(t,e)||n++;return n}function I(t){var e=0,n=0,o=D();if(t)do{var i=E(t);e+=t.scrollLeft*i.a,n+=t.scrollTop*i.d}while(t!==o&&(t=t.parentNode));return[e,n]}function N(t,e){if(!t||!t.getBoundingClientRect)return D();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=w(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return D();if(o||e)return n;o=!0}}}while(n=n.parentNode);return D()}function A(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function O(t,e){return function(){if(!m){var n=arguments,o=this;1===n.length?t.call(o,n[0]):t.apply(o,n),m=setTimeout((function(){m=void 0}),e)}}}function P(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function k(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var X="Sortable"+(new Date).getTime(),R=[],Y={initializeByDefault:!0},B={mount:function(t){for(var e in Y)Y.hasOwnProperty(e)&&!(e in t)&&(t[e]=Y[e]);R.push(t)},pluginEvent:function(t,e,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var r=t+"Global";R.forEach((function(i){e[i.pluginName]&&(e[i.pluginName][r]&&e[i.pluginName][r](o({sortable:e},n)),e.options[i.pluginName]&&e[i.pluginName][t]&&e[i.pluginName][t](o({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in R.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var r=new o(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,Object.assign(n,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var n={};return R.forEach((function(o){"function"==typeof o.eventProperties&&Object.assign(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return R.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};function F(t){var e=t.sortable,n=t.rootEl,i=t.name,l=t.targetEl,s=t.cloneEl,c=t.toEl,d=t.fromEl,u=t.oldIndex,h=t.newIndex,p=t.oldDraggableIndex,f=t.newDraggableIndex,g=t.originalEvent,v=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[X]){var b,y=e.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||r||a?(b=document.createEvent("Event")).initEvent(i,!0,!0):b=new CustomEvent(i,{bubbles:!0,cancelable:!0}),b.to=c||n,b.from=d||n,b.item=l||n,b.clone=s,b.oldIndex=u,b.newIndex=h,b.oldDraggableIndex=p,b.newDraggableIndex=f,b.originalEvent=g,b.pullMode=v?v.lastPutMode:void 0;var E=o({},m,B.getEventProperties(i,e));for(var _ in E)b[_]=E[_];n&&n.dispatchEvent(b),y[w]&&y[w].call(e,b)}}var H=function(t,e,n){var i=void 0===n?{}:n,r=i.evt,a=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)e.indexOf(n=r[o])>=0||(i[n]=t[n]);return i}(i,["evt"]);B.pluginEvent.bind(Ot)(t,e,o({dragEl:W,parentEl:z,ghostEl:j,rootEl:G,nextEl:U,lastDownEl:V,cloneEl:q,cloneHidden:Z,dragStarted:st,putSortable:et,activeSortable:Ot.active,originalEvent:r,oldIndex:K,oldDraggableIndex:$,newIndex:Q,newDraggableIndex:J,hideGhostForTarget:Mt,unhideGhostForTarget:It,cloneNowHidden:function(){Z=!0},cloneNowShown:function(){Z=!1},dispatchSortableEvent:function(t){L({sortable:e,name:t,originalEvent:r})}},a))};function L(t){F(o({putSortable:et,cloneEl:q,targetEl:W,rootEl:G,oldIndex:K,oldDraggableIndex:$,newIndex:Q,newDraggableIndex:J},t))}var W,z,j,G,U,V,q,Z,K,Q,$,J,tt,et,nt,ot,it,rt,at,lt,st,ct,dt,ut,ht,pt=!1,ft=!1,gt=[],vt=!1,mt=!1,bt=[],yt=!1,wt=[],Et="undefined"!=typeof document,_t=c,Dt=a||r?"cssFloat":"float",St=Et&&!d&&!c&&"draggable"in document.createElement("div"),Tt=function(){if(Et){if(r)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ct=function(t,e){var n=w(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=C(t,0,e),r=C(t,1,e),a=i&&w(i),l=r&&w(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+S(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+S(r).width;return"flex"===n.display?"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal":"grid"===n.display?n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":i&&a.float&&"none"!==a.float?!r||"both"!==l.clear&&l.clear!==("left"===a.float?"left":"right")?"horizontal":"vertical":i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Dt]||r&&"none"===n[Dt]&&s+c>o)?"vertical":"horizontal"},xt=function(t){function e(t,n){return function(o,i,r,a){if(null==t&&(n||o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,a),n)(o,i,r,a);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==typeof o||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Mt=function(){!Tt&&j&&w(j,"display","none")},It=function(){!Tt&&j&&w(j,"display","")};Et&&document.addEventListener("click",(function(t){if(ft)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ft=!1,!1}),!0);var Nt=function(t){if(W){var e=(i=(t=t.touches?t.touches[0]:t).clientX,r=t.clientY,gt.some((function(t){if(!x(t)){var e=S(t),n=t[X].options.emptyInsertThreshold;return n&&i>=e.left-n&&i<=e.right+n&&r>=e.top-n&&r<=e.bottom+n?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[X]._onDragOver(n)}}var i,r,a},At=function(t){W&&W.parentNode[X]._isOutsideThisEl(t.target)};function Ot(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=e=Object.assign({},e),t[X]=this;var n,i,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ct(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ot.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var a in B.initializePlugins(this,t,r),r)!(a in e)&&(e[a]=r[a]);for(var l in xt(e),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!e.forceFallback&&St,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?h(t,"pointerdown",this._onTapStart):(h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),gt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Object.assign(this,(i=[],{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==w(t,"display")&&void 0!==t){i.push({target:t,rect:S(t)});var e=o({},i[i.length-1].rect);if(t.thisAnimationDuration){var n=E(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){i.push(t)},removeAnimationState:function(t){i.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(i,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var o=!1,r=0;i.forEach((function(t){var n=0,i=t.target,a=i.fromRect,l=S(i),s=i.prevFromRect,c=i.prevToRect,d=t.rect,u=E(i,!0);u&&(l.top-=u.f,l.left-=u.e),i.toRect=l,i.thisAnimationDuration&&A(s,l)&&!A(a,l)&&(d.top-l.top)/(d.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(n=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(d,s,c,e.options)),A(l,a)||(i.prevFromRect=a,i.prevToRect=l,n||(n=e.options.animation),e.animate(i,d,l,n)),n&&(o=!0,r=Math.max(r,n),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),n),i.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof t&&t()}),r):"function"==typeof t&&t(),i=[]},animate:function(t,e,n,o){if(o){w(t,"transition",""),w(t,"transform","");var i=E(this.el),r=(e.left-n.left)/(i&&i.a||1),a=(e.top-n.top)/(i&&i.d||1);t.animatingX=!!r,t.animatingY=!!a,w(t,"transform","translate3d("+r+"px,"+a+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),w(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),w(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){w(t,"transition",""),w(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}))}function Pt(t,e,n,o,i,l,s,c){var d,u,h=t[X],p=h.options.onMove;return!window.CustomEvent||r||a?(d=document.createEvent("Event")).initEvent("move",!0,!0):d=new CustomEvent("move",{bubbles:!0,cancelable:!0}),d.to=e,d.from=t,d.dragged=n,d.draggedRect=o,d.related=i||e,d.relatedRect=l||S(e),d.willInsertAfter=c,d.originalEvent=s,t.dispatchEvent(d),p&&(u=p.call(h,d,s)),u}function kt(t){t.draggable=!1}function Xt(){yt=!1}function Rt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Yt(t){return setTimeout(t,0)}function Bt(t){return clearTimeout(t)}Ot.prototype={constructor:Ot,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ct=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,W):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=o.filter;if(function(t){wt.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&wt.push(o)}}(n),!W&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!s||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=v(l,o.draggable,n,!1))&&l.animated||V===l)){if(K=M(l),$=M(l,o.draggable),"function"==typeof d){if(d.call(this,t,l,this))return L({sortable:e,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),H("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(d&&(d=d.split(",").some((function(o){if(o=v(c,o.trim(),n,!1))return L({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),H("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!v(c,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,s=i.el,c=i.options,d=s.ownerDocument;if(n&&!W&&n.parentNode===s){var u=S(n);if(G=s,z=(W=n).parentNode,U=W.nextSibling,V=n,tt=c.group,Ot.dragged=W,at=(nt={target:W,clientX:(e||t).clientX,clientY:(e||t).clientY}).clientX-u.left,lt=nt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,W.style["will-change"]="all",o=function(){H("delayEnded",i,{evt:t}),Ot.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!l&&i.nativeDraggable&&(W.draggable=!0),i._triggerDragStart(t,e),L({sortable:i,name:"choose",originalEvent:t}),y(W,c.chosenClass,!0))},c.ignore.split(",").forEach((function(t){_(W,t.trim(),kt)})),h(d,"dragover",Nt),h(d,"mousemove",Nt),h(d,"touchmove",Nt),h(d,"mouseup",i._onDrop),h(d,"touchend",i._onDrop),h(d,"touchcancel",i._onDrop),l&&this.nativeDraggable&&(this.options.touchStartThreshold=4,W.draggable=!0),H("delayStart",this,{evt:t}),!c.delay||c.delayOnTouchOnly&&!e||this.nativeDraggable&&(a||r))o();else{if(Ot.eventCanceled)return void this._onDrop();h(d,"mouseup",i._disableDelayedDrag),h(d,"touchend",i._disableDelayedDrag),h(d,"touchcancel",i._disableDelayedDrag),h(d,"mousemove",i._delayedDragTouchMoveHandler),h(d,"touchmove",i._delayedDragTouchMoveHandler),c.supportPointer&&h(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,c.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){W&&kt(W),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._disableDelayedDrag),p(t,"touchend",this._disableDelayedDrag),p(t,"touchcancel",this._disableDelayedDrag),p(t,"mousemove",this._delayedDragTouchMoveHandler),p(t,"touchmove",this._delayedDragTouchMoveHandler),p(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?h(document,this.options.supportPointer?"pointermove":e?"touchmove":"mousemove",this._onTouchMove):(h(W,"dragend",this),h(G,"dragstart",this._onDragStart));try{document.selection?Yt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(pt=!1,G&&W){H("dragStarted",this,{evt:e}),this.nativeDraggable&&h(document,"dragover",At);var n=this.options;!t&&y(W,n.dragClass,!1),y(W,n.ghostClass,!0),Ot.active=this,t&&this._appendGhost(),L({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ot){this._lastX=ot.clientX,this._lastY=ot.clientY,Mt();for(var t=document.elementFromPoint(ot.clientX,ot.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ot.clientX,ot.clientY))!==e;)e=t;if(W.parentNode[X]._isOutsideThisEl(t),e)do{if(e[X]&&e[X]._onDragOver({clientX:ot.clientX,clientY:ot.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);It()}},_onTouchMove:function(t){if(nt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=j&&E(j,!0),a=j&&r&&r.a,l=j&&r&&r.d,s=_t&&ht&&I(ht),c=(i.clientX-nt.clientX+o.x)/(a||1)+(s?s[0]-bt[0]:0)/(a||1),d=(i.clientY-nt.clientY+o.y)/(l||1)+(s?s[1]-bt[1]:0)/(l||1);if(!Ot.active&&!pt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(j){r?(r.e+=c-(it||0),r.f+=d-(rt||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix("+r.a+","+r.b+","+r.c+","+r.d+","+r.e+","+r.f+")";w(j,"webkitTransform",u),w(j,"mozTransform",u),w(j,"msTransform",u),w(j,"transform",u),it=c,rt=d,ot=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!j){var t=this.options.fallbackOnBody?document.body:G,e=S(W,!0,_t,!0,t),n=this.options;if(_t){for(ht=t;"static"===w(ht,"position")&&"none"===w(ht,"transform")&&ht!==document;)ht=ht.parentNode;ht!==document.body&&ht!==document.documentElement?(ht===document&&(ht=D()),e.top+=ht.scrollTop,e.left+=ht.scrollLeft):ht=D(),bt=I(ht)}y(j=W.cloneNode(!0),n.ghostClass,!1),y(j,n.fallbackClass,!0),y(j,n.dragClass,!0),w(j,"transition",""),w(j,"transform",""),w(j,"box-sizing","border-box"),w(j,"margin",0),w(j,"top",e.top),w(j,"left",e.left),w(j,"width",e.width),w(j,"height",e.height),w(j,"opacity","0.8"),w(j,"position",_t?"absolute":"fixed"),w(j,"zIndex","100000"),w(j,"pointerEvents","none"),Ot.ghost=j,t.appendChild(j),w(j,"transform-origin",at/parseInt(j.style.width)*100+"% "+lt/parseInt(j.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;H("dragStart",this,{evt:t}),Ot.eventCanceled?this._onDrop():(H("setupClone",this),Ot.eventCanceled||((q=k(W)).draggable=!1,q.style["will-change"]="",this._hideClone(),y(q,this.options.chosenClass,!1),Ot.clone=q),n.cloneId=Yt((function(){H("clone",n),Ot.eventCanceled||(n.options.removeCloneOnHide||G.insertBefore(q,W),n._hideClone(),L({sortable:n,name:"clone"}))})),!e&&y(W,i.dragClass,!0),e?(ft=!0,n._loopId=setInterval(n._emulateDragOver,50)):(p(document,"mouseup",n._onDrop),p(document,"touchend",n._onDrop),p(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,W)),h(document,"drop",n),w(W,"transform","translateZ(0)")),pt=!0,n._dragStartId=Yt(n._dragStarted.bind(n,e,t)),h(document,"selectstart",n),st=!0,s&&w(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,i,r,a=this.el,l=t.target,s=this.options,c=s.group,d=Ot.active,u=tt===c,h=s.sort,p=et||d,f=this,g=!1;if(!yt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),l=v(l,s.draggable,a,!0),B("dragOver"),Ot.eventCanceled)return g;if(W.contains(t.target)||l.animated&&l.animatingX&&l.animatingY||f._ignoreWhileAnimating===l)return V(!1);if(ft=!1,d&&!s.disabled&&(u?h||(i=!G.contains(W)):et===this||(this.lastPutMode=tt.checkPull(this,d,W,t))&&c.checkPut(this,d,W,t))){if(r="vertical"===this._getDirection(t,l),e=S(W),B("dragOverValid"),Ot.eventCanceled)return g;if(i)return z=G,F(),this._hideClone(),B("revert"),Ot.eventCanceled||(U?G.insertBefore(W,U):G.appendChild(W)),V(!0);var m=x(a,s.draggable);if(!m||function(t,e,n){var o=S(x(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(t,r,this)&&!m.animated){if(m===W)return V(!1);if(m&&a===t.target&&(l=m),l&&(n=S(l)),!1!==Pt(G,a,W,e,l,n,t,!!l))return F(),a.appendChild(W),z=a,q(),V(!0)}else if(l.parentNode===a){n=S(l);var b,E,_,D=W.parentNode!==a,C=!function(t,e,n){var o=n?t.left:t.top,i=n?e.left:e.top;return o===i||(n?t.right:t.bottom)===(n?e.right:e.bottom)||o+(n?t.width:t.height)/2===i+(n?e.width:e.height)/2}(W.animated&&W.toRect||e,l.animated&&l.toRect||n,r),I=r?"top":"left",N=T(l,"top","top")||T(W,"top","top"),A=N?N.scrollTop:void 0;if(ct!==l&&(E=n[I],vt=!1,mt=!C&&s.invertSwap||D),0!==(b=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,h=!1;if(!a)if(l&&ut<c*i){if(!vt&&(1===dt?s>d+c*r/2:s<u-c*r/2)&&(vt=!0),vt)h=!0;else if(1===dt?s<d+ut:s>u-ut)return-dt}else if(s>d+c*(1-i)/2&&s<u-c*(1-i)/2)return function(t){return M(W)<M(t)?1:-1}(e);return(h=h||a)&&(s<d+c*r/2||s>u-c*r/2)?s>d+c/2?1:-1:0}(t,l,n,r,C?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,mt,ct===l))){var O=M(W);do{_=z.children[O-=b]}while(_&&("none"===w(_,"display")||_===j))}if(0===b||_===l)return V(!1);ct=l,dt=b;var k=l.nextElementSibling,R=!1,Y=Pt(G,a,W,e,l,n,t,R=1===b);if(!1!==Y)return 1!==Y&&-1!==Y||(R=1===Y),yt=!0,setTimeout(Xt,30),F(),R&&!k?a.appendChild(W):l.parentNode.insertBefore(W,R?k:l),N&&P(N,0,A-N.scrollTop),z=W.parentNode,void 0===E||mt||(ut=Math.abs(E-S(l)[I])),q(),V(!0)}if(a.contains(W))return V(!1)}return!1}function B(s,c){H(s,f,o({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:i,dragRect:e,targetRect:n,canSort:h,fromSortable:p,target:l,completed:V,onMove:function(n,o){return Pt(G,a,W,e,n,S(n),t,o)},changed:q},c))}function F(){B("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function V(e){return B("dragOverCompleted",{insertion:e}),e&&(u?d._hideClone():d._showClone(f),f!==p&&(y(W,et?et.options.ghostClass:d.options.ghostClass,!1),y(W,s.ghostClass,!0)),et!==f&&f!==Ot.active?et=f:f===Ot.active&&et&&(et=null),p===f&&(f._ignoreWhileAnimating=l),f.animateAll((function(){B("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(l===W&&!W.animated||l===a&&!l.animated)&&(ct=null),s.dragoverBubble||t.rootEl||l===document||(W.parentNode[X]._isOutsideThisEl(t.target),!e&&Nt(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function q(){Q=M(W),J=M(W,s.draggable),L({sortable:f,name:"change",toEl:a,newIndex:Q,newDraggableIndex:J,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){p(document,"mousemove",this._onTouchMove),p(document,"touchmove",this._onTouchMove),p(document,"pointermove",this._onTouchMove),p(document,"dragover",Nt),p(document,"mousemove",Nt),p(document,"touchmove",Nt)},_offUpEvents:function(){var t=this.el.ownerDocument;p(t,"mouseup",this._onDrop),p(t,"touchend",this._onDrop),p(t,"pointerup",this._onDrop),p(t,"touchcancel",this._onDrop),p(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Q=M(W),J=M(W,n.draggable),H("drop",this,{evt:t}),z=W&&W.parentNode,Q=M(W),J=M(W,n.draggable),Ot.eventCanceled||(pt=!1,mt=!1,vt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Bt(this.cloneId),Bt(this._dragStartId),this.nativeDraggable&&(p(document,"drop",this),p(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),s&&w(document.body,"user-select",""),w(W,"transform",""),t&&(st&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),j&&j.parentNode&&j.parentNode.removeChild(j),(G===z||et&&"clone"!==et.lastPutMode)&&q&&q.parentNode&&q.parentNode.removeChild(q),W&&(this.nativeDraggable&&p(W,"dragend",this),kt(W),W.style["will-change"]="",st&&!pt&&y(W,et?et.options.ghostClass:this.options.ghostClass,!1),y(W,this.options.chosenClass,!1),L({sortable:this,name:"unchoose",toEl:z,newIndex:null,newDraggableIndex:null,originalEvent:t}),G!==z?(Q>=0&&(L({rootEl:z,name:"add",toEl:z,fromEl:G,originalEvent:t}),L({sortable:this,name:"remove",toEl:z,originalEvent:t}),L({rootEl:z,name:"sort",toEl:z,fromEl:G,originalEvent:t}),L({sortable:this,name:"sort",toEl:z,originalEvent:t})),et&&et.save()):Q!==K&&Q>=0&&(L({sortable:this,name:"update",toEl:z,originalEvent:t}),L({sortable:this,name:"sort",toEl:z,originalEvent:t})),Ot.active&&(null!=Q&&-1!==Q||(Q=K,J=$),L({sortable:this,name:"end",toEl:z,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){H("nulling",this),G=W=z=j=U=q=V=Z=nt=ot=st=Q=J=K=$=ct=dt=et=tt=Ot.dragged=Ot.ghost=Ot.clone=Ot.active=null,wt.forEach((function(t){t.checked=!0})),wt.length=it=rt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":W&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)v(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Rt(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,o){var i=n.children[o];v(i,this.options.draggable,n,!1)&&(e[t]=i)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return v(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=B.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&xt(n)},destroy:function(){H("destroy",this);var t=this.el;t[X]=null,p(t,"mousedown",this._onTapStart),p(t,"touchstart",this._onTapStart),p(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(p(t,"dragover",this),p(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),gt.splice(gt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Z){if(H("hideClone",this),Ot.eventCanceled)return;w(q,"display","none"),this.options.removeCloneOnHide&&q.parentNode&&q.parentNode.removeChild(q),Z=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Z){if(H("showClone",this),Ot.eventCanceled)return;W.parentNode!=G||this.options.group.revertClone?U?G.insertBefore(q,U):G.appendChild(q):G.insertBefore(q,W),this.options.group.revertClone&&this.animate(W,q),w(q,"display",""),Z=!1}}else this._hideClone()}},Et&&h(document,"touchmove",(function(t){(Ot.active||pt)&&t.cancelable&&t.preventDefault()})),Ot.utils={on:h,off:p,css:w,find:_,is:function(t,e){return!!v(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:O,closest:v,toggleClass:y,clone:k,index:M,nextTick:Yt,cancelNextTick:Bt,detectDirection:Ct,getChild:C},Ot.get=function(t){return t[X]},Ot.mount=function(){var t=[].slice.call(arguments);t[0].constructor===Array&&(t=t[0]),t.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not "+{}.toString.call(t);t.utils&&(Ot.utils=o({},Ot.utils,t.utils)),B.mount(t)}))},Ot.create=function(t,e){return new Ot(t,e)},Ot.version="1.12.0";var Ft=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.dispatchSortableEvent,r=t.unhideGhostForTarget;if(e){var a=n||t.activeSortable;(0,t.hideGhostForTarget)();var l=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,s=document.elementFromPoint(l.clientX,l.clientY);r(),a&&!a.el.contains(s)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Ht(){}function Lt(){}Ht.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=C(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Ft},Object.assign(Ht,{pluginName:"revertOnSpill"}),Lt.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Ft},Object.assign(Lt,{pluginName:"removeOnSpill"});var Wt,zt,jt,Gt,Ut,Vt,qt=[Lt,Ht],Zt=[],Kt=!1;function Qt(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?h(document,"dragover",this._handleAutoScroll):h(document,this.options.supportPointer?"pointermove":e.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?p(document,"dragover",this._handleAutoScroll):(p(document,"pointermove",this._handleFallbackAutoScroll),p(document,"touchmove",this._handleFallbackAutoScroll),p(document,"mousemove",this._handleFallbackAutoScroll)),Jt(),$t(),clearTimeout(m),m=void 0},nulling:function(){Ut=zt=Wt=Kt=Vt=jt=Gt=null,Zt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(o,i);if(Ut=t,e||a||r||s){te(t,this.options,l,e);var c=N(l,!0);!Kt||Vt&&o===jt&&i===Gt||(Vt&&Jt(),Vt=setInterval((function(){var r=N(document.elementFromPoint(o,i),!0);r!==c&&(c=r,$t()),te(t,n.options,r,e)}),10),jt=o,Gt=i)}else{if(!this.options.bubbleScroll||N(l,!0)===D())return void $t();te(t,this.options,N(l,!1),!1)}}},Object.assign(t,{pluginName:"scroll",initializeByDefault:!0})}function $t(){Zt.forEach((function(t){clearInterval(t.pid)})),Zt=[]}function Jt(){clearInterval(Vt)}var te=O((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=D(),d=!1;zt!==n&&(zt=n,$t(),i=e.scrollFn,!0===(Wt=e.scroll)&&(Wt=N(n,!0)));var u=0,h=Wt;do{var p=h,f=S(p),g=f.top,v=f.bottom,m=f.left,b=f.right,y=f.width,E=f.height,_=void 0,T=void 0,C=p.scrollWidth,x=p.scrollHeight,M=w(p),I=p.scrollLeft,A=p.scrollTop;p===c?(_=y<C&&("auto"===M.overflowX||"scroll"===M.overflowX||"visible"===M.overflowX),T=E<x&&("auto"===M.overflowY||"scroll"===M.overflowY||"visible"===M.overflowY)):(_=y<C&&("auto"===M.overflowX||"scroll"===M.overflowX),T=E<x&&("auto"===M.overflowY||"scroll"===M.overflowY));var O=_&&(Math.abs(b-r)<=l&&I+y<C)-(Math.abs(m-r)<=l&&!!I),k=T&&(Math.abs(v-a)<=l&&A+E<x)-(Math.abs(g-a)<=l&&!!A);if(!Zt[u])for(var R=0;R<=u;R++)Zt[R]||(Zt[R]={});Zt[u].vx==O&&Zt[u].vy==k&&Zt[u].el===p||(Zt[u].el=p,Zt[u].vx=O,Zt[u].vy=k,clearInterval(Zt[u].pid),0==O&&0==k||(d=!0,Zt[u].pid=setInterval(function(){o&&0===this.layer&&Ot.active._onTouchMove(Ut);var e=Zt[this.layer].vy?Zt[this.layer].vy*s:0,n=Zt[this.layer].vx?Zt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Ot.dragged.parentNode[X],n,e,t,Ut,Zt[this.layer].el)||P(Zt[this.layer].el,n,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&h!==c&&(h=N(h,!1)));Kt=d}}),30);const ee=Ot}}]);
//# sourceMappingURL=chunk.5dbd9f3c15195302d68e.js.map