feffery_utils_components 0.2.0-rc17 → 0.2.0-rc19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESCRIPTION +1 -1
- package/NAMESPACE +1 -0
- package/Project.toml +1 -1
- package/README.md +1 -1
- package/feffery_utils_components/FefferyEventSource.py +82 -0
- package/feffery_utils_components/_imports_.py +2 -0
- package/feffery_utils_components/async-feffery_animated_3d_background_p5.js +1 -1
- package/feffery_utils_components/async-feffery_animated_3d_background_three.js +1 -1
- package/feffery_utils_components/async-feffery_animated_image.js +1 -1
- package/feffery_utils_components/async-feffery_aplayer.js +1 -1
- package/feffery_utils_components/async-feffery_auto_animate.js +1 -1
- package/feffery_utils_components/async-feffery_auto_fit.js +1 -1
- package/feffery_utils_components/async-feffery_burger.js +1 -1
- package/feffery_utils_components/async-feffery_captcha.js +1 -1
- package/feffery_utils_components/async-feffery_color_pickers.js +1 -1
- package/feffery_utils_components/async-feffery_dom2image.js +1 -1
- package/feffery_utils_components/async-feffery_dplayer.js +1 -1
- package/feffery_utils_components/async-feffery_emoji_picker.js +1 -1
- package/feffery_utils_components/async-feffery_excel_preview.js +1 -1
- package/feffery_utils_components/async-feffery_extra_spinner.js +1 -1
- package/feffery_utils_components/async-feffery_fancy_button.js +1 -1
- package/feffery_utils_components/async-feffery_grid.js +1 -1
- package/feffery_utils_components/async-feffery_http_requests.js +1 -1
- package/feffery_utils_components/async-feffery_image_cropper.js +1 -1
- package/feffery_utils_components/async-feffery_json_viewer.js +1 -1
- package/feffery_utils_components/async-feffery_local_large_storage.js +1 -1
- package/feffery_utils_components/async-feffery_markdown_editor.js +1 -1
- package/feffery_utils_components/async-feffery_motion.js +1 -1
- package/feffery_utils_components/async-feffery_music_player.js +1 -1
- package/feffery_utils_components/async-feffery_photo_sphere_viewer.js +1 -1
- package/feffery_utils_components/async-feffery_resizable.js +1 -1
- package/feffery_utils_components/async-feffery_rich_text_editor.js +1 -1
- package/feffery_utils_components/async-feffery_rnd.js +1 -1
- package/feffery_utils_components/async-feffery_seamless_scroll.js +1 -1
- package/feffery_utils_components/async-feffery_shortcut_panel.js +1 -1
- package/feffery_utils_components/async-feffery_slider_captcha.js +1 -1
- package/feffery_utils_components/async-feffery_sortable.js +1 -1
- package/feffery_utils_components/async-feffery_vditor.js +1 -1
- package/feffery_utils_components/async-feffery_word_preview.js +1 -1
- package/feffery_utils_components/feffery_utils_components.min.js +2 -2
- package/feffery_utils_components/metadata.json +153 -0
- package/feffery_utils_components/package-info.json +1 -1
- package/package.json +1 -1
- package/src/lib/components/FefferyCountUp.react.js +28 -5
- package/src/lib/components/FefferyEventSource.react.js +150 -0
- package/src/lib/index.js +3 -1
- package/usage.py +33 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[27],{531:function(k,t,e){"use strict";e.r(t);function d(t,e,i){return Math.max(Math.min(t,i),e)}function x(t,e){return Math.round(t/e)*e}function u(t,e){return new RegExp(t,"i").test(e)}function v(t){return Boolean(t.touches&&t.touches.length)}function S(o,s,t){void 0===t&&(t=0);var e=s.reduce(function(t,e,i){return Math.abs(e-o)<Math.abs(s[t]-o)?i:t},0),i=Math.abs(s[e]-o);return 0===t||i<t?s[e]:o}function o(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:t+"px"}function R(t,e,i,o){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return o*(Number(t.replace("vh",""))/100)}return t}var s,r,i,n,N=e(1),a=e(562),P=e.n(a),W=e(26),a=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=function(){return(h=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},p={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},l={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},c={width:"20px",height:"20px",position:"absolute"},_={top:h(h({},p),{top:"-5px"}),right:h(h({},l),{left:void 0,right:"-5px"}),bottom:h(h({},p),{top:void 0,bottom:"-5px"}),left:h(h({},l),{left:"-5px"}),topRight:h(h({},c),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:h(h({},c),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:h(h({},c),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:h(h({},c),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=(i=N.PureComponent,a(m,i),m.prototype.render=function(){return N.createElement("div",{className:this.props.className||"",style:h(h({position:"absolute",userSelect:"none"},_[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},m),p=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),f=function(){return(f=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},B={width:"auto",height:"auto"},T=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],F=(s=N.PureComponent,p(b,s),Object.defineProperty(b.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||B},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"size",{get:function(){var t,e,i,o=0,s=0;return this.resizable&&this.window&&(t=this.resizable.offsetWidth,e=this.resizable.offsetHeight,"relative"!==(i=this.resizable.style.position)&&(this.resizable.style.position="relative"),o="auto"!==this.resizable.style.width?this.resizable.offsetWidth:t,s="auto"!==this.resizable.style.height?this.resizable.offsetHeight:e,this.resizable.style.position=i),{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"sizeStyle",{get:function(){function t(t){var e;return void 0===i.state[t]||"auto"===i.state[t]?"auto":i.propsSize&&i.propsSize[t]&&i.propsSize[t].toString().endsWith("%")?i.state[t].toString().endsWith("%")?i.state[t].toString():(e=i.getParentSize(),Number(i.state[t].toString().replace("px",""))/e[t]*100+"%"):o(i.state[t])}var i=this,e=this.props.size;return{width:e&&void 0!==e.width&&!this.state.isResizing?o(e.width):t("width"),height:e&&void 0!==e.height&&!this.state.isResizing?o(e.height):t("height")}},enumerable:!1,configurable:!0}),b.prototype.getParentSize=function(){var t,e,i,o;return this.parentNode?(t=this.appendBase())?(e=!1,"wrap"!==(i=this.parentNode.style.flexWrap)&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%",o={width:t.offsetWidth,height:t.offsetHeight},e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),o):{width:0,height:0}:this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0}},b.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},b.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},b.prototype.componentDidMount=function(){var t;this.resizable&&this.window&&(t=this.window.getComputedStyle(this.resizable),this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0}))},b.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},b.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},b.prototype.calculateNewMaxFromBoundary=function(t,e){var i,o,s=this.props.boundsByDirection,r=this.state.direction,n=s&&u("left",r),s=s&&u("top",r);return"parent"===this.props.bounds?(r=this.parentNode)&&(i=n?this.resizableRight-this.parentLeft:r.offsetWidth+(this.parentLeft-this.resizableLeft),o=s?this.resizableBottom-this.parentTop:r.offsetHeight+(this.parentTop-this.resizableTop)):"window"===this.props.bounds?this.window&&(i=n?this.resizableRight:this.window.innerWidth-this.resizableLeft,o=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=n?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),o=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop)),{maxWidth:t=i&&Number.isFinite(i)?t&&t<i?t:i:t,maxHeight:e=o&&Number.isFinite(o)?e&&e<o?e:o:e}},b.prototype.calculateNewSizeFromDirection=function(t,e){var i=this.props.scale||1,o=this.props.resizeRatio||1,s=this.state,r=s.direction,s=s.original,n=this.props,a=n.lockAspectRatio,h=n.lockAspectRatioExtraHeight,n=n.lockAspectRatioExtraWidth,p=s.width,l=s.height,h=h||0,n=n||0;return u("right",r)&&(p=s.width+(t-s.x)*o/i,a)&&(l=(p-n)/this.ratio+h),u("left",r)&&(p=s.width-(t-s.x)*o/i,a)&&(l=(p-n)/this.ratio+h),u("bottom",r)&&(l=s.height+(e-s.y)*o/i,a)&&(p=(l-h)*this.ratio+n),{newWidth:p=u("top",r)&&(l=s.height-(e-s.y)*o/i,a)?(l-h)*this.ratio+n:p,newHeight:l}},b.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,o){var s,r,n=this.props,a=n.lockAspectRatio,h=n.lockAspectRatioExtraHeight,n=n.lockAspectRatioExtraWidth,p=void 0===o.width?10:o.width,l=void 0===i.width||i.width<0?t:i.width,o=void 0===o.height?10:o.height,i=void 0===i.height||i.height<0?e:i.height,h=h||0,n=n||0;return e=a?(a=(o-h)*this.ratio+n,s=(i-h)*this.ratio+n,r=(p-n)/this.ratio+h,n=(l-n)/this.ratio+h,h=Math.max(p,a),a=Math.min(l,s),s=Math.max(o,r),r=Math.min(i,n),t=d(t,h,a),d(e,s,r)):(t=d(t,p,l),d(e,o,i)),{newWidth:t,newHeight:e}},b.prototype.setBoundingClientRect=function(){var t,e,i,o;"parent"===this.props.bounds&&(o=this.parentNode)&&(o=o.getBoundingClientRect(),this.parentLeft=o.left,this.parentTop=o.top),this.props.bounds&&"string"!=typeof this.props.bounds&&(o=this.props.bounds.getBoundingClientRect(),this.targetLeft=o.left,this.targetTop=o.top),this.resizable&&(t=(o=this.resizable.getBoundingClientRect()).left,e=o.top,i=o.right,o=o.bottom,this.resizableLeft=t,this.resizableRight=i,this.resizableTop=e,this.resizableBottom=o)},b.prototype.onResizeStart=function(t,e){var i,o,s,r,n;this.resizable&&this.window&&(s=o=0,t.nativeEvent&&(n=t.nativeEvent,Boolean((n.clientX||0===n.clientX)&&(n.clientY||0===n.clientY)))?(o=t.nativeEvent.clientX,s=t.nativeEvent.clientY):t.nativeEvent&&v(t.nativeEvent)&&(o=t.nativeEvent.touches[0].clientX,s=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(t,e,this.resizable)||(this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width)&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width}),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height,"auto"!==(n=this.window.getComputedStyle(this.resizable)).flexBasis&&(r=this.parentNode)&&(r=this.window.getComputedStyle(r).flexDirection,this.flexDir=r.startsWith("row")?"row":"column",i=n.flexBasis),this.setBoundingClientRect(),this.bindEvents(),r={original:{x:o,y:s,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:f(f({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i},this.setState(r)))},b.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&v(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i,o=this.props,s=o.maxWidth,r=o.maxHeight,n=o.minWidth,o=o.minHeight,a=(v(t)?t.touches[0]:t).clientX,h=(v(t)?t.touches[0]:t).clientY,p=this.state,l=p.direction,d=p.original,u=p.width,p=p.height,c=this.getParentSize(),f=(f=c,g=this.window.innerWidth,b=this.window.innerHeight,y=r,z=n,i=o,m=R(s,f.width,g,b),y=R(y,f.height,g,b),z=R(z,f.width,g,b),i=R(i,f.height,g,b),{maxWidth:void 0===m?void 0:Number(m),maxHeight:void 0===y?void 0:Number(y),minWidth:void 0===z?void 0:Number(z),minHeight:void 0===i?void 0:Number(i)}),s=f.maxWidth,r=f.maxHeight,n=f.minWidth,o=f.minHeight,g=this.calculateNewSizeFromDirection(a,h),b=g.newHeight,m=g.newWidth,y=this.calculateNewMaxFromBoundary(s,r),z=(this.props.snap&&this.props.snap.x&&(m=S(m,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(b=S(b,this.props.snap.y,this.props.snapGap)),this.calculateNewSizeFromAspectRatio(m,b,{width:y.maxWidth,height:y.maxHeight},{width:n,height:o})),h=(m=z.newWidth,b=z.newHeight,this.props.grid&&(i=x(m,this.props.grid[0]),f=x(b,this.props.grid[1]),m=0===(a=this.props.snapGap||0)||Math.abs(i-m)<=a?i:m,b=0===a||Math.abs(f-b)<=a?f:b),{width:m-d.width,height:b-d.height}),w=(u&&"string"==typeof u&&(u.endsWith("%")?m=m/c.width*100+"%":u.endsWith("vw")?m=m/this.window.innerWidth*100+"vw":u.endsWith("vh")&&(m=m/this.window.innerHeight*100+"vh")),p&&"string"==typeof p&&(p.endsWith("%")?b=b/c.height*100+"%":p.endsWith("vw")?b=b/this.window.innerWidth*100+"vw":p.endsWith("vh")&&(b=b/this.window.innerHeight*100+"vh")),{width:this.createSizeForCssProperty(m,"width"),height:this.createSizeForCssProperty(b,"height")}),g=("row"===this.flexDir?w.flexBasis=w.width:"column"===this.flexDir&&(w.flexBasis=w.height),this.state.width!==w.width),s=this.state.height!==w.height,r=this.state.flexBasis!==w.flexBasis,y=g||s||r;y&&Object(W.flushSync)(function(){e.setState(w)}),this.props.onResize&&y&&this.props.onResize(t,l,this.resizable,h)}},b.prototype.onMouseUp=function(t){var e=this.state,i=e.isResizing,o=e.direction,e=e.original;i&&this.resizable&&(i={width:this.size.width-e.width,height:this.size.height-e.height},this.props.onResizeStop&&this.props.onResizeStop(t,o,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:f(f({},this.state.backgroundStyle),{cursor:"auto"})}))},b.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},b.prototype.renderResizer=function(){var e=this,t=this.props,i=t.enable,o=t.handleStyles,s=t.handleClasses,r=t.handleWrapperStyle,n=t.handleWrapperClass,a=t.handleComponent;return i?(t=Object.keys(i).map(function(t){return!1!==i[t]?N.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:o&&o[t],className:s&&s[t]},a&&a[t]?a[t]:null):null}),N.createElement("div",{className:n,style:r},t)):null},b.prototype.render=function(){var i=this,t=Object.keys(this.props).reduce(function(t,e){return-1===T.indexOf(e)&&(t[e]=i.props[e]),t},{}),e=f(f(f({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0}),o=(this.state.flexBasis&&(e.flexBasis=this.state.flexBasis),this.props.as||"div");return N.createElement(o,f({ref:this.ref,style:e,className:this.props.className},t),this.state.isResizing&&N.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},b.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},b),g=function(t,e){return(g=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}))(t,e)};function b(t){var i=s.call(this,t)||this;return i.ratio=1,i.resizable=null,i.parentLeft=0,i.parentTop=0,i.resizableLeft=0,i.resizableRight=0,i.resizableTop=0,i.resizableBottom=0,i.targetLeft=0,i.targetTop=0,i.appendBase=function(){var t,e;return i.resizable&&i.window&&(t=i.parentNode)?((e=i.window.document.createElement("div")).style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add("__resizable_base__"):e.className+="__resizable_base__",t.appendChild(e),e):null},i.removeBase=function(t){var e=i.parentNode;e&&e.removeChild(t)},i.ref=function(t){t&&(i.resizable=t)},i.state={isResizing:!1,width:void 0===(i.propsSize&&i.propsSize.width)?"auto":i.propsSize&&i.propsSize.width,height:void 0===(i.propsSize&&i.propsSize.height)?"auto":i.propsSize&&i.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},i.onResizeStart=i.onResizeStart.bind(i),i.onMouseMove=i.onMouseMove.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i}function m(){var e=null!==i&&i.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}var y,z,H=function(){return(H=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},U={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},G=(y=N.PureComponent,g(z=w,l=y),z.prototype=null===l?Object.create(l):(E.prototype=l.prototype,new E),w.prototype.componentDidMount=function(){this.updateOffsetFromParent();var t=this.offsetFromParent,e=t.left,t=t.top,i=this.getDraggablePosition(),o=i.x,i=i.y;this.draggable.setState({x:o-e,y:i-t}),this.forceUpdate()},w.prototype.getDraggablePosition=function(){var t=this.draggable.state;return{x:t.x,y:t.y}},w.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},w.prototype.getParentSize=function(){return this.resizable.getParentSize()},w.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},w.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},w.prototype.getOffsetHeight=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/e;case"body":return document.body.offsetHeight/e;default:return t.offsetHeight}},w.prototype.getOffsetWidth=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/e;case"body":return document.body.offsetWidth/e;default:return t.offsetWidth}},w.prototype.onDragStart=function(t,e){this.props.onDragStart&&this.props.onDragStart(t,e);t=this.getDraggablePosition();if(this.originalPosition=t,this.props.bounds){var i,o,s,r,n,e=this.getParent(),t=this.props.scale;if("parent"===this.props.bounds)i=e;else{if("body"===this.props.bounds)return s=(r=e.getBoundingClientRect()).left,r=r.top,n=document.body.getBoundingClientRect(),s=-(s-e.offsetLeft*t-n.left)/t,r=-(r-e.offsetTop*t-n.top)/t,n=(document.body.offsetWidth-this.resizable.size.width*t)/t+s,o=(document.body.offsetHeight-this.resizable.size.height*t)/t+r,this.setState({bounds:{top:r,right:n,bottom:o,left:s}});if("window"===this.props.bounds)return this.resizable?(s=(r=e.getBoundingClientRect()).left,r=r.top,s=-(s-e.offsetLeft*t)/t,r=-(r-e.offsetTop*t)/t,n=(window.innerWidth-this.resizable.size.width*t)/t+s,o=(window.innerHeight-this.resizable.size.height*t)/t+r,this.setState({bounds:{top:r,right:n,bottom:o,left:s}})):void 0;"string"==typeof this.props.bounds?i=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(i=this.props.bounds)}i instanceof HTMLElement&&e instanceof HTMLElement&&(n=(r=i.getBoundingClientRect()).left,o=r.top,r=(n-(s=e.getBoundingClientRect()).left)/t,n=o-s.top,this.resizable)&&(this.updateOffsetFromParent(),e=this.offsetFromParent,this.setState({bounds:{top:n-e.top,right:r+(i.offsetWidth-this.resizable.size.width)-e.left/t,bottom:n+(i.offsetHeight-this.resizable.size.height)-e.top,left:r-e.left/t}}))}},w.prototype.onDrag=function(t,e){var i,o;if(this.props.onDrag)return i=(o=this.offsetFromParent).left,o=o.top,this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(t,H(H({},e),{x:e.x+i,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(t,H(H({},e),{x:this.originalPosition.x+i,y:e.y+o,deltaX:0})):void 0:this.props.onDrag(t,H(H({},e),{x:e.x+i,y:e.y+o}))},w.prototype.onDragStop=function(t,e){var i,o;if(this.props.onDragStop)return i=(o=this.offsetFromParent).left,o=o.top,this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(t,H(H({},e),{x:e.x+i,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(t,H(H({},e),{x:this.originalPosition.x+i,y:e.y+o,deltaX:0})):void 0:this.props.onDragStop(t,H(H({},e),{x:e.x+i,y:e.y+o}))},w.prototype.onResizeStart=function(t,e,i){t.stopPropagation(),this.setState({resizing:!0});var o,s,r,n,a,h,p,l,d,u,c,f=this.props.scale,g=this.offsetFromParent,b=this.getDraggablePosition();this.resizingPosition={x:b.x+g.left,y:b.y+g.top},this.originalPosition=b,this.props.bounds?(g=this.getParent(),b=void 0,"parent"===this.props.bounds?b=g:"body"===this.props.bounds?b=document.body:"window"===this.props.bounds?b=window:"string"==typeof this.props.bounds?b=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(b=this.props.bounds),(r=this.getSelfElement())instanceof Element&&(b instanceof HTMLElement||b===window)&&g instanceof HTMLElement&&(o=(g=this.getMaxSizesFromProps()).maxWidth,g=g.maxHeight,a=this.getParentSize(),o&&"string"==typeof o&&(o.endsWith("%")?(s=Number(o.replace("%",""))/100,o=a.width*s):o.endsWith("px")&&(o=Number(o.replace("px","")))),g&&"string"==typeof g&&(g.endsWith("%")?(s=Number(g.replace("%",""))/100,g=a.height*s):g.endsWith("px")&&(g=Number(g.replace("px","")))),s=(a=r.getBoundingClientRect()).left,r=a.top,n=(a="window"===this.props.bounds?{left:0,top:0}:b.getBoundingClientRect()).left,a=a.top,h=this.getOffsetWidth(b),b=this.getOffsetHeight(b),p=e.toLowerCase().endsWith("left"),l=e.toLowerCase().endsWith("right"),d=e.startsWith("top"),u=e.startsWith("bottom"),(p||d)&&this.resizable&&(c=(s-n)/f+this.resizable.size.width,this.setState({maxWidth:c>Number(o)?o:c})),(l||this.props.lockAspectRatio&&!p&&!d)&&this.setState({maxWidth:(c=h+(n-s)/f)>Number(o)?o:c}),(d||p)&&this.resizable&&(c=(r-a)/f+this.resizable.size.height,this.setState({maxHeight:c>Number(g)?g:c})),u||this.props.lockAspectRatio&&!d&&!p)&&this.setState({maxHeight:(c=b+(a-r)/f)>Number(g)?g:c})):this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight}),this.props.onResizeStart&&this.props.onResizeStart(t,e,i)},w.prototype.onResize=function(t,e,i,o){var s={x:this.originalPosition.x,y:this.originalPosition.y},r=-o.width,n=-o.height,r=(["top","left","topLeft","bottomLeft","topRight"].includes(e)&&("bottomLeft"===e?s.x+=r:("topRight"!==e&&(s.x+=r),s.y+=n)),this.draggable.state),n=(s.x===r.x&&s.y===r.y||this.draggable.setState(s),this.updateOffsetFromParent(),this.offsetFromParent),r=this.getDraggablePosition().x+n.left,s=this.getDraggablePosition().y+n.top;this.resizingPosition={x:r,y:s},this.props.onResize&&this.props.onResize(t,e,i,o,{x:r,y:s})},w.prototype.onResizeStop=function(t,e,i,o){this.setState({resizing:!1});var s=this.getMaxSizesFromProps(),r=s.maxWidth,s=s.maxHeight;this.setState({maxWidth:r,maxHeight:s}),this.props.onResizeStop&&this.props.onResizeStop(t,e,i,o,this.resizingPosition)},w.prototype.updateSize=function(t){this.resizable&&this.resizable.updateSize({width:t.width,height:t.height})},w.prototype.updatePosition=function(t){this.draggable.setState(t)},w.prototype.updateOffsetFromParent=function(){var t=this.props.scale,e=this.getParent(),i=this.getSelfElement();if(!e||null===i)return{top:0,left:0};var o=e.getBoundingClientRect(),s=o.left,o=o.top,i=i.getBoundingClientRect(),r=this.getDraggablePosition(),n=e.scrollLeft,e=e.scrollTop;this.offsetFromParent={left:i.left-s+n-r.x*t,top:i.top-o+e-r.y*t}},w.prototype.render=function(){var t=this.props,e=t.disableDragging,i=t.style,o=t.dragHandleClassName,s=t.position,r=t.onMouseDown,n=t.onMouseUp,a=t.dragAxis,h=t.dragGrid,p=t.bounds,l=t.enableUserSelectHack,d=t.cancel,u=t.children,c=(t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop,t.resizeHandleStyles),f=t.resizeHandleClasses,g=t.resizeHandleComponent,b=t.enableResizing,m=t.resizeGrid,y=t.resizeHandleWrapperClass,z=t.resizeHandleWrapperStyle,w=t.scale,x=t.allowAnyClick,t=function(t,e){var i={};for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick"]),v=this.props.default?H({},this.props.default):void 0;delete t.default;var S,R=e||o?{cursor:"auto"}:{cursor:"move"},R=H(H(H({},U),R),i),i=this.offsetFromParent,W=i.left,i=i.top;s&&(S={x:s.x-W,y:s.y-i});W=this.state.resizing?void 0:S,s=this.state.resizing?"both":a;return Object(N.createElement)(P.a,{ref:this.refDraggable,handle:o?".".concat(o):void 0,defaultPosition:v,onMouseDown:r,onMouseUp:n,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:s,disabled:e,grid:h,bounds:p?this.state.bounds:void 0,position:W,enableUserSelectHack:l,cancel:d,scale:w,allowAnyClick:x,nodeRef:this.resizableElement},Object(N.createElement)(F,H({},t,{ref:this.refResizable,defaultSize:v,size:this.props.size,enable:"boolean"==typeof b?{bottom:b,bottomLeft:b,bottomRight:b,left:b,right:b,top:b,topLeft:b,topRight:b}:b,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:R,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:(this.state.resizing?this.state:this.props).maxWidth,maxHeight:(this.state.resizing?this.state:this.props).maxHeight,grid:m,handleWrapperClass:y,handleWrapperStyle:z,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:c,handleClasses:f,handleComponent:g,scale:this.props.scale}),u))},w.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},w),c=e(224),I=e(23);function w(t){var e=y.call(this,t)||this;return e.resizingPosition={x:0,y:0},e.offsetFromParent={left:0,top:0},e.resizableElement={current:null},e.originalPosition={x:0,y:0},e.refDraggable=function(t){t&&(e.draggable=t)},e.refResizable=function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},e.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},e.onResizeStart=e.onResizeStart.bind(e),e.onResize=e.onResize.bind(e),e.onResizeStop=e.onResizeStop.bind(e),e.onDragStart=e.onDragStart.bind(e),e.onDrag=e.onDrag.bind(e),e.onDragStop=e.onDragStop.bind(e),e.getMaxSizesFromProps=e.getMaxSizesFromProps.bind(e),e}function E(){this.constructor=z}function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(e,t){var i,o=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)),o}function C(s){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach(function(t){var e,i,o;e=s,i=r[t=t],o=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0===e)return String(t);e=e.call(t,"string");if("object"!=O(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==O(o)?o:o+"")in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(r,t))})}return s}function j(t,e){var i;if(t)return"string"==typeof t?A(t,e):"Map"===(i="Object"===(i=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?A(t,e):void 0}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=t[i];return o}function M(t){var e,i=t.id,o=t.style,s=t.className,r=t.children,n=t.defaultState,a=t.size,h=t.position,p=t.minWidth,l=t.minHeight,d=t.maxWidth,u=t.maxHeight,c=t.resizeGrid,f=t.dragGrid,g=t.lockAspectRatio,b=t.lockAspectRatioExtraWidth,m=t.lockAspectRatioExtraHeight,y=t.direction,z=t.disableDragging,w=t.dragAxis,x=t.bounds,v=t.selected,S=t.selectedStyle,R=t.selectedClassName,W=t.setProps,P=t.loading_state,H=(H=Object(N.useState)(0),e=2,function(t){if(Array.isArray(t))return t}(H)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,s,r,n,a=[],h=!0,p=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=r.call(i)).done)&&(a.push(o.value),a.length!==e);h=!0);}catch(t){p=!0,s=t}finally{try{if(!h&&null!=i.return&&(n=i.return(),Object(n)!==n))return}finally{if(p)throw s}}return a}}(H,e)||j(H,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),E=H[0],O=H[1];Object(N.useEffect)(function(){!a&&n.width&&n.height&&W({size:{width:n.width,height:n.height}}),h||!n.x&&0!==n.x||!n.y&&0!==n.y||W({position:{x:n.x,y:n.y}})},[]);var D,A=Object(I.clone)({top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}),M=function(t){var e,i,o,s,r,n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return o=!(i=!0),{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){o=!0,e=t},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw e}}};if(Array.isArray(t)||(n=j(t)))return n&&(t=n),s=0,{s:r=function(){},n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:r};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(y);try{for(M.s();!(D=M.n()).done;)A[D.value]=!0}catch(t){M.e(t)}finally{M.f()}return React.createElement(G,{id:i,style:C(C({},o),v?S:{}),className:v&&R?s+" "+R:s,default:n,size:a,position:h,minWidth:p,minHeight:l,maxWidth:d,maxHeight:u,resizeGrid:c,dragGrid:f,lockAspectRatio:g,lockAspectRatioExtraWidth:b,lockAspectRatioExtraHeight:m,enableResizing:A,disableDragging:z,dragAxis:w,bounds:x,onDragStop:function(t,e){!h||h.x===e.x&&h.y===e.y||O((new Date).getTime()),W({position:{x:e.x,y:e.y}})},onResizeStop:function(t,e,i,o,s){O((new Date).getTime()),W({size:{width:i.style.width,height:i.style.height},position:{x:s.x,y:s.y}})},onClick:function(){200<=(new Date).getTime()-E&&W({selected:!v})},"data-dash-is-loading":P&&P.is_loading||void 0},r)}(t.default=M).defaultProps=c.b,M.propTypes=c.c}}]);
|
|
1
|
+
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[27],{531:function(k,t,e){"use strict";e.r(t);function d(t,e,i){return Math.max(Math.min(t,i),e)}function x(t,e){return Math.round(t/e)*e}function u(t,e){return new RegExp(t,"i").test(e)}function v(t){return Boolean(t.touches&&t.touches.length)}function S(o,s,t){void 0===t&&(t=0);var e=s.reduce(function(t,e,i){return Math.abs(e-o)<Math.abs(s[t]-o)?i:t},0),i=Math.abs(s[e]-o);return 0===t||i<t?s[e]:o}function o(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:t+"px"}function R(t,e,i,o){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return o*(Number(t.replace("vh",""))/100)}return t}var s,r,i,n,N=e(1),a=e(562),P=e.n(a),W=e(26),a=(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=function(){return(h=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},p={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},l={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},c={width:"20px",height:"20px",position:"absolute"},_={top:h(h({},p),{top:"-5px"}),right:h(h({},l),{left:void 0,right:"-5px"}),bottom:h(h({},p),{top:void 0,bottom:"-5px"}),left:h(h({},l),{left:"-5px"}),topRight:h(h({},c),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:h(h({},c),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:h(h({},c),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:h(h({},c),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=(i=N.PureComponent,a(m,i),m.prototype.render=function(){return N.createElement("div",{className:this.props.className||"",style:h(h({position:"absolute",userSelect:"none"},_[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},m),p=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),f=function(){return(f=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},B={width:"auto",height:"auto"},T=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],F=(s=N.PureComponent,p(b,s),Object.defineProperty(b.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||B},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"size",{get:function(){var t,e,i,o=0,s=0;return this.resizable&&this.window&&(t=this.resizable.offsetWidth,e=this.resizable.offsetHeight,"relative"!==(i=this.resizable.style.position)&&(this.resizable.style.position="relative"),o="auto"!==this.resizable.style.width?this.resizable.offsetWidth:t,s="auto"!==this.resizable.style.height?this.resizable.offsetHeight:e,this.resizable.style.position=i),{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"sizeStyle",{get:function(){function t(t){var e;return void 0===i.state[t]||"auto"===i.state[t]?"auto":i.propsSize&&i.propsSize[t]&&i.propsSize[t].toString().endsWith("%")?i.state[t].toString().endsWith("%")?i.state[t].toString():(e=i.getParentSize(),Number(i.state[t].toString().replace("px",""))/e[t]*100+"%"):o(i.state[t])}var i=this,e=this.props.size;return{width:e&&void 0!==e.width&&!this.state.isResizing?o(e.width):t("width"),height:e&&void 0!==e.height&&!this.state.isResizing?o(e.height):t("height")}},enumerable:!1,configurable:!0}),b.prototype.getParentSize=function(){var t,e,i,o;return this.parentNode?(t=this.appendBase())?(e=!1,"wrap"!==(i=this.parentNode.style.flexWrap)&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%",o={width:t.offsetWidth,height:t.offsetHeight},e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),o):{width:0,height:0}:this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0}},b.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},b.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},b.prototype.componentDidMount=function(){var t;this.resizable&&this.window&&(t=this.window.getComputedStyle(this.resizable),this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0}))},b.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},b.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},b.prototype.calculateNewMaxFromBoundary=function(t,e){var i,o,s=this.props.boundsByDirection,r=this.state.direction,n=s&&u("left",r),s=s&&u("top",r);return"parent"===this.props.bounds?(r=this.parentNode)&&(i=n?this.resizableRight-this.parentLeft:r.offsetWidth+(this.parentLeft-this.resizableLeft),o=s?this.resizableBottom-this.parentTop:r.offsetHeight+(this.parentTop-this.resizableTop)):"window"===this.props.bounds?this.window&&(i=n?this.resizableRight:this.window.innerWidth-this.resizableLeft,o=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=n?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),o=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop)),{maxWidth:t=i&&Number.isFinite(i)?t&&t<i?t:i:t,maxHeight:e=o&&Number.isFinite(o)?e&&e<o?e:o:e}},b.prototype.calculateNewSizeFromDirection=function(t,e){var i=this.props.scale||1,o=this.props.resizeRatio||1,s=this.state,r=s.direction,s=s.original,n=this.props,a=n.lockAspectRatio,h=n.lockAspectRatioExtraHeight,n=n.lockAspectRatioExtraWidth,p=s.width,l=s.height,h=h||0,n=n||0;return u("right",r)&&(p=s.width+(t-s.x)*o/i,a)&&(l=(p-n)/this.ratio+h),u("left",r)&&(p=s.width-(t-s.x)*o/i,a)&&(l=(p-n)/this.ratio+h),u("bottom",r)&&(l=s.height+(e-s.y)*o/i,a)&&(p=(l-h)*this.ratio+n),{newWidth:p=u("top",r)&&(l=s.height-(e-s.y)*o/i,a)?(l-h)*this.ratio+n:p,newHeight:l}},b.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,o){var s,r,n=this.props,a=n.lockAspectRatio,h=n.lockAspectRatioExtraHeight,n=n.lockAspectRatioExtraWidth,p=void 0===o.width?10:o.width,l=void 0===i.width||i.width<0?t:i.width,o=void 0===o.height?10:o.height,i=void 0===i.height||i.height<0?e:i.height,h=h||0,n=n||0;return e=a?(a=(o-h)*this.ratio+n,s=(i-h)*this.ratio+n,r=(p-n)/this.ratio+h,n=(l-n)/this.ratio+h,h=Math.max(p,a),a=Math.min(l,s),s=Math.max(o,r),r=Math.min(i,n),t=d(t,h,a),d(e,s,r)):(t=d(t,p,l),d(e,o,i)),{newWidth:t,newHeight:e}},b.prototype.setBoundingClientRect=function(){var t,e,i,o;"parent"===this.props.bounds&&(o=this.parentNode)&&(o=o.getBoundingClientRect(),this.parentLeft=o.left,this.parentTop=o.top),this.props.bounds&&"string"!=typeof this.props.bounds&&(o=this.props.bounds.getBoundingClientRect(),this.targetLeft=o.left,this.targetTop=o.top),this.resizable&&(t=(o=this.resizable.getBoundingClientRect()).left,e=o.top,i=o.right,o=o.bottom,this.resizableLeft=t,this.resizableRight=i,this.resizableTop=e,this.resizableBottom=o)},b.prototype.onResizeStart=function(t,e){var i,o,s,r,n;this.resizable&&this.window&&(s=o=0,t.nativeEvent&&(n=t.nativeEvent,Boolean((n.clientX||0===n.clientX)&&(n.clientY||0===n.clientY)))?(o=t.nativeEvent.clientX,s=t.nativeEvent.clientY):t.nativeEvent&&v(t.nativeEvent)&&(o=t.nativeEvent.touches[0].clientX,s=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(t,e,this.resizable)||(this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width)&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width}),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height,"auto"!==(n=this.window.getComputedStyle(this.resizable)).flexBasis&&(r=this.parentNode)&&(r=this.window.getComputedStyle(r).flexDirection,this.flexDir=r.startsWith("row")?"row":"column",i=n.flexBasis),this.setBoundingClientRect(),this.bindEvents(),r={original:{x:o,y:s,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:f(f({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i},this.setState(r)))},b.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&v(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i,o=this.props,s=o.maxWidth,r=o.maxHeight,n=o.minWidth,o=o.minHeight,a=(v(t)?t.touches[0]:t).clientX,h=(v(t)?t.touches[0]:t).clientY,p=this.state,l=p.direction,d=p.original,u=p.width,p=p.height,c=this.getParentSize(),f=(f=c,g=this.window.innerWidth,b=this.window.innerHeight,y=r,z=n,i=o,m=R(s,f.width,g,b),y=R(y,f.height,g,b),z=R(z,f.width,g,b),i=R(i,f.height,g,b),{maxWidth:void 0===m?void 0:Number(m),maxHeight:void 0===y?void 0:Number(y),minWidth:void 0===z?void 0:Number(z),minHeight:void 0===i?void 0:Number(i)}),s=f.maxWidth,r=f.maxHeight,n=f.minWidth,o=f.minHeight,g=this.calculateNewSizeFromDirection(a,h),b=g.newHeight,m=g.newWidth,y=this.calculateNewMaxFromBoundary(s,r),z=(this.props.snap&&this.props.snap.x&&(m=S(m,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(b=S(b,this.props.snap.y,this.props.snapGap)),this.calculateNewSizeFromAspectRatio(m,b,{width:y.maxWidth,height:y.maxHeight},{width:n,height:o})),h=(m=z.newWidth,b=z.newHeight,this.props.grid&&(i=x(m,this.props.grid[0]),f=x(b,this.props.grid[1]),m=0===(a=this.props.snapGap||0)||Math.abs(i-m)<=a?i:m,b=0===a||Math.abs(f-b)<=a?f:b),{width:m-d.width,height:b-d.height}),w=(u&&"string"==typeof u&&(u.endsWith("%")?m=m/c.width*100+"%":u.endsWith("vw")?m=m/this.window.innerWidth*100+"vw":u.endsWith("vh")&&(m=m/this.window.innerHeight*100+"vh")),p&&"string"==typeof p&&(p.endsWith("%")?b=b/c.height*100+"%":p.endsWith("vw")?b=b/this.window.innerWidth*100+"vw":p.endsWith("vh")&&(b=b/this.window.innerHeight*100+"vh")),{width:this.createSizeForCssProperty(m,"width"),height:this.createSizeForCssProperty(b,"height")}),g=("row"===this.flexDir?w.flexBasis=w.width:"column"===this.flexDir&&(w.flexBasis=w.height),this.state.width!==w.width),s=this.state.height!==w.height,r=this.state.flexBasis!==w.flexBasis,y=g||s||r;y&&Object(W.flushSync)(function(){e.setState(w)}),this.props.onResize&&y&&this.props.onResize(t,l,this.resizable,h)}},b.prototype.onMouseUp=function(t){var e=this.state,i=e.isResizing,o=e.direction,e=e.original;i&&this.resizable&&(i={width:this.size.width-e.width,height:this.size.height-e.height},this.props.onResizeStop&&this.props.onResizeStop(t,o,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:f(f({},this.state.backgroundStyle),{cursor:"auto"})}))},b.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},b.prototype.renderResizer=function(){var e=this,t=this.props,i=t.enable,o=t.handleStyles,s=t.handleClasses,r=t.handleWrapperStyle,n=t.handleWrapperClass,a=t.handleComponent;return i?(t=Object.keys(i).map(function(t){return!1!==i[t]?N.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:o&&o[t],className:s&&s[t]},a&&a[t]?a[t]:null):null}),N.createElement("div",{className:n,style:r},t)):null},b.prototype.render=function(){var i=this,t=Object.keys(this.props).reduce(function(t,e){return-1===T.indexOf(e)&&(t[e]=i.props[e]),t},{}),e=f(f(f({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0}),o=(this.state.flexBasis&&(e.flexBasis=this.state.flexBasis),this.props.as||"div");return N.createElement(o,f({ref:this.ref,style:e,className:this.props.className},t),this.state.isResizing&&N.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},b.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},b),g=function(t,e){return(g=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}))(t,e)};function b(t){var i=s.call(this,t)||this;return i.ratio=1,i.resizable=null,i.parentLeft=0,i.parentTop=0,i.resizableLeft=0,i.resizableRight=0,i.resizableTop=0,i.resizableBottom=0,i.targetLeft=0,i.targetTop=0,i.appendBase=function(){var t,e;return i.resizable&&i.window&&(t=i.parentNode)?((e=i.window.document.createElement("div")).style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add("__resizable_base__"):e.className+="__resizable_base__",t.appendChild(e),e):null},i.removeBase=function(t){var e=i.parentNode;e&&e.removeChild(t)},i.ref=function(t){t&&(i.resizable=t)},i.state={isResizing:!1,width:void 0===(i.propsSize&&i.propsSize.width)?"auto":i.propsSize&&i.propsSize.width,height:void 0===(i.propsSize&&i.propsSize.height)?"auto":i.propsSize&&i.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},i.onResizeStart=i.onResizeStart.bind(i),i.onMouseMove=i.onMouseMove.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i}function m(){var e=null!==i&&i.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}var y,z,H=function(){return(H=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},U={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},G=(y=N.PureComponent,g(z=w,l=y),z.prototype=null===l?Object.create(l):(E.prototype=l.prototype,new E),w.prototype.componentDidMount=function(){this.updateOffsetFromParent();var t=this.offsetFromParent,e=t.left,t=t.top,i=this.getDraggablePosition(),o=i.x,i=i.y;this.draggable.setState({x:o-e,y:i-t}),this.forceUpdate()},w.prototype.getDraggablePosition=function(){var t=this.draggable.state;return{x:t.x,y:t.y}},w.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},w.prototype.getParentSize=function(){return this.resizable.getParentSize()},w.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},w.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},w.prototype.getOffsetHeight=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/e;case"body":return document.body.offsetHeight/e;default:return t.offsetHeight}},w.prototype.getOffsetWidth=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/e;case"body":return document.body.offsetWidth/e;default:return t.offsetWidth}},w.prototype.onDragStart=function(t,e){this.props.onDragStart&&this.props.onDragStart(t,e);t=this.getDraggablePosition();if(this.originalPosition=t,this.props.bounds){var i,o,s,r,n,e=this.getParent(),t=this.props.scale;if("parent"===this.props.bounds)i=e;else{if("body"===this.props.bounds)return s=(r=e.getBoundingClientRect()).left,r=r.top,n=document.body.getBoundingClientRect(),s=-(s-e.offsetLeft*t-n.left)/t,r=-(r-e.offsetTop*t-n.top)/t,n=(document.body.offsetWidth-this.resizable.size.width*t)/t+s,o=(document.body.offsetHeight-this.resizable.size.height*t)/t+r,this.setState({bounds:{top:r,right:n,bottom:o,left:s}});if("window"===this.props.bounds)return this.resizable?(s=(r=e.getBoundingClientRect()).left,r=r.top,s=-(s-e.offsetLeft*t)/t,r=-(r-e.offsetTop*t)/t,n=(window.innerWidth-this.resizable.size.width*t)/t+s,o=(window.innerHeight-this.resizable.size.height*t)/t+r,this.setState({bounds:{top:r,right:n,bottom:o,left:s}})):void 0;"string"==typeof this.props.bounds?i=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(i=this.props.bounds)}i instanceof HTMLElement&&e instanceof HTMLElement&&(n=(r=i.getBoundingClientRect()).left,o=r.top,r=(n-(s=e.getBoundingClientRect()).left)/t,n=o-s.top,this.resizable)&&(this.updateOffsetFromParent(),e=this.offsetFromParent,this.setState({bounds:{top:n-e.top,right:r+(i.offsetWidth-this.resizable.size.width)-e.left/t,bottom:n+(i.offsetHeight-this.resizable.size.height)-e.top,left:r-e.left/t}}))}},w.prototype.onDrag=function(t,e){var i,o;if(this.props.onDrag)return i=(o=this.offsetFromParent).left,o=o.top,this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(t,H(H({},e),{x:e.x+i,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(t,H(H({},e),{x:this.originalPosition.x+i,y:e.y+o,deltaX:0})):void 0:this.props.onDrag(t,H(H({},e),{x:e.x+i,y:e.y+o}))},w.prototype.onDragStop=function(t,e){var i,o;if(this.props.onDragStop)return i=(o=this.offsetFromParent).left,o=o.top,this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(t,H(H({},e),{x:e.x+i,y:this.originalPosition.y+o,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(t,H(H({},e),{x:this.originalPosition.x+i,y:e.y+o,deltaX:0})):void 0:this.props.onDragStop(t,H(H({},e),{x:e.x+i,y:e.y+o}))},w.prototype.onResizeStart=function(t,e,i){t.stopPropagation(),this.setState({resizing:!0});var o,s,r,n,a,h,p,l,d,u,c,f=this.props.scale,g=this.offsetFromParent,b=this.getDraggablePosition();this.resizingPosition={x:b.x+g.left,y:b.y+g.top},this.originalPosition=b,this.props.bounds?(g=this.getParent(),b=void 0,"parent"===this.props.bounds?b=g:"body"===this.props.bounds?b=document.body:"window"===this.props.bounds?b=window:"string"==typeof this.props.bounds?b=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(b=this.props.bounds),(r=this.getSelfElement())instanceof Element&&(b instanceof HTMLElement||b===window)&&g instanceof HTMLElement&&(o=(g=this.getMaxSizesFromProps()).maxWidth,g=g.maxHeight,a=this.getParentSize(),o&&"string"==typeof o&&(o.endsWith("%")?(s=Number(o.replace("%",""))/100,o=a.width*s):o.endsWith("px")&&(o=Number(o.replace("px","")))),g&&"string"==typeof g&&(g.endsWith("%")?(s=Number(g.replace("%",""))/100,g=a.height*s):g.endsWith("px")&&(g=Number(g.replace("px","")))),s=(a=r.getBoundingClientRect()).left,r=a.top,n=(a="window"===this.props.bounds?{left:0,top:0}:b.getBoundingClientRect()).left,a=a.top,h=this.getOffsetWidth(b),b=this.getOffsetHeight(b),p=e.toLowerCase().endsWith("left"),l=e.toLowerCase().endsWith("right"),d=e.startsWith("top"),u=e.startsWith("bottom"),(p||d)&&this.resizable&&(c=(s-n)/f+this.resizable.size.width,this.setState({maxWidth:c>Number(o)?o:c})),(l||this.props.lockAspectRatio&&!p&&!d)&&this.setState({maxWidth:(c=h+(n-s)/f)>Number(o)?o:c}),(d||p)&&this.resizable&&(c=(r-a)/f+this.resizable.size.height,this.setState({maxHeight:c>Number(g)?g:c})),u||this.props.lockAspectRatio&&!d&&!p)&&this.setState({maxHeight:(c=b+(a-r)/f)>Number(g)?g:c})):this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight}),this.props.onResizeStart&&this.props.onResizeStart(t,e,i)},w.prototype.onResize=function(t,e,i,o){var s={x:this.originalPosition.x,y:this.originalPosition.y},r=-o.width,n=-o.height,r=(["top","left","topLeft","bottomLeft","topRight"].includes(e)&&("bottomLeft"===e?s.x+=r:("topRight"!==e&&(s.x+=r),s.y+=n)),this.draggable.state),n=(s.x===r.x&&s.y===r.y||this.draggable.setState(s),this.updateOffsetFromParent(),this.offsetFromParent),r=this.getDraggablePosition().x+n.left,s=this.getDraggablePosition().y+n.top;this.resizingPosition={x:r,y:s},this.props.onResize&&this.props.onResize(t,e,i,o,{x:r,y:s})},w.prototype.onResizeStop=function(t,e,i,o){this.setState({resizing:!1});var s=this.getMaxSizesFromProps(),r=s.maxWidth,s=s.maxHeight;this.setState({maxWidth:r,maxHeight:s}),this.props.onResizeStop&&this.props.onResizeStop(t,e,i,o,this.resizingPosition)},w.prototype.updateSize=function(t){this.resizable&&this.resizable.updateSize({width:t.width,height:t.height})},w.prototype.updatePosition=function(t){this.draggable.setState(t)},w.prototype.updateOffsetFromParent=function(){var t=this.props.scale,e=this.getParent(),i=this.getSelfElement();if(!e||null===i)return{top:0,left:0};var o=e.getBoundingClientRect(),s=o.left,o=o.top,i=i.getBoundingClientRect(),r=this.getDraggablePosition(),n=e.scrollLeft,e=e.scrollTop;this.offsetFromParent={left:i.left-s+n-r.x*t,top:i.top-o+e-r.y*t}},w.prototype.render=function(){var t=this.props,e=t.disableDragging,i=t.style,o=t.dragHandleClassName,s=t.position,r=t.onMouseDown,n=t.onMouseUp,a=t.dragAxis,h=t.dragGrid,p=t.bounds,l=t.enableUserSelectHack,d=t.cancel,u=t.children,c=(t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop,t.resizeHandleStyles),f=t.resizeHandleClasses,g=t.resizeHandleComponent,b=t.enableResizing,m=t.resizeGrid,y=t.resizeHandleWrapperClass,z=t.resizeHandleWrapperStyle,w=t.scale,x=t.allowAnyClick,t=function(t,e){var i={};for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]]);return i}(t,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick"]),v=this.props.default?H({},this.props.default):void 0;delete t.default;var S,R=e||o?{cursor:"auto"}:{cursor:"move"},R=H(H(H({},U),R),i),i=this.offsetFromParent,W=i.left,i=i.top;s&&(S={x:s.x-W,y:s.y-i});W=this.state.resizing?void 0:S,s=this.state.resizing?"both":a;return Object(N.createElement)(P.a,{ref:this.refDraggable,handle:o?".".concat(o):void 0,defaultPosition:v,onMouseDown:r,onMouseUp:n,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:s,disabled:e,grid:h,bounds:p?this.state.bounds:void 0,position:W,enableUserSelectHack:l,cancel:d,scale:w,allowAnyClick:x,nodeRef:this.resizableElement},Object(N.createElement)(F,H({},t,{ref:this.refResizable,defaultSize:v,size:this.props.size,enable:"boolean"==typeof b?{bottom:b,bottomLeft:b,bottomRight:b,left:b,right:b,top:b,topLeft:b,topRight:b}:b,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:R,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:(this.state.resizing?this.state:this.props).maxWidth,maxHeight:(this.state.resizing?this.state:this.props).maxHeight,grid:m,handleWrapperClass:y,handleWrapperStyle:z,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:c,handleClasses:f,handleComponent:g,scale:this.props.scale}),u))},w.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},w),c=e(225),I=e(23);function w(t){var e=y.call(this,t)||this;return e.resizingPosition={x:0,y:0},e.offsetFromParent={left:0,top:0},e.resizableElement={current:null},e.originalPosition={x:0,y:0},e.refDraggable=function(t){t&&(e.draggable=t)},e.refResizable=function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},e.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},e.onResizeStart=e.onResizeStart.bind(e),e.onResize=e.onResize.bind(e),e.onResizeStop=e.onResizeStop.bind(e),e.onDragStart=e.onDragStart.bind(e),e.onDrag=e.onDrag.bind(e),e.onDragStop=e.onDragStop.bind(e),e.getMaxSizesFromProps=e.getMaxSizesFromProps.bind(e),e}function E(){this.constructor=z}function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(e,t){var i,o=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)),o}function C(s){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach(function(t){var e,i,o;e=s,i=r[t=t],o=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0===e)return String(t);e=e.call(t,"string");if("object"!=O(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==O(o)?o:o+"")in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(r,t))})}return s}function j(t,e){var i;if(t)return"string"==typeof t?A(t,e):"Map"===(i="Object"===(i=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?A(t,e):void 0}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=t[i];return o}function M(t){var e,i=t.id,o=t.style,s=t.className,r=t.children,n=t.defaultState,a=t.size,h=t.position,p=t.minWidth,l=t.minHeight,d=t.maxWidth,u=t.maxHeight,c=t.resizeGrid,f=t.dragGrid,g=t.lockAspectRatio,b=t.lockAspectRatioExtraWidth,m=t.lockAspectRatioExtraHeight,y=t.direction,z=t.disableDragging,w=t.dragAxis,x=t.bounds,v=t.selected,S=t.selectedStyle,R=t.selectedClassName,W=t.setProps,P=t.loading_state,H=(H=Object(N.useState)(0),e=2,function(t){if(Array.isArray(t))return t}(H)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o,s,r,n,a=[],h=!0,p=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;h=!1}else for(;!(h=(o=r.call(i)).done)&&(a.push(o.value),a.length!==e);h=!0);}catch(t){p=!0,s=t}finally{try{if(!h&&null!=i.return&&(n=i.return(),Object(n)!==n))return}finally{if(p)throw s}}return a}}(H,e)||j(H,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),E=H[0],O=H[1];Object(N.useEffect)(function(){!a&&n.width&&n.height&&W({size:{width:n.width,height:n.height}}),h||!n.x&&0!==n.x||!n.y&&0!==n.y||W({position:{x:n.x,y:n.y}})},[]);var D,A=Object(I.clone)({top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}),M=function(t){var e,i,o,s,r,n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return o=!(i=!0),{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){o=!0,e=t},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw e}}};if(Array.isArray(t)||(n=j(t)))return n&&(t=n),s=0,{s:r=function(){},n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:r};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(y);try{for(M.s();!(D=M.n()).done;)A[D.value]=!0}catch(t){M.e(t)}finally{M.f()}return React.createElement(G,{id:i,style:C(C({},o),v?S:{}),className:v&&R?s+" "+R:s,default:n,size:a,position:h,minWidth:p,minHeight:l,maxWidth:d,maxHeight:u,resizeGrid:c,dragGrid:f,lockAspectRatio:g,lockAspectRatioExtraWidth:b,lockAspectRatioExtraHeight:m,enableResizing:A,disableDragging:z,dragAxis:w,bounds:x,onDragStop:function(t,e){!h||h.x===e.x&&h.y===e.y||O((new Date).getTime()),W({position:{x:e.x,y:e.y}})},onResizeStop:function(t,e,i,o,s){O((new Date).getTime()),W({size:{width:i.style.width,height:i.style.height},position:{x:s.x,y:s.y}})},onClick:function(){200<=(new Date).getTime()-E&&W({selected:!v})},"data-dash-is-loading":P&&P.is_loading||void 0},r)}(t.default=M).defaultProps=c.b,M.propTypes=c.c}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[28],{503:function(e,t,n){"use strict";n.r(t);var Oe=n(1),je=n.n(Oe),r=n(870),ge=n.n(r),r=n(211);function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,c,i,o=[],a=!0,s=!1;try{if(c=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=c.call(n)).done)&&(o.push(r.value),o.length!==t);a=!0);}catch(e){s=!0,u=e}finally{try{if(!a&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw u}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?u(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(871)();function Se(e,t){var n=Object(Oe.useRef)(!1);Object(Oe.useEffect)(function(){n.current?e():n.current=!0},t)}function c(e){function _(){q(),I()}function W(){}function u(){t.current||(q(),Q.current=requestAnimationFrame(function(){var e=b.current/2,t=m.current/2,n=A.direction,r=A.waitTime;1===n?(Math.abs(a.current)>=e&&(a.current=0,j(function(e){return e+1})),a.current-=H,j(function(e){return e+1})):0===n?(0<=a.current&&(a.current=-1*e,j(function(e){return e+1})),a.current+=H,j(function(e){return e+1})):2===n?(Math.abs(o.current)>=t&&(o.current=0,O(function(e){return e+1})),o.current-=H,O(function(e){return e+1})):3===n&&(0<=o.current&&(o.current=-1*t,O(function(e){return e+1})),o.current+=H,O(function(e){return e+1})),w.current&&clearTimeout(w.current),D?Math.abs(a.current)%D<H?w.current=setTimeout(function(){u()},r):u():k&&Math.abs(o.current)%k<H?w.current=setTimeout(function(){u()},r):u()}.bind(r.current)))}function I(){var e,t=A.switchDelay;L(n),ae(""),C&&(f.current=r.current.offsetHeight,ee(function(e){return e+1}),l.current=r.current.offsetWidth,ne(function(e){return e+1}),e=i.current.offsetWidth,c.current.style.width=(e=R?2*e+1:e)+"px",m.current=e,ue(function(e){return e+1})),R?(p.current="ease-in",ie(function(e){return e+1}),s.current=0,g(function(e){return e+1}),E?(ae(i.current.innerHTML),setTimeout(function(){b.current=c.current.offsetHeight,u()},0)):(q(),o.current=0,O(function(e){return e+1}),a.current=0,j(function(e){return e+1}))):(p.current="linear",ie(function(e){return e+1}),s.current=t,g(function(e){return e+1}))}function L(e){100<e.length&&console.warn("数据达到了".concat(e.length,"条有点多哦~,可能会造成部分老旧浏览器卡顿。"))}function N(){t.current=!0,w.current&&clearTimeout(w.current),q()}var P=e.id,U=e.key,z=e.leftSwitchChildren,Y=e.rightSwitchChildren,J=e.children,X=e.className,$=e.style,n=e.data,B=e.classOption,r=(e.setProps,e.loading_state,Object(Oe.useRef)(null)),c=Object(Oe.useRef)(null),i=Object(Oe.useRef)(null),o=Object(Oe.useRef)(0),a=Object(Oe.useRef)(0),s=Object(Oe.useRef)(0),f=Object(Oe.useRef)(0),l=Object(Oe.useRef)(0),m=Object(Oe.useRef)(0),b=Object(Oe.useRef)(0),d=Object(Oe.useRef)(null),h=Object(Oe.useRef)(null),G=Object(Oe.useRef)(null),K=Object(Oe.useRef)(null),Q=Object(Oe.useRef)(null),w=Object(Oe.useRef)(null),t=Object(Oe.useRef)(!1),p=Object(Oe.useRef)("ease-in"),y=(e=ve(Object(Oe.useState)(0),2))[0],O=e[1],V=(e=ve(Object(Oe.useState)(0),2))[0],j=e[1],Z=(e=ve(Object(Oe.useState)(0),2))[0],g=e[1],v=(e=ve(Object(Oe.useState)(0),2))[0],ee=e[1],te=(e=ve(Object(Oe.useState)(0),2))[0],ne=e[1],re=(e=ve(Object(Oe.useState)(0),2))[0],ue=e[1],ce=(e=ve(Object(Oe.useState)(0),2))[0],ie=e[1],oe=(e=ve(Object(Oe.useState)(""),2))[0],ae=e[1],S=(e=ve(Object(Oe.useState)(null),2))[0],se=e[1],M=(e=ve(Object(Oe.useState)(null),2))[0],fe=e[1],le=(e=ve(Object(Oe.useState)(null),2))[0],me=e[1],be=(e=ve(Object(Oe.useState)(null),2))[0],de=e[1],he=(e=ve(Object(Oe.useState)(null),2))[0],we=e[1],pe=Object(Oe.useMemo)(function(){return{step:1,limitMoveNum:5,hoverStop:!0,direction:1,openTouch:!0,singleHeight:0,singleWidth:0,waitTime:1e3,switchOffset:30,autoPlay:!0,navigation:!1,switchSingleStep:134,switchDelay:400,switchDisabledClass:"disabled",isSingleRemUnit:!1}},[]),A=Object(Oe.useMemo)(function(){return ge()({},pe,B)},[B]),e=(Object(Oe.useEffect)(function(){se(function(){return o.current<0})},[y]),Object(Oe.useEffect)(function(){fe(function(){return Math.abs(o.current)<m.current-l.current})},[y,re,te]),Object(Oe.useEffect)(function(){me(function(){return{position:"absolute",margin:"".concat(f.current/2,"px 0 0 -").concat(A.switchOffset,"px"),transform:"translate(-100%,-50%)"}})},[v,A.switchOffset]),Object(Oe.useEffect)(function(){de(function(){return{position:"absolute",margin:"".concat(f.current/2,"px 0 0 ").concat(l.current+A.switchOffset,"px"),transform:"translateY(-50%)"}})},[v,te,A.switchOffset]),Object(Oe.useMemo)(function(){return S?"":A.switchDisabledClass},[S,A.switchDisabledClass])),re=Object(Oe.useMemo)(function(){return M?"":A.switchDisabledClass},[M,A.switchDisabledClass]),v=Object(Oe.useMemo)(function(){return C?{float:"left",overflow:"hidden"}:{overflow:"hidden"}},[C]),T=(Object(Oe.useEffect)(function(){we(function(){return{transform:"translate(".concat(o.current,"px,").concat(a.current,"px)"),transition:"all ".concat(p.current," ").concat(s.current,"ms"),overflow:"hidden"}})},[y,V,ce,Z]),Object(Oe.useMemo)(function(){return A.navigation},[A.navigation])),R=Object(Oe.useMemo)(function(){return!T&&A.autoPlay},[T]),E=Object(Oe.useMemo)(function(){return n.length>=A.limitMoveNum},[n.length,A.limitMoveNum]),ye=Object(Oe.useMemo)(function(){return A.hoverStop&&R&&E},[A.hoverStop,R,E]),x=Object(Oe.useMemo)(function(){return A.openTouch},[A.openTouch]),C=Object(Oe.useMemo)(function(){return 1<A.direction},[A.direction]),F=Object(Oe.useMemo)(function(){return A.isSingleRemUnit?parseInt(window.getComputedStyle(document.documentElement,null).fontSize):1},[A.isSingleRemUnit]),k=Object(Oe.useMemo)(function(){return A.singleWidth*F},[A.singleWidth,F]),D=Object(Oe.useMemo)(function(){return A.singleHeight*F},[A.singleHeight,F]),H=Object(Oe.useMemo)(function(){var e,t=A.step;return 0<(e=C?k:D)&&0<e%t&&console.error("如果设置了单步滚动,step需是单步大小的约数,否则无法保证单步滚动结束的位置是否准确。~~~~~"),t},[A.step,C,k,D]),q=function(){cancelAnimationFrame(Q.current||"")};return Object(Oe.useEffect)(function(){return window.addEventListener("scrollend",W),I(),function(){window.removeEventListener("scrollend",W),q(),clearTimeout(w.current)}},[]),Se(function(){L(n),_()},[n]),Se(function(){(R?_:N)()},[R]),je.a.createElement("div",{id:P,key:U,className:X,style:$,ref:r},T&&je.a.createElement("div",{style:le,class:e,onClick:function(){S&&(Math.abs(o.current)<A.switchSingleStep?(o.current=0,O(function(e){return e+1})):(o.current+=A.switchSingleStep,O(function(e){return e+1})))}},z),T&&je.a.createElement("div",{style:be,class:re,onClick:function(){M&&(m.current-l.current+o.current<A.switchSingleStep?(o.current=l.current-m.current,O(function(e){return e+1})):(o.current-=A.switchSingleStep,O(function(e){return e+1})))}},Y),je.a.createElement("div",{ref:c,style:he,onMouseEnter:function(){ye&&N()},onMouseLeave:function(){ye&&(t.current=!1,u())},onTouchStart:function(e){var t,n,r,u;x&&(e=e.targetTouches[0],n=A.waitTime,r=A.singleHeight,u=A.singleWidth,d.current={x:e.pageX,y:e.pageY},K.current=a.current,G.current=o.current,r&&u?(t&&clearTimeout(t),setTimeout(function(){q()},n+20)):q())},onTouchMove:function(e){var t;!x||1<e.targetTouches.length||e.scale&&1!==e.scale||(e=e.targetTouches[0],t=A.direction,h.current={x:e.pageX-d.current.x,y:e.pageY-d.current.y},event.preventDefault(),1==(e=Math.abs(h.current.x)<Math.abs(h.current.y)?1:0)&&t<2?(a.current=K.current+h.current.y,j(function(e){return e+1})):0==e&&1<t&&(o.current=G.current+h.current.x,O(function(e){return e+1})))},onTouchEnd:function(){var e,t,n;x&&(t=A.direction,s.current=50,g(function(e){return e+1}),1===t?0<a.current&&(a.current=0,j(function(e){return e+1})):0===t?(n=b.current/2*-1,a.current<n&&(a.current=n,j(function(e){return e+1}))):2===t?0<o.current&&(o.current=0,O(function(e){return e+1})):3===t&&(n=-1*m.current,o.current<n)&&(o.current=n,O(function(e){return e+1})),e&&clearTimeout(e),setTimeout(function(){s.current=0,g(function(e){return e+1}),u()},s.current))}},je.a.createElement("div",{ref:i,style:v},J),je.a.createElement("div",{dangerouslySetInnerHTML:{__html:oe},style:v})))}(t.default=c).defaultProps=r.b,c.propTypes=r.c},870:function(e,t){var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function e(){Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var t,n,r,u,c=void 0,i=void 0,o=1,a=arguments[0]||{},s=!1,f=arguments.length;if("boolean"==typeof a&&(s=a,a=arguments[1]||{},o++),"object"!==(void 0===a?"undefined":l(a))&&"function"!=typeof a&&(a={}),o!==f)for(;o<f;o++)if(null!=(t=arguments[o]))for(c in t)n=a[c],r=t[c],u=Array.isArray(r),s&&r&&("object"===(void 0===r?"undefined":l(r))||u)?(i=u?n&&Array.isArray(n)?n:[]:n&&"object"===(void 0===n?"undefined":l(n))?n:{},a[c]=e(s,i,r)):void 0!==r&&(a[c]=r);return a}},871:function(e,t){e.exports=function(){window.cancelAnimationFrame=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return window.clearTimeout(e)},window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}}}]);
|
|
1
|
+
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[28],{503:function(e,t,n){"use strict";n.r(t);var Oe=n(1),je=n.n(Oe),r=n(870),ge=n.n(r),r=n(212);function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,c,i,o=[],a=!0,s=!1;try{if(c=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=c.call(n)).done)&&(o.push(r.value),o.length!==t);a=!0);}catch(e){s=!0,u=e}finally{try{if(!a&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw u}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?u(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(871)();function Se(e,t){var n=Object(Oe.useRef)(!1);Object(Oe.useEffect)(function(){n.current?e():n.current=!0},t)}function c(e){function _(){q(),I()}function W(){}function u(){t.current||(q(),Q.current=requestAnimationFrame(function(){var e=b.current/2,t=m.current/2,n=A.direction,r=A.waitTime;1===n?(Math.abs(a.current)>=e&&(a.current=0,j(function(e){return e+1})),a.current-=H,j(function(e){return e+1})):0===n?(0<=a.current&&(a.current=-1*e,j(function(e){return e+1})),a.current+=H,j(function(e){return e+1})):2===n?(Math.abs(o.current)>=t&&(o.current=0,O(function(e){return e+1})),o.current-=H,O(function(e){return e+1})):3===n&&(0<=o.current&&(o.current=-1*t,O(function(e){return e+1})),o.current+=H,O(function(e){return e+1})),w.current&&clearTimeout(w.current),D?Math.abs(a.current)%D<H?w.current=setTimeout(function(){u()},r):u():k&&Math.abs(o.current)%k<H?w.current=setTimeout(function(){u()},r):u()}.bind(r.current)))}function I(){var e,t=A.switchDelay;L(n),ae(""),C&&(f.current=r.current.offsetHeight,ee(function(e){return e+1}),l.current=r.current.offsetWidth,ne(function(e){return e+1}),e=i.current.offsetWidth,c.current.style.width=(e=R?2*e+1:e)+"px",m.current=e,ue(function(e){return e+1})),R?(p.current="ease-in",ie(function(e){return e+1}),s.current=0,g(function(e){return e+1}),E?(ae(i.current.innerHTML),setTimeout(function(){b.current=c.current.offsetHeight,u()},0)):(q(),o.current=0,O(function(e){return e+1}),a.current=0,j(function(e){return e+1}))):(p.current="linear",ie(function(e){return e+1}),s.current=t,g(function(e){return e+1}))}function L(e){100<e.length&&console.warn("数据达到了".concat(e.length,"条有点多哦~,可能会造成部分老旧浏览器卡顿。"))}function N(){t.current=!0,w.current&&clearTimeout(w.current),q()}var P=e.id,U=e.key,z=e.leftSwitchChildren,Y=e.rightSwitchChildren,J=e.children,X=e.className,$=e.style,n=e.data,B=e.classOption,r=(e.setProps,e.loading_state,Object(Oe.useRef)(null)),c=Object(Oe.useRef)(null),i=Object(Oe.useRef)(null),o=Object(Oe.useRef)(0),a=Object(Oe.useRef)(0),s=Object(Oe.useRef)(0),f=Object(Oe.useRef)(0),l=Object(Oe.useRef)(0),m=Object(Oe.useRef)(0),b=Object(Oe.useRef)(0),d=Object(Oe.useRef)(null),h=Object(Oe.useRef)(null),G=Object(Oe.useRef)(null),K=Object(Oe.useRef)(null),Q=Object(Oe.useRef)(null),w=Object(Oe.useRef)(null),t=Object(Oe.useRef)(!1),p=Object(Oe.useRef)("ease-in"),y=(e=ve(Object(Oe.useState)(0),2))[0],O=e[1],V=(e=ve(Object(Oe.useState)(0),2))[0],j=e[1],Z=(e=ve(Object(Oe.useState)(0),2))[0],g=e[1],v=(e=ve(Object(Oe.useState)(0),2))[0],ee=e[1],te=(e=ve(Object(Oe.useState)(0),2))[0],ne=e[1],re=(e=ve(Object(Oe.useState)(0),2))[0],ue=e[1],ce=(e=ve(Object(Oe.useState)(0),2))[0],ie=e[1],oe=(e=ve(Object(Oe.useState)(""),2))[0],ae=e[1],S=(e=ve(Object(Oe.useState)(null),2))[0],se=e[1],M=(e=ve(Object(Oe.useState)(null),2))[0],fe=e[1],le=(e=ve(Object(Oe.useState)(null),2))[0],me=e[1],be=(e=ve(Object(Oe.useState)(null),2))[0],de=e[1],he=(e=ve(Object(Oe.useState)(null),2))[0],we=e[1],pe=Object(Oe.useMemo)(function(){return{step:1,limitMoveNum:5,hoverStop:!0,direction:1,openTouch:!0,singleHeight:0,singleWidth:0,waitTime:1e3,switchOffset:30,autoPlay:!0,navigation:!1,switchSingleStep:134,switchDelay:400,switchDisabledClass:"disabled",isSingleRemUnit:!1}},[]),A=Object(Oe.useMemo)(function(){return ge()({},pe,B)},[B]),e=(Object(Oe.useEffect)(function(){se(function(){return o.current<0})},[y]),Object(Oe.useEffect)(function(){fe(function(){return Math.abs(o.current)<m.current-l.current})},[y,re,te]),Object(Oe.useEffect)(function(){me(function(){return{position:"absolute",margin:"".concat(f.current/2,"px 0 0 -").concat(A.switchOffset,"px"),transform:"translate(-100%,-50%)"}})},[v,A.switchOffset]),Object(Oe.useEffect)(function(){de(function(){return{position:"absolute",margin:"".concat(f.current/2,"px 0 0 ").concat(l.current+A.switchOffset,"px"),transform:"translateY(-50%)"}})},[v,te,A.switchOffset]),Object(Oe.useMemo)(function(){return S?"":A.switchDisabledClass},[S,A.switchDisabledClass])),re=Object(Oe.useMemo)(function(){return M?"":A.switchDisabledClass},[M,A.switchDisabledClass]),v=Object(Oe.useMemo)(function(){return C?{float:"left",overflow:"hidden"}:{overflow:"hidden"}},[C]),T=(Object(Oe.useEffect)(function(){we(function(){return{transform:"translate(".concat(o.current,"px,").concat(a.current,"px)"),transition:"all ".concat(p.current," ").concat(s.current,"ms"),overflow:"hidden"}})},[y,V,ce,Z]),Object(Oe.useMemo)(function(){return A.navigation},[A.navigation])),R=Object(Oe.useMemo)(function(){return!T&&A.autoPlay},[T]),E=Object(Oe.useMemo)(function(){return n.length>=A.limitMoveNum},[n.length,A.limitMoveNum]),ye=Object(Oe.useMemo)(function(){return A.hoverStop&&R&&E},[A.hoverStop,R,E]),x=Object(Oe.useMemo)(function(){return A.openTouch},[A.openTouch]),C=Object(Oe.useMemo)(function(){return 1<A.direction},[A.direction]),F=Object(Oe.useMemo)(function(){return A.isSingleRemUnit?parseInt(window.getComputedStyle(document.documentElement,null).fontSize):1},[A.isSingleRemUnit]),k=Object(Oe.useMemo)(function(){return A.singleWidth*F},[A.singleWidth,F]),D=Object(Oe.useMemo)(function(){return A.singleHeight*F},[A.singleHeight,F]),H=Object(Oe.useMemo)(function(){var e,t=A.step;return 0<(e=C?k:D)&&0<e%t&&console.error("如果设置了单步滚动,step需是单步大小的约数,否则无法保证单步滚动结束的位置是否准确。~~~~~"),t},[A.step,C,k,D]),q=function(){cancelAnimationFrame(Q.current||"")};return Object(Oe.useEffect)(function(){return window.addEventListener("scrollend",W),I(),function(){window.removeEventListener("scrollend",W),q(),clearTimeout(w.current)}},[]),Se(function(){L(n),_()},[n]),Se(function(){(R?_:N)()},[R]),je.a.createElement("div",{id:P,key:U,className:X,style:$,ref:r},T&&je.a.createElement("div",{style:le,class:e,onClick:function(){S&&(Math.abs(o.current)<A.switchSingleStep?(o.current=0,O(function(e){return e+1})):(o.current+=A.switchSingleStep,O(function(e){return e+1})))}},z),T&&je.a.createElement("div",{style:be,class:re,onClick:function(){M&&(m.current-l.current+o.current<A.switchSingleStep?(o.current=l.current-m.current,O(function(e){return e+1})):(o.current-=A.switchSingleStep,O(function(e){return e+1})))}},Y),je.a.createElement("div",{ref:c,style:he,onMouseEnter:function(){ye&&N()},onMouseLeave:function(){ye&&(t.current=!1,u())},onTouchStart:function(e){var t,n,r,u;x&&(e=e.targetTouches[0],n=A.waitTime,r=A.singleHeight,u=A.singleWidth,d.current={x:e.pageX,y:e.pageY},K.current=a.current,G.current=o.current,r&&u?(t&&clearTimeout(t),setTimeout(function(){q()},n+20)):q())},onTouchMove:function(e){var t;!x||1<e.targetTouches.length||e.scale&&1!==e.scale||(e=e.targetTouches[0],t=A.direction,h.current={x:e.pageX-d.current.x,y:e.pageY-d.current.y},event.preventDefault(),1==(e=Math.abs(h.current.x)<Math.abs(h.current.y)?1:0)&&t<2?(a.current=K.current+h.current.y,j(function(e){return e+1})):0==e&&1<t&&(o.current=G.current+h.current.x,O(function(e){return e+1})))},onTouchEnd:function(){var e,t,n;x&&(t=A.direction,s.current=50,g(function(e){return e+1}),1===t?0<a.current&&(a.current=0,j(function(e){return e+1})):0===t?(n=b.current/2*-1,a.current<n&&(a.current=n,j(function(e){return e+1}))):2===t?0<o.current&&(o.current=0,O(function(e){return e+1})):3===t&&(n=-1*m.current,o.current<n)&&(o.current=n,O(function(e){return e+1})),e&&clearTimeout(e),setTimeout(function(){s.current=0,g(function(e){return e+1}),u()},s.current))}},je.a.createElement("div",{ref:i,style:v},J),je.a.createElement("div",{dangerouslySetInnerHTML:{__html:oe},style:v})))}(t.default=c).defaultProps=r.b,c.propTypes=r.c},870:function(e,t){var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function e(){Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var t,n,r,u,c=void 0,i=void 0,o=1,a=arguments[0]||{},s=!1,f=arguments.length;if("boolean"==typeof a&&(s=a,a=arguments[1]||{},o++),"object"!==(void 0===a?"undefined":l(a))&&"function"!=typeof a&&(a={}),o!==f)for(;o<f;o++)if(null!=(t=arguments[o]))for(c in t)n=a[c],r=t[c],u=Array.isArray(r),s&&r&&("object"===(void 0===r?"undefined":l(r))||u)?(i=u?n&&Array.isArray(n)?n:[]:n&&"object"===(void 0===n?"undefined":l(n))?n:{},a[c]=e(s,i,r)):void 0!==r&&(a[c]=r);return a}},871:function(e,t){e.exports=function(){window.cancelAnimationFrame=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return window.clearTimeout(e)},window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[29],{492:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_components_FefferyShortcutPanel_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(175),lodash__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(23),lodash__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__),ninja_keys__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(906),_components_FefferyStyle_react__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(89);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}var footerHtmlEn=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{class:"modal-footer",slot:"footer"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{class:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"enter"),"to select"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ninja-examplekey",viewBox:"0 0 24 24"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ninja-examplekey",viewBox:"0 0 24 24"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),"to navigate"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"esc"),"to close"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"backspace"),"move to parent")),footerHtmlZh=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"modal-footer",slot:"footer"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"enter"),"选择"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ninja-examplekey",viewBox:"0 0 24 24"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ninja-examplekey",viewBox:"0 0 24 24"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),"上下切换"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"esc"),"关闭面板"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"backspace"),"回到上一级")),locale2footer=new Map([["en",footerHtmlEn],["zh",footerHtmlZh]]),locale2placeholder=new Map([["en","Type a command or search..."],["zh","输入指令或进行搜索..."]]),FefferyShortcutPanel=function FefferyShortcutPanel(props){var id=props.id,data=props.data,placeholder=props.placeholder,openHotkey=props.openHotkey,theme=props.theme,locale=props.locale,open=props.open,close=props.close,panelStyles=props.panelStyles,setProps=props.setProps,loading_state=props.loading_state,data=data.map(function(e){return Object(lodash__WEBPACK_IMPORTED_MODULE_2__.isString)(e.handler)||e.hasOwnProperty("children")?e:_objectSpread(_objectSpread({},e),{handler:function(){setProps({triggeredHotkey:{id:e.id,timestamp:Date.parse(new Date)}})}})}),ninjaKeys=Object(react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);return Object(react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){ninjaKeys.current&&ninjaKeys.current.addEventListener("change",function(e){setProps({searchValue:e.detail.search})})},[]),Object(react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){ninjaKeys.current&&(ninjaKeys.current.data=data.map(function(item){return Object(lodash__WEBPACK_IMPORTED_MODULE_2__.isString)(item.handler)?_objectSpread(_objectSpread({},item),{handler:eval(item.handler)}):item}))},[data]),Object(react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){ninjaKeys.current&&open&&(ninjaKeys.current.open(),setProps({open:!1}))},[open]),Object(react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){ninjaKeys.current&&close&&(ninjaKeys.current.close(),setProps({close:!1}))},[close]),panelStyles=_objectSpread(_objectSpread({},{width:"640px",overflowBackground:"rgba(255, 255, 255, 0.5)",textColor:"rgb(60, 65, 73)",fontSize:"16px",top:"20%",accentColor:"rgb(110, 94, 210)",secondaryBackgroundColor:"rgb(239, 241, 244)",secondaryTextColor:"rgb(107, 111, 118)",selectedBackground:"rgb(248, 249, 251)",actionsHeight:"300px",groupTextColor:"rgb(144, 149, 157)",zIndex:1}),panelStyles),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_FefferyStyle_react__WEBPACK_IMPORTED_MODULE_4__.a,{rawStyle:"\nninja-keys {\n --ninja-width: ".concat(panelStyles.width,";\n --ninja-overflow-background: ").concat(panelStyles.overflowBackground,";\n --ninja-text-color: ").concat(panelStyles.textColor,";\n --ninja-font-size: ").concat(panelStyles.fontSize,";\n --ninja-top: ").concat(panelStyles.top,";\n --ninja-accent-color: ").concat(panelStyles.accentColor,";\n --ninja-secondary-background-color: ").concat(panelStyles.secondaryBackgroundColor,";\n --ninja-secondary-text-color: ").concat(panelStyles.secondaryTextColor,";\n --ninja-selected-background: ").concat(panelStyles.selectedBackground,";\n --ninja-actions-height: ").concat(panelStyles.actionsHeight,";\n --ninja-group-text-color: ").concat(panelStyles.groupTextColor,";\n --ninja-z-index: ").concat(panelStyles.zIndex,";\n}\n")}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ninja-keys",{id:id,class:theme,ref:ninjaKeys,placeholder:placeholder||locale2placeholder.get(locale),openHotkey:openHotkey,hotKeysJoinedView:!0,hideBreadcrumbs:!0,"data-dash-is-loading":loading_state&&loading_state.is_loading||void 0},locale2footer.get(locale)))};__webpack_exports__.default=FefferyShortcutPanel,FefferyShortcutPanel.defaultProps=_components_FefferyShortcutPanel_react__WEBPACK_IMPORTED_MODULE_1__.b,FefferyShortcutPanel.propTypes=_components_FefferyShortcutPanel_react__WEBPACK_IMPORTED_MODULE_1__.c},906:function(T,R,e){"use strict";const B=window,L=B.ShadowRoot&&(void 0===B.ShadyCSS||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),K=new WeakMap;class N{constructor(e,t,n){if(this._$cssResult$=!0,n!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;var t,n=this.t;return L&&void 0===e&&(t=void 0!==n&&1===n.length,void 0===(e=t?K.get(n):e))&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t)&&K.set(n,e),e}toString(){return this.cssText}}const z=(i,...e)=>{e=1===i.length?i[0]:e.reduce((e,t,n)=>e+(()=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})()+i[n+1],i[0]);return new N(e,i,I)},W=L?e=>e:t=>{if(!(t instanceof CSSStyleSheet))return t;{let e="";for(const n of t.cssRules)e+=n.cssText;return t=e,new N("string"==typeof t?t:t+"",void 0,I)}};const V=window,q=V.trustedTypes,F=q?q.emptyScript:"",J=V.reactiveElementPolyfillSupport,G={toAttribute(e,t){switch(t){case Boolean:e=e?F:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Z=(e,t)=>t!==e&&(t==t||e==e),Q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:Z};class t extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!=(t=this.h)?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const n=[];return this.elementProperties.forEach((e,t)=>{e=this._$Ep(t,e);void 0!==e&&(this._$Ev.set(e,t),n.push(e))}),n}static createProperty(e,t=Q){var n;t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e)||(n="symbol"==typeof e?Symbol():"__"+e,void 0!==(n=this.getPropertyDescriptor(e,n,t))&&Object.defineProperty(this.prototype,e,n))}static getPropertyDescriptor(n,i,s){return{get(){return this[i]},set(e){var t=this[n];this[i]=e,this.requestUpdate(n,t,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Q}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){var t=[];if(Array.isArray(e)){var n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(W(e))}else void 0!==e&&t.push(W(e));return t}static _$Ep(e,t){t=t.attribute;return!1===t?void 0:"string"==typeof t?t:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null!=(e=this.constructor.h)&&e.forEach(e=>e(this))}addController(e){var t;(null!=(t=this._$ES)?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&null!=(t=e.hostConnected)&&t.call(e)}removeController(e){var t;null!=(t=this._$ES)&&t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var i,e,t=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return i=t,e=this.constructor.elementStyles,L?i.adoptedStyleSheets=e.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):e.forEach(e=>{var t=document.createElement("style"),n=B.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=e.cssText,i.appendChild(t)}),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null!=(e=this._$ES)&&e.forEach(e=>{var t;return null==(t=e.hostConnected)?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null!=(e=this._$ES)&&e.forEach(e=>{var t;return null==(t=e.hostDisconnected)?void 0:t.call(e)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Q){var i,s=this.constructor._$Ep(e,n);void 0!==s&&!0===n.reflect&&(i=(void 0!==(null==(i=n.converter)?void 0:i.toAttribute)?n.converter:G).toAttribute(t,n.type),this._$El=e,null==i?this.removeAttribute(s):this.setAttribute(s,i),this._$El=null)}_$AK(e,t){var n=this.constructor,i=n._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=n.getPropertyOptions(i),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null==(n=e.converter)?void 0:n.fromAttribute)?e.converter:G;this._$El=i,this[i]=s.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,n){let i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Z)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}var e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((e,t)=>this[t]=e),this._$Ei=void 0);let e=!1;var n=this._$AL;try{(e=this.shouldUpdate(n))?(this.willUpdate(n),null!=(t=this._$ES)&&t.forEach(e=>{var t;return null==(t=e.hostUpdate)?void 0:t.call(e)}),this.update(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}}willUpdate(e){}_$AE(e){var t;null!=(t=this._$ES)&&t.forEach(e=>{var t;return null==(t=e.hostUpdated)?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach((e,t)=>this._$EO(t,this[t],e)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}t.finalized=!0,t.elementProperties=new Map,t.elementStyles=[],t.shadowRootOptions={mode:"open"},null!=J&&J({ReactiveElement:t}),(null!=(n=V.reactiveElementVersions)?n:V.reactiveElementVersions=[]).push("1.6.3");const X=window,c=X.trustedTypes,Y=c?c.createPolicy("lit-html",{createHTML:e=>e}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,ee="?"+p,te=`<${ee}>`,l=document,h=()=>l.createComment(""),d=e=>null===e||"object"!=typeof e&&"function"!=typeof e,ne=Array.isArray,ie=e=>ne(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),u=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,se=/-->/g,re=/>/g,_=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),oe=/'/g,ae=/"/g,le=/^(?:script|style|textarea|title)$/i,ce=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),r=ce(1),f=(ce(2),Symbol.for("lit-noChange")),v=Symbol.for("lit-nothing"),he=new WeakMap,y=l.createTreeWalker(l,129,null,!1);function de(e,t){if(Array.isArray(e)&&e.hasOwnProperty("raw"))return void 0!==Y?Y.createHTML(t):t;throw Error("invalid template strings array")}const pe=(r,e)=>{const o=r.length-1,a=[];let l,c=2===e?"<svg>":"",h=u;for(let s=0;s<o;s++){const o=r[s];let e,t,n=-1,i=0;for(;i<o.length&&(h.lastIndex=i,null!==(t=h.exec(o)));)i=h.lastIndex,h===u?"!--"===t[1]?h=se:void 0!==t[1]?h=re:void 0!==t[2]?(le.test(t[2])&&(l=RegExp("</"+t[2],"g")),h=_):void 0!==t[3]&&(h=_):h===_?">"===t[0]?(h=null!=l?l:u,n=-1):void 0===t[1]?n=-2:(n=h.lastIndex-t[2].length,e=t[1],h=void 0===t[3]?_:'"'===t[3]?ae:oe):h===ae||h===oe?h=_:h===se||h===re?h=u:(h=_,l=void 0);var d=h===_&&r[s+1].startsWith("/>")?" ":"";c+=h===u?o+te:0<=n?(a.push(e),o.slice(0,n)+"$lit$"+o.slice(n)+p+d):o+p+(-2===n?(a.push(void 0),s):d)}return[de(r,c+(r[o]||"<?>")+(2===e?"</svg>":"")),a]};class ue{constructor({strings:t,_$litType$:n},e){var i;this.parts=[];let s=0,r=0;var o=t.length-1,a=this.parts,[t,l]=pe(t,n);if(this.el=ue.createElement(t,e),y.currentNode=this.el.content,2===n){const t=this.el.content,n=t.firstChild;n.remove(),t.append(...n.childNodes)}for(;null!==(i=y.nextNode())&&a.length<o;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const n of i.getAttributeNames())if(n.endsWith("$lit$")||n.startsWith(p)){const e=l[r++];if(t.push(n),void 0!==e){const t=i.getAttribute(e.toLowerCase()+"$lit$").split(p),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:n[2],strings:t,ctor:"."===n[1]?ye:"?"===n[1]?ge:"@"===n[1]?$e:ve})}else a.push({type:6,index:s})}for(const n of t)i.removeAttribute(n)}if(le.test(i.tagName)){const t=i.textContent.split(p),n=t.length-1;if(0<n){i.textContent=c?c.emptyScript:"";for(let e=0;e<n;e++)i.append(t[e],h()),y.nextNode(),a.push({type:2,index:++s});i.append(t[n],h())}}}else if(8===i.nodeType)if(i.data===ee)a.push({type:2,index:s});else{let e=-1;for(;-1!==(e=i.data.indexOf(p,e+1));)a.push({type:7,index:s}),e+=p.length-1}s++}}static createElement(e,t){var n=l.createElement("template");return n.innerHTML=e,n}}function m(t,n,i=t,s){var r;if(n!==f){let e=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;var o=d(n)?void 0:n._$litDirective$;(null==e?void 0:e.constructor)!==o&&(null!=(r=null==e?void 0:e._$AO)&&r.call(e,!1),void 0===o?e=void 0:(e=new o(t))._$AT(t,i,s),void 0!==s?(null!=(r=i._$Co)?r:i._$Co=[])[s]=e:i._$Cl=e),void 0!==e&&(n=m(t,e._$AS(t,n.values),e,s))}return n}class _e{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var{el:{content:e},parts:n}=this._$AD,i=(null!=(i=null==t?void 0:t.creationScope)?i:l).importNode(e,!0);y.currentNode=i;let s=y.nextNode(),r=0,o=0,a=n[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new fe(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new be(s,this,t)),this._$AV.push(e),a=n[++o]}r!==(null==a?void 0:a.index)&&(s=y.nextNode(),r++)}return y.currentNode=l,i}v(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class fe{constructor(e,t,n,i){this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cp=null==(e=null==i?void 0:i.isConnected)||e}get _$AU(){var e;return null!=(e=null==(e=this._$AM)?void 0:e._$AU)?e:this._$Cp}get parentNode(){let e=this._$AA.parentNode;var t=this._$AM;return e=void 0!==t&&11===(null==e?void 0:e.nodeType)?t.parentNode:e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=m(this,e,t),d(e)?e===v||null==e||""===e?(this._$AH!==v&&this._$AR(),this._$AH=v):e!==this._$AH&&e!==f&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):ie(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==v&&d(this._$AH)?this._$AA.nextSibling.data=e:this.$(l.createTextNode(e)),this._$AH=e}g(e){var t,{values:n,_$litType$:i}=e,i="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=ue.createElement(de(i.h,i.h[0]),this.options)),i);if((null==(t=this._$AH)?void 0:t._$AD)===i)this._$AH.v(n);else{const e=new _e(i,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=he.get(e.strings);return void 0===t&&he.set(e.strings,t=new ue(e)),t}T(e){ne(this._$AH)||(this._$AH=[],this._$AR());var t=this._$AH;let n,i=0;for(const s of e)i===t.length?t.push(n=new fe(this.k(h()),this.k(h()),this,this.options)):n=t[i],n._$AI(s),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for(null!=(n=this._$AP)&&n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cp=e,null!=(t=this._$AP))&&t.call(this,e)}}class ve{constructor(e,t,n,i,s){this.type=1,this._$AH=v,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=s,2<n.length||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=v}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(n,i=this,s,r){var o=this.strings;let a=!1;if(void 0===o)n=m(this,n,i,0),(a=!d(n)||n!==this._$AH&&n!==f)&&(this._$AH=n);else{const r=n;let e,t;for(n=o[0],e=0;e<o.length-1;e++)(t=m(this,r[s+e],i,e))===f&&(t=this._$AH[e]),a=a||!d(t)||t!==this._$AH[e],t===v?n=v:n!==v&&(n+=(null!=t?t:"")+o[e+1]),this._$AH[e]=t}a&&!r&&this.j(n)}j(e){e===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class ye extends ve{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===v?void 0:e}}const me=c?c.emptyScript:"";class ge extends ve{constructor(){super(...arguments),this.type=4}j(e){e&&e!==v?this.element.setAttribute(this.name,me):this.element.removeAttribute(this.name)}}class $e extends ve{constructor(e,t,n,i,s){super(e,t,n,i,s),this.type=5}_$AI(e,t=this){var n,i;(e=null!=(t=m(this,e,t,0))?t:v)!==f&&(t=this._$AH,n=e===v&&t!==v||e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive,i=e!==v&&(t===v||n),n&&this.element.removeEventListener(this.name,this,t),i&&this.element.addEventListener(this.name,this,e),this._$AH=e)}handleEvent(e){var t;"function"==typeof this._$AH?this._$AH.call(null!=(t=null==(t=this.options)?void 0:t.host)?t:this.element,e):this._$AH.handleEvent(e)}}class be{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){m(this,e)}}var n={O:"$lit$",P:p,A:ee,C:1,M:pe,L:_e,R:ie,D:m,I:fe,V:ve,H:ge,N:$e,U:ye,F:be},i=X.litHtmlPolyfillSupport;null!=i&&i(ue,fe),(null!=(i=X.litHtmlVersions)?i:X.litHtmlVersions=[]).push("2.8.0");class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t=super.createRenderRoot();return null==(e=this.renderOptions).renderBefore&&(e.renderBefore=t.firstChild),t}update(e){var t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{var i,s=null!=(s=null==n?void 0:n.renderBefore)?s:t;let r=s._$litPart$;if(void 0===r){const e=null!=(i=null==n?void 0:n.renderBefore)?i:null;s._$litPart$=r=new fe(t.insertBefore(h(),e),e,void 0,null!=n?n:{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null!=(e=this._$Do)&&e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null!=(e=this._$Do)&&e.setConnected(!1)}render(){return f}}s.finalized=!0,s._$litElement$=!0,null!=(i=globalThis.litElementHydrateSupport)&&i.call(globalThis,{LitElement:s});var i=globalThis.litElementPolyfillSupport;null!=i&&i({LitElement:s}),(null!=(i=globalThis.litElementVersions)?i:globalThis.litElementVersions=[]).push("3.3.3");const Ee=s=>e=>{var t,n,i;return"function"!=typeof e?(t=s,{kind:i,elements:n}=e,{kind:i,elements:n,finisher(e){customElements.define(t,e)}}):(i=e,customElements.define(s,i),i)};function o(s){return(e,t)=>{return void 0!==t?void e.constructor.createProperty(t,s):(n=s,"method"!==(i=e).kind||!i.descriptor||"value"in i.descriptor?{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,n)}}:{...i,finisher(e){e.createProperty(i.key,n)}});var n,i}}function a(e){return o({...e,state:!0})}null!=(i=window.HTMLSlotElement)&&i.prototype.assignedElements;const Ae=2,we=t=>(...e)=>({_$litDirective$:t,values:e});class ke{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const xe=n["I"],Pe=e=>void 0===e.strings,je=()=>document.createComment(""),Oe=(t,n,i)=>{var s,r=t._$AA.parentNode,o=void 0===n?t._$AB:n._$AA;if(void 0===i){const n=r.insertBefore(je(),o),s=r.insertBefore(je(),o);i=new xe(n,s,t,t.options)}else{const n=i._$AB.nextSibling,a=i._$AM,e=a!==t;if(e){let e;null!=(s=i._$AQ)&&s.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==a._$AU&&i._$AP(e)}if(n!==o||e){let e=i._$AA;for(;e!==n;){const n=e.nextSibling;r.insertBefore(e,o),e=n}}}return i},g=(e,t,n=e)=>(e._$AI(t,n),e),Se={},Ce=(e,t=Se)=>e._$AH=t,Me=e=>{var t;null!=(t=e._$AP)&&t.call(e,!1,!0);let n=e._$AA;for(var i=e._$AB.nextSibling;n!==i;){const e=n.nextSibling;n.remove(),n=e}},De=(t,n,i)=>{var s=new Map;for(let e=n;e<=i;e++)s.set(t[e],e);return s},Ue=we(class extends ke{constructor(e){if(super(e),e.type!==Ae)throw Error("repeat() can only be used in text expressions")}ct(e,t,n){let i;void 0===n?n=t:void 0!==t&&(i=t);var s=[],r=[];let o=0;for(const t of e)s[o]=i?i(t,o):o,r[o]=n(t,o),o++;return{values:r,keys:s}}render(e,t,n){return this.ct(e,t,n).values}update(e,[t,n,i]){var s=e._$AH,{values:r,keys:o}=this.ct(t,n,i);if(!Array.isArray(s))return this.ut=o,r;var a=null!=(t=this.ut)?t:this.ut=[],l=[];let c,h,d=0,p=s.length-1,u=0,_=r.length-1;for(;d<=p&&u<=_;)if(null===s[d])d++;else if(null===s[p])p--;else if(a[d]===o[u])l[u]=g(s[d],r[u]),d++,u++;else if(a[p]===o[_])l[_]=g(s[p],r[_]),p--,_--;else if(a[d]===o[_])l[_]=g(s[d],r[_]),Oe(e,l[_+1],s[d]),d++,_--;else if(a[p]===o[u])l[u]=g(s[p],r[u]),Oe(e,s[d],s[p]),p--,u++;else if(void 0===c&&(c=De(o,u,_),h=De(a,d,p)),c.has(a[d]))if(c.has(a[p])){const t=h.get(o[u]),n=void 0!==t?s[t]:null;if(null===n){const t=Oe(e,s[d]);g(t,r[u]),l[u]=t}else l[u]=g(n,r[u]),Oe(e,s[d],n),s[t]=null;u++}else Me(s[p]),p--;else Me(s[d]),d++;for(;u<=_;){const t=Oe(e,l[_+1]);g(t,r[u]),l[u++]=t}for(;d<=p;){const e=s[d++];null!==e&&Me(e)}return this.ut=o,Ce(e,l),f}}),He=we(class extends ke{constructor(e){if(super(e),3!==e.type&&1!==e.type&&4!==e.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!Pe(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t!==f&&t!==v){var n=e.element,i=e.name;if(3===e.type){if(t===n[i])return f}else if(4===e.type){if(!!t===n.hasAttribute(i))return f}else if(1===e.type&&n.getAttribute(i)===t+"")return f;Ce(e)}return t}}),Te=(e,t)=>{var n,i,s=e._$AN;if(void 0===s)return!1;for(const e of s)null!=(i=(n=e)._$AO)&&i.call(n,t,!1),Te(e,t);return!0},Re=e=>{let t,n;for(;void 0!==(t=e._$AM)&&((n=t._$AN).delete(e),e=t,0===(null==n?void 0:n.size)););},Be=n=>{for(let t;t=n._$AM;n=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(n))break;e.add(n),i=t,0,i.type==Ae&&(null==i._$AP&&(i._$AP=Ie),null==i._$AQ)&&(i._$AQ=Le)}var i};function Le(e){void 0!==this._$AN?(Re(this),this._$AM=e,Be(this)):this._$AM=e}function Ie(e,t=!1,n=0){var i=this._$AH,s=this._$AN;if(void 0!==s&&0!==s.size)if(t)if(Array.isArray(i))for(let e=n;e<i.length;e++)Te(i[e],!1),Re(i[e]);else null!=i&&(Te(i,!1),Re(i));else Te(this,e)}class Ke extends ke{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),Be(this),this.isConnected=e._$AU}_$AO(e,t=!0){var n;e!==this.isConnected&&((this.isConnected=e)?null!=(n=this.reconnected)&&n.call(this):null!=(n=this.disconnected)&&n.call(this)),t&&(Te(this,e),Re(this))}setValue(e){var t;Pe(this._$Ct)?this._$Ct._$AI(e,this):((t=[...this._$Ct._$AH])[this._$Ci]=e,this._$Ct._$AI(t,this,0))}disconnected(){}reconnected(){}}const Ne=()=>new ze;class ze{}const We=new WeakMap,Ve=we(class extends Ke{render(e){return v}update(e,[t]){var n=t!==this.G;return n&&void 0!==this.G&&this.ot(void 0),!n&&this.rt===this.lt||(this.G=t,this.dt=null==(n=e.options)?void 0:n.host,this.ot(this.lt=e.element)),v}ot(t){if("function"==typeof this.G){var n=null!=(n=this.dt)?n:globalThis;let e=We.get(n);void 0===e&&(e=new WeakMap,We.set(n,e)),void 0!==e.get(this.G)&&this.G.call(this.dt,void 0),e.set(this.G,t),void 0!==t&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var e;return"function"==typeof this.G?null==(e=We.get(null!=(e=this.dt)?e:globalThis))?void 0:e.get(this.G):null==(e=this.G)?void 0:e.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),qe=we(class extends ke{constructor(e){if(super(e),1!==e.type||"class"!==e.name||2<(null==(e=e.strings)?void 0:e.length))throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(e,[t]){var n,i;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)!t[e]||null!=(n=this.nt)&&n.has(e)||this.it.add(e);return this.render(t)}const s=e.element.classList;this.it.forEach(e=>{e in t||(s.remove(e),this.it.delete(e))});for(const e in t){const n=!!t[e];n===this.it.has(e)||null!=(i=this.nt)&&i.has(e)||(n?(s.add(e),this.it.add(e)):(s.remove(e),this.it.delete(e)))}return f}});i="undefined"!=typeof navigator&&0<navigator.userAgent.toLowerCase().indexOf("firefox");function Fe(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function Je(e,t){for(var n=t.slice(0,t.length-1),i=0;i<n.length;i++)n[i]=e[n[i].toLowerCase()];return n}function Ge(e){for(var t=(e=(e="string"!=typeof e?"":e).replace(/\s/g,"")).split(","),n=t.lastIndexOf("");0<=n;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var Ze={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":i?173:189,"=":i?61:187,";":i?59:186,"'":222,"[":219,"]":221,"\\":220},$={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Qe={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},b={16:!1,18:!1,17:!1,91:!1},E={},Xe=1;Xe<20;Xe++)Ze["f".concat(Xe)]=111+Xe;var A=[],Ye="all",et=[],tt=function(e){return Ze[e.toLowerCase()]||$[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function nt(e){Ye=e||"all"}function it(){return Ye||"all"}function st(e){var t=e.key,i=e.scope,s=e.method,o=void 0===(e=e.splitKey)?"+":e;Ge(t).forEach(function(e){var r,e=e.split(o),t=e.length,n=e[t-1],n="*"===n?"*":tt(n);E[n]&&(i=i||it(),r=1<t?Je($,e):[],E[n]=E[n].map(function(e){return s&&e.method!==s||e.scope!==i||!function(e){for(var t=e.length>=r.length?e:r,n=e.length>=r.length?r:e,i=!0,s=0;s<t.length;s++)-1===n.indexOf(t[s])&&(i=!1);return i}(e.mods)?e:{}}))})}function rt(e,t,n){var i;if(t.scope===n||"all"===t.scope){for(var s in i=0<t.mods.length,b)Object.prototype.hasOwnProperty.call(b,s)&&(!b[s]&&-1<t.mods.indexOf(+s)||b[s]&&-1===t.mods.indexOf(+s))&&(i=!1);(0!==t.mods.length||b[16]||b[18]||b[17]||b[91])&&!i&&"*"!==t.shortcut||!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble)&&(e.cancelBubble=!0)}}function ot(n){var e=E["*"],t=n.keyCode||n.which||n.charCode;if(w.filter.call(this,n)){if(-1===A.indexOf(t=93!==t&&224!==t?t:91)&&229!==t&&A.push(t),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(e){var t=Qe[e];n[e]&&-1===A.indexOf(t)?A.push(t):!n[e]&&-1<A.indexOf(t)?A.splice(A.indexOf(t),1):"metaKey"!==e||!n[e]||3!==A.length||n.ctrlKey||n.shiftKey||n.altKey||(A=A.slice(A.indexOf(t)))}),t in b){for(var i in b[t]=!0,$)$[i]===t&&(w[i]=!0);if(!e)return}for(var s in b)Object.prototype.hasOwnProperty.call(b,s)&&(b[s]=n[Qe[s]]);n.getModifierState&&(!n.altKey||n.ctrlKey)&&n.getModifierState("AltGraph")&&(-1===A.indexOf(17)&&A.push(17),-1===A.indexOf(18)&&A.push(18),b[17]=!0,b[18]=!0);var r=it();if(e)for(var o=0;o<e.length;o++)e[o].scope===r&&("keydown"===n.type&&e[o].keydown||"keyup"===n.type&&e[o].keyup)&&rt(n,e[o],r);if(t in E)for(var a=0;a<E[t].length;a++)if(("keydown"===n.type&&E[t][a].keydown||"keyup"===n.type&&E[t][a].keyup)&&E[t][a].key){for(var l=E[t][a],c=l.splitKey,h=l.key.split(c),d=[],p=0;p<h.length;p++)d.push(tt(h[p]));d.sort().join("")===A.sort().join("")&&rt(n,l,r)}}}function w(e,t,n){A=[];var i=Ge(e),s=[],r="all",o=document,a=0,l=!1,c=!0,h="+";for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(r=t.scope),t.element&&(o=t.element),t.keyup&&(l=t.keyup),void 0!==t.keydown&&(c=t.keydown),"string"==typeof t.splitKey)&&(h=t.splitKey),"string"==typeof t&&(r=t);a<i.length;a++)s=[],1<(e=i[a].split(h)).length&&(s=Je($,e)),(e="*"===(e=e[e.length-1])?"*":tt(e))in E||(E[e]=[]),E[e].push({keyup:l,keydown:c,scope:r,mods:s,shortcut:i[a],method:n,key:i[a],splitKey:h});void 0===o||(t=o,-1<et.indexOf(t))||!window||(et.push(o),Fe(o,"keydown",function(e){ot(e)}),Fe(window,"focus",function(){A=[]}),Fe(o,"keyup",function(e){ot(e);var t=e.keyCode||e.which||e.charCode,n=A.indexOf(t);if(0<=n&&A.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&A.splice(0,A.length),(t=93!==t&&224!==t?t:91)in b)for(var i in b[t]=!1,$)$[i]===t&&(w[i]=!1)}))}var at,lt,ct={setScope:nt,getScope:it,deleteScope:function(e,t){var n,i,s;for(s in e=e||it(),E)if(Object.prototype.hasOwnProperty.call(E,s))for(n=E[s],i=0;i<n.length;)n[i].scope===e?n.splice(i,1):i++;it()===e&&nt(t||"all")},getPressedKeyCodes:function(){return A.slice(0)},isPressed:function(e){return"string"==typeof e&&(e=tt(e)),-1!==A.indexOf(e)},filter:function(e){var e=e.target||e.srcElement,t=e.tagName,n=!0;return n=!e.isContentEditable&&("INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t||e.readOnly)?n:!1},unbind:function(e){if(e){if(Array.isArray(e))e.forEach(function(e){e.key&&st(e)});else if("object"==typeof e)e.key&&st(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var s=n[0],r=n[1];"function"==typeof s&&(r=s,s=""),st({key:e,scope:s,method:r,splitKey:"+"})}}else Object.keys(E).forEach(function(e){return delete E[e]})}};for(at in ct)Object.prototype.hasOwnProperty.call(ct,at)&&(w[at]=ct[at]);"undefined"!=typeof window&&(lt=window.hotkeys,w.noConflict=function(e){return e&&window.hotkeys===w&&(window.hotkeys=lt),w},window.hotkeys=w);function ht(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;0<=a;a--)(s=e[a])&&(o=(r<3?s(o):3<r?s(t,n,o):s(t,n))||o);return 3<r&&o&&Object.defineProperty(t,n,o),o}var k=w,n=class extends s{constructor(){super(...arguments),this.placeholder="",this.hideBreadcrumbs=!1,this.breadcrumbHome="Home",this.breadcrumbs=[],this._inputRef=Ne()}render(){let e="";if(!this.hideBreadcrumbs){var t=[];for(const e of this.breadcrumbs)t.push(r`<button
|
|
1
|
+
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[29],{492:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_components_FefferyShortcutPanel_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(176),lodash__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(23),lodash__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__),ninja_keys__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(906),_components_FefferyStyle_react__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(89);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}var footerHtmlEn=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{class:"modal-footer",slot:"footer"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{class:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"enter"),"to select"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ninja-examplekey",viewBox:"0 0 24 24"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ninja-examplekey",viewBox:"0 0 24 24"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),"to navigate"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"esc"),"to close"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"backspace"),"move to parent")),footerHtmlZh=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"modal-footer",slot:"footer"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"enter"),"选择"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ninja-examplekey",viewBox:"0 0 24 24"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ninja-examplekey",viewBox:"0 0 24 24"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),"上下切换"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"esc"),"关闭面板"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"help"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"ninja-examplekey esc"},"backspace"),"回到上一级")),locale2footer=new Map([["en",footerHtmlEn],["zh",footerHtmlZh]]),locale2placeholder=new Map([["en","Type a command or search..."],["zh","输入指令或进行搜索..."]]),FefferyShortcutPanel=function FefferyShortcutPanel(props){var id=props.id,data=props.data,placeholder=props.placeholder,openHotkey=props.openHotkey,theme=props.theme,locale=props.locale,open=props.open,close=props.close,panelStyles=props.panelStyles,setProps=props.setProps,loading_state=props.loading_state,data=data.map(function(e){return Object(lodash__WEBPACK_IMPORTED_MODULE_2__.isString)(e.handler)||e.hasOwnProperty("children")?e:_objectSpread(_objectSpread({},e),{handler:function(){setProps({triggeredHotkey:{id:e.id,timestamp:Date.parse(new Date)}})}})}),ninjaKeys=Object(react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);return Object(react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){ninjaKeys.current&&ninjaKeys.current.addEventListener("change",function(e){setProps({searchValue:e.detail.search})})},[]),Object(react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){ninjaKeys.current&&(ninjaKeys.current.data=data.map(function(item){return Object(lodash__WEBPACK_IMPORTED_MODULE_2__.isString)(item.handler)?_objectSpread(_objectSpread({},item),{handler:eval(item.handler)}):item}))},[data]),Object(react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){ninjaKeys.current&&open&&(ninjaKeys.current.open(),setProps({open:!1}))},[open]),Object(react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function(){ninjaKeys.current&&close&&(ninjaKeys.current.close(),setProps({close:!1}))},[close]),panelStyles=_objectSpread(_objectSpread({},{width:"640px",overflowBackground:"rgba(255, 255, 255, 0.5)",textColor:"rgb(60, 65, 73)",fontSize:"16px",top:"20%",accentColor:"rgb(110, 94, 210)",secondaryBackgroundColor:"rgb(239, 241, 244)",secondaryTextColor:"rgb(107, 111, 118)",selectedBackground:"rgb(248, 249, 251)",actionsHeight:"300px",groupTextColor:"rgb(144, 149, 157)",zIndex:1}),panelStyles),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_FefferyStyle_react__WEBPACK_IMPORTED_MODULE_4__.a,{rawStyle:"\nninja-keys {\n --ninja-width: ".concat(panelStyles.width,";\n --ninja-overflow-background: ").concat(panelStyles.overflowBackground,";\n --ninja-text-color: ").concat(panelStyles.textColor,";\n --ninja-font-size: ").concat(panelStyles.fontSize,";\n --ninja-top: ").concat(panelStyles.top,";\n --ninja-accent-color: ").concat(panelStyles.accentColor,";\n --ninja-secondary-background-color: ").concat(panelStyles.secondaryBackgroundColor,";\n --ninja-secondary-text-color: ").concat(panelStyles.secondaryTextColor,";\n --ninja-selected-background: ").concat(panelStyles.selectedBackground,";\n --ninja-actions-height: ").concat(panelStyles.actionsHeight,";\n --ninja-group-text-color: ").concat(panelStyles.groupTextColor,";\n --ninja-z-index: ").concat(panelStyles.zIndex,";\n}\n")}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ninja-keys",{id:id,class:theme,ref:ninjaKeys,placeholder:placeholder||locale2placeholder.get(locale),openHotkey:openHotkey,hotKeysJoinedView:!0,hideBreadcrumbs:!0,"data-dash-is-loading":loading_state&&loading_state.is_loading||void 0},locale2footer.get(locale)))};__webpack_exports__.default=FefferyShortcutPanel,FefferyShortcutPanel.defaultProps=_components_FefferyShortcutPanel_react__WEBPACK_IMPORTED_MODULE_1__.b,FefferyShortcutPanel.propTypes=_components_FefferyShortcutPanel_react__WEBPACK_IMPORTED_MODULE_1__.c},906:function(T,R,e){"use strict";const B=window,L=B.ShadowRoot&&(void 0===B.ShadyCSS||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),K=new WeakMap;class N{constructor(e,t,n){if(this._$cssResult$=!0,n!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;var t,n=this.t;return L&&void 0===e&&(t=void 0!==n&&1===n.length,void 0===(e=t?K.get(n):e))&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t)&&K.set(n,e),e}toString(){return this.cssText}}const z=(i,...e)=>{e=1===i.length?i[0]:e.reduce((e,t,n)=>e+(()=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})()+i[n+1],i[0]);return new N(e,i,I)},W=L?e=>e:t=>{if(!(t instanceof CSSStyleSheet))return t;{let e="";for(const n of t.cssRules)e+=n.cssText;return t=e,new N("string"==typeof t?t:t+"",void 0,I)}};const V=window,q=V.trustedTypes,F=q?q.emptyScript:"",J=V.reactiveElementPolyfillSupport,G={toAttribute(e,t){switch(t){case Boolean:e=e?F:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},Z=(e,t)=>t!==e&&(t==t||e==e),Q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:Z};class t extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!=(t=this.h)?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const n=[];return this.elementProperties.forEach((e,t)=>{e=this._$Ep(t,e);void 0!==e&&(this._$Ev.set(e,t),n.push(e))}),n}static createProperty(e,t=Q){var n;t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e)||(n="symbol"==typeof e?Symbol():"__"+e,void 0!==(n=this.getPropertyDescriptor(e,n,t))&&Object.defineProperty(this.prototype,e,n))}static getPropertyDescriptor(n,i,s){return{get(){return this[i]},set(e){var t=this[n];this[i]=e,this.requestUpdate(n,t,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Q}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){var t=[];if(Array.isArray(e)){var n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(W(e))}else void 0!==e&&t.push(W(e));return t}static _$Ep(e,t){t=t.attribute;return!1===t?void 0:"string"==typeof t?t:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null!=(e=this.constructor.h)&&e.forEach(e=>e(this))}addController(e){var t;(null!=(t=this._$ES)?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&null!=(t=e.hostConnected)&&t.call(e)}removeController(e){var t;null!=(t=this._$ES)&&t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var i,e,t=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return i=t,e=this.constructor.elementStyles,L?i.adoptedStyleSheets=e.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):e.forEach(e=>{var t=document.createElement("style"),n=B.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=e.cssText,i.appendChild(t)}),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null!=(e=this._$ES)&&e.forEach(e=>{var t;return null==(t=e.hostConnected)?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null!=(e=this._$ES)&&e.forEach(e=>{var t;return null==(t=e.hostDisconnected)?void 0:t.call(e)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Q){var i,s=this.constructor._$Ep(e,n);void 0!==s&&!0===n.reflect&&(i=(void 0!==(null==(i=n.converter)?void 0:i.toAttribute)?n.converter:G).toAttribute(t,n.type),this._$El=e,null==i?this.removeAttribute(s):this.setAttribute(s,i),this._$El=null)}_$AK(e,t){var n=this.constructor,i=n._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=n.getPropertyOptions(i),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null==(n=e.converter)?void 0:n.fromAttribute)?e.converter:G;this._$El=i,this[i]=s.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,n){let i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Z)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}var e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((e,t)=>this[t]=e),this._$Ei=void 0);let e=!1;var n=this._$AL;try{(e=this.shouldUpdate(n))?(this.willUpdate(n),null!=(t=this._$ES)&&t.forEach(e=>{var t;return null==(t=e.hostUpdate)?void 0:t.call(e)}),this.update(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}}willUpdate(e){}_$AE(e){var t;null!=(t=this._$ES)&&t.forEach(e=>{var t;return null==(t=e.hostUpdated)?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach((e,t)=>this._$EO(t,this[t],e)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}t.finalized=!0,t.elementProperties=new Map,t.elementStyles=[],t.shadowRootOptions={mode:"open"},null!=J&&J({ReactiveElement:t}),(null!=(n=V.reactiveElementVersions)?n:V.reactiveElementVersions=[]).push("1.6.3");const X=window,c=X.trustedTypes,Y=c?c.createPolicy("lit-html",{createHTML:e=>e}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,ee="?"+p,te=`<${ee}>`,l=document,h=()=>l.createComment(""),d=e=>null===e||"object"!=typeof e&&"function"!=typeof e,ne=Array.isArray,ie=e=>ne(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),u=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,se=/-->/g,re=/>/g,_=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),oe=/'/g,ae=/"/g,le=/^(?:script|style|textarea|title)$/i,ce=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),r=ce(1),f=(ce(2),Symbol.for("lit-noChange")),v=Symbol.for("lit-nothing"),he=new WeakMap,y=l.createTreeWalker(l,129,null,!1);function de(e,t){if(Array.isArray(e)&&e.hasOwnProperty("raw"))return void 0!==Y?Y.createHTML(t):t;throw Error("invalid template strings array")}const pe=(r,e)=>{const o=r.length-1,a=[];let l,c=2===e?"<svg>":"",h=u;for(let s=0;s<o;s++){const o=r[s];let e,t,n=-1,i=0;for(;i<o.length&&(h.lastIndex=i,null!==(t=h.exec(o)));)i=h.lastIndex,h===u?"!--"===t[1]?h=se:void 0!==t[1]?h=re:void 0!==t[2]?(le.test(t[2])&&(l=RegExp("</"+t[2],"g")),h=_):void 0!==t[3]&&(h=_):h===_?">"===t[0]?(h=null!=l?l:u,n=-1):void 0===t[1]?n=-2:(n=h.lastIndex-t[2].length,e=t[1],h=void 0===t[3]?_:'"'===t[3]?ae:oe):h===ae||h===oe?h=_:h===se||h===re?h=u:(h=_,l=void 0);var d=h===_&&r[s+1].startsWith("/>")?" ":"";c+=h===u?o+te:0<=n?(a.push(e),o.slice(0,n)+"$lit$"+o.slice(n)+p+d):o+p+(-2===n?(a.push(void 0),s):d)}return[de(r,c+(r[o]||"<?>")+(2===e?"</svg>":"")),a]};class ue{constructor({strings:t,_$litType$:n},e){var i;this.parts=[];let s=0,r=0;var o=t.length-1,a=this.parts,[t,l]=pe(t,n);if(this.el=ue.createElement(t,e),y.currentNode=this.el.content,2===n){const t=this.el.content,n=t.firstChild;n.remove(),t.append(...n.childNodes)}for(;null!==(i=y.nextNode())&&a.length<o;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const n of i.getAttributeNames())if(n.endsWith("$lit$")||n.startsWith(p)){const e=l[r++];if(t.push(n),void 0!==e){const t=i.getAttribute(e.toLowerCase()+"$lit$").split(p),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:s,name:n[2],strings:t,ctor:"."===n[1]?ye:"?"===n[1]?ge:"@"===n[1]?$e:ve})}else a.push({type:6,index:s})}for(const n of t)i.removeAttribute(n)}if(le.test(i.tagName)){const t=i.textContent.split(p),n=t.length-1;if(0<n){i.textContent=c?c.emptyScript:"";for(let e=0;e<n;e++)i.append(t[e],h()),y.nextNode(),a.push({type:2,index:++s});i.append(t[n],h())}}}else if(8===i.nodeType)if(i.data===ee)a.push({type:2,index:s});else{let e=-1;for(;-1!==(e=i.data.indexOf(p,e+1));)a.push({type:7,index:s}),e+=p.length-1}s++}}static createElement(e,t){var n=l.createElement("template");return n.innerHTML=e,n}}function m(t,n,i=t,s){var r;if(n!==f){let e=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;var o=d(n)?void 0:n._$litDirective$;(null==e?void 0:e.constructor)!==o&&(null!=(r=null==e?void 0:e._$AO)&&r.call(e,!1),void 0===o?e=void 0:(e=new o(t))._$AT(t,i,s),void 0!==s?(null!=(r=i._$Co)?r:i._$Co=[])[s]=e:i._$Cl=e),void 0!==e&&(n=m(t,e._$AS(t,n.values),e,s))}return n}class _e{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var{el:{content:e},parts:n}=this._$AD,i=(null!=(i=null==t?void 0:t.creationScope)?i:l).importNode(e,!0);y.currentNode=i;let s=y.nextNode(),r=0,o=0,a=n[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new fe(s,s.nextSibling,this,t):1===a.type?e=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(e=new be(s,this,t)),this._$AV.push(e),a=n[++o]}r!==(null==a?void 0:a.index)&&(s=y.nextNode(),r++)}return y.currentNode=l,i}v(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class fe{constructor(e,t,n,i){this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cp=null==(e=null==i?void 0:i.isConnected)||e}get _$AU(){var e;return null!=(e=null==(e=this._$AM)?void 0:e._$AU)?e:this._$Cp}get parentNode(){let e=this._$AA.parentNode;var t=this._$AM;return e=void 0!==t&&11===(null==e?void 0:e.nodeType)?t.parentNode:e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=m(this,e,t),d(e)?e===v||null==e||""===e?(this._$AH!==v&&this._$AR(),this._$AH=v):e!==this._$AH&&e!==f&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):ie(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==v&&d(this._$AH)?this._$AA.nextSibling.data=e:this.$(l.createTextNode(e)),this._$AH=e}g(e){var t,{values:n,_$litType$:i}=e,i="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=ue.createElement(de(i.h,i.h[0]),this.options)),i);if((null==(t=this._$AH)?void 0:t._$AD)===i)this._$AH.v(n);else{const e=new _e(i,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=he.get(e.strings);return void 0===t&&he.set(e.strings,t=new ue(e)),t}T(e){ne(this._$AH)||(this._$AH=[],this._$AR());var t=this._$AH;let n,i=0;for(const s of e)i===t.length?t.push(n=new fe(this.k(h()),this.k(h()),this,this.options)):n=t[i],n._$AI(s),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for(null!=(n=this._$AP)&&n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cp=e,null!=(t=this._$AP))&&t.call(this,e)}}class ve{constructor(e,t,n,i,s){this.type=1,this._$AH=v,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=s,2<n.length||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=v}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(n,i=this,s,r){var o=this.strings;let a=!1;if(void 0===o)n=m(this,n,i,0),(a=!d(n)||n!==this._$AH&&n!==f)&&(this._$AH=n);else{const r=n;let e,t;for(n=o[0],e=0;e<o.length-1;e++)(t=m(this,r[s+e],i,e))===f&&(t=this._$AH[e]),a=a||!d(t)||t!==this._$AH[e],t===v?n=v:n!==v&&(n+=(null!=t?t:"")+o[e+1]),this._$AH[e]=t}a&&!r&&this.j(n)}j(e){e===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class ye extends ve{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===v?void 0:e}}const me=c?c.emptyScript:"";class ge extends ve{constructor(){super(...arguments),this.type=4}j(e){e&&e!==v?this.element.setAttribute(this.name,me):this.element.removeAttribute(this.name)}}class $e extends ve{constructor(e,t,n,i,s){super(e,t,n,i,s),this.type=5}_$AI(e,t=this){var n,i;(e=null!=(t=m(this,e,t,0))?t:v)!==f&&(t=this._$AH,n=e===v&&t!==v||e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive,i=e!==v&&(t===v||n),n&&this.element.removeEventListener(this.name,this,t),i&&this.element.addEventListener(this.name,this,e),this._$AH=e)}handleEvent(e){var t;"function"==typeof this._$AH?this._$AH.call(null!=(t=null==(t=this.options)?void 0:t.host)?t:this.element,e):this._$AH.handleEvent(e)}}class be{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){m(this,e)}}var n={O:"$lit$",P:p,A:ee,C:1,M:pe,L:_e,R:ie,D:m,I:fe,V:ve,H:ge,N:$e,U:ye,F:be},i=X.litHtmlPolyfillSupport;null!=i&&i(ue,fe),(null!=(i=X.litHtmlVersions)?i:X.litHtmlVersions=[]).push("2.8.0");class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t=super.createRenderRoot();return null==(e=this.renderOptions).renderBefore&&(e.renderBefore=t.firstChild),t}update(e){var t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{var i,s=null!=(s=null==n?void 0:n.renderBefore)?s:t;let r=s._$litPart$;if(void 0===r){const e=null!=(i=null==n?void 0:n.renderBefore)?i:null;s._$litPart$=r=new fe(t.insertBefore(h(),e),e,void 0,null!=n?n:{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null!=(e=this._$Do)&&e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null!=(e=this._$Do)&&e.setConnected(!1)}render(){return f}}s.finalized=!0,s._$litElement$=!0,null!=(i=globalThis.litElementHydrateSupport)&&i.call(globalThis,{LitElement:s});var i=globalThis.litElementPolyfillSupport;null!=i&&i({LitElement:s}),(null!=(i=globalThis.litElementVersions)?i:globalThis.litElementVersions=[]).push("3.3.3");const Ee=s=>e=>{var t,n,i;return"function"!=typeof e?(t=s,{kind:i,elements:n}=e,{kind:i,elements:n,finisher(e){customElements.define(t,e)}}):(i=e,customElements.define(s,i),i)};function o(s){return(e,t)=>{return void 0!==t?void e.constructor.createProperty(t,s):(n=s,"method"!==(i=e).kind||!i.descriptor||"value"in i.descriptor?{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:i.key,initializer(){"function"==typeof i.initializer&&(this[i.key]=i.initializer.call(this))},finisher(e){e.createProperty(i.key,n)}}:{...i,finisher(e){e.createProperty(i.key,n)}});var n,i}}function a(e){return o({...e,state:!0})}null!=(i=window.HTMLSlotElement)&&i.prototype.assignedElements;const Ae=2,we=t=>(...e)=>({_$litDirective$:t,values:e});class ke{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const xe=n["I"],Pe=e=>void 0===e.strings,je=()=>document.createComment(""),Oe=(t,n,i)=>{var s,r=t._$AA.parentNode,o=void 0===n?t._$AB:n._$AA;if(void 0===i){const n=r.insertBefore(je(),o),s=r.insertBefore(je(),o);i=new xe(n,s,t,t.options)}else{const n=i._$AB.nextSibling,a=i._$AM,e=a!==t;if(e){let e;null!=(s=i._$AQ)&&s.call(i,t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==a._$AU&&i._$AP(e)}if(n!==o||e){let e=i._$AA;for(;e!==n;){const n=e.nextSibling;r.insertBefore(e,o),e=n}}}return i},g=(e,t,n=e)=>(e._$AI(t,n),e),Se={},Ce=(e,t=Se)=>e._$AH=t,Me=e=>{var t;null!=(t=e._$AP)&&t.call(e,!1,!0);let n=e._$AA;for(var i=e._$AB.nextSibling;n!==i;){const e=n.nextSibling;n.remove(),n=e}},De=(t,n,i)=>{var s=new Map;for(let e=n;e<=i;e++)s.set(t[e],e);return s},Ue=we(class extends ke{constructor(e){if(super(e),e.type!==Ae)throw Error("repeat() can only be used in text expressions")}ct(e,t,n){let i;void 0===n?n=t:void 0!==t&&(i=t);var s=[],r=[];let o=0;for(const t of e)s[o]=i?i(t,o):o,r[o]=n(t,o),o++;return{values:r,keys:s}}render(e,t,n){return this.ct(e,t,n).values}update(e,[t,n,i]){var s=e._$AH,{values:r,keys:o}=this.ct(t,n,i);if(!Array.isArray(s))return this.ut=o,r;var a=null!=(t=this.ut)?t:this.ut=[],l=[];let c,h,d=0,p=s.length-1,u=0,_=r.length-1;for(;d<=p&&u<=_;)if(null===s[d])d++;else if(null===s[p])p--;else if(a[d]===o[u])l[u]=g(s[d],r[u]),d++,u++;else if(a[p]===o[_])l[_]=g(s[p],r[_]),p--,_--;else if(a[d]===o[_])l[_]=g(s[d],r[_]),Oe(e,l[_+1],s[d]),d++,_--;else if(a[p]===o[u])l[u]=g(s[p],r[u]),Oe(e,s[d],s[p]),p--,u++;else if(void 0===c&&(c=De(o,u,_),h=De(a,d,p)),c.has(a[d]))if(c.has(a[p])){const t=h.get(o[u]),n=void 0!==t?s[t]:null;if(null===n){const t=Oe(e,s[d]);g(t,r[u]),l[u]=t}else l[u]=g(n,r[u]),Oe(e,s[d],n),s[t]=null;u++}else Me(s[p]),p--;else Me(s[d]),d++;for(;u<=_;){const t=Oe(e,l[_+1]);g(t,r[u]),l[u++]=t}for(;d<=p;){const e=s[d++];null!==e&&Me(e)}return this.ut=o,Ce(e,l),f}}),He=we(class extends ke{constructor(e){if(super(e),3!==e.type&&1!==e.type&&4!==e.type)throw Error("The `live` directive is not allowed on child or event bindings");if(!Pe(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t!==f&&t!==v){var n=e.element,i=e.name;if(3===e.type){if(t===n[i])return f}else if(4===e.type){if(!!t===n.hasAttribute(i))return f}else if(1===e.type&&n.getAttribute(i)===t+"")return f;Ce(e)}return t}}),Te=(e,t)=>{var n,i,s=e._$AN;if(void 0===s)return!1;for(const e of s)null!=(i=(n=e)._$AO)&&i.call(n,t,!1),Te(e,t);return!0},Re=e=>{let t,n;for(;void 0!==(t=e._$AM)&&((n=t._$AN).delete(e),e=t,0===(null==n?void 0:n.size)););},Be=n=>{for(let t;t=n._$AM;n=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(n))break;e.add(n),i=t,0,i.type==Ae&&(null==i._$AP&&(i._$AP=Ie),null==i._$AQ)&&(i._$AQ=Le)}var i};function Le(e){void 0!==this._$AN?(Re(this),this._$AM=e,Be(this)):this._$AM=e}function Ie(e,t=!1,n=0){var i=this._$AH,s=this._$AN;if(void 0!==s&&0!==s.size)if(t)if(Array.isArray(i))for(let e=n;e<i.length;e++)Te(i[e],!1),Re(i[e]);else null!=i&&(Te(i,!1),Re(i));else Te(this,e)}class Ke extends ke{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),Be(this),this.isConnected=e._$AU}_$AO(e,t=!0){var n;e!==this.isConnected&&((this.isConnected=e)?null!=(n=this.reconnected)&&n.call(this):null!=(n=this.disconnected)&&n.call(this)),t&&(Te(this,e),Re(this))}setValue(e){var t;Pe(this._$Ct)?this._$Ct._$AI(e,this):((t=[...this._$Ct._$AH])[this._$Ci]=e,this._$Ct._$AI(t,this,0))}disconnected(){}reconnected(){}}const Ne=()=>new ze;class ze{}const We=new WeakMap,Ve=we(class extends Ke{render(e){return v}update(e,[t]){var n=t!==this.G;return n&&void 0!==this.G&&this.ot(void 0),!n&&this.rt===this.lt||(this.G=t,this.dt=null==(n=e.options)?void 0:n.host,this.ot(this.lt=e.element)),v}ot(t){if("function"==typeof this.G){var n=null!=(n=this.dt)?n:globalThis;let e=We.get(n);void 0===e&&(e=new WeakMap,We.set(n,e)),void 0!==e.get(this.G)&&this.G.call(this.dt,void 0),e.set(this.G,t),void 0!==t&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var e;return"function"==typeof this.G?null==(e=We.get(null!=(e=this.dt)?e:globalThis))?void 0:e.get(this.G):null==(e=this.G)?void 0:e.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),qe=we(class extends ke{constructor(e){if(super(e),1!==e.type||"class"!==e.name||2<(null==(e=e.strings)?void 0:e.length))throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter(e=>t[e]).join(" ")+" "}update(e,[t]){var n,i;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)!t[e]||null!=(n=this.nt)&&n.has(e)||this.it.add(e);return this.render(t)}const s=e.element.classList;this.it.forEach(e=>{e in t||(s.remove(e),this.it.delete(e))});for(const e in t){const n=!!t[e];n===this.it.has(e)||null!=(i=this.nt)&&i.has(e)||(n?(s.add(e),this.it.add(e)):(s.remove(e),this.it.delete(e)))}return f}});i="undefined"!=typeof navigator&&0<navigator.userAgent.toLowerCase().indexOf("firefox");function Fe(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function Je(e,t){for(var n=t.slice(0,t.length-1),i=0;i<n.length;i++)n[i]=e[n[i].toLowerCase()];return n}function Ge(e){for(var t=(e=(e="string"!=typeof e?"":e).replace(/\s/g,"")).split(","),n=t.lastIndexOf("");0<=n;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}for(var Ze={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":i?173:189,"=":i?61:187,";":i?59:186,"'":222,"[":219,"]":221,"\\":220},$={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Qe={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},b={16:!1,18:!1,17:!1,91:!1},E={},Xe=1;Xe<20;Xe++)Ze["f".concat(Xe)]=111+Xe;var A=[],Ye="all",et=[],tt=function(e){return Ze[e.toLowerCase()]||$[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};function nt(e){Ye=e||"all"}function it(){return Ye||"all"}function st(e){var t=e.key,i=e.scope,s=e.method,o=void 0===(e=e.splitKey)?"+":e;Ge(t).forEach(function(e){var r,e=e.split(o),t=e.length,n=e[t-1],n="*"===n?"*":tt(n);E[n]&&(i=i||it(),r=1<t?Je($,e):[],E[n]=E[n].map(function(e){return s&&e.method!==s||e.scope!==i||!function(e){for(var t=e.length>=r.length?e:r,n=e.length>=r.length?r:e,i=!0,s=0;s<t.length;s++)-1===n.indexOf(t[s])&&(i=!1);return i}(e.mods)?e:{}}))})}function rt(e,t,n){var i;if(t.scope===n||"all"===t.scope){for(var s in i=0<t.mods.length,b)Object.prototype.hasOwnProperty.call(b,s)&&(!b[s]&&-1<t.mods.indexOf(+s)||b[s]&&-1===t.mods.indexOf(+s))&&(i=!1);(0!==t.mods.length||b[16]||b[18]||b[17]||b[91])&&!i&&"*"!==t.shortcut||!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble)&&(e.cancelBubble=!0)}}function ot(n){var e=E["*"],t=n.keyCode||n.which||n.charCode;if(w.filter.call(this,n)){if(-1===A.indexOf(t=93!==t&&224!==t?t:91)&&229!==t&&A.push(t),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(e){var t=Qe[e];n[e]&&-1===A.indexOf(t)?A.push(t):!n[e]&&-1<A.indexOf(t)?A.splice(A.indexOf(t),1):"metaKey"!==e||!n[e]||3!==A.length||n.ctrlKey||n.shiftKey||n.altKey||(A=A.slice(A.indexOf(t)))}),t in b){for(var i in b[t]=!0,$)$[i]===t&&(w[i]=!0);if(!e)return}for(var s in b)Object.prototype.hasOwnProperty.call(b,s)&&(b[s]=n[Qe[s]]);n.getModifierState&&(!n.altKey||n.ctrlKey)&&n.getModifierState("AltGraph")&&(-1===A.indexOf(17)&&A.push(17),-1===A.indexOf(18)&&A.push(18),b[17]=!0,b[18]=!0);var r=it();if(e)for(var o=0;o<e.length;o++)e[o].scope===r&&("keydown"===n.type&&e[o].keydown||"keyup"===n.type&&e[o].keyup)&&rt(n,e[o],r);if(t in E)for(var a=0;a<E[t].length;a++)if(("keydown"===n.type&&E[t][a].keydown||"keyup"===n.type&&E[t][a].keyup)&&E[t][a].key){for(var l=E[t][a],c=l.splitKey,h=l.key.split(c),d=[],p=0;p<h.length;p++)d.push(tt(h[p]));d.sort().join("")===A.sort().join("")&&rt(n,l,r)}}}function w(e,t,n){A=[];var i=Ge(e),s=[],r="all",o=document,a=0,l=!1,c=!0,h="+";for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(r=t.scope),t.element&&(o=t.element),t.keyup&&(l=t.keyup),void 0!==t.keydown&&(c=t.keydown),"string"==typeof t.splitKey)&&(h=t.splitKey),"string"==typeof t&&(r=t);a<i.length;a++)s=[],1<(e=i[a].split(h)).length&&(s=Je($,e)),(e="*"===(e=e[e.length-1])?"*":tt(e))in E||(E[e]=[]),E[e].push({keyup:l,keydown:c,scope:r,mods:s,shortcut:i[a],method:n,key:i[a],splitKey:h});void 0===o||(t=o,-1<et.indexOf(t))||!window||(et.push(o),Fe(o,"keydown",function(e){ot(e)}),Fe(window,"focus",function(){A=[]}),Fe(o,"keyup",function(e){ot(e);var t=e.keyCode||e.which||e.charCode,n=A.indexOf(t);if(0<=n&&A.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&A.splice(0,A.length),(t=93!==t&&224!==t?t:91)in b)for(var i in b[t]=!1,$)$[i]===t&&(w[i]=!1)}))}var at,lt,ct={setScope:nt,getScope:it,deleteScope:function(e,t){var n,i,s;for(s in e=e||it(),E)if(Object.prototype.hasOwnProperty.call(E,s))for(n=E[s],i=0;i<n.length;)n[i].scope===e?n.splice(i,1):i++;it()===e&&nt(t||"all")},getPressedKeyCodes:function(){return A.slice(0)},isPressed:function(e){return"string"==typeof e&&(e=tt(e)),-1!==A.indexOf(e)},filter:function(e){var e=e.target||e.srcElement,t=e.tagName,n=!0;return n=!e.isContentEditable&&("INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t||e.readOnly)?n:!1},unbind:function(e){if(e){if(Array.isArray(e))e.forEach(function(e){e.key&&st(e)});else if("object"==typeof e)e.key&&st(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var s=n[0],r=n[1];"function"==typeof s&&(r=s,s=""),st({key:e,scope:s,method:r,splitKey:"+"})}}else Object.keys(E).forEach(function(e){return delete E[e]})}};for(at in ct)Object.prototype.hasOwnProperty.call(ct,at)&&(w[at]=ct[at]);"undefined"!=typeof window&&(lt=window.hotkeys,w.noConflict=function(e){return e&&window.hotkeys===w&&(window.hotkeys=lt),w},window.hotkeys=w);function ht(e,t,n,i){var s,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;0<=a;a--)(s=e[a])&&(o=(r<3?s(o):3<r?s(t,n,o):s(t,n))||o);return 3<r&&o&&Object.defineProperty(t,n,o),o}var k=w,n=class extends s{constructor(){super(...arguments),this.placeholder="",this.hideBreadcrumbs=!1,this.breadcrumbHome="Home",this.breadcrumbs=[],this._inputRef=Ne()}render(){let e="";if(!this.hideBreadcrumbs){var t=[];for(const e of this.breadcrumbs)t.push(r`<button
|
|
2
2
|
tabindex="-1"
|
|
3
3
|
@click=${()=>this.selectParent(e)}
|
|
4
4
|
class="breadcrumb"
|