tocco-admin 3.17.1 → 3.17.3

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.
Files changed (50) hide show
  1. package/changelog.md +8 -0
  2. package/dist/{chunk-11211.c047320bb9aeb6a8afa8.js → chunk-11211.15bcc7090ca53b85da8b.js} +1 -1
  3. package/dist/chunk-15006.39f94a50697be97c9831.js +1 -0
  4. package/dist/chunk-19592.992b24f067a5c0f12a8e.js +1 -0
  5. package/dist/chunk-26528.ef4788bc998faa3f54ca.js +1 -0
  6. package/dist/chunk-27136.2c36f3c77a56b86f416d.js +1 -0
  7. package/dist/chunk-33050.a411588c6eae538a9624.js +1 -0
  8. package/dist/chunk-46187.ac38acbd848b23a2beb2.js +1 -0
  9. package/dist/chunk-55348.7559537443f168d57582.js +1 -0
  10. package/dist/chunk-57554.5d99bd68211e53130691.js +1 -0
  11. package/dist/chunk-591.b32029fe00edd0338042.js +1 -0
  12. package/dist/chunk-59899.45b9bffbb769ce64c70d.js +1 -0
  13. package/dist/chunk-68389.572b4458a27418cb9092.js +1 -0
  14. package/dist/chunk-71306.cd0060a637da70f30042.js +1 -0
  15. package/dist/chunk-86275.74b17f85b8fd49a09ee7.js +1 -0
  16. package/dist/chunk-92789.292337248336d8d32a47.js +1 -0
  17. package/dist/chunk-9738.25ce05ae72129f1f8d16.js +99 -0
  18. package/dist/chunk-97536.c9cab9653c7754ea895a.js +1 -0
  19. package/dist/chunk-97931.745c6f5a81958916b3f3.js +1 -0
  20. package/dist/chunk-actions.f060ea4f204fdb761090.js +1 -0
  21. package/dist/chunk-admin-login-form.2b47d5a86bc59422e97d.js +1 -0
  22. package/dist/chunk-code-editor.c7d8953d16ef17824643.js +1 -0
  23. package/dist/chunk-docs-actions.ca197551496ae64f6a46.js +1 -0
  24. package/dist/chunk-html-editor.e6715086020fe165b5f3.js +6 -0
  25. package/dist/chunk-vendor-icons.6e198da15aa72bd8f4c8.js +1 -0
  26. package/dist/index.js +59 -24
  27. package/package.json +1 -1
  28. package/dist/chunk-19592.3fbbb588a62f302e36df.js +0 -1
  29. package/dist/chunk-26335.74f8d237b4e65213f5f5.js +0 -1
  30. package/dist/chunk-27136.07f6211e903b210f2114.js +0 -1
  31. package/dist/chunk-33050.04282bf58638bf189d77.js +0 -1
  32. package/dist/chunk-46187.f40be405c4ffae5b9f81.js +0 -1
  33. package/dist/chunk-55348.c0877e03ae7238dd017f.js +0 -1
  34. package/dist/chunk-57554.fc54fb24cb89b0ef72b8.js +0 -1
  35. package/dist/chunk-591.c636e7addfd82e92d48b.js +0 -1
  36. package/dist/chunk-59899.502ceb81fe5a9037788b.js +0 -1
  37. package/dist/chunk-68389.d2bad5bd987cfbdb5c48.js +0 -1
  38. package/dist/chunk-71306.38ce09dd8b496645bd59.js +0 -1
  39. package/dist/chunk-81437.e1b5da1436b4468395d7.js +0 -99
  40. package/dist/chunk-82355.31998cf6c385767da1ae.js +0 -1
  41. package/dist/chunk-86275.fcc90ab73711ebb1c38e.js +0 -1
  42. package/dist/chunk-92789.a864d1fd6e4eb478c7b8.js +0 -1
  43. package/dist/chunk-93405.5993b64c4e3567b4af1a.js +0 -1
  44. package/dist/chunk-97536.409887676b10111e35b7.js +0 -1
  45. package/dist/chunk-actions.07956fdb82a4f1693139.js +0 -1
  46. package/dist/chunk-admin-login-form.bfca06a3747d5138afb1.js +0 -1
  47. package/dist/chunk-code-editor.a9ce0b5dfe5c6224a935.js +0 -1
  48. package/dist/chunk-docs-actions.d48ed6f16092beedeb6a.js +0 -1
  49. package/dist/chunk-html-editor.873095e4468e440c8496.js +0 -6
  50. package/dist/chunk-vendor-icons.0f4a1a80e9743550d640.js +0 -1
@@ -0,0 +1,99 @@
1
+ (this.webpackChunktocco_admin=this.webpackChunktocco_admin||[]).push([[9738],{73916(e,t,n){var r=n(43360),i=n(30641),o=n(15389);e.exports=function(e,t){var n={};return t=o(t,3),i(e,(function(e,i,o){r(n,i,t(e,i,o))})),n}},71764(e,t,n){"use strict";n.d(t,{A:()=>C});var r=n(4883),i=n.n(r),o=n(5556),a=n.n(o),s="undefined"!=typeof window?window:null,l=null===s,c=l?void 0:s.document,u="addEventListener",d="removeEventListener",h="getBoundingClientRect",f="_a",m="_b",p="_c",g="horizontal",v=function(){return!1},y=l?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=c.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",_=function(e){return"string"==typeof e||e instanceof String},S=function(e){if(_(e)){var t=c.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},w=function(e,t,n){var r=e[t];return void 0!==r?r:n},b=function(e,t,n,r){if(t){if("end"===r)return 0;if("center"===r)return e/2}else if(n){if("start"===r)return 0;if("center"===r)return e/2}return e},z=function(e,t){var n=c.createElement("div");return n.className="gutter gutter-"+t,n},R=function(e,t,n){var r={};return _(t)?r[e]=t:r[e]=y+"("+t+"% - "+n+"px)",r},E=function(e,t){var n;return(n={})[e]=t+"px",n};const T=function(e,t){if(void 0===t&&(t={}),l)return{};var n,r,i,o,a,y,_=e;Array.from&&(_=Array.from(_));var T=S(_[0]).parentNode,x=getComputedStyle?getComputedStyle(T):null,O=x?x.flexDirection:null,C=w(t,"sizes")||_.map((function(){return 100/_.length})),L=w(t,"minSize",100),k=Array.isArray(L)?L:_.map((function(){return L})),A=w(t,"maxSize",1/0),M=Array.isArray(A)?A:_.map((function(){return A})),D=w(t,"expandToMin",!1),I=w(t,"gutterSize",10),P=w(t,"gutterAlign","center"),F=w(t,"snapOffset",30),N=Array.isArray(F)?F:_.map((function(){return F})),W=w(t,"dragInterval",1),U=w(t,"direction",g),H=w(t,"cursor",U===g?"col-resize":"row-resize"),j=w(t,"gutter",z),$=w(t,"elementStyle",R),V=w(t,"gutterStyle",E);function B(e,t,r,i){var o=$(n,t,r,i);Object.keys(o).forEach((function(t){e.style[t]=o[t]}))}function q(){return y.map((function(e){return e.size}))}function Y(e){return"touches"in e?e.touches[0][r]:e[r]}function K(e){var t=y[this.a],n=y[this.b],r=t.size+n.size;t.size=e/this.size*r,n.size=r-e/this.size*r,B(t.element,t.size,this[m],t.i),B(n.element,n.size,this[p],n.i)}function G(e){var n,r=y[this.a],i=y[this.b];this.dragging&&(n=Y(e)-this.start+(this[m]-this.dragOffset),W>1&&(n=Math.round(n/W)*W),n<=r.minSize+r.snapOffset+this[m]?n=r.minSize+this[m]:n>=this.size-(i.minSize+i.snapOffset+this[p])&&(n=this.size-(i.minSize+this[p])),n>=r.maxSize-r.snapOffset+this[m]?n=r.maxSize+this[m]:n<=this.size-(i.maxSize-i.snapOffset+this[p])&&(n=this.size-(i.maxSize+this[p])),K.call(this,n),w(t,"onDrag",v)(q()))}function Z(){var e=y[this.a].element,t=y[this.b].element,r=e[h](),a=t[h]();this.size=r[n]+a[n]+this[m]+this[p],this.start=r[i],this.end=r[o]}function J(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var n=e[a];return 0===n?null:n-=U===g?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(T);if(null===t)return e;if(k.reduce((function(e,t){return e+t}),0)>t)return e;var n=0,r=[],i=e.map((function(i,o){var a=t*i/100,s=b(I,0===o,o===e.length-1,P),l=k[o]+s;return a<l?(n+=l-a,r.push(0),l):(r.push(a-l),a)}));return 0===n?e:i.map((function(e,i){var o=e;if(n>0&&r[i]-n>0){var a=Math.min(n,r[i]-n);n-=a,o=e-a}return o/t*100}))}function X(){var e=this,n=y[e.a].element,r=y[e.b].element;e.dragging&&w(t,"onDragEnd",v)(q()),e.dragging=!1,s[d]("mouseup",e.stop),s[d]("touchend",e.stop),s[d]("touchcancel",e.stop),s[d]("mousemove",e.move),s[d]("touchmove",e.move),e.stop=null,e.move=null,n[d]("selectstart",v),n[d]("dragstart",v),r[d]("selectstart",v),r[d]("dragstart",v),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",e.gutter.style.cursor="",e.parent.style.cursor="",c.body.style.cursor=""}function Q(e){if(!("button"in e)||0===e.button){var n=this,r=y[n.a].element,i=y[n.b].element;n.dragging||w(t,"onDragStart",v)(q()),e.preventDefault(),n.dragging=!0,n.move=G.bind(n),n.stop=X.bind(n),s[u]("mouseup",n.stop),s[u]("touchend",n.stop),s[u]("touchcancel",n.stop),s[u]("mousemove",n.move),s[u]("touchmove",n.move),r[u]("selectstart",v),r[u]("dragstart",v),i[u]("selectstart",v),i[u]("dragstart",v),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",i.style.userSelect="none",i.style.webkitUserSelect="none",i.style.MozUserSelect="none",i.style.pointerEvents="none",n.gutter.style.cursor=H,n.parent.style.cursor=H,c.body.style.cursor=H,Z.call(n),n.dragOffset=Y(e)-n.end}}U===g?(n="width",r="clientX",i="left",o="right",a="clientWidth"):"vertical"===U&&(n="height",r="clientY",i="top",o="bottom",a="clientHeight"),C=J(C);var ee=[];function te(e){var t=e.i===ee.length,n=t?ee[e.i-1]:ee[e.i];Z.call(n);var r=t?n.size-e.minSize-n[p]:e.minSize+n[m];K.call(n,r)}return(y=_.map((function(e,t){var r,i={element:S(e),size:C[t],minSize:k[t],maxSize:M[t],snapOffset:N[t],i:t};if(t>0&&((r={a:t-1,b:t,dragging:!1,direction:U,parent:T})[m]=b(I,t-1==0,!1,P),r[p]=b(I,!1,t===_.length-1,P),"row-reverse"===O||"column-reverse"===O)){var o=r.a;r.a=r.b,r.b=o}if(t>0){var a=j(t,U,i.element);!function(e,t,r){var i=V(n,t,r);Object.keys(i).forEach((function(t){e.style[t]=i[t]}))}(a,I,t),r[f]=Q.bind(r),a[u]("mousedown",r[f]),a[u]("touchstart",r[f]),T.insertBefore(a,i.element),r.gutter=a}return B(i.element,i.size,b(I,0===t,t===_.length-1,P),t),t>0&&ee.push(r),i}))).forEach((function(e){var t=e.element[h]()[n];t<e.minSize&&(D?te(e):e.minSize=t)})),{setSizes:function(e){var t=J(e);t.forEach((function(e,n){if(n>0){var r=ee[n-1],i=y[r.a],o=y[r.b];i.size=t[n-1],o.size=e,B(i.element,i.size,r[m],i.i),B(o.element,o.size,r[p],o.i)}}))},getSizes:q,collapse:function(e){te(y[e])},destroy:function(e,t){ee.forEach((function(r){if(!0!==t?r.parent.removeChild(r.gutter):(r.gutter[d]("mousedown",r[f]),r.gutter[d]("touchstart",r[f])),!0!==e){var i=$(n,r.a.size,r[m]);Object.keys(i).forEach((function(e){y[r.a].element.style[e]="",y[r.b].element.style[e]=""}))}}))},parent:T,pairs:ee}};function x(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var O=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){var e=this.props;e.children;var t=e.gutter,n=x(e,["children","gutter"]);n.gutter=function(e,n){var r;return t?r=t(e,n):(r=document.createElement("div")).className="gutter gutter-"+n,r.__isSplitGutter=!0,r},this.split=T(this.parent.children,n)},t.prototype.componentDidUpdate=function(e){var t=this,n=this.props;n.children;var r=n.minSize,i=n.sizes,o=n.collapsed,a=x(n,["children","minSize","sizes","collapsed"]),s=e.minSize,l=e.sizes,c=e.collapsed,u=["maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor"].map((function(n){return t.props[n]!==e[n]})).reduce((function(e,t){return e||t}),!1);if(Array.isArray(r)&&Array.isArray(s)){var d=!1;r.forEach((function(e,t){d=d||e!==s[t]})),u=u||d}else u=!(!Array.isArray(r)&&!Array.isArray(s))||(u||r!==s);if(u)a.minSize=r,a.sizes=i||this.split.getSizes(),this.split.destroy(!0,!0),a.gutter=function(e,t,n){return n.previousSibling},this.split=T(Array.from(this.parent.children).filter((function(e){return!e.__isSplitGutter})),a);else if(i){var h=!1;i.forEach((function(e,t){h=h||e!==l[t]})),h&&this.split.setSizes(this.props.sizes)}Number.isInteger(o)&&(o!==c||u)&&this.split.collapse(o)},t.prototype.componentWillUnmount=function(){this.split.destroy(),delete this.split},t.prototype.render=function(){var e=this,t=this.props;t.sizes,t.minSize,t.maxSize,t.expandToMin,t.gutterSize,t.gutterAlign,t.snapOffset,t.dragInterval,t.direction,t.cursor,t.gutter,t.elementStyle,t.gutterStyle,t.onDrag,t.onDragStart,t.onDragEnd,t.collapsed;var n=t.children,r=x(t,["sizes","minSize","maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor","gutter","elementStyle","gutterStyle","onDrag","onDragStart","onDragEnd","collapsed","children"]);return i().createElement("div",Object.assign({},{ref:function(t){e.parent=t}},r),n)},t}(i().Component);O.propTypes={sizes:a().arrayOf(a().number),minSize:a().oneOfType([a().number,a().arrayOf(a().number)]),maxSize:a().oneOfType([a().number,a().arrayOf(a().number)]),expandToMin:a().bool,gutterSize:a().number,gutterAlign:a().string,snapOffset:a().oneOfType([a().number,a().arrayOf(a().number)]),dragInterval:a().number,direction:a().string,cursor:a().string,gutter:a().func,elementStyle:a().func,gutterStyle:a().func,onDrag:a().func,onDragStart:a().func,onDragEnd:a().func,collapsed:a().number,children:a().arrayOf(a().element)},O.defaultProps={sizes:void 0,minSize:void 0,maxSize:void 0,expandToMin:void 0,gutterSize:void 0,gutterAlign:void 0,snapOffset:void 0,dragInterval:void 0,direction:void 0,cursor:void 0,gutter:void 0,elementStyle:void 0,gutterStyle:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0,collapsed:void 0,children:void 0};const C=O},70713(e,t,n){"use strict";n.d(t,{Ay:()=>h});var r=n(4883);let i;i="undefined"!=typeof window?window:"undefined"!=typeof self?self:n.g;let o=null,a=null;const s=i.clearTimeout,l=i.setTimeout,c=i.cancelAnimationFrame||i.mozCancelAnimationFrame||i.webkitCancelAnimationFrame,u=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame;function d(e){let t,n,r,s,l,c,u;const d="undefined"!=typeof document&&document.attachEvent;if(!d){c=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},l=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},u=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;c(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=a((function(){l(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,i="";r="animationstart";const d="Webkit Moz O ms".split(" ");let h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<d.length;n++)if(void 0!==t.style[d[n]+"AnimationName"]){f=d[n],i="-"+f.toLowerCase()+"-",r=h[n],e=!0;break}}n="resizeanim",t="@"+i+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",s=i+"animation: 1ms "+n+"; "}return{addResizeListener:function(o,a){if(d)o.attachEvent("onresize",a);else{if(!o.__resizeTriggers__){const a=o.ownerDocument,l=i.getComputedStyle(o);l&&"static"===l.position&&(o.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(s||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],o=n.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=r:o.appendChild(n.createTextNode(r)),i.appendChild(o)}}(a),o.__resizeLast__={},o.__resizeListeners__=[],(o.__resizeTriggers__=a.createElement("div")).className="resize-triggers";const d=a.createElement("div");d.className="expand-trigger",d.appendChild(a.createElement("div"));const h=a.createElement("div");h.className="contract-trigger",o.__resizeTriggers__.appendChild(d),o.__resizeTriggers__.appendChild(h),o.appendChild(o.__resizeTriggers__),c(o),o.addEventListener("scroll",u,!0),r&&(o.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&c(o)},o.__resizeTriggers__.addEventListener(r,o.__resizeTriggers__.__animationListener__))}o.__resizeListeners__.push(a)}},removeResizeListener:function(e,t){if(d)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",u,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==c||null==u?(o=s,a=function(e){return l(e,20)}):(o=function([e,t]){c(e),s(t)},a=function(e){const t=u((function(){s(n),e()})),n=l((function(){c(t),e()}),20);return[t,n]});class h extends r.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._didLogDeprecationWarning=!1,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){const r=window.getComputedStyle(this._parentNode)||{},i=parseFloat(r.paddingLeft||"0"),o=parseFloat(r.paddingRight||"0"),a=parseFloat(r.paddingTop||"0"),s=parseFloat(r.paddingBottom||"0"),l=this._parentNode.getBoundingClientRect(),c=l.height-a-s,u=l.width-i-o;if(!e&&this.state.height!==c||!t&&this.state.width!==u){this.setState({height:c,width:u});const e=()=>{this._didLogDeprecationWarning||(this._didLogDeprecationWarning=!0,console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"))};"function"==typeof n&&n({height:c,width:u,get scaledHeight(){return e(),c},get scaledWidth(){return e(),u}})}}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){const{nonce:e}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(null!=t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;const n=t.ownerDocument.defaultView.ResizeObserver;null!=n?(this._resizeObserver=new n((()=>{this._timeoutId=setTimeout(this._onResize,0)})),this._resizeObserver.observe(t)):(this._detectElementResize=d(e),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:i=!1,disableWidth:o=!1,doNotBailOutOnEmptyChildren:a=!1,nonce:s,onResize:l,style:c={},tagName:u="div",...d}=this.props,{height:h,width:f}=this.state,m={overflow:"visible"},p={};let g=!1;return i||(0===h&&(g=!0),m.height=0,p.height=h,p.scaledHeight=h),o||(0===f&&(g=!0),m.width=0,p.width=f,p.scaledWidth=f),a&&(g=!1),(0,r.createElement)(u,{ref:this._setRef,style:{...m,...c},...d},!g&&e(p))}}},92950(e,t,n){"use strict";function r(){return 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},r.apply(this,arguments)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Y1:()=>_});var o=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function a(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||o(r)&&o(i)))return!1;var r,i;return!0}const s=function(e,t){var n;void 0===t&&(t=a);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}};var l=n(4883),c="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function u(e){cancelAnimationFrame(e.id)}function d(e,t){var n=c();var r={id:requestAnimationFrame((function i(){c()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}))};return r}var h=-1;function f(e){if(void 0===e&&(e=!1),-1===h||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),h=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return h}var m=null;function p(e){if(void 0===e&&(e=!1),null===m||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?m="positive-descending":(t.scrollLeft=1,m=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),m}return m}var g=function(e,t){return e};function v(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,a=e.getItemSize,c=e.getOffsetForIndexAndAlignment,h=e.getStartIndexForOffset,m=e.getStopIndexForStartIndex,v=e.initInstanceProps,_=e.shouldResetStyleCacheOnItemSizeChange,S=e.validateProps;return t=function(e){var t,w;function b(t){var r;return(r=e.call(this,t)||this)._instanceProps=v(r.props,i(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:i(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=s((function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})})),r._callOnScroll=void 0,r._callOnScroll=s((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,o=i.direction,s=i.itemSize,l=i.layout,c=r._getItemStyleCache(_&&s,_&&l,_&&o);if(c.hasOwnProperty(e))t=c[e];else{var u=n(r.props,e,r._instanceProps),d=a(r.props,e,r._instanceProps),h="horizontal"===o||"horizontal"===l,f="rtl"===o,m=h?u:0;c[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:u,height:h?"100%":d,width:h?d:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=s((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(p()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState((function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&u(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=d(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}w=e,(t=b).prototype=Object.create(w.prototype),t.prototype.constructor=t,t.__proto__=w,b.getDerivedStateFromProps=function(e,t){return y(e,t),S(e),null};var z=b.prototype;return z.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},z.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var a=0;if(this._outerRef){var s=this._outerRef;a="vertical"===i?s.scrollWidth>s.clientWidth?f():0:s.scrollHeight>s.clientHeight?f():0}this.scrollTo(c(this.props,e,t,o,this._instanceProps,a))},z.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},z.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(p()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},z.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&u(this._resetIsScrollingTimeoutId)},z.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemCount,h=e.itemData,f=e.itemKey,m=void 0===f?g:f,p=e.layout,v=e.outerElementType,y=e.outerTagName,_=e.style,S=e.useIsScrolling,w=e.width,b=this.state.isScrolling,z="horizontal"===i||"horizontal"===p,R=z?this._onScrollHorizontal:this._onScrollVertical,E=this._getRangeToRender(),T=E[0],x=E[1],O=[];if(d>0)for(var C=T;C<=x;C++)O.push((0,l.createElement)(t,{data:h,key:m(C,h),index:C,isScrolling:S?b:void 0,style:this._getItemStyle(C)}));var L=o(this.props,this._instanceProps);return(0,l.createElement)(v||y||"div",{className:n,onScroll:R,ref:this._outerRefSetter,style:r({position:"relative",height:a,width:w,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},_)},(0,l.createElement)(c||u||"div",{children:O,ref:s,style:{height:z?"100%":L,pointerEvents:b?"none":void 0,width:z?L:"100%"}}))},z._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},z._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var s=h(this.props,a,this._instanceProps),l=m(this.props,s,a,this._instanceProps),c=i&&"backward"!==o?1:Math.max(1,n),u=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,s-c),Math.max(0,Math.min(t-1,l+u)),s,l]},b}(l.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var y=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},_=v({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,h="horizontal"===a||"horizontal"===u?d:s,f=Math.max(0,l*c-h),m=Math.min(f,t*c),p=Math.max(0,t*c-h+c+o);switch("smart"===n&&(n=r>=p-h&&r<=m+h?"auto":"center"),n){case"start":return m;case"end":return p;case"center":var g=Math.round(p+(m-p)/2);return g<Math.ceil(h/2)?0:g>f+Math.floor(h/2)?f:g;default:return r>=p&&r<=m?r:r<p?p:m}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,o=e.itemCount,a=e.itemSize,s=e.layout,l=e.width,c=t*a,u="horizontal"===r||"horizontal"===s?l:i,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(o-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}})},29756(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(48648);var i=n(4069);const o=(a=i.A,function(e,t){var n=(0,r.A)(a)(e,t);return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return!n.apply(void 0,[e].concat(r))}});var a},57574(e,t,n){"use strict";n.d(t,{C5:()=>y,qh:()=>_,Ix:()=>S,pg:()=>p,BV:()=>w,bg:()=>f,jC:()=>h});var r=n(30470),i=n(13907),o=n(72582),a=n(12612),s=n(19189),l=n(44581);
2
+ /**
3
+ * react-router v8.4.0
4
+ *
5
+ * Copyright (c) Remix Software Inc.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE.md file in the root directory of this source tree.
9
+ *
10
+ * @license MIT
11
+ */
12
+ const c={};function u(e,t){e||c[t]||(c[t]=!0,console.warn(t))}var d=n(4883);
13
+ /**
14
+ * react-router v8.4.0
15
+ *
16
+ * Copyright (c) Remix Software Inc.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE.md file in the root directory of this source tree.
20
+ *
21
+ * @license MIT
22
+ */
23
+ const h=["HydrateFallback","hydrateFallbackElement"];function f(e,t){return(0,a.aE)({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:(0,r.sC)({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:i.MT,hydrationRouteProperties:h,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,instrumentations:t?.instrumentations}).initialize()}var m=class{status="pending";promise;resolve;reject;constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}};function p({router:e,flushSync:t,onError:n,useTransitions:r}){r=(0,s.OA)()||r;let[o,a]=d.useState(e.state),[l,c]=(0,d.useOptimistic)(o),[h,f]=d.useState(),[p,y]=d.useState({isTransitioning:!1}),[_,w]=d.useState(),[b,z]=d.useState(),[R,E]=d.useState(),T=d.useRef(new Map),x=d.useCallback(((o,{deletedFetchers:s,newErrors:l,flushSync:h,viewTransitionOpts:m})=>{l&&n&&Object.values(l).forEach((e=>n(e,{location:o.location,params:o.matches[0]?.params??{},pattern:(0,i.gU)(o.matches)}))),o.fetchers.forEach(((e,t)=>{void 0!==e.data&&T.current.set(t,e.data)})),s.forEach((e=>T.current.delete(e))),u(!1===h||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let p=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(u(null==m||p,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),m&&p){if(t&&h){t((()=>{b&&(_?.resolve(),b.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:m.currentLocation,nextLocation:m.nextLocation})}));let n=e.window.document.startViewTransition((()=>{t((()=>a(o)))}));return n.finished.finally((()=>{t((()=>{w(void 0),z(void 0),f(void 0),y({isTransitioning:!1})}))})),void t((()=>z(n)))}b?(_?.resolve(),b.skipTransition(),E({state:o,currentLocation:m.currentLocation,nextLocation:m.nextLocation})):(f(o),y({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}))}else t&&h?t((()=>a(o))):!1===r?a(o):d.startTransition((()=>{!0===r&&c((e=>g(e,o))),a(o)}))}),[e.window,t,b,_,r,c,n]);d.useLayoutEffect((()=>e.subscribe(x)),[e,x]),d.useEffect((()=>{p.isTransitioning&&!p.flushSync&&w(new m)}),[p]),d.useEffect((()=>{if(_&&h&&e.window){let t=h,n=_.promise,i=e.window.document.startViewTransition((async()=>{!1===r?a(t):d.startTransition((()=>{!0===r&&c((e=>g(e,t))),a(t)})),await n}));i.finished.finally((()=>{w(void 0),z(void 0),f(void 0),y({isTransitioning:!1})})),z(i)}}),[h,_,e.window,r,c]),d.useEffect((()=>{_&&h&&l.location.key===h.location.key&&_.resolve()}),[_,b,l.location,h]),d.useEffect((()=>{!p.isTransitioning&&R&&(f(R.state),y({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}),E(void 0))}),[p.isTransitioning,R]);let O=d.useMemo((()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})})),[e]),C=e.basename||"/",L=d.useMemo((()=>({router:e,navigator:O,static:!1,basename:C,onError:n})),[e,O,C,n]),k=d.useMemo((()=>({historyAction:l.historyAction,location:l.location,matches:l.matches,initialized:l.initialized,renderFallback:l.renderFallback,restoreScrollPosition:l.restoreScrollPosition,preventScrollReset:l.preventScrollReset,blockers:l.blockers})),[l.historyAction,l.location,l.matches,l.initialized,l.renderFallback,l.restoreScrollPosition,l.preventScrollReset,l.blockers]),A=d.useMemo((()=>({navigation:l.navigation,revalidation:l.revalidation})),[l.navigation,l.revalidation]),M=d.useMemo((()=>({loaderData:l.loaderData,actionData:l.actionData,errors:l.errors})),[l.loaderData,l.actionData,l.errors]),D=d.useMemo((()=>({fetchers:l.fetchers,fetcherData:T.current})),[l.fetchers]);return d.createElement(d.Fragment,null,d.createElement(s.hf.Provider,{value:L},d.createElement(s.ay.Provider,{value:k},d.createElement(s.Fw.Provider,{value:A},d.createElement(s.nW.Provider,{value:M},d.createElement(s.QH.Provider,{value:D},d.createElement(s.KZ.Provider,{value:p},d.createElement(S,{basename:C,location:l.location,navigationType:l.historyAction,navigator:O,useTransitions:r},d.createElement(v,{routes:e.routes,manifest:e.manifest,state:l,isStatic:!1,onError:n})))))))),null)}function g(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}const v=d.memo((function({routes:e,manifest:t,state:n,isStatic:i,onError:o}){let a=d.useContext(s.hf);return(0,r.V1)(a,"You must render this element inside a <DataRouterContext.Provider> element"),(0,l.uG)(e,void 0,{router:a.router,manifest:t,state:n,isStatic:i,onError:o})}));function y({to:e,replace:t,state:n,relative:a}){(0,r.V1)((0,l.Ri)(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c,navigator:u}=d.useContext(s._3);(0,r.$e)(!c,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:h}=d.useContext(s.Pl),{pathname:f}=(0,l.zy)(),m=(0,l.Zp)(),p=(0,i.Gh)(e,(0,i.PD)(h),f,"path"===a);(0,o.c)("string"==typeof e?e:(0,r.AO)(e),u.createHref(p),(0,o.Y)(u),"reject");let g=JSON.stringify(p);return d.useEffect((()=>{m(JSON.parse(g),{replace:t,state:n,relative:a})}),[m,g,a,t,n]),null}function _(e){(0,r.V1)(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function S({basename:e="/",children:t=null,location:n,navigationType:o="POP",navigator:a,static:c=!1,useTransitions:u}){(0,r.V1)(!(0,l.Ri)(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=e.replace(/^\/*/,"/"),f=d.useMemo((()=>({basename:h,navigator:a,static:c,useTransitions:u,future:{}})),[h,a,c,u]);"string"==typeof n&&(n=(0,r.Rr)(n));let{pathname:m="/",search:p="",hash:g="",state:v=null,key:y="default",mask:_}=n,S=d.useMemo((()=>{let e=(0,i.pb)(m,h);return null==e?null:{location:{pathname:e,search:p,hash:g,state:v,key:y,mask:_},navigationType:o}}),[h,m,p,g,v,y,o,_]);return(0,r.$e)(null!=S,`<Router basename="${h}"> is not able to match the URL "${m}${p}${g}" because it does not start with the basename, so the <Router> won't render anything.`),null==S?null:d.createElement(s._3.Provider,{value:f},d.createElement(s.di.Provider,{children:t,value:S}))}function w({children:e,location:t}){return(0,l.Ye)(b(e),t)}d.Component;function b(e,t=[]){let n=[];return d.Children.forEach(e,((e,i)=>{if(!d.isValidElement(e))return;let o=[...t,i];if(e.type===d.Fragment)return void n.push.apply(n,b(e.props.children,o));(0,r.V1)(e.type===_,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;(0,r.V1)(!a.index||!a.children,"An index route cannot have child routes.");let s={id:a.id||o.join("-"),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(s.children=b(a.children,o)),n.push(s)})),n}},42422(e,t,n){"use strict";n.d(t,{p:()=>a});var r=n(4883),i=n(81845),o=n(57574);
24
+ /**
25
+ * react-router v8.4.0
26
+ *
27
+ * Copyright (c) Remix Software Inc.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE.md file in the root directory of this source tree.
31
+ *
32
+ * @license MIT
33
+ */
34
+ function a(e){return r.createElement(o.pg,{flushSync:i.flushSync,...e})}},71581(e,t,n){"use strict";n.d(t,{N_:()=>F,Ys:()=>M,Ge:()=>D,ok:()=>W});var r=n(43411),i=n(30470),o=n(13907),a=n(12612),s=n(19189),l=n(44581),c=n(57574);
35
+ /**
36
+ * react-router v8.4.0
37
+ *
38
+ * Copyright (c) Remix Software Inc.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE.md file in the root directory of this source tree.
42
+ *
43
+ * @license MIT
44
+ */
45
+ const u="application/x-www-form-urlencoded";function d(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function h(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}let f=null;const m=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function p(e){return null==e||m.has(e)?e:((0,i.$e)(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${u}"`),null)}function g(e,t){let n,r,i,a,s;if(d(l=e)&&"form"===l.tagName.toLowerCase()){let s=e.getAttribute("action");r=s?(0,o.pb)(s,t):null,n=e.getAttribute("method")||"get",i=p(e.getAttribute("enctype"))||u,a=new FormData(e)}else if(function(e){return d(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return d(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let s=e.form;if(null==s)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(r=l?(0,o.pb)(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||"get",i=p(e.getAttribute("formenctype"))||p(s.getAttribute("enctype"))||u,a=new FormData(s,e),!function(){if(null===f)try{new FormData(document.createElement("form"),0),f=!1}catch{f=!0}return f}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}else t&&a.append(t,r)}}else{if(d(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n="get",r=null,i=u,s=e}var l;return a&&"text/plain"===i&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:s}}function v(e){return null!=e&&"string"==typeof e.page}function y(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function _(e,t,n){return b((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=
46
+ /**
47
+ * react-router v8.4.0
48
+ *
49
+ * Copyright (c) Remix Software Inc.
50
+ *
51
+ * This source code is licensed under the MIT license found in the
52
+ * LICENSE.md file in the root directory of this source tree.
53
+ *
54
+ * @license MIT
55
+ */await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(y).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}function S(e,t,n,r,i,o){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter(((e,t)=>a(e,t)||s(e,t))):"data"===o?t.filter(((t,o)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0})):[]}function w(e,t,{includeHydrateFallback:n}={}){return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i})).flat(1),[...new Set(r)];var r}function b(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,i)=>{if(t&&!v(i)&&"script"===i.as&&i.href&&r.has(i.href))return e;let o=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(i));return n.has(o)||(n.add(o),e.push({key:o,link:i})),e}),[])}var z=n(4883);
56
+ /**
57
+ * react-router v8.4.0
58
+ *
59
+ * Copyright (c) Remix Software Inc.
60
+ *
61
+ * This source code is licensed under the MIT license found in the
62
+ * LICENSE.md file in the root directory of this source tree.
63
+ *
64
+ * @license MIT
65
+ */
66
+ Symbol("SingleFetchRedirect");new Set([100,101,204,205]);function R(e,t){let n="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}
67
+ /**
68
+ * react-router v8.4.0
69
+ *
70
+ * Copyright (c) Remix Software Inc.
71
+ *
72
+ * This source code is licensed under the MIT license found in the
73
+ * LICENSE.md file in the root directory of this source tree.
74
+ *
75
+ * @license MIT
76
+ */
77
+ const E=z.createContext(void 0);function T(){let e=z.useContext(E);
78
+ /**
79
+ * react-router v8.4.0
80
+ *
81
+ * Copyright (c) Remix Software Inc.
82
+ *
83
+ * This source code is licensed under the MIT license found in the
84
+ * LICENSE.md file in the root directory of this source tree.
85
+ *
86
+ * @license MIT
87
+ */
88
+ return function(e,t){if(!1===e||null==e)throw new Error(t)}(e,"You must render this element inside a <HydratedRouter> element"),e}function x(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}E.displayName="FrameworkContext";function O({page:e,...t}){let n=(0,s.OA)(),{nonce:r}=T(),{router:i}=(0,l.ek)("PrefetchPageLinks"),o=z.useMemo((()=>i.match(e)),[i,i.routes,e]);return o?(null==t.nonce&&r&&(t={...t,nonce:r}),n?z.createElement(C,{page:e,matches:o,...t}):z.createElement(L,{page:e,matches:o,...t})):null}function C({page:e,matches:t,...n}){let r=(0,l.zy)(),i=z.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=R(e,"rsc"),i=!1,o=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?i=!0:o.push(e.route.id);return i&&o.length>0&&n.searchParams.set("_routes",o.join(",")),[n.pathname+n.search]}),[e,r,t]);return z.createElement(z.Fragment,null,i.map((e=>z.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))))}function L({page:e,matches:t,...n}){let r=(0,l.zy)(),{manifest:i,routeModules:o}=T(),{matches:a}=(0,l.CB)("PrefetchPageLinks"),{loaderData:s}=(0,l.hg)("PrefetchPageLinks"),c=z.useMemo((()=>S(e,t,a,i,r,"data")),[e,t,a,i,r]),u=z.useMemo((()=>S(e,t,a,i,r,"assets")),[e,t,a,i,r]),d=z.useMemo((()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,a=!1;if(t.forEach((e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some((t=>t.route.id===e.route.id))&&e.route.id in s&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?a=!0:n.add(e.route.id))})),0===n.size)return[];let l=R(e,"data");return a&&n.size>0&&l.searchParams.set("_routes",t.filter((e=>n.has(e.route.id))).map((e=>e.route.id)).join(",")),[l.pathname+l.search]}),[s,r,i,c,t,e,o]),h=z.useMemo((()=>w(u,i)),[u,i]),f=function(e){let{manifest:t,routeModules:n}=T(),[r,i]=z.useState([]);return z.useEffect((()=>{let r=!1;return _(e,t,n).then((e=>{r||i(e)})),()=>{r=!0}}),[e,t,n]),r}(u);return z.createElement(z.Fragment,null,d.map((e=>z.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n}))),h.map((e=>z.createElement("link",{key:e,rel:"modulepreload",href:e,...n}))),f.map((({key:e,link:t})=>z.createElement("link",{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin}))))}function k(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}
89
+ /**
90
+ * react-router v8.4.0
91
+ *
92
+ * Copyright (c) Remix Software Inc.
93
+ *
94
+ * This source code is licensed under the MIT license found in the
95
+ * LICENSE.md file in the root directory of this source tree.
96
+ *
97
+ * @license MIT
98
+ */
99
+ const A="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{A&&(window.__reactRouterVersion="8")}catch{}function M(e,t){return(0,a.aE)({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:(0,i.zR)({window:t?.window}),hydrationData:t?.hydrationData||I(),routes:e,mapRouteProperties:o.MT,hydrationRouteProperties:c.jC,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function D(e,t){return(0,a.aE)({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:(0,i.TM)({window:t?.window}),hydrationData:t?.hydrationData||I(),routes:e,mapRouteProperties:o.MT,hydrationRouteProperties:c.jC,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function I(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:P(e.errors)}),e}function P(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&"RouteErrorResponse"===r.__type)n[e]=new o.cj(r.status,r.statusText,r.data,!0===r.internal);else if(r&&"Error"===r.__type){if("string"==typeof r.__subType&&o.WF.includes(r.__subType)){let t=window[r.__subType];if("function"==typeof t)try{let i=new t(r.message);i.stack="",n[e]=i}catch{}}if(null==n[e]){let t=new Error(r.message);t.stack="",n[e]=t}}else n[e]=r;return n}const F=z.forwardRef((function({onClick:e,discover:t="render",prefetch:n="none",relative:a,reloadDocument:c,replace:u,mask:d,state:h,target:f,to:m,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:v,...y},_){let{basename:S,navigator:w,useTransitions:b}=z.useContext(s._3),R="string"==typeof m&&r.E6.test(m),T=(0,o.X9)(m,S);m=T.to;let C=(0,l.$P)(m,{relative:a}),L=(0,l.zy)(),A=null;if(d){let e=(0,o.Gh)(d,[],L.mask?L.mask.pathname:"/",!0);"/"!==S&&(e.pathname="/"===e.pathname?S:(0,o.HS)([S,e.pathname])),A=w.createHref(e)}let[M,D,I]=function(e,t){let n=z.useContext(E),[r,i]=z.useState(!1),[o,a]=z.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,h=z.useRef(null);z.useEffect((()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{a(e.isIntersecting)}))}),{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}}),[e]),z.useEffect((()=>{if(r){let e=setTimeout((()=>{a(!0)}),100);return()=>{clearTimeout(e)}}}),[r]);let f=()=>{i(!0)},m=()=>{i(!1),a(!1)};return n?"intent"!==e?[o,h,{}]:[o,h,{onFocus:x(s,f),onBlur:x(l,m),onMouseEnter:x(c,f),onMouseLeave:x(u,m),onTouchStart:x(d,f)}]:[!1,h,{}]}(n,y),P=function(e,{target:t,replace:n,mask:r,state:o,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:u,useTransitions:d}={}){let h=(0,l.Zp)(),f=(0,l.zy)(),m=(0,l.x$)(e,{relative:s});return z.useCallback((l=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(l,t)){l.preventDefault();let t=void 0!==n?n:(0,i.AO)(f)===(0,i.AO)(m),p=()=>h(e,{replace:t,mask:r,state:o,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:u});d?z.startTransition((()=>p())):p()}}),[f,h,m,n,r,o,t,e,a,s,c,u,d])}(m,{replace:u,mask:d,state:h,target:f,preventScrollReset:p,relative:a,viewTransition:g,defaultShouldRevalidate:v,useTransitions:b});let F=!(T.isExternal||c),N=z.createElement("a",{...y,...I,href:(F?A:void 0)||T.absoluteURL||C,onClick:F?function(t){e&&e(t),t.defaultPrevented||P(t)}:e,ref:k(_,D),target:f,"data-discover":R||"render"!==t?void 0:"true"});return M&&!R?z.createElement(z.Fragment,null,N,z.createElement(O,{page:C})):N}));F.displayName="Link";z.forwardRef((function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:a,to:c,viewTransition:u,children:d,...h},f){let m=(0,l.x$)(c,{relative:h.relative}),p=(0,l.zy)(),g=z.useContext(s.Fw),{navigator:v,basename:y}=z.useContext(s._3),_=null!=g&&function(e,{relative:t}={}){let n=z.useContext(s.KZ);(0,i.V1)(null!=n,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=(0,l.ek)("useViewTransitionState"),a=(0,l.x$)(e,{relative:t});if(!n.isTransitioning)return!1;let c=(0,o.pb)(n.currentLocation.pathname,r)||n.currentLocation.pathname,u=(0,o.pb)(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=(0,o.B6)(a.pathname,u)||null!=(0,o.B6)(a.pathname,c)}(m)&&!0===u,S=v.encodeLocation?v.encodeLocation(m).pathname:m.pathname,w=p.pathname,b=g?.navigation.location?g.navigation.location.pathname:null;t||(w=w.toLowerCase(),b=b?b.toLowerCase():null,S=S.toLowerCase()),b&&y&&(b=(0,o.pb)(b,y)||b);const R="/"!==S&&S.endsWith("/")?S.length-1:S.length;let E,T=w===S||!r&&w.startsWith(S)&&"/"===w.charAt(R),x=null!=b&&(b===S||!r&&b.startsWith(S)&&"/"===b.charAt(R)),O={isActive:T,isPending:x,isTransitioning:_},C=T?e:void 0;E="function"==typeof n?n(O):[n,T?"active":null,x?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let L="function"==typeof a?a(O):a;return z.createElement(F,{...h,"aria-current":C,className:E,ref:f,style:L,to:c,viewTransition:u},"function"==typeof d?d(O):d)})).displayName="NavLink";const N=z.forwardRef((({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:c,state:u,method:d="get",action:h,onSubmit:f,relative:m,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:v,...y},_)=>{let{useTransitions:S}=z.useContext(s._3),w=H(),b=function(e,{relative:t}={}){let{basename:n}=z.useContext(s._3),r=z.useContext(s.Pl);(0,i.V1)(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),c={...(0,l.x$)(e||".",{relative:t})},u=(0,l.zy)();if(null==e){c.search=u.search;let e=new URLSearchParams(c.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();c.search=n?`?${n}`:""}}e&&"."!==e||!a.route.index||(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(c.pathname="/"===c.pathname?n:(0,o.HS)([n,c.pathname]));return(0,i.AO)(c)}(h,{relative:m}),R="get"===d.toLowerCase()?"get":"post",E="string"==typeof h&&r.E6.test(h);return z.createElement("form",{ref:_,method:R,action:b,onSubmit:a?f:e=>{if(f&&f(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute("formmethod")||d,o=()=>w(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:c,state:u,relative:m,preventScrollReset:p,viewTransition:g,defaultShouldRevalidate:v});S&&!1!==n?z.startTransition((()=>o())):o()},...y,"data-discover":E||"render"!==e?void 0:"true"})}));function W(e){(0,i.$e)("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=z.useRef(h(e)),n=z.useRef(!1),r=(0,l.zy)(),o=z.useMemo((()=>function(e,t){let n=h(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(r.search,n.current?null:t.current)),[r.search]),a=(0,l.Zp)();return[o,z.useCallback(((e,t)=>{const r=h("function"==typeof e?e(new URLSearchParams(o)):e);n.current=!0,a("?"+r,t)}),[a,o])]}N.displayName="Form";let U=0;function H(){let{router:e}=(0,l.ek)("useSubmit"),{basename:t}=z.useContext(s._3),n=(0,l.nq)("useSubmit"),r=e.fetch,i=e.navigate;return z.useCallback((async(e,o={})=>{let{action:a,method:s,encType:l,formData:c,body:u}=g(e,t);!1===o.navigate?await r(o.fetcherKey||`__${String(++U)}__`,n,o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,relative:o.relative,formData:c,body:u,formMethod:o.method||s,formEncType:o.encType||l,flushSync:o.flushSync}):await i(o.action||a,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,relative:o.relative,formData:c,body:u,formMethod:o.method||s,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})}),[r,i,t,n])}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunktocco_admin=this.webpackChunktocco_admin||[]).push([[97536],{97536(e,r,n){n.r(r),n.d(r,{default:()=>_r});var t=n(71468),o=n(26396),a=n.n(o),l=n(66590),i=n(9871),s=n(6730),c=n(59499),d=n(12199),u=n(27772),f=n(36949),p=n(57574),m="formModelBrowser/INIT",y="formModelBrowser/SET_INIT",v="formModelBrowser/SET_SEARCH_VALUE",g="formModelBrowser/SET_SEARCH_LIST",b="formModelBrowser/SET_SELECTED_FORM",h="formModelBrowser/SET_LOCALES",x="formModelBrowser/SET_FORM_MODEL_DATA",w="formModelBrowser/CLEAR_FORM_MODEL_DATA",j="formModelBrowser/TOGGLE_COLLAPSED",A="formModelBrowser/ADD_ITEM_CHILDREN",M="formModelBrowser/SET_FORM_LOADING",C="formModelBrowser/SET_FORM_MODEL_ERROR",O="formModelBrowser/SET_INITIALIZATION_ERROR",D="formModelBrowser/CLEAR_ERRORS",_=function(e){return{type:b,payload:{selectedForm:e}}},S=function(e,r){return{type:x,payload:{formModel:e,formModelData:r}}},k=function(){return{type:M,payload:{isLoading:!(arguments.length>0&&void 0!==arguments[0])||arguments[0]}}},T=n(22056),E=n.n(T),R=n(4883),L=n(87046),P=n(44581),I=n(88208),B=n(144),N=n(38978),F=n(15115),z=n(7946),J=n(44989),W=n(21259),H=n.n(W),q=n(73615),G=n(74848),K=function(e,r){var n=r.formatMessage({id:"client.form-model-browser"});return[{display:n,title:n,path:"fm",type:null,clickable:!0}].concat(H()(e?[{display:e,title:e,path:"fm/".concat(e),type:null,clickable:!0}]:[]))};const V=function(e){var r=e.selectedForm,n=(0,L.tz)();return(0,G.jsx)(q.A,{updateDocumentTitle:!0,breadcrumbsInfo:K(r,n),showToccoHome:!0})};const Z=(0,t.Ng)((function(e){return{selectedForm:e.formModelBrowser.selectedForm}}))(V);var Q=n(97481),U=n(40559),X=n(38210),Y=n(56375),$=function(e){var r=e.value;return(0,G.jsx)(Y.Ay.Span,{breakWords:!1,children:r})},ee=function(e){var r=e.rowData;return(0,G.jsx)($,{value:r.name})},re=function(e){var r=e.rowData;return(0,G.jsx)($,{value:r.label})};const ne=function(e){var r=function(r){return e.formatMessage({id:r})};return[{idx:0,id:"name",sorting:{sortable:!1},label:e.formatMessage({id:r("client.actions.form-model-browser.name")}),alignment:"left",CellRenderer:ee},{idx:1,id:"label",sorting:{sortable:!1},label:e.formatMessage({id:r("client.actions.form-model-browser.entity")}),alignment:"left",CellRenderer:re}]};var te,oe,ae,le=n(72189),ie=n.n(le),se=n(51510),ce=n(47616),de=n(26166),ue=n(17819),fe=se.Ay.div.withConfig({displayName:"Box"})(te||(te=ie()(["\n background-color: ",";\n position: relative;\n height: calc(100% - 43px);\n display: grid;\n grid-template-rows: auto 1fr;\n\n &:first-of-type {\n z-index: 2; /* higher than StyledTether to prevent cover on scroll */\n }\n"])),ce.A.color("paper")),pe=se.Ay.div.withConfig({displayName:"StyledSearchWrapper"})(oe||(oe=ie()(["\n padding: "," "," 0 ",";\n"])),de.A.space(-1.1),de.A.space(-.375),de.A.space(-1.1)),me=se.Ay.div.withConfig({displayName:"StyledTableWrapper"})(ae||(ae=ie()(["\n width: 100%;\n height: 100%;\n overflow: auto;\n\n "," {\n overflow-x: hidden;\n }\n"])),ue.dm);const ye=function(e){var r=e.searchList,n=e.setSelectedForm,t=(0,R.useState)(!1),o=E()(t,2),a=o[0],l=o[1],i=(0,R.useState)(),s=E()(i,2),c=s[0],d=s[1],u=(0,R.useState)(r),f=E()(u,2),p=f[0],m=f[1],y=X.A.useDebounce(c,300),v=E()(y,1)[0],g=(0,L.tz)(),b=(0,R.useCallback)((function(e){return g.formatMessage({id:e})}),[g]),h=(0,P.Zp)(),x=(0,R.useMemo)((function(){return ne(g)}),[g]);(0,R.useEffect)((function(){if(l(!0),v&&""!==v.trim()){var e=v.toLowerCase().trim();m(r.filter((function(r){var n,t,o=(null===(n=r.name)||void 0===n?void 0:n.toLowerCase())||"",a=(null===(t=r.label)||void 0===t?void 0:t.toLowerCase())||"";return"".concat(o," ").concat(a).trim().includes(e)})))}else m(r);l(!1)}),[r,v]);var w=(0,R.useCallback)((function(e){n(e),h("/fm/".concat(e))}),[h,n]);return(0,G.jsxs)(fe,{children:[(0,G.jsx)(pe,{children:(0,G.jsx)(Q.A,{value:c,onSearch:d,placeholder:b("client.form-model-browser.searchField"),"aria-label":b("client.form-model-browser.searchField")})}),(0,G.jsx)(me,{children:(0,G.jsx)(U.A,{dataLoadingInProgress:a,columns:x,data:p,selectionStyle:"none",scrollBehavior:"inline",clickable:!0,onRowClick:w,onColumnPositionChange:function(){}})})]})};var ve={setFormLoading:k,setSelectedForm:_};const ge=(0,t.Ng)((function(e){return{pathPrefix:e.input.pathPrefix,searchList:e.formModelBrowser.searchList}}),ve)(ye);var be=n(48235),he=n(64116),xe=n(92207),we=n.n(xe),je=n(69917),Ae=n(93750);function Me(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Ce(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Me(Object(n),!0).forEach((function(r){a()(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var Oe=we().mark(Se),De=we().mark(Le),_e=function(e){return e.formModelBrowser};function Se(){return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,je.Q7)([(0,je.jP)(m,ke),(0,je.p8)(b,Te)]);case 1:case"end":return e.stop()}}),Oe)}function ke(e){var r=e.payload.formModel;return we().mark((function e(){var n,t,o;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,(0,je.T1)(Ae.A.requestSaga,"/formmodel/getAll",{method:"GET"});case 1:if(null!=(n=e.sent)&&n.body){e.next=2;break}throw new Error("No form models received from API");case 2:return t=n.body.map((function(e){return Ce(Ce({},e),{},{__key:e.name})})),e.next=3,(0,je.yJ)({type:g,payload:{searchList:t}});case 3:if(!r){e.next=5;break}return e.next=4,(0,je.yJ)(_(r));case 4:e.next=6;break;case 5:return e.next=6,(0,je.yJ)(_(null));case 6:return e.next=7,(0,je.yJ)({type:y,payload:{initialized:!0}});case 7:e.next=9;break;case 8:return e.prev=8,o=e.catch(0),e.next=9,(0,je.yJ)((a=o.message||"Failed to initialize form model browser",{type:O,payload:{error:a}}));case 9:case"end":return e.stop()}var a}),e,null,[[0,8]])}))()}function Te(e){var r=e.payload.selectedForm;return we().mark((function e(){var n,t;return we().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,(0,je.yJ)(k(!0));case 1:if(r){e.next=3;break}return e.next=2,(0,je.yJ)({type:w});case 2:case 5:return e.abrupt("return");case 3:return e.next=4,(0,je.Lt)(_e);case 4:if(n=e.sent,!(t=n.loadedModels[r])){e.next=6;break}return t[0].isCollapsed=!0,e.next=5,(0,je.yJ)(S(r,t));case 6:return e.next=7,(0,je.T1)(Le,r);case 7:case"end":return e.stop()}}),e)}))()}var Ee="__",Re=function(e){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").concat(e.id);return(null===(r=e.children)||void 0===r?void 0:r.length)>0?Ce(Ce({},e),{},{__key:t,isCollapsed:n,children:e.children.map((function(e){return Re(e,"".concat(t).concat(Ee),!0)}))}):Ce(Ce({},e),{},{__key:t,children:[]})};function Le(e){var r,n,t;return we().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=1,(0,je.T1)(Ae.A.requestSaga,"/formmodel/getFormModelDetail/".concat(e),{method:"GET"});case 1:if(null==(r=o.sent)||!r.body){o.next=2;break}return n=r.body.map((function(e){return Re(e)})),o.next=2,(0,je.yJ)(S(e,n.reduce((function(e,r){return[].concat(H()(e),[r],H()(r.children||[]))}),[])));case 2:o.next=4;break;case 3:return o.prev=3,t=o.catch(0),o.next=4,(0,je.yJ)((a=t.message||"Failed to fetch form model",{type:C,payload:{error:a}}));case 4:case"end":return o.stop()}var a}),De,null,[[0,3]])}var Pe,Ie,Be,Ne,Fe,ze,Je,We,He=n(71581),qe=n(57488),Ge=n(85431),Ke=(se.Ay.span.withConfig({displayName:"StyledIconsWrapper"})(Pe||(Pe=ie()(["\n display: flex;\n flex-direction: row-reverse;\n align-items: flex-end;\n"]))),se.Ay.span.withConfig({displayName:"StyledIconWrapper"})(Ie||(Ie=ie()(["\n font-size: ",";\n"])),de.A.font(1)),(0,se.Ay)(He.N_).withConfig({displayName:"StyledLink"})(Be||(Be=ie()(["\n color: ",";\n ","\n"])),qe.t7.color("text"),(0,Ge.A)()),se.Ay.div.withConfig({displayName:"Box"})(Ne||(Ne=ie()(["\n background-color: ",";\n position: relative;\n height: calc(100% - 43px);\n display: grid;\n grid-template-rows: auto 1fr;\n\n &:first-of-type {\n z-index: 2; /* higher than StyledTether to prevent cover on scroll */\n }\n"])),qe.t7.color("paper")),se.Ay.div.withConfig({displayName:"StyledSearchWrapper"})(Fe||(Fe=ie()(["\n padding: "," "," 0 ",";\n"])),de.A.space(-1.1),de.A.space(-.375),de.A.space(-1.1)),se.Ay.div.attrs((function(e){return{"data-has-hover":e.hasHover?"true":"false"}})).withConfig({displayName:"StyledCollapseCellRenderer"})(ze||(ze=ie()(["\n padding: ",";\n border-radius: ",";\n margin: ",";\n\n &:hover {\n cursor: pointer;\n background-color: ",";\n }\n"])),de.A.space(-.5),qe.t7.radii("large"),de.A.space(-2),(function(e){var r=e.hasHover,n=e.theme;return r?n.colors.paper:null}))),Ve=se.Ay.div.withConfig({displayName:"StyledTableWrapper"})(Je||(Je=ie()(["\n height: 100%;\n\n tr:hover {\n ","[data-has-hover='true'] {\n background-color: ",";\n }\n }\n\n "," {\n overflow-x: hidden;\n }\n"])),Ke,(function(e){return e.theme.colors.backgroundCellCollapseHover}),ue.dm),Ze=se.Ay.div.withConfig({displayName:"StyledLevelCellRenderer"})(We||(We=ie()(["\n && {\n text-indent: ","px;\n }\n"])),(function(e){var r=e.level;return Math.max(0,10*r)})),Qe=function(e){var r=e.type,n=e.value,t=be.A.factory("readOnly",r);return(0,G.jsx)(t,{formField:{dataType:r},value:n,mappingType:"list"})},Ue={true:"chevron-down",false:"chevron-up"};const Xe=function(e){var r=e.formModelData,n=e.addItemChildren,t=e.formIsLoading,o=function(e){var r=function(r){return e.formatMessage({id:r})};return[{idx:0,id:"collapse",shrinkToContent:!0,dynamic:!0,sorting:{sortable:!1},label:"",alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Ke,{hasHover:!(void 0===r.isCollapsed),children:void 0===r.isCollapsed?null:(0,G.jsx)(he.A,{icon:Ue[r.isCollapsed]})})}},{idx:1,id:"name",shrinkToContent:!0,sorting:{sortable:!1},label:r("client.actions.form-model-browser.name"),alignment:"left",CellRenderer:function(e){var r=e.rowData,n=r.__key.split(Ee).length-1;return(0,G.jsx)(Ze,{level:n,children:(0,G.jsx)(Qe,{type:"string",value:r.id})})}},{idx:2,id:"label_de",sorting:{sortable:!1},label:r("client.actions.form-model-browser.label_de"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"string",value:r.labelDe||""})}},{idx:3,id:"label_en",sorting:{sortable:!1},label:r("client.actions.form-model-browser.label_en"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"string",value:r.labelEn||""})}},{idx:4,id:"label_fr",sorting:{sortable:!1},label:r("client.actions.form-model-browser.label_fr"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"string",value:r.labelFr||""})}},{idx:5,id:"label_it",sorting:{sortable:!1},label:r("client.actions.form-model-browser.label_it"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"string",value:r.labelIt||""})}},{idx:6,id:"scope",sorting:{sortable:!1},label:r("client.actions.form-model-browser.scope"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"string",value:(r.scopes||[]).join(", ")})}},{idx:7,id:"dataType",sorting:{sortable:!1},label:r("client.actions.form-model-browser.datatype"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"string",value:r.dataType||""})}},{idx:8,id:"mandatory",shrinkToContent:!0,sorting:{sortable:!1},label:r("client.actions.form-model-browser.mandatory"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"boolean",value:r.mandatory||!1})}},{idx:9,id:"readOnly",shrinkToContent:!0,sorting:{sortable:!1},label:r("client.actions.form-model-browser.readonly"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"boolean",value:r.readOnly||!1})}},{idx:10,id:"hidden",shrinkToContent:!0,sorting:{sortable:!1},label:r("client.actions.form-model-browser.hidden"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"boolean",value:r.hidden||!1})}},{idx:11,id:"module",sorting:{sortable:!1},label:r("client.actions.form-model-browser.module"),alignment:"left",CellRenderer:function(e){var r=e.rowData;return(0,G.jsx)(Qe,{type:"string",value:r.module||""})}}]}((0,L.tz)());return(0,G.jsx)(Ve,{children:o&&(0,G.jsx)(U.A,{dataLoadingInProgress:t,columns:o,data:r,selectionStyle:"none",scrollBehavior:"inline",clickable:!0,onRowClick:function(e){n(e)},onColumnPositionChange:function(){}})})};var Ye={toggleCollapsed:function(e){return{type:j,payload:{formModelKey:e}}},addItemChildren:function(e){return{type:A,payload:{formModelKey:e}}}};const $e=(0,t.Ng)((function(e){return{formModelData:e.formModelBrowser.formModelData,formIsLoading:e.formModelBrowser.formIsLoading}}),Ye)(Xe);var er,rr,nr,tr,or=se.Ay.div.withConfig({displayName:"StyledPanelWrapper"})(er||(er=ie()(["\n display: flex;\n height: 100%;\n flex-direction: column;\n"])));const ar=function(e){var r=e.initialize,n=e.initialized,t=(0,L.tz)(),o=(0,R.useState)(!1),a=E()(o,2),i=a[0],s=a[1],c=(0,P.g)();(0,R.useEffect)((function(){n||r(c.formModel)}),[r,c,c.formModel,n]);var d,u={id:"form-model-export",label:(d="client.form-model-browser.export",t.formatMessage({id:d})),icon:"file-export",actionType:"simple",runInBackgroundTask:!1,endpoint:"actions/formModelExport",properties:{model:c.formModel}},f=(0,G.jsx)(l.A.Action,{definition:u,selection:{},disabled:null==c.formModel||""===c.formModel},u.id);return(0,G.jsxs)(I.A,{required:[n],children:[rr||(rr=(0,G.jsx)(Z,{})),(0,G.jsx)(or,{children:(0,G.jsxs)(B.A,{sidepanelPosition:"left",sidepanelCollapsed:i,setSidepanelCollapsed:s,scrollBehaviour:"inline",children:[nr||(nr=(0,G.jsxs)(N.A,{children:[(0,G.jsx)(F.A,{}),(0,G.jsx)(ge,{})]})),(0,G.jsxs)(z.A,{actionBar:!0,children:[(0,G.jsx)(J.E7,{children:f}),tr||(tr=(0,G.jsx)(J.kM,{children:(0,G.jsx)($e,{})}))]})]})})]})};var lr={initialize:function(e){return{type:m,payload:{formModel:e}}}};const ir=(0,t.Ng)((function(e){return{initialized:e.formModelBrowser.initialized}}),lr)(ar);var sr;const cr=function(){return sr||(sr=(0,G.jsxs)(p.BV,{children:[(0,G.jsx)(p.qh,{exact:!0,path:"/",element:(0,G.jsx)(ir,{})}),(0,G.jsx)(p.qh,{exact:!0,path:":formModel",element:(0,G.jsx)(ir,{})})]}))};var dr,ur=n(98671);function fr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function pr(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?fr(Object(n),!0).forEach((function(r){a()(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var mr={initialized:!1,searchValue:"",searchList:[],selectedForm:null,locales:void 0,formModelData:[],loadedModels:{},formIsLoading:!1,error:null,initializationError:null},yr=(dr={},a()(a()(a()(a()(a()(a()(a()(a()(a()(a()(dr,y,ur.A.singleTransferReducer("initialized")),v,ur.A.singleTransferReducer("searchValue")),g,ur.A.singleTransferReducer("searchList")),b,ur.A.singleTransferReducer("selectedForm")),h,ur.A.singleTransferReducer("locales")),x,(function(e,r){var n=r.payload,t=n.formModel,o=n.formModelData;return t&&Array.isArray(o)?pr(pr({},e),{},{formModelData:o,loadedModels:pr(pr({},e.loadedModels),{},a()({},t,o)),formIsLoading:!1,error:null}):pr({},e)})),w,(function(e){return pr(pr({},e),{},{formModelData:[],formIsLoading:!1,error:null})})),j,(function(e,r){var n=r.payload.formModelKey,t=e.formModelData.map((function(e){return e.__key===n?pr(pr({},e),{},{isCollapsed:!e.isCollapsed}):e}));return pr(pr({},e),{},{formModelData:t})})),A,(function(e,r){var n=r.payload.formModelKey,t=e.formModelData.filter((function(e){return e.__key===n}))[0].isCollapsed;if(void 0===t)return pr({},e);if(t){var o=e.formModelData.findIndex((function(e){return e.__key===n})),a=e.formModelData.filter((function(e){return e.__key===n}))[0].children,l=[].concat(H()(e.formModelData.slice(0,o)),[pr(pr({},e.formModelData[o]),{},{isCollapsed:!1})],H()(a),H()(e.formModelData.slice(o+1)));return pr(pr({},e),{},{formModelData:l})}var i=e.formModelData.filter((function(e){var r=e.__key;return r===n||!r.includes(Ee)||!r.substring(0,r.lastIndexOf(Ee)).startsWith(n)})).map((function(e){return e.__key===n&&(e.isCollapsed=!0),e}));return pr(pr({},e),{},{formModelData:i})})),M,(function(e,r){var n=r.payload.isLoading;return pr(pr({},e),{},{formIsLoading:n,error:n?null:e.error})})),a()(a()(a()(dr,C,(function(e,r){var n=r.payload.error;return pr(pr({},e),{},{formIsLoading:!1,error:n})})),O,(function(e,r){var n=r.payload.error;return pr(pr({},e),{},{initialized:!1,initializationError:n})})),D,(function(e){return pr(pr({},e),{},{error:null,initializationError:null})})));const vr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mr,r=arguments.length>1?arguments[1]:void 0,n=yr[r.type];return n?n(e,r):e},gr={formModelBrowser:vr};var br,hr=[Se],xr="form-model-browser",wr=["emitAction"],jr=function(e,r,n,t){var o=br||(br=(0,G.jsx)(cr,{}));f.A.setInputEnvs(r);var a=i.A.createStore(gr,hr,r,xr);return s.A.addToStore(a,(function(e){return e.input.emitAction})),c.A.addToStore(a,!1),d.A.addToStore(a,(function(e){return i.A.getEvents(wr,e.input)})),l.A.addToStore(a,(function(){return{appComponent:l.A.actionFactory({})}})),i.A.createApp(xr,o,a,{input:r,events:n,actions:[],publicPath:t,textResourceModules:["component","common",xr,"action"]})},Ar=function(e){return i.A.useApp({initApp:jr,props:e,packageName:xr}).component};Ar.propTypes={selection:u.A.propType.isRequired};const Mr=Ar;function Cr(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Or(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Cr(Object(n),!0).forEach((function(r){a()(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}const Dr=function(e){return(0,G.jsx)(Mr,Or(Or({},e),{},{pathPrefix:"em"}))};const _r={container:(0,t.Ng)((function(e,r){return{}}),{})(Dr)}}}]);