tocco-admin 3.11.46 → 3.11.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[556],{51368:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(5556);var i=n(11843),o=n(44523),r=n(59027),a=n(57561),c=n(1636),s=n(78240),l=n(31085),u=n(74848);const d=(0,l.S)((0,i.injectIntl)((function(e){var t=e.path,n=e.context,i=e.onSuccess,l=e.intl,d=e.locale,m=e.emitAction,f=(0,s.A)(t),y=f?[{id:"rel".concat(f.model),value:f.key}]:[],p=(0,c.A)(n,"Domain");return(0,u.jsx)(o.Ay,{entityName:"Domain",formName:p,mode:"create",defaultValues:y,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];i({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||m(e)},listApp:r.Ay,docsApp:a.default,labelPosition:"inside"})})))},28824:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(5556);var i=n(11843),o=n(44523),r=n(59027),a=n(57561),c=n(1636),s=n(78240),l=n(31085),u=n(74848);const d=(0,l.S)((0,i.injectIntl)((function(e){var t=e.context,n=e.path,i=e.onSuccess,l=e.intl,d=e.locale,m=e.emitAction,f=(0,s.A)(n),y=f?[{id:"rel".concat(f.model),value:f.key}]:[],p=(0,c.A)(t,"Folder");return(0,u.jsx)(o.Ay,{entityName:"Folder",formName:p,mode:"create",defaultValues:y,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];i({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||m(e)},listApp:r.Ay,docsApp:a.default,labelPosition:"inside"})})))},92259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(64467),o=n(98179),r=n(74848);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const s=function(e){return(0,r.jsx)(o.A,c(c({},e),{},{customDeleteEndpoint:"documents/delete"}))}},62896:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var i=n(5544),o=(n(5556),n(4883)),r=(n(27772),n(44523)),a=n(59027),c=n(69733),s=(n(41085),n(57561)),l=n(1636),u=n(31085),d=n(74848);const m=(0,u.S)((function(e){var t=e.selection,n=e.onSuccess,u=e.onCancel,m=e.locale,f=e.context,y=e.emitAction,p=e.navigate,v=e.navigationStrategy,A=t.ids[0].split("/"),g=(0,i.A)(A,2),h=g[0],b=g[1];(0,o.useEffect)((function(){"Resource"===h&&(p("/docs/doc/".concat(b,"/detail")),u())}),[h,b,p,u]);var _=(0,l.A)(f,h);return(0,d.jsx)(r.Ay,{entityName:h,formName:_,entityId:b,mode:"update",locale:m,onEntityUpdated:function(){var e=[{type:"entity-update-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},onEntityDeleted:function(){var e=[{type:"entity-delete-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||y(e)},listApp:a.Ay,docsApp:s.default,labelPosition:"inside",customActions:{history:function(e,t,n,i,o,r,a){v.navigateToPath({pathname:(0,c.K0)(t),inNewTab:!0})}}})}))},19760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var i,o,r,a=n(11843),c=n(71468),s=n(9675),l=n(31085),u=n(5544),d=n(57528),m=n(2404),f=n.n(m),y=(n(5556),n(4883)),p=n(43759),v=(n(27772),n(48813)),A=n(57561),g=n(78240),h=n(74848),b=p.Ay.div.withConfig({displayName:"StyledButtonsWrapper"})(i||(i=(0,d.A)(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),v.OV),_=(0,p.Ay)(v.tQ).withConfig({displayName:"StyledLoadMask"})(o||(o=(0,d.A)(["\n height: auto;\n"]))),j=function(e,t){return null!==e?"Move_docs_list_item":null!==t?"Move_root_docs_list_item_specific":"Move_root_docs_list_item"},N={initialize:s.n_,moveElements:s.BQ};const S=(0,l.S)((0,c.Ng)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),N)((0,a.injectIntl)((function(e){var t=e.selection,n=e.onSuccess,i=e.onError,o=e.path,c=e.initialize,s=e.moveElements,l=e.isWaiting,d=e.domainTypes,m=e.rootNodes,p=e.businessUnit,N=e.locale,S=e.emitAction,k=(0,g.A)(o),O={model:"Docs_list_item",key:"".concat(k.model,"/").concat(k.key)},w=(0,y.useState)(O),x=(0,u.A)(w,2),D=x[0],E=x[1];(0,y.useEffect)((function(){c(t,n,i)}),[]);var P=function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return;default:throw new Error("Unexpected model: ".concat(e))}};return(0,h.jsxs)(_,{required:[!l],children:[(0,h.jsx)(A.default,{routerType:"routerless",initialLocation:function(){if(null===D)return null;var e=D.key.split("/"),t=(0,u.A)(e,2),n=t[0],i=t[1];return P(n,i)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",getListFormName:j,onListParentChange:E,getCustomLocation:P,navigationStrategy:{},embedded:!0,emitAction:S,noLeftPadding:!0,domainTypes:d,rootNodes:m,businessUnit:p,sortable:!1,scrollBehaviour:"none",locale:N,selectOnRowClick:!1}),(0,h.jsx)(b,{children:(0,h.jsx)(v.$n,{onClick:function(){return s(D.key,t.ids)},look:"raised",ink:"primary",disabled:null===D||f()(D,O),children:r||(r=(0,h.jsx)(a.FormattedMessage,{id:"client.actions.dms-move.button"}))})})]})}))))},1636:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}},27185:(e,t,n)=>{var i=n(38859),o=n(15325),r=n(29905),a=n(34932),c=n(27301),s=n(19219),l=Math.min;e.exports=function(e,t,n){for(var u=n?r:o,d=e[0].length,m=e.length,f=m,y=Array(m),p=1/0,v=[];f--;){var A=e[f];f&&t&&(A=a(A,c(t))),p=l(A.length,p),y[f]=!n&&(t||d>=120&&A.length>=120)?new i(f&&A):void 0}A=e[0];var g=-1,h=y[0];e:for(;++g<d&&v.length<p;){var b=A[g],_=t?t(b):b;if(b=n||0!==b?b:0,!(h?s(h,_):u(v,_,n))){for(f=m;--f;){var j=y[f];if(!(j?s(j,_):u(e[f],_,n)))continue e}h&&h.push(_),v.push(b)}}return v}},80741:(e,t,n)=>{var i=n(83693);e.exports=function(e){return i(e)?e:[]}},5287:(e,t,n)=>{var i=n(34932),o=n(27185),r=n(69302),a=n(80741),c=r((function(e){var t=i(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=c}}]);
1
+ (self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[556],{51368:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(5556);var i=n(11843),o=n(44523),r=n(59027),a=n(57561),c=n(1636),s=n(78240),l=n(31085),u=n(74848);const d=(0,l.S)((0,i.injectIntl)((function(e){var t=e.path,n=e.context,i=e.onSuccess,l=e.intl,d=e.locale,m=e.emitAction,f=(0,s.A)(t),y=f?[{id:"rel".concat(f.model),value:f.key}]:[],p=(0,c.A)(n,"Domain");return(0,u.jsx)(o.Ay,{entityName:"Domain",formName:p,mode:"create",defaultValues:y,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];i({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||m(e)},listApp:r.Ay,docsApp:a.default,labelPosition:"inside"})})))},28824:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});n(5556);var i=n(11843),o=n(44523),r=n(59027),a=n(57561),c=n(1636),s=n(78240),l=n(31085),u=n(74848);const d=(0,l.S)((0,i.injectIntl)((function(e){var t=e.context,n=e.path,i=e.onSuccess,l=e.intl,d=e.locale,m=e.emitAction,f=(0,s.A)(n),y=f?[{id:"rel".concat(f.model),value:f.key}]:[],p=(0,c.A)(t,"Folder");return(0,u.jsx)(o.Ay,{entityName:"Folder",formName:p,mode:"create",defaultValues:y,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];i({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||m(e)},listApp:r.Ay,docsApp:a.default,labelPosition:"inside"})})))},92259:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var i=n(64467),o=n(98179),r=n(74848);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,i.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const s=function(e){return(0,r.jsx)(o.A,c(c({},e),{},{customDeleteEndpoint:"documents/delete"}))}},62896:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var i=n(5544),o=(n(5556),n(4883)),r=(n(27772),n(44523)),a=n(59027),c=n(74547),s=(n(41085),n(57561)),l=n(1636),u=n(31085),d=n(74848);const m=(0,u.S)((function(e){var t=e.selection,n=e.onSuccess,u=e.onCancel,m=e.locale,f=e.context,y=e.emitAction,p=e.navigate,v=e.navigationStrategy,A=t.ids[0].split("/"),g=(0,i.A)(A,2),h=g[0],b=g[1];(0,o.useEffect)((function(){"Resource"===h&&(p("/docs/doc/".concat(b,"/detail")),u())}),[h,b,p,u]);var _=(0,l.A)(f,h);return(0,d.jsx)(r.Ay,{entityName:h,formName:_,entityId:b,mode:"update",locale:m,onEntityUpdated:function(){var e=[{type:"entity-update-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},onEntityDeleted:function(){var e=[{type:"entity-delete-event",payload:{entities:[{entityName:"Docs_list_item",key:t.ids[0]}]}}];n({title:null,remoteEvents:e})},emitAction:function(e){(function(e){var t;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(t=t.toaster)||void 0===t?void 0:t.title)})(e)||y(e)},listApp:a.Ay,docsApp:s.default,labelPosition:"inside",customActions:{history:function(e,t,n,i,o,r,a){v.navigateToPath({pathname:(0,c.K0)(t),inNewTab:!0})}}})}))},19760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var i,o,r,a=n(11843),c=n(71468),s=n(9675),l=n(31085),u=n(5544),d=n(57528),m=n(2404),f=n.n(m),y=(n(5556),n(4883)),p=n(43759),v=(n(27772),n(48813)),A=n(57561),g=n(78240),h=n(74848),b=p.Ay.div.withConfig({displayName:"StyledButtonsWrapper"})(i||(i=(0,d.A)(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),v.OV),_=(0,p.Ay)(v.tQ).withConfig({displayName:"StyledLoadMask"})(o||(o=(0,d.A)(["\n height: auto;\n"]))),j=function(e,t){return null!==e?"Move_docs_list_item":null!==t?"Move_root_docs_list_item_specific":"Move_root_docs_list_item"},N={initialize:s.n_,moveElements:s.BQ};const S=(0,l.S)((0,c.Ng)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),N)((0,a.injectIntl)((function(e){var t=e.selection,n=e.onSuccess,i=e.onError,o=e.path,c=e.initialize,s=e.moveElements,l=e.isWaiting,d=e.domainTypes,m=e.rootNodes,p=e.businessUnit,N=e.locale,S=e.emitAction,k=(0,g.A)(o),O={model:"Docs_list_item",key:"".concat(k.model,"/").concat(k.key)},w=(0,y.useState)(O),x=(0,u.A)(w,2),D=x[0],E=x[1];(0,y.useEffect)((function(){c(t,n,i)}),[]);var P=function(e,t){switch(e){case"Domain":return"/docs/domain/".concat(t,"/list");case"Folder":return"/docs/folder/".concat(t,"/list");case"Resource":return;default:throw new Error("Unexpected model: ".concat(e))}};return(0,h.jsxs)(_,{required:[!l],children:[(0,h.jsx)(A.default,{routerType:"routerless",initialLocation:function(){if(null===D)return null;var e=D.key.split("/"),t=(0,u.A)(e,2),n=t[0],i=t[1];return P(n,i)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",getListFormName:j,onListParentChange:E,getCustomLocation:P,navigationStrategy:{},embedded:!0,emitAction:S,noLeftPadding:!0,domainTypes:d,rootNodes:m,businessUnit:p,sortable:!1,scrollBehaviour:"none",locale:N,selectOnRowClick:!1}),(0,h.jsx)(b,{children:(0,h.jsx)(v.$n,{onClick:function(){return s(D.key,t.ids)},look:"raised",ink:"primary",disabled:null===D||f()(D,O),children:r||(r=(0,h.jsx)(a.FormattedMessage,{id:"client.actions.dms-move.button"}))})})]})}))))},1636:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}},27185:(e,t,n)=>{var i=n(38859),o=n(15325),r=n(29905),a=n(34932),c=n(27301),s=n(19219),l=Math.min;e.exports=function(e,t,n){for(var u=n?r:o,d=e[0].length,m=e.length,f=m,y=Array(m),p=1/0,v=[];f--;){var A=e[f];f&&t&&(A=a(A,c(t))),p=l(A.length,p),y[f]=!n&&(t||d>=120&&A.length>=120)?new i(f&&A):void 0}A=e[0];var g=-1,h=y[0];e:for(;++g<d&&v.length<p;){var b=A[g],_=t?t(b):b;if(b=n||0!==b?b:0,!(h?s(h,_):u(v,_,n))){for(f=m;--f;){var j=y[f];if(!(j?s(j,_):u(e[f],_,n)))continue e}h&&h.push(_),v.push(b)}}return v}},80741:(e,t,n)=>{var i=n(83693);e.exports=function(e){return i(e)?e:[]}},5287:(e,t,n)=>{var i=n(34932),o=n(27185),r=n(69302),a=n(80741),c=r((function(e){var t=i(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=c}}]);
@@ -3,4 +3,4 @@
3
3
  * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
5
  */
6
- var o,a,d,l,u;o=e,a=function(e){return r=void 0,e?n(e):window.NEW_CKEDITOR?void t(NEW_CKEDITOR):n(new Error("Script loaded from editorUrl doesn't provide NEW_CKEDITOR namespace."))},l=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script"),"function"==typeof a&&(d=a,a={}),a=a||{},d=d||function(){},u.type=a.type||"text/javascript",u.charset=a.charset||"utf8",u.async=!("async"in a)||!!a.async,u.src=o,a.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(u,a.attrs),a.text&&(u.text=String(a.text)),("onload"in u?i:c)(u,d),u.onload||i(u,d),l.appendChild(u)}))};var l=n(5556),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};function s(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var p=["activeEnterModeChange","activeFilterChange","afterCommandExec","afterInsertHtml","afterPaste","afterPasteFromWord","afterSetData","afterUndoImage","ariaEditorHelpLabel","ariaWidget","autogrow","beforeCommandExec","beforeDestroy","beforeGetData","beforeModeUnload","beforeSetMode","beforeUndoImage","blur","change","configLoaded","contentDirChanged","contentDom","contentDomInvalidated","contentDomUnload","contentPreview","customConfigLoaded","dataFiltered","dataReady","destroy","dialogHide","dialogShow","dirChanged","doubleclick","dragend","dragstart","drop","elementsPathUpdate","exportPdf","fileUploadRequest","fileUploadResponse","floatingSpaceLayout","focus","getData","getSnapshot","insertElement","insertHtml","insertText","instanceReady","key","langLoaded","loadSnapshot","loaded","lockSnapshot","maximize","menuShow","mode","notificationHide","notificationShow","notificationUpdate","paste","pasteFromWord","pluginsLoaded","readOnly","removeFormatCleanup","required","resize","save","saveSnapshot","selectionChange","setData","stylesRemove","stylesSet","template","toDataFormat","toHtml","uiSpace","unlockSnapshot","updateSnapshot","widgetDefinition"],f=["beforeLoad","namespaceLoaded"],y=s(s([],p,!0),f,!0),g="__CKE__";function m(e){var t=e.substr(0,1).toUpperCase()+e.substr(1);return"on".concat(t)}function v(e){return e.substr(2,1).toLowerCase()+e.substr(3)}var h=s(s([],p,!0),f,!0).reduce((function(e,t){var n;return u(u({},e),((n={})[t]=function(e){return"".concat(g).concat(e)}(t),n))}),{});function b(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}function O(e,t,n){var r={display:"none",visibility:"hidden"};return"classic"===e?r:"ready"===t?null!=n?n:void 0:r}function S(e){var t=e.debug,n=e.editor,r=e.evtName,o=e.handler,a=e.listenerData,i=e.priority,c=t&&Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),d=o;return t&&(d=function(e){console.log({operation:"invoke",editor:n.name,evtName:r,handlerId:c,data:e.data,listenerData:e.listenerData}),o(e)}),t&&console.log({operation:"register",editor:n.name,evtName:r,handlerId:c}),n.on(r,d,null,a,i),function(){t&&console.log({operation:"unregister",editor:n.name,evtName:r,handlerId:c}),n.removeListener(r,d)}}var k=a.useEffect,x=a.useReducer,C=a.useRef,E="https://cdn.ckeditor.com/4.22.1/standard-all/ckeditor.js",w={};function D(e,t){switch(t.type){case"init":return u(u({},e),{hookStatus:"init"});case"loading":return u(u({},e),{hookStatus:"loading"});case"unloaded":return{editor:t.payload,hookStatus:"unloaded"};case"loaded":return u(u({},e),{hookStatus:"loaded"});case"ready":return u(u({},e),{hookStatus:"ready"});case"destroyed":return{editor:void 0,hookStatus:"destroyed"};case"error":return{editor:void 0,hookStatus:"error"};default:return e}}var j=a.useEffect,L=a.useRef,P=a.useState;function T(e){var t=e.config,n=void 0===t?{}:t,r=e.debug,o=e.editorUrl,i=e.initData,c=e.name,l=e.readOnly,u=e.style,s=e.type,p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["config","debug","editorUrl","initData","name","readOnly","style","type"]),T=P(null),U=T[0],_=T[1],R=L(p);n&&"boolean"==typeof l&&(n.readOnly=l);var I=function(e){var t=e.config,n=e.debug,r=e.dispatchEvent,o=e.subscribeTo,a=void 0===o?y:o,i=e.editorUrl,c=e.element,l=e.initContent,u=e.type,s=void 0===u?"classic":u,p=C(i||E),m=C(null!=a?a:y),v=C(n),b=C(r),O=C(l),j=C(t||w),L=C(s),P=x(D,{editor:void 0,hookStatus:"init"}),T=P[0],U=T.editor,_=T.hookStatus,R=P[1];return k((function(){return c&&!U&&(R({type:"loading"}),d(p.current,(function(e){var t;-1!==m.current.indexOf("namespaceLoaded")&&(null===(t=b.current)||void 0===t||t.call(b,{type:h.namespaceLoaded,payload:e}))})).then((function(e){var t,n="inline"===L.current,r=j.current.readOnly;-1!==m.current.indexOf("beforeLoad")&&(null===(t=b.current)||void 0===t||t.call(b,{type:h.beforeLoad,payload:e}));var o=e[n?"inline":"replace"](c,j.current);m.current.filter((function(e){return-1===f.indexOf(e)})).forEach((function(e){S({debug:v.current,editor:o,evtName:e,handler:function(t){var n;null===(n=b.current)||void 0===n||n.call(b,{type:"".concat(g).concat(e),payload:t})}})})),S({debug:v.current,editor:o,evtName:"loaded",handler:function(){R({type:"loaded"})},priority:-1}),S({debug:v.current,editor:o,evtName:"instanceReady",handler:function(e){var t=e.editor;R({type:"ready"}),n&&!r&&t.setReadOnly(!1),O.current&&t.setData(O.current,{noSnapshot:!0,callback:function(){t.resetUndo()}})},priority:-1}),S({debug:v.current,editor:o,evtName:"destroy",handler:function(){R({type:"destroyed"})},priority:-1}),R({type:"unloaded",payload:o})})).catch((function(e){console.error(e),R({type:"error"})}))),function(){U&&U.destroy()}}),[U,c]),{editor:U,status:null==U?void 0:U.status,error:"error"===_,loading:"loading"===_}}({config:n,dispatchEvent:function(e){var t=e.type,n=e.payload,r=m(t.substr(g.length)),o=R.current[r];o&&o(n)},debug:r,editorUrl:o,element:U,initContent:"string"==typeof i?i:void 0,subscribeTo:Object.keys(p).filter((function(e){return 0===e.indexOf("on")})).map(v),type:s}),N=I.editor,F=I.status;return j((function(){var e="inline"!==s&&N&&("loaded"===F||"ready"===F);return u&&e&&N.container.setStyles(u),function(){u&&e&&Object.keys(u).map(b).forEach((function(e){N.container.removeStyle(e)}))}}),[N,F,u,s]),j((function(){N&&"ready"===F&&"boolean"==typeof l&&N.setReadOnly(l)}),[N,F,l]),a.createElement("div",{id:null!=c?c:void 0,ref:_,style:O(null!=s?s:"classic",F,u)},"string"==typeof i?null:i)}var U=u({config:l.object,debug:l.bool,editorUrl:l.string,initData:l.node,name:l.string,readOnly:l.bool,style:l.object,type:l.oneOf(["classic","inline"])},y.reduce((function(e,t){var n;return u(u({},e),((n={})[m(t)]=l.func,n))}),{}));T.propTypes=U;var _=n(11843),R=n(73082),I=n(5544);const N=Object.entries({"8px":"~6pt","10px":"~7.5pt","11px":"~8pt","12px":"~9pt","13px":"~10pt","15px":"~11pt","16px":"~12pt","17px":"~13pt","19px":"~14pt","22px":"~16pt","24px":"~18pt","26px":"~20pt","29px":"~22pt","32px":"~24pt","36px":"~26pt","37px":"~28pt","48px":"~36pt","64px":"~48pt"}).map((function(e){var t=(0,I.A)(e,2),n=t[0],r=t[1];return"".concat(n," (").concat(r,")/").concat(n)})).join(";");var F,A=n(57528),H=n(43759),K=n(60284),W=H.Ay.div.withConfig({displayName:"StyledHtmlEditor"})(F||(F=(0,A.A)(["\n && {\n .ck-editor {\n --ck-border-radius: 0.27rem;\n ","\n\n .ck.ck-list__item .ck-button.ck-fontsize-option .ck-button__label {\n line-height: 1;\n }\n\n .ck-editor__editable {\n min-height: 100px;\n }\n }\n }\n"])),(function(e){return(0,K.gv)(e,"ckeditor")})),z=n(74848);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.NEW_CKEDITOR_BASEPATH="".concat(n.p,"ckeditor4/");var M=function(e){switch(e){case"fr-CH":return"fr";case"it-CH":return"it";case"en-US":return"en";case"fr":case"en":case"it":case"de":return e;case"de-CH":return"de-ch";default:return"de"}};const q=function(e){var t=e.id,r=e.value,a=void 0===r?"":r,i=e.onChange,c=e.contentLang,d=void 0===c?"de":c,l=e.defaultLinkTarget,u=e.ckEditorConfig,s=(0,_.useIntl)().locale,p=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({language:M(s),contentsLanguage:d,entities:!1,allowedContent:!0,toolbar:[["Bold","Italic","Underline","Strike","RemoveFormat"],["Format","Font","FontSize","TextColor"],["NumberedList","BulletedList"],["Link","Unlink"],["Table","SpecialChar","Image"],["PasteText"],["Source"]],extraPlugins:["colorbutton","colordialog","dialogadvtab","font","codemirror"],removeButtons:[],removeDialogTabs:"",removePlugins:["elementspath"],codemirror:{mode:"htmlmixed",enableCodeFormatting:!0,autoFormatOnStart:!0},versionCheck:!1,fontSize_sizes:N},u),f=function(e){try{var t=e.data.name,n=e.data.definition;if("link"===t)n.getContents("info").get("protocol").default="https://",n.getContents("target").get("linkTargetType").default=l||"notSet"}catch(e){R.A.logError("Could not set default link attributes.")}};return(0,z.jsx)(W,{id:t,children:(0,z.jsx)(T,{config:p,initData:a,onBeforeLoad:function(e){return e.on("dialogDefinition",f)},type:"classic",onChange:function(e){var t=e.editor.getData();i(t)},onKey:function(e){"source"===e.editor.mode&&setTimeout((function(){var t=e.editor.editable().getValue();i(t)}),0)},editorUrl:"".concat(n.p,"ckeditor4/ckeditor-new.js")})})}}}]);
6
+ var o,a,d,l,u;o=e,a=function(e){return r=void 0,e?n(e):window.NEW_CKEDITOR?void t(NEW_CKEDITOR):n(new Error("Script loaded from editorUrl doesn't provide NEW_CKEDITOR namespace."))},l=document.head||document.getElementsByTagName("head")[0],u=document.createElement("script"),"function"==typeof a&&(d=a,a={}),a=a||{},d=d||function(){},u.type=a.type||"text/javascript",u.charset=a.charset||"utf8",u.async=!("async"in a)||!!a.async,u.src=o,a.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(u,a.attrs),a.text&&(u.text=String(a.text)),("onload"in u?i:c)(u,d),u.onload||i(u,d),l.appendChild(u)}))};var l=n(5556),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};function s(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var p=["activeEnterModeChange","activeFilterChange","afterCommandExec","afterInsertHtml","afterPaste","afterPasteFromWord","afterSetData","afterUndoImage","ariaEditorHelpLabel","ariaWidget","autogrow","beforeCommandExec","beforeDestroy","beforeGetData","beforeModeUnload","beforeSetMode","beforeUndoImage","blur","change","configLoaded","contentDirChanged","contentDom","contentDomInvalidated","contentDomUnload","contentPreview","customConfigLoaded","dataFiltered","dataReady","destroy","dialogHide","dialogShow","dirChanged","doubleclick","dragend","dragstart","drop","elementsPathUpdate","exportPdf","fileUploadRequest","fileUploadResponse","floatingSpaceLayout","focus","getData","getSnapshot","insertElement","insertHtml","insertText","instanceReady","key","langLoaded","loadSnapshot","loaded","lockSnapshot","maximize","menuShow","mode","notificationHide","notificationShow","notificationUpdate","paste","pasteFromWord","pluginsLoaded","readOnly","removeFormatCleanup","required","resize","save","saveSnapshot","selectionChange","setData","stylesRemove","stylesSet","template","toDataFormat","toHtml","uiSpace","unlockSnapshot","updateSnapshot","widgetDefinition"],f=["beforeLoad","namespaceLoaded"],y=s(s([],p,!0),f,!0),g="__CKE__";function m(e){var t=e.substr(0,1).toUpperCase()+e.substr(1);return"on".concat(t)}function v(e){return e.substr(2,1).toLowerCase()+e.substr(3)}var h=s(s([],p,!0),f,!0).reduce((function(e,t){var n;return u(u({},e),((n={})[t]=function(e){return"".concat(g).concat(e)}(t),n))}),{});function b(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}function O(e,t,n){var r={display:"none",visibility:"hidden"};return"classic"===e?r:"ready"===t?null!=n?n:void 0:r}function x(e){var t=e.debug,n=e.editor,r=e.evtName,o=e.handler,a=e.listenerData,i=e.priority,c=t&&Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),d=o;return t&&(d=function(e){console.log({operation:"invoke",editor:n.name,evtName:r,handlerId:c,data:e.data,listenerData:e.listenerData}),o(e)}),t&&console.log({operation:"register",editor:n.name,evtName:r,handlerId:c}),n.on(r,d,null,a,i),function(){t&&console.log({operation:"unregister",editor:n.name,evtName:r,handlerId:c}),n.removeListener(r,d)}}var S=a.useEffect,k=a.useReducer,C=a.useRef,E="https://cdn.ckeditor.com/4.22.1/standard-all/ckeditor.js",w={};function D(e,t){switch(t.type){case"init":return u(u({},e),{hookStatus:"init"});case"loading":return u(u({},e),{hookStatus:"loading"});case"unloaded":return{editor:t.payload,hookStatus:"unloaded"};case"loaded":return u(u({},e),{hookStatus:"loaded"});case"ready":return u(u({},e),{hookStatus:"ready"});case"destroyed":return{editor:void 0,hookStatus:"destroyed"};case"error":return{editor:void 0,hookStatus:"error"};default:return e}}var j=a.useEffect,L=a.useRef,P=a.useState;function T(e){var t=e.config,n=void 0===t?{}:t,r=e.debug,o=e.editorUrl,i=e.initData,c=e.name,l=e.readOnly,u=e.style,s=e.type,p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["config","debug","editorUrl","initData","name","readOnly","style","type"]),T=P(null),U=T[0],_=T[1],R=L(p);n&&"boolean"==typeof l&&(n.readOnly=l);var I=function(e){var t=e.config,n=e.debug,r=e.dispatchEvent,o=e.subscribeTo,a=void 0===o?y:o,i=e.editorUrl,c=e.element,l=e.initContent,u=e.type,s=void 0===u?"classic":u,p=C(i||E),m=C(null!=a?a:y),v=C(n),b=C(r),O=C(l),j=C(t||w),L=C(s),P=k(D,{editor:void 0,hookStatus:"init"}),T=P[0],U=T.editor,_=T.hookStatus,R=P[1];return S((function(){return c&&!U&&(R({type:"loading"}),d(p.current,(function(e){var t;-1!==m.current.indexOf("namespaceLoaded")&&(null===(t=b.current)||void 0===t||t.call(b,{type:h.namespaceLoaded,payload:e}))})).then((function(e){var t,n="inline"===L.current,r=j.current.readOnly;-1!==m.current.indexOf("beforeLoad")&&(null===(t=b.current)||void 0===t||t.call(b,{type:h.beforeLoad,payload:e}));var o=e[n?"inline":"replace"](c,j.current);m.current.filter((function(e){return-1===f.indexOf(e)})).forEach((function(e){x({debug:v.current,editor:o,evtName:e,handler:function(t){var n;null===(n=b.current)||void 0===n||n.call(b,{type:"".concat(g).concat(e),payload:t})}})})),x({debug:v.current,editor:o,evtName:"loaded",handler:function(){R({type:"loaded"})},priority:-1}),x({debug:v.current,editor:o,evtName:"instanceReady",handler:function(e){var t=e.editor;R({type:"ready"}),n&&!r&&t.setReadOnly(!1),O.current&&t.setData(O.current,{noSnapshot:!0,callback:function(){t.resetUndo()}})},priority:-1}),x({debug:v.current,editor:o,evtName:"destroy",handler:function(){R({type:"destroyed"})},priority:-1}),R({type:"unloaded",payload:o})})).catch((function(e){console.error(e),R({type:"error"})}))),function(){U&&U.destroy()}}),[U,c]),{editor:U,status:null==U?void 0:U.status,error:"error"===_,loading:"loading"===_}}({config:n,dispatchEvent:function(e){var t=e.type,n=e.payload,r=m(t.substr(g.length)),o=R.current[r];o&&o(n)},debug:r,editorUrl:o,element:U,initContent:"string"==typeof i?i:void 0,subscribeTo:Object.keys(p).filter((function(e){return 0===e.indexOf("on")})).map(v),type:s}),N=I.editor,F=I.status;return j((function(){var e="inline"!==s&&N&&("loaded"===F||"ready"===F);return u&&e&&N.container.setStyles(u),function(){u&&e&&Object.keys(u).map(b).forEach((function(e){N.container.removeStyle(e)}))}}),[N,F,u,s]),j((function(){N&&"ready"===F&&"boolean"==typeof l&&N.setReadOnly(l)}),[N,F,l]),a.createElement("div",{id:null!=c?c:void 0,ref:_,style:O(null!=s?s:"classic",F,u)},"string"==typeof i?null:i)}var U=u({config:l.object,debug:l.bool,editorUrl:l.string,initData:l.node,name:l.string,readOnly:l.bool,style:l.object,type:l.oneOf(["classic","inline"])},y.reduce((function(e,t){var n;return u(u({},e),((n={})[m(t)]=l.func,n))}),{}));T.propTypes=U;var _=n(11843),R=n(73082),I=n(5544);const N=Object.entries({"8px":"~6pt","9px":"~7pt","10px":"~7.5pt","11px":"~8pt","12px":"~9pt","13px":"~10pt","14px":"~10.5pt","15px":"~11pt","16px":"~12pt","17px":"~13pt","18px":"~13.5pt","19px":"~14pt","20px":"~14.5pt","22px":"~16pt","24px":"~18pt","26px":"~20pt","28px":"~21pt","29px":"~22pt","32px":"~24pt","36px":"~26pt","37px":"~28pt","48px":"~36pt","64px":"~48pt","72px":"~54pt"}).map((function(e){var t=(0,I.A)(e,2),n=t[0],r=t[1];return"".concat(n," (").concat(r,")/").concat(n)})).join(";");var F,A=n(57528),H=n(43759),K=n(60284),W=H.Ay.div.withConfig({displayName:"StyledHtmlEditor"})(F||(F=(0,A.A)(["\n && {\n .ck-editor {\n --ck-border-radius: 0.27rem;\n ","\n\n .ck.ck-list__item .ck-button.ck-fontsize-option .ck-button__label {\n line-height: 1;\n }\n\n .ck-editor__editable {\n min-height: 100px;\n }\n }\n }\n"])),(function(e){return(0,K.gv)(e,"ckeditor")})),z=n(74848);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.NEW_CKEDITOR_BASEPATH="".concat(n.p,"ckeditor4/");var M=function(e){switch(e){case"fr-CH":return"fr";case"it-CH":return"it";case"en-US":return"en";case"fr":case"en":case"it":case"de":return e;case"de-CH":return"de-ch";default:return"de"}};const q=function(e){var t=e.id,r=e.value,a=void 0===r?"":r,i=e.onChange,c=e.contentLang,d=void 0===c?"de":c,l=e.defaultLinkTarget,u=e.ckEditorConfig,s=(0,_.useIntl)().locale,p=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({language:M(s),contentsLanguage:d,entities:!1,allowedContent:!0,toolbar:[["Bold","Italic","Underline","Strike","RemoveFormat"],["Format","Font","FontSize","TextColor"],["NumberedList","BulletedList"],["Link","Unlink"],["Table","SpecialChar","Image"],["PasteText"],["Source"]],extraPlugins:["colorbutton","colordialog","dialogadvtab","font","codemirror"],removeButtons:[],removeDialogTabs:"",removePlugins:["elementspath"],codemirror:{mode:"htmlmixed",enableCodeFormatting:!0,autoFormatOnStart:!0},versionCheck:!1,fontSize_sizes:N},u),f=function(e){try{var t=e.data.name,n=e.data.definition;if("link"===t)n.getContents("info").get("protocol").default="https://",n.getContents("target").get("linkTargetType").default=l||"notSet"}catch(e){R.A.logError("Could not set default link attributes.")}};return(0,z.jsx)(W,{id:t,children:(0,z.jsx)(T,{config:p,initData:a,onBeforeLoad:function(e){return e.on("dialogDefinition",f)},type:"classic",onChange:function(e){var t=e.editor.getData();i(t)},onKey:function(e){"source"===e.editor.mode&&setTimeout((function(){var t=e.editor.editable().getValue();i(t)}),0)},editorUrl:"".concat(n.p,"ckeditor4/ckeditor-new.js")})})}}}]);