diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 39a57c9d..0e9f1ec4 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1 @@ -!function(){"use strict";var e={274:function(e,t,n){var r,o=(r=n(521))&&r.__esModule?r:{default:r};document.addEventListener("DOMContentLoaded",(()=>{(0,o.default)()}))},521:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(648)),o=u(n(809)),i=u(n(852)),l=u(n(117)),a=u(n(606));function u(e){return e&&e.__esModule?e:{default:e}}var s=()=>{r.default.component.registerMany({LinkPicker:o.default,LinkField:i.default,"LinkModal.FormBuilderModal":l.default,"LinkModal.InsertMediaModal":a.default})};t.default=s},852:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LinkFieldContext=t.Component=void 0;var r=h(n(363)),o=n(827),i=n(624),l=O(n(42)),a=O(n(809)),u=O(n(734)),s=O(n(264)),d=O(n(697)),c=h(n(123)),f=O(n(159)),p=O(n(510)),y=n(845),v=O(n(86)),_=O(n(754)),k=O(n(872)),m=O(n(902));function O(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function h(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}const b=(0,r.createContext)(null);t.LinkFieldContext=b;const C="SilverStripe\\LinkField\\Controllers\\LinkFieldController",M=e=>{var t;let{value:n=null,onChange:o,types:i={},actions:l,isMulti:c=!1,canCreate:v,ownerID:O,ownerClass:g,ownerRelation:h}=e;const[M,E]=(0,r.useState)({}),[R,w]=(0,r.useState)(0),[j,D]=(0,r.useState)(!1);let L=n;Array.isArray(L)||("number"==typeof L&&0!=L&&(L=[L]),L||(L=[])),(0,r.useEffect)((()=>{if(!R&&L.length>0){D(!0);const e=[];for(const t of L)e.push(`itemIDs[]=${t}`);const t=`${p.default.getSection(C).form.linkForm.dataUrl}?${e.join("&")}`;f.default.get(t).then((e=>e.json())).then((e=>{E(e),D(!1)})).catch((()=>{l.toasts.error(_.default._t("LinkField.FAILED_TO_LOAD_LINKS","Failed to load links")),D(!1)}))}}),[R,n&&n.length]);const I=()=>{w(0)},P=e=>{w(0);const t=[...L];t.includes(e)||t.push(e),o(c?t:t[0]),l.toasts.success(_.default._t("LinkField.SAVE_SUCCESS","Saved link"))},S=e=>{var t;let n=(0,y.joinUrlPaths)(p.default.getSection(C).form.linkForm.deleteUrl,e.toString());const r=k.default.parse(n),i=m.default.parse(r.query);i.ownerID=O,i.ownerClass=g,i.ownerRelation=h,n=k.default.format({...r,search:m.default.stringify(i)});const a=(null===(t=M[e])||void 0===t?void 0:t.versionState)||"",u=["draft","modified","published"].includes(a),s=u?_.default._t("LinkField.ARCHIVE_SUCCESS","Archived link"):_.default._t("LinkField.DELETE_SUCCESS","Deleted link"),d=u?_.default._t("LinkField.ARCHIVE_ERROR","Failed to archive link"):_.default._t("LinkField.DELETE_ERROR","Failed to delete link");f.default.delete(n,{},{"X-SecurityID":p.default.get("SecurityID")}).then((()=>l.toasts.success(s))).catch((()=>l.toasts.error(d)));const v={...M};delete v[e],E(v),o(c?Object.keys(v):0)},F=0===O,x=!F&&(c||0===Object.keys(M).length),T=!F&&Boolean(R),q=_.default._t("LinkField.SAVE_RECORD_FIRST","Cannot add links until the record has been saved");return r.default.createElement(b.Provider,{value:{ownerID:O,ownerClass:g,ownerRelation:h,actions:l,loading:j}},r.default.createElement("div",{className:"link-field__container"},F&&r.default.createElement("div",{className:"link-field__save-record-first"},q),j&&!F&&r.default.createElement(s.default,{containerClass:"link-field__loading"}),x&&r.default.createElement(a.default,{onModalSuccess:P,onModalClosed:I,types:i,canCreate:v}),r.default.createElement("div",null," ",(()=>{const e=[];for(const d of L){var t,n,o,l,a,s;if(!M[d])continue;const c=i.hasOwnProperty(null===(t=M[d])||void 0===t?void 0:t.typeKey)?i[null===(n=M[d])||void 0===n?void 0:n.typeKey]:{};e.push(r.default.createElement(u.default,{key:d,id:d,title:null===(o=M[d])||void 0===o?void 0:o.Title,description:null===(l=M[d])||void 0===l?void 0:l.description,versionState:null===(a=M[d])||void 0===a?void 0:a.versionState,typeTitle:c.title||"",typeIcon:c.icon,onDelete:S,onClick:()=>{w(d)},canDelete:!(null===(s=M[d])||void 0===s||!s.canDelete)}))}return e})()," "),T&&r.default.createElement(d.default,{types:i,typeKey:null===(t=M[R])||void 0===t?void 0:t.typeKey,isOpen:Boolean(R),onSuccess:P,onClosed:I,linkID:R})))};t.Component=M,M.propTypes={value:v.default.oneOfType([v.default.arrayOf(v.default.number),v.default.number]),onChange:v.default.func.isRequired,types:v.default.object.isRequired,actions:v.default.object.isRequired,isMulti:v.default.bool,canCreate:v.default.bool.isRequired,ownerID:v.default.number.isRequired,ownerClass:v.default.string.isRequired,ownerRelation:v.default.string.isRequired};var E=(0,o.compose)(l.default,(0,i.connect)(null,(e=>({actions:{toasts:(0,o.bindActionCreators)(c,e)}}))))(M);t.default=E},606:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;s(n(754));var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),o=s(n(475)),i=n(624),l=s(n(686)),a=s(n(86));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function s(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{type:t,editing:n,data:i,actions:l,onSubmit:a,...u}=e;if(!t)return!1;(0,r.useEffect)((()=>{n?l.initModal():l.reset()}),[n]);const s=i?{ID:i.FileID,Description:i.Title,TargetBlank:!!i.OpenInNew}:{};return r.default.createElement(o.default,d({isOpen:n,type:"insert-link",title:!1,bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:s,onInsert:e=>{let{ID:n,Description:r,TargetBlank:o}=e;return a({FileID:n,Title:r,OpenInNew:o,typeKey:t.key},"",(()=>{}))}},u))};c.propTypes={type:l.default.isRequired,editing:a.default.bool.isRequired,data:a.default.object.isRequired,actions:a.default.object.isRequired,onClick:a.default.func.isRequired};var f=(0,i.connect)((function(){return{}}),(function(e){return{actions:{initModal:()=>e({type:"INIT_FORM_SCHEMA_STACK",payload:{formSchema:{type:"insert-link",nextType:"admin"}}}),reset:()=>e({type:"RESET"})}}}))(c);t.default=f},117:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),o=c(n(912)),i=n(852),l=c(n(872)),a=c(n(902)),u=c(n(510)),s=n(845),d=c(n(86));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}const p=(e,t)=>{const{schemaUrl:n}=u.default.getSection("SilverStripe\\LinkField\\Controllers\\LinkFieldController").form.linkForm,o=l.default.parse(n),d=a.default.parse(o.query);d.typeKey=e;const{ownerID:c,ownerClass:f,ownerRelation:p}=(0,r.useContext)(i.LinkFieldContext);d.ownerID=c,d.ownerClass=f,d.ownerRelation=p;for(const e of["href","path","pathname"])o[e]=(0,s.joinUrlPaths)(o[e],t.toString());return l.default.format({...o,search:a.default.stringify(d)})},y=e=>{let{typeTitle:t,typeKey:n,linkID:l=0,isOpen:a,onSuccess:u,onClosed:s}=e;const{actions:d}=(0,r.useContext)(i.LinkFieldContext);if(!n)return!1;return r.default.createElement(o.default,{title:t,isOpen:a,schemaUrl:p(n,l),identifier:"Link.EditingLinkInfo",onSubmit:async(e,t,n)=>{let r=null;try{r=await n()}catch(e){return d.toasts.error(i18n._t("LinkField.FAILED_TO_SAVE_LINK","Failed to save link")),Promise.resolve()}if(!r.id.match(/\/schema\/linkfield\/([0-9]+)/)){const e=r.id.match(/\/linkForm\/([0-9]+)/),t=parseInt(e[1],10);u(t)}return Promise.resolve()},onClosed:s})};y.propTypes={typeTitle:d.default.string.isRequired,typeKey:d.default.string.isRequired,linkID:d.default.number,isOpen:d.default.bool.isRequired,onSuccess:d.default.func.isRequired,onClosed:d.default.func.isRequired};var v=y;t.default=v},809:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=d(n(754)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),i=d(n(86)),l=d(n(820)),a=d(n(97)),u=(d(n(686)),d(n(697)));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}const c=e=>{let{types:t,onModalSuccess:n,onModalClosed:i,canCreate:s}=e;const[d,c]=(0,o.useState)(""),f=""!==d,p=(0,l.default)("link-picker","form-control"),y=Object.values(t);return s?o.default.createElement("div",{className:p},o.default.createElement(a.default,{types:y,onSelect:e=>{c(e)}}),f&&o.default.createElement(u.default,{types:t,typeKey:d,isOpen:f,onSuccess:e=>{c(""),n(e)},onClosed:()=>{"function"==typeof i&&i(),c("")}})):o.default.createElement("div",{className:p},o.default.createElement("div",{className:"link-picker__cannot-create"},r.default._t("LinkField.CANNOT_CREATE_LINK","Cannot create link")))};t.Component=c,c.propTypes={types:i.default.object.isRequired,onModalSuccess:i.default.func.isRequired,onModalClosed:i.default.func,canCreate:i.default.bool.isRequired};var f=c;t.default=f},97:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(754)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),i=d(n(86)),l=n(127),a=n(852),u=d(n(686));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}const c=e=>{let{types:t,onSelect:n}=e;const[i,u]=(0,o.useState)(!1),{loading:s}=(0,o.useContext)(a.LinkFieldContext);return o.default.createElement(l.Dropdown,{disabled:s,isOpen:i,toggle:()=>u((e=>!e)),className:"link-picker__menu"},o.default.createElement(l.DropdownToggle,{className:"link-picker__menu-toggle font-icon-plus-1",caret:!0},r.default._t("LinkField.ADD_LINK","Add Link")),o.default.createElement(l.DropdownMenu,null,t.map((e=>{let{key:t,title:r,icon:i}=e;return o.default.createElement(l.DropdownItem,{key:t,onClick:()=>n(t)},o.default.createElement("span",{className:`link-picker__menu-icon ${i}`}),r)}))))};c.propTypes={types:i.default.arrayOf(u.default).isRequired,onSelect:i.default.func.isRequired};var f=c;t.default=f},734:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(820)),o=d(n(754)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),l=d(n(86)),a=n(127),u=n(852);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}const c=e=>t=>{t.nativeEvent.stopImmediatePropagation(),t.preventDefault(),t.nativeEvent.preventDefault(),t.stopPropagation(),e&&e()},f=e=>{let{id:t,title:n,description:l,versionState:s,typeTitle:d,typeIcon:f,onDelete:p,onClick:y,canDelete:v}=e;const{loading:_}=(0,i.useContext)(u.LinkFieldContext),k={"link-picker__link":!0,"form-control":!0};s&&(k[` link-picker__link--${s}`]=!0);const m=(0,r.default)(k),O=["unversioned","unsaved"].includes(s)?o.default._t("LinkField.DELETE","Delete"):o.default._t("LinkField.ARCHIVE","Archive");return i.default.createElement("div",{className:m},i.default.createElement(a.Button,{disabled:_,className:`link-picker__button ${f}`,color:"secondary",onClick:c(y)},i.default.createElement("div",{className:"link-picker__link-detail"},i.default.createElement("div",{className:"link-picker__title"},i.default.createElement("span",{className:"link-picker__title-text"},n),(e=>{let t="",n="";if("draft"===e)t=o.default._t("LinkField.LINK_DRAFT_TITLE","Link has draft changes"),n=o.default._t("LinkField.LINK_DRAFT_LABEL","Draft");else{if("modified"!==e)return null;t=o.default._t("LinkField.LINK_MODIFIED_TITLE","Link has unpublished changes"),n=o.default._t("LinkField.LINK_MODIFIED_LABEL","Modified")}const l=(0,r.default)("badge",`status-${e}`);return i.default.createElement("span",{className:l,title:t},n)})(s)),i.default.createElement("small",{className:"link-picker__type"},d,": ",i.default.createElement("span",{className:"link-picker__url"},l)))),v&&i.default.createElement(a.Button,{disabled:_,className:"link-picker__delete",color:"link",onClick:c((()=>p(t)))},O))};f.propTypes={id:l.default.number.isRequired,title:l.default.string,description:l.default.string,versionState:l.default.string,typeTitle:l.default.string.isRequired,typeIcon:l.default.string.isRequired,onDelete:l.default.func.isRequired,onClick:l.default.func.isRequired,canDelete:l.default.bool.isRequired};var p=f;t.default=p},697:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(363)),o=n(648),i=l(n(86));function l(e){return e&&e.__esModule?e:{default:e}}const a=e=>{let{types:t,typeKey:n,linkID:i=0,isOpen:l,onSuccess:a,onClosed:u}=e;if(!n)return!1;const s=t.hasOwnProperty(n)?t[n]:{},d=s&&s.hasOwnProperty("handlerName")?s.handlerName:"FormBuilderModal",c=(0,o.loadComponent)(`LinkModal.${d}`);return r.default.createElement(c,{typeTitle:s.title||"",typeKey:n,linkID:i,isOpen:l,onSuccess:a,onClosed:u})};a.propTypes={types:i.default.object.isRequired,typeKey:i.default.string.isRequired,linkID:i.default.number,isOpen:i.default.bool.isRequired,onSuccess:i.default.func.isRequired,onClosed:i.default.func.isRequired};var u=a;t.default=u},41:function(e,t,n){var r=a(n(311)),o=a(n(363)),i=a(n(691)),l=n(648);function a(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e(".js-injector-boot .entwine-linkfield").entwine({Component:null,Root:null,onmatch(){const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=this.data("schema-component"),r=(0,l.loadComponent)(n,t);this.setComponent(r),this.setRoot(i.default.createRoot(this[0])),this._super(),this.refresh()},refresh(){const e=this.getProps();this.getInputField().val(e.value);const t=this.getComponent();this.getRoot().render(o.default.createElement(t,u({},e,{noHolder:!0})))},handleChange(e){this.getInputField().data("value",e),this.refresh()},getProps(){const e=this.getInputField();return{value:e.data("value"),ownerID:e.data("owner-id"),ownerClass:e.data("owner-class"),ownerRelation:e.data("owner-relation"),onChange:this.handleChange.bind(this),isMulti:this.data("is-multi")??!1,types:this.data("types")??{},canCreate:!!e.data("can-create")}},getInputField(){const t=this.data("field-id");return e(`#${t}`)},onunmatch(){const e=this.getRoot();e&&e.unmount()}})}))},686:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(86))&&r.__esModule?r:{default:r};var i=o.default.shape({key:o.default.string.isRequired,title:o.default.string.isRequired,icon:o.default.string.isRequired});t.default=i},159:function(e){e.exports=Backend},510:function(e){e.exports=Config},42:function(e){e.exports=FieldHolder},912:function(e){e.exports=FormBuilderModal},648:function(e){e.exports=Injector},475:function(e){e.exports=InsertMediaModal},264:function(e){e.exports=Loading},872:function(e){e.exports=NodeUrl},86:function(e){e.exports=PropTypes},363:function(e){e.exports=React},691:function(e){e.exports=ReactDomClient},624:function(e){e.exports=ReactRedux},127:function(e){e.exports=Reactstrap},827:function(e){e.exports=Redux},123:function(e){e.exports=ToastsActions},820:function(e){e.exports=classnames},754:function(e){e.exports=i18n},311:function(e){e.exports=jQuery},902:function(e){e.exports=qs},845:function(e){e.exports=ssUrlLib}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n(274),n(41)}(); \ No newline at end of file +!function(){"use strict";var e={33:function(e,t,n){n.r(t),n.d(t,{AutoScrollActivator:function(){return xe},DndContext:function(){return Ge},DragOverlay:function(){return mt},KeyboardCode:function(){return ie},KeyboardSensor:function(){return ce},MeasuringFrequency:function(){return Se},MeasuringStrategy:function(){return De},MouseSensor:function(){return be},PointerSensor:function(){return ge},TouchSensor:function(){return we},TraversalOrder:function(){return Ce},applyModifiers:function(){return He},closestCenter:function(){return k},closestCorners:function(){return O},defaultAnnouncements:function(){return p},defaultCoordinates:function(){return y},defaultDropAnimation:function(){return pt},defaultDropAnimationSideEffects:function(){return ft},defaultScreenReaderInstructions:function(){return f},getClientRect:function(){return F},getFirstCollision:function(){return D},getScrollableAncestors:function(){return K},pointerWithin:function(){return L},rectIntersection:function(){return I},useDndContext:function(){return nt},useDndMonitor:function(){return d},useDraggable:function(){return tt},useDroppable:function(){return it},useSensor:function(){return m},useSensors:function(){return b}});var r=n(363),o=n.n(r),i=ReactDom,a=n(285);const l={display:"none"};function s(e){let{id:t,value:n}=e;return o().createElement("div",{id:t,style:l},n)}function u(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o().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 c=(0,r.createContext)(null);function d(e){const t=(0,r.useContext)(c);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)}),[e,t])}const f={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 "},p={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 v(e){let{announcements:t=p,container:n,hiddenTextDescribedById:l,screenReaderInstructions:c=f}=e;const{announce:v,announcement:g}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),h=(0,a.useUniqueId)("DndLiveRegion"),[m,b]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{b(!0)}),[]),d((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;v(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&v(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;v(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;v(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;v(t.onDragCancel({active:n,over:r}))}})),[v,t])),!m)return null;const y=o().createElement(o().Fragment,null,o().createElement(s,{id:l,value:c.draggable}),o().createElement(u,{id:h,announcement:g}));return n?(0,i.createPortal)(y,n):y}var g;function h(){}function m(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function b(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter((e=>null!=e))),[...t])}!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"}(g||(g={}));const y=Object.freeze({x:0,y:0});function w(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x(e,t){const n=(0,a.getEventCoordinates)(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function C(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function E(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function R(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function D(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function S(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 k=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=S(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=w(S(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(C)},O=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=R(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=R(r),a=o.reduce(((e,t,r)=>e+w(n[r],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(C)};function M(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=M(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(E)};function _(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}const L=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const e of t){const{id:t}=e,i=n.get(t);if(i&&_(r,i)){const n=R(i).reduce(((e,t)=>e+w(r,t)),0),a=Number((n/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:a}})}}return o.sort(C)};function N(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:y}function T(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 A=T(1);function j(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}const P={ignoreTransform:!1};function F(e,t){void 0===t&&(t=P);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=(0,a.getWindow)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=j(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),u=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),c=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:c,height:d,top:u,right:s+c,bottom:u+d,left:s}}(n,t,r))}const{top:r,left:o,width:i,height:l,bottom:s,right:u}=n;return{top:r,left:o,width:i,height:l,bottom:s,right:u}}function q(e){return F(e,{ignoreTransform:!0})}function K(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,a.isDocument)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,a.isHTMLElement)(o)||(0,a.isSVGElement)(o))return n;if(n.includes(o))return n;const i=(0,a.getWindow)(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=(0,a.getWindow)(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=(0,a.getWindow)(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function W(e){const[t]=K(e,1);return null!=t?t:null}function B(e){return a.canUseDOM&&e?(0,a.isWindow)(e)?e:(0,a.isNode)(e)?(0,a.isDocument)(e)||e===(0,a.getOwnerDocument)(e).scrollingElement?window:(0,a.isHTMLElement)(e)?e:null:null:null}function U(e){return(0,a.isWindow)(e)?e.scrollX:e.scrollLeft}function z(e){return(0,a.isWindow)(e)?e.scrollY:e.scrollTop}function X(e){return{x:U(e),y:z(e)}}var V;function Y(e){return!(!a.canUseDOM||!e)&&e===document.scrollingElement}function H(e){const t={x:0,y:0},n=Y(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"}(V||(V={}));const $={x:.2,y:.2};function J(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=$);const{isTop:u,isBottom:c,isLeft:d,isRight:f}=H(e),p={x:0,y:0},v={x:0,y:0},g=t.height*o.y,h=t.width*o.x;return!u&&i<=t.top+g?(p.y=V.Backward,v.y=r*Math.abs((t.top+g-i)/g)):!c&&s>=t.bottom-g&&(p.y=V.Forward,v.y=r*Math.abs((t.bottom-g-s)/g)),!f&&l>=t.right-h?(p.x=V.Forward,v.x=r*Math.abs((t.right-h-l)/h)):!d&&a<=t.left+h&&(p.x=V.Backward,v.x=r*Math.abs((t.left+h-a)/h)),{direction:p,speed:v}}function G(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 Q(e){return e.reduce(((e,t)=>(0,a.add)(e,X(t))),y)}function Z(e,t){if(void 0===t&&(t=F),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);W(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ee=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+U(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+z(t)),0)}]];class te{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=K(t),r=Q(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of ee)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 ne{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 re(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 oe,ie;function ae(e){e.preventDefault()}function le(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"}(oe||(oe={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ie||(ie={}));const se={start:[ie.Space,ie.Enter],cancel:[ie.Esc],end:[ie.Space,ie.Enter]},ue=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ie.Right:return{...n,x:n.x+25};case ie.Left:return{...n,x:n.x-25};case ie.Down:return{...n,y:n.y+25};case ie.Up:return{...n,y:n.y-25}}};class ce{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 ne((0,a.getOwnerDocument)(t)),this.windowListeners=new ne((0,a.getWindow)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(oe.Resize,this.handleCancel),this.windowListeners.add(oe.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(oe.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Z(n),t(y)}handleKeyDown(e){if((0,a.isKeyboardEvent)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=se,coordinateGetter:i=ue,scrollBehavior:l="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:u}=n.current,c=u?{x:u.left,y:u.top}:y;this.referenceCoordinates||(this.referenceCoordinates=c);const d=i(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=(0,a.subtract)(d,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:u,maxScroll:c,minScroll:f}=H(n),p=G(n),v={x:Math.min(o===ie.Right?p.right-p.width/2:p.right,Math.max(o===ie.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(o===ie.Down?p.bottom-p.height/2:p.bottom,Math.max(o===ie.Down?p.top:p.top+p.height/2,d.y))},g=o===ie.Right&&!a||o===ie.Left&&!s,h=o===ie.Down&&!u||o===ie.Up&&!i;if(g&&v.x!==d.x){const e=n.scrollLeft+t.x,i=o===ie.Right&&e<=c.x||o===ie.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===ie.Right?n.scrollLeft-c.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(h&&v.y!==d.y){const e=n.scrollTop+t.y,i=o===ie.Down&&e<=c.y||o===ie.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===ie.Down?n.scrollTop-c.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,a.add)((0,a.subtract)(d,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 de(e){return Boolean(e&&"distance"in e)}function fe(e){return Boolean(e&&"delay"in e)}ce.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=se,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 pe{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,a.getWindow)(e);return e instanceof t?e:(0,a.getOwnerDocument)(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=(0,a.getOwnerDocument)(i),this.documentListeners=new ne(this.document),this.listeners=new ne(n),this.windowListeners=new ne((0,a.getWindow)(i)),this.initialCoordinates=null!=(r=(0,a.getEventCoordinates)(o))?r:y,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(oe.Resize,this.handleCancel),this.windowListeners.add(oe.DragStart,ae),this.windowListeners.add(oe.VisibilityChange,this.handleCancel),this.windowListeners.add(oe.ContextMenu,ae),this.documentListeners.add(oe.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(fe(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(de(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(oe.Click,le,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(oe.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!r)return;const s=null!=(t=(0,a.getEventCoordinates)(e))?t:y,u=(0,a.subtract)(r,s);if(!n&&l){if(de(l)){if(null!=l.tolerance&&re(u,l.tolerance))return this.handleCancel();if(re(u,l.distance))return this.handleStart()}return fe(l)&&re(u,l.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===ie.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ve={move:{name:"pointermove"},end:{name:"pointerup"}};class ge extends pe{constructor(e){const{event:t}=e,n=(0,a.getOwnerDocument)(t.target);super(e,ve,n)}}ge.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 he={move:{name:"mousemove"},end:{name:"mouseup"}};var me;!function(e){e[e.RightClick=2]="RightClick"}(me||(me={}));class be extends pe{constructor(e){super(e,he,(0,a.getOwnerDocument)(e.event.target))}}be.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==me.RightClick&&(null==r||r({event:n}),!0)}}];const ye={move:{name:"touchmove"},end:{name:"touchend"}};class we extends pe{constructor(e){super(e,ye)}static setup(){return window.addEventListener(ye.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ye.move.name,e)};function e(){}}}var xe,Ce;function Ee(e){let{acceleration:t,activator:n=xe.Pointer,canScroll:o,draggingRect:i,enabled:l,interval:s=5,order:u=Ce.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:f,delta:p,threshold:v}=e;const g=function(e){let{delta:t,disabled:n}=e;const r=(0,a.usePrevious)(t);return(0,a.useLazyMemo)((e=>{if(n||!r||!e)return Re;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[V.Backward]:e.x[V.Backward]||-1===o.x,[V.Forward]:e.x[V.Forward]||1===o.x},y:{[V.Backward]:e.y[V.Backward]||-1===o.y,[V.Forward]:e.y[V.Forward]||1===o.y}}}),[n,t,r])}({delta:p,disabled:!l}),[h,m]=(0,a.useInterval)(),b=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case xe.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case xe.DraggableRect:return i}}),[n,i,c]),x=(0,r.useRef)(null),C=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=b.current.x*y.current.x,n=b.current.y*y.current.y;e.scrollBy(t,n)}),[]),E=(0,r.useMemo)((()=>u===Ce.TreeOrder?[...d].reverse():d),[u,d]);(0,r.useEffect)((()=>{if(l&&d.length&&w){for(const e of E){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=J(e,r,w,t,v);for(const e of["x","y"])g[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return m(),x.current=e,h(C,s),b.current=a,void(y.current=i)}b.current={x:0,y:0},y.current={x:0,y:0},m()}else m()}),[t,C,o,m,l,s,JSON.stringify(w),JSON.stringify(g),h,d,E,f,JSON.stringify(v)])}we.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"}(xe||(xe={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Ce||(Ce={}));const Re={x:{[V.Backward]:!1,[V.Forward]:!1},y:{[V.Backward]:!1,[V.Forward]:!1}};var De,Se;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(De||(De={})),function(e){e.Optimized="optimized"}(Se||(Se={}));const ke=new Map;function Oe(e,t){return(0,a.useLazyMemo)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Me(e){let{callback:t,disabled:n}=e;const o=(0,a.useEvent)(t),i=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,r.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function Ie(e){return new te(F(e),e)}function _e(e,t,n){void 0===t&&(t=Ie);const[o,i]=(0,r.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);if(JSON.stringify(r)===JSON.stringify(i))return r;return i}),null),l=function(e){let{callback:t,disabled:n}=e;const o=(0,a.useEvent)(t),i=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,r.useEffect)((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),s=Me({callback:i});return(0,a.useIsomorphicLayoutEffect)((()=>{i(),e?(null==s||s.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==l||l.disconnect())}),[e]),o}const Le=[];function Ne(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==y;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,a.subtract)(e,n.current):y}function Te(e){return(0,r.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 Ae=[];function je(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,a.isHTMLElement)(t)?t:e}const Pe=[{sensor:ge,options:{}},{sensor:ce,options:{}}],Fe={current:{}},qe={draggable:{measure:q},droppable:{measure:q,strategy:De.WhileDragging,frequency:Se.Optimized},dragOverlay:{measure:F}};class Ke 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 We={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ke,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:h},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:qe,measureDroppableContainers:h,windowRect:null,measuringScheduled:!1},Be={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:h,draggableNodes:new Map,over:null,measureDroppableContainers:h},Ue=(0,r.createContext)(Be),ze=(0,r.createContext)(We);function Xe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ke}}}function Ve(e,t){switch(t.type){case g.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case g.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 g.DragEnd:case g.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case g.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ke(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case g.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 Ke(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case g.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ke(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ye(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=(0,r.useContext)(Ue),l=(0,a.usePrevious)(o),s=(0,a.usePrevious)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&l&&null!=s){if(!(0,a.isKeyboardEvent)(l))return;if(document.activeElement===l.target)return;const e=i.get(s);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=(0,a.findFirstFocusableNode)(e);if(t){t.focus();break}}}))}}),[o,t,i,s,l]),null}function He(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const $e=(0,r.createContext)({...y,scaleX:1,scaleY:1});var Je;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Je||(Je={}));const Ge=(0,r.memo)((function(e){var t,n,l,s;let{id:u,accessibility:d,autoScroll:f=!0,children:p,sensors:h=Pe,collisionDetection:m=I,measuring:b,modifiers:w,...x}=e;const C=(0,r.useReducer)(Ve,void 0,Xe),[E,R]=C,[S,k]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.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,M]=(0,r.useState)(Je.Uninitialized),_=O===Je.Initialized,{draggable:{active:L,nodes:T,translate:j},droppable:{containers:P}}=E,q=L?T.get(L):null,U=(0,r.useRef)({initial:null,translated:null}),z=(0,r.useMemo)((()=>{var e;return null!=L?{id:L,data:null!=(e=null==q?void 0:q.data)?e:Fe,rect:U}:null}),[L,q]),V=(0,r.useRef)(null),[H,$]=(0,r.useState)(null),[J,G]=(0,r.useState)(null),Z=(0,a.useLatestValue)(x,Object.values(x)),ee=(0,a.useUniqueId)("DndDescribedBy",u),ne=(0,r.useMemo)((()=>P.getEnabled()),[P]),re=(oe=b,(0,r.useMemo)((()=>({draggable:{...qe.draggable,...null==oe?void 0:oe.draggable},droppable:{...qe.droppable,...null==oe?void 0:oe.droppable},dragOverlay:{...qe.dragOverlay,...null==oe?void 0:oe.dragOverlay}})),[null==oe?void 0:oe.draggable,null==oe?void 0:oe.droppable,null==oe?void 0:oe.dragOverlay]));var oe;const{droppableRects:ie,measureDroppableContainers:ae,measuringScheduled:le}=function(e,t){let{dragging:n,dependencies:o,config:i}=t;const[l,s]=(0,r.useState)(null),{frequency:u,measure:c,strategy:d}=i,f=(0,r.useRef)(e),p=function(){switch(d){case De.Always:return!1;case De.BeforeDragging:return n;default:return!n}}(),v=(0,a.useLatestValue)(p),g=(0,r.useCallback)((function(e){void 0===e&&(e=[]),v.current||s((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[v]),h=(0,r.useRef)(null),m=(0,a.useLazyMemo)((t=>{if(p&&!n)return ke;if(!t||t===ke||f.current!==e||null!=l){const 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}const e=n.node.current,r=e?new te(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,l,n,p,c]);return(0,r.useEffect)((()=>{f.current=e}),[e]),(0,r.useEffect)((()=>{p||g()}),[n,p]),(0,r.useEffect)((()=>{l&&l.length>0&&s(null)}),[JSON.stringify(l)]),(0,r.useEffect)((()=>{p||"number"!=typeof u||null!==h.current||(h.current=setTimeout((()=>{g(),h.current=null}),u))}),[u,p,g,...o]),{droppableRects:m,measureDroppableContainers:g,measuringScheduled:null!=l}}(ne,{dragging:_,dependencies:[j.x,j.y],config:re.droppable}),se=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,a.useLazyMemo)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(T,L),ue=(0,r.useMemo)((()=>J?(0,a.getEventCoordinates)(J):null),[J]),ce=function(){const e=!1===(null==H?void 0:H.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=_&&!e&&!t;if("object"==typeof f)return{...f,enabled:n};return{enabled:n}}(),de=function(e,t){return Oe(e,t)}(se,re.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const l=(0,r.useRef)(!1),{x:s,y:u}="boolean"==typeof i?{x:i,y:i}:i;(0,a.useIsomorphicLayoutEffect)((()=>{if(!s&&!u||!t)return void(l.current=!1);if(l.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=N(n(e),o);if(s||(r.x=0),u||(r.y=0),l.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=W(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,s,u,o,n])}({activeNode:L?T.get(L):null,config:ce.layoutShiftCompensation,initialRect:de,measure:re.draggable.measure});const fe=_e(se,re.draggable.measure,de),pe=_e(se?se.parentElement:null),ve=(0,r.useRef)({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:ie,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ge=P.getNodeFor(null==(t=ve.current.over)?void 0:t.id),he=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),i=Me({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,a.isHTMLElement)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),l=(0,r.useCallback)((e=>{const n=je(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)}),[t,i]),[s,u]=(0,a.useNodeRef)(l);return(0,r.useMemo)((()=>({nodeRef:s,rect:n,setRef:u})),[n,s,u])}({measure:re.dragOverlay.measure}),me=null!=(n=he.nodeRef.current)?n:se,be=_?null!=(l=he.rect)?l:fe:null,ye=Boolean(he.nodeRef.current&&he.rect),we=N(xe=ye?null:fe,Oe(xe));var xe;const Ce=Te(me?(0,a.getWindow)(me):null),Re=function(e){const t=(0,r.useRef)(e),n=(0,a.useLazyMemo)((n=>e?n&&n!==Le&&e&&t.current&&e.parentNode===t.current.parentNode?n:K(e):Le),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(_?null!=ge?ge:se:null),Se=function(e,t){void 0===t&&(t=F);const[n]=e,o=Te(n?(0,a.getWindow)(n):null),[i,l]=(0,r.useReducer)((function(){return e.length?e.map((e=>Y(e)?o:new te(t(e),e))):Ae}),Ae),s=Me({callback:l});return e.length>0&&i===Ae&&l(),(0,a.useIsomorphicLayoutEffect)((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),l())}),[e]),i}(Re),Ie=He(w,{transform:{x:j.x-we.x,y:j.y-we.y,scaleX:1,scaleY:1},activatorEvent:J,active:z,activeNodeRect:fe,containerNodeRect:pe,draggingNodeRect:be,over:ve.current.over,overlayNodeRect:he.rect,scrollableAncestors:Re,scrollableAncestorRects:Se,windowRect:Ce}),Ke=ue?(0,a.add)(ue,j):null,We=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),i=(0,r.useCallback)((e=>{const t=B(e.target);t&&n((e=>e?(e.set(t,X(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const a=e.map((e=>{const t=B(e);return t?(t.addEventListener("scroll",i,{passive:!0}),[t,X(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=B(e);null==t||t.removeEventListener("scroll",i)}))}}),[i,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,a.add)(e,t)),y):Q(e):y),[e,t])}(Re),Be=Ne(We),Ge=Ne(We,[fe]),Qe=(0,a.add)(Ie,Be),Ze=be?A(be,Ie):null,et=z&&Ze?m({active:z,collisionRect:Ze,droppableRects:ie,droppableContainers:ne,pointerCoordinates:Ke}):null,tt=D(et,"id"),[nt,rt]=(0,r.useState)(null),ot=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ye?Ie:(0,a.add)(Ie,Ge),null!=(s=null==nt?void 0:nt.rect)?s:null,fe),it=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==V.current)return;const o=T.get(V.current);if(!o)return;const a=e.nativeEvent,l=new n({active:V.current,activeNode:o,event:a,options:r,context:ve,onStart(e){const t=V.current;if(null==t)return;const n=T.get(t);if(!n)return;const{onDragStart:r}=Z.current,o={active:{id:t,data:n.data,rect:U}};(0,i.unstable_batchedUpdates)((()=>{null==r||r(o),M(Je.Initializing),R({type:g.DragStart,initialCoordinates:e,active:t}),S({type:"onDragStart",event:o})}))},onMove(e){R({type:g.DragMove,coordinates:e})},onEnd:s(g.DragEnd),onCancel:s(g.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=ve.current;let l=null;if(t&&o){const{cancelDrop:i}=Z.current;if(l={activatorEvent:a,active:t,collisions:n,delta:o,over:r},e===g.DragEnd&&"function"==typeof i){await Promise.resolve(i(l))&&(e=g.DragCancel)}}V.current=null,(0,i.unstable_batchedUpdates)((()=>{R({type:e}),M(Je.Uninitialized),rt(null),$(null),G(null);const t=e===g.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=Z.current[t];null==e||e(l),S({type:t,event:l})}}))}}(0,i.unstable_batchedUpdates)((()=>{$(l),G(e.nativeEvent)}))}),[T]),at=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=T.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,it(n,t))}),[T,it]),lt=function(e,t){return(0,r.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])}(h,at);!function(e){(0,r.useEffect)((()=>{if(!a.canUseDOM)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})))}(h),(0,a.useIsomorphicLayoutEffect)((()=>{fe&&O===Je.Initializing&&M(Je.Initialized)}),[fe,O]),(0,r.useEffect)((()=>{const{onDragMove:e}=Z.current,{active:t,activatorEvent:n,collisions:r,over:o}=ve.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:Qe.x,y:Qe.y},over:o};(0,i.unstable_batchedUpdates)((()=>{null==e||e(a),S({type:"onDragMove",event:a})}))}),[Qe.x,Qe.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=ve.current;if(!e||null==V.current||!t||!o)return;const{onDragOver:a}=Z.current,l=r.get(tt),s=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,u={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,i.unstable_batchedUpdates)((()=>{rt(s),null==a||a(u),S({type:"onDragOver",event:u})}))}),[tt]),(0,a.useIsomorphicLayoutEffect)((()=>{ve.current={activatorEvent:J,active:z,activeNode:se,collisionRect:Ze,collisions:et,droppableRects:ie,draggableNodes:T,draggingNode:me,draggingNodeRect:be,droppableContainers:P,over:nt,scrollableAncestors:Re,scrollAdjustedTranslate:Qe},U.current={initial:be,translated:Ze}}),[z,se,et,Ze,T,me,be,ie,P,nt,Re,Qe]),Ee({...ce,delta:j,draggingRect:Ze,pointerCoordinates:Ke,scrollableAncestors:Re,scrollableAncestorRects:Se});const st=(0,r.useMemo)((()=>({active:z,activeNode:se,activeNodeRect:fe,activatorEvent:J,collisions:et,containerNodeRect:pe,dragOverlay:he,draggableNodes:T,droppableContainers:P,droppableRects:ie,over:nt,measureDroppableContainers:ae,scrollableAncestors:Re,scrollableAncestorRects:Se,measuringConfiguration:re,measuringScheduled:le,windowRect:Ce})),[z,se,fe,J,et,pe,he,T,P,ie,nt,ae,Re,Se,re,le,Ce]),ut=(0,r.useMemo)((()=>({activatorEvent:J,activators:lt,active:z,activeNodeRect:fe,ariaDescribedById:{draggable:ee},dispatch:R,draggableNodes:T,over:nt,measureDroppableContainers:ae})),[J,lt,z,fe,R,ee,T,nt,ae]);return o().createElement(c.Provider,{value:k},o().createElement(Ue.Provider,{value:ut},o().createElement(ze.Provider,{value:st},o().createElement($e.Provider,{value:ot},p)),o().createElement(Ye,{disabled:!1===(null==d?void 0:d.restoreFocus)})),o().createElement(v,{...d,hiddenTextDescribedById:ee}))})),Qe=(0,r.createContext)(null),Ze="button",et="Droppable";function tt(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=(0,a.useUniqueId)(et),{activators:s,activatorEvent:u,active:c,activeNodeRect:d,ariaDescribedById:f,draggableNodes:p,over:v}=(0,r.useContext)(Ue),{role:g=Ze,roleDescription:h="draggable",tabIndex:m=0}=null!=i?i:{},b=(null==c?void 0:c.id)===t,y=(0,r.useContext)(b?$e:Qe),[w,x]=(0,a.useNodeRef)(),[C,E]=(0,a.useNodeRef)(),R=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),D=(0,a.useLatestValue)(n);(0,a.useIsomorphicLayoutEffect)((()=>(p.set(t,{id:t,key:l,node:w,activatorNode:C,data:D}),()=>{const e=p.get(t);e&&e.key===l&&p.delete(t)})),[p,t]);return{active:c,activatorEvent:u,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:g,tabIndex:m,"aria-disabled":o,"aria-pressed":!(!b||g!==Ze)||void 0,"aria-roledescription":h,"aria-describedby":f.draggable})),[o,g,m,b,h,f.draggable]),isDragging:b,listeners:o?void 0:R,node:w,over:v,setNodeRef:x,setActivatorNodeRef:E,transform:y}}function nt(){return(0,r.useContext)(ze)}const rt="Droppable",ot={timeout:25};function it(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const l=(0,a.useUniqueId)(rt),{active:s,dispatch:u,over:c,measureDroppableContainers:d}=(0,r.useContext)(Ue),f=(0,r.useRef)({disabled:n}),p=(0,r.useRef)(!1),v=(0,r.useRef)(null),h=(0,r.useRef)(null),{disabled:m,updateMeasurementsFor:b,timeout:y}={...ot,...i},w=(0,a.useLatestValue)(null!=b?b:o),x=Me({callback:(0,r.useCallback)((()=>{p.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),h.current=null}),y)):p.current=!0}),[y]),disabled:m||!s}),C=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),p.current=!1),e&&x.observe(e))}),[x]),[E,R]=(0,a.useNodeRef)(C),D=(0,a.useLatestValue)(t);return(0,r.useEffect)((()=>{x&&E.current&&(x.disconnect(),p.current=!1,x.observe(E.current))}),[E,x]),(0,a.useIsomorphicLayoutEffect)((()=>(u({type:g.RegisterDroppable,element:{id:o,key:l,disabled:n,node:E,rect:v,data:D}}),()=>u({type:g.UnregisterDroppable,key:l,id:o}))),[o]),(0,r.useEffect)((()=>{n!==f.current.disabled&&(u({type:g.SetDroppableDisabled,id:o,key:l,disabled:n}),f.current.disabled=n)}),[o,l,n,u]),{active:s,rect:v,isOver:(null==c?void 0:c.id)===o,node:E,over:c,setNodeRef:R}}function at(e){let{animation:t,children:n}=e;const[i,l]=(0,r.useState)(null),[s,u]=(0,r.useState)(null),c=(0,a.usePrevious)(n);return n||i||!c||l(c),(0,a.useIsomorphicLayoutEffect)((()=>{if(!s)return;const e=null==i?void 0:i.key,n=null==i?void 0:i.props.id;null!=e&&null!=n?Promise.resolve(t(n,s)).then((()=>{l(null)})):l(null)}),[t,i,s]),o().createElement(o().Fragment,null,n,i?(0,r.cloneElement)(i,{ref:u}):null)}const lt={x:0,y:0,scaleX:1,scaleY:1};function st(e){let{children:t}=e;return o().createElement(Ue.Provider,{value:Be},o().createElement($e.Provider,{value:lt},t))}const ut={position:"fixed",touchAction:"none"},ct=e=>(0,a.isKeyboardEvent)(e)?"transform 250ms ease":void 0,dt=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:l,className:s,rect:u,style:c,transform:d,transition:f=ct}=e;if(!u)return null;const p=i?d:{...d,scaleX:1,scaleY:1},v={...ut,width:u.width,height:u.height,top:u.top,left:u.left,transform:a.CSS.Transform.toString(p),transformOrigin:i&&r?x(r,u):void 0,transition:"function"==typeof f?f(r):f,...c};return o().createElement(n,{className:s,style:v,ref:t},l)})),ft=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},pt={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:a.CSS.Transform.toString(t)},{transform:a.CSS.Transform.toString(n)}]},sideEffects:ft({styles:{active:{opacity:"0"}}})};function vt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,a.useEvent)(((e,i)=>{if(null===t)return;const l=n.get(e);if(!l)return;const s=l.node.current;if(!s)return;const u=je(i);if(!u)return;const{transform:c}=(0,a.getWindow)(i).getComputedStyle(i),d=j(c);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...pt,...e};return e=>{let{active:i,dragOverlay:a,transform:l,...s}=e;if(!t)return;const u={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},c={scaleX:1!==l.scaleX?i.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?i.rect.height*l.scaleY/a.rect.height:1},d={x:l.x-u.x,y:l.y-u.y,...c},f=o({...s,active:i,dragOverlay:a,transform:{initial:l,final:d}}),[p]=f,v=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(v))return;const g=null==r?void 0:r({active:i,dragOverlay:a,...s}),h=a.node.animate(f,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{h.onfinish=()=>{null==g||g(),e()}}))}}(t);return Z(s,o.draggable.measure),f({active:{id:e,data:l.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:o,transform:d})}))}let gt=0;function ht(e){return(0,r.useMemo)((()=>{if(null!=e)return gt++,gt}),[e])}const mt=o().memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:s,wrapperElement:u="div",className:c,zIndex:d=999}=e;const{activatorEvent:f,active:p,activeNodeRect:v,containerNodeRect:g,draggableNodes:h,droppableContainers:m,dragOverlay:b,over:y,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:C,windowRect:E}=nt(),R=(0,r.useContext)($e),D=ht(null==p?void 0:p.id),S=He(s,{activatorEvent:f,active:p,activeNodeRect:v,containerNodeRect:g,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:x,scrollableAncestorRects:C,transform:R,windowRect:E}),k=Oe(v),O=vt({config:i,draggableNodes:h,droppableContainers:m,measuringConfiguration:w}),M=k?b.setRef:void 0;return o().createElement(st,null,o().createElement(at,{animation:O},p&&D?o().createElement(dt,{key:D,id:p.id,ref:M,as:u,activatorEvent:f,adjustScale:t,className:c,transition:l,rect:k,style:{zIndex:d,...a},transform:S},n):null))}))},339:function(e,t,n){n.r(t),n.d(t,{createSnapModifier:function(){return o},restrictToFirstScrollableAncestor:function(){return s},restrictToHorizontalAxis:function(){return i},restrictToParentElement:function(){return l},restrictToVerticalAxis:function(){return u},restrictToWindowEdges:function(){return c},snapCenterToCursor:function(){return d}});var r=n(285);function o(e){return t=>{let{transform:n}=t;return{...n,x:Math.ceil(n.x/e)*e,y:Math.ceil(n.y/e)*e}}}const i=e=>{let{transform:t}=e;return{...t,y:0}};function a(e,t,n){const 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}const l=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?a(r,n,t):r},s=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e;const o=r[0];return t&&o?a(n,t,o):n},u=e=>{let{transform:t}=e;return{...t,x:0}},c=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return n&&r?a(t,n,r):t},d=e=>{let{activatorEvent:t,draggingNodeRect:n,transform:o}=e;if(n&&t){const e=(0,r.getEventCoordinates)(t);if(!e)return o;const i=e.x-n.left,a=e.y-n.top;return{...o,x:o.x+i-n.width/2,y:o.y+a-n.height/2}}return o}},587:function(e,t,n){n.r(t),n.d(t,{SortableContext:function(){return y},arrayMove:function(){return l},arraySwap:function(){return s},defaultAnimateLayoutChanges:function(){return x},defaultNewIndexGetter:function(){return w},hasSortableData:function(){return k},horizontalListSortingStrategy:function(){return f},rectSortingStrategy:function(){return p},rectSwappingStrategy:function(){return v},sortableKeyboardCoordinates:function(){return M},useSortable:function(){return S},verticalListSortingStrategy:function(){return h}});var r=n(363),o=n.n(r),i=n(33),a=n(285);function l(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function s(e,t,n){const r=e.slice();return r[t]=e[n],r[n]=e[t],r}function u(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function c(e){return null!==e&&e>=0}const d={scaleX:1,scaleY:1},f=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:i,index:a}=e;const l=null!=(t=n[o])?t:r;if(!l)return null;const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r||!o&&!i)return 0;if(no&&a<=i?{x:-l.width-s,y:0,...d}:a=i?{x:l.width+s,y:0,...d}:{x:0,y:0,...d}};const p=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=l(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},v=e=>{let t,n,{activeIndex:r,index:o,rects:i,overIndex:a}=e;return o===r&&(t=i[o],n=i[a]),o===a&&(t=i[o],n=i[r]),n&&t?{x:n.left-t.left,y:n.top-t.top,scaleX:n.width/t.width,scaleY:n.height/t.height}:null},g={scaleX:1,scaleY:1},h=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,...g}:o=a?{x:0,y:l.height+s,...g}:{x:0,y:0,...g}};const m="Sortable",b=o().createContext({activeIndex:-1,containerId:m,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:p,disabled:{draggable:!1,droppable:!1}});function y(e){let{children:t,id:n,items:l,strategy:s=p,disabled:c=!1}=e;const{active:d,dragOverlay:f,droppableRects:v,over:g,measureDroppableContainers:h}=(0,i.useDndContext)(),y=(0,a.useUniqueId)(m,n),w=Boolean(null!==f.rect),x=(0,r.useMemo)((()=>l.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[l]),C=null!=d,E=d?x.indexOf(d.id):-1,R=g?x.indexOf(g.id):-1,D=(0,r.useRef)(x),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{S&&C&&h(x)}),[S,x,C,h]),(0,r.useEffect)((()=>{D.current=x}),[x]);const M=(0,r.useMemo)((()=>({activeIndex:E,containerId:y,disabled:O,disableTransforms:k,items:x,overIndex:R,useDragOverlay:w,sortedRects:u(x,v),strategy:s})),[E,y,O.draggable,O.droppable,k,x,R,v,w,s]);return o().createElement(b.Provider,{value:M},t)}const w=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return l(n,r,o).indexOf(t)},x=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:s,transition:u}=e;return!(!u||!r)&&((l===i||o!==a)&&(!!n||a!==o&&t===s))},C={duration:200,easing:"ease"},E="transform",R=a.CSS.Transition.toString({property:E,duration:0,easing:"linear"}),D={roleDescription:"sortable"};function S(e){let{animateLayoutChanges:t=x,attributes:n,disabled:o,data:l,getNewIndex:s=w,id:u,strategy:d,resizeObserverConfig:f,transition:p=C}=e;const{items:v,containerId:g,activeIndex:h,disabled:m,disableTransforms:y,sortedRects:S,overIndex:k,useDragOverlay:O,strategy:M}=(0,r.useContext)(b),I=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{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,m),_=v.indexOf(u),L=(0,r.useMemo)((()=>({sortable:{containerId:g,index:_,items:v},...l})),[g,l,_,v]),N=(0,r.useMemo)((()=>v.slice(v.indexOf(u))),[v,u]),{rect:T,node:A,isOver:j,setNodeRef:P}=(0,i.useDroppable)({id:u,data:L,disabled:I.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...f}}),{active:F,activatorEvent:q,activeNodeRect:K,attributes:W,setNodeRef:B,listeners:U,isDragging:z,over:X,setActivatorNodeRef:V,transform:Y}=(0,i.useDraggable)({id:u,data:L,attributes:{...D,...n},disabled:I.draggable}),H=(0,a.useCombinedRefs)(P,B),$=Boolean(F),J=$&&!y&&c(h)&&c(k),G=!O&&z,Q=G&&J?Y:null,Z=J?null!=Q?Q:(null!=d?d:M)({rects:S,activeNodeRect:K,activeIndex:h,overIndex:k,index:_}):null,ee=c(h)&&c(k)?s({id:u,items:v,activeIndex:h,overIndex:k}):_,te=null==F?void 0:F.id,ne=(0,r.useRef)({activeId:te,items:v,newIndex:ee,containerId:g}),re=v!==ne.current.items,oe=t({active:F,containerId:g,isDragging:z,isSorting:$,id:u,index:_,items:v,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:p,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:o,rect:l}=e;const[s,u]=(0,r.useState)(null),c=(0,r.useRef)(n);return(0,a.useIsomorphicLayoutEffect)((()=>{if(!t&&n!==c.current&&o.current){const e=l.current;if(e){const t=(0,i.getClientRect)(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)&&u(n)}}n!==c.current&&(c.current=n)}),[t,n,o,l]),(0,r.useEffect)((()=>{s&&u(null)}),[s]),s}({disabled:!oe,index:_,node:A,rect:T});return(0,r.useEffect)((()=>{$&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),g!==ne.current.containerId&&(ne.current.containerId=g),v!==ne.current.items&&(ne.current.items=v)}),[$,ee,g,v]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:F,activeIndex:h,attributes:W,data:L,rect:T,index:_,newIndex:ee,items:v,isOver:j,isSorting:$,isDragging:z,listeners:U,node:A,overIndex:k,over:X,setNodeRef:H,setActivatorNodeRef:V,setDroppableNodeRef:P,setDraggableNodeRef:B,transform:null!=ie?ie:Z,transition:function(){if(ie||re&&ne.current.newIndex===_)return R;if(G&&!(0,a.isKeyboardEvent)(q)||!p)return;if($||oe)return a.CSS.Transition.toString({...p,property:E});return}()}}function k(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const O=[i.KeyboardCode.Down,i.KeyboardCode.Right,i.KeyboardCode.Up,i.KeyboardCode.Left],M=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:l,over:s,scrollableAncestors:u}}=t;if(O.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];l.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const a=o.get(n.id);if(a)switch(e.code){case i.KeyboardCode.Down:r.topa.top&&t.push(n);break;case i.KeyboardCode.Left:r.left>a.left&&t.push(n);break;case i.KeyboardCode.Right:r.left1&&(d=c[1].id),null!=d){const e=l.get(n.id),t=l.get(d),s=t?o.get(t.id):null,c=null==t?void 0:t.node.current;if(c&&s&&e&&t){const n=(0,i.getScrollableAncestors)(c).some(((e,t)=>u[t]!==e)),o=I(e,t),l=function(e,t){if(!k(e)||!k(t))return!1;if(!I(e,t))return!1;return e.data.current.sortable.indexe=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function l(e){return"nodeType"in e}function s(e){var t,n;return e?a(e)?e:l(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function u(e){const{Document:t}=s(e);return e instanceof t}function c(e){return!a(e)&&e instanceof s(e).HTMLElement}function d(e){return e instanceof s(e).SVGElement}function f(e){return e?a(e)?e.document:l(e)?u(e)?e:c(e)||d(e)?e.ownerDocument:document:document:document}const p=i?r.useLayoutEffect:r.useEffect;function v(e){const t=(0,r.useRef)(e);return p((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function h(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return p((()=>{n.current!==e&&(n.current=e)}),t),n}function m(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function b(e){const t=v(e),n=(0,r.useRef)(null),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function C(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 E=C(1),R=C(-1);function D(e){return"clientX"in e&&"clientY"in e}function S(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function k(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}function O(e){if(k(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 D(e)?{x:e.clientX,y:e.clientY}:null}const M=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[M.Translate.toString(e),M.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),I="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function _(e){return e.matches(I)?e:e.querySelector(I)}},274:function(e,t,n){var r,o=(r=n(521))&&r.__esModule?r:{default:r};document.addEventListener("DOMContentLoaded",(()=>{(0,o.default)()}))},521:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(648)),o=s(n(809)),i=s(n(852)),a=s(n(117)),l=s(n(606));function s(e){return e&&e.__esModule?e:{default:e}}var u=()=>{r.default.component.registerMany({LinkPicker:o.default,LinkField:i.default,"LinkModal.FormBuilderModal":a.default,"LinkModal.InsertMediaModal":l.default})};t.default=u},852:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.LinkFieldContext=t.Component=void 0;var r=D(n(363)),o=n(827),i=n(624),a=n(33),l=n(587),s=n(339),u=(n(648),E(n(42))),c=E(n(809)),d=E(n(734)),f=E(n(264)),p=E(n(697)),v=D(n(123)),g=E(n(159)),h=E(n(510)),m=n(845),b=E(n(86)),y=E(n(754)),w=E(n(872)),x=E(n(902)),C=E(n(820));function E(e){return e&&e.__esModule?e:{default:e}}function R(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(R=function(e){return e?n:t})(e)}function D(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=R(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}const S=(0,r.createContext)(null);t.LinkFieldContext=S;const k="SilverStripe\\LinkField\\Controllers\\LinkFieldController",O=e=>{var t;let{value:n=null,onChange:o,types:i={},actions:u,isMulti:v=!1,canCreate:b,ownerID:E,ownerClass:R,ownerRelation:D}=e;const[O,M]=(0,r.useState)({}),[I,_]=(0,r.useState)(n),[L,N]=(0,r.useState)(0),[T,A]=(0,r.useState)(!1),[j,P]=(0,r.useState)(0),[F,q]=(0,r.useState)(!1),[K,W]=(0,r.useState)((0,C.default)({"link-picker-links":!0})),B=(0,a.useSensors)((0,a.useSensor)(a.PointerSensor,{activationConstraint:{distance:10}}));if(Array.isArray(I)||("number"==typeof I&&0!=I&&_([I]),I||_([])),(0,r.useEffect)((()=>{if(!L&&I.length>0){A(!0);const e=[];for(const t of I)e.push(`itemIDs[]=${t}`);const t=`${h.default.getSection(k).form.linkForm.dataUrl}?${e.join("&")}`;g.default.get(t).then((e=>e.json())).then((e=>{M(e),A(!1),q(!1)})).catch((()=>{u.toasts.error(y.default._t("LinkField.FAILED_TO_LOAD_LINKS","Failed to load links")),A(!1),q(!1)}))}}),[L,n&&n.length,j]),!Array.isArray(I))return;const U=()=>{N(0)},z=e=>{N(0);const t=[...I];t.includes(e)||t.push(e),o(v?t:t[0]),u.toasts.success(y.default._t("LinkField.SAVE_SUCCESS","Saved link"))},X=e=>{var t;let n=(0,m.joinUrlPaths)(h.default.getSection(k).form.linkForm.deleteUrl,e.toString());const r=w.default.parse(n),i=x.default.parse(r.query);i.ownerID=E,i.ownerClass=R,i.ownerRelation=D,n=w.default.format({...r,search:x.default.stringify(i)});const a=(null===(t=O[e])||void 0===t?void 0:t.versionState)||"",l=["draft","modified","published"].includes(a),s=l?y.default._t("LinkField.ARCHIVE_SUCCESS","Archived link"):y.default._t("LinkField.DELETE_SUCCESS","Deleted link"),c=l?y.default._t("LinkField.ARCHIVE_ERROR","Failed to archive link"):y.default._t("LinkField.DELETE_ERROR","Failed to delete link");g.default.delete(n,{},{"X-SecurityID":h.default.get("SecurityID")}).then((()=>u.toasts.success(s))).catch((()=>u.toasts.error(c)));const d={...O};delete d[e],M(d),o(v?Object.keys(d):0)},V=0===E,Y=!V&&(v||0===Object.keys(O).length),H=!V&&Boolean(L),$=y.default._t("LinkField.SAVE_RECORD_FIRST","Cannot add links until the record has been saved"),J=(()=>{const e=[];for(const u of I){var t,n,o,a,l,s;if(!O[u])continue;const c=i.hasOwnProperty(null===(t=O[u])||void 0===t?void 0:t.typeKey)?i[null===(n=O[u])||void 0===n?void 0:n.typeKey]:{};e.push(r.default.createElement(d.default,{key:u,id:u,title:null===(o=O[u])||void 0===o?void 0:o.Title,description:null===(a=O[u])||void 0===a?void 0:a.description,versionState:null===(l=O[u])||void 0===l?void 0:l.versionState,typeTitle:c.title||"",typeIcon:c.icon,onDelete:X,onClick:()=>{N(u)},canDelete:!(null===(s=O[u])||void 0===s||!s.canDelete),isMulti:v}))}return e})();return r.default.createElement(S.Provider,{value:{ownerID:E,ownerClass:R,ownerRelation:D,actions:u,loading:T}},r.default.createElement("div",{className:"link-field__container"},V&&r.default.createElement("div",{className:"link-field__save-record-first"},$),T&&!F&&!V&&r.default.createElement(f.default,{containerClass:"link-field__loading"}),Y&&r.default.createElement(c.default,{onModalSuccess:z,onModalClosed:U,types:i,canCreate:b}),v&&r.default.createElement("div",{className:K},r.default.createElement(a.DndContext,{modifiers:[s.restrictToVerticalAxis,s.restrictToParentElement],sensors:B,collisionDetection:a.closestCenter,onDragStart:e=>{W((0,C.default)({"link-picker__links":!0,"link-picker__links--dragging":!0})),q(!0)},onDragEnd:e=>{const{active:t,over:n}=e;if(W((0,C.default)({"link-picker__links":!0,"link-picker__links--dragging":!1})),t.id===n.id)return;const r=I.indexOf(t.id),i=I.indexOf(n.id),a=(0,l.arrayMove)(I,r,i);_(a);let s=`${h.default.getSection(k).form.linkForm.sortUrl}`;g.default.post(s,{newLinkIDs:a},{"X-SecurityID":h.default.get("SecurityID")}).then((async()=>{o(a),u.toasts.success(y.default._t("LinkField.SORT_SUCCESS","Updated link sort order")),P(j+1)})).catch((()=>{u.toasts.error(y.default._t("LinkField.SORT_ERROR","Failed to sort links"))}))}},r.default.createElement(l.SortableContext,{items:I,strategy:l.verticalListSortingStrategy},J))),!v&&r.default.createElement("div",null,J),H&&r.default.createElement(p.default,{types:i,typeKey:null===(t=O[L])||void 0===t?void 0:t.typeKey,isOpen:Boolean(L),onSuccess:z,onClosed:U,linkID:L})))};t.Component=O,O.propTypes={value:b.default.oneOfType([b.default.arrayOf(b.default.number),b.default.number]),onChange:b.default.func.isRequired,types:b.default.object.isRequired,actions:b.default.object.isRequired,isMulti:b.default.bool,canCreate:b.default.bool.isRequired,ownerID:b.default.number.isRequired,ownerClass:b.default.string.isRequired,ownerRelation:b.default.string.isRequired};var M=(0,o.compose)(u.default,(0,i.connect)(null,(e=>({actions:{toasts:(0,o.bindActionCreators)(v,e)}}))))(O);t.default=M},606:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;u(n(754));var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),o=u(n(475)),i=n(624),a=u(n(686)),l=u(n(86));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{type:t,editing:n,data:i,actions:a,onSubmit:l,...s}=e;if(!t)return!1;(0,r.useEffect)((()=>{n?a.initModal():a.reset()}),[n]);const u=i?{ID:i.FileID,Description:i.Title,TargetBlank:!!i.OpenInNew}:{};return r.default.createElement(o.default,c({isOpen:n,type:"insert-link",title:!1,bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:u,onInsert:e=>{let{ID:n,Description:r,TargetBlank:o}=e;return l({FileID:n,Title:r,OpenInNew:o,typeKey:t.key},"",(()=>{}))}},s))};d.propTypes={type:a.default.isRequired,editing:l.default.bool.isRequired,data:l.default.object.isRequired,actions:l.default.object.isRequired,onClick:l.default.func.isRequired};var f=(0,i.connect)((function(){return{}}),(function(e){return{actions:{initModal:()=>e({type:"INIT_FORM_SCHEMA_STACK",payload:{formSchema:{type:"insert-link",nextType:"admin"}}}),reset:()=>e({type:"RESET"})}}}))(d);t.default=f},117:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),o=d(n(912)),i=n(852),a=d(n(872)),l=d(n(902)),s=d(n(510)),u=n(845),c=d(n(86));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}const p=(e,t)=>{const{schemaUrl:n}=s.default.getSection("SilverStripe\\LinkField\\Controllers\\LinkFieldController").form.linkForm,o=a.default.parse(n),c=l.default.parse(o.query);c.typeKey=e;const{ownerID:d,ownerClass:f,ownerRelation:p}=(0,r.useContext)(i.LinkFieldContext);c.ownerID=d,c.ownerClass=f,c.ownerRelation=p;for(const e of["href","path","pathname"])o[e]=(0,u.joinUrlPaths)(o[e],t.toString());return a.default.format({...o,search:l.default.stringify(c)})},v=e=>{let{typeTitle:t,typeKey:n,linkID:a=0,isOpen:l,onSuccess:s,onClosed:u}=e;const{actions:c}=(0,r.useContext)(i.LinkFieldContext);if(!n)return!1;return r.default.createElement(o.default,{title:t,isOpen:l,schemaUrl:p(n,a),identifier:"Link.EditingLinkInfo",onSubmit:async(e,t,n)=>{let r=null;try{r=await n()}catch(e){return c.toasts.error(i18n._t("LinkField.FAILED_TO_SAVE_LINK","Failed to save link")),Promise.resolve()}if(!r.id.match(/\/schema\/linkfield\/([0-9]+)/)){const e=r.id.match(/\/linkForm\/([0-9]+)/),t=parseInt(e[1],10);s(t)}return Promise.resolve()},onClosed:u})};v.propTypes={typeTitle:c.default.string.isRequired,typeKey:c.default.string.isRequired,linkID:c.default.number,isOpen:c.default.bool.isRequired,onSuccess:c.default.func.isRequired,onClosed:c.default.func.isRequired};var g=v;t.default=g},809:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=c(n(754)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),i=c(n(86)),a=c(n(820)),l=c(n(97)),s=(c(n(686)),c(n(697)));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}const d=e=>{let{types:t,onModalSuccess:n,onModalClosed:i,canCreate:u}=e;const[c,d]=(0,o.useState)(""),f=""!==c,p=(0,a.default)("link-picker","form-control"),v=Object.values(t);return u?o.default.createElement("div",{className:p},o.default.createElement(l.default,{types:v,onSelect:e=>{d(e)}}),f&&o.default.createElement(s.default,{types:t,typeKey:c,isOpen:f,onSuccess:e=>{d(""),n(e)},onClosed:()=>{"function"==typeof i&&i(),d("")}})):o.default.createElement("div",{className:p},o.default.createElement("div",{className:"link-picker__cannot-create"},r.default._t("LinkField.CANNOT_CREATE_LINK","Cannot create link")))};t.Component=d,d.propTypes={types:i.default.object.isRequired,onModalSuccess:i.default.func.isRequired,onModalClosed:i.default.func,canCreate:i.default.bool.isRequired};var f=d;t.default=f},97:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(754)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),i=c(n(86)),a=n(127),l=n(852),s=c(n(686));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}const d=e=>{let{types:t,onSelect:n}=e;const[i,s]=(0,o.useState)(!1),{loading:u}=(0,o.useContext)(l.LinkFieldContext);return o.default.createElement(a.Dropdown,{disabled:u,isOpen:i,toggle:()=>s((e=>!e)),className:"link-picker__menu"},o.default.createElement(a.DropdownToggle,{className:"link-picker__menu-toggle font-icon-plus-1",caret:!0},r.default._t("LinkField.ADD_LINK","Add Link")),o.default.createElement(a.DropdownMenu,null,t.map((e=>{let{key:t,title:r,icon:i}=e;return o.default.createElement(a.DropdownItem,{key:t,onClick:()=>n(t)},o.default.createElement("span",{className:`link-picker__menu-icon ${i}`}),r)}))))};d.propTypes={types:i.default.arrayOf(s.default).isRequired,onSelect:i.default.func.isRequired};var f=d;t.default=f},734:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=f(n(820)),o=f(n(754)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(n(363)),a=f(n(86)),l=n(852),s=n(127),u=n(587),c=n(285);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function f(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;tt=>{t.nativeEvent.stopImmediatePropagation(),t.preventDefault(),t.nativeEvent.preventDefault(),t.stopPropagation(),e&&e()},g=e=>{let{id:t,title:n,description:a,versionState:d,typeTitle:f,typeIcon:g,onDelete:h,onClick:m,canDelete:b,isMulti:y}=e;const{loading:w}=(0,i.useContext)(l.LinkFieldContext),{attributes:x,listeners:C,setNodeRef:E,transform:R,transition:D}=(0,u.useSortable)({id:t}),S={transform:c.CSS.Transform.toString(R),transition:D},k={"link-picker__link":!0,"form-control":!0};d&&(k[`link-picker__link--${d}`]=!0);const O=(0,r.default)(k),M=["unversioned","unsaved"].includes(d)?o.default._t("LinkField.DELETE","Delete"):o.default._t("LinkField.ARCHIVE","Archive");return i.default.createElement("div",p({className:O,ref:E,style:S},x,C),y&&i.default.createElement("div",{className:"link-picker__drag-handle"},i.default.createElement("i",{className:"font-icon-drag-handle"})),i.default.createElement(s.Button,{disabled:w,className:`link-picker__button ${g}`,color:"secondary",onClick:v(m)},i.default.createElement("div",{className:"link-picker__link-detail"},i.default.createElement("div",{className:"link-picker__title"},i.default.createElement("span",{className:"link-picker__title-text"},n),(e=>{let t="",n="";if("draft"===e)t=o.default._t("LinkField.LINK_DRAFT_TITLE","Link has draft changes"),n=o.default._t("LinkField.LINK_DRAFT_LABEL","Draft");else{if("modified"!==e)return null;t=o.default._t("LinkField.LINK_MODIFIED_TITLE","Link has unpublished changes"),n=o.default._t("LinkField.LINK_MODIFIED_LABEL","Modified")}const a=(0,r.default)("badge",`status-${e}`);return i.default.createElement("span",{className:a,title:t},n)})(d)),i.default.createElement("small",{className:"link-picker__type"},f,": ",i.default.createElement("span",{className:"link-picker__url"},a)))),b&&i.default.createElement(s.Button,{disabled:w,className:"link-picker__delete",color:"link",onClick:v((()=>h(t)))},M))};g.propTypes={id:a.default.number.isRequired,title:a.default.string,description:a.default.string,versionState:a.default.string,typeTitle:a.default.string.isRequired,typeIcon:a.default.string.isRequired,onDelete:a.default.func.isRequired,onClick:a.default.func.isRequired,canDelete:a.default.bool.isRequired,isMulti:a.default.bool.isRequired};var h=g;t.default=h},697:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(363)),o=n(648),i=a(n(86));function a(e){return e&&e.__esModule?e:{default:e}}const l=e=>{let{types:t,typeKey:n,linkID:i=0,isOpen:a,onSuccess:l,onClosed:s}=e;if(!n)return!1;const u=t.hasOwnProperty(n)?t[n]:{},c=u&&u.hasOwnProperty("handlerName")?u.handlerName:"FormBuilderModal",d=(0,o.loadComponent)(`LinkModal.${c}`);return r.default.createElement(d,{typeTitle:u.title||"",typeKey:n,linkID:i,isOpen:a,onSuccess:l,onClosed:s})};l.propTypes={types:i.default.object.isRequired,typeKey:i.default.string.isRequired,linkID:i.default.number,isOpen:i.default.bool.isRequired,onSuccess:i.default.func.isRequired,onClosed:i.default.func.isRequired};var s=l;t.default=s},41:function(e,t,n){var r=l(n(311)),o=l(n(363)),i=l(n(691)),a=n(648);function l(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e(".js-injector-boot .entwine-linkfield").entwine({Component:null,Root:null,onmatch(){const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=this.data("schema-component"),r=(0,a.loadComponent)(n,t);this.setComponent(r),this.setRoot(i.default.createRoot(this[0])),this._super(),this.refresh()},refresh(){const e=this.getProps();this.getInputField().val(e.value);const t=this.getComponent();this.getRoot().render(o.default.createElement(t,s({},e,{noHolder:!0})))},handleChange(e){this.getInputField().data("value",e),this.refresh()},getProps(){const e=this.getInputField();return{value:e.data("value"),ownerID:e.data("owner-id"),ownerClass:e.data("owner-class"),ownerRelation:e.data("owner-relation"),onChange:this.handleChange.bind(this),isMulti:this.data("is-multi")??!1,types:this.data("types")??{},canCreate:!!e.data("can-create")}},getInputField(){const t=this.data("field-id");return e(`#${t}`)},onunmatch(){const e=this.getRoot();e&&e.unmount()}})}))},686:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(86))&&r.__esModule?r:{default:r};var i=o.default.shape({key:o.default.string.isRequired,title:o.default.string.isRequired,icon:o.default.string.isRequired});t.default=i},159:function(e){e.exports=Backend},510:function(e){e.exports=Config},42:function(e){e.exports=FieldHolder},912:function(e){e.exports=FormBuilderModal},648:function(e){e.exports=Injector},475:function(e){e.exports=InsertMediaModal},264:function(e){e.exports=Loading},872:function(e){e.exports=NodeUrl},86:function(e){e.exports=PropTypes},363:function(e){e.exports=React},691:function(e){e.exports=ReactDomClient},624:function(e){e.exports=ReactRedux},127:function(e){e.exports=Reactstrap},827:function(e){e.exports=Redux},123:function(e){e.exports=ToastsActions},820:function(e){e.exports=classnames},754:function(e){e.exports=i18n},311:function(e){e.exports=jQuery},902:function(e){e.exports=qs},845:function(e){e.exports=ssUrlLib}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(274),n(41)}(); \ No newline at end of file diff --git a/client/dist/styles/bundle.css b/client/dist/styles/bundle.css index 9c31c9db..f85b23db 100644 --- a/client/dist/styles/bundle.css +++ b/client/dist/styles/bundle.css @@ -1 +1 @@ -.link-field__container{position:relative}.link-field__loading{position:absolute;top:0;left:0;width:100%;height:100%}.link-field__loading .cms-content-loading-overlay{position:relative}.link-field__save-record-first{padding-top:7px}.link-picker__link,.link-picker{display:flex;height:auto;width:100%;min-height:54px;background:#fff;padding:0}.link-picker{align-items:stretch;cursor:pointer;box-shadow:none}.link-picker:not(:last-child){margin-bottom:10px}.link-picker.font-icon-link::before{margin:.76925rem}.link-picker__cannot-create{cursor:default;flex-grow:1;padding:16px 13px}.link-picker__menu{flex-grow:1}.link-picker__menu-toggle{width:100%;height:100%;text-align:left}.link-picker__menu-toggle::before{padding:.76925rem}.link-picker__menu-icon{vertical-align:middle;padding-right:.7rem}.link-picker__link{align-items:center;text-align:left;margin-right:0;justify-content:space-between;position:relative}.link-picker__link:not(:last-child){border-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.link-picker__link:not(:first-child){border-top:0;border-top-left-radius:0;border-top-right-radius:0}.link-picker__link:hover,.link-picker__link:focus{background:#eef0f4;text-decoration:none;color:inherit}.link-picker__link::before{top:29px;left:32px;content:" ";position:absolute;border:1px solid #cf3f00;border-radius:100%;bottom:6px;box-shadow:0 0 1px .5px #fff;display:block;height:8px;width:8px;z-index:1}.link-picker__link--draft::before{background-color:#ff7f22}.link-picker__link--modified::before{background-color:#fff7f0}.link-picker__link--unsaved::before,.link-picker__link--unversioned::before,.link-picker__link--published::before{display:none}.link-picker__button{display:flex;align-items:center;flex-grow:1;height:100%;min-width:0;text-align:left;border:none;margin-right:0}.link-picker__button[class*=font-icon-]::before{position:absolute;font-size:1.231rem;padding:.76925rem;margin-right:6px;flex-grow:0}.link-picker__link-detail{flex-grow:1;width:100%;padding-left:3.5rem}.link-picker__delete{flex-grow:0}.link-picker__url{color:#0071c4}.link-picker__type,.link-picker__title-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.link-picker__title{display:flex;align-items:center;width:100%}.link-picker__title .badge{color:#cf3f00;background-color:#fff2ea;padding:2px 3px 2px 4px}.link-picker__title-text{min-width:0;margin-right:5px}.link-picker__type{width:100%} +.link-field__container{position:relative}.link-field__loading{position:absolute;top:0;left:0;width:100%;height:100%}.link-field__loading .cms-content-loading-overlay{position:relative}.link-field__save-record-first{padding-top:7px}.link-picker__link,.link-picker{display:flex;height:auto;width:100%;min-height:54px;background:#fff;padding:0}.link-picker{align-items:stretch;cursor:pointer;box-shadow:none}.link-picker:not(:last-child){margin-bottom:10px}.link-picker.font-icon-link::before{margin:.76925rem}.link-picker__cannot-create{cursor:default;flex-grow:1;padding:16px 13px}.link-picker__menu{flex-grow:1}.link-picker__menu-toggle{width:100%;height:100%;text-align:left}.link-picker__menu-toggle::before{padding:.76925rem}.link-picker__menu-icon{vertical-align:middle;padding-right:.7rem}.link-picker__link{align-items:center;text-align:left;margin-right:0;justify-content:space-between;position:relative}.link-picker__link:not(:last-child){border-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.link-picker__link:not(:first-child){border-top:0;border-top-left-radius:0;border-top-right-radius:0}.link-picker__link:hover,.link-picker__link:focus{text-decoration:none;color:inherit}.link-picker__link::before{top:29px;left:32px;content:" ";position:absolute;border:1px solid #cf3f00;border-radius:100%;bottom:6px;box-shadow:0 0 1px .5px #fff;display:block;height:8px;width:8px;z-index:1}.link-picker__link--draft::before{background-color:#ff7f22}.link-picker__link--modified::before{background-color:#fff7f0}.link-picker__link--unsaved::before,.link-picker__link--unversioned::before,.link-picker__link--published::before{display:none}.link-picker__button{display:flex;align-items:center;flex-grow:1;height:100%;min-width:0;text-align:left;border:none;margin-right:0}.link-picker__button[class*=font-icon-]::before{position:absolute;font-size:1.231rem;padding:.76925rem;margin-right:6px;flex-grow:0}.link-picker__drag-handle{display:none;left:5px;position:absolute;z-index:100}.link-picker__drag-handle:hover{cursor:grab}.link-picker__link:hover .link-picker__drag-handle{display:block}.link-picker__links--dragging *{cursor:grabbing !important}.link-picker__link-detail{flex-grow:1;width:100%;padding-left:3.5rem}.link-picker__delete{flex-grow:0}.link-picker__url{color:#0071c4}.link-picker__type,.link-picker__title-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.link-picker__title{display:flex;align-items:center;width:100%}.link-picker__title .badge{color:#cf3f00;background-color:#fff2ea;padding:2px 3px 2px 4px}.link-picker__title-text{min-width:0;margin-right:5px}.link-picker__type{width:100%} diff --git a/client/lang/en.js b/client/lang/en.js index 9e00cc42..7ab6d941 100644 --- a/client/lang/en.js +++ b/client/lang/en.js @@ -21,6 +21,8 @@ if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') { "LinkField.CANNOT_CREATE_LINK": "Cannot create link", "LinkField.FAILED_TO_LOAD_LINKS": "Failed to load links", "LinkField.FAILED_TO_SAVE_LINK": "Failed to save link", - "LinkField.SAVE_RECORD_FIRST": "Cannot add links until the record has been saved" + "LinkField.SAVE_RECORD_FIRST": "Cannot add links until the record has been saved", + "LinkField.SORT_SUCCESS": "Updated link sort order", + "LinkField.SORT_ERROR": "Unable to sort links" }); } \ No newline at end of file diff --git a/client/lang/src/en.json b/client/lang/src/en.json index 67c0c3af..f57fa51e 100644 --- a/client/lang/src/en.json +++ b/client/lang/src/en.json @@ -14,5 +14,7 @@ "LinkField.CANNOT_CREATE_LINK": "Cannot create link", "LinkField.FAILED_TO_LOAD_LINKS": "Failed to load links", "LinkField.FAILED_TO_SAVE_LINK": "Failed to save link", - "LinkField.SAVE_RECORD_FIRST": "Cannot add links until the record has been saved" + "LinkField.SAVE_RECORD_FIRST": "Cannot add links until the record has been saved", + "LinkField.SORT_SUCCESS": "Updated link sort order", + "LinkField.SORT_ERROR": "Unable to sort links" } diff --git a/client/src/components/LinkField/LinkField.js b/client/src/components/LinkField/LinkField.js index 3726330e..e4967681 100644 --- a/client/src/components/LinkField/LinkField.js +++ b/client/src/components/LinkField/LinkField.js @@ -2,6 +2,10 @@ import React, { useState, useEffect, createContext } from 'react'; import { bindActionCreators, compose } from 'redux'; import { connect } from 'react-redux'; +import { DndContext, closestCenter, PointerSensor, useSensor, useSensors } from '@dnd-kit/core'; +import { arrayMove, SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable'; +import { restrictToVerticalAxis, restrictToParentElement } from '@dnd-kit/modifiers'; +import { injectGraphql } from 'lib/Injector'; import fieldHolder from 'components/FieldHolder/FieldHolder'; import LinkPicker from 'components/LinkPicker/LinkPicker'; import LinkPickerTitle from 'components/LinkPicker/LinkPickerTitle'; @@ -15,6 +19,7 @@ import PropTypes from 'prop-types'; import i18n from 'i18n'; import url from 'url'; import qs from 'qs'; +import classnames from 'classnames'; export const LinkFieldContext = createContext(null); @@ -44,17 +49,29 @@ const LinkField = ({ ownerRelation, }) => { const [data, setData] = useState({}); + const [linkIDs, setLinkIDs] = useState(value); const [editingID, setEditingID] = useState(0); const [loading, setLoading] = useState(false); + const [forceFetch, setForceFetch] = useState(0); + const [isSorting, setIsSorting] = useState(false); + const [linksClassName, setLinksClassName] = useState(classnames({'link-picker-links': true})); + + const sensors = useSensors( + useSensor(PointerSensor, { + activationConstraint: { + distance: 10 + } + }) + ); // Ensure we have a valid array - let linkIDs = value; + // let linkIDs = value; if (!Array.isArray(linkIDs)) { if (typeof linkIDs === 'number' && linkIDs != 0) { - linkIDs = [linkIDs]; + setLinkIDs([linkIDs]); } if (!linkIDs) { - linkIDs = []; + setLinkIDs([]); } } @@ -73,13 +90,23 @@ const LinkField = ({ .then(responseJson => { setData(responseJson); setLoading(false); + // isSorting is set to true on drag start and only set to false here to prevent + // the loading indicator for flickering + setIsSorting(false); }) .catch(() => { actions.toasts.error(i18n._t('LinkField.FAILED_TO_LOAD_LINKS', 'Failed to load links')) setLoading(false); + setIsSorting(false); }); } - }, [editingID, value && value.length]); + }, [editingID, value && value.length, forceFetch]); + + // Force a re-render if the value prop (and thus linkIDs) was not an array + // this re-render needs to have all of the initial hooks call or there will be an error + if (!Array.isArray(linkIDs)) { + return; + } /** * Unset the editing ID when the editing modal is closed @@ -167,27 +194,82 @@ const LinkField = ({ onDelete={onDelete} onClick={() => { setEditingID(linkID); }} canDelete={data[linkID]?.canDelete ? true : false} + isMulti={isMulti} />); } return links; }; + const handleDragStart = (event) => { + setLinksClassName(classnames({ + 'link-picker__links': true, + 'link-picker__links--dragging': true, + })); + setIsSorting(true); + } + + /** + * Drag and drop handler for MultiLinkField's + */ + const handleDragEnd = (event) => { + const {active, over} = event; + setLinksClassName(classnames({ + 'link-picker__links': true, + 'link-picker__links--dragging': false, + })); + if (active.id === over.id) { + return; + } + const fromIndex = linkIDs.indexOf(active.id); + const toIndex = linkIDs.indexOf(over.id); + const newLinkIDs = arrayMove(linkIDs, fromIndex, toIndex); + setLinkIDs(newLinkIDs); + let endpoint = `${Config.getSection(section).form.linkForm.sortUrl}`; + // CSRF token 'X-SecurityID' headers needs to be present + backend.post(endpoint, { newLinkIDs }, { 'X-SecurityID': Config.get('SecurityID') }) + .then(async () => { + onChange(newLinkIDs); + actions.toasts.success(i18n._t('LinkField.SORT_SUCCESS', 'Updated link sort order')); + // Force a rerender so that links are retched so that versionState badges are up to date + setForceFetch(forceFetch + 1); + }) + .catch(() => { + actions.toasts.error(i18n._t('LinkField.SORT_ERROR', 'Failed to sort links')); + }); + } + const saveRecordFirst = ownerID === 0; const renderPicker = !saveRecordFirst && (isMulti || Object.keys(data).length === 0); const renderModal = !saveRecordFirst && Boolean(editingID); const saveRecordFirstText = i18n._t('LinkField.SAVE_RECORD_FIRST', 'Cannot add links until the record has been saved'); + const links = renderLinks(); return
{ saveRecordFirst &&
{saveRecordFirstText}
} - { loading && !saveRecordFirst && } + { loading && !isSorting && !saveRecordFirst && } { renderPicker && } -
{ renderLinks() }
+ { isMulti &&
+ + + {links} + + +
} + { !isMulti &&
{links}
} { renderModal && (e) => { e.nativeEvent.stopImmediatePropagation(); @@ -39,31 +41,50 @@ const LinkPickerTitle = ({ typeIcon, onDelete, onClick, - canDelete + canDelete, + isMulti, }) => { const { loading } = useContext(LinkFieldContext); + const { + attributes, + listeners, + setNodeRef, + transform, + transition, + } = useSortable({id}); + const style = { + transform: CSS.Transform.toString(transform), + transition, + }; const classes = { 'link-picker__link': true, 'form-control': true, }; if (versionState) { - classes[` link-picker__link--${versionState}`] = true; + classes[`link-picker__link--${versionState}`] = true; } const className = classnames(classes); const deleteText = ['unversioned', 'unsaved'].includes(versionState) ? i18n._t('LinkField.DELETE', 'Delete') : i18n._t('LinkField.ARCHIVE', 'Archive'); - return
+ return
+ { isMulti &&
} {canDelete && @@ -82,6 +103,7 @@ LinkPickerTitle.propTypes = { onDelete: PropTypes.func.isRequired, onClick: PropTypes.func.isRequired, canDelete: PropTypes.bool.isRequired, + isMulti: PropTypes.bool.isRequired, }; export default LinkPickerTitle; diff --git a/client/src/components/LinkPicker/tests/LinkPickerTitle-test.js b/client/src/components/LinkPicker/tests/LinkPickerTitle-test.js index 3857086b..667f47a5 100644 --- a/client/src/components/LinkPicker/tests/LinkPickerTitle-test.js +++ b/client/src/components/LinkPicker/tests/LinkPickerTitle-test.js @@ -16,6 +16,7 @@ function makeProps(obj = {}) { canDelete: true, onDelete: () => {}, onClick: () => {}, + isMulti: false, ...obj }; } diff --git a/package.json b/package.json index 817804aa..556e055e 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,16 @@ { - "name": "silverstripe-link", + "name": "silverstripe-linkfield", "version": "0.0.0", "description": "Link management for the SilverStripe CMS", "main": "./client/src/boot/index.js", "license": "BSD-3-Clause", "repository": { "type": "git", - "url": "git+https://github.com/silverstripe/silverstripe-link.git" + "url": "git+https://github.com/silverstripe/silverstripe-linkfield.git" }, - "homepage": "https://github.com/silverstripe/silverstripNe-link", + "homepage": "https://github.com/silverstripe/silverstripNe-linkfield", "bugs": { - "url": "https://github.com/silverstripe/silverstripe-link/issues" + "url": "https://github.com/silverstripe/silverstripe-linkfield/issues" }, "author": "SilverStripe Ltd", "engines": { @@ -61,14 +61,15 @@ }, "dependencies": { "@apollo/client": "^3.7.1", + "@dnd-kit/core": "^6.1.0", + "@dnd-kit/modifiers": "^7.0.0", + "@dnd-kit/sortable": "^8.0.0", "bootstrap": "^4.6.2", "classnames": "^2.2.5", "core-js": "^3.26.0", "prop-types": "^15.8.1", "qs": "^6.11.0", "react": "^18.2.0", - "react-dnd": "^5.0.0", - "react-dnd-html5-backend": "^5.0.1", "react-dom": "^18.2.0", "react-redux": "^8.0.4", "react-router": "^6.4.2", diff --git a/src/Controllers/LinkFieldController.php b/src/Controllers/LinkFieldController.php index d4f1951f..debe21e5 100644 --- a/src/Controllers/LinkFieldController.php +++ b/src/Controllers/LinkFieldController.php @@ -25,20 +25,24 @@ class LinkFieldController extends LeftAndMain { public const FORM_NAME_TEMPLATE = 'LinkForm_%s'; - private static $url_segment = 'linkfield'; + private static string $url_segment = 'linkfield'; - private static $url_handlers = [ + private static array $url_handlers = [ 'linkForm/$ItemID' => 'linkForm', 'GET data/$ItemID' => 'linkData', 'DELETE delete/$ItemID' => 'linkDelete', + 'POST sort' => 'linkSort', ]; - private static $allowed_actions = [ + private static array $allowed_actions = [ 'linkForm', 'linkData', 'linkDelete', + 'linkSort', ]; + private static string $required_permission_codes = 'CMS_ACCESS_CMSMain'; + public function getClientConfig() { $clientConfig = parent::getClientConfig(); @@ -49,6 +53,7 @@ public function getClientConfig() 'schemaUrl' => $this->Link('schema/linkForm'), 'deleteUrl' => $this->Link('delete'), 'dataUrl' => $this->Link('data'), + 'sortUrl' => $this->Link('sort'), 'saveMethod' => 'post', 'formNameTemplate' => sprintf(self::FORM_NAME_TEMPLATE, '{id}'), ]; @@ -197,7 +202,12 @@ public function save(array $data, Form $form): HTTPResponse } // Ensure that ItemID url param matches the ID in the form data - if (isset($data['ID']) && ((int) $data['ID'] !== $id)) { + // Ensure that Sort is not being passed in - this is to prevent malicious users + // from setting the Sort value to the maximum value of an integer, which would + // cause the Sort field to overflow + if ((isset($data['ID']) && ((int) $data['ID'] !== $id)) + || isset($data['Sort']) + ) { $this->jsonError(400, _t(__CLASS__ . '.BAD_DATA', 'Bad data')); } @@ -253,6 +263,69 @@ public function save(array $data, Form $form): HTTPResponse return $response; } + /** + * Update Link Sort fields based frontend drag and drop sort logic + * /admin/linkfield/sort + */ + public function linkSort() + { + $request = $this->getRequest(); + // Check security token + if (!SecurityToken::inst()->checkRequest($request)) { + $this->jsonError(400, _t(__CLASS__ . '.INVALID_TOKEN', 'Invalid CSRF token')); + } + $json = json_decode($request->getBody() ?? '', true); + $newLinkIDs = (array) $json['newLinkIDs']; + if (empty($newLinkIDs)) { + $this->jsonError(400, _t('LinkField.BAD_DATA', 'Bad data')); + } + // Update index so it's sequential that it can be used for the value of $sort + // Not this will be updated latest to use a minium value of 1 so that the Sort field + // has a minimum value of 1 as that's more standard and intuitive than a minimum of 0 + // There's also corresponding logic in Link::onBeforeWrite() to do the same + $newLinkIDs = array_values($newLinkIDs); + // Fetch and validate links + $links = Link::get()->filter(['ID' => $newLinkIDs])->toArray(); + $linkIDToLink = []; + $ownerID = null; + $ownerRelation = null; + foreach ($links as $link) { + // Validate that all links are in the same relation with the same owner + // This protects against malicious actors manually executing requests. + if (is_null($ownerID)) { + $ownerID = $link->OwnerID; + $ownerRelation = $link->OwnerRelation; + } + if ($link->OwnerID !== $ownerID || $link->OwnerRelation !== $ownerRelation) { + $this->jsonError(400, _t('LinkField.BAD_DATA', 'Bad data')); + } + $linkIDToLink[$link->ID] = $link; + } + // Check permissions on links that need to be updated + foreach ($newLinkIDs as $i => $linkID) { + $linkID = $newLinkIDs[$i]; + $link = $linkIDToLink[$linkID]; + $sort = $i + 1; + if ($link->Sort !== $sort && !$link->canEdit()) { + $this->jsonError(403, _t(__CLASS__ . '.UNAUTHORIZED', 'Unauthorized')); + } + } + // Update Sort field on links + foreach ($newLinkIDs as $i => $linkID) { + $linkID = $newLinkIDs[$i]; + $link = $linkIDToLink[$linkID]; + $sort = $i + 1; + if ($link->Sort !== $sort) { + $link->Sort = $sort; + $link->write(); + } + } + // Send response + $response = $this->getResponse(); + $response->addHeader('Content-type', 'application/json'); + $response->setBody(json_encode(['success' => true])); + return $response; + } /** * Create the Form used to content manage a Link in a modal diff --git a/src/Models/Link.php b/src/Models/Link.php index 39e7c78e..cb8fc2db 100644 --- a/src/Models/Link.php +++ b/src/Models/Link.php @@ -33,6 +33,7 @@ class Link extends DataObject private static array $db = [ 'Title' => 'Varchar', 'OpenInNew' => 'Boolean', + 'Sort' => 'Int', ]; private static array $has_one = [ @@ -46,6 +47,8 @@ class Link extends DataObject ], ]; + private static $default_sort = 'Sort'; + private static array $extensions = [ Versioned::class, ]; @@ -98,6 +101,8 @@ public function getCMSFields(): FieldList 'If left blank, an appropriate default title will be used on the front-end', )); + $fields->removeByName('Sort'); + $openInNewField = $fields->dataFieldByName('OpenInNew'); $openInNewField->setTitle(_t(__CLASS__ . '.OPEN_IN_NEW_TITLE', 'Open in new window?')); @@ -159,6 +164,15 @@ public function onBeforeWrite(): void $this->forceChange(); } + // Ensure a Sort value is set and that it's one larger than any other Sort value for + // this owner relation so that newly created Links on MultiLinkField's are properly sorted + if (!$this->Sort) { + $this->Sort = self::get()->filter([ + 'OwnerID' => $this->OwnerID, + 'OwnerRelation' => $this->OwnerRelation, + ])->max('Sort') + 1; + } + parent::onBeforeWrite(); } diff --git a/tests/php/Controllers/LinkFieldControllerTest.php b/tests/php/Controllers/LinkFieldControllerTest.php index 67ce5d78..b16041b0 100644 --- a/tests/php/Controllers/LinkFieldControllerTest.php +++ b/tests/php/Controllers/LinkFieldControllerTest.php @@ -31,6 +31,12 @@ protected function setUp(): void SecurityToken::enable(); } TestPhoneLink::$fail = ''; + // Manually add fixture link to owner. Cannot do this in yml as you cannot have duplicate keys for + // SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner as would be required to join the Links to Owners + // for both the has_many as well as the has_one relations + $link = $this->getFixtureLink(); + $owner = $this->getFixtureLinkOwner(); + $owner->Link = $link; } protected function tearDown(): void @@ -191,6 +197,7 @@ public function testLinkFormPost( } else { $data = []; } + unset($data['Sort']); if ($fail) { $data['Fail'] = $fail; } @@ -584,6 +591,99 @@ public function provideLinkDelete(): array ]; } + /** + * @dataProvider provideLinkSort + */ + public function testLinkSort( + array $newTitleOrder, + string $fail, + int $expectedCode, + string $expectedMessage, + array $expectedTitles + ): void { + TestPhoneLink::$fail = $fail; + $url = "/admin/linkfield/sort"; + $newLinkIDs = []; + $links = TestPhoneLink::get(); + foreach ($newTitleOrder as $num) { + foreach ($links as $link) { + if ($link->Title === "My phone link 0$num") { + $newLinkIDs[] = $link->ID; + } + } + } + $body = json_encode(['newLinkIDs' => $newLinkIDs]); + $headers = []; + if ($fail !== 'csrf-token') { + $headers = array_merge($headers, $this->csrfTokenheader()); + } + $response = $this->post($url, null, $headers, null, $body); + $this->assertSame($expectedCode, $response->getStatusCode()); + if ($expectedCode !== 200) { + $jsonError = json_decode($response->getBody(), true); + $this->assertSame($expectedMessage, $jsonError['errors'][0]['value']); + } + $this->assertSame( + $this->getExpectedTitles($expectedTitles), + TestPhoneLink::get()->filter(['OwnerRelation' => 'LinkList'])->column('Title') + ); + } + + public function provideLinkSort(): array + { + return [ + 'Success' => [ + 'newTitleOrder' => [4, 2, 3], + 'fail' => '', + 'expectedCode' => 200, + 'expectedMessage' => '', + 'expectedTitles' => [4, 2, 3], + ], + 'Emtpy data' => [ + 'newTitleOrder' => [], + 'fail' => '', + 'expectedCode' => 400, + 'expectedMessage' => 'Bad data', + 'expectedTitles' => [2, 3, 4], + ], + 'Fail can edit' => [ + 'newTitleOrder' => [4, 2, 3], + 'fail' => 'can-edit', + 'expectedCode' => 403, + 'expectedMessage' => 'Unauthorized', + 'expectedTitles' => [2, 3, 4], + ], + 'Fail csrf token' => [ + 'newTitleOrder' => [4, 2, 3], + 'fail' => 'csrf-token', + 'expectedCode' => 400, + 'expectedMessage' => 'Invalid CSRF token', + 'expectedTitles' => [2, 3, 4], + ], + 'Mismatched owner' => [ + 'newTitleOrder' => [4, 1, 2], + 'fail' => '', + 'expectedCode' => 400, + 'expectedMessage' => 'Bad data', + 'expectedTitles' => [2, 3, 4], + ], + 'Mismatched owner relation' => [ + 'newTitleOrder' => [4, 5, 2], + 'fail' => '', + 'expectedCode' => 400, + 'expectedMessage' => 'Bad data', + 'expectedTitles' => [2, 3, 4], + ], + ]; + } + + private function getExpectedTitles(array $expected): array + { + return array_map(function ($num) { + return "My phone link 0$num"; + }, $expected); + } + private function getFixtureLink(): TestPhoneLink { return $this->objFromFixture(TestPhoneLink::class, 'TestPhoneLink01'); diff --git a/tests/php/Controllers/LinkFieldControllerTest.yml b/tests/php/Controllers/LinkFieldControllerTest.yml index 5b4b633f..c5b4ac1a 100644 --- a/tests/php/Controllers/LinkFieldControllerTest.yml +++ b/tests/php/Controllers/LinkFieldControllerTest.yml @@ -1,7 +1,33 @@ +SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner: + TestLinkOwner01: + TestLinkOwner02: SilverStripe\LinkField\Tests\Controllers\LinkFieldControllerTest\TestPhoneLink: TestPhoneLink01: - Title: My phone link + Title: My phone link 01 Phone: 0123456789 -SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner: - TestLinkOwner01: - Link: =>SilverStripe\LinkField\Tests\Controllers\LinkFieldControllerTest\TestPhoneLink.TestPhoneLink01 + Sort: 1 + # Link relation is manually joined in LinkFieldControllerTest::setup() + TestPhoneLink02: + Title: My phone link 02 + Phone: 111222333 + Sort: 1 + Owner: =>SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner.TestLinkOwner02 + OwnerRelation: LinkList + TestPhoneLink03: + Title: My phone link 03 + Phone: 321321321 + Sort: 2 + Owner: =>SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner.TestLinkOwner02 + OwnerRelation: LinkList + TestPhoneLink04: + Title: My phone link 04 + Phone: 444444444 + Sort: 3 + Owner: =>SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner.TestLinkOwner02 + OwnerRelation: LinkList + TestPhoneLink05: + Title: My phone link 05 + Phone: 555555555 + Sort: 1 + Owner: =>SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner.TestLinkOwner02 + OwnerRelation: LinkList2 diff --git a/tests/php/Models/LinkTest/LinkOwner.php b/tests/php/Models/LinkTest/LinkOwner.php index 891cd642..bd61af73 100644 --- a/tests/php/Models/LinkTest/LinkOwner.php +++ b/tests/php/Models/LinkTest/LinkOwner.php @@ -14,6 +14,7 @@ class LinkOwner extends DataObject implements TestOnly private static array $has_many = [ 'LinkList' => Link::class . '.Owner', + 'LinkList2' => Link::class . '.Owner', ]; // Allows us to toggle permissions easily within a unit test diff --git a/yarn.lock b/yarn.lock index d94c9dff..8b4046bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1067,6 +1067,45 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== +"@dnd-kit/accessibility@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@dnd-kit/accessibility/-/accessibility-3.1.0.tgz#1054e19be276b5f1154ced7947fc0cb5d99192e0" + integrity sha512-ea7IkhKvlJUv9iSHJOnxinBcoOI3ppGnnL+VDJ75O45Nss6HtZd8IdN8touXPDtASfeI2T2LImb8VOZcL47wjQ== + dependencies: + tslib "^2.0.0" + +"@dnd-kit/core@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@dnd-kit/core/-/core-6.1.0.tgz#e81a3d10d9eca5d3b01cbf054171273a3fe01def" + integrity sha512-J3cQBClB4TVxwGo3KEjssGEXNJqGVWx17aRTZ1ob0FliR5IjYgTxl5YJbKTzA6IzrtelotH19v6y7uoIRUZPSg== + dependencies: + "@dnd-kit/accessibility" "^3.1.0" + "@dnd-kit/utilities" "^3.2.2" + tslib "^2.0.0" + +"@dnd-kit/modifiers@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@dnd-kit/modifiers/-/modifiers-7.0.0.tgz#229666dd4e8b9487f348035117f993af755b3db9" + integrity sha512-BG/ETy3eBjFap7+zIti53f0PCLGDzNXyTmn6fSdrudORf+OH04MxrW4p5+mPu4mgMk9kM41iYONjc3DOUWTcfg== + dependencies: + "@dnd-kit/utilities" "^3.2.2" + tslib "^2.0.0" + +"@dnd-kit/sortable@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@dnd-kit/sortable/-/sortable-8.0.0.tgz#086b7ac6723d4618a4ccb6f0227406d8a8862a96" + integrity sha512-U3jk5ebVXe1Lr7c2wU7SBZjcWdQP+j7peHJfCspnA81enlu88Mgd7CC8Q+pub9ubP7eKVETzJW+IBAhsqbSu/g== + dependencies: + "@dnd-kit/utilities" "^3.2.2" + tslib "^2.0.0" + +"@dnd-kit/utilities@^3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@dnd-kit/utilities/-/utilities-3.2.2.tgz#5a32b6af356dc5f74d61b37d6f7129a4040ced7b" + integrity sha512-+MKAJEOfaBe5SmV6t34p80MMKhjvUz0vRrvVJbPT0WElzaOJ/1xs+D+KDv+tD/NE5ujfrChEcshd4fLn0wpiqg== + dependencies: + tslib "^2.0.0" + "@emotion/babel-plugin@^11.10.6": version "11.10.6" resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.10.6.tgz#a68ee4b019d661d6f37dec4b8903255766925ead" @@ -2439,7 +2478,7 @@ array.prototype.tosorted@^1.1.1: es-shim-unscopables "^1.0.0" get-intrinsic "^1.1.3" -asap@^2.0.0, asap@^2.0.6, asap@~2.0.3: +asap@^2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= @@ -2454,11 +2493,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -autobind-decorator@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/autobind-decorator/-/autobind-decorator-2.4.0.tgz#ea9e1c98708cf3b5b356f7cf9f10f265ff18239c" - integrity sha512-OGYhWUO72V6DafbF8PM8rm3EPbfuyMZcJhtm5/n26IDwO18pohE4eNazLoCGhPiXOCD0gEGmrbU3849QvM8bbw== - autoprefixer@^10.4.13: version "10.4.13" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.13.tgz#b5136b59930209a321e9fa3dca2e7c4d223e83a8" @@ -2589,14 +2623,6 @@ babel-preset-jest@^29.4.3: babel-plugin-jest-hoist "^29.4.3" babel-preset-current-node-syntax "^1.0.0" -babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -2772,11 +2798,6 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -change-emitter@^0.1.2: - version "0.1.6" - resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" - integrity sha1-6LL+PX8at9aaMhma/5HqaTFAlRU= - char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -3038,16 +3059,6 @@ core-js-compat@^3.25.1: dependencies: browserslist "^4.21.5" -core-js@^1.0.0: - version "1.2.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" - integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= - -core-js@^2.4.0: - version "2.6.11" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" - integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== - core-js@^3.26.0: version "3.29.0" resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.29.0.tgz#0273e142b67761058bcde5615c503c7406b572d6" @@ -3292,16 +3303,6 @@ diff@^5.1.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== -dnd-core@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/dnd-core/-/dnd-core-4.0.5.tgz#3b83d138d0d5e265c73ec978dec5e1ed441dc665" - integrity sha1-O4PRONDV4mXHPsl43sXh7UQdxmU= - dependencies: - asap "^2.0.6" - invariant "^2.2.4" - lodash "^4.17.10" - redux "^4.0.0" - doctrine@^1.2.2: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -3381,13 +3382,6 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= - dependencies: - iconv-lite "~0.4.13" - encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -4036,19 +4030,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -fbjs@^0.8.1: - version "0.8.17" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" - integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= - dependencies: - core-js "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - figures@^1.3.5: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -4462,11 +4443,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: - version "2.5.5" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" - integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== - hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" @@ -4534,13 +4510,6 @@ iconv-lite@0.6.3, iconv-lite@^0.6.2: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -iconv-lite@~0.4.13: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - icss-utils@^5.0.0, icss-utils@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" @@ -4681,7 +4650,7 @@ interpret@^3.1.1: resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== -invariant@^2.1.0, invariant@^2.2.4: +invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -4936,11 +4905,6 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" -is-stream@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" @@ -5023,14 +4987,6 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" @@ -5848,7 +5804,7 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.15, lodash@^4.3.0, lodash@~4.17.12: +lodash@^4.0.0, lodash@^4.17.15, lodash@^4.3.0, lodash@~4.17.12: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -6192,14 +6148,6 @@ next-tick@~1.0.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= -node-fetch@^1.0.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - node-gyp@^9.0.0, node-gyp@^9.1.0: version "9.3.1" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.3.1.tgz#1e19f5f290afcc9c46973d68700cbd21a96192e4" @@ -6914,13 +6862,6 @@ promise-retry@^2.0.1: err-code "^2.0.2" retry "^0.12.0" -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== - dependencies: - asap "~2.0.3" - prompts@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -6993,28 +6934,6 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -react-dnd-html5-backend@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/react-dnd-html5-backend/-/react-dnd-html5-backend-5.0.1.tgz#0b578d79c5c01317c70414c8d717f632b919d4f1" - integrity sha1-C1eNecXAExfHBBTI1xf2MrkZ1PE= - dependencies: - autobind-decorator "^2.1.0" - dnd-core "^4.0.5" - lodash "^4.17.10" - shallowequal "^1.0.2" - -react-dnd@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/react-dnd/-/react-dnd-5.0.0.tgz#c4a17c70109e456dad8906be838e6ee8f32b06b5" - integrity sha1-xKF8cBCeRW2tiQa+g45u6PMrBrU= - dependencies: - dnd-core "^4.0.5" - hoist-non-react-statics "^2.5.0" - invariant "^2.1.0" - lodash "^4.17.10" - recompose "^0.27.1" - shallowequal "^1.0.2" - react-dom@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" @@ -7038,7 +6957,7 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4: +react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== @@ -7221,18 +7140,6 @@ rechoir@^0.8.0: dependencies: resolve "^1.20.0" -recompose@^0.27.1: - version "0.27.1" - resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.27.1.tgz#1a49e931f183634516633bbb4f4edbfd3f38a7ba" - integrity sha512-p7xsyi/rfNjHfdP7vPU02uSFa+Q1eHhjKrvO+3+kRP4Ortj+MxEmpmd+UQtBGM2D2iNAjzNI5rCyBKp9Ob5McA== - dependencies: - babel-runtime "^6.26.0" - change-emitter "^0.1.2" - fbjs "^0.8.1" - hoist-non-react-statics "^2.3.1" - react-lifecycles-compat "^3.0.2" - symbol-observable "^1.0.4" - redux-form@^8.3.8: version "8.3.9" resolved "https://registry.yarnpkg.com/redux-form/-/redux-form-8.3.9.tgz#bffd5c90b16c1559466f765374ecdd6cf4529155" @@ -7252,14 +7159,6 @@ redux-thunk@^2.4.1: resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== -redux@^4.0.0: - version "4.0.5" - resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.5.tgz#4db5de5816e17891de8a80c424232d06f051d93f" - integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w== - dependencies: - loose-envify "^1.4.0" - symbol-observable "^1.2.0" - redux@^4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" @@ -7279,11 +7178,6 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - regenerator-runtime@^0.13.11: version "0.13.11" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" @@ -7511,7 +7405,7 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": +"safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -7610,11 +7504,6 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" @@ -7622,11 +7511,6 @@ shallow-clone@^3.0.0: dependencies: kind-of "^6.0.2" -shallowequal@^1.0.2: - version "1.1.0" - resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" - integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== - shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -8004,11 +7888,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -symbol-observable@^1.0.4, symbol-observable@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== - symbol-observable@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" @@ -8154,6 +8033,11 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" +tslib@^2.0.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tslib@^2.1.0, tslib@^2.3.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" @@ -8217,11 +8101,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -ua-parser-js@^0.7.18: - version "0.7.21" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.21.tgz#853cf9ce93f642f67174273cc34565ae6f308777" - integrity sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -8491,11 +8370,6 @@ whatwg-encoding@^2.0.0: dependencies: iconv-lite "0.6.3" -whatwg-fetch@>=0.10.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" - integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== - whatwg-mimetype@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7"