diff --git a/build/control-repeater.asset.php b/build/control-repeater.asset.php index 02820c25..137bf74b 100644 --- a/build/control-repeater.asset.php +++ b/build/control-repeater.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '786384f47ae84a5500a5'); + array('react', 'react-dom', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '0a88b2b89ced21825215'); diff --git a/build/control-repeater.js b/build/control-repeater.js index c46b5554..9ddff5a7 100644 --- a/build/control-repeater.js +++ b/build/control-repeater.js @@ -1,3 +1,3 @@ (()=>{var e={1991:(e,t)=>{var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.element;var t=n(1991),r=n.n(t);const o=window.wp.i18n,i=window.wp.hooks,a=window.wp.components;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t.current=e})),(0,d.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{n.current!==e&&(n.current=e)}),t),n}function D(e,t){const n=(0,d.useRef)();return(0,d.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function S(e){const t=C(e),n=(0,d.useRef)(null),r=(0,d.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function M(e){const t=(0,d.useRef)();return(0,d.useEffect)((()=>{t.current=e}),[e]),t.current}let k={};function z(e,t){return(0,d.useMemo)((()=>{if(t)return t;const n=null==k[e]?0:k[e]+1;return k[e]=n,e+"-"+n}),[e,t])}function I(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const N=I(1),_=I(-1);function O(e){if(!e)return!1;const{KeyboardEvent:t}=b(e.target);return t&&e instanceof t}function T(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=b(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const A=Object.freeze({Translate:{toString(e){if(!e)return;const{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;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[A.Translate.toString(e),A.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),L="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function B(e){return e.matches(L)?e:e.querySelector(L)}const P={display:"none"};function j(e){let{id:t,value:n}=e;return h().createElement("div",{id:t,style:P},n)}function F(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return h().createElement("div",{id:t,style:{position:"fixed",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)}const U=(0,d.createContext)(null),Y={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 "},X={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 H(e){let{announcements:t=X,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Y}=e;const{announce:i,announcement:a}=function(){const[e,t]=(0,d.useState)("");return{announce:(0,d.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),l=z("DndLiveRegion"),[s,c]=(0,d.useState)(!1);if((0,d.useEffect)((()=>{c(!0)}),[]),function(e){const t=(0,d.useContext)(U);(0,d.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}((0,d.useMemo)((()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}})),[i,t])),!s)return null;const u=h().createElement(h().Fragment,null,h().createElement(j,{id:r,value:o.draggable}),h().createElement(F,{id:l,announcement:a}));return n?(0,g.createPortal)(u,n):u}var K;function V(){}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(K||(K={}));const W=Object.freeze({x:0,y:0});function q(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function J(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function $(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const G=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=$(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=(a=$(r),l=o,Math.sqrt(Math.pow(a.x-l.x,2)+Math.pow(a.y-l.y,2)));i.push({id:t,data:{droppableContainer:e,value:n}})}}var a,l;return i.sort(q)};function Q(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=Q(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(J)};function ee(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:W}function te(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const ne=te(1);const re={ignoreTransform:!1};function oe(e,t){void 0===t&&(t=re);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=b(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:l,right:s}=n;return{top:r,left:o,width:i,height:a,bottom:l,right:s}}function ie(e){return oe(e,{ignoreTransform:!0})}function ae(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(m(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!w(o)||y(o))return n;if(n.includes(o))return n;const i=b(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=b(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=b(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function le(e){const[t]=ae(e,1);return null!=t?t:null}function se(e){return f&&e?v(e)?e:p(e)?m(e)||e===x(e).scrollingElement?window:w(e)?e:null:null:null}function ce(e){return v(e)?e.scrollX:e.scrollLeft}function ue(e){return v(e)?e.scrollY:e.scrollTop}function de(e){return{x:ce(e),y:ue(e)}}var he;function ge(e){return!(!f||!e)&&e===document.scrollingElement}function fe(e){const t={x:0,y:0},n=ge(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(he||(he={}));const ve={x:.2,y:.2};function pe(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=ve);const{isTop:c,isBottom:u,isLeft:d,isRight:h}=fe(e),g={x:0,y:0},f={x:0,y:0},v=t.height*o.y,p=t.width*o.x;return!c&&i<=t.top+v?(g.y=he.Backward,f.y=r*Math.abs((t.top+v-i)/v)):!u&&s>=t.bottom-v&&(g.y=he.Forward,f.y=r*Math.abs((t.bottom-v-s)/v)),!h&&l>=t.right-p?(g.x=he.Forward,f.x=r*Math.abs((t.right-p-l)/p)):!d&&a<=t.left+p&&(g.x=he.Backward,f.x=r*Math.abs((t.left+p-a)/p)),{direction:g,speed:f}}function be(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function me(e){return e.reduce(((e,t)=>N(e,de(t))),W)}const we=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+ce(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+ue(t)),0)}]];class ye{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;const n=ae(t),r=me(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of we)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class xe{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 Ee(e,t){const 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}var Ce,Re,De;function Se(e){e.preventDefault()}function Me(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Ce||(Ce={})),(De=Re||(Re={})).Space="Space",De.Down="ArrowDown",De.Right="ArrowRight",De.Left="ArrowLeft",De.Up="ArrowUp",De.Esc="Escape",De.Enter="Enter";const ke={start:[Re.Space,Re.Enter],cancel:[Re.Esc],end:[Re.Space,Re.Enter]},ze=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Re.Right:return{...n,x:n.x+25};case Re.Left:return{...n,x:n.x-25};case Re.Down:return{...n,y:n.y+25};case Re.Up:return{...n,y:n.y-25}}};class Ie{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new xe(x(t)),this.windowListeners=new xe(b(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ce.Resize,this.handleCancel),this.windowListeners.add(Ce.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Ce.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=oe),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);le(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(W)}handleKeyDown(e){if(O(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=ke,coordinateGetter:i=ze,scrollBehavior:a="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:s}=n.current,c=s?{x:s.left,y:s.top}:W;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=_(u,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:l,isLeft:s,isBottom:c,maxScroll:d,minScroll:h}=fe(n),g=be(n),f={x:Math.min(o===Re.Right?g.right-g.width/2:g.right,Math.max(o===Re.Right?g.left:g.left+g.width/2,u.x)),y:Math.min(o===Re.Down?g.bottom-g.height/2:g.bottom,Math.max(o===Re.Down?g.top:g.top+g.height/2,u.y))},v=o===Re.Right&&!l||o===Re.Left&&!s,p=o===Re.Down&&!c||o===Re.Up&&!i;if(v&&f.x!==u.x){const e=n.scrollLeft+t.x,i=o===Re.Right&&e<=d.x||o===Re.Left&&e>=h.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===Re.Right?n.scrollLeft-d.x:n.scrollLeft-h.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(p&&f.y!==u.y){const e=n.scrollTop+t.y,i=o===Re.Down&&e<=d.y||o===Re.Up&&e>=h.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===Re.Down?n.scrollTop-d.y:n.scrollTop-h.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,N(_(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Ne(e){return Boolean(e&&"distance"in e)}function _e(e){return Boolean(e&&"delay"in e)}Ie.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ke,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class Oe{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=b(e);return e instanceof t?e:x(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;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=x(i),this.documentListeners=new xe(this.document),this.listeners=new xe(n),this.windowListeners=new xe(b(i)),this.initialCoordinates=null!=(r=T(o))?r:W,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(){const{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),this.windowListeners.add(Ce.Resize,this.handleCancel),this.windowListeners.add(Ce.DragStart,Se),this.windowListeners.add(Ce.VisibilityChange,this.handleCancel),this.windowListeners.add(Ce.ContextMenu,Se),this.documentListeners.add(Ce.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(_e(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(Ne(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)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ce.Click,Me,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ce.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const l=null!=(t=T(e))?t:W,s=_(r,l);if(!n&&a){if(Ne(a)){if(null!=a.tolerance&&Ee(s,a.tolerance))return this.handleCancel();if(Ee(s,a.distance))return this.handleStart()}return _e(a)&&Ee(s,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Re.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Te={move:{name:"pointermove"},end:{name:"pointerup"}};class Ae extends Oe{constructor(e){const{event:t}=e,n=x(t.target);super(e,Te,n)}}Ae.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))}}];const Le={move:{name:"mousemove"},end:{name:"mouseup"}};var Be;!function(e){e[e.RightClick=2]="RightClick"}(Be||(Be={})),class extends Oe{constructor(e){super(e,Le,x(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Be.RightClick&&(null==r||r({event:n}),!0)}}];const Pe={move:{name:"touchmove"},end:{name:"touchend"}};var je,Fe;(class extends Oe{constructor(e){super(e,Pe)}static setup(){return window.addEventListener(Pe.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Pe.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(je||(je={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Fe||(Fe={}));const Ue={x:{[he.Backward]:!1,[he.Forward]:!1},y:{[he.Backward]:!1,[he.Forward]:!1}};var Ye,Xe;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ye||(Ye={})),function(e){e.Optimized="optimized"}(Xe||(Xe={}));const He=new Map;function Ke(e,t){return D((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ve(e){let{callback:t,disabled:n}=e;const r=C(t),o=(0,d.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return(0,d.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}function We(e){return new ye(oe(e),e)}function qe(e,t,n){void 0===t&&(t=We);const[r,o]=(0,d.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),i=function(e){let{callback:t,disabled:n}=e;const r=C(t),o=(0,d.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return(0,d.useEffect)((()=>()=>null==o?void 0:o.disconnect()),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),a=Ve({callback:o});return E((()=>{o(),e?(null==a||a.observe(e),null==i||i.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==i||i.disconnect())}),[e]),r}const Je=[];function $e(e,t){void 0===t&&(t=[]);const n=(0,d.useRef)(null);return(0,d.useEffect)((()=>{n.current=null}),t),(0,d.useEffect)((()=>{const t=e!==W;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?_(e,n.current):W}function Ge(e){return(0,d.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Qe=[];const Ze=[{sensor:Ae,options:{}},{sensor:Ie,options:{}}],et={current:{}},tt={draggable:{measure:ie},droppable:{measure:ie,strategy:Ye.WhileDragging,frequency:Xe.Optimized},dragOverlay:{measure:oe}};class nt 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}}const rt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new nt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:V},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:tt,measureDroppableContainers:V,windowRect:null,measuringScheduled:!1},ot={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:V,draggableNodes:new Map,over:null,measureDroppableContainers:V},it=(0,d.createContext)(ot),at=(0,d.createContext)(rt);function lt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new nt}}}function st(e,t){switch(t.type){case K.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case K.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case K.DragEnd:case K.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case K.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new nt(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case K.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new nt(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case K.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new nt(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function ct(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,d.useContext)(it),i=M(r),a=M(null==n?void 0:n.id);return(0,d.useEffect)((()=>{if(!t&&!r&&i&&null!=a){if(!O(i))return;if(document.activeElement===i.target)return;const e=o.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=B(e);if(t){t.focus();break}}}))}}),[r,t,o,a,i]),null}const ut=(0,d.createContext)({...W,scaleX:1,scaleY:1});var dt;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(dt||(dt={}));const ht=(0,d.memo)((function(e){var t,n,r,o;let{id:i,accessibility:a,autoScroll:l=!0,children:s,sensors:c=Ze,collisionDetection:u=Z,measuring:v,modifiers:p,...m}=e;const y=(0,d.useReducer)(st,void 0,lt),[x,C]=y,[k,I]=function(){const[e]=(0,d.useState)((()=>new Set)),t=(0,d.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,d.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]}(),[_,O]=(0,d.useState)(dt.Uninitialized),A=_===dt.Initialized,{draggable:{active:L,nodes:B,translate:P},droppable:{containers:j}}=x,F=L?B.get(L):null,Y=(0,d.useRef)({initial:null,translated:null}),X=(0,d.useMemo)((()=>{var e;return null!=L?{id:L,data:null!=(e=null==F?void 0:F.data)?e:et,rect:Y}:null}),[L,F]),V=(0,d.useRef)(null),[q,J]=(0,d.useState)(null),[$,G]=(0,d.useState)(null),Q=R(m,Object.values(m)),te=z("DndDescribedBy",i),re=(0,d.useMemo)((()=>j.getEnabled()),[j]),ie=(ce=v,(0,d.useMemo)((()=>({draggable:{...tt.draggable,...null==ce?void 0:ce.draggable},droppable:{...tt.droppable,...null==ce?void 0:ce.droppable},dragOverlay:{...tt.dragOverlay,...null==ce?void 0:ce.dragOverlay}})),[null==ce?void 0:ce.draggable,null==ce?void 0:ce.droppable,null==ce?void 0:ce.dragOverlay]));var ce;const{droppableRects:ue,measureDroppableContainers:fe,measuringScheduled:ve}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=(0,d.useState)(null),{frequency:l,measure:s,strategy:c}=o,u=(0,d.useRef)(e),h=function(){switch(c){case Ye.Always:return!1;case Ye.BeforeDragging:return n;default:return!n}}(),g=R(h),f=(0,d.useCallback)((function(e){void 0===e&&(e=[]),g.current||a((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[g]),v=(0,d.useRef)(null),p=D((t=>{if(h&&!n)return He;if(!t||t===He||u.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new ye(s(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,i,n,h,s]);return(0,d.useEffect)((()=>{u.current=e}),[e]),(0,d.useEffect)((()=>{h||f()}),[n,h]),(0,d.useEffect)((()=>{i&&i.length>0&&a(null)}),[JSON.stringify(i)]),(0,d.useEffect)((()=>{h||"number"!=typeof l||null!==v.current||(v.current=setTimeout((()=>{f(),v.current=null}),l))}),[l,h,f,...r]),{droppableRects:p,measureDroppableContainers:f,measuringScheduled:null!=i}}(re,{dragging:A,dependencies:[P.x,P.y],config:ie.droppable}),be=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return D((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(B,L),we=(0,d.useMemo)((()=>$?T($):null),[$]),xe=function(){const e=!1===(null==q?void 0:q.autoScrollEnabled),t="object"==typeof l?!1===l.enabled:!1===l,n=A&&!e&&!t;return"object"==typeof l?{...l,enabled:n}:{enabled:n}}(),Ee=function(e,t){return Ke(e,t)}(be,ie.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=(0,d.useRef)(!1),{x:a,y:l}="boolean"==typeof o?{x:o,y:o}:o;E((()=>{if(!a&&!l||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=ee(n(e),r);if(a||(o.x=0),l||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=le(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,a,l,r,n])}({activeNode:L?B.get(L):null,config:xe.layoutShiftCompensation,initialRect:Ee,measure:ie.draggable.measure});const Ce=qe(be,ie.draggable.measure,Ee),Re=qe(be?be.parentElement:null),De=(0,d.useRef)({activatorEvent:null,active:null,activeNode:be,collisionRect:null,collisions:null,droppableRects:ue,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:j,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Se=j.getNodeFor(null==(t=De.current.over)?void 0:t.id),Me=function(e){let{measure:t}=e;const[n,r]=(0,d.useState)(null),o=Ve({callback:(0,d.useCallback)((e=>{for(const{target:n}of e)if(w(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),i=(0,d.useCallback)((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return w(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)}),[t,o]),[a,l]=S(i);return(0,d.useMemo)((()=>({nodeRef:a,rect:n,setRef:l})),[n,a,l])}({measure:ie.dragOverlay.measure}),ke=null!=(n=Me.nodeRef.current)?n:be,ze=A?null!=(r=Me.rect)?r:Ce:null,Ie=Boolean(Me.nodeRef.current&&Me.rect),Ne=ee(_e=Ie?null:Ce,Ke(_e));var _e;const Oe=Ge(ke?b(ke):null),Te=function(e){const t=(0,d.useRef)(e),n=D((n=>e?n&&n!==Je&&e&&t.current&&e.parentNode===t.current.parentNode?n:ae(e):Je),[e]);return(0,d.useEffect)((()=>{t.current=e}),[e]),n}(A?null!=Se?Se:be:null),Ae=function(e,t){void 0===t&&(t=oe);const[n]=e,r=Ge(n?b(n):null),[o,i]=(0,d.useReducer)((function(){return e.length?e.map((e=>ge(e)?r:new ye(t(e),e))):Qe}),Qe),a=Ve({callback:i});return e.length>0&&o===Qe&&i(),E((()=>{e.length?e.forEach((e=>null==a?void 0:a.observe(e))):(null==a||a.disconnect(),i())}),[e]),o}(Te),Le=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(p,{transform:{x:P.x-Ne.x,y:P.y-Ne.y,scaleX:1,scaleY:1},activatorEvent:$,active:X,activeNodeRect:Ce,containerNodeRect:Re,draggingNodeRect:ze,over:De.current.over,overlayNodeRect:Me.rect,scrollableAncestors:Te,scrollableAncestorRects:Ae,windowRect:Oe}),Be=we?N(we,P):null,Pe=function(e){const[t,n]=(0,d.useState)(null),r=(0,d.useRef)(e),o=(0,d.useCallback)((e=>{const t=se(e.target);t&&n((e=>e?(e.set(t,de(t)),new Map(e)):null))}),[]);return(0,d.useEffect)((()=>{const t=r.current;if(e!==t){i(t);const a=e.map((e=>{const t=se(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,de(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach((e=>{const t=se(e);null==t||t.removeEventListener("scroll",o)}))}}),[o,e]),(0,d.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>N(e,t)),W):me(e):W),[e,t])}(Te),Xe=$e(Pe),We=$e(Pe,[Ce]),nt=N(Le,Xe),rt=ze?ne(ze,Le):null,ot=X&&rt?u({active:X,collisionRect:rt,droppableRects:ue,droppableContainers:re,pointerCoordinates:Be}):null,ht=function(e,t){if(!e||0===e.length)return null;const[n]=e;return n.id}(ot),[gt,ft]=(0,d.useState)(null),vt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(Ie?Le:N(Le,We),null!=(o=null==gt?void 0:gt.rect)?o:null,Ce),pt=(0,d.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==V.current)return;const o=B.get(V.current);if(!o)return;const i=e.nativeEvent,a=new n({active:V.current,activeNode:o,event:i,options:r,context:De,onStart(e){const t=V.current;if(null==t)return;const n=B.get(t);if(!n)return;const{onDragStart:r}=Q.current,o={active:{id:t,data:n.data,rect:Y}};(0,g.unstable_batchedUpdates)((()=>{null==r||r(o),O(dt.Initializing),C({type:K.DragStart,initialCoordinates:e,active:t}),k({type:"onDragStart",event:o})}))},onMove(e){C({type:K.DragMove,coordinates:e})},onEnd:l(K.DragEnd),onCancel:l(K.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=De.current;let a=null;if(t&&o){const{cancelDrop:l}=Q.current;a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===K.DragEnd&&"function"==typeof l&&await Promise.resolve(l(a))&&(e=K.DragCancel)}V.current=null,(0,g.unstable_batchedUpdates)((()=>{C({type:e}),O(dt.Uninitialized),ft(null),J(null),G(null);const t=e===K.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=Q.current[t];null==e||e(a),k({type:t,event:a})}}))}}(0,g.unstable_batchedUpdates)((()=>{J(a),G(e.nativeEvent)}))}),[B]),bt=(0,d.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=B.get(r);if(null!==V.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},V.current=r,pt(n,t))}),[B,pt]),mt=function(e,t){return(0,d.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(c,bt);!function(e){(0,d.useEffect)((()=>{if(!f)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(c),E((()=>{Ce&&_===dt.Initializing&&O(dt.Initialized)}),[Ce,_]),(0,d.useEffect)((()=>{const{onDragMove:e}=Q.current,{active:t,activatorEvent:n,collisions:r,over:o}=De.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:nt.x,y:nt.y},over:o};(0,g.unstable_batchedUpdates)((()=>{null==e||e(i),k({type:"onDragMove",event:i})}))}),[nt.x,nt.y]),(0,d.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=De.current;if(!e||null==V.current||!t||!o)return;const{onDragOver:i}=Q.current,a=r.get(ht),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:l};(0,g.unstable_batchedUpdates)((()=>{ft(l),null==i||i(s),k({type:"onDragOver",event:s})}))}),[ht]),E((()=>{De.current={activatorEvent:$,active:X,activeNode:be,collisionRect:rt,collisions:ot,droppableRects:ue,draggableNodes:B,draggingNode:ke,draggingNodeRect:ze,droppableContainers:j,over:gt,scrollableAncestors:Te,scrollAdjustedTranslate:nt},Y.current={initial:ze,translated:rt}}),[X,be,ot,rt,B,ke,ze,ue,j,gt,Te,nt]),function(e){let{acceleration:t,activator:n=je.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:l=Fe.TreeOrder,pointerCoordinates:s,scrollableAncestors:c,scrollableAncestorRects:u,delta:h,threshold:g}=e;const f=function(e){let{delta:t,disabled:n}=e;const r=M(t);return D((e=>{if(n||!r||!e)return Ue;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[he.Backward]:e.x[he.Backward]||-1===o,[he.Forward]:e.x[he.Forward]||1===o},y:{[he.Backward]:e.y[he.Backward]||-1===i,[he.Forward]:e.y[he.Forward]||1===i}}}),[n,t,r])}({delta:h,disabled:!i}),[v,p]=function(){const e=(0,d.useRef)(null);return[(0,d.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,d.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),b=(0,d.useRef)({x:0,y:0}),m=(0,d.useRef)({x:0,y:0}),w=(0,d.useMemo)((()=>{switch(n){case je.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case je.DraggableRect:return o}}),[n,o,s]),y=(0,d.useRef)(null),x=(0,d.useCallback)((()=>{const e=y.current;if(!e)return;const t=b.current.x*m.current.x,n=b.current.y*m.current.y;e.scrollBy(t,n)}),[]),E=(0,d.useMemo)((()=>l===Fe.TreeOrder?[...c].reverse():c),[l,c]);(0,d.useEffect)((()=>{if(i&&c.length&&w){for(const e of E){if(!1===(null==r?void 0:r(e)))continue;const n=c.indexOf(e),o=u[n];if(!o)continue;const{direction:i,speed:l}=pe(e,o,w,t,g);for(const e of["x","y"])f[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return p(),y.current=e,v(x,a),b.current=l,void(m.current=i)}b.current={x:0,y:0},m.current={x:0,y:0},p()}else p()}),[t,x,r,p,i,a,JSON.stringify(w),JSON.stringify(f),v,c,E,u,JSON.stringify(g)])}({...xe,delta:P,draggingRect:rt,pointerCoordinates:Be,scrollableAncestors:Te,scrollableAncestorRects:Ae});const wt=(0,d.useMemo)((()=>({active:X,activeNode:be,activeNodeRect:Ce,activatorEvent:$,collisions:ot,containerNodeRect:Re,dragOverlay:Me,draggableNodes:B,droppableContainers:j,droppableRects:ue,over:gt,measureDroppableContainers:fe,scrollableAncestors:Te,scrollableAncestorRects:Ae,measuringConfiguration:ie,measuringScheduled:ve,windowRect:Oe})),[X,be,Ce,$,ot,Re,Me,B,j,ue,gt,fe,Te,Ae,ie,ve,Oe]),yt=(0,d.useMemo)((()=>({activatorEvent:$,activators:mt,active:X,activeNodeRect:Ce,ariaDescribedById:{draggable:te},dispatch:C,draggableNodes:B,over:gt,measureDroppableContainers:fe})),[$,mt,X,Ce,C,te,B,gt,fe]);return h().createElement(U.Provider,{value:I},h().createElement(it.Provider,{value:yt},h().createElement(at.Provider,{value:wt},h().createElement(ut.Provider,{value:vt},s)),h().createElement(ct,{disabled:!1===(null==a?void 0:a.restoreFocus)})),h().createElement(H,{...a,hiddenTextDescribedById:te}))})),gt=(0,d.createContext)(null),ft="button",vt="Droppable";const pt={timeout:25};function bt(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function mt(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function wt(e){return null!==e&&e>=0}const yt=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=bt(t,r,n),a=t[o],l=i[o];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},xt={scaleX:1,scaleY:1},Et=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:nn&&o<=a?{x:0,y:-l.height-s,...xt}:o=a?{x:0,y:l.height+s,...xt}:{x:0,y:0,...xt}},Ct="Sortable",Rt=h().createContext({activeIndex:-1,containerId:Ct,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:yt,disabled:{draggable:!1,droppable:!1}});function Dt(e){let{children:t,id:n,items:r,strategy:o=yt,disabled:i=!1}=e;const{active:a,dragOverlay:l,droppableRects:s,over:c,measureDroppableContainers:u}=(0,d.useContext)(at),g=z(Ct,n),f=Boolean(null!==l.rect),v=(0,d.useMemo)((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),p=null!=a,b=a?v.indexOf(a.id):-1,m=c?v.indexOf(c.id):-1,w=(0,d.useRef)(v),y=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{y&&p&&u(v)}),[y,v,p,u]),(0,d.useEffect)((()=>{w.current=v}),[v]);const R=(0,d.useMemo)((()=>({activeIndex:b,containerId:g,disabled:C,disableTransforms:x,items:v,overIndex:m,useDragOverlay:f,sortedRects:mt(v,s),strategy:o})),[b,g,C.draggable,C.droppable,x,v,m,s,f,o]);return h().createElement(Rt.Provider,{value:R},t)}const St=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return bt(n,r,o).indexOf(t)},Mt=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!(!c||!r||l!==i&&o===a||!n&&(a===o||t!==s))},kt={duration:200,easing:"ease"},zt="transform",It=A.Transition.toString({property:zt,duration:0,easing:"linear"}),Nt={roleDescription:"sortable"};function _t(e){let{animateLayoutChanges:t=Mt,attributes:n,disabled:r,data:o,getNewIndex:i=St,id:a,strategy:l,resizeObserverConfig:s,transition:c=kt}=e;const{items:u,containerId:h,activeIndex:g,disabled:f,disableTransforms:v,sortedRects:p,overIndex:b,useDragOverlay:m,strategy:w}=(0,d.useContext)(Rt),y=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}}(r,f),x=u.indexOf(a),C=(0,d.useMemo)((()=>({sortable:{containerId:h,index:x,items:u},...o})),[h,o,x,u]),D=(0,d.useMemo)((()=>u.slice(u.indexOf(a))),[u,a]),{rect:M,node:k,isOver:I,setNodeRef:N}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=z("Droppable"),{active:a,dispatch:l,over:s,measureDroppableContainers:c}=(0,d.useContext)(it),u=(0,d.useRef)({disabled:n}),h=(0,d.useRef)(!1),g=(0,d.useRef)(null),f=(0,d.useRef)(null),{disabled:v,updateMeasurementsFor:p,timeout:b}={...pt,...o},m=R(null!=p?p:r),w=Ve({callback:(0,d.useCallback)((()=>{h.current?(null!=f.current&&clearTimeout(f.current),f.current=setTimeout((()=>{c(Array.isArray(m.current)?m.current:[m.current]),f.current=null}),b)):h.current=!0}),[b]),disabled:v||!a}),y=(0,d.useCallback)(((e,t)=>{w&&(t&&(w.unobserve(t),h.current=!1),e&&w.observe(e))}),[w]),[x,C]=S(y),D=R(t);return(0,d.useEffect)((()=>{w&&x.current&&(w.disconnect(),h.current=!1,w.observe(x.current))}),[x,w]),E((()=>(l({type:K.RegisterDroppable,element:{id:r,key:i,disabled:n,node:x,rect:g,data:D}}),()=>l({type:K.UnregisterDroppable,key:i,id:r}))),[r]),(0,d.useEffect)((()=>{n!==u.current.disabled&&(l({type:K.SetDroppableDisabled,id:r,key:i,disabled:n}),u.current.disabled=n)}),[r,i,n,l]),{active:a,rect:g,isOver:(null==s?void 0:s.id)===r,node:x,over:s,setNodeRef:C}}({id:a,data:C,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...s}}),{active:_,activatorEvent:T,activeNodeRect:L,attributes:B,setNodeRef:P,listeners:j,isDragging:F,over:U,setActivatorNodeRef:Y,transform:X}=function(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=z(vt),{activators:a,activatorEvent:l,active:s,activeNodeRect:c,ariaDescribedById:u,draggableNodes:h,over:g}=(0,d.useContext)(it),{role:f=ft,roleDescription:v="draggable",tabIndex:p=0}=null!=o?o:{},b=(null==s?void 0:s.id)===t,m=(0,d.useContext)(b?ut:gt),[w,y]=S(),[x,C]=S(),D=function(e,t){return(0,d.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(a,t),M=R(n);return E((()=>(h.set(t,{id:t,key:i,node:w,activatorNode:x,data:M}),()=>{const e=h.get(t);e&&e.key===i&&h.delete(t)})),[h,t]),{active:s,activatorEvent:l,activeNodeRect:c,attributes:(0,d.useMemo)((()=>({role:f,tabIndex:p,"aria-disabled":r,"aria-pressed":!(!b||f!==ft)||void 0,"aria-roledescription":v,"aria-describedby":u.draggable})),[r,f,p,b,v,u.draggable]),isDragging:b,listeners:r?void 0:D,node:w,over:g,setNodeRef:y,setActivatorNodeRef:C,transform:m}}({id:a,data:C,attributes:{...Nt,...n},disabled:y.draggable}),H=function(){for(var e=arguments.length,t=new Array(e),n=0;ne=>{t.forEach((t=>t(e)))}),t)}(N,P),V=Boolean(_),W=V&&!v&&wt(g)&&wt(b),q=!m&&F,J=q&&W?X:null,$=W?null!=J?J:(null!=l?l:w)({rects:p,activeNodeRect:L,activeIndex:g,overIndex:b,index:x}):null,G=wt(g)&&wt(b)?i({id:a,items:u,activeIndex:g,overIndex:b}):x,Q=null==_?void 0:_.id,Z=(0,d.useRef)({activeId:Q,items:u,newIndex:G,containerId:h}),ee=u!==Z.current.items,te=t({active:_,containerId:h,isDragging:F,isSorting:V,id:a,index:x,items:u,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:c,wasDragging:null!=Z.current.activeId}),ne=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,a]=(0,d.useState)(null),l=(0,d.useRef)(n);return E((()=>{if(!t&&n!==l.current&&r.current){const e=o.current;if(e){const t=oe(r.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)&&a(n)}}n!==l.current&&(l.current=n)}),[t,n,r,o]),(0,d.useEffect)((()=>{i&&a(null)}),[i]),i}({disabled:!te,index:x,node:k,rect:M});return(0,d.useEffect)((()=>{V&&Z.current.newIndex!==G&&(Z.current.newIndex=G),h!==Z.current.containerId&&(Z.current.containerId=h),u!==Z.current.items&&(Z.current.items=u)}),[V,G,h,u]),(0,d.useEffect)((()=>{if(Q===Z.current.activeId)return;if(Q&&!Z.current.activeId)return void(Z.current.activeId=Q);const e=setTimeout((()=>{Z.current.activeId=Q}),50);return()=>clearTimeout(e)}),[Q]),{active:_,activeIndex:g,attributes:B,data:C,rect:M,index:x,newIndex:G,items:u,isOver:I,isSorting:V,isDragging:F,listeners:j,node:k,overIndex:b,over:U,setNodeRef:H,setActivatorNodeRef:Y,setDroppableNodeRef:N,setDraggableNodeRef:P,transform:null!=ne?ne:$,transition:ne||ee&&Z.current.newIndex===x?It:q&&!O(T)||!c?void 0:V||te?A.Transition.toString({...c,property:zt}):void 0}}Re.Down,Re.Right,Re.Up,Re.Left;const Ot=window.wp.compose;class Tt extends Ae{constructor(e,t){super(e,t),this.customAttach=this.customAttach.bind(this),this.customDetach=this.customDetach.bind(this),this.customPointerMove=this.customPointerMove.bind(this),this.customPointerUp=this.customPointerUp.bind(this),this.customResize=this.customResize.bind(this);const n=e?.event?.target?.ownerDocument?.defaultView;n&&(this.editorIframe=n,this.customAttach())}customAttach(){this.editorIframe&&(this.editorIframe.addEventListener("pointermove",this.customPointerMove),this.editorIframe.addEventListener("pointerup",this.customPointerUp),this.editorIframe.addEventListener("resize",this.customResize))}customDetach(){this.editorIframe&&(this.editorIframe.removeEventListener("pointermove",this.customPointerMove),this.editorIframe.removeEventListener("pointerup",this.customPointerUp),this.editorIframe.removeEventListener("resize",this.customResize))}customPointerMove(e){this.editorIframe&&this.handleMove(e)}customPointerUp(e){this.editorIframe&&this.handleEnd(e)}customResize(e){this.editorIframe&&this.handleCancel(e)}handleEnd(){const{onEnd:e}=this.props;this.detach(),this.customDetach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),this.customDetach(),e()}}const At=function(t){const{attributes:n,listeners:o,setNodeRef:i,transform:s,transition:c,isDragging:u,isSorting:d}=_t({id:t.id}),h={transform:A.Translate.toString(s),transition:d?c:""};return(0,e.createElement)("div",{className:r()("lzb-gutenberg-repeater-item",u?"lzb-gutenberg-repeater-item-dragging":""),ref:i,style:h},(0,e.createElement)("div",{className:"lzb-gutenberg-repeater-btn"+(t.active?" lzb-gutenberg-repeater-btn-active":""),onClick:t.onToggle,onKeyDown:()=>{},role:"button",tabIndex:0},(0,e.createElement)(a.Button,l({className:"lzb-gutenberg-repeater-btn-drag",role:"button"},n,o),(0,e.createElement)("svg",{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",role:"img","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}))),(0,e.createElement)("div",{className:"lzb-gutenberg-repeater-btn-title",dangerouslySetInnerHTML:{__html:t.title}}),(0,e.createElement)("div",{className:"lzb-gutenberg-repeater-btn-arrow"},(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})))),!t.controlData.rows_min||t.count>t.controlData.rows_min?(0,e.createElement)("button",{className:"lzb-gutenberg-repeater-btn-remove",onClick:t.onRemove},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"}))):null,t.active?t.renderContent():"")},Lt=(0,Ot.withInstanceId)((function(t){const{count:n=0,controlData:r,renderRow:i=(()=>{}),addRow:s=(()=>{}),removeRow:c=(()=>{}),resortRow:u=(()=>{}),getInnerControls:h=(()=>{})}=t,g=function(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter((e=>null!=e))),[...t])}((f=Tt,(0,d.useMemo)((()=>({sensor:f,options:{}})),[f,v])));var f,v;let p=-1;("false"===r.rows_collapsible||"false"===r.rows_collapsed)&&(p=-2);const[b,m]=(0,e.useState)(p);function w(e){const t=["alt","url","title","caption","description","id","link"];let n=r.rows_label||(0,o.__)("Row {{#}}","lazy-blocks");n=n.replace(/{{#}}/g,e+1);const i=h(e);return i&&Object.keys(i).forEach((e=>{const{data:r}=i[e];let o=i[e].val||"";"object"==typeof o&&t.forEach((e=>{n=n.replace(new RegExp(`{{${r.name}.${e}}}`,"g"),o[e]||"")})),"image"===r.type&&o.url&&(o=``),"object"==typeof o&&(o=""),n=n.replace(new RegExp(`{{${r.name}}}`,"g"),o)})),n}(0,e.useEffect)((()=>{if(r.rows_min&&r.rows_min>0&&r.rows_min>n){const e=r.rows_min-n;for(let t=0;t{e.preventDefault(),e.stopPropagation(),"true"===r.rows_collapsible&&m(o?-1:t)},onRemove:e=>{e.preventDefault(),e.stopPropagation(),c(t)},renderContent:()=>(0,e.createElement)("div",{className:"lzb-gutenberg-repeater-item-content"},i(t))})}return(0,e.createElement)("div",{className:"lzb-gutenberg-repeater"},(0,e.createElement)(ht,{sensors:g,collisionDetection:G,onDragEnd:e=>{const{active:t,over:n}=e;t.id!==n.id&&(u(t.id-1,n.id-1),b>-1&&m(n.id-1))}},y.length?(0,e.createElement)("div",{className:"lzb-gutenberg-repeater-items"},(0,e.createElement)(Dt,{items:y,strategy:Et},y.map((t=>(0,e.createElement)(At,l({key:`lzb-constructor-controls-items-sortable-${t.id}`},t)))))):null),(0,e.createElement)("div",{className:"lzb-gutenberg-repeater-options"},(0,e.createElement)(a.Button,{isSecondary:!0,isSmall:!0,disabled:r.rows_max&&n>=r.rows_max,onClick:()=>{s(),-2!==b&&m(y.length)}},r.rows_add_button_label||(0,o.__)("+ Add Row","lazy-blocks")),"true"===r.rows_collapsible&&y.length&&y.length>1?(0,e.createElement)(a.ToggleControl,{label:(0,o.__)("Toggle all","lazy-blocks"),checked:-2===b,onChange:()=>{m(-2===b?-1:-2)}}):""))}));function Bt(t){const{printControls:n,id:i,controls:a}=t,[l,s]=(0,e.useState)(!1);let c=0;Object.keys(a).forEach((e=>{a[e].child_of===i&&(c+=1)}));let u=(0,o.__)("Show Child Controls","lazy-blocks");return l?u=(0,o.__)("Hide Child Controls","lazy-blocks"):c&&(u=(0,o.sprintf)( // translators: %d: number of child controls. -(0,o._n)("Show %d Child Control","Show %d Child Controls",c),c)),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("button",{className:r()("lzb-constructor-controls-item-repeater-toggle",l?"lzb-constructor-controls-item-repeater-toggle-collapsed":""),onClick:e=>{e.stopPropagation(),e.preventDefault(),s(!l)}},u,(0,e.createElement)("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},(0,e.createElement)("path",{fill:"currentColor",d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"}))),l?(0,e.createElement)("div",{className:"lzb-constructor-controls-item-childs"},n(i)):"")}(0,i.addFilter)("lzb.editor.control.repeater.render","lzb.editor",((t,n)=>{const r=n.getValue()||[];return(0,e.createElement)(s,{...u(n)},(0,e.createElement)(Lt,{controlData:n.data,count:r.length,getInnerControls:e=>{const t=n.getControls(n.uniqueId),r={};return Object.keys(t).forEach((o=>{const i=t[o];r[o]={data:i,val:n.getValue(i,e)}})),r},renderRow:t=>(0,e.createElement)(e.Fragment,null,n.renderControls(n.placement,n.uniqueId,t)),removeRow:e=>{e>-1&&(r.splice(e,1),n.onChange(r))},addRow:()=>{const e=n.getControls(n.uniqueId),t={};Object.keys(e).forEach((n=>{const r=e[n];t[r.name]=r.default||""})),r.push(t),n.onChange(r)},resortRow:(e,t)=>{const o=(i=r,a=e,l=t,function(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&r{if("string"==typeof e)try{e=e.includes(":")?JSON.parse(decodeURI(e)):JSON.parse(decodeURIComponent(e))}catch(t){e=[]}return e})),(0,i.addFilter)("lzb.editor.control.repeater.updateValue","lzb.editor",(e=>(("object"==typeof e||Array.isArray(e))&&(e=encodeURI(JSON.stringify(e))),e))),(0,i.addFilter)("lzb.constructor.controls.repeater.item","lzb.constructor",((t,n)=>(0,e.createElement)(e.Fragment,null,t,(0,e.createElement)(Bt,{...n})))),(0,i.addFilter)("lzb.constructor.control.repeater.settings","lzb.constructor",((t,n)=>{const{updateData:r,data:i}=n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(a.TextControl,{label:(0,o.__)("Row Label","lazy-blocks"),placeholder:(0,o.__)("Row {{#}}","lazy-blocks"),help:(0,o.__)('Example: "My row number {{#}} with inner control {{control_name}}"',"lazy-blocks"),value:i.rows_label,onChange:e=>r({rows_label:e})})),(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(a.TextControl,{label:(0,o.__)("Add Button Label","lazy-blocks"),placeholder:(0,o.__)("+ Add Row","lazy-blocks"),value:i.rows_add_button_label,onChange:e=>r({rows_add_button_label:e})})),(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(a.TextControl,{type:"number",label:(0,o.__)("Minimum Rows","lazy-blocks"),placeholder:0,min:0,value:i.rows_min,onChange:e=>r({rows_min:e})})),(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(a.TextControl,{type:"number",label:(0,o.__)("Maximum Rows","lazy-blocks"),placeholder:0,min:0,value:i.rows_max,onChange:e=>r({rows_max:e})})),(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(s,{id:"lazyblocks-control-repeater-collapsible",label:(0,o.__)("Collapsible Rows","lazy-blocks")},(0,e.createElement)(a.ToggleControl,{id:"lazyblocks-control-repeater-collapsible",label:(0,o.__)("Yes","lazy-blocks"),checked:"true"===i.rows_collapsible,onChange:e=>r({rows_collapsible:e?"true":"false"})}),"true"===i.rows_collapsible?(0,e.createElement)(a.ToggleControl,{label:(0,o.__)("Collapsed by Default","lazy-blocks"),checked:"true"===i.rows_collapsed,onChange:e=>r({rows_collapsed:e?"true":"false"})}):"")))}))})()})(); \ No newline at end of file +(0,o._n)("Show %d Child Control","Show %d Child Controls",c),c)),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("button",{className:r()("lzb-constructor-controls-item-repeater-toggle",l?"lzb-constructor-controls-item-repeater-toggle-collapsed":""),onClick:e=>{e.stopPropagation(),e.preventDefault(),s(!l)}},u,(0,e.createElement)("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512"},(0,e.createElement)("path",{fill:"currentColor",d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"}))),l?(0,e.createElement)("div",{className:"lzb-constructor-controls-item-childs"},n(i)):"")}(0,i.addFilter)("lzb.editor.control.repeater.render","lzb.editor",((t,n)=>{const r=n.getValue()||[];return(0,e.createElement)(s,{...u(n)},(0,e.createElement)(Lt,{controlData:n.data,count:r.length,getInnerControls:e=>{const t=n.getControls(n.uniqueId),r={};return Object.keys(t).forEach((o=>{const i=t[o];r[o]={data:i,val:n.getValue(i,e)}})),r},renderRow:t=>(0,e.createElement)(e.Fragment,null,n.renderControls(n.placement,n.uniqueId,t)),removeRow:e=>{e>-1&&(r.splice(e,1),n.onChange(r))},addRow:()=>{const e=n.getControls(n.uniqueId),t={};Object.keys(e).forEach((n=>{const r=e[n];t[r.name]=r.default||r.checked||""})),r.push(t),n.onChange(r)},resortRow:(e,t)=>{const o=(i=r,a=e,l=t,function(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&r{if("string"==typeof e)try{e=e.includes(":")?JSON.parse(decodeURI(e)):JSON.parse(decodeURIComponent(e))}catch(t){e=[]}return e})),(0,i.addFilter)("lzb.editor.control.repeater.updateValue","lzb.editor",(e=>(("object"==typeof e||Array.isArray(e))&&(e=encodeURI(JSON.stringify(e))),e))),(0,i.addFilter)("lzb.constructor.controls.repeater.item","lzb.constructor",((t,n)=>(0,e.createElement)(e.Fragment,null,t,(0,e.createElement)(Bt,{...n})))),(0,i.addFilter)("lzb.constructor.control.repeater.settings","lzb.constructor",((t,n)=>{const{updateData:r,data:i}=n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(a.TextControl,{label:(0,o.__)("Row Label","lazy-blocks"),placeholder:(0,o.__)("Row {{#}}","lazy-blocks"),help:(0,o.__)('Example: "My row number {{#}} with inner control {{control_name}}"',"lazy-blocks"),value:i.rows_label,onChange:e=>r({rows_label:e})})),(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(a.TextControl,{label:(0,o.__)("Add Button Label","lazy-blocks"),placeholder:(0,o.__)("+ Add Row","lazy-blocks"),value:i.rows_add_button_label,onChange:e=>r({rows_add_button_label:e})})),(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(a.TextControl,{type:"number",label:(0,o.__)("Minimum Rows","lazy-blocks"),placeholder:0,min:0,value:i.rows_min,onChange:e=>r({rows_min:e})})),(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(a.TextControl,{type:"number",label:(0,o.__)("Maximum Rows","lazy-blocks"),placeholder:0,min:0,value:i.rows_max,onChange:e=>r({rows_max:e})})),(0,e.createElement)(a.PanelBody,null,(0,e.createElement)(s,{id:"lazyblocks-control-repeater-collapsible",label:(0,o.__)("Collapsible Rows","lazy-blocks")},(0,e.createElement)(a.ToggleControl,{id:"lazyblocks-control-repeater-collapsible",label:(0,o.__)("Yes","lazy-blocks"),checked:"true"===i.rows_collapsible,onChange:e=>r({rows_collapsible:e?"true":"false"})}),"true"===i.rows_collapsible?(0,e.createElement)(a.ToggleControl,{label:(0,o.__)("Collapsed by Default","lazy-blocks"),checked:"true"===i.rows_collapsed,onChange:e=>r({rows_collapsed:e?"true":"false"})}):"")))}))})()})(); \ No newline at end of file