tocco-admin 1.0.147 → 1.0.149
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.
- package/changelog.md +8 -0
- package/dist/chunk-531.0468175ebbe6c57b839b.js +1 -0
- package/dist/{chunk-918.704d722a07b53e980e9e.js → chunk-918.245dea132cd40cb216ca.js} +1 -1
- package/dist/chunk-actions.2d98416892c93c484529.js +1 -0
- package/dist/{chunk-docs-actions.12ccf19bcecc6b048380.js → chunk-docs-actions.c534b04d80f970342acd.js} +1 -1
- package/dist/chunk-html-editor.f2540b66d45624314d50.js +6 -0
- package/dist/{chunk-vendor-icons.dfa70711a4e7a59b42f5.js → chunk-vendor-icons.6771a68b93fefc60babe.js} +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-531.f32979177b05fe321a6a.js +0 -1
- package/dist/chunk-actions.ac64dec61bf2d1bcc619.js +0 -1
- package/dist/chunk-html-editor.e6cf3cdb90717eb49cfa.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[141],{57387:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});var r=n(27361),a=n.n(r),o=n(74806),i=n(50558),c=n(29785),s=n(59713),l=n.n(s),u=n(17563),d=n(73183),p=n(6699),f=n(90169),h=n(85893);function m(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}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.entityName,n=e.entityKeys,r=e.children,a=n.map((function(e){return{entityName:t,key:e}}));return(0,h.jsx)(p.Z,{to:"/docs?rootNodes=".concat(JSON.stringify(a)),target:"_blank",children:r})};const g=function(e){var t=u.parse(e.history.location.search);return(0,h.jsx)(d.default,y(y(y({},e),{},{routerType:"inherit",navigationStrategy:{ListLink:v,DetailLink:f.z2}},t.rootNodes&&{rootNodes:JSON.parse(t.rootNodes)}),{},{searchFormCollapsed:e.searchFormCollapsed,onSearchFormCollapsedChange:function(t){var n=t.collapsed;e.saveUserPreferences({"admin.list.searchFormCollapsed":n})},scrollBehaviour:"inline"}))};var b={saveUserPreferences:c.RK};const w={container:(0,i.connect)((function(e,t){return{searchFormCollapsed:a()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",null)}}),b)((0,o.ZP)(g))}},18632:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Kn});var r=n(15857),a=n(74806),o=n(50558),i="path/SET_CURRENT_VIEW_INFO",c="path/LOAD_CURRENT_ROUTE",s="path/SET_BREADCRUMBS_INFO",l="path/UPDATE_BREADCRUMBS_INFO",u="path/SET_RELATIONS",d="path/SET_CURRENT_VIEW_TITLE",p="path/SET_RELATIONS_INFO",f="path/PROPAGATE_REFRESH",h="path/INVALIDATE_LAST_BREADCRUMB",m="path/SELECT_RELATION",y=function(e,t){return{type:i,payload:{location:e,currentViewInfo:t}}},v=function(e,t){return{type:l,payload:{path:e,breadcrumbsInfo:t}}},g=function(e){return{type:u,payload:{relations:e}}},b=function(e){return{type:p,payload:{relationsInfo:e}}},w=function(e){return{type:m,payload:{selectedRelation:e}}},x=n(1024),P=n.n(x),O=n(56746),j=n(19743),Z=n(98235),E=n(27361),k=n.n(E),R=n(70696),N=n(75354),C=n(87467),S=n(90169),A=n(96801),I=function(e){var t=A.Z.extractParamsFromPath("/e/:entity/:key?/:relation*/:view(list|detail|edit|create|relations|action)/:actionId?",e),n=A.Z.extractParamsFromPath("/e/action/:actionId",e);return t||n},D=n(46054),L=n(85893),V=function(e){var t=e.history,n=e.match,r=e.setCurrentViewTitle,a=e.currentViewInfo,o=e.intl,i=t.location;if((0,x.useEffect)((function(){return a&&r(o.formatMessage({id:"client.actions.".concat(a.actionId,".title")})),function(){r(null)}}),[a,r,o]),!a)return null;var c=N.Z.fromQueryString(i.search),s=k()(i,"state.selection",c.selection),l=k()(i,"state.definition.properties",c.actionProperties),u=function(){var e=I(n.url).key?(0,C.H)(n.url):(0,C.H)(n.url,2);t.replace(e)};return(0,L.jsx)(D.Z,{history:t,match:n,appId:a.actionId,selection:s,actionProperties:l,navigationStrategy:(0,S.ZP)(t,n),onSuccess:u,onError:u,onCancel:u})},T=function(e,t){return 0===Object.keys(R.Z.difference(e,t)).length};const _=P().memo(V,T);var F={setCurrentViewTitle:function(e){return{type:d,payload:{currentViewTitle:e}}}};const U=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),F)((0,a.ZP)(_));var M=n(50600),W=n(91073),B=n(319),H=n.n(B),z=n(63038),K=n.n(z),$=n(28655),q=n.n($),G=n(38205),Y=n(73183),J=n(45650),Q=n(12568),X=n(88601),ee=n(7281),te=n(24688);const ne=function(e){var t=e.when,n=e.message;return(0,x.useEffect)((function(){return t&&te.Z.activatePreventFromLeaving(),function(){te.Z.deactivatePreventFromLeaving()}}),[t]),(0,L.jsx)(O.NL,{when:t,message:n})},re=ne;var ae,oe=G.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(ae||(ae=q()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),X.Z.color("paper"),ee.Z.space(0));const ie=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,a=e.intl,o=e.chooseDocument,i=e.dispatchEmittedAction,c=n.location,s=k()(c,"state.defaultValues",[]),l=(0,x.useState)(!1),u=K()(l,2),d=u[0],p=u[1];if(!t)return null;var f,h=t.model,m=t.reverseRelation,y=t.parentKey,v=h.name,g=k()(h,"paths.".concat(m,".multi"),!1),b=[].concat(H()(m&&y?[{id:m,value:g?[y]:y}]:[]),H()(s));return(0,L.jsxs)(oe,{children:[(0,L.jsx)(re,{when:d,message:(f="client.entity-browser.detail.confirmTouchedFormLeave",a.formatMessage({id:f}))}),(0,L.jsx)(J.ZP,{entityName:v,formName:v,mode:"create",defaultValues:b,emitAction:function(e){i(e)},navigationStrategy:(0,S.ZP)(n,r),chooseDocument:o,onEntityCreated:function(e){var t=e.id;p(!1),n.push(r.url.replace(/create$/,t))},onTouchedChange:function(e){var t=e.touched;return p(t)},listApp:Q.ZP,docsApp:Y.default})]})};var ce={chooseDocument:W.Z.actions.chooseDocument,dispatchEmittedAction:M.Z.dispatchEmittedAction};const se=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),ce)((0,a.ZP)(ie));var le=n(29785),ue=n(59713),de=n.n(ue),pe=n(17563),fe=n(29441),he=n(48926),me=n.n(he),ye=n(87757),ve=n.n(ye),ge=n(81719);function be(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}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const xe=function(e){var t=e.entityName,n=e.entityKey,r=e.showActions,a=e.noLeftPadding,o=e.openResource,i=e.initialLocation,c=e.sortable,s=(0,x.useState)(null),l=K()(s,2),u=l[0],d=l[1],p=(0,x.useCallback)(me()(ve().mark((function e(){return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ge.Z.simpleRequest("entities/2.0/"+t+"/"+n+"/entitydocs/folder").then((function(e){d(e.body.key)}));case 1:case"end":return e.stop()}}),e)}))),[t,n]);return(0,x.useEffect)((function(){p()}),[p]),u&&(0,L.jsx)(Y.default,we(we(we({routerType:"routerless",initialLocation:i,noLeftPadding:a,sortable:c,searchFormType:"none",rootNodes:[{key:u,entityName:"Folder"}],embedded:!0,showActions:r},!1===r?{selectionStyle:"none"}:{}),{},{disableViewPersistor:!0},o?{openResource:o}:{}),{},{scrollBehaviour:"inline"}))};const Pe=function(e){var t=e.currentViewInfo,n=e.initialLocation;return(0,L.jsx)(xe,{noLeftPadding:!1,entityName:t.parentModel.name,entityKey:t.parentKey,showActions:!0,initialLocation:n})};function Oe(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}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ze=function(e){var t=e.match,n=e.history,r=e.currentViewInfo,a=e.emitAction,o=e.searchFormCollapsed,i=e.saveUserPreferences;if(!r)return null;var c=pe.parse(n.location.search),s=n.location.hash?n.location.hash.substring(1):null;return"Resource"===r.model.name?(0,L.jsx)(Pe,{currentViewInfo:r,initialLocation:s}):(0,L.jsx)(Q.ZP,je(je({emitAction:a,limit:25,id:"".concat(r.model.name,"_list"),entityName:r.model.name,formName:c.formName||r.model.name,onRowClick:function(e){var r=e.id;n.push(t.url.replace(/list$/,"")+r)}},r.reverseRelation&&{parent:{key:r.parentKey,reverseRelationName:r.reverseRelation,model:r.parentModel.name}}),{},{showLink:!0,navigationStrategy:(0,S.ZP)(n,t),searchFormPosition:"left",searchFormType:"admin",scrollBehaviour:"inline",store:fe.Z.viewInfoSelector(n.location.pathname).store,onStoreCreate:function(e){fe.Z.persistViewInfo(n.location.pathname,{store:e},r.level)},actionAppComponent:D.Z,tql:c.tql,searchFormCollapsed:o,onSearchFormCollapsedChange:function(e){var t=e.collapsed;i({"admin.list.searchFormCollapsed":t})}}))};var Ee={emitAction:function(e){return M.Z.dispatchEmittedAction(e)},saveUserPreferences:le.RK};const ke=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],searchFormCollapsed:k()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",!1)}}),Ee)((0,a.ZP)(Ze));var Re,Ne=n(4975);function Ce(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}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ae=G.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(Re||(Re=q()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),X.Z.color("paper"),ee.Z.space(0));const Ie=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,a=e.intl,o=e.chooseDocument,i=e.emitAction,c=e.propagateRefresh,s=e.invalidateLastBreadcrumb,l=(0,x.useState)(!1),u=K()(l,2),d=u[0],p=u[1];if(!t||t.pathname!==n.location.pathname)return null;var f=pe.parse(location.search).formName,h=t.model.name;return(0,L.jsxs)(Ae,{children:[(0,L.jsx)(re,{when:d,message:function(e){return n.location.pathname!==e.pathname&&(t="client.entity-browser.detail.confirmTouchedFormLeave",a.formatMessage({id:t}));var t}}),(0,L.jsx)(J.ZP,{entityName:h,entityId:t.key,formName:f||h,mode:"update",emitAction:i,onTouchedChange:function(e){var t=e.touched;return p(t)},navigationStrategy:Se(Se({},(0,S.ZP)(n,r)),{},{navigateToCreateRelative:function(e,t){if(e){var a=(0,C.H)(r.url,1);n.push({pathname:"".concat(a,"/").concat(e,"/create"),state:t})}else{var o=(0,C.H)(r.url,2);n.push({pathname:o+"/create",state:t})}}}),chooseDocument:o,onEntityDeleted:function(){var e=(0,C.H)(r.url,2);n.push(e)},onEntityUpdated:function(){var e=n.location;s(e)},onRefresh:function(){var e=n.location;c(e)},actionAppComponent:D.Z,onSubGridRowClick:function(e){var t=e.id,a=e.relationName,o=(0,C.H)(r.url);n.push("".concat(o,"/").concat(a,"/").concat(t))},listApp:Q.ZP,docsApp:Y.default})]})};var De={chooseDocument:W.Z.actions.chooseDocument,emitAction:function(e){return M.Z.dispatchEmittedAction(e)},propagateRefresh:function(e){return{type:f,payload:{location:e}}},invalidateLastBreadcrumb:function(e){return{type:h,payload:{location:e}}}};const Le=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),De)((0,a.ZP)(Ie));var Ve=n(34206),Te=n(88162),_e={};const Fe=function(e){var t=e.currentViewInfo,n=e.history,r=e.selectedRelation,a=e.sortable;return(0,L.jsx)(xe,{entityName:t.model.name,entityKey:t.key,showActions:!1,noLeftPadding:!0,history:n,openResource:function(e){n.push("".concat(r.relationName,"/list#").concat(e))},sortable:a})};var Ue=function(e){var t=e.selectedRelation,n=e.currentViewInfo,r=e.match,a=e.history,o=e.emitAction,i="".concat(t.reverseRelationName).concat(t.relationName);return(0,L.jsx)(Q.ZP,{id:"preview"+t.reverseRelationName+t.targetEntity,entityName:t.targetEntity,formName:t.targetEntity,parent:{key:n.key,reverseRelationName:t.reverseRelationName,model:n.model.name,relationName:t.relationName},showLink:!0,navigationStrategy:(0,S.ZP)(a,r),onRowClick:function(e){var n=e.id,o=r.url.replace(/detail$/,"");a.push("".concat(o).concat(t.relationName,"/").concat(n))},onNavigateToCreate:function(){var e=(0,C.H)(r.url);a.push(e+"/"+t.relationName+"/create")},searchFormType:"fulltext",selectionStyle:"none",store:fe.Z.viewInfoSelector(a.location.pathname)["store-".concat(i)],onStoreCreate:function(e){fe.Z.persistViewInfo(n.pathname,de()({},"store-".concat(i),e),n.level)},showActions:!1,limit:15,emitAction:o,scrollBehaviour:"inline"},t.reverseRelationName+t.targetEntity)};const Me=P().memo(Ue);var We,Be,He,ze,Ke,$e,qe,Ge,Ye,Je,Qe,Xe,et,tt,nt=n(6699),rt=n(65035),at=n(11347),ot=n(84647),it=n(69829),ct=n(30759),st=G.ZP.div.withConfig({displayName:"StyledRelationsViewWrapper"})(We||(We=q()(["\n display: ",";\n height: 100%;\n flex-direction: column;\n"])),(function(e){return e.isRightPaneCollapsed?"none":"flex"})),lt=G.ZP.div.withConfig({displayName:"StyledPlaceHolder"})(Be||(Be=q()(["\n display: ",";\n flex: 1;\n height: 100%;\n width: 25px;\n background: ",";\n padding-top: ",";\n padding-left: ",";\n align-items: flex-start;\n\n &:hover {\n cursor: pointer;\n }\n"])),(function(e){return e.isRightPaneCollapsed?"flex":"none"}),X.Z.color("paper"),ee.Z.space(-1.5),ee.Z.space(-2.5)),ut=G.ZP.div.withConfig({displayName:"StyledToggleCollapse"})(He||(He=q()(["\n display: flex;\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n"])),X.Z.color("paper"),ee.Z.space(-1.5),ee.Z.space(-1.5)),dt=(0,G.ZP)(rt.Z).withConfig({displayName:"StyledToggleCollapseButton"})(ze||(ze=q()(["\n font-size: ",";\n padding: 0;\n margin-left: auto;\n\n &:hover,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),ee.Z.font(0),lt,X.Z.color("secondaryLight")),pt=G.ZP.div.withConfig({displayName:"StyledPreviewBox"})(Ke||(Ke=q()(["\n background-color: ",";\n padding: ",";\n margin-top: 3px;\n display: flex;\n flex-direction: column;\n flex: 1;\n"])),X.Z.color("paper"),ee.Z.space(-1)),ft=G.ZP.div.withConfig({displayName:"StyledRelationBoxes"})($e||($e=q()(["\n background-color: ",";\n padding: ",";\n display: grid;\n grid-template-columns: repeat(auto-fit, 170px);\n grid-gap: ",";\n justify-content: space-between;\n overflow-y: auto;\n align-content: flex-start;\n height: fit-content;\n min-height: 150px;\n max-height: 20%;\n ","\n"])),X.Z.color("paper"),ee.Z.space(-1),ee.Z.space(-2),at.C),ht=(0,G.ZP)(nt.Z).withConfig({displayName:"StyledPreviewLink"})(qe||(qe=q()(["\n padding-left: ",";\n\n &:nth-child(2) {\n padding-left: 0;\n }\n"])),ee.Z.space(-.5)),mt=G.ZP.div.withConfig({displayName:"StyledRelationLinks"})(Ge||(Ge=q()(["\n display: none;\n margin-left: auto;\n\n * {\n color: ",";\n padding-left: ",";\n }\n"])),X.Z.color("text"),ee.Z.space(-4.5)),yt=G.ZP.div.withConfig({displayName:"StyledRelationBox"})(Ye||(Ye=q()(["\n border-radius: ",";\n padding: "," ",";\n display: flex;\n background-color: ",";\n height: fit-content;\n\n &&& {\n * {\n color: ",";\n box-sizing: initial;\n }\n }\n ",";\n\n /* allow hover styles only on non-touch devices */\n ","\n"])),X.Z.radii("large"),ee.Z.space(-2.7),ee.Z.space(-1),(function(e){return e.selected&&X.Z.color("secondary")}),(function(e){return e.selected&&X.Z.color("paper")}),(function(e){return e.selected&&"\n ".concat(mt," {\n display: flex;\n }\n ")}),!ot.b&&(0,G.iv)(Je||(Je=q()(["\n &:hover "," {\n display: flex;\n }\n\n && {\n :hover {\n background-color: ",";\n\n * {\n color: ",";\n }\n cursor: pointer;\n }\n }\n\n ",":hover * {\n color: ",";\n }\n "])),mt,X.Z.color("secondaryLight"),X.Z.color("paper"),nt.Z,X.Z.color("secondary"))),vt=(0,G.ZP)(it.Fe).withConfig({displayName:"StyledRelationLabel"})(Qe||(Qe=q()(["\n && {\n max-width: 110px;\n }\n"]))),gt=G.ZP.span.withConfig({displayName:"StyledCountLabel"})(Xe||(Xe=q()(["\n ","\n"])),(0,ct.Z)());const bt=function(e){var t,n,r=e.relation,a=e.history,o=e.match,i=e.relationsInfo,c=e.selectRelation,s=e.selectedRelation,l=e.intl,u=e.entityName,d=r.relationName,p=r.targetEntity,f=r.relationDisplay,h=function(e){return l.formatMessage({id:e})},m=o.url.replace(/(relations|detail)$/,d),y=o.url.replace(/(relations|detail)$/,d)+"/create";return(0,L.jsxs)(yt,{selected:(null==s?void 0:s.relationName)===d,onClick:function(){c(r),a.replace({search:"?relation=".concat(d)}),function(e,t){_e[e]=t}(u,d)},children:[(0,L.jsx)(vt,{title:f.label,children:f.label}),(null===(n=i[d])||void 0===n?void 0:n.count)>0?(0,L.jsxs)(gt,{children:[" (",i[d].count,")"]}):null,(0,L.jsxs)(mt,{children:[(0,L.jsx)(nt.Z,{"aria-label":h("client.admin.entities.relationsView.relationLinkView"),to:m,children:et||(et=(0,L.jsx)(Te.Z,{icon:"arrow-right"}))}),(null===(t=i[d])||void 0===t?void 0:t.createPermission)&&"Resource"!==p&&(0,L.jsx)(nt.Z,{"aria-label":h("client.admin.entities.relationsView.relationLinkCreate"),to:y,children:tt||(tt=(0,L.jsx)(Te.Z,{icon:"plus"}))})]})]})};var wt,xt,Pt;function Ot(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}var jt=function(e){var t=e.history,n=e.match,r=e.currentViewInfo,a=e.relations,o=e.relationsInfo,i=e.emitAction,c=e.intl,s=e.isRightPaneCollapsed,l=e.toggleCollapse,u=e.selectedRelation,d=e.selectRelation,p=k()(r,"model.name"),f=(0,x.useCallback)((function(){if((null==a?void 0:a.length)>0){var e=pe.parse(t.location.search).relation;if(e)d(a.find((function(t){return t.relationName===e})));else{var n=_e[p];d(n?a.find((function(e){return e.relationName===n})):a[0])}}}),[a,p,t.location.search,d]);if((0,x.useEffect)(f,[f]),(0,x.useEffect)((function(){return u?null:f()}),[u,f]),!a||0===a.length||!r)return null;var h,m,y=function(e){return c.formatMessage({id:e})},v=u?"Resource"===u.targetEntity?Fe:Me:function(){return wt||(wt=(0,L.jsx)(P().Fragment,{}))},g=a.map((function(t){return(0,L.jsx)(bt,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({relation:t,entityName:p},e),"relation-".concat(t.relationName))}));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(st,{isRightPaneCollapsed:s,children:[(0,L.jsx)(ut,{children:(0,L.jsx)(dt,{icon:"chevron-right",onClick:l})}),(0,L.jsx)(ft,{children:g}),u&&(0,L.jsxs)(pt,{children:[(0,L.jsxs)(Ve.ZP.H4,{children:[u.relationDisplay.label,(0,L.jsx)(ht,{"aria-label":y("client.admin.entities.relationsView.relationLinkView"),to:n.url.replace(/(relations|detail)$/,u.relationName),children:xt||(xt=(0,L.jsx)(Te.Z,{icon:"arrow-right"}))}),(h=u.relationName,(null===(m=o[h])||void 0===m?void 0:m.createPermission)&&"Resource"!==u.targetEntity&&(0,L.jsx)(ht,{"aria-label":y("client.admin.entities.relationsView.relationLinkCreate"),to:n.url.replace(/(relations|detail)$/,u.relationName)+"/create",children:Pt||(Pt=(0,L.jsx)(Te.Z,{icon:"plus"}))}))]}),(0,L.jsx)(v,{selectedRelation:u,match:n,history:t,currentViewInfo:r,emitAction:i,sortable:!0})]})]}),(0,L.jsx)(lt,{onClick:l,isRightPaneCollapsed:s,children:(0,L.jsx)(dt,{icon:"chevron-left",isRightPaneCollapsed:s})})]})},Zt=function(e,t){return 0===Object.keys(R.Z.difference(e,t)).length};const Et=P().memo(jt,Zt);var kt={emitAction:function(e){return M.Z.dispatchEmittedAction(e)},selectRelation:w};const Rt=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relations:e.entities.path.relations,relationsInfo:e.entities.path.relationsInfo,selectedRelation:e.entities.path.selectedRelation}}),kt)((0,a.ZP)(Et));var Nt,Ct,St,At=G.ZP.div.withConfig({displayName:"StyledDetailViewContainer"})(Nt||(Nt=q()(["\n display: flex;\n flex-direction: row;\n height: 100%;\n\n .react-bs-container-body {\n height: auto !important;\n }\n"]))),It=G.ZP.div.withConfig({displayName:"StyledDetailViewLeft"})(Ct||(Ct=q()(["\n flex: 1;\n margin-right: 1rem;\n /* Only show one panel at a time on screens <= 500px */\n display: ",";\n"])),(function(e){var t=e.windowWidth,n=e.isRightPaneCollapsed;return t<=500&&!n&&"none"})),Dt=G.ZP.div.withConfig({displayName:"StyledDetailViewRight"})(St||(St=q()(["\n flex: ",";\n"])),(function(e){return e.isRightPaneCollapsed?"0":"1"}));const Lt=function(e){var t=e.match,n=e.history,r=(e.currentViewInfo,e.relationViewCollapsed),a=e.saveUserPreferences,o=(0,Ne.K)(r,(function(e){a({"admin.detail.relationViewCollapsed":e})})),i=o.isCollapsed,c=o.toggleCollapse;return(0,L.jsxs)(At,{children:[(0,L.jsx)(It,{isRightPaneCollapsed:i,windowWidth:window.innerWidth,children:(0,L.jsx)(j.Z.ErrorBoundary,{children:(0,L.jsx)(Le,{match:t,history:n})})}),(0,L.jsx)(Dt,{isRightPaneCollapsed:i,children:(0,L.jsx)(j.Z.ErrorBoundary,{children:(0,L.jsx)(Rt,{match:t,history:n,isRightPaneCollapsed:i,toggleCollapse:c})})})]})};var Vt={saveUserPreferences:le.RK};const Tt=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relationViewCollapsed:k()(e.preferences.userPreferences,"admin.detail.relationViewCollapsed",!1)}}),Vt)((0,a.ZP)(Lt));const _t=function(e){var t,n,r=e.match,a=(t=r.path,n=":relation",t.split(n).length-1);return(0,L.jsxs)(O.rs,{children:[(0,L.jsx)(O.AW,{exact:!0,path:"".concat(r.url),render:function(e){return(0,L.jsx)(O.l_,{to:"".concat(e.match.url.replace(/\/$/,""),"/detail")})}}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/detail"),component:Tt}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/edit"),component:Le}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/relations"),component:Rt}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/action"),component:U}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/:relation_").concat(a),component:Ft})]})};const Ft=function(e){var t=e.match;return(0,L.jsxs)(O.rs,{children:[(0,L.jsx)(O.AW,{exact:!0,path:t.url,render:function(e){return(0,L.jsx)(O.l_,{to:"".concat(e.match.url.replace(/\/$/,""),"/list")})}}),(0,L.jsx)(O.AW,{path:"".concat(t.path,"/action/:id"),component:U}),(0,L.jsx)(O.AW,{path:"".concat(t.path,"/list"),component:ke}),(0,L.jsx)(O.AW,{path:"".concat(t.path,"/create"),component:se}),(0,L.jsx)(O.AW,{path:"".concat(t.path,"/:key"),component:_t})]})};var Ut=n(2977);const Mt=(0,o.connect)((function(e,t){return{pathPrefix:"/e",breadcrumbsInfo:e.entities.path.breadcrumbsInfo,currentView:e.entities.path.currentViewTitle?{display:e.entities.path.currentViewTitle,title:e.entities.path.currentViewTitle}:null}}),{})((0,a.ZP)(Ut.Z));var Wt=n(44012),Bt=n(39233);const Ht=function(e){var t=e.currentViewInfo,n="client.admin.entity.errorView.",r="detail"===t.type?"detailTitle":"defaultTitle",a="listDescription";return"detail"===t.type?a="detailDescription":"list"===t.type&&t.error.relationName&&(a="relationDescription"),(0,L.jsx)(Bt.Z,{title:(0,L.jsx)(Wt.Z,{id:n+r}),message:(0,L.jsx)(Wt.Z,{id:n+a,values:t.error})})};const zt=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}))((0,a.ZP)(Ht));var Kt,$t,qt,Gt,Yt=G.ZP.div.withConfig({displayName:"StyledWrapper"})(Kt||(Kt=q()(["\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-areas:\n 'breadcrumbs'\n 'content';\n height: 100%;\n width: 100%;\n"]))),Jt=G.ZP.div.withConfig({displayName:"StyledContent"})($t||($t=q()(["\n grid-area: content;\n overflow: hidden;\n"]))),Qt=G.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(qt||(qt=q()(["\n grid-area: breadcrumbs;\n"])));const Xt=function(e){var t=e.match,n=e.history,r=e.loadCurrentRoute,a=e.currentViewInfo,o=n.location;(0,x.useEffect)((function(){r(o)}),[o,r]);var i=null!=a&&a.error?(0,L.jsx)(zt,{history:n}):(0,L.jsxs)(O.rs,{children:[(0,L.jsx)(O.AW,{path:"".concat(t.url,"/action/:actionId"),component:U}),(0,L.jsx)(O.AW,{path:"".concat(t.url,"/:entity"),component:Ft}),(0,L.jsx)(O.AW,{exact:!0,path:t.url,component:Z.Z})]});return(0,L.jsxs)(Yt,{children:[Gt||(Gt=(0,L.jsx)(j.Z.ErrorBoundary,{children:(0,L.jsx)(Qt,{children:(0,L.jsx)(Mt,{})})})),(0,L.jsx)(Jt,{children:i})]})};var en={loadCurrentRoute:function(e){return{type:c,payload:{location:e}}}};const tn=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),en)((0,a.ZP)(Xt));var nn,rn=n(34857),an=n(81770);function on(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}function cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sn=(nn={},de()(nn,i,(function(e,t){var n=t.payload,r=n.location,a=n.currentViewInfo;return cn(cn({},e),{},{currentViewInfos:cn(cn({},e.currentViewInfos),{},de()({},r,cn(cn({},e.currentViewInfos[r]),a)))})})),de()(nn,s,an.Z.singleTransferReducer("breadcrumbsInfo")),de()(nn,l,(function(e,t){var n=t.payload,r=n.path,a=n.breadcrumbsInfo;return cn(cn({},e),{},{breadcrumbsInfo:e.breadcrumbsInfo.map((function(e){return e.path===r?cn(cn({},e),a):e}))})})),de()(nn,u,an.Z.singleTransferReducer("relations")),de()(nn,p,an.Z.singleTransferReducer("relationsInfo")),de()(nn,d,an.Z.singleTransferReducer("currentViewTitle")),de()(nn,m,an.Z.singleTransferReducer("selectedRelation")),nn),ln={currentViewInfos:{},breadcrumbsInfo:[],relations:null,relationsInfo:{},selectedRelation:null};var un=n(57557),dn=n.n(un),pn=n(78718),fn=n.n(pn),hn=n(35937),mn=n.n(hn),yn=n(44759);function vn(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}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bn=ve().mark(An),wn=ve().mark(In),xn=ve().mark(Dn),Pn=ve().mark(Ln),On=ve().mark(Vn),jn=ve().mark(Fn),Zn=ve().mark(Un),En=ve().mark(Mn),kn=ve().mark(Wn),Rn=ve().mark(Bn),Nn=ve().mark(Hn),Cn=function(e){return e.entities.path},Sn=/[^/]+\/?[^/]+/g;function An(){return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,rn.$6)([(0,rn.Fm)(c,In),(0,rn.Fm)(f,Un),(0,rn.Fm)(h,Mn)]);case 2:case"end":return e.stop()}}),bn)}function In(e){var t,n,r,a;return ve().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload.location,n=t.pathname,o.next=4,(0,rn.RE)(Vn,n);case 4:if(!((r=o.sent).length>0)){o.next=16;break}return o.next=8,(0,rn.RE)(Dn,n,r);case 8:if("detail"!==(a=o.sent).type||a.error){o.next=12;break}return o.next=12,(0,rn.RE)(Fn,a.model,a.key);case 12:return o.next=14,(0,rn.RE)(Ln,r);case 14:return o.next=16,(0,rn.RE)(fe.Z.clearPersistedViews,a.level+1);case 16:case"end":return o.stop()}}),wn)}function Dn(e,t){var n;return ve().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,rn.RE)(Tn,e,t);case 2:return n=r.sent,r.next=5,(0,rn.gz)(y(e,n));case 5:return r.abrupt("return",n);case 6:case"end":return r.stop()}}),xn)}function Ln(e){var t;return ve().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,rn.RE)(_n,e);case 2:return t=n.sent,n.next=5,(0,rn.gz)({type:s,payload:{breadcrumbsInfo:t}});case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),Pn)}function Vn(e){var t,n,r,a,o,i,c,s,l,u,d,p,f,h,m,y,v;return ve().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,rn.RE)(I,e);case 2:if(t=g.sent,n=[],null!==t){g.next=6;break}return g.abrupt("return",n);case 6:if(!t.entity){g.next=70;break}return g.prev=7,g.next=10,(0,rn.RE)(ge.Z.fetchModel,t.entity);case 10:r=g.sent,n.push({type:"list",model:r}),g.next=18;break;case 14:return g.prev=14,g.t0=g.catch(7),n.push({type:"list",error:{entityName:t.entity}}),g.abrupt("return",n);case 18:if(!t.key){g.next=67;break}return g.next=21,(0,rn.RE)(ge.Z.entityExists,r.name,t.key);case 21:if(!g.sent){g.next=29;break}return g.next=25,(0,rn.RE)(ge.Z.fetchDisplay,r.name,t.key);case 25:a=g.sent,n.push({type:"detail",key:t.key,model:r,display:a}),g.next=31;break;case 29:return n.push({type:"detail",error:{entityName:r.label,key:t.key}}),g.abrupt("return",n);case 31:if(!t.relation){g.next=67;break}o=t.relation.split("/"),i=0;case 34:if(!(i<o.length)){g.next=67;break}if(c=o[i],s=n[n.length-1],i%2!=0){g.next=50;break}if(l=c,u=s.model.paths[l]){g.next=43;break}return n.push({type:"list",error:{relationName:l,entityName:s.model.name}}),g.abrupt("return",n);case 43:return d=u.targetEntity,g.next=46,(0,rn.RE)(ge.Z.fetchModel,d);case 46:p=g.sent,n.push({type:"list",model:p,relationName:l,parent:s}),g.next=64;break;case 50:return f=c,h=s.model,g.next=54,(0,rn.RE)(ge.Z.entityExists,h.name,f);case 54:if(!g.sent){g.next=62;break}return g.next=58,(0,rn.RE)(ge.Z.fetchDisplay,h.name,f);case 58:m=g.sent,n.push({type:"detail",model:h,key:f,display:m,relationName:s.relationName,parent:s.parent}),g.next=64;break;case 62:return n.push({type:"detail",error:{entityName:h.name,key:f}}),g.abrupt("return",n);case 64:i++,g.next=34;break;case 67:"create"===t.view?(y=n[n.length-1],v=n[n.length-2],n.push({type:"create",model:y.model,parent:v,relationName:y.relationName})):t.actionId&&n.push({type:"action",actionId:t.actionId}),g.next=71;break;case 70:t.actionId&&n.push({type:"action",actionId:t.actionId});case 71:return g.abrupt("return",n);case 72:case"end":return g.stop()}}),On,null,[[7,14]])}var Tn=function(e,t){var n=t[t.length-1],r=n.parent;return gn(gn({},dn()(n,["parent"])),{},{pathname:e,level:t.length-1},r&&n.relationName&&{parentKey:r.key,reverseRelation:r.model.paths[n.relationName].reverseRelationName,parentModel:r.model})},_n=function(e){var t="";return e.map((function(e){return e.error?{type:"error"}:"action"===e.type?null:(t=(t?t+"/":"")+(e.key?e.key:e.relationName||e.model.name),{type:e.type,display:e.display||e.model.label,path:t+"/"+e.type})})).filter((function(e){return e}))};function Fn(e,t){var n,r;return ve().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n=mn()(e.paths,(function(e){return e.relationDisplay&&e.relationDisplay.show})),r=Object.keys(n).map((function(e){return fn()(n[e],["relationName","reverseRelationName","targetEntity","relationDisplay.label","relationDisplay.order"])})).sort((function(e,t){return e.relationDisplay.order>t.relationDisplay.order?1:-1})),a.next=4,(0,rn.gz)(w(null));case 4:return a.next=6,(0,rn.gz)(g(r));case 6:return a.next=8,(0,rn.RE)(Hn,e.name,t);case 8:case"end":return a.stop()}}),jn)}function Un(e){var t,n,r,a,o;return ve().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload.location,n=t.pathname,i.next=4,(0,rn.Ys)(Cn);case 4:if(r=i.sent,a=r.currentViewInfos,"detail"!==(o=a[n]).type||o.error){i.next=12;break}return i.next=10,(0,rn.Cs)(Hn,o.model.name,o.key);case 10:return i.next=12,(0,rn.gz)(w(null));case 12:case"end":return i.stop()}}),Zn)}function Mn(e){var t,n,r,a,o,i,c,s;return ve().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.payload.location,n=t.pathname,l.next=4,(0,rn.RE)(I,n);case 4:if(null==(r=l.sent)||!r.entity||null==r||!r.key){l.next=29;break}return l.prev=6,l.next=9,(0,rn.RE)(Bn,r);case 9:if(!(a=l.sent)){l.next=24;break}return o=a.entityName,i=a.key,l.next=14,(0,rn.RE)(ge.Z.invalidateDisplay,o,i);case 14:return l.next=16,(0,rn.RE)(ge.Z.fetchDisplay,o,i);case 16:return c=l.sent,l.next=19,(0,rn.gz)(y(n,{display:c}));case 19:return l.next=21,(0,rn.RE)(Wn,n);case 21:return s=l.sent,l.next=24,(0,rn.gz)(v(s,{display:c}));case 24:l.next=29;break;case 26:l.prev=26,l.t0=l.catch(6),yn.Z.logError("breadcrumbs invalidation failed",l.t0);case 29:case"end":return l.stop()}}),En,null,[[6,26]])}function Wn(e){var t;return ve().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,rn.RE)(I,e);case 2:if(null!==(t=n.sent)&&t.entity){n.next=5;break}return n.abrupt("return","");case 5:return n.abrupt("return",[t.entity,t.key,t.relation,t.view].filter(Boolean).join("/"));case 6:case"end":return n.stop()}}),kn)}function Bn(e){var t,n,r,a,o,i,c,s,l,u;return ve().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(e&&e.entity&&e.key&&"action"!==e.view){d.next=2;break}return d.abrupt("return",null);case 2:return d.next=4,(0,rn.RE)(ge.Z.fetchModel,e.entity);case 4:if(t=d.sent,e.relation){d.next=7;break}return d.abrupt("return",{entityName:t.name,key:e.key});case 7:if(!((n=e.relation.match(Sn)).length<1)){d.next=10;break}return d.abrupt("return",null);case 10:r=t,a=null,o=0;case 13:if(!(o<n.length)){d.next=25;break}if(i=n[o].split("/"),c=K()(i,2),s=c[0],l=c[1],(u=r.paths[s])&&l){d.next=18;break}return d.abrupt("return",null);case 18:return d.next=20,(0,rn.RE)(ge.Z.fetchModel,u.targetEntity);case 20:r=d.sent,a={entityName:r.name,key:l};case 22:o++,d.next=13;break;case 25:return d.abrupt("return",a);case 26:case"end":return d.stop()}}),Rn)}function Hn(e,t){var n,r,a;return ve().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n="client/entities/".concat(e,"/").concat(t,"/relations"),o.next=3,(0,rn.RE)(ge.Z.requestSaga,n);case 3:return r=o.sent,a=r.body.relations,o.next=7,(0,rn.gz)(b(a));case 7:case"end":return o.stop()}}),Nn)}const zn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ln,t=arguments.length>1?arguments[1]:void 0,n=sn[t.type];return n?n(e,t):e},Kn={container:tn,reducers:{entities:(0,r.UY)({path:zn})},sagas:[An]}},67210:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(74806),a=n(45650),o=n(12568),i=n(73183),c=n(25660),s=n(80722),l=n(20247),u=n(85893);const d=(0,l.U)((0,r.ZP)((function(e){var t=e.path,n=e.context,r=e.onSuccess,l=e.intl,d=e.locale,p=e.emitAction,f=(0,s.Z)(t),h=f?[{id:"rel".concat(f.model),value:f.key}]:[],m=(0,c.Z)(n,"Domain");return(0,u.jsx)(a.ZP,{entityName:"Domain",formName:m,mode:"create",defaultValues:h,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:o.ZP,docsApp:i.default})})))},36340:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(74806),a=n(45650),o=n(12568),i=n(73183),c=n(25660),s=n(80722),l=n(20247),u=n(85893);const d=(0,l.U)((0,r.ZP)((function(e){var t=e.context,n=e.path,r=e.onSuccess,l=e.intl,d=e.locale,p=e.emitAction,f=(0,s.Z)(n),h=f?[{id:"rel".concat(f.model),value:f.key}]:[],m=(0,c.Z)(t,"Folder");return(0,u.jsx)(a.ZP,{entityName:"Folder",formName:m,mode:"create",defaultValues:h,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:o.ZP,docsApp:i.default})})))},96954:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(59713),a=n.n(r),o=n(8156),i=n(85893);function c(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}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=function(e){return(0,i.jsx)(o.Z,s(s({},e),{},{customDeleteEndpoint:"documents/delete"}))}},90100:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(63038),a=n.n(r),o=n(45650),i=n(12568),c=n(73183),s=n(25660),l=n(20247),u=n(85893);const d=(0,l.U)((function(e){var t=e.selection,n=e.onSuccess,r=e.onCancel,l=e.locale,d=e.context,p=e.emitAction,f=e.navigate,h=t.ids[0].split("/"),m=a()(h,2),y=m[0],v=m[1];"Resource"===y&&(f("/docs/doc/".concat(v,"/detail")),r());var g=(0,s.Z)(d,y);return(0,u.jsx)(o.ZP,{entityName:y,formName:g,entityId:v,mode:"update",locale:l,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,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:i.ZP,docsApp:c.default})}))},4505:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r,a,o,i=n(74806),c=n(50558),s=n(30081),l=n(20247),u=n(63038),d=n.n(u),p=n(28655),f=n.n(p),h=n(18446),m=n.n(h),y=n(1024),v=n(44012),g=n(38205),b=n(36589),w=n(50258),x=n(65035),P=n(73183),O=n(80722),j=n(85893),Z=g.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(r||(r=f()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),b.Z),E=(0,g.ZP)(w.Z).withConfig({displayName:"StyledLoadMask"})(a||(a=f()(["\n height: auto;\n"]))),k=function(e){return null===e?"Move_root_docs_list_item":"Move_docs_list_item"},R={initialize:s.j2,moveElements:s.w6};const N=(0,l.U)((0,c.connect)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),R)((0,i.ZP)((function(e){var t=e.selection,n=e.onSuccess,r=e.onError,a=e.path,i=e.initialize,c=e.moveElements,s=e.isWaiting,l=e.domainTypes,u=e.rootNodes,p=e.businessUnit,f=e.locale,h=e.emitAction,g=(0,O.Z)(a),b={model:"Docs_list_item",key:"".concat(g.model,"/").concat(g.key)},w=(0,y.useState)(b),R=d()(w,2),N=R[0],C=R[1];(0,y.useEffect)((function(){i(t,n,r)}),[]);var S=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,j.jsxs)(E,{required:[!s],children:[(0,j.jsx)(P.default,{routerType:"routerless",initialLocation:function(){if(null===N)return null;var e=N.key.split("/"),t=d()(e,2),n=t[0],r=t[1];return S(n,r)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",disableViewPersistor:!0,getListFormName:k,onListParentChange:C,getCustomLocation:S,navigationStrategy:{},embedded:!0,emitAction:h,noLeftPadding:!0,domainTypes:l,rootNodes:u,businessUnit:p,sortable:!1,scrollBehaviour:"none",locale:f}),(0,j.jsx)(Z,{children:(0,j.jsx)(x.Z,{onClick:function(){return c(N.key,t.ids)},look:"raised",ink:"primary",disabled:null===N||m()(N,b),children:o||(o=(0,j.jsx)(v.Z,{id:"client.actions.dms-move.button"}))})})]})}))))},82445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(59713),a=n.n(r),o=n(45650),i=n(12568),c=n(73183),s=n(85893);function l(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}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d=function(e){return(0,s.jsx)(o.ZP,u(u({},e),{},{listApp:i.ZP,docsApp:c.default}))}},25660:(e,t,n)=>{n.d(t,{Z:()=>r});const r=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}},67092:(e,t)=>{t.__esModule=!0;t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},88536:(e,t,n)=>{t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=c(n(14149)),o=c(n(54545)),i=n(3074);function c(e){return e&&e.__esModule?e:{default:e}}t.createLocation=function(e,t,n,o){var c=void 0;"string"==typeof e?(c=(0,i.parsePath)(e)).state=t:(void 0===(c=r({},e)).pathname&&(c.pathname=""),c.search?"?"!==c.search.charAt(0)&&(c.search="?"+c.search):c.search="",c.hash?"#"!==c.hash.charAt(0)&&(c.hash="#"+c.hash):c.hash="",void 0!==t&&void 0===c.state&&(c.state=t));try{c.pathname=decodeURI(c.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+c.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(c.key=n),o?c.pathname?"/"!==c.pathname.charAt(0)&&(c.pathname=(0,a.default)(c.pathname,o.pathname)):c.pathname=o.pathname:c.pathname||(c.pathname="/"),c},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,o.default)(e.state,t.state)}},3074:(e,t)=>{t.__esModule=!0;t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e};var n=t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};t.stripBasename=function(e,t){return n(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}},52540:(e,t,n)=>{var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=u(n(30670)),o=u(n(41143)),i=n(88536),c=n(3074),s=u(n(3405)),l=n(67092);function u(e){return e&&e.__esModule?e:{default:e}}var d="hashchange",p={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+(0,c.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c.stripLeadingSlash,decodePath:c.addLeadingSlash},slash:{encodePath:c.addLeadingSlash,decodePath:c.addLeadingSlash}},f=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},h=function(e){return window.location.hash=e},m=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.default)(l.canUseDOM,"Hash history needs a DOM");var t=window.history,n=(0,l.supportsGoWithoutReloadUsingHash)(),u=e.getUserConfirmation,y=void 0===u?l.getConfirmation:u,v=e.hashType,g=void 0===v?"slash":v,b=e.basename?(0,c.stripTrailingSlash)((0,c.addLeadingSlash)(e.basename)):"",w=p[g],x=w.encodePath,P=w.decodePath,O=function(){var e=P(f());return(0,a.default)(!b||(0,c.hasBasename)(e,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+b+'".'),b&&(e=(0,c.stripBasename)(e,b)),(0,i.createLocation)(e)},j=(0,s.default)(),Z=function(e){r(K,e),K.length=t.length,j.notifyListeners(K.location,K.action)},E=!1,k=null,R=function(){var e=f(),t=x(e);if(e!==t)m(t);else{var n=O(),r=K.location;if(!E&&(0,i.locationsAreEqual)(r,n))return;if(k===(0,c.createPath)(n))return;k=null,N(n)}},N=function(e){if(E)E=!1,Z();else{j.confirmTransitionTo(e,"POP",y,(function(t){t?Z({action:"POP",location:e}):C(e)}))}},C=function(e){var t=K.location,n=D.lastIndexOf((0,c.createPath)(t));-1===n&&(n=0);var r=D.lastIndexOf((0,c.createPath)(e));-1===r&&(r=0);var a=n-r;a&&(E=!0,_(a))},S=f(),A=x(S);S!==A&&m(A);var I=O(),D=[(0,c.createPath)(I)],L=function(e){return"#"+x(b+(0,c.createPath)(e))},V=function(e,t){(0,a.default)(void 0===t,"Hash history cannot push state; it is ignored");var n="PUSH",r=(0,i.createLocation)(e,void 0,void 0,K.location);j.confirmTransitionTo(r,n,y,(function(e){if(e){var t=(0,c.createPath)(r),o=x(b+t);if(f()!==o){k=t,h(o);var i=D.lastIndexOf((0,c.createPath)(K.location)),s=D.slice(0,-1===i?0:i+1);s.push(t),D=s,Z({action:n,location:r})}else(0,a.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),Z()}}))},T=function(e,t){(0,a.default)(void 0===t,"Hash history cannot replace state; it is ignored");var n="REPLACE",r=(0,i.createLocation)(e,void 0,void 0,K.location);j.confirmTransitionTo(r,n,y,(function(e){if(e){var t=(0,c.createPath)(r),a=x(b+t);f()!==a&&(k=t,m(a));var o=D.indexOf((0,c.createPath)(K.location));-1!==o&&(D[o]=t),Z({action:n,location:r})}}))},_=function(e){(0,a.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},F=function(){return _(-1)},U=function(){return _(1)},M=0,W=function(e){1===(M+=e)?(0,l.addEventListener)(window,d,R):0===M&&(0,l.removeEventListener)(window,d,R)},B=!1,H=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=j.setPrompt(e);return B||(W(1),B=!0),function(){return B&&(B=!1,W(-1)),t()}},z=function(e){var t=j.appendListener(e);return W(1),function(){W(-1),t()}},K={length:t.length,action:"POP",location:I,createHref:L,push:V,replace:T,go:_,goBack:F,goForward:U,block:H,listen:z};return K}},3405:(e,t,n)=>{t.__esModule=!0;var r,a=n(30670),o=(r=a)&&r.__esModule?r:{default:r};t.default=function(){var e=null,t=[];return{setPrompt:function(t){return(0,o.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):((0,o.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),a(!0)):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0,r=function(){n&&e.apply(void 0,arguments)};return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}},44049:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(14892);const a=(o=r.Z,i=o.getIn,function(e,t){return function(n){var r=t||function(e){return i(e,"form")};return i(r(n),e+".initial")}});var o,i}}]);
|
|
1
|
+
"use strict";(self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[141],{57387:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});var r=n(27361),a=n.n(r),o=n(74806),i=n(50558),c=n(29785),s=n(59713),l=n.n(s),u=n(17563),d=n(73183),p=n(6699),f=n(90169),h=n(85893);function m(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}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.entityName,n=e.entityKeys,r=e.children,a=n.map((function(e){return{entityName:t,key:e}}));return(0,h.jsx)(p.Z,{to:"/docs?rootNodes=".concat(JSON.stringify(a)),target:"_blank",children:r})};const g=function(e){var t=u.parse(e.history.location.search);return(0,h.jsx)(d.default,y(y(y({},e),{},{routerType:"inherit",navigationStrategy:{ListLink:v,DetailLink:f.z2}},t.rootNodes&&{rootNodes:JSON.parse(t.rootNodes)}),{},{searchFormCollapsed:e.searchFormCollapsed,onSearchFormCollapsedChange:function(t){var n=t.collapsed;e.saveUserPreferences({"admin.list.searchFormCollapsed":n})},scrollBehaviour:"inline"}))};var b={saveUserPreferences:c.RK};const w={container:(0,i.connect)((function(e,t){return{searchFormCollapsed:a()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",null)}}),b)((0,o.ZP)(g))}},18632:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Kn});var r=n(15857),a=n(74806),o=n(50558),i="path/SET_CURRENT_VIEW_INFO",c="path/LOAD_CURRENT_ROUTE",s="path/SET_BREADCRUMBS_INFO",l="path/UPDATE_BREADCRUMBS_INFO",u="path/SET_RELATIONS",d="path/SET_CURRENT_VIEW_TITLE",p="path/SET_RELATIONS_INFO",f="path/PROPAGATE_REFRESH",h="path/INVALIDATE_LAST_BREADCRUMB",m="path/SELECT_RELATION",y=function(e,t){return{type:i,payload:{location:e,currentViewInfo:t}}},v=function(e,t){return{type:l,payload:{path:e,breadcrumbsInfo:t}}},g=function(e){return{type:u,payload:{relations:e}}},b=function(e){return{type:p,payload:{relationsInfo:e}}},w=function(e){return{type:m,payload:{selectedRelation:e}}},x=n(1024),P=n.n(x),O=n(56746),j=n(19743),Z=n(5303),E=n(27361),k=n.n(E),R=n(70696),N=n(75354),C=n(87467),S=n(90169),A=n(96801),I=function(e){var t=A.Z.extractParamsFromPath("/e/:entity/:key?/:relation*/:view(list|detail|edit|create|relations|action)/:actionId?",e),n=A.Z.extractParamsFromPath("/e/action/:actionId",e);return t||n},D=n(46054),L=n(85893),V=function(e){var t=e.history,n=e.match,r=e.setCurrentViewTitle,a=e.currentViewInfo,o=e.intl,i=t.location;if((0,x.useEffect)((function(){return a&&r(o.formatMessage({id:"client.actions.".concat(a.actionId,".title")})),function(){r(null)}}),[a,r,o]),!a)return null;var c=N.Z.fromQueryString(i.search),s=k()(i,"state.selection",c.selection),l=k()(i,"state.definition.properties",c.actionProperties),u=function(){var e=I(n.url).key?(0,C.H)(n.url):(0,C.H)(n.url,2);t.replace(e)};return(0,L.jsx)(D.Z,{history:t,match:n,appId:a.actionId,selection:s,actionProperties:l,navigationStrategy:(0,S.ZP)(t,n),onSuccess:u,onError:u,onCancel:u})},T=function(e,t){return 0===Object.keys(R.Z.difference(e,t)).length};const _=P().memo(V,T);var F={setCurrentViewTitle:function(e){return{type:d,payload:{currentViewTitle:e}}}};const U=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),F)((0,a.ZP)(_));var M=n(50600),W=n(91073),B=n(319),H=n.n(B),z=n(63038),K=n.n(z),$=n(28655),q=n.n($),G=n(38205),Y=n(73183),J=n(45650),Q=n(12568),X=n(88601),ee=n(7281),te=n(24688);const ne=function(e){var t=e.when,n=e.message;return(0,x.useEffect)((function(){return t&&te.Z.activatePreventFromLeaving(),function(){te.Z.deactivatePreventFromLeaving()}}),[t]),(0,L.jsx)(O.NL,{when:t,message:n})},re=ne;var ae,oe=G.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(ae||(ae=q()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),X.Z.color("paper"),ee.Z.space(0));const ie=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,a=e.intl,o=e.chooseDocument,i=e.dispatchEmittedAction,c=n.location,s=k()(c,"state.defaultValues",[]),l=(0,x.useState)(!1),u=K()(l,2),d=u[0],p=u[1];if(!t)return null;var f,h=t.model,m=t.reverseRelation,y=t.parentKey,v=h.name,g=k()(h,"paths.".concat(m,".multi"),!1),b=[].concat(H()(m&&y?[{id:m,value:g?[y]:y}]:[]),H()(s));return(0,L.jsxs)(oe,{children:[(0,L.jsx)(re,{when:d,message:(f="client.entity-browser.detail.confirmTouchedFormLeave",a.formatMessage({id:f}))}),(0,L.jsx)(J.ZP,{entityName:v,formName:v,mode:"create",defaultValues:b,emitAction:function(e){i(e)},navigationStrategy:(0,S.ZP)(n,r),chooseDocument:o,onEntityCreated:function(e){var t=e.id;p(!1),n.push(r.url.replace(/create$/,t))},onTouchedChange:function(e){var t=e.touched;return p(t)},listApp:Q.ZP,docsApp:Y.default})]})};var ce={chooseDocument:W.Z.actions.chooseDocument,dispatchEmittedAction:M.Z.dispatchEmittedAction};const se=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),ce)((0,a.ZP)(ie));var le=n(29785),ue=n(59713),de=n.n(ue),pe=n(17563),fe=n(29441),he=n(48926),me=n.n(he),ye=n(87757),ve=n.n(ye),ge=n(81719);function be(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}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const xe=function(e){var t=e.entityName,n=e.entityKey,r=e.showActions,a=e.noLeftPadding,o=e.openResource,i=e.initialLocation,c=e.sortable,s=(0,x.useState)(null),l=K()(s,2),u=l[0],d=l[1],p=(0,x.useCallback)(me()(ve().mark((function e(){return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ge.Z.simpleRequest("entities/2.0/"+t+"/"+n+"/entitydocs/folder").then((function(e){d(e.body.key)}));case 1:case"end":return e.stop()}}),e)}))),[t,n]);return(0,x.useEffect)((function(){p()}),[p]),u&&(0,L.jsx)(Y.default,we(we(we({routerType:"routerless",initialLocation:i,noLeftPadding:a,sortable:c,searchFormType:"none",rootNodes:[{key:u,entityName:"Folder"}],embedded:!0,showActions:r},!1===r?{selectionStyle:"none"}:{}),{},{disableViewPersistor:!0},o?{openResource:o}:{}),{},{scrollBehaviour:"inline"}))};const Pe=function(e){var t=e.currentViewInfo,n=e.initialLocation;return(0,L.jsx)(xe,{noLeftPadding:!1,entityName:t.parentModel.name,entityKey:t.parentKey,showActions:!0,initialLocation:n})};function Oe(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}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ze=function(e){var t=e.match,n=e.history,r=e.currentViewInfo,a=e.emitAction,o=e.searchFormCollapsed,i=e.saveUserPreferences;if(!r)return null;var c=pe.parse(n.location.search),s=n.location.hash?n.location.hash.substring(1):null;return"Resource"===r.model.name?(0,L.jsx)(Pe,{currentViewInfo:r,initialLocation:s}):(0,L.jsx)(Q.ZP,je(je({emitAction:a,limit:25,id:"".concat(r.model.name,"_list"),entityName:r.model.name,formName:c.formName||r.model.name,onRowClick:function(e){var r=e.id;n.push(t.url.replace(/list$/,"")+r)}},r.reverseRelation&&{parent:{key:r.parentKey,reverseRelationName:r.reverseRelation,model:r.parentModel.name}}),{},{showLink:!0,navigationStrategy:(0,S.ZP)(n,t),searchFormPosition:"left",searchFormType:"admin",scrollBehaviour:"inline",store:fe.Z.viewInfoSelector(n.location.pathname).store,onStoreCreate:function(e){fe.Z.persistViewInfo(n.location.pathname,{store:e},r.level)},actionAppComponent:D.Z,tql:c.tql,searchFormCollapsed:o,onSearchFormCollapsedChange:function(e){var t=e.collapsed;i({"admin.list.searchFormCollapsed":t})}}))};var Ee={emitAction:function(e){return M.Z.dispatchEmittedAction(e)},saveUserPreferences:le.RK};const ke=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],searchFormCollapsed:k()(e.preferences.userPreferences,"admin.list.searchFormCollapsed",!1)}}),Ee)((0,a.ZP)(Ze));var Re,Ne=n(4975);function Ce(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}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ae=G.ZP.div.withConfig({displayName:"StyledEntityDetailAppWrapper"})(Re||(Re=q()(["\n margin: 0;\n background-color: ",";\n padding: 0 0 0 ",";\n overflow: hidden;\n height: 100%;\n"])),X.Z.color("paper"),ee.Z.space(0));const Ie=function(e){var t=e.currentViewInfo,n=e.history,r=e.match,a=e.intl,o=e.chooseDocument,i=e.emitAction,c=e.propagateRefresh,s=e.invalidateLastBreadcrumb,l=(0,x.useState)(!1),u=K()(l,2),d=u[0],p=u[1];if(!t||t.pathname!==n.location.pathname)return null;var f=pe.parse(location.search).formName,h=t.model.name;return(0,L.jsxs)(Ae,{children:[(0,L.jsx)(re,{when:d,message:function(e){return n.location.pathname!==e.pathname&&(t="client.entity-browser.detail.confirmTouchedFormLeave",a.formatMessage({id:t}));var t}}),(0,L.jsx)(J.ZP,{entityName:h,entityId:t.key,formName:f||h,mode:"update",emitAction:i,onTouchedChange:function(e){var t=e.touched;return p(t)},navigationStrategy:Se(Se({},(0,S.ZP)(n,r)),{},{navigateToCreateRelative:function(e,t){if(e){var a=(0,C.H)(r.url,1);n.push({pathname:"".concat(a,"/").concat(e,"/create"),state:t})}else{var o=(0,C.H)(r.url,2);n.push({pathname:o+"/create",state:t})}}}),chooseDocument:o,onEntityDeleted:function(){var e=(0,C.H)(r.url,2);n.push(e)},onEntityUpdated:function(){var e=n.location;s(e)},onRefresh:function(){var e=n.location;c(e)},actionAppComponent:D.Z,onSubGridRowClick:function(e){var t=e.id,a=e.relationName,o=(0,C.H)(r.url);n.push("".concat(o,"/").concat(a,"/").concat(t))},listApp:Q.ZP,docsApp:Y.default})]})};var De={chooseDocument:W.Z.actions.chooseDocument,emitAction:function(e){return M.Z.dispatchEmittedAction(e)},propagateRefresh:function(e){return{type:f,payload:{location:e}}},invalidateLastBreadcrumb:function(e){return{type:h,payload:{location:e}}}};const Le=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),De)((0,a.ZP)(Ie));var Ve=n(34206),Te=n(88162),_e={};const Fe=function(e){var t=e.currentViewInfo,n=e.history,r=e.selectedRelation,a=e.sortable;return(0,L.jsx)(xe,{entityName:t.model.name,entityKey:t.key,showActions:!1,noLeftPadding:!0,history:n,openResource:function(e){n.push("".concat(r.relationName,"/list#").concat(e))},sortable:a})};var Ue=function(e){var t=e.selectedRelation,n=e.currentViewInfo,r=e.match,a=e.history,o=e.emitAction,i="".concat(t.reverseRelationName).concat(t.relationName);return(0,L.jsx)(Q.ZP,{id:"preview"+t.reverseRelationName+t.targetEntity,entityName:t.targetEntity,formName:t.targetEntity,parent:{key:n.key,reverseRelationName:t.reverseRelationName,model:n.model.name,relationName:t.relationName},showLink:!0,navigationStrategy:(0,S.ZP)(a,r),onRowClick:function(e){var n=e.id,o=r.url.replace(/detail$/,"");a.push("".concat(o).concat(t.relationName,"/").concat(n))},onNavigateToCreate:function(){var e=(0,C.H)(r.url);a.push(e+"/"+t.relationName+"/create")},searchFormType:"fulltext",selectionStyle:"none",store:fe.Z.viewInfoSelector(a.location.pathname)["store-".concat(i)],onStoreCreate:function(e){fe.Z.persistViewInfo(n.pathname,de()({},"store-".concat(i),e),n.level)},showActions:!1,limit:15,emitAction:o,scrollBehaviour:"inline"},t.reverseRelationName+t.targetEntity)};const Me=P().memo(Ue);var We,Be,He,ze,Ke,$e,qe,Ge,Ye,Je,Qe,Xe,et,tt,nt=n(6699),rt=n(65035),at=n(11347),ot=n(84647),it=n(69829),ct=n(30759),st=G.ZP.div.withConfig({displayName:"StyledRelationsViewWrapper"})(We||(We=q()(["\n display: ",";\n height: 100%;\n flex-direction: column;\n"])),(function(e){return e.isRightPaneCollapsed?"none":"flex"})),lt=G.ZP.div.withConfig({displayName:"StyledPlaceHolder"})(Be||(Be=q()(["\n display: ",";\n flex: 1;\n height: 100%;\n width: 25px;\n background: ",";\n padding-top: ",";\n padding-left: ",";\n align-items: flex-start;\n\n &:hover {\n cursor: pointer;\n }\n"])),(function(e){return e.isRightPaneCollapsed?"flex":"none"}),X.Z.color("paper"),ee.Z.space(-1.5),ee.Z.space(-2.5)),ut=G.ZP.div.withConfig({displayName:"StyledToggleCollapse"})(He||(He=q()(["\n display: flex;\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n"])),X.Z.color("paper"),ee.Z.space(-1.5),ee.Z.space(-1.5)),dt=(0,G.ZP)(rt.Z).withConfig({displayName:"StyledToggleCollapseButton"})(ze||(ze=q()(["\n font-size: ",";\n padding: 0;\n margin-left: auto;\n\n &:hover,\n ",":hover & {\n background-color: transparent;\n color: ",";\n }\n"])),ee.Z.font(0),lt,X.Z.color("secondaryLight")),pt=G.ZP.div.withConfig({displayName:"StyledPreviewBox"})(Ke||(Ke=q()(["\n background-color: ",";\n padding: ",";\n margin-top: 3px;\n display: flex;\n flex-direction: column;\n flex: 1;\n"])),X.Z.color("paper"),ee.Z.space(-1)),ft=G.ZP.div.withConfig({displayName:"StyledRelationBoxes"})($e||($e=q()(["\n background-color: ",";\n padding: ",";\n display: grid;\n grid-template-columns: repeat(auto-fit, 170px);\n grid-gap: ",";\n justify-content: space-between;\n overflow-y: auto;\n align-content: flex-start;\n height: fit-content;\n min-height: 150px;\n max-height: 20%;\n ","\n"])),X.Z.color("paper"),ee.Z.space(-1),ee.Z.space(-2),at.C),ht=(0,G.ZP)(nt.Z).withConfig({displayName:"StyledPreviewLink"})(qe||(qe=q()(["\n padding-left: ",";\n\n &:nth-child(2) {\n padding-left: 0;\n }\n"])),ee.Z.space(-.5)),mt=G.ZP.div.withConfig({displayName:"StyledRelationLinks"})(Ge||(Ge=q()(["\n display: none;\n margin-left: auto;\n\n * {\n color: ",";\n padding-left: ",";\n }\n"])),X.Z.color("text"),ee.Z.space(-4.5)),yt=G.ZP.div.withConfig({displayName:"StyledRelationBox"})(Ye||(Ye=q()(["\n border-radius: ",";\n padding: "," ",";\n display: flex;\n background-color: ",";\n height: fit-content;\n\n &&& {\n * {\n color: ",";\n box-sizing: initial;\n }\n }\n ",";\n\n /* allow hover styles only on non-touch devices */\n ","\n"])),X.Z.radii("large"),ee.Z.space(-2.7),ee.Z.space(-1),(function(e){return e.selected&&X.Z.color("secondary")}),(function(e){return e.selected&&X.Z.color("paper")}),(function(e){return e.selected&&"\n ".concat(mt," {\n display: flex;\n }\n ")}),!ot.b&&(0,G.iv)(Je||(Je=q()(["\n &:hover "," {\n display: flex;\n }\n\n && {\n :hover {\n background-color: ",";\n\n * {\n color: ",";\n }\n cursor: pointer;\n }\n }\n\n ",":hover * {\n color: ",";\n }\n "])),mt,X.Z.color("secondaryLight"),X.Z.color("paper"),nt.Z,X.Z.color("secondary"))),vt=(0,G.ZP)(it.Fe).withConfig({displayName:"StyledRelationLabel"})(Qe||(Qe=q()(["\n && {\n max-width: 110px;\n }\n"]))),gt=G.ZP.span.withConfig({displayName:"StyledCountLabel"})(Xe||(Xe=q()(["\n ","\n"])),(0,ct.Z)());const bt=function(e){var t,n,r=e.relation,a=e.history,o=e.match,i=e.relationsInfo,c=e.selectRelation,s=e.selectedRelation,l=e.intl,u=e.entityName,d=r.relationName,p=r.targetEntity,f=r.relationDisplay,h=function(e){return l.formatMessage({id:e})},m=o.url.replace(/(relations|detail)$/,d),y=o.url.replace(/(relations|detail)$/,d)+"/create";return(0,L.jsxs)(yt,{selected:(null==s?void 0:s.relationName)===d,onClick:function(){c(r),a.replace({search:"?relation=".concat(d)}),function(e,t){_e[e]=t}(u,d)},children:[(0,L.jsx)(vt,{title:f.label,children:f.label}),(null===(n=i[d])||void 0===n?void 0:n.count)>0?(0,L.jsxs)(gt,{children:[" (",i[d].count,")"]}):null,(0,L.jsxs)(mt,{children:[(0,L.jsx)(nt.Z,{"aria-label":h("client.admin.entities.relationsView.relationLinkView"),to:m,children:et||(et=(0,L.jsx)(Te.Z,{icon:"arrow-right"}))}),(null===(t=i[d])||void 0===t?void 0:t.createPermission)&&"Resource"!==p&&(0,L.jsx)(nt.Z,{"aria-label":h("client.admin.entities.relationsView.relationLinkCreate"),to:y,children:tt||(tt=(0,L.jsx)(Te.Z,{icon:"plus"}))})]})]})};var wt,xt,Pt;function Ot(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}var jt=function(e){var t=e.history,n=e.match,r=e.currentViewInfo,a=e.relations,o=e.relationsInfo,i=e.emitAction,c=e.intl,s=e.isRightPaneCollapsed,l=e.toggleCollapse,u=e.selectedRelation,d=e.selectRelation,p=k()(r,"model.name"),f=(0,x.useCallback)((function(){if((null==a?void 0:a.length)>0){var e=pe.parse(t.location.search).relation;if(e)d(a.find((function(t){return t.relationName===e})));else{var n=_e[p];d(n?a.find((function(e){return e.relationName===n})):a[0])}}}),[a,p,t.location.search,d]);if((0,x.useEffect)(f,[f]),(0,x.useEffect)((function(){return u?null:f()}),[u,f]),!a||0===a.length||!r)return null;var h,m,y=function(e){return c.formatMessage({id:e})},v=u?"Resource"===u.targetEntity?Fe:Me:function(){return wt||(wt=(0,L.jsx)(P().Fragment,{}))},g=a.map((function(t){return(0,L.jsx)(bt,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({relation:t,entityName:p},e),"relation-".concat(t.relationName))}));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(st,{isRightPaneCollapsed:s,children:[(0,L.jsx)(ut,{children:(0,L.jsx)(dt,{icon:"chevron-right",onClick:l})}),(0,L.jsx)(ft,{children:g}),u&&(0,L.jsxs)(pt,{children:[(0,L.jsxs)(Ve.ZP.H4,{children:[u.relationDisplay.label,(0,L.jsx)(ht,{"aria-label":y("client.admin.entities.relationsView.relationLinkView"),to:n.url.replace(/(relations|detail)$/,u.relationName),children:xt||(xt=(0,L.jsx)(Te.Z,{icon:"arrow-right"}))}),(h=u.relationName,(null===(m=o[h])||void 0===m?void 0:m.createPermission)&&"Resource"!==u.targetEntity&&(0,L.jsx)(ht,{"aria-label":y("client.admin.entities.relationsView.relationLinkCreate"),to:n.url.replace(/(relations|detail)$/,u.relationName)+"/create",children:Pt||(Pt=(0,L.jsx)(Te.Z,{icon:"plus"}))}))]}),(0,L.jsx)(v,{selectedRelation:u,match:n,history:t,currentViewInfo:r,emitAction:i,sortable:!0})]})]}),(0,L.jsx)(lt,{onClick:l,isRightPaneCollapsed:s,children:(0,L.jsx)(dt,{icon:"chevron-left",isRightPaneCollapsed:s})})]})},Zt=function(e,t){return 0===Object.keys(R.Z.difference(e,t)).length};const Et=P().memo(jt,Zt);var kt={emitAction:function(e){return M.Z.dispatchEmittedAction(e)},selectRelation:w};const Rt=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relations:e.entities.path.relations,relationsInfo:e.entities.path.relationsInfo,selectedRelation:e.entities.path.selectedRelation}}),kt)((0,a.ZP)(Et));var Nt,Ct,St,At=G.ZP.div.withConfig({displayName:"StyledDetailViewContainer"})(Nt||(Nt=q()(["\n display: flex;\n flex-direction: row;\n height: 100%;\n\n .react-bs-container-body {\n height: auto !important;\n }\n"]))),It=G.ZP.div.withConfig({displayName:"StyledDetailViewLeft"})(Ct||(Ct=q()(["\n flex: 1;\n margin-right: 1rem;\n /* Only show one panel at a time on screens <= 500px */\n display: ",";\n"])),(function(e){var t=e.windowWidth,n=e.isRightPaneCollapsed;return t<=500&&!n&&"none"})),Dt=G.ZP.div.withConfig({displayName:"StyledDetailViewRight"})(St||(St=q()(["\n flex: ",";\n"])),(function(e){return e.isRightPaneCollapsed?"0":"1"}));const Lt=function(e){var t=e.match,n=e.history,r=(e.currentViewInfo,e.relationViewCollapsed),a=e.saveUserPreferences,o=(0,Ne.K)(r,(function(e){a({"admin.detail.relationViewCollapsed":e})})),i=o.isCollapsed,c=o.toggleCollapse;return(0,L.jsxs)(At,{children:[(0,L.jsx)(It,{isRightPaneCollapsed:i,windowWidth:window.innerWidth,children:(0,L.jsx)(j.Z.ErrorBoundary,{children:(0,L.jsx)(Le,{match:t,history:n})})}),(0,L.jsx)(Dt,{isRightPaneCollapsed:i,children:(0,L.jsx)(j.Z.ErrorBoundary,{children:(0,L.jsx)(Rt,{match:t,history:n,isRightPaneCollapsed:i,toggleCollapse:c})})})]})};var Vt={saveUserPreferences:le.RK};const Tt=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname],relationViewCollapsed:k()(e.preferences.userPreferences,"admin.detail.relationViewCollapsed",!1)}}),Vt)((0,a.ZP)(Lt));const _t=function(e){var t,n,r=e.match,a=(t=r.path,n=":relation",t.split(n).length-1);return(0,L.jsxs)(O.rs,{children:[(0,L.jsx)(O.AW,{exact:!0,path:"".concat(r.url),render:function(e){return(0,L.jsx)(O.l_,{to:"".concat(e.match.url.replace(/\/$/,""),"/detail")})}}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/detail"),component:Tt}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/edit"),component:Le}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/relations"),component:Rt}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/action"),component:U}),(0,L.jsx)(O.AW,{path:"".concat(r.path,"/:relation_").concat(a),component:Ft})]})};const Ft=function(e){var t=e.match;return(0,L.jsxs)(O.rs,{children:[(0,L.jsx)(O.AW,{exact:!0,path:t.url,render:function(e){return(0,L.jsx)(O.l_,{to:"".concat(e.match.url.replace(/\/$/,""),"/list")})}}),(0,L.jsx)(O.AW,{path:"".concat(t.path,"/action/:id"),component:U}),(0,L.jsx)(O.AW,{path:"".concat(t.path,"/list"),component:ke}),(0,L.jsx)(O.AW,{path:"".concat(t.path,"/create"),component:se}),(0,L.jsx)(O.AW,{path:"".concat(t.path,"/:key"),component:_t})]})};var Ut=n(54680);const Mt=(0,o.connect)((function(e,t){return{pathPrefix:"/e",breadcrumbsInfo:e.entities.path.breadcrumbsInfo,currentView:e.entities.path.currentViewTitle?{display:e.entities.path.currentViewTitle,title:e.entities.path.currentViewTitle}:null}}),{})((0,a.ZP)(Ut.Z));var Wt=n(44012),Bt=n(39233);const Ht=function(e){var t=e.currentViewInfo,n="client.admin.entity.errorView.",r="detail"===t.type?"detailTitle":"defaultTitle",a="listDescription";return"detail"===t.type?a="detailDescription":"list"===t.type&&t.error.relationName&&(a="relationDescription"),(0,L.jsx)(Bt.Z,{title:(0,L.jsx)(Wt.Z,{id:n+r}),message:(0,L.jsx)(Wt.Z,{id:n+a,values:t.error})})};const zt=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}))((0,a.ZP)(Ht));var Kt,$t,qt,Gt,Yt=G.ZP.div.withConfig({displayName:"StyledWrapper"})(Kt||(Kt=q()(["\n display: grid;\n grid-template-rows: auto 1fr;\n grid-template-areas:\n 'breadcrumbs'\n 'content';\n height: 100%;\n width: 100%;\n"]))),Jt=G.ZP.div.withConfig({displayName:"StyledContent"})($t||($t=q()(["\n grid-area: content;\n overflow: hidden;\n"]))),Qt=G.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(qt||(qt=q()(["\n grid-area: breadcrumbs;\n"])));const Xt=function(e){var t=e.match,n=e.history,r=e.loadCurrentRoute,a=e.currentViewInfo,o=n.location;(0,x.useEffect)((function(){r(o)}),[o,r]);var i=null!=a&&a.error?(0,L.jsx)(zt,{history:n}):(0,L.jsxs)(O.rs,{children:[(0,L.jsx)(O.AW,{path:"".concat(t.url,"/action/:actionId"),component:U}),(0,L.jsx)(O.AW,{path:"".concat(t.url,"/:entity"),component:Ft}),(0,L.jsx)(O.AW,{exact:!0,path:t.url,component:Z.Z})]});return(0,L.jsxs)(Yt,{children:[Gt||(Gt=(0,L.jsx)(j.Z.ErrorBoundary,{children:(0,L.jsx)(Qt,{children:(0,L.jsx)(Mt,{})})})),(0,L.jsx)(Jt,{children:i})]})};var en={loadCurrentRoute:function(e){return{type:c,payload:{location:e}}}};const tn=(0,o.connect)((function(e,t){return{currentViewInfo:e.entities.path.currentViewInfos[t.history.location.pathname]}}),en)((0,a.ZP)(Xt));var nn,rn=n(34857),an=n(81770);function on(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}function cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sn=(nn={},de()(nn,i,(function(e,t){var n=t.payload,r=n.location,a=n.currentViewInfo;return cn(cn({},e),{},{currentViewInfos:cn(cn({},e.currentViewInfos),{},de()({},r,cn(cn({},e.currentViewInfos[r]),a)))})})),de()(nn,s,an.Z.singleTransferReducer("breadcrumbsInfo")),de()(nn,l,(function(e,t){var n=t.payload,r=n.path,a=n.breadcrumbsInfo;return cn(cn({},e),{},{breadcrumbsInfo:e.breadcrumbsInfo.map((function(e){return e.path===r?cn(cn({},e),a):e}))})})),de()(nn,u,an.Z.singleTransferReducer("relations")),de()(nn,p,an.Z.singleTransferReducer("relationsInfo")),de()(nn,d,an.Z.singleTransferReducer("currentViewTitle")),de()(nn,m,an.Z.singleTransferReducer("selectedRelation")),nn),ln={currentViewInfos:{},breadcrumbsInfo:[],relations:null,relationsInfo:{},selectedRelation:null};var un=n(57557),dn=n.n(un),pn=n(78718),fn=n.n(pn),hn=n(35937),mn=n.n(hn),yn=n(44759);function vn(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}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vn(Object(n),!0).forEach((function(t){de()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bn=ve().mark(An),wn=ve().mark(In),xn=ve().mark(Dn),Pn=ve().mark(Ln),On=ve().mark(Vn),jn=ve().mark(Fn),Zn=ve().mark(Un),En=ve().mark(Mn),kn=ve().mark(Wn),Rn=ve().mark(Bn),Nn=ve().mark(Hn),Cn=function(e){return e.entities.path},Sn=/[^/]+\/?[^/]+/g;function An(){return ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,rn.$6)([(0,rn.Fm)(c,In),(0,rn.Fm)(f,Un),(0,rn.Fm)(h,Mn)]);case 2:case"end":return e.stop()}}),bn)}function In(e){var t,n,r,a;return ve().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return t=e.payload.location,n=t.pathname,o.next=4,(0,rn.RE)(Vn,n);case 4:if(!((r=o.sent).length>0)){o.next=16;break}return o.next=8,(0,rn.RE)(Dn,n,r);case 8:if("detail"!==(a=o.sent).type||a.error){o.next=12;break}return o.next=12,(0,rn.RE)(Fn,a.model,a.key);case 12:return o.next=14,(0,rn.RE)(Ln,r);case 14:return o.next=16,(0,rn.RE)(fe.Z.clearPersistedViews,a.level+1);case 16:case"end":return o.stop()}}),wn)}function Dn(e,t){var n;return ve().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,rn.RE)(Tn,e,t);case 2:return n=r.sent,r.next=5,(0,rn.gz)(y(e,n));case 5:return r.abrupt("return",n);case 6:case"end":return r.stop()}}),xn)}function Ln(e){var t;return ve().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,rn.RE)(_n,e);case 2:return t=n.sent,n.next=5,(0,rn.gz)({type:s,payload:{breadcrumbsInfo:t}});case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),Pn)}function Vn(e){var t,n,r,a,o,i,c,s,l,u,d,p,f,h,m,y,v;return ve().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(0,rn.RE)(I,e);case 2:if(t=g.sent,n=[],null!==t){g.next=6;break}return g.abrupt("return",n);case 6:if(!t.entity){g.next=70;break}return g.prev=7,g.next=10,(0,rn.RE)(ge.Z.fetchModel,t.entity);case 10:r=g.sent,n.push({type:"list",model:r}),g.next=18;break;case 14:return g.prev=14,g.t0=g.catch(7),n.push({type:"list",error:{entityName:t.entity}}),g.abrupt("return",n);case 18:if(!t.key){g.next=67;break}return g.next=21,(0,rn.RE)(ge.Z.entityExists,r.name,t.key);case 21:if(!g.sent){g.next=29;break}return g.next=25,(0,rn.RE)(ge.Z.fetchDisplay,r.name,t.key);case 25:a=g.sent,n.push({type:"detail",key:t.key,model:r,display:a}),g.next=31;break;case 29:return n.push({type:"detail",error:{entityName:r.label,key:t.key}}),g.abrupt("return",n);case 31:if(!t.relation){g.next=67;break}o=t.relation.split("/"),i=0;case 34:if(!(i<o.length)){g.next=67;break}if(c=o[i],s=n[n.length-1],i%2!=0){g.next=50;break}if(l=c,u=s.model.paths[l]){g.next=43;break}return n.push({type:"list",error:{relationName:l,entityName:s.model.name}}),g.abrupt("return",n);case 43:return d=u.targetEntity,g.next=46,(0,rn.RE)(ge.Z.fetchModel,d);case 46:p=g.sent,n.push({type:"list",model:p,relationName:l,parent:s}),g.next=64;break;case 50:return f=c,h=s.model,g.next=54,(0,rn.RE)(ge.Z.entityExists,h.name,f);case 54:if(!g.sent){g.next=62;break}return g.next=58,(0,rn.RE)(ge.Z.fetchDisplay,h.name,f);case 58:m=g.sent,n.push({type:"detail",model:h,key:f,display:m,relationName:s.relationName,parent:s.parent}),g.next=64;break;case 62:return n.push({type:"detail",error:{entityName:h.name,key:f}}),g.abrupt("return",n);case 64:i++,g.next=34;break;case 67:"create"===t.view?(y=n[n.length-1],v=n[n.length-2],n.push({type:"create",model:y.model,parent:v,relationName:y.relationName})):t.actionId&&n.push({type:"action",actionId:t.actionId}),g.next=71;break;case 70:t.actionId&&n.push({type:"action",actionId:t.actionId});case 71:return g.abrupt("return",n);case 72:case"end":return g.stop()}}),On,null,[[7,14]])}var Tn=function(e,t){var n=t[t.length-1],r=n.parent;return gn(gn({},dn()(n,["parent"])),{},{pathname:e,level:t.length-1},r&&n.relationName&&{parentKey:r.key,reverseRelation:r.model.paths[n.relationName].reverseRelationName,parentModel:r.model})},_n=function(e){var t="";return e.map((function(e){return e.error?{type:"error"}:"action"===e.type?null:(t=(t?t+"/":"")+(e.key?e.key:e.relationName||e.model.name),{type:e.type,display:e.display||e.model.label,path:t+"/"+e.type})})).filter((function(e){return e}))};function Fn(e,t){var n,r;return ve().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n=mn()(e.paths,(function(e){return e.relationDisplay&&e.relationDisplay.show})),r=Object.keys(n).map((function(e){return fn()(n[e],["relationName","reverseRelationName","targetEntity","relationDisplay.label","relationDisplay.order"])})).sort((function(e,t){return e.relationDisplay.order>t.relationDisplay.order?1:-1})),a.next=4,(0,rn.gz)(w(null));case 4:return a.next=6,(0,rn.gz)(g(r));case 6:return a.next=8,(0,rn.RE)(Hn,e.name,t);case 8:case"end":return a.stop()}}),jn)}function Un(e){var t,n,r,a,o;return ve().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return t=e.payload.location,n=t.pathname,i.next=4,(0,rn.Ys)(Cn);case 4:if(r=i.sent,a=r.currentViewInfos,"detail"!==(o=a[n]).type||o.error){i.next=12;break}return i.next=10,(0,rn.Cs)(Hn,o.model.name,o.key);case 10:return i.next=12,(0,rn.gz)(w(null));case 12:case"end":return i.stop()}}),Zn)}function Mn(e){var t,n,r,a,o,i,c,s;return ve().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return t=e.payload.location,n=t.pathname,l.next=4,(0,rn.RE)(I,n);case 4:if(null==(r=l.sent)||!r.entity||null==r||!r.key){l.next=29;break}return l.prev=6,l.next=9,(0,rn.RE)(Bn,r);case 9:if(!(a=l.sent)){l.next=24;break}return o=a.entityName,i=a.key,l.next=14,(0,rn.RE)(ge.Z.invalidateDisplay,o,i);case 14:return l.next=16,(0,rn.RE)(ge.Z.fetchDisplay,o,i);case 16:return c=l.sent,l.next=19,(0,rn.gz)(y(n,{display:c}));case 19:return l.next=21,(0,rn.RE)(Wn,n);case 21:return s=l.sent,l.next=24,(0,rn.gz)(v(s,{display:c}));case 24:l.next=29;break;case 26:l.prev=26,l.t0=l.catch(6),yn.Z.logError("breadcrumbs invalidation failed",l.t0);case 29:case"end":return l.stop()}}),En,null,[[6,26]])}function Wn(e){var t;return ve().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,rn.RE)(I,e);case 2:if(null!==(t=n.sent)&&t.entity){n.next=5;break}return n.abrupt("return","");case 5:return n.abrupt("return",[t.entity,t.key,t.relation,t.view].filter(Boolean).join("/"));case 6:case"end":return n.stop()}}),kn)}function Bn(e){var t,n,r,a,o,i,c,s,l,u;return ve().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(e&&e.entity&&e.key&&"action"!==e.view){d.next=2;break}return d.abrupt("return",null);case 2:return d.next=4,(0,rn.RE)(ge.Z.fetchModel,e.entity);case 4:if(t=d.sent,e.relation){d.next=7;break}return d.abrupt("return",{entityName:t.name,key:e.key});case 7:if(!((n=e.relation.match(Sn)).length<1)){d.next=10;break}return d.abrupt("return",null);case 10:r=t,a=null,o=0;case 13:if(!(o<n.length)){d.next=25;break}if(i=n[o].split("/"),c=K()(i,2),s=c[0],l=c[1],(u=r.paths[s])&&l){d.next=18;break}return d.abrupt("return",null);case 18:return d.next=20,(0,rn.RE)(ge.Z.fetchModel,u.targetEntity);case 20:r=d.sent,a={entityName:r.name,key:l};case 22:o++,d.next=13;break;case 25:return d.abrupt("return",a);case 26:case"end":return d.stop()}}),Rn)}function Hn(e,t){var n,r,a;return ve().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return n="client/entities/".concat(e,"/").concat(t,"/relations"),o.next=3,(0,rn.RE)(ge.Z.requestSaga,n);case 3:return r=o.sent,a=r.body.relations,o.next=7,(0,rn.gz)(b(a));case 7:case"end":return o.stop()}}),Nn)}const zn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ln,t=arguments.length>1?arguments[1]:void 0,n=sn[t.type];return n?n(e,t):e},Kn={container:tn,reducers:{entities:(0,r.UY)({path:zn})},sagas:[An]}},67210:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(74806),a=n(45650),o=n(12568),i=n(73183),c=n(25660),s=n(80722),l=n(20247),u=n(85893);const d=(0,l.U)((0,r.ZP)((function(e){var t=e.path,n=e.context,r=e.onSuccess,l=e.intl,d=e.locale,p=e.emitAction,f=(0,s.Z)(t),h=f?[{id:"rel".concat(f.model),value:f.key}]:[],m=(0,c.Z)(n,"Domain");return(0,u.jsx)(a.ZP,{entityName:"Domain",formName:m,mode:"create",defaultValues:h,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Domain/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createDomainSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:o.ZP,docsApp:i.default})})))},36340:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(74806),a=n(45650),o=n(12568),i=n(73183),c=n(25660),s=n(80722),l=n(20247),u=n(85893);const d=(0,l.U)((0,r.ZP)((function(e){var t=e.context,n=e.path,r=e.onSuccess,l=e.intl,d=e.locale,p=e.emitAction,f=(0,s.Z)(n),h=f?[{id:"rel".concat(f.model),value:f.key}]:[],m=(0,c.Z)(t,"Folder");return(0,u.jsx)(a.ZP,{entityName:"Folder",formName:m,mode:"create",defaultValues:h,locale:d,onEntityCreated:function(e){var t=e.id,n=[{type:"entity-create-event",payload:{entities:[{entityName:"Docs_list_item",key:"Folder/".concat(t)}]}}];r({title:l.formatMessage({id:"client.docs-browser.createFolderSuccessful"}),remoteEvents:n})},emitAction:function(e){(function(e){var t,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:o.ZP,docsApp:i.default})})))},96954:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(59713),a=n.n(r),o=n(8156),i=n(85893);function c(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}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const l=function(e){return(0,i.jsx)(o.Z,s(s({},e),{},{customDeleteEndpoint:"documents/delete"}))}},90100:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(63038),a=n.n(r),o=n(45650),i=n(12568),c=n(73183),s=n(25660),l=n(20247),u=n(85893);const d=(0,l.U)((function(e){var t=e.selection,n=e.onSuccess,r=e.onCancel,l=e.locale,d=e.context,p=e.emitAction,f=e.navigate,h=t.ids[0].split("/"),m=a()(h,2),y=m[0],v=m[1];"Resource"===y&&(f("/docs/doc/".concat(v,"/detail")),r());var g=(0,s.Z)(d,y);return(0,u.jsx)(o.ZP,{entityName:y,formName:g,entityId:v,mode:"update",locale:l,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,n;return"client.entity-detail.createSuccessfulTitle"===(null===(t=e.payload)||void 0===t||null===(n=t.toaster)||void 0===n?void 0:n.title)})(e)||p(e)},listApp:i.ZP,docsApp:c.default})}))},4505:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r,a,o,i=n(74806),c=n(50558),s=n(30081),l=n(20247),u=n(63038),d=n.n(u),p=n(28655),f=n.n(p),h=n(18446),m=n.n(h),y=n(1024),v=n(44012),g=n(38205),b=n(36589),w=n(50258),x=n(65035),P=n(73183),O=n(80722),j=n(85893),Z=g.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(r||(r=f()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),b.Z),E=(0,g.ZP)(w.Z).withConfig({displayName:"StyledLoadMask"})(a||(a=f()(["\n height: auto;\n"]))),k=function(e){return null===e?"Move_root_docs_list_item":"Move_docs_list_item"},R={initialize:s.j2,moveElements:s.w6};const N=(0,l.U)((0,c.connect)((function(e){return{isWaiting:e.docs.move.isWaiting,domainTypes:e.input.domainTypes,rootNodes:e.input.rootNodes,businessUnit:e.input.businessUnit,locale:e.intl.locale}}),R)((0,i.ZP)((function(e){var t=e.selection,n=e.onSuccess,r=e.onError,a=e.path,i=e.initialize,c=e.moveElements,s=e.isWaiting,l=e.domainTypes,u=e.rootNodes,p=e.businessUnit,f=e.locale,h=e.emitAction,g=(0,O.Z)(a),b={model:"Docs_list_item",key:"".concat(g.model,"/").concat(g.key)},w=(0,y.useState)(b),R=d()(w,2),N=R[0],C=R[1];(0,y.useEffect)((function(){i(t,n,r)}),[]);var S=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,j.jsxs)(E,{required:[!s],children:[(0,j.jsx)(P.default,{routerType:"routerless",initialLocation:function(){if(null===N)return null;var e=N.key.split("/"),t=d()(e,2),n=t[0],r=t[1];return S(n,r)}(),listLimit:10,selectionStyle:"none",searchFormType:"none",disableViewPersistor:!0,getListFormName:k,onListParentChange:C,getCustomLocation:S,navigationStrategy:{},embedded:!0,emitAction:h,noLeftPadding:!0,domainTypes:l,rootNodes:u,businessUnit:p,sortable:!1,scrollBehaviour:"none",locale:f}),(0,j.jsx)(Z,{children:(0,j.jsx)(x.Z,{onClick:function(){return c(N.key,t.ids)},look:"raised",ink:"primary",disabled:null===N||m()(N,b),children:o||(o=(0,j.jsx)(v.Z,{id:"client.actions.dms-move.button"}))})})]})}))))},82445:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(59713),a=n.n(r),o=n(45650),i=n(12568),c=n(73183),s=n(85893);function l(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}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const d=function(e){return(0,s.jsx)(o.ZP,u(u({},e),{},{listApp:i.ZP,docsApp:c.default}))}},25660:(e,t,n)=>{n.d(t,{Z:()=>r});const r=function(e,t){return e.detailFormNames&&e.detailFormNames[t]?e.detailFormNames[t]:"Dms".concat(t)}},67092:(e,t)=>{t.__esModule=!0;t.canUseDOM=!("undefined"==typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},88536:(e,t,n)=>{t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=c(n(14149)),o=c(n(54545)),i=n(3074);function c(e){return e&&e.__esModule?e:{default:e}}t.createLocation=function(e,t,n,o){var c=void 0;"string"==typeof e?(c=(0,i.parsePath)(e)).state=t:(void 0===(c=r({},e)).pathname&&(c.pathname=""),c.search?"?"!==c.search.charAt(0)&&(c.search="?"+c.search):c.search="",c.hash?"#"!==c.hash.charAt(0)&&(c.hash="#"+c.hash):c.hash="",void 0!==t&&void 0===c.state&&(c.state=t));try{c.pathname=decodeURI(c.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+c.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(c.key=n),o?c.pathname?"/"!==c.pathname.charAt(0)&&(c.pathname=(0,a.default)(c.pathname,o.pathname)):c.pathname=o.pathname:c.pathname||(c.pathname="/"),c},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,o.default)(e.state,t.state)}},3074:(e,t)=>{t.__esModule=!0;t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e};var n=t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};t.stripBasename=function(e,t){return n(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}},52540:(e,t,n)=>{var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=u(n(30670)),o=u(n(41143)),i=n(88536),c=n(3074),s=u(n(3405)),l=n(67092);function u(e){return e&&e.__esModule?e:{default:e}}var d="hashchange",p={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+(0,c.stripLeadingSlash)(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:c.stripLeadingSlash,decodePath:c.addLeadingSlash},slash:{encodePath:c.addLeadingSlash,decodePath:c.addLeadingSlash}},f=function(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)},h=function(e){return window.location.hash=e},m=function(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)};t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.default)(l.canUseDOM,"Hash history needs a DOM");var t=window.history,n=(0,l.supportsGoWithoutReloadUsingHash)(),u=e.getUserConfirmation,y=void 0===u?l.getConfirmation:u,v=e.hashType,g=void 0===v?"slash":v,b=e.basename?(0,c.stripTrailingSlash)((0,c.addLeadingSlash)(e.basename)):"",w=p[g],x=w.encodePath,P=w.decodePath,O=function(){var e=P(f());return(0,a.default)(!b||(0,c.hasBasename)(e,b),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+b+'".'),b&&(e=(0,c.stripBasename)(e,b)),(0,i.createLocation)(e)},j=(0,s.default)(),Z=function(e){r(K,e),K.length=t.length,j.notifyListeners(K.location,K.action)},E=!1,k=null,R=function(){var e=f(),t=x(e);if(e!==t)m(t);else{var n=O(),r=K.location;if(!E&&(0,i.locationsAreEqual)(r,n))return;if(k===(0,c.createPath)(n))return;k=null,N(n)}},N=function(e){if(E)E=!1,Z();else{j.confirmTransitionTo(e,"POP",y,(function(t){t?Z({action:"POP",location:e}):C(e)}))}},C=function(e){var t=K.location,n=D.lastIndexOf((0,c.createPath)(t));-1===n&&(n=0);var r=D.lastIndexOf((0,c.createPath)(e));-1===r&&(r=0);var a=n-r;a&&(E=!0,_(a))},S=f(),A=x(S);S!==A&&m(A);var I=O(),D=[(0,c.createPath)(I)],L=function(e){return"#"+x(b+(0,c.createPath)(e))},V=function(e,t){(0,a.default)(void 0===t,"Hash history cannot push state; it is ignored");var n="PUSH",r=(0,i.createLocation)(e,void 0,void 0,K.location);j.confirmTransitionTo(r,n,y,(function(e){if(e){var t=(0,c.createPath)(r),o=x(b+t);if(f()!==o){k=t,h(o);var i=D.lastIndexOf((0,c.createPath)(K.location)),s=D.slice(0,-1===i?0:i+1);s.push(t),D=s,Z({action:n,location:r})}else(0,a.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),Z()}}))},T=function(e,t){(0,a.default)(void 0===t,"Hash history cannot replace state; it is ignored");var n="REPLACE",r=(0,i.createLocation)(e,void 0,void 0,K.location);j.confirmTransitionTo(r,n,y,(function(e){if(e){var t=(0,c.createPath)(r),a=x(b+t);f()!==a&&(k=t,m(a));var o=D.indexOf((0,c.createPath)(K.location));-1!==o&&(D[o]=t),Z({action:n,location:r})}}))},_=function(e){(0,a.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},F=function(){return _(-1)},U=function(){return _(1)},M=0,W=function(e){1===(M+=e)?(0,l.addEventListener)(window,d,R):0===M&&(0,l.removeEventListener)(window,d,R)},B=!1,H=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=j.setPrompt(e);return B||(W(1),B=!0),function(){return B&&(B=!1,W(-1)),t()}},z=function(e){var t=j.appendListener(e);return W(1),function(){W(-1),t()}},K={length:t.length,action:"POP",location:I,createHref:L,push:V,replace:T,go:_,goBack:F,goForward:U,block:H,listen:z};return K}},3405:(e,t,n)=>{t.__esModule=!0;var r,a=n(30670),o=(r=a)&&r.__esModule?r:{default:r};t.default=function(){var e=null,t=[];return{setPrompt:function(t){return(0,o.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):((0,o.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),a(!0)):a(!1!==i)}else a(!0)},appendListener:function(e){var n=!0,r=function(){n&&e.apply(void 0,arguments)};return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}},44049:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(14892);const a=(o=r.Z,i=o.getIn,function(e,t){return function(n){var r=t||function(e){return i(e,"form")};return i(r(n),e+".initial")}});var o,i}}]);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[802],{81749:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a,b:()=>l});var n=r(45697),o={NONE:"none",FULLTEXT:"fulltext",SIMPLE:"simple",SIMPLE_ADVANCED:"simple_advanced",ADVANCED:"advanced",ADMIN:"admin"},l=r.n(n)().oneOf(Object.values(o));const a=o},13025:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o,l:()=>l});var n=r(45697),o={SINGLE:"single",MULTI:"multi",MULTI_EXPLICIT:"multi_explicit",NONE:"none"},l=r.n(n)().oneOf(Object.keys(o).map((function(e){return o[e]})))},54680:(e,t,r)=>{"use strict";r.d(t,{Z:()=>V});var n=r(74806),o=r(59713),l=r.n(o),a=r(319),i=r.n(a),c=r(64593),s=r(10535),h=r(6699),d=r(34206),u=r(88162),p=r(85893),f={error:"exclamation-circle",home:"house-blank"},b=function(e){return f[e]||e};const g=function(e){var t=e.type;return t&&"record"!==t?(0,p.jsx)(u.Z,{icon:b(t)}):null};var m,y,v,w,_,O=r(6479),E=r.n(O),k=r(28655),x=r.n(k),P=r(1024),C=r.n(P),R=r(38205),j=r(69829),S=r(88601),M=["component"],N=R.ZP.div.withConfig({displayName:"StyledBreadcrumbs"})(m||(m=x()(["\n background-color: ",";\n width: 100%;\n padding: 0.8rem 1.7rem;\n position: relative;\n z-index: 2; // higher than StyledTether to prevent cover on scroll\n"])),(function(e){return e.backgroundColor||S.Z.color("backgroundBreadcrumbs")(e)})),I=(0,R.ZP)((function(e){var t=e.component,r=E()(e,M);return C().cloneElement(t,r)})).withConfig({displayName:"StyledBreadcrumbsLink"})(y||(y=x()(["\n font-weight: ",";\n text-decoration: none;\n color: ",";\n cursor: pointer;\n\n & * {\n font-weight: ",";\n text-decoration: none;\n color: ",";\n margin-right: 0.5rem;\n }\n\n &:hover,\n &:hover * {\n color: ",";\n }\n\n &:focus,\n &:active,\n &:focus *,\n &:active * {\n color: ",";\n }\n"])),S.Z.fontWeight("bold"),(function(e){return e.active&&S.Z.color("primary")}),S.Z.fontWeight("bold"),(function(e){return e.active&&S.Z.color("primary")}),S.Z.color("secondaryLight"),S.Z.color("primary")),L=R.ZP.span.withConfig({displayName:"StyledBreadcrumbsTitle"})(v||(v=x()(["\n font-weight: ",";\n text-decoration: none;\n color: ",";\n\n & * {\n font-weight: ",";\n text-decoration: none;\n color: ",";\n margin-right: 0.5rem;\n }\n\n &:active * {\n color: ",";\n }\n"])),S.Z.fontWeight("bold"),(function(e){return e.active&&S.Z.color("primary")}),S.Z.fontWeight("bold"),(function(e){return e.active&&S.Z.color("primary")}),S.Z.color("primary")),A=(0,R.ZP)(j.Fe).withConfig({displayName:"StyledBreadcrumbSeparator"})(w||(w=x()(["\n margin-left: 0.9rem;\n margin-right: 0.9rem;\n"])));const D=function(){return _||(_=(0,p.jsx)(A,{breakWords:!0,children:(0,p.jsx)(u.Z,{icon:"chevron-right"})}))};var T;function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F=function(e){return e.title||e.display},H=function(e,t){if(!e||0===e.length)return"Tocco";var r=e.at(-1),n="";switch(r.type){case"create":n="".concat(F(r)," - ").concat(t);break;case"detail":n=e.slice(e.length-2).map(F).join(" - ");break;default:n=F(r)}return n},U=function(e){var t,r=e.intl,n=e.pathPrefix,o=e.breadcrumbsInfo,l=void 0===o?[]:o,a=e.currentView,u=e.backgroundColor,f=e.onClick,b=e.linkComp,m=[].concat(i()(l),i()(a?[a]:[]));if(0===m.length)return null;var y,v=m.map((function(e,r){var o,l=e.display||"",a=r===m.length-1?L:I,i=r===m.length-1&&{active:"true"},c=void 0!==e.path?{to:"".concat(n,"/").concat(e.path)}:{},u=b?t||(t=(0,p.jsx)(b,{})):T||(T=(0,p.jsx)(h.Z,{}));return(0,p.jsx)(d.ZP.Span,{children:(0,p.jsxs)(a,z(z(z({neutral:!0},i),c),{},{onClick:(o=e,function(){f&&f(o)}),component:u,children:[(0,p.jsx)(g,{type:e.type}),(0,p.jsx)("span",{dangerouslySetInnerHTML:{__html:s.Z.sanitizeHtml(l)}})]}))},"breadcrumbItem-".concat(r))})).reduce((function(e,t,r){return[e,(0,p.jsx)(D,{},"icon".concat(r)),t]}));return(0,p.jsxs)(N,{backgroundColor:u,children:[(0,p.jsx)(c.q,{defer:!1,children:(0,p.jsx)("title",{children:H(m,(y="client.component.breadcrumbs.createTitle",r.formatMessage({id:y})))})}),(0,p.jsx)(p.Fragment,{children:v})]})};U.defaultProps={pathPrefix:""};const B=U,V=(0,n.ZP)(B)},48078:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(52817),o=r(41609),l=r.n(o),a=r(41291),i=r(85893);const c=function(e){var t=e.value,r=e.breakWords,o=(0,n._)(t),c=l()(o)?t:o.formatInternational();return(0,i.jsx)(a.Z,{href:"tel:".concat(t),target:"_blank",onClick:function(e){return e.stopPropagation()},label:c,breakWords:r})}},79311:(e,t,r)=>{"use strict";r.d(t,{Z:()=>m});var n,o,l=r(28655),a=r.n(l),i=r(76538),c=r(38205),s=r(24875),h=r(30759),d=r(7281),u=s.FS.color("secondaryLight"),p=s.FS.color("paper"),f=s.FS.color("secondary"),b=(0,c.vJ)(n||(n=a()(["\n .react-datepicker-popper {\n && {\n z-index: 5;\n margin: 0;\n }\n }\n\n .react-datepicker {\n && {\n * {\n box-sizing: content-box; // prevent box-sizing problems in widgets\n }\n border-radius: 0;\n border: 1px solid ",";\n ","\n\n .react-datepicker__header {\n ","\n border-radius: 0;\n background-color: ",";\n padding-bottom: 0;\n }\n\n .react-datepicker__navigation {\n top: 3px;\n }\n\n .react-datepicker__navigation--previous,\n .react-datepicker__navigation--next {\n margin-top: ",";\n }\n ","\n\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow,\n .react-datepicker__navigation-icon:before {\n border-color: "," !important;\n border-width: 1.5px 1.5px 0 0;\n }\n\n .react-datepicker__header__dropdown {\n font-size: ",";\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n font-size: ",";\n }\n }\n\n .react-datepicker__current-month {\n ","\n }\n\n .react-datepicker__day-name {\n color: ",";\n font-size: ",";\n }\n\n .react-datepicker__day,\n .react-datepicker__day-name {\n border: 1px solid transparent;\n padding: ",";\n outline: none;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n padding: ",";\n }\n }\n\n .react-datepicker__day--selected {\n background-color: ",";\n border-color: ",";\n border-radius: 50%;\n\n &:focus {\n border-color: ",";\n background-color: ",";\n }\n }\n\n .react-datepicker__day--keyboard-selected {\n background-color: ",";\n border-color: ",";\n border-radius: 50%;\n }\n\n .react-datepicker__day--today,\n .react-datepicker__month-text--today,\n .react-datepicker__quarter-text--today,\n .react-datepicker__year-text--today {\n border-radius: 50%;\n border-color: ",";\n }\n\n .react-datepicker__today-button {\n ","\n background-color: ",";\n border-top: 0;\n padding-bottom: ",";\n padding-top: 0;\n\n &:hover > button {\n background-color: ",";\n }\n }\n\n .react-datepicker__input-time-container {\n display: flex;\n justify-content: center;\n margin: 5px 0;\n\n .react-datepicker-time__input {\n margin: 0;\n\n input {\n text-align: center;\n }\n }\n }\n\n .react-datepicker__header__dropdown.react-datepicker__header__dropdown--scroll {\n width: 190px;\n margin: 8px auto 0;\n display: grid;\n grid-template-columns: 100px 85px;\n }\n\n .react-datepicker__month-read-view,\n .react-datepicker__year-read-view {\n color: ",";\n visibility: visible !important;\n }\n\n .react-datepicker__year-option,\n .react-datepicker__month-option,\n .react-datepicker__month-year-option {\n font-size: ",";\n }\n\n .react-datepicker__year-option:first-of-type,\n .react-datepicker__month-option:first-of-type,\n .react-datepicker__month-year-option:first-of-type,\n .react-datepicker__year-option:last-of-type,\n .react-datepicker__month-option:last-of-type,\n .react-datepicker__month-year-option:last-of-type {\n border-radius: 0;\n }\n\n .react-datepicker__year-read-view--down-arrow,\n .react-datepicker__month-read-view--down-arrow,\n .react-datepicker__month-year-read-view--down-arrow {\n top: 6px;\n right: -10px;\n width: 5px;\n height: 5px;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n right: -8px;\n }\n }\n\n .react-datepicker__year-read-view--down-arrow {\n right: -4px;\n\n /* decrease padding to prevent overflow on small screens */\n @media only screen and (max-width: 480px) {\n right: 3px;\n }\n }\n\n .react-datepicker__day:hover,\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover,\n .react-datepicker__year-text:hover {\n border-color: ",";\n background-color: ",";\n border-radius: 50%;\n color: ",";\n }\n\n .react-datepicker__year-dropdown {\n left: 40%;\n top: 45px;\n }\n\n .react-datepicker__navigation--years-upcoming:before {\n border-width: 1.5px 1.5px 0 0;\n border-color: ",";\n border-style: solid;\n content: '';\n display: block;\n position: absolute;\n top: 8px;\n left: 12px;\n height: 5px;\n width: 5px;\n transform: rotate(-45deg);\n }\n\n .react-datepicker__navigation--years-previous:before {\n border-width: 1.5px 1.5px 0 0;\n border-color: ",";\n border-style: solid;\n content: '';\n display: block;\n position: absolute;\n top: 6px;\n left: 12px;\n height: 5px;\n width: 5px;\n transform: rotate(135deg);\n }\n\n .react-datepicker__year-dropdown,\n .react-datepicker__month-dropdown,\n .react-datepicker__month-year-dropdown {\n background-color: ",";\n border-radius: 0;\n border-color: ",";\n box-shadow: 0 0 5px rgb(0 0 0 / 30%);\n }\n\n .react-datepicker__year-option:hover,\n .react-datepicker__month-option:hover,\n .react-datepicker__month-year-option:hover {\n background-color: ",";\n }\n\n .react-datepicker__month-option--selected {\n left: 10px;\n }\n\n .react-datepicker__day--outside-month {\n color: ",";\n }\n }\n }\n"])),u,(0,h.Z)(),(0,h.Z)(),u,d.Z.space(-.6),"\n .react-datepicker__current-month.react-datepicker__current-month--hasYearDropdown.react-datepicker__current-month--hasMonthDropdown {\n // Avoid showing the month and year a second time when it has month and year dropdowns.\n display: none;\n }\n",p,d.Z.font(2.85),d.Z.font(1.8),(0,h.Z)({fontWeight:s.FS.fontWeight("bold")}),p,d.Z.font(-2),d.Z.space(-.6),d.Z.space(-1.2),f,f,f,u,u,u,f,(0,h.Z)(),p,d.Z.space(-.5),(function(e){var t=e.theme;return(0,i._j)(.1,t.colors.paper)}),p,d.Z.font(0),u,u,p,s.FS.color("text"),s.FS.color("text"),p,u,(function(e){var t=e.theme;return(0,i._j)(.1,t.colors.paper)}),(function(e){var t=e.theme;return(0,i.$n)(.7,t.colors.text)})),g=r(85893);const m=function(){return(0,g.jsx)(g.Fragment,{children:o||(o=(0,g.jsx)(b,{}))})}},23710:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ne});var n=r(59713),o=r.n(n),l=r(72757),a=r(1024),i=r(86896),c=r(93913),s=r.n(c),h=r(34575),d=r.n(h),u=r(2205),p=r.n(u),f=r(78585),b=r.n(f),g=r(29754),m=r.n(g),y=r(11820),v=r(39269),w=r(96840),_=r(75528),O=r(52079),E=r(84184),k=r(40569),x=r(75460),P=r(65761),C=r(53626),R=r(73043),j=r(16797),S=r(71297),M=r(55444),N=r(6672),I=r(18195),L=r(23132),A=r(37060),D=r(4175),T=r(21094),Z=r(20211),z=r(51778),F=r(87388),H=r(89906),U=r(41831);function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=m()(e);if(t){var o=m()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b()(this,r)}}var V=function(e){p()(r,e);var t=B(r);function r(){return d()(this,r),t.apply(this,arguments)}return s()(r)}(y.Z);V.builtinPlugins=[v.Z,w.Z,k.Z,x.Z,P.Z,C.Z,R.Z,S.Z,j.Z,M.Z,N.Z,I.Z,_.Z,L.Z,A.Z,D.Z,T.Z,Z.Z,z.Z,O.Z,F.Z,H.Z,U.Z,E.Z],V.defaultConfig={toolbar:{items:["bold","italic","underline","strikethrough","removeFormat","|","heading","fontFamily","fontSize","fontColor","|","numberedList","bulletedList","|","link","|","insertTable","|","undo","redo","|","sourceEditing"]},language:{ui:"de",content:"de"},link:{addTargetToExternalLinks:!0},htmlSupport:{allow:[{name:/.*/,attributes:!0,classes:!0,styles:!0}]},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells"]},heading:{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h1",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h2",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h3",title:"Heading 3",class:"ck-heading_heading3"},{model:"heading4",view:"h4",title:"Heading 4",class:"ck-heading_heading4"},{model:"heading5",view:"h5",title:"Heading 5",class:"ck-heading_heading5"},{model:"heading6",view:"h6",title:"Heading 6",class:"ck-heading_heading6"},{model:"normal",view:"div",title:"Normal (DIV)",class:"ck-heading_normal"}]},fontFamily:{options:["default","Arial,Helvetica,sans-serif","Comic Sans MS,cursive","Courier New,Courier,monospace","Georgia,serif","Lucida Sans Unicode,Lucida Grande,sans-serif","Tahoma,Geneva,sans-serif","Times New Roman,Times,serif","Trebuchet MS,Helvetica,sans-serif","Verdana,Geneva,sans-serif"],supportAllValues:!0},fontSize:{options:[8,10,11,12,"default",15,16,17,19,22,24,26,29,32,36,37,48,64],supportAllValues:!0},fontColor:{columns:10,colors:[{color:"hsl(6, 54%, 95%)",label:" "},{color:"hsl(6, 54%, 89%)",label:" "},{color:"hsl(6, 54%, 78%)",label:" "},{color:"hsl(6, 54%, 68%)",label:" "},{color:"hsl(6, 54%, 57%)",label:" "},{color:"hsl(6, 63%, 46%)",label:" "},{color:"hsl(6, 63%, 41%)",label:" "},{color:"hsl(6, 63%, 35%)",label:" "},{color:"hsl(6, 63%, 29%)",label:" "},{color:"hsl(6, 63%, 24%)",label:" "},{color:"hsl(6, 78%, 96%)",label:" "},{color:"hsl(6, 78%, 91%)",label:" "},{color:"hsl(6, 78%, 83%)",label:" "},{color:"hsl(6, 78%, 74%)",label:" "},{color:"hsl(6, 78%, 66%)",label:" "},{color:"hsl(6, 78%, 57%)",label:" "},{color:"hsl(6, 59%, 50%)",label:" "},{color:"hsl(6, 59%, 43%)",label:" "},{color:"hsl(6, 59%, 37%)",label:" "},{color:"hsl(6, 59%, 30%)",label:" "},{color:"hsl(283, 39%, 95%)",label:" "},{color:"hsl(283, 39%, 91%)",label:" "},{color:"hsl(283, 39%, 81%)",label:" "},{color:"hsl(283, 39%, 72%)",label:" "},{color:"hsl(283, 39%, 63%)",label:" "},{color:"hsl(283, 39%, 53%)",label:" "},{color:"hsl(283, 34%, 47%)",label:" "},{color:"hsl(283, 34%, 40%)",label:" "},{color:"hsl(283, 34%, 34%)",label:" "},{color:"hsl(283, 34%, 28%)",label:" "},{color:"hsl(282, 39%, 95%)",label:" "},{color:"hsl(282, 39%, 89%)",label:" "},{color:"hsl(282, 39%, 79%)",label:" "},{color:"hsl(282, 39%, 68%)",label:" "},{color:"hsl(282, 39%, 58%)",label:" "},{color:"hsl(282, 44%, 47%)",label:" "},{color:"hsl(282, 44%, 42%)",label:" "},{color:"hsl(282, 44%, 36%)",label:" "},{color:"hsl(282, 44%, 30%)",label:" "},{color:"hsl(282, 44%, 25%)",label:" "},{color:"hsl(204, 51%, 94%)",label:" "},{color:"hsl(204, 51%, 89%)",label:" "},{color:"hsl(204, 51%, 78%)",label:" "},{color:"hsl(204, 51%, 67%)",label:" "},{color:"hsl(204, 51%, 55%)",label:" "},{color:"hsl(204, 64%, 44%)",label:" "},{color:"hsl(204, 64%, 39%)",label:" "},{color:"hsl(204, 64%, 34%)",label:" "},{color:"hsl(204, 64%, 28%)",label:" "},{color:"hsl(204, 64%, 23%)",label:" "},{color:"hsl(204, 70%, 95%)",label:" "},{color:"hsl(204, 70%, 91%)",label:" "},{color:"hsl(204, 70%, 81%)",label:" "},{color:"hsl(204, 70%, 72%)",label:" "},{color:"hsl(204, 70%, 63%)",label:" "},{color:"hsl(204, 70%, 53%)",label:" "},{color:"hsl(204, 62%, 47%)",label:" "},{color:"hsl(204, 62%, 40%)",label:" "},{color:"hsl(204, 62%, 34%)",label:" "},{color:"hsl(204, 62%, 28%)",label:" "},{color:"hsl(168, 55%, 94%)",label:" "},{color:"hsl(168, 55%, 88%)",label:" "},{color:"hsl(168, 55%, 77%)",label:" "},{color:"hsl(168, 55%, 65%)",label:" "},{color:"hsl(168, 55%, 54%)",label:" "},{color:"hsl(168, 76%, 42%)",label:" "},{color:"hsl(168, 76%, 37%)",label:" "},{color:"hsl(168, 76%, 32%)",label:" "},{color:"hsl(168, 76%, 27%)",label:" "},{color:"hsl(168, 76%, 22%)",label:" "},{color:"hsl(168, 42%, 94%)",label:" "},{color:"hsl(168, 42%, 87%)",label:" "},{color:"hsl(168, 42%, 74%)",label:" "},{color:"hsl(168, 42%, 61%)",label:" "},{color:"hsl(168, 45%, 49%)",label:" "},{color:"hsl(168, 76%, 36%)",label:" "},{color:"hsl(168, 76%, 31%)",label:" "},{color:"hsl(168, 76%, 27%)",label:" "},{color:"hsl(168, 76%, 23%)",label:" "},{color:"hsl(168, 76%, 19%)",label:" "},{color:"hsl(145, 45%, 94%)",label:" "},{color:"hsl(145, 45%, 88%)",label:" "},{color:"hsl(145, 45%, 77%)",label:" "},{color:"hsl(145, 45%, 65%)",label:" "},{color:"hsl(145, 45%, 53%)",label:" "},{color:"hsl(145, 63%, 42%)",label:" "},{color:"hsl(145, 63%, 37%)",label:" "},{color:"hsl(145, 63%, 32%)",label:" "},{color:"hsl(145, 63%, 27%)",label:" "},{color:"hsl(145, 63%, 22%)",label:" "},{color:"hsl(145, 61%, 95%)",label:" "},{color:"hsl(145, 61%, 90%)",label:" "},{color:"hsl(145, 61%, 80%)",label:" "},{color:"hsl(145, 61%, 69%)",label:" "},{color:"hsl(145, 61%, 59%)",label:" "},{color:"hsl(145, 63%, 49%)",label:" "},{color:"hsl(145, 63%, 43%)",label:" "},{color:"hsl(145, 63%, 37%)",label:" "},{color:"hsl(145, 63%, 31%)",label:" "},{color:"hsl(145, 63%, 25%)",label:" "},{color:"hsl(48, 89%, 95%)",label:" "},{color:"hsl(48, 89%, 90%)",label:" "},{color:"hsl(48, 89%, 80%)",label:" "},{color:"hsl(48, 89%, 70%)",label:" "},{color:"hsl(48, 89%, 60%)",label:" "},{color:"hsl(48, 89%, 50%)",label:" "},{color:"hsl(48, 88%, 44%)",label:" "},{color:"hsl(48, 88%, 38%)",label:" "},{color:"hsl(48, 88%, 32%)",label:" "},{color:"hsl(48, 88%, 26%)",label:" "},{color:"hsl(37, 90%, 95%)",label:" "},{color:"hsl(37, 90%, 90%)",label:" "},{color:"hsl(37, 90%, 80%)",label:" "},{color:"hsl(37, 90%, 71%)",label:" "},{color:"hsl(37, 90%, 61%)",label:" "},{color:"hsl(37, 90%, 51%)",label:" "},{color:"hsl(37, 86%, 45%)",label:" "},{color:"hsl(37, 86%, 39%)",label:" "},{color:"hsl(37, 86%, 33%)",label:" "},{color:"hsl(37, 86%, 27%)",label:" "},{color:"hsl(28, 80%, 95%)",label:" "},{color:"hsl(28, 80%, 90%)",label:" "},{color:"hsl(28, 80%, 81%)",label:" "},{color:"hsl(28, 80%, 71%)",label:" "},{color:"hsl(28, 80%, 61%)",label:" "},{color:"hsl(28, 80%, 52%)",label:" "},{color:"hsl(28, 74%, 46%)",label:" "},{color:"hsl(28, 74%, 39%)",label:" "},{color:"hsl(28, 74%, 33%)",label:" "},{color:"hsl(28, 74%, 27%)",label:" "},{color:"hsl(24, 71%, 94%)",label:" "},{color:"hsl(24, 71%, 88%)",label:" "},{color:"hsl(24, 71%, 77%)",label:" "},{color:"hsl(24, 71%, 65%)",label:" "},{color:"hsl(24, 71%, 53%)",label:" "},{color:"hsl(24, 100%, 41%)",label:" "},{color:"hsl(24, 100%, 36%)",label:" "},{color:"hsl(24, 100%, 31%)",label:" "},{color:"hsl(24, 100%, 26%)",label:" "},{color:"hsl(24, 100%, 22%)",label:" "},{color:"hsl(192, 15%, 99%)",label:" "},{color:"hsl(192, 15%, 99%)",label:" "},{color:"hsl(192, 15%, 97%)",label:" "},{color:"hsl(192, 15%, 96%)",label:" "},{color:"hsl(192, 15%, 95%)",label:" "},{color:"hsl(192, 15%, 94%)",label:" "},{color:"hsl(192, 5%, 82%)",label:" "},{color:"hsl(192, 3%, 71%)",label:" "},{color:"hsl(192, 2%, 60%)",label:" "},{color:"hsl(192, 1%, 49%)",label:" "},{color:"hsl(204, 8%, 98%)",label:" "},{color:"hsl(204, 8%, 95%)",label:" "},{color:"hsl(204, 8%, 90%)",label:" "},{color:"hsl(204, 8%, 86%)",label:" "},{color:"hsl(204, 8%, 81%)",label:" "},{color:"hsl(204, 8%, 76%)",label:" "},{color:"hsl(204, 5%, 67%)",label:" "},{color:"hsl(204, 4%, 58%)",label:" "},{color:"hsl(204, 3%, 49%)",label:" "},{color:"hsl(204, 3%, 40%)",label:" "},{color:"hsl(184, 9%, 96%)",label:" "},{color:"hsl(184, 9%, 92%)",label:" "},{color:"hsl(184, 9%, 85%)",label:" "},{color:"hsl(184, 9%, 77%)",label:" "},{color:"hsl(184, 9%, 69%)",label:" "},{color:"hsl(184, 9%, 62%)",label:" "},{color:"hsl(184, 6%, 54%)",label:" "},{color:"hsl(184, 5%, 47%)",label:" "},{color:"hsl(184, 5%, 40%)",label:" "},{color:"hsl(184, 5%, 32%)",label:" "},{color:"hsl(184, 6%, 95%)",label:" "},{color:"hsl(184, 6%, 91%)",label:" "},{color:"hsl(184, 6%, 81%)",label:" "},{color:"hsl(184, 6%, 72%)",label:" "},{color:"hsl(184, 6%, 62%)",label:" "},{color:"hsl(184, 6%, 53%)",label:" "},{color:"hsl(184, 5%, 46%)",label:" "},{color:"hsl(184, 5%, 40%)",label:" "},{color:"hsl(184, 5%, 34%)",label:" "},{color:"hsl(184, 5%, 27%)",label:" "},{color:"hsl(210, 12%, 93%)",label:" "},{color:"hsl(210, 12%, 86%)",label:" "},{color:"hsl(210, 12%, 71%)",label:" "},{color:"hsl(210, 12%, 57%)",label:" "},{color:"hsl(210, 15%, 43%)",label:" "},{color:"hsl(210, 29%, 29%)",label:" "},{color:"hsl(210, 29%, 25%)",label:" "},{color:"hsl(210, 29%, 22%)",label:" "},{color:"hsl(210, 29%, 18%)",label:" "},{color:"hsl(210, 29%, 15%)",label:" "},{color:"hsl(210, 9%, 92%)",label:" "},{color:"hsl(210, 9%, 85%)",label:" "},{color:"hsl(210, 9%, 70%)",label:" "},{color:"hsl(210, 9%, 55%)",label:" "},{color:"hsl(210, 14%, 39%)",label:" "},{color:"hsl(210, 29%, 24%)",label:" "},{color:"hsl(210, 29%, 21%)",label:" "},{color:"hsl(210, 29%, 18%)",label:" "},{color:"hsl(210, 29%, 16%)",label:" "},{color:"hsl(210, 29%, 13%)",label:" "}]}};const W=V;var $,Q=r(28655),Y=r.n(Q),G=r(38205),X=r(56822),q=G.ZP.div.withConfig({displayName:"StyledHtmlEditor"})($||($=Y()(["\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,X.L)(e,"ckeditor")})),K=r(85893);function J(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var te=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;default:return"de"}},re=function(e){var t=e.value,r=e.onChange,n=e.contentLang,o=e.ckEditorConfig,c=(0,i.Z)().locale,s=(0,a.useRef)(!1);return(0,K.jsx)(q,{children:(0,K.jsx)(l.CKEditor,{editor:W,config:ee({language:{ui:te(c),content:n}},o),data:t,onChange:function(e,t){if(t.plugins.get("SourceEditing").isSourceEditingMode){if(!0===s.current)return;s.current=!0}var n=t.getData();r(n)}})})};re.defaultProps={value:"",contentLang:"de"};const ne=re},81251:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(59713),o=r.n(n),l=r(88162),a=r(85893);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const s=function(e){var t=e.size,r=e.style,n=e.icon;return(0,a.jsx)(l.Z,c(c({},r),{},{style:{fontSize:t},spin:!0,icon:n||"circle-notch"}))}},36498:(e,t,r)=>{"use strict";r.d(t,{$s:()=>i,BF:()=>s,az:()=>c});var n=r(45697),o=r.n(n),l=r(8358),a=o().oneOfType([o().string,o().number]),i=o().shape({__key:a}),c=(o().arrayOf(i),o().oneOf(Object.keys(l.P).map((function(e){return l.P[e]})))),s=o().shape({id:o().string.isRequired,label:o().string,sorting:o().shape({sortable:o().bool,sortRank:o().number,order:o().oneOf(["asc","desc"])}),resizable:o().bool,width:o().number,HeaderRenderer:o().elementType,CellRenderer:o().elementType,rightAligned:o().bool})},8358:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});var n={INLINE:"inline",NONE:"none"}},65378:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(45697),o=r.n(n),l=r(98773);const a={propTypes:o().shape({embedType:o().oneOf(l.Nc),widgetConfigKey:function(e,t,r){if("widget"===e.embedType&&!e[t])return new Error("Prop `"+t+"` is missing for `"+r+"`. Validation failed.")}})}},96801:(e,t,r)=>{"use strict";r.d(t,{Z:()=>P});var n=r(59713),o=r.n(n),l=r(90655);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var c=r(81770),s=r(24688),h=r(63038),d=r.n(h),u=r(1024),p=r.n(u),f=r(85893);function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){return function(t){var r=(0,u.useState)(null),n=d()(r,2),l=n[0],a=n[1],i=(0,u.useRef)(!0);return(0,u.useEffect)((function(){return e().then((function(e){return i.current?a((function(){return e})):null})),function(){i.current=!1}}),[]),null!==l?(0,f.jsx)(l,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t)):null}}var m=r(44759);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w={},_=r(56746),O=function(e){return function(t){if(e.component)return(0,f.jsx)(e.component,{router:t,routes:e.routes});if(e.render){var r={router:t,routes:e.routes};return e.render(r)}}};const E=function(e){return(0,f.jsx)(_.AW,{path:e.path,exact:e.exact,render:O(e)})};function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const x=function(e){var t=e.history,r=e.routes;return(0,f.jsx)(_.F0,{history:t,children:(0,f.jsx)(p().Fragment,{children:r.map((function(e,t){return(0,f.jsx)(E,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),t)}))})})},P={loadRoute:function(e,t,r,n){return function(o){if(n&&w[n]){var l=w[n];return(0,f.jsx)(l,v({},o))}var a=g((function(){return new Promise((function(n){r().then((function(r){var o=r.default;o.reducers&&c.Z.injectReducers(e,o.reducers),o.sagas&&o.sagas.forEach((function(t){s.Z.injectSaga(e,t)})),o.inputDispatches&&o.inputDispatches.forEach((function(r){!function(e,t,r){var n=r.key,o=r.actionCreator,l=r.mandatory,a=void 0!==l&&l,i=r.defaultValue,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:m.Z.logError;if(Object.prototype.hasOwnProperty.call(t,n)||i){var s=o(t[n]||i);e.dispatch(s)}else!0===a&&c("EntityBrowser: Mandatory field '".concat(n,"' not set in input"))}(e,t,r)})),n(o.container)}))}))}));return n&&(w[n]=a),(0,f.jsx)(a,v({},o))}},Router:x,RouteWithSubRoutes:E,extractParamsFromPath:function(e,t){var r=[],n=(0,l.Bo)(e,r).exec(t);return null!==n?r.reduce((function(e,t,r){return i(i({},e),{},o()({},t.name,n[r+1]))}),{}):null}}},29441:(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r(59713),o=r.n(n),l=r(27361),a=r.n(l);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={};const h={persistViewInfo:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;s=c(c({},s),{},o()({},e,{level:r,info:c(c({},a()(s,[e,"info"],{})),t)}))},viewInfoSelector:function(e){return a()(s,[e,"info"],{})},clearPersistedViews:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;s=c({},Object.keys(s).reduce((function(t,r){var n=s[r];return c(c({},t),n.level<e&&o()({},r,n))}),{}))}}},77840:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n.ZP});var n=r(12568)},84059:(e,t,r)=>{"use strict";r.d(t,{ZP:()=>P});var n,o=r(1024),l=r.n(o),a=Object.defineProperty,i=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))c.call(t,r)&&h(e,r,t[r]);if(i)for(var r of i(t))s.call(t,r)&&h(e,r,t[r]);return e},u=(e,t)=>{var r={};for(var n in e)c.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&i)for(var n of i(e))t.indexOf(n)<0&&s.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class{constructor(e,r,n,o){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let a=[];for(let e=0;e<this.size;e++)a.push(!1);for(let e=0;e<this.size;e++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();const i=this.addEccAndInterleave(n);if(this.drawCodewords(i),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(o=t,e=r),this.applyMask(t)}}l(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(r,n){const o=e.QrSegment.makeSegments(r);return t.encodeSegments(o,n)}static encodeBinary(r,n){const o=e.QrSegment.makeBytes(r);return t.encodeSegments([o],n)}static encodeSegments(e,r,o=1,a=40,c=-1,s=!0){if(!(t.MIN_VERSION<=o&&o<=a&&a<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let h,d;for(h=o;;h++){const n=8*t.getNumDataCodewords(h,r),o=i.getTotalBits(e,h);if(o<=n){d=o;break}if(h>=a)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])s&&d<=8*t.getNumDataCodewords(h,e)&&(r=e);let u=[];for(const t of e){n(t.mode.modeBits,4,u),n(t.numChars,t.mode.numCharCountBits(h),u);for(const e of t.getData())u.push(e)}l(u.length==d);const p=8*t.getNumDataCodewords(h,r);l(u.length<=p),n(0,Math.min(4,p-u.length),u),n(0,(8-u.length%8)%8,u),l(u.length%8==0);for(let e=236;u.length<p;e^=253)n(e,8,u);let f=[];for(;8*f.length<u.length;)f.push(0);return u.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(h,r,f,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let e=0;e<10;e++)r=r<<1^1335*(r>>>9);const n=21522^(t<<10|r);l(n>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,o(n,e));this.setFunctionModule(8,7,o(n,6)),this.setFunctionModule(8,8,o(n,7)),this.setFunctionModule(7,8,o(n,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,o(n,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,o(n,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,o(n,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;l(t>>>18==0);for(let e=0;e<18;e++){const r=o(t,e),n=this.size-11+e%3,l=Math.floor(e/3);this.setFunctionModule(n,l,r),this.setFunctionModule(l,n,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),l=e+n,a=t+r;0<=l&&l<this.size&&0<=a&&a<this.size&&this.setFunctionModule(l,a,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],a=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],i=Math.floor(t.getNumRawDataModules(r)/8),c=o-i%o,s=Math.floor(i/o);let h=[];const d=t.reedSolomonComputeDivisor(a);for(let r=0,n=0;r<o;r++){let o=e.slice(n,n+s-a+(r<c?0:1));n+=o.length;const l=t.reedSolomonComputeRemainder(o,d);r<c&&o.push(0),h.push(o.concat(l))}let u=[];for(let e=0;e<h[0].length;e++)h.forEach(((t,r)=>{(e!=s-a||r>=c)&&u.push(t[e])}));return l(u.length==i),u}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let n=0;n<this.size;n++)for(let l=0;l<2;l++){const a=t-l,i=0==(t+1&2)?this.size-1-n:n;!this.isFunction[i][a]&&r<8*e.length&&(this.modules[i][a]=o(e[r>>>3],7-(7&r)),r++)}}l(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,o=0,l=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[r][a]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,l),n||(e+=this.finderPenaltyCountPatterns(l)*t.PENALTY_N3),n=this.modules[r][a],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,l)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,o=0,l=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][r]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,l),n||(e+=this.finderPenaltyCountPatterns(l)*t.PENALTY_N3),n=this.modules[a][r],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,l)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){const o=this.modules[r][n];o==this.modules[r][n+1]&&o==this.modules[r+1][n]&&o==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,o=Math.ceil(Math.abs(20*r-10*n)/n)-1;return l(0<=o&&o<=9),e+=o*t.PENALTY_N4,l(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return l(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let o=0;o<e;o++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const o of e){const e=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return l(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];l(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let r=t;function n(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function o(e,t){return 0!=(e>>>t&1)}function l(e){if(!e)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;const a=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(const r of e)n(r,8,t);return new a(a.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!a.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let r=0;r<e.length;){const o=Math.min(e.length-r,3);n(parseInt(e.substr(r,o),10),3*o+1,t),r+=o}return new a(a.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!a.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,r=[];for(t=0;t+2<=e.length;t+=2){let o=45*a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),n(o,11,r)}return t<e.length&&n(a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,r),new a(a.Mode.ALPHANUMERIC,e.length,r)}static makeSegments(e){return""==e?[]:a.isNumeric(e)?[a.makeNumeric(e)]:a.isAlphanumeric(e)?[a.makeAlphanumeric(e)]:[a.makeBytes(a.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)n(e,8,t);else if(e<16384)n(2,2,t),n(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,t),n(e,21,t)}return new a(a.Mode.ECI,0,t)}static isNumeric(e){return a.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return a.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substr(r+1,2),16)),r+=2);return t}};let i=a;i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=i})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let r=t;r.LOW=new t(0,1),r.MEDIUM=new t(1,0),r.QUARTILE=new t(2,3),r.HIGH=new t(3,2),e.Ecc=r})(t=e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let r=t;r.NUMERIC=new t(1,[10,12,14]),r.ALPHANUMERIC=new t(2,[9,11,13]),r.BYTE=new t(4,[8,16,16]),r.KANJI=new t(8,[8,10,12]),r.ECI=new t(7,[0,0,0]),e.Mode=r})(t=e.QrSegment||(e.QrSegment={}))})(n||(n={}));var p=n,f={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},b=128,g="L",m="#FFFFFF",y="#000000",v=!1;
|
|
2
|
+
/**
|
|
3
|
+
* @license qrcode.react
|
|
4
|
+
* Copyright (c) Paul O'Shannessy
|
|
5
|
+
* SPDX-License-Identifier: ISC
|
|
6
|
+
*/function w(e,t=0){const r=[];return e.forEach((function(e,n){let o=null;e.forEach((function(l,a){if(!l&&null!==o)return r.push(`M${o+t} ${n+t}h${a-o}v1H${o+t}z`),void(o=null);if(a!==e.length-1)l&&null===o&&(o=a);else{if(!l)return;null===o?r.push(`M${a+t},${n+t} h1v1H${a+t}z`):r.push(`M${o+t},${n+t} h${a+1-o}v1H${o+t}z`)}}))})),r.join("")}function _(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function O(e,t,r,n){if(null==n)return null;const o=r?4:0,l=e.length+2*o,a=Math.floor(.1*t),i=l/t,c=(n.width||a)*i,s=(n.height||a)*i,h=null==n.x?e.length/2-c/2:n.x*i,d=null==n.y?e.length/2-s/2:n.y*i;let u=null;if(n.excavate){let e=Math.floor(h),t=Math.floor(d);u={x:e,y:t,w:Math.ceil(c+h-e),h:Math.ceil(s+d-t)}}return{x:h,y:d,h:s,w:c,excavation:u}}var E=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function k(e){const t=e,{value:r,size:n=b,level:a=g,bgColor:i=m,fgColor:c=y,includeMargin:s=v,style:h,imageSettings:k}=t,x=u(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),P=null==k?void 0:k.src,C=(0,o.useRef)(null),R=(0,o.useRef)(null),[j,S]=(0,o.useState)(!1);(0,o.useEffect)((()=>{if(null!=C.current){const e=C.current,t=e.getContext("2d");if(!t)return;let o=p.QrCode.encodeText(r,f[a]).getModules();const l=s?4:0,h=o.length+2*l,d=O(o,n,s,k),u=R.current,b=null!=d&&null!==u&&u.complete&&0!==u.naturalHeight&&0!==u.naturalWidth;b&&null!=d.excavation&&(o=_(o,d.excavation));const g=window.devicePixelRatio||1;e.height=e.width=n*g;const m=n/h*g;t.scale(m,m),t.fillStyle=i,t.fillRect(0,0,h,h),t.fillStyle=c,E?t.fill(new Path2D(w(o,l))):o.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+l,r+l,1,1)}))})),b&&t.drawImage(u,d.x+l,d.y+l,d.w,d.h)}})),(0,o.useEffect)((()=>{S(!1)}),[P]);const M=d({height:n,width:n},h);let N=null;return null!=P&&(N=l().createElement("img",{src:P,key:P,style:{display:"none"},onLoad:()=>{S(!0)},ref:R})),l().createElement(l().Fragment,null,l().createElement("canvas",d({style:M,height:n,width:n,ref:C},x)),N)}function x(e){const t=e,{value:r,size:n=b,level:o=g,bgColor:a=m,fgColor:i=y,includeMargin:c=v,imageSettings:s}=t,h=u(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let E=p.QrCode.encodeText(r,f[o]).getModules();const k=c?4:0,x=E.length+2*k,P=O(E,n,c,s);let C=null;null!=s&&null!=P&&(null!=P.excavation&&(E=_(E,P.excavation)),C=l().createElement("image",{xlinkHref:s.src,height:P.h,width:P.w,x:P.x+k,y:P.y+k,preserveAspectRatio:"none"}));const R=w(E,k);return l().createElement("svg",d({height:n,width:n,viewBox:`0 0 ${x} ${x}`},h),l().createElement("path",{fill:a,d:`M0,0 h${x}v${x}H0z`,shapeRendering:"crispEdges"}),l().createElement("path",{fill:i,d:R,shapeRendering:"crispEdges"}),C)}var P=e=>{const t=e,{renderAs:r}=t,n=u(t,["renderAs"]);return"svg"===r?l().createElement(x,d({},n)):l().createElement(k,d({},n))}},36104:(e,t,r)=>{"use strict";var n=r(82637);function o(){}function l(){}l.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,l,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:o};return r.PropTypes=r,r}},9657:(e,t,r)=>{e.exports=r(36104)()},82637:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},77678:(e,t,r)=>{"use strict";r.d(t,{Z:()=>_});var n=r(1024),o=r.n(n),l=r(99860),a=r.n(l);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var s=function(e){var t,r;function n(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(c(t)),t.handleErrored=t.handleErrored.bind(c(t)),t.handleChange=t.handleChange.bind(c(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(c(t)),t}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var l=n.prototype;return l.getValue=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this.props.grecaptcha.getResponse(this._widgetId):null},l.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},l.execute=function(){var e=this.props.grecaptcha;if(e&&void 0!==this._widgetId)return e.execute(this._widgetId);this._executeRequested=!0},l.executeAsync=function(){var e=this;return new Promise((function(t,r){e.executionResolve=t,e.executionReject=r,e.execute()}))},l.reset=function(){this.props.grecaptcha&&void 0!==this._widgetId&&this.props.grecaptcha.reset(this._widgetId)},l.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},l.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},l.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},l.explicitRender=function(){if(this.props.grecaptcha&&this.props.grecaptcha.render&&void 0===this._widgetId){var e=document.createElement("div");this._widgetId=this.props.grecaptcha.render(e,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge}),this.captcha.appendChild(e)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},l.componentDidMount=function(){this.explicitRender()},l.componentDidUpdate=function(){this.explicitRender()},l.componentWillUnmount=function(){void 0!==this._widgetId&&(this.delayOfCaptchaIframeRemoving(),this.reset())},l.delayOfCaptchaIframeRemoving=function(){var e=document.createElement("div");for(document.body.appendChild(e),e.style.display="none";this.captcha.firstChild;)e.appendChild(this.captcha.firstChild);setTimeout((function(){document.body.removeChild(e)}),5e3)},l.handleRecaptchaRef=function(e){this.captcha=e},l.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"]));return o().createElement("div",i({},t,{ref:this.handleRecaptchaRef}))},n}(o().Component);s.displayName="ReCAPTCHA",s.propTypes={sitekey:a().string.isRequired,onChange:a().func,grecaptcha:a().object,theme:a().oneOf(["dark","light"]),type:a().oneOf(["image","audio"]),tabindex:a().number,onExpired:a().func,onErrored:a().func,size:a().oneOf(["compact","normal","invisible"]),stoken:a().string,hl:a().string,badge:a().oneOf(["bottomright","bottomleft","inline"])},s.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var h=r(9657),d=r.n(h),u=r(8679),p=r.n(u);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}var b={},g=0;var m="onloadcallback";const y=(v=function(){return"https://"+(("undefined"!=typeof window&&window.recaptchaOptions||{}).useRecaptchaNet?"recaptcha.net":"www.google.com")+"/recaptcha/api.js?onload="+m+"&render=explicit"},w=(w={callbackName:m,globalName:"grecaptcha"})||{},function(e){var t=e.displayName||e.name||"Component",r=function(t){var r,o;function l(e,r){var n;return(n=t.call(this,e,r)||this).state={},n.__scriptURL="",n}o=t,(r=l).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var a=l.prototype;return a.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+g++),this.__scriptLoaderID},a.setupScriptURL=function(){return this.__scriptURL="function"==typeof v?v():v,this.__scriptURL},a.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},a.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=b[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var t in e.observers)e.observers[t](e);delete window[w.callbackName]},a.componentDidMount=function(){var e=this,t=this.setupScriptURL(),r=this.asyncScriptLoaderGetScriptLoaderID(),n=w,o=n.globalName,l=n.callbackName,a=n.scriptId;if(o&&void 0!==window[o]&&(b[t]={loaded:!0,observers:{}}),b[t]){var i=b[t];return i&&(i.loaded||i.errored)?void this.asyncScriptLoaderHandleLoad(i):void(i.observers[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var c={};c[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)},b[t]={loaded:!1,observers:c};var s=document.createElement("script");for(var h in s.src=t,s.async=!0,w.attributes)s.setAttribute(h,w.attributes[h]);a&&(s.id=a);var d=function(e){if(b[t]){var r=b[t].observers;for(var n in r)e(r[n])&&delete r[n]}};l&&"undefined"!=typeof window&&(window[l]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),s.onload=function(){var e=b[t];e&&(e.loaded=!0,d((function(t){return!l&&(t(e),!0)})))},s.onerror=function(){var e=b[t];e&&(e.errored=!0,d((function(t){return t(e),!0})))},document.body.appendChild(s)},a.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===w.removeOnUnmount)for(var t=document.getElementsByTagName("script"),r=0;r<t.length;r+=1)t[r].src.indexOf(e)>-1&&t[r].parentNode&&t[r].parentNode.removeChild(t[r]);var n=b[e];n&&(delete n.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===w.removeOnUnmount&&delete b[e])},a.render=function(){var t=w.globalName,r=this.props,o=(r.asyncScriptOnLoad,r.forwardedRef),l=function(e,t){if(null==e)return{};var r,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(r,["asyncScriptOnLoad","forwardedRef"]);return t&&"undefined"!=typeof window&&(l[t]=void 0!==window[t]?window[t]:void 0),l.ref=o,(0,n.createElement)(e,l)},l}(n.Component),o=(0,n.forwardRef)((function(e,t){return(0,n.createElement)(r,f({},e,{forwardedRef:t}))}));return o.displayName="AsyncScriptLoader("+t+")",o.propTypes={asyncScriptOnLoad:d().func},p()(o,e)})(s);var v,w;const _=y},93485:(e,t,r)=>{"use strict";var n=r(34072);function o(){}function l(){}l.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,l,a){if(a!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:o};return r.PropTypes=r,r}},99860:(e,t,r)=>{e.exports=r(93485)()},34072:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
|