532 lines
514 KiB
JavaScript
532 lines
514 KiB
JavaScript
|
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[47485],{36787:function(Ao,lr,At){"use strict";At.d(lr,{Z:function(){return jt}});var Z=At(28991),Kt=At(67294),nr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z"}}]},name:"bold",theme:"outlined"},nt=nr,hr=At(27029),ir=function(Wt,Ut){return Kt.createElement(hr.Z,(0,Z.Z)((0,Z.Z)({},Wt),{},{ref:Ut,icon:nt}))};ir.displayName="BoldOutlined";var jt=Kt.forwardRef(ir)},32091:function(Ao,lr,At){"use strict";At.d(lr,{Z:function(){return jt}});var Z=At(28991),Kt=At(67294),nr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"italic",theme:"outlined"},nt=nr,hr=At(27029),ir=function(Wt,Ut){return Kt.createElement(hr.Z,(0,Z.Z)((0,Z.Z)({},Wt),{},{ref:Ut,icon:nt}))};ir.displayName="ItalicOutlined";var jt=Kt.forwardRef(ir)},46655:function(Ao,lr,At){"use strict";At.d(lr,{Z:function(){return jt}});var Z=At(28991),Kt=At(67294),nr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824 804H200c-4.4 0-8 3.4-8 7.6v60.8c0 4.2 3.6 7.6 8 7.6h624c4.4 0 8-3.4 8-7.6v-60.8c0-4.2-3.6-7.6-8-7.6zm-312-76c69.4 0 134.6-27.1 183.8-76.2C745 602.7 772 537.4 772 468V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 97-79 176-176 176s-176-79-176-176V156c0-6.6-5.4-12-12-12h-60c-6.6 0-12 5.4-12 12v312c0 69.4 27.1 134.6 76.2 183.8C377.3 701 442.6 728 512 728z"}}]},name:"underline",theme:"outlined"},nt=nr,hr=At(27029),ir=function(Wt,Ut){return Kt.createElement(hr.Z,(0,Z.Z)((0,Z.Z)({},Wt),{},{ref:Ut,icon:nt}))};ir.displayName="UnderlineOutlined";var jt=Kt.forwardRef(ir)},53835:function(Ao,lr,At){"use strict";At.d(lr,{T:function(){return sa},Z:function(){return na}});var Z=At(67294);function Kt(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function nr(g){return nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},nr(g)}function nt(g,m){if(nr(g)!=="object"||g===null)return g;var d=g[Symbol.toPrimitive];if(d!==void 0){var t=d.call(g,m||"default");if(nr(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(g)}function hr(g){var m=nt(g,"string");return nr(m)==="symbol"?m:String(m)}function ir(g,m){for(var d=0;d<m.length;d++){var t=m[d];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(g,hr(t.key),t)}}function jt(g,m,d){return m&&ir(g.prototype,m),d&&ir(g,d),Object.defineProperty(g,"prototype",{writable:!1}),g}function et(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function Wt(g,m){if(m&&(nr(m)==="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return et(g)}function Ut(g){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(d){return d.__proto__||Object.getPrototypeOf(d)},Ut(g)}function ur(g,m){return ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},ur(g,m)}function Oe(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(m&&m.prototype,{constructor:{value:g,writ
|
||
|
|
||
|
`+s+" uses "+l+" but also contains the following legacy lifecycles:"+(d!==null?`
|
||
|
`+d:"")+(t!==null?`
|
||
|
`+t:"")+(i!==null?`
|
||
|
`+i:"")+`
|
||
|
|
||
|
The above lifecycles should be removed. Learn more about this warning here:
|
||
|
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof g.getDerivedStateFromProps=="function"&&(m.componentWillMount=Ce,m.componentWillReceiveProps=je),typeof m.getSnapshotBeforeUpdate=="function"){if(typeof m.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");m.componentWillUpdate=Lr;var c=m.componentDidUpdate;m.componentDidUpdate=function(S,y,x){var E=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:x;c.call(this,S,y,E)}}return g}function ge(){return ge=Object.assign?Object.assign.bind():function(g){for(var m=1;m<arguments.length;m++){var d=arguments[m];for(var t in d)Object.prototype.hasOwnProperty.call(d,t)&&(g[t]=d[t])}return g},ge.apply(this,arguments)}function Or(g){var m,d,t="";if(typeof g=="string"||typeof g=="number")t+=g;else if(typeof g=="object")if(Array.isArray(g))for(m=0;m<g.length;m++)g[m]&&(d=Or(g[m]))&&(t&&(t+=" "),t+=d);else for(m in g)g[m]&&(t&&(t+=" "),t+=m);return t}function ko(){for(var g,m,d=0,t="";d<arguments.length;)(g=arguments[d++])&&(m=Or(g))&&(t&&(t+=" "),t+=m);return t}var Tt=ko;function Ze(g){var m=g.cellCount,d=g.cellSize,t=g.computeMetadataCallback,i=g.computeMetadataCallbackProps,s=g.nextCellsCount,l=g.nextCellSize,c=g.nextScrollToIndex,p=g.scrollToIndex,S=g.updateScrollOffsetForScrollToIndex;(m!==s||(typeof d=="number"||typeof l=="number")&&d!==l)&&(t(i),p>=0&&p===c&&S())}function Ei(g,m){if(g==null)return{};var d={},t=Object.keys(g),i,s;for(s=0;s<t.length;s++)i=t[s],!(m.indexOf(i)>=0)&&(d[i]=g[i]);return d}function xn(g,m){if(g==null)return{};var d=Ei(g,m),t,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(g);for(i=0;i<s.length;i++)t=s[i],!(m.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(g,t)||(d[t]=g[t]))}return d}var fa=null,da=null,zs=null,It=null,Te=null,rs=null,ns=null,oi=null,Mi=null,Oi=null,wn=null,Cn=null,Rt=null,is=null,Lo=null,As=null,ks=null,va=null,ha=function(){function g(m){var d=m.cellCount,t=m.cellSizeGetter,i=m.estimatedCellSize;Kt(this,g),Q(this,"_cellSizeAndPositionData",{}),Q(this,"_lastMeasuredIndex",-1),Q(this,"_lastBatchedIndex",-1),Q(this,"_cellCount",void 0),Q(this,"_cellSizeGetter",void 0),Q(this,"_estimatedCellSize",void 0),this._cellSizeGetter=t,this._cellCount=d,this._estimatedCellSize=i}return jt(g,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(d){var t=d.cellCount,i=d.estimatedCellSize,s=d.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=i,this._cellSizeGetter=s}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(d){if(d<0||d>=this._cellCount)throw Error("Requested index ".concat(d," is outside of range 0..").concat(this._cellCount));if(d>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),i=t.offset+t.size,s=this._lastMeasuredIndex+1;s<=d;s++){var l=this._cellSizeGetter({index:s});if(l===void 0||isNaN(l))throw Error("Invalid size returned for cell ".concat(s," of value ").concat(l));l===null?(this._cellSizeAndPositionData[s]={offset:i,size:0},this._lastBatchedIndex=d):(this._cellSizeAndPositionData[s]={offset:i,size:l},i+=l,this._lastMeasuredIndex=d)}return this._cellSizeAndPositionData[d]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var d=this.getSizeAndPositionOfLastMeasuredCell(),t=d.offset+d.size,i=this._cellCount-this._lastMeasuredIndex-1,s=i*this._estimatedCellSize;return t+s}},{key:"getUpdatedOffsetForIndex",value:function(d){var t=d.align,i=t===void 0?"auto":t,s=d.containerSize,l=d.currentOffset,c=d.targetIndex;if(s<=0)return 0;var p=this.getSizeAndPositionOfCell(c),S=p.offset,y
|
||
|
x:`).concat(S.x,", y:").concat(S.y,", width:").concat(S.width,", height:").concat(S.height));l=Math.max(l,S.y+S.height),c=Math.max(c,S.x+S.width),i[p]=S,s.registerCell({cellMetadatum:S,index:p})}return{cellMetadata:i,height:l,sectionManager:s,width:c}}function ci(g){var m=g.align,d=m===void 0?"auto":m,t=g.cellOffset,i=g.cellSize,s=g.containerSize,l=g.currentOffset,c=t,p=c-s+i;switch(d){case"start":return c;case"end":return p;case"center":return c-(s-i)/2;default:return Math.max(p,Math.min(c,l))}}var Qe=function(g){Oe(m,g);function m(d,t){var i;return Kt(this,m),i=Wt(this,Ut(m).call(this,d,t)),i._cellMetadata=[],i._lastRenderedCellIndices=[],i._cellCache=[],i._isScrollingChange=i._isScrollingChange.bind(et(i)),i._setCollectionViewRef=i._setCollectionViewRef.bind(et(i)),i}return jt(m,[{key:"forceUpdate",value:function(){this._collectionView!==void 0&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var t=ge({},this.props);return Z.createElement(cs,ge({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},t))}},{key:"calculateSizeAndPositionData",value:function(){var t=this.props,i=t.cellCount,s=t.cellSizeAndPositionGetter,l=t.sectionSize,c=Gi({cellCount:i,cellSizeAndPositionGetter:s,sectionSize:l});this._cellMetadata=c.cellMetadata,this._sectionManager=c.sectionManager,this._height=c.height,this._width=c.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(t){var i=t.align,s=t.cellIndex,l=t.height,c=t.scrollLeft,p=t.scrollTop,S=t.width,y=this.props.cellCount;if(s>=0&&s<y){var x=this._cellMetadata[s];c=ci({align:i,cellOffset:x.x,cellSize:x.width,containerSize:S,currentOffset:c,targetIndex:s}),p=ci({align:i,cellOffset:x.y,cellSize:x.height,containerSize:l,currentOffset:p,targetIndex:s})}return{scrollLeft:c,scrollTop:p}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(t){var i=this,s=t.height,l=t.isScrolling,c=t.width,p=t.x,S=t.y,y=this.props,x=y.cellGroupRenderer,E=y.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:s,width:c,x:p,y:S}),x({cellCache:this._cellCache,cellRenderer:E,cellSizeAndPositionGetter:function(P){var A=P.index;return i._sectionManager.getCellMetadata({index:A})},indices:this._lastRenderedCellIndices,isScrolling:l})}},{key:"_isScrollingChange",value:function(t){t||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(t){this._collectionView=t}}]),m}(Z.PureComponent);Q(Qe,"defaultProps",{"aria-label":"grid",cellGroupRenderer:Nn}),Qe.propTypes={};function Nn(g){var m=g.cellCache,d=g.cellRenderer,t=g.cellSizeAndPositionGetter,i=g.indices,s=g.isScrolling;return i.map(function(l){var c=t({index:l}),p={index:l,isScrolling:s,key:l,style:{height:c.height,left:c.x,position:"absolute",top:c.y,width:c.width}};return s?(l in m||(m[l]=d(p)),m[l]):d(p)}).filter(function(l){return!!l})}var fi=null,Ca=function(g){Oe(m,g);function m(d,t){var i;return Kt(this,m),i=Wt(this,Ut(m).call(this,d,t)),i._registerChild=i._registerChild.bind(et(i)),i}return jt(m,[{key:"componentDidUpdate",value:function(t){var i=this.props,s=i.columnMaxWidth,l=i.columnMinWidth,c=i.columnCount,p=i.width;(s!==t.columnMaxWidth||l!==t.columnMinWidth||c!==t.columnCount||p!==t.width)&&this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var t=this.props,i=t.children,s=t.columnMaxWidth,l=t.columnMinWidth,c=t.columnCount,p=t.width,S=l||1,y=s?Math.min(s,p):p,x=p/c;x=Math.max(S,x),x=Math.min(y,x),x=Math.floor(x);var E=Math.min(p,x*c);return i({adjustedWidth:E,columnWidth:x,getColumnWidth:function(){return x},registerChild:this._registerChild})}},{key:"_registerChild",value:function(t){if(t&&typeof t.recomputeGridSize!="function")throw Error("Unexpected child type registered; only Grid/MultiGrid children
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function We(g){return cn(g)||Ra(g)||fn(g)||ye()}var dn=function(g){Oe(m,g);function m(d,t){var i;return Kt(this,m),i=Wt(this,Ut(m).call(this,d,t)),i._loadMoreRowsMemoizer=pr(),i._onRowsRendered=i._onRowsRendered.bind(et(i)),i._registerChild=i._registerChild.bind(et(i)),i}return jt(m,[{key:"resetLoadMoreRowsCache",value:function(t){this._loadMoreRowsMemoizer=pr(),t&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){var t=this.props.children;return t({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(t){var i=this,s=this.props.loadMoreRows;t.forEach(function(l){var c=s(l);c&&c.then(function(){Vo({lastRenderedStartIndex:i._lastRenderedStartIndex,lastRenderedStopIndex:i._lastRenderedStopIndex,startIndex:l.startIndex,stopIndex:l.stopIndex})&&i._registeredChild&&di(i._registeredChild,i._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(t){var i=t.startIndex,s=t.stopIndex;this._lastRenderedStartIndex=i,this._lastRenderedStopIndex=s,this._doStuff(i,s)}},{key:"_doStuff",value:function(t,i){var s,l=this,c=this.props,p=c.isRowLoaded,S=c.minimumBatchSize,y=c.rowCount,x=c.threshold,E=Bs({isRowLoaded:p,minimumBatchSize:S,rowCount:y,startIndex:Math.max(0,t-x),stopIndex:Math.min(y-1,i+x)}),O=(s=[]).concat.apply(s,We(E.map(function(P){var A=P.startIndex,B=P.stopIndex;return[A,B]})));this._loadMoreRowsMemoizer({callback:function(){l._loadUnloadedRanges(E)},indices:{squashedUnloadedRanges:O}})}},{key:"_registerChild",value:function(t){this._registeredChild=t}}]),m}(Z.PureComponent);Q(dn,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),dn.propTypes={};function Vo(g){var m=g.lastRenderedStartIndex,d=g.lastRenderedStopIndex,t=g.startIndex,i=g.stopIndex;return!(t>d||i<m)}function Bs(g){for(var m=g.isRowLoaded,d=g.minimumBatchSize,t=g.rowCount,i=g.startIndex,s=g.stopIndex,l=[],c=null,p=null,S=i;S<=s;S++){var y=m({index:S});y?p!==null&&(l.push({startIndex:c,stopIndex:p}),c=p=null):(p=S,c===null&&(c=S))}if(p!==null){for(var x=Math.min(Math.max(p,c+d-1),t-1),E=p+1;E<=x&&!m({index:E});E++)p=E;l.push({startIndex:c,stopIndex:p})}if(l.length)for(var O=l[0];O.stopIndex-O.startIndex+1<d&&O.startIndex>0;){var P=O.startIndex-1;if(!m({index:P}))O.startIndex=P;else break}return l}function di(g){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=typeof g.recomputeGridSize=="function"?g.recomputeGridSize:g.recomputeRowHeights;d?d.call(g,m):g.forceUpdate()}var Mn=null,fs=null,Hs=null,ds=null,Wi=null,ee,Fi,Se=(Fi=ee=function(g){Oe(m,g);function m(){var d,t;Kt(this,m);for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t=Wt(this,(d=Ut(m)).call.apply(d,[this].concat(s))),Q(et(t),"Grid",void 0),Q(et(t),"_cellRenderer",function(c){var p=c.parent,S=c.rowIndex,y=c.style,x=c.isScrolling,E=c.isVisible,O=c.key,P=t.props.rowRenderer,A=Object.getOwnPropertyDescriptor(y,"width");return A&&A.writable&&(y.width="100%"),P({index:S,style:y,isScrolling:x,isVisible:E,key:O,parent:p})}),Q(et(t),"_setRef",function(c){t.Grid=c}),Q(et(t),"_onScroll",function(c){var p=c.clientHeight,S=c.scrollHeight,y=c.scrollTop,x=t.props.onScroll;x({clientHeight:p,scrollHeight:S,scrollTop:y})}),Q(et(t),"_onSectionRendered",function(c){var p=c.rowOverscanStartIndex,S=c.rowOverscanStopIndex,y=c.rowStartIndex,x=c.rowStopIndex,E=t.props.onRowsRendered;E({overscanStartIndex:p,overscanStopIndex:S,startIndex:y,stopIndex:x})}),t}return jt(m,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(t){var i=t.alignment,s=t.index;if(this.Grid){var l=this.Grid.getOffsetForCell({alignment:i,rowIndex:s,columnIndex:0}),c=l.scrollTop;return c}return 0}},{key:"invalidateCellSizeAfterRender",value:function(t){var i=t.columnIndex,s=t.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:s,columnIndex:i})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.meas
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vs(g,m){return Ta(g)||Bi(g,m)||fn(g,m)||Ea()}function Un(g,m,d,t){for(var i=d+1;m<=d;){var s=m+d>>>1,l=g[s];l>=t?(i=s,d=s-1):m=s+1}return i}function hs(g,m,d,t,i){for(var s=d+1;m<=d;){var l=m+d>>>1,c=g[l];i(c,t)>=0?(s=l,d=l-1):m=l+1}return s}function uo(g,m,d,t,i){return typeof d=="function"?hs(g,t===void 0?0:t|0,i===void 0?g.length-1:i|0,m,d):Un(g,d===void 0?0:d|0,t===void 0?g.length-1:t|0,m)}function vi(g,m,d,t){for(var i=d+1;m<=d;){var s=m+d>>>1,l=g[s];l>t?(i=s,d=s-1):m=s+1}return i}function Sr(g,m,d,t,i){for(var s=d+1;m<=d;){var l=m+d>>>1,c=g[l];i(c,t)>0?(s=l,d=l-1):m=l+1}return s}function Ma(g,m,d,t,i){return typeof d=="function"?Sr(g,t===void 0?0:t|0,i===void 0?g.length-1:i|0,m,d):vi(g,d===void 0?0:d|0,t===void 0?g.length-1:t|0,m)}function Ee(g,m,d,t){for(var i=m-1;m<=d;){var s=m+d>>>1,l=g[s];l<t?(i=s,m=s+1):d=s-1}return i}function ps(g,m,d,t,i){for(var s=m-1;m<=d;){var l=m+d>>>1,c=g[l];i(c,t)<0?(s=l,m=l+1):d=l-1}return s}function Uo(g,m,d,t,i){return typeof d=="function"?ps(g,t===void 0?0:t|0,i===void 0?g.length-1:i|0,m,d):Ee(g,d===void 0?0:d|0,t===void 0?g.length-1:t|0,m)}function Xo(g,m,d,t){for(var i=m-1;m<=d;){var s=m+d>>>1,l=g[s];l<=t?(i=s,m=s+1):d=s-1}return i}function On(g,m,d,t,i){for(var s=m-1;m<=d;){var l=m+d>>>1,c=g[l];i(c,t)<=0?(s=l,m=l+1):d=l-1}return s}function Oa(g,m,d,t,i){return typeof d=="function"?On(g,t===void 0?0:t|0,i===void 0?g.length-1:i|0,m,d):Xo(g,d===void 0?0:d|0,t===void 0?g.length-1:t|0,m)}function co(g,m,d,t){for(m-1;m<=d;){var i=m+d>>>1,s=g[i];if(s===t)return i;s<=t?m=i+1:d=i-1}return-1}function Hi(g,m,d,t,i){for(m-1;m<=d;){var s=m+d>>>1,l=g[s],c=i(l,t);if(c===0)return s;c<=0?m=s+1:d=s-1}return-1}function gs(g,m,d,t,i){return typeof d=="function"?Hi(g,t===void 0?0:t|0,i===void 0?g.length-1:i|0,m,d):co(g,d===void 0?0:d|0,t===void 0?g.length-1:t|0,m)}var Wr={ge:uo,gt:Ma,lt:Uo,le:Oa,eq:gs},hi=0,In=1,Tr=2;function Yo(g,m,d,t,i){this.mid=g,this.left=m,this.right=d,this.leftPoints=t,this.rightPoints=i,this.count=(m?m.count:0)+(d?d.count:0)+t.length}var Pe=Yo.prototype;function Xr(g,m){g.mid=m.mid,g.left=m.left,g.right=m.right,g.leftPoints=m.leftPoints,g.rightPoints=m.rightPoints,g.count=m.count}function Ve(g,m){var d=Dr(m);g.mid=d.mid,g.left=d.left,g.right=d.right,g.leftPoints=d.leftPoints,g.rightPoints=d.rightPoints,g.count=d.count}function Ia(g,m){var d=g.intervals([]);d.push(m),Ve(g,d)}function qo(g,m){var d=g.intervals([]),t=d.indexOf(m);return t<0?hi:(d.splice(t,1),Ve(g,d),In)}Pe.intervals=function(g){return g.push.apply(g,this.leftPoints),this.left&&this.left.intervals(g),this.right&&this.right.intervals(g),g},Pe.insert=function(g){var m=this.count-this.leftPoints.length;if(this.count+=1,g[1]<this.mid)this.left?4*(this.left.count+1)>3*(m+1)?Ia(this,g):this.left.insert(g):this.left=Dr([g]);else if(g[0]>this.mid)this.right?4*(this.right.count+1)>3*(m+1)?Ia(this,g):this.right.insert(g):this.right=Dr([g]);else{var d=Wr.ge(this.leftPoints,g,vn),t=Wr.ge(this.rightPoints,g,fo);this.leftPoints.splice(d,0,g),this.rightPoints.splice(t,0,g)}},Pe.remove=function(g){var m=this.count-this.leftPoints;if(g[1]<this.mid){if(!this.left)return hi;var d=this.right?this.right.count:0;if(4*d>3*(m-1))return qo(this,g);var t=this.left.remove(g);return t===Tr?(this.left=null,this.count-=1,In):(t===In&&(this.count-=1),t)}else if(g[0]>this.mid){if(!this.right)return hi;var i=this.left?this.left.count:0;if(4*i>3*(m-1))return qo(this,g);var t=this.right.remove(g);return t===Tr?(this.right=null,this.count-=1,In):(t===In&&(this.count-=1),t)}else{if(this.count===1)return this.leftPoints[0]===g?Tr:hi;if(this.leftPoints.length===1&&this.leftPoints[0]===g){if(this.left&&this.right){for(var s=this,l=this.left;l.right;)s=l,l=l.right;if(s===this)l.right=this.right;else{var c=this.left,t=this.right;s.count-=l.count,s.right=l.left,l.left=c,l.right=t}Xr(this,l),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?Xr(this,this.left):Xr(this,this.right);return In}for(var c=Wr.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ua=function(){function g(m){Ar(this,g),this.events={},this.events=m.handlers}return ti(g,[{key:"on",value:function(d,t){var i=this,s=d instanceof Array?d:d.split(" ");return s.forEach(function(l){if(!i.events[l])throw new Error("The event ".concat(l," does not exist"));i.events[l].push(t)}),this}},{key:"trigger",value:function(d,t){if(!(d in this.events))throw new Error("The event ".concat(String(d)," cannot be triggered"));return this.events[d].reduce(function(i,s){return s(t)!==!1&&i},!0)}},{key:"bind",value:function(d){if(this.events[d])throw new Error("The event ".concat(d," is already bound"));this.events[d]=[]}},{key:"exist",value:function(d){return Array.isArray(this.events[d])}},{key:"off",value:function(d,t){if(this.events[d]){var i=this.events[d];if(!t)this.events[d]=[];else{var s=i.indexOf(t);s!==-1&&i.splice(s,1)}}}},{key:"offAll",value:function(){this.events=Object.fromEntries(Object.keys(this.events).map(function(d){return[d,[]]}))}}]),g}(),Xa=ti(function g(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ar(this,g),this.handlers={},this.handlers=qt({beforeSetTime:[],afterSetTime:[],setTimeByTick:[],beforeSetPlayRate:[],afterSetPlayRate:[],setActiveActionIds:[],play:[],paused:[],ended:[]},m)}),ra="playing",pe="paused",na=function(g){or(d,g);var m=ei(d);function d(){var t;return Ar(this,d),t=m.call(this,new Xa),t._timerId=void 0,t._playRate=1,t._currentTime=0,t._playState="paused",t._prev=void 0,t._effectMap={},t._actionMap={},t._actionSortIds=[],t._next=0,t._activeActionIds=[],t}return ti(d,[{key:"isPlaying",get:function(){return this._playState==="playing"}},{key:"isPaused",get:function(){return this._playState==="paused"}},{key:"effects",set:function(i){this._effectMap=i}},{key:"data",set:function(i){this.isPlaying&&this.pause(),this._dealData(i),this._dealClear(),this._dealEnter(this._currentTime)}},{key:"setPlayRate",value:function(i){if(i<=0){console.error("Error: rate cannot be less than 0!");return}var s=this.trigger("beforeSetPlayRate",{rate:i,engine:this});return s?(this._playRate=i,this.trigger("afterSetPlayRate",{rate:i,engine:this}),!0):!1}},{key:"getPlayRate",value:function(){return this._playRate}},{key:"reRender",value:function(){this.isPlaying||this._tickAction(this._currentTime)}},{key:"setTime",value:function(i,s){var l=s||this.trigger("beforeSetTime",{time:i,engine:this});return l?(this._currentTime=i,this._next=0,this._dealLeave(i),this._dealEnter(i),s?this.trigger("setTimeByTick",{time:i,engine:this}):this.trigger("afterSetTime",{time:i,engine:this}),!0):!1}},{key:"getTime",value:function(){return this._currentTime}},{key:"play",value:function(i){var s=this,l=i.toTime,c=i.autoEnd,p=this.getTime();return this.isPlaying||l&&l<=p?!1:(this._playState=ra,this._startOrStop("start"),this.trigger("play",{engine:this}),this._timerId=requestAnimationFrame(function(S){s._prev=S,s._tick({now:S,autoEnd:c,to:l})}),!0)}},{key:"pause",value:function(){this.isPlaying&&(this._playState=pe,this._startOrStop("stop"),this.trigger("paused",{engine:this})),cancelAnimationFrame(this._timerId)}},{key:"_end",value:function(){this.pause(),this.trigger("ended",{engine:this})}},{key:"_startOrStop",value:function(i){for(var s=0;s<this._activeActionIds.length;s++){var l=this._activeActionIds[s],c=this._actionMap[l],p=this._effectMap[c==null?void 0:c.effectId];if(i==="start"){var S;(p==null||(S=p.source)===null||S===void 0?void 0:S.start)&&p.source.start({action:c,effect:p,engine:this,isPlaying:this.isPlaying,time:this.getTime()})}else if(i==="stop"){var y;(p==null||(y=p.source)===null||y===void 0?void 0:y.stop)&&p.source.stop({action:c,effect:p,engine:this,isPlaying:this.isPlaying,time:this.getTime()})}}}},{key:"_tick",value:function(i){var s=this;if(!this.isPaused){var l=i.now,c=i.autoEnd,p=i.to,S=this.getTime()+Math.min(1e3,l-this._prev)/1e3*this._playRate;if(this._prev=l,p&&p<=S&&(S=p),this.setTime(S,!0),this._tickAction(S),!p&&c&&this._next>=this._actionSortIds.length&&this._activeActionIds.length===0){this.
|
||
|
cursor: ew-resize;
|
||
|
position: absolute;
|
||
|
top: 32px;
|
||
|
height: calc(100% - 32px);
|
||
|
box-sizing: border-box;
|
||
|
border-left: 1px solid #5297FF;
|
||
|
border-right: 1px solid #5297FF;
|
||
|
transform: translateX(-25%) scaleX(0.5);
|
||
|
}
|
||
|
.timeline-editor-cursor-top {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 50%;
|
||
|
transform: translate(-50%, 0) scaleX(2);
|
||
|
margin: auto;
|
||
|
}
|
||
|
.timeline-editor-cursor-area {
|
||
|
width: 16px;
|
||
|
height: 100%;
|
||
|
cursor: ew-resize;
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 50%;
|
||
|
transform: translateX(-50%);
|
||
|
}
|
||
|
`;Ct($a);var Mo=function(m){var d=m.disableDrag,t=m.cursorTime,i=m.setCursor,s=m.startLeft,l=m.timelineWidth,c=m.scaleWidth,p=m.scale,S=m.scrollLeft,y=m.scrollSync,x=m.areaRef,E=m.maxScaleCount,O=m.deltaScrollLeft,P=m.onCursorDragStart,A=m.onCursorDrag,B=m.onCursorDragEnd,G=(0,Z.useRef)(),V=(0,Z.useRef)();return(0,Z.useEffect)(function(){typeof V.current=="undefined"&&G.current.updateLeft(Qr(t,{startLeft:s,scaleWidth:c,scale:p})-S)},[t,s,c,p,S]),Z.createElement(qa,{start:s,ref:G,parentRef:x,bounds:{left:0,right:Math.min(l,E*c+s-S)},deltaScrollLeft:O,enableDragging:!d,enableResizing:!1,onDragStart:function(){P&&P(t),V.current=Qr(t,{startLeft:s,scaleWidth:c,scale:p})-S,G.current.updateLeft(V.current)},onDragEnd:function(){var X=bn(V.current+S,{startLeft:s,scale:p,scaleWidth:c});i({time:X}),B&&B(X),V.current=void 0},onDrag:function(X){var rt=X.left,st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,it=y.current.state.scrollLeft;!st||it===0?rt<s-it?V.current=s-it:V.current=rt:V.current<s-it-st&&(V.current=s-it-st),G.current.updateLeft(V.current);var tt=bn(V.current+it,{startLeft:s,scale:p,scaleWidth:c});return i({time:tt}),A&&A(tt),!1}},Z.createElement("div",{className:be("cursor")},Z.createElement("svg",{className:be("cursor-top"),width:"8",height:"12",viewBox:"0 0 8 12",fill:"none"},Z.createElement("path",{d:"M0 1C0 0.447715 0.447715 0 1 0H7C7.55228 0 8 0.447715 8 1V9.38197C8 9.76074 7.786 10.107 7.44721 10.2764L4.44721 11.7764C4.16569 11.9172 3.83431 11.9172 3.55279 11.7764L0.552786 10.2764C0.214002 10.107 0 9.76074 0 9.38197V1Z",fill:"#5297FF"})),Z.createElement("div",{className:be("cursor-area")})))},eo=`.timeline-editor-drag-line-container {
|
||
|
position: absolute;
|
||
|
height: 100%;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
}
|
||
|
.timeline-editor-drag-line {
|
||
|
width: 0;
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
height: 99%;
|
||
|
border-left: 1px dashed rgba(82, 151, 255, 0.6);
|
||
|
}
|
||
|
`;Ct(eo);var Es=function(m){var d=m.isMoving,t=m.movePositions,i=t===void 0?[]:t,s=m.assistPositions,l=s===void 0?[]:s,c=m.scrollLeft;return Z.createElement("div",{className:be("drag-line-container")},d&&i.filter(function(p){return l.includes(p)}).map(function(p,S){return Z.createElement("div",{key:S,className:be("drag-line"),style:{left:p-c}})}))},Ms=`.timeline-editor:hover .timeline-editor-edit-area .ReactVirtualized__Grid::-webkit-scrollbar {
|
||
|
height: 4px;
|
||
|
}
|
||
|
.timeline-editor-edit-area {
|
||
|
flex: 1 1 auto;
|
||
|
margin-top: 10px;
|
||
|
overflow: hidden;
|
||
|
position: relative;
|
||
|
}
|
||
|
.timeline-editor-edit-area .ReactVirtualized__Grid {
|
||
|
outline: none !important;
|
||
|
overflow: overlay !important;
|
||
|
}
|
||
|
.timeline-editor-edit-area .ReactVirtualized__Grid::-webkit-scrollbar {
|
||
|
width: 0;
|
||
|
height: 0;
|
||
|
}
|
||
|
.timeline-editor-edit-area .ReactVirtualized__Grid::-webkit-scrollbar-track {
|
||
|
background-color: transparent !important;
|
||
|
}
|
||
|
.timeline-editor-edit-area .ReactVirtualized__Grid::-webkit-scrollbar-thumb {
|
||
|
background: #313132;
|
||
|
border-radius: 16px;
|
||
|
}
|
||
|
`;Ct(Ms);var Hn=`.timeline-editor-action {
|
||
|
position: absolute;
|
||
|
left: 0;
|
||
|
top: 0;
|
||
|
background-color: #2f3134;
|
||
|
}
|
||
|
.timeline-editor-action .timeline-editor-action-left-stretch,
|
||
|
.timeline-editor-action .timeline-editor-action-right-stretch {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
width: 10px;
|
||
|
border-radius: 4px;
|
||
|
height: 100%;
|
||
|
overflow: hidden;
|
||
|
}
|
||
|
.timeline-editor-action .timeline-editor-action-left-stretch::after,
|
||
|
.timeline-editor-action .timeline-editor-action-right-stretch::after {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
bottom: 0;
|
||
|
margin: auto;
|
||
|
border-radius: 4px;
|
||
|
border-top: 28px solid transparent;
|
||
|
border-bottom: 28px solid transparent;
|
||
|
}
|
||
|
.timeline-editor-action .timeline-editor-action-left-stretch {
|
||
|
left: 0;
|
||
|
}
|
||
|
.timeline-editor-action .timeline-editor-action-left-stretch::after {
|
||
|
left: 0;
|
||
|
content: "";
|
||
|
border-left: 7px solid rgba(255, 255, 255, 0.1);
|
||
|
border-right: 7px solid transparent;
|
||
|
}
|
||
|
.timeline-editor-action .timeline-editor-action-right-stretch {
|
||
|
right: 0;
|
||
|
}
|
||
|
.timeline-editor-action .timeline-editor-action-right-stretch::after {
|
||
|
right: 0;
|
||
|
content: "";
|
||
|
border-right: 7px solid rgba(255, 255, 255, 0.1);
|
||
|
border-left: 7px solid transparent;
|
||
|
}
|
||
|
`;Ct(Hn);var Os=function(m){var d=m.editorData,t=m.row,i=m.action,s=m.effects,l=m.rowHeight,c=m.scale,p=m.scaleWidth,S=m.scaleSplitCount,y=m.startLeft,x=m.gridSnap,E=m.disableDrag,O=m.scaleCount,P=m.maxScaleCount,A=m.setScaleCount,B=m.onActionMoveStart,G=m.onActionMoving,V=m.onActionMoveEnd,$=m.onActionResizeStart,X=m.onActionResizeEnd,rt=m.onActionResizing,st=m.dragLineData,it=m.setEditorData,tt=m.onClickAction,ht=m.onClickActionOnly,lt=m.onDoubleClickAction,gt=m.onContextMenuAction,ct=m.getActionRender,mt=m.handleTime,Gt=m.areaRef,pt=m.deltaScrollLeft,$e=(0,Z.useRef)(),_e=(0,Z.useRef)(!1),Be=i.id,xe=i.maxEnd,Xe=i.minStart,tr=i.end,er=i.start,De=i.selected,ze=i.flexible,fe=ze===void 0?!0:ze,tn=i.movable,_r=tn===void 0?!0:tn,en=i.effectId,Ri=Qr(Xe||0,{startLeft:y,scale:c,scaleWidth:p}),jn=Math.min(P*p+y,Qr(xe||Number.MAX_VALUE,{startLeft:y,scale:c,scaleWidth:p})),Oo=(0,Z.useState)(function(){return to({start:er,end:tr},{startLeft:y,scale:c,scaleWidth:p})}),Zt=pn(Oo,2),yt=Zt[0],Pt=Zt[1];(0,Z.useLayoutEffect)(function(){Pt(to({start:er,end:tr},{startLeft:y,scale:c,scaleWidth:p}))},[tr,er,y,p,c]);var Ht=p/S,Vt=["action"];_r&&Vt.push("action-movable"),De&&Vt.push("action-selected"),fe&&Vt.push("action-flexible"),s[en]&&Vt.push("action-effect-".concat(en));var ie=function($t,ve){var rr=Ya($t+ve,{startLeft:y,scaleCount:O,scaleWidth:p});rr!==O&&A(rr)},dr=function(){B&&B({action:i,row:t})},Qt=function($t){var ve=$t.left,rr=$t.width;if(_e.current=!0,G){var Br=Ji({left:ve,width:rr},{scaleWidth:p,scale:c,startLeft:y}),ke=Br.start,He=Br.end,Hr=G({action:i,row:t,start:ke,end:He});if(Hr===!1)return!1}Pt({left:ve,width:rr}),ie(ve,rr)},xr=function($t){var ve=$t.left,rr=$t.width,Br=Ji({left:ve,width:rr},{scaleWidth:p,scale:c,startLeft:y}),ke=Br.start,He=Br.end,Hr=d.find(function(ro){return ro.id===t.id}),ii=Hr.actions.find(function(ro){return ro.id===Be});ii.start=ke,ii.end=He,it(d),V&&V({action:ii,row:t,start:ke,end:He})},rn=function($t){$&&$({action:i,row:t,dir:$t})},_n=function($t,ve){var rr=ve.left,Br=ve.width;if(_e.current=!0,rt){var ke=Ji({left:rr,width:Br},{scaleWidth:p,scale:c,startLeft:y}),He=ke.start,Hr=ke.end,ii=rt({action:i,row:t,start:He,end:Hr,dir:$t});if(ii===!1)return!1}Pt({left:rr,width:Br}),ie(rr,Br)},Er=function($t,ve){var rr=ve.left,Br=ve.width,ke=Ji({left:rr,width:Br},{scaleWidth:p,scale:c,startLeft:y}),He=ke.start,Hr=ke.end,ii=d.find(function(la){return la.id===t.id}),ro=ii.actions.find(function(la){return la.id===Be});ro.start=He,ro.end=Hr,it(d),X&&X({action:ro,row:t,start:He,end:Hr,dir:$t})},nn=qt(qt({},i),Ji({left:yt.left,width:yt.width},{startLeft:y,scaleWidth:p,scale:c})),Ye=qt(qt({},t),{},{actions:$r(t.actions)});return t.actions.includes(i)&&(Ye.actions[t.actions.indexOf(i)]=nn),Z.createElement(qa,{ref:$e,parentRef:Gt,start:y,left:yt.left,width:yt.width,grid:x&&Ht||wi,adsorptionDistance:x?Math.max((Ht||wi)/2,Gn):Gn,adsorptionPositions:st.assistPositions,bounds:{left:Ri,right:jn},edges:{left:!E&&fe&&".".concat(be("action-left-stretch")),right:!E&&fe&&".".concat(be("action-right-stretch"))},enableDragging:!E&&_r,enableResizing:!E&&fe,onDragStart:dr,onDrag:Qt,onDragEnd:xr,onResizeStart:rn,onResize:_n,onResizeEnd:Er,deltaScrollLeft:pt},Z.createElement("div",{onMouseDown:function(){_e.current=!1},onClick:function($t){var ve;tt&&(ve=mt($t),tt($t,{row:t,action:i,time:ve})),!_e.current&&ht&&(ve||(ve=mt($t)),ht($t,{row:t,action:i,time:ve}))},onDoubleClick:function($t){if(lt){var ve=mt($t);lt($t,{row:t,action:i,time:ve})}},onContextMenu:function($t){if(gt){var ve=mt($t);gt($t,{row:t,action:i,time:ve})}},className:be((Vt||[]).join(" ")),style:{height:l}},ct&&ct(nn,Ye),fe&&Z.createElement("div",{className:be("action-left-stretch")}),fe&&Z.createElement("div",{className:be("action-right-stretch")})))},Ka=`.timeline-editor-edit-row {
|
||
|
background-repeat: no-repeat, repeat;
|
||
|
background-image: linear-gradient(#191b1d, #191b1d), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 0);
|
||
|
display: flex;
|
||
|
flex-direction: row;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
`;Ct(Ka);var Jr=function(m){var d=m.rowData,t=m.style,i=t===void 0?{}:t,s=m.onClickRow,l=m.onDoubleClickRow,c=m.onContextMenuRow,p=m.areaRef,S=m.scrollLeft,y=m.startLeft,x=m.scale,E=m.scaleWidth,O=["edit-row"];(d==null?void 0:d.selected)&&O.push("edit-row-selected");var P=function(B){if(!!p.current){var G=p.current.getBoundingClientRect(),V=B.clientX-G.x,$=V+S,X=bn($,{startLeft:y,scale:x,scaleWidth:E});return X}};return Z.createElement("div",{className:"".concat(be.apply(void 0,O)," ").concat(((d==null?void 0:d.classNames)||[]).join(" ")),style:i,onClick:function(B){if(d&&s){var G=P(B);s(B,{row:d,time:G})}},onDoubleClick:function(B){if(d&&l){var G=P(B);l(B,{row:d,time:G})}},onContextMenu:function(B){if(d&&c){var G=P(B);c(B,{row:d,time:G})}}},((d==null?void 0:d.actions)||[]).map(function(A){return Z.createElement(Os,qt(qt({key:A.id},m),{},{handleTime:P,row:d,action:A}))}))};function Za(){var g=(0,Z.useState)({isMoving:!1,movePositions:[],assistPositions:[]}),m=pn(g,2),d=m[0],t=m[1],i=function(y){var x=y.editorData,E=y.assistActionIds,O=y.action,P=y.row,A=y.scale,B=y.scaleWidth,G=y.startLeft,V=y.cursorLeft,$=y.hideCursor,X=[];E?x.forEach(function(st){st.actions.forEach(function(it){E.includes(it.id)&&X.push(it)})}):x.forEach(function(st){st.id!==P.id?X.push.apply(X,$r(st.actions)):st.actions.forEach(function(it){it.id!==O.id&&X.push(it)})});var rt=Fr(X,{startLeft:G,scale:A,scaleWidth:B});return $||rt.push(V),rt},s=function(y){var x=y.start,E=y.end,O=y.dir,P=y.scale,A=y.scaleWidth,B=y.startLeft,G=to({start:x,end:E},{startLeft:B,scaleWidth:A,scale:P}),V=G.left,$=G.width;return O?O==="right"?[V+$]:[V]:[V,V+$]},l=function(y){var x=y.movePositions,E=y.assistPositions;t({isMoving:!0,movePositions:x||[],assistPositions:E||[]})},c=function(y){var x=y.movePositions,E=y.assistPositions;t(function(O){return qt(qt({},O),{},{movePositions:x||O.movePositions,assistPositions:E||O.assistPositions})})},p=function(){t({isMoving:!1,movePositions:[],assistPositions:[]})};return{initDragLine:l,updateDragLine:c,disposeDragLine:p,dragLineData:d,defaultGetAssistPosition:i,defaultGetMovePosition:s}}var Qa=Z.forwardRef(function(g,m){var d=g.editorData,t=g.rowHeight,i=g.scaleWidth,s=g.scaleCount,l=g.startLeft,c=g.scrollLeft,p=g.scrollTop,S=g.scale,y=g.hideCursor,x=g.cursorTime,E=g.onScroll,O=g.dragLine,P=g.getAssistDragLineActionIds,A=g.onActionMoveEnd,B=g.onActionMoveStart,G=g.onActionMoving,V=g.onActionResizeEnd,$=g.onActionResizeStart,X=g.onActionResizing,rt=Za(),st=rt.dragLineData,it=rt.initDragLine,tt=rt.updateDragLine,ht=rt.disposeDragLine,lt=rt.defaultGetAssistPosition,gt=rt.defaultGetMovePosition,ct=(0,Z.useRef)(),mt=(0,Z.useRef)(),Gt=(0,Z.useRef)(-1);(0,Z.useImperativeHandle)(m,function(){return{get domRef(){return ct}}});var pt=function(xe){if(O){var Xe=P&&P({action:xe.action,row:xe.row,editorData:d}),tr=Qr(x,{scaleWidth:i,scale:S,startLeft:l}),er=lt({editorData:d,assistActionIds:Xe,action:xe.action,row:xe.row,scale:S,scaleWidth:i,startLeft:l,hideCursor:y,cursorLeft:tr});it({assistPositions:er})}},$e=function(xe){if(O){var Xe=gt(qt(qt({},xe),{},{startLeft:l,scaleWidth:i,scale:S}));tt({movePositions:Xe})}},_e=function(xe){var Xe=xe.rowIndex,tr=xe.key,er=xe.style,De=d[Xe];return Z.createElement(Jr,qt(qt({},g),{},{style:qt(qt({},er),{},{backgroundPositionX:"0, ".concat(l,"px"),backgroundSize:"".concat(l,"px, ").concat(i,"px")}),areaRef:ct,key:tr,rowHeight:(De==null?void 0:De.rowHeight)||t,rowData:De,dragLineData:st,onActionMoveStart:function(fe){return pt(fe),B&&B(fe)},onActionResizeStart:function(fe){return pt(fe),$&&$(fe)},onActionMoving:function(fe){return $e(fe),G&&G(fe)},onActionResizing:function(fe){return $e(fe),X&&X(fe)},onActionResizeEnd:function(fe){return ht(),V&&V(fe)},onActionMoveEnd:function(fe){return ht(),A&&A(fe)}}))};return(0,Z.useLayoutEffect)(function(){var Be;(Be=mt.current)===null||Be===void 0||Be.scrollToPosition({scrollTop:p,scrollLeft:c})},[p,c]),(0,Z.useEffect)(function(){mt.current.recomputeGridSize()},[d]),Z.createElement("div",{ref:ct,className:be("edit-area")},Z.createElement(sn,null,function(Be){var xe=Be.width
|
||
|
height: 600px;
|
||
|
width: 600px;
|
||
|
min-height: 32px;
|
||
|
position: relative;
|
||
|
font-size: 12px;
|
||
|
font-family: "PingFang SC";
|
||
|
background-color: #191b1d;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
overflow: hidden;
|
||
|
}
|
||
|
`;Ct(aa);var kr=`.timeline-editor-time-area {
|
||
|
position: relative;
|
||
|
height: 32px;
|
||
|
flex: 0 0 auto;
|
||
|
}
|
||
|
.timeline-editor-time-area .ReactVirtualized__Grid {
|
||
|
outline: none;
|
||
|
}
|
||
|
.timeline-editor-time-area .ReactVirtualized__Grid::-webkit-scrollbar {
|
||
|
display: none;
|
||
|
}
|
||
|
.timeline-editor-time-area-interact {
|
||
|
position: absolute;
|
||
|
cursor: pointer;
|
||
|
left: 0;
|
||
|
top: 0;
|
||
|
}
|
||
|
.timeline-editor-time-unit {
|
||
|
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
||
|
position: relative;
|
||
|
box-sizing: content-box;
|
||
|
height: 4px !important;
|
||
|
bottom: 0 !important;
|
||
|
top: auto !important;
|
||
|
}
|
||
|
.timeline-editor-time-unit-big {
|
||
|
height: 8px !important;
|
||
|
}
|
||
|
.timeline-editor-time-unit-scale {
|
||
|
color: rgba(255, 255, 255, 0.6);
|
||
|
position: absolute;
|
||
|
right: 0;
|
||
|
top: 0;
|
||
|
transform: translate(50%, -100%);
|
||
|
}
|
||
|
`;Ct(kr);var Ci=function(m){var d=m.setCursor,t=m.maxScaleCount,i=m.hideCursor,s=m.scale,l=m.scaleWidth,c=m.scaleCount,p=m.scaleSplitCount,S=m.startLeft,y=m.scrollLeft,x=m.onClickTimeArea,E=m.getScaleRender,O=(0,Z.useRef)(),P=p>0,A=function(V){var $=V.columnIndex,X=V.key,rt=V.style,st=P?$%p==0:!0,it=["time-unit"];st&&it.push("time-unit-big");var tt=(P?$/p:$)*s;return Z.createElement("div",{key:X,style:rt,className:be.apply(void 0,it)},st&&Z.createElement("div",{className:be("time-unit-scale")},E?E(tt):tt))};(0,Z.useEffect)(function(){var G;(G=O.current)===null||G===void 0||G.recomputeGridSize()},[l,S]);var B=function(V){switch(V.index){case 0:return S;default:return P?l/p:l}};return Z.createElement("div",{className:be("time-area")},Z.createElement(sn,null,function(G){var V=G.width,$=G.height;return Z.createElement(Z.Fragment,null,Z.createElement(Xt,{ref:O,columnCount:P?c*p+1:c,columnWidth:B,rowCount:1,rowHeight:$,width:V,height:$,overscanRowCount:0,overscanColumnCount:10,cellRenderer:A,scrollLeft:y}),Z.createElement("div",{style:{width:V,height:$},onClick:function(rt){if(!i){var st=rt.currentTarget.getBoundingClientRect(),it=rt.clientX-st.x,tt=Math.max(it+y,S);if(!(tt>t*l+S-y)){var ht=bn(tt,{startLeft:S,scale:s,scaleWidth:l}),lt=x&&x(ht,rt);lt!==!1&&d({time:ht})}}},className:be("time-area-interact")}))}))},sa=Z.forwardRef(function(g,m){var d=oa(g),t=g.style,i=d.effects,s=d.editorData,l=d.scrollTop,c=d.autoScroll,p=d.hideCursor,S=d.disableDrag,y=d.scale,x=d.scaleWidth,E=d.startLeft,O=d.minScaleCount,P=d.maxScaleCount,A=d.onChange,B=d.engine,G=d.autoReRender,V=G===void 0?!0:G,$=d.onScroll,X=(0,Z.useRef)(B||new na),rt=(0,Z.useRef)(),st=(0,Z.useRef)(),it=(0,Z.useRef)(),tt=(0,Z.useState)(s),ht=pn(tt,2),lt=ht[0],gt=ht[1],ct=(0,Z.useState)(Wn),mt=pn(ct,2),Gt=mt[0],pt=mt[1],$e=(0,Z.useState)(yn),_e=pn($e,2),Be=_e[0],xe=_e[1],Xe=(0,Z.useState)(!1),tr=pn(Xe,2),er=tr[0],De=tr[1],ze=(0,Z.useState)(Number.MAX_SAFE_INTEGER),fe=pn(ze,2),tn=fe[0],_r=fe[1];(0,Z.useLayoutEffect)(function(){en(To(s,{scale:y})),gt(s)},[s,O,P,y]),(0,Z.useEffect)(function(){X.current.effects=i},[i]),(0,Z.useEffect)(function(){X.current.data=lt},[lt]),(0,Z.useEffect)(function(){V&&X.current.reRender()},[lt]),(0,Z.useEffect)(function(){it.current&&it.current.setState({scrollTop:l})},[l]);var en=function(yt){var Pt=Math.min(P,Math.max(O,yt));pt(Pt)},Ri=function(yt){var Pt=A(yt);Pt!==!1&&(X.current.data=yt,V&&X.current.reRender())},jn=function(yt){var Pt=yt.left,Ht=yt.time,Vt=yt.updateTime,ie=Vt===void 0?!0:Vt;if(!(typeof Pt=="undefined"&&typeof Ht=="undefined")){typeof Ht=="undefined"&&(typeof Pt=="undefined"&&(Pt=Qr(Ht,{startLeft:E,scale:y,scaleWidth:x})),Ht=bn(Pt,{startLeft:E,scale:y,scaleWidth:x}));var dr=!0;return ie&&(dr=X.current.setTime(Ht),V&&X.current.reRender()),dr&&xe(Ht),dr}},Oo=function(yt){var Pt=it.current.state.scrollLeft+yt;Pt>Gt*(x-1)+E-tn||it.current&&it.current.setState({scrollLeft:Math.max(it.current.state.scrollLeft+yt,0)})};return(0,Z.useEffect)(function(){var Zt=function(Vt){var ie=Vt.time;jn({time:ie,updateTime:!1})},yt=function(){return De(!0)},Pt=function(){return De(!1)};X.current.on("setTimeByTick",Zt),X.current.on("play",yt),X.current.on("paused",Pt)},[]),(0,Z.useImperativeHandle)(m,function(){return{get target(){return rt.current},get listener(){return X.current},get isPlaying(){return X.current.isPlaying},get isPaused(){return X.current.isPaused},setPlayRate:X.current.setPlayRate.bind(X.current),getPlayRate:X.current.getPlayRate.bind(X.current),setTime:function(yt){return jn({time:yt})},getTime:X.current.getTime.bind(X.current),reRender:X.current.reRender.bind(X.current),play:function(yt){return X.current.play(qt({},yt))},pause:X.current.pause.bind(X.current),setScrollLeft:function(yt){it.current&&it.current.setState({scrollLeft:Math.max(yt,0)})},setScrollTop:function(yt){it.current&&it.current.setState({scrollTop:Math.max(yt,0)})}}}),(0,Z.useEffect)(function(){if(st.current){var Zt=new ResizeObserver(function(){!st.current||_r(st.current.getBoundingClientRect().width)});return Zt.observe(st.current),function(){Zt&&Zt.disconnect(
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())),nt.default.element(p)&&(p=(0,Tt.getElementRect)(p)),p},Te.tlbrToXywh=function(t){return!t||"x"in t&&"y"in t||((t=(0,It.default)({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t},Te.xywhToTlbr=function(t){return!t||"left"in t&&"top"in t||((t=(0,It.default)({},t)).left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t};var oi={};Object.defineProperty(oi,"__esModule",{value:!0}),oi.default=function(t,i,s){var l=t.options[s],c=l&&l.origin||t.options.origin,p=(0,Te.resolveRectLike)(c,t,i,[t&&i]);return(0,Te.rectToXY)(p)||{x:0,y:0}};var Mi={};function Oi(t){return t.trim().split(/ +/)}Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.default=function t(i,s,l){if(l=l||{},nt.default.string(i)&&i.search(" ")!==-1&&(i=Oi(i)),nt.default.array(i))return i.reduce(function(x,E){return(0,It.default)(x,t(E,s,l))},l);if(nt.default.object(i)&&(s=i,i=""),nt.default.func(s))l[i]=l[i]||[],l[i].push(s);else if(nt.default.array(s))for(var c=0;c<s.length;c++){var p;p=s[c],t(i,p,l)}else if(nt.default.object(s))for(var S in s){var y=Oi(S).map(function(x){return"".concat(i).concat(x)});t(y,s[S],l)}return l};var wn={};Object.defineProperty(wn,"__esModule",{value:!0}),wn.default=void 0,wn.default=function(t,i){return Math.sqrt(t*t+i*i)};var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.default=function(t,i){t.__set||(t.__set={});var s=function(c){typeof t[c]!="function"&&c!=="__set"&&Object.defineProperty(t,c,{get:function(){return c in t.__set?t.__set[c]:t.__set[c]=i[c]},set:function(p){t.__set[c]=p},configurable:!0})};for(var l in i)s(l);return t};var Rt={};function is(t){return t instanceof Ce.default.Event||t instanceof Ce.default.Touch}function Lo(t,i,s){return t=t||"page",(s=s||{}).x=i[t+"X"],s.y=i[t+"Y"],s}function As(t,i){return i=i||{x:0,y:0},ge.default.isOperaMobile&&is(t)?(Lo("screen",t,i),i.x+=window.scrollX,i.y+=window.scrollY):Lo("page",t,i),i}function ks(t,i){return i=i||{},ge.default.isOperaMobile&&is(t)?Lo("screen",t,i):Lo("client",t,i),i}function va(t){var i=[];return nt.default.array(t)?(i[0]=t[0],i[1]=t[1]):t.type==="touchend"?t.touches.length===1?(i[0]=t.touches[0],i[1]=t.changedTouches[0]):t.touches.length===0&&(i[0]=t.changedTouches[0],i[1]=t.changedTouches[1]):(i[0]=t.touches[0],i[1]=t.touches[1]),i}function ha(t){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},s=0;s<t.length;s++){var l=t[s];for(var c in i)i[c]+=l[c]}for(var p in i)i[p]/=t.length;return i}Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.coordsToEvent=function(t){return{coords:t,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(){}}},Rt.copyCoords=function(t,i){t.page=t.page||{},t.page.x=i.page.x,t.page.y=i.page.y,t.client=t.client||{},t.client.x=i.client.x,t.client.y=i.client.y,t.timeStamp=i.timeStamp},Rt.getClientXY=ks,Rt.getEventTargets=function(t){var i=nt.default.func(t.composedPath)?t.composedPath():t.path;return[Tt.getActualElement(i?i[0]:t.target),Tt.getActualElement(t.currentTarget)]},Rt.getPageXY=As,Rt.getPointerId=function(t){return nt.default.number(t.pointerId)?t.pointerId:t.identifier},Rt.getPointerType=function(t){return nt.default.string(t.pointerType)?t.pointerType:nt.default.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof Ce.default.Touch?"touch":"mouse"},Rt.getTouchPair=va,Rt.getXY=Lo,Rt.isNativePointer=is,Rt.newCoords=function(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},Rt.poin
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function lo(t,i){(i==null||i>t.length)&&(i=t.length);for(var s=0,l=Array(i);s<i;s++)l[s]=t[s];return l}function Vn(t,i){for(var s=0;s<i.length;s++){var l=i[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,l.key,l)}}function cn(t,i,s){return i in t?Object.defineProperty(t,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[i]=s,t}Object.defineProperty(fi,"__esModule",{value:!0}),fi.default=void 0,fi.getRectOffset=ye;var Ra=function(){function t(l){(function(c,p){if(!(c instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),cn(this,"states",[]),cn(this,"startOffset",{left:0,right:0,top:0,bottom:0}),cn(this,"startDelta",void 0),cn(this,"result",void 0),cn(this,"endResult",void 0),cn(this,"edges",void 0),cn(this,"interaction",void 0),this.interaction=l,this.result=fn()}var i,s;return i=t,(s=[{key:"start",value:function(l,c){var p=l.phase,S=this.interaction,y=function(E){var O=E.interactable.options[E.prepared.name],P=O.modifiers;return P&&P.length?P:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(A){var B=O[A];return B&&B.enabled&&{options:B,methods:B._methods}}).filter(function(A){return!!A})}(S);this.prepareStates(y),this.edges=(0,It.default)({},S.edges),this.startOffset=ye(S.rect,c),this.startDelta={x:0,y:0};var x=this.fillArg({phase:p,pageCoords:c,preEnd:!1});return this.result=fn(),this.startAll(x),this.result=this.setAll(x)}},{key:"fillArg",value:function(l){var c=this.interaction;return l.interaction=c,l.interactable=c.interactable,l.element=c.element,l.rect=l.rect||c.rect,l.edges=this.edges,l.startOffset=this.startOffset,l}},{key:"startAll",value:function(l){for(var c=0;c<this.states.length;c++){var p=this.states[c];p.methods.start&&(l.state=p,p.methods.start(l))}}},{key:"setAll",value:function(l){var c=l.phase,p=l.preEnd,S=l.skipModifiers,y=l.rect;l.coords=(0,It.default)({},l.pageCoords),l.rect=(0,It.default)({},y);for(var x=S?this.states.slice(S):this.states,E=fn(l.coords,l.rect),O=0;O<x.length;O++){var P,A=x[O],B=A.options,G=(0,It.default)({},l.coords),V=null;(P=A.methods)!=null&&P.set&&this.shouldDo(B,p,c)&&(l.state=A,V=A.methods.set(l),Te.addEdges(this.interaction.edges,l.rect,{x:l.coords.x-G.x,y:l.coords.y-G.y})),E.eventProps.push(V)}E.delta.x=l.coords.x-l.pageCoords.x,E.delta.y=l.coords.y-l.pageCoords.y,E.rectDelta.left=l.rect.left-y.left,E.rectDelta.right=l.rect.right-y.right,E.rectDelta.top=l.rect.top-y.top,E.rectDelta.bottom=l.rect.bottom-y.bottom;var $=this.result.coords,X=this.result.rect;if($&&X){var rt=E.rect.left!==X.left||E.rect.right!==X.right||E.rect.top!==X.top||E.rect.bottom!==X.bottom;E.changed=rt||$.x!==E.coords.x||$.y!==E.coords.y}return E}},{key:"applyToInteraction",value:function(l){var c=this.interaction,p=l.phase,S=c.coords.cur,y=c.coords.start,x=this.result,E=this.startDelta,O=x.delta;p==="start"&&(0,It.default)(this.startDelta,x.delta);for(var P=0;P<[[y,E],[S,O]].length;P++){var A=Ca([[y,E],[S,O]][P],2),B=A[0],G=A[1];B.page.x+=G.x,B.page.y+=G.y,B.client.x+=G.x,B.client.y+=G.y}var V=this.result.rectDelta,$=l.rect||c.rect;$.left+=V.left,$.right+=V.right,$.top+=V.top,$.bottom+=V.bottom,$.width=$.right-$.left,$.height=$.bottom-$.top}},{key:"setAndApply",value:function(l){var c=this.interaction,p=l.phase,S=l.preEnd,y=l.skipModifiers,x=this.setAll(this.fillArg({preEnd:S,phase:p,pageCoords:l.modifiedCoords||c.coords.cur.page}));if(this.result=x,!x.changed&&(!y||y<this.states.length)&&c.interacting())return!1;if(l.modifiedCoords){var E=c.coords.cur.page,O={x:l.modifiedCoords.x-E.x,y:l.modifiedCoords.y-E.y};x.coords.x+=O.x,x.coords.y+=O.y,x.delta.x+=O.x,x.delta.y+=O.y}this.applyToInteraction(l)}},{key:"beforeEnd",value:function(l){var c=l.interaction,p=l.event,S=this.states;if(S&&S.length){for(var y=!1,x=0;x<S.length;x++){var E=S[x];l.state=E;var O=E.options,P=E.methods,A=P.beforeEnd&&P.beforeEnd(l);if(A)return this.endResult=A,!1;y=y||!y&&this.shouldDo(O,!0,l.phase,!0)}y&&c.move({event:
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Qo(t,i){(i==null||i>t.length)&&(i=t.length);for(var s=0,l=Array(i);s<i;s++)l[s]=t[s];return l}Object.defineProperty(go,"__esModule",{value:!0}),go.default=void 0;var Ns=function(){function t(l){(function(c,p){if(!(c instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),mo(this,"currentTarget",void 0),mo(this,"originalEvent",void 0),mo(this,"type",void 0),this.originalEvent=l,(0,Cn.default)(this,l)}var i,s;return i=t,(s=[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}])&&js(i.prototype,s),Object.defineProperty(i,"prototype",{writable:!1}),t}();function Me(t){if(!nt.default.object(t))return{capture:!!t,passive:!1};var i=(0,It.default)({},t);return i.capture=!!t.capture,i.passive=!!t.passive,i}var Vs={id:"events",install:function(t){var i,s=[],l={},c=[],p={add:S,remove:y,addDelegate:function(O,P,A,B,G){var V=Me(G);if(!l[A]){l[A]=[];for(var $=0;$<c.length;$++){var X=c[$];S(X,A,x),S(X,A,E,!0)}}var rt=l[A],st=re.find(rt,function(it){return it.selector===O&&it.context===P});st||(st={selector:O,context:P,listeners:[]},rt.push(st)),st.listeners.push([B,V])},removeDelegate:function(O,P,A,B,G){var V,$=Me(G),X=l[A],rt=!1;if(X)for(V=X.length-1;V>=0;V--){var st=X[V];if(st.selector===O&&st.context===P){for(var it=st.listeners,tt=it.length-1;tt>=0;tt--){var ht=Ue(it[tt],2),lt=ht[0],gt=ht[1],ct=gt.capture,mt=gt.passive;if(lt===B&&ct===$.capture&&mt===$.passive){it.splice(tt,1),it.length||(X.splice(V,1),y(P,A,x),y(P,A,E,!0)),rt=!0;break}}if(rt)break}}},delegateListener:x,delegateUseCapture:E,delegatedEvents:l,documents:c,targets:s,supportsOptions:!1,supportsPassive:!1};function S(O,P,A,B){var G=Me(B),V=re.find(s,function($){return $.eventTarget===O});V||(V={eventTarget:O,events:{}},s.push(V)),V.events[P]||(V.events[P]=[]),O.addEventListener&&!re.contains(V.events[P],A)&&(O.addEventListener(P,A,p.supportsOptions?G:G.capture),V.events[P].push(A))}function y(O,P,A,B){var G=Me(B),V=re.findIndex(s,function(tt){return tt.eventTarget===O}),$=s[V];if($&&$.events)if(P!=="all"){var X=!1,rt=$.events[P];if(rt){if(A==="all"){for(var st=rt.length-1;st>=0;st--)y(O,P,rt[st],G);return}for(var it=0;it<rt.length;it++)if(rt[it]===A){O.removeEventListener(P,A,p.supportsOptions?G:G.capture),rt.splice(it,1),rt.length===0&&(delete $.events[P],X=!0);break}}X&&!Object.keys($.events).length&&s.splice(V,1)}else for(P in $.events)$.events.hasOwnProperty(P)&&y(O,P,"all")}function x(O,P){for(var A=Me(P),B=new Ns(O),G=l[O.type],V=Ue(Rt.getEventTargets(O),1)[0],$=V;nt.default.element($);){for(var X=0;X<G.length;X++){var rt=G[X],st=rt.selector,it=rt.context;if(Tt.matchesSelector($,st)&&Tt.nodeContains(it,V)&&Tt.nodeContains(it,$)){var tt=rt.listeners;B.currentTarget=$;for(var ht=0;ht<tt.length;ht++){var lt=Ue(tt[ht],2),gt=lt[0],ct=lt[1],mt=ct.capture,Gt=ct.passive;mt===A.capture&&Gt===A.passive&>(B)}}}$=Tt.parentNode($)}}function E(O){return x(O,!0)}return(i=t.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),t.events=p,p}};go.default=Vs;var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.default=void 0;var Vi={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var i=0;i<Vi.methodOrder.length;i++){var s;s=Vi.methodOrder[i];var l=Vi[s](t);if(l)return l}return null},simulationResume:function(t){var i=t.pointerType,s=t.eventType,l=t.eventTarget,c=t.scope;if(!/down|start/i.test(s))return null;for(var p=0;p<c.interactions.list.length;p++){var S=c.interactions.list[p],y=l;if(S.simulation&&S.simulation.allowResume&&S.pointerType===i)for(;y;){if(y===S.element)return S;y=Tt.parentNode(y)}}return null},mouseOrPen:function(t){var i,s=t.pointerId,l=t.pointerType,c=t.eventType,p=t.scope;if(l!=="mo
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function So(t,i){(i==null||i>t.length)&&(i=t.length);for(var s=0,l=Array(i);s<i;s++)l[s]=t[s];return l}function bo(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function Da(t,i){for(var s=0;s<i.length;s++){var l=i[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,l.key,l)}}function Jo(t,i){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s},Jo(t,i)}function Us(t,i){if(i&&(yo(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}(t)}function ta(t){return ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},ta(t)}Object.defineProperty($n,"__esModule",{value:!0}),$n.default=void 0;var za=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Aa(t,i){return function(s){var l=i.interactions.list,c=Rt.getPointerType(s),p=ys(Rt.getEventTargets(s),2),S=p[0],y=p[1],x=[];if(/^touch/.test(s.type)){i.prevTouchTime=i.now();for(var E=0;E<s.changedTouches.length;E++){var O=s.changedTouches[E],P={pointer:O,pointerId:Rt.getPointerId(O),pointerType:c,eventType:s.type,eventTarget:S,curEventTarget:y,scope:i},A=ka(P);x.push([P.pointer,P.eventTarget,P.curEventTarget,A])}}else{var B=!1;if(!ge.default.supportsPointerEvent&&/mouse/.test(s.type)){for(var G=0;G<l.length&&!B;G++)B=l[G].pointerType!=="mouse"&&l[G].pointerIsDown;B=B||i.now()-i.prevTouchTime<500||s.timeStamp===0}if(!B){var V={pointer:s,pointerId:Rt.getPointerId(s),pointerType:c,eventType:s.type,curEventTarget:y,eventTarget:S,scope:i},$=ka(V);x.push([V.pointer,V.eventTarget,V.curEventTarget,$])}}for(var X=0;X<x.length;X++){var rt=ys(x[X],4),st=rt[0],it=rt[1],tt=rt[2];rt[3][t](st,s,it,tt)}}}function ka(t){var i=t.pointerType,s=t.scope,l={interaction:Pn.default.search(t),searchDetails:t};return s.fire("interactions:find",l),l.interaction||s.interactions.new({pointerType:i})}function _o(t,i){var s=t.doc,l=t.scope,c=t.options,p=l.interactions.docEvents,S=l.events,y=S[i];for(var x in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),S.delegatedEvents)y(s,x,S.delegateListener),y(s,x,S.delegateUseCapture,!0);for(var E=c&&c.events,O=0;O<p.length;O++){var P=p[O];y(s,P.type,P.listener,E)}}var Ss={id:"core/interactions",install:function(t){for(var i={},s=0;s<za.length;s++){var l=za[s];i[l]=Aa(l,t)}var c,p=ge.default.pEventTypes;function S(){for(var y=0;y<t.interactions.list.length;y++){var x=t.interactions.list[y];if(x.pointerIsDown&&x.pointerType==="touch"&&!x._interacting)for(var E=function(){var P=x.pointers[O];t.documents.some(function(A){var B=A.doc;return(0,Tt.nodeContains)(B,P.downTarget)})||x.removePointer(P.pointer,P.event)},O=0;O<x.pointers.length;O++)E()}}(c=Ce.default.PointerEvent?[{type:p.down,listener:S},{type:p.down,listener:i.pointerDown},{type:p.move,listener:i.pointerMove},{type:p.up,listener:i.pointerUp},{type:p.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:S},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(y){for(var x=0;x<t.interactions.list.length;x++)t.interactions.list[x].documentBlur(y)}}),t.prevTouchTime=0,t.Interaction=function(y){(function(G,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");G.prototype=Object.create(V&&V.prototype,{constructor:{value:G,writable:!0,configurable:!0}}),Object.defineProperty(G,"prototype",{writable:!1}),V&&Jo(G,V)})(B,y);var x,E,O,P,A=(O=B,P=function(){if(typeof
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function wo(t,i){(i==null||i>t.length)&&(i=t.length);for(var s=0,l=Array(i);s<i;s++)l[s]=t[s];return l}Object.defineProperty(hn,"__esModule",{value:!0}),hn.default=void 0,hn.default=function(t){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=xo(l,2),p=c[0],S=c[1];return p in t||S in t}),s=function(l,c){for(var p=t.range,S=t.limits,y=S===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:S,x=t.offset,E=x===void 0?{x:0,y:0}:x,O={range:p,grid:t,x:null,y:null},P=0;P<i.length;P++){var A=xo(i[P],2),B=A[0],G=A[1],V=Math.round((l-E.x)/t[B]),$=Math.round((c-E.y)/t[G]);O[B]=Math.max(y.left,Math.min(y.right,V*t[B]+E.x)),O[G]=Math.max(y.top,Math.min(y.bottom,$*t[G]+E.y))}return O};return s.grid=t,s.coordFields=i,s};var Qn={};Object.defineProperty(Qn,"__esModule",{value:!0}),Object.defineProperty(Qn,"edgeTarget",{enumerable:!0,get:function(){return Ln.default}}),Object.defineProperty(Qn,"elements",{enumerable:!0,get:function(){return Yi.default}}),Object.defineProperty(Qn,"grid",{enumerable:!0,get:function(){return hn.default}});var Si={};Object.defineProperty(Si,"__esModule",{value:!0}),Si.default=void 0;var bs={id:"snappers",install:function(t){var i=t.interactStatic;i.snappers=(0,It.default)(i.snappers||{},Qn),i.createSnapGrid=i.snappers.grid}},_s=bs;Si.default=_s;var Jn={};function Ba(t,i){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);i&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),s.push.apply(s,l)}return s}function Ha(t){for(var i=1;i<arguments.length;i++){var s=arguments[i]!=null?arguments[i]:{};i%2?Ba(Object(s),!0).forEach(function(l){xs(t,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Ba(Object(s)).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(s,l))})}return t}function xs(t,i,s){return i in t?Object.defineProperty(t,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[i]=s,t}Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.default=Jn.aspectRatio=void 0;var Co={start:function(t){var i=t.state,s=t.rect,l=t.edges,c=t.pageCoords,p=i.options.ratio,S=i.options,y=S.equalDelta,x=S.modifiers;p==="preserve"&&(p=s.width/s.height),i.startCoords=(0,It.default)({},c),i.startRect=(0,It.default)({},s),i.ratio=p,i.equalDelta=y;var E=i.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(i.xIsPrimaryAxis=!(!l.left&&!l.right),i.equalDelta){var O=(E.left?1:-1)*(E.top?1:-1);i.edgeSign={x:O,y:O}}else i.edgeSign={x:E.left?-1:1,y:E.top?-1:1};if((0,It.default)(t.edges,E),x&&x.length){var P=new fi.default(t.interaction);P.copyFrom(t.interaction.modification),P.prepareStates(x),i.subModification=P,P.startAll(Ha({},t))}},set:function(t){var i=t.state,s=t.rect,l=t.coords,c=(0,It.default)({},l),p=i.equalDelta?ws:ja;if(p(i,i.xIsPrimaryAxis,l,s),!i.subModification)return null;var S=(0,It.default)({},s);(0,Te.addEdges)(i.linkedEdges,S,{x:l.x-c.x,y:l.y-c.y});var y=i.subModification.setAll(Ha(Ha({},t),{},{rect:S,edges:i.linkedEdges,pageCoords:l,prevCoords:l,prevRect:S})),x=y.delta;return y.changed&&(p(i,Math.abs(x.x)>Math.abs(x.y),y.coords,y.rect),(0,It.default)(l,y.coords)),y.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function ws(t,i,s){var l=t.startCoords,c=t.edgeSign;i?s.y=l.y+(s.x-l.x)*c.y:s.x=l.x+(s.y-l.y)*c.x}function ja(t,i,s,l){var c=t.startRect,p=t.startCoords,S=t.ratio,y=t.edgeSign;if(i){var x=l.width/S;s.y=p.y+(x-c.height)*y.y}else{var E=l.height*S;s.x=p.x+(E-c.width)*y.x}}Jn.aspectRatio=Co;var qt=(0,We.makeModifier)(Co,"aspectRatio");Jn.default=qt;var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.default=void 0;var Je=function(){};Je._defaults={};var ti=Je;Ar.default=ti;var qi={};Object.defineProperty(qi,"__esModule",{value:!0}),Object.defineProperty(qi,"default",{enumerable:!0,get:function(){return Ar
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),G=B[0],V=B[1];if(G in P||V in P){P.x=P[G],P.y=P[V];break}}c.options.targets.push(P)}}var $=pe.snap.set(t);return c.options=S,$},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}};yn.snapSize=$i;var Ki=(0,We.makeModifier)($i,"snapSize");yn.default=Ki;var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.snapEdges=Sn.default=void 0;var wi={start:function(t){var i=t.edges;return i?(t.state.targetFields=t.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],yn.snapSize.start(t)):null},set:yn.snapSize.set,defaults:(0,It.default)((0,Nn.default)(yn.snapSize.defaults),{targets:null,range:null,offset:{x:0,y:0}})};Sn.snapEdges=wi;var Gn=(0,We.makeModifier)(wi,"snapEdges");Sn.default=Gn;var Zi={};Object.defineProperty(Zi,"__esModule",{value:!0}),Object.defineProperty(Zi,"default",{enumerable:!0,get:function(){return Ar.default}});var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Object.defineProperty(Wn,"default",{enumerable:!0,get:function(){return Ar.default}});var Zr={};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.default=void 0;var qe={aspectRatio:Jn.default,restrictEdges:qr.default,restrict:or.default,restrictRect:gn.default,restrictSize:mn.default,snapEdges:Sn.default,snap:pe.default,snapSize:yn.default,spring:Zi.default,avoid:qi.default,transform:Wn.default,rubberband:ra.default};Zr.default=qe;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.default=void 0;var ni={id:"modifiers",install:function(t){var i=t.interactStatic;for(var s in t.usePlugin(We.default),t.usePlugin(Si.default),i.modifiers=Zr.default,Zr.default){var l=Zr.default[s],c=l._defaults,p=l._methods;c._methods=p,t.defaults.perAction[s]=c}}},Qi=ni;Fn.default=Qi;var br={};function oa(t){return oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},oa(t)}function Qr(t,i){for(var s=0;s<i.length;s++){var l=i[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,l.key,l)}}function bn(t,i){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,l){return s.__proto__=l,s},bn(t,i)}function Ji(t,i){if(i&&(oa(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return to(t)}function to(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},To(t)}Object.defineProperty(br,"__esModule",{value:!0}),br.default=br.PointerEvent=void 0;var Ya=function(t){(function(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),Object.defineProperty(y,"prototype",{writable:!1}),x&&bn(y,x)})(S,t);var i,s,l,c,p=(l=S,c=function(){if(typeof Reflect=="undefined"||!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(y){return!1}}(),function(){var y,x=To(l);if(c){var E=To(this).constructor;y=Reflect.construct(x,arguments,E)}else y=x.apply(this,arguments);return Ji(this,y)});function S(y,x,E,O,P,A){var B;if(function($,X){if(!($ instanceof X))throw new TypeError("Cannot call a class as a function")}(this,S),B=p.call(this,P),Rt.pointerExtend(to(B),E),E!==x&&Rt.pointerExtend(to(B),x),B.timeStamp=A,B.originalEvent=E,B.type=y,B.pointerId=Rt.getPointerId(x),B.pointerType=Rt.getPointerType(x),B.target=O,B.currentTarget=null,y==="tap"){var G=P.getPointerIndex(x);B.dt=B.timeStamp-P.pointers[G].downTime;var V=B.timeStamp-P.tapTime;B.double=!!P.prevTap&&P.prevTap.type!=="doubletap"&&P.pre
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */function pa(){for(var e=0,r=0,n=arguments.length;r<n;r++)e+=arguments[r].length;for(var o=Array(e),a=0,r=0;r<n;r++)for(var u=arguments[r],f=0,v=u.length;f<v;f++,a++)o[a]=u[f];return o}function re(e,r,n,o){return(e*o+r*n)/(n+o)}function Pi(e){return typeof e===Oi}function pr(e){return e&&typeof e===ns}function le(e){return Array.isArray(e)}function Le(e){return typeof e===oi}function Go(e){return typeof e===Mi}function no(e){return typeof e===It}function os(e,r){var n=e===""||e==" ",o=r===""||r==" ";return o&&n||e===r}function an(e,r,n,o,a){var u=ai(e,r,n);return u?n:Di(e,r,n+1,o,a)}function ai(e,r,n){if(!e.ignore)return null;var o=r.slice(Math.max(n-3,0),n+3).join("");return new RegExp(e.ignore).exec(o)}function Di(e,r,n,o,a){for(var u=function(b){var C=r[b].trim();if(C===e.close&&!ai(e,r,b))return{value:b};var _=b,w=wr(a,function(R){var T=R.open;return T===C});if(w&&(_=an(w,r,b,o,a)),_===-1)return f=b,"break";b=_,f=b},f,v=n;v<o;++v){var h=u(v);if(v=f,typeof h=="object")return h.value;if(h==="break")break}return-1}function Wo(e,r){var n=Le(r)?{separator:r}:r,o=n.separator,a=o===void 0?",":o,u=n.isSeparateFirst,f=n.isSeparateOnlyOpenClose,v=n.isSeparateOpenClose,h=v===void 0?f:v,b=n.openCloseCharacters,C=b===void 0?ha:b,_=C.map(function(F){var U=F.open,j=F.close;return U===j?U:U+"|"+j}).join("|"),w="(\\s*"+a+"\\s*|"+_+"|\\s+)",R=new RegExp(w,"g"),T=e.split(R).filter(function(F){return F&&F!=="undefined"}),M=T.length,I=[],D=[];function z(){return D.length?(I.push(D.join("")),D=[],!0):!1}for(var W=function(F){var U=T[F].trim(),j=F,q=wr(C,function(J){var ot=J.open;return ot===U}),Y=wr(C,function(J){var ot=J.close;return ot===U});if(q){if(j=an(q,T,F,M,C),j!==-1&&h)return z()&&u||(I.push(T.slice(F,j+1).join("")),F=j,u)?(k=F,"break"):(k=F,"continue")}else if(Y&&!ai(Y,T,F)){var K=pa(C);return K.splice(C.indexOf(Y),1),{value:Wo(e,{separator:a,isSeparateFirst:u,isSeparateOnlyOpenClose:f,isSeparateOpenClose:h,openCloseCharacters:K})}}else if(os(U,a)&&!f)return z(),u?(k=F,"break"):(k=F,"continue");j===-1&&(j=M-1),D.push(T.slice(F,j+1).join("")),F=j,k=F},k,H=0;H<M;++H){var L=W(H);if(H=k,typeof L=="object")return L.value;if(L==="break")break}return D.length&&I.push(D.join("")),I}function gr(e){return Wo(e,"")}function Gr(e){return Wo(e,",")}function Ne(e){var r=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(e);return!r||r.length<4?{}:{prefix:r[1],value:r[2],suffix:r[3]}}function si(e){var r=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);if(!r)return{prefix:"",unit:"",value:NaN};var n=r[1],o=r[2],a=r[3];return{prefix:n,unit:a,value:parseFloat(o)}}function ga(e){return e.replace(/[\s-_]+([^\s-_])/g,function(r,n){return n.toUpperCase()})}function io(e,r){return r===void 0&&(r="-"),e.replace(/([a-z])([A-Z])/g,function(n,o,a){return""+o+r+a.toLowerCase()})}function as(e){return[].slice.call(e)}function zi(){return Date.now?Date.now():new Date().getTime()}function mr(e,r,n){n===void 0&&(n=-1);for(var o=e.length,a=0;a<o;++a)if(r(e[a],a,e))return a;return n}function li(e,r,n){n===void 0&&(n=-1);for(var o=e.length,a=o-1;a>=0;--a)if(r(e[a],a,e))return a;return n}function Fo(e,r,n){var o=li(e,r);return o>-1?e[o]:n}function wr(e,r,n){var o=mr(e,r);return o>-1?e[o]:n}var Bo=function(){var e=zi(),r=wn&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame);return r?r.bind(window):function(n){var o=zi(),a=setTimeout(function(){n(o-e)},1e3/60);return a}}(),Vr=function(){var e=wn&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return e?e.bind(window):function(r){clearTimeout(r)}}();function Rn(e){return Object.keys(e)}function Ho(e){var r=Rn(e);return r.map(function(n){return e[n]})}function Tn(e){var r=Rn(e);return r.map(function(n){return[n,e[n]]})}function ma(e,r){r===void 0&&(r=[]),e.sort(function(n,o){var a=r.indexOf(n),u=r.indexOf(o);return u===-1&&a===-1?0:a===-1?1:u===-1?-1:a-u})}function Xt(e,r){var n=si(e),
|
||
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||
|
this file except in compliance with the License. You may obtain a copy of the
|
||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||
|
|
||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||
|
|
||
|
See the Apache Version 2.0 License for specific language governing permissions
|
||
|
and limitations under the License.
|
||
|
***************************************************************************** */var vi=function(e,r){return vi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])},vi(e,r)};function Sr(e,r){vi(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}var Ma=typeof Map=="function"?void 0:function(){var e=0;return function(r){return r.__DIFF_KEY__||(r.__DIFF_KEY__=++e)}}(),Ee=function(e){Sr(r,e);function r(n){return n===void 0&&(n=[]),e.call(this,n,Ma)||this}return r}(uo);function ps(e,r){return Un(e,r,Ma)}var Uo=Ee;/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var Xo=function(){return Xo=Object.assign||function(r){for(var n,o=1,a=arguments.length;o<a;o++){n=arguments[o];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(r[u]=n[u])}return r},Xo.apply(this,arguments)};function On(){for(var e=0,r=0,n=arguments.length;r<n;r++)e+=arguments[r].length;for(var o=Array(e),a=0,r=0;r<n;r++)for(var u=arguments[r],f=0,v=u.length;f<v;f++,a++)o[a]=u[f];return o}var Oa=function(){function e(){this._events={}}var r=e.prototype;return r.on=function(n,o){if(pr(n))for(var a in n)this.on(a,n[a]);else this._addEvent(n,o,{});return this},r.off=function(n,o){if(!n)this._events={};else if(pr(n))for(var a in n)this.off(a);else if(!o)this._events[n]=[];else{var u=this._events[n];if(u){var f=mr(u,function(v){return v.listener===o});f>-1&&u.splice(f,1)}}return this},r.once=function(n,o){var a=this;return o&&this._addEvent(n,o,{once:!0}),new Promise(function(u){a._addEvent(n,u,{once:!0})})},r.emit=function(n,o){var a=this;o===void 0&&(o={});var u=this._events[n];if(!n||!u)return!0;var f=!1;return o.eventType=n,o.stop=function(){f=!0},o.currentTarget=this,On(u).forEach(function(v){v.listener(o),v.once&&a.off(n,v.listener)}),!f},r.trigger=function(n,o){return o===void 0&&(o={}),this.emit(n,o)},r._addEvent=function(n,o,a){var u=this._events;u[n]=u[n]||[];var f=u[n];f.push(Xo({listener:o},a))},e}(),co=Oa;/*! *****************************************************************************
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var Hi=function(e,r){return Hi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])},Hi(e,r)};function gs(e,r){Hi(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}var Wr=function(){return Wr=Object.assign||function(r){for(var n,o=1,a=arguments.length;o<a;o++){n=arguments[o];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(r[u]=n[u])}return r},Wr.apply(this,arguments)};function hi(e){var r=e.container;return r===document.body?[r.scrollLeft||document.documentElement.scrollLeft,r.scrollTop||document.documentElement.scrollTop]:[r.scrollLeft,r.scrollTop]}function In(e,r){return e.addEventListener("scroll",r),function(){e.removeEventListener("scroll",r)}}function Tr(e){if(e){if(Le(e))return document.querySelector(e)}else return null;if(no(e))return e();if(e instanceof Element)return e;if("current"in e)return e.current;if("value"in e)return e.value}var Yo=function(e){gs(r,e);function r(){var o=e!==null&&e.apply(this,arguments)||this;return o._startRect=null,o._startPos=[],o._prevTime=0,o._timer=0,o._prevScrollPos=[0,0],o._isWait=!1,o._flag=!1,o._currentOptions=null,o._lock=!1,o._unregister=null,o._onScroll=function(){var a=o._currentOptions;o._lock||!a||o.emit("scrollDrag",{next:function(u){o.checkScroll({container:a.container,inputEvent:u})}})},o}var n=r.prototype;return n.dragStart=function(o,a){var u=Tr(a.container);if(!u){this._flag=!1;return}var f=0,v=0,h=0,b=0;if(u===document.body)h=window.innerWidth,b=window.innerHeight;else{var C=u.getBoundingClientRect();f=C.top,v=C.left,h=C.width,b=C.height}this._flag=!0,this._startPos=[o.clientX,o.clientY],this._startRect={top:f,left:v,width:h,height:b},this._prevScrollPos=this._getScrollPosition([0,0],a),this._currentOptions=a,this._registerScrollEvent(a)},n.drag=function(o,a){if(clearTimeout(this._timer),!!this._flag){var u=o.clientX,f=o.clientY,v=a.threshold,h=v===void 0?0:v,b=this,C=b._startRect,_=b._startPos;this._currentOptions=a;var w=[0,0];return C.top>f-h?(_[1]>C.top||f<_[1])&&(w[1]=-1):C.top+C.height<f+h&&(_[1]<C.top+C.height||f>_[1])&&(w[1]=1),C.left>u-h?(_[0]>C.left||u<_[0])&&(w[0]=-1):C.left+C.width<u+h&&(_[0]<C.left+C.width||u>_[0])&&(w[0]=1),!w[0]&&!w[1]?!1:this._continueDrag(Wr(Wr({},a),{direction:w,inputEvent:o,isDrag:!0}))}},n.checkScroll=function(o){var a=this;if(this._isWait)return!1;var u=o.prevScrollPos,f=u===void 0?this._prevScrollPos:u,v=o.direction,h=o.throttleTime,b=h===void 0?0:h,C=o.inputEvent,_=o.isDrag,w=this._getScrollPosition(v||[0,0],o),R=w[0]-f[0],T=w[1]-f[1],M=v||[R?Math.abs(R)/R:0,T?Math.abs(T)/T:0];return this._prevScrollPos=w,this._lock=!1,!R&&!T?!1:(this.emit("move",{offsetX:M[0]?R:0,offsetY:M[1]?T:0,inputEvent:C}),b&&_&&(clearTimeout(this._timer),this._timer=window.setTimeout(function(){a._continueDrag(o)},b)),!0)},n.dragEnd=function(){this._flag=!1,this._lock=!1,clearTimeout(this._timer),this._unregisterScrollEvent()},n._getScrollPosition=function(o,a){var u=a.container,f=a.getScrollPosition,v=f===void 0?hi:f;return v({container:Tr(u),direction:o})},n._continueDrag=function(o){var a=this,u,f=o.container,v=o.direction,h=o.throttleTime,b=o.useScroll,C=o.isDrag,_=o.inputEvent;if(!(!this._flag||C&&this._isWait)){var w=zi(),R=Math.max(h+this._prevTime-w,0);if(R>0)return clearTimeout(this._timer),this._timer=window.setTimeout(function(){a._continueDrag(o)},R),!1;this._prevTime=w;var T=this._getScrollPosition(v,o);this._prevScrollPos=T,C&&(this._isWait=!0),b||(this._lock=!0);var M={container:Tr(f),direction:v,inputEvent:_};return(u=o.requestScroll)===null||u===void 0||u.call(o,M),this.emit("scroll",M),this._isWait=!1,b||this.checkScroll(Wr(Wr({},o),{prevScrollPos:T,direction:v,inputEvent:_}))}},n._registerScrollEvent=function(o){this._unregisterScrollEvent();var a=o.checkScrollEvent;if(!!a){var u=a===!0?In:a,f=Tr(o.container);a===!0&&(f===document.body||f===document.documentElement)?this._unregister=In(window,th
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */function Xr(){for(var e=0,r=0,n=arguments.length;r<n;r++)e+=arguments[r].length;for(var o=Array(e),a=0,r=0;r<n;r++)for(var u=arguments[r],f=0,v=u.length;f<v;f++,a++)o[a]=u[f];return o}function Ve(e){return Lt(e,me)}function Ia(e,r){return e.every(function(n,o){return Ve(n-r[o])===0})}function qo(e,r){return!Ve(e[0]-r[0])&&!Ve(e[1]-r[1])}function $o(e){return e.reduce(function(r,n){return r.push.apply(r,n),r},[])}function Ko(e){return e.length<3?0:Math.abs(ui(e.map(function(r,n){var o=e[n+1]||e[0];return r[0]*o[1]-o[0]*r[1]})))/2}function Xn(e,r){var n=r.width,o=r.height,a=r.left,u=r.top,f=Yn(e),v=f.minX,h=f.minY,b=f.maxX,C=f.maxY,_=n/(b-v),w=o/(C-h);return e.map(function(R){return[a+(R[0]-v)*_,u+(R[1]-h)*w]})}function Yn(e){var r=e.map(function(o){return o[0]}),n=e.map(function(o){return o[1]});return{minX:Math.min.apply(Math,r),minY:Math.min.apply(Math,n),maxX:Math.max.apply(Math,r),maxY:Math.max.apply(Math,n)}}function vn(e,r,n){var o=e[0],a=e[1],u=Yn(r),f=u.minX,v=u.maxX,h=[[f,a],[v,a]],b=Dr(h[0],h[1]),C=zr(r),_=[];if(C.forEach(function(T){var M=Dr(T[0],T[1]),I=T[0];if(Ia(b,M))_.push({pos:e,line:T,type:"line"});else{var D=ji(Yr(b,M),[h,T]);D.forEach(function(z){T.some(function(W){return qo(W,z)})?_.push({pos:z,line:T,type:"point"}):Ve(I[1]-a)!==0&&_.push({pos:z,line:T,type:"intersection"})})}}),!n&&wr(_,function(T){return T[0]===o}))return!0;var w=0,R={};return _.forEach(function(T){var M=T.pos,I=T.type,D=T.line;if(!(M[0]>o))if(I==="intersection")++w;else{if(I==="line")return;if(I==="point"){var z=wr(D,function(H){return H[1]!==a}),W=R[M[0]],k=z[1]>a?1:-1;W?W!==k&&++w:R[M[0]]=k}}}),w%2==1}function fo(e,r){var n=e[0],o=e[1],a=e[2];return(n*r[0]+o*r[1]+a)/(n*n+o*o)}function Dr(e,r){var n=e[0],o=e[1],a=r[0],u=r[1],f=a-n,v=u-o;Math.abs(f)<me&&(f=0),Math.abs(v)<me&&(v=0);var h=0,b=0,C=0;return f?v?(h=-v/f,b=1,C=-h*n-o):(b=1,C=-o):v&&(h=-1,C=n),[h,b,C]}function Yr(e,r){var n=e[0],o=e[1],a=e[2],u=r[0],f=r[1],v=r[2],h=n===0&&u===0,b=o===0&&f===0,C=[];if(h&&b)return[];if(h){var _=-a/o,w=-v/f;return _!==w?[]:[[-Infinity,_],[Infinity,_]]}else if(b){var R=-a/n,T=-v/u;return R!==T?[]:[[R,-Infinity],[R,Infinity]]}else if(n===0){var M=-a/o,I=-(f*M+v)/u;C=[[I,M]]}else if(u===0){var M=-v/f,I=-(o*M+a)/n;C=[[I,M]]}else if(o===0){var I=-a/n,M=-(u*I+v)/f;C=[[I,M]]}else if(f===0){var I=-v/u,M=-(n*I+a)/o;C=[[I,M]]}else{var I=(o*v-f*a)/(f*n-o*u),M=-(n*I+a)/o;C=[[I,M]]}return C.map(function(D){return[D[0],D[1]]})}function qn(e,r,n){var o=Yr(Dr(e[0],e[1]),Dr(r[0],r[1]));return n?ji(o,[e,r]):o}function vo(e,r){var n=Dr(r[0],r[1]);return Ve(fo(n,e))===0}function ji(e,r){var n=r.map(function(_){return[0,1].map(function(w){return[Math.min(_[0][w],_[1][w]),Math.max(_[0][w],_[1][w])]})}),o=[];if(e.length===2){var a=e[0],u=a[0],f=a[1];if(Ve(u-e[1][0])){if(!Ve(f-e[1][1])){var b=Math.max.apply(Math,n.map(function(_){return _[0][0]})),C=Math.min.apply(Math,n.map(function(_){return _[0][1]}));if(Ve(b-C)>0)return[];o=[[b,f],[C,f]]}}else{var v=Math.max.apply(Math,n.map(function(_){return _[1][0]})),h=Math.min.apply(Math,n.map(function(_){return _[1][1]}));if(Ve(v-h)>0)return[];o=[[u,v],[u,h]]}}return o.length||(o=e.filter(function(_){var w=_[0],R=_[1];return n.every(function(T){return 0<=Ve(w-T[0][0])&&0<=Ve(T[0][1]-w)&&0<=Ve(R-T[1][0])&&0<=Ve(T[1][1]-R)})})),o.map(function(_){return[Ve(_[0]),Ve(_[1])]})}function zr(e){return Xr(e.slice(1),[e[0]]).map(function(r,n){return[e[n],r]})}function ho(e,r){var n=e.slice(),o=r.slice();kt(n)===-1&&n.reverse(),kt(o)===-1&&o.reverse();var a=zr(n),u=zr(o),f=a.map(function(C){return Dr(C[0],C[1])}),v=u.map(function(C){return Dr(C[0],C[1])}),h=[];f.forEach(function(C,_){var w=a[_],R=[];v.forEach(function(T,M){var I=Yr(C,T),D=ji(I,[w,u[M]]);R.push.apply(R,D.map(function(z){return{index1:_,index2:M,pos:z,type:"intersection"}}))}),R.sort(function(T,M){return cr(w[0],T.pos)-cr(w[0],M.pos)}),h.push.apply(h,R),vn(w[1],o)&&h.push({index1:_,index2:-1,pos:w[1],type:"inside"})}),u.forEach(function(C,_){if(!!vn(C[1],n)){var w=!1,R=mr(h,function(T){var
|
||
|
Copyright (c) Microsoft Corporation.
|
||
|
|
||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
purpose with or without fee is hereby granted.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
***************************************************************************** */var Qo=function(e,r){return Qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var a in o)o.hasOwnProperty(a)&&(n[a]=o[a])},Qo(e,r)};function Ns(e,r){Qo(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}var Me=function(){return Me=Object.assign||function(r){for(var n,o=1,a=arguments.length;o<a;o++){n=arguments[o];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(r[u]=n[u])}return r},Me.apply(this,arguments)};function Vs(e,r){var n=r[0]-e[0],o=r[1]-e[1],a=Math.atan2(o,n);return a>=0?a:a+Math.PI*2}function Pn(e){return Vs([e[0].clientX,e[0].clientY],[e[1].clientX,e[1].clientY])/Math.PI*180}function Vi(e){return e.touches&&e.touches.length>=2}function Fe(e){return e?e.touches?ys(e.touches):[So(e)]:[]}function Pa(e){return e&&(e.type.indexOf("mouse")>-1||"button"in e)}function $n(e,r,n){var o=n.length,a=bo(e,o),u=a.clientX,f=a.clientY,v=a.originalClientX,h=a.originalClientY,b=bo(r,o),C=b.clientX,_=b.clientY,w=bo(n,o),R=w.clientX,T=w.clientY,M=u-C,I=f-_,D=u-R,z=f-T;return{clientX:v,clientY:h,deltaX:M,deltaY:I,distX:D,distY:z}}function yo(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function ys(e){for(var r=Math.min(e.length,2),n=[],o=0;o<r;++o)n.push(So(e[o]));return n}function So(e){return{clientX:e.clientX,clientY:e.clientY}}function bo(e,r){r===void 0&&(r=e.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},o=0;o<r;++o){var a=e[o];n.originalClientX+="originalClientX"in a?a.originalClientX:a.clientX,n.originalClientY+="originalClientY"in a?a.originalClientY:a.clientY,n.clientX+=a.clientX,n.clientY+=a.clientY}return r?{clientX:n.clientX/r,clientY:n.clientY/r,originalClientX:n.originalClientX/r,originalClientY:n.originalClientY/r}:n}var Da=function(){function e(r){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=r,this.prevClients=r,this.length=r.length}return e.prototype.getAngle=function(r){return r===void 0&&(r=this.prevClients),Pn(r)},e.prototype.getRotation=function(r){return r===void 0&&(r=this.prevClients),Pn(r)-Pn(this.startClients)},e.prototype.getPosition=function(r,n){r===void 0&&(r=this.prevClients);var o=$n(r||this.prevClients,this.prevClients,this.startClients),a=o.deltaX,u=o.deltaY;return this.movement+=Math.sqrt(a*a+u*u),this.prevClients=r,o},e.prototype.getPositions=function(r){r===void 0&&(r=this.prevClients);var n=this.prevClients;return this.startClients.map(function(o,a){return $n([r[a]],[n[a]],[o])})},e.prototype.getMovement=function(r){var n=this.movement;if(!r)return n;var o=bo(r,this.length),a=bo(this.prevClients,this.length),u=o.clientX-a.clientX,f=o.clientY-a.clientY;return Math.sqrt(u*u+f*f)+n},e.prototype.getDistance=function(r){return r===void 0&&(r=this.prevClients),yo(r)},e.prototype.getScale=function(r){return r===void 0&&(r=this.prevClients),yo(r)/yo(this.startClients)},e.prototype.move=function(r,n){this.startClients.forEach(function(o){o.clientX-=r,o.clientY-=n}),this.prevClients.forEach(function(o){o.clientX-=r,o.clientY-=n})},e}(),Jo=["textarea","input"],Us=function(e){Ns(r,e);function r(n,o){o===void 0&&(o={});var a=e.call(this)||this;a.options={},a.flag=!1,a.pinchFlag=!1,a.data={},a.isDrag=!1,a.isPinch=!1,a.isMouse=!1,a.isTouch=!1,a.clientStores=[],a.targets=[],a.prevTime=0,a.doubleFlag=!1,a._dragFlag=!1,a._isTrusted=!1,a._isMouseEvent=!1,a._isSecondaryButton=!1,a._preventMouseEvent=!1,a._prevInputEvent=null,a._isDragAPI=!1,a._isIdle=!0,a.onDragStart=function(_,w){if(w===void 0&&(w=!0),!(!a.flag&&_.cancelable===!1)){var R=_.type.indexOf("drag")>=-1;if(!(a.flag&&R)){a._isDragAPI=!0;var T=a.options,M=T.container,I=T.pinchOutside,D=T.preventWheelClick,z=T.preventRightClick,W=T.preventDefault,k=T.checkInput,H=T.dragFocusedInput,L=T.preventClickEventOnDragStart,F=T.preventClickEventOnDrag,U=T.preventClickEventByCondition,j=a.isTouch,q=!a.flag;if(a._isSecondaryButton=_.which===3|
|
||
|
`).concat(n).concat(r,`
|
||
|
transform-origin: `).concat(o," ").concat(a,`;
|
||
|
}`)}).join(`
|
||
|
`),ja=`
|
||
|
{
|
||
|
position: absolute;
|
||
|
width: 1px;
|
||
|
height: 1px;
|
||
|
left: 0;
|
||
|
top: 0;
|
||
|
z-index: 3000;
|
||
|
--moveable-color: #4af;
|
||
|
--zoom: 1;
|
||
|
--zoompx: 1px;
|
||
|
--moveable-line-padding: 0;
|
||
|
--moveable-control-padding: 0;
|
||
|
will-change: transform;
|
||
|
outline: 1px solid transparent;
|
||
|
}
|
||
|
.control-box {
|
||
|
z-index: 0;
|
||
|
}
|
||
|
.line, .control {
|
||
|
position: absolute;
|
||
|
left: 0;
|
||
|
top: 0;
|
||
|
will-change: transform;
|
||
|
}
|
||
|
.control {
|
||
|
width: 14px;
|
||
|
height: 14px;
|
||
|
border-radius: 50%;
|
||
|
border: 2px solid #fff;
|
||
|
box-sizing: border-box;
|
||
|
background: #4af;
|
||
|
background: var(--moveable-color);
|
||
|
margin-top: -7px;
|
||
|
margin-left: -7px;
|
||
|
border: 2px solid #fff;
|
||
|
z-index: 10;
|
||
|
}
|
||
|
.around-control {
|
||
|
position: absolute;
|
||
|
will-change: transform;
|
||
|
width: calc(var(--moveable-control-padding, 20) * 1px);
|
||
|
height: calc(var(--moveable-control-padding, 20) * 1px);
|
||
|
left: calc(var(--moveable-control-padding, 20) * -0.5px);
|
||
|
top: calc(var(--moveable-control-padding, 20) * -0.5px);
|
||
|
box-sizing: border-box;
|
||
|
background: transparent;
|
||
|
z-index: 8;
|
||
|
cursor: alias;
|
||
|
transform-origin: center center;
|
||
|
}
|
||
|
`.concat(ws,`
|
||
|
.padding {
|
||
|
position: absolute;
|
||
|
top: 0px;
|
||
|
left: 0px;
|
||
|
width: 100px;
|
||
|
height: 100px;
|
||
|
transform-origin: 0 0;
|
||
|
}
|
||
|
.line {
|
||
|
width: 1px;
|
||
|
height: 1px;
|
||
|
background: #4af;
|
||
|
background: var(--moveable-color);
|
||
|
transform-origin: 0px 50%;
|
||
|
}
|
||
|
.line.edge {
|
||
|
z-index: 1;
|
||
|
background: transparent;
|
||
|
}
|
||
|
.line.dashed {
|
||
|
box-sizing: border-box;
|
||
|
background: transparent;
|
||
|
}
|
||
|
.line.dashed.horizontal {
|
||
|
border-top: 1px dashed #4af;
|
||
|
border-top-color: #4af;
|
||
|
border-top-color: var(--moveable-color);
|
||
|
}
|
||
|
.line.dashed.vertical {
|
||
|
border-left: 1px dashed #4af;
|
||
|
border-left-color: #4af;
|
||
|
border-left-color: var(--moveable-color);
|
||
|
}
|
||
|
.line.vertical {
|
||
|
transform: translateX(-50%);
|
||
|
}
|
||
|
.line.horizontal {
|
||
|
transform: translateY(-50%);
|
||
|
}
|
||
|
.line.vertical.bold {
|
||
|
width: 2px;
|
||
|
}
|
||
|
.line.horizontal.bold {
|
||
|
height: 2px;
|
||
|
}
|
||
|
|
||
|
.control.origin {
|
||
|
border-color: #f55;
|
||
|
background: #fff;
|
||
|
width: 12px;
|
||
|
height: 12px;
|
||
|
margin-top: -6px;
|
||
|
margin-left: -6px;
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
`).concat([0,15,30,45,60,75,90,105,120,135,150,165].map(function(e){return`
|
||
|
.direction[data-rotation="`.concat(e,'"], :global .view-control-rotation').concat(e,` {
|
||
|
`).concat(Yi(e),`
|
||
|
}
|
||
|
`)}).join(`
|
||
|
`),`
|
||
|
|
||
|
.line.direction:before {
|
||
|
content: "";
|
||
|
position: absolute;
|
||
|
width: 100%;
|
||
|
height: calc(var(--moveable-line-padding, 0) * 1px);
|
||
|
bottom: 0;
|
||
|
left: 0;
|
||
|
}
|
||
|
.group {
|
||
|
z-index: -1;
|
||
|
}
|
||
|
.area {
|
||
|
position: absolute;
|
||
|
}
|
||
|
.area-pieces {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
display: none;
|
||
|
}
|
||
|
.area.avoid, .area.pass {
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
.area.avoid+.area-pieces {
|
||
|
display: block;
|
||
|
}
|
||
|
.area-piece {
|
||
|
position: absolute;
|
||
|
}
|
||
|
|
||
|
`).concat(wo?`:global svg *:before {
|
||
|
content:"";
|
||
|
transform-origin: inherit;
|
||
|
}`:"",`
|
||
|
`),qt=[[0,1,2],[1,0,3],[2,0,3],[3,1,2]],Ar=1e-4,Je=1e-7,ti=1e-9,qi=Math.pow(10,10),or=-qi,bi={n:[0,-1],e:[1,0],s:[0,1],w:[-1,0],nw:[-1,-1],ne:[1,-1],sw:[-1,1],se:[1,1]},_i={n:[0,1],e:[1,3],s:[3,2],w:[2,0],nw:[0],ne:[1],sw:[2],se:[3]},Na={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},qr=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate","waitToChangeTarget","updateSelectors","getTargets","stopDrag"];function xi(e,r,n,o,a,u){var f,v;u===void 0&&(u="draggable");var h=(v=(f=r.gestos[u])===null||f===void 0?void 0:f.move(n,e.inputEvent))!==null&&v!==void 0?v:{},b=h.originalDatas||h.datas,C=b[u]||(b[u]={});return N(N({},a?fe(r,h):h),{isPinch:!!o,parentEvent:!0,datas:C,originalDatas:e.originalDatas})}var ei=function(){function e(n){var o;n===void 0&&(n="draggable"),this.ableName=n,this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}},this.datas=(o={},o[n]={},o)}var r=e.prototype;return r.dragStart=function(n,o){this.isDrag=!1,this.isFlag=!1;var a=o.originalDatas;return this.datas=a,a[this.ableName]||(a[this.ableName]={}),N(N({},this.move(n,o.inputEvent)),{type:"dragstart"})},r.drag=function(n,o){return this.move([n[0]-this.prevX,n[1]-this.prevY],o)},r.move=function(n,o){var a,u,f=!1;if(!this.isFlag)this.prevX=n[0],this.prevY=n[1],this.startX=n[0],this.startY=n[1],a=n[0],u=n[1],this.isFlag=!0;else{var v=this.isDrag;a=this.prevX+n[0],u=this.prevY+n[1],(n[0]||n[1])&&(this.isDrag=!0),!v&&this.isDrag&&(f=!0)}return this.prevX=a,this.prevY=u,{type:"drag",clientX:a,clientY:u,inputEvent:o,isFirstDrag:f,isDrag:this.isDrag,distX:a-this.startX,distY:u-this.startY,deltaX:n[0],deltaY:n[1],datas:this.datas[this.ableName],originalDatas:this.datas,parentEvent:!0,parentGesto:this}},e}();function pn(e,r){var n=r.clientX,o=r.clientY,a=r.datas,u=e.state,f=u.moveableClientRect,v=u.rootMatrix,h=u.is3d,b=u.pos1,C=f.left,_=f.top,w=h?4:3,R=Et(ze(v,[n-C,o-_],w),b),T=R[0],M=R[1],I=Kr({datas:a,distX:T,distY:M}),D=I[0],z=I[1];return[D,z]}function $r(e,r){var n=r.datas,o=e.state,a=o.allMatrix,u=o.beforeMatrix,f=o.is3d,v=o.left,h=o.top,b=o.origin,C=o.offsetMatrix,_=o.targetMatrix,w=o.transformOrigin,R=f?4:3;n.is3d=f,n.matrix=a,n.targetMatrix=_,n.beforeMatrix=u,n.offsetMatrix=C,n.transformOrigin=w,n.inverseMatrix=Rr(a,R),n.inverseBeforeMatrix=Rr(u,R),n.absoluteOrigin=Pr(Yt([v,h],b),R),n.startDragBeforeDist=Qe(n.inverseBeforeMatrix,n.absoluteOrigin,R),n.startDragDist=Qe(n.inverseMatrix,n.absoluteOrigin,R)}function Cs(e){return p(e.datas.beforeTransform,[50,50],100,100).direction}function gn(e,r){var n=e.datas,o=e.originalDatas.beforeRenderable,a=n.transformIndex,u=o.nextTransforms,f=u.length,v=o.nextTransformAppendedIndexes,h=-1;a===-1?(r==="translate"?h=0:r==="rotate"&&(h=mr(u,function(w){return w.match(/scale\(/g)})),h===-1&&(h=u.length),n.transformIndex=h):wr(v,function(w){return w.index===a&&w.functionName===r})?h=a:h=a+v.filter(function(w){return w.index<a}).length;var b=Oo(u,h),C=b.targetFunction,_=r==="rotate"?"rotateZ":r;n.beforeFunctionTexts=b.beforeFunctionTexts,n.afterFunctionTexts=b.afterFunctionTexts,n.beforeTransform=b.beforeFunctionMatrix,n.beforeTransform2=b.beforeFunctionMatrix2,n.targetTansform=b.targetFunctionMatrix,n.afterTransform=b.afterFunctionMatrix,n.afterTransform2=b.afterFunctionMatrix2,n.targetAllTransform=b.allFunctionMatrix,C.functionName===_?(n.afterFunctionTexts.splice(0,1),n.isAppendTransform=!1):f>h&&(n.isAppendTransform=!0,o.nextTransformAppendedIndexes=bt(bt([],v,!0),[{functionName:r,index:h,isAppend:!0}],!1))}function Ro(e,r,n){return"".concat(e.beforeFunctionTexts.join(" ")," ").concat(e.isAppendTransform?n:r," ").concat(e.afterFunctionTexts.join(" "))}function Va(e){var r=e.datas,n=e.distX,o=e.distY,a=mn({datas:r,distX:n,distY:o}),u=a[0],f=a[1],v=ea(r,Fs([u,f],4));return Qe(v,Pr([0,0,0],4),4)}function ea(e,r,n){var o=e.beforeTransform,a=e.afterTransform,u=e.beforeTransform2,f=e.afterTransform2,v=e.targetAllTransform,h=n?ce(v,r,4):ce(r,v,4),b=ce(Rr(n?u:o,
|
||
|
--bounds-color: #d66;
|
||
|
}
|
||
|
.guideline {
|
||
|
pointer-events: none;
|
||
|
z-index: 2;
|
||
|
}
|
||
|
.guideline.bounds {
|
||
|
background: #d66;
|
||
|
background: var(--bounds-color);
|
||
|
}
|
||
|
.guideline-group {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
}
|
||
|
.guideline-group .size-value {
|
||
|
position: absolute;
|
||
|
color: #f55;
|
||
|
font-size: 12px;
|
||
|
font-size: calc(12px * var(--zoom));
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
.guideline-group.horizontal .size-value {
|
||
|
transform-origin: 50% 100%;
|
||
|
transform: translateX(-50%);
|
||
|
left: 50%;
|
||
|
bottom: 5px;
|
||
|
bottom: calc(2px + 3px * var(--zoom));
|
||
|
}
|
||
|
.guideline-group.vertical .size-value {
|
||
|
transform-origin: 0% 50%;
|
||
|
top: 50%;
|
||
|
transform: translateY(-50%);
|
||
|
left: 5px;
|
||
|
left: calc(2px + 3px * var(--zoom));
|
||
|
}
|
||
|
.guideline.gap {
|
||
|
background: #f55;
|
||
|
}
|
||
|
.size-value.gap {
|
||
|
color: #f55;
|
||
|
}
|
||
|
`],render:function(e,r){var n=e.state,o=n.top,a=n.left,u=n.pos1,f=n.pos2,v=n.pos3,h=n.pos4,b=n.snapRenderInfo,C=e.props.snapRenderThreshold,_=C===void 0?1:C;if(!b||!b.render||!Hr(e,""))return[];n.guidelines=fl(e);var w=Math.min(u[0],f[0],v[0],h[0]),R=Math.min(u[1],f[1],v[1],h[1]),T=b.externalPoses||[],M=tt(e.state),I=[],D=[],z=[],W=[],k=[],H=i(M),L=H.width,F=H.height,U=H.top,j=H.left,q=H.bottom,Y=H.right,K={left:j,right:Y,top:U,bottom:q,center:(j+Y)/2,middle:(U+q)/2},J=T.length>0,ot=J?i(T):{};if(!b.request){if(b.direction&&k.push(ju(e,M,b.direction,_)),b.snap){var ut=i(M);b.center&&(ut.middle=(ut.top+ut.bottom)/2,ut.center=(ut.left+ut.right)/2),k.push(Ol(e,ut,_))}J&&(b.center&&(ot.middle=(ot.top+ot.bottom)/2,ot.center=(ot.left+ot.right)/2),k.push(Ol(e,ot,_))),k.forEach(function(ft){var at=ft.vertical.posInfos,_t=ft.horizontal.posInfos;I.push.apply(I,at.filter(function(Mt){var Ot=Mt.guidelineInfos;return Ot.some(function(Ft){var wt=Ft.guideline;return!wt.hide})}).map(function(Mt){return{type:"snap",pos:Mt.pos}})),D.push.apply(D,_t.filter(function(Mt){var Ot=Mt.guidelineInfos;return Ot.some(function(Ft){var wt=Ft.guideline;return!wt.hide})}).map(function(Mt){return{type:"snap",pos:Mt.pos}})),z.push.apply(z,ql(at)),W.push.apply(W,ql(_t))})}$l(e,[j,Y],[U,q],I,D),J&&$l(e,[ot.left,ot.right],[ot.top,ot.bottom],I,D,b.externalBounds);var vt=bt(bt([],z,!0),W,!0),St=vt.filter(function(ft){return ft.element&&!ft.gapRects}),dt=vt.filter(function(ft){return ft.gapRects}).sort(function(ft,at){return ft.gap-at.gap});return pt(e,"onSnap",{guidelines:vt.filter(function(ft){var at=ft.element;return!at}),elements:St,gaps:dt},!0),bt(bt(bt(bt(bt(bt([],rc(e,St,[w,R],K,r),!0),nc(e,dt,[w,R],K,r),!0),Bl(e,"horizontal",W,[a,o],K,r),!0),Bl(e,"vertical",z,[a,o],K,r),!0),Fl(e,"horizontal",D,w,o,L,0,r),!0),Fl(e,"vertical",I,R,a,F,1,r),!0)},dragStart:function(e,r){e.state.snapRenderInfo={request:r.isRequest,snap:!0,center:!0},Zs(e)},drag:function(e){var r=e.state;Zs(e)||(r.guidelines=fl(e)),r.snapRenderInfo&&(r.snapRenderInfo.render=!0)},pinchStart:function(e){this.unset(e)},dragEnd:function(e){this.unset(e)},dragControlCondition:function(e,r){if(_c(e,r)||gl(e,r))return!0;if(!r.isRequest&&r.inputEvent)return Ie(r.inputEvent.target,Ct("snap-control"))},dragControlStart:function(e){e.state.snapRenderInfo=null,Zs(e)},dragControl:function(e){this.drag(e)},dragControlEnd:function(e){this.unset(e)},dragGroupStart:function(e,r){this.dragStart(e,r)},dragGroup:function(e){this.drag(e)},dragGroupEnd:function(e){this.unset(e)},dragGroupControlStart:function(e){e.state.snapRenderInfo=null,Zs(e)},dragGroupControl:function(e){this.drag(e)},dragGroupControlEnd:function(e){this.unset(e)},unset:function(e){var r=e.state;r.enableSnap=!1,r.guidelines=[],r.snapRenderInfo=null,r.elementRects=[]}};function Kl(e,r,n,o){var a=e.getState(),u=a.renderPoses,f=a.rotation,v=a.direction,h=O(e.props,r).zoom,b=v>0?1:-1,C=f/Math.PI*180,_={},w=e.renderState;w.renderDirectionMap||(w.renderDirectionMap={});var R=w.renderDirectionMap;return n.forEach(function(T){var M=T.dir;_[M]=!0}),n.map(function(T){var M=T.data,I=T.classNames,D=T.dir,z=_i[D];if(!z||!_[D])return null;R[D]=!0;var W=(Lt(C,15)+b*Na[D]+720)%180,k={};return Rn(M).forEach(function(H){k["data-".concat(H)]=M[H]}),o.createElement("div",N({className:Ct.apply(void 0,bt(["control","direction",D,r],I,!1)),"data-rotation":W,"data-direction":D},k,{key:"direction-".concat(D),style:E.apply(void 0,bt([f,h],z.map(function(H){return u[H]}),!1))}))})}function Zl(e,r,n,o){var a=O(e.props,n),u=a.renderDirections,f=u===void 0?r:u,v=a.displayAroundControls;if(!f)return[];var h=f===!0?Xi:f;return bt(bt([],v?eu(e,o,n,h):[],!0),Kl(e,n,h.map(function(b){return{data:{},classNames:[],dir:b}}),o),!0)}function Ps(e,r,n,o,a,u){for(var f=[],v=6;v<arguments.length;v++)f[v-6]=arguments[v];var h=Ge(n,o),b=r?Lt(h/Math.PI*180,15)%180:-1;return e.createElement("div",{key:"line-".concat(u),className:Ct.apply(void 0,bt(["line","direction",r?"edge":"",r],f,!1)),"data-rotation":b,"data-line-key":u,"data-direction":r,style:x(n,o,a,h)})}function Ql(e,r,n,o,a){var u
|
||
|
position: absolute;
|
||
|
height: 40px;
|
||
|
width: 1px;
|
||
|
transform-origin: 50% 100%;
|
||
|
height: calc(40px * var(--zoom));
|
||
|
top: auto;
|
||
|
left: 0;
|
||
|
bottom: 100%;
|
||
|
will-change: transform;
|
||
|
}
|
||
|
.rotation .rotation-line {
|
||
|
display: block;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
transform-origin: 50% 50%;
|
||
|
}
|
||
|
.rotation .rotation-control {
|
||
|
border-color: #4af;
|
||
|
border-color: var(--moveable-color);
|
||
|
background:#fff;
|
||
|
cursor: alias;
|
||
|
}
|
||
|
:global .view-rotation-dragging, .rotatable.direction.control {
|
||
|
cursor: alias;
|
||
|
}
|
||
|
.rotatable.direction.control.move {
|
||
|
cursor: move;
|
||
|
}
|
||
|
`,Tc={name:"rotatable",canPinch:!0,props:["rotatable","rotationPosition","throttleRotate","renderDirections","rotationTarget","rotateAroundControls","edge","resolveAblesWithRotatable","displayAroundControls"],events:["rotateStart","beforeRotate","rotate","rotateEnd","rotateGroupStart","beforeRotateGroup","rotateGroup","rotateGroupEnd"],css:[Rc],viewClassName:function(e){return e.isDragging("rotatable")?Ct("view-rotation-dragging"):""},render:function(e,r){var n=O(e.props,"rotatable"),o=n.rotatable,a=n.rotationPosition,u=n.zoom,f=n.renderDirections,v=n.rotateAroundControls,h=n.resolveAblesWithRotatable,b=e.getState(),C=b.renderPoses,_=b.direction;if(!o)return null;var w=ou(a,C,_),R=[];if(w.forEach(function(D,z){var W=D[0],k=D[1];R.push(r.createElement("div",{key:"rotation".concat(z),className:Ct("rotation"),style:{transform:"translate(-50%) translate(".concat(W[0],"px, ").concat(W[1],"px) rotate(").concat(k,"rad)")}},r.createElement("div",{className:Ct("line rotation-line"),style:{transform:"scaleX(".concat(u,")")}}),r.createElement("div",{className:Ct("control rotation-control"),style:{transform:"translate(0.5px) scale(".concat(u,")")}})))}),f){var T=Rn(h||{}),M={};T.forEach(function(D){h[D].forEach(function(z){M[z]=D})});var I=[];le(f)&&(I=f.map(function(D){var z=M[D];return{data:z?{resolve:z}:{},classNames:z?["move"]:[],dir:D}})),R.push.apply(R,Kl(e,"rotatable",I,r))}return v&&R.push.apply(R,eu(e,r)),R},dragControlCondition:gl,dragControlStart:function(e,r){var n,o,a=r.datas,u=r.clientX,f=r.clientY,v=r.parentRotate,h=r.parentFlag,b=r.isPinch,C=r.isRequest,_=e.state,w=_.target,R=_.left,T=_.top,M=_.direction,I=_.beforeDirection,D=_.targetTransform,z=_.moveableClientRect,W=_.offsetMatrix,k=_.targetMatrix,H=_.allMatrix,L=_.width,F=_.height;if(!C&&!w)return!1;var U=e.getRect();a.rect=U,a.transform=D,a.left=R,a.top=T;var j=function(wt){var xt=nu(e.state,wt);a.fixedDirection=xt.fixedDirection,a.fixedOffset=xt.fixedOffset,a.fixedPosition=xt.fixedPosition,_t&&_t.setFixedPosition(wt)},q=function(wt){var xt=Cc(e.state,wt);a.fixedDirection=xt.fixedDirection,a.fixedOffset=xt.fixedOffset,a.fixedPosition=xt.fixedPosition,_t&&_t.setFixedDirection(wt)},Y=u,K=f;if(C||b||h){var J=v||0;a.beforeInfo={origin:U.beforeOrigin,prevDeg:J,defaultDeg:J,prevSnapDeg:0,startDist:0},a.afterInfo=N(N({},a.beforeInfo),{origin:U.origin}),a.absoluteInfo=N(N({},a.beforeInfo),{origin:U.origin,startValue:J})}else{var ot=(o=r.inputEvent)===null||o===void 0?void 0:o.target;if(ot){var ut=ot.getAttribute("data-direction")||"",vt=bi[ut];if(vt){a.isControl=!0,a.isAroundControl=Ie(ot,Ct("around-control")),a.controlDirection=vt;var St=ot.getAttribute("data-resolve");St&&(a.resolveAble=St);var dt=c(_.rootMatrix,_.renderPoses,z);n=pe(dt,vt),Y=n[0],K=n[1]}}a.beforeInfo={origin:U.beforeOrigin},a.afterInfo={origin:U.origin},a.absoluteInfo={origin:U.origin,startValue:U.rotation};var ft=j;j=function(wt){var xt=_.is3d?4:3,Bt=Yt(Li(k,xt),wt),Nt=Bt[0],he=Bt[1],Dt=Qe(W,Pr([Nt,he],xt)),zt=Qe(H,Pr([wt[0],wt[1]],xt));ft(wt);var ne=_.posDelta;a.beforeInfo.origin=Et(Dt,ne),a.afterInfo.origin=Et(zt,ne),a.absoluteInfo.origin=Et(zt,ne),vl(e,a.beforeInfo,Y,K,z),vl(e,a.afterInfo,Y,K,z),vl(e,a.absoluteInfo,Y,K,z)},q=function(wt){var xt=pe([[0,0],[L,0],[0,F],[L,F]],wt);j(xt)}}a.startClientX=Y,a.startClientY=K,a.direction=M,a.beforeDirection=I,a.startValue=0,a.datas={},Ki(r,"rotate");var at=!1,_t=!1;if(a.isControl&&a.resolveAble){var Mt=a.resolveAble;Mt==="resizable"&&(_t=dl.dragControlStart(e,N(N({},new ei("resizable").dragStart([0,0],r)),{parentPosition:a.controlPosition,parentFixedPosition:a.fixedPosition})))}_t||(at=jr.dragStart(e,new ei().dragStart([0,0],r))),j(X(e));var Ot=ct(e,r,N(N({set:function(wt){a.startValue=wt*Math.PI/180},setFixedDirection:q,setFixedPosition:j},$i(r)),{dragStart:at,resizeStart:_t})),Ft=pt(e,"onRotateStart",Ot);return a.isRotate=Ft!==!1,_.snapRenderInfo={request:r.isRequest},a.isRotate?Ot:!1},dragControl:function(e,r){var n,o,a,u=r.datas,f=r.clientDistX,v=r.clientDistY,h=r.parentRotate,b=r.parentFlag,C=r.isPinch,_=r.groupDelta,w=r.resolveMatrix,R=u.beforeDirec
|
||
|
background: #6d6;
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
.control.clip-control.clip-radius {
|
||
|
background: #d66;
|
||
|
}
|
||
|
.line.clip-line {
|
||
|
background: #6e6;
|
||
|
cursor: move;
|
||
|
z-index: 1;
|
||
|
}
|
||
|
.clip-area {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
}
|
||
|
.clip-ellipse {
|
||
|
position: absolute;
|
||
|
cursor: move;
|
||
|
border: 1px solid #6d6;
|
||
|
border: var(--zoompx) solid #6d6;
|
||
|
border-radius: 50%;
|
||
|
transform-origin: 0px 0px;
|
||
|
}`,`:host {
|
||
|
--bounds-color: #d66;
|
||
|
}`,`.guideline {
|
||
|
pointer-events: none;
|
||
|
z-index: 2;
|
||
|
}`,`.line.guideline.bounds {
|
||
|
background: #d66;
|
||
|
background: var(--bounds-color);
|
||
|
}`],render:function(e,r){var n=e.props,o=n.customClipPath,a=n.defaultClipPath,u=n.clipArea,f=n.zoom,v=n.groupable,h=e.getState(),b=h.target,C=h.width,_=h.height,w=h.allMatrix,R=h.is3d,T=h.left,M=h.top,I=h.pos1,D=h.pos2,z=h.pos3,W=h.pos4,k=h.clipPathState,H=h.snapBoundInfos,L=h.rotation;if(!b||v)return[];var F=gu(b,C,_,a||"inset",k||o);if(!F)return[];var U=R?4:3,j=F.type,q=F.poses,Y=q.map(function(ue){var oe=d(w,ue.pos,U);return[oe[0]-T,oe[1]-M]}),K=[],J=[],ot=j==="rect",ut=j==="inset",vt=j==="polygon";if(ot||ut||vt){var St=ut?Y.slice(0,8):Y;J=St.map(function(ue,oe){var Re=oe===0?St[St.length-1]:St[oe-1],te=Ge(Re,ue),ae=y(Re,ue);return r.createElement("div",{key:"clipLine".concat(oe),className:Ct("line","clip-line","snap-control"),"data-clip-index":oe,style:{width:"".concat(ae,"px"),transform:"translate(".concat(Re[0],"px, ").concat(Re[1],"px) rotate(").concat(te,"rad) scaleY(").concat(f,")")}})})}if(K=Y.map(function(ue,oe){return r.createElement("div",{key:"clipControl".concat(oe),className:Ct("control","clip-control","snap-control"),"data-clip-index":oe,style:{transform:"translate(".concat(ue[0],"px, ").concat(ue[1],"px) rotate(").concat(L,"rad) scale(").concat(f,")")}})}),ut&&K.push.apply(K,Y.slice(8).map(function(ue,oe){return r.createElement("div",{key:"clipRadiusControl".concat(oe),className:Ct("control","clip-control","clip-radius","snap-control"),"data-clip-index":8+oe,style:{transform:"translate(".concat(ue[0],"px, ").concat(ue[1],"px) rotate(").concat(L,"rad) scale(").concat(f,")")}})})),j==="circle"||j==="ellipse"){var dt=F.left,ft=F.top,at=F.radiusX,_t=F.radiusY,Mt=Et(d(w,[dt,ft],U),d(w,[0,0],U)),Ot=Mt[0],Ft=Mt[1],wt="none";if(!u){for(var xt=Math.max(10,at/5,_t/5),Bt=[],Nt=0;Nt<=xt;++Nt){var he=Math.PI*2/xt*Nt;Bt.push([at+(at-f)*Math.cos(he),_t+(_t-f)*Math.sin(he)])}Bt.push([at,-2]),Bt.push([-2,-2]),Bt.push([-2,_t*2+2]),Bt.push([at*2+2,_t*2+2]),Bt.push([at*2+2,-2]),Bt.push([at,-2]),wt="polygon(".concat(Bt.map(function(ue){return"".concat(ue[0],"px ").concat(ue[1],"px")}).join(", "),")")}K.push(r.createElement("div",{key:"clipEllipse",className:Ct("clip-ellipse","snap-control"),style:{width:"".concat(at*2,"px"),height:"".concat(_t*2,"px"),clipPath:wt,transform:"translate(".concat(-T+Ot,"px, ").concat(-M+Ft,"px) ").concat(Ci(w))}}))}if(u){var Dt=i(bt([I,D,z,W],Y,!0)),zt=Dt.width,ne=Dt.height,Jt=Dt.left,Ke=Dt.top;if(vt||ot||ut){var Bt=ut?Y.slice(0,8):Y;K.push(r.createElement("div",{key:"clipArea",className:Ct("clip-area","snap-control"),style:{width:"".concat(zt,"px"),height:"".concat(ne,"px"),transform:"translate(".concat(Jt,"px, ").concat(Ke,"px)"),clipPath:"polygon(".concat(Bt.map(function(oe){return"".concat(oe[0]-Jt,"px ").concat(oe[1]-Ke,"px")}).join(", "),")")}}))}}return H&&["vertical","horizontal"].forEach(function(ue){var oe=H[ue],Re=ue==="horizontal";oe.isSnap&&J.push.apply(J,oe.snap.posInfos.map(function(te,ae){var se=te.pos,on=Et(d(w,Re?[0,se]:[se,0],U),[T,M]),Do=Et(d(w,Re?[C,se]:[se,_],U),[T,M]);return Ps(r,"",on,Do,f,"clip".concat(ue,"snap").concat(ae),"guideline")})),oe.isBound&&J.push.apply(J,oe.bounds.map(function(te,ae){var se=te.pos,on=Et(d(w,Re?[0,se]:[se,0],U),[T,M]),Do=Et(d(w,Re?[C,se]:[se,_],U),[T,M]);return Ps(r,"",on,Do,f,"clip".concat(ue,"bounds").concat(ae),"guideline","bounds","bold")}))}),bt(bt([],K,!0),J,!0)},dragControlCondition:function(e,r){return r.inputEvent&&(r.inputEvent.target.getAttribute("class")||"").indexOf("clip")>-1},dragStart:function(e,r){var n=e.props,o=n.dragWithClip,a=o===void 0?!0:o;return a?!1:this.dragControlStart(e,r)},drag:function(e,r){return this.dragControl(e,N(N({},r),{isDragTarget:!0}))},dragEnd:function(e,r){return this.dragControlEnd(e,r)},dragControlStart:function(e,r){var n=e.state,o=e.props,a=o.defaultClipPath,u=o.customClipPath,f=n.target,v=n.width,h=n.height,b=r.inputEvent?r.inputEvent.target:null,C=b&&b.getAttribute("class")||"",_=r.datas,w=gu(f,v,h,a||"inset",u);if(!w)return!1;var R=w.clipText,T=w.type,M=w.poses,I=pt(e,"onClipStart",ct(e,r,{clipType:T,clipStyle:R,poses:M.map(function(D){return D.pos})}));return I===!1?(_.isClipStart=!1,!1):(_.i
|
||
|
pointer-events: auto;
|
||
|
}`],dragControlCondition:function(e,r){return r.isRequest?r.requestAble==="originDraggable":Ie(r.inputEvent.target,Ct("origin"))},dragControlStart:function(e,r){var n=r.datas;$r(e,r);var o=ct(e,r,{dragStart:jr.dragStart(e,new ei().dragStart([0,0],r))}),a=pt(e,"onDragOriginStart",o);return n.startOrigin=e.state.transformOrigin,n.startTargetOrigin=e.state.targetOrigin,n.prevOrigin=[0,0],n.isDragOrigin=!0,a===!1?(n.isDragOrigin=!1,!1):o},dragControl:function(e,r){var n=r.datas,o=r.isPinch,a=r.isRequest;if(!n.isDragOrigin)return!1;var u=Kr(r),f=u[0],v=u[1],h=e.state,b=h.width,C=h.height,_=h.offsetMatrix,w=h.targetMatrix,R=h.is3d,T=e.props.originRelative,M=T===void 0?!0:T,I=R?4:3,D=[f,v];if(a){var z=r.distOrigin;(z[0]||z[1])&&(D=z)}var W=Yt(n.startOrigin,D),k=Yt(n.startTargetOrigin,D),H=Et(D,n.prevOrigin),L=ri(_,w,W,I),F=e.getRect(),U=i(t(L,b,C,I)),j=[F.left-U.left,F.top-U.top];n.prevOrigin=D;var q=[_r(k[0],b,M),_r(k[1],C,M)].join(" "),Y=jr.drag(e,xi(r,e.state,j,!!o,!1)),K=ct(e,r,N(N({width:b,height:C,origin:W,dist:D,delta:H,transformOrigin:q,drag:Y},lt({transformOrigin:q,transform:Y.transform},r)),{afterTransform:Y.transform}));return pt(e,"onDragOrigin",K),K},dragControlEnd:function(e,r){var n=r.datas;return n.isDragOrigin?(pt(e,"onDragOriginEnd",mt(e,r,{})),!0):!1},dragGroupControlCondition:function(e,r){return this.dragControlCondition(e,r)},dragGroupControlStart:function(e,r){var n=this.dragControlStart(e,r);return!!n},dragGroupControl:function(e,r){var n=this.dragControl(e,r);return n?(e.transformOrigin=n.transformOrigin,!0):!1},request:function(e){var r={},n=e.getRect(),o=0,a=0,u=n.transformOrigin,f=[0,0];return{isControl:!0,requestStart:function(){return{datas:r}},request:function(v){return"deltaOrigin"in v?(f[0]+=v.deltaOrigin[0],f[1]+=v.deltaOrigin[1]):"origin"in v?(f[0]=v.origin[0]-u[0],f[1]=v.origin[1]-u[1]):("x"in v?o=v.x-n.left:"deltaX"in v&&(o+=v.deltaX),"y"in v?a=v.y-n.top:"deltaY"in v&&(a+=v.deltaY)),{datas:r,distX:o,distY:a,distOrigin:f}},requestEnd:function(){return{datas:r,isDrag:!0}}}}};function qc(e,r,n,o){var a=e.filter(function(h){var b=h.virtual,C=h.horizontal;return C&&!b}).length,u=e.filter(function(h){var b=h.virtual,C=h.vertical;return C&&!b}).length,f=-1;if(r===0&&(a===0?f=0:a===1&&(f=1)),r===2&&(a<=2?f=2:a<=3&&(f=3)),r===3&&(u===0?f=4:u<4&&(f=7)),r===1&&(u<=1?f=5:u<=2&&(f=6)),!(f===-1||!e[f].virtual)){var v=e[f];$c(e,f),f<4?v.pos[0]=n:v.pos[1]=o}}function $c(e,r){r<4?e.slice(0,r+1).forEach(function(n){n.virtual=!1}):(e[0].virtual&&(e[0].virtual=!1),e.slice(4,r+1).forEach(function(n){n.virtual=!1}))}function Kc(e,r){r<4?e.slice(r,4).forEach(function(n){n.virtual=!0}):e.slice(r).forEach(function(n){n.virtual=!0})}function mu(e,r,n,o,a){o===void 0&&(o=[0,0]);var u=[];return!e||e==="0px"?u=[]:u=gr(e),hu(u,r,n,0,0,o,a)}function yu(e,r,n,o,a){var u=e.state,f=u.width,v=u.height,h=yl(a,e.props.roundRelative,f,v),b=h.raws,C=h.styles,_=h.radiusPoses,w=Bc(_,b),R=w.horizontals,T=w.verticals,M=C.join(" ");u.borderRadiusState=M;var I=ct(e,r,N({horizontals:R,verticals:T,borderRadius:M,width:f,height:v,delta:o,dist:n},lt({borderRadius:M},r)));return pt(e,"onRound",I),I}function Su(e){var r,n,o=e.getState().style,a=o.borderRadius||"";if(!a&&e.props.groupable){var u=e.moveables[0],f=e.getTargets()[0];f&&((u==null?void 0:u.props.target)===f?(a=(n=(r=e.moveables[0])===null||r===void 0?void 0:r.state.style.borderRadius)!==null&&n!==void 0?n:"",o.borderRadius=a):(a=$e(f).borderRadius,o.borderRadius=a))}return a}var Zc={name:"roundable",props:["roundable","roundRelative","minRoundControls","maxRoundControls","roundClickable","roundPadding","isDisplayShadowRoundControls"],events:["roundStart","round","roundEnd","roundGroupStart","roundGroup","roundGroupEnd"],css:[`.control.border-radius {
|
||
|
background: #d66;
|
||
|
cursor: pointer;
|
||
|
z-index: 3;
|
||
|
}`,`.control.border-radius.vertical {
|
||
|
background: #d6d;
|
||
|
z-index: 2;
|
||
|
}`,`.control.border-radius.virtual {
|
||
|
opacity: 0.5;
|
||
|
z-index: 1;
|
||
|
}`,`:host.round-line-clickable .line.direction {
|
||
|
cursor: pointer;
|
||
|
}`],className:function(e){var r=e.props.roundClickable;return r===!0||r==="line"?Ct("round-line-clickable"):""},requestStyle:function(){return["borderRadius"]},requestChildStyle:function(){return["borderRadius"]},render:function(e,r){var n=e.getState(),o=n.target,a=n.width,u=n.height,f=n.allMatrix,v=n.is3d,h=n.left,b=n.top,C=n.borderRadiusState,_=e.props,w=_.minRoundControls,R=w===void 0?[0,0]:w,T=_.maxRoundControls,M=T===void 0?[4,4]:T,I=_.zoom,D=_.roundPadding,z=D===void 0?0:D,W=_.isDisplayShadowRoundControls,k=_.groupable;if(!o)return null;var H=C||Su(e),L=v?4:3,F=mu(H,a,u,R,!0);if(!F)return null;var U=0,j=0,q=k?[0,0]:[h,b];return F.map(function(Y,K){var J=Y.horizontal,ot=Y.vertical,ut=Y.direction||"",vt=bt([],Y.pos,!0);j+=Math.abs(J),U+=Math.abs(ot),J&&ut.indexOf("n")>-1&&(vt[1]-=z),ot&&ut.indexOf("w")>-1&&(vt[0]-=z),J&&ut.indexOf("s")>-1&&(vt[1]+=z),ot&&ut.indexOf("e")>-1&&(vt[0]+=z);var St=Et(d(f,vt,L),q),dt=Y.vertical?U<=M[1]&&(W||!Y.virtual):j<=M[0]&&(W||!Y.virtual);return r.createElement("div",{key:"borderRadiusControl".concat(K),className:Ct("control","border-radius",Y.vertical?"vertical":"",Y.virtual?"virtual":""),"data-radius-index":K,style:{display:dt?"block":"none",transform:"translate(".concat(St[0],"px, ").concat(St[1],"px) scale(").concat(I,")")}})})},dragControlCondition:function(e,r){if(!r.inputEvent||r.isRequest)return!1;var n=r.inputEvent.target.getAttribute("class")||"";return n.indexOf("border-radius")>-1||n.indexOf("moveable-line")>-1&&n.indexOf("moveable-direction")>-1},dragGroupControlCondition:function(e,r){return this.dragControlCondition(e,r)},dragControlStart:function(e,r){var n=r.inputEvent,o=r.datas,a=n.target,u=a.getAttribute("class")||"",f=u.indexOf("border-radius")>-1,v=u.indexOf("moveable-line")>-1&&u.indexOf("moveable-direction")>-1,h=f?parseInt(a.getAttribute("data-radius-index"),10):-1,b=-1;if(v){var C=a.getAttribute("data-line-key")||"";C&&(b=parseInt(C.replace(/render-line-/g,""),10),isNaN(b)&&(b=-1))}if(!f&&!v)return!1;var _=ct(e,r,{}),w=pt(e,"onRoundStart",_);if(w===!1)return!1;o.lineIndex=b,o.controlIndex=h,o.isControl=f,o.isLine=v,$r(e,r);var R=e.props,T=R.roundRelative,M=R.minRoundControls,I=M===void 0?[0,0]:M,D=e.state,z=D.width,W=D.height;o.isRound=!0,o.prevDist=[0,0];var k=Su(e),H=mu(k||"",z,W,I,!0)||[];return o.controlPoses=H,D.borderRadiusState=yl(H,T,z,W).styles.join(" "),_},dragControl:function(e,r){var n=r.datas,o=n.controlPoses;if(!n.isRound||!n.isControl||!o.length)return!1;var a=n.controlIndex,u=Kr(r),f=u[0],v=u[1],h=[f,v],b=Et(h,n.prevDist),C=e.props.maxRoundControls,_=C===void 0?[4,4]:C,w=e.state,R=w.width,T=w.height,M=o[a],I=M.vertical,D=M.horizontal,z=o.map(function(k){var H=k.horizontal,L=k.vertical,F=[H*D*h[0],L*I*h[1]];if(H){if(_[0]===1)return F;if(_[0]<4&&H!==D)return F}else{if(_[1]===0)return F[1]=L*D*h[0]/R*T,F;if(I){if(_[1]===1)return F;if(_[1]<4&&L!==I)return F}}return[0,0]});z[a]=h;var W=o.map(function(k,H){return N(N({},k),{pos:Yt(k.pos,z[H])})});return a<4?W.slice(0,a+1).forEach(function(k){k.virtual=!1}):W.slice(4,a+1).forEach(function(k){k.virtual=!1}),n.prevDist=[f,v],yu(e,r,h,b,W)},dragControlEnd:function(e,r){var n=e.state;n.borderRadiusState="";var o=r.datas,a=r.isDouble;if(!o.isRound)return!1;var u=o.isControl,f=o.controlIndex,v=o.isLine,h=o.lineIndex,b=o.controlPoses,C=b.filter(function(D){var z=D.virtual;return z}).length,_=e.props.roundClickable,w=_===void 0?!0:_;if(a&&w){if(u&&(w===!0||w==="control"))Kc(b,f);else if(v&&(w===!0||w==="line")){var R=pn(e,r),T=R[0],M=R[1];qc(b,h,T,M)}C!==b.filter(function(D){var z=D.virtual;return z}).length&&yu(e,r,[0,0],[0,0],b)}var I=mt(e,r,{});return pt(e,"onRoundEnd",I),n.borderRadiusState="",I},dragGroupControlStart:function(e,r){var n=this.dragControlStart(e,r);if(!n)return!1;var o=e.moveables,a=e.props.targets,u=Ye(e,"roundable",r),f=N({targets:e.props.targets,events:u.map(function(v,h){return N(N({},v),{target:a[h],moveable:o[h],currentTarget:o[h]})})},n);return pt(e,"onRoundGroupStart",f),n},dragGroupControl:function(e,r){var n=this.dragControl(e,r);if(!n)return!1;var o=e.moveables,a=e.props.targets
|
||
|
cursor: move;
|
||
|
}`],render:function(e,r){var n=e.props,o=n.edgeDraggable;return o?Ql(r,"edgeDraggable",o,e.getState().renderPoses,n.zoom):[]},dragCondition:function(e,r){var n,o=e.props,a=(n=r.inputEvent)===null||n===void 0?void 0:n.target;return!o.edgeDraggable||!a?!1:!o.draggable&&Ie(a,Ct("direction"))&&Ie(a,Ct("edge"))&&Ie(a,Ct("edgeDraggable"))},dragStart:function(e,r){return jr.dragStart(e,ts(r))},drag:function(e,r){return jr.drag(e,ts(r))},dragEnd:function(e,r){return jr.dragEnd(e,ts(r))},dragGroupCondition:function(e,r){var n,o=e.props,a=(n=r.inputEvent)===null||n===void 0?void 0:n.target;return!o.edgeDraggable||!a?!1:!o.draggable&&Ie(a,Ct("direction"))&&Ie(a,Ct("line"))},dragGroupStart:function(e,r){return jr.dragGroupStart(e,ts(r))},dragGroup:function(e,r){return jr.dragGroup(e,ts(r))},dragGroupEnd:function(e,r){return jr.dragGroupEnd(e,ts(r))},unset:function(e){return jr.unset(e)}}),Ru={name:"individualGroupable",props:["individualGroupable","individualGroupableProps"],events:[]},nf=[bu,fu,xc,nn,jr,rf,dl,Ec,Oc,Tc,Ac,kc,Dc,Yc,Xc,Zc,wl,Ru,ef,cu,_u],gf=null,mf=null;function Tu(e,r){var n=e[0],o=e[1],a=e[2];return(n*r[0]+o*r[1]+a)/Math.sqrt(n*n+o*o)}function rl(e,r){var n=e[0],o=e[1];return-n*r[0]-o*r[1]}function Eu(e,r){return Math.max.apply(Math,e.map(function(n){var o=n[0],a=n[1],u=n[2],f=n[3];return Math.max(o[r],a[r],u[r],f[r])}))}function Mu(e,r){return Math.min.apply(Math,e.map(function(n){var o=n[0],a=n[1],u=n[2],f=n[3];return Math.min(o[r],a[r],u[r],f[r])}))}function of(e,r){var n,o=[0,0],a=[0,0],u=[0,0],f=[0,0],v=0,h=0;if(!e.length)return{pos1:o,pos2:a,pos3:u,pos4:f,minX:0,minY:0,maxX:0,maxY:0,width:v,height:h,rotation:r};var b=Lt(r,Je);if(b%90){var C=b/180*Math.PI,_=Math.tan(C),w=-1/_,R=[qi,or],T=[[0,0],[0,0]],M=[qi,or],I=[[0,0],[0,0]];e.forEach(function(ft){ft.forEach(function(at){var _t=Tu([-_,1,0],at),Mt=Tu([-w,1,0],at);R[0]>_t&&(T[0]=at,R[0]=_t),R[1]<_t&&(T[1]=at,R[1]=_t),M[0]>Mt&&(I[0]=at,M[0]=Mt),M[1]<Mt&&(I[1]=at,M[1]=Mt)})});var D=T[0],z=T[1],W=I[0],k=I[1],H=[-_,1,rl([-_,1],D)],L=[-_,1,rl([-_,1],z)],F=[-w,1,rl([-w,1],W)],U=[-w,1,rl([-w,1],k)];n=[[H,F],[H,U],[L,F],[L,U]].map(function(ft){var at=ft[0],_t=ft[1];return Yr(at,_t)[0]}),o=n[0],a=n[1],u=n[2],f=n[3],v=M[1]-M[0],h=R[1]-R[0]}else{var j=Mu(e,0),q=Mu(e,1),Y=Eu(e,0),K=Eu(e,1);if(o=[j,q],a=[Y,q],u=[j,K],f=[Y,K],v=Y-j,h=K-q,b%180){var J=[u,o,f,a];o=J[0],a=J[1],u=J[2],f=J[3],v=K-q,h=Y-j}}if(b%360>180){var J=[f,u,a,o];o=J[0],a=J[1],u=J[2],f=J[3]}var ot=Yn([o,a,u,f]),ut=ot.minX,vt=ot.minY,St=ot.maxX,dt=ot.maxY;return{pos1:o,pos2:a,pos3:u,pos4:f,width:v,height:h,minX:ut,minY:vt,maxX:St,maxY:dt,rotation:r}}function Ou(e,r){var n=r.map(function(o){if(le(o)){var a=Ou(e,o),u=a.length;return u>1?a:u===1?a[0]:null}else{var f=wr(e,function(v){var h=v.manager;return h.props.target===o});return f?(f.finded=!0,f.manager):null}}).filter(Boolean);return n.length===1&&le(n[0])?n[0]:n}var af=function(e){de(r,e);function r(){var o=e!==null&&e.apply(this,arguments)||this;return o.differ=new Uo,o.moveables=[],o.transformOrigin="50% 50%",o.renderGroupRects=[],o._targetGroups=[],o._hasFirstTargets=!1,o}var n=r.prototype;return n.componentDidMount=function(){e.prototype.componentDidMount.call(this)},n.checkUpdate=function(){this._isPropTargetChanged=!1,this.updateAbles()},n.getTargets=function(){return this.props.targets},n.updateRect=function(o,a,u){var f;u===void 0&&(u=!0);var v=this.state;if(!this.controlBox||v.isPersisted)return;Bn(!0),this.moveables.forEach(function(Nt){Nt.updateRect(o,!1,!1)});var h=this.props,b=this.moveables,C=v.target||h.target,_=b.map(function(Nt){return{finded:!1,manager:Nt}}),w=this.props.targetGroups||[],R=Ou(_,w);R.push.apply(R,_.filter(function(Nt){var he=Nt.finded;return!he}).map(function(Nt){var he=Nt.manager;return he}));var T=[],M=!a||o!==""&&h.updateGroup,I=h.defaultGroupRotate||0;if(!this._hasFirstTargets){var D=(f=this.props.persistData)===null||f===void 0?void 0:f.rotation;D!=null&&(I=D)}function z(Nt,he,Dt){var zt=Nt.map(function(te){if(le(te)){var ae=z(te,he),se=[ae.pos1,ae.pos2,ae.pos3,ae.pos4];return T.push(ae),{poses:se,rotation:ae.rotatio
|
||
|
`);this.defaultStyled=La("div",(0,Ze.$i)(Co,ja+u))},r.getTotalAbles=function(){return bt([fu,wl,Ru,cu],this.defaultAbles,!0)},n.render=function(){var o,a=this.constructor;a.defaultStyled||a.makeStyled();var u=this.props,f=u.ables,v=u.props,h=Ga(u,["ables","props"]),b=this._updateRefs(!0),C=Iu(b,this.selectorMap),_=C.length>1,w=a.getTotalAbles(),R=bt(bt([],w,!0),f||[],!0),T=N(N(N({},h),v||{}),{ables:R,cssStyled:a.defaultStyled,customStyledMap:a.customStyledMap});this._elementTargets=C;var M=null,I=this.moveable,D=h.persistData;if((D==null?void 0:D.children)&&(_=!0),h.individualGroupable)return Ue.createElement(sf,N({key:"individual-group",ref:(0,Ze.iH)(this,"moveable")},T,{target:null,targets:C}));if(_){var z=Pu(b,this.selectorMap);if(I&&!I.props.groupable&&!I.props.individualGroupable){var W=I.props.target;W&&C.indexOf(W)>-1&&(M=N({},I.state))}return Ue.createElement(af,N({key:"group",ref:(0,Ze.iH)(this,"moveable")},T,(o=h.groupableProps)!==null&&o!==void 0?o:{},{target:null,targets:C,targetGroups:z,firstRenderState:M}))}else{var k=C[0];if(I&&(I.props.groupable||I.props.individualGroupable)){var H=I.moveables||[],L=wr(H,function(F){return F.props.target===k});L&&(M=N({},L.state))}return Ue.createElement(Ja,N({key:"single",ref:(0,Ze.iH)(this,"moveable")},T,{target:k,firstRenderState:M}))}},n.componentDidMount=function(){this._checkChangeTargets(),this._updateRefs()},n.componentDidUpdate=function(){this._checkChangeTargets()},n.componentWillUnmount=function(){this.selectorMap={},this.refTargets=[]},n.getTargets=function(){var o,a;return(a=(o=this.moveable)===null||o===void 0?void 0:o.getTargets())!==null&&a!==void 0?a:[]},n.updateSelectors=function(){this.selectorMap={},this._updateRefs()},n.waitToChangeTarget=function(){var o=this,a;return this._onChangeTargets=function(){o._onChangeTargets=null,a()},new Promise(function(u){a=u})},n.waitToChangeTargets=function(){return this.waitToChangeTarget()},n.getManager=function(){return this.moveable},n._updateRefs=function(o){var a=this.refTargets,u=Pt(this.props.target||this.props.targets),f=typeof document!="undefined",v=Du(a,u),h=this.selectorMap,b={};return this.refTargets.forEach(function C(_){if(Le(_)){var w=h[_];w?b[_]=h[_]:f&&(v=!0,b[_]=[].slice.call(document.querySelectorAll(_)))}else le(_)&&_.forEach(C)}),this.refTargets=u,this.selectorMap=b,!o&&v&&this.forceUpdate(),u},n._checkChangeTargets=function(){var o,a,u,f=this._differ.update(this._elementTargets),v=f.added,h=f.removed,b=v.length||h.length;b&&((a=(o=this.props).onChangeTargets)===null||a===void 0||a.call(o,{moveable:this.moveable,targets:this._elementTargets}),(u=this._onChangeTargets)===null||u===void 0||u.call(this)),this._updateRefs()},r.defaultAbles=[],r.customStyledMap={},r.defaultStyled=null,Wa([(0,Ze.qE)(qr)],r.prototype,"moveable",void 0),r}(Ue.PureComponent),lf=function(e){de(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.defaultAbles=nf,r}(zu);function yf(e){var r;return r=function(n){de(o,n);function o(){return n!==null&&n.apply(this,arguments)||this}return o}(zu),r.defaultAbles=e,r}}}]);
|