(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["2783"],{769304:function(e,t,n){"use strict";var r=n(101199);t.Z=function(){var e=(0,r.useRef)(!1);return(0,r.useEffect)(function(){return e.current=!0,function(){e.current=!1}},[]),(0,r.useCallback)(function(){return e.current},[])}},328357:function(e,t,n){"use strict";let r;n.d(t,{Cj:function(){return eU},O1:function(){return e_},Zj:function(){return eX},LB:function(){return eA},g4:function(){return C},VK:function(){return F}});var i,l,o,u,a,c,s,f,d,h,p,g,v,C,w,m,b,y,x,L,E=n("101199"),O=n("890710"),M=n("775680");let R={display:"none"};function D(e){let{id:t,value:n}=e;return E.createElement("div",{id:t,style:R},n)}function H(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return E.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}let j=(0,E.createContext)(null),Z={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},S={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function k(e){let{announcements:t=S,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Z}=e,{announce:l,announcement:o}=function(){let[e,t]=(0,E.useState)("");return{announce:(0,E.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),u=(0,M.Ld)("DndLiveRegion"),[a,c]=(0,E.useState)(!1);if((0,E.useEffect)(()=>{c(!0)},[]),!function(e){let t=(0,E.useContext)(j);(0,E.useEffect)(()=>{if(!t)throw Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}((0,E.useMemo)(()=>({onDragStart(e){let{active:n}=e;l(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&l(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;l(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;l(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;l(t.onDragCancel({active:n,over:r}))}}),[l,t])),!a)return null;let s=E.createElement(E.Fragment,null,E.createElement(D,{id:r,value:i.draggable}),E.createElement(H,{id:u,announcement:o}));return n?(0,O.createPortal)(s,n):s}function T(){}(i=p||(p={})).DragStart="dragStart",i.DragMove="dragMove",i.DragEnd="dragEnd",i.DragCancel="dragCancel",i.DragOver="dragOver",i.RegisterDroppable="registerDroppable",i.SetDroppableDisabled="setDroppableDisabled",i.UnregisterDroppable="unregisterDroppable";let I=Object.freeze({x:0,y:0});function V(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}let P=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,l=n.get(r);if(l){let n=function(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height);if(r0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(V)};function B(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:I}let N=(l=1,function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r({...e,top:e.top+l*t.y,bottom:e.bottom+l*t.y,left:e.left+l*t.x,right:e.right+l*t.x}),{...e})});function A(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}let z={ignoreTransform:!1};function F(e,t){void 0===t&&(t=z);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=(0,M.Jj)(e).getComputedStyle(e);t&&(n=function(e,t,n){let r=A(t);if(!r)return e;let{scaleX:i,scaleY:l,x:o,y:u}=r,a=e.left-o-(1-i)*parseFloat(n),c=e.top-u-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),s=i?e.width/i:e.width,f=l?e.height/l:e.height;return{width:s,height:f,top:c,right:a+s,bottom:c+f,left:a}}(n,t,r))}let{top:r,left:i,width:l,height:o,bottom:u,right:a}=n;return{top:r,left:i,width:l,height:o,bottom:u,right:a}}function _(e){return F(e,{ignoreTransform:!0})}function U(e,t){let n=[];return e?function r(i){var l,o;if(null!=t&&n.length>=t||!i)return n;if((0,M.qk)(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!(0,M.Re)(i)||(0,M.vZ)(i)||n.includes(i))return n;let u=(0,M.Jj)(e).getComputedStyle(i);return(i!==e&&function(e,t){void 0===t&&(t=(0,M.Jj)(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{let r=t[e];return"string"==typeof r&&n.test(r)})}(i,u)&&n.push(i),l=i,void 0===(o=u)&&(o=(0,M.Jj)(l).getComputedStyle(l)),"fixed"===o.position)?n:r(i.parentNode)}(e):n}function W(e){let[t]=U(e,1);return null!=t?t:null}function X(e){return M.Nq&&e?(0,M.FJ)(e)?e:(0,M.UG)(e)?(0,M.qk)(e)||e===(0,M.r3)(e).scrollingElement?window:(0,M.Re)(e)?e:null:null:null}function J(e){return(0,M.FJ)(e)?e.scrollX:e.scrollLeft}function $(e){return(0,M.FJ)(e)?e.scrollY:e.scrollTop}function K(e){return{x:J(e),y:$(e)}}function G(e){return!!M.Nq&&!!e&&e===document.scrollingElement}function Y(e){let t={x:0,y:0},n=G(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,o=e.scrollTop>=r.y;return{isTop:i,isLeft:l,isBottom:o,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}(o=g||(g={}))[o.Forward=1]="Forward",o[o.Backward=-1]="Backward";let q={x:.2,y:.2};function Q(e){return e.reduce((e,t)=>(0,M.IH)(e,K(t)),I)}function ee(e,t){if(void 0===t&&(t=F),!e)return;let{top:n,left:r,bottom:i,right:l}=t(e);if(!!W(e))(i<=0||l<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}let et=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+J(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+$(t),0)}]];class en{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=U(t),r=Q(n);for(let[t,i,l]of(this.rect={...e},this.width=e.width,this.height=e.height,et))for(let e of i)Object.defineProperty(this,e,{get:()=>{let i=l(n),o=r[t]-i;return this.rect[e]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class er{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ei(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}function el(e){e.preventDefault()}function eo(e){e.stopPropagation()}(u=v||(v={})).Click="click",u.DragStart="dragstart",u.Keydown="keydown",u.ContextMenu="contextmenu",u.Resize="resize",u.SelectionChange="selectionchange",u.VisibilityChange="visibilitychange",(a=C||(C={})).Space="Space",a.Down="ArrowDown",a.Right="ArrowRight",a.Left="ArrowLeft",a.Up="ArrowUp",a.Esc="Escape",a.Enter="Enter",a.Tab="Tab";let eu={start:[C.Space,C.Enter],cancel:[C.Esc],end:[C.Space,C.Enter,C.Tab]},ea=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case C.Right:return{...n,x:n.x+25};case C.Left:return{...n,x:n.x-25};case C.Down:return{...n,y:n.y+25};case C.Up:return{...n,y:n.y-25}}};class ec{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new er((0,M.r3)(t)),this.windowListeners=new er((0,M.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(v.Resize,this.handleCancel),this.windowListeners.add(v.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(v.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&ee(n),t(I)}handleKeyDown(e){if((0,M.vd)(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=eu,coordinateGetter:l=ea,scrollBehavior:o="smooth"}=r,{code:u}=e;if(i.end.includes(u)){this.handleEnd(e);return}if(i.cancel.includes(u)){this.handleCancel(e);return}let{collisionRect:a}=n.current,c=a?{x:a.left,y:a.top}:I;!this.referenceCoordinates&&(this.referenceCoordinates=c);let s=l(e,{active:t,context:n.current,currentCoordinates:c});if(s){let t=(0,M.$X)(s,c),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:l,isRight:u,isLeft:a,isBottom:c,maxScroll:f,minScroll:d}=Y(n),h=function(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}(n),p={x:Math.min(i===C.Right?h.right-h.width/2:h.right,Math.max(i===C.Right?h.left:h.left+h.width/2,s.x)),y:Math.min(i===C.Down?h.bottom-h.height/2:h.bottom,Math.max(i===C.Down?h.top:h.top+h.height/2,s.y))},g=i===C.Right&&!u||i===C.Left&&!a,v=i===C.Down&&!c||i===C.Up&&!l;if(g&&p.x!==s.x){let e=n.scrollLeft+t.x,l=i===C.Right&&e<=f.x||i===C.Left&&e>=d.x;if(l&&!t.y){n.scrollTo({left:e,behavior:o});return}l?r.x=n.scrollLeft-e:r.x=i===C.Right?n.scrollLeft-f.x:n.scrollLeft-d.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(v&&p.y!==s.y){let e=n.scrollTop+t.y,l=i===C.Down&&e<=f.y||i===C.Up&&e>=d.y;if(l&&!t.x){n.scrollTo({top:e,behavior:o});return}l?r.y=n.scrollTop-e:r.y=i===C.Down?n.scrollTop-f.y:n.scrollTop-d.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,(0,M.IH)((0,M.$X)(s,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function es(e){return!!(e&&"distance"in e)}function ef(e){return!!(e&&"delay"in e)}ec.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=eu,onActivation:i}=t,{active:l}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=l.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class ed{constructor(e,t,n){var r;void 0===n&&(n=function(e){let{EventTarget:t}=(0,M.Jj)(e);return e instanceof t?e:(0,M.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:i}=e,{target:l}=i;this.props=e,this.events=t,this.document=(0,M.r3)(l),this.documentListeners=new er(this.document),this.listeners=new er(n),this.windowListeners=new er((0,M.Jj)(l)),this.initialCoordinates=null!=(r=(0,M.DC)(i))?r:I,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(v.Resize,this.handleCancel),this.windowListeners.add(v.DragStart,el),this.windowListeners.add(v.VisibilityChange,this.handleCancel),this.windowListeners.add(v.ContextMenu,el),this.documentListeners.add(v.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ef(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(es(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(v.Click,eo,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(v.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;let{activated:n,initialCoordinates:r,props:i}=this,{onMove:l,options:{activationConstraint:o}}=i;if(!r)return;let u=null!=(t=(0,M.DC)(e))?t:I,a=(0,M.$X)(r,u);if(!n&&o){if(es(o)){if(null!=o.tolerance&&ei(a,o.tolerance))return this.handleCancel();if(ei(a,o.distance))return this.handleStart()}return ef(o)&&ei(a,o.tolerance)?this.handleCancel():(this.handlePending(o,a),void 0)}e.cancelable&&e.preventDefault(),l(u)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),!this.activated&&e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),!this.activated&&e(this.props.active),t()}handleKeydown(e){e.code===C.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}let eh={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ep extends ed{constructor(e){let{event:t}=e;super(e,eh,(0,M.r3)(t.target))}}ep.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!!n.isPrimary&&0===n.button&&(null==r||r({event:n}),!0)}}];let eg={move:{name:"mousemove"},end:{name:"mouseup"}};(c=w||(w={}))[c.RightClick=2]="RightClick";let ev={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};(s=m||(m={}))[s.Pointer=0]="Pointer",s[s.DraggableRect=1]="DraggableRect",(f=b||(b={}))[f.TreeOrder=0]="TreeOrder",f[f.ReversedTreeOrder=1]="ReversedTreeOrder";let eC={x:{[g.Backward]:!1,[g.Forward]:!1},y:{[g.Backward]:!1,[g.Forward]:!1}};(d=y||(y={}))[d.Always=0]="Always",d[d.BeforeDragging=1]="BeforeDragging",d[d.WhileDragging=2]="WhileDragging",(x||(x={})).Optimized="optimized";let ew=new Map;function em(e,t){return(0,M.Gj)(n=>e?n?n:"function"==typeof t?t(e):e:null,[t,e])}function eb(e){let{callback:t,disabled:n}=e,r=(0,M.zX)(t),i=(0,E.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,E.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}function ey(e){return new en(F(e),e)}function ex(e,t,n){void 0===t&&(t=ey);let[r,i]=(0,E.useState)(null);function l(){i(r=>{if(!e)return null;if(!1===e.isConnected){var i;return null!=(i=null!=r?r:n)?i:null}let l=t(e);return JSON.stringify(r)===JSON.stringify(l)?r:l})}let o=function(e){let{callback:t,disabled:n}=e,r=(0,M.zX)(t),i=(0,E.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,E.useEffect)(()=>()=>null==i?void 0:i.disconnect(),[i]),i}({callback(t){if(!!e)for(let n of t){let{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){l();break}}}}),u=eb({callback:l});return(0,M.LI)(()=>{l(),e?(null==u||u.observe(e),null==o||o.observe(document.body,{childList:!0,subtree:!0})):(null==u||u.disconnect(),null==o||o.disconnect())},[e]),r}let eL=[];function eE(e,t){void 0===t&&(t=[]);let n=(0,E.useRef)(null);return(0,E.useEffect)(()=>{n.current=null},t),(0,E.useEffect)(()=>{let t=e!==I;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?(0,M.$X)(e,n.current):I}function eO(e){return(0,E.useMemo)(()=>e?function(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}let eM=[];function eR(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return(0,M.Re)(t)?t:e}let eD=[{sensor:ep,options:{}},{sensor:ec,options:{}}],eH={current:{}},ej={draggable:{measure:_},droppable:{measure:_,strategy:y.WhileDragging,frequency:x.Optimized},dragOverlay:{measure:F}};class eZ extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}let eS={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new eZ,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:T},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ej,measureDroppableContainers:T,windowRect:null,measuringScheduled:!1},ek={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:T,draggableNodes:new Map,over:null,measureDroppableContainers:T},eT=(0,E.createContext)(ek),eI=(0,E.createContext)(eS);function eV(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new eZ}}}function eP(e,t){switch(t.type){case p.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case p.DragMove:if(null==e.draggable.active)return e;return{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case p.DragEnd:case p.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case p.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new eZ(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case p.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,l=e.droppable.containers.get(n);if(!l||r!==l.key)return e;let o=new eZ(e.droppable.containers);return o.set(n,{...l,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case p.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let l=new eZ(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function eB(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,E.useContext)(eT),l=(0,M.D9)(r),o=(0,M.D9)(null==n?void 0:n.id);return(0,E.useEffect)(()=>{if(!t){if(!r&&l&&null!=o){if(!(0,M.vd)(l)||document.activeElement===l.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=(0,M.so)(e);if(t){t.focus();break}}})}}},[r,t,i,o,l]),null}let eN=(0,E.createContext)({...I,scaleX:1,scaleY:1});(h=L||(L={}))[h.Uninitialized=0]="Uninitialized",h[h.Initializing=1]="Initializing",h[h.Initialized=2]="Initialized";let eA=(0,E.memo)(function(e){var t,n,r,i,l,o,u,a,c,s,f;let{id:d,accessibility:h,autoScroll:v=!0,children:C,sensors:w=eD,collisionDetection:x=P,measuring:R,modifiers:D,...H}=e,[Z,S]=(0,E.useReducer)(eP,void 0,eV),[T,V]=function(){let[e]=(0,E.useState)(()=>new Set),t=(0,E.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,E.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[A,z]=(0,E.useState)(L.Uninitialized),_=A===L.Initialized,{draggable:{active:J,nodes:$,translate:ee},droppable:{containers:et}}=Z,er=null!=J?$.get(J):null,ei=(0,E.useRef)({initial:null,translated:null}),el=(0,E.useMemo)(()=>{var e;return null!=J?{id:J,data:null!=(e=null==er?void 0:er.data)?e:eH,rect:ei}:null},[J,er]),eo=(0,E.useRef)(null),[eu,ea]=(0,E.useState)(null),[ec,es]=(0,E.useState)(null),ef=(0,M.Ey)(H,Object.values(H)),ed=(0,M.Ld)("DndDescribedBy",d),eh=(0,E.useMemo)(()=>et.getEnabled(),[et]);let ep=(l=R,(0,E.useMemo)(()=>({draggable:{...ej.draggable,...null==l?void 0:l.draggable},droppable:{...ej.droppable,...null==l?void 0:l.droppable},dragOverlay:{...ej.dragOverlay,...null==l?void 0:l.dragOverlay}}),[null==l?void 0:l.draggable,null==l?void 0:l.droppable,null==l?void 0:l.dragOverlay])),{droppableRects:eg,measureDroppableContainers:ev,measuringScheduled:ey}=function(e,t){let{dragging:n,dependencies:r,config:i}=t,[l,o]=(0,E.useState)(null),{frequency:u,measure:a,strategy:c}=i,s=(0,E.useRef)(e),f=function(){switch(c){case y.Always:return!1;case y.BeforeDragging:return n;default:return!n}}(),d=(0,M.Ey)(f),h=(0,E.useCallback)(function(e){if(void 0===e&&(e=[]),!d.current)o(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[d]),p=(0,E.useRef)(null),g=(0,M.Gj)(t=>{if(f&&!n)return ew;if(!t||t===ew||s.current!==e||null!=l){let t=new Map;for(let n of e){if(!n)continue;if(l&&l.length>0&&!l.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new en(a(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,l,n,f,a]);return(0,E.useEffect)(()=>{s.current=e},[e]),(0,E.useEffect)(()=>{if(!f)h()},[n,f]),(0,E.useEffect)(()=>{l&&l.length>0&&o(null)},[JSON.stringify(l)]),(0,E.useEffect)(()=>{if(!f&&"number"==typeof u&&null===p.current)p.current=setTimeout(()=>{h(),p.current=null},u)},[u,f,h,...r]),{droppableRects:g,measureDroppableContainers:h,measuringScheduled:null!=l}}(eh,{dragging:_,dependencies:[ee.x,ee.y],config:ep.droppable}),eZ=function(e,t){let n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return(0,M.Gj)(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}($,J),eS=(0,E.useMemo)(()=>ec?(0,M.DC)(ec):null,[ec]),ek=function(){let e=(null==eu?void 0:eu.autoScrollEnabled)===!1,t="object"==typeof v?!1===v.enabled:!1===v,n=_&&!e&&!t;return"object"==typeof v?{...v,enabled:n}:{enabled:n}}(),eA=em(eZ,ep.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,l=(0,E.useRef)(!1),{x:o,y:u}="boolean"==typeof i?{x:i,y:i}:i;(0,M.LI)(()=>{if(!o&&!u||!t){l.current=!1;return}if(l.current||!r)return;let e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;let i=B(n(e),r);if(!o&&(i.x=0),!u&&(i.y=0),l.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=W(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,u,r,n])}({activeNode:null!=J?$.get(J):null,config:ek.layoutShiftCompensation,initialRect:eA,measure:ep.draggable.measure});let ez=ex(eZ,ep.draggable.measure,eA),eF=ex(eZ?eZ.parentElement:null),e_=(0,E.useRef)({activatorEvent:null,active:null,activeNode:eZ,collisionRect:null,collisions:null,droppableRects:eg,draggableNodes:$,draggingNode:null,draggingNodeRect:null,droppableContainers:et,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),eU=et.getNodeFor(null==(t=e_.current.over)?void 0:t.id),eW=function(e){let{measure:t}=e,[n,r]=(0,E.useState)(null),i=eb({callback:(0,E.useCallback)(e=>{for(let{target:n}of e)if((0,M.Re)(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),l=(0,E.useCallback)(e=>{let n=eR(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)},[t,i]),[o,u]=(0,M.wm)(l);return(0,E.useMemo)(()=>({nodeRef:o,rect:n,setRef:u}),[n,o,u])}({measure:ep.dragOverlay.measure}),eX=null!=(n=eW.nodeRef.current)?n:eZ,eJ=_?null!=(r=eW.rect)?r:ez:null,e$=!!(eW.nodeRef.current&&eW.rect),eK=function(e){let t=em(e);return B(e,t)}(e$?null:ez),eG=eO(eX?(0,M.Jj)(eX):null),eY=function(e){let t=(0,E.useRef)(e),n=(0,M.Gj)(n=>e?n&&n!==eL&&e&&t.current&&e.parentNode===t.current.parentNode?n:U(e):eL,[e]);return(0,E.useEffect)(()=>{t.current=e},[e]),n}(_?null!=eU?eU:eZ:null),eq=function(e,t){void 0===t&&(t=F);let[n]=e,r=eO(n?(0,M.Jj)(n):null),[i,l]=(0,E.useState)(eM);function o(){l(()=>e.length?e.map(e=>G(e)?r:new en(t(e),e)):eM)}let u=eb({callback:o});return(0,M.LI)(()=>{null==u||u.disconnect(),o(),e.forEach(e=>null==u?void 0:u.observe(e))},[e]),i}(eY),eQ=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(D,{transform:{x:ee.x-eK.x,y:ee.y-eK.y,scaleX:1,scaleY:1},activatorEvent:ec,active:el,activeNodeRect:ez,containerNodeRect:eF,draggingNodeRect:eJ,over:e_.current.over,overlayNodeRect:eW.rect,scrollableAncestors:eY,scrollableAncestorRects:eq,windowRect:eG}),e1=eS?(0,M.IH)(eS,ee):null,e0=function(e){let[t,n]=(0,E.useState)(null),r=(0,E.useRef)(e),i=(0,E.useCallback)(e=>{let t=X(e.target);if(!!t)n(e=>e?(e.set(t,K(t)),new Map(e)):null)},[]);return(0,E.useEffect)(()=>{let t=r.current;if(e!==t){l(t);let o=e.map(e=>{let t=X(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,K(t)]):null}).filter(e=>null!=e);n(o.length?new Map(o):null),r.current=e}return()=>{l(e),l(t)};function l(e){e.forEach(e=>{let t=X(e);null==t||t.removeEventListener("scroll",i)})}},[i,e]),(0,E.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>(0,M.IH)(e,t),I):Q(e):I,[e,t])}(eY),e5=eE(e0),e2=eE(e0,[ez]),e3=(0,M.IH)(eQ,e5),e6=eJ?N(eJ,eQ):null,e4=el&&e6?x({active:el,collisionRect:e6,droppableRects:eg,droppableContainers:eh,pointerCoordinates:e1}):null,e9=function(e,t){if(!e||0===e.length)return null;let[n]=e;return 0,n[t]}(e4,"id"),[e7,e8]=(0,E.useState)(null);let te=(o=e$?eQ:(0,M.IH)(eQ,e2),u=null!=(i=null==e7?void 0:e7.rect)?i:null,a=ez,{...o,scaleX:u&&a?u.width/a.width:1,scaleY:u&&a?u.height/a.height:1}),tt=(0,E.useRef)(null),tn=(0,E.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==eo.current)return;let i=$.get(eo.current);if(!i)return;let l=e.nativeEvent,o=new n({active:eo.current,activeNode:i,event:l,options:r,context:e_,onAbort(e){if(!$.get(e))return;let{onDragAbort:t}=ef.current,n={id:e};null==t||t(n),T({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!$.get(e))return;let{onDragPending:i}=ef.current,l={id:e,constraint:t,initialCoordinates:n,offset:r};null==i||i(l),T({type:"onDragPending",event:l})},onStart(e){let t=eo.current;if(null==t)return;let n=$.get(t);if(!n)return;let{onDragStart:r}=ef.current,i={activatorEvent:l,active:{id:t,data:n.data,rect:ei}};(0,O.unstable_batchedUpdates)(()=>{null==r||r(i),z(L.Initializing),S({type:p.DragStart,initialCoordinates:e,active:t}),T({type:"onDragStart",event:i}),ea(tt.current),es(l)})},onMove(e){S({type:p.DragMove,coordinates:e})},onEnd:u(p.DragEnd),onCancel:u(p.DragCancel)});function u(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=e_.current,o=null;if(t&&i){let{cancelDrop:u}=ef.current;o={activatorEvent:l,active:t,collisions:n,delta:i,over:r},e===p.DragEnd&&"function"==typeof u&&await Promise.resolve(u(o))&&(e=p.DragCancel)}eo.current=null,(0,O.unstable_batchedUpdates)(()=>{S({type:e}),z(L.Uninitialized),e8(null),ea(null),es(null),tt.current=null;let t=e===p.DragEnd?"onDragEnd":"onDragCancel";if(o){let e=ef.current[t];null==e||e(o),T({type:t,event:o})}})}}tt.current=o},[$]),tr=(0,E.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,l=$.get(r);if(null===eo.current&&!!l&&!i.dndKit&&!i.defaultPrevented)!0===e(n,t.options,{active:l})&&(i.dndKit={capturedBy:t.sensor},eo.current=r,tn(n,t))},[$,tn]);let ti=(c=w,s=tr,(0,E.useMemo)(()=>c.reduce((e,t)=>{let{sensor:n}=t;return[...e,...n.activators.map(e=>({eventName:e.eventName,handler:s(e.handler,t)}))]},[]),[c,s]));f=w,(0,E.useEffect)(()=>{if(!M.Nq)return;let e=f.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(let t of e)null==t||t()}},f.map(e=>{let{sensor:t}=e;return t})),(0,M.LI)(()=>{ez&&A===L.Initializing&&z(L.Initialized)},[ez,A]),(0,E.useEffect)(()=>{let{onDragMove:e}=ef.current,{active:t,activatorEvent:n,collisions:r,over:i}=e_.current;if(!t||!n)return;let l={active:t,activatorEvent:n,collisions:r,delta:{x:e3.x,y:e3.y},over:i};(0,O.unstable_batchedUpdates)(()=>{null==e||e(l),T({type:"onDragMove",event:l})})},[e3.x,e3.y]),(0,E.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=e_.current;if(!e||null==eo.current||!t||!i)return;let{onDragOver:l}=ef.current,o=r.get(e9),u=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,a={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:u};(0,O.unstable_batchedUpdates)(()=>{e8(u),null==l||l(a),T({type:"onDragOver",event:a})})},[e9]),(0,M.LI)(()=>{e_.current={activatorEvent:ec,active:el,activeNode:eZ,collisionRect:e6,collisions:e4,droppableRects:eg,draggableNodes:$,draggingNode:eX,draggingNodeRect:eJ,droppableContainers:et,over:e7,scrollableAncestors:eY,scrollAdjustedTranslate:e3},ei.current={initial:eJ,translated:e6}},[el,eZ,e4,e6,$,eX,eJ,eg,et,e7,eY,e3]),!function(e){let{acceleration:t,activator:n=m.Pointer,canScroll:r,draggingRect:i,enabled:l,interval:o=5,order:u=b.TreeOrder,pointerCoordinates:a,scrollableAncestors:c,scrollableAncestorRects:s,delta:f,threshold:d}=e,h=function(e){let{delta:t,disabled:n}=e,r=(0,M.D9)(t);return(0,M.Gj)(e=>{if(n||!r||!e)return eC;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[g.Backward]:e.x[g.Backward]||-1===i.x,[g.Forward]:e.x[g.Forward]||1===i.x},y:{[g.Backward]:e.y[g.Backward]||-1===i.y,[g.Forward]:e.y[g.Forward]||1===i.y}}},[n,t,r])}({delta:f,disabled:!l}),[p,v]=(0,M.Yz)(),C=(0,E.useRef)({x:0,y:0}),w=(0,E.useRef)({x:0,y:0}),y=(0,E.useMemo)(()=>{switch(n){case m.Pointer:return a?{top:a.y,bottom:a.y,left:a.x,right:a.x}:null;case m.DraggableRect:return i}},[n,i,a]),x=(0,E.useRef)(null),L=(0,E.useCallback)(()=>{let e=x.current;if(!e)return;let t=C.current.x*w.current.x,n=C.current.y*w.current.y;e.scrollBy(t,n)},[]),O=(0,E.useMemo)(()=>u===b.TreeOrder?[...c].reverse():c,[u,c]);(0,E.useEffect)(()=>{if(!l||!c.length||!y){v();return}for(let e of O){if((null==r?void 0:r(e))===!1)continue;let n=s[c.indexOf(e)];if(!n)continue;let{direction:i,speed:l}=function(e,t,n,r,i){let{top:l,left:o,right:u,bottom:a}=n;void 0===r&&(r=10),void 0===i&&(i=q);let{isTop:c,isBottom:s,isLeft:f,isRight:d}=Y(e),h={x:0,y:0},p={x:0,y:0},v={height:t.height*i.y,width:t.width*i.x};return!c&&l<=t.top+v.height?(h.y=g.Backward,p.y=r*Math.abs((t.top+v.height-l)/v.height)):!s&&a>=t.bottom-v.height&&(h.y=g.Forward,p.y=r*Math.abs((t.bottom-v.height-a)/v.height)),!d&&u>=t.right-v.width?(h.x=g.Forward,p.x=r*Math.abs((t.right-v.width-u)/v.width)):!f&&o<=t.left+v.width&&(h.x=g.Backward,p.x=r*Math.abs((t.left+v.width-o)/v.width)),{direction:h,speed:p}}(e,n,y,t,d);for(let e of["x","y"])!h[e][i[e]]&&(l[e]=0,i[e]=0);if(l.x>0||l.y>0){v(),x.current=e,p(L,o),C.current=l,w.current=i;return}}C.current={x:0,y:0},w.current={x:0,y:0},v()},[t,L,r,v,l,o,JSON.stringify(y),JSON.stringify(h),p,c,O,s,JSON.stringify(d)])}({...ek,delta:ee,draggingRect:e6,pointerCoordinates:e1,scrollableAncestors:eY,scrollableAncestorRects:eq});let tl=(0,E.useMemo)(()=>({active:el,activeNode:eZ,activeNodeRect:ez,activatorEvent:ec,collisions:e4,containerNodeRect:eF,dragOverlay:eW,draggableNodes:$,droppableContainers:et,droppableRects:eg,over:e7,measureDroppableContainers:ev,scrollableAncestors:eY,scrollableAncestorRects:eq,measuringConfiguration:ep,measuringScheduled:ey,windowRect:eG}),[el,eZ,ez,ec,e4,eF,eW,$,et,eg,e7,ev,eY,eq,ep,ey,eG]),to=(0,E.useMemo)(()=>({activatorEvent:ec,activators:ti,active:el,activeNodeRect:ez,ariaDescribedById:{draggable:ed},dispatch:S,draggableNodes:$,over:e7,measureDroppableContainers:ev}),[ec,ti,el,ez,S,ed,$,e7,ev]);return E.createElement(j.Provider,{value:V},E.createElement(eT.Provider,{value:to},E.createElement(eI.Provider,{value:tl},E.createElement(eN.Provider,{value:te},C)),E.createElement(eB,{disabled:(null==h?void 0:h.restoreFocus)===!1})),E.createElement(k,{...h,hiddenTextDescribedById:ed}))}),ez=(0,E.createContext)(null),eF="button";function e_(e){var t,n;let{id:r,data:i,disabled:l=!1,attributes:o}=e,u=(0,M.Ld)("Draggable"),{activators:a,activatorEvent:c,active:s,activeNodeRect:f,ariaDescribedById:d,draggableNodes:h,over:p}=(0,E.useContext)(eT),{role:g=eF,roleDescription:v="draggable",tabIndex:C=0}=null!=o?o:{},w=(null==s?void 0:s.id)===r,m=(0,E.useContext)(w?eN:ez),[b,y]=(0,M.wm)(),[x,L]=(0,M.wm)();let O=(t=a,n=r,(0,E.useMemo)(()=>t.reduce((e,t)=>{let{eventName:r,handler:i}=t;return e[r]=e=>{i(e,n)},e},{}),[t,n])),R=(0,M.Ey)(i);return(0,M.LI)(()=>(h.set(r,{id:r,key:u,node:b,activatorNode:x,data:R}),()=>{let e=h.get(r);e&&e.key===u&&h.delete(r)}),[h,r]),{active:s,activatorEvent:c,activeNodeRect:f,attributes:(0,E.useMemo)(()=>({role:g,tabIndex:C,"aria-disabled":l,"aria-pressed":!!w&&g===eF||void 0,"aria-roledescription":v,"aria-describedby":d.draggable}),[l,g,C,w,v,d.draggable]),isDragging:w,listeners:l?void 0:O,node:b,over:p,setNodeRef:y,setActivatorNodeRef:L,transform:m}}function eU(){return(0,E.useContext)(eI)}let eW={timeout:25};function eX(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,l=(0,M.Ld)("Droppable"),{active:o,dispatch:u,over:a,measureDroppableContainers:c}=(0,E.useContext)(eT),s=(0,E.useRef)({disabled:n}),f=(0,E.useRef)(!1),d=(0,E.useRef)(null),h=(0,E.useRef)(null),{disabled:g,updateMeasurementsFor:v,timeout:C}={...eW,...i},w=(0,M.Ey)(null!=v?v:r),m=eb({callback:(0,E.useCallback)(()=>{if(!f.current){f.current=!0;return}null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(w.current)?w.current:[w.current]),h.current=null},C)},[C]),disabled:g||!o}),b=(0,E.useCallback)((e,t)=>{if(!!m)t&&(m.unobserve(t),f.current=!1),e&&m.observe(e)},[m]),[y,x]=(0,M.wm)(b),L=(0,M.Ey)(t);return(0,E.useEffect)(()=>{if(!!m&&!!y.current)m.disconnect(),f.current=!1,m.observe(y.current)},[y,m]),(0,E.useEffect)(()=>(u({type:p.RegisterDroppable,element:{id:r,key:l,disabled:n,node:y,rect:d,data:L}}),()=>u({type:p.UnregisterDroppable,key:l,id:r})),[r]),(0,E.useEffect)(()=>{n!==s.current.disabled&&(u({type:p.SetDroppableDisabled,id:r,key:l,disabled:n}),s.current.disabled=n)},[r,l,n,u]),{active:o,rect:d,isOver:(null==a?void 0:a.id)===r,node:y,over:a,setNodeRef:x}}let eJ={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:M.ux.Transform.toString(t)},{transform:M.ux.Transform.toString(n)}]},sideEffects:(r={styles:{active:{opacity:"0"}}},e=>{let{active:t,dragOverlay:n}=e,i={},{styles:l,className:o}=r;if(null!=l&&l.active)for(let[e,n]of Object.entries(l.active)){if(void 0!==n)i[e]=t.node.style.getPropertyValue(e),t.node.style.setProperty(e,n)}if(null!=l&&l.dragOverlay)for(let[e,t]of Object.entries(l.dragOverlay)){if(void 0!==t)n.node.style.setProperty(e,t)}return null!=o&&o.active&&t.node.classList.add(o.active),null!=o&&o.dragOverlay&&n.node.classList.add(o.dragOverlay),function(){for(let[e,n]of Object.entries(i))t.node.style.setProperty(e,n);null!=o&&o.active&&t.node.classList.remove(o.active)}})},e$=0},502656:function(e,t,n){"use strict";n.d(t,{lv:function(){return r}}),n(775680);let r=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e,i=r[0];return t&&i?function(e,t,n){let r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}(n,t,i):n}},398748:function(e,t,n){"use strict";n.d(t,{Fo:function(){return f},Rp:function(){return o},nB:function(){return w}});var r=n(101199),i=n(328357),l=n(775680);function o(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function u(e){return null!==e&&e>=0}let a=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,l=o(t,r,n),u=t[i],a=l[i];return a&&u?{x:a.left-u.left,y:a.top-u.top,scaleX:a.width/u.width,scaleY:a.height/u.height}:null},c="Sortable",s=r.createContext({activeIndex:-1,containerId:c,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:a,disabled:{draggable:!1,droppable:!1}});function f(e){var t;let{children:n,id:o,items:u,strategy:f=a,disabled:d=!1}=e,{active:h,dragOverlay:p,droppableRects:g,over:v,measureDroppableContainers:C}=(0,i.Cj)(),w=(0,l.Ld)(c,o),m=null!==p.rect,b=(0,r.useMemo)(()=>u.map(e=>"object"==typeof e&&"id"in e?e.id:e),[u]),y=null!=h,x=h?b.indexOf(h.id):-1,L=v?b.indexOf(v.id):-1,E=(0,r.useRef)(b),O=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{O&&y&&C(b)},[O,b,y,C]),(0,r.useEffect)(()=>{E.current=b},[b]);let D=(0,r.useMemo)(()=>{var e,t;return{activeIndex:x,containerId:w,disabled:R,disableTransforms:M,items:b,overIndex:L,useDragOverlay:m,sortedRects:(e=b,t=g,e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))),strategy:f}},[x,w,R.draggable,R.droppable,M,b,L,g,m,f]);return r.createElement(s.Provider,{value:D},n)}let d=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return o(n,r,i).indexOf(t)},h=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:l,newIndex:o,previousItems:u,previousContainerId:a,transition:c}=e;return!!c&&!!r&&(u===l||i!==o)&&(!!n||o!==i&&t===a)},p={duration:200,easing:"ease"},g="transform",v=l.ux.Transition.toString({property:g,duration:0,easing:"linear"}),C={roleDescription:"sortable"};function w(e){let{animateLayoutChanges:t=h,attributes:n,disabled:o,data:a,getNewIndex:c=d,id:f,strategy:w,resizeObserverConfig:m,transition:b=p}=e,{items:y,containerId:x,activeIndex:L,disabled:E,disableTransforms:O,sortedRects:M,overIndex:R,useDragOverlay:D,strategy:H}=(0,r.useContext)(s),j=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(o,E),Z=y.indexOf(f),S=(0,r.useMemo)(()=>({sortable:{containerId:x,index:Z,items:y},...a}),[x,a,Z,y]),k=(0,r.useMemo)(()=>y.slice(y.indexOf(f)),[y,f]),{rect:T,node:I,isOver:V,setNodeRef:P}=(0,i.Zj)({id:f,data:S,disabled:j.droppable,resizeObserverConfig:{updateMeasurementsFor:k,...m}}),{active:B,activatorEvent:N,activeNodeRect:A,attributes:z,setNodeRef:F,listeners:_,isDragging:U,over:W,setActivatorNodeRef:X,transform:J}=(0,i.O1)({id:f,data:S,attributes:{...C,...n},disabled:j.draggable}),$=(0,l.HB)(P,F),K=!!B,G=K&&!O&&u(L)&&u(R),Y=!D&&U,q=Y&&G?J:null,Q=G?null!=q?q:(null!=w?w:H)({rects:M,activeNodeRect:A,activeIndex:L,overIndex:R,index:Z}):null,ee=u(L)&&u(R)?c({id:f,items:y,activeIndex:L,overIndex:R}):Z,et=null==B?void 0:B.id,en=(0,r.useRef)({activeId:et,items:y,newIndex:ee,containerId:x}),er=y!==en.current.items,ei=t({active:B,containerId:x,isDragging:U,isSorting:K,id:f,index:Z,items:y,newIndex:en.current.newIndex,previousItems:en.current.items,previousContainerId:en.current.containerId,transition:b,wasDragging:null!=en.current.activeId}),el=function(e){let{disabled:t,index:n,node:o,rect:u}=e,[a,c]=(0,r.useState)(null),s=(0,r.useRef)(n);return(0,l.LI)(()=>{if(!t&&n!==s.current&&o.current){let e=u.current;if(e){let t=(0,i.VK)(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==s.current&&(s.current=n)},[t,n,o,u]),(0,r.useEffect)(()=>{a&&c(null)},[a]),a}({disabled:!ei,index:Z,node:I,rect:T});return(0,r.useEffect)(()=>{K&&en.current.newIndex!==ee&&(en.current.newIndex=ee),x!==en.current.containerId&&(en.current.containerId=x),y!==en.current.items&&(en.current.items=y)},[K,ee,x,y]),(0,r.useEffect)(()=>{if(et===en.current.activeId)return;if(null!=et&&null==en.current.activeId){en.current.activeId=et;return}let e=setTimeout(()=>{en.current.activeId=et},50);return()=>clearTimeout(e)},[et]),{active:B,activeIndex:L,attributes:z,data:S,rect:T,index:Z,newIndex:ee,items:y,isOver:V,isSorting:K,isDragging:U,listeners:_,node:I,overIndex:R,over:W,setNodeRef:$,setActivatorNodeRef:X,setDroppableNodeRef:P,setDraggableNodeRef:F,transform:null!=el?el:Q,transition:function(){return el||er&&en.current.newIndex===Z?v:(!Y||(0,l.vd)(N))&&b?K||ei?l.ux.Transition.toString({...b,property:g}):void 0:void 0}()}}i.g4.Down,i.g4.Right,i.g4.Up,i.g4.Left},775680:function(e,t,n){"use strict";n.d(t,{$X:function(){return E},D9:function(){return m},DC:function(){return M},Ey:function(){return v},FJ:function(){return o},Gj:function(){return C},HB:function(){return i},IH:function(){return L},Jj:function(){return a},LI:function(){return h},Ld:function(){return y},Nq:function(){return l},Re:function(){return s},UG:function(){return u},Yz:function(){return g},qk:function(){return c},r3:function(){return d},so:function(){return H},ux:function(){return R},vZ:function(){return f},vd:function(){return O},wm:function(){return w},zX:function(){return p}});var r=n(101199);function i(){for(var e=arguments.length,t=Array(e),n=0;ne=>{t.forEach(t=>t(e))},t)}let l="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function o(e){let t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function u(e){return"nodeType"in e}function a(e){var t,n;return e?o(e)?e:u(e)?null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window:window}function c(e){let{Document:t}=a(e);return e instanceof t}function s(e){return!o(e)&&e instanceof a(e).HTMLElement}function f(e){return e instanceof a(e).SVGElement}function d(e){return e?o(e)?e.document:u(e)?c(e)?e:s(e)||f(e)?e.ownerDocument:document:document:document}let h=l?r.useLayoutEffect:r.useEffect;function p(e){let t=(0,r.useRef)(e);return h(()=>{t.current=e}),(0,r.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r{e.current=setInterval(t,n)},[]);return[t,(0,r.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function v(e,t){void 0===t&&(t=[e]);let n=(0,r.useRef)(e);return h(()=>{n.current!==e&&(n.current=e)},t),n}function C(e,t){let n=(0,r.useRef)();return(0,r.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function w(e){let t=p(e),n=(0,r.useRef)(null),i=(0,r.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,i]}function m(e){let t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current}let b={};function y(e,t){return(0,r.useMemo)(()=>{if(t)return t;let n=null==b[e]?0:b[e]+1;return b[e]=n,e+"-"+n},[e,t])}function x(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i{for(let[r,i]of Object.entries(n)){let n=t[r];null!=n&&(t[r]=n+e*i)}return t},{...t})}}let L=x(1),E=x(-1);function O(e){if(!e)return!1;let{KeyboardEvent:t}=a(e.target);return t&&e instanceof t}function M(e){var t;if(function(e){if(!e)return!1;let{TouchEvent:t}=a(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return"clientX"in(t=e)&&"clientY"in t?{x:e.clientX,y:e.clientY}:null}let R=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(!!e)return[R.Translate.toString(e),R.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),D="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function H(e){return e.matches(D)?e:e.querySelector(D)}},50855:function(e,t,n){"use strict";n.d(t,{O:function(){return h}});var r=n(320165),i=n(101199),l=n(469935),o=n.n(l),u=n(418312),a=n(959360),c=n(651928),s=n(122061),f=n(51262);function d(e){for(var t=1;t{let{player:t,uiLayout:n,renderMicSeat:l,uiLayoutConfig:h,linkerList:p=[],playerType:g=c.$R.xg,layoutCalculateType:v=c.NT.horizontal,containerClassName:C,contentClassName:w,adjustPlayerPosition:m=!0,children:b,regionClassName:y}=e,x=(0,a.O)(t,g);(0,i.useEffect)(()=>{if(!!m){if(u.w1.includes(v)){let{h:e,y:n}=(0,s.tD)(h);t.position({y:n,h:e})}else t.position({y:0,h:1});return()=>{m&&t.position({y:0,h:1})}}},[t,h,v,m]);let L=(0,i.useMemo)(()=>(0,s.fG)(h,v,x),[v,h,x]);return(0,r.jsx)(r.Fragment,{children:n&&h?(0,r.jsx)("div",{className:o()(f.Z.dynamicLayoutContainer,C),children:(0,r.jsxs)("div",{className:o()(w),style:d({},L),children:[(()=>{if(!h||!(null==p?void 0:p.length))return null;let{regions:e}=h,t=(0,s.B9)(n,e,p);return null==t?void 0:t.map((e,i)=>{let{p:u}=e,a=(0,s.ue)(h,e),f=(0,s.XZ)(n,h,e,t),g=p.find(e=>e.p===u)||{p:u,linkType:c.Zd.PLACEHOLDER};return(0,r.jsx)("div",{style:d({},a,f),className:o()(y),children:l&&l(i,g)},i)})})(),b||null]})}):null})}},51262:function(e,t,n){"use strict";n(910461),t.Z={dynamicLayoutContainer:"dynamicLayoutContainer_77b13"}},418312:function(e,t,n){"use strict";n.d(t,{AO:function(){return o},Fq:function(){return u},Hd:function(){return i},Ro:function(){return c},w1:function(){return a}});var r,i,l=n(651928);let o={CUSTOM_CSS_FULLSCREEN_CHANGE:"PREVIEW_ENTERROOM_CSS_FULL",FULLSCREEN_CHANGE:"fullscreen_change",VIDEO_RESIZE:"video_resize"},u={CUSTOM_CSS_FULLSCREEN_CHANGE:"PREVIEW_ENTERROOM_CSS_FULL",FULLSCREEN_CHANGE:"fullscreenchange",VIDEO_RESIZE:"video_resize"},a=[l.NT.horizontal],c=16/9;(r=i||(i={}))[r.VideoChat_DynamicLayout1V6=7]="VideoChat_DynamicLayout1V6",r[r.LinkMicUiLayout_Live_Partner_Dynamic=25]="LinkMicUiLayout_Live_Partner_Dynamic"},959360:function(e,t,n){"use strict";n.d(t,{O:function(){return o}});var r=n(101199),i=n(418312),l=n(651928);let o=(e,t)=>{let[n,o]=(0,r.useState)(i.Ro),u=r.useRef(),a=(0,r.useCallback)(()=>{var t,n;let r=null==e?void 0:null===(t=e.root)||void 0===t?void 0:t.clientWidth,l=null==e?void 0:null===(n=e.root)||void 0===n?void 0:n.clientHeight;return r&&l?r/l:i.Ro},[]),c=r.useCallback(()=>{clearTimeout(u.current),u.current=setTimeout(()=>{o(a())},50)},[]),s=(0,r.useMemo)(()=>t===l.$R.xg?Object.values(i.AO):Object.values(i.Fq),[t]);(0,r.useEffect)(()=>(s.forEach(t=>{null==e||e.on(t,c)}),()=>{s.forEach(t=>{null==e||e.off(t,c)})}),[e,s,c]);let f=r.useCallback(()=>{c()},[]);return r.useEffect(()=>(window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}),[]),r.useEffect(()=>{c()},[]),n}},651928:function(e,t,n){"use strict";var r,i,l,o,u,a;n.d(t,{$R:function(){return i},NT:function(){return l},Zd:function(){return r}}),(o=r||(r={}))[o.PLACEHOLDER=-1]="PLACEHOLDER",o[o.VIDEO=1]="VIDEO",o[o.AUDIO=2]="AUDIO",(u=i||(i={}))[u.xg=1]="xg",u[u.ies=2]="ies",(a=l||(l={}))[a.horizontal=1]="horizontal",a[a.portrait=2]="portrait"},122061:function(e,t,n){"use strict";n.d(t,{B9:function(){return c},XZ:function(){return f},fG:function(){return a},tD:function(){return l},ue:function(){return s}});var r=n(418312),i=n(651928);let l=e=>{let{canvas:t,content:n}=e,r=t.h;return{h:n.h/r,y:n.y/r}},o=(e,t=!0)=>`${(100*e).toFixed(4)}${t?"%":""}`,u=e=>{let{content:t}=e,n=t.h*r.Ro;return t.w/n},a=(e,t,n)=>{if(!e)return{};if(t===i.NT.portrait){let t=o(e.content.w/e.canvas.w),n=o(e.content.h/e.canvas.h),r=o(e.content.y/e.canvas.h);return{position:"absolute",width:t,height:n,top:r,left:o(e.content.x/e.canvas.w)}}if(t===i.NT.horizontal){let t=o(u(e)*(r.Ro/n));return{position:"relative",width:t,height:"100%"}}return{}},c=(e,t,n)=>{if([r.Hd.LinkMicUiLayout_Live_Partner_Dynamic,r.Hd.VideoChat_DynamicLayout1V6].includes(e))return(null==n?void 0:n.length)&&!((null==n?void 0:n.length)<=2)?t.slice(0,n.length):t.slice(0,2);return t},s=(e,t,n=!0)=>{let{content:r}=e,{w:i,h:l}=r,{x:u,y:a,w:c,h:s}=t;return{position:"absolute",left:o(u/i,n),top:o(a/l,n),width:o(c/i,n),height:o(s/l,n),display:"flex",justifyContent:"center",alignItems:"center"}},f=(e,t,n,i)=>{let{p:l}=n,o=[],u="";if(e===r.Hd.VideoChat_DynamicLayout1V6&&0===l){if(null==i||i.forEach(e=>{if(0!==e.p){let{width:n,height:r,left:i,top:l}=s(t,e,!1);o.push(`M${i},${l} h${n} v${r} h-${n} z`)}}),o.length){let e=["M0,0 h100 v100 h-100 z",...o].join(" "),t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("fill-rule","evenodd"),t.setAttribute("d",e);let n=`data:image/svg+xml,${t.outerHTML}`;u=`url('${n}')`}}return{maskImage:u}}},147693:function(e,t,n){"use strict";var r=n(954090),i=n(732979),l=n.n(i),o=n(101199),u=n(918956),a=n(475089),c=function(e){if(!e)return 0;var t=l()(e).valueOf()-Date.now();return t<0?0:t};t.Z=function(e){void 0===e&&(e={});var t=e||{},n=t.leftTime,i=t.targetDate,l=t.interval,s=void 0===l?1e3:l,f=t.onEnd,d=(0,o.useMemo)(function(){return(0,a.hj)(n)&&n>0?Date.now()+n:void 0},[n]),h="leftTime"in e?d:i,p=(0,r.CR)((0,o.useState)(function(){return c(h)}),2),g=p[0],v=p[1],C=(0,u.Z)(f);(0,o.useEffect)(function(){if(!h){v(0);return}v(c(h));var e=setInterval(function(){var t,n=c(h);v(n),0===n&&(clearInterval(e),null===(t=C.current)||void 0===t||t.call(C))},s);return function(){return clearInterval(e)}},[h,s]);var w=(0,o.useMemo)(function(){var e;return{days:Math.floor((e=g)/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},[g]);return[g,w]}},73203:function(e,t,n){"use strict";var r=n(954090),i=n(350856),l=n.n(i),o=n(101199),u=n(918956),a=n(287964),c=n(475089),s=n(205859);t.Z=function(e,t){s.Z&&(0,c.mf)(e);var n,i=(0,u.Z)(e),f=null!==(n=null==t?void 0:t.wait)&&void 0!==n?n:1e3,d=(0,o.useMemo)(function(){return l()(function(){for(var e=[],t=0;t=l&&l>r&&(n=i,r=l)}),n},u=function(e){var t=void 0===e?{}:e,n=t.useBorderBoxSize,u=t.breakpoints,a=t.updateOnBreakpointChange,c=t.shouldUpdate,s=t.onResize,f=t.polyfill,d=(0,r.useState)({currentBreakpoint:"",width:null,height:null}),h=d[0],p=d[1],g=(0,r.useRef)({}),v=(0,r.useRef)(),C=(0,r.useRef)(),w=(0,r.useRef)(!1),m=(0,r.useRef)(),b=l(s),y=l(c),x=(0,r.useCallback)(function(){C.current&&C.current.disconnect()},[]),L=(0,r.useCallback)(function(e){e&&e!==m.current&&(x(),m.current=e,p({currentBreakpoint:"",width:e.clientWidth,height:e.clientHeight})),C.current&&m.current&&C.current.observe(m.current)},[x]);return(0,r.useEffect)(function(){if((!("ResizeObserver"in window)||!("ResizeObserverEntry"in window))&&!f)return function(){return null};var e=null;return C.current=new(f||ResizeObserver)(function(t){var r=t[0];e=requestAnimationFrame(function(){var e=r.contentBoxSize,t=r.borderBoxSize,i=r.contentRect,l=e;n&&(t?l=t:!w.current&&(w.current=!0));var c=(l=Array.isArray(l)?l[0]:l)?l.inlineSize:i.width,s=l?l.blockSize:i.height;if(c!==g.current.width||s!==g.current.height){g.current={width:c,height:s};var f={currentBreakpoint:"",width:c,height:s,entry:r,observe:L,unobserve:x};u?(f.currentBreakpoint=o(u,c),f.currentBreakpoint!==v.current&&(b.current&&b.current(f),v.current=f.currentBreakpoint)):b.current&&b.current(f);var d={currentBreakpoint:f.currentBreakpoint,width:c,height:s,entry:r};if(!y.current||y.current(d)){if(!y.current&&u&&a){p(function(e){return e.currentBreakpoint!==d.currentBreakpoint?d:e});return}p(d)}}})}),L(),function(){x(),e&&cancelAnimationFrame(e)}},[JSON.stringify(u),n,L,x,a]),i({},h,{observe:L,unobserve:x})}},577596:function(e,t,n){"use strict";n(932651);var r=n(101199);function i(){return(i=Object.assign||function(e){for(var t=1;t{if("length"===n||"prototype"===n||"arguments"===n||"caller"===n)return;let l=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);if(!!i(l,o)||!r)Object.defineProperty(e,n,o)},i=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},l=(e,t)=>{let n=Object.getPrototypeOf(t);if(n!==Object.getPrototypeOf(e))Object.setPrototypeOf(e,n)},o=(e,t)=>`/* Wrapped ${e}*/ ${t}`,u=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),a=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),c=(e,t,n)=>{let r=""===n?"":`with ${n.trim()}() `,i=o.bind(null,r,t.toString());Object.defineProperty(i,"name",a),Object.defineProperty(e,"toString",{...u,value:i})},s=new WeakMap;function f(e,{cacheKey:t=([e])=>e,cache:n=new Map}={}){let i=new Map,o=function(...r){let l=t(r);if(i.has(l))return i.get(l);let o=(async()=>{try{if(n&&await n.has(l))return await n.get(l);let t=e.apply(this,r),i=await t;try{return i}finally{n&&await n.set(l,i)}}finally{i.delete(l)}})();return i.set(l,o),o};return!function(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:i}=e;for(let i of Reflect.ownKeys(t))r(e,t,i,n);l(e,t),c(e,t,i)}(o,e,{ignoreNonConfigurable:!0}),s.set(o,n),o}}}]);