1var ht=Object.defineProperty;var Cr=Object.getOwnPropertyDescriptor;var Sr=Object.getOwnPropertyNames;var Ir=Object.prototype.hasOwnProperty;var q=(t,e)=>{for(var r in e)ht(t,r,{get:e[r],enumerable:!0})},gt=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Sr(e))!Ir.call(t,o)&&o!==r&&ht(t,o,{get:()=>e[o],enumerable:!(a=Cr(e,o))||a.enumerable});return t},d=(t,e,r)=>(gt(t,e,"default"),r&>(r,e,"default"));{/*removed: await import('@liferay/language...')*/};function O(t){let e=typeof t;return e==="object"&&t!==null||e==="function"}{/*removed: await import('@liferay/language...')*/};function pe(t={},e=new FormData,r){return Object.entries(t).forEach(([a,o])=>{let i=r?`${r}[${a}]`:a;Array.isArray(o)?o.forEach(n=>{pe({[i]:n},e)}):O(o)&&!(o instanceof File)?pe(o,e,i):e.append(i,o)}),e}{/*removed: await import('@liferay/language...')*/};function yt(t){return typeof t=="string"&&(t=document.querySelector(t)),t}var Ye=class{get namespace(){return this._STATE_.namespace}get portletNamespace(){return this._STATE_.portletNamespace}get rootNode(){return this._STATE_.rootNode}set portletNamespace(e){this.rootNode=`#p_p_id${e}`,this._STATE_.portletNamespace=e}set namespace(e){this.rootNode=`#p_p_id${e}`,this._STATE_.namespace=e}set rootNode(e){typeof e=="string"&&(e=document.getElementById(e[0]==="#"?e.slice(1):e)),this._STATE_.rootNode=e}constructor(e){this._EVENTS_={},this._STATE_={namespace:null,portletNamespace:null,rootNode:null};let{namespace:r,portletNamespace:a,rootNode:o}=e;r&&(this.namespace=r),a&&(this.portletNamespace=a),o&&(this.rootNode=o),this.created(e),this.attached(e)}dispose(){this.disposeInternal(),this.detached(),this.disposed()}attached(){}created(){}detached(){}disposed(){}disposeInternal(){}emit(e,r){let a=this._EVENTS_[e];if(a&&a.length)for(let o=0;o<a.length;o++)a[o](r)}on(e,r){this._EVENTS_[e]||(this._EVENTS_[e]=[]),this._EVENTS_[e].push(r)}},ze=class extends Ye{all(e,r){return r=yt(r)||this.rootNode||document,r.querySelectorAll(this.namespaceSelectors_(this.portletNamespace||this.namespace,e))}fetch(e,r){let a=this.getRequestBody_(r);return fetch(e,{body:a,credentials:"include",method:"POST"})}getRequestBody_(e){let r;return e instanceof FormData?r=e:e instanceof HTMLFormElement?r=new FormData(e):typeof e=="object"?r=pe(this.ns(e)):r=e,r}namespaceSelectors_(e,r){return r.replace(new RegExp(`(#|\\[id=(\\"|\\'))(?!`+e+")","g"),"$1"+e)}ns(e){return Liferay.Util.ns(this.portletNamespace||this.namespace,e)}one(e,r){return r=yt(r)||this.rootNode||document,r.querySelector(this.namespaceSelectors_(this.portletNamespace||this.namespace,e))}},xe=ze;var Ge=class extends xe{callAction(e){let r=e.data.item.data;r&&r.action&&this[r.action]&&this[r.action](r)}handleActionItemClicked(e){this.callAction(e)}handleCreationButtonClicked(e){let r=e.data.data;r&&r.action&&this[r.action]&&this[r.action](r)}handleCreationMenuItemClicked(e){this.callAction(e)}handleFilterItemClicked(e){this.callAction(e)}handleItemClicked(e){this.callAction(e)}},jr=Ge;{/*removed: await import('@liferay/language...')*/};var Nr={blur:!0,error:!0,focus:!0,invalid:!0,load:!0,scroll:!0};function Ar(t){return!!(t.disabled||t.closest("[disabled]"))}function Dr(t,e,r,a){let o=i=>{let{defaultPrevented:n,target:s}=i;if(n||e==="click"&&Ar(s))return;let l=s.closest(r);l&&(i.delegateTarget=l,a(i))};return t.addEventListener(e,o,!!Nr[e]),{dispose(){t.removeEventListener(e,o)}}}var me=Dr;{/*removed: await import('@liferay/language...')*/};var Xe=class extends xe{attached(){let{rootNode:e}=this;e=e||document.body,this.inlineScrollEventHandler_=me(e,"scroll","ul.pagination ul.inline-scroller",this.onScroll_.bind(this))}created(e){this.cur=Number(e.cur),this.curParam=e.curParam,this.forcePost=e.forcePost,this.formName=e.formName,this.initialPages=Number(e.initialPages),this.jsCall=e.jsCall,this.namespace=e.namespace,this.pages=Number(e.pages),this.randomNamespace=e.randomNamespace,this.url=e.url,this.urlAnchor=e.urlAnchor,this.handleListItemClick_=this.handleListItemClick_.bind(this)}detached(){super.detached(),this.inlineScrollEventHandler_.dispose(),document.createElement("li").removeEventListener("click",this.handleListItemClick_)}addListItem_(e,r){let a=document.createElement("li");a.innerHTML=`<a class="dropdown-item" href="${this.getHREF_(r)}"><span class="sr-only">${'PÃ gina'} </span>${r}</a>`,r++,e.appendChild(a),e.setAttribute("data-page-index",r),a.addEventListener("click",this.handleListItemClick_)}getHREF_(e){let{curParam:r,formName:a,jsCall:o,namespace:i,url:n,urlAnchor:s}=this,l=`javascript:document.${a}.${i}${r}.value = "${e}; ${o}`;return this.url!==null&&(l=`${n}&${i}${r}=${e}${s}`),l}getNumber_(e){return Number(e??0)}handleListItemClick_(e){if(this.forcePost){e.preventDefault();
1let{curParam:r,namespace:a,randomNamespace:o}=this,i=document.getElementById(o+a+"pageIteratorFm");i.elements[a+r].value=e.currentTarget.textContent,i.submit()}}onScroll_(e){let{cur:r,initialPages:a,pages:o}=this,{target:i}=e;if(i.nodeName!=="UL")return;let n=this.getNumber_(i.dataset.pageIndex),s=this.getNumber_(i.dataset.maxIndex);if(n===0){let l=this.getNumber_(i.dataset.currentIndex);l===0?n=a:n=l+a}s===0&&(s=o),r<=o&&n<s&&i.scrollTop>=i.scrollHeight-300&&this.addListItem_(i,n)}},$r=Xe;function Ce(t){return t&&typeof t=="object"&&t.nodeType===9}function Se(t){return t&&t===t.window}function Pr(t,e){let r=t;return Se(t)&&(r=t.document.documentElement),Ce(t)&&(r=t.documentElement),r[`client${e}`]}function vr(t){let e=Or(t),r=Fr(t);return Ke(e,e,0,r,0,r)}function Or(t){return Lt(t,"Height")}function Mr(t,e){return t.offsetLeft+(e?0:_t(t).left)}function kr(t,e){return t.offsetTop+(e?0:_t(t).top)}function ve(t,e){return t?Ce(t)||Se(t)?vr(t):Yr(t.getBoundingClientRect(),e):{bottom:0,height:0,left:0,right:0,top:0,width:0}}function Hr(t){return Se(t)?t.pageXOffset:Ce(t)?t.defaultView.pageXOffset:t.scrollLeft}function Rr(t){return Se(t)?t.pageYOffset:Ce(t)?t.defaultView.pageYOffset:t.scrollTop}function Lt(t,e){if(Se(t))return Pr(t,e);if(Ce(t)){let r=t.documentElement;return Math.max(t.body[`scroll${e}`],r[`scroll${e}`],t.body[`offset${e}`],r[`offset${e}`],r[`client${e}`])}return Math.max(t[`client${e}`],t[`scroll${e}`],t[`offset${e}`])}function Ur(t){let e=getComputedStyle(t),r=e.mozTransform||e.msTransform||e.transform;if(r!=="none"){let a=[],o=/([\d-.\s]+)/g,i=o.exec(r);for(;i;)a.push(i[1]),i=o.exec(r);return a}}function _t(t){let e=Ur(t),r={left:0,top:0};return e&&(r.left=parseFloat(e.length===6?e[4]:e[13]),r.top=parseFloat(e.length===6?e[5]:e[14])),r}function Fr(t){return Lt(t,"Width")}function bt(t,e){return Br(t.top,t.left,t.bottom,t.right,e.top,e.left,e.bottom,e.right)}function Br(t,e,r,a,o,i,n,s){return!(o>r||n<t||i>a||s<e)}function Vr(t,e){return e.top>=t.top&&e.bottom<=t.bottom&&e.right<=t.right&&e.left>=t.left}function qr(t){return Vr(ve(window),t)}function Wr(t,e){if(!bt(t,e))return null;let r=Math.min(t.bottom,e.bottom),a=Math.min(t.right,e.right),o=Math.max(t.left,e.left),i=Math.max(t.top,e.top);return Ke(r,r-i,o,a,i,a-o)}function Ke(t,e,r,a,o,i){return{bottom:t,height:e,left:r,right:a,top:o,width:i}}function Yr(t,e=!1){let r=e?Hr(document):0,a=e?Rr(document):0;return Ke(t.bottom+a,t.height,t.left+r,t.right+r,t.top+a,t.width)}var S={BottomCenter:4,BottomLeft:5,BottomRight:3,LeftCenter:6,RightCenter:2,TopCenter:0,TopLeft:7,TopRight:1};S.Bottom=S.BottomCenter;S.Left=S.LeftCenter;S.Right=S.RightCenter;S.Top=S.TopCenter;function zr(t,e,r,a=!0){let o;if(a){let n=Je(t,e,r);r=n.position,o=n.region}else o=Oe(t,e,r);if(window.getComputedStyle(t).getPropertyValue("position")!=="fixed"){o.top+=window.pageYOffset,o.left+=window.pageXOffset;let n=t;for(;n=n.offsetParent;)o.top-=kr(n),o.left-=Mr(n)}return t.style.top=o.top+"px",t.style.left=o.left+"px",r}function Gr(t,e,r){return Je(t,e,r).region}function Oe(t,e,r){let a=ve(e),o=ve(t),i=0,n=0;switch(r){case S.TopCenter:i=a.top-o.height,n=a.left+a.width/2-o.width/2;break;case S.RightCenter:i=a.top+a.height/2-o.height/2,n=a.left+a.width;break;case S.BottomCenter:i=a.bottom,n=a.left+a.width/2-o.width/2;break;case S.LeftCenter:i=a.top+a.height/2-o.height/2,n=a.left-o.width;break;case S.TopRight:i=a.top-o.height,n=a.right-o.width;break;case S.BottomRight:i=a.bottom,n=a.right-o.width;break;case S.BottomLeft:i=a.bottom,n=a.left;break;case S.TopLeft:i=a.top-o.height,n=a.left;break;default:break}return{bottom:i+o.height,height:o.height,left:n,right:n+o.width,top:i,width:o.width}}function Je(t,e,r){let a=0,o=r,i=Oe(t,e,o),n=o,s=i,l=ve(window);for(let c=0;c<8;){if(bt(l,s)){let g=Wr(l,s),h=g.width*g.height;if(h>a&&(a=h,i=s,o=n),qr(s))break}n=(r+ ++c)%8,s=Oe(t,e,n)}return{position:o,region:i}}{/*removed: await import('@liferay/language...')*/};var wt="alterReturn",Ze="halt",Tt="__METAL_AOP__",Et="prevent",Qe=class t{constructor(e,r){this.after_=[],this.before_=[],this.fnName_=r,this.fn_=e[r],this.obj_=e}createHandle(e,r){return{detach:this.detach_.bind(this,e,r)}}detach_(e,r){let a=r?this.before_:this.after_;a.splice(a.indexOf(e),1)}exec(...e){let r,a=!1,o;for(let i=0;i<this.before_.length;i++)if(r=this.before_[i].apply(this.obj_,e),r&&r.type){if(r.type===Ze)return r.value;r.type===Et&&(a=!0)}a||(o=this.fn_.apply(this.obj_,e)),t.currentRetVal=o,t.originalRetVal=o;for(let i=0;i<this.after_.length;i++)if(r=this.after_[i].apply(this.obj_,e),r&&r.type){if(r.type===Ze)return r.value;r.type===wt&&(o=r.value,t.currentRetVal=o)}return o}register(e,r){return r?this.before_.push(e):this.after_.push(e),this.createHandle(e,r)}static after(e,r,a){return t.inject(!1,e,r,a)}static alterReturn(e){return t.modify_(wt,e)}static before(e,r,a){return t.inject(!0,e,r,a)}static halt(e){return t.modify_(Ze,e)}static inject(e,r,a,o){let i=a[Tt];
1return i||(i=a[Tt]={}),i[o]||(i[o]=new t(a,o),a[o]=function(...n){return i[o].exec(...n)}),i[o].register(r,e)}static modify_(e,r){return{type:e,value:r}}static prevent(){return t.modify_(Et)}},Xr=Qe;{/*removed: await import('@liferay/language...')*/};var et={'"':""","&":"&","'":"'","/":"/","<":"<",">":">","`":"`"};var Kr={};Object.entries(et).forEach(([t,e])=>{Kr[e]=t});var Jr=Object.keys(et),Zr=new RegExp(`[${Jr.join("")}]`,"g"),Qr=/&([^\s;]+);/g;function ie(t){return t.replace(Zr,e=>et[e])}function ea(t){return t.replace(Qr,e=>new DOMParser().parseFromString(e,"text/html").documentElement.textContent)}{/*removed: await import('@liferay/language...')*/};var xt=" ",tt=class{constructor(e){this.inputElement=e,this.computedStyle=getComputedStyle(this.inputElement),this.minHeight=parseInt(this.computedStyle.height.replace("px",""),10),this.paddingHeight=parseInt(this.computedStyle.paddingTop.replace("px",""),10)+parseInt(this.computedStyle.paddingBottom.replace("px",""),10),this.template=this.createTemplate(this.computedStyle),document.body.appendChild(this.template),this.inputElement.addEventListener("input",this.handleInput),this._resizeInput(this.inputElement)}createTemplate(e){let r=document.createElement("pre");return r.style.clip="rect(0, 0, 0, 0) !important",r.style.left="0",r.style.overflowWrap="break-word",r.style.position="absolute",r.style.top="0",r.style.transform="scale(0)",r.style.whiteSpace="pre-wrap",r.style.wordBreak="break-word",r.style.fontFamily=e.fontFamily,r.style.fontSize=e.fontSize,r.style.fontStyle=e.fontStyle,r.style.fontWeight=e.fontWeight,r.style.lineHeight=e.lineHeight,r.style.letterSpacing=e.letterSpacing,r.style.textTransform=e.textTransform,r.style.width=e.width,r.textContent=xt,r}handleInput=e=>{requestAnimationFrame(()=>{this._resizeInput(e.target)})};_resizeInput(e){this.template.style.width!==this.computedStyle.width&&(this.template.style.width=this.computedStyle.width),this.template.innerHTML=ie(e.value)+xt,e.style.height=`${this.template.scrollHeight+this.paddingHeight<this.minHeight?this.minHeight:this.template.scrollHeight+this.paddingHeight}px`}},ta=tt;{/*removed: await import('@liferay/language...')*/};var Ie={PHONE:768,TABLET:980};function ra(t,e){return function r(){let a=arguments;Ct(r),r.id=setTimeout(()=>{t(...a)},e)}}function Ct(t){clearTimeout(t.id)}{/*removed: await import('@liferay/language...')*/};var rt=class{constructor(){this._disposed=!1}dispose(){this._disposed||(this.disposeInternal(),this._disposed=!0)}disposeInternal(){}isDisposed(){return this._disposed}},ne=rt;{/*removed: await import('@liferay/language...')*/};var at=class extends ne{constructor(e,r,a){super(),this._emitter=e,this._event=r,this._listener=a}disposeInternal(){this.removeListener(),this._emitter=null,this._listener=null}removeListener(){this._emitter.isDisposed()||this._emitter.removeListener(this._event,this._listener)}},ot=at;{/*removed: await import('@liferay/language...')*/};var St=[0],it=class extends ne{constructor(){super(),this._events=null,this._listenerHandlers=null,this._shouldUseFacade=!1}_addHandler(e,r){return e?(Array.isArray(e)||(e=[e]),e.push(r)):e=r,e}addListener(e,r,a){this._validateListener(r);let o=this._toEventsArray(e);for(let i=0;i<o.length;i++)this._addSingleListener(o[i],r,a);return new ot(this,e,r)}_addSingleListener(e,r,a,o){this._runListenerHandlers(e),(a||o)&&(r={default:a,fn:r,origin:o}),this._events=this._events||{},this._events[e]=this._addHandler(this._events[e],r)}_buildFacade(e){if(this.getShouldUseFacade()){let r={preventDefault(){r.preventedDefault=!0},target:this,type:e};return r}}disposeInternal(){this._events=null}emit(e){let r=this._getRawListeners(e);if(!r.length)return!1;let a=Array.prototype.slice.call(arguments,1);return this._runListeners(r,a,this._buildFacade(e)),!0}_getRawListeners(e){return Me(this._events&&this._events[e]).concat(Me(this._events&&this._events["*"]))}getShouldUseFacade(){return this._shouldUseFacade}listeners(e){return this._getRawListeners(e).map(r=>r.fn?r.fn:r)}many(e,r,a){let o=this._toEventsArray(e);for(let i=0;i<o.length;i++)this._many(o[i],r,a);return new ot(this,e,a)}_many(e,r,a){let o=this;if(r<=0)return;function i(){--r===0&&o.removeListener(e,i),a.apply(o,arguments)}o._addSingleListener(e,i,!1,a)}_matchesListener(e,r){return(e.fn||e)===r||e.origin&&e.origin===r}
1off(e,r){if(this._validateListener(r),!this._events)return this;let a=this._toEventsArray(e);for(let o=0;o<a.length;o++)this._events[a[o]]=this._removeMatchingListenerObjs(Me(this._events[a[o]]),r);return this}on(){return this.addListener.apply(this,arguments)}onListener(e){this._listenerHandlers=this._addHandler(this._listenerHandlers,e)}once(e,r){return this.many(e,1,r)}removeAllListeners(e){if(this._events)if(e){let r=this._toEventsArray(e);for(let a=0;a<r.length;a++)this._events[r[a]]=null}else this._events=null;return this}_removeMatchingListenerObjs(e,r){let a=[];for(let o=0;o<e.length;o++)this._matchesListener(e[o],r)||a.push(e[o]);return a.length?a:null}removeListener(){return this.off.apply(this,arguments)}_runListenerHandlers(e){let r=this._listenerHandlers;if(r){r=Me(r);for(let a=0;a<r.length;a++)r[a](e)}}_runListeners(e,r,a){a&&r.push(a);let o=[];for(let i=0;i<e.length;i++){let n=e[i].fn||e[i];e[i].default?o.push(n):n.apply(this,r)}if(!a||!a.preventedDefault)for(let i=0;i<o.length;i++)o[i].apply(this,r)}setShouldUseFacade(e){return this._shouldUseFacade=e,this}_toEventsArray(e){return typeof e=="string"&&(St[0]=e,e=St),e}_validateListener(e){if(typeof e!="function")throw new TypeError("Listener must be a function")}};function Me(t){return t=t||[],Array.isArray(t)?t:[t]}var aa=it;{/*removed: await import('@liferay/language...')*/};var nt=class extends ne{constructor(){super(),this._eventHandles=[]}add(...e){for(let r=0;r<e.length;r++)this._eventHandles.push(e[r])}disposeInternal(){this._eventHandles=null}removeAllListeners(){for(let e=0;e<this._eventHandles.length;e++)this._eventHandles[e].removeListener();this._eventHandles=[]}},oa=nt;var se={};q(se,{default:()=>K});d(se,No);import*as No from"../../frontend-taglib-clay/__liferay__/exports/@clayui$button.js";import ia from"../../frontend-taglib-clay/__liferay__/exports/@clayui$button.js";var K=ia;var ge={};q(ge,{default:()=>st});d(ge,Do);import*as Do from"../../frontend-taglib-clay/__liferay__/exports/@clayui$loading-indicator.js";import na from"../../frontend-taglib-clay/__liferay__/exports/@clayui$loading-indicator.js";var st=na;var R={};q(R,{default:()=>W});d(R,Po);import*as Po from"../../frontend-taglib-clay/__liferay__/exports/@clayui$modal.js";import sa from"../../frontend-taglib-clay/__liferay__/exports/@clayui$modal.js";var W=sa;var A={};d(A,vo);import*as vo from"../../frontend-js-react-web/__liferay__/index.js";var le={};q(le,{default:()=>he});d(le,Mo);import*as Mo from"../../frontend-js-react-web/__liferay__/exports/classnames.js";import la from"../../frontend-js-react-web/__liferay__/exports/classnames.js";var he=la;var ye={};q(ye,{default:()=>p});d(ye,Ho);import*as Ho from"../../frontend-js-react-web/__liferay__/exports/prop-types.js";import fa from"../../frontend-js-react-web/__liferay__/exports/prop-types.js";var p=fa;var m={};q(m,{default:()=>f});d(m,Uo);import*as Uo from"../../frontend-js-react-web/__liferay__/exports/react.js";import da from"../../frontend-js-react-web/__liferay__/exports/react.js";var f=da;var je=document.createElement("link");je.setAttribute("rel","stylesheet");je.setAttribute("type","text/css");je.setAttribute("href",Liferay.ThemeDisplay.getPathContext()+"/o/frontend-js-web/liferay/modal/Modal.css");Liferay.CSP&&je.setAttribute("nonce",Liferay.CSP.nonce);document.querySelector("head").appendChild(je);{/*removed: await import('@liferay/language...')*/};function X(t,e){let r=t;t?.constructor?.name==="URL"&&(r=String(t)),Liferay.SPA?.app?.canNavigate(r)?(Liferay.SPA.app.navigate(r),e&&Object.keys(e).forEach(a=>{Liferay.once(a,e[a])})):ca(r)&&(window.location.href=r)}function ca(t){let e;try{t.startsWith("/")?e=new URL(t,window.location.origin):e=new URL(t)}catch{return!1}return e.protocol==="http:"||e.protocol==="https:"}{/*removed: await import('@liferay/language...')*/};var It=({bodyComponent:t,bodyHTML:e,buttons:r,center:a,className:o,containerProps:i={className:"cadmin"},contentComponent:n,customEvents:s,disableAutoClose:l,disableHeader:c,footerCssClass:g,headerCssClass:h,headerHTML:E,height:j,id:w,iframeBodyCssClass:te,iframeProps:z={},onClose:U,onOpen:T,role:F="dialog",size:M,status:re,title:ae,url:D,zIndex:x})=>{let[$,k]=(0,m.useState)(!0),{observer:P,onOpenChange:L,open:u}=(0,R.useModal)({onClose:()=>I()});(0,m.useEffect)(()=>{L(!0)},[L]);let _=(0,m.useRef)([]),I=(0,m.useCallback)(()=>
1{if(!u)return;L(!1),document.body.classList.remove("modal-open");let b=_.current;b.forEach(N=>{N.detach()}),b.splice(0,b.length),U&&U()},[_,U,L,u]),We=({formId:b,onClick:N,type:y})=>{let B=v=>{v.requestSubmit?v.requestSubmit():v.dispatchEvent(new Event("submit",{cancelable:!0}))&&v.submit()};if(y==="cancel")I();else if(D&&y==="submit"){let v=document.querySelector(".liferay-modal iframe");if(v){let G=v.contentWindow.document,C=G.querySelectorAll("form");if(C.length,b){let oe=G.getElementById(b);oe&&B(oe)}else C.length>=1&&B(C[0])}}N&&N({processClose:I})},Pe=({component:b,html:N})=>{let y=(0,m.useRef)();return(0,m.useEffect)(()=>{if(N){let B=document.createRange().createContextualFragment(N);y.current.innerHTML="",y.current.appendChild(B)}T&&T({container:y.current,processClose:I})},[N]),f.createElement("div",{className:"liferay-modal-body",ref:y},b&&f.createElement(b,{closeModal:I}))};return(0,m.useEffect)(()=>{let b=_.current;s&&s.forEach(y=>{if(y.name&&y.onEvent){let B=Liferay.on(y.name,v=>{y.onEvent(v)});b.push(B)}});let N=Liferay.on("closeModal",y=>{y.id&&w&&y.id!==w||(I(),y.redirect&&X(y.redirect))});return b.push(N),()=>{b.forEach(y=>{y.detach()}),b.splice(0,b.length)}},[s,_,w,U,T,I]),f.createElement(f.Fragment,null,u&&f.createElement(W,{center:a,className:he("liferay-modal",o),containerProps:{...i},disableAutoClose:l,id:w,observer:P,role:F,size:D&&!M?"full-screen":M,status:re,zIndex:x},n?f.createElement(n,{closeModal:I}):f.createElement(f.Fragment,null,!c&&f.createElement(W.Header,{className:h},E?f.createElement("div",{dangerouslySetInnerHTML:{__html:E}}):ae,$&&f.createElement("span",{className:"sr-only"},"- ",'S\x27està \x20carregant')),f.createElement("div",{className:he("modal-body",{"modal-body-iframe":D}),style:{height:j}},D&&f.createElement(f.Fragment,null,$&&f.createElement(st,null),f.createElement(ua,{loading:$}),f.createElement(lt,{iframeBodyCssClass:te,iframeProps:{id:w&&`${w}_iframe_`||"modalIframe",...z},onOpen:T,processClose:I,title:ae,updateLoading:b=>{k(b)},url:D})),e&&f.createElement(Pe,{html:e}),t&&f.createElement(Pe,{component:t})),r&&f.createElement(W.Footer,{className:g,last:f.createElement(K.Group,{spaced:!0},r.map(({displayType:b,formId:N,id:y,label:B,onClick:v,type:G,...C},oe)=>f.createElement(K,{displayType:b,id:y,key:oe,onClick:()=>{We({formId:N,onClick:v,type:G})},type:G==="cancel"?"button":G,...C},B)))}))))},ua=({loading:t})=>{let[e,r]=(0,m.useState)(!0);return(0,m.useEffect)(()=>{t||setTimeout(()=>r(!1),1e3)},[t]),e?f.createElement("span",{className:"sr-only",role:"status"},!t&&'Carregat'):null},fe=t=>{t&&t.url&&t.bodyHTML,(0,A.render)(It,t,document.createElement("div"))},jt=({containerProps:t,footerCssClass:e,headerCssClass:r,iframeBodyCssClass:a,onClose:o,portletSelector:i,subTitle:n,title:s,url:l})=>{let c=document.querySelector(i);if(c&&l){let g=c.querySelector(".portlet-title")||c.querySelector(".portlet-title-default");if(g)if(c.querySelector("#cpPortletTitle")){let E=g.querySelector(".portlet-title-text");E&&(s=`${E.outerHTML} - ${s}`)}else s=`${g.textContent} - ${s}`;let h;n&&(h=`${s}<div class="portlet-configuration-subtitle small"><span class="portlet-configuration-subtitle-text">${n}</span></div>`),fe({containerProps:t,footerCssClass:e,headerCssClass:r,headerHTML:h,iframeBodyCssClass:a,onClose:o,title:s,url:l})}},pa=({bodyCssClass:t,portlet:e,uri:r,...a})=>{jt({iframeBodyCssClass:t,portletSelector:e,url:r,...a})},Ne=({buttonAddLabel:t='Afegeix',buttonCancelLabel:e='Cancel\xb7la',containerProps:r,customSelectEvent:a=!1,getSelectedItemsOnly:o=!0,height:i,id:n,iframeBodyCssClass:s,multiple:l=!1,onClose:c,onSelect:g,selectEventName:h,selectedData:E,selectedDataCheckboxesDisabled:j=!1,size:w,title:te,url:z,zIndex:U})=>{let T=[],F,M,re,ae=()=>{if(l&&!re){let x=F.document.querySelector(".searchcontainer");x?F.Liferay.componentReady(x.id).then($=>{let P=(o?$.select.getAllSelectedElements():$.select._getAllElements(!1)).getDOMNodes();g(P.map(L=>{let u={};L.value&&(u.value=L.value),!o&&L.checked&&(u.checked=L.checked);let _=L.closest("dd, tr, li");return _&&Object.keys(_.dataset).length&&(u={...u,..._.dataset}),u})),M()}):M()}else g(re),M()},D={};if(E){let x=[],$=[],k=[];
1E.forEach(P=>{let{externalReferenceCode:L,id:u,label:_}=P;L&&x.push(L),u&&$.push(u),_&&k.push(_)}),x.length&&(D["data-selecteditemsercs"]=x.join(",")),$.length&&(D["data-selecteditemsids"]=$.join(",")),k.length&&(D["data-selecteditemslabels"]=k.join(","))}fe({buttons:l?[{displayType:"secondary",label:e,type:"cancel"},{label:t,onClick:ae}]:null,containerProps:r,height:i,id:n||h,iframeBodyCssClass:s,iframeProps:D,onClose:()=>{T.forEach(x=>{x.detach()}),T.splice(0,T.length),c&&c()},onOpen:({iframeWindow:x,processClose:$})=>{F=x,M=$;let k=x.document.body,P=k.querySelectorAll(".selector-button");if(E){let L=new Set(E);if(P.forEach(u=>{let _=u.dataset.entityid||u.dataset.entityname;L.has(_)?(u.disabled=!0,u.classList.add("disabled")):(u.disabled=!1,u.classList.remove("disabled"))}),l)for(let u of k.querySelectorAll(".searchcontainer tr")){let _=u.dataset.entityid||u.dataset.entityname;if(L.has(_)){let I=u.querySelector('input[type="checkbox"]');if(!I)continue;I.checked=!0,j&&(I.disabled=!0)}}}if(h){let L=Liferay.on(h,u=>{re=u.data||u,l||ae()});T.push(L),a||k.addEventListener("click",u=>{let _=u.target?.closest(".selector-button");_&&Liferay.fire(h,_.dataset)})}},size:w,title:te,url:z,zIndex:U})},ke="dialog-iframe-popup",lt=class extends f.Component{constructor(e){super(e),this.delegateHandlers=[],this.iframeRef=f.createRef();let r=new URL(e.url),a=r.searchParams.get("p_p_id"),o=e.iframeBodyCssClass||e.iframeBodyCssClass===""?`${ke} ${e.iframeBodyCssClass}`:`cadmin ${ke}`;r.searchParams.set(`_${a}_bodyCssClass`,o),this.state={src:r.toString()}}componentWillUnmount(){this.spaNavigationHandlers&&this.spaNavigationHandlers.forEach(e=>{Liferay.detach(e)}),this.delegateHandlers.length&&(this.delegateHandlers.forEach(({dispose:e})=>e()),this.delegateHandlers=null)}onLoadHandler=()=>{let e=this.iframeRef.current.contentWindow;this.delegateHandlers.push(me(e.document,"click",".btn-cancel,.lfr-hide-dialog",()=>this.props.processClose()),me(e.document,"keydown","body",r=>{r.key==="Escape"&&this.props.processClose()})),e.document.body.classList.add(ke),e.Liferay.SPA&&(this.spaNavigationHandlers=[e.Liferay.on("beforeScreenFlip",()=>{e.document.body.classList.add(ke)})],this.props.onOpen&&this.spaNavigationHandlers.push(e.Liferay.on("screenFlip",()=>{this.props.onOpen({iframeWindow:e,processClose:this.props.processClose})}))),this.props.updateLoading(!1),e.onunload=()=>{this.props.updateLoading(!0)},Liferay.fire("modalIframeLoaded",{src:this.state.src}),this.props.onOpen&&this.props.onOpen({iframeWindow:e,processClose:this.props.processClose})};render(){return f.createElement("iframe",{...this.props.iframeProps,onLoad:this.onLoadHandler,ref:this.iframeRef,src:this.state.src,title:this.props.title})}};It.propTypes={bodyHTML:p.string,buttons:p.arrayOf(p.shape({displayType:p.oneOf(["danger","info","link",null,"primary","secondary","success","unstyled","warning"]),formId:p.string,id:p.string,label:p.string,onClick:p.func,type:p.oneOf(["cancel","submit"])})),center:p.bool,containerProps:p.object,contentComponent:p.elementType,customEvents:p.arrayOf(p.shape({name:p.string,onEvent:p.func})),disableHeader:p.bool,headerHTML:p.string,height:p.string,id:p.string,iframeProps:p.object,onClose:p.func,onOpen:p.func,role:p.string,size:p.oneOf(["full-screen","lg","md","sm"]),status:p.string,title:p.string,url:p.string};var H={};q(H,{default:()=>ga});d(H,ei);import*as ei from"../../frontend-js-react-web/__liferay__/exports/react-dom.js";import ma from"../../frontend-js-react-web/__liferay__/exports/react-dom.js";var ga=ma;var de={};q(de,{default:()=>Ae});d(de,ri);import*as ri from"../../frontend-taglib-clay/__liferay__/exports/@clayui$alert.js";import ha from"../../frontend-taglib-clay/__liferay__/exports/@clayui$alert.js";var Ae=ha;var Y={};q(Y,{default:()=>ft});d(Y,oi);import*as oi from"../../frontend-taglib-clay/__liferay__/exports/@clayui$form.js";import ya from"../../frontend-taglib-clay/__liferay__/exports/@clayui$form.js";var ft=ya;var Le={};q(Le,{default:()=>He});d(Le,ni);import*as ni from"../../frontend-taglib-clay/__liferay__/exports/@clayui$icon.js";import La from"../../frontend-taglib-clay/__liferay__/exports/@clayui$icon.js";var He=La;{/*removed: await import('@liferay/language...')*/};function Nt(t,e){return typeof t=="string"?t=e:t instanceof URL?t=new URL(e):t instanceof Request?t=new Request
1(e,t):console.warn("Resource passed to `fetch()` must either be a string, Request, or URL."),t}function ce(t,e={}){t||(t="/o/");let r=t.url?t.url:t.toString();if(r.startsWith("/")){let n=Liferay.ThemeDisplay.getPathContext();n&&!r.startsWith(n)&&(r=n+r,t=Nt(t,r)),r=window.location.origin+r}let a=new URL(r),o=new Headers({}),i={};if(a.origin===window.location.origin){o.set("x-csrf-token",Liferay.authToken),i.credentials="include";let n=Liferay.ThemeDisplay.getDoAsUserIdEncoded();n&&(a.searchParams.set("doAsUserId",n),r=a.toString(),t=Nt(t,r))}return new Headers(e.headers||{}).forEach((n,s)=>{o.set(s,n)}),fetch(t,{...i,...e,headers:o})}{/*removed: await import('@liferay/language...')*/};var _a=({alert:t,buttonSubmitLabel:e='Desa',center:r,checkboxFieldLabel:a,checkboxFieldName:o,checkboxFieldValue:i,closeModal:n,dialogTitle:s,formSubmitURL:l,idFieldName:c,idFieldValue:g,initialVisible:h,mainFieldComponent:E,mainFieldLabel:j,mainFieldName:w,mainFieldPlaceholder:te,mainFieldValue:z="",method:U="POST",namespace:T,onFormSuccess:F,required:M=!0,size:re="md"})=>{let ae=(0,A.useIsMounted)(),[D,x]=(0,m.useState)(),[$,k]=(0,m.useState)(!1),[P,L]=(0,m.useState)(!1),[u,_]=(0,m.useState)(h),[I,We]=(0,m.useState)(z),[Pe,b]=(0,m.useState)(i),N=C=>{x(C.error||"")},y=C=>{C&&z&&!$&&(C.setSelectionRange(0,z.length),k(!0))},B=C=>{C.preventDefault();let oe=I?"":'Aquest\x20camp\x20és\x20obligatori\x2e';if(oe&&M){x(oe);return}L(!0);let xr=new FormData(document.querySelector(`#${T}form`));ce(l,{body:xr,method:U}).then(V=>V.json()).then(V=>{ae()&&(V.error?(L(!1),N(V)):(_(!1),n(),V.redirectURL?X(V.redirectURL):F&&F({...V,redirectURL:V.redirectURL||""})))}).catch(V=>{N(V)})},{observer:v,onClose:G}=(0,R.useModal)({onClose:()=>{_(!1),n()}});return u&&f.createElement(W,{center:r,observer:v,size:re},f.createElement(W.Header,null,s),f.createElement(ft,{id:`${T}form`,noValidate:!0,onSubmit:B},f.createElement(W.Body,null,t&&t.message&&t.title&&f.createElement(Ae,{displayType:t.style,title:t.title},t.message),f.createElement("input",{name:`${T}${c}`,type:"hidden",value:g}),f.createElement("div",{className:`form-group ${D?"has-error":""}`},f.createElement("label",{className:"control-label",htmlFor:`${T}${w}`},j,M?f.createElement("span",{className:"reference-mark"},f.createElement(He,{symbol:"asterisk"})):null),f.createElement(Y.ClayInput,{autoFocus:!0,className:"form-control",component:E,disabled:P,id:`${T}${w}`,name:`${T}${w}`,onChange:C=>{M&&x(C.target.value?"":'Aquest\x20camp\x20és\x20obligatori\x2e'),We(C.target.value)},placeholder:te,ref:y,required:M,type:"text",value:I}),D&&f.createElement("div",{className:"form-feedback-item",role:"alert"},f.createElement(He,{className:"inline-item inline-item-before",symbol:"exclamation-full"}),D)),o&&a&&f.createElement("div",{className:"form-check"},f.createElement(Y.ClayCheckbox,{checked:Pe,disabled:P,label:a,name:`${T}${o}`,onChange:()=>b(C=>!C)}))),f.createElement(W.Footer,{last:f.createElement(K.Group,{spaced:!0},f.createElement(K,{disabled:P,displayType:"secondary",onClick:G},'Cancel\xb7la'),f.createElement(K,{disabled:P,displayType:"primary",type:"submit"},P&&f.createElement("span",{className:"inline-item inline-item-before"},f.createElement("span",{"aria-hidden":"true",className:"loading-animation"})),e))})))},At=_a;{/*removed: await import('@liferay/language...')*/};var Dt="modalContainer",ba={portletId:"UNKNOWN_PORTLET_ID"};function Pt(){let t=document.getElementById(Dt);return t||(t=document.createElement("div"),t.id=Dt,document.body.appendChild(t)),t}function $t(){(0,H.unmountComponentAtNode)(Pt())}function wa({alert:t,buttonSubmitLabel:e,center:r,checkboxFieldLabel:a,checkboxFieldName:o,checkboxFieldValue:i,dialogTitle:n,formSubmitURL:s,idFieldName:l,idFieldValue:c,mainFieldComponent:g,mainFieldLabel:h,mainFieldName:E,mainFieldPlaceholder:j,mainFieldValue:w,method:te,namespace:z,onFormSuccess:U,required:T,size:F}){$t(),(0,A.render)(f.createElement(At,{alert:t,buttonSubmitLabel:e,center:r,checkboxFieldLabel:a,checkboxFieldName:o,checkboxFieldValue:i,closeModal:$t,dialogTitle:n,formSubmitURL:s,idFieldName:l,idFieldValue:c,initialVisible:"true",mainFieldComponent:g,mainFieldLabel:h,mainFieldName:E,mainFieldPlaceholder:j,mainFieldValue:w,method:te,namespace:z,onF
1ormSuccess:U,required:T,size:F}),ba,Pt())}var Ta=wa;{/*removed: await import('@liferay/language...')*/};function _e(t,e){if(!t||typeof t!="object"&&typeof t!="string")throw new TypeError("Parameter params must be an object or string");if(typeof e!="string")throw new TypeError("Parameter baseUrl must be a string");let r=e.startsWith("/")?new URL(e,location.href):new URL(e);return typeof t=="object"?Object.entries(t).forEach(([a,o])=>{r.searchParams.append(a,o)}):new URLSearchParams(t.trim()).forEach((o,i)=>{o?r.searchParams.append(i,o):r.searchParams.append(i,"")}),r.toString()}{/*removed: await import('@liferay/language...')*/};function vt({onSelect:t,portletNamespace:e,redirectURL:r,selectCategoryURL:a,title:o}){Ne({buttonAddLabel:'Seleccioneu',height:"70vh",iframeBodyCssClass:"",multiple:!0,onSelect:i=>{if(t){t(i);return}if(!Object.keys(i).length)return;let n=new URL(r),s=`_${n.searchParams.get("p_p_id")}_resetCur`;n.searchParams.set(s,"true");let l=Object.keys(i),c=n.href;l.forEach(g=>{c=_e(`${e}assetCategoryId=${i[g].categoryId}`,c)}),X(c)},selectEventName:`${e}selectedAssetCategory`,size:"md",title:o||'Filtra\x20per\x20categories',url:a})}{/*removed: await import('@liferay/language...')*/};function Ot({portletNamespace:t,redirectURL:e,selectTagURL:r,title:a}){Ne({buttonAddLabel:'Seleccioneu',height:"70vh",iframeBodyCssClass:"",multiple:!0,onSelect:o=>{if(!o.length)return;let i=new URL(e),n=`_${i.searchParams.get("p_p_id")}_resetCur`;i.searchParams.set(n,"true");let s=o.map(c=>c.value),l=i.href;s.forEach(c=>{let g=JSON.parse(c);l=_e(`${t}assetTagId=${g.tagName}`,l)}),X(l)},selectEventName:`${t}selectedAssetTag`,size:"lg",title:a||'Filtre\x20per\x20Etiquetes',url:r})}{/*removed: await import('@liferay/language...')*/};var Ea=({message:t})=>{Liferay.CustomDialogs.enabled?fe({bodyHTML:ie(t),buttons:[{autoFocus:!0,label:'D\x27acord',onClick:({processClose:e})=>{e()}}],center:!0,disableHeader:!0}):alert(t)},xa=Ea;{/*removed: await import('@liferay/language...')*/};var Ca=({message:t,onConfirm:e,status:r,title:a})=>{Liferay.CustomDialogs.enabled?fe({bodyHTML:ie(t),buttons:[{displayType:"secondary",label:'Cancel\xb7la',type:"cancel"},{autoFocus:!0,displayType:r||"primary",label:'D\x27acord',onClick:({processClose:o})=>{o(),e(!0)}}],disableHeader:!a,footerCssClass:"border-0",headerCssClass:"border-0",onClose:()=>e(!1),role:"alertdialog",status:r,title:a}):e(confirm(t))},Sa=Ca;{/*removed: await import('@liferay/language...')*/};var Ia={BAD_REQUEST:400,INTERNAL_SERVER_ERROR:500,OK:200,SC_DUPLICATE_FILE_EXCEPTION:490,SC_FILE_ANTIVIRUS_EXCEPTION:494,SC_FILE_CUSTOM_EXCEPTION:499,SC_FILE_EXTENSION_EXCEPTION:491,SC_FILE_NAME_EXCEPTION:492,SC_FILE_SIZE_EXCEPTION:493,SC_UPLOAD_REQUEST_SIZE_EXCEPTION:495};{/*removed: await import('@liferay/language...')*/};function Mt(t,e){let r=null,a;return function(...o){let i=this,n=Date.now(),s=()=>{r=setTimeout(()=>{r=null},e),a=n,t.apply(i,o)};if(r===null)s();else{let l=Math.max(a+e-n,0);clearTimeout(r),r=setTimeout(s,l)}}}{/*removed: await import('@liferay/language...')*/};function Re(t){let e=document.createElement("div");e.innerHTML=`<br>${t}`,e.removeChild(e.firstChild);let r=document.createDocumentFragment();for(;e.firstChild;)r.appendChild(e.firstChild);return r}var De=document.createElement("link");De.setAttribute("rel","stylesheet");De.setAttribute("type","text/css");De.setAttribute("href",Liferay.ThemeDisplay.getPathContext()+"/o/frontend-js-web/css/notification.css");Liferay.CSP&&De.setAttribute("nonce",Liferay.CSP.nonce);document.querySelector("head").appendChild(De);{/*removed: await import('@liferay/language...')*/};var kt="ToastAlertContainer",ja={portletId:"UNKNOWN_PORTLET_ID"},Na={danger:'Error',info:'Informació',success:'Ãxit',warning:'AvÃs'},Aa=5e3,Da=` 2 <div class="alert-container cadmin container"> 3 <div class="alert-notifications alert-notifications-fixed" id=${kt}></div> 4 </div> 5`,$a=({container:t,containerId:e})=>{if((t||e)&&(t=t||document.getElementById(e),t)){let o=document.createElement("div");return t.appendChild(o),o}let r=document.getElementById(kt);return r||(r=Re(Da).querySelector(".alert-container.container"),r=document.body.appendChild(r)),t=document.createElement("div"),document.querySelector(".alert-notifications.alert-notifications-fixed").appendChild(t),t};function Pa({autoClose:t=Aa,container:e,containerId:r,message:a="",onClick:o=()=>{},onClose:i=()=>{},renderData:n=ja,title:s,toastProps:l={},type:c="success",variant:g}){let h=$a({container:e,containerId:r});(0,H.unmountComponentAtNode)(h);let E=w=>{i&&i({event:w}),(!w||!w.defaultPrevented)&&((!e||!r)&&h.parentNode.removeChild(h),(0,H.unmountComponentAtNode)(h))},j=s===void 0?Na[c]:s;j?(j=j.replace(/:$/,""),j=`<strong class="lead">${j}:</strong>`):j="",(0,A.render)(f.createElement(Ae,{autoClose:t,displayType:c,onClick:w=>o({event:w,onClose:E}),onClose:E,variant:g,...l,className:he("mb-3",l?.className)},f.createElement("div",{dangerouslySetInnerHTML:{__html:`${j}${a}`}})),n,h)}{/*removed: await import('@liferay/language...')*/};function Ht(t){if(typeof t!="function")throw new TypeError("Parameter callback must be a function");Liferay.Service("/country/get-company-countries",{active:!0,companyId:Liferay.ThemeDisplay.getCompanyId()},t)}{/*removed: await import('@liferay/language...')*/};function Rt(t,e){if(typeof t!="function")throw new TypeError("Parameter callback must be a function");if(typeof e!="string")throw new TypeError("Parameter selectKey must be a string");Liferay.Service("/region/get-regions",{active:!0,countryId:parseInt(e,10)},t)}{/*removed: await import('@liferay/language...')*/};var Ut=(t,e,r={})=>{let a=`${t}=${e}`;r.path||(a+="; path=/"),!r.expires&&!("max-age"in r)&&(a+=`; max-age=${365*24*60*60}`);for(let[o,i]of Object.entries(r))i!==!1&&(i===!0?a+=`; ${o}`:a+=`; ${o}=${i}`);return a};function dt(t,e){if(J(e))return document.cookie.split("; ").find(r=>r.startsWith(`${t}=`))?.split("=")[1]}function va(t){document.cookie=Ut(t,"",{"max-age":0})}
5function Oa(t,e,r,a){return J(r)?(document.cookie=Ut(t,e,a),!0):!1}{/*removed: await import('@liferay/language...')*/};var be={FUNCTIONAL:"CONSENT_TYPE_FUNCTIONAL",NECESSARY:"CONSENT_TYPE_NECESSARY",PERFORMANCE:"CONSENT_TYPE_PERFORMANCE",PERSONALIZATION:"CONSENT_TYPE_PERSONALIZATION"};function J(t){return t===be.NECESSARY||dt(t,be.NECESSARY)!=="false"}{/*removed: await import('@liferay/language...')*/};function ct(t){return t._node||t._nodes?t.nodeType?t:t._node||null:t}{/*removed: await import('@liferay/language...')*/};function we(t){let e=ct(t);return typeof e=="string"?document.querySelector(e):e.jquery?e[0]:e}{/*removed: await import('@liferay/language...')*/};function $e(t,e,r){let a=!1;if(t=we(t),t){r||(r=t.getBoundingClientRect(),r={left:r.left+window.scrollX,top:r.top+window.scrollY},r.bottom=r.top+t.offsetHeight,r.right=r.left+t.offsetWidth),e||(e=window),e=we(e);let o={};if(o.left=e.scrollX,o.right=o.left+e.innerWidth,o.top=e.scrollY,o.bottom=o.top+e.innerHeight,a=r.bottom<=o.bottom&&r.left>=o.left&&r.right<=o.right&&r.top>=o.top,a){let i=e.frameElement;if(i){let n=i.getBoundingClientRect();n={left:n.left+window.scrollX,top:n.top+window.scrollY};let s=n.left-o.left;r.left+=s,r.right+=s;let l=n.top-o.top;r.top+=l,r.bottom+=l,a=$e(t,e.parent,r)}}}return a}{/*removed: await import('@liferay/language...')*/};function Ma(t){let e=[];for(;t.parentElement;)t.parentElement.getAttribute("disabled")&&e.push(t.parentElement),t=t.parentElement;return e}function Ft(t){if(t=we(t),$e(t)){let e=Ma(t),r=!t.getAttribute("disabled")&&t.offsetWidth>0&&t.offsetHeight>0&&!e.length,a=t.closest("form");if(!a||r)t.focus();else if(a){let i=a.dataset.fmNamespace+"formReady",n=s=>{let l=a.getAttribute("name"),c=s.formName;l===c&&(t.focus(),Liferay.detach(i,n))};Liferay.on(i,n)}}}{/*removed: await import('@liferay/language...')*/};function Ue(t,e){let r=null;if(t!==void 0&&t.nodeName==="FORM"&&typeof e=="string"){let a=t.dataset.fmNamespace||"";r=t.elements[a+e]||null}return r}{/*removed: await import('@liferay/language...')*/};function Fe(t,e){if(t===void 0||t.nodeName!=="FORM"||!O(e))return;Object.entries(e).forEach(([a,o])=>{let i=Ue(t,a);i&&(i.value=o)})}{/*removed: await import('@liferay/language...')*/};function Bt(t,e){if(typeof t=="string"&&(t=document.querySelector(t)),t&&t.nodeName==="FORM")if(t.setAttribute("method","post"),O(e)){let{data:r,url:a}=e;if(O(r))Fe(t,r);else return;a===void 0?submitForm(t):typeof a=="string"&&submitForm(t,a)}else submitForm(t)}{/*removed: await import('@liferay/language...')*/};var ka={addSpaceBeforeSuffix:!1,decimalSeparator:".",denominator:1024,suffixGB:"GB",suffixKB:"KB",suffixMB:"MB"};function Vt(t,e={}){let{addSpaceBeforeSuffix:r,decimalSeparator:a,denominator:o,suffixGB:i,suffixKB:n,suffixMB:s}={...ka,...e};if(typeof t!="number")throw new TypeError("Parameter size must be a number");let l=0,c=n;t/=o,t>=o&&(c=s,t/=o,l=1),t>=o&&(c=i,t/=o,l=1);let g=t.toFixed(l);return a!=="."&&(g=g.replace(/\./,a)),g+(r?" ":"")+c}{/*removed: await import('@liferay/language...')*/};function qt(t,e,r,a){typeof t=="string"?t=document.querySelector(t):t=t._node||t;let o="input[type=checkbox]";r&&(o+=`[name=${r}]`);let i=Array.from(t.querySelectorAll(o));return i.length?i.reduce((n,s)=>{let{checked:l,disabled:c,name:g,value:h}=s;return h&&g!==e&&l===a&&!c&&n.push(h),n},[]).join():""}function Ha(t,e,r){return qt(t,e,r,!0)}function Ra(t,e,r){return qt(t,e,r,!1)}{/*removed: await import('@liferay/language...')*/};function Wt(t,e){if(!O(t)||O(t)&&t.tagName!=="IMG")throw new TypeError("Parameter imagePreview must be an image");if(!O(e))throw new TypeError("Parameter region must be an object");let r=t.naturalWidth/t.offsetWidth,a=t.naturalHeight/t.offsetHeight,o=e.height?e.height*a:t.naturalHeight,i=e.width?e.width*r:t.naturalWidth,n=e.x?Math.max(e.x*r,0):0,s=e.y?Math.max(e.y*a,0):0;return{height:o,width:i,x:n,y:s}}{/*removed: await import('@liferay/language...')*/};function Yt(t,e,r){t&&navigator.geolocation?navigator.geolocation.getCurrentPosition(a=>{t(a.coords.latitude,a.coords.longitude,a)},e,r):e&&e()}{/*removed: await import('@liferay/language...')*/};function Be(t,e=""){if(!t)throw new TypeError("Parameter icon must be provided");function r(i,n){return`<svg 6 aria-hidden="true" 7 class="lexicon-icon lexicon-icon-${i} ${n}" 8 focusable="false" 9 role="presentation" 10 > 11 <use href="${Liferay.Icons.spritemap}#${i}" /> 12 </svg>`}
12let a=r(t,e),o=document.createElement("div");return o.innerHTML=a,o.firstChild}{/*removed: await import('@liferay/language...')*/};function zt(t,e=""){return`<svg aria-hidden="true" class="lexicon-icon lexicon-icon-${t} ${e}" focusable="false" role="presentation"><use href="${Liferay.Icons.spritemap}#${t}" /></svg>`}{/*removed: await import('@liferay/language...')*/};var Ua="simulationDeviceIframe",Gt;function Z(){let t=Gt;if(!t){let e=window.parent,r;for(;e!==window;){try{if(typeof e.location.href>"u")break;r=e.themeDisplay}catch{break}if(!r||window.name===Ua)break;if(!r.isStatePopUp()||e===e.parent){t=e;break}e=e.parent}t||(t=window),Gt=t}return t}{/*removed: await import('@liferay/language...')*/};var Xt;function Kt(){let t=Xt;if(!t){let e=Z().Liferay.Util,r=window.name,a=e.Window.getById(r);a&&(t=a._opener,Xt=t)}return t||window.opener||window.parent}{/*removed: await import('@liferay/language...')*/};var Fa=/^(?:p_p_id)?_(.*)_.*$/;function Jt(t){return t.replace(Fa,"$1")}{/*removed: await import('@liferay/language...')*/};function Ve(t){if(typeof t!="string")throw new TypeError("portletId must be a string");return`_${t}_`}{/*removed: await import('@liferay/language...')*/};function Zt(t,e=","){return Array.from(t.getElementsByTagName("option")).reduce((a,o)=>{let{value:i}=o;return i&&a.push(i),a},[]).join(e)}{/*removed: await import('@liferay/language...')*/};function Qt(t=window.name){return Z().Liferay.Util.Window.getById(t)}{/*removed: await import('@liferay/language...')*/};function er(){return window.innerWidth<Ie.PHONE}{/*removed: await import('@liferay/language...')*/};function tr(){return window.innerWidth<Ie.TABLET}{/*removed: await import('@liferay/language...')*/};var ue=class{constructor(e){this.storage=e}clear(){return this.storage.clear()}getItem(e,r){return J(r)?this.storage.getItem(e):null}key(e,r){return J(r)?this.storage.key(e):null}removeItem(e){return this.storage.removeItem(e)}setItem(e,r,a){return J(a)?(this.storage.setItem(e,r),!0):!1}get length(){return this.storage.length}TYPES=be};{/*removed: await import('@liferay/language...')*/};var Ba=new ue(localStorage);{/*removed: await import('@liferay/language...')*/};function rr(t){if(typeof t!="function")throw new TypeError("Parameter fn must be a function");let e=new Map,r=(...a)=>{let o;if(a.find(i=>typeof i=="object")){let i=a.filter(n=>typeof n=="object");o=i.map(n=>JSON.stringify(n)),a.length>1&&i.length<a.length&&a.forEach(n=>typeof n!="object"&&o.push(n)),o=o.join(",")}else o=a.length>1?a.join(","):a[0];if(e.has(o))return e.get(o);{let i=t.apply(null,a);return e.set(o,i),i}};return r.getCache=()=>e,r}{/*removed: await import('@liferay/language...')*/};function ar(t){if(typeof t!="string")throw new TypeError("parameter text must be a string");return t.replace(/[^a-z0-9_-]/gi,"-").replace(/^-+/,"").replace(/--+/,"-").toLowerCase()}{/*removed: await import('@liferay/language...')*/};function or(t,e){let r=Z();t.openingWindow=window,r.Liferay.Util._openWindowProvider(t,e)}{/*removed: await import('@liferay/language...')*/};var Va=/^[a-z][a-z0-9+.-]*:/i;function qa(t){return Va.test(t)}function Q(t,e={}){if(typeof t!="string")throw new TypeError("basePortletURL parameter must be a string");if(!e||typeof e!="object")throw new TypeError("parameters argument must be an object");let r=new Set(["doAsGroupId","doAsUserId","doAsUserLanguageId","p_auth","p_auth_secret","p_f_id","p_j_a_id","p_l_id","p_l_reset","p_p_auth","p_p_cacheability","p_p_i_id","p_p_id","p_p_isolated","p_p_lifecycle","p_p_mode","p_p_resource_id","p_p_state","p_p_state_rcv","p_p_static","p_p_url_type","p_p_width","p_t_lifecycle","p_v_l_s_g_id","refererGroupId","refererPlid","saveLastPath","scroll"]);t.indexOf(Liferay.ThemeDisplay.getPortalURL())!==0&&!qa(t)&&(t.indexOf("/")!==0?t=`${Liferay.ThemeDisplay.getPortalURL()}/${t}`:t=Liferay.ThemeDisplay.getPortalURL()+t);let a=new URL(t),o=new URLSearchParams(a.search),i=e.p_p_id||o.get("p_p_id");if(Object.entries(e).length&&!i)throw new TypeError("Portlet ID must not be null if parameters are provided");let n="";return Object.entries(e).length&&(n=Ve(i)),Object.keys(e).forEach(s=>{let l;r.has(s)?l=s:l=`${n}${s}`,o.set(l,e[s])}),a.search=o.toString(),a}{/*removed: await import('@liferay/language...')*/};function ir(t,e={}){return Q(t,{...e,p_p_lifecycle:"1"})}{/*removed: await import('@liferay/language...')*/};function nr(t,e={}){return Q(t,{...e,p_p_lifecycle:"0"})}{/*removed: await import('@liferay/language...')*/};function sr(t,e={}){return Q(t,{...e,p_p_lifecycle:"2"})}{/*removed: await import('@liferay/language...')*/};var lr={directories:0,height:480,left:80,location:1,menubar:1,resizable:1,scrollbars:"yes",status:0,toolbar:0,top:180,width:640};function fr(t,e=lr){let r={...lr,...e},o=Object.entries(r).map((i,n)=>`${i}=${n}`).join(",");window.open(t,"",o)}var ee={};d(ee,Qn);import*as Qn from"../../accessibility-settings-state-web/__liferay__/index.js";var Te={};d(Te,es);import*as es from"../../frontend-js-state-web/__liferay__/index.js";{/*removed: await import('@liferay/language...')*/};function Wa(){return Te.State.read(ee.accessibilityMenuAtom)[ee.CONSTANTS.ACCESSIBILITY_SETTING_REDUCED_MOTION]?.value?!0:window.matchMedia("(prefers-reduced-motion: reduce)").matches}{/*removed: await import('@liferay/language...')*/};function Ee(t,e){typeof t=="string"?t=document.querySelectorAll(t):t._node?t=[t._node]:t._nodes?t=t._nodes:t.nodeType===Node.ELEMENT_NODE&&(t=[t]),t.forEach(r=>{r.disabled=e,e?r.classList.add("disabled"):r.classList.remove("disabled")})}{/*removed: await import('@liferay/language...')*/};function dr(t,e,r,a){let o=document.getElementById(`${a}${t}`);o&&(o.value=0);let i=document.getElementById(`${a}${e}`);i&&(i.value=""),Ee(r,!0),Liferay.fire("entitySelectionRemoved")}{/*removed: await import('@liferay/language...')*/};function Ya(t,e,r){let{text:a,type:o}=t,i=document.createElement("script");Liferay.CSP.nonce&&i.setAttribute("nonce",Liferay.CSP.nonce),i.text=a,i.type=o,r?r(i):document.head.appendChild(i),i.remove(),e()}function za(t,e,r){let{src:a,type:o}=t,i=document.createElement("script");Liferay.CSP.nonce&&i.setAttribute("nonce",Liferay.CSP.nonce),i.src=a,i.type=o;let n=function(){i.remove(),e()};i.addEventListener("load",n,{once:!0}),i.addEventListener("error",n,{once:!0}),r?r(i):document.head.appendChild(i)}function cr(t,e,r,a){let o=t[e],i=()=>{e<t.length-1?cr(t,e+1,r,a):r&&setTimeout(r)};if(o)o.type&&o.type!=="text/javascript"&&o.type!=="module"&&o.type!=="module-shim"?i():(o.remove(),o.src?za(o,i,a):Ya(o,i,a));else return}function Ga(t,e,r){let a=t.querySelectorAll("script");
12if(!a.length&&e){setTimeout(e);return}cr(a,0,e,r)}{/*removed: await import('@liferay/language...')*/};function ur(t,e){let r=document.getElementById(`${e}${t.idString}`);r&&(r.value=t.idValue);let a=document.getElementById(`${e}${t.nameString}`);a&&(a.value=Liferay.Util.unescape(t.nameValue));let o=document.getElementById(`${e}removeFolderButton`);o&&Ee(o,!1)}{/*removed: await import('@liferay/language...')*/};var ut="serialize://";function pr(t){let e=Liferay.ThemeDisplay.getDoAsUserIdEncoded(),r=new FormData;return r.append("cmd",t),r.append("p_auth",Liferay.authToken),e&&r.append("doAsUserId",e),r}function mr(){return`${Liferay.ThemeDisplay.getPortalURL()}${Liferay.ThemeDisplay.getPathMain()}/portal/session_click`}function Xa(t,e={}){let r=pr("get");return r.append("key",t),e.useHttpSession&&r.append("useHttpSession",!0),ce(mr(),{body:r,method:"POST"}).then(a=>a.text()).then(a=>{if(a.startsWith(ut)){let o=a.substring(ut.length);a=JSON.parse(o)}return a})}function pt(t,e,r={}){let a=pr("set");return e&&typeof e=="object"&&(e=ut+JSON.stringify(e)),a.append(t,e),r.useHttpSession&&a.append("useHttpSession",!0),ce(mr(),{body:a,method:"POST"})}{/*removed: await import('@liferay/language...')*/};var Ka=new ue(sessionStorage);{/*removed: await import('@liferay/language...')*/};function gr(t,e){let r=document.getElementById(e);r&&(r.style.display="none",t.getModifierState("CapsLock")&&(r.style.display=""))}{/*removed: await import('@liferay/language...')*/};var Ja=/({\d+})/g;function hr(t,...e){let r=e.reduce((o,i)=>Array.isArray(i)?[...o,...i]:[...o,i],[]),a=t.split(Ja).filter(o=>o.length!==0);for(let o=0;o<r.length;o++){let i=r[o],n=`{${o}}`,s=a.indexOf(n);for(;s>=0;)a.splice(s,1,i),s=a.indexOf(n)}return a.some(o=>o&&typeof o=="object")?a:a.join("")}{/*removed: await import('@liferay/language...')*/};function yr(t,e,r,a){let o=document.getElementById(t),i=document.getElementById(e);if(o&&i){let n=o.checked;r&&(n=!n),n?i.classList.remove("hide"):i.classList.add("hide"),o.addEventListener("click",()=>{i.classList.toggle("hide"),a&&i.querySelectorAll("input[type=checkbox]").forEach(l=>{l.checked=o.checked})})}}{/*removed: await import('@liferay/language...')*/};var Lr={false:{cssClass:"controls-hidden",iconCssClass:"hidden",state:"hidden"},true:{cssClass:"controls-visible",iconCssClass:"view",state:"visible"}};function _r(t){let e=document.body;t=t._node||e;let r=t.querySelector(".toggle-controls");if(!r)return;let a=Liferay._editControlsState==="visible",o=Lr[a],i=r.querySelector(".lexicon-icon");i&&(o.icon=i),e.classList.add(o.cssClass),Liferay.fire("toggleControls",{enabled:a}),r.addEventListener("click",()=>{a=!a;let n=o;o=Lr[a],e.classList.toggle(n.cssClass),e.classList.toggle(o.cssClass);let s=o.iconCssClass,l=o.state,c=Be(s);o.icon=c,i.replaceWith(c),i=c,Liferay._editControlsState=l,pt("com.liferay.frontend.js.web_toggleControls",l),Liferay.fire("toggleControls",{enabled:a,src:"ui"})})}{/*removed: await import('@liferay/language...')*/};function br(t,e,r){let a=document.getElementById(t);if(a){let o;e&&(Array.isArray(e)&&(e=e.join(",#")),o=document.querySelectorAll(`#${e}`),o.forEach(i=>{a.checked?i.classList.remove("hide"):i.classList.add("hide")})),a.addEventListener("change",()=>{o&&o.forEach(i=>{i.classList.remove("hide")}),r&&(Array.isArray(r)&&(r=r.join(",#")),document.querySelectorAll(`#${r}`).forEach(n=>{n.classList.add("hide")}))})}}{/*removed: await import('@liferay/language...')*/};var wr=(t,e,r,a)=>{let o=t.value,i=r?a(o,a):a===o;e.classList.toggle("hide",!i)};function Tr(t,e,r){let a=document.getElementById(t),o=document.getElementById(r);if(!a||!o)return;let i=typeof e=="function";wr(a,o,i,e),a.addEventListener("change",()=>wr(a,o,i,e))}{/*removed: await import('@liferay/language...')*/};var Za={ALERT:430,DOCK:10,DOCK_PARENT:20,DRAG_ITEM:460,DROP_AREA:440,DROP_POSITION:450,MENU:5e3,OVERLAY:1e3,POPOVER:1600,TOOLTIP:1e4,WINDOW:1200};{/*removed: await import('@liferay/language...')*/};async function mt(t){if(t.includes(" from ")){let[e,r]=Qa(t);return(await import(e))[r]}else return new Promise((e,r)=>{Liferay.Loader.require(t,a=>e(a.default||a),a=>r(a))})}function Qa(t){let e=t.split(" from "),r=e[1].trim(),a=e[0].trim();return a.startsWith("{")&&a.endsWith("}")&&(a=a.substring(1,a.length-1).trim()),[r,a]}{/*removed: await import('@liferay/language...')*/};function qe(t){for(let{clientExtensionDefinitions:e,onLoad:r}of t){if(!e.length)continue;let a=e.map(({context:o,importDeclaration:i})=>mt(i).then(n=>({binding:n,context:o})).catch(n=>({context:o,error:n})));Promise.all(a).then(r)}}{/*removed: await import('@liferay/language...')*/};function Er({config:t,onLoad:e}){qe([{clientExtensionDefinitions:t.editorTransformerURLs.map(r=>({importDeclaration:`default from ${r}`})),onLoad:r=>{let a=t;r.forEach(({binding:o,error:i})=>{let n=o?.editorConfigTransformer;n&&(a=n(a))}),e({transformedConfig:a})}}])}export{S as ALIGN_POSITIONS,Xr as AOP,Ie as BREAKPOINTS,be as COOKIE_TYPES,jr as DefaultEventHandler,ne as Disposable,$r as DynamicInlineScroll,aa as EventEmitter,oa as EventHandler,xe as PortletBase,Ia as STATUS_CODE,_e as addParams,zr as align,ta as autoSize,Re as buildFragment,Ct as cancelDebounce,J as checkConsent,ir as createActionURL,Q as createPortletURL,nr as createRenderURL,sr as createResourceURL,ra as debounce,me as delegate,ie as escapeHTML,ce as fetch,Ft as focusFormField,Vt as formatStorage,Gr as getAlignBestRegion,Oe as getAlignRegion,Ha as getCheckedCheckboxes,dt as getCookie,Ht as getCountries,Wt as getCropRegion,Ue as getFormElement,Yt as getGeolocation,Be as getLexiconIcon,zt as getLexiconIconTpl,Kt as getOpener,Jt as getPortletId,Ve as getPortletNamespace,Rt as getRegions,Zt as getSelectedOptionValues,Xa as getSessionValue,Z as getTop,Ra as getUncheckedCheckboxes,Qt as getW
12indow,$e as inBrowserView,O as isObject,er as isPhone,Wa as isReducedMotion,tr as isTablet,qe as loadClientExtensions,Er as loadEditorClientExtensions,mt as loadModule,Ba as localStorage,rr as memoize,X as navigate,ar as normalizeFriendlyURL,pe as objectToFormData,xa as openAlertModal,vt as openCategorySelectionModal,Sa as openConfirmModal,fe as openModal,jt as openPortletModal,pa as openPortletWindow,Ne as openSelectionModal,Ta as openSimpleInputModal,Ot as openTagSelectionModal,Pa as openToast,or as openWindow,Bt as postForm,fr as printPage,va as removeCookie,dr as removeEntitySelection,Ga as runScriptsInElement,ur as selectFolder,Ka as sessionStorage,Oa as setCookie,Fe as setFormValues,pt as setSessionValue,gr as showCapsLock,hr as sub,Je as suggestAlignBestRegion,Mt as throttle,yr as toggleBoxes,_r as toggleControls,Ee as toggleDisabled,br as toggleRadio,Tr as toggleSelectBox,ea as unescapeHTML,Za as zIndex}; 13//# sourceMappingURL=index.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.