-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.min.js
8 lines (8 loc) · 111 KB
/
index.min.js
1
2
3
4
5
6
7
8
!function(){"use strict";var t=function(t){return Array.isArray(t)},e=function(t){return"function"==typeof t},n=function(t,e){return t&&a(e)&&t instanceof e},r=function(t){return i(t)&&0==t%1},i=function(t){return"number"==typeof t},o=function(t,e){return void 0===e&&(e=!0),"object"==typeof t&&(!e||n(t,Object))},a=function(t){return function(t){return void 0!==t}(t)&&!function(t){return null===t}(t)},l=function(t){return"string"==typeof t},s={},c=function(t,e,n,r){e.dispatchEvent(function(t,e,n){return s[t]=new Event(t,e)}(t,n))},u=function(t,e,n){e.removeEventListener(t,n)},f=function(t){return t&&t.preventDefault()},h=function(t){return t&&t.stopPropagation()},d=function(t,e,n){t.forEach((function(t){return u(t,e,n)}))},p=function(t,e,n,r){void 0===r&&(r=!1),e.addEventListener(t,n,r)},v=function(t,e,n,r){void 0===r&&(r=!1),t.forEach((function(t){return p(t,e,n,r)}))},g=function(t,e){return-1!==e.indexOf(t)};var m=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!0);var r={},i=t&&"?"===t[0]?t.slice(1):t;return""===i||i.split("&").forEach((function(t){var i=t.split("="),o=y(i[0]),l=a(i[1])?y(i[1]):n;l=e?L(l):l,"]"===o.slice(-1)?function(t,e,n){var r,i,o=e.split("["),a=C(o);for(r=0;r<a-1;++r)t=t[i=""===(i="]"===o[r].slice(-1)?o[r].slice(0,-1):o[r])?P(i):i]||(t[i]={});t[""===(i="]"===o[r].slice(-1)?o[r].slice(0,-1):o[r])?P(t):i]=n}(r,o,l):r[o]=l})),r},b=function e(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var l=r.shift(),s=0,c=C(r);s<c;++s)for(var u in r[s])if(a(l[u]))if(t(l[u])&&t(r[s][u])){l[u]=[].concat(l[u]);for(var f=0,h=C(r[s][u]);f<h;++f)g(r[s][u][f],l[u])||l[u].push(r[s][u][f])}else o(l[u])&&o(r[s][u])?l[u]=e({},l[u],r[s][u]):l[u]=r[s][u];else l[u]=r[s][u];return l},y=function(t){return decodeURIComponent(t)},w=function e(n){if(t(n))return n.map((function(t){return e(n)}));if(o(n)){for(var r in n)n[r]=e(n[r]);return n}return!1===n?"false":null===n?"null":!0===n?"true":""+n},E=function(e){return t(e)?e:[e]},k=function(t,e){var n=e.indexOf(t);return-1!==n?n:null},S=function(t){return t.replace(/[-_.](\w)/g,(function(t,e){return D(e)}))},x=function(t){return t.toLowerCase()},D=function(t){return t.toUpperCase()},C=function(t){return t.length},T=function(t,e){return a(e[0])&&t<e[0]?e[0]:a(e[1])&&t>e[1]?e[1]:t},A=function(t,e){return void 0===e&&(e=10),e?parseInt(t,e):parseFloat(t)},P=function(t){return C(O(t))},O=function(t){return Object.keys(t)},M=function(t){return Object.values(t)};function I(t,e){var n,r,i,a={},l=e?"%5D":"";for(n in t)r=H(n),i=t[n],o(i)?a=b({},a,I(i,e+r+l+"%5B")):a[e+r+l]=i;return a}var N=function(t){var e,n,r=[],i=I(t,"");for(e in i)n=!0!==(n=i[e])?"="+H(w(n)):"",r.push(e+n);return C(r)?"?"+r.join("&"):null},H=function(t){return encodeURIComponent(t)},L=function e(n){if(t(n))return n.map((function(t){return e(t)}));if(function(t){return/^-?(?:\d*.)?\d+$/.test(t+"")}(n))return A(n);if(o(n)){for(var r in n)n[r]=e(n[r]);return n}return"false"!==n&&("null"===n?null:"true"===n||n)};function R(t){t&&e(t.focus)&&t.focus()}function K(t){t&&e(t.select)&&t.select()}function X(t,e,n){return u(t,e,n),p(t,e,n)}function F(e){if(t(e)){for(var n=[],r=0,i=C(e);r<i;++r)if(null!==e[r]){if(t(e[r])){if(null===(e[r]=F(e[r]))||0===e[r].length)continue}else if(o(e[r])&&(null===(e[r]=F(e[r]))||0===P(e[r])))continue;n.push(e[r])}return 0!==C(n)&&n}for(var a in e)null!==e[a]?(t(e[a])||o(e[a]))&&(null!==(e[a]=F(e[a]))&&0!==P(e[a])||delete e[a]):delete e[a];return 0!==P(e)&&e}var j=document,B=window,$=j.body,Y=j.documentElement,U=function(t,e,n){if(void 0===n&&(n=!0),!lt(t,e))return null;var r=t.getAttribute(e);return n?L(r):r},W=function(t){return t.firstElementChild||null},z=function(t,e){var n=t.children;return i(e)?n[e]||null:n||[]},q=function(t,e){void 0===e&&(e=!0);var n=(ot(t,"className")||"").trim();return e?n.split(/\s+/).filter((function(t){return""!==t})):n},G=function(t,e,n){void 0===n&&(n=!0);var r=U(t,"data-"+e,n),i=(r+"").trim();return n&&i&&("["===i[0]&&"]"===i.slice(-1)||"{"===i[0]&&"}"===i.slice(-1))&&null!==(i=function(t){var e=null;try{e=JSON.parse(t)}catch(t){}return e}(r))?i:r},V=function(t,e){return(e||j).querySelector(t)},J=function(t,e){return(e||j).querySelectorAll(t)},Z=function(t,e){void 0===e&&(e=!0);var n="innerHTML";if(!ut(t,n))return!1;var r=t[n];return""!==(r=e?r.trim():r)?r:null},Q=function(t){return x(t&&t.nodeName||"")||null},tt=function(t,e){return t["next"+(e?"":"Element")+"Sibling"]||null},et=function(t,e){return e?t.closest(e)||null:t.parentNode||null},nt=function(t){var e="form";return ut(t,e)&&e===Q(t[e])?t[e]:et(t,e)},rt=function(t,e){return t["previous"+(e?"":"Element")+"Sibling"]||null},it=function(t,e,n){void 0===n&&(n=!0);var r=B.getComputedStyle(t).getPropertyValue(e);return n&&(r=L(r)),r||""===r||0===r?r:null},ot=function(t,e){return ut(t,e)&&t[e]||null},at=function(t,e){void 0===e&&(e=!0);var n="textContent";if(!ut(t,n))return!1;var r=t[n];return""!==(r=e?r.trim():r)?r:null},lt=function(t,e){return t.hasAttribute(e)},st=function(t,e){return t.classList.contains(e)},ct=function(t,e){return null!==et(t,e)},ut=function(t,e){return e in t},ft=function(t){return n(t,Node)},ht=function(t){return t===B},dt=function(t,e){return t.removeAttribute(e),t},pt=function(t,e){return t.classList.remove(e),t},vt=function(e,n){if(t(n))return n.forEach((function(t){return e.classList.remove(t)})),e;if(o(n)){for(var r in n)n[r]&&e.classList.remove(r);return e}return e.className="",e},gt=function(t,e){return dt(t,"data-"+e)},mt=function(t){var e=et(t);return t.remove(),e},bt=function(t,e){return t.style[S(e)]=null,t},yt=function(t){var e="textContent";return ut(t,e)&&(t[e]=""),t},wt=function(t,e,n){return!0===n&&(n=e),t.setAttribute(e,w(n)),t},Et=function(t,e){return t.append(e),e},kt=function(t,e){return t.classList.add(e),t},St=function(e,n){if(t(n))return n.forEach((function(t){return e.classList.add(t)})),e;if(o(n))for(var r in n)n[r]?e.classList.add(r):e.classList.remove(r);return e.className=n,e},_t=function(t,e){var n;for(var r in e)(n=e[r])||""===n||0===n?xt(t,r,n):gt(t,r);return t},xt=function(e,n,r){return(t(r)||o(r))&&(r=function(t){return JSON.stringify(t)}(r)),wt(e,"data-"+n,r)},Dt=function(t,e,n){return t=l(t)?j.createElement(t):t,o(e)&&(n=e,e=!1),l(e)&&Ct(t,e),o(n)&&function(t,e){var n;for(var r in e)(n=e[r])||""===n||0===n?wt(t,r,n):dt(t,r)}(t,n),t},Ct=function(t,e,n){if(void 0===n&&(n=!0),null===e)return t;var r="innerHTML";return ut(t,r)&&(t[r]=n?e.trim():e),t},Tt=function(t,e){return et(t).insertBefore(e,tt(t,!0)),e},At=function(t,e){return et(t).insertBefore(e,t),e},Pt=function(t,e,n){return i(n)&&(n+="px"),t.style[S(e)]=w(n),t},Ot=function(t,e){var n;for(var r in e)(n=e[r])||""===n||0===n?Pt(t,r,n):bt(t,r);return t},Mt=function(t,e,n){if(void 0===n&&(n=!0),null===e)return t;var r="textContent";return ut(t,r)&&(t[r]=n?e.trim():e),t},It=function(t,e,n){return t.classList.toggle(e,n),t},Nt=B.history,Ht=B.location,Lt=':scope>:where([tabindex]):not([tabindex="-1"]):not(.not\\:active)';function Rt(t){var e,n=this,r=t.key,i=t.altKey,o=t.ctrlKey,a=t.shiftKey;if(n===t.target){if(!i&&!o&&!a)"ArrowLeft"===r||"End"===r?(R([].slice.call(J(Lt,n)).pop()),e=!0):"ArrowRight"!==r&&"Home"!==r||(R(V(Lt,n)),e=!0);e&&(f(t),h(t))}}function Kt(t){var e,n,r,i=this,o=t.key;if(i===t.target){for(e=tt(i);e&&st(e,"not:active");)e=tt(e);for(n=rt(i);n&&st(n,"not:active");)n=rt(n);"ArrowLeft"===o?(R(n),r=!0):"ArrowRight"===o?(R(e),r=!0):"End"===o?(R([].slice.call(J(Lt,et(i))).pop()),r=!0):"Home"===o&&(R(V(Lt,et(i))),r=!0),r&&(f(t),h(t))}}var Xt=Dt("dialog"),Ft=Dt("form","",{method:"dialog"}),jt=Dt("div");function Bt(t){var n=this;u("cancel",n,Bt),u("close",n,$t),u("submit",n,Yt),n.x(L(n.returnValue)),e(n.c)&&n.c.call(n,n.open)}function $t(t){var n=this;u("cancel",n,Bt),u("close",n,$t),u("submit",n,Yt),n.v(L(n.returnValue)),e(n.c)&&n.c.call(n,n.open)}function Yt(t){$t.call(this,t)}function Ut(t,n){var r;for(Ct(Ft,""),l(t)?(Ct(jt,t.trim()),t=jt.childNodes):ft(t)&&(t=[t]),t=Array.from(t);r=t.shift();)Et(Ft,r);Xt.showModal(),Xt.returnValue=null,e(n)&&n.call(Xt,Xt.open);var i=V("[autofocus]",Ft);return i&&(R(i),K(i)),new Promise((function(t,e){Xt.c=n,Xt.v=t,Xt.x=e,X("cancel",Xt,Bt),X("close",Xt,$t),X("submit",Xt,Yt)}))}function Wt(){var t=this,e=et(t.form);e.returnValue=t.value,c("reset"===t.type?"cancel":"close",e),e.open&&e.close()}function zt(t){var e,n,r=t.key;"ArrowLeft"===r||"ArrowUp"===r?((n=rt(this))&&R(n),f(t)):"ArrowDown"!==r&&"ArrowRight"!==r||((e=tt(this))&&R(e),f(t))}Et($,Xt),Et(Xt,Ft);var qt=Dt("p"),Gt=Dt("p","",{role:"group"}),Vt=Dt("button","OK",{class:"button",type:"submit",value:"true"});X("keydown",Vt,zt),X("click",Vt,Wt),Et(Gt,Vt),Ut.alert=function(t){return Ct(qt,t),Ut([qt,Gt])};var Jt=Dt("p"),Zt=Dt("p","",{role:"group"}),Qt=Dt("button","OK",{class:"button",type:"submit",value:"true"}),te=Dt("button","Cancel",{autofocus:!0,class:"button",type:"reset",value:"false"});X("click",te,Wt),X("click",Qt,Wt),X("keydown",te,zt),X("keydown",Qt,zt),Et(Zt,Qt),Et(Zt,te),Ut.confirm=function(t){return Ct(Jt,t),Ut([Jt,Zt])};var ee=Dt("p"),ne=Dt("input",!1,{autofocus:!0,class:"input",type:"text"}),re=Dt("p"),ie=Dt("p","",{role:"group"}),oe=Dt("button","OK",{class:"button",type:"submit",value:""}),ae=Dt("button","Cancel",{class:"button",type:"reset",value:"false"});function le(){oe.value=this.value}X("click",ae,Wt),X("click",oe,Wt),X("input",ne,le),X("keydown",ae,zt),X("keydown",oe,zt),X("keyup",ne,le),Et(ie,oe),Et(ie,ae),Et(re,ne),Ut.prompt=function(t,e){return Ct(ee,t),ne.value=oe.value=e,Ut([ee,re,ie])};var se=function(t,e){var n;return function(){var r=arguments,i=this;n&&clearTimeout(n),n=setTimeout((function(){return t.apply(i,r)}),e)}},ce=function(t,e){return function(){var n=arguments,r=this;setTimeout((function(){return t.apply(r,n)}),e)}},ue=function(t){return[t.offsetLeft,t.offsetTop]},fe=function(t){var e,n,r,i,o,a,l;return ht(t)?(i=t.pageXOffset||Y.scrollLeft||$.scrollLeft,o=t.pageYOffset||Y.scrollTop||$.scrollTop,r=t.innerWidth,e=t.innerHeight):(i=(n=t.getBoundingClientRect()).left,o=n.top,r=n.width,e=n.height,a=n.right,l=n.bottom),[i,o,r,e,a,l]},he=function(t){return ht(t)?[t.innerWidth,t.innerHeight]:[t.offsetWidth,t.offsetHeight]},de=function(t){return[t.scrollLeft,t.scrollTop]},pe=function(t,e){return t.scrollLeft=e[0],t.scrollTop=e[1],t};function ve(t,e){return(e=e||t).fire=function(t,e,n){var r=this,i=r.hooks;return a(i[t])?(i[t].forEach((function(t){return t.apply(n||r,e)})),r):r},e.off=function(t,e){var n=this,r=n.hooks;if(!a(t))return r={},n;if(a(r[t]))if(a(e)){var i=r[t].length;if(0===i)delete r[t];else for(var o=0;o<i;++o)if(e===r[t][o]){r[t].splice(o,1);break}}else delete r[t];return n},e.on=function(t,e){var n=this.hooks;return a(n[t])||(n[t]=[]),a(e)&&n[t].push(e),this},t.hooks={},t}var ge="OP",me="i",be="$",ye="v",we="ArrowDown",Ee="ArrowLeft",ke="ArrowRight",Se="ArrowUp",_e="End",xe="Enter",De="Escape",Ce="Home",Te="Tab",Ae="";function Pe(t){var e=j.createRange();e.selectNodeContents(t);var n=B.getSelection();n.removeAllRanges(),n.addRange(e)}function Oe(e,r){void 0===r&&(r={});var i=this;if(!e)return i;if(e[ge])return e[ge];if(!n(i,Oe))return new Oe(e,r);var o=ve(i),a=o.fire;function l(){return[L(s()),i.options]}function s(){if(tt){for(var t=[],n=0,r=C(rt);n<r;++n)h(rt[n])&&t.push(c(rt[n]));return t}var i=e.value;return""!==i?i:null}function c(t){var e=t.value||at(t);return""!==e?e:null}function h(t){return lt(t,"selected")}function m(t){dt(t,"selected"),t.selected=!1}function y(t){pt(t,H+"selected")}function k(t){wt(t,"selected",!0),t.selected=!0}function S(t){kt(t,H+"selected")}function _(t){t=t||Ae,vt.title=t.replace(/<.*?>/g,""),Ct(vt,t)}function D(t){if(tt)for(var n,r=E(n),i=0,o=C(rt);i<o;++i)n=c(rt[i]),r.includes(L(n))?k(rt[i]):m(rt[i]);else e.value=t}o.hooks,i.state=r=b({},Oe.state,r),i.options={},i.source=e,Oe.instances[e.id||e.name||P(Oe.instances)]=i,e[ge]=i;var T=r.class,O=T+"__",M=T+"--",I=O+"input",N=O+"option",H=N+"--",R=O+"options",K=O+"value",X=O+"values",F=Dt(e,{class:O+"source",tabindex:-1}),$="input"===Q(F)?Dt("span","",{class:I}):null,Y=$?e.placeholder:"",W=Dt("span",Y),G=Dt("span","",{contenteditable:"",tabindex:0}),V=function(){return F.disabled},J=z(F),tt=F.multiple,nt=0,rt=F.options,ot=r.parent||j,ct="input"===Q(F)?0:F.size,ut=F.title,ft=s(),ht=Dt("div",{class:T,tabindex:!$&&!V()&&0,title:ut}),vt=Dt("div",Ae,{class:X}),gt=F.list,bt=0,St=0,xt=Dt("div",{class:R,tabindex:-1}),At=[],Nt=!1,Ht=!1;function Lt(){pt(ht,M+"focus"),a("blur",l())}function Rt(){kt(ht,M+"focus"),a("focus",l())}function Kt(){kt(ht,M+"open"),a("enter",l())}function Xt(){tt||ct||(pt(ht,M+"open"),a("exit",l()))}function Ft(){bt=A(it(ht,"border-bottom-width")),St=A(it(ht,"border-top-width")),le(ht)}function jt(t){It(ht,M+"open",t);var e=$t();return a(e?"enter":"exit",l()),e}function Bt(t,e,n,r){return Dt("span",t,{class:K+" "+r,"data-index":e,"data-value":n}).outerHTML}function $t(){return st(ht,M+"open")}function Yt(){($?G:ht).focus()}function Ut(t){if(rt&&!V()){var e,n,i,o=[],s=this,c=s[be],u=ft;if(nt=s[me],ft=s[ye],t&&t.isTrusted&&Yt(),f(t),tt&&(Nt||Ht)){!function(t){return st(t,H+"selected")}(s)?(k(c),S(s)):(m(c),y(s));for(var d,p=0,v=C(rt);p<v;++p)h(rt[p])&&(e=at(d=At[p]),n=d[me],i=d[ye],o.push(Bt(e,n,i,q(d,!1))));return _(o.join("<span>"+r.join+"</span>")),void a("change",l())}e=at(s),n=s[me],i=s[ye],e&&$&&(Ct(W,Ae),Mt(G,e)),_(Bt(e,n,i,q(s,!1))),$&&(Pe(G),D(e)),At.forEach((function(t){ft===t[ye]?(k(t[be]),S(t)):(m(t[be]),y(t))})),ft!==u&&a("change",l())}}function Wt(t){Lt()}function zt(t){if(!V()){if(nt=F.selectedIndex,ct)return Kt();$?G.focus():jt()&&Ft()}}function qt(t){nt=F.selectedIndex,Rt()}function Gt(t){if(rt){Nt=t.ctrlKey,Ht=t.shiftKey;var e=t.key,n=nt,r=At[n],i=function(t){return st(t,H+"disabled")},o=function(t){return Ut.call(t)},a=$t();if(we===e){for(;(r=At[++n])&&(i(r)||r.hidden););r&&(o(r),jt(a)),f(t)}else if(Se===e){for(;(r=At[--n])&&(i(r)||r.hidden););r&&(o(r),jt(a)),f(t)}else if(_e===e){for(n=C(rt);(r=At[--n])&&(i(r)||r.hidden););r&&(o(r),jt(a)),f(t)}else if(xe===e)r&&o(r),jt(),f(t);else if(De===e)!ct&&Xt();else if(Ce===e){for(n=-1;(r=At[++n])&&(i(r)||r.hidden););r&&(o(r),jt(a)),f(t)}else Te===e&&(!$&&r&&o(r),!ct&&Xt());$t()&&!Nt&&!Ht&&Ft()}}function Vt(){Nt=Ht=!1}function Jt(){var t=at(G);null!==t&&D(w(t)),Lt()}function Zt(){if(rt){var t,e,n=at(this);nt=-1,Pe(this);for(var r=0,i=C(rt);r<i;++r)t=rt[r],e=At[r],n===at(t)?(nt=r,k(t),S(e)):(m(t),y(e));Rt(),jt()&&Ft()}}tt&&!ct&&(F.size=ct=r.size),$&>&&(J=z(gt),rt=gt.options,ct=null,ft&&(Ct(W,Ae),Mt(G,ft))),$&&(Et($,G),Et($,W)),Et(ht,$||vt),Tt(F,ht);var Qt=se((function(t,e,n){var r,i,o=at(t);if(null===o){Ct(W,Y),xt.hidden=!1;for(var a=0,l=C(At);a<l;++a)Ct(i=At[a],at(i)),i.hidden=!1}else if(Ct(W,Ae),n!==(o=x(o))&&we!==e&&Ee!==e&&ke!==e&&Se!==e&&xe!==e){for(var s,c=0,u=C(At);c<u;++c)m((i=At[c])[be]),y(i),(s=at(i))&&x(s).includes(o)?(!r&&(r=i),Ct(i,s.replace(RegExp(o.replace(/[!$^*()+=[]{}|:<>,.?\/-]/g,"\\$&"),"gi"),(function(t){return"<mark>"+t+"</mark>"}))),i.hidden=!1):(Ct(i,s),i.hidden=!0);r?(nt=r[me],k(r[be]),S(r),xt.hidden=!1):xt.hidden=!0,n=o}else{for(var f,h=0,d=0,p=C(At);d<p;++d)i=At[d],f=Z(i),g("</mark>",f)&&++h;if(h<=1)for(var v,b=0,w=C(At);b<w;++b)i=At[b],v=at(i),Ct(i,v),i.hidden=!1}xe!==e&&De!==e&&Te!==e&&(Kt(),Ft())}),1);function te(t){var e=this,n=t.key;Gt(t),Qt(e,n,at(e))}function ee(){Vt()}var ne=ce((function(t,e){var n=at(t);Ct(e,null!==n?Ae:Y),Mt(t,n),Pe(t)}),1);function re(){ne(G,W)}function ie(t){var e=t.target;if(e!==ht)for(;(e=et(e))&&ht!==e;);ht!==e&&Xt()}function oe(){$t()&&le(ht,1)}function ae(e,n){if("optgroup"!==Q(e)){var r=U(e,"value",!1),o=r,a=at(e),l=e.title,s=Dt("a",a,{class:N,title:l||a});r=r||a,s[me]=nt,s[be]=e,s[ye]=r,_t(s,{index:nt,value:o}),i.options[r]=a,e.disabled?kt(s,H+"disabled"):p("click",s,Ut),Et(n,s),At.push(s),""===o&&(r=null),t(ft)&&g(r,ft)||r===ft?(kt(s,H+"selected"),_(Bt(a,nt,o,q(s,!1))),k(e)):m(e),++nt}else{var c=Dt("span",{class:N+"-group"+(e.disabled?" "+H+"disabled":"")}),u=z(e);c.title=e.label;for(var f=0,h=C(u);f<h;++f)ae(u[f],c);Et(n,c)}}function le(t,e){if(!ct){var n=fe(t),r=n[0],i=n[1],o=n[2],s=n[3],c=he(B)[1],u=c-i-s;Ot(xt,{bottom:"",left:r,"max-height":u,top:i+s-St,width:o}),u<(c-s)/2?(Ot(xt,{top:"",bottom:c-i-bt,"max-height":(u=i)+St}),pt(t,M+"down"),kt(t,M+"up")):(pt(t,M+"up"),kt(t,M+"down"))}if(!e){var f=At.find((function(t){return st(t,H+"selected")}));if(f){var h=he(f)[1],d=he(xt)[1],p=ue(f),v=p[0],g=p[1],m=de(xt)[1];g<m?pe(xt,[v,g]):g+h-d>m&&pe(xt,[v,g+h-d])}}a("fit",l())}v(["resize","scroll"],B,oe),p("click",ot,ie),p("focus",F,Yt),p("click",ht,zt),$?(p("blur",G,Jt),p("focus",G,Zt),p("keydown",G,te),p("keyup",G,ee),p("paste",G,re)):(p("blur",ht,Wt),p("focus",ht,qt),p("keydown",ht,Gt),p("keyup",ht,Vt));var Me=C(J);if(Me){Et(ht,xt);for(var Ie=0;Ie<Me;++Ie)ae(J[Ie],xt);if(ct){var Ne=At[0],He=he(Ne)[1]*ct;Pt(xt,"max-height",He)}}return ct&&(kt(ht,M+"down"),kt(ht,M+"open")),i.get=function(t){void 0===t&&(t=!0);var e=s();return t?L(e):e},i.pop=function(){return e[ge]?(delete e[ge],d(["resize","scroll"],B,oe),u("click",ot,ie),u("focus",F,Yt),pt(F,O+"source"),u("click",ht,zt),$?(u("blur",G,Jt),u("focus",G,Zt),u("keydown",G,te),u("keyup",G,ee),u("paste",G,re)):(u("blur",ht,Wt),u("focus",ht,qt),u("keydown",ht,Gt),u("keyup",ht,Vt)),yt(ht),mt(ht),a("pop",l())):i},i.set=function(t){return rt?(D(w(t)),At.forEach((function(t,e){var n=rt[e];It(t,H+"selected",n&&h(n))})),a("change",l()),i):i},i.self=ht,i}function Me(t){for(var e in Oe.instances)Oe.instances[e].pop(),delete Oe.instances[e];var n=J("input[list]:not([type=hidden]),select");n&&C(n)&&n.forEach((function(t){var e;pt(t,"input"),pt(t,"select");var n=q(t),r=new Oe(t,null!=(e=G(t,"state"))?e:{});St(r.self,n)})),1===t&&B._.on("change",Me)}Oe.instances={},Oe.state={class:"option-picker",join:", ",parent:null,size:5},Oe.version="1.3.10",B.OP=Oe;var Ie=function(t,e){return void 0===e&&(e=""),t.replace(Ne("["+e+He.replace(/./g,"\\$&")+"]"),"\\$&")},Ne=function(t,e){return function(t){return n(t,RegExp)}(t)?t:(t=t.replace(/\//g,"\\/"),RegExp(t,a(e)?e:"g"))},He="!$^*()+=[]{}|:<>,.?/-",Le="TP",Re="a",Ke="ArrowLeft",Xe="ArrowRight",Fe="Home",je="Backspace",Be="Delete",$e="End",Ye="Enter",Ue="Tab";function We(e,r){void 0===r&&(r={});var o=this;if(!e)return o;if(e[Le])return e[Le];if(!n(o,We))return new We(e,r);var a=function(){return e.disabled},s=function(){return e.readOnly},c=U(e,"placeholder"),m=U(e,"tabindex"),y=ve(o);y.hooks;var w=y.fire;o.state=r=b({},We.state,l(r)?{join:r}:r||{}),o.source=e,We.instances[e.id||e.name||P(We.instances)]=o,e[Le]=o;var E,S,_,D=r.class,T=D+"__",A=D+"--",M=nt(e),I=Dt("div",{class:D,tabindex:!a()&&-1}),N=Dt("span",{class:T+"tag "+T+"input"}),H=Dt("input",{class:T+"copy",tabindex:-1,type:"text"}),L=Dt("span",{contenteditable:!a()&&"true",spellcheck:"false",style:"white-space:pre;"}),R=Dt("span"),K=Dt("span",{class:T+"tags"}),X=0,F={};function $(t,e){var n=k(t,o.tags);return e&&w("get.tag",[t,n]),i(n)?t:null}function Y(){F={};var t,e=z(K),n=C(e)-1;for(t=0;t<n;++t)st(e[t],T+"tag--selected")&&(F[t]=e[t])}function q(t,n){i(n)?(n=n<0?0:n,o.tags.splice(n,0,t)):o.tags.push(t),e.value=o.tags.join(r.join)}function G(t,e){var n=Dt("span",{class:T+"tag",tabindex:!a()&&!s()&&0,title:t}),r=Dt("a",{class:T+"tag-x",href:"",tabindex:-1,target:"_top"});p("click",r,Pt),Et(n,r),p("click",n,Ct),v(["blur","focus"],n,yt),ct(K)&&(i(e)&&o.tags[e]?At(z(K,e),n):At(N,n))}function V(t){if(t=t?t.split(r.join):[],ct(I))for(var n,i,a;n=rt(N);)Z(a=n.title),g(a,t)||(i=k(a,o.tags),w("change",[a,i]),w("let.tag",[a,i]));o.tags=[],e.value="";for(var l,s=0,c=r.max;s<c&&t[s];++s)""!==(l=dt(t[s]))&&(G(l),q(l),w("change",[l,s]),w("set.tag",[l,s]))}function J(t){var n=k(t,o.tags);i(n)&&n>=0&&(o.tags.splice(n,1),e.value=o.tags.join(r.join))}function Z(t){var e,n=k(t,o.tags);if(i(n)&&n>=0&&(e=z(K,n))){u("click",e,Ct),d(["blur","focus"],e,yt);var r=W(e);r&&(u("click",r,Pt),mt(r)),mt(e)}}function Q(t){mt(H),ot("",1)}function it(t){Et(I,H),H.value=o.tags.join(r.join),H.focus(),H.select()}function ot(t,e){if(Mt(L,t),Mt(R,t?"":c),e){L.focus();var n=j.createRange(),r=B.getSelection();n.selectNodeContents(L),n.collapse(!1),r.removeAllRanges(),r.addRange(n)}}function lt(t){ht(t,(function(){pt(this,T+"tag--selected")}))}function ut(t){ht(t,(function(){kt(this,T+"tag--selected")}))}function ft(){if(!a()&&!s()){var t=gt(at(L)).trim(),e=r.pattern;if(e&&t&&!Ne(e,"").test(t))return w("not.tag",[t,-1]),void ot(t,1);if(ot(""),t=dt(t))if($(t))w("has.tag",[t,k(t,o.tags)]);else{G(t),q(t);var n=C(o.tags);w("change",[t,n]),w("set.tag",[t,n])}}}function ht(t,e){var n,r=z(K),i=C(r)-1;for(n=0;n<i;++n)t!==r[n]&&e.call(r[n],n)}function dt(t){return gt(o.f(t)).trim()}function gt(t){return t=t||"",r.escape.forEach((function(e){t=t.split(e).join("")})),t}function bt(t){"blur"===t.type?(lt(),vt(I,[A+"focus",A+"focus-self"])):St(I,[A+"focus",A+"focus-self"])}function yt(t){if(!s()){F={};var e=this,n=t.type,r=e.title,i=o.tags,a=k(r,i),l=T+"tag--";"blur"===n?(!E&&!S||S&&_)&&(lt(e),pt(e,l+"selected"),vt(I,[A+"focus",A+"focus-tag"])):(kt(e,l+"selected"),St(I,[A+"focus",A+"focus-tag"]),X=a,F[a]=e),w(n+".tag",[r,a])}}function wt(t){var e=o.tags,n=t.type,r=T+"text--";pt(I,A+"focus-tag"),"blur"===n?(pt(N,r+"focus"),vt(I,[A+"focus",A+"focus-input"]),ft()):(kt(N,r+"focus"),St(I,[A+"focus",A+"focus-input"]),lt(N)),w(n,[e,C(e)])}function _t(t){"blur"===t.type?pt(I,A+"focus"):kt(I,A+"focus")}function xt(t){t&&I===t.target&&L.focus();var e=o.tags;w("click",[e,C(e)])}function Ct(){var t=this.title,e=o.tags;w("click.tag",[t,k(t,e)])}function Pt(t){if(!a()&&!s()){var e=et(this).title,n=k(e,o.tags);Z(e),J(e),ot("",1),w("change",[e,n]),w("click.tag",[e,n]),w("let.tag",[e,n])}f(t)}function Ot(t){var e=t.type;"copy"===e?ce((function(){return Q()}),1)():"cut"===e?(!s()&&V(""),ce((function(){return Q()}),1)()):"paste"===e&&ce((function(){!s()&&V(H.value),Q()}),1)(),ce((function(){var t=o.tags;w(e,[t,C(t)])}),1)()}function It(){lt(),pt(I,A+"focus-self")}function Nt(){L.focus()}function Ht(t){if(!a()&&!s()){o.tags;var e,n,r,i,l,c,u=t.key,h=E=t.ctrlKey,d=S=t.shiftKey,p=T+"tag--";if(_=Ue===u,!h){if(!d&&(je===u||Be===u)){Y(),c=F;var v=je===u;for(n in c)Z(l=(e=c[n]).title),J(l);return X=+(O(c)[0]||0),(e=z(K,v?X-1:X))?N===e?ot("",1):e.focus():ot("",1),void f(t)}if(Fe===u)return void((e=z(K,0))&&(e.focus(),f(t)));if($e===u&&(e=z(K,C(o.tags)-1)))return e.focus(),void f(t);if(Ke===u){if(e=z(K,X-1)){var g=st(e,p+"selected");return e.focus(),f(t),d?(r=tt(e),void(g&&pt(r,p+"selected"))):void lt(e)}if(!d)return void lt(z(K,0))}if(Xe===u&&(e=z(K,X+1))){var m=st(e,p+"selected");return N!==e||d?e.focus():ot("",1),f(t),d?(i=rt(e),void(m&&pt(i,p+"selected"))):void lt(e)}}Re===u&&(it(),ut(),Y(),f(t))}}function Lt(t){h(t),s()&&Ue!==t.key&&f(t);var e,n=r.escape,i=rt(N),a=C(o.tags),l=r.max,u=at(L)||"",d=t.key,p=E=t.ctrlKey,v=Ye===d;S=t.shiftKey;var m=_=Ue===d;if(v&&(d="\n"),m&&(d="\t"),ce((function(){u=at(L)||"",Mt(R,u?"":c),g(function(t){var e,n=B.getSelection();if(n.rangeCount>0)return(e=n.getRangeAt(0).cloneRange()).collapse(!0),e.setStart(t,0),(e+"").slice(-1)}(L),n)&&(a<l?ft():(ot(""),w("max.tags",[l])),f(t))}),1)(),""===u&&Fe===d&&(e=z(K,0)))return e.focus(),void f(t);if(""===u&&$e===d&&(e=z(K,C(o.tags)-1)))return e.focus(),void f(t);if(p&&""===u&&Re===d)return it(),ut(),Y(),void f(t);if(g(d,n))return a<l?ft():(ot(""),w("max.tags",[l])),void f(t);if(!m){if(!p&&v)return Xt()&&M&&M.dispatchEvent(new Event("submit",{cancelable:!0})),void f(t);if(i&&""===u&&!s()){if(je===d)return Z(e=o.tags[a-1]),J(e),w("change",[e,a-1]),w("let.tag",[e,a-1]),void f(t);if(Ke===d)return void i.focus()}}}function Rt(){E=S=!1}function Kt(){ce((function(){a()||s()||at(L).split(r.join).forEach((function(t){g(t,o.tags)||(G(t),q(t))})),ot("")}),1)()}function Xt(t){if(!a()){var e=r.min;return ft(),e>0&&C(o.tags)<e?(ot("",1),w("min.tags",[e]),void f(t)):1}}return ot(""),Et(I,K),Et(N,L),Et(N,R),Et(K,N),kt(e,T+"source"),Tt(e,I),Dt(e,{tabindex:-1}),p("blur",I,It),p("click",I,xt),p("focus",e,Nt),p("keydown",I,Ht),p("keydown",L,Lt),p("keyup",I,Rt),p("paste",L,Kt),v(["blur","focus"],I,_t),v(["blur","focus"],H,bt),v(["blur","focus"],L,wt),v(["copy","cut","paste"],H,Ot),M&&p("submit",M,Xt),o.blur=function(){return!a()&&L.blur(),o},o.click=function(){return I.click(),xt(),o},o.f=function(t){return x(t||"").replace(/[^ a-z\d-]/g,"").trim()},o.focus=function(){return a()||ot(at(L),1),o},o.get=function(t){return a()?null:$(t,1)},o.input=L,o.let=function(e){if(!a()&&!s()){var n=r.min;if(e)if(t(e))e.forEach((function(t){if(n>0&&C(o.tags)<n)return w("min.tags",[n]),o;Z(t),J(t)}));else{if(n>0&&C(o.tags)<n)return w("min.tags",[n]),o;Z(e),J(e)}else V("")}return o},o.pop=function(){if(!e[Le])return o;delete e[Le];var t=o.tags;return pt(e,T+"source"),u("blur",I,It),u("click",I,xt),u("focus",e,Nt),u("keydown",I,Ht),u("keydown",L,Lt),u("keyup",I,Rt),u("paste",L,Kt),d(["blur","focus"],I,_t),d(["blur","focus"],H,bt),d(["blur","focus"],L,wt),d(["copy","cut","paste"],H,Ot),M&&u("submit",M,Xt),t.forEach(Z),Dt(e,{tabindex:m}),mt(I),w("pop",[t])},o.self=I,o.set=function(e,n){if(!e)return o;if(!a()&&!s())if(t(e))V(e.join(r.join));else{var i=o.tags,l=r.max;$(e)?w("has.tag",[e,k(e,i)]):C(i)<l?(G(e,n),q(e,n)):w("max.tags",[l])}return o},o.source=o.output=e,o.state=r,o.tags=[],V(e.value),o}function ze(t){for(var e in We.instances)We.instances[e].pop(),delete We.instances[e];var n=J(".lot\\:field.type\\:query input:not([type=hidden])");n&&C(n)&&n.forEach((function(t){var e;pt(t,"input");var n=q(t),r=new We(t,null!=(e=G(t,"state"))?e:{});St(r.self,n)})),1===t&&B._.on("change",ze)}We.instances={},We.state={class:"tag-picker",escape:[","],join:", ",max:9999,min:0,pattern:null},We.version="3.4.18",B.TP=We;var qe,Ge={blur:0,click:0,copy:0,cut:0,focus:0,input:0,keydown:"key.down",keyup:"key.up",mousedown:"mouse.down",mouseenter:"mouse.enter",mouseleave:"mouse.exit",mousemove:"mouse.move",mouseup:"mouse.up",paste:0,scroll:0,touchend:"mouse.up",touchmove:"mouse.move",touchstart:"mouse.down",wheel:"scroll"},Ve="TextEditor";function Je(t){return(t.value||U(t,"value")||"").replace(/\r/g,"")}function Ze(t){return t.disabled}function Qe(t,e){return(t||"")["trim"+(-1===e?"Left":1===e?"Right":"")]()}function tn(t,e){var i=this;return t?n(i,tn)?(t["_"+Ve]=ve(i,tn.prototype),i.attach(t,b({},tn.state,r(e)||l(e)?{tab:e}:e||{}))):new tn(t,e):i}function en(t){var e=this["_"+Ve],n=t.type,r=Je(this);r!==qe&&(qe=r,e.fire("change")),e.fire(Ge[n]||n,[t])}tn.esc=Ie,tn.state={n:"text-editor",tab:"\t",with:[]},tn.S=function(t,e,n){var r=this,i=n.slice(t,e);r.after=n.slice(e),r.before=n.slice(0,t),r.end=e,r.length=C(i),r.start=t,r.value=i,r.toString=function(){return i}},tn.version="4.1.5",tn.x=He,Object.defineProperty(tn,"name",{value:Ve});var nn=tn.prototype;function rn(){var t=this,n=t.constructor.prototype;return t._history=[],t._historyState=-1,!e(n.history)&&(n.history=function(t){var e=this._active,n=this._history;return!!e&&(a(t)?a(n[t])?n[t]:null:n)}),!e(n.loss)&&(n.loss=function(t){var e,n=this,r=n._active;n._history;var i=n._historyState;return!!r&&(!0===t?(n._history=[],n._historyState=-1,null):(e=n._history.splice(a(t)?t:i,1),n._historyState=T(i-1,[-1]),e))}),!e(n.record)&&(n.record=function(t){var e,n,r=this,i=r.$(),o=i.end,l=i.start,s=r._active,c=r._history,u=r._historyState;return s?(e=c[u]||[],(n=[r.get(),[l,o],Date.now()])[0]===e[0]&&n[1][0]===e[1][0]&&n[1][1]===e[1][1]||(++u,r._history[a(t)?t:u]=n,r._historyState=u),r):r}),!e(n.redo)&&(n.redo=function(){var t,e=this,n=e._active,r=e._history,i=e._historyState;return n&&(t=r[e._historyState=T(i+1,[0,C(r)-1])])?e.set(t[0]).select(t[1][0],t[1][1]):e}),!e(n.undo)&&(n.undo=function(){var t,e=this,n=e._active,r=e._history,i=e._historyState;return n&&(t=r[e._historyState=T(i-1,[0,C(r)-1])])?e.set(t[0]).select(t[1][0],t[1][1]):e}),t}function on(t){var e=this;return e.commands={},e.key=null,e.keys={},e.queue={},e.self=t||e,e}nn.$=function(){var t=this.self;return new tn.S(t.selectionStart,t.selectionEnd,Je(t))},nn.attach=function(n,i){var s=this;if(n=n||s.self,i&&(r(i)||l(i))&&(i={tab:i}),i=b({},s.state,i||{}),st(n,i.n+"__self"))return s;for(var c in s._active=!Ze(n)&&!function(t){return t.readOnly}(n),s._value=Je(n),s.self=n,s.state=i,Ge)p(c,n,en);if(kt(n,i.n+"__self"),a(i)&&t(i.with))for(var u=0,f=C(i.with);u<f;++u){var h=i.with[u];l(h)&&(h=tn[h]),e(h)?h.call(s,n,i):o(h)&&e(h.attach)&&h.attach.call(s,n,i)}return s},nn.blur=function(){return this.self.blur()},nn.detach=function(){var n=this,r=n.self,i=n.state;if(!st(r,i.n+"__self"))return n;for(var a in n._active=!1,Ge)u(a,r,en);if(pt(r,i.n+"__self"),t(i.with))for(var s=0,c=C(i.with);s<c;++s){var f=i.with[s];l(f)&&(f=tn[f]),o(f)&&e(f.detach)&&f.detach.call(n,r,i)}return n},nn.focus=function(t){var e,n,r=this,i=r._active,o=r.self;return i?(-1===t?e=n=0:1===t&&(e=C(Je(o)),n=o.scrollHeight),a(e)&&a(n)&&(o.selectionStart=o.selectionEnd=e,o.scrollTop=n),o.focus(),r):(o.focus(),r)},nn.get=function(){var t=this._active,e=this.self;return!!t&&(!Ze(e)&&Je(e)||null)},nn.insert=function(t,e,n){var r=this,i=/^[\s\S]*?$/;return r._active?(n&&r.replace(i,""),-1===e?i=/$/:1===e&&(i=/^/),r.replace(i,t,e)):r},nn.let=function(){var t=this,e=t._active,n=t.self;return e?(n.value=t._value,t):t},nn.match=function(n,r){var i=this,o=i.$(),a=o.after,l=o.before,s=o.value;if(t(n)){var c=[l.match(n[0]),s.match(n[1]),a.match(n[2])];return e(r)?r.call(i,c[0]||[],c[1]||[],c[2]||[]):[!!c[0],!!c[1],!!c[2]]}var u=s.match(n);return e(r)?r.call(i,u||[]):!!u},nn.peel=function(t,e,n){var r=this,i=r.$(),o=i.after,a=i.before,l=i.value;t=Ie(t),e=Ie(e);var s=Ne(t+"$",""),c=Ne("^"+e,"");return n?r.replace(Ne("^"+t+"([\\s\\S]*?)"+e+"$",""),"$1"):s.test(a)&&c.test(o)?(a=a.replace(s,""),o=o.replace(c,""),r.set(a+l+o).select(a=C(a),a+C(l))):r.select()},nn.pull=function(t,e){void 0===e&&(e=!0);var n=this,i=n.state,o=n.$(),l=o.before,s=o.end,c=o.length,u=o.start,f=o.value;return r(t=a(t)?t:i.tab)&&(t=" ".repeat(t)),""!==l&&"\n"!==l.slice(-1)&&t!==l.slice(-C(t))&&n.select(u-=C(l.split("\n").pop()),c?s:u),t=Ie(t),c?e?n.replace(Ne("^"+t,"gm"),""):n.insert(f.split("\n").map((function(e){return Ne("^("+t+")*$","").test(e)?e:e.replace(Ne("^"+t,""),"")})).join("\n")):n.replace(Ne(t+"$",""),"",-1)},nn.push=function(t,e){void 0===e&&(e=!1);var n=this,i=n.state,o=n.$(),l=o.before,s=o.end,c=o.length,u=o.start;return r(t=a(t)?t:i.tab)&&(t=" ".repeat(t)),""!==l&&"\n"!==l.slice(-1)&&t!==l.slice(-C(t))&&n.select(u-=C(l.split("\n").pop()),c?s:u),c?n.replace(Ne("^"+(e?"":"(?!$)"),"gm"),t):n.insert(t,-1)},nn.replace=function(t,e,n){var r=this.$(),i=r.after,o=r.before,a=r.value;return-1===n?o=o.replace(t,e):1===n?i=i.replace(t,e):a=a.replace(t,e),this.set(o+a+i).select(o=C(o),o+C(a))},nn.select=function(){var t=this,e=t._active,n=t.self;if(!e)return n.focus(),t;for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a,l,s,c,u=C(i),f=t.$(),h=f.start,d=f.end;if(a=B.pageXOffset||Y.scrollLeft||$.scrollLeft,l=B.pageYOffset||Y.scrollTop||$.scrollTop,s=n.scrollLeft,c=n.scrollTop,0===u)i[0]=h,i[1]=d;else if(1===u){if(!0===i[0])return n.focus(),n.select(),t;i[1]=i[0]}return n.focus(),n.selectionStart=i[0],n.selectionEnd=i[1],n.scrollLeft=s,n.scrollTop=c,B.scroll(a,l),t},nn.set=function(t){var e=this,n=e._active,r=e.self;return n?(r.value=t,e):e},nn.trim=function(t,e,n,r,i){void 0===i&&(i=!0),null!==t&&!1!==t&&(t=t||""),null!==e&&!1!==e&&(e=e||""),null!==n&&!1!==n&&(n=n||""),null!==r&&!1!==r&&(r=r||"");var o=this.$(),a=o.after,l=o.before,s=o.value,c=Qe(a,-1),u=Qe(l,1);return a=!1!==e?(c||!i?e:"")+Qe(a,-1):a,l=!1!==t?Qe(l,1)+(u||!i?t:""):l,!1!==r&&(s=Qe(s,1)),!1!==n&&(s=Qe(s,-1)),this.set(l+s+a).select(l=C(l),l+C(s))},nn.wrap=function(t,e,n){var r=this,i=r.$(),o=i.after,a=i.before,l=i.value;return n?r.replace(/^[\s\S]*?$/,t+"$&"+e):r.set(a+t+l+e+o).select(a=C(a+t),a+C(l))},Object.defineProperty(nn,"value",{get:function(){return this.self.value},set:function(t){this.self.value=t}}),Object.defineProperty(rn,"name",{value:"TextEditor.History"});var an=on.prototype;an.command=function(t){var e=this;if(l(t))return t===e.toString();var n=e.keys[e.toString()];return!!a(n)&&n},an.fire=function(n){var r,i,o=this,s=o.self||o;if(e(n))r=n.call(s),i=!0;else if(l(n)&&(n=o.commands[n]))r=n.call(s),i=!0;else if(t(n)){var c=n[1]||[];(n=o.commands[n[0]])&&(r=n.apply(s,c),i=!0)}return i?!a(r)||r:null},an.pull=function(t){var e=this;return e.key=null,a(t)?(delete e.queue[t],e):(e.queue={},e)},an.push=function(t){var e=this;return e.queue[e.key=t]=1,e},an.toString=function(){return O(this.queue).join("-")},Object.defineProperty(on,"name",{value:"Key"});var ln=se((function(t){return t.pull()}),1e3),sn="_Key";function cn(t){this._event=t,this[sn].pull()}function un(t){cn.call(this,t)}function fn(t){var e,n,r=this[sn];r.push(t.key),this._event=t,(e=r.command())&&(!1===(n=r.fire(e))?(f(t),h(t)):null===n&&console.warn("Unknown command: `"+e+"`")),ln(r)}function hn(t){this._event=t,this[sn].pull(t.key)}var dn={attach:function(){var t=this,n=t.constructor.prototype,r=new on(t);return t.commands=b(t.commands=r.commands,t.state.commands||{}),t.keys=b(t.keys=r.keys,t.state.keys||{}),!e(n.command)&&(n.command=function(t,e){return this.commands[t]=e,this}),!e(n.k)&&(n.k=function(t){var e,n=this[sn]+"";return a(t)&&"-"!==t&&(e=""!==n?n.split(/-(?!$)/):[],!1!==t)?e.join(t):!1===t?"-"===n?[n]:e:n}),!e(n.key)&&(n.key=function(t,e){return this.keys[t]=e,this}),t.on("blur",cn),t.on("input",un),t.on("key.down",fn),t.on("key.up",hn),t[sn]=r,t},detach:function(){var t=this;return t[sn].pull(),t.off("blur",cn),t.off("input",un),t.off("key.down",fn),t.off("key.up",hn),delete t[sn],t},name:"TextEditor.Key"},pn="Alt-",vn="Control-",gn="Shift-",mn=se((function(t){return t.record()}),10);function bn(t){var e=this,n=e.k(!1).pop(),i=e.k();if(mn(e),!t.defaultPrevented&&!e.keys[i]){var o,a,l=e.state.tab||"\t",s=e.state.pairs||{},c=M(s);r(l)&&(l=" ".repeat(l));var u=e.$(),h=u.after,d=u.before,p=u.end,v=u.start,m=u.value,b=h.split("\n").shift(),y=d.split("\n").pop(),w=/^\s+/.exec(y),E=w&&w[0]||"";if(vn+gn+"Enter"===i)return d||h?(f(t),e.select(v-C(y)).wrap(E,"\n").insert(m).record(),!1):void 0;if(vn+"Enter"===i&&(d||h))return f(t),e.select(p+C(b)).wrap("\n"+E,"").insert(m).record(),!1;if(pn!==i+"-"&&vn!==i+"-"){if(" "===i)return o=s[a=d.slice(-1)],!m&&o&&a&&o===h[0]?(f(t),e.wrap(" "," ")):void 0;if("Backspace"===i||"Delete"===i){if(o=s[a=d.slice(-1)],"\\"===a)return;return m?h&&d&&o&&o===h[0]&&!d.endsWith("\\"+a)?(f(t),e.record().peel(a,o).record()):void 0:(o=s[a=d.trim().slice(-1)])&&a&&(h.startsWith(" "+o)&&d.endsWith(a+" ")||h.startsWith("\n"+E+o)&&d.endsWith(a+"\n"+E))?(f(t),e.trim("","").record()):"Delete"!==i&&y.endsWith(l)?(f(t),e.pull(l).record()):h&&d&&!d.endsWith("\\"+a)&&o===h[0]&&a===d.slice(-1)?(f(t),e.peel(a,o).record()):void 0}if("Enter"!==i&&gn+"Enter"!==i){if("\\"!==(a=d.slice(-1))){if(o=g(h[0],c)?h[0]:s[a],!m&&h&&d&&o&&n===o)return f(t),e.select(v+1).record();for(a in s){if(o=s[a],n===a&&o)return f(t),e.wrap(a,o).record();if(n===o){if(m)return f(t),e.record().wrap(a,o).record();break}}var k,S,_,x=[];if(m){for(k in s)(S=s[k])&&x.push("(?:\\"+k+"(?:\\\\.|[^\\"+k+(S!==k?"\\"+S:"")+"])*\\"+S+")");if(x.push("\\w+"),x.push("\\s+"),x.push("[\\s\\S]"),vn+"ArrowLeft"===i)return f(t),(_=Ne("("+x.join("|")+")$","").exec(d))?e.insert("").select(v-C(_[0])).insert(m).record():e.select();if(vn+"ArrowRight"===i)return f(t),(_=h.match(Ne("^("+x.join("|")+")","")))?e.insert("").select(p+C(_[0])-C(m)).insert(m).record():e.select()}if(p+=C(b),v-=C(y),m=y+m+b,vn+"ArrowUp"===i){if(f(t),!g("\n",d))return e.select();e.insert(""),e.replace(/^([^\n]*?)(\n|$)/,"$2",1),e.replace(/(^|\n)([^\n]*?)$/,"",-1);var D=e.$();return d=D.before,v=D.start,y=d.split("\n").pop(),e.select(v-=C(y)).wrap(m,"\n"),e.select(v,v+C(m)),e.record()}if(vn+"ArrowDown"===i){if(f(t),!g("\n",h))return e.select();e.insert(""),e.replace(/^([^\n]*?)(\n|$)/,"",1),e.replace(/(^|\n)([^\n]*?)$/,"$1",-1);var T=e.$();return h=T.after,p=T.end,b=h.split("\n").shift(),e.select(p+=C(b)).wrap("\n",m),p+=1,e.select(p,p+C(m)),e.record()}}}else if(!m){if(h&&d&&(o=s[a=d.slice(-1)])&&o===h[0])return f(t),e.wrap("\n"+E+(a!==o?l:""),"\n"+E).record();if(E)return f(t),e.insert("\n"+E,-1).record()}}else f(t)}}var yn={attach:function(){var t=this,n=t.constructor.prototype;return t.state=b({pairs:{"`":"`","(":")","{":"}","[":"]",'"':'"',"'":"'","<":">"}},t.state),!e(n.alert)&&(n.alert=function(t,n){return B.alert&&B.alert(t),e(n)&&n.call(this,!0)}),!e(n.confirm)&&(n.confirm=function(t,n){return e(n)&&n.call(this,B.confirm&&B.confirm(t))}),!e(n.insertBlock)&&(n.insertBlock=function(t,e){var n=this,r=n.$(),i=r.after,o=r.before,a=r.end,l=r.start,s=i.split("\n").shift(),c=C(s),u=o.split("\n").pop(),f=C(u),h=/^\s+/.exec(u),d=h&&h[0]||"";return-1===e?n.select(l-f).insert("\n",1).push(d).insert(t,1,!1):1===e?n.select(a+c).insert("\n",-1).push(d).insert(t,1,!1):n.select(l-f,a+c).insert(t,e,!0).wrap(d,"")}),!e(n.peelBlock)&&(n.peelBlock=function(t,e,n){var r=this,i=r.$(),o=i.after,a=i.before,l=i.end,s=i.start,c=i.value,u=C(e),f=o.split("\n").shift(),h=C(f),d=a.split("\n").pop(),p=C(d),v=C(t);return n&&e===c.slice(-u)&&t===c.slice(0,v)||e===f.slice(-u)&&t===d.slice(0,v)?r.select(s-p+(n?0:v),l+h-(n?0:u)).peel(t,e,n):r.select(s,l)}),!e(n.prompt)&&(n.prompt=function(t,n,r){return e(r)&&r.call(this,!!B.prompt&&B.prompt(t,n))}),!e(n.selectBlock)&&(n.selectBlock=function(t){void 0===t&&(t=!0);var e=this,n=e.$(),r=n.after,i=n.before,o=n.end,a=n.start,l=n.value,s=r.split("\n").shift(),c=C(s),u=i.split("\n").pop(),f=C(u);if(!t){var h=/\s+$/.exec(s),d=/^\s+/.exec(u);h&&(c-=C(h[0])),d&&(f-=C(d[0]))}if(e.select(a-f,o+c),!t){var p,v=e.$();if(o=v.end,a=v.start,l=v.value,p=/^(\s+)?[\s\S]+?(\s+)?$/.exec(l))return e.select(a+C(p[1]||""),o-C(p[2]||""))}return e}),!e(n.toggle)&&(n.toggle=function(t,e,n){var r=this,i=r.$(),o=i.after,a=i.before,l=i.value,s=C(e),c=C(t);return n&&e===l.slice(-s)&&t===l.slice(0,c)||e===o.slice(0,s)&&t===a.slice(-c)?r.peel(t,e,n):r.wrap(t,e,n)}),!e(n.toggleBlock)&&(n.toggleBlock=function(t,e,n){var r=this,i=r.$(),o=i.after,a=i.before,l=i.value,s=C(e),c=o.split("\n").shift(),u=a.split("\n").pop(),f=C(t);return n&&e===l.slice(-s)&&t===l.slice(0,f)||e===c.slice(-s)&&t===u.slice(0,f)?r.peelBlock(t,e,n):r.wrapBlock(t,e,n)}),!e(n.wrapBlock)&&(n.wrapBlock=function(t,e,n){var r=this.$(),i=r.after,o=r.before,a=r.end,l=r.start,s=i.split("\n").shift(),c=C(s),u=o.split("\n").pop(),f=C(u);return this.select(l-f,a+c).wrap(t,e,n)}),t.on("key.down",bn).record()},detach:function(){return this.off("key.down",bn)},name:"TextEditor.Source"};function wn(t){for(var e;e=tn.instances.pop();)e.detach();var n,r,i,o=J(".lot\\:field.type\\:source textarea");o&&C(o)&&o.forEach((function(t){var e;(n=new tn(t,r=null!=(e=G(t,"state"))?e:{})).command("pull",(function(){return this.pull(),!1})),n.command("push",(function(){return this.push(),!1})),n.key("Control-[","pull"),n.key("Control-]","push"),n.key("Escape",(function(){var t=et(this.self,"[tabindex]:not(.not\\:active)");return!t||(t.focus({focusVisible:!0}),!1)})),"HTML"!==(i=r.type||t.form.elements["data[type]"]||t.form.elements["page[type]"]||t.form.elements["file[type]"]||"text/plain")&&"text/html"!==i||(n.command("blocks",(function(){})),n.command("bold",(function(){})),n.command("code",(function(){})),n.command("image",(function(){})),n.command("italic",(function(){})),n.command("link",(function(){})),n.command("quote",(function(){})),n.command("underline",(function(){})),n.key('Control-Shift-"',"quote"),n.key("Control-'","quote"),n.key("Control-b","bold"),n.key("Control-e","code"),n.key("Control-h","blocks"),n.key("Control-i","italic"),n.key("Control-l","link"),n.key("Control-o","image"),n.key("Control-u","underline")),tn.instances.push(n)})),1===t&&B._.on("change",wn)}tn.instances=[],tn.state.with.push(rn),tn.state.with.push(dn),tn.state.with.push(yn),B.TextEditor=tn;var En=':scope>:where(.lot\\:file[tabindex],.lot\\:folder[tabindex]):not([tabindex="-1"]):not(.not\\:active)';function kn(t){var e,n,r,i=this,o=t.key;if(i===t.target){for(e=tt(i);e&&st(e,"not:active");)e=tt(e);for(n=rt(i);n&&st(n,"not:active");)n=rt(n);"ArrowDown"===o?(R(e),r=!0):"ArrowUp"===o?(R(n),r=!0):"End"===o?(R([].slice.call(J(En,et(i))).pop()),r=!0):"Home"===o&&(R(V(En,et(i))),r=!0),r&&(f(t),h(t))}}function Sn(t){var e,n=this,r=t.key,i=t.altKey,o=t.ctrlKey,a=t.shiftKey;if(n===t.target){if(!i&&!o&&!a)"ArrowDown"===r||"Home"===r?(R(V(En,n)),e=!0):"ArrowUp"!==r&&"End"!==r||(R([].slice.call(J(En,n)).pop()),e=!0);e&&(f(t),h(t))}}var _n=':scope>ul>li>:where(a,button,input,select,textarea,[tabindex]):not(:disabled):not([tabindex="-1"]):not(.not\\:active)';function xn(t){var e,n,r,i,o,a=this,l=t.key,s=t.altKey,c=t.ctrlKey,u=t.shiftKey;if((e=et(a,"[aria-orientation]"))&&(o="v"===(U(e,"aria-orientation")||[""])[0]),!s&&!c&&!u){if(e=et(a)){for(n=tt(e);n&&(st(n,"as:separator")||st(n,"not:active"));)n=tt(n);for(r=rt(e);r&&(st(r,"as:separator")||st(r,"not:active"));)r=rt(r)}"Arrow"+(o?"Up":"Left")===l?(R(r&&W(r)),i=!0):"Arrow"+(o?"Down":"Right")===l?(R(n&&W(n)),i=!0):"End"===l?((e=et(a,".lot\\:links[tabindex]"))&&R([].slice.call(J(_n,e)).pop()),i=!0):"Home"===l&&((e=et(a,".lot\\:links[tabindex]"))&&R(V(_n,e)),i=!0)}i&&(f(t),h(t))}function Dn(t){var e,n,r=this,i=t.key,o=t.altKey,a=t.ctrlKey,l=t.shiftKey;r===t.target&&(n="v"===(U(r,"aria-orientation")||[""])[0],o||a||l||("Arrow"+(n?"Down":"Right")===i||"Home"===i?(R(V(_n,r)),e=!0):"Arrow"+(n?"Up":"Left")!==i&&"End"!==i||(R([].slice.call(J(_n,r)).pop()),e=!0)),e&&(f(t),h(t)))}var Cn=":where(a,[tabindex]):not(.not\\:active)";function Tn(t,e){J(".lot\\:menu[tabindex].is\\:enter").forEach((function(n){t!==n&&(pt(et(n),"is:active"),pt(rt(n),"is:active"),pt(n,"is:enter"),e&&wt(e,"aria-expanded","false"),B._.fire("menu.exit",[],n))}))}function An(){Tn(0)}function Pn(t){f(t),h(t);var e=this,n=tt(e);Tn(n,e),B.setTimeout((function(){It(n,"is:enter"),It(et(e),"is:active"),It(e,"is:active"),wt(e,"aria-expanded",st(e,"is:active")?"true":"false"),B._.fire("menu.enter",[],n)}),1)}function On(t){var e,n,r,i,o,a=this,l=t.key;if(n=et(a)){for(r=tt(n);r&&(st(r,"as:separator")||st(r,"not:active"));)r=tt(r);for(i=rt(n);i&&(st(i,"as:separator")||st(i,"not:active"));)i=rt(i)}"ArrowDown"===l?(R(r&&W(r)),o=!0):"ArrowLeft"===l||"Escape"===l||"Tab"===l?((n=et(a,".lot\\:menu[tabindex].is\\:enter"))?(pt(et(a),"is:active"),pt(n,"is:enter"),pt(a,"is:active"),wt(rt(n),"aria-expanded","false"),"Tab"!==l&&R(rt(n))):"Escape"===l&&R(et(a,".lot\\:menu[tabindex]")),o="Tab"!==l):"ArrowRight"===l?((r=tt(a))&&st(r,"lot:menu")&&(wt(a,"aria-expanded","true"),kt(et(a),"is:active"),kt(r,"is:enter"),kt(a,"is:active"),B.setTimeout((function(){R(V(Cn,r))}),1)),o=!0):"ArrowUp"===l?((e=i&&W(i))?R(e):(e=et(a,".lot\\:menu[tabindex].is\\:enter"))&&st(e,"level:1")&&(pt(e,"is:enter"),(e=rt(e))&&(pt(e,"is:active"),pt(et(e),"is:active"),wt(e,"aria-expanded","false"),B.setTimeout((function(){R(e)}),1))),o=!0):"End"===l?((n=et(a,".lot\\:menu[tabindex]"))&&R([].slice.call(J(Cn,n)).pop()),o=!0):"Home"===l&&((n=et(a,".lot\\:menu[tabindex]"))&&R(V(Cn,n)),o=!0),o&&(f(t),h(t))}function Mn(t){var e,n=this,r=t.key,i=t.altKey,o=t.ctrlKey,a=t.shiftKey;n===t.target&&(i||o||a||("ArrowDown"===r||"Home"===r?(R(V(Cn,n)),e=!0):"ArrowUp"!==r&&"End"!==r||(R([].slice.call(J(Cn,n)).pop()),e=!0)),e&&(f(t),h(t)))}function In(t){var e,n=this,r=t.key,i=tt(n),o=et(n);i&&o&&st(i,"lot:menu")&&(" "===r||"Enter"===r||"Tab"===r?"Tab"===r?st(i,"is:enter")&&c("click",n):(c("click",n),B.setTimeout((function(){R(V(Cn,i))}),1),e=!0):"ArrowDown"===r&&st(i,"level:1")&&(wt(n,"aria-expanded","true"),kt(et(n),"is:active"),kt(i,"is:enter"),kt(n,"is:active"),B.setTimeout((function(){R(V(Cn,i))}),1),e=!0)),e&&(f(t),h(t))}var Nn=':scope>ul>li>:where(a,button,input,select,textarea,[tabindex]):not(:disabled):not([tabindex="-1"]):not(.not\\:active)';function Hn(t){var e,n,r,i,o,a=this,l=t.key,s=t.altKey,c=t.ctrlKey,u=t.shiftKey;if((e=et(a,"[aria-orientation]"))&&(o="v"===(U(e,"aria-orientation")||[""])[0]),!s&&!c&&!u){if(e=et(a)){for(n=tt(e);n&&(st(n,"as:separator")||st(n,"not:active"));)n=tt(n);for(r=rt(e);r&&(st(r,"as:separator")||st(r,"not:active"));)r=rt(r)}"Arrow"+(o?"Up":"Left")===l?(R(r&&W(r)),i=!0):"Arrow"+(o?"Down":"Right")===l?(R(n&&W(n)),i=!0):"End"===l?((e=et(a,".lot\\:menus[tabindex]"))&&R([].slice.call(J(Nn,e)).pop()),i=!0):"Home"===l&&((e=et(a,".lot\\:menus[tabindex]"))&&R(V(Nn,e)),i=!0)}i&&(f(t),h(t))}function Ln(t){var e,n,r=this,i=t.key,o=t.altKey,a=t.ctrlKey,l=t.shiftKey;r===t.target&&(n="v"===(U(r,"aria-orientation")||[""])[0],o||a||l||("Arrow"+(n?"Down":"Right")===i||"Home"===i?(R(V(Nn,r)),e=!0):"Arrow"+(n?"Up":"Left")!==i&&"End"!==i||(R([].slice.call(J(Nn,r)).pop()),e=!0)),e&&(f(t),h(t)))}var Rn=':scope>.lot\\:page[tabindex]:not([tabindex="-1"]):not(.not\\:active)';function Kn(t){var e,n,r,i=this,o=t.key;if(i===t.target){for(e=tt(i);e&&st(e,"not:active");)e=tt(e);for(n=rt(i);n&&st(n,"not:active");)n=rt(n);"ArrowDown"===o?(R(e),r=!0):"ArrowUp"===o?(R(n),r=!0):"End"===o?(R([].slice.call(J(Rn,et(i))).pop()),r=!0):"Home"===o&&(R(V(Rn,et(i))),r=!0),r&&(f(t),h(t))}}function Xn(t){var e,n=this,r=t.key,i=t.altKey,o=t.ctrlKey,a=t.shiftKey;n===t.target&&(i||o||a||("ArrowDown"===r||"Home"===r?(R(V(Rn,n)),e=!0):"ArrowUp"!==r&&"End"!==r||(R([].slice.call(J(Rn,n)).pop()),e=!0)),e&&(f(t),h(t)))}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Fn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jn={exports:{}};"undefined"!=typeof self&&self,jn.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i="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},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function(){function t(e){var n=this;if(r(this,t),this.config=t.mergeSettings(e),this.selector="string"==typeof this.config.selector?document.querySelector(this.config.selector):this.config.selector,null===this.selector)throw Error("Something wrong with your selector 😭");this.resolveSlidesNumber(),this.selectorWidth=this.selector.offsetWidth,this.innerElements=[].slice.call(this.selector.children),this.currentSlide=this.config.loop?this.config.startIndex%this.innerElements.length:Math.max(0,Math.min(this.config.startIndex,this.innerElements.length-this.perPage)),this.transformProperty=t.webkitOrNot(),["resizeHandler","touchstartHandler","touchendHandler","touchmoveHandler","mousedownHandler","mouseupHandler","mouseleaveHandler","mousemoveHandler","clickHandler"].forEach((function(t){n[t]=n[t].bind(n)})),this.init()}return o(t,[{key:"attachEvents",value:function(){window.addEventListener("resize",this.resizeHandler),this.config.draggable&&(this.pointerDown=!1,this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:!1},this.selector.addEventListener("touchstart",this.touchstartHandler),this.selector.addEventListener("touchend",this.touchendHandler),this.selector.addEventListener("touchmove",this.touchmoveHandler),this.selector.addEventListener("mousedown",this.mousedownHandler),this.selector.addEventListener("mouseup",this.mouseupHandler),this.selector.addEventListener("mouseleave",this.mouseleaveHandler),this.selector.addEventListener("mousemove",this.mousemoveHandler),this.selector.addEventListener("click",this.clickHandler))}},{key:"detachEvents",value:function(){window.removeEventListener("resize",this.resizeHandler),this.selector.removeEventListener("touchstart",this.touchstartHandler),this.selector.removeEventListener("touchend",this.touchendHandler),this.selector.removeEventListener("touchmove",this.touchmoveHandler),this.selector.removeEventListener("mousedown",this.mousedownHandler),this.selector.removeEventListener("mouseup",this.mouseupHandler),this.selector.removeEventListener("mouseleave",this.mouseleaveHandler),this.selector.removeEventListener("mousemove",this.mousemoveHandler),this.selector.removeEventListener("click",this.clickHandler)}},{key:"init",value:function(){this.attachEvents(),this.selector.style.overflow="hidden",this.selector.style.direction=this.config.rtl?"rtl":"ltr",this.buildSliderFrame(),this.config.onInit.call(this)}},{key:"buildSliderFrame",value:function(){var t=this.selectorWidth/this.perPage,e=this.config.loop?this.innerElements.length+2*this.perPage:this.innerElements.length;this.sliderFrame=document.createElement("div"),this.sliderFrame.style.width=t*e+"px",this.enableTransition(),this.config.draggable&&(this.selector.style.cursor="-webkit-grab");var n=document.createDocumentFragment();if(this.config.loop)for(var r=this.innerElements.length-this.perPage;r<this.innerElements.length;r++){var i=this.buildSliderFrameItem(this.innerElements[r].cloneNode(!0));n.appendChild(i)}for(var o=0;o<this.innerElements.length;o++){var a=this.buildSliderFrameItem(this.innerElements[o]);n.appendChild(a)}if(this.config.loop)for(var l=0;l<this.perPage;l++){var s=this.buildSliderFrameItem(this.innerElements[l].cloneNode(!0));n.appendChild(s)}this.sliderFrame.appendChild(n),this.selector.innerHTML="",this.selector.appendChild(this.sliderFrame),this.slideToCurrent()}},{key:"buildSliderFrameItem",value:function(t){var e=document.createElement("div");return e.style.cssFloat=this.config.rtl?"right":"left",e.style.float=this.config.rtl?"right":"left",e.style.width=(this.config.loop?100/(this.innerElements.length+2*this.perPage):100/this.innerElements.length)+"%",e.appendChild(t),e}},{key:"resolveSlidesNumber",value:function(){if("number"==typeof this.config.perPage)this.perPage=this.config.perPage;else if("object"===i(this.config.perPage))for(var t in this.perPage=1,this.config.perPage)window.innerWidth>=t&&(this.perPage=this.config.perPage[t])}},{key:"prev",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1];if(!(this.innerElements.length<=this.perPage)){var n=this.currentSlide;if(this.config.loop)if(this.currentSlide-t<0){this.disableTransition();var r=this.currentSlide+this.innerElements.length,i=r+this.perPage,o=(this.config.rtl?1:-1)*i*(this.selectorWidth/this.perPage),a=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]="translate3d("+(o+a)+"px, 0, 0)",this.currentSlide=r-t}else this.currentSlide=this.currentSlide-t;else this.currentSlide=Math.max(this.currentSlide-t,0);n!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),e&&e.call(this))}}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1];if(!(this.innerElements.length<=this.perPage)){var n=this.currentSlide;if(this.config.loop)if(this.currentSlide+t>this.innerElements.length-this.perPage){this.disableTransition();var r=this.currentSlide-this.innerElements.length,i=r+this.perPage,o=(this.config.rtl?1:-1)*i*(this.selectorWidth/this.perPage),a=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]="translate3d("+(o+a)+"px, 0, 0)",this.currentSlide=r+t}else this.currentSlide=this.currentSlide+t;else this.currentSlide=Math.min(this.currentSlide+t,this.innerElements.length-this.perPage);n!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),e&&e.call(this))}}},{key:"disableTransition",value:function(){this.sliderFrame.style.webkitTransition="all 0ms "+this.config.easing,this.sliderFrame.style.transition="all 0ms "+this.config.easing}},{key:"enableTransition",value:function(){this.sliderFrame.style.webkitTransition="all "+this.config.duration+"ms "+this.config.easing,this.sliderFrame.style.transition="all "+this.config.duration+"ms "+this.config.easing}},{key:"goTo",value:function(t,e){if(!(this.innerElements.length<=this.perPage)){var n=this.currentSlide;this.currentSlide=this.config.loop?t%this.innerElements.length:Math.min(Math.max(t,0),this.innerElements.length-this.perPage),n!==this.currentSlide&&(this.slideToCurrent(),this.config.onChange.call(this),e&&e.call(this))}}},{key:"slideToCurrent",value:function(t){var e=this,n=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,r=(this.config.rtl?1:-1)*n*(this.selectorWidth/this.perPage);t?requestAnimationFrame((function(){requestAnimationFrame((function(){e.enableTransition(),e.sliderFrame.style[e.transformProperty]="translate3d("+r+"px, 0, 0)"}))})):this.sliderFrame.style[this.transformProperty]="translate3d("+r+"px, 0, 0)"}},{key:"updateAfterDrag",value:function(){var t=(this.config.rtl?-1:1)*(this.drag.endX-this.drag.startX),e=Math.abs(t),n=this.config.multipleDrag?Math.ceil(e/(this.selectorWidth/this.perPage)):1,r=t>0&&this.currentSlide-n<0,i=t<0&&this.currentSlide+n>this.innerElements.length-this.perPage;t>0&&e>this.config.threshold&&this.innerElements.length>this.perPage?this.prev(n):t<0&&e>this.config.threshold&&this.innerElements.length>this.perPage&&this.next(n),this.slideToCurrent(r||i)}},{key:"resizeHandler",value:function(){this.resolveSlidesNumber(),this.currentSlide+this.perPage>this.innerElements.length&&(this.currentSlide=this.innerElements.length<=this.perPage?0:this.innerElements.length-this.perPage),this.selectorWidth=this.selector.offsetWidth,this.buildSliderFrame()}},{key:"clearDrag",value:function(){this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:this.drag.preventClick}}},{key:"touchstartHandler",value:function(t){-1!==["TEXTAREA","OPTION","INPUT","SELECT"].indexOf(t.target.nodeName)||(t.stopPropagation(),this.pointerDown=!0,this.drag.startX=t.touches[0].pageX,this.drag.startY=t.touches[0].pageY)}},{key:"touchendHandler",value:function(t){t.stopPropagation(),this.pointerDown=!1,this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:"touchmoveHandler",value:function(t){if(t.stopPropagation(),null===this.drag.letItGo&&(this.drag.letItGo=Math.abs(this.drag.startY-t.touches[0].pageY)<Math.abs(this.drag.startX-t.touches[0].pageX)),this.pointerDown&&this.drag.letItGo){t.preventDefault(),this.drag.endX=t.touches[0].pageX,this.sliderFrame.style.webkitTransition="all 0ms "+this.config.easing,this.sliderFrame.style.transition="all 0ms "+this.config.easing;var e=(this.config.loop?this.currentSlide+this.perPage:this.currentSlide)*(this.selectorWidth/this.perPage),n=this.drag.endX-this.drag.startX,r=this.config.rtl?e+n:e-n;this.sliderFrame.style[this.transformProperty]="translate3d("+(this.config.rtl?1:-1)*r+"px, 0, 0)"}}},{key:"mousedownHandler",value:function(t){-1!==["TEXTAREA","OPTION","INPUT","SELECT"].indexOf(t.target.nodeName)||(t.preventDefault(),t.stopPropagation(),this.pointerDown=!0,this.drag.startX=t.pageX)}},{key:"mouseupHandler",value:function(t){t.stopPropagation(),this.pointerDown=!1,this.selector.style.cursor="-webkit-grab",this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:"mousemoveHandler",value:function(t){if(t.preventDefault(),this.pointerDown){"A"===t.target.nodeName&&(this.drag.preventClick=!0),this.drag.endX=t.pageX,this.selector.style.cursor="-webkit-grabbing",this.sliderFrame.style.webkitTransition="all 0ms "+this.config.easing,this.sliderFrame.style.transition="all 0ms "+this.config.easing;var e=(this.config.loop?this.currentSlide+this.perPage:this.currentSlide)*(this.selectorWidth/this.perPage),n=this.drag.endX-this.drag.startX,r=this.config.rtl?e+n:e-n;this.sliderFrame.style[this.transformProperty]="translate3d("+(this.config.rtl?1:-1)*r+"px, 0, 0)"}}},{key:"mouseleaveHandler",value:function(t){this.pointerDown&&(this.pointerDown=!1,this.selector.style.cursor="-webkit-grab",this.drag.endX=t.pageX,this.drag.preventClick=!1,this.enableTransition(),this.updateAfterDrag(),this.clearDrag())}},{key:"clickHandler",value:function(t){this.drag.preventClick&&t.preventDefault(),this.drag.preventClick=!1}},{key:"remove",value:function(t,e){if(t<0||t>=this.innerElements.length)throw Error("Item to remove doesn't exist 😭");var n=t<this.currentSlide,r=this.currentSlide+this.perPage-1===t;(n||r)&&this.currentSlide--,this.innerElements.splice(t,1),this.buildSliderFrame(),e&&e.call(this)}},{key:"insert",value:function(t,e,n){if(e<0||e>this.innerElements.length+1)throw Error("Unable to inset it at this index 😭");if(-1!==this.innerElements.indexOf(t))throw Error("The same item in a carousel? Really? Nope 😭");var r=e<=this.currentSlide>0&&this.innerElements.length;this.currentSlide=r?this.currentSlide+1:this.currentSlide,this.innerElements.splice(e,0,t),this.buildSliderFrame(),n&&n.call(this)}},{key:"prepend",value:function(t,e){this.insert(t,0),e&&e.call(this)}},{key:"append",value:function(t,e){this.insert(t,this.innerElements.length+1),e&&e.call(this)}},{key:"destroy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments[1];if(this.detachEvents(),this.selector.style.cursor="auto",t){for(var n=document.createDocumentFragment(),r=0;r<this.innerElements.length;r++)n.appendChild(this.innerElements[r]);this.selector.innerHTML="",this.selector.appendChild(n),this.selector.removeAttribute("style")}e&&e.call(this)}}],[{key:"mergeSettings",value:function(t){var e={selector:".siema",duration:200,easing:"ease-out",perPage:1,startIndex:0,draggable:!0,multipleDrag:!0,threshold:20,loop:!1,rtl:!1,onInit:function(){},onChange:function(){}},n=t;for(var r in n)e[r]=n[r];return e}},{key:"webkitOrNot",value:function(){return"string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform"}}]),t}();e.default=a,t.exports=e.default}]);var Bn=Fn(jn.exports);Bn.instances=[];var $n=0;function Yn(){B.clearInterval(this._[$n])}function Un(){Yn.call(this)}
/**!
* Sortable 1.15.3
* @author RubaXa <[email protected]>
* @author owenm <[email protected]>
* @license MIT
*/
function Wn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function zn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wn(Object(n),!0).forEach((function(e){Gn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function qn(t){return qn="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},qn(t)}function Gn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vn(){return Vn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vn.apply(this,arguments)}function Jn(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Zn(t){return function(t){if(Array.isArray(t))return Qn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Qn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qn(t,e)}(t)||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.")}()}function Qn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}B.Siema=Bn;function tr(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var er=tr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),nr=tr(/Edge/i),rr=tr(/firefox/i),ir=tr(/safari/i)&&!tr(/chrome/i)&&!tr(/android/i),or=tr(/iP(ad|od|hone)/i),ar=tr(/chrome/i)&&tr(/android/i),lr={capture:!1,passive:!1};function sr(t,e,n){t.addEventListener(e,n,!er&&lr)}function cr(t,e,n){t.removeEventListener(e,n,!er&&lr)}function ur(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 fr(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function hr(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&ur(t,e):ur(t,e))||r&&t===n)return t;if(t===n)break}while(t=fr(t))}return null}var dr,pr=/\s+/g;function vr(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(pr," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(pr," ")}}function gr(t,e,n){var r=t&&t.style;if(r){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 r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function mr(t,e){var n="";if("string"==typeof t)n=t;else do{var r=gr(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function br(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function yr(){var t=document.scrollingElement;return t||document.documentElement}function wr(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,a,l,s,c,u,f;if(t!==window&&t.parentNode&&t!==yr()?(a=(o=t.getBoundingClientRect()).top,l=o.left,s=o.bottom,c=o.right,u=o.height,f=o.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!er))do{if(i&&i.getBoundingClientRect&&("none"!==gr(i,"transform")||n&&"static"!==gr(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(gr(i,"border-top-width")),l-=h.left+parseInt(gr(i,"border-left-width")),s=a+o.height,c=l+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var d=mr(i||t),p=d&&d.a,v=d&&d.d;d&&(s=(a/=v)+(u/=v),c=(l/=p)+(f/=p))}return{top:a,left:l,bottom:s,right:c,width:f,height:u}}}function Er(t,e,n){for(var r=Dr(t,!0),i=wr(t)[e];r;){if(!(i>=wr(r)[n]))return r;if(r===yr())break;r=Dr(r,!1)}return!1}function kr(t,e,n,r){for(var i=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Ii.ghost&&(r||a[o]!==Ii.dragged)&&hr(a[o],n.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function Sr(t,e){for(var n=t.lastElementChild;n&&(n===Ii.ghost||"none"===gr(n,"display")||e&&!ur(n,e));)n=n.previousElementSibling;return n||null}function _r(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ii.clone||e&&!ur(t,e)||n++;return n}function xr(t){var e=0,n=0,r=yr();if(t)do{var i=mr(t),o=i.a,a=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function Dr(t,e){if(!t||!t.getBoundingClientRect)return yr();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=gr(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 yr();if(r||e)return n;r=!0}}}while(n=n.parentNode);return yr()}function Cr(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 Tr(t,e){return function(){if(!dr){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),dr=setTimeout((function(){dr=void 0}),e)}}}function Ar(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Pr(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)}function Or(t,e){gr(t,"position","absolute"),gr(t,"top",e.top),gr(t,"left",e.left),gr(t,"width",e.width),gr(t,"height",e.height)}function Mr(t){gr(t,"position",""),gr(t,"top",""),gr(t,"left",""),gr(t,"width",""),gr(t,"height","")}function Ir(t,e,n){var r={};return Array.from(t.children).forEach((function(i){var o,a,l,s;if(hr(i,e.draggable,t,!1)&&!i.animated&&i!==n){var c=wr(i);r.left=Math.min(null!==(o=r.left)&&void 0!==o?o:1/0,c.left),r.top=Math.min(null!==(a=r.top)&&void 0!==a?a:1/0,c.top),r.right=Math.max(null!==(l=r.right)&&void 0!==l?l:-1/0,c.right),r.bottom=Math.max(null!==(s=r.bottom)&&void 0!==s?s:-1/0,c.bottom)}})),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var Nr="Sortable"+(new Date).getTime();function Hr(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==gr(t,"display")&&t!==Ii.ghost){e.push({target:t,rect:wr(t)});var n=zn({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=mr(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,o=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,l=wr(n),s=n.prevFromRect,c=n.prevToRect,u=t.rect,f=mr(n,!0);f&&(l.top-=f.f,l.left-=f.e),n.toRect=l,n.thisAnimationDuration&&Cr(s,l)&&!Cr(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(e=function(t,e,n,r){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))*r.animation}(u,s,c,r.options)),Cr(l,a)||(n.prevFromRect=a,n.prevToRect=l,e||(e=r.options.animation),r.animate(n,u,l,e)),e&&(i=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),o):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){gr(t,"transition",""),gr(t,"transform","");var i=mr(this.el),o=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(o||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,gr(t,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),gr(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),gr(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){gr(t,"transition",""),gr(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}var Lr=[],Rr={initializeByDefault:!0},Kr={mount:function(t){for(var e in Rr)Rr.hasOwnProperty(e)&&!(e in t)&&(t[e]=Rr[e]);Lr.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Lr.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";Lr.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](zn({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](zn({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var i in Lr.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,Vn(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);void 0!==o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return Lr.forEach((function(r){"function"==typeof r.eventProperties&&Vn(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Lr.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))})),r}};function Xr(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,f=t.newDraggableIndex,h=t.originalEvent,d=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[Nr]){var v,g=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||er||nr?(v=document.createEvent("Event")).initEvent(r,!0,!0):v=new CustomEvent(r,{bubbles:!0,cancelable:!0}),v.to=a||n,v.from=l||n,v.item=i||n,v.clone=o,v.oldIndex=s,v.newIndex=c,v.oldDraggableIndex=u,v.newDraggableIndex=f,v.originalEvent=h,v.pullMode=d?d.lastPutMode:void 0;var b=zn(zn({},p),Kr.getEventProperties(r,e));for(var y in b)v[y]=b[y];n&&n.dispatchEvent(v),g[m]&&g[m].call(e,v)}}var Fr=["evt"],jr=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=Jn(n,Fr);Kr.pluginEvent.bind(Ii)(t,e,zn({dragEl:$r,parentEl:Yr,ghostEl:Ur,rootEl:Wr,nextEl:zr,lastDownEl:qr,cloneEl:Gr,cloneHidden:Vr,dragStarted:ci,putSortable:ni,activeSortable:Ii.active,originalEvent:r,oldIndex:Jr,oldDraggableIndex:Qr,newIndex:Zr,newDraggableIndex:ti,hideGhostForTarget:Ai,unhideGhostForTarget:Pi,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(t){Br({sortable:e,name:t,originalEvent:r})}},i))};function Br(t){Xr(zn({putSortable:ni,cloneEl:Gr,targetEl:$r,rootEl:Wr,oldIndex:Jr,oldDraggableIndex:Qr,newIndex:Zr,newDraggableIndex:ti},t))}var $r,Yr,Ur,Wr,zr,qr,Gr,Vr,Jr,Zr,Qr,ti,ei,ni,ri,ii,oi,ai,li,si,ci,ui,fi,hi,di,pi=!1,vi=!1,gi=[],mi=!1,bi=!1,yi=[],wi=!1,Ei=[],ki="undefined"!=typeof document,Si=or,_i=nr||er?"cssFloat":"float",xi=ki&&!ar&&!or&&"draggable"in document.createElement("div"),Di=function(){if(ki){if(er)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ci=function(t,e){var n=gr(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=kr(t,0,e),o=kr(t,1,e),a=i&&gr(i),l=o&&gr(o),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+wr(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+wr(o).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(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!o||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=r&&"none"===n[_i]||o&&"none"===n[_i]&&s+c>r)?"vertical":"horizontal"},Ti=function(t){function e(t,n){return function(r,i,o,a){var l=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var s=(n?r:i).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},r=t.group;r&&"object"==qn(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Ai=function(){!Di&&Ur&&gr(Ur,"display","none")},Pi=function(){!Di&&Ur&&gr(Ur,"display","")};ki&&!ar&&document.addEventListener("click",(function(t){if(vi)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),vi=!1,!1}),!0);var Oi=function(t){if($r){var e=function(t,e){var n;return gi.some((function(r){var i=r[Nr].options.emptyInsertThreshold;if(i&&!Sr(r)){var o=wr(r),a=t>=o.left-i&&t<=o.right+i,l=e>=o.top-i&&e<=o.bottom+i;return a&&l?n=r:void 0}})),n}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Nr]._onDragOver(n)}}},Mi=function(t){$r&&$r.parentNode[Nr]._isOutsideThisEl(t.target)};function Ii(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Vn({},e),t[Nr]=this;var n={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 Ci(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!==Ii.supportPointer&&"PointerEvent"in window&&!ir,emptyInsertThreshold:5};for(var r in Kr.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Ti(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&xi,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?sr(t,"pointerdown",this._onTapStart):(sr(t,"mousedown",this._onTapStart),sr(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(sr(t,"dragover",this),sr(t,"dragenter",this)),gi.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Vn(this,Hr())}function Ni(t,e,n,r,i,o,a,l){var s,c,u=t[Nr],f=u.options.onMove;return!window.CustomEvent||er||nr?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=r,s.related=i||e,s.relatedRect=o||wr(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),f&&(c=f.call(u,s,a)),c}function Hi(t){t.draggable=!1}function Li(){wi=!1}function Ri(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Ki(t){return setTimeout(t,0)}function Xi(t){return clearTimeout(t)}Ii.prototype={constructor:Ii,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ui=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,$r):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=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,c=r.filter;if(function(t){Ei.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&Ei.push(r)}}(n),!$r&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!ir||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=hr(l,r.draggable,n,!1))&&l.animated||qr===l)){if(Jr=_r(l),Qr=_r(l,r.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Br({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),jr("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=hr(s,r.trim(),n,!1))return Br({sortable:e,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),jr("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());r.handle&&!hr(s,r.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,l=o.ownerDocument;if(n&&!$r&&n.parentNode===o){var s=wr(n);if(Wr=o,Yr=($r=n).parentNode,zr=$r.nextSibling,qr=n,ei=a.group,Ii.dragged=$r,ri={target:$r,clientX:(e||t).clientX,clientY:(e||t).clientY},li=ri.clientX-s.left,si=ri.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,$r.style["will-change"]="all",r=function(){jr("delayEnded",i,{evt:t}),Ii.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!rr&&i.nativeDraggable&&($r.draggable=!0),i._triggerDragStart(t,e),Br({sortable:i,name:"choose",originalEvent:t}),vr($r,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){br($r,t.trim(),Hi)})),sr(l,"dragover",Oi),sr(l,"mousemove",Oi),sr(l,"touchmove",Oi),sr(l,"mouseup",i._onDrop),sr(l,"touchend",i._onDrop),sr(l,"touchcancel",i._onDrop),rr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$r.draggable=!0),jr("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(nr||er))r();else{if(Ii.eventCanceled)return void this._onDrop();sr(l,"mouseup",i._disableDelayedDrag),sr(l,"touchend",i._disableDelayedDrag),sr(l,"touchcancel",i._disableDelayedDrag),sr(l,"mousemove",i._delayedDragTouchMoveHandler),sr(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&sr(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.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(){$r&&Hi($r),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;cr(t,"mouseup",this._disableDelayedDrag),cr(t,"touchend",this._disableDelayedDrag),cr(t,"touchcancel",this._disableDelayedDrag),cr(t,"mousemove",this._delayedDragTouchMoveHandler),cr(t,"touchmove",this._delayedDragTouchMoveHandler),cr(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?sr(document,"pointermove",this._onTouchMove):sr(document,e?"touchmove":"mousemove",this._onTouchMove):(sr($r,"dragend",this),sr(Wr,"dragstart",this._onDragStart));try{document.selection?Ki((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(pi=!1,Wr&&$r){jr("dragStarted",this,{evt:e}),this.nativeDraggable&&sr(document,"dragover",Mi);var n=this.options;!t&&vr($r,n.dragClass,!1),vr($r,n.ghostClass,!0),Ii.active=this,t&&this._appendGhost(),Br({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ii){this._lastX=ii.clientX,this._lastY=ii.clientY,Ai();for(var t=document.elementFromPoint(ii.clientX,ii.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ii.clientX,ii.clientY))!==e;)e=t;if($r.parentNode[Nr]._isOutsideThisEl(t),e)do{if(e[Nr]){if(e[Nr]._onDragOver({clientX:ii.clientX,clientY:ii.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=fr(e));Pi()}},_onTouchMove:function(t){if(ri){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=Ur&&mr(Ur,!0),a=Ur&&o&&o.a,l=Ur&&o&&o.d,s=Si&&di&&xr(di),c=(i.clientX-ri.clientX+r.x)/(a||1)+(s?s[0]-yi[0]:0)/(a||1),u=(i.clientY-ri.clientY+r.y)/(l||1)+(s?s[1]-yi[1]:0)/(l||1);if(!Ii.active&&!pi){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Ur){o?(o.e+=c-(oi||0),o.f+=u-(ai||0)):o={a:1,b:0,c:0,d:1,e:c,f:u};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");gr(Ur,"webkitTransform",f),gr(Ur,"mozTransform",f),gr(Ur,"msTransform",f),gr(Ur,"transform",f),oi=c,ai=u,ii=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Ur){var t=this.options.fallbackOnBody?document.body:Wr,e=wr($r,!0,Si,!0,t),n=this.options;if(Si){for(di=t;"static"===gr(di,"position")&&"none"===gr(di,"transform")&&di!==document;)di=di.parentNode;di!==document.body&&di!==document.documentElement?(di===document&&(di=yr()),e.top+=di.scrollTop,e.left+=di.scrollLeft):di=yr(),yi=xr(di)}vr(Ur=$r.cloneNode(!0),n.ghostClass,!1),vr(Ur,n.fallbackClass,!0),vr(Ur,n.dragClass,!0),gr(Ur,"transition",""),gr(Ur,"transform",""),gr(Ur,"box-sizing","border-box"),gr(Ur,"margin",0),gr(Ur,"top",e.top),gr(Ur,"left",e.left),gr(Ur,"width",e.width),gr(Ur,"height",e.height),gr(Ur,"opacity","0.8"),gr(Ur,"position",Si?"absolute":"fixed"),gr(Ur,"zIndex","100000"),gr(Ur,"pointerEvents","none"),Ii.ghost=Ur,t.appendChild(Ur),gr(Ur,"transform-origin",li/parseInt(Ur.style.width)*100+"% "+si/parseInt(Ur.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;jr("dragStart",this,{evt:t}),Ii.eventCanceled?this._onDrop():(jr("setupClone",this),Ii.eventCanceled||((Gr=Pr($r)).removeAttribute("id"),Gr.draggable=!1,Gr.style["will-change"]="",this._hideClone(),vr(Gr,this.options.chosenClass,!1),Ii.clone=Gr),n.cloneId=Ki((function(){jr("clone",n),Ii.eventCanceled||(n.options.removeCloneOnHide||Wr.insertBefore(Gr,$r),n._hideClone(),Br({sortable:n,name:"clone"}))})),!e&&vr($r,i.dragClass,!0),e?(vi=!0,n._loopId=setInterval(n._emulateDragOver,50)):(cr(document,"mouseup",n._onDrop),cr(document,"touchend",n._onDrop),cr(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,$r)),sr(document,"drop",n),gr($r,"transform","translateZ(0)")),pi=!0,n._dragStartId=Ki(n._dragStarted.bind(n,e,t)),sr(document,"selectstart",n),ci=!0,ir&&gr(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,o=this.el,a=t.target,l=this.options,s=l.group,c=Ii.active,u=ei===s,f=l.sort,h=ni||c,d=this,p=!1;if(!wi){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=hr(a,l.draggable,o,!0),A("dragOver"),Ii.eventCanceled)return p;if($r.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||d._ignoreWhileAnimating===a)return O(!1);if(vi=!1,c&&!l.disabled&&(u?f||(r=Yr!==Wr):ni===this||(this.lastPutMode=ei.checkPull(this,c,$r,t))&&s.checkPut(this,c,$r,t))){if(i="vertical"===this._getDirection(t,a),e=wr($r),A("dragOverValid"),Ii.eventCanceled)return p;if(r)return Yr=Wr,P(),this._hideClone(),A("revert"),Ii.eventCanceled||(zr?Wr.insertBefore($r,zr):Wr.appendChild($r)),O(!0);var v=Sr(o,l.draggable);if(!v||function(t,e,n){var r=wr(Sr(n.el,n.options.draggable)),i=Ir(n.el,n.options,Ur),o=10;return e?t.clientX>i.right+o||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+o||t.clientX>r.right&&t.clientY>r.top}(t,i,this)&&!v.animated){if(v===$r)return O(!1);if(v&&o===t.target&&(a=v),a&&(n=wr(a)),!1!==Ni(Wr,o,$r,e,a,n,t,!!a))return P(),v&&v.nextSibling?o.insertBefore($r,v.nextSibling):o.appendChild($r),Yr=o,M(),O(!0)}else if(v&&function(t,e,n){var r=wr(kr(n.el,0,n.options,!0)),i=Ir(n.el,n.options,Ur),o=10;return e?t.clientX<i.left-o||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-o||t.clientY<r.bottom&&t.clientX<r.left}(t,i,this)){var g=kr(o,0,l,!0);if(g===$r)return O(!1);if(n=wr(a=g),!1!==Ni(Wr,o,$r,e,a,n,t,!1))return P(),o.insertBefore($r,g),Yr=o,M(),O(!0)}else if(a.parentNode===o){n=wr(a);var m,b,y,w=$r.parentNode!==o,E=!function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return r===a||i===l||r+o/2===a+s/2}($r.animated&&$r.toRect||e,a.animated&&a.toRect||n,i),k=i?"top":"left",S=Er(a,"top","top")||Er($r,"top","top"),_=S?S.scrollTop:void 0;if(ui!==a&&(b=n[k],mi=!1,bi=!E&&l.invertSwap||w),m=function(t,e,n,r,i,o,a,l){var s=r?t.clientY:t.clientX,c=r?n.height:n.width,u=r?n.top:n.left,f=r?n.bottom:n.right,h=!1;if(!a)if(l&&hi<c*i){if(!mi&&(1===fi?s>u+c*o/2:s<f-c*o/2)&&(mi=!0),mi)h=!0;else if(1===fi?s<u+hi:s>f-hi)return-fi}else if(s>u+c*(1-i)/2&&s<f-c*(1-i)/2)return function(t){return _r($r)<_r(t)?1:-1}(e);if((h=h||a)&&(s<u+c*o/2||s>f-c*o/2))return s>u+c/2?1:-1;return 0}(t,a,n,i,E?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,bi,ui===a),0!==m){var x=_r($r);do{x-=m,y=Yr.children[x]}while(y&&("none"===gr(y,"display")||y===Ur))}if(0===m||y===a)return O(!1);ui=a,fi=m;var D=a.nextElementSibling,C=!1,T=Ni(Wr,o,$r,e,a,n,t,C=1===m);if(!1!==T)return 1!==T&&-1!==T||(C=1===T),wi=!0,setTimeout(Li,30),P(),C&&!D?o.appendChild($r):a.parentNode.insertBefore($r,C?D:a),S&&Ar(S,0,_-S.scrollTop),Yr=$r.parentNode,void 0===b||bi||(hi=Math.abs(b-wr(a)[k])),M(),O(!0)}if(o.contains($r))return O(!1)}return!1}function A(l,s){jr(l,d,zn({evt:t,isOwner:u,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:h,target:a,completed:O,onMove:function(n,r){return Ni(Wr,o,$r,e,n,wr(n),t,r)},changed:M},s))}function P(){A("dragOverAnimationCapture"),d.captureAnimationState(),d!==h&&h.captureAnimationState()}function O(e){return A("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(d),d!==h&&(vr($r,ni?ni.options.ghostClass:c.options.ghostClass,!1),vr($r,l.ghostClass,!0)),ni!==d&&d!==Ii.active?ni=d:d===Ii.active&&ni&&(ni=null),h===d&&(d._ignoreWhileAnimating=a),d.animateAll((function(){A("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===$r&&!$r.animated||a===o&&!a.animated)&&(ui=null),l.dragoverBubble||t.rootEl||a===document||($r.parentNode[Nr]._isOutsideThisEl(t.target),!e&&Oi(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function M(){Zr=_r($r),ti=_r($r,l.draggable),Br({sortable:d,name:"change",toEl:o,newIndex:Zr,newDraggableIndex:ti,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){cr(document,"mousemove",this._onTouchMove),cr(document,"touchmove",this._onTouchMove),cr(document,"pointermove",this._onTouchMove),cr(document,"dragover",Oi),cr(document,"mousemove",Oi),cr(document,"touchmove",Oi)},_offUpEvents:function(){var t=this.el.ownerDocument;cr(t,"mouseup",this._onDrop),cr(t,"touchend",this._onDrop),cr(t,"pointerup",this._onDrop),cr(t,"touchcancel",this._onDrop),cr(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Zr=_r($r),ti=_r($r,n.draggable),jr("drop",this,{evt:t}),Yr=$r&&$r.parentNode,Zr=_r($r),ti=_r($r,n.draggable),Ii.eventCanceled||(pi=!1,bi=!1,mi=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Xi(this.cloneId),Xi(this._dragStartId),this.nativeDraggable&&(cr(document,"drop",this),cr(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ir&&gr(document.body,"user-select",""),gr($r,"transform",""),t&&(ci&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Ur&&Ur.parentNode&&Ur.parentNode.removeChild(Ur),(Wr===Yr||ni&&"clone"!==ni.lastPutMode)&&Gr&&Gr.parentNode&&Gr.parentNode.removeChild(Gr),$r&&(this.nativeDraggable&&cr($r,"dragend",this),Hi($r),$r.style["will-change"]="",ci&&!pi&&vr($r,ni?ni.options.ghostClass:this.options.ghostClass,!1),vr($r,this.options.chosenClass,!1),Br({sortable:this,name:"unchoose",toEl:Yr,newIndex:null,newDraggableIndex:null,originalEvent:t}),Wr!==Yr?(Zr>=0&&(Br({rootEl:Yr,name:"add",toEl:Yr,fromEl:Wr,originalEvent:t}),Br({sortable:this,name:"remove",toEl:Yr,originalEvent:t}),Br({rootEl:Yr,name:"sort",toEl:Yr,fromEl:Wr,originalEvent:t}),Br({sortable:this,name:"sort",toEl:Yr,originalEvent:t})),ni&&ni.save()):Zr!==Jr&&Zr>=0&&(Br({sortable:this,name:"update",toEl:Yr,originalEvent:t}),Br({sortable:this,name:"sort",toEl:Yr,originalEvent:t})),Ii.active&&(null!=Zr&&-1!==Zr||(Zr=Jr,ti=Qr),Br({sortable:this,name:"end",toEl:Yr,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){jr("nulling",this),Wr=$r=Yr=Ur=zr=Gr=qr=Vr=ri=ii=ci=Zr=ti=Jr=Qr=ui=fi=ni=ei=Ii.dragged=Ii.ghost=Ii.clone=Ii.active=null,Ei.forEach((function(t){t.checked=!0})),Ei.length=oi=ai=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":$r&&(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,r=0,i=n.length,o=this.options;r<i;r++)hr(t=n[r],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Ri(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach((function(t,e){var i=r.children[e];hr(i,this.options.draggable,r,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return hr(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=Kr.modifyOption(this,t,e);n[t]=void 0!==r?r:e,"group"===t&&Ti(n)},destroy:function(){jr("destroy",this);var t=this.el;t[Nr]=null,cr(t,"mousedown",this._onTapStart),cr(t,"touchstart",this._onTapStart),cr(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(cr(t,"dragover",this),cr(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),gi.splice(gi.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Vr){if(jr("hideClone",this),Ii.eventCanceled)return;gr(Gr,"display","none"),this.options.removeCloneOnHide&&Gr.parentNode&&Gr.parentNode.removeChild(Gr),Vr=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Vr){if(jr("showClone",this),Ii.eventCanceled)return;$r.parentNode!=Wr||this.options.group.revertClone?zr?Wr.insertBefore(Gr,zr):Wr.appendChild(Gr):Wr.insertBefore(Gr,$r),this.options.group.revertClone&&this.animate($r,Gr),gr(Gr,"display",""),Vr=!1}}else this._hideClone()}},ki&&sr(document,"touchmove",(function(t){(Ii.active||pi)&&t.cancelable&&t.preventDefault()})),Ii.utils={on:sr,off:cr,css:gr,find:br,is:function(t,e){return!!hr(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:Tr,closest:hr,toggleClass:vr,clone:Pr,index:_r,nextTick:Ki,cancelNextTick:Xi,detectDirection:Ci,getChild:kr,expando:Nr},Ii.get=function(t){return t[Nr]},Ii.mount=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ii.utils=zn(zn({},Ii.utils),t.utils)),Kr.mount(t)}))},Ii.create=function(t,e){return new Ii(t,e)},Ii.version="1.15.3";var Fi,ji,Bi,$i,Yi,Ui,Wi=[],zi=!1;function qi(){Wi.forEach((function(t){clearInterval(t.pid)})),Wi=[]}function Gi(){clearInterval(Ui)}var Vi=Tr((function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=yr(),u=!1;ji!==n&&(ji=n,qi(),Fi=e.scroll,i=e.scrollFn,!0===Fi&&(Fi=Dr(n,!0)));var f=0,h=Fi;do{var d=h,p=wr(d),v=p.top,g=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,k=void 0,S=d.scrollWidth,_=d.scrollHeight,x=gr(d),D=d.scrollLeft,C=d.scrollTop;d===c?(E=y<S&&("auto"===x.overflowX||"scroll"===x.overflowX||"visible"===x.overflowX),k=w<_&&("auto"===x.overflowY||"scroll"===x.overflowY||"visible"===x.overflowY)):(E=y<S&&("auto"===x.overflowX||"scroll"===x.overflowX),k=w<_&&("auto"===x.overflowY||"scroll"===x.overflowY));var T=E&&(Math.abs(b-o)<=l&&D+y<S)-(Math.abs(m-o)<=l&&!!D),A=k&&(Math.abs(g-a)<=l&&C+w<_)-(Math.abs(v-a)<=l&&!!C);if(!Wi[f])for(var P=0;P<=f;P++)Wi[P]||(Wi[P]={});Wi[f].vx==T&&Wi[f].vy==A&&Wi[f].el===d||(Wi[f].el=d,Wi[f].vx=T,Wi[f].vy=A,clearInterval(Wi[f].pid),0==T&&0==A||(u=!0,Wi[f].pid=setInterval(function(){r&&0===this.layer&&Ii.active._onTouchMove(Yi);var e=Wi[this.layer].vy?Wi[this.layer].vy*s:0,n=Wi[this.layer].vx?Wi[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Ii.dragged.parentNode[Nr],n,e,t,Yi,Wi[this.layer].el)||Ar(Wi[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==c&&(h=Dr(h,!1)));zi=u}}),30),Ji=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Zi(){}function Qi(){}Zi.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=kr(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Ji},Vn(Zi,{pluginName:"revertOnSpill"}),Qi.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Ji},Vn(Qi,{pluginName:"removeOnSpill"});var to,eo,no,ro,io,oo=[],ao=[],lo=!1,so=!1,co=!1;function uo(t,e){ao.forEach((function(n,r){var i=e.children[n.sortableIndex+(t?Number(r):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}function fo(){oo.forEach((function(t){t!==no&&t.parentNode&&t.parentNode.removeChild(t)}))}function ho(t){var e=t.item;B._.fire.call(e,"sort",[G(e,"value"),G(e,"name")])}Ii.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,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?sr(document,"dragover",this._handleAutoScroll):this.options.supportPointer?sr(document,"pointermove",this._handleFallbackAutoScroll):e.touches?sr(document,"touchmove",this._handleFallbackAutoScroll):sr(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?cr(document,"dragover",this._handleAutoScroll):(cr(document,"pointermove",this._handleFallbackAutoScroll),cr(document,"touchmove",this._handleFallbackAutoScroll),cr(document,"mousemove",this._handleFallbackAutoScroll)),Gi(),qi(),clearTimeout(dr),dr=void 0},nulling:function(){Yi=ji=Fi=zi=Ui=Bi=$i=null,Wi.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(Yi=t,e||this.options.forceAutoScrollFallback||nr||er||ir){Vi(t,this.options,o,e);var a=Dr(o,!0);!zi||Ui&&r===Bi&&i===$i||(Ui&&Gi(),Ui=setInterval((function(){var o=Dr(document.elementFromPoint(r,i),!0);o!==a&&(a=o,qi()),Vi(t,n.options,o,e)}),10),Bi=r,$i=i)}else{if(!this.options.bubbleScroll||Dr(o,!0)===yr())return void qi();Vi(t,this.options,Dr(o,!1),!1)}}},Vn(t,{pluginName:"scroll",initializeByDefault:!0})}),Ii.mount(Qi,Zi),Ii.instances=[],Ii.mount(new function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.avoidImplicitDeselect||(t.options.supportPointer?sr(document,"pointerup",this._deselectMultiDrag):(sr(document,"mouseup",this._deselectMultiDrag),sr(document,"touchend",this._deselectMultiDrag))),sr(document,"keydown",this._checkKeyDown),sr(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(e,n){var r="";oo.length&&eo===t?oo.forEach((function(t,e){r+=(e?", ":"")+t.textContent})):r=n.textContent,e.setData("Text",r)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;no=e},delayEnded:function(){this.isMultiDrag=~oo.indexOf(no)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var r=0;r<oo.length;r++)ao.push(Pr(oo[r])),ao[r].sortableIndex=oo[r].sortableIndex,ao[r].draggable=!1,ao[r].style["will-change"]="",vr(ao[r],this.options.selectedClass,!1),oo[r]===no&&vr(ao[r],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,r=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||oo.length&&eo===e&&(uo(!0,n),r("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,r=t.cancel;this.isMultiDrag&&(uo(!1,n),ao.forEach((function(t){gr(t,"display","")})),e(),io=!1,r())},hideClone:function(t){var e=this;t.sortable;var n=t.cloneNowHidden,r=t.cancel;this.isMultiDrag&&(ao.forEach((function(t){gr(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),n(),io=!0,r())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&eo&&eo.multiDrag._deselectMultiDrag(),oo.forEach((function(t){t.sortableIndex=_r(t)})),oo=oo.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),co=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){oo.forEach((function(t){t!==no&&gr(t,"position","absolute")}));var r=wr(no,!1,!0,!0);oo.forEach((function(t){t!==no&&Or(t,r)})),so=!0,lo=!0}n.animateAll((function(){so=!1,lo=!1,e.options.animation&&oo.forEach((function(t){Mr(t)})),e.options.sort&&fo()}))}},dragOver:function(t){var e=t.target,n=t.completed,r=t.cancel;so&&~oo.indexOf(e)&&(n(!1),r())},revert:function(t){var e=t.fromSortable,n=t.rootEl,r=t.sortable,i=t.dragRect;oo.length>1&&(oo.forEach((function(t){r.addAnimationState({target:t,rect:so?wr(t):i}),Mr(t),t.fromRect=i,e.removeAnimationState(t)})),so=!1,function(t,e){oo.forEach((function(n,r){var i=e.children[n.sortableIndex+(t?Number(r):0)];i?e.insertBefore(n,i):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,r=t.insertion,i=t.activeSortable,o=t.parentEl,a=t.putSortable,l=this.options;if(r){if(n&&i._hideClone(),lo=!1,l.animation&&oo.length>1&&(so||!n&&!i.options.sort&&!a)){var s=wr(no,!1,!0,!0);oo.forEach((function(t){t!==no&&(Or(t,s),o.appendChild(t))})),so=!0}if(!n)if(so||fo(),oo.length>1){var c=io;i._showClone(e),i.options.animation&&!io&&c&&ao.forEach((function(t){i.addAnimationState({target:t,rect:ro}),t.fromRect=ro,t.thisAnimationDuration=null}))}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,r=t.activeSortable;if(oo.forEach((function(t){t.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){ro=Vn({},e);var i=mr(no,!0);ro.top-=i.f,ro.left-=i.e}},dragOverAnimationComplete:function(){so&&(so=!1,fo())},drop:function(t){var e=t.originalEvent,n=t.rootEl,r=t.parentEl,i=t.sortable,o=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=r.children;if(!co)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),vr(no,c.selectedClass,!~oo.indexOf(no)),~oo.indexOf(no))oo.splice(oo.indexOf(no),1),to=null,Xr({sortable:i,rootEl:n,name:"deselect",targetEl:no,originalEvent:e});else{if(oo.push(no),Xr({sortable:i,rootEl:n,name:"select",targetEl:no,originalEvent:e}),e.shiftKey&&to&&i.el.contains(to)){var f,h,d=_r(to),p=_r(no);if(~d&&~p&&d!==p)for(p>d?(h=d,f=p):(h=p,f=d+1);h<f;h++)~oo.indexOf(u[h])||(vr(u[h],c.selectedClass,!0),oo.push(u[h]),Xr({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvent:e}))}else to=no;eo=s}if(co&&this.isMultiDrag){if(so=!1,(r[Nr].options.sort||r!==n)&&oo.length>1){var v=wr(no),g=_r(no,":not(."+this.options.selectedClass+")");if(!lo&&c.animation&&(no.thisAnimationDuration=null),s.captureAnimationState(),!lo&&(c.animation&&(no.fromRect=v,oo.forEach((function(t){if(t.thisAnimationDuration=null,t!==no){var e=so?wr(t):v;t.fromRect=e,s.addAnimationState({target:t,rect:e})}}))),fo(),oo.forEach((function(t){u[g]?r.insertBefore(t,u[g]):r.appendChild(t),g++})),a===_r(no))){var m=!1;oo.forEach((function(t){t.sortableIndex===_r(t)||(m=!0)})),m&&(o("update"),o("sort"))}oo.forEach((function(t){Mr(t)})),s.animateAll()}eo=s}(n===r||l&&"clone"!==l.lastPutMode)&&ao.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=co=!1,ao.length=0},destroyGlobal:function(){this._deselectMultiDrag(),cr(document,"pointerup",this._deselectMultiDrag),cr(document,"mouseup",this._deselectMultiDrag),cr(document,"touchend",this._deselectMultiDrag),cr(document,"keydown",this._checkKeyDown),cr(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==co&&co||eo!==this.sortable||t&&hr(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;oo.length;){var e=oo[0];vr(e,this.options.selectedClass,!1),oo.shift(),Xr({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Vn(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Nr];e&&e.options.multiDrag&&!~oo.indexOf(t)&&(eo&&eo!==e&&(eo.multiDrag._deselectMultiDrag(),eo=e),vr(t,e.options.selectedClass,!0),oo.push(t))},deselect:function(t){var e=t.parentNode[Nr],n=oo.indexOf(t);e&&e.options.multiDrag&&~n&&(vr(t,e.options.selectedClass,!1),oo.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return oo.forEach((function(r){var i;e.push({multiDragElement:r,index:r.sortableIndex}),i=so&&r!==no?-1:so?_r(r,":not(."+t.options.selectedClass+")"):_r(r),n.push({multiDragElement:r,index:i})})),{items:Zn(oo),clones:[].concat(ao),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}),B.Sortable=Ii;var po='a[target^="stack:"]:not(.not\\:active)',vo=0,go=2;function mo(t){var e,n,r=this,i=et(et(r)),o=et(i,".lot\\:stacks"),a=r._[vo].name;if(!st(i,"has:link")){r._[go].forEach((function(t){t!==i&&(pt(e=V('a[target^="stack:"]',t),"is:current"),pt(t,"is:current"),wt(e,"aria-expanded","false"))})),st(i,"can:toggle")?(wt(r,"aria-expanded",U(r,"aria-expanded")?"false":"true"),It(i,"is:current"),It(r,"is:current")):(wt(r,"aria-expanded","true"),kt(i,"is:current"),kt(r,"is:current")),e=st(r,"is:current"),r._[vo].value=n=e?G(i,"value"):null,It(o,"has:current",e);var l=Ht.pathname,s=Ht.search,c=m(s),u=m(a+"="+n);c=b(c,u.query||{}),null===n&&(c=F(c)),Nt.replaceState({},"",l+(!1!==c?N(c):"")),B._.fire("change.stack",[n,a],i),f(t)}}function bo(t){var e,n,r,i,o,a=this,l=t.key,s=t.altKey,u=t.ctrlKey;if(!s&&!u)if("ArrowDown"===l||"ArrowRight"===l||"PageDown"===l){if(r=et(et(a)))for(n=tt(r);n&&st(n,"not:active");)n=tt(n);(e=n&&W(n))&&("ArrowRight"===l&&st(et(e),"can:toggle")||c("click",W(e)),R(W(e))),o=!0}else if("ArrowUp"===l||"ArrowLeft"===l||"PageUp"===l){if(r=et(et(a)))for(i=rt(r);i&&st(i,"not:active");)i=rt(i);(e=i&&W(i))&&("ArrowLeft"===l&&st(et(e),"can:toggle")||c("click",W(e)),R(W(e))),o=!0}else" "===l||"Enter"===l?(st(et(et(a)),"can:toggle")&&(c("click",a),R(a)),o=!0):"End"===l?((r=et(a,".lot\\:stacks[tabindex]"))&&(e=[].slice.call(J(po,r)).pop())&&(c("click",e),R(e)),o=!0):"Home"===l&&((r=et(a,".lot\\:stacks[tabindex]"))&&(e=V(po,r))&&(c("click",e),R(e)),o=!0);o&&(f(t),h(t))}function yo(t){var e,n,r,i,o=this,a=t.key,l=t.altKey,s=t.ctrlKey,u=t.shiftKey;if(l&&s&&!u)e=(e=V(po+".is\\:current",o))&&et(et(e)),"PageDown"===a?((e=(n=e&&tt(e))&&V(po,n))&&(c("click",e),R(e)),i=!0):"PageUp"===a&&((e=(r=e&&rt(e))&&V(po,r))&&(c("click",e),R(e)),i=!0);else if(!l&&!s&&!u){if(o!==t.target)return;"ArrowDown"===a||"ArrowRight"===a||"Home"===a||"PageDown"===a?((e=V(po,o))&&(c("click",e),R(e)),i=!0):"ArrowUp"!==a&&"ArrowLeft"!==a&&"End"!==a&&"PageUp"!==a||((e=[].slice.call(J(po,o)).pop())&&(c("click",e),R(e)),i=!0)}i&&(f(t),h(t))}var wo='a[target^="tab:"]:not(.not\\:active)',Eo=0,ko=1,So=2,_o=3;function xo(t){var e,n,r=this,i=r._[So][r._[ko]],o=et(r),a=et(o,".lot\\:tabs"),l=r._[Eo].name;if(!st(o,"has:link")){if(r._[_o].forEach((function(t){if(t!==r){pt(et(t),"is:current"),pt(t,"is:current"),wt(t,"aria-selected","false"),wt(t,"tabindex","-1");var e=r._[So][t._[ko]];e&&pt(e,"is:current")}})),st(o,"can:toggle")?(It(o,"is:current"),It(r,"is:current"),wt(r,"aria-selected",st(r,"is:current")?"true":"false"),wt(r,"tabindex",st(r,"is:current")?"0":"-1")):(kt(o,"is:current"),kt(r,"is:current"),wt(r,"aria-selected","true"),wt(r,"tabindex","0")),e=st(r,"is:current"),i){r._[Eo].value=n=e?G(r,"value"):null,It(i,"is:current",e),It(a,"has:current",e);var s=Ht.pathname,c=Ht.search,u=m(c),h=m(l+"="+n);u=b(u,h.query||{}),null===n&&(u=F(u)),Nt.replaceState({},"",s+(!1!==u?N(u):"")),B._.fire("change.tab",[n,l],i)}f(t)}}function Do(t){var e,n,r,i,o,a=this,l=t.key,s=t.altKey,u=t.ctrlKey;if(!s&&!u)if("ArrowDown"===l){if(st(a,"can:toggle")&&!st(a,"is:current"))e=a;else{if(r=et(a))for(n=tt(r);n&&st(n,"not:active");)n=tt(n);e=n&&W(n)}e&&(c("click",e),R(e)),o=!0}else if("ArrowLeft"===l||"PageUp"===l){if(r=et(a))for(i=rt(r);i&&st(i,"not:active");)i=rt(i);(e=i&&W(i))&&(c("click",e),R(e)),o=!0}else if("ArrowRight"===l||"PageDown"===l){if(r=et(a))for(n=tt(r);n&&st(n,"not:active");)n=tt(n);(e=n&&W(n))&&(c("click",e),R(e)),o=!0}else if("ArrowUp"===l){if(st(a,"can:toggle")&&st(a,"is:current"))e=a;else{if(r=et(a))for(i=rt(r);i&&st(i,"not:active");)i=rt(i);e=i&&W(i)}e&&(c("click",e),R(e)),o=!0}else" "===l||"Enter"===l?(st(a,"can:toggle")&&(c("click",a),R(a)),o=!0):"End"===l?((r=et(a,".lot\\:tabs[tabindex]"))&&(e=[].slice.call(J(wo,r)).pop())&&(c("click",e),R(e)),o=!0):"Home"===l&&((r=et(a,".lot\\:tabs[tabindex]"))&&(e=V(wo,r))&&(c("click",e),R(e)),o=!0);o&&(f(t),h(t))}function Co(t){var e,n,r,i,o=this,a=t.key,l=t.altKey,s=t.ctrlKey,u=t.shiftKey;if(l&&s&&!u)e=(e=V(wo+".is\\:current",o))&&et(e),"PageDown"===a?((e=(n=e&&tt(e))&&W(n))&&(c("click",e),R(e)),i=!0):"PageUp"===a&&((e=(r=e&&rt(e))&&W(r))&&(c("click",e),R(e)),i=!0);else if(!l&&!s&&!u){if(o!==t.target)return;"ArrowDown"===a||"ArrowRight"===a||"PageDown"===a||"ArrowUp"===a||"ArrowLeft"===a||"PageUp"===a?((e=V(wo+".is\\:current",o))&&(c("click",e),R(e)),i=!0):"Home"===a?((e=V(wo,o))&&(c("click",e),R(e)),i=!0):"End"===a&&((e=[].slice.call(J(wo,o)).pop())&&(c("click",e),R(e)),i=!0)}i&&(f(t),h(t))}var To=':scope>:where(a,button,input,select,textarea,[tabindex]):not(:disabled):not([tabindex="-1"]):not(.not\\:active)';function Ao(t){var e,n,r,i,o,a=this,l=t.key,s=t.altKey,c=t.ctrlKey,u=t.shiftKey;if(!s&&!c&&!u){for(r=tt(a);r&&st(r,"not:active");)r=tt(r);for(i=rt(a);i&&st(i,"not:active");)i=rt(i);"ArrowLeft"===l?(o=!(ut(a,"selectionStart")&&0!==a.selectionStart))&&(R(i),K(i)):"ArrowRight"===l?(o=!(ut(a,"selectionEnd")&&a.selectionEnd<C(a.value||"")))&&(R(r),K(r)):"End"===l?(o=!(ut(a,"selectionEnd")&&C(a.value||"")))&&(n=et(a,".lot\\:tasks[tabindex]"))&&(e=[].slice.call(J(To,n)).pop())&&(R(e),K(e)):"Home"===l&&(o=!(ut(a,"selectionStart")&&C(a.value||"")))&&(n=et(a,".lot\\:tasks[tabindex]"))&&(e=V(To,n))&&(R(e),K(e))}o&&(f(t),h(t))}function Po(t){var e,n,r=this,i=t.key,o=t.altKey,a=t.ctrlKey,l=t.shiftKey;r===t.target&&(o||a||l||("ArrowLeft"===i||"End"===i?((e=[].slice.call(J(To,r)).pop())&&(R(e),K(e)),n=!0):"ArrowRight"!==i&&"Home"!==i||((e=V(To,r))&&(R(e),K(e)),n=!0)),n&&(f(t),h(t)))}on.instances=[];var Oo=se((function(t){return t.pull()}),1e3),Mo=new on(B);on.instances.push(Mo),Mo.keys.Escape=function(){var t=j.activeElement,e=t&&et(et(t),"[tabindex]:not(.not\\:active)");return e&&e.focus({focusVisible:!0}),!e},Mo.keys.F3=function(){var t,e=(t="get",j.forms[t]||null),n=e&&e.query;return n&&n.focus(),!1},Mo.keys.F10=function(){var t,e=V(".lot\\:bar a:any-link");return e&&(e.focus(),(t=et(e))&&st(t,"has:menu")&&e.click()),!1},p("blur",B,(function(t){this._event=t,Mo.pull()})),p("keydown",B,(function(t){this._event=t,Mo.push(t.key);var e=Mo.command();if(e){var n=Mo.fire(e);!1===n?(f(t),h(t)):null===n&&console.error("Unknown command:",e)}Oo(Mo)})),p("keyup",B,(function(t){this._event=t,Mo.pull(t.key)}));var Io={commands:Mo.commands,keys:Mo.keys};ve(Io),B.Key=on,B._=Io,p("beforeload",j,(function(){return Io.fire("let")})),p("load",j,(function(){return Io.fire("get")})),p("DOMContentLoaded",j,(function(){return Io.fire("set")})),function t(e){var n=J(".lot\\:bar[tabindex]");n&&C(n)&&n.forEach((function(t){J(Lt,t).forEach((function(t){X("keydown",t,Kt)})),X("keydown",t,Rt)})),1===e&&B._.on("change",t)}(1),B._.dialog=Ut,Me(1),ze(1),wn(1),function t(e){var n=J(":where(.lot\\:files,.lot\\:folders)[tabindex]");n&&C(n)&&n.forEach((function(t){J(En,t).forEach((function(t){X("keydown",t,kn)})),X("keydown",t,Sn)})),1===e&&B._.on("change",t)}(1),function t(e){var n=J(".lot\\:links[tabindex]");n&&C(n)&&n.forEach((function(t){var e=J(_n,t);e&&C(e)&&e.forEach((function(t){X("keydown",t,xn)})),X("keydown",t,Dn)})),1===e&&B._.on("change",t)}(1),function t(e){var n=J(".has\\:menu"),r=J(".lot\\:menu[tabindex]>ul>li>"+Cn);n&&C(n)&&(n.forEach((function(t){var e=V(".lot\\:menu[tabindex]",t),n=rt(e);e&&n&&(X("click",n,Pn),X("keydown",n,In))})),X("click",j,An)),r&&C(r)&&r.forEach((function(t){X("keydown",t,On)}));var i=J(".lot\\:menu[tabindex]");i&&C(i)&&i.forEach((function(t){X("keydown",t,Mn)})),1===e&&B._.on("change",t)}(1),function t(e){var n=J(".lot\\:menus[tabindex]");n&&C(n)&&n.forEach((function(t){var e=J(Nn,t);e&&C(e)&&e.forEach((function(t){X("keydown",t,Hn)})),X("keydown",t,Ln)})),1===e&&B._.on("change",t)}(1),function t(e){var n=J(".lot\\:pages[tabindex]");n&&C(n)&&n.forEach((function(t){J(Rn,t).forEach((function(t){X("keydown",t,Kn)})),X("keydown",t,Xn)})),1===e&&B._.on("change",t)}(1),function(t){for(var e;e=Bn.instances.pop();)e.destroy();var n=J(".siema");n&&C(n)&&n.forEach((function(t){var e=new Bn({duration:600,loop:!0,selector:t});t._=t._||{},t._[$n]=B.setInterval((function(){return e.next()}),5e3),X("mousedown",t,Yn),X("touchstart",t,Un),Bn.instances.push(e)})),_.on("change.stack",(function(){return c("resize",B)})),_.on("change.tab",(function(){return c("resize",B)}))}(),function t(e){for(var n;n=Ii.instances.pop();)n.destroy();var r=J(".can\\:sort:not(.not\\:active)");r&&C(r)&&r.forEach((function(t){var e,n=G(t,"batch");st(t,"content:columns")||st(t,"lot:columns"),(st(t,"content:fields")||st(t,"lot:fields"))&&(e="label[for]"),st(t,"content:files")||st(t,"lot:files"),st(t,"content:folders")||st(t,"lot:folders"),st(t,"content:pages")||st(t,"lot:pages"),st(t,"content:rows")||st(t,"lot:rows"),st(t,"content:stacks")||st(t,"lot:stacks"),st(t,"content:tabs")||st(t,"lot:tabs");var r=new Ii(t,{animation:150,avoidImplicitDeselect:!1,dataIdAttr:"data-value",emptyInsertThreshold:5,fallbackOnBody:!0,fallbackTolerance:3,filter:".not\\:active,:disabled,[aria-disabled=true],[disabled],input[type=hidden]",group:n,handle:e,onSort:ho,swapThreshold:.5});Ii.instances.push(r)})),1===e&&B._.on("change",t)}(1),function t(e){var n=J(".lot\\:stacks[tabindex]");n&&C(n)&&n.forEach((function(t){var e,n,r,i=[].slice.call(z(t)).filter((function(t){return st(t,"lot:stack")})),o=Dt("input");o.type="hidden",o.name=n=G(t,"name"),n&&(J('input[name="'+n+'"]',t).forEach((function(t){return mt(t)})),Et(t,o)),i.forEach((function(t,e){(r=V(po,t))&&(r._=r._||{},r._[vo]=o,r._[1]=e,r._[go]=i,X("click",r,mo),X("keydown",r,bo))})),(e=i.find((function(t,e){return 0!==e&&st(t,"is:current")})))&&(o.value=G(e,"value")),X("keydown",t,yo)})),1===e&&B._.on("change",t)}(1),function t(e){var n=J(".lot\\:tabs[tabindex]");n&&C(n)&&n.forEach((function(t){var e,n,r=[].slice.call(z(t)),i=[].slice.call(J(wo,r.shift())),o=Dt("input");o.type="hidden",o.name=n=G(t,"name"),n&&(J('input[name="'+n+'"]',t).forEach((function(t){return mt(t)})),Et(t,o)),i.forEach((function(t,e){t._=t._||{},t._[Eo]=o,t._[ko]=e,t._[So]=r,t._[_o]=i,X("click",t,xo),X("keydown",t,Do)})),(e=i.find((function(t,e){return 0!==e&&st(et(t),"is:current")})))&&(o.value=G(e,"value")),X("keydown",t,Co)})),1===e&&B._.on("change",t)}(1),function t(e){var n=J(".lot\\:tasks[tabindex]");n&&C(n)&&n.forEach((function(t){var e=J(To,t);e&&C(e)&&e.forEach((function(t){X("keydown",t,Ao)})),X("keydown",t,Po)})),1===e&&B._.on("change",t)}(1)}();