UNPKG

@cogic/annotorious-openseadragon

Version:

Annotorious image annotation for OpenSeadragon

3 lines 544 kB
(function(Ce,V){typeof exports=="object"&&typeof module!="undefined"?module.exports=V():typeof define=="function"&&define.amd?define(V):(Ce=typeof globalThis!="undefined"?globalThis:Ce||self,Ce.OpenSeadragon=Ce.OpenSeadragon||{},Ce.OpenSeadragon.Annotorious=V())})(this,function(){"use strict";var _x=Object.defineProperty;var Tx=(Ce,V,yt)=>V in Ce?_x(Ce,V,{enumerable:!0,configurable:!0,writable:!0,value:yt}):Ce[V]=yt;var C=(Ce,V,yt)=>(Tx(Ce,typeof V!="symbol"?V+"":V,yt),yt);var Ce,V,yt,yn,ms,gs,vs,Zn={},ys=[],id=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function at(i,t){for(var e in t)i[e]=t[e];return i}function ws(i){var t=i.parentNode;t&&t.removeChild(i)}function be(i,t,e){var n,r,o,s={};for(o in t)o=="key"?n=t[o]:o=="ref"?r=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Ce.call(arguments,2):e),typeof i=="function"&&i.defaultProps!=null)for(o in i.defaultProps)s[o]===void 0&&(s[o]=i.defaultProps[o]);return wn(i,s,n,r,null)}function wn(i,t,e,n,r){var o={type:i,props:t,key:e,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r==null?++yt:r};return r==null&&V.vnode!=null&&V.vnode(o),o}function cr(){return{current:null}}function Ye(i){return i.children}function ye(i,t){this.props=i,this.context=t}function zt(i,t){if(t==null)return i.__?zt(i.__,i.__.__k.indexOf(i)+1):null;for(var e;t<i.__k.length;t++)if((e=i.__k[t])!=null&&e.__e!=null)return e.__e;return typeof i.type=="function"?zt(i):null}function Ss(i){var t,e;if((i=i.__)!=null&&i.__c!=null){for(i.__e=i.__c.base=null,t=0;t<i.__k.length;t++)if((e=i.__k[t])!=null&&e.__e!=null){i.__e=i.__c.base=e.__e;break}return Ss(i)}}function hr(i){(!i.__d&&(i.__d=!0)&&yn.push(i)&&!Kn.__r++||gs!==V.debounceRendering)&&((gs=V.debounceRendering)||ms)(Kn)}function Kn(){for(var i;Kn.__r=yn.length;)i=yn.sort(function(t,e){return t.__v.__b-e.__v.__b}),yn=[],i.some(function(t){var e,n,r,o,s,l;t.__d&&(s=(o=(e=t).__v).__e,(l=e.__P)&&(n=[],(r=at({},o)).__v=o.__v+1,dr(l,o,r,e.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s==null?zt(o):s,o.__h),Ps(n,o),o.__e!=s&&Ss(o)))})}function bs(i,t,e,n,r,o,s,l,a,u){var c,h,d,g,y,x,b,P=n&&n.__k||ys,f=P.length;for(e.__k=[],c=0;c<t.length;c++)if((g=e.__k[c]=(g=t[c])==null||typeof g=="boolean"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?wn(null,g,null,null,g):Array.isArray(g)?wn(Ye,{children:g},null,null,null):g.__b>0?wn(g.type,g.props,g.key,null,g.__v):g)!=null){if(g.__=e,g.__b=e.__b+1,(d=P[c])===null||d&&g.key==d.key&&g.type===d.type)P[c]=void 0;else for(h=0;h<f;h++){if((d=P[h])&&g.key==d.key&&g.type===d.type){P[h]=void 0;break}d=null}dr(i,g,d=d||Zn,r,o,s,l,a,u),y=g.__e,(h=g.ref)&&d.ref!=h&&(b||(b=[]),d.ref&&b.push(d.ref,null,g),b.push(h,g.__c||y,g)),y!=null?(x==null&&(x=y),typeof g.type=="function"&&g.__k===d.__k?g.__d=a=Es(g,a,i):a=xs(i,g,d,P,y,a),typeof e.type=="function"&&(e.__d=a)):a&&d.__e==a&&a.parentNode!=i&&(a=zt(d))}for(e.__e=x,c=f;c--;)P[c]!=null&&(typeof e.type=="function"&&P[c].__e!=null&&P[c].__e==e.__d&&(e.__d=zt(n,c+1)),Os(P[c],P[c]));if(b)for(c=0;c<b.length;c++)As(b[c],b[++c],b[++c])}function Es(i,t,e){for(var n,r=i.__k,o=0;r&&o<r.length;o++)(n=r[o])&&(n.__=i,t=typeof n.type=="function"?Es(n,t,e):xs(e,n,n,r,n.__e,t));return t}function lt(i,t){return t=t||[],i==null||typeof i=="boolean"||(Array.isArray(i)?i.some(function(e){lt(e,t)}):t.push(i)),t}function xs(i,t,e,n,r,o){var s,l,a;if(t.__d!==void 0)s=t.__d,t.__d=void 0;else if(e==null||r!=o||r.parentNode==null)e:if(o==null||o.parentNode!==i)i.appendChild(r),s=null;else{for(l=o,a=0;(l=l.nextSibling)&&a<n.length;a+=2)if(l==r)break e;i.insertBefore(r,o),s=o}return s!==void 0?s:r.nextSibling}function rd(i,t,e,n,r){var o;for(o in e)o==="children"||o==="key"||o in t||Jn(i,o,null,e[o],n);for(o in t)r&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||e[o]===t[o]||Jn(i,o,t[o],e[o],n)}function _s(i,t,e){t[0]==="-"?i.setProperty(t,e):i[t]=e==null?"":typeof e!="number"||id.test(t)?e:e+"px"}function Jn(i,t,e,n,r){var o;e:if(t==="style")if(typeof e=="string")i.style.cssText=e;else{if(typeof n=="string"&&(i.style.cssText=n=""),n)for(t in n)e&&t in e||_s(i.style,t,"");if(e)for(t in e)n&&e[t]===n[t]||_s(i.style,t,e[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in i?t.toLowerCase().slice(2):t.slice(2),i.l||(i.l={}),i.l[t+o]=e,e?n||i.addEventListener(t,o?Cs:Ts,o):i.removeEventListener(t,o?Cs:Ts,o);else if(t!=="dangerouslySetInnerHTML"){if(r)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in i)try{i[t]=e==null?"":e;break e}catch{}typeof e=="function"||(e!=null&&(e!==!1||t[0]==="a"&&t[1]==="r")?i.setAttribute(t,e):i.removeAttribute(t))}}function Ts(i){this.l[i.type+!1](V.event?V.event(i):i)}function Cs(i){this.l[i.type+!0](V.event?V.event(i):i)}function dr(i,t,e,n,r,o,s,l,a){var u,c,h,d,g,y,x,b,P,f,w,A=t.type;if(t.constructor!==void 0)return null;e.__h!=null&&(a=e.__h,l=t.__e=e.__e,t.__h=null,o=[l]),(u=V.__b)&&u(t);try{e:if(typeof A=="function"){if(b=t.props,P=(u=A.contextType)&&n[u.__c],f=u?P?P.props.value:u.__:n,e.__c?x=(c=t.__c=e.__c).__=c.__E:("prototype"in A&&A.prototype.render?t.__c=c=new A(b,f):(t.__c=c=new ye(b,f),c.constructor=A,c.render=sd),P&&P.sub(c),c.props=b,c.state||(c.state={}),c.context=f,c.__n=n,h=c.__d=!0,c.__h=[]),c.__s==null&&(c.__s=c.state),A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=at({},c.__s)),at(c.__s,A.getDerivedStateFromProps(b,c.__s))),d=c.props,g=c.state,h)A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(A.getDerivedStateFromProps==null&&b!==d&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(b,f),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(b,c.__s,f)===!1||t.__v===e.__v){c.props=b,c.state=c.__s,t.__v!==e.__v&&(c.__d=!1),c.__v=t,t.__e=e.__e,t.__k=e.__k,t.__k.forEach(function(T){T&&(T.__=t)}),c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(b,c.__s,f),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(d,g,y)})}c.context=f,c.props=b,c.state=c.__s,(u=V.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=i,u=c.render(c.props,c.state,c.context),c.state=c.__s,c.getChildContext!=null&&(n=at(at({},n),c.getChildContext())),h||c.getSnapshotBeforeUpdate==null||(y=c.getSnapshotBeforeUpdate(d,g)),w=u!=null&&u.type===Ye&&u.key==null?u.props.children:u,bs(i,Array.isArray(w)?w:[w],t,e,n,r,o,s,l,a),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),x&&(c.__E=c.__=null),c.__e=!1}else o==null&&t.__v===e.__v?(t.__k=e.__k,t.__e=e.__e):t.__e=od(e.__e,t,e,n,r,o,s,a);(u=V.diffed)&&u(t)}catch(T){t.__v=null,(a||o!=null)&&(t.__e=l,t.__h=!!a,o[o.indexOf(l)]=null),V.__e(T,t,e)}}function Ps(i,t){V.__c&&V.__c(t,i),i.some(function(e){try{i=e.__h,e.__h=[],i.some(function(n){n.call(e)})}catch(n){V.__e(n,e.__v)}})}function od(i,t,e,n,r,o,s,l){var a,u,c,h=e.props,d=t.props,g=t.type,y=0;if(g==="svg"&&(r=!0),o!=null){for(;y<o.length;y++)if((a=o[y])&&"setAttribute"in a==!!g&&(g?a.localName===g:a.nodeType===3)){i=a,o[y]=null;break}}if(i==null){if(g===null)return document.createTextNode(d);i=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,d.is&&d),o=null,l=!1}if(g===null)h===d||l&&i.data===d||(i.data=d);else{if(o=o&&Ce.call(i.childNodes),u=(h=e.props||Zn).dangerouslySetInnerHTML,c=d.dangerouslySetInnerHTML,!l){if(o!=null)for(h={},y=0;y<i.attributes.length;y++)h[i.attributes[y].name]=i.attributes[y].value;(c||u)&&(c&&(u&&c.__html==u.__html||c.__html===i.innerHTML)||(i.innerHTML=c&&c.__html||""))}if(rd(i,d,h,r,l),c)t.__k=[];else if(y=t.props.children,bs(i,Array.isArray(y)?y:[y],t,e,n,r&&g!=="foreignObject",o,s,o?o[0]:e.__k&&zt(e,0),l),o!=null)for(y=o.length;y--;)o[y]!=null&&ws(o[y]);l||("value"in d&&(y=d.value)!==void 0&&(y!==h.value||y!==i.value||g==="progress"&&!y)&&Jn(i,"value",y,h.value,!1),"checked"in d&&(y=d.checked)!==void 0&&y!==i.checked&&Jn(i,"checked",y,h.checked,!1))}return i}function As(i,t,e){try{typeof i=="function"?i(t):i.current=t}catch(n){V.__e(n,e)}}function Os(i,t,e){var n,r;if(V.unmount&&V.unmount(i),(n=i.ref)&&(n.current&&n.current!==i.__e||As(n,null,t)),(n=i.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){V.__e(o,t)}n.base=n.__P=null}if(n=i.__k)for(r=0;r<n.length;r++)n[r]&&Os(n[r],t,typeof i.type!="function");e||i.__e==null||ws(i.__e),i.__e=i.__d=void 0}function sd(i,t,e){return this.constructor(i,e)}function Sn(i,t,e){var n,r,o;V.__&&V.__(i,t),r=(n=typeof e=="function")?null:e&&e.__k||t.__k,o=[],dr(t,i=(!n&&e||t).__k=be(Ye,null,[i]),r||Zn,Zn,t.ownerSVGElement!==void 0,!n&&e?[e]:r?null:t.firstChild?Ce.call(t.childNodes):null,o,!n&&e?e:r?r.__e:t.firstChild,n),Ps(o,i)}function Ds(i,t){Sn(i,t,Ds)}function ad(i,t,e){var n,r,o,s=at({},i.props);for(o in t)o=="key"?n=t[o]:o=="ref"?r=t[o]:s[o]=t[o];return arguments.length>2&&(s.children=arguments.length>3?Ce.call(arguments,2):e),wn(i.type,s,n||i.key,r||i.ref,null)}function bn(i,t){var e={__c:t="__cC"+vs++,__:i,Consumer:function(n,r){return n.children(r)},Provider:function(n){var r,o;return this.getChildContext||(r=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&r.some(hr)},this.sub=function(s){r.push(s);var l=s.componentWillUnmount;s.componentWillUnmount=function(){r.splice(r.indexOf(s),1),l&&l.call(s)}}),n.children}};return e.Provider.__=e.Consumer.contextType=e}Ce=ys.slice,V={__e:function(i,t){for(var e,n,r;t=t.__;)if((e=t.__c)&&!e.__)try{if((n=e.constructor)&&n.getDerivedStateFromError!=null&&(e.setState(n.getDerivedStateFromError(i)),r=e.__d),e.componentDidCatch!=null&&(e.componentDidCatch(i),r=e.__d),r)return e.__E=e}catch(o){i=o}throw i}},yt=0,ye.prototype.setState=function(i,t){var e;e=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=at({},this.state),typeof i=="function"&&(i=i(at({},e),this.props)),i&&at(e,i),i!=null&&this.__v&&(t&&this.__h.push(t),hr(this))},ye.prototype.forceUpdate=function(i){this.__v&&(this.__e=!0,i&&this.__h.push(i),hr(this))},ye.prototype.render=Ye,yn=[],ms=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Kn.__r=0,vs=0;var At,Pe,Rs,Vt=0,fr=[],Ms=V.__b,Fs=V.__r,Ls=V.diffed,ks=V.__c,Bs=V.unmount;function Ut(i,t){V.__h&&V.__h(Pe,i,Vt||t),Vt=0;var e=Pe.__H||(Pe.__H={__:[],__h:[]});return i>=e.__.length&&e.__.push({}),e.__[i]}function ut(i){return Vt=1,pr(zs,i)}function pr(i,t,e){var n=Ut(At++,2);return n.t=i,n.__c||(n.__=[e?e(t):zs(void 0,t),function(r){var o=n.t(n.__[0],r);n.__[0]!==o&&(n.__=[o,n.__[1]],n.__c.setState({}))}],n.__c=Pe),n.__}function Ot(i,t){var e=Ut(At++,3);!V.__s&&vr(e.__H,t)&&(e.__=i,e.__H=t,Pe.__H.__h.push(e))}function mr(i,t){var e=Ut(At++,4);!V.__s&&vr(e.__H,t)&&(e.__=i,e.__H=t,Pe.__h.push(e))}function Qe(i){return Vt=5,ct(function(){return{current:i}},[])}function Ns(i,t,e){Vt=6,mr(function(){typeof i=="function"?i(t()):i&&(i.current=t())},e==null?e:e.concat(i))}function ct(i,t){var e=Ut(At++,7);return vr(e.__H,t)&&(e.__=i(),e.__H=t,e.__h=i),e.__}function $e(i,t){return Vt=8,ct(function(){return i},t)}function En(i){var t=Pe.context[i.__c],e=Ut(At++,9);return e.c=i,t?(e.__==null&&(e.__=!0,t.sub(Pe)),t.props.value):i.__}function Is(i,t){V.useDebugValue&&V.useDebugValue(t?t(i):i)}function ld(i){var t=Ut(At++,10),e=ut();return t.__=i,Pe.componentDidCatch||(Pe.componentDidCatch=function(n){t.__&&t.__(n),e[1](n)}),[e[0],function(){e[1](void 0)}]}function ud(){var i;for(fr.sort(function(t,e){return t.__v.__b-e.__v.__b});i=fr.pop();)if(i.__P)try{i.__H.__h.forEach(Qn),i.__H.__h.forEach(gr),i.__H.__h=[]}catch(t){i.__H.__h=[],V.__e(t,i.__v)}}V.__b=function(i){Pe=null,Ms&&Ms(i)},V.__r=function(i){Fs&&Fs(i),At=0;var t=(Pe=i.__c).__H;t&&(t.__h.forEach(Qn),t.__h.forEach(gr),t.__h=[])},V.diffed=function(i){Ls&&Ls(i);var t=i.__c;t&&t.__H&&t.__H.__h.length&&(fr.push(t)!==1&&Rs===V.requestAnimationFrame||((Rs=V.requestAnimationFrame)||function(e){var n,r=function(){clearTimeout(o),Hs&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(r,100);Hs&&(n=requestAnimationFrame(r))})(ud)),Pe=null},V.__c=function(i,t){t.some(function(e){try{e.__h.forEach(Qn),e.__h=e.__h.filter(function(n){return!n.__||gr(n)})}catch(n){t.some(function(r){r.__h&&(r.__h=[])}),t=[],V.__e(n,e.__v)}}),ks&&ks(i,t)},V.unmount=function(i){Bs&&Bs(i);var t,e=i.__c;e&&e.__H&&(e.__H.__.forEach(function(n){try{Qn(n)}catch(r){t=r}}),t&&V.__e(t,e.__v))};var Hs=typeof requestAnimationFrame=="function";function Qn(i){var t=Pe,e=i.__c;typeof e=="function"&&(i.__c=void 0,e()),Pe=t}function gr(i){var t=Pe;i.__c=i.__(),Pe=t}function vr(i,t){return!i||i.length!==t.length||t.some(function(e,n){return e!==i[n]})}function zs(i,t){return typeof t=="function"?t(i):t}function Vs(i,t){for(var e in t)i[e]=t[e];return i}function yr(i,t){for(var e in i)if(e!=="__source"&&!(e in t))return!0;for(var n in t)if(n!=="__source"&&i[n]!==t[n])return!0;return!1}function xn(i){this.props=i}function Us(i,t){function e(r){var o=this.props.ref,s=o==r.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,r)||!s:yr(this.props,r)}function n(r){return this.shouldComponentUpdate=e,be(i,r)}return n.displayName="Memo("+(i.displayName||i.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(xn.prototype=new ye).isPureReactComponent=!0,xn.prototype.shouldComponentUpdate=function(i,t){return yr(this.props,i)||yr(this.state,t)};var Ws=V.__b;V.__b=function(i){i.type&&i.type.__f&&i.ref&&(i.props.ref=i.ref,i.ref=null),Ws&&Ws(i)};var cd=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function wr(i){function t(e,n){var r=Vs({},e);return delete r.ref,i(r,(n=e.ref||n)&&(typeof n!="object"||"current"in n)?n:null)}return t.$$typeof=cd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(i.displayName||i.name)+")",t}var js=function(i,t){return i==null?null:lt(lt(i).map(t))},Gs={map:js,forEach:js,count:function(i){return i?lt(i).length:0},only:function(i){var t=lt(i);if(t.length!==1)throw"Children.only";return t[0]},toArray:lt},hd=V.__e;V.__e=function(i,t,e){if(i.then){for(var n,r=t;r=r.__;)if((n=r.__c)&&n.__c)return t.__e==null&&(t.__e=e.__e,t.__k=e.__k),n.__c(i,t)}hd(i,t,e)};var qs=V.unmount;function _n(){this.__u=0,this.t=null,this.__b=null}function Xs(i){var t=i.__.__c;return t&&t.__e&&t.__e(i)}function Ys(i){var t,e,n;function r(o){if(t||(t=i()).then(function(s){e=s.default||s},function(s){n=s}),n)throw n;if(!e)throw t;return be(e,o)}return r.displayName="Lazy",r.__f=!0,r}function Wt(){this.u=null,this.o=null}V.unmount=function(i){var t=i.__c;t&&t.__R&&t.__R(),t&&i.__h===!0&&(i.type=null),qs&&qs(i)},(_n.prototype=new ye).__c=function(i,t){var e=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(e);var r=Xs(n.__v),o=!1,s=function(){o||(o=!0,e.__R=null,r?r(l):l())};e.__R=s;var l=function(){if(!--n.__u){if(n.state.__e){var u=n.state.__e;n.__v.__k[0]=function h(d,g,y){return d&&(d.__v=null,d.__k=d.__k&&d.__k.map(function(x){return h(x,g,y)}),d.__c&&d.__c.__P===g&&(d.__e&&y.insertBefore(d.__e,d.__d),d.__c.__e=!0,d.__c.__P=y)),d}(u,u.__c.__P,u.__c.__O)}var c;for(n.setState({__e:n.__b=null});c=n.t.pop();)c.forceUpdate()}},a=t.__h===!0;n.__u++||a||n.setState({__e:n.__b=n.__v.__k[0]}),i.then(s,s)},_n.prototype.componentWillUnmount=function(){this.t=[]},_n.prototype.render=function(i,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function o(s,l,a){return s&&(s.__c&&s.__c.__H&&(s.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),s.__c.__H=null),(s=Vs({},s)).__c!=null&&(s.__c.__P===a&&(s.__c.__P=l),s.__c=null),s.__k=s.__k&&s.__k.map(function(u){return o(u,l,a)})),s}(this.__b,e,n.__O=n.__P)}this.__b=null}var r=t.__e&&be(Ye,null,i.fallback);return r&&(r.__h=null),[be(Ye,null,t.__e?null:i.children),r]};var Zs=function(i,t,e){if(++e[1]===e[0]&&i.o.delete(t),i.props.revealOrder&&(i.props.revealOrder[0]!=="t"||!i.o.size))for(e=i.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;i.u=e=e[2]}};function dd(i){return this.getChildContext=function(){return i.context},i.children}function fd(i){var t=this,e=i.i;t.componentWillUnmount=function(){Sn(null,t.l),t.l=null,t.i=null},t.i&&t.i!==e&&t.componentWillUnmount(),i.__v?(t.l||(t.i=e,t.l={nodeType:1,parentNode:e,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,r){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Sn(be(dd,{context:t.context},i.__v),t.l)):t.l&&t.componentWillUnmount()}function Sr(i,t){return be(fd,{__v:i,i:t})}(Wt.prototype=new ye).__e=function(i){var t=this,e=Xs(t.__v),n=t.o.get(i);return n[0]++,function(r){var o=function(){t.props.revealOrder?(n.push(r),Zs(t,i,n)):r()};e?e(o):o()}},Wt.prototype.render=function(i){this.u=null,this.o=new Map;var t=lt(i.children);i.revealOrder&&i.revealOrder[0]==="b"&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return i.children},Wt.prototype.componentDidUpdate=Wt.prototype.componentDidMount=function(){var i=this;this.o.forEach(function(t,e){Zs(i,e,t)})};var Ks=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,pd=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,md=typeof document!="undefined",gd=function(i){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(i)};function Js(i,t,e){return t.__k==null&&(t.textContent=""),Sn(i,t),typeof e=="function"&&e(),i?i.__c:null}function Qs(i,t,e){return Ds(i,t),typeof e=="function"&&e(),i?i.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(i){Object.defineProperty(ye.prototype,i,{configurable:!0,get:function(){return this["UNSAFE_"+i]},set:function(t){Object.defineProperty(this,i,{configurable:!0,writable:!0,value:t})}})});var $s=V.event;function vd(){}function yd(){return this.cancelBubble}function wd(){return this.defaultPrevented}V.event=function(i){return $s&&(i=$s(i)),i.persist=vd,i.isPropagationStopped=yd,i.isDefaultPrevented=wd,i.nativeEvent=i};var ea,ta={configurable:!0,get:function(){return this.class}},na=V.vnode;V.vnode=function(i){var t=i.type,e=i.props,n=e;if(typeof t=="string"){var r=t.indexOf("-")===-1;for(var o in n={},e){var s=e[o];md&&o==="children"&&t==="noscript"||o==="value"&&"defaultValue"in e&&s==null||(o==="defaultValue"&&"value"in e&&e.value==null?o="value":o==="download"&&s===!0?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!gd(e.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():r&&pd.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():s===null&&(s=void 0),n[o]=s)}t=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=lt(e.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),t=="select"&&n.defaultValue!=null&&(n.value=lt(e.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),i.props=n,e.class!=e.className&&(ta.enumerable="className"in e,e.className!=null&&(n.class=e.className),Object.defineProperty(n,"className",ta))}i.$$typeof=Ks,na&&na(i)};var ia=V.__r;V.__r=function(i){ia&&ia(i),ea=i.__c};var ra={ReactCurrentDispatcher:{current:{readContext:function(i){return ea.__n[i.__c].props.value}}}},Sd="17.0.2";function oa(i){return be.bind(null,i)}function br(i){return!!i&&i.$$typeof===Ks}function sa(i){return br(i)?ad.apply(null,arguments):i}function aa(i){return!!i.__k&&(Sn(null,i),!0)}function la(i){return i&&(i.base||i.nodeType===1&&i)||null}var ua=function(i,t){return i(t)},ca=function(i,t){return i(t)},bd=Ye,F={useState:ut,useReducer:pr,useEffect:Ot,useLayoutEffect:mr,useRef:Qe,useImperativeHandle:Ns,useMemo:ct,useCallback:$e,useContext:En,useDebugValue:Is,version:"17.0.2",Children:Gs,render:Js,hydrate:Qs,unmountComponentAtNode:aa,createPortal:Sr,createElement:be,createContext:bn,createFactory:oa,cloneElement:sa,createRef:cr,Fragment:Ye,isValidElement:br,findDOMNode:la,Component:ye,PureComponent:xn,memo:Us,forwardRef:wr,flushSync:ca,unstable_batchedUpdates:ua,StrictMode:Ye,Suspense:_n,SuspenseList:Wt,lazy:Ys,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ra},Er=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:F,version:Sd,Children:Gs,render:Js,hydrate:Qs,unmountComponentAtNode:aa,createPortal:Sr,createFactory:oa,cloneElement:sa,isValidElement:br,findDOMNode:la,PureComponent:xn,memo:Us,forwardRef:wr,flushSync:ca,unstable_batchedUpdates:ua,StrictMode:bd,Suspense:_n,SuspenseList:Wt,lazy:Ys,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ra,createElement:be,createContext:bn,createRef:cr,Fragment:Ye,Component:ye,useState:ut,useReducer:pr,useEffect:Ot,useLayoutEffect:mr,useRef:Qe,useImperativeHandle:Ns,useMemo:ct,useCallback:$e,useContext:En,useDebugValue:Is,useErrorBoundary:ld}),ht=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ed(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function xr(i){if(i.__esModule)return i;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(i).forEach(function(e){var n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return i[e]}})}),t}var _r={exports:{}};function Tr(){}Tr.prototype={on:function(i,t,e){var n=this.e||(this.e={});return(n[i]||(n[i]=[])).push({fn:t,ctx:e}),this},once:function(i,t,e){var n=this;function r(){n.off(i,r),t.apply(e,arguments)}return r._=t,this.on(i,r,e)},emit:function(i){var t=[].slice.call(arguments,1),e=((this.e||(this.e={}))[i]||[]).slice(),n=0,r=e.length;for(n;n<r;n++)e[n].fn.apply(e[n].ctx,t);return this},off:function(i,t){var e=this.e||(this.e={}),n=e[i],r=[];if(n&&t)for(var o=0,s=n.length;o<s;o++)n[o].fn!==t&&n[o].fn._!==t&&r.push(n[o]);return r.length?e[i]=r:delete e[i],this}},_r.exports=Tr,_r.exports.TinyEmitter=Tr;var $n=_r.exports,ei={exports:{}},ha={},jt=xr(Er),Tn={exports:{}},xd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_d=xd,Td=_d;function da(){}function fa(){}fa.resetWarningCache=da;var Cd=function(){function i(n,r,o,s,l,a){if(a!==Td){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}i.isRequired=i;function t(){return i}var e={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:t,element:i,elementType:i,instanceOf:t,node:i,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:fa,resetWarningCache:da};return e.PropTypes=e,e};Tn.exports=Cd();function pa(i){var t,e,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i))for(t=0;t<i.length;t++)i[t]&&(e=pa(i[t]))&&(n&&(n+=" "),n+=e);else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function ma(){for(var i,t,e=0,n="";e<arguments.length;)(i=arguments[e++])&&(t=pa(i))&&(n&&(n+=" "),n+=t);return n}var Pd=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",clsx:ma,default:ma}),Ad=xr(Pd),me={},et={};Object.defineProperty(et,"__esModule",{value:!0}),et.dontSetMe=Fd,et.findInArray=Od,et.int=Md,et.isFunction=Dd,et.isNum=Rd;function Od(i,t){for(let e=0,n=i.length;e<n;e++)if(t.apply(t,[i[e],e,i]))return i[e]}function Dd(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Function]"}function Rd(i){return typeof i=="number"&&!isNaN(i)}function Md(i){return parseInt(i,10)}function Fd(i,t,e){if(i[t])return new Error("Invalid prop ".concat(t," passed to ").concat(e," - do not set this, set it on the child."))}var Dt={};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.browserPrefixToKey=va,Dt.browserPrefixToStyle=Ld,Dt.default=void 0,Dt.getPrefix=ga;const Cr=["Moz","Webkit","O","ms"];function ga(){var i;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const e=(i=window.document)===null||i===void 0||(i=i.documentElement)===null||i===void 0?void 0:i.style;if(!e||t in e)return"";for(let n=0;n<Cr.length;n++)if(va(t,Cr[n])in e)return Cr[n];return""}function va(i,t){return t?"".concat(t).concat(kd(i)):i}function Ld(i,t){return t?"-".concat(t.toLowerCase(),"-").concat(i):i}function kd(i){let t="",e=!0;for(let n=0;n<i.length;n++)e?(t+=i[n].toUpperCase(),e=!1):i[n]==="-"?e=!0:t+=i[n];return t}Dt.default=ga(),Object.defineProperty(me,"__esModule",{value:!0}),me.addClassName=ba,me.addEvent=Id,me.addUserSelectStyles=Zd,me.createCSSTransform=Gd,me.createSVGTransform=qd,me.getTouch=Xd,me.getTouchIdentifier=Yd,me.getTranslation=Pr,me.innerHeight=Ud,me.innerWidth=Wd,me.matchesSelector=Sa,me.matchesSelectorAndParentsTo=Nd,me.offsetXYFromParent=jd,me.outerHeight=zd,me.outerWidth=Vd,me.removeClassName=Ea,me.removeEvent=Hd,me.removeUserSelectStyles=Kd;var ze=et,ya=Bd(Dt);function wa(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(wa=function(n){return n?e:t})(i)}function Bd(i,t){if(!t&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var e=wa(t);if(e&&e.has(i))return e.get(i);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in i)if(o!=="default"&&Object.prototype.hasOwnProperty.call(i,o)){var s=r?Object.getOwnPropertyDescriptor(i,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=i[o]}return n.default=i,e&&e.set(i,n),n}let ti="";function Sa(i,t){return ti||(ti=(0,ze.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(e){return(0,ze.isFunction)(i[e])})),(0,ze.isFunction)(i[ti])?i[ti](t):!1}function Nd(i,t,e){let n=i;do{if(Sa(n,t))return!0;if(n===e)return!1;n=n.parentNode}while(n);return!1}function Id(i,t,e,n){if(!i)return;const r={capture:!0,...n};i.addEventListener?i.addEventListener(t,e,r):i.attachEvent?i.attachEvent("on"+t,e):i["on"+t]=e}function Hd(i,t,e,n){if(!i)return;const r={capture:!0,...n};i.removeEventListener?i.removeEventListener(t,e,r):i.detachEvent?i.detachEvent("on"+t,e):i["on"+t]=null}function zd(i){let t=i.clientHeight;const e=i.ownerDocument.defaultView.getComputedStyle(i);return t+=(0,ze.int)(e.borderTopWidth),t+=(0,ze.int)(e.borderBottomWidth),t}function Vd(i){let t=i.clientWidth;const e=i.ownerDocument.defaultView.getComputedStyle(i);return t+=(0,ze.int)(e.borderLeftWidth),t+=(0,ze.int)(e.borderRightWidth),t}function Ud(i){let t=i.clientHeight;const e=i.ownerDocument.defaultView.getComputedStyle(i);return t-=(0,ze.int)(e.paddingTop),t-=(0,ze.int)(e.paddingBottom),t}function Wd(i){let t=i.clientWidth;const e=i.ownerDocument.defaultView.getComputedStyle(i);return t-=(0,ze.int)(e.paddingLeft),t-=(0,ze.int)(e.paddingRight),t}function jd(i,t,e){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(i.clientX+t.scrollLeft-r.left)/e,s=(i.clientY+t.scrollTop-r.top)/e;return{x:o,y:s}}function Gd(i,t){const e=Pr(i,t,"px");return{[(0,ya.browserPrefixToKey)("transform",ya.default)]:e}}function qd(i,t){return Pr(i,t,"")}function Pr(i,t,e){let{x:n,y:r}=i,o="translate(".concat(n).concat(e,",").concat(r).concat(e,")");if(t){const s="".concat(typeof t.x=="string"?t.x:t.x+e),l="".concat(typeof t.y=="string"?t.y:t.y+e);o="translate(".concat(s,", ").concat(l,")")+o}return o}function Xd(i,t){return i.targetTouches&&(0,ze.findInArray)(i.targetTouches,e=>t===e.identifier)||i.changedTouches&&(0,ze.findInArray)(i.changedTouches,e=>t===e.identifier)}function Yd(i){if(i.targetTouches&&i.targetTouches[0])return i.targetTouches[0].identifier;if(i.changedTouches&&i.changedTouches[0])return i.changedTouches[0].identifier}function Zd(i){if(!i)return;let t=i.getElementById("react-draggable-style-el");t||(t=i.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} `,i.getElementsByTagName("head")[0].appendChild(t)),i.body&&ba(i.body,"react-draggable-transparent-selection")}function Kd(i){if(!!i)try{if(i.body&&Ea(i.body,"react-draggable-transparent-selection"),i.selection)i.selection.empty();else{const t=(i.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function ba(i,t){i.classList?i.classList.add(t):i.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(i.className+=" ".concat(t))}function Ea(i,t){i.classList?i.classList.remove(t):i.className=i.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var tt={};Object.defineProperty(tt,"__esModule",{value:!0}),tt.canDragX=$d,tt.canDragY=ef,tt.createCoreData=nf,tt.createDraggableData=rf,tt.getBoundPosition=Jd,tt.getControlPosition=tf,tt.snapToGrid=Qd;var Ve=et,Gt=me;function Jd(i,t,e){if(!i.props.bounds)return[t,e];let{bounds:n}=i.props;n=typeof n=="string"?n:of(n);const r=Ar(i);if(typeof n=="string"){const{ownerDocument:o}=r,s=o.defaultView;let l;if(n==="parent"?l=r.parentNode:l=o.querySelector(n),!(l instanceof s.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');const a=l,u=s.getComputedStyle(r),c=s.getComputedStyle(a);n={left:-r.offsetLeft+(0,Ve.int)(c.paddingLeft)+(0,Ve.int)(u.marginLeft),top:-r.offsetTop+(0,Ve.int)(c.paddingTop)+(0,Ve.int)(u.marginTop),right:(0,Gt.innerWidth)(a)-(0,Gt.outerWidth)(r)-r.offsetLeft+(0,Ve.int)(c.paddingRight)-(0,Ve.int)(u.marginRight),bottom:(0,Gt.innerHeight)(a)-(0,Gt.outerHeight)(r)-r.offsetTop+(0,Ve.int)(c.paddingBottom)-(0,Ve.int)(u.marginBottom)}}return(0,Ve.isNum)(n.right)&&(t=Math.min(t,n.right)),(0,Ve.isNum)(n.bottom)&&(e=Math.min(e,n.bottom)),(0,Ve.isNum)(n.left)&&(t=Math.max(t,n.left)),(0,Ve.isNum)(n.top)&&(e=Math.max(e,n.top)),[t,e]}function Qd(i,t,e){const n=Math.round(t/i[0])*i[0],r=Math.round(e/i[1])*i[1];return[n,r]}function $d(i){return i.props.axis==="both"||i.props.axis==="x"}function ef(i){return i.props.axis==="both"||i.props.axis==="y"}function tf(i,t,e){const n=typeof t=="number"?(0,Gt.getTouch)(i,t):null;if(typeof t=="number"&&!n)return null;const r=Ar(e),o=e.props.offsetParent||r.offsetParent||r.ownerDocument.body;return(0,Gt.offsetXYFromParent)(n||i,o,e.props.scale)}function nf(i,t,e){const n=!(0,Ve.isNum)(i.lastX),r=Ar(i);return n?{node:r,deltaX:0,deltaY:0,lastX:t,lastY:e,x:t,y:e}:{node:r,deltaX:t-i.lastX,deltaY:e-i.lastY,lastX:i.lastX,lastY:i.lastY,x:t,y:e}}function rf(i,t){const e=i.props.scale;return{node:t.node,x:i.state.x+t.deltaX/e,y:i.state.y+t.deltaY/e,deltaX:t.deltaX/e,deltaY:t.deltaY/e,lastX:i.state.x,lastY:i.state.y}}function of(i){return{left:i.left,top:i.top,right:i.right,bottom:i.bottom}}function Ar(i){const t=i.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var ni={},ii={};Object.defineProperty(ii,"__esModule",{value:!0}),ii.default=sf;function sf(){}Object.defineProperty(ni,"__esModule",{value:!0}),ni.default=void 0;var Or=lf(jt),Ne=Rr(Tn.exports),af=Rr(jt),Me=me,wt=tt,Dr=et,Cn=Rr(ii);function Rr(i){return i&&i.__esModule?i:{default:i}}function xa(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(xa=function(n){return n?e:t})(i)}function lf(i,t){if(!t&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var e=xa(t);if(e&&e.has(i))return e.get(i);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in i)if(o!=="default"&&Object.prototype.hasOwnProperty.call(i,o)){var s=r?Object.getOwnPropertyDescriptor(i,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=i[o]}return n.default=i,e&&e.set(i,n),n}function Be(i,t,e){return t=uf(t),t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function uf(i){var t=cf(i,"string");return typeof t=="symbol"?t:String(t)}function cf(i,t){if(typeof i!="object"||i===null)return i;var e=i[Symbol.toPrimitive];if(e!==void 0){var n=e.call(i,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}const Ke={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let St=Ke.mouse;class ri extends Or.Component{constructor(){super(...arguments),Be(this,"dragging",!1),Be(this,"lastX",NaN),Be(this,"lastY",NaN),Be(this,"touchIdentifier",null),Be(this,"mounted",!1),Be(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;const e=this.findDOMNode();if(!e||!e.ownerDocument||!e.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=e;if(this.props.disabled||!(t.target instanceof n.defaultView.Node)||this.props.handle&&!(0,Me.matchesSelectorAndParentsTo)(t.target,this.props.handle,e)||this.props.cancel&&(0,Me.matchesSelectorAndParentsTo)(t.target,this.props.cancel,e))return;t.type==="touchstart"&&t.preventDefault();const r=(0,Me.getTouchIdentifier)(t);this.touchIdentifier=r;const o=(0,wt.getControlPosition)(t,r,this);if(o==null)return;const{x:s,y:l}=o,a=(0,wt.createCoreData)(this,s,l);(0,Cn.default)("DraggableCore: handleDragStart: %j",a),(0,Cn.default)("calling",this.props.onStart),!(this.props.onStart(t,a)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Me.addUserSelectStyles)(n),this.dragging=!0,this.lastX=s,this.lastY=l,(0,Me.addEvent)(n,St.move,this.handleDrag),(0,Me.addEvent)(n,St.stop,this.handleDragStop))}),Be(this,"handleDrag",t=>{const e=(0,wt.getControlPosition)(t,this.touchIdentifier,this);if(e==null)return;let{x:n,y:r}=e;if(Array.isArray(this.props.grid)){let l=n-this.lastX,a=r-this.lastY;if([l,a]=(0,wt.snapToGrid)(this.props.grid,l,a),!l&&!a)return;n=this.lastX+l,r=this.lastY+a}const o=(0,wt.createCoreData)(this,n,r);if((0,Cn.default)("DraggableCore: handleDrag: %j",o),this.props.onDrag(t,o)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const a=document.createEvent("MouseEvents");a.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(a)}return}this.lastX=n,this.lastY=r}),Be(this,"handleDragStop",t=>{if(!this.dragging)return;const e=(0,wt.getControlPosition)(t,this.touchIdentifier,this);if(e==null)return;let{x:n,y:r}=e;if(Array.isArray(this.props.grid)){let a=n-this.lastX||0,u=r-this.lastY||0;[a,u]=(0,wt.snapToGrid)(this.props.grid,a,u),n=this.lastX+a,r=this.lastY+u}const o=(0,wt.createCoreData)(this,n,r);if(this.props.onStop(t,o)===!1||this.mounted===!1)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,Me.removeUserSelectStyles)(l.ownerDocument),(0,Cn.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,Cn.default)("DraggableCore: Removing handlers"),(0,Me.removeEvent)(l.ownerDocument,St.move,this.handleDrag),(0,Me.removeEvent)(l.ownerDocument,St.stop,this.handleDragStop))}),Be(this,"onMouseDown",t=>(St=Ke.mouse,this.handleDragStart(t))),Be(this,"onMouseUp",t=>(St=Ke.mouse,this.handleDragStop(t))),Be(this,"onTouchStart",t=>(St=Ke.touch,this.handleDragStart(t))),Be(this,"onTouchEnd",t=>(St=Ke.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,Me.addEvent)(t,Ke.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:e}=t;(0,Me.removeEvent)(e,Ke.mouse.move,this.handleDrag),(0,Me.removeEvent)(e,Ke.touch.move,this.handleDrag),(0,Me.removeEvent)(e,Ke.mouse.stop,this.handleDragStop),(0,Me.removeEvent)(e,Ke.touch.stop,this.handleDragStop),(0,Me.removeEvent)(t,Ke.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Me.removeUserSelectStyles)(e)}}findDOMNode(){var t,e;return(t=this.props)!==null&&t!==void 0&&t.nodeRef?(e=this.props)===null||e===void 0||(e=e.nodeRef)===null||e===void 0?void 0:e.current:af.default.findDOMNode(this)}render(){return Or.cloneElement(Or.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}ni.default=ri,Be(ri,"displayName","DraggableCore"),Be(ri,"propTypes",{allowAnyClick:Ne.default.bool,children:Ne.default.node.isRequired,disabled:Ne.default.bool,enableUserSelectHack:Ne.default.bool,offsetParent:function(i,t){if(i[t]&&i[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Ne.default.arrayOf(Ne.default.number),handle:Ne.default.string,cancel:Ne.default.string,nodeRef:Ne.default.object,onStart:Ne.default.func,onDrag:Ne.default.func,onStop:Ne.default.func,onMouseDown:Ne.default.func,scale:Ne.default.number,className:Dr.dontSetMe,style:Dr.dontSetMe,transform:Dr.dontSetMe}),Be(ri,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(i){Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"DraggableCore",{enumerable:!0,get:function(){return a.default}}),i.default=void 0;var t=d(jt),e=c(Tn.exports),n=c(jt),r=c(Ad),o=me,s=tt,l=et,a=c(ni),u=c(ii);function c(f){return f&&f.__esModule?f:{default:f}}function h(f){if(typeof WeakMap!="function")return null;var w=new WeakMap,A=new WeakMap;return(h=function(T){return T?A:w})(f)}function d(f,w){if(!w&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var A=h(w);if(A&&A.has(f))return A.get(f);var T={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var O in f)if(O!=="default"&&Object.prototype.hasOwnProperty.call(f,O)){var k=D?Object.getOwnPropertyDescriptor(f,O):null;k&&(k.get||k.set)?Object.defineProperty(T,O,k):T[O]=f[O]}return T.default=f,A&&A.set(f,T),T}function g(){return g=Object.assign?Object.assign.bind():function(f){for(var w=1;w<arguments.length;w++){var A=arguments[w];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(f[T]=A[T])}return f},g.apply(this,arguments)}function y(f,w,A){return w=x(w),w in f?Object.defineProperty(f,w,{value:A,enumerable:!0,configurable:!0,writable:!0}):f[w]=A,f}function x(f){var w=b(f,"string");return typeof w=="symbol"?w:String(w)}function b(f,w){if(typeof f!="object"||f===null)return f;var A=f[Symbol.toPrimitive];if(A!==void 0){var T=A.call(f,w||"default");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(f)}class P extends t.Component{static getDerivedStateFromProps(w,A){let{position:T}=w,{prevPropsPosition:D}=A;return T&&(!D||T.x!==D.x||T.y!==D.y)?((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:T,prevPropsPosition:D}),{x:T.x,y:T.y,prevPropsPosition:{...T}}):null}constructor(w){super(w),y(this,"onDragStart",(A,T)=>{if((0,u.default)("Draggable: onDragStart: %j",T),this.props.onStart(A,(0,s.createDraggableData)(this,T))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),y(this,"onDrag",(A,T)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",T);const D=(0,s.createDraggableData)(this,T),O={x:D.x,y:D.y,slackX:0,slackY:0};if(this.props.bounds){const{x:B,y:z}=O;O.x+=this.state.slackX,O.y+=this.state.slackY;const[U,H]=(0,s.getBoundPosition)(this,O.x,O.y);O.x=U,O.y=H,O.slackX=this.state.slackX+(B-O.x),O.slackY=this.state.slackY+(z-O.y),D.x=O.x,D.y=O.y,D.deltaX=O.x-this.state.x,D.deltaY=O.y-this.state.y}if(this.props.onDrag(A,D)===!1)return!1;this.setState(O)}),y(this,"onDragStop",(A,T)=>{if(!this.state.dragging||this.props.onStop(A,(0,s.createDraggableData)(this,T))===!1)return!1;(0,u.default)("Draggable: onDragStop: %j",T);const O={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:B,y:z}=this.props.position;O.x=B,O.y=z}this.setState(O)}),this.state={dragging:!1,dragged:!1,x:w.position?w.position.x:w.defaultPosition.x,y:w.position?w.position.y:w.defaultPosition.y,prevPropsPosition:{...w.position},slackX:0,slackY:0,isElementSVG:!1},w.position&&!(w.onDrag||w.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var w,A;return(w=(A=this.props)===null||A===void 0||(A=A.nodeRef)===null||A===void 0?void 0:A.current)!==null&&w!==void 0?w:n.default.findDOMNode(this)}render(){const{axis:w,bounds:A,children:T,defaultPosition:D,defaultClassName:O,defaultClassNameDragging:k,defaultClassNameDragged:B,position:z,positionOffset:U,scale:H,...G}=this.props;let q={},ee=null;const te=!Boolean(z)||this.state.dragging,re=z||D,ue={x:(0,s.canDragX)(this)&&te?this.state.x:re.x,y:(0,s.canDragY)(this)&&te?this.state.y:re.y};this.state.isElementSVG?ee=(0,o.createSVGTransform)(ue,U):q=(0,o.createCSSTransform)(ue,U);const j=(0,r.default)(T.props.className||"",O,{[k]:this.state.dragging,[B]:this.state.dragged});return t.createElement(a.default,g({},G,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(T),{className:j,style:{...T.props.style,...q},transform:ee}))}}i.default=P,y(P,"displayName","Draggable"),y(P,"propTypes",{...a.default.propTypes,axis:e.default.oneOf(["both","x","y","none"]),bounds:e.default.oneOfType([e.default.shape({left:e.default.number,right:e.default.number,top:e.default.number,bottom:e.default.number}),e.default.string,e.default.oneOf([!1])]),defaultClassName:e.default.string,defaultClassNameDragging:e.default.string,defaultClassNameDragged:e.default.string,defaultPosition:e.default.shape({x:e.default.number,y:e.default.number}),positionOffset:e.default.shape({x:e.default.oneOfType([e.default.number,e.default.string]),y:e.default.oneOfType([e.default.number,e.default.string])}),position:e.default.shape({x:e.default.number,y:e.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),y(P,"defaultProps",{...a.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(ha);const{default:_a,DraggableCore:hf}=ha;ei.exports=_a,ei.exports.default=_a,ei.exports.DraggableCore=hf;var df=ei.exports,ff=["second","minute","hour","day","week","month","year"];function pf(i,t){if(t===0)return["just now","right now"];var e=ff[Math.floor(t/2)];return i>1&&(e+="s"),[i+" "+e+" ago","in "+i+" "+e]}var mf=["\u79D2","\u5206\u949F","\u5C0F\u65F6","\u5929","\u5468","\u4E2A\u6708","\u5E74"];function gf(i,t){if(t===0)return["\u521A\u521A","\u7247\u523B\u540E"];var e=mf[~~(t/2)];return[i+" "+e+"\u524D",i+" "+e+"\u540E"]}var Mr={},pe=function(i,t){Mr[i]=t},Ta=function(i){return Mr[i]||Mr.en_US},Rt=[60,60,24,7,365/7/12,12];function Ca(i){return i instanceof Date?i:!isNaN(i)||/^\d+$/.test(i)?new Date(parseInt(i)):(i=(i||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(i))}function Pa(i,t){var e=i<0?1:0;i=Math.abs(i);for(var n=i,r=0;i>=Rt[r]&&r<Rt.length;r++)i/=Rt[r];return i=Math.floor(i),r*=2,i>(r===0?9:1)&&(r+=1),t(i,r,n)[e].replace("%s",i.toString())}function Aa(i,t){var e=t?Ca(t):new Date;return(+e-+Ca(i))/1e3}function vf(i){for(var t=1,e=0,n=Math.abs(i);i>=Rt[e]&&e<Rt.length;e++)i/=Rt[e],t*=Rt[e];return n=n%t,n=n?t-n:t,Math.ceil(n)}var yf=function(i,t,e){var n=Aa(i,e&&e.relativeDate);return Pa(n,Ta(t))},Oa="timeago-id";function wf(i){return i.getAttribute("datetime")}function Sf(i,t){i.setAttribute(Oa,t)}function Da(i){return parseInt(i.getAttribute(Oa))}var Fr={},Lr=function(i){clearTimeout(i),delete Fr[i]};function Ra(i,t,e,n){Lr(Da(i));var r=n.relativeDate,o=n.minInterval,s=Aa(t,r);i.innerText=Pa(s,e);var l=setTimeout(function(){Ra(i,t,e,n)},Math.min(Math.max(vf(s),o||1)*1e3,2147483647));Fr[l]=0,Sf(i,l)}function Ma(i){i?Lr(Da(i)):Object.keys(Fr).forEach(Lr)}function bf(i,t,e){var n=i.length?i:[i];return n.forEach(function(r){Ra(r,wf(r),Ta(t),e||{})}),n}pe("en_US",pf),pe("zh_CN",gf);var Ef=globalThis&&globalThis.__extends||function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},i(t,e)};return function(t,e){i(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),kr=globalThis&&globalThis.__assign||function(){return kr=Object.assign||function(i){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},kr.apply(this,arguments)},xf=globalThis&&globalThis.__rest||function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e},_f=function(i){return""+(i instanceof Date?i.getTime():i)},Tf=function(i){Ef(t,i);function t(){var e=i!==null&&i.apply(this,arguments)||this;return e.dom=null,e}return t.prototype.componentDidMount=function(){this.renderTimeAgo()},t.prototype.componentDidUpdate=function(){this.renderTimeAgo()},t.prototype.renderTimeAgo=function(){var e=this.props,n=e.live,r=e.datetime,o=e.locale,s=e.opts;Ma(this.dom),n!==!1&&(this.dom.setAttribute("datetime",_f(r)),bf(this.dom,o,s))},t.prototype.componentWillUnmount=function(){Ma(this.dom)},t.prototype.render=function(){var e=this,n=this.props,r=n.datetime;n.live;var o=n.locale,s=n.opts,l=xf(n,["datetime","live","locale","opts"]);return be("time",kr({ref:function(a){e.dom=a}},l),yf(r,o,s))},t.defaultProps={live:!0,className:""},t}(xn);function Cf(i,t){const e=n=>{i.current&&!i.current.contains(event.target)&&t()};Ot(()=>(document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)))}var Fa=Object.prototype.toString,La=function(t){var e=Fa.call(t),n=e==="[object Arguments]";return n||(n=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Fa.call(t.callee)==="[object Function]"),n},ka;if(!Object.keys){var oi=Object.prototype.hasOwnProperty,Ba=Object.prototype.toString,Pf=La,Na=Object.prototype.propertyIsEnumerable,Af=!Na.call({toString:null},"toString"),Of=Na.call(function(){},"prototype"),si=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Br=function(i){var t=i.constructor;return t&&t.prototype===i},Df={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Rf=function(){if(typeof window=="undefined")return!1;for(var i in window)try{if(!Df["$"+i]&&oi.call(window,i)&&window[i]!==null&&typeof window[i]=="object")try{Br(window[i])}catch{return!0}}catch{return!0}return!1}(),Mf=function(i){if(typeof window=="undefined"||!Rf)return Br(i);try{return Br(i)}catch{return!1}};ka=function(t){var e=t!==null&&typeof t=="object",n=Ba.call(t)==="[object Function]",r=Pf(t),o=e&&Ba.call(t)==="[object String]",s=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var l=Of&&n;if(o&&t.length>0&&!oi.call(t,0))for(var a=0;a<t.length;++a)s.push(String(a));if(r&&t.length>0)for(var u=0;u<t.length;++u)s.push(String(u));else for(var c in t)!(l&&c==="prototype")&&oi.call(t,c)&&s.push(String(c));if(Af)for(var h=Mf(t),d=0;d<si.length;++d)!(h&&si[d]==="constructor")&&oi.call(t,si[d])&&s.push(si[d]);return s}}var Ff=ka,Lf=Array.prototype.slice,kf=La,Ia=Object.keys,ai=Ia?function(t){return Ia(t)}:Ff,Ha=Object.keys;ai.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(n){return kf(n)?Ha(Lf.call(n)):Ha(n)})}else Object.keys=ai;return Object.keys||ai};var Bf=ai,za=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),n=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;t[e]=r;for(e in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,e);if(s.value!==r||s.enumerable!==!0)return!1}return!0},Va=typeof Symbol!="undefined"&&Symbol,Nf=za,Ua=function(){return typeof Va