lituix 0.1.1 → 0.1.2
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/components.json +5 -1
- package/dist/components/lui-button.d.ts.map +1 -1
- package/dist/components/lui-card.d.ts.map +1 -1
- package/dist/components/lui-cascader.d.ts.map +1 -1
- package/dist/components/lui-datepicker.d.ts.map +1 -1
- package/dist/components/lui-select.d.ts.map +1 -1
- package/dist/components/lui-tree-select.d.ts.map +1 -1
- package/dist/index.browser.js +68 -34
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +97 -63
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +195 -161
- package/dist/index.mjs.map +3 -3
- package/dist/themes/tokens.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDescriptor;var B2=Object.getOwnPropertyNames;var q2=Object.getPrototypeOf,K2=Object.prototype.hasOwnProperty;var ah=i=>{throw TypeError(i)};var tc=(i,o)=>()=>(i&&(o=i(i=0)),o);var W2=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),U2=(i,o)=>{for(var e in o)ms(i,e,{get:o[e],enumerable:!0})},G2=(i,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of B2(o))!K2.call(i,r)&&r!==e&&ms(i,r,{get:()=>o[r],enumerable:!(t=nh(o,r))||t.enumerable});return i};var la=(i,o,e)=>(e=i!=null?L2(q2(i)):{},G2(o||!i||!i.__esModule?ms(e,"default",{value:i,enumerable:!0}):e,i));var a=(i,o,e,t)=>{for(var r=t>1?void 0:t?nh(o,e):o,n=i.length-1,s;n>=0;n--)(s=i[n])&&(r=(t?s(o,e,r):s(r))||r);return t&&r&&ms(o,e,r),r};var sh=(i,o,e)=>o.has(i)||ah("Cannot "+e);var ve=(i,o,e)=>(sh(i,o,"read from private field"),e?e.call(i):o.get(i)),lh=(i,o,e)=>o.has(i)?ah("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,e),ch=(i,o,e,t)=>(sh(i,o,"write to private field"),t?t.call(i,e):o.set(i,e),e);var Ca,bp=tc(()=>{Ca=class{constructor(o){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,o?.roundAverageSize===!0&&(this._roundAverageSize=!0)}set(o,e){let t=this._map.get(o)||0;this._map.set(o,e),this.totalSize+=e-t}get averageSize(){if(this._map.size>0){let o=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(o):o}return 0}getSize(o){return this._map.get(o)}clear(){this._map.clear(),this.totalSize=0}}});function $c(i){return i==="horizontal"?"width":"height"}var Fs,kp=tc(()=>{Fs=class{_getDefaultConfig(){return{direction:"vertical"}}constructor(o,e){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=o,Promise.resolve().then(()=>this.config=e||this._getDefaultConfig())}set config(o){Object.assign(this,Object.assign({},this._getDefaultConfig(),o))}get config(){return{direction:this.direction}}get items(){return this._items}set items(o){this._setItems(o)}_setItems(o){o!==this._items&&(this._items=o,this._scheduleReflow())}get direction(){return this._direction}set direction(o){o=o==="horizontal"?o:"vertical",o!==this._direction&&(this._direction=o,this._sizeDim=o==="horizontal"?"width":"height",this._secondarySizeDim=o==="horizontal"?"height":"width",this._positionDim=o==="horizontal"?"left":"top",this._secondaryPositionDim=o==="horizontal"?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(o){let{_viewDim1:e,_viewDim2:t}=this;Object.assign(this._viewportSize,o),t!==this._viewDim2?this._scheduleLayoutUpdate():e!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(o){Object.assign(this._latestCoords,o);let e=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim],Math.abs(e-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(o=!1){(o||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(o){this._pin=o,this._triggerReflow()}get pin(){if(this._pin!==null){let{index:o,block:e}=this._pin;return{index:Math.max(0,Math.min(o,this.items.length-1)),block:e}}return null}_clampScrollPosition(o){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(o,this.totalScrollSize[$c(this.direction)]-this._viewDim1))}unpin(){this._pin!==null&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){let o=this._scrollPosition,{index:e,block:t}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:e,block:t||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=o-this._scrollPosition}}_calculateScrollIntoViewPosition(o){let{block:e}=o,t=Math.min(this.items.length,Math.max(0,o.index)),r=this._getItemPosition(t)[this._positionDim],n=r;if(e!=="start"){let s=this._getItemSize(t)[this._sizeDim];if(e==="center")n=r-.5*this._viewDim1+.5*s;else{let d=r-this._viewDim1+s;if(e==="end")n=d;else{let h=this._scrollPosition;n=Math.abs(h-r)<Math.abs(h-d)?r:d}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(o){return{[this._positionDim]:this._calculateScrollIntoViewPosition(o)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){let o=new Map;if(this._first!==-1&&this._last!==-1)for(let t=this._first;t<=this._last;t++)o.set(t,this._getItemPosition(t));let e={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:o};this._scrollError&&(e.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(e)}get _num(){return this._first===-1||this._last===-1?0:this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null)this._scheduleReflow();else{let o=Math.max(0,this._scrollPosition-this._overhang),e=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>o||this._physicalMax<e?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(o){if(this._first===-1||this._last===-1)return;let e=this._first;for(;e<this._last&&Math.round(this._getItemPosition(e)[this._positionDim]+this._getItemSize(e)[this._sizeDim])<=Math.round(this._scrollPosition);)e++;let t=this._last;for(;t>this._first&&Math.round(this._getItemPosition(t)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)t--;(e!==this._firstVisible||t!==this._lastVisible)&&(this._firstVisible=e,this._lastVisible=t,o&&o.emit&&this._sendVisibilityChangedMessage())}}});var xp={};U2(xp,{FlowLayout:()=>Ns,flow:()=>vf});function yp(i){return i==="horizontal"?"marginLeft":"marginTop"}function bf(i){return i==="horizontal"?"marginRight":"marginBottom"}function kf(i){return i==="horizontal"?"xOffset":"yOffset"}function yf(i,o){let e=[i,o].sort();return e[1]<=0?Math.min(...e):e[0]>=0?Math.max(...e):e[0]+e[1]}var vf,Tc,Ns,wp=tc(()=>{bp();kp();vf=i=>Object.assign({type:Ns},i);Tc=class{constructor(){this._childSizeCache=new Ca,this._marginSizeCache=new Ca,this._metricsCache=new Map}update(o,e){let t=new Set;Object.keys(o).forEach(r=>{let n=Number(r);this._metricsCache.set(n,o[n]),this._childSizeCache.set(n,o[n][$c(e)]),t.add(n),t.add(n+1)});for(let r of t){let n=this._metricsCache.get(r)?.[yp(e)]||0,s=this._metricsCache.get(r-1)?.[bf(e)]||0;this._marginSizeCache.set(r,yf(n,s))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(o,e){return this._metricsCache.get(o)?.[yp(e)]||0}getChildSize(o){return this._childSizeCache.getSize(o)}getMarginSize(o){return this._marginSizeCache.getSize(o)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}},Ns=class extends Fs{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new Tc,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(o){this._metricsCache.update(o,this.direction),this._scheduleReflow()}_getPhysicalItem(o){return this._newPhysicalItems.get(o)??this._physicalItems.get(o)}_getSize(o){return this._getPhysicalItem(o)&&this._metricsCache.getChildSize(o)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(o){let e=this._metricsCache;if(this._first===-1||this._last===-1)return e.averageMarginSize+o*(e.averageMarginSize+this._getAverageSize());if(o<this._first){let t=this._first-o;return this._getPhysicalItem(this._first).pos-(e.getMarginSize(this._first-1)||e.averageMarginSize)-(t*e.averageChildSize+(t-1)*e.averageMarginSize)}else{let t=o-this._last;return this._getPhysicalItem(this._last).pos+(e.getChildSize(this._last)||e.averageChildSize)+(e.getMarginSize(this._last)||e.averageMarginSize)+t*(e.averageChildSize+e.averageMarginSize)}}_getPosition(o){let e=this._getPhysicalItem(o),{averageMarginSize:t}=this._metricsCache;return o===0?this._metricsCache.getMarginSize(0)??t:e?e.pos:this._estimatePosition(o)}_calculateAnchor(o,e){return o<=0?0:e>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((o+e)/2/this._delta)))}_getAnchor(o,e){if(this._physicalItems.size===0)return this._calculateAnchor(o,e);if(this._first<0)return this._calculateAnchor(o,e);if(this._last<0)return this._calculateAnchor(o,e);let t=this._getPhysicalItem(this._first),r=this._getPhysicalItem(this._last),n=t.pos;if(r.pos+this._metricsCache.getChildSize(this._last)<o)return this._calculateAnchor(o,e);if(n>e)return this._calculateAnchor(o,e);let h=this._firstVisible-1,p=-1/0;for(;p<o;)p=this._getPhysicalItem(++h).pos+this._metricsCache.getChildSize(h);return h}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;let o=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o,this._stable=!0}_getItems(){let o=this._newPhysicalItems;this._stable=!0;let e,t;if(this.pin!==null){let{index:p}=this.pin;this._anchorIdx=p,this._anchorPos=this._getPosition(p)}if(e=this._scrollPosition-this._overhang,t=this._scrollPosition+this._viewDim1+this._overhang,t<0||e>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(e,t),this._anchorPos=this._getPosition(this._anchorIdx));let r=this._getSize(this._anchorIdx);r===void 0&&(this._stable=!1,r=this._getAverageSize());let n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,s=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-s-r);let d=0;for(this._anchorPos+r+s<e&&(d=e-(this._anchorPos+r+s)),this._anchorPos-n>t&&(d=t-(this._anchorPos-n)),d&&(this._scrollPosition-=d,e-=d,t-=d,this._scrollError+=d),o.set(this._anchorIdx,{pos:this._anchorPos,size:r}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+r+s;this._physicalMin>e&&this._first>0;){let p=this._getSize(--this._first);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._first);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize),this._physicalMin-=p;let x=this._physicalMin;if(o.set(this._first,{pos:x,size:p}),this._physicalMin-=f,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<t&&this._last<this.items.length-1;){let p=this._getSize(++this._last);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._last);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize);let x=this._physicalMax;if(o.set(this._last,{pos:x,size:p}),this._physicalMax+=p+f,!this._stable&&!this._estimate)break}let h=this._calculateError();h&&(this._physicalMin-=h,this._physicalMax-=h,this._anchorPos-=h,this._scrollPosition-=h,o.forEach(p=>p.pos-=h),this._scrollError+=h),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){let{_first:o,_last:e}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===o&&this._last===e)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){let{averageMarginSize:o}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(o+this._getAverageSize())+o)}get _delta(){let{averageMarginSize:o}=this._metricsCache;return this._getAverageSize()+o}_getItemPosition(o){return{[this._positionDim]:this._getPosition(o),[this._secondaryPositionDim]:0,[kf(this.direction)]:-(this._metricsCache.getLeadingMarginValue(o,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(o){return{[this._sizeDim]:this._getSize(o)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});var xn=W2((Ic,Ni)=>{(function(i,o){typeof Ic=="object"&&typeof Ni<"u"?Ni.exports=o():typeof define=="function"&&define.amd?define(o):(i=typeof globalThis<"u"?globalThis:i||self).interact=o()})(Ic,function(){"use strict";function i(c,l){var u=Object.keys(c);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(c);l&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(c,g).enumerable})),u.push.apply(u,m)}return u}function o(c){for(var l=1;l<arguments.length;l++){var u=arguments[l]!=null?arguments[l]:{};l%2?i(Object(u),!0).forEach(function(m){s(c,m,u[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(u)):i(Object(u)).forEach(function(m){Object.defineProperty(c,m,Object.getOwnPropertyDescriptor(u,m))})}return c}function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},e(c)}function t(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function r(c,l){for(var u=0;u<l.length;u++){var m=l[u];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(c,C(m.key),m)}}function n(c,l,u){return l&&r(c.prototype,l),u&&r(c,u),Object.defineProperty(c,"prototype",{writable:!1}),c}function s(c,l,u){return(l=C(l))in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}function d(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&p(c,l)}function h(c){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},h(c)}function p(c,l){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,m){return u.__proto__=m,u},p(c,l)}function f(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function x(c){var l=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var u,m=h(c);if(l){var g=h(this).constructor;u=Reflect.construct(m,arguments,g)}else u=m.apply(this,arguments);return function(v,b){if(b&&(typeof b=="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(v)}(this,u)}}function y(){return y=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,l,u){var m=function(v,b){for(;!Object.prototype.hasOwnProperty.call(v,b)&&(v=h(v))!==null;);return v}(c,l);if(m){var g=Object.getOwnPropertyDescriptor(m,l);return g.get?g.get.call(arguments.length<3?c:u):g.value}},y.apply(this,arguments)}function C(c){var l=function(u,m){if(typeof u!="object"||u===null)return u;var g=u[Symbol.toPrimitive];if(g!==void 0){var v=g.call(u,m||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(u)}(c,"string");return typeof l=="symbol"?l:l+""}var S=function(c){return!(!c||!c.Window)&&c instanceof c.Window},E=void 0,T=void 0;function O(c){E=c;var l=c.document.createTextNode("");l.ownerDocument!==c.document&&typeof c.wrap=="function"&&c.wrap(l)===l&&(c=c.wrap(c)),T=c}function H(c){return S(c)?c:(c.ownerDocument||c).defaultView||T.window}typeof window<"u"&&window&&O(window);var R=function(c){return!!c&&e(c)==="object"},N=function(c){return typeof c=="function"},$={window:function(c){return c===T||S(c)},docFrag:function(c){return R(c)&&c.nodeType===11},object:R,func:N,number:function(c){return typeof c=="number"},bool:function(c){return typeof c=="boolean"},string:function(c){return typeof c=="string"},element:function(c){if(!c||e(c)!=="object")return!1;var l=H(c)||T;return/object|function/.test(typeof Element>"u"?"undefined":e(Element))?c instanceof Element||c instanceof l.Element:c.nodeType===1&&typeof c.nodeName=="string"},plainObject:function(c){return R(c)&&!!c.constructor&&/function Object\b/.test(c.constructor.toString())},array:function(c){return R(c)&&c.length!==void 0&&N(c.splice)}};function Y(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.prepared.axis;u==="x"?(l.coords.cur.page.y=l.coords.start.page.y,l.coords.cur.client.y=l.coords.start.client.y,l.coords.velocity.client.y=0,l.coords.velocity.page.y=0):u==="y"&&(l.coords.cur.page.x=l.coords.start.page.x,l.coords.cur.client.x=l.coords.start.client.x,l.coords.velocity.client.x=0,l.coords.velocity.page.x=0)}}function fe(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="drag"){var m=u.prepared.axis;if(m==="x"||m==="y"){var g=m==="x"?"y":"x";l.page[g]=u.coords.start.page[g],l.client[g]=u.coords.start.client[g],l.delta[g]=0}}}var $e={id:"actions/drag",install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.draggable=$e.draggable,l.map.drag=$e,l.methodDict.drag="draggable",m.actions.drag=$e.defaults},listeners:{"interactions:before-action-move":Y,"interactions:action-resume":Y,"interactions:action-move":fe,"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.buttons,g=u.options.drag;if(g&&g.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||m&u.options.drag.mouseButtons))return c.action={name:"drag",axis:g.lockAxis==="start"?g.startAxis:g.lockAxis},!1}},draggable:function(c){return $.object(c)?(this.options.drag.enabled=c.enabled!==!1,this.setPerAction("drag",c),this.setOnEvents("drag",c),/^(xy|x|y|start)$/.test(c.lockAxis)&&(this.options.drag.lockAxis=c.lockAxis),/^(xy|x|y)$/.test(c.startAxis)&&(this.options.drag.startAxis=c.startAxis),this):$.bool(c)?(this.options.drag.enabled=c,this):this.options.drag},beforeMove:Y,move:fe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(c){return c.search("drag")===0}},Je=$e,we={init:function(c){var l=c;we.document=l.document,we.DocumentFragment=l.DocumentFragment||no,we.SVGElement=l.SVGElement||no,we.SVGSVGElement=l.SVGSVGElement||no,we.SVGElementInstance=l.SVGElementInstance||no,we.Element=l.Element||no,we.HTMLElement=l.HTMLElement||we.Element,we.Event=l.Event,we.Touch=l.Touch||no,we.PointerEvent=l.PointerEvent||l.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function no(){}var De=we,Xt={init:function(c){var l=De.Element,u=c.navigator||{};Xt.supportsTouch="ontouchstart"in c||$.func(c.DocumentTouch)&&De.document instanceof c.DocumentTouch,Xt.supportsPointerEvent=u.pointerEnabled!==!1&&!!De.PointerEvent,Xt.isIOS=/iP(hone|od|ad)/.test(u.platform),Xt.isIOS7=/iP(hone|od|ad)/.test(u.platform)&&/OS 7[^\d]/.test(u.appVersion),Xt.isIe9=/MSIE 9/.test(u.userAgent),Xt.isOperaMobile=u.appName==="Opera"&&Xt.supportsTouch&&/Presto/.test(u.userAgent),Xt.prefixedMatchesSelector="matches"in l.prototype?"matches":"webkitMatchesSelector"in l.prototype?"webkitMatchesSelector":"mozMatchesSelector"in l.prototype?"mozMatchesSelector":"oMatchesSelector"in l.prototype?"oMatchesSelector":"msMatchesSelector",Xt.pEventTypes=Xt.supportsPointerEvent?De.PointerEvent===c.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,Xt.wheelEvent=De.document&&"onmousewheel"in De.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ur=Xt;function ao(c,l){if(c.contains)return c.contains(l);for(;l;){if(l===c)return!0;l=l.parentNode}return!1}function nn(c,l){for(;$.element(c);){if(To(c,l))return c;c=Yr(c)}return null}function Yr(c){var l=c.parentNode;if($.docFrag(l)){for(;(l=l.host)&&$.docFrag(l););return l}return l}function To(c,l){return T!==E&&(l=l.replace(/\/deep\//g," ")),c[ur.prefixedMatchesSelector](l)}var L=function(c){return c.parentNode||c.host};function X(c,l){for(var u,m=[],g=c;(u=L(g))&&g!==l&&u!==g.ownerDocument;)m.unshift(g),g=u;return m}function ue(c,l,u){for(;$.element(c);){if(To(c,l))return!0;if((c=Yr(c))===u)return To(c,l)}return!1}function je(c){return c.correspondingUseElement||c}function U(c){var l=c instanceof De.SVGElement?c.getBoundingClientRect():c.getClientRects()[0];return l&&{left:l.left,right:l.right,top:l.top,bottom:l.bottom,width:l.width||l.right-l.left,height:l.height||l.bottom-l.top}}function _e(c){var l,u=U(c);if(!ur.isIOS7&&u){var m={x:(l=(l=H(c))||T).scrollX||l.document.documentElement.scrollLeft,y:l.scrollY||l.document.documentElement.scrollTop};u.left+=m.x,u.right+=m.x,u.top+=m.y,u.bottom+=m.y}return u}function ne(c){for(var l=[];c;)l.push(c),c=Yr(c);return l}function Sr(c){return!!$.string(c)&&(De.document.querySelector(c),!0)}function q(c,l){for(var u in l)c[u]=l[u];return c}function ai(c,l,u){return c==="parent"?Yr(u):c==="self"?l.getRect(u):nn(u,c)}function so(c,l,u,m){var g=c;return $.string(g)?g=ai(g,l,u):$.func(g)&&(g=g.apply(void 0,m)),$.element(g)&&(g=_e(g)),g}function Xr(c){return c&&{x:"x"in c?c.x:c.left,y:"y"in c?c.y:c.top}}function lo(c){return!c||"x"in c&&"y"in c||((c=q({},c)).x=c.left||0,c.y=c.top||0,c.width=c.width||(c.right||0)-c.x,c.height=c.height||(c.bottom||0)-c.y),c}function si(c,l,u){c.left&&(l.left+=u.x),c.right&&(l.right+=u.x),c.top&&(l.top+=u.y),c.bottom&&(l.bottom+=u.y),l.width=l.right-l.left,l.height=l.bottom-l.top}function Lo(c,l,u){var m=u&&c.options[u];return Xr(so(m&&m.origin||c.options.origin,c,l,[c&&l]))||{x:0,y:0}}function co(c,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(w){return!0},m=arguments.length>3?arguments[3]:void 0;if(m=m||{},$.string(c)&&c.search(" ")!==-1&&(c=an(c)),$.array(c))return c.forEach(function(w){return co(w,l,u,m)}),m;if($.object(c)&&(l=c,c=""),$.func(l)&&u(c))m[c]=m[c]||[],m[c].push(l);else if($.array(l))for(var g=0,v=l;g<v.length;g++){var b=v[g];co(c,b,u,m)}else if($.object(l))for(var k in l)co(an(k).map(function(w){return"".concat(c).concat(w)}),l[k],u,m);return m}function an(c){return c.trim().split(/ +/)}var Qn=function(c,l){return Math.sqrt(c*c+l*l)},$0=["webkit","moz"];function ts(c,l){c.__set||(c.__set={});var u=function(g){if($0.some(function(v){return g.indexOf(v)===0}))return 1;typeof c[g]!="function"&&g!=="__set"&&Object.defineProperty(c,g,{get:function(){return g in c.__set?c.__set[g]:c.__set[g]=l[g]},set:function(v){c.__set[g]=v},configurable:!0})};for(var m in l)u(m);return c}function rs(c,l){c.page=c.page||{},c.page.x=l.page.x,c.page.y=l.page.y,c.client=c.client||{},c.client.x=l.client.x,c.client.y=l.client.y,c.timeStamp=l.timeStamp}function fu(c){c.page.x=0,c.page.y=0,c.client.x=0,c.client.y=0}function vu(c){return c instanceof De.Event||c instanceof De.Touch}function os(c,l,u){return c=c||"page",(u=u||{}).x=l[c+"X"],u.y=l[c+"Y"],u}function bu(c,l){return l=l||{x:0,y:0},ur.isOperaMobile&&vu(c)?(os("screen",c,l),l.x+=window.scrollX,l.y+=window.scrollY):os("page",c,l),l}function Jn(c){return $.number(c.pointerId)?c.pointerId:c.identifier}function T0(c,l,u){var m=l.length>1?ku(l):l[0];bu(m,c.page),function(g,v){v=v||{},ur.isOperaMobile&&vu(g)?os("screen",g,v):os("client",g,v)}(m,c.client),c.timeStamp=u}function Pl(c){var l=[];return $.array(c)?(l[0]=c[0],l[1]=c[1]):c.type==="touchend"?c.touches.length===1?(l[0]=c.touches[0],l[1]=c.changedTouches[0]):c.touches.length===0&&(l[0]=c.changedTouches[0],l[1]=c.changedTouches[1]):(l[0]=c.touches[0],l[1]=c.touches[1]),l}function ku(c){for(var l={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},u=0;u<c.length;u++){var m=c[u];for(var g in l)l[g]+=m[g]}for(var v in l)l[v]/=c.length;return l}function Ol(c){if(!c.length)return null;var l=Pl(c),u=Math.min(l[0].pageX,l[1].pageX),m=Math.min(l[0].pageY,l[1].pageY),g=Math.max(l[0].pageX,l[1].pageX),v=Math.max(l[0].pageY,l[1].pageY);return{x:u,y:m,left:u,top:m,right:g,bottom:v,width:g-u,height:v-m}}function Hl(c,l){var u=l+"X",m=l+"Y",g=Pl(c),v=g[0][u]-g[1][u],b=g[0][m]-g[1][m];return Qn(v,b)}function Rl(c,l){var u=l+"X",m=l+"Y",g=Pl(c),v=g[1][u]-g[0][u],b=g[1][m]-g[0][m];return 180*Math.atan2(b,v)/Math.PI}function yu(c){return $.string(c.pointerType)?c.pointerType:$.number(c.pointerType)?[void 0,void 0,"touch","pen","mouse"][c.pointerType]:/touch/.test(c.type||"")||c instanceof De.Touch?"touch":"mouse"}function xu(c){var l=$.func(c.composedPath)?c.composedPath():c.path;return[je(l?l[0]:c.target),je(c.currentTarget)]}var is=function(){function c(l){t(this,c),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=l}return n(c,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),c}();Object.defineProperty(is.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var wu=function(c,l){for(var u=0;u<l.length;u++){var m=l[u];c.push(m)}return c},_u=function(c){return wu([],c)},ea=function(c,l){for(var u=0;u<c.length;u++)if(l(c[u],u,c))return u;return-1},ta=function(c,l){return c[ea(c,l)]},sn=function(c){d(u,c);var l=x(u);function u(m,g,v){var b;t(this,u),(b=l.call(this,g._interaction)).dropzone=void 0,b.dragEvent=void 0,b.relatedTarget=void 0,b.draggable=void 0,b.propagationStopped=!1,b.immediatePropagationStopped=!1;var k=v==="dragleave"?m.prev:m.cur,w=k.element,M=k.dropzone;return b.type=v,b.target=w,b.currentTarget=w,b.dropzone=M,b.dragEvent=g,b.relatedTarget=g.target,b.draggable=g.interactable,b.timeStamp=g.timeStamp,b}return n(u,[{key:"reject",value:function(){var m=this,g=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&g.cur.dropzone===this.dropzone&&g.cur.element===this.target)if(g.prev.dropzone=this.dropzone,g.prev.element=this.target,g.rejected=!0,g.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var v=g.activeDrops,b=ea(v,function(w){var M=w.dropzone,_=w.element;return M===m.dropzone&&_===m.target});g.activeDrops.splice(b,1);var k=new u(g,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new u(g,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),u}(is);function Mu(c,l){for(var u=0,m=c.slice();u<m.length;u++){var g=m[u],v=g.dropzone,b=g.element;l.dropzone=v,l.target=b,v.fire(l),l.propagationStopped=l.immediatePropagationStopped=!1}}function Il(c,l){for(var u=function(v,b){for(var k=[],w=0,M=v.interactables.list;w<M.length;w++){var _=M[w];if(_.options.drop.enabled){var z=_.options.drop.accept;if(!($.element(z)&&z!==b||$.string(z)&&!To(b,z)||$.func(z)&&!z({dropzone:_,draggableElement:b})))for(var j=0,V=_.getAllElements();j<V.length;j++){var I=V[j];I!==b&&k.push({dropzone:_,element:I,rect:_.getRect(I)})}}}return k}(c,l),m=0;m<u.length;m++){var g=u[m];g.rect=g.dropzone.getRect(g.element)}return u}function Cu(c,l,u){for(var m=c.dropState,g=c.interactable,v=c.element,b=[],k=0,w=m.activeDrops;k<w.length;k++){var M=w[k],_=M.dropzone,z=M.element,j=M.rect,V=_.dropCheck(l,u,g,v,z,j);b.push(V?z:null)}var I=function(D){for(var K,B,W,ce=[],ye=0;ye<D.length;ye++){var ee=D[ye],he=D[K];if(ee&&ye!==K)if(he){var pr=L(ee),et=L(he);if(pr!==ee.ownerDocument)if(et!==ee.ownerDocument)if(pr!==et){ce=ce.length?ce:X(he);var Fr=void 0;if(he instanceof De.HTMLElement&&ee instanceof De.SVGElement&&!(ee instanceof De.SVGSVGElement)){if(ee===et)continue;Fr=ee.ownerSVGElement}else Fr=ee;for(var uo=X(Fr,he.ownerDocument),Ko=0;uo[Ko]&&uo[Ko]===ce[Ko];)Ko++;var ps=[uo[Ko-1],uo[Ko],ce[Ko]];if(ps[0])for(var sa=ps[0].lastChild;sa;){if(sa===ps[1]){K=ye,ce=uo;break}if(sa===ps[2])break;sa=sa.previousSibling}}else W=he,(parseInt(H(B=ee).getComputedStyle(B).zIndex,10)||0)>=(parseInt(H(W).getComputedStyle(W).zIndex,10)||0)&&(K=ye);else K=ye}else K=ye}return K}(b);return m.activeDrops[I]||null}function Vl(c,l,u){var m=c.dropState,g={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return u.type==="dragstart"&&(g.activate=new sn(m,u,"dropactivate"),g.activate.target=null,g.activate.dropzone=null),u.type==="dragend"&&(g.deactivate=new sn(m,u,"dropdeactivate"),g.deactivate.target=null,g.deactivate.dropzone=null),m.rejected||(m.cur.element!==m.prev.element&&(m.prev.dropzone&&(g.leave=new sn(m,u,"dragleave"),u.dragLeave=g.leave.target=m.prev.element,u.prevDropzone=g.leave.dropzone=m.prev.dropzone),m.cur.dropzone&&(g.enter=new sn(m,u,"dragenter"),u.dragEnter=m.cur.element,u.dropzone=m.cur.dropzone)),u.type==="dragend"&&m.cur.dropzone&&(g.drop=new sn(m,u,"drop"),u.dropzone=m.cur.dropzone,u.relatedTarget=m.cur.element),u.type==="dragmove"&&m.cur.dropzone&&(g.move=new sn(m,u,"dropmove"),u.dropzone=m.cur.dropzone)),g}function Dl(c,l){var u=c.dropState,m=u.activeDrops,g=u.cur,v=u.prev;l.leave&&v.dropzone.fire(l.leave),l.enter&&g.dropzone.fire(l.enter),l.move&&g.dropzone.fire(l.move),l.drop&&g.dropzone.fire(l.drop),l.deactivate&&Mu(m,l.deactivate),u.prev.dropzone=g.dropzone,u.prev.element=g.element}function zu(c,l){var u=c.interaction,m=c.iEvent,g=c.event;if(m.type==="dragmove"||m.type==="dragend"){var v=u.dropState;l.dynamicDrop&&(v.activeDrops=Il(l,u.element));var b=m,k=Cu(u,b,g);v.rejected=v.rejected&&!!k&&k.dropzone===v.cur.dropzone&&k.element===v.cur.element,v.cur.dropzone=k&&k.dropzone,v.cur.element=k&&k.element,v.events=Vl(u,0,b)}}var Eu={id:"actions/drop",install:function(c){var l=c.actions,u=c.interactStatic,m=c.Interactable,g=c.defaults;c.usePlugin(Je),m.prototype.dropzone=function(v){return function(b,k){if($.object(k)){if(b.options.drop.enabled=k.enabled!==!1,k.listeners){var w=co(k.listeners),M=Object.keys(w).reduce(function(z,j){return z[/^(enter|leave)/.test(j)?"drag".concat(j):/^(activate|deactivate|move)/.test(j)?"drop".concat(j):j]=w[j],z},{}),_=b.options.drop.listeners;_&&b.off(_),b.on(M),b.options.drop.listeners=M}return $.func(k.ondrop)&&b.on("drop",k.ondrop),$.func(k.ondropactivate)&&b.on("dropactivate",k.ondropactivate),$.func(k.ondropdeactivate)&&b.on("dropdeactivate",k.ondropdeactivate),$.func(k.ondragenter)&&b.on("dragenter",k.ondragenter),$.func(k.ondragleave)&&b.on("dragleave",k.ondragleave),$.func(k.ondropmove)&&b.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?b.options.drop.overlap=k.overlap:$.number(k.overlap)&&(b.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(b.options.drop.accept=k.accept),"checker"in k&&(b.options.drop.checker=k.checker),b}return $.bool(k)?(b.options.drop.enabled=k,b):b.options.drop}(this,v)},m.prototype.dropCheck=function(v,b,k,w,M,_){return function(z,j,V,I,D,K,B){var W=!1;if(!(B=B||z.getRect(K)))return!!z.options.drop.checker&&z.options.drop.checker(j,V,W,z,K,I,D);var ce=z.options.drop.overlap;if(ce==="pointer"){var ye=Lo(I,D,"drag"),ee=bu(j);ee.x+=ye.x,ee.y+=ye.y;var he=ee.x>B.left&&ee.x<B.right,pr=ee.y>B.top&&ee.y<B.bottom;W=he&&pr}var et=I.getRect(D);if(et&&ce==="center"){var Fr=et.left+et.width/2,uo=et.top+et.height/2;W=Fr>=B.left&&Fr<=B.right&&uo>=B.top&&uo<=B.bottom}return et&&$.number(ce)&&(W=Math.max(0,Math.min(B.right,et.right)-Math.max(B.left,et.left))*Math.max(0,Math.min(B.bottom,et.bottom)-Math.max(B.top,et.top))/(et.width*et.height)>=ce),z.options.drop.checker&&(W=z.options.drop.checker(j,V,W,z,K,I,D)),W}(this,v,b,k,w,M,_)},u.dynamicDrop=function(v){return $.bool(v)?(c.dynamicDrop=v,u):c.dynamicDrop},q(l.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),l.methodDict.drop="dropzone",c.dynamicDrop=!1,g.actions.drop=Eu.defaults},listeners:{"interactions:before-action-start":function(c){var l=c.interaction;l.prepared.name==="drag"&&(l.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(c,l){var u=c.interaction,m=(c.event,c.iEvent);if(u.prepared.name==="drag"){var g=u.dropState;g.activeDrops=[],g.events={},g.activeDrops=Il(l,u.element),g.events=Vl(u,0,m),g.events.activate&&(Mu(g.activeDrops,g.events.activate),l.fire("actions/drop:start",{interaction:u,dragEvent:m}))}},"interactions:action-move":zu,"interactions:after-action-move":function(c,l){var u=c.interaction,m=c.iEvent;if(u.prepared.name==="drag"){var g=u.dropState;Dl(u,g.events),l.fire("actions/drop:move",{interaction:u,dragEvent:m}),g.events={}}},"interactions:action-end":function(c,l){if(c.interaction.prepared.name==="drag"){var u=c.interaction,m=c.iEvent;zu(c,l),Dl(u,u.dropState.events),l.fire("actions/drop:end",{interaction:u,dragEvent:m})}},"interactions:stop":function(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.dropState;u&&(u.activeDrops=null,u.events=null,u.cur.dropzone=null,u.cur.element=null,u.prev.dropzone=null,u.prev.element=null,u.rejected=!1)}}},getActiveDrops:Il,getDrop:Cu,getDropEvents:Vl,fireDropEvents:Dl,filterEventType:function(c){return c.search("drag")===0||c.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},A0=Eu;function Fl(c){var l=c.interaction,u=c.iEvent,m=c.phase;if(l.prepared.name==="gesture"){var g=l.pointers.map(function(M){return M.pointer}),v=m==="start",b=m==="end",k=l.interactable.options.deltaSource;if(u.touches=[g[0],g[1]],v)u.distance=Hl(g,k),u.box=Ol(g),u.scale=1,u.ds=0,u.angle=Rl(g,k),u.da=0,l.gesture.startDistance=u.distance,l.gesture.startAngle=u.angle;else if(b||l.pointers.length<2){var w=l.prevEvent;u.distance=w.distance,u.box=w.box,u.scale=w.scale,u.ds=0,u.angle=w.angle,u.da=0}else u.distance=Hl(g,k),u.box=Ol(g),u.scale=u.distance/l.gesture.startDistance,u.angle=Rl(g,k),u.ds=u.scale-l.gesture.scale,u.da=u.angle-l.gesture.angle;l.gesture.distance=u.distance,l.gesture.angle=u.angle,$.number(u.scale)&&u.scale!==1/0&&!isNaN(u.scale)&&(l.gesture.scale=u.scale)}}var Nl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.gesturable=function(g){return $.object(g)?(this.options.gesture.enabled=g.enabled!==!1,this.setPerAction("gesture",g),this.setOnEvents("gesture",g),this):$.bool(g)?(this.options.gesture.enabled=g,this):this.options.gesture},l.map.gesture=Nl,l.methodDict.gesture="gesturable",m.actions.gesture=Nl.defaults},listeners:{"interactions:action-start":Fl,"interactions:action-move":Fl,"interactions:action-end":Fl,"interactions:new":function(c){c.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(c){if(!(c.interaction.pointers.length<2)){var l=c.interactable.options.gesture;if(l&&l.enabled)return c.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(c){return c.search("gesture")===0}},j0=Nl;function P0(c,l,u,m,g,v,b){if(!l)return!1;if(l===!0){var k=$.number(v.width)?v.width:v.right-v.left,w=$.number(v.height)?v.height:v.bottom-v.top;if(b=Math.min(b,Math.abs((c==="left"||c==="right"?k:w)/2)),k<0&&(c==="left"?c="right":c==="right"&&(c="left")),w<0&&(c==="top"?c="bottom":c==="bottom"&&(c="top")),c==="left"){var M=k>=0?v.left:v.right;return u.x<M+b}if(c==="top"){var _=w>=0?v.top:v.bottom;return u.y<_+b}if(c==="right")return u.x>(k>=0?v.right:v.left)-b;if(c==="bottom")return u.y>(w>=0?v.bottom:v.top)-b}return!!$.element(m)&&($.element(l)?l===m:ue(m,l,g))}function Su(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.resizeAxes){var m=l;u.interactable.options.resize.square?(u.resizeAxes==="y"?m.delta.x=m.delta.y:m.delta.y=m.delta.x,m.axes="xy"):(m.axes=u.resizeAxes,u.resizeAxes==="x"?m.delta.y=0:u.resizeAxes==="y"&&(m.delta.x=0))}}var Bo,ji,qo={id:"actions/resize",before:["actions/drag"],install:function(c){var l=c.actions,u=c.browser,m=c.Interactable,g=c.defaults;qo.cursors=function(v){return v.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(u),qo.defaultMargin=u.supportsTouch||u.supportsPointerEvent?20:10,m.prototype.resizable=function(v){return function(b,k,w){return $.object(k)?(b.options.resize.enabled=k.enabled!==!1,b.setPerAction("resize",k),b.setOnEvents("resize",k),$.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?b.options.resize.axis=k.axis:k.axis===null&&(b.options.resize.axis=w.defaults.actions.resize.axis),$.bool(k.preserveAspectRatio)?b.options.resize.preserveAspectRatio=k.preserveAspectRatio:$.bool(k.square)&&(b.options.resize.square=k.square),b):$.bool(k)?(b.options.resize.enabled=k,b):b.options.resize}(this,v,c)},l.map.resize=qo,l.methodDict.resize="resizable",g.actions.resize=qo.defaults},listeners:{"interactions:new":function(c){c.interaction.resizeAxes="xy"},"interactions:action-start":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.rect;m._rects={start:q({},v),corrected:q({},v),previous:q({},v),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},g.edges=m.prepared.edges,g.rect=m._rects.corrected,g.deltaRect=m._rects.delta}})(c),Su(c)},"interactions:action-move":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.interactable.options.resize.invert,b=v==="reposition"||v==="negate",k=m.rect,w=m._rects,M=w.start,_=w.corrected,z=w.delta,j=w.previous;if(q(j,_),b){if(q(_,k),v==="reposition"){if(_.top>_.bottom){var V=_.top;_.top=_.bottom,_.bottom=V}if(_.left>_.right){var I=_.left;_.left=_.right,_.right=I}}}else _.top=Math.min(k.top,M.bottom),_.bottom=Math.max(k.bottom,M.top),_.left=Math.min(k.left,M.right),_.right=Math.max(k.right,M.left);for(var D in _.width=_.right-_.left,_.height=_.bottom-_.top,_)z[D]=_[D]-j[D];g.edges=m.prepared.edges,g.rect=_,g.deltaRect=z}})(c),Su(c)},"interactions:action-end":function(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var m=l;m.edges=u.prepared.edges,m.rect=u._rects.corrected,m.deltaRect=u._rects.delta}},"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.element,g=c.rect,v=c.buttons;if(g){var b=q({},l.coords.cur.page),k=u.options.resize;if(k&&k.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||v&k.mouseButtons)){if($.object(k.edges)){var w={left:!1,right:!1,top:!1,bottom:!1};for(var M in w)w[M]=P0(M,k.edges[M],b,l._latestPointer.eventTarget,m,g,k.margin||qo.defaultMargin);w.left=w.left&&!w.right,w.top=w.top&&!w.bottom,(w.left||w.right||w.top||w.bottom)&&(c.action={name:"resize",edges:w})}else{var _=k.axis!=="y"&&b.x>g.right-qo.defaultMargin,z=k.axis!=="x"&&b.y>g.bottom-qo.defaultMargin;(_||z)&&(c.action={name:"resize",axes:(_?"x":"")+(z?"y":"")})}return!c.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(c){var l=c.edges,u=c.axis,m=c.name,g=qo.cursors,v=null;if(u)v=g[m+u];else if(l){for(var b="",k=0,w=["top","bottom","left","right"];k<w.length;k++){var M=w[k];l[M]&&(b+=M)}v=g[b]}return v},filterEventType:function(c){return c.search("resize")===0},defaultMargin:null},O0=qo,H0={id:"actions",install:function(c){c.usePlugin(j0),c.usePlugin(O0),c.usePlugin(Je),c.usePlugin(A0)}},$u=0,li={request:function(c){return Bo(c)},cancel:function(c){return ji(c)},init:function(c){if(Bo=c.requestAnimationFrame,ji=c.cancelAnimationFrame,!Bo)for(var l=["ms","moz","webkit","o"],u=0;u<l.length;u++){var m=l[u];Bo=c["".concat(m,"RequestAnimationFrame")],ji=c["".concat(m,"CancelAnimationFrame")]||c["".concat(m,"CancelRequestAnimationFrame")]}Bo=Bo&&Bo.bind(c),ji=ji&&ji.bind(c),Bo||(Bo=function(g){var v=Date.now(),b=Math.max(0,16-(v-$u)),k=c.setTimeout(function(){g(v+b)},b);return $u=v+b,k},ji=function(g){return clearTimeout(g)})}},te={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(c){te.isScrolling=!0,li.cancel(te.i),c.autoScroll=te,te.interaction=c,te.prevTime=te.now(),te.i=li.request(te.scroll)},stop:function(){te.isScrolling=!1,te.interaction&&(te.interaction.autoScroll=null),li.cancel(te.i)},scroll:function(){var c=te.interaction,l=c.interactable,u=c.element,m=c.prepared.name,g=l.options[m].autoScroll,v=Tu(g.container,l,u),b=te.now(),k=(b-te.prevTime)/1e3,w=g.speed*k;if(w>=1){var M={x:te.x*w,y:te.y*w};if(M.x||M.y){var _=Au(v);$.window(v)?v.scrollBy(M.x,M.y):v&&(v.scrollLeft+=M.x,v.scrollTop+=M.y);var z=Au(v),j={x:z.x-_.x,y:z.y-_.y};(j.x||j.y)&&l.fire({type:"autoscroll",target:u,interactable:l,delta:j,interaction:c,container:v})}te.prevTime=b}te.isScrolling&&(li.cancel(te.i),te.i=li.request(te.scroll))},check:function(c,l){var u;return(u=c.options[l].autoScroll)==null?void 0:u.enabled},onInteractionMove:function(c){var l=c.interaction,u=c.pointer;if(l.interacting()&&te.check(l.interactable,l.prepared.name))if(l.simulation)te.x=te.y=0;else{var m,g,v,b,k=l.interactable,w=l.element,M=l.prepared.name,_=k.options[M].autoScroll,z=Tu(_.container,k,w);if($.window(z))b=u.clientX<te.margin,m=u.clientY<te.margin,g=u.clientX>z.innerWidth-te.margin,v=u.clientY>z.innerHeight-te.margin;else{var j=U(z);b=u.clientX<j.left+te.margin,m=u.clientY<j.top+te.margin,g=u.clientX>j.right-te.margin,v=u.clientY>j.bottom-te.margin}te.x=g?1:b?-1:0,te.y=v?1:m?-1:0,te.isScrolling||(te.margin=_.margin,te.speed=_.speed,te.start(l))}}};function Tu(c,l,u){return($.string(c)?ai(c,l,u):c)||H(u)}function Au(c){return $.window(c)&&(c=window.document.body),{x:c.scrollLeft,y:c.scrollTop}}var R0={id:"auto-scroll",install:function(c){var l=c.defaults,u=c.actions;c.autoScroll=te,te.now=function(){return c.now()},u.phaselessTypes.autoscroll=!0,l.perAction.autoScroll=te.defaults},listeners:{"interactions:new":function(c){c.interaction.autoScroll=null},"interactions:destroy":function(c){c.interaction.autoScroll=null,te.stop(),te.interaction&&(te.interaction=null)},"interactions:stop":te.stop,"interactions:action-move":function(c){return te.onInteractionMove(c)}}},I0=R0;function ra(c,l){var u=!1;return function(){return u||(T.console.warn(l),u=!0),c.apply(this,arguments)}}function Ll(c,l){return c.name=l.name,c.axis=l.axis,c.edges=l.edges,c}function V0(c){return $.bool(c)?(this.options.styleCursor=c,this):c===null?(delete this.options.styleCursor,this):this.options.styleCursor}function D0(c){return $.func(c)?(this.options.actionChecker=c,this):c===null?(delete this.options.actionChecker,this):this.options.actionChecker}var F0={id:"auto-start/interactableMethods",install:function(c){var l=c.Interactable;l.prototype.getAction=function(u,m,g,v){var b=function(k,w,M,_,z){var j=k.getRect(_),V=w.buttons||{0:1,1:4,3:8,4:16}[w.button],I={action:null,interactable:k,interaction:M,element:_,rect:j,buttons:V};return z.fire("auto-start:check",I),I.action}(this,m,g,v,c);return this.options.actionChecker?this.options.actionChecker(u,m,b,this,v,g):b},l.prototype.ignoreFrom=ra(function(u){return this._backCompatOption("ignoreFrom",u)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),l.prototype.allowFrom=ra(function(u){return this._backCompatOption("allowFrom",u)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),l.prototype.actionChecker=D0,l.prototype.styleCursor=V0}};function ju(c,l,u,m,g){return l.testIgnoreAllow(l.options[c.name],u,m)&&l.options[c.name].enabled&&ns(l,u,c,g)?c:null}function N0(c,l,u,m,g,v,b){for(var k=0,w=m.length;k<w;k++){var M=m[k],_=g[k],z=M.getAction(l,u,c,_);if(z){var j=ju(z,M,_,v,b);if(j)return{action:j,interactable:M,element:_}}}return{action:null,interactable:null,element:null}}function Pu(c,l,u,m,g){var v=[],b=[],k=m;function w(_){v.push(_),b.push(k)}for(;$.element(k);){v=[],b=[],g.interactables.forEachMatch(k,w);var M=N0(c,l,u,v,b,m,g);if(M.action&&!M.interactable.options[M.action.name].manualStart)return M;k=Yr(k)}return{action:null,interactable:null,element:null}}function Ou(c,l,u){var m=l.action,g=l.interactable,v=l.element;m=m||{name:null},c.interactable=g,c.element=v,Ll(c.prepared,m),c.rect=g&&m.name?g.getRect(v):null,Ru(c,u),u.fire("autoStart:prepared",{interaction:c})}function ns(c,l,u,m){var g=c.options,v=g[u.name].max,b=g[u.name].maxPerElement,k=m.autoStart.maxInteractions,w=0,M=0,_=0;if(!(v&&b&&k))return!1;for(var z=0,j=m.interactions.list;z<j.length;z++){var V=j[z],I=V.prepared.name;if(V.interacting()&&(++w>=k||V.interactable===c&&((M+=I===u.name?1:0)>=v||V.element===l&&(_++,I===u.name&&_>=b))))return!1}return k>0}function Hu(c,l){return $.number(c)?(l.autoStart.maxInteractions=c,this):l.autoStart.maxInteractions}function Bl(c,l,u){var m=u.autoStart.cursorElement;m&&m!==c&&(m.style.cursor=""),c.ownerDocument.documentElement.style.cursor=l,c.style.cursor=l,u.autoStart.cursorElement=l?c:null}function Ru(c,l){var u=c.interactable,m=c.element,g=c.prepared;if(c.pointerType==="mouse"&&u&&u.options.styleCursor){var v="";if(g.name){var b=u.options[g.name].cursorChecker;v=$.func(b)?b(g,u,m,c._interacting):l.actions.map[g.name].getCursor(g)}Bl(c.element,v||"",l)}else l.autoStart.cursorElement&&Bl(l.autoStart.cursorElement,"",l)}var L0={id:"auto-start/base",before:["actions"],install:function(c){var l=c.interactStatic,u=c.defaults;c.usePlugin(F0),u.base.actionChecker=null,u.base.styleCursor=!0,q(u.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),l.maxInteractions=function(m){return Hu(m,c)},c.autoStart={maxInteractions:1/0,withinInteractionLimit:ns,cursorElement:null}},listeners:{"interactions:down":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;u.interacting()||Ou(u,Pu(u,m,g,v,l),l)},"interactions:move":function(c,l){(function(u,m){var g=u.interaction,v=u.pointer,b=u.event,k=u.eventTarget;g.pointerType!=="mouse"||g.pointerIsDown||g.interacting()||Ou(g,Pu(g,v,b,k,m),m)})(c,l),function(u,m){var g=u.interaction;if(g.pointerIsDown&&!g.interacting()&&g.pointerWasMoved&&g.prepared.name){m.fire("autoStart:before-start",u);var v=g.interactable,b=g.prepared.name;b&&v&&(v.options[b].manualStart||!ns(v,g.element,g.prepared,m)?g.stop():(g.start(g.prepared,v,g.element),Ru(g,m)))}}(c,l)},"interactions:stop":function(c,l){var u=c.interaction,m=u.interactable;m&&m.options.styleCursor&&Bl(u.element,"",l)}},maxInteractions:Hu,withinInteractionLimit:ns,validateAction:ju},ql=L0,B0={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(c,l){var u=c.interaction,m=c.eventTarget,g=c.dx,v=c.dy;if(u.prepared.name==="drag"){var b=Math.abs(g),k=Math.abs(v),w=u.interactable.options.drag,M=w.startAxis,_=b>k?"x":b<k?"y":"xy";if(u.prepared.axis=w.lockAxis==="start"?_[0]:w.lockAxis,_!=="xy"&&M!=="xy"&&M!==_){u.prepared.name=null;for(var z=m,j=function(I){if(I!==u.interactable){var D=u.interactable.options.drag;if(!D.manualStart&&I.testIgnoreAllow(D,z,m)){var K=I.getAction(u.downPointer,u.downEvent,u,z);if(K&&K.name==="drag"&&function(B,W){if(!W)return!1;var ce=W.options.drag.startAxis;return B==="xy"||ce==="xy"||ce===B}(_,I)&&ql.validateAction(K,I,z,m,l))return I}}};$.element(z);){var V=l.interactables.forEachMatch(z,j);if(V){u.prepared.name="drag",u.interactable=V,u.element=z;break}z=Yr(z)}}}}}};function Kl(c){var l=c.prepared&&c.prepared.name;if(!l)return null;var u=c.interactable.options;return u[l].hold||u[l].delay}var q0={id:"auto-start/hold",install:function(c){var l=c.defaults;c.usePlugin(ql),l.perAction.hold=0,l.perAction.delay=0},listeners:{"interactions:new":function(c){c.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(c){var l=c.interaction,u=Kl(l);u>0&&(l.autoStartHoldTimer=setTimeout(function(){l.start(l.prepared,l.interactable,l.element)},u))},"interactions:move":function(c){var l=c.interaction,u=c.duplicate;l.autoStartHoldTimer&&l.pointerWasMoved&&!u&&(clearTimeout(l.autoStartHoldTimer),l.autoStartHoldTimer=null)},"autoStart:before-start":function(c){var l=c.interaction;Kl(l)>0&&(l.prepared.name=null)}},getHoldDuration:Kl},K0=q0,W0={id:"auto-start",install:function(c){c.usePlugin(ql),c.usePlugin(K0),c.usePlugin(B0)}},U0=function(c){return/^(always|never|auto)$/.test(c)?(this.options.preventDefault=c,this):$.bool(c)?(this.options.preventDefault=c?"always":"never",this):this.options.preventDefault};function G0(c){var l=c.interaction,u=c.event;l.interactable&&l.interactable.checkAndPreventDefault(u)}var Iu={id:"core/interactablePreventDefault",install:function(c){var l=c.Interactable;l.prototype.preventDefault=U0,l.prototype.checkAndPreventDefault=function(u){return function(m,g,v){var b=m.options.preventDefault;if(b!=="never")if(b!=="always"){if(g.events.supportsPassive&&/^touch(start|move)$/.test(v.type)){var k=H(v.target).document,w=g.getDocOptions(k);if(!w||!w.events||w.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(v.type)||$.element(v.target)&&To(v.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||v.preventDefault()}else v.preventDefault()}(this,c,u)},c.interactions.docEvents.push({type:"dragstart",listener:function(u){for(var m=0,g=c.interactions.list;m<g.length;m++){var v=g[m];if(v.element&&(v.element===u.target||ao(v.element,u.target)))return void v.interactable.checkAndPreventDefault(u)}}})},listeners:["down","move","up","cancel"].reduce(function(c,l){return c["interactions:".concat(l)]=G0,c},{})};function as(c,l){if(l.phaselessTypes[c])return!0;for(var u in l.map)if(c.indexOf(u)===0&&c.substr(u.length)in l.phases)return!0;return!1}function ln(c){var l={};for(var u in c){var m=c[u];$.plainObject(m)?l[u]=ln(m):$.array(m)?l[u]=_u(m):l[u]=m}return l}var Wl=function(){function c(l){t(this,c),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=l,this.result=ss(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return n(c,[{key:"start",value:function(l,u){var m,g,v=l.phase,b=this.interaction,k=function(M){var _=M.interactable.options[M.prepared.name],z=_.modifiers;return z&&z.length?z:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(j){var V=_[j];return V&&V.enabled&&{options:V,methods:V._methods}}).filter(function(j){return!!j})}(b);this.prepareStates(k),this.startEdges=q({},b.edges),this.edges=q({},this.startEdges),this.startOffset=(m=b.rect,g=u,m?{left:g.x-m.left,top:g.y-m.top,right:m.right-g.x,bottom:m.bottom-g.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var w=this.fillArg({phase:v,pageCoords:u,preEnd:!1});return this.result=ss(),this.startAll(w),this.result=this.setAll(w)}},{key:"fillArg",value:function(l){var u=this.interaction;return l.interaction=u,l.interactable=u.interactable,l.element=u.element,l.rect||(l.rect=u.rect),l.edges||(l.edges=this.startEdges),l.startOffset=this.startOffset,l}},{key:"startAll",value:function(l){for(var u=0,m=this.states;u<m.length;u++){var g=m[u];g.methods.start&&(l.state=g,g.methods.start(l))}}},{key:"setAll",value:function(l){var u=l.phase,m=l.preEnd,g=l.skipModifiers,v=l.rect,b=l.edges;l.coords=q({},l.pageCoords),l.rect=q({},v),l.edges=q({},b);for(var k=g?this.states.slice(g):this.states,w=ss(l.coords,l.rect),M=0;M<k.length;M++){var _,z=k[M],j=z.options,V=q({},l.coords),I=null;(_=z.methods)!=null&&_.set&&this.shouldDo(j,m,u)&&(l.state=z,I=z.methods.set(l),si(l.edges,l.rect,{x:l.coords.x-V.x,y:l.coords.y-V.y})),w.eventProps.push(I)}q(this.edges,l.edges),w.delta.x=l.coords.x-l.pageCoords.x,w.delta.y=l.coords.y-l.pageCoords.y,w.rectDelta.left=l.rect.left-v.left,w.rectDelta.right=l.rect.right-v.right,w.rectDelta.top=l.rect.top-v.top,w.rectDelta.bottom=l.rect.bottom-v.bottom;var D=this.result.coords,K=this.result.rect;if(D&&K){var B=w.rect.left!==K.left||w.rect.right!==K.right||w.rect.top!==K.top||w.rect.bottom!==K.bottom;w.changed=B||D.x!==w.coords.x||D.y!==w.coords.y}return w}},{key:"applyToInteraction",value:function(l){var u=this.interaction,m=l.phase,g=u.coords.cur,v=u.coords.start,b=this.result,k=this.startDelta,w=b.delta;m==="start"&&q(this.startDelta,b.delta);for(var M=0,_=[[v,k],[g,w]];M<_.length;M++){var z=_[M],j=z[0],V=z[1];j.page.x+=V.x,j.page.y+=V.y,j.client.x+=V.x,j.client.y+=V.y}var I=this.result.rectDelta,D=l.rect||u.rect;D.left+=I.left,D.right+=I.right,D.top+=I.top,D.bottom+=I.bottom,D.width=D.right-D.left,D.height=D.bottom-D.top}},{key:"setAndApply",value:function(l){var u=this.interaction,m=l.phase,g=l.preEnd,v=l.skipModifiers,b=this.setAll(this.fillArg({preEnd:g,phase:m,pageCoords:l.modifiedCoords||u.coords.cur.page}));if(this.result=b,!b.changed&&(!v||v<this.states.length)&&u.interacting())return!1;if(l.modifiedCoords){var k=u.coords.cur.page,w={x:l.modifiedCoords.x-k.x,y:l.modifiedCoords.y-k.y};b.coords.x+=w.x,b.coords.y+=w.y,b.delta.x+=w.x,b.delta.y+=w.y}this.applyToInteraction(l)}},{key:"beforeEnd",value:function(l){var u=l.interaction,m=l.event,g=this.states;if(g&&g.length){for(var v=!1,b=0;b<g.length;b++){var k=g[b];l.state=k;var w=k.options,M=k.methods,_=M.beforeEnd&&M.beforeEnd(l);if(_)return this.endResult=_,!1;v=v||!v&&this.shouldDo(w,!0,l.phase,!0)}v&&u.move({event:m,preEnd:!0})}}},{key:"stop",value:function(l){var u=l.interaction;if(this.states&&this.states.length){var m=q({states:this.states,interactable:u.interactable,element:u.element,rect:null},l);this.fillArg(m);for(var g=0,v=this.states;g<v.length;g++){var b=v[g];m.state=b,b.methods.stop&&b.methods.stop(m)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(l){this.states=[];for(var u=0;u<l.length;u++){var m=l[u],g=m.options,v=m.methods,b=m.name;this.states.push({options:g,methods:v,index:u,name:b})}return this.states}},{key:"restoreInteractionCoords",value:function(l){var u=l.interaction,m=u.coords,g=u.rect,v=u.modification;if(v.result){for(var b=v.startDelta,k=v.result,w=k.delta,M=k.rectDelta,_=0,z=[[m.start,b],[m.cur,w]];_<z.length;_++){var j=z[_],V=j[0],I=j[1];V.page.x-=I.x,V.page.y-=I.y,V.client.x-=I.x,V.client.y-=I.y}g.left-=M.left,g.right-=M.right,g.top-=M.top,g.bottom-=M.bottom}}},{key:"shouldDo",value:function(l,u,m,g){return!(!l||l.enabled===!1||g&&!l.endOnly||l.endOnly&&!u||m==="start"&&!l.setStart)}},{key:"copyFrom",value:function(l){this.startOffset=l.startOffset,this.startDelta=l.startDelta,this.startEdges=l.startEdges,this.edges=l.edges,this.states=l.states.map(function(u){return ln(u)}),this.result=ss(q({},l.result.coords),q({},l.result.rect))}},{key:"destroy",value:function(){for(var l in this)this[l]=null}}]),c}();function ss(c,l){return{rect:l,coords:c,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ci(c,l){var u=c.defaults,m={start:c.start,set:c.set,beforeEnd:c.beforeEnd,stop:c.stop},g=function(v){var b=v||{};for(var k in b.enabled=b.enabled!==!1,u)k in b||(b[k]=u[k]);var w={options:b,methods:m,name:l,enable:function(){return b.enabled=!0,w},disable:function(){return b.enabled=!1,w}};return w};return l&&typeof l=="string"&&(g._defaults=u,g._methods=m),g}function oa(c){var l=c.iEvent,u=c.interaction.modification.result;u&&(l.modifiers=u.eventProps)}var Y0={id:"modifiers/base",before:["actions"],install:function(c){c.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(c){var l=c.interaction;l.modification=new Wl(l)},"interactions:before-action-start":function(c){var l=c.interaction,u=c.interaction.modification;u.start(c,l.coords.start.page),l.edges=u.edges,u.applyToInteraction(c)},"interactions:before-action-move":function(c){var l=c.interaction,u=l.modification,m=u.setAndApply(c);return l.edges=u.edges,m},"interactions:before-action-end":function(c){var l=c.interaction,u=l.modification,m=u.beforeEnd(c);return l.edges=u.startEdges,m},"interactions:action-start":oa,"interactions:action-move":oa,"interactions:action-end":oa,"interactions:after-action-start":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-move":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:stop":function(c){return c.interaction.modification.stop(c)}}},Vu=Y0,Du={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Ul=function(c){d(u,c);var l=x(u);function u(m,g,v,b,k,w,M){var _;t(this,u),(_=l.call(this,m)).relatedTarget=null,_.screenX=void 0,_.screenY=void 0,_.button=void 0,_.buttons=void 0,_.ctrlKey=void 0,_.shiftKey=void 0,_.altKey=void 0,_.metaKey=void 0,_.page=void 0,_.client=void 0,_.delta=void 0,_.rect=void 0,_.x0=void 0,_.y0=void 0,_.t0=void 0,_.dt=void 0,_.duration=void 0,_.clientX0=void 0,_.clientY0=void 0,_.velocity=void 0,_.speed=void 0,_.swipe=void 0,_.axes=void 0,_.preEnd=void 0,k=k||m.element;var z=m.interactable,j=(z&&z.options||Du).deltaSource,V=Lo(z,k,v),I=b==="start",D=b==="end",K=I?f(_):m.prevEvent,B=I?m.coords.start:D?{page:K.page,client:K.client,timeStamp:m.coords.cur.timeStamp}:m.coords.cur;return _.page=q({},B.page),_.client=q({},B.client),_.rect=q({},m.rect),_.timeStamp=B.timeStamp,D||(_.page.x-=V.x,_.page.y-=V.y,_.client.x-=V.x,_.client.y-=V.y),_.ctrlKey=g.ctrlKey,_.altKey=g.altKey,_.shiftKey=g.shiftKey,_.metaKey=g.metaKey,_.button=g.button,_.buttons=g.buttons,_.target=k,_.currentTarget=k,_.preEnd=w,_.type=M||v+(b||""),_.interactable=z,_.t0=I?m.pointers[m.pointers.length-1].downTime:K.t0,_.x0=m.coords.start.page.x-V.x,_.y0=m.coords.start.page.y-V.y,_.clientX0=m.coords.start.client.x-V.x,_.clientY0=m.coords.start.client.y-V.y,_.delta=I||D?{x:0,y:0}:{x:_[j].x-K[j].x,y:_[j].y-K[j].y},_.dt=m.coords.delta.timeStamp,_.duration=_.timeStamp-_.t0,_.velocity=q({},m.coords.velocity[j]),_.speed=Qn(_.velocity.x,_.velocity.y),_.swipe=D||b==="inertiastart"?_.getSwipe():null,_}return n(u,[{key:"getSwipe",value:function(){var m=this._interaction;if(m.prevEvent.speed<600||this.timeStamp-m.prevEvent.timeStamp>150)return null;var g=180*Math.atan2(m.prevEvent.velocityY,m.prevEvent.velocityX)/Math.PI;g<0&&(g+=360);var v=112.5<=g&&g<247.5,b=202.5<=g&&g<337.5;return{up:b,down:!b&&22.5<=g&&g<157.5,left:v,right:!v&&(292.5<=g||g<67.5),angle:g,speed:m.prevEvent.speed,velocity:{x:m.prevEvent.velocityX,y:m.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),u}(is);Object.defineProperties(Ul.prototype,{pageX:{get:function(){return this.page.x},set:function(c){this.page.x=c}},pageY:{get:function(){return this.page.y},set:function(c){this.page.y=c}},clientX:{get:function(){return this.client.x},set:function(c){this.client.x=c}},clientY:{get:function(){return this.client.y},set:function(c){this.client.y=c}},dx:{get:function(){return this.delta.x},set:function(c){this.delta.x=c}},dy:{get:function(){return this.delta.y},set:function(c){this.delta.y=c}},velocityX:{get:function(){return this.velocity.x},set:function(c){this.velocity.x=c}},velocityY:{get:function(){return this.velocity.y},set:function(c){this.velocity.y=c}}});var X0=n(function c(l,u,m,g,v){t(this,c),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=l,this.pointer=u,this.event=m,this.downTime=g,this.downTarget=v}),Z0=function(c){return c.interactable="",c.element="",c.prepared="",c.pointerIsDown="",c.pointerWasMoved="",c._proxy="",c}({}),Fu=function(c){return c.start="",c.move="",c.end="",c.stop="",c.interacting="",c}({}),Q0=0,J0=function(){function c(l){var u=this,m=l.pointerType,g=l.scopeFire;t(this,c),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ra(function(_){this.move(_)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Q0++,this._scopeFire=g,this.pointerType=m;var v=this;this._proxy={};var b=function(_){Object.defineProperty(u._proxy,_,{get:function(){return v[_]}})};for(var k in Z0)b(k);var w=function(_){Object.defineProperty(u._proxy,_,{value:function(){return v[_].apply(v,arguments)}})};for(var M in Fu)w(M);this._scopeFire("interactions:new",{interaction:this})}return n(c,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(l,u,m){var g=this.updatePointer(l,u,m,!0),v=this.pointers[g];this._scopeFire("interactions:down",{pointer:l,event:u,eventTarget:m,pointerIndex:g,pointerInfo:v,type:"down",interaction:this})}},{key:"start",value:function(l,u,m){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(l.name==="gesture"?2:1)||!u.options[l.name].enabled)&&(Ll(this.prepared,l),this.interactable=u,this.element=m,this.rect=u.getRect(m),this.edges=this.prepared.edges?q({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(l,u,m){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(l,u,m,!1);var g,v,b=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(g=this.coords.cur.client.x-this.coords.start.client.x,v=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Qn(g,v)>this.pointerMoveTolerance);var k,w,M,_=this.getPointerIndex(l),z={pointer:l,pointerIndex:_,pointerInfo:this.pointers[_],event:u,type:"move",eventTarget:m,dx:g,dy:v,duplicate:b,interaction:this};b||(k=this.coords.velocity,w=this.coords.delta,M=Math.max(w.timeStamp/1e3,.001),k.page.x=w.page.x/M,k.page.y=w.page.y/M,k.client.x=w.client.x/M,k.client.y=w.client.y/M,k.timeStamp=M),this._scopeFire("interactions:move",z),b||this.simulation||(this.interacting()&&(z.type=null,this.move(z)),this.pointerWasMoved&&rs(this.coords.prev,this.coords.cur))}},{key:"move",value:function(l){l&&l.event||fu(this.coords.delta),(l=q({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},l||{})).phase="move",this._doPhase(l)}},{key:"pointerUp",value:function(l,u,m,g){var v=this.getPointerIndex(l);v===-1&&(v=this.updatePointer(l,u,m,!1));var b=/cancel$/i.test(u.type)?"cancel":"up";this._scopeFire("interactions:".concat(b),{pointer:l,pointerIndex:v,pointerInfo:this.pointers[v],event:u,eventTarget:m,type:b,curEventTarget:g,interaction:this}),this.simulation||this.end(u),this.removePointer(l,u)}},{key:"documentBlur",value:function(l){this.end(l),this._scopeFire("interactions:blur",{event:l,type:"blur",interaction:this})}},{key:"end",value:function(l){var u;this._ending=!0,l=l||this._latestPointer.event,this.interacting()&&(u=this._doPhase({event:l,interaction:this,phase:"end"})),this._ending=!1,u===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(l){var u=Jn(l);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:ea(this.pointers,function(m){return m.id===u})}},{key:"getPointerInfo",value:function(l){return this.pointers[this.getPointerIndex(l)]}},{key:"updatePointer",value:function(l,u,m,g){var v,b,k,w=Jn(l),M=this.getPointerIndex(l),_=this.pointers[M];return g=g!==!1&&(g||/(down|start)$/i.test(u.type)),_?_.pointer=l:(_=new X0(w,l,u,null,null),M=this.pointers.length,this.pointers.push(_)),T0(this.coords.cur,this.pointers.map(function(z){return z.pointer}),this._now()),v=this.coords.delta,b=this.coords.prev,k=this.coords.cur,v.page.x=k.page.x-b.page.x,v.page.y=k.page.y-b.page.y,v.client.x=k.client.x-b.client.x,v.client.y=k.client.y-b.client.y,v.timeStamp=k.timeStamp-b.timeStamp,g&&(this.pointerIsDown=!0,_.downTime=this.coords.cur.timeStamp,_.downTarget=m,ts(this.downPointer,l),this.interacting()||(rs(this.coords.start,this.coords.cur),rs(this.coords.prev,this.coords.cur),this.downEvent=u,this.pointerWasMoved=!1)),this._updateLatestPointer(l,u,m),this._scopeFire("interactions:update-pointer",{pointer:l,event:u,eventTarget:m,down:g,pointerInfo:_,pointerIndex:M,interaction:this}),M}},{key:"removePointer",value:function(l,u){var m=this.getPointerIndex(l);if(m!==-1){var g=this.pointers[m];this._scopeFire("interactions:remove-pointer",{pointer:l,event:u,eventTarget:null,pointerIndex:m,pointerInfo:g,interaction:this}),this.pointers.splice(m,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(l,u,m){this._latestPointer.pointer=l,this._latestPointer.event=u,this._latestPointer.eventTarget=m}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(l,u,m,g){return new Ul(this,l,this.prepared.name,u,this.element,m,g)}},{key:"_fireEvent",value:function(l){var u;(u=this.interactable)==null||u.fire(l),(!this.prevEvent||l.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=l)}},{key:"_doPhase",value:function(l){var u=l.event,m=l.phase,g=l.preEnd,v=l.type,b=this.rect;if(b&&m==="move"&&(si(this.edges,b,this.coords.delta[this.interactable.options.deltaSource]),b.width=b.right-b.left,b.height=b.bottom-b.top),this._scopeFire("interactions:before-action-".concat(m),l)===!1)return!1;var k=l.iEvent=this._createPreparedEvent(u,m,g,v);return this._scopeFire("interactions:action-".concat(m),l),m==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(m),l),!0}},{key:"_now",value:function(){return Date.now()}}]),c}();function Nu(c){Lu(c.interaction)}function Lu(c){if(!function(u){return!(!u.offset.pending.x&&!u.offset.pending.y)}(c))return!1;var l=c.offset.pending;return Gl(c.coords.cur,l),Gl(c.coords.delta,l),si(c.edges,c.rect,l),l.x=0,l.y=0,!0}function e2(c){var l=c.x,u=c.y;this.offset.pending.x+=l,this.offset.pending.y+=u,this.offset.total.x+=l,this.offset.total.y+=u}function Gl(c,l){var u=c.page,m=c.client,g=l.x,v=l.y;u.x+=g,u.y+=v,m.x+=g,m.y+=v}Fu.offsetBy="";var t2={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(c){c.Interaction.prototype.offsetBy=e2},listeners:{"interactions:new":function(c){c.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(c){return function(l){l.pointerIsDown&&(Gl(l.coords.cur,l.offset.total),l.offset.pending.x=0,l.offset.pending.y=0)}(c.interaction)},"interactions:before-action-start":Nu,"interactions:before-action-move":Nu,"interactions:before-action-end":function(c){var l=c.interaction;if(Lu(l))return l.move({offset:!0}),l.end(),!1},"interactions:stop":function(c){var l=c.interaction;l.offset.total.x=0,l.offset.total.y=0,l.offset.pending.x=0,l.offset.pending.y=0}}},Bu=t2,r2=function(){function c(l){t(this,c),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=l}return n(c,[{key:"start",value:function(l){var u=this.interaction,m=ls(u);if(!m||!m.enabled)return!1;var g=u.coords.velocity.client,v=Qn(g.x,g.y),b=this.modification||(this.modification=new Wl(u));if(b.copyFrom(u.modification),this.t0=u._now(),this.allowResume=m.allowResume,this.v0=v,this.currentOffset={x:0,y:0},this.startCoords=u.coords.cur.page,this.modifierArg=b.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-u.coords.cur.timeStamp<50&&v>m.minSpeed&&v>m.endSpeed)this.startInertia();else{if(b.result=b.setAll(this.modifierArg),!b.result.changed)return!1;this.startSmoothEnd()}return u.modification.result.rect=null,u.offsetBy(this.targetOffset),u._doPhase({interaction:u,event:l,phase:"inertiastart"}),u.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),u.modification.result.rect=null,this.active=!0,u.simulation=this,!0}},{key:"startInertia",value:function(){var l=this,u=this.interaction.coords.velocity.client,m=ls(this.interaction),g=m.resistance,v=-Math.log(m.endSpeed/this.v0)/g;this.targetOffset={x:(u.x-v)/g,y:(u.y-v)/g},this.te=v,this.lambda_v0=g/this.v0,this.one_ve_v0=1-m.endSpeed/this.v0;var b=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},b.result=b.setAll(k),b.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+b.result.delta.x,y:this.targetOffset.y+b.result.delta.y}),this.onNextFrame(function(){return l.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var l=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return l.smoothEndTick()})}},{key:"onNextFrame",value:function(l){var u=this;this.timeout=li.request(function(){u.active&&l()})}},{key:"inertiaTick",value:function(){var l,u,m,g,v,b,k,w=this,M=this.interaction,_=ls(M).resistance,z=(M._now()-this.t0)/1e3;if(z<this.te){var j,V=1-(Math.exp(-_*z)-this.lambda_v0)/this.one_ve_v0;this.isModified?(l=0,u=0,m=this.targetOffset.x,g=this.targetOffset.y,v=this.modifiedOffset.x,b=this.modifiedOffset.y,j={x:qu(k=V,l,m,v),y:qu(k,u,g,b)}):j={x:this.targetOffset.x*V,y:this.targetOffset.y*V};var I={x:j.x-this.currentOffset.x,y:j.y-this.currentOffset.y};this.currentOffset.x+=I.x,this.currentOffset.y+=I.y,M.offsetBy(I),M.move(),this.onNextFrame(function(){return w.inertiaTick()})}else M.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var l=this,u=this.interaction,m=u._now()-this.t0,g=ls(u).smoothEndDuration;if(m<g){var v={x:Ku(m,0,this.targetOffset.x,g),y:Ku(m,0,this.targetOffset.y,g)},b={x:v.x-this.currentOffset.x,y:v.y-this.currentOffset.y};this.currentOffset.x+=b.x,this.currentOffset.y+=b.y,u.offsetBy(b),u.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return l.smoothEndTick()})}else u.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(l){var u=l.pointer,m=l.event,g=l.eventTarget,v=this.interaction;v.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),v.updatePointer(u,m,g,!0),v._doPhase({interaction:v,event:m,phase:"resume"}),rs(v.coords.prev,v.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,li.cancel(this.timeout)}}]),c}();function ls(c){var l=c.interactable,u=c.prepared;return l&&l.options&&u.name&&l.options[u.name].inertia}var o2={id:"inertia",before:["modifiers","actions"],install:function(c){var l=c.defaults;c.usePlugin(Bu),c.usePlugin(Vu),c.actions.phases.inertiastart=!0,c.actions.phases.resume=!0,l.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(c){var l=c.interaction;l.inertia=new r2(l)},"interactions:before-action-end":function(c){var l=c.interaction,u=c.event;return(!l._interacting||l.simulation||!l.inertia.start(u))&&null},"interactions:down":function(c){var l=c.interaction,u=c.eventTarget,m=l.inertia;if(m.active)for(var g=u;$.element(g);){if(g===l.element){m.resume(c);break}g=Yr(g)}},"interactions:stop":function(c){var l=c.interaction.inertia;l.active&&l.stop()},"interactions:before-action-resume":function(c){var l=c.interaction.modification;l.stop(c),l.start(c,c.interaction.coords.cur.page),l.applyToInteraction(c)},"interactions:before-action-inertiastart":function(c){return c.interaction.modification.setAndApply(c)},"interactions:action-resume":oa,"interactions:action-inertiastart":oa,"interactions:after-action-inertiastart":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-resume":function(c){return c.interaction.modification.restoreInteractionCoords(c)}}};function qu(c,l,u,m){var g=1-c;return g*g*l+2*g*c*u+c*c*m}function Ku(c,l,u,m){return-u*(c/=m)*(c-2)+l}var i2=o2;function Wu(c,l){for(var u=0;u<l.length;u++){var m=l[u];if(c.immediatePropagationStopped)break;m(c)}}var Uu=function(){function c(l){t(this,c),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=q({},l||{})}return n(c,[{key:"fire",value:function(l){var u,m=this.global;(u=this.types[l.type])&&Wu(l,u),!l.propagationStopped&&m&&(u=m[l.type])&&Wu(l,u)}},{key:"on",value:function(l,u){var m=co(l,u);for(l in m)this.types[l]=wu(this.types[l]||[],m[l])}},{key:"off",value:function(l,u){var m=co(l,u);for(l in m){var g=this.types[l];if(g&&g.length)for(var v=0,b=m[l];v<b.length;v++){var k=b[v],w=g.indexOf(k);w!==-1&&g.splice(w,1)}}}},{key:"getRect",value:function(l){return null}}]),c}(),n2=function(){function c(l){t(this,c),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=l,ts(this,l)}return n(c,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),c}();function ia(c){return $.object(c)?{capture:!!c.capture,passive:!!c.passive}:{capture:!!c,passive:!1}}function cs(c,l){return c===l||(typeof c=="boolean"?!!l.capture===c&&!l.passive:!!c.capture==!!l.capture&&!!c.passive==!!l.passive)}var a2={id:"events",install:function(c){var l,u=[],m={},g=[],v={add:b,remove:k,addDelegate:function(_,z,j,V,I){var D=ia(I);if(!m[j]){m[j]=[];for(var K=0;K<g.length;K++){var B=g[K];b(B,j,w),b(B,j,M,!0)}}var W=m[j],ce=ta(W,function(ye){return ye.selector===_&&ye.context===z});ce||(ce={selector:_,context:z,listeners:[]},W.push(ce)),ce.listeners.push({func:V,options:D})},removeDelegate:function(_,z,j,V,I){var D,K=ia(I),B=m[j],W=!1;if(B)for(D=B.length-1;D>=0;D--){var ce=B[D];if(ce.selector===_&&ce.context===z){for(var ye=ce.listeners,ee=ye.length-1;ee>=0;ee--){var he=ye[ee];if(he.func===V&&cs(he.options,K)){ye.splice(ee,1),ye.length||(B.splice(D,1),k(z,j,w),k(z,j,M,!0)),W=!0;break}}if(W)break}}},delegateListener:w,delegateUseCapture:M,delegatedEvents:m,documents:g,targets:u,supportsOptions:!1,supportsPassive:!1};function b(_,z,j,V){if(_.addEventListener){var I=ia(V),D=ta(u,function(K){return K.eventTarget===_});D||(D={eventTarget:_,events:{}},u.push(D)),D.events[z]||(D.events[z]=[]),ta(D.events[z],function(K){return K.func===j&&cs(K.options,I)})||(_.addEventListener(z,j,v.supportsOptions?I:I.capture),D.events[z].push({func:j,options:I}))}}function k(_,z,j,V){if(_.addEventListener&&_.removeEventListener){var I=ea(u,function(pr){return pr.eventTarget===_}),D=u[I];if(D&&D.events)if(z!=="all"){var K=!1,B=D.events[z];if(B){if(j==="all"){for(var W=B.length-1;W>=0;W--){var ce=B[W];k(_,z,ce.func,ce.options)}return}for(var ye=ia(V),ee=0;ee<B.length;ee++){var he=B[ee];if(he.func===j&&cs(he.options,ye)){_.removeEventListener(z,j,v.supportsOptions?ye:ye.capture),B.splice(ee,1),B.length===0&&(delete D.events[z],K=!0);break}}}K&&!Object.keys(D.events).length&&u.splice(I,1)}else for(z in D.events)D.events.hasOwnProperty(z)&&k(_,z,"all")}}function w(_,z){for(var j=ia(z),V=new n2(_),I=m[_.type],D=xu(_)[0],K=D;$.element(K);){for(var B=0;B<I.length;B++){var W=I[B],ce=W.selector,ye=W.context;if(To(K,ce)&&ao(ye,D)&&ao(ye,K)){var ee=W.listeners;V.currentTarget=K;for(var he=0;he<ee.length;he++){var pr=ee[he];cs(pr.options,j)&&pr.func(V)}}}K=Yr(K)}}function M(_){return w(_,!0)}return(l=c.document)==null||l.createElement("div").addEventListener("test",null,{get capture(){return v.supportsOptions=!0},get passive(){return v.supportsPassive=!0}}),c.events=v,v}},Yl={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(c){for(var l=0,u=Yl.methodOrder;l<u.length;l++){var m=u[l],g=Yl[m](c);if(g)return g}return null},simulationResume:function(c){var l=c.pointerType,u=c.eventType,m=c.eventTarget,g=c.scope;if(!/down|start/i.test(u))return null;for(var v=0,b=g.interactions.list;v<b.length;v++){var k=b[v],w=m;if(k.simulation&&k.simulation.allowResume&&k.pointerType===l)for(;w;){if(w===k.element)return k;w=Yr(w)}}return null},mouseOrPen:function(c){var l,u=c.pointerId,m=c.pointerType,g=c.eventType,v=c.scope;if(m!=="mouse"&&m!=="pen")return null;for(var b=0,k=v.interactions.list;b<k.length;b++){var w=k[b];if(w.pointerType===m){if(w.simulation&&!Gu(w,u))continue;if(w.interacting())return w;l||(l=w)}}if(l)return l;for(var M=0,_=v.interactions.list;M<_.length;M++){var z=_[M];if(!(z.pointerType!==m||/down/i.test(g)&&z.simulation))return z}return null},hasPointer:function(c){for(var l=c.pointerId,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(Gu(g,l))return g}return null},idle:function(c){for(var l=c.pointerType,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(g.pointers.length===1){var v=g.interactable;if(v&&(!v.options.gesture||!v.options.gesture.enabled))continue}else if(g.pointers.length>=2)continue;if(!g.interacting()&&l===g.pointerType)return g}return null}};function Gu(c,l){return c.pointers.some(function(u){return u.id===l})}var s2=Yl,Xl=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Yu(c,l){return function(u){var m=l.interactions.list,g=yu(u),v=xu(u),b=v[0],k=v[1],w=[];if(/^touch/.test(u.type)){l.prevTouchTime=l.now();for(var M=0,_=u.changedTouches;M<_.length;M++){var z=_[M],j={pointer:z,pointerId:Jn(z),pointerType:g,eventType:u.type,eventTarget:b,curEventTarget:k,scope:l},V=Xu(j);w.push([j.pointer,j.eventTarget,j.curEventTarget,V])}}else{var I=!1;if(!ur.supportsPointerEvent&&/mouse/.test(u.type)){for(var D=0;D<m.length&&!I;D++)I=m[D].pointerType!=="mouse"&&m[D].pointerIsDown;I=I||l.now()-l.prevTouchTime<500||u.timeStamp===0}if(!I){var K={pointer:u,pointerId:Jn(u),pointerType:g,eventType:u.type,curEventTarget:k,eventTarget:b,scope:l},B=Xu(K);w.push([K.pointer,K.eventTarget,K.curEventTarget,B])}}for(var W=0;W<w.length;W++){var ce=w[W],ye=ce[0],ee=ce[1],he=ce[2];ce[3][c](ye,u,ee,he)}}}function Xu(c){var l=c.pointerType,u=c.scope,m={interaction:s2.search(c),searchDetails:c};return u.fire("interactions:find",m),m.interaction||u.interactions.new({pointerType:l})}function Zl(c,l){var u=c.doc,m=c.scope,g=c.options,v=m.interactions.docEvents,b=m.events,k=b[l];for(var w in m.browser.isIOS&&!g.events&&(g.events={passive:!1}),b.delegatedEvents)k(u,w,b.delegateListener),k(u,w,b.delegateUseCapture,!0);for(var M=g&&g.events,_=0;_<v.length;_++){var z=v[_];k(u,z.type,z.listener,M)}}var l2={id:"core/interactions",install:function(c){for(var l={},u=0;u<Xl.length;u++){var m=Xl[u];l[m]=Yu(m,c)}var g,v=ur.pEventTypes;function b(){for(var k=0,w=c.interactions.list;k<w.length;k++){var M=w[k];if(M.pointerIsDown&&M.pointerType==="touch"&&!M._interacting)for(var _=function(){var V=j[z];c.documents.some(function(I){return ao(I.doc,V.downTarget)})||M.removePointer(V.pointer,V.event)},z=0,j=M.pointers;z<j.length;z++)_()}}(g=De.PointerEvent?[{type:v.down,listener:b},{type:v.down,listener:l.pointerDown},{type:v.move,listener:l.pointerMove},{type:v.up,listener:l.pointerUp},{type:v.cancel,listener:l.pointerUp}]:[{type:"mousedown",listener:l.pointerDown},{type:"mousemove",listener:l.pointerMove},{type:"mouseup",listener:l.pointerUp},{type:"touchstart",listener:b},{type:"touchstart",listener:l.pointerDown},{type:"touchmove",listener:l.pointerMove},{type:"touchend",listener:l.pointerUp},{type:"touchcancel",listener:l.pointerUp}]).push({type:"blur",listener:function(k){for(var w=0,M=c.interactions.list;w<M.length;w++)M[w].documentBlur(k)}}),c.prevTouchTime=0,c.Interaction=function(k){d(M,k);var w=x(M);function M(){return t(this,M),w.apply(this,arguments)}return n(M,[{key:"pointerMoveTolerance",get:function(){return c.interactions.pointerMoveTolerance},set:function(_){c.interactions.pointerMoveTolerance=_}},{key:"_now",value:function(){return c.now()}}]),M}(J0),c.interactions={list:[],new:function(k){k.scopeFire=function(M,_){return c.fire(M,_)};var w=new c.Interaction(k);return c.interactions.list.push(w),w},listeners:l,docEvents:g,pointerMoveTolerance:1},c.usePlugin(Iu)},listeners:{"scope:add-document":function(c){return Zl(c,"add")},"scope:remove-document":function(c){return Zl(c,"remove")},"interactable:unset":function(c,l){for(var u=c.interactable,m=l.interactions.list.length-1;m>=0;m--){var g=l.interactions.list[m];g.interactable===u&&(g.stop(),l.fire("interactions:destroy",{interaction:g}),g.destroy(),l.interactions.list.length>2&&l.interactions.list.splice(m,1))}}},onDocSignal:Zl,doOnInteractions:Yu,methodNames:Xl},c2=l2,di=function(c){return c[c.On=0]="On",c[c.Off=1]="Off",c}(di||{}),d2=function(){function c(l,u,m,g){t(this,c),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Uu,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=u.actions,this.target=l,this._context=u.context||m,this._win=H(Sr(l)?this._context:l),this._doc=this._win.document,this._scopeEvents=g,this.set(u)}return n(c,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(l,u){return $.func(u.onstart)&&this.on("".concat(l,"start"),u.onstart),$.func(u.onmove)&&this.on("".concat(l,"move"),u.onmove),$.func(u.onend)&&this.on("".concat(l,"end"),u.onend),$.func(u.oninertiastart)&&this.on("".concat(l,"inertiastart"),u.oninertiastart),this}},{key:"updatePerActionListeners",value:function(l,u,m){var g,v=this,b=(g=this._actions.map[l])==null?void 0:g.filterEventType,k=function(w){return(b==null||b(w))&&as(w,v._actions)};($.array(u)||$.object(u))&&this._onOff(di.Off,l,u,void 0,k),($.array(m)||$.object(m))&&this._onOff(di.On,l,m,void 0,k)}},{key:"setPerAction",value:function(l,u){var m=this._defaults;for(var g in u){var v=g,b=this.options[l],k=u[v];v==="listeners"&&this.updatePerActionListeners(l,b.listeners,k),$.array(k)?b[v]=_u(k):$.plainObject(k)?(b[v]=q(b[v]||{},ln(k)),$.object(m.perAction[v])&&"enabled"in m.perAction[v]&&(b[v].enabled=k.enabled!==!1)):$.bool(k)&&$.object(m.perAction[v])?b[v].enabled=k:b[v]=k}}},{key:"getRect",value:function(l){return l=l||($.element(this.target)?this.target:null),$.string(this.target)&&(l=l||this._context.querySelector(this.target)),_e(l)}},{key:"rectChecker",value:function(l){var u=this;return $.func(l)?(this.getRect=function(m){var g=q({},l.apply(u,m));return"width"in g||(g.width=g.right-g.left,g.height=g.bottom-g.top),g},this):l===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(l,u){if(Sr(u)||$.object(u)){for(var m in this.options[l]=u,this._actions.map)this.options[m][l]=u;return this}return this.options[l]}},{key:"origin",value:function(l){return this._backCompatOption("origin",l)}},{key:"deltaSource",value:function(l){return l==="page"||l==="client"?(this.options.deltaSource=l,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var l=this.target;return $.string(l)?Array.from(this._context.querySelectorAll(l)):$.func(l)&&l.getAllElements?l.getAllElements():$.element(l)?[l]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(l){return this._context===l.ownerDocument||ao(this._context,l)}},{key:"testIgnoreAllow",value:function(l,u,m){return!this.testIgnore(l.ignoreFrom,u,m)&&this.testAllow(l.allowFrom,u,m)}},{key:"testAllow",value:function(l,u,m){return!l||!!$.element(m)&&($.string(l)?ue(m,l,u):!!$.element(l)&&ao(l,m))}},{key:"testIgnore",value:function(l,u,m){return!(!l||!$.element(m))&&($.string(l)?ue(m,l,u):!!$.element(l)&&ao(l,m))}},{key:"fire",value:function(l){return this.events.fire(l),this}},{key:"_onOff",value:function(l,u,m,g,v){$.object(u)&&!$.array(u)&&(g=m,m=null);var b=co(u,m,v);for(var k in b){k==="wheel"&&(k=ur.wheelEvent);for(var w=0,M=b[k];w<M.length;w++){var _=M[w];as(k,this._actions)?this.events[l===di.On?"on":"off"](k,_):$.string(this.target)?this._scopeEvents[l===di.On?"addDelegate":"removeDelegate"](this.target,this._context,k,_,g):this._scopeEvents[l===di.On?"add":"remove"](this.target,k,_,g)}}return this}},{key:"on",value:function(l,u,m){return this._onOff(di.On,l,u,m)}},{key:"off",value:function(l,u,m){return this._onOff(di.Off,l,u,m)}},{key:"set",value:function(l){var u=this._defaults;for(var m in $.object(l)||(l={}),this.options=ln(u.base),this._actions.methodDict){var g=m,v=this._actions.methodDict[g];this.options[g]={},this.setPerAction(g,q(q({},u.perAction),u.actions[g])),this[v](l[g])}for(var b in l)b!=="getRect"?$.func(this[b])&&this[b](l[b]):this.rectChecker(l.getRect);return this}},{key:"unset",value:function(){if($.string(this.target))for(var l in this._scopeEvents.delegatedEvents)for(var u=this._scopeEvents.delegatedEvents[l],m=u.length-1;m>=0;m--){var g=u[m],v=g.selector,b=g.context,k=g.listeners;v===this.target&&b===this._context&&u.splice(m,1);for(var w=k.length-1;w>=0;w--)this._scopeEvents.removeDelegate(this.target,this._context,l,k[w][0],k[w][1])}else this._scopeEvents.remove(this.target,"all")}}]),c}(),u2=function(){function c(l){var u=this;t(this,c),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=l,l.addListeners({"interactable:unset":function(m){var g=m.interactable,v=g.target,b=$.string(v)?u.selectorMap[v]:v[u.scope.id],k=ea(b,function(w){return w===g});b.splice(k,1)}})}return n(c,[{key:"new",value:function(l,u){u=q(u||{},{actions:this.scope.actions});var m=new this.scope.Interactable(l,u,this.scope.document,this.scope.events);return this.scope.addDocument(m._doc),this.list.push(m),$.string(l)?(this.selectorMap[l]||(this.selectorMap[l]=[]),this.selectorMap[l].push(m)):(m.target[this.scope.id]||Object.defineProperty(l,this.scope.id,{value:[],configurable:!0}),l[this.scope.id].push(m)),this.scope.fire("interactable:new",{target:l,options:u,interactable:m,win:this.scope._win}),m}},{key:"getExisting",value:function(l,u){var m=u&&u.context||this.scope.document,g=$.string(l),v=g?this.selectorMap[l]:l[this.scope.id];if(v)return ta(v,function(b){return b._context===m&&(g||b.inContext(l))})}},{key:"forEachMatch",value:function(l,u){for(var m=0,g=this.list;m<g.length;m++){var v=g[m],b=void 0;if(($.string(v.target)?$.element(l)&&To(l,v.target):l===v.target)&&v.inContext(l)&&(b=u(v)),b!==void 0)return b}}}]),c}(),h2=function(){function c(){var l=this;t(this,c),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ur,this.defaults=ln(Du),this.Eventable=Uu,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(m){var g=function v(b,k){var w=m.interactables.getExisting(b,k);return w||((w=m.interactables.new(b,k)).events.global=v.globalEvents),w};return g.getPointerAverage=ku,g.getTouchBBox=Ol,g.getTouchDistance=Hl,g.getTouchAngle=Rl,g.getElementRect=_e,g.getElementClientRect=U,g.matchesSelector=To,g.closest=nn,g.globalEvents={},g.version="1.10.27",g.scope=m,g.use=function(v,b){return this.scope.usePlugin(v,b),this},g.isSet=function(v,b){return!!this.scope.interactables.get(v,b&&b.context)},g.on=ra(function(v,b,k){if($.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),$.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.on(_,b,k)}return this}if($.object(v)){for(var z in v)this.on(z,v[z],b);return this}return as(v,this.scope.actions)?this.globalEvents[v]?this.globalEvents[v].push(b):this.globalEvents[v]=[b]:this.scope.events.add(this.scope.document,v,b,{options:k}),this},"The interact.on() method is being deprecated"),g.off=ra(function(v,b,k){if($.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),$.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.off(_,b,k)}return this}if($.object(v)){for(var z in v)this.off(z,v[z],b);return this}var j;return as(v,this.scope.actions)?v in this.globalEvents&&(j=this.globalEvents[v].indexOf(b))!==-1&&this.globalEvents[v].splice(j,1):this.scope.events.remove(this.scope.document,v,b,k),this},"The interact.off() method is being deprecated"),g.debug=function(){return this.scope},g.supportsTouch=function(){return ur.supportsTouch},g.supportsPointerEvent=function(){return ur.supportsPointerEvent},g.stop=function(){for(var v=0,b=this.scope.interactions.list;v<b.length;v++)b[v].stop();return this},g.pointerMoveTolerance=function(v){return $.number(v)?(this.scope.interactions.pointerMoveTolerance=v,this):this.scope.interactions.pointerMoveTolerance},g.addDocument=function(v,b){this.scope.addDocument(v,b)},g.removeDocument=function(v){this.scope.removeDocument(v)},g}(this),this.InteractEvent=Ul,this.Interactable=void 0,this.interactables=new u2(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(m){return l.removeDocument(m.target)};var u=this;this.Interactable=function(m){d(v,m);var g=x(v);function v(){return t(this,v),g.apply(this,arguments)}return n(v,[{key:"_defaults",get:function(){return u.defaults}},{key:"set",value:function(b){return y(h(v.prototype),"set",this).call(this,b),u.fire("interactable:set",{options:b,interactable:this}),this}},{key:"unset",value:function(){y(h(v.prototype),"unset",this).call(this);var b=u.interactables.list.indexOf(this);b<0||(u.interactables.list.splice(b,1),u.fire("interactable:unset",{interactable:this}))}}]),v}(d2)}return n(c,[{key:"addListeners",value:function(l,u){this.listenerMaps.push({id:u,map:l})}},{key:"fire",value:function(l,u){for(var m=0,g=this.listenerMaps;m<g.length;m++){var v=g[m].map[l];if(v&&v(u,this,l)===!1)return!1}}},{key:"init",value:function(l){return this.isInitialized?this:function(u,m){return u.isInitialized=!0,$.window(m)&&O(m),De.init(m),ur.init(m),li.init(m),u.window=m,u.document=m.document,u.usePlugin(c2),u.usePlugin(a2),u}(this,l)}},{key:"pluginIsInstalled",value:function(l){var u=l.id;return u?!!this._plugins.map[u]:this._plugins.list.indexOf(l)!==-1}},{key:"usePlugin",value:function(l,u){if(!this.isInitialized)return this;if(this.pluginIsInstalled(l))return this;if(l.id&&(this._plugins.map[l.id]=l),this._plugins.list.push(l),l.install&&l.install(this,u),l.listeners&&l.before){for(var m=0,g=this.listenerMaps.length,v=l.before.reduce(function(k,w){return k[w]=!0,k[Zu(w)]=!0,k},{});m<g;m++){var b=this.listenerMaps[m].id;if(b&&(v[b]||v[Zu(b)]))break}this.listenerMaps.splice(m,0,{id:l.id,map:l.listeners})}else l.listeners&&this.listenerMaps.push({id:l.id,map:l.listeners});return this}},{key:"addDocument",value:function(l,u){if(this.getDocIndex(l)!==-1)return!1;var m=H(l);u=u?q({},u):{},this.documents.push({doc:l,options:u}),this.events.documents.push(l),l!==this.document&&this.events.add(m,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:l,window:m,scope:this,options:u})}},{key:"removeDocument",value:function(l){var u=this.getDocIndex(l),m=H(l),g=this.documents[u].options;this.events.remove(m,"unload",this.onWindowUnload),this.documents.splice(u,1),this.events.documents.splice(u,1),this.fire("scope:remove-document",{doc:l,window:m,scope:this,options:g})}},{key:"getDocIndex",value:function(l){for(var u=0;u<this.documents.length;u++)if(this.documents[u].doc===l)return u;return-1}},{key:"getDocOptions",value:function(l){var u=this.getDocIndex(l);return u===-1?null:this.documents[u].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),c}();function Zu(c){return c&&c.replace(/\/.*$/,"")}var Qu=new h2,hr=Qu.interactStatic,p2=typeof globalThis<"u"?globalThis:window;Qu.init(p2);var m2=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(c){var l=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(m){var g=m[0],v=m[1];return g in c||v in c}),u=function(m,g){for(var v=c.range,b=c.limits,k=b===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:b,w=c.offset,M=w===void 0?{x:0,y:0}:w,_={range:v,grid:c,x:null,y:null},z=0;z<l.length;z++){var j=l[z],V=j[0],I=j[1],D=Math.round((m-M.x)/c[V]),K=Math.round((g-M.y)/c[I]);_[V]=Math.max(k.left,Math.min(k.right,D*c[V]+M.x)),_[I]=Math.max(k.top,Math.min(k.bottom,K*c[I]+M.y))}return _};return u.grid=c,u.coordFields=l,u}}),g2={id:"snappers",install:function(c){var l=c.interactStatic;l.snappers=q(l.snappers||{},m2),l.createSnapGrid=l.snappers.grid}},f2=g2,v2={start:function(c){var l=c.state,u=c.rect,m=c.edges,g=c.pageCoords,v=l.options,b=v.ratio,k=v.enabled,w=l.options,M=w.equalDelta,_=w.modifiers;b==="preserve"&&(b=u.width/u.height),l.startCoords=q({},g),l.startRect=q({},u),l.ratio=b,l.equalDelta=M;var z=l.linkedEdges={top:m.top||m.left&&!m.bottom,left:m.left||m.top&&!m.right,bottom:m.bottom||m.right&&!m.top,right:m.right||m.bottom&&!m.left};if(l.xIsPrimaryAxis=!(!m.left&&!m.right),l.equalDelta){var j=(z.left?1:-1)*(z.top?1:-1);l.edgeSign={x:j,y:j}}else l.edgeSign={x:z.left?-1:1,y:z.top?-1:1};if(k!==!1&&q(m,z),_!=null&&_.length){var V=new Wl(c.interaction);V.copyFrom(c.interaction.modification),V.prepareStates(_),l.subModification=V,V.startAll(o({},c))}},set:function(c){var l=c.state,u=c.rect,m=c.coords,g=l.linkedEdges,v=q({},m),b=l.equalDelta?b2:k2;if(q(c.edges,g),b(l,l.xIsPrimaryAxis,m,u),!l.subModification)return null;var k=q({},u);si(g,k,{x:m.x-v.x,y:m.y-v.y});var w=l.subModification.setAll(o(o({},c),{},{rect:k,edges:g,pageCoords:m,prevCoords:m,prevRect:k})),M=w.delta;return w.changed&&(b(l,Math.abs(M.x)>Math.abs(M.y),w.coords,w.rect),q(m,w.coords)),w.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function b2(c,l,u){var m=c.startCoords,g=c.edgeSign;l?u.y=m.y+(u.x-m.x)*g.y:u.x=m.x+(u.y-m.y)*g.x}function k2(c,l,u,m){var g=c.startRect,v=c.startCoords,b=c.ratio,k=c.edgeSign;if(l){var w=m.width/b;u.y=v.y+(w-g.height)*k.y}else{var M=m.height*b;u.x=v.x+(M-g.width)*k.x}}var y2=ci(v2,"aspectRatio"),Ju=function(){};Ju._defaults={};var ds=Ju;function Pi(c,l,u){return $.func(c)?so(c,l.interactable,l.element,[u.x,u.y,l]):so(c,l.interactable,l.element)}var us={start:function(c){var l=c.rect,u=c.startOffset,m=c.state,g=c.interaction,v=c.pageCoords,b=m.options,k=b.elementRect,w=q({left:0,top:0,right:0,bottom:0},b.offset||{});if(l&&k){var M=Pi(b.restriction,g,v);if(M){var _=M.right-M.left-l.width,z=M.bottom-M.top-l.height;_<0&&(w.left+=_,w.right+=_),z<0&&(w.top+=z,w.bottom+=z)}w.left+=u.left-l.width*k.left,w.top+=u.top-l.height*k.top,w.right+=u.right-l.width*(1-k.right),w.bottom+=u.bottom-l.height*(1-k.bottom)}m.offset=w},set:function(c){var l=c.coords,u=c.interaction,m=c.state,g=m.options,v=m.offset,b=Pi(g.restriction,u,l);if(b){var k=function(w){return!w||"left"in w&&"top"in w||((w=q({},w)).left=w.x||0,w.top=w.y||0,w.right=w.right||w.left+w.width,w.bottom=w.bottom||w.top+w.height),w}(b);l.x=Math.max(Math.min(k.right-v.right,l.x),k.left+v.left),l.y=Math.max(Math.min(k.bottom-v.bottom,l.y),k.top+v.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},x2=ci(us,"restrict"),eh={top:1/0,left:1/0,bottom:-1/0,right:-1/0},th={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function rh(c,l){for(var u=0,m=["top","left","bottom","right"];u<m.length;u++){var g=m[u];g in c||(c[g]=l[g])}return c}var na={noInner:eh,noOuter:th,start:function(c){var l,u=c.interaction,m=c.startOffset,g=c.state,v=g.options;v&&(l=Xr(Pi(v.offset,u,u.coords.start.page))),l=l||{x:0,y:0},g.offset={top:l.y+m.top,left:l.x+m.left,bottom:l.y-m.bottom,right:l.x-m.right}},set:function(c){var l=c.coords,u=c.edges,m=c.interaction,g=c.state,v=g.offset,b=g.options;if(u){var k=q({},l),w=Pi(b.inner,m,k)||{},M=Pi(b.outer,m,k)||{};rh(w,eh),rh(M,th),u.top?l.y=Math.min(Math.max(M.top+v.top,k.y),w.top+v.top):u.bottom&&(l.y=Math.max(Math.min(M.bottom+v.bottom,k.y),w.bottom+v.bottom)),u.left?l.x=Math.min(Math.max(M.left+v.left,k.x),w.left+v.left):u.right&&(l.x=Math.max(Math.min(M.right+v.right,k.x),w.right+v.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},w2=ci(na,"restrictEdges"),_2=q({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(c){}},us.defaults),M2=ci({start:us.start,set:us.set,defaults:_2},"restrictRect"),C2={width:-1/0,height:-1/0},z2={width:1/0,height:1/0},E2=ci({start:function(c){return na.start(c)},set:function(c){var l=c.interaction,u=c.state,m=c.rect,g=c.edges,v=u.options;if(g){var b=lo(Pi(v.min,l,c.coords))||C2,k=lo(Pi(v.max,l,c.coords))||z2;u.options={endOnly:v.endOnly,inner:q({},na.noInner),outer:q({},na.noOuter)},g.top?(u.options.inner.top=m.bottom-b.height,u.options.outer.top=m.bottom-k.height):g.bottom&&(u.options.inner.bottom=m.top+b.height,u.options.outer.bottom=m.top+k.height),g.left?(u.options.inner.left=m.right-b.width,u.options.outer.left=m.right-k.width):g.right&&(u.options.inner.right=m.left+b.width,u.options.outer.right=m.left+k.width),na.set(c),u.options=v}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ql={start:function(c){var l,u=c.interaction,m=c.interactable,g=c.element,v=c.rect,b=c.state,k=c.startOffset,w=b.options,M=w.offsetWithOrigin?function(j){var V=j.interaction.element,I=Xr(so(j.state.options.origin,null,null,[V])),D=I||Lo(j.interactable,V,j.interaction.prepared.name);return D}(c):{x:0,y:0};if(w.offset==="startCoords")l={x:u.coords.start.page.x,y:u.coords.start.page.y};else{var _=so(w.offset,m,g,[u]);(l=Xr(_)||{x:0,y:0}).x+=M.x,l.y+=M.y}var z=w.relativePoints;b.offsets=v&&z&&z.length?z.map(function(j,V){return{index:V,relativePoint:j,x:k.left-v.width*j.x+l.x,y:k.top-v.height*j.y+l.y}}):[{index:0,relativePoint:null,x:l.x,y:l.y}]},set:function(c){var l=c.interaction,u=c.coords,m=c.state,g=m.options,v=m.offsets,b=Lo(l.interactable,l.element,l.prepared.name),k=q({},u),w=[];g.offsetWithOrigin||(k.x-=b.x,k.y-=b.y);for(var M=0,_=v;M<_.length;M++)for(var z=_[M],j=k.x-z.x,V=k.y-z.y,I=0,D=g.targets.length;I<D;I++){var K=g.targets[I],B=void 0;(B=$.func(K)?K(j,V,l._proxy,z,I):K)&&w.push({x:($.number(B.x)?B.x:j)+z.x,y:($.number(B.y)?B.y:V)+z.y,range:$.number(B.range)?B.range:g.range,source:K,index:I,offset:z})}for(var W={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},ce=0;ce<w.length;ce++){var ye=w[ce],ee=ye.range,he=ye.x-k.x,pr=ye.y-k.y,et=Qn(he,pr),Fr=et<=ee;ee===1/0&&W.inRange&&W.range!==1/0&&(Fr=!1),W.target&&!(Fr?W.inRange&&ee!==1/0?et/ee<W.distance/W.range:ee===1/0&&W.range!==1/0||et<W.distance:!W.inRange&&et<W.distance)||(W.target=ye,W.distance=et,W.range=ee,W.inRange=Fr,W.delta.x=he,W.delta.y=pr)}return W.inRange&&(u.x=W.target.x,u.y=W.target.y),m.closest=W,W},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},S2=ci(Ql,"snap"),hs={start:function(c){var l=c.state,u=c.edges,m=l.options;if(!u)return null;c.state={options:{targets:null,relativePoints:[{x:u.left?0:1,y:u.top?0:1}],offset:m.offset||"self",origin:{x:0,y:0},range:m.range}},l.targetFields=l.targetFields||[["width","height"],["x","y"]],Ql.start(c),l.offsets=c.state.offsets,c.state=l},set:function(c){var l=c.interaction,u=c.state,m=c.coords,g=u.options,v=u.offsets,b={x:m.x-v[0].x,y:m.y-v[0].y};u.options=q({},g),u.options.targets=[];for(var k=0,w=g.targets||[];k<w.length;k++){var M=w[k],_=void 0;if(_=$.func(M)?M(b.x,b.y,l):M){for(var z=0,j=u.targetFields;z<j.length;z++){var V=j[z],I=V[0],D=V[1];if(I in _||D in _){_.x=_[I],_.y=_[D];break}}u.options.targets.push(_)}}var K=Ql.set(c);return u.options=g,K},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},$2=ci(hs,"snapSize"),Jl={aspectRatio:y2,restrictEdges:w2,restrict:x2,restrictRect:M2,restrictSize:E2,snapEdges:ci({start:function(c){var l=c.edges;return l?(c.state.targetFields=c.state.targetFields||[[l.left?"left":"right",l.top?"top":"bottom"]],hs.start(c)):null},set:hs.set,defaults:q(ln(hs.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:S2,snapSize:$2,spring:ds,avoid:ds,transform:ds,rubberband:ds},T2={id:"modifiers",install:function(c){var l=c.interactStatic;for(var u in c.usePlugin(Vu),c.usePlugin(f2),l.modifiers=Jl,Jl){var m=Jl[u],g=m._defaults,v=m._methods;g._methods=v,c.defaults.perAction[u]=g}}},A2=T2,oh=function(c){d(u,c);var l=x(u);function u(m,g,v,b,k,w){var M;if(t(this,u),ts(f(M=l.call(this,k)),v),v!==g&&ts(f(M),g),M.timeStamp=w,M.originalEvent=v,M.type=m,M.pointerId=Jn(g),M.pointerType=yu(g),M.target=b,M.currentTarget=null,m==="tap"){var _=k.getPointerIndex(g);M.dt=M.timeStamp-k.pointers[_].downTime;var z=M.timeStamp-k.tapTime;M.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===M.target&&z<500}else m==="doubletap"&&(M.dt=g.timeStamp-k.tapTime,M.double=!0);return M}return n(u,[{key:"_subtractOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX-=g,this.pageY-=v,this.clientX-=g,this.clientY-=v,this}},{key:"_addOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX+=g,this.pageY+=v,this.clientX+=g,this.clientY+=v,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),u}(is),aa={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(c){c.pointerEvents=aa,c.defaults.actions.pointerEvents=aa.defaults,q(c.actions.phaselessTypes,aa.types)},listeners:{"interactions:new":function(c){var l=c.interaction;l.prevTap=null,l.tapTime=0},"interactions:update-pointer":function(c){var l=c.down,u=c.pointerInfo;!l&&u.hold||(u.hold={duration:1/0,timeout:null})},"interactions:move":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;c.duplicate||u.pointerIsDown&&!u.pointerWasMoved||(u.pointerIsDown&&ec(c),ui({interaction:u,pointer:m,event:g,eventTarget:v,type:"move"},l))},"interactions:down":function(c,l){(function(u,m){for(var g=u.interaction,v=u.pointer,b=u.event,k=u.eventTarget,w=u.pointerIndex,M=g.pointers[w].hold,_=ne(k),z={interaction:g,pointer:v,event:b,eventTarget:k,type:"hold",targets:[],path:_,node:null},j=0;j<_.length;j++){var V=_[j];z.node=V,m.fire("pointerEvents:collect-targets",z)}if(z.targets.length){for(var I=1/0,D=0,K=z.targets;D<K.length;D++){var B=K[D].eventable.options.holdDuration;B<I&&(I=B)}M.duration=I,M.timeout=setTimeout(function(){ui({interaction:g,eventTarget:k,pointer:v,event:b,type:"hold"},m)},I)}})(c,l),ui(c,l)},"interactions:up":function(c,l){ec(c),ui(c,l),function(u,m){var g=u.interaction,v=u.pointer,b=u.event,k=u.eventTarget;g.pointerWasMoved||ui({interaction:g,eventTarget:k,pointer:v,event:b,type:"tap"},m)}(c,l)},"interactions:cancel":function(c,l){ec(c),ui(c,l)}},PointerEvent:oh,fire:ui,collectEventTargets:ih,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function ui(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,k=c.targets,w=k===void 0?ih(c,l):k,M=new oh(b,m,g,v,u,l.now());l.fire("pointerEvents:new",{pointerEvent:M});for(var _={interaction:u,pointer:m,event:g,eventTarget:v,targets:w,type:b,pointerEvent:M},z=0;z<w.length;z++){var j=w[z];for(var V in j.props||{})M[V]=j.props[V];var I=Lo(j.eventable,j.node);if(M._subtractOrigin(I),M.eventable=j.eventable,M.currentTarget=j.node,j.eventable.fire(M),M._addOrigin(I),M.immediatePropagationStopped||M.propagationStopped&&z+1<w.length&&w[z+1].node!==M.currentTarget)break}if(l.fire("pointerEvents:fired",_),b==="tap"){var D=M.double?ui({interaction:u,pointer:m,event:g,eventTarget:v,type:"doubletap"},l):M;u.prevTap=D,u.tapTime=D.timeStamp}return M}function ih(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,k=u.getPointerIndex(m),w=u.pointers[k];if(b==="tap"&&(u.pointerWasMoved||!w||w.downTarget!==v))return[];for(var M=ne(v),_={interaction:u,pointer:m,event:g,eventTarget:v,type:b,path:M,targets:[],node:null},z=0;z<M.length;z++){var j=M[z];_.node=j,l.fire("pointerEvents:collect-targets",_)}return b==="hold"&&(_.targets=_.targets.filter(function(V){var I,D;return V.eventable.options.holdDuration===((I=u.pointers[k])==null||(D=I.hold)==null?void 0:D.duration)})),_.targets}function ec(c){var l=c.interaction,u=c.pointerIndex,m=l.pointers[u].hold;m&&m.timeout&&(clearTimeout(m.timeout),m.timeout=null)}var j2=Object.freeze({__proto__:null,default:aa});function P2(c){var l=c.interaction;l.holdIntervalHandle&&(clearInterval(l.holdIntervalHandle),l.holdIntervalHandle=null)}var O2={id:"pointer-events/holdRepeat",install:function(c){c.usePlugin(aa);var l=c.pointerEvents;l.defaults.holdRepeatInterval=0,l.types.holdrepeat=c.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(c,l){return c["pointerEvents:".concat(l)]=P2,c},{"pointerEvents:new":function(c){var l=c.pointerEvent;l.type==="hold"&&(l.count=(l.count||0)+1)},"pointerEvents:fired":function(c,l){var u=c.interaction,m=c.pointerEvent,g=c.eventTarget,v=c.targets;if(m.type==="hold"&&v.length){var b=v[0].eventable.options.holdRepeatInterval;b<=0||(u.holdIntervalHandle=setTimeout(function(){l.pointerEvents.fire({interaction:u,eventTarget:g,type:"hold",pointer:m,event:m},l)},b))}}})},H2=O2,R2={id:"pointer-events/interactableTargets",install:function(c){var l=c.Interactable;l.prototype.pointerEvents=function(m){return q(this.events.options,m),this};var u=l.prototype._backCompatOption;l.prototype._backCompatOption=function(m,g){var v=u.call(this,m,g);return v===this&&(this.events.options[m]=g),v}},listeners:{"pointerEvents:collect-targets":function(c,l){var u=c.targets,m=c.node,g=c.type,v=c.eventTarget;l.interactables.forEachMatch(m,function(b){var k=b.events,w=k.options;k.types[g]&&k.types[g].length&&b.testIgnoreAllow(w,m,v)&&u.push({node:m,eventable:k,props:{interactable:b}})})},"interactable:new":function(c){var l=c.interactable;l.events.getRect=function(u){return l.getRect(u)}},"interactable:set":function(c,l){var u=c.interactable,m=c.options;q(u.events.options,l.pointerEvents.defaults),q(u.events.options,m.pointerEvents||{})}}},I2=R2,V2={id:"pointer-events",install:function(c){c.usePlugin(j2),c.usePlugin(H2),c.usePlugin(I2)}},D2=V2,F2={id:"reflow",install:function(c){var l=c.Interactable;c.actions.phases.reflow=!0,l.prototype.reflow=function(u){return function(m,g,v){for(var b=m.getAllElements(),k=v.window.Promise,w=k?[]:null,M=function(){var z=b[_],j=m.getRect(z);if(!j)return 1;var V,I=ta(v.interactions.list,function(B){return B.interacting()&&B.interactable===m&&B.element===z&&B.prepared.name===g.name});if(I)I.move(),w&&(V=I._reflowPromise||new k(function(B){I._reflowResolve=B}));else{var D=lo(j),K=function(B){return{coords:B,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:D.x,y:D.y},client:{x:D.x,y:D.y},timeStamp:v.now()});V=function(B,W,ce,ye,ee){var he=B.interactions.new({pointerType:"reflow"}),pr={interaction:he,event:ee,pointer:ee,eventTarget:ce,phase:"reflow"};he.interactable=W,he.element=ce,he.prevEvent=ee,he.updatePointer(ee,ee,ce,!0),fu(he.coords.delta),Ll(he.prepared,ye),he._doPhase(pr);var et=B.window,Fr=et.Promise,uo=Fr?new Fr(function(Ko){he._reflowResolve=Ko}):void 0;return he._reflowPromise=uo,he.start(ye,W,ce),he._interacting?(he.move(pr),he.end(ee)):(he.stop(),he._reflowResolve()),he.removePointer(ee,ee),uo}(v,m,z,g,K)}w&&w.push(V)},_=0;_<b.length&&!M();_++);return w&&k.all(w).then(function(){return m})}(this,u,c)}},listeners:{"interactions:stop":function(c,l){var u=c.interaction;u.pointerType==="reflow"&&(u._reflowResolve&&u._reflowResolve(),function(m,g){m.splice(m.indexOf(g),1)}(l.interactions.list,u))}}},N2=F2;if(hr.use(Iu),hr.use(Bu),hr.use(D2),hr.use(i2),hr.use(A2),hr.use(W0),hr.use(H0),hr.use(I0),hr.use(N2),hr.default=hr,(typeof Ni>"u"?"undefined":e(Ni))==="object"&&Ni)try{Ni.exports=hr}catch{}return hr.default=hr,hr})});import{css as dg,html as un,LitElement as ug,nothing as Yh}from"lit";import{customElement as hg,property as Ao,state as zs}from"lit/decorators.js";import{css as dh}from"lit";var A=dh`
|
|
1
|
+
var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDescriptor;var B2=Object.getOwnPropertyNames;var q2=Object.getPrototypeOf,K2=Object.prototype.hasOwnProperty;var ah=i=>{throw TypeError(i)};var tc=(i,o)=>()=>(i&&(o=i(i=0)),o);var W2=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),U2=(i,o)=>{for(var e in o)ms(i,e,{get:o[e],enumerable:!0})},G2=(i,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of B2(o))!K2.call(i,r)&&r!==e&&ms(i,r,{get:()=>o[r],enumerable:!(t=nh(o,r))||t.enumerable});return i};var la=(i,o,e)=>(e=i!=null?L2(q2(i)):{},G2(o||!i||!i.__esModule?ms(e,"default",{value:i,enumerable:!0}):e,i));var a=(i,o,e,t)=>{for(var r=t>1?void 0:t?nh(o,e):o,n=i.length-1,s;n>=0;n--)(s=i[n])&&(r=(t?s(o,e,r):s(r))||r);return t&&r&&ms(o,e,r),r};var sh=(i,o,e)=>o.has(i)||ah("Cannot "+e);var ve=(i,o,e)=>(sh(i,o,"read from private field"),e?e.call(i):o.get(i)),lh=(i,o,e)=>o.has(i)?ah("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,e),ch=(i,o,e,t)=>(sh(i,o,"write to private field"),t?t.call(i,e):o.set(i,e),e);var Ca,bp=tc(()=>{Ca=class{constructor(o){this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,o?.roundAverageSize===!0&&(this._roundAverageSize=!0)}set(o,e){let t=this._map.get(o)||0;this._map.set(o,e),this.totalSize+=e-t}get averageSize(){if(this._map.size>0){let o=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(o):o}return 0}getSize(o){return this._map.get(o)}clear(){this._map.clear(),this.totalSize=0}}});function $c(i){return i==="horizontal"?"width":"height"}var Fs,kp=tc(()=>{Fs=class{_getDefaultConfig(){return{direction:"vertical"}}constructor(o,e){this._latestCoords={left:0,top:0},this._direction=null,this._viewportSize={width:0,height:0},this.totalScrollSize={width:0,height:0},this.offsetWithinScroller={left:0,top:0},this._pendingReflow=!1,this._pendingLayoutUpdate=!1,this._pin=null,this._firstVisible=0,this._lastVisible=0,this._physicalMin=0,this._physicalMax=0,this._first=-1,this._last=-1,this._sizeDim="height",this._secondarySizeDim="width",this._positionDim="top",this._secondaryPositionDim="left",this._scrollPosition=0,this._scrollError=0,this._items=[],this._scrollSize=1,this._overhang=1e3,this._hostSink=o,Promise.resolve().then(()=>this.config=e||this._getDefaultConfig())}set config(o){Object.assign(this,Object.assign({},this._getDefaultConfig(),o))}get config(){return{direction:this.direction}}get items(){return this._items}set items(o){this._setItems(o)}_setItems(o){o!==this._items&&(this._items=o,this._scheduleReflow())}get direction(){return this._direction}set direction(o){o=o==="horizontal"?o:"vertical",o!==this._direction&&(this._direction=o,this._sizeDim=o==="horizontal"?"width":"height",this._secondarySizeDim=o==="horizontal"?"height":"width",this._positionDim=o==="horizontal"?"left":"top",this._secondaryPositionDim=o==="horizontal"?"top":"left",this._triggerReflow())}get viewportSize(){return this._viewportSize}set viewportSize(o){let{_viewDim1:e,_viewDim2:t}=this;Object.assign(this._viewportSize,o),t!==this._viewDim2?this._scheduleLayoutUpdate():e!==this._viewDim1&&this._checkThresholds()}get viewportScroll(){return this._latestCoords}set viewportScroll(o){Object.assign(this._latestCoords,o);let e=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim],Math.abs(e-this._scrollPosition)>=1&&this._checkThresholds()}reflowIfNeeded(o=!1){(o||this._pendingReflow)&&(this._pendingReflow=!1,this._reflow())}set pin(o){this._pin=o,this._triggerReflow()}get pin(){if(this._pin!==null){let{index:o,block:e}=this._pin;return{index:Math.max(0,Math.min(o,this.items.length-1)),block:e}}return null}_clampScrollPosition(o){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(o,this.totalScrollSize[$c(this.direction)]-this._viewDim1))}unpin(){this._pin!==null&&(this._sendUnpinnedMessage(),this._pin=null)}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=!0}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=!0,this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate(),Promise.resolve().then(()=>this.reflowIfNeeded())}_reflow(){this._pendingLayoutUpdate&&(this._updateLayout(),this._pendingLayoutUpdate=!1),this._updateScrollSize(),this._setPositionFromPin(),this._getActiveItems(),this._updateVisibleIndices(),this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){let o=this._scrollPosition,{index:e,block:t}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:e,block:t||"start"})-this.offsetWithinScroller[this._positionDim],this._scrollError=o-this._scrollPosition}}_calculateScrollIntoViewPosition(o){let{block:e}=o,t=Math.min(this.items.length,Math.max(0,o.index)),r=this._getItemPosition(t)[this._positionDim],n=r;if(e!=="start"){let s=this._getItemSize(t)[this._sizeDim];if(e==="center")n=r-.5*this._viewDim1+.5*s;else{let d=r-this._viewDim1+s;if(e==="end")n=d;else{let h=this._scrollPosition;n=Math.abs(h-r)<Math.abs(h-d)?r:d}}}return n+=this.offsetWithinScroller[this._positionDim],this._clampScrollPosition(n)}getScrollIntoViewCoordinates(o){return{[this._positionDim]:this._calculateScrollIntoViewPosition(o)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){let o=new Map;if(this._first!==-1&&this._last!==-1)for(let t=this._first;t<=this._last;t++)o.set(t,this._getItemPosition(t));let e={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:o};this._scrollError&&(e.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0},this._scrollError=0),this._hostSink(e)}get _num(){return this._first===-1||this._last===-1?0:this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null)this._scheduleReflow();else{let o=Math.max(0,this._scrollPosition-this._overhang),e=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);this._physicalMin>o||this._physicalMax<e?this._scheduleReflow():this._updateVisibleIndices({emit:!0})}}_updateVisibleIndices(o){if(this._first===-1||this._last===-1)return;let e=this._first;for(;e<this._last&&Math.round(this._getItemPosition(e)[this._positionDim]+this._getItemSize(e)[this._sizeDim])<=Math.round(this._scrollPosition);)e++;let t=this._last;for(;t>this._first&&Math.round(this._getItemPosition(t)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1);)t--;(e!==this._firstVisible||t!==this._lastVisible)&&(this._firstVisible=e,this._lastVisible=t,o&&o.emit&&this._sendVisibilityChangedMessage())}}});var xp={};U2(xp,{FlowLayout:()=>Ns,flow:()=>vf});function yp(i){return i==="horizontal"?"marginLeft":"marginTop"}function bf(i){return i==="horizontal"?"marginRight":"marginBottom"}function kf(i){return i==="horizontal"?"xOffset":"yOffset"}function yf(i,o){let e=[i,o].sort();return e[1]<=0?Math.min(...e):e[0]>=0?Math.max(...e):e[0]+e[1]}var vf,Tc,Ns,wp=tc(()=>{bp();kp();vf=i=>Object.assign({type:Ns},i);Tc=class{constructor(){this._childSizeCache=new Ca,this._marginSizeCache=new Ca,this._metricsCache=new Map}update(o,e){let t=new Set;Object.keys(o).forEach(r=>{let n=Number(r);this._metricsCache.set(n,o[n]),this._childSizeCache.set(n,o[n][$c(e)]),t.add(n),t.add(n+1)});for(let r of t){let n=this._metricsCache.get(r)?.[yp(e)]||0,s=this._metricsCache.get(r-1)?.[bf(e)]||0;this._marginSizeCache.set(r,yf(n,s))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(o,e){return this._metricsCache.get(o)?.[yp(e)]||0}getChildSize(o){return this._childSizeCache.getSize(o)}getMarginSize(o){return this._marginSizeCache.getSize(o)}clear(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}},Ns=class extends Fs{constructor(){super(...arguments),this._itemSize={width:100,height:100},this._physicalItems=new Map,this._newPhysicalItems=new Map,this._metricsCache=new Tc,this._anchorIdx=null,this._anchorPos=null,this._stable=!0,this._measureChildren=!0,this._estimate=!0}get measureChildren(){return this._measureChildren}updateItemSizes(o){this._metricsCache.update(o,this.direction),this._scheduleReflow()}_getPhysicalItem(o){return this._newPhysicalItems.get(o)??this._physicalItems.get(o)}_getSize(o){return this._getPhysicalItem(o)&&this._metricsCache.getChildSize(o)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(o){let e=this._metricsCache;if(this._first===-1||this._last===-1)return e.averageMarginSize+o*(e.averageMarginSize+this._getAverageSize());if(o<this._first){let t=this._first-o;return this._getPhysicalItem(this._first).pos-(e.getMarginSize(this._first-1)||e.averageMarginSize)-(t*e.averageChildSize+(t-1)*e.averageMarginSize)}else{let t=o-this._last;return this._getPhysicalItem(this._last).pos+(e.getChildSize(this._last)||e.averageChildSize)+(e.getMarginSize(this._last)||e.averageMarginSize)+t*(e.averageChildSize+e.averageMarginSize)}}_getPosition(o){let e=this._getPhysicalItem(o),{averageMarginSize:t}=this._metricsCache;return o===0?this._metricsCache.getMarginSize(0)??t:e?e.pos:this._estimatePosition(o)}_calculateAnchor(o,e){return o<=0?0:e>this._scrollSize-this._viewDim1?this.items.length-1:Math.max(0,Math.min(this.items.length-1,Math.floor((o+e)/2/this._delta)))}_getAnchor(o,e){if(this._physicalItems.size===0)return this._calculateAnchor(o,e);if(this._first<0)return this._calculateAnchor(o,e);if(this._last<0)return this._calculateAnchor(o,e);let t=this._getPhysicalItem(this._first),r=this._getPhysicalItem(this._last),n=t.pos;if(r.pos+this._metricsCache.getChildSize(this._last)<o)return this._calculateAnchor(o,e);if(n>e)return this._calculateAnchor(o,e);let h=this._firstVisible-1,p=-1/0;for(;p<o;)p=this._getPhysicalItem(++h).pos+this._metricsCache.getChildSize(h);return h}_getActiveItems(){this._viewDim1===0||this.items.length===0?this._clearItems():this._getItems()}_clearItems(){this._first=-1,this._last=-1,this._physicalMin=0,this._physicalMax=0;let o=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o,this._stable=!0}_getItems(){let o=this._newPhysicalItems;this._stable=!0;let e,t;if(this.pin!==null){let{index:p}=this.pin;this._anchorIdx=p,this._anchorPos=this._getPosition(p)}if(e=this._scrollPosition-this._overhang,t=this._scrollPosition+this._viewDim1+this._overhang,t<0||e>this._scrollSize){this._clearItems();return}(this._anchorIdx===null||this._anchorPos===null)&&(this._anchorIdx=this._getAnchor(e,t),this._anchorPos=this._getPosition(this._anchorIdx));let r=this._getSize(this._anchorIdx);r===void 0&&(this._stable=!1,r=this._getAverageSize());let n=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize,s=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;this._anchorIdx===0&&(this._anchorPos=n),this._anchorIdx===this.items.length-1&&(this._anchorPos=this._scrollSize-s-r);let d=0;for(this._anchorPos+r+s<e&&(d=e-(this._anchorPos+r+s)),this._anchorPos-n>t&&(d=t-(this._anchorPos-n)),d&&(this._scrollPosition-=d,e-=d,t-=d,this._scrollError+=d),o.set(this._anchorIdx,{pos:this._anchorPos,size:r}),this._first=this._last=this._anchorIdx,this._physicalMin=this._anchorPos-n,this._physicalMax=this._anchorPos+r+s;this._physicalMin>e&&this._first>0;){let p=this._getSize(--this._first);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._first);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize),this._physicalMin-=p;let x=this._physicalMin;if(o.set(this._first,{pos:x,size:p}),this._physicalMin-=f,this._stable===!1&&this._estimate===!1)break}for(;this._physicalMax<t&&this._last<this.items.length-1;){let p=this._getSize(++this._last);p===void 0&&(this._stable=!1,p=this._getAverageSize());let f=this._metricsCache.getMarginSize(this._last);f===void 0&&(this._stable=!1,f=this._metricsCache.averageMarginSize);let x=this._physicalMax;if(o.set(this._last,{pos:x,size:p}),this._physicalMax+=p+f,!this._stable&&!this._estimate)break}let h=this._calculateError();h&&(this._physicalMin-=h,this._physicalMax-=h,this._anchorPos-=h,this._scrollPosition-=h,o.forEach(p=>p.pos-=h),this._scrollError+=h),this._stable&&(this._newPhysicalItems=this._physicalItems,this._newPhysicalItems.clear(),this._physicalItems=o)}_calculateError(){return this._first===0?this._physicalMin:this._physicalMin<=0?this._physicalMin-this._first*this._delta:this._last===this.items.length-1?this._physicalMax-this._scrollSize:this._physicalMax>=this._scrollSize?this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta:0}_reflow(){let{_first:o,_last:e}=this;super._reflow(),(this._first===-1&&this._last==-1||this._first===o&&this._last===e)&&this._resetReflowState()}_resetReflowState(){this._anchorIdx=null,this._anchorPos=null,this._stable=!0}_updateScrollSize(){let{averageMarginSize:o}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(o+this._getAverageSize())+o)}get _delta(){let{averageMarginSize:o}=this._metricsCache;return this._getAverageSize()+o}_getItemPosition(o){return{[this._positionDim]:this._getPosition(o),[this._secondaryPositionDim]:0,[kf(this.direction)]:-(this._metricsCache.getLeadingMarginValue(o,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(o){return{[this._sizeDim]:this._getSize(o)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear(),this._scheduleReflow()}}});var xn=W2((Ic,Ni)=>{(function(i,o){typeof Ic=="object"&&typeof Ni<"u"?Ni.exports=o():typeof define=="function"&&define.amd?define(o):(i=typeof globalThis<"u"?globalThis:i||self).interact=o()})(Ic,function(){"use strict";function i(c,l){var u=Object.keys(c);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(c);l&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(c,g).enumerable})),u.push.apply(u,m)}return u}function o(c){for(var l=1;l<arguments.length;l++){var u=arguments[l]!=null?arguments[l]:{};l%2?i(Object(u),!0).forEach(function(m){s(c,m,u[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(u)):i(Object(u)).forEach(function(m){Object.defineProperty(c,m,Object.getOwnPropertyDescriptor(u,m))})}return c}function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},e(c)}function t(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function r(c,l){for(var u=0;u<l.length;u++){var m=l[u];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(c,C(m.key),m)}}function n(c,l,u){return l&&r(c.prototype,l),u&&r(c,u),Object.defineProperty(c,"prototype",{writable:!1}),c}function s(c,l,u){return(l=C(l))in c?Object.defineProperty(c,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[l]=u,c}function d(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&p(c,l)}function h(c){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},h(c)}function p(c,l){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,m){return u.__proto__=m,u},p(c,l)}function f(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function x(c){var l=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var u,m=h(c);if(l){var g=h(this).constructor;u=Reflect.construct(m,arguments,g)}else u=m.apply(this,arguments);return function(v,b){if(b&&(typeof b=="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(v)}(this,u)}}function y(){return y=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,l,u){var m=function(v,b){for(;!Object.prototype.hasOwnProperty.call(v,b)&&(v=h(v))!==null;);return v}(c,l);if(m){var g=Object.getOwnPropertyDescriptor(m,l);return g.get?g.get.call(arguments.length<3?c:u):g.value}},y.apply(this,arguments)}function C(c){var l=function(u,m){if(typeof u!="object"||u===null)return u;var g=u[Symbol.toPrimitive];if(g!==void 0){var v=g.call(u,m||"default");if(typeof v!="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(u)}(c,"string");return typeof l=="symbol"?l:l+""}var S=function(c){return!(!c||!c.Window)&&c instanceof c.Window},E=void 0,T=void 0;function O(c){E=c;var l=c.document.createTextNode("");l.ownerDocument!==c.document&&typeof c.wrap=="function"&&c.wrap(l)===l&&(c=c.wrap(c)),T=c}function H(c){return S(c)?c:(c.ownerDocument||c).defaultView||T.window}typeof window<"u"&&window&&O(window);var R=function(c){return!!c&&e(c)==="object"},N=function(c){return typeof c=="function"},$={window:function(c){return c===T||S(c)},docFrag:function(c){return R(c)&&c.nodeType===11},object:R,func:N,number:function(c){return typeof c=="number"},bool:function(c){return typeof c=="boolean"},string:function(c){return typeof c=="string"},element:function(c){if(!c||e(c)!=="object")return!1;var l=H(c)||T;return/object|function/.test(typeof Element>"u"?"undefined":e(Element))?c instanceof Element||c instanceof l.Element:c.nodeType===1&&typeof c.nodeName=="string"},plainObject:function(c){return R(c)&&!!c.constructor&&/function Object\b/.test(c.constructor.toString())},array:function(c){return R(c)&&c.length!==void 0&&N(c.splice)}};function Y(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.prepared.axis;u==="x"?(l.coords.cur.page.y=l.coords.start.page.y,l.coords.cur.client.y=l.coords.start.client.y,l.coords.velocity.client.y=0,l.coords.velocity.page.y=0):u==="y"&&(l.coords.cur.page.x=l.coords.start.page.x,l.coords.cur.client.x=l.coords.start.client.x,l.coords.velocity.client.x=0,l.coords.velocity.page.x=0)}}function fe(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="drag"){var m=u.prepared.axis;if(m==="x"||m==="y"){var g=m==="x"?"y":"x";l.page[g]=u.coords.start.page[g],l.client[g]=u.coords.start.client[g],l.delta[g]=0}}}var $e={id:"actions/drag",install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.draggable=$e.draggable,l.map.drag=$e,l.methodDict.drag="draggable",m.actions.drag=$e.defaults},listeners:{"interactions:before-action-move":Y,"interactions:action-resume":Y,"interactions:action-move":fe,"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.buttons,g=u.options.drag;if(g&&g.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||m&u.options.drag.mouseButtons))return c.action={name:"drag",axis:g.lockAxis==="start"?g.startAxis:g.lockAxis},!1}},draggable:function(c){return $.object(c)?(this.options.drag.enabled=c.enabled!==!1,this.setPerAction("drag",c),this.setOnEvents("drag",c),/^(xy|x|y|start)$/.test(c.lockAxis)&&(this.options.drag.lockAxis=c.lockAxis),/^(xy|x|y)$/.test(c.startAxis)&&(this.options.drag.startAxis=c.startAxis),this):$.bool(c)?(this.options.drag.enabled=c,this):this.options.drag},beforeMove:Y,move:fe,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(c){return c.search("drag")===0}},Je=$e,we={init:function(c){var l=c;we.document=l.document,we.DocumentFragment=l.DocumentFragment||no,we.SVGElement=l.SVGElement||no,we.SVGSVGElement=l.SVGSVGElement||no,we.SVGElementInstance=l.SVGElementInstance||no,we.Element=l.Element||no,we.HTMLElement=l.HTMLElement||we.Element,we.Event=l.Event,we.Touch=l.Touch||no,we.PointerEvent=l.PointerEvent||l.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function no(){}var De=we,Xt={init:function(c){var l=De.Element,u=c.navigator||{};Xt.supportsTouch="ontouchstart"in c||$.func(c.DocumentTouch)&&De.document instanceof c.DocumentTouch,Xt.supportsPointerEvent=u.pointerEnabled!==!1&&!!De.PointerEvent,Xt.isIOS=/iP(hone|od|ad)/.test(u.platform),Xt.isIOS7=/iP(hone|od|ad)/.test(u.platform)&&/OS 7[^\d]/.test(u.appVersion),Xt.isIe9=/MSIE 9/.test(u.userAgent),Xt.isOperaMobile=u.appName==="Opera"&&Xt.supportsTouch&&/Presto/.test(u.userAgent),Xt.prefixedMatchesSelector="matches"in l.prototype?"matches":"webkitMatchesSelector"in l.prototype?"webkitMatchesSelector":"mozMatchesSelector"in l.prototype?"mozMatchesSelector":"oMatchesSelector"in l.prototype?"oMatchesSelector":"msMatchesSelector",Xt.pEventTypes=Xt.supportsPointerEvent?De.PointerEvent===c.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,Xt.wheelEvent=De.document&&"onmousewheel"in De.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},hr=Xt;function ao(c,l){if(c.contains)return c.contains(l);for(;l;){if(l===c)return!0;l=l.parentNode}return!1}function nn(c,l){for(;$.element(c);){if(To(c,l))return c;c=Yr(c)}return null}function Yr(c){var l=c.parentNode;if($.docFrag(l)){for(;(l=l.host)&&$.docFrag(l););return l}return l}function To(c,l){return T!==E&&(l=l.replace(/\/deep\//g," ")),c[hr.prefixedMatchesSelector](l)}var L=function(c){return c.parentNode||c.host};function X(c,l){for(var u,m=[],g=c;(u=L(g))&&g!==l&&u!==g.ownerDocument;)m.unshift(g),g=u;return m}function ue(c,l,u){for(;$.element(c);){if(To(c,l))return!0;if((c=Yr(c))===u)return To(c,l)}return!1}function je(c){return c.correspondingUseElement||c}function U(c){var l=c instanceof De.SVGElement?c.getBoundingClientRect():c.getClientRects()[0];return l&&{left:l.left,right:l.right,top:l.top,bottom:l.bottom,width:l.width||l.right-l.left,height:l.height||l.bottom-l.top}}function _e(c){var l,u=U(c);if(!hr.isIOS7&&u){var m={x:(l=(l=H(c))||T).scrollX||l.document.documentElement.scrollLeft,y:l.scrollY||l.document.documentElement.scrollTop};u.left+=m.x,u.right+=m.x,u.top+=m.y,u.bottom+=m.y}return u}function ne(c){for(var l=[];c;)l.push(c),c=Yr(c);return l}function $r(c){return!!$.string(c)&&(De.document.querySelector(c),!0)}function q(c,l){for(var u in l)c[u]=l[u];return c}function ai(c,l,u){return c==="parent"?Yr(u):c==="self"?l.getRect(u):nn(u,c)}function so(c,l,u,m){var g=c;return $.string(g)?g=ai(g,l,u):$.func(g)&&(g=g.apply(void 0,m)),$.element(g)&&(g=_e(g)),g}function Xr(c){return c&&{x:"x"in c?c.x:c.left,y:"y"in c?c.y:c.top}}function lo(c){return!c||"x"in c&&"y"in c||((c=q({},c)).x=c.left||0,c.y=c.top||0,c.width=c.width||(c.right||0)-c.x,c.height=c.height||(c.bottom||0)-c.y),c}function si(c,l,u){c.left&&(l.left+=u.x),c.right&&(l.right+=u.x),c.top&&(l.top+=u.y),c.bottom&&(l.bottom+=u.y),l.width=l.right-l.left,l.height=l.bottom-l.top}function Lo(c,l,u){var m=u&&c.options[u];return Xr(so(m&&m.origin||c.options.origin,c,l,[c&&l]))||{x:0,y:0}}function co(c,l){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(w){return!0},m=arguments.length>3?arguments[3]:void 0;if(m=m||{},$.string(c)&&c.search(" ")!==-1&&(c=an(c)),$.array(c))return c.forEach(function(w){return co(w,l,u,m)}),m;if($.object(c)&&(l=c,c=""),$.func(l)&&u(c))m[c]=m[c]||[],m[c].push(l);else if($.array(l))for(var g=0,v=l;g<v.length;g++){var b=v[g];co(c,b,u,m)}else if($.object(l))for(var k in l)co(an(k).map(function(w){return"".concat(c).concat(w)}),l[k],u,m);return m}function an(c){return c.trim().split(/ +/)}var Qn=function(c,l){return Math.sqrt(c*c+l*l)},$0=["webkit","moz"];function ts(c,l){c.__set||(c.__set={});var u=function(g){if($0.some(function(v){return g.indexOf(v)===0}))return 1;typeof c[g]!="function"&&g!=="__set"&&Object.defineProperty(c,g,{get:function(){return g in c.__set?c.__set[g]:c.__set[g]=l[g]},set:function(v){c.__set[g]=v},configurable:!0})};for(var m in l)u(m);return c}function rs(c,l){c.page=c.page||{},c.page.x=l.page.x,c.page.y=l.page.y,c.client=c.client||{},c.client.x=l.client.x,c.client.y=l.client.y,c.timeStamp=l.timeStamp}function fu(c){c.page.x=0,c.page.y=0,c.client.x=0,c.client.y=0}function vu(c){return c instanceof De.Event||c instanceof De.Touch}function os(c,l,u){return c=c||"page",(u=u||{}).x=l[c+"X"],u.y=l[c+"Y"],u}function bu(c,l){return l=l||{x:0,y:0},hr.isOperaMobile&&vu(c)?(os("screen",c,l),l.x+=window.scrollX,l.y+=window.scrollY):os("page",c,l),l}function Jn(c){return $.number(c.pointerId)?c.pointerId:c.identifier}function T0(c,l,u){var m=l.length>1?ku(l):l[0];bu(m,c.page),function(g,v){v=v||{},hr.isOperaMobile&&vu(g)?os("screen",g,v):os("client",g,v)}(m,c.client),c.timeStamp=u}function Pl(c){var l=[];return $.array(c)?(l[0]=c[0],l[1]=c[1]):c.type==="touchend"?c.touches.length===1?(l[0]=c.touches[0],l[1]=c.changedTouches[0]):c.touches.length===0&&(l[0]=c.changedTouches[0],l[1]=c.changedTouches[1]):(l[0]=c.touches[0],l[1]=c.touches[1]),l}function ku(c){for(var l={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},u=0;u<c.length;u++){var m=c[u];for(var g in l)l[g]+=m[g]}for(var v in l)l[v]/=c.length;return l}function Ol(c){if(!c.length)return null;var l=Pl(c),u=Math.min(l[0].pageX,l[1].pageX),m=Math.min(l[0].pageY,l[1].pageY),g=Math.max(l[0].pageX,l[1].pageX),v=Math.max(l[0].pageY,l[1].pageY);return{x:u,y:m,left:u,top:m,right:g,bottom:v,width:g-u,height:v-m}}function Hl(c,l){var u=l+"X",m=l+"Y",g=Pl(c),v=g[0][u]-g[1][u],b=g[0][m]-g[1][m];return Qn(v,b)}function Rl(c,l){var u=l+"X",m=l+"Y",g=Pl(c),v=g[1][u]-g[0][u],b=g[1][m]-g[0][m];return 180*Math.atan2(b,v)/Math.PI}function yu(c){return $.string(c.pointerType)?c.pointerType:$.number(c.pointerType)?[void 0,void 0,"touch","pen","mouse"][c.pointerType]:/touch/.test(c.type||"")||c instanceof De.Touch?"touch":"mouse"}function xu(c){var l=$.func(c.composedPath)?c.composedPath():c.path;return[je(l?l[0]:c.target),je(c.currentTarget)]}var is=function(){function c(l){t(this,c),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=l}return n(c,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),c}();Object.defineProperty(is.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var wu=function(c,l){for(var u=0;u<l.length;u++){var m=l[u];c.push(m)}return c},_u=function(c){return wu([],c)},ea=function(c,l){for(var u=0;u<c.length;u++)if(l(c[u],u,c))return u;return-1},ta=function(c,l){return c[ea(c,l)]},sn=function(c){d(u,c);var l=x(u);function u(m,g,v){var b;t(this,u),(b=l.call(this,g._interaction)).dropzone=void 0,b.dragEvent=void 0,b.relatedTarget=void 0,b.draggable=void 0,b.propagationStopped=!1,b.immediatePropagationStopped=!1;var k=v==="dragleave"?m.prev:m.cur,w=k.element,M=k.dropzone;return b.type=v,b.target=w,b.currentTarget=w,b.dropzone=M,b.dragEvent=g,b.relatedTarget=g.target,b.draggable=g.interactable,b.timeStamp=g.timeStamp,b}return n(u,[{key:"reject",value:function(){var m=this,g=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&g.cur.dropzone===this.dropzone&&g.cur.element===this.target)if(g.prev.dropzone=this.dropzone,g.prev.element=this.target,g.rejected=!0,g.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var v=g.activeDrops,b=ea(v,function(w){var M=w.dropzone,_=w.element;return M===m.dropzone&&_===m.target});g.activeDrops.splice(b,1);var k=new u(g,this.dragEvent,"dropdeactivate");k.dropzone=this.dropzone,k.target=this.target,this.dropzone.fire(k)}else this.dropzone.fire(new u(g,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),u}(is);function Mu(c,l){for(var u=0,m=c.slice();u<m.length;u++){var g=m[u],v=g.dropzone,b=g.element;l.dropzone=v,l.target=b,v.fire(l),l.propagationStopped=l.immediatePropagationStopped=!1}}function Il(c,l){for(var u=function(v,b){for(var k=[],w=0,M=v.interactables.list;w<M.length;w++){var _=M[w];if(_.options.drop.enabled){var z=_.options.drop.accept;if(!($.element(z)&&z!==b||$.string(z)&&!To(b,z)||$.func(z)&&!z({dropzone:_,draggableElement:b})))for(var j=0,V=_.getAllElements();j<V.length;j++){var I=V[j];I!==b&&k.push({dropzone:_,element:I,rect:_.getRect(I)})}}}return k}(c,l),m=0;m<u.length;m++){var g=u[m];g.rect=g.dropzone.getRect(g.element)}return u}function Cu(c,l,u){for(var m=c.dropState,g=c.interactable,v=c.element,b=[],k=0,w=m.activeDrops;k<w.length;k++){var M=w[k],_=M.dropzone,z=M.element,j=M.rect,V=_.dropCheck(l,u,g,v,z,j);b.push(V?z:null)}var I=function(D){for(var K,B,W,ce=[],ye=0;ye<D.length;ye++){var ee=D[ye],he=D[K];if(ee&&ye!==K)if(he){var mr=L(ee),et=L(he);if(mr!==ee.ownerDocument)if(et!==ee.ownerDocument)if(mr!==et){ce=ce.length?ce:X(he);var Nr=void 0;if(he instanceof De.HTMLElement&&ee instanceof De.SVGElement&&!(ee instanceof De.SVGSVGElement)){if(ee===et)continue;Nr=ee.ownerSVGElement}else Nr=ee;for(var uo=X(Nr,he.ownerDocument),Ko=0;uo[Ko]&&uo[Ko]===ce[Ko];)Ko++;var ps=[uo[Ko-1],uo[Ko],ce[Ko]];if(ps[0])for(var sa=ps[0].lastChild;sa;){if(sa===ps[1]){K=ye,ce=uo;break}if(sa===ps[2])break;sa=sa.previousSibling}}else W=he,(parseInt(H(B=ee).getComputedStyle(B).zIndex,10)||0)>=(parseInt(H(W).getComputedStyle(W).zIndex,10)||0)&&(K=ye);else K=ye}else K=ye}return K}(b);return m.activeDrops[I]||null}function Vl(c,l,u){var m=c.dropState,g={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return u.type==="dragstart"&&(g.activate=new sn(m,u,"dropactivate"),g.activate.target=null,g.activate.dropzone=null),u.type==="dragend"&&(g.deactivate=new sn(m,u,"dropdeactivate"),g.deactivate.target=null,g.deactivate.dropzone=null),m.rejected||(m.cur.element!==m.prev.element&&(m.prev.dropzone&&(g.leave=new sn(m,u,"dragleave"),u.dragLeave=g.leave.target=m.prev.element,u.prevDropzone=g.leave.dropzone=m.prev.dropzone),m.cur.dropzone&&(g.enter=new sn(m,u,"dragenter"),u.dragEnter=m.cur.element,u.dropzone=m.cur.dropzone)),u.type==="dragend"&&m.cur.dropzone&&(g.drop=new sn(m,u,"drop"),u.dropzone=m.cur.dropzone,u.relatedTarget=m.cur.element),u.type==="dragmove"&&m.cur.dropzone&&(g.move=new sn(m,u,"dropmove"),u.dropzone=m.cur.dropzone)),g}function Dl(c,l){var u=c.dropState,m=u.activeDrops,g=u.cur,v=u.prev;l.leave&&v.dropzone.fire(l.leave),l.enter&&g.dropzone.fire(l.enter),l.move&&g.dropzone.fire(l.move),l.drop&&g.dropzone.fire(l.drop),l.deactivate&&Mu(m,l.deactivate),u.prev.dropzone=g.dropzone,u.prev.element=g.element}function zu(c,l){var u=c.interaction,m=c.iEvent,g=c.event;if(m.type==="dragmove"||m.type==="dragend"){var v=u.dropState;l.dynamicDrop&&(v.activeDrops=Il(l,u.element));var b=m,k=Cu(u,b,g);v.rejected=v.rejected&&!!k&&k.dropzone===v.cur.dropzone&&k.element===v.cur.element,v.cur.dropzone=k&&k.dropzone,v.cur.element=k&&k.element,v.events=Vl(u,0,b)}}var Eu={id:"actions/drop",install:function(c){var l=c.actions,u=c.interactStatic,m=c.Interactable,g=c.defaults;c.usePlugin(Je),m.prototype.dropzone=function(v){return function(b,k){if($.object(k)){if(b.options.drop.enabled=k.enabled!==!1,k.listeners){var w=co(k.listeners),M=Object.keys(w).reduce(function(z,j){return z[/^(enter|leave)/.test(j)?"drag".concat(j):/^(activate|deactivate|move)/.test(j)?"drop".concat(j):j]=w[j],z},{}),_=b.options.drop.listeners;_&&b.off(_),b.on(M),b.options.drop.listeners=M}return $.func(k.ondrop)&&b.on("drop",k.ondrop),$.func(k.ondropactivate)&&b.on("dropactivate",k.ondropactivate),$.func(k.ondropdeactivate)&&b.on("dropdeactivate",k.ondropdeactivate),$.func(k.ondragenter)&&b.on("dragenter",k.ondragenter),$.func(k.ondragleave)&&b.on("dragleave",k.ondragleave),$.func(k.ondropmove)&&b.on("dropmove",k.ondropmove),/^(pointer|center)$/.test(k.overlap)?b.options.drop.overlap=k.overlap:$.number(k.overlap)&&(b.options.drop.overlap=Math.max(Math.min(1,k.overlap),0)),"accept"in k&&(b.options.drop.accept=k.accept),"checker"in k&&(b.options.drop.checker=k.checker),b}return $.bool(k)?(b.options.drop.enabled=k,b):b.options.drop}(this,v)},m.prototype.dropCheck=function(v,b,k,w,M,_){return function(z,j,V,I,D,K,B){var W=!1;if(!(B=B||z.getRect(K)))return!!z.options.drop.checker&&z.options.drop.checker(j,V,W,z,K,I,D);var ce=z.options.drop.overlap;if(ce==="pointer"){var ye=Lo(I,D,"drag"),ee=bu(j);ee.x+=ye.x,ee.y+=ye.y;var he=ee.x>B.left&&ee.x<B.right,mr=ee.y>B.top&&ee.y<B.bottom;W=he&&mr}var et=I.getRect(D);if(et&&ce==="center"){var Nr=et.left+et.width/2,uo=et.top+et.height/2;W=Nr>=B.left&&Nr<=B.right&&uo>=B.top&&uo<=B.bottom}return et&&$.number(ce)&&(W=Math.max(0,Math.min(B.right,et.right)-Math.max(B.left,et.left))*Math.max(0,Math.min(B.bottom,et.bottom)-Math.max(B.top,et.top))/(et.width*et.height)>=ce),z.options.drop.checker&&(W=z.options.drop.checker(j,V,W,z,K,I,D)),W}(this,v,b,k,w,M,_)},u.dynamicDrop=function(v){return $.bool(v)?(c.dynamicDrop=v,u):c.dynamicDrop},q(l.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),l.methodDict.drop="dropzone",c.dynamicDrop=!1,g.actions.drop=Eu.defaults},listeners:{"interactions:before-action-start":function(c){var l=c.interaction;l.prepared.name==="drag"&&(l.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(c,l){var u=c.interaction,m=(c.event,c.iEvent);if(u.prepared.name==="drag"){var g=u.dropState;g.activeDrops=[],g.events={},g.activeDrops=Il(l,u.element),g.events=Vl(u,0,m),g.events.activate&&(Mu(g.activeDrops,g.events.activate),l.fire("actions/drop:start",{interaction:u,dragEvent:m}))}},"interactions:action-move":zu,"interactions:after-action-move":function(c,l){var u=c.interaction,m=c.iEvent;if(u.prepared.name==="drag"){var g=u.dropState;Dl(u,g.events),l.fire("actions/drop:move",{interaction:u,dragEvent:m}),g.events={}}},"interactions:action-end":function(c,l){if(c.interaction.prepared.name==="drag"){var u=c.interaction,m=c.iEvent;zu(c,l),Dl(u,u.dropState.events),l.fire("actions/drop:end",{interaction:u,dragEvent:m})}},"interactions:stop":function(c){var l=c.interaction;if(l.prepared.name==="drag"){var u=l.dropState;u&&(u.activeDrops=null,u.events=null,u.cur.dropzone=null,u.cur.element=null,u.prev.dropzone=null,u.prev.element=null,u.rejected=!1)}}},getActiveDrops:Il,getDrop:Cu,getDropEvents:Vl,fireDropEvents:Dl,filterEventType:function(c){return c.search("drag")===0||c.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},A0=Eu;function Fl(c){var l=c.interaction,u=c.iEvent,m=c.phase;if(l.prepared.name==="gesture"){var g=l.pointers.map(function(M){return M.pointer}),v=m==="start",b=m==="end",k=l.interactable.options.deltaSource;if(u.touches=[g[0],g[1]],v)u.distance=Hl(g,k),u.box=Ol(g),u.scale=1,u.ds=0,u.angle=Rl(g,k),u.da=0,l.gesture.startDistance=u.distance,l.gesture.startAngle=u.angle;else if(b||l.pointers.length<2){var w=l.prevEvent;u.distance=w.distance,u.box=w.box,u.scale=w.scale,u.ds=0,u.angle=w.angle,u.da=0}else u.distance=Hl(g,k),u.box=Ol(g),u.scale=u.distance/l.gesture.startDistance,u.angle=Rl(g,k),u.ds=u.scale-l.gesture.scale,u.da=u.angle-l.gesture.angle;l.gesture.distance=u.distance,l.gesture.angle=u.angle,$.number(u.scale)&&u.scale!==1/0&&!isNaN(u.scale)&&(l.gesture.scale=u.scale)}}var Nl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(c){var l=c.actions,u=c.Interactable,m=c.defaults;u.prototype.gesturable=function(g){return $.object(g)?(this.options.gesture.enabled=g.enabled!==!1,this.setPerAction("gesture",g),this.setOnEvents("gesture",g),this):$.bool(g)?(this.options.gesture.enabled=g,this):this.options.gesture},l.map.gesture=Nl,l.methodDict.gesture="gesturable",m.actions.gesture=Nl.defaults},listeners:{"interactions:action-start":Fl,"interactions:action-move":Fl,"interactions:action-end":Fl,"interactions:new":function(c){c.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(c){if(!(c.interaction.pointers.length<2)){var l=c.interactable.options.gesture;if(l&&l.enabled)return c.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(c){return c.search("gesture")===0}},j0=Nl;function P0(c,l,u,m,g,v,b){if(!l)return!1;if(l===!0){var k=$.number(v.width)?v.width:v.right-v.left,w=$.number(v.height)?v.height:v.bottom-v.top;if(b=Math.min(b,Math.abs((c==="left"||c==="right"?k:w)/2)),k<0&&(c==="left"?c="right":c==="right"&&(c="left")),w<0&&(c==="top"?c="bottom":c==="bottom"&&(c="top")),c==="left"){var M=k>=0?v.left:v.right;return u.x<M+b}if(c==="top"){var _=w>=0?v.top:v.bottom;return u.y<_+b}if(c==="right")return u.x>(k>=0?v.right:v.left)-b;if(c==="bottom")return u.y>(w>=0?v.bottom:v.top)-b}return!!$.element(m)&&($.element(l)?l===m:ue(m,l,g))}function Su(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.resizeAxes){var m=l;u.interactable.options.resize.square?(u.resizeAxes==="y"?m.delta.x=m.delta.y:m.delta.y=m.delta.x,m.axes="xy"):(m.axes=u.resizeAxes,u.resizeAxes==="x"?m.delta.y=0:u.resizeAxes==="y"&&(m.delta.x=0))}}var Bo,ji,qo={id:"actions/resize",before:["actions/drag"],install:function(c){var l=c.actions,u=c.browser,m=c.Interactable,g=c.defaults;qo.cursors=function(v){return v.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(u),qo.defaultMargin=u.supportsTouch||u.supportsPointerEvent?20:10,m.prototype.resizable=function(v){return function(b,k,w){return $.object(k)?(b.options.resize.enabled=k.enabled!==!1,b.setPerAction("resize",k),b.setOnEvents("resize",k),$.string(k.axis)&&/^x$|^y$|^xy$/.test(k.axis)?b.options.resize.axis=k.axis:k.axis===null&&(b.options.resize.axis=w.defaults.actions.resize.axis),$.bool(k.preserveAspectRatio)?b.options.resize.preserveAspectRatio=k.preserveAspectRatio:$.bool(k.square)&&(b.options.resize.square=k.square),b):$.bool(k)?(b.options.resize.enabled=k,b):b.options.resize}(this,v,c)},l.map.resize=qo,l.methodDict.resize="resizable",g.actions.resize=qo.defaults},listeners:{"interactions:new":function(c){c.interaction.resizeAxes="xy"},"interactions:action-start":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.rect;m._rects={start:q({},v),corrected:q({},v),previous:q({},v),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},g.edges=m.prepared.edges,g.rect=m._rects.corrected,g.deltaRect=m._rects.delta}})(c),Su(c)},"interactions:action-move":function(c){(function(l){var u=l.iEvent,m=l.interaction;if(m.prepared.name==="resize"&&m.prepared.edges){var g=u,v=m.interactable.options.resize.invert,b=v==="reposition"||v==="negate",k=m.rect,w=m._rects,M=w.start,_=w.corrected,z=w.delta,j=w.previous;if(q(j,_),b){if(q(_,k),v==="reposition"){if(_.top>_.bottom){var V=_.top;_.top=_.bottom,_.bottom=V}if(_.left>_.right){var I=_.left;_.left=_.right,_.right=I}}}else _.top=Math.min(k.top,M.bottom),_.bottom=Math.max(k.bottom,M.top),_.left=Math.min(k.left,M.right),_.right=Math.max(k.right,M.left);for(var D in _.width=_.right-_.left,_.height=_.bottom-_.top,_)z[D]=_[D]-j[D];g.edges=m.prepared.edges,g.rect=_,g.deltaRect=z}})(c),Su(c)},"interactions:action-end":function(c){var l=c.iEvent,u=c.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var m=l;m.edges=u.prepared.edges,m.rect=u._rects.corrected,m.deltaRect=u._rects.delta}},"auto-start:check":function(c){var l=c.interaction,u=c.interactable,m=c.element,g=c.rect,v=c.buttons;if(g){var b=q({},l.coords.cur.page),k=u.options.resize;if(k&&k.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||v&k.mouseButtons)){if($.object(k.edges)){var w={left:!1,right:!1,top:!1,bottom:!1};for(var M in w)w[M]=P0(M,k.edges[M],b,l._latestPointer.eventTarget,m,g,k.margin||qo.defaultMargin);w.left=w.left&&!w.right,w.top=w.top&&!w.bottom,(w.left||w.right||w.top||w.bottom)&&(c.action={name:"resize",edges:w})}else{var _=k.axis!=="y"&&b.x>g.right-qo.defaultMargin,z=k.axis!=="x"&&b.y>g.bottom-qo.defaultMargin;(_||z)&&(c.action={name:"resize",axes:(_?"x":"")+(z?"y":"")})}return!c.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(c){var l=c.edges,u=c.axis,m=c.name,g=qo.cursors,v=null;if(u)v=g[m+u];else if(l){for(var b="",k=0,w=["top","bottom","left","right"];k<w.length;k++){var M=w[k];l[M]&&(b+=M)}v=g[b]}return v},filterEventType:function(c){return c.search("resize")===0},defaultMargin:null},O0=qo,H0={id:"actions",install:function(c){c.usePlugin(j0),c.usePlugin(O0),c.usePlugin(Je),c.usePlugin(A0)}},$u=0,li={request:function(c){return Bo(c)},cancel:function(c){return ji(c)},init:function(c){if(Bo=c.requestAnimationFrame,ji=c.cancelAnimationFrame,!Bo)for(var l=["ms","moz","webkit","o"],u=0;u<l.length;u++){var m=l[u];Bo=c["".concat(m,"RequestAnimationFrame")],ji=c["".concat(m,"CancelAnimationFrame")]||c["".concat(m,"CancelRequestAnimationFrame")]}Bo=Bo&&Bo.bind(c),ji=ji&&ji.bind(c),Bo||(Bo=function(g){var v=Date.now(),b=Math.max(0,16-(v-$u)),k=c.setTimeout(function(){g(v+b)},b);return $u=v+b,k},ji=function(g){return clearTimeout(g)})}},te={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(c){te.isScrolling=!0,li.cancel(te.i),c.autoScroll=te,te.interaction=c,te.prevTime=te.now(),te.i=li.request(te.scroll)},stop:function(){te.isScrolling=!1,te.interaction&&(te.interaction.autoScroll=null),li.cancel(te.i)},scroll:function(){var c=te.interaction,l=c.interactable,u=c.element,m=c.prepared.name,g=l.options[m].autoScroll,v=Tu(g.container,l,u),b=te.now(),k=(b-te.prevTime)/1e3,w=g.speed*k;if(w>=1){var M={x:te.x*w,y:te.y*w};if(M.x||M.y){var _=Au(v);$.window(v)?v.scrollBy(M.x,M.y):v&&(v.scrollLeft+=M.x,v.scrollTop+=M.y);var z=Au(v),j={x:z.x-_.x,y:z.y-_.y};(j.x||j.y)&&l.fire({type:"autoscroll",target:u,interactable:l,delta:j,interaction:c,container:v})}te.prevTime=b}te.isScrolling&&(li.cancel(te.i),te.i=li.request(te.scroll))},check:function(c,l){var u;return(u=c.options[l].autoScroll)==null?void 0:u.enabled},onInteractionMove:function(c){var l=c.interaction,u=c.pointer;if(l.interacting()&&te.check(l.interactable,l.prepared.name))if(l.simulation)te.x=te.y=0;else{var m,g,v,b,k=l.interactable,w=l.element,M=l.prepared.name,_=k.options[M].autoScroll,z=Tu(_.container,k,w);if($.window(z))b=u.clientX<te.margin,m=u.clientY<te.margin,g=u.clientX>z.innerWidth-te.margin,v=u.clientY>z.innerHeight-te.margin;else{var j=U(z);b=u.clientX<j.left+te.margin,m=u.clientY<j.top+te.margin,g=u.clientX>j.right-te.margin,v=u.clientY>j.bottom-te.margin}te.x=g?1:b?-1:0,te.y=v?1:m?-1:0,te.isScrolling||(te.margin=_.margin,te.speed=_.speed,te.start(l))}}};function Tu(c,l,u){return($.string(c)?ai(c,l,u):c)||H(u)}function Au(c){return $.window(c)&&(c=window.document.body),{x:c.scrollLeft,y:c.scrollTop}}var R0={id:"auto-scroll",install:function(c){var l=c.defaults,u=c.actions;c.autoScroll=te,te.now=function(){return c.now()},u.phaselessTypes.autoscroll=!0,l.perAction.autoScroll=te.defaults},listeners:{"interactions:new":function(c){c.interaction.autoScroll=null},"interactions:destroy":function(c){c.interaction.autoScroll=null,te.stop(),te.interaction&&(te.interaction=null)},"interactions:stop":te.stop,"interactions:action-move":function(c){return te.onInteractionMove(c)}}},I0=R0;function ra(c,l){var u=!1;return function(){return u||(T.console.warn(l),u=!0),c.apply(this,arguments)}}function Ll(c,l){return c.name=l.name,c.axis=l.axis,c.edges=l.edges,c}function V0(c){return $.bool(c)?(this.options.styleCursor=c,this):c===null?(delete this.options.styleCursor,this):this.options.styleCursor}function D0(c){return $.func(c)?(this.options.actionChecker=c,this):c===null?(delete this.options.actionChecker,this):this.options.actionChecker}var F0={id:"auto-start/interactableMethods",install:function(c){var l=c.Interactable;l.prototype.getAction=function(u,m,g,v){var b=function(k,w,M,_,z){var j=k.getRect(_),V=w.buttons||{0:1,1:4,3:8,4:16}[w.button],I={action:null,interactable:k,interaction:M,element:_,rect:j,buttons:V};return z.fire("auto-start:check",I),I.action}(this,m,g,v,c);return this.options.actionChecker?this.options.actionChecker(u,m,b,this,v,g):b},l.prototype.ignoreFrom=ra(function(u){return this._backCompatOption("ignoreFrom",u)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),l.prototype.allowFrom=ra(function(u){return this._backCompatOption("allowFrom",u)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),l.prototype.actionChecker=D0,l.prototype.styleCursor=V0}};function ju(c,l,u,m,g){return l.testIgnoreAllow(l.options[c.name],u,m)&&l.options[c.name].enabled&&ns(l,u,c,g)?c:null}function N0(c,l,u,m,g,v,b){for(var k=0,w=m.length;k<w;k++){var M=m[k],_=g[k],z=M.getAction(l,u,c,_);if(z){var j=ju(z,M,_,v,b);if(j)return{action:j,interactable:M,element:_}}}return{action:null,interactable:null,element:null}}function Pu(c,l,u,m,g){var v=[],b=[],k=m;function w(_){v.push(_),b.push(k)}for(;$.element(k);){v=[],b=[],g.interactables.forEachMatch(k,w);var M=N0(c,l,u,v,b,m,g);if(M.action&&!M.interactable.options[M.action.name].manualStart)return M;k=Yr(k)}return{action:null,interactable:null,element:null}}function Ou(c,l,u){var m=l.action,g=l.interactable,v=l.element;m=m||{name:null},c.interactable=g,c.element=v,Ll(c.prepared,m),c.rect=g&&m.name?g.getRect(v):null,Ru(c,u),u.fire("autoStart:prepared",{interaction:c})}function ns(c,l,u,m){var g=c.options,v=g[u.name].max,b=g[u.name].maxPerElement,k=m.autoStart.maxInteractions,w=0,M=0,_=0;if(!(v&&b&&k))return!1;for(var z=0,j=m.interactions.list;z<j.length;z++){var V=j[z],I=V.prepared.name;if(V.interacting()&&(++w>=k||V.interactable===c&&((M+=I===u.name?1:0)>=v||V.element===l&&(_++,I===u.name&&_>=b))))return!1}return k>0}function Hu(c,l){return $.number(c)?(l.autoStart.maxInteractions=c,this):l.autoStart.maxInteractions}function Bl(c,l,u){var m=u.autoStart.cursorElement;m&&m!==c&&(m.style.cursor=""),c.ownerDocument.documentElement.style.cursor=l,c.style.cursor=l,u.autoStart.cursorElement=l?c:null}function Ru(c,l){var u=c.interactable,m=c.element,g=c.prepared;if(c.pointerType==="mouse"&&u&&u.options.styleCursor){var v="";if(g.name){var b=u.options[g.name].cursorChecker;v=$.func(b)?b(g,u,m,c._interacting):l.actions.map[g.name].getCursor(g)}Bl(c.element,v||"",l)}else l.autoStart.cursorElement&&Bl(l.autoStart.cursorElement,"",l)}var L0={id:"auto-start/base",before:["actions"],install:function(c){var l=c.interactStatic,u=c.defaults;c.usePlugin(F0),u.base.actionChecker=null,u.base.styleCursor=!0,q(u.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),l.maxInteractions=function(m){return Hu(m,c)},c.autoStart={maxInteractions:1/0,withinInteractionLimit:ns,cursorElement:null}},listeners:{"interactions:down":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;u.interacting()||Ou(u,Pu(u,m,g,v,l),l)},"interactions:move":function(c,l){(function(u,m){var g=u.interaction,v=u.pointer,b=u.event,k=u.eventTarget;g.pointerType!=="mouse"||g.pointerIsDown||g.interacting()||Ou(g,Pu(g,v,b,k,m),m)})(c,l),function(u,m){var g=u.interaction;if(g.pointerIsDown&&!g.interacting()&&g.pointerWasMoved&&g.prepared.name){m.fire("autoStart:before-start",u);var v=g.interactable,b=g.prepared.name;b&&v&&(v.options[b].manualStart||!ns(v,g.element,g.prepared,m)?g.stop():(g.start(g.prepared,v,g.element),Ru(g,m)))}}(c,l)},"interactions:stop":function(c,l){var u=c.interaction,m=u.interactable;m&&m.options.styleCursor&&Bl(u.element,"",l)}},maxInteractions:Hu,withinInteractionLimit:ns,validateAction:ju},ql=L0,B0={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(c,l){var u=c.interaction,m=c.eventTarget,g=c.dx,v=c.dy;if(u.prepared.name==="drag"){var b=Math.abs(g),k=Math.abs(v),w=u.interactable.options.drag,M=w.startAxis,_=b>k?"x":b<k?"y":"xy";if(u.prepared.axis=w.lockAxis==="start"?_[0]:w.lockAxis,_!=="xy"&&M!=="xy"&&M!==_){u.prepared.name=null;for(var z=m,j=function(I){if(I!==u.interactable){var D=u.interactable.options.drag;if(!D.manualStart&&I.testIgnoreAllow(D,z,m)){var K=I.getAction(u.downPointer,u.downEvent,u,z);if(K&&K.name==="drag"&&function(B,W){if(!W)return!1;var ce=W.options.drag.startAxis;return B==="xy"||ce==="xy"||ce===B}(_,I)&&ql.validateAction(K,I,z,m,l))return I}}};$.element(z);){var V=l.interactables.forEachMatch(z,j);if(V){u.prepared.name="drag",u.interactable=V,u.element=z;break}z=Yr(z)}}}}}};function Kl(c){var l=c.prepared&&c.prepared.name;if(!l)return null;var u=c.interactable.options;return u[l].hold||u[l].delay}var q0={id:"auto-start/hold",install:function(c){var l=c.defaults;c.usePlugin(ql),l.perAction.hold=0,l.perAction.delay=0},listeners:{"interactions:new":function(c){c.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(c){var l=c.interaction,u=Kl(l);u>0&&(l.autoStartHoldTimer=setTimeout(function(){l.start(l.prepared,l.interactable,l.element)},u))},"interactions:move":function(c){var l=c.interaction,u=c.duplicate;l.autoStartHoldTimer&&l.pointerWasMoved&&!u&&(clearTimeout(l.autoStartHoldTimer),l.autoStartHoldTimer=null)},"autoStart:before-start":function(c){var l=c.interaction;Kl(l)>0&&(l.prepared.name=null)}},getHoldDuration:Kl},K0=q0,W0={id:"auto-start",install:function(c){c.usePlugin(ql),c.usePlugin(K0),c.usePlugin(B0)}},U0=function(c){return/^(always|never|auto)$/.test(c)?(this.options.preventDefault=c,this):$.bool(c)?(this.options.preventDefault=c?"always":"never",this):this.options.preventDefault};function G0(c){var l=c.interaction,u=c.event;l.interactable&&l.interactable.checkAndPreventDefault(u)}var Iu={id:"core/interactablePreventDefault",install:function(c){var l=c.Interactable;l.prototype.preventDefault=U0,l.prototype.checkAndPreventDefault=function(u){return function(m,g,v){var b=m.options.preventDefault;if(b!=="never")if(b!=="always"){if(g.events.supportsPassive&&/^touch(start|move)$/.test(v.type)){var k=H(v.target).document,w=g.getDocOptions(k);if(!w||!w.events||w.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(v.type)||$.element(v.target)&&To(v.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||v.preventDefault()}else v.preventDefault()}(this,c,u)},c.interactions.docEvents.push({type:"dragstart",listener:function(u){for(var m=0,g=c.interactions.list;m<g.length;m++){var v=g[m];if(v.element&&(v.element===u.target||ao(v.element,u.target)))return void v.interactable.checkAndPreventDefault(u)}}})},listeners:["down","move","up","cancel"].reduce(function(c,l){return c["interactions:".concat(l)]=G0,c},{})};function as(c,l){if(l.phaselessTypes[c])return!0;for(var u in l.map)if(c.indexOf(u)===0&&c.substr(u.length)in l.phases)return!0;return!1}function ln(c){var l={};for(var u in c){var m=c[u];$.plainObject(m)?l[u]=ln(m):$.array(m)?l[u]=_u(m):l[u]=m}return l}var Wl=function(){function c(l){t(this,c),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=l,this.result=ss(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return n(c,[{key:"start",value:function(l,u){var m,g,v=l.phase,b=this.interaction,k=function(M){var _=M.interactable.options[M.prepared.name],z=_.modifiers;return z&&z.length?z:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(j){var V=_[j];return V&&V.enabled&&{options:V,methods:V._methods}}).filter(function(j){return!!j})}(b);this.prepareStates(k),this.startEdges=q({},b.edges),this.edges=q({},this.startEdges),this.startOffset=(m=b.rect,g=u,m?{left:g.x-m.left,top:g.y-m.top,right:m.right-g.x,bottom:m.bottom-g.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var w=this.fillArg({phase:v,pageCoords:u,preEnd:!1});return this.result=ss(),this.startAll(w),this.result=this.setAll(w)}},{key:"fillArg",value:function(l){var u=this.interaction;return l.interaction=u,l.interactable=u.interactable,l.element=u.element,l.rect||(l.rect=u.rect),l.edges||(l.edges=this.startEdges),l.startOffset=this.startOffset,l}},{key:"startAll",value:function(l){for(var u=0,m=this.states;u<m.length;u++){var g=m[u];g.methods.start&&(l.state=g,g.methods.start(l))}}},{key:"setAll",value:function(l){var u=l.phase,m=l.preEnd,g=l.skipModifiers,v=l.rect,b=l.edges;l.coords=q({},l.pageCoords),l.rect=q({},v),l.edges=q({},b);for(var k=g?this.states.slice(g):this.states,w=ss(l.coords,l.rect),M=0;M<k.length;M++){var _,z=k[M],j=z.options,V=q({},l.coords),I=null;(_=z.methods)!=null&&_.set&&this.shouldDo(j,m,u)&&(l.state=z,I=z.methods.set(l),si(l.edges,l.rect,{x:l.coords.x-V.x,y:l.coords.y-V.y})),w.eventProps.push(I)}q(this.edges,l.edges),w.delta.x=l.coords.x-l.pageCoords.x,w.delta.y=l.coords.y-l.pageCoords.y,w.rectDelta.left=l.rect.left-v.left,w.rectDelta.right=l.rect.right-v.right,w.rectDelta.top=l.rect.top-v.top,w.rectDelta.bottom=l.rect.bottom-v.bottom;var D=this.result.coords,K=this.result.rect;if(D&&K){var B=w.rect.left!==K.left||w.rect.right!==K.right||w.rect.top!==K.top||w.rect.bottom!==K.bottom;w.changed=B||D.x!==w.coords.x||D.y!==w.coords.y}return w}},{key:"applyToInteraction",value:function(l){var u=this.interaction,m=l.phase,g=u.coords.cur,v=u.coords.start,b=this.result,k=this.startDelta,w=b.delta;m==="start"&&q(this.startDelta,b.delta);for(var M=0,_=[[v,k],[g,w]];M<_.length;M++){var z=_[M],j=z[0],V=z[1];j.page.x+=V.x,j.page.y+=V.y,j.client.x+=V.x,j.client.y+=V.y}var I=this.result.rectDelta,D=l.rect||u.rect;D.left+=I.left,D.right+=I.right,D.top+=I.top,D.bottom+=I.bottom,D.width=D.right-D.left,D.height=D.bottom-D.top}},{key:"setAndApply",value:function(l){var u=this.interaction,m=l.phase,g=l.preEnd,v=l.skipModifiers,b=this.setAll(this.fillArg({preEnd:g,phase:m,pageCoords:l.modifiedCoords||u.coords.cur.page}));if(this.result=b,!b.changed&&(!v||v<this.states.length)&&u.interacting())return!1;if(l.modifiedCoords){var k=u.coords.cur.page,w={x:l.modifiedCoords.x-k.x,y:l.modifiedCoords.y-k.y};b.coords.x+=w.x,b.coords.y+=w.y,b.delta.x+=w.x,b.delta.y+=w.y}this.applyToInteraction(l)}},{key:"beforeEnd",value:function(l){var u=l.interaction,m=l.event,g=this.states;if(g&&g.length){for(var v=!1,b=0;b<g.length;b++){var k=g[b];l.state=k;var w=k.options,M=k.methods,_=M.beforeEnd&&M.beforeEnd(l);if(_)return this.endResult=_,!1;v=v||!v&&this.shouldDo(w,!0,l.phase,!0)}v&&u.move({event:m,preEnd:!0})}}},{key:"stop",value:function(l){var u=l.interaction;if(this.states&&this.states.length){var m=q({states:this.states,interactable:u.interactable,element:u.element,rect:null},l);this.fillArg(m);for(var g=0,v=this.states;g<v.length;g++){var b=v[g];m.state=b,b.methods.stop&&b.methods.stop(m)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(l){this.states=[];for(var u=0;u<l.length;u++){var m=l[u],g=m.options,v=m.methods,b=m.name;this.states.push({options:g,methods:v,index:u,name:b})}return this.states}},{key:"restoreInteractionCoords",value:function(l){var u=l.interaction,m=u.coords,g=u.rect,v=u.modification;if(v.result){for(var b=v.startDelta,k=v.result,w=k.delta,M=k.rectDelta,_=0,z=[[m.start,b],[m.cur,w]];_<z.length;_++){var j=z[_],V=j[0],I=j[1];V.page.x-=I.x,V.page.y-=I.y,V.client.x-=I.x,V.client.y-=I.y}g.left-=M.left,g.right-=M.right,g.top-=M.top,g.bottom-=M.bottom}}},{key:"shouldDo",value:function(l,u,m,g){return!(!l||l.enabled===!1||g&&!l.endOnly||l.endOnly&&!u||m==="start"&&!l.setStart)}},{key:"copyFrom",value:function(l){this.startOffset=l.startOffset,this.startDelta=l.startDelta,this.startEdges=l.startEdges,this.edges=l.edges,this.states=l.states.map(function(u){return ln(u)}),this.result=ss(q({},l.result.coords),q({},l.result.rect))}},{key:"destroy",value:function(){for(var l in this)this[l]=null}}]),c}();function ss(c,l){return{rect:l,coords:c,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ci(c,l){var u=c.defaults,m={start:c.start,set:c.set,beforeEnd:c.beforeEnd,stop:c.stop},g=function(v){var b=v||{};for(var k in b.enabled=b.enabled!==!1,u)k in b||(b[k]=u[k]);var w={options:b,methods:m,name:l,enable:function(){return b.enabled=!0,w},disable:function(){return b.enabled=!1,w}};return w};return l&&typeof l=="string"&&(g._defaults=u,g._methods=m),g}function oa(c){var l=c.iEvent,u=c.interaction.modification.result;u&&(l.modifiers=u.eventProps)}var Y0={id:"modifiers/base",before:["actions"],install:function(c){c.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(c){var l=c.interaction;l.modification=new Wl(l)},"interactions:before-action-start":function(c){var l=c.interaction,u=c.interaction.modification;u.start(c,l.coords.start.page),l.edges=u.edges,u.applyToInteraction(c)},"interactions:before-action-move":function(c){var l=c.interaction,u=l.modification,m=u.setAndApply(c);return l.edges=u.edges,m},"interactions:before-action-end":function(c){var l=c.interaction,u=l.modification,m=u.beforeEnd(c);return l.edges=u.startEdges,m},"interactions:action-start":oa,"interactions:action-move":oa,"interactions:action-end":oa,"interactions:after-action-start":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-move":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:stop":function(c){return c.interaction.modification.stop(c)}}},Vu=Y0,Du={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Ul=function(c){d(u,c);var l=x(u);function u(m,g,v,b,k,w,M){var _;t(this,u),(_=l.call(this,m)).relatedTarget=null,_.screenX=void 0,_.screenY=void 0,_.button=void 0,_.buttons=void 0,_.ctrlKey=void 0,_.shiftKey=void 0,_.altKey=void 0,_.metaKey=void 0,_.page=void 0,_.client=void 0,_.delta=void 0,_.rect=void 0,_.x0=void 0,_.y0=void 0,_.t0=void 0,_.dt=void 0,_.duration=void 0,_.clientX0=void 0,_.clientY0=void 0,_.velocity=void 0,_.speed=void 0,_.swipe=void 0,_.axes=void 0,_.preEnd=void 0,k=k||m.element;var z=m.interactable,j=(z&&z.options||Du).deltaSource,V=Lo(z,k,v),I=b==="start",D=b==="end",K=I?f(_):m.prevEvent,B=I?m.coords.start:D?{page:K.page,client:K.client,timeStamp:m.coords.cur.timeStamp}:m.coords.cur;return _.page=q({},B.page),_.client=q({},B.client),_.rect=q({},m.rect),_.timeStamp=B.timeStamp,D||(_.page.x-=V.x,_.page.y-=V.y,_.client.x-=V.x,_.client.y-=V.y),_.ctrlKey=g.ctrlKey,_.altKey=g.altKey,_.shiftKey=g.shiftKey,_.metaKey=g.metaKey,_.button=g.button,_.buttons=g.buttons,_.target=k,_.currentTarget=k,_.preEnd=w,_.type=M||v+(b||""),_.interactable=z,_.t0=I?m.pointers[m.pointers.length-1].downTime:K.t0,_.x0=m.coords.start.page.x-V.x,_.y0=m.coords.start.page.y-V.y,_.clientX0=m.coords.start.client.x-V.x,_.clientY0=m.coords.start.client.y-V.y,_.delta=I||D?{x:0,y:0}:{x:_[j].x-K[j].x,y:_[j].y-K[j].y},_.dt=m.coords.delta.timeStamp,_.duration=_.timeStamp-_.t0,_.velocity=q({},m.coords.velocity[j]),_.speed=Qn(_.velocity.x,_.velocity.y),_.swipe=D||b==="inertiastart"?_.getSwipe():null,_}return n(u,[{key:"getSwipe",value:function(){var m=this._interaction;if(m.prevEvent.speed<600||this.timeStamp-m.prevEvent.timeStamp>150)return null;var g=180*Math.atan2(m.prevEvent.velocityY,m.prevEvent.velocityX)/Math.PI;g<0&&(g+=360);var v=112.5<=g&&g<247.5,b=202.5<=g&&g<337.5;return{up:b,down:!b&&22.5<=g&&g<157.5,left:v,right:!v&&(292.5<=g||g<67.5),angle:g,speed:m.prevEvent.speed,velocity:{x:m.prevEvent.velocityX,y:m.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),u}(is);Object.defineProperties(Ul.prototype,{pageX:{get:function(){return this.page.x},set:function(c){this.page.x=c}},pageY:{get:function(){return this.page.y},set:function(c){this.page.y=c}},clientX:{get:function(){return this.client.x},set:function(c){this.client.x=c}},clientY:{get:function(){return this.client.y},set:function(c){this.client.y=c}},dx:{get:function(){return this.delta.x},set:function(c){this.delta.x=c}},dy:{get:function(){return this.delta.y},set:function(c){this.delta.y=c}},velocityX:{get:function(){return this.velocity.x},set:function(c){this.velocity.x=c}},velocityY:{get:function(){return this.velocity.y},set:function(c){this.velocity.y=c}}});var X0=n(function c(l,u,m,g,v){t(this,c),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=l,this.pointer=u,this.event=m,this.downTime=g,this.downTarget=v}),Z0=function(c){return c.interactable="",c.element="",c.prepared="",c.pointerIsDown="",c.pointerWasMoved="",c._proxy="",c}({}),Fu=function(c){return c.start="",c.move="",c.end="",c.stop="",c.interacting="",c}({}),Q0=0,J0=function(){function c(l){var u=this,m=l.pointerType,g=l.scopeFire;t(this,c),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ra(function(_){this.move(_)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Q0++,this._scopeFire=g,this.pointerType=m;var v=this;this._proxy={};var b=function(_){Object.defineProperty(u._proxy,_,{get:function(){return v[_]}})};for(var k in Z0)b(k);var w=function(_){Object.defineProperty(u._proxy,_,{value:function(){return v[_].apply(v,arguments)}})};for(var M in Fu)w(M);this._scopeFire("interactions:new",{interaction:this})}return n(c,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(l,u,m){var g=this.updatePointer(l,u,m,!0),v=this.pointers[g];this._scopeFire("interactions:down",{pointer:l,event:u,eventTarget:m,pointerIndex:g,pointerInfo:v,type:"down",interaction:this})}},{key:"start",value:function(l,u,m){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(l.name==="gesture"?2:1)||!u.options[l.name].enabled)&&(Ll(this.prepared,l),this.interactable=u,this.element=m,this.rect=u.getRect(m),this.edges=this.prepared.edges?q({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(l,u,m){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(l,u,m,!1);var g,v,b=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(g=this.coords.cur.client.x-this.coords.start.client.x,v=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Qn(g,v)>this.pointerMoveTolerance);var k,w,M,_=this.getPointerIndex(l),z={pointer:l,pointerIndex:_,pointerInfo:this.pointers[_],event:u,type:"move",eventTarget:m,dx:g,dy:v,duplicate:b,interaction:this};b||(k=this.coords.velocity,w=this.coords.delta,M=Math.max(w.timeStamp/1e3,.001),k.page.x=w.page.x/M,k.page.y=w.page.y/M,k.client.x=w.client.x/M,k.client.y=w.client.y/M,k.timeStamp=M),this._scopeFire("interactions:move",z),b||this.simulation||(this.interacting()&&(z.type=null,this.move(z)),this.pointerWasMoved&&rs(this.coords.prev,this.coords.cur))}},{key:"move",value:function(l){l&&l.event||fu(this.coords.delta),(l=q({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},l||{})).phase="move",this._doPhase(l)}},{key:"pointerUp",value:function(l,u,m,g){var v=this.getPointerIndex(l);v===-1&&(v=this.updatePointer(l,u,m,!1));var b=/cancel$/i.test(u.type)?"cancel":"up";this._scopeFire("interactions:".concat(b),{pointer:l,pointerIndex:v,pointerInfo:this.pointers[v],event:u,eventTarget:m,type:b,curEventTarget:g,interaction:this}),this.simulation||this.end(u),this.removePointer(l,u)}},{key:"documentBlur",value:function(l){this.end(l),this._scopeFire("interactions:blur",{event:l,type:"blur",interaction:this})}},{key:"end",value:function(l){var u;this._ending=!0,l=l||this._latestPointer.event,this.interacting()&&(u=this._doPhase({event:l,interaction:this,phase:"end"})),this._ending=!1,u===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(l){var u=Jn(l);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:ea(this.pointers,function(m){return m.id===u})}},{key:"getPointerInfo",value:function(l){return this.pointers[this.getPointerIndex(l)]}},{key:"updatePointer",value:function(l,u,m,g){var v,b,k,w=Jn(l),M=this.getPointerIndex(l),_=this.pointers[M];return g=g!==!1&&(g||/(down|start)$/i.test(u.type)),_?_.pointer=l:(_=new X0(w,l,u,null,null),M=this.pointers.length,this.pointers.push(_)),T0(this.coords.cur,this.pointers.map(function(z){return z.pointer}),this._now()),v=this.coords.delta,b=this.coords.prev,k=this.coords.cur,v.page.x=k.page.x-b.page.x,v.page.y=k.page.y-b.page.y,v.client.x=k.client.x-b.client.x,v.client.y=k.client.y-b.client.y,v.timeStamp=k.timeStamp-b.timeStamp,g&&(this.pointerIsDown=!0,_.downTime=this.coords.cur.timeStamp,_.downTarget=m,ts(this.downPointer,l),this.interacting()||(rs(this.coords.start,this.coords.cur),rs(this.coords.prev,this.coords.cur),this.downEvent=u,this.pointerWasMoved=!1)),this._updateLatestPointer(l,u,m),this._scopeFire("interactions:update-pointer",{pointer:l,event:u,eventTarget:m,down:g,pointerInfo:_,pointerIndex:M,interaction:this}),M}},{key:"removePointer",value:function(l,u){var m=this.getPointerIndex(l);if(m!==-1){var g=this.pointers[m];this._scopeFire("interactions:remove-pointer",{pointer:l,event:u,eventTarget:null,pointerIndex:m,pointerInfo:g,interaction:this}),this.pointers.splice(m,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(l,u,m){this._latestPointer.pointer=l,this._latestPointer.event=u,this._latestPointer.eventTarget=m}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(l,u,m,g){return new Ul(this,l,this.prepared.name,u,this.element,m,g)}},{key:"_fireEvent",value:function(l){var u;(u=this.interactable)==null||u.fire(l),(!this.prevEvent||l.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=l)}},{key:"_doPhase",value:function(l){var u=l.event,m=l.phase,g=l.preEnd,v=l.type,b=this.rect;if(b&&m==="move"&&(si(this.edges,b,this.coords.delta[this.interactable.options.deltaSource]),b.width=b.right-b.left,b.height=b.bottom-b.top),this._scopeFire("interactions:before-action-".concat(m),l)===!1)return!1;var k=l.iEvent=this._createPreparedEvent(u,m,g,v);return this._scopeFire("interactions:action-".concat(m),l),m==="start"&&(this.prevEvent=k),this._fireEvent(k),this._scopeFire("interactions:after-action-".concat(m),l),!0}},{key:"_now",value:function(){return Date.now()}}]),c}();function Nu(c){Lu(c.interaction)}function Lu(c){if(!function(u){return!(!u.offset.pending.x&&!u.offset.pending.y)}(c))return!1;var l=c.offset.pending;return Gl(c.coords.cur,l),Gl(c.coords.delta,l),si(c.edges,c.rect,l),l.x=0,l.y=0,!0}function e2(c){var l=c.x,u=c.y;this.offset.pending.x+=l,this.offset.pending.y+=u,this.offset.total.x+=l,this.offset.total.y+=u}function Gl(c,l){var u=c.page,m=c.client,g=l.x,v=l.y;u.x+=g,u.y+=v,m.x+=g,m.y+=v}Fu.offsetBy="";var t2={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(c){c.Interaction.prototype.offsetBy=e2},listeners:{"interactions:new":function(c){c.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(c){return function(l){l.pointerIsDown&&(Gl(l.coords.cur,l.offset.total),l.offset.pending.x=0,l.offset.pending.y=0)}(c.interaction)},"interactions:before-action-start":Nu,"interactions:before-action-move":Nu,"interactions:before-action-end":function(c){var l=c.interaction;if(Lu(l))return l.move({offset:!0}),l.end(),!1},"interactions:stop":function(c){var l=c.interaction;l.offset.total.x=0,l.offset.total.y=0,l.offset.pending.x=0,l.offset.pending.y=0}}},Bu=t2,r2=function(){function c(l){t(this,c),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=l}return n(c,[{key:"start",value:function(l){var u=this.interaction,m=ls(u);if(!m||!m.enabled)return!1;var g=u.coords.velocity.client,v=Qn(g.x,g.y),b=this.modification||(this.modification=new Wl(u));if(b.copyFrom(u.modification),this.t0=u._now(),this.allowResume=m.allowResume,this.v0=v,this.currentOffset={x:0,y:0},this.startCoords=u.coords.cur.page,this.modifierArg=b.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-u.coords.cur.timeStamp<50&&v>m.minSpeed&&v>m.endSpeed)this.startInertia();else{if(b.result=b.setAll(this.modifierArg),!b.result.changed)return!1;this.startSmoothEnd()}return u.modification.result.rect=null,u.offsetBy(this.targetOffset),u._doPhase({interaction:u,event:l,phase:"inertiastart"}),u.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),u.modification.result.rect=null,this.active=!0,u.simulation=this,!0}},{key:"startInertia",value:function(){var l=this,u=this.interaction.coords.velocity.client,m=ls(this.interaction),g=m.resistance,v=-Math.log(m.endSpeed/this.v0)/g;this.targetOffset={x:(u.x-v)/g,y:(u.y-v)/g},this.te=v,this.lambda_v0=g/this.v0,this.one_ve_v0=1-m.endSpeed/this.v0;var b=this.modification,k=this.modifierArg;k.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},b.result=b.setAll(k),b.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+b.result.delta.x,y:this.targetOffset.y+b.result.delta.y}),this.onNextFrame(function(){return l.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var l=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return l.smoothEndTick()})}},{key:"onNextFrame",value:function(l){var u=this;this.timeout=li.request(function(){u.active&&l()})}},{key:"inertiaTick",value:function(){var l,u,m,g,v,b,k,w=this,M=this.interaction,_=ls(M).resistance,z=(M._now()-this.t0)/1e3;if(z<this.te){var j,V=1-(Math.exp(-_*z)-this.lambda_v0)/this.one_ve_v0;this.isModified?(l=0,u=0,m=this.targetOffset.x,g=this.targetOffset.y,v=this.modifiedOffset.x,b=this.modifiedOffset.y,j={x:qu(k=V,l,m,v),y:qu(k,u,g,b)}):j={x:this.targetOffset.x*V,y:this.targetOffset.y*V};var I={x:j.x-this.currentOffset.x,y:j.y-this.currentOffset.y};this.currentOffset.x+=I.x,this.currentOffset.y+=I.y,M.offsetBy(I),M.move(),this.onNextFrame(function(){return w.inertiaTick()})}else M.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var l=this,u=this.interaction,m=u._now()-this.t0,g=ls(u).smoothEndDuration;if(m<g){var v={x:Ku(m,0,this.targetOffset.x,g),y:Ku(m,0,this.targetOffset.y,g)},b={x:v.x-this.currentOffset.x,y:v.y-this.currentOffset.y};this.currentOffset.x+=b.x,this.currentOffset.y+=b.y,u.offsetBy(b),u.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return l.smoothEndTick()})}else u.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(l){var u=l.pointer,m=l.event,g=l.eventTarget,v=this.interaction;v.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),v.updatePointer(u,m,g,!0),v._doPhase({interaction:v,event:m,phase:"resume"}),rs(v.coords.prev,v.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,li.cancel(this.timeout)}}]),c}();function ls(c){var l=c.interactable,u=c.prepared;return l&&l.options&&u.name&&l.options[u.name].inertia}var o2={id:"inertia",before:["modifiers","actions"],install:function(c){var l=c.defaults;c.usePlugin(Bu),c.usePlugin(Vu),c.actions.phases.inertiastart=!0,c.actions.phases.resume=!0,l.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(c){var l=c.interaction;l.inertia=new r2(l)},"interactions:before-action-end":function(c){var l=c.interaction,u=c.event;return(!l._interacting||l.simulation||!l.inertia.start(u))&&null},"interactions:down":function(c){var l=c.interaction,u=c.eventTarget,m=l.inertia;if(m.active)for(var g=u;$.element(g);){if(g===l.element){m.resume(c);break}g=Yr(g)}},"interactions:stop":function(c){var l=c.interaction.inertia;l.active&&l.stop()},"interactions:before-action-resume":function(c){var l=c.interaction.modification;l.stop(c),l.start(c,c.interaction.coords.cur.page),l.applyToInteraction(c)},"interactions:before-action-inertiastart":function(c){return c.interaction.modification.setAndApply(c)},"interactions:action-resume":oa,"interactions:action-inertiastart":oa,"interactions:after-action-inertiastart":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-resume":function(c){return c.interaction.modification.restoreInteractionCoords(c)}}};function qu(c,l,u,m){var g=1-c;return g*g*l+2*g*c*u+c*c*m}function Ku(c,l,u,m){return-u*(c/=m)*(c-2)+l}var i2=o2;function Wu(c,l){for(var u=0;u<l.length;u++){var m=l[u];if(c.immediatePropagationStopped)break;m(c)}}var Uu=function(){function c(l){t(this,c),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=q({},l||{})}return n(c,[{key:"fire",value:function(l){var u,m=this.global;(u=this.types[l.type])&&Wu(l,u),!l.propagationStopped&&m&&(u=m[l.type])&&Wu(l,u)}},{key:"on",value:function(l,u){var m=co(l,u);for(l in m)this.types[l]=wu(this.types[l]||[],m[l])}},{key:"off",value:function(l,u){var m=co(l,u);for(l in m){var g=this.types[l];if(g&&g.length)for(var v=0,b=m[l];v<b.length;v++){var k=b[v],w=g.indexOf(k);w!==-1&&g.splice(w,1)}}}},{key:"getRect",value:function(l){return null}}]),c}(),n2=function(){function c(l){t(this,c),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=l,ts(this,l)}return n(c,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),c}();function ia(c){return $.object(c)?{capture:!!c.capture,passive:!!c.passive}:{capture:!!c,passive:!1}}function cs(c,l){return c===l||(typeof c=="boolean"?!!l.capture===c&&!l.passive:!!c.capture==!!l.capture&&!!c.passive==!!l.passive)}var a2={id:"events",install:function(c){var l,u=[],m={},g=[],v={add:b,remove:k,addDelegate:function(_,z,j,V,I){var D=ia(I);if(!m[j]){m[j]=[];for(var K=0;K<g.length;K++){var B=g[K];b(B,j,w),b(B,j,M,!0)}}var W=m[j],ce=ta(W,function(ye){return ye.selector===_&&ye.context===z});ce||(ce={selector:_,context:z,listeners:[]},W.push(ce)),ce.listeners.push({func:V,options:D})},removeDelegate:function(_,z,j,V,I){var D,K=ia(I),B=m[j],W=!1;if(B)for(D=B.length-1;D>=0;D--){var ce=B[D];if(ce.selector===_&&ce.context===z){for(var ye=ce.listeners,ee=ye.length-1;ee>=0;ee--){var he=ye[ee];if(he.func===V&&cs(he.options,K)){ye.splice(ee,1),ye.length||(B.splice(D,1),k(z,j,w),k(z,j,M,!0)),W=!0;break}}if(W)break}}},delegateListener:w,delegateUseCapture:M,delegatedEvents:m,documents:g,targets:u,supportsOptions:!1,supportsPassive:!1};function b(_,z,j,V){if(_.addEventListener){var I=ia(V),D=ta(u,function(K){return K.eventTarget===_});D||(D={eventTarget:_,events:{}},u.push(D)),D.events[z]||(D.events[z]=[]),ta(D.events[z],function(K){return K.func===j&&cs(K.options,I)})||(_.addEventListener(z,j,v.supportsOptions?I:I.capture),D.events[z].push({func:j,options:I}))}}function k(_,z,j,V){if(_.addEventListener&&_.removeEventListener){var I=ea(u,function(mr){return mr.eventTarget===_}),D=u[I];if(D&&D.events)if(z!=="all"){var K=!1,B=D.events[z];if(B){if(j==="all"){for(var W=B.length-1;W>=0;W--){var ce=B[W];k(_,z,ce.func,ce.options)}return}for(var ye=ia(V),ee=0;ee<B.length;ee++){var he=B[ee];if(he.func===j&&cs(he.options,ye)){_.removeEventListener(z,j,v.supportsOptions?ye:ye.capture),B.splice(ee,1),B.length===0&&(delete D.events[z],K=!0);break}}}K&&!Object.keys(D.events).length&&u.splice(I,1)}else for(z in D.events)D.events.hasOwnProperty(z)&&k(_,z,"all")}}function w(_,z){for(var j=ia(z),V=new n2(_),I=m[_.type],D=xu(_)[0],K=D;$.element(K);){for(var B=0;B<I.length;B++){var W=I[B],ce=W.selector,ye=W.context;if(To(K,ce)&&ao(ye,D)&&ao(ye,K)){var ee=W.listeners;V.currentTarget=K;for(var he=0;he<ee.length;he++){var mr=ee[he];cs(mr.options,j)&&mr.func(V)}}}K=Yr(K)}}function M(_){return w(_,!0)}return(l=c.document)==null||l.createElement("div").addEventListener("test",null,{get capture(){return v.supportsOptions=!0},get passive(){return v.supportsPassive=!0}}),c.events=v,v}},Yl={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(c){for(var l=0,u=Yl.methodOrder;l<u.length;l++){var m=u[l],g=Yl[m](c);if(g)return g}return null},simulationResume:function(c){var l=c.pointerType,u=c.eventType,m=c.eventTarget,g=c.scope;if(!/down|start/i.test(u))return null;for(var v=0,b=g.interactions.list;v<b.length;v++){var k=b[v],w=m;if(k.simulation&&k.simulation.allowResume&&k.pointerType===l)for(;w;){if(w===k.element)return k;w=Yr(w)}}return null},mouseOrPen:function(c){var l,u=c.pointerId,m=c.pointerType,g=c.eventType,v=c.scope;if(m!=="mouse"&&m!=="pen")return null;for(var b=0,k=v.interactions.list;b<k.length;b++){var w=k[b];if(w.pointerType===m){if(w.simulation&&!Gu(w,u))continue;if(w.interacting())return w;l||(l=w)}}if(l)return l;for(var M=0,_=v.interactions.list;M<_.length;M++){var z=_[M];if(!(z.pointerType!==m||/down/i.test(g)&&z.simulation))return z}return null},hasPointer:function(c){for(var l=c.pointerId,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(Gu(g,l))return g}return null},idle:function(c){for(var l=c.pointerType,u=0,m=c.scope.interactions.list;u<m.length;u++){var g=m[u];if(g.pointers.length===1){var v=g.interactable;if(v&&(!v.options.gesture||!v.options.gesture.enabled))continue}else if(g.pointers.length>=2)continue;if(!g.interacting()&&l===g.pointerType)return g}return null}};function Gu(c,l){return c.pointers.some(function(u){return u.id===l})}var s2=Yl,Xl=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Yu(c,l){return function(u){var m=l.interactions.list,g=yu(u),v=xu(u),b=v[0],k=v[1],w=[];if(/^touch/.test(u.type)){l.prevTouchTime=l.now();for(var M=0,_=u.changedTouches;M<_.length;M++){var z=_[M],j={pointer:z,pointerId:Jn(z),pointerType:g,eventType:u.type,eventTarget:b,curEventTarget:k,scope:l},V=Xu(j);w.push([j.pointer,j.eventTarget,j.curEventTarget,V])}}else{var I=!1;if(!hr.supportsPointerEvent&&/mouse/.test(u.type)){for(var D=0;D<m.length&&!I;D++)I=m[D].pointerType!=="mouse"&&m[D].pointerIsDown;I=I||l.now()-l.prevTouchTime<500||u.timeStamp===0}if(!I){var K={pointer:u,pointerId:Jn(u),pointerType:g,eventType:u.type,curEventTarget:k,eventTarget:b,scope:l},B=Xu(K);w.push([K.pointer,K.eventTarget,K.curEventTarget,B])}}for(var W=0;W<w.length;W++){var ce=w[W],ye=ce[0],ee=ce[1],he=ce[2];ce[3][c](ye,u,ee,he)}}}function Xu(c){var l=c.pointerType,u=c.scope,m={interaction:s2.search(c),searchDetails:c};return u.fire("interactions:find",m),m.interaction||u.interactions.new({pointerType:l})}function Zl(c,l){var u=c.doc,m=c.scope,g=c.options,v=m.interactions.docEvents,b=m.events,k=b[l];for(var w in m.browser.isIOS&&!g.events&&(g.events={passive:!1}),b.delegatedEvents)k(u,w,b.delegateListener),k(u,w,b.delegateUseCapture,!0);for(var M=g&&g.events,_=0;_<v.length;_++){var z=v[_];k(u,z.type,z.listener,M)}}var l2={id:"core/interactions",install:function(c){for(var l={},u=0;u<Xl.length;u++){var m=Xl[u];l[m]=Yu(m,c)}var g,v=hr.pEventTypes;function b(){for(var k=0,w=c.interactions.list;k<w.length;k++){var M=w[k];if(M.pointerIsDown&&M.pointerType==="touch"&&!M._interacting)for(var _=function(){var V=j[z];c.documents.some(function(I){return ao(I.doc,V.downTarget)})||M.removePointer(V.pointer,V.event)},z=0,j=M.pointers;z<j.length;z++)_()}}(g=De.PointerEvent?[{type:v.down,listener:b},{type:v.down,listener:l.pointerDown},{type:v.move,listener:l.pointerMove},{type:v.up,listener:l.pointerUp},{type:v.cancel,listener:l.pointerUp}]:[{type:"mousedown",listener:l.pointerDown},{type:"mousemove",listener:l.pointerMove},{type:"mouseup",listener:l.pointerUp},{type:"touchstart",listener:b},{type:"touchstart",listener:l.pointerDown},{type:"touchmove",listener:l.pointerMove},{type:"touchend",listener:l.pointerUp},{type:"touchcancel",listener:l.pointerUp}]).push({type:"blur",listener:function(k){for(var w=0,M=c.interactions.list;w<M.length;w++)M[w].documentBlur(k)}}),c.prevTouchTime=0,c.Interaction=function(k){d(M,k);var w=x(M);function M(){return t(this,M),w.apply(this,arguments)}return n(M,[{key:"pointerMoveTolerance",get:function(){return c.interactions.pointerMoveTolerance},set:function(_){c.interactions.pointerMoveTolerance=_}},{key:"_now",value:function(){return c.now()}}]),M}(J0),c.interactions={list:[],new:function(k){k.scopeFire=function(M,_){return c.fire(M,_)};var w=new c.Interaction(k);return c.interactions.list.push(w),w},listeners:l,docEvents:g,pointerMoveTolerance:1},c.usePlugin(Iu)},listeners:{"scope:add-document":function(c){return Zl(c,"add")},"scope:remove-document":function(c){return Zl(c,"remove")},"interactable:unset":function(c,l){for(var u=c.interactable,m=l.interactions.list.length-1;m>=0;m--){var g=l.interactions.list[m];g.interactable===u&&(g.stop(),l.fire("interactions:destroy",{interaction:g}),g.destroy(),l.interactions.list.length>2&&l.interactions.list.splice(m,1))}}},onDocSignal:Zl,doOnInteractions:Yu,methodNames:Xl},c2=l2,di=function(c){return c[c.On=0]="On",c[c.Off=1]="Off",c}(di||{}),d2=function(){function c(l,u,m,g){t(this,c),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Uu,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=u.actions,this.target=l,this._context=u.context||m,this._win=H($r(l)?this._context:l),this._doc=this._win.document,this._scopeEvents=g,this.set(u)}return n(c,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(l,u){return $.func(u.onstart)&&this.on("".concat(l,"start"),u.onstart),$.func(u.onmove)&&this.on("".concat(l,"move"),u.onmove),$.func(u.onend)&&this.on("".concat(l,"end"),u.onend),$.func(u.oninertiastart)&&this.on("".concat(l,"inertiastart"),u.oninertiastart),this}},{key:"updatePerActionListeners",value:function(l,u,m){var g,v=this,b=(g=this._actions.map[l])==null?void 0:g.filterEventType,k=function(w){return(b==null||b(w))&&as(w,v._actions)};($.array(u)||$.object(u))&&this._onOff(di.Off,l,u,void 0,k),($.array(m)||$.object(m))&&this._onOff(di.On,l,m,void 0,k)}},{key:"setPerAction",value:function(l,u){var m=this._defaults;for(var g in u){var v=g,b=this.options[l],k=u[v];v==="listeners"&&this.updatePerActionListeners(l,b.listeners,k),$.array(k)?b[v]=_u(k):$.plainObject(k)?(b[v]=q(b[v]||{},ln(k)),$.object(m.perAction[v])&&"enabled"in m.perAction[v]&&(b[v].enabled=k.enabled!==!1)):$.bool(k)&&$.object(m.perAction[v])?b[v].enabled=k:b[v]=k}}},{key:"getRect",value:function(l){return l=l||($.element(this.target)?this.target:null),$.string(this.target)&&(l=l||this._context.querySelector(this.target)),_e(l)}},{key:"rectChecker",value:function(l){var u=this;return $.func(l)?(this.getRect=function(m){var g=q({},l.apply(u,m));return"width"in g||(g.width=g.right-g.left,g.height=g.bottom-g.top),g},this):l===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(l,u){if($r(u)||$.object(u)){for(var m in this.options[l]=u,this._actions.map)this.options[m][l]=u;return this}return this.options[l]}},{key:"origin",value:function(l){return this._backCompatOption("origin",l)}},{key:"deltaSource",value:function(l){return l==="page"||l==="client"?(this.options.deltaSource=l,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var l=this.target;return $.string(l)?Array.from(this._context.querySelectorAll(l)):$.func(l)&&l.getAllElements?l.getAllElements():$.element(l)?[l]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(l){return this._context===l.ownerDocument||ao(this._context,l)}},{key:"testIgnoreAllow",value:function(l,u,m){return!this.testIgnore(l.ignoreFrom,u,m)&&this.testAllow(l.allowFrom,u,m)}},{key:"testAllow",value:function(l,u,m){return!l||!!$.element(m)&&($.string(l)?ue(m,l,u):!!$.element(l)&&ao(l,m))}},{key:"testIgnore",value:function(l,u,m){return!(!l||!$.element(m))&&($.string(l)?ue(m,l,u):!!$.element(l)&&ao(l,m))}},{key:"fire",value:function(l){return this.events.fire(l),this}},{key:"_onOff",value:function(l,u,m,g,v){$.object(u)&&!$.array(u)&&(g=m,m=null);var b=co(u,m,v);for(var k in b){k==="wheel"&&(k=hr.wheelEvent);for(var w=0,M=b[k];w<M.length;w++){var _=M[w];as(k,this._actions)?this.events[l===di.On?"on":"off"](k,_):$.string(this.target)?this._scopeEvents[l===di.On?"addDelegate":"removeDelegate"](this.target,this._context,k,_,g):this._scopeEvents[l===di.On?"add":"remove"](this.target,k,_,g)}}return this}},{key:"on",value:function(l,u,m){return this._onOff(di.On,l,u,m)}},{key:"off",value:function(l,u,m){return this._onOff(di.Off,l,u,m)}},{key:"set",value:function(l){var u=this._defaults;for(var m in $.object(l)||(l={}),this.options=ln(u.base),this._actions.methodDict){var g=m,v=this._actions.methodDict[g];this.options[g]={},this.setPerAction(g,q(q({},u.perAction),u.actions[g])),this[v](l[g])}for(var b in l)b!=="getRect"?$.func(this[b])&&this[b](l[b]):this.rectChecker(l.getRect);return this}},{key:"unset",value:function(){if($.string(this.target))for(var l in this._scopeEvents.delegatedEvents)for(var u=this._scopeEvents.delegatedEvents[l],m=u.length-1;m>=0;m--){var g=u[m],v=g.selector,b=g.context,k=g.listeners;v===this.target&&b===this._context&&u.splice(m,1);for(var w=k.length-1;w>=0;w--)this._scopeEvents.removeDelegate(this.target,this._context,l,k[w][0],k[w][1])}else this._scopeEvents.remove(this.target,"all")}}]),c}(),u2=function(){function c(l){var u=this;t(this,c),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=l,l.addListeners({"interactable:unset":function(m){var g=m.interactable,v=g.target,b=$.string(v)?u.selectorMap[v]:v[u.scope.id],k=ea(b,function(w){return w===g});b.splice(k,1)}})}return n(c,[{key:"new",value:function(l,u){u=q(u||{},{actions:this.scope.actions});var m=new this.scope.Interactable(l,u,this.scope.document,this.scope.events);return this.scope.addDocument(m._doc),this.list.push(m),$.string(l)?(this.selectorMap[l]||(this.selectorMap[l]=[]),this.selectorMap[l].push(m)):(m.target[this.scope.id]||Object.defineProperty(l,this.scope.id,{value:[],configurable:!0}),l[this.scope.id].push(m)),this.scope.fire("interactable:new",{target:l,options:u,interactable:m,win:this.scope._win}),m}},{key:"getExisting",value:function(l,u){var m=u&&u.context||this.scope.document,g=$.string(l),v=g?this.selectorMap[l]:l[this.scope.id];if(v)return ta(v,function(b){return b._context===m&&(g||b.inContext(l))})}},{key:"forEachMatch",value:function(l,u){for(var m=0,g=this.list;m<g.length;m++){var v=g[m],b=void 0;if(($.string(v.target)?$.element(l)&&To(l,v.target):l===v.target)&&v.inContext(l)&&(b=u(v)),b!==void 0)return b}}}]),c}(),h2=function(){function c(){var l=this;t(this,c),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=hr,this.defaults=ln(Du),this.Eventable=Uu,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(m){var g=function v(b,k){var w=m.interactables.getExisting(b,k);return w||((w=m.interactables.new(b,k)).events.global=v.globalEvents),w};return g.getPointerAverage=ku,g.getTouchBBox=Ol,g.getTouchDistance=Hl,g.getTouchAngle=Rl,g.getElementRect=_e,g.getElementClientRect=U,g.matchesSelector=To,g.closest=nn,g.globalEvents={},g.version="1.10.27",g.scope=m,g.use=function(v,b){return this.scope.usePlugin(v,b),this},g.isSet=function(v,b){return!!this.scope.interactables.get(v,b&&b.context)},g.on=ra(function(v,b,k){if($.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),$.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.on(_,b,k)}return this}if($.object(v)){for(var z in v)this.on(z,v[z],b);return this}return as(v,this.scope.actions)?this.globalEvents[v]?this.globalEvents[v].push(b):this.globalEvents[v]=[b]:this.scope.events.add(this.scope.document,v,b,{options:k}),this},"The interact.on() method is being deprecated"),g.off=ra(function(v,b,k){if($.string(v)&&v.search(" ")!==-1&&(v=v.trim().split(/ +/)),$.array(v)){for(var w=0,M=v;w<M.length;w++){var _=M[w];this.off(_,b,k)}return this}if($.object(v)){for(var z in v)this.off(z,v[z],b);return this}var j;return as(v,this.scope.actions)?v in this.globalEvents&&(j=this.globalEvents[v].indexOf(b))!==-1&&this.globalEvents[v].splice(j,1):this.scope.events.remove(this.scope.document,v,b,k),this},"The interact.off() method is being deprecated"),g.debug=function(){return this.scope},g.supportsTouch=function(){return hr.supportsTouch},g.supportsPointerEvent=function(){return hr.supportsPointerEvent},g.stop=function(){for(var v=0,b=this.scope.interactions.list;v<b.length;v++)b[v].stop();return this},g.pointerMoveTolerance=function(v){return $.number(v)?(this.scope.interactions.pointerMoveTolerance=v,this):this.scope.interactions.pointerMoveTolerance},g.addDocument=function(v,b){this.scope.addDocument(v,b)},g.removeDocument=function(v){this.scope.removeDocument(v)},g}(this),this.InteractEvent=Ul,this.Interactable=void 0,this.interactables=new u2(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(m){return l.removeDocument(m.target)};var u=this;this.Interactable=function(m){d(v,m);var g=x(v);function v(){return t(this,v),g.apply(this,arguments)}return n(v,[{key:"_defaults",get:function(){return u.defaults}},{key:"set",value:function(b){return y(h(v.prototype),"set",this).call(this,b),u.fire("interactable:set",{options:b,interactable:this}),this}},{key:"unset",value:function(){y(h(v.prototype),"unset",this).call(this);var b=u.interactables.list.indexOf(this);b<0||(u.interactables.list.splice(b,1),u.fire("interactable:unset",{interactable:this}))}}]),v}(d2)}return n(c,[{key:"addListeners",value:function(l,u){this.listenerMaps.push({id:u,map:l})}},{key:"fire",value:function(l,u){for(var m=0,g=this.listenerMaps;m<g.length;m++){var v=g[m].map[l];if(v&&v(u,this,l)===!1)return!1}}},{key:"init",value:function(l){return this.isInitialized?this:function(u,m){return u.isInitialized=!0,$.window(m)&&O(m),De.init(m),hr.init(m),li.init(m),u.window=m,u.document=m.document,u.usePlugin(c2),u.usePlugin(a2),u}(this,l)}},{key:"pluginIsInstalled",value:function(l){var u=l.id;return u?!!this._plugins.map[u]:this._plugins.list.indexOf(l)!==-1}},{key:"usePlugin",value:function(l,u){if(!this.isInitialized)return this;if(this.pluginIsInstalled(l))return this;if(l.id&&(this._plugins.map[l.id]=l),this._plugins.list.push(l),l.install&&l.install(this,u),l.listeners&&l.before){for(var m=0,g=this.listenerMaps.length,v=l.before.reduce(function(k,w){return k[w]=!0,k[Zu(w)]=!0,k},{});m<g;m++){var b=this.listenerMaps[m].id;if(b&&(v[b]||v[Zu(b)]))break}this.listenerMaps.splice(m,0,{id:l.id,map:l.listeners})}else l.listeners&&this.listenerMaps.push({id:l.id,map:l.listeners});return this}},{key:"addDocument",value:function(l,u){if(this.getDocIndex(l)!==-1)return!1;var m=H(l);u=u?q({},u):{},this.documents.push({doc:l,options:u}),this.events.documents.push(l),l!==this.document&&this.events.add(m,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:l,window:m,scope:this,options:u})}},{key:"removeDocument",value:function(l){var u=this.getDocIndex(l),m=H(l),g=this.documents[u].options;this.events.remove(m,"unload",this.onWindowUnload),this.documents.splice(u,1),this.events.documents.splice(u,1),this.fire("scope:remove-document",{doc:l,window:m,scope:this,options:g})}},{key:"getDocIndex",value:function(l){for(var u=0;u<this.documents.length;u++)if(this.documents[u].doc===l)return u;return-1}},{key:"getDocOptions",value:function(l){var u=this.getDocIndex(l);return u===-1?null:this.documents[u].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),c}();function Zu(c){return c&&c.replace(/\/.*$/,"")}var Qu=new h2,pr=Qu.interactStatic,p2=typeof globalThis<"u"?globalThis:window;Qu.init(p2);var m2=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(c){var l=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(m){var g=m[0],v=m[1];return g in c||v in c}),u=function(m,g){for(var v=c.range,b=c.limits,k=b===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:b,w=c.offset,M=w===void 0?{x:0,y:0}:w,_={range:v,grid:c,x:null,y:null},z=0;z<l.length;z++){var j=l[z],V=j[0],I=j[1],D=Math.round((m-M.x)/c[V]),K=Math.round((g-M.y)/c[I]);_[V]=Math.max(k.left,Math.min(k.right,D*c[V]+M.x)),_[I]=Math.max(k.top,Math.min(k.bottom,K*c[I]+M.y))}return _};return u.grid=c,u.coordFields=l,u}}),g2={id:"snappers",install:function(c){var l=c.interactStatic;l.snappers=q(l.snappers||{},m2),l.createSnapGrid=l.snappers.grid}},f2=g2,v2={start:function(c){var l=c.state,u=c.rect,m=c.edges,g=c.pageCoords,v=l.options,b=v.ratio,k=v.enabled,w=l.options,M=w.equalDelta,_=w.modifiers;b==="preserve"&&(b=u.width/u.height),l.startCoords=q({},g),l.startRect=q({},u),l.ratio=b,l.equalDelta=M;var z=l.linkedEdges={top:m.top||m.left&&!m.bottom,left:m.left||m.top&&!m.right,bottom:m.bottom||m.right&&!m.top,right:m.right||m.bottom&&!m.left};if(l.xIsPrimaryAxis=!(!m.left&&!m.right),l.equalDelta){var j=(z.left?1:-1)*(z.top?1:-1);l.edgeSign={x:j,y:j}}else l.edgeSign={x:z.left?-1:1,y:z.top?-1:1};if(k!==!1&&q(m,z),_!=null&&_.length){var V=new Wl(c.interaction);V.copyFrom(c.interaction.modification),V.prepareStates(_),l.subModification=V,V.startAll(o({},c))}},set:function(c){var l=c.state,u=c.rect,m=c.coords,g=l.linkedEdges,v=q({},m),b=l.equalDelta?b2:k2;if(q(c.edges,g),b(l,l.xIsPrimaryAxis,m,u),!l.subModification)return null;var k=q({},u);si(g,k,{x:m.x-v.x,y:m.y-v.y});var w=l.subModification.setAll(o(o({},c),{},{rect:k,edges:g,pageCoords:m,prevCoords:m,prevRect:k})),M=w.delta;return w.changed&&(b(l,Math.abs(M.x)>Math.abs(M.y),w.coords,w.rect),q(m,w.coords)),w.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function b2(c,l,u){var m=c.startCoords,g=c.edgeSign;l?u.y=m.y+(u.x-m.x)*g.y:u.x=m.x+(u.y-m.y)*g.x}function k2(c,l,u,m){var g=c.startRect,v=c.startCoords,b=c.ratio,k=c.edgeSign;if(l){var w=m.width/b;u.y=v.y+(w-g.height)*k.y}else{var M=m.height*b;u.x=v.x+(M-g.width)*k.x}}var y2=ci(v2,"aspectRatio"),Ju=function(){};Ju._defaults={};var ds=Ju;function Pi(c,l,u){return $.func(c)?so(c,l.interactable,l.element,[u.x,u.y,l]):so(c,l.interactable,l.element)}var us={start:function(c){var l=c.rect,u=c.startOffset,m=c.state,g=c.interaction,v=c.pageCoords,b=m.options,k=b.elementRect,w=q({left:0,top:0,right:0,bottom:0},b.offset||{});if(l&&k){var M=Pi(b.restriction,g,v);if(M){var _=M.right-M.left-l.width,z=M.bottom-M.top-l.height;_<0&&(w.left+=_,w.right+=_),z<0&&(w.top+=z,w.bottom+=z)}w.left+=u.left-l.width*k.left,w.top+=u.top-l.height*k.top,w.right+=u.right-l.width*(1-k.right),w.bottom+=u.bottom-l.height*(1-k.bottom)}m.offset=w},set:function(c){var l=c.coords,u=c.interaction,m=c.state,g=m.options,v=m.offset,b=Pi(g.restriction,u,l);if(b){var k=function(w){return!w||"left"in w&&"top"in w||((w=q({},w)).left=w.x||0,w.top=w.y||0,w.right=w.right||w.left+w.width,w.bottom=w.bottom||w.top+w.height),w}(b);l.x=Math.max(Math.min(k.right-v.right,l.x),k.left+v.left),l.y=Math.max(Math.min(k.bottom-v.bottom,l.y),k.top+v.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},x2=ci(us,"restrict"),eh={top:1/0,left:1/0,bottom:-1/0,right:-1/0},th={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function rh(c,l){for(var u=0,m=["top","left","bottom","right"];u<m.length;u++){var g=m[u];g in c||(c[g]=l[g])}return c}var na={noInner:eh,noOuter:th,start:function(c){var l,u=c.interaction,m=c.startOffset,g=c.state,v=g.options;v&&(l=Xr(Pi(v.offset,u,u.coords.start.page))),l=l||{x:0,y:0},g.offset={top:l.y+m.top,left:l.x+m.left,bottom:l.y-m.bottom,right:l.x-m.right}},set:function(c){var l=c.coords,u=c.edges,m=c.interaction,g=c.state,v=g.offset,b=g.options;if(u){var k=q({},l),w=Pi(b.inner,m,k)||{},M=Pi(b.outer,m,k)||{};rh(w,eh),rh(M,th),u.top?l.y=Math.min(Math.max(M.top+v.top,k.y),w.top+v.top):u.bottom&&(l.y=Math.max(Math.min(M.bottom+v.bottom,k.y),w.bottom+v.bottom)),u.left?l.x=Math.min(Math.max(M.left+v.left,k.x),w.left+v.left):u.right&&(l.x=Math.max(Math.min(M.right+v.right,k.x),w.right+v.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},w2=ci(na,"restrictEdges"),_2=q({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(c){}},us.defaults),M2=ci({start:us.start,set:us.set,defaults:_2},"restrictRect"),C2={width:-1/0,height:-1/0},z2={width:1/0,height:1/0},E2=ci({start:function(c){return na.start(c)},set:function(c){var l=c.interaction,u=c.state,m=c.rect,g=c.edges,v=u.options;if(g){var b=lo(Pi(v.min,l,c.coords))||C2,k=lo(Pi(v.max,l,c.coords))||z2;u.options={endOnly:v.endOnly,inner:q({},na.noInner),outer:q({},na.noOuter)},g.top?(u.options.inner.top=m.bottom-b.height,u.options.outer.top=m.bottom-k.height):g.bottom&&(u.options.inner.bottom=m.top+b.height,u.options.outer.bottom=m.top+k.height),g.left?(u.options.inner.left=m.right-b.width,u.options.outer.left=m.right-k.width):g.right&&(u.options.inner.right=m.left+b.width,u.options.outer.right=m.left+k.width),na.set(c),u.options=v}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ql={start:function(c){var l,u=c.interaction,m=c.interactable,g=c.element,v=c.rect,b=c.state,k=c.startOffset,w=b.options,M=w.offsetWithOrigin?function(j){var V=j.interaction.element,I=Xr(so(j.state.options.origin,null,null,[V])),D=I||Lo(j.interactable,V,j.interaction.prepared.name);return D}(c):{x:0,y:0};if(w.offset==="startCoords")l={x:u.coords.start.page.x,y:u.coords.start.page.y};else{var _=so(w.offset,m,g,[u]);(l=Xr(_)||{x:0,y:0}).x+=M.x,l.y+=M.y}var z=w.relativePoints;b.offsets=v&&z&&z.length?z.map(function(j,V){return{index:V,relativePoint:j,x:k.left-v.width*j.x+l.x,y:k.top-v.height*j.y+l.y}}):[{index:0,relativePoint:null,x:l.x,y:l.y}]},set:function(c){var l=c.interaction,u=c.coords,m=c.state,g=m.options,v=m.offsets,b=Lo(l.interactable,l.element,l.prepared.name),k=q({},u),w=[];g.offsetWithOrigin||(k.x-=b.x,k.y-=b.y);for(var M=0,_=v;M<_.length;M++)for(var z=_[M],j=k.x-z.x,V=k.y-z.y,I=0,D=g.targets.length;I<D;I++){var K=g.targets[I],B=void 0;(B=$.func(K)?K(j,V,l._proxy,z,I):K)&&w.push({x:($.number(B.x)?B.x:j)+z.x,y:($.number(B.y)?B.y:V)+z.y,range:$.number(B.range)?B.range:g.range,source:K,index:I,offset:z})}for(var W={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},ce=0;ce<w.length;ce++){var ye=w[ce],ee=ye.range,he=ye.x-k.x,mr=ye.y-k.y,et=Qn(he,mr),Nr=et<=ee;ee===1/0&&W.inRange&&W.range!==1/0&&(Nr=!1),W.target&&!(Nr?W.inRange&&ee!==1/0?et/ee<W.distance/W.range:ee===1/0&&W.range!==1/0||et<W.distance:!W.inRange&&et<W.distance)||(W.target=ye,W.distance=et,W.range=ee,W.inRange=Nr,W.delta.x=he,W.delta.y=mr)}return W.inRange&&(u.x=W.target.x,u.y=W.target.y),m.closest=W,W},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},S2=ci(Ql,"snap"),hs={start:function(c){var l=c.state,u=c.edges,m=l.options;if(!u)return null;c.state={options:{targets:null,relativePoints:[{x:u.left?0:1,y:u.top?0:1}],offset:m.offset||"self",origin:{x:0,y:0},range:m.range}},l.targetFields=l.targetFields||[["width","height"],["x","y"]],Ql.start(c),l.offsets=c.state.offsets,c.state=l},set:function(c){var l=c.interaction,u=c.state,m=c.coords,g=u.options,v=u.offsets,b={x:m.x-v[0].x,y:m.y-v[0].y};u.options=q({},g),u.options.targets=[];for(var k=0,w=g.targets||[];k<w.length;k++){var M=w[k],_=void 0;if(_=$.func(M)?M(b.x,b.y,l):M){for(var z=0,j=u.targetFields;z<j.length;z++){var V=j[z],I=V[0],D=V[1];if(I in _||D in _){_.x=_[I],_.y=_[D];break}}u.options.targets.push(_)}}var K=Ql.set(c);return u.options=g,K},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},$2=ci(hs,"snapSize"),Jl={aspectRatio:y2,restrictEdges:w2,restrict:x2,restrictRect:M2,restrictSize:E2,snapEdges:ci({start:function(c){var l=c.edges;return l?(c.state.targetFields=c.state.targetFields||[[l.left?"left":"right",l.top?"top":"bottom"]],hs.start(c)):null},set:hs.set,defaults:q(ln(hs.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:S2,snapSize:$2,spring:ds,avoid:ds,transform:ds,rubberband:ds},T2={id:"modifiers",install:function(c){var l=c.interactStatic;for(var u in c.usePlugin(Vu),c.usePlugin(f2),l.modifiers=Jl,Jl){var m=Jl[u],g=m._defaults,v=m._methods;g._methods=v,c.defaults.perAction[u]=g}}},A2=T2,oh=function(c){d(u,c);var l=x(u);function u(m,g,v,b,k,w){var M;if(t(this,u),ts(f(M=l.call(this,k)),v),v!==g&&ts(f(M),g),M.timeStamp=w,M.originalEvent=v,M.type=m,M.pointerId=Jn(g),M.pointerType=yu(g),M.target=b,M.currentTarget=null,m==="tap"){var _=k.getPointerIndex(g);M.dt=M.timeStamp-k.pointers[_].downTime;var z=M.timeStamp-k.tapTime;M.double=!!k.prevTap&&k.prevTap.type!=="doubletap"&&k.prevTap.target===M.target&&z<500}else m==="doubletap"&&(M.dt=g.timeStamp-k.tapTime,M.double=!0);return M}return n(u,[{key:"_subtractOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX-=g,this.pageY-=v,this.clientX-=g,this.clientY-=v,this}},{key:"_addOrigin",value:function(m){var g=m.x,v=m.y;return this.pageX+=g,this.pageY+=v,this.clientX+=g,this.clientY+=v,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),u}(is),aa={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(c){c.pointerEvents=aa,c.defaults.actions.pointerEvents=aa.defaults,q(c.actions.phaselessTypes,aa.types)},listeners:{"interactions:new":function(c){var l=c.interaction;l.prevTap=null,l.tapTime=0},"interactions:update-pointer":function(c){var l=c.down,u=c.pointerInfo;!l&&u.hold||(u.hold={duration:1/0,timeout:null})},"interactions:move":function(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget;c.duplicate||u.pointerIsDown&&!u.pointerWasMoved||(u.pointerIsDown&&ec(c),ui({interaction:u,pointer:m,event:g,eventTarget:v,type:"move"},l))},"interactions:down":function(c,l){(function(u,m){for(var g=u.interaction,v=u.pointer,b=u.event,k=u.eventTarget,w=u.pointerIndex,M=g.pointers[w].hold,_=ne(k),z={interaction:g,pointer:v,event:b,eventTarget:k,type:"hold",targets:[],path:_,node:null},j=0;j<_.length;j++){var V=_[j];z.node=V,m.fire("pointerEvents:collect-targets",z)}if(z.targets.length){for(var I=1/0,D=0,K=z.targets;D<K.length;D++){var B=K[D].eventable.options.holdDuration;B<I&&(I=B)}M.duration=I,M.timeout=setTimeout(function(){ui({interaction:g,eventTarget:k,pointer:v,event:b,type:"hold"},m)},I)}})(c,l),ui(c,l)},"interactions:up":function(c,l){ec(c),ui(c,l),function(u,m){var g=u.interaction,v=u.pointer,b=u.event,k=u.eventTarget;g.pointerWasMoved||ui({interaction:g,eventTarget:k,pointer:v,event:b,type:"tap"},m)}(c,l)},"interactions:cancel":function(c,l){ec(c),ui(c,l)}},PointerEvent:oh,fire:ui,collectEventTargets:ih,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function ui(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,k=c.targets,w=k===void 0?ih(c,l):k,M=new oh(b,m,g,v,u,l.now());l.fire("pointerEvents:new",{pointerEvent:M});for(var _={interaction:u,pointer:m,event:g,eventTarget:v,targets:w,type:b,pointerEvent:M},z=0;z<w.length;z++){var j=w[z];for(var V in j.props||{})M[V]=j.props[V];var I=Lo(j.eventable,j.node);if(M._subtractOrigin(I),M.eventable=j.eventable,M.currentTarget=j.node,j.eventable.fire(M),M._addOrigin(I),M.immediatePropagationStopped||M.propagationStopped&&z+1<w.length&&w[z+1].node!==M.currentTarget)break}if(l.fire("pointerEvents:fired",_),b==="tap"){var D=M.double?ui({interaction:u,pointer:m,event:g,eventTarget:v,type:"doubletap"},l):M;u.prevTap=D,u.tapTime=D.timeStamp}return M}function ih(c,l){var u=c.interaction,m=c.pointer,g=c.event,v=c.eventTarget,b=c.type,k=u.getPointerIndex(m),w=u.pointers[k];if(b==="tap"&&(u.pointerWasMoved||!w||w.downTarget!==v))return[];for(var M=ne(v),_={interaction:u,pointer:m,event:g,eventTarget:v,type:b,path:M,targets:[],node:null},z=0;z<M.length;z++){var j=M[z];_.node=j,l.fire("pointerEvents:collect-targets",_)}return b==="hold"&&(_.targets=_.targets.filter(function(V){var I,D;return V.eventable.options.holdDuration===((I=u.pointers[k])==null||(D=I.hold)==null?void 0:D.duration)})),_.targets}function ec(c){var l=c.interaction,u=c.pointerIndex,m=l.pointers[u].hold;m&&m.timeout&&(clearTimeout(m.timeout),m.timeout=null)}var j2=Object.freeze({__proto__:null,default:aa});function P2(c){var l=c.interaction;l.holdIntervalHandle&&(clearInterval(l.holdIntervalHandle),l.holdIntervalHandle=null)}var O2={id:"pointer-events/holdRepeat",install:function(c){c.usePlugin(aa);var l=c.pointerEvents;l.defaults.holdRepeatInterval=0,l.types.holdrepeat=c.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(c,l){return c["pointerEvents:".concat(l)]=P2,c},{"pointerEvents:new":function(c){var l=c.pointerEvent;l.type==="hold"&&(l.count=(l.count||0)+1)},"pointerEvents:fired":function(c,l){var u=c.interaction,m=c.pointerEvent,g=c.eventTarget,v=c.targets;if(m.type==="hold"&&v.length){var b=v[0].eventable.options.holdRepeatInterval;b<=0||(u.holdIntervalHandle=setTimeout(function(){l.pointerEvents.fire({interaction:u,eventTarget:g,type:"hold",pointer:m,event:m},l)},b))}}})},H2=O2,R2={id:"pointer-events/interactableTargets",install:function(c){var l=c.Interactable;l.prototype.pointerEvents=function(m){return q(this.events.options,m),this};var u=l.prototype._backCompatOption;l.prototype._backCompatOption=function(m,g){var v=u.call(this,m,g);return v===this&&(this.events.options[m]=g),v}},listeners:{"pointerEvents:collect-targets":function(c,l){var u=c.targets,m=c.node,g=c.type,v=c.eventTarget;l.interactables.forEachMatch(m,function(b){var k=b.events,w=k.options;k.types[g]&&k.types[g].length&&b.testIgnoreAllow(w,m,v)&&u.push({node:m,eventable:k,props:{interactable:b}})})},"interactable:new":function(c){var l=c.interactable;l.events.getRect=function(u){return l.getRect(u)}},"interactable:set":function(c,l){var u=c.interactable,m=c.options;q(u.events.options,l.pointerEvents.defaults),q(u.events.options,m.pointerEvents||{})}}},I2=R2,V2={id:"pointer-events",install:function(c){c.usePlugin(j2),c.usePlugin(H2),c.usePlugin(I2)}},D2=V2,F2={id:"reflow",install:function(c){var l=c.Interactable;c.actions.phases.reflow=!0,l.prototype.reflow=function(u){return function(m,g,v){for(var b=m.getAllElements(),k=v.window.Promise,w=k?[]:null,M=function(){var z=b[_],j=m.getRect(z);if(!j)return 1;var V,I=ta(v.interactions.list,function(B){return B.interacting()&&B.interactable===m&&B.element===z&&B.prepared.name===g.name});if(I)I.move(),w&&(V=I._reflowPromise||new k(function(B){I._reflowResolve=B}));else{var D=lo(j),K=function(B){return{coords:B,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:D.x,y:D.y},client:{x:D.x,y:D.y},timeStamp:v.now()});V=function(B,W,ce,ye,ee){var he=B.interactions.new({pointerType:"reflow"}),mr={interaction:he,event:ee,pointer:ee,eventTarget:ce,phase:"reflow"};he.interactable=W,he.element=ce,he.prevEvent=ee,he.updatePointer(ee,ee,ce,!0),fu(he.coords.delta),Ll(he.prepared,ye),he._doPhase(mr);var et=B.window,Nr=et.Promise,uo=Nr?new Nr(function(Ko){he._reflowResolve=Ko}):void 0;return he._reflowPromise=uo,he.start(ye,W,ce),he._interacting?(he.move(mr),he.end(ee)):(he.stop(),he._reflowResolve()),he.removePointer(ee,ee),uo}(v,m,z,g,K)}w&&w.push(V)},_=0;_<b.length&&!M();_++);return w&&k.all(w).then(function(){return m})}(this,u,c)}},listeners:{"interactions:stop":function(c,l){var u=c.interaction;u.pointerType==="reflow"&&(u._reflowResolve&&u._reflowResolve(),function(m,g){m.splice(m.indexOf(g),1)}(l.interactions.list,u))}}},N2=F2;if(pr.use(Iu),pr.use(Bu),pr.use(D2),pr.use(i2),pr.use(A2),pr.use(W0),pr.use(H0),pr.use(I0),pr.use(N2),pr.default=pr,(typeof Ni>"u"?"undefined":e(Ni))==="object"&&Ni)try{Ni.exports=pr}catch{}return pr.default=pr,pr})});import{css as dg,html as un,LitElement as ug,nothing as Yh}from"lit";import{customElement as hg,property as Ao,state as zs}from"lit/decorators.js";import{css as dh}from"lit";var A=dh`
|
|
2
2
|
:host {
|
|
3
3
|
/* Surfaces (refined workbench light) */
|
|
4
4
|
--lui-color-bg: #ffffff;
|
|
@@ -107,22 +107,20 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
107
107
|
|
|
108
108
|
/* Input focus rings
|
|
109
109
|
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* No dark-theme variants needed:
|
|
116
|
-
* --lui-color-primary /
|
|
110
|
+
* A single soft outer glow hugging the control's own border, not a second
|
|
111
|
+
* frame: the earlier two-layer ring -- an inset line plus a 1px halo -- sat
|
|
112
|
+
* flush against the primary 1px border and read as one blurry double
|
|
113
|
+
* border. Every text-like control -- input, textarea, input-number,
|
|
114
|
+
* input-opt, select, datepicker, colour picker, icon picker -- reads these
|
|
115
|
+
* instead of restating the color-mix pairs. No dark-theme variants needed:
|
|
116
|
+
* the mixes resolve against the themed --lui-color-primary /
|
|
117
|
+
* --lui-color-danger. */
|
|
117
118
|
--lui-ring-focus:
|
|
118
|
-
|
|
119
|
-
0 0 0 1px color-mix(in srgb, var(--lui-color-primary) 14%, transparent);
|
|
119
|
+
0 0 0 2px color-mix(in srgb, var(--lui-color-primary) 10%, transparent);
|
|
120
120
|
--lui-ring-invalid:
|
|
121
|
-
|
|
122
|
-
0 0 0 1px color-mix(in srgb, var(--lui-color-danger) 10%, transparent);
|
|
121
|
+
0 0 0 2px color-mix(in srgb, var(--lui-color-danger) 8%, transparent);
|
|
123
122
|
--lui-ring-invalid-focus:
|
|
124
|
-
|
|
125
|
-
0 0 0 1px color-mix(in srgb, var(--lui-color-danger) 14%, transparent);
|
|
123
|
+
0 0 0 2px color-mix(in srgb, var(--lui-color-danger) 12%, transparent);
|
|
126
124
|
|
|
127
125
|
/* Scrim behind floating surfaces */
|
|
128
126
|
--lui-color-scrim: rgba(0, 0, 0, 0.42);
|
|
@@ -419,7 +417,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
419
417
|
transform: rotate(360deg);
|
|
420
418
|
}
|
|
421
419
|
}
|
|
422
|
-
`],a([Ne()],Ce.prototype,"name",2),a([Ne({reflect:!0})],Ce.prototype,"type",2),a([Ne()],Ce.prototype,"src",2),a([Ne()],Ce.prototype,"svg",2),a([Ne({attribute:"svg-body"})],Ce.prototype,"svgBody",2),a([Ne({attribute:"icon-class"})],Ce.prototype,"iconClass",2),a([Ne()],Ce.prototype,"alt",2),a([Ne({attribute:"aria-label"})],Ce.prototype,"ariaLabel",2),a([Ne({type:Boolean,reflect:!0})],Ce.prototype,"decorative",2),a([Ne()],Ce.prototype,"color",2),a([Ne()],Ce.prototype,"size",2),a([Ne({type:Boolean,reflect:!0})],Ce.prototype,"spin",2),a([Ne({attribute:!1})],Ce.prototype,"builtinPrefix",2),a([Ne()],Ce.prototype,"glyph",2),a([Ne({attribute:"font-family"})],Ce.prototype,"fontFamily",2),a([Ne({attribute:"font-weight"})],Ce.prototype,"fontWeight",2),a([Ne({type:Number})],Ce.prototype,"rotate",2),a([Ne({type:Boolean,attribute:"flip-h"})],Ce.prototype,"flipH",2),a([Ne({type:Boolean,attribute:"flip-v"})],Ce.prototype,"flipV",2),a([Ne({attribute:"view-box"})],Ce.prototype,"viewBox",2),a([Ne({attribute:"preserve-aspect-ratio"})],Ce.prototype,"preserveAspectRatio",2),a([Ne({attribute:"stroke-width"})],Ce.prototype,"strokeWidth",2),a([Ne()],Ce.prototype,"stroke",2),a([Ne()],Ce.prototype,"fill",2),a([Ne({attribute:"stroke-linecap"})],Ce.prototype,"strokeLinecap",2),a([Ne({attribute:"stroke-linejoin"})],Ce.prototype,"strokeLinejoin",2),Ce=a([ig("lui-icon")],Ce);import{css as ag,html as sg,LitElement as lg}from"lit";import{customElement as cg,property as Oi}from"lit/decorators.js";var
|
|
420
|
+
`],a([Ne()],Ce.prototype,"name",2),a([Ne({reflect:!0})],Ce.prototype,"type",2),a([Ne()],Ce.prototype,"src",2),a([Ne()],Ce.prototype,"svg",2),a([Ne({attribute:"svg-body"})],Ce.prototype,"svgBody",2),a([Ne({attribute:"icon-class"})],Ce.prototype,"iconClass",2),a([Ne()],Ce.prototype,"alt",2),a([Ne({attribute:"aria-label"})],Ce.prototype,"ariaLabel",2),a([Ne({type:Boolean,reflect:!0})],Ce.prototype,"decorative",2),a([Ne()],Ce.prototype,"color",2),a([Ne()],Ce.prototype,"size",2),a([Ne({type:Boolean,reflect:!0})],Ce.prototype,"spin",2),a([Ne({attribute:!1})],Ce.prototype,"builtinPrefix",2),a([Ne()],Ce.prototype,"glyph",2),a([Ne({attribute:"font-family"})],Ce.prototype,"fontFamily",2),a([Ne({attribute:"font-weight"})],Ce.prototype,"fontWeight",2),a([Ne({type:Number})],Ce.prototype,"rotate",2),a([Ne({type:Boolean,attribute:"flip-h"})],Ce.prototype,"flipH",2),a([Ne({type:Boolean,attribute:"flip-v"})],Ce.prototype,"flipV",2),a([Ne({attribute:"view-box"})],Ce.prototype,"viewBox",2),a([Ne({attribute:"preserve-aspect-ratio"})],Ce.prototype,"preserveAspectRatio",2),a([Ne({attribute:"stroke-width"})],Ce.prototype,"strokeWidth",2),a([Ne()],Ce.prototype,"stroke",2),a([Ne()],Ce.prototype,"fill",2),a([Ne({attribute:"stroke-linecap"})],Ce.prototype,"strokeLinecap",2),a([Ne({attribute:"stroke-linejoin"})],Ce.prototype,"strokeLinejoin",2),Ce=a([ig("lui-icon")],Ce);import{css as ag,html as sg,LitElement as lg}from"lit";import{customElement as cg,property as Oi}from"lit/decorators.js";var Lr=class extends lg{constructor(){super(...arguments);this.variant="current";this.decorative=!0}willUpdate(e){e.has("size")&&this._applyLength("--lui-spinner-size",this.size),e.has("thickness")&&this._applyLength("--lui-spinner-thickness",this.thickness),e.has("color")&&this._applyRaw("--lui-spinner-color",this.color),e.has("track")&&this._applyRaw("--lui-spinner-track",this.track),(e.has("decorative")||e.has("label"))&&this._syncA11y()}_applyLength(e,t){if(t==null||t===""){this.style.removeProperty(e);return}this.style.setProperty(e,pt(t))}_applyRaw(e,t){if(!t){this.style.removeProperty(e);return}this.style.setProperty(e,t)}_syncA11y(){if(this.decorative&&!this.label){this.setAttribute("aria-hidden","true"),this.removeAttribute("role"),this.removeAttribute("aria-label");return}this.removeAttribute("aria-hidden"),this.setAttribute("role","status"),this.label?this.setAttribute("aria-label",this.label):this.removeAttribute("aria-label")}connectedCallback(){super.connectedCallback(),this._syncA11y()}render(){return sg`<span class="ring" part="ring"></span>`}};Lr.styles=[A,P,ag`
|
|
423
421
|
:host {
|
|
424
422
|
display: inline-flex;
|
|
425
423
|
flex-shrink: 0;
|
|
@@ -457,7 +455,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
457
455
|
animation-duration: 2.4s;
|
|
458
456
|
}
|
|
459
457
|
}
|
|
460
|
-
`],a([Oi({reflect:!0})],
|
|
458
|
+
`],a([Oi({reflect:!0})],Lr.prototype,"variant",2),a([Oi()],Lr.prototype,"size",2),a([Oi()],Lr.prototype,"thickness",2),a([Oi()],Lr.prototype,"color",2),a([Oi()],Lr.prototype,"track",2),a([Oi({type:Boolean,reflect:!0})],Lr.prototype,"decorative",2),a([Oi()],Lr.prototype,"label",2),Lr=a([cg("lui-spinner")],Lr);var yt=class extends ug{constructor(){super(...arguments);this.variant="default";this.size="md";this.radius="md";this.disabled=!1;this.loading=!1;this.iconOnly=!1;this.block=!1;this.ripple=!1;this.icon="";this.type="button";this._ripples=[];this._hasPrefixSlot=!1;this._hasDefaultSlot=!1;this._hasSuffixSlot=!1;this._rippleId=0;this._explicitAttrs=new Set;this._onPointerDown=e=>{if(!this.ripple||this.disabled||this.loading)return;let t=e.currentTarget;if(!t)return;let r=t.getBoundingClientRect(),n=Math.max(r.width,r.height)*1.15,s=e.clientX-r.left,d=e.clientY-r.top,h=++this._rippleId;this._ripples=[...this._ripples,{id:h,x:s,y:d,size:n}],window.setTimeout(()=>{this._ripples=this._ripples.filter(p=>p.id!==h)},560)};this._onPrefixSlotChange=e=>{this._hasPrefixSlot=this._slotHasContent(e.currentTarget)};this._onDefaultSlotChange=e=>{this._hasDefaultSlot=this._slotHasContent(e.currentTarget)};this._onSuffixSlotChange=e=>{this._hasSuffixSlot=this._slotHasContent(e.currentTarget)}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=F(this,"button");!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("ripple")&&typeof t.ripple=="boolean"&&this.ripple!==t.ripple&&(this.ripple=t.ripple),!this._explicitAttrs.has("block")&&typeof t.block=="boolean"&&this.block!==t.block&&(this.block=t.block)}_slotHasContent(e){return e.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent?.trim():t.nodeType===Node.ELEMENT_NODE)}render(){return un`
|
|
461
459
|
<button
|
|
462
460
|
part="button"
|
|
463
461
|
type=${this.type}
|
|
@@ -503,6 +501,9 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
503
501
|
--lui-button-padding-x: 16px;
|
|
504
502
|
--lui-button-font-size: var(--lui-font-size-sm);
|
|
505
503
|
--lui-button-gap: 8px;
|
|
504
|
+
/* Public override for icon glyph size inside prefix / suffix / icon-only.
|
|
505
|
+
* Falls back to the global --lui-icon-size so existing themes keep working. */
|
|
506
|
+
--lui-button-icon-size: var(--lui-icon-size, 18px);
|
|
506
507
|
}
|
|
507
508
|
:host([block]) {
|
|
508
509
|
display: flex;
|
|
@@ -638,7 +639,8 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
638
639
|
align-items: center;
|
|
639
640
|
justify-content: center;
|
|
640
641
|
flex-shrink: 0;
|
|
641
|
-
|
|
642
|
+
--lui-icon-size: var(--lui-button-icon-size);
|
|
643
|
+
font-size: var(--lui-button-icon-size);
|
|
642
644
|
line-height: 1;
|
|
643
645
|
}
|
|
644
646
|
button:hover:not(:disabled) {
|
|
@@ -732,7 +734,8 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
732
734
|
gap: 0;
|
|
733
735
|
}
|
|
734
736
|
:host([icon-only]) ::slotted(lui-icon) {
|
|
735
|
-
|
|
737
|
+
--lui-icon-size: var(--lui-button-icon-size);
|
|
738
|
+
font-size: var(--lui-button-icon-size);
|
|
736
739
|
}
|
|
737
740
|
|
|
738
741
|
/* Geometry and animation live in lui-spinner; this only sets the hairline
|
|
@@ -750,7 +753,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
750
753
|
transform: translate(-50%, -50%) scale(2.4);
|
|
751
754
|
}
|
|
752
755
|
}
|
|
753
|
-
`],a([Ao({reflect:!0})],yt.prototype,"variant",2),a([Ao({reflect:!0})],yt.prototype,"size",2),a([Ao({reflect:!0})],yt.prototype,"radius",2),a([Ao({type:Boolean,reflect:!0})],yt.prototype,"disabled",2),a([Ao({type:Boolean,reflect:!0})],yt.prototype,"loading",2),a([Ao({type:Boolean,reflect:!0,attribute:"icon-only"})],yt.prototype,"iconOnly",2),a([Ao({type:Boolean,reflect:!0})],yt.prototype,"block",2),a([Ao({type:Boolean,reflect:!0})],yt.prototype,"ripple",2),a([Ao()],yt.prototype,"icon",2),a([Ao()],yt.prototype,"type",2),a([zs()],yt.prototype,"_ripples",2),a([zs()],yt.prototype,"_hasPrefixSlot",2),a([zs()],yt.prototype,"_hasDefaultSlot",2),a([zs()],yt.prototype,"_hasSuffixSlot",2),yt=a([hg("lui-button")],yt);import{css as pf,html as bn,LitElement as mf,nothing as bi}from"lit";import{customElement as gf,property as Lt,query as fp,queryAssignedElements as ff,state as vp}from"lit/decorators.js";function re(i,o){if(!i||!o)return;let{style:e,className:t,class:r,...n}=o;if(Object.assign(i,n),typeof t=="string"&&(i.className=t),typeof r=="string"&&i.setAttribute("class",r),typeof e=="string"){i.setAttribute("style",e);return}if(e&&typeof e=="object"){for(let[s,d]of Object.entries(e))if(d!=null)if(s.includes("-"))i.style.setProperty(s,String(d));else try{i.style[s]=String(d)}catch{i.style.setProperty(s,String(d))}}}function Xh(i){let{selection:o,currentValue:e,currentValues:t,nextValue:r}=i;return o==="none"?{value:e,values:t.slice()}:o==="single"?{value:r,values:[r]}:{value:void 0,values:t.includes(r)?t.filter(s=>s!==r):[...t,r]}}function Zh(i){let{itemWidths:o,containerWidth:e,overflowTriggerWidth:t,minVisibleItems:r=0}=i;if(!o.length)return{visibleIndexes:[],overflowIndexes:[],needsOverflow:!1};let n=Math.max(0,e),s=Math.max(0,t),d=y=>o.slice(0,y).map((C,S)=>S),h=y=>o.slice(y).map((C,S)=>y+S);if(o.reduce((y,C)=>y+Math.max(0,C),0)<=n)return{visibleIndexes:d(o.length),overflowIndexes:[],needsOverflow:!1};let f=Math.min(Math.max(0,r),o.length),x=o.length;for(;x>f&&!(o.slice(0,x).reduce((C,S)=>C+Math.max(0,S),0)+s<=n);)x-=1;return{visibleIndexes:d(x),overflowIndexes:h(x),needsOverflow:x<o.length}}import{css as pg,html as Qh,LitElement as mg}from"lit";import{customElement as gg,property as
|
|
756
|
+
`],a([Ao({reflect:!0})],yt.prototype,"variant",2),a([Ao({reflect:!0})],yt.prototype,"size",2),a([Ao({reflect:!0})],yt.prototype,"radius",2),a([Ao({type:Boolean,reflect:!0})],yt.prototype,"disabled",2),a([Ao({type:Boolean,reflect:!0})],yt.prototype,"loading",2),a([Ao({type:Boolean,reflect:!0,attribute:"icon-only"})],yt.prototype,"iconOnly",2),a([Ao({type:Boolean,reflect:!0})],yt.prototype,"block",2),a([Ao({type:Boolean,reflect:!0})],yt.prototype,"ripple",2),a([Ao()],yt.prototype,"icon",2),a([Ao()],yt.prototype,"type",2),a([zs()],yt.prototype,"_ripples",2),a([zs()],yt.prototype,"_hasPrefixSlot",2),a([zs()],yt.prototype,"_hasDefaultSlot",2),a([zs()],yt.prototype,"_hasSuffixSlot",2),yt=a([hg("lui-button")],yt);import{css as pf,html as bn,LitElement as mf,nothing as bi}from"lit";import{customElement as gf,property as Lt,query as fp,queryAssignedElements as ff,state as vp}from"lit/decorators.js";function re(i,o){if(!i||!o)return;let{style:e,className:t,class:r,...n}=o;if(Object.assign(i,n),typeof t=="string"&&(i.className=t),typeof r=="string"&&i.setAttribute("class",r),typeof e=="string"){i.setAttribute("style",e);return}if(e&&typeof e=="object"){for(let[s,d]of Object.entries(e))if(d!=null)if(s.includes("-"))i.style.setProperty(s,String(d));else try{i.style[s]=String(d)}catch{i.style.setProperty(s,String(d))}}}function Xh(i){let{selection:o,currentValue:e,currentValues:t,nextValue:r}=i;return o==="none"?{value:e,values:t.slice()}:o==="single"?{value:r,values:[r]}:{value:void 0,values:t.includes(r)?t.filter(s=>s!==r):[...t,r]}}function Zh(i){let{itemWidths:o,containerWidth:e,overflowTriggerWidth:t,minVisibleItems:r=0}=i;if(!o.length)return{visibleIndexes:[],overflowIndexes:[],needsOverflow:!1};let n=Math.max(0,e),s=Math.max(0,t),d=y=>o.slice(0,y).map((C,S)=>S),h=y=>o.slice(y).map((C,S)=>y+S);if(o.reduce((y,C)=>y+Math.max(0,C),0)<=n)return{visibleIndexes:d(o.length),overflowIndexes:[],needsOverflow:!1};let f=Math.min(Math.max(0,r),o.length),x=o.length;for(;x>f&&!(o.slice(0,x).reduce((C,S)=>C+Math.max(0,S),0)+s<=n);)x-=1;return{visibleIndexes:d(x),overflowIndexes:h(x),needsOverflow:x<o.length}}import{css as pg,html as Qh,LitElement as mg}from"lit";import{customElement as gg,property as Tr,state as fg}from"lit/decorators.js";var mt=class extends mg{constructor(){super(...arguments);this.variant="default";this.size="md";this.radius="md";this.value="";this.pressed=!1;this.disabled=!1;this.grouped=!1;this.first=!1;this.last=!1;this.vertical=!1;this.indicatorSelected=!1;this.dividerHidden=!1;this.interactionActive=!1;this.ripple=!1;this._ripples=[];this._rippleId=0;this._emitActivate=()=>{this.disabled||this.dispatchEvent(new CustomEvent("button-group-item-activate",{detail:{value:this.value,item:this},bubbles:!0,composed:!0}))};this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._emitActivate())};this._onPointerDown=e=>{if(!this.ripple||this.disabled)return;let t=e.currentTarget;if(!t)return;let r=t.getBoundingClientRect(),n=Math.max(r.width,r.height)*1.15,s=e.clientX-r.left,d=e.clientY-r.top,h=++this._rippleId;this._ripples=[...this._ripples,{id:h,x:s,y:d,size:n}],window.setTimeout(()=>{this._ripples=this._ripples.filter(p=>p.id!==h)},560)}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}trigger(){this._emitActivate()}render(){return Qh`
|
|
754
757
|
<button
|
|
755
758
|
part="button"
|
|
756
759
|
type="button"
|
|
@@ -1073,7 +1076,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
1073
1076
|
transform: translate(-50%, -50%) scale(2.4);
|
|
1074
1077
|
}
|
|
1075
1078
|
}
|
|
1076
|
-
`],a([
|
|
1079
|
+
`],a([Tr({reflect:!0})],mt.prototype,"variant",2),a([Tr({reflect:!0})],mt.prototype,"size",2),a([Tr({reflect:!0})],mt.prototype,"radius",2),a([Tr({reflect:!0})],mt.prototype,"value",2),a([Tr({type:Boolean,reflect:!0})],mt.prototype,"pressed",2),a([Tr({type:Boolean,reflect:!0})],mt.prototype,"disabled",2),a([Tr({type:Boolean,reflect:!0})],mt.prototype,"grouped",2),a([Tr({type:Boolean,reflect:!0})],mt.prototype,"first",2),a([Tr({type:Boolean,reflect:!0})],mt.prototype,"last",2),a([Tr({type:Boolean,reflect:!0})],mt.prototype,"vertical",2),a([Tr({type:Boolean,attribute:"indicator-selected",reflect:!0})],mt.prototype,"indicatorSelected",2),a([Tr({type:Boolean,attribute:"divider-hidden",reflect:!0})],mt.prototype,"dividerHidden",2),a([Tr({type:Boolean,attribute:"interaction-active",reflect:!0})],mt.prototype,"interactionActive",2),a([Tr({type:Boolean,reflect:!0})],mt.prototype,"ripple",2),a([fg()],mt.prototype,"_ripples",2),mt=a([gg("lui-button-group-item")],mt);import{css as af,html as vn,LitElement as sf,nothing as Vs}from"lit";import{customElement as lf,property as st,query as gp,queryAll as cf,state as df}from"lit/decorators.js";function vg(i){return i.type??"item"}function bg(i){if(i.items?.length)return i.items;if(i.children?.length)return i.children}function ba(i){return i.filter(o=>!o.hidden).map(o=>{let e=vg(o),t=bg(o),r=o.key??o.value??o.label;return{type:e,key:r,value:o.value??o.key,label:o.label,icon:o.icon,danger:o.danger,disabled:o.disabled,checked:o.checked,active:o.active,selectable:o.selectable,shortcut:o.shortcut,shortcutIcon:o.shortcutIcon,suffix:o.suffix,children:t?.length?ba(t):void 0,command:o.command,commandPayload:o.commandPayload,action:o.action,onSelect:o.onSelect,raw:o}})}function Jh(i){return ba(i)}function ep(i){return ba(i)}function tp(i,o){let e=i;for(let t of o){let r=e[t];if(!r?.children?.length)return[];e=r.children}return e}function hn(i,o){if(!o.length)return null;let e=i,t=null;for(let r of o){if(t=e[r]??null,!t)return null;e=t.children??[]}return t}function ka(i){return i.type!=="divider"&&i.type!=="group"&&!i.disabled&&!i.children?.length}import{html as Ar,nothing as be}from"lit";function kg(i){return!!(i&&typeof i=="object")}function yg(i){return/^<svg[\s>]/i.test(i.trim())}function xg(i){return/^<(path|g|circle|rect|line|polyline|polygon|ellipse)\b/i.test(i.trim())}function wg(i){let o=i.trim();return/^(https?:\/\/|data:image\/|blob:|\/|\.\/|\.\.\/)/i.test(o)||/\.(svg|png|webp|jpe?g|gif|avif)([?#].*)?$/i.test(o)}function fc(i,o){if(!i)return be;if(typeof i=="string"){let x=i.trim();return x?yg(x)?Ar`<lui-icon part=${o??be} type="svg" .svg=${x}></lui-icon>`:xg(x)?Ar`<lui-icon part=${o??be} type="svg" .svgBody=${x}></lui-icon>`:wg(x)?Ar`<lui-icon part=${o??be} type="img" src=${x}></lui-icon>`:Ar`<lui-icon part=${o??be} name=${x}></lui-icon>`:be}if(!kg(i))return be;let e=i.svgBody??i["svg-body"]??"",t=i.type??(i.svg||e?"svg":i.src?"img":"builtin"),r=i.name??"",n=i.iconClass??i["icon-class"]??"",s=i.viewBox??i["view-box"]??"0 0 24 24",d=i.preserveAspectRatio??i["preserve-aspect-ratio"]??"xMidYMid meet",h=i.strokeWidth??i["stroke-width"],p=i.strokeLinecap??i["stroke-linecap"],f=i.strokeLinejoin??i["stroke-linejoin"];return Ar`
|
|
1077
1080
|
<lui-icon
|
|
1078
1081
|
part=${o??be}
|
|
1079
1082
|
type=${t}
|
|
@@ -1097,17 +1100,17 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
1097
1100
|
?flip-v=${!!(i.flipV??i["flip-v"])}
|
|
1098
1101
|
?spin=${!!i.spin}
|
|
1099
1102
|
></lui-icon>
|
|
1100
|
-
`}function Es(i){if(!i.heading)return be;let o=i.titleClass??be,e=i.dividerClass??be,t=i.iconClass??be,r=i.spacerClass??be,n=i.labelClass??be;return
|
|
1103
|
+
`}function Es(i){if(!i.heading)return be;let o=i.titleClass??be,e=i.dividerClass??be,t=i.iconClass??be,r=i.spacerClass??be,n=i.labelClass??be;return Ar`
|
|
1101
1104
|
<div
|
|
1102
1105
|
id=${i.id??be}
|
|
1103
1106
|
part=${i.titlePart??be}
|
|
1104
1107
|
class=${o}
|
|
1105
1108
|
>
|
|
1106
|
-
${i.headingIcon?
|
|
1109
|
+
${i.headingIcon?Ar`<span class=${t}>${fc(i.headingIcon)}</span>`:Ar`<span class=${r}></span>`}
|
|
1107
1110
|
<span class=${n}>${i.heading}</span>
|
|
1108
1111
|
</div>
|
|
1109
1112
|
<div part=${i.dividerPart??be} class=${e} role="separator"></div>
|
|
1110
|
-
`}function Ss(i){return
|
|
1113
|
+
`}function Ss(i){return Ar`
|
|
1111
1114
|
<div
|
|
1112
1115
|
part=${i.part??be}
|
|
1113
1116
|
class=${i.className??be}
|
|
@@ -1116,14 +1119,14 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
1116
1119
|
>
|
|
1117
1120
|
${i.label??""}
|
|
1118
1121
|
</div>
|
|
1119
|
-
`}function rp(i={}){return
|
|
1122
|
+
`}function rp(i={}){return Ar`<div part=${i.part??be} class=${i.className??be} role="separator"></div>`}function $s(i,o={}){return i.checked?o.checkPart?Ar`<svg part=${o.checkPart} viewBox="0 0 16 16" aria-hidden="true">
|
|
1120
1123
|
<path d="M3 8.5L6.5 12L13 4.5" />
|
|
1121
|
-
</svg>`:
|
|
1124
|
+
</svg>`:Ar`<lui-icon name=${o.checkIconName??"check"}></lui-icon>`:fc(i.icon,o.iconPart)}function Ts(i,o={}){let e=i.shortcutIcon?fc(i.shortcutIcon):i.shortcut??be;return o.showChevron?Ar`
|
|
1122
1125
|
${e}
|
|
1123
1126
|
<span class=${o.chevronWrapperClass??be}>
|
|
1124
1127
|
<lui-icon part=${o.chevronPart??be} name=${o.chevronIconName??"chevron-right"}></lui-icon>
|
|
1125
1128
|
</span>
|
|
1126
|
-
`:e}function op(i,o={}){return
|
|
1129
|
+
`:e}function op(i,o={}){return Ar`
|
|
1127
1130
|
<span part=${o.leadPart??be} class=${o.leadClass??be}>
|
|
1128
1131
|
${$s(i,{checkPart:o.checkPart,checkIconName:o.checkIconName,iconPart:o.iconPart})}
|
|
1129
1132
|
</span>
|
|
@@ -1149,7 +1152,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
1149
1152
|
--lui-radius-sm: var(--lui-radius-sm, 8px);
|
|
1150
1153
|
--lui-shadow: var(--lui-shadow, 0 4px 12px color-mix(in srgb, CanvasText 14%, transparent));
|
|
1151
1154
|
--lui-shadow-overlay: var(--lui-shadow-overlay, 0 4px 12px color-mix(in srgb, CanvasText 10%, transparent), 0 1px 3px color-mix(in srgb, CanvasText 7%, transparent));
|
|
1152
|
-
--lui-ring-focus: var(--lui-ring-focus,
|
|
1155
|
+
--lui-ring-focus: var(--lui-ring-focus, 0 0 0 2px color-mix(in srgb, Highlight 10%, transparent));
|
|
1153
1156
|
--lui-font-size-sm: var(--lui-font-size-sm, 13px);
|
|
1154
1157
|
}
|
|
1155
1158
|
|
|
@@ -2516,7 +2519,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
2516
2519
|
transition: none;
|
|
2517
2520
|
}
|
|
2518
2521
|
}
|
|
2519
|
-
`],a([Lt({reflect:!0})],He.prototype,"selection",2),a([Lt()],He.prototype,"value",2),a([Lt({attribute:!1})],He.prototype,"values",2),a([Lt({reflect:!0})],He.prototype,"variant",2),a([Lt({reflect:!0})],He.prototype,"size",2),a([Lt({reflect:!0})],He.prototype,"radius",2),a([Lt({type:Boolean,reflect:!0})],He.prototype,"vertical",2),a([Lt({type:Boolean,reflect:!0})],He.prototype,"disabled",2),a([Lt({type:Boolean,reflect:!0})],He.prototype,"ripple",2),a([Lt({type:Boolean,reflect:!0})],He.prototype,"block",2),a([Lt({reflect:!0})],He.prototype,"collapse",2),a([Lt({attribute:"overflow-label"})],He.prototype,"overflowLabel",2),a([Lt({attribute:"overflow-icon"})],He.prototype,"overflowIcon",2),a([Lt({attribute:"overflow-placement"})],He.prototype,"overflowPlacement",2),a([Lt({type:Number,attribute:"overflow-trigger-width"})],He.prototype,"overflowTriggerWidth",2),a([Lt({attribute:!1})],He.prototype,"overflowTriggerProps",2),a([Lt({attribute:!1})],He.prototype,"items",2),a([ff({flatten:!0})],He.prototype,"_assignedElements",2),a([fp('[part="group"]')],He.prototype,"_groupEl",2),a([fp(".overflow-trigger")],He.prototype,"_overflowTriggerButton",2),a([vp()],He.prototype,"_overflowIndexes",2),a([vp()],He.prototype,"_activeInteractionIndex",2),He=a([gf("lui-button-group")],He);import{css as Ff,html as mr,LitElement as Nf,nothing as Ea}from"lit";import{customElement as Lf,property as Et,query as Ys,queryAll as Bf,state as Xs}from"lit/decorators.js";import{html as Mf,noChange as Cf}from"lit";import{directive as zf,PartType as Ef}from"lit/directive.js";import{AsyncDirective as Sf}from"lit/async-directive.js";import{repeat as $f}from"lit/directives/repeat.js";var kn=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};kn.eventName="rangeChanged";var yn=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};yn.eventName="visibilityChanged";var Ma=class i extends Event{constructor(){super(i.eventName,{bubbles:!1})}};Ma.eventName="unpinned";var Sc=class{constructor(o){this._element=null;let e=o??window;this._node=e,o&&(this._element=o)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}},Ds=class extends Sc{constructor(o,e){super(e),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);let t=this._node;this._originalScrollTo=t.scrollTo,this._originalScrollBy=t.scrollBy,this._originalScroll=t.scroll,this._attach(o)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;this._scrollTo(t)}scrollBy(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;t.top!==void 0&&(t.top+=this.scrollTop),t.left!==void 0&&(t.left+=this.scrollLeft),this._scrollTo(t)}_nativeScrollTo(o){this._originalScrollTo.bind(this._element||window)(o)}_scrollTo(o,e=null,t=null){this._end!==null&&this._end(),o.behavior==="smooth"?(this._setDestination(o),this._retarget=e,this._end=t):this._resetScrollState(),this._nativeScrollTo(o)}_setDestination(o){let{top:e,left:t}=o;return e=e===void 0?void 0:Math.max(0,Math.min(e,this.maxScrollTop)),t=t===void 0?void 0:Math.max(0,Math.min(t,this.maxScrollLeft)),this._destination!==null&&t===this._destination.left&&e===this._destination.top?!1:(this.__destination={top:e,left:t,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(o){this._destination&&this._setDestination(o)&&this._nativeScrollTo(this._destination)}managedScrollTo(o,e,t){return this._scrollTo(o,e,t),this._updateManagedScrollTo}correctScrollError(o){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(o),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){let{scrollTop:o,scrollLeft:e}=this,{top:t,left:r}=this._destination;t=Math.min(t||0,this.maxScrollTop),r=Math.min(r||0,this.maxScrollLeft);let n=Math.abs(t-o),s=Math.abs(r-e);n<1&&s<1&&(this._end&&this._end(),this._resetScrollState())}}detach(o){return this._clients.delete(o),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(o){this._clients.add(o),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}};var _p=typeof window<"u"?window.ResizeObserver:void 0;var Ii=Symbol("virtualizerRef"),Ls="virtualizer-sizer",Mp,qs=class{constructor(o){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!o)throw new Error("Virtualizer constructor requires a configuration object");if(o.hostElement)this._init(o);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(o){Array.isArray(o)&&o!==this._items&&(this._itemsChanged=!0,this._items=o,this._schedule(this._updateLayout))}_init(o){this._isScroller=!!o.scroller,this._initHostElement(o);let e=o.layout||{};this._layoutInitialized=this._initLayout(e)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new _p(()=>this._hostElementSizeChanged()),this._childrenRO=new _p(this._childrenSizeChanged.bind(this))}_initHostElement(o){let e=this._hostElement=o.hostElement;this._applyVirtualizerStyles(),e[Ii]=this}connected(){this._initObservers();let o=this._isScroller;this._clippingAncestors=_f(this._hostElement,o),this._scrollerController=new Ds(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(o=>{o.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(o),this._hostElementRO.observe(o)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(o=>this._childrenRO.observe(o)),this._scrollEventListeners.forEach(o=>o.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(o=>o.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){let e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){let o=this._hostElement;if(!this._sizer){let e=o.querySelector(`[${Ls}]`);e||(e=document.createElement("div"),e.setAttribute(Ls,""),o.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent=" ",e.setAttribute(Ls,""),this._sizer=e}return this._sizer}async updateLayoutConfig(o){await this._layoutInitialized;let e=o.type||Mp;if(typeof e=="function"&&this._layout instanceof e){let t={...o};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(o){let e,t;if(typeof o.type=="function"){t=o.type;let r={...o};delete r.type,e=r}else e=o;t===void 0&&(Mp=t=(await Promise.resolve().then(()=>(wp(),xp))).FlowLayout),this._layout=new t(r=>this._handleLayoutMessage(r),e),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){let o=window.performance.now(),e=o-this._benchmarkStart,r=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<o).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:r}}return null}_measureChildren(){let o={},e=this._children,t=this._measureChildOverride||this._measureChild;for(let r=0;r<e.length;r++){let n=e[r],s=this._first+r;(this._itemsChanged||this._toBeMeasured.has(n))&&(o[s]=t.call(this,n,this._items[s]))}this._childMeasurements=o,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(o){let{width:e,height:t}=o.getBoundingClientRect();return Object.assign({width:e,height:t},xf(o))}async _schedule(o){this._scheduled.has(o)||(this._scheduled.add(o),await Promise.resolve(),this._scheduled.delete(o),o.call(this))}async _updateDOM(o){this._scrollSize=o.scrollSize,this._adjustRange(o.range),this._childrenPos=o.childPositions,this._scrollError=o.scrollError||null;let{_rangeChanged:e,_itemsChanged:t}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(e||t)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(o=>this._childrenRO.observe(o)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(o){switch(o.type){case"scroll":(o.currentTarget===window||this._clippingAncestors.includes(o.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",o)}}_handleLayoutMessage(o){o.type==="stateChanged"?this._updateDOM(o):o.type==="visibilityChanged"?(this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._notifyVisibility()):o.type==="unpinned"&&this._hostElement.dispatchEvent(new Ma)}get _children(){let o=[],e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(Ls)||o.push(e),e=e.nextElementSibling;return o}_updateView(){let o=this._hostElement,e=this._scrollerController?.element,t=this._layout;if(o&&e&&t){let r,n,s,d,h=o.getBoundingClientRect();r=0,n=0,s=window.innerHeight,d=window.innerWidth;let p=this._clippingAncestors.map(O=>O.getBoundingClientRect());p.unshift(h);for(let O of p)r=Math.max(r,O.top),n=Math.max(n,O.left),s=Math.min(s,O.bottom),d=Math.min(d,O.right);let f=e.getBoundingClientRect(),x={left:h.left-f.left,top:h.top-f.top},y={width:e.scrollWidth,height:e.scrollHeight},C=r-h.top+o.scrollTop,S=n-h.left+o.scrollLeft,E=Math.max(0,s-r),T=Math.max(0,d-n);t.viewportSize={width:T,height:E},t.viewportScroll={top:C,left:S},t.totalScrollSize=y,t.offsetWithinScroller=x}}_sizeHostElement(o){let t=o&&o.width!==null?Math.min(82e5,o.width):0,r=o&&o.height!==null?Math.min(82e5,o.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${t}px, ${r}px)`;else{let n=this._hostElement.style;n.minWidth=t?`${t}px`:"100%",n.minHeight=r?`${r}px`:"100%"}}_positionChildren(o){o&&o.forEach(({top:e,left:t,width:r,height:n,xOffset:s,yOffset:d},h)=>{let p=this._children[h-this._first];p&&(p.style.position="absolute",p.style.boxSizing="border-box",p.style.transform=`translate(${t}px, ${e}px)`,r!==void 0&&(p.style.width=r+"px"),n!==void 0&&(p.style.height=n+"px"),p.style.left=s===void 0?null:s+"px",p.style.top=d===void 0?null:d+"px")})}async _adjustRange(o){let{_first:e,_last:t,_firstVisible:r,_lastVisible:n}=this;this._first=o.first,this._last=o.last,this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==t,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==r||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){let{scrollTop:o,scrollLeft:e}=this._scrollerController,{top:t,left:r}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:o-t,left:e-r})}}element(o){return o===1/0&&(o=this._items.length-1),this._items?.[o]===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:o})}}_scrollElementIntoView(o){if(o.index>=this._first&&o.index<=this._last)this._children[o.index-this._first].scrollIntoView(o);else if(o.index=Math.min(o.index,this._items.length-1),o.behavior==="smooth"){let e=this._layout.getScrollIntoViewCoordinates(o),{behavior:t}=o;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:t}),()=>this._layout.getScrollIntoViewCoordinates(o),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=o}else this._layout.pin=o}_checkScrollIntoViewTarget(o){let{index:e}=this._scrollIntoViewTarget||{};e&&o?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new kn({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new yn({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((o,e)=>{this._layoutCompleteResolver=o,this._layoutCompleteRejecter=e})),this._layoutCompletePromise}_rejectLayoutCompletePromise(o){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(o),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(o){if(this._layout?.measureChildren){for(let e of o)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function xf(i){let o=window.getComputedStyle(i);return{marginTop:Bs(o.marginTop),marginRight:Bs(o.marginRight),marginBottom:Bs(o.marginBottom),marginLeft:Bs(o.marginLeft)}}function Bs(i){let o=i?parseFloat(i):NaN;return Number.isNaN(o)?0:o}function Cp(i){if(i.assignedSlot!==null)return i.assignedSlot;if(i.parentElement!==null)return i.parentElement;let o=i.parentNode;return o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host||null}function wf(i,o=!1){let e=[],t=o?i:Cp(i);for(;t!==null;)e.push(t),t=Cp(t);return e}function _f(i,o=!1){let e=!1;return wf(i,o).filter(t=>{if(e)return!1;let r=getComputedStyle(t);return e=r.position==="fixed",r.overflow!=="visible"})}var jc=i=>i,Pc=(i,o)=>Mf`${o}: ${JSON.stringify(i,null,2)}`,Ac=class extends Sf{constructor(o){if(super(o),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>Pc(e,t+this._first),this._keyFunction=(e,t)=>jc(e,t+this._first),this._items=[],o.type!==Ef.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(o){o&&this._setFunctions(o);let e=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)e.push(this._items[t]);return $f(e,this._keyFunction,this._renderItem)}update(o,[e]){this._setFunctions(e);let t=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(o,e):this._initialize(o,e),t?Cf:this.render()}async _updateVirtualizerConfig(o,e){if(!await this._virtualizer.updateLayoutConfig(e.layout||{})){let r=o.parentNode;this._makeVirtualizer(r,e)}this._virtualizer.items=this._items}_setFunctions(o){let{renderItem:e,keyFunction:t}=o;e&&(this._renderItem=(r,n)=>e(r,n+this._first)),t&&(this._keyFunction=(r,n)=>t(r,n+this._first))}_makeVirtualizer(o,e){this._virtualizer&&this._virtualizer.disconnected();let{layout:t,scroller:r,items:n}=e;this._virtualizer=new qs({hostElement:o,layout:t,scroller:r}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(o,e){let t=o.parentNode;t&&t.nodeType===1&&(t.addEventListener("rangeChanged",r=>{this._first=r.first,this._last=r.last,this.setValue(this.render())}),this._makeVirtualizer(t,e))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}},ki=zf(Ac);import{css as Tf}from"lit";var Ar=Tf`
|
|
2522
|
+
`],a([Lt({reflect:!0})],He.prototype,"selection",2),a([Lt()],He.prototype,"value",2),a([Lt({attribute:!1})],He.prototype,"values",2),a([Lt({reflect:!0})],He.prototype,"variant",2),a([Lt({reflect:!0})],He.prototype,"size",2),a([Lt({reflect:!0})],He.prototype,"radius",2),a([Lt({type:Boolean,reflect:!0})],He.prototype,"vertical",2),a([Lt({type:Boolean,reflect:!0})],He.prototype,"disabled",2),a([Lt({type:Boolean,reflect:!0})],He.prototype,"ripple",2),a([Lt({type:Boolean,reflect:!0})],He.prototype,"block",2),a([Lt({reflect:!0})],He.prototype,"collapse",2),a([Lt({attribute:"overflow-label"})],He.prototype,"overflowLabel",2),a([Lt({attribute:"overflow-icon"})],He.prototype,"overflowIcon",2),a([Lt({attribute:"overflow-placement"})],He.prototype,"overflowPlacement",2),a([Lt({type:Number,attribute:"overflow-trigger-width"})],He.prototype,"overflowTriggerWidth",2),a([Lt({attribute:!1})],He.prototype,"overflowTriggerProps",2),a([Lt({attribute:!1})],He.prototype,"items",2),a([ff({flatten:!0})],He.prototype,"_assignedElements",2),a([fp('[part="group"]')],He.prototype,"_groupEl",2),a([fp(".overflow-trigger")],He.prototype,"_overflowTriggerButton",2),a([vp()],He.prototype,"_overflowIndexes",2),a([vp()],He.prototype,"_activeInteractionIndex",2),He=a([gf("lui-button-group")],He);import{css as Ff,html as gr,LitElement as Nf,nothing as Ea}from"lit";import{customElement as Lf,property as Et,query as Ys,queryAll as Bf,state as Xs}from"lit/decorators.js";import{html as Mf,noChange as Cf}from"lit";import{directive as zf,PartType as Ef}from"lit/directive.js";import{AsyncDirective as Sf}from"lit/async-directive.js";import{repeat as $f}from"lit/directives/repeat.js";var kn=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};kn.eventName="rangeChanged";var yn=class i extends Event{constructor(o){super(i.eventName,{bubbles:!1}),this.first=o.first,this.last=o.last}};yn.eventName="visibilityChanged";var Ma=class i extends Event{constructor(){super(i.eventName,{bubbles:!1})}};Ma.eventName="unpinned";var Sc=class{constructor(o){this._element=null;let e=o??window;this._node=e,o&&(this._element=o)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}},Ds=class extends Sc{constructor(o,e){super(e),this._clients=new Set,this._retarget=null,this._end=null,this.__destination=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);let t=this._node;this._originalScrollTo=t.scrollTo,this._originalScrollBy=t.scrollBy,this._originalScroll=t.scroll,this._attach(o)}get _destination(){return this.__destination}get scrolling(){return this._destination!==null}scrollTo(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;this._scrollTo(t)}scrollBy(o,e){let t=typeof o=="number"&&typeof e=="number"?{left:o,top:e}:o;t.top!==void 0&&(t.top+=this.scrollTop),t.left!==void 0&&(t.left+=this.scrollLeft),this._scrollTo(t)}_nativeScrollTo(o){this._originalScrollTo.bind(this._element||window)(o)}_scrollTo(o,e=null,t=null){this._end!==null&&this._end(),o.behavior==="smooth"?(this._setDestination(o),this._retarget=e,this._end=t):this._resetScrollState(),this._nativeScrollTo(o)}_setDestination(o){let{top:e,left:t}=o;return e=e===void 0?void 0:Math.max(0,Math.min(e,this.maxScrollTop)),t=t===void 0?void 0:Math.max(0,Math.min(t,this.maxScrollLeft)),this._destination!==null&&t===this._destination.left&&e===this._destination.top?!1:(this.__destination={top:e,left:t,behavior:"smooth"},!0)}_resetScrollState(){this.__destination=null,this._retarget=null,this._end=null}_updateManagedScrollTo(o){this._destination&&this._setDestination(o)&&this._nativeScrollTo(this._destination)}managedScrollTo(o,e,t){return this._scrollTo(o,e,t),this._updateManagedScrollTo}correctScrollError(o){this.correctingScrollError=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>this.correctingScrollError=!1)),this._nativeScrollTo(o),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(this._destination!==null){let{scrollTop:o,scrollLeft:e}=this,{top:t,left:r}=this._destination;t=Math.min(t||0,this.maxScrollTop),r=Math.min(r||0,this.maxScrollLeft);let n=Math.abs(t-o),s=Math.abs(r-e);n<1&&s<1&&(this._end&&this._end(),this._resetScrollState())}}detach(o){return this._clients.delete(o),this._clients.size===0&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(o){this._clients.add(o),this._clients.size===1&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}};var _p=typeof window<"u"?window.ResizeObserver:void 0;var Ii=Symbol("virtualizerRef"),Ls="virtualizer-sizer",Mp,qs=class{constructor(o){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!o)throw new Error("Virtualizer constructor requires a configuration object");if(o.hostElement)this._init(o);else throw new Error('Virtualizer configuration requires the "hostElement" property')}set items(o){Array.isArray(o)&&o!==this._items&&(this._itemsChanged=!0,this._items=o,this._schedule(this._updateLayout))}_init(o){this._isScroller=!!o.scroller,this._initHostElement(o);let e=o.layout||{};this._layoutInitialized=this._initLayout(e)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new _p(()=>this._hostElementSizeChanged()),this._childrenRO=new _p(this._childrenSizeChanged.bind(this))}_initHostElement(o){let e=this._hostElement=o.hostElement;this._applyVirtualizerStyles(),e[Ii]=this}connected(){this._initObservers();let o=this._isScroller;this._clippingAncestors=_f(this._hostElement,o),this._scrollerController=new Ds(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(o=>{o.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(o),this._hostElementRO.observe(o)}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(o=>this._childrenRO.observe(o)),this._scrollEventListeners.forEach(o=>o.addEventListener("scroll",this,this._scrollEventListenerOptions))}disconnected(){this._scrollEventListeners.forEach(o=>o.removeEventListener("scroll",this,this._scrollEventListenerOptions)),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){let e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){let o=this._hostElement;if(!this._sizer){let e=o.querySelector(`[${Ls}]`);e||(e=document.createElement("div"),e.setAttribute(Ls,""),o.appendChild(e)),Object.assign(e.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),e.textContent=" ",e.setAttribute(Ls,""),this._sizer=e}return this._sizer}async updateLayoutConfig(o){await this._layoutInitialized;let e=o.type||Mp;if(typeof e=="function"&&this._layout instanceof e){let t={...o};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(o){let e,t;if(typeof o.type=="function"){t=o.type;let r={...o};delete r.type,e=r}else e=o;t===void 0&&(Mp=t=(await Promise.resolve().then(()=>(wp(),xp))).FlowLayout),this._layout=new t(r=>this._handleLayoutMessage(r),e),this._layout.measureChildren&&typeof this._layout.updateItemSizes=="function"&&(typeof this._layout.measureChildren=="function"&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){this._benchmarkStart===null&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(this._benchmarkStart!==null){let o=window.performance.now(),e=o-this._benchmarkStart,r=performance.getEntriesByName("uv-virtualizing","measure").filter(n=>n.startTime>=this._benchmarkStart&&n.startTime<o).reduce((n,s)=>n+s.duration,0);return this._benchmarkStart=null,{timeElapsed:e,virtualizationTime:r}}return null}_measureChildren(){let o={},e=this._children,t=this._measureChildOverride||this._measureChild;for(let r=0;r<e.length;r++){let n=e[r],s=this._first+r;(this._itemsChanged||this._toBeMeasured.has(n))&&(o[s]=t.call(this,n,this._items[s]))}this._childMeasurements=o,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(o){let{width:e,height:t}=o.getBoundingClientRect();return Object.assign({width:e,height:t},xf(o))}async _schedule(o){this._scheduled.has(o)||(this._scheduled.add(o),await Promise.resolve(),this._scheduled.delete(o),o.call(this))}async _updateDOM(o){this._scrollSize=o.scrollSize,this._adjustRange(o.range),this._childrenPos=o.childPositions,this._scrollError=o.scrollError||null;let{_rangeChanged:e,_itemsChanged:t}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(e||t)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach(o=>this._childrenRO.observe(o)),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),this._childMeasurements!==null&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(o){console.warn("Error measuring performance data: ",o)}window.performance.mark("uv-start")}this._scrollerController.correctingScrollError===!1&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(o){switch(o.type){case"scroll":(o.currentTarget===window||this._clippingAncestors.includes(o.currentTarget))&&this._handleScrollEvent();break;default:console.warn("event not handled",o)}}_handleLayoutMessage(o){o.type==="stateChanged"?this._updateDOM(o):o.type==="visibilityChanged"?(this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._notifyVisibility()):o.type==="unpinned"&&this._hostElement.dispatchEvent(new Ma)}get _children(){let o=[],e=this._hostElement.firstElementChild;for(;e;)e.hasAttribute(Ls)||o.push(e),e=e.nextElementSibling;return o}_updateView(){let o=this._hostElement,e=this._scrollerController?.element,t=this._layout;if(o&&e&&t){let r,n,s,d,h=o.getBoundingClientRect();r=0,n=0,s=window.innerHeight,d=window.innerWidth;let p=this._clippingAncestors.map(O=>O.getBoundingClientRect());p.unshift(h);for(let O of p)r=Math.max(r,O.top),n=Math.max(n,O.left),s=Math.min(s,O.bottom),d=Math.min(d,O.right);let f=e.getBoundingClientRect(),x={left:h.left-f.left,top:h.top-f.top},y={width:e.scrollWidth,height:e.scrollHeight},C=r-h.top+o.scrollTop,S=n-h.left+o.scrollLeft,E=Math.max(0,s-r),T=Math.max(0,d-n);t.viewportSize={width:T,height:E},t.viewportScroll={top:C,left:S},t.totalScrollSize=y,t.offsetWithinScroller=x}}_sizeHostElement(o){let t=o&&o.width!==null?Math.min(82e5,o.width):0,r=o&&o.height!==null?Math.min(82e5,o.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${t}px, ${r}px)`;else{let n=this._hostElement.style;n.minWidth=t?`${t}px`:"100%",n.minHeight=r?`${r}px`:"100%"}}_positionChildren(o){o&&o.forEach(({top:e,left:t,width:r,height:n,xOffset:s,yOffset:d},h)=>{let p=this._children[h-this._first];p&&(p.style.position="absolute",p.style.boxSizing="border-box",p.style.transform=`translate(${t}px, ${e}px)`,r!==void 0&&(p.style.width=r+"px"),n!==void 0&&(p.style.height=n+"px"),p.style.left=s===void 0?null:s+"px",p.style.top=d===void 0?null:d+"px")})}async _adjustRange(o){let{_first:e,_last:t,_firstVisible:r,_lastVisible:n}=this;this._first=o.first,this._last=o.last,this._firstVisible=o.firstVisible,this._lastVisible=o.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==e||this._last!==t,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==r||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){let{scrollTop:o,scrollLeft:e}=this._scrollerController,{top:t,left:r}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:o-t,left:e-r})}}element(o){return o===1/0&&(o=this._items.length-1),this._items?.[o]===void 0?void 0:{scrollIntoView:(e={})=>this._scrollElementIntoView({...e,index:o})}}_scrollElementIntoView(o){if(o.index>=this._first&&o.index<=this._last)this._children[o.index-this._first].scrollIntoView(o);else if(o.index=Math.min(o.index,this._items.length-1),o.behavior==="smooth"){let e=this._layout.getScrollIntoViewCoordinates(o),{behavior:t}=o;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(e,{behavior:t}),()=>this._layout.getScrollIntoViewCoordinates(o),()=>this._scrollIntoViewTarget=null),this._scrollIntoViewTarget=o}else this._layout.pin=o}_checkScrollIntoViewTarget(o){let{index:e}=this._scrollIntoViewTarget||{};e&&o?.has(e)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new kn({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new yn({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise((o,e)=>{this._layoutCompleteResolver=o,this._layoutCompleteRejecter=e})),this._layoutCompletePromise}_rejectLayoutCompletePromise(o){this._layoutCompleteRejecter!==null&&this._layoutCompleteRejecter(o),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&this._pendingLayoutComplete===null&&(this._pendingLayoutComplete=requestAnimationFrame(()=>requestAnimationFrame(()=>this._resolveLayoutCompletePromise())))}_resolveLayoutCompletePromise(){this._layoutCompleteResolver!==null&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(o){if(this._layout?.measureChildren){for(let e of o)this._toBeMeasured.set(e.target,e.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}};function xf(i){let o=window.getComputedStyle(i);return{marginTop:Bs(o.marginTop),marginRight:Bs(o.marginRight),marginBottom:Bs(o.marginBottom),marginLeft:Bs(o.marginLeft)}}function Bs(i){let o=i?parseFloat(i):NaN;return Number.isNaN(o)?0:o}function Cp(i){if(i.assignedSlot!==null)return i.assignedSlot;if(i.parentElement!==null)return i.parentElement;let o=i.parentNode;return o&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&o.host||null}function wf(i,o=!1){let e=[],t=o?i:Cp(i);for(;t!==null;)e.push(t),t=Cp(t);return e}function _f(i,o=!1){let e=!1;return wf(i,o).filter(t=>{if(e)return!1;let r=getComputedStyle(t);return e=r.position==="fixed",r.overflow!=="visible"})}var jc=i=>i,Pc=(i,o)=>Mf`${o}: ${JSON.stringify(i,null,2)}`,Ac=class extends Sf{constructor(o){if(super(o),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>Pc(e,t+this._first),this._keyFunction=(e,t)=>jc(e,t+this._first),this._items=[],o.type!==Ef.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(o){o&&this._setFunctions(o);let e=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)e.push(this._items[t]);return $f(e,this._keyFunction,this._renderItem)}update(o,[e]){this._setFunctions(e);let t=this._items!==e.items;return this._items=e.items||[],this._virtualizer?this._updateVirtualizerConfig(o,e):this._initialize(o,e),t?Cf:this.render()}async _updateVirtualizerConfig(o,e){if(!await this._virtualizer.updateLayoutConfig(e.layout||{})){let r=o.parentNode;this._makeVirtualizer(r,e)}this._virtualizer.items=this._items}_setFunctions(o){let{renderItem:e,keyFunction:t}=o;e&&(this._renderItem=(r,n)=>e(r,n+this._first)),t&&(this._keyFunction=(r,n)=>t(r,n+this._first))}_makeVirtualizer(o,e){this._virtualizer&&this._virtualizer.disconnected();let{layout:t,scroller:r,items:n}=e;this._virtualizer=new qs({hostElement:o,layout:t,scroller:r}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(o,e){let t=o.parentNode;t&&t.nodeType===1&&(t.addEventListener("rangeChanged",r=>{this._first=r.first,this._last=r.last,this.setValue(this.render())}),this._makeVirtualizer(t,e))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}},ki=zf(Ac);import{css as Tf}from"lit";var jr=Tf`
|
|
2520
2523
|
.control-shell {
|
|
2521
2524
|
display: inline-flex;
|
|
2522
2525
|
align-items: center;
|
|
@@ -2620,7 +2623,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
2620
2623
|
opacity: 0.45;
|
|
2621
2624
|
cursor: not-allowed;
|
|
2622
2625
|
}
|
|
2623
|
-
`;import{css as Pf,html as Tp,LitElement as Of,nothing as Hf}from"lit";import{customElement as Rf,property as yi}from"lit/decorators.js";var
|
|
2626
|
+
`;import{css as Pf,html as Tp,LitElement as Of,nothing as Hf}from"lit";import{customElement as Rf,property as yi}from"lit/decorators.js";var Pr=class extends Of{constructor(){super(...arguments);this.variant="default";this.size="md";this.closable=!1;this.selected=!1;this.outline=!1;this.radius="md";this._explicitAttrs=new Set;this._onClose=e=>{e.stopPropagation();let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(t)}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}willUpdate(e){let t=F(this,"tag");!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("closable")&&typeof t.closable=="boolean"&&this.closable!==t.closable&&(this.closable=t.closable),!this._explicitAttrs.has("outline")&&typeof t.outline=="boolean"&&this.outline!==t.outline&&(this.outline=t.outline)}_t(e,t){return ie(oe(this.locale,this.translations),e,t)}render(){return Tp`
|
|
2624
2627
|
<span class="tag" part="tag">
|
|
2625
2628
|
<span class="prefix" part="prefix"><slot name="prefix"></slot></span>
|
|
2626
2629
|
<span class="content" part="content"><slot></slot></span>
|
|
@@ -2637,7 +2640,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
2637
2640
|
</button>
|
|
2638
2641
|
`:Hf}
|
|
2639
2642
|
</span>
|
|
2640
|
-
`}};
|
|
2643
|
+
`}};Pr.styles=[A,P,Pf`
|
|
2641
2644
|
:host {
|
|
2642
2645
|
display: inline-flex;
|
|
2643
2646
|
vertical-align: middle;
|
|
@@ -2788,7 +2791,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
2788
2791
|
opacity: 1;
|
|
2789
2792
|
background: color-mix(in srgb, currentColor 10%, transparent);
|
|
2790
2793
|
}
|
|
2791
|
-
`],a([yi({reflect:!0})],
|
|
2794
|
+
`],a([yi({reflect:!0})],Pr.prototype,"variant",2),a([yi({reflect:!0})],Pr.prototype,"size",2),a([yi({type:Boolean,reflect:!0})],Pr.prototype,"closable",2),a([yi({type:Boolean,reflect:!0})],Pr.prototype,"selected",2),a([yi({type:Boolean,reflect:!0})],Pr.prototype,"outline",2),a([yi({reflect:!0})],Pr.prototype,"radius",2),a([yi()],Pr.prototype,"locale",2),a([yi({attribute:!1})],Pr.prototype,"translations",2),Pr=a([Rf("lui-tag")],Pr);var jo=class extends Ap{constructor(){super(...arguments);this.value="";this.disabled=!1;this.noborder=!1;this.ariaSelectedState=!1}getTextLabel(){return this.textContent?.trim()??""}render(){return lt`
|
|
2792
2795
|
<div
|
|
2793
2796
|
part="base"
|
|
2794
2797
|
class="option-row"
|
|
@@ -2977,7 +2980,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
2977
2980
|
>
|
|
2978
2981
|
${T}
|
|
2979
2982
|
</div>
|
|
2980
|
-
`}};pe.styles=[...Array.isArray(Q.styles)?Q.styles:[Q.styles],A,P,
|
|
2983
|
+
`}};pe.styles=[...Array.isArray(Q.styles)?Q.styles:[Q.styles],A,P,jr,Vi,Hc`
|
|
2981
2984
|
:host {
|
|
2982
2985
|
position: relative;
|
|
2983
2986
|
display: inline-flex;
|
|
@@ -3002,7 +3005,10 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3002
3005
|
[part="trigger"][data-has-clear] {
|
|
3003
3006
|
padding-inline-end: var(--lui-control-gutter-2);
|
|
3004
3007
|
}
|
|
3005
|
-
|
|
3008
|
+
/* Hover must yield to the activated states: this selector outranks .open
|
|
3009
|
+
* and :focus-visible, so without the exclusions a hovered open trigger
|
|
3010
|
+
* showed the gray hover border under the blue focus ring. */
|
|
3011
|
+
[part="trigger"]:hover:not(.disabled):not(:focus-visible):not(.open) {
|
|
3006
3012
|
border-color: var(
|
|
3007
3013
|
--lui-select-hover-border,
|
|
3008
3014
|
var(--lui-color-border-strong)
|
|
@@ -3636,7 +3642,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3636
3642
|
transition: none;
|
|
3637
3643
|
}
|
|
3638
3644
|
}
|
|
3639
|
-
`],a([Ht({type:Number})],Re.prototype,"current",2),a([Ht({type:Number})],Re.prototype,"total",2),a([Ht({type:Number,attribute:"page-size"})],Re.prototype,"pageSize",2),a([Ht({type:Number,attribute:"max-visible"})],Re.prototype,"maxVisible",2),a([Ht({reflect:!0})],Re.prototype,"size",2),a([Ht({type:Boolean,attribute:"show-summary"})],Re.prototype,"showSummary",2),a([Ht({type:Boolean,attribute:"show-total"})],Re.prototype,"showTotal",2),a([Ht({type:Boolean,attribute:"show-jumper"})],Re.prototype,"showJumper",2),a([Ht({type:Boolean,attribute:"show-size-changer"})],Re.prototype,"showSizeChanger",2),a([Ht({type:Boolean,attribute:"show-first-last"})],Re.prototype,"showFirstLast",2),a([Ht({type:Boolean,attribute:"hide-on-single-page"})],Re.prototype,"hideOnSinglePage",2),a([Ht({type:Boolean,reflect:!0})],Re.prototype,"simple",2),a([Ht({type:Boolean,reflect:!0})],Re.prototype,"compact",2),a([Ht({type:Boolean,reflect:!0})],Re.prototype,"responsive",2),a([Ht()],Re.prototype,"locale",2),a([Ht({attribute:!1})],Re.prototype,"translations",2),a([Ht({attribute:!1})],Re.prototype,"pageSizeOptions",2),a([Ht({attribute:!1})],Re.prototype,"selectProps",2),a([jp("select")],Re.prototype,"_sizeSelect",2),a([jp('[part="pager"]')],Re.prototype,"_pagerNode",2),a([Pp()],Re.prototype,"_jumperValue",2),a([Pp()],Re.prototype,"_responsiveMode",2),Re=a([Df("lui-pagination")],Re);var qf=new Set(["folder","folder-open","file","image","search","plus","minus","x","check","copy","download","upload","edit","trash","refresh","eye","eye-off","chevron-down","chevron-up","chevron-left","chevron-right","panel-left-open","panel-left-close","settings","info","warning"]),Kf=new Set(["\u72B6\u6001","\u5176\u4ED6"]),Op=i=>{let o=i.toLowerCase();return qf.has(o)?"\u5E38\u7528":/folder|file|image|video|music|audio|archive|clipboard|copy|trash|download|upload|paperclip|scissors|save|hard-drive|file-/.test(o)?"\u6587\u4EF6":/arrow|chevron|caret|corner|move|turn-|up|down|left|right/.test(o)?"\u65B9\u5411":/plus|minus|search|filter|sort|edit|pen|pencil|brush|crop|menu|more|ellipsis|settings|sliders|cog|wand|sparkles/.test(o)?"\u64CD\u4F5C":/check|alert|warning|info|help|badge|shield|lock|unlock|eye|bell|message-circle-warning|triangle-alert|circle-alert|octagon-alert/.test(o)?"\u72B6\u6001":/panel|sidebar|layout|grid|list|table|columns|rows|square|rectangle|align|justify/.test(o)?"\u5E03\u5C40":/monitor|laptop|tablet|smartphone|phone|camera|printer|server|cpu|usb|router|wifi|bluetooth/.test(o)?"\u8BBE\u5907":"\u5176\u4ED6"},Me=class extends Nf{constructor(){super(...arguments);this.value="";this.placeholder="";this.searchPlaceholder="";this.emptyText="";this.size="md";this.disabled=!1;this.clearable=!0;this.searchable=!0;this.open=!1;this.type="builtin";this.columns=6;this.maxHeight=420;this.pageSize=72;this.source=[];this.triggerProps={};this.dropdownProps={};this.paginationProps={};this._keyword="";this._activeCategory="\u5168\u90E8";this._activeValue="";this._currentPage=1;this._explicitAttrs=new Set;this._handleDropdownOpen=()=>{this.open=!0};this._handleDropdownClose=()=>{this.open=!1,this._keyword&&(this._keyword="")};this._setCategory=e=>{this._activeCategory=e,this._currentPage=1,this._activeValue=this._filteredOptions.find(t=>t.value===this.value)?.value||this._filteredOptions[0]?.value||"",queueMicrotask(()=>this._ensureActiveVisible())};this._onSearchInput=e=>{e.stopPropagation(),this._keyword=e.target.value,this._currentPage=1,this._activeValue=this._filteredOptions.find(t=>t.value===this.value)?.value||this._filteredOptions[0]?.value||"",queueMicrotask(()=>this._ensureActiveVisible())};this._onClear=e=>{e.preventDefault(),e.stopPropagation(),this.value&&this._setValue("",!0)};this._onSelect=e=>{this._setValue(e.value),this._dropdown?.hide()};this._onPanelKeydown=e=>{if(!this.open)return;let t=this._pagedOptions;if(!t.length)return;let r=Math.max(1,this.columns||1);switch(e.key){case"ArrowRight":e.preventDefault(),this._moveActive(1);break;case"ArrowLeft":e.preventDefault(),this._moveActive(-1);break;case"ArrowDown":e.preventDefault(),this._moveActive(r);break;case"ArrowUp":e.preventDefault(),this._moveActive(-r);break;case"Home":e.preventDefault(),this._activeValue=t[0].value,this._ensureActiveVisible();break;case"End":e.preventDefault(),this._activeValue=t[t.length-1].value,this._ensureActiveVisible();break;case"Enter":case" ":e.preventDefault(),this._onSelect(t.find(n=>n.value===this._activeValue)||t[0]);break;case"Escape":e.preventDefault(),this._dropdown?.hide();break;default:break}};this._onPageChange=e=>{let t=e.detail.page??e.detail.current??1;this._currentPage=t;let r=this._pagedOptions;r.length>0&&(this._activeValue=r.find(n=>n.value===this.value)?.value||r[0].value),queueMicrotask(()=>{this._gridWrap?.focus(),this._gridWrap&&(this._gridWrap.scrollTop=0),this._ensureActiveVisible()})}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t,r){let n=Fe(this,this.locale,this.translations);return ie(oe(n.locale,n.translations),e,t,r)}willUpdate(){let e=F(this,"iconPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("searchable")&&typeof e.searchable=="boolean"&&this.searchable!==e.searchable&&(this.searchable=e.searchable),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder),!this._explicitAttrs.has("search-placeholder")&&typeof e.searchPlaceholder=="string"&&!this.searchPlaceholder&&(this.searchPlaceholder=e.searchPlaceholder),!this._explicitAttrs.has("empty-text")&&typeof e.emptyText=="string"&&!this.emptyText&&(this.emptyText=e.emptyText)}get _options(){return(this.source.length>0?this.source:Ms).map(t=>{if(typeof t=="string")return{value:t,label:t,keywords:t.split(/[-:\s]+/g).filter(Boolean),category:Op(t)};let r=Array.isArray(t.keywords)?t.keywords:t.keywords?[t.keywords]:[];return{value:t.value,label:t.label||t.value,keywords:r,category:t.category||Op(t.value),type:t.type,name:t.name,src:t.src,svg:t.svg,iconClass:t.iconClass,color:t.color}})}get _selectedOption(){return this._options.find(e=>e.value===this.value)}get _activeOption(){return this._options.find(e=>e.value===this._activeValue)}get _categories(){let e=new Set;for(let t of this._options)e.add(t.category);return["\u5168\u90E8",...e]}get _categoryTabs(){return this._categories.filter(e=>e==="\u5168\u90E8"||!Kf.has(e))}get _filteredOptions(){let e=this._keyword.trim().toLowerCase();return this._options.filter(t=>e?[t.value,t.label,t.category,...t.keywords].join(" ").toLowerCase().includes(e):!0)}get _previewSecondary(){let e=this._selectedOption||this._activeOption;return e&&e.label!==e.value?e.value:""}get _virtualRows(){let e=[],t=Math.max(1,this.columns||1),r=this._pagedOptions;for(let n=0;n<r.length;n+=t){let s=r.slice(n,n+t);for(;s.length<t;)s.push(null);e.push({index:e.length,items:s})}return e}_getRowHeight(){return 46}get _pageCount(){return Math.max(1,Math.ceil(this._filteredOptions.length/Math.max(1,this.pageSize||1)))}get _resolvedPage(){return Math.min(this._pageCount,Math.max(1,this._currentPage||1))}get _pagedOptions(){let e=Math.max(1,this.pageSize||1),t=(this._resolvedPage-1)*e;return this._filteredOptions.slice(t,t+e)}updated(e){let t=F(this,"iconPicker");re(this._triggerEl,{...t.triggerProps??{},...this.triggerProps??{}}),re(this._dropdown,{...t.dropdownProps??{},...this.dropdownProps??{}});for(let r of this._paginationEls??[])re(r,{...t.paginationProps??{},...this.paginationProps??{}});e.has("columns")&&this.style.setProperty("--lui-icon-picker-columns",String(Math.max(1,this.columns||1))),e.has("maxHeight")&&this.style.setProperty("--lui-icon-picker-panel-max-height",`${Math.max(160,this.maxHeight||160)}px`),e.has("source")&&!this._categoryTabs.includes(this._activeCategory)&&(this._activeCategory="\u5168\u90E8"),(e.has("value")||e.has("source"))&&this.value&&this._activeValue!==this.value&&(this._activeValue=this.value),e.has("source")&&this._activeValue&&!this._filteredOptions.some(r=>r.value===this._activeValue)&&(this._activeValue=this._filteredOptions[0]?.value||""),(e.has("source")||e.has("pageSize"))&&(this._currentPage=Math.min(this._resolvedPage,this._pageCount)),e.has("open")&&this.open&&queueMicrotask(()=>{this._activeValue=this.value||this._filteredOptions[0]?.value||"",this._syncPageWithActiveValue(),this._searchInput?this._searchInput.focus():this.renderRoot.querySelector(".grid-wrap")?.focus(),this._ensureActiveVisible()}),(e.has("value")||e.has("columns")||e.has("source")||e.has("open"))&&queueMicrotask(()=>this._ensureActiveVisible())}_setValue(e,t=!1){this.value=e;let r={value:this.value,item:this._selectedOption};this.dispatchEvent(new CustomEvent("change",{detail:r,bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("clear",{detail:r,bubbles:!0,composed:!0}))}_moveActive(e){let t=this._pagedOptions;if(!t.length)return;let r=Math.max(0,t.findIndex(d=>d.value===this._activeValue)),n=Math.min(t.length-1,Math.max(0,r+e)),s=t[n];s&&(this._activeValue=s.value,this._ensureActiveVisible())}_ensureActiveVisible(){let e=this._gridWrap;if(!e||!this.open||!this._activeValue)return;let r=this._pagedOptions.findIndex(y=>y.value===this._activeValue);if(r<0)return;let n=Math.max(1,this.columns||1),s=Math.floor(r/n),d=this._getRowHeight(),h=s*d,p=h+d,f=e.scrollTop,x=f+e.clientHeight;h<f?e.scrollTop=h:p>x&&(e.scrollTop=p-e.clientHeight)}_syncPageWithActiveValue(){if(!this._activeValue)return;let e=this._filteredOptions.findIndex(r=>r.value===this._activeValue);if(e<0)return;let t=Math.max(1,this.pageSize||1);this._currentPage=Math.floor(e/t)+1}_renderOptionIcon(e){return mr`
|
|
3645
|
+
`],a([Ht({type:Number})],Re.prototype,"current",2),a([Ht({type:Number})],Re.prototype,"total",2),a([Ht({type:Number,attribute:"page-size"})],Re.prototype,"pageSize",2),a([Ht({type:Number,attribute:"max-visible"})],Re.prototype,"maxVisible",2),a([Ht({reflect:!0})],Re.prototype,"size",2),a([Ht({type:Boolean,attribute:"show-summary"})],Re.prototype,"showSummary",2),a([Ht({type:Boolean,attribute:"show-total"})],Re.prototype,"showTotal",2),a([Ht({type:Boolean,attribute:"show-jumper"})],Re.prototype,"showJumper",2),a([Ht({type:Boolean,attribute:"show-size-changer"})],Re.prototype,"showSizeChanger",2),a([Ht({type:Boolean,attribute:"show-first-last"})],Re.prototype,"showFirstLast",2),a([Ht({type:Boolean,attribute:"hide-on-single-page"})],Re.prototype,"hideOnSinglePage",2),a([Ht({type:Boolean,reflect:!0})],Re.prototype,"simple",2),a([Ht({type:Boolean,reflect:!0})],Re.prototype,"compact",2),a([Ht({type:Boolean,reflect:!0})],Re.prototype,"responsive",2),a([Ht()],Re.prototype,"locale",2),a([Ht({attribute:!1})],Re.prototype,"translations",2),a([Ht({attribute:!1})],Re.prototype,"pageSizeOptions",2),a([Ht({attribute:!1})],Re.prototype,"selectProps",2),a([jp("select")],Re.prototype,"_sizeSelect",2),a([jp('[part="pager"]')],Re.prototype,"_pagerNode",2),a([Pp()],Re.prototype,"_jumperValue",2),a([Pp()],Re.prototype,"_responsiveMode",2),Re=a([Df("lui-pagination")],Re);var qf=new Set(["folder","folder-open","file","image","search","plus","minus","x","check","copy","download","upload","edit","trash","refresh","eye","eye-off","chevron-down","chevron-up","chevron-left","chevron-right","panel-left-open","panel-left-close","settings","info","warning"]),Kf=new Set(["\u72B6\u6001","\u5176\u4ED6"]),Op=i=>{let o=i.toLowerCase();return qf.has(o)?"\u5E38\u7528":/folder|file|image|video|music|audio|archive|clipboard|copy|trash|download|upload|paperclip|scissors|save|hard-drive|file-/.test(o)?"\u6587\u4EF6":/arrow|chevron|caret|corner|move|turn-|up|down|left|right/.test(o)?"\u65B9\u5411":/plus|minus|search|filter|sort|edit|pen|pencil|brush|crop|menu|more|ellipsis|settings|sliders|cog|wand|sparkles/.test(o)?"\u64CD\u4F5C":/check|alert|warning|info|help|badge|shield|lock|unlock|eye|bell|message-circle-warning|triangle-alert|circle-alert|octagon-alert/.test(o)?"\u72B6\u6001":/panel|sidebar|layout|grid|list|table|columns|rows|square|rectangle|align|justify/.test(o)?"\u5E03\u5C40":/monitor|laptop|tablet|smartphone|phone|camera|printer|server|cpu|usb|router|wifi|bluetooth/.test(o)?"\u8BBE\u5907":"\u5176\u4ED6"},Me=class extends Nf{constructor(){super(...arguments);this.value="";this.placeholder="";this.searchPlaceholder="";this.emptyText="";this.size="md";this.disabled=!1;this.clearable=!0;this.searchable=!0;this.open=!1;this.type="builtin";this.columns=6;this.maxHeight=420;this.pageSize=72;this.source=[];this.triggerProps={};this.dropdownProps={};this.paginationProps={};this._keyword="";this._activeCategory="\u5168\u90E8";this._activeValue="";this._currentPage=1;this._explicitAttrs=new Set;this._handleDropdownOpen=()=>{this.open=!0};this._handleDropdownClose=()=>{this.open=!1,this._keyword&&(this._keyword="")};this._setCategory=e=>{this._activeCategory=e,this._currentPage=1,this._activeValue=this._filteredOptions.find(t=>t.value===this.value)?.value||this._filteredOptions[0]?.value||"",queueMicrotask(()=>this._ensureActiveVisible())};this._onSearchInput=e=>{e.stopPropagation(),this._keyword=e.target.value,this._currentPage=1,this._activeValue=this._filteredOptions.find(t=>t.value===this.value)?.value||this._filteredOptions[0]?.value||"",queueMicrotask(()=>this._ensureActiveVisible())};this._onClear=e=>{e.preventDefault(),e.stopPropagation(),this.value&&this._setValue("",!0)};this._onSelect=e=>{this._setValue(e.value),this._dropdown?.hide()};this._onPanelKeydown=e=>{if(!this.open)return;let t=this._pagedOptions;if(!t.length)return;let r=Math.max(1,this.columns||1);switch(e.key){case"ArrowRight":e.preventDefault(),this._moveActive(1);break;case"ArrowLeft":e.preventDefault(),this._moveActive(-1);break;case"ArrowDown":e.preventDefault(),this._moveActive(r);break;case"ArrowUp":e.preventDefault(),this._moveActive(-r);break;case"Home":e.preventDefault(),this._activeValue=t[0].value,this._ensureActiveVisible();break;case"End":e.preventDefault(),this._activeValue=t[t.length-1].value,this._ensureActiveVisible();break;case"Enter":case" ":e.preventDefault(),this._onSelect(t.find(n=>n.value===this._activeValue)||t[0]);break;case"Escape":e.preventDefault(),this._dropdown?.hide();break;default:break}};this._onPageChange=e=>{let t=e.detail.page??e.detail.current??1;this._currentPage=t;let r=this._pagedOptions;r.length>0&&(this._activeValue=r.find(n=>n.value===this.value)?.value||r[0].value),queueMicrotask(()=>{this._gridWrap?.focus(),this._gridWrap&&(this._gridWrap.scrollTop=0),this._ensureActiveVisible()})}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t,r){let n=Fe(this,this.locale,this.translations);return ie(oe(n.locale,n.translations),e,t,r)}willUpdate(){let e=F(this,"iconPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("searchable")&&typeof e.searchable=="boolean"&&this.searchable!==e.searchable&&(this.searchable=e.searchable),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder),!this._explicitAttrs.has("search-placeholder")&&typeof e.searchPlaceholder=="string"&&!this.searchPlaceholder&&(this.searchPlaceholder=e.searchPlaceholder),!this._explicitAttrs.has("empty-text")&&typeof e.emptyText=="string"&&!this.emptyText&&(this.emptyText=e.emptyText)}get _options(){return(this.source.length>0?this.source:Ms).map(t=>{if(typeof t=="string")return{value:t,label:t,keywords:t.split(/[-:\s]+/g).filter(Boolean),category:Op(t)};let r=Array.isArray(t.keywords)?t.keywords:t.keywords?[t.keywords]:[];return{value:t.value,label:t.label||t.value,keywords:r,category:t.category||Op(t.value),type:t.type,name:t.name,src:t.src,svg:t.svg,iconClass:t.iconClass,color:t.color}})}get _selectedOption(){return this._options.find(e=>e.value===this.value)}get _activeOption(){return this._options.find(e=>e.value===this._activeValue)}get _categories(){let e=new Set;for(let t of this._options)e.add(t.category);return["\u5168\u90E8",...e]}get _categoryTabs(){return this._categories.filter(e=>e==="\u5168\u90E8"||!Kf.has(e))}get _filteredOptions(){let e=this._keyword.trim().toLowerCase();return this._options.filter(t=>e?[t.value,t.label,t.category,...t.keywords].join(" ").toLowerCase().includes(e):!0)}get _previewSecondary(){let e=this._selectedOption||this._activeOption;return e&&e.label!==e.value?e.value:""}get _virtualRows(){let e=[],t=Math.max(1,this.columns||1),r=this._pagedOptions;for(let n=0;n<r.length;n+=t){let s=r.slice(n,n+t);for(;s.length<t;)s.push(null);e.push({index:e.length,items:s})}return e}_getRowHeight(){return 46}get _pageCount(){return Math.max(1,Math.ceil(this._filteredOptions.length/Math.max(1,this.pageSize||1)))}get _resolvedPage(){return Math.min(this._pageCount,Math.max(1,this._currentPage||1))}get _pagedOptions(){let e=Math.max(1,this.pageSize||1),t=(this._resolvedPage-1)*e;return this._filteredOptions.slice(t,t+e)}updated(e){let t=F(this,"iconPicker");re(this._triggerEl,{...t.triggerProps??{},...this.triggerProps??{}}),re(this._dropdown,{...t.dropdownProps??{},...this.dropdownProps??{}});for(let r of this._paginationEls??[])re(r,{...t.paginationProps??{},...this.paginationProps??{}});e.has("columns")&&this.style.setProperty("--lui-icon-picker-columns",String(Math.max(1,this.columns||1))),e.has("maxHeight")&&this.style.setProperty("--lui-icon-picker-panel-max-height",`${Math.max(160,this.maxHeight||160)}px`),e.has("source")&&!this._categoryTabs.includes(this._activeCategory)&&(this._activeCategory="\u5168\u90E8"),(e.has("value")||e.has("source"))&&this.value&&this._activeValue!==this.value&&(this._activeValue=this.value),e.has("source")&&this._activeValue&&!this._filteredOptions.some(r=>r.value===this._activeValue)&&(this._activeValue=this._filteredOptions[0]?.value||""),(e.has("source")||e.has("pageSize"))&&(this._currentPage=Math.min(this._resolvedPage,this._pageCount)),e.has("open")&&this.open&&queueMicrotask(()=>{this._activeValue=this.value||this._filteredOptions[0]?.value||"",this._syncPageWithActiveValue(),this._searchInput?this._searchInput.focus():this.renderRoot.querySelector(".grid-wrap")?.focus(),this._ensureActiveVisible()}),(e.has("value")||e.has("columns")||e.has("source")||e.has("open"))&&queueMicrotask(()=>this._ensureActiveVisible())}_setValue(e,t=!1){this.value=e;let r={value:this.value,item:this._selectedOption};this.dispatchEvent(new CustomEvent("change",{detail:r,bubbles:!0,composed:!0})),t&&this.dispatchEvent(new CustomEvent("clear",{detail:r,bubbles:!0,composed:!0}))}_moveActive(e){let t=this._pagedOptions;if(!t.length)return;let r=Math.max(0,t.findIndex(d=>d.value===this._activeValue)),n=Math.min(t.length-1,Math.max(0,r+e)),s=t[n];s&&(this._activeValue=s.value,this._ensureActiveVisible())}_ensureActiveVisible(){let e=this._gridWrap;if(!e||!this.open||!this._activeValue)return;let r=this._pagedOptions.findIndex(y=>y.value===this._activeValue);if(r<0)return;let n=Math.max(1,this.columns||1),s=Math.floor(r/n),d=this._getRowHeight(),h=s*d,p=h+d,f=e.scrollTop,x=f+e.clientHeight;h<f?e.scrollTop=h:p>x&&(e.scrollTop=p-e.clientHeight)}_syncPageWithActiveValue(){if(!this._activeValue)return;let e=this._filteredOptions.findIndex(r=>r.value===this._activeValue);if(e<0)return;let t=Math.max(1,this.pageSize||1);this._currentPage=Math.floor(e/t)+1}_renderOptionIcon(e){return gr`
|
|
3640
3646
|
<lui-icon
|
|
3641
3647
|
.type=${e.type||this.type}
|
|
3642
3648
|
.name=${e.name||e.value}
|
|
@@ -3645,9 +3651,9 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3645
3651
|
.iconClass=${e.iconClass}
|
|
3646
3652
|
.color=${e.color}
|
|
3647
3653
|
></lui-icon>
|
|
3648
|
-
`}_renderSearch(){return this.searchable?
|
|
3654
|
+
`}_renderSearch(){return this.searchable?gr`
|
|
3649
3655
|
<div class="panel-header" part="header">
|
|
3650
|
-
${this.searchable?
|
|
3656
|
+
${this.searchable?gr`
|
|
3651
3657
|
<label class="control-shell search" part="search">
|
|
3652
3658
|
<lui-icon name="search"></lui-icon>
|
|
3653
3659
|
<input
|
|
@@ -3660,7 +3666,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3660
3666
|
</label>
|
|
3661
3667
|
`:Ea}
|
|
3662
3668
|
</div>
|
|
3663
|
-
`:Ea}_renderOptionButton(e){let t=["option",e.value===this.value?"selected":"",e.value===this._activeValue?"active":""].filter(Boolean).join(" ");return
|
|
3669
|
+
`:Ea}_renderOptionButton(e){let t=["option",e.value===this.value?"selected":"",e.value===this._activeValue?"active":""].filter(Boolean).join(" ");return gr`
|
|
3664
3670
|
<button
|
|
3665
3671
|
class=${t}
|
|
3666
3672
|
part="option"
|
|
@@ -3676,11 +3682,11 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3676
3682
|
<lui-icon name="check"></lui-icon>
|
|
3677
3683
|
</span>
|
|
3678
3684
|
</button>
|
|
3679
|
-
`}_renderVirtualRow(e){return
|
|
3685
|
+
`}_renderVirtualRow(e){return gr`
|
|
3680
3686
|
<div class="grid-row" part="row" data-row-index=${e.index}>
|
|
3681
|
-
${e.items.map(t=>t?this._renderOptionButton(t):
|
|
3687
|
+
${e.items.map(t=>t?this._renderOptionButton(t):gr`<span class="option-placeholder" aria-hidden="true"></span>`)}
|
|
3682
3688
|
</div>
|
|
3683
|
-
`}render(){let e=this._selectedOption,t=this._activeOption,r=this._filteredOptions,n=this._virtualRows,s=this.clearable&&!this.disabled&&!!this.value,d=e||t,h=gs(this);return
|
|
3689
|
+
`}render(){let e=this._selectedOption,t=this._activeOption,r=this._filteredOptions,n=this._virtualRows,s=this.clearable&&!this.disabled&&!!this.value,d=e||t,h=gs(this);return gr`
|
|
3684
3690
|
<lui-dropdown
|
|
3685
3691
|
.open=${this.open}
|
|
3686
3692
|
.disabled=${this.disabled}
|
|
@@ -3699,7 +3705,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3699
3705
|
aria-expanded=${this.open?"true":"false"}
|
|
3700
3706
|
>
|
|
3701
3707
|
<span class="preview" part="preview">
|
|
3702
|
-
${e?this._renderOptionIcon(e):
|
|
3708
|
+
${e?this._renderOptionIcon(e):gr`<lui-icon name="search"></lui-icon>`}
|
|
3703
3709
|
</span>
|
|
3704
3710
|
<span class="value" part="value">
|
|
3705
3711
|
<span class="value-text ${e?"":"placeholder"}">
|
|
@@ -3707,7 +3713,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3707
3713
|
</span>
|
|
3708
3714
|
</span>
|
|
3709
3715
|
<span class="suffix" part="suffix">
|
|
3710
|
-
${s?
|
|
3716
|
+
${s?gr`
|
|
3711
3717
|
<button
|
|
3712
3718
|
class="icon-btn"
|
|
3713
3719
|
type="button"
|
|
@@ -3723,7 +3729,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3723
3729
|
|
|
3724
3730
|
<div class="panel" part="panel" @keydown=${this._onPanelKeydown}>
|
|
3725
3731
|
${this._renderSearch()}
|
|
3726
|
-
${r.length>0?
|
|
3732
|
+
${r.length>0?gr`
|
|
3727
3733
|
<div
|
|
3728
3734
|
class="grid-wrap"
|
|
3729
3735
|
part="body"
|
|
@@ -3733,23 +3739,23 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3733
3739
|
${ki({items:n,renderItem:p=>this._renderVirtualRow(p)})}
|
|
3734
3740
|
</div>
|
|
3735
3741
|
</div>
|
|
3736
|
-
`:
|
|
3742
|
+
`:gr`<div class="empty" part="empty">${(h?.("iconPicker")??this.emptyText)||this._t("icon_picker.empty","\u6CA1\u6709\u5339\u914D\u7684\u56FE\u6807")}</div>`}
|
|
3737
3743
|
<div class="panel-footer" part="footer">
|
|
3738
3744
|
<div class="panel-footer-main">
|
|
3739
3745
|
<span class="panel-footer-start">
|
|
3740
3746
|
<span class="results">${r.length} / ${this._options.length}</span>
|
|
3741
3747
|
</span>
|
|
3742
3748
|
<span class="footer-preview panel-footer-end">
|
|
3743
|
-
${d?
|
|
3749
|
+
${d?gr`
|
|
3744
3750
|
${this._renderOptionIcon(d)}
|
|
3745
3751
|
<span class="footer-copy">
|
|
3746
3752
|
<strong>${d.label}</strong>
|
|
3747
|
-
${this._previewSecondary?
|
|
3753
|
+
${this._previewSecondary?gr`<span>${this._previewSecondary}</span>`:Ea}
|
|
3748
3754
|
</span>
|
|
3749
|
-
`:
|
|
3755
|
+
`:gr`<span>${this._t("icon_picker.unselected","\u672A\u9009\u62E9")}</span>`}
|
|
3750
3756
|
</span>
|
|
3751
3757
|
</div>
|
|
3752
|
-
${r.length>this.pageSize?
|
|
3758
|
+
${r.length>this.pageSize?gr`
|
|
3753
3759
|
<div class="panel-pagination">
|
|
3754
3760
|
<lui-pagination
|
|
3755
3761
|
size="sm"
|
|
@@ -3764,7 +3770,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
3764
3770
|
</div>
|
|
3765
3771
|
</div>
|
|
3766
3772
|
</lui-dropdown>
|
|
3767
|
-
`}};Me.styles=[A,P,
|
|
3773
|
+
`}};Me.styles=[A,P,jr,Ff`
|
|
3768
3774
|
:host {
|
|
3769
3775
|
display: inline-block;
|
|
3770
3776
|
width: 100%;
|
|
@@ -4118,7 +4124,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
4118
4124
|
font-variant-numeric: tabular-nums;
|
|
4119
4125
|
white-space: nowrap;
|
|
4120
4126
|
}
|
|
4121
|
-
`],a([Et()],Me.prototype,"value",2),a([Et()],Me.prototype,"placeholder",2),a([Et({attribute:"search-placeholder"})],Me.prototype,"searchPlaceholder",2),a([Et({attribute:"empty-text"})],Me.prototype,"emptyText",2),a([Et({reflect:!0})],Me.prototype,"size",2),a([Et({type:Boolean,reflect:!0})],Me.prototype,"disabled",2),a([Et({type:Boolean,reflect:!0})],Me.prototype,"clearable",2),a([Et({type:Boolean,reflect:!0})],Me.prototype,"searchable",2),a([Et()],Me.prototype,"locale",2),a([Et({attribute:!1})],Me.prototype,"translations",2),a([Et({type:Boolean,reflect:!0})],Me.prototype,"open",2),a([Et()],Me.prototype,"type",2),a([Et({type:Number})],Me.prototype,"columns",2),a([Et({type:Number,attribute:"max-height"})],Me.prototype,"maxHeight",2),a([Et({type:Number,attribute:"page-size"})],Me.prototype,"pageSize",2),a([Et({attribute:!1})],Me.prototype,"source",2),a([Et({attribute:!1})],Me.prototype,"triggerProps",2),a([Et({attribute:!1})],Me.prototype,"dropdownProps",2),a([Et({attribute:!1})],Me.prototype,"paginationProps",2),a([Xs()],Me.prototype,"_keyword",2),a([Xs()],Me.prototype,"_activeCategory",2),a([Xs()],Me.prototype,"_activeValue",2),a([Xs()],Me.prototype,"_currentPage",2),a([Ys("lui-dropdown")],Me.prototype,"_dropdown",2),a([Ys("button.trigger")],Me.prototype,"_triggerEl",2),a([Bf("lui-pagination")],Me.prototype,"_paginationEls",2),a([Ys(".search-input")],Me.prototype,"_searchInput",2),a([Ys(".grid-wrap")],Me.prototype,"_gridWrap",2),Me=a([Lf("lui-icon-picker")],Me);var Nc=la(xn(),1);import{css as Ip,html as ge,LitElement as Vp,nothing as Rt}from"lit";import{customElement as Dp,property as J,query as Rp,queryAssignedElements as rv,state as Zs}from"lit/decorators.js";import{repeat as ov}from"lit/directives/repeat.js";function wn(i,o,e,t){var r=arguments.length,n=r<3?o:t===null?t=Object.getOwnPropertyDescriptor(o,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(i,o,e,t);else for(var d=i.length-1;d>=0;d--)(s=i[d])&&(n=(r<3?s(n):r>3?s(o,e,n):s(o,e))||n);return r>3&&n&&Object.defineProperty(o,e,n),n}import{html as Wf,LitElement as Uf}from"lit";import{property as Sa}from"lit/decorators/property.js";var Yo=class extends Uf{constructor(){super(...arguments),this.items=[],this.renderItem=Pc,this.keyFunction=jc,this.layout={},this.scroller=!1}createRenderRoot(){return this}render(){let{items:o,renderItem:e,keyFunction:t,layout:r,scroller:n}=this;return Wf`${ki({items:o,renderItem:e,keyFunction:t,layout:r,scroller:n})}`}element(o){return this[Ii]?.element(o)}get layoutComplete(){return this[Ii]?.layoutComplete}scrollToIndex(o,e="start"){this.element(o)?.scrollIntoView({block:e})}};wn([Sa({attribute:!1})],Yo.prototype,"items",void 0);wn([Sa()],Yo.prototype,"renderItem",void 0);wn([Sa()],Yo.prototype,"keyFunction",void 0);wn([Sa({attribute:!1})],Yo.prototype,"layout",void 0);wn([Sa({reflect:!0,type:Boolean})],Yo.prototype,"scroller",void 0);customElements.define("lit-virtualizer",Yo);import{css as Gf,html as Li,LitElement as Yf,nothing as Vc}from"lit";import{customElement as Xf,property as
|
|
4127
|
+
`],a([Et()],Me.prototype,"value",2),a([Et()],Me.prototype,"placeholder",2),a([Et({attribute:"search-placeholder"})],Me.prototype,"searchPlaceholder",2),a([Et({attribute:"empty-text"})],Me.prototype,"emptyText",2),a([Et({reflect:!0})],Me.prototype,"size",2),a([Et({type:Boolean,reflect:!0})],Me.prototype,"disabled",2),a([Et({type:Boolean,reflect:!0})],Me.prototype,"clearable",2),a([Et({type:Boolean,reflect:!0})],Me.prototype,"searchable",2),a([Et()],Me.prototype,"locale",2),a([Et({attribute:!1})],Me.prototype,"translations",2),a([Et({type:Boolean,reflect:!0})],Me.prototype,"open",2),a([Et()],Me.prototype,"type",2),a([Et({type:Number})],Me.prototype,"columns",2),a([Et({type:Number,attribute:"max-height"})],Me.prototype,"maxHeight",2),a([Et({type:Number,attribute:"page-size"})],Me.prototype,"pageSize",2),a([Et({attribute:!1})],Me.prototype,"source",2),a([Et({attribute:!1})],Me.prototype,"triggerProps",2),a([Et({attribute:!1})],Me.prototype,"dropdownProps",2),a([Et({attribute:!1})],Me.prototype,"paginationProps",2),a([Xs()],Me.prototype,"_keyword",2),a([Xs()],Me.prototype,"_activeCategory",2),a([Xs()],Me.prototype,"_activeValue",2),a([Xs()],Me.prototype,"_currentPage",2),a([Ys("lui-dropdown")],Me.prototype,"_dropdown",2),a([Ys("button.trigger")],Me.prototype,"_triggerEl",2),a([Bf("lui-pagination")],Me.prototype,"_paginationEls",2),a([Ys(".search-input")],Me.prototype,"_searchInput",2),a([Ys(".grid-wrap")],Me.prototype,"_gridWrap",2),Me=a([Lf("lui-icon-picker")],Me);var Nc=la(xn(),1);import{css as Ip,html as ge,LitElement as Vp,nothing as Rt}from"lit";import{customElement as Dp,property as J,query as Rp,queryAssignedElements as rv,state as Zs}from"lit/decorators.js";import{repeat as ov}from"lit/directives/repeat.js";function wn(i,o,e,t){var r=arguments.length,n=r<3?o:t===null?t=Object.getOwnPropertyDescriptor(o,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(i,o,e,t);else for(var d=i.length-1;d>=0;d--)(s=i[d])&&(n=(r<3?s(n):r>3?s(o,e,n):s(o,e))||n);return r>3&&n&&Object.defineProperty(o,e,n),n}import{html as Wf,LitElement as Uf}from"lit";import{property as Sa}from"lit/decorators/property.js";var Yo=class extends Uf{constructor(){super(...arguments),this.items=[],this.renderItem=Pc,this.keyFunction=jc,this.layout={},this.scroller=!1}createRenderRoot(){return this}render(){let{items:o,renderItem:e,keyFunction:t,layout:r,scroller:n}=this;return Wf`${ki({items:o,renderItem:e,keyFunction:t,layout:r,scroller:n})}`}element(o){return this[Ii]?.element(o)}get layoutComplete(){return this[Ii]?.layoutComplete}scrollToIndex(o,e="start"){this.element(o)?.scrollIntoView({block:e})}};wn([Sa({attribute:!1})],Yo.prototype,"items",void 0);wn([Sa()],Yo.prototype,"renderItem",void 0);wn([Sa()],Yo.prototype,"keyFunction",void 0);wn([Sa({attribute:!1})],Yo.prototype,"layout",void 0);wn([Sa({reflect:!0,type:Boolean})],Yo.prototype,"scroller",void 0);customElements.define("lit-virtualizer",Yo);import{css as Gf,html as Li,LitElement as Yf,nothing as Vc}from"lit";import{customElement as Xf,property as Br,query as Zf}from"lit/decorators.js";var xt=class extends Yf{constructor(){super(...arguments);this.checked=!1;this.disabled=!1;this.indeterminate=!1;this.radius="md";this.size="md";this.checkedIcon="check";this.indeterminateIcon="minus";this._onKeyDown=e=>{this.disabled||(e.key===" "||e.key==="Enter")&&(e.preventDefault(),this._toggle())}}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=ke(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,characterData:!0,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect()}_t(e,t){return ie(oe(this.locale,this.translations),e,t)}_hasNamedSlot(e){return Array.from(this.children).some(t=>t.getAttribute("slot")===e)}_hasDefaultContent(){return Array.from(this.childNodes).some(e=>e.nodeType===Node.TEXT_NODE?(e.textContent??"").trim().length>0:e instanceof HTMLElement?!e.hasAttribute("slot"):!1)}focus(){this._input?.focus()}blur(){this._input?.blur()}_toggle(){this.disabled||(this.indeterminate?(this.indeterminate=!1,this.checked=!0):this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked,indeterminate:this.indeterminate,value:this.value},bubbles:!0,composed:!0})))}_currentIconName(){return this.indeterminate?this.indeterminateIcon:this.checkedIcon}_renderIcon(){let e=this._hasNamedSlot("icon"),t=this._currentIconName();return Li`
|
|
4122
4128
|
<span class="icon" part="icon">
|
|
4123
4129
|
<slot name="icon"></slot>
|
|
4124
4130
|
${!e&&t?Li`<lui-icon name=${t}></lui-icon>`:Vc}
|
|
@@ -4307,7 +4313,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
4307
4313
|
animation: none;
|
|
4308
4314
|
}
|
|
4309
4315
|
}
|
|
4310
|
-
`],a([
|
|
4316
|
+
`],a([Br({type:Boolean,reflect:!0})],xt.prototype,"checked",2),a([Br({type:Boolean,reflect:!0})],xt.prototype,"disabled",2),a([Br({type:Boolean,reflect:!0})],xt.prototype,"indeterminate",2),a([Br({reflect:!0})],xt.prototype,"radius",2),a([Br({reflect:!0})],xt.prototype,"size",2),a([Br()],xt.prototype,"name",2),a([Br()],xt.prototype,"value",2),a([Br()],xt.prototype,"label",2),a([Br()],xt.prototype,"description",2),a([Br({attribute:"checked-icon"})],xt.prototype,"checkedIcon",2),a([Br({attribute:"indeterminate-icon"})],xt.prototype,"indeterminateIcon",2),a([Br()],xt.prototype,"locale",2),a([Br({attribute:!1})],xt.prototype,"translations",2),a([Zf("input")],xt.prototype,"_input",2),xt=a([Xf("lui-checkbox")],xt);import{css as Qf,html as Dc,LitElement as Jf,nothing as Hp}from"lit";import{customElement as ev,property as $a,query as tv}from"lit/decorators.js";var Qr=class extends Jf{constructor(){super(...arguments);this.icon="folder";this.title="";this.heading="";this.description="";this.iconProps={}}updated(){let e=F(this,"emptyState");re(this._iconEl,{...e.iconProps??{},...this.iconProps??{}})}render(){let e=this.title||this.heading;return Dc`
|
|
4311
4317
|
<div class="state" part="state">
|
|
4312
4318
|
<div class="icon-shell" part="icon-shell">
|
|
4313
4319
|
<slot name="icon">
|
|
@@ -5293,7 +5299,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
5293
5299
|
justify-content: flex-end;
|
|
5294
5300
|
margin-top: 12px;
|
|
5295
5301
|
}
|
|
5296
|
-
`],a([J({attribute:!1})],Z.prototype,"columns",2),a([J({attribute:!1})],Z.prototype,"data",2),a([J({attribute:!1})],Z.prototype,"dataSource",2),a([J({attribute:!1})],Z.prototype,"source",2),a([J({attribute:"row-key"})],Z.prototype,"rowKey",2),a([J({reflect:!0})],Z.prototype,"size",2),a([J({reflect:!0})],Z.prototype,"selection",2),a([J({attribute:!1})],Z.prototype,"selectedRowKeys",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"bordered",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"border",2),a([J({type:Boolean,reflect:!0,attribute:"noborder"})],Z.prototype,"noBorder",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"striped",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"hoverable",2),a([J({type:Boolean,reflect:!0,attribute:"sticky-header"})],Z.prototype,"stickyHeader",2),a([J({type:Boolean,attribute:"show-header"})],Z.prototype,"showHeader",2),a([J({type:Boolean,reflect:!0,attribute:"column-resizable"})],Z.prototype,"columnResizable",2),a([J({type:Boolean,reflect:!0,attribute:"column-reorderable"})],Z.prototype,"columnReorderable",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"loading",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"virtual",2),a([J({attribute:"virtual-height"})],Z.prototype,"virtualHeight",2),a([J({type:Number,attribute:"row-height"})],Z.prototype,"rowHeight",2),a([J({type:Number})],Z.prototype,"overscan",2),a([J({type:Boolean})],Z.prototype,"pagination",2),a([J({type:Boolean,attribute:"remote-pagination"})],Z.prototype,"remotePagination",2),a([J({type:Number})],Z.prototype,"current",2),a([J({type:Number,attribute:"page-size"})],Z.prototype,"pageSize",2),a([J({type:Number})],Z.prototype,"total",2),a([J({type:Boolean,attribute:"show-size-changer"})],Z.prototype,"showSizeChanger",2),a([J()],Z.prototype,"emptyText",2),a([J({attribute:"sort-key"})],Z.prototype,"sortKey",2),a([J({attribute:"sort-order"})],Z.prototype,"sortOrder",2),a([J({type:Boolean,attribute:"row-clickable"})],Z.prototype,"rowClickable",2),a([J({type:Boolean,reflect:!0,attribute:"select-on-click"})],Z.prototype,"selectOnClick",2),a([J({reflect:!0,attribute:"row-animation"})],Z.prototype,"rowAnimation",2),a([J({attribute:!1})],Z.prototype,"onRow",2),a([J({attribute:!1})],Z.prototype,"onCell",2),a([J({attribute:!1})],Z.prototype,"onHeaderRow",2),a([J({attribute:!1})],Z.prototype,"onHeaderCell",2),a([Rp(".scroll")],Z.prototype,"_scrollEl",2),a([Rp("lit-virtualizer.table-virtualizer")],Z.prototype,"_virtualizerEl",2),a([rv({flatten:!0,selector:"lui-table-column"})],Z.prototype,"_slottedColumns",2),a([Zs()],Z.prototype,"_responsiveWidth",2),a([Zs()],Z.prototype,"_columnWidthOverrides",2),a([Zs()],Z.prototype,"_columnOrderKeys",2),a([Zs()],Z.prototype,"_virtualStart",2),Z=a([Dp("lui-table")],Z);import{css as pv,html as Mn,LitElement as mv,nothing as gv,nothing as fv}from"lit";import{customElement as vv,property as It,query as Np,state as Lp}from"lit/decorators.js";import{css as sv,html as lv,LitElement as cv,nothing as dv}from"lit";import{customElement as uv,property as wi,query as hv}from"lit/decorators.js";var
|
|
5302
|
+
`],a([J({attribute:!1})],Z.prototype,"columns",2),a([J({attribute:!1})],Z.prototype,"data",2),a([J({attribute:!1})],Z.prototype,"dataSource",2),a([J({attribute:!1})],Z.prototype,"source",2),a([J({attribute:"row-key"})],Z.prototype,"rowKey",2),a([J({reflect:!0})],Z.prototype,"size",2),a([J({reflect:!0})],Z.prototype,"selection",2),a([J({attribute:!1})],Z.prototype,"selectedRowKeys",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"bordered",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"border",2),a([J({type:Boolean,reflect:!0,attribute:"noborder"})],Z.prototype,"noBorder",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"striped",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"hoverable",2),a([J({type:Boolean,reflect:!0,attribute:"sticky-header"})],Z.prototype,"stickyHeader",2),a([J({type:Boolean,attribute:"show-header"})],Z.prototype,"showHeader",2),a([J({type:Boolean,reflect:!0,attribute:"column-resizable"})],Z.prototype,"columnResizable",2),a([J({type:Boolean,reflect:!0,attribute:"column-reorderable"})],Z.prototype,"columnReorderable",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"loading",2),a([J({type:Boolean,reflect:!0})],Z.prototype,"virtual",2),a([J({attribute:"virtual-height"})],Z.prototype,"virtualHeight",2),a([J({type:Number,attribute:"row-height"})],Z.prototype,"rowHeight",2),a([J({type:Number})],Z.prototype,"overscan",2),a([J({type:Boolean})],Z.prototype,"pagination",2),a([J({type:Boolean,attribute:"remote-pagination"})],Z.prototype,"remotePagination",2),a([J({type:Number})],Z.prototype,"current",2),a([J({type:Number,attribute:"page-size"})],Z.prototype,"pageSize",2),a([J({type:Number})],Z.prototype,"total",2),a([J({type:Boolean,attribute:"show-size-changer"})],Z.prototype,"showSizeChanger",2),a([J()],Z.prototype,"emptyText",2),a([J({attribute:"sort-key"})],Z.prototype,"sortKey",2),a([J({attribute:"sort-order"})],Z.prototype,"sortOrder",2),a([J({type:Boolean,attribute:"row-clickable"})],Z.prototype,"rowClickable",2),a([J({type:Boolean,reflect:!0,attribute:"select-on-click"})],Z.prototype,"selectOnClick",2),a([J({reflect:!0,attribute:"row-animation"})],Z.prototype,"rowAnimation",2),a([J({attribute:!1})],Z.prototype,"onRow",2),a([J({attribute:!1})],Z.prototype,"onCell",2),a([J({attribute:!1})],Z.prototype,"onHeaderRow",2),a([J({attribute:!1})],Z.prototype,"onHeaderCell",2),a([Rp(".scroll")],Z.prototype,"_scrollEl",2),a([Rp("lit-virtualizer.table-virtualizer")],Z.prototype,"_virtualizerEl",2),a([rv({flatten:!0,selector:"lui-table-column"})],Z.prototype,"_slottedColumns",2),a([Zs()],Z.prototype,"_responsiveWidth",2),a([Zs()],Z.prototype,"_columnWidthOverrides",2),a([Zs()],Z.prototype,"_columnOrderKeys",2),a([Zs()],Z.prototype,"_virtualStart",2),Z=a([Dp("lui-table")],Z);import{css as pv,html as Mn,LitElement as mv,nothing as gv,nothing as fv}from"lit";import{customElement as vv,property as It,query as Np,state as Lp}from"lit/decorators.js";import{css as sv,html as lv,LitElement as cv,nothing as dv}from"lit";import{customElement as uv,property as wi,query as hv}from"lit/decorators.js";var fr=class extends cv{constructor(){super(...arguments);this.content="";this.placement="top";this.disabled=!1;this.showArrow=!0;this.openDelay=120;this.closeDelay=80;this.offsetDistance=8;this.popoverProps={}}updated(){if(this._popover){let e=F(this,"tooltip");re(this._popover,{...e.popoverProps??{},...this.popoverProps??{}})}}render(){let e=this.content.trim().length>0;return lv`
|
|
5297
5303
|
<lui-popover
|
|
5298
5304
|
trigger="hover focus"
|
|
5299
5305
|
.portal=${!0}
|
|
@@ -5314,7 +5320,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
5314
5320
|
style="display:block;margin:0;padding:0;color:inherit;white-space:pre-wrap;word-break:break-word;"
|
|
5315
5321
|
>${e?this.content:dv}<slot name="content"></slot></div>
|
|
5316
5322
|
</lui-popover>
|
|
5317
|
-
`}};
|
|
5323
|
+
`}};fr.styles=[A,P,sv`
|
|
5318
5324
|
:host {
|
|
5319
5325
|
display: inline-block;
|
|
5320
5326
|
vertical-align: middle;
|
|
@@ -5357,7 +5363,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
5357
5363
|
.tooltip-body {
|
|
5358
5364
|
color: inherit;
|
|
5359
5365
|
}
|
|
5360
|
-
`],a([wi()],
|
|
5366
|
+
`],a([wi()],fr.prototype,"content",2),a([wi({reflect:!0})],fr.prototype,"placement",2),a([wi({type:Boolean,reflect:!0})],fr.prototype,"disabled",2),a([wi({type:Boolean,attribute:"show-arrow"})],fr.prototype,"showArrow",2),a([wi({type:Number,attribute:"open-delay"})],fr.prototype,"openDelay",2),a([wi({type:Number,attribute:"close-delay"})],fr.prototype,"closeDelay",2),a([wi({type:Number,attribute:"offset"})],fr.prototype,"offsetDistance",2),a([wi({attribute:!1})],fr.prototype,"popoverProps",2),a([hv("lui-popover")],fr.prototype,"_popover",2),fr=a([uv("lui-tooltip")],fr);var Ie=class extends mv{constructor(){super(...arguments);this.text="";this.type="default";this.size="md";this.weight="normal";this.block=!1;this.copyable=!1;this.truncate=!1;this.nowrap=!1;this.selectable=!1;this.strikethrough=!1;this.underline=!1;this.italic=!1;this.monospace=!1;this.surface=!1;this.popoverOnHover=!1;this.tooltipProps={};this.tag="span";this._copied=!1;this._overflowing=!1;this._resizeObserver=null;this._observedTextEl=null;this._copy=()=>{navigator.clipboard.writeText(this.text).then(()=>{this._copied=!0,setTimeout(()=>{this._copied=!1},1500)})}}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this._teardownOverflowObserver(),this._resizeObserver=null,super.disconnectedCallback()}firstUpdated(){this._syncOverflowObserver(),this._syncOverflow()}updated(){let e=F(this,"text");re(this._tooltipEl,{...e.tooltipProps??{},...this.tooltipProps??{}}),this._syncOverflowObserver(),this._syncOverflow()}_needsOverflowObserver(){return this.popoverOnHover&&(this.truncate||this.nowrap)}_ensureOverflowObserver(){this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this._syncOverflow()))}_teardownOverflowObserver(){this._resizeObserver?.disconnect(),this._observedTextEl=null}_syncOverflowObserver(){if(!this._needsOverflowObserver()||!this._textEl){this._teardownOverflowObserver();return}this._ensureOverflowObserver(),this._observedTextEl!==this._textEl&&(this._teardownOverflowObserver(),this._ensureOverflowObserver(),this._resizeObserver?.observe(this._textEl),this._observedTextEl=this._textEl)}_syncOverflow(){let e=this._textEl;if(!e)return;if(!(this.truncate||this.nowrap)){this._overflowing&&(this._overflowing=!1);return}let r=e.scrollWidth-e.clientWidth>1||e.scrollHeight-e.clientHeight>1;r!==this._overflowing&&(this._overflowing=r)}render(){if(!this.text)return gv;let e=["text",`type-${this.type}`,`size-${this.size}`,`weight-${this.weight}`];this.truncate&&e.push("truncated"),this.maxLines&&e.push("clamped"),this.nowrap&&e.push("nowrap"),this.selectable?e.push("selectable"):e.push("unselectable"),this.strikethrough&&e.push("strikethrough"),this.underline&&e.push("underline"),this.italic&&e.push("italic"),this.monospace&&e.push("monospace");let t=this.maxLines?`-webkit-line-clamp:${this.maxLines}`:"",r=Mn`<span
|
|
5361
5367
|
class=${e.join(" ")}
|
|
5362
5368
|
style=${t}
|
|
5363
5369
|
>${this.text}</span>`,n=r;if(this.copyable||this.surface){let d=this._copied?Mn`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3,8 6,11 13,4"/></svg>`:Mn`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="5" width="9" height="9" rx="1"/><path d="M3 11V3a1 1 0 0 1 1-1h8"/></svg>`;n=Mn`
|
|
@@ -6141,61 +6147,64 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
6141
6147
|
margin: 0 auto 8px;
|
|
6142
6148
|
color: var(--lui-color-fg-subtle);
|
|
6143
6149
|
}
|
|
6144
|
-
`],a([Oe({attribute:!1})],ae.prototype,"nodes",2),a([Oe({attribute:!1})],ae.prototype,"expandedKeys",2),a([Oe({attribute:!1})],ae.prototype,"defaultExpandedKeys",2),a([Oe({attribute:"selected-key"})],ae.prototype,"selectedKey",2),a([Oe({attribute:!1})],ae.prototype,"selectedKeys",2),a([Oe({attribute:!1})],ae.prototype,"checkedKeys",2),a([Oe({attribute:!1})],ae.prototype,"defaultCheckedKeys",2),a([Oe({attribute:!1})],ae.prototype,"loadingKeys",2),a([Oe({attribute:!1})],ae.prototype,"childrenLoader",2),a([Oe({reflect:!0})],ae.prototype,"size",2),a([Oe()],ae.prototype,"label",2),a([Oe({attribute:"empty-text"})],ae.prototype,"emptyText",2),a([Oe({attribute:"expand-trigger"})],ae.prototype,"expandTrigger",2),a([Oe({type:Boolean,attribute:"show-guides"})],ae.prototype,"showGuides",2),a([Oe({attribute:"selection-mode"})],ae.prototype,"selectionMode",2),a([Oe({type:Boolean,attribute:"check-strictly"})],ae.prototype,"checkStrictly",2),a([Oe({type:Boolean,attribute:"load-on-expand"})],ae.prototype,"loadOnExpand",2),a([Oe({type:Boolean})],ae.prototype,"filterable",2),a([Oe({attribute:"filter-value"})],ae.prototype,"filterValue",2),a([Oe({attribute:"filter-placeholder"})],ae.prototype,"filterPlaceholder",2),a([Oe({type:Boolean,attribute:"draggable-nodes"})],ae.prototype,"draggableNodes",2),a([Oe({type:Boolean,attribute:"drag-leaf-only"})],ae.prototype,"dragLeafOnly",2),a([Oe({type:Boolean,attribute:"drop-same-level-only"})],ae.prototype,"dropSameLevelOnly",2),a([Oe({type:Boolean,attribute:"drag-handle"})],ae.prototype,"dragHandle",2),a([Oe({type:Boolean})],ae.prototype,"virtual",2),a([Oe({type:Number,attribute:"virtual-threshold"})],ae.prototype,"virtualThreshold",2),a([Oe({attribute:!1})],ae.prototype,"contextMenuItems",2),a([Oe({attribute:!1})],ae.prototype,"dragFilter",2),a([Oe({attribute:!1})],ae.prototype,"dropFilter",2),a([_i()],ae.prototype,"_innerExpanded",2),a([_i()],ae.prototype,"_innerSelected",2),a([_i()],ae.prototype,"_innerChecked",2),a([_i()],ae.prototype,"_innerLoading",2),a([_i()],ae.prototype,"_activeKey",2),a([_i()],ae.prototype,"_dragKey",2),a([_i()],ae.prototype,"_dropKey",2),a([_i()],ae.prototype,"_dropPosition",2),a([Cv("lui-context-menu.internal-context-menu")],ae.prototype,"_contextMenuEl",2),ae=a([Mv("lui-tree")],ae);import{css as $v,html as
|
|
6150
|
+
`],a([Oe({attribute:!1})],ae.prototype,"nodes",2),a([Oe({attribute:!1})],ae.prototype,"expandedKeys",2),a([Oe({attribute:!1})],ae.prototype,"defaultExpandedKeys",2),a([Oe({attribute:"selected-key"})],ae.prototype,"selectedKey",2),a([Oe({attribute:!1})],ae.prototype,"selectedKeys",2),a([Oe({attribute:!1})],ae.prototype,"checkedKeys",2),a([Oe({attribute:!1})],ae.prototype,"defaultCheckedKeys",2),a([Oe({attribute:!1})],ae.prototype,"loadingKeys",2),a([Oe({attribute:!1})],ae.prototype,"childrenLoader",2),a([Oe({reflect:!0})],ae.prototype,"size",2),a([Oe()],ae.prototype,"label",2),a([Oe({attribute:"empty-text"})],ae.prototype,"emptyText",2),a([Oe({attribute:"expand-trigger"})],ae.prototype,"expandTrigger",2),a([Oe({type:Boolean,attribute:"show-guides"})],ae.prototype,"showGuides",2),a([Oe({attribute:"selection-mode"})],ae.prototype,"selectionMode",2),a([Oe({type:Boolean,attribute:"check-strictly"})],ae.prototype,"checkStrictly",2),a([Oe({type:Boolean,attribute:"load-on-expand"})],ae.prototype,"loadOnExpand",2),a([Oe({type:Boolean})],ae.prototype,"filterable",2),a([Oe({attribute:"filter-value"})],ae.prototype,"filterValue",2),a([Oe({attribute:"filter-placeholder"})],ae.prototype,"filterPlaceholder",2),a([Oe({type:Boolean,attribute:"draggable-nodes"})],ae.prototype,"draggableNodes",2),a([Oe({type:Boolean,attribute:"drag-leaf-only"})],ae.prototype,"dragLeafOnly",2),a([Oe({type:Boolean,attribute:"drop-same-level-only"})],ae.prototype,"dropSameLevelOnly",2),a([Oe({type:Boolean,attribute:"drag-handle"})],ae.prototype,"dragHandle",2),a([Oe({type:Boolean})],ae.prototype,"virtual",2),a([Oe({type:Number,attribute:"virtual-threshold"})],ae.prototype,"virtualThreshold",2),a([Oe({attribute:!1})],ae.prototype,"contextMenuItems",2),a([Oe({attribute:!1})],ae.prototype,"dragFilter",2),a([Oe({attribute:!1})],ae.prototype,"dropFilter",2),a([_i()],ae.prototype,"_innerExpanded",2),a([_i()],ae.prototype,"_innerSelected",2),a([_i()],ae.prototype,"_innerChecked",2),a([_i()],ae.prototype,"_innerLoading",2),a([_i()],ae.prototype,"_activeKey",2),a([_i()],ae.prototype,"_dragKey",2),a([_i()],ae.prototype,"_dropKey",2),a([_i()],ae.prototype,"_dropPosition",2),a([Cv("lui-context-menu.internal-context-menu")],ae.prototype,"_contextMenuEl",2),ae=a([Mv("lui-tree")],ae);import{css as $v,html as vr,LitElement as Tv,nothing as Qt}from"lit";import{customElement as Av,property as Or}from"lit/decorators.js";var wt=class extends Tv{constructor(){super(...arguments);this.title="";this.subtitle="";this.hoverable=!1;this.compact=!1;this.size="md";this.borderless=!1;this.shadow="none";this.clickable=!1;this.selected=!1;this.loading=!1;this.dividerless=!1;this.coverRatio="";this._onKeyDown=e=>{!this.clickable||this.loading||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),this.click())}}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=ke(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){this._disposeLocaleChange?.(),this._disposeLocaleChange=void 0,this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,super.disconnectedCallback()}_hasSlot(e){return Array.from(this.children).some(t=>t.getAttribute("slot")===e)}_t(e,t){return ie(oe(this.locale,this.translations),e,t)}render(){let e=this._hasSlot("header"),t=this._hasSlot("footer"),r=this._hasSlot("cover"),n=this._hasSlot("extra"),s=this._hasSlot("actions"),d=this._hasSlot("media"),h=this._hasSlot("title"),p=e||d||h||!!this.title||!!this.subtitle,f=n||s,x=p||f,y=["cover",r&&this.coverRatio?"ratio":""].filter(Boolean).join(" ");return vr`
|
|
6145
6151
|
<article
|
|
6146
6152
|
class="card"
|
|
6147
6153
|
part="card"
|
|
6148
|
-
style=${this.coverRatio?`--lui-card-cover-ratio:${this.coverRatio}`:
|
|
6149
|
-
tabindex=${this.clickable?"0":
|
|
6150
|
-
role=${this.clickable?"button":
|
|
6151
|
-
aria-pressed=${this.clickable?String(this.selected):
|
|
6152
|
-
aria-disabled=${this.clickable&&this.loading?"true":
|
|
6154
|
+
style=${this.coverRatio?`--lui-card-cover-ratio:${this.coverRatio}`:Qt}
|
|
6155
|
+
tabindex=${this.clickable?"0":Qt}
|
|
6156
|
+
role=${this.clickable?"button":Qt}
|
|
6157
|
+
aria-pressed=${this.clickable?String(this.selected):Qt}
|
|
6158
|
+
aria-disabled=${this.clickable&&this.loading?"true":Qt}
|
|
6153
6159
|
aria-busy=${this.loading?"true":"false"}
|
|
6154
6160
|
@keydown=${this._onKeyDown}
|
|
6155
6161
|
>
|
|
6156
|
-
${r?
|
|
6162
|
+
${r?vr`<div class=${y} part="cover"><slot name="cover"></slot></div>`:Qt}
|
|
6157
6163
|
|
|
6158
|
-
${
|
|
6159
|
-
<div class="header ${
|
|
6160
|
-
${
|
|
6164
|
+
${x?vr`
|
|
6165
|
+
<div class="header ${p?"":"header-only-side"}" part="header">
|
|
6166
|
+
${p?vr`
|
|
6161
6167
|
<div class="header-main ${e?"custom":""}" part="header-main">
|
|
6162
|
-
${
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6168
|
+
${d?vr`<div class="header-media" part="header-media"><slot name="media"></slot></div>`:Qt}
|
|
6169
|
+
<div class="header-text" part="header-text">
|
|
6170
|
+
${e?vr`<slot name="header"></slot>`:h?vr`<slot name="title"></slot>`:vr`
|
|
6171
|
+
${this.title?vr`<div class="title" part="title">${this.title}</div>`:Qt}
|
|
6172
|
+
${this.subtitle?vr`<div class="subtitle" part="subtitle">${this.subtitle}</div>`:Qt}
|
|
6173
|
+
`}
|
|
6174
|
+
</div>
|
|
6166
6175
|
</div>
|
|
6167
|
-
`:
|
|
6168
|
-
${
|
|
6176
|
+
`:Qt}
|
|
6177
|
+
${f?vr`
|
|
6169
6178
|
<div class="header-side" part="header-side">
|
|
6170
|
-
${n?
|
|
6171
|
-
${s?
|
|
6179
|
+
${n?vr`<slot name="extra"></slot>`:Qt}
|
|
6180
|
+
${s?vr`
|
|
6172
6181
|
<div class="header-actions" part="actions">
|
|
6173
6182
|
<slot name="actions"></slot>
|
|
6174
6183
|
</div>
|
|
6175
|
-
`:
|
|
6184
|
+
`:Qt}
|
|
6176
6185
|
</div>
|
|
6177
|
-
`:
|
|
6186
|
+
`:Qt}
|
|
6178
6187
|
</div>
|
|
6179
|
-
`:
|
|
6188
|
+
`:Qt}
|
|
6180
6189
|
|
|
6181
6190
|
<div class="body ${this.loading?"loading":""}" part="body">
|
|
6182
6191
|
<slot></slot>
|
|
6183
6192
|
</div>
|
|
6184
6193
|
|
|
6185
|
-
${t?
|
|
6194
|
+
${t?vr`
|
|
6186
6195
|
<div class="footer" part="footer">
|
|
6187
6196
|
<slot name="footer"></slot>
|
|
6188
6197
|
</div>
|
|
6189
|
-
`:
|
|
6198
|
+
`:Qt}
|
|
6190
6199
|
|
|
6191
|
-
${this.loading?
|
|
6200
|
+
${this.loading?vr`
|
|
6192
6201
|
<div class="loading-overlay" part="loading">
|
|
6193
6202
|
<div class="loading-indicator">
|
|
6194
6203
|
<lui-spinner variant="track"></lui-spinner>
|
|
6195
6204
|
<span>${this._t("card.loading","\u52A0\u8F7D\u4E2D\u2026")}</span>
|
|
6196
6205
|
</div>
|
|
6197
6206
|
</div>
|
|
6198
|
-
`:
|
|
6207
|
+
`:Qt}
|
|
6199
6208
|
</article>
|
|
6200
6209
|
`}};wt.styles=[A,P,$v`
|
|
6201
6210
|
:host {
|
|
@@ -6325,17 +6334,35 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
6325
6334
|
min-width: 0;
|
|
6326
6335
|
flex: 1;
|
|
6327
6336
|
display: flex;
|
|
6328
|
-
flex-direction:
|
|
6329
|
-
|
|
6337
|
+
flex-direction: row;
|
|
6338
|
+
align-items: center;
|
|
6339
|
+
gap: var(--lui-card-media-gap, 10px);
|
|
6330
6340
|
}
|
|
6331
6341
|
.header-main.custom {
|
|
6332
6342
|
gap: 0;
|
|
6333
6343
|
}
|
|
6334
|
-
.header-
|
|
6344
|
+
.header-text {
|
|
6345
|
+
min-width: 0;
|
|
6346
|
+
flex: 1;
|
|
6347
|
+
display: flex;
|
|
6348
|
+
flex-direction: column;
|
|
6349
|
+
gap: 4px;
|
|
6350
|
+
}
|
|
6351
|
+
.header-media {
|
|
6352
|
+
flex: none;
|
|
6353
|
+
display: inline-flex;
|
|
6354
|
+
align-items: center;
|
|
6355
|
+
justify-content: center;
|
|
6356
|
+
min-width: 0;
|
|
6357
|
+
}
|
|
6358
|
+
.header-media:empty {
|
|
6359
|
+
display: none;
|
|
6360
|
+
}
|
|
6361
|
+
.header-text slot[name="header"] {
|
|
6335
6362
|
display: block;
|
|
6336
6363
|
min-width: 0;
|
|
6337
6364
|
}
|
|
6338
|
-
.header-
|
|
6365
|
+
.header-text slot[name="header"]::slotted(*) {
|
|
6339
6366
|
display: block;
|
|
6340
6367
|
max-width: 100%;
|
|
6341
6368
|
}
|
|
@@ -6432,7 +6459,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
6432
6459
|
--lui-spinner-color: var(--lui-color-primary);
|
|
6433
6460
|
--lui-spinner-track: color-mix(in srgb, var(--lui-color-primary) 22%, transparent);
|
|
6434
6461
|
}
|
|
6435
|
-
`],a([
|
|
6462
|
+
`],a([Or()],wt.prototype,"title",2),a([Or()],wt.prototype,"subtitle",2),a([Or({type:Boolean,reflect:!0})],wt.prototype,"hoverable",2),a([Or({type:Boolean,reflect:!0})],wt.prototype,"compact",2),a([Or({reflect:!0})],wt.prototype,"size",2),a([Or({type:Boolean,reflect:!0})],wt.prototype,"borderless",2),a([Or({reflect:!0})],wt.prototype,"shadow",2),a([Or({type:Boolean,reflect:!0})],wt.prototype,"clickable",2),a([Or({type:Boolean,reflect:!0})],wt.prototype,"selected",2),a([Or({type:Boolean,reflect:!0})],wt.prototype,"loading",2),a([Or({type:Boolean,reflect:!0})],wt.prototype,"dividerless",2),a([Or({reflect:!0,attribute:"cover-ratio"})],wt.prototype,"coverRatio",2),a([Or()],wt.prototype,"locale",2),a([Or({attribute:!1})],wt.prototype,"translations",2),wt=a([Av("lui-card")],wt);import{css as jv,html as Qs,LitElement as Pv,nothing as Wc}from"lit";import{customElement as Ov,property as Jt}from"lit/decorators.js";var ct=class extends Pv{constructor(){super(...arguments);this.title="";this.value=0;this.prefix="";this.suffix="";this.description="";this.groupSeparator=",";this.decimalSeparator=".";this.size="md";this.align="start";this.trend="none";this.trendValue="";this.status="default";this.valueColor="";this.loading=!1;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=F(this,"statistic");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("align")&&typeof t.align=="string"&&this.align!==t.align&&(this.align=t.align),!this._explicitAttrs.has("status")&&typeof t.status=="string"&&this.status!==t.status&&(this.status=t.status),!this._explicitAttrs.has("loading")&&typeof t.loading=="boolean"&&this.loading!==t.loading&&(this.loading=t.loading),!this._explicitAttrs.has("group-separator")&&typeof t.groupSeparator=="string"&&this.groupSeparator!==t.groupSeparator&&(this.groupSeparator=t.groupSeparator),!this._explicitAttrs.has("decimal-separator")&&typeof t.decimalSeparator=="string"&&this.decimalSeparator!==t.decimalSeparator&&(this.decimalSeparator=t.decimalSeparator)}_formatNumber(e){let t=typeof this.precision=="number"&&Number.isFinite(this.precision)?e.toFixed(Math.max(0,this.precision)):String(e),[r,n]=t.split("."),s=r.replace(/\B(?=(\d{3})+(?!\d))/g,this.groupSeparator);return n!=null?`${s}${this.decimalSeparator}${n}`:s}_formattedValue(){if(typeof this.value=="number")return this._formatNumber(this.value);let e=String(this.value??""),t=Number(e);return e.trim()!==""&&Number.isFinite(t)?this._formatNumber(t):e}_trendIcon(){return this.trend==="up"?"trending-up":this.trend==="down"?"trending-down":this.trend==="neutral"?"minus":""}_renderValue(){let e=this._formattedValue();return this.formatter?this.formatter(this.value,{formatted:e,statistic:this}):e}render(){let e=this._trendIcon(),t=this.valueColor?`--lui-statistic-value-color:${this.valueColor}`:Wc;return this.loading?Qs`
|
|
6436
6463
|
<div class="statistic" part="statistic" style=${t} aria-busy="true">
|
|
6437
6464
|
<div class="skeleton title-skeleton" part="title-skeleton"></div>
|
|
6438
6465
|
<div class="skeleton value-skeleton" part="value-skeleton"></div>
|
|
@@ -6560,7 +6587,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
6560
6587
|
.value-skeleton { width: 150px; height: calc(var(--lui-statistic-value-size) * 1.05); }
|
|
6561
6588
|
.desc-skeleton { width: 120px; height: 13px; }
|
|
6562
6589
|
@keyframes lui-statistic-shimmer { to { transform: translateX(100%); } }
|
|
6563
|
-
`],a([
|
|
6590
|
+
`],a([Jt()],ct.prototype,"title",2),a([Jt()],ct.prototype,"value",2),a([Jt()],ct.prototype,"prefix",2),a([Jt()],ct.prototype,"suffix",2),a([Jt()],ct.prototype,"description",2),a([Jt({type:Number})],ct.prototype,"precision",2),a([Jt({attribute:"group-separator"})],ct.prototype,"groupSeparator",2),a([Jt({attribute:"decimal-separator"})],ct.prototype,"decimalSeparator",2),a([Jt({reflect:!0})],ct.prototype,"size",2),a([Jt({reflect:!0})],ct.prototype,"align",2),a([Jt({reflect:!0})],ct.prototype,"trend",2),a([Jt({attribute:"trend-value"})],ct.prototype,"trendValue",2),a([Jt({reflect:!0})],ct.prototype,"status",2),a([Jt({attribute:"value-color"})],ct.prototype,"valueColor",2),a([Jt({type:Boolean,reflect:!0})],ct.prototype,"loading",2),a([Jt({attribute:!1})],ct.prototype,"formatter",2),ct=a([Ov("lui-statistic")],ct);import{css as Gp,html as Ho,LitElement as Yp,nothing as Mi}from"lit";import{customElement as Yc,property as Kt,query as Up,queryAssignedElements as Dv,state as Fv}from"lit/decorators.js";import{css as Hv,html as Uc,LitElement as Rv,nothing as Gc}from"lit";import{customElement as Iv,property as Jr,queryAssignedElements as Vv}from"lit/decorators.js";var St=class extends Rv{constructor(){super(...arguments);this.variant="danger";this.size="md";this.radius="full";this.placement="top-right";this.count="";this.max=99;this.showZero=!1;this.dot=!1;this.processing=!1;this.text="";this.color="";this.offset="";this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=F(this,"badge");!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("max")&&typeof t.max=="number"&&this.max!==t.max&&(this.max=t.max),!this._explicitAttrs.has("show-zero")&&typeof t.showZero=="boolean"&&this.showZero!==t.showZero&&(this.showZero=t.showZero)}_hasContent(){return(this._assignedElements?.length??0)>0||Array.from(this.childNodes).some(e=>e.nodeType===Node.TEXT_NODE?!!e.textContent?.trim():e.nodeType===Node.ELEMENT_NODE&&!e.hasAttribute("slot"))}_displayCount(){let e=this.count;if(typeof e=="number")return e>this.max?`${this.max}+`:String(e);let t=String(e??"").trim();if(!t)return"";let r=Number(t);return Number.isFinite(r)&&t!==""&&r>this.max?`${this.max}+`:t}_isZero(){return Number(this.count)===0&&String(this.count).trim()!==""}_visible(){return this.dot||this.processing?!0:!(!this._displayCount()||this._isZero()&&!this.showZero)}_style(){let[e="",t=""]=this.offset.split(/[\s,]+/).filter(Boolean),r=[this.color?`--lui-badge-bg:${this.color}`:"",e?`--lui-badge-offset-x:${e}`:"",t?`--lui-badge-offset-y:${t}`:""].filter(Boolean);return r.length?r.join(";"):Gc}_renderBadge(e){if(!this._visible())return Gc;let t=this._displayCount(),r=["badge",this.dot?"dot":"",e?"standalone":"floating"].filter(Boolean).join(" ");return Uc`<span class=${r} part="badge" style=${this._style()} aria-label=${this.dot?this.text||this.variant:t}>${this.dot?Gc:t}</span>`}render(){let e=this._hasContent(),t=!e;return t&&this.text?Uc`
|
|
6564
6591
|
<span class="status-row" part="status" style=${this._style()}>
|
|
6565
6592
|
${this._renderBadge(!0)}
|
|
6566
6593
|
<span part="text">${this.text}</span>
|
|
@@ -7170,7 +7197,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
7170
7197
|
transition: none;
|
|
7171
7198
|
}
|
|
7172
7199
|
}
|
|
7173
|
-
`],a([Kt({attribute:"active-key"})],ft.prototype,"activeKey",2),a([Kt({attribute:!1})],ft.prototype,"items",2),a([Kt({reflect:!0})],ft.prototype,"size",2),a([Kt({reflect:!0})],ft.prototype,"variant",2),a([Kt({reflect:!0})],ft.prototype,"placement",2),a([Kt({type:Boolean,reflect:!0})],ft.prototype,"closable",2),a([Kt({type:Boolean,reflect:!0})],ft.prototype,"disabled",2),a([Kt({reflect:!0})],ft.prototype,"collapse",2),a([Kt({attribute:"overflow-label"})],ft.prototype,"overflowLabel",2),a([Kt({attribute:"overflow-icon"})],ft.prototype,"overflowIcon",2),a([Dv({flatten:!0})],ft.prototype,"_assignedElements",2),a([Up("slot:not([name])")],ft.prototype,"_defaultSlot",2),a([Up(".nav")],ft.prototype,"_navEl",2),a([Fv()],ft.prototype,"_overflowIndexes",2),ft=a([Yc("lui-tab")],ft);var Aa=class extends ft{};Aa=a([Yc("lui-tabs")],Aa);import{css as Xp,html as ja,LitElement as Zp,nothing as Xc}from"lit";import{customElement as Qp,property as
|
|
7200
|
+
`],a([Kt({attribute:"active-key"})],ft.prototype,"activeKey",2),a([Kt({attribute:!1})],ft.prototype,"items",2),a([Kt({reflect:!0})],ft.prototype,"size",2),a([Kt({reflect:!0})],ft.prototype,"variant",2),a([Kt({reflect:!0})],ft.prototype,"placement",2),a([Kt({type:Boolean,reflect:!0})],ft.prototype,"closable",2),a([Kt({type:Boolean,reflect:!0})],ft.prototype,"disabled",2),a([Kt({reflect:!0})],ft.prototype,"collapse",2),a([Kt({attribute:"overflow-label"})],ft.prototype,"overflowLabel",2),a([Kt({attribute:"overflow-icon"})],ft.prototype,"overflowIcon",2),a([Dv({flatten:!0})],ft.prototype,"_assignedElements",2),a([Up("slot:not([name])")],ft.prototype,"_defaultSlot",2),a([Up(".nav")],ft.prototype,"_navEl",2),a([Fv()],ft.prototype,"_overflowIndexes",2),ft=a([Yc("lui-tab")],ft);var Aa=class extends ft{};Aa=a([Yc("lui-tabs")],Aa);import{css as Xp,html as ja,LitElement as Zp,nothing as Xc}from"lit";import{customElement as Qp,property as kr,state as Lv}from"lit/decorators.js";var br=class extends Zp{constructor(){super(...arguments);this.key="";this.value="";this.label="";this.description="";this.icon="";this.extra="";this.disabled=!1;this.open=!1;this.iconPlacement="end";this._onHeaderClick=()=>{this.dispatchEvent(new CustomEvent("item-toggle-request",{bubbles:!0,composed:!0}))}}get itemKey(){return this.key||this.value}render(){let e="header",t="body";return ja`
|
|
7174
7201
|
<button
|
|
7175
7202
|
part="header"
|
|
7176
7203
|
id=${e}
|
|
@@ -7195,7 +7222,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
7195
7222
|
<div part="body-content"><slot></slot></div>
|
|
7196
7223
|
</div>
|
|
7197
7224
|
</div>
|
|
7198
|
-
`}};
|
|
7225
|
+
`}};br.styles=[A,P,Xp`
|
|
7199
7226
|
:host {
|
|
7200
7227
|
display: block;
|
|
7201
7228
|
min-width: 0;
|
|
@@ -7287,7 +7314,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
7287
7314
|
transition-duration: 0.01ms;
|
|
7288
7315
|
}
|
|
7289
7316
|
}
|
|
7290
|
-
`],a([
|
|
7317
|
+
`],a([kr()],br.prototype,"key",2),a([kr()],br.prototype,"value",2),a([kr()],br.prototype,"label",2),a([kr()],br.prototype,"description",2),a([kr()],br.prototype,"icon",2),a([kr()],br.prototype,"extra",2),a([kr({type:Boolean,reflect:!0})],br.prototype,"disabled",2),a([kr({type:Boolean,reflect:!0})],br.prototype,"open",2),a([kr({reflect:!0,attribute:"icon-placement"})],br.prototype,"iconPlacement",2),br=a([Qp("lui-collapse-item")],br);var Kr=class extends Zp{constructor(){super(...arguments);this.variant="bordered";this.size="md";this.iconPlacement="end";this.accordion=!1;this.defaultOpenKeys="";this._internalOpen=null;this._items=[];this._onItemRequest=e=>{let t=e.target?.closest?.("lui-collapse-item");if(!t||t.disabled)return;e.stopPropagation();let r=this._items.indexOf(t);r<0||this._toggle(this._keyFor(t,r))};this._onSlotChange=()=>{this._items=Array.from(this.querySelectorAll("lui-collapse-item")),this._syncItems()}}connectedCallback(){super.connectedCallback(),this.addEventListener("item-toggle-request",this._onItemRequest)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("item-toggle-request",this._onItemRequest)}get _openList(){return this.openKeys!==void 0?this.openKeys:this._internalOpen!==null?this._internalOpen:this.defaultOpenKeys.split(",").map(e=>e.trim()).filter(Boolean)}_keyFor(e,t){return e.itemKey||String(t)}_toggle(e){let t=new Set(this._openList),r=!t.has(e),n;this.accordion?n=r?[e]:[]:(r?t.add(e):t.delete(e),n=[...t]);let s={key:e,open:r,openKeys:n},d=new CustomEvent("toggle",{detail:s,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(d)&&(this.openKeys===void 0&&(this._internalOpen=n,this._syncItems(n)),this.dispatchEvent(new CustomEvent("change",{detail:s,bubbles:!0,composed:!0})))}_syncItems(e=this._openList){let t=new Set(e);this._items.forEach((r,n)=>{r.open=t.has(this._keyFor(r,n)),r.iconPlacement=this.iconPlacement})}openAll(){if(this.accordion)return;let e=this._items.map((t,r)=>({item:t,key:this._keyFor(t,r)})).filter(({item:t})=>!t.disabled).map(({key:t})=>t);this._applyExternal(e,!0)}closeAll(){this._applyExternal([],!1)}_applyExternal(e,t){this.openKeys===void 0&&(this._internalOpen=e,this._syncItems(e)),this.dispatchEvent(new CustomEvent("change",{detail:{key:"",open:t,openKeys:e},bubbles:!0,composed:!0}))}updated(){this._syncItems()}render(){let t=F(this,"collapse").variant??this.variant;return ja`
|
|
7291
7318
|
<div class="root" part="base" data-variant=${t}>
|
|
7292
7319
|
<slot @slotchange=${this._onSlotChange}></slot>
|
|
7293
7320
|
</div>
|
|
@@ -7333,7 +7360,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
7333
7360
|
:host([variant="plain"]) ::slotted(lui-collapse-item + lui-collapse-item) {
|
|
7334
7361
|
border-top: 1px solid color-mix(in srgb, var(--lui-color-border) 72%, transparent);
|
|
7335
7362
|
}
|
|
7336
|
-
`],a([
|
|
7363
|
+
`],a([kr({reflect:!0})],Kr.prototype,"variant",2),a([kr({reflect:!0})],Kr.prototype,"size",2),a([kr({reflect:!0,attribute:"icon-placement"})],Kr.prototype,"iconPlacement",2),a([kr({type:Boolean,reflect:!0})],Kr.prototype,"accordion",2),a([kr({attribute:!1})],Kr.prototype,"openKeys",2),a([kr({attribute:"default-open-keys"})],Kr.prototype,"defaultOpenKeys",2),a([Lv()],Kr.prototype,"_internalOpen",2),Kr=a([Qp("lui-collapse")],Kr);import{css as Bv,html as zn,LitElement as qv,nothing as Js}from"lit";import{customElement as Kv,property as yr,state as Wv}from"lit/decorators.js";var Jp=[{color:"var(--lui-color-info)",bgMix:18,fgMix:92},{color:"oklch(64% 0.22 295)",bgMix:18,fgMix:88},{color:"var(--lui-color-success)",bgMix:16,fgMix:90},{color:"var(--lui-color-warning)",bgMix:18,fgMix:94},{color:"var(--lui-color-danger)",bgMix:16,fgMix:92},{color:"oklch(70% 0.16 185)",bgMix:16,fgMix:88},{color:"oklch(66% 0.24 310)",bgMix:18,fgMix:90},{color:"var(--lui-color-fg-muted)",bgMix:16,fgMix:88}],dt=class extends qv{constructor(){super(...arguments);this.src="";this.alt="";this.name="";this.text="";this.icon="user";this.size="md";this.radius="full";this.color="auto";this.status="none";this.statusColor="";this.statusPosition="top-right";this.clickable=!1;this.disabled=!1;this.tooltip="";this.tooltipPlacement="top";this._imageError=!1;this._explicitAttrs=new Set;this._onImageError=()=>{this._imageError=!0};this._onClick=e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())};this._onKeyDown=e=>{!this.clickable||this.disabled||e.key!=="Enter"&&e.key!==" "||(e.preventDefault(),this._emitKeyboardClick())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){e.has("src")&&(this._imageError=!1);let t=F(this,"avatar");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("color")&&typeof t.color=="string"&&this.color!==t.color&&(this.color=t.color),!this._explicitAttrs.has("status")&&typeof t.status=="string"&&this.status!==t.status&&(this.status=t.status),!this._explicitAttrs.has("status-position")&&typeof t.statusPosition=="string"&&this.statusPosition!==t.statusPosition&&(this.statusPosition=t.statusPosition),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("clickable")&&typeof t.clickable=="boolean"&&this.clickable!==t.clickable&&(this.clickable=t.clickable)}_getSeed(){return this.text||this.name||this.alt||this.icon||"avatar"}_getInitials(){let e=(this.text||this.name||this.alt||"").trim();if(!e)return"";let t=e.split(/[\s\-_]+/).map(r=>r.trim()).filter(Boolean);return t.length>=2?`${t[0][0]??""}${t[t.length-1][0]??""}`.toUpperCase():e.length<=2?e.toUpperCase():e.slice(0,2).toUpperCase()}_getAutoPaletteStyle(){if(this.color!=="auto"||this.src&&!this._imageError)return"";let e=this._getSeed(),t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;let r=Jp[t%Jp.length];return`--lui-avatar-bg:color-mix(in srgb, ${r.color} ${r.bgMix}%, var(--lui-color-bg));--lui-avatar-fg:color-mix(in srgb, ${r.color} ${r.fgMix}%, var(--lui-color-fg));--lui-avatar-border:color-mix(in srgb, ${r.color} 24%, transparent);`}_getAvatarStyle(){return[this._getAutoPaletteStyle(),this.statusColor?`--lui-avatar-status-bg:${this.statusColor};`:""].filter(Boolean).join("")||Js}_emitKeyboardClick(){this.disabled||!this.clickable||this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0}))}_renderAvatar(){let e=!!this.src&&!this._imageError,t=this._getInitials(),r=this.alt||this.name||this.text||"avatar",n=this.status!=="none"||!!this.statusColor;return zn`
|
|
7337
7364
|
<span
|
|
7338
7365
|
class="avatar"
|
|
7339
7366
|
part="base"
|
|
@@ -7550,7 +7577,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
7550
7577
|
bottom: 0;
|
|
7551
7578
|
left: 0;
|
|
7552
7579
|
}
|
|
7553
|
-
`],a([
|
|
7580
|
+
`],a([yr()],dt.prototype,"src",2),a([yr()],dt.prototype,"alt",2),a([yr()],dt.prototype,"name",2),a([yr()],dt.prototype,"text",2),a([yr()],dt.prototype,"icon",2),a([yr({reflect:!0})],dt.prototype,"size",2),a([yr({reflect:!0})],dt.prototype,"radius",2),a([yr({reflect:!0})],dt.prototype,"color",2),a([yr({reflect:!0})],dt.prototype,"status",2),a([yr({attribute:"status-color"})],dt.prototype,"statusColor",2),a([yr({reflect:!0,attribute:"status-position"})],dt.prototype,"statusPosition",2),a([yr({type:Boolean,reflect:!0})],dt.prototype,"clickable",2),a([yr({type:Boolean,reflect:!0})],dt.prototype,"disabled",2),a([yr()],dt.prototype,"tooltip",2),a([yr({attribute:"tooltip-placement"})],dt.prototype,"tooltipPlacement",2),a([Wv()],dt.prototype,"_imageError",2),dt=a([Kv("lui-avatar")],dt);import{css as Uv,html as Zo,LitElement as Gv,nothing as Zc}from"lit";import{customElement as Yv,property as vo,queryAssignedElements as Xv,state as Zv}from"lit/decorators.js";var $t=class extends Gv{constructor(){super(...arguments);this.size="md";this.radius="full";this.max=0;this.overlap=10;this.bordered=!0;this.summaryColor="neutral";this.expandTrigger="hover";this.summaryText="";this.statusPosition="top-right";this._slotHiddenCount=0;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this.style.setProperty("--lui-avatar-group-overlap",`${this.overlap}px`)}willUpdate(e){let t=F(this,"avatarGroup");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("overlap")&&typeof t.overlap=="number"&&this.overlap!==t.overlap&&(this.overlap=t.overlap),!this._explicitAttrs.has("bordered")&&typeof t.bordered=="boolean"&&this.bordered!==t.bordered&&(this.bordered=t.bordered),!this._explicitAttrs.has("expand-trigger")&&typeof t.expandTrigger=="string"&&this.expandTrigger!==t.expandTrigger&&(this.expandTrigger=t.expandTrigger)}updated(){this.style.setProperty("--lui-avatar-group-overlap",`${this.overlap}px`),this._syncSlottedAvatars()}disconnectedCallback(){super.disconnectedCallback(),this._restoreSlottedAvatars()}_getVisibleCount(e){return!this.max||this.max<1?e:Math.min(this.max,e)}_syncSlottedAvatars(){if(this.items?.length){this._restoreSlottedAvatars(),this._slotHiddenCount=0;return}let e=this._assignedElements.filter(n=>n.tagName.toLowerCase()==="lui-avatar"),t=this._getVisibleCount(e.length),r=0;e.forEach((n,s)=>{let d=s<t;n.style.display=d?"":"none",n.style.marginInlineStart=d&&s>0?"calc(-1 * var(--lui-avatar-group-overlap))":"",n.style.zIndex=d?String(e.length-s):"",n.style.setProperty("--lui-avatar-size",this._sizeValue()),n.style.setProperty("--lui-avatar-radius",this._radiusValue()),n.style.setProperty("--lui-avatar-ring",this.bordered?"var(--lui-avatar-group-ring)":"none"),n.hasAttribute("status-position")||n.setAttribute("status-position",this.statusPosition),d||(r+=1)}),this._slotHiddenCount=r}_restoreSlottedAvatars(){this._assignedElements?.filter(t=>t.tagName.toLowerCase()==="lui-avatar")?.forEach(t=>{t.style.display="",t.style.marginInlineStart="",t.style.zIndex="",t.style.removeProperty("--lui-avatar-size"),t.style.removeProperty("--lui-avatar-radius"),t.style.removeProperty("--lui-avatar-ring")})}_sizeValue(){switch(this.size){case"xs":return"24px";case"sm":return"32px";case"lg":return"48px";case"xl":return"64px";default:return"40px"}}_radiusValue(){switch(this.radius){case"none":return"0px";case"sm":return"6px";case"md":return"var(--lui-radius-sm)";case"lg":return"var(--lui-radius)";default:return"var(--lui-radius-full)"}}_avatarStyle(e,t,r=!0){return[`margin-inline-start:${r&&e>0?"calc(-1 * var(--lui-avatar-group-overlap))":"0"}`,`z-index:${t-e}`,`--lui-avatar-size:${this._sizeValue()}`,`--lui-avatar-radius:${this._radiusValue()}`,`--lui-avatar-ring:${this.bordered?"var(--lui-avatar-group-ring)":"none"}`].join(";")}_itemLabel(e,t="Avatar"){return e.name||e.text||e.alt||e.key?.toString()||t}_renderItemAvatar(e,t,r,n=!0){return Zo`
|
|
7554
7581
|
<lui-avatar
|
|
7555
7582
|
style=${this._avatarStyle(t,r,n)}
|
|
7556
7583
|
.src=${e.src??""}
|
|
@@ -7660,7 +7687,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
7660
7687
|
font-size: var(--lui-font-size-xs);
|
|
7661
7688
|
color: var(--lui-color-muted);
|
|
7662
7689
|
}
|
|
7663
|
-
`],a([vo({reflect:!0})],$t.prototype,"size",2),a([vo({reflect:!0})],$t.prototype,"radius",2),a([vo({type:Number})],$t.prototype,"max",2),a([vo({type:Number})],$t.prototype,"overlap",2),a([vo({type:Number})],$t.prototype,"total",2),a([vo({attribute:!1})],$t.prototype,"items",2),a([vo({type:Boolean})],$t.prototype,"bordered",2),a([vo({reflect:!0})],$t.prototype,"summaryColor",2),a([vo({reflect:!0,attribute:"expand-trigger"})],$t.prototype,"expandTrigger",2),a([vo({attribute:"summary-text"})],$t.prototype,"summaryText",2),a([vo({reflect:!0,attribute:"status-position"})],$t.prototype,"statusPosition",2),a([Xv({flatten:!0})],$t.prototype,"_assignedElements",2),a([Zv()],$t.prototype,"_slotHiddenCount",2),$t=a([Yv("lui-avatar-group")],$t);import{css as pb,html as Sn,LitElement as mb,nothing as $n}from"lit";typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(o,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var t=document.createEvent("CustomEvent");return t.initCustomEvent(o,e.bubbles,e.cancelable,e.detail),t}));var Qv=typeof document<"u"&&!!document.documentMode,Qc;function Jv(){return Qc||(Qc=document.createElement("div").style)}var e1=["webkit","moz","ms"],el={};function id(i){if(el[i])return el[i];let o=Jv();if(i in o)return el[i]=i;let e=i[0].toUpperCase()+i.slice(1),t=e1.length;for(;t--;){let r=`${e1[t]}${e}`;if(r in o)return el[i]=r}}function tl(i,o){return parseFloat(o[id(i)])||0}function rl(i,o,e=window.getComputedStyle(i)){let t=o==="border"?"Width":"";return{left:tl(`${o}Left${t}`,e),right:tl(`${o}Right${t}`,e),top:tl(`${o}Top${t}`,e),bottom:tl(`${o}Bottom${t}`,e)}}function En(i,o,e){i.style[id(o)]=e}function eb(i,o){let e=id("transform");En(i,"transition",`${e} ${o.duration}ms ${o.easing}`)}function tb(i,{x:o,y:e,scale:t,isSVG:r},n){if(En(i,"transform",`scale(${t}) translate(${o}px, ${e}px)`),r&&Qv){let s=window.getComputedStyle(i).getPropertyValue("transform");i.setAttribute("transform",s)}}function Jc(i){let o=i.parentNode;(!o||o.nodeType!==1)&&(o=document.documentElement);let e=window.getComputedStyle(i),t=window.getComputedStyle(o),r=i.getBoundingClientRect(),n=o.getBoundingClientRect();return{elem:{style:e,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:rl(i,"margin",e),border:rl(i,"border",e)},parent:{style:t,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,padding:rl(o,"padding",t),border:rl(o,"border",t)}}}var Pa={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?Pa={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(Pa={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function ed(i,o,e,t){Pa[i].split(" ").forEach(r=>{o.addEventListener(r,e,t)})}function td(i,o,e){Pa[i].split(" ").forEach(t=>{o.removeEventListener(t,e)})}function r1(i,o){let e=i.length;for(;e--;)if(i[e].pointerId===o.pointerId)return e;return-1}function od(i,o){let e;if(o.touches){e=0;for(let t of o.touches)t.pointerId=e++,od(i,t);return}e=r1(i,o),e>-1&&i.splice(e,1),i.push(o)}function rb(i,o){if(o.touches){for(;i.length;)i.pop();return}let e=r1(i,o);e>-1&&i.splice(e,1)}function t1(i){i=i.slice(0);let o=i.pop(),e;for(;e=i.pop();)o={clientX:(e.clientX-o.clientX)/2+o.clientX,clientY:(e.clientY-o.clientY)/2+o.clientY};return o}function rd(i){if(i.length<2)return 0;let o=i[0],e=i[1];return Math.sqrt(Math.pow(Math.abs(e.clientX-o.clientX),2)+Math.pow(Math.abs(e.clientY-o.clientY),2))}function ob(i){let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1}function ib(i){return(i.getAttribute("class")||"").trim()}function nb(i,o){return i.nodeType===1&&` ${ib(i)} `.indexOf(` ${o} `)>-1}function ab(i,o){for(let e=i;e!=null;e=e.parentNode)if(nb(e,o.excludeClass)||o.exclude.indexOf(e)>-1)return!0;return!1}var sb=/^http:[\w\.\/]+svg$/;function lb(i){return sb.test(i.namespaceURI)&&i.nodeName.toLowerCase()!=="svg"}function cb(i){let o={};for(let e in i)i.hasOwnProperty(e)&&(o[e]=i[e]);return o}var o1={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:i=>{i.preventDefault(),i.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:tb,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function nd(i,o){if(!i)throw new Error("Panzoom requires an element as an argument");if(i.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!ob(i))throw new Error("Panzoom should be called on elements that have been attached to the DOM");o={...o1,...o};let e=lb(i),t=i.parentNode;t.style.overflow=o.overflow,t.style.userSelect="none",t.style.touchAction=o.touchAction,(o.canvas?t:i).style.cursor=o.cursor,i.style.userSelect="none",i.style.touchAction=o.touchAction,En(i,"transformOrigin",typeof o.origin=="string"?o.origin:e?"0 0":"50% 50%");function r(){t.style.overflow="",t.style.userSelect="",t.style.touchAction="",t.style.cursor="",i.style.cursor="",i.style.userSelect="",i.style.touchAction="",En(i,"transformOrigin","")}function n(L={}){for(let X in L)L.hasOwnProperty(X)&&(o[X]=L[X]);(L.hasOwnProperty("cursor")||L.hasOwnProperty("canvas"))&&(t.style.cursor=i.style.cursor="",(o.canvas?t:i).style.cursor=o.cursor),L.hasOwnProperty("overflow")&&(t.style.overflow=L.overflow),L.hasOwnProperty("touchAction")&&(t.style.touchAction=L.touchAction,i.style.touchAction=L.touchAction)}let s=0,d=0,h=1,p=!1;E(o.startScale,{animate:!1,force:!0}),setTimeout(()=>{S(o.startX,o.startY,{animate:!1,force:!0})});function f(L,X,ue){if(ue.silent)return;let je=new CustomEvent(L,{detail:X});i.dispatchEvent(je)}function x(L,X,ue){let je={x:s,y:d,scale:h,isSVG:e,originalEvent:ue};return requestAnimationFrame(()=>{typeof X.animate=="boolean"&&(X.animate?eb(i,X):En(i,"transition","none")),X.setTransform(i,je,X),f(L,je,X),f("panzoomchange",je,X)}),je}function y(L,X,ue,je){let U={...o,...je},_e={x:s,y:d,opts:U};if(!je?.force&&(U.disablePan||U.panOnlyWhenZoomed&&h===U.startScale))return _e;if(L=parseFloat(L),X=parseFloat(X),U.disableXAxis||(_e.x=(U.relative?s:0)+L),U.disableYAxis||(_e.y=(U.relative?d:0)+X),U.contain){let ne=Jc(i),Sr=ne.elem.width/h,q=ne.elem.height/h,ai=Sr*ue,so=q*ue,Xr=(ai-Sr)/2,lo=(so-q)/2;if(U.contain==="inside"){let si=(-ne.elem.margin.left-ne.parent.padding.left+Xr)/ue,Lo=(ne.parent.width-ai-ne.parent.padding.left-ne.elem.margin.left-ne.parent.border.left-ne.parent.border.right+Xr)/ue;_e.x=Math.max(Math.min(_e.x,Lo),si);let co=(-ne.elem.margin.top-ne.parent.padding.top+lo)/ue,an=(ne.parent.height-so-ne.parent.padding.top-ne.elem.margin.top-ne.parent.border.top-ne.parent.border.bottom+lo)/ue;_e.y=Math.max(Math.min(_e.y,an),co)}else if(U.contain==="outside"){let si=(-(ai-ne.parent.width)-ne.parent.padding.left-ne.parent.border.left-ne.parent.border.right+Xr)/ue,Lo=(Xr-ne.parent.padding.left)/ue;_e.x=Math.max(Math.min(_e.x,Lo),si);let co=(-(so-ne.parent.height)-ne.parent.padding.top-ne.parent.border.top-ne.parent.border.bottom+lo)/ue,an=(lo-ne.parent.padding.top)/ue;_e.y=Math.max(Math.min(_e.y,an),co)}}return U.roundPixels&&(_e.x=Math.round(_e.x),_e.y=Math.round(_e.y)),_e}function C(L,X){let ue={...o,...X},je={scale:h,opts:ue};if(!X?.force&&ue.disableZoom)return je;let U=o.minScale,_e=o.maxScale;if(ue.contain){let ne=Jc(i),Sr=ne.elem.width/h,q=ne.elem.height/h;if(Sr>1&&q>1){let ai=ne.parent.width-ne.parent.border.left-ne.parent.border.right,so=ne.parent.height-ne.parent.border.top-ne.parent.border.bottom,Xr=ai/Sr,lo=so/q;o.contain==="inside"?_e=Math.min(_e,Xr,lo):o.contain==="outside"&&(U=Math.max(U,Xr,lo))}}return je.scale=Math.min(Math.max(L,U),_e),je}function S(L,X,ue,je){let U=y(L,X,h,ue);return s!==U.x||d!==U.y?(s=U.x,d=U.y,x("panzoompan",U.opts,je)):{x:s,y:d,scale:h,isSVG:e,originalEvent:je}}function E(L,X,ue){let je=C(L,X),U=je.opts;if(!X?.force&&U.disableZoom)return;L=je.scale;let _e=s,ne=d;if(U.focal){let q=U.focal;_e=(q.x/L-q.x/h+s*L)/L,ne=(q.y/L-q.y/h+d*L)/L}let Sr=y(_e,ne,L,{relative:!1,force:!0});return s=Sr.x,d=Sr.y,h=L,x("panzoomzoom",U,ue)}function T(L,X){let ue={...o,animate:!0,...X};return E(h*Math.exp((L?1:-1)*ue.step),ue)}function O(L){return T(!0,L)}function H(L){return T(!1,L)}function R(L,X,ue,je){let U=Jc(i),_e={width:U.parent.width-U.parent.padding.left-U.parent.padding.right-U.parent.border.left-U.parent.border.right,height:U.parent.height-U.parent.padding.top-U.parent.padding.bottom-U.parent.border.top-U.parent.border.bottom},ne=X.clientX-U.parent.left-U.parent.padding.left-U.parent.border.left-U.elem.margin.left,Sr=X.clientY-U.parent.top-U.parent.padding.top-U.parent.border.top-U.elem.margin.top;e||(ne-=U.elem.width/h/2,Sr-=U.elem.height/h/2);let q={x:ne/_e.width*(_e.width*L),y:Sr/_e.height*(_e.height*L)};return E(L,{...ue,animate:!1,focal:q},je)}function N(L,X){L.preventDefault();let ue={...o,...X,animate:!1},U=(L.deltaY===0&&L.deltaX?L.deltaX:L.deltaY)<0?1:-1,_e=C(h*Math.exp(U*ue.step/3),ue).scale;return R(_e,L,ue,L)}function $(L){let X={...o,animate:!0,force:!0,...L};h=C(X.startScale,X).scale;let ue=y(X.startX,X.startY,h,X);return s=ue.x,d=ue.y,x("panzoomreset",X)}let Y,fe,$e,Je,we,no,De=[];function Xt(L){if(ab(L.target,o))return;od(De,L),p=!0,o.handleStartEvent(L),Y=s,fe=d,f("panzoomstart",{x:s,y:d,scale:h,isSVG:e,originalEvent:L},o);let X=t1(De);$e=X.clientX,Je=X.clientY,we=h,no=rd(De)}function ur(L){if(!p||Y===void 0||fe===void 0||$e===void 0||Je===void 0)return;od(De,L);let X=t1(De),ue=De.length>1,je=h;if(ue){no===0&&(no=rd(De));let U=rd(De)-no;je=C(U*o.step/80+we).scale,R(je,X,{animate:!1},L)}(!ue||o.pinchAndPan)&&S(Y+(X.clientX-$e)/je,fe+(X.clientY-Je)/je,{animate:!1},L)}function ao(L){De.length===1&&f("panzoomend",{x:s,y:d,scale:h,isSVG:e,originalEvent:L},o),rb(De,L),p&&(p=!1,Y=fe=$e=Je=void 0)}let nn=!1;function Yr(){nn||(nn=!0,ed("down",o.canvas?t:i,Xt),ed("move",document,ur,{passive:!0}),ed("up",document,ao,{passive:!0}))}function To(){nn=!1,td("down",o.canvas?t:i,Xt),td("move",document,ur),td("up",document,ao)}return o.noBind||Yr(),{bind:Yr,destroy:To,eventNames:Pa,getPan:()=>({x:s,y:d}),getScale:()=>h,getOptions:()=>cb(o),handleDown:Xt,handleMove:ur,handleUp:ao,pan:S,reset:$,resetStyle:r,setOptions:n,setStyle:(L,X)=>En(i,L,X),zoom:E,zoomIn:O,zoomOut:H,zoomToPoint:R,zoomWithWheel:N}}nd.defaultOptions=o1;import{customElement as gb,property as er,query as ad,state as Tn}from"lit/decorators.js";import{css as db,html as Bi,LitElement as ub,nothing as i1}from"lit";import{customElement as hb,property as Ro}from"lit/decorators.js";var n1={fromAttribute(i){return i==null?!0:i!=="false"&&i!=="0"},toAttribute(i){return i?"":"false"}};function ol(i){return i==null||i===""?"":pt(i)}var Jt=class extends ub{constructor(){super(...arguments);this.loading=!0;this.active=!0;this.variant="text";this.size="md";this.radius="md";this.rows=3;this.pauseWhenHidden=!0;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this._intersectionObserver?.disconnect()}_setupIntersectionObserver(){this._intersectionObserver?.disconnect(),this.dataset.inView="true",!(!this.pauseWhenHidden||typeof IntersectionObserver>"u")&&(this._intersectionObserver=new IntersectionObserver(e=>{let t=e[0];this.dataset.inView=t?.isIntersecting?"true":"false"}),this._intersectionObserver.observe(this))}willUpdate(e){e.has("pauseWhenHidden")&&this._setupIntersectionObserver();let t=F(this,"skeleton");!this._explicitAttrs.has("active")&&typeof t.active=="boolean"&&this.active!==t.active&&(this.active=t.active),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("rows")&&typeof t.rows=="number"&&this.rows!==t.rows&&(this.rows=t.rows)}_hostStyle(){let e=[this.width!=null&&this.variant!=="text"?`--lui-skeleton-width:${ol(this.width)}`:"",this.height!=null?`--lui-skeleton-height:${ol(this.height)}`:""].filter(Boolean);return e.length?e.join(";"):i1}_lineWidth(e,t){let r=this.widths?.[e];return r!=null?ol(r):this.width!=null&&t===1?ol(this.width):e===t-1&&t>1?"68%":e===0&&t>2?"92%":"100%"}_renderText(e=this.rows){let t=Math.max(1,Math.floor(e||1));return Bi`
|
|
7690
|
+
`],a([vo({reflect:!0})],$t.prototype,"size",2),a([vo({reflect:!0})],$t.prototype,"radius",2),a([vo({type:Number})],$t.prototype,"max",2),a([vo({type:Number})],$t.prototype,"overlap",2),a([vo({type:Number})],$t.prototype,"total",2),a([vo({attribute:!1})],$t.prototype,"items",2),a([vo({type:Boolean})],$t.prototype,"bordered",2),a([vo({reflect:!0})],$t.prototype,"summaryColor",2),a([vo({reflect:!0,attribute:"expand-trigger"})],$t.prototype,"expandTrigger",2),a([vo({attribute:"summary-text"})],$t.prototype,"summaryText",2),a([vo({reflect:!0,attribute:"status-position"})],$t.prototype,"statusPosition",2),a([Xv({flatten:!0})],$t.prototype,"_assignedElements",2),a([Zv()],$t.prototype,"_slotHiddenCount",2),$t=a([Yv("lui-avatar-group")],$t);import{css as pb,html as Sn,LitElement as mb,nothing as $n}from"lit";typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(o,e){e=e||{bubbles:!1,cancelable:!1,detail:null};var t=document.createEvent("CustomEvent");return t.initCustomEvent(o,e.bubbles,e.cancelable,e.detail),t}));var Qv=typeof document<"u"&&!!document.documentMode,Qc;function Jv(){return Qc||(Qc=document.createElement("div").style)}var e1=["webkit","moz","ms"],el={};function id(i){if(el[i])return el[i];let o=Jv();if(i in o)return el[i]=i;let e=i[0].toUpperCase()+i.slice(1),t=e1.length;for(;t--;){let r=`${e1[t]}${e}`;if(r in o)return el[i]=r}}function tl(i,o){return parseFloat(o[id(i)])||0}function rl(i,o,e=window.getComputedStyle(i)){let t=o==="border"?"Width":"";return{left:tl(`${o}Left${t}`,e),right:tl(`${o}Right${t}`,e),top:tl(`${o}Top${t}`,e),bottom:tl(`${o}Bottom${t}`,e)}}function En(i,o,e){i.style[id(o)]=e}function eb(i,o){let e=id("transform");En(i,"transition",`${e} ${o.duration}ms ${o.easing}`)}function tb(i,{x:o,y:e,scale:t,isSVG:r},n){if(En(i,"transform",`scale(${t}) translate(${o}px, ${e}px)`),r&&Qv){let s=window.getComputedStyle(i).getPropertyValue("transform");i.setAttribute("transform",s)}}function Jc(i){let o=i.parentNode;(!o||o.nodeType!==1)&&(o=document.documentElement);let e=window.getComputedStyle(i),t=window.getComputedStyle(o),r=i.getBoundingClientRect(),n=o.getBoundingClientRect();return{elem:{style:e,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:rl(i,"margin",e),border:rl(i,"border",e)},parent:{style:t,width:n.width,height:n.height,top:n.top,bottom:n.bottom,left:n.left,right:n.right,padding:rl(o,"padding",t),border:rl(o,"border",t)}}}var Pa={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?Pa={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(Pa={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function ed(i,o,e,t){Pa[i].split(" ").forEach(r=>{o.addEventListener(r,e,t)})}function td(i,o,e){Pa[i].split(" ").forEach(t=>{o.removeEventListener(t,e)})}function r1(i,o){let e=i.length;for(;e--;)if(i[e].pointerId===o.pointerId)return e;return-1}function od(i,o){let e;if(o.touches){e=0;for(let t of o.touches)t.pointerId=e++,od(i,t);return}e=r1(i,o),e>-1&&i.splice(e,1),i.push(o)}function rb(i,o){if(o.touches){for(;i.length;)i.pop();return}let e=r1(i,o);e>-1&&i.splice(e,1)}function t1(i){i=i.slice(0);let o=i.pop(),e;for(;e=i.pop();)o={clientX:(e.clientX-o.clientX)/2+o.clientX,clientY:(e.clientY-o.clientY)/2+o.clientY};return o}function rd(i){if(i.length<2)return 0;let o=i[0],e=i[1];return Math.sqrt(Math.pow(Math.abs(e.clientX-o.clientX),2)+Math.pow(Math.abs(e.clientY-o.clientY),2))}function ob(i){let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1}function ib(i){return(i.getAttribute("class")||"").trim()}function nb(i,o){return i.nodeType===1&&` ${ib(i)} `.indexOf(` ${o} `)>-1}function ab(i,o){for(let e=i;e!=null;e=e.parentNode)if(nb(e,o.excludeClass)||o.exclude.indexOf(e)>-1)return!0;return!1}var sb=/^http:[\w\.\/]+svg$/;function lb(i){return sb.test(i.namespaceURI)&&i.nodeName.toLowerCase()!=="svg"}function cb(i){let o={};for(let e in i)i.hasOwnProperty(e)&&(o[e]=i[e]);return o}var o1={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:i=>{i.preventDefault(),i.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:tb,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function nd(i,o){if(!i)throw new Error("Panzoom requires an element as an argument");if(i.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!ob(i))throw new Error("Panzoom should be called on elements that have been attached to the DOM");o={...o1,...o};let e=lb(i),t=i.parentNode;t.style.overflow=o.overflow,t.style.userSelect="none",t.style.touchAction=o.touchAction,(o.canvas?t:i).style.cursor=o.cursor,i.style.userSelect="none",i.style.touchAction=o.touchAction,En(i,"transformOrigin",typeof o.origin=="string"?o.origin:e?"0 0":"50% 50%");function r(){t.style.overflow="",t.style.userSelect="",t.style.touchAction="",t.style.cursor="",i.style.cursor="",i.style.userSelect="",i.style.touchAction="",En(i,"transformOrigin","")}function n(L={}){for(let X in L)L.hasOwnProperty(X)&&(o[X]=L[X]);(L.hasOwnProperty("cursor")||L.hasOwnProperty("canvas"))&&(t.style.cursor=i.style.cursor="",(o.canvas?t:i).style.cursor=o.cursor),L.hasOwnProperty("overflow")&&(t.style.overflow=L.overflow),L.hasOwnProperty("touchAction")&&(t.style.touchAction=L.touchAction,i.style.touchAction=L.touchAction)}let s=0,d=0,h=1,p=!1;E(o.startScale,{animate:!1,force:!0}),setTimeout(()=>{S(o.startX,o.startY,{animate:!1,force:!0})});function f(L,X,ue){if(ue.silent)return;let je=new CustomEvent(L,{detail:X});i.dispatchEvent(je)}function x(L,X,ue){let je={x:s,y:d,scale:h,isSVG:e,originalEvent:ue};return requestAnimationFrame(()=>{typeof X.animate=="boolean"&&(X.animate?eb(i,X):En(i,"transition","none")),X.setTransform(i,je,X),f(L,je,X),f("panzoomchange",je,X)}),je}function y(L,X,ue,je){let U={...o,...je},_e={x:s,y:d,opts:U};if(!je?.force&&(U.disablePan||U.panOnlyWhenZoomed&&h===U.startScale))return _e;if(L=parseFloat(L),X=parseFloat(X),U.disableXAxis||(_e.x=(U.relative?s:0)+L),U.disableYAxis||(_e.y=(U.relative?d:0)+X),U.contain){let ne=Jc(i),$r=ne.elem.width/h,q=ne.elem.height/h,ai=$r*ue,so=q*ue,Xr=(ai-$r)/2,lo=(so-q)/2;if(U.contain==="inside"){let si=(-ne.elem.margin.left-ne.parent.padding.left+Xr)/ue,Lo=(ne.parent.width-ai-ne.parent.padding.left-ne.elem.margin.left-ne.parent.border.left-ne.parent.border.right+Xr)/ue;_e.x=Math.max(Math.min(_e.x,Lo),si);let co=(-ne.elem.margin.top-ne.parent.padding.top+lo)/ue,an=(ne.parent.height-so-ne.parent.padding.top-ne.elem.margin.top-ne.parent.border.top-ne.parent.border.bottom+lo)/ue;_e.y=Math.max(Math.min(_e.y,an),co)}else if(U.contain==="outside"){let si=(-(ai-ne.parent.width)-ne.parent.padding.left-ne.parent.border.left-ne.parent.border.right+Xr)/ue,Lo=(Xr-ne.parent.padding.left)/ue;_e.x=Math.max(Math.min(_e.x,Lo),si);let co=(-(so-ne.parent.height)-ne.parent.padding.top-ne.parent.border.top-ne.parent.border.bottom+lo)/ue,an=(lo-ne.parent.padding.top)/ue;_e.y=Math.max(Math.min(_e.y,an),co)}}return U.roundPixels&&(_e.x=Math.round(_e.x),_e.y=Math.round(_e.y)),_e}function C(L,X){let ue={...o,...X},je={scale:h,opts:ue};if(!X?.force&&ue.disableZoom)return je;let U=o.minScale,_e=o.maxScale;if(ue.contain){let ne=Jc(i),$r=ne.elem.width/h,q=ne.elem.height/h;if($r>1&&q>1){let ai=ne.parent.width-ne.parent.border.left-ne.parent.border.right,so=ne.parent.height-ne.parent.border.top-ne.parent.border.bottom,Xr=ai/$r,lo=so/q;o.contain==="inside"?_e=Math.min(_e,Xr,lo):o.contain==="outside"&&(U=Math.max(U,Xr,lo))}}return je.scale=Math.min(Math.max(L,U),_e),je}function S(L,X,ue,je){let U=y(L,X,h,ue);return s!==U.x||d!==U.y?(s=U.x,d=U.y,x("panzoompan",U.opts,je)):{x:s,y:d,scale:h,isSVG:e,originalEvent:je}}function E(L,X,ue){let je=C(L,X),U=je.opts;if(!X?.force&&U.disableZoom)return;L=je.scale;let _e=s,ne=d;if(U.focal){let q=U.focal;_e=(q.x/L-q.x/h+s*L)/L,ne=(q.y/L-q.y/h+d*L)/L}let $r=y(_e,ne,L,{relative:!1,force:!0});return s=$r.x,d=$r.y,h=L,x("panzoomzoom",U,ue)}function T(L,X){let ue={...o,animate:!0,...X};return E(h*Math.exp((L?1:-1)*ue.step),ue)}function O(L){return T(!0,L)}function H(L){return T(!1,L)}function R(L,X,ue,je){let U=Jc(i),_e={width:U.parent.width-U.parent.padding.left-U.parent.padding.right-U.parent.border.left-U.parent.border.right,height:U.parent.height-U.parent.padding.top-U.parent.padding.bottom-U.parent.border.top-U.parent.border.bottom},ne=X.clientX-U.parent.left-U.parent.padding.left-U.parent.border.left-U.elem.margin.left,$r=X.clientY-U.parent.top-U.parent.padding.top-U.parent.border.top-U.elem.margin.top;e||(ne-=U.elem.width/h/2,$r-=U.elem.height/h/2);let q={x:ne/_e.width*(_e.width*L),y:$r/_e.height*(_e.height*L)};return E(L,{...ue,animate:!1,focal:q},je)}function N(L,X){L.preventDefault();let ue={...o,...X,animate:!1},U=(L.deltaY===0&&L.deltaX?L.deltaX:L.deltaY)<0?1:-1,_e=C(h*Math.exp(U*ue.step/3),ue).scale;return R(_e,L,ue,L)}function $(L){let X={...o,animate:!0,force:!0,...L};h=C(X.startScale,X).scale;let ue=y(X.startX,X.startY,h,X);return s=ue.x,d=ue.y,x("panzoomreset",X)}let Y,fe,$e,Je,we,no,De=[];function Xt(L){if(ab(L.target,o))return;od(De,L),p=!0,o.handleStartEvent(L),Y=s,fe=d,f("panzoomstart",{x:s,y:d,scale:h,isSVG:e,originalEvent:L},o);let X=t1(De);$e=X.clientX,Je=X.clientY,we=h,no=rd(De)}function hr(L){if(!p||Y===void 0||fe===void 0||$e===void 0||Je===void 0)return;od(De,L);let X=t1(De),ue=De.length>1,je=h;if(ue){no===0&&(no=rd(De));let U=rd(De)-no;je=C(U*o.step/80+we).scale,R(je,X,{animate:!1},L)}(!ue||o.pinchAndPan)&&S(Y+(X.clientX-$e)/je,fe+(X.clientY-Je)/je,{animate:!1},L)}function ao(L){De.length===1&&f("panzoomend",{x:s,y:d,scale:h,isSVG:e,originalEvent:L},o),rb(De,L),p&&(p=!1,Y=fe=$e=Je=void 0)}let nn=!1;function Yr(){nn||(nn=!0,ed("down",o.canvas?t:i,Xt),ed("move",document,hr,{passive:!0}),ed("up",document,ao,{passive:!0}))}function To(){nn=!1,td("down",o.canvas?t:i,Xt),td("move",document,hr),td("up",document,ao)}return o.noBind||Yr(),{bind:Yr,destroy:To,eventNames:Pa,getPan:()=>({x:s,y:d}),getScale:()=>h,getOptions:()=>cb(o),handleDown:Xt,handleMove:hr,handleUp:ao,pan:S,reset:$,resetStyle:r,setOptions:n,setStyle:(L,X)=>En(i,L,X),zoom:E,zoomIn:O,zoomOut:H,zoomToPoint:R,zoomWithWheel:N}}nd.defaultOptions=o1;import{customElement as gb,property as tr,query as ad,state as Tn}from"lit/decorators.js";import{css as db,html as Bi,LitElement as ub,nothing as i1}from"lit";import{customElement as hb,property as Ro}from"lit/decorators.js";var n1={fromAttribute(i){return i==null?!0:i!=="false"&&i!=="0"},toAttribute(i){return i?"":"false"}};function ol(i){return i==null||i===""?"":pt(i)}var er=class extends ub{constructor(){super(...arguments);this.loading=!0;this.active=!0;this.variant="text";this.size="md";this.radius="md";this.rows=3;this.pauseWhenHidden=!0;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this._intersectionObserver?.disconnect()}_setupIntersectionObserver(){this._intersectionObserver?.disconnect(),this.dataset.inView="true",!(!this.pauseWhenHidden||typeof IntersectionObserver>"u")&&(this._intersectionObserver=new IntersectionObserver(e=>{let t=e[0];this.dataset.inView=t?.isIntersecting?"true":"false"}),this._intersectionObserver.observe(this))}willUpdate(e){e.has("pauseWhenHidden")&&this._setupIntersectionObserver();let t=F(this,"skeleton");!this._explicitAttrs.has("active")&&typeof t.active=="boolean"&&this.active!==t.active&&(this.active=t.active),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("rows")&&typeof t.rows=="number"&&this.rows!==t.rows&&(this.rows=t.rows)}_hostStyle(){let e=[this.width!=null&&this.variant!=="text"?`--lui-skeleton-width:${ol(this.width)}`:"",this.height!=null?`--lui-skeleton-height:${ol(this.height)}`:""].filter(Boolean);return e.length?e.join(";"):i1}_lineWidth(e,t){let r=this.widths?.[e];return r!=null?ol(r):this.width!=null&&t===1?ol(this.width):e===t-1&&t>1?"68%":e===0&&t>2?"92%":"100%"}_renderText(e=this.rows){let t=Math.max(1,Math.floor(e||1));return Bi`
|
|
7664
7691
|
<div class="text" part="text">
|
|
7665
7692
|
${Array.from({length:t},(r,n)=>Bi`
|
|
7666
7693
|
<div class="piece line" part="line" style=${`width:${this._lineWidth(n,t)}`}></div>
|
|
@@ -7674,7 +7701,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
7674
7701
|
`;case"text":default:return this._renderText()}}render(){return Bi`
|
|
7675
7702
|
<div class="content" part="content" ?hidden=${this.loading}><slot></slot></div>
|
|
7676
7703
|
${this.loading?Bi`<div class="skeleton" part="skeleton" aria-hidden="true" style=${this._hostStyle()}>${this._renderSkeleton()}</div>`:i1}
|
|
7677
|
-
`}};
|
|
7704
|
+
`}};er.styles=[A,P,db`
|
|
7678
7705
|
:host {
|
|
7679
7706
|
display: block;
|
|
7680
7707
|
width: 100%;
|
|
@@ -7812,7 +7839,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
7812
7839
|
transform: translateX(100%);
|
|
7813
7840
|
}
|
|
7814
7841
|
}
|
|
7815
|
-
`],a([Ro({attribute:"loading",converter:n1})],
|
|
7842
|
+
`],a([Ro({attribute:"loading",converter:n1})],er.prototype,"loading",2),a([Ro({reflect:!0,converter:n1})],er.prototype,"active",2),a([Ro({reflect:!0})],er.prototype,"variant",2),a([Ro({reflect:!0})],er.prototype,"size",2),a([Ro({reflect:!0})],er.prototype,"radius",2),a([Ro({type:Number})],er.prototype,"rows",2),a([Ro()],er.prototype,"width",2),a([Ro()],er.prototype,"height",2),a([Ro({attribute:!1})],er.prototype,"widths",2),a([Ro({type:Boolean,attribute:"pause-when-hidden"})],er.prototype,"pauseWhenHidden",2),er=a([hb("lui-skeleton")],er);var Te=class extends mb{constructor(){super(...arguments);this.src="";this.previewSrc="";this.alt="";this.fallbackSrc="";this.fallback="\u56FE\u7247\u52A0\u8F7D\u5931\u8D25";this.fit="cover";this.radius="md";this.aspectRatio="";this.position="center";this.loading="lazy";this.skeleton=!0;this.preview=!0;this.showPreviewIcon=!0;this.draggablePreview=!0;this._loaded=!1;this._errored=!1;this._previewOpen=!1;this._zoom=1;this._rotate=0;this._panning=!1;this._explicitAttrs=new Set;this._stageMoved=!1;this._onLoad=()=>{this._loaded=!0,this._errored=!1,this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0}))};this._onError=()=>{if(this.fallbackSrc&&this.src!==this.fallbackSrc){this.src=this.fallbackSrc;return}this._errored=!0,this._loaded=!1,this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0}))};this._onFrameClick=()=>this.showPreview();this._onPanzoomStart=()=>{this._panning=!0};this._onPanzoomChange=e=>{let t=e.detail;this._syncZoom(t?.scale,!0)};this._onPanzoomEnd=()=>{this._panning=!1,this._syncZoom(this._panzoom?.getScale(),!0)};this._onKeyDown=e=>{this._previewOpen&&(e.key==="Escape"&&this.closePreview(),(e.key==="+"||e.key==="=")&&!e.metaKey&&!e.ctrlKey&&this.zoomIn(),e.key==="-"&&!e.metaKey&&!e.ctrlKey&&this.zoomOut(),e.key==="0"&&!e.metaKey&&!e.ctrlKey&&this.resetPreview())};this._onStagePointerDown=e=>{e.target===e.currentTarget&&(this._stageMoved=!1,this._stagePointerStart={x:e.clientX,y:e.clientY})};this._onStagePointerMove=e=>{if(!this._stagePointerStart)return;let t=e.clientX-this._stagePointerStart.x,r=e.clientY-this._stagePointerStart.y;(Math.abs(t)>3||Math.abs(r)>3)&&(this._stageMoved=!0)};this._onStagePointerUp=()=>{this._stagePointerStart=void 0};this._onStageClick=e=>{if(e.stopPropagation(),this._stageMoved){this._stageMoved=!1;return}e.target===e.currentTarget&&this.closePreview()}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}disconnectedCallback(){this._destroyPanzoom(),this._removeGlobalListeners(),super.disconnectedCallback()}willUpdate(){let e=F(this,"image");!this._explicitAttrs.has("fit")&&typeof e.fit=="string"&&this.fit!==e.fit&&(this.fit=e.fit),!this._explicitAttrs.has("radius")&&typeof e.radius=="string"&&this.radius!==e.radius&&(this.radius=e.radius),!this._explicitAttrs.has("skeleton")&&typeof e.skeleton=="boolean"&&this.skeleton!==e.skeleton&&(this.skeleton=e.skeleton),!this._explicitAttrs.has("preview")&&typeof e.preview=="boolean"&&this.preview!==e.preview&&(this.preview=e.preview)}updated(e){e.has("src")&&(this._loaded=!1,this._errored=!1,this._resetPreviewTransform())}showPreview(){if(!this.preview||this._errored||!this._resolvedPreviewSrc||this._previewOpen)return;this._previewOpen=!0,this._resetPreviewTransform(),this._addGlobalListeners(),this._setupPanzoom();let e=this._detail();this.dispatchEvent(new CustomEvent("open",{detail:e,bubbles:!0,composed:!0}))}closePreview(){if(!this._previewOpen)return;let e=this._detail();this._previewOpen=!1,this._panning=!1,this._stagePointerStart=void 0,this._stageMoved=!1,this._destroyPanzoom(),this._removeGlobalListeners(),this.dispatchEvent(new CustomEvent("close",{detail:e,bubbles:!0,composed:!0}))}zoomIn(){let e=this._panzoom?.zoomIn({animate:!0});this._syncZoom(e?.scale)}zoomOut(){let e=this._panzoom?.zoomOut({animate:!0});this._syncZoom(e?.scale)}resetPreview(){this._panzoom?.reset({animate:!0}),this._rotate=0,this._syncZoom(this._panzoom?.getScale()??1,!0)}rotatePreview(){this._rotate=(this._rotate+90)%360,this._emitPreviewChange()}get _resolvedPreviewSrc(){return this.previewSrc||this.src}_detail(){return{src:this._resolvedPreviewSrc,zoom:this._zoom,rotate:this._rotate,source:"preview"}}_style(){let e=pt(this.width),t=pt(this.height),r=[e?`--lui-image-width:${e}`:"",t?`--lui-image-height:${t}`:"",this.aspectRatio?`--lui-image-aspect-ratio:${this.aspectRatio}`:"",this.fit?`--lui-image-fit:${this.fit}`:"",this.position?`--lui-image-position:${this.position}`:""].filter(Boolean);return r.length?r.join(";"):$n}_frameClass(){let e=["frame"];return this.aspectRatio&&e.push("has-aspect"),this.preview&&this._loaded&&!this._errored&&e.push("clickable"),e.join(" ")}_imageClass(){return["image",!!(this.height||this.aspectRatio)?"fixed":"natural",this._loaded&&!this._errored?"loaded":""].filter(Boolean).join(" ")}_resetPreviewTransform(){this._zoom=1,this._rotate=0}async _setupPanzoom(){await this.updateComplete;let e=this._previewImageEl,t=this._previewPanzoomEl,r=this._previewStageEl;if(!this._previewOpen||!e||!t||!r||!e.complete||e.naturalWidth===0)return;this._destroyPanzoom();let n=nd(t,{maxScale:6,minScale:.2,step:.25,startScale:1,cursor:"grab",animate:!0,duration:160,easing:"cubic-bezier(.2,.8,.2,1)",disablePan:!this.draggablePreview,handleStartEvent:s=>{s.preventDefault(),this._panning=!0}});this._panzoom=n,this._wheelHandler=s=>{s.preventDefault(),n.zoomWithWheel(s)},r.addEventListener("wheel",this._wheelHandler,{passive:!1}),t.addEventListener("panzoomstart",this._onPanzoomStart),t.addEventListener("panzoomchange",this._onPanzoomChange),t.addEventListener("panzoomend",this._onPanzoomEnd),n.reset({animate:!1,force:!0}),this._syncZoom(1)}_destroyPanzoom(){let e=this._previewStageEl,t=this._previewPanzoomEl;this._wheelHandler&&e&&e.removeEventListener("wheel",this._wheelHandler),t&&(t.removeEventListener("panzoomstart",this._onPanzoomStart),t.removeEventListener("panzoomchange",this._onPanzoomChange),t.removeEventListener("panzoomend",this._onPanzoomEnd)),this._wheelHandler=void 0,this._panzoom?.destroy(),this._panzoom=void 0}_syncZoom(e,t=!1){let r=Math.max(.2,Math.min(6,Math.round((e??this._panzoom?.getScale()??1)*100)/100));r!==this._zoom&&(this._zoom=r,t=!0),t&&this._emitPreviewChange()}_emitPreviewChange(){let e=this._detail();this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}_addGlobalListeners(){window.addEventListener("keydown",this._onKeyDown)}_removeGlobalListeners(){window.removeEventListener("keydown",this._onKeyDown)}_download(){let e=this._resolvedPreviewSrc;if(!e)return;let t=document.createElement("a");t.href=e,t.download=this.alt||e.split("/").pop()||"image",t.rel="noopener",t.click()}_renderPreview(){if(!this._previewOpen)return $n;let e=`--lui-preview-rotate:${this._rotate}deg;`;return Sn`
|
|
7816
7843
|
<div class="preview-layer" part="preview">
|
|
7817
7844
|
<div class="preview-toolbar" part="preview-toolbar" @click=${t=>t.stopPropagation()}>
|
|
7818
7845
|
<div class="preview-title" title=${this.alt||this._resolvedPreviewSrc}>${this.alt||this._resolvedPreviewSrc}</div>
|
|
@@ -8114,7 +8141,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8114
8141
|
border-radius: var(--lui-radius-lg);
|
|
8115
8142
|
}
|
|
8116
8143
|
}
|
|
8117
|
-
`],a([er()],Te.prototype,"src",2),a([er({attribute:"preview-src"})],Te.prototype,"previewSrc",2),a([er()],Te.prototype,"alt",2),a([er({attribute:"fallback-src"})],Te.prototype,"fallbackSrc",2),a([er()],Te.prototype,"fallback",2),a([er({reflect:!0})],Te.prototype,"fit",2),a([er({reflect:!0})],Te.prototype,"radius",2),a([er()],Te.prototype,"width",2),a([er()],Te.prototype,"height",2),a([er({attribute:"aspect-ratio"})],Te.prototype,"aspectRatio",2),a([er()],Te.prototype,"position",2),a([er({reflect:!0})],Te.prototype,"loading",2),a([er({type:Boolean,reflect:!0})],Te.prototype,"skeleton",2),a([er({type:Boolean,reflect:!0})],Te.prototype,"preview",2),a([er({type:Boolean,attribute:"show-preview-icon"})],Te.prototype,"showPreviewIcon",2),a([er({type:Boolean})],Te.prototype,"draggablePreview",2),a([Tn()],Te.prototype,"_loaded",2),a([Tn()],Te.prototype,"_errored",2),a([Tn()],Te.prototype,"_previewOpen",2),a([Tn()],Te.prototype,"_zoom",2),a([Tn()],Te.prototype,"_rotate",2),a([Tn()],Te.prototype,"_panning",2),a([ad(".preview-image")],Te.prototype,"_previewImageEl",2),a([ad(".preview-panzoom")],Te.prototype,"_previewPanzoomEl",2),a([ad(".preview-stage")],Te.prototype,"_previewStageEl",2),Te=a([gb("lui-image")],Te);import{css as Nb,html as Nn,LitElement as Lb,nothing as Va}from"lit";import{customElement as Bb,property as _o,query as P1,state as cl}from"lit/decorators.js";var Oa=typeof window<"u"&&typeof window.document<"u",Or=Oa?window:{},sd=Oa?"ontouchstart"in Or.document.documentElement:!1,ld=Oa?"PointerEvent"in Or:!1,Ci="cropper",eo=`${Ci}-canvas`,l1=`${Ci}-crosshair`,c1=`${Ci}-grid`,d1=`${Ci}-handle`,bo=`${Ci}-image`,yr=`${Ci}-selection`,u1=`${Ci}-shade`,h1=`${Ci}-viewer`,An="select",il="move",Qo="scale",Ha="rotate",jn="transform",ko="none",cd="n-resize",dd="e-resize",ud="s-resize",hd="w-resize",Pn="ne-resize",On="nw-resize",Hn="se-resize",Rn="sw-resize",p1="action",fb=sd?"touchend touchcancel":"mouseup",vb=sd?"touchmove":"mousemove",bb=sd?"touchstart":"mousedown",pd=ld?"pointerdown":bb,md=ld?"pointermove":vb,gd=ld?"pointerup pointercancel":fb,fd="error",vd="keydown",zi="load",bd="resize",kd="wheel",Jo="action",yo="actionend",m1="actionmove",xo="actionstart",wo="change",Ra="transform";function In(i){return typeof i=="string"}var yd=Number.isNaN||Or.isNaN;function me(i){return typeof i=="number"&&!yd(i)}function tr(i){return me(i)&&i>0&&i<1/0}function g1(i){return typeof i>"u"}function xd(i){return typeof i=="object"&&i!==null}var{hasOwnProperty:kb}=Object.prototype;function Vn(i){if(!xd(i))return!1;try{let{constructor:o}=i,{prototype:e}=o;return o&&e&&kb.call(e,"isPrototypeOf")}catch{return!1}}function Dn(i){return typeof i=="function"}function ei(i){return typeof i=="object"&&i!==null&&i.nodeType===1}var yb=/([a-z\d])([A-Z])/g;function wd(i){return String(i).replace(yb,"$1-$2").toLowerCase()}var xb=/-[A-z\d]/g;function _d(i){return i.replace(xb,o=>o.slice(1).toUpperCase())}var f1=/\s\s*/;function Le(i,o,e,t){o.trim().split(f1).forEach(r=>{i.removeEventListener(r,e,t)})}function Ke(i,o,e,t){o.trim().split(f1).forEach(r=>{i.addEventListener(r,e,t)})}function Md(i,o,e,t){Ke(i,o,e,Object.assign(Object.assign({},t),{once:!0}))}var wb={bubbles:!0,cancelable:!0,composed:!0};function v1(i,o,e,t){return i.dispatchEvent(new CustomEvent(o,Object.assign(Object.assign(Object.assign({},wb),{detail:e}),t)))}function b1(i){return typeof i.composedPath=="function"&&i.composedPath().find(ei)||i.target}var a1=Promise.resolve();function k1(i,o){return o?a1.then(i?o.bind(i):o):a1}function nl(i){let o=i.getRootNode();switch(o.nodeType){case 1:return o.ownerDocument;case 9:return o;case 11:return o}return null}function Cd(i){let{documentElement:o}=i.ownerDocument,e=i.getBoundingClientRect();return{left:e.left+(Or.pageXOffset-o.clientLeft),top:e.top+(Or.pageYOffset-o.clientTop)}}var _b=/deg|g?rad|turn$/i;function al(i){let o=parseFloat(i)||0;if(o!==0){let[e="rad"]=String(i).match(_b)||[];switch(e.toLowerCase()){case"deg":return o/360*(Math.PI*2);case"grad":return o/400*(Math.PI*2);case"turn":return o*(Math.PI*2)}}return o}var s1="contain",Mb="cover";function Fn(i,o=s1){let{aspectRatio:e}=i,{width:t,height:r}=i,n=tr(t),s=tr(r);if(n&&s){let d=r*e;o===s1&&d>t||o===Mb&&d<t?r=t/e:t=r*e}else n?r=t/e:s&&(t=r*e);return{width:t,height:r}}function zd(i,...o){if(o.length===0)return i;let[e,t,r,n,s,d]=i,[h,p,f,x,y,C]=o[0];return i=[e*h+r*p,t*h+n*p,e*f+r*x,t*f+n*x,e*y+r*C+s,t*y+n*C+d],zd(i,...o.slice(1))}var Cb=":host([hidden]){display:none!important}",zb=/left|top|width|height/i,y1="open",sl=new WeakMap,ll=new WeakMap,x1=new Map,w1=Or.document&&Array.isArray(Or.document.adoptedStyleSheets)&&"replaceSync"in Or.CSSStyleSheet.prototype,_t=class extends HTMLElement{get $sharedStyle(){return`${this.themeColor?`:host{--theme-color: ${this.themeColor};}`:""}${Cb}`}constructor(){var o,e;super(),this.shadowRootMode=y1,this.slottable=!0;let t=(e=(o=Object.getPrototypeOf(this))===null||o===void 0?void 0:o.constructor)===null||e===void 0?void 0:e.$name;t&&x1.set(t,this.tagName.toLowerCase())}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(o,e,t){if(Object.is(t,e))return;let r=_d(o),n=this[r],s=t;switch(typeof n){case"boolean":s=t!==null&&t!=="false";break;case"number":s=Number(t);break}switch(this[r]=s,o){case"theme-color":{let d=ll.get(this),h=this.$sharedStyle;d&&h&&(w1?d.replaceSync(h):d.textContent=h);break}}}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(o=wd(o),typeof t){case"boolean":t===!0?this.hasAttribute(o)||this.setAttribute(o,""):this.removeAttribute(o);break;case"number":yd(t)?t="":t=String(t);default:t?this.getAttribute(o)!==t&&this.setAttribute(o,t):this.removeAttribute(o)}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach(e=>{let t=_d(e),r=this[t];g1(r)||this.$propertyChangedCallback(t,void 0,r),Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get(){return r},set(n){let s=r;r=n,this.$propertyChangedCallback(t,s,n)}})});let o=this.shadowRoot||this.attachShadow({mode:this.shadowRootMode||y1});if(sl.set(this,o),ll.set(this,this.$addStyles(this.$sharedStyle)),this.$style&&this.$addStyles(this.$style),this.$template){let e=document.createElement("template");e.innerHTML=this.$template,o.appendChild(e.content)}if(this.slottable){let e=document.createElement("slot");o.appendChild(e)}}disconnectedCallback(){ll.has(this)&&ll.delete(this),sl.has(this)&&sl.delete(this)}$getTagNameOf(o){var e;return(e=x1.get(o))!==null&&e!==void 0?e:o}$setStyles(o){return Object.keys(o).forEach(e=>{let t=o[e];me(t)&&(t!==0&&zb.test(e)?t=`${t}px`:t=String(t)),this.style[e]=t}),this}$getShadowRoot(){return this.shadowRoot||sl.get(this)}$addStyles(o){let e,t=this.$getShadowRoot();return w1?(e=new CSSStyleSheet,e.replaceSync(o),t.adoptedStyleSheets=t.adoptedStyleSheets.concat(e)):(e=document.createElement("style"),e.textContent=o,t.appendChild(e)),e}$emit(o,e,t){return v1(this,o,e,t)}$nextTick(o){return k1(this,o)}static $define(o,e){xd(o)&&(e=o,o=""),o||(o=this.$name||this.name),o=wd(o),Oa&&Or.customElements&&!Or.customElements.get(o)&&customElements.define(o,this,e)}};_t.$version="2.1.1";var Eb=':host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}',qi=class extends _t{constructor(){super(...arguments),this.$onPointerDown=null,this.$onPointerMove=null,this.$onPointerUp=null,this.$onWheel=null,this.$wheeling=!1,this.$pointers=new Map,this.$style=Eb,this.$action=ko,this.background=!1,this.disabled=!1,this.scaleStep=.1,this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback(),this.disabled||this.$bind()}disconnectedCallback(){this.disabled||this.$unbind(),super.disconnectedCallback()}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"disabled":t?this.$unbind():this.$bind();break}}$bind(){this.$onPointerDown||(this.$onPointerDown=this.$handlePointerDown.bind(this),Ke(this,pd,this.$onPointerDown)),this.$onPointerMove||(this.$onPointerMove=this.$handlePointerMove.bind(this),Ke(this.ownerDocument,md,this.$onPointerMove)),this.$onPointerUp||(this.$onPointerUp=this.$handlePointerUp.bind(this),Ke(this.ownerDocument,gd,this.$onPointerUp)),this.$onWheel||(this.$onWheel=this.$handleWheel.bind(this),Ke(this,kd,this.$onWheel,{passive:!1,capture:!0}))}$unbind(){this.$onPointerDown&&(Le(this,pd,this.$onPointerDown),this.$onPointerDown=null),this.$onPointerMove&&(Le(this.ownerDocument,md,this.$onPointerMove),this.$onPointerMove=null),this.$onPointerUp&&(Le(this.ownerDocument,gd,this.$onPointerUp),this.$onPointerUp=null),this.$onWheel&&(Le(this,kd,this.$onWheel,{capture:!0}),this.$onWheel=null)}$handlePointerDown(o){let{buttons:e,button:t,type:r}=o;if(this.disabled||(r==="pointerdown"&&o.pointerType==="mouse"||r==="mousedown")&&(me(e)&&e!==1||me(t)&&t!==0||o.ctrlKey))return;let{$pointers:n}=this,s="";if(o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:d,pageX:h,pageY:p})=>{n.set(d,{startX:h,startY:p,endX:h,endY:p})});else{let{pointerId:d=0,pageX:h,pageY:p}=o;n.set(d,{startX:h,startY:p,endX:h,endY:p})}n.size>1?s=jn:ei(o.target)&&(s=o.target.action||o.target.getAttribute(p1)||""),this.$emit(xo,{action:s,relatedEvent:o})!==!1&&(o.preventDefault(),this.$action=s,this.style.willChange="transform")}$handlePointerMove(o){let{$action:e,$pointers:t}=this;if(this.disabled||e===ko||t.size===0||this.$emit(m1,{action:e,relatedEvent:o})===!1)return;if(o.preventDefault(),o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:n,pageX:s,pageY:d})=>{let h=t.get(n);h&&Object.assign(h,{endX:s,endY:d})});else{let{pointerId:n=0,pageX:s,pageY:d}=o,h=t.get(n);h&&Object.assign(h,{endX:s,endY:d})}let r={action:e,relatedEvent:o};if(e===jn){let n=new Map(t),s=0,d=0,h=0,p=0,f=o.pageX,x=o.pageY;t.forEach((S,E)=>{n.delete(E),n.forEach(T=>{let O=T.startX-S.startX,H=T.startY-S.startY,R=T.endX-S.endX,N=T.endY-S.endY,$=0,Y=0,fe=0,$e=0;if(O===0?H<0?fe=Math.PI*2:H>0&&(fe=Math.PI):O>0?fe=Math.PI/2+Math.atan(H/O):O<0&&(fe=Math.PI*1.5+Math.atan(H/O)),R===0?N<0?$e=Math.PI*2:N>0&&($e=Math.PI):R>0?$e=Math.PI/2+Math.atan(N/R):R<0&&($e=Math.PI*1.5+Math.atan(N/R)),$e>0||fe>0){let Je=$e-fe,we=Math.abs(Je);we>s&&(s=we,h=Je,f=(S.startX+T.startX)/2,x=(S.startY+T.startY)/2)}if(O=Math.abs(O),H=Math.abs(H),R=Math.abs(R),N=Math.abs(N),O>0&&H>0?$=Math.sqrt(O*O+H*H):O>0?$=O:H>0&&($=H),R>0&&N>0?Y=Math.sqrt(R*R+N*N):R>0?Y=R:N>0&&(Y=N),$>0&&Y>0){let Je=(Y-$)/$,we=Math.abs(Je);we>d&&(d=we,p=Je,f=(S.startX+T.startX)/2,x=(S.startY+T.startY)/2)}})});let y=s>0,C=d>0;y&&C?(r.rotate=h,r.scale=p,r.centerX=f,r.centerY=x):y?(r.action=Ha,r.rotate=h,r.centerX=f,r.centerY=x):C?(r.action=Qo,r.scale=p,r.centerX=f,r.centerY=x):r.action=ko}else{let[n]=Array.from(t.values());Object.assign(r,n)}t.forEach(n=>{n.startX=n.endX,n.startY=n.endY}),r.action!==ko&&this.$emit(Jo,r,{cancelable:!1})}$handlePointerUp(o){let{$action:e,$pointers:t}=this;if(!(this.disabled||e===ko)&&this.$emit(yo,{action:e,relatedEvent:o})!==!1){if(o.preventDefault(),o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:r})=>{t.delete(r)});else{let{pointerId:r=0}=o;t.delete(r)}t.size===0&&(this.style.willChange="",this.$action=ko)}}$handleWheel(o){if(this.disabled||(o.preventDefault(),this.$wheeling))return;this.$wheeling=!0,setTimeout(()=>{this.$wheeling=!1},50);let t=(o.deltaY>0?-1:1)*this.scaleStep;this.$emit(Jo,{action:Qo,scale:t,relatedEvent:o},{cancelable:!1})}$setAction(o){return In(o)&&(this.$action=o),this}$toCanvas(o){return new Promise((e,t)=>{if(!this.isConnected){t(new Error("The current element is not connected to the DOM."));return}let r=document.createElement("canvas"),n=this.offsetWidth,s=this.offsetHeight,d=1;Vn(o)&&(tr(o.width)||tr(o.height))&&({width:n,height:s}=Fn({aspectRatio:n/s,width:o.width,height:o.height}),d=n/this.offsetWidth),r.width=n,r.height=s;let h=this.querySelector(this.$getTagNameOf(bo));if(!h){e(r);return}h.$ready().then(p=>{let f=r.getContext("2d");if(f){let[x,y,C,S,E,T]=h.$getTransform(),O=E,H=T,R=p.naturalWidth,N=p.naturalHeight;d!==1&&(O*=d,H*=d,R*=d,N*=d);let $=R/2,Y=N/2;f.fillStyle="transparent",f.fillRect(0,0,n,s),Vn(o)&&Dn(o.beforeDraw)&&o.beforeDraw.call(this,f,r),f.save(),f.translate($,Y),f.transform(x,y,C,S,O,H),f.translate(-$,-Y),f.drawImage(p,0,0,R,N),f.restore()}e(r)}).catch(t)})}};qi.$name=eo;qi.$version="2.1.1";var Sb=":host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}",_1=new WeakMap,M1=["alt","crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","src","srcset"],Ki=class extends _t{constructor(){super(...arguments),this.$isReady=!1,this.$matrix=[1,0,0,1,0,0],this.$onLoad=null,this.$onCanvasAction=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$actionStartTarget=null,this.$style=Sb,this.$image=new Image,this.initialCenterSize="contain",this.rotatable=!1,this.scalable=!1,this.skewable=!1,this.slottable=!1,this.translatable=!1,this.alt="",this.crossorigin="",this.decoding="",this.elementtiming="",this.fetchpriority="",this.loading="",this.referrerpolicy="",this.sizes="",this.src="",this.srcset=""}set $canvas(o){_1.set(this,o)}get $canvas(){return _1.get(this)}static get observedAttributes(){return super.observedAttributes.concat(M1,["initial-center-size","rotatable","scalable","skewable","translatable"])}attributeChangedCallback(o,e,t){Object.is(t,e)||(super.attributeChangedCallback(o,e,t),M1.includes(o)&&this.$image.setAttribute(o,t))}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"initialCenterSize":this.$nextTick(()=>{this.$center(t)});break;case"src":this.$isReady=!1;break}}connectedCallback(){super.connectedCallback();let{$image:o}=this,e=this.closest(this.$getTagNameOf(eo));e&&(this.$canvas=e,this.$setStyles({display:"block",position:"absolute"}),this.$onCanvasActionStart=t=>{var r,n;this.$actionStartTarget=(n=(r=t.detail)===null||r===void 0?void 0:r.relatedEvent)===null||n===void 0?void 0:n.target},this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null},this.$onCanvasAction=this.$handleAction.bind(this),Ke(e,xo,this.$onCanvasActionStart),Ke(e,yo,this.$onCanvasActionEnd),Ke(e,Jo,this.$onCanvasAction)),this.$onLoad=this.$handleLoad.bind(this),Ke(o,zi,this.$onLoad),this.$getShadowRoot().appendChild(o)}disconnectedCallback(){let{$image:o,$canvas:e}=this;e&&(this.$onCanvasActionStart&&(Le(e,xo,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(Le(e,yo,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(Le(e,Jo,this.$onCanvasAction),this.$onCanvasAction=null)),o&&this.$onLoad&&(Le(o,zi,this.$onLoad),this.$onLoad=null),this.$getShadowRoot().removeChild(o),super.disconnectedCallback()}$handleLoad(){let{$image:o}=this;this.$setStyles({width:o.naturalWidth,height:o.naturalHeight}),this.$canvas&&this.$center(this.initialCenterSize),this.$isReady=!0}$handleAction(o){if(this.hidden||!(this.rotatable||this.scalable||this.translatable))return;let{$canvas:e}=this,{detail:t}=o;if(t){let{relatedEvent:r}=t,{action:n}=t;switch(n===jn&&(!this.rotatable||!this.scalable)&&(this.rotatable?n=Ha:this.scalable?n=Qo:n=ko),n){case il:if(this.translatable){let s=null;r&&(s=r.target.closest(this.$getTagNameOf(yr))),s||(s=e.querySelector(this.$getTagNameOf(yr))),s&&s.multiple&&!s.active&&(s=e.querySelector(`${this.$getTagNameOf(yr)}[active]`)),(!s||s.hidden||!s.movable||s.dynamic||!(this.$actionStartTarget&&s.contains(this.$actionStartTarget)))&&this.$move(t.endX-t.startX,t.endY-t.startY)}break;case Ha:if(this.rotatable)if(r){let{x:s,y:d}=this.getBoundingClientRect();this.$rotate(t.rotate,r.clientX-s,r.clientY-d)}else this.$rotate(t.rotate);break;case Qo:if(this.scalable)if(r){let s=r.target.closest(this.$getTagNameOf(yr));if(!s||!s.zoomable||s.zoomable&&s.dynamic){let{x:d,y:h}=this.getBoundingClientRect();this.$zoom(t.scale,r.clientX-d,r.clientY-h)}}else this.$zoom(t.scale);break;case jn:if(this.rotatable&&this.scalable){let{rotate:s}=t,{scale:d}=t;d<0?d=1/(1-d):d+=1;let h=Math.cos(s),p=Math.sin(s),[f,x,y,C]=[h*d,p*d,-p*d,h*d];if(r){let S=this.getBoundingClientRect(),E=r.clientX-S.x,T=r.clientY-S.y,[O,H,R,N]=this.$matrix,$=S.width/2,Y=S.height/2,fe=E-$,$e=T-Y,Je=(fe*N-R*$e)/(O*N-R*H),we=($e*O-H*fe)/(O*N-R*H);this.$transform(f,x,y,C,Je*(1-f)+we*y,we*(1-C)+Je*x)}else this.$transform(f,x,y,C,0,0)}break}}}$ready(o){let{$image:e}=this,t=new Promise((r,n)=>{let s=new Error("Failed to load the image source");if(e.complete)e.naturalWidth>0&&e.naturalHeight>0?r(e):n(s);else{let d=()=>{Le(e,fd,h),setTimeout(()=>{r(e)})},h=()=>{Le(e,zi,d),n(s)};Md(e,zi,d),Md(e,fd,h)}});return Dn(o)&&t.then(r=>(o(r),r)),t}$center(o){let{parentElement:e}=this;if(!e)return this;let t=e.getBoundingClientRect(),r=t.width,n=t.height,{x:s,y:d,width:h,height:p}=this.getBoundingClientRect(),f=s+h/2,x=d+p/2,y=t.x+r/2,C=t.y+n/2,{translatable:S}=this;if(!S&&!this.$isReady&&(this.translatable=!0,this.$nextTick(()=>{this.translatable=S})),this.$move(y-f,C-x),o&&(h!==r||p!==n)){let E=r/h,T=n/p,{scalable:O}=this;switch(o&&!O&&!this.$isReady&&(this.scalable=!0,this.$nextTick(()=>{this.scalable=O})),o){case"cover":this.$scale(Math.max(E,T));break;case"contain":this.$scale(Math.min(E,T));break}}return this}$move(o,e=o){if(this.translatable&&me(o)&&me(e)){let[t,r,n,s]=this.$matrix,d=(o*s-n*e)/(t*s-n*r),h=(e*t-r*o)/(t*s-n*r);this.$translate(d,h)}return this}$moveTo(o,e=o){if(this.translatable&&me(o)&&me(e)){let[t,r,n,s]=this.$matrix,d=(o*s-n*e)/(t*s-n*r),h=(e*t-r*o)/(t*s-n*r);this.$setTransform(t,r,n,s,d,h)}return this}$rotate(o,e,t){if(this.rotatable){let r=al(o),n=Math.cos(r),s=Math.sin(r),[d,h,p,f]=[n,s,-s,n];if(me(e)&&me(t)){let[x,y,C,S]=this.$matrix,{width:E,height:T}=this.getBoundingClientRect(),O=E/2,H=T/2,R=e-O,N=t-H,$=(R*S-C*N)/(x*S-C*y),Y=(N*x-y*R)/(x*S-C*y);this.$transform(d,h,p,f,$*(1-d)-Y*p,Y*(1-f)-$*h)}else this.$transform(d,h,p,f,0,0)}return this}$zoom(o,e,t){if(!this.scalable||o===0)return this;if(o<0?o=1/(1-o):o+=1,me(e)&&me(t)){let[r,n,s,d]=this.$matrix,{width:h,height:p}=this.getBoundingClientRect(),f=h/2,x=p/2,y=e-f,C=t-x,S=(y*d-s*C)/(r*d-s*n),E=(C*r-n*y)/(r*d-s*n);this.$transform(o,0,0,o,S*(1-o),E*(1-o))}else this.$scale(o);return this}$scale(o,e=o){return this.scalable&&this.$transform(o,0,0,e,0,0),this}$skew(o,e=0){if(this.skewable){let t=al(o),r=al(e);this.$transform(1,Math.tan(r),Math.tan(t),1,0,0)}return this}$translate(o,e=o){return this.translatable&&me(o)&&me(e)&&this.$transform(1,0,0,1,o,e),this}$transform(o,e,t,r,n,s){return me(o)&&me(e)&&me(t)&&me(r)&&me(n)&&me(s)?this.$setTransform(zd(this.$matrix,[o,e,t,r,n,s])):this}$setTransform(o,e,t,r,n,s){if((this.rotatable||this.scalable||this.skewable||this.translatable)&&(Array.isArray(o)&&([o,e,t,r,n,s]=o),me(o)&&me(e)&&me(t)&&me(r)&&me(n)&&me(s))){let d=[...this.$matrix],h=[o,e,t,r,n,s];if(this.$emit(Ra,{matrix:h,oldMatrix:d})===!1)return this;this.$matrix=h,this.style.transform=`matrix(${h.join(", ")})`}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}};Ki.$name=bo;Ki.$version="2.1.1";var $b=":host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}",C1=new WeakMap,Wi=class extends _t{constructor(){super(...arguments),this.$onWindowResize=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$onSelectionChange=null,this.$style=$b,this.x=0,this.y=0,this.width=0,this.height=0,this.slottable=!1,this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(o){C1.set(this,o)}get $canvas(){return C1.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();let o=this.closest(this.$getTagNameOf(eo));if(o){this.$canvas=o,this.style.position="absolute";let e=o.querySelector(this.$getTagNameOf(yr));e&&(this.$onWindowResize=this.$render.bind(this),this.$onCanvasActionStart=t=>{e.hidden&&t.detail.action===An&&(this.hidden=!1)},this.$onCanvasActionEnd=t=>{e.hidden&&t.detail.action===An&&(this.hidden=!0)},this.$onSelectionChange=t=>{let{x:r,y:n,width:s,height:d}=t.defaultPrevented?e:t.detail;this.$change(r,n,s,d),(e.hidden||r===0&&n===0&&s===0&&d===0)&&(this.hidden=!0)},Ke(window,bd,this.$onWindowResize),Ke(o,xo,this.$onCanvasActionStart),Ke(o,yo,this.$onCanvasActionEnd),Ke(o,wo,this.$onSelectionChange))}this.$render()}disconnectedCallback(){let{$canvas:o}=this;o&&(this.$onWindowResize&&(Le(window,bd,this.$onWindowResize),this.$onWindowResize=null),this.$onCanvasActionStart&&(Le(o,xo,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(Le(o,yo,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onSelectionChange&&(Le(o,wo,this.$onSelectionChange),this.$onSelectionChange=null)),super.disconnectedCallback()}$change(o,e,t=this.width,r=this.height){return!me(o)||!me(e)||!me(t)||!me(r)||o===this.x&&e===this.y&&t===this.width&&r===this.height?this:(this.hidden&&(this.hidden=!1),this.x=o,this.y=e,this.width=t,this.height=r,this.$render())}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:Or.innerWidth*Or.devicePixelRatio})}};Wi.$name=u1;Wi.$version="2.1.1";var Tb=':host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}',Ui=class extends _t{constructor(){super(...arguments),this.$onCanvasCropEnd=null,this.$onCanvasCropStart=null,this.$style=Tb,this.action=ko,this.plain=!1,this.slottable=!1,this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}};Ui.$name=d1;Ui.$version="2.1.1";var Ab=':host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}',z1=new WeakMap,Gi=class extends _t{constructor(){super(...arguments),this.$onCanvasAction=null,this.$onCanvasActionStart=null,this.$onCanvasActionEnd=null,this.$onDocumentKeyDown=null,this.$action="",this.$actionStartTarget=null,this.$changing=!1,this.$style=Ab,this.$initialSelection={x:0,y:0,width:0,height:0},this.x=0,this.y=0,this.width=0,this.height=0,this.aspectRatio=NaN,this.initialAspectRatio=NaN,this.initialCoverage=NaN,this.active=!1,this.linked=!1,this.dynamic=!1,this.movable=!1,this.resizable=!1,this.zoomable=!1,this.multiple=!1,this.keyboard=!1,this.outlined=!1,this.precise=!1}set $canvas(o){z1.set(this,o)}get $canvas(){return z1.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","dynamic","height","initial-aspect-ratio","initial-coverage","keyboard","linked","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"x":case"y":case"width":case"height":this.$changing||this.$nextTick(()=>{this.$change(this.x,this.y,this.width,this.height,this.aspectRatio,!0)});break;case"aspectRatio":case"initialAspectRatio":this.$nextTick(()=>{this.$initSelection()});break;case"initialCoverage":this.$nextTick(()=>{tr(t)&&t<=1&&this.$initSelection(!0,!0)});break;case"keyboard":this.$nextTick(()=>{this.$canvas&&(t?this.$onDocumentKeyDown||(this.$onDocumentKeyDown=this.$handleKeyDown.bind(this),Ke(this.ownerDocument,vd,this.$onDocumentKeyDown)):this.$onDocumentKeyDown&&(Le(this.ownerDocument,vd,this.$onDocumentKeyDown),this.$onDocumentKeyDown=null))});break;case"multiple":this.$nextTick(()=>{if(this.$canvas){let r=this.$getSelections();t?(r.forEach(n=>{n.active=!1}),this.active=!0,this.$emit(wo,{x:this.x,y:this.y,width:this.width,height:this.height})):(this.active=!1,r.slice(1).forEach(n=>{this.$removeSelection(n)}))}});break;case"precise":this.$nextTick(()=>{this.$change(this.x,this.y)});break;case"linked":t&&(this.dynamic=!0);break}}connectedCallback(){super.connectedCallback();let o=this.closest(this.$getTagNameOf(eo));o?(this.$canvas=o,this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`}),this.hidden||this.$render(),this.$initSelection(!0),this.$onCanvasActionStart=this.$handleActionStart.bind(this),this.$onCanvasActionEnd=this.$handleActionEnd.bind(this),this.$onCanvasAction=this.$handleAction.bind(this),Ke(o,xo,this.$onCanvasActionStart),Ke(o,yo,this.$onCanvasActionEnd),Ke(o,Jo,this.$onCanvasAction)):this.$render()}disconnectedCallback(){let{$canvas:o}=this;o&&(this.$onCanvasActionStart&&(Le(o,xo,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(Le(o,yo,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(Le(o,Jo,this.$onCanvasAction),this.$onCanvasAction=null)),super.disconnectedCallback()}$getSelections(){let o=[];return this.parentElement&&(o=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(yr)))),o}$initSelection(o=!1,e=!1){let{initialCoverage:t,parentElement:r}=this;if(tr(t)&&r){let n=this.aspectRatio||this.initialAspectRatio,s=(e?0:this.width)||r.offsetWidth*t,d=(e?0:this.height)||r.offsetHeight*t;tr(n)&&({width:s,height:d}=Fn({aspectRatio:n,width:s,height:d})),this.$change(this.x,this.y,s,d),o&&this.$center(),this.$initialSelection={x:this.x,y:this.y,width:this.width,height:this.height}}}$createSelection(){let o=this.cloneNode(!0);return this.hasAttribute("id")&&o.removeAttribute("id"),o.initialCoverage=NaN,this.active=!1,this.parentElement&&this.parentElement.insertBefore(o,this.nextSibling),o}$removeSelection(o=this){if(this.parentElement){let e=this.$getSelections();if(e.length>1){let t=e.indexOf(o),r=e[t+1]||e[t-1];r&&(o.active=!1,this.parentElement.removeChild(o),r.active=!0,r.$emit(wo,{x:r.x,y:r.y,width:r.width,height:r.height}))}else this.$clear()}}$handleActionStart(o){var e,t;let r=(t=(e=o.detail)===null||e===void 0?void 0:e.relatedEvent)===null||t===void 0?void 0:t.target;this.$action="",this.$actionStartTarget=r,!this.hidden&&this.multiple&&!this.active&&r===this&&this.parentElement&&(this.$getSelections().forEach(n=>{n.active=!1}),this.active=!0,this.$emit(wo,{x:this.x,y:this.y,width:this.width,height:this.height}))}$handleAction(o){let{currentTarget:e,detail:t}=o;if(!e||!t)return;let{relatedEvent:r}=t,{action:n}=t,s=r?b1(r):null;if(!n&&this.multiple&&(n=this.$action||s?.action,this.$action=n),!n||this.hidden&&n!==An||this.multiple&&!this.active&&n!==Qo)return;let{width:d,height:h}=this,p=t.endX-t.startX,f=t.endY-t.startY,{aspectRatio:x}=this;switch(!tr(x)&&r.shiftKey&&(x=tr(d)&&tr(h)?d/h:1),n){case An:if(p!==0||f!==0){p===0?p=f:f===0&&(f=p);let{$canvas:y}=this,C=Cd(e);(this.multiple&&!this.hidden?this.$createSelection():this).$change(t.startX-C.left,t.startY-C.top,Math.abs(p),Math.abs(f),x),p<0?f<0?n=On:f>0&&(n=Rn):p>0&&(f<0?n=Pn:f>0&&(n=Hn)),y&&(y.$action=n)}break;case il:this.movable&&(this.dynamic||this.$actionStartTarget&&this.contains(this.$actionStartTarget))&&this.$move(p,f);break;case Qo:if(r&&this.zoomable&&(this.dynamic||this.contains(r.target))){let y=Cd(e);this.$zoom(t.scale,r.pageX-y.left,r.pageY-y.top)}break;default:this.$resize(n,p,f,x)}}$handleActionEnd(){this.$action="",this.$actionStartTarget=null}$handleKeyDown(o){if(this.hidden||!this.keyboard||this.multiple&&!this.active||o.defaultPrevented)return;let{activeElement:e}=document;if(!(e&&(["INPUT","TEXTAREA"].includes(e.tagName)||["true","plaintext-only"].includes(e.contentEditable))))switch(o.key){case"Backspace":o.metaKey&&(o.preventDefault(),this.$removeSelection());break;case"Delete":o.preventDefault(),this.$removeSelection();break;case"ArrowLeft":o.preventDefault(),this.$move(-1,0);break;case"ArrowRight":o.preventDefault(),this.$move(1,0);break;case"ArrowUp":o.preventDefault(),this.$move(0,-1);break;case"ArrowDown":o.preventDefault(),this.$move(0,1);break;case"+":o.preventDefault(),this.$zoom(.1);break;case"-":o.preventDefault(),this.$zoom(-.1);break}}$center(){let{parentElement:o}=this;if(!o)return this;let e=(o.offsetWidth-this.width)/2,t=(o.offsetHeight-this.height)/2;return this.$change(e,t)}$move(o,e=o){return this.$moveTo(this.x+o,this.y+e)}$moveTo(o,e=o){return this.movable?this.$change(o,e):this}$resize(o,e=0,t=0,r=this.aspectRatio){if(!this.resizable)return this;let n=tr(r),{$canvas:s}=this,{x:d,y:h,width:p,height:f}=this;switch(o){case cd:h+=t,f-=t,f<0&&(o=ud,f=-f,h-=f),n&&(e=t*r,d+=e/2,p-=e,p<0&&(p=-p,d-=p));break;case dd:p+=e,p<0&&(o=hd,p=-p,d-=p),n&&(t=e/r,h-=t/2,f+=t,f<0&&(f=-f,h-=f));break;case ud:f+=t,f<0&&(o=cd,f=-f,h-=f),n&&(e=t*r,d-=e/2,p+=e,p<0&&(p=-p,d-=p));break;case hd:d+=e,p-=e,p<0&&(o=dd,p=-p,d-=p),n&&(t=e/r,h+=t/2,f-=t,f<0&&(f=-f,h-=f));break;case Pn:n&&(t=-e/r),h+=t,f-=t,p+=e,p<0&&f<0?(o=Rn,p=-p,f=-f,d-=p,h-=f):p<0?(o=On,p=-p,d-=p):f<0&&(o=Hn,f=-f,h-=f);break;case On:n&&(t=e/r),d+=e,h+=t,p-=e,f-=t,p<0&&f<0?(o=Hn,p=-p,f=-f,d-=p,h-=f):p<0?(o=Pn,p=-p,d-=p):f<0&&(o=Rn,f=-f,h-=f);break;case Hn:n&&(t=e/r),p+=e,f+=t,p<0&&f<0?(o=On,p=-p,f=-f,d-=p,h-=f):p<0?(o=Rn,p=-p,d-=p):f<0&&(o=Pn,f=-f,h-=f);break;case Rn:n&&(t=-e/r),d+=e,p-=e,f+=t,p<0&&f<0?(o=Pn,p=-p,f=-f,d-=p,h-=f):p<0?(o=Hn,p=-p,d-=p):f<0&&(o=On,f=-f,h-=f);break}return s&&s.$setAction(o),this.$change(d,h,p,f)}$zoom(o,e,t){if(!this.zoomable||o===0)return this;o<0?o=1/(1-o):o+=1;let{width:r,height:n}=this,s=r*o,d=n*o,h=this.x,p=this.y;return me(e)&&me(t)?(h-=(s-r)*((e-this.x)/r),p-=(d-n)*((t-this.y)/n)):(h-=(s-r)/2,p-=(d-n)/2),this.$change(h,p,s,d)}$change(o,e,t=this.width,r=this.height,n=this.aspectRatio,s=!1){return this.$changing||!me(o)||!me(e)||!me(t)||!me(r)||t<0||r<0?this:(tr(n)&&({width:t,height:r}=Fn({aspectRatio:n,width:t,height:r},"cover")),this.precise||(o=Math.round(o),e=Math.round(e),t=Math.round(t),r=Math.round(r)),o===this.x&&e===this.y&&t===this.width&&r===this.height&&Object.is(n,this.aspectRatio)&&!s?this:(this.hidden&&(this.hidden=!1),this.$emit(wo,{x:o,y:e,width:t,height:r})===!1?this:(this.$changing=!0,this.x=o,this.y=e,this.width=t,this.height=r,this.$changing=!1,this.$render())))}$reset(){let{x:o,y:e,width:t,height:r}=this.$initialSelection;return this.$change(o,e,t,r)}$clear(){return this.$change(0,0,0,0,NaN,!0),this.hidden=!0,this}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(o){return new Promise((e,t)=>{if(!this.isConnected){t(new Error("The current element is not connected to the DOM."));return}let r=document.createElement("canvas"),{width:n,height:s}=this,d=1;if(Vn(o)&&(tr(o.width)||tr(o.height))&&({width:n,height:s}=Fn({aspectRatio:n/s,width:o.width,height:o.height}),d=n/this.width),r.width=n,r.height=s,!this.$canvas){e(r);return}let h=this.$canvas.querySelector(this.$getTagNameOf(bo));if(!h){e(r);return}h.$ready().then(p=>{let f=r.getContext("2d");if(f){let[x,y,C,S,E,T]=h.$getTransform(),O=-this.x,H=-this.y,R=(O*S-C*H)/(x*S-C*y),N=(H*x-y*O)/(x*S-C*y),$=x*R+C*N+E,Y=y*R+S*N+T,fe=p.naturalWidth,$e=p.naturalHeight;d!==1&&($*=d,Y*=d,fe*=d,$e*=d);let Je=fe/2,we=$e/2;f.fillStyle="transparent",f.fillRect(0,0,n,s),Vn(o)&&Dn(o.beforeDraw)&&o.beforeDraw.call(this,f,r),f.save(),f.translate(Je,we),f.transform(x,y,C,S,$,Y),f.translate(-Je,-we),f.drawImage(p,0,0,fe,$e),f.restore()}e(r)}).catch(t)})}};Gi.$name=yr;Gi.$version="2.1.1";var jb=":host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}",Yi=class extends _t{constructor(){super(...arguments),this.$style=jb,this.bordered=!1,this.columns=3,this.covered=!1,this.rows=3,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(o,e,t){Object.is(t,e)||(super.$propertyChangedCallback(o,e,t),(o==="rows"||o==="columns")&&this.$nextTick(()=>{this.$render()}))}connectedCallback(){super.connectedCallback(),this.$render()}$render(){let o=this.$getShadowRoot(),e=document.createDocumentFragment();for(let t=0;t<this.rows;t+=1){let r=document.createElement("span");r.setAttribute("role","row");for(let n=0;n<this.columns;n+=1){let s=document.createElement("span");s.setAttribute("role","gridcell"),r.appendChild(s)}e.appendChild(r)}o&&(o.innerHTML="",o.appendChild(e))}};Yi.$name=c1;Yi.$version="2.1.1";var Pb=':host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}',Xi=class extends _t{constructor(){super(...arguments),this.$style=Pb,this.centered=!1,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}};Xi.$name=l1;Xi.$version="2.1.1";var Ob=":host{display:block;height:100%;overflow:hidden;position:relative;width:100%}",E1=new WeakMap,S1=new WeakMap,$1=new WeakMap,T1=new WeakMap,Hb="both",Rb="horizontal",A1="vertical",Ib="none",Zi=class extends _t{constructor(){super(...arguments),this.$onSelectionChange=null,this.$onSourceImageLoad=null,this.$onSourceImageTransform=null,this.$scale=1,this.$style=Ob,this.resize=A1,this.selection="",this.slottable=!1}set $image(o){S1.set(this,o)}get $image(){return S1.get(this)}set $sourceImage(o){T1.set(this,o)}get $sourceImage(){return T1.get(this)}set $canvas(o){E1.set(this,o)}get $canvas(){return E1.get(this)}set $selection(o){$1.set(this,o)}get $selection(){return $1.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){var o,e;super.connectedCallback();let t=null;if(this.selection?t=(e=(o=nl(this))===null||o===void 0?void 0:o.querySelector(this.selection))!==null&&e!==void 0?e:null:t=this.closest(this.$getTagNameOf(yr)),ei(t)){this.$selection=t,this.$onSelectionChange=this.$handleSelectionChange.bind(this),Ke(t,wo,this.$onSelectionChange);let r=t.closest(this.$getTagNameOf(eo));if(r){this.$canvas=r;let n=r.querySelector(this.$getTagNameOf(bo));n&&(this.$sourceImage=n,this.$image=n.cloneNode(!0),this.$getShadowRoot().appendChild(this.$image),this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this),this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this),Ke(n.$image,zi,this.$onSourceImageLoad),Ke(n,Ra,this.$onSourceImageTransform))}this.$render()}}disconnectedCallback(){let{$selection:o,$sourceImage:e}=this;o&&this.$onSelectionChange&&(Le(o,wo,this.$onSelectionChange),this.$onSelectionChange=null),e&&this.$onSourceImageLoad&&(Le(e.$image,zi,this.$onSourceImageLoad),this.$onSourceImageLoad=null),e&&this.$onSourceImageTransform&&(Le(e,Ra,this.$onSourceImageTransform),this.$onSourceImageTransform=null),super.disconnectedCallback()}$handleSelectionChange(o){this.$render(o.defaultPrevented?this.$selection:o.detail)}$handleSourceImageLoad(){let{$image:o,$sourceImage:e}=this,t=o.getAttribute("src"),r=e.getAttribute("src");r&&r!==t&&(o.setAttribute("src",r),o.$ready(()=>{this.$render()}))}$handleSourceImageTransform(o){this.$render(void 0,o.detail.matrix)}$render(o,e){let{$canvas:t,$selection:r}=this;!o&&!r.hidden&&(o=r),(!o||o.x===0&&o.y===0&&o.width===0&&o.height===0)&&(o={x:0,y:0,width:t.offsetWidth,height:t.offsetHeight});let{x:n,y:s,width:d,height:h}=o,p={},{clientWidth:f,clientHeight:x}=this,y=f,C=x,S=NaN;switch(this.resize){case Hb:S=1,y=d,C=h,p.width=d,p.height=h;break;case Rb:S=h>0?x/h:0,y=d*S,p.width=y;break;case A1:S=d>0?f/d:0,C=h*S,p.height=C;break;case Ib:default:f>0?S=d>0?f/d:0:x>0&&(S=h>0?x/h:0)}this.$scale=S,this.$setStyles(p),this.$sourceImage&&setTimeout(()=>{this.$transformImageByOffset(e??this.$sourceImage.$getTransform(),-n,-s)})}$transformImageByOffset(o,e,t){let{$image:r,$scale:n,$sourceImage:s}=this;if(s&&r&&n>=0){let[d,h,p,f,x,y]=o,C=(e*f-p*t)/(d*f-p*h),S=(t*d-h*e)/(d*f-p*h),E=d*C+p*S+x,T=h*C+f*S+y;s.$ready(O=>{this.$setStyles.call(r,{width:O.naturalWidth*n,height:O.naturalHeight*n})}),r.$setTransform(d,h,p,f,E*n,T*n)}}};Zi.$name=h1;Zi.$version="2.1.1";var Vb='<cropper-canvas background><cropper-image rotatable scalable skewable translatable></cropper-image><cropper-shade hidden></cropper-shade><cropper-handle action="select" plain></cropper-handle><cropper-selection initial-coverage="0.5" movable resizable><cropper-grid role="grid" bordered covered></cropper-grid><cropper-crosshair centered></cropper-crosshair><cropper-handle action="move" theme-color="rgba(255, 255, 255, 0.35)"></cropper-handle><cropper-handle action="n-resize"></cropper-handle><cropper-handle action="e-resize"></cropper-handle><cropper-handle action="s-resize"></cropper-handle><cropper-handle action="w-resize"></cropper-handle><cropper-handle action="ne-resize"></cropper-handle><cropper-handle action="nw-resize"></cropper-handle><cropper-handle action="se-resize"></cropper-handle><cropper-handle action="sw-resize"></cropper-handle></cropper-selection></cropper-canvas>',Db=/^img|canvas$/,Fb=/<(\/?(?:script|style)[^>]*)>/gi,j1={template:Vb};qi.$define();Xi.$define();Yi.$define();Ui.$define();Ki.$define();Gi.$define();Wi.$define();Zi.$define();var Ia=class{constructor(o,e){var t;if(this.options=j1,In(o)&&(o=document.querySelector(o)),!ei(o)||!Db.test(o.localName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=o,e=Object.assign(Object.assign({},j1),e),this.options=e;let{container:r}=e;if(r&&(In(r)&&(r=(t=nl(o))===null||t===void 0?void 0:t.querySelector(r)),!ei(r)))throw new Error("The `container` option must be an element or a valid selector.");ei(r)||(o.parentElement?r=o.parentElement:r=o.ownerDocument.body),this.container=r;let n=o.localName,s="";n==="img"?{src:s}=o:n==="canvas"&&window.HTMLCanvasElement&&(s=o.toDataURL());let{template:d}=e;if(d&&In(d)){let h=document.createElement("template"),p=document.createDocumentFragment();h.innerHTML=d.replace(Fb,"<$1>"),p.appendChild(h.content),Array.from(p.querySelectorAll(bo)).forEach(f=>{f.setAttribute("src",s),f.setAttribute("alt",o.alt||"The image to crop"),n==="img"&&["crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","srcset"].forEach(x=>{o.hasAttribute(x)&&f.setAttribute(x,o.getAttribute(x)||"")})}),o.parentElement?(o.style.display="none",r.insertBefore(p,o.nextSibling)):r.appendChild(p)}}getCropperCanvas(){return this.container.querySelector(eo)}getCropperImage(){return this.container.querySelector(bo)}getCropperSelection(){return this.container.querySelector(yr)}getCropperSelections(){return this.container.querySelectorAll(yr)}destroy(){var o;let e=this.getCropperCanvas();e&&((o=e.parentElement)===null||o===void 0||o.removeChild(e)),this.element&&(this.element.style.display="")}};Ia.version="2.1.1";function qb(i){if(typeof i=="number")return Number.isFinite(i)&&i>0?i:null;let o=String(i??"").trim();if(!o||o==="free")return null;if(o.includes("/")){let[t,r]=o.split("/").map(n=>Number(n.trim()));return Number.isFinite(t)&&Number.isFinite(r)&&t>0&&r>0?t/r:null}let e=Number(o);return Number.isFinite(e)&&e>0?e:null}function Kb(i,o,e){return new Promise(t=>i.toBlob(t,o,e))}var ot=class extends Lb{constructor(){super(...arguments);this.src="";this.alt="";this.aspectRatio="1";this.mimeType="image/png";this.quality=.92;this.height=420;this.crossOrigin="anonymous";this.disabled=!1;this.showResult=!0;this._loaded=!1;this._errored=!1;this._result="";this._onSelectionChange=e=>{let t=e.detail;this._selection={x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height),aspectRatio:this._ratio},this.dispatchEvent(new CustomEvent("change",{detail:this._selection,bubbles:!0,composed:!0}))};this._onLoad=()=>{this._loaded=!0,this._errored=!1,this._setupCropper(),this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0}))};this._onError=()=>{this._loaded=!1,this._errored=!0,this._destroyCropper(),this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0}))}}disconnectedCallback(){this._destroyCropper(),super.disconnectedCallback()}updated(e){e.has("src")&&(this._loaded=!1,this._errored=!1,this._result="",this._selection=void 0,this._destroyCropper()),e.has("height")&&this.style.setProperty("--lui-image-cropper-height",`${this.height}px`),(e.has("aspectRatio")||e.has("src"))&&this._loaded&&this._setupCropper()}reset(){this._selectionEl?.$reset(),this._cropper?.getCropperImage()?.$resetTransform(),this._emitSelectionChange()}clear(){this._selectionEl?.$clear(),this._result="",this._selection=void 0}zoomIn(){this._cropper?.getCropperImage()?.$zoom(.1)}zoomOut(){this._cropper?.getCropperImage()?.$zoom(-.1)}rotateLeft(){this._cropper?.getCropperImage()?.$rotate("-90deg")}rotateRight(){this._cropper?.getCropperImage()?.$rotate("90deg")}async crop(){let e=this._cropper?.getCropperSelection();if(!e||e.hidden||!e.width||!e.height)return null;let t=await e.$toCanvas({width:this.outputWidth,height:this.outputHeight}),r=this.mimeType||"image/png",n=Math.max(0,Math.min(1,this.quality)),s=t.toDataURL(r,n),d=await Kb(t,r,n),h={...this._readSelection(e),dataUrl:s,blob:d,canvas:t};return this._result=s,this._selection=h,this.dispatchEvent(new CustomEvent("crop",{detail:h,bubbles:!0,composed:!0})),h}get _ratio(){return qb(this.aspectRatio)}_template(){let e=this._ratio;return`
|
|
8144
|
+
`],a([tr()],Te.prototype,"src",2),a([tr({attribute:"preview-src"})],Te.prototype,"previewSrc",2),a([tr()],Te.prototype,"alt",2),a([tr({attribute:"fallback-src"})],Te.prototype,"fallbackSrc",2),a([tr()],Te.prototype,"fallback",2),a([tr({reflect:!0})],Te.prototype,"fit",2),a([tr({reflect:!0})],Te.prototype,"radius",2),a([tr()],Te.prototype,"width",2),a([tr()],Te.prototype,"height",2),a([tr({attribute:"aspect-ratio"})],Te.prototype,"aspectRatio",2),a([tr()],Te.prototype,"position",2),a([tr({reflect:!0})],Te.prototype,"loading",2),a([tr({type:Boolean,reflect:!0})],Te.prototype,"skeleton",2),a([tr({type:Boolean,reflect:!0})],Te.prototype,"preview",2),a([tr({type:Boolean,attribute:"show-preview-icon"})],Te.prototype,"showPreviewIcon",2),a([tr({type:Boolean})],Te.prototype,"draggablePreview",2),a([Tn()],Te.prototype,"_loaded",2),a([Tn()],Te.prototype,"_errored",2),a([Tn()],Te.prototype,"_previewOpen",2),a([Tn()],Te.prototype,"_zoom",2),a([Tn()],Te.prototype,"_rotate",2),a([Tn()],Te.prototype,"_panning",2),a([ad(".preview-image")],Te.prototype,"_previewImageEl",2),a([ad(".preview-panzoom")],Te.prototype,"_previewPanzoomEl",2),a([ad(".preview-stage")],Te.prototype,"_previewStageEl",2),Te=a([gb("lui-image")],Te);import{css as Nb,html as Nn,LitElement as Lb,nothing as Va}from"lit";import{customElement as Bb,property as _o,query as P1,state as cl}from"lit/decorators.js";var Oa=typeof window<"u"&&typeof window.document<"u",Hr=Oa?window:{},sd=Oa?"ontouchstart"in Hr.document.documentElement:!1,ld=Oa?"PointerEvent"in Hr:!1,Ci="cropper",eo=`${Ci}-canvas`,l1=`${Ci}-crosshair`,c1=`${Ci}-grid`,d1=`${Ci}-handle`,bo=`${Ci}-image`,xr=`${Ci}-selection`,u1=`${Ci}-shade`,h1=`${Ci}-viewer`,An="select",il="move",Qo="scale",Ha="rotate",jn="transform",ko="none",cd="n-resize",dd="e-resize",ud="s-resize",hd="w-resize",Pn="ne-resize",On="nw-resize",Hn="se-resize",Rn="sw-resize",p1="action",fb=sd?"touchend touchcancel":"mouseup",vb=sd?"touchmove":"mousemove",bb=sd?"touchstart":"mousedown",pd=ld?"pointerdown":bb,md=ld?"pointermove":vb,gd=ld?"pointerup pointercancel":fb,fd="error",vd="keydown",zi="load",bd="resize",kd="wheel",Jo="action",yo="actionend",m1="actionmove",xo="actionstart",wo="change",Ra="transform";function In(i){return typeof i=="string"}var yd=Number.isNaN||Hr.isNaN;function me(i){return typeof i=="number"&&!yd(i)}function rr(i){return me(i)&&i>0&&i<1/0}function g1(i){return typeof i>"u"}function xd(i){return typeof i=="object"&&i!==null}var{hasOwnProperty:kb}=Object.prototype;function Vn(i){if(!xd(i))return!1;try{let{constructor:o}=i,{prototype:e}=o;return o&&e&&kb.call(e,"isPrototypeOf")}catch{return!1}}function Dn(i){return typeof i=="function"}function ei(i){return typeof i=="object"&&i!==null&&i.nodeType===1}var yb=/([a-z\d])([A-Z])/g;function wd(i){return String(i).replace(yb,"$1-$2").toLowerCase()}var xb=/-[A-z\d]/g;function _d(i){return i.replace(xb,o=>o.slice(1).toUpperCase())}var f1=/\s\s*/;function Le(i,o,e,t){o.trim().split(f1).forEach(r=>{i.removeEventListener(r,e,t)})}function Ke(i,o,e,t){o.trim().split(f1).forEach(r=>{i.addEventListener(r,e,t)})}function Md(i,o,e,t){Ke(i,o,e,Object.assign(Object.assign({},t),{once:!0}))}var wb={bubbles:!0,cancelable:!0,composed:!0};function v1(i,o,e,t){return i.dispatchEvent(new CustomEvent(o,Object.assign(Object.assign(Object.assign({},wb),{detail:e}),t)))}function b1(i){return typeof i.composedPath=="function"&&i.composedPath().find(ei)||i.target}var a1=Promise.resolve();function k1(i,o){return o?a1.then(i?o.bind(i):o):a1}function nl(i){let o=i.getRootNode();switch(o.nodeType){case 1:return o.ownerDocument;case 9:return o;case 11:return o}return null}function Cd(i){let{documentElement:o}=i.ownerDocument,e=i.getBoundingClientRect();return{left:e.left+(Hr.pageXOffset-o.clientLeft),top:e.top+(Hr.pageYOffset-o.clientTop)}}var _b=/deg|g?rad|turn$/i;function al(i){let o=parseFloat(i)||0;if(o!==0){let[e="rad"]=String(i).match(_b)||[];switch(e.toLowerCase()){case"deg":return o/360*(Math.PI*2);case"grad":return o/400*(Math.PI*2);case"turn":return o*(Math.PI*2)}}return o}var s1="contain",Mb="cover";function Fn(i,o=s1){let{aspectRatio:e}=i,{width:t,height:r}=i,n=rr(t),s=rr(r);if(n&&s){let d=r*e;o===s1&&d>t||o===Mb&&d<t?r=t/e:t=r*e}else n?r=t/e:s&&(t=r*e);return{width:t,height:r}}function zd(i,...o){if(o.length===0)return i;let[e,t,r,n,s,d]=i,[h,p,f,x,y,C]=o[0];return i=[e*h+r*p,t*h+n*p,e*f+r*x,t*f+n*x,e*y+r*C+s,t*y+n*C+d],zd(i,...o.slice(1))}var Cb=":host([hidden]){display:none!important}",zb=/left|top|width|height/i,y1="open",sl=new WeakMap,ll=new WeakMap,x1=new Map,w1=Hr.document&&Array.isArray(Hr.document.adoptedStyleSheets)&&"replaceSync"in Hr.CSSStyleSheet.prototype,_t=class extends HTMLElement{get $sharedStyle(){return`${this.themeColor?`:host{--theme-color: ${this.themeColor};}`:""}${Cb}`}constructor(){var o,e;super(),this.shadowRootMode=y1,this.slottable=!0;let t=(e=(o=Object.getPrototypeOf(this))===null||o===void 0?void 0:o.constructor)===null||e===void 0?void 0:e.$name;t&&x1.set(t,this.tagName.toLowerCase())}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(o,e,t){if(Object.is(t,e))return;let r=_d(o),n=this[r],s=t;switch(typeof n){case"boolean":s=t!==null&&t!=="false";break;case"number":s=Number(t);break}switch(this[r]=s,o){case"theme-color":{let d=ll.get(this),h=this.$sharedStyle;d&&h&&(w1?d.replaceSync(h):d.textContent=h);break}}}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(o=wd(o),typeof t){case"boolean":t===!0?this.hasAttribute(o)||this.setAttribute(o,""):this.removeAttribute(o);break;case"number":yd(t)?t="":t=String(t);default:t?this.getAttribute(o)!==t&&this.setAttribute(o,t):this.removeAttribute(o)}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach(e=>{let t=_d(e),r=this[t];g1(r)||this.$propertyChangedCallback(t,void 0,r),Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get(){return r},set(n){let s=r;r=n,this.$propertyChangedCallback(t,s,n)}})});let o=this.shadowRoot||this.attachShadow({mode:this.shadowRootMode||y1});if(sl.set(this,o),ll.set(this,this.$addStyles(this.$sharedStyle)),this.$style&&this.$addStyles(this.$style),this.$template){let e=document.createElement("template");e.innerHTML=this.$template,o.appendChild(e.content)}if(this.slottable){let e=document.createElement("slot");o.appendChild(e)}}disconnectedCallback(){ll.has(this)&&ll.delete(this),sl.has(this)&&sl.delete(this)}$getTagNameOf(o){var e;return(e=x1.get(o))!==null&&e!==void 0?e:o}$setStyles(o){return Object.keys(o).forEach(e=>{let t=o[e];me(t)&&(t!==0&&zb.test(e)?t=`${t}px`:t=String(t)),this.style[e]=t}),this}$getShadowRoot(){return this.shadowRoot||sl.get(this)}$addStyles(o){let e,t=this.$getShadowRoot();return w1?(e=new CSSStyleSheet,e.replaceSync(o),t.adoptedStyleSheets=t.adoptedStyleSheets.concat(e)):(e=document.createElement("style"),e.textContent=o,t.appendChild(e)),e}$emit(o,e,t){return v1(this,o,e,t)}$nextTick(o){return k1(this,o)}static $define(o,e){xd(o)&&(e=o,o=""),o||(o=this.$name||this.name),o=wd(o),Oa&&Hr.customElements&&!Hr.customElements.get(o)&&customElements.define(o,this,e)}};_t.$version="2.1.1";var Eb=':host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}',qi=class extends _t{constructor(){super(...arguments),this.$onPointerDown=null,this.$onPointerMove=null,this.$onPointerUp=null,this.$onWheel=null,this.$wheeling=!1,this.$pointers=new Map,this.$style=Eb,this.$action=ko,this.background=!1,this.disabled=!1,this.scaleStep=.1,this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback(),this.disabled||this.$bind()}disconnectedCallback(){this.disabled||this.$unbind(),super.disconnectedCallback()}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"disabled":t?this.$unbind():this.$bind();break}}$bind(){this.$onPointerDown||(this.$onPointerDown=this.$handlePointerDown.bind(this),Ke(this,pd,this.$onPointerDown)),this.$onPointerMove||(this.$onPointerMove=this.$handlePointerMove.bind(this),Ke(this.ownerDocument,md,this.$onPointerMove)),this.$onPointerUp||(this.$onPointerUp=this.$handlePointerUp.bind(this),Ke(this.ownerDocument,gd,this.$onPointerUp)),this.$onWheel||(this.$onWheel=this.$handleWheel.bind(this),Ke(this,kd,this.$onWheel,{passive:!1,capture:!0}))}$unbind(){this.$onPointerDown&&(Le(this,pd,this.$onPointerDown),this.$onPointerDown=null),this.$onPointerMove&&(Le(this.ownerDocument,md,this.$onPointerMove),this.$onPointerMove=null),this.$onPointerUp&&(Le(this.ownerDocument,gd,this.$onPointerUp),this.$onPointerUp=null),this.$onWheel&&(Le(this,kd,this.$onWheel,{capture:!0}),this.$onWheel=null)}$handlePointerDown(o){let{buttons:e,button:t,type:r}=o;if(this.disabled||(r==="pointerdown"&&o.pointerType==="mouse"||r==="mousedown")&&(me(e)&&e!==1||me(t)&&t!==0||o.ctrlKey))return;let{$pointers:n}=this,s="";if(o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:d,pageX:h,pageY:p})=>{n.set(d,{startX:h,startY:p,endX:h,endY:p})});else{let{pointerId:d=0,pageX:h,pageY:p}=o;n.set(d,{startX:h,startY:p,endX:h,endY:p})}n.size>1?s=jn:ei(o.target)&&(s=o.target.action||o.target.getAttribute(p1)||""),this.$emit(xo,{action:s,relatedEvent:o})!==!1&&(o.preventDefault(),this.$action=s,this.style.willChange="transform")}$handlePointerMove(o){let{$action:e,$pointers:t}=this;if(this.disabled||e===ko||t.size===0||this.$emit(m1,{action:e,relatedEvent:o})===!1)return;if(o.preventDefault(),o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:n,pageX:s,pageY:d})=>{let h=t.get(n);h&&Object.assign(h,{endX:s,endY:d})});else{let{pointerId:n=0,pageX:s,pageY:d}=o,h=t.get(n);h&&Object.assign(h,{endX:s,endY:d})}let r={action:e,relatedEvent:o};if(e===jn){let n=new Map(t),s=0,d=0,h=0,p=0,f=o.pageX,x=o.pageY;t.forEach((S,E)=>{n.delete(E),n.forEach(T=>{let O=T.startX-S.startX,H=T.startY-S.startY,R=T.endX-S.endX,N=T.endY-S.endY,$=0,Y=0,fe=0,$e=0;if(O===0?H<0?fe=Math.PI*2:H>0&&(fe=Math.PI):O>0?fe=Math.PI/2+Math.atan(H/O):O<0&&(fe=Math.PI*1.5+Math.atan(H/O)),R===0?N<0?$e=Math.PI*2:N>0&&($e=Math.PI):R>0?$e=Math.PI/2+Math.atan(N/R):R<0&&($e=Math.PI*1.5+Math.atan(N/R)),$e>0||fe>0){let Je=$e-fe,we=Math.abs(Je);we>s&&(s=we,h=Je,f=(S.startX+T.startX)/2,x=(S.startY+T.startY)/2)}if(O=Math.abs(O),H=Math.abs(H),R=Math.abs(R),N=Math.abs(N),O>0&&H>0?$=Math.sqrt(O*O+H*H):O>0?$=O:H>0&&($=H),R>0&&N>0?Y=Math.sqrt(R*R+N*N):R>0?Y=R:N>0&&(Y=N),$>0&&Y>0){let Je=(Y-$)/$,we=Math.abs(Je);we>d&&(d=we,p=Je,f=(S.startX+T.startX)/2,x=(S.startY+T.startY)/2)}})});let y=s>0,C=d>0;y&&C?(r.rotate=h,r.scale=p,r.centerX=f,r.centerY=x):y?(r.action=Ha,r.rotate=h,r.centerX=f,r.centerY=x):C?(r.action=Qo,r.scale=p,r.centerX=f,r.centerY=x):r.action=ko}else{let[n]=Array.from(t.values());Object.assign(r,n)}t.forEach(n=>{n.startX=n.endX,n.startY=n.endY}),r.action!==ko&&this.$emit(Jo,r,{cancelable:!1})}$handlePointerUp(o){let{$action:e,$pointers:t}=this;if(!(this.disabled||e===ko)&&this.$emit(yo,{action:e,relatedEvent:o})!==!1){if(o.preventDefault(),o.changedTouches)Array.from(o.changedTouches).forEach(({identifier:r})=>{t.delete(r)});else{let{pointerId:r=0}=o;t.delete(r)}t.size===0&&(this.style.willChange="",this.$action=ko)}}$handleWheel(o){if(this.disabled||(o.preventDefault(),this.$wheeling))return;this.$wheeling=!0,setTimeout(()=>{this.$wheeling=!1},50);let t=(o.deltaY>0?-1:1)*this.scaleStep;this.$emit(Jo,{action:Qo,scale:t,relatedEvent:o},{cancelable:!1})}$setAction(o){return In(o)&&(this.$action=o),this}$toCanvas(o){return new Promise((e,t)=>{if(!this.isConnected){t(new Error("The current element is not connected to the DOM."));return}let r=document.createElement("canvas"),n=this.offsetWidth,s=this.offsetHeight,d=1;Vn(o)&&(rr(o.width)||rr(o.height))&&({width:n,height:s}=Fn({aspectRatio:n/s,width:o.width,height:o.height}),d=n/this.offsetWidth),r.width=n,r.height=s;let h=this.querySelector(this.$getTagNameOf(bo));if(!h){e(r);return}h.$ready().then(p=>{let f=r.getContext("2d");if(f){let[x,y,C,S,E,T]=h.$getTransform(),O=E,H=T,R=p.naturalWidth,N=p.naturalHeight;d!==1&&(O*=d,H*=d,R*=d,N*=d);let $=R/2,Y=N/2;f.fillStyle="transparent",f.fillRect(0,0,n,s),Vn(o)&&Dn(o.beforeDraw)&&o.beforeDraw.call(this,f,r),f.save(),f.translate($,Y),f.transform(x,y,C,S,O,H),f.translate(-$,-Y),f.drawImage(p,0,0,R,N),f.restore()}e(r)}).catch(t)})}};qi.$name=eo;qi.$version="2.1.1";var Sb=":host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}",_1=new WeakMap,M1=["alt","crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","src","srcset"],Ki=class extends _t{constructor(){super(...arguments),this.$isReady=!1,this.$matrix=[1,0,0,1,0,0],this.$onLoad=null,this.$onCanvasAction=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$actionStartTarget=null,this.$style=Sb,this.$image=new Image,this.initialCenterSize="contain",this.rotatable=!1,this.scalable=!1,this.skewable=!1,this.slottable=!1,this.translatable=!1,this.alt="",this.crossorigin="",this.decoding="",this.elementtiming="",this.fetchpriority="",this.loading="",this.referrerpolicy="",this.sizes="",this.src="",this.srcset=""}set $canvas(o){_1.set(this,o)}get $canvas(){return _1.get(this)}static get observedAttributes(){return super.observedAttributes.concat(M1,["initial-center-size","rotatable","scalable","skewable","translatable"])}attributeChangedCallback(o,e,t){Object.is(t,e)||(super.attributeChangedCallback(o,e,t),M1.includes(o)&&this.$image.setAttribute(o,t))}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"initialCenterSize":this.$nextTick(()=>{this.$center(t)});break;case"src":this.$isReady=!1;break}}connectedCallback(){super.connectedCallback();let{$image:o}=this,e=this.closest(this.$getTagNameOf(eo));e&&(this.$canvas=e,this.$setStyles({display:"block",position:"absolute"}),this.$onCanvasActionStart=t=>{var r,n;this.$actionStartTarget=(n=(r=t.detail)===null||r===void 0?void 0:r.relatedEvent)===null||n===void 0?void 0:n.target},this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null},this.$onCanvasAction=this.$handleAction.bind(this),Ke(e,xo,this.$onCanvasActionStart),Ke(e,yo,this.$onCanvasActionEnd),Ke(e,Jo,this.$onCanvasAction)),this.$onLoad=this.$handleLoad.bind(this),Ke(o,zi,this.$onLoad),this.$getShadowRoot().appendChild(o)}disconnectedCallback(){let{$image:o,$canvas:e}=this;e&&(this.$onCanvasActionStart&&(Le(e,xo,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(Le(e,yo,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(Le(e,Jo,this.$onCanvasAction),this.$onCanvasAction=null)),o&&this.$onLoad&&(Le(o,zi,this.$onLoad),this.$onLoad=null),this.$getShadowRoot().removeChild(o),super.disconnectedCallback()}$handleLoad(){let{$image:o}=this;this.$setStyles({width:o.naturalWidth,height:o.naturalHeight}),this.$canvas&&this.$center(this.initialCenterSize),this.$isReady=!0}$handleAction(o){if(this.hidden||!(this.rotatable||this.scalable||this.translatable))return;let{$canvas:e}=this,{detail:t}=o;if(t){let{relatedEvent:r}=t,{action:n}=t;switch(n===jn&&(!this.rotatable||!this.scalable)&&(this.rotatable?n=Ha:this.scalable?n=Qo:n=ko),n){case il:if(this.translatable){let s=null;r&&(s=r.target.closest(this.$getTagNameOf(xr))),s||(s=e.querySelector(this.$getTagNameOf(xr))),s&&s.multiple&&!s.active&&(s=e.querySelector(`${this.$getTagNameOf(xr)}[active]`)),(!s||s.hidden||!s.movable||s.dynamic||!(this.$actionStartTarget&&s.contains(this.$actionStartTarget)))&&this.$move(t.endX-t.startX,t.endY-t.startY)}break;case Ha:if(this.rotatable)if(r){let{x:s,y:d}=this.getBoundingClientRect();this.$rotate(t.rotate,r.clientX-s,r.clientY-d)}else this.$rotate(t.rotate);break;case Qo:if(this.scalable)if(r){let s=r.target.closest(this.$getTagNameOf(xr));if(!s||!s.zoomable||s.zoomable&&s.dynamic){let{x:d,y:h}=this.getBoundingClientRect();this.$zoom(t.scale,r.clientX-d,r.clientY-h)}}else this.$zoom(t.scale);break;case jn:if(this.rotatable&&this.scalable){let{rotate:s}=t,{scale:d}=t;d<0?d=1/(1-d):d+=1;let h=Math.cos(s),p=Math.sin(s),[f,x,y,C]=[h*d,p*d,-p*d,h*d];if(r){let S=this.getBoundingClientRect(),E=r.clientX-S.x,T=r.clientY-S.y,[O,H,R,N]=this.$matrix,$=S.width/2,Y=S.height/2,fe=E-$,$e=T-Y,Je=(fe*N-R*$e)/(O*N-R*H),we=($e*O-H*fe)/(O*N-R*H);this.$transform(f,x,y,C,Je*(1-f)+we*y,we*(1-C)+Je*x)}else this.$transform(f,x,y,C,0,0)}break}}}$ready(o){let{$image:e}=this,t=new Promise((r,n)=>{let s=new Error("Failed to load the image source");if(e.complete)e.naturalWidth>0&&e.naturalHeight>0?r(e):n(s);else{let d=()=>{Le(e,fd,h),setTimeout(()=>{r(e)})},h=()=>{Le(e,zi,d),n(s)};Md(e,zi,d),Md(e,fd,h)}});return Dn(o)&&t.then(r=>(o(r),r)),t}$center(o){let{parentElement:e}=this;if(!e)return this;let t=e.getBoundingClientRect(),r=t.width,n=t.height,{x:s,y:d,width:h,height:p}=this.getBoundingClientRect(),f=s+h/2,x=d+p/2,y=t.x+r/2,C=t.y+n/2,{translatable:S}=this;if(!S&&!this.$isReady&&(this.translatable=!0,this.$nextTick(()=>{this.translatable=S})),this.$move(y-f,C-x),o&&(h!==r||p!==n)){let E=r/h,T=n/p,{scalable:O}=this;switch(o&&!O&&!this.$isReady&&(this.scalable=!0,this.$nextTick(()=>{this.scalable=O})),o){case"cover":this.$scale(Math.max(E,T));break;case"contain":this.$scale(Math.min(E,T));break}}return this}$move(o,e=o){if(this.translatable&&me(o)&&me(e)){let[t,r,n,s]=this.$matrix,d=(o*s-n*e)/(t*s-n*r),h=(e*t-r*o)/(t*s-n*r);this.$translate(d,h)}return this}$moveTo(o,e=o){if(this.translatable&&me(o)&&me(e)){let[t,r,n,s]=this.$matrix,d=(o*s-n*e)/(t*s-n*r),h=(e*t-r*o)/(t*s-n*r);this.$setTransform(t,r,n,s,d,h)}return this}$rotate(o,e,t){if(this.rotatable){let r=al(o),n=Math.cos(r),s=Math.sin(r),[d,h,p,f]=[n,s,-s,n];if(me(e)&&me(t)){let[x,y,C,S]=this.$matrix,{width:E,height:T}=this.getBoundingClientRect(),O=E/2,H=T/2,R=e-O,N=t-H,$=(R*S-C*N)/(x*S-C*y),Y=(N*x-y*R)/(x*S-C*y);this.$transform(d,h,p,f,$*(1-d)-Y*p,Y*(1-f)-$*h)}else this.$transform(d,h,p,f,0,0)}return this}$zoom(o,e,t){if(!this.scalable||o===0)return this;if(o<0?o=1/(1-o):o+=1,me(e)&&me(t)){let[r,n,s,d]=this.$matrix,{width:h,height:p}=this.getBoundingClientRect(),f=h/2,x=p/2,y=e-f,C=t-x,S=(y*d-s*C)/(r*d-s*n),E=(C*r-n*y)/(r*d-s*n);this.$transform(o,0,0,o,S*(1-o),E*(1-o))}else this.$scale(o);return this}$scale(o,e=o){return this.scalable&&this.$transform(o,0,0,e,0,0),this}$skew(o,e=0){if(this.skewable){let t=al(o),r=al(e);this.$transform(1,Math.tan(r),Math.tan(t),1,0,0)}return this}$translate(o,e=o){return this.translatable&&me(o)&&me(e)&&this.$transform(1,0,0,1,o,e),this}$transform(o,e,t,r,n,s){return me(o)&&me(e)&&me(t)&&me(r)&&me(n)&&me(s)?this.$setTransform(zd(this.$matrix,[o,e,t,r,n,s])):this}$setTransform(o,e,t,r,n,s){if((this.rotatable||this.scalable||this.skewable||this.translatable)&&(Array.isArray(o)&&([o,e,t,r,n,s]=o),me(o)&&me(e)&&me(t)&&me(r)&&me(n)&&me(s))){let d=[...this.$matrix],h=[o,e,t,r,n,s];if(this.$emit(Ra,{matrix:h,oldMatrix:d})===!1)return this;this.$matrix=h,this.style.transform=`matrix(${h.join(", ")})`}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}};Ki.$name=bo;Ki.$version="2.1.1";var $b=":host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}",C1=new WeakMap,Wi=class extends _t{constructor(){super(...arguments),this.$onWindowResize=null,this.$onCanvasActionEnd=null,this.$onCanvasActionStart=null,this.$onSelectionChange=null,this.$style=$b,this.x=0,this.y=0,this.width=0,this.height=0,this.slottable=!1,this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(o){C1.set(this,o)}get $canvas(){return C1.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();let o=this.closest(this.$getTagNameOf(eo));if(o){this.$canvas=o,this.style.position="absolute";let e=o.querySelector(this.$getTagNameOf(xr));e&&(this.$onWindowResize=this.$render.bind(this),this.$onCanvasActionStart=t=>{e.hidden&&t.detail.action===An&&(this.hidden=!1)},this.$onCanvasActionEnd=t=>{e.hidden&&t.detail.action===An&&(this.hidden=!0)},this.$onSelectionChange=t=>{let{x:r,y:n,width:s,height:d}=t.defaultPrevented?e:t.detail;this.$change(r,n,s,d),(e.hidden||r===0&&n===0&&s===0&&d===0)&&(this.hidden=!0)},Ke(window,bd,this.$onWindowResize),Ke(o,xo,this.$onCanvasActionStart),Ke(o,yo,this.$onCanvasActionEnd),Ke(o,wo,this.$onSelectionChange))}this.$render()}disconnectedCallback(){let{$canvas:o}=this;o&&(this.$onWindowResize&&(Le(window,bd,this.$onWindowResize),this.$onWindowResize=null),this.$onCanvasActionStart&&(Le(o,xo,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(Le(o,yo,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onSelectionChange&&(Le(o,wo,this.$onSelectionChange),this.$onSelectionChange=null)),super.disconnectedCallback()}$change(o,e,t=this.width,r=this.height){return!me(o)||!me(e)||!me(t)||!me(r)||o===this.x&&e===this.y&&t===this.width&&r===this.height?this:(this.hidden&&(this.hidden=!1),this.x=o,this.y=e,this.width=t,this.height=r,this.$render())}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:Hr.innerWidth*Hr.devicePixelRatio})}};Wi.$name=u1;Wi.$version="2.1.1";var Tb=':host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}',Ui=class extends _t{constructor(){super(...arguments),this.$onCanvasCropEnd=null,this.$onCanvasCropStart=null,this.$style=Tb,this.action=ko,this.plain=!1,this.slottable=!1,this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}};Ui.$name=d1;Ui.$version="2.1.1";var Ab=':host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}',z1=new WeakMap,Gi=class extends _t{constructor(){super(...arguments),this.$onCanvasAction=null,this.$onCanvasActionStart=null,this.$onCanvasActionEnd=null,this.$onDocumentKeyDown=null,this.$action="",this.$actionStartTarget=null,this.$changing=!1,this.$style=Ab,this.$initialSelection={x:0,y:0,width:0,height:0},this.x=0,this.y=0,this.width=0,this.height=0,this.aspectRatio=NaN,this.initialAspectRatio=NaN,this.initialCoverage=NaN,this.active=!1,this.linked=!1,this.dynamic=!1,this.movable=!1,this.resizable=!1,this.zoomable=!1,this.multiple=!1,this.keyboard=!1,this.outlined=!1,this.precise=!1}set $canvas(o){z1.set(this,o)}get $canvas(){return z1.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","dynamic","height","initial-aspect-ratio","initial-coverage","keyboard","linked","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(o,e,t){if(!Object.is(t,e))switch(super.$propertyChangedCallback(o,e,t),o){case"x":case"y":case"width":case"height":this.$changing||this.$nextTick(()=>{this.$change(this.x,this.y,this.width,this.height,this.aspectRatio,!0)});break;case"aspectRatio":case"initialAspectRatio":this.$nextTick(()=>{this.$initSelection()});break;case"initialCoverage":this.$nextTick(()=>{rr(t)&&t<=1&&this.$initSelection(!0,!0)});break;case"keyboard":this.$nextTick(()=>{this.$canvas&&(t?this.$onDocumentKeyDown||(this.$onDocumentKeyDown=this.$handleKeyDown.bind(this),Ke(this.ownerDocument,vd,this.$onDocumentKeyDown)):this.$onDocumentKeyDown&&(Le(this.ownerDocument,vd,this.$onDocumentKeyDown),this.$onDocumentKeyDown=null))});break;case"multiple":this.$nextTick(()=>{if(this.$canvas){let r=this.$getSelections();t?(r.forEach(n=>{n.active=!1}),this.active=!0,this.$emit(wo,{x:this.x,y:this.y,width:this.width,height:this.height})):(this.active=!1,r.slice(1).forEach(n=>{this.$removeSelection(n)}))}});break;case"precise":this.$nextTick(()=>{this.$change(this.x,this.y)});break;case"linked":t&&(this.dynamic=!0);break}}connectedCallback(){super.connectedCallback();let o=this.closest(this.$getTagNameOf(eo));o?(this.$canvas=o,this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`}),this.hidden||this.$render(),this.$initSelection(!0),this.$onCanvasActionStart=this.$handleActionStart.bind(this),this.$onCanvasActionEnd=this.$handleActionEnd.bind(this),this.$onCanvasAction=this.$handleAction.bind(this),Ke(o,xo,this.$onCanvasActionStart),Ke(o,yo,this.$onCanvasActionEnd),Ke(o,Jo,this.$onCanvasAction)):this.$render()}disconnectedCallback(){let{$canvas:o}=this;o&&(this.$onCanvasActionStart&&(Le(o,xo,this.$onCanvasActionStart),this.$onCanvasActionStart=null),this.$onCanvasActionEnd&&(Le(o,yo,this.$onCanvasActionEnd),this.$onCanvasActionEnd=null),this.$onCanvasAction&&(Le(o,Jo,this.$onCanvasAction),this.$onCanvasAction=null)),super.disconnectedCallback()}$getSelections(){let o=[];return this.parentElement&&(o=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(xr)))),o}$initSelection(o=!1,e=!1){let{initialCoverage:t,parentElement:r}=this;if(rr(t)&&r){let n=this.aspectRatio||this.initialAspectRatio,s=(e?0:this.width)||r.offsetWidth*t,d=(e?0:this.height)||r.offsetHeight*t;rr(n)&&({width:s,height:d}=Fn({aspectRatio:n,width:s,height:d})),this.$change(this.x,this.y,s,d),o&&this.$center(),this.$initialSelection={x:this.x,y:this.y,width:this.width,height:this.height}}}$createSelection(){let o=this.cloneNode(!0);return this.hasAttribute("id")&&o.removeAttribute("id"),o.initialCoverage=NaN,this.active=!1,this.parentElement&&this.parentElement.insertBefore(o,this.nextSibling),o}$removeSelection(o=this){if(this.parentElement){let e=this.$getSelections();if(e.length>1){let t=e.indexOf(o),r=e[t+1]||e[t-1];r&&(o.active=!1,this.parentElement.removeChild(o),r.active=!0,r.$emit(wo,{x:r.x,y:r.y,width:r.width,height:r.height}))}else this.$clear()}}$handleActionStart(o){var e,t;let r=(t=(e=o.detail)===null||e===void 0?void 0:e.relatedEvent)===null||t===void 0?void 0:t.target;this.$action="",this.$actionStartTarget=r,!this.hidden&&this.multiple&&!this.active&&r===this&&this.parentElement&&(this.$getSelections().forEach(n=>{n.active=!1}),this.active=!0,this.$emit(wo,{x:this.x,y:this.y,width:this.width,height:this.height}))}$handleAction(o){let{currentTarget:e,detail:t}=o;if(!e||!t)return;let{relatedEvent:r}=t,{action:n}=t,s=r?b1(r):null;if(!n&&this.multiple&&(n=this.$action||s?.action,this.$action=n),!n||this.hidden&&n!==An||this.multiple&&!this.active&&n!==Qo)return;let{width:d,height:h}=this,p=t.endX-t.startX,f=t.endY-t.startY,{aspectRatio:x}=this;switch(!rr(x)&&r.shiftKey&&(x=rr(d)&&rr(h)?d/h:1),n){case An:if(p!==0||f!==0){p===0?p=f:f===0&&(f=p);let{$canvas:y}=this,C=Cd(e);(this.multiple&&!this.hidden?this.$createSelection():this).$change(t.startX-C.left,t.startY-C.top,Math.abs(p),Math.abs(f),x),p<0?f<0?n=On:f>0&&(n=Rn):p>0&&(f<0?n=Pn:f>0&&(n=Hn)),y&&(y.$action=n)}break;case il:this.movable&&(this.dynamic||this.$actionStartTarget&&this.contains(this.$actionStartTarget))&&this.$move(p,f);break;case Qo:if(r&&this.zoomable&&(this.dynamic||this.contains(r.target))){let y=Cd(e);this.$zoom(t.scale,r.pageX-y.left,r.pageY-y.top)}break;default:this.$resize(n,p,f,x)}}$handleActionEnd(){this.$action="",this.$actionStartTarget=null}$handleKeyDown(o){if(this.hidden||!this.keyboard||this.multiple&&!this.active||o.defaultPrevented)return;let{activeElement:e}=document;if(!(e&&(["INPUT","TEXTAREA"].includes(e.tagName)||["true","plaintext-only"].includes(e.contentEditable))))switch(o.key){case"Backspace":o.metaKey&&(o.preventDefault(),this.$removeSelection());break;case"Delete":o.preventDefault(),this.$removeSelection();break;case"ArrowLeft":o.preventDefault(),this.$move(-1,0);break;case"ArrowRight":o.preventDefault(),this.$move(1,0);break;case"ArrowUp":o.preventDefault(),this.$move(0,-1);break;case"ArrowDown":o.preventDefault(),this.$move(0,1);break;case"+":o.preventDefault(),this.$zoom(.1);break;case"-":o.preventDefault(),this.$zoom(-.1);break}}$center(){let{parentElement:o}=this;if(!o)return this;let e=(o.offsetWidth-this.width)/2,t=(o.offsetHeight-this.height)/2;return this.$change(e,t)}$move(o,e=o){return this.$moveTo(this.x+o,this.y+e)}$moveTo(o,e=o){return this.movable?this.$change(o,e):this}$resize(o,e=0,t=0,r=this.aspectRatio){if(!this.resizable)return this;let n=rr(r),{$canvas:s}=this,{x:d,y:h,width:p,height:f}=this;switch(o){case cd:h+=t,f-=t,f<0&&(o=ud,f=-f,h-=f),n&&(e=t*r,d+=e/2,p-=e,p<0&&(p=-p,d-=p));break;case dd:p+=e,p<0&&(o=hd,p=-p,d-=p),n&&(t=e/r,h-=t/2,f+=t,f<0&&(f=-f,h-=f));break;case ud:f+=t,f<0&&(o=cd,f=-f,h-=f),n&&(e=t*r,d-=e/2,p+=e,p<0&&(p=-p,d-=p));break;case hd:d+=e,p-=e,p<0&&(o=dd,p=-p,d-=p),n&&(t=e/r,h+=t/2,f-=t,f<0&&(f=-f,h-=f));break;case Pn:n&&(t=-e/r),h+=t,f-=t,p+=e,p<0&&f<0?(o=Rn,p=-p,f=-f,d-=p,h-=f):p<0?(o=On,p=-p,d-=p):f<0&&(o=Hn,f=-f,h-=f);break;case On:n&&(t=e/r),d+=e,h+=t,p-=e,f-=t,p<0&&f<0?(o=Hn,p=-p,f=-f,d-=p,h-=f):p<0?(o=Pn,p=-p,d-=p):f<0&&(o=Rn,f=-f,h-=f);break;case Hn:n&&(t=e/r),p+=e,f+=t,p<0&&f<0?(o=On,p=-p,f=-f,d-=p,h-=f):p<0?(o=Rn,p=-p,d-=p):f<0&&(o=Pn,f=-f,h-=f);break;case Rn:n&&(t=-e/r),d+=e,p-=e,f+=t,p<0&&f<0?(o=Pn,p=-p,f=-f,d-=p,h-=f):p<0?(o=Hn,p=-p,d-=p):f<0&&(o=On,f=-f,h-=f);break}return s&&s.$setAction(o),this.$change(d,h,p,f)}$zoom(o,e,t){if(!this.zoomable||o===0)return this;o<0?o=1/(1-o):o+=1;let{width:r,height:n}=this,s=r*o,d=n*o,h=this.x,p=this.y;return me(e)&&me(t)?(h-=(s-r)*((e-this.x)/r),p-=(d-n)*((t-this.y)/n)):(h-=(s-r)/2,p-=(d-n)/2),this.$change(h,p,s,d)}$change(o,e,t=this.width,r=this.height,n=this.aspectRatio,s=!1){return this.$changing||!me(o)||!me(e)||!me(t)||!me(r)||t<0||r<0?this:(rr(n)&&({width:t,height:r}=Fn({aspectRatio:n,width:t,height:r},"cover")),this.precise||(o=Math.round(o),e=Math.round(e),t=Math.round(t),r=Math.round(r)),o===this.x&&e===this.y&&t===this.width&&r===this.height&&Object.is(n,this.aspectRatio)&&!s?this:(this.hidden&&(this.hidden=!1),this.$emit(wo,{x:o,y:e,width:t,height:r})===!1?this:(this.$changing=!0,this.x=o,this.y=e,this.width=t,this.height=r,this.$changing=!1,this.$render())))}$reset(){let{x:o,y:e,width:t,height:r}=this.$initialSelection;return this.$change(o,e,t,r)}$clear(){return this.$change(0,0,0,0,NaN,!0),this.hidden=!0,this}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(o){return new Promise((e,t)=>{if(!this.isConnected){t(new Error("The current element is not connected to the DOM."));return}let r=document.createElement("canvas"),{width:n,height:s}=this,d=1;if(Vn(o)&&(rr(o.width)||rr(o.height))&&({width:n,height:s}=Fn({aspectRatio:n/s,width:o.width,height:o.height}),d=n/this.width),r.width=n,r.height=s,!this.$canvas){e(r);return}let h=this.$canvas.querySelector(this.$getTagNameOf(bo));if(!h){e(r);return}h.$ready().then(p=>{let f=r.getContext("2d");if(f){let[x,y,C,S,E,T]=h.$getTransform(),O=-this.x,H=-this.y,R=(O*S-C*H)/(x*S-C*y),N=(H*x-y*O)/(x*S-C*y),$=x*R+C*N+E,Y=y*R+S*N+T,fe=p.naturalWidth,$e=p.naturalHeight;d!==1&&($*=d,Y*=d,fe*=d,$e*=d);let Je=fe/2,we=$e/2;f.fillStyle="transparent",f.fillRect(0,0,n,s),Vn(o)&&Dn(o.beforeDraw)&&o.beforeDraw.call(this,f,r),f.save(),f.translate(Je,we),f.transform(x,y,C,S,$,Y),f.translate(-Je,-we),f.drawImage(p,0,0,fe,$e),f.restore()}e(r)}).catch(t)})}};Gi.$name=xr;Gi.$version="2.1.1";var jb=":host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}",Yi=class extends _t{constructor(){super(...arguments),this.$style=jb,this.bordered=!1,this.columns=3,this.covered=!1,this.rows=3,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(o,e,t){Object.is(t,e)||(super.$propertyChangedCallback(o,e,t),(o==="rows"||o==="columns")&&this.$nextTick(()=>{this.$render()}))}connectedCallback(){super.connectedCallback(),this.$render()}$render(){let o=this.$getShadowRoot(),e=document.createDocumentFragment();for(let t=0;t<this.rows;t+=1){let r=document.createElement("span");r.setAttribute("role","row");for(let n=0;n<this.columns;n+=1){let s=document.createElement("span");s.setAttribute("role","gridcell"),r.appendChild(s)}e.appendChild(r)}o&&(o.innerHTML="",o.appendChild(e))}};Yi.$name=c1;Yi.$version="2.1.1";var Pb=':host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}',Xi=class extends _t{constructor(){super(...arguments),this.$style=Pb,this.centered=!1,this.slottable=!1,this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}};Xi.$name=l1;Xi.$version="2.1.1";var Ob=":host{display:block;height:100%;overflow:hidden;position:relative;width:100%}",E1=new WeakMap,S1=new WeakMap,$1=new WeakMap,T1=new WeakMap,Hb="both",Rb="horizontal",A1="vertical",Ib="none",Zi=class extends _t{constructor(){super(...arguments),this.$onSelectionChange=null,this.$onSourceImageLoad=null,this.$onSourceImageTransform=null,this.$scale=1,this.$style=Ob,this.resize=A1,this.selection="",this.slottable=!1}set $image(o){S1.set(this,o)}get $image(){return S1.get(this)}set $sourceImage(o){T1.set(this,o)}get $sourceImage(){return T1.get(this)}set $canvas(o){E1.set(this,o)}get $canvas(){return E1.get(this)}set $selection(o){$1.set(this,o)}get $selection(){return $1.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){var o,e;super.connectedCallback();let t=null;if(this.selection?t=(e=(o=nl(this))===null||o===void 0?void 0:o.querySelector(this.selection))!==null&&e!==void 0?e:null:t=this.closest(this.$getTagNameOf(xr)),ei(t)){this.$selection=t,this.$onSelectionChange=this.$handleSelectionChange.bind(this),Ke(t,wo,this.$onSelectionChange);let r=t.closest(this.$getTagNameOf(eo));if(r){this.$canvas=r;let n=r.querySelector(this.$getTagNameOf(bo));n&&(this.$sourceImage=n,this.$image=n.cloneNode(!0),this.$getShadowRoot().appendChild(this.$image),this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this),this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this),Ke(n.$image,zi,this.$onSourceImageLoad),Ke(n,Ra,this.$onSourceImageTransform))}this.$render()}}disconnectedCallback(){let{$selection:o,$sourceImage:e}=this;o&&this.$onSelectionChange&&(Le(o,wo,this.$onSelectionChange),this.$onSelectionChange=null),e&&this.$onSourceImageLoad&&(Le(e.$image,zi,this.$onSourceImageLoad),this.$onSourceImageLoad=null),e&&this.$onSourceImageTransform&&(Le(e,Ra,this.$onSourceImageTransform),this.$onSourceImageTransform=null),super.disconnectedCallback()}$handleSelectionChange(o){this.$render(o.defaultPrevented?this.$selection:o.detail)}$handleSourceImageLoad(){let{$image:o,$sourceImage:e}=this,t=o.getAttribute("src"),r=e.getAttribute("src");r&&r!==t&&(o.setAttribute("src",r),o.$ready(()=>{this.$render()}))}$handleSourceImageTransform(o){this.$render(void 0,o.detail.matrix)}$render(o,e){let{$canvas:t,$selection:r}=this;!o&&!r.hidden&&(o=r),(!o||o.x===0&&o.y===0&&o.width===0&&o.height===0)&&(o={x:0,y:0,width:t.offsetWidth,height:t.offsetHeight});let{x:n,y:s,width:d,height:h}=o,p={},{clientWidth:f,clientHeight:x}=this,y=f,C=x,S=NaN;switch(this.resize){case Hb:S=1,y=d,C=h,p.width=d,p.height=h;break;case Rb:S=h>0?x/h:0,y=d*S,p.width=y;break;case A1:S=d>0?f/d:0,C=h*S,p.height=C;break;case Ib:default:f>0?S=d>0?f/d:0:x>0&&(S=h>0?x/h:0)}this.$scale=S,this.$setStyles(p),this.$sourceImage&&setTimeout(()=>{this.$transformImageByOffset(e??this.$sourceImage.$getTransform(),-n,-s)})}$transformImageByOffset(o,e,t){let{$image:r,$scale:n,$sourceImage:s}=this;if(s&&r&&n>=0){let[d,h,p,f,x,y]=o,C=(e*f-p*t)/(d*f-p*h),S=(t*d-h*e)/(d*f-p*h),E=d*C+p*S+x,T=h*C+f*S+y;s.$ready(O=>{this.$setStyles.call(r,{width:O.naturalWidth*n,height:O.naturalHeight*n})}),r.$setTransform(d,h,p,f,E*n,T*n)}}};Zi.$name=h1;Zi.$version="2.1.1";var Vb='<cropper-canvas background><cropper-image rotatable scalable skewable translatable></cropper-image><cropper-shade hidden></cropper-shade><cropper-handle action="select" plain></cropper-handle><cropper-selection initial-coverage="0.5" movable resizable><cropper-grid role="grid" bordered covered></cropper-grid><cropper-crosshair centered></cropper-crosshair><cropper-handle action="move" theme-color="rgba(255, 255, 255, 0.35)"></cropper-handle><cropper-handle action="n-resize"></cropper-handle><cropper-handle action="e-resize"></cropper-handle><cropper-handle action="s-resize"></cropper-handle><cropper-handle action="w-resize"></cropper-handle><cropper-handle action="ne-resize"></cropper-handle><cropper-handle action="nw-resize"></cropper-handle><cropper-handle action="se-resize"></cropper-handle><cropper-handle action="sw-resize"></cropper-handle></cropper-selection></cropper-canvas>',Db=/^img|canvas$/,Fb=/<(\/?(?:script|style)[^>]*)>/gi,j1={template:Vb};qi.$define();Xi.$define();Yi.$define();Ui.$define();Ki.$define();Gi.$define();Wi.$define();Zi.$define();var Ia=class{constructor(o,e){var t;if(this.options=j1,In(o)&&(o=document.querySelector(o)),!ei(o)||!Db.test(o.localName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=o,e=Object.assign(Object.assign({},j1),e),this.options=e;let{container:r}=e;if(r&&(In(r)&&(r=(t=nl(o))===null||t===void 0?void 0:t.querySelector(r)),!ei(r)))throw new Error("The `container` option must be an element or a valid selector.");ei(r)||(o.parentElement?r=o.parentElement:r=o.ownerDocument.body),this.container=r;let n=o.localName,s="";n==="img"?{src:s}=o:n==="canvas"&&window.HTMLCanvasElement&&(s=o.toDataURL());let{template:d}=e;if(d&&In(d)){let h=document.createElement("template"),p=document.createDocumentFragment();h.innerHTML=d.replace(Fb,"<$1>"),p.appendChild(h.content),Array.from(p.querySelectorAll(bo)).forEach(f=>{f.setAttribute("src",s),f.setAttribute("alt",o.alt||"The image to crop"),n==="img"&&["crossorigin","decoding","elementtiming","fetchpriority","loading","referrerpolicy","sizes","srcset"].forEach(x=>{o.hasAttribute(x)&&f.setAttribute(x,o.getAttribute(x)||"")})}),o.parentElement?(o.style.display="none",r.insertBefore(p,o.nextSibling)):r.appendChild(p)}}getCropperCanvas(){return this.container.querySelector(eo)}getCropperImage(){return this.container.querySelector(bo)}getCropperSelection(){return this.container.querySelector(xr)}getCropperSelections(){return this.container.querySelectorAll(xr)}destroy(){var o;let e=this.getCropperCanvas();e&&((o=e.parentElement)===null||o===void 0||o.removeChild(e)),this.element&&(this.element.style.display="")}};Ia.version="2.1.1";function qb(i){if(typeof i=="number")return Number.isFinite(i)&&i>0?i:null;let o=String(i??"").trim();if(!o||o==="free")return null;if(o.includes("/")){let[t,r]=o.split("/").map(n=>Number(n.trim()));return Number.isFinite(t)&&Number.isFinite(r)&&t>0&&r>0?t/r:null}let e=Number(o);return Number.isFinite(e)&&e>0?e:null}function Kb(i,o,e){return new Promise(t=>i.toBlob(t,o,e))}var ot=class extends Lb{constructor(){super(...arguments);this.src="";this.alt="";this.aspectRatio="1";this.mimeType="image/png";this.quality=.92;this.height=420;this.crossOrigin="anonymous";this.disabled=!1;this.showResult=!0;this._loaded=!1;this._errored=!1;this._result="";this._onSelectionChange=e=>{let t=e.detail;this._selection={x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height),aspectRatio:this._ratio},this.dispatchEvent(new CustomEvent("change",{detail:this._selection,bubbles:!0,composed:!0}))};this._onLoad=()=>{this._loaded=!0,this._errored=!1,this._setupCropper(),this.dispatchEvent(new CustomEvent("load",{bubbles:!0,composed:!0}))};this._onError=()=>{this._loaded=!1,this._errored=!0,this._destroyCropper(),this.dispatchEvent(new CustomEvent("error",{bubbles:!0,composed:!0}))}}disconnectedCallback(){this._destroyCropper(),super.disconnectedCallback()}updated(e){e.has("src")&&(this._loaded=!1,this._errored=!1,this._result="",this._selection=void 0,this._destroyCropper()),e.has("height")&&this.style.setProperty("--lui-image-cropper-height",`${this.height}px`),(e.has("aspectRatio")||e.has("src"))&&this._loaded&&this._setupCropper()}reset(){this._selectionEl?.$reset(),this._cropper?.getCropperImage()?.$resetTransform(),this._emitSelectionChange()}clear(){this._selectionEl?.$clear(),this._result="",this._selection=void 0}zoomIn(){this._cropper?.getCropperImage()?.$zoom(.1)}zoomOut(){this._cropper?.getCropperImage()?.$zoom(-.1)}rotateLeft(){this._cropper?.getCropperImage()?.$rotate("-90deg")}rotateRight(){this._cropper?.getCropperImage()?.$rotate("90deg")}async crop(){let e=this._cropper?.getCropperSelection();if(!e||e.hidden||!e.width||!e.height)return null;let t=await e.$toCanvas({width:this.outputWidth,height:this.outputHeight}),r=this.mimeType||"image/png",n=Math.max(0,Math.min(1,this.quality)),s=t.toDataURL(r,n),d=await Kb(t,r,n),h={...this._readSelection(e),dataUrl:s,blob:d,canvas:t};return this._result=s,this._selection=h,this.dispatchEvent(new CustomEvent("crop",{detail:h,bubbles:!0,composed:!0})),h}get _ratio(){return qb(this.aspectRatio)}_template(){let e=this._ratio;return`
|
|
8118
8145
|
<cropper-canvas background>
|
|
8119
8146
|
<cropper-image rotatable scalable translatable></cropper-image>
|
|
8120
8147
|
<cropper-shade hidden></cropper-shade>
|
|
@@ -8624,7 +8651,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8624
8651
|
:host(:not([fade]):not([shadow])) .edge {
|
|
8625
8652
|
display: none;
|
|
8626
8653
|
}
|
|
8627
|
-
`],a([Io({reflect:!0})],vt.prototype,"orientation",2),a([Io({reflect:!0})],vt.prototype,"scrollbar",2),a([Io({attribute:"max-height"})],vt.prototype,"maxHeight",2),a([Io({attribute:"max-width"})],vt.prototype,"maxWidth",2),a([Io({type:Boolean,reflect:!0})],vt.prototype,"fade",2),a([Io({type:Boolean,reflect:!0})],vt.prototype,"shadow",2),a([Io({type:Boolean,reflect:!0})],vt.prototype,"thin",2),a([Io({type:Boolean,reflect:!0,attribute:"hide-scrollbar"})],vt.prototype,"hideScrollbar",2),a([Io({type:Boolean,reflect:!0,attribute:"auto-hide"})],vt.prototype,"autoHide",2),a([Io({type:Number,attribute:"reach-threshold"})],vt.prototype,"reachThreshold",2),a([ek(".viewport")],vt.prototype,"_viewport",2),a([dl()],vt.prototype,"_atTop",2),a([dl()],vt.prototype,"_atBottom",2),a([dl()],vt.prototype,"_atLeft",2),a([dl()],vt.prototype,"_atRight",2),vt=a([Jb("lui-scroll-area")],vt);import{css as tk,html as rk,LitElement as ok,nothing as ik}from"lit";import{customElement as nk,property as ti,state as ak}from"lit/decorators.js";var
|
|
8654
|
+
`],a([Io({reflect:!0})],vt.prototype,"orientation",2),a([Io({reflect:!0})],vt.prototype,"scrollbar",2),a([Io({attribute:"max-height"})],vt.prototype,"maxHeight",2),a([Io({attribute:"max-width"})],vt.prototype,"maxWidth",2),a([Io({type:Boolean,reflect:!0})],vt.prototype,"fade",2),a([Io({type:Boolean,reflect:!0})],vt.prototype,"shadow",2),a([Io({type:Boolean,reflect:!0})],vt.prototype,"thin",2),a([Io({type:Boolean,reflect:!0,attribute:"hide-scrollbar"})],vt.prototype,"hideScrollbar",2),a([Io({type:Boolean,reflect:!0,attribute:"auto-hide"})],vt.prototype,"autoHide",2),a([Io({type:Number,attribute:"reach-threshold"})],vt.prototype,"reachThreshold",2),a([ek(".viewport")],vt.prototype,"_viewport",2),a([dl()],vt.prototype,"_atTop",2),a([dl()],vt.prototype,"_atBottom",2),a([dl()],vt.prototype,"_atLeft",2),a([dl()],vt.prototype,"_atRight",2),vt=a([Jb("lui-scroll-area")],vt);import{css as tk,html as rk,LitElement as ok,nothing as ik}from"lit";import{customElement as nk,property as ti,state as ak}from"lit/decorators.js";var or=class extends ok{constructor(){super(...arguments);this.orientation="horizontal";this.variant="solid";this.size="md";this.spacing="md";this.labelPlacement="center";this.inset=!1;this.subtle=!1;this.color="";this.thickness="";this._hasLabel=!1;this._explicitAttrs=new Set;this._onSlotChange=e=>{let r=e.currentTarget.assignedNodes({flatten:!0}).some(n=>n.nodeType===Node.TEXT_NODE?!!n.textContent?.trim():n.nodeType===Node.ELEMENT_NODE);this._hasLabel!==r&&(this._hasLabel=r)}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(e){let t=F(this,"divider");!this._explicitAttrs.has("orientation")&&typeof t.orientation=="string"&&this.orientation!==t.orientation&&(this.orientation=t.orientation),!this._explicitAttrs.has("variant")&&typeof t.variant=="string"&&this.variant!==t.variant&&(this.variant=t.variant),!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("spacing")&&typeof t.spacing=="string"&&this.spacing!==t.spacing&&(this.spacing=t.spacing),!this._explicitAttrs.has("label-placement")&&typeof t.labelPlacement=="string"&&this.labelPlacement!==t.labelPlacement&&(this.labelPlacement=t.labelPlacement),!this._explicitAttrs.has("inset")&&typeof t.inset=="boolean"&&this.inset!==t.inset&&(this.inset=t.inset),!this._explicitAttrs.has("subtle")&&typeof t.subtle=="boolean"&&this.subtle!==t.subtle&&(this.subtle=t.subtle),!this._explicitAttrs.has("color")&&typeof t.color=="string"&&this.color!==t.color&&(this.color=t.color),!this._explicitAttrs.has("thickness")&&typeof t.thickness=="string"&&this.thickness!==t.thickness&&(this.thickness=t.thickness)}_style(){let e=[this.color?`--lui-divider-color:${this.color}`:"",this.thickness?`--lui-divider-thickness:${this.thickness}`:""].filter(Boolean);return e.length?e.join(";"):ik}render(){let e=this.orientation==="vertical";return rk`
|
|
8628
8655
|
<div
|
|
8629
8656
|
class=${`divider ${this._hasLabel&&!e?"has-label":"no-label"}`}
|
|
8630
8657
|
part="divider"
|
|
@@ -8636,7 +8663,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8636
8663
|
<span class="label" part="label"><slot @slotchange=${this._onSlotChange}></slot></span>
|
|
8637
8664
|
<span class="line after" part="line after"></span>
|
|
8638
8665
|
</div>
|
|
8639
|
-
`}};
|
|
8666
|
+
`}};or.styles=[A,P,tk`
|
|
8640
8667
|
:host {
|
|
8641
8668
|
display: block;
|
|
8642
8669
|
box-sizing: border-box;
|
|
@@ -8795,17 +8822,17 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8795
8822
|
:host([orientation="vertical"]) .label {
|
|
8796
8823
|
display: none;
|
|
8797
8824
|
}
|
|
8798
|
-
`],a([ti({reflect:!0})],
|
|
8825
|
+
`],a([ti({reflect:!0})],or.prototype,"orientation",2),a([ti({reflect:!0})],or.prototype,"variant",2),a([ti({reflect:!0})],or.prototype,"size",2),a([ti({reflect:!0})],or.prototype,"spacing",2),a([ti({attribute:"label-placement",reflect:!0})],or.prototype,"labelPlacement",2),a([ti({type:Boolean,reflect:!0})],or.prototype,"inset",2),a([ti({type:Boolean,reflect:!0})],or.prototype,"subtle",2),a([ti()],or.prototype,"color",2),a([ti()],or.prototype,"thickness",2),a([ak()],or.prototype,"_hasLabel",2),or=a([nk("lui-divider")],or);import{css as sk,html as lk,LitElement as ck}from"lit";import{customElement as dk,property as to}from"lit/decorators.js";var Dt=class extends ck{connectedCallback(){super.connectedCallback(),this._applyRootConfig(),this._notifyDescendants()}updated(){this._applyRootConfig(),this._notifyDescendants()}getConfig(){return{locale:this.locale,translations:this.translations,theme:this.theme,size:this.size,disabled:this.disabled,variant:this.variant,direction:this.direction,popupContainer:this.popupContainer,overlayContainer:this.overlayContainer,zIndexBase:this.zIndexBase,renderEmpty:this.renderEmpty,componentConfig:this.componentConfig}}_notifyDescendants(){queueMicrotask(()=>{let o=this.querySelectorAll("*");for(let e of o){let t=e;typeof t.requestUpdate=="function"&&t.requestUpdate()}})}_applyRootConfig(){this.locale?(Sp(this.locale),this.translations&&$p(this.locale,this.translations),this.setAttribute("lang",this.locale)):this.removeAttribute("lang"),this.theme?this.setAttribute("theme",this.theme):this.removeAttribute("theme"),this.direction?this.setAttribute("dir",this.direction):this.removeAttribute("dir"),typeof this.zIndexBase=="number"?this.style.setProperty("--lui-z-base",String(this.zIndexBase)):this.style.removeProperty("--lui-z-base")}render(){return lk`<slot></slot>`}};Dt.styles=sk`
|
|
8799
8826
|
:host {
|
|
8800
8827
|
display: contents;
|
|
8801
8828
|
}
|
|
8802
|
-
`,a([to()],Dt.prototype,"locale",2),a([to({attribute:!1})],Dt.prototype,"translations",2),a([to({reflect:!0})],Dt.prototype,"theme",2),a([to({reflect:!0})],Dt.prototype,"size",2),a([to({type:Boolean,reflect:!0})],Dt.prototype,"disabled",2),a([to({reflect:!0})],Dt.prototype,"variant",2),a([to({reflect:!0,attribute:"direction"})],Dt.prototype,"direction",2),a([to({attribute:!1})],Dt.prototype,"popupContainer",2),a([to({attribute:!1})],Dt.prototype,"overlayContainer",2),a([to({type:Number,attribute:"z-index-base"})],Dt.prototype,"zIndexBase",2),a([to({attribute:!1})],Dt.prototype,"renderEmpty",2),a([to({attribute:!1})],Dt.prototype,"componentConfig",2),Dt=a([dk("lui-config-provider")],Dt);import{css as O1,html as
|
|
8803
|
-
${this.icon?
|
|
8829
|
+
`,a([to()],Dt.prototype,"locale",2),a([to({attribute:!1})],Dt.prototype,"translations",2),a([to({reflect:!0})],Dt.prototype,"theme",2),a([to({reflect:!0})],Dt.prototype,"size",2),a([to({type:Boolean,reflect:!0})],Dt.prototype,"disabled",2),a([to({reflect:!0})],Dt.prototype,"variant",2),a([to({reflect:!0,attribute:"direction"})],Dt.prototype,"direction",2),a([to({attribute:!1})],Dt.prototype,"popupContainer",2),a([to({attribute:!1})],Dt.prototype,"overlayContainer",2),a([to({type:Number,attribute:"z-index-base"})],Dt.prototype,"zIndexBase",2),a([to({attribute:!1})],Dt.prototype,"renderEmpty",2),a([to({attribute:!1})],Dt.prototype,"componentConfig",2),Dt=a([dk("lui-config-provider")],Dt);import{css as O1,html as Rr,LitElement as H1,nothing as Ei}from"lit";import{customElement as R1,property as ut,query as uk,queryAssignedElements as hk,state as pk}from"lit/decorators.js";function $d(i,o){return String(i.key??i.value??i.href??i.label??o)}function Td(i){return i==="chevron"?Rr`<lui-icon name="chevron-right"></lui-icon>`:i==="dot"?Rr`<span class="dot" aria-hidden="true"></span>`:i==="slash"?"/":i||"/"}function mk(i,o){return i.length===o.length&&i.every((e,t)=>e===o[t])}var Wt=class extends H1{constructor(){super(...arguments);this.key="";this.value="";this.label="";this.href="";this.target="";this.rel="";this.icon="";this.disabled=!1;this.current=!1;this.first=!1;this.separator="/";this._onClick=e=>{if(this.disabled||this.current){e.preventDefault(),e.stopPropagation();return}this.dispatchEvent(new CustomEvent("item-click",{detail:{key:this.itemKey,index:-1,originalEvent:e},bubbles:!0,composed:!0}))}}get itemKey(){return this.key||this.value||this.href||this.label}_renderLabel(){return Rr`
|
|
8830
|
+
${this.icon?Rr`<lui-icon name=${this.icon}></lui-icon>`:Ei}
|
|
8804
8831
|
<span class="label"><slot>${this.label}</slot></span>
|
|
8805
|
-
`}render(){let e=["link",this.current?"current":"",this.disabled?"disabled":""].filter(Boolean).join(" "),t=this._renderLabel();return
|
|
8832
|
+
`}render(){let e=["link",this.current?"current":"",this.disabled?"disabled":""].filter(Boolean).join(" "),t=this._renderLabel();return Rr`
|
|
8806
8833
|
<span class="item" part="item">
|
|
8807
8834
|
<span class="separator" part="separator" aria-hidden="true">${Td(this.separator)}</span>
|
|
8808
|
-
${this.href&&!this.disabled&&!this.current?
|
|
8835
|
+
${this.href&&!this.disabled&&!this.current?Rr`
|
|
8809
8836
|
<a
|
|
8810
8837
|
class=${e}
|
|
8811
8838
|
part="link"
|
|
@@ -8814,7 +8841,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8814
8841
|
rel=${this.rel||(this.target==="_blank"?"noopener noreferrer":Ei)}
|
|
8815
8842
|
@click=${this._onClick}
|
|
8816
8843
|
>${t}</a>
|
|
8817
|
-
`:this.current||this.disabled?
|
|
8844
|
+
`:this.current||this.disabled?Rr`<span class=${e} part="link" aria-current=${this.current?"page":Ei} aria-disabled=${this.disabled?"true":Ei}>${t}</span>`:Rr`<button class=${e} part="link" type="button" @click=${this._onClick}>${t}</button>`}
|
|
8818
8845
|
</span>
|
|
8819
8846
|
`}};Wt.styles=[A,P,O1`
|
|
8820
8847
|
:host {
|
|
@@ -8903,7 +8930,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8903
8930
|
lui-icon {
|
|
8904
8931
|
--lui-icon-size: 16px;
|
|
8905
8932
|
}
|
|
8906
|
-
`],a([ut()],Wt.prototype,"key",2),a([ut()],Wt.prototype,"value",2),a([ut()],Wt.prototype,"label",2),a([ut()],Wt.prototype,"href",2),a([ut()],Wt.prototype,"target",2),a([ut()],Wt.prototype,"rel",2),a([ut()],Wt.prototype,"icon",2),a([ut({type:Boolean,reflect:!0})],Wt.prototype,"disabled",2),a([ut({type:Boolean,reflect:!0})],Wt.prototype,"current",2),a([ut({type:Boolean,reflect:!0})],Wt.prototype,"first",2),a([ut()],Wt.prototype,"separator",2),Wt=a([R1("lui-breadcrumb-item")],Wt);var Mt=class extends H1{constructor(){super(...arguments);this.separator="/";this.size="md";this.currentKey="";this.maxItems=0;this.collapse="auto";this.collapsedLabel="...";this.overflowIcon="more-horizontal";this.overflowLabel="\u66F4\u591A";this.disabled=!1;this.ariaLabel="Breadcrumb";this._overflowIndexes=[];this._explicitAttrs=new Set;this._layoutFrame=0}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._resizeObserver=new ResizeObserver(()=>this._scheduleLayout())}firstUpdated(){this._resizeObserver?.observe(this),this._listEl&&this._resizeObserver?.observe(this._listEl),this.parentElement&&(this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._scheduleLayout()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame)}willUpdate(e){let t=F(this,"breadcrumb");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("separator")&&typeof t.separator=="string"&&this.separator!==t.separator&&(this.separator=t.separator),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("max-items")&&typeof t.maxItems=="number"&&this.maxItems!==t.maxItems&&(this.maxItems=t.maxItems)}updated(e){this.parentElement&&this.parentElement!==this._observedParent&&(this._observedParent&&this._resizeObserver?.unobserve(this._observedParent),this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._syncSlottedItems(),(e.has("items")||e.has("separator")||e.has("size")||e.has("currentKey")||e.has("maxItems")||e.has("collapse")||e.has("collapsedLabel")||e.has("disabled"))&&this._scheduleLayout()}_syncSlottedItems(){if(this.items?.length)return;let e=(this._assignedElements??[]).filter(t=>t.tagName.toLowerCase()==="lui-breadcrumb-item");e.forEach((t,r)=>{t.first=r===0,t.hasAttribute("separator")||(t.separator=this.separator),this.disabled?(t.disabled||t.setAttribute("data-lui-breadcrumb-disabled",""),t.disabled=!0):t.hasAttribute("data-lui-breadcrumb-disabled")&&(t.removeAttribute("data-lui-breadcrumb-disabled"),t.disabled=!1),this.currentKey&&t.itemKey===this.currentKey&&(t.current=!0),!this.currentKey&&r===e.length-1&&!t.hasAttribute("current")&&(t.current=!0)})}_resolvedItems(){let e=[...this.items??[]];if(!e.length)return[];let t=this.currentKey;return e.map((r,n)=>({...r,disabled:this.disabled||r.disabled,current:r.current||(t?$d(r,n)===t:n===e.length-1),separator:r.separator??this.separator}))}_countOverflowIndexes(e){let t=Math.floor(this.maxItems||0);if(!t||e.length<=t||t<3)return[];let r=t-2,n=Math.max(1,e.length-r);return e.slice(1,n).map((s,d)=>d+1)}_autoOverflowIndexes(e){if(e.length<=2)return[];let t=Math.floor(this._listEl?.clientWidth??0);if(!t)return this._countOverflowIndexes(e);let r=Array.from(this.renderRoot.querySelectorAll("[data-measure-index]")),n=this.renderRoot.querySelector('[data-measure-overflow="true"]');if(r.length!==e.length||!n)return this._countOverflowIndexes(e);let s=Number.parseFloat(getComputedStyle(this._listEl).columnGap||"0")||0,d=r.map(E=>Math.ceil(E.getBoundingClientRect().width)),h=Math.ceil(n.getBoundingClientRect().width),p=this.maxItems>=3?Math.min(this.maxItems,e.length):e.length;if(d.reduce((E,T)=>E+T,0)+Math.max(0,e.length-1)*s<=t&&e.length<=p)return[];let x=e.slice(1,-1),y=Math.min(x.length,Math.max(0,p-2)),C=E=>{let T=x.length-E,O=[0,...x.slice(T).map((R,N)=>T+N+1),e.length-1],H=[d[0]??0,h,...O.slice(1).map(R=>d[R]??0)];return H.reduce((R,N)=>R+N,0)+Math.max(0,H.length-1)*s};for(;y>0&&C(y)>t;)y-=1;let S=x.length-y;return x.slice(0,S).map((E,T)=>T+1)}_nextOverflowIndexes(e){return this.collapse==="none"?[]:this.collapse==="count"?this._countOverflowIndexes(e):this._autoOverflowIndexes(e)}_scheduleLayout(){this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._recomputeLayout()})}_recomputeLayout(){if(!this.items?.length){this._overflowIndexes.length&&(this._overflowIndexes=[]);return}let e=this._resolvedItems(),t=this._nextOverflowIndexes(e);mk(t,this._overflowIndexes)||(this._overflowIndexes=t)}_displayItems(e){if(!this._overflowIndexes.length)return e;let t=new Set(this._overflowIndexes),r=[];return e.forEach((n,s)=>{t.has(s)||(r.push(n),s===0&&r.push({key:"__collapsed__",value:"__collapsed__",label:this.collapsedLabel,disabled:!0,separator:this.separator}))}),r}_overflowMenuItems(e){return this._overflowIndexes.flatMap(t=>{let r=e[t];return r?[{key:String(t),value:String(t),label:r.label??r.value??r.href??r.key??String(t),icon:r.icon,disabled:this.disabled||r.disabled,checked:r.current}]:[]})}_onItemClick(e,t,r){if(this.disabled||t.disabled||t.current)return;e.stopPropagation();let n=$d(t,r);this.dispatchEvent(new CustomEvent("item-click",{detail:{key:n,item:t,index:r,originalEvent:e.detail.originalEvent??e},bubbles:!0,composed:!0}))}_onOverflowSelect(e,t){let r=Number(e.detail?.value),n=t[r];!n||this.disabled||n.disabled||n.current||this.dispatchEvent(new CustomEvent("item-click",{detail:{key:$d(n,r),item:n,index:r,originalEvent:e.detail?.triggerEvent??e},bubbles:!0,composed:!0}))}_renderOverflow(e,t){let r=this._overflowMenuItems(e);return r.length?
|
|
8933
|
+
`],a([ut()],Wt.prototype,"key",2),a([ut()],Wt.prototype,"value",2),a([ut()],Wt.prototype,"label",2),a([ut()],Wt.prototype,"href",2),a([ut()],Wt.prototype,"target",2),a([ut()],Wt.prototype,"rel",2),a([ut()],Wt.prototype,"icon",2),a([ut({type:Boolean,reflect:!0})],Wt.prototype,"disabled",2),a([ut({type:Boolean,reflect:!0})],Wt.prototype,"current",2),a([ut({type:Boolean,reflect:!0})],Wt.prototype,"first",2),a([ut()],Wt.prototype,"separator",2),Wt=a([R1("lui-breadcrumb-item")],Wt);var Mt=class extends H1{constructor(){super(...arguments);this.separator="/";this.size="md";this.currentKey="";this.maxItems=0;this.collapse="auto";this.collapsedLabel="...";this.overflowIcon="more-horizontal";this.overflowLabel="\u66F4\u591A";this.disabled=!1;this.ariaLabel="Breadcrumb";this._overflowIndexes=[];this._explicitAttrs=new Set;this._layoutFrame=0}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._resizeObserver=new ResizeObserver(()=>this._scheduleLayout())}firstUpdated(){this._resizeObserver?.observe(this),this._listEl&&this._resizeObserver?.observe(this._listEl),this.parentElement&&(this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._scheduleLayout()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect(),this._layoutFrame&&cancelAnimationFrame(this._layoutFrame)}willUpdate(e){let t=F(this,"breadcrumb");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("separator")&&typeof t.separator=="string"&&this.separator!==t.separator&&(this.separator=t.separator),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("max-items")&&typeof t.maxItems=="number"&&this.maxItems!==t.maxItems&&(this.maxItems=t.maxItems)}updated(e){this.parentElement&&this.parentElement!==this._observedParent&&(this._observedParent&&this._resizeObserver?.unobserve(this._observedParent),this._observedParent=this.parentElement,this._resizeObserver?.observe(this.parentElement)),this._syncSlottedItems(),(e.has("items")||e.has("separator")||e.has("size")||e.has("currentKey")||e.has("maxItems")||e.has("collapse")||e.has("collapsedLabel")||e.has("disabled"))&&this._scheduleLayout()}_syncSlottedItems(){if(this.items?.length)return;let e=(this._assignedElements??[]).filter(t=>t.tagName.toLowerCase()==="lui-breadcrumb-item");e.forEach((t,r)=>{t.first=r===0,t.hasAttribute("separator")||(t.separator=this.separator),this.disabled?(t.disabled||t.setAttribute("data-lui-breadcrumb-disabled",""),t.disabled=!0):t.hasAttribute("data-lui-breadcrumb-disabled")&&(t.removeAttribute("data-lui-breadcrumb-disabled"),t.disabled=!1),this.currentKey&&t.itemKey===this.currentKey&&(t.current=!0),!this.currentKey&&r===e.length-1&&!t.hasAttribute("current")&&(t.current=!0)})}_resolvedItems(){let e=[...this.items??[]];if(!e.length)return[];let t=this.currentKey;return e.map((r,n)=>({...r,disabled:this.disabled||r.disabled,current:r.current||(t?$d(r,n)===t:n===e.length-1),separator:r.separator??this.separator}))}_countOverflowIndexes(e){let t=Math.floor(this.maxItems||0);if(!t||e.length<=t||t<3)return[];let r=t-2,n=Math.max(1,e.length-r);return e.slice(1,n).map((s,d)=>d+1)}_autoOverflowIndexes(e){if(e.length<=2)return[];let t=Math.floor(this._listEl?.clientWidth??0);if(!t)return this._countOverflowIndexes(e);let r=Array.from(this.renderRoot.querySelectorAll("[data-measure-index]")),n=this.renderRoot.querySelector('[data-measure-overflow="true"]');if(r.length!==e.length||!n)return this._countOverflowIndexes(e);let s=Number.parseFloat(getComputedStyle(this._listEl).columnGap||"0")||0,d=r.map(E=>Math.ceil(E.getBoundingClientRect().width)),h=Math.ceil(n.getBoundingClientRect().width),p=this.maxItems>=3?Math.min(this.maxItems,e.length):e.length;if(d.reduce((E,T)=>E+T,0)+Math.max(0,e.length-1)*s<=t&&e.length<=p)return[];let x=e.slice(1,-1),y=Math.min(x.length,Math.max(0,p-2)),C=E=>{let T=x.length-E,O=[0,...x.slice(T).map((R,N)=>T+N+1),e.length-1],H=[d[0]??0,h,...O.slice(1).map(R=>d[R]??0)];return H.reduce((R,N)=>R+N,0)+Math.max(0,H.length-1)*s};for(;y>0&&C(y)>t;)y-=1;let S=x.length-y;return x.slice(0,S).map((E,T)=>T+1)}_nextOverflowIndexes(e){return this.collapse==="none"?[]:this.collapse==="count"?this._countOverflowIndexes(e):this._autoOverflowIndexes(e)}_scheduleLayout(){this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._recomputeLayout()})}_recomputeLayout(){if(!this.items?.length){this._overflowIndexes.length&&(this._overflowIndexes=[]);return}let e=this._resolvedItems(),t=this._nextOverflowIndexes(e);mk(t,this._overflowIndexes)||(this._overflowIndexes=t)}_displayItems(e){if(!this._overflowIndexes.length)return e;let t=new Set(this._overflowIndexes),r=[];return e.forEach((n,s)=>{t.has(s)||(r.push(n),s===0&&r.push({key:"__collapsed__",value:"__collapsed__",label:this.collapsedLabel,disabled:!0,separator:this.separator}))}),r}_overflowMenuItems(e){return this._overflowIndexes.flatMap(t=>{let r=e[t];return r?[{key:String(t),value:String(t),label:r.label??r.value??r.href??r.key??String(t),icon:r.icon,disabled:this.disabled||r.disabled,checked:r.current}]:[]})}_onItemClick(e,t,r){if(this.disabled||t.disabled||t.current)return;e.stopPropagation();let n=$d(t,r);this.dispatchEvent(new CustomEvent("item-click",{detail:{key:n,item:t,index:r,originalEvent:e.detail.originalEvent??e},bubbles:!0,composed:!0}))}_onOverflowSelect(e,t){let r=Number(e.detail?.value),n=t[r];!n||this.disabled||n.disabled||n.current||this.dispatchEvent(new CustomEvent("item-click",{detail:{key:$d(n,r),item:n,index:r,originalEvent:e.detail?.triggerEvent??e},bubbles:!0,composed:!0}))}_renderOverflow(e,t){let r=this._overflowMenuItems(e);return r.length?Rr`
|
|
8907
8934
|
<li class="overflow-li">
|
|
8908
8935
|
<span class="overflow-item">
|
|
8909
8936
|
<span class="overflow-separator" aria-hidden="true" ?hidden=${t}>${Td(this.separator)}</span>
|
|
@@ -8927,7 +8954,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8927
8954
|
</lui-dropmenu>
|
|
8928
8955
|
</span>
|
|
8929
8956
|
</li>
|
|
8930
|
-
`:Ei}_renderItem(e,t,r=t){return e.key==="__collapsed__"?Ei:
|
|
8957
|
+
`:Ei}_renderItem(e,t,r=t){return e.key==="__collapsed__"?Ei:Rr`
|
|
8931
8958
|
<li data-current=${e.current?"true":"false"}>
|
|
8932
8959
|
<lui-breadcrumb-item
|
|
8933
8960
|
.key=${e.key??""}
|
|
@@ -8944,9 +8971,9 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8944
8971
|
@item-click=${n=>this._onItemClick(n,e,t)}
|
|
8945
8972
|
></lui-breadcrumb-item>
|
|
8946
8973
|
</li>
|
|
8947
|
-
`}_renderMeasuredItems(e){return
|
|
8974
|
+
`}_renderMeasuredItems(e){return Rr`
|
|
8948
8975
|
<div class="measure" aria-hidden="true">
|
|
8949
|
-
${e.map((t,r)=>
|
|
8976
|
+
${e.map((t,r)=>Rr`
|
|
8950
8977
|
<lui-breadcrumb-item
|
|
8951
8978
|
data-measure-index=${r}
|
|
8952
8979
|
.key=${t.key??""}
|
|
@@ -8966,10 +8993,10 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
8966
8993
|
</button>
|
|
8967
8994
|
</span>
|
|
8968
8995
|
</div>
|
|
8969
|
-
`}render(){let e=this._resolvedItems(),t=this._displayItems(e),r=0;return
|
|
8996
|
+
`}render(){let e=this._resolvedItems(),t=this._displayItems(e),r=0;return Rr`
|
|
8970
8997
|
<nav aria-label=${this.ariaLabel} part="nav">
|
|
8971
8998
|
<ol part="list">
|
|
8972
|
-
${t.length?t.map(n=>{if(n.key==="__collapsed__")return this._renderOverflow(e,r===0);let s=e.indexOf(n),d=this._renderItem(n,s,r);return r+=1,d}):
|
|
8999
|
+
${t.length?t.map(n=>{if(n.key==="__collapsed__")return this._renderOverflow(e,r===0);let s=e.indexOf(n),d=this._renderItem(n,s,r);return r+=1,d}):Rr`<slot @slotchange=${()=>this._syncSlottedItems()}></slot>`}
|
|
8973
9000
|
</ol>
|
|
8974
9001
|
${e.length?this._renderMeasuredItems(e):Ei}
|
|
8975
9002
|
</nav>
|
|
@@ -9094,7 +9121,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9094
9121
|
--lui-breadcrumb-font-size: var(--lui-breadcrumb-font-size);
|
|
9095
9122
|
--lui-breadcrumb-link-height: var(--lui-breadcrumb-link-height);
|
|
9096
9123
|
}
|
|
9097
|
-
`],a([ut({attribute:!1})],Mt.prototype,"items",2),a([ut()],Mt.prototype,"separator",2),a([ut({reflect:!0})],Mt.prototype,"size",2),a([ut({attribute:"current-key"})],Mt.prototype,"currentKey",2),a([ut({type:Number,attribute:"max-items"})],Mt.prototype,"maxItems",2),a([ut({reflect:!0})],Mt.prototype,"collapse",2),a([ut({attribute:"collapsed-label"})],Mt.prototype,"collapsedLabel",2),a([ut({attribute:"overflow-icon"})],Mt.prototype,"overflowIcon",2),a([ut({attribute:"overflow-label"})],Mt.prototype,"overflowLabel",2),a([ut({type:Boolean,reflect:!0})],Mt.prototype,"disabled",2),a([ut({attribute:"aria-label"})],Mt.prototype,"ariaLabel",2),a([hk({flatten:!0})],Mt.prototype,"_assignedElements",2),a([uk("ol")],Mt.prototype,"_listEl",2),a([pk()],Mt.prototype,"_overflowIndexes",2),Mt=a([R1("lui-breadcrumb")],Mt);import{css as I1,html as V1,LitElement as D1}from"lit";import{customElement as F1,property as ro,queryAssignedElements as gk}from"lit/decorators.js";var N1=[["xl",1200],["lg",992],["md",768],["sm",576],["xs",0]],fk={top:"flex-start",middle:"center",bottom:"flex-end",stretch:"stretch"},vk={start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between","space-evenly":"space-evenly"};function bk(i){if(!i)return 0;try{let o=JSON.parse(i);return Array.isArray(o)?[Number(o[0])||0,Number(o[1])||0]:Number(o)||0}catch{return Number(i)||0}}function kk(i,o,e){i.getPropertyValue(o)!==e&&i.setProperty(o,e)}function
|
|
9124
|
+
`],a([ut({attribute:!1})],Mt.prototype,"items",2),a([ut()],Mt.prototype,"separator",2),a([ut({reflect:!0})],Mt.prototype,"size",2),a([ut({attribute:"current-key"})],Mt.prototype,"currentKey",2),a([ut({type:Number,attribute:"max-items"})],Mt.prototype,"maxItems",2),a([ut({reflect:!0})],Mt.prototype,"collapse",2),a([ut({attribute:"collapsed-label"})],Mt.prototype,"collapsedLabel",2),a([ut({attribute:"overflow-icon"})],Mt.prototype,"overflowIcon",2),a([ut({attribute:"overflow-label"})],Mt.prototype,"overflowLabel",2),a([ut({type:Boolean,reflect:!0})],Mt.prototype,"disabled",2),a([ut({attribute:"aria-label"})],Mt.prototype,"ariaLabel",2),a([hk({flatten:!0})],Mt.prototype,"_assignedElements",2),a([uk("ol")],Mt.prototype,"_listEl",2),a([pk()],Mt.prototype,"_overflowIndexes",2),Mt=a([R1("lui-breadcrumb")],Mt);import{css as I1,html as V1,LitElement as D1}from"lit";import{customElement as F1,property as ro,queryAssignedElements as gk}from"lit/decorators.js";var N1=[["xl",1200],["lg",992],["md",768],["sm",576],["xs",0]],fk={top:"flex-start",middle:"center",bottom:"flex-end",stretch:"stretch"},vk={start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between","space-evenly":"space-evenly"};function bk(i){if(!i)return 0;try{let o=JSON.parse(i);return Array.isArray(o)?[Number(o[0])||0,Number(o[1])||0]:Number(o)||0}catch{return Number(i)||0}}function kk(i,o,e){i.getPropertyValue(o)!==e&&i.setProperty(o,e)}function wr(i,o,e){let t=i;t[o]!==e&&(t[o]=e)}var Mo=class extends D1{constructor(){super(...arguments);this.gutter=0;this.align="top";this.justify="start";this.nowrap=!1;this._ro=null;this._layoutFrame=0;this._lastWidth=-1}get _h(){return Array.isArray(this.gutter)?this.gutter[0]:this.gutter}get _v(){return Array.isArray(this.gutter)?this.gutter[1]:0}connectedCallback(){super.connectedCallback(),this._ro=new ResizeObserver(()=>this._scheduleLayout()),this._ro.observe(this)}disconnectedCallback(){this._ro?.disconnect(),this._ro=null,this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),super.disconnectedCallback()}firstUpdated(){this._scheduleLayout()}updated(){this._scheduleLayout()}_scheduleLayout(){this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._layout()})}_syncCols(e){for(let t of this._assignedElements??[])t.tagName.toLowerCase()==="lui-col"&&t.updateLayout(e)}_layout(){let e=Number(this._h)||0,t=Number(this._v)||0,r=this.style;wr(r,"flexWrap",this.nowrap?"nowrap":"wrap"),wr(r,"alignItems",fk[this.align]??"flex-start"),wr(r,"justifyContent",vk[this.justify]??"flex-start"),wr(r,"marginLeft",e?`-${e/2}px`:""),wr(r,"marginRight",e?`-${e/2}px`:""),kk(r,"--_gutter-h",e?`${e/2}px`:"0px"),wr(r,"rowGap",t?`${t}px`:"");let n=Math.floor(this.getBoundingClientRect().width||this.offsetWidth||0);n!==this._lastWidth?(this._lastWidth=n,this._syncCols(n)):this._syncCols(n)}render(){return V1`<slot @slotchange=${this._scheduleLayout}></slot>`}};Mo.styles=[A,I1`
|
|
9098
9125
|
:host {
|
|
9099
9126
|
display: flex;
|
|
9100
9127
|
flex-wrap: wrap;
|
|
@@ -9104,7 +9131,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9104
9131
|
slot {
|
|
9105
9132
|
display: contents;
|
|
9106
9133
|
}
|
|
9107
|
-
`],a([ro({converter:bk})],Mo.prototype,"gutter",2),a([ro()],Mo.prototype,"align",2),a([ro()],Mo.prototype,"justify",2),a([ro({type:Boolean})],Mo.prototype,"nowrap",2),a([gk({flatten:!0})],Mo.prototype,"_assignedElements",2),Mo=a([F1("lui-row")],Mo);var
|
|
9134
|
+
`],a([ro({converter:bk})],Mo.prototype,"gutter",2),a([ro()],Mo.prototype,"align",2),a([ro()],Mo.prototype,"justify",2),a([ro({type:Boolean})],Mo.prototype,"nowrap",2),a([gk({flatten:!0})],Mo.prototype,"_assignedElements",2),Mo=a([F1("lui-row")],Mo);var Ir=class extends D1{constructor(){super(...arguments);this._parentRo=null;this._layoutFrame=0;this._lastContainerWidth=-1}connectedCallback(){super.connectedCallback();let e=this.closest("lui-row");e&&(this._parentRo=new ResizeObserver(()=>this._scheduleApply()),this._parentRo.observe(e)),this._scheduleApply()}disconnectedCallback(){this._parentRo?.disconnect(),this._parentRo=null,this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),super.disconnectedCallback()}updated(){this._scheduleApply()}updateLayout(e){e!=null&&(this._lastContainerWidth=Math.max(0,Math.floor(e))),this._scheduleApply()}_scheduleApply(){this._layoutFrame&&cancelAnimationFrame(this._layoutFrame),this._layoutFrame=requestAnimationFrame(()=>{this._layoutFrame=0,this._applySpan()})}_activeBreakpoint(e){return N1.find(([,t])=>e>=t)?.[0]??"xs"}_resolveSpan(e){return this[e]??this.span??24}_applySpan(){let e=this.closest("lui-row"),t=this._lastContainerWidth>=0?this._lastContainerWidth:Math.floor(e?.getBoundingClientRect().width||e?.offsetWidth||0),r=this._activeBreakpoint(t),n=this._resolveSpan(r),s=this.style;if(!Number.isFinite(n)||n<=0){wr(s,"display","none"),wr(s,"flex",""),wr(s,"maxWidth",""),wr(s,"marginLeft","");return}let d=`${Math.min(24,Math.max(0,n))/24*100}%`;wr(s,"display","block"),wr(s,"flex",`0 0 ${d}`),wr(s,"maxWidth",d),wr(s,"marginLeft",this.offset!=null?`${this.offset/24*100}%`:""),wr(s,"order",this.colOrder!=null?String(this.colOrder):"")}render(){return V1`<slot></slot>`}};Ir.styles=[A,I1`
|
|
9108
9135
|
:host {
|
|
9109
9136
|
display: block;
|
|
9110
9137
|
box-sizing: border-box;
|
|
@@ -9119,7 +9146,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9119
9146
|
slot {
|
|
9120
9147
|
display: contents;
|
|
9121
9148
|
}
|
|
9122
|
-
`],a([ro({type:Number})],
|
|
9149
|
+
`],a([ro({type:Number})],Ir.prototype,"span",2),a([ro({type:Number})],Ir.prototype,"xs",2),a([ro({type:Number})],Ir.prototype,"sm",2),a([ro({type:Number})],Ir.prototype,"md",2),a([ro({type:Number})],Ir.prototype,"lg",2),a([ro({type:Number})],Ir.prototype,"xl",2),a([ro({type:Number})],Ir.prototype,"offset",2),a([ro({type:Number,attribute:"order"})],Ir.prototype,"colOrder",2),Ir=a([F1("lui-col")],Ir);import{css as ky,html as G,LitElement as yy,nothing as Ae}from"lit";import{customElement as xy,property as qa,state as ml}from"lit/decorators.js";import{keyed as wy}from"lit/directives/keyed.js";import{ref as gl}from"lit/directives/ref.js";import{repeat as _y}from"lit/directives/repeat.js";import{TanStackFormController as My,isStandardSchemaValidator as Cy,standardSchemaValidators as zy}from"@tanstack/lit-form";import{css as yk,html as Ad,LitElement as xk}from"lit";import{customElement as wk,property as Ue,query as _k}from"lit/decorators.js";var Se=class extends xk{constructor(){super(...arguments);this.value="";this.placeholder="";this.type="text";this.size="md";this.disabled=!1;this.readonly=!1;this.autofocus=!1;this.clearable=!1;this.revealable=!1;this.invalid=!1;this.noborder=!1;this.spellcheck=!1;this.autocapitalize="";this._focused=!1;this._revealed=!1;this._explicitAttrs=new Set;this._keepFocus=e=>{e.preventDefault()};this._clearValue=()=>{this.disabled||this.readonly||(this.value="",this._revealed=!1,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{value:this.value},bubbles:!0,composed:!0})),this.updateComplete.then(()=>this.focus()))};this._toggleReveal=()=>{this.disabled||this.type!=="password"||(this._revealed=!this._revealed,this.requestUpdate(),this.updateComplete.then(()=>this.focus()))};this._onInput=e=>{e.stopPropagation(),this.value=e.target.value,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onChange=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))};this._onKeyDown=e=>{if(e.key==="Enter"){let t=e.composedPath().find(r=>r.localName==="form");if(t){if(!t.reportValidity())return;t.requestSubmit()}}}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}willUpdate(){let e=F(this,"input");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("clearable")&&typeof e.clearable=="boolean"&&this.clearable!==e.clearable&&(this.clearable=e.clearable),!this._explicitAttrs.has("revealable")&&typeof e.revealable=="boolean"&&this.revealable!==e.revealable&&(this.revealable=e.revealable),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder)}focus(){this._input?.focus()}blur(){this._input?.blur()}render(){let e=["wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this.clearable&&!this.disabled&&!this.readonly&&this.value.length>0,r=this.revealable&&this.type==="password"&&!this.disabled;return Ad`
|
|
9123
9150
|
<div class=${e.join(" ")} part="wrapper">
|
|
9124
9151
|
<slot name="prefix"></slot>
|
|
9125
9152
|
<input
|
|
@@ -9432,7 +9459,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9432
9459
|
font-size: var(--lui-font-size-lg);
|
|
9433
9460
|
padding: 10px 16px;
|
|
9434
9461
|
}
|
|
9435
|
-
`],a([Ft()],Ge.prototype,"value",2),a([Ft()],Ge.prototype,"placeholder",2),a([Ft({type:Number})],Ge.prototype,"rows",2),a([Ft({type:Number,attribute:"min-rows"})],Ge.prototype,"minRows",2),a([Ft({type:Number,attribute:"max-rows"})],Ge.prototype,"maxRows",2),a([Ft({reflect:!0})],Ge.prototype,"size",2),a([Ft({type:Boolean,reflect:!0})],Ge.prototype,"disabled",2),a([Ft({type:Boolean,reflect:!0})],Ge.prototype,"readonly",2),a([Ft({type:Boolean,reflect:!0})],Ge.prototype,"invalid",2),a([Ft({type:Boolean,reflect:!0})],Ge.prototype,"noborder",2),a([Ft({type:Boolean,reflect:!0,attribute:"auto-resize"})],Ge.prototype,"autoResize",2),a([Ft()],Ge.prototype,"name",2),a([Ft()],Ge.prototype,"autocomplete",2),a([Ft({type:Number,attribute:"maxlength"})],Ge.prototype,"maxLength",2),a([Ft({type:Number,attribute:"minlength"})],Ge.prototype,"minLength",2),a([Ft()],Ge.prototype,"enterkeyhint",2),a([Ft({type:Boolean})],Ge.prototype,"spellcheck",2),a([Ft()],Ge.prototype,"autocapitalize",2),a([Sk("textarea")],Ge.prototype,"_textarea",2),Ge=a([Ek("lui-textarea")],Ge);import{css as $k,html as L1,LitElement as Tk}from"lit";import{customElement as Ak,property as Qi,query as jk}from"lit/decorators.js";var
|
|
9462
|
+
`],a([Ft()],Ge.prototype,"value",2),a([Ft()],Ge.prototype,"placeholder",2),a([Ft({type:Number})],Ge.prototype,"rows",2),a([Ft({type:Number,attribute:"min-rows"})],Ge.prototype,"minRows",2),a([Ft({type:Number,attribute:"max-rows"})],Ge.prototype,"maxRows",2),a([Ft({reflect:!0})],Ge.prototype,"size",2),a([Ft({type:Boolean,reflect:!0})],Ge.prototype,"disabled",2),a([Ft({type:Boolean,reflect:!0})],Ge.prototype,"readonly",2),a([Ft({type:Boolean,reflect:!0})],Ge.prototype,"invalid",2),a([Ft({type:Boolean,reflect:!0})],Ge.prototype,"noborder",2),a([Ft({type:Boolean,reflect:!0,attribute:"auto-resize"})],Ge.prototype,"autoResize",2),a([Ft()],Ge.prototype,"name",2),a([Ft()],Ge.prototype,"autocomplete",2),a([Ft({type:Number,attribute:"maxlength"})],Ge.prototype,"maxLength",2),a([Ft({type:Number,attribute:"minlength"})],Ge.prototype,"minLength",2),a([Ft()],Ge.prototype,"enterkeyhint",2),a([Ft({type:Boolean})],Ge.prototype,"spellcheck",2),a([Ft()],Ge.prototype,"autocapitalize",2),a([Sk("textarea")],Ge.prototype,"_textarea",2),Ge=a([Ek("lui-textarea")],Ge);import{css as $k,html as L1,LitElement as Tk}from"lit";import{customElement as Ak,property as Qi,query as jk}from"lit/decorators.js";var Vr=class extends Tk{constructor(){super(...arguments);this.checked=!1;this.disabled=!1;this.size="md";this._onKeyDown=e=>{this.disabled||(e.key===" "||e.key==="Enter")&&(e.preventDefault(),this._toggle())}}connectedCallback(){super.connectedCallback(),this._disposeLocaleChange=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._disposeLocaleChange?.()}_t(e,t){return ie(oe(this.locale,this.translations),e,t)}focus(){this._input?.focus()}blur(){this._input?.blur()}_toggle(){this.disabled||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked},bubbles:!0,composed:!0})))}render(){return L1`
|
|
9436
9463
|
<input
|
|
9437
9464
|
type="checkbox"
|
|
9438
9465
|
role="switch"
|
|
@@ -9447,7 +9474,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9447
9474
|
<div class="thumb" part="thumb"></div>
|
|
9448
9475
|
</div>
|
|
9449
9476
|
${this.label?L1`<label @click=${this._toggle}>${this.label}</label>`:""}
|
|
9450
|
-
`}};
|
|
9477
|
+
`}};Vr.styles=[A,P,$k`
|
|
9451
9478
|
:host {
|
|
9452
9479
|
display: inline-flex;
|
|
9453
9480
|
align-items: center;
|
|
@@ -9558,7 +9585,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9558
9585
|
transition: none;
|
|
9559
9586
|
}
|
|
9560
9587
|
}
|
|
9561
|
-
`],a([Qi({type:Boolean,reflect:!0})],
|
|
9588
|
+
`],a([Qi({type:Boolean,reflect:!0})],Vr.prototype,"checked",2),a([Qi({type:Boolean,reflect:!0})],Vr.prototype,"disabled",2),a([Qi({reflect:!0})],Vr.prototype,"size",2),a([Qi()],Vr.prototype,"name",2),a([Qi()],Vr.prototype,"label",2),a([Qi()],Vr.prototype,"locale",2),a([Qi({attribute:!1})],Vr.prototype,"translations",2),a([jk("input")],Vr.prototype,"_input",2),Vr=a([Ak("lui-switch")],Vr);import{css as Pk,html as Da,LitElement as Ok,nothing as jd}from"lit";import{customElement as Hk,property as ri,query as Rk,queryAll as Ik}from"lit/decorators.js";var Ut=class extends Ok{constructor(){super(...arguments);this.source=[];this.value=[];this.direction="horizontal";this.radius="md";this.size="md";this.disabled=!1;this.checkboxProps={};this._explicitAttrs=new Set;this._syncFrame=0;this._onSlottedChange=e=>{if(this.source.length>0)return;let t=e.target;!t||t.tagName.toLowerCase()!=="lui-checkbox"||this._toggle(t.value??"")}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._lightDomObserver=new MutationObserver(()=>this._scheduleSync()),this._lightDomObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","disabled","checked","indeterminate","label","description","slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._lightDomObserver?.disconnect(),this._syncFrame&&cancelAnimationFrame(this._syncFrame)}_isChecked(e){return this.value?.includes(e)??!1}_toggle(e){let t=this.value??[],r=t.includes(e)?t.filter(n=>n!==e):[...t,e];this.value=r,this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0}))}firstUpdated(){this._scheduleSync()}willUpdate(){let e=F(this,"checkboxGroup");!this._explicitAttrs.has("direction")&&typeof e.direction=="string"&&this.direction!==e.direction&&(this.direction=e.direction),!this._explicitAttrs.has("radius")&&typeof e.radius=="string"&&this.radius!==e.radius&&(this.radius=e.radius),!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled)}updated(e){(e.has("value")||e.has("disabled")||e.has("radius")||e.has("size")||e.has("name")||e.has("source")||e.has("checkboxProps"))&&this._scheduleSync()}_scheduleSync(){this._syncFrame&&cancelAnimationFrame(this._syncFrame),this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncSlottedCheckboxes(),this._syncRenderedCheckboxes()})}_getSlottedCheckboxes(){return this._slotEl?this._slotEl.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()==="lui-checkbox"):[]}_mergedCheckboxProps(){return{...F(this,"checkboxGroup").checkboxProps??{},...this.checkboxProps??{}}}_syncRenderedCheckboxes(){if(!this.source.length)return;let e=this._mergedCheckboxProps();for(let t of this._renderedCheckboxes??[])re(t,e)}_syncSlottedCheckboxes(){if(this.source.length>0)return;let e=this._getSlottedCheckboxes();for(let t of e){let r=t.value??"";t.checked=this._isChecked(r),this.disabled?(t.disabled||t.setAttribute("data-lui-checkbox-group-disabled",""),t.disabled=!0):t.hasAttribute("data-lui-checkbox-group-disabled")&&(t.removeAttribute("data-lui-checkbox-group-disabled"),t.disabled=!1),t.radius=this._effectiveRadius(),t.size=this.size,this.name&&(t.name=this.name)}}_effectiveRadius(e){return e||this.radius}_renderOption(e){let t={...this._mergedCheckboxProps(),checked:this._isChecked(e.value),indeterminate:!!(e.indeterminate&&!this._isChecked(e.value)),value:e.value,label:e.label,description:e.description??"",name:this.name??"",radius:this._effectiveRadius(e.radius),size:e.size??this.size,checkedIcon:e.checkedIcon??this.checkboxProps.checkedIcon??"check",indeterminateIcon:e.indeterminateIcon??this.checkboxProps.indeterminateIcon??"minus",disabled:this.disabled||(e.disabled??!1)};return Da`
|
|
9562
9589
|
<lui-checkbox
|
|
9563
9590
|
.checked=${t.checked}
|
|
9564
9591
|
.indeterminate=${t.indeterminate}
|
|
@@ -9741,7 +9768,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9741
9768
|
transition: none;
|
|
9742
9769
|
}
|
|
9743
9770
|
}
|
|
9744
|
-
`],a([Vo({type:Boolean,reflect:!0})],Gt.prototype,"checked",2),a([Vo({type:Boolean,reflect:!0})],Gt.prototype,"disabled",2),a([Vo({reflect:!0})],Gt.prototype,"size",2),a([Vo()],Gt.prototype,"name",2),a([Vo()],Gt.prototype,"value",2),a([Vo()],Gt.prototype,"label",2),a([Vo()],Gt.prototype,"description",2),a([Vo({attribute:"checked-icon"})],Gt.prototype,"checkedIcon",2),a([Vo()],Gt.prototype,"locale",2),a([Vo({attribute:!1})],Gt.prototype,"translations",2),a([Nk("input")],Gt.prototype,"_input",2),Gt=a([Fk("lui-radio")],Gt);import{css as Lk,html as
|
|
9771
|
+
`],a([Vo({type:Boolean,reflect:!0})],Gt.prototype,"checked",2),a([Vo({type:Boolean,reflect:!0})],Gt.prototype,"disabled",2),a([Vo({reflect:!0})],Gt.prototype,"size",2),a([Vo()],Gt.prototype,"name",2),a([Vo()],Gt.prototype,"value",2),a([Vo()],Gt.prototype,"label",2),a([Vo()],Gt.prototype,"description",2),a([Vo({attribute:"checked-icon"})],Gt.prototype,"checkedIcon",2),a([Vo()],Gt.prototype,"locale",2),a([Vo({attribute:!1})],Gt.prototype,"translations",2),a([Nk("input")],Gt.prototype,"_input",2),Gt=a([Fk("lui-radio")],Gt);import{css as Lk,html as _r,LitElement as Bk,nothing as oi}from"lit";import{customElement as qk,property as ir,state as Od}from"lit/decorators.js";var Ye=class extends Bk{constructor(){super(...arguments);this.value=0;this.min=0;this.max=100;this.step=1;this.disabled=!1;this.size="md";this.showValue=!0;this.track="normal";this.marks=!1;this.snapToMarks=!1;this.range=!1;this.rangeValue=[20,80];this.valueLabelDisplay="off";this.valuePrefix="";this.valueSuffix="";this._hovered=!1;this._focusedThumb=null;this._draggingThumb=null;this._onGlobalPointerUp=()=>{this._draggingThumb&&(this._draggingThumb=null)}}connectedCallback(){super.connectedCallback(),window.addEventListener("pointerup",this._onGlobalPointerUp,!0),window.addEventListener("pointercancel",this._onGlobalPointerUp,!0)}disconnectedCallback(){window.removeEventListener("pointerup",this._onGlobalPointerUp,!0),window.removeEventListener("pointercancel",this._onGlobalPointerUp,!0),super.disconnectedCallback()}_trackMode(){return this.track===!1?"none":this.track==="inverted"||this.track==="none"?this.track:"normal"}_toPercent(e){let t=this.max-this.min;if(!Number.isFinite(t)||t<=0)return 0;let r=(e-this.min)/t*100;return Math.max(0,Math.min(100,r))}_decimalPlaces(e){let t=String(e),r=t.indexOf(".");return r===-1?0:t.length-r-1}_resolveMarks(){let e=Math.min(this.min,this.max),t=Math.max(this.min,this.max);if(Array.isArray(this.marks)){let r=[...this.marks].filter(s=>Number.isFinite(s?.value)).map(s=>({value:Number(s.value),label:s.label})).filter(s=>s.value>=e&&s.value<=t).sort((s,d)=>s.value-d.value),n=[];for(let s of r)(!n.length||n[n.length-1].value!==s.value)&&n.push(s);return n}if(this.marks===!0){let r=Number(this.step);if(!Number.isFinite(r)||r<=0)return[];let s=Math.min(500,Math.floor((t-e)/r)),d=this._decimalPlaces(r),h=[];for(let p=0;p<=s;p+=1){let f=Number((e+p*r).toFixed(d));h.push({value:f})}return h[h.length-1]?.value!==t&&h.push({value:t}),h}return[]}_snapToNearestMark(e,t){if(!t.length)return e;let r=t[0].value,n=Math.abs(e-r);for(let s=1;s<t.length;s+=1){let d=t[s].value,h=Math.abs(e-d);h<n&&(n=h,r=d)}return r}_normalizeScalar(e,t){let r=Math.min(this.min,this.max),n=Math.max(this.min,this.max);if(!Number.isFinite(e))return r;let s=Math.max(r,Math.min(n,e));if(this.snapToMarks&&t.length)return s=this._snapToNearestMark(s,t),Math.max(r,Math.min(n,s));if(Number.isFinite(this.step)&&this.step>0){let d=Math.round((s-r)/this.step);s=r+d*this.step,s=Number(s.toFixed(this._decimalPlaces(this.step)))}return Math.max(r,Math.min(n,s))}_normalizeRange(e,t,r,n=null){let s=Math.min(this.min,this.max),d=Math.max(this.min,this.max),h=this._normalizeScalar(e,r),p=this._normalizeScalar(t,r);return n==="start"&&h>p?h=p:n==="end"&&p<h?p=h:h>p&&([h,p]=[p,h]),[Math.max(s,Math.min(d,h)),Math.max(s,Math.min(d,p))]}_resolveRangePair(e){let t=this.rangeValue??[this.min,this.max],r=Array.isArray(this.value)?[Number(this.value[0]),Number(this.value[1])]:[Number(t[0]),Number(t[1])];return this._normalizeRange(r[0],r[1],e)}_formatValue(e){let t=Number.isFinite(e)?e:0,r=Number.isInteger(t)?String(t):String(Number(t.toFixed(Math.max(2,this._decimalPlaces(this.step)))));return`${this.valuePrefix}${r}${this.valueSuffix}`}_formatRange(e,t){return`${this._formatValue(e)} - ${this._formatValue(t)}`}_isMarkActive(e,t,r){let n=this._trackMode(),s=Math.max(Math.abs(this.step||1)/1e3,1e-9);if(r){let[d,h]=r;return n==="none"?Math.abs(e.value-d)<=s||Math.abs(e.value-h)<=s:n==="inverted"?e.value<=d+s||e.value>=h-s:e.value>=d-s&&e.value<=h+s}return n==="none"?Math.abs(e.value-t)<=s:n==="inverted"?e.value>=t-s:e.value<=t+s}_emitInput(e,t){this.dispatchEvent(new CustomEvent("input",{detail:{value:e,range:this.range,activeThumb:t},bubbles:!0,composed:!0}))}_emitChange(e,t){this.dispatchEvent(new CustomEvent("change",{detail:{value:e,range:this.range,activeThumb:t},bubbles:!0,composed:!0}))}render(){let e=this._resolveMarks(),t=this._trackMode(),r=this._normalizeScalar(Number(Array.isArray(this.value)?this.value[0]:this.value),e),[n,s]=this._resolveRangePair(e),d=this._toPercent(r),h=this._toPercent(n),p=this._toPercent(s),f=this.valueLabelDisplay==="on"||this.valueLabelDisplay==="auto"&&(this._hovered||this._focusedThumb!==null||this._draggingThumb!==null),x=this.valueLabelDisplay!=="off",y=this.range&&Math.abs(p-h)<8,C=this.range?(h+p)/2:d,S=E=>{let T=["thumb"];return this._hovered&&!this._draggingThumb&&T.push("hovered"),this._draggingThumb===E?T.push("dragging"):this._focusedThumb===E&&this._draggingThumb!==E&&T.push("focused"),T.join(" ")};return _r`
|
|
9745
9772
|
<div
|
|
9746
9773
|
class=${`slider-shell${e.length?" has-marks":""}${x?" has-label-space":""}`}
|
|
9747
9774
|
@mouseenter=${()=>{this._hovered=!0}}
|
|
@@ -9749,23 +9776,23 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9749
9776
|
>
|
|
9750
9777
|
<div class="rail"></div>
|
|
9751
9778
|
|
|
9752
|
-
${!this.range&&t!=="none"?
|
|
9779
|
+
${!this.range&&t!=="none"?_r`<div class="track" style=${t==="inverted"?`left:${d}%;width:${100-d}%;`:`left:0%;width:${d}%;`}
|
|
9753
9780
|
></div>`:oi}
|
|
9754
9781
|
|
|
9755
|
-
${this.range&&t==="normal"?
|
|
9782
|
+
${this.range&&t==="normal"?_r`<div class="track" style=${`left:${h}%;width:${Math.max(0,p-h)}%;`}></div>`:oi}
|
|
9756
9783
|
|
|
9757
|
-
${this.range&&t==="inverted"?
|
|
9784
|
+
${this.range&&t==="inverted"?_r`
|
|
9758
9785
|
<div class="track" style=${`left:0%;width:${h}%;`}></div>
|
|
9759
9786
|
<div class="track" style=${`left:${p}%;width:${100-p}%;`}></div>
|
|
9760
9787
|
`:oi}
|
|
9761
9788
|
|
|
9762
|
-
${this.range?
|
|
9789
|
+
${this.range?_r`
|
|
9763
9790
|
<div class=${S("start")} style=${`left:${h}%`}></div>
|
|
9764
9791
|
<div class=${S("end")} style=${`left:${p}%`}></div>
|
|
9765
|
-
`:
|
|
9792
|
+
`:_r`<div class=${S("single")} style=${`left:${d}%`}></div>`}
|
|
9766
9793
|
|
|
9767
9794
|
<div class="native-wrap">
|
|
9768
|
-
${this.range?
|
|
9795
|
+
${this.range?_r`
|
|
9769
9796
|
<input
|
|
9770
9797
|
class="native"
|
|
9771
9798
|
style=${`z-index:${this._draggingThumb==="start"||this._focusedThumb==="start"?5:3};clip-path: inset(0 ${Math.max(0,100-C)}% 0 0);`}
|
|
@@ -9798,7 +9825,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9798
9825
|
@input=${E=>{E.stopPropagation();let T=Number(E.target.value),[O,H]=this._normalizeRange(n,T,e,"end"),R=[O,H];this.value=R,this.rangeValue=R,this._emitInput(R,"end")}}
|
|
9799
9826
|
@change=${E=>{E.stopPropagation();let T=Number(E.target.value),[O,H]=this._normalizeRange(n,T,e,"end"),R=[O,H];this.value=R,this.rangeValue=R,this._emitChange(R,"end")}}
|
|
9800
9827
|
/>
|
|
9801
|
-
`:
|
|
9828
|
+
`:_r`<input
|
|
9802
9829
|
class="native"
|
|
9803
9830
|
type="range"
|
|
9804
9831
|
.value=${String(r)}
|
|
@@ -9815,26 +9842,26 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
9815
9842
|
/>`}
|
|
9816
9843
|
</div>
|
|
9817
9844
|
|
|
9818
|
-
${f&&!this.range?
|
|
9845
|
+
${f&&!this.range?_r`<div class="value-label" style=${`left:${d}%`}>${this._formatValue(r)}</div>`:oi}
|
|
9819
9846
|
|
|
9820
|
-
${f&&this.range&&!y?
|
|
9847
|
+
${f&&this.range&&!y?_r`
|
|
9821
9848
|
<div class="value-label" style=${`left:${h}%`}>${this._formatValue(n)}</div>
|
|
9822
9849
|
<div class="value-label" style=${`left:${p}%`}>${this._formatValue(s)}</div>
|
|
9823
9850
|
`:oi}
|
|
9824
9851
|
|
|
9825
|
-
${f&&this.range&&y?
|
|
9852
|
+
${f&&this.range&&y?_r`<div class="value-label" style=${`left:${(h+p)/2}%`}>${this._formatRange(n,s)}</div>`:oi}
|
|
9826
9853
|
|
|
9827
|
-
${e.length?
|
|
9828
|
-
${e.map(E=>{let T=this._toPercent(E.value),O=this.range?this._isMarkActive(E,s,[n,s]):this._isMarkActive(E,r);return
|
|
9854
|
+
${e.length?_r`<div class="marks">
|
|
9855
|
+
${e.map(E=>{let T=this._toPercent(E.value),O=this.range?this._isMarkActive(E,s,[n,s]):this._isMarkActive(E,r);return _r`
|
|
9829
9856
|
<div class=${`mark${O?" active":""}`} style=${`left:${T}%`}>
|
|
9830
9857
|
<span class="mark-dot"></span>
|
|
9831
|
-
${E.label!=null?
|
|
9858
|
+
${E.label!=null?_r`<span class="mark-label">${E.label}</span>`:oi}
|
|
9832
9859
|
</div>
|
|
9833
9860
|
`})}
|
|
9834
9861
|
</div>`:oi}
|
|
9835
9862
|
</div>
|
|
9836
9863
|
|
|
9837
|
-
${this.showValue?
|
|
9864
|
+
${this.showValue?_r`<span class="value">${this.range?this._formatRange(n,s):this._formatValue(r)}</span>`:oi}
|
|
9838
9865
|
`}};Ye.styles=[A,P,Lk`
|
|
9839
9866
|
:host {
|
|
9840
9867
|
--_track-h: 6px;
|
|
@@ -10078,7 +10105,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10078
10105
|
}
|
|
10079
10106
|
:host([size="sm"]) .value { font-size: var(--lui-font-size-xs); }
|
|
10080
10107
|
:host([size="lg"]) .value { font-size: var(--lui-font-size); }
|
|
10081
|
-
`],a([
|
|
10108
|
+
`],a([ir({attribute:!1})],Ye.prototype,"value",2),a([ir({type:Number})],Ye.prototype,"min",2),a([ir({type:Number})],Ye.prototype,"max",2),a([ir({type:Number})],Ye.prototype,"step",2),a([ir({type:Boolean,reflect:!0})],Ye.prototype,"disabled",2),a([ir({reflect:!0})],Ye.prototype,"size",2),a([ir()],Ye.prototype,"name",2),a([ir({type:Boolean})],Ye.prototype,"showValue",2),a([ir()],Ye.prototype,"track",2),a([ir({attribute:!1})],Ye.prototype,"marks",2),a([ir({type:Boolean,attribute:"snap-to-marks"})],Ye.prototype,"snapToMarks",2),a([ir({type:Boolean,reflect:!0})],Ye.prototype,"range",2),a([ir({attribute:!1})],Ye.prototype,"rangeValue",2),a([ir({attribute:"value-label-display"})],Ye.prototype,"valueLabelDisplay",2),a([ir()],Ye.prototype,"valuePrefix",2),a([ir()],Ye.prototype,"valueSuffix",2),a([Od()],Ye.prototype,"_hovered",2),a([Od()],Ye.prototype,"_focusedThumb",2),a([Od()],Ye.prototype,"_draggingThumb",2),Ye=a([qk("lui-slider")],Ye);import{css as Kk,html as ul,LitElement as Wk,nothing as Uk}from"lit";import{customElement as Gk,property as Ji}from"lit/decorators.js";var Wr=class extends Wk{constructor(){super(...arguments);this.disabled=!1;this.size="md";this.multiple=!1;this.files=[];this.placeholder="\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20"}render(){let e=this.files.length>0,t=["dropzone"];return this.disabled&&t.push("disabled"),e&&t.push("has-files"),ul`
|
|
10082
10109
|
<div
|
|
10083
10110
|
class=${t.join(" ")}
|
|
10084
10111
|
@click=${()=>!this.disabled&&this._inputEl?.click()}
|
|
@@ -10195,7 +10222,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10195
10222
|
input[type="file"] {
|
|
10196
10223
|
display: none;
|
|
10197
10224
|
}
|
|
10198
|
-
`],a([Ji({type:Boolean,reflect:!0})],Wr.prototype,"disabled",2),a([Ji({reflect:!0})],Wr.prototype,"size",2),a([Ji()],Wr.prototype,"accept",2),a([Ji({type:Boolean})],Wr.prototype,"multiple",2),a([Ji()],Wr.prototype,"name",2),a([Ji({attribute:!1})],Wr.prototype,"files",2),a([Ji()],Wr.prototype,"placeholder",2),Wr=a([Gk("lui-file-input")],Wr);import{css as Yk,html as Fa,LitElement as Xk}from"lit";import{customElement as Zk,property as ii,queryAll as Qk}from"lit/decorators.js";var
|
|
10225
|
+
`],a([Ji({type:Boolean,reflect:!0})],Wr.prototype,"disabled",2),a([Ji({reflect:!0})],Wr.prototype,"size",2),a([Ji()],Wr.prototype,"accept",2),a([Ji({type:Boolean})],Wr.prototype,"multiple",2),a([Ji()],Wr.prototype,"name",2),a([Ji({attribute:!1})],Wr.prototype,"files",2),a([Ji()],Wr.prototype,"placeholder",2),Wr=a([Gk("lui-file-input")],Wr);import{css as Yk,html as Fa,LitElement as Xk}from"lit";import{customElement as Zk,property as ii,queryAll as Qk}from"lit/decorators.js";var nr=class extends Xk{constructor(){super(...arguments);this.value="";this.length=6;this.size="md";this.disabled=!1;this.readonly=!1;this.invalid=!1;this.type="number";this.format=""}focus(){this._cells?.[0]?.focus()}blur(){this._cells?.forEach(e=>e.blur())}_charCount(){return this.format?(this.format.match(/#/g)||[]).length:this.length}_chars(){let e=this._charCount(),t=this.value||"",r=[];for(let n=0;n<e;n++)r.push(n<t.length?t[n]:"");return r}_emit(){this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}));let e=this._charCount();this.value.length===e&&this.dispatchEvent(new CustomEvent("complete",{detail:{value:this.value},bubbles:!0,composed:!0}))}_onInput(e,t){e.stopPropagation();let r=e.target,n=r.value;if(this.type==="number"&&n&&!/^\d$/.test(n)){r.value="";return}let s=this._chars();if(n.length>1){let d=n[n.length-1];s[t]=d,r.value=d}else s[t]=n;this.value=s.join(""),n&&t<this._charCount()-1&&this._cells[t+1]?.focus(),this._emit()}_onKeyDown(e,t){if(this.readonly)return;let r=e.target,n=this._charCount();if(e.key==="Backspace"&&!r.value&&t>0){let s=this._cells[t-1];s.focus(),s.value="";let d=this._chars();d[t-1]="",this.value=d.join(""),this._emit()}else if(e.key==="ArrowLeft"&&t>0)this._cells[t-1]?.focus();else if(e.key==="ArrowRight"&&t<n-1)this._cells[t+1]?.focus();else if(e.key==="Delete"){let s=this._chars();s[t]="",this.value=s.join(""),this._emit()}}_onFocus(e){if(this.readonly)return;e.target.select()}_onPaste(e,t){if(e.preventDefault(),this.disabled||this.readonly)return;let r=e.clipboardData?.getData("text")?.trim()??"";if(!r)return;let n=this.type==="number"?r.replace(/\D/g,""):r;if(!n)return;let s=this._chars(),d=this._charCount();for(let p=0;p<n.length&&t+p<d;p++)s[t+p]=n[p];this.value=s.join("");let h=Math.min(t+n.length,d-1);this._cells[h]?.focus(),this._emit()}render(){let e=this._chars();if(this.format){let t=0,r=[];for(let n=0;n<this.format.length;n++)if(this.format[n]==="#"){let s=t,d=e[s];r.push(Fa`
|
|
10199
10226
|
<input
|
|
10200
10227
|
class=${`otp-cell${d?" filled":""}${this.invalid?" invalid":""}`}
|
|
10201
10228
|
.value=${d}
|
|
@@ -10225,7 +10252,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10225
10252
|
/>
|
|
10226
10253
|
`)}
|
|
10227
10254
|
</div>
|
|
10228
|
-
`}};
|
|
10255
|
+
`}};nr.styles=[A,P,Yk`
|
|
10229
10256
|
:host {
|
|
10230
10257
|
display: inline-flex;
|
|
10231
10258
|
}
|
|
@@ -10307,7 +10334,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10307
10334
|
:host([size="lg"]) .separator {
|
|
10308
10335
|
font-size: var(--lui-font-size-xl);
|
|
10309
10336
|
}
|
|
10310
|
-
`],a([ii()],
|
|
10337
|
+
`],a([ii()],nr.prototype,"value",2),a([ii({type:Number})],nr.prototype,"length",2),a([ii({reflect:!0})],nr.prototype,"size",2),a([ii({type:Boolean})],nr.prototype,"disabled",2),a([ii({type:Boolean})],nr.prototype,"readonly",2),a([ii({type:Boolean,reflect:!0})],nr.prototype,"invalid",2),a([ii()],nr.prototype,"type",2),a([ii()],nr.prototype,"name",2),a([ii()],nr.prototype,"format",2),a([Qk(".otp-cell")],nr.prototype,"_cells",2),nr=a([Zk("lui-input-opt")],nr);import{css as Jk,html as Do,LitElement as ey}from"lit";import{customElement as ty,property as Mr}from"lit/decorators.js";var bt=class extends ey{constructor(){super(...arguments);this.placeholder="";this.size="md";this.controls="split";this.disabled=!1;this.readonly=!1;this.invalid=!1;this.noborder=!1;this.step=1;this.prefix="";this.suffix="";this._focused=!1;this._explicitAttrs=new Set;this._draftValue=null;this._onWheel=e=>{!this._focused||this.disabled||this.readonly||e.deltaY!==0&&(e.preventDefault(),this._stepBy(e.deltaY<0?this.step:-this.step))}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames())}willUpdate(){let e=F(this,"inputNumber");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("controls")&&typeof e.controls=="string"&&this.controls!==e.controls&&(this.controls=e.controls),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("noborder")&&typeof e.noborder=="boolean"&&this.noborder!==e.noborder&&(this.noborder=e.noborder),!this._explicitAttrs.has("placeholder")&&typeof e.placeholder=="string"&&!this.placeholder&&(this.placeholder=e.placeholder)}focus(){this.shadowRoot?.querySelector("input")?.focus()}_clamp(e){if(this.precision!=null){let t=Math.pow(10,this.precision);e=Math.round(e*t)/t}return this.min!=null&&e<this.min&&(e=this.min),this.max!=null&&e>this.max&&(e=this.max),e}_canDec(){return this.disabled||this.readonly?!1:this.min==null?!0:(this.value??0)-this.step>=this.min}_canInc(){return this.disabled||this.readonly?!1:this.max==null?!0:(this.value??0)+this.step<=this.max}_emit(e){this.value=e,this._focused&&(this._draftValue=e!=null?String(e):""),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}_stepBy(e){let t=this.value??0;this._emit(this._clamp(t+e))}_onInput(e){e.stopPropagation();let r=e.target.value.trim();if(this._draftValue=r,r===""||r==="-"||r==="."||r==="-."){this._emit(void 0);return}let n=Number(r);isNaN(n)||(this.value=this._clamp(n),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))),this.requestUpdate()}_onBlur(e){this._focused=!1;let t=e.target,r=t.value.trim();if(r===""||r==="-"||r==="."||r==="-.")this.value=void 0;else{let n=Number(r);isNaN(n)||(this.value=this._clamp(n))}this._draftValue=null,this.value!=null?t.value=String(this.value):t.value="",this.requestUpdate()}render(){let e=["wrapper"];this._focused&&e.push("focused"),this.disabled&&e.push("disabled"),this.invalid&&e.push("invalid");let t=this._focused&&this._draftValue!=null?this._draftValue:this.value!=null?String(this.value):"",r=Do`
|
|
10311
10338
|
<input
|
|
10312
10339
|
part="input"
|
|
10313
10340
|
.value=${t}
|
|
@@ -10536,7 +10563,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10536
10563
|
:host([size="lg"][controls="stacked"]) input {
|
|
10537
10564
|
padding-inline: 14px 10px;
|
|
10538
10565
|
}
|
|
10539
|
-
`],a([
|
|
10566
|
+
`],a([Mr({type:Number})],bt.prototype,"value",2),a([Mr()],bt.prototype,"placeholder",2),a([Mr({reflect:!0})],bt.prototype,"size",2),a([Mr({reflect:!0})],bt.prototype,"controls",2),a([Mr({type:Boolean})],bt.prototype,"disabled",2),a([Mr({type:Boolean})],bt.prototype,"readonly",2),a([Mr({type:Boolean,reflect:!0})],bt.prototype,"invalid",2),a([Mr({type:Boolean,reflect:!0})],bt.prototype,"noborder",2),a([Mr({type:Number})],bt.prototype,"min",2),a([Mr({type:Number})],bt.prototype,"max",2),a([Mr({type:Number})],bt.prototype,"step",2),a([Mr({type:Number})],bt.prototype,"precision",2),a([Mr()],bt.prototype,"prefix",2),a([Mr()],bt.prototype,"suffix",2),a([Mr()],bt.prototype,"name",2),bt=a([ty("lui-input-number")],bt);import{css as oy,html as Hd,LitElement as iy}from"lit";import{customElement as ny,property as Cr,query as K1}from"lit/decorators.js";import ay from"flatpickr";import{Mandarin as sy}from"flatpickr/dist/l10n/zh.js";import"flatpickr/dist/flatpickr.min.css";var se='[theme="dark"], [theme="vscode-dark"]',le=".flatpickr-calendar.lui-datepicker-calendar",ry=`
|
|
10540
10567
|
:is(${se}) ${le} {
|
|
10541
10568
|
background: var(--lui-color-bg-elevated, #252526);
|
|
10542
10569
|
color: var(--lui-color-fg, #d4d4d4);
|
|
@@ -10678,7 +10705,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10678
10705
|
<lui-icon name="chevron-down"></lui-icon>
|
|
10679
10706
|
</button>
|
|
10680
10707
|
</div>
|
|
10681
|
-
`}};it.styles=[A,P,
|
|
10708
|
+
`}};it.styles=[A,P,jr,oy`
|
|
10682
10709
|
:host {
|
|
10683
10710
|
display: inline-flex;
|
|
10684
10711
|
width: 100%;
|
|
@@ -10689,7 +10716,10 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10689
10716
|
.wrapper {
|
|
10690
10717
|
min-height: var(--lui-input-height, var(--lui-control-height, 38px));
|
|
10691
10718
|
}
|
|
10692
|
-
|
|
10719
|
+
/* :not(.focused) mirrors lui-input: this selector outranks .focused below,
|
|
10720
|
+
* so without the exclusion a hovered focused field flipped to the gray
|
|
10721
|
+
* hover border under the blue focus ring. */
|
|
10722
|
+
.wrapper:hover:not(.disabled):not(.focused) {
|
|
10693
10723
|
border-color: var(--lui-color-border-strong);
|
|
10694
10724
|
}
|
|
10695
10725
|
.wrapper.focused {
|
|
@@ -10757,7 +10787,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10757
10787
|
--lui-input-height: var(--lui-control-height-lg, 44px);
|
|
10758
10788
|
--lui-input-font-size: var(--lui-font-size);
|
|
10759
10789
|
}
|
|
10760
|
-
`],a([Mr()],it.prototype,"value",2),a([Mr({attribute:"selection-mode"})],it.prototype,"selectionMode",2),a([Mr()],it.prototype,"placeholder",2),a([Mr({reflect:!0})],it.prototype,"size",2),a([Mr()],it.prototype,"mode",2),a([Mr({attribute:"type"})],it.prototype,"type",2),a([Mr({type:Boolean})],it.prototype,"disabled",2),a([Mr({type:Boolean})],it.prototype,"readonly",2),a([Mr({type:Boolean,reflect:!0})],it.prototype,"invalid",2),a([Mr({type:Boolean})],it.prototype,"clearable",2),a([Mr()],it.prototype,"min",2),a([Mr()],it.prototype,"max",2),a([Mr()],it.prototype,"name",2),a([Mr()],it.prototype,"locale",2),a([Mr({attribute:!1})],it.prototype,"translations",2),a([K1(".input")],it.prototype,"_inputEl",2),a([K1(".wrapper")],it.prototype,"_wrapperEl",2),it=a([ny("lui-datepicker")],it);import{css as ly,html as en,LitElement as cy,nothing as hl}from"lit";import{customElement as dy,property as Yt,query as W1,state as uy}from"lit/decorators.js";var hy=["#111827","#6b7280","#ef4444","#f97316","#f59e0b","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899"],Ve=(i,o,e)=>Math.min(e,Math.max(o,i)),Co=(i,o=0)=>{let e=10**o;return Math.round(i*e)/e},pl=i=>Ve(Math.round(i),0,255).toString(16).padStart(2,"0"),Ba=i=>(i%360+360)%360;function py(i){let o=Ba(i.h),e=Ve(i.s,0,100)/100,t=Ve(i.v,0,100)/100,r=t*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Ve(i.a,0,1)}}function Na(i){let o=Ve(i.r,0,255)/255,e=Ve(i.g,0,255)/255,t=Ve(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=0;return s!==0&&(r===o?d=60*((e-t)/s%6):r===e?d=60*((t-o)/s+2):d=60*((o-e)/s+4)),{h:Ba(d),s:r===0?0:s/r*100,v:r*100,a:Ve(i.a,0,1)}}function my(i){let o=Ve(i.r,0,255)/255,e=Ve(i.g,0,255)/255,t=Ve(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=(r+n)/2,h=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*d-1)),r===o?h=60*((e-t)/s%6):r===e?h=60*((t-o)/s+2):h=60*((o-e)/s+4)),{h:Ba(h),s:p*100,l:d*100,a:Ve(i.a,0,1)}}function U1(i){let o=Ba(i.h),e=Ve(i.s,0,100)/100,t=Ve(i.l,0,100)/100,r=(1-Math.abs(2*t-1))*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r/2,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Ve(i.a,0,1)}}function Ln(i,o=i.a<1){let e=`#${pl(i.r)}${pl(i.g)}${pl(i.b)}`;return o?`${e}${pl(i.a*255)}`:e}function gy(i){let o=i.trim().replace(/^#/,"");if(![3,4,6,8].includes(o.length)||/[^0-9a-f]/i.test(o))return null;let e=o.length<=4?o.split("").map(d=>d+d).join(""):o,t=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),s=e.length===8?parseInt(e.slice(6,8),16)/255:1;return{r:t,g:r,b:n,a:s}}function La(i){let o=i.trim();if(!o)return null;if(o.startsWith("#")||/^[0-9a-f]{3,8}$/i.test(o))return gy(o);let e=o.match(/^rgba?\((.+)\)$/i);if(e){let r=e[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1]),d=Number.parseFloat(r[2]),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return{r:Ve(n,0,255),g:Ve(s,0,255),b:Ve(d,0,255),a:Ve(h,0,1)}}}let t=o.match(/^hsla?\((.+)\)$/i);if(t){let r=t[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1].replace("%","")),d=Number.parseFloat(r[2].replace("%","")),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return U1({h:n,s,l:d,a:h})}}return null}var Be=class extends cy{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u989C\u8272";this.size="md";this.format="hex";this.open=!1;this.disabled=!1;this.readonly=!1;this.invalid=!1;this.clearable=!0;this.backdrop="none";this.backdropStyle="";this.closeOnOutsidePress=!0;this.showAlpha=!0;this.placement="bottom-start";this.presetColors=hy.join(",");this._hsv={h:217,s:76,v:96,a:1};this._internalValueUpdate=!1;this._explicitAttrs=new Set;this._onOpen=()=>{this.open=!0};this._onClose=()=>{this.open=!1,this._emitChange()};this._clear=e=>{if(e.preventDefault(),e.stopPropagation(),this.disabled||this.readonly)return;this.value="";let t=this._detail();this.dispatchEvent(new CustomEvent("input",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{...t,value:""},bubbles:!0,composed:!0}))};this._onSvPointerDown=e=>{this.disabled||this.readonly||(e.preventDefault(),this._svEl?.setPointerCapture?.(e.pointerId),this._updateSv(e))};this._onSvPointerMove=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&this._updateSv(e)};this._onSvPointerUp=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&(this._svEl.releasePointerCapture(e.pointerId),this._emitChange())};this._onHueInput=e=>{let t=Number(e.target.value);this._commit({...this._hsv,h:t},"input")};this._onAlphaInput=e=>{let t=Number(e.target.value)/100;this._commit({...this._hsv,a:t},"input")};this._onRangeChange=()=>this._emitChange();this._onHexChange=e=>{let t=e.target,r=La(t.value);if(!r){t.value=this._hex;return}this._commit(Na(r),"input"),this._emitChange()};this._onRgbChange=(e,t)=>{let n={...this._rgb,[e]:Ve(Number(t.target.value)||0,0,255)};this._commit(Na(n),"input"),this._emitChange()};this._onHslChange=(e,t)=>{let r=this._hsl,n=e==="h"?360:100,s={...r,[e]:Ve(Number(t.target.value)||0,0,n)};this._commit(Na(U1(s)),"input"),this._emitChange()};this._onAlphaFieldChange=e=>{let t=Ve(Number(e.target.value)||0,0,100)/100;this._commit({...this._hsv,a:t},"input"),this._emitChange()};this._choosePreset=e=>{if(this.disabled||this.readonly)return;let t=La(e);t&&(this._commit(Na(t),"input"),this._emitChange())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._syncFromValue(this.value)}willUpdate(){let e=F(this,"colorPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("format")&&typeof e.format=="string"&&this.format!==e.format&&(this.format=e.format),!this._explicitAttrs.has("show-alpha")&&typeof e.showAlpha=="boolean"&&this.showAlpha!==e.showAlpha&&(this.showAlpha=e.showAlpha),!this._explicitAttrs.has("backdrop")&&typeof e.backdrop=="string"&&this.backdrop!==e.backdrop&&(this.backdrop=e.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof e.backdropStyle=="string"&&this.backdropStyle!==e.backdropStyle&&(this.backdropStyle=e.backdropStyle),!this._explicitAttrs.has("close-on-outside-press")&&typeof e.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==e.closeOnOutsidePress&&(this.closeOnOutsidePress=e.closeOnOutsidePress)}updated(e){e.has("value")&&(this._internalValueUpdate||this._syncFromValue(this.value),this._internalValueUpdate=!1)}focus(){this.shadowRoot?.querySelector(".trigger")?.focus()}blur(){this.shadowRoot?.querySelector(".trigger")?.blur()}show(){this.disabled||this.readonly||this._dropdown?.show()}hide(){this._dropdown?.hide()}toggle(){this.disabled||this.readonly||this._dropdown?.toggle()}get _rgb(){return py(this._effectiveHsv())}get _hsl(){return my(this._rgb)}get _hex(){return Ln(this._rgb,!1)}get _displayValue(){return this.value?this._formatValue():""}_effectiveHsv(){return{...this._hsv,a:this.showAlpha?Ve(this._hsv.a,0,1):1}}_syncFromValue(e){let t=La(e);t&&(this._hsv=Na({...t,a:this.showAlpha?t.a:1}))}_formatValue(e=this.format){let t=this._rgb,r=this._hsl,n=this.showAlpha?t.a:1;switch(e){case"rgb":return`rgb(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)})`;case"rgba":return`rgba(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)}, ${Co(n,2)})`;case"hsl":return`hsl(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%)`;case"hsla":return`hsla(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%, ${Co(n,2)})`;case"hex":default:return Ln({...t,a:n},this.showAlpha&&n<1)}}_detail(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv();return{value:this._formatValue(),hex:Ln(e,this.showAlpha&&e.a<1),rgb:{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b),a:Co(e.a,3)},hsl:{h:Math.round(t.h),s:Math.round(t.s),l:Math.round(t.l),a:Co(t.a,3)},hsv:{h:Math.round(r.h),s:Math.round(r.s),v:Math.round(r.v),a:Co(r.a,3)},alpha:Co(e.a,3)}}_commit(e,t="input"){this._hsv={h:Ba(e.h),s:Ve(e.s,0,100),v:Ve(e.v,0,100),a:this.showAlpha?Ve(e.a,0,1):1};let r=this._detail();this._internalValueUpdate=!0,this.value=r.value,this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:this._detail(),bubbles:!0,composed:!0}))}_updateSv(e){let t=this._svEl?.getBoundingClientRect();if(!t)return;let r=Ve((e.clientX-t.left)/t.width*100,0,100),n=Ve(100-(e.clientY-t.top)/t.height*100,0,100);this._commit({...this._hsv,s:r,v:n},"input")}async _copyValue(){let e=this._detail();try{await navigator.clipboard?.writeText(e.value),this.dispatchEvent(new CustomEvent("copy",{detail:e,bubbles:!0,composed:!0}))}catch{this.dispatchEvent(new CustomEvent("copy",{detail:{...e,error:!0},bubbles:!0,composed:!0}))}}_presetList(){return(this.swatches??this.presetColors.split(",")).map(t=>t.trim()).filter(Boolean).filter(t=>La(t))}_panel(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv(),n=this.value?`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${Co(e.a,3)})`:"transparent",s=`rgb(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)})`,d=`--hue:${Co(r.h,2)};--sat:${Co(r.s,2)}%;--val-y:${Co(100-r.v,2)}%;--current-color:${n};--opaque-color:${s};`,h=this._presetList(),p=Ln(e,!1).toLowerCase();return en`
|
|
10790
|
+
`],a([Cr()],it.prototype,"value",2),a([Cr({attribute:"selection-mode"})],it.prototype,"selectionMode",2),a([Cr()],it.prototype,"placeholder",2),a([Cr({reflect:!0})],it.prototype,"size",2),a([Cr()],it.prototype,"mode",2),a([Cr({attribute:"type"})],it.prototype,"type",2),a([Cr({type:Boolean})],it.prototype,"disabled",2),a([Cr({type:Boolean})],it.prototype,"readonly",2),a([Cr({type:Boolean,reflect:!0})],it.prototype,"invalid",2),a([Cr({type:Boolean})],it.prototype,"clearable",2),a([Cr()],it.prototype,"min",2),a([Cr()],it.prototype,"max",2),a([Cr()],it.prototype,"name",2),a([Cr()],it.prototype,"locale",2),a([Cr({attribute:!1})],it.prototype,"translations",2),a([K1(".input")],it.prototype,"_inputEl",2),a([K1(".wrapper")],it.prototype,"_wrapperEl",2),it=a([ny("lui-datepicker")],it);import{css as ly,html as en,LitElement as cy,nothing as hl}from"lit";import{customElement as dy,property as Yt,query as W1,state as uy}from"lit/decorators.js";var hy=["#111827","#6b7280","#ef4444","#f97316","#f59e0b","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899"],Ve=(i,o,e)=>Math.min(e,Math.max(o,i)),Co=(i,o=0)=>{let e=10**o;return Math.round(i*e)/e},pl=i=>Ve(Math.round(i),0,255).toString(16).padStart(2,"0"),Ba=i=>(i%360+360)%360;function py(i){let o=Ba(i.h),e=Ve(i.s,0,100)/100,t=Ve(i.v,0,100)/100,r=t*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Ve(i.a,0,1)}}function Na(i){let o=Ve(i.r,0,255)/255,e=Ve(i.g,0,255)/255,t=Ve(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=0;return s!==0&&(r===o?d=60*((e-t)/s%6):r===e?d=60*((t-o)/s+2):d=60*((o-e)/s+4)),{h:Ba(d),s:r===0?0:s/r*100,v:r*100,a:Ve(i.a,0,1)}}function my(i){let o=Ve(i.r,0,255)/255,e=Ve(i.g,0,255)/255,t=Ve(i.b,0,255)/255,r=Math.max(o,e,t),n=Math.min(o,e,t),s=r-n,d=(r+n)/2,h=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*d-1)),r===o?h=60*((e-t)/s%6):r===e?h=60*((t-o)/s+2):h=60*((o-e)/s+4)),{h:Ba(h),s:p*100,l:d*100,a:Ve(i.a,0,1)}}function U1(i){let o=Ba(i.h),e=Ve(i.s,0,100)/100,t=Ve(i.l,0,100)/100,r=(1-Math.abs(2*t-1))*e,n=r*(1-Math.abs(o/60%2-1)),s=t-r/2,d=0,h=0,p=0;return o<60?[d,h,p]=[r,n,0]:o<120?[d,h,p]=[n,r,0]:o<180?[d,h,p]=[0,r,n]:o<240?[d,h,p]=[0,n,r]:o<300?[d,h,p]=[n,0,r]:[d,h,p]=[r,0,n],{r:Math.round((d+s)*255),g:Math.round((h+s)*255),b:Math.round((p+s)*255),a:Ve(i.a,0,1)}}function Ln(i,o=i.a<1){let e=`#${pl(i.r)}${pl(i.g)}${pl(i.b)}`;return o?`${e}${pl(i.a*255)}`:e}function gy(i){let o=i.trim().replace(/^#/,"");if(![3,4,6,8].includes(o.length)||/[^0-9a-f]/i.test(o))return null;let e=o.length<=4?o.split("").map(d=>d+d).join(""):o,t=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),s=e.length===8?parseInt(e.slice(6,8),16)/255:1;return{r:t,g:r,b:n,a:s}}function La(i){let o=i.trim();if(!o)return null;if(o.startsWith("#")||/^[0-9a-f]{3,8}$/i.test(o))return gy(o);let e=o.match(/^rgba?\((.+)\)$/i);if(e){let r=e[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1]),d=Number.parseFloat(r[2]),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return{r:Ve(n,0,255),g:Ve(s,0,255),b:Ve(d,0,255),a:Ve(h,0,1)}}}let t=o.match(/^hsla?\((.+)\)$/i);if(t){let r=t[1].split(/[,/\s]+/).filter(Boolean);if(r.length>=3){let n=Number.parseFloat(r[0]),s=Number.parseFloat(r[1].replace("%","")),d=Number.parseFloat(r[2].replace("%","")),h=r[3]==null?1:Number.parseFloat(r[3].replace("%",""))/(r[3].includes("%")?100:1);if([n,s,d,h].every(Number.isFinite))return U1({h:n,s,l:d,a:h})}}return null}var Be=class extends cy{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u989C\u8272";this.size="md";this.format="hex";this.open=!1;this.disabled=!1;this.readonly=!1;this.invalid=!1;this.clearable=!0;this.backdrop="none";this.backdropStyle="";this.closeOnOutsidePress=!0;this.showAlpha=!0;this.placement="bottom-start";this.presetColors=hy.join(",");this._hsv={h:217,s:76,v:96,a:1};this._internalValueUpdate=!1;this._explicitAttrs=new Set;this._onOpen=()=>{this.open=!0};this._onClose=()=>{this.open=!1,this._emitChange()};this._clear=e=>{if(e.preventDefault(),e.stopPropagation(),this.disabled||this.readonly)return;this.value="";let t=this._detail();this.dispatchEvent(new CustomEvent("input",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{...t,value:""},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("clear",{detail:{...t,value:""},bubbles:!0,composed:!0}))};this._onSvPointerDown=e=>{this.disabled||this.readonly||(e.preventDefault(),this._svEl?.setPointerCapture?.(e.pointerId),this._updateSv(e))};this._onSvPointerMove=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&this._updateSv(e)};this._onSvPointerUp=e=>{this._svEl?.hasPointerCapture?.(e.pointerId)&&(this._svEl.releasePointerCapture(e.pointerId),this._emitChange())};this._onHueInput=e=>{let t=Number(e.target.value);this._commit({...this._hsv,h:t},"input")};this._onAlphaInput=e=>{let t=Number(e.target.value)/100;this._commit({...this._hsv,a:t},"input")};this._onRangeChange=()=>this._emitChange();this._onHexChange=e=>{let t=e.target,r=La(t.value);if(!r){t.value=this._hex;return}this._commit(Na(r),"input"),this._emitChange()};this._onRgbChange=(e,t)=>{let n={...this._rgb,[e]:Ve(Number(t.target.value)||0,0,255)};this._commit(Na(n),"input"),this._emitChange()};this._onHslChange=(e,t)=>{let r=this._hsl,n=e==="h"?360:100,s={...r,[e]:Ve(Number(t.target.value)||0,0,n)};this._commit(Na(U1(s)),"input"),this._emitChange()};this._onAlphaFieldChange=e=>{let t=Ve(Number(e.target.value)||0,0,100)/100;this._commit({...this._hsv,a:t},"input"),this._emitChange()};this._choosePreset=e=>{if(this.disabled||this.readonly)return;let t=La(e);t&&(this._commit(Na(t),"input"),this._emitChange())}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._syncFromValue(this.value)}willUpdate(){let e=F(this,"colorPicker");!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled),!this._explicitAttrs.has("format")&&typeof e.format=="string"&&this.format!==e.format&&(this.format=e.format),!this._explicitAttrs.has("show-alpha")&&typeof e.showAlpha=="boolean"&&this.showAlpha!==e.showAlpha&&(this.showAlpha=e.showAlpha),!this._explicitAttrs.has("backdrop")&&typeof e.backdrop=="string"&&this.backdrop!==e.backdrop&&(this.backdrop=e.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof e.backdropStyle=="string"&&this.backdropStyle!==e.backdropStyle&&(this.backdropStyle=e.backdropStyle),!this._explicitAttrs.has("close-on-outside-press")&&typeof e.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==e.closeOnOutsidePress&&(this.closeOnOutsidePress=e.closeOnOutsidePress)}updated(e){e.has("value")&&(this._internalValueUpdate||this._syncFromValue(this.value),this._internalValueUpdate=!1)}focus(){this.shadowRoot?.querySelector(".trigger")?.focus()}blur(){this.shadowRoot?.querySelector(".trigger")?.blur()}show(){this.disabled||this.readonly||this._dropdown?.show()}hide(){this._dropdown?.hide()}toggle(){this.disabled||this.readonly||this._dropdown?.toggle()}get _rgb(){return py(this._effectiveHsv())}get _hsl(){return my(this._rgb)}get _hex(){return Ln(this._rgb,!1)}get _displayValue(){return this.value?this._formatValue():""}_effectiveHsv(){return{...this._hsv,a:this.showAlpha?Ve(this._hsv.a,0,1):1}}_syncFromValue(e){let t=La(e);t&&(this._hsv=Na({...t,a:this.showAlpha?t.a:1}))}_formatValue(e=this.format){let t=this._rgb,r=this._hsl,n=this.showAlpha?t.a:1;switch(e){case"rgb":return`rgb(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)})`;case"rgba":return`rgba(${Math.round(t.r)}, ${Math.round(t.g)}, ${Math.round(t.b)}, ${Co(n,2)})`;case"hsl":return`hsl(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%)`;case"hsla":return`hsla(${Math.round(r.h)}, ${Math.round(r.s)}%, ${Math.round(r.l)}%, ${Co(n,2)})`;case"hex":default:return Ln({...t,a:n},this.showAlpha&&n<1)}}_detail(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv();return{value:this._formatValue(),hex:Ln(e,this.showAlpha&&e.a<1),rgb:{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b),a:Co(e.a,3)},hsl:{h:Math.round(t.h),s:Math.round(t.s),l:Math.round(t.l),a:Co(t.a,3)},hsv:{h:Math.round(r.h),s:Math.round(r.s),v:Math.round(r.v),a:Co(r.a,3)},alpha:Co(e.a,3)}}_commit(e,t="input"){this._hsv={h:Ba(e.h),s:Ve(e.s,0,100),v:Ve(e.v,0,100),a:this.showAlpha?Ve(e.a,0,1):1};let r=this._detail();this._internalValueUpdate=!0,this.value=r.value,this.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0}))}_emitChange(){this.dispatchEvent(new CustomEvent("change",{detail:this._detail(),bubbles:!0,composed:!0}))}_updateSv(e){let t=this._svEl?.getBoundingClientRect();if(!t)return;let r=Ve((e.clientX-t.left)/t.width*100,0,100),n=Ve(100-(e.clientY-t.top)/t.height*100,0,100);this._commit({...this._hsv,s:r,v:n},"input")}async _copyValue(){let e=this._detail();try{await navigator.clipboard?.writeText(e.value),this.dispatchEvent(new CustomEvent("copy",{detail:e,bubbles:!0,composed:!0}))}catch{this.dispatchEvent(new CustomEvent("copy",{detail:{...e,error:!0},bubbles:!0,composed:!0}))}}_presetList(){return(this.swatches??this.presetColors.split(",")).map(t=>t.trim()).filter(Boolean).filter(t=>La(t))}_panel(){let e=this._rgb,t=this._hsl,r=this._effectiveHsv(),n=this.value?`rgba(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)}, ${Co(e.a,3)})`:"transparent",s=`rgb(${Math.round(e.r)}, ${Math.round(e.g)}, ${Math.round(e.b)})`,d=`--hue:${Co(r.h,2)};--sat:${Co(r.s,2)}%;--val-y:${Co(100-r.v,2)}%;--current-color:${n};--opaque-color:${s};`,h=this._presetList(),p=Ln(e,!1).toLowerCase();return en`
|
|
10761
10791
|
<div class="panel" part="panel" style=${d} @click=${f=>f.stopPropagation()}>
|
|
10762
10792
|
<div class="hero">
|
|
10763
10793
|
<div class="preview" part="preview"><div class="preview-inner"></div></div>
|
|
@@ -10888,7 +10918,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
10888
10918
|
${this._panel()}
|
|
10889
10919
|
</lui-dropdown>
|
|
10890
10920
|
${this.name?en`<input type="hidden" name=${this.name} .value=${this.value} />`:hl}
|
|
10891
|
-
`}};Be.styles=[A,P,
|
|
10921
|
+
`}};Be.styles=[A,P,jr,ly`
|
|
10892
10922
|
:host {
|
|
10893
10923
|
display: inline-block;
|
|
10894
10924
|
width: 100%;
|
|
@@ -11946,7 +11976,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
11946
11976
|
color: var(--lui-color-fg-muted);
|
|
11947
11977
|
margin-top: 2px;
|
|
11948
11978
|
}
|
|
11949
|
-
`],kt.FORM_KEYS=new Set(["name","type","label","required","disabled","readonly","hidden","condition","span","xs","sm","md","lg","xl","offset","order","validators","fields","size","labelPlacement","labelWidth","defaultValue","description","min","max","step","length","source","renderControl","renderField","props","addLabel","removeLabel","itemLabel","minItems","maxItems","collapsible","defaultCollapsed","draggable","hiddenLabel","help","tooltip","extra","validateTrigger","onClick"]),kt._elEvents=new WeakMap,a([qa({attribute:!1})],kt.prototype,"schema",2),a([qa({type:Boolean,attribute:"show-actions"})],kt.prototype,"showActions",2),a([qa({reflect:!0})],kt.prototype,"size",2),a([qa({reflect:!0,attribute:"label-placement"})],kt.prototype,"labelPlacement",2),a([qa({attribute:"label-width"})],kt.prototype,"labelWidth",2),a([ml()],kt.prototype,"_currentStep",2),a([ml()],kt.prototype,"_isStepPending",2),a([ml()],kt.prototype,"_submitErrorMessages",2),a([ml()],kt.prototype,"_submitSuccessMessage",2),kt=a([xy("lui-form")],kt);import{css as jy,html as Wa,LitElement as Py,nothing as Vd}from"lit";import{customElement as Oy,property as $i,query as Hy,queryAll as Ry}from"lit/decorators.js";var
|
|
11979
|
+
`],kt.FORM_KEYS=new Set(["name","type","label","required","disabled","readonly","hidden","condition","span","xs","sm","md","lg","xl","offset","order","validators","fields","size","labelPlacement","labelWidth","defaultValue","description","min","max","step","length","source","renderControl","renderField","props","addLabel","removeLabel","itemLabel","minItems","maxItems","collapsible","defaultCollapsed","draggable","hiddenLabel","help","tooltip","extra","validateTrigger","onClick"]),kt._elEvents=new WeakMap,a([qa({attribute:!1})],kt.prototype,"schema",2),a([qa({type:Boolean,attribute:"show-actions"})],kt.prototype,"showActions",2),a([qa({reflect:!0})],kt.prototype,"size",2),a([qa({reflect:!0,attribute:"label-placement"})],kt.prototype,"labelPlacement",2),a([qa({attribute:"label-width"})],kt.prototype,"labelWidth",2),a([ml()],kt.prototype,"_currentStep",2),a([ml()],kt.prototype,"_isStepPending",2),a([ml()],kt.prototype,"_submitErrorMessages",2),a([ml()],kt.prototype,"_submitSuccessMessage",2),kt=a([xy("lui-form")],kt);import{css as jy,html as Wa,LitElement as Py,nothing as Vd}from"lit";import{customElement as Oy,property as $i,query as Hy,queryAll as Ry}from"lit/decorators.js";var ar=class extends Py{constructor(){super(...arguments);this.source=[];this.direction="horizontal";this.size="md";this.disabled=!1;this.radioProps={};this._explicitAttrs=new Set;this._syncFrame=0;this._onSlottedChange=e=>{if(this.source.length>0)return;let t=e.target;!t||t.tagName.toLowerCase()!=="lui-radio"||this._select(t.value??"")}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._lightDomObserver=new MutationObserver(()=>this._scheduleSync()),this._lightDomObserver.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["value","disabled","checked","label","description","slot"]})}disconnectedCallback(){super.disconnectedCallback(),this._lightDomObserver?.disconnect(),this._syncFrame&&cancelAnimationFrame(this._syncFrame)}firstUpdated(){this._scheduleSync()}willUpdate(){let e=F(this,"radioGroup");!this._explicitAttrs.has("direction")&&typeof e.direction=="string"&&this.direction!==e.direction&&(this.direction=e.direction),!this._explicitAttrs.has("size")&&typeof e.size=="string"&&this.size!==e.size&&(this.size=e.size),!this._explicitAttrs.has("disabled")&&typeof e.disabled=="boolean"&&this.disabled!==e.disabled&&(this.disabled=e.disabled)}updated(e){(e.has("value")||e.has("disabled")||e.has("size")||e.has("name")||e.has("source")||e.has("radioProps"))&&this._scheduleSync()}_scheduleSync(){this._syncFrame&&cancelAnimationFrame(this._syncFrame),this._syncFrame=requestAnimationFrame(()=>{this._syncFrame=0,this._syncSlottedRadios(),this._syncRenderedRadios()})}_getSlottedRadios(){return this._slotEl?this._slotEl.assignedElements({flatten:!0}).filter(e=>e.tagName.toLowerCase()==="lui-radio"):[]}_mergedRadioProps(){return{...F(this,"radioGroup").radioProps??{},...this.radioProps??{}}}_syncRenderedRadios(){if(!this.source.length)return;let e=this._mergedRadioProps();for(let t of this._renderedRadios??[])re(t,e)}_syncSlottedRadios(){if(this.source.length>0)return;let e=this._getSlottedRadios();for(let t of e){let r=t.value??"";t.checked=r===(this.value??""),this.disabled?(t.disabled||t.setAttribute("data-lui-radio-group-disabled",""),t.disabled=!0):t.hasAttribute("data-lui-radio-group-disabled")&&(t.removeAttribute("data-lui-radio-group-disabled"),t.disabled=!1),t.size=this.size,this.name&&(t.name=this.name)}}_select(e){this.value!==e&&(this.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0})))}_renderOption(e){let t={...this._mergedRadioProps(),checked:e.value===(this.value??""),value:e.value,label:e.label,description:e.description??"",name:this.name??"",size:e.size??this.size,checkedIcon:e.checkedIcon??this.radioProps.checkedIcon??"",disabled:this.disabled||(e.disabled??!1)};return Wa`
|
|
11950
11980
|
<lui-radio
|
|
11951
11981
|
.checked=${t.checked}
|
|
11952
11982
|
.value=${t.value}
|
|
@@ -11969,7 +11999,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
11969
11999
|
>
|
|
11970
12000
|
${e?this.source.map(t=>this._renderOption(t)):Wa`<slot @slotchange=${this._scheduleSync}></slot>`}
|
|
11971
12001
|
</div>
|
|
11972
|
-
`}};
|
|
12002
|
+
`}};ar.styles=[A,P,jy`
|
|
11973
12003
|
:host {
|
|
11974
12004
|
display: block;
|
|
11975
12005
|
}
|
|
@@ -11988,12 +12018,12 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
11988
12018
|
color: var(--lui-color-fg);
|
|
11989
12019
|
margin-bottom: var(--lui-space-1, 4px);
|
|
11990
12020
|
}
|
|
11991
|
-
`],a([$i({attribute:!1})],
|
|
12021
|
+
`],a([$i({attribute:!1})],ar.prototype,"source",2),a([$i()],ar.prototype,"value",2),a([$i({reflect:!0})],ar.prototype,"direction",2),a([$i({reflect:!0})],ar.prototype,"size",2),a([$i()],ar.prototype,"name",2),a([$i()],ar.prototype,"label",2),a([$i({type:Boolean})],ar.prototype,"disabled",2),a([$i({attribute:!1})],ar.prototype,"radioProps",2),a([Hy("slot")],ar.prototype,"_slotEl",2),a([Ry("lui-radio")],ar.prototype,"_renderedRadios",2),ar=a([Oy("lui-radio-group")],ar);import{css as Y1,html as X1,LitElement as Z1}from"lit";import{customElement as Q1,property as zr,query as G1}from"lit/decorators.js";import Iy from"flatpickr";import{Mandarin as Vy}from"flatpickr/dist/l10n/zh.js";import"flatpickr/dist/flatpickr.min.css";var sr=class extends Z1{constructor(){super(...arguments);this.value="";this.selectionMode="single";this.size="md";this.disabled=!1;this.showMonths=1;this.defaultDate="";this._fp=null}firstUpdated(){this._init()}disconnectedCallback(){this._destroy(),super.disconnectedCallback()}updated(e){if(this._fp){if(e.has("value")){let t=this._dateInputValue();t?this._fp.setDate(t,!1):this._fp.clear()}(e.has("selectionMode")||e.has("min")||e.has("max")||e.has("disabled")||e.has("showMonths")||e.has("defaultDate"))&&this._init()}}clear(){this.value="",this._fp?.clear(),this._emitChange([],"")}_destroy(){this._fp?.destroy(),this._fp=null,this._hostEl&&(this._hostEl.innerHTML="")}_dateInputValue(){return this.value?this.selectionMode==="range"?this.value.split(" ~ ").map(e=>e.trim()).filter(Boolean):this.value:this.defaultDate||void 0}_init(){if(!this._inputEl||!this._hostEl)return;this._destroy();let e=Math.max(1,Math.min(3,Math.round(this.showMonths||1)));this._fp=Iy(this._inputEl,{locale:Vy,inline:!0,appendTo:this._hostEl,clickOpens:!1,dateFormat:"Y-m-d",mode:this.selectionMode==="range"?"range":"single",conjunction:" ~ ",...this._dateInputValue()?{defaultDate:this._dateInputValue()}:{},minDate:this.min||void 0,maxDate:this.max||void 0,showMonths:e,disableMobile:!0,onReady:()=>{this._fp?.calendarContainer.classList.add("lui-calendar-panel"),this._forceCalendarVisible()},onChange:(t,r)=>{this.disabled||(this.value=r,this._emitChange(t,r))}}),this._forceCalendarVisible(),this.disabled&&(this._fp.input.disabled=!0,this._fp.calendarContainer.style.pointerEvents="none",this._fp.calendarContainer.style.opacity="0.55")}_forceCalendarVisible(){let e=this._fp?.calendarContainer;e&&(e.style.position="static",e.style.display="block",e.style.opacity="1",e.style.visibility="visible",e.style.pointerEvents=this.disabled?"none":"auto")}_emitChange(e,t){let r=t?t.split(" ~ ").map(n=>n.trim()).filter(Boolean):[];this.dispatchEvent(new CustomEvent("change",{detail:{value:t,values:r,dates:e},bubbles:!0,composed:!0}))}render(){return X1`
|
|
11992
12022
|
<div class="wrap" part="wrap">
|
|
11993
12023
|
<input class="input" aria-hidden="true" tabindex="-1" ?disabled=${this.disabled} />
|
|
11994
12024
|
<div class="host" part="calendar"></div>
|
|
11995
12025
|
</div>
|
|
11996
|
-
`}};
|
|
12026
|
+
`}};sr.styles=[A,P,Y1`
|
|
11997
12027
|
:host {
|
|
11998
12028
|
display: inline-block;
|
|
11999
12029
|
max-width: 100%;
|
|
@@ -12294,7 +12324,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
12294
12324
|
.host .numInputWrapper span.arrowDown:after {
|
|
12295
12325
|
border-top-color: var(--lui-color-fg-muted);
|
|
12296
12326
|
}
|
|
12297
|
-
`],a([
|
|
12327
|
+
`],a([zr()],sr.prototype,"value",2),a([zr({attribute:"selection-mode",reflect:!0})],sr.prototype,"selectionMode",2),a([zr({reflect:!0})],sr.prototype,"size",2),a([zr()],sr.prototype,"min",2),a([zr()],sr.prototype,"max",2),a([zr({type:Boolean})],sr.prototype,"disabled",2),a([zr({type:Number,attribute:"show-months"})],sr.prototype,"showMonths",2),a([zr({attribute:"default-date"})],sr.prototype,"defaultDate",2),a([G1(".input")],sr.prototype,"_inputEl",2),a([G1(".host")],sr.prototype,"_hostEl",2),sr=a([Q1("lui-calendar")],sr);var Gr=class extends Z1{constructor(){super(...arguments);this.value="";this.placeholder="\u9009\u62E9\u65E5\u671F\u8303\u56F4";this.size="md";this.disabled=!1;this.clearable=!0;this._onChange=e=>{let t=e.detail;this.value=t.value,this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))}}render(){return X1`
|
|
12298
12328
|
<lui-datepicker
|
|
12299
12329
|
type="date"
|
|
12300
12330
|
selection-mode="range"
|
|
@@ -12307,7 +12337,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
12307
12337
|
.clearable=${this.clearable}
|
|
12308
12338
|
@change=${this._onChange}
|
|
12309
12339
|
></lui-datepicker>
|
|
12310
|
-
`}};Gr.styles=[A,P,Y1`:host{display:block;width:100%;}`],a([Cr()],Gr.prototype,"value",2),a([Cr()],Gr.prototype,"placeholder",2),a([Cr({reflect:!0})],Gr.prototype,"size",2),a([Cr()],Gr.prototype,"min",2),a([Cr()],Gr.prototype,"max",2),a([Cr({type:Boolean})],Gr.prototype,"disabled",2),a([Cr({type:Boolean})],Gr.prototype,"clearable",2),Gr=a([Q1("lui-date-range-picker")],Gr);import{css as Ny,html as Wn,LitElement as Ly,nothing as rn}from"lit";import{customElement as By,property as tt,query as o0,state as bl}from"lit/decorators.js";var J1=la(xn(),1);function Dd(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px")}function e0(i){let{target:o,handle:e,visibleMarginX:t=72,visibleMarginY:r=48,ignoreFrom:n="button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle]",initialState:s,onStart:d,onMove:h}=i,p={left:s?.left??o.getBoundingClientRect().left,top:s?.top??o.getBoundingClientRect().top},f=(0,J1.default)(e).draggable({ignoreFrom:n,listeners:{start(){d?.()},move(x){let y=o.getBoundingClientRect(),C=t-y.width,S=window.innerWidth-t,E=r-y.height,T=window.innerHeight-r,O=Math.min(S,Math.max(C,p.left+x.dx)),H=Math.min(T,Math.max(E,p.top+x.dy));p={left:O,top:H},Dd(o,p),h?.(p)}}});return{dispose(){f.unset()},reset(){p={left:0,top:0},Dd(o,p),h?.(p)},getState(){return{...p}},setState(x,y){p={left:x.left??p.left,top:x.top??p.top},y?.apply!==!1&&Dd(o,p),y?.notify!==!1&&h?.(p)}}}var Fd=la(xn(),1);function vl(i){let o=Number.parseFloat(i);return Number.isFinite(o)?o:void 0}function Kn(i,o,e){return Math.min(e,Math.max(o,i))}function Dy(i){return i.top&&i.left?"nw":i.top&&i.right?"ne":i.bottom&&i.left?"sw":i.bottom&&i.right?"se":i.top?"n":i.right?"e":i.bottom?"s":"w"}function Fy(i,o,e){let r=window.getComputedStyle(i),n=vl(r.minWidth)??o,s=vl(r.minHeight)??e,d=Math.max(n,window.innerWidth-16*2),h=Math.max(s,window.innerHeight-16*2),p=Math.min(vl(r.maxWidth)??d,d),f=Math.min(vl(r.maxHeight)??h,h);return{minWidth:n,minHeight:s,maxWidth:p,maxHeight:f,viewportMargin:16}}function t0(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px"),i.style.setProperty("--lui-dialog-width",`${o.width}px`),i.style.setProperty("--lui-dialog-height",`${o.height}px`)}function r0(i){let{target:o,left:e,top:t,width:r,height:n,minWidth:s=320,minHeight:d=220,onStart:h,onEnd:p,onMove:f}=i,x=o.getBoundingClientRect(),y={left:e??x.left,top:t??x.top,width:r??x.width,height:n??x.height},C=(0,Fd.default)(o).resizable({edges:{top:'[data-resize-handle="n"], [data-resize-handle="nw"], [data-resize-handle="ne"]',right:'[data-resize-handle="e"], [data-resize-handle="ne"], [data-resize-handle="se"]',bottom:'[data-resize-handle="s"], [data-resize-handle="sw"], [data-resize-handle="se"]',left:'[data-resize-handle="w"], [data-resize-handle="nw"], [data-resize-handle="sw"]'},invert:"reposition",modifiers:[Fd.default.modifiers.restrictSize({min:{width:s,height:d}})],listeners:{start(S){h?.(Dy(S.edges))},move(S){let E=Fy(o,s,d),T=y.left,O=y.top,H=y.width,R=y.height;if(S.edges?.left){let N=y.left+y.width,$=N-E.minWidth;T=Kn(y.left+S.deltaRect.left,E.viewportMargin,$),H=Kn(N-T,E.minWidth,Math.min(E.maxWidth,window.innerWidth-E.viewportMargin-T)),T=N-H}else S.edges?.right&&(H=Kn(S.rect.width,E.minWidth,Math.min(E.maxWidth,window.innerWidth-E.viewportMargin-y.left)));if(S.edges?.top){let N=y.top+y.height,$=N-E.minHeight;O=Kn(y.top+S.deltaRect.top,E.viewportMargin,$),R=Kn(N-O,E.minHeight,Math.min(E.maxHeight,window.innerHeight-E.viewportMargin-O)),O=N-R}else S.edges?.bottom&&(R=Kn(S.rect.height,E.minHeight,Math.min(E.maxHeight,window.innerHeight-E.viewportMargin-y.top)));y={left:T,top:O,width:H,height:R},t0(o,y),f?.({...y})},end(){p?.()}}});return{dispose(){C.unset()},getState(){return{...y}},setState(S,E){y={left:S.left??y.left,top:S.top??y.top,width:S.width??y.width,height:S.height??y.height},E?.apply!==!1&&t0(o,y),E?.notify!==!1&&f?.({...y})}}}var qy=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),Ky=new Set(["lui-input","lui-select","lui-textarea","lui-switch","lui-checkbox","lui-radio","lui-input-number","lui-datepicker","lui-color-picker","lui-input-opt","lui-file-input"]),Ua=0,i0={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}};function kl(i,o){let e=o;for(;e;){if(e===i)return!0;let t=e.getRootNode?.();if(t instanceof ShadowRoot&&t.host){e=t.host;continue}e=e.parentNode}return!1}function Wy(i){let o=i.activeElement;for(;o&&o.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}function Uy(i){return i.hasAttribute("disabled")||i.getAttribute("aria-hidden")||i.tabIndex===-1||i.hidden?!1:i.matches(qy)?!0:Ky.has(i.tagName.toLowerCase())}function Gy(i,o){if(!(i instanceof HTMLElement)||i===o||!kl(o,i)||!i.hasAttribute("open"))return!1;let e=i.tagName.toLowerCase();return e==="lui-popover"||e==="lui-select"||e==="lui-dropdown"||e==="lui-datepicker"||e==="lui-context-menu"}var xe=class extends Ly{constructor(){super(...arguments);this.open=!1;this.title="";this.noClose=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.noHeader=!1;this.noFooter=!1;this.draggable=!1;this.resizable=!1;this.destroyOnClose=!1;this.fullscreen=!1;this.placement="center";this.offset="";this.backdrop="opaque";this.backdropStyle="";this.portal=!1;this.overlayLayer="modal";this._shaking=!1;this._opening=!1;this._resizing=!1;this._activeResizeHandle=null;this._shakeTimer=0;this._openingTimer=0;this._draggableHandle=null;this._resizableHandle=null;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._suppressBackdropClickUntil=0;this._previousActiveElement=null;this._bodyScrollLocked=!1;this._bodyUserSelect="";this._bodyWebkitUserSelect="";this._interactiveRect=null;this._destroyOnCloseTemplate=[];this._isSyncingDestroyOnCloseContent=!1;this._onDocumentKeyDown=e=>{if(!this.open||!this._isTopmostDialog())return;if(e.key==="Escape"){let h=e.composedPath();if(mn(h,this)||h.some(p=>Gy(p,this)))return;e.preventDefault(),this.close();return}if(e.key!=="Tab"||!this._dialog)return;let t=this._getFocusableElements();if(t.length===0){e.preventDefault(),this._dialog.focus({preventScroll:!0});return}let r=Wy(this.ownerDocument),n=t.findIndex(h=>h===r||kl(h,r)),s=t[0],d=t[t.length-1];if(e.shiftKey){n<=0&&(e.preventDefault(),d.focus({preventScroll:!0}));return}(n===-1||n===t.length-1)&&(e.preventDefault(),s.focus({preventScroll:!0}))};this._onDialogClick=e=>{if(e.target!==this._dialog||!this._isTopmostDialog())return;let t=e.composedPath();if(t.some(s=>s instanceof Node&&s!==this._dialog&&kl(this,s))||mn(t,this)||Date.now()<this._suppressBackdropClickUntil||Hs(this))return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onBackdropClick=e=>{if(e.stopPropagation(),!this._isTopmostDialog())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onNativeClose=e=>{e.target===this._dialog&&this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))};this._onDocumentPointerDown=e=>{if(!this.open||!this._dialog){this._suppressBackdropClickUntil=0;return}let t=e.composedPath(),r=t[0]===this._dialog,n=t.some(d=>d instanceof Node&&d!==this._dialog&&kl(this,d)),s=mn(t,this);this._suppressBackdropClickUntil=!r&&(n||s)?Date.now()+320:0}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=ke(()=>this.requestUpdate()),this._captureDestroyOnCloseTemplate(),this._lightDomObserver=new MutationObserver(()=>{!this._isSyncingDestroyOnCloseContent&&!(this.destroyOnClose&&!this.open&&this.childNodes.length===0)&&this._captureDestroyOnCloseTemplate(),this.requestUpdate()}),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]}),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown,!0)}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown,!0),this._unlockBodyScroll(),this._setResizing(!1),this._teardownDraggable(),this._teardownResizable(),window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}willUpdate(e){(e.has("open")||e.has("destroyOnClose"))&&this._syncDestroyOnCloseContent(),this._dialog&&this.open&&!this._dialog.open&&(this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},300)),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1);let t=F(this,"dialog");!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&this.noClose!==t.noClose&&(this.noClose=t.noClose),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==t.closeOnOutsidePress&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&this.shakeOnOutsideClick!==t.shakeOnOutsideClick&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&this.noHeader!==t.noHeader&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&this.noFooter!==t.noFooter&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("draggable")&&typeof t.draggable=="boolean"&&this.draggable!==t.draggable&&(this.draggable=t.draggable),!this._explicitAttrs.has("resizable")&&typeof t.resizable=="boolean"&&this.resizable!==t.resizable&&(this.resizable=t.resizable),!this._explicitAttrs.has("destroy-on-close")&&typeof t.destroyOnClose=="boolean"&&this.destroyOnClose!==t.destroyOnClose&&(this.destroyOnClose=t.destroyOnClose),!this._explicitAttrs.has("fullscreen")&&typeof t.fullscreen=="boolean"&&this.fullscreen!==t.fullscreen&&(this.fullscreen=t.fullscreen),!this._explicitAttrs.has("width")&&(typeof t.width=="string"||typeof t.width=="number")&&this.width!==t.width&&(this.width=t.width),!this._explicitAttrs.has("drag-visible-margin-x")&&typeof t.dragVisibleMarginX=="number"&&this.dragVisibleMarginX!==t.dragVisibleMarginX&&(this.dragVisibleMarginX=t.dragVisibleMarginX),!this._explicitAttrs.has("drag-visible-margin-y")&&typeof t.dragVisibleMarginY=="number"&&this.dragVisibleMarginY!==t.dragVisibleMarginY&&(this.dragVisibleMarginY=t.dragVisibleMarginY),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("offset")&&typeof t.offset=="string"&&this.offset!==t.offset&&(this.offset=t.offset),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&this.backdrop!==t.backdrop&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&this.backdropStyle!==t.backdropStyle&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&this.portal!==t.portal&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&this.overlayLayer!==t.overlayLayer&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");if(this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),nt(this)),e.has("open")&&this._dialog)if(this.open&&!this._dialog.open){try{this._dialog.show()}catch{this._dialog.setAttribute("open","")}this._previousActiveElement=this.ownerDocument.activeElement instanceof HTMLElement?this.ownerDocument.activeElement:null,this._lockBodyScroll(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this._focusInitialElement()})}else!this.open&&this._dialog.open&&(this._unlockBodyScroll(),this._dialog.close(),this._restoreFocus());e.has("open")&&!this.open&&(this._releaseOverlayStack(),this._restorePortalPlacement(),this._resetInteractiveLayout()),e.has("width")&&this._interactiveRect&&!this._resizing&&(this._interactiveRect.width=void 0),(e.has("draggable")||e.has("fullscreen")||e.has("noHeader")||e.has("open")||e.has("dragHandle"))&&queueMicrotask(()=>this._syncDraggable()),(e.has("resizable")||e.has("fullscreen")||e.has("open")||e.has("width")||e.has("placement"))&&queueMicrotask(()=>this._syncResizable())}show(){this.portal&&this._moveToPortalLayer(),this.open=!0}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_getFocusableElements(){if(!this._dialog)return[];let e=this.ownerDocument.createTreeWalker(this._dialog,NodeFilter.SHOW_ELEMENT),t=[],r=e.currentNode;for(;r;)r!==this._dialog&&Uy(r)&&!t.includes(r)&&t.push(r),r=e.nextNode();return t}_focusInitialElement(){if(!this.open||!this._dialog)return;let t=this._getFocusableElements()[0]??this._dialog;t===this._dialog&&(this._dialog.tabIndex=-1),t.focus({preventScroll:!0})}_restoreFocus(){let e=this._previousActiveElement;this._previousActiveElement=null,e&&e.isConnected&&e.focus({preventScroll:!0})}_lockBodyScroll(){this._bodyScrollLocked||!this.ownerDocument?.body||(Ua===0&&(this.ownerDocument.body.style.overflow="hidden"),Ua+=1,this._bodyScrollLocked=!0)}_unlockBodyScroll(){!this._bodyScrollLocked||!this.ownerDocument?.body||(Ua=Math.max(0,Ua-1),Ua===0&&(this.ownerDocument.body.style.overflow=""),this._bodyScrollLocked=!1)}_shake(){!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),this._shaking=!1,this.updateComplete.then(()=>{this._dialog?.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}))}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_hasFooterContent(){return this.noFooter?!1:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="footer")}_shouldRenderHeader(){return this.noHeader?!1:this.title||!this.noClose?!0:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="title")}_isTopmostDialog(){return!this._overlayStackRegistered||Rs(this)}_registerOverlayStack(){let e=gn(this);if(!e){this._releaseOverlayStack();return}zt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(mo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Zt(this.overlayLayer||"modal",this.container??pi(this)??hi(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-dialog-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder,t=e.parentNode;this._isPortalMoving=!0;try{t&&t.insertBefore(this,e),e.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}_teardownDraggable(){this._draggableHandle?.dispose(),this._draggableHandle=null}_syncDestroyOnCloseContent(){if(!this.destroyOnClose){this._restoreDestroyOnCloseContent();return}if(this.open){this._restoreDestroyOnCloseContent();return}this._stashDestroyOnCloseContent()}_captureDestroyOnCloseTemplate(){this._isSyncingDestroyOnCloseContent||(this._destroyOnCloseTemplate=Array.from(this.childNodes).map(e=>e.cloneNode(!0)))}_restoreDestroyOnCloseContent(){if(!(this.childNodes.length>0||this._destroyOnCloseTemplate.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren(...this._destroyOnCloseTemplate.map(e=>e.cloneNode(!0)))}finally{this._isSyncingDestroyOnCloseContent=!1}}}_stashDestroyOnCloseContent(){if(!(!this.destroyOnClose||this.childNodes.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren()}finally{this._isSyncingDestroyOnCloseContent=!1}}}_teardownResizable(){this._resizableHandle?.dispose(),this._resizableHandle=null,this._activeResizeHandle=null,this._setResizing(!1)}_setResizing(e){if(this._resizing===e)return;this._resizing=e;let t=this.ownerDocument?.body;if(t){if(e){this._bodyUserSelect=t.style.userSelect,this._bodyWebkitUserSelect=t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none";return}t.style.userSelect=this._bodyUserSelect,t.style.webkitUserSelect=this._bodyWebkitUserSelect}}_resetInteractiveLayout(){this._interactiveRect=null}_materializeInteractiveRect(){if(!this.open||!this._dialog)return null;let e=this._dialog.getBoundingClientRect();return this._interactiveRect={left:Math.round(e.left),top:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)},this.requestUpdate(),this._interactiveRect}_syncDraggable(){if(this._teardownDraggable(),this.fullscreen||!this.open||!this.draggable||!this._dialog)return;let e=null;this.dragHandle?e=this._dialog.querySelector(this.dragHandle)||this.querySelector(this.dragHandle):!this.noHeader&&this._headerEl&&(e=this._headerEl),e&&(this._draggableHandle=e0({target:this._dialog,handle:e,initialState:this._interactiveRect?{left:this._interactiveRect.left,top:this._interactiveRect.top}:void 0,visibleMarginX:typeof this.dragVisibleMarginX=="number"&&Number.isFinite(this.dragVisibleMarginX)?this.dragVisibleMarginX:void 0,visibleMarginY:typeof this.dragVisibleMarginY=="number"&&Number.isFinite(this.dragVisibleMarginY)?this.dragVisibleMarginY:void 0,ignoreFrom:'[part="close"], button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle], .resize-handle',onStart:()=>{let t=this._materializeInteractiveRect();t&&(this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1}),this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}))},onMove:t=>{let r=this._interactiveRect??this._materializeInteractiveRect();r&&(this._interactiveRect={...r,left:t.left,top:t.top},this._resizableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1}),this.requestUpdate())}}))}syncDraggable(){this._syncDraggable()}_syncResizable(){this._teardownResizable(),!(this.fullscreen||!this.open||!this.resizable||!this._dialog)&&(this._resizableHandle=r0({target:this._dialog,left:this._interactiveRect?.left,top:this._interactiveRect?.top,width:this._interactiveRect?.width,height:this._interactiveRect?.height,minWidth:320,minHeight:220,onStart:e=>{let t=this._materializeInteractiveRect();t&&(this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}),this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1})),this._activeResizeHandle=e,this._setResizing(!0)},onEnd:()=>{this._activeResizeHandle=null,this._setResizing(!1)},onMove:e=>{this._interactiveRect={left:e.left,top:e.top,width:e.width,height:e.height},this._draggableHandle?.setState({left:e.left,top:e.top},{notify:!1,apply:!1}),this.requestUpdate()}}))}_dialogStyle(){let e=this._interactiveRect?.width!=null?`${this._interactiveRect.width}px`:pt(this.width),t=this._interactiveRect?.height!=null?`${this._interactiveRect.height}px`:"",r=[this._interactiveRect?`--lui-dialog-left:${this._interactiveRect.left}px`:"",this._interactiveRect?`--lui-dialog-top:${this._interactiveRect.top}px`:"",this._interactiveRect?"--lui-dialog-right:auto":"",this._interactiveRect?"--lui-dialog-bottom:auto":"",this._interactiveRect?"--lui-dialog-base-translate-x:0px":"",this._interactiveRect?"--lui-dialog-base-translate-y:0px":"",this.offset?`--lui-dialog-offset:${this.offset}`:"",e?`--lui-dialog-width:${e}`:"",t?`--lui-dialog-height:${t}`:""].filter(Boolean);return r.length?r.join(";"):rn}render(){let e=this.open||!this.destroyOnClose,t=this._hasFooterContent();return Wn`
|
|
12340
|
+
`}};Gr.styles=[A,P,Y1`:host{display:block;width:100%;}`],a([zr()],Gr.prototype,"value",2),a([zr()],Gr.prototype,"placeholder",2),a([zr({reflect:!0})],Gr.prototype,"size",2),a([zr()],Gr.prototype,"min",2),a([zr()],Gr.prototype,"max",2),a([zr({type:Boolean})],Gr.prototype,"disabled",2),a([zr({type:Boolean})],Gr.prototype,"clearable",2),Gr=a([Q1("lui-date-range-picker")],Gr);import{css as Ny,html as Wn,LitElement as Ly,nothing as rn}from"lit";import{customElement as By,property as tt,query as o0,state as bl}from"lit/decorators.js";var J1=la(xn(),1);function Dd(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px")}function e0(i){let{target:o,handle:e,visibleMarginX:t=72,visibleMarginY:r=48,ignoreFrom:n="button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle]",initialState:s,onStart:d,onMove:h}=i,p={left:s?.left??o.getBoundingClientRect().left,top:s?.top??o.getBoundingClientRect().top},f=(0,J1.default)(e).draggable({ignoreFrom:n,listeners:{start(){d?.()},move(x){let y=o.getBoundingClientRect(),C=t-y.width,S=window.innerWidth-t,E=r-y.height,T=window.innerHeight-r,O=Math.min(S,Math.max(C,p.left+x.dx)),H=Math.min(T,Math.max(E,p.top+x.dy));p={left:O,top:H},Dd(o,p),h?.(p)}}});return{dispose(){f.unset()},reset(){p={left:0,top:0},Dd(o,p),h?.(p)},getState(){return{...p}},setState(x,y){p={left:x.left??p.left,top:x.top??p.top},y?.apply!==!1&&Dd(o,p),y?.notify!==!1&&h?.(p)}}}var Fd=la(xn(),1);function vl(i){let o=Number.parseFloat(i);return Number.isFinite(o)?o:void 0}function Kn(i,o,e){return Math.min(e,Math.max(o,i))}function Dy(i){return i.top&&i.left?"nw":i.top&&i.right?"ne":i.bottom&&i.left?"sw":i.bottom&&i.right?"se":i.top?"n":i.right?"e":i.bottom?"s":"w"}function Fy(i,o,e){let r=window.getComputedStyle(i),n=vl(r.minWidth)??o,s=vl(r.minHeight)??e,d=Math.max(n,window.innerWidth-16*2),h=Math.max(s,window.innerHeight-16*2),p=Math.min(vl(r.maxWidth)??d,d),f=Math.min(vl(r.maxHeight)??h,h);return{minWidth:n,minHeight:s,maxWidth:p,maxHeight:f,viewportMargin:16}}function t0(i,o){i.style.setProperty("--lui-dialog-left",`${o.left}px`),i.style.setProperty("--lui-dialog-top",`${o.top}px`),i.style.setProperty("--lui-dialog-right","auto"),i.style.setProperty("--lui-dialog-bottom","auto"),i.style.setProperty("--lui-dialog-base-translate-x","0px"),i.style.setProperty("--lui-dialog-base-translate-y","0px"),i.style.setProperty("--lui-dialog-width",`${o.width}px`),i.style.setProperty("--lui-dialog-height",`${o.height}px`)}function r0(i){let{target:o,left:e,top:t,width:r,height:n,minWidth:s=320,minHeight:d=220,onStart:h,onEnd:p,onMove:f}=i,x=o.getBoundingClientRect(),y={left:e??x.left,top:t??x.top,width:r??x.width,height:n??x.height},C=(0,Fd.default)(o).resizable({edges:{top:'[data-resize-handle="n"], [data-resize-handle="nw"], [data-resize-handle="ne"]',right:'[data-resize-handle="e"], [data-resize-handle="ne"], [data-resize-handle="se"]',bottom:'[data-resize-handle="s"], [data-resize-handle="sw"], [data-resize-handle="se"]',left:'[data-resize-handle="w"], [data-resize-handle="nw"], [data-resize-handle="sw"]'},invert:"reposition",modifiers:[Fd.default.modifiers.restrictSize({min:{width:s,height:d}})],listeners:{start(S){h?.(Dy(S.edges))},move(S){let E=Fy(o,s,d),T=y.left,O=y.top,H=y.width,R=y.height;if(S.edges?.left){let N=y.left+y.width,$=N-E.minWidth;T=Kn(y.left+S.deltaRect.left,E.viewportMargin,$),H=Kn(N-T,E.minWidth,Math.min(E.maxWidth,window.innerWidth-E.viewportMargin-T)),T=N-H}else S.edges?.right&&(H=Kn(S.rect.width,E.minWidth,Math.min(E.maxWidth,window.innerWidth-E.viewportMargin-y.left)));if(S.edges?.top){let N=y.top+y.height,$=N-E.minHeight;O=Kn(y.top+S.deltaRect.top,E.viewportMargin,$),R=Kn(N-O,E.minHeight,Math.min(E.maxHeight,window.innerHeight-E.viewportMargin-O)),O=N-R}else S.edges?.bottom&&(R=Kn(S.rect.height,E.minHeight,Math.min(E.maxHeight,window.innerHeight-E.viewportMargin-y.top)));y={left:T,top:O,width:H,height:R},t0(o,y),f?.({...y})},end(){p?.()}}});return{dispose(){C.unset()},getState(){return{...y}},setState(S,E){y={left:S.left??y.left,top:S.top??y.top,width:S.width??y.width,height:S.height??y.height},E?.apply!==!1&&t0(o,y),E?.notify!==!1&&f?.({...y})}}}var qy=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", "),Ky=new Set(["lui-input","lui-select","lui-textarea","lui-switch","lui-checkbox","lui-radio","lui-input-number","lui-datepicker","lui-color-picker","lui-input-opt","lui-file-input"]),Ua=0,i0={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}};function kl(i,o){let e=o;for(;e;){if(e===i)return!0;let t=e.getRootNode?.();if(t instanceof ShadowRoot&&t.host){e=t.host;continue}e=e.parentNode}return!1}function Wy(i){let o=i.activeElement;for(;o&&o.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}function Uy(i){return i.hasAttribute("disabled")||i.getAttribute("aria-hidden")||i.tabIndex===-1||i.hidden?!1:i.matches(qy)?!0:Ky.has(i.tagName.toLowerCase())}function Gy(i,o){if(!(i instanceof HTMLElement)||i===o||!kl(o,i)||!i.hasAttribute("open"))return!1;let e=i.tagName.toLowerCase();return e==="lui-popover"||e==="lui-select"||e==="lui-dropdown"||e==="lui-datepicker"||e==="lui-context-menu"}var xe=class extends Ly{constructor(){super(...arguments);this.open=!1;this.title="";this.noClose=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.noHeader=!1;this.noFooter=!1;this.draggable=!1;this.resizable=!1;this.destroyOnClose=!1;this.fullscreen=!1;this.placement="center";this.offset="";this.backdrop="opaque";this.backdropStyle="";this.portal=!1;this.overlayLayer="modal";this._shaking=!1;this._opening=!1;this._resizing=!1;this._activeResizeHandle=null;this._shakeTimer=0;this._openingTimer=0;this._draggableHandle=null;this._resizableHandle=null;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._suppressBackdropClickUntil=0;this._previousActiveElement=null;this._bodyScrollLocked=!1;this._bodyUserSelect="";this._bodyWebkitUserSelect="";this._interactiveRect=null;this._destroyOnCloseTemplate=[];this._isSyncingDestroyOnCloseContent=!1;this._onDocumentKeyDown=e=>{if(!this.open||!this._isTopmostDialog())return;if(e.key==="Escape"){let h=e.composedPath();if(mn(h,this)||h.some(p=>Gy(p,this)))return;e.preventDefault(),this.close();return}if(e.key!=="Tab"||!this._dialog)return;let t=this._getFocusableElements();if(t.length===0){e.preventDefault(),this._dialog.focus({preventScroll:!0});return}let r=Wy(this.ownerDocument),n=t.findIndex(h=>h===r||kl(h,r)),s=t[0],d=t[t.length-1];if(e.shiftKey){n<=0&&(e.preventDefault(),d.focus({preventScroll:!0}));return}(n===-1||n===t.length-1)&&(e.preventDefault(),s.focus({preventScroll:!0}))};this._onDialogClick=e=>{if(e.target!==this._dialog||!this._isTopmostDialog())return;let t=e.composedPath();if(t.some(s=>s instanceof Node&&s!==this._dialog&&kl(this,s))||mn(t,this)||Date.now()<this._suppressBackdropClickUntil||Hs(this))return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onBackdropClick=e=>{if(e.stopPropagation(),!this._isTopmostDialog())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()};this._onNativeClose=e=>{e.target===this._dialog&&this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))};this._onDocumentPointerDown=e=>{if(!this.open||!this._dialog){this._suppressBackdropClickUntil=0;return}let t=e.composedPath(),r=t[0]===this._dialog,n=t.some(d=>d instanceof Node&&d!==this._dialog&&kl(this,d)),s=mn(t,this);this._suppressBackdropClickUntil=!r&&(n||s)?Date.now()+320:0}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=ke(()=>this.requestUpdate()),this._captureDestroyOnCloseTemplate(),this._lightDomObserver=new MutationObserver(()=>{!this._isSyncingDestroyOnCloseContent&&!(this.destroyOnClose&&!this.open&&this.childNodes.length===0)&&this._captureDestroyOnCloseTemplate(),this.requestUpdate()}),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]}),document.addEventListener("pointerdown",this._onDocumentPointerDown,!0),document.addEventListener("keydown",this._onDocumentKeyDown,!0)}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),this._lightDomObserver=void 0,document.removeEventListener("pointerdown",this._onDocumentPointerDown,!0),document.removeEventListener("keydown",this._onDocumentKeyDown,!0),this._unlockBodyScroll(),this._setResizing(!1),this._teardownDraggable(),this._teardownResizable(),window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}willUpdate(e){(e.has("open")||e.has("destroyOnClose"))&&this._syncDestroyOnCloseContent(),this._dialog&&this.open&&!this._dialog.open&&(this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},300)),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1);let t=F(this,"dialog");!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&this.noClose!==t.noClose&&(this.noClose=t.noClose),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&this.closeOnOutsidePress!==t.closeOnOutsidePress&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&this.shakeOnOutsideClick!==t.shakeOnOutsideClick&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&this.noHeader!==t.noHeader&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&this.noFooter!==t.noFooter&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("draggable")&&typeof t.draggable=="boolean"&&this.draggable!==t.draggable&&(this.draggable=t.draggable),!this._explicitAttrs.has("resizable")&&typeof t.resizable=="boolean"&&this.resizable!==t.resizable&&(this.resizable=t.resizable),!this._explicitAttrs.has("destroy-on-close")&&typeof t.destroyOnClose=="boolean"&&this.destroyOnClose!==t.destroyOnClose&&(this.destroyOnClose=t.destroyOnClose),!this._explicitAttrs.has("fullscreen")&&typeof t.fullscreen=="boolean"&&this.fullscreen!==t.fullscreen&&(this.fullscreen=t.fullscreen),!this._explicitAttrs.has("width")&&(typeof t.width=="string"||typeof t.width=="number")&&this.width!==t.width&&(this.width=t.width),!this._explicitAttrs.has("drag-visible-margin-x")&&typeof t.dragVisibleMarginX=="number"&&this.dragVisibleMarginX!==t.dragVisibleMarginX&&(this.dragVisibleMarginX=t.dragVisibleMarginX),!this._explicitAttrs.has("drag-visible-margin-y")&&typeof t.dragVisibleMarginY=="number"&&this.dragVisibleMarginY!==t.dragVisibleMarginY&&(this.dragVisibleMarginY=t.dragVisibleMarginY),!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&this.placement!==t.placement&&(this.placement=t.placement),!this._explicitAttrs.has("offset")&&typeof t.offset=="string"&&this.offset!==t.offset&&(this.offset=t.offset),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&this.backdrop!==t.backdrop&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&this.backdropStyle!==t.backdropStyle&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&this.portal!==t.portal&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&this.overlayLayer!==t.overlayLayer&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");if(this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),nt(this)),e.has("open")&&this._dialog)if(this.open&&!this._dialog.open){try{this._dialog.show()}catch{this._dialog.setAttribute("open","")}this._previousActiveElement=this.ownerDocument.activeElement instanceof HTMLElement?this.ownerDocument.activeElement:null,this._lockBodyScroll(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.updateComplete.then(()=>{this._focusInitialElement()})}else!this.open&&this._dialog.open&&(this._unlockBodyScroll(),this._dialog.close(),this._restoreFocus());e.has("open")&&!this.open&&(this._releaseOverlayStack(),this._restorePortalPlacement(),this._resetInteractiveLayout()),e.has("width")&&this._interactiveRect&&!this._resizing&&(this._interactiveRect.width=void 0),(e.has("draggable")||e.has("fullscreen")||e.has("noHeader")||e.has("open")||e.has("dragHandle"))&&queueMicrotask(()=>this._syncDraggable()),(e.has("resizable")||e.has("fullscreen")||e.has("open")||e.has("width")||e.has("placement"))&&queueMicrotask(()=>this._syncResizable())}show(){this.portal&&this._moveToPortalLayer(),this.open=!0}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_getFocusableElements(){if(!this._dialog)return[];let e=this.ownerDocument.createTreeWalker(this._dialog,NodeFilter.SHOW_ELEMENT),t=[],r=e.currentNode;for(;r;)r!==this._dialog&&Uy(r)&&!t.includes(r)&&t.push(r),r=e.nextNode();return t}_focusInitialElement(){if(!this.open||!this._dialog)return;let t=this._getFocusableElements()[0]??this._dialog;t===this._dialog&&(this._dialog.tabIndex=-1),t.focus({preventScroll:!0})}_restoreFocus(){let e=this._previousActiveElement;this._previousActiveElement=null,e&&e.isConnected&&e.focus({preventScroll:!0})}_lockBodyScroll(){this._bodyScrollLocked||!this.ownerDocument?.body||(Ua===0&&(this.ownerDocument.body.style.overflow="hidden"),Ua+=1,this._bodyScrollLocked=!0)}_unlockBodyScroll(){!this._bodyScrollLocked||!this.ownerDocument?.body||(Ua=Math.max(0,Ua-1),Ua===0&&(this.ownerDocument.body.style.overflow=""),this._bodyScrollLocked=!1)}_shake(){!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),this._shaking=!1,this.updateComplete.then(()=>{this._dialog?.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}))}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_hasFooterContent(){return this.noFooter?!1:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="footer")}_shouldRenderHeader(){return this.noHeader?!1:this.title||!this.noClose?!0:Array.from(this.childNodes).some(e=>e.nodeType!==Node.ELEMENT_NODE?!1:e.slot==="title")}_isTopmostDialog(){return!this._overlayStackRegistered||Rs(this)}_registerOverlayStack(){let e=gn(this);if(!e){this._releaseOverlayStack();return}zt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(mo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Zt(this.overlayLayer||"modal",this.container??pi(this)??hi(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-dialog-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder,t=e.parentNode;this._isPortalMoving=!0;try{t&&t.insertBefore(this,e),e.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}_teardownDraggable(){this._draggableHandle?.dispose(),this._draggableHandle=null}_syncDestroyOnCloseContent(){if(!this.destroyOnClose){this._restoreDestroyOnCloseContent();return}if(this.open){this._restoreDestroyOnCloseContent();return}this._stashDestroyOnCloseContent()}_captureDestroyOnCloseTemplate(){this._isSyncingDestroyOnCloseContent||(this._destroyOnCloseTemplate=Array.from(this.childNodes).map(e=>e.cloneNode(!0)))}_restoreDestroyOnCloseContent(){if(!(this.childNodes.length>0||this._destroyOnCloseTemplate.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren(...this._destroyOnCloseTemplate.map(e=>e.cloneNode(!0)))}finally{this._isSyncingDestroyOnCloseContent=!1}}}_stashDestroyOnCloseContent(){if(!(!this.destroyOnClose||this.childNodes.length===0)){this._isSyncingDestroyOnCloseContent=!0;try{this.replaceChildren()}finally{this._isSyncingDestroyOnCloseContent=!1}}}_teardownResizable(){this._resizableHandle?.dispose(),this._resizableHandle=null,this._activeResizeHandle=null,this._setResizing(!1)}_setResizing(e){if(this._resizing===e)return;this._resizing=e;let t=this.ownerDocument?.body;if(t){if(e){this._bodyUserSelect=t.style.userSelect,this._bodyWebkitUserSelect=t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none";return}t.style.userSelect=this._bodyUserSelect,t.style.webkitUserSelect=this._bodyWebkitUserSelect}}_resetInteractiveLayout(){this._interactiveRect=null}_materializeInteractiveRect(){if(!this.open||!this._dialog)return null;let e=this._dialog.getBoundingClientRect();return this._interactiveRect={left:Math.round(e.left),top:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)},this.requestUpdate(),this._interactiveRect}_syncDraggable(){if(this._teardownDraggable(),this.fullscreen||!this.open||!this.draggable||!this._dialog)return;let e=null;this.dragHandle?e=this._dialog.querySelector(this.dragHandle)||this.querySelector(this.dragHandle):!this.noHeader&&this._headerEl&&(e=this._headerEl),e&&(this._draggableHandle=e0({target:this._dialog,handle:e,initialState:this._interactiveRect?{left:this._interactiveRect.left,top:this._interactiveRect.top}:void 0,visibleMarginX:typeof this.dragVisibleMarginX=="number"&&Number.isFinite(this.dragVisibleMarginX)?this.dragVisibleMarginX:void 0,visibleMarginY:typeof this.dragVisibleMarginY=="number"&&Number.isFinite(this.dragVisibleMarginY)?this.dragVisibleMarginY:void 0,ignoreFrom:'[part="close"], button, input, textarea, select, option, a, [data-no-drag], [data-resize-handle], .resize-handle',onStart:()=>{let t=this._materializeInteractiveRect();t&&(this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1}),this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}))},onMove:t=>{let r=this._interactiveRect??this._materializeInteractiveRect();r&&(this._interactiveRect={...r,left:t.left,top:t.top},this._resizableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1}),this.requestUpdate())}}))}syncDraggable(){this._syncDraggable()}_syncResizable(){this._teardownResizable(),!(this.fullscreen||!this.open||!this.resizable||!this._dialog)&&(this._resizableHandle=r0({target:this._dialog,left:this._interactiveRect?.left,top:this._interactiveRect?.top,width:this._interactiveRect?.width,height:this._interactiveRect?.height,minWidth:320,minHeight:220,onStart:e=>{let t=this._materializeInteractiveRect();t&&(this._resizableHandle?.setState({left:t.left,top:t.top,width:t.width,height:t.height},{notify:!1}),this._draggableHandle?.setState({left:t.left,top:t.top},{notify:!1,apply:!1})),this._activeResizeHandle=e,this._setResizing(!0)},onEnd:()=>{this._activeResizeHandle=null,this._setResizing(!1)},onMove:e=>{this._interactiveRect={left:e.left,top:e.top,width:e.width,height:e.height},this._draggableHandle?.setState({left:e.left,top:e.top},{notify:!1,apply:!1}),this.requestUpdate()}}))}_dialogStyle(){let e=this._interactiveRect?.width!=null?`${this._interactiveRect.width}px`:pt(this.width),t=this._interactiveRect?.height!=null?`${this._interactiveRect.height}px`:"",r=[this._interactiveRect?`--lui-dialog-left:${this._interactiveRect.left}px`:"",this._interactiveRect?`--lui-dialog-top:${this._interactiveRect.top}px`:"",this._interactiveRect?"--lui-dialog-right:auto":"",this._interactiveRect?"--lui-dialog-bottom:auto":"",this._interactiveRect?"--lui-dialog-base-translate-x:0px":"",this._interactiveRect?"--lui-dialog-base-translate-y:0px":"",this.offset?`--lui-dialog-offset:${this.offset}`:"",e?`--lui-dialog-width:${e}`:"",t?`--lui-dialog-height:${t}`:""].filter(Boolean);return r.length?r.join(";"):rn}render(){let e=this.open||!this.destroyOnClose,t=this._hasFooterContent();return Wn`
|
|
12311
12341
|
<div
|
|
12312
12342
|
part="custom-backdrop"
|
|
12313
12343
|
style=${this.backdropStyle||rn}
|
|
@@ -12871,7 +12901,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
12871
12901
|
0 0 0 2px color-mix(in srgb, var(--lui-color-primary) 24%, transparent);
|
|
12872
12902
|
}
|
|
12873
12903
|
}
|
|
12874
|
-
`],a([tt({type:Boolean,reflect:!0})],xe.prototype,"open",2),a([tt()],xe.prototype,"title",2),a([tt({type:Boolean,attribute:"no-close"})],xe.prototype,"noClose",2),a([tt({attribute:"close-on-outside-press",reflect:!0,converter:i0})],xe.prototype,"closeOnOutsidePress",2),a([tt({attribute:"shake-on-outside-click",reflect:!0,converter:i0})],xe.prototype,"shakeOnOutsideClick",2),a([tt({type:Boolean,reflect:!0,attribute:"no-header"})],xe.prototype,"noHeader",2),a([tt({type:Boolean,reflect:!0,attribute:"no-footer"})],xe.prototype,"noFooter",2),a([tt({type:Boolean,reflect:!0})],xe.prototype,"draggable",2),a([tt({attribute:"drag-handle"})],xe.prototype,"dragHandle",2),a([tt({type:Boolean,reflect:!0})],xe.prototype,"resizable",2),a([tt({type:Boolean,reflect:!0,attribute:"destroy-on-close"})],xe.prototype,"destroyOnClose",2),a([tt({type:Boolean,reflect:!0})],xe.prototype,"fullscreen",2),a([tt()],xe.prototype,"width",2),a([tt({type:Number,attribute:"drag-visible-margin-x"})],xe.prototype,"dragVisibleMarginX",2),a([tt({type:Number,attribute:"drag-visible-margin-y"})],xe.prototype,"dragVisibleMarginY",2),a([tt({reflect:!0})],xe.prototype,"placement",2),a([tt()],xe.prototype,"offset",2),a([tt({reflect:!0})],xe.prototype,"backdrop",2),a([tt({attribute:"backdrop-style"})],xe.prototype,"backdropStyle",2),a([tt({type:Boolean,reflect:!0})],xe.prototype,"portal",2),a([tt({attribute:"overlay-layer"})],xe.prototype,"overlayLayer",2),a([tt({attribute:!1})],xe.prototype,"container",2),a([tt()],xe.prototype,"locale",2),a([tt({attribute:!1})],xe.prototype,"translations",2),a([o0("dialog")],xe.prototype,"_dialog",2),a([o0('[part="header"]')],xe.prototype,"_headerEl",2),a([bl()],xe.prototype,"_shaking",2),a([bl()],xe.prototype,"_opening",2),a([bl()],xe.prototype,"_resizing",2),a([bl()],xe.prototype,"_activeResizeHandle",2),xe=a([By("lui-dialog")],xe);import{css as Yy,html as Nd,LitElement as Xy,nothing as Ga}from"lit";import{customElement as Zy,property as
|
|
12904
|
+
`],a([tt({type:Boolean,reflect:!0})],xe.prototype,"open",2),a([tt()],xe.prototype,"title",2),a([tt({type:Boolean,attribute:"no-close"})],xe.prototype,"noClose",2),a([tt({attribute:"close-on-outside-press",reflect:!0,converter:i0})],xe.prototype,"closeOnOutsidePress",2),a([tt({attribute:"shake-on-outside-click",reflect:!0,converter:i0})],xe.prototype,"shakeOnOutsideClick",2),a([tt({type:Boolean,reflect:!0,attribute:"no-header"})],xe.prototype,"noHeader",2),a([tt({type:Boolean,reflect:!0,attribute:"no-footer"})],xe.prototype,"noFooter",2),a([tt({type:Boolean,reflect:!0})],xe.prototype,"draggable",2),a([tt({attribute:"drag-handle"})],xe.prototype,"dragHandle",2),a([tt({type:Boolean,reflect:!0})],xe.prototype,"resizable",2),a([tt({type:Boolean,reflect:!0,attribute:"destroy-on-close"})],xe.prototype,"destroyOnClose",2),a([tt({type:Boolean,reflect:!0})],xe.prototype,"fullscreen",2),a([tt()],xe.prototype,"width",2),a([tt({type:Number,attribute:"drag-visible-margin-x"})],xe.prototype,"dragVisibleMarginX",2),a([tt({type:Number,attribute:"drag-visible-margin-y"})],xe.prototype,"dragVisibleMarginY",2),a([tt({reflect:!0})],xe.prototype,"placement",2),a([tt()],xe.prototype,"offset",2),a([tt({reflect:!0})],xe.prototype,"backdrop",2),a([tt({attribute:"backdrop-style"})],xe.prototype,"backdropStyle",2),a([tt({type:Boolean,reflect:!0})],xe.prototype,"portal",2),a([tt({attribute:"overlay-layer"})],xe.prototype,"overlayLayer",2),a([tt({attribute:!1})],xe.prototype,"container",2),a([tt()],xe.prototype,"locale",2),a([tt({attribute:!1})],xe.prototype,"translations",2),a([o0("dialog")],xe.prototype,"_dialog",2),a([o0('[part="header"]')],xe.prototype,"_headerEl",2),a([bl()],xe.prototype,"_shaking",2),a([bl()],xe.prototype,"_opening",2),a([bl()],xe.prototype,"_resizing",2),a([bl()],xe.prototype,"_activeResizeHandle",2),xe=a([By("lui-dialog")],xe);import{css as Yy,html as Nd,LitElement as Xy,nothing as Ga}from"lit";import{customElement as Zy,property as lr,query as Qy,state as Ld}from"lit/decorators.js";var n0={fromAttribute(i){return i==null?!1:i!=="false"&&i!=="0"},toAttribute(i){return i?"":null}},qe=class extends Xy{constructor(){super(...arguments);this.open=!1;this.title="";this.placement="right";this.radius="lg";this.backdrop="opaque";this.backdropStyle="";this.noClose=!1;this.noHeader=!1;this.noFooter=!1;this.closeOnOutsidePress=!0;this.shakeOnOutsideClick=!0;this.portal=!1;this.overlayLayer="modal";this._present=!1;this._opening=!1;this._shaking=!1;this._explicitAttrs=new Set;this._overlayStackRegistered=!1;this._portalPlaceholder=null;this._portalLayerEl=null;this._isPortalMoving=!1;this._shakeTimer=0;this._shakeAnimation=null;this._openingTimer=0;this._closeTimer=0;this._onBackdropPointerDown=e=>{if(e.preventDefault(),e.stopPropagation(),!this._isTopmost())return;if(this._emitOutsidePress(e)&&this.closeOnOutsidePress){this.close();return}this._shake()}}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._disposeLocaleChange=ke(()=>this.requestUpdate()),this._lightDomObserver=new MutationObserver(()=>this.requestUpdate()),this._lightDomObserver.observe(this,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["slot"]})}disconnectedCallback(){this._releaseOverlayStack(),super.disconnectedCallback(),this._disposeLocaleChange?.(),this._lightDomObserver?.disconnect(),window.clearTimeout(this._shakeTimer),this._shakeAnimation?.cancel(),this._shakeAnimation=null,window.clearTimeout(this._openingTimer),window.clearTimeout(this._closeTimer),this._isPortalMoving||(this._portalPlaceholder?.remove(),this._portalPlaceholder=null,this._portalLayerEl=null)}willUpdate(e){e.has("open")&&(window.clearTimeout(this._closeTimer),this.open&&(this._present=!0,this._opening=!0,window.clearTimeout(this._openingTimer),this._openingTimer=window.setTimeout(()=>{this._opening=!1},280)));let t=F(this,"drawer");!this._explicitAttrs.has("placement")&&typeof t.placement=="string"&&(this.placement=t.placement),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&(this.radius=t.radius),!this._explicitAttrs.has("backdrop")&&typeof t.backdrop=="string"&&(this.backdrop=t.backdrop),!this._explicitAttrs.has("backdrop-style")&&typeof t.backdropStyle=="string"&&(this.backdropStyle=t.backdropStyle),!this._explicitAttrs.has("no-close")&&typeof t.noClose=="boolean"&&(this.noClose=t.noClose),!this._explicitAttrs.has("no-header")&&typeof t.noHeader=="boolean"&&(this.noHeader=t.noHeader),!this._explicitAttrs.has("no-footer")&&typeof t.noFooter=="boolean"&&(this.noFooter=t.noFooter),!this._explicitAttrs.has("close-on-outside-press")&&typeof t.closeOnOutsidePress=="boolean"&&(this.closeOnOutsidePress=t.closeOnOutsidePress),!this._explicitAttrs.has("shake-on-outside-click")&&typeof t.shakeOnOutsideClick=="boolean"&&(this.shakeOnOutsideClick=t.shakeOnOutsideClick),!this._explicitAttrs.has("portal")&&typeof t.portal=="boolean"&&(this.portal=t.portal),!this._explicitAttrs.has("overlay-layer")&&typeof t.overlayLayer=="string"&&(this.overlayLayer=t.overlayLayer),this.container==null&&t.container!=null&&(this.container=t.container)}updated(e){let t=e.has("portal")||e.has("container")||e.has("overlayLayer");this.open&&(e.has("open")||t)&&(this.portal?this._moveToPortalLayer():t&&this._restorePortalPlacement(),this._registerOverlayStack(),nt(this),e.has("open")&&this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))),e.has("open")&&!this.open&&(this._opening=!1,this._shaking=!1,window.clearTimeout(this._closeTimer),this._closeTimer=window.setTimeout(()=>{this.open||(this._present=!1,this._releaseOverlayStack(),this._restorePortalPlacement())},280))}show(){this.open||(this.portal&&this._moveToPortalLayer(),this._present=!0,this.open=!0)}close(e=!0){if(this.open){if(e){let t=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(t),t.defaultPrevented)return}this.open=!1}}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}_isTopmost(){return!this._overlayStackRegistered||Rs(this)}_registerOverlayStack(){let e=gn(this);if(!e){this._releaseOverlayStack();return}zt(this,e.layer,e.layerName),this._overlayStackRegistered=!0}_releaseOverlayStack(){this._overlayStackRegistered&&(mo(this),this._overlayStackRegistered=!1)}_resolvePortalMountTarget(){return Zt(this.overlayLayer||"modal",this.container??pi(this)??hi(this))}_moveToPortalLayer(){let e=this._resolvePortalMountTarget();if(this.parentNode===e){this._portalLayerEl=e;return}!this._portalPlaceholder&&this.parentNode&&(this._portalPlaceholder=this.ownerDocument.createComment("lui-drawer-portal"),this.parentNode.insertBefore(this._portalPlaceholder,this.nextSibling)),this._isPortalMoving=!0;try{e.appendChild(this),this._portalLayerEl=e}finally{this._isPortalMoving=!1}}_restorePortalPlacement(){if(!this._portalPlaceholder){this._portalLayerEl=null;return}let e=this._portalPlaceholder.parentNode;this._isPortalMoving=!0;try{e&&e.insertBefore(this,this._portalPlaceholder),this._portalPlaceholder.remove(),this._portalPlaceholder=null,this._portalLayerEl=null}finally{this._isPortalMoving=!1}}async _shake(){if(!this.shakeOnOutsideClick||!this.open||(window.clearTimeout(this._shakeTimer),window.clearTimeout(this._openingTimer),this._opening=!1,this._shaking=!1,await this.updateComplete,!this.open))return;let e=this._panelEl;if(!e)return;this._shakeAnimation?.cancel();let r=this.placement==="left"||this.placement==="right"?[{transform:"translate3d(0, 0, 0)",offset:0},{transform:"translate3d(-10px, 0, 0)",offset:.18},{transform:"translate3d(10px, 0, 0)",offset:.36},{transform:"translate3d(-6px, 0, 0)",offset:.54},{transform:"translate3d(6px, 0, 0)",offset:.72},{transform:"translate3d(0, 0, 0)",offset:1}]:[{transform:"translate3d(0, 0, 0)",offset:0},{transform:"translate3d(0, -10px, 0)",offset:.18},{transform:"translate3d(0, 10px, 0)",offset:.36},{transform:"translate3d(0, -6px, 0)",offset:.54},{transform:"translate3d(0, 6px, 0)",offset:.72},{transform:"translate3d(0, 0, 0)",offset:1}];if(typeof e.animate=="function"){this._shakeAnimation=e.animate(r,{duration:380,easing:"cubic-bezier(0.36, 0.07, 0.19, 0.97)"}),this._shakeAnimation.onfinish=()=>{this._shakeAnimation=null},this._shakeAnimation.oncancel=()=>{this._shakeAnimation=null};return}e.offsetWidth,this._shaking=!0,this._shakeTimer=window.setTimeout(()=>{this._shaking=!1},380)}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}render(){if(!this.open&&!this._present)return Ga;let e=Array.from(this.childNodes).some(t=>t.nodeType===Node.ELEMENT_NODE&&t.slot==="footer");return Nd`
|
|
12875
12905
|
<div class="backdrop" part="backdrop" @pointerdown=${this._onBackdropPointerDown}></div>
|
|
12876
12906
|
<div class="custom-backdrop" part="custom-backdrop" style=${this.backdropStyle||Ga} ?hidden=${this.backdrop!=="custom"} @pointerdown=${this._onBackdropPointerDown}>
|
|
12877
12907
|
<slot name="backdrop"></slot>
|
|
@@ -13128,7 +13158,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13128
13158
|
animation: none;
|
|
13129
13159
|
}
|
|
13130
13160
|
}
|
|
13131
|
-
`],a([
|
|
13161
|
+
`],a([lr({type:Boolean,reflect:!0})],qe.prototype,"open",2),a([lr()],qe.prototype,"title",2),a([lr({reflect:!0})],qe.prototype,"placement",2),a([lr({reflect:!0})],qe.prototype,"radius",2),a([lr({reflect:!0})],qe.prototype,"backdrop",2),a([lr({attribute:"backdrop-style"})],qe.prototype,"backdropStyle",2),a([lr({type:Boolean,attribute:"no-close"})],qe.prototype,"noClose",2),a([lr({type:Boolean,reflect:!0,attribute:"no-header"})],qe.prototype,"noHeader",2),a([lr({type:Boolean,reflect:!0,attribute:"no-footer"})],qe.prototype,"noFooter",2),a([lr({attribute:"close-on-outside-press",reflect:!0,converter:n0})],qe.prototype,"closeOnOutsidePress",2),a([lr({attribute:"shake-on-outside-click",reflect:!0,converter:n0})],qe.prototype,"shakeOnOutsideClick",2),a([lr({reflect:!0})],qe.prototype,"portal",2),a([lr({attribute:"overlay-layer"})],qe.prototype,"overlayLayer",2),a([lr({attribute:!1})],qe.prototype,"container",2),a([lr()],qe.prototype,"locale",2),a([lr({attribute:!1})],qe.prototype,"translations",2),a([Qy(".panel")],qe.prototype,"_panelEl",2),a([Ld()],qe.prototype,"_present",2),a([Ld()],qe.prototype,"_opening",2),a([Ld()],qe.prototype,"_shaking",2),qe=a([Zy("lui-drawer")],qe);import{css as Jy,html as Eo,LitElement as e4,nothing as Ya}from"lit";import{customElement as t4,property as Fo,query as r4,state as a0}from"lit/decorators.js";import{repeat as o4}from"lit/directives/repeat.js";function Bd(i){return String(i??"").trim().toLowerCase()}function i4(i){return i?Array.isArray(i)?i:i.split(/[+\s]/).filter(Boolean):[]}function n4(i,o){let e=o.toLowerCase().split("+").map(d=>d.trim()).filter(Boolean),t=e.find(d=>!["mod","cmd","meta","ctrl","control","alt","shift"].includes(d)),r=e.includes("mod"),n=e.includes("cmd")||e.includes("meta")||r&&/mac|iphone|ipad|ipod/i.test(navigator.platform),s=e.includes("ctrl")||e.includes("control")||r&&!/mac|iphone|ipad|ipod/i.test(navigator.platform);return!!i.metaKey!==n||!!i.ctrlKey!==s||!!i.altKey!==e.includes("alt")||!!i.shiftKey!==e.includes("shift")?!1:t?Bd(i.key)===t:!0}var jt=class extends e4{constructor(){super(...arguments);this.open=!1;this.items=[];this.size="md";this.backdrop="blur";this.placeholder="\u641C\u7D22\u547D\u4EE4\u3001\u6587\u4EF6\u6216\u64CD\u4F5C...";this.emptyText="\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u547D\u4EE4";this.hotkey="mod+k";this.closeOnSelect=!0;this.closeOnOutsidePress=!0;this.showFooter=!0;this._query="";this._activeIndex=0;this._onGlobalKeyDown=e=>{if(this.hotkey&&n4(e,this.hotkey)){e.preventDefault(),this.toggle();return}this.open&&e.key==="Escape"&&(e.preventDefault(),this.close())};this._onInput=e=>{this._query=e.target.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this._query},bubbles:!0,composed:!0})),this._activeIndex=this._firstEnabledIndex(this._flatFiltered())};this._onKeyDown=e=>{if(e.key==="ArrowDown")e.preventDefault(),this._moveActive(1);else if(e.key==="ArrowUp")e.preventDefault(),this._moveActive(-1);else if(e.key==="Enter"){e.preventDefault();let t=this._flatFiltered()[this._activeIndex];t&&this._select(t)}};this._onLayerClick=e=>{if(e.target!==e.currentTarget)return;this._emitOutsidePress(e)&&this.closeOnOutsidePress&&this.close()}}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this._onGlobalKeyDown)}disconnectedCallback(){window.removeEventListener("keydown",this._onGlobalKeyDown),super.disconnectedCallback()}updated(e){e.has("open")&&(this.open?(this._activeIndex=this._firstEnabledIndex(this._flatFiltered()),requestAnimationFrame(()=>this._inputEl?.focus()),this.dispatchEvent(new CustomEvent("open",{detail:{open:!0},bubbles:!0,composed:!0}))):this.dispatchEvent(new CustomEvent("close",{detail:{open:!1},bubbles:!0,composed:!0})))}show(){this.open=!0}close(){this.open=!1}toggle(){this.open=!this.open}clear(){this._query="",this._activeIndex=this._firstEnabledIndex(this._flatFiltered())}_score(e,t){if(!t)return 1;let r=[e.label,e.description,e.group,e.id,...e.keywords??[]].map(Bd),n=0;for(let s of r)if(s)if(s===t)n=Math.max(n,100);else if(s.startsWith(t))n=Math.max(n,80);else if(s.includes(t))n=Math.max(n,50);else{let d=0,h=0;for(let p of t){let f=s.indexOf(p,d);if(f===-1)break;h+=1,d=f+1}h===t.length&&(n=Math.max(n,20+h))}return n}_filtered(){let e=Bd(this._query),t=this.items.map((n,s)=>({item:n,index:s,score:this._score(n,e)})).filter(n=>!e||n.score>0).sort((n,s)=>e&&s.score-n.score||n.index-s.index),r=new Map;for(let{item:n}of t){let s=n.group||"Commands",d=r.get(s)??[];d.push(n),r.set(s,d)}return[...r.entries()].map(([n,s])=>({group:n,items:s}))}_flatFiltered(){return this._filtered().flatMap(e=>e.items)}_firstEnabledIndex(e){let t=e.findIndex(r=>!r.disabled);return t>=0?t:0}_moveActive(e){let t=this._flatFiltered();if(!t.length)return;let r=this._activeIndex;for(let n=0;n<t.length;n+=1)if(r=(r+e+t.length)%t.length,!t[r]?.disabled){this._activeIndex=r,requestAnimationFrame(()=>{this.renderRoot.querySelector(`[data-command-index="${r}"]`)?.scrollIntoView({block:"nearest"})});return}}_select(e){if(e.disabled)return;let t={item:e,id:e.id,value:e.value,query:this._query};this.dispatchEvent(new CustomEvent("select",{detail:t,bubbles:!0,composed:!0})),this.closeOnSelect&&this.close()}_emitOutsidePress(e){let t=new CustomEvent("outside-press",{detail:{originalEvent:e,target:e.target},bubbles:!0,composed:!0,cancelable:!0});return this.dispatchEvent(t),!t.defaultPrevented}_renderShortcut(e){let t=i4(e);return t.length?Eo`<span class="shortcut">${t.map(r=>Eo`<kbd>${r==="mod"?"\u2318/Ctrl":r}</kbd>`)}</span>`:Ya}_renderItem(e,t){let r=t===this._activeIndex,n=["item",r?"active":"",e.disabled?"disabled":"",e.danger?"danger":""].filter(Boolean).join(" ");return Eo`
|
|
13132
13162
|
<button
|
|
13133
13163
|
class=${n}
|
|
13134
13164
|
type="button"
|
|
@@ -13421,7 +13451,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13421
13451
|
.panel { max-height: calc(100vh - 28px); }
|
|
13422
13452
|
.footer { display: none; }
|
|
13423
13453
|
}
|
|
13424
|
-
`],a([Fo({type:Boolean,reflect:!0})],jt.prototype,"open",2),a([Fo({attribute:!1})],jt.prototype,"items",2),a([Fo({reflect:!0})],jt.prototype,"size",2),a([Fo({reflect:!0})],jt.prototype,"backdrop",2),a([Fo()],jt.prototype,"placeholder",2),a([Fo({attribute:"empty-text"})],jt.prototype,"emptyText",2),a([Fo()],jt.prototype,"hotkey",2),a([Fo({type:Boolean,attribute:"close-on-select"})],jt.prototype,"closeOnSelect",2),a([Fo({type:Boolean,attribute:"close-on-outside-press"})],jt.prototype,"closeOnOutsidePress",2),a([Fo({type:Boolean,attribute:"show-footer"})],jt.prototype,"showFooter",2),a([a0()],jt.prototype,"_query",2),a([a0()],jt.prototype,"_activeIndex",2),a([r4("input")],jt.prototype,"_inputEl",2),jt=a([t4("lui-command-palette")],jt);import{css as c4,html as Xa,LitElement as d4,nothing as yl}from"lit";import{customElement as u4,property as No}from"lit/decorators.js";var a4={info:"info",success:"success",warning:"warning",danger:"danger",error:"danger",exception:"danger",normal:null,active:null,none:null},s4={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-x"};function Un(i){return i?a4[i]??null:null}function ni(i){let o=Un(i);return o?s4[o]:""}function l4(i,o=!1){let e=Un(i);return e?`--lui-color-${e}${o?"-soft":""}`:""}function sE(i,o=!1){let e=l4(i,o);return e?`var(${e})`:""}var lE=Object.freeze(["info","success","warning","danger"]);var
|
|
13454
|
+
`],a([Fo({type:Boolean,reflect:!0})],jt.prototype,"open",2),a([Fo({attribute:!1})],jt.prototype,"items",2),a([Fo({reflect:!0})],jt.prototype,"size",2),a([Fo({reflect:!0})],jt.prototype,"backdrop",2),a([Fo()],jt.prototype,"placeholder",2),a([Fo({attribute:"empty-text"})],jt.prototype,"emptyText",2),a([Fo()],jt.prototype,"hotkey",2),a([Fo({type:Boolean,attribute:"close-on-select"})],jt.prototype,"closeOnSelect",2),a([Fo({type:Boolean,attribute:"close-on-outside-press"})],jt.prototype,"closeOnOutsidePress",2),a([Fo({type:Boolean,attribute:"show-footer"})],jt.prototype,"showFooter",2),a([a0()],jt.prototype,"_query",2),a([a0()],jt.prototype,"_activeIndex",2),a([r4("input")],jt.prototype,"_inputEl",2),jt=a([t4("lui-command-palette")],jt);import{css as c4,html as Xa,LitElement as d4,nothing as yl}from"lit";import{customElement as u4,property as No}from"lit/decorators.js";var a4={info:"info",success:"success",warning:"warning",danger:"danger",error:"danger",exception:"danger",normal:null,active:null,none:null},s4={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-x"};function Un(i){return i?a4[i]??null:null}function ni(i){let o=Un(i);return o?s4[o]:""}function l4(i,o=!1){let e=Un(i);return e?`--lui-color-${e}${o?"-soft":""}`:""}function sE(i,o=!1){let e=l4(i,o);return e?`var(${e})`:""}var lE=Object.freeze(["info","success","warning","danger"]);var cr=class extends d4{constructor(){super(...arguments);this.status="info";this.variant="soft";this.radius="md";this.title="";this.description="";this.icon="";this.noIcon=!1;this.closable=!1}connectedCallback(){super.connectedCallback(),this._localeCleanup=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}close(){let e=new CustomEvent("close",{bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e)&&(this.hidden=!0)}render(){let e=F(this,"alert"),t=Un(this.status)??"info",r=e.variant??this.variant,n=this.icon||ni(t),s=!this.noIcon&&n!=="";return Xa`
|
|
13425
13455
|
<div
|
|
13426
13456
|
class="alert"
|
|
13427
13457
|
part="base"
|
|
@@ -13447,7 +13477,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13447
13477
|
</button>
|
|
13448
13478
|
`:yl}
|
|
13449
13479
|
</div>
|
|
13450
|
-
`}};
|
|
13480
|
+
`}};cr.styles=[A,P,c4`
|
|
13451
13481
|
:host {
|
|
13452
13482
|
display: block;
|
|
13453
13483
|
--lui-alert-radius: var(--lui-radius);
|
|
@@ -13564,7 +13594,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13564
13594
|
[part="close"] lui-icon {
|
|
13565
13595
|
--lui-icon-size: 15px;
|
|
13566
13596
|
}
|
|
13567
|
-
`],a([No({reflect:!0})],
|
|
13597
|
+
`],a([No({reflect:!0})],cr.prototype,"status",2),a([No({reflect:!0})],cr.prototype,"variant",2),a([No({reflect:!0})],cr.prototype,"radius",2),a([No()],cr.prototype,"title",2),a([No()],cr.prototype,"description",2),a([No()],cr.prototype,"icon",2),a([No({type:Boolean,attribute:"no-icon",reflect:!0})],cr.prototype,"noIcon",2),a([No({type:Boolean,reflect:!0})],cr.prototype,"closable",2),a([No({reflect:!0})],cr.prototype,"locale",2),a([No({attribute:!1})],cr.prototype,"translations",2),cr=a([u4("lui-alert")],cr);import{css as h4,html as xl,LitElement as p4,nothing as qd}from"lit";import{customElement as m4,property as dr,query as g4,state as f4}from"lit/decorators.js";var rt=class extends p4{constructor(){super(...arguments);this.title="";this.description="";this.status="warning";this.icon="";this.noIcon=!1;this.placement="top";this.confirmText="";this.cancelText="";this.disabled=!1;this.portal=!0;this.offsetDistance=8;this._loading=!1;this._onCancel=()=>{this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0})),this.hide()};this._onConfirmClick=async()=>{if(this._loading)return;let e=new CustomEvent("confirm",{bubbles:!0,composed:!0,cancelable:!0});if(this.dispatchEvent(e)){if(!this.onConfirm){this.hide();return}this._loading=!0;try{await this.onConfirm(),this.hide()}catch(t){this.dispatchEvent(new CustomEvent("confirm-error",{bubbles:!0,composed:!0,detail:{error:t}}))}finally{this._loading=!1}}}}connectedCallback(){super.connectedCallback(),this._localeCleanup=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}show(){this._popover?.show()}hide(){this._popover?.hide()}render(){let e=F(this,"popconfirm"),t=Un(this.status)??"warning",r=this.icon||ni(t),n=!this.noIcon&&r!=="",s=this.confirmVariant??e.confirmVariant??(t==="danger"?"danger":"primary"),d=this.cancelVariant??e.cancelVariant??"ghost";return xl`
|
|
13568
13598
|
<lui-popover
|
|
13569
13599
|
trigger="click"
|
|
13570
13600
|
.placement=${this.placement}
|
|
@@ -13671,7 +13701,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13671
13701
|
gap: 6px;
|
|
13672
13702
|
margin-top: 10px;
|
|
13673
13703
|
}
|
|
13674
|
-
`],a([
|
|
13704
|
+
`],a([dr()],rt.prototype,"title",2),a([dr()],rt.prototype,"description",2),a([dr({reflect:!0})],rt.prototype,"status",2),a([dr()],rt.prototype,"icon",2),a([dr({type:Boolean,attribute:"no-icon",reflect:!0})],rt.prototype,"noIcon",2),a([dr({reflect:!0})],rt.prototype,"placement",2),a([dr({attribute:"confirm-text"})],rt.prototype,"confirmText",2),a([dr({attribute:"cancel-text"})],rt.prototype,"cancelText",2),a([dr({attribute:"confirm-variant"})],rt.prototype,"confirmVariant",2),a([dr({attribute:"cancel-variant"})],rt.prototype,"cancelVariant",2),a([dr({type:Boolean,reflect:!0})],rt.prototype,"disabled",2),a([dr({type:Boolean})],rt.prototype,"portal",2),a([dr({type:Number,attribute:"offset-distance"})],rt.prototype,"offsetDistance",2),a([dr({attribute:!1})],rt.prototype,"onConfirm",2),a([dr({reflect:!0})],rt.prototype,"locale",2),a([dr({attribute:!1})],rt.prototype,"translations",2),a([f4()],rt.prototype,"_loading",2),a([g4("lui-popover")],rt.prototype,"_popover",2),rt=a([m4("lui-popconfirm")],rt);import{css as v4,html as wl,LitElement as b4,nothing as Gn}from"lit";import{customElement as k4,property as Dr}from"lit/decorators.js";var y4={fromAttribute(i){return i==null?!0:i!=="false"&&i!=="0"},toAttribute(i){return i?"":"false"}},Ct=class extends b4{constructor(){super(...arguments);this.type="line";this.percent=0;this.status="normal";this.size="md";this.radius="full";this.showText=!0;this.textInside=!1;this.striped=!1;this.indeterminate=!1;this.disabled=!1;this.label="";this.pauseWhenHidden=!0;this._explicitAttrs=new Set}connectedCallback(){super.connectedCallback(),this._explicitAttrs=new Set(this.getAttributeNames()),this._setupIntersectionObserver()}disconnectedCallback(){super.disconnectedCallback(),this._intersectionObserver?.disconnect()}_setupIntersectionObserver(){this._intersectionObserver?.disconnect(),this.dataset.inView="true",!(!this.pauseWhenHidden||typeof IntersectionObserver>"u")&&(this._intersectionObserver=new IntersectionObserver(e=>{let t=e[0];this.dataset.inView=t?.isIntersecting?"true":"false"}),this._intersectionObserver.observe(this))}willUpdate(e){e.has("pauseWhenHidden")&&this._setupIntersectionObserver();let t=F(this,"progress");!this._explicitAttrs.has("size")&&typeof t.size=="string"&&this.size!==t.size&&(this.size=t.size),!this._explicitAttrs.has("status")&&typeof t.status=="string"&&this.status!==t.status&&(this.status=t.status),!this._explicitAttrs.has("radius")&&typeof t.radius=="string"&&this.radius!==t.radius&&(this.radius=t.radius),!this._explicitAttrs.has("disabled")&&typeof t.disabled=="boolean"&&this.disabled!==t.disabled&&(this.disabled=t.disabled),!this._explicitAttrs.has("show-text")&&typeof t.showText=="boolean"&&this.showText!==t.showText&&(this.showText=t.showText),!this._explicitAttrs.has("text-inside")&&typeof t.textInside=="boolean"&&this.textInside!==t.textInside&&(this.textInside=t.textInside),!this._explicitAttrs.has("striped")&&typeof t.striped=="boolean"&&this.striped!==t.striped&&(this.striped=t.striped)}_clampPercent(){return Number.isFinite(this.percent)?Math.max(0,Math.min(100,this.percent)):0}_resolvedStatus(e){return this.status==="normal"&&e>=100?"success":this.status}_statusIcon(e){return ni(e)}_formatText(e,t){return this.format?this.format(e,t):this.indeterminate?this.label||"Loading":`${Math.round(e)}%`}_statusColorVar(e){return e==="success"?"var(--lui-color-success)":e==="warning"?"var(--lui-color-warning)":e==="danger"||e==="exception"?"var(--lui-color-danger)":"var(--lui-color-primary)"}_progressStyle(e,t){let r=[`--lui-progress-percent:${e}%`,`--lui-progress-fill-bg:${this._statusColorVar(t)}`,`--lui-progress-fill-min-width:${this.textInside&&e>0?"34px":"0px"}`];return typeof this.strokeWidth=="number"&&Number.isFinite(this.strokeWidth)&&r.push(`--lui-progress-height:${Math.max(1,this.strokeWidth)}px`),r.join(";")}render(){let e=this._clampPercent(),t=this._resolvedStatus(e),r=this._statusIcon(t),n=this._formatText(e,t),s=this.label||"Progress";return wl`
|
|
13675
13705
|
<div
|
|
13676
13706
|
class="progress"
|
|
13677
13707
|
part="progress"
|
|
@@ -13894,7 +13924,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13894
13924
|
inset-inline-start: 100%;
|
|
13895
13925
|
}
|
|
13896
13926
|
}
|
|
13897
|
-
`],a([
|
|
13927
|
+
`],a([Dr({reflect:!0})],Ct.prototype,"type",2),a([Dr({type:Number})],Ct.prototype,"percent",2),a([Dr({reflect:!0})],Ct.prototype,"status",2),a([Dr({reflect:!0})],Ct.prototype,"size",2),a([Dr({reflect:!0})],Ct.prototype,"radius",2),a([Dr({type:Number,attribute:"stroke-width"})],Ct.prototype,"strokeWidth",2),a([Dr({attribute:"show-text",converter:y4})],Ct.prototype,"showText",2),a([Dr({type:Boolean,reflect:!0,attribute:"text-inside"})],Ct.prototype,"textInside",2),a([Dr({type:Boolean,reflect:!0})],Ct.prototype,"striped",2),a([Dr({type:Boolean,reflect:!0})],Ct.prototype,"indeterminate",2),a([Dr({type:Boolean,reflect:!0})],Ct.prototype,"disabled",2),a([Dr()],Ct.prototype,"label",2),a([Dr({attribute:!1})],Ct.prototype,"format",2),a([Dr({type:Boolean,attribute:"pause-when-hidden"})],Ct.prototype,"pauseWhenHidden",2),Ct=a([k4("lui-progress")],Ct);import{css as x4,html as Ti,LitElement as w4,nothing as Kd}from"lit";import{customElement as _4,property as Er,query as M4,state as Wd}from"lit/decorators.js";var Xe=class extends w4{constructor(){super(...arguments);this.nodes=[];this.value=[];this.size="md";this.placeholder="";this.separator=" / ";this.expandTrigger="click";this.changeOnSelect=!1;this.disabled=!1;this.clearable=!1;this.invalid=!1;this.portal=!0;this.open=!1;this._activePath=[];this._loadingKey="";this._loaded={};this._onTriggerClick=()=>{this._setOpen(!this.open)};this._onTriggerKeyDown=e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),this._setOpen(!this.open);return}if(e.key==="ArrowDown"&&!this.open){e.preventDefault(),this._setOpen(!0);return}e.key==="Escape"&&this.open&&(e.stopPropagation(),this._setOpen(!1))};this._clear=e=>{e.stopPropagation(),this._activePath=[],this._commit([])}}connectedCallback(){super.connectedCallback(),this._localeCleanup=ke(()=>this.requestUpdate()),this._activePath=[...this.value]}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}willUpdate(e){e.has("value")&&(this._activePath=[...this.value])}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}_childrenOf(e,t){let r=e.children;return Array.isArray(r)&&r.length?r:this._loaded[t.join("\0")]??[]}_hasChildren(e,t){return this._childrenOf(e,t).length>0?!0:!!e.hasChildren&&!e.isLeaf}get _columns(){let e=[this.nodes],t=this.nodes;for(let r=0;r<this._activePath.length;r+=1){let n=this._activePath[r],s=t.find(h=>Vt(h)===n);if(!s)break;let d=this._childrenOf(s,this._activePath.slice(0,r+1));if(!d.length)break;e.push(d),t=d}return e}_nodesForPath(e){let t=[],r=this.nodes;for(let n of e){let s=r.find(d=>Vt(d)===n);if(!s)break;t.push(s),r=this._childrenOf(s,e.slice(0,t.length))}return t}get _displayLabel(){let e=this._nodesForPath(this.value);return e.length!==this.value.length||!e.length?"":e.map(Oo).join(this.separator)}_setOpen(e){this.disabled||this.open===e||(this.open=e,e?(this._activePath=[...this.value],this._popover?.show()):this._popover?.hide())}_commit(e){this.value=e;let t=this._nodesForPath(e);this.dispatchEvent(new CustomEvent("change",{detail:{value:e,nodes:t,label:t.map(Oo).join(this.separator)},bubbles:!0,composed:!0}))}async _openNode(e,t){this._activePath=t;let r=Vt(e);if(!(this._childrenOf(e,t).length>0||!this.childrenLoader||!this._hasChildren(e,t))){this._loadingKey=r;try{let s=await this.childrenLoader(e,t);this._loaded={...this._loaded,[t.join("\0")]:s}}finally{this._loadingKey=""}}}async _onOptionClick(e,t){if(e.disabled)return;let r=[...this._activePath.slice(0,t),Vt(e)];if(this._hasChildren(e,r)){await this._openNode(e,r),this.changeOnSelect&&this._commit(r);return}this._activePath=r,this._commit(r),this._setOpen(!1)}_onOptionEnter(e,t){if(this.expandTrigger!=="hover"||e.disabled)return;let r=[...this._activePath.slice(0,t),Vt(e)];this._hasChildren(e,r)?this._openNode(e,r):this._activePath=r}render(){let t=F(this,"cascader").size??this.size,r=this._displayLabel,n=r!=="",s=this.clearable&&n&&!this.disabled,d=this._columns;return Ti`
|
|
13898
13928
|
<lui-popover
|
|
13899
13929
|
trigger="manual"
|
|
13900
13930
|
placement="bottom-start"
|
|
@@ -13963,7 +13993,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13963
13993
|
`):Ti`<div part="empty">${this._t("select.empty","\u6CA1\u6709\u53EF\u9009\u9879")}</div>`}
|
|
13964
13994
|
</div>
|
|
13965
13995
|
</lui-popover>
|
|
13966
|
-
`}};Xe.styles=[A,P,
|
|
13996
|
+
`}};Xe.styles=[A,P,jr,Vi,x4`
|
|
13967
13997
|
:host {
|
|
13968
13998
|
display: inline-block;
|
|
13969
13999
|
width: 100%;
|
|
@@ -13989,7 +14019,9 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
13989
14019
|
[part="trigger"][data-has-clear] {
|
|
13990
14020
|
padding-inline-end: var(--lui-control-gutter-2);
|
|
13991
14021
|
}
|
|
13992
|
-
|
|
14022
|
+
/* :not(:focus-visible):not(.open) keeps hover from out-ranking the
|
|
14023
|
+
* activated border below; the hover selector otherwise wins on specificity. */
|
|
14024
|
+
[part="trigger"]:hover:not(.disabled):not(:focus-visible):not(.open) {
|
|
13993
14025
|
border-color: var(--lui-color-border-strong);
|
|
13994
14026
|
}
|
|
13995
14027
|
[part="trigger"].open:not(.disabled),
|
|
@@ -14059,7 +14091,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14059
14091
|
font-size: var(--lui-font-size-sm);
|
|
14060
14092
|
text-align: center;
|
|
14061
14093
|
}
|
|
14062
|
-
`],a([
|
|
14094
|
+
`],a([Er({attribute:!1})],Xe.prototype,"nodes",2),a([Er({attribute:!1})],Xe.prototype,"value",2),a([Er({reflect:!0})],Xe.prototype,"size",2),a([Er()],Xe.prototype,"placeholder",2),a([Er()],Xe.prototype,"separator",2),a([Er({reflect:!0,attribute:"expand-trigger"})],Xe.prototype,"expandTrigger",2),a([Er({type:Boolean,attribute:"change-on-select"})],Xe.prototype,"changeOnSelect",2),a([Er({type:Boolean,reflect:!0})],Xe.prototype,"disabled",2),a([Er({type:Boolean,reflect:!0})],Xe.prototype,"clearable",2),a([Er({type:Boolean,reflect:!0})],Xe.prototype,"invalid",2),a([Er({attribute:!1})],Xe.prototype,"childrenLoader",2),a([Er({type:Boolean})],Xe.prototype,"portal",2),a([Er({type:Boolean,reflect:!0,attribute:"open"})],Xe.prototype,"open",2),a([Er({reflect:!0})],Xe.prototype,"locale",2),a([Er({attribute:!1})],Xe.prototype,"translations",2),a([Wd()],Xe.prototype,"_activePath",2),a([Wd()],Xe.prototype,"_loadingKey",2),a([Wd()],Xe.prototype,"_loaded",2),a([M4("lui-popover")],Xe.prototype,"_popover",2),Xe=a([_4("lui-cascader")],Xe);import{css as C4,html as Za,LitElement as z4,nothing as E4}from"lit";import{customElement as S4,property as ur,query as s0,state as $4}from"lit/decorators.js";var Ze=class extends z4{constructor(){super(...arguments);this.nodes=[];this.value="";this.mode="single";this.size="md";this.placeholder="";this.disabled=!1;this.clearable=!1;this.invalid=!1;this.filterable=!1;this.checkStrictly=!1;this.portal=!0;this.open=!1;this._keys=[];this._onTreeSelect=e=>{if(this.mode!=="single")return;e.stopPropagation();let t=e.detail;t?.key&&this._commit([t.key],!0)};this._onTreeCheck=e=>{if(this.mode!=="multiple")return;e.stopPropagation();let t=e.detail;this._commit(t?.checkedKeys??[],!0)};this._onTriggerClick=()=>{this._setOpen(!this.open)};this._onTriggerKeyDown=e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),this._setOpen(!this.open);return}if(e.key==="ArrowDown"&&!this.open){e.preventDefault(),this._setOpen(!0);return}e.key==="Escape"&&this.open&&(e.stopPropagation(),this._setOpen(!1))};this._clear=e=>{e.stopPropagation(),this._commit([],!1)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=ke(()=>this.requestUpdate()),this._keys=this._keysFromValue()}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}willUpdate(e){if(e.has("value")||e.has("mode")){this._keys=this._keysFromValue();let t=this.mode==="multiple"?this._keys:this._keys[0]??"";Array.isArray(t)!==Array.isArray(this.value)&&(this.value=t)}}_keysFromValue(){return Array.isArray(this.value)?this.value.filter(Boolean):this.value?[this.value]:[]}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}_findNodes(e){if(!e.length)return[];let t=new Set(e),r=[],n=s=>{for(let d of s){t.has(Vt(d))&&r.push(d);let h=d.children;Array.isArray(h)&&h.length&&n(h)}};return n(this.nodes),r}get _selectedNodes(){return this._findNodes(this._keys)}_setOpen(e){this.disabled||this.open===e||(this.open=e,e?this._popover?.show():this._popover?.hide())}_shouldCloseAfterPick(){return this.closeOnSelect??this.mode==="single"}_commit(e,t){this._keys=e;let r=this._findNodes(e),n=this.mode==="multiple"?e:e[0]??"";this.value=n,this.dispatchEvent(new CustomEvent("change",{detail:{value:n,keys:e,nodes:r},bubbles:!0,composed:!0})),t&&this._shouldCloseAfterPick()&&this._setOpen(!1)}_removeKey(e,t){t.stopPropagation(),this._commit(this._keys.filter(r=>r!==e),!1)}render(){let t=F(this,"treeSelect").size??this.size,r=this._selectedNodes,n=r.length>0,s=this.clearable&&n&&!this.disabled;return Za`
|
|
14063
14095
|
<lui-popover
|
|
14064
14096
|
trigger="manual"
|
|
14065
14097
|
placement="bottom-start"
|
|
@@ -14133,7 +14165,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14133
14165
|
></lui-tree>
|
|
14134
14166
|
</div>
|
|
14135
14167
|
</lui-popover>
|
|
14136
|
-
`}};Ze.styles=[A,P,
|
|
14168
|
+
`}};Ze.styles=[A,P,jr,C4`
|
|
14137
14169
|
:host {
|
|
14138
14170
|
display: inline-block;
|
|
14139
14171
|
width: 100%;
|
|
@@ -14159,7 +14191,9 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14159
14191
|
flex-wrap: wrap;
|
|
14160
14192
|
height: auto;
|
|
14161
14193
|
}
|
|
14162
|
-
|
|
14194
|
+
/* :not(:focus-visible):not(.open) keeps hover from out-ranking the
|
|
14195
|
+
* activated border below; the hover selector otherwise wins on specificity. */
|
|
14196
|
+
[part="trigger"]:hover:not(.disabled):not(:focus-visible):not(.open) {
|
|
14163
14197
|
border-color: var(--lui-color-border-strong);
|
|
14164
14198
|
}
|
|
14165
14199
|
[part="trigger"].open:not(.disabled) {
|
|
@@ -14206,7 +14240,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14206
14240
|
overscroll-behavior: contain;
|
|
14207
14241
|
scrollbar-width: thin;
|
|
14208
14242
|
}
|
|
14209
|
-
`],a([
|
|
14243
|
+
`],a([ur({attribute:!1})],Ze.prototype,"nodes",2),a([ur({attribute:!1})],Ze.prototype,"value",2),a([ur({reflect:!0})],Ze.prototype,"mode",2),a([ur({reflect:!0})],Ze.prototype,"size",2),a([ur()],Ze.prototype,"placeholder",2),a([ur({type:Boolean,reflect:!0})],Ze.prototype,"disabled",2),a([ur({type:Boolean,reflect:!0})],Ze.prototype,"clearable",2),a([ur({type:Boolean,reflect:!0})],Ze.prototype,"invalid",2),a([ur({type:Boolean,reflect:!0})],Ze.prototype,"filterable",2),a([ur({type:Boolean,attribute:"check-strictly"})],Ze.prototype,"checkStrictly",2),a([ur({attribute:!1})],Ze.prototype,"childrenLoader",2),a([ur({type:Boolean,attribute:"close-on-select"})],Ze.prototype,"closeOnSelect",2),a([ur({type:Boolean})],Ze.prototype,"portal",2),a([ur({type:Boolean,reflect:!0,attribute:"open"})],Ze.prototype,"open",2),a([ur({reflect:!0})],Ze.prototype,"locale",2),a([ur({attribute:!1})],Ze.prototype,"translations",2),a([$4()],Ze.prototype,"_keys",2),a([s0("lui-popover")],Ze.prototype,"_popover",2),a([s0("lui-tree")],Ze.prototype,"_tree",2),Ze=a([S4("lui-tree-select")],Ze);import{css as T4,html as Yn,LitElement as A4,nothing as l0}from"lit";import{customElement as j4,property as Fr,query as c0,state as Ud}from"lit/decorators.js";function P4(i){return typeof i=="string"?{label:i,value:i}:i}var Qe=class extends A4{constructor(){super(...arguments);this.options=[];this.value="";this.placeholder="";this.size="md";this.disabled=!1;this.readonly=!1;this.clearable=!1;this.invalid=!1;this.minChars=1;this.maxItems=0;this.portal=!0;this._matches=[];this._activeIndex=-1;this._open=!1;this._queryToken=0;this._onInput=async e=>{e.stopPropagation();let t=e.target.value??"";this.value=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:t},bubbles:!0,composed:!0})),await this._recompute(t),this._setOpen(this._shouldOpen(t)&&this._matches.length>0)};this._onFocus=async()=>{this.minChars>0&&!this.value||(await this._recompute(this.value),this._setOpen(this._shouldOpen(this.value)&&this._matches.length>0))};this._onKeyDown=e=>{if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(!this._open){this._onFocus();return}e.preventDefault();let t=this._matches.length;if(!t)return;let r=e.key==="ArrowDown"?1:-1,n=this._activeIndex;for(let s=0;s<t&&(n=(n+r+t)%t,!!this._matches[n]?.disabled);s+=1);this._activeIndex=n;return}if(e.key==="Enter"){let t=this._matches[this._activeIndex];this._open&&t&&(e.preventDefault(),this._commit(t));return}if(e.key==="Escape"){this._open&&(e.stopPropagation(),this._setOpen(!1));return}e.key==="Tab"&&this._setOpen(!1)};this._onClear=()=>{this.value="",this._matches=[],this._setOpen(!1)}}connectedCallback(){super.connectedCallback(),this._localeCleanup=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}get _pool(){return this.options.map(P4)}_defaultFilter(e,t){if(!e)return t;let r=e.toLowerCase();return t.filter(n=>n.label.toLowerCase().includes(r))}async _recompute(e){let t=++this._queryToken,r=this._pool,n=this.filter?await this.filter(e,r):this._defaultFilter(e,r);if(t!==this._queryToken)return;let s=this.maxItems>0?n.slice(0,this.maxItems):n;this._matches=s,this._activeIndex=s.length?0:-1}_shouldOpen(e){return this.disabled||this.readonly?!1:e.length>=this.minChars}_setOpen(e){this._open!==e&&(this._open=e,e?this._popover?.show():this._popover?.hide())}_commit(e){e.disabled||(this.value=e.value,this._setOpen(!1),this.dispatchEvent(new CustomEvent("select",{detail:{value:e.value,option:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:e.value},bubbles:!0,composed:!0})))}_renderLabel(e){let t=this.value.trim();if(!t)return e;let r=e.toLowerCase().indexOf(t.toLowerCase());return r<0?e:Yn`${e.slice(0,r)}<span class="match"
|
|
14210
14244
|
>${e.slice(r,r+t.length)}</span
|
|
14211
14245
|
>${e.slice(r+t.length)}`}render(){let t=F(this,"autocomplete").size??this.size;return Yn`
|
|
14212
14246
|
<lui-popover
|
|
@@ -14314,7 +14348,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14314
14348
|
font-size: var(--lui-font-size-sm);
|
|
14315
14349
|
text-align: center;
|
|
14316
14350
|
}
|
|
14317
|
-
`],a([
|
|
14351
|
+
`],a([Fr({attribute:!1})],Qe.prototype,"options",2),a([Fr()],Qe.prototype,"value",2),a([Fr()],Qe.prototype,"placeholder",2),a([Fr({reflect:!0})],Qe.prototype,"size",2),a([Fr({type:Boolean,reflect:!0})],Qe.prototype,"disabled",2),a([Fr({type:Boolean,reflect:!0})],Qe.prototype,"readonly",2),a([Fr({type:Boolean,reflect:!0})],Qe.prototype,"clearable",2),a([Fr({type:Boolean,reflect:!0})],Qe.prototype,"invalid",2),a([Fr({type:Number,attribute:"min-chars"})],Qe.prototype,"minChars",2),a([Fr({type:Number,attribute:"max-items"})],Qe.prototype,"maxItems",2),a([Fr({attribute:!1})],Qe.prototype,"filter",2),a([Fr({type:Boolean})],Qe.prototype,"portal",2),a([Fr({reflect:!0})],Qe.prototype,"locale",2),a([Fr({attribute:!1})],Qe.prototype,"translations",2),a([Ud()],Qe.prototype,"_matches",2),a([Ud()],Qe.prototype,"_activeIndex",2),a([Ud()],Qe.prototype,"_open",2),a([c0("lui-popover")],Qe.prototype,"_popover",2),a([c0("lui-input")],Qe.prototype,"_input",2),Qe=a([j4("lui-autocomplete")],Qe);var Gd=la(xn(),1);import{css as O4,html as d0,LitElement as H4,nothing as R4}from"lit";import{customElement as I4,property as Xn,query as u0,state as V4}from"lit/decorators.js";var Sr=class extends H4{constructor(){super(...arguments);this.orientation="horizontal";this.percent=50;this.minFirst=80;this.minSecond=80;this.disabled=!1;this.noGrip=!1;this._dragging=!1;this._interact=null;this._origin={total:0,percent:50};this._onKeyDown=e=>{if(this.disabled)return;let t=this._isHorizontal?"ArrowLeft":"ArrowUp",r=this._isHorizontal?"ArrowRight":"ArrowDown",n=null;if(e.key===t?n=this.percent-(e.shiftKey?10:2):e.key===r?n=this.percent+(e.shiftKey?10:2):e.key==="Home"?n=0:e.key==="End"&&(n=100),n===null)return;e.preventDefault();let s=this._root?.getBoundingClientRect(),d=(this._isHorizontal?s?.width:s?.height)??0,h=this._clampPercent(n,d);h!==this.percent&&(this.percent=h,this._emit("resize"),this._emit("change"))}}disconnectedCallback(){super.disconnectedCallback(),this._teardown()}firstUpdated(){this._setup()}updated(e){(e.has("disabled")||e.has("orientation"))&&(this._teardown(),this._setup())}get _isHorizontal(){return this.orientation!=="vertical"}_pxMin(e,t){let r=pt(e);if(r.endsWith("%")){let s=Number.parseFloat(r)/100;return Number.isFinite(s)?t*s:0}let n=Number.parseFloat(r);return Number.isFinite(n)?n:0}_clampPercent(e,t){if(t<=0)return Math.min(100,Math.max(0,e));let r=this._gutter?.getBoundingClientRect(),n=(this._isHorizontal?r?.width:r?.height)??0,s=Math.max(0,t-n),d=this._pxMin(this.minFirst,s),h=this._pxMin(this.minSecond,s);if(d+h>=s)return 50;let p=d/s*100,f=100-h/s*100;return Math.min(f,Math.max(p,e))}_setup(){let e=this._gutter;!e||this.disabled||(this._interact=(0,Gd.default)(e).draggable({inertia:!1,modifiers:[Gd.default.modifiers.restrict({restriction:"parent"})],listeners:{start:()=>{let t=this._root?.getBoundingClientRect();this._origin={total:(this._isHorizontal?t?.width:t?.height)??0,percent:this.percent},this._dragging=!0,this.toggleAttribute("data-dragging",!0)},move:t=>{let{total:r}=this._origin;if(r<=0)return;let n=this._isHorizontal?t.dx:t.dy,s=this._clampPercent(this.percent+n/r*100,r);s!==this.percent&&(this.percent=s,this._emit("resize"))},end:()=>{this._dragging=!1,this.toggleAttribute("data-dragging",!1),this._emit("change")}}}))}_teardown(){this._interact?.unset(),this._interact=null,this.toggleAttribute("data-dragging",!1)}_emit(e){let t=this._root?.getBoundingClientRect(),r=(this._isHorizontal?t?.width:t?.height)??0;this.dispatchEvent(new CustomEvent(e,{detail:{percent:this.percent,size:r*this.percent/100},bubbles:!0,composed:!0}))}render(){let t=F(this,"splitter").orientation??this.orientation;return d0`
|
|
14318
14352
|
<div class="root" style=${`--lui-splitter-first:${this.percent}%;`}>
|
|
14319
14353
|
<div part="pane first"><slot name="first"></slot></div>
|
|
14320
14354
|
<div
|
|
@@ -14332,7 +14366,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14332
14366
|
</div>
|
|
14333
14367
|
<div part="pane second"><slot name="second"></slot></div>
|
|
14334
14368
|
</div>
|
|
14335
|
-
`}};
|
|
14369
|
+
`}};Sr.styles=[A,P,jr,O4`
|
|
14336
14370
|
:host {
|
|
14337
14371
|
display: block;
|
|
14338
14372
|
width: 100%;
|
|
@@ -14417,7 +14451,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14417
14451
|
user-select: none;
|
|
14418
14452
|
pointer-events: none;
|
|
14419
14453
|
}
|
|
14420
|
-
`],a([Xn({reflect:!0})],Er.prototype,"orientation",2),a([Xn({type:Number})],Er.prototype,"percent",2),a([Xn({attribute:"min-first"})],Er.prototype,"minFirst",2),a([Xn({attribute:"min-second"})],Er.prototype,"minSecond",2),a([Xn({type:Boolean,reflect:!0})],Er.prototype,"disabled",2),a([Xn({type:Boolean,attribute:"no-grip",reflect:!0})],Er.prototype,"noGrip",2),a([V4()],Er.prototype,"_dragging",2),a([u0('[part="gutter"]')],Er.prototype,"_gutter",2),a([u0(".root")],Er.prototype,"_root",2),Er=a([I4("lui-splitter")],Er);import{css as J4,html as tu,LitElement as e5,nothing as _l,svg as t5}from"lit";import{customElement as r5,property as $o,state as o5}from"lit/decorators.js";var h0=["L","M","Q","H"],p0=[[[7,1,19,0,0],[10,1,16,0,0],[13,1,13,0,0],[17,1,9,0,0]],[[10,1,34,0,0],[16,1,28,0,0],[22,1,22,0,0],[28,1,16,0,0]],[[15,1,55,0,0],[26,1,44,0,0],[18,2,17,0,0],[22,2,13,0,0]],[[20,1,80,0,0],[18,2,32,0,0],[26,2,24,0,0],[16,4,9,0,0]],[[26,1,108,0,0],[24,2,43,0,0],[18,2,15,2,16],[22,2,11,2,12]],[[18,2,68,0,0],[16,4,27,0,0],[24,4,19,0,0],[28,4,15,0,0]],[[20,2,78,0,0],[18,4,31,0,0],[18,2,14,4,15],[26,4,13,1,14]],[[24,2,97,0,0],[22,2,38,2,39],[22,4,18,2,19],[26,4,14,2,15]],[[30,2,116,0,0],[22,3,36,2,37],[20,4,16,4,17],[24,4,12,4,13]],[[18,2,68,2,69],[26,4,43,1,44],[24,6,19,2,20],[28,6,15,2,16]],[[20,4,81,0,0],[30,1,50,4,51],[28,4,22,4,23],[24,3,12,8,13]],[[24,2,92,2,93],[22,6,36,2,37],[26,4,20,6,21],[28,7,14,4,15]],[[26,4,107,0,0],[22,8,37,1,38],[24,8,20,4,21],[22,12,11,4,12]],[[30,3,115,1,116],[24,4,40,5,41],[20,11,16,5,17],[24,11,12,5,13]],[[22,5,87,1,88],[24,5,41,5,42],[30,5,24,7,25],[24,11,12,7,13]],[[24,5,98,1,99],[28,7,45,3,46],[24,15,19,2,20],[30,3,15,13,16]],[[28,1,107,5,108],[28,10,46,1,47],[28,1,22,15,23],[28,2,14,17,15]],[[30,5,120,1,121],[26,9,43,4,44],[28,17,22,1,23],[28,2,14,19,15]],[[28,3,113,4,114],[26,3,44,11,45],[26,17,21,4,22],[26,9,13,16,14]],[[28,3,107,5,108],[26,3,41,13,42],[30,15,24,5,25],[28,15,15,10,16]],[[28,4,116,4,117],[26,17,42,0,0],[28,17,22,6,23],[30,19,16,6,17]],[[28,2,111,7,112],[28,17,46,0,0],[30,7,24,16,25],[24,34,13,0,0]],[[30,4,121,5,122],[28,4,47,14,48],[30,11,24,14,25],[30,16,15,14,16]],[[30,6,117,4,118],[28,6,45,14,46],[30,11,24,16,25],[30,30,16,2,17]],[[26,8,106,4,107],[28,8,47,13,48],[30,7,24,22,25],[30,22,15,13,16]],[[28,10,114,2,115],[28,19,46,4,47],[28,28,22,6,23],[30,33,16,4,17]],[[30,8,122,4,123],[28,22,45,3,46],[30,8,23,26,24],[30,12,15,28,16]],[[30,3,117,10,118],[28,3,45,23,46],[30,4,24,31,25],[30,11,15,31,16]],[[30,7,116,7,117],[28,21,45,7,46],[30,1,23,37,24],[30,19,15,26,16]],[[30,5,115,10,116],[28,19,47,10,48],[30,15,24,25,25],[30,23,15,25,16]],[[30,13,115,3,116],[28,2,46,29,47],[30,42,24,1,25],[30,23,15,28,16]],[[30,17,115,0,0],[28,10,46,23,47],[30,10,24,35,25],[30,19,15,35,16]],[[30,17,115,1,116],[28,14,46,21,47],[30,29,24,19,25],[30,11,15,46,16]],[[30,13,115,6,116],[28,14,46,23,47],[30,44,24,7,25],[30,59,16,1,17]],[[30,12,121,7,122],[28,12,47,26,48],[30,39,24,14,25],[30,22,15,41,16]],[[30,6,121,14,122],[28,6,47,34,48],[30,46,24,10,25],[30,2,15,64,16]],[[30,17,122,4,123],[28,29,46,14,47],[30,49,24,10,25],[30,24,15,46,16]],[[30,4,122,18,123],[28,13,46,32,47],[30,48,24,14,25],[30,42,15,32,16]],[[30,20,117,4,118],[28,40,47,7,48],[30,43,24,22,25],[30,10,15,67,16]],[[30,19,118,6,119],[28,18,47,31,48],[30,34,24,34,25],[30,20,15,61,16]]],D4=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],F4=[31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017],N4=21522,L4={L:1,M:0,Q:3,H:2},Qa=new Uint8Array(512),Xd=new Uint8Array(256);{let i=1;for(let o=0;o<255;o+=1)Qa[o]=i,Xd[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o+=1)Qa[o]=Qa[o-255]}function m0(i,o){return i===0||o===0?0:Qa[Xd[i]+Xd[o]]}function B4(i){let o=new Uint8Array([1]);for(let e=0;e<i;e+=1){let t=new Uint8Array(o.length+1);for(let r=0;r<o.length;r+=1)t[r]^=o[r],t[r+1]^=m0(o[r],Qa[e]);o=t}return o}function q4(i,o){let e=B4(o),t=new Uint8Array(o);for(let r of i){let n=r^t[0];t.copyWithin(0,1),t[o-1]=0;for(let s=0;s<o;s+=1)t[s]^=m0(e[s+1],n)}return t}var Zd=class{constructor(){this._bits=[]}get length(){return this._bits.length}push(o,e){for(let t=e-1;t>=0;t-=1)this._bits.push(o>>>t&1)}toBytes(){let o=new Uint8Array(Math.ceil(this._bits.length/8));return this._bits.forEach((e,t)=>{e&&(o[t>>>3]|=128>>>(t&7))}),o}};function Qd(i,o){let[,e,t,r,n]=p0[i-1][h0.indexOf(o)];return e*t+r*n}function Jd(i){return i<10?8:16}function K4(i,o){for(let e=1;e<=40;e+=1)if(4+Jd(e)+i*8<=Qd(e,o)*8)return e;throw new Error(`qrcode: ${i} bytes exceeds the capacity of a version 40 symbol at error correction level ${o}`)}function W4(i,o,e){let t=Qd(o,e)*8,r=new Zd;r.push(4,4),r.push(i.length,Jd(o));for(let E of i)r.push(E,8);r.push(0,Math.min(4,t-r.length)),r.length%8!==0&&r.push(0,8-r.length%8);let n=Array.from(r.toBytes());for(let E=0;n.length<t/8;E+=1)n.push(E%2===0?236:17);let[s,d,h,p,f]=p0[o-1][h0.indexOf(e)],x=[],y=0;for(let[E,T]of[[d,h],[p,f]])for(let O=0;O<E;O+=1){let H=new Uint8Array(n.slice(y,y+T));y+=T,x.push({data:H,ec:q4(H,s)})}let C=[],S=Math.max(...x.map(E=>E.data.length));for(let E=0;E<S;E+=1)for(let T of x)E<T.data.length&&C.push(T.data[E]);for(let E=0;E<s;E+=1)for(let T of x)C.push(T.ec[E]);return new Uint8Array(C)}function U4(i){let o=i*4+17;return{size:o,modules:Array.from({length:o},()=>Array(o).fill(null)),reserved:Array.from({length:o},()=>Array(o).fill(!1))}}function So(i,o,e,t){i.modules[e][o]=t,i.reserved[e][o]=!0}function Yd(i,o,e){for(let t=-1;t<=7;t+=1)for(let r=-1;r<=7;r+=1){let n=o+r,s=e+t;if(n<0||s<0||n>=i.size||s>=i.size)continue;let d=r>=0&&r<=6&&t>=0&&t<=6,h=Math.max(Math.abs(r-3),Math.abs(t-3));So(i,n,s,d&&h!==2)}}function G4(i,o){Yd(i,0,0),Yd(i,i.size-7,0),Yd(i,0,i.size-7);for(let t=8;t<i.size-8;t+=1){let r=t%2===0;So(i,t,6,r),So(i,6,t,r)}let e=D4[o-1];for(let t of e)for(let r of e)if(!(r===6&&t===6||r===6&&t===i.size-7||r===i.size-7&&t===6))for(let s=-2;s<=2;s+=1)for(let d=-2;d<=2;d+=1){let h=Math.max(Math.abs(d),Math.abs(s));So(i,r+d,t+s,h!==1)}for(let t=0;t<9;t+=1)t!==6&&(So(i,t,8,!1),So(i,8,t,!1));for(let t=0;t<8;t+=1)So(i,i.size-1-t,8,!1);for(let t=0;t<7;t+=1)So(i,8,i.size-1-t,!1);if(So(i,8,i.size-8,!0),o>=7){let t=F4[o-7];for(let r=0;r<18;r+=1){let n=(t>>>r&1)===1,s=Math.floor(r/3),d=r%3+i.size-11;So(i,s,d,n),So(i,d,s,n)}}}function Y4(i,o){let e=0,t=!0;for(let r=i.size-1;r>=1;r-=2){let n=r===6?5:r;for(let s=0;s<i.size;s+=1){let d=t?i.size-1-s:s;for(let h of[n,n-1]){if(i.reserved[d][h])continue;let p=o[e>>>3]??0;i.modules[d][h]=(p>>>7-(e&7)&1)===1,e+=1}}t=!t}}function X4(i,o,e){switch(i){case 0:return(o+e)%2===0;case 1:return e%2===0;case 2:return o%3===0;case 3:return(o+e)%3===0;case 4:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case 5:return o*e%2+o*e%3===0;case 6:return(o*e%2+o*e%3)%2===0;default:return((o+e)%2+o*e%3)%2===0}}function Z4(i,o,e){let t=L4[o]<<3|e,r=t;for(let s=0;s<10;s+=1)r=r<<1^(r>>>9)*1335;let n=(t<<10|r)^N4;for(let s=0;s<=5;s+=1)i.modules[8][s]=(n>>>s&1)===1;i.modules[8][7]=(n>>>6&1)===1,i.modules[8][8]=(n>>>7&1)===1,i.modules[7][8]=(n>>>8&1)===1;for(let s=9;s<15;s+=1)i.modules[14-s][8]=(n>>>s&1)===1;for(let s=0;s<7;s+=1)i.modules[i.size-1-s][8]=(n>>>s&1)===1;for(let s=8;s<15;s+=1)i.modules[8][i.size-15+s]=(n>>>s&1)===1}function Q4(i){let o=i.length,e=0,t=h=>{let p=0,f=1;for(let x=1;x<o;x+=1)h[x]===h[x-1]?(f+=1,f===5?p+=3:f>5&&(p+=1)):f=1;return p};for(let h=0;h<o;h+=1)e+=t(i[h]),e+=t(i.map(p=>p[h]));for(let h=0;h<o-1;h+=1)for(let p=0;p<o-1;p+=1){let f=i[h][p];f===i[h][p+1]&&f===i[h+1][p]&&f===i[h+1][p+1]&&(e+=3)}let r=[!0,!1,!0,!0,!0,!1,!0],n=(h,p)=>r.every((f,x)=>h[p+x]===f);for(let h=0;h<o;h+=1){let p=i[h],f=i.map(x=>x[h]);for(let x=0;x+7<=o;x+=1)n(p,x)&&(e+=40),n(f,x)&&(e+=40)}let d=i.flat().filter(Boolean).length*100/(o*o);return e+=Math.floor(Math.abs(d-50)/5)*10,e}function eu(i,o={}){let e=o.errorCorrection??"M",t=new TextEncoder().encode(i),r=o.version??K4(t.length,e);if(r<1||r>40||!Number.isInteger(r))throw new Error(`qrcode: version must be an integer from 1 to 40, received ${r}`);if(4+Jd(r)+t.length*8>Qd(r,e)*8)throw new Error(`qrcode: ${t.length} bytes does not fit a version ${r} symbol at error correction level ${e}`);let s=W4(t,r,e),d=U4(r);G4(d,r),Y4(d,s);let h=null;for(let p=0;p<8;p+=1){let f=d.modules.map((S,E)=>S.map((T,O)=>d.reserved[E][O]?!!T:!!T!==X4(p,O,E))),x={...d,modules:f};Z4(x,e,p);let y=x.modules.map(S=>S.map(Boolean)),C=Q4(y);(!h||C<h.score)&&(h={matrix:y,score:C})}return{matrix:h.matrix,size:d.size,version:r,errorCorrection:e}}var Nt=class extends e5{constructor(){super(...arguments);this.value="";this.errorCorrection="M";this.margin=4;this.logo="";this.logoRatio=.2;this._error=""}connectedCallback(){super.connectedCallback(),this._localeCleanup=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}get _effectiveErrorCorrection(){if(!this.logo)return this.errorCorrection;let e=this._cappedLogoRatio>.22?"H":"Q",t=["L","M","Q","H"];return t.indexOf(this.errorCorrection)>=t.indexOf(e)?this.errorCorrection:e}get _cappedLogoRatio(){return Math.min(Math.max(this.logoRatio,0),.3)}get _cssSize(){return this.size===void 0||this.size===""?"":pt(this.size)}toDataUrl(){let e=this._svgMarkup();return e?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`:""}_svgMarkup(){try{let{matrix:e,size:t}=eu(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version}),r=Math.max(0,Math.floor(this.margin)),n=t+r*2,s=this.color||"currentColor",d=this.background||"transparent",h="";return e.forEach((p,f)=>{p.forEach((x,y)=>{x&&(h+=`M${y+r} ${f+r}h1v1h-1z`)})}),[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${n}"`,' shape-rendering="crispEdges">',`<rect width="${n}" height="${n}" fill="${d}"/>`,`<path d="${h}" fill="${s}"/>`,"</svg>"].join("")}catch{return""}}render(){let e=F(this,"qrcode"),t=Math.max(0,Math.floor(this.margin)),r=this._cssSize||e.size||"",n=null,s="";if(!this.value)s=this._t("qrcode.empty","\u65E0\u5185\u5BB9");else try{n=eu(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version})}catch(p){s=p instanceof Error?p.message:String(p)}s!==this._error&&(this._error=s,s&&this.value&&this.dispatchEvent(new CustomEvent("error",{detail:{message:s},bubbles:!0,composed:!0})));let d=[r?`--lui-qrcode-size:${r}`:"",this.background?`--lui-qrcode-bg:${this.background}`:"",this.color?`--lui-qrcode-fg:${this.color}`:"",this.logo?`--lui-qrcode-logo-size:${this._cappedLogoRatio*100}%`:""].filter(Boolean).join(";");if(!n)return tu`
|
|
14454
|
+
`],a([Xn({reflect:!0})],Sr.prototype,"orientation",2),a([Xn({type:Number})],Sr.prototype,"percent",2),a([Xn({attribute:"min-first"})],Sr.prototype,"minFirst",2),a([Xn({attribute:"min-second"})],Sr.prototype,"minSecond",2),a([Xn({type:Boolean,reflect:!0})],Sr.prototype,"disabled",2),a([Xn({type:Boolean,attribute:"no-grip",reflect:!0})],Sr.prototype,"noGrip",2),a([V4()],Sr.prototype,"_dragging",2),a([u0('[part="gutter"]')],Sr.prototype,"_gutter",2),a([u0(".root")],Sr.prototype,"_root",2),Sr=a([I4("lui-splitter")],Sr);import{css as J4,html as tu,LitElement as e5,nothing as _l,svg as t5}from"lit";import{customElement as r5,property as $o,state as o5}from"lit/decorators.js";var h0=["L","M","Q","H"],p0=[[[7,1,19,0,0],[10,1,16,0,0],[13,1,13,0,0],[17,1,9,0,0]],[[10,1,34,0,0],[16,1,28,0,0],[22,1,22,0,0],[28,1,16,0,0]],[[15,1,55,0,0],[26,1,44,0,0],[18,2,17,0,0],[22,2,13,0,0]],[[20,1,80,0,0],[18,2,32,0,0],[26,2,24,0,0],[16,4,9,0,0]],[[26,1,108,0,0],[24,2,43,0,0],[18,2,15,2,16],[22,2,11,2,12]],[[18,2,68,0,0],[16,4,27,0,0],[24,4,19,0,0],[28,4,15,0,0]],[[20,2,78,0,0],[18,4,31,0,0],[18,2,14,4,15],[26,4,13,1,14]],[[24,2,97,0,0],[22,2,38,2,39],[22,4,18,2,19],[26,4,14,2,15]],[[30,2,116,0,0],[22,3,36,2,37],[20,4,16,4,17],[24,4,12,4,13]],[[18,2,68,2,69],[26,4,43,1,44],[24,6,19,2,20],[28,6,15,2,16]],[[20,4,81,0,0],[30,1,50,4,51],[28,4,22,4,23],[24,3,12,8,13]],[[24,2,92,2,93],[22,6,36,2,37],[26,4,20,6,21],[28,7,14,4,15]],[[26,4,107,0,0],[22,8,37,1,38],[24,8,20,4,21],[22,12,11,4,12]],[[30,3,115,1,116],[24,4,40,5,41],[20,11,16,5,17],[24,11,12,5,13]],[[22,5,87,1,88],[24,5,41,5,42],[30,5,24,7,25],[24,11,12,7,13]],[[24,5,98,1,99],[28,7,45,3,46],[24,15,19,2,20],[30,3,15,13,16]],[[28,1,107,5,108],[28,10,46,1,47],[28,1,22,15,23],[28,2,14,17,15]],[[30,5,120,1,121],[26,9,43,4,44],[28,17,22,1,23],[28,2,14,19,15]],[[28,3,113,4,114],[26,3,44,11,45],[26,17,21,4,22],[26,9,13,16,14]],[[28,3,107,5,108],[26,3,41,13,42],[30,15,24,5,25],[28,15,15,10,16]],[[28,4,116,4,117],[26,17,42,0,0],[28,17,22,6,23],[30,19,16,6,17]],[[28,2,111,7,112],[28,17,46,0,0],[30,7,24,16,25],[24,34,13,0,0]],[[30,4,121,5,122],[28,4,47,14,48],[30,11,24,14,25],[30,16,15,14,16]],[[30,6,117,4,118],[28,6,45,14,46],[30,11,24,16,25],[30,30,16,2,17]],[[26,8,106,4,107],[28,8,47,13,48],[30,7,24,22,25],[30,22,15,13,16]],[[28,10,114,2,115],[28,19,46,4,47],[28,28,22,6,23],[30,33,16,4,17]],[[30,8,122,4,123],[28,22,45,3,46],[30,8,23,26,24],[30,12,15,28,16]],[[30,3,117,10,118],[28,3,45,23,46],[30,4,24,31,25],[30,11,15,31,16]],[[30,7,116,7,117],[28,21,45,7,46],[30,1,23,37,24],[30,19,15,26,16]],[[30,5,115,10,116],[28,19,47,10,48],[30,15,24,25,25],[30,23,15,25,16]],[[30,13,115,3,116],[28,2,46,29,47],[30,42,24,1,25],[30,23,15,28,16]],[[30,17,115,0,0],[28,10,46,23,47],[30,10,24,35,25],[30,19,15,35,16]],[[30,17,115,1,116],[28,14,46,21,47],[30,29,24,19,25],[30,11,15,46,16]],[[30,13,115,6,116],[28,14,46,23,47],[30,44,24,7,25],[30,59,16,1,17]],[[30,12,121,7,122],[28,12,47,26,48],[30,39,24,14,25],[30,22,15,41,16]],[[30,6,121,14,122],[28,6,47,34,48],[30,46,24,10,25],[30,2,15,64,16]],[[30,17,122,4,123],[28,29,46,14,47],[30,49,24,10,25],[30,24,15,46,16]],[[30,4,122,18,123],[28,13,46,32,47],[30,48,24,14,25],[30,42,15,32,16]],[[30,20,117,4,118],[28,40,47,7,48],[30,43,24,22,25],[30,10,15,67,16]],[[30,19,118,6,119],[28,18,47,31,48],[30,34,24,34,25],[30,20,15,61,16]]],D4=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],F4=[31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017],N4=21522,L4={L:1,M:0,Q:3,H:2},Qa=new Uint8Array(512),Xd=new Uint8Array(256);{let i=1;for(let o=0;o<255;o+=1)Qa[o]=i,Xd[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o+=1)Qa[o]=Qa[o-255]}function m0(i,o){return i===0||o===0?0:Qa[Xd[i]+Xd[o]]}function B4(i){let o=new Uint8Array([1]);for(let e=0;e<i;e+=1){let t=new Uint8Array(o.length+1);for(let r=0;r<o.length;r+=1)t[r]^=o[r],t[r+1]^=m0(o[r],Qa[e]);o=t}return o}function q4(i,o){let e=B4(o),t=new Uint8Array(o);for(let r of i){let n=r^t[0];t.copyWithin(0,1),t[o-1]=0;for(let s=0;s<o;s+=1)t[s]^=m0(e[s+1],n)}return t}var Zd=class{constructor(){this._bits=[]}get length(){return this._bits.length}push(o,e){for(let t=e-1;t>=0;t-=1)this._bits.push(o>>>t&1)}toBytes(){let o=new Uint8Array(Math.ceil(this._bits.length/8));return this._bits.forEach((e,t)=>{e&&(o[t>>>3]|=128>>>(t&7))}),o}};function Qd(i,o){let[,e,t,r,n]=p0[i-1][h0.indexOf(o)];return e*t+r*n}function Jd(i){return i<10?8:16}function K4(i,o){for(let e=1;e<=40;e+=1)if(4+Jd(e)+i*8<=Qd(e,o)*8)return e;throw new Error(`qrcode: ${i} bytes exceeds the capacity of a version 40 symbol at error correction level ${o}`)}function W4(i,o,e){let t=Qd(o,e)*8,r=new Zd;r.push(4,4),r.push(i.length,Jd(o));for(let E of i)r.push(E,8);r.push(0,Math.min(4,t-r.length)),r.length%8!==0&&r.push(0,8-r.length%8);let n=Array.from(r.toBytes());for(let E=0;n.length<t/8;E+=1)n.push(E%2===0?236:17);let[s,d,h,p,f]=p0[o-1][h0.indexOf(e)],x=[],y=0;for(let[E,T]of[[d,h],[p,f]])for(let O=0;O<E;O+=1){let H=new Uint8Array(n.slice(y,y+T));y+=T,x.push({data:H,ec:q4(H,s)})}let C=[],S=Math.max(...x.map(E=>E.data.length));for(let E=0;E<S;E+=1)for(let T of x)E<T.data.length&&C.push(T.data[E]);for(let E=0;E<s;E+=1)for(let T of x)C.push(T.ec[E]);return new Uint8Array(C)}function U4(i){let o=i*4+17;return{size:o,modules:Array.from({length:o},()=>Array(o).fill(null)),reserved:Array.from({length:o},()=>Array(o).fill(!1))}}function So(i,o,e,t){i.modules[e][o]=t,i.reserved[e][o]=!0}function Yd(i,o,e){for(let t=-1;t<=7;t+=1)for(let r=-1;r<=7;r+=1){let n=o+r,s=e+t;if(n<0||s<0||n>=i.size||s>=i.size)continue;let d=r>=0&&r<=6&&t>=0&&t<=6,h=Math.max(Math.abs(r-3),Math.abs(t-3));So(i,n,s,d&&h!==2)}}function G4(i,o){Yd(i,0,0),Yd(i,i.size-7,0),Yd(i,0,i.size-7);for(let t=8;t<i.size-8;t+=1){let r=t%2===0;So(i,t,6,r),So(i,6,t,r)}let e=D4[o-1];for(let t of e)for(let r of e)if(!(r===6&&t===6||r===6&&t===i.size-7||r===i.size-7&&t===6))for(let s=-2;s<=2;s+=1)for(let d=-2;d<=2;d+=1){let h=Math.max(Math.abs(d),Math.abs(s));So(i,r+d,t+s,h!==1)}for(let t=0;t<9;t+=1)t!==6&&(So(i,t,8,!1),So(i,8,t,!1));for(let t=0;t<8;t+=1)So(i,i.size-1-t,8,!1);for(let t=0;t<7;t+=1)So(i,8,i.size-1-t,!1);if(So(i,8,i.size-8,!0),o>=7){let t=F4[o-7];for(let r=0;r<18;r+=1){let n=(t>>>r&1)===1,s=Math.floor(r/3),d=r%3+i.size-11;So(i,s,d,n),So(i,d,s,n)}}}function Y4(i,o){let e=0,t=!0;for(let r=i.size-1;r>=1;r-=2){let n=r===6?5:r;for(let s=0;s<i.size;s+=1){let d=t?i.size-1-s:s;for(let h of[n,n-1]){if(i.reserved[d][h])continue;let p=o[e>>>3]??0;i.modules[d][h]=(p>>>7-(e&7)&1)===1,e+=1}}t=!t}}function X4(i,o,e){switch(i){case 0:return(o+e)%2===0;case 1:return e%2===0;case 2:return o%3===0;case 3:return(o+e)%3===0;case 4:return(Math.floor(e/2)+Math.floor(o/3))%2===0;case 5:return o*e%2+o*e%3===0;case 6:return(o*e%2+o*e%3)%2===0;default:return((o+e)%2+o*e%3)%2===0}}function Z4(i,o,e){let t=L4[o]<<3|e,r=t;for(let s=0;s<10;s+=1)r=r<<1^(r>>>9)*1335;let n=(t<<10|r)^N4;for(let s=0;s<=5;s+=1)i.modules[8][s]=(n>>>s&1)===1;i.modules[8][7]=(n>>>6&1)===1,i.modules[8][8]=(n>>>7&1)===1,i.modules[7][8]=(n>>>8&1)===1;for(let s=9;s<15;s+=1)i.modules[14-s][8]=(n>>>s&1)===1;for(let s=0;s<7;s+=1)i.modules[i.size-1-s][8]=(n>>>s&1)===1;for(let s=8;s<15;s+=1)i.modules[8][i.size-15+s]=(n>>>s&1)===1}function Q4(i){let o=i.length,e=0,t=h=>{let p=0,f=1;for(let x=1;x<o;x+=1)h[x]===h[x-1]?(f+=1,f===5?p+=3:f>5&&(p+=1)):f=1;return p};for(let h=0;h<o;h+=1)e+=t(i[h]),e+=t(i.map(p=>p[h]));for(let h=0;h<o-1;h+=1)for(let p=0;p<o-1;p+=1){let f=i[h][p];f===i[h][p+1]&&f===i[h+1][p]&&f===i[h+1][p+1]&&(e+=3)}let r=[!0,!1,!0,!0,!0,!1,!0],n=(h,p)=>r.every((f,x)=>h[p+x]===f);for(let h=0;h<o;h+=1){let p=i[h],f=i.map(x=>x[h]);for(let x=0;x+7<=o;x+=1)n(p,x)&&(e+=40),n(f,x)&&(e+=40)}let d=i.flat().filter(Boolean).length*100/(o*o);return e+=Math.floor(Math.abs(d-50)/5)*10,e}function eu(i,o={}){let e=o.errorCorrection??"M",t=new TextEncoder().encode(i),r=o.version??K4(t.length,e);if(r<1||r>40||!Number.isInteger(r))throw new Error(`qrcode: version must be an integer from 1 to 40, received ${r}`);if(4+Jd(r)+t.length*8>Qd(r,e)*8)throw new Error(`qrcode: ${t.length} bytes does not fit a version ${r} symbol at error correction level ${e}`);let s=W4(t,r,e),d=U4(r);G4(d,r),Y4(d,s);let h=null;for(let p=0;p<8;p+=1){let f=d.modules.map((S,E)=>S.map((T,O)=>d.reserved[E][O]?!!T:!!T!==X4(p,O,E))),x={...d,modules:f};Z4(x,e,p);let y=x.modules.map(S=>S.map(Boolean)),C=Q4(y);(!h||C<h.score)&&(h={matrix:y,score:C})}return{matrix:h.matrix,size:d.size,version:r,errorCorrection:e}}var Nt=class extends e5{constructor(){super(...arguments);this.value="";this.errorCorrection="M";this.margin=4;this.logo="";this.logoRatio=.2;this._error=""}connectedCallback(){super.connectedCallback(),this._localeCleanup=ke(()=>this.requestUpdate())}disconnectedCallback(){super.disconnectedCallback(),this._localeCleanup?.(),this._localeCleanup=void 0}_t(e,t){let r=Fe(this,this.locale,this.translations);return ie(oe(r.locale,r.translations),e,t)}get _effectiveErrorCorrection(){if(!this.logo)return this.errorCorrection;let e=this._cappedLogoRatio>.22?"H":"Q",t=["L","M","Q","H"];return t.indexOf(this.errorCorrection)>=t.indexOf(e)?this.errorCorrection:e}get _cappedLogoRatio(){return Math.min(Math.max(this.logoRatio,0),.3)}get _cssSize(){return this.size===void 0||this.size===""?"":pt(this.size)}toDataUrl(){let e=this._svgMarkup();return e?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`:""}_svgMarkup(){try{let{matrix:e,size:t}=eu(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version}),r=Math.max(0,Math.floor(this.margin)),n=t+r*2,s=this.color||"currentColor",d=this.background||"transparent",h="";return e.forEach((p,f)=>{p.forEach((x,y)=>{x&&(h+=`M${y+r} ${f+r}h1v1h-1z`)})}),[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${n} ${n}"`,' shape-rendering="crispEdges">',`<rect width="${n}" height="${n}" fill="${d}"/>`,`<path d="${h}" fill="${s}"/>`,"</svg>"].join("")}catch{return""}}render(){let e=F(this,"qrcode"),t=Math.max(0,Math.floor(this.margin)),r=this._cssSize||e.size||"",n=null,s="";if(!this.value)s=this._t("qrcode.empty","\u65E0\u5185\u5BB9");else try{n=eu(this.value,{errorCorrection:this._effectiveErrorCorrection,version:this.version})}catch(p){s=p instanceof Error?p.message:String(p)}s!==this._error&&(this._error=s,s&&this.value&&this.dispatchEvent(new CustomEvent("error",{detail:{message:s},bubbles:!0,composed:!0})));let d=[r?`--lui-qrcode-size:${r}`:"",this.background?`--lui-qrcode-bg:${this.background}`:"",this.color?`--lui-qrcode-fg:${this.color}`:"",this.logo?`--lui-qrcode-logo-size:${this._cappedLogoRatio*100}%`:""].filter(Boolean).join(";");if(!n)return tu`
|
|
14421
14455
|
<div class="frame" part="base" style=${d||_l}>
|
|
14422
14456
|
<div part="error" role="img" aria-label=${s}>
|
|
14423
14457
|
<lui-icon name="circle-x"></lui-icon>
|
|
@@ -14759,7 +14793,7 @@ var L2=Object.create;var ms=Object.defineProperty;var nh=Object.getOwnPropertyDe
|
|
|
14759
14793
|
@keyframes lui-dialog-loading-spin {
|
|
14760
14794
|
to { transform: rotate(360deg); }
|
|
14761
14795
|
}
|
|
14762
|
-
`,document.head.appendChild(r)}return o}function H5(i){let o=typeof i=="string"?{message:i}:i,e=nu({title:o.title??Zn("dialog.loading_title","\u8BF7\u7A0D\u5019"),message:void 0,noClose:o.noClose??!0,closeOnOutsidePress:o.closeOnOutsidePress??!1,shakeOnOutsideClick:o.shakeOnOutsideClick,placement:o.placement,offset:o.offset,backdrop:o.backdrop,backdropStyle:o.backdropStyle,backdropContent:o.backdropContent,noHeader:o.noHeader,noFooter:o.noFooter,draggable:o.draggable,destroyOnClose:o.destroyOnClose,fullscreen:o.fullscreen,width:o.width,portal:o.portal,overlayLayer:o.overlayLayer,container:o.container}),t=O5(o.message??Zn("dialog.loading_message","\u5904\u7406\u4E2D..."));return e.appendChild(t),e.show(),{close:()=>au(e),update(r){let n=typeof r=="string"?{message:r}:r;n.title!=null&&(e.title=n.title,e.requestUpdate());let s=t.querySelector('[data-role="message"]');n.message!=null&&s&&(s.textContent=n.message)}}}function R5(){[...El].forEach(i=>i.close?.())}var I5={create:Ja,open:su,alert:A5,confirm:j5,prompt:P5,loading:H5,closeAll:R5};function b0(i,o){let e=ho();return ie(oe(e.locale,e.translations),i,o)}function k0(i,o="default"){let e=document.createElement("lui-button");return re(e,ht("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function cu(i){return{...i,source:i.source?[...i.source]:void 0,fields:i.fields?i.fields.map(cu):void 0,condition:i.condition?{...i.condition}:void 0}}function V5(i){return{...i,fields:i.fields.map(cu)}}function $l(i,o){return{...i,fields:i.fields?i.fields.map(cu):void 0,steps:i.steps?i.steps.map(V5):void 0,defaultValues:i.defaultValues?{...i.defaultValues}:void 0,onSubmit:o??i.onSubmit}}function du(i){let o="schema"in i?i.schema:i,e=document.createElement("lui-form");re(e,ht("form")),e.schema=$l(o);let t=!1;return{el:e,get mounted(){return t&&e.isConnected},get visible(){return!e.hidden},mount(n){return n&&!e.isConnected&&(n.appendChild(e),t=!0),this},unmount(){return e.isConnected&&e.remove(),t=!1,this},show(){return e.hidden=!1,this},hide(){return e.hidden=!0,this},update(n){let s=e.schema??$l(o);return e.schema=$l({...s,...n,onSubmit:n.onSubmit??s.onSubmit}),this},destroy(){this.unmount()},submit(){return Promise.resolve(e.submit())},validate(){return e.validate()},reset(n){e.reset(n)},getValues(){return e.getValues()},setValues(n){e.setValues(n)},getValue(n){return e.getValue(n)},setValue(n,s){e.setValue(n,s)},focusField(n){return e.focusField(n)},scrollToField(n){return e.scrollToField(n)}}}var D5=du;function y0(i){let o=i.schema.onSubmit,e=$l(i.schema,async x=>{await o?.(x),h(x)}),t=du(e),r,n=!1,s=new Promise(x=>{r=x}),d=Ja({...i,content:t.el,showCancel:!1}),h=x=>{n||(n=!0,r(x),d.destroy())},p=!!e.steps?.length;if(t.el.showActions=p,!p){let x=k0(i.cancelText??e.cancelLabel??b0("common.cancel","\u53D6\u6D88")),y=k0(i.submitText??e.submitLabel??b0("common.submit","\u63D0\u4EA4"),"primary");x.addEventListener("click",()=>h(null),{once:!0}),y.addEventListener("click",()=>t.submit(),{once:!1}),d.el.append(x,y)}return d.el.addEventListener("close",x=>{x.target===d.el&&h(null)}),{el:d.el,form:t,submit(){return t.submit()},validate(){return t.validate()},reset(x){t.reset(x)},getValues(){return t.getValues()},setValues(x){t.setValues(x)},getValue(x){return t.getValue(x)},setValue(x,y){t.setValue(x,y)},focusField(x){return t.focusField(x)},scrollToField(x){return t.scrollToField(x)},get mounted(){return d.mounted},get visible(){return d.visible},get closed(){return s},mount(x){return d.mount(x),this},unmount(){return d.unmount(),this},show(){return d.show(),this},hide(){return d.hide(),this},close(x){h(x??null)},update(x){return d.update(x),this},destroy(){d.destroy()}}}function lu(i){let o=y0(i);return o.show(),o}function F5(i){return"onSubmit"in i?lu({schema:i}):lu(i)}var N5={create:du,open:lu,prompt:F5};function L5(){let i=document.createElement("lui-context-menu");return re(i,ht("contextMenu")),i.trigger="manual",i}function uu(i,o){i.heading=o.heading??"",i.headingIcon=o.headingIcon??"",i.placement=o.placement??"bottom-start","items"in o&&o.items!==void 0&&(i.items=o.items),i.closeOnSelect=o.closeOnSelect??!0,i.closeOnOutsidePress=o.closeOnOutsidePress??!0,i.closeOnEscape=o.closeOnEscape??!0,i.submenuTrigger=o.submenuTrigger??"hover",i.backdrop=o.backdrop??"none",i.backdropStyle=o.backdropStyle??""}function Tl(i={}){let o=L5(),e=null,t=!1,r=s=>{e&&(o.removeEventListener("select",e),e=null),s&&(e=d=>{s(d.detail)},o.addEventListener("select",e))},n={el:o,get mounted(){return t&&o.isConnected},get visible(){return o.open},mount(s){if(o.isConnected)return this;let d=Zt("menu",s??i.container??Uo()??Wo());return d.appendChild(o),zt(o,d,"menu"),t=!0,this},unmount(){return o.isConnected&&o.remove(),t=!1,this},show(s){o.isConnected||this.mount();let d={...i,...s};uu(o,d),nt(o),r(d.onSelect),o.showAt(d.x,d.y,{items:d.items,context:d.context,triggerEvent:d.triggerEvent,source:d.source??"api"})},hide(){return o.hide(),this},update(s){return Object.assign(i,s),uu(o,{x:0,y:0,...i}),this},destroy(){r(void 0),o.hide(),this.unmount()}};return(i.items||i.heading||i.headingIcon||i.placement)&&uu(o,{x:0,y:0,...i}),n}var on=null,x0=new WeakMap;function w0(i){if(i.container){let o=x0.get(i.container);return(!o||!o.el.isConnected)&&(o=Tl({container:i.container}),x0.set(i.container,o)),o.show(i),o}return(!on||!on.el.isConnected)&&(on=Tl()),on.show(i),on}function _0(){document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.()})}function B5(){on?.destroy(),on=null,document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.(),i.remove()})}var q5={create:Tl,show:w0,hideAll:_0,destroyAll:B5};function es(i,o,e){if(e==null)return;let t=typeof e=="function"?e():e;if(typeof t=="string"){let n=document.createElement("div");n.slot=o,n.textContent=t,i.appendChild(n);return}if(t instanceof DocumentFragment){let n=document.createElement("div");n.slot=o,n.appendChild(t),i.appendChild(n);return}if(t instanceof HTMLElement||t instanceof SVGElement){t.setAttribute("slot",o),i.appendChild(t);return}let r=document.createElement("div");r.slot=o,r.appendChild(t),i.appendChild(r)}function K5(i){let o=document.createElement("lui-popover");return re(o,ht("popover")),i.trigger!=null&&(o.trigger=i.trigger),i.placement!=null&&(o.placement=i.placement),i.disabled!=null&&(o.disabled=i.disabled),i.interactive!=null&&(o.interactive=i.interactive),i.showArrow!=null&&(o.showArrow=i.showArrow),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.closeOnEsc!=null&&(o.closeOnEsc=i.closeOnEsc),i.openDelay!=null&&(o.openDelay=i.openDelay),i.closeDelay!=null&&(o.closeDelay=i.closeDelay),i.offsetDistance!=null&&(o.offsetDistance=i.offsetDistance),i.autoFlip!=null&&(o.autoFlip=i.autoFlip),i.autoShift!=null&&(o.autoShift=i.autoShift),i.sameWidth!=null&&(o.sameWidth=i.sameWidth),i.maxWidth!=null&&(o.maxWidth=i.maxWidth),i.maxHeight!=null&&(o.maxHeight=i.maxHeight),i.backdrop!=null&&(o.backdrop=i.backdrop),i.backdropStyle!=null&&(o.backdropStyle=i.backdropStyle),i.portal!=null&&(o.portal=i.portal),i.overlayLayer!=null&&(o.overlayLayer=i.overlayLayer),i.container!=null&&(o.container=i.container),es(o,"trigger",i.triggerContent),es(o,"header",i.header),es(o,"content",i.content),es(o,"footer",i.footer),es(o,"backdrop",i.backdropContent),o}function hu(i={}){let o=K5(i),e=!1,t=!1,r,n=new Promise(h=>{r=h}),s=()=>{t||(t=!0,r({action:"close"}))};return o.addEventListener("close",h=>{h.target===o&&s()}),{el:o,get mounted(){return e&&o.isConnected},get visible(){return o.open},get closed(){return n},mount(h){return o.isConnected?this:((h??document.body).appendChild(o),e=!0,this)},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.isConnected||this.mount(),o.portal&&o._portalHost&&nt(o._portalHost),o.show(),this},hide(){return o.hide(),this},close(){o.hide(),s()},update(h){return Object.assign(o,h),this},destroy(){t||s(),this.unmount()}}}function W5(i={}){let o=hu({...i,trigger:"manual"});return o.show(),o}function U5(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.()})}function G5(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.(),i.remove()})}var Y5={create:hu,open:W5,closeAll:U5,destroyAll:G5};var io=new Map;function X5(){return Zt("toast",Uo()??Wo())}function z0(i){let o=ht("toast"),e=typeof o.position=="string"?o.position:void 0;return i??e??"top-right"}function pu(i){let o=ho();i.locale=o.locale,i.translations=o.translations,re(i,ht("toast"))}function jl(){for(let[i,o]of io)o?.isConnected||io.delete(i)}function Z5(i){let o=io.get(i);o&&(io.delete(i),o.isConnected&&o.remove())}function Q5(i,o,e,t,r,n){jl();let s=z0(i),d=io.get(s);if(d?.isConnected)return pu(d),nt(d),d.position=s,typeof o=="number"&&(d.max=o),typeof e=="string"&&(d.radius=e),typeof t=="boolean"&&(d.stacked=t),typeof r=="number"&&(d.stackMaxVisible=r),typeof n=="number"&&(d.stackGap=n),d;let h=document.createElement("lui-toast");h.listen=!1,pu(h),h.position=s,typeof o=="number"&&(h.max=o),typeof e=="string"&&(h.radius=e),typeof t=="boolean"&&(h.stacked=t),typeof r=="number"&&(h.stackMaxVisible=r),typeof n=="number"&&(h.stackGap=n),h.addEventListener("empty",()=>Z5(s));let p=X5();return p.appendChild(h),zt(h,p,"toast"),io.set(s,h),h}function E0(i={}){let o=!1,e=null,t=r=>{if(e?.isConnected)return e;let n=z0(i.position);e=document.createElement("lui-toast"),e.listen=!1,pu(e),e.position=n,typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap);let s=Zt("toast",r??Uo()??Wo());return s.appendChild(e),zt(e,s,"toast"),o=!0,e};return{get el(){return t()},get mounted(){return o&&!!e?.isConnected},get visible(){return!!e?.isConnected},mount(r){return t(r),this},unmount(){return e?.isConnected&&e.remove(),o=!1,this},show(r){let n=typeof r=="string"?{message:r}:r;return t().show({level:n.level??i.level,message:n.message,duration:n.duration??i.duration,radius:n.radius??i.radius,pauseOnHover:n.pauseOnHover??i.pauseOnHover,showProgress:n.showProgress??i.showProgress,action:n.action,delay:n.delay,stacked:n.stacked??i.stacked,stackMaxVisible:n.stackMaxVisible??i.stackMaxVisible,stackGap:n.stackGap??i.stackGap})},hide(){return e?.clear(),this},update(r){return Object.assign(i,r),e&&(typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap)),this},destroy(){this.unmount()},close(r){return e?e.close(r):!1},updateToast(r,n){if(!e)return!1;let s=typeof n=="string"?{message:n}:n;return e.updateToast(r,s)},clear(){e?.clear()}}}function J5(){jl();for(let i of io.values())i.clear()}function mu(i){let o=typeof i=="string"?{message:i}:i;return Q5(o.position,o.max,o.radius,o.stacked,o.stackMaxVisible,o.stackGap).show({level:o.level,message:o.message,duration:o.duration,radius:o.radius,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap})}function M0(i){jl();for(let o of io.values())if(o.has(i))return o;return null}function Al(i,o,e){let t=typeof o=="string"?{message:o,duration:e}:o;return mu({...t,level:i,duration:t.duration??e})}function C0(i,o,e){return i==null?{message:o}:typeof i=="string"?{message:i}:typeof i=="function"?{message:i(e)}:i}var Ai={create:E0,show:mu,clearAll:J5,close(i){let o=M0(i);return o?o.close(i):!1},update(i,o){let e=M0(i);if(!e)return!1;let t=typeof o=="string"?{message:o}:o;return e.updateToast(i,t)},loading(i){let o=typeof i=="string"?{message:i}:i,e=mu({level:o.level??"info",message:o.message,duration:0,position:o.position,max:o.max,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress??!1,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap});return{id:e,close:()=>Ai.close(e),update:t=>{let r=typeof t=="string"?{message:t}:t;return Ai.update(e,r)},info:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"info",duration:2500,...r})},warning:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"warning",duration:3e3,...r})},success:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"success",duration:2500,...r})},error:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"error",duration:3500,...r})}}},async promise(i,o){let e=Ai.loading(o.loading);try{let t=await(typeof i=="function"?i():i),r=C0(o.success,"Completed successfully",t);return(o.successStrategy??(o.closeOnSuccess?"close":"update"))==="close"?e.close():e.update({level:"success",duration:o.successDuration??2500,...r}),t}catch(t){let r=C0(o.error,t instanceof Error?t.message:"Something went wrong",t);throw(o.errorStrategy??(o.closeOnError?"close":"update"))==="close"?e.close():e.update({level:"error",duration:o.errorDuration??3500,...r}),t}},closeAll(i){if(jl(),i){let o=io.get(i);if(!o?.isConnected){io.delete(i);return}o.clear();return}for(let[o,e]of io){if(!e?.isConnected){io.delete(o);continue}e.clear()}},info(i,o){return Al("info",i,o)},success(i,o){return Al("success",i,o)},warning(i,o){return Al("warning",i,o)},error(i,o){return Al("error",i,o)}};function gu(i,o){o.columns!=null&&(i.columns=o.columns),o.data!=null&&(i.data=o.data),o.dataSource!=null&&(i.dataSource=o.dataSource),o.source!=null&&(i.source=o.source),o.rowKey!=null&&(i.rowKey=o.rowKey),o.size!=null&&(i.size=o.size),o.selection!=null&&(i.selection=o.selection),o.selectedRowKeys!=null&&(i.selectedRowKeys=[...o.selectedRowKeys]),o.bordered!=null&&(i.bordered=o.bordered),o.border!=null&&(i.border=o.border),o.noBorder!=null&&(i.noBorder=o.noBorder),o.striped!=null&&(i.striped=o.striped),o.hoverable!=null&&(i.hoverable=o.hoverable),o.stickyHeader!=null&&(i.stickyHeader=o.stickyHeader),o.showHeader!=null&&(i.showHeader=o.showHeader),o.columnResizable!=null&&(i.columnResizable=o.columnResizable),o.columnReorderable!=null&&(i.columnReorderable=o.columnReorderable),o.loading!=null&&(i.loading=o.loading),o.virtual!=null&&(i.virtual=o.virtual),o.virtualHeight!=null&&(i.virtualHeight=o.virtualHeight),o.rowHeight!=null&&(i.rowHeight=o.rowHeight),o.overscan!=null&&(i.overscan=o.overscan),o.pagination!=null&&(i.pagination=o.pagination),o.current!=null&&(i.current=o.current),o.pageSize!=null&&(i.pageSize=o.pageSize),o.total!=null&&(i.total=o.total),o.showSizeChanger!=null&&(i.showSizeChanger=o.showSizeChanger),o.emptyText!=null&&(i.emptyText=o.emptyText),o.sortKey!=null&&(i.sortKey=o.sortKey),o.sortOrder!=null&&(i.sortOrder=o.sortOrder),o.rowClickable!=null&&(i.rowClickable=o.rowClickable),o.selectOnClick!=null&&(i.selectOnClick=o.selectOnClick),o.rowAnimation!=null&&(i.rowAnimation=o.rowAnimation),o.onRow!=null&&(i.onRow=o.onRow),o.onCell!=null&&(i.onCell=o.onCell),o.onHeaderRow!=null&&(i.onHeaderRow=o.onHeaderRow),o.onHeaderCell!=null&&(i.onHeaderCell=o.onHeaderCell)}function S0(i={}){let o=document.createElement("lui-table");re(o,ht("table")),gu(o,i);let e=!1;return{el:o,get mounted(){return e&&o.isConnected},get visible(){return!o.hidden},mount(r){return r&&!o.isConnected&&(r.appendChild(o),e=!0),this},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.hidden=!1,this},hide(){return o.hidden=!0,this},update(r){return gu(o,r),this},destroy(){this.unmount()},setData(r){return o.dataSource=r,this},setColumns(r){return o.columns=r,this},getData(){return o.dataSource??o.source??o.data??[]},getColumns(){return o.columns??[]},setLoading(r){return o.loading=r,this},getSelectedRowKeys(){return[...o.selectedRowKeys??[]]},setSelectedRowKeys(r){return o.selectedRowKeys=[...r],this},setSelection(r,n=o.selectedRowKeys??[]){return o.selection=r,o.selectedRowKeys=[...n],this},setPagination(r){return gu(o,r),this}}}var ex={create:S0};export{N1 as BP,lr as LuiAlert,Qe as LuiAutocomplete,dt as LuiAvatar,$t as LuiAvatarGroup,We as LuiBackground,St as LuiBadge,Mt as LuiBreadcrumb,Wt as LuiBreadcrumbItem,yt as LuiButton,He as LuiButtonGroup,mt as LuiButtonGroupItem,ar as LuiCalendar,wt as LuiCard,Xe as LuiCascader,xt as LuiCheckbox,Ut as LuiCheckboxGroup,Rr as LuiCol,Kr as LuiCollapse,vr as LuiCollapseItem,Be as LuiColorPicker,jt as LuiCommandPalette,Dt as LuiConfigProvider,Pe as LuiContextMenu,Gr as LuiDateRangePicker,it as LuiDatepicker,xe as LuiDialog,rr as LuiDivider,qe as LuiDrawer,fi as LuiDropdown,ze as LuiDropmenu,Qr as LuiEmptyState,Wr as LuiFileInput,kt as LuiForm,At as LuiFormItem,Ce as LuiIcon,Me as LuiIconPicker,Te as LuiImage,ot as LuiImageCropper,Se as LuiInput,bt as LuiInputNumber,ir as LuiInputOpt,go as LuiMenu,fn as LuiMenuDivider,Ot as LuiMenuItem,jo as LuiOption,Di as LuiOptionGroup,ya as LuiOverlayRoot,Re as LuiPagination,rt as LuiPopconfirm,Q as LuiPopover,Ct as LuiProgress,Nt as LuiQrcode,Gt as LuiRadio,nr as LuiRadioGroup,Mo as LuiRow,vt as LuiScrollArea,pe as LuiSelect,Jt as LuiSkeleton,Ye as LuiSlider,Nr as LuiSpinner,Er as LuiSplitter,ct as LuiStatistic,Ir as LuiSwitch,ft as LuiTab,qr as LuiTabPanel,Z as LuiTable,Bt as LuiTableColumn,Aa as LuiTabs,jr as LuiTag,Ie as LuiText,Ge as LuiTextarea,Pt as LuiToast,gr as LuiTooltip,ae as LuiTree,Ze as LuiTreeSelect,P as baseStyles,nt as bringOverlayStackToFront,mc as builtinIconCollection,Ms as builtinIconNames,dn as builtinIconPrefix,Ep as builtinTranslations,f5 as commandPalette,q5 as contextMenu,ou as createCommandPalette,Tl as createContextMenu,Ja as createDialog,y0 as createDialogForm,iu as createDrawer,D5 as createForm,hu as createPopover,S0 as createTable,E0 as createToastHost,I5 as dialog,E5 as drawer,eu as encodeQr,Zt as ensureOverlayExternalLayer,xc as ensureOverlayLayer,yc as ensureOverlayRoot,mn as eventPathContainsOwnedOverlay,N5 as form,Sx as formatDate,Ex as formatSize,F3 as getLocale,Hs as hasRecentOverlayInteraction,_0 as hideAllContextMenus,gc as isImageIconSource,Rs as isOverlayTopmost,Os as markOverlayInteraction,oe as mergeTranslations,Un as normalizeStatus,ke as onLocaleChange,Y5 as popover,Ey as registerFormField,zt as registerOverlayStack,$p as registerTranslations,va as resolveBuiltinIcon,Af as resolveBuiltinTranslations,gn as resolveOverlayLayerRegistration,Sp as setLocale,dp as setOverlayOwner,Cs as setupBuiltinIcons,w0 as showContextMenu,l4 as statusColorToken,sE as statusColorVar,ni as statusIcon,lE as statusOrder,N3 as t,ex as table,pt as toCssLength,Ai as toast,A as tokens,ie as translate,Sy as unregisterFormField,mo as unregisterOverlayStack};
|
|
14796
|
+
`,document.head.appendChild(r)}return o}function H5(i){let o=typeof i=="string"?{message:i}:i,e=nu({title:o.title??Zn("dialog.loading_title","\u8BF7\u7A0D\u5019"),message:void 0,noClose:o.noClose??!0,closeOnOutsidePress:o.closeOnOutsidePress??!1,shakeOnOutsideClick:o.shakeOnOutsideClick,placement:o.placement,offset:o.offset,backdrop:o.backdrop,backdropStyle:o.backdropStyle,backdropContent:o.backdropContent,noHeader:o.noHeader,noFooter:o.noFooter,draggable:o.draggable,destroyOnClose:o.destroyOnClose,fullscreen:o.fullscreen,width:o.width,portal:o.portal,overlayLayer:o.overlayLayer,container:o.container}),t=O5(o.message??Zn("dialog.loading_message","\u5904\u7406\u4E2D..."));return e.appendChild(t),e.show(),{close:()=>au(e),update(r){let n=typeof r=="string"?{message:r}:r;n.title!=null&&(e.title=n.title,e.requestUpdate());let s=t.querySelector('[data-role="message"]');n.message!=null&&s&&(s.textContent=n.message)}}}function R5(){[...El].forEach(i=>i.close?.())}var I5={create:Ja,open:su,alert:A5,confirm:j5,prompt:P5,loading:H5,closeAll:R5};function b0(i,o){let e=ho();return ie(oe(e.locale,e.translations),i,o)}function k0(i,o="default"){let e=document.createElement("lui-button");return re(e,ht("button")),e.slot="footer",e.variant=o,e.textContent=i,e}function cu(i){return{...i,source:i.source?[...i.source]:void 0,fields:i.fields?i.fields.map(cu):void 0,condition:i.condition?{...i.condition}:void 0}}function V5(i){return{...i,fields:i.fields.map(cu)}}function $l(i,o){return{...i,fields:i.fields?i.fields.map(cu):void 0,steps:i.steps?i.steps.map(V5):void 0,defaultValues:i.defaultValues?{...i.defaultValues}:void 0,onSubmit:o??i.onSubmit}}function du(i){let o="schema"in i?i.schema:i,e=document.createElement("lui-form");re(e,ht("form")),e.schema=$l(o);let t=!1;return{el:e,get mounted(){return t&&e.isConnected},get visible(){return!e.hidden},mount(n){return n&&!e.isConnected&&(n.appendChild(e),t=!0),this},unmount(){return e.isConnected&&e.remove(),t=!1,this},show(){return e.hidden=!1,this},hide(){return e.hidden=!0,this},update(n){let s=e.schema??$l(o);return e.schema=$l({...s,...n,onSubmit:n.onSubmit??s.onSubmit}),this},destroy(){this.unmount()},submit(){return Promise.resolve(e.submit())},validate(){return e.validate()},reset(n){e.reset(n)},getValues(){return e.getValues()},setValues(n){e.setValues(n)},getValue(n){return e.getValue(n)},setValue(n,s){e.setValue(n,s)},focusField(n){return e.focusField(n)},scrollToField(n){return e.scrollToField(n)}}}var D5=du;function y0(i){let o=i.schema.onSubmit,e=$l(i.schema,async x=>{await o?.(x),h(x)}),t=du(e),r,n=!1,s=new Promise(x=>{r=x}),d=Ja({...i,content:t.el,showCancel:!1}),h=x=>{n||(n=!0,r(x),d.destroy())},p=!!e.steps?.length;if(t.el.showActions=p,!p){let x=k0(i.cancelText??e.cancelLabel??b0("common.cancel","\u53D6\u6D88")),y=k0(i.submitText??e.submitLabel??b0("common.submit","\u63D0\u4EA4"),"primary");x.addEventListener("click",()=>h(null),{once:!0}),y.addEventListener("click",()=>t.submit(),{once:!1}),d.el.append(x,y)}return d.el.addEventListener("close",x=>{x.target===d.el&&h(null)}),{el:d.el,form:t,submit(){return t.submit()},validate(){return t.validate()},reset(x){t.reset(x)},getValues(){return t.getValues()},setValues(x){t.setValues(x)},getValue(x){return t.getValue(x)},setValue(x,y){t.setValue(x,y)},focusField(x){return t.focusField(x)},scrollToField(x){return t.scrollToField(x)},get mounted(){return d.mounted},get visible(){return d.visible},get closed(){return s},mount(x){return d.mount(x),this},unmount(){return d.unmount(),this},show(){return d.show(),this},hide(){return d.hide(),this},close(x){h(x??null)},update(x){return d.update(x),this},destroy(){d.destroy()}}}function lu(i){let o=y0(i);return o.show(),o}function F5(i){return"onSubmit"in i?lu({schema:i}):lu(i)}var N5={create:du,open:lu,prompt:F5};function L5(){let i=document.createElement("lui-context-menu");return re(i,ht("contextMenu")),i.trigger="manual",i}function uu(i,o){i.heading=o.heading??"",i.headingIcon=o.headingIcon??"",i.placement=o.placement??"bottom-start","items"in o&&o.items!==void 0&&(i.items=o.items),i.closeOnSelect=o.closeOnSelect??!0,i.closeOnOutsidePress=o.closeOnOutsidePress??!0,i.closeOnEscape=o.closeOnEscape??!0,i.submenuTrigger=o.submenuTrigger??"hover",i.backdrop=o.backdrop??"none",i.backdropStyle=o.backdropStyle??""}function Tl(i={}){let o=L5(),e=null,t=!1,r=s=>{e&&(o.removeEventListener("select",e),e=null),s&&(e=d=>{s(d.detail)},o.addEventListener("select",e))},n={el:o,get mounted(){return t&&o.isConnected},get visible(){return o.open},mount(s){if(o.isConnected)return this;let d=Zt("menu",s??i.container??Uo()??Wo());return d.appendChild(o),zt(o,d,"menu"),t=!0,this},unmount(){return o.isConnected&&o.remove(),t=!1,this},show(s){o.isConnected||this.mount();let d={...i,...s};uu(o,d),nt(o),r(d.onSelect),o.showAt(d.x,d.y,{items:d.items,context:d.context,triggerEvent:d.triggerEvent,source:d.source??"api"})},hide(){return o.hide(),this},update(s){return Object.assign(i,s),uu(o,{x:0,y:0,...i}),this},destroy(){r(void 0),o.hide(),this.unmount()}};return(i.items||i.heading||i.headingIcon||i.placement)&&uu(o,{x:0,y:0,...i}),n}var on=null,x0=new WeakMap;function w0(i){if(i.container){let o=x0.get(i.container);return(!o||!o.el.isConnected)&&(o=Tl({container:i.container}),x0.set(i.container,o)),o.show(i),o}return(!on||!on.el.isConnected)&&(on=Tl()),on.show(i),on}function _0(){document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.()})}function B5(){on?.destroy(),on=null,document.querySelectorAll("lui-context-menu").forEach(i=>{i.hide?.(),i.remove()})}var q5={create:Tl,show:w0,hideAll:_0,destroyAll:B5};function es(i,o,e){if(e==null)return;let t=typeof e=="function"?e():e;if(typeof t=="string"){let n=document.createElement("div");n.slot=o,n.textContent=t,i.appendChild(n);return}if(t instanceof DocumentFragment){let n=document.createElement("div");n.slot=o,n.appendChild(t),i.appendChild(n);return}if(t instanceof HTMLElement||t instanceof SVGElement){t.setAttribute("slot",o),i.appendChild(t);return}let r=document.createElement("div");r.slot=o,r.appendChild(t),i.appendChild(r)}function K5(i){let o=document.createElement("lui-popover");return re(o,ht("popover")),i.trigger!=null&&(o.trigger=i.trigger),i.placement!=null&&(o.placement=i.placement),i.disabled!=null&&(o.disabled=i.disabled),i.interactive!=null&&(o.interactive=i.interactive),i.showArrow!=null&&(o.showArrow=i.showArrow),i.closeOnOutsidePress!=null&&(o.closeOnOutsidePress=i.closeOnOutsidePress),i.closeOnEsc!=null&&(o.closeOnEsc=i.closeOnEsc),i.openDelay!=null&&(o.openDelay=i.openDelay),i.closeDelay!=null&&(o.closeDelay=i.closeDelay),i.offsetDistance!=null&&(o.offsetDistance=i.offsetDistance),i.autoFlip!=null&&(o.autoFlip=i.autoFlip),i.autoShift!=null&&(o.autoShift=i.autoShift),i.sameWidth!=null&&(o.sameWidth=i.sameWidth),i.maxWidth!=null&&(o.maxWidth=i.maxWidth),i.maxHeight!=null&&(o.maxHeight=i.maxHeight),i.backdrop!=null&&(o.backdrop=i.backdrop),i.backdropStyle!=null&&(o.backdropStyle=i.backdropStyle),i.portal!=null&&(o.portal=i.portal),i.overlayLayer!=null&&(o.overlayLayer=i.overlayLayer),i.container!=null&&(o.container=i.container),es(o,"trigger",i.triggerContent),es(o,"header",i.header),es(o,"content",i.content),es(o,"footer",i.footer),es(o,"backdrop",i.backdropContent),o}function hu(i={}){let o=K5(i),e=!1,t=!1,r,n=new Promise(h=>{r=h}),s=()=>{t||(t=!0,r({action:"close"}))};return o.addEventListener("close",h=>{h.target===o&&s()}),{el:o,get mounted(){return e&&o.isConnected},get visible(){return o.open},get closed(){return n},mount(h){return o.isConnected?this:((h??document.body).appendChild(o),e=!0,this)},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.isConnected||this.mount(),o.portal&&o._portalHost&&nt(o._portalHost),o.show(),this},hide(){return o.hide(),this},close(){o.hide(),s()},update(h){return Object.assign(o,h),this},destroy(){t||s(),this.unmount()}}}function W5(i={}){let o=hu({...i,trigger:"manual"});return o.show(),o}function U5(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.()})}function G5(){document.querySelectorAll("lui-popover").forEach(i=>{i.hide?.(),i.remove()})}var Y5={create:hu,open:W5,closeAll:U5,destroyAll:G5};var io=new Map;function X5(){return Zt("toast",Uo()??Wo())}function z0(i){let o=ht("toast"),e=typeof o.position=="string"?o.position:void 0;return i??e??"top-right"}function pu(i){let o=ho();i.locale=o.locale,i.translations=o.translations,re(i,ht("toast"))}function jl(){for(let[i,o]of io)o?.isConnected||io.delete(i)}function Z5(i){let o=io.get(i);o&&(io.delete(i),o.isConnected&&o.remove())}function Q5(i,o,e,t,r,n){jl();let s=z0(i),d=io.get(s);if(d?.isConnected)return pu(d),nt(d),d.position=s,typeof o=="number"&&(d.max=o),typeof e=="string"&&(d.radius=e),typeof t=="boolean"&&(d.stacked=t),typeof r=="number"&&(d.stackMaxVisible=r),typeof n=="number"&&(d.stackGap=n),d;let h=document.createElement("lui-toast");h.listen=!1,pu(h),h.position=s,typeof o=="number"&&(h.max=o),typeof e=="string"&&(h.radius=e),typeof t=="boolean"&&(h.stacked=t),typeof r=="number"&&(h.stackMaxVisible=r),typeof n=="number"&&(h.stackGap=n),h.addEventListener("empty",()=>Z5(s));let p=X5();return p.appendChild(h),zt(h,p,"toast"),io.set(s,h),h}function E0(i={}){let o=!1,e=null,t=r=>{if(e?.isConnected)return e;let n=z0(i.position);e=document.createElement("lui-toast"),e.listen=!1,pu(e),e.position=n,typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap);let s=Zt("toast",r??Uo()??Wo());return s.appendChild(e),zt(e,s,"toast"),o=!0,e};return{get el(){return t()},get mounted(){return o&&!!e?.isConnected},get visible(){return!!e?.isConnected},mount(r){return t(r),this},unmount(){return e?.isConnected&&e.remove(),o=!1,this},show(r){let n=typeof r=="string"?{message:r}:r;return t().show({level:n.level??i.level,message:n.message,duration:n.duration??i.duration,radius:n.radius??i.radius,pauseOnHover:n.pauseOnHover??i.pauseOnHover,showProgress:n.showProgress??i.showProgress,action:n.action,delay:n.delay,stacked:n.stacked??i.stacked,stackMaxVisible:n.stackMaxVisible??i.stackMaxVisible,stackGap:n.stackGap??i.stackGap})},hide(){return e?.clear(),this},update(r){return Object.assign(i,r),e&&(typeof i.max=="number"&&(e.max=i.max),typeof i.radius=="string"&&(e.radius=i.radius),typeof i.stacked=="boolean"&&(e.stacked=i.stacked),typeof i.stackMaxVisible=="number"&&(e.stackMaxVisible=i.stackMaxVisible),typeof i.stackGap=="number"&&(e.stackGap=i.stackGap)),this},destroy(){this.unmount()},close(r){return e?e.close(r):!1},updateToast(r,n){if(!e)return!1;let s=typeof n=="string"?{message:n}:n;return e.updateToast(r,s)},clear(){e?.clear()}}}function J5(){jl();for(let i of io.values())i.clear()}function mu(i){let o=typeof i=="string"?{message:i}:i;return Q5(o.position,o.max,o.radius,o.stacked,o.stackMaxVisible,o.stackGap).show({level:o.level,message:o.message,duration:o.duration,radius:o.radius,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap})}function M0(i){jl();for(let o of io.values())if(o.has(i))return o;return null}function Al(i,o,e){let t=typeof o=="string"?{message:o,duration:e}:o;return mu({...t,level:i,duration:t.duration??e})}function C0(i,o,e){return i==null?{message:o}:typeof i=="string"?{message:i}:typeof i=="function"?{message:i(e)}:i}var Ai={create:E0,show:mu,clearAll:J5,close(i){let o=M0(i);return o?o.close(i):!1},update(i,o){let e=M0(i);if(!e)return!1;let t=typeof o=="string"?{message:o}:o;return e.updateToast(i,t)},loading(i){let o=typeof i=="string"?{message:i}:i,e=mu({level:o.level??"info",message:o.message,duration:0,position:o.position,max:o.max,pauseOnHover:o.pauseOnHover,showProgress:o.showProgress??!1,action:o.action,delay:o.delay,stacked:o.stacked,stackMaxVisible:o.stackMaxVisible,stackGap:o.stackGap});return{id:e,close:()=>Ai.close(e),update:t=>{let r=typeof t=="string"?{message:t}:t;return Ai.update(e,r)},info:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"info",duration:2500,...r})},warning:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"warning",duration:3e3,...r})},success:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"success",duration:2500,...r})},error:t=>{let r=t==null?{}:typeof t=="string"?{message:t}:t;return Ai.update(e,{level:"error",duration:3500,...r})}}},async promise(i,o){let e=Ai.loading(o.loading);try{let t=await(typeof i=="function"?i():i),r=C0(o.success,"Completed successfully",t);return(o.successStrategy??(o.closeOnSuccess?"close":"update"))==="close"?e.close():e.update({level:"success",duration:o.successDuration??2500,...r}),t}catch(t){let r=C0(o.error,t instanceof Error?t.message:"Something went wrong",t);throw(o.errorStrategy??(o.closeOnError?"close":"update"))==="close"?e.close():e.update({level:"error",duration:o.errorDuration??3500,...r}),t}},closeAll(i){if(jl(),i){let o=io.get(i);if(!o?.isConnected){io.delete(i);return}o.clear();return}for(let[o,e]of io){if(!e?.isConnected){io.delete(o);continue}e.clear()}},info(i,o){return Al("info",i,o)},success(i,o){return Al("success",i,o)},warning(i,o){return Al("warning",i,o)},error(i,o){return Al("error",i,o)}};function gu(i,o){o.columns!=null&&(i.columns=o.columns),o.data!=null&&(i.data=o.data),o.dataSource!=null&&(i.dataSource=o.dataSource),o.source!=null&&(i.source=o.source),o.rowKey!=null&&(i.rowKey=o.rowKey),o.size!=null&&(i.size=o.size),o.selection!=null&&(i.selection=o.selection),o.selectedRowKeys!=null&&(i.selectedRowKeys=[...o.selectedRowKeys]),o.bordered!=null&&(i.bordered=o.bordered),o.border!=null&&(i.border=o.border),o.noBorder!=null&&(i.noBorder=o.noBorder),o.striped!=null&&(i.striped=o.striped),o.hoverable!=null&&(i.hoverable=o.hoverable),o.stickyHeader!=null&&(i.stickyHeader=o.stickyHeader),o.showHeader!=null&&(i.showHeader=o.showHeader),o.columnResizable!=null&&(i.columnResizable=o.columnResizable),o.columnReorderable!=null&&(i.columnReorderable=o.columnReorderable),o.loading!=null&&(i.loading=o.loading),o.virtual!=null&&(i.virtual=o.virtual),o.virtualHeight!=null&&(i.virtualHeight=o.virtualHeight),o.rowHeight!=null&&(i.rowHeight=o.rowHeight),o.overscan!=null&&(i.overscan=o.overscan),o.pagination!=null&&(i.pagination=o.pagination),o.current!=null&&(i.current=o.current),o.pageSize!=null&&(i.pageSize=o.pageSize),o.total!=null&&(i.total=o.total),o.showSizeChanger!=null&&(i.showSizeChanger=o.showSizeChanger),o.emptyText!=null&&(i.emptyText=o.emptyText),o.sortKey!=null&&(i.sortKey=o.sortKey),o.sortOrder!=null&&(i.sortOrder=o.sortOrder),o.rowClickable!=null&&(i.rowClickable=o.rowClickable),o.selectOnClick!=null&&(i.selectOnClick=o.selectOnClick),o.rowAnimation!=null&&(i.rowAnimation=o.rowAnimation),o.onRow!=null&&(i.onRow=o.onRow),o.onCell!=null&&(i.onCell=o.onCell),o.onHeaderRow!=null&&(i.onHeaderRow=o.onHeaderRow),o.onHeaderCell!=null&&(i.onHeaderCell=o.onHeaderCell)}function S0(i={}){let o=document.createElement("lui-table");re(o,ht("table")),gu(o,i);let e=!1;return{el:o,get mounted(){return e&&o.isConnected},get visible(){return!o.hidden},mount(r){return r&&!o.isConnected&&(r.appendChild(o),e=!0),this},unmount(){return o.isConnected&&o.remove(),e=!1,this},show(){return o.hidden=!1,this},hide(){return o.hidden=!0,this},update(r){return gu(o,r),this},destroy(){this.unmount()},setData(r){return o.dataSource=r,this},setColumns(r){return o.columns=r,this},getData(){return o.dataSource??o.source??o.data??[]},getColumns(){return o.columns??[]},setLoading(r){return o.loading=r,this},getSelectedRowKeys(){return[...o.selectedRowKeys??[]]},setSelectedRowKeys(r){return o.selectedRowKeys=[...r],this},setSelection(r,n=o.selectedRowKeys??[]){return o.selection=r,o.selectedRowKeys=[...n],this},setPagination(r){return gu(o,r),this}}}var ex={create:S0};export{N1 as BP,cr as LuiAlert,Qe as LuiAutocomplete,dt as LuiAvatar,$t as LuiAvatarGroup,We as LuiBackground,St as LuiBadge,Mt as LuiBreadcrumb,Wt as LuiBreadcrumbItem,yt as LuiButton,He as LuiButtonGroup,mt as LuiButtonGroupItem,sr as LuiCalendar,wt as LuiCard,Xe as LuiCascader,xt as LuiCheckbox,Ut as LuiCheckboxGroup,Ir as LuiCol,Kr as LuiCollapse,br as LuiCollapseItem,Be as LuiColorPicker,jt as LuiCommandPalette,Dt as LuiConfigProvider,Pe as LuiContextMenu,Gr as LuiDateRangePicker,it as LuiDatepicker,xe as LuiDialog,or as LuiDivider,qe as LuiDrawer,fi as LuiDropdown,ze as LuiDropmenu,Qr as LuiEmptyState,Wr as LuiFileInput,kt as LuiForm,At as LuiFormItem,Ce as LuiIcon,Me as LuiIconPicker,Te as LuiImage,ot as LuiImageCropper,Se as LuiInput,bt as LuiInputNumber,nr as LuiInputOpt,go as LuiMenu,fn as LuiMenuDivider,Ot as LuiMenuItem,jo as LuiOption,Di as LuiOptionGroup,ya as LuiOverlayRoot,Re as LuiPagination,rt as LuiPopconfirm,Q as LuiPopover,Ct as LuiProgress,Nt as LuiQrcode,Gt as LuiRadio,ar as LuiRadioGroup,Mo as LuiRow,vt as LuiScrollArea,pe as LuiSelect,er as LuiSkeleton,Ye as LuiSlider,Lr as LuiSpinner,Sr as LuiSplitter,ct as LuiStatistic,Vr as LuiSwitch,ft as LuiTab,qr as LuiTabPanel,Z as LuiTable,Bt as LuiTableColumn,Aa as LuiTabs,Pr as LuiTag,Ie as LuiText,Ge as LuiTextarea,Pt as LuiToast,fr as LuiTooltip,ae as LuiTree,Ze as LuiTreeSelect,P as baseStyles,nt as bringOverlayStackToFront,mc as builtinIconCollection,Ms as builtinIconNames,dn as builtinIconPrefix,Ep as builtinTranslations,f5 as commandPalette,q5 as contextMenu,ou as createCommandPalette,Tl as createContextMenu,Ja as createDialog,y0 as createDialogForm,iu as createDrawer,D5 as createForm,hu as createPopover,S0 as createTable,E0 as createToastHost,I5 as dialog,E5 as drawer,eu as encodeQr,Zt as ensureOverlayExternalLayer,xc as ensureOverlayLayer,yc as ensureOverlayRoot,mn as eventPathContainsOwnedOverlay,N5 as form,Sx as formatDate,Ex as formatSize,F3 as getLocale,Hs as hasRecentOverlayInteraction,_0 as hideAllContextMenus,gc as isImageIconSource,Rs as isOverlayTopmost,Os as markOverlayInteraction,oe as mergeTranslations,Un as normalizeStatus,ke as onLocaleChange,Y5 as popover,Ey as registerFormField,zt as registerOverlayStack,$p as registerTranslations,va as resolveBuiltinIcon,Af as resolveBuiltinTranslations,gn as resolveOverlayLayerRegistration,Sp as setLocale,dp as setOverlayOwner,Cs as setupBuiltinIcons,w0 as showContextMenu,l4 as statusColorToken,sE as statusColorVar,ni as statusIcon,lE as statusOrder,N3 as t,ex as table,pt as toCssLength,Ai as toast,A as tokens,ie as translate,Sy as unregisterFormField,mo as unregisterOverlayStack};
|
|
14763
14797
|
/*! Bundled license information:
|
|
14764
14798
|
|
|
14765
14799
|
@lit-labs/virtualizer/layouts/shared/SizeCache.js:
|