You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
153 KiB
21 lines
153 KiB
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin (https://github.com/alephpiece/obsidian-slash-commander)
|
|
*/
|
|
|
|
var Qs=Object.create;var ko=Object.defineProperty,Zs=Object.defineProperties,el=Object.getOwnPropertyDescriptor,tl=Object.getOwnPropertyDescriptors,ol=Object.getOwnPropertyNames,gn=Object.getOwnPropertySymbols,nl=Object.getPrototypeOf,pr=Object.prototype.hasOwnProperty,vi=Object.prototype.propertyIsEnumerable;var dr=(e,t,o)=>t in e?ko(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,je=(e,t)=>{for(var o in t||(t={}))pr.call(t,o)&&dr(e,o,t[o]);if(gn)for(var o of gn(t))vi.call(t,o)&&dr(e,o,t[o]);return e},Ft=(e,t)=>Zs(e,tl(t));var vn=(e,t)=>{var o={};for(var n in e)pr.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&gn)for(var n of gn(e))t.indexOf(n)<0&&vi.call(e,n)&&(o[n]=e[n]);return o};var bi=(e,t)=>()=>(e&&(t=e(e=0)),t);var Po=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mr=(e,t)=>{for(var o in t)ko(e,o,{get:t[o],enumerable:!0})},_i=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ol(t))!pr.call(e,a)&&a!==o&&ko(e,a,{get:()=>t[a],enumerable:!(n=el(t,a))||n.enumerable});return e};var yi=(e,t,o)=>(o=e!=null?Qs(nl(e)):{},_i(t||!e||!e.__esModule?ko(o,"default",{value:e,enumerable:!0}):o,e)),fr=e=>_i(ko({},"__esModule",{value:!0}),e);var wi=(e,t,o)=>(dr(e,typeof t!="symbol"?t+"":t,o),o);var sa={};mr(sa,{Component:()=>Do,Fragment:()=>xe,cloneElement:()=>Rl,createContext:()=>Cr,createElement:()=>v,createRef:()=>Ml,h:()=>v,hydrate:()=>aa,isValidElement:()=>Ki,options:()=>z,render:()=>De,toChildArray:()=>ra});function _t(e,t){for(var o in t)e[o]=t[o];return e}function ea(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,o){var n,a,l,d={};for(l in t)l=="key"?n=t[l]:l=="ref"?a=t[l]:d[l]=t[l];if(arguments.length>2&&(d.children=arguments.length>3?To.call(arguments,2):o),typeof e=="function"&&e.defaultProps!=null)for(l in e.defaultProps)d[l]===void 0&&(d[l]=e.defaultProps[l]);return Oo(e,d,n,a,null)}function Oo(e,t,o,n,a){var l={type:e,props:t,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:a==null?++Gi:a,__i:-1,__u:0};return a==null&&z.vnode!=null&&z.vnode(l),l}function Ml(){return{current:null}}function xe(e){return e.children}function Do(e,t){this.props=e,this.context=t}function ao(e,t){if(t==null)return e.__?ao(e.__,e.__i+1):null;for(var o;t<e.__k.length;t++)if((o=e.__k[t])!=null&&o.__e!=null)return o.__e;return typeof e.type=="function"?ao(e):null}function ta(e){var t,o;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((o=e.__k[t])!=null&&o.__e!=null){e.__e=e.__c.base=o.__e;break}return ta(e)}}function _r(e){(!e.__d&&(e.__d=!0)&&qt.push(e)&&!yn.__r++||Ui!==z.debounceRendering)&&((Ui=z.debounceRendering)||Ji)(yn)}function yn(){var e,t,o,n,a,l,d,p,m;for(qt.sort(br);e=qt.shift();)e.__d&&(t=qt.length,n=void 0,l=(a=(o=e).__v).__e,p=[],m=[],(d=o.__P)&&((n=_t({},a)).__v=a.__v+1,z.vnode&&z.vnode(n),wr(d,n,a,o.__n,d.ownerSVGElement!==void 0,32&a.__u?[l]:null,p,l==null?ao(a):l,!!(32&a.__u),m),n.__.__k[n.__i]=n,ia(p,n,m),n.__e!=l&&ta(n)),qt.length>t&&qt.sort(br));yn.__r=0}function oa(e,t,o,n,a,l,d,p,m,_,y){var g,D,C,S,E,N=n&&n.__k||Zi,T=t.length;for(o.__d=m,Tl(o,t,N),m=o.__d,g=0;g<T;g++)(C=o.__k[g])!=null&&typeof C!="boolean"&&typeof C!="function"&&(D=C.__i===-1?Mo:N[C.__i]||Mo,C.__i=g,wr(e,C,D,a,l,d,p,m,_,y),S=C.__e,C.ref&&D.ref!=C.ref&&(D.ref&&xr(D.ref,null,C),y.push(C.ref,C.__c||S,C)),E==null&&S!=null&&(E=S),65536&C.__u||D.__k===C.__k?m=na(C,m,e):typeof C.type=="function"&&C.__d!==void 0?m=C.__d:S&&(m=S.nextSibling),C.__d=void 0,C.__u&=-196609);o.__d=m,o.__e=E}function Tl(e,t,o){var n,a,l,d,p,m=t.length,_=o.length,y=_,g=0;for(e.__k=[],n=0;n<m;n++)(a=e.__k[n]=(a=t[n])==null||typeof a=="boolean"||typeof a=="function"?null:typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Oo(null,a,null,null,a):wn(a)?Oo(xe,{children:a},null,null,null):a.__b>0?Oo(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a)!=null?(a.__=e,a.__b=e.__b+1,p=Il(a,o,d=n+g,y),a.__i=p,l=null,p!==-1&&(y--,(l=o[p])&&(l.__u|=131072)),l==null||l.__v===null?(p==-1&&g--,typeof a.type!="function"&&(a.__u|=65536)):p!==d&&(p===d+1?g++:p>d?y>m-d?g+=p-d:g--:g=p<d&&p==d-1?p-d:0,p!==n+g&&(a.__u|=65536))):(l=o[n])&&l.key==null&&l.__e&&(l.__e==e.__d&&(e.__d=ao(l)),yr(l,l,!1),o[n]=null,y--);if(y)for(n=0;n<_;n++)(l=o[n])!=null&&(131072&l.__u)==0&&(l.__e==e.__d&&(e.__d=ao(l)),yr(l,l))}function na(e,t,o){var n,a;if(typeof e.type=="function"){for(n=e.__k,a=0;n&&a<n.length;a++)n[a]&&(n[a].__=e,t=na(n[a],t,o));return t}return e.__e!=t&&(o.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function ra(e,t){return t=t||[],e==null||typeof e=="boolean"||(wn(e)?e.some(function(o){ra(o,t)}):t.push(e)),t}function Il(e,t,o,n){var a=e.key,l=e.type,d=o-1,p=o+1,m=t[o];if(m===null||m&&a==m.key&&l===m.type)return o;if(n>(m!=null&&(131072&m.__u)==0?1:0))for(;d>=0||p<t.length;){if(d>=0){if((m=t[d])&&(131072&m.__u)==0&&a==m.key&&l===m.type)return d;d--}if(p<t.length){if((m=t[p])&&(131072&m.__u)==0&&a==m.key&&l===m.type)return p;p++}}return-1}function Vi(e,t,o){t[0]==="-"?e.setProperty(t,o==null?"":o):e[t]=o==null?"":typeof o!="number"||Dl.test(t)?o:o+"px"}function _n(e,t,o,n,a){var l;e:if(t==="style")if(typeof o=="string")e.style.cssText=o;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)o&&t in o||Vi(e.style,t,"");if(o)for(t in o)n&&o[t]===n[t]||Vi(e.style,t,o[t])}else if(t[0]==="o"&&t[1]==="n")l=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+l]=o,o?n?o.u=n.u:(o.u=Date.now(),e.addEventListener(t,l?Yi:Xi,l)):e.removeEventListener(t,l?Yi:Xi,l);else{if(a)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=o==null?"":o;break e}catch(d){}typeof o=="function"||(o==null||o===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,o))}}function Xi(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(z.event?z.event(e):e)}function Yi(e){return this.l[e.type+!0](z.event?z.event(e):e)}function wr(e,t,o,n,a,l,d,p,m,_){var y,g,D,C,S,E,N,T,H,X,M,x,B,Y,U,A=t.type;if(t.constructor!==void 0)return null;128&o.__u&&(m=!!(32&o.__u),l=[p=t.__e=o.__e]),(y=z.__b)&&y(t);e:if(typeof A=="function")try{if(T=t.props,H=(y=A.contextType)&&n[y.__c],X=y?H?H.props.value:y.__:n,o.__c?N=(g=t.__c=o.__c).__=g.__E:("prototype"in A&&A.prototype.render?t.__c=g=new A(T,X):(t.__c=g=new Do(T,X),g.constructor=A,g.render=Al),H&&H.sub(g),g.props=T,g.state||(g.state={}),g.context=X,g.__n=n,D=g.__d=!0,g.__h=[],g._sb=[]),g.__s==null&&(g.__s=g.state),A.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=_t({},g.__s)),_t(g.__s,A.getDerivedStateFromProps(T,g.__s))),C=g.props,S=g.state,g.__v=t,D)A.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(A.getDerivedStateFromProps==null&&T!==C&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(T,X),!g.__e&&(g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(T,g.__s,X)===!1||t.__v===o.__v)){for(t.__v!==o.__v&&(g.props=T,g.state=g.__s,g.__d=!1),t.__e=o.__e,t.__k=o.__k,t.__k.forEach(function(Q){Q&&(Q.__=t)}),M=0;M<g._sb.length;M++)g.__h.push(g._sb[M]);g._sb=[],g.__h.length&&d.push(g);break e}g.componentWillUpdate!=null&&g.componentWillUpdate(T,g.__s,X),g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(C,S,E)})}if(g.context=X,g.props=T,g.__P=e,g.__e=!1,x=z.__r,B=0,"prototype"in A&&A.prototype.render){for(g.state=g.__s,g.__d=!1,x&&x(t),y=g.render(g.props,g.state,g.context),Y=0;Y<g._sb.length;Y++)g.__h.push(g._sb[Y]);g._sb=[]}else do g.__d=!1,x&&x(t),y=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++B<25);g.state=g.__s,g.getChildContext!=null&&(n=_t(_t({},n),g.getChildContext())),D||g.getSnapshotBeforeUpdate==null||(E=g.getSnapshotBeforeUpdate(C,S)),oa(e,wn(U=y!=null&&y.type===xe&&y.key==null?y.props.children:y)?U:[U],t,o,n,a,l,d,p,m,_),g.base=t.__e,t.__u&=-161,g.__h.length&&d.push(g),N&&(g.__E=g.__=null)}catch(Q){t.__v=null,m||l!=null?(t.__e=p,t.__u|=m?160:32,l[l.indexOf(p)]=null):(t.__e=o.__e,t.__k=o.__k),z.__e(Q,t,o)}else l==null&&t.__v===o.__v?(t.__k=o.__k,t.__e=o.__e):t.__e=Nl(o.__e,t,o,n,a,l,d,m,_);(y=z.diffed)&&y(t)}function ia(e,t,o){t.__d=void 0;for(var n=0;n<o.length;n++)xr(o[n],o[++n],o[++n]);z.__c&&z.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(l){l.call(a)})}catch(l){z.__e(l,a.__v)}})}function Nl(e,t,o,n,a,l,d,p,m){var _,y,g,D,C,S,E,N=o.props,T=t.props,H=t.type;if(H==="svg"&&(a=!0),l!=null){for(_=0;_<l.length;_++)if((C=l[_])&&"setAttribute"in C==!!H&&(H?C.localName===H:C.nodeType===3)){e=C,l[_]=null;break}}if(e==null){if(H===null)return document.createTextNode(T);e=a?document.createElementNS("http://www.w3.org/2000/svg",H):document.createElement(H,T.is&&T),l=null,p=!1}if(H===null)N===T||p&&e.data===T||(e.data=T);else{if(l=l&&To.call(e.childNodes),N=o.props||Mo,!p&&l!=null)for(N={},_=0;_<e.attributes.length;_++)N[(C=e.attributes[_]).name]=C.value;for(_ in N)C=N[_],_=="children"||(_=="dangerouslySetInnerHTML"?g=C:_==="key"||_ in T||_n(e,_,null,C,a));for(_ in T)C=T[_],_=="children"?D=C:_=="dangerouslySetInnerHTML"?y=C:_=="value"?S=C:_=="checked"?E=C:_==="key"||p&&typeof C!="function"||N[_]===C||_n(e,_,C,N[_],a);if(y)p||g&&(y.__html===g.__html||y.__html===e.innerHTML)||(e.innerHTML=y.__html),t.__k=[];else if(g&&(e.innerHTML=""),oa(e,wn(D)?D:[D],t,o,n,a&&H!=="foreignObject",l,d,l?l[0]:o.__k&&ao(o,0),p,m),l!=null)for(_=l.length;_--;)l[_]!=null&&ea(l[_]);p||(_="value",S!==void 0&&(S!==e[_]||H==="progress"&&!S||H==="option"&&S!==N[_])&&_n(e,_,S,N[_],!1),_="checked",E!==void 0&&E!==e[_]&&_n(e,_,E,N[_],!1))}return e}function xr(e,t,o){try{typeof e=="function"?e(t):e.current=t}catch(n){z.__e(n,o)}}function yr(e,t,o){var n,a;if(z.unmount&&z.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||xr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(l){z.__e(l,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&&yr(n[a],t,o||typeof e.type!="function");o||e.__e==null||ea(e.__e),e.__=e.__e=e.__d=void 0}function Al(e,t,o){return this.constructor(e,o)}function De(e,t,o){var n,a,l,d;z.__&&z.__(e,t),a=(n=typeof o=="function")?null:o&&o.__k||t.__k,l=[],d=[],wr(t,e=(!n&&o||t).__k=v(xe,null,[e]),a||Mo,Mo,t.ownerSVGElement!==void 0,!n&&o?[o]:a?null:t.firstChild?To.call(t.childNodes):null,l,!n&&o?o:a?a.__e:t.firstChild,n,d),ia(l,e,d)}function aa(e,t){De(e,t,aa)}function Rl(e,t,o){var n,a,l,d,p=_t({},e.props);for(l in e.type&&e.type.defaultProps&&(d=e.type.defaultProps),t)l=="key"?n=t[l]:l=="ref"?a=t[l]:p[l]=t[l]===void 0&&d!==void 0?d[l]:t[l];return arguments.length>2&&(p.children=arguments.length>3?To.call(arguments,2):o),Oo(e.type,p,n||e.key,a||e.ref,null)}function Cr(e,t){var o={__c:t="__cC"+Qi++,__:e,Consumer:function(n,a){return n.children(a)},Provider:function(n){var a,l;return this.getChildContext||(a=[],(l={})[t]=this,this.getChildContext=function(){return l},this.shouldComponentUpdate=function(d){this.props.value!==d.value&&a.some(function(p){p.__e=!0,_r(p)})},this.sub=function(d){a.push(d);var p=d.componentWillUnmount;d.componentWillUnmount=function(){a.splice(a.indexOf(d),1),p&&p.call(d)}}),n.children}};return o.Provider.__=o.Consumer.contextType=o}var To,z,Gi,Ki,qt,Ui,Ji,br,Qi,Mo,Zi,Dl,wn,ve=bi(()=>{Mo={},Zi=[],Dl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,wn=Array.isArray;To=Zi.slice,z={__e:function(e,t,o,n){for(var a,l,d;t=t.__;)if((a=t.__c)&&!a.__)try{if((l=a.constructor)&&l.getDerivedStateFromError!=null&&(a.setState(l.getDerivedStateFromError(e)),d=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),d=a.__d),d)return a.__E=a}catch(p){e=p}throw e}},Gi=0,Ki=function(e){return e!=null&&e.constructor==null},Do.prototype.setState=function(e,t){var o;o=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=_t({},this.state),typeof e=="function"&&(e=e(_t({},o),this.props)),e&&_t(o,e),e!=null&&this.__v&&(t&&this._sb.push(t),_r(this))},Do.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_r(this))},Do.prototype.render=xe,qt=[],Ji=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,br=function(e,t){return e.__v.__b-t.__v.__b},yn.__r=0,Qi=0});var xa={};mr(xa,{useCallback:()=>zl,useContext:()=>Hl,useDebugValue:()=>$l,useEffect:()=>Ro,useErrorBoundary:()=>Fl,useId:()=>ql,useImperativeHandle:()=>Ll,useLayoutEffect:()=>Dn,useMemo:()=>kr,useReducer:()=>ya,useRef:()=>Lo,useState:()=>wt});function jt(e,t){z.__h&&z.__h(ee,e,so||t),so=0;var o=ee.__H||(ee.__H={__:[],__h:[]});return e>=o.__.length&&o.__.push({__V:Pn}),o.__[e]}function wt(e){return so=1,ya(wa,e)}function ya(e,t,o){var n=jt(yt++,2);if(n.t=e,!n.__c&&(n.__=[o?o(t):wa(void 0,t),function(p){var m=n.__N?n.__N[0]:n.__[0],_=n.t(m,p);m!==_&&(n.__N=[_,n.__[1]],n.__c.setState({}))}],n.__c=ee,!ee.u)){var a=function(p,m,_){if(!n.__c.__H)return!0;var y=n.__c.__H.__.filter(function(D){return D.__c});if(y.every(function(D){return!D.__N}))return!l||l.call(this,p,m,_);var g=!1;return y.forEach(function(D){if(D.__N){var C=D.__[0];D.__=D.__N,D.__N=void 0,C!==D.__[0]&&(g=!0)}}),!(!g&&n.__c.props===p)&&(!l||l.call(this,p,m,_))};ee.u=!0;var l=ee.shouldComponentUpdate,d=ee.componentWillUpdate;ee.componentWillUpdate=function(p,m,_){if(this.__e){var y=l;l=void 0,a(p,m,_),l=y}d&&d.call(this,p,m,_)},ee.shouldComponentUpdate=a}return n.__N||n.__}function Ro(e,t){var o=jt(yt++,3);!z.__s&&Pr(o.__H,t)&&(o.__=e,o.i=t,ee.__H.__h.push(o))}function Dn(e,t){var o=jt(yt++,4);!z.__s&&Pr(o.__H,t)&&(o.__=e,o.i=t,ee.__h.push(o))}function Lo(e){return so=5,kr(function(){return{current:e}},[])}function Ll(e,t,o){so=6,Dn(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},o==null?o:o.concat(e))}function kr(e,t){var o=jt(yt++,7);return Pr(o.__H,t)?(o.__V=e(),o.i=t,o.__h=e,o.__V):o.__}function zl(e,t){return so=8,kr(function(){return e},t)}function Hl(e){var t=ee.context[e.__c],o=jt(yt++,9);return o.c=e,t?(o.__==null&&(o.__=!0,t.sub(ee)),t.props.value):e.__}function $l(e,t){z.useDebugValue&&z.useDebugValue(t?t(e):e)}function Fl(e){var t=jt(yt++,10),o=wt();return t.__=e,ee.componentDidCatch||(ee.componentDidCatch=function(n,a){t.__&&t.__(n,a),o[1](n)}),[o[0],function(){o[1](void 0)}]}function ql(){var e=jt(yt++,11);if(!e.__){for(var t=ee.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var o=t.__m||(t.__m=[0,0]);e.__="P"+o[0]+"-"+o[1]++}return e.__}function Bl(){for(var e;e=_a.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(On),e.__H.__h.forEach(Sr),e.__H.__h=[]}catch(t){e.__H.__h=[],z.__e(t,e.__v)}}function jl(e){var t,o=function(){clearTimeout(n),ba&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(o,100);ba&&(t=requestAnimationFrame(o))}function On(e){var t=ee,o=e.__c;typeof o=="function"&&(e.__c=void 0,o()),ee=t}function Sr(e){var t=ee;e.__c=e.__(),ee=t}function Pr(e,t){return!e||e.length!==t.length||t.some(function(o,n){return o!==e[n]})}function wa(e,t){return typeof t=="function"?t(e):t}var yt,ee,Er,pa,so,_a,Pn,ma,fa,ha,ga,va,ba,Wt=bi(()=>{ve();so=0,_a=[],Pn=[],ma=z.__b,fa=z.__r,ha=z.diffed,ga=z.__c,va=z.unmount;z.__b=function(e){ee=null,ma&&ma(e)},z.__r=function(e){fa&&fa(e),yt=0;var t=(ee=e.__c).__H;t&&(Er===ee?(t.__h=[],ee.__h=[],t.__.forEach(function(o){o.__N&&(o.__=o.__N),o.__V=Pn,o.__N=o.i=void 0})):(t.__h.forEach(On),t.__h.forEach(Sr),t.__h=[],yt=0)),Er=ee},z.diffed=function(e){ha&&ha(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(_a.push(t)!==1&&pa===z.requestAnimationFrame||((pa=z.requestAnimationFrame)||jl)(Bl)),t.__H.__.forEach(function(o){o.i&&(o.__H=o.i),o.__V!==Pn&&(o.__=o.__V),o.i=void 0,o.__V=Pn})),Er=ee=null},z.__c=function(e,t){t.some(function(o){try{o.__h.forEach(On),o.__h=o.__h.filter(function(n){return!n.__||Sr(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],z.__e(n,o.__v)}}),ga&&ga(e,t)},z.unmount=function(e){va&&va(e);var t,o=e.__c;o&&o.__H&&(o.__H.__.forEach(function(n){try{On(n)}catch(a){t=a}}),o.__H=void 0,t&&z.__e(t,o.__v))};ba=typeof requestAnimationFrame=="function"});var Rr=Po(W=>{var R=(ve(),fr(sa)),Ie=(Wt(),fr(xa));function Ra(e,t){for(var o in t)e[o]=t[o];return e}function Ir(e,t){for(var o in e)if(o!=="__source"&&!(o in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Mn(e){this.props=e}function La(e,t){function o(a){var l=this.props.ref,d=l==a.ref;return!d&&l&&(l.call?l(null):l.current=null),t?!t(this.props,a)||!d:Ir(this.props,a)}function n(a){return this.shouldComponentUpdate=o,R.createElement(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Mn.prototype=new R.Component).isPureReactComponent=!0,Mn.prototype.shouldComponentUpdate=function(e,t){return Ir(this.props,e)||Ir(this.state,t)};var Pa=R.options.__b;R.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Pa&&Pa(e)};var Vl=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function za(e){function t(o){var n=Ra({},o);return delete n.ref,e(n,o.ref||null)}return t.$$typeof=Vl,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Oa=function(e,t){return e==null?null:R.toChildArray(R.toChildArray(e).map(t))},Ha={map:Oa,forEach:Oa,count:function(e){return e?R.toChildArray(e).length:0},only:function(e){var t=R.toChildArray(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:R.toChildArray},Xl=R.options.__e;R.options.__e=function(e,t,o,n){if(e.then){for(var a,l=t;l=l.__;)if((a=l.__c)&&a.__c)return t.__e==null&&(t.__e=o.__e,t.__k=o.__k),a.__c(e,t)}Xl(e,t,o,n)};var Da=R.options.unmount;function $a(e,t,o){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Ra({},e)).__c!=null&&(e.__c.__P===o&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return $a(n,t,o)})),e}function Fa(e,t,o){return e&&o&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Fa(n,t,o)}),e.__c&&e.__c.__P===t&&(e.__e&&o.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=o)),e}function Ho(){this.__u=0,this.t=null,this.__b=null}function qa(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ba(e){var t,o,n;function a(l){if(t||(t=e()).then(function(d){o=d.default||d},function(d){n=d}),n)throw n;if(!o)throw t;return R.createElement(o,l)}return a.displayName="Lazy",a.__f=!0,a}function lo(){this.u=null,this.o=null}R.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Da&&Da(e)},(Ho.prototype=new R.Component).__c=function(e,t){var o=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(o);var a=qa(n.__v),l=!1,d=function(){l||(l=!0,o.__R=null,a?a(p):p())};o.__R=d;var p=function(){if(!--n.__u){if(n.state.__a){var m=n.state.__a;n.__v.__k[0]=Fa(m,m.__c.__P,m.__c.__O)}var _;for(n.setState({__a:n.__b=null});_=n.t.pop();)_.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(d,d)},Ho.prototype.componentWillUnmount=function(){this.t=[]},Ho.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=$a(this.__b,o,n.__O=n.__P)}this.__b=null}var a=t.__a&&R.createElement(R.Fragment,null,e.fallback);return a&&(a.__u&=-33),[R.createElement(R.Fragment,null,t.__a?null:e.children),a]};var Ma=function(e,t,o){if(++o[1]===o[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(o=e.u;o;){for(;o.length>3;)o.pop()();if(o[1]<o[0])break;e.u=o=o[2]}};function Yl(e){return this.getChildContext=function(){return e.context},e.children}function Gl(e){var t=this,o=e.i;t.componentWillUnmount=function(){R.render(null,t.l),t.l=null,t.i=null},t.i&&t.i!==o&&t.componentWillUnmount(),t.l||(t.i=o,t.l={nodeType:1,parentNode:o,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,a){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),R.render(R.createElement(Yl,{context:t.context},e.__v),t.l)}function ja(e,t){var o=R.createElement(Gl,{__v:e,i:t});return o.containerInfo=t,o}(lo.prototype=new R.Component).__a=function(e){var t=this,o=qa(t.__v),n=t.o.get(e);return n[0]++,function(a){var l=function(){t.props.revealOrder?(n.push(a),Ma(t,e,n)):a()};o?o(l):l()}},lo.prototype.render=function(e){this.u=null,this.o=new Map;var t=R.toChildArray(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var o=t.length;o--;)this.o.set(t[o],this.u=[1,0,this.u]);return e.children},lo.prototype.componentDidUpdate=lo.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,o){Ma(e,o,t)})};var Wa=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Kl=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Jl=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ql=/[A-Z0-9]/g,Zl=typeof document!="undefined",ec=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ua(e,t,o){return t.__k==null&&(t.textContent=""),R.render(e,t),typeof o=="function"&&o(),e?e.__c:null}function Va(e,t,o){return R.hydrate(e,t),typeof o=="function"&&o(),e?e.__c:null}R.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(R.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ta=R.options.event;function tc(){}function oc(){return this.cancelBubble}function nc(){return this.defaultPrevented}R.options.event=function(e){return Ta&&(e=Ta(e)),e.persist=tc,e.isPropagationStopped=oc,e.isDefaultPrevented=nc,e.nativeEvent=e};var Nr,rc={enumerable:!1,configurable:!0,get:function(){return this.class}},Ia=R.options.vnode;R.options.vnode=function(e){typeof e.type=="string"&&function(t){var o=t.props,n=t.type,a={};for(var l in o){var d=o[l];if(!(l==="value"&&"defaultValue"in o&&d==null||Zl&&l==="children"&&n==="noscript"||l==="class"||l==="className")){var p=l.toLowerCase();l==="defaultValue"&&"value"in o&&o.value==null?l="value":l==="download"&&d===!0?d="":p==="ondoubleclick"?l="ondblclick":p!=="onchange"||n!=="input"&&n!=="textarea"||ec(o.type)?p==="onfocus"?l="onfocusin":p==="onblur"?l="onfocusout":Jl.test(l)?l=p:n.indexOf("-")===-1&&Kl.test(l)?l=l.replace(Ql,"-$&").toLowerCase():d===null&&(d=void 0):p=l="oninput",p==="oninput"&&a[l=p]&&(l="oninputCapture"),a[l]=d}}n=="select"&&a.multiple&&Array.isArray(a.value)&&(a.value=R.toChildArray(o.children).forEach(function(m){m.props.selected=a.value.indexOf(m.props.value)!=-1})),n=="select"&&a.defaultValue!=null&&(a.value=R.toChildArray(o.children).forEach(function(m){m.props.selected=a.multiple?a.defaultValue.indexOf(m.props.value)!=-1:a.defaultValue==m.props.value})),o.class&&!o.className?(a.class=o.class,Object.defineProperty(a,"className",rc)):(o.className&&!o.class||o.class&&o.className)&&(a.class=a.className=o.className),t.props=a}(e),e.$$typeof=Wa,Ia&&Ia(e)};var Na=R.options.__r;R.options.__r=function(e){Na&&Na(e),Nr=e.__c};var Aa=R.options.diffed;R.options.diffed=function(e){Aa&&Aa(e);var t=e.props,o=e.__e;o!=null&&e.type==="textarea"&&"value"in t&&t.value!==o.value&&(o.value=t.value==null?"":t.value),Nr=null};var Xa={ReactCurrentDispatcher:{current:{readContext:function(e){return Nr.__n[e.__c].props.value}}}};function Ya(e){return R.createElement.bind(null,e)}function $o(e){return!!e&&e.$$typeof===Wa}function Ga(e){return $o(e)&&e.type===R.Fragment}function Ka(e){return $o(e)?R.cloneElement.apply(null,arguments):e}function Ja(e){return!!e.__k&&(R.render(null,e),!0)}function Qa(e){return e&&(e.base||e.nodeType===1&&e)||null}var Za=function(e,t){return e(t)},es=function(e,t){return e(t)},ts=R.Fragment;function Ar(e){e()}function os(e){return e}function ns(){return[!1,Ar]}var rs=Ie.useLayoutEffect,is=$o;function as(e,t){var o=t(),n=Ie.useState({p:{__:o,h:t}}),a=n[0].p,l=n[1];return Ie.useLayoutEffect(function(){a.__=o,a.h=t,Tr(a)&&l({p:a})},[e,o,t]),Ie.useEffect(function(){return Tr(a)&&l({p:a}),e(function(){Tr(a)&&l({p:a})})},[e]),o}function Tr(e){var t,o,n=e.h,a=e.__;try{var l=n();return!((t=a)===(o=l)&&(t!==0||1/t==1/o)||t!=t&&o!=o)}catch(d){return!0}}var ic={useState:Ie.useState,useId:Ie.useId,useReducer:Ie.useReducer,useEffect:Ie.useEffect,useLayoutEffect:Ie.useLayoutEffect,useInsertionEffect:rs,useTransition:ns,useDeferredValue:os,useSyncExternalStore:as,startTransition:Ar,useRef:Ie.useRef,useImperativeHandle:Ie.useImperativeHandle,useMemo:Ie.useMemo,useCallback:Ie.useCallback,useContext:Ie.useContext,useDebugValue:Ie.useDebugValue,version:"17.0.2",Children:Ha,render:Ua,hydrate:Va,unmountComponentAtNode:Ja,createPortal:ja,createElement:R.createElement,createContext:R.createContext,createFactory:Ya,cloneElement:Ka,createRef:R.createRef,Fragment:R.Fragment,isValidElement:$o,isElement:is,isFragment:Ga,findDOMNode:Qa,Component:R.Component,PureComponent:Mn,memo:La,forwardRef:za,flushSync:es,unstable_batchedUpdates:Za,StrictMode:ts,Suspense:Ho,SuspenseList:lo,lazy:Ba,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Xa};Object.defineProperty(W,"Component",{enumerable:!0,get:function(){return R.Component}}),Object.defineProperty(W,"Fragment",{enumerable:!0,get:function(){return R.Fragment}}),Object.defineProperty(W,"createContext",{enumerable:!0,get:function(){return R.createContext}}),Object.defineProperty(W,"createElement",{enumerable:!0,get:function(){return R.createElement}}),Object.defineProperty(W,"createRef",{enumerable:!0,get:function(){return R.createRef}}),W.Children=Ha,W.PureComponent=Mn,W.StrictMode=ts,W.Suspense=Ho,W.SuspenseList=lo,W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xa,W.cloneElement=Ka,W.createFactory=Ya,W.createPortal=ja,W.default=ic,W.findDOMNode=Qa,W.flushSync=es,W.forwardRef=za,W.hydrate=Va,W.isElement=is,W.isFragment=Ga,W.isValidElement=$o,W.lazy=Ba,W.memo=La,W.render=Ua,W.startTransition=Ar,W.unmountComponentAtNode=Ja,W.unstable_batchedUpdates=Za,W.useDeferredValue=os,W.useInsertionEffect=rs,W.useSyncExternalStore=as,W.useTransition=ns,W.version="17.0.2",Object.keys(Ie).forEach(function(e){e==="default"||W.hasOwnProperty(e)||Object.defineProperty(W,e,{enumerable:!0,get:function(){return Ie[e]}})})});var ss=Po((Lr,zr)=>{(function(e,t){typeof Lr=="object"&&typeof zr!="undefined"?zr.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).Sortable=t()})(Lr,function(){"use strict";function e(r,i){var s,u=Object.keys(r);return Object.getOwnPropertySymbols&&(s=Object.getOwnPropertySymbols(r),i&&(s=s.filter(function(c){return Object.getOwnPropertyDescriptor(r,c).enumerable})),u.push.apply(u,s)),u}function t(r){for(var i=1;i<arguments.length;i++){var s=arguments[i]!=null?arguments[i]:{};i%2?e(Object(s),!0).forEach(function(u){var c,f;c=r,u=s[f=u],f in c?Object.defineProperty(c,f,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[f]=u}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(s,u))})}return r}function o(r){return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(r)}function n(){return(n=Object.assign||function(r){for(var i=1;i<arguments.length;i++){var s,u=arguments[i];for(s in u)Object.prototype.hasOwnProperty.call(u,s)&&(r[s]=u[s])}return r}).apply(this,arguments)}function a(r,i){if(r==null)return{};var s,u=function(b,h){if(b==null)return{};for(var w,O={},I=Object.keys(b),q=0;q<I.length;q++)w=I[q],0<=h.indexOf(w)||(O[w]=b[w]);return O}(r,i);if(Object.getOwnPropertySymbols)for(var c=Object.getOwnPropertySymbols(r),f=0;f<c.length;f++)s=c[f],0<=i.indexOf(s)||Object.prototype.propertyIsEnumerable.call(r,s)&&(u[s]=r[s]);return u}function l(r){return function(i){if(Array.isArray(i))return d(i)}(r)||function(i){if(typeof Symbol!="undefined"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}(r)||function(i,s){if(i){if(typeof i=="string")return d(i,s);var u=Object.prototype.toString.call(i).slice(8,-1);return(u=u==="Object"&&i.constructor?i.constructor.name:u)==="Map"||u==="Set"?Array.from(i):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?d(i,s):void 0}}(r)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function d(r,i){(i==null||i>r.length)&&(i=r.length);for(var s=0,u=new Array(i);s<i;s++)u[s]=r[s];return u}function p(r){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(r)}var m=p(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_=p(/Edge/i),y=p(/firefox/i),g=p(/safari/i)&&!p(/chrome/i)&&!p(/android/i),D=p(/iP(ad|od|hone)/i),wo=p(/chrome/i)&&p(/android/i),C={capture:!1,passive:!1};function S(r,i,s){r.addEventListener(i,s,!m&&C)}function E(r,i,s){r.removeEventListener(i,s,!m&&C)}function N(r,i){if(i&&(i[0]===">"&&(i=i.substring(1)),r))try{if(r.matches)return r.matches(i);if(r.msMatchesSelector)return r.msMatchesSelector(i);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(i)}catch(s){return}}function T(r,i,s,u){if(r){s=s||document;do if(i!=null&&(i[0]!==">"||r.parentNode===s)&&N(r,i)||u&&r===s)return r;while(r!==s&&(r=(c=r).host&&c!==document&&c.host.nodeType?c.host:c.parentNode))}var c;return null}var H,X=/\s+/g;function M(r,i,s){var u;r&&i&&(r.classList?r.classList[s?"add":"remove"](i):(u=(" "+r.className+" ").replace(X," ").replace(" "+i+" "," "),r.className=(u+(s?" "+i:"")).replace(X," ")))}function x(r,i,s){var u=r&&r.style;if(u){if(s===void 0)return document.defaultView&&document.defaultView.getComputedStyle?s=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(s=r.currentStyle),i===void 0?s:s[i];u[i=i in u||i.indexOf("webkit")!==-1?i:"-webkit-"+i]=s+(typeof s=="string"?"":"px")}}function B(r,i){var s="";if(typeof r=="string")s=r;else do var u=x(r,"transform");while(u&&u!=="none"&&(s=u+" "+s),!i&&(r=r.parentNode));var c=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return c&&new c(s)}function Y(r,i,s){if(r){var u=r.getElementsByTagName(i),c=0,f=u.length;if(s)for(;c<f;c++)s(u[c],c);return u}return[]}function U(){var r=document.scrollingElement;return r||document.documentElement}function A(r,i,s,u,c){if(r.getBoundingClientRect||r===window){var f,b,h,w,O,I,q=r!==window&&r.parentNode&&r!==U()?(b=(f=r.getBoundingClientRect()).top,h=f.left,w=f.bottom,O=f.right,I=f.height,f.width):(h=b=0,w=window.innerHeight,O=window.innerWidth,I=window.innerHeight,window.innerWidth);if((i||s)&&r!==window&&(c=c||r.parentNode,!m))do if(c&&c.getBoundingClientRect&&(x(c,"transform")!=="none"||s&&x(c,"position")!=="static")){var se=c.getBoundingClientRect();b-=se.top+parseInt(x(c,"border-top-width")),h-=se.left+parseInt(x(c,"border-left-width")),w=b+f.height,O=h+f.width;break}while(c=c.parentNode);return u&&r!==window&&(u=(i=B(c||r))&&i.a,r=i&&i.d,i&&(w=(b/=r)+(I/=r),O=(h/=u)+(q/=u))),{top:b,left:h,bottom:w,right:O,width:q,height:I}}}function Q(r){var i=A(r),s=parseInt(x(r,"padding-left")),u=parseInt(x(r,"padding-top")),c=parseInt(x(r,"padding-right")),f=parseInt(x(r,"padding-bottom"));return i.top+=u+parseInt(x(r,"border-top-width")),i.left+=s+parseInt(x(r,"border-left-width")),i.width=r.clientWidth-s-c,i.height=r.clientHeight-u-f,i.bottom=i.top+i.height,i.right=i.left+i.width,i}function _e(r,i,s){for(var u=pe(r,!0),c=A(r)[i];u;){var f=A(u)[s];if(!(s==="top"||s==="left"?f<=c:c<=f))return u;if(u===U())break;u=pe(u,!1)}return!1}function Se(r,i,s,u){for(var c=0,f=0,b=r.children;f<b.length;){if(b[f].style.display!=="none"&&b[f]!==L.ghost&&(u||b[f]!==L.dragged)&&T(b[f],s.draggable,r,!1)){if(c===i)return b[f];c++}f++}return null}function ye(r,i){for(var s=r.lastElementChild;s&&(s===L.ghost||x(s,"display")==="none"||i&&!N(s,i));)s=s.previousElementSibling;return s||null}function G(r,i){var s=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()==="TEMPLATE"||r===L.clone||i&&!N(r,i)||s++;return s}function at(r){var i=0,s=0,u=U();if(r)do var f=B(r),c=f.a,f=f.d;while(i+=r.scrollLeft*c,s+=r.scrollTop*f,r!==u&&(r=r.parentNode));return[i,s]}function pe(r,i){if(!r||!r.getBoundingClientRect)return U();var s=r,u=!1;do if(s.clientWidth<s.scrollWidth||s.clientHeight<s.scrollHeight){var c=x(s);if(s.clientWidth<s.scrollWidth&&(c.overflowX=="auto"||c.overflowX=="scroll")||s.clientHeight<s.scrollHeight&&(c.overflowY=="auto"||c.overflowY=="scroll")){if(!s.getBoundingClientRect||s===document.body)return U();if(u||i)return s;u=!0}}while(s=s.parentNode);return U()}function Le(r,i){return Math.round(r.top)===Math.round(i.top)&&Math.round(r.left)===Math.round(i.left)&&Math.round(r.height)===Math.round(i.height)&&Math.round(r.width)===Math.round(i.width)}function Lt(r,i){return function(){var s;H||((s=arguments).length===1?r.call(this,s[0]):r.apply(this,s),H=setTimeout(function(){H=void 0},i))}}function st(r,i,s){r.scrollLeft+=i,r.scrollTop+=s}function St(r){var i=window.Polymer,s=window.jQuery||window.Zepto;return i&&i.dom?i.dom(r).cloneNode(!0):s?s(r).clone(!0)[0]:r.cloneNode(!0)}function to(r,i){x(r,"position","absolute"),x(r,"top",i.top),x(r,"left",i.left),x(r,"width",i.width),x(r,"height",i.height)}function ft(r){x(r,"position",""),x(r,"top",""),x(r,"left",""),x(r,"width",""),x(r,"height","")}var fe="Sortable"+new Date().getTime();function kt(){var r,i=[];return{captureAnimationState:function(){i=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(s){var u,c;x(s,"display")!=="none"&&s!==L.ghost&&(i.push({target:s,rect:A(s)}),u=t({},i[i.length-1].rect),!s.thisAnimationDuration||(c=B(s,!0))&&(u.top-=c.f,u.left-=c.e),s.fromRect=u)})},addAnimationState:function(s){i.push(s)},removeAnimationState:function(s){i.splice(function(u,c){for(var f in u)if(u.hasOwnProperty(f)){for(var b in c)if(c.hasOwnProperty(b)&&c[b]===u[f][b])return Number(f)}return-1}(i,{target:s}),1)},animateAll:function(s){var u=this;if(!this.options.animation)return clearTimeout(r),void(typeof s=="function"&&s());var c=!1,f=0;i.forEach(function(b){var h=0,w=b.target,O=w.fromRect,I=A(w),q=w.prevFromRect,se=w.prevToRect,V=b.rect,j=B(w,!0);j&&(I.top-=j.f,I.left-=j.e),w.toRect=I,w.thisAnimationDuration&&Le(q,I)&&!Le(O,I)&&(V.top-I.top)/(V.left-I.left)==(O.top-I.top)/(O.left-I.left)&&(b=V,j=q,q=se,se=u.options,h=Math.sqrt(Math.pow(j.top-b.top,2)+Math.pow(j.left-b.left,2))/Math.sqrt(Math.pow(j.top-q.top,2)+Math.pow(j.left-q.left,2))*se.animation),Le(I,O)||(w.prevFromRect=O,w.prevToRect=I,h=h||u.options.animation,u.animate(w,V,I,h)),h&&(c=!0,f=Math.max(f,h),clearTimeout(w.animationResetTimer),w.animationResetTimer=setTimeout(function(){w.animationTime=0,w.prevFromRect=null,w.fromRect=null,w.prevToRect=null,w.thisAnimationDuration=null},h),w.thisAnimationDuration=h)}),clearTimeout(r),c?r=setTimeout(function(){typeof s=="function"&&s()},f):typeof s=="function"&&s(),i=[]},animate:function(s,u,c,f){var b,h;f&&(x(s,"transition",""),x(s,"transform",""),b=(h=B(this.el))&&h.a,h=h&&h.d,b=(u.left-c.left)/(b||1),h=(u.top-c.top)/(h||1),s.animatingX=!!b,s.animatingY=!!h,x(s,"transform","translate3d("+b+"px,"+h+"px,0)"),this.forRepaintDummy=s.offsetWidth,x(s,"transition","transform "+f+"ms"+(this.options.easing?" "+this.options.easing:"")),x(s,"transform","translate3d(0,0,0)"),typeof s.animated=="number"&&clearTimeout(s.animated),s.animated=setTimeout(function(){x(s,"transition",""),x(s,"transform",""),s.animated=!1,s.animatingX=!1,s.animatingY=!1},f))}}}var ze=[],ht={initializeByDefault:!0},lt={mount:function(r){for(var i in ht)!ht.hasOwnProperty(i)||i in r||(r[i]=ht[i]);ze.forEach(function(s){if(s.pluginName===r.pluginName)throw"Sortable: Cannot mount plugin ".concat(r.pluginName," more than once")}),ze.push(r)},pluginEvent:function(r,i,s){var u=this;this.eventCanceled=!1,s.cancel=function(){u.eventCanceled=!0};var c=r+"Global";ze.forEach(function(f){i[f.pluginName]&&(i[f.pluginName][c]&&i[f.pluginName][c](t({sortable:i},s)),i.options[f.pluginName]&&i[f.pluginName][r]&&i[f.pluginName][r](t({sortable:i},s)))})},initializePlugins:function(r,i,s,u){for(var c in ze.forEach(function(b){var h=b.pluginName;(r.options[h]||b.initializeByDefault)&&((b=new b(r,i,r.options)).sortable=r,b.options=r.options,r[h]=b,n(s,b.defaults))}),r.options){var f;r.options.hasOwnProperty(c)&&(f=this.modifyOption(r,c,r.options[c]))!==void 0&&(r.options[c]=f)}},getEventProperties:function(r,i){var s={};return ze.forEach(function(u){typeof u.eventProperties=="function"&&n(s,u.eventProperties.call(i[u.pluginName],r))}),s},modifyOption:function(r,i,s){var u;return ze.forEach(function(c){r[c.pluginName]&&c.optionListeners&&typeof c.optionListeners[i]=="function"&&(u=c.optionListeners[i].call(r[c.pluginName],s))}),u}};function Ue(r){var i=r.sortable,s=r.rootEl,u=r.name,c=r.targetEl,f=r.cloneEl,b=r.toEl,h=r.fromEl,w=r.oldIndex,O=r.newIndex,I=r.oldDraggableIndex,q=r.newDraggableIndex,se=r.originalEvent,V=r.putSortable,j=r.extraEventProperties;if(i=i||s&&s[fe]){var Z,le=i.options,r="on"+u.charAt(0).toUpperCase()+u.substr(1);!window.CustomEvent||m||_?(Z=document.createEvent("Event")).initEvent(u,!0,!0):Z=new CustomEvent(u,{bubbles:!0,cancelable:!0}),Z.to=b||s,Z.from=h||s,Z.item=c||s,Z.clone=f,Z.oldIndex=w,Z.newIndex=O,Z.oldDraggableIndex=I,Z.newDraggableIndex=q,Z.originalEvent=se,Z.pullMode=V?V.lastPutMode:void 0;var Re,K=t(t({},j),lt.getEventProperties(u,i));for(Re in K)Z[Re]=K[Re];s&&s.dispatchEvent(Z),le[r]&&le[r].call(i,Z)}}function ke(r,i){var s=(u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{}).evt,u=a(u,Jn);lt.pluginEvent.bind(L)(r,i,t({dragEl:k,parentEl:re,ghostEl:F,rootEl:te,nextEl:ct,lastDownEl:zt,cloneEl:ie,cloneHidden:ut,dragStarted:go,putSortable:Oe,activeSortable:L.active,originalEvent:s,oldIndex:Fe,oldDraggableIndex:Pt,newIndex:Pe,newDraggableIndex:Ze,hideGhostForTarget:pi,unhideGhostForTarget:mi,cloneNowHidden:function(){ut=!0},cloneNowShown:function(){ut=!1},dispatchSortableEvent:function(c){we({sortable:i,name:c,originalEvent:s})}},u))}var Jn=["evt"];function we(r){Ue(t({putSortable:Oe,cloneEl:ie,targetEl:k,rootEl:te,oldIndex:Fe,oldDraggableIndex:Pt,newIndex:Pe,newDraggableIndex:Ze},r))}var k,re,F,te,ct,zt,ie,ut,Fe,Pe,Pt,Ze,Ot,Oe,dt,qe,oo,Qn,ai,si,go,no,vo,Qo,Ae,ro=!1,Zo=!1,en=[],bo=!1,tn=!1,Zn=[],er=!1,on=[],nn=typeof document!="undefined",rn=D,li=_||m?"cssFloat":"float",Us=nn&&!wo&&!D&&"draggable"in document.createElement("div"),ci=function(){if(nn){if(m)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),ui=function(O,i){var s=x(O),u=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),c=Se(O,0,i),f=Se(O,1,i),b=c&&x(c),h=f&&x(f),w=b&&parseInt(b.marginLeft)+parseInt(b.marginRight)+A(c).width,O=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+A(f).width;return s.display==="flex"?s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal":s.display==="grid"?s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":c&&b.float&&b.float!=="none"?(i=b.float==="left"?"left":"right",!f||h.clear!=="both"&&h.clear!==i?"horizontal":"vertical"):c&&(b.display==="block"||b.display==="flex"||b.display==="table"||b.display==="grid"||u<=w&&s[li]==="none"||f&&s[li]==="none"&&u<w+O)?"vertical":"horizontal"},di=function(r){function i(c,f){return function(b,h,w,O){var I=b.options.group.name&&h.options.group.name&&b.options.group.name===h.options.group.name;return c==null&&(f||I)?!0:c==null||c===!1?!1:f&&c==="clone"?c:typeof c=="function"?i(c(b,h,w,O),f)(b,h,w,O):(h=(f?b:h).options.group.name,c===!0||typeof c=="string"&&c===h||c.join&&-1<c.indexOf(h))}}var s={},u=r.group;u&&o(u)=="object"||(u={name:u}),s.name=u.name,s.checkPull=i(u.pull,!0),s.checkPut=i(u.put),s.revertClone=u.revertClone,r.group=s},pi=function(){!ci&&F&&x(F,"display","none")},mi=function(){!ci&&F&&x(F,"display","")};nn&&!wo&&document.addEventListener("click",function(r){if(Zo)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),Zo=!1},!0);function Ht(r){if(k){r=r.touches?r.touches[0]:r;var i=(c=r.clientX,f=r.clientY,en.some(function(h){var w=h[fe].options.emptyInsertThreshold;if(w&&!ye(h)){var O=A(h),I=c>=O.left-w&&c<=O.right+w,w=f>=O.top-w&&f<=O.bottom+w;return I&&w?b=h:void 0}}),b);if(i){var s,u={};for(s in r)r.hasOwnProperty(s)&&(u[s]=r[s]);u.target=u.rootEl=i,u.preventDefault=void 0,u.stopPropagation=void 0,i[fe]._onDragOver(u)}}var c,f,b}function Vs(r){k&&k.parentNode[fe]._isOutsideThisEl(r.target)}function L(r,i){if(!r||!r.nodeType||r.nodeType!==1)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=i=n({},i),r[fe]=this;var s,u,c={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ui(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(f,b){f.setData("Text",b.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:L.supportPointer!==!1&&"PointerEvent"in window&&!g,emptyInsertThreshold:5};for(s in lt.initializePlugins(this,r,c),c)s in i||(i[s]=c[s]);for(u in di(i),this)u.charAt(0)==="_"&&typeof this[u]=="function"&&(this[u]=this[u].bind(this));this.nativeDraggable=!i.forceFallback&&Us,this.nativeDraggable&&(this.options.touchStartThreshold=1),i.supportPointer?S(r,"pointerdown",this._onTapStart):(S(r,"mousedown",this._onTapStart),S(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(S(r,"dragover",this),S(r,"dragenter",this)),en.push(this.el),i.store&&i.store.get&&this.sort(i.store.get(this)||[]),n(this,kt())}function an(r,i,s,u,c,f,b,h){var w,O,I=r[fe],q=I.options.onMove;return!window.CustomEvent||m||_?(w=document.createEvent("Event")).initEvent("move",!0,!0):w=new CustomEvent("move",{bubbles:!0,cancelable:!0}),w.to=i,w.from=r,w.dragged=s,w.draggedRect=u,w.related=c||i,w.relatedRect=f||A(i),w.willInsertAfter=h,w.originalEvent=b,r.dispatchEvent(w),O=q?q.call(I,w,b):O}function tr(r){r.draggable=!1}function Xs(){er=!1}function sn(r){return setTimeout(r,0)}function or(r){return clearTimeout(r)}L.prototype={constructor:L,_isOutsideThisEl:function(r){this.el.contains(r)||r===this.el||(no=null)},_getDirection:function(r,i){return typeof this.options.direction=="function"?this.options.direction.call(this,r,i,k):this.options.direction},_onTapStart:function(r){if(r.cancelable){var i=this,s=this.el,u=this.options,c=u.preventOnFilter,f=r.type,b=r.touches&&r.touches[0]||r.pointerType&&r.pointerType==="touch"&&r,h=(b||r).target,w=r.target.shadowRoot&&(r.path&&r.path[0]||r.composedPath&&r.composedPath()[0])||h,O=u.filter;if(function(I){on.length=0;for(var q=I.getElementsByTagName("input"),se=q.length;se--;){var V=q[se];V.checked&&on.push(V)}}(s),!k&&!(/mousedown|pointerdown/.test(f)&&r.button!==0||u.disabled)&&!w.isContentEditable&&(this.nativeDraggable||!g||!h||h.tagName.toUpperCase()!=="SELECT")&&!((h=T(h,u.draggable,s,!1))&&h.animated||zt===h)){if(Fe=G(h),Pt=G(h,u.draggable),typeof O=="function"){if(O.call(this,r,h,this))return we({sortable:i,rootEl:w,name:"filter",targetEl:h,toEl:s,fromEl:s}),ke("filter",i,{evt:r}),void(c&&r.cancelable&&r.preventDefault())}else if(O=O&&O.split(",").some(function(I){if(I=T(w,I.trim(),s,!1))return we({sortable:i,rootEl:I,name:"filter",targetEl:h,fromEl:s,toEl:s}),ke("filter",i,{evt:r}),!0}))return void(c&&r.cancelable&&r.preventDefault());u.handle&&!T(w,u.handle,s,!1)||this._prepareDragStart(r,b,h)}}},_prepareDragStart:function(r,i,s){var u,c=this,f=c.el,b=c.options,h=f.ownerDocument;s&&!k&&s.parentNode===f&&(u=A(s),te=f,re=(k=s).parentNode,ct=k.nextSibling,zt=s,Ot=b.group,dt={target:L.dragged=k,clientX:(i||r).clientX,clientY:(i||r).clientY},ai=dt.clientX-u.left,si=dt.clientY-u.top,this._lastX=(i||r).clientX,this._lastY=(i||r).clientY,k.style["will-change"]="all",u=function(){ke("delayEnded",c,{evt:r}),L.eventCanceled?c._onDrop():(c._disableDelayedDragEvents(),!y&&c.nativeDraggable&&(k.draggable=!0),c._triggerDragStart(r,i),we({sortable:c,name:"choose",originalEvent:r}),M(k,b.chosenClass,!0))},b.ignore.split(",").forEach(function(w){Y(k,w.trim(),tr)}),S(h,"dragover",Ht),S(h,"mousemove",Ht),S(h,"touchmove",Ht),S(h,"mouseup",c._onDrop),S(h,"touchend",c._onDrop),S(h,"touchcancel",c._onDrop),y&&this.nativeDraggable&&(this.options.touchStartThreshold=4,k.draggable=!0),ke("delayStart",this,{evt:r}),!b.delay||b.delayOnTouchOnly&&!i||this.nativeDraggable&&(_||m)?u():L.eventCanceled?this._onDrop():(S(h,"mouseup",c._disableDelayedDrag),S(h,"touchend",c._disableDelayedDrag),S(h,"touchcancel",c._disableDelayedDrag),S(h,"mousemove",c._delayedDragTouchMoveHandler),S(h,"touchmove",c._delayedDragTouchMoveHandler),b.supportPointer&&S(h,"pointermove",c._delayedDragTouchMoveHandler),c._dragStartTimer=setTimeout(u,b.delay)))},_delayedDragTouchMoveHandler:function(r){r=r.touches?r.touches[0]:r,Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){k&&tr(k),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var r=this.el.ownerDocument;E(r,"mouseup",this._disableDelayedDrag),E(r,"touchend",this._disableDelayedDrag),E(r,"touchcancel",this._disableDelayedDrag),E(r,"mousemove",this._delayedDragTouchMoveHandler),E(r,"touchmove",this._delayedDragTouchMoveHandler),E(r,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(r,i){i=i||r.pointerType=="touch"&&r,!this.nativeDraggable||i?this.options.supportPointer?S(document,"pointermove",this._onTouchMove):S(document,i?"touchmove":"mousemove",this._onTouchMove):(S(k,"dragend",this),S(te,"dragstart",this._onDragStart));try{document.selection?sn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(s){}},_dragStarted:function(r,i){var s;ro=!1,te&&k?(ke("dragStarted",this,{evt:i}),this.nativeDraggable&&S(document,"dragover",Vs),s=this.options,r||M(k,s.dragClass,!1),M(k,s.ghostClass,!0),L.active=this,r&&this._appendGhost(),we({sortable:this,name:"start",originalEvent:i})):this._nulling()},_emulateDragOver:function(){if(qe){this._lastX=qe.clientX,this._lastY=qe.clientY,pi();for(var r=document.elementFromPoint(qe.clientX,qe.clientY),i=r;r&&r.shadowRoot&&(r=r.shadowRoot.elementFromPoint(qe.clientX,qe.clientY))!==i;)i=r;if(k.parentNode[fe]._isOutsideThisEl(r),i)do if(i[fe]&&i[fe]._onDragOver({clientX:qe.clientX,clientY:qe.clientY,target:r,rootEl:i})&&!this.options.dragoverBubble)break;while(i=(r=i).parentNode);mi()}},_onTouchMove:function(r){if(dt){var f=this.options,i=f.fallbackTolerance,s=f.fallbackOffset,u=r.touches?r.touches[0]:r,c=F&&B(F,!0),b=F&&c&&c.a,h=F&&c&&c.d,f=rn&&Ae&&at(Ae),b=(u.clientX-dt.clientX+s.x)/(b||1)+(f?f[0]-Zn[0]:0)/(b||1),h=(u.clientY-dt.clientY+s.y)/(h||1)+(f?f[1]-Zn[1]:0)/(h||1);if(!L.active&&!ro){if(i&&Math.max(Math.abs(u.clientX-this._lastX),Math.abs(u.clientY-this._lastY))<i)return;this._onDragStart(r,!0)}F&&(c?(c.e+=b-(oo||0),c.f+=h-(Qn||0)):c={a:1,b:0,c:0,d:1,e:b,f:h},c="matrix(".concat(c.a,",").concat(c.b,",").concat(c.c,",").concat(c.d,",").concat(c.e,",").concat(c.f,")"),x(F,"webkitTransform",c),x(F,"mozTransform",c),x(F,"msTransform",c),x(F,"transform",c),oo=b,Qn=h,qe=u),r.cancelable&&r.preventDefault()}},_appendGhost:function(){if(!F){var r=this.options.fallbackOnBody?document.body:te,i=A(k,!0,rn,!0,r),s=this.options;if(rn){for(Ae=r;x(Ae,"position")==="static"&&x(Ae,"transform")==="none"&&Ae!==document;)Ae=Ae.parentNode;Ae!==document.body&&Ae!==document.documentElement?(Ae===document&&(Ae=U()),i.top+=Ae.scrollTop,i.left+=Ae.scrollLeft):Ae=U(),Zn=at(Ae)}M(F=k.cloneNode(!0),s.ghostClass,!1),M(F,s.fallbackClass,!0),M(F,s.dragClass,!0),x(F,"transition",""),x(F,"transform",""),x(F,"box-sizing","border-box"),x(F,"margin",0),x(F,"top",i.top),x(F,"left",i.left),x(F,"width",i.width),x(F,"height",i.height),x(F,"opacity","0.8"),x(F,"position",rn?"absolute":"fixed"),x(F,"zIndex","100000"),x(F,"pointerEvents","none"),L.ghost=F,r.appendChild(F),x(F,"transform-origin",ai/parseInt(F.style.width)*100+"% "+si/parseInt(F.style.height)*100+"%")}},_onDragStart:function(r,i){var s=this,u=r.dataTransfer,c=s.options;ke("dragStart",this,{evt:r}),L.eventCanceled?this._onDrop():(ke("setupClone",this),L.eventCanceled||((ie=St(k)).removeAttribute("id"),ie.draggable=!1,ie.style["will-change"]="",this._hideClone(),M(ie,this.options.chosenClass,!1),L.clone=ie),s.cloneId=sn(function(){ke("clone",s),L.eventCanceled||(s.options.removeCloneOnHide||te.insertBefore(ie,k),s._hideClone(),we({sortable:s,name:"clone"}))}),i||M(k,c.dragClass,!0),i?(Zo=!0,s._loopId=setInterval(s._emulateDragOver,50)):(E(document,"mouseup",s._onDrop),E(document,"touchend",s._onDrop),E(document,"touchcancel",s._onDrop),u&&(u.effectAllowed="move",c.setData&&c.setData.call(s,u,k)),S(document,"drop",s),x(k,"transform","translateZ(0)")),ro=!0,s._dragStartId=sn(s._dragStarted.bind(s,i,r)),S(document,"selectstart",s),go=!0,g&&x(document.body,"user-select","none"))},_onDragOver:function(r){var i,s,u,c,f,b=this.el,h=r.target,w=this.options,O=w.group,I=L.active,q=Ot===O,se=w.sort,V=Oe||I,j=this,Z=!1;if(!er){if(r.preventDefault!==void 0&&r.cancelable&&r.preventDefault(),h=T(h,w.draggable,b,!0),gt("dragOver"),L.eventCanceled)return Z;if(k.contains(r.target)||h.animated&&h.animatingX&&h.animatingY||j._ignoreWhileAnimating===h)return pt(!1);if(Zo=!1,I&&!w.disabled&&(q?se||(s=re!==te):Oe===this||(this.lastPutMode=Ot.checkPull(this,I,k,r))&&O.checkPut(this,I,k,r))){if(u=this._getDirection(r,h)==="vertical",i=A(k),gt("dragOverValid"),L.eventCanceled)return Z;if(s)return re=te,$t(),this._hideClone(),gt("revert"),L.eventCanceled||(ct?te.insertBefore(k,ct):te.appendChild(k)),pt(!0);var le=ye(b,w.draggable);if(le&&(J=r,O=u,ue=A(ye((ne=this).el,ne.options.draggable)),ne=Q(ne.el),!(O?J.clientX>ne.right+10||J.clientY>ue.bottom&&J.clientX>ue.left:J.clientY>ne.bottom+10||J.clientX>ue.right&&J.clientY>ue.top)||le.animated)){if(le&&(c=r,f=u,ce=A(Se((He=this).el,0,He.options,!0)),He=Q(He.el),f?c.clientX<He.left-10||c.clientY<ce.top&&c.clientX<ce.right:c.clientY<He.top-10||c.clientY<ce.bottom&&c.clientX<ce.left)){var Re=Se(b,0,w,!0);if(Re===k)return pt(!1);if(Xe=A(h=Re),an(te,b,k,i,h,Xe,r,!1)!==!1)return $t(),b.insertBefore(k,Re),re=b,mn(),pt(!0)}else if(h.parentNode===b){var K,ot,Dt,Xe=A(h),ne=k.parentNode!==b,J=(J=k.animated&&k.toRect||i,ue=h.animated&&h.toRect||Xe,He=(f=u)?J.left:J.top,c=f?J.right:J.bottom,ce=f?J.width:J.height,Re=f?ue.left:ue.top,J=f?ue.right:ue.bottom,ue=f?ue.width:ue.height,!(He===Re||c===J||He+ce/2===Re+ue/2)),He=u?"top":"left",ce=_e(h,"top","top")||_e(k,"top","top"),Re=ce?ce.scrollTop:void 0;if(no!==h&&(ot=Xe[He],bo=!1,tn=!J&&w.invertSwap||ne),(K=function(Tt,fn,mt,bt,ur,hn,gi,Ks){var vt=bt?Tt.clientY:Tt.clientX,Mt=bt?mt.height:mt.width,Tt=bt?mt.top:mt.left,bt=bt?mt.bottom:mt.right,mt=!1;if(!gi){if(Ks&&Qo<Mt*ur){if(bo=!bo&&(vo===1?Tt+Mt*hn/2<vt:vt<bt-Mt*hn/2)?!0:bo)mt=!0;else if(vo===1?vt<Tt+Qo:bt-Qo<vt)return-vo}else if(Tt+Mt*(1-ur)/2<vt&&vt<bt-Mt*(1-ur)/2)return function(Js){return G(k)<G(Js)?1:-1}(fn)}return(mt=mt||gi)&&(vt<Tt+Mt*hn/2||bt-Mt*hn/2<vt)?Tt+Mt/2<vt?1:-1:0}(r,h,Xe,u,J?1:w.swapThreshold,w.invertedSwapThreshold==null?w.swapThreshold:w.invertedSwapThreshold,tn,no===h))!==0)for(var pn=G(k);(Dt=re.children[pn-=K])&&(x(Dt,"display")==="none"||Dt===F););if(K===0||Dt===h)return pt(!1);vo=K;var ue=(no=h).nextElementSibling,ne=!1,J=an(te,b,k,i,h,Xe,r,ne=K===1);if(J!==!1)return J!==1&&J!==-1||(ne=J===1),er=!0,setTimeout(Xs,30),$t(),ne&&!ue?b.appendChild(k):h.parentNode.insertBefore(k,ne?ue:h),ce&&st(ce,0,Re-ce.scrollTop),re=k.parentNode,ot===void 0||tn||(Qo=Math.abs(ot-A(h)[He])),mn(),pt(!0)}}else{if(le===k)return pt(!1);if((h=le&&b===r.target?le:h)&&(Xe=A(h)),an(te,b,k,i,h,Xe,r,!!h)!==!1)return $t(),le&&le.nextSibling?b.insertBefore(k,le.nextSibling):b.appendChild(k),re=b,mn(),pt(!0)}if(b.contains(k))return pt(!1)}return!1}function gt(So,Ys){ke(So,j,t({evt:r,isOwner:q,axis:u?"vertical":"horizontal",revert:s,dragRect:i,targetRect:Xe,canSort:se,fromSortable:V,target:h,completed:pt,onMove:function(fn,Gs){return an(te,b,k,i,fn,A(fn),r,Gs)},changed:mn},Ys))}function $t(){gt("dragOverAnimationCapture"),j.captureAnimationState(),j!==V&&V.captureAnimationState()}function pt(So){return gt("dragOverCompleted",{insertion:So}),So&&(q?I._hideClone():I._showClone(j),j!==V&&(M(k,(Oe||I).options.ghostClass,!1),M(k,w.ghostClass,!0)),Oe!==j&&j!==L.active?Oe=j:j===L.active&&Oe&&(Oe=null),V===j&&(j._ignoreWhileAnimating=h),j.animateAll(function(){gt("dragOverAnimationComplete"),j._ignoreWhileAnimating=null}),j!==V&&(V.animateAll(),V._ignoreWhileAnimating=null)),(h===k&&!k.animated||h===b&&!h.animated)&&(no=null),w.dragoverBubble||r.rootEl||h===document||(k.parentNode[fe]._isOutsideThisEl(r.target),So||Ht(r)),!w.dragoverBubble&&r.stopPropagation&&r.stopPropagation(),Z=!0}function mn(){Pe=G(k),Ze=G(k,w.draggable),we({sortable:j,name:"change",toEl:b,newIndex:Pe,newDraggableIndex:Ze,originalEvent:r})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",Ht),E(document,"mousemove",Ht),E(document,"touchmove",Ht)},_offUpEvents:function(){var r=this.el.ownerDocument;E(r,"mouseup",this._onDrop),E(r,"touchend",this._onDrop),E(r,"pointerup",this._onDrop),E(r,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(r){var i=this.el,s=this.options;Pe=G(k),Ze=G(k,s.draggable),ke("drop",this,{evt:r}),re=k&&k.parentNode,Pe=G(k),Ze=G(k,s.draggable),L.eventCanceled||(bo=tn=ro=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),or(this.cloneId),or(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(i,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),g&&x(document.body,"user-select",""),x(k,"transform",""),r&&(go&&(r.cancelable&&r.preventDefault(),s.dropBubble||r.stopPropagation()),F&&F.parentNode&&F.parentNode.removeChild(F),(te===re||Oe&&Oe.lastPutMode!=="clone")&&ie&&ie.parentNode&&ie.parentNode.removeChild(ie),k&&(this.nativeDraggable&&E(k,"dragend",this),tr(k),k.style["will-change"]="",go&&!ro&&M(k,(Oe||this).options.ghostClass,!1),M(k,this.options.chosenClass,!1),we({sortable:this,name:"unchoose",toEl:re,newIndex:null,newDraggableIndex:null,originalEvent:r}),te!==re?(0<=Pe&&(we({rootEl:re,name:"add",toEl:re,fromEl:te,originalEvent:r}),we({sortable:this,name:"remove",toEl:re,originalEvent:r}),we({rootEl:re,name:"sort",toEl:re,fromEl:te,originalEvent:r}),we({sortable:this,name:"sort",toEl:re,originalEvent:r})),Oe&&Oe.save()):Pe!==Fe&&0<=Pe&&(we({sortable:this,name:"update",toEl:re,originalEvent:r}),we({sortable:this,name:"sort",toEl:re,originalEvent:r})),L.active&&(Pe!=null&&Pe!==-1||(Pe=Fe,Ze=Pt),we({sortable:this,name:"end",toEl:re,originalEvent:r}),this.save())))),this._nulling()},_nulling:function(){ke("nulling",this),te=k=re=F=ct=ie=zt=ut=dt=qe=go=Pe=Ze=Fe=Pt=no=vo=Oe=Ot=L.dragged=L.ghost=L.clone=L.active=null,on.forEach(function(r){r.checked=!0}),on.length=oo=Qn=0},handleEvent:function(r){switch(r.type){case"drop":case"dragend":this._onDrop(r);break;case"dragenter":case"dragover":k&&(this._onDragOver(r),function(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}(r));break;case"selectstart":r.preventDefault()}},toArray:function(){for(var r,i=[],s=this.el.children,u=0,c=s.length,f=this.options;u<c;u++)T(r=s[u],f.draggable,this.el,!1)&&i.push(r.getAttribute(f.dataIdAttr)||function(b){for(var h=b.tagName+b.className+b.src+b.href+b.textContent,w=h.length,O=0;w--;)O+=h.charCodeAt(w);return O.toString(36)}(r));return i},sort:function(r,i){var s={},u=this.el;this.toArray().forEach(function(c,f){f=u.children[f],T(f,this.options.draggable,u,!1)&&(s[c]=f)},this),i&&this.captureAnimationState(),r.forEach(function(c){s[c]&&(u.removeChild(s[c]),u.appendChild(s[c]))}),i&&this.animateAll()},save:function(){var r=this.options.store;r&&r.set&&r.set(this)},closest:function(r,i){return T(r,i||this.options.draggable,this.el,!1)},option:function(r,i){var s=this.options;if(i===void 0)return s[r];var u=lt.modifyOption(this,r,i);s[r]=u!==void 0?u:i,r==="group"&&di(s)},destroy:function(){ke("destroy",this);var r=this.el;r[fe]=null,E(r,"mousedown",this._onTapStart),E(r,"touchstart",this._onTapStart),E(r,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(r,"dragover",this),E(r,"dragenter",this)),Array.prototype.forEach.call(r.querySelectorAll("[draggable]"),function(i){i.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),en.splice(en.indexOf(this.el),1),this.el=r=null},_hideClone:function(){ut||(ke("hideClone",this),L.eventCanceled||(x(ie,"display","none"),this.options.removeCloneOnHide&&ie.parentNode&&ie.parentNode.removeChild(ie),ut=!0))},_showClone:function(r){r.lastPutMode==="clone"?ut&&(ke("showClone",this),L.eventCanceled||(k.parentNode!=te||this.options.group.revertClone?ct?te.insertBefore(ie,ct):te.appendChild(ie):te.insertBefore(ie,k),this.options.group.revertClone&&this.animate(k,ie),x(ie,"display",""),ut=!1)):this._hideClone()}},nn&&S(document,"touchmove",function(r){(L.active||ro)&&r.cancelable&&r.preventDefault()}),L.utils={on:S,off:E,css:x,find:Y,is:function(r,i){return!!T(r,i,r,!1)},extend:function(r,i){if(r&&i)for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s]);return r},throttle:Lt,closest:T,toggleClass:M,clone:St,index:G,nextTick:sn,cancelNextTick:or,detectDirection:ui,getChild:Se},L.get=function(r){return r[fe]},L.mount=function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];(i=i[0].constructor===Array?i[0]:i).forEach(function(u){if(!u.prototype||!u.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(u));u.utils&&(L.utils=t(t({},L.utils),u.utils)),lt.mount(u)})},L.create=function(r,i){return new L(r,i)};var _o,nr,rr,ir,ln,yo,ge=[],ar=!(L.version="1.15.1");function cn(){ge.forEach(function(r){clearInterval(r.pid)}),ge=[]}function fi(){clearInterval(yo)}var et,sr=Lt(function(r,i,s,u){if(i.scroll){var c,f=(r.touches?r.touches[0]:r).clientX,b=(r.touches?r.touches[0]:r).clientY,h=i.scrollSensitivity,w=i.scrollSpeed,O=U(),I=!1;nr!==s&&(nr=s,cn(),_o=i.scroll,c=i.scrollFn,_o===!0&&(_o=pe(s,!0)));var q=0,se=_o;do{var V=se,ne=A(V),j=ne.top,Z=ne.bottom,le=ne.left,Re=ne.right,K=ne.width,ot=ne.height,Dt=void 0,pn=void 0,Xe=V.scrollWidth,He=V.scrollHeight,ce=x(V),ue=V.scrollLeft,ne=V.scrollTop,pn=V===O?(Dt=K<Xe&&(ce.overflowX==="auto"||ce.overflowX==="scroll"||ce.overflowX==="visible"),ot<He&&(ce.overflowY==="auto"||ce.overflowY==="scroll"||ce.overflowY==="visible")):(Dt=K<Xe&&(ce.overflowX==="auto"||ce.overflowX==="scroll"),ot<He&&(ce.overflowY==="auto"||ce.overflowY==="scroll")),ue=Dt&&(Math.abs(Re-f)<=h&&ue+K<Xe)-(Math.abs(le-f)<=h&&!!ue),ne=pn&&(Math.abs(Z-b)<=h&&ne+ot<He)-(Math.abs(j-b)<=h&&!!ne);if(!ge[q])for(var J=0;J<=q;J++)ge[J]||(ge[J]={});ge[q].vx==ue&&ge[q].vy==ne&&ge[q].el===V||(ge[q].el=V,ge[q].vx=ue,ge[q].vy=ne,clearInterval(ge[q].pid),ue==0&&ne==0||(I=!0,ge[q].pid=setInterval(function(){u&&this.layer===0&&L.active._onTouchMove(ln);var gt=ge[this.layer].vy?ge[this.layer].vy*w:0,$t=ge[this.layer].vx?ge[this.layer].vx*w:0;typeof c=="function"&&c.call(L.dragged.parentNode[fe],$t,gt,r,ln,ge[this.layer].el)!=="continue"||st(ge[this.layer].el,$t,gt)}.bind({layer:q}),24))),q++}while(i.bubbleScroll&&se!==O&&(se=pe(se,!1)));ar=I}},30),wo=function(h){var i=h.originalEvent,s=h.putSortable,u=h.dragEl,c=h.activeSortable,f=h.dispatchSortableEvent,b=h.hideGhostForTarget,h=h.unhideGhostForTarget;i&&(c=s||c,b(),i=i.changedTouches&&i.changedTouches.length?i.changedTouches[0]:i,i=document.elementFromPoint(i.clientX,i.clientY),h(),c&&!c.el.contains(i)&&(f("spill"),this.onSpill({dragEl:u,putSortable:s})))};function lr(){}function cr(){}lr.prototype={startIndex:null,dragStart:function(r){r=r.oldDraggableIndex,this.startIndex=r},onSpill:function(r){var i=r.dragEl,s=r.putSortable;this.sortable.captureAnimationState(),s&&s.captureAnimationState(),r=Se(this.sortable.el,this.startIndex,this.options),r?this.sortable.el.insertBefore(i,r):this.sortable.el.appendChild(i),this.sortable.animateAll(),s&&s.animateAll()},drop:wo},n(lr,{pluginName:"revertOnSpill"}),cr.prototype={onSpill:function(s){var i=s.dragEl,s=s.putSortable||this.sortable;s.captureAnimationState(),i.parentNode&&i.parentNode.removeChild(i),s.animateAll()},drop:wo},n(cr,{pluginName:"removeOnSpill"});var xo,tt,oe,Co,un,$=[],Ve=[],Eo=!1,Be=!1,io=!1;function hi(r,i){Ve.forEach(function(s,u){u=i.children[s.sortableIndex+(r?Number(u):0)],u?i.insertBefore(s,u):i.appendChild(s)})}function dn(){$.forEach(function(r){r!==oe&&r.parentNode&&r.parentNode.removeChild(r)})}return L.mount(new function(){function r(){for(var i in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this))}return r.prototype={dragStarted:function(i){i=i.originalEvent,this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):this.options.supportPointer?S(document,"pointermove",this._handleFallbackAutoScroll):i.touches?S(document,"touchmove",this._handleFallbackAutoScroll):S(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(i){i=i.originalEvent,this.options.dragOverBubble||i.rootEl||this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):(E(document,"pointermove",this._handleFallbackAutoScroll),E(document,"touchmove",this._handleFallbackAutoScroll),E(document,"mousemove",this._handleFallbackAutoScroll)),fi(),cn(),clearTimeout(H),H=void 0},nulling:function(){ln=nr=_o=ar=yo=rr=ir=null,ge.length=0},_handleFallbackAutoScroll:function(i){this._handleAutoScroll(i,!0)},_handleAutoScroll:function(i,s){var u,c=this,f=(i.touches?i.touches[0]:i).clientX,b=(i.touches?i.touches[0]:i).clientY,h=document.elementFromPoint(f,b);ln=i,s||this.options.forceAutoScrollFallback||_||m||g?(sr(i,this.options,h,s),u=pe(h,!0),!ar||yo&&f===rr&&b===ir||(yo&&fi(),yo=setInterval(function(){var w=pe(document.elementFromPoint(f,b),!0);w!==u&&(u=w,cn()),sr(i,c.options,w,s)},10),rr=f,ir=b)):this.options.bubbleScroll&&pe(h,!0)!==U()?sr(i,this.options,pe(h,!1),!1):cn()}},n(r,{pluginName:"scroll",initializeByDefault:!0})}),L.mount(cr,lr),L.mount(new function(){function r(){this.defaults={swapClass:"sortable-swap-highlight"}}return r.prototype={dragStart:function(i){i=i.dragEl,et=i},dragOverValid:function(i){var s=i.completed,u=i.target,c=i.onMove,f=i.activeSortable,b=i.changed,h=i.cancel;f.options.swap&&(i=this.sortable.el,f=this.options,u&&u!==i&&(i=et,et=c(u)!==!1?(M(u,f.swapClass,!0),u):null,i&&i!==et&&M(i,f.swapClass,!1)),b(),s(!0),h())},drop:function(i){var s,u,c=i.activeSortable,f=i.putSortable,b=i.dragEl,h=f||this.sortable,w=this.options;et&&M(et,w.swapClass,!1),et&&(w.swap||f&&f.options.swap)&&b!==et&&(h.captureAnimationState(),h!==c&&c.captureAnimationState(),u=et,i=(s=b).parentNode,w=u.parentNode,i&&w&&!i.isEqualNode(u)&&!w.isEqualNode(s)&&(f=G(s),b=G(u),i.isEqualNode(w)&&f<b&&b++,i.insertBefore(u,i.children[f]),w.insertBefore(s,w.children[b])),h.animateAll(),h!==c&&c.animateAll())},nulling:function(){et=null}},n(r,{pluginName:"swap",eventProperties:function(){return{swapItem:et}}})}),L.mount(new function(){function r(i){for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));i.options.avoidImplicitDeselect||(i.options.supportPointer?S(document,"pointerup",this._deselectMultiDrag):(S(document,"mouseup",this._deselectMultiDrag),S(document,"touchend",this._deselectMultiDrag))),S(document,"keydown",this._checkKeyDown),S(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(u,c){var f="";$.length&&tt===i?$.forEach(function(b,h){f+=(h?", ":"")+b.textContent}):f=c.textContent,u.setData("Text",f)}}}return r.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(i){i=i.dragEl,oe=i},delayEnded:function(){this.isMultiDrag=~$.indexOf(oe)},setupClone:function(u){var s=u.sortable,u=u.cancel;if(this.isMultiDrag){for(var c=0;c<$.length;c++)Ve.push(St($[c])),Ve[c].sortableIndex=$[c].sortableIndex,Ve[c].draggable=!1,Ve[c].style["will-change"]="",M(Ve[c],this.options.selectedClass,!1),$[c]===oe&&M(Ve[c],this.options.chosenClass,!1);s._hideClone(),u()}},clone:function(f){var s=f.sortable,u=f.rootEl,c=f.dispatchSortableEvent,f=f.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||$.length&&tt===s&&(hi(!0,u),c("clone"),f()))},showClone:function(c){var s=c.cloneNowShown,u=c.rootEl,c=c.cancel;this.isMultiDrag&&(hi(!1,u),Ve.forEach(function(f){x(f,"display","")}),s(),un=!1,c())},hideClone:function(c){var s=this,u=(c.sortable,c.cloneNowHidden),c=c.cancel;this.isMultiDrag&&(Ve.forEach(function(f){x(f,"display","none"),s.options.removeCloneOnHide&&f.parentNode&&f.parentNode.removeChild(f)}),u(),un=!0,c())},dragStartGlobal:function(i){i.sortable,!this.isMultiDrag&&tt&&tt.multiDrag._deselectMultiDrag(),$.forEach(function(s){s.sortableIndex=G(s)}),$=$.sort(function(s,u){return s.sortableIndex-u.sortableIndex}),io=!0},dragStarted:function(c){var s,u=this,c=c.sortable;this.isMultiDrag&&(this.options.sort&&(c.captureAnimationState(),this.options.animation&&($.forEach(function(f){f!==oe&&x(f,"position","absolute")}),s=A(oe,!1,!0,!0),$.forEach(function(f){f!==oe&&to(f,s)}),Eo=Be=!0)),c.animateAll(function(){Eo=Be=!1,u.options.animation&&$.forEach(function(f){ft(f)}),u.options.sort&&dn()}))},dragOver:function(c){var s=c.target,u=c.completed,c=c.cancel;Be&&~$.indexOf(s)&&(u(!1),c())},revert:function(i){var s,u,c=i.fromSortable,f=i.rootEl,b=i.sortable,h=i.dragRect;1<$.length&&($.forEach(function(w){b.addAnimationState({target:w,rect:Be?A(w):h}),ft(w),w.fromRect=h,c.removeAnimationState(w)}),Be=!1,s=!this.options.removeCloneOnHide,u=f,$.forEach(function(w,O){O=u.children[w.sortableIndex+(s?Number(O):0)],O?u.insertBefore(w,O):u.appendChild(w)}))},dragOverCompleted:function(O){var s,u=O.sortable,c=O.isOwner,f=O.insertion,b=O.activeSortable,h=O.parentEl,w=O.putSortable,O=this.options;f&&(c&&b._hideClone(),Eo=!1,O.animation&&1<$.length&&(Be||!c&&!b.options.sort&&!w)&&(s=A(oe,!1,!0,!0),$.forEach(function(I){I!==oe&&(to(I,s),h.appendChild(I))}),Be=!0),c||(Be||dn(),1<$.length?(c=un,b._showClone(u),b.options.animation&&!un&&c&&Ve.forEach(function(I){b.addAnimationState({target:I,rect:Co}),I.fromRect=Co,I.thisAnimationDuration=null})):b._showClone(u)))},dragOverAnimationCapture:function(c){var s=c.dragRect,u=c.isOwner,c=c.activeSortable;$.forEach(function(f){f.thisAnimationDuration=null}),c.options.animation&&!u&&c.multiDrag.isMultiDrag&&(Co=n({},s),s=B(oe,!0),Co.top-=s.f,Co.left-=s.e)},dragOverAnimationComplete:function(){Be&&(Be=!1,dn())},drop:function(i){var s=i.originalEvent,u=i.rootEl,c=i.parentEl,f=i.sortable,b=i.dispatchSortableEvent,h=i.oldIndex,w=i.putSortable,O=w||this.sortable;if(s){var I,q,se,V=this.options,j=c.children;if(!io)if(V.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),M(oe,V.selectedClass,!~$.indexOf(oe)),~$.indexOf(oe))$.splice($.indexOf(oe),1),xo=null,Ue({sortable:f,rootEl:u,name:"deselect",targetEl:oe,originalEvent:s});else{if($.push(oe),Ue({sortable:f,rootEl:u,name:"select",targetEl:oe,originalEvent:s}),s.shiftKey&&xo&&f.el.contains(xo)){var Z=G(xo),i=G(oe);if(~Z&&~i&&Z!==i)for(var le,Re=Z<i?(le=Z,i):(le=i,Z+1);le<Re;le++)~$.indexOf(j[le])||(M(j[le],V.selectedClass,!0),$.push(j[le]),Ue({sortable:f,rootEl:u,name:"select",targetEl:j[le],originalEvent:s}))}else xo=oe;tt=O}io&&this.isMultiDrag&&(Be=!1,(c[fe].options.sort||c!==u)&&1<$.length&&(I=A(oe),q=G(oe,":not(."+this.options.selectedClass+")"),!Eo&&V.animation&&(oe.thisAnimationDuration=null),O.captureAnimationState(),Eo||(V.animation&&(oe.fromRect=I,$.forEach(function(K){var ot;K.thisAnimationDuration=null,K!==oe&&(ot=Be?A(K):I,K.fromRect=ot,O.addAnimationState({target:K,rect:ot}))})),dn(),$.forEach(function(K){j[q]?c.insertBefore(K,j[q]):c.appendChild(K),q++}),h===G(oe)&&(se=!1,$.forEach(function(K){K.sortableIndex!==G(K)&&(se=!0)}),se&&(b("update"),b("sort")))),$.forEach(function(K){ft(K)}),O.animateAll()),tt=O),(u===c||w&&w.lastPutMode!=="clone")&&Ve.forEach(function(K){K.parentNode&&K.parentNode.removeChild(K)})}},nullingGlobal:function(){this.isMultiDrag=io=!1,Ve.length=0},destroyGlobal:function(){this._deselectMultiDrag(),E(document,"pointerup",this._deselectMultiDrag),E(document,"mouseup",this._deselectMultiDrag),E(document,"touchend",this._deselectMultiDrag),E(document,"keydown",this._checkKeyDown),E(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(i){if(!(io!==void 0&&io||tt!==this.sortable||i&&T(i.target,this.options.draggable,this.sortable.el,!1)||i&&i.button!==0))for(;$.length;){var s=$[0];M(s,this.options.selectedClass,!1),$.shift(),Ue({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:s,originalEvent:i})}},_checkKeyDown:function(i){i.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(i){i.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},n(r,{pluginName:"multiDrag",utils:{select:function(i){var s=i.parentNode[fe];s&&s.options.multiDrag&&!~$.indexOf(i)&&(tt&&tt!==s&&(tt.multiDrag._deselectMultiDrag(),tt=s),M(i,s.options.selectedClass,!0),$.push(i))},deselect:function(i){var s=i.parentNode[fe],u=$.indexOf(i);s&&s.options.multiDrag&&~u&&(M(i,s.options.selectedClass,!1),$.splice(u,1))}},eventProperties:function(){var i=this,s=[],u=[];return $.forEach(function(c){var f;s.push({multiDragElement:c,index:c.sortableIndex}),f=Be&&c!==oe?-1:Be?G(c,":not(."+i.options.selectedClass+")"):G(c),u.push({multiDragElement:c,index:f})}),{items:l($),clones:[].concat(Ve),oldIndicies:s,newIndicies:u}},optionListeners:{multiDragKey:function(i){return(i=i.toLowerCase())==="ctrl"?i="Control":1<i.length&&(i=i.charAt(0).toUpperCase()+i.substr(1)),i}}})}),L})});var ls=Po((jd,Tn)=>{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o=[],n=0;n<arguments.length;n++){var a=arguments[n];if(!!a){var l=typeof a;if(l==="string"||l==="number")o.push(a);else if(Array.isArray(a)){if(a.length){var d=t.apply(null,a);d&&o.push(d)}}else if(l==="object")if(a.toString===Object.prototype.toString)for(var p in a)e.call(a,p)&&a[p]&&o.push(p);else o.push(a.toString())}}return o.join(" ")}typeof Tn!="undefined"&&Tn.exports?(t.default=t,Tn.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var us=Po((Wd,cs)=>{"use strict";var ac=!0,Hr="Invariant failed";function sc(e,t){if(!e){if(ac)throw new Error(Hr);var o=typeof t=="function"?t():t,n=o?Hr+": "+o:Hr;throw new Error(n)}}cs.exports=sc});var vs=Po((Ud,We)=>{var lc=ss(),cc=ls(),Fo=Rr(),ds=us();function In(e){return e&&e.__esModule?e.default:e}function Ge(e,t,o,n){Object.defineProperty(e,t,{get:o,set:n,enumerable:!0,configurable:!0})}function uc(e,t){return Object.keys(t).forEach(function(o){o==="default"||o==="__esModule"||e.hasOwnProperty(o)||Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[o]}})}),e}Ge(We.exports,"Sortable",()=>$882b6d93070905b3$re_export$Sortable);Ge(We.exports,"Direction",()=>$882b6d93070905b3$re_export$Direction);Ge(We.exports,"DOMRect",()=>$882b6d93070905b3$re_export$DOMRect);Ge(We.exports,"GroupOptions",()=>$882b6d93070905b3$re_export$GroupOptions);Ge(We.exports,"MoveEvent",()=>$882b6d93070905b3$re_export$MoveEvent);Ge(We.exports,"Options",()=>$882b6d93070905b3$re_export$Options);Ge(We.exports,"PullResult",()=>$882b6d93070905b3$re_export$PullResult);Ge(We.exports,"PutResult",()=>$882b6d93070905b3$re_export$PutResult);Ge(We.exports,"SortableEvent",()=>$882b6d93070905b3$re_export$SortableEvent);Ge(We.exports,"SortableOptions",()=>$882b6d93070905b3$re_export$SortableOptions);Ge(We.exports,"Utils",()=>$882b6d93070905b3$re_export$Utils);Ge(We.exports,"ReactSortable",()=>Nn);function ms(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function dc(e,t,o){let n=e.children[o]||null;e.insertBefore(t,n)}function $r(e){e.forEach(t=>ms(t.element))}function ps(e){e.forEach(t=>{dc(t.parentElement,t.element,t.oldIndex)})}function Fr(e,t){let o=gs(e),n={parentElement:e.from},a=[];switch(o){case"normal":a=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":let p=je({element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex},n),m=je({element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex},n);a=[p,m];break;case"multidrag":a=e.oldIndicies.map((_,y)=>je({element:_.multiDragElement,oldIndex:_.index,newIndex:e.newIndicies[y].index},n));break}return mc(a,t)}function pc(e,t){let o=fs(e,t);return hs(e,o)}function fs(e,t){let o=[...t];return e.concat().reverse().forEach(n=>o.splice(n.oldIndex,1)),o}function hs(e,t,o,n){let a=[...t];return e.forEach(l=>{let d=n&&o&&n(l.item,o);a.splice(l.newIndex,0,d||l.item)}),a}function gs(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}function mc(e,t){return e.map(n=>Ft(je({},n),{item:t[n.oldIndex]})).sort((n,a)=>n.oldIndex-a.oldIndex)}function fc(e){let U=e,{list:t,setList:o,children:n,tag:a,style:l,className:d,clone:p,onAdd:m,onChange:_,onChoose:y,onClone:g,onEnd:D,onFilter:C,onRemove:S,onSort:E,onStart:N,onUnchoose:T,onUpdate:H,onMove:X,onSpill:M,onSelect:x,onDeselect:B}=U;return vn(U,["list","setList","children","tag","style","className","clone","onAdd","onChange","onChoose","onClone","onEnd","onFilter","onRemove","onSort","onStart","onUnchoose","onUpdate","onMove","onSpill","onSelect","onDeselect"])}var Ye={dragging:null},Nn=class extends Fo.Component{constructor(t){super(t),this.ref=(0,Fo.createRef)();let o=[...t.list].map(n=>Object.assign(n,{chosen:!1,selected:!1}));t.setList(o,this.sortable,Ye),In(ds)(!t.plugins,`
|
|
Plugins prop is no longer supported.
|
|
Instead, mount it with "Sortable.mount(new MultiDrag())"
|
|
Please read the updated README.md at https://github.com/SortableJS/react-sortablejs.
|
|
`)}componentDidMount(){if(this.ref.current===null)return;let t=this.makeOptions();In(lc).create(this.ref.current,t)}componentDidUpdate(t){t.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){let{tag:t,style:o,className:n,id:a}=this.props,l={style:o,className:n,id:a},d=!t||t===null?"div":t;return(0,Fo.createElement)(d,je({ref:this.ref},l),this.getChildren())}getChildren(){let{children:t,dataIdAttr:o,selectedClass:n="sortable-selected",chosenClass:a="sortable-chosen",dragClass:l="sortable-drag",fallbackClass:d="sortable-falback",ghostClass:p="sortable-ghost",swapClass:m="sortable-swap-highlight",filter:_="sortable-filter",list:y}=this.props;if(!t||t==null)return null;let g=o||"data-id";return Fo.Children.map(t,(D,C)=>{if(D===void 0)return;let S=y[C]||{},{className:E}=D.props,N=typeof _=="string"&&{[_.replace(".","")]:!!S.filtered},T=In(cc)(E,je({[n]:S.selected,[a]:S.chosen},N));return(0,Fo.cloneElement)(D,{[g]:D.key,className:T})})}get sortable(){let t=this.ref.current;if(t===null)return null;let o=Object.keys(t).find(n=>n.includes("Sortable"));return o?t[o]:null}makeOptions(){let t=["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"],o=["onChange","onClone","onFilter","onSort"],n=fc(this.props);t.forEach(l=>n[l]=this.prepareOnHandlerPropAndDOM(l)),o.forEach(l=>n[l]=this.prepareOnHandlerProp(l));let a=(l,d)=>{let{onMove:p}=this.props,m=l.willInsertAfter||-1;if(!p)return m;let _=p(l,d,this.sortable,Ye);return typeof _=="undefined"?!1:_};return Ft(je({},n),{onMove:a})}prepareOnHandlerPropAndDOM(t){return o=>{this.callOnHandlerProp(o,t),this[t](o)}}prepareOnHandlerProp(t){return o=>{this.callOnHandlerProp(o,t)}}callOnHandlerProp(t,o){let n=this.props[o];n&&n(t,this.sortable,Ye)}onAdd(t){let{list:o,setList:n,clone:a}=this.props,l=[...Ye.dragging.props.list],d=Fr(t,l);$r(d);let p=hs(d,o,t,a).map(m=>Object.assign(m,{selected:!1}));n(p,this.sortable,Ye)}onRemove(t){let{list:o,setList:n}=this.props,a=gs(t),l=Fr(t,o);ps(l);let d=[...o];if(t.pullMode!=="clone")d=fs(l,d);else{let p=l;switch(a){case"multidrag":p=l.map((m,_)=>Ft(je({},m),{element:t.clones[_]}));break;case"normal":p=l.map(m=>Ft(je({},m),{element:t.clone}));break;case"swap":default:In(ds)(!0,`mode "${a}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${a}" plugin`)}$r(p),l.forEach(m=>{let _=m.oldIndex,y=this.props.clone(m.item,t);d.splice(_,1,y)})}d=d.map(p=>Object.assign(p,{selected:!1})),n(d,this.sortable,Ye)}onUpdate(t){let{list:o,setList:n}=this.props,a=Fr(t,o);$r(a),ps(a);let l=pc(a,o);return n(l,this.sortable,Ye)}onStart(){Ye.dragging=this}onEnd(){Ye.dragging=null}onChoose(t){let{list:o,setList:n}=this.props,a=o.map((l,d)=>{let p=l;return d===t.oldIndex&&(p=Object.assign(l,{chosen:!0})),p});n(a,this.sortable,Ye)}onUnchoose(t){let{list:o,setList:n}=this.props,a=o.map((l,d)=>{let p=l;return d===t.oldIndex&&(p=Object.assign(p,{chosen:!1})),p});n(a,this.sortable,Ye)}onSpill(t){let{removeOnSpill:o,revertOnSpill:n}=this.props;o&&!n&&ms(t.item)}onSelect(t){let{list:o,setList:n}=this.props,a=o.map(l=>Object.assign(l,{selected:!1}));t.newIndicies.forEach(l=>{let d=l.index;if(d===-1){console.log(`"${t.type}" had indice of "${l.index}", which is probably -1 and doesn't usually happen here.`),console.log(t);return}a[d].selected=!0}),n(a,this.sortable,Ye)}onDeselect(t){let{list:o,setList:n}=this.props,a=o.map(l=>Object.assign(l,{selected:!1}));t.newIndicies.forEach(l=>{let d=l.index;d!==-1&&(a[d].selected=!0)}),n(a,this.sortable,Ye)}};wi(Nn,"defaultProps",{clone:t=>t});var hc={};uc(We.exports,hc)});var Jc={};mr(Jc,{default:()=>Gn});module.exports=fr(Jc);var Kn=require("obsidian");var rl=[{name:"Table",id:"editor:insert-table",icon:"table-2",mode:"any",triggerMode:"anywhere"},{name:"Callout",id:"editor:insert-callout",icon:"indent",mode:"any",triggerMode:"anywhere"},{name:"Code",id:"editor:insert-codeblock",icon:"terminal",mode:"any",triggerMode:"anywhere"},{name:"Math",id:"editor:insert-mathblock",icon:"percent",mode:"any",triggerMode:"anywhere"},{name:"Embed",id:"editor:insert-embed",icon:"sticky-note",mode:"any",triggerMode:"anywhere"},{name:"Attachment",id:"editor:attach-file",icon:"paperclip",mode:"any",triggerMode:"anywhere"},{name:"Property",id:"markdown:add-metadata-property",icon:"plus-circle",mode:"any",triggerMode:"anywhere"},{name:"Admonition",id:"obsidian-admonition:insert-admonition",icon:"indent",mode:"any",triggerMode:"anywhere"},{name:"Excalidraw",id:"obsidian-excalidraw-plugin:excalidraw-autocreate-and-embed-new-tab",icon:"image",mode:"any",triggerMode:"anywhere"},{name:"Task",id:"obsidian-tasks-plugin:edit-task",icon:"check-circle",mode:"any",triggerMode:"anywhere"},{name:"Template",id:"templater-obsidian:insert-templater",icon:"book-copy",mode:"any",triggerMode:"anywhere"},{name:"Citation",id:"zotlit:insert-markdown-citation",icon:"book-marked",mode:"desktop",triggerMode:"anywhere"}],bn={confirmDeletion:!0,showDescriptions:!1,showSourcesForDuplicates:!0,debug:!1,mainTrigger:"/",extraTriggers:[],useExtraTriggers:!1,triggerOnlyOnNewLine:!1,queryPattern:new RegExp("^(?<fullQuery>/(?<commandQuery>.*))","d"),bindings:rl},xi=["accessibility","activity","activity-square","air-vent","airplay","alarm-clock","alarm-clock-check","alarm-clock-off","alarm-minus","alarm-plus","album","alert-circle","alert-octagon","alert-triangle","align-center","align-center-horizontal","align-center-vertical","align-end-horizontal","align-end-vertical","align-horizontal-distribute-center","align-horizontal-distribute-end","align-horizontal-distribute-start","align-horizontal-justify-center","align-horizontal-justify-end","align-horizontal-justify-start","align-horizontal-space-around","align-horizontal-space-between","align-justify","align-left","align-right","align-start-horizontal","align-start-vertical","align-vertical-distribute-center","align-vertical-distribute-end","align-vertical-distribute-start","align-vertical-justify-center","align-vertical-justify-end","align-vertical-justify-start","align-vertical-space-around","align-vertical-space-between","ampersand","ampersands","anchor","angry","annoyed","antenna","aperture","app-window","apple","archive","archive-restore","archive-x","area-chart","armchair","arrow-big-down","arrow-big-down-dash","arrow-big-left","arrow-big-left-dash","arrow-big-right","arrow-big-right-dash","arrow-big-up","arrow-big-up-dash","arrow-down","arrow-down-0-1","arrow-down-1-0","arrow-down-a-z","arrow-down-circle","arrow-down-from-line","arrow-down-left","arrow-down-left-from-circle","arrow-down-left-square","arrow-down-narrow-wide","arrow-down-right","arrow-down-right-from-circle","arrow-down-right-square","arrow-down-square","arrow-down-to-dot","arrow-down-to-line","arrow-down-up","arrow-down-wide-narrow","arrow-down-z-a","arrow-left","arrow-left-circle","arrow-left-from-line","arrow-left-right","arrow-left-square","arrow-left-to-line","arrow-right","arrow-right-circle","arrow-right-from-line","arrow-right-left","arrow-right-square","arrow-right-to-line","arrow-up","arrow-up-0-1","arrow-up-1-0","arrow-up-a-z","arrow-up-circle","arrow-up-down","arrow-up-from-dot","arrow-up-from-line","arrow-up-left","arrow-up-left-from-circle","arrow-up-left-square","arrow-up-narrow-wide","arrow-up-right","arrow-up-right-from-circle","arrow-up-right-square","arrow-up-square","arrow-up-to-line","arrow-up-wide-narrow","arrow-up-z-a","arrows-up-from-line","asterisk","at-sign","atom","award","axe","axis-3d","baby","backpack","badge","badge-alert","badge-cent","badge-check","badge-dollar-sign","badge-euro","badge-help","badge-indian-rupee","badge-info","badge-japanese-yen","badge-minus","badge-percent","badge-plus","badge-pound-sterling","badge-russian-ruble","badge-swiss-franc","badge-x","baggage-claim","ban","banana","banknote","bar-chart","bar-chart-2","bar-chart-3","bar-chart-4","bar-chart-big","bar-chart-horizontal","bar-chart-horizontal-big","barcode","baseline","bath","battery","battery-charging","battery-full","battery-low","battery-medium","battery-warning","beaker","bean","bean-off","bed","bed-double","bed-single","beef","beer","bell","bell-dot","bell-minus","bell-off","bell-plus","bell-ring","bike","binary","biohazard","bird","bitcoin","blinds","blocks","bluetooth","bluetooth-connected","bluetooth-off","bluetooth-searching","bold","bomb","bone","book","book-a","book-audio","book-check","book-copy","book-dashed","book-down","book-headphones","book-heart","book-image","book-key","book-lock","book-marked","book-minus","book-open","book-open-check","book-open-text","book-plus","book-text","book-type","book-up","book-up-2","book-user","book-x","bookmark","bookmark-check","bookmark-minus","bookmark-plus","bookmark-x","boom-box","bot","box","box-select","boxes","braces","brackets","brain","brain-circuit","brain-cog","briefcase","bring-to-front","brush","bug","bug-off","bug-play","building","building-2","bus","bus-front","cable","cable-car","cake","cake-slice","calculator","calendar","calendar-check","calendar-check-2","calendar-clock","calendar-days","calendar-heart","calendar-minus","calendar-off","calendar-plus","calendar-range","calendar-search","calendar-x","calendar-x-2","camera","camera-off","candlestick-chart","candy","candy-cane","candy-off","car","car-front","car-taxi-front","caravan","carrot","case-lower","case-sensitive","case-upper","cassette-tape","cast","castle","cat","check","check-check","check-circle","check-circle-2","check-square","check-square-2","chef-hat","cherry","chevron-down","chevron-down-circle","chevron-down-square","chevron-first","chevron-last","chevron-left","chevron-left-circle","chevron-left-square","chevron-right","chevron-right-circle","chevron-right-square","chevron-up","chevron-up-circle","chevron-up-square","chevrons-down","chevrons-down-up","chevrons-left","chevrons-left-right","chevrons-right","chevrons-right-left","chevrons-up","chevrons-up-down","chrome","church","cigarette","cigarette-off","circle","circle-dashed","circle-dollar-sign","circle-dot","circle-dot-dashed","circle-ellipsis","circle-equal","circle-off","circle-slash","circle-slash-2","circuit-board","citrus","clapperboard","clipboard","clipboard-check","clipboard-copy","clipboard-edit","clipboard-list","clipboard-paste","clipboard-signature","clipboard-type","clipboard-x","clock","clock-1","clock-10","clock-11","clock-12","clock-2","clock-3","clock-4","clock-5","clock-6","clock-7","clock-8","clock-9","cloud","cloud-cog","cloud-drizzle","cloud-fog","cloud-hail","cloud-lightning","cloud-moon","cloud-moon-rain","cloud-off","cloud-rain","cloud-rain-wind","cloud-snow","cloud-sun","cloud-sun-rain","cloudy","clover","club","code","code-2","codepen","codesandbox","coffee","cog","coins","columns","combine","command","compass","component","computer","concierge-bell","cone","construction","contact","contact-2","container","contrast","cookie","copy","copy-check","copy-minus","copy-plus","copy-slash","copy-x","copyleft","copyright","corner-down-left","corner-down-right","corner-left-down","corner-left-up","corner-right-down","corner-right-up","corner-up-left","corner-up-right","cpu","creative-commons","credit-card","croissant","crop","cross","crosshair","crown","cuboid","cup-soda","currency","cylinder","database","database-backup","database-zap","delete","dessert","diameter","diamond","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","dices","diff","disc","disc-2","disc-3","divide","divide-circle","divide-square","dna","dna-off","dog","dollar-sign","donut","door-closed","door-open","dot","download","download-cloud","drafting-compass","drama","dribbble","droplet","droplets","drumstick","dumbbell","ear","ear-off","edit","edit-2","edit-3","egg","egg-fried","egg-off","equal","equal-not","eraser","euro","expand","external-link","eye","eye-off","facebook","factory","fan","fast-forward","feather","ferris-wheel","figma","file","file-archive","file-audio","file-audio-2","file-axis-3d","file-badge","file-badge-2","file-bar-chart","file-bar-chart-2","file-box","file-check","file-check-2","file-clock","file-code","file-code-2","file-cog","file-cog-2","file-diff","file-digit","file-down","file-edit","file-heart","file-image","file-input","file-json","file-json-2","file-key","file-key-2","file-line-chart","file-lock","file-lock-2","file-minus","file-minus-2","file-output","file-pie-chart","file-plus","file-plus-2","file-question","file-scan","file-search","file-search-2","file-signature","file-spreadsheet","file-stack","file-symlink","file-terminal","file-text","file-type","file-type-2","file-up","file-video","file-video-2","file-volume","file-volume-2","file-warning","file-x","file-x-2","files","film","filter","filter-x","fingerprint","fish","fish-off","fish-symbol","flag","flag-off","flag-triangle-left","flag-triangle-right","flame","flame-kindling","flashlight","flashlight-off","flask-conical","flask-conical-off","flask-round","flip-horizontal","flip-horizontal-2","flip-vertical","flip-vertical-2","flower","flower-2","focus","fold-horizontal","fold-vertical","folder","folder-archive","folder-check","folder-clock","folder-closed","folder-cog","folder-cog-2","folder-dot","folder-down","folder-edit","folder-git","folder-git-2","folder-heart","folder-input","folder-kanban","folder-key","folder-lock","folder-minus","folder-open","folder-open-dot","folder-output","folder-plus","folder-root","folder-search","folder-search-2","folder-symlink","folder-sync","folder-tree","folder-up","folder-x","folders","footprints","forklift","form-input","forward","frame","framer","frown","fuel","fullscreen","function-square","gallery-horizontal","gallery-horizontal-end","gallery-thumbnails","gallery-vertical","gallery-vertical-end","gamepad","gamepad-2","gantt-chart","gantt-chart-square","gauge","gauge-circle","gavel","gem","ghost","gift","git-branch","git-branch-plus","git-commit-horizontal","git-commit-vertical","git-compare","git-compare-arrows","git-fork","git-graph","git-merge","git-pull-request","git-pull-request-arrow","git-pull-request-closed","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-draft","github","gitlab","glass-water","glasses","globe","globe-2","goal","grab","graduation-cap","grape","grid","grid-2x2","grid-3x3","grip","grip-horizontal","grip-vertical","group","hammer","hand","hand-metal","hard-drive","hard-drive-download","hard-drive-upload","hard-hat","hash","haze","hdmi-port","heading","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6","headphones","heart","heart-crack","heart-handshake","heart-off","heart-pulse","help-circle","helping-hand","hexagon","highlighter","history","home","hop","hop-off","hotel","hourglass","ice-cream","ice-cream-2","image","image-down","image-minus","image-off","image-plus","import","inbox","indent","indian-rupee","infinity","info","instagram","italic","iteration-ccw","iteration-cw","japanese-yen","joystick","kanban","kanban-square","kanban-square-dashed","key","key-round","key-square","keyboard","lamp","lamp-ceiling","lamp-desk","lamp-floor","lamp-wall-down","lamp-wall-up","land-plot","landmark","languages","laptop","laptop-2","lasso","lasso-select","laugh","layers","layers-2","layers-3","layout","layout-dashboard","layout-grid","layout-list","layout-panel-left","layout-panel-top","layout-template","leaf","leafy-green","library","library-big","library-square","life-buoy","ligature","lightbulb","lightbulb-off","line-chart","link","link-2","link-2-off","linkedin","list","list-checks","list-end","list-filter","list-minus","list-music","list-ordered","list-plus","list-restart","list-start","list-todo","list-tree","list-video","list-x","loader","loader-2","locate","locate-fixed","locate-off","lock","lock-keyhole","log-in","log-out","lollipop","luggage","m-square","magnet","mail","mail-check","mail-minus","mail-open","mail-plus","mail-question","mail-search","mail-warning","mail-x","mailbox","mails","map","map-pin","map-pin-off","map-pinned","martini","maximize","maximize-2","medal","megaphone","megaphone-off","meh","memory-stick","menu","menu-square","merge","message-circle","message-square","message-square-dashed","message-square-plus","messages-square","mic","mic-2","mic-off","microscope","microwave","milestone","milk","milk-off","minimize","minimize-2","minus","minus-circle","minus-square","monitor","monitor-check","monitor-dot","monitor-down","monitor-off","monitor-pause","monitor-play","monitor-smartphone","monitor-speaker","monitor-stop","monitor-up","monitor-x","moon","moon-star","more-horizontal","more-vertical","mountain","mountain-snow","mouse","mouse-pointer","mouse-pointer-2","mouse-pointer-click","mouse-pointer-square","mouse-pointer-square-dashed","move","move-3d","move-diagonal","move-diagonal-2","move-down","move-down-left","move-down-right","move-horizontal","move-left","move-right","move-up","move-up-left","move-up-right","move-vertical","music","music-2","music-3","music-4","navigation","navigation-2","navigation-2-off","navigation-off","network","newspaper","nfc","nut","nut-off","octagon","option","orbit","outdent","package","package-2","package-check","package-minus","package-open","package-plus","package-search","package-x","paint-bucket","paintbrush","paintbrush-2","palette","palmtree","panel-bottom","panel-bottom-close","panel-bottom-inactive","panel-bottom-open","panel-left","panel-left-close","panel-left-inactive","panel-left-open","panel-right","panel-right-close","panel-right-inactive","panel-right-open","panel-top","panel-top-close","panel-top-inactive","panel-top-open","paperclip","parentheses","parking-circle","parking-circle-off","parking-meter","parking-square","parking-square-off","party-popper","pause","pause-circle","pause-octagon","paw-print","pc-case","pen","pen-line","pen-square","pen-tool","pencil","pencil-line","pencil-ruler","pentagon","percent","percent-circle","percent-diamond","percent-square","person-standing","phone","phone-call","phone-forwarded","phone-incoming","phone-missed","phone-off","phone-outgoing","pi","pi-square","picture-in-picture","picture-in-picture-2","pie-chart","piggy-bank","pilcrow","pilcrow-square","pill","pin","pin-off","pipette","pizza","plane","plane-landing","plane-takeoff","play","play-circle","play-square","plug","plug-2","plug-zap","plug-zap-2","plus","plus-circle","plus-square","pocket","pocket-knife","podcast","pointer","popcorn","popsicle","pound-sterling","power","power-circle","power-off","power-square","presentation","printer","projector","puzzle","pyramid","qr-code","quote","rabbit","radar","radiation","radio","radio-receiver","radio-tower","radius","rail-symbol","rainbow","rat","ratio","receipt","rectangle-horizontal","rectangle-vertical","recycle","redo","redo-2","redo-dot","refresh-ccw","refresh-ccw-dot","refresh-cw","refresh-cw-off","refrigerator","regex","remove-formatting","repeat","repeat-1","repeat-2","replace","replace-all","reply","reply-all","rewind","ribbon","rocket","rocking-chair","roller-coaster","rotate-3d","rotate-ccw","rotate-cw","route","route-off","router","rows","rss","ruler","russian-ruble","sailboat","salad","sandwich","satellite","satellite-dish","save","save-all","scale","scale-3d","scaling","scan","scan-barcode","scan-eye","scan-face","scan-line","scan-search","scan-text","scatter-chart","school","school-2","scissors","scissors-line-dashed","scissors-square","scissors-square-dashed-bottom","screen-share","screen-share-off","scroll","scroll-text","search","search-check","search-code","search-large","search-slash","search-x","send","send-horizontal","send-to-back","separator-horizontal","separator-vertical","server","server-cog","server-crash","server-off","settings","settings-2","shapes","share","share-2","sheet","shell","shield","shield-alert","shield-ban","shield-check","shield-close","shield-ellipsis","shield-half","shield-minus","shield-off","shield-plus","shield-question","shield-x","ship","ship-wheel","shirt","shopping-bag","shopping-basket","shopping-cart","shovel","shower-head","shrink","shrub","shuffle","sigma","sigma-square","signal","signal-high","signal-low","signal-medium","signal-zero","signpost","signpost-big","siren","skip-back","skip-forward","skull","slack","slash","slice","sliders","sliders-horizontal","smartphone","smartphone-charging","smartphone-nfc","smile","smile-plus","snail","snowflake","sofa","sort-asc","sort-desc","soup","space","spade","sparkle","sparkles","speaker","speech","spell-check","spell-check-2","spline","split","split-square-horizontal","split-square-vertical","spray-can","sprout","square","square-asterisk","square-code","square-dashed-bottom","square-dashed-bottom-code","square-dot","square-equal","square-slash","square-stack","squirrel","stamp","star","star-half","star-off","step-back","step-forward","stethoscope","sticker","sticky-note","stop-circle","store","stretch-horizontal","stretch-vertical","strikethrough","subscript","subtitles","sun","sun-dim","sun-medium","sun-moon","sun-snow","sunrise","sunset","superscript","swiss-franc","switch-camera","sword","swords","syringe","table","table-2","table-properties","tablet","tablet-smartphone","tablets","tag","tags","tally-1","tally-2","tally-3","tally-4","tally-5","tangent","target","tent","tent-tree","terminal","terminal-square","test-tube","test-tube-2","test-tubes","text","text-cursor","text-cursor-input","text-quote","text-select","theater","thermometer","thermometer-snowflake","thermometer-sun","thumbs-down","thumbs-up","ticket","timer","timer-off","timer-reset","toggle-left","toggle-right","tornado","torus","touchpad","touchpad-off","tower-control","toy-brick","tractor","traffic-cone","train-front","train-front-tunnel","train-track","tram-front","trash","trash-2","tree-deciduous","tree-pine","trees","trello","trending-down","trending-up","triangle","triangle-right","trophy","truck","turtle","tv","tv-2","twitch","twitter","type","umbrella","umbrella-off","underline","undo","undo-2","undo-dot","unfold-horizontal","unfold-vertical","ungroup","unlink","unlink-2","unlock","unlock-keyhole","unplug","upload","upload-cloud","usb","user","user-2","user-check","user-check-2","user-circle","user-circle-2","user-cog","user-cog-2","user-minus","user-minus-2","user-plus","user-plus-2","user-square","user-square-2","user-x","user-x-2","users","users-2","utensils","utensils-crossed","utility-pole","variable","vegan","venetian-mask","verified","vibrate","vibrate-off","video","video-off","videotape","view","voicemail","volume","volume-1","volume-2","volume-x","vote","wallet","wallet-2","wallet-cards","wallpaper","wand","wand-2","warehouse","watch","waves","waypoints","webcam","webhook","weight","wheat","wheat-off","whole-word","wifi","wifi-off","wind","wine","wine-off","workflow","wrap-text","wrench","x","x-circle","x-octagon","x-square","youtube","zap","zap-off","zoom-in","zoom-out"];var vr=require("obsidian");var Ci={};var Ei={};var Si={};var ki={};var hr={"Open settings":"Open settings","Change icon":"Change icon",Rename:"Rename",Delete:"Delete",Add:"Add","Add command":"Add command","Add new":"Add new command","Choose a command to add":"Choose a command to add","to navigate":"to navigate","to choose an icon":"to choose an icon","to cancel":"to cancel","Use a custom name":"Use a custom name","Choose a custom name for your new command":"Choose a custom name for your new command","to save":"to save","Choose an icon for your new command":"Choose an icon for your new command","to choose a custom icon":"to choose a custom icon","Remove command":"Remove command","Double click to rename":"Double click to rename","This device":"This device","Added by {{plugin_name}}.":"Added by {{plugin_name}}.","Warning: This command might not run under every circumstance.":"Warning: This command might not run under every circumstance.","Move down":"Move down","Move up":"Move up","Change mode (Currently: {{current_mode}})":"Change mode (Currently: {{current_mode}})","Change trigger mode (Currently: {{current_mode}})":"Change trigger mode (Currently: {{current_mode}})",Anywhere:"Anywhere","Newline only":"Newline only","Inline only":"Inline only","Are you sure you want to delete the command?":"Are you sure you want to delete the command?","Remove and don't ask again":"Remove and don't ask again",Remove:"Remove",Cancel:"Cancel","Ask before removing":"Ask before removing","Always show a popup to confirm deletion of a command.":"Always show a popup to confirm deletion of a command.","Show command descriptions":"Show command descriptions","Always show command descriptions in editor suggestions.":"Always show command descriptions in editor suggestions.","Show command sources":"Show command sources","Show command sources in editor suggestions for duplicated command names.":"Show command sources in editor suggestions for duplicated command names.",General:"General",Bindings:"Bindings","Command trigger":"Command trigger","Characters to trigger slash commands.":"Characters to trigger slash commands.","More triggers":"More triggers","Add more command triggers.":"Add more command triggers","No commands here!":"No commands here!","Would you like to add one now?":"Would you like to add one now?","Choose new":"Choose new",Icon:"Icon",Name:"Name","Custom name":"Custom name","Add command to all devices":"Add command to all devices","Add command only to mobile devices":"Add command only to mobile devices","Add command only to desktop devices":"Add command only to desktop devices","Add command only to this device":"Add command only to this device","Show command on any triggering":"Show command on triggering","Show command on newline triggering":"Show command on newline triggering","Show command on inline triggering":"Show command on inline triggering",Done:"Done",Save:"Save","This command is not available on this device.":"This command is not available on this device.","Restore default":"Restore default","One of the command triggers conflicts with the 'Slash commands' plugin.":"One of the command triggers conflicts with the 'Slash commands' plugin.","Please modify your triggers or disable the above plugin, and then reload this setting tab to dismiss this warning.":"Please modify your triggers or disable the above plugin, and then reload this setting tab to dismiss this warning.","Only on new line":"Only on new line","Show slash commands only if the trigger is at the beginning of a line.":"Show slash commands only if the trigger is at the beginning of a line.","Open standalone menu":"Open standalone menu"};var Pi={};var Oi={};var Di={};var Mi={};var Ti={};var Ii={};var Ni={};var Ai={};var Ri={};var Li={};var zi={};var Hi={};var $i={};var Fi={};var qi={};var Bi={};var ji={"Open settings":"\u6253\u5F00\u8BBE\u7F6E","Change icon":"\u66F4\u6362\u56FE\u6807",Rename:"\u91CD\u547D\u540D",Delete:"\u5220\u9664",Add:"\u6DFB\u52A0","Add command":"\u6DFB\u52A0\u547D\u4EE4","Add new":"\u6DFB\u52A0\u65B0\u547D\u4EE4","Choose a command to add":"\u9009\u62E9\u4E00\u4E2A\u547D\u4EE4\u4EE5\u6DFB\u52A0","to navigate":"\u5BFC\u822A","to choose an icon":"\u9009\u62E9\u4E00\u4E2A\u56FE\u6807","to cancel":"\u53D6\u6D88","Use a custom name":"\u4F7F\u7528\u81EA\u5B9A\u4E49\u540D\u79F0","Choose a custom name for your new command":"\u7ED9\u4F60\u7684\u65B0\u547D\u4EE4\u9009\u4E00\u4E2A\u81EA\u5B9A\u4E49\u540D\u79F0","to save":"\u4FDD\u5B58","Choose an icon for your new command":"\u7ED9\u4F60\u7684\u65B0\u547D\u4EE4\u9009\u4E00\u4E2A\u56FE\u6807","to choose a custom icon":"\u9009\u62E9\u81EA\u5B9A\u4E49\u56FE\u6807","Remove command":"\u79FB\u9664\u547D\u4EE4","Double click to rename":"\u53CC\u51FB\u4EE5\u91CD\u547D\u540D","This device":"\u5F53\u524D\u8BBE\u5907","Added by {{plugin_name}}.":"\u7531{{plugin_name}}\u6DFB\u52A0\u3002","Warning: This command might not run under every circumstance.":"\u8B66\u544A\uFF1A\u8BE5\u547D\u4EE4\u4E5F\u8BB8\u53EA\u80FD\u7528\u4E8E\u67D0\u4E9B\u8BBE\u5907\u3002","Move down":"\u5411\u4E0B\u79FB\u52A8","Move up":"\u5411\u4E0A\u79FB\u52A8","Change mode (Currently: {{current_mode}})":"\u5207\u6362\u6A21\u5F0F\uFF08\u5F53\u524D\uFF1A{{current_mode}}\uFF09","Change trigger mode (Currently: {{current_mode}})":"\u5207\u6362\u89E6\u53D1\u6A21\u5F0F (\u5F53\u524D: {{current_mode}})",Anywhere:"\u4EFB\u4F55\u4F4D\u7F6E\u89E6\u53D1","Newline only":"\u4EC5\u65B0\u884C\u89E6\u53D1","Inline only":"\u4EC5\u884C\u5185\u89E6\u53D1","Are you sure you want to delete the command?":"\u771F\u7684\u8981\u79FB\u9664\u8BE5\u547D\u4EE4\u5417\uFF1F","Remove and don't ask again":"\u79FB\u9664\uFF0C\u4E0D\u8981\u518D\u95EE",Remove:"\u79FB\u9664",Cancel:"\u53D6\u6D88","Ask before removing":"\u79FB\u9664\u4E4B\u524D\u8BE2\u95EE","Always show a popup to confirm deletion of a command.":"\u79FB\u9664\u547D\u4EE4\u524D\u603B\u662F\u5F39\u7A97\u786E\u8BA4\u3002","Show command descriptions":"\u663E\u793A\u547D\u4EE4\u8BF4\u660E","Always show command descriptions in editor suggestions.":"\u5728\u7F16\u8F91\u5668\u7684\u5EFA\u8BAE\u547D\u4EE4\u4E2D\u663E\u793A\u8BF4\u660E\u3002","Show command sources":"\u663E\u793A\u547D\u4EE4\u6765\u6E90","Show command sources in editor suggestions for duplicated command names.":"\u4E3A\u76F8\u540C\u540D\u5B57\u7684\u547D\u4EE4\u663E\u793A\u6765\u6E90\u3002",General:"\u901A\u7528",Bindings:"\u7ED1\u5B9A\u547D\u4EE4","Command trigger":"\u547D\u4EE4\u89E6\u53D1\u7B26","Characters to trigger slash commands.":"\u7528\u4E8E\u89E6\u53D1\u659C\u6760\u547D\u4EE4\u7684\u5B57\u7B26\u3002","More triggers":"\u989D\u5916\u7684\u89E6\u53D1\u7B26","Add more command triggers.":"\u589E\u52A0\u989D\u5916\u7684\u547D\u4EE4\u89E6\u53D1\u7B26\u3002","No commands here!":"\u8FD8\u6CA1\u6709\u4EFB\u4F55\u547D\u4EE4\u3002","Would you like to add one now?":"\u73B0\u5728\u6DFB\u52A0\u547D\u4EE4\uFF1F","Choose new":"\u9009\u62E9\u65B0\u7684",Icon:"\u56FE\u6807",Name:"\u540D\u79F0","Custom name":"\u81EA\u5B9A\u4E49\u540D\u79F0","Add command to all devices":"\u5411\u6240\u6709\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to mobile devices":"\u53EA\u5411\u79FB\u52A8\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to desktop devices":"\u53EA\u5411\u684C\u9762\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to this device":"\u53EA\u5411\u5F53\u524D\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Show command on any triggering":"\u89E6\u53D1\u65F6\u663E\u793A\u547D\u4EE4","Show command on newline triggering":"\u5728\u65B0\u884C\u89E6\u53D1\u65F6\u663E\u793A\u547D\u4EE4","Show command on inline triggering":"\u5728\u884C\u5185\u89E6\u53D1\u65F6\u663E\u793A\u547D\u4EE4",Done:"\u5B8C\u6210",Save:"\u4FDD\u5B58","This command is not available on this device.":"\u8BE5\u547D\u4EE4\u5728\u5F53\u524D\u8BBE\u5907\u4E0D\u53EF\u7528\u3002","Restore default":"\u6062\u590D\u9ED8\u8BA4\u503C","One of the command triggers conflicts with the 'Slash commands' plugin.":"\u67D0\u4E2A\u547D\u4EE4\u89E6\u53D1\u7B26\u548C\u63D2\u4EF6\u201C\u659C\u6760\u547D\u4EE4\u201D\u51B2\u7A81\u3002","Please modify your triggers or disable the above plugin, and then reload this setting tab to dismiss this warning.":"\u8BF7\u4FEE\u6539\u547D\u4EE4\u89E6\u53D1\u7B26\u6216\u5173\u95ED\u4E0A\u8FF0\u63D2\u4EF6\uFF0C\u968F\u540E\u91CD\u65B0\u52A0\u8F7D\u8BE5\u8BBE\u7F6E\u9875\u9762\u4EE5\u6D88\u9664\u8B66\u544A\u4FE1\u606F\u3002","Only on new line":"\u4EC5\u7528\u4E8E\u65B0\u884C","Show slash commands only if the trigger is at the beginning of a line.":"\u4EC5\u5F53\u547D\u4EE4\u89E6\u53D1\u7B26\u4F4D\u4E8E\u884C\u9996\u624D\u4F1A\u89E6\u53D1\u659C\u6760\u547D\u4EE4\u3002","Open standalone menu":"\u6253\u5F00\u72EC\u7ACB\u7684\u9009\u5355\u3002"};var Wi={};var Ol={ar:Ci,cs:Ei,da:Si,de:ki,en:hr,"en-gb":Pi,es:Oi,fr:Di,hi:Mi,id:Ti,it:Ii,ja:Ni,ko:Ai,nl:Ri,nn:Li,pl:zi,pt:Hi,"pt-br":$i,ro:Fi,ru:qi,tr:Bi,"zh-cn":ji,"zh-tw":Wi},gr=Ol[vr.moment.locale()];function P(e){return gr||console.error("Error: dictionary locale not found",vr.moment.locale()),gr&&gr[e]||hr[e]}var An=require("obsidian");ve();ve();var xn=require("obsidian");var Io=class extends xn.FuzzySuggestModal{constructor(o){super(o.app);this.commands=Object.values(o.app.commands.commands),this.setPlaceholder(P("Choose a command to add")),this.setInstructions([{command:"\u2191\u2193",purpose:P("to navigate")},{command:"\u21B5",purpose:P("to choose an icon")},{command:"esc",purpose:P("to cancel")}])}async awaitSelection(){return this.open(),new Promise((o,n)=>{this.onChooseItem=a=>o(a),this.onClose=()=>window.setTimeout(()=>n("No Command selected"),0)})}renderSuggestion(o,n){if(n.addClass("mod-complex"),n.createDiv({cls:"suggestion-content"}).createDiv({cls:"suggestion-title"}).setText(o.item.name),o.item.icon){let l=n.createDiv({cls:"suggestion-aux"});(0,xn.setIcon)(l.createSpan({cls:"suggestion-flair"}),o.item.icon)}}getItems(){return this.commands}getItemText(o){return o.name}onChooseItem(o,n){}};var Cn=require("obsidian");var Bt=class extends Cn.FuzzySuggestModal{constructor(t){super(t.app),this.setPlaceholder(P("Choose an icon for your new command")),this.setInstructions([{command:"\u2191\u2193",purpose:P("to navigate")},{command:"\u21B5",purpose:P("to choose a custom icon")},{command:"esc",purpose:P("to cancel")}])}async awaitSelection(){return this.open(),new Promise((t,o)=>{this.onChooseItem=n=>t(n),this.onClose=()=>window.setTimeout(()=>o("No Icon selected"),0)})}renderSuggestion(t,o){o.addClass("mod-complex"),o.createDiv({cls:"suggestion-content"}).createDiv({cls:"suggestion-title"}).setText(t.item.replace(/-/g," ").replace(/(^\w{1})|(\s+\w{1})/g,l=>l.toUpperCase()));let a=o.createDiv({cls:"suggestion-aux"});(0,Cn.setIcon)(a.createSpan({cls:"suggestion-flair"}),t.item)}getItems(){return xi}getItemText(t){return t}onChooseItem(t,o){}};var la=require("obsidian");var No=class extends la.SuggestModal{constructor(o,n){super(o.app);this.defaultName=n;this.setPlaceholder(P("Use a custom name")),this.resultContainerEl.style.display="none",this.setInstructions([{command:"",purpose:P("Choose a custom name for your new command")},{command:"\u21B5",purpose:P("to save")},{command:"esc",purpose:P("to cancel")}])}onOpen(){var a;super.onOpen(),this.inputEl.value=this.defaultName;let o=createDiv({cls:"cmdr-name-input-wrapper"});(a=this.inputEl.parentNode)==null||a.insertBefore(o,this.inputEl),o.appendChild(this.inputEl),o.parentElement.style.display="block";let n=createEl("button",{text:P("Save"),cls:"mod-cta"});n.onclick=l=>this.selectSuggestion(this.inputEl.value,l),o.appendChild(n)}async awaitSelection(){return this.open(),new Promise((o,n)=>{this.onChooseSuggestion=a=>o(a),this.onClose=()=>window.setTimeout(()=>n("No Name selected"),0)})}getSuggestions(o){return[o]}renderSuggestion(o,n){}onChooseSuggestion(o,n){}};async function ca(e){let t=await new Io(e).awaitSelection(),o;t.hasOwnProperty("icon")||(o=await new Bt(e).awaitSelection());let n=await new No(e,t.name).awaitSelection();return{id:t.id,icon:o!=null?o:t.icon,name:n||t.name,mode:"any"}}function Ao(e,t){var o;return(o=e.app.commands.commands[t])!=null?o:null}function En(e,t){return!!Ao(t,e.id)||It(e)}function Sn(e,t){let{isMobile:o,appId:n}=e.app;return t==="any"||t===n||t==="mobile"&&o||t==="desktop"&&!o}function kn(e,t){let o=t.id.split(":").first(),n=e.app.plugins.manifests[o];return n?n.name:"Obsidian"}function ua(e,t){return e.settings.bindings.filter(({name:n})=>n==t).length==1}function da(e){let{mainTrigger:t,extraTriggers:o}=e.settings;return e.app.internalPlugins.plugins["slash-command"].enabled&&(t=="/"||e.settings.useExtraTriggers&&o.includes("/"))}function It(e){return e.isGroup===!0}var Ca=require("obsidian");ve();Wt();function de(n){var a=n,{icon:e,size:t}=a,o=vn(a,["icon","size"]);let l=Lo(null);return Dn(()=>{(0,Ca.setIcon)(l.current,e)},[e,t]),v("div",je({ref:l},o))}function Nt(e){let t=[e.mainTrigger].concat(e.extraTriggers),n=(e.useExtraTriggers?t:[e.mainTrigger]).map(a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return new RegExp(`^(?<fullQuery>(?:${n.join("|")})(?<commandQuery>.*))`,"d")}ve();var Vt=require("obsidian");ve();var Ea=require("obsidian");ve();ve();Wt();function Or({modal:e}){return Ro(()=>{let t=()=>{this.forceUpdate()};return addEventListener("cmdr-icon-changed",t),()=>removeEventListener("cmdr-icon-changed",t)},[]),v("div",{className:"cmdr-mobile-modify-grid"},v("div",{className:"cmdr-mobile-modify-option",onClick:e.handleNewIcon},v("span",null,P("Icon")),v("span",{className:"cmdr-flex cmdr-gap-1"},v(de,{icon:e.pair.icon,size:20,className:"clickable-icon",style:{marginRight:"0px"}}))),v("div",{className:"cmdr-mobile-modify-option"},v("span",null,P("Name")),v("input",{onBlur:({currentTarget:t})=>e.handleRename(t.value),type:"text",placeholder:P("Custom name"),value:e.pair.name})),v("div",{className:"cmdr-mobile-modify-option"},v("select",{className:"dropdown",value:e.pair.mode,onChange:({currentTarget:t})=>e.handleModeChange(t.value)},v("option",{value:"any"},P("Add command to all devices")),v("option",{value:"mobile"},P("Add command only to mobile devices")),v("option",{value:"desktop"},P("Add command only to desktop devices")),v("option",{value:e.plugin.app.appId},P("Add command only to this device")))),v("div",{className:"cmdr-mobile-modify-option"},v("select",{className:"dropdown",value:e.pair.triggerMode,onChange:({currentTarget:t})=>e.handleTriggerModeChange(t.value)},v("option",{value:"anywhere"},P("Show command on any triggering")),v("option",{value:"newline"},P("Show command on newline triggering")),v("option",{value:"inline"},P("Show command on inline triggering")))),v("div",{className:"modal-button-container"},v("button",{className:"mod-cta",onClick:()=>e.close()},P("Done"))))}var Ut=class extends Ea.Modal{constructor(o,n,a,l,d,p){super(o.app);this.plugin=o;this.pair=n;this.handleRename=a;this.handleNewIcon=l;this.handleModeChange=d;this.handleTriggerModeChange=p}async onOpen(){this.titleEl.innerText=this.pair.name,this.reactComponent=v(Or,{modal:this}),De(this.reactComponent,this.contentEl)}onClose(){De(null,this.contentEl)}};ve();Wt();function Dr({value:e,handleChange:t,ariaLabel:o}){let[n,a]=wt(!1),l=Lo(null),[d,p]=wt(0);return Ro(()=>{var m,_;(m=l==null?void 0:l.current)==null||m.select(),(_=l==null?void 0:l.current)==null||_.focus()}),v("div",{class:"cmdr-editable"},n?v("input",{type:"text",value:e,style:{width:d+25+"px"},onKeyDown:m=>{m.key==="Enter"&&m.target.value.length>0&&(a(!1),t(m))},onBlur:()=>a(!1),ref:l}):v("span",{onDblClick:({target:m})=>{p(m==null?void 0:m.offsetWidth),a(!0)},"aria-label":o},e))}function Mr({plugin:e,pair:t,handleRemove:o,handleNewIcon:n,handleRename:a,handleModeChange:l,handleTriggerModeChange:d}){let p=Ao(e,t.id);if(!p&&!It(t))return v(xe,null,Vt.Platform.isDesktop&&v("div",{className:"setting-item mod-toggle"},v(de,{icon:"alert-triangle",size:20,className:"cmdr-icon clickable-icon mod-warning"}),v("div",{className:"setting-item-info"},v("div",{className:"setting-item-name"},t.name),v("div",{className:"setting-item-description"},P("This command is not available on this device."))),v("div",{className:"setting-item-control"},v("button",{className:"mod-warning",style:"display: flex",onClick:o,"aria-label":P("Delete")},v(de,{icon:"lucide-trash"})))),Vt.Platform.isMobile&&v("div",{className:"mobile-option-setting-item",onClick:()=>{new Vt.Notice(P("This command is not available on this device."))}},v("span",{className:"mobile-option-setting-item-remove-icon",onClick:o},v(de,{icon:"minus-with-circle",size:22,style:{color:"var(--text-error)"}})),v("span",{className:"mobile-option-setting-item-option-icon mod-warning"},v(de,{icon:"alert-triangle",size:22})),v("span",{className:"mobile-option-setting-item-name"},t.name)));let m=Wl(t.mode),_=t.mode.match(/desktop|mobile|any/)?t.mode[0].toUpperCase()+t.mode.substring(1):P("This device"),y=typeof t.triggerMode=="undefined"?"anywhere":t.triggerMode,g=Ul(y),D=y==="anywhere"?P("Anywhere"):P(y[0].toUpperCase()+y.substring(1)+" only");return v(xe,null,Vt.Platform.isDesktop&&v("div",{className:"setting-item mod-toggle"},v(de,{icon:t.icon,size:20,"aria-label":P("Choose new"),onClick:n,className:"cmdr-icon clickable-icon"}),v("div",{className:"setting-item-info"},v("div",{className:"setting-item-name"},v(Dr,{ariaLabel:P("Double click to rename"),handleChange:({target:C})=>{a(C==null?void 0:C.value)},value:t.name})),!It(t)&&v("div",{className:"setting-item-description"},"From {{plugin_name}}".replace("{{plugin_name}}",kn(e,p)),t.name!==p.name?` "${p.name}"`:".")),v("div",{className:"setting-item-control"},v(de,{icon:g,className:"setting-editor-extra-setting-button clickable-icon",onClick:()=>d(),"aria-label":P("Change trigger mode (Currently: {{current_mode}})").replace("{{current_mode}}",D)}),v(de,{icon:m,className:"setting-editor-extra-setting-button clickable-icon",onClick:()=>l(),"aria-label":P("Change mode (Currently: {{current_mode}})").replace("{{current_mode}}",_)}),v("button",{className:"mod-warning",style:"display: flex",onClick:o,"aria-label":P("Delete")},v(de,{icon:"lucide-trash"})))),Vt.Platform.isMobile&&v("div",{className:"mobile-option-setting-item"},v("span",{className:"mobile-option-setting-item-remove-icon",onClick:o},v(de,{icon:"minus-with-circle",size:22,style:{color:"var(--text-error)"}})),v("span",{className:"mobile-option-setting-item-option-icon"},v(de,{icon:t.icon,size:22,onClick:()=>{new Ut(e,t,a,n,l,d).open()}})),v("span",{className:"mobile-option-setting-item-name",onClick:()=>{new Ut(e,t,a,n,l,d).open()}},t.name),v("span",{className:"mobile-option-setting-item-option-icon"},v(de,{icon:"three-horizontal-bars",className:"clickable-icon",onClick:()=>{new Ut(e,t,a,n,l,d).open()}}))))}function Wl(e){return e==="mobile"?"smartphone":e==="desktop"?"monitor":e==="any"?"cmdr-all-devices":"airplay"}function Ul(e){return e==="newline"?"cmdr-triggered-newline":e==="inline"?"cmdr-triggered-inline":"regex"}var ka=require("obsidian");ve();ve();function Sa({modal:e}){return v(xe,null,v("p",null,P("Are you sure you want to delete the command?")),v("div",{className:"modal-button-container"},v("button",{className:"mod-warning",onClick:async()=>{e.plugin.settings.confirmDeletion=!1,e.plugin.saveSettings(),e.remove=!0,e.close()}},P("Remove and don't ask again")),v("button",{className:"mod-warning",onClick:()=>{e.remove=!0,e.close()}},P("Remove")),v("button",{onClick:()=>{e.remove=!1,e.close()}},P("Cancel"))))}var zo=class extends ka.Modal{constructor(o){super(o.app);this.plugin=o}async onOpen(){this.titleEl.innerText=P("Remove command"),this.containerEl.style.zIndex="99",this.reactComponent=v(Sa,{modal:this}),De(this.reactComponent,this.contentEl)}async didChooseRemove(){return this.open(),new Promise(o=>{this.onClose=()=>{var n;return o((n=this.remove)!=null?n:!1)}})}onClose(){De(null,this.contentEl)}};var bs=require("obsidian"),_s=yi(Rr()),ys=yi(vs()),gc=Cr(null);function qr({manager:e,plugin:t,children:o}){let[n,a]=(0,_s.useState)(e.pairs);return v(xe,null,v(gc.Provider,{value:e},v("div",{className:"cmdr-sep-con"},v(ys.ReactSortable,{list:n,setList:a,delay:50,delayOnTouchOnly:!0,animation:200,forceFallback:!0,fallbackClass:"sortable-fallback",onSort:l=>{let d=e.pairs;if(typeof l.oldIndex!="undefined"&&typeof l.newIndex!="undefined"){let[p]=d.splice(l.oldIndex,1);d.splice(l.newIndex,0,p),t.saveSettings()}}},n.map(l=>{if(l.mode.match(/desktop|mobile|any/)||l.mode===t.app.appId)return v(Mr,{plugin:t,key:l.id,pair:l,handleRemove:async()=>{(!t.settings.confirmDeletion||await new zo(t).didChooseRemove())&&(await e.removeCommand(l),a(e.pairs))},handleRename:async d=>{l.name=d,await t.saveSettings(),e.reorder(),a(e.pairs)},handleNewIcon:async()=>{let d=await new Bt(t).awaitSelection();d&&d!==l.icon&&(l.icon=d,await t.saveSettings(),e.reorder(),a(e.pairs)),dispatchEvent(new Event("cmdr-icon-changed"))},handleModeChange:async d=>{let p=["any","desktop","mobile",t.app.appId],m=p.indexOf(l.mode);m===3&&(m=-1),l.mode=d||p[m+1],await t.saveSettings(),e.reorder(),a(e.pairs)},handleTriggerModeChange:async d=>{let p=["anywhere","newline","inline"];typeof l.triggerMode=="undefined"&&(l.triggerMode="anywhere");let m=p.indexOf(l.triggerMode);m===2&&(m=-1),l.triggerMode=d||p[m+1],await t.saveSettings(),e.reorder(),a(e.pairs)}})}))),!e.pairs.some(l=>Sn(t,l.mode)||l.mode.match(/mobile|desktop/))&&v("div",{class:"cmdr-commands-empty"},v("h3",null,P("No commands here!")),v("span",null,P("Would you like to add one now?"))),bs.Platform.isMobile&&v("hr",null),v("div",{className:"cmdr-add-new-wrapper"},v("button",{className:"mod-cta",onClick:async()=>{let l=await ca(t);await e.addCommand(l),e.reorder(),a(e.pairs),this.forceUpdate()}},P("Add command")),v(de,{className:"cmdr-icon clickable-icon",icon:"rotate-ccw",size:20,"aria-label":P("Restore default"),onClick:async()=>{e.restoreDefault(),e.reorder(),a(e.pairs)}}))),o)}ve();Wt();function ws({name:e,description:t,children:o,className:n}){return v("div",{className:`setting-item ${n}`},v("div",{className:"setting-item-info"},v("div",{className:"setting-item-name"},e),v("div",{className:"setting-item-description"},t)),v("div",{className:"setting-item-control"},o))}function co(e){let[t,o]=wt(e.value);return v(ws,{name:e.name,description:e.description,className:"mod-toggle"},v("div",{className:`checkbox-container ${t?"is-enabled":""}`,onClick:()=>{o(!t),e.changeHandler(t)}}))}function xs(e){return v(ws,{description:e.description,name:e.name,className:"cmdr-text"},v("input",{type:"text",value:e.value,onChange:({target:t})=>{e.value!==t.value&&e.changeHandler(t.value)}}))}ve();Wt();function Br({title:e,children:t}){let[o,n]=wt(!0);return v("div",{className:"cmdr-setting-collapser","aria-expanded":o},v("h2",{className:"cmdr-setting-collapser-header",onClick:()=>{n(!o)}},e),v("div",{className:"cmdr-setting-collapser-content"},t))}ve();function jr({plugin:e,children:t}){let o=e.settings.extraTriggers;return v(xe,null,v("div",{className:"cmdr-triggers"},o.map((n,a)=>v("div",{className:"cmdr-trigger-pill"},v("input",{value:n,onChange:async({target:l})=>{n!==l.value&&(o[a]=l.value,e.settings.queryPattern=Nt(e.settings),await e.saveSettings(),this.forceUpdate())}}),v(de,{className:"cmdr-icon clickable-icon",icon:"trash-2",size:15,"aria-label":P("Delete"),onClick:async()=>{o.splice(a,1),e.settings.queryPattern=Nt(e.settings),await e.saveSettings(),this.forceUpdate()}}))),v("button",{className:"cmdr-trigger-add",onClick:async()=>{o.push(""),this.forceUpdate()}},P("Add")),t))}function qo({plugin:e}){return v(xe,null,v(xe,null,v("h2",null,P("General")),da(e)&&v("div",{className:"setting-item",style:"border: thin solid crimson; padding-left: 1em"},v(de,{icon:"alert-triangle",size:20,className:"cmdr-suggest-item-icon-large mod-warning"}),v("div",{className:"setting-item-info"},v("div",{className:"setting-item-name",style:"font-weight: bold; color: crimson"},P("One of the command triggers conflicts with the 'Slash commands' plugin.")),v("div",{className:"setting-item-description"},P("Please modify your triggers or disable the above plugin, and then reload this setting tab to dismiss this warning.")))),v(xs,{value:e.settings.mainTrigger,name:P("Command trigger"),description:P("Characters to trigger slash commands."),changeHandler:async t=>{e.settings.mainTrigger=t,e.settings.queryPattern=Nt(e.settings),await e.saveSettings()}}),v(co,{name:P("More triggers"),description:P("Add more command triggers."),value:e.settings.useExtraTriggers,changeHandler:async t=>{e.settings.useExtraTriggers=!t,e.settings.queryPattern=Nt(e.settings),await e.saveSettings(),this.forceUpdate()}}),e.settings.useExtraTriggers&&v(jr,{plugin:e}),v(co,{name:P("Only on new line"),description:P("Show slash commands only if the trigger is at the beginning of a line."),value:e.settings.triggerOnlyOnNewLine,changeHandler:async t=>{e.settings.triggerOnlyOnNewLine=!t,await e.saveSettings()}}),v(co,{name:P("Show command descriptions"),description:P("Always show command descriptions in editor suggestions."),value:e.settings.showDescriptions,changeHandler:async t=>{e.settings.showDescriptions=!t,await e.saveSettings()}}),v(co,{name:P("Show command sources"),description:P("Show command sources in editor suggestions for duplicated command names."),value:e.settings.showSourcesForDuplicates,changeHandler:async t=>{e.settings.showSourcesForDuplicates=!t,await e.saveSettings()}}),v(co,{name:P("Ask before removing"),description:P("Always show a popup to confirm deletion of a command."),value:e.settings.confirmDeletion,changeHandler:async t=>{e.settings.confirmDeletion=!t,await e.saveSettings()}})),v(Br,{title:P("Bindings")},v(qr,{manager:e.manager,plugin:e})))}var Bo=class extends An.PluginSettingTab{constructor(o){super(o.app,o);this.plugin=o}display(){De(v(qo,{plugin:this.plugin,mobileMode:An.Platform.isMobile}),this.containerEl)}hide(){De(null,this.containerEl)}};var Rn=require("obsidian");ve();var jo=class extends Rn.Modal{constructor(o){super(o.app);this.plugin=o,this.containerEl.addClass("cmdr-setting-modal")}onOpen(){let o=Rn.Platform.isMobile;De(v(qo,{plugin:this.plugin,mobileMode:o}),this.contentEl)}onClose(){De(null,this.contentEl)}};var Wo=class{constructor(t){this.plugin=t,this.pairs=t.settings.bindings,this.pairs.forEach(o=>this.addCommand(o,!1))}validPairs(){return this.pairs.filter(t=>En(t,this.plugin))}async addCommand(t,o=!0){o&&(this.pairs.push(t),await this.plugin.saveSettings()),Sn(this.plugin,t.mode)&&this.plugin.register(()=>this.removeCommand(t,!1))}async removeCommand(t,o=!0){o&&(this.pairs.remove(t),await this.plugin.saveSettings())}reorder(){this.pairs.forEach(t=>{this.removeCommand(t,!1),this.addCommand(t,!1)})}async restoreDefault(){this.pairs=Object.assign([],bn.bindings),this.plugin.settings.bindings=this.pairs,await this.plugin.saveSettings()}};var zn=require("obsidian");ve();ve();function Uo({plugin:e,result:t}){let{item:o}=t,n=Ao(e,o.id);return!It(o)&&!n?null:v(xe,null,v("div",{className:"cmdr-suggest-item"},v(de,{icon:o.icon,size:20,className:e.settings.showDescriptions?"cmdr-suggest-item-icon-large":"cmdr-suggest-item-icon"}),v("div",{className:"cmdr-suggest-content"},v("div",null,vc(t),e.settings.showSourcesForDuplicates&&!It(o)&&!ua(e,o.name)&&v("span",{className:"cmdr-suggest-item-source"},` ${kn(e,n)}`)),e.settings.showDescriptions&&!It(o)&&v("div",{className:"cmdr-suggest-item-description"},n.name))))}function vc(e){let{item:t,match:o}=e;if(!o)return v("span",null,t.name);let n=[];for(let a=0;a<t.name.length;a++){let l=o.matches.find(d=>d[0]===a);if(l){n.push(v("span",{className:"suggestion-highlight"},t.name.substring(l[0],l[1]))),a+=l[1]-l[0]-1;continue}n.push(v("span",null,t.name[a]))}return n}var Ln=class extends zn.EditorSuggest{constructor(o){super(o.app);this.plugin=o}onTrigger(o,n,a){let l=this.plugin.settings.queryPattern,d=n.getLine(o.line).slice(0,o.ch),p=0,m=d;this.plugin.settings.triggerOnlyOnNewLine||(p=d.lastIndexOf(" ")+1,m=d.slice(p,o.ch));let _=m.match(l);return _===null?null:{start:Ft(je({},o),{ch:p+_.indices.groups.fullQuery[0]}),end:o,query:_.groups.commandQuery}}getSuggestions(o){let n,a=(0,zn.prepareFuzzySearch)(o.query);o.query==""?n=this.plugin.manager.pairs.map(d=>({item:d,match:null})):n=this.plugin.manager.pairs.map(d=>({item:d,match:a(d.name)})).filter(({match:d})=>d);let l=o.start.ch==0;return n.filter(({item:d})=>En(d,this.plugin)).filter(({item:d})=>l&&d.triggerMode!="inline"||!l&&d.triggerMode!="newline")}renderSuggestion(o,n){De(v(Uo,{plugin:this.plugin,result:o}),n)}selectSuggestion(o,n){var a;(a=this.context)==null||a.editor.replaceRange("",this.context.start,this.context.end),o.item.id&&this.plugin.app.commands.executeCommandById(o.item.id),this.close()}};var Ws=require("obsidian");var Vn=require("obsidian");var me="top",Ce="bottom",be="right",he="left",Hn="auto",At=[me,Ce,be,he],xt="start",Xt="end",Cs="clippingParents",$n="viewport",uo="popper",Es="reference",Wr=At.reduce(function(e,t){return e.concat([t+"-"+xt,t+"-"+Xt])},[]),Fn=[].concat(At,[Hn]).reduce(function(e,t){return e.concat([t,t+"-"+xt,t+"-"+Xt])},[]),bc="beforeRead",_c="read",yc="afterRead",wc="beforeMain",xc="main",Cc="afterMain",Ec="beforeWrite",Sc="write",kc="afterWrite",Ss=[bc,_c,yc,wc,xc,Cc,Ec,Sc,kc];function Me(e){return e?(e.nodeName||"").toLowerCase():null}function ae(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ke(e){var t=ae(e).Element;return e instanceof t||e instanceof Element}function Ee(e){var t=ae(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function po(e){if(typeof ShadowRoot=="undefined")return!1;var t=ae(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Pc(e){var t=e.state;Object.keys(t.elements).forEach(function(o){var n=t.styles[o]||{},a=t.attributes[o]||{},l=t.elements[o];!Ee(l)||!Me(l)||(Object.assign(l.style,n),Object.keys(a).forEach(function(d){var p=a[d];p===!1?l.removeAttribute(d):l.setAttribute(d,p===!0?"":p)}))})}function Oc(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],l=t.attributes[n]||{},d=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:o[n]),p=d.reduce(function(m,_){return m[_]="",m},{});!Ee(a)||!Me(a)||(Object.assign(a.style,p),Object.keys(l).forEach(function(m){a.removeAttribute(m)}))})}}var ks={name:"applyStyles",enabled:!0,phase:"write",fn:Pc,effect:Oc,requires:["computeStyles"]};function Te(e){return e.split("-")[0]}var nt=Math.max,Yt=Math.min,Ct=Math.round;function mo(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Vo(){return!/^((?!chrome|android).)*safari/i.test(mo())}function Je(e,t,o){t===void 0&&(t=!1),o===void 0&&(o=!1);var n=e.getBoundingClientRect(),a=1,l=1;t&&Ee(e)&&(a=e.offsetWidth>0&&Ct(n.width)/e.offsetWidth||1,l=e.offsetHeight>0&&Ct(n.height)/e.offsetHeight||1);var d=Ke(e)?ae(e):window,p=d.visualViewport,m=!Vo()&&o,_=(n.left+(m&&p?p.offsetLeft:0))/a,y=(n.top+(m&&p?p.offsetTop:0))/l,g=n.width/a,D=n.height/l;return{width:g,height:D,top:y,right:_+g,bottom:y+D,left:_,x:_,y}}function Gt(e){var t=Je(e),o=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-o)<=1&&(o=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:n}}function Xo(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&po(o)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function $e(e){return ae(e).getComputedStyle(e)}function Ur(e){return["table","td","th"].indexOf(Me(e))>=0}function Ne(e){return((Ke(e)?e.ownerDocument:e.document)||window.document).documentElement}function Et(e){return Me(e)==="html"?e:e.assignedSlot||e.parentNode||(po(e)?e.host:null)||Ne(e)}function Ps(e){return!Ee(e)||$e(e).position==="fixed"?null:e.offsetParent}function Dc(e){var t=/firefox/i.test(mo()),o=/Trident/i.test(mo());if(o&&Ee(e)){var n=$e(e);if(n.position==="fixed")return null}var a=Et(e);for(po(a)&&(a=a.host);Ee(a)&&["html","body"].indexOf(Me(a))<0;){var l=$e(a);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||t&&l.willChange==="filter"||t&&l.filter&&l.filter!=="none")return a;a=a.parentNode}return null}function rt(e){for(var t=ae(e),o=Ps(e);o&&Ur(o)&&$e(o).position==="static";)o=Ps(o);return o&&(Me(o)==="html"||Me(o)==="body"&&$e(o).position==="static")?t:o||Dc(e)||t}function Kt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Jt(e,t,o){return nt(e,Yt(t,o))}function Os(e,t,o){var n=Jt(e,t,o);return n>o?o:n}function Yo(){return{top:0,right:0,bottom:0,left:0}}function Go(e){return Object.assign({},Yo(),e)}function Ko(e,t){return t.reduce(function(o,n){return o[n]=e,o},{})}var Mc=function(t,o){return t=typeof t=="function"?t(Object.assign({},o.rects,{placement:o.placement})):t,Go(typeof t!="number"?t:Ko(t,At))};function Tc(e){var t,o=e.state,n=e.name,a=e.options,l=o.elements.arrow,d=o.modifiersData.popperOffsets,p=Te(o.placement),m=Kt(p),_=[he,be].indexOf(p)>=0,y=_?"height":"width";if(!(!l||!d)){var g=Mc(a.padding,o),D=Gt(l),C=m==="y"?me:he,S=m==="y"?Ce:be,E=o.rects.reference[y]+o.rects.reference[m]-d[m]-o.rects.popper[y],N=d[m]-o.rects.reference[m],T=rt(l),H=T?m==="y"?T.clientHeight||0:T.clientWidth||0:0,X=E/2-N/2,M=g[C],x=H-D[y]-g[S],B=H/2-D[y]/2+X,Y=Jt(M,B,x),U=m;o.modifiersData[n]=(t={},t[U]=Y,t.centerOffset=Y-B,t)}}function Ic(e){var t=e.state,o=e.options,n=o.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||!Xo(t.elements.popper,a)||(t.elements.arrow=a))}var Ds={name:"arrow",enabled:!0,phase:"main",fn:Tc,effect:Ic,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qe(e){return e.split("-")[1]}var Nc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ac(e,t){var o=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:Ct(o*a)/a||0,y:Ct(n*a)/a||0}}function Ms(e){var t,o=e.popper,n=e.popperRect,a=e.placement,l=e.variation,d=e.offsets,p=e.position,m=e.gpuAcceleration,_=e.adaptive,y=e.roundOffsets,g=e.isFixed,D=d.x,C=D===void 0?0:D,S=d.y,E=S===void 0?0:S,N=typeof y=="function"?y({x:C,y:E}):{x:C,y:E};C=N.x,E=N.y;var T=d.hasOwnProperty("x"),H=d.hasOwnProperty("y"),X=he,M=me,x=window;if(_){var B=rt(o),Y="clientHeight",U="clientWidth";if(B===ae(o)&&(B=Ne(o),$e(B).position!=="static"&&p==="absolute"&&(Y="scrollHeight",U="scrollWidth")),B=B,a===me||(a===he||a===be)&&l===Xt){M=Ce;var A=g&&B===x&&x.visualViewport?x.visualViewport.height:B[Y];E-=A-n.height,E*=m?1:-1}if(a===he||(a===me||a===Ce)&&l===Xt){X=be;var Q=g&&B===x&&x.visualViewport?x.visualViewport.width:B[U];C-=Q-n.width,C*=m?1:-1}}var _e=Object.assign({position:p},_&&Nc),Se=y===!0?Ac({x:C,y:E},ae(o)):{x:C,y:E};if(C=Se.x,E=Se.y,m){var ye;return Object.assign({},_e,(ye={},ye[M]=H?"0":"",ye[X]=T?"0":"",ye.transform=(x.devicePixelRatio||1)<=1?"translate("+C+"px, "+E+"px)":"translate3d("+C+"px, "+E+"px, 0)",ye))}return Object.assign({},_e,(t={},t[M]=H?E+"px":"",t[X]=T?C+"px":"",t.transform="",t))}function Rc(e){var t=e.state,o=e.options,n=o.gpuAcceleration,a=n===void 0?!0:n,l=o.adaptive,d=l===void 0?!0:l,p=o.roundOffsets,m=p===void 0?!0:p,_={placement:Te(t.placement),variation:Qe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ms(Object.assign({},_,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:d,roundOffsets:m})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ms(Object.assign({},_,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:m})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Ts={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Rc,data:{}};var qn={passive:!0};function Lc(e){var t=e.state,o=e.instance,n=e.options,a=n.scroll,l=a===void 0?!0:a,d=n.resize,p=d===void 0?!0:d,m=ae(t.elements.popper),_=[].concat(t.scrollParents.reference,t.scrollParents.popper);return l&&_.forEach(function(y){y.addEventListener("scroll",o.update,qn)}),p&&m.addEventListener("resize",o.update,qn),function(){l&&_.forEach(function(y){y.removeEventListener("scroll",o.update,qn)}),p&&m.removeEventListener("resize",o.update,qn)}}var Is={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Lc,data:{}};var zc={left:"right",right:"left",bottom:"top",top:"bottom"};function fo(e){return e.replace(/left|right|bottom|top/g,function(t){return zc[t]})}var Hc={start:"end",end:"start"};function Bn(e){return e.replace(/start|end/g,function(t){return Hc[t]})}function Qt(e){var t=ae(e),o=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:o,scrollTop:n}}function Zt(e){return Je(Ne(e)).left+Qt(e).scrollLeft}function Vr(e,t){var o=ae(e),n=Ne(e),a=o.visualViewport,l=n.clientWidth,d=n.clientHeight,p=0,m=0;if(a){l=a.width,d=a.height;var _=Vo();(_||!_&&t==="fixed")&&(p=a.offsetLeft,m=a.offsetTop)}return{width:l,height:d,x:p+Zt(e),y:m}}function Xr(e){var t,o=Ne(e),n=Qt(e),a=(t=e.ownerDocument)==null?void 0:t.body,l=nt(o.scrollWidth,o.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),d=nt(o.scrollHeight,o.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),p=-n.scrollLeft+Zt(e),m=-n.scrollTop;return $e(a||o).direction==="rtl"&&(p+=nt(o.clientWidth,a?a.clientWidth:0)-l),{width:l,height:d,x:p,y:m}}function eo(e){var t=$e(e),o=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+a+n)}function jn(e){return["html","body","#document"].indexOf(Me(e))>=0?e.ownerDocument.body:Ee(e)&&eo(e)?e:jn(Et(e))}function Rt(e,t){var o;t===void 0&&(t=[]);var n=jn(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),l=ae(n),d=a?[l].concat(l.visualViewport||[],eo(n)?n:[]):n,p=t.concat(d);return a?p:p.concat(Rt(Et(d)))}function ho(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function $c(e,t){var o=Je(e,!1,t==="fixed");return o.top=o.top+e.clientTop,o.left=o.left+e.clientLeft,o.bottom=o.top+e.clientHeight,o.right=o.left+e.clientWidth,o.width=e.clientWidth,o.height=e.clientHeight,o.x=o.left,o.y=o.top,o}function Ns(e,t,o){return t===$n?ho(Vr(e,o)):Ke(t)?$c(t,o):ho(Xr(Ne(e)))}function Fc(e){var t=Rt(Et(e)),o=["absolute","fixed"].indexOf($e(e).position)>=0,n=o&&Ee(e)?rt(e):e;return Ke(n)?t.filter(function(a){return Ke(a)&&Xo(a,n)&&Me(a)!=="body"}):[]}function Yr(e,t,o,n){var a=t==="clippingParents"?Fc(e):[].concat(t),l=[].concat(a,[o]),d=l[0],p=l.reduce(function(m,_){var y=Ns(e,_,n);return m.top=nt(y.top,m.top),m.right=Yt(y.right,m.right),m.bottom=Yt(y.bottom,m.bottom),m.left=nt(y.left,m.left),m},Ns(e,d,n));return p.width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p}function Jo(e){var t=e.reference,o=e.element,n=e.placement,a=n?Te(n):null,l=n?Qe(n):null,d=t.x+t.width/2-o.width/2,p=t.y+t.height/2-o.height/2,m;switch(a){case me:m={x:d,y:t.y-o.height};break;case Ce:m={x:d,y:t.y+t.height};break;case be:m={x:t.x+t.width,y:p};break;case he:m={x:t.x-o.width,y:p};break;default:m={x:t.x,y:t.y}}var _=a?Kt(a):null;if(_!=null){var y=_==="y"?"height":"width";switch(l){case xt:m[_]=m[_]-(t[y]/2-o[y]/2);break;case Xt:m[_]=m[_]+(t[y]/2-o[y]/2);break;default:}}return m}function it(e,t){t===void 0&&(t={});var o=t,n=o.placement,a=n===void 0?e.placement:n,l=o.strategy,d=l===void 0?e.strategy:l,p=o.boundary,m=p===void 0?Cs:p,_=o.rootBoundary,y=_===void 0?$n:_,g=o.elementContext,D=g===void 0?uo:g,C=o.altBoundary,S=C===void 0?!1:C,E=o.padding,N=E===void 0?0:E,T=Go(typeof N!="number"?N:Ko(N,At)),H=D===uo?Es:uo,X=e.rects.popper,M=e.elements[S?H:D],x=Yr(Ke(M)?M:M.contextElement||Ne(e.elements.popper),m,y,d),B=Je(e.elements.reference),Y=Jo({reference:B,element:X,strategy:"absolute",placement:a}),U=ho(Object.assign({},X,Y)),A=D===uo?U:B,Q={top:x.top-A.top+T.top,bottom:A.bottom-x.bottom+T.bottom,left:x.left-A.left+T.left,right:A.right-x.right+T.right},_e=e.modifiersData.offset;if(D===uo&&_e){var Se=_e[a];Object.keys(Q).forEach(function(ye){var G=[be,Ce].indexOf(ye)>=0?1:-1,at=[me,Ce].indexOf(ye)>=0?"y":"x";Q[ye]+=Se[at]*G})}return Q}function Gr(e,t){t===void 0&&(t={});var o=t,n=o.placement,a=o.boundary,l=o.rootBoundary,d=o.padding,p=o.flipVariations,m=o.allowedAutoPlacements,_=m===void 0?Fn:m,y=Qe(n),g=y?p?Wr:Wr.filter(function(S){return Qe(S)===y}):At,D=g.filter(function(S){return _.indexOf(S)>=0});D.length===0&&(D=g);var C=D.reduce(function(S,E){return S[E]=it(e,{placement:E,boundary:a,rootBoundary:l,padding:d})[Te(E)],S},{});return Object.keys(C).sort(function(S,E){return C[S]-C[E]})}function qc(e){if(Te(e)===Hn)return[];var t=fo(e);return[Bn(e),t,Bn(t)]}function Bc(e){var t=e.state,o=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=o.mainAxis,l=a===void 0?!0:a,d=o.altAxis,p=d===void 0?!0:d,m=o.fallbackPlacements,_=o.padding,y=o.boundary,g=o.rootBoundary,D=o.altBoundary,C=o.flipVariations,S=C===void 0?!0:C,E=o.allowedAutoPlacements,N=t.options.placement,T=Te(N),H=T===N,X=m||(H||!S?[fo(N)]:qc(N)),M=[N].concat(X).reduce(function(kt,ze){return kt.concat(Te(ze)===Hn?Gr(t,{placement:ze,boundary:y,rootBoundary:g,padding:_,flipVariations:S,allowedAutoPlacements:E}):ze)},[]),x=t.rects.reference,B=t.rects.popper,Y=new Map,U=!0,A=M[0],Q=0;Q<M.length;Q++){var _e=M[Q],Se=Te(_e),ye=Qe(_e)===xt,G=[me,Ce].indexOf(Se)>=0,at=G?"width":"height",pe=it(t,{placement:_e,boundary:y,rootBoundary:g,altBoundary:D,padding:_}),Le=G?ye?be:he:ye?Ce:me;x[at]>B[at]&&(Le=fo(Le));var Lt=fo(Le),st=[];if(l&&st.push(pe[Se]<=0),p&&st.push(pe[Le]<=0,pe[Lt]<=0),st.every(function(kt){return kt})){A=_e,U=!1;break}Y.set(_e,st)}if(U)for(var St=S?3:1,to=function(ze){var ht=M.find(function(lt){var Ue=Y.get(lt);if(Ue)return Ue.slice(0,ze).every(function(ke){return ke})});if(ht)return A=ht,"break"},ft=St;ft>0;ft--){var fe=to(ft);if(fe==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}var As={name:"flip",enabled:!0,phase:"main",fn:Bc,requiresIfExists:["offset"],data:{_skip:!1}};function Rs(e,t,o){return o===void 0&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function Ls(e){return[me,be,Ce,he].some(function(t){return e[t]>=0})}function jc(e){var t=e.state,o=e.name,n=t.rects.reference,a=t.rects.popper,l=t.modifiersData.preventOverflow,d=it(t,{elementContext:"reference"}),p=it(t,{altBoundary:!0}),m=Rs(d,n),_=Rs(p,a,l),y=Ls(m),g=Ls(_);t.modifiersData[o]={referenceClippingOffsets:m,popperEscapeOffsets:_,isReferenceHidden:y,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":y,"data-popper-escaped":g})}var zs={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:jc};function Wc(e,t,o){var n=Te(e),a=[he,me].indexOf(n)>=0?-1:1,l=typeof o=="function"?o(Object.assign({},t,{placement:e})):o,d=l[0],p=l[1];return d=d||0,p=(p||0)*a,[he,be].indexOf(n)>=0?{x:p,y:d}:{x:d,y:p}}function Uc(e){var t=e.state,o=e.options,n=e.name,a=o.offset,l=a===void 0?[0,0]:a,d=Fn.reduce(function(y,g){return y[g]=Wc(g,t.rects,l),y},{}),p=d[t.placement],m=p.x,_=p.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=m,t.modifiersData.popperOffsets.y+=_),t.modifiersData[n]=d}var Hs={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Uc};function Vc(e){var t=e.state,o=e.name;t.modifiersData[o]=Jo({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var $s={name:"popperOffsets",enabled:!0,phase:"read",fn:Vc,data:{}};function Kr(e){return e==="x"?"y":"x"}function Xc(e){var t=e.state,o=e.options,n=e.name,a=o.mainAxis,l=a===void 0?!0:a,d=o.altAxis,p=d===void 0?!1:d,m=o.boundary,_=o.rootBoundary,y=o.altBoundary,g=o.padding,D=o.tether,C=D===void 0?!0:D,S=o.tetherOffset,E=S===void 0?0:S,N=it(t,{boundary:m,rootBoundary:_,padding:g,altBoundary:y}),T=Te(t.placement),H=Qe(t.placement),X=!H,M=Kt(T),x=Kr(M),B=t.modifiersData.popperOffsets,Y=t.rects.reference,U=t.rects.popper,A=typeof E=="function"?E(Object.assign({},t.rects,{placement:t.placement})):E,Q=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),_e=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Se={x:0,y:0};if(!!B){if(l){var ye,G=M==="y"?me:he,at=M==="y"?Ce:be,pe=M==="y"?"height":"width",Le=B[M],Lt=Le+N[G],st=Le-N[at],St=C?-U[pe]/2:0,to=H===xt?Y[pe]:U[pe],ft=H===xt?-U[pe]:-Y[pe],fe=t.elements.arrow,kt=C&&fe?Gt(fe):{width:0,height:0},ze=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Yo(),ht=ze[G],lt=ze[at],Ue=Jt(0,Y[pe],kt[pe]),ke=X?Y[pe]/2-St-Ue-ht-Q.mainAxis:to-Ue-ht-Q.mainAxis,Jn=X?-Y[pe]/2+St+Ue+lt+Q.mainAxis:ft+Ue+lt+Q.mainAxis,we=t.elements.arrow&&rt(t.elements.arrow),k=we?M==="y"?we.clientTop||0:we.clientLeft||0:0,re=(ye=_e==null?void 0:_e[M])!=null?ye:0,F=Le+ke-re-k,te=Le+Jn-re,ct=Jt(C?Yt(Lt,F):Lt,Le,C?nt(st,te):st);B[M]=ct,Se[M]=ct-Le}if(p){var zt,ie=M==="x"?me:he,ut=M==="x"?Ce:be,Fe=B[x],Pe=x==="y"?"height":"width",Pt=Fe+N[ie],Ze=Fe-N[ut],Ot=[me,he].indexOf(T)!==-1,Oe=(zt=_e==null?void 0:_e[x])!=null?zt:0,dt=Ot?Pt:Fe-Y[Pe]-U[Pe]-Oe+Q.altAxis,qe=Ot?Fe+Y[Pe]+U[Pe]-Oe-Q.altAxis:Ze,oo=C&&Ot?Os(dt,Fe,qe):Jt(C?dt:Pt,Fe,C?qe:Ze);B[x]=oo,Se[x]=oo-Fe}t.modifiersData[n]=Se}}var Fs={name:"preventOverflow",enabled:!0,phase:"main",fn:Xc,requiresIfExists:["offset"]};function Jr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Qr(e){return e===ae(e)||!Ee(e)?Qt(e):Jr(e)}function Yc(e){var t=e.getBoundingClientRect(),o=Ct(t.width)/e.offsetWidth||1,n=Ct(t.height)/e.offsetHeight||1;return o!==1||n!==1}function Zr(e,t,o){o===void 0&&(o=!1);var n=Ee(t),a=Ee(t)&&Yc(t),l=Ne(t),d=Je(e,a,o),p={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(n||!n&&!o)&&((Me(t)!=="body"||eo(l))&&(p=Qr(t)),Ee(t)?(m=Je(t,!0),m.x+=t.clientLeft,m.y+=t.clientTop):l&&(m.x=Zt(l))),{x:d.left+p.scrollLeft-m.x,y:d.top+p.scrollTop-m.y,width:d.width,height:d.height}}function Gc(e){var t=new Map,o=new Set,n=[];e.forEach(function(l){t.set(l.name,l)});function a(l){o.add(l.name);var d=[].concat(l.requires||[],l.requiresIfExists||[]);d.forEach(function(p){if(!o.has(p)){var m=t.get(p);m&&a(m)}}),n.push(l)}return e.forEach(function(l){o.has(l.name)||a(l)}),n}function ei(e){var t=Gc(e);return Ss.reduce(function(o,n){return o.concat(t.filter(function(a){return a.phase===n}))},[])}function ti(e){var t;return function(){return t||(t=new Promise(function(o){Promise.resolve().then(function(){t=void 0,o(e())})})),t}}function oi(e){var t=e.reduce(function(o,n){var a=o[n.name];return o[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,o},{});return Object.keys(t).map(function(o){return t[o]})}var qs={placement:"bottom",modifiers:[],strategy:"absolute"};function Bs(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function js(e){e===void 0&&(e={});var t=e,o=t.defaultModifiers,n=o===void 0?[]:o,a=t.defaultOptions,l=a===void 0?qs:a;return function(p,m,_){_===void 0&&(_=l);var y={placement:"bottom",orderedModifiers:[],options:Object.assign({},qs,l),modifiersData:{},elements:{reference:p,popper:m},attributes:{},styles:{}},g=[],D=!1,C={state:y,setOptions:function(T){var H=typeof T=="function"?T(y.options):T;E(),y.options=Object.assign({},l,y.options,H),y.scrollParents={reference:Ke(p)?Rt(p):p.contextElement?Rt(p.contextElement):[],popper:Rt(m)};var X=ei(oi([].concat(n,y.options.modifiers)));return y.orderedModifiers=X.filter(function(M){return M.enabled}),S(),C.update()},forceUpdate:function(){if(!D){var T=y.elements,H=T.reference,X=T.popper;if(!!Bs(H,X)){y.rects={reference:Zr(H,rt(X),y.options.strategy==="fixed"),popper:Gt(X)},y.reset=!1,y.placement=y.options.placement,y.orderedModifiers.forEach(function(Q){return y.modifiersData[Q.name]=Object.assign({},Q.data)});for(var M=0;M<y.orderedModifiers.length;M++){if(y.reset===!0){y.reset=!1,M=-1;continue}var x=y.orderedModifiers[M],B=x.fn,Y=x.options,U=Y===void 0?{}:Y,A=x.name;typeof B=="function"&&(y=B({state:y,options:U,name:A,instance:C})||y)}}}},update:ti(function(){return new Promise(function(N){C.forceUpdate(),N(y)})}),destroy:function(){E(),D=!0}};if(!Bs(p,m))return C;C.setOptions(_).then(function(N){!D&&_.onFirstUpdate&&_.onFirstUpdate(N)});function S(){y.orderedModifiers.forEach(function(N){var T=N.name,H=N.options,X=H===void 0?{}:H,M=N.effect;if(typeof M=="function"){var x=M({state:y,name:T,instance:C,options:X}),B=function(){};g.push(x||B)}})}function E(){g.forEach(function(N){return N()}),g=[]}return C}}var Kc=[Is,$s,Ts,ks,Hs,As,Fs,Ds,zs],ni=js({defaultModifiers:Kc});ve();var Wn=class{constructor(t,o,n){this.containerEl=o,this.owner=t,o.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),o.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),n.register([],"ArrowUp",()=>(this.setSelectedItem(this.selectedItem-1,!0),!1)),n.register([],"ArrowDown",()=>(this.setSelectedItem(this.selectedItem+1,!0),!1)),n.register([],"Enter",a=>(this.useSelectedItem(a),!1)),n.register([],"Tab",a=>(this.useSelectedItem(a),!1))}chooseSuggestion(t){if(!this.items||!this.items.length)return;let o=this.items[this.selectedItem];o&&this.owner.selectSuggestion(o,t)}onSuggestionClick(t,o){if(t.preventDefault(),!this.suggestions||!this.suggestions.length)return;let n=this.suggestions.indexOf(o);this.setSelectedItem(n,!1),this.useSelectedItem(t)}onSuggestionMouseover(t,o){if(!this.suggestions||!this.suggestions.length)return;let n=this.suggestions.indexOf(o);this.setSelectedItem(n,!1)}empty(){this.containerEl.empty()}setSuggestions(t){this.containerEl.empty();let o=[];t.forEach(n=>{let a=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(n,a),o.push(a)}),this.items=t,this.suggestions=o,this.setSelectedItem(0,!1)}useSelectedItem(t){if(!this.items||!this.items.length)return;let o=this.items[this.selectedItem];o&&this.owner.selectSuggestion(o,t)}wrap(t,o){return(t%o+o)%o}setSelectedItem(t,o){let n=this.wrap(t,this.suggestions.length),a=this.suggestions[this.selectedItem],l=this.suggestions[n];a&&a.removeClass("is-selected"),l&&l.addClass("is-selected"),this.selectedItem=n,o&&l.scrollIntoView(!1)}},ri=class extends Vn.FuzzySuggestModal{constructor(o,n,a){super(o);this.items=[];this.scope=new Vn.Scope;this.emptyStateText="No match found";this.limit=100;this.inputEl=n,this.items=a,this.suggestEl=createDiv("suggestion-container"),this.suggestEl.style.width="unset",this.contentEl=this.suggestEl.createDiv("suggestion"),this.suggester=new Wn(this,this.contentEl,this.scope),this.scope.register([],"Escape",this.close.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",l=>{l.preventDefault()})}empty(){this.suggester.empty()}onInputChanged(){let o=this.modifyInput(this.inputEl.value),n=this.getSuggestions(o);n.length>0?this.suggester.setSuggestions(n.slice(0,this.limit)):this.onNoSuggestion(),this.open()}modifyInput(o){return o}onNoSuggestion(){this.empty(),this.renderSuggestion(null,this.contentEl.createDiv("suggestion-item"))}open(){this.app.keymap.pushScope(this.scope),document.body.appendChild(this.suggestEl),this.popper=ni(this.inputEl,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"flip",options:{fallbackPlacements:["top"]}}]}),this.inputEl.setCssStyles({maxWidth:"0",padding:"0 0 0 0"})}close(){this.app.keymap.popScope(this.scope),this.suggester.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}createPrompt(o){this.promptEl||(this.promptEl=this.suggestEl.createDiv("prompt-instructions"));let n=this.promptEl.createDiv("prompt-instruction");for(let a of o)n.appendChild(a)}},Un=class extends ri{constructor(o,n,a){super(o.app,n.inputEl,a);this.plugin=o;this.pairs=[...a],this.text=n,this.createPrompts(),this.inputEl.addEventListener("input",this.getItem.bind(this))}createPrompts(){}getItem(){let o=this.inputEl.value,n=this.pairs.find(a=>a.name===o.trim());n!=this.pair&&(this.pair=n,this.pairs&&this.onInputChanged())}getItemText(o){return o.name}onChooseItem(o){this.text.setValue(o.name),this.pair=o}selectSuggestion({item:o}){o.id&&this.plugin.app.commands.executeCommandById(o.id),this.text.inputEl.remove(),this.close()}renderSuggestion(o,n){var l;let{item:a}=o||{};if(!a){let d=n.createDiv({cls:"suggestion-content icon"});d.setText(this.emptyStateText),(l=d.parentElement)==null||l.addClass("is-selected");return}De(v(Uo,{plugin:this.plugin,result:o}),n)}getItems(){return this.pairs}};var Xn=class{constructor(t,o,n){this.plugin=t,this.editor=o,this.scrollArea=n}open(){var D,C,S;if(!this.scrollArea||!this.editor||!this.editor.hasFocus())return;this.search=new Ws.TextComponent(this.scrollArea),this.search.inputEl.addEventListener("blur",this.returnFocus.bind(this)),this.search.inputEl.addEventListener("keydown",E=>{E.key=="Escape"&&this.returnFocus()});let t=this.editor.getCursor("from"),o=t.ch==0,n=new Un(this.plugin,this.search,this.plugin.manager.validPairs().filter(E=>o&&E.triggerMode!="inline"||!o&&E.triggerMode!="newline"));n.open();let{height:a}=this.search.inputEl.getBoundingClientRect(),{width:l}=n.suggestEl.getBoundingClientRect(),d;if(this.editor.cursorCoords)d=this.editor.cursorCoords(!0,"window");else if(this.editor.coordsAtPos){let E=this.editor.posToOffset(t);d=(S=(C=(D=this.editor.cm).coordsAtPos)==null?void 0:C.call(D,E))!=null?S:this.editor.coordsAtPos(E)}else return;let p=this.scrollArea.getBoundingClientRect(),m=d.top,_=d.right;m+=this.scrollArea.scrollTop-p.top,_-=p.left;let y=_+l-p.width;y>0&&(_-=y);let g=m+a-this.scrollArea.scrollTop-this.scrollArea.clientHeight;g>0&&this.scrollArea.scrollTo(0,this.scrollArea.scrollTop+g),this.search.inputEl.setCssStyles({top:`${m}px`,left:`${_}px`,position:"absolute",opacity:"0"}),this.search.inputEl.focus()}close(){var t,o;(o=(t=this.search)==null?void 0:t.inputEl)==null||o.remove()}returnFocus(){var t;(t=this.editor)==null||t.focus()}};var Yn=require("obsidian");function ii(){(0,Yn.addIcon)("cmdr-all-devices",'<g style="fill: currentColor;"><path d="M 12.5 16.667969 L 83.332031 16.667969 C 87.9375 16.667969 91.667969 20.398438 91.667969 25 L 91.667969 33.332031 L 75 33.332031 L 75 25 L 20.832031 25 L 20.832031 75 L 58.332031 75 L 58.332031 83.332031 L 12.5 83.332031 C 7.898438 83.332031 4.167969 79.601562 4.167969 75 L 4.167969 25 C 4.167969 20.398438 7.898438 16.667969 12.5 16.667969 M 70.832031 41.667969 L 95.832031 41.667969 C 98.132812 41.667969 100 43.53125 100 45.832031 L 100 87.5 C 100 89.800781 98.132812 91.667969 95.832031 91.667969 L 70.832031 91.667969 C 68.53125 91.667969 66.667969 89.800781 66.667969 87.5 L 66.667969 45.832031 C 66.667969 43.53125 68.53125 41.667969 70.832031 41.667969 M 75 50 L 75 79.167969 L 91.667969 79.167969 L 91.667969 50 Z M 75 50 "/></g>'),(0,Yn.addIcon)("cmdr-triggered-inline",'<g fill="none" stroke-linecap="round" stroke-linejoin="round"><g stroke="currentColor" stroke-width="10"><path d="m84.84 85.162h-3.0149a12.06 14.108 0 0 1-12.06-14.108v-42.324a12.06 14.108 0 0 1 12.06-14.108h3.0149"/><path d="m54.69 85.162h3.0149a12.06 14.108 0 0 0 12.06-14.108v-3.527"/><path d="m54.69 14.622h3.0149a12.06 14.108 0 0 1 12.06 14.108v3.527"/><path d="m35 85h-19.582"/>'),(0,Yn.addIcon)("cmdr-triggered-newline",'<g transform="translate(-39.69 -.16236)" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor" stroke-width="10"><path d="m84.84 85.162h-3.0149a12.06 14.108 0 0 1-12.06-14.108v-42.324a12.06 14.108 0 0 1 12.06-14.108h3.0149"/><path d="m54.69 85.162h3.0149a12.06 14.108 0 0 0 12.06-14.108v-3.527"/><path d="m54.69 14.622h3.0149a12.06 14.108 0 0 1 12.06 14.108v3.527"/><path transform="translate(39.69 .16236)" d="m84.791 85h-19.582"/></g>')}var Gn=class extends Kn.Plugin{async onload(){await this.loadSettings(),ii(),this.manager=new Wo(this),this.addSettingTab(new Bo(this)),this.addCommand({name:P("Open settings"),id:"open-settings",callback:()=>new jo(this).open()}),this.addCommand({name:P("Open standalone menu"),id:"open-standalone-menu",editorCallback:n=>{var a;(a=this.menuSuggest)==null||a.close(),this.menuSuggest=new Xn(this,n,this.scrollArea),this.menuSuggest.open()}}),this.registerEditorSuggest(new Ln(this)),this.registerDomEvent(document,"click",()=>{var n;(n=this.menuSuggest)==null||n.close()});let o=()=>{var a;let n=this.app.workspace.getActiveViewOfType(Kn.MarkdownView);!n||(this.scrollArea=(a=n.containerEl.querySelector(".cm-scroller"))!=null?a:void 0,this.scrollArea)};o(),this.registerEvent(this.app.workspace.on("active-leaf-change",o))}onunload(){var o,n;(o=document.head.querySelector("style#cmdr"))==null||o.remove(),(n=this.menuSuggest)==null||n.close()}async loadSettings(){let o=Object.assign({},bn,await this.loadData());this.settings=o,this.settings.queryPattern=Nt(this.settings)}async saveSettings(){await this.saveData(this.settings)}};
|
|
/*!
|
|
Copyright (c) 2018 Jed Watson.
|
|
Licensed under the MIT License (MIT), see
|
|
http://jedwatson.github.io/classnames
|
|
*/
|
|
/*! Sortable 1.15.1 - MIT | git://github.com/SortableJS/Sortable.git */
|
|
|
|
/* by phibr0, SPiCaRiA, and alephpiece */
|
|
|
|
/* nosourcemap */ |