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