@pristy/pristy-libvue 2.8.2 → 2.8.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.
- package/dist/pristy-libvue.es.js +31 -17
- package/dist/pristy-libvue.es.js.map +1 -1
- package/dist/pristy-libvue.umd.js +1 -1
- package/dist/pristy-libvue.umd.js.map +1 -1
- package/dist/src/services/ClassificationService.d.ts.map +1 -1
- package/dist/src/services/ViewConfigService.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -151,7 +151,7 @@ ${L2}`}</style>
|
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
<\/script>
|
|
154
|
-
</html>`}function qn(t={}){const{content:l,mimeType:a,customStyles:i=""}=t,o=e.computed(()=>{const m=a?.value;return m==="text/markdown"||m==="text/x-markdown"||m==="text/x-web-markdown"}),n=e.computed(()=>a?.value==="text/html"),s=e.computed(()=>o.value||n.value),r=e.computed(()=>l?.value?o.value?_n(l.value):n.value?Kn(l.value):"":""),c=e.computed(()=>$n(r.value,i));return{isMarkdown:o,isHtml:n,shouldRenderPreview:s,previewBodyHtml:r,iframeContent:c,renderMarkdown:_n,sanitizeHtml:Kn,generatePreviewDocument:$n}}const $a={aura:Jm,material:Em,lara:Bm,nora:Hm},qa={soho:{0:"#ffffff",50:"#f8f8f9",100:"#f0f1f2",200:"#e1e2e4",300:"#c4c5c8",400:"#9fa1a5",500:"#7f8084",600:"#65666a",700:"#4f5053",800:"#3a3b3d",900:"#27282a",950:"#131315"},viva:{0:"#ffffff",50:"#f9f9fa",100:"#f3f3f4",200:"#e6e7e8",300:"#cacacd",400:"#a5a6a9",500:"#87898a",600:"#6c6e6f",700:"#555658",800:"#3f4041",900:"#2a2b2c",950:"#151516"},ocean:{0:"#ffffff",50:"#f8f9f9",100:"#f1f2f2",200:"#e3e4e4",300:"#c7c8c8",400:"#a2a4a4",500:"#828787",600:"#686c6c",700:"#525555",800:"#3c3e3e",900:"#282a2a",950:"#141515"}},Hy=[{name:"slate",label:"Slate",value:"#64748b"},{name:"emerald",label:"Emerald",value:"#10b981"},{name:"green",label:"Green",value:"#22c55e"},{name:"lime",label:"Lime",value:"#84cc16"},{name:"orange",label:"Orange",value:"#f97316"},{name:"amber",label:"Amber",value:"#f59e0b"},{name:"yellow",label:"Yellow",value:"#eab308"},{name:"teal",label:"Teal",value:"#14b8a6"},{name:"cyan",label:"Cyan",value:"#06b6d4"},{name:"sky",label:"Sky",value:"#0ea5e9"},{name:"blue",label:"Blue",value:"#3b82f6"},{name:"indigo",label:"Indigo",value:"#6366f1"},{name:"violet",label:"Violet",value:"#8b5cf6"},{name:"purple",label:"Purple",value:"#a855f7"},{name:"fuchsia",label:"Fuchsia",value:"#d946ef"},{name:"pink",label:"Pink",value:"#ec4899"},{name:"rose",label:"Rose",value:"#f43f5e"},{name:"red",label:"Red",value:"#ef4444"}],Qy=[{name:"slate",label:"Slate",value:"#64748b"},{name:"gray",label:"Gray",value:"#6b7280"},{name:"zinc",label:"Zinc",value:"#71717a"},{name:"neutral",label:"Neutral",value:"#737373"},{name:"stone",label:"Stone",value:"#78716c"},{name:"soho",label:"Soho",value:"#7f8084"},{name:"viva",label:"Viva",value:"#87898a"},{name:"ocean",label:"Ocean",value:"#828787"}],Io=[12,13,14,15,16,17,18],Py=["85%","90%","95%","100%","105%","110%","115%"],Zl={darkMode:!1,preset:"aura",primaryColor:"emerald",surfaceColor:"slate",scale:3},Zt={darkMode:"user-dark-mode",preset:"user-preset",primaryColor:"user-primary-color",surfaceColor:"user-surface-color",scale:"user-scale"};function jo(){const t=()=>{const y=localStorage.getItem(Zt.darkMode)==="true";return y?document.documentElement.classList.add("app-dark"):document.documentElement.classList.remove("app-dark"),y},l=y=>{localStorage.setItem(Zt.darkMode,y.toString()),y?document.documentElement.classList.add("app-dark"):document.documentElement.classList.remove("app-dark")},a=()=>localStorage.getItem(Zt.darkMode)==="true",i=()=>{const y=localStorage.getItem(Zt.preset)||Zl.preset;return y&&$a[y]&&vl.usePreset($a[y]),y},o=y=>{$a[y]&&(localStorage.setItem(Zt.preset,y),vl.usePreset($a[y]),s(),m())},n=()=>localStorage.getItem(Zt.preset)||Zl.preset,s=()=>{const y=localStorage.getItem(Zt.primaryColor)||Zl.primaryColor;return vl.updatePrimaryPalette({50:`{${y}.50}`,100:`{${y}.100}`,200:`{${y}.200}`,300:`{${y}.300}`,400:`{${y}.400}`,500:`{${y}.500}`,600:`{${y}.600}`,700:`{${y}.700}`,800:`{${y}.800}`,900:`{${y}.900}`,950:`{${y}.950}`}),y},r=y=>{localStorage.setItem(Zt.primaryColor,y),vl.updatePrimaryPalette({50:`{${y}.50}`,100:`{${y}.100}`,200:`{${y}.200}`,300:`{${y}.300}`,400:`{${y}.400}`,500:`{${y}.500}`,600:`{${y}.600}`,700:`{${y}.700}`,800:`{${y}.800}`,900:`{${y}.900}`,950:`{${y}.950}`})},c=()=>localStorage.getItem(Zt.primaryColor)||Zl.primaryColor,m=()=>{const y=localStorage.getItem(Zt.surfaceColor)||Zl.surfaceColor;return qa[y]?vl.updateSurfacePalette(qa[y]):vl.updateSurfacePalette({0:"#ffffff",50:`{${y}.50}`,100:`{${y}.100}`,200:`{${y}.200}`,300:`{${y}.300}`,400:`{${y}.400}`,500:`{${y}.500}`,600:`{${y}.600}`,700:`{${y}.700}`,800:`{${y}.800}`,900:`{${y}.900}`,950:`{${y}.950}`}),y},h=y=>{localStorage.setItem(Zt.surfaceColor,y),qa[y]?vl.updateSurfacePalette(qa[y]):vl.updateSurfacePalette({0:"#ffffff",50:`{${y}.50}`,100:`{${y}.100}`,200:`{${y}.200}`,300:`{${y}.300}`,400:`{${y}.400}`,500:`{${y}.500}`,600:`{${y}.600}`,700:`{${y}.700}`,800:`{${y}.800}`,900:`{${y}.900}`,950:`{${y}.950}`})},b=()=>localStorage.getItem(Zt.surfaceColor)||Zl.surfaceColor,p=()=>{const y=localStorage.getItem(Zt.scale)||Zl.scale.toString(),A=parseInt(y),f=Io[A]||Io[Zl.scale];return document.documentElement.style.fontSize=`${f}px`,A},d=y=>{const A=Io[y];A&&(document.documentElement.style.fontSize=`${A}px`,localStorage.setItem(Zt.scale,y.toString()))},W=()=>parseInt(localStorage.getItem(Zt.scale)||Zl.scale.toString()),Z=()=>{t(),i(),s(),m(),p()};return{applyDarkMode:t,applyPreset:i,applyPrimaryColor:s,applySurfaceColor:m,applyScale:p,applyAllThemeSettings:Z,setDarkMode:l,setPreset:o,setPrimaryColor:r,setSurfaceColor:h,setScale:d,isDarkMode:a,getPreset:n,getPrimaryColor:c,getSurfaceColor:b,getScale:W,resetToDefaults:()=>{localStorage.removeItem(Zt.darkMode),localStorage.removeItem(Zt.preset),localStorage.removeItem(Zt.primaryColor),localStorage.removeItem(Zt.surfaceColor),localStorage.removeItem(Zt.scale),Z()},themePresets:$a,primaryColors:Hy,surfaceColors:Qy,customSurfacePalettes:qa,scaleValues:Io,scalePercentages:Py,defaults:Zl,storageKeys:Zt}}const _y={class:"code-viewer-wrapper"},Ky={key:0,class:"loading-container"},$y={key:1,class:"error-container"},qy={key:2},e3=["srcdoc"],t3={name:"PreviewPanel",components:{VideoPlayer:Jn,ImageViewer:Un,AudioPlayer:En,PDFComponent:Mn,CodeMirrorViewer:fe({__name:"CodeMirrorViewer",props:{contentNode:{type:Object,required:!0},isSharedLink:{type:Boolean,default:!1}},setup(t){const{t:l}=Rt.useI18n(),{isDarkMode:a}=jo(),i=t,o=e.ref(""),n=e.ref(null),s=e.ref(null),r=e.shallowRef(null),c=e.ref(!1),m=e.ref(null),{isMarkdown:h,isHtml:b,iframeContent:p}=qn({content:o,mimeType:n}),d=()=>{if(!s.value)return;const N=Aa(n.value),A=[...Ya({editable:!1,showLineNumbers:!0,enableHistory:!1,dark:a()})];N&&(!Array.isArray(N)||N.length>0)&&A.push(N);const f=Ml.EditorState.create({doc:o.value,extensions:A});r.value=new Wt.EditorView({state:f,parent:s.value})},W=()=>{r.value&&(r.value.destroy(),r.value=null)},Z=async N=>{if(!(!N.id&&!N.shareId)){c.value=!0,m.value=null;try{let y;i.isSharedLink&&N.shareId?y=await Ye.getSharedLinkContent(N.shareId):y=await Ye.getNodeContent(N.id,!1);let A=await y.text();if(N.content?.mimeType==="application/json")try{A=JSON.stringify(JSON.parse(A),null,2)}catch(f){console.warn("Failed to format JSON, displaying raw content:",f.message)}o.value=A,n.value=N.content?.mimeType||"text/plain",c.value=!1,await e.nextTick(),!h.value&&!b.value&&d()}catch(y){console.error("Failed to load content:",y),m.value=l("editor.loadError"),c.value=!1}}};return e.watch(()=>i.contentNode,N=>{N&&(W(),Z(N))},{immediate:!0}),e.onBeforeUnmount(()=>{W()}),(N,y)=>(e.openBlock(),e.createElementBlock("div",_y,[c.value?(e.openBlock(),e.createElementBlock("div",Ky,[e.createVNode(e.unref(Bt))])):m.value?(e.openBlock(),e.createElementBlock("div",$y,[y[0]||(y[0]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2 text-2xl","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(m.value),1)])):(e.openBlock(),e.createElementBlock("div",qy,[e.unref(h)||e.unref(b)?(e.openBlock(),e.createElementBlock("iframe",{key:0,srcdoc:e.unref(p),class:"preview-iframe w-full h-screen",sandbox:"allow-scripts allow-popups"},null,8,e3)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"editorContainer",ref:s,class:"h-full w-full"},null,512))]))]))}},[["__scopeId","data-v-0eb692b7"]]),PrimeButton:de},directives:{tooltip:yt},inject:["collaboraService","isCurrentNodeDisplayed"],props:{isPreviewPanelVisible:{type:Boolean,default:!1},currentNodeDisplayed:{type:Object,default:()=>({})},hasOnlyOneFile:{type:Boolean,default:!1}},emits:["closeContentPanel","showPreviousFile","showNextFile"],data(){return{url:null}},computed:{...je.mapState(It,["children"])},watch:{currentNodeDisplayed(t){t!=null?this.computeUrl(t):this.closeContentPanel()}},methods:{getPDFRef(){return this.$refs.pdfComponent},getImagePreviewRef(){return this.$refs.imageViewer},closeContentPanel(){this.$emit("closeContentPanel")},showPreviousFile(t){this.$emit("showPreviousFile",t)},showNextFile(t){this.$emit("showNextFile",t)},computeUrl(t){this.mimeType=t.content.mimeType,this.currentFileName=t.name,this.currentFileId=t.id,this.mimeType&&(this.mimeType==="application/pdf"||this.mimeType.includes("image/")||this.mimeType.includes("video/")||this.mimeType.includes("audio/"))?this.url=ht.getContentUrl(t.id):ht.getRenditionUrl(t.id).then(l=>{this.url=l}).catch(l=>{if(l.message==="NOT_CREATED")return console.warn("Fail loading content : NOT_CREATED"),null;console.error("Fail loading content",l)})}}},l3=["aria-label"],a3={class:"preview-card"},o3={key:0,class:"panel-header"},n3={class:"file-name"},i3={class:"nav-actions"},s3={class:"preview-content"};function r3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("router-link"),c=e.resolveComponent("ImageViewer"),m=e.resolveComponent("VideoPlayer"),h=e.resolveComponent("AudioPlayer"),b=e.resolveComponent("CodeMirrorViewer"),p=e.resolveComponent("PDFComponent"),d=e.resolveDirective("tooltip");return a.currentNodeDisplayed?(e.openBlock(),e.createElementBlock("aside",{key:0,class:e.normalizeClass(["preview-panel-container",{hidden:!a.isPreviewPanelVisible}]),"aria-label":t.$t("previewPanel")},[e.createElementVNode("div",a3,[a.currentNodeDisplayed?(e.openBlock(),e.createElementBlock("div",o3,[e.createVNode(s,{class:"close-btn",type:"button",icon:"ri-close-line","aria-label":t.$t("close"),severity:"danger",rounded:"",text:"",onClick:n.closeContentPanel},null,8,["aria-label","onClick"]),e.withDirectives((e.openBlock(),e.createElementBlock("div",n3,[e.createTextVNode(e.toDisplayString(a.currentNodeDisplayed.name),1)])),[[d,a.currentNodeDisplayed.name,void 0,{top:!0}]]),e.createElementVNode("div",i3,[e.withDirectives(e.createVNode(s,{"aria-label":t.$t("previousFile"),type:"button",class:"nav-btn",icon:"ri-skip-left-line",severity:"secondary",disabled:a.hasOnlyOneFile,onClick:l[0]||(l[0]=W=>n.showPreviousFile(t.children))},null,8,["aria-label","disabled"]),[[d,t.$t("previousFile"),void 0,{bottom:!0}]]),e.withDirectives(e.createVNode(s,{"aria-label":t.$t("nextFile"),type:"button",class:"nav-btn",icon:"ri-skip-right-line",severity:"secondary","icon-pos":"right",disabled:a.hasOnlyOneFile,onClick:l[1]||(l[1]=W=>n.showNextFile(t.children))},null,8,["aria-label","disabled"]),[[d,t.$t("nextFile"),void 0,{bottom:!0}]]),e.createVNode(r,{to:n.collaboraService.getRoute(a.currentNodeDisplayed)},{default:e.withCtx(()=>[e.createVNode(s,{class:"open-btn",label:"Ouvrir",type:"button",severity:"secondary",raised:""})]),_:1},8,["to"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",s3,[a.currentNodeDisplayed&&t.mimeType&&t.mimeType.includes("image/")?(e.openBlock(),e.createBlock(c,{key:0,ref:"imageViewer","content-node":a.currentNodeDisplayed,"show-title":!1},null,8,["content-node"])):a.currentNodeDisplayed&&t.mimeType&&t.mimeType.includes("video/")?(e.openBlock(),e.createBlock(m,{key:1,"content-url":o.url,"content-node":a.currentNodeDisplayed},null,8,["content-url","content-node"])):a.currentNodeDisplayed&&t.mimeType&&t.mimeType.includes("audio/")?(e.openBlock(),e.createBlock(h,{key:2,"content-url":o.url,"content-node":a.currentNodeDisplayed},null,8,["content-url","content-node"])):a.currentNodeDisplayed&&t.mimeType&&(t.mimeType.startsWith("text/")||t.mimeType==="application/json"||t.mimeType==="application/xml"||t.mimeType==="application/x-yaml"||t.mimeType==="application/x-sh")?(e.openBlock(),e.createBlock(b,{key:3,"content-node":a.currentNodeDisplayed},null,8,["content-node"])):o.url?(e.openBlock(),e.createBlock(p,{key:o.url,ref:"pdfComponent",url:o.url,class:"pdf-viewer"},null,8,["url"])):e.createCommentVNode("",!0)])])],10,l3)):e.createCommentVNode("",!0)}const v2=fe(t3,[["render",r3],["__scopeId","data-v-bb0161cf"]]),c3={name:"SelectionStatus",components:{PrimeProgressSpinner:Bt},inject:["actionsService"],emits:["resetPageSelection"],computed:{useSelectionStore(){return dt},...je.mapState(dt,["isSelectionRemovalVisible","isCurrentPageFullySelected"]),...je.mapState(It,["currentNode","loading","pagination","totalRecordNodes"]),hasMoreElements(){return this.totalRecordNodes>=500},hasSelectedNodes(){return dt().nodes.length!==0&&this.pagination&&!this.loading}},methods:{deleteSelection(){dt().resetSelection(),dt().setIsCurrentPageFullySelected(!1),dt().setIsSelectionRemovalVisible(!1),this.$emit("resetPageSelection")},selectAllNodes(){let t=this.currentNode.guid||this.currentNode.id;this.actionsService.selectAllNodes(t,!0).then(l=>{let a=l.children;a.length>0&&dt().selectNodes(a),dt().setIsCurrentPageFullySelected(!1),dt().setIsSelectionRemovalVisible(!0)})}}},d3={class:"selection-status-container"},m3={key:1,class:"nbrOfSearchResult"},b3={key:2,class:"nbrOfSearchResult"},p3={key:3,class:"selectOrDeleteDiv"},u3={class:"selection-info"},h3={key:4,class:"selectOrDeleteDiv"},y3={class:"selection-info"};function Z3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeProgressSpinner");return e.openBlock(),e.createElementBlock("div",d3,[t.loading?(e.openBlock(),e.createBlock(s,{key:0,class:"spinner",strokeWidth:"8",fill:"var(--surface-ground)",animationDuration:".5s","aria-label":"Custom ProgressSpinner"})):e.createCommentVNode("",!0),!t.loading&&t.pagination&&!n.hasSelectedNodes?(e.openBlock(),e.createElementBlock("div",m3,e.toDisplayString(t.$t("howMuchResult",{nbrEntries:t.pagination.count,totalEntries:t.pagination.totalItems})),1)):n.hasSelectedNodes&&!t.isCurrentPageFullySelected&&!t.isSelectionRemovalVisible?(e.openBlock(),e.createElementBlock("div",b3,e.toDisplayString(t.$t("howMuchSelected",{nbrEntries:n.useSelectionStore().nodes.length,totalEntries:t.pagination.totalItems})),1)):n.hasSelectedNodes&&t.isCurrentPageFullySelected?(e.openBlock(),e.createElementBlock("div",p3,[e.createElementVNode("span",u3,[e.createTextVNode(e.toDisplayString(t.$t("howMuchSelected",{nbrEntries:n.useSelectionStore().nodes.length,totalEntries:t.pagination.totalItems}))+" ",1),n.hasMoreElements?(e.openBlock(),e.createElementBlock("button",{key:0,class:"action-link",onClick:l[0]||(l[0]=r=>n.selectAllNodes())},e.toDisplayString(t.$t("selectAllElementMoreThan",{totalEntries:t.pagination.totalItems})),1)):(e.openBlock(),e.createElementBlock("button",{key:1,class:"action-link",onClick:l[1]||(l[1]=r=>n.selectAllNodes())},e.toDisplayString(t.$t("selectAllElement",{totalEntries:t.pagination.totalItems})),1))])])):n.hasSelectedNodes&&t.isSelectionRemovalVisible?(e.openBlock(),e.createElementBlock("div",h3,[e.createElementVNode("span",y3,[e.createTextVNode(e.toDisplayString(t.$t("howMuchSelected",{nbrEntries:n.useSelectionStore().nodes.length,totalEntries:t.pagination.totalItems}))+" ",1),e.createElementVNode("button",{class:"action-link",onClick:l[2]||(l[2]=r=>n.deleteSelection())},e.toDisplayString(t.$t("deleteSelection")),1)])])):e.createCommentVNode("",!0)])}const F2=fe(c3,[["render",Z3],["__scopeId","data-v-c9907301"]]),g3={name:"LayoutSelector",components:{PrimeSelectButton:Fl},emits:["update-layout"],data(){return{layout:localStorage.getItem("contentViewLayout")||"datatable",options:["list","grid","datatable"]}},methods:{onLayoutChange(){this.$emit("update-layout",this.layout)},getOptionLabel(t){return{list:this.$t("layoutList"),grid:this.$t("layoutGrid"),datatable:this.$t("layoutTable")}[t]||t}}},f3=["aria-label"],W3={class:"sr-only"};function N3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeSelectButton");return e.openBlock(),e.createElementBlock("div",{class:"listView flex-grow-0",role:"group","aria-label":t.$t("layoutSelector")},[e.createVNode(s,{modelValue:o.layout,"onUpdate:modelValue":l[0]||(l[0]=r=>o.layout=r),options:o.options,"allow-empty":!1,onChange:n.onLayoutChange,"aria-label":t.$t("layoutSelector")},{option:e.withCtx(({option:r})=>[e.createElementVNode("i",{class:e.normalizeClass([r==="list"?"ri-list-check":r==="grid"?"ri-grid-line":"ri-table-line"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",W3,e.toDisplayString(n.getOptionLabel(r)),1)]),_:1},8,["modelValue","options","onChange","aria-label"])],8,f3)}const R2=fe(g3,[["render",N3],["__scopeId","data-v-baacd905"]]),A3={name:"ContentToolbar",props:{hasSelection:{type:Boolean,default:void 0}},setup(t){const l=dt(),a=e.computed(()=>l.nodes.length);return{effectiveHasSelection:e.computed(()=>t.hasSelection!==void 0?t.hasSelection:l.nodes.length>0),selectedCount:a}}},Y3={class:"content-toolbar-left"},z3={class:"content-toolbar-right"};function M3(t,l,a,i,o,n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["content-toolbar",{"has-selection":i.effectiveHasSelection}])},[e.createElementVNode("div",Y3,[i.effectiveHasSelection?e.renderSlot(t.$slots,"selection",{key:0,hasSelection:i.effectiveHasSelection,selectedCount:i.selectedCount},void 0,!0):e.renderSlot(t.$slots,"default",{key:1,hasSelection:i.effectiveHasSelection},void 0,!0)]),e.createElementVNode("div",z3,[e.renderSlot(t.$slots,"right",{hasSelection:i.effectiveHasSelection},void 0,!0)])],2)}const S2=fe(A3,[["render",M3],["__scopeId","data-v-6cb2b56e"]]),X3={name:"SelectionBar",components:{PrimeButton:de,ActionMenu:oa},directives:{tooltip:yt},props:{totalItems:{type:Number,default:null},selectAllHandler:{type:Function,default:null},actions:{type:Array,default:()=>[]}},emits:["reload","reset-page-selection"],setup(t,{emit:l}){const a=dt(),i=It(),o=Oo(),{nodes:n,files:s,folders:r,isCurrentPageFullySelected:c,isSelectionRemovalVisible:m}=je.storeToRefs(a),{pagination:h,currentNode:b}=je.storeToRefs(i),{isSmallScreen:p}=je.storeToRefs(o),d=e.ref(null),W=e.ref([]),Z=e.computed(()=>n.value.length),N=e.computed(()=>t.totalItems??h.value?.totalItems??0),y=e.computed(()=>({nodes:n.value,files:s.value,folders:r.value})),A=e.computed(()=>Z.value===N.value&&N.value>0),f=e.computed(()=>h.value?.count??0),Y=e.computed(()=>A.value||m.value?!1:Z.value>=f.value&&f.value>0&&Z.value<N.value),X=e.computed(()=>{const ae=y.value;return t.actions.filter(Q=>typeof Q.visible=="function"?Q.visible(ae):Q.visible!==!1)}),G=e.computed(()=>{const ae=[...X.value],Q={};for(const pe of ae){const P=pe.group||"__default__";P in Q||(Q[P]=pe.order??999)}return ae.sort((pe,P)=>{const ee=pe.group||"__default__",S=P.group||"__default__",E=(Q[ee]??999)-(Q[S]??999);return E!==0?E:(pe.order??999)-(P.order??999)}),ae}),j=e.computed(()=>{const ae=G.value.filter(P=>P.display==="inline"||P.display==="both"||!P.display),Q=[];let pe=null;for(const P of ae){const ee=P.group||"__default__";pe!==null&&ee!==pe&&Q.push({_groupSeparator:!0}),Q.push(P),pe=ee}return Q}),L=e.computed(()=>G.value.filter(ae=>ae.display==="menu")),z=e.computed(()=>G.value),O=(ae,Q)=>typeof ae=="function"?ae(Q):ae||"",F=ae=>typeof ae.disabled=="function"?ae.disabled(y.value):ae.disabled===!0,M=ae=>{const Q=y.value,pe={},P=[];for(const ee of ae){const S=ee.group||"__default__";pe[S]||(pe[S]=[],P.push(S));const E=typeof ee.disabled=="function"?ee.disabled(Q):ee.disabled===!0;pe[S].push({icon:O(ee.icon,Q),label:ee.label||O(ee.tooltip,Q),disabled:E,visible:!0,command:()=>ee.handler(Q)})}return P.map(ee=>({items:pe[ee]}))};return{moreMenu:d,menuActionItems:W,nodes:n,files:s,folders:r,isSmallScreen:p,isSelectionRemovalVisible:m,selectedCount:Z,totalItemsComputed:N,actionContext:y,showSelectAll:Y,isAllSelected:A,inlineActions:j,menuActions:L,allMobileMenuActions:z,resolveStringOrFn:O,resolveDisabled:F,toggleMoreMenu:ae=>{const Q=p.value?z.value:L.value;W.value=M(Q),d.value.getActionMenuRef().toggle(ae)},selectAllNodes:async()=>{if(t.selectAllHandler){t.selectAllHandler();return}const ae=b.value.guid||b.value.id;try{const Q=await Ye.getChildren(ae,N.value,0,!0);Q.children?.length>0&&a.selectNodes(Q.children),a.setIsCurrentPageFullySelected(!1),a.setIsSelectionRemovalVisible(!0)}catch(Q){console.error("Error selecting all nodes:",Q)}},clearSelection:()=>{a.resetSelection(),a.setIsCurrentPageFullySelected(!1),a.setIsSelectionRemovalVisible(!1),l("reset-page-selection")}}}},O3={class:"selection-info"},w3={class:"selection-text"},k3={class:"selection-actions"},C3={key:0,class:"action-separator"},T3={class:"mobile-header"},I3={class:"mobile-selection-info"},j3={class:"selection-text"},G3={class:"mobile-selection-actions"},D3={class:"mobile-actions"};function L3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("ActionMenu"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["selection-bar",{"is-mobile":i.isSmallScreen}])},[i.isSmallScreen?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",T3,[e.createElementVNode("div",I3,[l[5]||(l[5]=e.createElementVNode("i",{"aria-hidden":"true",class:"ri-checkbox-multiple-line selection-icon"},null,-1)),e.createElementVNode("span",j3,e.toDisplayString(t.$t("selection.mobileCount",{selected:i.selectedCount,total:i.totalItemsComputed})),1)]),e.createElementVNode("div",G3,[i.showSelectAll?(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:l[2]||(l[2]=(...m)=>i.selectAllNodes&&i.selectAllNodes(...m))},e.toDisplayString(t.$t("selection.selectAllShort")),1)):i.isSelectionRemovalVisible||i.isAllSelected?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:l[3]||(l[3]=(...m)=>i.clearSelection&&i.clearSelection(...m))},e.toDisplayString(t.$t("selection.clear")),1)):e.createCommentVNode("",!0)])]),e.renderSlot(t.$slots,"actions",{nodes:i.nodes,files:i.files,folders:i.folders,selectedCount:i.selectedCount},()=>[e.createElementVNode("div",D3,[i.allMobileMenuActions.length>0?e.withDirectives((e.openBlock(),e.createBlock(s,{key:0,icon:"ri-more-2-line",onClick:i.toggleMoreMenu,rounded:"",text:"",severity:"secondary"},null,8,["onClick"])),[[c,t.$t("moreActions"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])],!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",O3,[e.createElementVNode("span",w3,e.toDisplayString(t.$t("selection.count",{selected:i.selectedCount,total:i.totalItemsComputed})),1),i.showSelectAll?(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:l[0]||(l[0]=(...m)=>i.selectAllNodes&&i.selectAllNodes(...m))},e.toDisplayString(t.$t("selection.selectAll",{total:i.totalItemsComputed})),1)):i.isSelectionRemovalVisible||i.isAllSelected?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:l[1]||(l[1]=(...m)=>i.clearSelection&&i.clearSelection(...m))},e.toDisplayString(t.$t("selection.clearSelection")),1)):e.createCommentVNode("",!0)]),e.renderSlot(t.$slots,"actions",{nodes:i.nodes,files:i.files,folders:i.folders,selectedCount:i.selectedCount},()=>[e.createElementVNode("div",k3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.inlineActions,(m,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[m._groupSeparator?(e.openBlock(),e.createElementBlock("div",C3)):e.withDirectives((e.openBlock(),e.createBlock(s,{key:1,icon:i.resolveStringOrFn(m.icon,i.actionContext),disabled:i.resolveDisabled(m),onClick:b=>m.handler(i.actionContext),rounded:"",text:"",severity:m.severity||"secondary"},null,8,["icon","disabled","onClick","severity"])),[[c,i.resolveStringOrFn(m.tooltip,i.actionContext),void 0,{top:!0}]])],64))),128)),i.menuActions.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l[4]||(l[4]=e.createElementVNode("div",{class:"action-separator"},null,-1)),e.withDirectives(e.createVNode(s,{icon:"ri-more-2-line",onClick:i.toggleMoreMenu,rounded:"",text:"",severity:"secondary"},null,8,["onClick"]),[[c,t.$t("moreActions"),void 0,{top:!0}]])],64)):e.createCommentVNode("",!0)])],!0)],64)),e.createVNode(r,{ref:"moreMenu","action-menu-items":i.menuActionItems},null,8,["action-menu-items"])],2)}const x2=fe(X3,[["render",L3],["__scopeId","data-v-f3efc80d"]]),V3={name:"HelpKeyMessage",components:{PrimeMessage:ml},props:{helpKey:{type:Boolean,default:!1}},emits:["set-help-hey"],methods:{changeHelpKey(){this.$emit("set-help-hey",!1)}}};function v3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeMessage");return a.helpKey?(e.openBlock(),e.createBlock(s,{key:0,closable:!1,severity:"secondary",class:"text-lg font-semibold p-0",size:"large",onClick:n.changeHelpKey},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createElementVNode("p",{class:"ml-1 font-bold"},"Liste des Raccourcies Claviers",-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createElementVNode("i",{class:"ri-arrow-left-line","aria-hidden":"true"})]),e.createTextVNode("Page Précédente ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createElementVNode("i",{class:"ri-arrow-right-line","aria-hidden":"true"})]),e.createTextVNode("Page Suivante ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createTextVNode("CTRL+"),e.createElementVNode("i",{class:"ri-arrow-up-line","aria-hidden":"true"})]),e.createTextVNode("Document Précédente ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createTextVNode("CTRL+"),e.createElementVNode("i",{class:"ri-arrow-down-line","aria-hidden":"true"})]),e.createTextVNode("Document Suivante ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"+"),e.createTextVNode("Zoomer")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"-"),e.createTextVNode("Dézoomer")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"0"),e.createTextVNode("Zoom adapté à la hauteur")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"5"),e.createTextVNode("Zoom adapté à la largeur")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"ECHAP"),e.createTextVNode("Fermer la prévisualisation")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"ENTER"),e.createTextVNode("Ouvre le document")],-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)}const U2=fe(V3,[["render",v3],["__scopeId","data-v-3439a6f6"]]),F3={name:"CustomToastContent",props:{severity:{type:String,default:"info"},summary:{type:String,default:"Info"},link:{type:String,default:""},linkText:{type:String,default:"Cliquez ici"},messageBeforeLink:{type:String,default:""},messageAfterLink:{type:String,default:""},message:{type:String,default:"Voici un message sans lien."}},computed:{iconClass(){switch(this.severity){case"success":return"ri-check-line text-success";case"info":return"ri-information-line text-info";case"warn":return"ri-alert-line text-warning";case"error":return"ri-close-circle-line text-danger";default:return"ri-information-line text-info"}}}},R3={class:"flex w-full gap-1"},S3={class:"flex flex-column flex-grow-1 gap-1"},x3={class:"text-base font-bold"},U3={class:"text-base"},J3=["href"],E3={key:1};function B3(t,l,a,i,o,n){return e.openBlock(),e.createElementBlock("div",R3,[e.createElementVNode("i",{class:e.normalizeClass([n.iconClass,"mr-2 text-2xl"]),"aria-hidden":"true"},null,2),e.createElementVNode("div",S3,[e.createElementVNode("div",x3,e.toDisplayString(a.summary),1),e.createElementVNode("div",U3,[a.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(a.messageBeforeLink)+" ",1),e.createElementVNode("a",{href:a.link,class:"underline",target:"_blank",rel:"noopener"},e.toDisplayString(a.linkText),9,J3),e.createTextVNode(" "+e.toDisplayString(a.messageAfterLink),1)],64)):(e.openBlock(),e.createElementBlock("div",E3,e.toDisplayString(a.message),1))])])])}const J2=fe(F3,[["render",B3]]),H3={name:"UploadStatus",components:{PrimeKnob:vi},emits:["openFile"],data(){return{isReduced:!1}},computed:{...je.mapState(Ol,["files","isUploading","overallMessage","activeRequests"])},methods:{...je.mapActions(Ol,["clearCompleted","cancelUpload"]),changeReducedState(){this.isReduced=!this.isReduced},cancelFileUpload(t){this.cancelUpload(t)},getIconColor(t){switch(t){case"success":return"color: green";case"error":return"color: red";default:return""}},iconForStatus(t){switch(t){case"success":return"ri-checkbox-circle-fill text-2xl";case"error":return"ri-close-circle-fill text-2xl";default:return""}},openFile(t){this.$emit("openFile",t)}}},Q3={key:0,class:"fixed bottom-0 right-0 w-full sm:w-30rem surface-0 border-round shadow-5 m-0 sm:m-3 z-5 p-3 surface-border surface-ground border-1"},P3={class:"flex justify-content-between align-items-center"},_3={key:0,class:"file-list"},K3={class:"flex flex-column pr-1"},$3=["onClick"],q3={key:1,class:"file-name"},eZ={key:2,class:"error-message text-xs"},tZ={class:"status-container"},lZ={key:1};function aZ(t,l,a,i,o,n){const s=e.resolveComponent("Button"),r=e.resolveComponent("PrimeKnob");return t.files.length>0?(e.openBlock(),e.createElementBlock("div",Q3,[e.createElementVNode("div",P3,[e.createElementVNode("strong",null,e.toDisplayString(t.overallMessage),1),e.createElementVNode("div",null,[e.createVNode(s,{icon:o.isReduced?"ri-arrow-up-line":"ri-arrow-down-line",onClick:n.changeReducedState,text:"",rounded:"",severity:"secondary","aria-label":"Réduire"},null,8,["icon","onClick"]),t.isUploading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,icon:"ri-close-line",onClick:t.clearCompleted,text:"",rounded:"",severity:"secondary","aria-label":"Fermer"},null,8,["onClick"]))])]),o.isReduced?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",_3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.files,c=>(e.openBlock(),e.createElementBlock("div",{key:c.name,class:"file-item"},[e.createElementVNode("div",K3,[c.status==="success"?(e.openBlock(),e.createElementBlock("a",{key:0,class:"file-name cursor-pointer",onClick:m=>n.openFile(c)},e.toDisplayString(c.name),9,$3)):(e.openBlock(),e.createElementBlock("span",q3,e.toDisplayString(c.name),1)),c.status==="error"?(e.openBlock(),e.createElementBlock("p",eZ,e.toDisplayString(c.message),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",tZ,[c.status==="uploading"?(e.openBlock(),e.createBlock(r,{key:0,modelValue:c.percent,"onUpdate:modelValue":m=>c.percent=m,size:50,strokeWidth:5,readonly:"",valueTemplate:"{value}%",class:"upload-knob"},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0),c.status==="rejected"?(e.openBlock(),e.createElementBlock("div",lZ,e.toDisplayString(t.$t("canceledImport")),1)):(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(`${n.iconForStatus(c.status)}`),style:e.normalizeStyle(n.getIconColor(c.status))},null,6)),c.status==="uploading"&&c.percent!==100?(e.openBlock(),e.createBlock(s,{key:3,icon:"ri-close-line",text:"",rounded:"",severity:"danger",onClick:m=>n.cancelFileUpload(c.name),"aria-label":"Annuler",class:"cancel-btn"},null,8,["onClick"])):e.createCommentVNode("",!0)])]))),128))]))])):e.createCommentVNode("",!0)}const E2=fe(H3,[["render",aZ],["__scopeId","data-v-a3067d5a"]]),oZ={name:"UploadTargetInfo",computed:{...je.mapState(It,["currentNode","workspace"])}},nZ={class:"overlay-content"},iZ={class:"text-xl font-bold"},sZ={class:"mt-2 text-color-secondary"};function rZ(t,l,a,i,o,n){return e.openBlock(),e.createElementBlock("div",nZ,[l[0]||(l[0]=e.createElementVNode("i",{class:"ri-upload-cloud-line text-8xl","aria-hidden":"true"},null,-1)),e.createElementVNode("span",iZ,e.toDisplayString(t.$t("dropFileFolders")),1),e.createElementVNode("div",sZ,e.toDisplayString(t.currentNode?.name==="documentLibrary"?t.workspace?.title||t.workspace?.id:t.currentNode?.name||t.$t("currentFolder")),1)])}const B2=fe(oZ,[["render",rZ],["__scopeId","data-v-b32d0624"]]),cZ={name:"FolderUpload",components:{PrimeButton:de},data(){return{isDraggingOver:!1}},emits:["close"],methods:{...je.mapActions(Ol,["startUpload"]),closePopup(){this.$emit("close",!1)},handleFolderSelect(t){const a=Array.from(t.target.files).map(i=>({file:i,relativePath:i.webkitRelativePath}));this.processFiles(a)},processFiles(t){const l=It().currentNode.id;this.startUpload(t,l),this.closePopup()},async handleDrop(t){this.isDraggingOver=!1;const l=t.dataTransfer.items,a=[],i=[],o=async n=>{if(n.isFile)return new Promise(s=>n.file(r=>{const c=n.fullPath.startsWith("/")?n.fullPath.substring(1):n.fullPath;a.push({file:r,relativePath:c}),s()}));if(n.isDirectory){const s=n.createReader();return new Promise(r=>{const c=async()=>{const m=await new Promise(h=>s.readEntries(h));if(m.length>0){for(const h of m)await o(h);await c()}r()};c()})}};for(const n of l){const s=n.webkitGetAsEntry();s&&i.push(o(s))}await Promise.all(i),a.length>0&&this.processFiles(a)},triggerFileInput(){this.$refs.fileInput.click()},handleDragOver(){this.isDraggingOver=!0},handleDragLeave(){this.isDraggingOver=!1}}},dZ={class:"folder-upload-container"},mZ={class:"folder-upload-buttonbar"};function bZ(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton");return e.openBlock(),e.createElementBlock("div",dZ,[e.createElementVNode("div",mZ,[e.createVNode(s,{class:"select-folder-btn",label:t.$t("selectFolder"),onClick:n.triggerFileInput},null,8,["label","onClick"])]),e.createElementVNode("div",{class:e.normalizeClass(["folder-upload-dropzone",{"is-dragging":o.isDraggingOver}]),onDragover:l[0]||(l[0]=e.withModifiers((...r)=>n.handleDragOver&&n.handleDragOver(...r),["prevent"])),onDragleave:l[1]||(l[1]=e.withModifiers((...r)=>n.handleDragLeave&&n.handleDragLeave(...r),["prevent"])),onDrop:l[2]||(l[2]=e.withModifiers(r=>n.handleDrop(r),["prevent"]))},[e.createElementVNode("p",null,e.toDisplayString(t.$t("dropFolder")),1)],34),e.createElementVNode("input",{type:"file",webkitdirectory:"",onChange:l[3]||(l[3]=r=>n.handleFolderSelect(r)),ref:"fileInput",class:"file-input-hidden"},null,544)])}const ei=fe(cZ,[["render",bZ],["__scopeId","data-v-042839bf"]]),pZ={name:"ImportPopupWithWorker",components:{PrimeButton:de,PrimeDialog:pt,FileUpload:ya,FolderUpload:ei},props:{node:{type:Object,required:!0},importType:{type:String,default:"file"},forcedPlanName:{type:String,default:null},accept:{type:String,default:null}},emits:["close","upload-with-plan"],computed:{...je.mapState(Ol,["isUploading"])},methods:{...je.mapActions(Ol,["startUpload"]),closePopup(){this.$emit("close",!1)},handleUpload(t){const l=t.files;if(!l||l.length===0)return;if(this.forcedPlanName){const i=l.map(o=>new File([o],o.name,{type:o.type}));this.$emit("upload-with-plan",{files:i,planName:this.forcedPlanName}),this.closePopup();return}const a=l.map(i=>({file:new File([i],i.name,{type:i.type}),relativePath:""}));this.startUpload(a,this.node.id),this.closePopup()}}},uZ={key:0},hZ={key:1};function yZ(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("FileUpload"),c=e.resolveComponent("FolderUpload"),m=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(m,{header:t.$t("importElement"),visible:"",modal:"",onKeyup:e.withKeys(n.closePopup,["esc"]),class:"popup"},{closeicon:e.withCtx(()=>[e.createVNode(s,{icon:"ri-close-line","aria-label":t.$t("close"),onClick:n.closePopup,outlined:"",text:"",severity:"secondary"},null,8,["aria-label","onClick"])]),footer:e.withCtx(()=>[e.createVNode(s,{label:t.$t("close"),onClick:n.closePopup,severity:"secondary"},null,8,["label","onClick"])]),default:e.withCtx(()=>[a.importType==="file"?(e.openBlock(),e.createElementBlock("div",uZ,[e.createVNode(r,{name:"upload_files",chooseLabel:t.$t("imports.selectFiles"),uploadLabel:t.$t("send"),cancelLabel:t.$t("cancel"),onUploader:n.handleUpload,customUpload:"",multiple:"",maxFileSize:2147483648,disabled:t.isUploading,accept:a.accept},{empty:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(t.$t("dragAndDrop")),1)]),_:1},8,["chooseLabel","uploadLabel","cancelLabel","onUploader","disabled","accept"])])):a.importType==="folder"?(e.openBlock(),e.createElementBlock("div",hZ,[e.createVNode(c,{onClose:n.closePopup},null,8,["onClose"])])):e.createCommentVNode("",!0)]),_:1},8,["header","onKeyup"])}const H2=fe(pZ,[["render",yZ]]);class ZZ{getConfig(l,a){const i=`fr/jeci/pristy/config/${l}/${a}`;return fa.executeWebScript("GET",i)}updateConfig(l,a,i){const o=`fr/jeci/pristy/config/${l}/${a}`;return fa.executeWebScript("PUT",o,null,null,null,i)}validateValueByType(l,a){if(a==="number"&&(isNaN(parseFloat(l))||!isFinite(l)))return this.$t("config.errors.invalidNumber");if(a==="boolean"){const i=String(l).toLowerCase();if(i!=="true"&&i!=="false")return this.$t("config.errors.invalidBoolean")}if(a==="array"||a==="object")try{const i=JSON.parse(l),o=Array.isArray(i)?"array":typeof i;if(a==="array"&&o!=="array"||a==="object"&&o!=="object")return this.$t("config.errors.typeMismatch",{type:a})}catch{return null}return null}}const xt=new ZZ,gZ={name:"AddPairInConfigDialog",components:{PrimeDialog:pt,PrimeButton:de,PrimeInputText:_e,PrimeSelect:Dt},props:{visible:{type:Boolean,default:!1},existingKeys:{type:Array,default:()=>[]}},emits:["update:visible","add-pair"],data(){return{newKey:"",newValue:"",newType:"string",availableTypes:["string","number","boolean","array","object"],errors:{key:null,value:null}}},watch:{visible(t){t&&this.resetForm()}},methods:{resetForm(){this.newKey="",this.newValue="",this.newType="string",this.errors={key:null,value:null}},submit(){this.errors={key:null,value:null};let t=!0;this.newKey.trim()?this.existingKeys.includes(this.newKey.trim())&&(this.errors.key=this.$t("config.errors.keyDuplicate"),t=!1):(this.errors.key=this.$t("config.errors.keyRequired"),t=!1);const l=xt.validateValueByType(this.newValue,this.newType);l&&(this.errors.value=l,t=!1),t&&(this.$emit("add-pair",{key:this.newKey,value:this.newValue,type:this.newType}),this.$emit("update:visible",!1))}}},fZ={class:"field"},WZ={for:"newKey"},NZ={key:0,class:"p-error"},AZ={class:"field"},YZ={for:"newType"},zZ={class:"field"},MZ={for:"newValue"},XZ={key:0,class:"p-error"};function OZ(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputText"),r=e.resolveComponent("PrimeSelect"),c=e.resolveComponent("PrimeButton"),m=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(m,{header:t.$t("config.dialog.addTitle"),visible:a.visible,"onUpdate:visible":l[4]||(l[4]=h=>t.$emit("update:visible",h)),modal:"",class:"dialog-add-pair"},{footer:e.withCtx(()=>[e.createVNode(c,{label:t.$t("config.buttons.cancel"),icon:"ri-close-line",class:"p-button-text",onClick:l[3]||(l[3]=h=>t.$emit("update:visible",!1))},null,8,["label"]),e.createVNode(c,{label:t.$t("config.buttons.add"),icon:"ri-check-line",onClick:n.submit,autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",fZ,[e.createElementVNode("label",WZ,e.toDisplayString(t.$t("config.dialog.keyLabel")),1),e.createVNode(s,{id:"newKey",modelValue:o.newKey,"onUpdate:modelValue":l[0]||(l[0]=h=>o.newKey=h),class:e.normalizeClass(["w-full",{"p-invalid":o.errors.key}])},null,8,["modelValue","class"]),o.errors.key?(e.openBlock(),e.createElementBlock("small",NZ,e.toDisplayString(o.errors.key),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",AZ,[e.createElementVNode("label",YZ,e.toDisplayString(t.$t("config.dialog.typeLabel")),1),e.createVNode(r,{id:"newType",modelValue:o.newType,"onUpdate:modelValue":l[1]||(l[1]=h=>o.newType=h),options:o.availableTypes,class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",zZ,[e.createElementVNode("label",MZ,e.toDisplayString(t.$t("config.dialog.valueLabel")),1),e.createVNode(s,{id:"newValue",modelValue:o.newValue,"onUpdate:modelValue":l[2]||(l[2]=h=>o.newValue=h),class:e.normalizeClass(["w-full",{"p-invalid":o.errors.value}])},null,8,["modelValue","class"]),o.errors.value?(e.openBlock(),e.createElementBlock("small",XZ,e.toDisplayString(o.errors.value),1)):e.createCommentVNode("",!0)])]),_:1},8,["header","visible"])}const Q2=fe(gZ,[["render",OZ]]),wZ={class:"array-editor"},kZ=["aria-label"],CZ={key:1,class:"object-item"},TZ={key:0},IZ={key:0},jZ={key:1,class:"object-summary"},GZ={class:"summary-item"},DZ={key:0,class:"summary-item"},LZ={key:1,class:"summary-item"},VZ={class:"summary-item"},vZ={key:1},FZ={class:"action-buttons"},Go=fe({__name:"ArrayEditor",props:{modelValue:{type:Array,required:!0},isMetadata:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:l}){const a=t,i=l,o=e.ref(JSON.parse(JSON.stringify(a.modelValue))),n=["text","datetime","boolean","double","int","date"],s=["popup","details","advancedSearch","view"],r=e.ref(null),c={id:"",title:"",labelId:"",display:[],input:"text",readOnly:!1,modelAspect:"",modelType:""};e.watch(()=>a.modelValue,X=>{o.value=JSON.parse(JSON.stringify(X))},{deep:!0});const m=X=>{const G=typeof X;return G==="string"||G==="number"||G==="boolean"},h=X=>typeof X=="object"&&X!==null,b=(X,G)=>{o.value[X]=G,i("update:modelValue",o.value)},p=(X,G,j)=>{o.value[X][G]=j,i("update:modelValue",o.value)},d=X=>{o.value.splice(X,1),i("update:modelValue",o.value)},W=()=>{if(a.isMetadata){const X={...c,order:o.value.length+1};o.value.push(X)}else if(o.value.length>0){const X=o.value[0],G=typeof X;G==="string"?o.value.push(""):G==="number"?o.value.push(0):G==="object"&&X!==null?o.value.push(JSON.parse(JSON.stringify(X))):o.value.push("")}else o.value.push("");i("update:modelValue",o.value)},Z=X=>{const G=o.value[X];o.value[X]={...c,...G},r.value=X},N=()=>{r.value=null,i("update:modelValue",o.value)},y=X=>{const G=JSON.parse(JSON.stringify(o.value[X]));o.value.splice(X+1,0,G),o.value.forEach((j,L)=>{h(j)&&Object.prototype.hasOwnProperty.call(j,"order")&&(j.order=L+1)}),i("update:modelValue",o.value)},A=(X,G)=>{const j=X+G;if(j<0||j>=o.value.length)return;const L=o.value.splice(X,1)[0];o.value.splice(j,0,L),o.value.forEach((z,O)=>{h(z)&&Object.prototype.hasOwnProperty.call(z,"order")&&(z.order=O+1)}),i("update:modelValue",o.value)},f=()=>{o.value.forEach((X,G)=>{h(X)&&Object.prototype.hasOwnProperty.call(X,"order")&&(X.order=G+1)}),i("update:modelValue",o.value)},Y=X=>{if(!a.isMetadata)return"transparent";const G=X.modelAspect||X.modelType;if(!G)return"transparent";let j=0;for(let z=0;z<G.length;z++)j=G.charCodeAt(z)+((j<<5)-j);return`hsla(${j%360}, 50%, 50%, 0.15)`};return(X,G)=>(e.openBlock(),e.createElementBlock("div",wZ,[e.createVNode(e.unref(Fi.VueDraggableNext),{modelValue:o.value,"onUpdate:modelValue":G[1]||(G[1]=j=>o.value=j),"ghost-class":"ghost",handle:".drag-handle","item-key":"index",onEnd:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(j,L)=>(e.openBlock(),e.createElementBlock("div",{key:L,class:"array-item",style:e.normalizeStyle({backgroundColor:Y(j)})},[e.createElementVNode("button",{class:"drag-handle","aria-label":X.$t("config.arrayEditor.reorder")},[...G[2]||(G[2]=[e.createElementVNode("i",{class:"ri-draggable","aria-hidden":"true"},null,-1)])],8,kZ),m(j)?(e.openBlock(),e.createBlock(e.unref(_e),{key:0,"model-value":j,"onUpdate:modelValue":z=>b(L,z),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("div",CZ,[t.isMetadata?(e.openBlock(),e.createElementBlock("div",TZ,[r.value===L?(e.openBlock(),e.createElementBlock("div",IZ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(c),z=>(e.openBlock(),e.createElementBlock("div",{key:z,class:"object-property"},[e.createElementVNode("label",null,e.toDisplayString(z),1),z==="input"?(e.openBlock(),e.createBlock(e.unref(Dt),{key:0,"model-value":j[z],"onUpdate:modelValue":O=>p(L,z,O),options:n,class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):z==="display"?(e.openBlock(),e.createBlock(e.unref(xa),{key:1,"model-value":j[z],"onUpdate:modelValue":O=>p(L,z,O),options:s,class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):z==="readOnly"?(e.openBlock(),e.createBlock(e.unref(La),{key:2,"model-value":j[z],"onUpdate:modelValue":O=>p(L,z,O)},null,8,["model-value","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(e.unref(_e),{key:3,"model-value":j[z],"onUpdate:modelValue":O=>p(L,z,O),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"]))]))),128))])):(e.openBlock(),e.createElementBlock("div",jZ,[e.createElementVNode("div",GZ,[G[3]||(G[3]=e.createElementVNode("strong",null,"ID:",-1)),e.createTextVNode(" "+e.toDisplayString(j.id),1)]),j.title?(e.openBlock(),e.createElementBlock("div",DZ,[G[4]||(G[4]=e.createElementVNode("strong",null,"Title:",-1)),e.createTextVNode(" "+e.toDisplayString(j.title),1)])):e.createCommentVNode("",!0),j.labelId?(e.openBlock(),e.createElementBlock("div",LZ,[G[5]||(G[5]=e.createElementVNode("strong",null,"Label ID:",-1)),e.createTextVNode(" "+e.toDisplayString(j.labelId),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",VZ,[G[6]||(G[6]=e.createElementVNode("strong",null,"Input:",-1)),e.createTextVNode(" "+e.toDisplayString(j.input),1)])]))])):(e.openBlock(),e.createElementBlock("div",vZ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j,(z,O)=>(e.openBlock(),e.createElementBlock("div",{key:O,class:"object-property"},[e.createElementVNode("label",null,e.toDisplayString(O),1),e.createVNode(e.unref(_e),{"model-value":z,"onUpdate:modelValue":F=>p(L,O,F),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])]))),128))]))])),e.createElementVNode("div",FZ,[t.isMetadata&&r.value!==L?(e.openBlock(),e.createBlock(e.unref(de),{key:0,icon:"ri-pencil-line","aria-label":X.$t("modify"),class:"p-button-secondary p-button-sm",onClick:z=>Z(L)},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0),t.isMetadata&&r.value===L?(e.openBlock(),e.createBlock(e.unref(de),{key:1,icon:"ri-check-line","aria-label":X.$t("save"),class:"p-button-success p-button-sm",onClick:G[0]||(G[0]=z=>N())},null,8,["aria-label"])):e.createCommentVNode("",!0),t.isMetadata?(e.openBlock(),e.createBlock(e.unref(de),{key:2,icon:"ri-arrow-up-line","aria-label":X.$t("moveUp"),class:"p-button-secondary p-button-sm",onClick:z=>A(L,-1),disabled:L===0},null,8,["aria-label","onClick","disabled"])):e.createCommentVNode("",!0),t.isMetadata?(e.openBlock(),e.createBlock(e.unref(de),{key:3,icon:"ri-arrow-down-line","aria-label":X.$t("moveDown"),class:"p-button-secondary p-button-sm",onClick:z=>A(L,1),disabled:L===o.value.length-1},null,8,["aria-label","onClick","disabled"])):e.createCommentVNode("",!0),t.isMetadata?(e.openBlock(),e.createBlock(e.unref(de),{key:4,icon:"ri-file-copy-line","aria-label":X.$t("duplicate"),class:"p-button-secondary p-button-sm",onClick:z=>y(L)},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(de),{icon:"ri-delete-bin-line","aria-label":X.$t("delete"),class:"p-button-danger p-button-sm",onClick:z=>d(L)},null,8,["aria-label","onClick"])])],4))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(de),{label:X.$t("config.arrayEditor.addItem"),icon:"ri-add-line",class:"p-button-sm p-button-secondary mt-2",onClick:W},null,8,["label"])]))}},[["__scopeId","data-v-fee7ece3"]]),RZ={class:"config-cards-container"},SZ={class:"card-title-wrapper"},xZ={class:"type-badge ml-2"},UZ={class:"title-buttons"},JZ={key:0,class:"description"},EZ={key:1,class:"undefined-container"},BZ={class:"help-text"},HZ={key:2,class:"editor-container"},QZ={key:3},P2=fe({__name:"ConfigDatatable",props:{configData:{type:Array,required:!0},loading:{type:Boolean,default:!1},descriptions:{type:Object,default:()=>({})}},emits:["update:config"],setup(t,{emit:l}){const a=t,i=l,o=e.ref(a.configData.reduce((h,b)=>(b.type==="array"&&(h[b.key]=!1),h),{})),n=h=>{o.value[h]=!o.value[h]},s=(h,b)=>{const p=a.configData.map(d=>d.key===h?{...d,value:b}:d);i("update:config",p)},r=h=>{const b=a.configData.map(p=>p.key===h?{...p,isDefined:!0}:p);i("update:config",b)},c=h=>{const b=a.configData.map(p=>{if(p.key===h){const d=a.descriptions[h]?.default;return{...p,isDefined:!1,value:d}}return p});i("update:config",b)},m=e.computed(()=>[...a.configData].sort((h,b)=>h.key.localeCompare(b.key)));return(h,b)=>(e.openBlock(),e.createElementBlock("div",RZ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,p=>(e.openBlock(),e.createBlock(e.unref(Zo),{key:p.key,class:"config-card"},{title:e.withCtx(()=>[e.createElementVNode("div",SZ,[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(p.key)+" ",1),e.createElementVNode("small",xZ,e.toDisplayString(h.$t(`config.types.${p.type}`)),1)]),e.createElementVNode("div",UZ,[p.type==="array"&&p.isDefined?(e.openBlock(),e.createBlock(e.unref(de),{key:0,icon:o.value[p.key]?"ri-close-large-line":"ri-add-large-line",class:"p-button-text p-button","aria-label":o.value[p.key]?h.$t("config.buttons.collapse"):h.$t("config.buttons.expand"),onClick:d=>n(p.key)},null,8,["icon","aria-label","onClick"])):e.createCommentVNode("",!0),p.isDefined?(e.openBlock(),e.createBlock(e.unref(de),{key:1,icon:"ri-delete-bin-line",severity:"danger","aria-label":h.$t("config.buttons.undefine"),class:"p-button-sm",onClick:d=>c(p.key)},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0)])])]),content:e.withCtx(()=>[t.descriptions[p.key]?.descriptionKey?(e.openBlock(),e.createElementBlock("p",JZ,e.toDisplayString(h.$t(t.descriptions[p.key].descriptionKey)),1)):e.createCommentVNode("",!0),p.isDefined?e.withDirectives((e.openBlock(),e.createElementBlock("div",HZ,[p.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(La),{key:0,"model-value":p.value,"onUpdate:modelValue":d=>s(p.key,d)},null,8,["model-value","onUpdate:modelValue"])):p.type==="array"?(e.openBlock(),e.createBlock(Go,{key:1,"is-metadata":p.key==="METADATA","model-value":p.value,"onUpdate:modelValue":d=>s(p.key,d)},null,8,["is-metadata","model-value","onUpdate:modelValue"])):p.type==="string"||p.type==="number"?(e.openBlock(),e.createBlock(e.unref(_e),{key:2,"model-value":p.value,class:"w-full","onUpdate:modelValue":d=>s(p.key,d)},null,8,["model-value","onUpdate:modelValue"])):p.type==="object"?(e.openBlock(),e.createElementBlock("pre",QZ,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)],512)),[[e.vShow,p.type!=="array"||o.value[p.key]]]):(e.openBlock(),e.createElementBlock("div",EZ,[e.createVNode(e.unref(de),{label:h.$t("config.buttons.define"),icon:"ri-add-line",class:"p-button-outlined",onClick:d=>r(p.key)},null,8,["label","onClick"]),e.createElementVNode("small",BZ,e.toDisplayString(h.$t("config.notDefined")),1)]))]),_:2},1024))),128))]))}},[["__scopeId","data-v-0394ea8e"]]),PZ={class:"config-item-editor"},_Z={class:"editor-header"},KZ={class:"config-key"},$Z={class:"type-badge"},qZ={key:0,class:"config-description"},eg={class:"definition-actions"},tg={key:0,class:"undefined-container"},lg={class:"help-text"},ag={key:1,class:"defined-actions"},og={key:1,class:"editor-content"},ng={key:0,class:"editor-field"},ig={key:1,class:"editor-field"},sg={key:2,class:"editor-field"},rg={key:3,class:"editor-field editor-field-array"},cg={key:4,class:"editor-field"},dg={class:"object-display"},mg={key:2,class:"default-hint"},ti=fe({__name:"ConfigItemEditor",props:{item:{type:Object,required:!0},description:{type:Object,default:()=>({})}},emits:["update:value","define","undefine"],setup(t,{emit:l}){const a=l,i=r=>{a("update:value",r)},o=()=>{a("define")},n=()=>{a("undefine")},s=r=>typeof r=="object"?JSON.stringify(r):String(r);return(r,c)=>(e.openBlock(),e.createElementBlock("div",PZ,[e.createElementVNode("div",_Z,[e.createElementVNode("h3",KZ,e.toDisplayString(t.item.key),1),e.createElementVNode("span",$Z,e.toDisplayString(r.$t(`config.types.${t.item.type}`)),1)]),t.description?.descriptionKey?(e.openBlock(),e.createElementBlock("p",qZ,e.toDisplayString(r.$t(t.description.descriptionKey)),1)):e.createCommentVNode("",!0),e.createElementVNode("div",eg,[t.item.isDefined?(e.openBlock(),e.createElementBlock("div",ag,[e.createVNode(e.unref(de),{label:r.$t("config.buttons.undefine"),icon:"ri-delete-bin-line",severity:"danger",class:"p-button-outlined p-button-sm",onClick:n},null,8,["label"])])):(e.openBlock(),e.createElementBlock("div",tg,[e.createVNode(e.unref(de),{label:r.$t("config.buttons.define"),icon:"ri-add-line",class:"p-button-outlined",onClick:o},null,8,["label"]),e.createElementVNode("small",lg,e.toDisplayString(r.$t("config.notDefined")),1)]))]),t.item.isDefined?(e.openBlock(),e.createElementBlock("div",og,[t.item.type==="boolean"?(e.openBlock(),e.createElementBlock("div",ng,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createVNode(e.unref(La),{"model-value":t.item.value,"onUpdate:modelValue":i},null,8,["model-value"])])):t.item.type==="string"?(e.openBlock(),e.createElementBlock("div",ig,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createVNode(e.unref(_e),{"model-value":t.item.value,class:"w-full","onUpdate:modelValue":i},null,8,["model-value"])])):t.item.type==="number"?(e.openBlock(),e.createElementBlock("div",sg,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createVNode(e.unref(Yl),{"model-value":t.item.value,class:"w-full","onUpdate:modelValue":i},null,8,["model-value"])])):t.item.type==="array"?(e.openBlock(),e.createElementBlock("div",rg,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createVNode(Go,{"is-metadata":t.item.key==="METADATA","model-value":t.item.value,"onUpdate:modelValue":i},null,8,["is-metadata","model-value"])])):t.item.type==="object"?(e.openBlock(),e.createElementBlock("div",cg,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createElementVNode("pre",dg,e.toDisplayString(JSON.stringify(t.item.value,null,2)),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.description?.default!==void 0?(e.openBlock(),e.createElementBlock("div",mg,[c[0]||(c[0]=e.createElementVNode("i",{class:"ri-information-line","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(r.$t("config.splitView.defaultValue"))+": ",1),e.createElementVNode("code",null,e.toDisplayString(s(t.description.default)),1)])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a7f62f1b"]]),bg={class:"config-split-view"},pg={class:"config-list-panel"},ug={class:"filter-container"},hg={class:"filter-input-wrapper"},yg={class:"config-groups"},Zg=["onClick"],gg={class:"group-label"},fg={class:"group-count"},Wg={class:"group-items"},Ng=["onClick"],Ag={class:"item-key"},Yg=["title"],zg={key:0,class:"empty-state"},Mg={class:"config-editor-panel"},Xg={key:0,class:"editor-wrapper"},Og={key:1,class:"empty-editor"},_2=fe({__name:"ConfigSplitView",props:{configData:{type:Array,required:!0},descriptions:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1}},emits:["update:config"],setup(t,{emit:l}){const{t:a}=Rt.useI18n(),i=t,o=l,n=e.ref(""),s=e.ref(null),r=e.ref({}),c={display:{id:"display",label:"config.groups.display",prefixes:["THEME","APP_ROOT","SHOW_","PRIMEVUE","BREADCRUMB","EDIT_","OPEN_"]},matomo:{id:"matomo",label:"config.groups.matomo",prefixes:["MATOMO_"]},sentry:{id:"sentry",label:"config.groups.sentry",prefixes:["SENTRY_"]},chat:{id:"chat",label:"config.groups.chat",prefixes:["CHAT_","ROCKETCHAT_"]},search:{id:"search",label:"config.groups.search",prefixes:["SEARCH_"]},pagination:{id:"pagination",label:"config.groups.pagination",prefixes:["DEFAULT_ELEMENT","ROW_PER_PAGE"]},metadata:{id:"metadata",label:"config.groups.metadata",keys:["METADATA","ASPECTS","CONSTRAINTS","ALLOWED_FILE_EXTENSIONS"]},security:{id:"security",label:"config.groups.security",keys:["NEW_PASSWORD_RULES"]},other:{id:"other",label:"config.groups.other"}},m=y=>{for(const[A,f]of Object.entries(c))if(A!=="other"){if(f.keys&&f.keys.includes(y))return A;if(f.prefixes){for(const Y of f.prefixes)if(y.startsWith(Y))return A}}return"other"},h=e.computed(()=>{const y=n.value.toLowerCase().trim(),A={};for(const Y of Object.keys(c))A[Y]=[];for(const Y of i.configData){if(y){const G=Y.key.toLowerCase().includes(y),j=i.descriptions[Y.key]?.descriptionKey,L=j?a(j).toLowerCase().includes(y):!1;if(!G&&!L)continue}const X=m(Y.key);A[X].push(Y)}for(const Y of Object.keys(A))A[Y].sort((X,G)=>X.key.localeCompare(G.key));const f=[];for(const[Y,X]of Object.entries(c))A[Y].length>0&&f.push({id:Y,label:X.label,items:A[Y]});return f}),b=e.computed(()=>s.value?i.configData.find(y=>y.key===s.value):null),p=y=>{r.value[y]=!r.value[y]},d=y=>{s.value=y},W=y=>{if(!s.value)return;const A=i.configData.map(f=>f.key===s.value?{...f,value:y}:f);o("update:config",A)},Z=()=>{if(!s.value)return;const y=i.configData.map(A=>A.key===s.value?{...A,isDefined:!0}:A);o("update:config",y)},N=()=>{if(!s.value)return;const y=i.configData.map(A=>{if(A.key===s.value){const f=i.descriptions[A.key]?.default;return{...A,isDefined:!1,value:f}}return A});o("update:config",y)};return e.watch(()=>i.configData,()=>{!s.value&&i.configData.length>0&&h.value.length>0&&h.value[0].items.length>0&&(s.value=h.value[0].items[0].key)},{immediate:!0}),(y,A)=>(e.openBlock(),e.createElementBlock("div",bg,[e.createElementVNode("div",pg,[e.createElementVNode("div",ug,[e.createElementVNode("span",hg,[A[1]||(A[1]=e.createElementVNode("i",{class:"ri-search-line","aria-hidden":"true"},null,-1)),e.createVNode(e.unref(_e),{modelValue:n.value,"onUpdate:modelValue":A[0]||(A[0]=f=>n.value=f),placeholder:y.$t("config.splitView.filterPlaceholder"),class:"filter-input"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",yg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,f=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"config-group"},[e.createElementVNode("div",{class:"group-header",onClick:Y=>p(f.id)},[e.createElementVNode("i",{class:e.normalizeClass(r.value[f.id]?"ri-arrow-right-s-line":"ri-arrow-down-s-line"),"aria-hidden":"true"},null,2),e.createElementVNode("span",gg,e.toDisplayString(y.$t(f.label)),1),e.createElementVNode("span",fg,e.toDisplayString(f.items.length),1)],8,Zg),e.withDirectives(e.createElementVNode("div",Wg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.items,Y=>(e.openBlock(),e.createElementBlock("div",{key:Y.key,class:e.normalizeClass(["config-list-item",{"is-selected":s.value===Y.key,"is-undefined":!Y.isDefined}]),onClick:X=>d(Y.key)},[e.createElementVNode("span",Ag,e.toDisplayString(Y.key),1),Y.isDefined?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("i",{key:0,class:"ri-checkbox-blank-circle-line undefined-indicator",title:y.$t("config.notDefined"),"aria-hidden":"true"},null,8,Yg))],10,Ng))),128))],512),[[e.vShow,!r.value[f.id]]])]))),128)),h.value.length===0?(e.openBlock(),e.createElementBlock("div",zg,[A[2]||(A[2]=e.createElementVNode("i",{class:"ri-search-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(y.$t("config.splitView.noResults")),1)])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Mg,[b.value?(e.openBlock(),e.createElementBlock("div",Xg,[e.createVNode(ti,{item:b.value,description:t.descriptions[b.value.key],"onUpdate:value":W,onDefine:Z,onUndefine:N},null,8,["item","description"])])):(e.openBlock(),e.createElementBlock("div",Og,[A[3]||(A[3]=e.createElementVNode("i",{class:"ri-settings-3-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(y.$t("config.splitView.selectConfig")),1)]))])]))}},[["__scopeId","data-v-92507923"]]),wg={name:"ConfigUpload",components:{PrimeFileUpload:ya},props:{loading:{type:Boolean,default:!1}},emits:["upload-config"],methods:{handleFileUpload(t){const l=t.files[0];if(!l)return;const a=new FileReader;a.onload=i=>{try{const o=JSON.parse(i.target.result);this.$emit("upload-config",o)}catch{this.$toast.add({severity:"error",summary:"Fichier Invalide",detail:this.$t("config.errors.invalidJsonFile"),life:4e3})}},a.onerror=i=>{console.error("handle file upload error",i)},a.readAsText(l)}}},kg={class:"config-upload"},Cg={class:"config-upload-description"},Tg={class:"config-upload-warning"};function Ig(t,l,a,i,o,n){const s=e.resolveComponent("PrimeFileUpload");return e.openBlock(),e.createElementBlock("div",kg,[e.createElementVNode("p",Cg,e.toDisplayString(t.$t("config.raw.uploadDescription")),1),e.createVNode(s,{mode:"basic",name:"configfile[]",accept:".json",maxFileSize:1e6,customUpload:"",onUploader:n.handleFileUpload,chooseLabel:t.$t("config.raw.uploadButton"),auto:"",loading:a.loading,severity:"danger",class:"config-upload-button"},null,8,["onUploader","chooseLabel","loading"]),e.createElementVNode("small",Tg,e.toDisplayString(t.$t("config.raw.uploadWarning")),1)])}const K2=fe(wg,[["render",Ig],["__scopeId","data-v-cda1f133"]]),jg={name:"ListVersionConfig",components:{PrimeButton:de,PrimeCard:Zo,PrimeTextarea:zl,PrimeProgressSpinner:Bt},props:{currentNode:{type:Object,required:!0},versions:{type:Array,default:()=>[]},title:{type:String,default:""}},emits:["reload"],data(){return{selectedVersion:null,selectedVersionContent:"",isContentLoading:!1}},methods:{async selectVersion(t){if(!(this.selectedVersion&&this.selectedVersion.id===t.id)){this.selectedVersion=t,this.isContentLoading=!0,this.selectedVersionContent="";try{const a=await(await this.getContent(this.currentNode.id,t.id)).text(),i=JSON.parse(a);this.selectedVersionContent=JSON.stringify(i,null,2)}catch{this.selectedVersionContent=this.$t("config.versionViewer.loadError")}finally{this.isContentLoading=!1}}},download(t){this.getContent(this.currentNode.id,t.id,!1).then(l=>{const i=this.currentNode.name.split("."),o=i.pop(),n=i.join("."),s=document.createElement("a"),r=t.id.replace(".","-");s.href=URL.createObjectURL(l),s.download=`${n}_v${r}.${o}`,s.click()})},revert(t){if(!this.versions||this.versions.length===0){console.error("Le tableau des versions est vide.");return}if(this.versions[0].entry.id===t.id){this.$toast.add({severity:"warn",summary:this.$t("error"),detail:this.$t("config.versionViewer.cannotRevertLatest"),life:3e3});return}const a=this.$t("config.versionViewer.restoredVersionComment",{versionNumber:t.id});Ye.revertVersion(this.currentNode.id,t.id,a).then(()=>{this.$emit("reload"),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("config.versionViewer.success"),life:3e3})}).catch(i=>{console.error(i),this.$toast.add({severity:"error",summary:this.$t("error"),detail:i.message||this.$t("config.versionViewer.error"),life:3e3})})},getContent(t,l){return Ye.getVersionContent(t,l).catch(a=>(this.$toast.add({severity:"error",summary:this.$t("error"),detail:a.message||this.$t("config.versionViewer.genericError"),life:3e3}),Promise.reject(a)))},toLocaleDateString(t){if(!t)return"";let l=new Date(t);return new Intl.DateTimeFormat("fr-FR",{dateStyle:"medium"}).format(l)},toLocaleTimeString(t){return t?new Date(t).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit",hour12:!1}):""}}},Gg={key:0,class:"version-section-title"},Dg={class:"version-layout"},Lg={class:"version-list-column"},Vg={class:"version-list-container"},vg=["onClick"],Fg={class:"version-bubble"},Rg={class:"version-bubble-text"},Sg={class:"version-info"},xg={class:"version-author"},Ug={key:0},Jg={class:"version-actions"},Eg={class:"version-content-column"},Bg={key:0,class:"version-loading"},Hg={key:1},Qg={key:2,class:"version-empty"};function Pg(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("PrimeProgressSpinner"),c=e.resolveComponent("PrimeTextarea"),m=e.resolveComponent("PrimeCard"),h=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",null,[a.title?(e.openBlock(),e.createElementBlock("span",Gg,e.toDisplayString(a.title.toUpperCase()),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Dg,[e.createElementVNode("div",Lg,[e.createElementVNode("ul",Vg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.versions,b=>(e.openBlock(),e.createElementBlock("li",{key:b.id,class:e.normalizeClass(["version-row",{"active-version":o.selectedVersion&&o.selectedVersion.id===b.entry.id}]),onClick:p=>n.selectVersion(b.entry)},[e.createElementVNode("div",Fg,[e.createElementVNode("span",Rg,e.toDisplayString(b.entry.id),1)]),e.createElementVNode("span",Sg,[e.createTextVNode(e.toDisplayString(n.toLocaleDateString(b.entry.modifiedAt))+" "+e.toDisplayString(t.$t("at"))+" "+e.toDisplayString(n.toLocaleTimeString(b.entry.modifiedAt))+" ",1),e.createElementVNode("span",xg,[e.createTextVNode(e.toDisplayString(t.$t("by"))+" "+e.toDisplayString(b.entry.modifiedByUser.displayName)+" ",1),l[0]||(l[0]=e.createElementVNode("br",null,null,-1)),b.entry.versionComment?(e.openBlock(),e.createElementBlock("em",Ug,e.toDisplayString(b.entry.versionComment),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Jg,[e.withDirectives(e.createVNode(s,{type:"button",icon:"ri-download-line","aria-label":t.$t("download"),onClick:e.withModifiers(p=>n.download(b.entry),["stop"]),severity:"secondary",rounded:"",text:""},null,8,["aria-label","onClick"]),[[h,t.$t("download"),void 0,{left:!0}]]),e.withDirectives(e.createVNode(s,{type:"button",icon:"ri-history-line","aria-label":t.$t("restore"),onClick:p=>n.revert(b.entry),severity:"secondary",rounded:"",text:""},null,8,["aria-label","onClick"]),[[h,t.$t("restore"),void 0,{left:!0}]])])],10,vg))),128))])]),e.createElementVNode("div",Eg,[e.createVNode(m,{class:"version-card"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("config.versionViewer.title")),1)]),content:e.withCtx(()=>[o.isContentLoading?(e.openBlock(),e.createElementBlock("div",Bg,[e.createVNode(r)])):o.selectedVersionContent?(e.openBlock(),e.createElementBlock("div",Hg,[e.createVNode(c,{"model-value":o.selectedVersionContent,readonly:"",class:"version-textarea"},null,8,["model-value"])])):(e.openBlock(),e.createElementBlock("div",Qg,[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-arrow-left-s-line ri-2x","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("config.versionViewer.selectPrompt")),1)]))]),_:1})])])])}const $2=fe(jg,[["render",Pg],["__scopeId","data-v-8bb7c5ba"]]),Do={id:null,property:null,negation:!1,operator:null,value:null,value_end:null},_g={name:"AddCriterionPopup",components:{PrimeDialog:pt,PrimeSelect:Dt,PrimeSelectButton:Fl,PrimeInputText:_e,PrimeDatePicker:Fa,PrimeInputNumber:Yl,PrimeButton:de,PrimeDataTable:$t,PrimeColumn:qt,PrimeIconField:Va,PrimeInputIcon:va},props:{visible:Boolean,properties:{type:Array,required:!0},editCriterion:{type:Object,default:null}},emits:["update:visible","add-criterion","update-criterion"],watch:{visible(t){if(t&&this.editCriterion){const l=JSON.parse(JSON.stringify(this.editCriterion));if(l.property&&(l.property.input==="date"||l.property.input==="datetime")&&(l.value&&(l.value=new Date(l.value)),l.value_end&&(l.value_end=new Date(l.value_end))),l.property&&l.property.id){const a=this.properties.find(i=>i.id===l.property.id);a&&(l.property=a)}this.criterion=l}else t&&(this.criterion={...Do});t&&(this.propertyFilter="")}},data(){return{criterion:{...Do},propertyFilter:"",operatorOptions:{text:[{labelKey:"rechercheAvancee.exact",value:"exact"},{labelKey:"rechercheAvancee.contains",value:"contains"}],date:[{labelKey:"rechercheAvancee.isDate",value:"exact"},{labelKey:"rechercheAvancee.isDateRange",value:"range"}],datetime:[{labelKey:"rechercheAvancee.isDate",value:"exact"},{labelKey:"rechercheAvancee.isDateRange",value:"range"}],number:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],int:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],double:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],boolean:[{labelKey:"rechercheAvancee.is",value:"exact"}]}}},computed:{negationOptions(){return[{label:`${this.$t("rechercheAvancee.mustContain")} (+)`,value:!1},{label:`${this.$t("rechercheAvancee.mustNotContain")} (-)`,value:!0}]},booleanOptions(){return[{label:this.$t("true"),value:!0},{label:this.$t("false"),value:!1}]},filteredProperties(){const t=this.propertyFilter?.toLowerCase().trim();return t?this.properties.filter(l=>(l.labelId?this.$t(l.labelId):l.title||"").toLowerCase().includes(t)||l.id.toLowerCase().includes(t)):this.properties},isCriterionValid(){return this.criterion.property&&this.criterion.operator&&this.criterion.value!==null&&this.criterion.value!==""},propertyType(){return this.criterion.property?this.criterion.property.input:"text"}},methods:{getOperatorsForCriterion(){const t=this.propertyType;return this.operatorOptions[t]||[]},onPropertyChange(){this.criterion.operator=null,this.criterion.value=null,this.criterion.value_end=null},addCriterion(){const t=this.getOperatorsForCriterion().find(l=>l.value===this.criterion.operator);this.$emit("add-criterion",{...this.criterion,id:Date.now(),operatorLabelKey:t?t.labelKey:this.criterion.operator}),this.criterion={...Do},this.$emit("update:visible",!1)},updateCriterion(){const t=this.getOperatorsForCriterion().find(l=>l.value===this.criterion.operator);this.$emit("update-criterion",{...this.criterion,operatorLabelKey:t?t.labelKey:this.criterion.operator}),this.criterion={...Do},this.$emit("update:visible",!1)}}},Kg={class:"flex flex-column gap-3"},$g={class:"flex flex-column gap-2"},qg={class:"font-semibold"},e5={key:0,class:"font-semibold"},t5={key:1,class:"font-semibold"},l5={class:"text-sm"},a5={class:"flex gap-3"},o5={class:"flex flex-column gap-1 flex-1"},n5={class:"font-semibold"},i5={class:"flex flex-column gap-1 flex-1"},s5={class:"font-semibold"},r5={class:"flex flex-column gap-1"},c5={class:"font-semibold"},d5={class:"flex gap-2 align-items-center"};function m5(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputIcon"),r=e.resolveComponent("PrimeInputText"),c=e.resolveComponent("PrimeIconField"),m=e.resolveComponent("PrimeColumn"),h=e.resolveComponent("PrimeDataTable"),b=e.resolveComponent("PrimeSelectButton"),p=e.resolveComponent("PrimeSelect"),d=e.resolveComponent("PrimeDatePicker"),W=e.resolveComponent("PrimeInputNumber"),Z=e.resolveComponent("PrimeButton"),N=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(N,{visible:a.visible,"onUpdate:visible":l[11]||(l[11]=y=>t.$emit("update:visible",y)),modal:"",header:a.editCriterion?t.$t("rechercheAvancee.editCriterionPopupTitle"):t.$t("rechercheAvancee.addCriterionPopupTitle"),style:{width:"600px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(Z,{label:t.$t("rechercheAvancee.cancelButton"),icon:"ri-close-line",onClick:l[10]||(l[10]=y=>t.$emit("update:visible",!1)),text:""},null,8,["label"]),a.editCriterion?(e.openBlock(),e.createBlock(Z,{key:0,label:t.$t("rechercheAvancee.updateButton"),icon:"ri-check-line",onClick:n.updateCriterion,disabled:!n.isCriterionValid},null,8,["label","onClick","disabled"])):(e.openBlock(),e.createBlock(Z,{key:1,label:t.$t("rechercheAvancee.addButton"),icon:"ri-add-line",onClick:n.addCriterion,disabled:!n.isCriterionValid},null,8,["label","onClick","disabled"]))]),default:e.withCtx(()=>[e.createElementVNode("div",Kg,[e.createElementVNode("div",$g,[e.createElementVNode("label",qg,e.toDisplayString(t.$t("rechercheAvancee.propertyLabel")),1),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s,{class:"ri-search-line"}),e.createVNode(r,{modelValue:o.propertyFilter,"onUpdate:modelValue":l[0]||(l[0]=y=>o.propertyFilter=y),placeholder:t.$t("rechercheAvancee.searchProperty"),class:"w-full",size:"small"},null,8,["modelValue","placeholder"])]),_:1}),e.createVNode(h,{selection:o.criterion.property,"onUpdate:selection":l[1]||(l[1]=y=>o.criterion.property=y),value:n.filteredProperties,"selection-mode":"single",dataKey:"id",paginator:n.filteredProperties.length>8,rows:8,size:"small",onRowSelect:n.onPropertyChange,scrollable:"",scrollHeight:"300px"},{default:e.withCtx(()=>[e.createVNode(m,{field:"name",header:t.$t("rechercheAvancee.propertyName"),sortable:""},{body:e.withCtx(y=>[y.data.labelId?(e.openBlock(),e.createElementBlock("span",e5,e.toDisplayString(t.$t(y.data.labelId)),1)):(e.openBlock(),e.createElementBlock("span",t5,e.toDisplayString(y.data.title),1))]),_:1},8,["header"]),e.createVNode(m,{field:"id",header:t.$t("rechercheAvancee.propertyId"),sortable:""},{body:e.withCtx(y=>[e.createElementVNode("code",l5,e.toDisplayString(y.data.id),1)]),_:1},8,["header"])]),_:1},8,["selection","value","paginator","onRowSelect"])]),e.createElementVNode("div",a5,[e.createElementVNode("div",o5,[e.createElementVNode("label",n5,e.toDisplayString(t.$t("rechercheAvancee.conditionLabel")),1),e.createVNode(b,{modelValue:o.criterion.negation,"onUpdate:modelValue":l[2]||(l[2]=y=>o.criterion.negation=y),options:n.negationOptions,optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])]),e.createElementVNode("div",i5,[e.createElementVNode("label",s5,e.toDisplayString(t.$t("rechercheAvancee.operatorLabel")),1),e.createVNode(p,{modelValue:o.criterion.operator,"onUpdate:modelValue":l[3]||(l[3]=y=>o.criterion.operator=y),options:n.getOperatorsForCriterion(),optionLabel:y=>t.$t(y.labelKey),optionValue:"value",placeholder:t.$t("rechercheAvancee.operatorPlaceholder"),disabled:!o.criterion.property},null,8,["modelValue","options","optionLabel","placeholder","disabled"])])]),e.createElementVNode("div",r5,[e.createElementVNode("label",c5,e.toDisplayString(t.$t("rechercheAvancee.valueLabel")),1),e.createElementVNode("div",d5,[n.propertyType==="text"?(e.openBlock(),e.createBlock(r,{key:0,modelValue:o.criterion.value,"onUpdate:modelValue":l[4]||(l[4]=y=>o.criterion.value=y),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),n.propertyType==="boolean"?(e.openBlock(),e.createBlock(b,{key:1,modelValue:o.criterion.value,"onUpdate:modelValue":l[5]||(l[5]=y=>o.criterion.value=y),options:n.booleanOptions,optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),n.propertyType==="date"||n.propertyType==="datetime"?(e.openBlock(),e.createBlock(d,{key:2,modelValue:o.criterion.value,"onUpdate:modelValue":l[6]||(l[6]=y=>o.criterion.value=y),dateFormat:"yy-mm-dd",class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),(n.propertyType==="date"||n.propertyType==="datetime")&&o.criterion.operator==="range"?(e.openBlock(),e.createBlock(d,{key:3,modelValue:o.criterion.value_end,"onUpdate:modelValue":l[7]||(l[7]=y=>o.criterion.value_end=y),dateFormat:"yy-mm-dd",class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),["int","double","number"].includes(n.propertyType)?(e.openBlock(),e.createBlock(W,{key:4,modelValue:o.criterion.value,"onUpdate:modelValue":l[8]||(l[8]=y=>o.criterion.value=y),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),["int","double","number"].includes(n.propertyType)&&o.criterion.operator==="range"?(e.openBlock(),e.createBlock(W,{key:5,modelValue:o.criterion.value_end,"onUpdate:modelValue":l[9]||(l[9]=y=>o.criterion.value_end=y),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0)])])])]),_:1},8,["visible","header"])}const Lo=fe(_g,[["render",m5]]),b5="pristy-config";class p5{getView(l){const a=xe();return xt.getConfig(a.INSTANCE_NAME,l).then(i=>i.jsonContent)}saveView(l,a){const i=xe();return xt.updateConfig(i.INSTANCE_NAME,l,a)}deleteView(l){const a=xe();return xt.updateConfig(a.INSTANCE_NAME,l,null)}async listViews(){return(await this.#e(["properties"])).filter(a=>a.name.startsWith("vue-")&&a.name.endsWith(".json")).map(a=>a.name)}async listViewEntries(){return(await this.#e(["properties","allowableOperations"])).filter(a=>a.name.startsWith("vue-")&&a.name.endsWith(".json"))}async#e(l){const a=xe(),o=(await He.listNodeChildren(b5,{where:`(name='${a.INSTANCE_NAME}')`})).list.entries[0]?.entry?.id;return o?(await He.listNodeChildren(o,{include:l})).list.entries.map(s=>s.entry):[]}}const Pt=new p5,Gt=Vt.global.t,za="env-config.json",li="savedViews.json",q2={include:["aspectNames","isFavorite","properties","allowableOperations","permissions","path","isLocked"],maxItems:500,skipCount:0};class u5{async _getHiddenFolder(l,a=!1){const o=(await Ye.getHomeFolderFromUser(l)).list.entries[0].entry.properties["cm:homeFolder"];if(!o)throw new Error(Gt("vuesUtilisateurs.noUserHomeFound"));let s=(await Ye.getChildrenWithOpts(o,q2,!1)).children.find(r=>r.aspectNames&&r.aspectNames.includes("pm:hidden"));return!s&&a&&(console.warn("No hidden folder found, creating one..."),s=(await this.createConfigFolder(o)).entry),s}async _getOrCreateViewsFile(l,a=!1){let o=(await Ye.getChildrenWithOpts(l,q2,!0)).children.find(n=>n.name===li);if(!o&&a){console.warn(`No ${li} file found, creating one...`);const n={name:li,nodeType:"cm:content"},s={personalSavedView:[],globalFavoriteView:[]},r=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),m=(await ht.uploadFile(l,n,r)).entry;o=(await Ye.updateNode(m.id,{aspectNames:[...m.aspectNames||[],"pm:hidden"]})).entry}return o}async getContent(l,a,i){try{return await Ye.getVersionContent(l,a,i)}catch(o){throw console.error("Error getting content:",o.message),o}}async _parseFileContent(l){let a;try{const i=await this.getContent(l.id,l.properties["cm:versionLabel"],!0);a=await(n=>new Promise((s,r)=>{if(!(n instanceof Blob)){s(n);return}const c=new FileReader;c.onload=()=>s(c.result),c.onerror=m=>r(m),c.readAsText(n,"utf-8")}))(i)}catch(i){console.warn(`Could not get content for node ${l.id}, assuming empty.`,i.message),a=""}if(!a||a.trim()==="")return{personalSavedView:[],globalFavoriteView:[]};try{return JSON.parse(a)}catch(i){return console.error("Error parsing JSON content:",i),{personalSavedView:[],globalFavoriteView:[]}}}_normalizeFileContent(l){return Array.isArray(l)?{personalSavedView:l,globalFavoriteView:[]}:{personalSavedView:l?.personalSavedView||[],globalFavoriteView:l?.globalFavoriteView||[]}}async _loadViewsFileContent(){const l=mt().person;if(!l)throw new Error(Gt("vuesUtilisateurs.userNotFound"));const a=await this._getHiddenFolder(l.id,!1);if(!a)return null;const i=await this._getOrCreateViewsFile(a.id,!1);return i?this._parseFileContent(i):null}async getPersonalViews(){try{const l=await this._loadViewsFileContent();return l?l?.personalSavedView||[]:[]}catch(l){return console.error("Error loading personal views:",l.message),[]}}async getPersonalViewsAndGlobalFavorites(){try{const l=await this._loadViewsFileContent();return l?this._normalizeFileContent(l):{personalSavedView:[],globalFavoriteView:[]}}catch(l){return console.error("Error loading personal views:",l.message),{personalSavedView:[],globalFavoriteView:[]}}}async getGlobalViews(){try{const l=await Pt.listViews();return l.length===0?xe().SAVED_VIEWS_GLOBAL||[]:(await Promise.all(l.map(i=>Pt.getView(i).then(o=>({id:o.id||i.replace(/^vue-/,"").replace(/\.json$/,""),name:o.name||i,description:o.description||"",scope:"global",filename:i,config:o.config||{locations:[],criteria:[]}})).catch(()=>null)))).filter(i=>i!==null)}catch(l){return console.error("Error loading global views from config:",l),xe().SAVED_VIEWS_GLOBAL||[]}}async createConfigFolder(l){const a={aspectNames:["pm:hidden"],nodeType:"cm:folder",name:"Configuration"};try{return await Ye.createNode(l,a)}catch(i){throw console.error("Error while creating the Configuration folder :",i),i}}async _savePersonalView(l){const a=mt().person;if(!a)throw new Error(Gt("vuesUtilisateurs.userNotFound"));const i=await this._getHiddenFolder(a.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let n=await this._parseFileContent(o),s=this._normalizeFileContent(n);const r=s.personalSavedView;if(r.some(h=>h.id===l.id))throw new Error(Gt("vuesUtilisateurs.savedViewError.idAlreadyExists",{id:l.id}));if(r.some(h=>h.name.toLowerCase()===l.name.toLowerCase()))throw new Error(Gt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:l.name}));r.push(l),s.personalSavedView=r;const c=JSON.stringify(s,null,2),m=new Blob([c],{type:"application/json"});await Ye.updateContentNode(o.id,m,"MAJEURE",null)}async saveView(l){if(l.scope==="global")try{const a=await xt.getConfig(xe().INSTANCE_NAME,za),i=a.jsonContent.SAVED_VIEWS_GLOBAL||[];if(i.some(o=>o.id===l.id))throw new Error(Gt("vuesUtilisateurs.savedViewError.idAlreadyExists",{id:l.id}));if(i.some(o=>o.name.toLowerCase()===l.name.toLowerCase()))throw new Error(Gt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:l.name}));i.push(l),a.jsonContent.SAVED_VIEWS_GLOBAL=i,await xt.updateConfig(xe().INSTANCE_NAME,za,a.jsonContent)}catch(a){throw console.error("Error while saving the global view :",a),a}else l.scope==="user"&&await this._savePersonalView(l)}async _updatePersonalView(l){const a=mt().person;if(!a)throw new Error(Gt("vuesUtilisateurs.userNotFoundForUpdate"));const i=await this._getHiddenFolder(a.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let n=await this._parseFileContent(o),s=this._normalizeFileContent(n);const r=s.personalSavedView;if(r.some(b=>b.id!==l.id&&b.name.toLowerCase()===l.name.toLowerCase()))throw new Error(Gt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:l.name}));const c=r.findIndex(b=>b.id===l.id);if(c===-1)throw new Error(Gt("vuesUtilisateurs.savedViewError.personnalNotFound",{id:l.id}));r[c]=l,s.personalSavedView=r;const m=JSON.stringify(s,null,2),h=new Blob([m],{type:"application/json"});return await Ye.updateContentNode(o.id,h,"MAJEURE",null)}async updateView(l){if(l.scope==="global")try{const a=await xt.getConfig(xe().INSTANCE_NAME,za),i=a.jsonContent.SAVED_VIEWS_GLOBAL||[];if(i.some(n=>n.id!==l.id&&n.name.toLowerCase()===l.name.toLowerCase()))throw new Error(Gt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:l.name}));const o=i.findIndex(n=>n.id===l.id);if(o===-1)throw new Error(Gt("vuesUtilisateurs.savedViewError.globalNotFound",{id:l.id}));return i[o]=l,a.jsonContent.SAVED_VIEWS_GLOBAL=i,await xt.updateConfig(xe().INSTANCE_NAME,za,a.jsonContent),l}catch(a){throw console.error("Error while updating the global view :",a),a}else if(l.scope==="user")return await this._updatePersonalView(l)}async _deletePersonalView(l){const a=mt().person;if(!a)throw new Error(Gt("vuesUtilisateurs.userNotFoundForDelete"));const i=await this._getHiddenFolder(a.id,!1);if(!i)throw new Error(Gt("vuesUtilisateurs.configFolderNotFound"));const o=await this._getOrCreateViewsFile(i.id,!1);if(!o)throw new Error(Gt("vuesUtilisateurs.configFileNotFound"));let n=await this._parseFileContent(o),s=this._normalizeFileContent(n);const r=s.personalSavedView;s.personalSavedView=r.filter(h=>h.id!==l.id);const c=JSON.stringify(s,null,2),m=new Blob([c],{type:"application/json"});await Ye.updateContentNode(o.id,m,"MAJEURE",null)}async deleteView(l){if(l.scope==="global"){try{const a=await xt.getConfig(xe().INSTANCE_NAME,za),i=a.jsonContent.SAVED_VIEWS_GLOBAL||[];a.jsonContent.SAVED_VIEWS_GLOBAL=i.filter(o=>o.id!==l.id),await xt.updateConfig(xe().INSTANCE_NAME,za,a.jsonContent)}catch(a){throw console.error("Error while deleting the global view :",a),a}return}else l.scope==="user"&&await this._deletePersonalView(l)}async getViewById(l,a){return l==="user"?(await this.getPersonalViews()).find(o=>o.id===a)||null:l==="global"?(await this.getGlobalViews()).find(o=>o.id===a)||null:(console.error(`Unknown view scope: ${l}`),null)}async toggleFavoriteStatus(l){if(l.scope==="global"){const a=mt().person;if(!a)throw new Error(Gt("vuesUtilisateurs.userNotFound"));const i=await this._getHiddenFolder(a.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let n=await this._parseFileContent(o),s=this._normalizeFileContent(n);const r=s.globalFavoriteView,c=r.findIndex(b=>b.id===l.id);c>-1?(r.splice(c,1),l.isFavorite=!1):(r.push({id:l.id,name:l.name}),l.isFavorite=!0),s.globalFavoriteView=r;const m=JSON.stringify(s,null,2),h=new Blob([m],{type:"application/json"});return await Ye.updateContentNode(o.id,h,"MAJEURE",null),l}else return l.isFavorite=!l.isFavorite,await this.updateView(l)}}const gl=new u5,ll=je.defineStore("userView",{state:()=>({locations:[],criteriaGroups:{rootOperator:"OR",groups:[]},loadedView:null,favoriteViews:[],personalViews:[],globalViews:[],viewsLoading:!0}),getters:{isSavedViewLoaded(t){return t.loadedView!==null},location(t){return t.locations.length>0?t.locations[0]:{type:null,value:""}},allCriteria(t){return t.criteriaGroups.groups.flatMap(l=>l.criteria)},criteria(t){return t.criteriaGroups.groups.flatMap(l=>l.criteria)}},actions:{loadView(t){if(!t||!t.config){console.error("Invalid saved view object provided to loadView",t);return}if(t.config.locations&&Array.isArray(t.config.locations))this.locations=t.config.locations;else if(t.config.location){const l=t.config.location;l.type&&l.value?this.locations=[{id:Date.now(),type:l.type,value:l.value,negation:l.negation||!1,label:l.label||l.value}]:this.locations=[]}else this.locations=[];if(t.config.criteriaGroups){const l=t.config.criteriaGroups;this.criteriaGroups={rootOperator:"OR",groups:(l.groups||[]).map(a=>({...a,operator:"AND"}))}}else t.config.criteria&&t.config.criteria.length>0?this.criteriaGroups={rootOperator:"OR",groups:[{id:"migrated",operator:"AND",criteria:t.config.criteria}]}:this.criteriaGroups={rootOperator:"OR",groups:[]};this.loadedView=t},addLocation(t){this.locations.push({...t,id:t.id||Date.now()})},removeLocation(t){this.locations.splice(t,1)},setLocation(t){t&&t.type&&t.value?this.locations=[{id:Date.now(),type:t.type,value:t.value,negation:t.negation||!1,label:t.label||t.value}]:this.locations=[]},setCriteria(t){t&&t.length>0?this.criteriaGroups={rootOperator:"OR",groups:[{id:String(Date.now()),operator:"AND",criteria:t}]}:this.criteriaGroups={rootOperator:"OR",groups:[]},this.loadedView=null},addGroup(t="AND"){this.criteriaGroups.groups.push({id:String(Date.now()),operator:t,criteria:[]})},removeGroup(t){this.criteriaGroups.groups.splice(t,1)},addCriterionToGroup(t,l){this.criteriaGroups.groups[t]&&this.criteriaGroups.groups[t].criteria.push(l)},removeCriterionFromGroup(t,l){this.criteriaGroups.groups[t]&&this.criteriaGroups.groups[t].criteria.splice(l,1)},updateCriterionInGroup(t,l,a){this.criteriaGroups.groups[t]&&this.criteriaGroups.groups[t].criteria.splice(l,1,a)},addCriterion(t){this.criteriaGroups.groups.length===0&&this.addGroup("AND"),this.criteriaGroups.groups[0].criteria.push(t)},removeCriterion(t){let l=t;for(const a of this.criteriaGroups.groups){if(l<a.criteria.length){a.criteria.splice(l,1);return}l-=a.criteria.length}},resetUserView(){this.locations=[],this.criteriaGroups={rootOperator:"OR",groups:[]},this.loadedView=null},async saveCurrentView(t){try{await gl.saveView(t),this.loadView(t)}catch(l){throw console.error("Error saving the current view:",l),l}},async updateCurrentView(t){try{const l=await gl.updateView(t);this.loadView(l.entry||l)}catch(l){throw console.error("Error updating the current view:",l),l}},async deleteCurrentView(){if(!this.loadedView)throw new Error("No view loaded to delete.");try{await gl.deleteView(this.loadedView),this.resetUserView()}catch(t){throw console.error("Error deleting the current view:",t),t}},async toggleViewFavorite(t){if(!t||!t.id)throw new Error("Invalid view provided to toggleFavorite action.");try{await gl.toggleFavoriteStatus(t),await this.fetchFavoriteViews()}catch(l){throw console.error("Error toggling favorite status in store:",l),l}},async fetchFavoriteViews(){this.viewsLoading=!0;try{const[t,l,a]=await Promise.all([gl.getPersonalViews(),gl.getGlobalViews(),gl.getPersonalViewsAndGlobalFavorites()]),i=a?.globalFavoriteView||[],o=(t||[]).filter(r=>r.isFavorite),n=(l||[]).filter(r=>i.some(c=>c.id===r.id));this.personalViews=t,this.globalViews=l;const s=r=>({label:r.name,to:`/vues/${r.scope}/${r.id}`});this.favoriteViews=[...o.map(s),...n.map(s)]}catch(t){console.error("Error fetching favorite views:",t),this.favoriteViews=[]}finally{this.viewsLoading=!1}},async fetchSavedViews(){this.viewsLoading=!0;try{const t=await Promise.allSettled([gl.getPersonalViews(),gl.getGlobalViews()]);t[0].status==="fulfilled"&&(this.personalViews=t[0].value),t[1].status==="fulfilled"&&(this.globalViews=t[1].value)}catch(t){console.error("Error fetching views:",t)}finally{this.viewsLoading=!1}}}}),Vo=je.defineStore({id:"SearchStore",state:()=>({language:"afts",userQuery:"",aftsQuery:"",fullQuery:"",paging:{maxItems:"15",skipCount:"0"},include:["properties","allowableOperations","permissions","path"],sort:null,defaultSort:[{type:"FIELD",field:"score",ascending:!1}],spellcheck:null,filterQueries:[],facetQueries:[],facets:[],fields:[],context:null,entries:[],pagination:{},isExactSearchActivated:!1}),getters:{facetFields(t){return{facetFields:t.facets}}},actions:{setIsExactSearchActivated(t){this.isExactSearchActivated=t},reset(){const t=xe();this.language="afts",this.userQuery="",this.fullQuery="",this.filterQueries=[...t.SEARCH_BASE_FILTER_QUERIES],this.facetQueries=[...t.SEARCH_FACET_QUERIES],this.facets=[...t.SEARCH_FACET],this.fields=[],this.context=null,this.entries=[],this.pagination={}},defineUserQuery(t){const l=xe();let a=null;this.isExactSearchActivated?a=l.SEARCH_USER_QUERY.replaceAll("*","").replaceAll("%s",t):(a=l.SEARCH_USER_QUERY.replaceAll("%s",t),a=a.replaceAll("**","*")),this.language="afts",this.userQuery=t,this.fullQuery=a},queryStore(t,l,a=null){if(!t)return Promise.resolve();const i=parseInt(this.paging.maxItems)||15;this.paging.skipCount=l?l*i:0,a?(this.fullQuery=a,this.userQuery=t):this.defineUserQuery(t);const o=a?[]:[...this.filterQueries];for(const s of this.fields)o.some(r=>r.query===s.query)||o.push({query:s.query});o.some(s=>s.query==="-ASPECT:'pm:hidden'")||o.push({query:"-ASPECT:'pm:hidden'"});let n={query:{language:this.language,query:this.fullQuery},include:this.include,paging:this.paging,filterQueries:o.map(s=>({query:s.query})),facetQueries:this.facetQueries,facetFields:{facets:this.facets.map(s=>({field:s.field,mincount:s.mincount,label:s.label}))},sort:this.sort||this.defaultSort,facetFormat:"V2"};return Ht.search(n).then(s=>{this.context=s.list.context,l>0?this.entries=[...this.entries,...s.list.entries]:this.entries=s.list.entries,this.pagination=s.list.pagination})},searchForExport(t){let l={...this.paging};l.maxItems=t;const a=[...this.filterQueries];for(const o of this.fields)a.some(n=>n.query===o.query)||a.push({query:o.query});a.some(o=>o.query==="-ASPECT:'pm:hidden'")||a.push({query:"-ASPECT:'pm:hidden'"});let i={query:{language:this.language,query:this.fullQuery},include:this.include,paging:l,filterQueries:a.map(o=>({query:o.query})),facetQueries:this.facetQueries,facetFields:{facets:this.facets.map(o=>({field:o.field,mincount:o.mincount,label:o.label}))},sort:this.sort||this.defaultSort,facetFormat:"V2"};return Ht.search(i).then(o=>o)},addSortField(t){this.sort=t},removeSortField(){this.sort=null},addFilterQuery(t){return t.query?this.filterQueries.find(l=>l.query===t.query)?!1:(this.filterQueries.push({query:t.query,label:t.label}),!0):!1},removeFilterQuery(t){this.filterQueries=this.filterQueries.filter(l=>t.query.startsWith("(SITE:")&&l.label&&(l.label.startsWith("Dossier :")||l.label.startsWith("Folder :"))?!1:l.query!==t.query)},addField(t){return this.fields.find(l=>l.query===t.query)?!1:(this.fields.push({query:t.query,label:t.label}),!0)},removeField(t){this.fields=this.fields.filter(l=>l.query!==t.query)}}}),h5={name:"ExactSearch",components:{PrimeToggleButton:Qm},props:{disabled:{type:Boolean,default:!1}},watch:{disabled(t){t&&this.exactSearch&&(this.exactSearch=!1)}},emits:["change-exact-search-settings"],computed:{...je.mapState(Vo,["isExactSearchActivated"]),exactSearch:{get(){return this.isExactSearchActivated},set(t){this.setIsExactSearchActivated(t),this.$emit("change-exact-search-settings",t)}}},methods:{...je.mapActions(Vo,["setIsExactSearchActivated"])}},y5={id:"exactSearch",class:"flex gap-3 p-3 rounded-2xl"},Z5={class:"text-gray-700 font-medium align-content-center"};function g5(t,l,a,i,o,n){const s=e.resolveComponent("PrimeToggleButton");return e.openBlock(),e.createElementBlock("div",y5,[e.createElementVNode("span",Z5,e.toDisplayString(t.$t("exactSearch")),1),e.createVNode(s,{modelValue:n.exactSearch,"onUpdate:modelValue":l[0]||(l[0]=r=>n.exactSearch=r),binary:"",onLabel:t.$t("enabled"),offLabel:t.$t("disabled"),class:"rounded-xl",disabled:a.disabled},null,8,["modelValue","onLabel","offLabel","disabled"])])}const ai=fe(h5,[["render",g5]]),f5={name:"UserViewsFavoritesPanel",components:{PrimeSelect:Dt},props:{globalOnly:{type:Boolean,default:!1}},data(){return{selectedPersonalSearch:null,selectedGlobalSearch:null}},mounted(){this.fetchSavedViews()},computed:{...je.mapState(ll,{loadedView:"loadedView",personalViews:"personalViews",globalViews:"globalViews",loading:"viewsLoading"}),hasGroupedSearches(){return this.globalOnly?this.globalViews.length>0:this.personalViews.length>0||this.globalViews.length>0}},emits:["load-view"],methods:{...je.mapActions(ll,["fetchSavedViews"]),onDropdownChange(t){t.value&&(this.selectView(t.value),this.$nextTick(()=>{this.selectedPersonalSearch=null,this.selectedGlobalSearch=null}))},selectView(t){this.$emit("load-view",t)}}},W5={key:0,class:"text-center p-3"},N5={key:1,class:"text-center text-gray-500 p-3"},A5={key:2},Y5={class:"flex flex-column gap-4"},z5={key:0,class:"flex flex-column gap-2"},M5={for:"personal-searches-dropdown"},X5={class:"flex flex-column align-items-start w-30rem overflow-hidden"},O5={class:"font-bold"},w5={key:0,class:"text-color-secondary w-full overflow-hidden text-overflow-ellipsis white-space-nowrap block"},k5={key:1,class:"flex flex-column gap-2"},C5={for:"global-searches-dropdown"},T5={class:"flex flex-column align-items-start w-30rem overflow-hidden"},I5={class:"font-bold"},j5={key:0,class:"text-color-secondary w-full overflow-hidden text-overflow-ellipsis white-space-nowrap block"};function G5(t,l,a,i,o,n){const s=e.resolveComponent("PrimeSelect"),r=e.resolveDirective("tooltip");return t.loading?(e.openBlock(),e.createElementBlock("div",W5,[...l[2]||(l[2]=[e.createElementVNode("i",{class:"ri-loader-4-line ri-spin text-4xl"},null,-1)])])):n.hasGroupedSearches?(e.openBlock(),e.createElementBlock("div",A5,[e.createElementVNode("div",Y5,[!a.globalOnly&&t.personalViews.length>0?(e.openBlock(),e.createElementBlock("div",z5,[e.createElementVNode("label",M5,e.toDisplayString(t.$t("vuesFavorites.personalViews")),1),e.createVNode(s,{id:"personal-searches-dropdown",modelValue:o.selectedPersonalSearch,"onUpdate:modelValue":l[0]||(l[0]=c=>o.selectedPersonalSearch=c),options:t.personalViews,optionLabel:"name",placeholder:t.$t("vuesFavorites.selectPersonalView"),onChange:n.onDropdownChange,filter:"",filterBy:["name","description"],filterPlaceholder:t.$t("vuesFavorites.filterSavedViews")},{option:e.withCtx(c=>[e.createElementVNode("div",X5,[e.createElementVNode("div",O5,e.toDisplayString(c.option.name),1),c.option.description?e.withDirectives((e.openBlock(),e.createElementBlock("small",w5,[e.createTextVNode(e.toDisplayString(c.option.description),1)])),[[r,c.option.description,void 0,{left:!0}]]):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder","onChange","filterPlaceholder"])])):e.createCommentVNode("",!0),t.globalViews.length>0?(e.openBlock(),e.createElementBlock("div",k5,[e.createElementVNode("label",C5,e.toDisplayString(t.$t("vuesFavorites.globalViews")),1),e.createVNode(s,{id:"global-searches-dropdown",modelValue:o.selectedGlobalSearch,"onUpdate:modelValue":l[1]||(l[1]=c=>o.selectedGlobalSearch=c),options:t.globalViews,optionLabel:"name",placeholder:t.$t("vuesFavorites.selectGlobalView"),onChange:n.onDropdownChange,filter:"",filterBy:["name","description"],filterPlaceholder:t.$t("vuesFavorites.filterSavedViews")},{option:e.withCtx(c=>[e.createElementVNode("div",T5,[e.createElementVNode("div",I5,e.toDisplayString(c.option.name),1),c.option.description?e.withDirectives((e.openBlock(),e.createElementBlock("small",j5,[e.createTextVNode(e.toDisplayString(c.option.description),1)])),[[r,c.option.description,void 0,{left:!0}]]):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder","onChange","filterPlaceholder"])])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",N5,e.toDisplayString(t.$t("vuesFavorites.noSavedViews")),1))}const vo=fe(f5,[["render",G5],["__scopeId","data-v-8a1b9530"]]),D5={name:"SaveViewPopup",components:{PrimeDialog:pt,PrimeStepper:Ji,PrimeStepList:Ei,PrimeStep:Bi,PrimeStepPanels:Pm,PrimeStepPanel:_m,PrimeInputText:_e,PrimeInputGroup:uo,PrimeInputGroupAddon:Ra,PrimeTextarea:zl,PrimeSelectButton:Fl,PrimeButton:de},props:{visible:Boolean,errorMessage:{type:String,default:null},viewData:{type:Object,default:null},globalOnly:{type:Boolean,default:!1}},emits:["update:visible","save-view","clear-error"],data(){return{currentStep:"1",viewName:"",viewDescription:"",viewFileId:"",scope:"user"}},mounted(){this.checkPristyAdminStatus()},computed:{...je.mapState(mt,["isPristyAdmin"]),isEditMode(){return!!this.viewData},showScopeStep(){return this.isPristyAdmin&&!this.globalOnly},fileIdStep(){return this.showScopeStep?"2":"1"},detailsStep(){return this.showScopeStep?"3":"2"},scopeOptions(){const t=[{label:this.$t("vuesUtilisateurs.saveViewPopup.scopeUser"),value:"user"}];return this.isPristyAdmin&&t.push({label:this.$t("vuesUtilisateurs.saveViewPopup.scopeGlobal"),value:"global"}),t},isFormValid(){return!(!this.viewName||this.scope==="global"&&!this.viewFileId)}},methods:{...je.mapActions(mt,["checkPristyAdminStatus"]),save(){if(!this.isFormValid)return;const t={name:this.viewName,description:this.viewDescription,scope:this.scope};if(this.scope==="global"){const l=this.viewFileId.toLowerCase().replace(/[^a-z0-9-]/g,"-");t.filename=`vue-${l}.json`}this.$emit("save-view",t)},resetForm(){this.viewName="",this.viewDescription="",this.viewFileId="",this.scope=this.globalOnly?"global":"user",this.currentStep=this.globalOnly?this.fileIdStep:"1",this.$emit("clear-error")},populateForm(){this.isEditMode?(this.viewName=this.viewData.name,this.viewDescription=this.viewData.description||"",this.scope=this.globalOnly?"global":this.viewData.scope,this.viewData.filename&&(this.viewFileId=this.viewData.filename.replace(/^vue-/,"").replace(/\.json$/,"")),this.currentStep=this.detailsStep):(this.scope=this.globalOnly?"global":"user",this.currentStep=this.globalOnly?this.fileIdStep:"1")}},watch:{visible(t){t?this.populateForm():this.resetForm()}}},L5={class:"flex flex-column gap-3 py-3"},V5={class:"m-0 text-gray-600"},v5={class:"flex justify-content-end pt-3"},F5={class:"flex flex-column gap-3 py-3"},R5={key:0,class:"m-0 text-gray-600"},S5={key:2,class:"m-0 text-gray-600"},x5={class:"flex justify-content-between pt-3"},U5={key:1},J5={class:"flex flex-column gap-3 py-3"},E5={class:"flex flex-column gap-1"},B5={class:"font-semibold"},H5={key:0,class:"p-error"},Q5={key:1,class:"p-error"},P5={class:"flex flex-column gap-1"},_5={class:"font-semibold"},K5={class:"flex justify-content-between pt-3"};function $5(t,l,a,i,o,n){const s=e.resolveComponent("PrimeStep"),r=e.resolveComponent("PrimeStepList"),c=e.resolveComponent("PrimeSelectButton"),m=e.resolveComponent("PrimeButton"),h=e.resolveComponent("PrimeStepPanel"),b=e.resolveComponent("PrimeInputGroupAddon"),p=e.resolveComponent("PrimeInputText"),d=e.resolveComponent("PrimeInputGroup"),W=e.resolveComponent("PrimeTextarea"),Z=e.resolveComponent("PrimeStepPanels"),N=e.resolveComponent("PrimeStepper"),y=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(y,{visible:a.visible,"onUpdate:visible":l[6]||(l[6]=A=>t.$emit("update:visible",A)),modal:"",header:n.isEditMode?t.$t("vuesUtilisateurs.modifyViewPopup.title"):t.$t("vuesUtilisateurs.saveViewPopup.title"),style:{width:"550px",maxWidth:"95vw"}},{default:e.withCtx(()=>[e.createVNode(N,{value:o.currentStep,"onUpdate:value":l[5]||(l[5]=A=>o.currentStep=A),linear:""},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[n.showScopeStep?(e.openBlock(),e.createBlock(s,{key:0,value:"1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.scopeLabel")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(s,{value:n.fileIdStep},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.fileIdLabel")),1)]),_:1},8,["value"]),e.createVNode(s,{value:n.detailsStep},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.detailsLabel")),1)]),_:1},8,["value"])]),_:1}),e.createVNode(Z,null,{default:e.withCtx(()=>[n.showScopeStep?(e.openBlock(),e.createBlock(h,{key:0,value:"1"},{default:e.withCtx(({activateCallback:A})=>[e.createElementVNode("div",L5,[e.createElementVNode("p",V5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.scopeDescription")),1),e.createVNode(c,{modelValue:o.scope,"onUpdate:modelValue":l[0]||(l[0]=f=>o.scope=f),options:n.scopeOptions,optionLabel:"label",optionValue:"value",disabled:n.isEditMode},null,8,["modelValue","options","disabled"])]),e.createElementVNode("div",v5,[e.createVNode(m,{label:t.$t("next"),icon:"ri-arrow-right-line",iconPos:"right",onClick:f=>A(n.fileIdStep),disabled:!o.scope},null,8,["label","onClick","disabled"])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h,{value:n.fileIdStep},{default:e.withCtx(({activateCallback:A})=>[e.createElementVNode("div",F5,[o.scope==="global"?(e.openBlock(),e.createElementBlock("p",R5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.fileIdDescription")),1)):e.createCommentVNode("",!0),o.scope==="global"?(e.openBlock(),e.createBlock(d,{key:1},{default:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("vue-",-1)])]),_:1}),e.createVNode(p,{modelValue:o.viewFileId,"onUpdate:modelValue":l[1]||(l[1]=f=>o.viewFileId=f),modelModifiers:{trim:!0},placeholder:t.$t("vuesUtilisateurs.saveViewPopup.fileIdPlaceholder"),disabled:n.isEditMode},null,8,["modelValue","placeholder","disabled"]),e.createVNode(b,null,{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode(".json",-1)])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("p",S5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.personalDescription")),1))]),e.createElementVNode("div",x5,[n.showScopeStep?(e.openBlock(),e.createBlock(m,{key:0,label:t.$t("previous"),icon:"ri-arrow-left-line",severity:"secondary",onClick:f=>A("1")},null,8,["label","onClick"])):(e.openBlock(),e.createElementBlock("span",U5)),e.createVNode(m,{label:t.$t("next"),icon:"ri-arrow-right-line",iconPos:"right",onClick:f=>A(n.detailsStep),disabled:o.scope==="global"&&!o.viewFileId},null,8,["label","onClick","disabled"])])]),_:1},8,["value"]),e.createVNode(h,{value:n.detailsStep},{default:e.withCtx(({activateCallback:A})=>[e.createElementVNode("div",J5,[e.createElementVNode("div",E5,[e.createElementVNode("label",B5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.nameLabel")),1),e.createVNode(p,{modelValue:o.viewName,"onUpdate:modelValue":l[2]||(l[2]=f=>o.viewName=f),modelModifiers:{trim:!0},class:e.normalizeClass({"p-invalid":a.errorMessage}),onInput:l[3]||(l[3]=f=>t.$emit("clear-error"))},null,8,["modelValue","class"]),!o.viewName&&!a.errorMessage?(e.openBlock(),e.createElementBlock("small",H5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.nameRequired")),1)):e.createCommentVNode("",!0),a.errorMessage?(e.openBlock(),e.createElementBlock("small",Q5,e.toDisplayString(a.errorMessage),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",P5,[e.createElementVNode("label",_5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.descriptionLabel")),1),e.createVNode(W,{modelValue:o.viewDescription,"onUpdate:modelValue":l[4]||(l[4]=f=>o.viewDescription=f),rows:"3",autoResize:""},null,8,["modelValue"])])]),e.createElementVNode("div",K5,[e.createVNode(m,{label:t.$t("previous"),icon:"ri-arrow-left-line",severity:"secondary",onClick:f=>A(n.fileIdStep)},null,8,["label","onClick"]),e.createVNode(m,{label:n.isEditMode?t.$t("vuesUtilisateurs.modifyView"):t.$t("vuesUtilisateurs.saveView"),icon:"ri-save-3-line",onClick:n.save,disabled:!n.isFormValid},null,8,["label","onClick","disabled"])])]),_:1},8,["value"])]),_:1})]),_:1},8,["value"])]),_:1},8,["visible","header"])}const Fo=fe(D5,[["render",$5]]),q5={name:"AdvancedSearchPanel",components:{ExactSearch:ai,PrimeAccordion:Ri,PrimeAccordionPanel:Si,PrimeAccordionHeader:xi,PrimeAccordionContent:Ui,UserViewsFavoritesPanel:vo,PrimeSelectButton:Fl,PrimeInputText:_e,PrimeButton:de,AddCriterionPopup:Lo,SaveViewPopup:Fo,PrimeDialog:pt,TreeExplorer:aa},emits:["change-exact-search-settings","load-view"],watch:{"location.type"(t){t||this.updateLocationValue("")}},data(){return{isAddCriterionDialogVisible:!1,saveViewDialogVisible:!1,saveViewDialogMode:"create",saveViewError:null,isDossierTreeVisible:!1,isDeleteConfirmVisible:!1}},mounted(){this.checkPristyAdminStatus()},computed:{...je.mapState(mt,["isPristyAdmin"]),...je.mapState(ll,["location","criteria","loadedView"]),locationModel:{get(){return this.location},set(t){this.setLocation(t)}},locationOptions(){return[{label:this.$t("vuesUtilisateurs.locationSite"),value:"Site"},{label:this.$t("folder"),value:"Folder"}]},locationPlaceholder(){return this.locationModel.type==="Site"?this.$t("vuesUtilisateurs.sitePlaceholder"):this.locationModel.type==="Folder"?this.$t("vuesUtilisateurs.folderPlaceholder"):""},hasActiveCriteria(){const t=this.location&&this.location.type&&this.location.value;return!!(this.criteria&&this.criteria.length>0||t)},isSavedViewLoaded(){return this.loadedView!==null},canManageLoadedView(){return this.isSavedViewLoaded?this.loadedView.scope==="user"?!0:this.loadedView.scope==="global"?this.isPristyAdmin:!1:!1},viewToEdit(){return this.saveViewDialogMode==="edit"?this.loadedView:null},availableProperties(){return xe().METADATA.filter(l=>l.display&&(l.display.includes("view")||l.display.includes("advancedSearch")))}},methods:{...je.mapActions(mt,["checkPristyAdminStatus"]),...je.mapActions(ll,["setLocation","addCriterion","removeCriterion","saveCurrentView","updateCurrentView","deleteCurrentView"]),clearSaveViewError(){this.saveViewError=null},handleDossierSelected(t){this.updateLocationValue(t.id),this.isDossierTreeVisible=!1},openSaveViewPopup(){this.saveViewDialogMode="create",this.saveViewDialogVisible=!0},modifyView(){this.saveViewDialogMode="edit",this.saveViewDialogVisible=!0},deleteView(){this.isDeleteConfirmVisible=!0},async handleDeleteConfirmation(){this.isDeleteConfirmVisible=!1;try{await this.deleteCurrentView(),this.$toast.add({severity:"success",summary:"Succès",detail:"Recherche supprimée avec succès.",life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews()}catch(t){this.$toast.add({severity:"error",summary:"Erreur",detail:t.message,life:5e3})}},async handleSaveView(t){this.clearSaveViewError();const l=this.saveViewDialogMode==="create";let a,i,o;const n={location:JSON.parse(JSON.stringify(this.location)),criteria:JSON.parse(JSON.stringify(this.criteria))};l?(a=this.saveCurrentView,o="vuesUtilisateurs.addsSavedViewSuccess",i={id:crypto.randomUUID(),name:t.name,description:t.description,scope:t.scope,config:n}):(a=this.updateCurrentView,o="vuesUtilisateurs.modifySavedViewSuccess",i={...this.loadedView,name:t.name,description:t.description,config:n});try{await a(i),this.$toast.add({severity:"success",summary:"Succès",detail:this.$t(o),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1}catch(s){this.$toast.add({severity:"error",summary:"Erreur",detail:s.message,life:5e3})}},handleLoadView(t){this.$emit("load-view",t)},updateLocationValue(t){let l=t;this.locationModel.type==="Folder"&&t&&!t.startsWith("workspace://")&&(l=`workspace://SpacesStore/${t}`),this.setLocation({...this.locationModel,value:l})},handleCriterionAdded(t){this.addCriterion(t)},formatCriterionValueForDisplay(t){if(t.value===null||t.value===void 0)return"";if(t.operator==="range"){const l=t.value instanceof Date?new Date(t.value).toLocaleDateString():t.value||"*",a=t.value_end instanceof Date?new Date(t.value_end).toLocaleDateString():t.value_end||"*";return`[${l} -> ${a}]`}else return t.value instanceof Date?new Date(t.value).toLocaleDateString():typeof t.value=="boolean"?this.$t(t.value?"true":"false"):`"${t.value}"`}}},ef={key:0,class:"p-2 mb-3 border-1 border-round border-blue-200 bg-blue-50 text-blue-700"},tf={class:"font-bold"},lf={class:"p-fluid formgrid grid"},af={class:"field col-12"},of={for:"locationType"},nf={key:0,class:"field col-12"},sf={for:"locationValue"},rf={key:0,id:"username-help"},cf={class:"mt-4"},df={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round"},mf={key:1,class:"flex flex-column gap-2"},bf={class:"flex-grow-1"},pf={class:"font-bold mr-1"},uf={class:"font-italic mr-1"},hf={class:"text-gray-700"},yf={key:3,class:"flex gap-2 mt-2"},Zf={class:"flex align-items-center"},gf={key:0};function ff(t,l,a,i,o,n){const s=e.resolveComponent("ExactSearch"),r=e.resolveComponent("PrimeAccordionHeader"),c=e.resolveComponent("UserViewsFavoritesPanel"),m=e.resolveComponent("PrimeAccordionContent"),h=e.resolveComponent("PrimeAccordionPanel"),b=e.resolveComponent("PrimeSelectButton"),p=e.resolveComponent("PrimeInputText"),d=e.resolveComponent("PrimeButton"),W=e.resolveComponent("PrimeAccordion"),Z=e.resolveComponent("AddCriterionPopup"),N=e.resolveComponent("SaveViewPopup"),y=e.resolveComponent("TreeExplorer"),A=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{onChangeExactSearchSettings:l[0]||(l[0]=f=>t.$emit("change-exact-search-settings",f)),disabled:n.hasActiveCriteria||n.isSavedViewLoaded},null,8,["disabled"]),e.createVNode(W,{class:"mt-4",multiple:"",value:["0"]},{default:e.withCtx(()=>[e.createVNode(h,{value:"0"},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesFavorites.title")),1)]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(c,{ref:"savedSearchesPanel",onLoadView:n.handleLoadView},null,8,["onLoadView"])]),_:1})]),_:1}),e.createVNode(h,{value:"1"},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.queryBuilder")),1)]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[n.isSavedViewLoaded?(e.openBlock(),e.createElementBlock("div",ef,[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.loadedViewMessage"))+" ",1),e.createElementVNode("span",tf,e.toDisplayString(t.loadedView.name),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",lf,[e.createElementVNode("div",af,[e.createElementVNode("label",of,e.toDisplayString(t.$t("vuesUtilisateurs.locationLabel")),1),e.createVNode(b,{id:"locationType",modelValue:n.locationModel.type,"onUpdate:modelValue":l[1]||(l[1]=f=>n.locationModel.type=f),options:n.locationOptions,optionLabel:"label",optionValue:"value",allowEmpty:"",class:"w-full"},null,8,["modelValue","options"])]),n.locationModel.type?(e.openBlock(),e.createElementBlock("div",nf,[e.createElementVNode("label",sf,e.toDisplayString(t.$t("vuesUtilisateurs.valueLabel")),1),e.createVNode(p,{id:"locationValue",value:n.locationModel.value,placeholder:n.locationPlaceholder,onClick:l[2]||(l[2]=f=>n.locationModel.type==="Folder"?o.isDossierTreeVisible=!0:null),onChange:l[3]||(l[3]=f=>n.updateLocationValue(f.target.value))},null,8,["value","placeholder"]),n.locationModel.type==="Folder"?(e.openBlock(),e.createElementBlock("small",rf,"Ex: workspace://SpacesStore/{ID du dossier}")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",cf,[e.createElementVNode("h5",null,e.toDisplayString(t.$t("vuesUtilisateurs.criteriaTitle")),1),t.criteria.length===0?(e.openBlock(),e.createElementBlock("div",df,e.toDisplayString(t.$t("vuesUtilisateurs.noCriteria")),1)):(e.openBlock(),e.createElementBlock("div",mf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.criteria,(f,Y)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"flex align-items-center p-2 border-1 border-round border-gray-200"},[e.createElementVNode("div",bf,[e.createElementVNode("span",pf,e.toDisplayString(t.$t(f.property.labelId)),1),e.createElementVNode("span",{class:e.normalizeClass([f.negation?"text-red-500":"text-primary","mx-1"])},e.toDisplayString(f.negation?t.$t("vuesUtilisateurs.mustNotContain"):t.$t("vuesUtilisateurs.mustContain")),3),e.createElementVNode("span",uf,e.toDisplayString(t.$t(f.operatorLabelKey)),1),e.createElementVNode("span",hf,e.toDisplayString(n.formatCriterionValueForDisplay(f)),1)]),e.createVNode(d,{icon:"ri-delete-bin-line","aria-label":t.$t("delete"),text:"",rounded:"",severity:"danger",onClick:X=>t.removeCriterion(Y)},null,8,["aria-label","onClick"])]))),128))])),e.createVNode(d,{icon:"ri-add-line",label:t.$t("vuesUtilisateurs.addCriterionButton"),onClick:l[4]||(l[4]=f=>o.isAddCriterionDialogVisible=!0),class:"mt-3 w-full",outlined:""},null,8,["label"]),n.hasActiveCriteria?(e.openBlock(),e.createBlock(d,{key:2,icon:"ri-save-3-line",label:t.$t("vuesUtilisateurs.saveView"),onClick:n.openSaveViewPopup,class:"mt-3 w-full"},null,8,["label","onClick"])):e.createCommentVNode("",!0),n.canManageLoadedView?(e.openBlock(),e.createElementBlock("div",yf,[e.createVNode(d,{icon:"ri-pencil-line",label:t.$t("vuesUtilisateurs.modifyView"),onClick:n.modifyView,class:"w-full",severity:"secondary"},null,8,["label","onClick"]),e.createVNode(d,{icon:"ri-delete-bin-line",label:t.$t("vuesUtilisateurs.deleteView"),onClick:n.deleteView,class:"w-full",severity:"danger"},null,8,["label","onClick"])])):e.createCommentVNode("",!0)])]),_:1})]),_:1})]),_:1}),e.createVNode(Z,{visible:o.isAddCriterionDialogVisible,"onUpdate:visible":l[5]||(l[5]=f=>o.isAddCriterionDialogVisible=f),properties:n.availableProperties,onAddCriterion:n.handleCriterionAdded},null,8,["visible","properties","onAddCriterion"]),e.createVNode(N,{visible:o.saveViewDialogVisible,"onUpdate:visible":l[6]||(l[6]=f=>o.saveViewDialogVisible=f),"view-data":n.viewToEdit,"error-message":o.saveViewError,onSaveView:n.handleSaveView,onClearError:n.clearSaveViewError},null,8,["visible","view-data","error-message","onSaveView","onClearError"]),e.createVNode(A,{visible:o.isDossierTreeVisible,"onUpdate:visible":l[7]||(l[7]=f=>o.isDossierTreeVisible=f),header:"Choisir un dossier",modal:"",class:"w-full md:w-6"},{default:e.withCtx(()=>[e.createVNode(y,{"current-node":null,showUserHome:"",onSelectNode:n.handleDossierSelected},null,8,["onSelectNode"])]),_:1},8,["visible"]),e.createVNode(A,{visible:o.isDeleteConfirmVisible,"onUpdate:visible":l[9]||(l[9]=f=>o.isDeleteConfirmVisible=f),header:"Confirmation de suppression",modal:"",class:"dialog-confirm-delete"},{footer:e.withCtx(()=>[e.createVNode(d,{label:t.$t("no"),icon:"ri-close-line",onClick:l[8]||(l[8]=f=>o.isDeleteConfirmVisible=!1),class:"p-button-text"},null,8,["label"]),e.createVNode(d,{label:t.$t("yes"),icon:"ri-check-line",onClick:n.handleDeleteConfirmation,class:"p-button-danger",autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",Zf,[l[10]||(l[10]=e.createElementVNode("i",{class:"ri-alert-line mr-3 text-4xl","aria-hidden":"true"},null,-1)),t.loadedView?(e.openBlock(),e.createElementBlock("span",gf,e.toDisplayString(t.$t("vuesUtilisateurs.confirmDelete",{name:t.loadedView.name})),1)):e.createCommentVNode("",!0)])]),_:1},8,["visible"])],64)}const em=fe(q5,[["render",ff]]),Wf={name:"AdvancedViewPanel",components:{PrimeAccordion:Ri,PrimeAccordionPanel:Si,PrimeAccordionHeader:xi,PrimeAccordionContent:Ui,UserViewsFavoritesPanel:vo,PrimeSelectButton:Fl,PrimeInputText:_e,PrimeAutoComplete:Gi,PrimeButton:de,AddCriterionPopup:Lo,SaveViewPopup:Fo,PrimeDialog:pt,TreeExplorer:aa},props:{globalOnly:{type:Boolean,default:!1},showUserHome:{type:Boolean,default:!0},hideViewSelector:{type:Boolean,default:!1},canEditLoadedView:{type:Boolean,default:!1}},emits:["change-exact-search-settings","load-view","close-view","view-saved"],data(){return{isAddCriterionDialogVisible:!1,isAddLocationDialogVisible:!1,saveViewDialogVisible:!1,saveViewDialogMode:"create",saveViewError:null,isDossierTreeVisible:!1,isDeleteConfirmVisible:!1,availableSites:[],filteredSites:[],newLocation:{type:null,value:"",negation:!1,label:""},newLocationSiteInput:null,editingCriterion:null,editingGroupIndex:null,editingCriterionIndex:null,targetGroupIndex:null}},watch:{isAddCriterionDialogVisible(t){t||(this.editingCriterion=null,this.editingGroupIndex=null,this.editingCriterionIndex=null,this.targetGroupIndex=null)}},async mounted(){this.checkPristyAdminStatus(),await this.loadSites()},computed:{...je.mapState(mt,["isPristyAdmin"]),...je.mapState(ll,["locations","criteriaGroups","allCriteria","loadedView"]),locationOptions(){return[{label:this.$t("rechercheAvancee.locationSite"),value:"Site"},{label:this.$t("folder"),value:"Folder"}]},conditionOptions(){return[{label:this.$t("rechercheAvancee.includePrefix"),value:!1},{label:this.$t("rechercheAvancee.excludePrefix"),value:!0}]},hasActiveCriteria(){return!!(this.allCriteria&&this.allCriteria.length>0||this.locations.length>0)},isSavedViewLoaded(){return this.loadedView!==null},canManageLoadedView(){return this.isSavedViewLoaded?this.canEditLoadedView||this.loadedView.scope==="user"?!0:this.loadedView.scope==="global"?this.isPristyAdmin:!1:!1},viewToEdit(){return this.saveViewDialogMode==="edit"?this.loadedView:null},availableProperties(){return xe().METADATA.filter(l=>l.display&&l.display.includes("view"))}},methods:{...je.mapActions(mt,["checkPristyAdminStatus"]),...je.mapActions(ll,["addLocation","removeLocation","addGroup","removeGroup","addCriterionToGroup","removeCriterionFromGroup","updateCriterionInGroup","saveCurrentView","updateCurrentView","deleteCurrentView"]),removeLocationAtIndex(t){this.removeLocation(t)},resetNewLocation(){this.newLocation={type:null,value:"",negation:!1,label:""},this.newLocationSiteInput=null},confirmAddLocation(){!this.newLocation.type||!this.newLocation.value||(this.addLocation({...this.newLocation}),this.isAddLocationDialogVisible=!1,this.resetNewLocation())},handleNewLocationSiteSelect(t){const l=t.value;l&&l.id&&(this.newLocation.value=l.id,this.newLocation.label=l.title)},clearSaveViewError(){this.saveViewError=null},handleDossierSelected(t){if(this.isAddLocationDialogVisible){const l=t.id.startsWith("workspace://")?t.id:`workspace://SpacesStore/${t.id}`;this.newLocation.value=l,this.newLocation.label=t.name||l}this.isDossierTreeVisible=!1},openSaveViewPopup(){this.saveViewDialogMode="create",this.saveViewDialogVisible=!0},modifyView(){this.saveViewDialogMode="edit",this.saveViewDialogVisible=!0},deleteView(){this.isDeleteConfirmVisible=!0},async handleDeleteConfirmation(){this.isDeleteConfirmVisible=!1;try{await this.deleteCurrentView(),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("rechercheAvancee.deleteViewSuccess"),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews()}catch(t){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:t.message,life:5e3})}},async handleSaveView(t){this.clearSaveViewError();const l={locations:JSON.parse(JSON.stringify(this.locations)),criteriaGroups:JSON.parse(JSON.stringify(this.criteriaGroups))};if(t.scope==="global"){try{const s={id:t.filename.replace(/^vue-/,"").replace(/\.json$/,""),name:t.name,description:t.description,config:l};await Pt.saveView(t.filename,s),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("rechercheAvancee.addsSavedViewSuccess"),life:3e3}),this.$refs.savedSearchesPanel&&this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1,this.$emit("view-saved",{filename:t.filename,name:t.name,description:t.description})}catch(s){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:s.message,life:5e3})}return}const a=this.saveViewDialogMode==="create";let i,o,n;a?(i=this.saveCurrentView,n="rechercheAvancee.addsSavedViewSuccess",o={id:crypto.randomUUID(),name:t.name,description:t.description,scope:t.scope,config:l}):(i=this.updateCurrentView,n="rechercheAvancee.modifySavedViewSuccess",o={...this.loadedView,name:t.name,description:t.description,config:l});try{await i(o),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t(n),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1}catch(s){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:s.message,life:5e3})}},handleLoadView(t){this.$emit("load-view",t)},handleAddFirstCriterion(){this.addGroup("AND"),this.targetGroupIndex=0,this.editingCriterion=null,this.isAddCriterionDialogVisible=!0},handleAddGroup(){this.addGroup("AND")},openAddCriterionForGroup(t){this.targetGroupIndex=t,this.editingCriterion=null,this.isAddCriterionDialogVisible=!0},handleCriterionAdded(t){this.criteriaGroups.groups.length===0&&(this.addGroup("AND"),this.targetGroupIndex=0);const l=this.targetGroupIndex!==null?this.targetGroupIndex:this.criteriaGroups.groups.length-1;this.addCriterionToGroup(l,t),this.targetGroupIndex=null},startEditCriterion(t,l,a){this.editingGroupIndex=t,this.editingCriterionIndex=l,this.editingCriterion=JSON.parse(JSON.stringify(a)),this.isAddCriterionDialogVisible=!0},handleCriterionUpdated(t){this.updateCriterionInGroup(this.editingGroupIndex,this.editingCriterionIndex,t),this.editingCriterion=null,this.editingGroupIndex=null,this.editingCriterionIndex=null},formatCriterionValueForDisplay(t){if(t.value===null||t.value===void 0)return"";if(t.operator==="range"){const l=t.value instanceof Date?new Date(t.value).toLocaleDateString():t.value||"*",a=t.value_end instanceof Date?new Date(t.value_end).toLocaleDateString():t.value_end||"*";return`[${l} -> ${a}]`}else return t.value instanceof Date?new Date(t.value).toLocaleDateString():typeof t.value=="boolean"?this.$t(t.value?"true":"false"):`"${t.value}"`},async loadSites(){try{const t=await ut.getWorkspaces();this.availableSites=t.map(l=>({id:l.id,title:l.title,description:l.description}))}catch(t){console.error("Error loading sites:",t)}},searchSites(t){const l=t.query.toLowerCase();l?this.filteredSites=this.availableSites.filter(a=>a.title.toLowerCase().includes(l)||a.description&&a.description.toLowerCase().includes(l)):this.filteredSites=[...this.availableSites]}}},Nf={key:0,class:"loaded-view-bar"},Af={class:"loaded-view-label"},Yf={class:"mt-2 mb-4"},zf={class:"flex align-items-center gap-1 mb-2"},Mf={class:"font-bold"},Xf={class:"ri-information-line text-gray-400 cursor-help"},Of={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round"},wf={key:1,class:"flex flex-column gap-2"},kf={class:"font-semibold mr-1"},Cf={class:"text-gray-700 flex-grow-1"},Tf={class:"mt-4"},If={class:"font-bold"},jf={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round mt-2"},Gf={key:1,class:"flex flex-column mt-2"},Df={key:0,class:"criteria-group-separator"},Lf={class:"criteria-group-separator-label"},Vf={key:0,class:"flex align-items-center justify-content-end mb-2"},vf={class:"flex flex-column"},Ff={key:0,class:"criteria-inline-operator"},Rf={class:"criteria-inline-operator-label"},Sf={class:"flex align-items-center p-2 border-1 border-round",style:{"border-color":"var(--p-content-border-color)"}},xf={class:"flex-grow-1"},Uf={class:"font-bold mr-1"},Jf={class:"font-italic mr-1"},Ef={class:"text-gray-700"},Bf={class:"flex gap-2 mt-3"},Hf={key:2,class:"view-actions-separator"},Qf={class:"flex flex-column gap-3"},Pf={class:"flex flex-column gap-1 w-full"},_f={class:"font-semibold"},Kf={class:"flex flex-column gap-1 w-full"},$f={class:"font-semibold"},qf={key:0,class:"flex flex-column gap-1 w-full"},eW={class:"font-semibold"},tW={class:"flex align-items-center"},lW={key:0};function aW(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("PrimeAccordionHeader"),c=e.resolveComponent("UserViewsFavoritesPanel"),m=e.resolveComponent("PrimeAccordionContent"),h=e.resolveComponent("PrimeAccordionPanel"),b=e.resolveComponent("PrimeAccordion"),p=e.resolveComponent("PrimeSelectButton"),d=e.resolveComponent("PrimeAutoComplete"),W=e.resolveComponent("PrimeInputText"),Z=e.resolveComponent("PrimeDialog"),N=e.resolveComponent("AddCriterionPopup"),y=e.resolveComponent("SaveViewPopup"),A=e.resolveComponent("TreeExplorer"),f=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.isSavedViewLoaded&&!a.hideViewSelector?(e.openBlock(),e.createElementBlock("div",Nf,[e.createElementVNode("span",Af,[l[15]||(l[15]=e.createElementVNode("i",{class:"ri-eye-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(t.$t("rechercheAvancee.activeView",{name:t.loadedView.name})),1)]),e.createVNode(s,{icon:"ri-close-line",label:t.$t("rechercheAvancee.closeView"),severity:"danger",onClick:l[0]||(l[0]=Y=>t.$emit("close-view")),outlined:"",size:"small"},null,8,["label"])])):e.createCommentVNode("",!0),e.createVNode(b,{class:e.normalizeClass(["mt-4",{"accordion-locked":a.hideViewSelector}]),multiple:"",value:a.hideViewSelector?["1"]:["0","1"],dt:{panel:{borderColor:"transparent"},header:{borderColor:"transparent"},content:{borderColor:"transparent"}}},{default:e.withCtx(()=>[a.hideViewSelector?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(h,{key:0,value:"0"},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("rechercheAvancee.savedViews")),1)]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(c,{ref:"savedSearchesPanel","global-only":a.globalOnly,onLoadView:n.handleLoadView},null,8,["global-only","onLoadView"])]),_:1})]),_:1})),e.createVNode(h,{value:"1"},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("rechercheAvancee.queryBuilder")),1)]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[e.createElementVNode("div",Yf,[e.createElementVNode("div",zf,[e.createElementVNode("span",Mf,e.toDisplayString(t.$t("rechercheAvancee.locationsTitle")),1),e.withDirectives(e.createElementVNode("i",Xf,null,512),[[f,t.$t("rechercheAvancee.locationsHint"),void 0,{right:!0}]])]),t.locations.length===0?(e.openBlock(),e.createElementBlock("div",Of,e.toDisplayString(t.$t("rechercheAvancee.noLocations")),1)):(e.openBlock(),e.createElementBlock("div",wf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.locations,(Y,X)=>(e.openBlock(),e.createElementBlock("div",{key:Y.id||X,class:e.normalizeClass(["flex align-items-center p-2 border-1 border-round",Y.negation?"border-red-200 bg-red-50":"border-green-200 bg-green-50"])},[e.createElementVNode("span",{class:e.normalizeClass(["text-xs font-bold px-2 py-1 border-round mr-2",Y.negation?"bg-red-100 text-red-700":"bg-green-100 text-green-700"])},e.toDisplayString(Y.negation?t.$t("rechercheAvancee.excludePrefix"):t.$t("rechercheAvancee.includePrefix")),3),e.createElementVNode("span",kf,e.toDisplayString(Y.type),1),e.createElementVNode("span",Cf,e.toDisplayString(Y.label||Y.value),1),e.createVNode(s,{icon:"ri-delete-bin-line",text:"",rounded:"",severity:"danger","aria-label":t.$t("rechercheAvancee.removeLocation"),onClick:G=>n.removeLocationAtIndex(X)},null,8,["aria-label","onClick"])],2))),128))])),e.createVNode(s,{icon:"ri-add-line",label:t.$t("rechercheAvancee.addLocationButton"),onClick:l[1]||(l[1]=Y=>o.isAddLocationDialogVisible=!0),class:"mt-3 w-full",outlined:""},null,8,["label"])]),e.createElementVNode("div",Tf,[e.createElementVNode("span",If,e.toDisplayString(t.$t("rechercheAvancee.criteriaTitle")),1),t.criteriaGroups.groups.length===0?(e.openBlock(),e.createElementBlock("div",jf,e.toDisplayString(t.$t("rechercheAvancee.noCriteria")),1)):(e.openBlock(),e.createElementBlock("div",Gf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.criteriaGroups.groups,(Y,X)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Y.id},[X>0?(e.openBlock(),e.createElementBlock("div",Df,[l[16]||(l[16]=e.createElementVNode("span",{class:"criteria-group-separator-line"},null,-1)),e.createElementVNode("span",Lf,e.toDisplayString(t.$t("rechercheAvancee.operatorOr")),1),l[17]||(l[17]=e.createElementVNode("span",{class:"criteria-group-separator-line"},null,-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["criteria-group-block",{"criteria-group-block--multi":t.criteriaGroups.groups.length>1}])},[t.criteriaGroups.groups.length>1?(e.openBlock(),e.createElementBlock("div",Vf,[e.withDirectives(e.createVNode(s,{icon:"ri-close-line",text:"",rounded:"",size:"small",severity:"danger",onClick:G=>t.removeGroup(X)},null,8,["onClick"]),[[f,t.$t("rechercheAvancee.removeGroup"),void 0,{left:!0}]])])):e.createCommentVNode("",!0),e.createElementVNode("div",vf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.criteria,(G,j)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:G.id},[j>0?(e.openBlock(),e.createElementBlock("div",Ff,[e.createElementVNode("span",Rf,e.toDisplayString(t.$t("rechercheAvancee.operatorAnd")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Sf,[e.createElementVNode("div",xf,[e.createElementVNode("span",Uf,e.toDisplayString(t.$t(G.property.labelId)),1),e.createElementVNode("span",{class:e.normalizeClass([G.negation?"text-red-500":"text-primary","mx-1"])},e.toDisplayString(G.negation?t.$t("rechercheAvancee.mustNotContain"):t.$t("rechercheAvancee.mustContain")),3),e.createElementVNode("span",Jf,e.toDisplayString(t.$t(G.operatorLabelKey)),1),e.createElementVNode("span",Ef,e.toDisplayString(n.formatCriterionValueForDisplay(G)),1)]),e.createVNode(s,{icon:"ri-pencil-line",text:"",rounded:"",severity:"info",onClick:L=>n.startEditCriterion(X,j,G)},null,8,["onClick"]),e.createVNode(s,{icon:"ri-delete-bin-line","aria-label":t.$t("delete"),text:"",rounded:"",severity:"danger",onClick:L=>t.removeCriterionFromGroup(X,j)},null,8,["aria-label","onClick"])])],64))),128))]),e.createVNode(s,{icon:"ri-add-line",label:t.$t("rechercheAvancee.addCriterionButton"),onClick:G=>n.openAddCriterionForGroup(X),class:"mt-2 w-full",outlined:"",size:"small"},null,8,["label","onClick"])],2)],64))),128))])),e.createElementVNode("div",Bf,[t.criteriaGroups.groups.length===0?(e.openBlock(),e.createBlock(s,{key:0,icon:"ri-add-line",label:t.$t("rechercheAvancee.addCriterionButton"),onClick:n.handleAddFirstCriterion,class:"flex-1",outlined:""},null,8,["label","onClick"])):e.createCommentVNode("",!0),t.criteriaGroups.groups.length>0?(e.openBlock(),e.createBlock(s,{key:1,icon:"ri-add-line",label:t.$t("rechercheAvancee.addOrGroup"),onClick:n.handleAddGroup,class:"flex-1",outlined:"",size:"small"},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),n.hasActiveCriteria?(e.openBlock(),e.createElementBlock("div",Hf)):e.createCommentVNode("",!0),n.hasActiveCriteria?(e.openBlock(),e.createBlock(s,{key:3,icon:"ri-save-3-line",label:t.$t("rechercheAvancee.saveViewAsNew"),onClick:n.openSaveViewPopup,class:"w-full",outlined:""},null,8,["label","onClick"])):e.createCommentVNode("",!0),n.canManageLoadedView?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(s,{icon:"ri-save-line",label:t.$t("rechercheAvancee.saveViewModifications"),onClick:n.modifyView,class:"mt-2 w-full"},null,8,["label","onClick"]),e.createElementVNode("a",{class:"delete-view-link",onClick:l[2]||(l[2]=(...Y)=>n.deleteView&&n.deleteView(...Y))},[l[18]||(l[18]=e.createElementVNode("i",{class:"ri-delete-bin-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(t.$t("rechercheAvancee.deleteView")),1)])],64)):e.createCommentVNode("",!0)])]),_:1})]),_:1})]),_:1},8,["class","value"]),e.createVNode(Z,{visible:o.isAddLocationDialogVisible,"onUpdate:visible":l[9]||(l[9]=Y=>o.isAddLocationDialogVisible=Y),header:t.$t("rechercheAvancee.addLocationTitle"),modal:"",style:{width:"500px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(s,{label:t.$t("cancel"),icon:"ri-close-line",onClick:l[8]||(l[8]=Y=>o.isAddLocationDialogVisible=!1),text:""},null,8,["label"]),e.createVNode(s,{label:t.$t("rechercheAvancee.addLocationConfirm"),icon:"ri-check-line",onClick:n.confirmAddLocation,disabled:!o.newLocation.type||!o.newLocation.value},null,8,["label","onClick","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",Qf,[e.createElementVNode("div",Pf,[e.createElementVNode("label",_f,e.toDisplayString(t.$t("rechercheAvancee.conditionLabel")),1),e.createVNode(p,{modelValue:o.newLocation.negation,"onUpdate:modelValue":l[3]||(l[3]=Y=>o.newLocation.negation=Y),options:n.conditionOptions,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",Kf,[e.createElementVNode("label",$f,e.toDisplayString(t.$t("rechercheAvancee.locationTypeLabel")),1),e.createVNode(p,{modelValue:o.newLocation.type,"onUpdate:modelValue":l[4]||(l[4]=Y=>o.newLocation.type=Y),options:n.locationOptions,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","options"])]),o.newLocation.type?(e.openBlock(),e.createElementBlock("div",qf,[e.createElementVNode("label",eW,e.toDisplayString(t.$t("rechercheAvancee.valueLabel")),1),o.newLocation.type==="Site"?(e.openBlock(),e.createBlock(d,{key:0,modelValue:o.newLocationSiteInput,"onUpdate:modelValue":l[5]||(l[5]=Y=>o.newLocationSiteInput=Y),suggestions:o.filteredSites,optionLabel:"title",onComplete:n.searchSites,onItemSelect:n.handleNewLocationSiteSelect,placeholder:t.$t("rechercheAvancee.sitePlaceholder"),class:"w-full",forceSelection:""},null,8,["modelValue","suggestions","onComplete","onItemSelect","placeholder"])):(e.openBlock(),e.createBlock(W,{key:1,modelValue:o.newLocation.value,"onUpdate:modelValue":l[6]||(l[6]=Y=>o.newLocation.value=Y),placeholder:t.$t("rechercheAvancee.folderPlaceholder"),onClick:l[7]||(l[7]=Y=>o.newLocation.type==="Folder"?o.isDossierTreeVisible=!0:null),readonly:"",class:"w-full cursor-pointer"},null,8,["modelValue","placeholder"]))])):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"]),e.createVNode(N,{visible:o.isAddCriterionDialogVisible,"onUpdate:visible":l[10]||(l[10]=Y=>o.isAddCriterionDialogVisible=Y),properties:n.availableProperties,"edit-criterion":o.editingCriterion,onAddCriterion:n.handleCriterionAdded,onUpdateCriterion:n.handleCriterionUpdated},null,8,["visible","properties","edit-criterion","onAddCriterion","onUpdateCriterion"]),e.createVNode(y,{visible:o.saveViewDialogVisible,"onUpdate:visible":l[11]||(l[11]=Y=>o.saveViewDialogVisible=Y),"view-data":n.viewToEdit,"error-message":o.saveViewError,"global-only":a.globalOnly,onSaveView:n.handleSaveView,onClearError:n.clearSaveViewError},null,8,["visible","view-data","error-message","global-only","onSaveView","onClearError"]),e.createVNode(Z,{visible:o.isDossierTreeVisible,"onUpdate:visible":l[12]||(l[12]=Y=>o.isDossierTreeVisible=Y),header:t.$t("selectFolder"),modal:"",class:"w-full md:w-6"},{default:e.withCtx(()=>[e.createVNode(A,{"current-node":null,showUserHome:a.showUserHome,onSelectNode:n.handleDossierSelected},null,8,["showUserHome","onSelectNode"])]),_:1},8,["visible","header"]),e.createVNode(Z,{visible:o.isDeleteConfirmVisible,"onUpdate:visible":l[14]||(l[14]=Y=>o.isDeleteConfirmVisible=Y),header:t.$t("rechercheAvancee.confirmDeleteTitle"),modal:"",class:"dialog-confirm-delete"},{footer:e.withCtx(()=>[e.createVNode(s,{label:t.$t("no"),icon:"ri-close-line",onClick:l[13]||(l[13]=Y=>o.isDeleteConfirmVisible=!1),class:"p-button-text"},null,8,["label"]),e.createVNode(s,{label:t.$t("yes"),icon:"ri-check-line",onClick:n.handleDeleteConfirmation,class:"p-button-danger",autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",tW,[l[19]||(l[19]=e.createElementVNode("i",{class:"ri-alert-line mr-3 text-4xl","aria-hidden":"true"},null,-1)),t.loadedView?(e.openBlock(),e.createElementBlock("span",lW,e.toDisplayString(t.$t("rechercheAvancee.confirmDelete",{name:t.loadedView.name})),1)):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"])],64)}const tm=fe(Wf,[["render",aW]]),oW={name:"FavoriteViewMenu",emits:["menuitem-click"],computed:{...je.mapState(ll,{model:"favoriteViews"})},methods:{...je.mapActions(ll,["fetchFavoriteViews"]),onMenuItemClick(t){this.$emit("menuitem-click",t)}},async mounted(){await this.fetchFavoriteViews()}},nW={class:"menuItem mt-3"},iW={key:0},sW={class:"layout-menu"},rW={class:"overflow-hidden text-overflow-ellipsis white-space-nowrap"};function cW(t,l,a,i,o,n){const s=e.resolveComponent("router-link"),r=e.resolveDirective("ripple"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",nW,[e.createVNode(s,{to:"/vues"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesFavorites.title")),1)]),_:1})]),t.model.length>0?(e.openBlock(),e.createElementBlock("div",iW,[e.createElementVNode("ul",sW,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.model,(m,h)=>(e.openBlock(),e.createElementBlock("li",{key:m.label||h,role:"none"},[e.withDirectives((e.openBlock(),e.createBlock(s,{"aria-label":m.label,to:m.to,class:"p-ripple flex",exact:"",role:"menuitem",onClick:b=>n.onMenuItemClick({originalEvent:b,item:m})},{default:e.withCtx(()=>[e.createElementVNode("span",rW,e.toDisplayString(m.label),1)]),_:2},1032,["aria-label","to","onClick"])),[[r],[c,m.label]])]))),128))])])):e.createCommentVNode("",!0)],64)}const lm=fe(oW,[["render",cW],["__scopeId","data-v-90814edd"]]),dW={name:"ViewResultsPanel",components:{ComplexBreadcrumb:In,PrimeButton:de,PrimePaginator:bo,PrimeProgressSpinner:Bt},directives:{tooltip:yt},props:{entries:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},totalRecords:{type:Number,default:0},rowsPerPage:{type:Number,default:25},showLocationActions:{type:Boolean,default:!0},workspaceRouteName:{type:String,default:"espace"},folderRouteName:{type:String,default:"espace-folder"},folderRouteParamName:{type:String,default:"folderId"},homeRoute:{type:[String,Object],default:()=>({name:"home"})}},data(){return{first:0}},emits:["page-change","select-node"],methods:{getNodeIcon(t){return pl.getIcon(t)},buildBreadcrumbPath(t){if(!t.path||!t.path.elements)return[];const l=t.path.elements.filter(o=>o.name!=="Company Home"&&o.name!=="documentLibrary"&&o.nodeType!=="st:sites"&&o.nodeType!=="sys:container");let a=null;const i=l.map(o=>{const n={id:o.id,name:o.name,nodeType:o.nodeType,isFolder:o.nodeType==="cm:folder"||o.nodeType==="st:site"};return o.nodeType==="st:site"?(a=o.name,n.to={name:this.workspaceRouteName,params:{id:o.name}}):a?n.to={name:this.folderRouteName,params:{id:a,[this.folderRouteParamName]:o.id}}:n.to={},n});return i.unshift({nodeType:"home",to:typeof this.homeRoute=="string"?{name:this.homeRoute}:this.homeRoute}),i},getSiteElement(t){return!t.path||!t.path.elements?null:t.path.elements.find(l=>l.nodeType==="st:site")},getSiteName(t){const l=this.getSiteElement(t);return l?l.name:null},getParentName(t){if(!t.path||!t.path.elements)return"";const l=t.path.elements[t.path.elements.length-1];return l?l.name:""},addParentAsLocation(t,l){if(!t.path||!t.path.elements)return;const a=t.path.elements,i=a[a.length-1];if(!i)return;ll().addLocation({type:"Folder",value:`workspace://SpacesStore/${i.id}`,negation:l,label:i.name})},addSiteAsLocation(t,l){const a=this.getSiteElement(t);if(!a)return;ll().addLocation({type:"Site",value:a.name,negation:l,label:a.name})},formatDate(t){return t?new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""},handlePageChange(t){this.first=t.first,this.$emit("page-change",t.first)},formatSize(t){if(!t||t===0)return"0 B";const l=["B","KB","MB","GB"];let a=0,i=t;for(;i>=1024&&a<l.length-1;)i/=1024,a++;return`${i.toFixed(a===0?0:1)} ${l[a]}`}}},mW={class:"view-results-panel"},bW={key:0,class:"flex justify-content-center align-items-center p-5"},pW={key:1,class:"text-center text-gray-500 p-5"},uW={class:"mt-2"},hW={key:2},yW={class:"result-main"},ZW={key:0,class:"result-site-row"},gW={class:"result-site-badge"},fW={class:"result-header"},WW=["title","onClick"],NW={key:1,class:"result-path-row"},AW={class:"result-meta"},YW={key:0,class:"meta-item"},zW={key:1,class:"meta-item"};function MW(t,l,a,i,o,n){const s=e.resolveComponent("PrimeProgressSpinner"),r=e.resolveComponent("PrimeButton"),c=e.resolveComponent("ComplexBreadcrumb"),m=e.resolveComponent("PrimePaginator"),h=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",mW,[a.loading?(e.openBlock(),e.createElementBlock("div",bW,[e.createVNode(s)])):a.entries.length===0?(e.openBlock(),e.createElementBlock("div",pW,[l[0]||(l[0]=e.createElementVNode("i",{class:"ri-search-line",style:{"font-size":"3rem"},"aria-hidden":"true"},null,-1)),e.createElementVNode("p",uW,e.toDisplayString(t.$t("rechercheAvancee.noResults")),1)])):(e.openBlock(),e.createElementBlock("div",hW,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.entries,b=>(e.openBlock(),e.createElementBlock("div",{key:b.id,class:"view-result-item"},[e.createElementVNode("div",yW,[n.getSiteName(b)?(e.openBlock(),e.createElementBlock("div",ZW,[e.createElementVNode("span",gW,[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-building-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(n.getSiteName(b)),1)]),a.showLocationActions&&n.getSiteElement(b)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(r,{icon:"ri-add-circle-line",class:"action-include location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(p=>n.addSiteAsLocation(b,!1),["stop"])},null,8,["onClick"]),[[h,t.$t("rechercheAvancee.addAsIncludeSite",{name:n.getSiteName(b)})]]),e.withDirectives(e.createVNode(r,{icon:"ri-indeterminate-circle-line",class:"action-exclude location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(p=>n.addSiteAsLocation(b,!0),["stop"])},null,8,["onClick"]),[[h,t.$t("rechercheAvancee.addAsExcludeSite",{name:n.getSiteName(b)})]])],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",fW,[e.createElementVNode("i",{class:e.normalizeClass([n.getNodeIcon(b),"result-icon"]),"aria-hidden":"true"},null,2),e.createElementVNode("a",{class:"result-name",title:b.name,onClick:p=>t.$emit("select-node",b)},e.toDisplayString(b.name),9,WW)]),b.path&&b.path.elements?(e.openBlock(),e.createElementBlock("div",NW,[e.createVNode(c,{path:n.buildBreadcrumbPath(b),"show-actions":!1,"show-home":!1,"is-in-search":!0,mode:"auto","home-route":a.homeRoute,"workspace-route-name":a.workspaceRouteName,"folder-route-name":a.folderRouteName,class:"result-breadcrumb"},null,8,["path","home-route","workspace-route-name","folder-route-name"]),a.showLocationActions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(r,{icon:"ri-add-circle-line",class:"action-include location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(p=>n.addParentAsLocation(b,!1),["stop"])},null,8,["onClick"]),[[h,t.$t("rechercheAvancee.addAsIncludeFolder",{name:n.getParentName(b)})]]),e.withDirectives(e.createVNode(r,{icon:"ri-indeterminate-circle-line",class:"action-exclude location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(p=>n.addParentAsLocation(b,!0),["stop"])},null,8,["onClick"]),[[h,t.$t("rechercheAvancee.addAsExcludeFolder",{name:n.getParentName(b)})]])],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",AW,[b.modifiedAt?(e.openBlock(),e.createElementBlock("span",YW,[l[2]||(l[2]=e.createElementVNode("i",{class:"ri-time-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(n.formatDate(b.modifiedAt)),1)])):e.createCommentVNode("",!0),b.content&&b.content.sizeInBytes?(e.openBlock(),e.createElementBlock("span",zW,[l[3]||(l[3]=e.createElementVNode("i",{class:"ri-hard-drive-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(n.formatSize(b.content.sizeInBytes)),1)])):e.createCommentVNode("",!0)])])]))),128)),e.createVNode(m,{first:o.first,rows:a.rowsPerPage,"total-records":a.totalRecords,template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",onPage:n.handlePageChange},null,8,["first","rows","total-records","onPage"])]))])}const am=fe(dW,[["render",MW],["__scopeId","data-v-0cfc30de"]]),XW={class:"save-as-form"},OW={class:"form-field"},wW={for:"filename"},kW={class:"form-field"},CW={for:"location"},TW={class:"input-group"},IW={key:0,class:"explorer-container"},jW=fe({__name:"SaveAsPopup",props:{visible:Boolean,defaultFilename:{type:String,default:null},parentFolderNode:{type:Object,default:null}},emits:["close","save"],setup(t,{emit:l}){const{t:a}=Rt.useI18n(),i=t,o=l,n=e.ref(""),s=e.ref(null),r=e.ref(!1),c=e.ref(null),m=e.ref(""),h=()=>{n.value=i.defaultFilename||a("pdfTools.saveAs.defaultFilename"),s.value=i.parentFolderNode,c.value=i.parentFolderNode?.id,m.value=i.parentFolderNode?.name,r.value=!1},b=async d=>{if(!(!d||!d.isFolder)){if(d.name==="documentLibrary")if(c.value=d.id,d.parentId)try{const W=await Ye.getNode(d.parentId);m.value=W.properties["cm:title"]||W.name}catch(W){console.error("Could not fetch parent node name",W),m.value=d.name}else m.value=d.name;else c.value=d.id,m.value=d.name;r.value=!1}},p=()=>{c.value&&o("save",{filename:n.value,folderId:c.value})};return(d,W)=>(e.openBlock(),e.createBlock(e.unref(pt),{visible:t.visible,modal:"",header:d.$t("pdfTools.saveAs.title"),class:"dialog-save-as","onUpdate:visible":W[3]||(W[3]=Z=>d.$emit("close")),onShow:h},{footer:e.withCtx(()=>[e.createVNode(e.unref(de),{label:d.$t("pdfTools.common.cancel"),icon:"ri-close-line",text:"",onClick:W[2]||(W[2]=Z=>d.$emit("close"))},null,8,["label"]),e.createVNode(e.unref(de),{label:d.$t("pdfTools.common.save"),icon:"ri-check-line",onClick:p,disabled:!n.value||!c.value},null,8,["label","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",XW,[e.createElementVNode("div",OW,[e.createElementVNode("label",wW,e.toDisplayString(d.$t("pdfTools.saveAs.filenameLabel")),1),e.createVNode(e.unref(_e),{id:"filename",modelValue:n.value,"onUpdate:modelValue":W[0]||(W[0]=Z=>n.value=Z)},null,8,["modelValue"])]),e.createElementVNode("div",kW,[e.createElementVNode("label",CW,e.toDisplayString(d.$t("pdfTools.saveAs.folderLabel")),1),e.createElementVNode("div",TW,[e.createVNode(e.unref(_e),{id:"location",readonly:"",value:m.value},null,8,["value"]),e.createVNode(e.unref(de),{icon:r.value?"ri-arrow-up-s-line":"ri-arrow-down-s-line",label:d.$t("pdfTools.saveAs.browse"),onClick:W[1]||(W[1]=Z=>r.value=!r.value)},null,8,["icon","label"])])]),r.value?(e.openBlock(),e.createElementBlock("div",IW,[e.createVNode(aa,{"current-node":s.value,"show-user-home":"","show-files":!1,onSelectNode:b},null,8,["current-node"])])):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"]))}},[["__scopeId","data-v-13a7638f"]]),GW={class:"pdf-tools-page"},DW={key:0},LW={key:0,class:"loading-container"},VW={key:1,class:"error-container"},vW={key:2,class:"pdf-editor-layout"},FW={class:"pdf-tools-sidebar"},RW={class:"card"},SW={class:"sidebar-form"},xW={class:"form-field"},UW={class:"form-field form-field--spaced"},JW={class:"form-field form-field--spaced"},EW={class:"insert-buttons"},BW={class:"form-field form-field--spaced"},HW={class:"watermark-grid"},QW={class:"pdf-preview-container"},PW=["onClick","onDblclick"],_W={class:"page-selection"},KW={class:"page-actions"},$W={class:"thumbnail-content"},qW={class:"page-number"},e9={class:"dialog-header"},t9={class:"page-editor-toolbar"},l9={class:"zoom-indicator"},a9={class:"editor-layout"},o9={class:"tool-group"},n9={key:0,class:"text-settings"},i9={class:"form-field"},s9={class:"form-label"},r9={class:"form-field"},c9={class:"form-label"},d9={class:"form-field"},m9={class:"form-label"},b9={class:"editor-footer"},p9={class:"dialog-header"},u9={class:"signature-pad"},h9={class:"dialog-footer-buttons"},y9={class:"search-input-group"},Z9={key:0,class:"inline-status"},g9={key:1,class:"text-muted"},f9={key:2,class:"favorites-layout"},W9={class:"favorites-list"},N9=["onClick"],A9={class:"item-content"},Y9={class:"text-ellipsis"},z9={class:"favorites-preview"},M9={key:0,class:"preview-placeholder"},X9={class:"text-muted"},O9={key:1,class:"preview-placeholder"},w9={class:"text-muted"},k9={key:2,class:"preview-wrapper"},C9={key:0,class:"preview-controls"},T9={class:"page-info"},I9={class:"preview-content"},j9={key:0,class:"inline-status"},G9={key:1,class:"text-muted"},D9={key:2,class:"favorites-layout"},L9={class:"favorites-list"},V9=["onClick"],v9={class:"item-content"},F9={class:"text-ellipsis"},R9={class:"favorites-preview"},S9={key:0,class:"preview-placeholder"},x9={class:"text-muted"},U9={key:1,class:"preview-placeholder"},J9={class:"text-muted"},E9={key:2,class:"preview-wrapper"},B9={key:0,class:"preview-controls"},H9={class:"page-info"},Q9={class:"preview-content"},P9={class:"sidebar-form"},_9={class:"form-field"},K9={for:"alfrescoNodeId"},$9={class:"form-hint"},q9={class:"insert-footer"},e4={class:"insert-footer-info"},t4={key:0,class:"selected-info"},l4={class:"selected-label"},a4={class:"selected-name"},o4={key:1,class:"error-msg"},n4={class:"insert-footer-actions"},om=fe({__name:"PdfToolsComponent",props:{toast:{type:Object,required:!0},id:{type:String,required:!0}},setup(t){const{t:l}=Rt.useI18n(),a=t,i=e.ref(null),o=e.ref(null),n=e.ref([]),s=e.ref(!0),r=e.ref(null),c=e.ref(null),m=e.ref([]),h=e.ref(!1),b=e.ref(null),p=e.ref(1),d={SELECT:"select",REDACT:"redact",HIGHLIGHT:"highlight",COMMENT:"comment",IMAGE:"image",SIGNATURE:"signature",TEXT:"text"},W=e.ref(d.SELECT),Z=e.ref([]),N=e.ref(null),y=e.ref(null),A=e.ref(null),f=e.ref(null),Y=e.ref(!1),X=e.ref(null);let G=!1,j=null,L=!1,z=null;const O=e.ref(""),F=e.ref(-45),M=e.ref(5),I=[{label:"Helvetica",value:"Helvetica"},{label:"Times New Roman",value:"TimesRoman"},{label:"Courier",value:"Courier"}],g=e.ref("Helvetica"),J=e.ref(18),ae=e.ref("#000000"),Q=e.ref(null),pe=e.ref(!1),P=e.ref(null),ee=e.ref(""),S=e.ref(""),E=e.ref(null),ye=e.ref(null),_=e.ref(!1),B=e.ref(""),ue=e.ref(""),Ne=e.ref(null),be=e.computed(()=>B.value&&Qe(B.value)?!0:!!(Ne.value&&Ne.value.id)),De=e.ref(""),Ve=e.ref([]),Je=e.ref(!1),st=e.ref(!1),Se=e.ref([]),u=e.ref(!1),te=e.ref(!1),$=e.ref(null),{pdf:T}=Ll.usePDF($),k=e.ref(1),x=e.ref(0),oe=e.ref(null),{pdf:ie}=Ll.usePDF(oe);e.onMounted(()=>{const C=a.id;C?Ae(C):(r.value=l("pdfTools.loadError"),s.value=!1)});const H=C=>m.value.some(v=>v.pageIndex===C.pageIndex),me=C=>{c.value=C;const v=m.value.findIndex(q=>q.pageIndex===C.pageIndex);v>-1?m.value.splice(v,1):m.value.push(C)},Ae=async C=>{s.value=!0,r.value=null;try{const v=await Ye.getNode(C);E.value=v,Q.value=v.parentId,S.value=v&&(v.name||v.properties&&v.properties["cm:name"])||"";const q=ht.getContentUrl(C);oe.value=q;const K=await fetch(q);if(!K.ok)throw new Error(`HTTP error! status: ${K.status}`);const ge=await K.arrayBuffer();o.value=new Uint8Array(ge),await re(o.value),n.value.length>0&&(c.value=n.value[0])}catch(v){console.error("Error loading PDF from Alfresco:",v),r.value=l("pdfTools.loadError")}finally{s.value=!1}},re=async C=>{i.value=await it.PDFDocument.load(C);const v=i.value.getPageCount();n.value=Array.from({length:v},(q,K)=>({pageIndex:K,pageNumber:K+1}))},We=async(C,{updatePages:v=!0}={})=>{const q=await C.save();o.value=q;const K=new Blob([q],{type:"application/pdf"});oe.value&&oe.value.startsWith("blob:")&&URL.revokeObjectURL(oe.value),oe.value=URL.createObjectURL(K),v&&await re(q)},Ue=async()=>{if(o.value){s.value=!0;try{const C=await it.PDFDocument.create(),v=n.value.map(ge=>ge.pageIndex),q=await it.PDFDocument.load(o.value);(await C.copyPages(q,v)).forEach(ge=>C.addPage(ge)),await We(C)}catch(C){console.error("Error reordering pages:",C),r.value=l("pdfTools.reorderError")}finally{s.value=!1}}},ve=async C=>{if(o.value){s.value=!0;try{const v=await it.PDFDocument.load(o.value),q=v.getPage(C.pageIndex),K=q.getRotation().angle;q.setRotation({type:it.RotationTypes.Degrees,angle:(K+90)%360}),await We(v,{updatePages:!1})}catch(v){console.error("Error rotating page:",v),r.value=l("pdfTools.rotateError")}finally{s.value=!1}}},nt=async()=>{if(m.value.length===0||!o.value)return null;const C=await it.PDFDocument.create(),v=await it.PDFDocument.load(o.value),q=m.value.map(ge=>ge.pageIndex).sort((ge,le)=>ge-le);return(await C.copyPages(v,q)).forEach(ge=>C.addPage(ge)),await C.save()},gt=async()=>{if(!(!o.value||m.value.length===0)){if(m.value.length===n.value.length){a.toast.add({severity:"warn",summary:l("pdfTools.common.warning"),detail:l("pdfTools.deleteAllPagesWarning"),life:3e3});return}s.value=!0;try{const C=await it.PDFDocument.load(o.value),v=C.getPageCount(),q=new Set(m.value.map(ke=>ke.pageIndex)),K=[];for(let ke=0;ke<v;ke++)q.has(ke)||K.push(ke);const ge=await it.PDFDocument.create();(await ge.copyPages(C,K)).forEach(ke=>ge.addPage(ke)),await We(ge),m.value=[],a.toast.add({severity:"success",summary:l("pdfTools.common.deleted"),detail:l("pdfTools.pagesDeletedSuccess"),life:3e3})}catch(C){console.error("Error deleting pages:",C),r.value=l("pdfTools.deletePagesError")}finally{s.value=!1}}},Nt=async()=>{B.value="",Ne.value=null,ue.value="",_.value=!0},ce=C=>{C===2&&Se.value.length===0&&!u.value&&il()},we=async()=>{let C=null;if(Ne.value?.id?C=Ne.value.id:B.value&&(C=Qe(B.value)),!C){a.toast.add({severity:"warn",summary:l("pdfTools.common.warning"),detail:l("pdfTools.insertFromAlfresco.invalidInput"),life:3e3});return}await sl(C),_.value=!1},Qe=C=>{if(!C)return null;const v=C.trim();if(/^[0-9a-fA-F-]{20,}$/.test(v))return v;const q=v.match(/workspace:\/\/SpacesStore\/([0-9a-fA-F-]{20,})/);if(q&&q[1])return q[1];const K=v.match(/\b(nodes|preview|renditions|content)\/?([0-9a-fA-F-]{20,})\b/);if(K&&K[2])return K[2];const ge=v.match(/#\/(?:pdf-tools|consultation-pdf|edit-collabora)\/([0-9a-fA-F-]{20,})/);if(ge&&ge[1])return ge[1];const le=v.match(/([0-9a-fA-F]{20,})/);return le&&le[1]?le[1]:null},$e=async C=>{if(C?.content?.mimeType==="application/pdf"&&(Ne.value=C,ue.value="",C?.id)){te.value=!0,k.value=1,x.value=0;try{const v=ht.getContentUrl(C.id);$.value&&$.value.startsWith("blob:")&&URL.revokeObjectURL($.value),$.value=v}catch(v){console.error("Error loading PDF preview:",v),$.value=null}finally{te.value=!1}}},Be=()=>{k.value<x.value&&k.value++},wt=()=>{k.value>1&&k.value--},nl=C=>{ue.value="",C.isFolder?(Ne.value=null,ue.value=l("pdfTools.insertFromAlfresco.folderSelectError")):C.content?.mimeType!=="application/pdf"?(Ne.value=null,ue.value=l("pdfTools.insertFromAlfresco.fileTypeNotAllowedError")):$e(C)},kt=async()=>{if(st.value=!0,!De.value||De.value.trim().length<2){Ve.value=[];return}Je.value=!0;try{const C=Vo();await C.queryStore(De.value);const v=C.entries.map(q=>q.entry||q);Ve.value=v.filter(q=>q.isFile&&q.content?.mimeType==="application/pdf")}catch(C){console.error("performSearch",C),Ve.value=[]}finally{Je.value=!1}},il=async()=>{u.value=!0;try{const C=Ha();await C.loadFavorites(),Se.value=C.fileFavorites.filter(v=>v?.target?.file?.content?.mimeType==="application/pdf").map(v=>v.target.file)}catch(C){console.error("loadFavorites error:",C),Se.value=[]}finally{u.value=!1}},sl=async C=>{if(o.value){s.value=!0;try{if((await Ye.getNode(C)).content?.mimeType!=="application/pdf")throw new Error(l("pdfTools.invalidNodeForInsert"));const K=await(await Ye.getNodeContent(C)).arrayBuffer(),ge=new Uint8Array(K),le=await it.PDFDocument.load(o.value),ke=await it.PDFDocument.load(ge),Pe=ke.getPageCount(),qe=Array.from({length:Pe},(At,Al)=>Al);(await le.copyPages(ke,qe)).forEach(At=>le.addPage(At)),await We(le),m.value=[],a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.insertFromPristySuccess",{count:Pe}),life:3e3})}catch(v){console.error("Error inserting from Alfresco:",v),r.value=v?.message||l("pdfTools.insertFromPristyError"),a.toast.add({severity:"error",summary:l("pdfTools.common.error"),detail:r.value,life:4e3})}finally{s.value=!1}}},ne=async C=>{const v=C.files?.[0];v&&await Me(v)},Me=async C=>{if(o.value){s.value=!0;try{const v=await it.PDFDocument.load(o.value),q=new Uint8Array(await C.arrayBuffer()),K=await it.PDFDocument.load(q),ge=K.getPageCount(),le=Array.from({length:ge},(Pe,qe)=>qe);(await v.copyPages(K,le)).forEach(Pe=>v.addPage(Pe)),await We(v),m.value=[],a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.insertFromFileSuccess",{count:ge}),life:3e3})}catch(v){console.error("Error inserting PDF:",v),r.value=l("pdfTools.insertError")}finally{s.value=!1}}},Fe=async()=>{if(!(!O.value||m.value.length===0||!o.value)){s.value=!0;try{const C=await it.PDFDocument.load(o.value),v=m.value.map(q=>q.pageIndex);for(const q of v){const K=C.getPage(q),{width:ge,height:le}=K.getSize();for(let ke=0;ke<M.value;ke++)K.drawText(O.value,{x:ge/(M.value+1)*(ke+1)-150,y:le/(M.value+1)*(ke+1),size:50,color:it.rgb(.95,.1,.1),opacity:.5,rotate:it.degrees(F.value)})}await We(C,{updatePages:!1})}catch(C){console.error("Error adding watermark:",C),r.value=l("pdfTools.watermarkError")}finally{s.value=!1}}},Ke=async()=>{if(o.value){s.value=!0;try{const C=new Blob([o.value],{type:"application/pdf"}),v=new File([C],"modified.pdf",{type:"application/pdf"}),q={majorVersion:!0,comment:"File modified via Pristy Espaces PDF tools"};await Ye.updateContentNode(a.id,v,q),a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.saveSuccess"),life:3e3})}catch(C){console.error("Error saving changes:",C),a.toast.add({severity:"error",summary:l("pdfTools.common.error"),detail:l("pdfTools.saveError"),life:3e3})}finally{s.value=!1}}},rt=async C=>{if(P.value=C,ee.value=l("pdfTools.saveAs.defaultFilename"),E.value&&E.value.parentId)try{ye.value=await Ye.getNode(E.value.parentId)}catch(v){console.error("Could not fetch parent node for Save As dialog",v),ye.value=null}else ye.value=null;pe.value=!0},Kt=async({filename:C,folderId:v})=>{pe.value=!1,s.value=!0;try{let q;if(P.value==="extract"?q=await nt():q=o.value,!q)throw new Error(l("pdfTools.noContentToSave"));const K=new Blob([q],{type:"application/pdf"}),ge=new File([K],C,{type:"application/pdf"});if(!v)throw new Error("No destination folder selected.");await ht.uploadFile(v,{},ge),a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.fileCreatedSuccess",{filename:C}),life:3e3})}catch(q){console.error('Error during "Save As":',q);const K=q.status===409?l("pdfTools.saveAs.conflictError"):l("pdfTools.saveAsError");a.toast.add({severity:"error",summary:l("pdfTools.common.error"),detail:K,life:4e3})}finally{s.value=!1}},kl=C=>{b.value=C||c.value,h.value=!0,p.value=1,Z.value=[],setTimeout(Tl,200)},bt=()=>{h.value=!1,b.value=null},Cl=()=>{p.value=Math.min(4,p.value+.1)},Hl=()=>{p.value=Math.max(.2,p.value-.1)},ca=C=>{C===d.REDACT?window.confirm(l("pdfTools.redactWarning"))&&(W.value=C):W.value=C},rl=C=>{N.value=C.files?.[0]||null,N.value&&(y.value=null,W.value=d.IMAGE)},ao=()=>{Y.value=!0},zi=()=>{Z.value.pop(),Jt()},wa=async C=>{if(!(!C||C.type!==d.IMAGE||C._loading||C._bitmap)){C._loading=!0;try{let v=null;C.payload?.file?v=C.payload.file:C.payload?.signature&&(v=new Blob([new Uint8Array(C.payload.signature)],{type:"image/png"})),v&&(C._bitmap=await createImageBitmap(v),Jt())}catch(v){console.warn(l("pdfTools.imagePreviewUnavailable"),v)}finally{C._loading=!1}}},_o=()=>{const C=A.value;if(!C)return null;const v=Array.from(C.querySelectorAll("canvas"));if(v.length===0)return null;const q=v.filter(ke=>ke.offsetParent!==null&&ke.width>0&&ke.height>0),K=q.length?q:v;let ge=K[0],le=0;for(const ke of K){const Pe=ke.getBoundingClientRect(),qe=Math.max(0,Pe.width)*Math.max(0,Pe.height);qe>le&&(ge=ke,le=qe)}return ge},Tl=()=>{const C=_o();if(!C||!f.value)return;const v=C.getBoundingClientRect(),q=window.devicePixelRatio||1;f.value.style.width=v.width+"px",f.value.style.height=v.height+"px",f.value.width=Math.round(v.width*q),f.value.height=Math.round(v.height*q),Jt()},Ql=C=>{const v=f.value;if(!v)return{x:0,y:0};const q=v.getBoundingClientRect(),K=window.devicePixelRatio||1;return{x:(C.clientX-q.left)*K,y:(C.clientY-q.top)*K}};let Pl=null,Ut=null,da=null,Il=null;const Mi=C=>{for(let v=Z.value.length-1;v>=0;v--){const q=Z.value[v].rect;if(C.x>=q.x&&C.x<=q.x+q.w&&C.y>=q.y&&C.y<=q.y+q.h)return v}return-1},Ko=C=>{const K=6*(window.devicePixelRatio||1)/2;for(let ge=Z.value.length-1;ge>=0;ge--){const le=Z.value[ge];if(le.type!==d.IMAGE&&le.type!==d.TEXT)continue;const ke=le.rect,Pe=[{key:"tl",x:ke.x,y:ke.y},{key:"tr",x:ke.x+ke.w,y:ke.y},{key:"bl",x:ke.x,y:ke.y+ke.h},{key:"br",x:ke.x+ke.w,y:ke.y+ke.h}];for(const qe of Pe)if(C.x>=qe.x-K&&C.x<=qe.x+K&&C.y>=qe.y-K&&C.y<=qe.y+K)return{idx:ge,corner:qe.key}}return null},$o=C=>{if(W.value===d.REDACT||W.value===d.HIGHLIGHT||W.value===d.TEXT)L=!0,z=Ql(C);else if(W.value===d.COMMENT){const v=Ql(C),q=window.prompt(l("pdfTools.pageEditor.commentPrompt"));q&&(Z.value.push({type:d.COMMENT,rect:{x:v.x,y:v.y,w:24,h:24},payload:{text:q}}),Jt())}else if(W.value===d.IMAGE||W.value===d.SELECT||W.value===d.TEXT){const v=Ql(C),q=Ko(v);if(q){da=q.idx,Il=q.corner,Ut={p:v,rect:{...Z.value[q.idx].rect}},f.value&&(f.value.style.cursor="nwse-resize");return}const K=Mi(v);if(K!==-1&&(Z.value[K].type===d.IMAGE||Z.value[K].type===d.TEXT)){Pl=K,Ut={p:v,rect:{...Z.value[K].rect}},f.value&&(f.value.style.cursor="move");return}if(W.value===d.IMAGE){if(!N.value&&!y.value)return;const ge={type:d.IMAGE,rect:{x:v.x,y:v.y,w:150,h:100},payload:{file:N.value,signature:y.value}};Z.value.push(ge),wa(ge),Jt(),W.value=d.SELECT,N.value=null,y.value=null}}},Xi=C=>{if(da!==null&&Il){const q=Ql(C),K=Z.value[da];if(K){const ge=Ut.rect;let le=ge.x,ke=ge.y,Pe=ge.w,qe=ge.h;const Mt=q.x-Ut.p.x,At=q.y-Ut.p.y;Il==="br"?(Pe=Math.max(10,ge.w+Mt),qe=Math.max(10,ge.h+At)):Il==="tr"?(Pe=Math.max(10,ge.w+Mt),qe=Math.max(10,ge.h-At),ke=ge.y+At):Il==="bl"?(Pe=Math.max(10,ge.w-Mt),le=ge.x+Mt,qe=Math.max(10,ge.h+At)):Il==="tl"&&(Pe=Math.max(10,ge.w-Mt),le=ge.x+Mt,qe=Math.max(10,ge.h-At),ke=ge.y+At),K.rect.x=le,K.rect.y=ke,K.rect.w=Pe,K.rect.h=qe,Jt()}return}if(Pl!==null){const q=Ql(C),K=Z.value[Pl];if(K){const ge=q.x-Ut.p.x,le=q.y-Ut.p.y;K.rect.x=Ut.rect.x+ge,K.rect.y=Ut.rect.y+le,Jt()}return}if(!L||!z)return;const v=Ql(C);Wl.value={x:Math.min(z.x,v.x),y:Math.min(z.y,v.y),w:Math.abs(v.x-z.x),h:Math.abs(v.y-z.y)},Jt()},Oi=()=>{if(Pl!==null||da!==null){Pl=null,da=null,Il=null,Ut=null,f.value&&(f.value.style.cursor="crosshair"),Jt();return}if(L&&Wl.value)if(W.value===d.TEXT){const C=window.prompt(l("pdfTools.pageEditor.addTextPrompt"));C&&C.trim().length>0&&Z.value.push({type:d.TEXT,rect:{...Wl.value},payload:{text:C,font:g.value,size:J.value,color:ae.value}})}else Z.value.push({type:W.value,rect:{...Wl.value}});L=!1,z=null,Wl.value=null,Jt()},wi=()=>{L&&(L=!1,z=null,Wl.value=null,Jt())},Wl=e.ref(null),Jt=()=>{const C=Pl,v=f.value;if(!v)return;const q=v.getContext("2d"),K=window.devicePixelRatio||1;q.clearRect(0,0,v.width,v.height);const ge=(le,ke)=>{if(le.type===d.REDACT)q.fillStyle="rgba(0,0,0,1)",q.fillRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),q.strokeStyle="rgba(0,0,0,1)",q.strokeRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h);else if(le.type===d.HIGHLIGHT)q.fillStyle="rgba(255, 235, 59, 0.4)",q.fillRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),q.strokeStyle="rgba(255, 193, 7, 0.8)",q.strokeRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h);else if(le.type===d.COMMENT)Ca(q,le.rect.x,le.rect.y,20*K);else if(le.type===d.IMAGE){if(wa(le),le._bitmap&&q.drawImage(le._bitmap,le.rect.x,le.rect.y,le.rect.w,le.rect.h),q.strokeStyle=ke===C?"#0ea5e9":"rgba(33,150,243,0.9)",q.lineWidth=ke===C?2*K:1*K,q.strokeRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),ke===C){q.fillStyle="#0ea5e9";const Pe=6*K,qe=Pe/2;[[le.rect.x,le.rect.y],[le.rect.x+le.rect.w,le.rect.y],[le.rect.x,le.rect.y+le.rect.h],[le.rect.x+le.rect.w,le.rect.y+le.rect.h]].forEach(([At,Al])=>{q.fillRect(At-qe,Al-qe,Pe,Pe)})}}else if(le.type===d.TEXT){const Pe=le.payload||{},qe=Math.max(8,Pe.size||18);q.save(),q.fillStyle="rgba(255,255,255,0.35)",q.fillRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),q.fillStyle=Pe.color||"#000",q.font=`${qe}px ${Pe.font||"Helvetica"}`,q.textBaseline="top";const Mt=4*K,At=Math.max(0,le.rect.w-2*Mt),Al=oo(q,String(Pe.text||""),At);let jl=le.rect.y+Mt;for(const cl of Al)if(q.fillText(cl,le.rect.x+Mt,jl),jl+=qe*1.2,jl>le.rect.y+le.rect.h-Mt)break;if(q.strokeStyle=ke===C?"#0ea5e9":"rgba(33,150,243,0.9)",q.lineWidth=ke===C?2*K:1*K,q.strokeRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),ke===C){q.fillStyle="#0ea5e9";const cl=6*K,Kl=cl/2;[[le.rect.x,le.rect.y],[le.rect.x+le.rect.w,le.rect.y],[le.rect.x,le.rect.y+le.rect.h],[le.rect.x+le.rect.w,le.rect.y+le.rect.h]].forEach(([ot,$l])=>{q.fillRect(ot-Kl,$l-Kl,cl,cl)})}q.restore()}};if(Z.value.forEach(ge),Wl.value){const le=Wl.value;q.setLineDash([6*K,4*K]),q.strokeStyle=W.value===d.REDACT?"black":"goldenrod",q.strokeRect(le.x,le.y,le.w,le.h),q.setLineDash([])}},oo=(C,v,q)=>{const K=v.split(/\s+/),ge=[];let le="";for(const ke of K){const Pe=le?le+" "+ke:ke;C.measureText(Pe).width<=q||le===""?le=Pe:(ge.push(le),le=ke)}return le&&ge.push(le),ge},ma=C=>{let v=C.toString().trim();v.startsWith("#")&&(v=v.slice(1)),v.length===3&&(v=v.split("").map(ke=>ke+ke).join(""));const q=parseInt(v||"000000",16),K=(q>>16&255)/255,ge=(q>>8&255)/255,le=(q&255)/255;return{r:K,g:ge,b:le}},ka=(C,v,q,K)=>{const ge=String(v).split(/\s+/),le=[];let ke="";for(const Pe of ge){const qe=ke?ke+" "+Pe:Pe;C.widthOfTextAtSize(qe,q)<=K||ke===""?ke=qe:(le.push(ke),ke=Pe)}return ke&&le.push(ke),le},Ca=(C,v,q,K)=>{C.save(),C.translate(v,q),C.fillStyle="#FFEB3B",C.strokeStyle="#FBC02D",C.lineWidth=2,C.beginPath(),C.rect(0,0,K,K),C.fill(),C.stroke(),C.beginPath(),C.moveTo(K*.6,0),C.lineTo(K,K*.4),C.lineTo(K*.6,K*.4),C.closePath(),C.fillStyle="#FDD835",C.fill(),C.restore()},Lt=async()=>{if(!(!o.value||!b.value)){s.value=!0;try{const C=await it.PDFDocument.load(o.value),v=b.value.pageIndex;let q=C.getPage(v);const{width:K,height:ge}=q.getSize(),le=_o();if(!le)throw new Error(l("pdfTools.pdfRenderCanvasNotFound"));if(Z.value.some(ot=>ot.type===d.REDACT)){if(!window.confirm(l("pdfTools.redactFlattenConfirm"))){s.value=!1;return}const $l=Math.max(2,Math.ceil(le.width/le.getBoundingClientRect().width||window.devicePixelRatio||1)),dl=document.createElement("canvas"),an=le.width/le.height;dl.width=Math.round(le.width*$l),dl.height=Math.round(le.height*$l);const Ia=dl.getContext("2d");Ia.imageSmoothingEnabled=!1,Ia.drawImage(le,0,0,le.width,le.height,0,0,dl.width,dl.height);const ja=dl.toDataURL("image/jpeg",.5),co=await(await fetch(ja)).arrayBuffer(),mo=await C.embedJpg(co),ba=C.insertPage(v+1,[K,ge]);ba.drawImage(mo,{x:0,y:0,width:K,height:ge}),q=ba}const Pe=le.getBoundingClientRect(),qe=le.width,Mt=le.height,At=window.devicePixelRatio||1,Al=qe/Pe.width,jl=Mt/Pe.height,cl=K/qe,Kl=ge/Mt;for(const ot of Z.value){const $l=ot.rect.x/At,dl=ot.rect.y/At,an=ot.rect.w/At,Ia=ot.rect.h/At,ja=$l*Al,co=dl*jl,mo=an*Al,ba=Ia*jl,pa=mo*cl,Gl=ba*Kl,U=ja*cl,V=ge-(co+ba)*Kl;if(ot.type===d.REDACT)q.drawRectangle({x:U,y:V,width:pa,height:Gl,color:it.rgb(0,0,0)});else if(ot.type===d.HIGHLIGHT)q.drawRectangle({x:U,y:V,width:pa,height:Gl,color:it.rgb(1,.92,.23),opacity:.4});else if(ot.type===d.COMMENT){if(q.drawRectangle({x:U,y:V,width:Math.max(14,pa),height:Math.max(14,Gl),color:it.rgb(1,.92,.23),opacity:.9}),ot.payload?.text){const D=String(ot.payload.text).slice(0,200);q.drawText(`Note: ${D}`,{x:U+2,y:V+Gl+2,size:8,color:it.rgb(.2,.2,.2)})}}else if(ot.type===d.IMAGE){let D=null;if(ot.payload?.file?D=await ot.payload.file.arrayBuffer():ot.payload?.signature&&(D=ot.payload.signature),D){let R;try{R=await C.embedPng(D)}catch{R=await C.embedJpg(D)}q.drawImage(R,{x:U,y:V,width:pa,height:Gl,opacity:.98})}}else if(ot.type===d.TEXT){const D=ot.payload||{},R=D.font==="TimesRoman"?it.StandardFonts.TimesRoman:D.font==="Courier"?it.StandardFonts.Courier:it.StandardFonts.Helvetica,se=await C.embedFont(R),he=Math.max(6,Number(D.size)||18),{r:Xe,g:Oe,b:Ce}=ma(D.color||"#000000"),Re=2,Yt=Math.max(1,pa-2*Re),lt=ka(se,String(D.text||""),he,Yt);let ft=V+Gl-he-Re;for(const Ct of lt)if(q.drawText(Ct,{x:U+Re,y:ft,size:he,color:it.rgb(Xe,Oe,Ce)}),ft-=he*1.2,ft<V)break}}const ro=Z.value.some(ot=>ot.type===d.REDACT);ro&&C.removePage(v),await We(C,{updatePages:ro}),Z.value=[],a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.pageEditor.applySuccess"),life:2e3})}catch(C){console.error("Error applying overlay edits:",C),a.toast.add({severity:"error",summary:l("pdfTools.common.error"),detail:l("pdfTools.pageEditor.applyError"),life:3e3})}finally{s.value=!1}}};e.watch(p,()=>setTimeout(Tl,0)),e.watch(b,()=>setTimeout(Tl,0)),typeof window<"u"&&window.addEventListener("resize",()=>setTimeout(Tl,0));const no=()=>{p.value=1,setTimeout(Tl,0)},qo=()=>{const C=X.value;if(!C)return;const v=window.devicePixelRatio||1,q=440,K=180;C.style.width=q+"px",C.style.height=K+"px",C.width=Math.round(q*v),C.height=Math.round(K*v);const ge=C.getContext("2d");ge.fillStyle="#fff",ge.fillRect(0,0,C.width,C.height)},Ta=()=>{ln(),Y.value=!1},en=C=>{G=!0,j=so(C)},tn=C=>{if(!G)return;const v=so(C);ki(j,v),j=v},Nl=C=>en(C.touches[0]),_l=C=>tn(C.touches[0]),io=()=>{G=!1,j=null},so=C=>{const q=X.value.getBoundingClientRect(),K=window.devicePixelRatio||1,ge=C.clientX??C.pageX,le=C.clientY??C.pageY;return{x:(ge-q.left)*K,y:(le-q.top)*K}},ki=(C,v)=>{const K=X.value.getContext("2d");K.strokeStyle="#111827",K.lineWidth=3*(window.devicePixelRatio||1),K.lineCap="round",K.beginPath(),K.moveTo(C.x,C.y),K.lineTo(v.x,v.y),K.stroke()},ln=()=>{const C=X.value;if(!C)return;const v=C.getContext("2d");v.fillStyle="#fff",v.fillRect(0,0,C.width,C.height)},Ci=()=>{const C=X.value;C&&C.toBlob(async v=>{y.value=await v.arrayBuffer(),W.value=d.IMAGE,Y.value=!1})};return e.watch(Y,C=>{C&&setTimeout(qo,0)}),e.watch(T,async C=>{if(!C){x.value=0;return}try{const v=await C;x.value=v.numPages}catch(v){console.error("Error loading preview PDF:",v),x.value=0}}),(C,v)=>{const q=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",GW,[e.createElementVNode("h1",null,[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.title"))+" ",1),S.value?(e.openBlock(),e.createElementBlock("span",DW,"— "+e.toDisplayString(S.value),1)):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createElementBlock("div",LW,[e.createVNode(e.unref(Bt)),e.createElementVNode("p",null,e.toDisplayString(C.$t("pdfTools.loading")),1)])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",VW,[e.createVNode(e.unref(ml),{severity:"error"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})])):e.createCommentVNode("",!0),!s.value&&!r.value?(e.openBlock(),e.createElementBlock("div",vW,[e.createElementVNode("div",FW,[e.createElementVNode("div",RW,[e.createElementVNode("h2",null,e.toDisplayString(C.$t("pdfTools.sidebar.actions")),1),e.createElementVNode("div",SW,[e.createVNode(e.unref(de),{icon:"ri-save-2-line",label:C.$t("pdfTools.sidebar.saveNewVersion"),onClick:Ke},null,8,["label"]),e.createVNode(e.unref(de),{severity:"secondary",class:"btn-mt",icon:"ri-file-copy-2-line",label:C.$t("pdfTools.sidebar.saveAs"),onClick:v[0]||(v[0]=K=>rt("saveAs"))},null,8,["label"]),e.createVNode(e.unref(ql)),e.createElementVNode("div",xW,[e.createElementVNode("h3",null,e.toDisplayString(C.$t("pdfTools.sidebar.extractPages")),1),e.createVNode(e.unref(de),{disabled:m.value.length===0,icon:"ri-file-transfer-line",label:C.$t("pdfTools.sidebar.extractAndSave"),onClick:v[1]||(v[1]=K=>rt("extract"))},null,8,["disabled","label"])]),e.createElementVNode("div",UW,[e.createElementVNode("h3",null,e.toDisplayString(C.$t("pdfTools.sidebar.deletePages")),1),e.createVNode(e.unref(de),{disabled:m.value.length===0||n.value.length===m.value.length,severity:"danger",icon:"ri-delete-bin-line",label:C.$t("pdfTools.sidebar.deleteSelectedPages"),onClick:gt},null,8,["disabled","label"])]),e.createElementVNode("div",JW,[e.createElementVNode("h3",null,e.toDisplayString(C.$t("pdfTools.sidebar.insertPdf")),1),e.createElementVNode("div",EW,[e.createVNode(e.unref(ya),{auto:!1,customUpload:!1,showCancelButton:!1,showUploadButton:!1,accept:"application/pdf","choose-label":C.$t("pdfTools.sidebar.fromComputer"),severity:"secondary",class:"btn-full",mode:"basic",name:"pdfToInsert",onSelect:ne},null,8,["choose-label"]),e.createVNode(e.unref(de),{severity:"secondary",icon:"ri-cloud-line",label:C.$t("pdfTools.sidebar.fromPristy"),onClick:Nt},null,8,["label"])])]),e.createElementVNode("div",BW,[e.createElementVNode("h3",null,e.toDisplayString(C.$t("pdfTools.sidebar.addWatermark")),1),e.createVNode(e.unref(_e),{modelValue:O.value,"onUpdate:modelValue":v[2]||(v[2]=K=>O.value=K),placeholder:C.$t("pdfTools.sidebar.watermarkTextPlaceholder"),type:"text"},null,8,["modelValue","placeholder"]),e.createElementVNode("div",HW,[e.createElementVNode("div",null,[e.createVNode(e.unref(Yl),{modelValue:F.value,"onUpdate:modelValue":v[3]||(v[3]=K=>F.value=K),max:360,min:-360,placeholder:C.$t("pdfTools.sidebar.angle"),suffix:"°"},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",null,[e.createVNode(e.unref(Yl),{modelValue:M.value,"onUpdate:modelValue":v[4]||(v[4]=K=>M.value=K),max:10,min:1,placeholder:C.$t("pdfTools.sidebar.repetitions")},null,8,["modelValue","placeholder"])])]),e.createVNode(e.unref(de),{disabled:!O.value||m.value.length===0,severity:"secondary",class:"btn-mt",icon:"ri-paint-brush-line",label:C.$t("pdfTools.sidebar.addWatermarkButton"),onClick:Fe},null,8,["disabled","label"])])])])]),e.createElementVNode("div",QW,[e.createElementVNode("h2",null,e.toDisplayString(C.$t("pdfTools.pagePreview.title")),1),e.createVNode(e.unref(Fi.VueDraggableNext),{modelValue:n.value,"onUpdate:modelValue":v[5]||(v[5]=K=>n.value=K),class:"page-grid","ghost-class":"ghost","item-key":"pageIndex",onEnd:Ue},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,K=>(e.openBlock(),e.createElementBlock("div",{key:K.pageIndex,class:"page-grid-item"},[e.createElementVNode("div",{class:e.normalizeClass([{selected:H(K)},"page-thumbnail"]),onClick:ge=>me(K),onDblclick:e.withModifiers(ge=>kl(K),["stop"])},[e.createElementVNode("div",_W,[e.createVNode(e.unref(el),{binary:"","model-value":H(K)},null,8,["model-value"])]),e.createElementVNode("div",KW,[e.createVNode(e.unref(de),{text:"",rounded:"",icon:"ri-clockwise-line","aria-label":C.$t("pdf.rotationRigth"),onClick:e.withModifiers(ge=>ve(K),["stop"])},null,8,["aria-label","onClick"]),e.createVNode(e.unref(de),{"aria-label":C.$t("pdfTools.pagePreview.openPagePreview",{pageNumber:K.pageNumber}),text:"",rounded:"",icon:"ri-edit-box-line",onClick:e.withModifiers(ge=>kl(K),["stop"])},null,8,["aria-label","onClick"])]),e.createElementVNode("div",$W,[e.createVNode(e.unref(Ll.VuePDF),{annotations:!1,page:K.pageNumber,pdf:e.unref(ie),scale:.25,text:!1},null,8,["page","pdf"])]),e.createElementVNode("div",qW,e.toDisplayString(K.pageNumber),1)],42,PW)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0),e.createVNode(e.unref(pt),{visible:h.value,"onUpdate:visible":v[14]||(v[14]=K=>h.value=K),breakpoints:{"960px":"95vw","640px":"100vw"},dismissableMask:"",modal:"",class:"dialog-page-editor","content-class":"page-editor-dialog",onHide:bt},{header:e.withCtx(()=>[e.createElementVNode("div",e9,[v[21]||(v[21]=e.createElementVNode("i",{class:"ri-file-fill","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(C.$t("pdfTools.pageEditor.title",{pageNumber:(b.value||c.value)?.pageNumber||"",filename:S.value})),1)])]),footer:e.withCtx(()=>[e.createElementVNode("div",b9,[e.createElementVNode("small",null,e.toDisplayString(C.$t("pdfTools.pageEditor.footerHint")),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",t9,[e.createVNode(e.unref(de),{text:"",icon:"ri-zoom-out-line","aria-label":C.$t("pdf.dezoom"),onClick:Hl},null,8,["aria-label"]),e.createVNode(e.unref(de),{text:"",icon:"ri-zoom-in-line","aria-label":C.$t("pdf.zoom"),onClick:Cl},null,8,["aria-label"]),e.createVNode(e.unref(de),{text:"",label:C.$t("pdfTools.pageEditor.fit"),onClick:no},null,8,["label"]),e.createElementVNode("span",l9,e.toDisplayString(Math.round(p.value*100))+"%",1),v[22]||(v[22]=e.createElementVNode("span",{class:"spacer"},null,-1)),e.createVNode(e.unref(de),{text:"",icon:"ri-close-line",label:C.$t("pdfTools.pageEditor.close"),onClick:bt},null,8,["label"])]),e.createElementVNode("div",a9,[e.createElementVNode("div",o9,[e.createElementVNode("h4",null,e.toDisplayString(C.$t("pdfTools.pageEditor.tools.actions")),1),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.SELECT}),icon:"ri-cursor-line",label:C.$t("pdfTools.pageEditor.tools.select"),onClick:v[6]||(v[6]=K=>ca(d.SELECT))},null,8,["class","label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.REDACT}),icon:"ri-eraser-fill",label:C.$t("pdfTools.pageEditor.tools.redact"),onClick:v[7]||(v[7]=K=>ca(d.REDACT))},null,8,["class","label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.HIGHLIGHT}),icon:"ri-mark-pen-line",label:C.$t("pdfTools.pageEditor.tools.highlight"),onClick:v[8]||(v[8]=K=>ca(d.HIGHLIGHT))},null,8,["class","label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.COMMENT}),icon:"ri-sticky-note-line",label:C.$t("pdfTools.pageEditor.tools.comment"),onClick:v[9]||(v[9]=K=>ca(d.COMMENT))},null,8,["class","label"]),e.createVNode(e.unref(ya),{severity:"secondary",class:e.normalizeClass({active:W.value===d.IMAGE}),accept:"image/*","choose-label":C.$t("pdfTools.pageEditor.tools.image"),mode:"basic",name:"image",onSelect:rl},null,8,["class","choose-label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.SIGNATURE}),icon:"ri-ball-pen-line",label:C.$t("pdfTools.pageEditor.tools.signature"),onClick:ao},null,8,["class","label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.TEXT}),icon:"ri-font-size",label:C.$t("pdfTools.pageEditor.tools.text"),onClick:v[10]||(v[10]=K=>ca(d.TEXT))},null,8,["class","label"]),W.value===d.TEXT?(e.openBlock(),e.createElementBlock("div",n9,[e.createElementVNode("div",i9,[e.createElementVNode("label",s9,e.toDisplayString(C.$t("pdfTools.pageEditor.tools.font")),1),e.createVNode(e.unref(Dt),{modelValue:g.value,"onUpdate:modelValue":v[11]||(v[11]=K=>g.value=K),options:I,class:"input-full",optionLabel:"label",optionValue:"value"},null,8,["modelValue"])]),e.createElementVNode("div",r9,[e.createElementVNode("label",c9,e.toDisplayString(C.$t("pdfTools.pageEditor.tools.size")),1),e.createVNode(e.unref(Yl),{modelValue:J.value,"onUpdate:modelValue":v[12]||(v[12]=K=>J.value=K),max:144,min:6},null,8,["modelValue"])]),e.createElementVNode("div",d9,[e.createElementVNode("label",m9,e.toDisplayString(C.$t("pdfTools.pageEditor.tools.color")),1),e.createVNode(e.unref(_e),{modelValue:ae.value,"onUpdate:modelValue":v[13]||(v[13]=K=>ae.value=K),class:"input-full",placeholder:"#000000"},null,8,["modelValue"])])])):e.createCommentVNode("",!0),e.createVNode(e.unref(ql)),e.createVNode(e.unref(de),{disabled:Z.value.length===0,severity:"info",class:"btn-full btn-mt-auto",icon:"ri-check-line",label:C.$t("pdfTools.pageEditor.apply"),onClick:Lt},null,8,["disabled","label"]),e.createVNode(e.unref(de),{disabled:Z.value.length===0,severity:"warn",class:"btn-full btn-mt-sm",icon:"ri-arrow-go-back-line",label:C.$t("pdfTools.pageEditor.cancel"),onClick:zi},null,8,["disabled","label"])]),e.createElementVNode("div",{class:"page-editor-canvas",onWheelPassive:Tl,onScrollPassive:Tl},[e.createElementVNode("div",{ref_key:"pdfCanvasWrapper",ref:A,class:"pdf-canvas-wrapper"},[e.unref(ie)&&(b.value||c.value)?(e.openBlock(),e.createBlock(e.unref(Ll.VuePDF),{key:0,annotations:!1,page:(b.value||c.value).pageNumber,pdf:e.unref(ie),scale:p.value,text:!1,class:"pdf-canvas-absolute"},null,8,["page","pdf","scale"])):e.createCommentVNode("",!0),e.createElementVNode("canvas",{ref_key:"overlayCanvas",ref:f,class:"overlay-canvas",onMousedown:$o,onMouseleave:wi,onMousemove:Xi,onMouseup:Oi},null,544)],512)],32)])]),_:1},8,["visible"]),e.createVNode(e.unref(pt),{visible:Y.value,"onUpdate:visible":v[15]||(v[15]=K=>Y.value=K),modal:"",class:"dialog-signature-pad",onHide:Ta},{header:e.withCtx(()=>[e.createElementVNode("div",p9,[v[23]||(v[23]=e.createElementVNode("i",{class:"ri-ball-pen-line","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(C.$t("pdfTools.signaturePad.title")),1)])]),footer:e.withCtx(()=>[e.createElementVNode("div",h9,[e.createVNode(e.unref(de),{text:"",label:C.$t("pdfTools.signaturePad.clear"),onClick:ln},null,8,["label"]),e.createVNode(e.unref(de),{text:"",label:C.$t("pdfTools.signaturePad.use"),onClick:Ci},null,8,["label"])])]),default:e.withCtx(()=>[e.createElementVNode("div",u9,[e.createElementVNode("canvas",{ref_key:"signaturePadCanvas",ref:X,class:"signature-canvas",onMousedown:en,onMouseleave:io,onMousemove:tn,onMouseup:io,onTouchstart:e.withModifiers(Nl,["prevent"]),onTouchmove:e.withModifiers(_l,["prevent"]),onTouchend:e.withModifiers(io,["prevent"])},null,544)])]),_:1},8,["visible"]),e.createVNode(jW,{"default-filename":ee.value,visible:pe.value,"parent-folder-node":ye.value,onClose:v[16]||(v[16]=K=>pe.value=!1),onSave:Kt},null,8,["default-filename","visible","parent-folder-node"]),e.createVNode(e.unref(pt),{visible:_.value,modal:"",header:C.$t("pdfTools.insertFromAlfresco.title"),class:"dialog-insert-pdf","onUpdate:visible":v[20]||(v[20]=K=>_.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",q9,[e.createElementVNode("div",e4,[Ne.value?(e.openBlock(),e.createElementBlock("div",t4,[e.createElementVNode("span",l4,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.selected")),1),e.withDirectives((e.openBlock(),e.createElementBlock("span",a4,[e.createTextVNode(e.toDisplayString(Ne.value?.name),1)])),[[q,Ne.value?.name,void 0,{top:!0}]])])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",o4,e.toDisplayString(ue.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",n4,[e.createVNode(e.unref(de),{label:C.$t("pdfTools.insertFromAlfresco.cancel"),text:"",onClick:v[19]||(v[19]=K=>_.value=!1)},null,8,["label"]),e.createVNode(e.unref(de),{disabled:!be.value,label:C.$t("pdfTools.insertFromAlfresco.insert"),icon:"ri-add-line",onClick:we},null,8,["disabled","label"])])])]),default:e.withCtx(()=>[e.createVNode(e.unref(Ga),{value:0,"onUpdate:value":ce},{default:e.withCtx(()=>[e.createVNode(e.unref(Da),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Vl),{value:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.browse")),1)]),_:1}),e.createVNode(e.unref(Vl),{value:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.search")),1)]),_:1}),e.createVNode(e.unref(Vl),{value:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.favorites")),1)]),_:1}),e.createVNode(e.unref(Vl),{value:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.linkOrId")),1)]),_:1})]),_:1}),e.createVNode(e.unref(on),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha),{value:0},{default:e.withCtx(()=>[e.createVNode(aa,{showUserHome:"",showFiles:"",onSelectNode:nl})]),_:1}),e.createVNode(e.unref(ha),{value:1},{default:e.withCtx(()=>[e.createElementVNode("div",y9,[e.createVNode(e.unref(_e),{modelValue:De.value,"onUpdate:modelValue":v[17]||(v[17]=K=>De.value=K),placeholder:C.$t("pdfTools.insertFromAlfresco.searchPlaceholder"),onKeyup:e.withKeys(kt,["enter"])},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(de),{icon:"ri-search-line","aria-label":C.$t("search"),onClick:kt},null,8,["aria-label"])]),Je.value?(e.openBlock(),e.createElementBlock("div",Z9,[e.createVNode(e.unref(Bt),{class:"spinner-sm",strokeWidth:"8"}),e.createElementVNode("span",null,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.searching")),1)])):!Ve.value.length&&st.value?(e.openBlock(),e.createElementBlock("div",g9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.noPdfFound")),1)):Ve.value.length?(e.openBlock(),e.createElementBlock("div",f9,[e.createElementVNode("div",W9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value,K=>(e.openBlock(),e.createElementBlock("div",{key:K.id,class:e.normalizeClass(["favorite-item",{"favorite-item-selected":Ne.value?.id===K.id}]),onClick:ge=>$e(K)},[e.createElementVNode("div",A9,[v[24]||(v[24]=e.createElementVNode("i",{class:"ri-file-pdf-line","aria-hidden":"true"},null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("span",Y9,[e.createTextVNode(e.toDisplayString(K.name),1)])),[[q,K.name,void 0,{top:!0}]])])],10,N9))),128))]),e.createElementVNode("div",z9,[Ne.value?te.value?(e.openBlock(),e.createElementBlock("div",O9,[e.createVNode(e.unref(Bt),{class:"spinner-md",strokeWidth:"6"}),e.createElementVNode("p",w9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.loadingPreview")),1)])):e.unref(T)?(e.openBlock(),e.createElementBlock("div",k9,[x.value>0?(e.openBlock(),e.createElementBlock("div",C9,[e.createVNode(e.unref(de),{icon:"ri-arrow-left-s-line","aria-label":C.$t("pdf.previousPage"),text:"",size:"small",disabled:k.value<=1,onClick:wt},null,8,["aria-label","disabled"]),e.createElementVNode("span",T9,e.toDisplayString(k.value)+" / "+e.toDisplayString(x.value),1),e.createVNode(e.unref(de),{icon:"ri-arrow-right-s-line","aria-label":C.$t("pdf.nextPage"),text:"",size:"small",disabled:k.value>=x.value,onClick:Be},null,8,["aria-label","disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",I9,[e.createVNode(e.unref(Ll.VuePDF),{pdf:e.unref(T),page:k.value,scale:.6,annotations:!1,text:!1},null,8,["pdf","page"])])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",M9,[v[25]||(v[25]=e.createElementVNode("i",{class:"ri-file-pdf-line preview-icon","aria-hidden":"true"},null,-1)),e.createElementVNode("p",X9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")),1)]))])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.unref(ha),{value:2},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock("div",j9,[e.createVNode(e.unref(Bt),{class:"spinner-sm",strokeWidth:"8"}),e.createElementVNode("span",null,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.loading")),1)])):Se.value.length?(e.openBlock(),e.createElementBlock("div",D9,[e.createElementVNode("div",L9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,K=>(e.openBlock(),e.createElementBlock("div",{key:K.id,class:e.normalizeClass(["favorite-item",{"favorite-item-selected":Ne.value?.id===K.id}]),onClick:ge=>$e(K)},[e.createElementVNode("div",v9,[v[26]||(v[26]=e.createElementVNode("i",{class:"ri-file-pdf-line","aria-hidden":"true"},null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("span",F9,[e.createTextVNode(e.toDisplayString(K.name),1)])),[[q,K.name,void 0,{top:!0}]])])],10,V9))),128))]),e.createElementVNode("div",R9,[Ne.value?te.value?(e.openBlock(),e.createElementBlock("div",U9,[e.createVNode(e.unref(Bt),{class:"spinner-md",strokeWidth:"6"}),e.createElementVNode("p",J9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.loadingPreview")),1)])):e.unref(T)?(e.openBlock(),e.createElementBlock("div",E9,[x.value>0?(e.openBlock(),e.createElementBlock("div",B9,[e.createVNode(e.unref(de),{icon:"ri-arrow-left-s-line","aria-label":C.$t("pdf.previousPage"),text:"",size:"small",disabled:k.value<=1,onClick:wt},null,8,["aria-label","disabled"]),e.createElementVNode("span",H9,e.toDisplayString(k.value)+" / "+e.toDisplayString(x.value),1),e.createVNode(e.unref(de),{icon:"ri-arrow-right-s-line","aria-label":C.$t("pdf.nextPage"),text:"",size:"small",disabled:k.value>=x.value,onClick:Be},null,8,["aria-label","disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Q9,[e.createVNode(e.unref(Ll.VuePDF),{pdf:e.unref(T),page:k.value,scale:.6,annotations:!1,text:!1},null,8,["pdf","page"])])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",S9,[v[27]||(v[27]=e.createElementVNode("i",{class:"ri-file-pdf-line preview-icon","aria-hidden":"true"},null,-1)),e.createElementVNode("p",x9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")),1)]))])])):(e.openBlock(),e.createElementBlock("div",G9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.noPdfFavorite")),1))]),_:1}),e.createVNode(e.unref(ha),{value:3},{default:e.withCtx(()=>[e.createElementVNode("div",P9,[e.createElementVNode("div",_9,[e.createElementVNode("label",K9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.alfrescoIdUrl")),1),e.createVNode(e.unref(_e),{id:"alfrescoNodeId",modelValue:B.value,"onUpdate:modelValue":v[18]||(v[18]=K=>B.value=K),placeholder:C.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")},null,8,["modelValue","placeholder"]),e.createElementVNode("small",$9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")),1)])])]),_:1})]),_:1})]),_:1})]),_:1},8,["visible","header"])])}}},[["__scopeId","data-v-bac820c0"]]),i4={class:"version-selectors"},s4={class:"version-selector-group"},r4={key:0,class:"flex align-items-center gap-2"},c4={key:1},d4={class:"flex align-items-center gap-2"},m4={class:"version-selector-group"},b4={key:0,class:"flex align-items-center gap-2"},p4={key:1},u4={class:"flex align-items-center gap-2"},h4={key:0,class:"diff-content"},y4={class:"diff-headers"},Z4={class:"header-a"},g4={class:"header-b"},f4={class:"diff-viewer"},W4={key:0,class:"loading-container"},N4={key:1,class:"error-container"},oi=fe({__name:"DiffViewerDialog",props:{visible:{type:Boolean,required:!0},contentNode:{type:Object,required:!0},versions:{type:Array,default:()=>[]},initialVersionId:{type:String,default:null}},emits:["update:visible","revertVersion"],setup(t,{emit:l}){const{t:a}=Rt.useI18n(),i=bl.useToast(),{isDarkMode:o}=jo(),n=t,s=l,r=e.ref(n.visible),c=e.ref(null),m=e.ref(null),h=e.ref(""),b=e.ref(""),p=e.ref(!1),d=e.ref(null),W=e.ref(null),Z=e.ref(null),N=e.computed(()=>{if(!n.versions)return[];const O=n.versions.map(F=>({label:`${a("diffViewer.version")} ${F.entry.id} (${new Date(F.entry.modifiedAt).toLocaleDateString()})`,id:F.entry.id})).reverse();return O.map((F,M)=>({...F,isCurrent:M===O.length-1}))}),y=e.computed(()=>N.value.filter(O=>O.id!==m.value)),A=e.computed(()=>N.value.filter(O=>O.id!==c.value)),f=e.computed(()=>{switch(n.contentNode?.content?.mimeType||""){case"text/html":return[Li.html()];case"text/markdown":case"text/x-markdown":return[ho.markdown()];case"application/json":return[mn.json()];case"application/xml":case"text/xml":return[bn.xml()];case"application/x-yaml":case"text/yaml":return[yo.yaml()];default:return[]}}),Y=O=>{r.value=O,s("update:visible",O)},X=async()=>{if(!(!c.value||!m.value)){p.value=!0,d.value=null;try{const[O,F]=await Promise.all([Ye.getVersionContent(n.contentNode.id,c.value),Ye.getVersionContent(n.contentNode.id,m.value)]);let M=await O.text(),I=await F.text();if(n.contentNode?.content?.mimeType==="application/json")try{M=JSON.stringify(JSON.parse(M),null,2),I=JSON.stringify(JSON.parse(I),null,2)}catch(g){console.error("Failed to format JSON:",g)}h.value=M,b.value=I,p.value=!1,await e.nextTick(),G()}catch(O){console.error("Error fetching versions:",O),d.value=a("diffViewer.errors.loadError"),p.value=!1}}},G=()=>{if(Z.value&&(Z.value.destroy(),Z.value=null),!W.value||!h.value&&!b.value)return;const O=o()?Di.oneDark:la.syntaxHighlighting(la.defaultHighlightStyle,{fallback:!0}),F=[Wt.lineNumbers(),...f.value,O,Ml.EditorState.readOnly.of(!0)];try{Z.value=new $m.MergeView({a:{doc:h.value,extensions:F},b:{doc:b.value,extensions:F},parent:W.value})}catch(M){console.error("Error creating MergeView:",M),d.value="Failed to create diff view: "+M.message}},j=()=>{if(N.value.length>=2){const O=N.value.length;n.initialVersionId&&N.value.some(F=>F.id===n.initialVersionId)?(c.value=n.initialVersionId,m.value=N.value[O-1]?.id===n.initialVersionId?N.value[O-2]?.id:N.value[O-1]?.id):(c.value=N.value[O-2]?.id,m.value=N.value[O-1]?.id)}},L=O=>N.value.find(F=>F.id===O)?.isCurrent,z=async O=>{const F=a("diffViewer.restoredVersionComment",{versionNumber:O});try{await Ye.revertVersion(n.contentNode.id,O,F),s("revertVersion"),i.add({severity:"success",summary:a("diffViewer.revertVersion.success"),detail:a("diffViewer.revertVersion.successDetail"),life:3e3}),Y(!1)}catch(M){console.error("Error reverting version:",M),i.add({severity:"error",summary:a("diffViewer.revertVersion.error"),detail:M.message,life:3e3})}};return e.watch(()=>n.visible,O=>{r.value=O,O?j():(Z.value&&(Z.value.destroy(),Z.value=null),c.value=null,m.value=null,h.value="",b.value="",d.value=null)}),e.watch([c,m],()=>{c.value&&m.value&&X()}),e.watch(()=>n.versions,O=>{O&&O.length>=2&&r.value&&j()},{deep:!0}),(O,F)=>{const M=e.resolveDirective("tooltip");return e.openBlock(),e.createBlock(e.unref(pt),{visible:r.value,"onUpdate:visible":[F[4]||(F[4]=I=>r.value=I),Y],header:O.$t("diffViewer.compareTitle"),modal:"",maximizable:"",class:"diff-viewer-dialog"},{default:e.withCtx(()=>[e.createElementVNode("div",i4,[e.createElementVNode("div",s4,[e.createVNode(e.unref(Dt),{modelValue:c.value,"onUpdate:modelValue":F[0]||(F[0]=I=>c.value=I),options:y.value,"option-label":"label","option-value":"id",placeholder:O.$t("diffViewer.selectVersionA"),class:"flex-grow-1"},{value:e.withCtx(I=>[I.value?(e.openBlock(),e.createElementBlock("div",r4,[e.createElementVNode("span",null,e.toDisplayString(N.value.find(g=>g.id===I.value)?.label),1),N.value.find(g=>g.id===I.value)?.isCurrent?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,value:O.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",c4,e.toDisplayString(I.placeholder),1))]),option:e.withCtx(I=>[e.createElementVNode("div",d4,[e.createElementVNode("span",null,e.toDisplayString(I.option.label),1),I.option.isCurrent?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,value:O.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder"]),c.value&&!L(c.value)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:0,type:"button",icon:"ri-history-line","aria-label":O.$t("diffViewer.revertToThisVersion",{versionNumber:c.value}),onClick:F[1]||(F[1]=I=>z(c.value)),severity:"secondary",rounded:"",text:""},null,8,["aria-label"])),[[M,O.$t("diffViewer.revertToThisVersion",{versionNumber:c.value}),void 0,{top:!0}]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",m4,[e.createVNode(e.unref(Dt),{modelValue:m.value,"onUpdate:modelValue":F[2]||(F[2]=I=>m.value=I),options:A.value,"option-label":"label","option-value":"id",placeholder:O.$t("diffViewer.selectVersionB"),class:"flex-grow-1"},{value:e.withCtx(I=>[I.value?(e.openBlock(),e.createElementBlock("div",b4,[e.createElementVNode("span",null,e.toDisplayString(N.value.find(g=>g.id===I.value)?.label),1),N.value.find(g=>g.id===I.value)?.isCurrent?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,value:O.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",p4,e.toDisplayString(I.placeholder),1))]),option:e.withCtx(I=>[e.createElementVNode("div",u4,[e.createElementVNode("span",null,e.toDisplayString(I.option.label),1),I.option.isCurrent?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,value:O.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder"]),m.value&&!L(m.value)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:0,type:"button",icon:"ri-history-line","aria-label":O.$t("diffViewer.revertToThisVersion",{versionNumber:m.value}),onClick:F[3]||(F[3]=I=>z(m.value)),severity:"secondary",rounded:"",text:""},null,8,["aria-label"])),[[M,O.$t("diffViewer.revertToThisVersion",{versionNumber:m.value}),void 0,{top:!0}]]):e.createCommentVNode("",!0)])]),c.value&&m.value?(e.openBlock(),e.createElementBlock("div",h4,[e.createElementVNode("div",y4,[e.createElementVNode("div",Z4,[e.createElementVNode("strong",null,e.toDisplayString(O.$t("diffViewer.version"))+" "+e.toDisplayString(c.value),1)]),e.createElementVNode("div",g4,[e.createElementVNode("strong",null,e.toDisplayString(O.$t("diffViewer.version"))+" "+e.toDisplayString(m.value),1)])]),e.createElementVNode("div",f4,[p.value?(e.openBlock(),e.createElementBlock("div",W4,[e.createVNode(e.unref(Bt))])):d.value?(e.openBlock(),e.createElementBlock("div",N4,[F[5]||(F[5]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2 text-2xl","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(d.value),1)])):(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"mergeViewContainer",ref:W},null,512))])])):e.createCommentVNode("",!0)]),_:1},8,["visible","header"])}}},[["__scopeId","data-v-60abb8bc"]]),A4={reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,maxReconnectAttempts:10,heartbeatInterval:3e4,messageBufferSize:100},vt={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",RECONNECTING:"reconnecting",ERROR:"error"};function nm(t={}){const l={...A4,...t},a=e.ref(vt.DISCONNECTED),i=e.ref(null),o=e.ref(null),n=e.ref(0),s=e.shallowRef([]);let r=null,c=null,m=null,h=null,b=!1;const p={onConnected:[],onDisconnected:[],onMessage:[],onError:[],onReconnecting:[]},d=(F,M)=>(p[F]&&p[F].push(M),()=>W(F,M)),W=(F,M)=>{if(p[F]){const I=p[F].indexOf(M);I>-1&&p[F].splice(I,1)}},Z=(F,...M)=>{p[F]&&p[F].forEach(I=>I(...M))},N=F=>new Promise((M,I)=>{if(r&&r.readyState===WebSocket.OPEN){M();return}h=F,b=!1,a.value=vt.CONNECTING;try{r=new WebSocket(F),r.onopen=()=>{a.value=vt.CONNECTED,n.value=0,i.value=null,Y(),L(),Z("onConnected"),M()},r.onclose=g=>{if(X(),o.value=g.code,a.value=vt.DISCONNECTED,g.code===1009){a.value=vt.ERROR,Z("onDisconnected",g);return}!b&&!g.wasClean&&G(),Z("onDisconnected",g)},r.onerror=g=>{i.value=g,a.value=vt.ERROR,Z("onError",g),I(g)},r.onmessage=g=>{try{const J=JSON.parse(g.data);f(J)}catch(J){console.error("[CollabWebSocket] Failed to parse message:",J)}}}catch(g){i.value=g,a.value=vt.ERROR,Z("onError",g),I(g)}}),y=()=>{b=!0,X(),j(),r&&(r.close(1e3,"User disconnected"),r=null),a.value=vt.DISCONNECTED,s.value=[]},A=F=>{const M=JSON.stringify(F);return r&&r.readyState===WebSocket.OPEN?(r.send(M),!0):(s.value.length<l.messageBufferSize?s.value=[...s.value,M]:console.warn("[CollabWebSocket] Message buffer full, dropping message"),!1)},f=F=>{F.type!=="pong"&&Z("onMessage",F)},Y=()=>{X(),c=setInterval(()=>{r&&r.readyState===WebSocket.OPEN&&A({type:"ping"})},l.heartbeatInterval)},X=()=>{c&&(clearInterval(c),c=null)},G=()=>{if(n.value>=l.maxReconnectAttempts){console.error("[CollabWebSocket] Max reconnection attempts reached"),a.value=vt.ERROR;return}a.value=vt.RECONNECTING,n.value++;const F=Math.min(l.reconnectInterval*Math.pow(l.reconnectDecay,n.value-1),l.maxReconnectInterval);Z("onReconnecting",n.value,F),m=setTimeout(()=>{h&&!b&&(s.value=[],N(h).catch(()=>{}))},F)},j=()=>{m&&(clearTimeout(m),m=null)},L=()=>{if(r&&r.readyState===WebSocket.OPEN&&s.value.length>0){const F=[...s.value];s.value=[],F.forEach(M=>{r.send(M)})}},z=()=>r&&r.readyState===WebSocket.OPEN,O=()=>{n.value=0};return e.onUnmounted(()=>{y()}),{connectionState:e.readonly(a),lastError:e.readonly(i),lastCloseCode:e.readonly(o),reconnectAttempts:e.readonly(n),bufferedMessages:e.readonly(s),connect:N,disconnect:y,send:A,isConnected:z,resetReconnectAttempts:O,on:d,off:W}}class Y4{constructor(){this.basePath="/api/collab"}getBaseUrl(){return Ee.config.hostEcm}async getTicket(){return Ee.getTicketEcm()}createAuthHeader(l){return`Basic ${btoa(`ROLE_TICKET:${l}`)}`}async checkAvailability(l){try{const a=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s${this.basePath}/availability/${l}`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(a)}});if(!i.ok){if(i.status===404)return{available:!1,enabled:!1,permissionLevel:"NONE"};if(i.status===403)return{available:!1,enabled:!0,permissionLevel:"NONE",reason:"NO_READ_PERMISSION"};throw new Error(`HTTP ${i.status}: ${i.statusText}`)}return await i.json()}catch(a){throw console.error("[CollabService] Error checking availability:",a),Ge("collabService.checkAvailability",a)}}async initSession(l){try{const a=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s${this.basePath}/session/init`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:this.createAuthHeader(a)},body:JSON.stringify({nodeId:l})});if(!i.ok){const o=await i.json();throw new Error(o.error||`HTTP ${i.status}`)}return await i.json()}catch(a){throw console.error("[CollabService] Error initializing session:",a),Ge("collabService.initSession",a)}}getWebSocketUrl(){const l=this.getBaseUrl(),a=l.startsWith("https")?"wss":"ws",i=l.replace(/^https?:\/\//,"");return`${a}://${i}/alfresco/collab`}generateClientId(){return`client-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}}const sa=new Y4,z4="pristy-collab-backups",El="backups",M4=1;let Ma=null;const ni=()=>Ma?Promise.resolve(Ma):new Promise((t,l)=>{const a=indexedDB.open(z4,M4);a.onupgradeneeded=i=>{const o=i.target.result;o.objectStoreNames.contains(El)||o.createObjectStore(El,{keyPath:"nodeId"})},a.onsuccess=i=>{Ma=i.target.result,Ma.onclose=()=>{Ma=null},t(Ma)},a.onerror=i=>{l(i.target.error)}}),Ro={async saveBackup(t,l,a){try{const i=await ni();return new Promise((o,n)=>{const s=i.transaction(El,"readwrite");s.objectStore(El).put({nodeId:t,content:l,timestamp:Date.now(),sessionId:a}),s.oncomplete=()=>o(),s.onerror=c=>n(c.target.error)})}catch(i){console.warn("[CollabBackup] Failed to save backup:",i)}},async loadBackup(t){try{const l=await ni();return new Promise((a,i)=>{const s=l.transaction(El,"readonly").objectStore(El).get(t);s.onsuccess=()=>a(s.result||null),s.onerror=r=>i(r.target.error)})}catch(l){return console.warn("[CollabBackup] Failed to load backup:",l),null}},async clearBackup(t){try{const l=await ni();return new Promise((a,i)=>{const o=l.transaction(El,"readwrite");o.objectStore(El).delete(t),o.oncomplete=()=>a(),o.onerror=s=>i(s.target.error)})}catch(l){console.warn("[CollabBackup] Failed to clear backup:",l)}}},Bl="editor",ra="observer",im=2;class X4 extends Wt.WidgetType{constructor(l){super(),this.peer=l}toDOM(){const l=document.createElement("span");l.className="cm-remote-cursor",l.style.borderLeft=`2px solid ${this.peer.color}`,l.style.marginLeft="-1px",l.style.position="relative";const a=document.createElement("span");return a.className="cm-remote-cursor-label",a.style.backgroundColor=this.peer.color,a.style.color="#fff",a.style.padding="1px 4px",a.style.borderRadius="3px",a.style.fontSize="10px",a.style.position="absolute",a.style.top="-18px",a.style.left="0",a.style.whiteSpace="nowrap",a.textContent=this.peer.displayName,l.appendChild(a),l}}const sm=Ml.StateEffect.define(),So=Ml.StateField.define({create(){return[]},update(t,l){for(const a of l.effects)if(a.is(sm))return a.value;return t}}),O4=Wt.ViewPlugin.fromClass(class{constructor(t){this.decorations=this.createDecorations(t)}update(t){(t.docChanged||t.state.field(So)!==t.startState.field(So))&&(this.decorations=this.createDecorations(t.view))}createDecorations(t){const l=t.state.field(So),a=[];for(const i of l)if(i.position>=0&&i.position<=t.state.doc.length&&(a.push(Wt.Decoration.widget({widget:new X4(i),side:1}).range(i.position)),i.anchor!==i.position)){const o=Math.min(i.anchor,i.position),n=Math.max(i.anchor,i.position);a.push(Wt.Decoration.mark({class:"cm-remote-selection",attributes:{style:`background-color: ${i.color}33`}}).range(o,n))}return Wt.Decoration.set(a,!0)}},{decorations:t=>t.decorations});function rm(){const t=e.ref(!1),l=e.ref(null),a=e.ref(null),i=e.ref(null),o=e.ref(null),n=e.shallowRef([]),s=e.shallowRef([]),r=e.ref(0),c=e.ref(null),m=e.ref(!1),h=e.ref(!1),b=e.ref(null);let p=null,d=null;const{connectionState:W,lastCloseCode:Z,connect:N,disconnect:y,send:A,on:f,off:Y,resetReconnectAttempts:X}=nm();let G=null,j=null,L=null,z=null,O=null,F=null;const M=new Ml.Compartment;let I=null;const g=ce=>{G=ce},J=e.computed(()=>n.value.length),ae=e.computed(()=>W.value===vt.CONNECTED),Q=e.computed(()=>W.value===vt.RECONNECTING),pe=e.computed(()=>W.value===vt.ERROR),P=e.computed(()=>o.value===Bl),ee=e.computed(()=>o.value===ra),S=e.computed(()=>n.value.filter(ce=>ce.role===Bl).length),E=e.computed(()=>n.value.filter(ce=>ce.role===ra).length),ye=e.computed(()=>b.value==="WRITE"),_=e.computed(()=>b.value==="READ"||b.value==="WRITE"),B=ce=>[Ja.collab({startVersion:ce,clientID:a.value,sharedEffects:we=>{if(we.selection){const Qe=we.selection.main;Ue(Qe.head,Qe.anchor)}return[]}}),So,O4,M.of(Wt.EditorView.editable.of(!0))],ue=async ce=>new Promise((we,Qe)=>{const $e=setTimeout(()=>{Y("onMessage",Be),Qe(new Error("Authentication timeout"))},5e3),Be=wt=>{wt.type==="authenticated"?(clearTimeout($e),Y("onMessage",Be),we()):wt.type==="error"&&wt.code==="AUTH_FAILED"&&(clearTimeout($e),Y("onMessage",Be),Qe(new Error(wt.message||"Authentication failed")))};f("onMessage",Be),A({type:"auth",ticket:ce})}),Ne=async(ce,we,Qe,$e=ra,Be=null,wt=null,nl=null)=>{t.value&&await be(),m.value=!1;try{j=ce,G=we,a.value=sa.generateClientId(),p=Be,d=wt,I=nl,z=Qe,O=$e;const kt=await sa.checkAvailability(j);if(b.value=kt.permissionLevel||"WRITE",!kt.enabled)throw new Error("Collaborative editing is not available for this document");if(kt.permissionLevel==="NONE")throw new Error("Access denied to this document");kt.permissionLevel==="READ"&&$e===Bl&&($e=ra);const il=sa.getWebSocketUrl();f("onMessage",st),f("onDisconnected",oe),f("onReconnecting",ie),f("onConnected",H),await N(il);const sl=await sa.getTicket();return await ue(sl),new Promise((ne,Me)=>{const Fe=setTimeout(()=>{Me(new Error("Timeout waiting for welcome message"))},1e4),Ke=rt=>{rt.type==="welcome"?(clearTimeout(Fe),Y("onMessage",Ke),De(rt),ne(rt)):rt.type==="error"&&(clearTimeout(Fe),Y("onMessage",Ke),rt.code==="SESSION_FULL"&&(m.value=!0),Me(new Error(rt.message)))};f("onMessage",Ke),A({type:"join",nodeId:j,clientId:a.value,displayName:Qe,mode:$e,protocolVersion:im})})}catch(kt){throw c.value=kt,kt}},be=async()=>{if(t.value){if(L&&(clearTimeout(L),L=null),F&&(clearInterval(F),F=null),G&&j){const ce=G.state.doc.toString();await Ro.saveBackup(j,ce,l.value).catch(()=>{})}l.value&&a.value&&A({type:"leave",sessionId:l.value,clientId:a.value}),Y("onMessage",st),Y("onDisconnected",oe),Y("onReconnecting",ie),Y("onConnected",H),y(),t.value=!1,l.value=null,n.value=[],s.value=[],i.value=null,o.value=null,b.value=null,p=null,d=null,I=null,z=null,O=null,G=null,j=null}},De=ce=>{l.value=ce.sessionId,r.value=ce.version,i.value=ce.color,o.value=ce.role||ra,n.value=ce.peers||[],t.value=!0,ve(),F&&clearInterval(F),F=setInterval(()=>{if(G&&j){const we=G.state.doc.toString();Ro.saveBackup(j,we,l.value).catch(()=>{})}},1e4)},Ve=ce=>ce.toJSON(),Je=ce=>Ml.ChangeSet.fromJSON(ce),st=ce=>{switch(ce.type){case"updates":Se(ce);break;case"peers":u(ce);break;case"cursor":te(ce);break;case"promoted":T(ce);break;case"saved":k(ce);break;case"resync":me(ce);break;case"error":$(ce);break}},Se=ce=>{if(!G&&p&&ce.document!==void 0){p(ce.document,ce.version);return}if(!G)return;const we=ce.updates.map(Qe=>({changes:Je(Qe.changes),clientID:Qe.clientID}));try{const Qe=Ja.receiveUpdates(G.state,we);G.dispatch(Qe),Ja.sendableUpdates(G.state).length>0&&re()}catch(Qe){console.error("[CollabEditor] Error applying updates:",Qe)}},u=ce=>{n.value=ce.peers.filter(we=>we.clientId!==a.value),ve()},te=ce=>{if(ce.clientId===a.value)return;const we=n.value.find(Qe=>Qe.clientId===ce.clientId);we&&(we.cursorPosition=ce.position,we.cursorAnchor=ce.anchor,ve())},$=ce=>{c.value=new Error(ce.message),console.error("[CollabEditor] Server error:",ce.code,ce.message,ce.details),ce.code==="SESSION_FULL"?(m.value=!0,be()):ce.code==="ACCESS_DENIED"?be():ce.code==="INCOMPATIBLE_PROTOCOL"&&(h.value=!0,be())},T=ce=>{o.value=Bl,r.value=ce.version,p&&ce.document!==void 0&&p(ce.document,ce.version)},k=ce=>{j&&Ro.clearBackup(j).catch(()=>{}),d&&d(ce)},x=ce=>{if(G)try{G.dispatch({effects:M.reconfigure(Wt.EditorView.editable.of(ce))})}catch(we){console.warn("[CollabEditor] Failed to toggle editable:",we)}},oe=()=>{if(x(!1),G&&j){const ce=G.state.doc.toString();Ro.saveBackup(j,ce,l.value).catch(()=>{})}},ie=(ce,we)=>{console.log(`[CollabEditor] Reconnecting in ${we}ms (attempt ${ce})`)},H=async()=>{if(!(!t.value||!j))try{const ce=await sa.getTicket();await ue(ce),A({type:"join",nodeId:j,clientId:a.value,displayName:z,mode:O,protocolVersion:im}),x(!0)}catch(ce){console.error("[CollabEditor] Failed to re-authenticate on reconnect:",ce)}},me=ce=>{r.value=ce.version,n.value=ce.peers||[],ve(),I?I(ce.document,ce.version):p&&ce.document!==void 0&&p(ce.document,ce.version)},Ae=()=>{if(!G||!t.value||!ae.value)return;const ce=Ja.sendableUpdates(G.state);if(ce.length===0)return;const we=Ja.getSyncedVersion(G.state),Qe=ce.map(Be=>({clientID:Be.clientID,changes:Ve(Be.changes)})),$e=G.state.doc.toString();A({type:"push",sessionId:l.value,clientId:a.value,version:we,updates:Qe,document:$e})},re=()=>{L&&clearTimeout(L),L=setTimeout(Ae,50)};let We=null;const Ue=(ce,we)=>{We&&clearTimeout(We),We=setTimeout(()=>{t.value&&ae.value&&A({type:"cursor",sessionId:l.value,clientId:a.value,position:ce,anchor:we})},100)},ve=()=>{if(!G)return;const ce=n.value.filter(we=>we.cursorPosition!==void 0).map(we=>({clientId:we.clientId,displayName:we.displayName,color:we.color,position:we.cursorPosition,anchor:we.cursorAnchor||we.cursorPosition}));s.value=ce,G.dispatch({effects:sm.of(ce)})},nt=()=>ce=>{ce.docChanged&&t.value&&re()},gt=()=>new Promise((ce,we)=>{if(!t.value||!ae.value){we(new Error("Not connected to collaborative session"));return}if(o.value===Bl){ce({role:Bl});return}const Qe=setTimeout(()=>{Y("onMessage",$e),we(new Error("Timeout waiting for promotion confirmation"))},1e4),$e=Be=>{Be.type==="promoted"?(clearTimeout(Qe),Y("onMessage",$e),ce(Be)):Be.type==="error"&&Be.context==="promote"&&(clearTimeout(Qe),Y("onMessage",$e),we(new Error(Be.message)))};f("onMessage",$e),A({type:"promote",sessionId:l.value,clientId:a.value})}),Nt=()=>new Promise((ce,we)=>{if(!t.value||!ae.value){we(new Error("Not connected to collaborative session"));return}const Qe=setTimeout(()=>{Y("onMessage",$e),we(new Error("Timeout waiting for save confirmation"))},1e4),$e=Be=>{Be.type==="saved"?(clearTimeout(Qe),Y("onMessage",$e),ce(Be)):Be.type==="error"&&Be.context==="save"&&(clearTimeout(Qe),Y("onMessage",$e),we(new Error(Be.message)))};f("onMessage",$e),A({type:"save",sessionId:l.value,clientId:a.value})});return e.onUnmounted(()=>{be()}),{isCollabActive:t,isSessionFull:m,isProtocolIncompatible:h,permissionLevel:b,sessionId:l,clientId:a,myColor:i,myRole:o,connectedPeers:n,remoteCursors:s,connectionState:W,lastError:c,startVersion:r,peerCount:J,isConnected:ae,isReconnecting:Q,isConnectionFailed:pe,isEditor:P,isObserver:ee,editorCount:S,observerCount:E,hasWritePermission:ye,hasReadPermission:_,startCollab:Ne,stopCollab:be,setEditorView:g,createCollabExtensions:B,createUpdateListener:nt,pushChanges:Ae,requestSave:Nt,promoteToEditor:gt,retryConnection:async()=>{X(),await H()},lastCloseCode:Z}}const cm=je.defineStore({id:"CollabStore",state:()=>({enabled:!1,loaded:!1,activeSession:null,activeNodeId:null,connectedPeers:[],connectionState:"disconnected",myColor:null,lastError:null,maxPeers:5}),getters:{peerCount:t=>t.connectedPeers.length,hasActivePeers:t=>t.connectedPeers.length>0,isCollabActive:t=>t.activeSession!==null,isConnected:t=>t.connectionState==="connected",isReconnecting:t=>t.connectionState==="reconnecting",isAvailable:t=>t.enabled&&t.loaded},actions:{async init(){try{const t=xe();this.enabled=t.COLLAB_ENABLED!==!1,this.maxPeers=t.COLLAB_MAX_PEERS||5,this.loaded=!0,console.log("[CollabStore] Initialized, enabled:",this.enabled)}catch(t){console.error("[CollabStore] Failed to initialize:",t),this.enabled=!1,this.loaded=!0}},async checkAvailability(t){if(!this.enabled)return{available:!1,reason:"disabled"};try{return await sa.checkAvailability(t)}catch(l){return console.error("[CollabStore] Availability check failed:",l),{available:!1,reason:"error",error:l}}},setActiveSession(t){this.activeSession=t?.sessionId||null,this.activeNodeId=t?.nodeId||null,this.myColor=t?.color||null},updatePeers(t){this.connectedPeers=t||[]},setConnectionState(t){this.connectionState=t},setError(t){this.lastError=t},clearSession(){this.activeSession=null,this.activeNodeId=null,this.connectedPeers=[],this.myColor=null,this.connectionState="disconnected",this.lastError=null},addPeer(t){this.connectedPeers.findIndex(a=>a.clientId===t.clientId)===-1&&this.connectedPeers.push(t)},removePeer(t){const l=this.connectedPeers.findIndex(a=>a.clientId===t);l!==-1&&this.connectedPeers.splice(l,1)},updatePeerCursor(t,l,a){const i=this.connectedPeers.find(o=>o.clientId===t);i&&(i.cursorPosition=l,i.cursorAnchor=a)}}}),w4={class:"codemirror-editor-root"},k4={key:0,class:"consultation-title col"},C4={key:2,class:"collab-indicators flex align-items-center gap-2 ml-3"},T4={class:"collab-status-text text-sm"},I4={key:0,class:"collab-peers flex align-items-center gap-1"},j4={key:0,class:"collab-peer-more text-sm"},G4={key:1,class:"collab-participant-badges flex align-items-center gap-2"},D4={class:"collab-badge collab-badge-editor flex align-items-center gap-1"},L4={class:"text-sm font-medium"},V4={class:"collab-badge collab-badge-observer flex align-items-center gap-1"},v4={class:"text-sm font-medium"},F4={class:"flex gap-2 align-items-center"},R4={class:"card editor-wrapper border-1 surface-border border-round overflow-hidden flex flex-column p-0 m-0"},S4={key:0,class:"edit-mode-wrapper flex-grow-1 flex flex-column min-h-0"},x4={key:1,class:"consultation-view flex-grow-1"},U4=300,dm=fe({__name:"CodeMirrorEditor",props:{contentUrl:{type:String,default:null},contentNode:{type:Object,default:null},readOnly:{type:Boolean,default:!1},isSharedLink:{type:Boolean,default:!1}},setup(t){const{t:l}=Rt.useI18n(),a=bl.useToast();go.useConfirm();const{isDarkMode:i}=jo(),o=Oo(),n=cm(),{isCollabActive:s,isSessionFull:r,connectedPeers:c,isConnected:m,isReconnecting:h,peerCount:b,myRole:p,isEditor:d,isObserver:W,editorCount:Z,observerCount:N,startVersion:y,startCollab:A,stopCollab:f,setEditorView:Y,createCollabExtensions:X,createUpdateListener:G,requestSave:j,promoteToEditor:L}=rm(),z=t,O=e.ref(""),F=e.ref(""),M=e.ref(null),I=e.ref(!1),g=e.ref(!1),J=e.ref(o.isSmallScreen?"editor":"split"),ae=e.ref(!1),Q=e.ref(null),pe=e.ref(null),P=e.ref(null),ee=e.ref(null),S=e.ref(null),E=e.ref(null),ye=e.shallowRef(null),_=e.shallowRef(null),B=e.ref([]),ue=e.ref(!1),Ne=e.ref(!1),be=e.ref(!1),De=e.ref(0),Ve=e.ref(null),Je=e.ref("");let st=null;e.watch(O,ne=>{clearTimeout(st),st=setTimeout(()=>{Je.value=ne},U4)},{immediate:!0}),e.onUnmounted(()=>{clearTimeout(st)});const{isMarkdown:Se,isHtml:u,iframeContent:te,previewBodyHtml:$}=qn({content:Je,mimeType:Q}),T=e.computed(()=>O.value!==F.value),k=e.computed(()=>B.value&&B.value.length>=2),x=e.computed(()=>{const ne=[{value:"editor",icon:"ri-code-line",label:l("editor.viewMode.editorOnly")}];return o.isSmallScreen||ne.push({value:"split",icon:"ri-layout-column-fill",label:l("editor.viewMode.split")}),ne.push({value:"preview",icon:"ri-eye-line",label:l("editor.viewMode.previewOnly")}),ne}),oe=ne=>{const Me=ne?pe:P;if(!Me.value)return;const Fe=Aa(Q.value),rt=[...Ya({editable:ne,showLineNumbers:!0,enableHistory:ne,dark:i(),lineWrapping:ae.value,onUpdate:ne?bt=>{O.value=bt}:null})];Fe&&(!Array.isArray(Fe)||Fe.length>0)&&rt.push(Fe);const Kt=Ml.EditorState.create({doc:O.value,extensions:rt}),kl=new Wt.EditorView({state:Kt,parent:Me.value});ne?ye.value=kl:_.value=kl},ie=ne=>{ne.value&&(ne.value.destroy(),ne.value=null)},H=async ne=>{if(!(!ne.id&&!ne.shareId))try{let Me;z.isSharedLink&&ne.shareId?Me=await Ye.getSharedLinkContent(ne.shareId):Me=await Ye.getNodeContent(ne.id,!1);let Fe=await Me.text();if(ne.content?.mimeType==="application/json")try{Fe=JSON.stringify(JSON.parse(Fe),null,2)}catch(Ke){console.warn("Failed to format JSON, displaying raw content:",Ke.message)}z.readOnly||await re(ne),O.value=Fe,F.value=Fe,Q.value=ne.content?.mimeType||"text/plain",await e.nextTick(),!g.value&&!Se.value&&!u.value&&!_.value&&oe(!1)}catch(Me){console.error("Failed to load content:",Me),a.add({severity:"error",summary:l("error.error"),detail:l("editor.loadError"),life:3e3})}},me=async()=>{if(s.value){try{const ne=await j();F.value=O.value,ne.versionLabel?a.add({severity:"success",summary:l("success"),detail:`${l("editor.saveSuccess")} (v${ne.versionLabel})`,life:3e3}):ne.noChanges?a.add({severity:"info",summary:l("info"),detail:l("editor.alreadyUpToDate"),life:3e3}):a.add({severity:"success",summary:l("success"),detail:l("editor.saveSuccess"),life:3e3}),await gt(z.contentNode.id)}catch(ne){a.add({severity:"error",summary:l("error.error"),detail:ne.message,life:4e3})}return}if(T.value)try{await Ye.updateContentNode(z.contentNode.id,O.value,Q.value),F.value=O.value,a.add({severity:"success",summary:l("success"),detail:l("editor.saveSuccess"),life:3e3}),await gt(z.contentNode.id)}catch(ne){a.add({severity:"error",summary:l("error.error"),detail:ne.message,life:4e3})}},Ae=async()=>{try{const ne=await He.lockNode(z.contentNode.id,{timeToExpire:0,type:"ALLOW_OWNER_CHANGES",lifetime:"EPHEMERAL"});await re(ne.entry),await H(ne.entry)}catch{try{const Me=await He.getNode(z.contentNode.id,{include:["properties"]});await re(Me.entry)}catch{a.add({severity:"error",summary:l("error.error"),detail:l("editor.refreshError"),life:3e3})}}},re=async ne=>{const Me=ne.properties?.["cm:lockOwner"],Fe=mt();Me&&Me.id!==Fe.person.id?(I.value=!0,M.value=l("node.lockedBy",{name:Me.displayName})):(I.value=!1,M.value=null)},We=async()=>{if(n.enabled&&Ne.value){be.value=!0;try{g.value=!0,await e.nextTick(),await e.nextTick();let ne=0;for(;!ye.value&&ne<10;)await e.nextTick(),ne++;if(!ye.value)throw new Error("Editor view not created");await wt(),s.value?a.add({severity:"success",summary:l("success"),detail:l("collab.connected"),life:3e3}):(g.value=!1,a.add({severity:"error",summary:l("error.error"),detail:l("collab.initError"),life:4e3}))}catch(ne){console.error("Failed to start collaborative editing:",ne),g.value=!1,a.add({severity:"error",summary:l("error.error"),detail:l("collab.initError"),life:4e3})}finally{be.value=!1}}else await Ae(),I.value||(g.value=!0)},Ue=async()=>{T.value&&await me(),await nl();let Me=await(await Ye.getNodeContent(z.contentNode.id,!1)).text();if(z.contentNode.content?.mimeType==="application/json")try{Me=JSON.stringify(JSON.parse(Me),null,2)}catch{}O.value=Me,F.value=Me,g.value=!1,await Be(z.contentNode.id)},ve=async()=>{if(s.value){await Ue();return}T.value&&await me(),g.value=!1,await He.unlockNode(z.contentNode.id).catch(()=>{})},nt=()=>{const ne=document.createElement("a");ne.href=z.contentUrl,ne.download=z.contentNode.name,ne.click()},gt=async ne=>{if(ne)try{const Me=await Ye.listNodeVersionHistory(ne);B.value=Me.list.entries}catch(Me){console.error("Error fetching versions:",Me)}},Nt=()=>{ue.value=!0},ce=async()=>{await H(z.contentNode),await gt(z.contentNode.id)},we=async ne=>{if(!ne||z.readOnly){Ne.value=!1;return}try{const Me=await n.checkAvailability(ne);Ve.value=Me.permissionLevel||"WRITE",De.value=Me.maxPeers||0,Ne.value=Me.enabled===!0&&Ve.value!=="NONE"}catch(Me){console.error("[Collab] Failed to check collab availability:",Me),Ne.value=!1,Ve.value=null}},Qe=(ne,Me)=>{if(!g.value&&ne!==void 0&&(O.value=ne,F.value=ne,_.value)){const Fe=_.value.state.update({changes:{from:0,to:_.value.state.doc.length,insert:ne}});_.value.dispatch(Fe)}},$e=()=>{F.value=O.value},Be=async ne=>{if(!(!ne||z.readOnly||!n.enabled||!Ne.value)&&!s.value)try{const Me=mt(),Fe=Me.person?.displayName||Me.person?.id||"User";await A(ne,null,Fe,ra,Qe,$e)}catch(Me){console.error("[Collab] Failed to connect as observer:",Me)}},wt=async()=>{if(!z.contentNode?.id||!ye.value)throw new Error("Missing node ID or editor view");const ne=mt(),Me=ne.person?.displayName||ne.person?.id||"User";let Fe,Ke;if(s.value&&W.value){const rt=await L();Fe=rt.version||y.value,Ke=rt.document}else{const rt=await A(z.contentNode.id,null,Me,Bl,Qe,$e);Fe=rt.version,Ke=rt.document}Ke!==void 0&&(O.value=Ke,F.value=Ke),await kt(Fe)},nl=async()=>{try{await f()}catch(ne){console.error("Failed to stop collaborative editing:",ne)}},kt=async ne=>{if(!pe.value)return;ie(ye),await e.nextTick();const Me=Aa(Q.value),Fe=Ya({editable:!0,showLineNumbers:!0,enableHistory:!0,dark:i(),lineWrapping:ae.value,onUpdate:bt=>{O.value=bt}}),Ke=X(ne),rt=Wt.EditorView.updateListener.of(G()),Kt=[...Fe,...Ke,rt];Me&&(!Array.isArray(Me)||Me.length>0)&&Kt.push(Me);const kl=Ml.EditorState.create({doc:O.value,extensions:Kt});ye.value=new Wt.EditorView({state:kl,parent:pe.value}),Y(ye.value)},il=()=>{if(g.value){if(J.value==="split")return ee.value;if(J.value==="preview")return S.value}else return E.value;return null},sl=ne=>{!ne||ne._previewInitialized||(ne.srcdoc=te.value,ne._previewInitialized=!0)};return e.watch([ee,S,E],()=>{const ne=il();ne&&sl(ne)}),e.watch($,ne=>{const Me=il();!Me||!Me._previewInitialized||Me.contentWindow?.postMessage({type:"preview-update",html:ne},"*")}),n.init(),e.watch(()=>z.contentNode,async ne=>{ne&&(H(ne),gt(ne.id),z.readOnly||(n.loaded||await n.init(),await we(ne.id),await Be(ne.id)))},{immediate:!0}),e.watch(g,async ne=>{ie(ye),ie(_),await e.nextTick(),ne?J.value!=="preview"&&oe(!0):!Se.value&&!u.value&&oe(!1)}),e.watch(J,async(ne,Me)=>{if(!g.value||!(Se.value||u.value))return;const Fe=ne!=="preview";Me!=="preview"&&ie(ye),Fe&&(await e.nextTick(),oe(!0))}),e.watch(ae,async()=>{g.value&&J.value!=="preview"&&ye.value?(ie(ye),await e.nextTick(),oe(!0)):!g.value&&!Se.value&&!u.value&&_.value&&(ie(_),await e.nextTick(),oe(!1))}),e.onBeforeUnmount(async()=>{s.value&&await f(),ie(ye),ie(_),g.value&&!I.value&&!s.value&&He.unlockNode(z.contentNode.id).catch(()=>{})}),(ne,Me)=>{const Fe=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",w4,[e.createVNode(e.unref(dn),{class:"consultation-toolbar"},{start:e.withCtx(()=>[t.contentNode?(e.openBlock(),e.createElementBlock("h3",k4,e.toDisplayString(t.contentNode.name),1)):e.createCommentVNode("",!0),ne.$route.params.versionId?(e.openBlock(),e.createBlock(e.unref(ea),{key:1,class:"tag-version",value:ne.$route.params.versionId},null,8,["value"])):e.createCommentVNode("",!0),e.unref(s)?(e.openBlock(),e.createElementBlock("div",C4,[e.createElementVNode("span",{class:e.normalizeClass(["collab-status-dot",{connected:e.unref(m),reconnecting:e.unref(h)}])},null,2),e.createElementVNode("span",T4,e.toDisplayString(e.unref(m)?ne.$t("collab.connected"):ne.$t("collab.reconnecting")),1),e.unref(b)>0?(e.openBlock(),e.createElementBlock("div",I4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).slice(0,6),Ke=>e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:Ke.clientId,class:"collab-peer-avatar",style:e.normalizeStyle({backgroundColor:Ke.color})},[e.createTextVNode(e.toDisplayString(Ke.displayName.charAt(0).toUpperCase()),1)],4)),[[Fe,Ke.displayName,void 0,{bottom:!0}]])),128)),e.unref(b)>6?(e.openBlock(),e.createElementBlock("span",j4," +"+e.toDisplayString(e.unref(b)-6),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(s)&&e.unref(m)?(e.openBlock(),e.createElementBlock("div",G4,[e.withDirectives((e.openBlock(),e.createElementBlock("div",D4,[Me[3]||(Me[3]=e.createElementVNode("i",{class:"ri-edit-fill","aria-hidden":"true"},null,-1)),e.createElementVNode("span",L4,e.toDisplayString(e.unref(Z)+(e.unref(d)?1:0)),1)])),[[Fe,ne.$t("collab.editorsTooltip"),void 0,{bottom:!0}]]),e.withDirectives((e.openBlock(),e.createElementBlock("div",V4,[Me[4]||(Me[4]=e.createElementVNode("i",{class:"ri-eye-fill","aria-hidden":"true"},null,-1)),e.createElementVNode("span",v4,e.toDisplayString(e.unref(N)+(e.unref(W)?1:0)),1)])),[[Fe,ne.$t("collab.observersTooltip"),void 0,{bottom:!0}]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),end:e.withCtx(()=>[e.createElementVNode("div",F4,[g.value&&(e.unref(Se)||e.unref(u))?(e.openBlock(),e.createBlock(e.unref(Fl),{key:0,modelValue:J.value,"onUpdate:modelValue":Me[0]||(Me[0]=Ke=>J.value=Ke),options:x.value,"option-value":"value","allow-empty":!1,class:"view-mode-selector"},{option:e.withCtx(Ke=>[e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(Ke.option.icon),"aria-hidden":"true"},null,2),[[Fe,Ke.option.label,void 0,{bottom:!0}]])]),_:1},8,["modelValue","options"])):e.createCommentVNode("",!0),!t.readOnly&&!g.value&&!e.unref(r)&&(!Ne.value||Ve.value==="WRITE")?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:1,icon:"ri-pencil-line",severity:"info",onClick:We,disabled:I.value||be.value,loading:be.value,"aria-label":ne.$t("editor.edit"),raised:""},null,8,["disabled","loading","aria-label"])),[[Fe,ne.$t("editor.edit"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),g.value&&!t.readOnly?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:2,icon:"ri-save-line",severity:"primary",onClick:me,disabled:I.value||!T.value,"aria-label":ne.$t("save"),raised:""},null,8,["disabled","aria-label"])),[[Fe,ne.$t("save"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),g.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:3,icon:"ri-logout-box-line",severity:"warn",onClick:ve,raised:""},null,512)),[[Fe,ne.$t("editor.closeEdit"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),Me[5]||(Me[5]=e.createElementVNode("div",{class:"w-1rem"},[e.createElementVNode("i",{class:"ri-more-2-line","aria-hidden":"true"})],-1)),g.value&&J.value!=="preview"||!g.value&&!e.unref(Se)&&!e.unref(u)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:4,icon:"ri-text-wrap",severity:ae.value?"info":"secondary",onClick:Me[1]||(Me[1]=Ke=>ae.value=!ae.value),"aria-label":ne.$t("editor.lineWrap"),raised:""},null,8,["severity","aria-label"])),[[Fe,ne.$t("editor.lineWrap"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),t.isSharedLink?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:5,icon:"ri-layout-column-line",severity:"secondary",onClick:Nt,disabled:!k.value,"aria-label":ne.$t("diffViewer.compareTitle"),raised:""},null,8,["disabled","aria-label"])),[[Fe,ne.$t("diffViewer.compareTitle"),void 0,{bottom:!0}]]),e.withDirectives(e.createVNode(e.unref(de),{icon:"ri-download-line",severity:"secondary",onClick:nt,"aria-label":ne.$t("download"),raised:""},null,8,["aria-label"]),[[Fe,ne.$t("download"),void 0,{bottom:!0}]])])]),_:1}),I.value&&!t.readOnly?(e.openBlock(),e.createBlock(e.unref(ml),{key:0,severity:"warn",icon:"ri-lock-line",class:"p-small-message p-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.value),1)]),_:1})):e.createCommentVNode("",!0),e.unref(r)?(e.openBlock(),e.createBlock(e.unref(ml),{key:1,severity:"warn",icon:"ri-group-line",class:"p-small-message px-3 py-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ne.$t("collab.sessionFull"))+" ("+e.toDisplayString(De.value)+"/"+e.toDisplayString(De.value)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)&&e.unref(h)?(e.openBlock(),e.createBlock(e.unref(ml),{key:2,severity:"warn",icon:"ri-wifi-off-line",class:"p-small-message p-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ne.$t("collab.offline")),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",R4,[g.value?(e.openBlock(),e.createElementBlock("div",S4,[(e.unref(Se)||e.unref(u))&&J.value==="split"?(e.openBlock(),e.createBlock(e.unref(Km),{key:0,class:"flex-grow-1 h-full"},{default:e.withCtx(()=>[e.createVNode(e.unref(Hi),{class:"flex",size:50,"min-size":10},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"editorContainer",ref:pe,class:"w-full flex-grow-1"},null,512)]),_:1}),e.createVNode(e.unref(Hi),{class:"flex",size:50,"min-size":10},{default:e.withCtx(()=>[e.createElementVNode("iframe",{ref_key:"splitPreviewIframe",ref:ee,class:"preview-container w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,512)]),_:1})]),_:1})):!e.unref(Se)&&!e.unref(u)||J.value==="editor"?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"editorContainer",ref:pe,class:"editor-only-container w-full flex-grow-1"},null,512)):J.value==="preview"?(e.openBlock(),e.createElementBlock("iframe",{key:2,ref_key:"editPreviewIframe",ref:S,class:"preview-iframe w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,512)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",x4,[e.unref(Se)||e.unref(u)?(e.openBlock(),e.createElementBlock("iframe",{key:0,ref_key:"consultPreviewIframe",ref:E,class:"preview-iframe w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,512)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"consultationEditorContainer",ref:P,class:"consultation-editor-container"},null,512))]))]),e.createVNode(oi,{visible:ue.value,"onUpdate:visible":Me[2]||(Me[2]=Ke=>ue.value=Ke),"content-node":t.contentNode,versions:B.value,"initial-version-id":ne.$route.params.versionId,onRevertVersion:ce},null,8,["visible","content-node","versions","initial-version-id"])])}}},[["__scopeId","data-v-6a52da1e"]]),J4="pristy-config";class E4{async check(){const a=xe().INSTANCE_NAME;if(!a||a==="/")return{ok:!1,detail:"INSTANCE_NAME_NOT_SET"};try{return((await He.listNodeChildren(J4,{where:`(name='${a}')`}))?.list?.pagination?.totalItems??0)>0?{ok:!0,detail:"OK"}:{ok:!1,detail:"CONFIG_FOLDER_NOT_FOUND"}}catch(i){return console.error("ConfigHealthService.check failed",i),{ok:!1,detail:"CHECK_FAILED"}}}}const mm=new E4,B4={class:"font-semibold mb-2"},H4={class:"m-0 line-height-3"},Q4={class:"block mt-2 text-sm"},P4={class:"mt-2 mb-0 text-sm"},bm={__name:"ConfigHealthBanner",setup(t,{expose:l}){const a=ml,o=xe().INSTANCE_NAME,n=e.ref({ok:!0,detail:""}),s=e.ref(!1),r=e.ref(!1);return e.onMounted(async()=>{s.value=!0;try{n.value=await mm.check()}finally{s.value=!1,r.value=!0}}),l({health:n,checked:r}),(c,m)=>r.value&&!s.value&&!n.value.ok?(e.openBlock(),e.createBlock(e.unref(a),{key:0,severity:"error",closable:!1},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",B4,[m[0]||(m[0]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(c.$t("configHealth.error.title")),1)]),e.createElementVNode("p",H4,e.toDisplayString(c.$t("configHealth.error.description",{instance:e.unref(o)})),1),e.createElementVNode("code",Q4," pristy-config/"+e.toDisplayString(e.unref(o)),1),e.createElementVNode("p",P4,e.toDisplayString(c.$t("configHealth.error.action")),1)])]),_:1})):e.createCommentVNode("",!0)}},_4="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QIqaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49J++7vycgaWQ9J1c1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCc/Pgo8eDp4bXBtZXRhIHhtbG5zOng9J2Fkb2JlOm5zOm1ldGEvJyB4OnhtcHRrPSdBZG9iZSBFeHByZXNzJz4KPHJkZjpSREYgeG1sbnM6cmRmPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjJz4KIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PScnCiAgeG1sbnM6ZGM9J2h0d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lZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A+06/ND5wKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAMe4o8wOS8X/Fj4d+Ax/wAVX4u03T3H8Es6hj+HWt6WFrVvgi2aRpTn8KMHQf2kfgn4kvFsNK+IWlPPIcKjTBCT7Zxmtp4DE01dwZTw9SKu0ejwzwXESzW8qSo/KsjZBGM5/KuOSadnuZW1sPpALQIKACgAoAKACgAoAKACgAoAKACgAoATH5cjP0oApaxrmkaBZPqOtalb2Vsgy0s8gRQPqTVwpzqNKCu2OMXJ2irs83n/AGpfgNb3n2KT4j6V5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X7XTrfILwW37yQj0zwB+tcVbOYLSmrs56mPUVaKPrz4ZfCDwP8JtJGl+EtKSJnAE1w/M0pHct1/CvDr4mpiZc1R/LoedUrSqu8jtKwMgoAKACgAoAKACgCxYyNFdRMP72PwNTNJxEzpq4yQoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBkyCWNoz0ZSDTTswOWkjaKRkcYKnFdsdVcsbQAUAFABQAUAFABQAUAHXqM4NDDcXryf5daEkugCKACTgYpPUA9MdqBJWCmMKACgAoAKACgAoAKACgAoAKACgBePTr1pWATjvTDTsAx1I5o0AUcHp/SgfyE/wA+tAgoAKACgAoAKACgAoAKALemQGe8XjIU5NRVdotCZ0dchIUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAZuqaaLgefCPnHBHrW1OdtGNMxGUq2GHNdBQlABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQA+KGSdxHGhJNJtR3A6Gws1s4do5c/eNcs5c5DLVQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAJj1oAp3umw3QLr8snr6/WtIVHEaZi3NlcWrbZEPsR0NdEZqRRB/KqAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAFAzwOvpQBctdMnuSGYFEPc96ylUURXNq2tIbVNsajOOT3Nc8pOW5JPSAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgA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KACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBAMd6AD8vyoAXJp6AHWkMPy/OgQZoGH5fnQAUrCCq0AKLgFIAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP/9k=",K4={name:"ErrorComponent",components:{PrimeButton:de},props:{errorNb:{type:String,default:"500"},homeName:{type:String,default:"welcome"}},data(){return{title:"",subtitle:""}},created(){this.title=this.$t("nothingTitle"),this.subtitle=this.$t("nothingText")},methods:{onClick(){this.$router.push({name:this.homeName})}}},$4={class:"error-container"},q4={class:"error-card"},eN={class:"error-title"},tN={class:"error-image",src:_4,alt:"Angry Cat"},lN={class:"error-body"},aN={class:"error-card-title"},oN={class:"error-card-subtitle"};function nN(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",$4,[e.createElementVNode("div",q4,[e.createElementVNode("h2",eN,e.toDisplayString(a.errorNb),1),e.withDirectives(e.createElementVNode("img",tN,null,512),[[r,"www.vecteezy.com"]]),e.createElementVNode("div",lN,[e.createElementVNode("p",aN,e.toDisplayString(o.title),1),e.createElementVNode("p",oN,e.toDisplayString(o.subtitle),1),e.createVNode(s,{icon:"ri-corner-down-left-line",label:t.$t("goHome"),class:"error-button",onClick:n.onClick},null,8,["label","onClick"])])])])}const ii=fe(K4,[["render",nN],["__scopeId","data-v-b4ec85ac"]]);class iN{getBaseUrl(){return Ee.config.hostEcm}async getTicket(){return Ee.getTicketEcm()}createAuthHeader(l){return`Basic ${btoa(`ROLE_TICKET:${l}`)}`}async getStatus(){try{const l=await this.getTicket(),a=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/status`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(l)}});return a.ok?await a.json():{enabled:!1}}catch(l){return console.error("[ChatBackendService] Error checking status:",l),{enabled:!1}}}async getWorkspaceRoom(l){try{const a=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/workspace/${l}/room`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(a)}});return i.ok?await i.json():(console.warn(`[ChatBackendService] Failed to get room for site ${l}:`,i.status),{found:!1})}catch(a){return console.error(`[ChatBackendService] Error getting room for site ${l}:`,a),{found:!1}}}async createWorkspaceRoom(l){try{const a=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/workspace/${l}/room`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:this.createAuthHeader(a)},body:JSON.stringify({})});return i.ok?await i.json():(console.error(`[ChatBackendService] Failed to create room for site ${l}:`,i.status),null)}catch(a){return console.error(`[ChatBackendService] Error creating room for site ${l}:`,a),null}}async getUserChatToken(){try{const l=await this.getTicket(),a=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/user/token`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(l)}});return a.ok?await a.json():{hasCredentials:!1}}catch(l){return console.error("[ChatBackendService] Error getting user token:",l),{hasCredentials:!1}}}async saveUserChatToken(l,a){try{const i=await this.getTicket(),o=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/user/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:this.createAuthHeader(i)},body:JSON.stringify({userId:l,token:a})});if(!o.ok){const n=await o.json().catch(()=>({}));throw new Error(n.message||`HTTP ${o.status}`)}return await o.json()}catch(i){throw console.error("[ChatBackendService] Error saving user token:",i),i}}}const xo=new iN;class sN{constructor(){this.credentials=null,this.config=null}init(l){this.config=l,this.credentials=null}isEnabled(){return this.config?.CHAT_ENABLED===!0&&!!this.config?.ROCKETCHAT_HOST}isOAuthEnabled(){return this.config?.CHAT_OAUTH_ENABLED===!0}getServerUrl(){return(this.config?.ROCKETCHAT_HOST||"").replace(/\/$/,"")}getWebSocketUrl(){if(this.config?.ROCKETCHAT_WS_URL)return this.config.ROCKETCHAT_WS_URL;const l=this.config?.ROCKETCHAT_HOST||"",a=l.startsWith("https")?"wss":"ws",i=l.replace(/^https?:\/\//,"").replace(/\/$/,"");return`${a}://${i}/websocket`}async getCredentials(){if(this.credentials)return this.credentials;const l=await xo.getUserChatToken();return l.hasCredentials&&l.userId&&l.token?(this.credentials={userId:l.userId,authToken:l.token},this.credentials):(console.warn("[RocketChatAuthService] No credentials available. User needs to configure token in profile."),null)}clearCredentials(){this.credentials=null}async verifyCredentials(){const l=await this.getCredentials();if(!l)return!1;try{const a=await fetch(`${this.getServerUrl()}/api/v1/me`,{method:"GET",headers:{"X-Auth-Token":l.authToken,"X-User-Id":l.userId}});return a.ok?(await a.json()).success===!0:(this.clearCredentials(),!1)}catch(a){return console.error("[RocketChatAuthService] Error verifying credentials:",a),!1}}async getCurrentUser(){const l=await this.getCredentials();if(!l)return null;try{const a=await fetch(`${this.getServerUrl()}/api/v1/me`,{method:"GET",headers:{"X-Auth-Token":l.authToken,"X-User-Id":l.userId}});return a.ok?await a.json():null}catch(a){return console.error("[RocketChatAuthService] Error getting current user:",a),null}}}const _t=new sN;class rN{async request(l,a={}){const i=await _t.getCredentials();if(!i)throw new Error("Not authenticated to Rocket.Chat");const n=`${_t.getServerUrl()}${l}`,s={"Content-Type":"application/json","X-Auth-Token":i.authToken,"X-User-Id":i.userId,...a.headers},r=await fetch(n,{...a,headers:s}),c=r.headers.get("content-type");if(!c||!c.includes("application/json")){const h=await r.text();throw console.error(`[RocketChatService] Expected JSON but got ${c}:`,h.substring(0,200)),new Error(`Invalid response from Rocket.Chat: expected JSON, got ${c}`)}const m=await r.json();if(!r.ok||m.success===!1){const h=new Error(m.error||`HTTP ${r.status}`);throw h.status=r.status,h.data=m,h}return m}async getSubscriptions(){return(await this.request("/api/v1/subscriptions.get")).update||[]}async getGroups(){return(await this.request("/api/v1/groups.list")).groups||[]}async getRoomInfo(l){return(await this.request(`/api/v1/rooms.info?roomId=${l}`)).room}async getMessages(l,a={}){const i=new URLSearchParams({roomId:l,count:a.count||50});return a.oldest&&i.append("oldest",a.oldest),a.latest&&i.append("latest",a.latest),(await this.request(`/api/v1/groups.history?${i.toString()}`)).messages||[]}async sendMessage(l,a){return(await this.request("/api/v1/chat.postMessage",{method:"POST",body:JSON.stringify({roomId:l,text:a})})).message}async markAsRead(l){await this.request("/api/v1/subscriptions.read",{method:"POST",body:JSON.stringify({rid:l})})}async getUnreadCounts(){const l=await this.getSubscriptions(),a={};for(const i of l)i.unread>0&&(a[i.rid]=i.unread);return a}async getUserPresence(l){try{return(await this.request(`/api/v1/users.getPresence?userId=${l}`)).presence}catch{return"offline"}}async setUserPresence(l){await this.request("/api/v1/users.setStatus",{method:"POST",body:JSON.stringify({status:l})})}async getRoomMembers(l){return(await this.request(`/api/v1/groups.members?roomId=${l}`)).members||[]}async uploadFile(l,a,i=""){const o=await _t.getCredentials();if(!o)throw new Error("Not authenticated to Rocket.Chat");const n=new FormData;n.append("file",a),i&&n.append("description",i);const s=_t.getServerUrl(),r=await fetch(`${s}/api/v1/rooms.upload/${l}`,{method:"POST",headers:{"X-Auth-Token":o.authToken,"X-User-Id":o.userId},body:n}),c=await r.json();if(!r.ok||c.success===!1)throw new Error(c.error||"Failed to upload file");return c}}const Xa=new rN,cN={reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,maxReconnectAttempts:10,heartbeatInterval:25e3,messageBufferSize:100},tt={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",AUTHENTICATING:"authenticating",READY:"ready",RECONNECTING:"reconnecting",ERROR:"error"};function pm(t={}){const l={...cN,...t},a=e.ref(tt.DISCONNECTED),i=e.ref(null),o=e.ref(0),n=e.shallowRef([]),s=e.ref(new Set);let r=null,c=null,m=null,h=!1,b=0,p=new Map;const d={onConnected:[],onDisconnected:[],onReady:[],onMessage:[],onRoomMessage:[],onTyping:[],onPresence:[],onError:[],onReconnecting:[]},W=(_,B)=>(d[_]&&d[_].push(B),()=>Z(_,B)),Z=(_,B)=>{if(d[_]){const ue=d[_].indexOf(B);ue>-1&&d[_].splice(ue,1)}},N=(_,...B)=>{d[_]&&d[_].forEach(ue=>ue(...B))},y=()=>String(++b),A=()=>new Promise((_,B)=>{if(r&&r.readyState===WebSocket.OPEN){_();return}const ue=_t.getWebSocketUrl();if(!ue){const Ne=new Error("WebSocket URL not configured");i.value=Ne,a.value=tt.ERROR,B(Ne);return}h=!1,a.value=tt.CONNECTING;try{r=new WebSocket(ue),r.onopen=()=>{a.value=tt.CONNECTED,o.value=0,i.value=null,Y({msg:"connect",version:"1",support:["1","pre2","pre1"]}),N("onConnected")},r.onclose=Ne=>{pe(),a.value=tt.DISCONNECTED,!h&&!Ne.wasClean&&P(),N("onDisconnected",Ne)},r.onerror=Ne=>{i.value=Ne,a.value=tt.ERROR,N("onError",Ne),B(Ne)},r.onmessage=Ne=>{try{const be=JSON.parse(Ne.data);j(be,_,B)}catch(be){console.error("[ChatWebSocket] Failed to parse message:",be)}}}catch(Ne){i.value=Ne,a.value=tt.ERROR,N("onError",Ne),B(Ne)}}),f=()=>{h=!0,pe(),ee(),r&&(r.close(1e3,"User disconnected"),r=null),a.value=tt.DISCONNECTED,n.value=[],s.value=new Set,p.clear()},Y=_=>r&&r.readyState===WebSocket.OPEN?(r.send(JSON.stringify(_)),!0):!1,X=_=>Y(_)?!0:(n.value.length<l.messageBufferSize?n.value=[...n.value,_]:console.warn("[ChatWebSocket] Message buffer full, dropping message"),!1),G=(_,B=[])=>new Promise((ue,Ne)=>{const be=y();p.set(be,{resolve:ue,reject:Ne}),Y({msg:"method",method:_,id:be,params:B})||(p.delete(be),Ne(new Error("WebSocket not connected"))),setTimeout(()=>{p.has(be)&&(p.delete(be),Ne(new Error(`Method ${_} timed out`)))},3e4)}),j=(_,B,ue)=>{switch(_.msg){case"connected":Q(),L(B,ue);break;case"ping":Y({msg:"pong"});break;case"pong":break;case"result":z(_);break;case"ready":break;case"added":case"changed":case"removed":O(_);break;case"error":F(_,ue);break;case"failed":console.error("[ChatWebSocket] DDP version negotiation failed"),a.value=tt.ERROR,ue&&ue(new Error("DDP version negotiation failed"));break;default:N("onMessage",_)}},L=async(_,B)=>{a.value=tt.AUTHENTICATING;try{const ue=await _t.getCredentials();if(!ue)throw new Error("No credentials available");const Ne=await G("login",[{resume:ue.authToken}]);if(Ne&&Ne.id)a.value=tt.READY,S(),g(),N("onReady"),_&&_();else throw new Error("Authentication failed")}catch(ue){console.error("[ChatWebSocket] Authentication failed:",ue),i.value=ue,a.value=tt.ERROR,N("onError",ue),B&&B(ue)}},z=_=>{const B=p.get(_.id);B&&(p.delete(_.id),_.error?B.reject(new Error(_.error.message||"Method error")):B.resolve(_.result))},O=_=>{const{collection:B,fields:ue}=_;if(B==="stream-room-messages"){if(ue&&ue.args){const[Ne]=ue.args;N("onRoomMessage",Ne)}}else if(B==="stream-notify-room"){if(ue&&ue.args){const[Ne,...be]=ue.args;Ne==="typing"&&N("onTyping",...be)}}else B==="stream-notify-user"&&ue&&ue.args&&N("onMessage",{type:"user-notification",data:ue.args})},F=(_,B)=>{const ue=new Error(_.reason||"Unknown error");i.value=ue,N("onError",ue),B&&B(ue)},M=async _=>{if(s.value.has(_))return;const B=y();Y({msg:"sub",id:B,name:"stream-room-messages",params:[_,!1]});const ue=y();Y({msg:"sub",id:ue,name:"stream-notify-room",params:[`${_}/typing`,!1]}),s.value=new Set([...s.value,_])},I=_=>{s.value=new Set([...s.value].filter(B=>B!==_))},g=()=>{const _=[...s.value];s.value=new Set,_.forEach(B=>{M(B)})},J=async(_,B)=>G("sendMessage",[{_id:y(),rid:_,msg:B}]),ae=(_,B,ue)=>{Y({msg:"method",method:"stream-notify-room",id:y(),params:[`${_}/typing`,B,ue]})},Q=()=>{pe(),c=setInterval(()=>{r&&r.readyState===WebSocket.OPEN&&Y({msg:"ping"})},l.heartbeatInterval)},pe=()=>{c&&(clearInterval(c),c=null)},P=()=>{if(o.value>=l.maxReconnectAttempts){console.error("[ChatWebSocket] Max reconnection attempts reached"),a.value=tt.ERROR;return}a.value=tt.RECONNECTING,o.value++;const _=Math.min(l.reconnectInterval*Math.pow(l.reconnectDecay,o.value-1),l.maxReconnectInterval);N("onReconnecting",o.value,_),m=setTimeout(()=>{h||A().catch(()=>{})},_)},ee=()=>{m&&(clearTimeout(m),m=null)},S=()=>{if(r&&r.readyState===WebSocket.OPEN&&n.value.length>0){const _=[...n.value];n.value=[],_.forEach(B=>{Y(B)})}},E=()=>a.value===tt.READY&&r&&r.readyState===WebSocket.OPEN,ye=()=>r&&r.readyState===WebSocket.OPEN;return e.onUnmounted(()=>{f()}),{connectionState:e.readonly(a),lastError:e.readonly(i),reconnectAttempts:e.readonly(o),bufferedMessages:e.readonly(n),subscribedRooms:e.readonly(s),connect:A,disconnect:f,isConnected:ye,isReady:E,subscribeRoom:M,unsubscribeRoom:I,sendChatMessage:J,sendTyping:ae,callMethod:G,send:X,on:W,off:Z}}const um=je.defineStore({id:"chat",state:()=>({enabled:!1,loaded:!1,hasCredentials:!1,connectionState:tt.DISCONNECTED,lastError:null,rooms:[],currentRoomId:null,messagesByRoom:{},unreadCounts:{},typingByRoom:{},currentUser:null,_webSocket:null}),getters:{currentRoom:t=>t.currentRoomId&&t.rooms.find(l=>l._id===t.currentRoomId)||null,currentMessages:t=>t.currentRoomId?t.messagesByRoom[t.currentRoomId]||[]:[],currentTypingUsers:t=>t.currentRoomId?t.typingByRoom[t.currentRoomId]||[]:[],totalUnreadCount:t=>Object.values(t.unreadCounts).reduce((l,a)=>l+a,0),isReady:t=>t.enabled&&t.hasCredentials&&t.connectionState===tt.READY,isConnecting:t=>t.connectionState===tt.CONNECTING||t.connectionState===tt.AUTHENTICATING,isReconnecting:t=>t.connectionState===tt.RECONNECTING,isAvailable:t=>t.enabled&&t.loaded&&t.hasCredentials},actions:{async init(){try{const t=xe();if(_t.init({CHAT_ENABLED:t.CHAT_ENABLED,ROCKETCHAT_HOST:t.ROCKETCHAT_HOST,ROCKETCHAT_WS_URL:t.ROCKETCHAT_WS_URL,CHAT_OAUTH_ENABLED:t.CHAT_OAUTH_ENABLED,CHAT_OAUTH_SERVICE:t.CHAT_OAUTH_SERVICE}),this.enabled=_t.isEnabled(),this.enabled){const l=await _t.getCredentials();this.hasCredentials=!!l,this.hasCredentials&&(this.currentUser=await _t.getCurrentUser())}this.loaded=!0,console.log("[ChatStore] Initialized, enabled:",this.enabled,"hasCredentials:",this.hasCredentials)}catch(t){console.error("[ChatStore] Failed to initialize:",t),this.enabled=!1,this.loaded=!0}},async connect(){if(!this.enabled||!this.hasCredentials)return console.warn("[ChatStore] Cannot connect: chat not available"),!1;if(this._webSocket&&this.connectionState===tt.READY)return!0;try{return this._webSocket=pm(),this._webSocket.on("onReady",()=>{this.connectionState=tt.READY,this.loadRooms(),this.currentRoomId&&this._webSocket.subscribeRoom(this.currentRoomId)}),this._webSocket.on("onDisconnected",()=>{this.connectionState=tt.DISCONNECTED}),this._webSocket.on("onReconnecting",t=>{this.connectionState=tt.RECONNECTING,console.log("[ChatStore] Reconnecting, attempt:",t)}),this._webSocket.on("onError",t=>{this.lastError=t,this.connectionState=tt.ERROR}),this._webSocket.on("onRoomMessage",t=>{this.handleNewMessage(t)}),this._webSocket.on("onTyping",(t,l)=>{this.handleTypingIndicator(t,l)}),this.connectionState=tt.CONNECTING,await this._webSocket.connect(),!0}catch(t){return console.error("[ChatStore] Connection failed:",t),this.lastError=t,this.connectionState=tt.ERROR,!1}},disconnect(){this._webSocket&&(this._webSocket.disconnect(),this._webSocket=null),this.connectionState=tt.DISCONNECTED},async loadRooms(){try{const t=await Xa.getSubscriptions();this.rooms=t.map(a=>({_id:a.rid,name:a.name,fname:a.fname||a.name,type:a.t,unread:a.unread||0,lastMessage:a.lastMessage,updatedAt:a._updatedAt}));const l={};t.forEach(a=>{a.unread>0&&(l[a.rid]=a.unread)}),this.unreadCounts=l}catch(t){console.error("[ChatStore] Failed to load rooms:",t)}},async selectRoom(t){if(!t){this.currentRoomId=null;return}this.currentRoomId=t,this._webSocket&&this._webSocket.isReady()&&await this._webSocket.subscribeRoom(t),this.messagesByRoom[t]||await this.loadMessages(t),await this.markAsRead(t)},async loadMessages(t,l={}){try{const i=[...await Xa.getMessages(t,{count:l.count||50,oldest:l.oldest,latest:l.latest})].reverse();l.prepend&&this.messagesByRoom[t]?this.messagesByRoom[t]=[...i,...this.messagesByRoom[t]]:this.messagesByRoom[t]=i}catch(a){console.error("[ChatStore] Failed to load messages:",a)}},async sendMessage(t){if(!(!this.currentRoomId||!t.trim()))try{this._webSocket&&this._webSocket.isReady()?await this._webSocket.sendChatMessage(this.currentRoomId,t):await Xa.sendMessage(this.currentRoomId,t)}catch(l){throw console.error("[ChatStore] Failed to send message:",l),l}},async markAsRead(t){try{await Xa.markAsRead(t),this.unreadCounts[t]=0}catch(l){console.error("[ChatStore] Failed to mark as read:",l)}},handleNewMessage(t){const l=t.rid;this.messagesByRoom[l]||(this.messagesByRoom[l]=[]),t.ts&&typeof t.ts=="object"&&t.ts.$date&&(t.ts=new Date(t.ts.$date).toISOString()),this.messagesByRoom[l].some(i=>i._id===t._id)||(this.messagesByRoom[l].push(t),l!==this.currentRoomId&&(this.unreadCounts[l]=(this.unreadCounts[l]||0)+1))},handleTypingIndicator(t,l){const a=this.currentRoomId;a&&(this.currentUser&&t===this.currentUser.username||(this.typingByRoom[a]||(this.typingByRoom[a]=[]),l?this.typingByRoom[a].includes(t)||this.typingByRoom[a].push(t):this.typingByRoom[a]=this.typingByRoom[a].filter(i=>i!==t)))},sendTypingIndicator(t){!this.currentRoomId||!this.currentUser||!this._webSocket||!this._webSocket.isReady()||this._webSocket.sendTyping(this.currentRoomId,this.currentUser.username,t)},async getOrCreateWorkspaceRoom(t){try{let l=await xo.getWorkspaceRoom(t);return l.found||(l=await xo.createWorkspaceRoom(t)),l&&l.roomId?(await this.loadRooms(),l):null}catch(l){return console.error("[ChatStore] Failed to get/create workspace room:",l),null}},async uploadFile(t,l=""){if(!this.currentRoomId)throw new Error("No room selected");try{await Xa.uploadFile(this.currentRoomId,t,l)}catch(a){throw console.error("[ChatStore] Failed to upload file:",a),a}},clear(){this.disconnect(),this.rooms=[],this.currentRoomId=null,this.messagesByRoom={},this.unreadCounts={},this.typingByRoom={},this.currentUser=null,this.lastError=null}}}),dN={name:"ChatMessage",components:{PrimeAvatar:cn},props:{message:{type:Object,required:!0},currentUserId:{type:String,default:""}},emits:["attachment-click"],computed:{isOwnMessage(){return this.message.u?._id===this.currentUserId},isSystemMessage(){return this.message.t!==void 0},hasAttachments(){return this.message.attachments&&this.message.attachments.length>0},avatarLabel(){return(this.message.u?.name||this.message.u?.username||"?").charAt(0).toUpperCase()},avatarColor(){const t=this.message.u?.username||"";let l=0;for(let i=0;i<t.length;i++)l=t.charCodeAt(i)+((l<<5)-l);return`hsl(${Math.abs(l%360)}, 65%, 45%)`},formattedTime(){if(!this.message.ts)return"";const t=new Date(this.message.ts),l=new Date;return t.toDateString()===l.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}},methods:{isImageAttachment(t){return t.image_url?!0:["image/jpeg","image/png","image/gif","image/webp"].includes(t.image_type)},getAttachmentUrl(t){const l=_t.getServerUrl(),a=t.image_url||t.title_link;return a?a.startsWith("http")?a:`${l}${a}`:""},openAttachment(t){this.$emit("attachment-click",t)}}},mN={key:0,class:"chat-message__avatar"},bN={class:"chat-message__content"},pN={key:0,class:"chat-message__header"},uN={key:0,class:"chat-message__username"},hN={class:"chat-message__time"},yN={class:"chat-message__body"},ZN={key:0,class:"chat-message__text"},gN={key:1,class:"chat-message__attachments"},fN=["src","alt","onClick"],WN={key:1,class:"chat-message__attachment-file"},NN=["href"],AN={key:0,class:"attachment-desc"},YN={key:0,class:"chat-message__text mt-2"};function zN(t,l,a,i,o,n){const s=e.resolveComponent("PrimeAvatar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-message",{"chat-message--own":n.isOwnMessage,"chat-message--system":n.isSystemMessage}])},[!n.isOwnMessage&&!n.isSystemMessage?(e.openBlock(),e.createElementBlock("div",mN,[e.createVNode(s,{label:n.avatarLabel,style:e.normalizeStyle({backgroundColor:n.avatarColor}),shape:"circle"},null,8,["label","style"])])):e.createCommentVNode("",!0),e.createElementVNode("div",bN,[n.isSystemMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",pN,[n.isOwnMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",uN,e.toDisplayString(a.message.u?.name||a.message.u?.username||t.$t("chat.unknownUser")),1)),e.createElementVNode("span",hN,e.toDisplayString(n.formattedTime),1)])),e.createElementVNode("div",yN,[n.hasAttachments?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ZN,e.toDisplayString(a.message.msg),1)),n.hasAttachments?(e.openBlock(),e.createElementBlock("div",gN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.message.attachments,r=>(e.openBlock(),e.createElementBlock("div",{key:r._id||r.title,class:"chat-message__attachment"},[n.isImageAttachment(r)?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.getAttachmentUrl(r),alt:r.title||r.description,class:"chat-message__attachment-image",onClick:c=>n.openAttachment(r)},null,8,fN)):(e.openBlock(),e.createElementBlock("div",WN,[l[0]||(l[0]=e.createElementVNode("i",{class:"ri-attachment-line","aria-hidden":"true"},null,-1)),e.createElementVNode("a",{href:n.getAttachmentUrl(r),target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(r.title||t.$t("chat.attachment")),9,NN),r.description?(e.openBlock(),e.createElementBlock("span",AN,e.toDisplayString(r.description),1)):e.createCommentVNode("",!0)]))]))),128)),a.message.msg?(e.openBlock(),e.createElementBlock("div",YN,e.toDisplayString(a.message.msg),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])],2)}const si=fe(dN,[["render",zN],["__scopeId","data-v-165e03f8"]]),MN={name:"ChatInput",components:{PrimeButton:de,PrimeTextarea:zl},props:{disabled:{type:Boolean,default:!1},typingUsers:{type:Array,default:()=>[]}},emits:["send","typing","upload"],data(){return{message:"",selectedFiles:[],typingTimeout:null,isTyping:!1}},computed:{canSend(){return this.message.trim().length>0||this.selectedFiles.length>0},typingText(){return this.typingUsers.length===0?"":this.typingUsers.length===1?this.$t("chat.userTyping",{user:this.typingUsers[0]}):this.typingUsers.length===2?this.$t("chat.usersTyping",{user1:this.typingUsers[0],user2:this.typingUsers[1]}):this.$t("chat.multipleUsersTyping")}},beforeUnmount(){this.typingTimeout&&clearTimeout(this.typingTimeout),this.isTyping&&this.$emit("typing",!1)},methods:{handleKeyDown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.sendMessage())},handleInput(){this.isTyping||(this.isTyping=!0,this.$emit("typing",!0)),this.typingTimeout&&clearTimeout(this.typingTimeout),this.typingTimeout=setTimeout(()=>{this.isTyping&&(this.isTyping=!1,this.$emit("typing",!1))},3e3)},sendMessage(){if(this.canSend){if(this.isTyping&&(this.isTyping=!1,this.$emit("typing",!1)),this.selectedFiles.length>0){this.selectedFiles.forEach(t=>{this.$emit("upload",t,this.message)}),this.selectedFiles=[],this.message="";return}this.message.trim()&&(this.$emit("send",this.message.trim()),this.message="")}},triggerFileInput(){this.$refs.fileInput.click()},handleFileSelect(t){const l=Array.from(t.target.files);this.selectedFiles=[...this.selectedFiles,...l],t.target.value=""},removeFile(t){this.selectedFiles.splice(t,1)}}},XN={class:"chat-input"},ON={class:"chat-input__container"},wN={key:0,class:"chat-input__typing"},kN={class:"typing-text"},CN={key:1,class:"chat-input__files"},TN={class:"file-name"};function IN(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("PrimeTextarea");return e.openBlock(),e.createElementBlock("div",XN,[e.createElementVNode("div",ON,[e.createVNode(s,{type:"button",icon:"ri-attachment-line",text:"",rounded:"",disabled:a.disabled,"aria-label":t.$t("chat.attachFile"),onClick:n.triggerFileInput},null,8,["disabled","aria-label","onClick"]),e.createElementVNode("input",{ref:"fileInput",type:"file",class:"hidden",multiple:"",onChange:l[0]||(l[0]=(...c)=>n.handleFileSelect&&n.handleFileSelect(...c))},null,544),e.createVNode(r,{modelValue:o.message,"onUpdate:modelValue":l[1]||(l[1]=c=>o.message=c),placeholder:t.$t("chat.typeMessage"),disabled:a.disabled,"auto-resize":"",rows:1,class:"chat-input__textarea",onKeydown:n.handleKeyDown,onInput:n.handleInput},null,8,["modelValue","placeholder","disabled","onKeydown","onInput"]),e.createVNode(s,{type:"button",icon:"ri-send-plane-2-fill",rounded:"",disabled:a.disabled||!n.canSend,"aria-label":t.$t("chat.send"),onClick:n.sendMessage},null,8,["disabled","aria-label","onClick"])]),a.typingUsers.length>0?(e.openBlock(),e.createElementBlock("div",wN,[l[2]||(l[2]=e.createElementVNode("span",{class:"typing-dots"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")],-1)),e.createElementVNode("span",kN,e.toDisplayString(n.typingText),1)])):e.createCommentVNode("",!0),o.selectedFiles.length>0?(e.openBlock(),e.createElementBlock("div",CN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.selectedFiles,(c,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"chat-input__file"},[l[3]||(l[3]=e.createElementVNode("i",{class:"ri-file-line","aria-hidden":"true"},null,-1)),e.createElementVNode("span",TN,e.toDisplayString(c.name),1),e.createVNode(s,{type:"button",icon:"ri-close-line","aria-label":t.$t("delete"),text:"",rounded:"",size:"small",severity:"danger",onClick:h=>n.removeFile(m)},null,8,["aria-label","onClick"])]))),128))])):e.createCommentVNode("",!0)])}const ri=fe(MN,[["render",IN],["__scopeId","data-v-5648e98b"]]),jN={name:"ChatRoomList",components:{PrimeInputText:_e,PrimeBadge:Ua},props:{rooms:{type:Array,default:()=>[]},selectedRoomId:{type:String,default:null},unreadCounts:{type:Object,default:()=>({})}},emits:["select"],data(){return{searchQuery:""}},computed:{filteredRooms(){if(!this.searchQuery.trim())return this.sortedRooms;const t=this.searchQuery.toLowerCase();return this.sortedRooms.filter(l=>(l.fname||l.name||"").toLowerCase().includes(t))},sortedRooms(){return[...this.rooms].sort((t,l)=>{const a=this.unreadCounts[t._id]||0,i=this.unreadCounts[l._id]||0;if(a!==i)return i-a;const o=new Date(t.updatedAt||0);return new Date(l.updatedAt||0)-o})}},methods:{selectRoom(t){this.$emit("select",t._id)},getUnreadCount(t){return this.unreadCounts[t]||0},getRoomIcon(t){switch(t.type){case"c":return"ri-hashtag";case"p":return"ri-lock-line";case"d":return"ri-user-line";default:return"ri-chat-3-line"}},truncateMessage(t){if(!t)return"";const l=40;return t.length<=l?t:t.substring(0,l)+"..."}}},GN={class:"chat-room-list"},DN={class:"chat-room-list__search"},LN={class:"p-input-icon-left w-full"},VN={class:"chat-room-list__items"},vN=["onClick"],FN={class:"chat-room-item__icon"},RN={class:"chat-room-item__info"},SN={class:"chat-room-item__name"},xN={key:0,class:"chat-room-item__last-message"},UN={key:0,class:"last-message-user"},JN={key:0,class:"chat-room-list__empty"};function EN(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputText"),r=e.resolveComponent("PrimeBadge");return e.openBlock(),e.createElementBlock("div",GN,[e.createElementVNode("div",DN,[e.createElementVNode("span",LN,[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-search-line","aria-hidden":"true"},null,-1)),e.createVNode(s,{modelValue:o.searchQuery,"onUpdate:modelValue":l[0]||(l[0]=c=>o.searchQuery=c),placeholder:t.$t("chat.searchRooms"),class:"w-full"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",VN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.filteredRooms,c=>(e.openBlock(),e.createElementBlock("div",{key:c._id,class:e.normalizeClass(["chat-room-item",{"chat-room-item--selected":c._id===a.selectedRoomId}]),onClick:m=>n.selectRoom(c)},[e.createElementVNode("div",FN,[e.createElementVNode("i",{class:e.normalizeClass(n.getRoomIcon(c)),"aria-hidden":"true"},null,2)]),e.createElementVNode("div",RN,[e.createElementVNode("div",SN,e.toDisplayString(c.fname||c.name),1),c.lastMessage?(e.openBlock(),e.createElementBlock("div",xN,[c.lastMessage.u?(e.openBlock(),e.createElementBlock("span",UN,e.toDisplayString(c.lastMessage.u.name||c.lastMessage.u.username)+": ",1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.truncateMessage(c.lastMessage.msg)),1)])):e.createCommentVNode("",!0)]),n.getUnreadCount(c._id)>0?(e.openBlock(),e.createBlock(r,{key:0,value:n.getUnreadCount(c._id),severity:"danger",class:"chat-room-item__badge"},null,8,["value"])):e.createCommentVNode("",!0)],10,vN))),128)),n.filteredRooms.length===0?(e.openBlock(),e.createElementBlock("div",JN,[l[2]||(l[2]=e.createElementVNode("i",{class:"ri-chat-3-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("chat.noRooms")),1)])):e.createCommentVNode("",!0)])])}const ci=fe(jN,[["render",EN],["__scopeId","data-v-80a03793"]]),BN={name:"ChatPanel",components:{PrimeButton:de,PrimeProgressSpinner:Bt,ChatMessage:si,ChatInput:ri,ChatRoomList:ci},props:{showRoomList:{type:Boolean,default:!0},roomId:{type:String,default:null}},emits:["close","minimize","go-to-profile"],data(){return{minimized:!1,loadingMore:!1}},computed:{...je.mapStores(um),currentRoom(){return this.chatStore.currentRoom},currentUserId(){return this.chatStore.currentUser?._id||""},headerTitle(){return this.currentRoom?this.currentRoom.fname||this.currentRoom.name:this.$t("chat.title")},canLoadMore(){return this.chatStore.currentMessages.length>=50}},watch:{roomId:{immediate:!0,handler(t){t&&this.selectRoom(t)}},"chatStore.currentMessages":{handler(){this.$nextTick(()=>{this.scrollToBottom()})}}},async mounted(){await this.initChat()},beforeUnmount(){},methods:{async initChat(){this.chatStore.loaded||await this.chatStore.init(),this.chatStore.isAvailable&&!this.chatStore.isReady&&await this.chatStore.connect()},async selectRoom(t){await this.chatStore.selectRoom(t),this.$nextTick(()=>{this.scrollToBottom()})},backToRoomList(){this.chatStore.selectRoom(null)},async sendMessage(t){try{await this.chatStore.sendMessage(t),this.$nextTick(()=>{this.scrollToBottom()})}catch{this.$toast.add({severity:"error",summary:this.$t("error"),detail:this.$t("chat.sendError"),life:3e3})}},handleTyping(t){this.chatStore.sendTypingIndicator(t)},async uploadFile(t,l){try{await this.chatStore.uploadFile(t,l)}catch{this.$toast.add({severity:"error",summary:this.$t("error"),detail:this.$t("chat.uploadError"),life:3e3})}},async loadMoreMessages(){if(!this.chatStore.currentRoomId||this.loadingMore)return;this.loadingMore=!0;const t=this.chatStore.currentMessages,l=t.length>0?t[0].ts:void 0;try{await this.chatStore.loadMessages(this.chatStore.currentRoomId,{count:50,latest:l,prepend:!0})}finally{this.loadingMore=!1}},handleAttachmentClick(t){const l=t.image_url||t.title_link;l&&window.open(l,"_blank","noopener,noreferrer")},scrollToBottom(){const t=this.$refs.messagesContainer;t&&(t.scrollTop=t.scrollHeight)},toggleMinimize(){this.minimized=!this.minimized,this.$emit("minimize",this.minimized)},close(){this.$emit("close")},goToProfile(){this.$emit("go-to-profile")},async reconnect(){await this.chatStore.connect()}}},HN={class:"chat-panel__header"},QN={class:"chat-panel__header-left"},PN={class:"chat-panel__title"},_N={class:"chat-panel__header-actions"},KN={class:"chat-panel__body"},$N={key:0,class:"chat-panel__status"},qN={key:0,class:"status-connecting"},e6={key:1,class:"status-reconnecting"},t6={key:2,class:"status-not-configured"},l6={key:3,class:"status-error"},a6={ref:"messagesContainer",class:"chat-panel__messages"},o6={key:0,class:"chat-panel__load-more"},n6={key:1,class:"chat-panel__empty"};function i6(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("PrimeProgressSpinner"),c=e.resolveComponent("ChatRoomList"),m=e.resolveComponent("ChatMessage"),h=e.resolveComponent("ChatInput");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-panel",{"chat-panel--minimized":o.minimized}])},[e.createElementVNode("div",HN,[e.createElementVNode("div",QN,[a.showRoomList&&n.currentRoom?(e.openBlock(),e.createBlock(s,{key:0,type:"button",icon:"ri-arrow-left-line","aria-label":t.$t("back"),text:"",rounded:"",onClick:n.backToRoomList},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0),e.createElementVNode("h3",PN,e.toDisplayString(n.headerTitle),1)]),e.createElementVNode("div",_N,[e.createVNode(s,{type:"button",icon:o.minimized?"ri-fullscreen-line":"ri-subtract-line","aria-label":o.minimized?t.$t("expand"):t.$t("minimize"),text:"",rounded:"",onClick:n.toggleMinimize},null,8,["icon","aria-label","onClick"]),e.createVNode(s,{type:"button",icon:"ri-close-line","aria-label":t.$t("close"),text:"",rounded:"",onClick:n.close},null,8,["aria-label","onClick"])])]),e.withDirectives(e.createElementVNode("div",KN,[t.chatStore.isReady?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.showRoomList&&!n.currentRoom?(e.openBlock(),e.createBlock(c,{key:0,rooms:t.chatStore.rooms,"selected-room-id":t.chatStore.currentRoomId,"unread-counts":t.chatStore.unreadCounts,onSelect:n.selectRoom},null,8,["rooms","selected-room-id","unread-counts","onSelect"])):n.currentRoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",a6,[n.canLoadMore?(e.openBlock(),e.createElementBlock("div",o6,[e.createVNode(s,{label:t.$t("chat.loadMore"),text:"",size:"small",loading:o.loadingMore,onClick:n.loadMoreMessages},null,8,["label","loading","onClick"])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.chatStore.currentMessages,b=>(e.openBlock(),e.createBlock(m,{key:b._id,message:b,"current-user-id":n.currentUserId,onAttachmentClick:n.handleAttachmentClick},null,8,["message","current-user-id","onAttachmentClick"]))),128)),t.chatStore.currentMessages.length===0?(e.openBlock(),e.createElementBlock("div",n6,[l[2]||(l[2]=e.createElementVNode("i",{class:"ri-chat-smile-2-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("chat.noMessages")),1)])):e.createCommentVNode("",!0)],512),e.createVNode(h,{disabled:!t.chatStore.isReady,"typing-users":t.chatStore.currentTypingUsers,onSend:n.sendMessage,onTyping:n.handleTyping,onUpload:n.uploadFile},null,8,["disabled","typing-users","onSend","onTyping","onUpload"])],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",$N,[t.chatStore.isConnecting?(e.openBlock(),e.createElementBlock("div",qN,[e.createVNode(r,{style:{width:"30px",height:"30px"}}),e.createElementVNode("span",null,e.toDisplayString(t.$t("chat.connecting")),1)])):t.chatStore.isReconnecting?(e.openBlock(),e.createElementBlock("div",e6,[e.createVNode(r,{style:{width:"30px",height:"30px"}}),e.createElementVNode("span",null,e.toDisplayString(t.$t("chat.reconnecting")),1)])):t.chatStore.hasCredentials?t.chatStore.lastError?(e.openBlock(),e.createElementBlock("div",l6,[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-error-warning-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("chat.connectionError")),1),e.createVNode(s,{label:t.$t("chat.retry"),outlined:"",onClick:n.reconnect},null,8,["label","onClick"])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",t6,[l[0]||(l[0]=e.createElementVNode("i",{class:"ri-key-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("chat.notConfigured")),1),e.createVNode(s,{label:t.$t("chat.configureInProfile"),outlined:"",onClick:n.goToProfile},null,8,["label","onClick"])]))]))],512),[[e.vShow,!o.minimized]])],2)}const hm=fe(BN,[["render",i6],["__scopeId","data-v-96fab464"]]),s6={name:"WorkspaceCard",directives:{tooltip:yt},props:{workspace:{type:Object,required:!0},showDescription:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0},showRole:{type:Boolean,default:!0},showActionMenu:{type:Boolean,default:!0},clickable:{type:Boolean,default:!0},actionMenuTooltip:{type:String,default:"Actions"},noDescriptionText:{type:String,default:"Aucune description"},roleLabels:{type:Object,default:()=>({})},visibilityLabels:{type:Object,default:()=>({})},roleTooltips:{type:Object,default:()=>({})}},emits:["click","action-menu"],computed:{description(){return this.workspace.description||this.workspace.properties?.["cm:description"]||""},visibilityIcon(){return{PUBLIC:"ri-global-line",PRIVATE:"ri-lock-line",MODERATED:"ri-shield-user-line"}[this.workspace.visibility]||"ri-question-line"},visibilityLabel(){return this.visibilityLabels[this.workspace.visibility]?this.visibilityLabels[this.workspace.visibility]:{PUBLIC:"Public",PRIVATE:"Privé",MODERATED:"Modéré"}[this.workspace.visibility]||this.workspace.visibility},roleLabel(){return this.roleLabels[this.workspace.role]?this.roleLabels[this.workspace.role]:this.workspace.role},roleTooltip(){return this.roleTooltips[this.workspace.role]?this.roleTooltips[this.workspace.role]:{SiteManager:"Vous pouvez gérer cet espace",SiteCollaborator:"Vous pouvez modifier le contenu",SiteContributor:"Vous pouvez ajouter du contenu",SiteConsumer:"Vous pouvez consulter le contenu"}[this.workspace.role]||""}},methods:{handleClick(){this.clickable&&this.$emit("click",this.workspace)}}},r6={class:"workspace-card-inner"},c6={class:"workspace-card-content"},d6={class:"workspace-card-header"},m6={class:"workspace-card-title"},b6={class:"workspace-card-footer"},p6={class:"workspace-card-meta"},u6={class:"workspace-card-info"};function h6(t,l,a,i,o,n){const s=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["workspace-card",{"workspace-card-clickable":a.clickable}])},[l[4]||(l[4]=e.createElementVNode("div",{class:"workspace-card-accent"},null,-1)),e.createElementVNode("div",r6,[e.createElementVNode("div",{class:"workspace-card-body",onClick:l[2]||(l[2]=(...r)=>n.handleClick&&n.handleClick(...r))},[e.createElementVNode("div",c6,[e.createElementVNode("div",d6,[e.withDirectives((e.openBlock(),e.createElementBlock("span",m6,[e.createTextVNode(e.toDisplayString(a.workspace.title),1)])),[[s,a.workspace.title,void 0,{top:!0}]]),e.createElementVNode("div",{class:"workspace-card-actions",onClick:l[1]||(l[1]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(t.$slots,"actions",{},()=>[a.showActionMenu?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"workspace-action-btn",onClick:l[0]||(l[0]=r=>t.$emit("action-menu",r,a.workspace))},[...l[3]||(l[3]=[e.createElementVNode("i",{class:"ri-more-2-line"},null,-1)])])),[[s,a.actionMenuTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0)],!0)])]),a.showDescription?e.withDirectives((e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["workspace-card-description",{"no-description":!n.description}])},[e.createTextVNode(e.toDisplayString(n.description||a.noDescriptionText),1)],2)),[[s,n.description||null,void 0,{bottom:!0}]]):e.createCommentVNode("",!0)])]),e.createElementVNode("div",b6,[e.createElementVNode("div",p6,[a.showRole&&a.workspace.role?e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["workspace-role-badge",[`workspace-role-${a.workspace.role.toLowerCase()}`]])},[e.createTextVNode(e.toDisplayString(n.roleLabel),1)],2)),[[s,n.roleTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"meta",{},void 0,!0)]),e.createElementVNode("div",u6,[a.showVisibility?e.withDirectives((e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([n.visibilityIcon,"workspace-visibility-icon"])},null,2)),[[s,n.visibilityLabel,void 0,{top:!0}]]):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"footer-end",{},void 0,!0)])])])],2)}const di=fe(s6,[["render",h6],["__scopeId","data-v-800282ec"]]),y6={name:"WorkspaceList",components:{PrimeDataView:nn,PrimeMenu:ta,WorkspaceCard:di},props:{workspaces:{type:Array,default:()=>[]},layout:{type:String,default:"grid",validator:t=>["grid","list"].includes(t)},paginator:{type:Boolean,default:!0},rows:{type:Number,default:12},rowsPerPageOptions:{type:Array,default:()=>[6,12,24,48]},emptyMessage:{type:String,default:"Aucun espace trouvé"},showDescription:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0},showRole:{type:Boolean,default:!0},showActionMenu:{type:Boolean,default:!0},actionMenuTooltip:{type:String,default:"Actions"},roleLabels:{type:Object,default:()=>({})},visibilityLabels:{type:Object,default:()=>({})},noDescriptionText:{type:String,default:"Aucune description"},roleTooltips:{type:Object,default:()=>({})},actionMenuItemsBuilder:{type:Function,default:null}},emits:["workspace-click","action-menu"],data(){return{currentActionMenuItems:[],currentWorkspace:null}},methods:{handleActionMenu(t,l){this.currentWorkspace=l,this.actionMenuItemsBuilder?(this.currentActionMenuItems=this.actionMenuItemsBuilder(l),this.$refs.actionMenu.toggle(t)):this.$emit("action-menu",t,l)}}},Z6={class:"workspace-list"},g6={class:"workspace-list-empty"},f6={class:"workspace-grid"},W6={class:"workspace-list-view"};function N6(t,l,a,i,o,n){const s=e.resolveComponent("WorkspaceCard"),r=e.resolveComponent("PrimeDataView"),c=e.resolveComponent("PrimeMenu");return e.openBlock(),e.createElementBlock("div",Z6,[e.createVNode(r,{value:a.workspaces,layout:a.layout,paginator:a.paginator,rows:a.rows,rowsPerPageOptions:a.rowsPerPageOptions},{empty:e.withCtx(()=>[e.createElementVNode("div",g6,[e.renderSlot(t.$slots,"empty",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.emptyMessage),1)],!0)])]),grid:e.withCtx(m=>[e.createElementVNode("div",f6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.items,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id||h.guid||h.name,class:"workspace-grid-item"},[e.renderSlot(t.$slots,"card",{workspace:h},()=>[e.createVNode(s,{workspace:h,showDescription:a.showDescription,showVisibility:a.showVisibility,showRole:a.showRole,showActionMenu:a.showActionMenu,actionMenuTooltip:a.actionMenuTooltip,noDescriptionText:a.noDescriptionText,roleLabels:a.roleLabels,visibilityLabels:a.visibilityLabels,roleTooltips:a.roleTooltips,onClick:b=>t.$emit("workspace-click",h),onActionMenu:n.handleActionMenu},{actions:e.withCtx(()=>[e.renderSlot(t.$slots,"card-actions",{workspace:h},void 0,!0)]),meta:e.withCtx(()=>[e.renderSlot(t.$slots,"card-meta",{workspace:h},void 0,!0)]),"footer-end":e.withCtx(()=>[e.renderSlot(t.$slots,"card-footer-end",{workspace:h},void 0,!0)]),_:2},1032,["workspace","showDescription","showVisibility","showRole","showActionMenu","actionMenuTooltip","noDescriptionText","roleLabels","visibilityLabels","roleTooltips","onClick","onActionMenu"])],!0)]))),128))])]),list:e.withCtx(m=>[e.createElementVNode("div",W6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.items,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id||h.guid||h.name,class:"workspace-list-item"},[e.renderSlot(t.$slots,"list-item",{workspace:h},()=>[e.createVNode(s,{workspace:h,showDescription:a.showDescription,showVisibility:a.showVisibility,showRole:a.showRole,showActionMenu:a.showActionMenu,actionMenuTooltip:a.actionMenuTooltip,noDescriptionText:a.noDescriptionText,roleLabels:a.roleLabels,visibilityLabels:a.visibilityLabels,roleTooltips:a.roleTooltips,onClick:b=>t.$emit("workspace-click",h),onActionMenu:n.handleActionMenu},{actions:e.withCtx(()=>[e.renderSlot(t.$slots,"card-actions",{workspace:h},void 0,!0)]),meta:e.withCtx(()=>[e.renderSlot(t.$slots,"card-meta",{workspace:h},void 0,!0)]),"footer-end":e.withCtx(()=>[e.renderSlot(t.$slots,"card-footer-end",{workspace:h},void 0,!0)]),_:2},1032,["workspace","showDescription","showVisibility","showRole","showActionMenu","actionMenuTooltip","noDescriptionText","roleLabels","visibilityLabels","roleTooltips","onClick","onActionMenu"])],!0)]))),128))])]),_:3},8,["value","layout","paginator","rows","rowsPerPageOptions"]),e.createVNode(c,{ref:"actionMenu",model:o.currentActionMenuItems,popup:!0},null,8,["model"])])}const ym=fe(y6,[["render",N6],["__scopeId","data-v-31d4e912"]]),A6={name:"PredefinedViewsPanel",components:{PrimeSelect:Dt,PrimeTabs:Ga,PrimeTabList:Da,PrimeTab:Vl},props:{ancestorNodeId:{type:String,required:!0},displayContext:{type:String,default:"folderView"},initialCategory:{type:String,default:null},initialViewId:{type:String,default:null},categories:{type:Array,default:()=>[]},additionalViews:{type:Array,default:()=>[]}},emits:["load-view","category-change"],data(){return{selectedCategory:null,selectedViewId:null,isRestoringState:!1}},computed:{allViews(){return this.additionalViews},resolvedCategories(){return this.categories.filter(t=>t.display===void 0||t.display.includes(this.displayContext))},selectedCategoryObject(){return this.resolvedCategories.find(t=>t.id===this.selectedCategory)},currentViews(){if(!this.selectedCategory)return[];const t=this.selectedCategoryObject?.views||[];return this.allViews.filter(l=>l.filename&&t.includes(l.filename))}},watch:{resolvedCategories:{handler(t){t.length>0&&!this.selectedCategory&&(this.initialCategory&&t.some(l=>l.id===this.initialCategory)?(this.isRestoringState=!0,this.selectedCategory=this.initialCategory):this.selectedCategory=t[0].id,this.$nextTick(()=>{const l=this.currentViews;if(this.initialViewId&&l.some(a=>a.id===this.initialViewId)){this.selectedViewId=this.initialViewId;const a=l.find(i=>i.id===this.initialViewId);this.$emit("load-view",{view:a,ancestorNodeId:this.ancestorNodeId})}else this.isRestoringState=!1,this.$emit("category-change",{categoryId:this.selectedCategory,hasViews:l.length>0})}))},immediate:!0},selectedCategory(t){if(this.isRestoringState){this.isRestoringState=!1;return}this.selectedViewId=null,this.$nextTick(()=>{this.$emit("category-change",{categoryId:t,hasViews:this.currentViews.length>0})})},selectedViewId(t){if(t==null)return;const l=this.allViews.find(a=>a.id===t);l&&this.$emit("load-view",{view:l,ancestorNodeId:this.ancestorNodeId})},initialViewId(t){if(!t)return;this.allViews.find(a=>a.id===t)&&this.currentViews.some(a=>a.id===t)&&(this.selectedViewId=t)}}},Y6={key:0,class:"predefined-views-panel"},z6={key:1,class:"panel-separator"},M6={key:2,class:"tabs-wrapper"};function X6(t,l,a,i,o,n){const s=e.resolveComponent("PrimeSelect"),r=e.resolveComponent("PrimeTab"),c=e.resolveComponent("PrimeTabList"),m=e.resolveComponent("PrimeTabs");return n.resolvedCategories.length>0?(e.openBlock(),e.createElementBlock("div",Y6,[n.resolvedCategories.length>1?(e.openBlock(),e.createBlock(s,{key:0,modelValue:o.selectedCategory,"onUpdate:modelValue":l[0]||(l[0]=h=>o.selectedCategory=h),options:n.resolvedCategories,"option-label":"label","option-value":"id",size:"small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),n.resolvedCategories.length>1&&n.currentViews.length>0?(e.openBlock(),e.createElementBlock("span",z6)):e.createCommentVNode("",!0),n.currentViews.length>0?(e.openBlock(),e.createElementBlock("div",M6,[e.createVNode(m,{value:o.selectedViewId,"onUpdate:value":l[1]||(l[1]=h=>o.selectedViewId=h),scrollable:""},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.currentViews,h=>(e.openBlock(),e.createBlock(r,{key:h.id,value:h.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.name),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}const O6=fe(A6,[["render",X6],["__scopeId","data-v-63fa555e"]]),w6={class:"view-toolbar"},k6={class:"drop-zone-text"},C6={class:"drop-zone-hint"},T6={key:0,class:"text-center p-3"},I6={key:0,class:"selection-bar"},j6={class:"selection-info"},G6={class:"selection-text"},D6={class:"selection-actions"},L6={key:2,class:"p-3"},V6={class:"flex flex-column gap-3"},v6={class:"flex flex-column gap-1"},F6={for:"edit-view-name",class:"font-semibold"},R6={class:"flex flex-column gap-1"},S6={for:"edit-view-description",class:"font-semibold"},x6=fe({__name:"ViewList",props:{views:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["load-view","views-changed"],setup(t,{emit:l}){const a=yt,i=t,o=l,n=bl.useToast(),s=go.useConfirm(),{t:r}=Rt.useI18n(),c=e.ref(null),m=e.ref([]),h=e.ref(!1),b=e.ref(!1),p=e.ref(null),d=e.ref(""),W=e.ref(""),Z=e.ref(0),N=e.ref(10),y=e.computed(()=>i.views.slice(Z.value,Z.value+N.value)),A=P=>{Z.value=P.first,N.value=P.rows};e.provide("isCurrentNodeDisplayed",()=>!1);const f=[{key:"name",label:r("adminViewList.existingViews.title"),visible:!0}],Y=(P,ee)=>{Pt.getView(ee.name).then(S=>{const E=new Blob([JSON.stringify(S,null,2)],{type:"application/json"}),ye=URL.createObjectURL(E),_=document.createElement("a");_.href=ye,_.download=ee.name,_.click(),URL.revokeObjectURL(ye)}).catch(S=>{console.error("Failed to download view",S),n.add({severity:"error",summary:r("adminViewList.toast.downloadError.summary"),detail:r("adminViewList.toast.downloadError.detail"),life:4e3})})},X=(P,ee)=>{s.require({message:r("adminViewList.deleteView.confirmMessage",{name:ee.name}),header:r("adminViewList.deleteView.confirmHeader"),icon:"ri-error-warning-line",group:"deleteView",acceptProps:{severity:"danger"},accept:()=>{Ye.deleteNode(ee.id,"fichier").then(()=>{n.add({severity:"success",summary:r("adminViewList.deleteView.toast.success.summary"),detail:r("adminViewList.deleteView.toast.success.detail",{name:ee.name}),life:3e3}),m.value=m.value.filter(S=>S.id!==ee.id),o("views-changed")}).catch(S=>{console.error("Failed to delete view",S),n.add({severity:"error",summary:r("adminViewList.deleteView.toast.error.summary"),detail:r("adminViewList.deleteView.toast.error.detail"),life:4e3})})}})},G=async(P,ee)=>{p.value=ee;try{const S=await Pt.getView(ee.name);d.value=S.name||ee.name.replace(/^vue-|\.json$/g,""),W.value=S.description||""}catch{d.value=ee.name.replace(/^vue-|\.json$/g,""),W.value=""}b.value=!0},j=async()=>{if(!(!p.value||!d.value))try{const P=await Pt.getView(p.value.name);P.name=d.value,P.description=W.value,await Pt.saveView(p.value.name,P),n.add({severity:"success",summary:r("adminViewList.editView.toast.success.summary"),detail:r("adminViewList.editView.toast.success.detail"),life:3e3}),b.value=!1,o("views-changed")}catch(P){console.error("Failed to update view details",P),n.add({severity:"error",summary:r("adminViewList.editView.toast.error.summary"),detail:r("adminViewList.editView.toast.error.detail"),life:4e3})}},L=[{icon:"ri-pencil-line",tooltip:r("adminViewList.editView.button"),handler:G},{icon:"ri-download-line",tooltip:r("adminViewList.existingViews.download"),handler:Y},{icon:"ri-delete-bin-line",tooltip:r("adminViewList.deleteView.button"),severity:"danger",handler:X,visible:P=>P.allowableOperations?.includes("delete")}],z=e.computed(()=>m.value.length===i.views.length&&i.views.length>0),O=()=>{m.value=[...i.views]},F=e.computed(()=>m.value.length>0&&m.value.every(P=>P.allowableOperations?.includes("delete"))),M=()=>{m.value.forEach(P=>{Y(null,P)})},I=()=>{const P=m.value.map(ee=>ee.name).join(", ");s.require({message:r("adminViewList.deleteView.confirmMessageMultiple",{count:m.value.length,names:P}),header:r("adminViewList.deleteView.confirmHeader"),icon:"ri-error-warning-line",group:"deleteView",acceptProps:{severity:"danger"},accept:()=>{const ee=m.value.map(S=>Ye.deleteNode(S.id,"fichier"));Promise.allSettled(ee).then(S=>{const E=S.filter(_=>_.status==="fulfilled").length,ye=S.filter(_=>_.status==="rejected").length;E>0&&n.add({severity:"success",summary:r("adminViewList.deleteView.toast.success.summary"),detail:r("adminViewList.deleteView.toast.successMultiple.detail",{count:E}),life:3e3}),ye>0&&n.add({severity:"error",summary:r("adminViewList.deleteView.toast.error.summary"),detail:r("adminViewList.deleteView.toast.errorMultiple.detail",{count:ye}),life:4e3}),m.value=[],o("views-changed")})}})},g=async()=>{try{const{default:P}=await Promise.resolve().then(()=>hw),ee=new P,S=i.views.map(async B=>{const ue=await Pt.getView(B.name);ee.file(B.name,JSON.stringify(ue,null,2))});await Promise.all(S);const E=await ee.generateAsync({type:"blob"}),ye=URL.createObjectURL(E),_=document.createElement("a");_.href=ye,_.download="vues.zip",_.click(),URL.revokeObjectURL(ye),n.add({severity:"success",summary:r("adminViewList.exportAll.toast.success.summary"),detail:r("adminViewList.exportAll.toast.success.detail",{count:i.views.length}),life:3e3})}catch(P){console.error("Failed to export views as ZIP",P),n.add({severity:"error",summary:r("adminViewList.exportAll.toast.error.summary"),detail:r("adminViewList.exportAll.toast.error.detail"),life:4e3})}},J=()=>{c.value.click()},ae=P=>{const ee=Array.from(P.target.files);ee.length!==0&&(pe(ee),P.target.value="")},Q=P=>{h.value=!1;const ee=Array.from(P.dataTransfer.files).filter(S=>S.name.endsWith(".json"));if(ee.length===0){n.add({severity:"warn",summary:r("adminViewList.importView.toast.noJsonFiles.summary"),detail:r("adminViewList.importView.toast.noJsonFiles.detail"),life:4e3});return}pe(ee)},pe=async P=>{let ee=0,S=0;for(const E of P)try{const ye=await E.text(),_=JSON.parse(ye);let B=E.name.endsWith(".json")?E.name:`${E.name}.json`;B.startsWith("vue-")||(B=`vue-${B}`),await Pt.saveView(B,_),ee++}catch(ye){console.error(`Failed to import ${E.name}`,ye),S++}ee>0&&n.add({severity:"success",summary:r("adminViewList.importView.toast.success.summary"),detail:r("adminViewList.importView.toast.success.detail",{count:ee}),life:3e3}),S>0&&n.add({severity:"error",summary:r("adminViewList.importView.toast.error.summary"),detail:r("adminViewList.importView.toast.error.detail",{count:S}),life:4e3}),o("views-changed")};return(P,ee)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",w6,[e.createVNode(e.unref(de),{label:e.unref(r)("adminViewList.importView.button"),icon:"ri-upload-line",severity:"secondary",outlined:"",onClick:J},null,8,["label"]),e.createVNode(e.unref(de),{label:e.unref(r)("adminViewList.exportAll.button"),icon:"ri-download-line",severity:"secondary",outlined:"",disabled:t.views.length===0,onClick:g},null,8,["label","disabled"]),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",accept:".json",multiple:"",style:{display:"none"},onChange:ae},null,544)]),e.createElementVNode("div",{class:e.normalizeClass(["drop-zone",{"drop-zone--active":h.value}]),onDragover:ee[0]||(ee[0]=e.withModifiers(S=>h.value=!0,["prevent"])),onDragleave:ee[1]||(ee[1]=e.withModifiers(S=>h.value=!1,["prevent"])),onDrop:e.withModifiers(Q,["prevent"])},[ee[9]||(ee[9]=e.createElementVNode("i",{class:"ri-drag-drop-line drop-zone-icon","aria-hidden":"true"},null,-1)),e.createElementVNode("span",k6,e.toDisplayString(e.unref(r)("adminViewList.dropZone.text")),1),e.createElementVNode("span",C6,e.toDisplayString(e.unref(r)("adminViewList.dropZone.hint")),1)],34),t.loading?(e.openBlock(),e.createElementBlock("div",T6,[ee[10]||(ee[10]=e.createElementVNode("i",{class:"ri-loader-4-line ri-spin","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("adminViewList.existingViews.loading")),1)])):t.views.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[m.value.length>0?(e.openBlock(),e.createElementBlock("div",I6,[e.createElementVNode("div",j6,[e.createElementVNode("span",G6,e.toDisplayString(e.unref(r)("adminViewList.selectionBar.selected",{count:m.value.length,total:t.views.length})),1),z.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:ee[2]||(ee[2]=S=>m.value=[])},e.toDisplayString(e.unref(r)("adminViewList.selectionBar.clearSelection")),1)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:O},e.toDisplayString(e.unref(r)("adminViewList.selectionBar.selectAll",{total:t.views.length})),1))]),e.createElementVNode("div",D6,[e.withDirectives(e.createVNode(e.unref(de),{icon:"ri-download-line",rounded:"",text:"",severity:"secondary",onClick:M},null,512),[[e.unref(a),e.unref(r)("adminViewList.selectionBar.downloadAll"),void 0,{top:!0}]]),ee[11]||(ee[11]=e.createElementVNode("div",{class:"action-separator"},null,-1)),F.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:0,icon:"ri-delete-bin-line",rounded:"",text:"",severity:"secondary",onClick:I},null,512)),[[e.unref(a),e.unref(r)("adminViewList.deleteView.button"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createVNode(Pa,{files:y.value,"current-node":{id:"view-list"},"datatable-column-config":f,"inline-actions":L,"selected-nodes":m.value,"hide-more-actions":"","onUpdate:selectedNodes":ee[3]||(ee[3]=S=>m.value=S),onNavigateTo:ee[4]||(ee[4]=S=>o("load-view",S.name))},null,8,["files","selected-nodes"]),t.views.length>N.value?(e.openBlock(),e.createBlock(e.unref(bo),{key:1,first:Z.value,rows:N.value,"total-records":t.views.length,"rows-per-page-options":[10,25,50],template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPage:A},null,8,["first","rows","total-records"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",L6,[e.createElementVNode("p",null,e.toDisplayString(e.unref(r)("adminViewList.existingViews.noViewsFound")),1)])),e.createVNode(e.unref(Zn),{group:"deleteView"}),e.createVNode(e.unref(pt),{visible:b.value,"onUpdate:visible":ee[8]||(ee[8]=S=>b.value=S),header:e.unref(r)("adminViewList.editView.title"),modal:"",style:{width:"95vw",maxWidth:"30rem"}},{footer:e.withCtx(()=>[e.createVNode(e.unref(de),{label:e.unref(r)("adminViewList.editView.cancel"),severity:"secondary",text:"",onClick:ee[7]||(ee[7]=S=>b.value=!1)},null,8,["label"]),e.createVNode(e.unref(de),{label:e.unref(r)("adminViewList.editView.save"),icon:"ri-save-line",disabled:!d.value,onClick:j},null,8,["label","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",V6,[e.createElementVNode("div",v6,[e.createElementVNode("label",F6,e.toDisplayString(e.unref(r)("adminViewList.editView.name")),1),e.createVNode(e.unref(_e),{id:"edit-view-name",modelValue:d.value,"onUpdate:modelValue":ee[5]||(ee[5]=S=>d.value=S),placeholder:e.unref(r)("adminViewList.editView.namePlaceholder")},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",R6,[e.createElementVNode("label",S6,e.toDisplayString(e.unref(r)("adminViewList.editView.description")),1),e.createVNode(e.unref(zl),{id:"edit-view-description",modelValue:W.value,"onUpdate:modelValue":ee[6]||(ee[6]=S=>W.value=S),placeholder:e.unref(r)("adminViewList.editView.descriptionPlaceholder"),rows:"3","auto-resize":""},null,8,["modelValue","placeholder"])])])]),_:1},8,["visible","header"])]))}},[["__scopeId","data-v-e15e3fbc"]]),U6="pristy-config";class J6{getPlan(l){const a=xe();return xt.getConfig(a.INSTANCE_NAME,l).then(i=>i.jsonContent)}savePlan(l,a){const i=xe();return xt.updateConfig(i.INSTANCE_NAME,l,a)}async listPlans(){return(await this.#e(["properties"])).filter(a=>a.name.startsWith("plan-")&&a.name.endsWith(".json")).map(a=>a.name)}async getPlanWithPermissions(l){const[a,i]=await Promise.all([this.#e(["allowableOperations"]),this.getPlan(l)]),n=a.find(s=>s.name===l)?.allowableOperations||[];return{content:i,allowableOperations:n}}async listPlanEntries(){return(await this.#e(["properties","allowableOperations"])).filter(a=>a.name.startsWith("plan-")&&a.name.endsWith(".json"))}async#e(l){const a=xe(),o=(await He.listNodeChildren(U6,{where:`(name='${a.INSTANCE_NAME}')`})).list.entries[0]?.entry?.id;return o?(await He.listNodeChildren(o,{include:l})).list.entries.map(s=>s.entry):[]}}const fl=new J6,E6={class:"create-plan-actions"},Zm=fe({__name:"ClassificationPlanCreate",emits:["create-plan","cancel"],setup(t,{emit:l}){const a=l,i=bl.useToast(),{t:o}=Rt.useI18n(),n=e.ref(""),s=()=>{if(!n.value||!n.value.trim()){i.add({severity:"warn",summary:o("adminClassificationLauncher.toast.invalidName.summary"),detail:o("adminClassificationLauncher.toast.invalidName.detail"),life:3e3});return}const r=`plan-${n.value.trim()}.json`;a("create-plan",r)};return(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("p",null,e.toDisplayString(e.unref(o)("adminClassificationLauncher.createPlan.description")),1),e.createVNode(e.unref(uo),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ra),null,{default:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("plan-",-1)])]),_:1}),e.createVNode(e.unref(_e),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=m=>n.value=m),placeholder:e.unref(o)("adminClassificationLauncher.createPlan.placeholder"),"aria-label":e.unref(o)("adminClassificationLauncher.createPlan.placeholder"),"aria-required":"true",onKeyup:e.withKeys(s,["enter"])},null,8,["modelValue","placeholder","aria-label"]),e.createVNode(e.unref(Ra),null,{default:e.withCtx(()=>[...c[3]||(c[3]=[e.createTextVNode(".json",-1)])]),_:1})]),_:1}),e.createElementVNode("div",E6,[e.createVNode(e.unref(de),{label:e.unref(o)("adminClassificationLauncher.createPlan.cancel"),severity:"secondary",text:"",onClick:c[1]||(c[1]=m=>a("cancel"))},null,8,["label"]),e.createVNode(e.unref(de),{label:e.unref(o)("adminClassificationLauncher.createPlan.button"),icon:"ri-add-line",disabled:!n.value,onClick:s},null,8,["label","disabled"])])],64))}},[["__scopeId","data-v-a9d1e85f"]]),B6={class:"plan-toolbar"},H6={key:0,class:"text-center p-3"},Q6={key:0,class:"selection-bar"},P6={class:"selection-info"},_6={class:"selection-text"},K6={class:"selection-actions"},$6={key:2,class:"p-3"},gm=fe({__name:"ClassificationPlanList",props:{plans:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["select-plan","import-plan"],setup(t,{emit:l}){const a=yt,i=t,o=l,n=bl.useToast(),s=go.useConfirm(),{t:r}=Rt.useI18n(),c=e.ref(null),m=e.ref(!1),h=e.ref([]),b=e.ref(0),p=e.ref(10),d=e.computed(()=>i.plans.slice(b.value,b.value+p.value)),W=M=>{b.value=M.first,p.value=M.rows};e.provide("isCurrentNodeDisplayed",()=>!1);const Z=[{key:"name",label:r("adminClassificationLauncher.existingPlans.title"),visible:!0}],N=(M,I)=>{fl.getPlan(I.name).then(g=>{const J=new Blob([JSON.stringify(g,null,2)],{type:"application/json"}),ae=URL.createObjectURL(J),Q=document.createElement("a");Q.href=ae,Q.download=I.name,Q.click(),URL.revokeObjectURL(ae)}).catch(g=>{console.error("Failed to download plan",g),n.add({severity:"error",summary:r("adminClassificationLauncher.toast.listError.summary"),detail:r("adminClassificationLauncher.toast.listError.detail"),life:4e3})})},y=(M,I)=>{s.require({message:r("adminClassificationLauncher.deletePlan.confirmMessage",{name:I.name}),header:r("adminClassificationLauncher.deletePlan.confirmHeader"),icon:"ri-error-warning-line",group:"deletePlan",acceptProps:{severity:"danger"},accept:()=>{Ye.deleteNode(I.id,"fichier").then(()=>{n.add({severity:"success",summary:r("adminClassificationLauncher.deletePlan.toast.success.summary"),detail:r("adminClassificationLauncher.deletePlan.toast.success.detail",{name:I.name}),life:3e3}),h.value=h.value.filter(g=>g.id!==I.id),o("import-plan")}).catch(g=>{console.error("Failed to delete plan",g),n.add({severity:"error",summary:r("adminClassificationLauncher.deletePlan.toast.error.summary"),detail:r("adminClassificationLauncher.deletePlan.toast.error.detail"),life:4e3})})}})},A=[{icon:"ri-download-line",tooltip:r("adminClassificationLauncher.existingPlans.download"),handler:N},{icon:"ri-delete-bin-line",tooltip:r("adminClassificationLauncher.deletePlan.button"),severity:"danger",handler:y,visible:M=>M.allowableOperations?.includes("delete")}],f=e.computed(()=>h.value.length===i.plans.length&&i.plans.length>0),Y=()=>{h.value=[...i.plans]},X=e.computed(()=>h.value.length>0&&h.value.every(M=>M.allowableOperations?.includes("delete"))),G=()=>{h.value.forEach(M=>{N(null,M)})},j=()=>{h.value.forEach(M=>{o("select-plan",M.name)})},L=()=>{const M=h.value.map(I=>I.name).join(", ");s.require({message:r("adminClassificationLauncher.deletePlan.confirmMessageMultiple",{count:h.value.length,names:M}),header:r("adminClassificationLauncher.deletePlan.confirmHeader"),icon:"ri-error-warning-line",group:"deletePlan",acceptProps:{severity:"danger"},accept:()=>{const I=h.value.map(g=>Ye.deleteNode(g.id,"fichier"));Promise.allSettled(I).then(g=>{const J=g.filter(Q=>Q.status==="fulfilled").length,ae=g.filter(Q=>Q.status==="rejected").length;J>0&&n.add({severity:"success",summary:r("adminClassificationLauncher.deletePlan.toast.success.summary"),detail:r("adminClassificationLauncher.deletePlan.toast.successMultiple.detail",{count:J}),life:3e3}),ae>0&&n.add({severity:"error",summary:r("adminClassificationLauncher.deletePlan.toast.error.summary"),detail:r("adminClassificationLauncher.deletePlan.toast.errorMultiple.detail",{count:ae}),life:4e3}),h.value=[],o("import-plan")})}})},z=()=>{c.value.click()},O=M=>{const I=M.target.files[0];if(!I)return;const g=new FileReader;g.onload=J=>{try{const ae=JSON.parse(J.target.result);if(!ae.NATURES||!ae.FIELDS||!ae.EMPLACEMENT)throw new Error(r("adminClassificationLauncher.importPlan.invalidStructure"));let Q=I.name.endsWith(".json")?I.name:`${I.name}.json`;Q.startsWith("plan-")||(Q=`plan-${Q}`),fl.savePlan(Q,ae).then(()=>{n.add({severity:"success",summary:r("adminClassificationLauncher.importPlan.toast.success.summary"),detail:r("adminClassificationLauncher.importPlan.toast.success.detail",{filename:Q}),life:3e3}),o("import-plan"),o("select-plan",Q)}).catch(pe=>{console.error("Failed to save imported plan",pe),n.add({severity:"error",summary:r("adminClassificationLauncher.importPlan.toast.saveError.summary"),detail:r("adminClassificationLauncher.importPlan.toast.saveError.detail"),life:4e3})})}catch(ae){n.add({severity:"error",summary:r("adminClassificationLauncher.importPlan.toast.parseError.summary"),detail:r("adminClassificationLauncher.importPlan.toast.parseError.detail",{message:ae.message}),life:5e3})}},g.readAsText(I),M.target.value=""},F=M=>{m.value=!1,o("select-plan",M)};return(M,I)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",B6,[e.createVNode(e.unref(de),{label:e.unref(r)("adminClassificationLauncher.createPlan.button"),icon:"ri-add-line",onClick:I[0]||(I[0]=g=>m.value=!0)},null,8,["label"]),e.createVNode(e.unref(de),{label:e.unref(r)("adminClassificationLauncher.importPlan.button"),icon:"ri-upload-line",severity:"secondary",outlined:"",onClick:z},null,8,["label"]),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",accept:".json",style:{display:"none"},onChange:O},null,544)]),t.loading?(e.openBlock(),e.createElementBlock("div",H6,[I[6]||(I[6]=e.createElementVNode("i",{class:"ri-loader-4-line ri-spin","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("adminClassificationLauncher.existingPlans.loading")),1)])):t.plans.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value.length>0?(e.openBlock(),e.createElementBlock("div",Q6,[e.createElementVNode("div",P6,[e.createElementVNode("span",_6,e.toDisplayString(e.unref(r)("adminClassificationLauncher.selectionBar.selected",{count:h.value.length,total:t.plans.length})),1),f.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:I[1]||(I[1]=g=>h.value=[])},e.toDisplayString(e.unref(r)("adminClassificationLauncher.selectionBar.clearSelection")),1)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:Y},e.toDisplayString(e.unref(r)("adminClassificationLauncher.selectionBar.selectAll",{total:t.plans.length})),1))]),e.createElementVNode("div",K6,[e.withDirectives(e.createVNode(e.unref(de),{icon:"ri-external-link-line",rounded:"",text:"",severity:"secondary",onClick:j},null,512),[[e.unref(a),e.unref(r)("adminClassificationLauncher.selectionBar.openAll"),void 0,{top:!0}]]),I[7]||(I[7]=e.createElementVNode("div",{class:"action-separator"},null,-1)),e.withDirectives(e.createVNode(e.unref(de),{icon:"ri-download-line",rounded:"",text:"",severity:"secondary",onClick:G},null,512),[[e.unref(a),e.unref(r)("adminClassificationLauncher.selectionBar.downloadAll"),void 0,{top:!0}]]),X.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:0,icon:"ri-delete-bin-line",rounded:"",text:"",severity:"secondary",onClick:L},null,512)),[[e.unref(a),e.unref(r)("adminClassificationLauncher.deletePlan.button"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createVNode(Pa,{files:d.value,"current-node":{id:"classification-plans"},"datatable-column-config":Z,"inline-actions":A,"selected-nodes":h.value,"onUpdate:selectedNodes":I[2]||(I[2]=g=>h.value=g),onNavigateTo:I[3]||(I[3]=g=>o("select-plan",g.name))},null,8,["files","selected-nodes"]),t.plans.length>p.value?(e.openBlock(),e.createBlock(e.unref(bo),{key:1,first:b.value,rows:p.value,"total-records":t.plans.length,"rows-per-page-options":[10,25,50],template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPage:W},null,8,["first","rows","total-records"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",$6,[e.createElementVNode("p",null,e.toDisplayString(e.unref(r)("adminClassificationLauncher.existingPlans.noPlansFound")),1)])),e.createVNode(e.unref(pt),{visible:m.value,"onUpdate:visible":I[5]||(I[5]=g=>m.value=g),header:e.unref(r)("adminClassificationLauncher.createPlan.title"),modal:"",style:{width:"30rem"}},{default:e.withCtx(()=>[e.createVNode(Zm,{onCreatePlan:F,onCancel:I[4]||(I[4]=g=>m.value=!1)})]),_:1},8,["visible","header"]),e.createVNode(e.unref(Zn),{group:"deletePlan"})]))}},[["__scopeId","data-v-615a03cb"]]),q6={class:"p-4"},eA={class:"text-2xl m-0"},tA={__name:"AdminClassificationLauncher",emits:["select-plan"],setup(t,{emit:l}){const a=l,i=bl.useToast(),{t:o}=Rt.useI18n(),n=e.ref(!0),s=e.ref([]),r=()=>{n.value=!0,fl.listPlanEntries().then(c=>{s.value=c.sort((m,h)=>m.name.localeCompare(h.name))}).catch(c=>{i.add({severity:"error",summary:o("adminClassificationLauncher.toast.listError.summary"),detail:o("adminClassificationLauncher.toast.listError.detail"),life:4e3}),console.error(c)}).finally(()=>{n.value=!1})};return e.onMounted(()=>{r()}),(c,m)=>(e.openBlock(),e.createElementBlock("div",q6,[e.createVNode(e.unref(Zo),null,{title:e.withCtx(()=>[e.createElementVNode("h1",eA,e.toDisplayString(e.unref(o)("adminClassificationLauncher.title")),1)]),content:e.withCtx(()=>[e.createVNode(gm,{plans:s.value,loading:n.value,onSelectPlan:m[0]||(m[0]=h=>a("select-plan",h)),onImportPlan:r},null,8,["plans","loading"])]),_:1})]))}};function zt(t){if(!t)return[];const l=/\${(.*?)}/g,a=t.matchAll(l);return Array.from(a,i=>i[1].split(":")[0].trim())}function wl(t,l,a){return t?t.replace(/\${(.*?)}/g,(i,o)=>{const[n,s]=o.trim().split(":");let r=l[n];const c=a?.find(p=>p.name===n);if(r==null||r==="")if(c?.default!==void 0&&c?.default!==null&&c?.default!=="")r=c.default;else return"";let m=String(r);s==="upper"&&(m=m.toUpperCase());const h=c?.prefix||"",b=c?.suffix||"";return h+m+b}):""}function mi(t){const l=t.lastIndexOf("."),a=l>0?t.substring(0,l):t,i=l>0?t.substring(l):"",o=a.match(/^(.*?)\s+\((\d+)\)$/);return o?{baseName:o[1],increment:parseInt(o[2],10),extension:i}:{baseName:a,increment:0,extension:i}}function lA(t,l,a){return l===0?t+a:`${t} (${l})${a}`}function aA(t,l){const a=new Map,i=new Set;for(const n of l){i.add(n);const{baseName:s,increment:r,extension:c}=mi(n),m=s+c,h=a.get(m)||0;r>h&&a.set(m,r)}const o=[];for(const n of t){const{baseName:s,extension:r}=mi(n),c=s+r;if(i.has(n)){const h=(a.get(c)||0)+1,b=lA(s,h,r);a.set(c,h),i.add(b),o.push(b)}else{i.add(n);const{increment:m}=mi(n),h=a.get(c)||0;m>h&&a.set(c,m),o.push(n)}}return o}class oA{getAspects(l={}){return Nn.listAspects(l)}getAspect(l){return Nn.getAspect(l)}getTypes(l={}){return An.listTypes(l)}getType(l){return An.getType(l)}extractPropertiesFromType(l){const a=[];return l.properties&&Object.entries(l.properties).forEach(([i,o])=>{a.push({key:o.id,title:o.title||i,dataType:o.dataType||"d:text",mandatory:o.mandatory||!1})}),a}extractPropertiesFromAspect(l){const a=[];return l.properties&&Object.entries(l.properties).forEach(([i,o])=>{a.push({key:o.id,title:o.title||i,dataType:o.dataType||"d:text",mandatory:o.mandatory||!1})}),a}async getAllPropertyKeys(){const l=new Set;try{const a=await this.getTypes({maxItems:1e3});if(a.list?.entries)for(const o of a.list.entries){const n=await this.getType(o.entry.id);this.extractPropertiesFromType(n.entry).forEach(r=>l.add(r.key))}const i=await this.getAspects({maxItems:1e3});if(i.list?.entries)for(const o of i.list.entries){const n=await this.getAspect(o.entry.id);this.extractPropertiesFromAspect(n.entry).forEach(r=>l.add(r.key))}}catch(a){console.error("Failed to fetch property keys from Alfresco",a)}return Array.from(l).sort()}}const al=new oA,fm=()=>({code:"",name:"",type:"cm:content",icon:"ri-file-line",emplacement:[],aspects:[],categories:[],metadata:{}}),nA={name:"NatureForm",components:{PrimeInputText:_e,PrimeMultiSelect:xa,PrimeDropdown:Ea,PrimeInputSwitch:gn,PrimeDataTable:$t,PrimeColumn:qt},directives:{tooltip:yt},props:{nature:{type:Object,default:null},emplacements:{type:Array,required:!0},existingNatures:{type:Array,default:()=>[]},isDuplicating:{type:Boolean,default:!1},categories:{type:Array,default:()=>[]},fields:{type:Array,default:()=>[]}},emits:["save","cancel"],setup(){return{toast:bl.useToast()}},data(){return{editableNature:fm(),editableMetadata:[],isEditMode:!1,metadataTypes:["ignored","value","field","template","parent"],remixIcons:["ri-file-line","ri-file-text-line","ri-file-pdf-line","ri-image-line","ri-film-line","ri-folder-line","ri-archive-line","ri-mail-line"],availableProperties:[],filteredProperties:[],selectedAspects:[],availableAspects:[]}},computed:{emplacementOptions(){return this.emplacements.map(t=>t.code)},calculatedPath(){return!this.editableNature.emplacement||this.editableNature.emplacement.length===0?"/":"/"+this.editableNature.emplacement.map(t=>{const l=this.emplacements.find(i=>i.code===t);if(!l)return`[${t}]`;const a=l.metadata?.["cm:name"];return a?.value||a?.template||t}).join("/")}},watch:{nature:{handler(t){t&&t.code?(this.isEditMode=!0,this.editableNature=JSON.parse(JSON.stringify(t))):(this.isEditMode=!1,this.editableNature=t?JSON.parse(JSON.stringify(t)):fm()),this.selectedAspects=this.editableNature.aspects||[],this.metadataToObjectArray(this.editableNature.metadata)},immediate:!0},"editableNature.type":{handler(t){t&&this.loadAllProperties()},immediate:!0},selectedAspects:{handler(){this.loadAllProperties()}}},mounted(){this.loadAvailableAspects()},methods:{isFieldOptional(t){if(t.type==="field"){const l=this.fields.find(a=>a.name===t.value);if(l&&l.optional===!0)return t.required=!1,!0}return!1},async loadAvailableAspects(){try{const t=await al.getAspects({maxItems:1e3});t.list?.entries&&(this.availableAspects=t.list.entries.map(l=>({id:l.entry.id,title:l.entry.title||l.entry.id})))}catch(t){console.error("Failed to load available aspects",t),this.availableAspects=[]}},async loadAllProperties(){const t=[];if(this.editableNature.type)try{const l=await al.getType(this.editableNature.type),a=al.extractPropertiesFromType(l.entry);t.push(...a.map(i=>({...i,source:`Type: ${this.editableNature.type}`})))}catch(l){console.error("Failed to load properties for type",this.editableNature.type,l)}if(this.selectedAspects&&this.selectedAspects.length>0)for(const l of this.selectedAspects)try{const a=await al.getAspect(l),i=al.extractPropertiesFromAspect(a.entry);t.push(...i.map(o=>({...o,source:`Aspect: ${l}`})))}catch(a){console.error("Failed to load properties for aspect",l,a)}this.availableProperties=t,this.generateMetadataFromProperties()},generateMetadataFromProperties(){const t={};this.editableMetadata.forEach(a=>{t[a.key]={type:a.type,value:a.value,required:a.required,title:a.title}});const l=this.availableProperties.map(a=>t[a.key]?{key:a.key,title:a.title,type:t[a.key].type,value:t[a.key].value,required:t[a.key].required||!1}:{key:a.key,title:a.title,type:"ignored",value:"",required:!1});this.editableMetadata.forEach(a=>{a.type!=="ignored"&&!this.availableProperties.find(i=>i.key===a.key)&&l.push({key:a.key,title:a.title||a.key,type:a.type,value:a.value,required:a.required})}),this.editableMetadata=l},searchProperties(t){const l=t.query.toLowerCase();l?this.filteredProperties=this.availableProperties.filter(a=>a.key.toLowerCase().includes(l)||a.title.toLowerCase().includes(l)||a.source&&a.source.toLowerCase().includes(l)):this.filteredProperties=this.availableProperties},metadataToObjectArray(t){if(!t){this.editableMetadata=[];return}const l=Object.entries(t).reduce((a,[i,o])=>{const n=Object.keys(o).find(c=>c!=="required"),s=o[n],r=o.required||!1;return a[i]={type:n,value:s,required:r},a},{});this.availableProperties.length>0?this.editableMetadata=this.availableProperties.map(a=>{const i=l[a.key]||{type:"ignored",value:"",required:!1};return{key:a.key,title:a.title,type:i.type,value:i.value,required:i.required}}):this.editableMetadata=Object.entries(t).map(([a,i])=>{const o=Object.keys(i).find(r=>r!=="required"),n=i[o],s=i.required||!1;return{key:a,type:o,value:n,required:s,title:a}})},metadataArrayToObject(){return this.editableMetadata.reduce((t,l)=>(l.key&&l.type!=="ignored"&&(t[l.key]={[l.type]:l.value},l.required&&l.type!=="parent"&&l.type!=="template"&&(t[l.key].required=!0)),t),{})},onMetadataTypeChange(t){if(t.type==="field"&&t.key&&!t.value){const l=t.key.split(":");l.length>1?t.value=l[l.length-1]:t.value=t.key}},addMetadata(){this.editableMetadata.push({key:"",type:"value",value:"",required:!1})},removeMetadata(t){this.editableMetadata.splice(t,1)},submit(){const t=Vt.global.t;if(!this.editableNature.code||!this.editableNature.name){this.toast.add({severity:"warn",summary:t("natureForm.validation.nameAndCodeRequired"),life:4e3});return}if((!this.isEditMode||this.isDuplicating)&&this.existingNatures.some(i=>i.code===this.editableNature.code)){this.toast.add({severity:"warn",summary:t("natureForm.validation.codeAlreadyExists",{code:this.editableNature.code}),life:4e3});return}const l={...this.editableNature,aspects:this.selectedAspects,metadata:this.metadataArrayToObject()};this.$emit("save",l)}}},iA={class:"flex flex-column gap-3"},sA={class:"form-field"},rA={class:"form-label",for:"name"},cA={class:"form-field"},dA={class:"form-label",for:"code"},mA={class:"form-field"},bA={class:"form-label",for:"type"},pA={class:"form-field"},uA={class:"form-label",for:"aspects"},hA={class:"font-semibold"},yA={class:"text-color-secondary"},ZA={class:"form-field"},gA={class:"form-label",for:"icon"},fA={key:0,class:"flex align-items-center"},WA={class:"flex align-items-center"},NA={key:0,class:"form-field"},AA={class:"form-label",for:"categories"},YA={class:"form-field"},zA={class:"form-label",for:"emplacement"},MA={class:"form-help"},XA={class:"form-field"},OA={class:"form-label"},wA={key:0,class:"text-center p-3 text-color-secondary"},kA={class:"form-help"},CA={key:0};function TA(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputText"),r=e.resolveComponent("PrimeMultiSelect"),c=e.resolveComponent("PrimeDropdown"),m=e.resolveComponent("PrimeColumn"),h=e.resolveComponent("PrimeInputSwitch"),b=e.resolveComponent("PrimeDataTable"),p=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",iA,[e.createElementVNode("div",sA,[e.createElementVNode("label",rA,e.toDisplayString(t.$t("natureForm.name")),1),e.createVNode(s,{id:"name",modelValue:o.editableNature.name,"onUpdate:modelValue":l[0]||(l[0]=d=>o.editableNature.name=d),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",cA,[e.createElementVNode("label",dA,e.toDisplayString(t.$t("natureForm.code")),1),e.createVNode(s,{id:"code",modelValue:o.editableNature.code,"onUpdate:modelValue":l[1]||(l[1]=d=>o.editableNature.code=d),disabled:o.isEditMode&&!a.isDuplicating,class:"w-full"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",mA,[e.createElementVNode("label",bA,e.toDisplayString(t.$t("natureForm.documentType")),1),e.createVNode(s,{id:"type",modelValue:o.editableNature.type,"onUpdate:modelValue":l[2]||(l[2]=d=>o.editableNature.type=d),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",pA,[e.createElementVNode("label",uA,e.toDisplayString(t.$t("natureForm.aspects")),1),e.createVNode(r,{id:"aspects",modelValue:o.selectedAspects,"onUpdate:modelValue":l[3]||(l[3]=d=>o.selectedAspects=d),options:o.availableAspects,placeholder:t.$t("natureForm.selectAspects"),optionLabel:"title",optionValue:"id",class:"w-full",filter:""},{option:e.withCtx(d=>[e.createElementVNode("div",null,[e.createElementVNode("div",hA,e.toDisplayString(d.option.id),1),e.createElementVNode("small",yA,e.toDisplayString(d.option.title),1)])]),_:1},8,["modelValue","options","placeholder"])]),e.createElementVNode("div",ZA,[e.createElementVNode("label",gA,e.toDisplayString(t.$t("natureForm.icon")),1),e.createVNode(c,{id:"icon",modelValue:o.editableNature.icon,"onUpdate:modelValue":l[4]||(l[4]=d=>o.editableNature.icon=d),options:o.remixIcons,placeholder:t.$t("natureForm.chooseIcon"),class:"w-full"},{value:e.withCtx(d=>[d.value?(e.openBlock(),e.createElementBlock("div",fA,[e.createElementVNode("i",{class:e.normalizeClass([d.value,"mr-2"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(d.value),1)])):e.createCommentVNode("",!0)]),option:e.withCtx(d=>[e.createElementVNode("div",WA,[e.createElementVNode("i",{class:e.normalizeClass([d.option,"mr-2"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(d.option),1)])]),_:1},8,["modelValue","options","placeholder"])]),a.categories.length>0?(e.openBlock(),e.createElementBlock("div",NA,[e.createElementVNode("label",AA,e.toDisplayString(t.$t("natureForm.categories")),1),e.createVNode(r,{id:"categories",modelValue:o.editableNature.categories,"onUpdate:modelValue":l[5]||(l[5]=d=>o.editableNature.categories=d),options:a.categories,placeholder:t.$t("natureForm.selectCategories"),optionLabel:"label",optionValue:"id",class:"w-full",filter:""},null,8,["modelValue","options","placeholder"])])):e.createCommentVNode("",!0),e.createElementVNode("div",YA,[e.createElementVNode("label",zA,e.toDisplayString(t.$t("natureForm.emplacement")),1),e.createVNode(r,{id:"emplacement",modelValue:o.editableNature.emplacement,"onUpdate:modelValue":l[6]||(l[6]=d=>o.editableNature.emplacement=d),options:n.emplacementOptions,placeholder:t.$t("natureForm.selectPath"),filter:"",autoFilterFocus:"",class:"w-full"},null,8,["modelValue","options","placeholder"]),e.createElementVNode("small",MA,[e.createTextVNode(e.toDisplayString(t.$t("natureForm.calculatedPath"))+" : ",1),e.createElementVNode("code",null,e.toDisplayString(n.calculatedPath),1)])]),e.createElementVNode("div",XA,[e.createElementVNode("label",OA,e.toDisplayString(t.$t("natureForm.metadata")),1),o.availableProperties.length===0?(e.openBlock(),e.createElementBlock("div",wA,e.toDisplayString(t.$t("natureForm.noMetadata")),1)):(e.openBlock(),e.createBlock(b,{key:1,value:o.editableMetadata,stripedRows:"",size:"small",class:"metadata-table"},{default:e.withCtx(()=>[e.createVNode(m,{field:"key",header:t.$t("natureForm.key")},{body:e.withCtx(({data:d})=>[e.createElementVNode("strong",null,e.toDisplayString(d.key),1),e.createElementVNode("div",kA,e.toDisplayString(d.title),1)]),_:1},8,["header"]),e.createVNode(m,{header:t.$t("natureForm.mappingType"),headerStyle:"width: 10rem"},{body:e.withCtx(({data:d})=>[e.createVNode(c,{modelValue:d.type,"onUpdate:modelValue":W=>d.type=W,options:o.metadataTypes,placeholder:t.$t("natureForm.mappingType"),class:"w-full",onChange:W=>n.onMetadataTypeChange(d)},null,8,["modelValue","onUpdate:modelValue","options","placeholder","onChange"])]),_:1},8,["header"]),e.createVNode(m,{header:t.$t("natureForm.value")},{body:e.withCtx(({data:d})=>[d.type!=="parent"&&d.type!=="ignored"?(e.openBlock(),e.createBlock(s,{key:0,modelValue:d.value,"onUpdate:modelValue":W=>d.value=W,placeholder:t.$t("natureForm.valueOrFieldName"),class:"w-full"},null,8,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)]),_:1},8,["header"]),e.createVNode(m,{header:t.$t("natureForm.required"),headerStyle:"width: 5rem; text-align: center",bodyStyle:"text-align: center"},{body:e.withCtx(({data:d})=>[d.type!=="parent"&&d.type!=="template"&&d.type!=="ignored"?e.withDirectives((e.openBlock(),e.createElementBlock("span",CA,[e.createVNode(h,{modelValue:d.required,"onUpdate:modelValue":W=>d.required=W,disabled:n.isFieldOptional(d)},null,8,["modelValue","onUpdate:modelValue","disabled"])])),[[p,n.isFieldOptional(d)?t.$t("natureForm.optionalFieldTooltip"):null,void 0,{top:!0}]]):e.createCommentVNode("",!0)]),_:1},8,["header"])]),_:1},8,["value"]))])])}const Wm=fe(nA,[["render",TA],["__scopeId","data-v-23d523ac"]]),Uo=()=>({name:"",description:"",type:"string",input:"text",values:[],search:null,regex:null,default:null,min:null,max:null,optional:!1,prefix:null,suffix:null,metadata:null}),IA=()=>({lang:"afts",query:"",valueField:"cm:name"}),Jo={string:["text","textarea","password","list","multilist","select","chips","search"],number:["int","double","knob","rating"],boolean:["boolean","toggle"],date:["date","datetime"],parent:["parent"]},jA={name:"FieldForm",components:{PrimeInputText:_e,PrimeTextarea:zl,PrimeDropdown:Ea,PrimeButton:de,PrimeMessage:ml,PrimeInputNumber:Yl,PrimeInputSwitch:gn,PrimeInputGroup:uo,PrimeInputGroupAddon:Ra},props:{field:{type:Object,default:null},existingFields:{type:Array,default:()=>[]}},emits:["save"],data(){return{editableField:Uo(),valuesAsString:"",isEditMode:!1,dataTypes:Object.keys(Jo),searchLanguages:["afts","cmis","noderef"],isTestingSearch:!1,testResults:[],testError:null,regexTestString:""}},computed:{filteredInputTypes(){return Jo[this.editableField.type]||[]},showValuesInput(){return["list","multilist","select"].includes(this.editableField.input)},showSearchInput(){return this.editableField.input==="search"},showStringConstraints(){return this.editableField.type==="string"&&this.editableField.input==="text"},showNumberConstraints(){return this.editableField.type==="number"},showParentConfig(){return this.editableField.input==="parent"},regexTestResult(){if(!this.editableField.regex||!this.regexTestString)return!1;try{return new RegExp(this.editableField.regex).test(this.regexTestString)}catch{return!1}},regexTestResultIcon(){return this.regexTestResult?"ri-check-line":"ri-close-line"},regexTestResultClass(){return this.regexTestResult?"bg-green-500":"bg-red-500"}},watch:{field:{handler(t){t&&t.name?(this.isEditMode=!0,this.editableField={...Uo(),...JSON.parse(JSON.stringify(t))}):(this.isEditMode=!1,this.editableField=t?{...Uo(),...JSON.parse(JSON.stringify(t))}:Uo()),this.valuesAsString=(this.editableField.values||[]).join(`
|
|
154
|
+
</html>`}function qn(t={}){const{content:l,mimeType:a,customStyles:i=""}=t,o=e.computed(()=>{const m=a?.value;return m==="text/markdown"||m==="text/x-markdown"||m==="text/x-web-markdown"}),n=e.computed(()=>a?.value==="text/html"),s=e.computed(()=>o.value||n.value),r=e.computed(()=>l?.value?o.value?_n(l.value):n.value?Kn(l.value):"":""),c=e.computed(()=>$n(r.value,i));return{isMarkdown:o,isHtml:n,shouldRenderPreview:s,previewBodyHtml:r,iframeContent:c,renderMarkdown:_n,sanitizeHtml:Kn,generatePreviewDocument:$n}}const $a={aura:Jm,material:Em,lara:Bm,nora:Hm},qa={soho:{0:"#ffffff",50:"#f8f8f9",100:"#f0f1f2",200:"#e1e2e4",300:"#c4c5c8",400:"#9fa1a5",500:"#7f8084",600:"#65666a",700:"#4f5053",800:"#3a3b3d",900:"#27282a",950:"#131315"},viva:{0:"#ffffff",50:"#f9f9fa",100:"#f3f3f4",200:"#e6e7e8",300:"#cacacd",400:"#a5a6a9",500:"#87898a",600:"#6c6e6f",700:"#555658",800:"#3f4041",900:"#2a2b2c",950:"#151516"},ocean:{0:"#ffffff",50:"#f8f9f9",100:"#f1f2f2",200:"#e3e4e4",300:"#c7c8c8",400:"#a2a4a4",500:"#828787",600:"#686c6c",700:"#525555",800:"#3c3e3e",900:"#282a2a",950:"#141515"}},Hy=[{name:"slate",label:"Slate",value:"#64748b"},{name:"emerald",label:"Emerald",value:"#10b981"},{name:"green",label:"Green",value:"#22c55e"},{name:"lime",label:"Lime",value:"#84cc16"},{name:"orange",label:"Orange",value:"#f97316"},{name:"amber",label:"Amber",value:"#f59e0b"},{name:"yellow",label:"Yellow",value:"#eab308"},{name:"teal",label:"Teal",value:"#14b8a6"},{name:"cyan",label:"Cyan",value:"#06b6d4"},{name:"sky",label:"Sky",value:"#0ea5e9"},{name:"blue",label:"Blue",value:"#3b82f6"},{name:"indigo",label:"Indigo",value:"#6366f1"},{name:"violet",label:"Violet",value:"#8b5cf6"},{name:"purple",label:"Purple",value:"#a855f7"},{name:"fuchsia",label:"Fuchsia",value:"#d946ef"},{name:"pink",label:"Pink",value:"#ec4899"},{name:"rose",label:"Rose",value:"#f43f5e"},{name:"red",label:"Red",value:"#ef4444"}],Qy=[{name:"slate",label:"Slate",value:"#64748b"},{name:"gray",label:"Gray",value:"#6b7280"},{name:"zinc",label:"Zinc",value:"#71717a"},{name:"neutral",label:"Neutral",value:"#737373"},{name:"stone",label:"Stone",value:"#78716c"},{name:"soho",label:"Soho",value:"#7f8084"},{name:"viva",label:"Viva",value:"#87898a"},{name:"ocean",label:"Ocean",value:"#828787"}],Io=[12,13,14,15,16,17,18],Py=["85%","90%","95%","100%","105%","110%","115%"],Zl={darkMode:!1,preset:"aura",primaryColor:"emerald",surfaceColor:"slate",scale:3},Zt={darkMode:"user-dark-mode",preset:"user-preset",primaryColor:"user-primary-color",surfaceColor:"user-surface-color",scale:"user-scale"};function jo(){const t=()=>{const y=localStorage.getItem(Zt.darkMode)==="true";return y?document.documentElement.classList.add("app-dark"):document.documentElement.classList.remove("app-dark"),y},l=y=>{localStorage.setItem(Zt.darkMode,y.toString()),y?document.documentElement.classList.add("app-dark"):document.documentElement.classList.remove("app-dark")},a=()=>localStorage.getItem(Zt.darkMode)==="true",i=()=>{const y=localStorage.getItem(Zt.preset)||Zl.preset;return y&&$a[y]&&vl.usePreset($a[y]),y},o=y=>{$a[y]&&(localStorage.setItem(Zt.preset,y),vl.usePreset($a[y]),s(),m())},n=()=>localStorage.getItem(Zt.preset)||Zl.preset,s=()=>{const y=localStorage.getItem(Zt.primaryColor)||Zl.primaryColor;return vl.updatePrimaryPalette({50:`{${y}.50}`,100:`{${y}.100}`,200:`{${y}.200}`,300:`{${y}.300}`,400:`{${y}.400}`,500:`{${y}.500}`,600:`{${y}.600}`,700:`{${y}.700}`,800:`{${y}.800}`,900:`{${y}.900}`,950:`{${y}.950}`}),y},r=y=>{localStorage.setItem(Zt.primaryColor,y),vl.updatePrimaryPalette({50:`{${y}.50}`,100:`{${y}.100}`,200:`{${y}.200}`,300:`{${y}.300}`,400:`{${y}.400}`,500:`{${y}.500}`,600:`{${y}.600}`,700:`{${y}.700}`,800:`{${y}.800}`,900:`{${y}.900}`,950:`{${y}.950}`})},c=()=>localStorage.getItem(Zt.primaryColor)||Zl.primaryColor,m=()=>{const y=localStorage.getItem(Zt.surfaceColor)||Zl.surfaceColor;return qa[y]?vl.updateSurfacePalette(qa[y]):vl.updateSurfacePalette({0:"#ffffff",50:`{${y}.50}`,100:`{${y}.100}`,200:`{${y}.200}`,300:`{${y}.300}`,400:`{${y}.400}`,500:`{${y}.500}`,600:`{${y}.600}`,700:`{${y}.700}`,800:`{${y}.800}`,900:`{${y}.900}`,950:`{${y}.950}`}),y},h=y=>{localStorage.setItem(Zt.surfaceColor,y),qa[y]?vl.updateSurfacePalette(qa[y]):vl.updateSurfacePalette({0:"#ffffff",50:`{${y}.50}`,100:`{${y}.100}`,200:`{${y}.200}`,300:`{${y}.300}`,400:`{${y}.400}`,500:`{${y}.500}`,600:`{${y}.600}`,700:`{${y}.700}`,800:`{${y}.800}`,900:`{${y}.900}`,950:`{${y}.950}`})},b=()=>localStorage.getItem(Zt.surfaceColor)||Zl.surfaceColor,p=()=>{const y=localStorage.getItem(Zt.scale)||Zl.scale.toString(),A=parseInt(y),f=Io[A]||Io[Zl.scale];return document.documentElement.style.fontSize=`${f}px`,A},d=y=>{const A=Io[y];A&&(document.documentElement.style.fontSize=`${A}px`,localStorage.setItem(Zt.scale,y.toString()))},W=()=>parseInt(localStorage.getItem(Zt.scale)||Zl.scale.toString()),Z=()=>{t(),i(),s(),m(),p()};return{applyDarkMode:t,applyPreset:i,applyPrimaryColor:s,applySurfaceColor:m,applyScale:p,applyAllThemeSettings:Z,setDarkMode:l,setPreset:o,setPrimaryColor:r,setSurfaceColor:h,setScale:d,isDarkMode:a,getPreset:n,getPrimaryColor:c,getSurfaceColor:b,getScale:W,resetToDefaults:()=>{localStorage.removeItem(Zt.darkMode),localStorage.removeItem(Zt.preset),localStorage.removeItem(Zt.primaryColor),localStorage.removeItem(Zt.surfaceColor),localStorage.removeItem(Zt.scale),Z()},themePresets:$a,primaryColors:Hy,surfaceColors:Qy,customSurfacePalettes:qa,scaleValues:Io,scalePercentages:Py,defaults:Zl,storageKeys:Zt}}const _y={class:"code-viewer-wrapper"},Ky={key:0,class:"loading-container"},$y={key:1,class:"error-container"},qy={key:2},e3=["srcdoc"],t3={name:"PreviewPanel",components:{VideoPlayer:Jn,ImageViewer:Un,AudioPlayer:En,PDFComponent:Mn,CodeMirrorViewer:fe({__name:"CodeMirrorViewer",props:{contentNode:{type:Object,required:!0},isSharedLink:{type:Boolean,default:!1}},setup(t){const{t:l}=Rt.useI18n(),{isDarkMode:a}=jo(),i=t,o=e.ref(""),n=e.ref(null),s=e.ref(null),r=e.shallowRef(null),c=e.ref(!1),m=e.ref(null),{isMarkdown:h,isHtml:b,iframeContent:p}=qn({content:o,mimeType:n}),d=()=>{if(!s.value)return;const N=Aa(n.value),A=[...Ya({editable:!1,showLineNumbers:!0,enableHistory:!1,dark:a()})];N&&(!Array.isArray(N)||N.length>0)&&A.push(N);const f=Ml.EditorState.create({doc:o.value,extensions:A});r.value=new Wt.EditorView({state:f,parent:s.value})},W=()=>{r.value&&(r.value.destroy(),r.value=null)},Z=async N=>{if(!(!N.id&&!N.shareId)){c.value=!0,m.value=null;try{let y;i.isSharedLink&&N.shareId?y=await Ye.getSharedLinkContent(N.shareId):y=await Ye.getNodeContent(N.id,!1);let A=await y.text();if(N.content?.mimeType==="application/json")try{A=JSON.stringify(JSON.parse(A),null,2)}catch(f){console.warn("Failed to format JSON, displaying raw content:",f.message)}o.value=A,n.value=N.content?.mimeType||"text/plain",c.value=!1,await e.nextTick(),!h.value&&!b.value&&d()}catch(y){console.error("Failed to load content:",y),m.value=l("editor.loadError"),c.value=!1}}};return e.watch(()=>i.contentNode,N=>{N&&(W(),Z(N))},{immediate:!0}),e.onBeforeUnmount(()=>{W()}),(N,y)=>(e.openBlock(),e.createElementBlock("div",_y,[c.value?(e.openBlock(),e.createElementBlock("div",Ky,[e.createVNode(e.unref(Bt))])):m.value?(e.openBlock(),e.createElementBlock("div",$y,[y[0]||(y[0]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2 text-2xl","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(m.value),1)])):(e.openBlock(),e.createElementBlock("div",qy,[e.unref(h)||e.unref(b)?(e.openBlock(),e.createElementBlock("iframe",{key:0,srcdoc:e.unref(p),class:"preview-iframe w-full h-screen",sandbox:"allow-scripts allow-popups"},null,8,e3)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"editorContainer",ref:s,class:"h-full w-full"},null,512))]))]))}},[["__scopeId","data-v-0eb692b7"]]),PrimeButton:de},directives:{tooltip:yt},inject:["collaboraService","isCurrentNodeDisplayed"],props:{isPreviewPanelVisible:{type:Boolean,default:!1},currentNodeDisplayed:{type:Object,default:()=>({})},hasOnlyOneFile:{type:Boolean,default:!1}},emits:["closeContentPanel","showPreviousFile","showNextFile"],data(){return{url:null}},computed:{...je.mapState(It,["children"])},watch:{currentNodeDisplayed(t){t!=null?this.computeUrl(t):this.closeContentPanel()}},methods:{getPDFRef(){return this.$refs.pdfComponent},getImagePreviewRef(){return this.$refs.imageViewer},closeContentPanel(){this.$emit("closeContentPanel")},showPreviousFile(t){this.$emit("showPreviousFile",t)},showNextFile(t){this.$emit("showNextFile",t)},computeUrl(t){this.mimeType=t.content.mimeType,this.currentFileName=t.name,this.currentFileId=t.id,this.mimeType&&(this.mimeType==="application/pdf"||this.mimeType.includes("image/")||this.mimeType.includes("video/")||this.mimeType.includes("audio/"))?this.url=ht.getContentUrl(t.id):ht.getRenditionUrl(t.id).then(l=>{this.url=l}).catch(l=>{if(l.message==="NOT_CREATED")return console.warn("Fail loading content : NOT_CREATED"),null;console.error("Fail loading content",l)})}}},l3=["aria-label"],a3={class:"preview-card"},o3={key:0,class:"panel-header"},n3={class:"file-name"},i3={class:"nav-actions"},s3={class:"preview-content"};function r3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("router-link"),c=e.resolveComponent("ImageViewer"),m=e.resolveComponent("VideoPlayer"),h=e.resolveComponent("AudioPlayer"),b=e.resolveComponent("CodeMirrorViewer"),p=e.resolveComponent("PDFComponent"),d=e.resolveDirective("tooltip");return a.currentNodeDisplayed?(e.openBlock(),e.createElementBlock("aside",{key:0,class:e.normalizeClass(["preview-panel-container",{hidden:!a.isPreviewPanelVisible}]),"aria-label":t.$t("previewPanel")},[e.createElementVNode("div",a3,[a.currentNodeDisplayed?(e.openBlock(),e.createElementBlock("div",o3,[e.createVNode(s,{class:"close-btn",type:"button",icon:"ri-close-line","aria-label":t.$t("close"),severity:"danger",rounded:"",text:"",onClick:n.closeContentPanel},null,8,["aria-label","onClick"]),e.withDirectives((e.openBlock(),e.createElementBlock("div",n3,[e.createTextVNode(e.toDisplayString(a.currentNodeDisplayed.name),1)])),[[d,a.currentNodeDisplayed.name,void 0,{top:!0}]]),e.createElementVNode("div",i3,[e.withDirectives(e.createVNode(s,{"aria-label":t.$t("previousFile"),type:"button",class:"nav-btn",icon:"ri-skip-left-line",severity:"secondary",disabled:a.hasOnlyOneFile,onClick:l[0]||(l[0]=W=>n.showPreviousFile(t.children))},null,8,["aria-label","disabled"]),[[d,t.$t("previousFile"),void 0,{bottom:!0}]]),e.withDirectives(e.createVNode(s,{"aria-label":t.$t("nextFile"),type:"button",class:"nav-btn",icon:"ri-skip-right-line",severity:"secondary","icon-pos":"right",disabled:a.hasOnlyOneFile,onClick:l[1]||(l[1]=W=>n.showNextFile(t.children))},null,8,["aria-label","disabled"]),[[d,t.$t("nextFile"),void 0,{bottom:!0}]]),e.createVNode(r,{to:n.collaboraService.getRoute(a.currentNodeDisplayed)},{default:e.withCtx(()=>[e.createVNode(s,{class:"open-btn",label:"Ouvrir",type:"button",severity:"secondary",raised:""})]),_:1},8,["to"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",s3,[a.currentNodeDisplayed&&t.mimeType&&t.mimeType.includes("image/")?(e.openBlock(),e.createBlock(c,{key:0,ref:"imageViewer","content-node":a.currentNodeDisplayed,"show-title":!1},null,8,["content-node"])):a.currentNodeDisplayed&&t.mimeType&&t.mimeType.includes("video/")?(e.openBlock(),e.createBlock(m,{key:1,"content-url":o.url,"content-node":a.currentNodeDisplayed},null,8,["content-url","content-node"])):a.currentNodeDisplayed&&t.mimeType&&t.mimeType.includes("audio/")?(e.openBlock(),e.createBlock(h,{key:2,"content-url":o.url,"content-node":a.currentNodeDisplayed},null,8,["content-url","content-node"])):a.currentNodeDisplayed&&t.mimeType&&(t.mimeType.startsWith("text/")||t.mimeType==="application/json"||t.mimeType==="application/xml"||t.mimeType==="application/x-yaml"||t.mimeType==="application/x-sh")?(e.openBlock(),e.createBlock(b,{key:3,"content-node":a.currentNodeDisplayed},null,8,["content-node"])):o.url?(e.openBlock(),e.createBlock(p,{key:o.url,ref:"pdfComponent",url:o.url,class:"pdf-viewer"},null,8,["url"])):e.createCommentVNode("",!0)])])],10,l3)):e.createCommentVNode("",!0)}const v2=fe(t3,[["render",r3],["__scopeId","data-v-bb0161cf"]]),c3={name:"SelectionStatus",components:{PrimeProgressSpinner:Bt},inject:["actionsService"],emits:["resetPageSelection"],computed:{useSelectionStore(){return dt},...je.mapState(dt,["isSelectionRemovalVisible","isCurrentPageFullySelected"]),...je.mapState(It,["currentNode","loading","pagination","totalRecordNodes"]),hasMoreElements(){return this.totalRecordNodes>=500},hasSelectedNodes(){return dt().nodes.length!==0&&this.pagination&&!this.loading}},methods:{deleteSelection(){dt().resetSelection(),dt().setIsCurrentPageFullySelected(!1),dt().setIsSelectionRemovalVisible(!1),this.$emit("resetPageSelection")},selectAllNodes(){let t=this.currentNode.guid||this.currentNode.id;this.actionsService.selectAllNodes(t,!0).then(l=>{let a=l.children;a.length>0&&dt().selectNodes(a),dt().setIsCurrentPageFullySelected(!1),dt().setIsSelectionRemovalVisible(!0)})}}},d3={class:"selection-status-container"},m3={key:1,class:"nbrOfSearchResult"},b3={key:2,class:"nbrOfSearchResult"},p3={key:3,class:"selectOrDeleteDiv"},u3={class:"selection-info"},h3={key:4,class:"selectOrDeleteDiv"},y3={class:"selection-info"};function Z3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeProgressSpinner");return e.openBlock(),e.createElementBlock("div",d3,[t.loading?(e.openBlock(),e.createBlock(s,{key:0,class:"spinner",strokeWidth:"8",fill:"var(--surface-ground)",animationDuration:".5s","aria-label":"Custom ProgressSpinner"})):e.createCommentVNode("",!0),!t.loading&&t.pagination&&!n.hasSelectedNodes?(e.openBlock(),e.createElementBlock("div",m3,e.toDisplayString(t.$t("howMuchResult",{nbrEntries:t.pagination.count,totalEntries:t.pagination.totalItems})),1)):n.hasSelectedNodes&&!t.isCurrentPageFullySelected&&!t.isSelectionRemovalVisible?(e.openBlock(),e.createElementBlock("div",b3,e.toDisplayString(t.$t("howMuchSelected",{nbrEntries:n.useSelectionStore().nodes.length,totalEntries:t.pagination.totalItems})),1)):n.hasSelectedNodes&&t.isCurrentPageFullySelected?(e.openBlock(),e.createElementBlock("div",p3,[e.createElementVNode("span",u3,[e.createTextVNode(e.toDisplayString(t.$t("howMuchSelected",{nbrEntries:n.useSelectionStore().nodes.length,totalEntries:t.pagination.totalItems}))+" ",1),n.hasMoreElements?(e.openBlock(),e.createElementBlock("button",{key:0,class:"action-link",onClick:l[0]||(l[0]=r=>n.selectAllNodes())},e.toDisplayString(t.$t("selectAllElementMoreThan",{totalEntries:t.pagination.totalItems})),1)):(e.openBlock(),e.createElementBlock("button",{key:1,class:"action-link",onClick:l[1]||(l[1]=r=>n.selectAllNodes())},e.toDisplayString(t.$t("selectAllElement",{totalEntries:t.pagination.totalItems})),1))])])):n.hasSelectedNodes&&t.isSelectionRemovalVisible?(e.openBlock(),e.createElementBlock("div",h3,[e.createElementVNode("span",y3,[e.createTextVNode(e.toDisplayString(t.$t("howMuchSelected",{nbrEntries:n.useSelectionStore().nodes.length,totalEntries:t.pagination.totalItems}))+" ",1),e.createElementVNode("button",{class:"action-link",onClick:l[2]||(l[2]=r=>n.deleteSelection())},e.toDisplayString(t.$t("deleteSelection")),1)])])):e.createCommentVNode("",!0)])}const F2=fe(c3,[["render",Z3],["__scopeId","data-v-c9907301"]]),g3={name:"LayoutSelector",components:{PrimeSelectButton:Fl},emits:["update-layout"],data(){return{layout:localStorage.getItem("contentViewLayout")||"datatable",options:["list","grid","datatable"]}},methods:{onLayoutChange(){this.$emit("update-layout",this.layout)},getOptionLabel(t){return{list:this.$t("layoutList"),grid:this.$t("layoutGrid"),datatable:this.$t("layoutTable")}[t]||t}}},f3=["aria-label"],W3={class:"sr-only"};function N3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeSelectButton");return e.openBlock(),e.createElementBlock("div",{class:"listView flex-grow-0",role:"group","aria-label":t.$t("layoutSelector")},[e.createVNode(s,{modelValue:o.layout,"onUpdate:modelValue":l[0]||(l[0]=r=>o.layout=r),options:o.options,"allow-empty":!1,onChange:n.onLayoutChange,"aria-label":t.$t("layoutSelector")},{option:e.withCtx(({option:r})=>[e.createElementVNode("i",{class:e.normalizeClass([r==="list"?"ri-list-check":r==="grid"?"ri-grid-line":"ri-table-line"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",W3,e.toDisplayString(n.getOptionLabel(r)),1)]),_:1},8,["modelValue","options","onChange","aria-label"])],8,f3)}const R2=fe(g3,[["render",N3],["__scopeId","data-v-baacd905"]]),A3={name:"ContentToolbar",props:{hasSelection:{type:Boolean,default:void 0}},setup(t){const l=dt(),a=e.computed(()=>l.nodes.length);return{effectiveHasSelection:e.computed(()=>t.hasSelection!==void 0?t.hasSelection:l.nodes.length>0),selectedCount:a}}},Y3={class:"content-toolbar-left"},z3={class:"content-toolbar-right"};function M3(t,l,a,i,o,n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["content-toolbar",{"has-selection":i.effectiveHasSelection}])},[e.createElementVNode("div",Y3,[i.effectiveHasSelection?e.renderSlot(t.$slots,"selection",{key:0,hasSelection:i.effectiveHasSelection,selectedCount:i.selectedCount},void 0,!0):e.renderSlot(t.$slots,"default",{key:1,hasSelection:i.effectiveHasSelection},void 0,!0)]),e.createElementVNode("div",z3,[e.renderSlot(t.$slots,"right",{hasSelection:i.effectiveHasSelection},void 0,!0)])],2)}const S2=fe(A3,[["render",M3],["__scopeId","data-v-6cb2b56e"]]),X3={name:"SelectionBar",components:{PrimeButton:de,ActionMenu:oa},directives:{tooltip:yt},props:{totalItems:{type:Number,default:null},selectAllHandler:{type:Function,default:null},actions:{type:Array,default:()=>[]}},emits:["reload","reset-page-selection"],setup(t,{emit:l}){const a=dt(),i=It(),o=Oo(),{nodes:n,files:s,folders:r,isCurrentPageFullySelected:c,isSelectionRemovalVisible:m}=je.storeToRefs(a),{pagination:h,currentNode:b}=je.storeToRefs(i),{isSmallScreen:p}=je.storeToRefs(o),d=e.ref(null),W=e.ref([]),Z=e.computed(()=>n.value.length),N=e.computed(()=>t.totalItems??h.value?.totalItems??0),y=e.computed(()=>({nodes:n.value,files:s.value,folders:r.value})),A=e.computed(()=>Z.value===N.value&&N.value>0),f=e.computed(()=>h.value?.count??0),Y=e.computed(()=>A.value||m.value?!1:Z.value>=f.value&&f.value>0&&Z.value<N.value),X=e.computed(()=>{const ae=y.value;return t.actions.filter(Q=>typeof Q.visible=="function"?Q.visible(ae):Q.visible!==!1)}),G=e.computed(()=>{const ae=[...X.value],Q={};for(const pe of ae){const P=pe.group||"__default__";P in Q||(Q[P]=pe.order??999)}return ae.sort((pe,P)=>{const ee=pe.group||"__default__",S=P.group||"__default__",E=(Q[ee]??999)-(Q[S]??999);return E!==0?E:(pe.order??999)-(P.order??999)}),ae}),j=e.computed(()=>{const ae=G.value.filter(P=>P.display==="inline"||P.display==="both"||!P.display),Q=[];let pe=null;for(const P of ae){const ee=P.group||"__default__";pe!==null&&ee!==pe&&Q.push({_groupSeparator:!0}),Q.push(P),pe=ee}return Q}),L=e.computed(()=>G.value.filter(ae=>ae.display==="menu")),z=e.computed(()=>G.value),O=(ae,Q)=>typeof ae=="function"?ae(Q):ae||"",F=ae=>typeof ae.disabled=="function"?ae.disabled(y.value):ae.disabled===!0,M=ae=>{const Q=y.value,pe={},P=[];for(const ee of ae){const S=ee.group||"__default__";pe[S]||(pe[S]=[],P.push(S));const E=typeof ee.disabled=="function"?ee.disabled(Q):ee.disabled===!0;pe[S].push({icon:O(ee.icon,Q),label:ee.label||O(ee.tooltip,Q),disabled:E,visible:!0,command:()=>ee.handler(Q)})}return P.map(ee=>({items:pe[ee]}))};return{moreMenu:d,menuActionItems:W,nodes:n,files:s,folders:r,isSmallScreen:p,isSelectionRemovalVisible:m,selectedCount:Z,totalItemsComputed:N,actionContext:y,showSelectAll:Y,isAllSelected:A,inlineActions:j,menuActions:L,allMobileMenuActions:z,resolveStringOrFn:O,resolveDisabled:F,toggleMoreMenu:ae=>{const Q=p.value?z.value:L.value;W.value=M(Q),d.value.getActionMenuRef().toggle(ae)},selectAllNodes:async()=>{if(t.selectAllHandler){t.selectAllHandler();return}const ae=b.value.guid||b.value.id;try{const Q=await Ye.getChildren(ae,N.value,0,!0);Q.children?.length>0&&a.selectNodes(Q.children),a.setIsCurrentPageFullySelected(!1),a.setIsSelectionRemovalVisible(!0)}catch(Q){console.error("Error selecting all nodes:",Q)}},clearSelection:()=>{a.resetSelection(),a.setIsCurrentPageFullySelected(!1),a.setIsSelectionRemovalVisible(!1),l("reset-page-selection")}}}},O3={class:"selection-info"},w3={class:"selection-text"},k3={class:"selection-actions"},C3={key:0,class:"action-separator"},T3={class:"mobile-header"},I3={class:"mobile-selection-info"},j3={class:"selection-text"},G3={class:"mobile-selection-actions"},D3={class:"mobile-actions"};function L3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("ActionMenu"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["selection-bar",{"is-mobile":i.isSmallScreen}])},[i.isSmallScreen?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",T3,[e.createElementVNode("div",I3,[l[5]||(l[5]=e.createElementVNode("i",{"aria-hidden":"true",class:"ri-checkbox-multiple-line selection-icon"},null,-1)),e.createElementVNode("span",j3,e.toDisplayString(t.$t("selection.mobileCount",{selected:i.selectedCount,total:i.totalItemsComputed})),1)]),e.createElementVNode("div",G3,[i.showSelectAll?(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:l[2]||(l[2]=(...m)=>i.selectAllNodes&&i.selectAllNodes(...m))},e.toDisplayString(t.$t("selection.selectAllShort")),1)):i.isSelectionRemovalVisible||i.isAllSelected?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:l[3]||(l[3]=(...m)=>i.clearSelection&&i.clearSelection(...m))},e.toDisplayString(t.$t("selection.clear")),1)):e.createCommentVNode("",!0)])]),e.renderSlot(t.$slots,"actions",{nodes:i.nodes,files:i.files,folders:i.folders,selectedCount:i.selectedCount},()=>[e.createElementVNode("div",D3,[i.allMobileMenuActions.length>0?e.withDirectives((e.openBlock(),e.createBlock(s,{key:0,icon:"ri-more-2-line",onClick:i.toggleMoreMenu,rounded:"",text:"",severity:"secondary"},null,8,["onClick"])),[[c,t.$t("moreActions"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])],!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",O3,[e.createElementVNode("span",w3,e.toDisplayString(t.$t("selection.count",{selected:i.selectedCount,total:i.totalItemsComputed})),1),i.showSelectAll?(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:l[0]||(l[0]=(...m)=>i.selectAllNodes&&i.selectAllNodes(...m))},e.toDisplayString(t.$t("selection.selectAll",{total:i.totalItemsComputed})),1)):i.isSelectionRemovalVisible||i.isAllSelected?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:l[1]||(l[1]=(...m)=>i.clearSelection&&i.clearSelection(...m))},e.toDisplayString(t.$t("selection.clearSelection")),1)):e.createCommentVNode("",!0)]),e.renderSlot(t.$slots,"actions",{nodes:i.nodes,files:i.files,folders:i.folders,selectedCount:i.selectedCount},()=>[e.createElementVNode("div",k3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.inlineActions,(m,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[m._groupSeparator?(e.openBlock(),e.createElementBlock("div",C3)):e.withDirectives((e.openBlock(),e.createBlock(s,{key:1,icon:i.resolveStringOrFn(m.icon,i.actionContext),disabled:i.resolveDisabled(m),onClick:b=>m.handler(i.actionContext),rounded:"",text:"",severity:m.severity||"secondary"},null,8,["icon","disabled","onClick","severity"])),[[c,i.resolveStringOrFn(m.tooltip,i.actionContext),void 0,{top:!0}]])],64))),128)),i.menuActions.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l[4]||(l[4]=e.createElementVNode("div",{class:"action-separator"},null,-1)),e.withDirectives(e.createVNode(s,{icon:"ri-more-2-line",onClick:i.toggleMoreMenu,rounded:"",text:"",severity:"secondary"},null,8,["onClick"]),[[c,t.$t("moreActions"),void 0,{top:!0}]])],64)):e.createCommentVNode("",!0)])],!0)],64)),e.createVNode(r,{ref:"moreMenu","action-menu-items":i.menuActionItems},null,8,["action-menu-items"])],2)}const x2=fe(X3,[["render",L3],["__scopeId","data-v-f3efc80d"]]),V3={name:"HelpKeyMessage",components:{PrimeMessage:ml},props:{helpKey:{type:Boolean,default:!1}},emits:["set-help-hey"],methods:{changeHelpKey(){this.$emit("set-help-hey",!1)}}};function v3(t,l,a,i,o,n){const s=e.resolveComponent("PrimeMessage");return a.helpKey?(e.openBlock(),e.createBlock(s,{key:0,closable:!1,severity:"secondary",class:"text-lg font-semibold p-0",size:"large",onClick:n.changeHelpKey},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createElementVNode("p",{class:"ml-1 font-bold"},"Liste des Raccourcies Claviers",-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createElementVNode("i",{class:"ri-arrow-left-line","aria-hidden":"true"})]),e.createTextVNode("Page Précédente ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createElementVNode("i",{class:"ri-arrow-right-line","aria-hidden":"true"})]),e.createTextVNode("Page Suivante ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createTextVNode("CTRL+"),e.createElementVNode("i",{class:"ri-arrow-up-line","aria-hidden":"true"})]),e.createTextVNode("Document Précédente ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,[e.createTextVNode("CTRL+"),e.createElementVNode("i",{class:"ri-arrow-down-line","aria-hidden":"true"})]),e.createTextVNode("Document Suivante ")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"+"),e.createTextVNode("Zoomer")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"-"),e.createTextVNode("Dézoomer")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"0"),e.createTextVNode("Zoom adapté à la hauteur")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"5"),e.createTextVNode("Zoom adapté à la largeur")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"ECHAP"),e.createTextVNode("Fermer la prévisualisation")],-1),e.createElementVNode("div",{class:"keydef"},[e.createElementVNode("span",null,"ENTER"),e.createTextVNode("Ouvre le document")],-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)}const U2=fe(V3,[["render",v3],["__scopeId","data-v-3439a6f6"]]),F3={name:"CustomToastContent",props:{severity:{type:String,default:"info"},summary:{type:String,default:"Info"},link:{type:String,default:""},linkText:{type:String,default:"Cliquez ici"},messageBeforeLink:{type:String,default:""},messageAfterLink:{type:String,default:""},message:{type:String,default:"Voici un message sans lien."}},computed:{iconClass(){switch(this.severity){case"success":return"ri-check-line text-success";case"info":return"ri-information-line text-info";case"warn":return"ri-alert-line text-warning";case"error":return"ri-close-circle-line text-danger";default:return"ri-information-line text-info"}}}},R3={class:"flex w-full gap-1"},S3={class:"flex flex-column flex-grow-1 gap-1"},x3={class:"text-base font-bold"},U3={class:"text-base"},J3=["href"],E3={key:1};function B3(t,l,a,i,o,n){return e.openBlock(),e.createElementBlock("div",R3,[e.createElementVNode("i",{class:e.normalizeClass([n.iconClass,"mr-2 text-2xl"]),"aria-hidden":"true"},null,2),e.createElementVNode("div",S3,[e.createElementVNode("div",x3,e.toDisplayString(a.summary),1),e.createElementVNode("div",U3,[a.link?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(a.messageBeforeLink)+" ",1),e.createElementVNode("a",{href:a.link,class:"underline",target:"_blank",rel:"noopener"},e.toDisplayString(a.linkText),9,J3),e.createTextVNode(" "+e.toDisplayString(a.messageAfterLink),1)],64)):(e.openBlock(),e.createElementBlock("div",E3,e.toDisplayString(a.message),1))])])])}const J2=fe(F3,[["render",B3]]),H3={name:"UploadStatus",components:{PrimeKnob:vi},emits:["openFile"],data(){return{isReduced:!1}},computed:{...je.mapState(Ol,["files","isUploading","overallMessage","activeRequests"])},methods:{...je.mapActions(Ol,["clearCompleted","cancelUpload"]),changeReducedState(){this.isReduced=!this.isReduced},cancelFileUpload(t){this.cancelUpload(t)},getIconColor(t){switch(t){case"success":return"color: green";case"error":return"color: red";default:return""}},iconForStatus(t){switch(t){case"success":return"ri-checkbox-circle-fill text-2xl";case"error":return"ri-close-circle-fill text-2xl";default:return""}},openFile(t){this.$emit("openFile",t)}}},Q3={key:0,class:"fixed bottom-0 right-0 w-full sm:w-30rem surface-0 border-round shadow-5 m-0 sm:m-3 z-5 p-3 surface-border surface-ground border-1"},P3={class:"flex justify-content-between align-items-center"},_3={key:0,class:"file-list"},K3={class:"flex flex-column pr-1"},$3=["onClick"],q3={key:1,class:"file-name"},eZ={key:2,class:"error-message text-xs"},tZ={class:"status-container"},lZ={key:1};function aZ(t,l,a,i,o,n){const s=e.resolveComponent("Button"),r=e.resolveComponent("PrimeKnob");return t.files.length>0?(e.openBlock(),e.createElementBlock("div",Q3,[e.createElementVNode("div",P3,[e.createElementVNode("strong",null,e.toDisplayString(t.overallMessage),1),e.createElementVNode("div",null,[e.createVNode(s,{icon:o.isReduced?"ri-arrow-up-line":"ri-arrow-down-line",onClick:n.changeReducedState,text:"",rounded:"",severity:"secondary","aria-label":"Réduire"},null,8,["icon","onClick"]),t.isUploading?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,icon:"ri-close-line",onClick:t.clearCompleted,text:"",rounded:"",severity:"secondary","aria-label":"Fermer"},null,8,["onClick"]))])]),o.isReduced?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",_3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.files,c=>(e.openBlock(),e.createElementBlock("div",{key:c.name,class:"file-item"},[e.createElementVNode("div",K3,[c.status==="success"?(e.openBlock(),e.createElementBlock("a",{key:0,class:"file-name cursor-pointer",onClick:m=>n.openFile(c)},e.toDisplayString(c.name),9,$3)):(e.openBlock(),e.createElementBlock("span",q3,e.toDisplayString(c.name),1)),c.status==="error"?(e.openBlock(),e.createElementBlock("p",eZ,e.toDisplayString(c.message),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",tZ,[c.status==="uploading"?(e.openBlock(),e.createBlock(r,{key:0,modelValue:c.percent,"onUpdate:modelValue":m=>c.percent=m,size:50,strokeWidth:5,readonly:"",valueTemplate:"{value}%",class:"upload-knob"},null,8,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0),c.status==="rejected"?(e.openBlock(),e.createElementBlock("div",lZ,e.toDisplayString(t.$t("canceledImport")),1)):(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(`${n.iconForStatus(c.status)}`),style:e.normalizeStyle(n.getIconColor(c.status))},null,6)),c.status==="uploading"&&c.percent!==100?(e.openBlock(),e.createBlock(s,{key:3,icon:"ri-close-line",text:"",rounded:"",severity:"danger",onClick:m=>n.cancelFileUpload(c.name),"aria-label":"Annuler",class:"cancel-btn"},null,8,["onClick"])):e.createCommentVNode("",!0)])]))),128))]))])):e.createCommentVNode("",!0)}const E2=fe(H3,[["render",aZ],["__scopeId","data-v-a3067d5a"]]),oZ={name:"UploadTargetInfo",computed:{...je.mapState(It,["currentNode","workspace"])}},nZ={class:"overlay-content"},iZ={class:"text-xl font-bold"},sZ={class:"mt-2 text-color-secondary"};function rZ(t,l,a,i,o,n){return e.openBlock(),e.createElementBlock("div",nZ,[l[0]||(l[0]=e.createElementVNode("i",{class:"ri-upload-cloud-line text-8xl","aria-hidden":"true"},null,-1)),e.createElementVNode("span",iZ,e.toDisplayString(t.$t("dropFileFolders")),1),e.createElementVNode("div",sZ,e.toDisplayString(t.currentNode?.name==="documentLibrary"?t.workspace?.title||t.workspace?.id:t.currentNode?.name||t.$t("currentFolder")),1)])}const B2=fe(oZ,[["render",rZ],["__scopeId","data-v-b32d0624"]]),cZ={name:"FolderUpload",components:{PrimeButton:de},data(){return{isDraggingOver:!1}},emits:["close"],methods:{...je.mapActions(Ol,["startUpload"]),closePopup(){this.$emit("close",!1)},handleFolderSelect(t){const a=Array.from(t.target.files).map(i=>({file:i,relativePath:i.webkitRelativePath}));this.processFiles(a)},processFiles(t){const l=It().currentNode.id;this.startUpload(t,l),this.closePopup()},async handleDrop(t){this.isDraggingOver=!1;const l=t.dataTransfer.items,a=[],i=[],o=async n=>{if(n.isFile)return new Promise(s=>n.file(r=>{const c=n.fullPath.startsWith("/")?n.fullPath.substring(1):n.fullPath;a.push({file:r,relativePath:c}),s()}));if(n.isDirectory){const s=n.createReader();return new Promise(r=>{const c=async()=>{const m=await new Promise(h=>s.readEntries(h));if(m.length>0){for(const h of m)await o(h);await c()}r()};c()})}};for(const n of l){const s=n.webkitGetAsEntry();s&&i.push(o(s))}await Promise.all(i),a.length>0&&this.processFiles(a)},triggerFileInput(){this.$refs.fileInput.click()},handleDragOver(){this.isDraggingOver=!0},handleDragLeave(){this.isDraggingOver=!1}}},dZ={class:"folder-upload-container"},mZ={class:"folder-upload-buttonbar"};function bZ(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton");return e.openBlock(),e.createElementBlock("div",dZ,[e.createElementVNode("div",mZ,[e.createVNode(s,{class:"select-folder-btn",label:t.$t("selectFolder"),onClick:n.triggerFileInput},null,8,["label","onClick"])]),e.createElementVNode("div",{class:e.normalizeClass(["folder-upload-dropzone",{"is-dragging":o.isDraggingOver}]),onDragover:l[0]||(l[0]=e.withModifiers((...r)=>n.handleDragOver&&n.handleDragOver(...r),["prevent"])),onDragleave:l[1]||(l[1]=e.withModifiers((...r)=>n.handleDragLeave&&n.handleDragLeave(...r),["prevent"])),onDrop:l[2]||(l[2]=e.withModifiers(r=>n.handleDrop(r),["prevent"]))},[e.createElementVNode("p",null,e.toDisplayString(t.$t("dropFolder")),1)],34),e.createElementVNode("input",{type:"file",webkitdirectory:"",onChange:l[3]||(l[3]=r=>n.handleFolderSelect(r)),ref:"fileInput",class:"file-input-hidden"},null,544)])}const ei=fe(cZ,[["render",bZ],["__scopeId","data-v-042839bf"]]),pZ={name:"ImportPopupWithWorker",components:{PrimeButton:de,PrimeDialog:pt,FileUpload:ya,FolderUpload:ei},props:{node:{type:Object,required:!0},importType:{type:String,default:"file"},forcedPlanName:{type:String,default:null},accept:{type:String,default:null}},emits:["close","upload-with-plan"],computed:{...je.mapState(Ol,["isUploading"])},methods:{...je.mapActions(Ol,["startUpload"]),closePopup(){this.$emit("close",!1)},handleUpload(t){const l=t.files;if(!l||l.length===0)return;if(this.forcedPlanName){const i=l.map(o=>new File([o],o.name,{type:o.type}));this.$emit("upload-with-plan",{files:i,planName:this.forcedPlanName}),this.closePopup();return}const a=l.map(i=>({file:new File([i],i.name,{type:i.type}),relativePath:""}));this.startUpload(a,this.node.id),this.closePopup()}}},uZ={key:0},hZ={key:1};function yZ(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("FileUpload"),c=e.resolveComponent("FolderUpload"),m=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(m,{header:t.$t("importElement"),visible:"",modal:"",onKeyup:e.withKeys(n.closePopup,["esc"]),class:"popup"},{closeicon:e.withCtx(()=>[e.createVNode(s,{icon:"ri-close-line","aria-label":t.$t("close"),onClick:n.closePopup,outlined:"",text:"",severity:"secondary"},null,8,["aria-label","onClick"])]),footer:e.withCtx(()=>[e.createVNode(s,{label:t.$t("close"),onClick:n.closePopup,severity:"secondary"},null,8,["label","onClick"])]),default:e.withCtx(()=>[a.importType==="file"?(e.openBlock(),e.createElementBlock("div",uZ,[e.createVNode(r,{name:"upload_files",chooseLabel:t.$t("imports.selectFiles"),uploadLabel:t.$t("send"),cancelLabel:t.$t("cancel"),onUploader:n.handleUpload,customUpload:"",multiple:"",maxFileSize:2147483648,disabled:t.isUploading,accept:a.accept},{empty:e.withCtx(()=>[e.createElementVNode("p",null,e.toDisplayString(t.$t("dragAndDrop")),1)]),_:1},8,["chooseLabel","uploadLabel","cancelLabel","onUploader","disabled","accept"])])):a.importType==="folder"?(e.openBlock(),e.createElementBlock("div",hZ,[e.createVNode(c,{onClose:n.closePopup},null,8,["onClose"])])):e.createCommentVNode("",!0)]),_:1},8,["header","onKeyup"])}const H2=fe(pZ,[["render",yZ]]);class ZZ{getConfig(l,a){const i=`fr/jeci/pristy/config/${l}/${a}`;return fa.executeWebScript("GET",i)}updateConfig(l,a,i){const o=`fr/jeci/pristy/config/${l}/${a}`;return fa.executeWebScript("PUT",o,null,null,null,i)}validateValueByType(l,a){if(a==="number"&&(isNaN(parseFloat(l))||!isFinite(l)))return this.$t("config.errors.invalidNumber");if(a==="boolean"){const i=String(l).toLowerCase();if(i!=="true"&&i!=="false")return this.$t("config.errors.invalidBoolean")}if(a==="array"||a==="object")try{const i=JSON.parse(l),o=Array.isArray(i)?"array":typeof i;if(a==="array"&&o!=="array"||a==="object"&&o!=="object")return this.$t("config.errors.typeMismatch",{type:a})}catch{return null}return null}}const xt=new ZZ,gZ={name:"AddPairInConfigDialog",components:{PrimeDialog:pt,PrimeButton:de,PrimeInputText:_e,PrimeSelect:Dt},props:{visible:{type:Boolean,default:!1},existingKeys:{type:Array,default:()=>[]}},emits:["update:visible","add-pair"],data(){return{newKey:"",newValue:"",newType:"string",availableTypes:["string","number","boolean","array","object"],errors:{key:null,value:null}}},watch:{visible(t){t&&this.resetForm()}},methods:{resetForm(){this.newKey="",this.newValue="",this.newType="string",this.errors={key:null,value:null}},submit(){this.errors={key:null,value:null};let t=!0;this.newKey.trim()?this.existingKeys.includes(this.newKey.trim())&&(this.errors.key=this.$t("config.errors.keyDuplicate"),t=!1):(this.errors.key=this.$t("config.errors.keyRequired"),t=!1);const l=xt.validateValueByType(this.newValue,this.newType);l&&(this.errors.value=l,t=!1),t&&(this.$emit("add-pair",{key:this.newKey,value:this.newValue,type:this.newType}),this.$emit("update:visible",!1))}}},fZ={class:"field"},WZ={for:"newKey"},NZ={key:0,class:"p-error"},AZ={class:"field"},YZ={for:"newType"},zZ={class:"field"},MZ={for:"newValue"},XZ={key:0,class:"p-error"};function OZ(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputText"),r=e.resolveComponent("PrimeSelect"),c=e.resolveComponent("PrimeButton"),m=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(m,{header:t.$t("config.dialog.addTitle"),visible:a.visible,"onUpdate:visible":l[4]||(l[4]=h=>t.$emit("update:visible",h)),modal:"",class:"dialog-add-pair"},{footer:e.withCtx(()=>[e.createVNode(c,{label:t.$t("config.buttons.cancel"),icon:"ri-close-line",class:"p-button-text",onClick:l[3]||(l[3]=h=>t.$emit("update:visible",!1))},null,8,["label"]),e.createVNode(c,{label:t.$t("config.buttons.add"),icon:"ri-check-line",onClick:n.submit,autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",fZ,[e.createElementVNode("label",WZ,e.toDisplayString(t.$t("config.dialog.keyLabel")),1),e.createVNode(s,{id:"newKey",modelValue:o.newKey,"onUpdate:modelValue":l[0]||(l[0]=h=>o.newKey=h),class:e.normalizeClass(["w-full",{"p-invalid":o.errors.key}])},null,8,["modelValue","class"]),o.errors.key?(e.openBlock(),e.createElementBlock("small",NZ,e.toDisplayString(o.errors.key),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",AZ,[e.createElementVNode("label",YZ,e.toDisplayString(t.$t("config.dialog.typeLabel")),1),e.createVNode(r,{id:"newType",modelValue:o.newType,"onUpdate:modelValue":l[1]||(l[1]=h=>o.newType=h),options:o.availableTypes,class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",zZ,[e.createElementVNode("label",MZ,e.toDisplayString(t.$t("config.dialog.valueLabel")),1),e.createVNode(s,{id:"newValue",modelValue:o.newValue,"onUpdate:modelValue":l[2]||(l[2]=h=>o.newValue=h),class:e.normalizeClass(["w-full",{"p-invalid":o.errors.value}])},null,8,["modelValue","class"]),o.errors.value?(e.openBlock(),e.createElementBlock("small",XZ,e.toDisplayString(o.errors.value),1)):e.createCommentVNode("",!0)])]),_:1},8,["header","visible"])}const Q2=fe(gZ,[["render",OZ]]),wZ={class:"array-editor"},kZ=["aria-label"],CZ={key:1,class:"object-item"},TZ={key:0},IZ={key:0},jZ={key:1,class:"object-summary"},GZ={class:"summary-item"},DZ={key:0,class:"summary-item"},LZ={key:1,class:"summary-item"},VZ={class:"summary-item"},vZ={key:1},FZ={class:"action-buttons"},Go=fe({__name:"ArrayEditor",props:{modelValue:{type:Array,required:!0},isMetadata:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:l}){const a=t,i=l,o=e.ref(JSON.parse(JSON.stringify(a.modelValue))),n=["text","datetime","boolean","double","int","date"],s=["popup","details","advancedSearch","view"],r=e.ref(null),c={id:"",title:"",labelId:"",display:[],input:"text",readOnly:!1,modelAspect:"",modelType:""};e.watch(()=>a.modelValue,X=>{o.value=JSON.parse(JSON.stringify(X))},{deep:!0});const m=X=>{const G=typeof X;return G==="string"||G==="number"||G==="boolean"},h=X=>typeof X=="object"&&X!==null,b=(X,G)=>{o.value[X]=G,i("update:modelValue",o.value)},p=(X,G,j)=>{o.value[X][G]=j,i("update:modelValue",o.value)},d=X=>{o.value.splice(X,1),i("update:modelValue",o.value)},W=()=>{if(a.isMetadata){const X={...c,order:o.value.length+1};o.value.push(X)}else if(o.value.length>0){const X=o.value[0],G=typeof X;G==="string"?o.value.push(""):G==="number"?o.value.push(0):G==="object"&&X!==null?o.value.push(JSON.parse(JSON.stringify(X))):o.value.push("")}else o.value.push("");i("update:modelValue",o.value)},Z=X=>{const G=o.value[X];o.value[X]={...c,...G},r.value=X},N=()=>{r.value=null,i("update:modelValue",o.value)},y=X=>{const G=JSON.parse(JSON.stringify(o.value[X]));o.value.splice(X+1,0,G),o.value.forEach((j,L)=>{h(j)&&Object.prototype.hasOwnProperty.call(j,"order")&&(j.order=L+1)}),i("update:modelValue",o.value)},A=(X,G)=>{const j=X+G;if(j<0||j>=o.value.length)return;const L=o.value.splice(X,1)[0];o.value.splice(j,0,L),o.value.forEach((z,O)=>{h(z)&&Object.prototype.hasOwnProperty.call(z,"order")&&(z.order=O+1)}),i("update:modelValue",o.value)},f=()=>{o.value.forEach((X,G)=>{h(X)&&Object.prototype.hasOwnProperty.call(X,"order")&&(X.order=G+1)}),i("update:modelValue",o.value)},Y=X=>{if(!a.isMetadata)return"transparent";const G=X.modelAspect||X.modelType;if(!G)return"transparent";let j=0;for(let z=0;z<G.length;z++)j=G.charCodeAt(z)+((j<<5)-j);return`hsla(${j%360}, 50%, 50%, 0.15)`};return(X,G)=>(e.openBlock(),e.createElementBlock("div",wZ,[e.createVNode(e.unref(Fi.VueDraggableNext),{modelValue:o.value,"onUpdate:modelValue":G[1]||(G[1]=j=>o.value=j),"ghost-class":"ghost",handle:".drag-handle","item-key":"index",onEnd:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(j,L)=>(e.openBlock(),e.createElementBlock("div",{key:L,class:"array-item",style:e.normalizeStyle({backgroundColor:Y(j)})},[e.createElementVNode("button",{class:"drag-handle","aria-label":X.$t("config.arrayEditor.reorder")},[...G[2]||(G[2]=[e.createElementVNode("i",{class:"ri-draggable","aria-hidden":"true"},null,-1)])],8,kZ),m(j)?(e.openBlock(),e.createBlock(e.unref(_e),{key:0,"model-value":j,"onUpdate:modelValue":z=>b(L,z),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):(e.openBlock(),e.createElementBlock("div",CZ,[t.isMetadata?(e.openBlock(),e.createElementBlock("div",TZ,[r.value===L?(e.openBlock(),e.createElementBlock("div",IZ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(c),z=>(e.openBlock(),e.createElementBlock("div",{key:z,class:"object-property"},[e.createElementVNode("label",null,e.toDisplayString(z),1),z==="input"?(e.openBlock(),e.createBlock(e.unref(Dt),{key:0,"model-value":j[z],"onUpdate:modelValue":O=>p(L,z,O),options:n,class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):z==="display"?(e.openBlock(),e.createBlock(e.unref(xa),{key:1,"model-value":j[z],"onUpdate:modelValue":O=>p(L,z,O),options:s,class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])):z==="readOnly"?(e.openBlock(),e.createBlock(e.unref(La),{key:2,"model-value":j[z],"onUpdate:modelValue":O=>p(L,z,O)},null,8,["model-value","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(e.unref(_e),{key:3,"model-value":j[z],"onUpdate:modelValue":O=>p(L,z,O),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"]))]))),128))])):(e.openBlock(),e.createElementBlock("div",jZ,[e.createElementVNode("div",GZ,[G[3]||(G[3]=e.createElementVNode("strong",null,"ID:",-1)),e.createTextVNode(" "+e.toDisplayString(j.id),1)]),j.title?(e.openBlock(),e.createElementBlock("div",DZ,[G[4]||(G[4]=e.createElementVNode("strong",null,"Title:",-1)),e.createTextVNode(" "+e.toDisplayString(j.title),1)])):e.createCommentVNode("",!0),j.labelId?(e.openBlock(),e.createElementBlock("div",LZ,[G[5]||(G[5]=e.createElementVNode("strong",null,"Label ID:",-1)),e.createTextVNode(" "+e.toDisplayString(j.labelId),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",VZ,[G[6]||(G[6]=e.createElementVNode("strong",null,"Input:",-1)),e.createTextVNode(" "+e.toDisplayString(j.input),1)])]))])):(e.openBlock(),e.createElementBlock("div",vZ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j,(z,O)=>(e.openBlock(),e.createElementBlock("div",{key:O,class:"object-property"},[e.createElementVNode("label",null,e.toDisplayString(O),1),e.createVNode(e.unref(_e),{"model-value":z,"onUpdate:modelValue":F=>p(L,O,F),class:"p-inputtext-sm"},null,8,["model-value","onUpdate:modelValue"])]))),128))]))])),e.createElementVNode("div",FZ,[t.isMetadata&&r.value!==L?(e.openBlock(),e.createBlock(e.unref(de),{key:0,icon:"ri-pencil-line","aria-label":X.$t("modify"),class:"p-button-secondary p-button-sm",onClick:z=>Z(L)},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0),t.isMetadata&&r.value===L?(e.openBlock(),e.createBlock(e.unref(de),{key:1,icon:"ri-check-line","aria-label":X.$t("save"),class:"p-button-success p-button-sm",onClick:G[0]||(G[0]=z=>N())},null,8,["aria-label"])):e.createCommentVNode("",!0),t.isMetadata?(e.openBlock(),e.createBlock(e.unref(de),{key:2,icon:"ri-arrow-up-line","aria-label":X.$t("moveUp"),class:"p-button-secondary p-button-sm",onClick:z=>A(L,-1),disabled:L===0},null,8,["aria-label","onClick","disabled"])):e.createCommentVNode("",!0),t.isMetadata?(e.openBlock(),e.createBlock(e.unref(de),{key:3,icon:"ri-arrow-down-line","aria-label":X.$t("moveDown"),class:"p-button-secondary p-button-sm",onClick:z=>A(L,1),disabled:L===o.value.length-1},null,8,["aria-label","onClick","disabled"])):e.createCommentVNode("",!0),t.isMetadata?(e.openBlock(),e.createBlock(e.unref(de),{key:4,icon:"ri-file-copy-line","aria-label":X.$t("duplicate"),class:"p-button-secondary p-button-sm",onClick:z=>y(L)},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(de),{icon:"ri-delete-bin-line","aria-label":X.$t("delete"),class:"p-button-danger p-button-sm",onClick:z=>d(L)},null,8,["aria-label","onClick"])])],4))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(de),{label:X.$t("config.arrayEditor.addItem"),icon:"ri-add-line",class:"p-button-sm p-button-secondary mt-2",onClick:W},null,8,["label"])]))}},[["__scopeId","data-v-fee7ece3"]]),RZ={class:"config-cards-container"},SZ={class:"card-title-wrapper"},xZ={class:"type-badge ml-2"},UZ={class:"title-buttons"},JZ={key:0,class:"description"},EZ={key:1,class:"undefined-container"},BZ={class:"help-text"},HZ={key:2,class:"editor-container"},QZ={key:3},P2=fe({__name:"ConfigDatatable",props:{configData:{type:Array,required:!0},loading:{type:Boolean,default:!1},descriptions:{type:Object,default:()=>({})}},emits:["update:config"],setup(t,{emit:l}){const a=t,i=l,o=e.ref(a.configData.reduce((h,b)=>(b.type==="array"&&(h[b.key]=!1),h),{})),n=h=>{o.value[h]=!o.value[h]},s=(h,b)=>{const p=a.configData.map(d=>d.key===h?{...d,value:b}:d);i("update:config",p)},r=h=>{const b=a.configData.map(p=>p.key===h?{...p,isDefined:!0}:p);i("update:config",b)},c=h=>{const b=a.configData.map(p=>{if(p.key===h){const d=a.descriptions[h]?.default;return{...p,isDefined:!1,value:d}}return p});i("update:config",b)},m=e.computed(()=>[...a.configData].sort((h,b)=>h.key.localeCompare(b.key)));return(h,b)=>(e.openBlock(),e.createElementBlock("div",RZ,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,p=>(e.openBlock(),e.createBlock(e.unref(Zo),{key:p.key,class:"config-card"},{title:e.withCtx(()=>[e.createElementVNode("div",SZ,[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(p.key)+" ",1),e.createElementVNode("small",xZ,e.toDisplayString(h.$t(`config.types.${p.type}`)),1)]),e.createElementVNode("div",UZ,[p.type==="array"&&p.isDefined?(e.openBlock(),e.createBlock(e.unref(de),{key:0,icon:o.value[p.key]?"ri-close-large-line":"ri-add-large-line",class:"p-button-text p-button","aria-label":o.value[p.key]?h.$t("config.buttons.collapse"):h.$t("config.buttons.expand"),onClick:d=>n(p.key)},null,8,["icon","aria-label","onClick"])):e.createCommentVNode("",!0),p.isDefined?(e.openBlock(),e.createBlock(e.unref(de),{key:1,icon:"ri-delete-bin-line",severity:"danger","aria-label":h.$t("config.buttons.undefine"),class:"p-button-sm",onClick:d=>c(p.key)},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0)])])]),content:e.withCtx(()=>[t.descriptions[p.key]?.descriptionKey?(e.openBlock(),e.createElementBlock("p",JZ,e.toDisplayString(h.$t(t.descriptions[p.key].descriptionKey)),1)):e.createCommentVNode("",!0),p.isDefined?e.withDirectives((e.openBlock(),e.createElementBlock("div",HZ,[p.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(La),{key:0,"model-value":p.value,"onUpdate:modelValue":d=>s(p.key,d)},null,8,["model-value","onUpdate:modelValue"])):p.type==="array"?(e.openBlock(),e.createBlock(Go,{key:1,"is-metadata":p.key==="METADATA","model-value":p.value,"onUpdate:modelValue":d=>s(p.key,d)},null,8,["is-metadata","model-value","onUpdate:modelValue"])):p.type==="string"||p.type==="number"?(e.openBlock(),e.createBlock(e.unref(_e),{key:2,"model-value":p.value,class:"w-full","onUpdate:modelValue":d=>s(p.key,d)},null,8,["model-value","onUpdate:modelValue"])):p.type==="object"?(e.openBlock(),e.createElementBlock("pre",QZ,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)],512)),[[e.vShow,p.type!=="array"||o.value[p.key]]]):(e.openBlock(),e.createElementBlock("div",EZ,[e.createVNode(e.unref(de),{label:h.$t("config.buttons.define"),icon:"ri-add-line",class:"p-button-outlined",onClick:d=>r(p.key)},null,8,["label","onClick"]),e.createElementVNode("small",BZ,e.toDisplayString(h.$t("config.notDefined")),1)]))]),_:2},1024))),128))]))}},[["__scopeId","data-v-0394ea8e"]]),PZ={class:"config-item-editor"},_Z={class:"editor-header"},KZ={class:"config-key"},$Z={class:"type-badge"},qZ={key:0,class:"config-description"},eg={class:"definition-actions"},tg={key:0,class:"undefined-container"},lg={class:"help-text"},ag={key:1,class:"defined-actions"},og={key:1,class:"editor-content"},ng={key:0,class:"editor-field"},ig={key:1,class:"editor-field"},sg={key:2,class:"editor-field"},rg={key:3,class:"editor-field editor-field-array"},cg={key:4,class:"editor-field"},dg={class:"object-display"},mg={key:2,class:"default-hint"},ti=fe({__name:"ConfigItemEditor",props:{item:{type:Object,required:!0},description:{type:Object,default:()=>({})}},emits:["update:value","define","undefine"],setup(t,{emit:l}){const a=l,i=r=>{a("update:value",r)},o=()=>{a("define")},n=()=>{a("undefine")},s=r=>typeof r=="object"?JSON.stringify(r):String(r);return(r,c)=>(e.openBlock(),e.createElementBlock("div",PZ,[e.createElementVNode("div",_Z,[e.createElementVNode("h3",KZ,e.toDisplayString(t.item.key),1),e.createElementVNode("span",$Z,e.toDisplayString(r.$t(`config.types.${t.item.type}`)),1)]),t.description?.descriptionKey?(e.openBlock(),e.createElementBlock("p",qZ,e.toDisplayString(r.$t(t.description.descriptionKey)),1)):e.createCommentVNode("",!0),e.createElementVNode("div",eg,[t.item.isDefined?(e.openBlock(),e.createElementBlock("div",ag,[e.createVNode(e.unref(de),{label:r.$t("config.buttons.undefine"),icon:"ri-delete-bin-line",severity:"danger",class:"p-button-outlined p-button-sm",onClick:n},null,8,["label"])])):(e.openBlock(),e.createElementBlock("div",tg,[e.createVNode(e.unref(de),{label:r.$t("config.buttons.define"),icon:"ri-add-line",class:"p-button-outlined",onClick:o},null,8,["label"]),e.createElementVNode("small",lg,e.toDisplayString(r.$t("config.notDefined")),1)]))]),t.item.isDefined?(e.openBlock(),e.createElementBlock("div",og,[t.item.type==="boolean"?(e.openBlock(),e.createElementBlock("div",ng,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createVNode(e.unref(La),{"model-value":t.item.value,"onUpdate:modelValue":i},null,8,["model-value"])])):t.item.type==="string"?(e.openBlock(),e.createElementBlock("div",ig,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createVNode(e.unref(_e),{"model-value":t.item.value,class:"w-full","onUpdate:modelValue":i},null,8,["model-value"])])):t.item.type==="number"?(e.openBlock(),e.createElementBlock("div",sg,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createVNode(e.unref(Yl),{"model-value":t.item.value,class:"w-full","onUpdate:modelValue":i},null,8,["model-value"])])):t.item.type==="array"?(e.openBlock(),e.createElementBlock("div",rg,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createVNode(Go,{"is-metadata":t.item.key==="METADATA","model-value":t.item.value,"onUpdate:modelValue":i},null,8,["is-metadata","model-value"])])):t.item.type==="object"?(e.openBlock(),e.createElementBlock("div",cg,[e.createElementVNode("label",null,e.toDisplayString(r.$t("config.table.valueHeader")),1),e.createElementVNode("pre",dg,e.toDisplayString(JSON.stringify(t.item.value,null,2)),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.description?.default!==void 0?(e.openBlock(),e.createElementBlock("div",mg,[c[0]||(c[0]=e.createElementVNode("i",{class:"ri-information-line","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(r.$t("config.splitView.defaultValue"))+": ",1),e.createElementVNode("code",null,e.toDisplayString(s(t.description.default)),1)])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a7f62f1b"]]),bg={class:"config-split-view"},pg={class:"config-list-panel"},ug={class:"filter-container"},hg={class:"filter-input-wrapper"},yg={class:"config-groups"},Zg=["onClick"],gg={class:"group-label"},fg={class:"group-count"},Wg={class:"group-items"},Ng=["onClick"],Ag={class:"item-key"},Yg=["title"],zg={key:0,class:"empty-state"},Mg={class:"config-editor-panel"},Xg={key:0,class:"editor-wrapper"},Og={key:1,class:"empty-editor"},_2=fe({__name:"ConfigSplitView",props:{configData:{type:Array,required:!0},descriptions:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1}},emits:["update:config"],setup(t,{emit:l}){const{t:a}=Rt.useI18n(),i=t,o=l,n=e.ref(""),s=e.ref(null),r=e.ref({}),c={display:{id:"display",label:"config.groups.display",prefixes:["THEME","APP_ROOT","SHOW_","PRIMEVUE","BREADCRUMB","EDIT_","OPEN_"]},matomo:{id:"matomo",label:"config.groups.matomo",prefixes:["MATOMO_"]},sentry:{id:"sentry",label:"config.groups.sentry",prefixes:["SENTRY_"]},chat:{id:"chat",label:"config.groups.chat",prefixes:["CHAT_","ROCKETCHAT_"]},search:{id:"search",label:"config.groups.search",prefixes:["SEARCH_"]},pagination:{id:"pagination",label:"config.groups.pagination",prefixes:["DEFAULT_ELEMENT","ROW_PER_PAGE"]},metadata:{id:"metadata",label:"config.groups.metadata",keys:["METADATA","ASPECTS","CONSTRAINTS","ALLOWED_FILE_EXTENSIONS"]},security:{id:"security",label:"config.groups.security",keys:["NEW_PASSWORD_RULES"]},other:{id:"other",label:"config.groups.other"}},m=y=>{for(const[A,f]of Object.entries(c))if(A!=="other"){if(f.keys&&f.keys.includes(y))return A;if(f.prefixes){for(const Y of f.prefixes)if(y.startsWith(Y))return A}}return"other"},h=e.computed(()=>{const y=n.value.toLowerCase().trim(),A={};for(const Y of Object.keys(c))A[Y]=[];for(const Y of i.configData){if(y){const G=Y.key.toLowerCase().includes(y),j=i.descriptions[Y.key]?.descriptionKey,L=j?a(j).toLowerCase().includes(y):!1;if(!G&&!L)continue}const X=m(Y.key);A[X].push(Y)}for(const Y of Object.keys(A))A[Y].sort((X,G)=>X.key.localeCompare(G.key));const f=[];for(const[Y,X]of Object.entries(c))A[Y].length>0&&f.push({id:Y,label:X.label,items:A[Y]});return f}),b=e.computed(()=>s.value?i.configData.find(y=>y.key===s.value):null),p=y=>{r.value[y]=!r.value[y]},d=y=>{s.value=y},W=y=>{if(!s.value)return;const A=i.configData.map(f=>f.key===s.value?{...f,value:y}:f);o("update:config",A)},Z=()=>{if(!s.value)return;const y=i.configData.map(A=>A.key===s.value?{...A,isDefined:!0}:A);o("update:config",y)},N=()=>{if(!s.value)return;const y=i.configData.map(A=>{if(A.key===s.value){const f=i.descriptions[A.key]?.default;return{...A,isDefined:!1,value:f}}return A});o("update:config",y)};return e.watch(()=>i.configData,()=>{!s.value&&i.configData.length>0&&h.value.length>0&&h.value[0].items.length>0&&(s.value=h.value[0].items[0].key)},{immediate:!0}),(y,A)=>(e.openBlock(),e.createElementBlock("div",bg,[e.createElementVNode("div",pg,[e.createElementVNode("div",ug,[e.createElementVNode("span",hg,[A[1]||(A[1]=e.createElementVNode("i",{class:"ri-search-line","aria-hidden":"true"},null,-1)),e.createVNode(e.unref(_e),{modelValue:n.value,"onUpdate:modelValue":A[0]||(A[0]=f=>n.value=f),placeholder:y.$t("config.splitView.filterPlaceholder"),class:"filter-input"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",yg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,f=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"config-group"},[e.createElementVNode("div",{class:"group-header",onClick:Y=>p(f.id)},[e.createElementVNode("i",{class:e.normalizeClass(r.value[f.id]?"ri-arrow-right-s-line":"ri-arrow-down-s-line"),"aria-hidden":"true"},null,2),e.createElementVNode("span",gg,e.toDisplayString(y.$t(f.label)),1),e.createElementVNode("span",fg,e.toDisplayString(f.items.length),1)],8,Zg),e.withDirectives(e.createElementVNode("div",Wg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.items,Y=>(e.openBlock(),e.createElementBlock("div",{key:Y.key,class:e.normalizeClass(["config-list-item",{"is-selected":s.value===Y.key,"is-undefined":!Y.isDefined}]),onClick:X=>d(Y.key)},[e.createElementVNode("span",Ag,e.toDisplayString(Y.key),1),Y.isDefined?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("i",{key:0,class:"ri-checkbox-blank-circle-line undefined-indicator",title:y.$t("config.notDefined"),"aria-hidden":"true"},null,8,Yg))],10,Ng))),128))],512),[[e.vShow,!r.value[f.id]]])]))),128)),h.value.length===0?(e.openBlock(),e.createElementBlock("div",zg,[A[2]||(A[2]=e.createElementVNode("i",{class:"ri-search-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(y.$t("config.splitView.noResults")),1)])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Mg,[b.value?(e.openBlock(),e.createElementBlock("div",Xg,[e.createVNode(ti,{item:b.value,description:t.descriptions[b.value.key],"onUpdate:value":W,onDefine:Z,onUndefine:N},null,8,["item","description"])])):(e.openBlock(),e.createElementBlock("div",Og,[A[3]||(A[3]=e.createElementVNode("i",{class:"ri-settings-3-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(y.$t("config.splitView.selectConfig")),1)]))])]))}},[["__scopeId","data-v-92507923"]]),wg={name:"ConfigUpload",components:{PrimeFileUpload:ya},props:{loading:{type:Boolean,default:!1}},emits:["upload-config"],methods:{handleFileUpload(t){const l=t.files[0];if(!l)return;const a=new FileReader;a.onload=i=>{try{const o=JSON.parse(i.target.result);this.$emit("upload-config",o)}catch{this.$toast.add({severity:"error",summary:"Fichier Invalide",detail:this.$t("config.errors.invalidJsonFile"),life:4e3})}},a.onerror=i=>{console.error("handle file upload error",i)},a.readAsText(l)}}},kg={class:"config-upload"},Cg={class:"config-upload-description"},Tg={class:"config-upload-warning"};function Ig(t,l,a,i,o,n){const s=e.resolveComponent("PrimeFileUpload");return e.openBlock(),e.createElementBlock("div",kg,[e.createElementVNode("p",Cg,e.toDisplayString(t.$t("config.raw.uploadDescription")),1),e.createVNode(s,{mode:"basic",name:"configfile[]",accept:".json",maxFileSize:1e6,customUpload:"",onUploader:n.handleFileUpload,chooseLabel:t.$t("config.raw.uploadButton"),auto:"",loading:a.loading,severity:"danger",class:"config-upload-button"},null,8,["onUploader","chooseLabel","loading"]),e.createElementVNode("small",Tg,e.toDisplayString(t.$t("config.raw.uploadWarning")),1)])}const K2=fe(wg,[["render",Ig],["__scopeId","data-v-cda1f133"]]),jg={name:"ListVersionConfig",components:{PrimeButton:de,PrimeCard:Zo,PrimeTextarea:zl,PrimeProgressSpinner:Bt},props:{currentNode:{type:Object,required:!0},versions:{type:Array,default:()=>[]},title:{type:String,default:""}},emits:["reload"],data(){return{selectedVersion:null,selectedVersionContent:"",isContentLoading:!1}},methods:{async selectVersion(t){if(!(this.selectedVersion&&this.selectedVersion.id===t.id)){this.selectedVersion=t,this.isContentLoading=!0,this.selectedVersionContent="";try{const a=await(await this.getContent(this.currentNode.id,t.id)).text(),i=JSON.parse(a);this.selectedVersionContent=JSON.stringify(i,null,2)}catch{this.selectedVersionContent=this.$t("config.versionViewer.loadError")}finally{this.isContentLoading=!1}}},download(t){this.getContent(this.currentNode.id,t.id,!1).then(l=>{const i=this.currentNode.name.split("."),o=i.pop(),n=i.join("."),s=document.createElement("a"),r=t.id.replace(".","-");s.href=URL.createObjectURL(l),s.download=`${n}_v${r}.${o}`,s.click()})},revert(t){if(!this.versions||this.versions.length===0){console.error("Le tableau des versions est vide.");return}if(this.versions[0].entry.id===t.id){this.$toast.add({severity:"warn",summary:this.$t("error"),detail:this.$t("config.versionViewer.cannotRevertLatest"),life:3e3});return}const a=this.$t("config.versionViewer.restoredVersionComment",{versionNumber:t.id});Ye.revertVersion(this.currentNode.id,t.id,a).then(()=>{this.$emit("reload"),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("config.versionViewer.success"),life:3e3})}).catch(i=>{console.error(i),this.$toast.add({severity:"error",summary:this.$t("error"),detail:i.message||this.$t("config.versionViewer.error"),life:3e3})})},getContent(t,l){return Ye.getVersionContent(t,l).catch(a=>(this.$toast.add({severity:"error",summary:this.$t("error"),detail:a.message||this.$t("config.versionViewer.genericError"),life:3e3}),Promise.reject(a)))},toLocaleDateString(t){if(!t)return"";let l=new Date(t);return new Intl.DateTimeFormat("fr-FR",{dateStyle:"medium"}).format(l)},toLocaleTimeString(t){return t?new Date(t).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit",hour12:!1}):""}}},Gg={key:0,class:"version-section-title"},Dg={class:"version-layout"},Lg={class:"version-list-column"},Vg={class:"version-list-container"},vg=["onClick"],Fg={class:"version-bubble"},Rg={class:"version-bubble-text"},Sg={class:"version-info"},xg={class:"version-author"},Ug={key:0},Jg={class:"version-actions"},Eg={class:"version-content-column"},Bg={key:0,class:"version-loading"},Hg={key:1},Qg={key:2,class:"version-empty"};function Pg(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("PrimeProgressSpinner"),c=e.resolveComponent("PrimeTextarea"),m=e.resolveComponent("PrimeCard"),h=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",null,[a.title?(e.openBlock(),e.createElementBlock("span",Gg,e.toDisplayString(a.title.toUpperCase()),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Dg,[e.createElementVNode("div",Lg,[e.createElementVNode("ul",Vg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.versions,b=>(e.openBlock(),e.createElementBlock("li",{key:b.id,class:e.normalizeClass(["version-row",{"active-version":o.selectedVersion&&o.selectedVersion.id===b.entry.id}]),onClick:p=>n.selectVersion(b.entry)},[e.createElementVNode("div",Fg,[e.createElementVNode("span",Rg,e.toDisplayString(b.entry.id),1)]),e.createElementVNode("span",Sg,[e.createTextVNode(e.toDisplayString(n.toLocaleDateString(b.entry.modifiedAt))+" "+e.toDisplayString(t.$t("at"))+" "+e.toDisplayString(n.toLocaleTimeString(b.entry.modifiedAt))+" ",1),e.createElementVNode("span",xg,[e.createTextVNode(e.toDisplayString(t.$t("by"))+" "+e.toDisplayString(b.entry.modifiedByUser.displayName)+" ",1),l[0]||(l[0]=e.createElementVNode("br",null,null,-1)),b.entry.versionComment?(e.openBlock(),e.createElementBlock("em",Ug,e.toDisplayString(b.entry.versionComment),1)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Jg,[e.withDirectives(e.createVNode(s,{type:"button",icon:"ri-download-line","aria-label":t.$t("download"),onClick:e.withModifiers(p=>n.download(b.entry),["stop"]),severity:"secondary",rounded:"",text:""},null,8,["aria-label","onClick"]),[[h,t.$t("download"),void 0,{left:!0}]]),e.withDirectives(e.createVNode(s,{type:"button",icon:"ri-history-line","aria-label":t.$t("restore"),onClick:p=>n.revert(b.entry),severity:"secondary",rounded:"",text:""},null,8,["aria-label","onClick"]),[[h,t.$t("restore"),void 0,{left:!0}]])])],10,vg))),128))])]),e.createElementVNode("div",Eg,[e.createVNode(m,{class:"version-card"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("config.versionViewer.title")),1)]),content:e.withCtx(()=>[o.isContentLoading?(e.openBlock(),e.createElementBlock("div",Bg,[e.createVNode(r)])):o.selectedVersionContent?(e.openBlock(),e.createElementBlock("div",Hg,[e.createVNode(c,{"model-value":o.selectedVersionContent,readonly:"",class:"version-textarea"},null,8,["model-value"])])):(e.openBlock(),e.createElementBlock("div",Qg,[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-arrow-left-s-line ri-2x","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("config.versionViewer.selectPrompt")),1)]))]),_:1})])])])}const $2=fe(jg,[["render",Pg],["__scopeId","data-v-8bb7c5ba"]]),Do={id:null,property:null,negation:!1,operator:null,value:null,value_end:null},_g={name:"AddCriterionPopup",components:{PrimeDialog:pt,PrimeSelect:Dt,PrimeSelectButton:Fl,PrimeInputText:_e,PrimeDatePicker:Fa,PrimeInputNumber:Yl,PrimeButton:de,PrimeDataTable:$t,PrimeColumn:qt,PrimeIconField:Va,PrimeInputIcon:va},props:{visible:Boolean,properties:{type:Array,required:!0},editCriterion:{type:Object,default:null}},emits:["update:visible","add-criterion","update-criterion"],watch:{visible(t){if(t&&this.editCriterion){const l=JSON.parse(JSON.stringify(this.editCriterion));if(l.property&&(l.property.input==="date"||l.property.input==="datetime")&&(l.value&&(l.value=new Date(l.value)),l.value_end&&(l.value_end=new Date(l.value_end))),l.property&&l.property.id){const a=this.properties.find(i=>i.id===l.property.id);a&&(l.property=a)}this.criterion=l}else t&&(this.criterion={...Do});t&&(this.propertyFilter="")}},data(){return{criterion:{...Do},propertyFilter:"",operatorOptions:{text:[{labelKey:"rechercheAvancee.exact",value:"exact"},{labelKey:"rechercheAvancee.contains",value:"contains"}],date:[{labelKey:"rechercheAvancee.isDate",value:"exact"},{labelKey:"rechercheAvancee.isDateRange",value:"range"}],datetime:[{labelKey:"rechercheAvancee.isDate",value:"exact"},{labelKey:"rechercheAvancee.isDateRange",value:"range"}],number:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],int:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],double:[{labelKey:"rechercheAvancee.isNumber",value:"exact"},{labelKey:"rechercheAvancee.isNumberRange",value:"range"}],boolean:[{labelKey:"rechercheAvancee.is",value:"exact"}]}}},computed:{negationOptions(){return[{label:`${this.$t("rechercheAvancee.mustContain")} (+)`,value:!1},{label:`${this.$t("rechercheAvancee.mustNotContain")} (-)`,value:!0}]},booleanOptions(){return[{label:this.$t("true"),value:!0},{label:this.$t("false"),value:!1}]},filteredProperties(){const t=this.propertyFilter?.toLowerCase().trim();return t?this.properties.filter(l=>(l.labelId?this.$t(l.labelId):l.title||"").toLowerCase().includes(t)||l.id.toLowerCase().includes(t)):this.properties},isCriterionValid(){return this.criterion.property&&this.criterion.operator&&this.criterion.value!==null&&this.criterion.value!==""},propertyType(){return this.criterion.property?this.criterion.property.input:"text"}},methods:{getOperatorsForCriterion(){const t=this.propertyType;return this.operatorOptions[t]||[]},onPropertyChange(){this.criterion.operator=null,this.criterion.value=null,this.criterion.value_end=null},addCriterion(){const t=this.getOperatorsForCriterion().find(l=>l.value===this.criterion.operator);this.$emit("add-criterion",{...this.criterion,id:Date.now(),operatorLabelKey:t?t.labelKey:this.criterion.operator}),this.criterion={...Do},this.$emit("update:visible",!1)},updateCriterion(){const t=this.getOperatorsForCriterion().find(l=>l.value===this.criterion.operator);this.$emit("update-criterion",{...this.criterion,operatorLabelKey:t?t.labelKey:this.criterion.operator}),this.criterion={...Do},this.$emit("update:visible",!1)}}},Kg={class:"flex flex-column gap-3"},$g={class:"flex flex-column gap-2"},qg={class:"font-semibold"},e5={key:0,class:"font-semibold"},t5={key:1,class:"font-semibold"},l5={class:"text-sm"},a5={class:"flex gap-3"},o5={class:"flex flex-column gap-1 flex-1"},n5={class:"font-semibold"},i5={class:"flex flex-column gap-1 flex-1"},s5={class:"font-semibold"},r5={class:"flex flex-column gap-1"},c5={class:"font-semibold"},d5={class:"flex gap-2 align-items-center"};function m5(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputIcon"),r=e.resolveComponent("PrimeInputText"),c=e.resolveComponent("PrimeIconField"),m=e.resolveComponent("PrimeColumn"),h=e.resolveComponent("PrimeDataTable"),b=e.resolveComponent("PrimeSelectButton"),p=e.resolveComponent("PrimeSelect"),d=e.resolveComponent("PrimeDatePicker"),W=e.resolveComponent("PrimeInputNumber"),Z=e.resolveComponent("PrimeButton"),N=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(N,{visible:a.visible,"onUpdate:visible":l[11]||(l[11]=y=>t.$emit("update:visible",y)),modal:"",header:a.editCriterion?t.$t("rechercheAvancee.editCriterionPopupTitle"):t.$t("rechercheAvancee.addCriterionPopupTitle"),style:{width:"600px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(Z,{label:t.$t("rechercheAvancee.cancelButton"),icon:"ri-close-line",onClick:l[10]||(l[10]=y=>t.$emit("update:visible",!1)),text:""},null,8,["label"]),a.editCriterion?(e.openBlock(),e.createBlock(Z,{key:0,label:t.$t("rechercheAvancee.updateButton"),icon:"ri-check-line",onClick:n.updateCriterion,disabled:!n.isCriterionValid},null,8,["label","onClick","disabled"])):(e.openBlock(),e.createBlock(Z,{key:1,label:t.$t("rechercheAvancee.addButton"),icon:"ri-add-line",onClick:n.addCriterion,disabled:!n.isCriterionValid},null,8,["label","onClick","disabled"]))]),default:e.withCtx(()=>[e.createElementVNode("div",Kg,[e.createElementVNode("div",$g,[e.createElementVNode("label",qg,e.toDisplayString(t.$t("rechercheAvancee.propertyLabel")),1),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s,{class:"ri-search-line"}),e.createVNode(r,{modelValue:o.propertyFilter,"onUpdate:modelValue":l[0]||(l[0]=y=>o.propertyFilter=y),placeholder:t.$t("rechercheAvancee.searchProperty"),class:"w-full",size:"small"},null,8,["modelValue","placeholder"])]),_:1}),e.createVNode(h,{selection:o.criterion.property,"onUpdate:selection":l[1]||(l[1]=y=>o.criterion.property=y),value:n.filteredProperties,"selection-mode":"single",dataKey:"id",paginator:n.filteredProperties.length>8,rows:8,size:"small",onRowSelect:n.onPropertyChange,scrollable:"",scrollHeight:"300px"},{default:e.withCtx(()=>[e.createVNode(m,{field:"name",header:t.$t("rechercheAvancee.propertyName"),sortable:""},{body:e.withCtx(y=>[y.data.labelId?(e.openBlock(),e.createElementBlock("span",e5,e.toDisplayString(t.$t(y.data.labelId)),1)):(e.openBlock(),e.createElementBlock("span",t5,e.toDisplayString(y.data.title),1))]),_:1},8,["header"]),e.createVNode(m,{field:"id",header:t.$t("rechercheAvancee.propertyId"),sortable:""},{body:e.withCtx(y=>[e.createElementVNode("code",l5,e.toDisplayString(y.data.id),1)]),_:1},8,["header"])]),_:1},8,["selection","value","paginator","onRowSelect"])]),e.createElementVNode("div",a5,[e.createElementVNode("div",o5,[e.createElementVNode("label",n5,e.toDisplayString(t.$t("rechercheAvancee.conditionLabel")),1),e.createVNode(b,{modelValue:o.criterion.negation,"onUpdate:modelValue":l[2]||(l[2]=y=>o.criterion.negation=y),options:n.negationOptions,optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])]),e.createElementVNode("div",i5,[e.createElementVNode("label",s5,e.toDisplayString(t.$t("rechercheAvancee.operatorLabel")),1),e.createVNode(p,{modelValue:o.criterion.operator,"onUpdate:modelValue":l[3]||(l[3]=y=>o.criterion.operator=y),options:n.getOperatorsForCriterion(),optionLabel:y=>t.$t(y.labelKey),optionValue:"value",placeholder:t.$t("rechercheAvancee.operatorPlaceholder"),disabled:!o.criterion.property},null,8,["modelValue","options","optionLabel","placeholder","disabled"])])]),e.createElementVNode("div",r5,[e.createElementVNode("label",c5,e.toDisplayString(t.$t("rechercheAvancee.valueLabel")),1),e.createElementVNode("div",d5,[n.propertyType==="text"?(e.openBlock(),e.createBlock(r,{key:0,modelValue:o.criterion.value,"onUpdate:modelValue":l[4]||(l[4]=y=>o.criterion.value=y),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),n.propertyType==="boolean"?(e.openBlock(),e.createBlock(b,{key:1,modelValue:o.criterion.value,"onUpdate:modelValue":l[5]||(l[5]=y=>o.criterion.value=y),options:n.booleanOptions,optionLabel:"label",optionValue:"value"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),n.propertyType==="date"||n.propertyType==="datetime"?(e.openBlock(),e.createBlock(d,{key:2,modelValue:o.criterion.value,"onUpdate:modelValue":l[6]||(l[6]=y=>o.criterion.value=y),dateFormat:"yy-mm-dd",class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),(n.propertyType==="date"||n.propertyType==="datetime")&&o.criterion.operator==="range"?(e.openBlock(),e.createBlock(d,{key:3,modelValue:o.criterion.value_end,"onUpdate:modelValue":l[7]||(l[7]=y=>o.criterion.value_end=y),dateFormat:"yy-mm-dd",class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),["int","double","number"].includes(n.propertyType)?(e.openBlock(),e.createBlock(W,{key:4,modelValue:o.criterion.value,"onUpdate:modelValue":l[8]||(l[8]=y=>o.criterion.value=y),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0),["int","double","number"].includes(n.propertyType)&&o.criterion.operator==="range"?(e.openBlock(),e.createBlock(W,{key:5,modelValue:o.criterion.value_end,"onUpdate:modelValue":l[9]||(l[9]=y=>o.criterion.value_end=y),class:"w-full"},null,8,["modelValue"])):e.createCommentVNode("",!0)])])])]),_:1},8,["visible","header"])}const Lo=fe(_g,[["render",m5]]),b5="pristy-config";class p5{getView(l){const a=xe();return xt.getConfig(a.INSTANCE_NAME,l).then(i=>i.jsonContent)}saveView(l,a){const i=xe();return xt.updateConfig(i.INSTANCE_NAME,l,a)}deleteView(l){const a=xe();return xt.updateConfig(a.INSTANCE_NAME,l,null)}async listViews(){return(await this.#e(["properties"])).filter(a=>a.name.startsWith("vue-")&&a.name.endsWith(".json")).map(a=>a.name)}async listViewEntries(){return(await this.#e(["properties","allowableOperations"])).filter(a=>a.name.startsWith("vue-")&&a.name.endsWith(".json"))}async#e(l){const a=xe();try{const o=(await He.listNodeChildren(b5,{include:l})).list.entries.find(s=>s.entry.name===a.INSTANCE_NAME);return o?(await He.listNodeChildren(o.entry.id,{include:l})).list.entries.map(s=>s.entry):[]}catch{return[]}}}const Pt=new p5,Gt=Vt.global.t,za="env-config.json",li="savedViews.json",q2={include:["aspectNames","isFavorite","properties","allowableOperations","permissions","path","isLocked"],maxItems:500,skipCount:0};class u5{async _getHiddenFolder(l,a=!1){const o=(await Ye.getHomeFolderFromUser(l)).list.entries[0].entry.properties["cm:homeFolder"];if(!o)throw new Error(Gt("vuesUtilisateurs.noUserHomeFound"));let s=(await Ye.getChildrenWithOpts(o,q2,!1)).children.find(r=>r.aspectNames&&r.aspectNames.includes("pm:hidden"));return!s&&a&&(console.warn("No hidden folder found, creating one..."),s=(await this.createConfigFolder(o)).entry),s}async _getOrCreateViewsFile(l,a=!1){let o=(await Ye.getChildrenWithOpts(l,q2,!0)).children.find(n=>n.name===li);if(!o&&a){console.warn(`No ${li} file found, creating one...`);const n={name:li,nodeType:"cm:content"},s={personalSavedView:[],globalFavoriteView:[]},r=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),m=(await ht.uploadFile(l,n,r)).entry;o=(await Ye.updateNode(m.id,{aspectNames:[...m.aspectNames||[],"pm:hidden"]})).entry}return o}async getContent(l,a,i){try{return await Ye.getVersionContent(l,a,i)}catch(o){throw console.error("Error getting content:",o.message),o}}async _parseFileContent(l){let a;try{const i=await this.getContent(l.id,l.properties["cm:versionLabel"],!0);a=await(n=>new Promise((s,r)=>{if(!(n instanceof Blob)){s(n);return}const c=new FileReader;c.onload=()=>s(c.result),c.onerror=m=>r(m),c.readAsText(n,"utf-8")}))(i)}catch(i){console.warn(`Could not get content for node ${l.id}, assuming empty.`,i.message),a=""}if(!a||a.trim()==="")return{personalSavedView:[],globalFavoriteView:[]};try{return JSON.parse(a)}catch(i){return console.error("Error parsing JSON content:",i),{personalSavedView:[],globalFavoriteView:[]}}}_normalizeFileContent(l){return Array.isArray(l)?{personalSavedView:l,globalFavoriteView:[]}:{personalSavedView:l?.personalSavedView||[],globalFavoriteView:l?.globalFavoriteView||[]}}async _loadViewsFileContent(){const l=mt().person;if(!l)throw new Error(Gt("vuesUtilisateurs.userNotFound"));const a=await this._getHiddenFolder(l.id,!1);if(!a)return null;const i=await this._getOrCreateViewsFile(a.id,!1);return i?this._parseFileContent(i):null}async getPersonalViews(){try{const l=await this._loadViewsFileContent();return l?l?.personalSavedView||[]:[]}catch(l){return console.error("Error loading personal views:",l.message),[]}}async getPersonalViewsAndGlobalFavorites(){try{const l=await this._loadViewsFileContent();return l?this._normalizeFileContent(l):{personalSavedView:[],globalFavoriteView:[]}}catch(l){return console.error("Error loading personal views:",l.message),{personalSavedView:[],globalFavoriteView:[]}}}async getGlobalViews(){try{const l=await Pt.listViews();return l.length===0?xe().SAVED_VIEWS_GLOBAL||[]:(await Promise.all(l.map(i=>Pt.getView(i).then(o=>({id:o.id||i.replace(/^vue-/,"").replace(/\.json$/,""),name:o.name||i,description:o.description||"",scope:"global",filename:i,config:o.config||{locations:[],criteria:[]}})).catch(()=>null)))).filter(i=>i!==null)}catch(l){return console.error("Error loading global views from config:",l),xe().SAVED_VIEWS_GLOBAL||[]}}async createConfigFolder(l){const a={aspectNames:["pm:hidden"],nodeType:"cm:folder",name:"Configuration"};try{return await Ye.createNode(l,a)}catch(i){throw console.error("Error while creating the Configuration folder :",i),i}}async _savePersonalView(l){const a=mt().person;if(!a)throw new Error(Gt("vuesUtilisateurs.userNotFound"));const i=await this._getHiddenFolder(a.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let n=await this._parseFileContent(o),s=this._normalizeFileContent(n);const r=s.personalSavedView;if(r.some(h=>h.id===l.id))throw new Error(Gt("vuesUtilisateurs.savedViewError.idAlreadyExists",{id:l.id}));if(r.some(h=>h.name.toLowerCase()===l.name.toLowerCase()))throw new Error(Gt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:l.name}));r.push(l),s.personalSavedView=r;const c=JSON.stringify(s,null,2),m=new Blob([c],{type:"application/json"});await Ye.updateContentNode(o.id,m,"MAJEURE",null)}async saveView(l){if(l.scope==="global")try{const a=await xt.getConfig(xe().INSTANCE_NAME,za),i=a.jsonContent.SAVED_VIEWS_GLOBAL||[];if(i.some(o=>o.id===l.id))throw new Error(Gt("vuesUtilisateurs.savedViewError.idAlreadyExists",{id:l.id}));if(i.some(o=>o.name.toLowerCase()===l.name.toLowerCase()))throw new Error(Gt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:l.name}));i.push(l),a.jsonContent.SAVED_VIEWS_GLOBAL=i,await xt.updateConfig(xe().INSTANCE_NAME,za,a.jsonContent)}catch(a){throw console.error("Error while saving the global view :",a),a}else l.scope==="user"&&await this._savePersonalView(l)}async _updatePersonalView(l){const a=mt().person;if(!a)throw new Error(Gt("vuesUtilisateurs.userNotFoundForUpdate"));const i=await this._getHiddenFolder(a.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let n=await this._parseFileContent(o),s=this._normalizeFileContent(n);const r=s.personalSavedView;if(r.some(b=>b.id!==l.id&&b.name.toLowerCase()===l.name.toLowerCase()))throw new Error(Gt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:l.name}));const c=r.findIndex(b=>b.id===l.id);if(c===-1)throw new Error(Gt("vuesUtilisateurs.savedViewError.personnalNotFound",{id:l.id}));r[c]=l,s.personalSavedView=r;const m=JSON.stringify(s,null,2),h=new Blob([m],{type:"application/json"});return await Ye.updateContentNode(o.id,h,"MAJEURE",null)}async updateView(l){if(l.scope==="global")try{const a=await xt.getConfig(xe().INSTANCE_NAME,za),i=a.jsonContent.SAVED_VIEWS_GLOBAL||[];if(i.some(n=>n.id!==l.id&&n.name.toLowerCase()===l.name.toLowerCase()))throw new Error(Gt("vuesUtilisateurs.savedViewError.nameAlreadyExists",{id:l.name}));const o=i.findIndex(n=>n.id===l.id);if(o===-1)throw new Error(Gt("vuesUtilisateurs.savedViewError.globalNotFound",{id:l.id}));return i[o]=l,a.jsonContent.SAVED_VIEWS_GLOBAL=i,await xt.updateConfig(xe().INSTANCE_NAME,za,a.jsonContent),l}catch(a){throw console.error("Error while updating the global view :",a),a}else if(l.scope==="user")return await this._updatePersonalView(l)}async _deletePersonalView(l){const a=mt().person;if(!a)throw new Error(Gt("vuesUtilisateurs.userNotFoundForDelete"));const i=await this._getHiddenFolder(a.id,!1);if(!i)throw new Error(Gt("vuesUtilisateurs.configFolderNotFound"));const o=await this._getOrCreateViewsFile(i.id,!1);if(!o)throw new Error(Gt("vuesUtilisateurs.configFileNotFound"));let n=await this._parseFileContent(o),s=this._normalizeFileContent(n);const r=s.personalSavedView;s.personalSavedView=r.filter(h=>h.id!==l.id);const c=JSON.stringify(s,null,2),m=new Blob([c],{type:"application/json"});await Ye.updateContentNode(o.id,m,"MAJEURE",null)}async deleteView(l){if(l.scope==="global"){try{const a=await xt.getConfig(xe().INSTANCE_NAME,za),i=a.jsonContent.SAVED_VIEWS_GLOBAL||[];a.jsonContent.SAVED_VIEWS_GLOBAL=i.filter(o=>o.id!==l.id),await xt.updateConfig(xe().INSTANCE_NAME,za,a.jsonContent)}catch(a){throw console.error("Error while deleting the global view :",a),a}return}else l.scope==="user"&&await this._deletePersonalView(l)}async getViewById(l,a){return l==="user"?(await this.getPersonalViews()).find(o=>o.id===a)||null:l==="global"?(await this.getGlobalViews()).find(o=>o.id===a)||null:(console.error(`Unknown view scope: ${l}`),null)}async toggleFavoriteStatus(l){if(l.scope==="global"){const a=mt().person;if(!a)throw new Error(Gt("vuesUtilisateurs.userNotFound"));const i=await this._getHiddenFolder(a.id,!0),o=await this._getOrCreateViewsFile(i.id,!0);let n=await this._parseFileContent(o),s=this._normalizeFileContent(n);const r=s.globalFavoriteView,c=r.findIndex(b=>b.id===l.id);c>-1?(r.splice(c,1),l.isFavorite=!1):(r.push({id:l.id,name:l.name}),l.isFavorite=!0),s.globalFavoriteView=r;const m=JSON.stringify(s,null,2),h=new Blob([m],{type:"application/json"});return await Ye.updateContentNode(o.id,h,"MAJEURE",null),l}else return l.isFavorite=!l.isFavorite,await this.updateView(l)}}const gl=new u5,ll=je.defineStore("userView",{state:()=>({locations:[],criteriaGroups:{rootOperator:"OR",groups:[]},loadedView:null,favoriteViews:[],personalViews:[],globalViews:[],viewsLoading:!0}),getters:{isSavedViewLoaded(t){return t.loadedView!==null},location(t){return t.locations.length>0?t.locations[0]:{type:null,value:""}},allCriteria(t){return t.criteriaGroups.groups.flatMap(l=>l.criteria)},criteria(t){return t.criteriaGroups.groups.flatMap(l=>l.criteria)}},actions:{loadView(t){if(!t||!t.config){console.error("Invalid saved view object provided to loadView",t);return}if(t.config.locations&&Array.isArray(t.config.locations))this.locations=t.config.locations;else if(t.config.location){const l=t.config.location;l.type&&l.value?this.locations=[{id:Date.now(),type:l.type,value:l.value,negation:l.negation||!1,label:l.label||l.value}]:this.locations=[]}else this.locations=[];if(t.config.criteriaGroups){const l=t.config.criteriaGroups;this.criteriaGroups={rootOperator:"OR",groups:(l.groups||[]).map(a=>({...a,operator:"AND"}))}}else t.config.criteria&&t.config.criteria.length>0?this.criteriaGroups={rootOperator:"OR",groups:[{id:"migrated",operator:"AND",criteria:t.config.criteria}]}:this.criteriaGroups={rootOperator:"OR",groups:[]};this.loadedView=t},addLocation(t){this.locations.push({...t,id:t.id||Date.now()})},removeLocation(t){this.locations.splice(t,1)},setLocation(t){t&&t.type&&t.value?this.locations=[{id:Date.now(),type:t.type,value:t.value,negation:t.negation||!1,label:t.label||t.value}]:this.locations=[]},setCriteria(t){t&&t.length>0?this.criteriaGroups={rootOperator:"OR",groups:[{id:String(Date.now()),operator:"AND",criteria:t}]}:this.criteriaGroups={rootOperator:"OR",groups:[]},this.loadedView=null},addGroup(t="AND"){this.criteriaGroups.groups.push({id:String(Date.now()),operator:t,criteria:[]})},removeGroup(t){this.criteriaGroups.groups.splice(t,1)},addCriterionToGroup(t,l){this.criteriaGroups.groups[t]&&this.criteriaGroups.groups[t].criteria.push(l)},removeCriterionFromGroup(t,l){this.criteriaGroups.groups[t]&&this.criteriaGroups.groups[t].criteria.splice(l,1)},updateCriterionInGroup(t,l,a){this.criteriaGroups.groups[t]&&this.criteriaGroups.groups[t].criteria.splice(l,1,a)},addCriterion(t){this.criteriaGroups.groups.length===0&&this.addGroup("AND"),this.criteriaGroups.groups[0].criteria.push(t)},removeCriterion(t){let l=t;for(const a of this.criteriaGroups.groups){if(l<a.criteria.length){a.criteria.splice(l,1);return}l-=a.criteria.length}},resetUserView(){this.locations=[],this.criteriaGroups={rootOperator:"OR",groups:[]},this.loadedView=null},async saveCurrentView(t){try{await gl.saveView(t),this.loadView(t)}catch(l){throw console.error("Error saving the current view:",l),l}},async updateCurrentView(t){try{const l=await gl.updateView(t);this.loadView(l.entry||l)}catch(l){throw console.error("Error updating the current view:",l),l}},async deleteCurrentView(){if(!this.loadedView)throw new Error("No view loaded to delete.");try{await gl.deleteView(this.loadedView),this.resetUserView()}catch(t){throw console.error("Error deleting the current view:",t),t}},async toggleViewFavorite(t){if(!t||!t.id)throw new Error("Invalid view provided to toggleFavorite action.");try{await gl.toggleFavoriteStatus(t),await this.fetchFavoriteViews()}catch(l){throw console.error("Error toggling favorite status in store:",l),l}},async fetchFavoriteViews(){this.viewsLoading=!0;try{const[t,l,a]=await Promise.all([gl.getPersonalViews(),gl.getGlobalViews(),gl.getPersonalViewsAndGlobalFavorites()]),i=a?.globalFavoriteView||[],o=(t||[]).filter(r=>r.isFavorite),n=(l||[]).filter(r=>i.some(c=>c.id===r.id));this.personalViews=t,this.globalViews=l;const s=r=>({label:r.name,to:`/vues/${r.scope}/${r.id}`});this.favoriteViews=[...o.map(s),...n.map(s)]}catch(t){console.error("Error fetching favorite views:",t),this.favoriteViews=[]}finally{this.viewsLoading=!1}},async fetchSavedViews(){this.viewsLoading=!0;try{const t=await Promise.allSettled([gl.getPersonalViews(),gl.getGlobalViews()]);t[0].status==="fulfilled"&&(this.personalViews=t[0].value),t[1].status==="fulfilled"&&(this.globalViews=t[1].value)}catch(t){console.error("Error fetching views:",t)}finally{this.viewsLoading=!1}}}}),Vo=je.defineStore({id:"SearchStore",state:()=>({language:"afts",userQuery:"",aftsQuery:"",fullQuery:"",paging:{maxItems:"15",skipCount:"0"},include:["properties","allowableOperations","permissions","path"],sort:null,defaultSort:[{type:"FIELD",field:"score",ascending:!1}],spellcheck:null,filterQueries:[],facetQueries:[],facets:[],fields:[],context:null,entries:[],pagination:{},isExactSearchActivated:!1}),getters:{facetFields(t){return{facetFields:t.facets}}},actions:{setIsExactSearchActivated(t){this.isExactSearchActivated=t},reset(){const t=xe();this.language="afts",this.userQuery="",this.fullQuery="",this.filterQueries=[...t.SEARCH_BASE_FILTER_QUERIES],this.facetQueries=[...t.SEARCH_FACET_QUERIES],this.facets=[...t.SEARCH_FACET],this.fields=[],this.context=null,this.entries=[],this.pagination={}},defineUserQuery(t){const l=xe();let a=null;this.isExactSearchActivated?a=l.SEARCH_USER_QUERY.replaceAll("*","").replaceAll("%s",t):(a=l.SEARCH_USER_QUERY.replaceAll("%s",t),a=a.replaceAll("**","*")),this.language="afts",this.userQuery=t,this.fullQuery=a},queryStore(t,l,a=null){if(!t)return Promise.resolve();const i=parseInt(this.paging.maxItems)||15;this.paging.skipCount=l?l*i:0,a?(this.fullQuery=a,this.userQuery=t):this.defineUserQuery(t);const o=a?[]:[...this.filterQueries];for(const s of this.fields)o.some(r=>r.query===s.query)||o.push({query:s.query});o.some(s=>s.query==="-ASPECT:'pm:hidden'")||o.push({query:"-ASPECT:'pm:hidden'"});let n={query:{language:this.language,query:this.fullQuery},include:this.include,paging:this.paging,filterQueries:o.map(s=>({query:s.query})),facetQueries:this.facetQueries,facetFields:{facets:this.facets.map(s=>({field:s.field,mincount:s.mincount,label:s.label}))},sort:this.sort||this.defaultSort,facetFormat:"V2"};return Ht.search(n).then(s=>{this.context=s.list.context,l>0?this.entries=[...this.entries,...s.list.entries]:this.entries=s.list.entries,this.pagination=s.list.pagination})},searchForExport(t){let l={...this.paging};l.maxItems=t;const a=[...this.filterQueries];for(const o of this.fields)a.some(n=>n.query===o.query)||a.push({query:o.query});a.some(o=>o.query==="-ASPECT:'pm:hidden'")||a.push({query:"-ASPECT:'pm:hidden'"});let i={query:{language:this.language,query:this.fullQuery},include:this.include,paging:l,filterQueries:a.map(o=>({query:o.query})),facetQueries:this.facetQueries,facetFields:{facets:this.facets.map(o=>({field:o.field,mincount:o.mincount,label:o.label}))},sort:this.sort||this.defaultSort,facetFormat:"V2"};return Ht.search(i).then(o=>o)},addSortField(t){this.sort=t},removeSortField(){this.sort=null},addFilterQuery(t){return t.query?this.filterQueries.find(l=>l.query===t.query)?!1:(this.filterQueries.push({query:t.query,label:t.label}),!0):!1},removeFilterQuery(t){this.filterQueries=this.filterQueries.filter(l=>t.query.startsWith("(SITE:")&&l.label&&(l.label.startsWith("Dossier :")||l.label.startsWith("Folder :"))?!1:l.query!==t.query)},addField(t){return this.fields.find(l=>l.query===t.query)?!1:(this.fields.push({query:t.query,label:t.label}),!0)},removeField(t){this.fields=this.fields.filter(l=>l.query!==t.query)}}}),h5={name:"ExactSearch",components:{PrimeToggleButton:Qm},props:{disabled:{type:Boolean,default:!1}},watch:{disabled(t){t&&this.exactSearch&&(this.exactSearch=!1)}},emits:["change-exact-search-settings"],computed:{...je.mapState(Vo,["isExactSearchActivated"]),exactSearch:{get(){return this.isExactSearchActivated},set(t){this.setIsExactSearchActivated(t),this.$emit("change-exact-search-settings",t)}}},methods:{...je.mapActions(Vo,["setIsExactSearchActivated"])}},y5={id:"exactSearch",class:"flex gap-3 p-3 rounded-2xl"},Z5={class:"text-gray-700 font-medium align-content-center"};function g5(t,l,a,i,o,n){const s=e.resolveComponent("PrimeToggleButton");return e.openBlock(),e.createElementBlock("div",y5,[e.createElementVNode("span",Z5,e.toDisplayString(t.$t("exactSearch")),1),e.createVNode(s,{modelValue:n.exactSearch,"onUpdate:modelValue":l[0]||(l[0]=r=>n.exactSearch=r),binary:"",onLabel:t.$t("enabled"),offLabel:t.$t("disabled"),class:"rounded-xl",disabled:a.disabled},null,8,["modelValue","onLabel","offLabel","disabled"])])}const ai=fe(h5,[["render",g5]]),f5={name:"UserViewsFavoritesPanel",components:{PrimeSelect:Dt},props:{globalOnly:{type:Boolean,default:!1}},data(){return{selectedPersonalSearch:null,selectedGlobalSearch:null}},mounted(){this.fetchSavedViews()},computed:{...je.mapState(ll,{loadedView:"loadedView",personalViews:"personalViews",globalViews:"globalViews",loading:"viewsLoading"}),hasGroupedSearches(){return this.globalOnly?this.globalViews.length>0:this.personalViews.length>0||this.globalViews.length>0}},emits:["load-view"],methods:{...je.mapActions(ll,["fetchSavedViews"]),onDropdownChange(t){t.value&&(this.selectView(t.value),this.$nextTick(()=>{this.selectedPersonalSearch=null,this.selectedGlobalSearch=null}))},selectView(t){this.$emit("load-view",t)}}},W5={key:0,class:"text-center p-3"},N5={key:1,class:"text-center text-gray-500 p-3"},A5={key:2},Y5={class:"flex flex-column gap-4"},z5={key:0,class:"flex flex-column gap-2"},M5={for:"personal-searches-dropdown"},X5={class:"flex flex-column align-items-start w-30rem overflow-hidden"},O5={class:"font-bold"},w5={key:0,class:"text-color-secondary w-full overflow-hidden text-overflow-ellipsis white-space-nowrap block"},k5={key:1,class:"flex flex-column gap-2"},C5={for:"global-searches-dropdown"},T5={class:"flex flex-column align-items-start w-30rem overflow-hidden"},I5={class:"font-bold"},j5={key:0,class:"text-color-secondary w-full overflow-hidden text-overflow-ellipsis white-space-nowrap block"};function G5(t,l,a,i,o,n){const s=e.resolveComponent("PrimeSelect"),r=e.resolveDirective("tooltip");return t.loading?(e.openBlock(),e.createElementBlock("div",W5,[...l[2]||(l[2]=[e.createElementVNode("i",{class:"ri-loader-4-line ri-spin text-4xl"},null,-1)])])):n.hasGroupedSearches?(e.openBlock(),e.createElementBlock("div",A5,[e.createElementVNode("div",Y5,[!a.globalOnly&&t.personalViews.length>0?(e.openBlock(),e.createElementBlock("div",z5,[e.createElementVNode("label",M5,e.toDisplayString(t.$t("vuesFavorites.personalViews")),1),e.createVNode(s,{id:"personal-searches-dropdown",modelValue:o.selectedPersonalSearch,"onUpdate:modelValue":l[0]||(l[0]=c=>o.selectedPersonalSearch=c),options:t.personalViews,optionLabel:"name",placeholder:t.$t("vuesFavorites.selectPersonalView"),onChange:n.onDropdownChange,filter:"",filterBy:["name","description"],filterPlaceholder:t.$t("vuesFavorites.filterSavedViews")},{option:e.withCtx(c=>[e.createElementVNode("div",X5,[e.createElementVNode("div",O5,e.toDisplayString(c.option.name),1),c.option.description?e.withDirectives((e.openBlock(),e.createElementBlock("small",w5,[e.createTextVNode(e.toDisplayString(c.option.description),1)])),[[r,c.option.description,void 0,{left:!0}]]):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder","onChange","filterPlaceholder"])])):e.createCommentVNode("",!0),t.globalViews.length>0?(e.openBlock(),e.createElementBlock("div",k5,[e.createElementVNode("label",C5,e.toDisplayString(t.$t("vuesFavorites.globalViews")),1),e.createVNode(s,{id:"global-searches-dropdown",modelValue:o.selectedGlobalSearch,"onUpdate:modelValue":l[1]||(l[1]=c=>o.selectedGlobalSearch=c),options:t.globalViews,optionLabel:"name",placeholder:t.$t("vuesFavorites.selectGlobalView"),onChange:n.onDropdownChange,filter:"",filterBy:["name","description"],filterPlaceholder:t.$t("vuesFavorites.filterSavedViews")},{option:e.withCtx(c=>[e.createElementVNode("div",T5,[e.createElementVNode("div",I5,e.toDisplayString(c.option.name),1),c.option.description?e.withDirectives((e.openBlock(),e.createElementBlock("small",j5,[e.createTextVNode(e.toDisplayString(c.option.description),1)])),[[r,c.option.description,void 0,{left:!0}]]):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder","onChange","filterPlaceholder"])])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",N5,e.toDisplayString(t.$t("vuesFavorites.noSavedViews")),1))}const vo=fe(f5,[["render",G5],["__scopeId","data-v-8a1b9530"]]),D5={name:"SaveViewPopup",components:{PrimeDialog:pt,PrimeStepper:Ji,PrimeStepList:Ei,PrimeStep:Bi,PrimeStepPanels:Pm,PrimeStepPanel:_m,PrimeInputText:_e,PrimeInputGroup:uo,PrimeInputGroupAddon:Ra,PrimeTextarea:zl,PrimeSelectButton:Fl,PrimeButton:de},props:{visible:Boolean,errorMessage:{type:String,default:null},viewData:{type:Object,default:null},globalOnly:{type:Boolean,default:!1}},emits:["update:visible","save-view","clear-error"],data(){return{currentStep:"1",viewName:"",viewDescription:"",viewFileId:"",scope:"user"}},mounted(){this.checkPristyAdminStatus()},computed:{...je.mapState(mt,["isPristyAdmin"]),isEditMode(){return!!this.viewData},showScopeStep(){return this.isPristyAdmin&&!this.globalOnly},fileIdStep(){return this.showScopeStep?"2":"1"},detailsStep(){return this.showScopeStep?"3":"2"},scopeOptions(){const t=[{label:this.$t("vuesUtilisateurs.saveViewPopup.scopeUser"),value:"user"}];return this.isPristyAdmin&&t.push({label:this.$t("vuesUtilisateurs.saveViewPopup.scopeGlobal"),value:"global"}),t},isFormValid(){return!(!this.viewName||this.scope==="global"&&!this.viewFileId)}},methods:{...je.mapActions(mt,["checkPristyAdminStatus"]),save(){if(!this.isFormValid)return;const t={name:this.viewName,description:this.viewDescription,scope:this.scope};if(this.scope==="global"){const l=this.viewFileId.toLowerCase().replace(/[^a-z0-9-]/g,"-");t.filename=`vue-${l}.json`}this.$emit("save-view",t)},resetForm(){this.viewName="",this.viewDescription="",this.viewFileId="",this.scope=this.globalOnly?"global":"user",this.currentStep=this.globalOnly?this.fileIdStep:"1",this.$emit("clear-error")},populateForm(){this.isEditMode?(this.viewName=this.viewData.name,this.viewDescription=this.viewData.description||"",this.scope=this.globalOnly?"global":this.viewData.scope,this.viewData.filename&&(this.viewFileId=this.viewData.filename.replace(/^vue-/,"").replace(/\.json$/,"")),this.currentStep=this.detailsStep):(this.scope=this.globalOnly?"global":"user",this.currentStep=this.globalOnly?this.fileIdStep:"1")}},watch:{visible(t){t?this.populateForm():this.resetForm()}}},L5={class:"flex flex-column gap-3 py-3"},V5={class:"m-0 text-gray-600"},v5={class:"flex justify-content-end pt-3"},F5={class:"flex flex-column gap-3 py-3"},R5={key:0,class:"m-0 text-gray-600"},S5={key:2,class:"m-0 text-gray-600"},x5={class:"flex justify-content-between pt-3"},U5={key:1},J5={class:"flex flex-column gap-3 py-3"},E5={class:"flex flex-column gap-1"},B5={class:"font-semibold"},H5={key:0,class:"p-error"},Q5={key:1,class:"p-error"},P5={class:"flex flex-column gap-1"},_5={class:"font-semibold"},K5={class:"flex justify-content-between pt-3"};function $5(t,l,a,i,o,n){const s=e.resolveComponent("PrimeStep"),r=e.resolveComponent("PrimeStepList"),c=e.resolveComponent("PrimeSelectButton"),m=e.resolveComponent("PrimeButton"),h=e.resolveComponent("PrimeStepPanel"),b=e.resolveComponent("PrimeInputGroupAddon"),p=e.resolveComponent("PrimeInputText"),d=e.resolveComponent("PrimeInputGroup"),W=e.resolveComponent("PrimeTextarea"),Z=e.resolveComponent("PrimeStepPanels"),N=e.resolveComponent("PrimeStepper"),y=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(y,{visible:a.visible,"onUpdate:visible":l[6]||(l[6]=A=>t.$emit("update:visible",A)),modal:"",header:n.isEditMode?t.$t("vuesUtilisateurs.modifyViewPopup.title"):t.$t("vuesUtilisateurs.saveViewPopup.title"),style:{width:"550px",maxWidth:"95vw"}},{default:e.withCtx(()=>[e.createVNode(N,{value:o.currentStep,"onUpdate:value":l[5]||(l[5]=A=>o.currentStep=A),linear:""},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[n.showScopeStep?(e.openBlock(),e.createBlock(s,{key:0,value:"1"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.scopeLabel")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(s,{value:n.fileIdStep},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.fileIdLabel")),1)]),_:1},8,["value"]),e.createVNode(s,{value:n.detailsStep},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.detailsLabel")),1)]),_:1},8,["value"])]),_:1}),e.createVNode(Z,null,{default:e.withCtx(()=>[n.showScopeStep?(e.openBlock(),e.createBlock(h,{key:0,value:"1"},{default:e.withCtx(({activateCallback:A})=>[e.createElementVNode("div",L5,[e.createElementVNode("p",V5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.scopeDescription")),1),e.createVNode(c,{modelValue:o.scope,"onUpdate:modelValue":l[0]||(l[0]=f=>o.scope=f),options:n.scopeOptions,optionLabel:"label",optionValue:"value",disabled:n.isEditMode},null,8,["modelValue","options","disabled"])]),e.createElementVNode("div",v5,[e.createVNode(m,{label:t.$t("next"),icon:"ri-arrow-right-line",iconPos:"right",onClick:f=>A(n.fileIdStep),disabled:!o.scope},null,8,["label","onClick","disabled"])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h,{value:n.fileIdStep},{default:e.withCtx(({activateCallback:A})=>[e.createElementVNode("div",F5,[o.scope==="global"?(e.openBlock(),e.createElementBlock("p",R5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.fileIdDescription")),1)):e.createCommentVNode("",!0),o.scope==="global"?(e.openBlock(),e.createBlock(d,{key:1},{default:e.withCtx(()=>[e.createVNode(b,null,{default:e.withCtx(()=>[...l[7]||(l[7]=[e.createTextVNode("vue-",-1)])]),_:1}),e.createVNode(p,{modelValue:o.viewFileId,"onUpdate:modelValue":l[1]||(l[1]=f=>o.viewFileId=f),modelModifiers:{trim:!0},placeholder:t.$t("vuesUtilisateurs.saveViewPopup.fileIdPlaceholder"),disabled:n.isEditMode},null,8,["modelValue","placeholder","disabled"]),e.createVNode(b,null,{default:e.withCtx(()=>[...l[8]||(l[8]=[e.createTextVNode(".json",-1)])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("p",S5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.personalDescription")),1))]),e.createElementVNode("div",x5,[n.showScopeStep?(e.openBlock(),e.createBlock(m,{key:0,label:t.$t("previous"),icon:"ri-arrow-left-line",severity:"secondary",onClick:f=>A("1")},null,8,["label","onClick"])):(e.openBlock(),e.createElementBlock("span",U5)),e.createVNode(m,{label:t.$t("next"),icon:"ri-arrow-right-line",iconPos:"right",onClick:f=>A(n.detailsStep),disabled:o.scope==="global"&&!o.viewFileId},null,8,["label","onClick","disabled"])])]),_:1},8,["value"]),e.createVNode(h,{value:n.detailsStep},{default:e.withCtx(({activateCallback:A})=>[e.createElementVNode("div",J5,[e.createElementVNode("div",E5,[e.createElementVNode("label",B5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.nameLabel")),1),e.createVNode(p,{modelValue:o.viewName,"onUpdate:modelValue":l[2]||(l[2]=f=>o.viewName=f),modelModifiers:{trim:!0},class:e.normalizeClass({"p-invalid":a.errorMessage}),onInput:l[3]||(l[3]=f=>t.$emit("clear-error"))},null,8,["modelValue","class"]),!o.viewName&&!a.errorMessage?(e.openBlock(),e.createElementBlock("small",H5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.nameRequired")),1)):e.createCommentVNode("",!0),a.errorMessage?(e.openBlock(),e.createElementBlock("small",Q5,e.toDisplayString(a.errorMessage),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",P5,[e.createElementVNode("label",_5,e.toDisplayString(t.$t("vuesUtilisateurs.saveViewPopup.descriptionLabel")),1),e.createVNode(W,{modelValue:o.viewDescription,"onUpdate:modelValue":l[4]||(l[4]=f=>o.viewDescription=f),rows:"3",autoResize:""},null,8,["modelValue"])])]),e.createElementVNode("div",K5,[e.createVNode(m,{label:t.$t("previous"),icon:"ri-arrow-left-line",severity:"secondary",onClick:f=>A(n.fileIdStep)},null,8,["label","onClick"]),e.createVNode(m,{label:n.isEditMode?t.$t("vuesUtilisateurs.modifyView"):t.$t("vuesUtilisateurs.saveView"),icon:"ri-save-3-line",onClick:n.save,disabled:!n.isFormValid},null,8,["label","onClick","disabled"])])]),_:1},8,["value"])]),_:1})]),_:1},8,["value"])]),_:1},8,["visible","header"])}const Fo=fe(D5,[["render",$5]]),q5={name:"AdvancedSearchPanel",components:{ExactSearch:ai,PrimeAccordion:Ri,PrimeAccordionPanel:Si,PrimeAccordionHeader:xi,PrimeAccordionContent:Ui,UserViewsFavoritesPanel:vo,PrimeSelectButton:Fl,PrimeInputText:_e,PrimeButton:de,AddCriterionPopup:Lo,SaveViewPopup:Fo,PrimeDialog:pt,TreeExplorer:aa},emits:["change-exact-search-settings","load-view"],watch:{"location.type"(t){t||this.updateLocationValue("")}},data(){return{isAddCriterionDialogVisible:!1,saveViewDialogVisible:!1,saveViewDialogMode:"create",saveViewError:null,isDossierTreeVisible:!1,isDeleteConfirmVisible:!1}},mounted(){this.checkPristyAdminStatus()},computed:{...je.mapState(mt,["isPristyAdmin"]),...je.mapState(ll,["location","criteria","loadedView"]),locationModel:{get(){return this.location},set(t){this.setLocation(t)}},locationOptions(){return[{label:this.$t("vuesUtilisateurs.locationSite"),value:"Site"},{label:this.$t("folder"),value:"Folder"}]},locationPlaceholder(){return this.locationModel.type==="Site"?this.$t("vuesUtilisateurs.sitePlaceholder"):this.locationModel.type==="Folder"?this.$t("vuesUtilisateurs.folderPlaceholder"):""},hasActiveCriteria(){const t=this.location&&this.location.type&&this.location.value;return!!(this.criteria&&this.criteria.length>0||t)},isSavedViewLoaded(){return this.loadedView!==null},canManageLoadedView(){return this.isSavedViewLoaded?this.loadedView.scope==="user"?!0:this.loadedView.scope==="global"?this.isPristyAdmin:!1:!1},viewToEdit(){return this.saveViewDialogMode==="edit"?this.loadedView:null},availableProperties(){return xe().METADATA.filter(l=>l.display&&(l.display.includes("view")||l.display.includes("advancedSearch")))}},methods:{...je.mapActions(mt,["checkPristyAdminStatus"]),...je.mapActions(ll,["setLocation","addCriterion","removeCriterion","saveCurrentView","updateCurrentView","deleteCurrentView"]),clearSaveViewError(){this.saveViewError=null},handleDossierSelected(t){this.updateLocationValue(t.id),this.isDossierTreeVisible=!1},openSaveViewPopup(){this.saveViewDialogMode="create",this.saveViewDialogVisible=!0},modifyView(){this.saveViewDialogMode="edit",this.saveViewDialogVisible=!0},deleteView(){this.isDeleteConfirmVisible=!0},async handleDeleteConfirmation(){this.isDeleteConfirmVisible=!1;try{await this.deleteCurrentView(),this.$toast.add({severity:"success",summary:"Succès",detail:"Recherche supprimée avec succès.",life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews()}catch(t){this.$toast.add({severity:"error",summary:"Erreur",detail:t.message,life:5e3})}},async handleSaveView(t){this.clearSaveViewError();const l=this.saveViewDialogMode==="create";let a,i,o;const n={location:JSON.parse(JSON.stringify(this.location)),criteria:JSON.parse(JSON.stringify(this.criteria))};l?(a=this.saveCurrentView,o="vuesUtilisateurs.addsSavedViewSuccess",i={id:crypto.randomUUID(),name:t.name,description:t.description,scope:t.scope,config:n}):(a=this.updateCurrentView,o="vuesUtilisateurs.modifySavedViewSuccess",i={...this.loadedView,name:t.name,description:t.description,config:n});try{await a(i),this.$toast.add({severity:"success",summary:"Succès",detail:this.$t(o),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1}catch(s){this.$toast.add({severity:"error",summary:"Erreur",detail:s.message,life:5e3})}},handleLoadView(t){this.$emit("load-view",t)},updateLocationValue(t){let l=t;this.locationModel.type==="Folder"&&t&&!t.startsWith("workspace://")&&(l=`workspace://SpacesStore/${t}`),this.setLocation({...this.locationModel,value:l})},handleCriterionAdded(t){this.addCriterion(t)},formatCriterionValueForDisplay(t){if(t.value===null||t.value===void 0)return"";if(t.operator==="range"){const l=t.value instanceof Date?new Date(t.value).toLocaleDateString():t.value||"*",a=t.value_end instanceof Date?new Date(t.value_end).toLocaleDateString():t.value_end||"*";return`[${l} -> ${a}]`}else return t.value instanceof Date?new Date(t.value).toLocaleDateString():typeof t.value=="boolean"?this.$t(t.value?"true":"false"):`"${t.value}"`}}},ef={key:0,class:"p-2 mb-3 border-1 border-round border-blue-200 bg-blue-50 text-blue-700"},tf={class:"font-bold"},lf={class:"p-fluid formgrid grid"},af={class:"field col-12"},of={for:"locationType"},nf={key:0,class:"field col-12"},sf={for:"locationValue"},rf={key:0,id:"username-help"},cf={class:"mt-4"},df={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round"},mf={key:1,class:"flex flex-column gap-2"},bf={class:"flex-grow-1"},pf={class:"font-bold mr-1"},uf={class:"font-italic mr-1"},hf={class:"text-gray-700"},yf={key:3,class:"flex gap-2 mt-2"},Zf={class:"flex align-items-center"},gf={key:0};function ff(t,l,a,i,o,n){const s=e.resolveComponent("ExactSearch"),r=e.resolveComponent("PrimeAccordionHeader"),c=e.resolveComponent("UserViewsFavoritesPanel"),m=e.resolveComponent("PrimeAccordionContent"),h=e.resolveComponent("PrimeAccordionPanel"),b=e.resolveComponent("PrimeSelectButton"),p=e.resolveComponent("PrimeInputText"),d=e.resolveComponent("PrimeButton"),W=e.resolveComponent("PrimeAccordion"),Z=e.resolveComponent("AddCriterionPopup"),N=e.resolveComponent("SaveViewPopup"),y=e.resolveComponent("TreeExplorer"),A=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(s,{onChangeExactSearchSettings:l[0]||(l[0]=f=>t.$emit("change-exact-search-settings",f)),disabled:n.hasActiveCriteria||n.isSavedViewLoaded},null,8,["disabled"]),e.createVNode(W,{class:"mt-4",multiple:"",value:["0"]},{default:e.withCtx(()=>[e.createVNode(h,{value:"0"},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesFavorites.title")),1)]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(c,{ref:"savedSearchesPanel",onLoadView:n.handleLoadView},null,8,["onLoadView"])]),_:1})]),_:1}),e.createVNode(h,{value:"1"},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.queryBuilder")),1)]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[n.isSavedViewLoaded?(e.openBlock(),e.createElementBlock("div",ef,[e.createTextVNode(e.toDisplayString(t.$t("vuesUtilisateurs.loadedViewMessage"))+" ",1),e.createElementVNode("span",tf,e.toDisplayString(t.loadedView.name),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",lf,[e.createElementVNode("div",af,[e.createElementVNode("label",of,e.toDisplayString(t.$t("vuesUtilisateurs.locationLabel")),1),e.createVNode(b,{id:"locationType",modelValue:n.locationModel.type,"onUpdate:modelValue":l[1]||(l[1]=f=>n.locationModel.type=f),options:n.locationOptions,optionLabel:"label",optionValue:"value",allowEmpty:"",class:"w-full"},null,8,["modelValue","options"])]),n.locationModel.type?(e.openBlock(),e.createElementBlock("div",nf,[e.createElementVNode("label",sf,e.toDisplayString(t.$t("vuesUtilisateurs.valueLabel")),1),e.createVNode(p,{id:"locationValue",value:n.locationModel.value,placeholder:n.locationPlaceholder,onClick:l[2]||(l[2]=f=>n.locationModel.type==="Folder"?o.isDossierTreeVisible=!0:null),onChange:l[3]||(l[3]=f=>n.updateLocationValue(f.target.value))},null,8,["value","placeholder"]),n.locationModel.type==="Folder"?(e.openBlock(),e.createElementBlock("small",rf,"Ex: workspace://SpacesStore/{ID du dossier}")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",cf,[e.createElementVNode("h5",null,e.toDisplayString(t.$t("vuesUtilisateurs.criteriaTitle")),1),t.criteria.length===0?(e.openBlock(),e.createElementBlock("div",df,e.toDisplayString(t.$t("vuesUtilisateurs.noCriteria")),1)):(e.openBlock(),e.createElementBlock("div",mf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.criteria,(f,Y)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:"flex align-items-center p-2 border-1 border-round border-gray-200"},[e.createElementVNode("div",bf,[e.createElementVNode("span",pf,e.toDisplayString(t.$t(f.property.labelId)),1),e.createElementVNode("span",{class:e.normalizeClass([f.negation?"text-red-500":"text-primary","mx-1"])},e.toDisplayString(f.negation?t.$t("vuesUtilisateurs.mustNotContain"):t.$t("vuesUtilisateurs.mustContain")),3),e.createElementVNode("span",uf,e.toDisplayString(t.$t(f.operatorLabelKey)),1),e.createElementVNode("span",hf,e.toDisplayString(n.formatCriterionValueForDisplay(f)),1)]),e.createVNode(d,{icon:"ri-delete-bin-line","aria-label":t.$t("delete"),text:"",rounded:"",severity:"danger",onClick:X=>t.removeCriterion(Y)},null,8,["aria-label","onClick"])]))),128))])),e.createVNode(d,{icon:"ri-add-line",label:t.$t("vuesUtilisateurs.addCriterionButton"),onClick:l[4]||(l[4]=f=>o.isAddCriterionDialogVisible=!0),class:"mt-3 w-full",outlined:""},null,8,["label"]),n.hasActiveCriteria?(e.openBlock(),e.createBlock(d,{key:2,icon:"ri-save-3-line",label:t.$t("vuesUtilisateurs.saveView"),onClick:n.openSaveViewPopup,class:"mt-3 w-full"},null,8,["label","onClick"])):e.createCommentVNode("",!0),n.canManageLoadedView?(e.openBlock(),e.createElementBlock("div",yf,[e.createVNode(d,{icon:"ri-pencil-line",label:t.$t("vuesUtilisateurs.modifyView"),onClick:n.modifyView,class:"w-full",severity:"secondary"},null,8,["label","onClick"]),e.createVNode(d,{icon:"ri-delete-bin-line",label:t.$t("vuesUtilisateurs.deleteView"),onClick:n.deleteView,class:"w-full",severity:"danger"},null,8,["label","onClick"])])):e.createCommentVNode("",!0)])]),_:1})]),_:1})]),_:1}),e.createVNode(Z,{visible:o.isAddCriterionDialogVisible,"onUpdate:visible":l[5]||(l[5]=f=>o.isAddCriterionDialogVisible=f),properties:n.availableProperties,onAddCriterion:n.handleCriterionAdded},null,8,["visible","properties","onAddCriterion"]),e.createVNode(N,{visible:o.saveViewDialogVisible,"onUpdate:visible":l[6]||(l[6]=f=>o.saveViewDialogVisible=f),"view-data":n.viewToEdit,"error-message":o.saveViewError,onSaveView:n.handleSaveView,onClearError:n.clearSaveViewError},null,8,["visible","view-data","error-message","onSaveView","onClearError"]),e.createVNode(A,{visible:o.isDossierTreeVisible,"onUpdate:visible":l[7]||(l[7]=f=>o.isDossierTreeVisible=f),header:"Choisir un dossier",modal:"",class:"w-full md:w-6"},{default:e.withCtx(()=>[e.createVNode(y,{"current-node":null,showUserHome:"",onSelectNode:n.handleDossierSelected},null,8,["onSelectNode"])]),_:1},8,["visible"]),e.createVNode(A,{visible:o.isDeleteConfirmVisible,"onUpdate:visible":l[9]||(l[9]=f=>o.isDeleteConfirmVisible=f),header:"Confirmation de suppression",modal:"",class:"dialog-confirm-delete"},{footer:e.withCtx(()=>[e.createVNode(d,{label:t.$t("no"),icon:"ri-close-line",onClick:l[8]||(l[8]=f=>o.isDeleteConfirmVisible=!1),class:"p-button-text"},null,8,["label"]),e.createVNode(d,{label:t.$t("yes"),icon:"ri-check-line",onClick:n.handleDeleteConfirmation,class:"p-button-danger",autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",Zf,[l[10]||(l[10]=e.createElementVNode("i",{class:"ri-alert-line mr-3 text-4xl","aria-hidden":"true"},null,-1)),t.loadedView?(e.openBlock(),e.createElementBlock("span",gf,e.toDisplayString(t.$t("vuesUtilisateurs.confirmDelete",{name:t.loadedView.name})),1)):e.createCommentVNode("",!0)])]),_:1},8,["visible"])],64)}const em=fe(q5,[["render",ff]]),Wf={name:"AdvancedViewPanel",components:{PrimeAccordion:Ri,PrimeAccordionPanel:Si,PrimeAccordionHeader:xi,PrimeAccordionContent:Ui,UserViewsFavoritesPanel:vo,PrimeSelectButton:Fl,PrimeInputText:_e,PrimeAutoComplete:Gi,PrimeButton:de,AddCriterionPopup:Lo,SaveViewPopup:Fo,PrimeDialog:pt,TreeExplorer:aa},props:{globalOnly:{type:Boolean,default:!1},showUserHome:{type:Boolean,default:!0},hideViewSelector:{type:Boolean,default:!1},canEditLoadedView:{type:Boolean,default:!1}},emits:["change-exact-search-settings","load-view","close-view","view-saved"],data(){return{isAddCriterionDialogVisible:!1,isAddLocationDialogVisible:!1,saveViewDialogVisible:!1,saveViewDialogMode:"create",saveViewError:null,isDossierTreeVisible:!1,isDeleteConfirmVisible:!1,availableSites:[],filteredSites:[],newLocation:{type:null,value:"",negation:!1,label:""},newLocationSiteInput:null,editingCriterion:null,editingGroupIndex:null,editingCriterionIndex:null,targetGroupIndex:null}},watch:{isAddCriterionDialogVisible(t){t||(this.editingCriterion=null,this.editingGroupIndex=null,this.editingCriterionIndex=null,this.targetGroupIndex=null)}},async mounted(){this.checkPristyAdminStatus(),await this.loadSites()},computed:{...je.mapState(mt,["isPristyAdmin"]),...je.mapState(ll,["locations","criteriaGroups","allCriteria","loadedView"]),locationOptions(){return[{label:this.$t("rechercheAvancee.locationSite"),value:"Site"},{label:this.$t("folder"),value:"Folder"}]},conditionOptions(){return[{label:this.$t("rechercheAvancee.includePrefix"),value:!1},{label:this.$t("rechercheAvancee.excludePrefix"),value:!0}]},hasActiveCriteria(){return!!(this.allCriteria&&this.allCriteria.length>0||this.locations.length>0)},isSavedViewLoaded(){return this.loadedView!==null},canManageLoadedView(){return this.isSavedViewLoaded?this.canEditLoadedView||this.loadedView.scope==="user"?!0:this.loadedView.scope==="global"?this.isPristyAdmin:!1:!1},viewToEdit(){return this.saveViewDialogMode==="edit"?this.loadedView:null},availableProperties(){return xe().METADATA.filter(l=>l.display&&l.display.includes("view"))}},methods:{...je.mapActions(mt,["checkPristyAdminStatus"]),...je.mapActions(ll,["addLocation","removeLocation","addGroup","removeGroup","addCriterionToGroup","removeCriterionFromGroup","updateCriterionInGroup","saveCurrentView","updateCurrentView","deleteCurrentView"]),removeLocationAtIndex(t){this.removeLocation(t)},resetNewLocation(){this.newLocation={type:null,value:"",negation:!1,label:""},this.newLocationSiteInput=null},confirmAddLocation(){!this.newLocation.type||!this.newLocation.value||(this.addLocation({...this.newLocation}),this.isAddLocationDialogVisible=!1,this.resetNewLocation())},handleNewLocationSiteSelect(t){const l=t.value;l&&l.id&&(this.newLocation.value=l.id,this.newLocation.label=l.title)},clearSaveViewError(){this.saveViewError=null},handleDossierSelected(t){if(this.isAddLocationDialogVisible){const l=t.id.startsWith("workspace://")?t.id:`workspace://SpacesStore/${t.id}`;this.newLocation.value=l,this.newLocation.label=t.name||l}this.isDossierTreeVisible=!1},openSaveViewPopup(){this.saveViewDialogMode="create",this.saveViewDialogVisible=!0},modifyView(){this.saveViewDialogMode="edit",this.saveViewDialogVisible=!0},deleteView(){this.isDeleteConfirmVisible=!0},async handleDeleteConfirmation(){this.isDeleteConfirmVisible=!1;try{await this.deleteCurrentView(),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("rechercheAvancee.deleteViewSuccess"),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews()}catch(t){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:t.message,life:5e3})}},async handleSaveView(t){this.clearSaveViewError();const l={locations:JSON.parse(JSON.stringify(this.locations)),criteriaGroups:JSON.parse(JSON.stringify(this.criteriaGroups))};if(t.scope==="global"){try{const s={id:t.filename.replace(/^vue-/,"").replace(/\.json$/,""),name:t.name,description:t.description,config:l};await Pt.saveView(t.filename,s),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t("rechercheAvancee.addsSavedViewSuccess"),life:3e3}),this.$refs.savedSearchesPanel&&this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1,this.$emit("view-saved",{filename:t.filename,name:t.name,description:t.description})}catch(s){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:s.message,life:5e3})}return}const a=this.saveViewDialogMode==="create";let i,o,n;a?(i=this.saveCurrentView,n="rechercheAvancee.addsSavedViewSuccess",o={id:crypto.randomUUID(),name:t.name,description:t.description,scope:t.scope,config:l}):(i=this.updateCurrentView,n="rechercheAvancee.modifySavedViewSuccess",o={...this.loadedView,name:t.name,description:t.description,config:l});try{await i(o),this.$toast.add({severity:"success",summary:this.$t("success"),detail:this.$t(n),life:3e3}),this.$refs.savedSearchesPanel.fetchSavedViews(),this.saveViewDialogVisible=!1}catch(s){this.$toast.add({severity:"error",summary:this.$t("error.error"),detail:s.message,life:5e3})}},handleLoadView(t){this.$emit("load-view",t)},handleAddFirstCriterion(){this.addGroup("AND"),this.targetGroupIndex=0,this.editingCriterion=null,this.isAddCriterionDialogVisible=!0},handleAddGroup(){this.addGroup("AND")},openAddCriterionForGroup(t){this.targetGroupIndex=t,this.editingCriterion=null,this.isAddCriterionDialogVisible=!0},handleCriterionAdded(t){this.criteriaGroups.groups.length===0&&(this.addGroup("AND"),this.targetGroupIndex=0);const l=this.targetGroupIndex!==null?this.targetGroupIndex:this.criteriaGroups.groups.length-1;this.addCriterionToGroup(l,t),this.targetGroupIndex=null},startEditCriterion(t,l,a){this.editingGroupIndex=t,this.editingCriterionIndex=l,this.editingCriterion=JSON.parse(JSON.stringify(a)),this.isAddCriterionDialogVisible=!0},handleCriterionUpdated(t){this.updateCriterionInGroup(this.editingGroupIndex,this.editingCriterionIndex,t),this.editingCriterion=null,this.editingGroupIndex=null,this.editingCriterionIndex=null},formatCriterionValueForDisplay(t){if(t.value===null||t.value===void 0)return"";if(t.operator==="range"){const l=t.value instanceof Date?new Date(t.value).toLocaleDateString():t.value||"*",a=t.value_end instanceof Date?new Date(t.value_end).toLocaleDateString():t.value_end||"*";return`[${l} -> ${a}]`}else return t.value instanceof Date?new Date(t.value).toLocaleDateString():typeof t.value=="boolean"?this.$t(t.value?"true":"false"):`"${t.value}"`},async loadSites(){try{const t=await ut.getWorkspaces();this.availableSites=t.map(l=>({id:l.id,title:l.title,description:l.description}))}catch(t){console.error("Error loading sites:",t)}},searchSites(t){const l=t.query.toLowerCase();l?this.filteredSites=this.availableSites.filter(a=>a.title.toLowerCase().includes(l)||a.description&&a.description.toLowerCase().includes(l)):this.filteredSites=[...this.availableSites]}}},Nf={key:0,class:"loaded-view-bar"},Af={class:"loaded-view-label"},Yf={class:"mt-2 mb-4"},zf={class:"flex align-items-center gap-1 mb-2"},Mf={class:"font-bold"},Xf={class:"ri-information-line text-gray-400 cursor-help"},Of={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round"},wf={key:1,class:"flex flex-column gap-2"},kf={class:"font-semibold mr-1"},Cf={class:"text-gray-700 flex-grow-1"},Tf={class:"mt-4"},If={class:"font-bold"},jf={key:0,class:"text-center text-gray-500 p-3 border-1 border-dashed border-round mt-2"},Gf={key:1,class:"flex flex-column mt-2"},Df={key:0,class:"criteria-group-separator"},Lf={class:"criteria-group-separator-label"},Vf={key:0,class:"flex align-items-center justify-content-end mb-2"},vf={class:"flex flex-column"},Ff={key:0,class:"criteria-inline-operator"},Rf={class:"criteria-inline-operator-label"},Sf={class:"flex align-items-center p-2 border-1 border-round",style:{"border-color":"var(--p-content-border-color)"}},xf={class:"flex-grow-1"},Uf={class:"font-bold mr-1"},Jf={class:"font-italic mr-1"},Ef={class:"text-gray-700"},Bf={class:"flex gap-2 mt-3"},Hf={key:2,class:"view-actions-separator"},Qf={class:"flex flex-column gap-3"},Pf={class:"flex flex-column gap-1 w-full"},_f={class:"font-semibold"},Kf={class:"flex flex-column gap-1 w-full"},$f={class:"font-semibold"},qf={key:0,class:"flex flex-column gap-1 w-full"},eW={class:"font-semibold"},tW={class:"flex align-items-center"},lW={key:0};function aW(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("PrimeAccordionHeader"),c=e.resolveComponent("UserViewsFavoritesPanel"),m=e.resolveComponent("PrimeAccordionContent"),h=e.resolveComponent("PrimeAccordionPanel"),b=e.resolveComponent("PrimeAccordion"),p=e.resolveComponent("PrimeSelectButton"),d=e.resolveComponent("PrimeAutoComplete"),W=e.resolveComponent("PrimeInputText"),Z=e.resolveComponent("PrimeDialog"),N=e.resolveComponent("AddCriterionPopup"),y=e.resolveComponent("SaveViewPopup"),A=e.resolveComponent("TreeExplorer"),f=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.isSavedViewLoaded&&!a.hideViewSelector?(e.openBlock(),e.createElementBlock("div",Nf,[e.createElementVNode("span",Af,[l[15]||(l[15]=e.createElementVNode("i",{class:"ri-eye-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(t.$t("rechercheAvancee.activeView",{name:t.loadedView.name})),1)]),e.createVNode(s,{icon:"ri-close-line",label:t.$t("rechercheAvancee.closeView"),severity:"danger",onClick:l[0]||(l[0]=Y=>t.$emit("close-view")),outlined:"",size:"small"},null,8,["label"])])):e.createCommentVNode("",!0),e.createVNode(b,{class:e.normalizeClass(["mt-4",{"accordion-locked":a.hideViewSelector}]),multiple:"",value:a.hideViewSelector?["1"]:["0","1"],dt:{panel:{borderColor:"transparent"},header:{borderColor:"transparent"},content:{borderColor:"transparent"}}},{default:e.withCtx(()=>[a.hideViewSelector?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(h,{key:0,value:"0"},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("rechercheAvancee.savedViews")),1)]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[e.createVNode(c,{ref:"savedSearchesPanel","global-only":a.globalOnly,onLoadView:n.handleLoadView},null,8,["global-only","onLoadView"])]),_:1})]),_:1})),e.createVNode(h,{value:"1"},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("rechercheAvancee.queryBuilder")),1)]),_:1}),e.createVNode(m,null,{default:e.withCtx(()=>[e.createElementVNode("div",Yf,[e.createElementVNode("div",zf,[e.createElementVNode("span",Mf,e.toDisplayString(t.$t("rechercheAvancee.locationsTitle")),1),e.withDirectives(e.createElementVNode("i",Xf,null,512),[[f,t.$t("rechercheAvancee.locationsHint"),void 0,{right:!0}]])]),t.locations.length===0?(e.openBlock(),e.createElementBlock("div",Of,e.toDisplayString(t.$t("rechercheAvancee.noLocations")),1)):(e.openBlock(),e.createElementBlock("div",wf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.locations,(Y,X)=>(e.openBlock(),e.createElementBlock("div",{key:Y.id||X,class:e.normalizeClass(["flex align-items-center p-2 border-1 border-round",Y.negation?"border-red-200 bg-red-50":"border-green-200 bg-green-50"])},[e.createElementVNode("span",{class:e.normalizeClass(["text-xs font-bold px-2 py-1 border-round mr-2",Y.negation?"bg-red-100 text-red-700":"bg-green-100 text-green-700"])},e.toDisplayString(Y.negation?t.$t("rechercheAvancee.excludePrefix"):t.$t("rechercheAvancee.includePrefix")),3),e.createElementVNode("span",kf,e.toDisplayString(Y.type),1),e.createElementVNode("span",Cf,e.toDisplayString(Y.label||Y.value),1),e.createVNode(s,{icon:"ri-delete-bin-line",text:"",rounded:"",severity:"danger","aria-label":t.$t("rechercheAvancee.removeLocation"),onClick:G=>n.removeLocationAtIndex(X)},null,8,["aria-label","onClick"])],2))),128))])),e.createVNode(s,{icon:"ri-add-line",label:t.$t("rechercheAvancee.addLocationButton"),onClick:l[1]||(l[1]=Y=>o.isAddLocationDialogVisible=!0),class:"mt-3 w-full",outlined:""},null,8,["label"])]),e.createElementVNode("div",Tf,[e.createElementVNode("span",If,e.toDisplayString(t.$t("rechercheAvancee.criteriaTitle")),1),t.criteriaGroups.groups.length===0?(e.openBlock(),e.createElementBlock("div",jf,e.toDisplayString(t.$t("rechercheAvancee.noCriteria")),1)):(e.openBlock(),e.createElementBlock("div",Gf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.criteriaGroups.groups,(Y,X)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Y.id},[X>0?(e.openBlock(),e.createElementBlock("div",Df,[l[16]||(l[16]=e.createElementVNode("span",{class:"criteria-group-separator-line"},null,-1)),e.createElementVNode("span",Lf,e.toDisplayString(t.$t("rechercheAvancee.operatorOr")),1),l[17]||(l[17]=e.createElementVNode("span",{class:"criteria-group-separator-line"},null,-1))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["criteria-group-block",{"criteria-group-block--multi":t.criteriaGroups.groups.length>1}])},[t.criteriaGroups.groups.length>1?(e.openBlock(),e.createElementBlock("div",Vf,[e.withDirectives(e.createVNode(s,{icon:"ri-close-line",text:"",rounded:"",size:"small",severity:"danger",onClick:G=>t.removeGroup(X)},null,8,["onClick"]),[[f,t.$t("rechercheAvancee.removeGroup"),void 0,{left:!0}]])])):e.createCommentVNode("",!0),e.createElementVNode("div",vf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.criteria,(G,j)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:G.id},[j>0?(e.openBlock(),e.createElementBlock("div",Ff,[e.createElementVNode("span",Rf,e.toDisplayString(t.$t("rechercheAvancee.operatorAnd")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Sf,[e.createElementVNode("div",xf,[e.createElementVNode("span",Uf,e.toDisplayString(t.$t(G.property.labelId)),1),e.createElementVNode("span",{class:e.normalizeClass([G.negation?"text-red-500":"text-primary","mx-1"])},e.toDisplayString(G.negation?t.$t("rechercheAvancee.mustNotContain"):t.$t("rechercheAvancee.mustContain")),3),e.createElementVNode("span",Jf,e.toDisplayString(t.$t(G.operatorLabelKey)),1),e.createElementVNode("span",Ef,e.toDisplayString(n.formatCriterionValueForDisplay(G)),1)]),e.createVNode(s,{icon:"ri-pencil-line",text:"",rounded:"",severity:"info",onClick:L=>n.startEditCriterion(X,j,G)},null,8,["onClick"]),e.createVNode(s,{icon:"ri-delete-bin-line","aria-label":t.$t("delete"),text:"",rounded:"",severity:"danger",onClick:L=>t.removeCriterionFromGroup(X,j)},null,8,["aria-label","onClick"])])],64))),128))]),e.createVNode(s,{icon:"ri-add-line",label:t.$t("rechercheAvancee.addCriterionButton"),onClick:G=>n.openAddCriterionForGroup(X),class:"mt-2 w-full",outlined:"",size:"small"},null,8,["label","onClick"])],2)],64))),128))])),e.createElementVNode("div",Bf,[t.criteriaGroups.groups.length===0?(e.openBlock(),e.createBlock(s,{key:0,icon:"ri-add-line",label:t.$t("rechercheAvancee.addCriterionButton"),onClick:n.handleAddFirstCriterion,class:"flex-1",outlined:""},null,8,["label","onClick"])):e.createCommentVNode("",!0),t.criteriaGroups.groups.length>0?(e.openBlock(),e.createBlock(s,{key:1,icon:"ri-add-line",label:t.$t("rechercheAvancee.addOrGroup"),onClick:n.handleAddGroup,class:"flex-1",outlined:"",size:"small"},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),n.hasActiveCriteria?(e.openBlock(),e.createElementBlock("div",Hf)):e.createCommentVNode("",!0),n.hasActiveCriteria?(e.openBlock(),e.createBlock(s,{key:3,icon:"ri-save-3-line",label:t.$t("rechercheAvancee.saveViewAsNew"),onClick:n.openSaveViewPopup,class:"w-full",outlined:""},null,8,["label","onClick"])):e.createCommentVNode("",!0),n.canManageLoadedView?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(s,{icon:"ri-save-line",label:t.$t("rechercheAvancee.saveViewModifications"),onClick:n.modifyView,class:"mt-2 w-full"},null,8,["label","onClick"]),e.createElementVNode("a",{class:"delete-view-link",onClick:l[2]||(l[2]=(...Y)=>n.deleteView&&n.deleteView(...Y))},[l[18]||(l[18]=e.createElementVNode("i",{class:"ri-delete-bin-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(t.$t("rechercheAvancee.deleteView")),1)])],64)):e.createCommentVNode("",!0)])]),_:1})]),_:1})]),_:1},8,["class","value"]),e.createVNode(Z,{visible:o.isAddLocationDialogVisible,"onUpdate:visible":l[9]||(l[9]=Y=>o.isAddLocationDialogVisible=Y),header:t.$t("rechercheAvancee.addLocationTitle"),modal:"",style:{width:"500px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(s,{label:t.$t("cancel"),icon:"ri-close-line",onClick:l[8]||(l[8]=Y=>o.isAddLocationDialogVisible=!1),text:""},null,8,["label"]),e.createVNode(s,{label:t.$t("rechercheAvancee.addLocationConfirm"),icon:"ri-check-line",onClick:n.confirmAddLocation,disabled:!o.newLocation.type||!o.newLocation.value},null,8,["label","onClick","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",Qf,[e.createElementVNode("div",Pf,[e.createElementVNode("label",_f,e.toDisplayString(t.$t("rechercheAvancee.conditionLabel")),1),e.createVNode(p,{modelValue:o.newLocation.negation,"onUpdate:modelValue":l[3]||(l[3]=Y=>o.newLocation.negation=Y),options:n.conditionOptions,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",Kf,[e.createElementVNode("label",$f,e.toDisplayString(t.$t("rechercheAvancee.locationTypeLabel")),1),e.createVNode(p,{modelValue:o.newLocation.type,"onUpdate:modelValue":l[4]||(l[4]=Y=>o.newLocation.type=Y),options:n.locationOptions,optionLabel:"label",optionValue:"value",class:"w-full"},null,8,["modelValue","options"])]),o.newLocation.type?(e.openBlock(),e.createElementBlock("div",qf,[e.createElementVNode("label",eW,e.toDisplayString(t.$t("rechercheAvancee.valueLabel")),1),o.newLocation.type==="Site"?(e.openBlock(),e.createBlock(d,{key:0,modelValue:o.newLocationSiteInput,"onUpdate:modelValue":l[5]||(l[5]=Y=>o.newLocationSiteInput=Y),suggestions:o.filteredSites,optionLabel:"title",onComplete:n.searchSites,onItemSelect:n.handleNewLocationSiteSelect,placeholder:t.$t("rechercheAvancee.sitePlaceholder"),class:"w-full",forceSelection:""},null,8,["modelValue","suggestions","onComplete","onItemSelect","placeholder"])):(e.openBlock(),e.createBlock(W,{key:1,modelValue:o.newLocation.value,"onUpdate:modelValue":l[6]||(l[6]=Y=>o.newLocation.value=Y),placeholder:t.$t("rechercheAvancee.folderPlaceholder"),onClick:l[7]||(l[7]=Y=>o.newLocation.type==="Folder"?o.isDossierTreeVisible=!0:null),readonly:"",class:"w-full cursor-pointer"},null,8,["modelValue","placeholder"]))])):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"]),e.createVNode(N,{visible:o.isAddCriterionDialogVisible,"onUpdate:visible":l[10]||(l[10]=Y=>o.isAddCriterionDialogVisible=Y),properties:n.availableProperties,"edit-criterion":o.editingCriterion,onAddCriterion:n.handleCriterionAdded,onUpdateCriterion:n.handleCriterionUpdated},null,8,["visible","properties","edit-criterion","onAddCriterion","onUpdateCriterion"]),e.createVNode(y,{visible:o.saveViewDialogVisible,"onUpdate:visible":l[11]||(l[11]=Y=>o.saveViewDialogVisible=Y),"view-data":n.viewToEdit,"error-message":o.saveViewError,"global-only":a.globalOnly,onSaveView:n.handleSaveView,onClearError:n.clearSaveViewError},null,8,["visible","view-data","error-message","global-only","onSaveView","onClearError"]),e.createVNode(Z,{visible:o.isDossierTreeVisible,"onUpdate:visible":l[12]||(l[12]=Y=>o.isDossierTreeVisible=Y),header:t.$t("selectFolder"),modal:"",class:"w-full md:w-6"},{default:e.withCtx(()=>[e.createVNode(A,{"current-node":null,showUserHome:a.showUserHome,onSelectNode:n.handleDossierSelected},null,8,["showUserHome","onSelectNode"])]),_:1},8,["visible","header"]),e.createVNode(Z,{visible:o.isDeleteConfirmVisible,"onUpdate:visible":l[14]||(l[14]=Y=>o.isDeleteConfirmVisible=Y),header:t.$t("rechercheAvancee.confirmDeleteTitle"),modal:"",class:"dialog-confirm-delete"},{footer:e.withCtx(()=>[e.createVNode(s,{label:t.$t("no"),icon:"ri-close-line",onClick:l[13]||(l[13]=Y=>o.isDeleteConfirmVisible=!1),class:"p-button-text"},null,8,["label"]),e.createVNode(s,{label:t.$t("yes"),icon:"ri-check-line",onClick:n.handleDeleteConfirmation,class:"p-button-danger",autofocus:""},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",tW,[l[19]||(l[19]=e.createElementVNode("i",{class:"ri-alert-line mr-3 text-4xl","aria-hidden":"true"},null,-1)),t.loadedView?(e.openBlock(),e.createElementBlock("span",lW,e.toDisplayString(t.$t("rechercheAvancee.confirmDelete",{name:t.loadedView.name})),1)):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"])],64)}const tm=fe(Wf,[["render",aW]]),oW={name:"FavoriteViewMenu",emits:["menuitem-click"],computed:{...je.mapState(ll,{model:"favoriteViews"})},methods:{...je.mapActions(ll,["fetchFavoriteViews"]),onMenuItemClick(t){this.$emit("menuitem-click",t)}},async mounted(){await this.fetchFavoriteViews()}},nW={class:"menuItem mt-3"},iW={key:0},sW={class:"layout-menu"},rW={class:"overflow-hidden text-overflow-ellipsis white-space-nowrap"};function cW(t,l,a,i,o,n){const s=e.resolveComponent("router-link"),r=e.resolveDirective("ripple"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",nW,[e.createVNode(s,{to:"/vues"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("vuesFavorites.title")),1)]),_:1})]),t.model.length>0?(e.openBlock(),e.createElementBlock("div",iW,[e.createElementVNode("ul",sW,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.model,(m,h)=>(e.openBlock(),e.createElementBlock("li",{key:m.label||h,role:"none"},[e.withDirectives((e.openBlock(),e.createBlock(s,{"aria-label":m.label,to:m.to,class:"p-ripple flex",exact:"",role:"menuitem",onClick:b=>n.onMenuItemClick({originalEvent:b,item:m})},{default:e.withCtx(()=>[e.createElementVNode("span",rW,e.toDisplayString(m.label),1)]),_:2},1032,["aria-label","to","onClick"])),[[r],[c,m.label]])]))),128))])])):e.createCommentVNode("",!0)],64)}const lm=fe(oW,[["render",cW],["__scopeId","data-v-90814edd"]]),dW={name:"ViewResultsPanel",components:{ComplexBreadcrumb:In,PrimeButton:de,PrimePaginator:bo,PrimeProgressSpinner:Bt},directives:{tooltip:yt},props:{entries:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},totalRecords:{type:Number,default:0},rowsPerPage:{type:Number,default:25},showLocationActions:{type:Boolean,default:!0},workspaceRouteName:{type:String,default:"espace"},folderRouteName:{type:String,default:"espace-folder"},folderRouteParamName:{type:String,default:"folderId"},homeRoute:{type:[String,Object],default:()=>({name:"home"})}},data(){return{first:0}},emits:["page-change","select-node"],methods:{getNodeIcon(t){return pl.getIcon(t)},buildBreadcrumbPath(t){if(!t.path||!t.path.elements)return[];const l=t.path.elements.filter(o=>o.name!=="Company Home"&&o.name!=="documentLibrary"&&o.nodeType!=="st:sites"&&o.nodeType!=="sys:container");let a=null;const i=l.map(o=>{const n={id:o.id,name:o.name,nodeType:o.nodeType,isFolder:o.nodeType==="cm:folder"||o.nodeType==="st:site"};return o.nodeType==="st:site"?(a=o.name,n.to={name:this.workspaceRouteName,params:{id:o.name}}):a?n.to={name:this.folderRouteName,params:{id:a,[this.folderRouteParamName]:o.id}}:n.to={},n});return i.unshift({nodeType:"home",to:typeof this.homeRoute=="string"?{name:this.homeRoute}:this.homeRoute}),i},getSiteElement(t){return!t.path||!t.path.elements?null:t.path.elements.find(l=>l.nodeType==="st:site")},getSiteName(t){const l=this.getSiteElement(t);return l?l.name:null},getParentName(t){if(!t.path||!t.path.elements)return"";const l=t.path.elements[t.path.elements.length-1];return l?l.name:""},addParentAsLocation(t,l){if(!t.path||!t.path.elements)return;const a=t.path.elements,i=a[a.length-1];if(!i)return;ll().addLocation({type:"Folder",value:`workspace://SpacesStore/${i.id}`,negation:l,label:i.name})},addSiteAsLocation(t,l){const a=this.getSiteElement(t);if(!a)return;ll().addLocation({type:"Site",value:a.name,negation:l,label:a.name})},formatDate(t){return t?new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):""},handlePageChange(t){this.first=t.first,this.$emit("page-change",t.first)},formatSize(t){if(!t||t===0)return"0 B";const l=["B","KB","MB","GB"];let a=0,i=t;for(;i>=1024&&a<l.length-1;)i/=1024,a++;return`${i.toFixed(a===0?0:1)} ${l[a]}`}}},mW={class:"view-results-panel"},bW={key:0,class:"flex justify-content-center align-items-center p-5"},pW={key:1,class:"text-center text-gray-500 p-5"},uW={class:"mt-2"},hW={key:2},yW={class:"result-main"},ZW={key:0,class:"result-site-row"},gW={class:"result-site-badge"},fW={class:"result-header"},WW=["title","onClick"],NW={key:1,class:"result-path-row"},AW={class:"result-meta"},YW={key:0,class:"meta-item"},zW={key:1,class:"meta-item"};function MW(t,l,a,i,o,n){const s=e.resolveComponent("PrimeProgressSpinner"),r=e.resolveComponent("PrimeButton"),c=e.resolveComponent("ComplexBreadcrumb"),m=e.resolveComponent("PrimePaginator"),h=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",mW,[a.loading?(e.openBlock(),e.createElementBlock("div",bW,[e.createVNode(s)])):a.entries.length===0?(e.openBlock(),e.createElementBlock("div",pW,[l[0]||(l[0]=e.createElementVNode("i",{class:"ri-search-line",style:{"font-size":"3rem"},"aria-hidden":"true"},null,-1)),e.createElementVNode("p",uW,e.toDisplayString(t.$t("rechercheAvancee.noResults")),1)])):(e.openBlock(),e.createElementBlock("div",hW,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.entries,b=>(e.openBlock(),e.createElementBlock("div",{key:b.id,class:"view-result-item"},[e.createElementVNode("div",yW,[n.getSiteName(b)?(e.openBlock(),e.createElementBlock("div",ZW,[e.createElementVNode("span",gW,[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-building-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(n.getSiteName(b)),1)]),a.showLocationActions&&n.getSiteElement(b)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(r,{icon:"ri-add-circle-line",class:"action-include location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(p=>n.addSiteAsLocation(b,!1),["stop"])},null,8,["onClick"]),[[h,t.$t("rechercheAvancee.addAsIncludeSite",{name:n.getSiteName(b)})]]),e.withDirectives(e.createVNode(r,{icon:"ri-indeterminate-circle-line",class:"action-exclude location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(p=>n.addSiteAsLocation(b,!0),["stop"])},null,8,["onClick"]),[[h,t.$t("rechercheAvancee.addAsExcludeSite",{name:n.getSiteName(b)})]])],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",fW,[e.createElementVNode("i",{class:e.normalizeClass([n.getNodeIcon(b),"result-icon"]),"aria-hidden":"true"},null,2),e.createElementVNode("a",{class:"result-name",title:b.name,onClick:p=>t.$emit("select-node",b)},e.toDisplayString(b.name),9,WW)]),b.path&&b.path.elements?(e.openBlock(),e.createElementBlock("div",NW,[e.createVNode(c,{path:n.buildBreadcrumbPath(b),"show-actions":!1,"show-home":!1,"is-in-search":!0,mode:"auto","home-route":a.homeRoute,"workspace-route-name":a.workspaceRouteName,"folder-route-name":a.folderRouteName,class:"result-breadcrumb"},null,8,["path","home-route","workspace-route-name","folder-route-name"]),a.showLocationActions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.withDirectives(e.createVNode(r,{icon:"ri-add-circle-line",class:"action-include location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(p=>n.addParentAsLocation(b,!1),["stop"])},null,8,["onClick"]),[[h,t.$t("rechercheAvancee.addAsIncludeFolder",{name:n.getParentName(b)})]]),e.withDirectives(e.createVNode(r,{icon:"ri-indeterminate-circle-line",class:"action-exclude location-action",text:"",rounded:"",size:"small",onClick:e.withModifiers(p=>n.addParentAsLocation(b,!0),["stop"])},null,8,["onClick"]),[[h,t.$t("rechercheAvancee.addAsExcludeFolder",{name:n.getParentName(b)})]])],64)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",AW,[b.modifiedAt?(e.openBlock(),e.createElementBlock("span",YW,[l[2]||(l[2]=e.createElementVNode("i",{class:"ri-time-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(n.formatDate(b.modifiedAt)),1)])):e.createCommentVNode("",!0),b.content&&b.content.sizeInBytes?(e.openBlock(),e.createElementBlock("span",zW,[l[3]||(l[3]=e.createElementVNode("i",{class:"ri-hard-drive-line","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(n.formatSize(b.content.sizeInBytes)),1)])):e.createCommentVNode("",!0)])])]))),128)),e.createVNode(m,{first:o.first,rows:a.rowsPerPage,"total-records":a.totalRecords,template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink",onPage:n.handlePageChange},null,8,["first","rows","total-records","onPage"])]))])}const am=fe(dW,[["render",MW],["__scopeId","data-v-0cfc30de"]]),XW={class:"save-as-form"},OW={class:"form-field"},wW={for:"filename"},kW={class:"form-field"},CW={for:"location"},TW={class:"input-group"},IW={key:0,class:"explorer-container"},jW=fe({__name:"SaveAsPopup",props:{visible:Boolean,defaultFilename:{type:String,default:null},parentFolderNode:{type:Object,default:null}},emits:["close","save"],setup(t,{emit:l}){const{t:a}=Rt.useI18n(),i=t,o=l,n=e.ref(""),s=e.ref(null),r=e.ref(!1),c=e.ref(null),m=e.ref(""),h=()=>{n.value=i.defaultFilename||a("pdfTools.saveAs.defaultFilename"),s.value=i.parentFolderNode,c.value=i.parentFolderNode?.id,m.value=i.parentFolderNode?.name,r.value=!1},b=async d=>{if(!(!d||!d.isFolder)){if(d.name==="documentLibrary")if(c.value=d.id,d.parentId)try{const W=await Ye.getNode(d.parentId);m.value=W.properties["cm:title"]||W.name}catch(W){console.error("Could not fetch parent node name",W),m.value=d.name}else m.value=d.name;else c.value=d.id,m.value=d.name;r.value=!1}},p=()=>{c.value&&o("save",{filename:n.value,folderId:c.value})};return(d,W)=>(e.openBlock(),e.createBlock(e.unref(pt),{visible:t.visible,modal:"",header:d.$t("pdfTools.saveAs.title"),class:"dialog-save-as","onUpdate:visible":W[3]||(W[3]=Z=>d.$emit("close")),onShow:h},{footer:e.withCtx(()=>[e.createVNode(e.unref(de),{label:d.$t("pdfTools.common.cancel"),icon:"ri-close-line",text:"",onClick:W[2]||(W[2]=Z=>d.$emit("close"))},null,8,["label"]),e.createVNode(e.unref(de),{label:d.$t("pdfTools.common.save"),icon:"ri-check-line",onClick:p,disabled:!n.value||!c.value},null,8,["label","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",XW,[e.createElementVNode("div",OW,[e.createElementVNode("label",wW,e.toDisplayString(d.$t("pdfTools.saveAs.filenameLabel")),1),e.createVNode(e.unref(_e),{id:"filename",modelValue:n.value,"onUpdate:modelValue":W[0]||(W[0]=Z=>n.value=Z)},null,8,["modelValue"])]),e.createElementVNode("div",kW,[e.createElementVNode("label",CW,e.toDisplayString(d.$t("pdfTools.saveAs.folderLabel")),1),e.createElementVNode("div",TW,[e.createVNode(e.unref(_e),{id:"location",readonly:"",value:m.value},null,8,["value"]),e.createVNode(e.unref(de),{icon:r.value?"ri-arrow-up-s-line":"ri-arrow-down-s-line",label:d.$t("pdfTools.saveAs.browse"),onClick:W[1]||(W[1]=Z=>r.value=!r.value)},null,8,["icon","label"])])]),r.value?(e.openBlock(),e.createElementBlock("div",IW,[e.createVNode(aa,{"current-node":s.value,"show-user-home":"","show-files":!1,onSelectNode:b},null,8,["current-node"])])):e.createCommentVNode("",!0)])]),_:1},8,["visible","header"]))}},[["__scopeId","data-v-13a7638f"]]),GW={class:"pdf-tools-page"},DW={key:0},LW={key:0,class:"loading-container"},VW={key:1,class:"error-container"},vW={key:2,class:"pdf-editor-layout"},FW={class:"pdf-tools-sidebar"},RW={class:"card"},SW={class:"sidebar-form"},xW={class:"form-field"},UW={class:"form-field form-field--spaced"},JW={class:"form-field form-field--spaced"},EW={class:"insert-buttons"},BW={class:"form-field form-field--spaced"},HW={class:"watermark-grid"},QW={class:"pdf-preview-container"},PW=["onClick","onDblclick"],_W={class:"page-selection"},KW={class:"page-actions"},$W={class:"thumbnail-content"},qW={class:"page-number"},e9={class:"dialog-header"},t9={class:"page-editor-toolbar"},l9={class:"zoom-indicator"},a9={class:"editor-layout"},o9={class:"tool-group"},n9={key:0,class:"text-settings"},i9={class:"form-field"},s9={class:"form-label"},r9={class:"form-field"},c9={class:"form-label"},d9={class:"form-field"},m9={class:"form-label"},b9={class:"editor-footer"},p9={class:"dialog-header"},u9={class:"signature-pad"},h9={class:"dialog-footer-buttons"},y9={class:"search-input-group"},Z9={key:0,class:"inline-status"},g9={key:1,class:"text-muted"},f9={key:2,class:"favorites-layout"},W9={class:"favorites-list"},N9=["onClick"],A9={class:"item-content"},Y9={class:"text-ellipsis"},z9={class:"favorites-preview"},M9={key:0,class:"preview-placeholder"},X9={class:"text-muted"},O9={key:1,class:"preview-placeholder"},w9={class:"text-muted"},k9={key:2,class:"preview-wrapper"},C9={key:0,class:"preview-controls"},T9={class:"page-info"},I9={class:"preview-content"},j9={key:0,class:"inline-status"},G9={key:1,class:"text-muted"},D9={key:2,class:"favorites-layout"},L9={class:"favorites-list"},V9=["onClick"],v9={class:"item-content"},F9={class:"text-ellipsis"},R9={class:"favorites-preview"},S9={key:0,class:"preview-placeholder"},x9={class:"text-muted"},U9={key:1,class:"preview-placeholder"},J9={class:"text-muted"},E9={key:2,class:"preview-wrapper"},B9={key:0,class:"preview-controls"},H9={class:"page-info"},Q9={class:"preview-content"},P9={class:"sidebar-form"},_9={class:"form-field"},K9={for:"alfrescoNodeId"},$9={class:"form-hint"},q9={class:"insert-footer"},e4={class:"insert-footer-info"},t4={key:0,class:"selected-info"},l4={class:"selected-label"},a4={class:"selected-name"},o4={key:1,class:"error-msg"},n4={class:"insert-footer-actions"},om=fe({__name:"PdfToolsComponent",props:{toast:{type:Object,required:!0},id:{type:String,required:!0}},setup(t){const{t:l}=Rt.useI18n(),a=t,i=e.ref(null),o=e.ref(null),n=e.ref([]),s=e.ref(!0),r=e.ref(null),c=e.ref(null),m=e.ref([]),h=e.ref(!1),b=e.ref(null),p=e.ref(1),d={SELECT:"select",REDACT:"redact",HIGHLIGHT:"highlight",COMMENT:"comment",IMAGE:"image",SIGNATURE:"signature",TEXT:"text"},W=e.ref(d.SELECT),Z=e.ref([]),N=e.ref(null),y=e.ref(null),A=e.ref(null),f=e.ref(null),Y=e.ref(!1),X=e.ref(null);let G=!1,j=null,L=!1,z=null;const O=e.ref(""),F=e.ref(-45),M=e.ref(5),I=[{label:"Helvetica",value:"Helvetica"},{label:"Times New Roman",value:"TimesRoman"},{label:"Courier",value:"Courier"}],g=e.ref("Helvetica"),J=e.ref(18),ae=e.ref("#000000"),Q=e.ref(null),pe=e.ref(!1),P=e.ref(null),ee=e.ref(""),S=e.ref(""),E=e.ref(null),ye=e.ref(null),_=e.ref(!1),B=e.ref(""),ue=e.ref(""),Ne=e.ref(null),be=e.computed(()=>B.value&&Qe(B.value)?!0:!!(Ne.value&&Ne.value.id)),De=e.ref(""),Ve=e.ref([]),Je=e.ref(!1),st=e.ref(!1),Se=e.ref([]),u=e.ref(!1),te=e.ref(!1),$=e.ref(null),{pdf:T}=Ll.usePDF($),k=e.ref(1),x=e.ref(0),oe=e.ref(null),{pdf:ie}=Ll.usePDF(oe);e.onMounted(()=>{const C=a.id;C?Ae(C):(r.value=l("pdfTools.loadError"),s.value=!1)});const H=C=>m.value.some(v=>v.pageIndex===C.pageIndex),me=C=>{c.value=C;const v=m.value.findIndex(q=>q.pageIndex===C.pageIndex);v>-1?m.value.splice(v,1):m.value.push(C)},Ae=async C=>{s.value=!0,r.value=null;try{const v=await Ye.getNode(C);E.value=v,Q.value=v.parentId,S.value=v&&(v.name||v.properties&&v.properties["cm:name"])||"";const q=ht.getContentUrl(C);oe.value=q;const K=await fetch(q);if(!K.ok)throw new Error(`HTTP error! status: ${K.status}`);const ge=await K.arrayBuffer();o.value=new Uint8Array(ge),await re(o.value),n.value.length>0&&(c.value=n.value[0])}catch(v){console.error("Error loading PDF from Alfresco:",v),r.value=l("pdfTools.loadError")}finally{s.value=!1}},re=async C=>{i.value=await it.PDFDocument.load(C);const v=i.value.getPageCount();n.value=Array.from({length:v},(q,K)=>({pageIndex:K,pageNumber:K+1}))},We=async(C,{updatePages:v=!0}={})=>{const q=await C.save();o.value=q;const K=new Blob([q],{type:"application/pdf"});oe.value&&oe.value.startsWith("blob:")&&URL.revokeObjectURL(oe.value),oe.value=URL.createObjectURL(K),v&&await re(q)},Ue=async()=>{if(o.value){s.value=!0;try{const C=await it.PDFDocument.create(),v=n.value.map(ge=>ge.pageIndex),q=await it.PDFDocument.load(o.value);(await C.copyPages(q,v)).forEach(ge=>C.addPage(ge)),await We(C)}catch(C){console.error("Error reordering pages:",C),r.value=l("pdfTools.reorderError")}finally{s.value=!1}}},ve=async C=>{if(o.value){s.value=!0;try{const v=await it.PDFDocument.load(o.value),q=v.getPage(C.pageIndex),K=q.getRotation().angle;q.setRotation({type:it.RotationTypes.Degrees,angle:(K+90)%360}),await We(v,{updatePages:!1})}catch(v){console.error("Error rotating page:",v),r.value=l("pdfTools.rotateError")}finally{s.value=!1}}},nt=async()=>{if(m.value.length===0||!o.value)return null;const C=await it.PDFDocument.create(),v=await it.PDFDocument.load(o.value),q=m.value.map(ge=>ge.pageIndex).sort((ge,le)=>ge-le);return(await C.copyPages(v,q)).forEach(ge=>C.addPage(ge)),await C.save()},gt=async()=>{if(!(!o.value||m.value.length===0)){if(m.value.length===n.value.length){a.toast.add({severity:"warn",summary:l("pdfTools.common.warning"),detail:l("pdfTools.deleteAllPagesWarning"),life:3e3});return}s.value=!0;try{const C=await it.PDFDocument.load(o.value),v=C.getPageCount(),q=new Set(m.value.map(ke=>ke.pageIndex)),K=[];for(let ke=0;ke<v;ke++)q.has(ke)||K.push(ke);const ge=await it.PDFDocument.create();(await ge.copyPages(C,K)).forEach(ke=>ge.addPage(ke)),await We(ge),m.value=[],a.toast.add({severity:"success",summary:l("pdfTools.common.deleted"),detail:l("pdfTools.pagesDeletedSuccess"),life:3e3})}catch(C){console.error("Error deleting pages:",C),r.value=l("pdfTools.deletePagesError")}finally{s.value=!1}}},Nt=async()=>{B.value="",Ne.value=null,ue.value="",_.value=!0},ce=C=>{C===2&&Se.value.length===0&&!u.value&&il()},we=async()=>{let C=null;if(Ne.value?.id?C=Ne.value.id:B.value&&(C=Qe(B.value)),!C){a.toast.add({severity:"warn",summary:l("pdfTools.common.warning"),detail:l("pdfTools.insertFromAlfresco.invalidInput"),life:3e3});return}await sl(C),_.value=!1},Qe=C=>{if(!C)return null;const v=C.trim();if(/^[0-9a-fA-F-]{20,}$/.test(v))return v;const q=v.match(/workspace:\/\/SpacesStore\/([0-9a-fA-F-]{20,})/);if(q&&q[1])return q[1];const K=v.match(/\b(nodes|preview|renditions|content)\/?([0-9a-fA-F-]{20,})\b/);if(K&&K[2])return K[2];const ge=v.match(/#\/(?:pdf-tools|consultation-pdf|edit-collabora)\/([0-9a-fA-F-]{20,})/);if(ge&&ge[1])return ge[1];const le=v.match(/([0-9a-fA-F]{20,})/);return le&&le[1]?le[1]:null},$e=async C=>{if(C?.content?.mimeType==="application/pdf"&&(Ne.value=C,ue.value="",C?.id)){te.value=!0,k.value=1,x.value=0;try{const v=ht.getContentUrl(C.id);$.value&&$.value.startsWith("blob:")&&URL.revokeObjectURL($.value),$.value=v}catch(v){console.error("Error loading PDF preview:",v),$.value=null}finally{te.value=!1}}},Be=()=>{k.value<x.value&&k.value++},wt=()=>{k.value>1&&k.value--},nl=C=>{ue.value="",C.isFolder?(Ne.value=null,ue.value=l("pdfTools.insertFromAlfresco.folderSelectError")):C.content?.mimeType!=="application/pdf"?(Ne.value=null,ue.value=l("pdfTools.insertFromAlfresco.fileTypeNotAllowedError")):$e(C)},kt=async()=>{if(st.value=!0,!De.value||De.value.trim().length<2){Ve.value=[];return}Je.value=!0;try{const C=Vo();await C.queryStore(De.value);const v=C.entries.map(q=>q.entry||q);Ve.value=v.filter(q=>q.isFile&&q.content?.mimeType==="application/pdf")}catch(C){console.error("performSearch",C),Ve.value=[]}finally{Je.value=!1}},il=async()=>{u.value=!0;try{const C=Ha();await C.loadFavorites(),Se.value=C.fileFavorites.filter(v=>v?.target?.file?.content?.mimeType==="application/pdf").map(v=>v.target.file)}catch(C){console.error("loadFavorites error:",C),Se.value=[]}finally{u.value=!1}},sl=async C=>{if(o.value){s.value=!0;try{if((await Ye.getNode(C)).content?.mimeType!=="application/pdf")throw new Error(l("pdfTools.invalidNodeForInsert"));const K=await(await Ye.getNodeContent(C)).arrayBuffer(),ge=new Uint8Array(K),le=await it.PDFDocument.load(o.value),ke=await it.PDFDocument.load(ge),Pe=ke.getPageCount(),qe=Array.from({length:Pe},(At,Al)=>Al);(await le.copyPages(ke,qe)).forEach(At=>le.addPage(At)),await We(le),m.value=[],a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.insertFromPristySuccess",{count:Pe}),life:3e3})}catch(v){console.error("Error inserting from Alfresco:",v),r.value=v?.message||l("pdfTools.insertFromPristyError"),a.toast.add({severity:"error",summary:l("pdfTools.common.error"),detail:r.value,life:4e3})}finally{s.value=!1}}},ne=async C=>{const v=C.files?.[0];v&&await Me(v)},Me=async C=>{if(o.value){s.value=!0;try{const v=await it.PDFDocument.load(o.value),q=new Uint8Array(await C.arrayBuffer()),K=await it.PDFDocument.load(q),ge=K.getPageCount(),le=Array.from({length:ge},(Pe,qe)=>qe);(await v.copyPages(K,le)).forEach(Pe=>v.addPage(Pe)),await We(v),m.value=[],a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.insertFromFileSuccess",{count:ge}),life:3e3})}catch(v){console.error("Error inserting PDF:",v),r.value=l("pdfTools.insertError")}finally{s.value=!1}}},Fe=async()=>{if(!(!O.value||m.value.length===0||!o.value)){s.value=!0;try{const C=await it.PDFDocument.load(o.value),v=m.value.map(q=>q.pageIndex);for(const q of v){const K=C.getPage(q),{width:ge,height:le}=K.getSize();for(let ke=0;ke<M.value;ke++)K.drawText(O.value,{x:ge/(M.value+1)*(ke+1)-150,y:le/(M.value+1)*(ke+1),size:50,color:it.rgb(.95,.1,.1),opacity:.5,rotate:it.degrees(F.value)})}await We(C,{updatePages:!1})}catch(C){console.error("Error adding watermark:",C),r.value=l("pdfTools.watermarkError")}finally{s.value=!1}}},Ke=async()=>{if(o.value){s.value=!0;try{const C=new Blob([o.value],{type:"application/pdf"}),v=new File([C],"modified.pdf",{type:"application/pdf"}),q={majorVersion:!0,comment:"File modified via Pristy Espaces PDF tools"};await Ye.updateContentNode(a.id,v,q),a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.saveSuccess"),life:3e3})}catch(C){console.error("Error saving changes:",C),a.toast.add({severity:"error",summary:l("pdfTools.common.error"),detail:l("pdfTools.saveError"),life:3e3})}finally{s.value=!1}}},rt=async C=>{if(P.value=C,ee.value=l("pdfTools.saveAs.defaultFilename"),E.value&&E.value.parentId)try{ye.value=await Ye.getNode(E.value.parentId)}catch(v){console.error("Could not fetch parent node for Save As dialog",v),ye.value=null}else ye.value=null;pe.value=!0},Kt=async({filename:C,folderId:v})=>{pe.value=!1,s.value=!0;try{let q;if(P.value==="extract"?q=await nt():q=o.value,!q)throw new Error(l("pdfTools.noContentToSave"));const K=new Blob([q],{type:"application/pdf"}),ge=new File([K],C,{type:"application/pdf"});if(!v)throw new Error("No destination folder selected.");await ht.uploadFile(v,{},ge),a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.fileCreatedSuccess",{filename:C}),life:3e3})}catch(q){console.error('Error during "Save As":',q);const K=q.status===409?l("pdfTools.saveAs.conflictError"):l("pdfTools.saveAsError");a.toast.add({severity:"error",summary:l("pdfTools.common.error"),detail:K,life:4e3})}finally{s.value=!1}},kl=C=>{b.value=C||c.value,h.value=!0,p.value=1,Z.value=[],setTimeout(Tl,200)},bt=()=>{h.value=!1,b.value=null},Cl=()=>{p.value=Math.min(4,p.value+.1)},Hl=()=>{p.value=Math.max(.2,p.value-.1)},ca=C=>{C===d.REDACT?window.confirm(l("pdfTools.redactWarning"))&&(W.value=C):W.value=C},rl=C=>{N.value=C.files?.[0]||null,N.value&&(y.value=null,W.value=d.IMAGE)},ao=()=>{Y.value=!0},zi=()=>{Z.value.pop(),Jt()},wa=async C=>{if(!(!C||C.type!==d.IMAGE||C._loading||C._bitmap)){C._loading=!0;try{let v=null;C.payload?.file?v=C.payload.file:C.payload?.signature&&(v=new Blob([new Uint8Array(C.payload.signature)],{type:"image/png"})),v&&(C._bitmap=await createImageBitmap(v),Jt())}catch(v){console.warn(l("pdfTools.imagePreviewUnavailable"),v)}finally{C._loading=!1}}},_o=()=>{const C=A.value;if(!C)return null;const v=Array.from(C.querySelectorAll("canvas"));if(v.length===0)return null;const q=v.filter(ke=>ke.offsetParent!==null&&ke.width>0&&ke.height>0),K=q.length?q:v;let ge=K[0],le=0;for(const ke of K){const Pe=ke.getBoundingClientRect(),qe=Math.max(0,Pe.width)*Math.max(0,Pe.height);qe>le&&(ge=ke,le=qe)}return ge},Tl=()=>{const C=_o();if(!C||!f.value)return;const v=C.getBoundingClientRect(),q=window.devicePixelRatio||1;f.value.style.width=v.width+"px",f.value.style.height=v.height+"px",f.value.width=Math.round(v.width*q),f.value.height=Math.round(v.height*q),Jt()},Ql=C=>{const v=f.value;if(!v)return{x:0,y:0};const q=v.getBoundingClientRect(),K=window.devicePixelRatio||1;return{x:(C.clientX-q.left)*K,y:(C.clientY-q.top)*K}};let Pl=null,Ut=null,da=null,Il=null;const Mi=C=>{for(let v=Z.value.length-1;v>=0;v--){const q=Z.value[v].rect;if(C.x>=q.x&&C.x<=q.x+q.w&&C.y>=q.y&&C.y<=q.y+q.h)return v}return-1},Ko=C=>{const K=6*(window.devicePixelRatio||1)/2;for(let ge=Z.value.length-1;ge>=0;ge--){const le=Z.value[ge];if(le.type!==d.IMAGE&&le.type!==d.TEXT)continue;const ke=le.rect,Pe=[{key:"tl",x:ke.x,y:ke.y},{key:"tr",x:ke.x+ke.w,y:ke.y},{key:"bl",x:ke.x,y:ke.y+ke.h},{key:"br",x:ke.x+ke.w,y:ke.y+ke.h}];for(const qe of Pe)if(C.x>=qe.x-K&&C.x<=qe.x+K&&C.y>=qe.y-K&&C.y<=qe.y+K)return{idx:ge,corner:qe.key}}return null},$o=C=>{if(W.value===d.REDACT||W.value===d.HIGHLIGHT||W.value===d.TEXT)L=!0,z=Ql(C);else if(W.value===d.COMMENT){const v=Ql(C),q=window.prompt(l("pdfTools.pageEditor.commentPrompt"));q&&(Z.value.push({type:d.COMMENT,rect:{x:v.x,y:v.y,w:24,h:24},payload:{text:q}}),Jt())}else if(W.value===d.IMAGE||W.value===d.SELECT||W.value===d.TEXT){const v=Ql(C),q=Ko(v);if(q){da=q.idx,Il=q.corner,Ut={p:v,rect:{...Z.value[q.idx].rect}},f.value&&(f.value.style.cursor="nwse-resize");return}const K=Mi(v);if(K!==-1&&(Z.value[K].type===d.IMAGE||Z.value[K].type===d.TEXT)){Pl=K,Ut={p:v,rect:{...Z.value[K].rect}},f.value&&(f.value.style.cursor="move");return}if(W.value===d.IMAGE){if(!N.value&&!y.value)return;const ge={type:d.IMAGE,rect:{x:v.x,y:v.y,w:150,h:100},payload:{file:N.value,signature:y.value}};Z.value.push(ge),wa(ge),Jt(),W.value=d.SELECT,N.value=null,y.value=null}}},Xi=C=>{if(da!==null&&Il){const q=Ql(C),K=Z.value[da];if(K){const ge=Ut.rect;let le=ge.x,ke=ge.y,Pe=ge.w,qe=ge.h;const Mt=q.x-Ut.p.x,At=q.y-Ut.p.y;Il==="br"?(Pe=Math.max(10,ge.w+Mt),qe=Math.max(10,ge.h+At)):Il==="tr"?(Pe=Math.max(10,ge.w+Mt),qe=Math.max(10,ge.h-At),ke=ge.y+At):Il==="bl"?(Pe=Math.max(10,ge.w-Mt),le=ge.x+Mt,qe=Math.max(10,ge.h+At)):Il==="tl"&&(Pe=Math.max(10,ge.w-Mt),le=ge.x+Mt,qe=Math.max(10,ge.h-At),ke=ge.y+At),K.rect.x=le,K.rect.y=ke,K.rect.w=Pe,K.rect.h=qe,Jt()}return}if(Pl!==null){const q=Ql(C),K=Z.value[Pl];if(K){const ge=q.x-Ut.p.x,le=q.y-Ut.p.y;K.rect.x=Ut.rect.x+ge,K.rect.y=Ut.rect.y+le,Jt()}return}if(!L||!z)return;const v=Ql(C);Wl.value={x:Math.min(z.x,v.x),y:Math.min(z.y,v.y),w:Math.abs(v.x-z.x),h:Math.abs(v.y-z.y)},Jt()},Oi=()=>{if(Pl!==null||da!==null){Pl=null,da=null,Il=null,Ut=null,f.value&&(f.value.style.cursor="crosshair"),Jt();return}if(L&&Wl.value)if(W.value===d.TEXT){const C=window.prompt(l("pdfTools.pageEditor.addTextPrompt"));C&&C.trim().length>0&&Z.value.push({type:d.TEXT,rect:{...Wl.value},payload:{text:C,font:g.value,size:J.value,color:ae.value}})}else Z.value.push({type:W.value,rect:{...Wl.value}});L=!1,z=null,Wl.value=null,Jt()},wi=()=>{L&&(L=!1,z=null,Wl.value=null,Jt())},Wl=e.ref(null),Jt=()=>{const C=Pl,v=f.value;if(!v)return;const q=v.getContext("2d"),K=window.devicePixelRatio||1;q.clearRect(0,0,v.width,v.height);const ge=(le,ke)=>{if(le.type===d.REDACT)q.fillStyle="rgba(0,0,0,1)",q.fillRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),q.strokeStyle="rgba(0,0,0,1)",q.strokeRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h);else if(le.type===d.HIGHLIGHT)q.fillStyle="rgba(255, 235, 59, 0.4)",q.fillRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),q.strokeStyle="rgba(255, 193, 7, 0.8)",q.strokeRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h);else if(le.type===d.COMMENT)Ca(q,le.rect.x,le.rect.y,20*K);else if(le.type===d.IMAGE){if(wa(le),le._bitmap&&q.drawImage(le._bitmap,le.rect.x,le.rect.y,le.rect.w,le.rect.h),q.strokeStyle=ke===C?"#0ea5e9":"rgba(33,150,243,0.9)",q.lineWidth=ke===C?2*K:1*K,q.strokeRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),ke===C){q.fillStyle="#0ea5e9";const Pe=6*K,qe=Pe/2;[[le.rect.x,le.rect.y],[le.rect.x+le.rect.w,le.rect.y],[le.rect.x,le.rect.y+le.rect.h],[le.rect.x+le.rect.w,le.rect.y+le.rect.h]].forEach(([At,Al])=>{q.fillRect(At-qe,Al-qe,Pe,Pe)})}}else if(le.type===d.TEXT){const Pe=le.payload||{},qe=Math.max(8,Pe.size||18);q.save(),q.fillStyle="rgba(255,255,255,0.35)",q.fillRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),q.fillStyle=Pe.color||"#000",q.font=`${qe}px ${Pe.font||"Helvetica"}`,q.textBaseline="top";const Mt=4*K,At=Math.max(0,le.rect.w-2*Mt),Al=oo(q,String(Pe.text||""),At);let jl=le.rect.y+Mt;for(const cl of Al)if(q.fillText(cl,le.rect.x+Mt,jl),jl+=qe*1.2,jl>le.rect.y+le.rect.h-Mt)break;if(q.strokeStyle=ke===C?"#0ea5e9":"rgba(33,150,243,0.9)",q.lineWidth=ke===C?2*K:1*K,q.strokeRect(le.rect.x,le.rect.y,le.rect.w,le.rect.h),ke===C){q.fillStyle="#0ea5e9";const cl=6*K,Kl=cl/2;[[le.rect.x,le.rect.y],[le.rect.x+le.rect.w,le.rect.y],[le.rect.x,le.rect.y+le.rect.h],[le.rect.x+le.rect.w,le.rect.y+le.rect.h]].forEach(([ot,$l])=>{q.fillRect(ot-Kl,$l-Kl,cl,cl)})}q.restore()}};if(Z.value.forEach(ge),Wl.value){const le=Wl.value;q.setLineDash([6*K,4*K]),q.strokeStyle=W.value===d.REDACT?"black":"goldenrod",q.strokeRect(le.x,le.y,le.w,le.h),q.setLineDash([])}},oo=(C,v,q)=>{const K=v.split(/\s+/),ge=[];let le="";for(const ke of K){const Pe=le?le+" "+ke:ke;C.measureText(Pe).width<=q||le===""?le=Pe:(ge.push(le),le=ke)}return le&&ge.push(le),ge},ma=C=>{let v=C.toString().trim();v.startsWith("#")&&(v=v.slice(1)),v.length===3&&(v=v.split("").map(ke=>ke+ke).join(""));const q=parseInt(v||"000000",16),K=(q>>16&255)/255,ge=(q>>8&255)/255,le=(q&255)/255;return{r:K,g:ge,b:le}},ka=(C,v,q,K)=>{const ge=String(v).split(/\s+/),le=[];let ke="";for(const Pe of ge){const qe=ke?ke+" "+Pe:Pe;C.widthOfTextAtSize(qe,q)<=K||ke===""?ke=qe:(le.push(ke),ke=Pe)}return ke&&le.push(ke),le},Ca=(C,v,q,K)=>{C.save(),C.translate(v,q),C.fillStyle="#FFEB3B",C.strokeStyle="#FBC02D",C.lineWidth=2,C.beginPath(),C.rect(0,0,K,K),C.fill(),C.stroke(),C.beginPath(),C.moveTo(K*.6,0),C.lineTo(K,K*.4),C.lineTo(K*.6,K*.4),C.closePath(),C.fillStyle="#FDD835",C.fill(),C.restore()},Lt=async()=>{if(!(!o.value||!b.value)){s.value=!0;try{const C=await it.PDFDocument.load(o.value),v=b.value.pageIndex;let q=C.getPage(v);const{width:K,height:ge}=q.getSize(),le=_o();if(!le)throw new Error(l("pdfTools.pdfRenderCanvasNotFound"));if(Z.value.some(ot=>ot.type===d.REDACT)){if(!window.confirm(l("pdfTools.redactFlattenConfirm"))){s.value=!1;return}const $l=Math.max(2,Math.ceil(le.width/le.getBoundingClientRect().width||window.devicePixelRatio||1)),dl=document.createElement("canvas"),an=le.width/le.height;dl.width=Math.round(le.width*$l),dl.height=Math.round(le.height*$l);const Ia=dl.getContext("2d");Ia.imageSmoothingEnabled=!1,Ia.drawImage(le,0,0,le.width,le.height,0,0,dl.width,dl.height);const ja=dl.toDataURL("image/jpeg",.5),co=await(await fetch(ja)).arrayBuffer(),mo=await C.embedJpg(co),ba=C.insertPage(v+1,[K,ge]);ba.drawImage(mo,{x:0,y:0,width:K,height:ge}),q=ba}const Pe=le.getBoundingClientRect(),qe=le.width,Mt=le.height,At=window.devicePixelRatio||1,Al=qe/Pe.width,jl=Mt/Pe.height,cl=K/qe,Kl=ge/Mt;for(const ot of Z.value){const $l=ot.rect.x/At,dl=ot.rect.y/At,an=ot.rect.w/At,Ia=ot.rect.h/At,ja=$l*Al,co=dl*jl,mo=an*Al,ba=Ia*jl,pa=mo*cl,Gl=ba*Kl,U=ja*cl,V=ge-(co+ba)*Kl;if(ot.type===d.REDACT)q.drawRectangle({x:U,y:V,width:pa,height:Gl,color:it.rgb(0,0,0)});else if(ot.type===d.HIGHLIGHT)q.drawRectangle({x:U,y:V,width:pa,height:Gl,color:it.rgb(1,.92,.23),opacity:.4});else if(ot.type===d.COMMENT){if(q.drawRectangle({x:U,y:V,width:Math.max(14,pa),height:Math.max(14,Gl),color:it.rgb(1,.92,.23),opacity:.9}),ot.payload?.text){const D=String(ot.payload.text).slice(0,200);q.drawText(`Note: ${D}`,{x:U+2,y:V+Gl+2,size:8,color:it.rgb(.2,.2,.2)})}}else if(ot.type===d.IMAGE){let D=null;if(ot.payload?.file?D=await ot.payload.file.arrayBuffer():ot.payload?.signature&&(D=ot.payload.signature),D){let R;try{R=await C.embedPng(D)}catch{R=await C.embedJpg(D)}q.drawImage(R,{x:U,y:V,width:pa,height:Gl,opacity:.98})}}else if(ot.type===d.TEXT){const D=ot.payload||{},R=D.font==="TimesRoman"?it.StandardFonts.TimesRoman:D.font==="Courier"?it.StandardFonts.Courier:it.StandardFonts.Helvetica,se=await C.embedFont(R),he=Math.max(6,Number(D.size)||18),{r:Xe,g:Oe,b:Ce}=ma(D.color||"#000000"),Re=2,Yt=Math.max(1,pa-2*Re),lt=ka(se,String(D.text||""),he,Yt);let ft=V+Gl-he-Re;for(const Ct of lt)if(q.drawText(Ct,{x:U+Re,y:ft,size:he,color:it.rgb(Xe,Oe,Ce)}),ft-=he*1.2,ft<V)break}}const ro=Z.value.some(ot=>ot.type===d.REDACT);ro&&C.removePage(v),await We(C,{updatePages:ro}),Z.value=[],a.toast.add({severity:"success",summary:l("pdfTools.common.success"),detail:l("pdfTools.pageEditor.applySuccess"),life:2e3})}catch(C){console.error("Error applying overlay edits:",C),a.toast.add({severity:"error",summary:l("pdfTools.common.error"),detail:l("pdfTools.pageEditor.applyError"),life:3e3})}finally{s.value=!1}}};e.watch(p,()=>setTimeout(Tl,0)),e.watch(b,()=>setTimeout(Tl,0)),typeof window<"u"&&window.addEventListener("resize",()=>setTimeout(Tl,0));const no=()=>{p.value=1,setTimeout(Tl,0)},qo=()=>{const C=X.value;if(!C)return;const v=window.devicePixelRatio||1,q=440,K=180;C.style.width=q+"px",C.style.height=K+"px",C.width=Math.round(q*v),C.height=Math.round(K*v);const ge=C.getContext("2d");ge.fillStyle="#fff",ge.fillRect(0,0,C.width,C.height)},Ta=()=>{ln(),Y.value=!1},en=C=>{G=!0,j=so(C)},tn=C=>{if(!G)return;const v=so(C);ki(j,v),j=v},Nl=C=>en(C.touches[0]),_l=C=>tn(C.touches[0]),io=()=>{G=!1,j=null},so=C=>{const q=X.value.getBoundingClientRect(),K=window.devicePixelRatio||1,ge=C.clientX??C.pageX,le=C.clientY??C.pageY;return{x:(ge-q.left)*K,y:(le-q.top)*K}},ki=(C,v)=>{const K=X.value.getContext("2d");K.strokeStyle="#111827",K.lineWidth=3*(window.devicePixelRatio||1),K.lineCap="round",K.beginPath(),K.moveTo(C.x,C.y),K.lineTo(v.x,v.y),K.stroke()},ln=()=>{const C=X.value;if(!C)return;const v=C.getContext("2d");v.fillStyle="#fff",v.fillRect(0,0,C.width,C.height)},Ci=()=>{const C=X.value;C&&C.toBlob(async v=>{y.value=await v.arrayBuffer(),W.value=d.IMAGE,Y.value=!1})};return e.watch(Y,C=>{C&&setTimeout(qo,0)}),e.watch(T,async C=>{if(!C){x.value=0;return}try{const v=await C;x.value=v.numPages}catch(v){console.error("Error loading preview PDF:",v),x.value=0}}),(C,v)=>{const q=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",GW,[e.createElementVNode("h1",null,[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.title"))+" ",1),S.value?(e.openBlock(),e.createElementBlock("span",DW,"— "+e.toDisplayString(S.value),1)):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createElementBlock("div",LW,[e.createVNode(e.unref(Bt)),e.createElementVNode("p",null,e.toDisplayString(C.$t("pdfTools.loading")),1)])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",VW,[e.createVNode(e.unref(ml),{severity:"error"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.value),1)]),_:1})])):e.createCommentVNode("",!0),!s.value&&!r.value?(e.openBlock(),e.createElementBlock("div",vW,[e.createElementVNode("div",FW,[e.createElementVNode("div",RW,[e.createElementVNode("h2",null,e.toDisplayString(C.$t("pdfTools.sidebar.actions")),1),e.createElementVNode("div",SW,[e.createVNode(e.unref(de),{icon:"ri-save-2-line",label:C.$t("pdfTools.sidebar.saveNewVersion"),onClick:Ke},null,8,["label"]),e.createVNode(e.unref(de),{severity:"secondary",class:"btn-mt",icon:"ri-file-copy-2-line",label:C.$t("pdfTools.sidebar.saveAs"),onClick:v[0]||(v[0]=K=>rt("saveAs"))},null,8,["label"]),e.createVNode(e.unref(ql)),e.createElementVNode("div",xW,[e.createElementVNode("h3",null,e.toDisplayString(C.$t("pdfTools.sidebar.extractPages")),1),e.createVNode(e.unref(de),{disabled:m.value.length===0,icon:"ri-file-transfer-line",label:C.$t("pdfTools.sidebar.extractAndSave"),onClick:v[1]||(v[1]=K=>rt("extract"))},null,8,["disabled","label"])]),e.createElementVNode("div",UW,[e.createElementVNode("h3",null,e.toDisplayString(C.$t("pdfTools.sidebar.deletePages")),1),e.createVNode(e.unref(de),{disabled:m.value.length===0||n.value.length===m.value.length,severity:"danger",icon:"ri-delete-bin-line",label:C.$t("pdfTools.sidebar.deleteSelectedPages"),onClick:gt},null,8,["disabled","label"])]),e.createElementVNode("div",JW,[e.createElementVNode("h3",null,e.toDisplayString(C.$t("pdfTools.sidebar.insertPdf")),1),e.createElementVNode("div",EW,[e.createVNode(e.unref(ya),{auto:!1,customUpload:!1,showCancelButton:!1,showUploadButton:!1,accept:"application/pdf","choose-label":C.$t("pdfTools.sidebar.fromComputer"),severity:"secondary",class:"btn-full",mode:"basic",name:"pdfToInsert",onSelect:ne},null,8,["choose-label"]),e.createVNode(e.unref(de),{severity:"secondary",icon:"ri-cloud-line",label:C.$t("pdfTools.sidebar.fromPristy"),onClick:Nt},null,8,["label"])])]),e.createElementVNode("div",BW,[e.createElementVNode("h3",null,e.toDisplayString(C.$t("pdfTools.sidebar.addWatermark")),1),e.createVNode(e.unref(_e),{modelValue:O.value,"onUpdate:modelValue":v[2]||(v[2]=K=>O.value=K),placeholder:C.$t("pdfTools.sidebar.watermarkTextPlaceholder"),type:"text"},null,8,["modelValue","placeholder"]),e.createElementVNode("div",HW,[e.createElementVNode("div",null,[e.createVNode(e.unref(Yl),{modelValue:F.value,"onUpdate:modelValue":v[3]||(v[3]=K=>F.value=K),max:360,min:-360,placeholder:C.$t("pdfTools.sidebar.angle"),suffix:"°"},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",null,[e.createVNode(e.unref(Yl),{modelValue:M.value,"onUpdate:modelValue":v[4]||(v[4]=K=>M.value=K),max:10,min:1,placeholder:C.$t("pdfTools.sidebar.repetitions")},null,8,["modelValue","placeholder"])])]),e.createVNode(e.unref(de),{disabled:!O.value||m.value.length===0,severity:"secondary",class:"btn-mt",icon:"ri-paint-brush-line",label:C.$t("pdfTools.sidebar.addWatermarkButton"),onClick:Fe},null,8,["disabled","label"])])])])]),e.createElementVNode("div",QW,[e.createElementVNode("h2",null,e.toDisplayString(C.$t("pdfTools.pagePreview.title")),1),e.createVNode(e.unref(Fi.VueDraggableNext),{modelValue:n.value,"onUpdate:modelValue":v[5]||(v[5]=K=>n.value=K),class:"page-grid","ghost-class":"ghost","item-key":"pageIndex",onEnd:Ue},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,K=>(e.openBlock(),e.createElementBlock("div",{key:K.pageIndex,class:"page-grid-item"},[e.createElementVNode("div",{class:e.normalizeClass([{selected:H(K)},"page-thumbnail"]),onClick:ge=>me(K),onDblclick:e.withModifiers(ge=>kl(K),["stop"])},[e.createElementVNode("div",_W,[e.createVNode(e.unref(el),{binary:"","model-value":H(K)},null,8,["model-value"])]),e.createElementVNode("div",KW,[e.createVNode(e.unref(de),{text:"",rounded:"",icon:"ri-clockwise-line","aria-label":C.$t("pdf.rotationRigth"),onClick:e.withModifiers(ge=>ve(K),["stop"])},null,8,["aria-label","onClick"]),e.createVNode(e.unref(de),{"aria-label":C.$t("pdfTools.pagePreview.openPagePreview",{pageNumber:K.pageNumber}),text:"",rounded:"",icon:"ri-edit-box-line",onClick:e.withModifiers(ge=>kl(K),["stop"])},null,8,["aria-label","onClick"])]),e.createElementVNode("div",$W,[e.createVNode(e.unref(Ll.VuePDF),{annotations:!1,page:K.pageNumber,pdf:e.unref(ie),scale:.25,text:!1},null,8,["page","pdf"])]),e.createElementVNode("div",qW,e.toDisplayString(K.pageNumber),1)],42,PW)]))),128))]),_:1},8,["modelValue"])])])):e.createCommentVNode("",!0),e.createVNode(e.unref(pt),{visible:h.value,"onUpdate:visible":v[14]||(v[14]=K=>h.value=K),breakpoints:{"960px":"95vw","640px":"100vw"},dismissableMask:"",modal:"",class:"dialog-page-editor","content-class":"page-editor-dialog",onHide:bt},{header:e.withCtx(()=>[e.createElementVNode("div",e9,[v[21]||(v[21]=e.createElementVNode("i",{class:"ri-file-fill","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(C.$t("pdfTools.pageEditor.title",{pageNumber:(b.value||c.value)?.pageNumber||"",filename:S.value})),1)])]),footer:e.withCtx(()=>[e.createElementVNode("div",b9,[e.createElementVNode("small",null,e.toDisplayString(C.$t("pdfTools.pageEditor.footerHint")),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",t9,[e.createVNode(e.unref(de),{text:"",icon:"ri-zoom-out-line","aria-label":C.$t("pdf.dezoom"),onClick:Hl},null,8,["aria-label"]),e.createVNode(e.unref(de),{text:"",icon:"ri-zoom-in-line","aria-label":C.$t("pdf.zoom"),onClick:Cl},null,8,["aria-label"]),e.createVNode(e.unref(de),{text:"",label:C.$t("pdfTools.pageEditor.fit"),onClick:no},null,8,["label"]),e.createElementVNode("span",l9,e.toDisplayString(Math.round(p.value*100))+"%",1),v[22]||(v[22]=e.createElementVNode("span",{class:"spacer"},null,-1)),e.createVNode(e.unref(de),{text:"",icon:"ri-close-line",label:C.$t("pdfTools.pageEditor.close"),onClick:bt},null,8,["label"])]),e.createElementVNode("div",a9,[e.createElementVNode("div",o9,[e.createElementVNode("h4",null,e.toDisplayString(C.$t("pdfTools.pageEditor.tools.actions")),1),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.SELECT}),icon:"ri-cursor-line",label:C.$t("pdfTools.pageEditor.tools.select"),onClick:v[6]||(v[6]=K=>ca(d.SELECT))},null,8,["class","label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.REDACT}),icon:"ri-eraser-fill",label:C.$t("pdfTools.pageEditor.tools.redact"),onClick:v[7]||(v[7]=K=>ca(d.REDACT))},null,8,["class","label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.HIGHLIGHT}),icon:"ri-mark-pen-line",label:C.$t("pdfTools.pageEditor.tools.highlight"),onClick:v[8]||(v[8]=K=>ca(d.HIGHLIGHT))},null,8,["class","label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.COMMENT}),icon:"ri-sticky-note-line",label:C.$t("pdfTools.pageEditor.tools.comment"),onClick:v[9]||(v[9]=K=>ca(d.COMMENT))},null,8,["class","label"]),e.createVNode(e.unref(ya),{severity:"secondary",class:e.normalizeClass({active:W.value===d.IMAGE}),accept:"image/*","choose-label":C.$t("pdfTools.pageEditor.tools.image"),mode:"basic",name:"image",onSelect:rl},null,8,["class","choose-label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.SIGNATURE}),icon:"ri-ball-pen-line",label:C.$t("pdfTools.pageEditor.tools.signature"),onClick:ao},null,8,["class","label"]),e.createVNode(e.unref(de),{text:"",severity:"secondary",class:e.normalizeClass({active:W.value===d.TEXT}),icon:"ri-font-size",label:C.$t("pdfTools.pageEditor.tools.text"),onClick:v[10]||(v[10]=K=>ca(d.TEXT))},null,8,["class","label"]),W.value===d.TEXT?(e.openBlock(),e.createElementBlock("div",n9,[e.createElementVNode("div",i9,[e.createElementVNode("label",s9,e.toDisplayString(C.$t("pdfTools.pageEditor.tools.font")),1),e.createVNode(e.unref(Dt),{modelValue:g.value,"onUpdate:modelValue":v[11]||(v[11]=K=>g.value=K),options:I,class:"input-full",optionLabel:"label",optionValue:"value"},null,8,["modelValue"])]),e.createElementVNode("div",r9,[e.createElementVNode("label",c9,e.toDisplayString(C.$t("pdfTools.pageEditor.tools.size")),1),e.createVNode(e.unref(Yl),{modelValue:J.value,"onUpdate:modelValue":v[12]||(v[12]=K=>J.value=K),max:144,min:6},null,8,["modelValue"])]),e.createElementVNode("div",d9,[e.createElementVNode("label",m9,e.toDisplayString(C.$t("pdfTools.pageEditor.tools.color")),1),e.createVNode(e.unref(_e),{modelValue:ae.value,"onUpdate:modelValue":v[13]||(v[13]=K=>ae.value=K),class:"input-full",placeholder:"#000000"},null,8,["modelValue"])])])):e.createCommentVNode("",!0),e.createVNode(e.unref(ql)),e.createVNode(e.unref(de),{disabled:Z.value.length===0,severity:"info",class:"btn-full btn-mt-auto",icon:"ri-check-line",label:C.$t("pdfTools.pageEditor.apply"),onClick:Lt},null,8,["disabled","label"]),e.createVNode(e.unref(de),{disabled:Z.value.length===0,severity:"warn",class:"btn-full btn-mt-sm",icon:"ri-arrow-go-back-line",label:C.$t("pdfTools.pageEditor.cancel"),onClick:zi},null,8,["disabled","label"])]),e.createElementVNode("div",{class:"page-editor-canvas",onWheelPassive:Tl,onScrollPassive:Tl},[e.createElementVNode("div",{ref_key:"pdfCanvasWrapper",ref:A,class:"pdf-canvas-wrapper"},[e.unref(ie)&&(b.value||c.value)?(e.openBlock(),e.createBlock(e.unref(Ll.VuePDF),{key:0,annotations:!1,page:(b.value||c.value).pageNumber,pdf:e.unref(ie),scale:p.value,text:!1,class:"pdf-canvas-absolute"},null,8,["page","pdf","scale"])):e.createCommentVNode("",!0),e.createElementVNode("canvas",{ref_key:"overlayCanvas",ref:f,class:"overlay-canvas",onMousedown:$o,onMouseleave:wi,onMousemove:Xi,onMouseup:Oi},null,544)],512)],32)])]),_:1},8,["visible"]),e.createVNode(e.unref(pt),{visible:Y.value,"onUpdate:visible":v[15]||(v[15]=K=>Y.value=K),modal:"",class:"dialog-signature-pad",onHide:Ta},{header:e.withCtx(()=>[e.createElementVNode("div",p9,[v[23]||(v[23]=e.createElementVNode("i",{class:"ri-ball-pen-line","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(C.$t("pdfTools.signaturePad.title")),1)])]),footer:e.withCtx(()=>[e.createElementVNode("div",h9,[e.createVNode(e.unref(de),{text:"",label:C.$t("pdfTools.signaturePad.clear"),onClick:ln},null,8,["label"]),e.createVNode(e.unref(de),{text:"",label:C.$t("pdfTools.signaturePad.use"),onClick:Ci},null,8,["label"])])]),default:e.withCtx(()=>[e.createElementVNode("div",u9,[e.createElementVNode("canvas",{ref_key:"signaturePadCanvas",ref:X,class:"signature-canvas",onMousedown:en,onMouseleave:io,onMousemove:tn,onMouseup:io,onTouchstart:e.withModifiers(Nl,["prevent"]),onTouchmove:e.withModifiers(_l,["prevent"]),onTouchend:e.withModifiers(io,["prevent"])},null,544)])]),_:1},8,["visible"]),e.createVNode(jW,{"default-filename":ee.value,visible:pe.value,"parent-folder-node":ye.value,onClose:v[16]||(v[16]=K=>pe.value=!1),onSave:Kt},null,8,["default-filename","visible","parent-folder-node"]),e.createVNode(e.unref(pt),{visible:_.value,modal:"",header:C.$t("pdfTools.insertFromAlfresco.title"),class:"dialog-insert-pdf","onUpdate:visible":v[20]||(v[20]=K=>_.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("div",q9,[e.createElementVNode("div",e4,[Ne.value?(e.openBlock(),e.createElementBlock("div",t4,[e.createElementVNode("span",l4,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.selected")),1),e.withDirectives((e.openBlock(),e.createElementBlock("span",a4,[e.createTextVNode(e.toDisplayString(Ne.value?.name),1)])),[[q,Ne.value?.name,void 0,{top:!0}]])])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",o4,e.toDisplayString(ue.value),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",n4,[e.createVNode(e.unref(de),{label:C.$t("pdfTools.insertFromAlfresco.cancel"),text:"",onClick:v[19]||(v[19]=K=>_.value=!1)},null,8,["label"]),e.createVNode(e.unref(de),{disabled:!be.value,label:C.$t("pdfTools.insertFromAlfresco.insert"),icon:"ri-add-line",onClick:we},null,8,["disabled","label"])])])]),default:e.withCtx(()=>[e.createVNode(e.unref(Ga),{value:0,"onUpdate:value":ce},{default:e.withCtx(()=>[e.createVNode(e.unref(Da),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Vl),{value:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.browse")),1)]),_:1}),e.createVNode(e.unref(Vl),{value:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.search")),1)]),_:1}),e.createVNode(e.unref(Vl),{value:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.favorites")),1)]),_:1}),e.createVNode(e.unref(Vl),{value:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.linkOrId")),1)]),_:1})]),_:1}),e.createVNode(e.unref(on),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha),{value:0},{default:e.withCtx(()=>[e.createVNode(aa,{showUserHome:"",showFiles:"",onSelectNode:nl})]),_:1}),e.createVNode(e.unref(ha),{value:1},{default:e.withCtx(()=>[e.createElementVNode("div",y9,[e.createVNode(e.unref(_e),{modelValue:De.value,"onUpdate:modelValue":v[17]||(v[17]=K=>De.value=K),placeholder:C.$t("pdfTools.insertFromAlfresco.searchPlaceholder"),onKeyup:e.withKeys(kt,["enter"])},null,8,["modelValue","placeholder"]),e.createVNode(e.unref(de),{icon:"ri-search-line","aria-label":C.$t("search"),onClick:kt},null,8,["aria-label"])]),Je.value?(e.openBlock(),e.createElementBlock("div",Z9,[e.createVNode(e.unref(Bt),{class:"spinner-sm",strokeWidth:"8"}),e.createElementVNode("span",null,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.searching")),1)])):!Ve.value.length&&st.value?(e.openBlock(),e.createElementBlock("div",g9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.noPdfFound")),1)):Ve.value.length?(e.openBlock(),e.createElementBlock("div",f9,[e.createElementVNode("div",W9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ve.value,K=>(e.openBlock(),e.createElementBlock("div",{key:K.id,class:e.normalizeClass(["favorite-item",{"favorite-item-selected":Ne.value?.id===K.id}]),onClick:ge=>$e(K)},[e.createElementVNode("div",A9,[v[24]||(v[24]=e.createElementVNode("i",{class:"ri-file-pdf-line","aria-hidden":"true"},null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("span",Y9,[e.createTextVNode(e.toDisplayString(K.name),1)])),[[q,K.name,void 0,{top:!0}]])])],10,N9))),128))]),e.createElementVNode("div",z9,[Ne.value?te.value?(e.openBlock(),e.createElementBlock("div",O9,[e.createVNode(e.unref(Bt),{class:"spinner-md",strokeWidth:"6"}),e.createElementVNode("p",w9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.loadingPreview")),1)])):e.unref(T)?(e.openBlock(),e.createElementBlock("div",k9,[x.value>0?(e.openBlock(),e.createElementBlock("div",C9,[e.createVNode(e.unref(de),{icon:"ri-arrow-left-s-line","aria-label":C.$t("pdf.previousPage"),text:"",size:"small",disabled:k.value<=1,onClick:wt},null,8,["aria-label","disabled"]),e.createElementVNode("span",T9,e.toDisplayString(k.value)+" / "+e.toDisplayString(x.value),1),e.createVNode(e.unref(de),{icon:"ri-arrow-right-s-line","aria-label":C.$t("pdf.nextPage"),text:"",size:"small",disabled:k.value>=x.value,onClick:Be},null,8,["aria-label","disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",I9,[e.createVNode(e.unref(Ll.VuePDF),{pdf:e.unref(T),page:k.value,scale:.6,annotations:!1,text:!1},null,8,["pdf","page"])])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",M9,[v[25]||(v[25]=e.createElementVNode("i",{class:"ri-file-pdf-line preview-icon","aria-hidden":"true"},null,-1)),e.createElementVNode("p",X9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")),1)]))])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.unref(ha),{value:2},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock("div",j9,[e.createVNode(e.unref(Bt),{class:"spinner-sm",strokeWidth:"8"}),e.createElementVNode("span",null,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.loading")),1)])):Se.value.length?(e.openBlock(),e.createElementBlock("div",D9,[e.createElementVNode("div",L9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,K=>(e.openBlock(),e.createElementBlock("div",{key:K.id,class:e.normalizeClass(["favorite-item",{"favorite-item-selected":Ne.value?.id===K.id}]),onClick:ge=>$e(K)},[e.createElementVNode("div",v9,[v[26]||(v[26]=e.createElementVNode("i",{class:"ri-file-pdf-line","aria-hidden":"true"},null,-1)),e.withDirectives((e.openBlock(),e.createElementBlock("span",F9,[e.createTextVNode(e.toDisplayString(K.name),1)])),[[q,K.name,void 0,{top:!0}]])])],10,V9))),128))]),e.createElementVNode("div",R9,[Ne.value?te.value?(e.openBlock(),e.createElementBlock("div",U9,[e.createVNode(e.unref(Bt),{class:"spinner-md",strokeWidth:"6"}),e.createElementVNode("p",J9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.loadingPreview")),1)])):e.unref(T)?(e.openBlock(),e.createElementBlock("div",E9,[x.value>0?(e.openBlock(),e.createElementBlock("div",B9,[e.createVNode(e.unref(de),{icon:"ri-arrow-left-s-line","aria-label":C.$t("pdf.previousPage"),text:"",size:"small",disabled:k.value<=1,onClick:wt},null,8,["aria-label","disabled"]),e.createElementVNode("span",H9,e.toDisplayString(k.value)+" / "+e.toDisplayString(x.value),1),e.createVNode(e.unref(de),{icon:"ri-arrow-right-s-line","aria-label":C.$t("pdf.nextPage"),text:"",size:"small",disabled:k.value>=x.value,onClick:Be},null,8,["aria-label","disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Q9,[e.createVNode(e.unref(Ll.VuePDF),{pdf:e.unref(T),page:k.value,scale:.6,annotations:!1,text:!1},null,8,["pdf","page"])])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",S9,[v[27]||(v[27]=e.createElementVNode("i",{class:"ri-file-pdf-line preview-icon","aria-hidden":"true"},null,-1)),e.createElementVNode("p",x9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.selectPdfToPreview")),1)]))])])):(e.openBlock(),e.createElementBlock("div",G9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.noPdfFavorite")),1))]),_:1}),e.createVNode(e.unref(ha),{value:3},{default:e.withCtx(()=>[e.createElementVNode("div",P9,[e.createElementVNode("div",_9,[e.createElementVNode("label",K9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.alfrescoIdUrl")),1),e.createVNode(e.unref(_e),{id:"alfrescoNodeId",modelValue:B.value,"onUpdate:modelValue":v[18]||(v[18]=K=>B.value=K),placeholder:C.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")},null,8,["modelValue","placeholder"]),e.createElementVNode("small",$9,e.toDisplayString(C.$t("pdfTools.insertFromAlfresco.alfrescoIdUrlHint")),1)])])]),_:1})]),_:1})]),_:1})]),_:1},8,["visible","header"])])}}},[["__scopeId","data-v-bac820c0"]]),i4={class:"version-selectors"},s4={class:"version-selector-group"},r4={key:0,class:"flex align-items-center gap-2"},c4={key:1},d4={class:"flex align-items-center gap-2"},m4={class:"version-selector-group"},b4={key:0,class:"flex align-items-center gap-2"},p4={key:1},u4={class:"flex align-items-center gap-2"},h4={key:0,class:"diff-content"},y4={class:"diff-headers"},Z4={class:"header-a"},g4={class:"header-b"},f4={class:"diff-viewer"},W4={key:0,class:"loading-container"},N4={key:1,class:"error-container"},oi=fe({__name:"DiffViewerDialog",props:{visible:{type:Boolean,required:!0},contentNode:{type:Object,required:!0},versions:{type:Array,default:()=>[]},initialVersionId:{type:String,default:null}},emits:["update:visible","revertVersion"],setup(t,{emit:l}){const{t:a}=Rt.useI18n(),i=bl.useToast(),{isDarkMode:o}=jo(),n=t,s=l,r=e.ref(n.visible),c=e.ref(null),m=e.ref(null),h=e.ref(""),b=e.ref(""),p=e.ref(!1),d=e.ref(null),W=e.ref(null),Z=e.ref(null),N=e.computed(()=>{if(!n.versions)return[];const O=n.versions.map(F=>({label:`${a("diffViewer.version")} ${F.entry.id} (${new Date(F.entry.modifiedAt).toLocaleDateString()})`,id:F.entry.id})).reverse();return O.map((F,M)=>({...F,isCurrent:M===O.length-1}))}),y=e.computed(()=>N.value.filter(O=>O.id!==m.value)),A=e.computed(()=>N.value.filter(O=>O.id!==c.value)),f=e.computed(()=>{switch(n.contentNode?.content?.mimeType||""){case"text/html":return[Li.html()];case"text/markdown":case"text/x-markdown":return[ho.markdown()];case"application/json":return[mn.json()];case"application/xml":case"text/xml":return[bn.xml()];case"application/x-yaml":case"text/yaml":return[yo.yaml()];default:return[]}}),Y=O=>{r.value=O,s("update:visible",O)},X=async()=>{if(!(!c.value||!m.value)){p.value=!0,d.value=null;try{const[O,F]=await Promise.all([Ye.getVersionContent(n.contentNode.id,c.value),Ye.getVersionContent(n.contentNode.id,m.value)]);let M=await O.text(),I=await F.text();if(n.contentNode?.content?.mimeType==="application/json")try{M=JSON.stringify(JSON.parse(M),null,2),I=JSON.stringify(JSON.parse(I),null,2)}catch(g){console.error("Failed to format JSON:",g)}h.value=M,b.value=I,p.value=!1,await e.nextTick(),G()}catch(O){console.error("Error fetching versions:",O),d.value=a("diffViewer.errors.loadError"),p.value=!1}}},G=()=>{if(Z.value&&(Z.value.destroy(),Z.value=null),!W.value||!h.value&&!b.value)return;const O=o()?Di.oneDark:la.syntaxHighlighting(la.defaultHighlightStyle,{fallback:!0}),F=[Wt.lineNumbers(),...f.value,O,Ml.EditorState.readOnly.of(!0)];try{Z.value=new $m.MergeView({a:{doc:h.value,extensions:F},b:{doc:b.value,extensions:F},parent:W.value})}catch(M){console.error("Error creating MergeView:",M),d.value="Failed to create diff view: "+M.message}},j=()=>{if(N.value.length>=2){const O=N.value.length;n.initialVersionId&&N.value.some(F=>F.id===n.initialVersionId)?(c.value=n.initialVersionId,m.value=N.value[O-1]?.id===n.initialVersionId?N.value[O-2]?.id:N.value[O-1]?.id):(c.value=N.value[O-2]?.id,m.value=N.value[O-1]?.id)}},L=O=>N.value.find(F=>F.id===O)?.isCurrent,z=async O=>{const F=a("diffViewer.restoredVersionComment",{versionNumber:O});try{await Ye.revertVersion(n.contentNode.id,O,F),s("revertVersion"),i.add({severity:"success",summary:a("diffViewer.revertVersion.success"),detail:a("diffViewer.revertVersion.successDetail"),life:3e3}),Y(!1)}catch(M){console.error("Error reverting version:",M),i.add({severity:"error",summary:a("diffViewer.revertVersion.error"),detail:M.message,life:3e3})}};return e.watch(()=>n.visible,O=>{r.value=O,O?j():(Z.value&&(Z.value.destroy(),Z.value=null),c.value=null,m.value=null,h.value="",b.value="",d.value=null)}),e.watch([c,m],()=>{c.value&&m.value&&X()}),e.watch(()=>n.versions,O=>{O&&O.length>=2&&r.value&&j()},{deep:!0}),(O,F)=>{const M=e.resolveDirective("tooltip");return e.openBlock(),e.createBlock(e.unref(pt),{visible:r.value,"onUpdate:visible":[F[4]||(F[4]=I=>r.value=I),Y],header:O.$t("diffViewer.compareTitle"),modal:"",maximizable:"",class:"diff-viewer-dialog"},{default:e.withCtx(()=>[e.createElementVNode("div",i4,[e.createElementVNode("div",s4,[e.createVNode(e.unref(Dt),{modelValue:c.value,"onUpdate:modelValue":F[0]||(F[0]=I=>c.value=I),options:y.value,"option-label":"label","option-value":"id",placeholder:O.$t("diffViewer.selectVersionA"),class:"flex-grow-1"},{value:e.withCtx(I=>[I.value?(e.openBlock(),e.createElementBlock("div",r4,[e.createElementVNode("span",null,e.toDisplayString(N.value.find(g=>g.id===I.value)?.label),1),N.value.find(g=>g.id===I.value)?.isCurrent?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,value:O.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",c4,e.toDisplayString(I.placeholder),1))]),option:e.withCtx(I=>[e.createElementVNode("div",d4,[e.createElementVNode("span",null,e.toDisplayString(I.option.label),1),I.option.isCurrent?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,value:O.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder"]),c.value&&!L(c.value)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:0,type:"button",icon:"ri-history-line","aria-label":O.$t("diffViewer.revertToThisVersion",{versionNumber:c.value}),onClick:F[1]||(F[1]=I=>z(c.value)),severity:"secondary",rounded:"",text:""},null,8,["aria-label"])),[[M,O.$t("diffViewer.revertToThisVersion",{versionNumber:c.value}),void 0,{top:!0}]]):e.createCommentVNode("",!0)]),e.createElementVNode("div",m4,[e.createVNode(e.unref(Dt),{modelValue:m.value,"onUpdate:modelValue":F[2]||(F[2]=I=>m.value=I),options:A.value,"option-label":"label","option-value":"id",placeholder:O.$t("diffViewer.selectVersionB"),class:"flex-grow-1"},{value:e.withCtx(I=>[I.value?(e.openBlock(),e.createElementBlock("div",b4,[e.createElementVNode("span",null,e.toDisplayString(N.value.find(g=>g.id===I.value)?.label),1),N.value.find(g=>g.id===I.value)?.isCurrent?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,value:O.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",p4,e.toDisplayString(I.placeholder),1))]),option:e.withCtx(I=>[e.createElementVNode("div",u4,[e.createElementVNode("span",null,e.toDisplayString(I.option.label),1),I.option.isCurrent?(e.openBlock(),e.createBlock(e.unref(Ua),{key:0,value:O.$t("diffViewer.currentVersion"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","options","placeholder"]),m.value&&!L(m.value)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:0,type:"button",icon:"ri-history-line","aria-label":O.$t("diffViewer.revertToThisVersion",{versionNumber:m.value}),onClick:F[3]||(F[3]=I=>z(m.value)),severity:"secondary",rounded:"",text:""},null,8,["aria-label"])),[[M,O.$t("diffViewer.revertToThisVersion",{versionNumber:m.value}),void 0,{top:!0}]]):e.createCommentVNode("",!0)])]),c.value&&m.value?(e.openBlock(),e.createElementBlock("div",h4,[e.createElementVNode("div",y4,[e.createElementVNode("div",Z4,[e.createElementVNode("strong",null,e.toDisplayString(O.$t("diffViewer.version"))+" "+e.toDisplayString(c.value),1)]),e.createElementVNode("div",g4,[e.createElementVNode("strong",null,e.toDisplayString(O.$t("diffViewer.version"))+" "+e.toDisplayString(m.value),1)])]),e.createElementVNode("div",f4,[p.value?(e.openBlock(),e.createElementBlock("div",W4,[e.createVNode(e.unref(Bt))])):d.value?(e.openBlock(),e.createElementBlock("div",N4,[F[5]||(F[5]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2 text-2xl","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(d.value),1)])):(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"mergeViewContainer",ref:W},null,512))])])):e.createCommentVNode("",!0)]),_:1},8,["visible","header"])}}},[["__scopeId","data-v-60abb8bc"]]),A4={reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,maxReconnectAttempts:10,heartbeatInterval:3e4,messageBufferSize:100},vt={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",RECONNECTING:"reconnecting",ERROR:"error"};function nm(t={}){const l={...A4,...t},a=e.ref(vt.DISCONNECTED),i=e.ref(null),o=e.ref(null),n=e.ref(0),s=e.shallowRef([]);let r=null,c=null,m=null,h=null,b=!1;const p={onConnected:[],onDisconnected:[],onMessage:[],onError:[],onReconnecting:[]},d=(F,M)=>(p[F]&&p[F].push(M),()=>W(F,M)),W=(F,M)=>{if(p[F]){const I=p[F].indexOf(M);I>-1&&p[F].splice(I,1)}},Z=(F,...M)=>{p[F]&&p[F].forEach(I=>I(...M))},N=F=>new Promise((M,I)=>{if(r&&r.readyState===WebSocket.OPEN){M();return}h=F,b=!1,a.value=vt.CONNECTING;try{r=new WebSocket(F),r.onopen=()=>{a.value=vt.CONNECTED,n.value=0,i.value=null,Y(),L(),Z("onConnected"),M()},r.onclose=g=>{if(X(),o.value=g.code,a.value=vt.DISCONNECTED,g.code===1009){a.value=vt.ERROR,Z("onDisconnected",g);return}!b&&!g.wasClean&&G(),Z("onDisconnected",g)},r.onerror=g=>{i.value=g,a.value=vt.ERROR,Z("onError",g),I(g)},r.onmessage=g=>{try{const J=JSON.parse(g.data);f(J)}catch(J){console.error("[CollabWebSocket] Failed to parse message:",J)}}}catch(g){i.value=g,a.value=vt.ERROR,Z("onError",g),I(g)}}),y=()=>{b=!0,X(),j(),r&&(r.close(1e3,"User disconnected"),r=null),a.value=vt.DISCONNECTED,s.value=[]},A=F=>{const M=JSON.stringify(F);return r&&r.readyState===WebSocket.OPEN?(r.send(M),!0):(s.value.length<l.messageBufferSize?s.value=[...s.value,M]:console.warn("[CollabWebSocket] Message buffer full, dropping message"),!1)},f=F=>{F.type!=="pong"&&Z("onMessage",F)},Y=()=>{X(),c=setInterval(()=>{r&&r.readyState===WebSocket.OPEN&&A({type:"ping"})},l.heartbeatInterval)},X=()=>{c&&(clearInterval(c),c=null)},G=()=>{if(n.value>=l.maxReconnectAttempts){console.error("[CollabWebSocket] Max reconnection attempts reached"),a.value=vt.ERROR;return}a.value=vt.RECONNECTING,n.value++;const F=Math.min(l.reconnectInterval*Math.pow(l.reconnectDecay,n.value-1),l.maxReconnectInterval);Z("onReconnecting",n.value,F),m=setTimeout(()=>{h&&!b&&(s.value=[],N(h).catch(()=>{}))},F)},j=()=>{m&&(clearTimeout(m),m=null)},L=()=>{if(r&&r.readyState===WebSocket.OPEN&&s.value.length>0){const F=[...s.value];s.value=[],F.forEach(M=>{r.send(M)})}},z=()=>r&&r.readyState===WebSocket.OPEN,O=()=>{n.value=0};return e.onUnmounted(()=>{y()}),{connectionState:e.readonly(a),lastError:e.readonly(i),lastCloseCode:e.readonly(o),reconnectAttempts:e.readonly(n),bufferedMessages:e.readonly(s),connect:N,disconnect:y,send:A,isConnected:z,resetReconnectAttempts:O,on:d,off:W}}class Y4{constructor(){this.basePath="/api/collab"}getBaseUrl(){return Ee.config.hostEcm}async getTicket(){return Ee.getTicketEcm()}createAuthHeader(l){return`Basic ${btoa(`ROLE_TICKET:${l}`)}`}async checkAvailability(l){try{const a=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s${this.basePath}/availability/${l}`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(a)}});if(!i.ok){if(i.status===404)return{available:!1,enabled:!1,permissionLevel:"NONE"};if(i.status===403)return{available:!1,enabled:!0,permissionLevel:"NONE",reason:"NO_READ_PERMISSION"};throw new Error(`HTTP ${i.status}: ${i.statusText}`)}return await i.json()}catch(a){throw console.error("[CollabService] Error checking availability:",a),Ge("collabService.checkAvailability",a)}}async initSession(l){try{const a=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s${this.basePath}/session/init`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:this.createAuthHeader(a)},body:JSON.stringify({nodeId:l})});if(!i.ok){const o=await i.json();throw new Error(o.error||`HTTP ${i.status}`)}return await i.json()}catch(a){throw console.error("[CollabService] Error initializing session:",a),Ge("collabService.initSession",a)}}getWebSocketUrl(){const l=this.getBaseUrl(),a=l.startsWith("https")?"wss":"ws",i=l.replace(/^https?:\/\//,"");return`${a}://${i}/alfresco/collab`}generateClientId(){return`client-${Date.now()}-${Math.random().toString(36).substring(2,11)}`}}const sa=new Y4,z4="pristy-collab-backups",El="backups",M4=1;let Ma=null;const ni=()=>Ma?Promise.resolve(Ma):new Promise((t,l)=>{const a=indexedDB.open(z4,M4);a.onupgradeneeded=i=>{const o=i.target.result;o.objectStoreNames.contains(El)||o.createObjectStore(El,{keyPath:"nodeId"})},a.onsuccess=i=>{Ma=i.target.result,Ma.onclose=()=>{Ma=null},t(Ma)},a.onerror=i=>{l(i.target.error)}}),Ro={async saveBackup(t,l,a){try{const i=await ni();return new Promise((o,n)=>{const s=i.transaction(El,"readwrite");s.objectStore(El).put({nodeId:t,content:l,timestamp:Date.now(),sessionId:a}),s.oncomplete=()=>o(),s.onerror=c=>n(c.target.error)})}catch(i){console.warn("[CollabBackup] Failed to save backup:",i)}},async loadBackup(t){try{const l=await ni();return new Promise((a,i)=>{const s=l.transaction(El,"readonly").objectStore(El).get(t);s.onsuccess=()=>a(s.result||null),s.onerror=r=>i(r.target.error)})}catch(l){return console.warn("[CollabBackup] Failed to load backup:",l),null}},async clearBackup(t){try{const l=await ni();return new Promise((a,i)=>{const o=l.transaction(El,"readwrite");o.objectStore(El).delete(t),o.oncomplete=()=>a(),o.onerror=s=>i(s.target.error)})}catch(l){console.warn("[CollabBackup] Failed to clear backup:",l)}}},Bl="editor",ra="observer",im=2;class X4 extends Wt.WidgetType{constructor(l){super(),this.peer=l}toDOM(){const l=document.createElement("span");l.className="cm-remote-cursor",l.style.borderLeft=`2px solid ${this.peer.color}`,l.style.marginLeft="-1px",l.style.position="relative";const a=document.createElement("span");return a.className="cm-remote-cursor-label",a.style.backgroundColor=this.peer.color,a.style.color="#fff",a.style.padding="1px 4px",a.style.borderRadius="3px",a.style.fontSize="10px",a.style.position="absolute",a.style.top="-18px",a.style.left="0",a.style.whiteSpace="nowrap",a.textContent=this.peer.displayName,l.appendChild(a),l}}const sm=Ml.StateEffect.define(),So=Ml.StateField.define({create(){return[]},update(t,l){for(const a of l.effects)if(a.is(sm))return a.value;return t}}),O4=Wt.ViewPlugin.fromClass(class{constructor(t){this.decorations=this.createDecorations(t)}update(t){(t.docChanged||t.state.field(So)!==t.startState.field(So))&&(this.decorations=this.createDecorations(t.view))}createDecorations(t){const l=t.state.field(So),a=[];for(const i of l)if(i.position>=0&&i.position<=t.state.doc.length&&(a.push(Wt.Decoration.widget({widget:new X4(i),side:1}).range(i.position)),i.anchor!==i.position)){const o=Math.min(i.anchor,i.position),n=Math.max(i.anchor,i.position);a.push(Wt.Decoration.mark({class:"cm-remote-selection",attributes:{style:`background-color: ${i.color}33`}}).range(o,n))}return Wt.Decoration.set(a,!0)}},{decorations:t=>t.decorations});function rm(){const t=e.ref(!1),l=e.ref(null),a=e.ref(null),i=e.ref(null),o=e.ref(null),n=e.shallowRef([]),s=e.shallowRef([]),r=e.ref(0),c=e.ref(null),m=e.ref(!1),h=e.ref(!1),b=e.ref(null);let p=null,d=null;const{connectionState:W,lastCloseCode:Z,connect:N,disconnect:y,send:A,on:f,off:Y,resetReconnectAttempts:X}=nm();let G=null,j=null,L=null,z=null,O=null,F=null;const M=new Ml.Compartment;let I=null;const g=ce=>{G=ce},J=e.computed(()=>n.value.length),ae=e.computed(()=>W.value===vt.CONNECTED),Q=e.computed(()=>W.value===vt.RECONNECTING),pe=e.computed(()=>W.value===vt.ERROR),P=e.computed(()=>o.value===Bl),ee=e.computed(()=>o.value===ra),S=e.computed(()=>n.value.filter(ce=>ce.role===Bl).length),E=e.computed(()=>n.value.filter(ce=>ce.role===ra).length),ye=e.computed(()=>b.value==="WRITE"),_=e.computed(()=>b.value==="READ"||b.value==="WRITE"),B=ce=>[Ja.collab({startVersion:ce,clientID:a.value,sharedEffects:we=>{if(we.selection){const Qe=we.selection.main;Ue(Qe.head,Qe.anchor)}return[]}}),So,O4,M.of(Wt.EditorView.editable.of(!0))],ue=async ce=>new Promise((we,Qe)=>{const $e=setTimeout(()=>{Y("onMessage",Be),Qe(new Error("Authentication timeout"))},5e3),Be=wt=>{wt.type==="authenticated"?(clearTimeout($e),Y("onMessage",Be),we()):wt.type==="error"&&wt.code==="AUTH_FAILED"&&(clearTimeout($e),Y("onMessage",Be),Qe(new Error(wt.message||"Authentication failed")))};f("onMessage",Be),A({type:"auth",ticket:ce})}),Ne=async(ce,we,Qe,$e=ra,Be=null,wt=null,nl=null)=>{t.value&&await be(),m.value=!1;try{j=ce,G=we,a.value=sa.generateClientId(),p=Be,d=wt,I=nl,z=Qe,O=$e;const kt=await sa.checkAvailability(j);if(b.value=kt.permissionLevel||"WRITE",!kt.enabled)throw new Error("Collaborative editing is not available for this document");if(kt.permissionLevel==="NONE")throw new Error("Access denied to this document");kt.permissionLevel==="READ"&&$e===Bl&&($e=ra);const il=sa.getWebSocketUrl();f("onMessage",st),f("onDisconnected",oe),f("onReconnecting",ie),f("onConnected",H),await N(il);const sl=await sa.getTicket();return await ue(sl),new Promise((ne,Me)=>{const Fe=setTimeout(()=>{Me(new Error("Timeout waiting for welcome message"))},1e4),Ke=rt=>{rt.type==="welcome"?(clearTimeout(Fe),Y("onMessage",Ke),De(rt),ne(rt)):rt.type==="error"&&(clearTimeout(Fe),Y("onMessage",Ke),rt.code==="SESSION_FULL"&&(m.value=!0),Me(new Error(rt.message)))};f("onMessage",Ke),A({type:"join",nodeId:j,clientId:a.value,displayName:Qe,mode:$e,protocolVersion:im})})}catch(kt){throw c.value=kt,kt}},be=async()=>{if(t.value){if(L&&(clearTimeout(L),L=null),F&&(clearInterval(F),F=null),G&&j){const ce=G.state.doc.toString();await Ro.saveBackup(j,ce,l.value).catch(()=>{})}l.value&&a.value&&A({type:"leave",sessionId:l.value,clientId:a.value}),Y("onMessage",st),Y("onDisconnected",oe),Y("onReconnecting",ie),Y("onConnected",H),y(),t.value=!1,l.value=null,n.value=[],s.value=[],i.value=null,o.value=null,b.value=null,p=null,d=null,I=null,z=null,O=null,G=null,j=null}},De=ce=>{l.value=ce.sessionId,r.value=ce.version,i.value=ce.color,o.value=ce.role||ra,n.value=ce.peers||[],t.value=!0,ve(),F&&clearInterval(F),F=setInterval(()=>{if(G&&j){const we=G.state.doc.toString();Ro.saveBackup(j,we,l.value).catch(()=>{})}},1e4)},Ve=ce=>ce.toJSON(),Je=ce=>Ml.ChangeSet.fromJSON(ce),st=ce=>{switch(ce.type){case"updates":Se(ce);break;case"peers":u(ce);break;case"cursor":te(ce);break;case"promoted":T(ce);break;case"saved":k(ce);break;case"resync":me(ce);break;case"error":$(ce);break}},Se=ce=>{if(!G&&p&&ce.document!==void 0){p(ce.document,ce.version);return}if(!G)return;const we=ce.updates.map(Qe=>({changes:Je(Qe.changes),clientID:Qe.clientID}));try{const Qe=Ja.receiveUpdates(G.state,we);G.dispatch(Qe),Ja.sendableUpdates(G.state).length>0&&re()}catch(Qe){console.error("[CollabEditor] Error applying updates:",Qe)}},u=ce=>{n.value=ce.peers.filter(we=>we.clientId!==a.value),ve()},te=ce=>{if(ce.clientId===a.value)return;const we=n.value.find(Qe=>Qe.clientId===ce.clientId);we&&(we.cursorPosition=ce.position,we.cursorAnchor=ce.anchor,ve())},$=ce=>{c.value=new Error(ce.message),console.error("[CollabEditor] Server error:",ce.code,ce.message,ce.details),ce.code==="SESSION_FULL"?(m.value=!0,be()):ce.code==="ACCESS_DENIED"?be():ce.code==="INCOMPATIBLE_PROTOCOL"&&(h.value=!0,be())},T=ce=>{o.value=Bl,r.value=ce.version,p&&ce.document!==void 0&&p(ce.document,ce.version)},k=ce=>{j&&Ro.clearBackup(j).catch(()=>{}),d&&d(ce)},x=ce=>{if(G)try{G.dispatch({effects:M.reconfigure(Wt.EditorView.editable.of(ce))})}catch(we){console.warn("[CollabEditor] Failed to toggle editable:",we)}},oe=()=>{if(x(!1),G&&j){const ce=G.state.doc.toString();Ro.saveBackup(j,ce,l.value).catch(()=>{})}},ie=(ce,we)=>{console.log(`[CollabEditor] Reconnecting in ${we}ms (attempt ${ce})`)},H=async()=>{if(!(!t.value||!j))try{const ce=await sa.getTicket();await ue(ce),A({type:"join",nodeId:j,clientId:a.value,displayName:z,mode:O,protocolVersion:im}),x(!0)}catch(ce){console.error("[CollabEditor] Failed to re-authenticate on reconnect:",ce)}},me=ce=>{r.value=ce.version,n.value=ce.peers||[],ve(),I?I(ce.document,ce.version):p&&ce.document!==void 0&&p(ce.document,ce.version)},Ae=()=>{if(!G||!t.value||!ae.value)return;const ce=Ja.sendableUpdates(G.state);if(ce.length===0)return;const we=Ja.getSyncedVersion(G.state),Qe=ce.map(Be=>({clientID:Be.clientID,changes:Ve(Be.changes)})),$e=G.state.doc.toString();A({type:"push",sessionId:l.value,clientId:a.value,version:we,updates:Qe,document:$e})},re=()=>{L&&clearTimeout(L),L=setTimeout(Ae,50)};let We=null;const Ue=(ce,we)=>{We&&clearTimeout(We),We=setTimeout(()=>{t.value&&ae.value&&A({type:"cursor",sessionId:l.value,clientId:a.value,position:ce,anchor:we})},100)},ve=()=>{if(!G)return;const ce=n.value.filter(we=>we.cursorPosition!==void 0).map(we=>({clientId:we.clientId,displayName:we.displayName,color:we.color,position:we.cursorPosition,anchor:we.cursorAnchor||we.cursorPosition}));s.value=ce,G.dispatch({effects:sm.of(ce)})},nt=()=>ce=>{ce.docChanged&&t.value&&re()},gt=()=>new Promise((ce,we)=>{if(!t.value||!ae.value){we(new Error("Not connected to collaborative session"));return}if(o.value===Bl){ce({role:Bl});return}const Qe=setTimeout(()=>{Y("onMessage",$e),we(new Error("Timeout waiting for promotion confirmation"))},1e4),$e=Be=>{Be.type==="promoted"?(clearTimeout(Qe),Y("onMessage",$e),ce(Be)):Be.type==="error"&&Be.context==="promote"&&(clearTimeout(Qe),Y("onMessage",$e),we(new Error(Be.message)))};f("onMessage",$e),A({type:"promote",sessionId:l.value,clientId:a.value})}),Nt=()=>new Promise((ce,we)=>{if(!t.value||!ae.value){we(new Error("Not connected to collaborative session"));return}const Qe=setTimeout(()=>{Y("onMessage",$e),we(new Error("Timeout waiting for save confirmation"))},1e4),$e=Be=>{Be.type==="saved"?(clearTimeout(Qe),Y("onMessage",$e),ce(Be)):Be.type==="error"&&Be.context==="save"&&(clearTimeout(Qe),Y("onMessage",$e),we(new Error(Be.message)))};f("onMessage",$e),A({type:"save",sessionId:l.value,clientId:a.value})});return e.onUnmounted(()=>{be()}),{isCollabActive:t,isSessionFull:m,isProtocolIncompatible:h,permissionLevel:b,sessionId:l,clientId:a,myColor:i,myRole:o,connectedPeers:n,remoteCursors:s,connectionState:W,lastError:c,startVersion:r,peerCount:J,isConnected:ae,isReconnecting:Q,isConnectionFailed:pe,isEditor:P,isObserver:ee,editorCount:S,observerCount:E,hasWritePermission:ye,hasReadPermission:_,startCollab:Ne,stopCollab:be,setEditorView:g,createCollabExtensions:B,createUpdateListener:nt,pushChanges:Ae,requestSave:Nt,promoteToEditor:gt,retryConnection:async()=>{X(),await H()},lastCloseCode:Z}}const cm=je.defineStore({id:"CollabStore",state:()=>({enabled:!1,loaded:!1,activeSession:null,activeNodeId:null,connectedPeers:[],connectionState:"disconnected",myColor:null,lastError:null,maxPeers:5}),getters:{peerCount:t=>t.connectedPeers.length,hasActivePeers:t=>t.connectedPeers.length>0,isCollabActive:t=>t.activeSession!==null,isConnected:t=>t.connectionState==="connected",isReconnecting:t=>t.connectionState==="reconnecting",isAvailable:t=>t.enabled&&t.loaded},actions:{async init(){try{const t=xe();this.enabled=t.COLLAB_ENABLED!==!1,this.maxPeers=t.COLLAB_MAX_PEERS||5,this.loaded=!0,console.log("[CollabStore] Initialized, enabled:",this.enabled)}catch(t){console.error("[CollabStore] Failed to initialize:",t),this.enabled=!1,this.loaded=!0}},async checkAvailability(t){if(!this.enabled)return{available:!1,reason:"disabled"};try{return await sa.checkAvailability(t)}catch(l){return console.error("[CollabStore] Availability check failed:",l),{available:!1,reason:"error",error:l}}},setActiveSession(t){this.activeSession=t?.sessionId||null,this.activeNodeId=t?.nodeId||null,this.myColor=t?.color||null},updatePeers(t){this.connectedPeers=t||[]},setConnectionState(t){this.connectionState=t},setError(t){this.lastError=t},clearSession(){this.activeSession=null,this.activeNodeId=null,this.connectedPeers=[],this.myColor=null,this.connectionState="disconnected",this.lastError=null},addPeer(t){this.connectedPeers.findIndex(a=>a.clientId===t.clientId)===-1&&this.connectedPeers.push(t)},removePeer(t){const l=this.connectedPeers.findIndex(a=>a.clientId===t);l!==-1&&this.connectedPeers.splice(l,1)},updatePeerCursor(t,l,a){const i=this.connectedPeers.find(o=>o.clientId===t);i&&(i.cursorPosition=l,i.cursorAnchor=a)}}}),w4={class:"codemirror-editor-root"},k4={key:0,class:"consultation-title col"},C4={key:2,class:"collab-indicators flex align-items-center gap-2 ml-3"},T4={class:"collab-status-text text-sm"},I4={key:0,class:"collab-peers flex align-items-center gap-1"},j4={key:0,class:"collab-peer-more text-sm"},G4={key:1,class:"collab-participant-badges flex align-items-center gap-2"},D4={class:"collab-badge collab-badge-editor flex align-items-center gap-1"},L4={class:"text-sm font-medium"},V4={class:"collab-badge collab-badge-observer flex align-items-center gap-1"},v4={class:"text-sm font-medium"},F4={class:"flex gap-2 align-items-center"},R4={class:"card editor-wrapper border-1 surface-border border-round overflow-hidden flex flex-column p-0 m-0"},S4={key:0,class:"edit-mode-wrapper flex-grow-1 flex flex-column min-h-0"},x4={key:1,class:"consultation-view flex-grow-1"},U4=300,dm=fe({__name:"CodeMirrorEditor",props:{contentUrl:{type:String,default:null},contentNode:{type:Object,default:null},readOnly:{type:Boolean,default:!1},isSharedLink:{type:Boolean,default:!1}},setup(t){const{t:l}=Rt.useI18n(),a=bl.useToast();go.useConfirm();const{isDarkMode:i}=jo(),o=Oo(),n=cm(),{isCollabActive:s,isSessionFull:r,connectedPeers:c,isConnected:m,isReconnecting:h,peerCount:b,myRole:p,isEditor:d,isObserver:W,editorCount:Z,observerCount:N,startVersion:y,startCollab:A,stopCollab:f,setEditorView:Y,createCollabExtensions:X,createUpdateListener:G,requestSave:j,promoteToEditor:L}=rm(),z=t,O=e.ref(""),F=e.ref(""),M=e.ref(null),I=e.ref(!1),g=e.ref(!1),J=e.ref(o.isSmallScreen?"editor":"split"),ae=e.ref(!1),Q=e.ref(null),pe=e.ref(null),P=e.ref(null),ee=e.ref(null),S=e.ref(null),E=e.ref(null),ye=e.shallowRef(null),_=e.shallowRef(null),B=e.ref([]),ue=e.ref(!1),Ne=e.ref(!1),be=e.ref(!1),De=e.ref(0),Ve=e.ref(null),Je=e.ref("");let st=null;e.watch(O,ne=>{clearTimeout(st),st=setTimeout(()=>{Je.value=ne},U4)},{immediate:!0}),e.onUnmounted(()=>{clearTimeout(st)});const{isMarkdown:Se,isHtml:u,iframeContent:te,previewBodyHtml:$}=qn({content:Je,mimeType:Q}),T=e.computed(()=>O.value!==F.value),k=e.computed(()=>B.value&&B.value.length>=2),x=e.computed(()=>{const ne=[{value:"editor",icon:"ri-code-line",label:l("editor.viewMode.editorOnly")}];return o.isSmallScreen||ne.push({value:"split",icon:"ri-layout-column-fill",label:l("editor.viewMode.split")}),ne.push({value:"preview",icon:"ri-eye-line",label:l("editor.viewMode.previewOnly")}),ne}),oe=ne=>{const Me=ne?pe:P;if(!Me.value)return;const Fe=Aa(Q.value),rt=[...Ya({editable:ne,showLineNumbers:!0,enableHistory:ne,dark:i(),lineWrapping:ae.value,onUpdate:ne?bt=>{O.value=bt}:null})];Fe&&(!Array.isArray(Fe)||Fe.length>0)&&rt.push(Fe);const Kt=Ml.EditorState.create({doc:O.value,extensions:rt}),kl=new Wt.EditorView({state:Kt,parent:Me.value});ne?ye.value=kl:_.value=kl},ie=ne=>{ne.value&&(ne.value.destroy(),ne.value=null)},H=async ne=>{if(!(!ne.id&&!ne.shareId))try{let Me;z.isSharedLink&&ne.shareId?Me=await Ye.getSharedLinkContent(ne.shareId):Me=await Ye.getNodeContent(ne.id,!1);let Fe=await Me.text();if(ne.content?.mimeType==="application/json")try{Fe=JSON.stringify(JSON.parse(Fe),null,2)}catch(Ke){console.warn("Failed to format JSON, displaying raw content:",Ke.message)}z.readOnly||await re(ne),O.value=Fe,F.value=Fe,Q.value=ne.content?.mimeType||"text/plain",await e.nextTick(),!g.value&&!Se.value&&!u.value&&!_.value&&oe(!1)}catch(Me){console.error("Failed to load content:",Me),a.add({severity:"error",summary:l("error.error"),detail:l("editor.loadError"),life:3e3})}},me=async()=>{if(s.value){try{const ne=await j();F.value=O.value,ne.versionLabel?a.add({severity:"success",summary:l("success"),detail:`${l("editor.saveSuccess")} (v${ne.versionLabel})`,life:3e3}):ne.noChanges?a.add({severity:"info",summary:l("info"),detail:l("editor.alreadyUpToDate"),life:3e3}):a.add({severity:"success",summary:l("success"),detail:l("editor.saveSuccess"),life:3e3}),await gt(z.contentNode.id)}catch(ne){a.add({severity:"error",summary:l("error.error"),detail:ne.message,life:4e3})}return}if(T.value)try{await Ye.updateContentNode(z.contentNode.id,O.value,Q.value),F.value=O.value,a.add({severity:"success",summary:l("success"),detail:l("editor.saveSuccess"),life:3e3}),await gt(z.contentNode.id)}catch(ne){a.add({severity:"error",summary:l("error.error"),detail:ne.message,life:4e3})}},Ae=async()=>{try{const ne=await He.lockNode(z.contentNode.id,{timeToExpire:0,type:"ALLOW_OWNER_CHANGES",lifetime:"EPHEMERAL"});await re(ne.entry),await H(ne.entry)}catch{try{const Me=await He.getNode(z.contentNode.id,{include:["properties"]});await re(Me.entry)}catch{a.add({severity:"error",summary:l("error.error"),detail:l("editor.refreshError"),life:3e3})}}},re=async ne=>{const Me=ne.properties?.["cm:lockOwner"],Fe=mt();Me&&Me.id!==Fe.person.id?(I.value=!0,M.value=l("node.lockedBy",{name:Me.displayName})):(I.value=!1,M.value=null)},We=async()=>{if(n.enabled&&Ne.value){be.value=!0;try{g.value=!0,await e.nextTick(),await e.nextTick();let ne=0;for(;!ye.value&&ne<10;)await e.nextTick(),ne++;if(!ye.value)throw new Error("Editor view not created");await wt(),s.value?a.add({severity:"success",summary:l("success"),detail:l("collab.connected"),life:3e3}):(g.value=!1,a.add({severity:"error",summary:l("error.error"),detail:l("collab.initError"),life:4e3}))}catch(ne){console.error("Failed to start collaborative editing:",ne),g.value=!1,a.add({severity:"error",summary:l("error.error"),detail:l("collab.initError"),life:4e3})}finally{be.value=!1}}else await Ae(),I.value||(g.value=!0)},Ue=async()=>{T.value&&await me(),await nl();let Me=await(await Ye.getNodeContent(z.contentNode.id,!1)).text();if(z.contentNode.content?.mimeType==="application/json")try{Me=JSON.stringify(JSON.parse(Me),null,2)}catch{}O.value=Me,F.value=Me,g.value=!1,await Be(z.contentNode.id)},ve=async()=>{if(s.value){await Ue();return}T.value&&await me(),g.value=!1,await He.unlockNode(z.contentNode.id).catch(()=>{})},nt=()=>{const ne=document.createElement("a");ne.href=z.contentUrl,ne.download=z.contentNode.name,ne.click()},gt=async ne=>{if(ne)try{const Me=await Ye.listNodeVersionHistory(ne);B.value=Me.list.entries}catch(Me){console.error("Error fetching versions:",Me)}},Nt=()=>{ue.value=!0},ce=async()=>{await H(z.contentNode),await gt(z.contentNode.id)},we=async ne=>{if(!ne||z.readOnly){Ne.value=!1;return}try{const Me=await n.checkAvailability(ne);Ve.value=Me.permissionLevel||"WRITE",De.value=Me.maxPeers||0,Ne.value=Me.enabled===!0&&Ve.value!=="NONE"}catch(Me){console.error("[Collab] Failed to check collab availability:",Me),Ne.value=!1,Ve.value=null}},Qe=(ne,Me)=>{if(!g.value&&ne!==void 0&&(O.value=ne,F.value=ne,_.value)){const Fe=_.value.state.update({changes:{from:0,to:_.value.state.doc.length,insert:ne}});_.value.dispatch(Fe)}},$e=()=>{F.value=O.value},Be=async ne=>{if(!(!ne||z.readOnly||!n.enabled||!Ne.value)&&!s.value)try{const Me=mt(),Fe=Me.person?.displayName||Me.person?.id||"User";await A(ne,null,Fe,ra,Qe,$e)}catch(Me){console.error("[Collab] Failed to connect as observer:",Me)}},wt=async()=>{if(!z.contentNode?.id||!ye.value)throw new Error("Missing node ID or editor view");const ne=mt(),Me=ne.person?.displayName||ne.person?.id||"User";let Fe,Ke;if(s.value&&W.value){const rt=await L();Fe=rt.version||y.value,Ke=rt.document}else{const rt=await A(z.contentNode.id,null,Me,Bl,Qe,$e);Fe=rt.version,Ke=rt.document}Ke!==void 0&&(O.value=Ke,F.value=Ke),await kt(Fe)},nl=async()=>{try{await f()}catch(ne){console.error("Failed to stop collaborative editing:",ne)}},kt=async ne=>{if(!pe.value)return;ie(ye),await e.nextTick();const Me=Aa(Q.value),Fe=Ya({editable:!0,showLineNumbers:!0,enableHistory:!0,dark:i(),lineWrapping:ae.value,onUpdate:bt=>{O.value=bt}}),Ke=X(ne),rt=Wt.EditorView.updateListener.of(G()),Kt=[...Fe,...Ke,rt];Me&&(!Array.isArray(Me)||Me.length>0)&&Kt.push(Me);const kl=Ml.EditorState.create({doc:O.value,extensions:Kt});ye.value=new Wt.EditorView({state:kl,parent:pe.value}),Y(ye.value)},il=()=>{if(g.value){if(J.value==="split")return ee.value;if(J.value==="preview")return S.value}else return E.value;return null},sl=ne=>{!ne||ne._previewInitialized||(ne.srcdoc=te.value,ne._previewInitialized=!0)};return e.watch([ee,S,E],()=>{const ne=il();ne&&sl(ne)}),e.watch($,ne=>{const Me=il();!Me||!Me._previewInitialized||Me.contentWindow?.postMessage({type:"preview-update",html:ne},"*")}),n.init(),e.watch(()=>z.contentNode,async ne=>{ne&&(H(ne),gt(ne.id),z.readOnly||(n.loaded||await n.init(),await we(ne.id),await Be(ne.id)))},{immediate:!0}),e.watch(g,async ne=>{ie(ye),ie(_),await e.nextTick(),ne?J.value!=="preview"&&oe(!0):!Se.value&&!u.value&&oe(!1)}),e.watch(J,async(ne,Me)=>{if(!g.value||!(Se.value||u.value))return;const Fe=ne!=="preview";Me!=="preview"&&ie(ye),Fe&&(await e.nextTick(),oe(!0))}),e.watch(ae,async()=>{g.value&&J.value!=="preview"&&ye.value?(ie(ye),await e.nextTick(),oe(!0)):!g.value&&!Se.value&&!u.value&&_.value&&(ie(_),await e.nextTick(),oe(!1))}),e.onBeforeUnmount(async()=>{s.value&&await f(),ie(ye),ie(_),g.value&&!I.value&&!s.value&&He.unlockNode(z.contentNode.id).catch(()=>{})}),(ne,Me)=>{const Fe=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",w4,[e.createVNode(e.unref(dn),{class:"consultation-toolbar"},{start:e.withCtx(()=>[t.contentNode?(e.openBlock(),e.createElementBlock("h3",k4,e.toDisplayString(t.contentNode.name),1)):e.createCommentVNode("",!0),ne.$route.params.versionId?(e.openBlock(),e.createBlock(e.unref(ea),{key:1,class:"tag-version",value:ne.$route.params.versionId},null,8,["value"])):e.createCommentVNode("",!0),e.unref(s)?(e.openBlock(),e.createElementBlock("div",C4,[e.createElementVNode("span",{class:e.normalizeClass(["collab-status-dot",{connected:e.unref(m),reconnecting:e.unref(h)}])},null,2),e.createElementVNode("span",T4,e.toDisplayString(e.unref(m)?ne.$t("collab.connected"):ne.$t("collab.reconnecting")),1),e.unref(b)>0?(e.openBlock(),e.createElementBlock("div",I4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).slice(0,6),Ke=>e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:Ke.clientId,class:"collab-peer-avatar",style:e.normalizeStyle({backgroundColor:Ke.color})},[e.createTextVNode(e.toDisplayString(Ke.displayName.charAt(0).toUpperCase()),1)],4)),[[Fe,Ke.displayName,void 0,{bottom:!0}]])),128)),e.unref(b)>6?(e.openBlock(),e.createElementBlock("span",j4," +"+e.toDisplayString(e.unref(b)-6),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(s)&&e.unref(m)?(e.openBlock(),e.createElementBlock("div",G4,[e.withDirectives((e.openBlock(),e.createElementBlock("div",D4,[Me[3]||(Me[3]=e.createElementVNode("i",{class:"ri-edit-fill","aria-hidden":"true"},null,-1)),e.createElementVNode("span",L4,e.toDisplayString(e.unref(Z)+(e.unref(d)?1:0)),1)])),[[Fe,ne.$t("collab.editorsTooltip"),void 0,{bottom:!0}]]),e.withDirectives((e.openBlock(),e.createElementBlock("div",V4,[Me[4]||(Me[4]=e.createElementVNode("i",{class:"ri-eye-fill","aria-hidden":"true"},null,-1)),e.createElementVNode("span",v4,e.toDisplayString(e.unref(N)+(e.unref(W)?1:0)),1)])),[[Fe,ne.$t("collab.observersTooltip"),void 0,{bottom:!0}]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),end:e.withCtx(()=>[e.createElementVNode("div",F4,[g.value&&(e.unref(Se)||e.unref(u))?(e.openBlock(),e.createBlock(e.unref(Fl),{key:0,modelValue:J.value,"onUpdate:modelValue":Me[0]||(Me[0]=Ke=>J.value=Ke),options:x.value,"option-value":"value","allow-empty":!1,class:"view-mode-selector"},{option:e.withCtx(Ke=>[e.withDirectives(e.createElementVNode("i",{class:e.normalizeClass(Ke.option.icon),"aria-hidden":"true"},null,2),[[Fe,Ke.option.label,void 0,{bottom:!0}]])]),_:1},8,["modelValue","options"])):e.createCommentVNode("",!0),!t.readOnly&&!g.value&&!e.unref(r)&&(!Ne.value||Ve.value==="WRITE")?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:1,icon:"ri-pencil-line",severity:"info",onClick:We,disabled:I.value||be.value,loading:be.value,"aria-label":ne.$t("editor.edit"),raised:""},null,8,["disabled","loading","aria-label"])),[[Fe,ne.$t("editor.edit"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),g.value&&!t.readOnly?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:2,icon:"ri-save-line",severity:"primary",onClick:me,disabled:I.value||!T.value,"aria-label":ne.$t("save"),raised:""},null,8,["disabled","aria-label"])),[[Fe,ne.$t("save"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),g.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:3,icon:"ri-logout-box-line",severity:"warn",onClick:ve,raised:""},null,512)),[[Fe,ne.$t("editor.closeEdit"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),Me[5]||(Me[5]=e.createElementVNode("div",{class:"w-1rem"},[e.createElementVNode("i",{class:"ri-more-2-line","aria-hidden":"true"})],-1)),g.value&&J.value!=="preview"||!g.value&&!e.unref(Se)&&!e.unref(u)?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:4,icon:"ri-text-wrap",severity:ae.value?"info":"secondary",onClick:Me[1]||(Me[1]=Ke=>ae.value=!ae.value),"aria-label":ne.$t("editor.lineWrap"),raised:""},null,8,["severity","aria-label"])),[[Fe,ne.$t("editor.lineWrap"),void 0,{bottom:!0}]]):e.createCommentVNode("",!0),t.isSharedLink?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:5,icon:"ri-layout-column-line",severity:"secondary",onClick:Nt,disabled:!k.value,"aria-label":ne.$t("diffViewer.compareTitle"),raised:""},null,8,["disabled","aria-label"])),[[Fe,ne.$t("diffViewer.compareTitle"),void 0,{bottom:!0}]]),e.withDirectives(e.createVNode(e.unref(de),{icon:"ri-download-line",severity:"secondary",onClick:nt,"aria-label":ne.$t("download"),raised:""},null,8,["aria-label"]),[[Fe,ne.$t("download"),void 0,{bottom:!0}]])])]),_:1}),I.value&&!t.readOnly?(e.openBlock(),e.createBlock(e.unref(ml),{key:0,severity:"warn",icon:"ri-lock-line",class:"p-small-message p-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M.value),1)]),_:1})):e.createCommentVNode("",!0),e.unref(r)?(e.openBlock(),e.createBlock(e.unref(ml),{key:1,severity:"warn",icon:"ri-group-line",class:"p-small-message px-3 py-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ne.$t("collab.sessionFull"))+" ("+e.toDisplayString(De.value)+"/"+e.toDisplayString(De.value)+") ",1)]),_:1})):e.createCommentVNode("",!0),e.unref(s)&&e.unref(h)?(e.openBlock(),e.createBlock(e.unref(ml),{key:2,severity:"warn",icon:"ri-wifi-off-line",class:"p-small-message p-0"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ne.$t("collab.offline")),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",R4,[g.value?(e.openBlock(),e.createElementBlock("div",S4,[(e.unref(Se)||e.unref(u))&&J.value==="split"?(e.openBlock(),e.createBlock(e.unref(Km),{key:0,class:"flex-grow-1 h-full"},{default:e.withCtx(()=>[e.createVNode(e.unref(Hi),{class:"flex",size:50,"min-size":10},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"editorContainer",ref:pe,class:"w-full flex-grow-1"},null,512)]),_:1}),e.createVNode(e.unref(Hi),{class:"flex",size:50,"min-size":10},{default:e.withCtx(()=>[e.createElementVNode("iframe",{ref_key:"splitPreviewIframe",ref:ee,class:"preview-container w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,512)]),_:1})]),_:1})):!e.unref(Se)&&!e.unref(u)||J.value==="editor"?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"editorContainer",ref:pe,class:"editor-only-container w-full flex-grow-1"},null,512)):J.value==="preview"?(e.openBlock(),e.createElementBlock("iframe",{key:2,ref_key:"editPreviewIframe",ref:S,class:"preview-iframe w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,512)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",x4,[e.unref(Se)||e.unref(u)?(e.openBlock(),e.createElementBlock("iframe",{key:0,ref_key:"consultPreviewIframe",ref:E,class:"preview-iframe w-full flex-grow-1",sandbox:"allow-scripts allow-popups"},null,512)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"consultationEditorContainer",ref:P,class:"consultation-editor-container"},null,512))]))]),e.createVNode(oi,{visible:ue.value,"onUpdate:visible":Me[2]||(Me[2]=Ke=>ue.value=Ke),"content-node":t.contentNode,versions:B.value,"initial-version-id":ne.$route.params.versionId,onRevertVersion:ce},null,8,["visible","content-node","versions","initial-version-id"])])}}},[["__scopeId","data-v-6a52da1e"]]),J4="pristy-config";class E4{async check(){const a=xe().INSTANCE_NAME;if(!a||a==="/")return{ok:!1,detail:"INSTANCE_NAME_NOT_SET"};try{return(await He.listNodeChildren(J4)).list.entries.some(n=>n.entry.name===a)?{ok:!0,detail:"OK"}:{ok:!1,detail:"CONFIG_FOLDER_NOT_FOUND"}}catch(i){return console.error("ConfigHealthService.check failed",i),{ok:!1,detail:"CHECK_FAILED"}}}}const mm=new E4,B4={class:"font-semibold mb-2"},H4={class:"m-0 line-height-3"},Q4={class:"block mt-2 text-sm"},P4={class:"mt-2 mb-0 text-sm"},bm={__name:"ConfigHealthBanner",setup(t,{expose:l}){const a=ml,o=xe().INSTANCE_NAME,n=e.ref({ok:!0,detail:""}),s=e.ref(!1),r=e.ref(!1);return e.onMounted(async()=>{s.value=!0;try{n.value=await mm.check()}finally{s.value=!1,r.value=!0}}),l({health:n,checked:r}),(c,m)=>r.value&&!s.value&&!n.value.ok?(e.openBlock(),e.createBlock(e.unref(a),{key:0,severity:"error",closable:!1},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",B4,[m[0]||(m[0]=e.createElementVNode("i",{class:"ri-error-warning-line mr-2","aria-hidden":"true"},null,-1)),e.createTextVNode(" "+e.toDisplayString(c.$t("configHealth.error.title")),1)]),e.createElementVNode("p",H4,e.toDisplayString(c.$t("configHealth.error.description",{instance:e.unref(o)})),1),e.createElementVNode("code",Q4," pristy-config/"+e.toDisplayString(e.unref(o)),1),e.createElementVNode("p",P4,e.toDisplayString(c.$t("configHealth.error.action")),1)])]),_:1})):e.createCommentVNode("",!0)}},_4="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4QIqaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49J++7vycgaWQ9J1c1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCc/Pgo8eDp4bXBtZXRhIHhtbG5zOng9J2Fkb2JlOm5zOm1ldGEvJyB4OnhtcHRrPSdBZG9iZSBFeHByZXNzJz4KPHJkZjpSREYgeG1sbnM6cmRmPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjJ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kjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A+06/ND5wKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAMe4o8wOS8X/Fj4d+Ax/wAVX4u03T3H8Es6hj+HWt6WFrVvgi2aRpTn8KMHQf2kfgn4kvFsNK+IWlPPIcKjTBCT7Zxmtp4DE01dwZTw9SKu0ejwzwXESzW8qSo/KsjZBGM5/KuOSadnuZW1sPpALQIKACgAoAKACgAoAKACgAoAKACgAoATH5cjP0oApaxrmk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/b0+5r6d+zL8ffEMqh/CGpAN/HdvsA/76NRLMMPH7YniaS6nq/gT9gHxZfyxXHjvX7XTrfILwW37yQj0zwB+tcVbOYLSmrs56mPUVaKPrz4ZfCDwP8JtJGl+EtKSJnAE1w/M0pHct1/CvDr4mpiZc1R/LoedUrSqu8jtKwMgoAKACgAoAKACgCxYyNFdRMP72PwNTNJxEzpq4yQoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBkyCWNoz0ZSDTTswOWkjaKRkcYKnFdsdVcsbQAUAFABQAUAFABQAUAHXqM4NDDcXryf5daEkugCKACTgYpPUA9MdqBJWCmMKACgAoAKACgAoAKACgAoAKACgBePTr1pWATjvTDTsAx1I5o0AUcHp/SgfyE/wA+tAgoAKACgAoAKACgAoAKALemQGe8XjIU5NRVdotCZ0dchIUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAZuqaaLgefCPnHBHrW1OdtGNMxGUq2GHNdBQlABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQA+KGSdxHGhJNJtR3A6Gws1s4do5c/eNcs5c5DLVQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAJj1oAp3umw3QLr8snr6/WtIVHEaZi3NlcWrbZEPsR0NdEZqRRB/KqAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAFAzwOvpQBctdMnuSGYFEPc96ylUURXNq2tIbVNsajOOT3Nc8pOW5JPSAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAC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3UVfoKTbe4Dx+noaQgoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgBAMd6AD8vyoAXJp6AHWkMPy/OgQZoGH5fnQAUrCCq0AKLgFIAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAP/9k=",K4={name:"ErrorComponent",components:{PrimeButton:de},props:{errorNb:{type:String,default:"500"},homeName:{type:String,default:"welcome"}},data(){return{title:"",subtitle:""}},created(){this.title=this.$t("nothingTitle"),this.subtitle=this.$t("nothingText")},methods:{onClick(){this.$router.push({name:this.homeName})}}},$4={class:"error-container"},q4={class:"error-card"},eN={class:"error-title"},tN={class:"error-image",src:_4,alt:"Angry Cat"},lN={class:"error-body"},aN={class:"error-card-title"},oN={class:"error-card-subtitle"};function nN(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",$4,[e.createElementVNode("div",q4,[e.createElementVNode("h2",eN,e.toDisplayString(a.errorNb),1),e.withDirectives(e.createElementVNode("img",tN,null,512),[[r,"www.vecteezy.com"]]),e.createElementVNode("div",lN,[e.createElementVNode("p",aN,e.toDisplayString(o.title),1),e.createElementVNode("p",oN,e.toDisplayString(o.subtitle),1),e.createVNode(s,{icon:"ri-corner-down-left-line",label:t.$t("goHome"),class:"error-button",onClick:n.onClick},null,8,["label","onClick"])])])])}const ii=fe(K4,[["render",nN],["__scopeId","data-v-b4ec85ac"]]);class iN{getBaseUrl(){return Ee.config.hostEcm}async getTicket(){return Ee.getTicketEcm()}createAuthHeader(l){return`Basic ${btoa(`ROLE_TICKET:${l}`)}`}async getStatus(){try{const l=await this.getTicket(),a=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/status`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(l)}});return a.ok?await a.json():{enabled:!1}}catch(l){return console.error("[ChatBackendService] Error checking status:",l),{enabled:!1}}}async getWorkspaceRoom(l){try{const a=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/workspace/${l}/room`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(a)}});return i.ok?await i.json():(console.warn(`[ChatBackendService] Failed to get room for site ${l}:`,i.status),{found:!1})}catch(a){return console.error(`[ChatBackendService] Error getting room for site ${l}:`,a),{found:!1}}}async createWorkspaceRoom(l){try{const a=await this.getTicket(),i=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/workspace/${l}/room`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:this.createAuthHeader(a)},body:JSON.stringify({})});return i.ok?await i.json():(console.error(`[ChatBackendService] Failed to create room for site ${l}:`,i.status),null)}catch(a){return console.error(`[ChatBackendService] Error creating room for site ${l}:`,a),null}}async getUserChatToken(){try{const l=await this.getTicket(),a=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/user/token`,{method:"GET",headers:{Accept:"application/json",Authorization:this.createAuthHeader(l)}});return a.ok?await a.json():{hasCredentials:!1}}catch(l){return console.error("[ChatBackendService] Error getting user token:",l),{hasCredentials:!1}}}async saveUserChatToken(l,a){try{const i=await this.getTicket(),o=await fetch(`${this.getBaseUrl()}/alfresco/s/fr/jeci/pristy/chat/user/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:this.createAuthHeader(i)},body:JSON.stringify({userId:l,token:a})});if(!o.ok){const n=await o.json().catch(()=>({}));throw new Error(n.message||`HTTP ${o.status}`)}return await o.json()}catch(i){throw console.error("[ChatBackendService] Error saving user token:",i),i}}}const xo=new iN;class sN{constructor(){this.credentials=null,this.config=null}init(l){this.config=l,this.credentials=null}isEnabled(){return this.config?.CHAT_ENABLED===!0&&!!this.config?.ROCKETCHAT_HOST}isOAuthEnabled(){return this.config?.CHAT_OAUTH_ENABLED===!0}getServerUrl(){return(this.config?.ROCKETCHAT_HOST||"").replace(/\/$/,"")}getWebSocketUrl(){if(this.config?.ROCKETCHAT_WS_URL)return this.config.ROCKETCHAT_WS_URL;const l=this.config?.ROCKETCHAT_HOST||"",a=l.startsWith("https")?"wss":"ws",i=l.replace(/^https?:\/\//,"").replace(/\/$/,"");return`${a}://${i}/websocket`}async getCredentials(){if(this.credentials)return this.credentials;const l=await xo.getUserChatToken();return l.hasCredentials&&l.userId&&l.token?(this.credentials={userId:l.userId,authToken:l.token},this.credentials):(console.warn("[RocketChatAuthService] No credentials available. User needs to configure token in profile."),null)}clearCredentials(){this.credentials=null}async verifyCredentials(){const l=await this.getCredentials();if(!l)return!1;try{const a=await fetch(`${this.getServerUrl()}/api/v1/me`,{method:"GET",headers:{"X-Auth-Token":l.authToken,"X-User-Id":l.userId}});return a.ok?(await a.json()).success===!0:(this.clearCredentials(),!1)}catch(a){return console.error("[RocketChatAuthService] Error verifying credentials:",a),!1}}async getCurrentUser(){const l=await this.getCredentials();if(!l)return null;try{const a=await fetch(`${this.getServerUrl()}/api/v1/me`,{method:"GET",headers:{"X-Auth-Token":l.authToken,"X-User-Id":l.userId}});return a.ok?await a.json():null}catch(a){return console.error("[RocketChatAuthService] Error getting current user:",a),null}}}const _t=new sN;class rN{async request(l,a={}){const i=await _t.getCredentials();if(!i)throw new Error("Not authenticated to Rocket.Chat");const n=`${_t.getServerUrl()}${l}`,s={"Content-Type":"application/json","X-Auth-Token":i.authToken,"X-User-Id":i.userId,...a.headers},r=await fetch(n,{...a,headers:s}),c=r.headers.get("content-type");if(!c||!c.includes("application/json")){const h=await r.text();throw console.error(`[RocketChatService] Expected JSON but got ${c}:`,h.substring(0,200)),new Error(`Invalid response from Rocket.Chat: expected JSON, got ${c}`)}const m=await r.json();if(!r.ok||m.success===!1){const h=new Error(m.error||`HTTP ${r.status}`);throw h.status=r.status,h.data=m,h}return m}async getSubscriptions(){return(await this.request("/api/v1/subscriptions.get")).update||[]}async getGroups(){return(await this.request("/api/v1/groups.list")).groups||[]}async getRoomInfo(l){return(await this.request(`/api/v1/rooms.info?roomId=${l}`)).room}async getMessages(l,a={}){const i=new URLSearchParams({roomId:l,count:a.count||50});return a.oldest&&i.append("oldest",a.oldest),a.latest&&i.append("latest",a.latest),(await this.request(`/api/v1/groups.history?${i.toString()}`)).messages||[]}async sendMessage(l,a){return(await this.request("/api/v1/chat.postMessage",{method:"POST",body:JSON.stringify({roomId:l,text:a})})).message}async markAsRead(l){await this.request("/api/v1/subscriptions.read",{method:"POST",body:JSON.stringify({rid:l})})}async getUnreadCounts(){const l=await this.getSubscriptions(),a={};for(const i of l)i.unread>0&&(a[i.rid]=i.unread);return a}async getUserPresence(l){try{return(await this.request(`/api/v1/users.getPresence?userId=${l}`)).presence}catch{return"offline"}}async setUserPresence(l){await this.request("/api/v1/users.setStatus",{method:"POST",body:JSON.stringify({status:l})})}async getRoomMembers(l){return(await this.request(`/api/v1/groups.members?roomId=${l}`)).members||[]}async uploadFile(l,a,i=""){const o=await _t.getCredentials();if(!o)throw new Error("Not authenticated to Rocket.Chat");const n=new FormData;n.append("file",a),i&&n.append("description",i);const s=_t.getServerUrl(),r=await fetch(`${s}/api/v1/rooms.upload/${l}`,{method:"POST",headers:{"X-Auth-Token":o.authToken,"X-User-Id":o.userId},body:n}),c=await r.json();if(!r.ok||c.success===!1)throw new Error(c.error||"Failed to upload file");return c}}const Xa=new rN,cN={reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,maxReconnectAttempts:10,heartbeatInterval:25e3,messageBufferSize:100},tt={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",AUTHENTICATING:"authenticating",READY:"ready",RECONNECTING:"reconnecting",ERROR:"error"};function pm(t={}){const l={...cN,...t},a=e.ref(tt.DISCONNECTED),i=e.ref(null),o=e.ref(0),n=e.shallowRef([]),s=e.ref(new Set);let r=null,c=null,m=null,h=!1,b=0,p=new Map;const d={onConnected:[],onDisconnected:[],onReady:[],onMessage:[],onRoomMessage:[],onTyping:[],onPresence:[],onError:[],onReconnecting:[]},W=(_,B)=>(d[_]&&d[_].push(B),()=>Z(_,B)),Z=(_,B)=>{if(d[_]){const ue=d[_].indexOf(B);ue>-1&&d[_].splice(ue,1)}},N=(_,...B)=>{d[_]&&d[_].forEach(ue=>ue(...B))},y=()=>String(++b),A=()=>new Promise((_,B)=>{if(r&&r.readyState===WebSocket.OPEN){_();return}const ue=_t.getWebSocketUrl();if(!ue){const Ne=new Error("WebSocket URL not configured");i.value=Ne,a.value=tt.ERROR,B(Ne);return}h=!1,a.value=tt.CONNECTING;try{r=new WebSocket(ue),r.onopen=()=>{a.value=tt.CONNECTED,o.value=0,i.value=null,Y({msg:"connect",version:"1",support:["1","pre2","pre1"]}),N("onConnected")},r.onclose=Ne=>{pe(),a.value=tt.DISCONNECTED,!h&&!Ne.wasClean&&P(),N("onDisconnected",Ne)},r.onerror=Ne=>{i.value=Ne,a.value=tt.ERROR,N("onError",Ne),B(Ne)},r.onmessage=Ne=>{try{const be=JSON.parse(Ne.data);j(be,_,B)}catch(be){console.error("[ChatWebSocket] Failed to parse message:",be)}}}catch(Ne){i.value=Ne,a.value=tt.ERROR,N("onError",Ne),B(Ne)}}),f=()=>{h=!0,pe(),ee(),r&&(r.close(1e3,"User disconnected"),r=null),a.value=tt.DISCONNECTED,n.value=[],s.value=new Set,p.clear()},Y=_=>r&&r.readyState===WebSocket.OPEN?(r.send(JSON.stringify(_)),!0):!1,X=_=>Y(_)?!0:(n.value.length<l.messageBufferSize?n.value=[...n.value,_]:console.warn("[ChatWebSocket] Message buffer full, dropping message"),!1),G=(_,B=[])=>new Promise((ue,Ne)=>{const be=y();p.set(be,{resolve:ue,reject:Ne}),Y({msg:"method",method:_,id:be,params:B})||(p.delete(be),Ne(new Error("WebSocket not connected"))),setTimeout(()=>{p.has(be)&&(p.delete(be),Ne(new Error(`Method ${_} timed out`)))},3e4)}),j=(_,B,ue)=>{switch(_.msg){case"connected":Q(),L(B,ue);break;case"ping":Y({msg:"pong"});break;case"pong":break;case"result":z(_);break;case"ready":break;case"added":case"changed":case"removed":O(_);break;case"error":F(_,ue);break;case"failed":console.error("[ChatWebSocket] DDP version negotiation failed"),a.value=tt.ERROR,ue&&ue(new Error("DDP version negotiation failed"));break;default:N("onMessage",_)}},L=async(_,B)=>{a.value=tt.AUTHENTICATING;try{const ue=await _t.getCredentials();if(!ue)throw new Error("No credentials available");const Ne=await G("login",[{resume:ue.authToken}]);if(Ne&&Ne.id)a.value=tt.READY,S(),g(),N("onReady"),_&&_();else throw new Error("Authentication failed")}catch(ue){console.error("[ChatWebSocket] Authentication failed:",ue),i.value=ue,a.value=tt.ERROR,N("onError",ue),B&&B(ue)}},z=_=>{const B=p.get(_.id);B&&(p.delete(_.id),_.error?B.reject(new Error(_.error.message||"Method error")):B.resolve(_.result))},O=_=>{const{collection:B,fields:ue}=_;if(B==="stream-room-messages"){if(ue&&ue.args){const[Ne]=ue.args;N("onRoomMessage",Ne)}}else if(B==="stream-notify-room"){if(ue&&ue.args){const[Ne,...be]=ue.args;Ne==="typing"&&N("onTyping",...be)}}else B==="stream-notify-user"&&ue&&ue.args&&N("onMessage",{type:"user-notification",data:ue.args})},F=(_,B)=>{const ue=new Error(_.reason||"Unknown error");i.value=ue,N("onError",ue),B&&B(ue)},M=async _=>{if(s.value.has(_))return;const B=y();Y({msg:"sub",id:B,name:"stream-room-messages",params:[_,!1]});const ue=y();Y({msg:"sub",id:ue,name:"stream-notify-room",params:[`${_}/typing`,!1]}),s.value=new Set([...s.value,_])},I=_=>{s.value=new Set([...s.value].filter(B=>B!==_))},g=()=>{const _=[...s.value];s.value=new Set,_.forEach(B=>{M(B)})},J=async(_,B)=>G("sendMessage",[{_id:y(),rid:_,msg:B}]),ae=(_,B,ue)=>{Y({msg:"method",method:"stream-notify-room",id:y(),params:[`${_}/typing`,B,ue]})},Q=()=>{pe(),c=setInterval(()=>{r&&r.readyState===WebSocket.OPEN&&Y({msg:"ping"})},l.heartbeatInterval)},pe=()=>{c&&(clearInterval(c),c=null)},P=()=>{if(o.value>=l.maxReconnectAttempts){console.error("[ChatWebSocket] Max reconnection attempts reached"),a.value=tt.ERROR;return}a.value=tt.RECONNECTING,o.value++;const _=Math.min(l.reconnectInterval*Math.pow(l.reconnectDecay,o.value-1),l.maxReconnectInterval);N("onReconnecting",o.value,_),m=setTimeout(()=>{h||A().catch(()=>{})},_)},ee=()=>{m&&(clearTimeout(m),m=null)},S=()=>{if(r&&r.readyState===WebSocket.OPEN&&n.value.length>0){const _=[...n.value];n.value=[],_.forEach(B=>{Y(B)})}},E=()=>a.value===tt.READY&&r&&r.readyState===WebSocket.OPEN,ye=()=>r&&r.readyState===WebSocket.OPEN;return e.onUnmounted(()=>{f()}),{connectionState:e.readonly(a),lastError:e.readonly(i),reconnectAttempts:e.readonly(o),bufferedMessages:e.readonly(n),subscribedRooms:e.readonly(s),connect:A,disconnect:f,isConnected:ye,isReady:E,subscribeRoom:M,unsubscribeRoom:I,sendChatMessage:J,sendTyping:ae,callMethod:G,send:X,on:W,off:Z}}const um=je.defineStore({id:"chat",state:()=>({enabled:!1,loaded:!1,hasCredentials:!1,connectionState:tt.DISCONNECTED,lastError:null,rooms:[],currentRoomId:null,messagesByRoom:{},unreadCounts:{},typingByRoom:{},currentUser:null,_webSocket:null}),getters:{currentRoom:t=>t.currentRoomId&&t.rooms.find(l=>l._id===t.currentRoomId)||null,currentMessages:t=>t.currentRoomId?t.messagesByRoom[t.currentRoomId]||[]:[],currentTypingUsers:t=>t.currentRoomId?t.typingByRoom[t.currentRoomId]||[]:[],totalUnreadCount:t=>Object.values(t.unreadCounts).reduce((l,a)=>l+a,0),isReady:t=>t.enabled&&t.hasCredentials&&t.connectionState===tt.READY,isConnecting:t=>t.connectionState===tt.CONNECTING||t.connectionState===tt.AUTHENTICATING,isReconnecting:t=>t.connectionState===tt.RECONNECTING,isAvailable:t=>t.enabled&&t.loaded&&t.hasCredentials},actions:{async init(){try{const t=xe();if(_t.init({CHAT_ENABLED:t.CHAT_ENABLED,ROCKETCHAT_HOST:t.ROCKETCHAT_HOST,ROCKETCHAT_WS_URL:t.ROCKETCHAT_WS_URL,CHAT_OAUTH_ENABLED:t.CHAT_OAUTH_ENABLED,CHAT_OAUTH_SERVICE:t.CHAT_OAUTH_SERVICE}),this.enabled=_t.isEnabled(),this.enabled){const l=await _t.getCredentials();this.hasCredentials=!!l,this.hasCredentials&&(this.currentUser=await _t.getCurrentUser())}this.loaded=!0,console.log("[ChatStore] Initialized, enabled:",this.enabled,"hasCredentials:",this.hasCredentials)}catch(t){console.error("[ChatStore] Failed to initialize:",t),this.enabled=!1,this.loaded=!0}},async connect(){if(!this.enabled||!this.hasCredentials)return console.warn("[ChatStore] Cannot connect: chat not available"),!1;if(this._webSocket&&this.connectionState===tt.READY)return!0;try{return this._webSocket=pm(),this._webSocket.on("onReady",()=>{this.connectionState=tt.READY,this.loadRooms(),this.currentRoomId&&this._webSocket.subscribeRoom(this.currentRoomId)}),this._webSocket.on("onDisconnected",()=>{this.connectionState=tt.DISCONNECTED}),this._webSocket.on("onReconnecting",t=>{this.connectionState=tt.RECONNECTING,console.log("[ChatStore] Reconnecting, attempt:",t)}),this._webSocket.on("onError",t=>{this.lastError=t,this.connectionState=tt.ERROR}),this._webSocket.on("onRoomMessage",t=>{this.handleNewMessage(t)}),this._webSocket.on("onTyping",(t,l)=>{this.handleTypingIndicator(t,l)}),this.connectionState=tt.CONNECTING,await this._webSocket.connect(),!0}catch(t){return console.error("[ChatStore] Connection failed:",t),this.lastError=t,this.connectionState=tt.ERROR,!1}},disconnect(){this._webSocket&&(this._webSocket.disconnect(),this._webSocket=null),this.connectionState=tt.DISCONNECTED},async loadRooms(){try{const t=await Xa.getSubscriptions();this.rooms=t.map(a=>({_id:a.rid,name:a.name,fname:a.fname||a.name,type:a.t,unread:a.unread||0,lastMessage:a.lastMessage,updatedAt:a._updatedAt}));const l={};t.forEach(a=>{a.unread>0&&(l[a.rid]=a.unread)}),this.unreadCounts=l}catch(t){console.error("[ChatStore] Failed to load rooms:",t)}},async selectRoom(t){if(!t){this.currentRoomId=null;return}this.currentRoomId=t,this._webSocket&&this._webSocket.isReady()&&await this._webSocket.subscribeRoom(t),this.messagesByRoom[t]||await this.loadMessages(t),await this.markAsRead(t)},async loadMessages(t,l={}){try{const i=[...await Xa.getMessages(t,{count:l.count||50,oldest:l.oldest,latest:l.latest})].reverse();l.prepend&&this.messagesByRoom[t]?this.messagesByRoom[t]=[...i,...this.messagesByRoom[t]]:this.messagesByRoom[t]=i}catch(a){console.error("[ChatStore] Failed to load messages:",a)}},async sendMessage(t){if(!(!this.currentRoomId||!t.trim()))try{this._webSocket&&this._webSocket.isReady()?await this._webSocket.sendChatMessage(this.currentRoomId,t):await Xa.sendMessage(this.currentRoomId,t)}catch(l){throw console.error("[ChatStore] Failed to send message:",l),l}},async markAsRead(t){try{await Xa.markAsRead(t),this.unreadCounts[t]=0}catch(l){console.error("[ChatStore] Failed to mark as read:",l)}},handleNewMessage(t){const l=t.rid;this.messagesByRoom[l]||(this.messagesByRoom[l]=[]),t.ts&&typeof t.ts=="object"&&t.ts.$date&&(t.ts=new Date(t.ts.$date).toISOString()),this.messagesByRoom[l].some(i=>i._id===t._id)||(this.messagesByRoom[l].push(t),l!==this.currentRoomId&&(this.unreadCounts[l]=(this.unreadCounts[l]||0)+1))},handleTypingIndicator(t,l){const a=this.currentRoomId;a&&(this.currentUser&&t===this.currentUser.username||(this.typingByRoom[a]||(this.typingByRoom[a]=[]),l?this.typingByRoom[a].includes(t)||this.typingByRoom[a].push(t):this.typingByRoom[a]=this.typingByRoom[a].filter(i=>i!==t)))},sendTypingIndicator(t){!this.currentRoomId||!this.currentUser||!this._webSocket||!this._webSocket.isReady()||this._webSocket.sendTyping(this.currentRoomId,this.currentUser.username,t)},async getOrCreateWorkspaceRoom(t){try{let l=await xo.getWorkspaceRoom(t);return l.found||(l=await xo.createWorkspaceRoom(t)),l&&l.roomId?(await this.loadRooms(),l):null}catch(l){return console.error("[ChatStore] Failed to get/create workspace room:",l),null}},async uploadFile(t,l=""){if(!this.currentRoomId)throw new Error("No room selected");try{await Xa.uploadFile(this.currentRoomId,t,l)}catch(a){throw console.error("[ChatStore] Failed to upload file:",a),a}},clear(){this.disconnect(),this.rooms=[],this.currentRoomId=null,this.messagesByRoom={},this.unreadCounts={},this.typingByRoom={},this.currentUser=null,this.lastError=null}}}),dN={name:"ChatMessage",components:{PrimeAvatar:cn},props:{message:{type:Object,required:!0},currentUserId:{type:String,default:""}},emits:["attachment-click"],computed:{isOwnMessage(){return this.message.u?._id===this.currentUserId},isSystemMessage(){return this.message.t!==void 0},hasAttachments(){return this.message.attachments&&this.message.attachments.length>0},avatarLabel(){return(this.message.u?.name||this.message.u?.username||"?").charAt(0).toUpperCase()},avatarColor(){const t=this.message.u?.username||"";let l=0;for(let i=0;i<t.length;i++)l=t.charCodeAt(i)+((l<<5)-l);return`hsl(${Math.abs(l%360)}, 65%, 45%)`},formattedTime(){if(!this.message.ts)return"";const t=new Date(this.message.ts),l=new Date;return t.toDateString()===l.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}},methods:{isImageAttachment(t){return t.image_url?!0:["image/jpeg","image/png","image/gif","image/webp"].includes(t.image_type)},getAttachmentUrl(t){const l=_t.getServerUrl(),a=t.image_url||t.title_link;return a?a.startsWith("http")?a:`${l}${a}`:""},openAttachment(t){this.$emit("attachment-click",t)}}},mN={key:0,class:"chat-message__avatar"},bN={class:"chat-message__content"},pN={key:0,class:"chat-message__header"},uN={key:0,class:"chat-message__username"},hN={class:"chat-message__time"},yN={class:"chat-message__body"},ZN={key:0,class:"chat-message__text"},gN={key:1,class:"chat-message__attachments"},fN=["src","alt","onClick"],WN={key:1,class:"chat-message__attachment-file"},NN=["href"],AN={key:0,class:"attachment-desc"},YN={key:0,class:"chat-message__text mt-2"};function zN(t,l,a,i,o,n){const s=e.resolveComponent("PrimeAvatar");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-message",{"chat-message--own":n.isOwnMessage,"chat-message--system":n.isSystemMessage}])},[!n.isOwnMessage&&!n.isSystemMessage?(e.openBlock(),e.createElementBlock("div",mN,[e.createVNode(s,{label:n.avatarLabel,style:e.normalizeStyle({backgroundColor:n.avatarColor}),shape:"circle"},null,8,["label","style"])])):e.createCommentVNode("",!0),e.createElementVNode("div",bN,[n.isSystemMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",pN,[n.isOwnMessage?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",uN,e.toDisplayString(a.message.u?.name||a.message.u?.username||t.$t("chat.unknownUser")),1)),e.createElementVNode("span",hN,e.toDisplayString(n.formattedTime),1)])),e.createElementVNode("div",yN,[n.hasAttachments?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ZN,e.toDisplayString(a.message.msg),1)),n.hasAttachments?(e.openBlock(),e.createElementBlock("div",gN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.message.attachments,r=>(e.openBlock(),e.createElementBlock("div",{key:r._id||r.title,class:"chat-message__attachment"},[n.isImageAttachment(r)?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.getAttachmentUrl(r),alt:r.title||r.description,class:"chat-message__attachment-image",onClick:c=>n.openAttachment(r)},null,8,fN)):(e.openBlock(),e.createElementBlock("div",WN,[l[0]||(l[0]=e.createElementVNode("i",{class:"ri-attachment-line","aria-hidden":"true"},null,-1)),e.createElementVNode("a",{href:n.getAttachmentUrl(r),target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(r.title||t.$t("chat.attachment")),9,NN),r.description?(e.openBlock(),e.createElementBlock("span",AN,e.toDisplayString(r.description),1)):e.createCommentVNode("",!0)]))]))),128)),a.message.msg?(e.openBlock(),e.createElementBlock("div",YN,e.toDisplayString(a.message.msg),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])],2)}const si=fe(dN,[["render",zN],["__scopeId","data-v-165e03f8"]]),MN={name:"ChatInput",components:{PrimeButton:de,PrimeTextarea:zl},props:{disabled:{type:Boolean,default:!1},typingUsers:{type:Array,default:()=>[]}},emits:["send","typing","upload"],data(){return{message:"",selectedFiles:[],typingTimeout:null,isTyping:!1}},computed:{canSend(){return this.message.trim().length>0||this.selectedFiles.length>0},typingText(){return this.typingUsers.length===0?"":this.typingUsers.length===1?this.$t("chat.userTyping",{user:this.typingUsers[0]}):this.typingUsers.length===2?this.$t("chat.usersTyping",{user1:this.typingUsers[0],user2:this.typingUsers[1]}):this.$t("chat.multipleUsersTyping")}},beforeUnmount(){this.typingTimeout&&clearTimeout(this.typingTimeout),this.isTyping&&this.$emit("typing",!1)},methods:{handleKeyDown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.sendMessage())},handleInput(){this.isTyping||(this.isTyping=!0,this.$emit("typing",!0)),this.typingTimeout&&clearTimeout(this.typingTimeout),this.typingTimeout=setTimeout(()=>{this.isTyping&&(this.isTyping=!1,this.$emit("typing",!1))},3e3)},sendMessage(){if(this.canSend){if(this.isTyping&&(this.isTyping=!1,this.$emit("typing",!1)),this.selectedFiles.length>0){this.selectedFiles.forEach(t=>{this.$emit("upload",t,this.message)}),this.selectedFiles=[],this.message="";return}this.message.trim()&&(this.$emit("send",this.message.trim()),this.message="")}},triggerFileInput(){this.$refs.fileInput.click()},handleFileSelect(t){const l=Array.from(t.target.files);this.selectedFiles=[...this.selectedFiles,...l],t.target.value=""},removeFile(t){this.selectedFiles.splice(t,1)}}},XN={class:"chat-input"},ON={class:"chat-input__container"},wN={key:0,class:"chat-input__typing"},kN={class:"typing-text"},CN={key:1,class:"chat-input__files"},TN={class:"file-name"};function IN(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("PrimeTextarea");return e.openBlock(),e.createElementBlock("div",XN,[e.createElementVNode("div",ON,[e.createVNode(s,{type:"button",icon:"ri-attachment-line",text:"",rounded:"",disabled:a.disabled,"aria-label":t.$t("chat.attachFile"),onClick:n.triggerFileInput},null,8,["disabled","aria-label","onClick"]),e.createElementVNode("input",{ref:"fileInput",type:"file",class:"hidden",multiple:"",onChange:l[0]||(l[0]=(...c)=>n.handleFileSelect&&n.handleFileSelect(...c))},null,544),e.createVNode(r,{modelValue:o.message,"onUpdate:modelValue":l[1]||(l[1]=c=>o.message=c),placeholder:t.$t("chat.typeMessage"),disabled:a.disabled,"auto-resize":"",rows:1,class:"chat-input__textarea",onKeydown:n.handleKeyDown,onInput:n.handleInput},null,8,["modelValue","placeholder","disabled","onKeydown","onInput"]),e.createVNode(s,{type:"button",icon:"ri-send-plane-2-fill",rounded:"",disabled:a.disabled||!n.canSend,"aria-label":t.$t("chat.send"),onClick:n.sendMessage},null,8,["disabled","aria-label","onClick"])]),a.typingUsers.length>0?(e.openBlock(),e.createElementBlock("div",wN,[l[2]||(l[2]=e.createElementVNode("span",{class:"typing-dots"},[e.createElementVNode("span"),e.createElementVNode("span"),e.createElementVNode("span")],-1)),e.createElementVNode("span",kN,e.toDisplayString(n.typingText),1)])):e.createCommentVNode("",!0),o.selectedFiles.length>0?(e.openBlock(),e.createElementBlock("div",CN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.selectedFiles,(c,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"chat-input__file"},[l[3]||(l[3]=e.createElementVNode("i",{class:"ri-file-line","aria-hidden":"true"},null,-1)),e.createElementVNode("span",TN,e.toDisplayString(c.name),1),e.createVNode(s,{type:"button",icon:"ri-close-line","aria-label":t.$t("delete"),text:"",rounded:"",size:"small",severity:"danger",onClick:h=>n.removeFile(m)},null,8,["aria-label","onClick"])]))),128))])):e.createCommentVNode("",!0)])}const ri=fe(MN,[["render",IN],["__scopeId","data-v-5648e98b"]]),jN={name:"ChatRoomList",components:{PrimeInputText:_e,PrimeBadge:Ua},props:{rooms:{type:Array,default:()=>[]},selectedRoomId:{type:String,default:null},unreadCounts:{type:Object,default:()=>({})}},emits:["select"],data(){return{searchQuery:""}},computed:{filteredRooms(){if(!this.searchQuery.trim())return this.sortedRooms;const t=this.searchQuery.toLowerCase();return this.sortedRooms.filter(l=>(l.fname||l.name||"").toLowerCase().includes(t))},sortedRooms(){return[...this.rooms].sort((t,l)=>{const a=this.unreadCounts[t._id]||0,i=this.unreadCounts[l._id]||0;if(a!==i)return i-a;const o=new Date(t.updatedAt||0);return new Date(l.updatedAt||0)-o})}},methods:{selectRoom(t){this.$emit("select",t._id)},getUnreadCount(t){return this.unreadCounts[t]||0},getRoomIcon(t){switch(t.type){case"c":return"ri-hashtag";case"p":return"ri-lock-line";case"d":return"ri-user-line";default:return"ri-chat-3-line"}},truncateMessage(t){if(!t)return"";const l=40;return t.length<=l?t:t.substring(0,l)+"..."}}},GN={class:"chat-room-list"},DN={class:"chat-room-list__search"},LN={class:"p-input-icon-left w-full"},VN={class:"chat-room-list__items"},vN=["onClick"],FN={class:"chat-room-item__icon"},RN={class:"chat-room-item__info"},SN={class:"chat-room-item__name"},xN={key:0,class:"chat-room-item__last-message"},UN={key:0,class:"last-message-user"},JN={key:0,class:"chat-room-list__empty"};function EN(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputText"),r=e.resolveComponent("PrimeBadge");return e.openBlock(),e.createElementBlock("div",GN,[e.createElementVNode("div",DN,[e.createElementVNode("span",LN,[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-search-line","aria-hidden":"true"},null,-1)),e.createVNode(s,{modelValue:o.searchQuery,"onUpdate:modelValue":l[0]||(l[0]=c=>o.searchQuery=c),placeholder:t.$t("chat.searchRooms"),class:"w-full"},null,8,["modelValue","placeholder"])])]),e.createElementVNode("div",VN,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.filteredRooms,c=>(e.openBlock(),e.createElementBlock("div",{key:c._id,class:e.normalizeClass(["chat-room-item",{"chat-room-item--selected":c._id===a.selectedRoomId}]),onClick:m=>n.selectRoom(c)},[e.createElementVNode("div",FN,[e.createElementVNode("i",{class:e.normalizeClass(n.getRoomIcon(c)),"aria-hidden":"true"},null,2)]),e.createElementVNode("div",RN,[e.createElementVNode("div",SN,e.toDisplayString(c.fname||c.name),1),c.lastMessage?(e.openBlock(),e.createElementBlock("div",xN,[c.lastMessage.u?(e.openBlock(),e.createElementBlock("span",UN,e.toDisplayString(c.lastMessage.u.name||c.lastMessage.u.username)+": ",1)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.truncateMessage(c.lastMessage.msg)),1)])):e.createCommentVNode("",!0)]),n.getUnreadCount(c._id)>0?(e.openBlock(),e.createBlock(r,{key:0,value:n.getUnreadCount(c._id),severity:"danger",class:"chat-room-item__badge"},null,8,["value"])):e.createCommentVNode("",!0)],10,vN))),128)),n.filteredRooms.length===0?(e.openBlock(),e.createElementBlock("div",JN,[l[2]||(l[2]=e.createElementVNode("i",{class:"ri-chat-3-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("chat.noRooms")),1)])):e.createCommentVNode("",!0)])])}const ci=fe(jN,[["render",EN],["__scopeId","data-v-80a03793"]]),BN={name:"ChatPanel",components:{PrimeButton:de,PrimeProgressSpinner:Bt,ChatMessage:si,ChatInput:ri,ChatRoomList:ci},props:{showRoomList:{type:Boolean,default:!0},roomId:{type:String,default:null}},emits:["close","minimize","go-to-profile"],data(){return{minimized:!1,loadingMore:!1}},computed:{...je.mapStores(um),currentRoom(){return this.chatStore.currentRoom},currentUserId(){return this.chatStore.currentUser?._id||""},headerTitle(){return this.currentRoom?this.currentRoom.fname||this.currentRoom.name:this.$t("chat.title")},canLoadMore(){return this.chatStore.currentMessages.length>=50}},watch:{roomId:{immediate:!0,handler(t){t&&this.selectRoom(t)}},"chatStore.currentMessages":{handler(){this.$nextTick(()=>{this.scrollToBottom()})}}},async mounted(){await this.initChat()},beforeUnmount(){},methods:{async initChat(){this.chatStore.loaded||await this.chatStore.init(),this.chatStore.isAvailable&&!this.chatStore.isReady&&await this.chatStore.connect()},async selectRoom(t){await this.chatStore.selectRoom(t),this.$nextTick(()=>{this.scrollToBottom()})},backToRoomList(){this.chatStore.selectRoom(null)},async sendMessage(t){try{await this.chatStore.sendMessage(t),this.$nextTick(()=>{this.scrollToBottom()})}catch{this.$toast.add({severity:"error",summary:this.$t("error"),detail:this.$t("chat.sendError"),life:3e3})}},handleTyping(t){this.chatStore.sendTypingIndicator(t)},async uploadFile(t,l){try{await this.chatStore.uploadFile(t,l)}catch{this.$toast.add({severity:"error",summary:this.$t("error"),detail:this.$t("chat.uploadError"),life:3e3})}},async loadMoreMessages(){if(!this.chatStore.currentRoomId||this.loadingMore)return;this.loadingMore=!0;const t=this.chatStore.currentMessages,l=t.length>0?t[0].ts:void 0;try{await this.chatStore.loadMessages(this.chatStore.currentRoomId,{count:50,latest:l,prepend:!0})}finally{this.loadingMore=!1}},handleAttachmentClick(t){const l=t.image_url||t.title_link;l&&window.open(l,"_blank","noopener,noreferrer")},scrollToBottom(){const t=this.$refs.messagesContainer;t&&(t.scrollTop=t.scrollHeight)},toggleMinimize(){this.minimized=!this.minimized,this.$emit("minimize",this.minimized)},close(){this.$emit("close")},goToProfile(){this.$emit("go-to-profile")},async reconnect(){await this.chatStore.connect()}}},HN={class:"chat-panel__header"},QN={class:"chat-panel__header-left"},PN={class:"chat-panel__title"},_N={class:"chat-panel__header-actions"},KN={class:"chat-panel__body"},$N={key:0,class:"chat-panel__status"},qN={key:0,class:"status-connecting"},e6={key:1,class:"status-reconnecting"},t6={key:2,class:"status-not-configured"},l6={key:3,class:"status-error"},a6={ref:"messagesContainer",class:"chat-panel__messages"},o6={key:0,class:"chat-panel__load-more"},n6={key:1,class:"chat-panel__empty"};function i6(t,l,a,i,o,n){const s=e.resolveComponent("PrimeButton"),r=e.resolveComponent("PrimeProgressSpinner"),c=e.resolveComponent("ChatRoomList"),m=e.resolveComponent("ChatMessage"),h=e.resolveComponent("ChatInput");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-panel",{"chat-panel--minimized":o.minimized}])},[e.createElementVNode("div",HN,[e.createElementVNode("div",QN,[a.showRoomList&&n.currentRoom?(e.openBlock(),e.createBlock(s,{key:0,type:"button",icon:"ri-arrow-left-line","aria-label":t.$t("back"),text:"",rounded:"",onClick:n.backToRoomList},null,8,["aria-label","onClick"])):e.createCommentVNode("",!0),e.createElementVNode("h3",PN,e.toDisplayString(n.headerTitle),1)]),e.createElementVNode("div",_N,[e.createVNode(s,{type:"button",icon:o.minimized?"ri-fullscreen-line":"ri-subtract-line","aria-label":o.minimized?t.$t("expand"):t.$t("minimize"),text:"",rounded:"",onClick:n.toggleMinimize},null,8,["icon","aria-label","onClick"]),e.createVNode(s,{type:"button",icon:"ri-close-line","aria-label":t.$t("close"),text:"",rounded:"",onClick:n.close},null,8,["aria-label","onClick"])])]),e.withDirectives(e.createElementVNode("div",KN,[t.chatStore.isReady?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[a.showRoomList&&!n.currentRoom?(e.openBlock(),e.createBlock(c,{key:0,rooms:t.chatStore.rooms,"selected-room-id":t.chatStore.currentRoomId,"unread-counts":t.chatStore.unreadCounts,onSelect:n.selectRoom},null,8,["rooms","selected-room-id","unread-counts","onSelect"])):n.currentRoom?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",a6,[n.canLoadMore?(e.openBlock(),e.createElementBlock("div",o6,[e.createVNode(s,{label:t.$t("chat.loadMore"),text:"",size:"small",loading:o.loadingMore,onClick:n.loadMoreMessages},null,8,["label","loading","onClick"])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.chatStore.currentMessages,b=>(e.openBlock(),e.createBlock(m,{key:b._id,message:b,"current-user-id":n.currentUserId,onAttachmentClick:n.handleAttachmentClick},null,8,["message","current-user-id","onAttachmentClick"]))),128)),t.chatStore.currentMessages.length===0?(e.openBlock(),e.createElementBlock("div",n6,[l[2]||(l[2]=e.createElementVNode("i",{class:"ri-chat-smile-2-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("chat.noMessages")),1)])):e.createCommentVNode("",!0)],512),e.createVNode(h,{disabled:!t.chatStore.isReady,"typing-users":t.chatStore.currentTypingUsers,onSend:n.sendMessage,onTyping:n.handleTyping,onUpload:n.uploadFile},null,8,["disabled","typing-users","onSend","onTyping","onUpload"])],64)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",$N,[t.chatStore.isConnecting?(e.openBlock(),e.createElementBlock("div",qN,[e.createVNode(r,{style:{width:"30px",height:"30px"}}),e.createElementVNode("span",null,e.toDisplayString(t.$t("chat.connecting")),1)])):t.chatStore.isReconnecting?(e.openBlock(),e.createElementBlock("div",e6,[e.createVNode(r,{style:{width:"30px",height:"30px"}}),e.createElementVNode("span",null,e.toDisplayString(t.$t("chat.reconnecting")),1)])):t.chatStore.hasCredentials?t.chatStore.lastError?(e.openBlock(),e.createElementBlock("div",l6,[l[1]||(l[1]=e.createElementVNode("i",{class:"ri-error-warning-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("chat.connectionError")),1),e.createVNode(s,{label:t.$t("chat.retry"),outlined:"",onClick:n.reconnect},null,8,["label","onClick"])])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",t6,[l[0]||(l[0]=e.createElementVNode("i",{class:"ri-key-line","aria-hidden":"true"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("chat.notConfigured")),1),e.createVNode(s,{label:t.$t("chat.configureInProfile"),outlined:"",onClick:n.goToProfile},null,8,["label","onClick"])]))]))],512),[[e.vShow,!o.minimized]])],2)}const hm=fe(BN,[["render",i6],["__scopeId","data-v-96fab464"]]),s6={name:"WorkspaceCard",directives:{tooltip:yt},props:{workspace:{type:Object,required:!0},showDescription:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0},showRole:{type:Boolean,default:!0},showActionMenu:{type:Boolean,default:!0},clickable:{type:Boolean,default:!0},actionMenuTooltip:{type:String,default:"Actions"},noDescriptionText:{type:String,default:"Aucune description"},roleLabels:{type:Object,default:()=>({})},visibilityLabels:{type:Object,default:()=>({})},roleTooltips:{type:Object,default:()=>({})}},emits:["click","action-menu"],computed:{description(){return this.workspace.description||this.workspace.properties?.["cm:description"]||""},visibilityIcon(){return{PUBLIC:"ri-global-line",PRIVATE:"ri-lock-line",MODERATED:"ri-shield-user-line"}[this.workspace.visibility]||"ri-question-line"},visibilityLabel(){return this.visibilityLabels[this.workspace.visibility]?this.visibilityLabels[this.workspace.visibility]:{PUBLIC:"Public",PRIVATE:"Privé",MODERATED:"Modéré"}[this.workspace.visibility]||this.workspace.visibility},roleLabel(){return this.roleLabels[this.workspace.role]?this.roleLabels[this.workspace.role]:this.workspace.role},roleTooltip(){return this.roleTooltips[this.workspace.role]?this.roleTooltips[this.workspace.role]:{SiteManager:"Vous pouvez gérer cet espace",SiteCollaborator:"Vous pouvez modifier le contenu",SiteContributor:"Vous pouvez ajouter du contenu",SiteConsumer:"Vous pouvez consulter le contenu"}[this.workspace.role]||""}},methods:{handleClick(){this.clickable&&this.$emit("click",this.workspace)}}},r6={class:"workspace-card-inner"},c6={class:"workspace-card-content"},d6={class:"workspace-card-header"},m6={class:"workspace-card-title"},b6={class:"workspace-card-footer"},p6={class:"workspace-card-meta"},u6={class:"workspace-card-info"};function h6(t,l,a,i,o,n){const s=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["workspace-card",{"workspace-card-clickable":a.clickable}])},[l[4]||(l[4]=e.createElementVNode("div",{class:"workspace-card-accent"},null,-1)),e.createElementVNode("div",r6,[e.createElementVNode("div",{class:"workspace-card-body",onClick:l[2]||(l[2]=(...r)=>n.handleClick&&n.handleClick(...r))},[e.createElementVNode("div",c6,[e.createElementVNode("div",d6,[e.withDirectives((e.openBlock(),e.createElementBlock("span",m6,[e.createTextVNode(e.toDisplayString(a.workspace.title),1)])),[[s,a.workspace.title,void 0,{top:!0}]]),e.createElementVNode("div",{class:"workspace-card-actions",onClick:l[1]||(l[1]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(t.$slots,"actions",{},()=>[a.showActionMenu?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"workspace-action-btn",onClick:l[0]||(l[0]=r=>t.$emit("action-menu",r,a.workspace))},[...l[3]||(l[3]=[e.createElementVNode("i",{class:"ri-more-2-line"},null,-1)])])),[[s,a.actionMenuTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0)],!0)])]),a.showDescription?e.withDirectives((e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(["workspace-card-description",{"no-description":!n.description}])},[e.createTextVNode(e.toDisplayString(n.description||a.noDescriptionText),1)],2)),[[s,n.description||null,void 0,{bottom:!0}]]):e.createCommentVNode("",!0)])]),e.createElementVNode("div",b6,[e.createElementVNode("div",p6,[a.showRole&&a.workspace.role?e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["workspace-role-badge",[`workspace-role-${a.workspace.role.toLowerCase()}`]])},[e.createTextVNode(e.toDisplayString(n.roleLabel),1)],2)),[[s,n.roleTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"meta",{},void 0,!0)]),e.createElementVNode("div",u6,[a.showVisibility?e.withDirectives((e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([n.visibilityIcon,"workspace-visibility-icon"])},null,2)),[[s,n.visibilityLabel,void 0,{top:!0}]]):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"footer-end",{},void 0,!0)])])])],2)}const di=fe(s6,[["render",h6],["__scopeId","data-v-800282ec"]]),y6={name:"WorkspaceList",components:{PrimeDataView:nn,PrimeMenu:ta,WorkspaceCard:di},props:{workspaces:{type:Array,default:()=>[]},layout:{type:String,default:"grid",validator:t=>["grid","list"].includes(t)},paginator:{type:Boolean,default:!0},rows:{type:Number,default:12},rowsPerPageOptions:{type:Array,default:()=>[6,12,24,48]},emptyMessage:{type:String,default:"Aucun espace trouvé"},showDescription:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0},showRole:{type:Boolean,default:!0},showActionMenu:{type:Boolean,default:!0},actionMenuTooltip:{type:String,default:"Actions"},roleLabels:{type:Object,default:()=>({})},visibilityLabels:{type:Object,default:()=>({})},noDescriptionText:{type:String,default:"Aucune description"},roleTooltips:{type:Object,default:()=>({})},actionMenuItemsBuilder:{type:Function,default:null}},emits:["workspace-click","action-menu"],data(){return{currentActionMenuItems:[],currentWorkspace:null}},methods:{handleActionMenu(t,l){this.currentWorkspace=l,this.actionMenuItemsBuilder?(this.currentActionMenuItems=this.actionMenuItemsBuilder(l),this.$refs.actionMenu.toggle(t)):this.$emit("action-menu",t,l)}}},Z6={class:"workspace-list"},g6={class:"workspace-list-empty"},f6={class:"workspace-grid"},W6={class:"workspace-list-view"};function N6(t,l,a,i,o,n){const s=e.resolveComponent("WorkspaceCard"),r=e.resolveComponent("PrimeDataView"),c=e.resolveComponent("PrimeMenu");return e.openBlock(),e.createElementBlock("div",Z6,[e.createVNode(r,{value:a.workspaces,layout:a.layout,paginator:a.paginator,rows:a.rows,rowsPerPageOptions:a.rowsPerPageOptions},{empty:e.withCtx(()=>[e.createElementVNode("div",g6,[e.renderSlot(t.$slots,"empty",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.emptyMessage),1)],!0)])]),grid:e.withCtx(m=>[e.createElementVNode("div",f6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.items,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id||h.guid||h.name,class:"workspace-grid-item"},[e.renderSlot(t.$slots,"card",{workspace:h},()=>[e.createVNode(s,{workspace:h,showDescription:a.showDescription,showVisibility:a.showVisibility,showRole:a.showRole,showActionMenu:a.showActionMenu,actionMenuTooltip:a.actionMenuTooltip,noDescriptionText:a.noDescriptionText,roleLabels:a.roleLabels,visibilityLabels:a.visibilityLabels,roleTooltips:a.roleTooltips,onClick:b=>t.$emit("workspace-click",h),onActionMenu:n.handleActionMenu},{actions:e.withCtx(()=>[e.renderSlot(t.$slots,"card-actions",{workspace:h},void 0,!0)]),meta:e.withCtx(()=>[e.renderSlot(t.$slots,"card-meta",{workspace:h},void 0,!0)]),"footer-end":e.withCtx(()=>[e.renderSlot(t.$slots,"card-footer-end",{workspace:h},void 0,!0)]),_:2},1032,["workspace","showDescription","showVisibility","showRole","showActionMenu","actionMenuTooltip","noDescriptionText","roleLabels","visibilityLabels","roleTooltips","onClick","onActionMenu"])],!0)]))),128))])]),list:e.withCtx(m=>[e.createElementVNode("div",W6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.items,h=>(e.openBlock(),e.createElementBlock("div",{key:h.id||h.guid||h.name,class:"workspace-list-item"},[e.renderSlot(t.$slots,"list-item",{workspace:h},()=>[e.createVNode(s,{workspace:h,showDescription:a.showDescription,showVisibility:a.showVisibility,showRole:a.showRole,showActionMenu:a.showActionMenu,actionMenuTooltip:a.actionMenuTooltip,noDescriptionText:a.noDescriptionText,roleLabels:a.roleLabels,visibilityLabels:a.visibilityLabels,roleTooltips:a.roleTooltips,onClick:b=>t.$emit("workspace-click",h),onActionMenu:n.handleActionMenu},{actions:e.withCtx(()=>[e.renderSlot(t.$slots,"card-actions",{workspace:h},void 0,!0)]),meta:e.withCtx(()=>[e.renderSlot(t.$slots,"card-meta",{workspace:h},void 0,!0)]),"footer-end":e.withCtx(()=>[e.renderSlot(t.$slots,"card-footer-end",{workspace:h},void 0,!0)]),_:2},1032,["workspace","showDescription","showVisibility","showRole","showActionMenu","actionMenuTooltip","noDescriptionText","roleLabels","visibilityLabels","roleTooltips","onClick","onActionMenu"])],!0)]))),128))])]),_:3},8,["value","layout","paginator","rows","rowsPerPageOptions"]),e.createVNode(c,{ref:"actionMenu",model:o.currentActionMenuItems,popup:!0},null,8,["model"])])}const ym=fe(y6,[["render",N6],["__scopeId","data-v-31d4e912"]]),A6={name:"PredefinedViewsPanel",components:{PrimeSelect:Dt,PrimeTabs:Ga,PrimeTabList:Da,PrimeTab:Vl},props:{ancestorNodeId:{type:String,required:!0},displayContext:{type:String,default:"folderView"},initialCategory:{type:String,default:null},initialViewId:{type:String,default:null},categories:{type:Array,default:()=>[]},additionalViews:{type:Array,default:()=>[]}},emits:["load-view","category-change"],data(){return{selectedCategory:null,selectedViewId:null,isRestoringState:!1}},computed:{allViews(){return this.additionalViews},resolvedCategories(){return this.categories.filter(t=>t.display===void 0||t.display.includes(this.displayContext))},selectedCategoryObject(){return this.resolvedCategories.find(t=>t.id===this.selectedCategory)},currentViews(){if(!this.selectedCategory)return[];const t=this.selectedCategoryObject?.views||[];return this.allViews.filter(l=>l.filename&&t.includes(l.filename))}},watch:{resolvedCategories:{handler(t){t.length>0&&!this.selectedCategory&&(this.initialCategory&&t.some(l=>l.id===this.initialCategory)?(this.isRestoringState=!0,this.selectedCategory=this.initialCategory):this.selectedCategory=t[0].id,this.$nextTick(()=>{const l=this.currentViews;if(this.initialViewId&&l.some(a=>a.id===this.initialViewId)){this.selectedViewId=this.initialViewId;const a=l.find(i=>i.id===this.initialViewId);this.$emit("load-view",{view:a,ancestorNodeId:this.ancestorNodeId})}else this.isRestoringState=!1,this.$emit("category-change",{categoryId:this.selectedCategory,hasViews:l.length>0})}))},immediate:!0},selectedCategory(t){if(this.isRestoringState){this.isRestoringState=!1;return}this.selectedViewId=null,this.$nextTick(()=>{this.$emit("category-change",{categoryId:t,hasViews:this.currentViews.length>0})})},selectedViewId(t){if(t==null)return;const l=this.allViews.find(a=>a.id===t);l&&this.$emit("load-view",{view:l,ancestorNodeId:this.ancestorNodeId})},initialViewId(t){if(!t)return;this.allViews.find(a=>a.id===t)&&this.currentViews.some(a=>a.id===t)&&(this.selectedViewId=t)}}},Y6={key:0,class:"predefined-views-panel"},z6={key:1,class:"panel-separator"},M6={key:2,class:"tabs-wrapper"};function X6(t,l,a,i,o,n){const s=e.resolveComponent("PrimeSelect"),r=e.resolveComponent("PrimeTab"),c=e.resolveComponent("PrimeTabList"),m=e.resolveComponent("PrimeTabs");return n.resolvedCategories.length>0?(e.openBlock(),e.createElementBlock("div",Y6,[n.resolvedCategories.length>1?(e.openBlock(),e.createBlock(s,{key:0,modelValue:o.selectedCategory,"onUpdate:modelValue":l[0]||(l[0]=h=>o.selectedCategory=h),options:n.resolvedCategories,"option-label":"label","option-value":"id",size:"small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),n.resolvedCategories.length>1&&n.currentViews.length>0?(e.openBlock(),e.createElementBlock("span",z6)):e.createCommentVNode("",!0),n.currentViews.length>0?(e.openBlock(),e.createElementBlock("div",M6,[e.createVNode(m,{value:o.selectedViewId,"onUpdate:value":l[1]||(l[1]=h=>o.selectedViewId=h),scrollable:""},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.currentViews,h=>(e.openBlock(),e.createBlock(r,{key:h.id,value:h.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.name),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}const O6=fe(A6,[["render",X6],["__scopeId","data-v-63fa555e"]]),w6={class:"view-toolbar"},k6={class:"drop-zone-text"},C6={class:"drop-zone-hint"},T6={key:0,class:"text-center p-3"},I6={key:0,class:"selection-bar"},j6={class:"selection-info"},G6={class:"selection-text"},D6={class:"selection-actions"},L6={key:2,class:"p-3"},V6={class:"flex flex-column gap-3"},v6={class:"flex flex-column gap-1"},F6={for:"edit-view-name",class:"font-semibold"},R6={class:"flex flex-column gap-1"},S6={for:"edit-view-description",class:"font-semibold"},x6=fe({__name:"ViewList",props:{views:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["load-view","views-changed"],setup(t,{emit:l}){const a=yt,i=t,o=l,n=bl.useToast(),s=go.useConfirm(),{t:r}=Rt.useI18n(),c=e.ref(null),m=e.ref([]),h=e.ref(!1),b=e.ref(!1),p=e.ref(null),d=e.ref(""),W=e.ref(""),Z=e.ref(0),N=e.ref(10),y=e.computed(()=>i.views.slice(Z.value,Z.value+N.value)),A=P=>{Z.value=P.first,N.value=P.rows};e.provide("isCurrentNodeDisplayed",()=>!1);const f=[{key:"name",label:r("adminViewList.existingViews.title"),visible:!0}],Y=(P,ee)=>{Pt.getView(ee.name).then(S=>{const E=new Blob([JSON.stringify(S,null,2)],{type:"application/json"}),ye=URL.createObjectURL(E),_=document.createElement("a");_.href=ye,_.download=ee.name,_.click(),URL.revokeObjectURL(ye)}).catch(S=>{console.error("Failed to download view",S),n.add({severity:"error",summary:r("adminViewList.toast.downloadError.summary"),detail:r("adminViewList.toast.downloadError.detail"),life:4e3})})},X=(P,ee)=>{s.require({message:r("adminViewList.deleteView.confirmMessage",{name:ee.name}),header:r("adminViewList.deleteView.confirmHeader"),icon:"ri-error-warning-line",group:"deleteView",acceptProps:{severity:"danger"},accept:()=>{Ye.deleteNode(ee.id,"fichier").then(()=>{n.add({severity:"success",summary:r("adminViewList.deleteView.toast.success.summary"),detail:r("adminViewList.deleteView.toast.success.detail",{name:ee.name}),life:3e3}),m.value=m.value.filter(S=>S.id!==ee.id),o("views-changed")}).catch(S=>{console.error("Failed to delete view",S),n.add({severity:"error",summary:r("adminViewList.deleteView.toast.error.summary"),detail:r("adminViewList.deleteView.toast.error.detail"),life:4e3})})}})},G=async(P,ee)=>{p.value=ee;try{const S=await Pt.getView(ee.name);d.value=S.name||ee.name.replace(/^vue-|\.json$/g,""),W.value=S.description||""}catch{d.value=ee.name.replace(/^vue-|\.json$/g,""),W.value=""}b.value=!0},j=async()=>{if(!(!p.value||!d.value))try{const P=await Pt.getView(p.value.name);P.name=d.value,P.description=W.value,await Pt.saveView(p.value.name,P),n.add({severity:"success",summary:r("adminViewList.editView.toast.success.summary"),detail:r("adminViewList.editView.toast.success.detail"),life:3e3}),b.value=!1,o("views-changed")}catch(P){console.error("Failed to update view details",P),n.add({severity:"error",summary:r("adminViewList.editView.toast.error.summary"),detail:r("adminViewList.editView.toast.error.detail"),life:4e3})}},L=[{icon:"ri-pencil-line",tooltip:r("adminViewList.editView.button"),handler:G},{icon:"ri-download-line",tooltip:r("adminViewList.existingViews.download"),handler:Y},{icon:"ri-delete-bin-line",tooltip:r("adminViewList.deleteView.button"),severity:"danger",handler:X,visible:P=>P.allowableOperations?.includes("delete")}],z=e.computed(()=>m.value.length===i.views.length&&i.views.length>0),O=()=>{m.value=[...i.views]},F=e.computed(()=>m.value.length>0&&m.value.every(P=>P.allowableOperations?.includes("delete"))),M=()=>{m.value.forEach(P=>{Y(null,P)})},I=()=>{const P=m.value.map(ee=>ee.name).join(", ");s.require({message:r("adminViewList.deleteView.confirmMessageMultiple",{count:m.value.length,names:P}),header:r("adminViewList.deleteView.confirmHeader"),icon:"ri-error-warning-line",group:"deleteView",acceptProps:{severity:"danger"},accept:()=>{const ee=m.value.map(S=>Ye.deleteNode(S.id,"fichier"));Promise.allSettled(ee).then(S=>{const E=S.filter(_=>_.status==="fulfilled").length,ye=S.filter(_=>_.status==="rejected").length;E>0&&n.add({severity:"success",summary:r("adminViewList.deleteView.toast.success.summary"),detail:r("adminViewList.deleteView.toast.successMultiple.detail",{count:E}),life:3e3}),ye>0&&n.add({severity:"error",summary:r("adminViewList.deleteView.toast.error.summary"),detail:r("adminViewList.deleteView.toast.errorMultiple.detail",{count:ye}),life:4e3}),m.value=[],o("views-changed")})}})},g=async()=>{try{const{default:P}=await Promise.resolve().then(()=>hw),ee=new P,S=i.views.map(async B=>{const ue=await Pt.getView(B.name);ee.file(B.name,JSON.stringify(ue,null,2))});await Promise.all(S);const E=await ee.generateAsync({type:"blob"}),ye=URL.createObjectURL(E),_=document.createElement("a");_.href=ye,_.download="vues.zip",_.click(),URL.revokeObjectURL(ye),n.add({severity:"success",summary:r("adminViewList.exportAll.toast.success.summary"),detail:r("adminViewList.exportAll.toast.success.detail",{count:i.views.length}),life:3e3})}catch(P){console.error("Failed to export views as ZIP",P),n.add({severity:"error",summary:r("adminViewList.exportAll.toast.error.summary"),detail:r("adminViewList.exportAll.toast.error.detail"),life:4e3})}},J=()=>{c.value.click()},ae=P=>{const ee=Array.from(P.target.files);ee.length!==0&&(pe(ee),P.target.value="")},Q=P=>{h.value=!1;const ee=Array.from(P.dataTransfer.files).filter(S=>S.name.endsWith(".json"));if(ee.length===0){n.add({severity:"warn",summary:r("adminViewList.importView.toast.noJsonFiles.summary"),detail:r("adminViewList.importView.toast.noJsonFiles.detail"),life:4e3});return}pe(ee)},pe=async P=>{let ee=0,S=0;for(const E of P)try{const ye=await E.text(),_=JSON.parse(ye);let B=E.name.endsWith(".json")?E.name:`${E.name}.json`;B.startsWith("vue-")||(B=`vue-${B}`),await Pt.saveView(B,_),ee++}catch(ye){console.error(`Failed to import ${E.name}`,ye),S++}ee>0&&n.add({severity:"success",summary:r("adminViewList.importView.toast.success.summary"),detail:r("adminViewList.importView.toast.success.detail",{count:ee}),life:3e3}),S>0&&n.add({severity:"error",summary:r("adminViewList.importView.toast.error.summary"),detail:r("adminViewList.importView.toast.error.detail",{count:S}),life:4e3}),o("views-changed")};return(P,ee)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",w6,[e.createVNode(e.unref(de),{label:e.unref(r)("adminViewList.importView.button"),icon:"ri-upload-line",severity:"secondary",outlined:"",onClick:J},null,8,["label"]),e.createVNode(e.unref(de),{label:e.unref(r)("adminViewList.exportAll.button"),icon:"ri-download-line",severity:"secondary",outlined:"",disabled:t.views.length===0,onClick:g},null,8,["label","disabled"]),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",accept:".json",multiple:"",style:{display:"none"},onChange:ae},null,544)]),e.createElementVNode("div",{class:e.normalizeClass(["drop-zone",{"drop-zone--active":h.value}]),onDragover:ee[0]||(ee[0]=e.withModifiers(S=>h.value=!0,["prevent"])),onDragleave:ee[1]||(ee[1]=e.withModifiers(S=>h.value=!1,["prevent"])),onDrop:e.withModifiers(Q,["prevent"])},[ee[9]||(ee[9]=e.createElementVNode("i",{class:"ri-drag-drop-line drop-zone-icon","aria-hidden":"true"},null,-1)),e.createElementVNode("span",k6,e.toDisplayString(e.unref(r)("adminViewList.dropZone.text")),1),e.createElementVNode("span",C6,e.toDisplayString(e.unref(r)("adminViewList.dropZone.hint")),1)],34),t.loading?(e.openBlock(),e.createElementBlock("div",T6,[ee[10]||(ee[10]=e.createElementVNode("i",{class:"ri-loader-4-line ri-spin","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("adminViewList.existingViews.loading")),1)])):t.views.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[m.value.length>0?(e.openBlock(),e.createElementBlock("div",I6,[e.createElementVNode("div",j6,[e.createElementVNode("span",G6,e.toDisplayString(e.unref(r)("adminViewList.selectionBar.selected",{count:m.value.length,total:t.views.length})),1),z.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:ee[2]||(ee[2]=S=>m.value=[])},e.toDisplayString(e.unref(r)("adminViewList.selectionBar.clearSelection")),1)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:O},e.toDisplayString(e.unref(r)("adminViewList.selectionBar.selectAll",{total:t.views.length})),1))]),e.createElementVNode("div",D6,[e.withDirectives(e.createVNode(e.unref(de),{icon:"ri-download-line",rounded:"",text:"",severity:"secondary",onClick:M},null,512),[[e.unref(a),e.unref(r)("adminViewList.selectionBar.downloadAll"),void 0,{top:!0}]]),ee[11]||(ee[11]=e.createElementVNode("div",{class:"action-separator"},null,-1)),F.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:0,icon:"ri-delete-bin-line",rounded:"",text:"",severity:"secondary",onClick:I},null,512)),[[e.unref(a),e.unref(r)("adminViewList.deleteView.button"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createVNode(Pa,{files:y.value,"current-node":{id:"view-list"},"datatable-column-config":f,"inline-actions":L,"selected-nodes":m.value,"hide-more-actions":"","onUpdate:selectedNodes":ee[3]||(ee[3]=S=>m.value=S),onNavigateTo:ee[4]||(ee[4]=S=>o("load-view",S.name))},null,8,["files","selected-nodes"]),t.views.length>N.value?(e.openBlock(),e.createBlock(e.unref(bo),{key:1,first:Z.value,rows:N.value,"total-records":t.views.length,"rows-per-page-options":[10,25,50],template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPage:A},null,8,["first","rows","total-records"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",L6,[e.createElementVNode("p",null,e.toDisplayString(e.unref(r)("adminViewList.existingViews.noViewsFound")),1)])),e.createVNode(e.unref(Zn),{group:"deleteView"}),e.createVNode(e.unref(pt),{visible:b.value,"onUpdate:visible":ee[8]||(ee[8]=S=>b.value=S),header:e.unref(r)("adminViewList.editView.title"),modal:"",style:{width:"95vw",maxWidth:"30rem"}},{footer:e.withCtx(()=>[e.createVNode(e.unref(de),{label:e.unref(r)("adminViewList.editView.cancel"),severity:"secondary",text:"",onClick:ee[7]||(ee[7]=S=>b.value=!1)},null,8,["label"]),e.createVNode(e.unref(de),{label:e.unref(r)("adminViewList.editView.save"),icon:"ri-save-line",disabled:!d.value,onClick:j},null,8,["label","disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",V6,[e.createElementVNode("div",v6,[e.createElementVNode("label",F6,e.toDisplayString(e.unref(r)("adminViewList.editView.name")),1),e.createVNode(e.unref(_e),{id:"edit-view-name",modelValue:d.value,"onUpdate:modelValue":ee[5]||(ee[5]=S=>d.value=S),placeholder:e.unref(r)("adminViewList.editView.namePlaceholder")},null,8,["modelValue","placeholder"])]),e.createElementVNode("div",R6,[e.createElementVNode("label",S6,e.toDisplayString(e.unref(r)("adminViewList.editView.description")),1),e.createVNode(e.unref(zl),{id:"edit-view-description",modelValue:W.value,"onUpdate:modelValue":ee[6]||(ee[6]=S=>W.value=S),placeholder:e.unref(r)("adminViewList.editView.descriptionPlaceholder"),rows:"3","auto-resize":""},null,8,["modelValue","placeholder"])])])]),_:1},8,["visible","header"])]))}},[["__scopeId","data-v-e15e3fbc"]]),U6="pristy-config";class J6{getPlan(l){const a=xe();return xt.getConfig(a.INSTANCE_NAME,l).then(i=>i.jsonContent)}savePlan(l,a){const i=xe();return xt.updateConfig(i.INSTANCE_NAME,l,a)}async listPlans(){return(await this.#e(["properties"])).filter(a=>a.name.startsWith("plan-")&&a.name.endsWith(".json")).map(a=>a.name)}async getPlanWithPermissions(l){const[a,i]=await Promise.all([this.#e(["allowableOperations"]),this.getPlan(l)]),n=a.find(s=>s.name===l)?.allowableOperations||[];return{content:i,allowableOperations:n}}async listPlanEntries(){return(await this.#e(["properties","allowableOperations"])).filter(a=>a.name.startsWith("plan-")&&a.name.endsWith(".json"))}async#e(l){const a=xe();try{const o=(await He.listNodeChildren(U6,{include:l})).list.entries.find(s=>s.entry.name===a.INSTANCE_NAME);return o?(await He.listNodeChildren(o.entry.id,{include:l})).list.entries.map(s=>s.entry):[]}catch{return[]}}}const fl=new J6,E6={class:"create-plan-actions"},Zm=fe({__name:"ClassificationPlanCreate",emits:["create-plan","cancel"],setup(t,{emit:l}){const a=l,i=bl.useToast(),{t:o}=Rt.useI18n(),n=e.ref(""),s=()=>{if(!n.value||!n.value.trim()){i.add({severity:"warn",summary:o("adminClassificationLauncher.toast.invalidName.summary"),detail:o("adminClassificationLauncher.toast.invalidName.detail"),life:3e3});return}const r=`plan-${n.value.trim()}.json`;a("create-plan",r)};return(r,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("p",null,e.toDisplayString(e.unref(o)("adminClassificationLauncher.createPlan.description")),1),e.createVNode(e.unref(uo),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ra),null,{default:e.withCtx(()=>[...c[2]||(c[2]=[e.createTextVNode("plan-",-1)])]),_:1}),e.createVNode(e.unref(_e),{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=m=>n.value=m),placeholder:e.unref(o)("adminClassificationLauncher.createPlan.placeholder"),"aria-label":e.unref(o)("adminClassificationLauncher.createPlan.placeholder"),"aria-required":"true",onKeyup:e.withKeys(s,["enter"])},null,8,["modelValue","placeholder","aria-label"]),e.createVNode(e.unref(Ra),null,{default:e.withCtx(()=>[...c[3]||(c[3]=[e.createTextVNode(".json",-1)])]),_:1})]),_:1}),e.createElementVNode("div",E6,[e.createVNode(e.unref(de),{label:e.unref(o)("adminClassificationLauncher.createPlan.cancel"),severity:"secondary",text:"",onClick:c[1]||(c[1]=m=>a("cancel"))},null,8,["label"]),e.createVNode(e.unref(de),{label:e.unref(o)("adminClassificationLauncher.createPlan.button"),icon:"ri-add-line",disabled:!n.value,onClick:s},null,8,["label","disabled"])])],64))}},[["__scopeId","data-v-a9d1e85f"]]),B6={class:"plan-toolbar"},H6={key:0,class:"text-center p-3"},Q6={key:0,class:"selection-bar"},P6={class:"selection-info"},_6={class:"selection-text"},K6={class:"selection-actions"},$6={key:2,class:"p-3"},gm=fe({__name:"ClassificationPlanList",props:{plans:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["select-plan","import-plan"],setup(t,{emit:l}){const a=yt,i=t,o=l,n=bl.useToast(),s=go.useConfirm(),{t:r}=Rt.useI18n(),c=e.ref(null),m=e.ref(!1),h=e.ref([]),b=e.ref(0),p=e.ref(10),d=e.computed(()=>i.plans.slice(b.value,b.value+p.value)),W=M=>{b.value=M.first,p.value=M.rows};e.provide("isCurrentNodeDisplayed",()=>!1);const Z=[{key:"name",label:r("adminClassificationLauncher.existingPlans.title"),visible:!0}],N=(M,I)=>{fl.getPlan(I.name).then(g=>{const J=new Blob([JSON.stringify(g,null,2)],{type:"application/json"}),ae=URL.createObjectURL(J),Q=document.createElement("a");Q.href=ae,Q.download=I.name,Q.click(),URL.revokeObjectURL(ae)}).catch(g=>{console.error("Failed to download plan",g),n.add({severity:"error",summary:r("adminClassificationLauncher.toast.listError.summary"),detail:r("adminClassificationLauncher.toast.listError.detail"),life:4e3})})},y=(M,I)=>{s.require({message:r("adminClassificationLauncher.deletePlan.confirmMessage",{name:I.name}),header:r("adminClassificationLauncher.deletePlan.confirmHeader"),icon:"ri-error-warning-line",group:"deletePlan",acceptProps:{severity:"danger"},accept:()=>{Ye.deleteNode(I.id,"fichier").then(()=>{n.add({severity:"success",summary:r("adminClassificationLauncher.deletePlan.toast.success.summary"),detail:r("adminClassificationLauncher.deletePlan.toast.success.detail",{name:I.name}),life:3e3}),h.value=h.value.filter(g=>g.id!==I.id),o("import-plan")}).catch(g=>{console.error("Failed to delete plan",g),n.add({severity:"error",summary:r("adminClassificationLauncher.deletePlan.toast.error.summary"),detail:r("adminClassificationLauncher.deletePlan.toast.error.detail"),life:4e3})})}})},A=[{icon:"ri-download-line",tooltip:r("adminClassificationLauncher.existingPlans.download"),handler:N},{icon:"ri-delete-bin-line",tooltip:r("adminClassificationLauncher.deletePlan.button"),severity:"danger",handler:y,visible:M=>M.allowableOperations?.includes("delete")}],f=e.computed(()=>h.value.length===i.plans.length&&i.plans.length>0),Y=()=>{h.value=[...i.plans]},X=e.computed(()=>h.value.length>0&&h.value.every(M=>M.allowableOperations?.includes("delete"))),G=()=>{h.value.forEach(M=>{N(null,M)})},j=()=>{h.value.forEach(M=>{o("select-plan",M.name)})},L=()=>{const M=h.value.map(I=>I.name).join(", ");s.require({message:r("adminClassificationLauncher.deletePlan.confirmMessageMultiple",{count:h.value.length,names:M}),header:r("adminClassificationLauncher.deletePlan.confirmHeader"),icon:"ri-error-warning-line",group:"deletePlan",acceptProps:{severity:"danger"},accept:()=>{const I=h.value.map(g=>Ye.deleteNode(g.id,"fichier"));Promise.allSettled(I).then(g=>{const J=g.filter(Q=>Q.status==="fulfilled").length,ae=g.filter(Q=>Q.status==="rejected").length;J>0&&n.add({severity:"success",summary:r("adminClassificationLauncher.deletePlan.toast.success.summary"),detail:r("adminClassificationLauncher.deletePlan.toast.successMultiple.detail",{count:J}),life:3e3}),ae>0&&n.add({severity:"error",summary:r("adminClassificationLauncher.deletePlan.toast.error.summary"),detail:r("adminClassificationLauncher.deletePlan.toast.errorMultiple.detail",{count:ae}),life:4e3}),h.value=[],o("import-plan")})}})},z=()=>{c.value.click()},O=M=>{const I=M.target.files[0];if(!I)return;const g=new FileReader;g.onload=J=>{try{const ae=JSON.parse(J.target.result);if(!ae.NATURES||!ae.FIELDS||!ae.EMPLACEMENT)throw new Error(r("adminClassificationLauncher.importPlan.invalidStructure"));let Q=I.name.endsWith(".json")?I.name:`${I.name}.json`;Q.startsWith("plan-")||(Q=`plan-${Q}`),fl.savePlan(Q,ae).then(()=>{n.add({severity:"success",summary:r("adminClassificationLauncher.importPlan.toast.success.summary"),detail:r("adminClassificationLauncher.importPlan.toast.success.detail",{filename:Q}),life:3e3}),o("import-plan"),o("select-plan",Q)}).catch(pe=>{console.error("Failed to save imported plan",pe),n.add({severity:"error",summary:r("adminClassificationLauncher.importPlan.toast.saveError.summary"),detail:r("adminClassificationLauncher.importPlan.toast.saveError.detail"),life:4e3})})}catch(ae){n.add({severity:"error",summary:r("adminClassificationLauncher.importPlan.toast.parseError.summary"),detail:r("adminClassificationLauncher.importPlan.toast.parseError.detail",{message:ae.message}),life:5e3})}},g.readAsText(I),M.target.value=""},F=M=>{m.value=!1,o("select-plan",M)};return(M,I)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",B6,[e.createVNode(e.unref(de),{label:e.unref(r)("adminClassificationLauncher.createPlan.button"),icon:"ri-add-line",onClick:I[0]||(I[0]=g=>m.value=!0)},null,8,["label"]),e.createVNode(e.unref(de),{label:e.unref(r)("adminClassificationLauncher.importPlan.button"),icon:"ri-upload-line",severity:"secondary",outlined:"",onClick:z},null,8,["label"]),e.createElementVNode("input",{ref_key:"fileInput",ref:c,type:"file",accept:".json",style:{display:"none"},onChange:O},null,544)]),t.loading?(e.openBlock(),e.createElementBlock("div",H6,[I[6]||(I[6]=e.createElementVNode("i",{class:"ri-loader-4-line ri-spin","aria-hidden":"true"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("adminClassificationLauncher.existingPlans.loading")),1)])):t.plans.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value.length>0?(e.openBlock(),e.createElementBlock("div",Q6,[e.createElementVNode("div",P6,[e.createElementVNode("span",_6,e.toDisplayString(e.unref(r)("adminClassificationLauncher.selectionBar.selected",{count:h.value.length,total:t.plans.length})),1),f.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"select-all-link",onClick:I[1]||(I[1]=g=>h.value=[])},e.toDisplayString(e.unref(r)("adminClassificationLauncher.selectionBar.clearSelection")),1)):(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-all-link",onClick:Y},e.toDisplayString(e.unref(r)("adminClassificationLauncher.selectionBar.selectAll",{total:t.plans.length})),1))]),e.createElementVNode("div",K6,[e.withDirectives(e.createVNode(e.unref(de),{icon:"ri-external-link-line",rounded:"",text:"",severity:"secondary",onClick:j},null,512),[[e.unref(a),e.unref(r)("adminClassificationLauncher.selectionBar.openAll"),void 0,{top:!0}]]),I[7]||(I[7]=e.createElementVNode("div",{class:"action-separator"},null,-1)),e.withDirectives(e.createVNode(e.unref(de),{icon:"ri-download-line",rounded:"",text:"",severity:"secondary",onClick:G},null,512),[[e.unref(a),e.unref(r)("adminClassificationLauncher.selectionBar.downloadAll"),void 0,{top:!0}]]),X.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(de),{key:0,icon:"ri-delete-bin-line",rounded:"",text:"",severity:"secondary",onClick:L},null,512)),[[e.unref(a),e.unref(r)("adminClassificationLauncher.deletePlan.button"),void 0,{top:!0}]]):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createVNode(Pa,{files:d.value,"current-node":{id:"classification-plans"},"datatable-column-config":Z,"inline-actions":A,"selected-nodes":h.value,"onUpdate:selectedNodes":I[2]||(I[2]=g=>h.value=g),onNavigateTo:I[3]||(I[3]=g=>o("select-plan",g.name))},null,8,["files","selected-nodes"]),t.plans.length>p.value?(e.openBlock(),e.createBlock(e.unref(bo),{key:1,first:b.value,rows:p.value,"total-records":t.plans.length,"rows-per-page-options":[10,25,50],template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown",onPage:W},null,8,["first","rows","total-records"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",$6,[e.createElementVNode("p",null,e.toDisplayString(e.unref(r)("adminClassificationLauncher.existingPlans.noPlansFound")),1)])),e.createVNode(e.unref(pt),{visible:m.value,"onUpdate:visible":I[5]||(I[5]=g=>m.value=g),header:e.unref(r)("adminClassificationLauncher.createPlan.title"),modal:"",style:{width:"30rem"}},{default:e.withCtx(()=>[e.createVNode(Zm,{onCreatePlan:F,onCancel:I[4]||(I[4]=g=>m.value=!1)})]),_:1},8,["visible","header"]),e.createVNode(e.unref(Zn),{group:"deletePlan"})]))}},[["__scopeId","data-v-615a03cb"]]),q6={class:"p-4"},eA={class:"text-2xl m-0"},tA={__name:"AdminClassificationLauncher",emits:["select-plan"],setup(t,{emit:l}){const a=l,i=bl.useToast(),{t:o}=Rt.useI18n(),n=e.ref(!0),s=e.ref([]),r=()=>{n.value=!0,fl.listPlanEntries().then(c=>{s.value=c.sort((m,h)=>m.name.localeCompare(h.name))}).catch(c=>{i.add({severity:"error",summary:o("adminClassificationLauncher.toast.listError.summary"),detail:o("adminClassificationLauncher.toast.listError.detail"),life:4e3}),console.error(c)}).finally(()=>{n.value=!1})};return e.onMounted(()=>{r()}),(c,m)=>(e.openBlock(),e.createElementBlock("div",q6,[e.createVNode(e.unref(Zo),null,{title:e.withCtx(()=>[e.createElementVNode("h1",eA,e.toDisplayString(e.unref(o)("adminClassificationLauncher.title")),1)]),content:e.withCtx(()=>[e.createVNode(gm,{plans:s.value,loading:n.value,onSelectPlan:m[0]||(m[0]=h=>a("select-plan",h)),onImportPlan:r},null,8,["plans","loading"])]),_:1})]))}};function zt(t){if(!t)return[];const l=/\${(.*?)}/g,a=t.matchAll(l);return Array.from(a,i=>i[1].split(":")[0].trim())}function wl(t,l,a){return t?t.replace(/\${(.*?)}/g,(i,o)=>{const[n,s]=o.trim().split(":");let r=l[n];const c=a?.find(p=>p.name===n);if(r==null||r==="")if(c?.default!==void 0&&c?.default!==null&&c?.default!=="")r=c.default;else return"";let m=String(r);s==="upper"&&(m=m.toUpperCase());const h=c?.prefix||"",b=c?.suffix||"";return h+m+b}):""}function mi(t){const l=t.lastIndexOf("."),a=l>0?t.substring(0,l):t,i=l>0?t.substring(l):"",o=a.match(/^(.*?)\s+\((\d+)\)$/);return o?{baseName:o[1],increment:parseInt(o[2],10),extension:i}:{baseName:a,increment:0,extension:i}}function lA(t,l,a){return l===0?t+a:`${t} (${l})${a}`}function aA(t,l){const a=new Map,i=new Set;for(const n of l){i.add(n);const{baseName:s,increment:r,extension:c}=mi(n),m=s+c,h=a.get(m)||0;r>h&&a.set(m,r)}const o=[];for(const n of t){const{baseName:s,extension:r}=mi(n),c=s+r;if(i.has(n)){const h=(a.get(c)||0)+1,b=lA(s,h,r);a.set(c,h),i.add(b),o.push(b)}else{i.add(n);const{increment:m}=mi(n),h=a.get(c)||0;m>h&&a.set(c,m),o.push(n)}}return o}class oA{getAspects(l={}){return Nn.listAspects(l)}getAspect(l){return Nn.getAspect(l)}getTypes(l={}){return An.listTypes(l)}getType(l){return An.getType(l)}extractPropertiesFromType(l){const a=[];return l.properties&&Object.entries(l.properties).forEach(([i,o])=>{a.push({key:o.id,title:o.title||i,dataType:o.dataType||"d:text",mandatory:o.mandatory||!1})}),a}extractPropertiesFromAspect(l){const a=[];return l.properties&&Object.entries(l.properties).forEach(([i,o])=>{a.push({key:o.id,title:o.title||i,dataType:o.dataType||"d:text",mandatory:o.mandatory||!1})}),a}async getAllPropertyKeys(){const l=new Set;try{const a=await this.getTypes({maxItems:1e3});if(a.list?.entries)for(const o of a.list.entries){const n=await this.getType(o.entry.id);this.extractPropertiesFromType(n.entry).forEach(r=>l.add(r.key))}const i=await this.getAspects({maxItems:1e3});if(i.list?.entries)for(const o of i.list.entries){const n=await this.getAspect(o.entry.id);this.extractPropertiesFromAspect(n.entry).forEach(r=>l.add(r.key))}}catch(a){console.error("Failed to fetch property keys from Alfresco",a)}return Array.from(l).sort()}}const al=new oA,fm=()=>({code:"",name:"",type:"cm:content",icon:"ri-file-line",emplacement:[],aspects:[],categories:[],metadata:{}}),nA={name:"NatureForm",components:{PrimeInputText:_e,PrimeMultiSelect:xa,PrimeDropdown:Ea,PrimeInputSwitch:gn,PrimeDataTable:$t,PrimeColumn:qt},directives:{tooltip:yt},props:{nature:{type:Object,default:null},emplacements:{type:Array,required:!0},existingNatures:{type:Array,default:()=>[]},isDuplicating:{type:Boolean,default:!1},categories:{type:Array,default:()=>[]},fields:{type:Array,default:()=>[]}},emits:["save","cancel"],setup(){return{toast:bl.useToast()}},data(){return{editableNature:fm(),editableMetadata:[],isEditMode:!1,metadataTypes:["ignored","value","field","template","parent"],remixIcons:["ri-file-line","ri-file-text-line","ri-file-pdf-line","ri-image-line","ri-film-line","ri-folder-line","ri-archive-line","ri-mail-line"],availableProperties:[],filteredProperties:[],selectedAspects:[],availableAspects:[]}},computed:{emplacementOptions(){return this.emplacements.map(t=>t.code)},calculatedPath(){return!this.editableNature.emplacement||this.editableNature.emplacement.length===0?"/":"/"+this.editableNature.emplacement.map(t=>{const l=this.emplacements.find(i=>i.code===t);if(!l)return`[${t}]`;const a=l.metadata?.["cm:name"];return a?.value||a?.template||t}).join("/")}},watch:{nature:{handler(t){t&&t.code?(this.isEditMode=!0,this.editableNature=JSON.parse(JSON.stringify(t))):(this.isEditMode=!1,this.editableNature=t?JSON.parse(JSON.stringify(t)):fm()),this.selectedAspects=this.editableNature.aspects||[],this.metadataToObjectArray(this.editableNature.metadata)},immediate:!0},"editableNature.type":{handler(t){t&&this.loadAllProperties()},immediate:!0},selectedAspects:{handler(){this.loadAllProperties()}}},mounted(){this.loadAvailableAspects()},methods:{isFieldOptional(t){if(t.type==="field"){const l=this.fields.find(a=>a.name===t.value);if(l&&l.optional===!0)return t.required=!1,!0}return!1},async loadAvailableAspects(){try{const t=await al.getAspects({maxItems:1e3});t.list?.entries&&(this.availableAspects=t.list.entries.map(l=>({id:l.entry.id,title:l.entry.title||l.entry.id})))}catch(t){console.error("Failed to load available aspects",t),this.availableAspects=[]}},async loadAllProperties(){const t=[];if(this.editableNature.type)try{const l=await al.getType(this.editableNature.type),a=al.extractPropertiesFromType(l.entry);t.push(...a.map(i=>({...i,source:`Type: ${this.editableNature.type}`})))}catch(l){console.error("Failed to load properties for type",this.editableNature.type,l)}if(this.selectedAspects&&this.selectedAspects.length>0)for(const l of this.selectedAspects)try{const a=await al.getAspect(l),i=al.extractPropertiesFromAspect(a.entry);t.push(...i.map(o=>({...o,source:`Aspect: ${l}`})))}catch(a){console.error("Failed to load properties for aspect",l,a)}this.availableProperties=t,this.generateMetadataFromProperties()},generateMetadataFromProperties(){const t={};this.editableMetadata.forEach(a=>{t[a.key]={type:a.type,value:a.value,required:a.required,title:a.title}});const l=this.availableProperties.map(a=>t[a.key]?{key:a.key,title:a.title,type:t[a.key].type,value:t[a.key].value,required:t[a.key].required||!1}:{key:a.key,title:a.title,type:"ignored",value:"",required:!1});this.editableMetadata.forEach(a=>{a.type!=="ignored"&&!this.availableProperties.find(i=>i.key===a.key)&&l.push({key:a.key,title:a.title||a.key,type:a.type,value:a.value,required:a.required})}),this.editableMetadata=l},searchProperties(t){const l=t.query.toLowerCase();l?this.filteredProperties=this.availableProperties.filter(a=>a.key.toLowerCase().includes(l)||a.title.toLowerCase().includes(l)||a.source&&a.source.toLowerCase().includes(l)):this.filteredProperties=this.availableProperties},metadataToObjectArray(t){if(!t){this.editableMetadata=[];return}const l=Object.entries(t).reduce((a,[i,o])=>{const n=Object.keys(o).find(c=>c!=="required"),s=o[n],r=o.required||!1;return a[i]={type:n,value:s,required:r},a},{});this.availableProperties.length>0?this.editableMetadata=this.availableProperties.map(a=>{const i=l[a.key]||{type:"ignored",value:"",required:!1};return{key:a.key,title:a.title,type:i.type,value:i.value,required:i.required}}):this.editableMetadata=Object.entries(t).map(([a,i])=>{const o=Object.keys(i).find(r=>r!=="required"),n=i[o],s=i.required||!1;return{key:a,type:o,value:n,required:s,title:a}})},metadataArrayToObject(){return this.editableMetadata.reduce((t,l)=>(l.key&&l.type!=="ignored"&&(t[l.key]={[l.type]:l.value},l.required&&l.type!=="parent"&&l.type!=="template"&&(t[l.key].required=!0)),t),{})},onMetadataTypeChange(t){if(t.type==="field"&&t.key&&!t.value){const l=t.key.split(":");l.length>1?t.value=l[l.length-1]:t.value=t.key}},addMetadata(){this.editableMetadata.push({key:"",type:"value",value:"",required:!1})},removeMetadata(t){this.editableMetadata.splice(t,1)},submit(){const t=Vt.global.t;if(!this.editableNature.code||!this.editableNature.name){this.toast.add({severity:"warn",summary:t("natureForm.validation.nameAndCodeRequired"),life:4e3});return}if((!this.isEditMode||this.isDuplicating)&&this.existingNatures.some(i=>i.code===this.editableNature.code)){this.toast.add({severity:"warn",summary:t("natureForm.validation.codeAlreadyExists",{code:this.editableNature.code}),life:4e3});return}const l={...this.editableNature,aspects:this.selectedAspects,metadata:this.metadataArrayToObject()};this.$emit("save",l)}}},iA={class:"flex flex-column gap-3"},sA={class:"form-field"},rA={class:"form-label",for:"name"},cA={class:"form-field"},dA={class:"form-label",for:"code"},mA={class:"form-field"},bA={class:"form-label",for:"type"},pA={class:"form-field"},uA={class:"form-label",for:"aspects"},hA={class:"font-semibold"},yA={class:"text-color-secondary"},ZA={class:"form-field"},gA={class:"form-label",for:"icon"},fA={key:0,class:"flex align-items-center"},WA={class:"flex align-items-center"},NA={key:0,class:"form-field"},AA={class:"form-label",for:"categories"},YA={class:"form-field"},zA={class:"form-label",for:"emplacement"},MA={class:"form-help"},XA={class:"form-field"},OA={class:"form-label"},wA={key:0,class:"text-center p-3 text-color-secondary"},kA={class:"form-help"},CA={key:0};function TA(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputText"),r=e.resolveComponent("PrimeMultiSelect"),c=e.resolveComponent("PrimeDropdown"),m=e.resolveComponent("PrimeColumn"),h=e.resolveComponent("PrimeInputSwitch"),b=e.resolveComponent("PrimeDataTable"),p=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",iA,[e.createElementVNode("div",sA,[e.createElementVNode("label",rA,e.toDisplayString(t.$t("natureForm.name")),1),e.createVNode(s,{id:"name",modelValue:o.editableNature.name,"onUpdate:modelValue":l[0]||(l[0]=d=>o.editableNature.name=d),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",cA,[e.createElementVNode("label",dA,e.toDisplayString(t.$t("natureForm.code")),1),e.createVNode(s,{id:"code",modelValue:o.editableNature.code,"onUpdate:modelValue":l[1]||(l[1]=d=>o.editableNature.code=d),disabled:o.isEditMode&&!a.isDuplicating,class:"w-full"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",mA,[e.createElementVNode("label",bA,e.toDisplayString(t.$t("natureForm.documentType")),1),e.createVNode(s,{id:"type",modelValue:o.editableNature.type,"onUpdate:modelValue":l[2]||(l[2]=d=>o.editableNature.type=d),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",pA,[e.createElementVNode("label",uA,e.toDisplayString(t.$t("natureForm.aspects")),1),e.createVNode(r,{id:"aspects",modelValue:o.selectedAspects,"onUpdate:modelValue":l[3]||(l[3]=d=>o.selectedAspects=d),options:o.availableAspects,placeholder:t.$t("natureForm.selectAspects"),optionLabel:"title",optionValue:"id",class:"w-full",filter:""},{option:e.withCtx(d=>[e.createElementVNode("div",null,[e.createElementVNode("div",hA,e.toDisplayString(d.option.id),1),e.createElementVNode("small",yA,e.toDisplayString(d.option.title),1)])]),_:1},8,["modelValue","options","placeholder"])]),e.createElementVNode("div",ZA,[e.createElementVNode("label",gA,e.toDisplayString(t.$t("natureForm.icon")),1),e.createVNode(c,{id:"icon",modelValue:o.editableNature.icon,"onUpdate:modelValue":l[4]||(l[4]=d=>o.editableNature.icon=d),options:o.remixIcons,placeholder:t.$t("natureForm.chooseIcon"),class:"w-full"},{value:e.withCtx(d=>[d.value?(e.openBlock(),e.createElementBlock("div",fA,[e.createElementVNode("i",{class:e.normalizeClass([d.value,"mr-2"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(d.value),1)])):e.createCommentVNode("",!0)]),option:e.withCtx(d=>[e.createElementVNode("div",WA,[e.createElementVNode("i",{class:e.normalizeClass([d.option,"mr-2"]),"aria-hidden":"true"},null,2),e.createElementVNode("span",null,e.toDisplayString(d.option),1)])]),_:1},8,["modelValue","options","placeholder"])]),a.categories.length>0?(e.openBlock(),e.createElementBlock("div",NA,[e.createElementVNode("label",AA,e.toDisplayString(t.$t("natureForm.categories")),1),e.createVNode(r,{id:"categories",modelValue:o.editableNature.categories,"onUpdate:modelValue":l[5]||(l[5]=d=>o.editableNature.categories=d),options:a.categories,placeholder:t.$t("natureForm.selectCategories"),optionLabel:"label",optionValue:"id",class:"w-full",filter:""},null,8,["modelValue","options","placeholder"])])):e.createCommentVNode("",!0),e.createElementVNode("div",YA,[e.createElementVNode("label",zA,e.toDisplayString(t.$t("natureForm.emplacement")),1),e.createVNode(r,{id:"emplacement",modelValue:o.editableNature.emplacement,"onUpdate:modelValue":l[6]||(l[6]=d=>o.editableNature.emplacement=d),options:n.emplacementOptions,placeholder:t.$t("natureForm.selectPath"),filter:"",autoFilterFocus:"",class:"w-full"},null,8,["modelValue","options","placeholder"]),e.createElementVNode("small",MA,[e.createTextVNode(e.toDisplayString(t.$t("natureForm.calculatedPath"))+" : ",1),e.createElementVNode("code",null,e.toDisplayString(n.calculatedPath),1)])]),e.createElementVNode("div",XA,[e.createElementVNode("label",OA,e.toDisplayString(t.$t("natureForm.metadata")),1),o.availableProperties.length===0?(e.openBlock(),e.createElementBlock("div",wA,e.toDisplayString(t.$t("natureForm.noMetadata")),1)):(e.openBlock(),e.createBlock(b,{key:1,value:o.editableMetadata,stripedRows:"",size:"small",class:"metadata-table"},{default:e.withCtx(()=>[e.createVNode(m,{field:"key",header:t.$t("natureForm.key")},{body:e.withCtx(({data:d})=>[e.createElementVNode("strong",null,e.toDisplayString(d.key),1),e.createElementVNode("div",kA,e.toDisplayString(d.title),1)]),_:1},8,["header"]),e.createVNode(m,{header:t.$t("natureForm.mappingType"),headerStyle:"width: 10rem"},{body:e.withCtx(({data:d})=>[e.createVNode(c,{modelValue:d.type,"onUpdate:modelValue":W=>d.type=W,options:o.metadataTypes,placeholder:t.$t("natureForm.mappingType"),class:"w-full",onChange:W=>n.onMetadataTypeChange(d)},null,8,["modelValue","onUpdate:modelValue","options","placeholder","onChange"])]),_:1},8,["header"]),e.createVNode(m,{header:t.$t("natureForm.value")},{body:e.withCtx(({data:d})=>[d.type!=="parent"&&d.type!=="ignored"?(e.openBlock(),e.createBlock(s,{key:0,modelValue:d.value,"onUpdate:modelValue":W=>d.value=W,placeholder:t.$t("natureForm.valueOrFieldName"),class:"w-full"},null,8,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)]),_:1},8,["header"]),e.createVNode(m,{header:t.$t("natureForm.required"),headerStyle:"width: 5rem; text-align: center",bodyStyle:"text-align: center"},{body:e.withCtx(({data:d})=>[d.type!=="parent"&&d.type!=="template"&&d.type!=="ignored"?e.withDirectives((e.openBlock(),e.createElementBlock("span",CA,[e.createVNode(h,{modelValue:d.required,"onUpdate:modelValue":W=>d.required=W,disabled:n.isFieldOptional(d)},null,8,["modelValue","onUpdate:modelValue","disabled"])])),[[p,n.isFieldOptional(d)?t.$t("natureForm.optionalFieldTooltip"):null,void 0,{top:!0}]]):e.createCommentVNode("",!0)]),_:1},8,["header"])]),_:1},8,["value"]))])])}const Wm=fe(nA,[["render",TA],["__scopeId","data-v-23d523ac"]]),Uo=()=>({name:"",description:"",type:"string",input:"text",values:[],search:null,regex:null,default:null,min:null,max:null,optional:!1,prefix:null,suffix:null,metadata:null}),IA=()=>({lang:"afts",query:"",valueField:"cm:name"}),Jo={string:["text","textarea","password","list","multilist","select","chips","search"],number:["int","double","knob","rating"],boolean:["boolean","toggle"],date:["date","datetime"],parent:["parent"]},jA={name:"FieldForm",components:{PrimeInputText:_e,PrimeTextarea:zl,PrimeDropdown:Ea,PrimeButton:de,PrimeMessage:ml,PrimeInputNumber:Yl,PrimeInputSwitch:gn,PrimeInputGroup:uo,PrimeInputGroupAddon:Ra},props:{field:{type:Object,default:null},existingFields:{type:Array,default:()=>[]}},emits:["save"],data(){return{editableField:Uo(),valuesAsString:"",isEditMode:!1,dataTypes:Object.keys(Jo),searchLanguages:["afts","cmis","noderef"],isTestingSearch:!1,testResults:[],testError:null,regexTestString:""}},computed:{filteredInputTypes(){return Jo[this.editableField.type]||[]},showValuesInput(){return["list","multilist","select"].includes(this.editableField.input)},showSearchInput(){return this.editableField.input==="search"},showStringConstraints(){return this.editableField.type==="string"&&this.editableField.input==="text"},showNumberConstraints(){return this.editableField.type==="number"},showParentConfig(){return this.editableField.input==="parent"},regexTestResult(){if(!this.editableField.regex||!this.regexTestString)return!1;try{return new RegExp(this.editableField.regex).test(this.regexTestString)}catch{return!1}},regexTestResultIcon(){return this.regexTestResult?"ri-check-line":"ri-close-line"},regexTestResultClass(){return this.regexTestResult?"bg-green-500":"bg-red-500"}},watch:{field:{handler(t){t&&t.name?(this.isEditMode=!0,this.editableField={...Uo(),...JSON.parse(JSON.stringify(t))}):(this.isEditMode=!1,this.editableField=t?{...Uo(),...JSON.parse(JSON.stringify(t))}:Uo()),this.valuesAsString=(this.editableField.values||[]).join(`
|
|
155
155
|
`),this.editableField.search||(this.editableField.search=IA())},immediate:!0}},methods:{onDataTypeChange(){this.filteredInputTypes.includes(this.editableField.input)||(this.editableField.input=this.filteredInputTypes[0])},onInputTypeChange(){for(const t in Jo)if(Jo[t].includes(this.editableField.input)){this.editableField.type!==t&&(this.editableField.type=t);break}},async testSearch(){if(!this.editableField.search.query){this.testError=this.$t("fieldForm.search.testError.emptyQuery");return}this.isTestingSearch=!0,this.testResults=[],this.testError=null;try{const t={include:["properties"],query:{language:this.editableField.search.lang,query:this.editableField.search.query}},l=await Ht.search(t);this.testResults=l.list.entries.map(a=>a.entry.properties[this.editableField.search.valueField]||a.entry.name),this.testResults.length===0&&(this.testError=this.$t("fieldForm.search.testError.noResult"))}catch(t){this.testError=this.$t("fieldForm.search.testError.fetchError",{message:t.message})}finally{this.isTestingSearch=!1}},submit(){const t={...this.editableField};if(!t.name||!t.description){console.error(this.$t("fieldForm.errors.nameAndDescriptionRequired"));return}if(!this.isEditMode&&this.existingFields.some(l=>l.name===t.name)){console.error(this.$t("fieldForm.errors.fieldNameExists",{name:t.name}));return}this.showParentConfig?(delete t.values,delete t.search,delete t.regex,delete t.min,delete t.max,delete t.default,delete t.prefix,delete t.suffix,t.optional=!1):delete t.metadata,this.showValuesInput?t.values=this.valuesAsString?this.valuesAsString.split(`
|
|
156
156
|
`).filter(l=>l):[]:delete t.values,this.showSearchInput||delete t.search,this.showStringConstraints||delete t.regex,this.showNumberConstraints||(delete t.min,delete t.max),t.input||(t.input="text"),t.optional?(t.prefix||delete t.prefix,t.suffix||delete t.suffix):(delete t.default,delete t.prefix,delete t.suffix),this.$emit("save",t)}}},GA={class:"flex flex-column gap-3"},DA={class:"form-field"},LA={class:"form-label",for:"name"},VA={class:"form-help"},vA={class:"form-field"},FA={class:"form-label",for:"description"},RA={class:"form-help"},SA={key:0,class:"form-field"},xA={class:"flex align-items-center gap-2"},UA={class:"form-label",for:"optional"},JA={class:"form-help"},EA={key:1,class:"border-1 surface-border p-3 border-round"},BA={key:0,class:"form-field mb-3"},HA={class:"form-label",for:"default-value"},QA={class:"form-help"},PA={class:"grid"},_A={class:"col-6"},KA={class:"form-field"},$A={class:"form-label",for:"prefix"},qA={class:"form-help"},eY={class:"col-6"},tY={class:"form-field"},lY={class:"form-label",for:"suffix"},aY={class:"form-help"},oY={class:"form-field"},nY={class:"form-label",for:"type"},iY={class:"form-help"},sY={class:"form-field"},rY={class:"form-label",for:"input"},cY={class:"form-help"},dY={key:2,class:"border-1 surface-border p-3 border-round"},mY={class:"form-field mb-3"},bY={class:"form-label",for:"regex"},pY={class:"form-help"},uY={class:"form-field"},hY={class:"form-label",for:"regex-test"},yY={key:3,class:"border-1 surface-border p-3 border-round"},ZY={class:"grid"},gY={class:"col-4"},fY={class:"form-field"},WY={class:"form-label",for:"default"},NY={class:"col-4"},AY={class:"form-field"},YY={class:"form-label",for:"min"},zY={class:"col-4"},MY={class:"form-field"},XY={class:"form-label",for:"max"},OY={key:4,class:"form-field"},wY={class:"form-label",for:"values"},kY={class:"form-help"},CY={key:5,class:"border-1 surface-border p-3 border-round"},TY={class:"flex flex-column gap-3"},IY={class:"form-field"},jY={class:"form-label",for:"search-lang"},GY={class:"form-field"},DY={class:"form-label",for:"search-query"},LY={class:"form-field"},VY={class:"form-label",for:"search-value"},vY={key:0},FY={class:"list-none p-0 m-0"},RY={key:6,class:"border-1 surface-border p-3 border-round"},SY={class:"form-field"},xY={class:"form-label",for:"metadata"},UY={class:"form-help"};function JY(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputText"),r=e.resolveComponent("PrimeInputSwitch"),c=e.resolveComponent("PrimeDropdown"),m=e.resolveComponent("PrimeInputGroupAddon"),h=e.resolveComponent("PrimeInputGroup"),b=e.resolveComponent("PrimeInputNumber"),p=e.resolveComponent("PrimeTextarea"),d=e.resolveComponent("PrimeButton"),W=e.resolveComponent("PrimeMessage");return e.openBlock(),e.createElementBlock("div",GA,[e.createElementVNode("div",DA,[e.createElementVNode("label",LA,e.toDisplayString(t.$t("fieldForm.name.label")),1),e.createVNode(s,{id:"name",modelValue:o.editableField.name,"onUpdate:modelValue":l[0]||(l[0]=Z=>o.editableField.name=Z),disabled:o.isEditMode,class:"w-full"},null,8,["modelValue","disabled"]),e.createElementVNode("small",VA,e.toDisplayString(t.$t("fieldForm.name.help")),1)]),e.createElementVNode("div",vA,[e.createElementVNode("label",FA,e.toDisplayString(t.$t("fieldForm.description.label")),1),e.createVNode(s,{id:"description",modelValue:o.editableField.description,"onUpdate:modelValue":l[1]||(l[1]=Z=>o.editableField.description=Z),class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",RA,e.toDisplayString(t.$t("fieldForm.description.help")),1)]),o.editableField.input!=="parent"?(e.openBlock(),e.createElementBlock("div",SA,[e.createElementVNode("div",xA,[e.createVNode(r,{id:"optional",modelValue:o.editableField.optional,"onUpdate:modelValue":l[2]||(l[2]=Z=>o.editableField.optional=Z)},null,8,["modelValue"]),e.createElementVNode("label",UA,e.toDisplayString(t.$t("fieldForm.optional.label")),1)]),e.createElementVNode("small",JA,e.toDisplayString(t.$t("fieldForm.optional.help")),1)])):e.createCommentVNode("",!0),o.editableField.optional?(e.openBlock(),e.createElementBlock("div",EA,[e.createElementVNode("h5",null,e.toDisplayString(t.$t("fieldForm.optionalSettings.title")),1),n.showNumberConstraints?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",BA,[e.createElementVNode("label",HA,e.toDisplayString(t.$t("fieldForm.defaultValue.label")),1),e.createVNode(s,{id:"default-value",modelValue:o.editableField.default,"onUpdate:modelValue":l[3]||(l[3]=Z=>o.editableField.default=Z),class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",QA,e.toDisplayString(t.$t("fieldForm.defaultValue.help")),1)])),e.createElementVNode("div",PA,[e.createElementVNode("div",_A,[e.createElementVNode("div",KA,[e.createElementVNode("label",$A,e.toDisplayString(t.$t("fieldForm.prefix.label")),1),e.createVNode(s,{id:"prefix",modelValue:o.editableField.prefix,"onUpdate:modelValue":l[4]||(l[4]=Z=>o.editableField.prefix=Z),class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",qA,e.toDisplayString(t.$t("fieldForm.prefix.help")),1)])]),e.createElementVNode("div",eY,[e.createElementVNode("div",tY,[e.createElementVNode("label",lY,e.toDisplayString(t.$t("fieldForm.suffix.label")),1),e.createVNode(s,{id:"suffix",modelValue:o.editableField.suffix,"onUpdate:modelValue":l[5]||(l[5]=Z=>o.editableField.suffix=Z),class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",aY,e.toDisplayString(t.$t("fieldForm.suffix.help")),1)])])])])):e.createCommentVNode("",!0),e.createElementVNode("div",oY,[e.createElementVNode("label",nY,e.toDisplayString(t.$t("fieldForm.dataType.label")),1),e.createVNode(c,{id:"type",modelValue:o.editableField.type,"onUpdate:modelValue":l[6]||(l[6]=Z=>o.editableField.type=Z),options:o.dataTypes,placeholder:t.$t("fieldForm.dataType.placeholder"),class:"w-full",onChange:n.onDataTypeChange},null,8,["modelValue","options","placeholder","onChange"]),e.createElementVNode("small",iY,e.toDisplayString(t.$t("fieldForm.dataType.help")),1)]),e.createElementVNode("div",sY,[e.createElementVNode("label",rY,e.toDisplayString(t.$t("fieldForm.inputType.label")),1),e.createVNode(c,{id:"input",modelValue:o.editableField.input,"onUpdate:modelValue":l[7]||(l[7]=Z=>o.editableField.input=Z),options:n.filteredInputTypes,placeholder:t.$t("fieldForm.inputType.placeholder"),class:"w-full",onChange:n.onInputTypeChange},null,8,["modelValue","options","placeholder","onChange"]),e.createElementVNode("small",cY,e.toDisplayString(t.$t("fieldForm.inputType.help")),1)]),n.showStringConstraints?(e.openBlock(),e.createElementBlock("div",dY,[e.createElementVNode("h5",null,e.toDisplayString(t.$t("fieldForm.stringConstraints.title")),1),e.createElementVNode("div",mY,[e.createElementVNode("label",bY,e.toDisplayString(t.$t("fieldForm.stringConstraints.regex.label")),1),e.createVNode(s,{id:"regex",modelValue:o.editableField.regex,"onUpdate:modelValue":l[8]||(l[8]=Z=>o.editableField.regex=Z),class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",pY,e.toDisplayString(t.$t("fieldForm.stringConstraints.regex.help")),1)]),e.createElementVNode("div",uY,[e.createElementVNode("label",hY,e.toDisplayString(t.$t("fieldForm.stringConstraints.regexTester.label")),1),e.createVNode(h,null,{default:e.withCtx(()=>[e.createVNode(s,{id:"regex-test",modelValue:o.regexTestString,"onUpdate:modelValue":l[9]||(l[9]=Z=>o.regexTestString=Z),placeholder:t.$t("fieldForm.stringConstraints.regexTester.placeholder"),class:"w-full"},null,8,["modelValue","placeholder"]),e.createVNode(m,{class:e.normalizeClass(n.regexTestResultClass)},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(["ri-lg",[n.regexTestResultIcon]]),"aria-hidden":"true"},null,2)]),_:1},8,["class"])]),_:1})])])):e.createCommentVNode("",!0),n.showNumberConstraints?(e.openBlock(),e.createElementBlock("div",yY,[e.createElementVNode("h5",null,e.toDisplayString(t.$t("fieldForm.numberConstraints.title")),1),e.createElementVNode("div",ZY,[e.createElementVNode("div",gY,[e.createElementVNode("div",fY,[e.createElementVNode("label",WY,e.toDisplayString(t.$t("fieldForm.numberConstraints.default.label")),1),e.createVNode(b,{id:"default",modelValue:o.editableField.default,"onUpdate:modelValue":l[10]||(l[10]=Z=>o.editableField.default=Z),class:"w-full"},null,8,["modelValue"])])]),e.createElementVNode("div",NY,[e.createElementVNode("div",AY,[e.createElementVNode("label",YY,e.toDisplayString(t.$t("fieldForm.numberConstraints.min.label")),1),e.createVNode(b,{id:"min",modelValue:o.editableField.min,"onUpdate:modelValue":l[11]||(l[11]=Z=>o.editableField.min=Z),class:"w-full"},null,8,["modelValue"])])]),e.createElementVNode("div",zY,[e.createElementVNode("div",MY,[e.createElementVNode("label",XY,e.toDisplayString(t.$t("fieldForm.numberConstraints.max.label")),1),e.createVNode(b,{id:"max",modelValue:o.editableField.max,"onUpdate:modelValue":l[12]||(l[12]=Z=>o.editableField.max=Z),class:"w-full"},null,8,["modelValue"])])])])])):e.createCommentVNode("",!0),n.showValuesInput?(e.openBlock(),e.createElementBlock("div",OY,[e.createElementVNode("label",wY,e.toDisplayString(t.$t("fieldForm.values.label")),1),e.createVNode(p,{id:"values",modelValue:o.valuesAsString,"onUpdate:modelValue":l[13]||(l[13]=Z=>o.valuesAsString=Z),rows:"5",class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",kY,e.toDisplayString(t.$t("fieldForm.values.help")),1)])):e.createCommentVNode("",!0),n.showSearchInput?(e.openBlock(),e.createElementBlock("div",CY,[e.createElementVNode("h5",null,e.toDisplayString(t.$t("fieldForm.search.title")),1),e.createElementVNode("div",TY,[e.createElementVNode("div",IY,[e.createElementVNode("label",jY,e.toDisplayString(t.$t("fieldForm.search.lang.label")),1),e.createVNode(c,{id:"search-lang",modelValue:o.editableField.search.lang,"onUpdate:modelValue":l[14]||(l[14]=Z=>o.editableField.search.lang=Z),options:o.searchLanguages,class:"w-full"},null,8,["modelValue","options"])]),e.createElementVNode("div",GY,[e.createElementVNode("label",DY,e.toDisplayString(t.$t("fieldForm.search.query.label")),1),e.createVNode(p,{id:"search-query",modelValue:o.editableField.search.query,"onUpdate:modelValue":l[15]||(l[15]=Z=>o.editableField.search.query=Z),rows:"3",class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",LY,[e.createElementVNode("label",VY,e.toDisplayString(t.$t("fieldForm.search.valueField.label")),1),e.createVNode(s,{id:"search-value",modelValue:o.editableField.search.valueField,"onUpdate:modelValue":l[16]||(l[16]=Z=>o.editableField.search.valueField=Z),class:"w-full"},null,8,["modelValue"])]),e.createVNode(d,{label:t.$t("fieldForm.search.testButton.label"),icon:"ri-search-line",class:"p-button-outlined",onClick:n.testSearch,loading:o.isTestingSearch},null,8,["label","onClick","loading"]),o.testResults.length>0?(e.openBlock(),e.createElementBlock("div",vY,[e.createElementVNode("h6",null,e.toDisplayString(t.$t("fieldForm.search.testResults.title")),1),e.createElementVNode("ul",FY,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.testResults,(Z,N)=>(e.openBlock(),e.createElementBlock("li",{key:N},e.toDisplayString(Z),1))),128))])])):e.createCommentVNode("",!0),o.testError?(e.openBlock(),e.createBlock(W,{key:1,severity:"error"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.testError),1)]),_:1})):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),n.showParentConfig?(e.openBlock(),e.createElementBlock("div",RY,[e.createElementVNode("h5",null,e.toDisplayString(t.$t("fieldForm.parentConfig.title")),1),e.createElementVNode("div",SY,[e.createElementVNode("label",xY,e.toDisplayString(t.$t("fieldForm.parentConfig.metadata.label")),1),e.createVNode(s,{id:"metadata",modelValue:o.editableField.metadata,"onUpdate:modelValue":l[17]||(l[17]=Z=>o.editableField.metadata=Z),class:"w-full"},null,8,["modelValue"]),e.createElementVNode("small",UY,e.toDisplayString(t.$t("fieldForm.parentConfig.metadata.help")),1)])])):e.createCommentVNode("",!0)])}const Nm=fe(jA,[["render",JY],["__scopeId","data-v-e0d8054a"]]),Am=()=>({code:"",type:"cm:folder",aspects:[],metadata:{}}),EY={name:"EmplacementForm",components:{PrimeInputText:_e,PrimeDropdown:Ea,PrimeMultiSelect:xa,PrimeInputSwitch:gn,PrimeDataTable:$t,PrimeColumn:qt},directives:{tooltip:yt},props:{emplacement:{type:Object,default:null},fields:{type:Array,default:()=>[]}},emits:["save"],setup(){return{toast:bl.useToast()}},data(){return{editableEmplacement:Am(),editableMetadata:[],isEditMode:!1,isTypeReadOnly:!0,metadataTypes:["ignored","value","field","template","parent"],availableProperties:[],selectedAspects:[],availableAspects:[]}},watch:{emplacement:{handler(t){t&&t.code?(this.isEditMode=!0,this.editableEmplacement=JSON.parse(JSON.stringify(t))):(this.isEditMode=!1,this.editableEmplacement=Am()),this.isTypeReadOnly=!0,this.selectedAspects=this.editableEmplacement.aspects||[],this.metadataToObjectArray(this.editableEmplacement.metadata)},immediate:!0},"editableEmplacement.type":{handler(t){t&&this.loadAllProperties()},immediate:!0},selectedAspects:{handler(){this.loadAllProperties()}}},mounted(){this.loadAvailableAspects()},methods:{isFieldOptional(t){if(t.type==="field"){const l=this.fields.find(a=>a.name===t.value);if(l&&l.optional===!0)return t.required=!1,!0}return!1},async loadAvailableAspects(){try{const t=await al.getAspects({maxItems:1e3});t.list?.entries&&(this.availableAspects=t.list.entries.map(l=>({id:l.entry.id,title:l.entry.title||l.entry.id})))}catch(t){console.error("Failed to load available aspects",t),this.availableAspects=[]}},async loadAllProperties(){const t=[];if(this.editableEmplacement.type)try{const l=await al.getType(this.editableEmplacement.type),a=al.extractPropertiesFromType(l.entry);t.push(...a.map(i=>({...i,source:`Type: ${this.editableEmplacement.type}`})))}catch(l){console.error("Failed to load properties for type",this.editableEmplacement.type,l)}if(this.selectedAspects&&this.selectedAspects.length>0)for(const l of this.selectedAspects)try{const a=await al.getAspect(l),i=al.extractPropertiesFromAspect(a.entry);t.push(...i.map(o=>({...o,source:`Aspect: ${l}`})))}catch(a){console.error("Failed to load properties for aspect",l,a)}this.availableProperties=t,this.generateMetadataFromProperties()},generateMetadataFromProperties(){const t={};this.editableMetadata.forEach(a=>{t[a.key]={type:a.type,value:a.value,required:a.required,title:a.title}});const l=this.availableProperties.map(a=>t[a.key]?{key:a.key,title:a.title,type:t[a.key].type,value:t[a.key].value,required:t[a.key].required||!1}:{key:a.key,title:a.title,type:"ignored",value:"",required:!1});this.editableMetadata.forEach(a=>{a.type!=="ignored"&&!this.availableProperties.find(i=>i.key===a.key)&&l.push({key:a.key,title:a.title||a.key,type:a.type,value:a.value,required:a.required})}),this.editableMetadata=l},metadataToObjectArray(t){if(!t){this.editableMetadata=[];return}const l=Object.entries(t).reduce((a,[i,o])=>{const n=Object.keys(o).find(c=>c!=="required"),s=o[n],r=o.required||!1;return a[i]={type:n,value:s,required:r},a},{});this.availableProperties.length>0?this.editableMetadata=this.availableProperties.map(a=>{const i=l[a.key]||{type:"ignored",value:"",required:!1};return{key:a.key,title:a.title,type:i.type,value:i.value,required:i.required}}):this.editableMetadata=Object.entries(t).map(([a,i])=>{const o=Object.keys(i).find(r=>r!=="required"),n=i[o],s=i.required||!1;return{key:a,type:o,value:n,required:s,title:a}})},metadataArrayToObject(){return this.editableMetadata.reduce((t,l)=>(l.key&&l.type!=="ignored"&&(t[l.key]={[l.type]:l.value},l.required&&l.type!=="parent"&&l.type!=="template"&&(t[l.key].required=!0)),t),{})},onMetadataTypeChange(t){if(t.type==="field"&&t.key&&!t.value){const l=t.key.split(":");l.length>1?t.value=l[l.length-1]:t.value=t.key}},submit(){if(!this.editableEmplacement.code){this.toast.add({severity:"warn",summary:Vt.global.t("emplacementForm.validation.codeRequired"),life:4e3});return}const t={...this.editableEmplacement,aspects:this.selectedAspects,metadata:this.metadataArrayToObject()};this.$emit("save",t)}}},BY={class:"flex flex-column gap-3"},HY={class:"form-field"},QY={class:"form-label",for:"code"},PY={class:"form-help"},_Y={class:"form-field"},KY={class:"form-label",for:"type"},$Y={class:"form-help"},qY={class:"form-field"},ez={class:"form-label",for:"aspects"},tz={class:"font-semibold"},lz={class:"text-color-secondary"},az={class:"form-field"},oz={class:"form-label"},nz={key:0,class:"text-center p-3 text-color-secondary"},iz={class:"form-help"},sz={key:0};function rz(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputText"),r=e.resolveComponent("PrimeMultiSelect"),c=e.resolveComponent("PrimeColumn"),m=e.resolveComponent("PrimeDropdown"),h=e.resolveComponent("PrimeInputSwitch"),b=e.resolveComponent("PrimeDataTable"),p=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",BY,[e.createElementVNode("div",HY,[e.createElementVNode("label",QY,e.toDisplayString(t.$t("emplacementForm.code")),1),e.createVNode(s,{id:"code",modelValue:o.editableEmplacement.code,"onUpdate:modelValue":l[0]||(l[0]=d=>o.editableEmplacement.code=d),disabled:o.isEditMode,class:"w-full"},null,8,["modelValue","disabled"]),e.createElementVNode("small",PY,e.toDisplayString(t.$t("emplacementForm.codeHelp")),1)]),e.createElementVNode("div",_Y,[e.createElementVNode("label",KY,[e.createTextVNode(e.toDisplayString(t.$t("emplacementForm.type"))+" ",1),o.isTypeReadOnly?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",class:"type-edit-link",onClick:l[1]||(l[1]=e.withModifiers(d=>o.isTypeReadOnly=!1,["prevent"]))},e.toDisplayString(t.$t("emplacementForm.editType")),1)):e.createCommentVNode("",!0)]),e.createVNode(s,{id:"type",modelValue:o.editableEmplacement.type,"onUpdate:modelValue":l[2]||(l[2]=d=>o.editableEmplacement.type=d),disabled:o.isTypeReadOnly,class:e.normalizeClass(["w-full",[{"type-readonly":o.isTypeReadOnly}]])},null,8,["modelValue","disabled","class"]),e.createElementVNode("small",$Y,e.toDisplayString(t.$t("emplacementForm.typeHelp")),1)]),e.createElementVNode("div",qY,[e.createElementVNode("label",ez,e.toDisplayString(t.$t("emplacementForm.aspects")),1),e.createVNode(r,{id:"aspects",modelValue:o.selectedAspects,"onUpdate:modelValue":l[3]||(l[3]=d=>o.selectedAspects=d),options:o.availableAspects,placeholder:t.$t("emplacementForm.selectAspects"),optionLabel:"title",optionValue:"id",class:"w-full",filter:""},{option:e.withCtx(d=>[e.createElementVNode("div",null,[e.createElementVNode("div",tz,e.toDisplayString(d.option.id),1),e.createElementVNode("small",lz,e.toDisplayString(d.option.title),1)])]),_:1},8,["modelValue","options","placeholder"])]),e.createElementVNode("div",az,[e.createElementVNode("label",oz,e.toDisplayString(t.$t("emplacementForm.metadata")),1),o.availableProperties.length===0?(e.openBlock(),e.createElementBlock("div",nz,e.toDisplayString(t.$t("emplacementForm.noMetadata")),1)):(e.openBlock(),e.createBlock(b,{key:1,value:o.editableMetadata,stripedRows:"",size:"small",class:"metadata-table"},{default:e.withCtx(()=>[e.createVNode(c,{field:"key",header:t.$t("emplacementForm.key")},{body:e.withCtx(({data:d})=>[e.createElementVNode("strong",null,e.toDisplayString(d.key),1),e.createElementVNode("div",iz,e.toDisplayString(d.title),1)]),_:1},8,["header"]),e.createVNode(c,{header:t.$t("emplacementForm.mappingType"),headerStyle:"width: 10rem"},{body:e.withCtx(({data:d})=>[e.createVNode(m,{modelValue:d.type,"onUpdate:modelValue":W=>d.type=W,options:o.metadataTypes,placeholder:t.$t("emplacementForm.mappingType"),class:"w-full",onChange:W=>n.onMetadataTypeChange(d)},null,8,["modelValue","onUpdate:modelValue","options","placeholder","onChange"])]),_:1},8,["header"]),e.createVNode(c,{header:t.$t("emplacementForm.value")},{body:e.withCtx(({data:d})=>[d.type!=="parent"&&d.type!=="ignored"?(e.openBlock(),e.createBlock(s,{key:0,modelValue:d.value,"onUpdate:modelValue":W=>d.value=W,placeholder:t.$t("emplacementForm.valueOrFieldName"),class:"w-full"},null,8,["modelValue","onUpdate:modelValue","placeholder"])):e.createCommentVNode("",!0)]),_:1},8,["header"]),e.createVNode(c,{header:t.$t("emplacementForm.required"),headerStyle:"width: 5rem; text-align: center",bodyStyle:"text-align: center"},{body:e.withCtx(({data:d})=>[d.type!=="parent"&&d.type!=="template"&&d.type!=="ignored"?e.withDirectives((e.openBlock(),e.createElementBlock("span",sz,[e.createVNode(h,{modelValue:d.required,"onUpdate:modelValue":W=>d.required=W,disabled:n.isFieldOptional(d)},null,8,["modelValue","onUpdate:modelValue","disabled"])])),[[p,n.isFieldOptional(d)?t.$t("emplacementForm.optionalFieldTooltip"):null,void 0,{top:!0}]]):e.createCommentVNode("",!0)]),_:1},8,["header"])]),_:1},8,["value"]))])])}const Ym=fe(EY,[["render",rz],["__scopeId","data-v-a11f28d4"]]),cz={name:"ViewSelectorPopup",components:{PrimeDialog:pt,PrimeButton:de,PrimeCheckbox:el,PrimeInputText:_e,PrimeIconField:Va,PrimeInputIcon:va},props:{visible:Boolean,selectedViews:{type:Array,default:()=>[]},availableViews:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:visible","update:selectedViews"],data(){return{localSelected:[],searchQuery:"",dragIndex:null,dragOverIndex:null}},computed:{allFilenames(){return this.availableViews.map(t=>t.value||t)},unselectedViews(){return this.allFilenames.filter(t=>!this.localSelected.includes(t))},isSearching(){return this.searchQuery.trim().length>0},searchResults(){const t=this.searchQuery.trim().toLowerCase();return t?this.allFilenames.filter(l=>l.toLowerCase().includes(t)):[]}},watch:{visible(t){t&&(this.localSelected=[...this.selectedViews||[]],this.searchQuery="")}},methods:{isSelected(t){return this.localSelected.includes(t)},toggleView(t,l){l?this.localSelected.includes(t)||this.localSelected.push(t):this.localSelected=this.localSelected.filter(a=>a!==t)},moveView(t,l){const a=t+l;if(a<0||a>=this.localSelected.length)return;const i=[...this.localSelected],o=i.splice(t,1)[0];i.splice(a,0,o),this.localSelected=i},onDragStart(t,l){this.dragIndex=t,l.dataTransfer.effectAllowed="move"},onDragOver(t){this.dragOverIndex=t},onDragLeave(){this.dragOverIndex=null},onDrop(t){if(this.dragOverIndex=null,this.dragIndex===null||this.dragIndex===t)return;const l=[...this.localSelected],a=l.splice(this.dragIndex,1)[0];l.splice(t,0,a),this.localSelected=l},onDragEnd(){this.dragIndex=null,this.dragOverIndex=null},validate(){this.$emit("update:selectedViews",[...this.localSelected]),this.$emit("update:visible",!1)}}},dz={key:0,class:"view-selector-search"},mz={key:1,class:"text-center p-3"},bz={key:0,class:"view-selector-section"},pz={class:"view-selector-section-header"},uz={class:"view-selector-list"},hz={class:"view-selector-label"},yz={key:0,class:"text-sm text-color-secondary p-2"},Zz={key:0,class:"view-selector-section"},gz={class:"view-selector-section-header"},fz={class:"view-selector-list"},Wz=["draggable","onDragstart","onDragover","onDrop"],Nz={key:0,class:"ri-draggable drag-handle"},Az={class:"view-selector-label"},Yz={key:1,class:"view-selector-arrows"},zz={key:1,class:"view-selector-section"},Mz={class:"view-selector-section-header"},Xz={class:"view-selector-list"},Oz={class:"view-selector-label"};function wz(t,l,a,i,o,n){const s=e.resolveComponent("PrimeInputIcon"),r=e.resolveComponent("PrimeInputText"),c=e.resolveComponent("PrimeIconField"),m=e.resolveComponent("PrimeCheckbox"),h=e.resolveComponent("PrimeButton"),b=e.resolveComponent("PrimeDialog");return e.openBlock(),e.createBlock(b,{visible:a.visible,"onUpdate:visible":l[5]||(l[5]=p=>t.$emit("update:visible",p)),modal:"",header:t.$t("adminClassificationPage.viewSelector.title"),style:{width:"550px",maxWidth:"95vw"}},{footer:e.withCtx(()=>[e.createVNode(h,{label:t.$t("cancel"),severity:"secondary",text:"",onClick:l[4]||(l[4]=p=>t.$emit("update:visible",!1))},null,8,["label"]),a.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(h,{key:0,label:t.$t("adminClassificationPage.viewSelector.validate"),icon:"ri-check-line",onClick:n.validate},null,8,["label","onClick"]))]),default:e.withCtx(()=>[a.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",dz,[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s,{class:"ri-search-line"}),e.createVNode(r,{modelValue:o.searchQuery,"onUpdate:modelValue":l[0]||(l[0]=p=>o.searchQuery=p),placeholder:t.$t("adminClassificationPage.viewSelector.search"),size:"small",fluid:""},null,8,["modelValue","placeholder"]),o.searchQuery?(e.openBlock(),e.createBlock(s,{key:0,class:"ri-close-line view-selector-clear",onClick:l[1]||(l[1]=p=>o.searchQuery="")})):e.createCommentVNode("",!0)]),_:1})])),a.loading?(e.openBlock(),e.createElementBlock("div",mz,[...l[6]||(l[6]=[e.createElementVNode("i",{class:"pi pi-spin pi-spinner",style:{"font-size":"1.5rem"}},null,-1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[n.isSearching?(e.openBlock(),e.createElementBlock("div",bz,[e.createElementVNode("div",pz,e.toDisplayString(t.$t("adminClassificationPage.viewSelector.searchResults")),1),e.createElementVNode("div",uz,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.searchResults,p=>(e.openBlock(),e.createElementBlock("div",{key:"search-"+p,class:"view-selector-item"},[e.createVNode(m,{modelValue:n.isSelected(p),binary:!0,"onUpdate:modelValue":d=>n.toggleView(p,d)},null,8,["modelValue","onUpdate:modelValue"]),e.createElementVNode("span",hz,e.toDisplayString(p),1)]))),128)),n.searchResults.length===0?(e.openBlock(),e.createElementBlock("div",yz,e.toDisplayString(t.$t("adminClassificationPage.viewSelector.noResults")),1)):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.localSelected.length>0?(e.openBlock(),e.createElementBlock("div",Zz,[e.createElementVNode("div",gz,e.toDisplayString(t.$t("adminClassificationPage.viewSelector.selected")),1),e.createElementVNode("div",fz,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.localSelected,(p,d)=>(e.openBlock(),e.createElementBlock("div",{key:p,class:e.normalizeClass(["view-selector-item",{"drag-over":!a.readonly&&o.dragOverIndex===d}]),draggable:!a.readonly,onDragstart:W=>!a.readonly&&n.onDragStart(d,W),onDragover:e.withModifiers(W=>!a.readonly&&n.onDragOver(d),["prevent"]),onDragleave:l[2]||(l[2]=W=>!a.readonly&&n.onDragLeave()),onDrop:W=>!a.readonly&&n.onDrop(d),onDragend:l[3]||(l[3]=W=>!a.readonly&&n.onDragEnd())},[a.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("i",Nz)),e.createVNode(m,{modelValue:!0,binary:!0,disabled:a.readonly,"onUpdate:modelValue":W=>n.toggleView(p,W)},null,8,["disabled","onUpdate:modelValue"]),e.createElementVNode("span",Az,e.toDisplayString(p),1),a.readonly?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Yz,[e.createVNode(h,{type:"button",icon:"ri-arrow-up-s-line",size:"small",severity:"secondary",text:"",rounded:"",disabled:d===0,onClick:W=>n.moveView(d,-1)},null,8,["disabled","onClick"]),e.createVNode(h,{type:"button",icon:"ri-arrow-down-s-line",size:"small",severity:"secondary",text:"",rounded:"",disabled:d===o.localSelected.length-1,onClick:W=>n.moveView(d,1)},null,8,["disabled","onClick"])]))],42,Wz))),128))])])):e.createCommentVNode("",!0),!a.readonly&&n.unselectedViews.length>0?(e.openBlock(),e.createElementBlock("div",zz,[e.createElementVNode("div",Mz,e.toDisplayString(t.$t("adminClassificationPage.viewSelector.available")),1),e.createElementVNode("div",Xz,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.unselectedViews,p=>(e.openBlock(),e.createElementBlock("div",{key:p,class:"view-selector-item"},[e.createVNode(m,{modelValue:!1,binary:!0,"onUpdate:modelValue":d=>n.toggleView(p,d)},null,8,["onUpdate:modelValue"]),e.createElementVNode("span",Oz,e.toDisplayString(p),1)]))),128))])])):e.createCommentVNode("",!0)],64))],64))]),_:1},8,["visible","header"])}const kz=fe(cz,[["render",wz],["__scopeId","data-v-765c68bc"]]),Le=Vt.global.t,Cz=()=>({NAME:"Nouveau Plan",DESCRIPTION:"Description",FIELDS:[],EMPLACEMENT:[],NATURES:[],VIEW_CATEGORIES:[]}),Tz={name:"AdminClassificationPage",components:{PrimeCard:Zo,PrimeButton:de,PrimeDataTable:$t,PrimeColumn:qt,PrimeDialog:pt,PrimeConfirmDialog:Zn,PrimeTabs:Ga,PrimeTabList:Da,PrimeTab:Vl,PrimeTabPanels:on,PrimeTabPanel:ha,PrimeInputText:_e,PrimeMultiSelect:xa,PrimeTag:ea,NatureForm:Wm,FieldForm:Nm,EmplacementForm:Ym,ViewSelectorPopup:kz},props:{filename:{type:String,required:!0}},setup(){return{confirm:go.useConfirm()}},data(){return{planContent:null,loading:!0,isSaving:!1,isNewPlan:!1,dialogTitle:"",selectedItem:null,displayNatureDialog:!1,displayFieldDialog:!1,displayEmplacementDialog:!1,isDirty:!1,isDuplicating:!1,displayCategoryDialog:!1,categoryForm:{id:"",label:"",display:[],views:[]},isEditingCategory:!1,displayOptions:[{label:"folderView",value:"folderView"},{label:"import",value:"import"},{label:"requalify",value:"requalify"}],availableViews:[],viewsLoading:!1,displayViewSelector:!1,viewSelectorCategory:null,canEdit:!1}},methods:{getCalculatedPath(t){return!t.emplacement||t.emplacement.length===0?"/":"/"+t.emplacement.map(l=>{const a=this.planContent.EMPLACEMENT.find(o=>o.code===l);if(!a)return`[${l}]`;const i=a.metadata?.["cm:name"];return i?.value||i?.template||l}).join("/")},getCategoryLabel(t){const l=(this.planContent?.VIEW_CATEGORIES||[]).find(a=>a.id===t);return l?l.label:t},loadPlan(){this.loading=!0,this.isNewPlan=!1,this.isDirty=!1,fl.getPlanWithPermissions(this.filename).then(({content:t,allowableOperations:l})=>{this.planContent=t,this.canEdit=l?.includes("update")??!1}).catch(t=>{t.response&&t.response.status===404?(this.isNewPlan=!0,this.canEdit=!0,this.planContent=Cz(),this.isDirty=!0,this.$toast.add({severity:"info",summary:Le("adminClassificationPage.toast.newPlan"),detail:Le("adminClassificationPage.toast.fileNotExist",{filename:this.filename}),life:3e3})):this.$toast.add({severity:"error",summary:Le("adminClassificationPage.toast.loadError"),detail:Le("adminClassificationPage.toast.loadErrorDetail"),life:4e3})}).finally(()=>{this.loading=!1})},savePlanFile(){this.isSaving=!0,fl.savePlan(this.filename,this.planContent).then(()=>{this.$toast.add({severity:"success",summary:Le("success"),detail:Le("adminClassificationPage.toast.saveSuccess"),life:3e3}),this.isNewPlan=!1,this.isDirty=!1}).catch(()=>{this.$toast.add({severity:"error",summary:Le("error"),detail:Le("adminClassificationPage.toast.saveError"),life:4e3})}).finally(()=>{this.isSaving=!1})},handleBeforeUnload(t){this.isDirty&&(t.preventDefault(),t.returnValue="")},exportPlan(){if(!this.planContent)return;const t=JSON.stringify(this.planContent,null,2),l=new Blob([t],{type:"application/json"}),a=URL.createObjectURL(l),i=document.createElement("a");i.href=a,i.download=this.filename.endsWith(".json")?this.filename:`${this.filename}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(a),this.$toast.add({severity:"success",summary:Le("adminClassificationPage.toast.exportSuccess"),detail:Le("adminClassificationPage.toast.exportSuccessDetail",{filename:this.filename}),life:3e3})},triggerImport(){this.$refs.fileInput.click()},handleFileImport(t){const l=t.target.files[0];if(!l)return;const a=new FileReader;a.onload=i=>{try{const o=JSON.parse(i.target.result);if(!o.NATURES||!o.FIELDS||!o.EMPLACEMENT)throw new Error(Le("adminClassificationPage.toast.invalidFileStructure"));this.planContent=o,this.isDirty=!0,this.$toast.add({severity:"success",summary:Le("adminClassificationPage.toast.importSuccess"),detail:Le("adminClassificationPage.toast.importSuccessDetail"),life:4e3})}catch(o){this.$toast.add({severity:"error",summary:Le("adminClassificationPage.toast.importError"),detail:Le("adminClassificationPage.toast.importErrorDetail",{message:o.message}),life:5e3})}},a.readAsText(l),t.target.value=""},async loadAvailableViews(){this.viewsLoading=!0;try{const t=await Pt.listViews();this.availableViews=t.map(l=>({label:l,value:l}))}catch{this.availableViews=[]}finally{this.viewsLoading=!1}},openNewNatureDialog(){this.selectedItem=null,this.isDuplicating=!1,this.dialogTitle=Le("adminClassificationPage.dialog.createNature"),this.displayNatureDialog=!0},openEditNatureDialog(t){this.selectedItem=t,this.isDuplicating=!1,this.dialogTitle=Le("adminClassificationPage.dialog.editNature",{name:t.name}),this.displayNatureDialog=!0},openDuplicateNatureDialog(t){this.selectedItem=JSON.parse(JSON.stringify(t)),this.selectedItem.code="",this.isDuplicating=!0,this.dialogTitle=Le("adminClassificationPage.dialog.duplicateNature",{name:t.name}),this.displayNatureDialog=!0},onNatureSaved(t){const l=this.planContent.NATURES.findIndex(a=>a.code===t.code);l!==-1?this.planContent.NATURES[l]=t:this.planContent.NATURES.push(t),this.autocreateFieldsFromNature(t),this.displayNatureDialog=!1},confirmDeleteNature(t){this.confirmDeleteItem(t,this.planContent.NATURES,Le("adminClassificationPage.confirm.nature"))},openNewFieldDialog(){this.selectedItem=null,this.dialogTitle=Le("adminClassificationPage.dialog.createField"),this.displayFieldDialog=!0},openEditFieldDialog(t){this.selectedItem=t,this.dialogTitle=Le("adminClassificationPage.dialog.editField",{name:t.name}),this.displayFieldDialog=!0},openDuplicateFieldDialog(t){this.selectedItem=JSON.parse(JSON.stringify(t)),this.selectedItem.name="",this.dialogTitle=Le("adminClassificationPage.dialog.duplicateField",{name:t.name}),this.displayFieldDialog=!0},onFieldSaved(t){const l=this.planContent.FIELDS.findIndex(a=>a.name===t.name);l!==-1?this.planContent.FIELDS[l]=t:this.planContent.FIELDS.push(t),this.displayFieldDialog=!1},confirmDeleteField(t){if(this.isFieldUsed(t.name)){this.$toast.add({severity:"error",summary:Le("adminClassificationPage.toast.deleteImpossible"),detail:Le("adminClassificationPage.toast.fieldUsed",{name:t.name}),life:5e3});return}this.confirmDeleteItem(t,this.planContent.FIELDS,Le("adminClassificationPage.confirm.field"))},openNewEmplacementDialog(){this.selectedItem=null,this.dialogTitle=Le("adminClassificationPage.dialog.createEmplacement"),this.displayEmplacementDialog=!0},openEditEmplacementDialog(t){this.selectedItem=t,this.dialogTitle=Le("adminClassificationPage.dialog.editEmplacement",{code:t.code}),this.displayEmplacementDialog=!0},onEmplacementSaved(t){const l=this.planContent.EMPLACEMENT.findIndex(a=>a.code===t.code);l!==-1?this.planContent.EMPLACEMENT[l]=t:this.planContent.EMPLACEMENT.push(t),this.autocreateFieldsFromEmplacement(t),this.displayEmplacementDialog=!1},confirmDeleteEmplacement(t){if(this.planContent.NATURES.some(a=>a.emplacement.includes(t.code))){this.$toast.add({severity:"error",summary:Le("adminClassificationPage.toast.deleteImpossible"),detail:Le("adminClassificationPage.toast.emplacementUsed",{code:t.code}),life:5e3});return}this.confirmDeleteItem(t,this.planContent.EMPLACEMENT,Le("adminClassificationPage.confirm.emplacement"))},openNewCategoryDialog(){this.categoryForm={id:"",label:"",display:[],views:[]},this.isEditingCategory=!1,this.dialogTitle=Le("adminClassificationPage.dialog.createCategory"),this.displayCategoryDialog=!0},openEditCategoryDialog(t){this.categoryForm={id:t.id,label:t.label,display:[...t.display||[]],views:[...t.views||[]]},this.isEditingCategory=!0,this.dialogTitle=Le("adminClassificationPage.dialog.editCategory",{label:t.label}),this.displayCategoryDialog=!0},onCategoryReorder(t){this.planContent.VIEW_CATEGORIES=t.value},saveCategoryForm(){this.planContent.VIEW_CATEGORIES||(this.planContent.VIEW_CATEGORIES=[]);const t=this.planContent.VIEW_CATEGORIES.findIndex(a=>a.id===this.categoryForm.id),l={...this.categoryForm};t!==-1?this.planContent.VIEW_CATEGORIES[t]=l:this.planContent.VIEW_CATEGORIES.push(l),this.displayCategoryDialog=!1},openViewSelector(t){this.viewSelectorCategory=t,this.displayViewSelector=!0},onViewsUpdated(t){this.viewSelectorCategory&&(this.viewSelectorCategory.views=t)},confirmDeleteCategory(t){this.confirm.require({message:Le("adminClassificationPage.confirm.deleteMessage",{itemType:Le("adminClassificationPage.confirm.category"),name:t.label}),header:Le("adminClassificationPage.confirm.deleteHeader"),icon:"pi pi-exclamation-triangle",group:"deleteItem",acceptProps:{severity:"danger"},accept:()=>{const l=this.planContent.VIEW_CATEGORIES.findIndex(a=>a.id===t.id);l>-1&&this.planContent.VIEW_CATEGORIES.splice(l,1),this.$toast.add({severity:"info",summary:Le("adminClassificationPage.toast.confirmed"),detail:Le("adminClassificationPage.toast.itemDeleted"),life:3e3})}})},autocreateFieldsFromNature(t){const l=new Set;Object.values(t.metadata).forEach(a=>{a.field&&l.add(a.field),a.template&&zt(a.template).forEach(i=>l.add(i))}),t.emplacement.forEach(a=>{const i=this.planContent.EMPLACEMENT.find(o=>o.code===a);i&&(zt(i.name).forEach(o=>l.add(o)),zt(i.title).forEach(o=>l.add(o)))}),l.forEach(a=>{this.planContent.FIELDS.some(i=>i.name===a)||(this.planContent.FIELDS.push({name:a,description:Le("adminClassificationPage.toast.autoCreatedForNature",{name:t.name}),type:"string",input:"text"}),this.$toast.add({severity:"info",summary:Le("adminClassificationPage.toast.fieldCreated"),detail:Le("adminClassificationPage.toast.fieldAutoCreated",{fieldName:a}),life:4e3}))})},autocreateFieldsFromEmplacement(t){const l=new Set;zt(t.name).forEach(a=>l.add(a)),zt(t.title).forEach(a=>l.add(a)),l.forEach(a=>{this.planContent.FIELDS.some(i=>i.name===a)||(this.planContent.FIELDS.push({name:a,description:Le("adminClassificationPage.toast.autoCreatedForEmplacement",{code:t.code}),type:"string",input:"text"}),this.$toast.add({severity:"info",summary:Le("adminClassificationPage.toast.fieldCreated"),detail:Le("adminClassificationPage.toast.fieldAutoCreated",{fieldName:a}),life:4e3}))})},isFieldUsed(t){for(const l of this.planContent.NATURES)for(const a of Object.values(l.metadata))if(a.field===t||a.template&&zt(a.template).includes(t))return!0;for(const l of this.planContent.EMPLACEMENT)if(zt(l.name).includes(t)||zt(l.title).includes(t))return!0;return!1},confirmDeleteItem(t,l,a){this.confirm.require({message:Le("adminClassificationPage.confirm.deleteMessage",{itemType:a,name:t.name||t.code}),header:Le("adminClassificationPage.confirm.deleteHeader"),icon:"pi pi-exclamation-triangle",group:"deleteItem",acceptProps:{severity:"danger"},accept:()=>{const i=t.code?"code":"name",o=l.findIndex(n=>n[i]===t[i]);o>-1&&l.splice(o,1),this.$toast.add({severity:"info",summary:Le("adminClassificationPage.toast.confirmed"),detail:Le("adminClassificationPage.toast.itemDeleted"),life:3e3})}})}},mounted(){this.filename.startsWith("plan-")||this.$toast.add({severity:"warn",summary:Le("adminClassificationPage.toast.invalidFilename"),detail:Le("adminClassificationPage.toast.filenameMustStartWithPlan"),life:5e3}),this.loadPlan(),this.loadAvailableViews(),window.addEventListener("beforeunload",this.handleBeforeUnload)},beforeUnmount(){window.removeEventListener("beforeunload",this.handleBeforeUnload)},watch:{filename(){this.loadPlan()},planContent:{handler(){this.loading||(this.isDirty=!0)},deep:!0}}},Iz={class:"p-4"},jz={key:0},Gz={key:1},Dz={key:0,class:"text-center"},Lz={key:1},Vz={key:0,class:"mb-2"},vz={key:0,class:"mb-2"},Fz={key:0,class:"mb-2"},Rz={key:0,class:"mb-2"},Sz={class:"flex align-items-center gap-2"},xz={class:"flex gap-2 justify-content-between"},Uz={class:"flex gap-2"},Jz={class:"flex gap-2"},Ez={class:"flex flex-column gap-3 p-3"},Bz={class:"category-form-field"},Hz={class:"category-form-label",for:"categoryId"},Qz={class:"category-form-field"},Pz={class:"category-form-label",for:"categoryLabel"},_z={class:"category-form-field"},Kz={class:"category-form-label",for:"categoryDisplay"};function $z(t,l,a,i,o,n){const s=e.resolveComponent("PrimeTab"),r=e.resolveComponent("PrimeTabList"),c=e.resolveComponent("PrimeButton"),m=e.resolveComponent("PrimeColumn"),h=e.resolveComponent("PrimeTag"),b=e.resolveComponent("PrimeDataTable"),p=e.resolveComponent("PrimeTabPanel"),d=e.resolveComponent("PrimeTabPanels"),W=e.resolveComponent("PrimeTabs"),Z=e.resolveComponent("PrimeCard"),N=e.resolveComponent("NatureForm"),y=e.resolveComponent("PrimeDialog"),A=e.resolveComponent("FieldForm"),f=e.resolveComponent("EmplacementForm"),Y=e.resolveComponent("PrimeInputText"),X=e.resolveComponent("PrimeMultiSelect"),G=e.resolveComponent("ViewSelectorPopup"),j=e.resolveComponent("PrimeConfirmDialog");return e.openBlock(),e.createElementBlock("div",Iz,[e.createVNode(Z,null,{title:e.withCtx(()=>[o.isNewPlan?(e.openBlock(),e.createElementBlock("span",jz,e.toDisplayString(t.$t("adminClassificationPage.titleNew")),1)):(e.openBlock(),e.createElementBlock("span",Gz,e.toDisplayString(t.$t("adminClassificationPage.titleAdmin")),1))]),subtitle:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("adminClassificationPage.file"))+" : ",1),e.createElementVNode("code",null,e.toDisplayString(a.filename),1)]),content:e.withCtx(()=>[o.loading?(e.openBlock(),e.createElementBlock("div",Dz,[l[16]||(l[16]=e.createElementVNode("i",{class:"pi pi-spin pi-spinner",style:{"font-size":"2rem"}},null,-1)),e.createElementVNode("p",null,e.toDisplayString(t.$t("adminClassificationPage.loading")),1)])):e.createCommentVNode("",!0),!o.loading&&o.planContent?(e.openBlock(),e.createElementBlock("div",Lz,[e.createVNode(W,{value:0},{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createVNode(s,{value:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("adminClassificationPage.tabs.natures")),1)]),_:1}),e.createVNode(s,{value:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("adminClassificationPage.tabs.fields")),1)]),_:1}),e.createVNode(s,{value:2},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("adminClassificationPage.tabs.emplacements")),1)]),_:1}),e.createVNode(s,{value:3},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("adminClassificationPage.tabs.categories")),1)]),_:1})]),_:1}),e.createVNode(d,null,{default:e.withCtx(()=>[e.createVNode(p,{value:0},{default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createElementBlock("div",Vz,[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.newNature"),icon:"ri-add-line",onClick:n.openNewNatureDialog},null,8,["label","onClick"])])):e.createCommentVNode("",!0),e.createVNode(b,{value:o.planContent.NATURES,paginator:"",rows:10},{default:e.withCtx(()=>[e.createVNode(m,{field:"code",header:t.$t("adminClassificationPage.columns.code"),sortable:""},null,8,["header"]),e.createVNode(m,{field:"name",header:t.$t("adminClassificationPage.columns.name"),sortable:""},null,8,["header"]),e.createVNode(m,{header:t.$t("adminClassificationPage.columns.emplacement")},{body:e.withCtx(L=>[e.createElementVNode("code",null,e.toDisplayString(n.getCalculatedPath(L.data)),1)]),_:1},8,["header"]),e.createVNode(m,{field:"type",header:t.$t("adminClassificationPage.columns.type")},null,8,["header"]),e.createVNode(m,{header:t.$t("adminClassificationPage.columns.icon")},{body:e.withCtx(L=>[e.createElementVNode("i",{class:e.normalizeClass(L.data.icon),"aria-hidden":"true"},null,2)]),_:1},8,["header"]),e.createVNode(m,{header:t.$t("adminClassificationPage.columns.categories")},{body:e.withCtx(L=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.data.categories||[],z=>(e.openBlock(),e.createBlock(h,{key:z,value:n.getCategoryLabel(z),class:"mr-1"},null,8,["value"]))),128))]),_:1},8,["header"]),o.canEdit?(e.openBlock(),e.createBlock(m,{key:0,header:t.$t("adminClassificationPage.columns.actions")},{body:e.withCtx(L=>[e.createVNode(c,{icon:"ri-pencil-line","aria-label":t.$t("modify"),rounded:"",severity:"success",class:"mr-2",onClick:z=>n.openEditNatureDialog(L.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-file-copy-line","aria-label":t.$t("duplicate"),rounded:"",severity:"info",class:"mr-2",onClick:z=>n.openDuplicateNatureDialog(L.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-delete-bin-line","aria-label":t.$t("delete"),rounded:"",severity:"warn",onClick:z=>n.confirmDeleteNature(L.data)},null,8,["aria-label","onClick"])]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["value"])]),_:1}),e.createVNode(p,{value:1},{default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createElementBlock("div",vz,[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.newField"),icon:"ri-add-line",onClick:n.openNewFieldDialog},null,8,["label","onClick"])])):e.createCommentVNode("",!0),e.createVNode(b,{value:o.planContent.FIELDS,paginator:"",rows:10},{default:e.withCtx(()=>[e.createVNode(m,{field:"name",header:t.$t("adminClassificationPage.columns.name"),sortable:""},null,8,["header"]),e.createVNode(m,{field:"description",header:t.$t("adminClassificationPage.columns.description")},null,8,["header"]),e.createVNode(m,{field:"type",header:t.$t("adminClassificationPage.columns.type")},null,8,["header"]),e.createVNode(m,{header:t.$t("adminClassificationPage.columns.status")},{body:e.withCtx(L=>[L.data.optional===!0?(e.openBlock(),e.createBlock(h,{key:0,value:t.$t("adminClassificationPage.columns.optional"),severity:"info"},null,8,["value"])):e.createCommentVNode("",!0)]),_:1},8,["header"]),o.canEdit?(e.openBlock(),e.createBlock(m,{key:0,header:t.$t("adminClassificationPage.columns.actions")},{body:e.withCtx(L=>[e.createVNode(c,{icon:"ri-pencil-line","aria-label":t.$t("modify"),rounded:"",severity:"success",class:"mr-2",onClick:z=>n.openEditFieldDialog(L.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-file-copy-line","aria-label":t.$t("duplicate"),rounded:"",severity:"info",class:"mr-2",onClick:z=>n.openDuplicateFieldDialog(L.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-delete-bin-line","aria-label":t.$t("delete"),rounded:"",severity:"warn",onClick:z=>n.confirmDeleteField(L.data)},null,8,["aria-label","onClick"])]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["value"])]),_:1}),e.createVNode(p,{value:2},{default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createElementBlock("div",Fz,[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.newEmplacement"),icon:"ri-add-line",onClick:n.openNewEmplacementDialog},null,8,["label","onClick"])])):e.createCommentVNode("",!0),e.createVNode(b,{value:o.planContent.EMPLACEMENT,paginator:"",rows:10},{default:e.withCtx(()=>[e.createVNode(m,{field:"code",header:t.$t("adminClassificationPage.columns.code"),sortable:""},null,8,["header"]),e.createVNode(m,{header:t.$t("adminClassificationPage.columns.name")},{body:e.withCtx(L=>[e.createTextVNode(e.toDisplayString(L.data.metadata?.["cm:name"]?.value||L.data.metadata?.["cm:name"]?.template||""),1)]),_:1},8,["header"]),o.canEdit?(e.openBlock(),e.createBlock(m,{key:0,header:t.$t("adminClassificationPage.columns.actions")},{body:e.withCtx(L=>[e.createVNode(c,{icon:"ri-pencil-line","aria-label":t.$t("modify"),rounded:"",severity:"success",class:"mr-2",onClick:z=>n.openEditEmplacementDialog(L.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-delete-bin-line","aria-label":t.$t("delete"),rounded:"",severity:"warn",onClick:z=>n.confirmDeleteEmplacement(L.data)},null,8,["aria-label","onClick"])]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["value"])]),_:1}),e.createVNode(p,{value:3},{default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createElementBlock("div",Rz,[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.newCategory"),icon:"ri-add-line",onClick:n.openNewCategoryDialog},null,8,["label","onClick"])])):e.createCommentVNode("",!0),e.createVNode(b,{value:o.planContent.VIEW_CATEGORIES,onRowReorder:n.onCategoryReorder,paginator:"",rows:10,"reorderable-rows":o.canEdit},{empty:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("adminClassificationPage.tabs.categories"))+" : 0 ",1)]),default:e.withCtx(()=>[o.canEdit?(e.openBlock(),e.createBlock(m,{key:0,rowReorder:"",headerStyle:"width: 3rem","reorderable-column":!1})):e.createCommentVNode("",!0),e.createVNode(m,{field:"id",header:t.$t("adminClassificationPage.columns.id"),sortable:""},null,8,["header"]),e.createVNode(m,{field:"label",header:t.$t("adminClassificationPage.columns.label")},null,8,["header"]),e.createVNode(m,{header:t.$t("adminClassificationPage.columns.display")},{body:e.withCtx(L=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.data.display,z=>(e.openBlock(),e.createBlock(h,{key:z,value:z,class:"mr-1"},null,8,["value"]))),128))]),_:1},8,["header"]),e.createVNode(m,{header:t.$t("adminClassificationPage.columns.views")},{body:e.withCtx(L=>[e.createElementVNode("div",Sz,[!L.data.views||L.data.views.length===0?(e.openBlock(),e.createBlock(h,{key:0,value:t.$t("adminClassificationPage.viewSelector.noViews"),severity:"secondary"},null,8,["value"])):(e.openBlock(),e.createBlock(h,{key:1,value:t.$t("adminClassificationPage.viewSelector.nViews",{count:L.data.views.length}),severity:"info"},null,8,["value"])),e.createVNode(c,{icon:o.canEdit?"ri-pencil-line":"ri-eye-line",size:"small",severity:"secondary",text:"",rounded:"",onClick:z=>n.openViewSelector(L.data,L.index)},null,8,["icon","onClick"])])]),_:1},8,["header"]),o.canEdit?(e.openBlock(),e.createBlock(m,{key:1,header:t.$t("adminClassificationPage.columns.actions")},{body:e.withCtx(L=>[e.createVNode(c,{icon:"ri-pencil-line","aria-label":t.$t("modify"),rounded:"",severity:"success",class:"mr-2",onClick:z=>n.openEditCategoryDialog(L.data)},null,8,["aria-label","onClick"]),e.createVNode(c,{icon:"ri-delete-bin-line","aria-label":t.$t("delete"),rounded:"",severity:"warn",onClick:z=>n.confirmDeleteCategory(L.data)},null,8,["aria-label","onClick"])]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["value","onRowReorder","reorderable-rows"])]),_:1})]),_:1})]),_:1})])):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[e.createElementVNode("div",xz,[e.createElementVNode("div",Uz,[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.export"),icon:"ri-download-line",disabled:o.loading||!o.planContent,onClick:n.exportPlan,severity:"secondary",outlined:""},null,8,["label","disabled","onClick"]),o.canEdit?(e.openBlock(),e.createBlock(c,{key:0,label:t.$t("adminClassificationPage.buttons.import"),icon:"ri-upload-line",disabled:o.loading||o.isSaving,onClick:n.triggerImport,severity:"secondary",outlined:""},null,8,["label","disabled","onClick"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Jz,[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.reload"),icon:"pi pi-refresh",disabled:o.loading||o.isSaving,onClick:n.loadPlan,severity:"secondary"},null,8,["label","disabled","onClick"]),o.canEdit?(e.openBlock(),e.createBlock(c,{key:0,label:o.isNewPlan?t.$t("adminClassificationPage.buttons.createFile"):t.$t("adminClassificationPage.buttons.saveFile"),icon:"pi pi-save",loading:o.isSaving,disabled:o.loading||!o.isDirty,class:"w-18rem",onClick:n.savePlanFile},null,8,["label","loading","disabled","onClick"])):e.createCommentVNode("",!0)])]),e.createElementVNode("input",{ref:"fileInput",type:"file",accept:".json",style:{display:"none"},onChange:l[0]||(l[0]=(...L)=>n.handleFileImport&&n.handleFileImport(...L))},null,544)]),_:1}),e.createVNode(y,{visible:o.displayNatureDialog,"onUpdate:visible":l[3]||(l[3]=L=>o.displayNatureDialog=L),header:o.dialogTitle,modal:"",class:"w-full",style:{width:"50rem"}},{footer:e.withCtx(()=>[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.cancel"),icon:"pi pi-times",text:"",onClick:l[1]||(l[1]=L=>o.displayNatureDialog=!1)},null,8,["label"]),e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.save"),icon:"pi pi-check",onClick:l[2]||(l[2]=L=>t.$refs.natureForm.submit())},null,8,["label"])]),default:e.withCtx(()=>[e.createVNode(N,{ref:"natureForm",nature:o.selectedItem,"existing-natures":o.planContent.NATURES||[],emplacements:o.planContent.EMPLACEMENT||[],categories:o.planContent.VIEW_CATEGORIES||[],fields:o.planContent.FIELDS||[],"is-duplicating":o.isDuplicating,onSave:n.onNatureSaved},null,8,["nature","existing-natures","emplacements","categories","fields","is-duplicating","onSave"])]),_:1},8,["visible","header"]),e.createVNode(y,{visible:o.displayFieldDialog,"onUpdate:visible":l[6]||(l[6]=L=>o.displayFieldDialog=L),header:o.dialogTitle,modal:"",class:"w-full",style:{width:"50rem"}},{footer:e.withCtx(()=>[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.cancel"),icon:"pi pi-times",text:"",onClick:l[4]||(l[4]=L=>o.displayFieldDialog=!1)},null,8,["label"]),e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.save"),icon:"pi pi-check",onClick:l[5]||(l[5]=L=>t.$refs.fieldForm.submit())},null,8,["label"])]),default:e.withCtx(()=>[e.createVNode(A,{ref:"fieldForm",field:o.selectedItem,"existing-fields":o.planContent.FIELDS||[],onSave:n.onFieldSaved},null,8,["field","existing-fields","onSave"])]),_:1},8,["visible","header"]),e.createVNode(y,{visible:o.displayEmplacementDialog,"onUpdate:visible":l[9]||(l[9]=L=>o.displayEmplacementDialog=L),header:o.dialogTitle,modal:"",class:"w-full",style:{width:"50rem"}},{footer:e.withCtx(()=>[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.cancel"),icon:"pi pi-times",text:"",onClick:l[7]||(l[7]=L=>o.displayEmplacementDialog=!1)},null,8,["label"]),e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.save"),icon:"pi pi-check",onClick:l[8]||(l[8]=L=>t.$refs.emplacementForm.submit())},null,8,["label"])]),default:e.withCtx(()=>[e.createVNode(f,{ref:"emplacementForm",emplacement:o.selectedItem,fields:o.planContent.FIELDS||[],onSave:n.onEmplacementSaved},null,8,["emplacement","fields","onSave"])]),_:1},8,["visible","header"]),e.createVNode(y,{visible:o.displayCategoryDialog,"onUpdate:visible":l[14]||(l[14]=L=>o.displayCategoryDialog=L),header:o.dialogTitle,modal:"",class:"w-full",style:{width:"50rem"}},{footer:e.withCtx(()=>[e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.cancel"),icon:"pi pi-times",text:"",onClick:l[13]||(l[13]=L=>o.displayCategoryDialog=!1)},null,8,["label"]),e.createVNode(c,{label:t.$t("adminClassificationPage.buttons.save"),icon:"pi pi-check",onClick:n.saveCategoryForm},null,8,["label","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("div",Ez,[e.createElementVNode("div",Bz,[e.createElementVNode("label",Hz,e.toDisplayString(t.$t("adminClassificationPage.columns.id")),1),e.createVNode(Y,{id:"categoryId",modelValue:o.categoryForm.id,"onUpdate:modelValue":l[10]||(l[10]=L=>o.categoryForm.id=L),disabled:o.isEditingCategory,class:"w-full"},null,8,["modelValue","disabled"])]),e.createElementVNode("div",Qz,[e.createElementVNode("label",Pz,e.toDisplayString(t.$t("adminClassificationPage.columns.label")),1),e.createVNode(Y,{id:"categoryLabel",modelValue:o.categoryForm.label,"onUpdate:modelValue":l[11]||(l[11]=L=>o.categoryForm.label=L),class:"w-full"},null,8,["modelValue"])]),e.createElementVNode("div",_z,[e.createElementVNode("label",Kz,e.toDisplayString(t.$t("adminClassificationPage.columns.display")),1),e.createVNode(X,{id:"categoryDisplay",modelValue:o.categoryForm.display,"onUpdate:modelValue":l[12]||(l[12]=L=>o.categoryForm.display=L),options:o.displayOptions,"option-label":"label","option-value":"value",class:"w-full"},null,8,["modelValue","options"])])])]),_:1},8,["visible","header"]),e.createVNode(G,{visible:o.displayViewSelector,"onUpdate:visible":l[15]||(l[15]=L=>o.displayViewSelector=L),selectedViews:o.viewSelectorCategory?o.viewSelectorCategory.views||[]:[],availableViews:o.availableViews,loading:o.viewsLoading,readonly:!o.canEdit,"onUpdate:selectedViews":n.onViewsUpdated},null,8,["visible","selectedViews","availableViews","loading","readonly","onUpdate:selectedViews"]),e.createVNode(j,{group:"deleteItem"})])}const qz=fe(Tz,[["render",$z],["__scopeId","data-v-30787776"]]);class eM{async ensureFolderHierarchy(l,a){let i=l;for(const o of a){const n={name:o.name,nodeType:o.type||"cm:folder"};o.properties&&(n.properties=o.properties);try{i=(await Ye.createNode(i,n)).entry.id}catch(s){if((s.code||s.status)===409)try{i=(await He.getNode(i,{relativePath:o.name})).entry.id}catch{throw s}else throw s}}return i}async getDocumentLibraryId(l){const a=await ut.getWorkspace(l);return(await Ye.getDocumentLibrary(a.guid)).id}async createFileWithPlan(l,a,i,o,n,s){const r=await this.getDocumentLibraryId(l),c=await this.ensureFolderHierarchy(r,a),m=await Ye.copyNode(i,c,o),h={};return s.type&&(h.nodeType=s.type),s.aspects&&(h.aspectNames=s.aspects),n&&Object.keys(n).length>0&&(h.properties=n),Object.keys(h).length>0&&await Ye.updateNode(m.entry.id,h),m}async requalifyDocument(l,a,i,o,n,s,r){const c=r||await this.getDocumentLibraryId(a),m=await this.ensureFolderHierarchy(c,i);await Ye.moveNode(l,m,n);const h={};if(s.aspects){const p=(await Ye.getNode(l)).aspectNames||[],d=new Set([...p,...s.aspects]);h.aspectNames=[...d]}if(o&&Object.keys(o).length>0&&(h.properties=o),Object.keys(h).length>0)return Ye.updateNode(l,h)}async uploadWithPlan(l,a,i,o,n,s){Ol().startUploadWithClassificationPlan(l,a,i,o,n,s)}}const eo=new eM;function zm({planContent:t,metadataValues:l,selectedNature:a,destinationNodeName:i,toast:o}){let n;try{n=o||bl.useToast()}catch{n={add:()=>{}}}const s=Vt.global.t,r=e.ref({}),c=e.ref({}),m=O=>r.value[O]||[],h=O=>!!c.value[O],b=async O=>{if(!(!O.search||m(O.name).length>0)){c.value[O.name]=!0;try{const F={include:["properties"],query:{language:O.search.lang,query:O.search.query}},M=await Ht.search(F);r.value[O.name]=M.list.entries.map(I=>I.entry.properties[O.search.valueField]||I.entry.name)}catch(F){console.error(`Failed to execute search for field ${O.name}`,F),n.add({severity:"error",summary:s("classificationPlan.toast.searchError"),detail:s("classificationPlan.toast.searchFieldFailed",{field:O.description}),life:4e3})}finally{c.value[O.name]=!1}}},p=e.ref({});let d=null;const W=(O,F)=>{if(!O||F===void 0||F===null||F===""){delete p.value[O.name];return}O.regex&&(new RegExp(O.regex).test(F)?delete p.value[O.name]:p.value[O.name]=s("classificationPlan.validationRegexError",{regex:O.regex}))},Z=(O,F)=>{clearTimeout(d),d=setTimeout(()=>{W(O,F)},500)},N=O=>{const F=t.value?.FIELDS?.find(M=>M.name===O);return F?.default!==void 0&&F?.default!==null?F.default:void 0},y=O=>wl(O,l.value,t.value?.FIELDS||[]),A=e.computed(()=>{if(!a.value||!t.value?.FIELDS)return[];const O=new Set;Object.values(a.value.metadata).filter(I=>I.field).forEach(I=>O.add(I.field)),a.value.emplacement&&t.value.EMPLACEMENT&&a.value.emplacement.forEach(I=>{const g=t.value.EMPLACEMENT.find(J=>J.code===I);g&&g.metadata&&Object.values(g.metadata).forEach(J=>{J.field&&O.add(J.field),J.template&&zt(J.template).forEach(ae=>O.add(ae))})});const F=a.value.metadata["cm:name"]?.template;F&&zt(F).forEach(I=>O.add(I));const M=[...O];return t.value.FIELDS.filter(I=>M.includes(I.name))}),f=O=>t.value?.FIELDS?.find(M=>M.name===O)?.optional===!0,Y=e.computed(()=>{if(!a.value)return[];const O=new Set;return Object.entries(a.value.metadata).filter(([,F])=>F.required&&F.field).forEach(([,F])=>O.add(F.field)),Object.values(a.value.metadata).forEach(F=>{F.template&&zt(F.template).forEach(M=>O.add(M))}),a.value.emplacement&&t.value.EMPLACEMENT&&a.value.emplacement.forEach(F=>{const M=t.value.EMPLACEMENT.find(I=>I.code===F);M&&M.metadata&&Object.entries(M.metadata).forEach(([,I])=>{I.required&&I.field&&O.add(I.field),I.template&&zt(I.template).forEach(g=>O.add(g))})}),[...O].filter(F=>!f(F))}),X=O=>Y.value.includes(O),G=e.computed(()=>!a.value||!t.value?.EMPLACEMENT?[]:a.value.emplacement.map(O=>{const F=t.value.EMPLACEMENT.find(J=>J.code===O);if(!F)return{name:`[${O}]`};const M={};F.type&&(M.type=F.type);const I={};let g=null;if(F.metadata)for(const[J,ae]of Object.entries(F.metadata)){const Q=Object.keys(ae).find(P=>P!=="required"),pe=ae[Q];switch(Q){case"value":I[J]=pe;break;case"field":{let P=l.value[pe];if((P==null||P==="")&&f(pe)){const ee=N(pe);if(ee!==void 0)P=ee;else break}I[J]=P;break}case"template":I[J]=y(pe);break}if(J==="cm:name"&&Q!=="parent")switch(Q){case"value":g=pe;break;case"field":g=l.value[pe];break;case"template":g=y(pe);break}}return Object.keys(I).length>0&&(M.properties=I),M.name=g||F.name||`[${O}]`,M})),j=e.computed(()=>{if(!a.value||!t.value?.EMPLACEMENT)return"";const O=a.value.emplacement.map(F=>{const M=t.value.EMPLACEMENT.find(I=>I.code===F);if(!M)return"[emplacement introuvable]";if(M.metadata&&M.metadata["cm:name"]){const I=M.metadata["cm:name"],g=Object.keys(I).find(ae=>ae!=="required"),J=I[g];switch(g){case"value":return J;case"field":return l.value[J]||`[${J}]`;case"template":return y(J);default:return M.name||`[${F}]`}}return M.name||`[${F}]`});return i.value&&O.unshift(i.value),O.join("/")}),L=e.ref({});return e.watch([l,a],()=>{if(!a.value){L.value={};return}const O={};G.value.forEach(M=>{M.properties&&Object.assign(O,M.properties)});const F={};for(const[M,I]of Object.entries(a.value.metadata)){const g=Object.keys(I).find(Q=>Q!=="required"),J=I[g];let ae;switch(g){case"value":ae=J;break;case"field":if(ae=l.value[J],(ae==null||ae==="")&&f(J)){const Q=N(J);if(Q!==void 0)ae=Q;else continue}break;case"template":ae=y(J);break;case"parent":if(O[M])ae=O[M];else continue;break;default:continue}F[M]=ae}L.value=F},{deep:!0}),{currentFields:A,requiredFields:Y,isFieldRequired:X,summaryPathFull:G,summaryDestinationPath:j,summaryMetadata:L,resolveTemplateReactive:y,searchOptions:r,searchLoading:c,getSearchOptions:m,isSearchLoading:h,loadSearchOptions:b,validationErrors:p,validateField:W,debounceValidate:Z,resetClassification:()=>{r.value={},c.value={},p.value={},L.value={}}}}const bi="__ALL_CATEGORIES__",Mm="__NO_CATEGORY__",Eo="__NO_NATURE__",tM={name:"NatureSelector",components:{PrimeDataTable:$t,PrimeColumn:qt,PrimeInputText:_e,PrimeIconField:Va,PrimeInputIcon:va,PrimeDropdown:Ea,PrimeTag:ea},props:{natures:{type:Array,required:!0},modelValue:{type:String,default:null},allowNoNature:{type:Boolean,default:!1},gridThreshold:{type:Number,default:4},categories:{type:Array,default:()=>[]}},emits:["update:modelValue","select-no-nature"],setup(t,{emit:l}){const a=Vt.global.t,i=e.ref(""),o=e.ref(null),n=e.ref(bi),s=e.computed(()=>!t.categories||t.categories.length===0?[]:[{label:a("classificationPlan.allCategories"),value:bi},...t.categories.map(Z=>({label:Z.label,value:Z.id})),{label:a("classificationPlan.noCategory"),value:Mm}]),r=e.computed(()=>n.value===bi?t.natures:n.value===Mm?t.natures.filter(W=>!W.categories||W.categories.length===0):t.natures.filter(W=>W.categories&&W.categories.includes(n.value))),c=e.computed(()=>{const W=i.value.toLowerCase().trim();return W?r.value.filter(Z=>Z.name.toLowerCase().includes(W)||Z.code.toLowerCase().includes(W)):r.value}),m=e.computed(()=>({code:Eo,name:a("classificationPlan.noNature"),icon:"ri-file-line"})),h=e.computed(()=>{const W=[...c.value],Z=i.value.trim().length>0;return t.allowNoNature&&!Z&&W.unshift(m.value),W});return{t:a,natureSearch:i,selectedObject:o,selectedCategory:n,categoryFilterOptions:s,categoryFilteredNatures:r,tableOptions:h,rowClass:W=>W.code===Eo?"nature-row-no-nature":"",onRowSelect:W=>{W.data.code===Eo?l("select-no-nature"):l("update:modelValue",W.data.code)},getCategoryLabel:W=>{const Z=t.categories.find(N=>N.id===W);return Z?Z.label:W},NO_NATURE_CODE:Eo}}},lM={key:0},aM={key:0,class:"nature-category-filter"},oM={class:"nature-grid"},nM={key:0,class:"nature-grid-item"},iM={class:"nature-card-label nature-card-label--muted"},sM=["onClick"],rM={class:"nature-card-label"},cM={class:"nature-toolbar"},dM={key:0},mM={key:1,class:"nature-name-muted"};function bM(t,l,a,i,o,n){const s=e.resolveComponent("PrimeDropdown"),r=e.resolveComponent("PrimeInputIcon"),c=e.resolveComponent("PrimeInputText"),m=e.resolveComponent("PrimeIconField"),h=e.resolveComponent("PrimeColumn"),b=e.resolveComponent("PrimeTag"),p=e.resolveComponent("PrimeDataTable");return a.natures.length<=a.gridThreshold?(e.openBlock(),e.createElementBlock("div",lM,[i.categoryFilterOptions.length>0?(e.openBlock(),e.createElementBlock("div",aM,[e.createVNode(s,{modelValue:i.selectedCategory,"onUpdate:modelValue":l[0]||(l[0]=d=>i.selectedCategory=d),options:i.categoryFilterOptions,optionLabel:"label",optionValue:"value",placeholder:i.t("classificationPlan.filterByCategory"),class:"w-full"},{dropdownicon:e.withCtx(()=>[...l[6]||(l[6]=[e.createElementVNode("i",{class:"ri-filter-3-line"},null,-1)])]),_:1},8,["modelValue","options","placeholder"])])):e.createCommentVNode("",!0),e.createElementVNode("div",oM,[a.allowNoNature?(e.openBlock(),e.createElementBlock("div",nM,[e.createElementVNode("div",{class:e.normalizeClass(["nature-card nature-card-no-nature",[a.modelValue===i.NO_NATURE_CODE?"nature-card--selected":"nature-card--default"]]),onClick:l[1]||(l[1]=d=>t.$emit("select-no-nature"))},[l[7]||(l[7]=e.createElementVNode("i",{class:"ri-file-line",style:{"font-size":"2rem"}},null,-1)),e.createElementVNode("div",iM,e.toDisplayString(i.t("classificationPlan.noNature")),1)],2)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.categoryFilteredNatures,d=>(e.openBlock(),e.createElementBlock("div",{key:d.code,class:"nature-grid-item"},[e.createElementVNode("div",{class:e.normalizeClass(["nature-card",[a.modelValue===d.code?"nature-card--selected":"nature-card--default"]]),onClick:W=>t.$emit("update:modelValue",d.code)},[e.createElementVNode("i",{class:e.normalizeClass(d.icon||"ri-file-line"),style:{"font-size":"2rem"}},null,2),e.createElementVNode("div",rM,e.toDisplayString(d.name),1)],10,sM)]))),128))])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",cM,[e.createVNode(m,{class:"nature-toolbar-search"},{default:e.withCtx(()=>[e.createVNode(r,{class:"ri-search-line"}),e.createVNode(c,{modelValue:i.natureSearch,"onUpdate:modelValue":l[2]||(l[2]=d=>i.natureSearch=d),placeholder:i.t("classificationPlan.searchNaturePlaceholder"),class:"full-width"},null,8,["modelValue","placeholder"]),i.natureSearch?(e.openBlock(),e.createBlock(r,{key:0,class:"ri-close-line nature-search-clear",onClick:l[3]||(l[3]=d=>i.natureSearch="")})):e.createCommentVNode("",!0)]),_:1}),i.categoryFilterOptions.length>0?(e.openBlock(),e.createBlock(s,{key:0,modelValue:i.selectedCategory,"onUpdate:modelValue":l[4]||(l[4]=d=>i.selectedCategory=d),options:i.categoryFilterOptions,optionLabel:"label",optionValue:"value",placeholder:i.t("classificationPlan.filterByCategory"),class:"nature-toolbar-category"},{dropdownicon:e.withCtx(()=>[...l[8]||(l[8]=[e.createElementVNode("i",{class:"ri-filter-3-line"},null,-1)])]),_:1},8,["modelValue","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(p,{selection:i.selectedObject,"onUpdate:selection":l[5]||(l[5]=d=>i.selectedObject=d),value:i.tableOptions,"selection-mode":"single",dataKey:"code",paginator:i.tableOptions.length>12,rows:12,rowsPerPageOptions:[12,24,50],size:"small",rowHover:"",rowClass:i.rowClass,onRowSelect:i.onRowSelect},{default:e.withCtx(()=>[e.createVNode(h,{field:"icon",header:"",style:{width:"3rem"}},{body:e.withCtx(d=>[e.createElementVNode("i",{class:e.normalizeClass(d.data.icon||"ri-file-line"),style:{"font-size":"1.5rem"}},null,2)]),_:1}),e.createVNode(h,{field:"name",header:i.t("classificationPlan.natureColumn")},{body:e.withCtx(d=>[e.createElementVNode("span",{class:e.normalizeClass({"nature-name-muted":d.data.code===i.NO_NATURE_CODE})},e.toDisplayString(d.data.name),3)]),_:1},8,["header"]),e.createVNode(h,{field:"code",header:i.t("classificationPlan.code"),style:{width:"15rem"}},{body:e.withCtx(d=>[d.data.code!==i.NO_NATURE_CODE?(e.openBlock(),e.createElementBlock("code",dM,e.toDisplayString(d.data.code),1)):(e.openBlock(),e.createElementBlock("span",mM,"--"))]),_:1},8,["header"]),a.categories.length>0?(e.openBlock(),e.createBlock(h,{key:0,header:i.t("classificationPlan.category")},{body:e.withCtx(d=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.data.categories||[],W=>(e.openBlock(),e.createBlock(b,{key:W,value:i.getCategoryLabel(W),class:"mr-1"},null,8,["value"]))),128))]),_:1},8,["header"])):e.createCommentVNode("",!0)]),_:1},8,["selection","value","paginator","rowClass","onRowSelect"])],64))}const Xm=fe(tM,[["render",bM],["__scopeId","data-v-92c66cc9"]]),pM={name:"MetadataFormFields",components:{PrimeDatePicker:Fa,PrimeInputNumber:Yl,PrimeKnob:vi,PrimeCheckbox:el,PrimeToggleSwitch:La,PrimeDropdown:Ea,PrimeMultiSelect:xa,PrimeSelectButton:Fl,PrimeInputChips:qm,PrimeRating:e0,PrimePassword:Qi,PrimeTextarea:zl,PrimeInputText:_e},props:{fields:{type:Array,required:!0},modelValue:{type:Object,required:!0},requiredFields:{type:Array,default:()=>[]},disabledFields:{type:Set,default:()=>new Set},validationErrors:{type:Object,default:()=>({})},getSearchOptions:{type:Function,default:()=>[]},isSearchLoading:{type:Function,default:()=>!1}},emits:["update:modelValue","load-search","validate"],setup(t,{emit:l}){return{t:Vt.global.t,updateField:(o,n)=>{l("update:modelValue",{...t.modelValue,[o]:n})}}}},uM=["for"],hM={key:0,class:"required"},yM={key:14,class:"parent-field-wrapper"},ZM={key:0,class:"p-error"},gM={key:16},fM={key:17},WM={key:18},NM={key:19,class:"p-error"};function AM(t,l,a,i,o,n){const s=e.resolveComponent("PrimeDatePicker"),r=e.resolveComponent("PrimeInputNumber"),c=e.resolveComponent("PrimeKnob"),m=e.resolveComponent("PrimeCheckbox"),h=e.resolveComponent("PrimeToggleSwitch"),b=e.resolveComponent("PrimeDropdown"),p=e.resolveComponent("PrimeMultiSelect"),d=e.resolveComponent("PrimeSelectButton"),W=e.resolveComponent("PrimeInputChips"),Z=e.resolveComponent("PrimeRating"),N=e.resolveComponent("PrimePassword"),y=e.resolveComponent("PrimeTextarea"),A=e.resolveComponent("PrimeInputText");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.fields,f=>(e.openBlock(),e.createElementBlock("div",{key:f.name,class:"form-field"},[e.createElementVNode("label",{for:f.name},[e.createTextVNode(e.toDisplayString(f.description)+" ",1),a.requiredFields.includes(f.name)?(e.openBlock(),e.createElementBlock("span",hM," *")):e.createCommentVNode("",!0)],8,uM),f.input==="date"?(e.openBlock(),e.createBlock(s,{key:0,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.input==="datetime"?(e.openBlock(),e.createBlock(s,{key:1,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),showTime:"","onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.type==="number"?(e.openBlock(),e.createBlock(r,{key:2,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),min:f.min,max:f.max,"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","min","max","onUpdate:modelValue"])):f.input==="knob"?(e.openBlock(),e.createBlock(c,{key:3,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.input==="boolean"?(e.openBlock(),e.createBlock(m,{key:4,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),binary:!0,"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.input==="toggle"?(e.openBlock(),e.createBlock(h,{key:5,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.input==="list"?(e.openBlock(),e.createBlock(b,{key:6,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),options:f.values||[],placeholder:f.description,"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","options","placeholder","onUpdate:modelValue"])):f.input==="search"?(e.openBlock(),e.createBlock(b,{key:7,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),options:a.getSearchOptions(f.name),loading:a.isSearchLoading(f.name),placeholder:i.t("classificationPlan.searchPlaceholder"),"onUpdate:modelValue":Y=>i.updateField(f.name,Y),onFocus:Y=>t.$emit("load-search",f)},null,8,["id","modelValue","disabled","options","loading","placeholder","onUpdate:modelValue","onFocus"])):f.input==="multilist"?(e.openBlock(),e.createBlock(p,{key:8,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),options:f.values||[],placeholder:f.description,"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","options","placeholder","onUpdate:modelValue"])):f.input==="select"?(e.openBlock(),e.createBlock(d,{key:9,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),options:f.values||[],"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","options","onUpdate:modelValue"])):f.input==="chips"?(e.openBlock(),e.createBlock(W,{key:10,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.input==="rating"?(e.openBlock(),e.createBlock(Z,{key:11,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.input==="password"?(e.openBlock(),e.createBlock(N,{key:12,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.input==="textarea"?(e.openBlock(),e.createBlock(y,{key:13,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),"onUpdate:modelValue":Y=>i.updateField(f.name,Y)},null,8,["id","modelValue","disabled","onUpdate:modelValue"])):f.input==="parent"?(e.openBlock(),e.createElementBlock("div",yM,[e.createVNode(A,{id:f.name,modelValue:a.modelValue[f.name],disabled:"",class:"w-full"},null,8,["id","modelValue"]),a.modelValue[f.name]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("small",ZM,e.toDisplayString(i.t("classificationPlan.parentFieldNotFound")),1))])):(e.openBlock(),e.createBlock(A,{key:15,id:f.name,modelValue:a.modelValue[f.name],disabled:a.disabledFields.has(f.name),pattern:f.regex,"onUpdate:modelValue":Y=>i.updateField(f.name,Y),onInput:Y=>t.$emit("validate",f,a.modelValue[f.name])},null,8,["id","modelValue","disabled","pattern","onUpdate:modelValue","onInput"])),f.type==="number"&&(f.min!==void 0||f.max!==void 0)?(e.openBlock(),e.createElementBlock("small",gM,e.toDisplayString(i.t("classificationPlan.min"))+": "+e.toDisplayString(f.min??i.t("classificationPlan.na"))+", "+e.toDisplayString(i.t("classificationPlan.max"))+": "+e.toDisplayString(f.max??i.t("classificationPlan.na")),1)):e.createCommentVNode("",!0),f.type==="string"&&f.regex?(e.openBlock(),e.createElementBlock("small",fM,e.toDisplayString(i.t("classificationPlan.constraint"))+": "+e.toDisplayString(f.regex),1)):e.createCommentVNode("",!0),f.default!==void 0&&f.default!==null&&f.default!==""?(e.openBlock(),e.createElementBlock("small",WM,e.toDisplayString(i.t("classificationPlan.defaultValue"))+": "+e.toDisplayString(f.default),1)):e.createCommentVNode("",!0),a.validationErrors[f.name]?(e.openBlock(),e.createElementBlock("small",NM,e.toDisplayString(a.validationErrors[f.name]),1)):e.createCommentVNode("",!0)]))),128)}const pi=fe(pM,[["render",AM],["__scopeId","data-v-fb48e01d"]]),YM={key:0,class:"stepper-header"},zM={class:"step-title"},MM={key:0,class:"step-plan-info"},XM={key:1,class:"loading-container"},OM={key:2},wM={key:3},kM={key:0,class:"upload-file-list"},CM={class:"upload-file-name"},TM={key:0,class:"upload-file-size"},IM={key:1,class:"no-files-msg"},jM={key:4},GM={key:0,class:"single-file-config"},DM={class:"no-nature-destination"},LM={class:"no-nature-destination-label"},VM={class:"no-nature-destination-path"},vM={class:"selected-nature-info"},FM={key:0,class:"create-file-info"},RM={key:1,class:"multi-file-config"},SM={class:"category-mode-bar"},xM={key:0,class:"progress-bar-container"},UM={class:"progress-bar-label"},JM={key:1,class:"multi-file-filters"},EM={key:2,class:"multi-file-toolbar bulk-toolbar"},BM={class:"bulk-selection-count"},HM={class:"category-group-header"},QM={class:"category-group-count"},PM=["title"],_M={key:0,class:"inline-field-na"},KM={class:"inline-metadata-label"},$M={key:0,class:"inline-metadata-required"},qM={key:9,class:"inline-metadata-default"},eX={key:10,class:"p-error"},tX={key:5},lX={class:"summary-panel-header"},aX={class:"summary-panel-filename"},oX={class:"summary-section"},nX={class:"summary-section"},iX={class:"summary-metadata-list"},sX={key:1,class:"summary-section"},rX={key:2,class:"summary-section"},cX={key:0},dX={key:1},mX={key:6,class:"upload-inline-footer"},Ft="__NO_NATURE__",bX=fe({__name:"UploadPlanPopup",props:{visible:{type:Boolean,default:!1},currentNode:{type:Object,default:null},forcedPlanName:{type:String,default:null},filesToUpload:{type:Array,default:()=>[]},defaultDestinationNodeId:{type:String,default:null},createFileMode:{type:Object,default:null},forceSingleCategory:{type:Boolean,default:!1},duplicateNameStrategy:{type:String,default:null},inline:{type:Boolean,default:!1}},emits:["update:visible","close","file-created","upload-complete"],setup(t,{emit:l}){const a=pt,i=de,o=ya,n=t0,s=ea,r=Ji,c=Ei,m=Bi,h=$t,b=qt,p=Dt,d=Fl,W=Ga,Z=Da,N=Vl,y=l0,A=ql,f=Yl,Y=_e,X=el,G=Fa,j=t,L=l,z=Vt.global.t,O=bl.useToast(),F=It(),M=xe(),I=e.computed(()=>M.CLASSIFICATION_PLAN_ALLOW_NO_NATURE===!0),g=e.computed({get:()=>j.inline||j.visible,set:U=>{j.inline||L("update:visible",U)}}),J=e.computed(()=>!!j.currentNode),ae=e.computed(()=>!!j.forcedPlanName),Q=e.computed(()=>!!j.createFileMode),pe=e.computed(()=>1),P=e.computed(()=>J.value||Q.value),ee=e.computed(()=>P.value?-1:ae.value?1:2),S=e.computed(()=>P.value?ae.value?1:2:ae.value?2:3),E=e.computed(()=>P.value?ae.value?2:3:ae.value?3:4),ye=e.computed(()=>1),_=e.computed(()=>{const U=[];return ae.value||U.push({value:pe.value,label:z("classificationPlan.steps.selectPlan")}),P.value||U.push({value:ee.value,label:z("classificationPlan.stepper.files")}),U.push({value:S.value,label:Ve.value?z("classificationPlan.noNature"):z("classificationPlan.stepper.metadata")}),U.push({value:E.value,label:z("classificationPlan.stepper.summary")}),U}),B=e.ref(1),ue=e.ref(!1),Ne=e.ref(!1),be=e.ref(null),De=e.ref(null),Ve=e.ref(!1),Je=e.ref(null),st=e.ref([]),Se=e.ref(null),u=e.ref([]),te=e.ref(!j.forceSingleCategory),$=e.ref(null),T=e.ref([]),k=e.ref(null),x=e.ref(null),oe=e.ref("all"),ie=e.ref([]),H=e.ref(0),me=e.ref(!1),Ae=e.ref(null),re=e.ref(null),We=e.ref(new Set),Ue=e.computed({get(){const U=u.value[H.value];return U?U.metadata:{}},set(U){const V=u.value[H.value];V&&(V.metadata=U)}}),ve=e.computed(()=>{const U=u.value[H.value];return U?U.natureCode:null}),nt=e.computed(()=>ve.value&&bt.value.find(U=>U.code===ve.value)||null),gt=e.ref(null),{currentFields:Nt,requiredFields:ce,summaryPathFull:we,summaryDestinationPath:Qe,summaryMetadata:$e,resolveTemplateReactive:Be,getSearchOptions:wt,isSearchLoading:nl,loadSearchOptions:kt,validationErrors:il,debounceValidate:sl,resetClassification:ne}=zm({planContent:be,metadataValues:Ue,selectedNature:nt,destinationNodeName:gt}),Me=e.ref("row"),Fe=e.computed(()=>u.value.some(U=>Ta(U))),Ke=e.ref(M.CLASSIFICATION_PLAN_FULL_VIEW_THRESHOLD||5),rt=e.computed(()=>u.value.length>=Ke.value),Kt=e.computed(()=>u.value.length>1),kl=e.computed(()=>({bodyRow:({context:U})=>({style:U.selected?"background: color-mix(in srgb, var(--p-primary-color) 12%, var(--p-content-background))":void 0})})),bt=e.computed(()=>be.value?.NATURES||[]),Cl=e.computed(()=>(be.value?.VIEW_CATEGORIES||[]).filter(U=>U.display&&U.display.includes("import")));function Hl(U){return U.categoryId||"__unassigned__"}function ca(U){return U.categoryId?Cl.value.find(D=>D.id===U.categoryId)?.label||U.categoryId:z("classificationPlan.multiFile.unassigned")}function rl(U){return u.value.indexOf(U)}const ao=e.computed(()=>{let U=u.value.filter((R,se)=>oe.value==="incomplete"?!Lt(se):oe.value==="complete"?Lt(se):!0);const V=new Map;for(const R of U){const se=Hl(R);V.has(se)||V.set(se,[]),V.get(se).push(R)}const D=[];V.has("__unassigned__")&&(D.push(...V.get("__unassigned__")),V.delete("__unassigned__"));for(const R of Cl.value)V.has(R.id)&&(D.push(...V.get(R.id)),V.delete(R.id));for(const R of V.values())D.push(...R);return D});e.watch(()=>u.value.map(Hl).join(","),()=>{const U=[...new Set(ao.value.map(Hl))];ie.value=U},{immediate:!0}),e.watch(rt,U=>{U||(oe.value="all")}),e.watch(te,U=>{if(!U){const V=new Set(u.value.map(D=>D.categoryId).filter(Boolean));if($.value=V.size===1?[...V][0]:null,$.value)for(const D of u.value)D.categoryId=$.value}});const zi=e.computed(()=>u.value.filter((U,V)=>!Lt(V)).length),wa=e.computed(()=>u.value.filter((U,V)=>Lt(V)).length),_o=e.computed(()=>[{label:z("classificationPlan.multiFile.filterAll",{count:u.value.length}),value:"all"},{label:z("classificationPlan.multiFile.filterIncomplete",{count:zi.value}),value:"incomplete"},{label:z("classificationPlan.multiFile.filterComplete",{count:wa.value}),value:"complete"}]),Tl=e.computed(()=>(be.value?.VIEW_CATEGORIES||[]).filter(U=>U.display&&U.display.includes("requalify"))),Ql=e.computed(()=>J.value?Tl.value:Cl.value),Pl=e.computed(()=>{const U=[{label:z("classificationPlan.multiFile.allCategories"),value:null}];return Cl.value.forEach(V=>{U.push({label:V.label,value:V.id})}),U}),Ut=e.computed(()=>Cl.value.map(U=>({label:U.label,value:U.id}))),da=e.computed(()=>!te.value&&$.value?oo($.value):oo(null)),Il=e.computed(()=>[{label:z("classificationPlan.multiFile.modeMultiCategory"),value:!0},{label:z("classificationPlan.multiFile.modeMonoCategory"),value:!1}]),Mi=e.computed(()=>B.value===pe.value&&!ae.value?z("classificationPlan.steps.selectPlan"):B.value===ee.value&&!J.value?z("classificationPlan.steps.selectFiles"):B.value===S.value?Ve.value?z("classificationPlan.noNature"):Kt.value?z("classificationPlan.multiFile.configMultiple"):z("classificationPlan.multiFile.configSingle"):B.value===E.value?z("classificationPlan.steps.summary"):""),Ko=e.computed(()=>B.value===pe.value&&!ae.value?!!Se.value:B.value===ee.value&&!J.value?u.value.length>0:B.value===S.value?Ve.value?!0:u.value.every((U,V)=>Lt(V)):!1),$o=e.computed(()=>Ve.value?!J.value&&u.value.length>0:u.value.length>0&&u.value.every((U,V)=>Lt(V))),Xi=e.computed(()=>Ae.value!==null&&u.value[Ae.value]?u.value[Ae.value].file.name:""),Oi=e.computed(()=>nt.value?.name||ve.value||""),wi=e.computed(()=>{if(!j.currentNode)return"";const U=j.currentNode.path?.name;if(!U)return j.currentNode.name;if(gt.value){const R=U.split("/"),se=R.indexOf(gt.value);if(se!==-1){const he=R.slice(se);return he.push(j.currentNode.name),he.join("/")}}const V=U.split("/"),D=V.indexOf("documentLibrary");if(D!==-1){const R=V.slice(D+1);return R.push(j.currentNode.name),R.join("/")}return U+"/"+j.currentNode.name});function Wl(U){if(!U)return"-";if(Qa?.convertBytesToSize)return Qa.convertBytesToSize(U)||"-";const V=["B","KB","MB","GB"];let D=0,R=U;for(;R>=1024&&D<V.length-1;)R/=1024,D++;return`${R.toFixed(1)} ${V[D]}`}function Jt(U){return U?bt.value.find(D=>D.code===U)?.name||U:null}function oo(U){let V;return U?V=bt.value.filter(D=>D.categories&&D.categories.includes(U)):V=bt.value,I.value&&!J.value&&!Q.value?[{code:Ft,name:z("classificationPlan.noNature")},...V]:V}function ma(U){const V=u.value[U];if(!V)return null;const R=bt.value.find(Xe=>Xe.code===V.natureCode)?.metadata?.["cm:name"]?.template;if(!R)return V.file.name;const se=be.value?.FIELDS||[];let he=wl(R,V.metadata,se);if(he){const Xe=V.file.name,Oe=Xe.lastIndexOf("."),Ce=Oe>0?Xe.substring(Oe):"";he=he+Ce}return he||V.file.name}function ka(U){const V=u.value[U];if(!V?.natureCode)return{};const D=bt.value.find(lt=>lt.code===V.natureCode);if(!D?.metadata){const lt=M.CLASSIFICATION_PLAN_NATURE_CODE_PROPERTY;return lt?{[lt]:V.natureCode}:{}}const R=be.value?.FIELDS||[],se={};Ca(U).forEach(lt=>{lt.properties&&Object.assign(se,lt.properties)});const Xe={},Oe=V.file.name,Ce=Oe.lastIndexOf("."),Re=Ce>0?Oe.substring(Ce):"";for(const[lt,ft]of Object.entries(D.metadata)){const Ct=Object.keys(ft).find(Xt=>Xt!=="required"),Et=ft[Ct];switch(Ct){case"value":Xe[lt]=lt==="cm:name"&&Re?Et+Re:Et;break;case"field":{let Xt=V.metadata[Et];const ua=R.find(Ti=>Ti.name===Et);if((Xt==null||Xt==="")&&ua?.optional===!0)if(ua?.default!==void 0&&ua?.default!==null)Xt=ua.default;else continue;Xe[lt]=lt==="cm:name"&&Re?Xt+Re:Xt;break}case"template":{const Xt=wl(Et,V.metadata,R);Xe[lt]=lt==="cm:name"&&Re&&Xt?Xt+Re:Xt;break}case"parent":se[lt]&&(Xe[lt]=se[lt]);continue;default:continue}}const Yt=M.CLASSIFICATION_PLAN_NATURE_CODE_PROPERTY;return Yt&&(Xe[Yt]=V.natureCode),Xe}function Ca(U){const V=u.value[U];if(!V?.natureCode)return[];const D=bt.value.find(se=>se.code===V.natureCode);if(!D?.emplacement||!be.value?.EMPLACEMENT)return[];const R=be.value?.FIELDS||[];return D.emplacement.map(se=>{const he=be.value.EMPLACEMENT.find(Re=>Re.code===se);if(!he)return{name:`[${se}]`};const Xe={};he.type&&(Xe.type=he.type);const Oe={};let Ce=null;if(he.metadata)for(const[Re,Yt]of Object.entries(he.metadata)){const lt=Object.keys(Yt).find(Ct=>Ct!=="required"),ft=Yt[lt];switch(lt){case"value":Oe[Re]=ft;break;case"field":{let Ct=V.metadata[ft];const Et=R.find(Xt=>Xt.name===ft);if((Ct==null||Ct==="")&&Et?.optional===!0)if(Et?.default!==void 0&&Et?.default!==null)Ct=Et.default;else break;Oe[Re]=Ct;break}case"template":Oe[Re]=wl(ft,V.metadata,R);break}if(Re==="cm:name"&<!=="parent")switch(lt){case"value":Ce=ft;break;case"field":Ce=V.metadata[ft]||null;break;case"template":Ce=wl(ft,V.metadata,R);break}}return Object.keys(Oe).length>0&&(Xe.properties=Oe),Xe.name=Ce||he.name||`[${se}]`,Xe})}function Lt(U){const V=u.value[U];if(!V||!V.natureCode)return!1;if(V.natureCode===Ft)return!0;const D=bt.value.find(Oe=>Oe.code===V.natureCode);if(!D)return!1;const R=new Set;if(D.metadata)for(const[,Oe]of Object.entries(D.metadata))Oe.required&&Oe.field&&R.add(Oe.field),Oe.template&&zt(Oe.template).forEach(Ce=>R.add(Ce));if(D.emplacement&&be.value?.EMPLACEMENT)for(const Oe of D.emplacement){const Ce=be.value.EMPLACEMENT.find(Re=>Re.code===Oe);if(Ce?.metadata)for(const[,Re]of Object.entries(Ce.metadata))Re.required&&Re.field&&R.add(Re.field),Re.template&&zt(Re.template).forEach(Yt=>R.add(Yt))}const se=be.value?.FIELDS||[],he=new Set(se.filter(Oe=>Oe.optional===!0).map(Oe=>Oe.name)),Xe=V.metadata||{};for(const Oe of R){if(he.has(Oe))continue;const Ce=Xe[Oe];if(Ce==null||Ce==="")return!1}return!0}function no(U){if(!U||!be.value?.FIELDS)return[];const V=bt.value.find(R=>R.code===U);if(!V)return[];const D=new Set;if(V.metadata)for(const R of Object.values(V.metadata))R.field&&D.add(R.field),R.template&&zt(R.template).forEach(se=>D.add(se));if(V.emplacement&&be.value.EMPLACEMENT)for(const R of V.emplacement){const se=be.value.EMPLACEMENT.find(he=>he.code===R);if(se?.metadata)for(const he of Object.values(se.metadata))he.field&&D.add(he.field),he.template&&zt(he.template).forEach(Xe=>D.add(Xe))}return be.value.FIELDS.filter(R=>D.has(R.name))}function qo(U){const V=bt.value.find(he=>he.code===U);if(!V)return new Set;const D=new Set;if(V.metadata)for(const[,he]of Object.entries(V.metadata))he.required&&he.field&&D.add(he.field),he.template&&zt(he.template).forEach(Xe=>D.add(Xe));if(V.emplacement&&be.value?.EMPLACEMENT)for(const he of V.emplacement){const Xe=be.value.EMPLACEMENT.find(Oe=>Oe.code===he);if(Xe?.metadata)for(const[,Oe]of Object.entries(Xe.metadata))Oe.required&&Oe.field&&D.add(Oe.field),Oe.template&&zt(Oe.template).forEach(Ce=>D.add(Ce))}const R=be.value?.FIELDS||[],se=new Set(R.filter(he=>he.optional===!0).map(he=>he.name));for(const he of D)se.has(he)&&D.delete(he);return D}function Ta(U){if(!U.natureCode||U.natureCode===Ft)return!1;const V=M.CLASSIFICATION_PLAN_INLINE_METADATA_THRESHOLD||3,D=no(U.natureCode);return D.length>0&&D.length<=V}function en(U){const V=u.value[U];if(!V?.natureCode)return{filled:0,total:0};const D=qo(V.natureCode),R=V.metadata||{};let se=0;for(const he of D){const Xe=R[he];Xe!=null&&Xe!==""&&se++}return{filled:se,total:D.size}}function tn(U){if(Lt(U)){const{total:V}=en(U);return z("classificationPlan.multiFile.metadataFilled",{count:V})}return z("classificationPlan.multiFile.metadataBtn")}function Nl(U,V,D){U.metadata={...U.metadata,[V]:D}}function _l(U){return{file:U,categoryId:null,natureCode:null,metadata:{}}}function io(U){const V=new Set(u.value.map(R=>R.file.name));U.files.filter(R=>!V.has(R.name)).forEach(R=>{u.value.push(_l(R))})}function so(U){u.value.splice(U,1),H.value>=u.value.length&&(H.value=Math.max(0,u.value.length-1))}function ki(U){H.value=0,u.value[0].natureCode=U,q()}function ln(){u.value[0].natureCode=null,u.value[0].metadata={},ne()}function Ci(){Ve.value=!0,u.value[0].natureCode=null,v()}function C(){Ve.value=!1,Je.value=null}async function v(){try{const U=j.defaultDestinationNodeId;if(U){const D=[(await He.getNode(U)).entry.name],R=F.currentNode?.id;if(R&&R!==U){const se=await He.getNode(R,{include:["path"]}),he=se.entry.path?.elements||[],Xe=he.findIndex(Oe=>Oe.id===U);if(Xe!==-1){const Oe=he.slice(Xe+1).map(Ce=>Ce.name);D.push(...Oe)}D.push(se.entry.name)}Je.value="/ "+D.join(" / ")}else{const V=F.currentNode?.id;if(V){const D=await He.getNode(V,{include:["path"]}),R=D.entry.path?.elements||[],se=R.findIndex(Xe=>Xe.name==="documentLibrary"),he=R.slice(se+1).map(Xe=>Xe.name);he.push(D.entry.name),Je.value="/ "+he.join(" / ")}}}catch{}}async function q(){await e.nextTick(),await e.nextTick();const U=Nt.value||[],V={};U.forEach(R=>{if(re.value?.extractedValues&&re.value.extractedValues[R.name]!==void 0)V[R.name]=re.value.extractedValues[R.name];else if(J.value&&j.currentNode){const se=ge(R.name);V[R.name]=se!==void 0?se:null}else V[R.name]=null});const D=u.value[H.value];D&&(D.metadata=V)}function K(U){const V=u.value[U];if(!V?.natureCode)return;const D=no(V.natureCode),R={};D.forEach(se=>{re.value?.extractedValues&&re.value.extractedValues[se.name]!==void 0?R[se.name]=re.value.extractedValues[se.name]:se.default!==void 0&&se.default!==null&&se.default!==""?R[se.name]=se.default:R[se.name]=null}),V.metadata=R}function ge(U){if(!nt.value)return;const V={};if(nt.value.metadata)for(const[he,Xe]of Object.entries(nt.value.metadata)){const Oe=Object.keys(Xe).find(Ce=>Ce!=="required");Oe==="field"&&(V[Xe[Oe]]=he)}nt.value.emplacement&&be.value?.EMPLACEMENT&&nt.value.emplacement.forEach(he=>{const Xe=be.value.EMPLACEMENT.find(Oe=>Oe.code===he);if(Xe?.metadata)for(const[Oe,Ce]of Object.entries(Xe.metadata)){const Re=Object.keys(Ce).find(Yt=>Yt!=="required");Re==="field"&&(V[Ce[Re]]=Oe)}});const D=j.currentNode?.properties||{},R=V[U];if(R){const he=D[R];if(he!=null)return he}const se=D[U];if(se!=null)return se}function le(U){u.value[U].natureCode=null,u.value[U].metadata={}}function ke(U){if(u.value[U].metadata={},u.value[U].natureCode===Ft){Je.value||v();return}if(!u.value[U].categoryId){const V=bt.value.find(D=>D.code===u.value[U].natureCode);if(V?.categories?.length){const D=V.categories.find(R=>Cl.value.some(se=>se.id===R));D&&(u.value[U].categoryId=D)}}Ta(u.value[U])?K(U):(H.value=U,q())}function Pe(){for(let U=0;U<u.value.length;U++)u.value[U].categoryId=$.value,u.value[U].natureCode=null,u.value[U].metadata={}}function qe(){for(const U of T.value){const V=u.value.indexOf(U);V!==-1&&(u.value[V].categoryId=k.value,u.value[V].natureCode=null,u.value[V].metadata={})}T.value=[],k.value=null}function Mt(){const U=x.value;if(U){for(const V of T.value){const D=u.value.indexOf(V);if(D!==-1)if(u.value[D].natureCode=U,u.value[D].metadata={},U===Ft)Je.value||v();else{if(!u.value[D].categoryId){const R=bt.value.find(se=>se.code===U);if(R?.categories?.length){const se=R.categories.find(he=>Cl.value.some(Xe=>Xe.id===he));se&&(u.value[D].categoryId=se)}}Ta(u.value[D])&&K(D)}}T.value=[],x.value=null}}function At(U){H.value=U,Ae.value=U,me.value=!0}function Al(){me.value=!1,Kt.value||(H.value=0)}function jl(U){const V=u.value[U];if(!V?.natureCode)return"—";const D=bt.value.find(he=>he.code===V.natureCode);if(!D?.emplacement||!be.value?.EMPLACEMENT)return"—";const R=be.value?.FIELDS||[];return D.emplacement.map(he=>{const Xe=be.value.EMPLACEMENT.find(Oe=>Oe.code===he);if(!Xe)return`[${he}]`;if(Xe.metadata?.["cm:name"]){const Oe=Xe.metadata["cm:name"],Ce=Object.keys(Oe).find(Yt=>Yt!=="required"),Re=Oe[Ce];switch(Ce){case"value":return Re;case"field":return V.metadata[Re]||`[${Re}]`;case"template":return wl(Re,V.metadata,R)||`[${he}]`;default:return Xe.name||`[${he}]`}}return Xe.name||`[${he}]`}).join("/")}function cl(){B.value===pe.value&&!ae.value&&ot(),B.value===ee.value&&!J.value&&(be.value||$l()),B.value===ee.value&&!Kt.value&&(H.value=0),B.value<E.value&&B.value++}function Kl(){if(B.value>ye.value){if(ae.value&&B.value===ye.value)return;B.value--}}async function ro(){ue.value=!0;try{st.value=await fl.listPlans()}catch(U){console.error("Failed to load classification plans",U),O.add({severity:"error",summary:z("error"),detail:z("classificationPlan.toast.loadPlansError"),life:3e3})}finally{ue.value=!1}}async function ot(){if(Se.value&&!be.value){ue.value=!0;try{be.value=await fl.getPlan(Se.value),await dl()}catch(U){console.error("Failed to load plan content",U),O.add({severity:"error",summary:z("error"),detail:z("classificationPlan.toast.loadPlanContentError",{plan:Se.value}),life:3e3})}finally{ue.value=!1}}}async function $l(){if(be.value)return;const U=Se.value||j.forcedPlanName;if(!U){O.add({severity:"error",summary:z("error"),detail:"No classification plan configured",life:5e3});return}ue.value=!0;try{be.value=await fl.getPlan(U),await dl()}catch(V){console.error("Failed to load plan",V),O.add({severity:"error",summary:z("error"),detail:z("classificationPlan.toast.loadPlanContentError",{plan:U}),life:3e3})}finally{ue.value=!1}}async function dl(){try{const U=J.value?j.currentNode?.id:j.defaultDestinationNodeId||F.currentNode?.id;if(!U||!be.value)return;const V=await He.getNode(U,{include:["path","properties"]});gt.value=V.entry.name||null;const D=V.entry.path?.elements||[],R=D.findIndex(Ce=>Ce.name==="Sites");R!==-1&&D.length>R+1&&(De.value=D[R+1].name);const se=D.findIndex(Ce=>Ce.name==="documentLibrary");if(se===-1)return;const he=D.slice(se+1).map(Ce=>Ce.id),Oe=(await Promise.all(he.map(Ce=>He.getNode(Ce,{include:["properties"]})))).map(Ce=>({id:Ce.entry.id,name:Ce.entry.name,properties:Ce.entry.properties||{}}));Oe.push({id:V.entry.id,name:V.entry.name,properties:V.entry.properties||{}}),an(Oe),Ia(Oe)}catch(U){console.error("Failed to detect parent context:",U)}}function an(U){if(!be.value?.EMPLACEMENT)return;const V=[],D={},R=new Set;for(const se of be.value.EMPLACEMENT){if(!se.metadata)continue;const he=Object.keys(se.metadata);for(const Xe of U){let Oe=0;const Ce={};for(const Re of he)Xe.properties[Re]!==void 0&&(Oe++,Ce[Re]=Xe.properties[Re]);if(Oe>0){V.push({emplacementCode:se.code,folderId:Xe.id,folderName:Xe.name,metadataValues:Ce});for(const[Re,Yt]of Object.entries(se.metadata)){const lt=Object.keys(Yt).find(ft=>ft!=="required");if(lt==="field"){const ft=Yt[lt],Ct=Xe.properties[Re];Ct!==void 0&&(D[ft]=Ct,R.add(ft))}}break}}}re.value={matchedEmplacements:V,extractedValues:D,parentFoldersData:U},We.value=R}function Ia(U){if(!be.value?.FIELDS)return;re.value||(re.value={matchedEmplacements:[],extractedValues:{},parentFoldersData:U});const V=[...U].reverse(),D={},R=[];for(const se of be.value.FIELDS)if(!(se.input!=="parent"||!se.metadata))for(const he of V){const Xe=he.properties[se.metadata];if(Xe!=null){D[se.name]=Xe,R.push(se.name);break}}R.length>0&&(Object.assign(re.value.extractedValues,D),We.value=new Set([...We.value,...R]))}async function ja(){J.value?await pa():Q.value?await ba():await mo()}async function co(U){const V=new Map;for(let R=0;R<U.length;R++){const se=JSON.stringify(U[R].pathFull);V.has(se)||V.set(se,[]),V.get(se).push(R)}let D;j.defaultDestinationNodeId?D=j.defaultDestinationNodeId:D=await eo.getDocumentLibraryId(De.value);for(const[,R]of V){const se=U[R[0]].pathFull,he=R.map(Ce=>U[Ce].fileRenames[0].new);let Xe=[];try{const Ce=await eo.ensureFolderHierarchy(D,se);Xe=(await Ye.getDirectChildren(Ce,{maxItems:1e3})).children.map(Yt=>Yt.name)}catch{}const Oe=aA(he,Xe);for(let Ce=0;Ce<R.length;Ce++)U[R[Ce]].fileRenames[0].new=Oe[Ce]}}async function mo(){const U=Ve.value||u.value.every(V=>V.natureCode===Ft);if(!De.value&&!U){O.add({severity:"error",summary:z("error"),detail:z("classificationPlan.toast.workspaceError"),life:5e3});return}Ne.value=!0;try{const V=Ol();if(V.onCompleteCallback=()=>L("upload-complete"),Ve.value){const D=j.defaultDestinationNodeId||F.currentNode?.id,R=u.value.map(se=>({file:se.file,relativePath:""}));V.startUpload(R,D)}else{const D=be.value?.FIELDS||[],R=j.defaultDestinationNodeId||F.currentNode?.id,se=u.value.filter(Xe=>Xe.natureCode===Ft),he=u.value.filter(Xe=>Xe.natureCode!==Ft);if(se.length>0){const Xe=se.map(Oe=>({file:Oe.file,relativePath:""}));V.startUpload(Xe,R)}if(he.length>0){const Xe=[],Oe=[];for(const Ce of he){const Re=u.value.indexOf(Ce),Yt=bt.value.find(Xt=>Xt.code===Ce.natureCode),lt=Ca(Re),ft=ka(Re),Ct=Yt?.metadata?.["cm:name"]?.template;let Et=Ce.file.name;if(Ct){const Xt=wl(Ct,Ce.metadata,D);if(Xt){const ua=Ce.file.name.lastIndexOf("."),Ti=ua>0?Ce.file.name.substring(ua):"";Et=Xt+Ti}}Xe.push(Ce.file),Oe.push({pathFull:lt,metadata:ft,fileRenames:[{original:Ce.file.name,new:Et}]})}j.duplicateNameStrategy==="increment"&&await co(Oe),V.startUploadWithClassificationPlanMulti(De.value,Xe,Oe,j.defaultDestinationNodeId)}}O.add({severity:"success",summary:z("success"),detail:z("classificationPlan.toast.depositSuccess"),life:3e3}),g.value=!1}catch(V){console.error("Deposit error",V),O.add({severity:"error",summary:z("error"),detail:z("classificationPlan.toast.depositError"),life:5e3})}finally{Ne.value=!1}}async function ba(){if(!De.value){O.add({severity:"error",summary:z("error"),detail:z("classificationPlan.toast.workspaceError"),life:5e3});return}Ne.value=!0;try{const U=j.createFileMode,V=u.value[0],D=bt.value.find(Ce=>Ce.code===V.natureCode),R=Ca(0),se=ka(0),he=D?.metadata?.["cm:name"]?.template,Xe=he?wl(he,V.metadata,be.value?.FIELDS||[])+(U.fileExtension?`.${U.fileExtension}`:""):U.fileName,Oe=await eo.createFileWithPlan(De.value,R,U.templateNodeId,Xe,se,D);g.value=!1,L("file-created",{nodeId:Oe.entry.id,fileType:U.fileType}),O.add({severity:"success",summary:z("success"),detail:z("classificationPlan.toast.createSuccess"),life:3e3})}catch(U){console.error("Create file error:",U),O.add({severity:"error",summary:z("error"),detail:U.message||z("classificationPlan.toast.createError"),life:5e3})}finally{Ne.value=!1}}async function pa(){if(!De.value){O.add({severity:"error",summary:z("error"),detail:z("classificationPlan.toast.workspaceError"),life:5e3});return}Ne.value=!0;try{const U=u.value[0],V=bt.value.find(he=>he.code===U.natureCode),D=Ca(0),R=ka(0),se=ma(0);await eo.requalifyDocument(j.currentNode.id,De.value,D,R,se,V,j.defaultDestinationNodeId),O.add({severity:"success",summary:z("success"),detail:z("classificationPlan.toast.requalifySuccess"),life:3e3}),g.value=!1}catch(U){console.error("Requalification failed:",U),O.add({severity:"error",summary:z("error"),detail:U.message||z("classificationPlan.toast.requalifyError"),life:5e3})}finally{Ne.value=!1}}function Gl(){B.value=(ae.value,1),te.value=!j.forceSingleCategory,$.value=null,u.value=[],T.value=[],k.value=null,x.value=null,oe.value="all",Ke.value=M.CLASSIFICATION_PLAN_FULL_VIEW_THRESHOLD||5,Me.value="row",ie.value=[],H.value=0,be.value=null,De.value=null,Ne.value=!1,me.value=!1,Ae.value=null,Ve.value=!1,Je.value=null,re.value=null,We.value=new Set,Se.value=null,st.value=[],gt.value=null,ne(),L("close")}return e.watch(()=>j.visible,U=>{U&&(j.defaultDestinationNodeId&&He.getNode(j.defaultDestinationNodeId).then(V=>{gt.value=V.entry.name}).catch(()=>{}),ae.value?(Se.value=j.forcedPlanName,J.value?(B.value=S.value,u.value=[_l(j.currentNode)],ot()):Q.value?(B.value=S.value,u.value=[_l({name:j.createFileMode.fileName})],ot()):(B.value=ee.value,j.filesToUpload&&j.filesToUpload.length>0&&(u.value=j.filesToUpload.map(V=>_l(V))),ot())):(B.value=pe.value,J.value?u.value=[_l(j.currentNode)]:Q.value&&(u.value=[_l({name:j.createFileMode.fileName})]),ro())),U||Gl()},{immediate:!0}),(U,V)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.inline?"div":e.unref(a)),e.normalizeProps(e.guardReactiveProps(t.inline?{class:"unified-upload-inline"}:{visible:g.value,"onUpdate:visible":D=>{g.value=D},header:J.value?e.unref(z)("classificationPlan.requalify.title"):Q.value?e.unref(z)("classificationPlan.upload.headerCreate"):e.unref(z)("classificationPlan.upload.headerImport"),modal:!0,class:"unified-upload-dialog",style:{width:B.value===S.value&&Kt.value?Fe.value?"85rem":"70rem":"50rem",maxHeight:"90vh"},onHide:Gl})),e.createSlots({default:e.withCtx(()=>[ue.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",YM,[e.createVNode(e.unref(r),{value:B.value,linear:"",class:"stepper-indicator"},{default:e.withCtx(()=>[e.createVNode(e.unref(c),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,D=>(e.openBlock(),e.createBlock(e.unref(m),{key:D.value,value:D.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(D.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),e.createElementVNode("h4",zM,e.toDisplayString(Mi.value),1),Se.value&&B.value>=pe.value+1?(e.openBlock(),e.createElementBlock("small",MM,e.toDisplayString(e.unref(z)("classificationPlan.summary.generalInfo"))+" : "+e.toDisplayString(Se.value),1)):e.createCommentVNode("",!0)])),ue.value?(e.openBlock(),e.createElementBlock("div",XM,[...V[18]||(V[18]=[e.createElementVNode("i",{class:"ri-loader-4-line ri-spin",style:{"font-size":"2rem"}},null,-1)])])):e.createCommentVNode("",!0),!ue.value&&B.value===pe.value&&!ae.value?(e.openBlock(),e.createElementBlock("div",OM,[e.createVNode(e.unref(p),{modelValue:Se.value,"onUpdate:modelValue":V[0]||(V[0]=D=>Se.value=D),options:st.value,placeholder:e.unref(z)("classificationPlan.steps.selectPlan"),class:"full-width",disabled:st.value.length===0},null,8,["modelValue","options","placeholder","disabled"])])):e.createCommentVNode("",!0),!ue.value&&B.value===ee.value&&!P.value?(e.openBlock(),e.createElementBlock("div",wM,[e.createVNode(e.unref(o),{name:"files[]",multiple:"","show-upload-button":!1,"show-cancel-button":!1,"choose-label":e.unref(z)("classificationPlan.chooseFiles"),onSelect:io},{content:e.withCtx(()=>[u.value.length?(e.openBlock(),e.createElementBlock("ul",kM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(D,R)=>(e.openBlock(),e.createElementBlock("li",{key:R,class:"upload-file-item"},[e.createElementVNode("span",CM,e.toDisplayString(D.file.name),1),D.file.size?(e.openBlock(),e.createElementBlock("span",TM,e.toDisplayString(Wl(D.file.size)),1)):e.createCommentVNode("",!0),e.createVNode(e.unref(i),{icon:"ri-close-line",text:"",rounded:"",severity:"danger",size:"small","aria-label":e.unref(z)("classificationPlan.multiFile.removeFile"),onClick:se=>so(R)},null,8,["aria-label","onClick"])]))),128))])):(e.openBlock(),e.createElementBlock("p",IM,e.toDisplayString(e.unref(z)("classificationPlan.multiFile.noFiles")),1))]),_:1},8,["choose-label"])])):e.createCommentVNode("",!0),!ue.value&&B.value===S.value?(e.openBlock(),e.createElementBlock("div",jM,[Kt.value?(e.openBlock(),e.createElementBlock("div",RM,[e.createElementVNode("div",SM,[t.forceSingleCategory?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d),{key:0,modelValue:te.value,"onUpdate:modelValue":V[5]||(V[5]=D=>te.value=D),options:Il.value,optionLabel:"label",optionValue:"value",allowEmpty:!1,size:"small"},null,8,["modelValue","options"])),te.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(p),{key:1,modelValue:$.value,"onUpdate:modelValue":V[6]||(V[6]=D=>$.value=D),options:Ut.value,optionLabel:"label",optionValue:"value",placeholder:e.unref(z)("classificationPlan.multiFile.selectCategory"),size:"small",class:"global-category-select",onChange:Pe},null,8,["modelValue","options","placeholder"])),Fe.value?(e.openBlock(),e.createBlock(e.unref(d),{key:2,modelValue:Me.value,"onUpdate:modelValue":V[7]||(V[7]=D=>Me.value=D),options:[{label:e.unref(z)("classificationPlan.multiFile.layoutRow"),value:"row"},{label:e.unref(z)("classificationPlan.multiFile.layoutCol"),value:"col"}],optionLabel:"label",optionValue:"value",allowEmpty:!1,size:"small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0)]),rt.value?(e.openBlock(),e.createElementBlock("div",xM,[e.createElementVNode("span",UM,e.toDisplayString(e.unref(z)("classificationPlan.multiFile.progressLabel",{done:wa.value,total:u.value.length})),1),e.createVNode(e.unref(y),{value:u.value.length?wa.value/u.value.length*100:0,showValue:!1,dt:{value:{background:"var(--p-green-500)"},root:{height:"6px"}},class:"progress-bar"},null,8,["value"])])):e.createCommentVNode("",!0),rt.value?(e.openBlock(),e.createElementBlock("div",JM,[e.createVNode(e.unref(W),{value:oe.value,"onUpdate:value":V[8]||(V[8]=D=>oe.value=D)},{default:e.withCtx(()=>[e.createVNode(e.unref(Z),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_o.value,D=>(e.openBlock(),e.createBlock(e.unref(N),{key:D.value,value:D.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(D.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])])):e.createCommentVNode("",!0),T.value.length>=2?(e.openBlock(),e.createElementBlock("div",EM,[e.createElementVNode("span",BM,e.toDisplayString(e.unref(z)("classificationPlan.multiFile.selectedCount",{count:T.value.length})),1),te.value?(e.openBlock(),e.createBlock(e.unref(p),{key:0,modelValue:k.value,"onUpdate:modelValue":V[9]||(V[9]=D=>k.value=D),options:Ut.value,optionLabel:"label",optionValue:"value",placeholder:e.unref(z)("classificationPlan.multiFile.selectCategory"),size:"small",onChange:qe},null,8,["modelValue","options","placeholder"])):e.createCommentVNode("",!0),e.createVNode(e.unref(p),{modelValue:x.value,"onUpdate:modelValue":V[10]||(V[10]=D=>x.value=D),options:da.value,optionLabel:"name",optionValue:"code",placeholder:!te.value&&!$.value?e.unref(z)("classificationPlan.multiFile.selectCategoryFirst"):e.unref(z)("classificationPlan.multiFile.bulkSelectNature"),disabled:!te.value&&!$.value,size:"small",filter:"",filterFields:["name","code"],filterPlaceholder:e.unref(z)("classificationPlan.multiFile.searchNature"),resetFilterOnHide:"",onChange:Mt},null,8,["modelValue","options","placeholder","disabled","filterPlaceholder"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(h),{value:ao.value,selection:T.value,"onUpdate:selection":V[11]||(V[11]=D=>T.value=D),dataKey:"file.name",size:"small",rowHover:"",pt:kl.value,rowGroupMode:te.value?"subheader":void 0,groupRowsBy:te.value?Hl:void 0,expandableRowGroups:te.value,expandedRowGroups:ie.value,"onUpdate:expandedRowGroups":V[12]||(V[12]=D=>ie.value=D)},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(b),{selectionMode:"multiple",headerStyle:"width: 3rem"}),e.createVNode(e.unref(b),{header:e.unref(z)("classificationPlan.multiFile.fileName"),style:{"min-width":"12rem"}},{body:e.withCtx(({data:D})=>[e.createElementVNode("span",{title:D.file.name},e.toDisplayString(D.file.name),9,PM)]),_:1},8,["header"]),te.value?(e.openBlock(),e.createBlock(e.unref(b),{key:0,header:e.unref(z)("classificationPlan.multiFile.category"),style:{width:"12rem"}},{body:e.withCtx(({data:D})=>[e.createVNode(e.unref(p),{modelValue:D.categoryId,"onUpdate:modelValue":R=>D.categoryId=R,options:Pl.value,optionLabel:"label",optionValue:"value",placeholder:e.unref(z)("classificationPlan.multiFile.selectCategory"),class:"w-full",size:"small",onChange:R=>le(rl(D))},null,8,["modelValue","onUpdate:modelValue","options","placeholder","onChange"])]),_:1},8,["header"])):e.createCommentVNode("",!0),e.createVNode(e.unref(b),{header:e.unref(z)("classificationPlan.nature"),style:{width:"14rem"}},{body:e.withCtx(({data:D})=>[e.createVNode(e.unref(p),{modelValue:D.natureCode,"onUpdate:modelValue":R=>D.natureCode=R,options:oo(D.categoryId),optionLabel:"name",optionValue:"code",placeholder:!te.value&&!$.value?e.unref(z)("classificationPlan.multiFile.selectCategoryFirst"):e.unref(z)("classificationPlan.multiFile.selectNature"),disabled:!te.value&&!$.value,class:"w-full",size:"small",filter:"",filterFields:["name","code"],filterPlaceholder:e.unref(z)("classificationPlan.multiFile.searchNature"),resetFilterOnHide:"",onChange:R=>ke(rl(D))},null,8,["modelValue","onUpdate:modelValue","options","placeholder","disabled","filterPlaceholder","onChange"])]),_:1},8,["header"]),e.createVNode(e.unref(b),{header:e.unref(z)("classificationPlan.multiFile.metadataBtn"),style:e.normalizeStyle({minWidth:Fe.value?"20rem":"8rem"})},{body:e.withCtx(({data:D})=>[!D.natureCode||D.natureCode===Ft?(e.openBlock(),e.createElementBlock("span",_M,"—")):Ta(D)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["inline-metadata","inline-metadata--"+Me.value])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(no(D.natureCode),R=>(e.openBlock(),e.createElementBlock("div",{key:R.name,class:"inline-metadata-field"},[e.createElementVNode("label",KM,[e.createTextVNode(e.toDisplayString(R.description)+" ",1),qo(D.natureCode).has(R.name)?(e.openBlock(),e.createElementBlock("span",$M,"*")):e.createCommentVNode("",!0)]),R.input==="date"?(e.openBlock(),e.createBlock(e.unref(G),{key:0,modelValue:D.metadata[R.name],disabled:We.value.has(R.name),size:"small",class:"w-full","onUpdate:modelValue":se=>Nl(D,R.name,se)},null,8,["modelValue","disabled","onUpdate:modelValue"])):R.input==="datetime"?(e.openBlock(),e.createBlock(e.unref(G),{key:1,modelValue:D.metadata[R.name],disabled:We.value.has(R.name),showTime:"",size:"small",class:"w-full","onUpdate:modelValue":se=>Nl(D,R.name,se)},null,8,["modelValue","disabled","onUpdate:modelValue"])):R.type==="number"?(e.openBlock(),e.createBlock(e.unref(f),{key:2,modelValue:D.metadata[R.name],disabled:We.value.has(R.name),min:R.min,max:R.max,placeholder:R.default!=null?String(R.default):void 0,size:"small",class:"w-full","onUpdate:modelValue":se=>Nl(D,R.name,se)},null,8,["modelValue","disabled","min","max","placeholder","onUpdate:modelValue"])):R.input==="boolean"?(e.openBlock(),e.createBlock(e.unref(X),{key:3,modelValue:D.metadata[R.name],disabled:We.value.has(R.name),binary:"","onUpdate:modelValue":se=>Nl(D,R.name,se)},null,8,["modelValue","disabled","onUpdate:modelValue"])):R.input==="list"?(e.openBlock(),e.createBlock(e.unref(p),{key:4,modelValue:D.metadata[R.name],disabled:We.value.has(R.name),options:R.values||[],placeholder:R.description,size:"small",class:"w-full","onUpdate:modelValue":se=>Nl(D,R.name,se)},null,8,["modelValue","disabled","options","placeholder","onUpdate:modelValue"])):R.input==="search"?(e.openBlock(),e.createBlock(e.unref(p),{key:5,modelValue:D.metadata[R.name],disabled:We.value.has(R.name),options:e.unref(wt)(R.name),loading:e.unref(nl)(R.name),placeholder:e.unref(z)("classificationPlan.searchPlaceholder"),filter:"",size:"small",class:"w-full","onUpdate:modelValue":se=>Nl(D,R.name,se),onFocus:se=>e.unref(kt)(R)},null,8,["modelValue","disabled","options","loading","placeholder","onUpdate:modelValue","onFocus"])):R.input==="select"?(e.openBlock(),e.createBlock(e.unref(d),{key:6,modelValue:D.metadata[R.name],disabled:We.value.has(R.name),options:R.values||[],size:"small","onUpdate:modelValue":se=>Nl(D,R.name,se)},null,8,["modelValue","disabled","options","onUpdate:modelValue"])):R.input==="parent"?(e.openBlock(),e.createBlock(e.unref(Y),{key:7,modelValue:D.metadata[R.name],disabled:"",size:"small",class:"w-full"},null,8,["modelValue"])):(e.openBlock(),e.createBlock(e.unref(Y),{key:8,modelValue:D.metadata[R.name],disabled:We.value.has(R.name),pattern:R.regex,placeholder:R.default!=null&&R.default!==""?String(R.default):void 0,size:"small",class:"w-full","onUpdate:modelValue":se=>Nl(D,R.name,se)},null,8,["modelValue","disabled","pattern","placeholder","onUpdate:modelValue"])),R.default!=null&&R.default!==""?(e.openBlock(),e.createElementBlock("small",qM,e.toDisplayString(e.unref(z)("classificationPlan.defaultValue"))+": "+e.toDisplayString(R.default),1)):e.createCommentVNode("",!0),R.input==="parent"&&!D.metadata[R.name]?(e.openBlock(),e.createElementBlock("small",eX,e.toDisplayString(e.unref(z)("classificationPlan.parentFieldNotFound")),1)):e.createCommentVNode("",!0)]))),128))],2)):(e.openBlock(),e.createBlock(e.unref(i),{key:2,label:tn(rl(D)),icon:Lt(rl(D))?"ri-check-line":"ri-edit-line",severity:Lt(rl(D))?"success":void 0,text:"",size:"small",onClick:R=>At(rl(D))},null,8,["label","icon","severity","onClick"]))]),_:1},8,["header","style"]),rt.value?(e.openBlock(),e.createBlock(e.unref(b),{key:1,header:e.unref(z)("classificationPlan.multiFile.status"),style:{width:"7rem"}},{body:e.withCtx(({data:D})=>[e.createVNode(e.unref(s),{value:Lt(rl(D))?e.unref(z)("classificationPlan.multiFile.complete"):e.unref(z)("classificationPlan.multiFile.incomplete"),severity:Lt(rl(D))?"success":"warn"},null,8,["value","severity"])]),_:1},8,["header"])):e.createCommentVNode("",!0),e.createVNode(e.unref(b),{style:{width:"3rem"}},{body:e.withCtx(({data:D})=>[e.createVNode(e.unref(i),{icon:"ri-close-line",text:"",rounded:"",severity:"danger",size:"small",onClick:R=>so(rl(D))},null,8,["onClick"])]),_:1})]),_:2},[te.value?{name:"groupheader",fn:e.withCtx(({data:D})=>[e.createElementVNode("div",HM,[e.createElementVNode("span",null,e.toDisplayString(ca(D)),1),e.createElementVNode("span",QM," ("+e.toDisplayString(ao.value.filter(R=>Hl(R)===Hl(D)).length)+") ",1)])]),key:"0"}:void 0]),1032,["value","selection","pt","rowGroupMode","groupRowsBy","expandableRowGroups","expandedRowGroups"])])):(e.openBlock(),e.createElementBlock("div",GM,[!u.value[0]?.natureCode&&!Ve.value?(e.openBlock(),e.createBlock(Xm,{key:0,natures:bt.value,modelValue:u.value[0]?.natureCode,allowNoNature:I.value&&!J.value&&!Q.value,categories:Ql.value,"onUpdate:modelValue":V[1]||(V[1]=D=>ki(D)),onSelectNoNature:Ci},null,8,["natures","modelValue","allowNoNature","categories"])):Ve.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",DM,[e.createElementVNode("p",LM,[V[19]||(V[19]=e.createElementVNode("i",{class:"ri-file-line"},null,-1)),e.createTextVNode(" "+e.toDisplayString(e.unref(z)("classificationPlan.destinationLabel")),1)]),e.createElementVNode("code",VM,e.toDisplayString(Je.value||"—"),1)]),e.createVNode(e.unref(i),{icon:"ri-arrow-left-line",text:"",size:"small",label:e.unref(z)("classificationPlan.multiFile.selectNature"),onClick:C},null,8,["label"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",vM,[e.createVNode(e.unref(s),{value:Oi.value},null,8,["value"]),e.createVNode(e.unref(i),{icon:"ri-arrow-left-line",text:"",size:"small",label:e.unref(z)("classificationPlan.multiFile.selectNature"),onClick:ln},null,8,["label"])]),e.createVNode(pi,{fields:e.unref(Nt),modelValue:Ue.value,requiredFields:e.unref(ce),disabledFields:We.value,validationErrors:e.unref(il),getSearchOptions:e.unref(wt),isSearchLoading:e.unref(nl),"onUpdate:modelValue":V[2]||(V[2]=D=>Ue.value=D),onLoadSearch:V[3]||(V[3]=D=>e.unref(kt)(D)),onValidate:V[4]||(V[4]=D=>e.unref(sl)(D,Ue.value[D.name]))},null,8,["fields","modelValue","requiredFields","disabledFields","validationErrors","getSearchOptions","isSearchLoading"]),Q.value?(e.openBlock(),e.createElementBlock("div",FM,[e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(z)("classificationPlan.fileToCreate"))+" :",1)]),e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(D,R)=>(e.openBlock(),e.createElementBlock("li",{key:R},e.toDisplayString(D.file.name),1))),128))])])):e.createCommentVNode("",!0)],64))]))])):e.createCommentVNode("",!0),!ue.value&&B.value===E.value?(e.openBlock(),e.createElementBlock("div",tX,[e.createElementVNode("p",null,e.toDisplayString(e.unref(z)("classificationPlan.summary.verifyBeforeDeposit")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(D,R)=>(e.openBlock(),e.createBlock(e.unref(n),{key:R,toggleable:"",collapsed:u.value.length>1,class:"summary-file-panel"},{header:e.withCtx(()=>[e.createElementVNode("div",lX,[e.createElementVNode("span",aX,e.toDisplayString(D.file.name),1),!Ve.value&&D.natureCode!==Ft&&ma(R)!==D.file.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[V[20]||(V[20]=e.createElementVNode("i",{class:"ri-arrow-right-line"},null,-1)),e.createElementVNode("strong",null,e.toDisplayString(ma(R)),1)],64)):e.createCommentVNode("",!0),!Ve.value&&D.natureCode!==Ft?(e.openBlock(),e.createBlock(e.unref(s),{key:1,value:Lt(R)?e.unref(z)("classificationPlan.multiFile.complete"):e.unref(z)("classificationPlan.multiFile.incomplete"),severity:Lt(R)?"success":"warn"},null,8,["value","severity"])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",oX,[e.createElementVNode("h5",null,e.toDisplayString(e.unref(z)("classificationPlan.summary.generalInfo")),1),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(z)("classificationPlan.plan"))+" :",1),e.createTextVNode(" "+e.toDisplayString(Se.value),1)]),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(z)("classificationPlan.nature"))+" :",1),e.createTextVNode(" "+e.toDisplayString(Ve.value||D.natureCode===Ft?e.unref(z)("classificationPlan.noNature"):Jt(D.natureCode)||"—"),1)])]),e.createVNode(e.unref(A)),!Ve.value&&D.natureCode!==Ft?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",nX,[e.createElementVNode("h5",null,e.toDisplayString(e.unref(z)("classificationPlan.summary.metadataToSend")),1),e.createElementVNode("ul",iX,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ka(R),(se,he)=>(e.openBlock(),e.createElementBlock("li",{key:he},[e.createElementVNode("strong",null,e.toDisplayString(he)+" :",1),e.createTextVNode(" "+e.toDisplayString(se),1)]))),128))])]),e.createVNode(e.unref(A))],64)):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",sX,[e.createElementVNode("h5",null,e.toDisplayString(e.unref(z)("classificationPlan.summary.movement")),1),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(z)("classificationPlan.requalify.summaryFrom"))+" :",1),e.createElementVNode("code",null,e.toDisplayString(wi.value),1)]),e.createVNode(e.unref(A)),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(z)("classificationPlan.requalify.summaryTo"))+" :",1),e.createElementVNode("code",null,e.toDisplayString(jl(R)),1)]),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(z)("classificationPlan.summary.document"))+" :",1),e.createTextVNode(" "+e.toDisplayString(D.file.name)+" ",1),ma(R)!==D.file.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[V[21]||(V[21]=e.createElementVNode("i",{class:"ri-arrow-right-line arrow-icon"},null,-1)),e.createElementVNode("strong",null,e.toDisplayString(ma(R)),1)],64)):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",rX,[e.createElementVNode("h5",null,e.toDisplayString(e.unref(z)("classificationPlan.summary.fileClassification")),1),Ve.value||D.natureCode===Ft?(e.openBlock(),e.createElementBlock("p",cX,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(z)("classificationPlan.summary.destinationFolder"))+" :",1),e.createElementVNode("code",null,e.toDisplayString(Je.value||"—"),1)])):(e.openBlock(),e.createElementBlock("p",dX,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(z)("classificationPlan.summary.destinationFolder"))+" :",1),e.createElementVNode("code",null,e.toDisplayString(jl(R)),1)]))]))]),_:2},1032,["collapsed"]))),128))])):e.createCommentVNode("",!0),e.createVNode(e.unref(a),{visible:me.value,"onUpdate:visible":V[16]||(V[16]=D=>me.value=D),header:e.unref(z)("classificationPlan.multiFile.metadataTitle",{fileName:Xi.value}),modal:"",class:"metadata-sub-dialog",style:{width:"min(50rem, 90vw)",maxHeight:"90vh"}},{footer:e.withCtx(()=>[e.createVNode(e.unref(i),{label:e.unref(z)("validate"),icon:"ri-check-line",onClick:Al},null,8,["label"])]),default:e.withCtx(()=>[me.value&&Ae.value!==null?(e.openBlock(),e.createBlock(pi,{key:0,fields:e.unref(Nt),modelValue:Ue.value,requiredFields:e.unref(ce),disabledFields:We.value,validationErrors:e.unref(il),getSearchOptions:e.unref(wt),isSearchLoading:e.unref(nl),"onUpdate:modelValue":V[13]||(V[13]=D=>Ue.value=D),onLoadSearch:V[14]||(V[14]=D=>e.unref(kt)(D)),onValidate:V[15]||(V[15]=D=>e.unref(sl)(D,Ue.value[D.name]))},null,8,["fields","modelValue","requiredFields","disabledFields","validationErrors","getSearchOptions","isSearchLoading"])):e.createCommentVNode("",!0)]),_:1},8,["visible","header"]),t.inline?(e.openBlock(),e.createElementBlock("div",mX,[B.value>ye.value?(e.openBlock(),e.createBlock(e.unref(i),{key:0,label:e.unref(z)("classificationPlan.buttons.previous"),icon:"ri-arrow-left-line",text:"",onClick:Kl},null,8,["label"])):e.createCommentVNode("",!0),B.value<E.value?(e.openBlock(),e.createBlock(e.unref(i),{key:1,label:e.unref(z)("classificationPlan.buttons.next"),icon:"ri-arrow-right-line","icon-pos":"right",disabled:!Ko.value,onClick:cl},null,8,["label","disabled"])):e.createCommentVNode("",!0),B.value===E.value?(e.openBlock(),e.createBlock(e.unref(i),{key:2,label:Ne.value?e.unref(z)("classificationPlan.buttons.depositing"):J.value?e.unref(z)("classificationPlan.requalify.title"):Q.value?e.unref(z)("classificationPlan.buttons.acceptAndCreate"):e.unref(z)("classificationPlan.buttons.deposit"),icon:"ri-upload-2-line",disabled:!$o.value||Ne.value,onClick:ja},null,8,["label","disabled"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},[t.inline?void 0:{name:"footer",fn:e.withCtx(()=>[e.createVNode(e.unref(i),{label:e.unref(z)("classificationPlan.buttons.cancel"),icon:"ri-close-line",text:"",onClick:V[17]||(V[17]=D=>g.value=!1)},null,8,["label"]),B.value>ye.value?(e.openBlock(),e.createBlock(e.unref(i),{key:0,label:e.unref(z)("classificationPlan.buttons.previous"),icon:"ri-arrow-left-line",text:"",onClick:Kl},null,8,["label"])):e.createCommentVNode("",!0),B.value<E.value?(e.openBlock(),e.createBlock(e.unref(i),{key:1,label:e.unref(z)("classificationPlan.buttons.next"),icon:"ri-arrow-right-line","icon-pos":"right",disabled:!Ko.value,onClick:cl},null,8,["label","disabled"])):e.createCommentVNode("",!0),B.value===E.value?(e.openBlock(),e.createBlock(e.unref(i),{key:2,label:Ne.value?e.unref(z)("classificationPlan.buttons.depositing"):J.value?e.unref(z)("classificationPlan.requalify.title"):Q.value?e.unref(z)("classificationPlan.buttons.acceptAndCreate"):e.unref(z)("classificationPlan.buttons.deposit"),icon:"ri-upload-2-line",disabled:!$o.value||Ne.value,onClick:ja},null,8,["label","disabled"])):e.createCommentVNode("",!0)]),key:"0"}]),1040))}},[["__scopeId","data-v-65d8c96c"]]),ol={STATIC:"static",DRAWER:"drawer",SLIM:"slim",SLIM_PLUS:"slim-plus",HORIZONTAL:"horizontal"},to={LIGHT:"light",DARK:"dark",PRIMARY:"primary"},jt={MENU_MODE:"layout-menu-mode",MENU_THEME:"layout-menu-theme",STATIC_MENU_INACTIVE:"layout-static-menu-inactive",DRAWER_ANCHORED:"layout-drawer-anchored",SIDEBAR_PROFILE_SHOW:"pristy-sidebar-profile-show",SIDEBAR_PROFILE_POSITION:"pristy-sidebar-profile-position"},Bo={menuMode:ol.STATIC,menuTheme:to.LIGHT,staticMenuDesktopInactive:!1,sidebarProfilePosition:"end"},Om=991,ui=e.ref(typeof window<"u"?window.innerWidth:1200),pX=()=>{if(typeof window>"u"||typeof navigator>"u")return!1;const t="ontouchstart"in window||navigator.maxTouchPoints>0,l=navigator.userAgent||navigator.vendor||window.opera||"",i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(l),o=navigator.platform||"",s=/iPhone|iPod|iPad|Android|webOS|BlackBerry/i.test(o);return t&&(i||s)},hi=e.ref(pX()),uX=()=>{ui.value=window.innerWidth};let wm=!1;const hX=()=>{typeof window<"u"&&!wm&&(window.addEventListener("resize",uX),wm=!0)},Te=e.reactive({menuMode:localStorage.getItem(jt.MENU_MODE)||Bo.menuMode,menuTheme:localStorage.getItem(jt.MENU_THEME)||Bo.menuTheme,staticMenuDesktopInactive:localStorage.getItem(jt.STATIC_MENU_INACTIVE)==="true"||Bo.staticMenuDesktopInactive,anchored:localStorage.getItem(jt.DRAWER_ANCHORED)==="true",sidebarProfileShow:localStorage.getItem(jt.SIDEBAR_PROFILE_SHOW)!=="false",sidebarProfilePosition:localStorage.getItem(jt.SIDEBAR_PROFILE_POSITION)||Bo.sidebarProfilePosition,mobileMenuActive:!1,overlayMenuActive:!1,profileSidebarVisible:!1,configSidebarVisible:!1,staticMenuMobileActive:!1,menuHoverActive:!1,sidebarActive:!1,activeMenuItem:null});function Oa(){e.watch(()=>Te.menuMode,O=>{localStorage.setItem(jt.MENU_MODE,O)}),e.watch(()=>Te.menuTheme,O=>{localStorage.setItem(jt.MENU_THEME,O)}),e.watch(()=>Te.staticMenuDesktopInactive,O=>{localStorage.setItem(jt.STATIC_MENU_INACTIVE,String(O))}),e.watch(()=>Te.anchored,O=>{localStorage.setItem(jt.DRAWER_ANCHORED,String(O))}),e.watch(()=>Te.sidebarProfileShow,O=>{localStorage.setItem(jt.SIDEBAR_PROFILE_SHOW,String(O))}),e.watch(()=>Te.sidebarProfilePosition,O=>{localStorage.setItem(jt.SIDEBAR_PROFILE_POSITION,O)}),e.watch(()=>ui.value<=Om,(O,F)=>{hi.value||(O&&!F?(Te.sidebarActive=!1,Te.overlayMenuActive=!1,Te.staticMenuMobileActive=!1):!O&&F&&(Te.staticMenuMobileActive=!1,Te.menuMode===ol.STATIC&&(Te.staticMenuDesktopInactive=!1)))});const t=e.computed(()=>Te.overlayMenuActive||Te.staticMenuMobileActive||Te.sidebarActive),l=e.computed(()=>!hi.value),a=e.computed(()=>hi.value),i=e.computed(()=>ui.value<=Om),o=e.computed(()=>Te.menuMode===ol.STATIC),n=e.computed(()=>Te.menuMode===ol.DRAWER),s=e.computed(()=>Te.menuMode===ol.SLIM),r=e.computed(()=>Te.menuMode===ol.SLIM_PLUS),c=e.computed(()=>Te.menuMode===ol.HORIZONTAL),m=e.computed(()=>i.value&&!a.value?{"layout-static":!0,"layout-small-screen":!0,"layout-static-inactive":!Te.staticMenuMobileActive,"layout-mobile-active":Te.staticMenuMobileActive,[`layout-menu-${Te.menuTheme}`]:!0,"p-input-filled":!1,"p-ripple-disabled":!1}:{"layout-static":o.value,"layout-drawer":n.value,"layout-drawer-active":n.value&&Te.sidebarActive,"layout-drawer-anchored":n.value&&Te.anchored,"layout-slim":s.value,"layout-slim-plus":r.value,"layout-horizontal":c.value,"layout-mobile":a.value,"layout-static-inactive":o.value&&Te.staticMenuDesktopInactive&&l.value,"layout-overlay-active":Te.overlayMenuActive,"layout-mobile-active":Te.staticMenuMobileActive,"p-input-filled":!1,"p-ripple-disabled":!1,[`layout-menu-${Te.menuTheme}`]:!0}),h=O=>{Object.values(ol).includes(O)&&(Te.menuMode=O)},b=O=>{Object.values(to).includes(O)&&(Te.menuTheme=O)},p=O=>{Te.sidebarProfileShow=!!O},d=O=>{["start","end"].includes(O)&&(Te.sidebarProfilePosition=O)},W=()=>{if(a.value){Te.staticMenuMobileActive=!Te.staticMenuMobileActive;return}if(i.value){Te.staticMenuMobileActive=!Te.staticMenuMobileActive;return}o.value?Te.staticMenuDesktopInactive=!Te.staticMenuDesktopInactive:(s.value||r.value||c.value)&&(Te.overlayMenuActive=!Te.overlayMenuActive)},Z=()=>{Te.staticMenuMobileActive=!0},N=()=>{Te.staticMenuMobileActive=!1};return{layoutState:Te,MENU_MODES:ol,MENU_THEMES:to,isSidebarActive:t,isDesktop:l,isMobile:a,isSmallScreen:i,isStatic:o,isDrawer:n,isSlim:s,isSlimPlus:r,isHorizontal:c,containerClass:m,setMenuMode:h,setMenuTheme:b,setSidebarProfileShow:p,setSidebarProfilePosition:d,toggleMenu:W,toggleAnchor:()=>{Te.anchored=!Te.anchored,Te.anchored&&(Te.sidebarActive=!0)},showMobileMenu:Z,hideMobileMenu:N,hideOverlayMenu:()=>{Te.overlayMenuActive=!1},onMenuToggle:()=>{W()},onSidebarMouseEnter:()=>{i.value||n.value&&!Te.anchored&&(Te.sidebarActive=!0)},onSidebarMouseLeave:()=>{i.value||n.value&&!Te.anchored&&(Te.sidebarActive=!1)},setActiveMenuItem:O=>{Te.activeMenuItem=O},resetMenu:()=>{Te.overlayMenuActive=!1,Te.staticMenuMobileActive=!1,Te.menuHoverActive=!1},onDocumentClick:O=>{if(Te.staticMenuMobileActive){const F=document.querySelector(".layout-sidebar"),M=document.querySelector(".layout-topbar-menu-button");F&&!F.contains(O.target)&&M&&!M.contains(O.target)&&N()}},applyLayoutSettings:()=>{hX();const O=localStorage.getItem(jt.MENU_MODE),F=localStorage.getItem(jt.MENU_THEME),M=localStorage.getItem(jt.STATIC_MENU_INACTIVE);O&&Object.values(ol).includes(O)&&(Te.menuMode=O),F&&Object.values(to).includes(F)&&(Te.menuTheme=F),M!==null&&(Te.staticMenuDesktopInactive=M==="true");const I=localStorage.getItem(jt.SIDEBAR_PROFILE_SHOW);I!==null&&(Te.sidebarProfileShow=I!=="false");const g=localStorage.getItem(jt.SIDEBAR_PROFILE_POSITION);g&&["start","end"].includes(g)&&(Te.sidebarProfilePosition=g)}}}function km(t,l){return t.to===l?!0:t.items?t.items.some(a=>a.to===l):!1}const yX={name:"AppSubmenu",props:{items:{type:Array,default:()=>[]}},setup(t){const l=po.useRoute(),{t:a}=Rt.useI18n(),{layoutState:i,isSlim:o,isSlimPlus:n,isDrawer:s,isSmallScreen:r}=Oa(),c=e.ref([]),m="pristy-menu-expanded-sections",h=X=>X.key||X.labelKey||X.label,b=()=>{try{const X=localStorage.getItem(m);if(X){const G=JSON.parse(X);t.items.forEach((j,L)=>{j.items&&G.includes(h(j))&&(c.value.includes(L)||c.value.push(L))})}}catch(X){console.warn("Failed to load menu state from localStorage:",X)}},p=()=>{try{const X=c.value.map(G=>t.items[G]).filter(Boolean).map(h);localStorage.setItem(m,JSON.stringify(X))}catch(X){console.warn("Failed to save menu state to localStorage:",X)}},d=()=>{t.items.forEach((X,G)=>{X.items&&km(X,l.path)&&(c.value.includes(G)||(c.value.push(G),p()))})};b(),e.watch(()=>l.path,()=>{d()},{immediate:!0});const W=e.computed(()=>r.value?!1:s.value?!i.sidebarActive&&!i.anchored:o.value||n.value);return{expandedSections:c,isSlimMode:W,isExpanded:X=>c.value.includes(X),toggleSection:X=>{const G=c.value.indexOf(X);G===-1?c.value.push(X):c.value.splice(G,1),p()},isActive:X=>l.path===X.to,hasActiveChild:X=>km(X,l.path),isActiveSection:X=>X.to&&l.path===X.to,getLabel:X=>X.labelKey?a(X.labelKey):X.label||""}}},ZX={class:"sidebar-menu"},gX={key:0,class:"menu-section"},fX={class:"menu-label"},WX={class:"menu-label"},NX=["onClick"],AX={class:"menu-subitems"},YX={class:"menu-label"},zX={key:0,class:"menu-badge"},MX={class:"menu-label"},XX={key:0,class:"menu-badge"},OX={key:1,class:"menu-link disabled"},wX={class:"menu-label"},kX={key:0,class:"menu-badge"};function CX(t,l,a,i,o,n){const s=e.resolveComponent("router-link"),r=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("ul",ZX,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,(c,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.labelKey||c.label},[c.items&&c.items.length>0?(e.openBlock(),e.createElementBlock("li",gX,[e.createElementVNode("div",{class:e.normalizeClass(["menu-section-header",{"has-active-child":i.hasActiveChild(c),"is-active":i.isActiveSection(c)}])},[c.to?e.withDirectives((e.openBlock(),e.createBlock(s,{key:0,to:c.to,class:"menu-section-link"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass([c.icon,"menu-icon"])},null,2),e.createElementVNode("span",fX,e.toDisplayString(i.getLabel(c)),1)]),_:2},1032,["to"])),[[r,i.getLabel(c),void 0,{right:!0}]]):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("i",{class:e.normalizeClass([c.icon,"menu-icon"])},null,2),e.createElementVNode("span",WX,e.toDisplayString(i.getLabel(c)),1)],64)),e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"menu-toggle-btn",onClick:h=>i.toggleSection(m)},[e.createElementVNode("i",{class:e.normalizeClass(["menu-arrow ri-arrow-down-s-line",{expanded:i.isExpanded(m)}])},null,2)],8,NX)),[[r,i.isSlimMode?i.getLabel(c):null,void 0,{right:!0}]])],2),e.createVNode(e.Transition,{name:"submenu"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",AX,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,h=>(e.openBlock(),e.createElementBlock("li",{key:h.labelKey||h.label,class:e.normalizeClass(["menu-item",{active:i.isActive(h)}])},[e.withDirectives((e.openBlock(),e.createBlock(s,{to:h.to,class:"menu-link"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass([h.icon,"menu-icon"])},null,2),e.createElementVNode("span",YX,e.toDisplayString(i.getLabel(h)),1),h.badge?(e.openBlock(),e.createElementBlock("span",zX,e.toDisplayString(h.badge),1)):e.createCommentVNode("",!0)]),_:2},1032,["to"])),[[r,i.getLabel(h),void 0,{right:!0}]])],2))),128))],512),[[e.vShow,i.isExpanded(m)&&!i.isSlimMode]])]),_:2},1024)])):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["menu-item",{active:i.isActive(c),disabled:c.disabled}])},[!c.disabled&&c.to?e.withDirectives((e.openBlock(),e.createBlock(s,{key:0,to:c.to,class:"menu-link"},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass([c.icon,"menu-icon"])},null,2),e.createElementVNode("span",MX,e.toDisplayString(i.getLabel(c)),1),c.badge?(e.openBlock(),e.createElementBlock("span",XX,e.toDisplayString(c.badge),1)):e.createCommentVNode("",!0)]),_:2},1032,["to"])),[[r,i.isSlimMode?i.getLabel(c):null,void 0,{right:!0}]]):e.withDirectives((e.openBlock(),e.createElementBlock("span",OX,[e.createElementVNode("i",{class:e.normalizeClass([c.icon,"menu-icon"])},null,2),e.createElementVNode("span",wX,e.toDisplayString(i.getLabel(c)),1),c.badge?(e.openBlock(),e.createElementBlock("span",kX,e.toDisplayString(c.badge),1)):e.createCommentVNode("",!0)])),[[r,i.isSlimMode?i.getLabel(c):null,void 0,{right:!0}]])],2))],64))),128))])}const yi=fe(yX,[["render",CX],["__scopeId","data-v-478c1357"]]);function Ho(){const t=po.useRouter(),l=mt(),a=xe();return{handleLogout:async o=>{(!o||typeof o!="string")&&(o="login"),a.AUTH==="keycloak"||a.AUTH==="lemonldap"?await l.logout():(await l.logout(),t.push({name:o}))}}}const TX={name:"SidebarProfileSection",components:{PrimeMenu:ta},props:{isSlimMode:{type:Boolean,default:!1}},setup(){const t=po.useRouter(),{t:l}=Rt.useI18n(),{layoutState:a}=Oa(),i=mt(),o=xe(),{handleLogout:n}=Ho(),s=e.ref(!1),r=e.ref(),c=e.computed(()=>a.sidebarProfilePosition),m=e.computed(()=>i.displayName||""),h=e.computed(()=>i.person?.id||""),b=e.computed(()=>i.person?.jobTitle||""),p=e.computed(()=>o.PORTAIL_HOST?`${o.PORTAIL_HOST}/portail`:""),d=()=>{s.value=!s.value},W=N=>{r.value.toggle(N)},Z=e.computed(()=>{const N=[{label:l("sidebarMenu.profile"),icon:"ri-user-settings-line",command:()=>{t.push("/profile")}}];return p.value&&N.push({label:l("sidebarMenu.portal"),icon:"ri-home-smile-line",command:()=>{window.location.href=p.value}}),N.push({label:l("sidebarMenu.logout"),icon:"ri-logout-box-line",command:()=>{n()}}),N});return{t:l,expanded:s,slimMenu:r,position:c,displayName:m,userId:h,jobTitle:b,portalUrl:p,toggleMenu:d,toggleSlimMenu:W,slimMenuItems:Z,handleLogout:n}}},IX={class:"profile-info"},jX={class:"profile-name"},GX={key:0,class:"profile-job"},DX={class:"profile-menu"},LX=["href"];function VX(t,l,a,i,o,n){const s=e.resolveComponent("PrimeMenu"),r=e.resolveComponent("router-link"),c=e.resolveDirective("tooltip");return a.isSlimMode?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["sidebar-profile-section sidebar-profile-slim",`position-${i.position}`])},[e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"profile-avatar-btn",onClick:l[0]||(l[0]=(...m)=>i.toggleSlimMenu&&i.toggleSlimMenu(...m)),"aria-haspopup":"true","aria-controls":"sidebar_profile_menu"},[...l[3]||(l[3]=[e.createElementVNode("i",{class:"ri-user-line"},null,-1)])])),[[c,i.displayName||i.userId,void 0,{right:!0}]]),e.createVNode(s,{ref:"slimMenu",id:"sidebar_profile_menu",model:i.slimMenuItems,popup:""},null,8,["model"])],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["sidebar-profile-section",`position-${i.position}`])},[e.createElementVNode("div",{class:"profile-header",onClick:l[1]||(l[1]=(...m)=>i.toggleMenu&&i.toggleMenu(...m))},[l[4]||(l[4]=e.createElementVNode("div",{class:"profile-avatar"},[e.createElementVNode("i",{class:"ri-user-line"})],-1)),e.createElementVNode("div",IX,[e.createElementVNode("span",jX,e.toDisplayString(i.displayName||i.userId),1),i.jobTitle?(e.openBlock(),e.createElementBlock("span",GX,e.toDisplayString(i.jobTitle),1)):e.createCommentVNode("",!0)]),e.createElementVNode("i",{class:e.normalizeClass(["ri-arrow-down-s-line profile-arrow",{expanded:i.expanded}])},null,2)]),e.createVNode(e.Transition,{name:"submenu"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",DX,[e.createVNode(r,{to:"/profile",class:"profile-menu-item"},{default:e.withCtx(()=>[l[5]||(l[5]=e.createElementVNode("i",{class:"ri-user-settings-line"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(i.t("sidebarMenu.profile")),1)]),_:1}),i.portalUrl?(e.openBlock(),e.createElementBlock("a",{key:0,href:i.portalUrl,class:"profile-menu-item"},[l[6]||(l[6]=e.createElementVNode("i",{class:"ri-home-smile-line"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(i.t("sidebarMenu.portal")),1)],8,LX)):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"profile-menu-item",onClick:l[2]||(l[2]=m=>i.handleLogout())},[l[7]||(l[7]=e.createElementVNode("i",{class:"ri-logout-box-line"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(i.t("sidebarMenu.logout")),1)])],512),[[e.vShow,i.expanded]])]),_:1})],2))}const Zi=fe(TX,[["render",VX],["__scopeId","data-v-ec9ef2bf"]]),vX={name:"AppSidebar",components:{AppSubmenu:yi,SidebarProfileSection:Zi},props:{menuItems:{type:Array,default:()=>[]},logoFull:{type:String,default:""},logoIcon:{type:String,default:""},logoAlt:{type:String,default:"Logo"}},setup(){const{layoutState:t,isSlim:l,isSlimPlus:a,isDrawer:i,isSmallScreen:o,toggleAnchor:n}=Oa(),s=e.computed(()=>o.value?!1:i.value?!t.sidebarActive&&!t.anchored:l.value||a.value);return{layoutState:t,isSlim:l,isSlimPlus:a,isDrawer:i,toggleAnchor:n,isSlimMode:s}}},FX={class:"layout-sidebar"},RX={class:"sidebar-header"},SX=["src","alt"],xX=["src","alt"],UX={class:"sidebar-content"};function JX(t,l,a,i,o,n){const s=e.resolveComponent("router-link"),r=e.resolveComponent("SidebarProfileSection"),c=e.resolveComponent("AppSubmenu");return e.openBlock(),e.createElementBlock("aside",FX,[e.createElementVNode("div",RX,[e.renderSlot(t.$slots,"logo",{isSlimMode:i.isSlimMode},()=>[e.createVNode(s,{to:"/",class:"sidebar-logo"},{default:e.withCtx(()=>[i.isSlimMode?(e.openBlock(),e.createElementBlock("img",{key:1,src:a.logoIcon,alt:a.logoAlt,class:"logo-icon"},null,8,xX)):(e.openBlock(),e.createElementBlock("img",{key:0,src:a.logoFull,alt:a.logoAlt,class:"logo-full"},null,8,SX))]),_:1})],!0),i.isDrawer&&(i.layoutState.sidebarActive||i.layoutState.anchored)?(e.openBlock(),e.createElementBlock("button",{key:0,class:"anchor-button",onClick:l[0]||(l[0]=(...m)=>i.toggleAnchor&&i.toggleAnchor(...m))},[e.createElementVNode("i",{class:e.normalizeClass(i.layoutState.anchored?"ri-pushpin-fill":"ri-pushpin-line")},null,2)])):e.createCommentVNode("",!0)]),i.layoutState.sidebarProfileShow&&i.layoutState.sidebarProfilePosition==="start"?(e.openBlock(),e.createBlock(r,{key:0,isSlimMode:i.isSlimMode},null,8,["isSlimMode"])):e.createCommentVNode("",!0),e.createElementVNode("div",UX,[e.createVNode(c,{items:a.menuItems},null,8,["items"])]),i.layoutState.sidebarProfileShow&&i.layoutState.sidebarProfilePosition==="end"?(e.openBlock(),e.createBlock(r,{key:1,isSlimMode:i.isSlimMode},null,8,["isSlimMode"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"footer",{},void 0,!0)])}const gi=fe(vX,[["render",JX],["__scopeId","data-v-576e1e30"]]);function EX(t,l){return t.to===l?!0:t.items?t.items.some(a=>a.to===l):!1}const BX={name:"AppTopbar",components:{PrimeMenu:ta},props:{showMenuButton:{type:Boolean,default:!0},horizontalMenu:{type:Boolean,default:!1},showLogo:{type:Boolean,default:!1},logo:{type:String,default:""},logoAlt:{type:String,default:"Pristy"},menuItems:{type:Array,default:()=>[]},showSearch:{type:Boolean,default:!0},searchRoute:{type:String,default:"/search"},searchTooltip:{type:String,default:"Recherche"},portalUrl:{type:String,default:""},portalTooltip:{type:String,default:"Portail"},settingsItems:{type:Array,default:()=>[]},settingsTooltip:{type:String,default:"Paramètres"},showLogout:{type:Boolean,default:!0},logoutTooltip:{type:String,default:"Déconnexion"},loginRouteName:{type:String,default:"login"}},emits:["toggle-menu","logout"],setup(t){const{isMobile:l}=Oa(),{handleLogout:a}=Ho(),i=e.computed(()=>{const o=[...t.settingsItems||[]];return l.value&&t.showLogout&&(o.length>0&&o.push({separator:!0}),o.push({label:t.logoutTooltip,icon:"ri-logout-box-line",command:()=>{document.dispatchEvent(new CustomEvent("topbar-logout"))}})),o});return{isMobile:l,computedSettingsItems:i,doLogout:a}},mounted(){this._logoutHandler=()=>this.handleLogout(),document.addEventListener("topbar-logout",this._logoutHandler)},beforeUnmount(){document.removeEventListener("topbar-logout",this._logoutHandler)},methods:{getLabel(t){return t.labelKey?this.$t(t.labelKey):t.label||""},hasActiveChild(t){return EX(t,this.$route.path)},toggleDropdown(t,l){const a="dropdown-"+(l.labelKey||l.label),i=this.$refs[a];i&&i[0]&&i[0].toggle(t)},getDropdownItems(t){return t.items.map(l=>({label:this.getLabel(l),icon:l.icon,command:()=>{this.$router.push(l.to)}}))},toggleSettingsMenu(t){this.$refs.settingsMenu.toggle(t)},async handleLogout(){this.$emit("logout"),await this.doLogout(this.loginRouteName)}}},HX={class:"layout-topbar"},QX={class:"topbar-start"},PX=["src","alt"],_X={key:0,class:"topbar-menu"},KX={key:0,class:"topbar-menu-dropdown"},$X=["onClick"],qX={class:"topbar-end"},eO=["href"];function tO(t,l,a,i,o,n){const s=e.resolveComponent("router-link"),r=e.resolveComponent("PrimeMenu"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("header",HX,[e.createElementVNode("div",QX,[a.showMenuButton?(e.openBlock(),e.createElementBlock("button",{key:0,class:"topbar-menu-button layout-topbar-menu-button",onClick:l[0]||(l[0]=m=>t.$emit("toggle-menu"))},[...l[3]||(l[3]=[e.createElementVNode("i",{class:"ri-menu-line"},null,-1)])])):e.createCommentVNode("",!0),a.horizontalMenu||a.showLogo?e.renderSlot(t.$slots,"logo",{key:1},()=>[e.createVNode(s,{to:"/",class:"topbar-logo"},{default:e.withCtx(()=>[a.logo?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.logo,alt:a.logoAlt,class:"topbar-logo-image"},null,8,PX)):e.createCommentVNode("",!0)]),_:1})],!0):e.createCommentVNode("",!0)]),a.horizontalMenu?(e.openBlock(),e.createElementBlock("nav",_X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.menuItems,m=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m.labelKey||m.label},[m.items&&m.items.length>0?(e.openBlock(),e.createElementBlock("div",KX,[e.createElementVNode("button",{class:e.normalizeClass(["topbar-menu-item",{active:n.hasActiveChild(m)}]),onClick:h=>n.toggleDropdown(h,m)},[e.createElementVNode("i",{class:e.normalizeClass(m.icon)},null,2),e.createElementVNode("span",null,e.toDisplayString(n.getLabel(m)),1),l[4]||(l[4]=e.createElementVNode("i",{class:"ri-arrow-down-s-line dropdown-arrow"},null,-1))],10,$X),e.createVNode(r,{ref_for:!0,ref:"dropdown-"+(m.labelKey||m.label),model:n.getDropdownItems(m),popup:!0},null,8,["model"])])):(e.openBlock(),e.createBlock(s,{key:1,to:m.to,class:e.normalizeClass(["topbar-menu-item",{active:t.$route.path===m.to}])},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(m.icon)},null,2),e.createElementVNode("span",null,e.toDisplayString(n.getLabel(m)),1)]),_:2},1032,["to","class"]))],64))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",qX,[e.renderSlot(t.$slots,"actions-start",{},void 0,!0),a.showSearch?e.withDirectives((e.openBlock(),e.createBlock(s,{key:0,to:a.searchRoute,class:"topbar-action"},{default:e.withCtx(()=>[...l[5]||(l[5]=[e.createElementVNode("i",{class:"ri-search-line"},null,-1)])]),_:1},8,["to"])),[[c,a.searchTooltip,void 0,{bottom:!0}]]):e.createCommentVNode("",!0),a.portalUrl?e.withDirectives((e.openBlock(),e.createElementBlock("a",{key:1,href:a.portalUrl,class:"topbar-action"},[...l[6]||(l[6]=[e.createElementVNode("i",{class:"ri-home-smile-line"},null,-1)])],8,eO)),[[c,a.portalTooltip,void 0,{bottom:!0}]]):e.createCommentVNode("",!0),i.computedSettingsItems&&i.computedSettingsItems.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(r,{ref:"settingsMenu",model:i.computedSettingsItems,popup:!0},null,8,["model"]),e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"topbar-action",onClick:l[1]||(l[1]=(...m)=>n.toggleSettingsMenu&&n.toggleSettingsMenu(...m))},[...l[7]||(l[7]=[e.createElementVNode("i",{class:"ri-settings-3-line"},null,-1)])])),[[c,a.settingsTooltip,void 0,{bottom:!0}]])],64)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"actions-end",{},void 0,!0),a.showLogout&&!i.isMobile?e.withDirectives((e.openBlock(),e.createElementBlock("button",{key:3,class:"topbar-action",onClick:l[2]||(l[2]=(...m)=>n.handleLogout&&n.handleLogout(...m))},[...l[8]||(l[8]=[e.createElementVNode("i",{class:"ri-logout-box-line"},null,-1)])])),[[c,a.logoutTooltip,void 0,{bottom:!0}]]):e.createCommentVNode("",!0)])])}const fi=fe(BX,[["render",tO],["__scopeId","data-v-513c723f"]]),lO={name:"AppMobileLayout",components:{PrimeMenu:ta},props:{logo:{type:String,default:""},logoAlt:{type:String,default:"Logo"},profileTooltip:{type:String,default:"Profil"},bottomBarItems:{type:Array,default:()=>[]},profileMenuItems:{type:Array,default:()=>[]},logoutLabel:{type:String,default:"Déconnexion"},showLogout:{type:Boolean,default:!0},loginRouteName:{type:String,default:"login"}},emits:["logout"],setup(t,{emit:l}){const{handleLogout:a}=Ho();return{computedProfileItems:e.computed(()=>{const o=t.profileMenuItems.map(n=>{if(n.separator)return{separator:!0};const s={label:n.label,icon:n.icon};return n.action==="logout"?s.command=()=>{document.dispatchEvent(new CustomEvent("mobile-logout"))}:n.command&&(s.command=n.command),s});return t.showLogout&&(t.profileMenuItems.some(s=>s.action==="logout")||(o.length>0&&o.push({separator:!0}),o.push({label:t.logoutLabel,icon:"ri-logout-box-line",command:()=>{document.dispatchEvent(new CustomEvent("mobile-logout"))}}))),o}),doLogout:a}},mounted(){this._logoutHandler=()=>this.handleLogout(),document.addEventListener("mobile-logout",this._logoutHandler)},beforeUnmount(){document.removeEventListener("mobile-logout",this._logoutHandler)},methods:{toggleProfileMenu(t){this.$refs.profileMenu.toggle(t)},isActiveRoute(t){return this.$route.path===t.to||t.activeMatch&&this.$route.path.startsWith(t.activeMatch)},async handleLogout(){this.$emit("logout"),await this.doLogout(this.loginRouteName)}}},aO={class:"mobile-layout"},oO={class:"mobile-topbar"},nO={class:"mobile-topbar-start"},iO=["src","alt"],sO={class:"mobile-topbar-end"},rO={class:"mobile-content"},cO={class:"mobile-bottom-bar"},dO={key:0},mO={key:1};function bO(t,l,a,i,o,n){const s=e.resolveComponent("router-link"),r=e.resolveComponent("PrimeMenu"),c=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("div",aO,[e.createElementVNode("header",oO,[e.createElementVNode("div",nO,[e.renderSlot(t.$slots,"topbar-start",{},()=>[a.logo?(e.openBlock(),e.createBlock(s,{key:0,to:"/",class:"mobile-logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:a.logo,alt:a.logoAlt,class:"mobile-logo-image"},null,8,iO)]),_:1})):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",sO,[e.renderSlot(t.$slots,"topbar-end",{},void 0,!0),e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:"mobile-profile-btn",onClick:l[0]||(l[0]=(...m)=>n.toggleProfileMenu&&n.toggleProfileMenu(...m))},[...l[1]||(l[1]=[e.createElementVNode("i",{class:"ri-user-line"},null,-1)])])),[[c,a.profileTooltip,void 0,{bottom:!0}]]),e.createVNode(r,{ref:"profileMenu",model:i.computedProfileItems,popup:!0,class:"mobile-profile-menu"},null,8,["model"])])]),e.createElementVNode("main",rO,[e.renderSlot(t.$slots,"default",{},void 0,!0),e.renderSlot(t.$slots,"footer",{},void 0,!0)]),e.createElementVNode("nav",cO,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.bottomBarItems,m=>(e.openBlock(),e.createBlock(s,{key:m.key||m.to,to:m.to,class:e.normalizeClass(["bottom-bar-item",{active:n.isActiveRoute(m)}])},{default:e.withCtx(()=>[e.createElementVNode("i",{class:e.normalizeClass(m.icon)},null,2),m.labelKey?(e.openBlock(),e.createElementBlock("span",dO,e.toDisplayString(t.$t(m.labelKey)),1)):m.label?(e.openBlock(),e.createElementBlock("span",mO,e.toDisplayString(m.label),1)):e.createCommentVNode("",!0)]),_:2},1032,["to","class"]))),128)),e.renderSlot(t.$slots,"bottom-bar-extra",{},void 0,!0)])])}const Wi=fe(lO,[["render",bO],["__scopeId","data-v-101f1184"]]),pO={name:"AppLayout",components:{AppSidebar:gi,AppTopbar:fi,AppMobileLayout:Wi},props:{menuItems:{type:Array,default:()=>[]},sidebarLogoFull:{type:String,default:""},sidebarLogoIcon:{type:String,default:""},sidebarLogoAlt:{type:String,default:"Logo"},topbarLogo:{type:String,default:""},topbarLogoAlt:{type:String,default:"Logo"},showSearch:{type:Boolean,default:!1},searchRoute:{type:String,default:"/search"},searchTooltip:{type:String,default:"Recherche"},portalUrl:{type:String,default:""},portalTooltip:{type:String,default:"Portail"},settingsItems:{type:Array,default:()=>[]},settingsTooltip:{type:String,default:"Paramètres"},showLogout:{type:Boolean,default:!0},logoutTooltip:{type:String,default:"Déconnexion"},loginRouteName:{type:String,default:"login"},mobileLogo:{type:String,default:""},mobileLogoAlt:{type:String,default:""},mobileBottomBarItems:{type:Array,default:()=>[]},mobileProfileMenuItems:{type:Array,default:()=>[]}},emits:["logout"],setup(){const{layoutState:t,containerClass:l,isMobile:a,isSmallScreen:i,isHorizontal:o,isDrawer:n,isSlim:s,isSlimPlus:r,isStatic:c,onMenuToggle:m,hideMobileMenu:h,onDocumentClick:b,onSidebarMouseEnter:p,onSidebarMouseLeave:d,applyLayoutSettings:W}=Oa(),Z=e.ref(window.innerWidth),N=()=>{Z.value=window.innerWidth};e.onMounted(()=>{W(),window.addEventListener("resize",N)}),e.onUnmounted(()=>{window.removeEventListener("resize",N)});const y=e.computed(()=>a.value||i.value?!0:!o.value),A=e.computed(()=>a.value||i.value?!0:c.value),f=e.computed(()=>a.value||i.value&&c.value?!0:c.value&&t.staticMenuDesktopInactive);return{layoutState:t,containerClass:l,isMobile:a,isSmallScreen:i,isHorizontal:o,isDrawer:n,isSlim:s,isSlimPlus:r,isStatic:c,showSidebar:y,showMenuButton:A,showTopbarLogo:f,onMenuToggle:m,hideMobileMenu:h,onDocumentClick:b,onSidebarMouseEnter:p,onSidebarMouseLeave:d}}},uO={class:"layout-main"},hO={class:"layout-content"};function yO(t,l,a,i,o,n){const s=e.resolveComponent("AppMobileLayout"),r=e.resolveComponent("AppSidebar"),c=e.resolveComponent("AppTopbar");return i.isMobile?(e.openBlock(),e.createBlock(s,{key:0,logo:a.mobileLogo||a.topbarLogo,logoAlt:a.mobileLogoAlt||a.topbarLogoAlt,bottomBarItems:a.mobileBottomBarItems,profileMenuItems:a.mobileProfileMenuItems,showLogout:a.showLogout,logoutLabel:a.logoutTooltip,loginRouteName:a.loginRouteName,onLogout:l[0]||(l[0]=m=>t.$emit("logout"))},e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:2},[t.$slots["mobile-topbar-start"]?{name:"topbar-start",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"mobile-topbar-start")]),key:"0"}:void 0,t.$slots["mobile-topbar-end"]?{name:"topbar-end",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"mobile-topbar-end")]),key:"1"}:void 0,t.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"footer")]),key:"2"}:void 0,t.$slots["mobile-bottom-bar-extra"]?{name:"bottom-bar-extra",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"mobile-bottom-bar-extra")]),key:"3"}:void 0]),1032,["logo","logoAlt","bottomBarItems","profileMenuItems","showLogout","logoutLabel","loginRouteName"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["layout-wrapper",i.containerClass]),onClick:l[2]||(l[2]=(...m)=>i.onDocumentClick&&i.onDocumentClick(...m))},[i.showSidebar?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.$slots.sidebar?e.renderSlot(t.$slots,"sidebar",{key:0,menuItems:a.menuItems,isSlimMode:i.isSlim||i.isSlimPlus,isCollapsed:i.layoutState.staticMenuDesktopInactive,onMouseEnter:i.onSidebarMouseEnter,onMouseLeave:i.onSidebarMouseLeave}):(e.openBlock(),e.createBlock(r,{key:1,menuItems:a.menuItems,logoFull:a.sidebarLogoFull,logoIcon:a.sidebarLogoIcon,logoAlt:a.sidebarLogoAlt,onMouseenter:i.onSidebarMouseEnter,onMouseleave:i.onSidebarMouseLeave},{logo:e.withCtx(({isSlimMode:m})=>[e.renderSlot(t.$slots,"sidebar-logo",{isSlimMode:m})]),footer:e.withCtx(()=>[e.renderSlot(t.$slots,"sidebar-footer")]),_:3},8,["menuItems","logoFull","logoIcon","logoAlt","onMouseenter","onMouseleave"]))],64)):e.createCommentVNode("",!0),e.createVNode(c,{showMenuButton:i.showMenuButton,showLogo:i.showTopbarLogo,logo:a.topbarLogo,logoAlt:a.topbarLogoAlt,horizontalMenu:i.isHorizontal&&!i.isSmallScreen,menuItems:a.menuItems,showSearch:a.showSearch,searchRoute:a.searchRoute,searchTooltip:a.searchTooltip,portalUrl:a.portalUrl,portalTooltip:a.portalTooltip,settingsItems:a.settingsItems,settingsTooltip:a.settingsTooltip,showLogout:a.showLogout,logoutTooltip:a.logoutTooltip,loginRouteName:a.loginRouteName,onToggleMenu:i.onMenuToggle,onLogout:l[1]||(l[1]=m=>t.$emit("logout"))},{logo:e.withCtx(()=>[e.renderSlot(t.$slots,"topbar-logo")]),"actions-start":e.withCtx(()=>[e.renderSlot(t.$slots,"topbar-actions-start")]),"actions-end":e.withCtx(()=>[e.renderSlot(t.$slots,"topbar-actions-end")]),_:3},8,["showMenuButton","showLogo","logo","logoAlt","horizontalMenu","menuItems","showSearch","searchRoute","searchTooltip","portalUrl","portalTooltip","settingsItems","settingsTooltip","showLogout","logoutTooltip","loginRouteName","onToggleMenu"]),e.createElementVNode("div",uO,[e.createElementVNode("div",hO,[e.renderSlot(t.$slots,"default")]),e.renderSlot(t.$slots,"footer")])],2))}const Cm=fe(pO,[["render",yO]]),ZO={name:"AppFooter",props:{copyrightHolder:{type:String,default:"JECI SARL"},copyrightLink:{type:String,default:"Pristy"},copyrightUrl:{type:String,default:"https://pristy.fr"},showVersion:{type:Boolean,default:!0},version:{type:String,default:()=>typeof __BUILD_VERSION__<"u"?__BUILD_VERSION__:"0.0.0"},commit:{type:String,default:()=>typeof __BUILD_COMMIT__<"u"?__BUILD_COMMIT__:"unknown"},buildDate:{type:String,default:()=>typeof __BUILD_DATE__<"u"?__BUILD_DATE__:"unknown"}},computed:{currentYear(){return new Date().getFullYear()},versionTooltip(){return`Commit: ${this.commit}
|
|
157
157
|
Build: ${this.buildDate}`}}},gO={class:"app-footer"},fO={class:"footer-content"},WO={class:"copyright"},NO=["href"],AO={key:0,class:"version"};function YO(t,l,a,i,o,n){const s=e.resolveDirective("tooltip");return e.openBlock(),e.createElementBlock("footer",gO,[e.createElementVNode("div",fO,[e.renderSlot(t.$slots,"left",{},()=>[e.createElementVNode("span",WO,[e.createTextVNode(" © "+e.toDisplayString(n.currentYear)+" "+e.toDisplayString(a.copyrightHolder)+" - ",1),e.createElementVNode("a",{href:a.copyrightUrl,target:"_blank",rel:"noopener"},e.toDisplayString(a.copyrightLink),9,NO)])],!0),e.renderSlot(t.$slots,"center",{},void 0,!0),e.renderSlot(t.$slots,"right",{},()=>[a.showVersion?e.withDirectives((e.openBlock(),e.createElementBlock("span",AO,[e.createTextVNode(" v"+e.toDisplayString(a.version),1)])),[[s,n.versionTooltip,void 0,{top:!0}]]):e.createCommentVNode("",!0)],!0)])])}const Tm=fe(ZO,[["render",YO],["__scopeId","data-v-c66135cc"]]);class zO{getPublicLink(){}createPublicLink(){}}class MO{getLoolUrl(l){let a=`${l}/alfresco/service/lool/host/url`;return at.get(a).then(i=>i.data).catch(i=>{throw Ge("getLoolUrl",i)})}getAccessToken(l,a,i){let o=`${l}/alfresco/service/lool/token?nodeRef=workspace://SpacesStore/${a}&action=${i}`,n={headers:{Authorization:`basic ${window.btoa(window.localStorage["ticket-ECM"])}`}};return at.get(o,n).then(s=>s.data).catch(s=>{throw Ge("getAccessToken",s)})}}const XO=new MO;class OO{isDivBody(l,a){return["BODY","DIV"].includes(l.target.nodeName)&&!a&&!l.isComposing}eventPdfComponent(l,a){if(l)switch(a.key){case"ArrowLeft":l.previousPage();break;case"ArrowRight":l.nextPage();break;case"+":l.zoomIn();break;case"-":l.zoomOut();break;case"5":l.fitWidthAuto();break;case"0":l.fitAuto();break}}eventImageViewer(l,a){if(l)switch(a.key){case"+":l.zoomIn();break;case"-":l.zoomOut();break;case"0":l.fitAuto();break}}}const wO=new OO;function kO(t,l=""){if(typeof t>"u"||t===null)throw new Error("mandatory parameter "+l)}function Ni(t,l=""){if(typeof t!="string"||l.trim()==="")throw new Error("mandatory parameter "+l)}class Im{alive=!1;hide=!1;code;label;parent}class Ai extends Im{groupConfidentiel;constructor({code:l,label:a,parent:i,groupConfidentiel:o,alive:n=!0}){super(),this.code=l,this.label=a,this.parent=i,this.groupConfidentiel=o,this.alive=n}isConfidentiel(){return this.groupConfidentiel&&this.groupConfidentiel.length>0}}class jm extends Im{constructor({code:l,label:a,parent:i,hide:o=!1}){super(),this.code=l,this.label=a,this.parent=i,this.hide=o}}class CO{app="social";loading=!0;constructor(){this.filingPlans={},this.natures={}}async loadPlanClassement(l){this.loading=!0,Ni(l,"planType");let a=`plan-${l}.json`;console.info(`loading plan ${l}`);const i=`fr/jeci/pristy/config/${this.app}/${a}`;return fa.executeWebScript("GET",i).then(o=>{const n=o.PLAN_CLASSEMENT,s=o.NATURE_DOCUMENT;if(!n)throw new Error(`Missing PLAN_CLASSEMENT in ${a}`);if(!s)throw new Error(`Missing NATURE_DOCUMENT in ${a}`);this.filingPlans[l]=n.map(r=>{let c=new Ai(r);return c.alive=!0,c}),this.natures[l]=s.filter(r=>{let c=this.getTypeDossier(l,r.parent);return c!=null}).map(r=>{let c=new jm(r);return c.alive=!0,c}),this.loading=!1})}getTypeDossier(l,a){return this._findPlan(l,i=>i.code===a)}getTypeDossierFromLabel(l,a){return this._findPlan(l,i=>i.label===a)}_findPlan(l,a){return this._assertPlanExist(l),this.filingPlans[l].find(a)}_assertPlanExist(l){if(!Object.prototype.hasOwnProperty.call(this.filingPlans,l))throw new Error(`Filling Plan ${l} not loaded`)}getPlan(l){return Object.prototype.hasOwnProperty.call(this.filingPlans,l)?this.filingPlans[l]:(console.warn("Filling Plan ${planType} not loaded"),null)}getFilteredPlan(l){return Ln.getUserGroups(mt().person.id,!1).then(a=>Object.prototype.hasOwnProperty.call(this.filingPlans,l)?this.filingPlans[l].filter(o=>o.groupConfidentiel?a.includes(o.groupConfidentiel):!0):(console.warn(`Filing Plan ${l} not loaded`),null))}getNatureDocument(l,a){return Object.prototype.hasOwnProperty.call(this.natures,l)?this.natures[l].find(i=>i.code===a):(console.warn(`Filling Plan ${l} not loaded`),null)}getNatures(l){return Object.prototype.hasOwnProperty.call(this.natures,l)?this.natures[l]:(console.warn(`Filling Plan ${l} not loaded`),null)}getEnabledNatures(l){return Object.prototype.hasOwnProperty.call(this.natures,l)?this.natures[l].filter(a=>a.hide===!1):(console.warn(`Filling Plan ${l} not loaded`),null)}getTypeDossierOfNode(l,a){const i=this.getFolderNameFromPath(a);let o=this.getTypeDossierFromLabel(l,i);return o||(o=new Ai({label:`${i} - Hors Plan`}),o.hide=!0),Promise.resolve(o)}getFolderNameFromPath(l){if(!l.path)return console.warn("No file path provided"),null;const a=l.path.elements.length-1;return l.path.elements[a].name}async treeNodes(l){return Ni(l,"planType"),this.getFilteredPlan(l).then(a=>a.map(i=>({id:i.id||null,key:i.code,label:i.label,children:[],isFolder:!0,confidentiel:i.isConfidentiel(),icon:"ri-folder-line"})))}}const TO=new CO,IO={modifiedat:"cm:modified",createdat:"cm:created",createdbyuser:"cm:creator",modifiedbyuser:"cm:modifier",name:"cm:name",title:"cm:title",description:"cm:description",mimetype:"cm:content.mimetype",encoding:"cm:content.encoding",sizeinbytes:"cm:content.size",type:"TYPE","cm:type":"TYPE"};class jO{mapAliasToSolr(l){if(!l)return l;const a=l.toLowerCase();return IO[a]||l}buildAftsQueryFromJSON(l){if(!l)return"";const a=[],i=l.locations||[],o=i.filter(s=>!s.negation),n=i.filter(s=>s.negation);if(o.length>0){const s=o.map(r=>r.type==="Site"&&r.value?`SITE:"${r.value}"`:r.type==="Folder"&&r.value?`ANCESTOR:'${r.value}'`:null).filter(Boolean);s.length===1?a.push(s[0]):s.length>1&&a.push(`(${s.join(" OR ")})`)}if(n.forEach(s=>{s.type==="Site"&&s.value?a.push(`NOT SITE:"${s.value}"`):s.type==="Folder"&&s.value&&a.push(`NOT ANCESTOR:'${s.value}'`)}),l.criteriaGroups){const s=this._buildGroupsParts(l.criteriaGroups);s&&a.push(s)}else{const r=(l.criteria||[]).map(c=>this._buildCriterionPart(c)).filter(Boolean);r.length>0&&a.push(r.join(" AND "))}return a.join(" AND ")}_buildCriterionPart(l){if(l.query)return l.query;if(l.value===null||l.value==="")return null;const a=l.negation?"NOT ":"";let i="";const o=this.mapAliasToSolr(l.property?.id);switch(l.property?.input){case"boolean":i=`${o}:${l.value}`;break;case"date":case"datetime":if(l.operator==="range"){let s="MIN";if(l.value){const c=new Date(l.value);c.setHours(0,0,0,0),s=c.toISOString()}let r="MAX";if(l.value_end){const c=new Date(l.value_end);c.setHours(23,59,59,999),r=c.toISOString()}i=`${o}:['${s}' TO '${r}']`}else{const s=new Date(l.value);s.setHours(0,0,0,0);const r=new Date(l.value);r.setHours(23,59,59,999),i=`[${o}:'${s.toISOString()}' TO '${r.toISOString()}']`}break;default:if(l.operator==="exact")i=`${o}:"${l.value}"`;else if(l.operator==="contains")i=`${o}:"*${l.value}*"`;else if(l.operator==="range"){const s=l.value!==null?l.value:"MIN",r=l.value_end!==null?l.value_end:"MAX";i=`${o}:[${s} TO ${r}]`}break}return i?a?`${a}(${i})`:i:null}_buildGroupQuery(l){const a=l.criteria.map(i=>this._buildCriterionPart(i)).filter(Boolean);return a.length===0?null:a.length===1?a[0]:`(${a.join(` ${l.operator} `)})`}_buildGroupsParts(l){const a=l.groups.map(i=>this._buildGroupQuery(i)).filter(Boolean);return a.length===0?null:a.length===1?a[0]:a.join(` ${l.rootOperator} `)}}const GO=new jO,DO={install(t,l){console.log("load Keycloak With",l.init);const a=new a0(l.init);a.onReady=()=>{typeof l.onReady=="function"&&l.onReady(a)};let i;a.onAuthSuccess=()=>{i=setInterval(()=>{a.updateToken(60).then(o=>{l.init.enableLogging&&console.log(`[vue-keycloak-js] Token ${o?"updated":"not updated"}`)}).catch(o=>{l.init.enableLogging&&console.error("[vue-keycloak-js] Error updating token:",o),a.clearToken()})},1e4)},a.onAuthLogout=()=>{clearInterval(i),typeof l.onAuthLogout=="function"&&l.onAuthLogout(a)},a.init(l.init).then(o=>{typeof l.onInitSuccess=="function"&&l.onInitSuccess(o)}).catch(o=>{const n=new Error("Failure during initialization of Keycloak");typeof l.onInitError=="function"?l.onInitError(n,o):console.error(n,o)})}},LO=je.defineStore({id:"UserPreferencesStore",state:()=>({listView:!0})});let lo=null;const VO=je.defineStore("filingPlan",{state:()=>({currentPlanName:null,planClassement:[],natures:[],viewCategories:[],dynamicViews:[],loading:!1,loaded:!1}),getters:{enabledNatures:t=>t.natures.filter(l=>!l.hide),hasPlan:t=>t.currentPlanName!==null&&t.loaded},actions:{async loadPlan(t,l=!1){if(t&&!(this.currentPlanName===t&&this.loaded&&!l)){if(lo&&this.currentPlanName===t)return lo;this.loading=!0,this.currentPlanName=t,lo=this._doLoad(t);try{await lo}finally{lo=null}}},async _doLoad(t){try{const l=await fl.getPlan(t);this.planClassement=l.EMPLACEMENT||l.PLAN_CLASSEMENT||[],this.natures=l.NATURES||l.NATURE_DOCUMENT||[],this.viewCategories=l.VIEW_CATEGORIES||[],await this._loadDynamicViews(),this.loaded=!0}catch(l){throw console.error(`Failed to load plan ${t}:`,l),this.reset(),l}finally{this.loading=!1}},async _loadDynamicViews(){const t=new Set;for(const a of this.viewCategories)for(const i of a.views||[])t.add(i);const l=[];for(const a of t)try{const i=await Pt.getView(a);l.push({...i,filename:a})}catch{}this.dynamicViews=l},reset(){this.currentPlanName=null,this.planClassement=[],this.natures=[],this.viewCategories=[],this.dynamicViews=[],this.loaded=!1,this.loading=!1}}}),vO={components:{PrimeButton:de,PrimeMessage:ml,PrimeDivider:ql,PrimeInputText:_e,PrimePassword:Qi},data(){return{email:"",password:"",checked:!1,loginError:!1,failLoginMessage:null}},methods:{goToForgotPasswordPage(){this.$router.push({name:"forgot-password"})},goToACA(){window.location.href=this.ACA_LINK},login(){mt().login(this.email,this.password).then(l=>{if(l===!1)throw new Error(this.$t("login.emptyPasswordOrUser"));this.$route.query?.target===void 0?this.$router.push({name:"welcome"}):this.$router.replace(this.$route.query.target)}).catch(l=>{this.loginError=!0,l instanceof Error?this.failLoginMessage=l.message:l&&typeof l=="object"&&l.message?this.failLoginMessage=l.message:typeof l=="string"?this.failLoginMessage=l:this.failLoginMessage=this.$t("login.unexpectedError")})}},computed:{...je.mapState(xe,["SHOW_ACA_LOGIN_LINK","ACA_LINK"])}},FO={class:"login-container"},RO={class:"login-wrapper"},SO={class:"login-content"},xO={class:"login-card"},UO={class:"login-header"},JO={class:"login-title"},EO={class:"login-subtitle"},BO={class:"login-form"},HO={for:"email",class:"form-label"},QO={for:"password",class:"form-label"},PO={class:"forgot-password-wrapper"};function _O(t,l,a,i,o,n){const s=e.resolveComponent("PrimeMessage"),r=e.resolveComponent("PrimeInputText"),c=e.resolveComponent("PrimePassword"),m=e.resolveComponent("PrimeButton"),h=e.resolveComponent("PrimeDivider");return e.openBlock(),e.createElementBlock("div",FO,[e.createElementVNode("div",RO,[e.createElementVNode("div",SO,[e.createElementVNode("div",xO,[e.createElementVNode("div",UO,[l[3]||(l[3]=e.createElementVNode("div",{id:"loginLogo"},null,-1)),e.createElementVNode("div",JO,e.toDisplayString(t.$t("welcome")),1),e.createElementVNode("span",EO,e.toDisplayString(t.$t("connectToContinue")),1)]),o.loginError?(e.openBlock(),e.createBlock(s,{key:0,severity:"error",closable:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.failLoginMessage),1)]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",BO,[e.createElementVNode("label",HO,e.toDisplayString(t.$t("userIdentification")),1),e.createVNode(r,{id:"email",modelValue:o.email,"onUpdate:modelValue":l[0]||(l[0]=b=>o.email=b),type:"text",class:"form-input",placeholder:t.$t("userID"),fluid:"",onKeyup:e.withKeys(n.login,["enter"])},null,8,["modelValue","placeholder","onKeyup"]),e.createElementVNode("label",QO,e.toDisplayString(t.$t("password")),1),e.createVNode(c,{id:"password",modelValue:o.password,"onUpdate:modelValue":l[1]||(l[1]=b=>o.password=b),placeholder:t.$t("password"),class:"form-input",feedback:!1,fluid:"",onKeyup:e.withKeys(n.login,["enter"])},null,8,["modelValue","placeholder","onKeyup"]),e.createElementVNode("div",PO,[e.createElementVNode("a",{class:"forgot-password-link",onClick:l[2]||(l[2]=(...b)=>n.goToForgotPasswordPage&&n.goToForgotPasswordPage(...b))},e.toDisplayString(t.$t("forgotPasswordLink")),1)]),e.createVNode(m,{label:t.$t("connect"),class:"login-button",onClick:n.login},null,8,["label","onClick"]),t.SHOW_ACA_LOGIN_LINK?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(h),e.createVNode(m,{label:t.$t("accessACA"),class:"aca-button",severity:"secondary",onClick:n.goToACA},null,8,["label","onClick"])],64)):e.createCommentVNode("",!0)])])])])])}const KO=fe(vO,[["render",_O],["__scopeId","data-v-1d49d6da"]]),$O={name:"NotFoundPages",components:{ErrorComponent:ii},props:{homeName:{type:String,default:"welcome"}},data(){return{errorNb:"404"}}};function qO(t,l,a,i,o,n){const s=e.resolveComponent("ErrorComponent");return e.openBlock(),e.createBlock(s,{errorNb:o.errorNb,homeName:a.homeName},null,8,["errorNb","homeName"])}const ew=fe($O,[["render",qO]]),tw="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1100'%20height='1000'%20viewBox='0%200%201100%201000'%3e%3cg%20style='display:inline'%3e%3cpath%20d='M504.426%20175.12v-755.5h1894.998l.25%20755.5.252%20755.5h-1895.5Zm1595.67%20495.866c12.556-4.749%2022.914-8.695%2023.017-8.77s.872-7.552%201.71-16.616c4.471-48.375%207.239-141.749%208.275-279.23l.654-86.75-4.913.012c-2.702.007-12.338.677-21.413%201.488s-17.131%201.48-17.903%201.488c-1.543.013-1.29%2013.857.933%2051.012.609%2010.175.964%2027.5.788%2038.5l-.318%2020-4.682%209.565c-15.4%2031.458-33.812%2046.042-46.2%2036.593-15.749-12.013-20.55-61.88-13.012-135.158.849-8.25%201.622-16.575%201.719-18.5l.175-3.5-20.873-1.327c-11.48-.73-21.239-.954-21.684-.5-1.044%201.064-3.468%2015.172-5.555%2032.327-1.121%209.215-1.722%2023.34-1.894%2044.5l-.25%2031-3.747%2010c-14.505%2038.716-34.978%2057.47-52.59%2048.174-14.833-7.83-18.002-25.159-16.017-87.587.64-20.123%201.44-40.075%201.78-44.337l.618-7.75H1955l3.374-13.75c1.856-7.563%203.579-14.538%203.83-15.5.424-1.634-1.283-1.75-25.662-1.75h-26.117l.027-4.75c.015-2.613%201.099-21.85%202.408-42.75s2.004-38.395%201.544-38.878c-.905-.951-42.641%208.068-44.73%209.666-.886.679-1.25%204.731-1.25%2013.943%200%2015.55-1.98%2062.06-2.672%2062.769-.269.275-9.786.725-21.15%201l-20.66.5-5.145%2014-5.145%2014%2015.636.614c8.6.339%2020.045.676%2025.432.75l9.795.136-.67%2037.25c-1.348%2074.942%203.478%20101.74%2021.861%20121.392%209.918%2010.601%2019.408%2015.373%2034.95%2017.57%209.4%201.33%2021.63%200%2029.89-3.26%2012.633-4.98%2024.348-15.379%2033.814-30.017l5.622-8.692%204.178%208.775c5.82%2012.222%2012.952%2019.74%2023.856%2025.142%207.678%203.805%209.154%204.18%2018.138%204.613%2012.293.592%2019.055-.786%2029.565-6.021%205.995-2.987%2010.159-6.033%2015.456-11.307l7.25-7.22-.01%2015.138c-.011%2027.267-2.612%2081.885-6.054%20127.137-2.122%2027.885-6.64%2076.233-7.547%2080.75-.406%202.022-.156%202.75.946%202.75.825%200%2011.773-3.885%2024.33-8.634zm-1057.67-116.299c28.774-1.136%2053.183-2.723%2056.75-3.69%201.238-.336%202.25-.955%202.25-1.377%200-1.2-3.737-1.915-13.75-2.633-5.087-.364-9.25-1.07-9.25-1.567s-1.358-1.377-3.017-1.956l-3.018-1.052%201.92-3.146c2.371-3.886%205.648-14.46%206.558-21.163%201.4-10.321-4.663-28.636-11.866-35.839l-3.24-3.24%206.49-6.952c35.896-38.45%2058.697-88.228%2064.239-140.245%201.724-16.184.72-48.355-1.987-63.707-11.286-63.991-45.373-118.749-97.579-156.748-91.455-66.57-217.858-64.52-307.39%204.985-11.368%208.824-30.502%2027.544-39.621%2038.763-22.151%2027.25-38.675%2059.933-47.02%2093-11.263%2044.63-9.667%2090.501%204.666%20134.118%209.77%2029.727%2027.807%2061.418%2047.297%2083.095%202.513%202.795%204.568%205.422%204.568%205.838s-1.862%202.35-4.138%204.299c-5.638%204.826-10.264%2012.372-12.896%2021.036-4.065%2013.383-1.627%2030.479%205.908%2041.43l3.083%204.482-2.417%201.584c-1.65%201.081-6.78%201.915-16.158%202.627-14.572%201.106-18.382%201.726-18.382%202.991%200%201.258%204.238%201.988%2017.272%202.975%2012.306.931%2066.501%202.853%2096.228%203.412%2036.072.68%20249.918-.35%20274.5-1.32m728.979-76.096c13.784-4.615%2024.711-11.598%2034.223-21.872%2022.997-24.839%2022.518-53.876-1.59-96.446-8.476-14.967-15.161-24.324-33.02-46.215-1.872-2.294-1.873-2.59-.063-15.369%201.015-7.166%201.531-13.343%201.149-13.725-.581-.581-33.013-6.243-36.197-6.32-.56-.013-2.008%207.063-3.216%2015.726-3.505%2025.129-12.883%2059.679-24.041%2088.57-3.366%208.717-4.796%2011.408-5.444%2010.25-.483-.863-1.508-1.57-2.277-1.57s-8.172%202.3-16.45%205.113c-10.679%203.627-15.052%205.56-15.052%206.654%200%201.707%204.89%2010.858%2011.769%2022.027%205.06%208.217%205.141%207.906-3.194%2012.338-3.016%201.603-5.16%201.984-9.258%201.644-15.635-1.296-18.067-15.694-15.282-90.471.57-15.293%201.447-35.005%201.948-43.805.502-8.8.59-16.323.196-16.718-1.247-1.252-42.262-3.45-43.01-2.306-.368.563-1.052%2025.324-1.52%2055.024l-.851%2054-4.276%209.123c-10.516%2022.44-22.77%2034.385-35.261%2034.372-8.8-.01-15.464-6.044-19.213-17.398-5.741-17.383-5.345-43.206%201.417-92.351%202.037-14.801%202.314-19.178%201.464-23.139-1.349-6.291-6.39-12.214-13.205-15.517-6.097-2.954-8.485-2.672-20.725%202.452-9.652%204.04-16.929%204.465-20.218%201.18-2.08-2.077-2.284-3.204-2.315-12.756-.044-13.916-.829-14.822-13.254-15.307-4.804-.187-10.304.065-12.223.561l-3.49.902-.666%2010.939c-.939%2015.394-6.72%2051.97-11.364%2071.896-.764%203.276-1.247%206.099-1.074%206.272.583.582%2027.69%205.518%2028.094%205.115.22-.22%201.847-7.586%203.616-16.371s3.483-16.287%203.806-16.672c.324-.384%205.244.05%2010.935.964l10.346%201.662-.623%203.537c-2.481%2014.093-4.831%2043.836-4.9%2062.036-.07%2018.26.163%2021.374%202.141%2028.5%207.024%2025.3%2022.58%2042.72%2042.87%2048.005%203.157.822%209.648%201.495%2014.424%201.495%2015.61%200%2026.666-4.937%2040.255-17.976l8.14-7.81%202.44%205.543c7.34%2016.677%2020.451%2024.41%2041.387%2024.41%2016.97%200%2028.839-4.24%2041.18-14.71l6.49-5.505%208.59%206.948c8.776%207.1%2019.77%2013.24%2026.915%2015.03%206.294%201.578%2022.037.532%2029.477-1.959zm-493.604-7.437c11.481-1.348%2020.98-2.582%2021.108-2.742s-.146-4.792-.61-10.292-1.14-31.913-1.502-58.695l-.657-48.695%202.393-.486c1.316-.268%2013.643-2.113%2027.393-4.101%2032.218-4.658%2046.902-7.689%2063.204-13.044%2038.272-12.572%2059.1-32.631%2067.466-64.979%202.064-7.978%202.326-11.271%202.311-29-.019-22.68-.871-27.345-7.491-41-7.027-14.494-17.266-24.582-32.49-32.01-24.44-11.927-49.949-13.244-115-5.94-35.252%203.957-102.076%2015.034-104.72%2017.358-.397.348.387%2010.074%201.742%2021.613s2.466%2021.316%202.47%2021.729c.015%201.387%204.407.72%2027.508-4.184%2012.65-2.685%2023.186-4.7%2023.413-4.478.226.222-.574%2056.993-1.778%20126.158s-2.178%20127.891-2.162%20130.504c.027%204.688.07%204.75%203.277%204.742%201.788%200%2012.644-1.11%2024.125-2.458m375.955-204.348c4.018-2.266%205.804-4.117%208.012-8.301%202.642-5.005%202.813-6.02%202.435-14.385-.439-9.71-2.486-15.297-7.637-20.842-9.169-9.868-27.428-10.135-37.022-.54-9.043%209.042-10.016%2026.79-2.08%2037.936%202.342%203.289%209.48%207.807%2014.294%209.05%206.183%201.594%2016.402.24%2021.998-2.918'%20style='fill:none;fill-rule:evenodd'/%3e%3cpath%20d='M504.426%20175.12v-755.5h1894.998l.25%20755.5.252%20755.5h-1895.5Zm1595.67%20495.866c12.556-4.749%2022.914-8.695%2023.017-8.77s.872-7.552%201.71-16.616c4.471-48.375%207.239-141.749%208.275-279.23l.654-86.75-4.913.012c-2.702.007-12.338.677-21.413%201.488s-17.131%201.48-17.903%201.488c-1.543.013-1.29%2013.857.933%2051.012.609%2010.175.964%2027.5.788%2038.5l-.318%2020-4.682%209.565c-15.4%2031.458-33.812%2046.042-46.2%2036.593-15.749-12.013-20.55-61.88-13.012-135.158.849-8.25%201.622-16.575%201.719-18.5l.175-3.5-20.873-1.327c-11.48-.73-21.239-.954-21.684-.5-1.044%201.064-3.468%2015.172-5.555%2032.327-1.121%209.215-1.722%2023.34-1.894%2044.5l-.25%2031-3.747%2010c-14.505%2038.716-34.978%2057.47-52.59%2048.174-14.833-7.83-18.002-25.159-16.017-87.587.64-20.123%201.44-40.075%201.78-44.337l.618-7.75H1955l3.374-13.75c1.856-7.563%203.579-14.538%203.83-15.5.424-1.634-1.283-1.75-25.662-1.75h-26.117l.027-4.75c.015-2.613%201.099-21.85%202.408-42.75s2.004-38.395%201.544-38.878c-.905-.951-42.641%208.068-44.73%209.666-.886.679-1.25%204.731-1.25%2013.943%200%2015.55-1.98%2062.06-2.672%2062.769-.269.275-9.786.725-21.15%201l-20.66.5-5.145%2014-5.145%2014%2015.636.614c8.6.339%2020.045.676%2025.432.75l9.795.136-.67%2037.25c-1.348%2074.942%203.478%20101.74%2021.861%20121.392%209.918%2010.601%2019.408%2015.373%2034.95%2017.57%209.4%201.33%2021.63%200%2029.89-3.26%2012.633-4.98%2024.348-15.379%2033.814-30.017l5.622-8.692%204.178%208.775c5.82%2012.222%2012.952%2019.74%2023.856%2025.142%207.678%203.805%209.154%204.18%2018.138%204.613%2012.293.592%2019.055-.786%2029.565-6.021%205.995-2.987%2010.159-6.033%2015.456-11.307l7.25-7.22-.01%2015.138c-.011%2027.267-2.612%2081.885-6.054%20127.137-2.122%2027.885-6.64%2076.233-7.547%2080.75-.406%202.022-.156%202.75.946%202.75.825%200%2011.773-3.885%2024.33-8.634zm-1057.67-116.299c28.774-1.136%2053.183-2.723%2056.75-3.69%201.238-.336%202.25-.955%202.25-1.377%200-1.2-3.737-1.915-13.75-2.633-5.087-.364-9.25-1.07-9.25-1.567s-1.358-1.377-3.017-1.956l-3.018-1.052%201.92-3.146c2.371-3.886%205.648-14.46%206.558-21.163%201.4-10.321-4.663-28.636-11.866-35.839l-3.24-3.24%206.49-6.952c35.896-38.45%2058.697-88.228%2064.239-140.245%201.724-16.184.72-48.355-1.987-63.707-11.286-63.991-45.373-118.749-97.579-156.748-91.455-66.57-217.858-64.52-307.39%204.985-11.368%208.824-30.502%2027.544-39.621%2038.763-22.151%2027.25-38.675%2059.933-47.02%2093-11.263%2044.63-9.667%2090.501%204.666%20134.118%209.77%2029.727%2027.807%2061.418%2047.297%2083.095%202.513%202.795%204.568%205.422%204.568%205.838s-1.862%202.35-4.138%204.299c-5.638%204.826-10.264%2012.372-12.896%2021.036-4.065%2013.383-1.627%2030.479%205.908%2041.43l3.083%204.482-2.417%201.584c-1.65%201.081-6.78%201.915-16.158%202.627-14.572%201.106-18.382%201.726-18.382%202.991%200%201.258%204.238%201.988%2017.272%202.975%2012.306.931%2066.501%202.853%2096.228%203.412%2036.072.68%20249.918-.35%20274.5-1.32m728.979-76.096c13.784-4.615%2024.711-11.598%2034.223-21.872%2022.997-24.839%2022.518-53.876-1.59-96.446-8.476-14.967-15.161-24.324-33.02-46.215-1.872-2.294-1.873-2.59-.063-15.369%201.015-7.166%201.531-13.343%201.149-13.725-.581-.581-33.013-6.243-36.197-6.32-.56-.013-2.008%207.063-3.216%2015.726-3.505%2025.129-12.883%2059.679-24.041%2088.57-3.366%208.717-4.796%2011.408-5.444%2010.25-.483-.863-1.508-1.57-2.277-1.57s-8.172%202.3-16.45%205.113c-10.679%203.627-15.052%205.56-15.052%206.654%200%201.707%204.89%2010.858%2011.769%2022.027%205.06%208.217%205.141%207.906-3.194%2012.338-3.016%201.603-5.16%201.984-9.258%201.644-15.635-1.296-18.067-15.694-15.282-90.471.57-15.293%201.447-35.005%201.948-43.805.502-8.8.59-16.323.196-16.718-1.247-1.252-42.262-3.45-43.01-2.306-.368.563-1.052%2025.324-1.52%2055.024l-.851%2054-4.276%209.123c-10.516%2022.44-22.77%2034.385-35.261%2034.372-8.8-.01-15.464-6.044-19.213-17.398-5.741-17.383-5.345-43.206%201.417-92.351%202.037-14.801%202.314-19.178%201.464-23.139-1.349-6.291-6.39-12.214-13.205-15.517-6.097-2.954-8.485-2.672-20.725%202.452-9.652%204.04-16.929%204.465-20.218%201.18-2.08-2.077-2.284-3.204-2.315-12.756-.044-13.916-.829-14.822-13.254-15.307-4.804-.187-10.304.065-12.223.561l-3.49.902-.666%2010.939c-.939%2015.394-6.72%2051.97-11.364%2071.896-.764%203.276-1.247%206.099-1.074%206.272.583.582%2027.69%205.518%2028.094%205.115.22-.22%201.847-7.586%203.616-16.371s3.483-16.287%203.806-16.672c.324-.384%205.244.05%2010.935.964l10.346%201.662-.623%203.537c-2.481%2014.093-4.831%2043.836-4.9%2062.036-.07%2018.26.163%2021.374%202.141%2028.5%207.024%2025.3%2022.58%2042.72%2042.87%2048.005%203.157.822%209.648%201.495%2014.424%201.495%2015.61%200%2026.666-4.937%2040.255-17.976l8.14-7.81%202.44%205.543c7.34%2016.677%2020.451%2024.41%2041.387%2024.41%2016.97%200%2028.839-4.24%2041.18-14.71l6.49-5.505%208.59%206.948c8.776%207.1%2019.77%2013.24%2026.915%2015.03%206.294%201.578%2022.037.532%2029.477-1.959zm-493.604-7.437c11.481-1.348%2020.98-2.582%2021.108-2.742s-.146-4.792-.61-10.292-1.14-31.913-1.502-58.695l-.657-48.695%202.393-.486c1.316-.268%2013.643-2.113%2027.393-4.101%2032.218-4.658%2046.902-7.689%2063.204-13.044%2038.272-12.572%2059.1-32.631%2067.466-64.979%202.064-7.978%202.326-11.271%202.311-29-.019-22.68-.871-27.345-7.491-41-7.027-14.494-17.266-24.582-32.49-32.01-24.44-11.927-49.949-13.244-115-5.94-35.252%203.957-102.076%2015.034-104.72%2017.358-.397.348.387%2010.074%201.742%2021.613s2.466%2021.316%202.47%2021.729c.015%201.387%204.407.72%2027.508-4.184%2012.65-2.685%2023.186-4.7%2023.413-4.478.226.222-.574%2056.993-1.778%20126.158s-2.178%20127.891-2.162%20130.504c.027%204.688.07%204.75%203.277%204.742%201.788%200%2012.644-1.11%2024.125-2.458m375.955-204.348c4.018-2.266%205.804-4.117%208.012-8.301%202.642-5.005%202.813-6.02%202.435-14.385-.439-9.71-2.486-15.297-7.637-20.842-9.169-9.868-27.428-10.135-37.022-.54-9.043%209.042-10.016%2026.79-2.08%2037.936%202.342%203.289%209.48%207.807%2014.294%209.05%206.183%201.594%2016.402.24%2021.998-2.918'%20style='fill:none;fill-rule:evenodd'/%3e%3cpath%20d='M504.426%20175.12v-755.5h1895v1511h-1895Zm1595.67%20495.866c12.556-4.749%2022.914-8.695%2023.017-8.77s.872-7.552%201.71-16.616c4.471-48.375%207.239-141.749%208.275-279.23l.654-86.75-4.913.012c-2.702.007-12.338.677-21.413%201.488s-17.131%201.48-17.903%201.488c-1.543.013-1.29%2013.857.933%2051.012.609%2010.175.964%2027.5.788%2038.5l-.318%2020-4.682%209.565c-15.4%2031.458-33.812%2046.042-46.2%2036.593-15.749-12.013-20.55-61.88-13.012-135.158.849-8.25%201.622-16.575%201.719-18.5l.175-3.5-20.873-1.327c-11.48-.73-21.239-.954-21.684-.5-1.044%201.064-3.468%2015.172-5.555%2032.327-1.121%209.215-1.722%2023.34-1.894%2044.5l-.25%2031-3.747%2010c-14.505%2038.716-34.978%2057.47-52.59%2048.174-14.833-7.83-18.002-25.159-16.017-87.587.64-20.123%201.44-40.075%201.78-44.337l.618-7.75H1955l3.374-13.75c1.856-7.563%203.579-14.538%203.83-15.5.424-1.634-1.283-1.75-25.662-1.75h-26.117l.027-4.75c.015-2.613%201.099-21.85%202.408-42.75s2.004-38.395%201.544-38.878c-.905-.951-42.641%208.068-44.73%209.666-.886.679-1.25%204.731-1.25%2013.943%200%2015.55-1.98%2062.06-2.672%2062.769-.269.275-9.786.725-21.15%201l-20.66.5-5.145%2014-5.145%2014%2015.636.614c8.6.339%2020.045.676%2025.432.75l9.795.136-.67%2037.25c-1.348%2074.942%203.478%20101.74%2021.861%20121.392%209.918%2010.601%2019.408%2015.373%2034.95%2017.57%209.4%201.33%2021.63%200%2029.89-3.26%2012.633-4.98%2024.348-15.379%2033.814-30.017l5.622-8.692%204.178%208.775c5.82%2012.222%2012.952%2019.74%2023.856%2025.142%207.678%203.805%209.154%204.18%2018.138%204.613%2012.293.592%2019.055-.786%2029.565-6.021%205.995-2.987%2010.159-6.033%2015.456-11.307l7.25-7.22-.01%2015.138c-.011%2027.267-2.612%2081.885-6.054%20127.137-2.122%2027.885-6.64%2076.233-7.547%2080.75-.406%202.022-.156%202.75.946%202.75.825%200%2011.773-3.885%2024.33-8.634zm-1057.67-116.299c28.774-1.136%2053.183-2.723%2056.75-3.69%201.238-.336%202.25-.955%202.25-1.377%200-1.2-3.737-1.915-13.75-2.633-5.087-.364-9.25-1.07-9.25-1.567s-1.358-1.377-3.017-1.956l-3.018-1.052%201.92-3.146c2.371-3.886%205.648-14.46%206.558-21.163%201.4-10.321-4.663-28.636-11.866-35.839l-3.24-3.24%206.49-6.952c35.896-38.45%2058.697-88.228%2064.239-140.245%201.724-16.184.72-48.355-1.987-63.707-11.286-63.991-45.373-118.749-97.579-156.748-91.455-66.57-217.858-64.52-307.39%204.985-11.368%208.824-30.502%2027.544-39.621%2038.763-22.151%2027.25-38.675%2059.933-47.02%2093-11.263%2044.63-9.667%2090.501%204.666%20134.118%209.77%2029.727%2027.807%2061.418%2047.297%2083.095%202.513%202.795%204.568%205.422%204.568%205.838s-1.862%202.35-4.138%204.299c-5.638%204.826-10.264%2012.372-12.896%2021.036-4.065%2013.383-1.627%2030.479%205.908%2041.43l3.083%204.482-2.417%201.584c-1.65%201.081-6.78%201.915-16.158%202.627-14.572%201.106-18.382%201.726-18.382%202.991%200%201.258%204.238%201.988%2017.272%202.975%2012.306.931%2066.501%202.853%2096.228%203.412%2036.072.68%20249.918-.35%20274.5-1.32m728.979-76.096c13.784-4.615%2024.711-11.598%2034.223-21.872%2022.997-24.839%2022.518-53.876-1.59-96.446-8.476-14.967-15.161-24.324-33.02-46.215-1.872-2.294-1.873-2.59-.063-15.369%201.015-7.166%201.531-13.343%201.149-13.725-.581-.581-33.013-6.243-36.197-6.32-.56-.013-2.008%207.063-3.216%2015.726-3.505%2025.129-12.883%2059.679-24.041%2088.57-3.366%208.717-4.796%2011.408-5.444%2010.25-.483-.863-1.508-1.57-2.277-1.57s-8.172%202.3-16.45%205.113c-10.679%203.627-15.052%205.56-15.052%206.654%200%201.707%204.89%2010.858%2011.769%2022.027%205.06%208.217%205.141%207.906-3.194%2012.338-3.016%201.603-5.16%201.984-9.258%201.644-15.635-1.296-18.067-15.694-15.282-90.471.57-15.293%201.447-35.005%201.948-43.805.502-8.8.59-16.323.196-16.718-1.247-1.252-42.262-3.45-43.01-2.306-.368.563-1.052%2025.324-1.52%2055.024l-.851%2054-4.276%209.123c-10.516%2022.44-22.77%2034.385-35.261%2034.372-8.8-.01-15.464-6.044-19.213-17.398-5.741-17.383-5.345-43.206%201.417-92.351%202.037-14.801%202.314-19.178%201.464-23.139-1.349-6.291-6.39-12.214-13.205-15.517-6.097-2.954-8.485-2.672-20.725%202.452-9.652%204.04-16.929%204.465-20.218%201.18-2.08-2.077-2.284-3.204-2.315-12.756-.044-13.916-.829-14.822-13.254-15.307-4.804-.187-10.304.065-12.223.561l-3.49.902-.666%2010.939c-.939%2015.394-6.72%2051.97-11.364%2071.896-.764%203.276-1.247%206.099-1.074%206.272.583.582%2027.69%205.518%2028.094%205.115.22-.22%201.847-7.586%203.616-16.371s3.483-16.287%203.806-16.672c.324-.384%205.244.05%2010.935.964l10.346%201.662-.623%203.537c-2.481%2014.093-4.831%2043.836-4.9%2062.036-.07%2018.26.163%2021.374%202.141%2028.5%207.024%2025.3%2022.58%2042.72%2042.87%2048.005%203.157.822%209.648%201.495%2014.424%201.495%2015.61%200%2026.666-4.937%2040.255-17.976l8.14-7.81%202.44%205.543c7.34%2016.677%2020.451%2024.41%2041.387%2024.41%2016.97%200%2028.839-4.24%2041.18-14.71l6.49-5.505%208.59%206.948c8.776%207.1%2019.77%2013.24%2026.915%2015.03%206.294%201.578%2022.037.532%2029.477-1.959zm-493.604-7.437c11.481-1.348%2020.98-2.582%2021.108-2.742s-.146-4.792-.61-10.292-1.14-31.913-1.502-58.695l-.657-48.695%202.393-.486c1.316-.268%2013.643-2.113%2027.393-4.101%2032.218-4.658%2046.902-7.689%2063.204-13.044%2038.272-12.572%2059.1-32.631%2067.466-64.979%202.064-7.978%202.326-11.271%202.311-29-.019-22.68-.871-27.345-7.491-41-7.027-14.494-17.266-24.582-32.49-32.01-24.44-11.927-49.949-13.244-115-5.94-35.252%203.957-102.076%2015.034-104.72%2017.358-.397.348.387%2010.074%201.742%2021.613s2.466%2021.316%202.47%2021.729c.015%201.387%204.407.72%2027.508-4.184%2012.65-2.685%2023.186-4.7%2023.413-4.478.226.222-.574%2056.993-1.778%20126.158s-2.178%20127.891-2.162%20130.504c.027%204.688.07%204.75%203.277%204.742%201.788%200%2012.644-1.11%2024.125-2.458m375.955-204.348c4.018-2.266%205.804-4.117%208.012-8.301%202.642-5.005%202.813-6.02%202.435-14.385-.439-9.71-2.486-15.297-7.637-20.842-9.169-9.868-27.428-10.135-37.022-.54-9.043%209.042-10.016%2026.79-2.08%2037.936%202.342%203.289%209.48%207.807%2014.294%209.05%206.183%201.594%2016.402.24%2021.998-2.918'%20style='fill:none;fill-rule:evenodd'/%3e%3cpath%20d='M344.426%20175.12v-755.5h2747.998l.25%20755.5.252%20755.5h-2748.5Zm1755.67%20495.866c12.556-4.749%2022.914-8.695%2023.017-8.77s.872-7.552%201.71-16.616c4.471-48.375%207.239-141.749%208.275-279.23l.654-86.75-4.913.012c-2.702.007-12.338.677-21.413%201.488s-17.131%201.48-17.903%201.488c-1.543.013-1.29%2013.857.933%2051.012.609%2010.175.964%2027.5.788%2038.5l-.318%2020-4.682%209.565c-15.4%2031.458-33.812%2046.042-46.2%2036.593-15.749-12.013-20.55-61.88-13.012-135.158.849-8.25%201.622-16.575%201.719-18.5l.175-3.5-20.873-1.327c-11.48-.73-21.239-.954-21.684-.5-1.044%201.064-3.468%2015.172-5.555%2032.327-1.121%209.215-1.722%2023.34-1.894%2044.5l-.25%2031-3.747%2010c-14.505%2038.716-34.978%2057.47-52.59%2048.174-14.833-7.83-18.002-25.159-16.017-87.587.64-20.123%201.44-40.075%201.78-44.337l.618-7.75H1955l3.374-13.75c1.856-7.563%203.579-14.538%203.83-15.5.424-1.634-1.283-1.75-25.662-1.75h-26.117l.027-4.75c.015-2.613%201.099-21.85%202.408-42.75s2.004-38.395%201.544-38.878c-.905-.951-42.641%208.068-44.73%209.666-.886.679-1.25%204.731-1.25%2013.943%200%2015.55-1.98%2062.06-2.672%2062.769-.269.275-9.786.725-21.15%201l-20.66.5-5.145%2014-5.145%2014%2015.636.614c8.6.339%2020.045.676%2025.432.75l9.795.136-.67%2037.25c-1.348%2074.942%203.478%20101.74%2021.861%20121.392%209.918%2010.601%2019.408%2015.373%2034.95%2017.57%209.4%201.33%2021.63%200%2029.89-3.26%2012.633-4.98%2024.348-15.379%2033.814-30.017l5.622-8.692%204.178%208.775c5.82%2012.222%2012.952%2019.74%2023.856%2025.142%207.678%203.805%209.154%204.18%2018.138%204.613%2012.293.592%2019.055-.786%2029.565-6.021%205.995-2.987%2010.159-6.033%2015.456-11.307l7.25-7.22-.01%2015.138c-.011%2027.267-2.612%2081.885-6.054%20127.137-2.122%2027.885-6.64%2076.233-7.547%2080.75-.406%202.022-.156%202.75.946%202.75.825%200%2011.773-3.885%2024.33-8.634zm-1057.67-116.299c28.774-1.136%2053.183-2.723%2056.75-3.69%201.238-.336%202.25-.955%202.25-1.377%200-1.2-3.737-1.915-13.75-2.633-5.087-.364-9.25-1.07-9.25-1.567s-1.358-1.377-3.017-1.956l-3.018-1.052%201.92-3.146c2.371-3.886%205.648-14.46%206.558-21.163%201.4-10.321-4.663-28.636-11.866-35.839l-3.24-3.24%206.49-6.952c35.896-38.45%2058.697-88.228%2064.239-140.245%201.724-16.184.72-48.355-1.987-63.707-11.286-63.991-45.373-118.749-97.579-156.748-91.455-66.57-217.858-64.52-307.39%204.985-11.368%208.824-30.502%2027.544-39.621%2038.763-22.151%2027.25-38.675%2059.933-47.02%2093-11.263%2044.63-9.667%2090.501%204.666%20134.118%209.77%2029.727%2027.807%2061.418%2047.297%2083.095%202.513%202.795%204.568%205.422%204.568%205.838s-1.862%202.35-4.138%204.299c-5.638%204.826-10.264%2012.372-12.896%2021.036-4.065%2013.383-1.627%2030.479%205.908%2041.43l3.083%204.482-2.417%201.584c-1.65%201.081-6.78%201.915-16.158%202.627-14.572%201.106-18.382%201.726-18.382%202.991%200%201.258%204.238%201.988%2017.272%202.975%2012.306.931%2066.501%202.853%2096.228%203.412%2036.072.68%20249.918-.35%20274.5-1.32m728.979-76.096c13.784-4.615%2024.711-11.598%2034.223-21.872%2022.997-24.839%2022.518-53.876-1.59-96.446-8.476-14.967-15.161-24.324-33.02-46.215-1.872-2.294-1.873-2.59-.063-15.369%201.015-7.166%201.531-13.343%201.149-13.725-.581-.581-33.013-6.243-36.197-6.32-.56-.013-2.008%207.063-3.216%2015.726-3.505%2025.129-12.883%2059.679-24.041%2088.57-3.366%208.717-4.796%2011.408-5.444%2010.25-.483-.863-1.508-1.57-2.277-1.57s-8.172%202.3-16.45%205.113c-10.679%203.627-15.052%205.56-15.052%206.654%200%201.707%204.89%2010.858%2011.769%2022.027%205.06%208.217%205.141%207.906-3.194%2012.338-3.016%201.603-5.16%201.984-9.258%201.644-15.635-1.296-18.067-15.694-15.282-90.471.57-15.293%201.447-35.005%201.948-43.805.502-8.8.59-16.323.196-16.718-1.247-1.252-42.262-3.45-43.01-2.306-.368.563-1.052%2025.324-1.52%2055.024l-.851%2054-4.276%209.123c-10.516%2022.44-22.77%2034.385-35.261%2034.372-8.8-.01-15.464-6.044-19.213-17.398-5.741-17.383-5.345-43.206%201.417-92.351%202.037-14.801%202.314-19.178%201.464-23.139-1.349-6.291-6.39-12.214-13.205-15.517-6.097-2.954-8.485-2.672-20.725%202.452-9.652%204.04-16.929%204.465-20.218%201.18-2.08-2.077-2.284-3.204-2.315-12.756-.044-13.916-.829-14.822-13.254-15.307-4.804-.187-10.304.065-12.223.561l-3.49.902-.666%2010.939c-.939%2015.394-6.72%2051.97-11.364%2071.896-.764%203.276-1.247%206.099-1.074%206.272.582.582%2027.69%205.518%2028.094%205.115.219-.22%201.847-7.586%203.616-16.371s3.483-16.287%203.806-16.672c.324-.384%205.244.05%2010.935.964l10.346%201.662-.623%203.537c-2.481%2014.093-4.831%2043.836-4.9%2062.036-.07%2018.26.163%2021.374%202.141%2028.5%207.024%2025.3%2022.58%2042.72%2042.87%2048.005%203.157.822%209.648%201.495%2014.424%201.495%2015.61%200%2026.666-4.937%2040.255-17.976l8.14-7.81%202.44%205.543c7.34%2016.677%2020.451%2024.41%2041.387%2024.41%2016.97%200%2028.839-4.24%2041.18-14.71l6.49-5.505%208.59%206.948c8.776%207.1%2019.77%2013.24%2026.915%2015.03%206.294%201.578%2022.037.532%2029.477-1.959zm-493.604-7.437c11.481-1.348%2020.98-2.582%2021.108-2.742s-.146-4.792-.61-10.292-1.14-31.913-1.502-58.695l-.657-48.695%202.393-.486c1.316-.268%2013.643-2.113%2027.393-4.101%2032.218-4.658%2046.902-7.689%2063.204-13.044%2038.272-12.572%2059.1-32.631%2067.466-64.979%202.064-7.978%202.326-11.271%202.311-29-.019-22.68-.871-27.345-7.491-41-7.027-14.494-17.266-24.582-32.49-32.01-24.44-11.927-49.949-13.244-115-5.94-35.252%203.957-102.076%2015.034-104.72%2017.358-.397.348.387%2010.074%201.742%2021.613s2.466%2021.316%202.47%2021.729c.015%201.387%204.407.72%2027.508-4.184%2012.65-2.685%2023.186-4.7%2023.413-4.478.226.222-.574%2056.993-1.778%20126.158s-2.178%20127.891-2.162%20130.504c.027%204.688.07%204.75%203.277%204.742%201.788%200%2012.644-1.11%2024.125-2.458m375.955-204.348c4.018-2.266%205.804-4.117%208.012-8.301%202.642-5.005%202.813-6.02%202.435-14.385-.439-9.71-2.486-15.297-7.637-20.842-9.169-9.868-27.428-10.135-37.022-.54-9.043%209.042-10.016%2026.79-2.08%2037.936%202.342%203.289%209.48%207.807%2014.294%209.05%206.183%201.594%2016.402.24%2021.998-2.918'%20style='fill:none;fill-rule:evenodd'/%3e%3cg%20transform='translate(-373.824%20-16.55)'%3e%3cellipse%20cx='883.322'%20cy='351.763'%20rx='332.891'%20ry='332.227'%20style='fill:%23fdcc10;fill-opacity:1;fill-rule:evenodd;stroke-width:1.36545'/%3e%3cellipse%20cx='1271.467'%20cy='-1399.972'%20rx='9.654'%20ry='14.943'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:1.07838'%20transform='matrix(.01022%20.99995%20-.73576%20.67724%200%200)'/%3e%3cpath%20d='M698.399%20510.786h377.707v37.887H698.399z'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd'/%3e%3cpath%20d='M1024.732%20333.496h10.646V347.1h-10.646z'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.851044'/%3e%3cpath%20d='M1024.732%20347.1h7.555v50.777h-7.555z'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='974.908'%20cy='238.842'%20rx='30.894'%20ry='65.439'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.962295'%20transform='scale(.99949%201)skewY(-1.836)'/%3e%3cellipse%20cx='789.328'%20cy='199.342'%20rx='30.147'%20ry='57.369'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.9591'/%3e%3cellipse%20cx='855.354'%20cy='465.346'%20rx='129.287'%20ry='123.534'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:1.58529'%20transform='matrix(.9982%20-.06006%20.07118%20.99746%200%200)'/%3e%3cellipse%20cx='770.095'%20cy='484.385'%20rx='46.392'%20ry='35.959'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.779911'/%3e%3cellipse%20cx='881.389'%20cy='266.221'%20rx='122.165'%20ry='100.678'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.577874'/%3e%3cellipse%20cx='886.202'%20cy='398.533'%20rx='44.874'%20ry='27.488'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='1002.481'%20cy='496.03'%20rx='50.178'%20ry='46.446'%20style='display:inline;fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke-width:.921829'/%3e%3cellipse%20cx='720.087'%20cy='515.926'%20rx='29.185'%20ry='38.246'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.940325'/%3e%3cellipse%20cx='1050.535'%20cy='520.144'%20rx='29.975'%20ry='38.891'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.976919'/%3e%3cellipse%20cx='888.535'%20cy='556.265'%20rx='223.45'%20ry='6.652'%20style='fill:%23ffdb4d;fill-opacity:.996078;fill-rule:evenodd'/%3e%3cellipse%20cx='1066.161'%20cy='323.616'%20rx='17.899'%20ry='17.66'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.407524'/%3e%3cellipse%20cx='884.493'%20cy='302.689'%20rx='40.783'%20ry='35.689'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.611888'/%3e%3cellipse%20cx='885.193'%20cy='316.702'%20rx='61.145'%20ry='37.618'%20style='display:inline;fill:%23fff;fill-rule:evenodd;stroke-width:.769215'/%3e%3cellipse%20cx='630.476'%20cy='630.722'%20rx='13.95'%20ry='17.914'%20style='fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.445568'%20transform='rotate(-8.83)skewY(-.047)'/%3e%3cellipse%20cx='601.085'%20cy='595.628'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.99112%20-.13297%20.17798%20.98403%200%200)'/%3e%3cellipse%20cx='615.853'%20cy='589.417'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.99112%20-.13297%20.17798%20.98403%200%200)'/%3e%3cellipse%20cx='630.595'%20cy='595.228'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.99112%20-.13297%20.17798%20.98403%200%200)'/%3e%3cpath%20d='M1846.988%202208.439h23.684v125.747h-23.684z'%20style='fill:%23fff;fill-rule:evenodd;stroke-width:.259371'%20transform='matrix(.27793%20-.9606%20.10538%20.99443%200%200)'/%3e%3cpath%20d='M763.562%20380.117h223.296v16.564H763.562z'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='761.201'%20cy='407.401'%20rx='16.724'%20ry='22.934'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='1024.667'%20cy='537.129'%20rx='12.87'%20ry='12.749'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='1118.16'%20cy='350.644'%20rx='15.168'%20ry='18.308'%20style='fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.618348'%20transform='rotate(9.215)'/%3e%3cpath%20d='M724.008%20555.45c-17.545-.455-27.728-1.095-29.098-1.828-2.6-1.392-2.24-4.252.588-4.656%201.976-.283%201.89-.569-1.709-5.706-4.155-5.932-7.358-15.012-8.227-23.318-.81-7.752%201.253-18.214%205.111-25.927%205.761-11.515%2015.241-18.93%2025.46-19.911%204.591-.442%204.742-.56%207.25-5.68%202.769-5.656%2011.813-14.774%2017.203-17.344%202.105-1.004%203.215-2.215%203.22-3.514.004-1.09-1.137-13.308-2.535-27.15-2.218-21.972-2.381-25.736-1.284-29.654.988-3.532%202.154-5.123%205.472-7.473%202.378-1.684%205.92-3.195%208.122-3.466%203.87-.475%203.928-.542%206.103-7.018%204.228-12.585%2012.053-26.941%2019.985-36.662l2.35-2.88-4.056-4.8c-5.45-6.449-9.327-12.273-12.783-19.2-8.937-17.914-10.9-35.643-6.048-54.615%201.848-7.229%201.848-7.364-.023-15.937-2.55-11.688-3.341-28.77-1.931-41.73%201.274-11.707%205.076-32.822%207.195-39.959%201.838-6.189%205.41-12.116%209.857-16.36%202.56-2.442%204.866-3.662%207.73-4.091%205.12-.766%209.382.925%2016.093%206.385%204.68%203.807%207.378%207.009%2019%2022.542%203.501%204.68%205.007%206.009%206.24%205.506%205.108-2.082%2015.892-5.512%2021.256-6.76%2011.595-2.7%2027.38-4.245%2043.419-4.253%2015.236-.008%2016.605.152%2028.32%203.298%206.77%201.818%2015.515%204.41%2019.432%205.758%203.917%201.349%207.198%202.345%207.29%202.214.092-.13%201.302-2.182%202.688-4.558%203.586-6.146%2014.585-18.14%2021.002-22.903%203.005-2.23%207.476-4.74%209.937-5.578%203.577-1.22%205.176-1.311%207.978-.458%205.37%201.635%209.601%206.36%2013.725%2015.327%202.681%205.831%204.559%2012.19%206.595%2022.337%201.566%207.802%203.12%2019.074%203.454%2025.05.515%209.21.212%2013.279-1.988%2026.705-1.427%208.712-2.405%2017.784-2.173%2020.16s1.17%207.56%202.083%2011.52c1.26%205.464%201.55%209.863%201.2%2018.24-.253%206.072-1.159%2013.632-2.012%2016.8-2.027%207.523-9.088%2021.715-13.978%2028.094l-3.874%205.053%205.835%206.947c3.21%203.82%207.802%2010.1%2010.205%2013.954%204.554%207.304%2010.716%2020.75%2012.87%2028.085%201.193%204.065%201.284%203.515%201.911-11.573.596-14.31.955-16.714%203.725-24.89%206.528-19.274%2011.796-26.992%2021.773-31.904%205.46-2.688%207.607-3.184%2015.227-3.517%209.647-.422%2014.061.523%2019.871%204.256%204.185%202.689%207.854%209.324%208.822%2015.952.514%203.519.228%205.52-1.277%208.922-3.07%206.94-5.829%2010.16-10.46%2012.208-3.358%201.485-5.383%201.763-9.208%201.26-7.236-.95-12.597-4.47-15.485-10.17-1.326-2.616-2.768-4.757-3.205-4.757-1.179%200-3.973%203.325-3.973%204.728%200%20.669-.803%202.363-1.785%203.764-.981%201.402-2.597%204.924-3.59%207.828-2.238%206.549-2.406%2020.522-.48%2039.84%201.293%2012.972%201.268%2013.698-.71%2020.846-1.128%204.073-3.312%209.473-4.854%2012-2.235%203.66-2.93%206.156-3.42%2012.274-.337%204.224-.836%209.235-1.107%2011.134-.486%203.401-.39%203.516%206.25%207.528%204.66%202.816%208.373%206.092%2012.028%2010.616%202.907%203.599%206.246%208.52%207.42%2010.936%201.797%203.698%202.828%204.626%206.512%205.859%204.962%201.66%2011.694%206.677%2015.153%2011.292%205.906%207.881%209.809%2019.612%209.846%2029.602.024%206.405-3.418%2018.892-6.644%2024.098l-2.79%204.505%203.037.295c3.634.353%204.596%203.02%201.658%204.592-1.244.666-14.324%201.402-34.858%201.96-37.819%201.03-281.658.977-321.936-.07m17.539-8.583%207.829-.004-.524-3.902c-.412-3.073-.068-4.517%201.618-6.798l2.14-2.895-1.993-18.883a9378%209378%200%200%201-3.915-37.991c-1.057-10.51-2.112-19.3-2.345-19.533s-2.42.95-4.86%202.629c-4.651%203.2-10.994%2010.96-11.035%2013.5-.013.824%201.397%202%203.163%202.64%201.752.633%204.99%202.695%207.193%204.581%203.022%202.587%204.343%204.652%205.375%208.4.753%202.735%201.634%206.7%201.958%208.812l.59%203.84-2.907-5.28c-3.958-7.19-10.51-13.055-16.607-14.865-2.693-.8-5.82-1.455-6.949-1.455s-4.363.687-7.188%201.526c-3.927%201.166-6.406%202.804-10.531%206.96-6.69%206.739-9.675%2013.788-10.37%2024.499-.836%2012.886%202.705%2023.364%2010.671%2031.573l3.774%203.888%2013.542-.62c7.448-.34%2017.065-.62%2021.37-.622zm330.844-4.455c1.96-2.976%204.102-7.188%204.76-9.36.66-2.172%201.2-8.269%201.203-13.549%200-7.855-.423-10.734-2.347-15.84-1.74-4.617-3.756-7.652-7.758-11.674-4.13-4.151-6.62-5.795-10.543-6.96-2.825-.84-6.06-1.526-7.188-1.526-4.357%200-11.779%202.987-15.644%206.296-2.223%201.902-5.709%206.34-7.747%209.861-3.596%206.214-3.737%206.806-4.764%2020.037-.897%2011.554-.845%2014.044.342%2016.32%201.604%203.074%201.802%206.827.471%208.926-.791%201.249.969%201.51%2013.215%201.96%207.77.285%2018.247.61%2023.282.72l9.155.2zm-87.633-3.855c0-1.419-1.145-1.521-10.8-.965-5.94.343-57.78.625-115.2.627-68.957.003-104.4.33-104.4.964%200%20.635%2039.04.96%20115.2.96%20106.493%200%20115.2-.12%20115.2-1.586m-222.72-5.854c-.002-7.425-8.172-96.45-9.537-103.92-.531-2.904-1.625-10.371-2.432-16.595-1.274-9.826-1.288-11.744-.104-14.578%201.836-4.393%209.978-9.125%2015.725-9.138%202.273-.005%207.973%201.071%2012.668%202.391%2010.39%202.921%2019.671%203.097%2029.76.562%206.667-1.675%2013.545-1.861%2092.883-2.518%2071.611-.592%2085.406-.918%2084-1.986-1.377-1.045-21.686-1.282-111.795-1.307-73.494-.02-111.679.305-114.82.979-3.3.707-5.673%202.006-7.937%204.342-2.903%202.995-3.268%203.992-3.598%209.829-.22%203.905%202.17%2030.41%205.995%2066.457%203.499%2032.98%206.586%2061.366%206.86%2063.082.275%201.716.912%203.12%201.416%203.12s.916-.324.916-.72m266.697-45.354c2.668-3.643%2010.522-8.588%2014.704-9.256%202.045-.327%203.72-1.092%203.72-1.699%200-4.381-15.33-18.804-18.638-17.535-.799.306-1.557%205.665-2.355%2016.628-.647%208.897-1.374%2018.552-1.616%2021.456l-.44%205.28%201.431-6.234c.788-3.429%202.225-7.317%203.194-8.64m2.18-106.497c-.57-3.672-1.037-11.415-1.037-17.206%200-9.132.388-11.715%202.918-19.46%203.197-9.783%208.993-18.662%2012.807-19.62%201.233-.31%203.834.103%205.779.915%202.69%201.124%204.002%202.533%205.486%205.887%202.578%205.829%206.513%208.26%2012.808%207.916%204.36-.239%205.021-.607%207.92-4.415%202.326-3.057%203.162-5.145%203.162-7.9%200-2.061-.715-5.535-1.59-7.72-1.3-3.25-2.48-4.387-6.48-6.25-5.867-2.732-14.061-3.032-21.607-.791-10.252%203.044-16.685%2012.133-22.295%2031.5-2.472%208.533-2.748%2010.907-2.748%2023.686%200%2013.748.077%2014.293%202.4%2017.054%201.32%201.569%202.434%203.438%202.476%204.154.056.955.204.985.556.114.264-.653.013-4.192-.556-7.864m-21.197-2.282c0-.69-1.529-5.045-3.397-9.68-4.741-11.757-9.962-20.153-20.946-33.685l-2.32-2.86-4.669%204.596c-2.567%202.527-8.51%207.184-13.204%2010.348-15.07%2010.156-29.628%2016.163-51.036%2021.06-10.951%202.506-38.223%203.572-51.45%202.012-24.508-2.89-49.824-12.537-66.94-25.506a939%20939%200%200%200-6.89-5.182c-1.547-1.138-2.19-.684-6.121%204.32-2.417%203.074-6.012%208.612-7.99%2012.306-3.29%206.143-9.711%2021.086-9.8%2022.804-.02.396%2055.043.72%20122.363.72%20100.064%200%20122.4-.228%20122.4-1.253m-100.8-14.628c5.016-.89%2013.007-2.888%2017.757-4.438%209.888-3.227%2022.961-9.59%2030.98-15.079%207.45-5.1%2016.852-13.393%2021.943-19.358%202.31-2.706%204.2-4.993%204.202-5.082%200-.089-1.836-.162-4.08-.162-3.423%200-4.082-.305-4.082-1.893%200-1.495.909-2.048%204.32-2.627%207.958-1.352%209.074-2.25%2013.24-10.664%202.139-4.32%204.177-9.01%204.53-10.422l.641-2.566-5.765%201.795c-3.171.987-7.422%201.925-9.446%202.086-3.153.25-3.722-.007-3.976-1.789-.26-1.826.384-2.218%205.28-3.211%206.662-1.352%2012.642-3.832%2015.054-6.243%201.524-1.524%201.67-2.722%201.106-9.031-.687-7.684-3.709-21.482-5.325-24.319-1.022-1.793-.316-8.667%201.19-11.598.5-.97.69-1.978.427-2.242-.264-.264-1.919.141-3.678.9-4.483%201.935-11.432%203.496-12.956%202.91-.705-.27-1.282-1.266-1.282-2.213%200-1.286%201.276-2.022%205.04-2.91%206.933-1.633%2013.063-4.62%2014.741-7.182%203.395-5.18%202.494-34.97-1.625-53.74-2.776-12.655-3.73-15.843-6.169-20.64-2.479-4.876-5.645-8.097-8.94-9.098-3.46-1.051-11.364%204.813-20.32%2015.076-5.603%206.42-8.997%2011.443-12.178%2018.021-2.426%205.016-4.565%209.298-4.754%209.515-.189.216-1.86-.423-3.715-1.422-3.79-2.041-5.053-4.612-3.302-6.722.647-.78%201.006-1.585.8-1.79-.65-.643-14.645-5.997-17.418-6.663l-2.64-.634v29.42l3.36%203.256c3.378%203.274%204.261%206.05%202.308%207.257-.578.358-3.17-1.437-5.76-3.987l-4.708-4.637-.01-12.997c-.01-7.147-.272-14.58-.593-16.517-.577-3.492-.633-3.53-6.889-4.62-3.469-.603-9.898-1.35-14.287-1.66l-7.98-.564v27.865c0%2023.225-.233%2028.058-1.398%2029.025-.77.639-1.85.882-2.4.541-.66-.407-1.002-10.285-1.002-28.882v-28.264l-3.6.018c-4.399.021-23.075%202.622-24.31%203.385-.496.307-.89%208.564-.89%2018.669v18.118l-2.64%201.862c-1.452%201.024-4.965%203.034-7.806%204.465-4.641%202.339-5.315%202.454-6.638%201.132-2.013-2.014-.704-3.394%206.476-6.826l5.808-2.776v-16.623c0-9.143-.108-16.618-.24-16.611-.832.043-12.467%203.921-15.895%205.298-3.157%201.269-3.979%202.029-3.476%203.215%201.84%204.348%201.583%205.716-1.364%207.24-1.611.833-3.293%201.514-3.736%201.514s-2.46-3.564-4.481-7.92c-4.095-8.826-13.82-22.54-20.026-28.238-2.234-2.051-5.676-4.722-7.648-5.935-4.007-2.464-6.512-2.178-10.19%201.164-2.863%202.603-6.496%209.705-7.739%2015.132-5.843%2025.502-7.277%2037.045-6.554%2052.735.431%209.362.906%2012.246%202.343%2014.24.991%201.377%204.701%203.967%208.244%205.756%204.475%202.26%206.442%203.8%206.442%205.04%200%202.367-2.878%202.317-7.68-.134-2.07-1.056-3.951-1.92-4.18-1.92s.015%201.7.543%203.779c.766%203.018.637%204.418-.642%206.96-1.652%203.281-5.303%2017.207-5.315%2020.27-.009%202.21%206.007%207.741%2010.741%209.876%202.228%201.005%203.653%202.308%203.653%203.341%200%203.625-4.782%202.717-10.744-2.039-1.949-1.554-3.785-2.827-4.08-2.827s-.536.783-.536%201.74c0%203.052%203.668%2015.874%206.143%2021.469%202.562%205.794%204.04%206.73%2012.757%208.077%204.29.662%205.826%202.437%203.663%204.232-.858.712-2.907.86-5.826.423l-4.503-.675%204.203%205.988c5.475%207.801%2018.876%2020.532%2027.806%2026.415%208.742%205.76%2021.926%2012.037%2032.077%2015.274%206.76%202.156%2017.905%204.412%2028.32%205.734%206.855.87%2032.457-.27%2041.28-1.838zm-31.686-26.296c-4.775-1.452-8.504-3.926-11.901-7.895-3.624-4.233-5.358-8.76-5.367-14.008-.005-2.697-.335-3.12-2.437-3.12-3.567%200-9.089-2.56-9.089-4.214%200-2.304%201.657-2.691%204.724-1.105%204.013%202.075%2013.968%201.895%2018.796-.34%202.112-.978%205-3.021%206.42-4.54%202.293-2.455%204.62-6.923%204.62-8.87%200-.388-1.538-1.261-3.418-1.941-1.922-.695-3.887-2.263-4.487-3.58-.882-1.936-.729-2.801.878-4.957%201.75-2.35%202.624-2.64%208.705-2.893%206.343-.262%206.885-.121%208.781%202.29%201.112%201.413%202.021%203.12%202.021%203.795%200%201.55-5.454%206.195-7.273%206.195-1.634%200-1.703.905-.346%204.498%201.452%203.842%205.55%207.933%2010.02%2010.002%204.827%202.236%2014.782%202.416%2018.795.341%202.794-1.445%204.724-1.217%204.724.557%200%201.044-7%204.762-8.966%204.762-.974%200-1.478%201.584-1.764%205.545-.57%207.874-4.579%2013.48-12.455%2017.416-4.911%202.455-7%202.945-12.248%202.877-3.48-.046-7.41-.412-8.733-.815m17.39-6.176c1.904-.91%204.872-3.034%206.595-4.718l3.133-3.062-5.156-2.307c-6.951-3.11-17.982-3.836-24.643-1.623-2.665.885-5.374%202.246-6.02%203.024-.954%201.15-.743%201.884%201.126%203.915%201.266%201.374%204.461%203.541%207.101%204.816%203.63%201.753%205.97%202.232%209.6%201.964%202.64-.194%206.359-1.099%208.264-2.01m-55.784-72.099c-5.985-4.51-12.554-6.648-18.113-5.895-2.446.331-7.548%202.194-11.339%204.14-6.038%203.099-7.198%203.398-9.36%202.413-1.357-.619-2.468-1.728-2.468-2.466%200-1.653%2010.996-7.487%2018.524-9.828%204.76-1.48%206.33-1.569%2010.88-.615%206.389%201.34%2014.435%204.908%2019.11%208.474%202.335%201.781%203.33%203.247%203.133%204.62-.21%201.472-1.057%202.063-3.167%202.211-1.995.14-4.206-.798-7.2-3.054m78.4%202.692c-1.349-1.349-.537-3.897%202-6.274%203.585-3.36%209.2-6.055%2016.867-8.098%205.464-1.456%207.079-1.534%2010.97-.533%206.69%201.723%2020.403%208.667%2020.403%2010.332%200%20.778-1.11%201.92-2.467%202.539-2.164.986-3.323.684-9.4-2.442-11.765-6.054-18.88-5.647-29.301%201.678-4.658%203.274-7.668%204.202-9.072%202.798m68.618-34.516c-5.195-8.552-14.081-19.006-21.262-25.014-6.242-5.224-6.68-5.845-6.698-9.495q-.042-9.066%207.43-20.095c4.598-6.788%207.484-8.589%209.626-6.008.814.981-.14%203.658-4.039%2011.327-2.807%205.523-5.373%2011.181-5.7%2012.574-.502%202.129-.025%202.968%202.994%205.262%206.69%205.085%2014.545%2013.614%2019.433%2021.102%202.678%204.101%204.636%208.06%204.353%208.799s-.515%201.872-.515%202.52-.54%201.887-1.2%202.755c-1.053%201.385-1.593.93-4.422-3.727m-209.226-.556c-1.646-1.646-1.396-4.454.84-9.408%201.304-2.889%205.48-7.702%2012.607-14.531l10.658-10.212-6.042-12.264c-5.704-11.576-5.944-12.335-4.285-13.548%202.344-1.714%203.799-1.619%205.797.379%204.773%204.774%2012.873%2021.189%2012.873%2026.09%200%202.042-1.178%203.649-5.04%206.869-10.413%208.684-16.394%2015.013-20.128%2021.297-2.118%203.564-4.363%206.48-4.99%206.48-.625%200-1.656-.518-2.29-1.152'%20style='fill:%238a8a8a;stroke-width:.96'/%3e%3cpath%20d='M736.598%20555.48c-19.536-.356-37.032-.982-38.88-1.392s-3.659-1.217-4.025-1.793c-.925-1.457.996-3.512%203.282-3.512%201.693%200%201.574-.374-1.08-3.395-3.876-4.416-7.2-11.127-8.775-17.725-1.835-7.68-1.44-19.456.902-26.92%202.466-7.862%206.564-14.11%2012.871-19.628%205.166-4.518%2011.382-7.212%2016.647-7.212%202.881%200%203.39-.47%205.781-5.354%202.831-5.782%2011.812-14.869%2017.265-17.47%202.105-1.003%203.215-2.214%203.22-3.513.004-1.09-1.137-13.308-2.535-27.15-2.218-21.972-2.381-25.736-1.284-29.654.988-3.532%202.154-5.123%205.472-7.473%202.378-1.684%205.92-3.195%208.122-3.466%203.87-.475%203.928-.542%206.103-7.018%204.228-12.585%2012.053-26.941%2019.985-36.662l2.35-2.88-4.056-4.8c-5.45-6.449-9.327-12.273-12.783-19.2-8.937-17.914-10.9-35.643-6.048-54.615%201.848-7.229%201.848-7.364-.023-15.937-2.55-11.688-3.341-28.77-1.931-41.73%201.274-11.707%205.076-32.822%207.195-39.959%201.838-6.189%205.41-12.116%209.857-16.36%202.56-2.442%204.866-3.662%207.73-4.091%205.12-.766%209.382.925%2016.093%206.385%204.68%203.807%207.378%207.009%2019%2022.542%203.501%204.68%205.007%206.009%206.24%205.506%205.108-2.082%2015.892-5.512%2021.256-6.76%2011.625-2.706%2027.396-4.245%2043.572-4.253%2013.394-.007%2017.423.335%2023.52%201.99%206.676%201.814%2027.684%208.144%2030.288%209.127.588.222%202.211-1.62%203.607-4.092%203.477-6.161%2014.55-18.308%2021.164-23.216%203.005-2.23%207.476-4.74%209.937-5.578%203.577-1.22%205.176-1.311%207.978-.458%205.37%201.635%209.601%206.36%2013.725%2015.327%202.681%205.831%204.559%2012.19%206.595%2022.337%201.566%207.802%203.12%2019.074%203.454%2025.05.515%209.21.212%2013.279-1.988%2026.705-1.427%208.712-2.405%2017.784-2.173%2020.16s1.17%207.56%202.083%2011.52c1.26%205.464%201.55%209.863%201.2%2018.24-.253%206.072-1.159%2013.632-2.012%2016.8-2.027%207.523-9.088%2021.715-13.978%2028.094l-3.874%205.053%205.835%206.947c3.21%203.82%207.802%2010.1%2010.205%2013.954%204.554%207.304%2010.716%2020.75%2012.87%2028.085%201.193%204.065%201.284%203.515%201.911-11.573.595-14.31.955-16.714%203.725-24.89%206.528-19.274%2011.796-26.992%2021.773-31.904%205.46-2.688%207.607-3.184%2015.227-3.517%209.647-.422%2014.061.523%2019.871%204.256%204.185%202.689%207.854%209.324%208.822%2015.952.514%203.519.228%205.52-1.277%208.922-3.07%206.94-5.829%2010.16-10.46%2012.208-3.358%201.485-5.383%201.763-9.208%201.26-7.236-.95-12.597-4.47-15.485-10.17-1.326-2.616-2.768-4.757-3.205-4.757-1.179%200-3.973%203.325-3.973%204.728%200%20.669-.803%202.363-1.785%203.764-.981%201.402-2.597%204.924-3.59%207.828-2.238%206.549-2.406%2020.522-.48%2039.84%201.293%2012.972%201.268%2013.698-.71%2020.846-1.128%204.073-3.312%209.473-4.854%2012-2.235%203.66-2.93%206.156-3.42%2012.274-.337%204.224-.836%209.235-1.107%2011.134-.486%203.401-.39%203.516%206.25%207.528%204.66%202.816%208.373%206.092%2012.028%2010.616%202.907%203.599%206.246%208.52%207.42%2010.936%201.825%203.756%202.801%204.615%206.723%205.918%205.347%201.776%2012.824%208.157%2017.07%2014.567%204.314%206.512%206.905%2015.645%207.019%2024.741.12%209.662-1.483%2016.593-5.61%2024.24-3.174%205.884-3.196%206-1.096%206.015%201.178.008%202.745.397%203.482.863%202.338%201.48.38%203.706-3.913%204.45-2.28.394-19.699%201.014-38.707%201.377-44.24.844-255.864.838-302.4-.01zm1.156-8.277%2011.537-.62-.43-3.94c-.34-3.124.012-4.406%201.7-6.193l2.126-2.254-3.828-38.33c-2.105-21.081-4.065-38.567-4.355-38.857-.96-.96-5.927%202.28-9.961%206.497-3.553%203.715-7.71%2010.222-6.896%2010.794.171.12%202.785%201.402%205.808%202.85%203.024%201.448%206.37%203.742%207.437%205.098%201.976%202.513%203.255%206.387%204.375%2013.255l.626%203.84-2.1-3.84c-3.181-5.815-9.327-11.648-14.716-13.966-3.635-1.564-6.155-1.979-10.175-1.676-2.94.222-7.057%201.226-9.152%202.231-7.537%203.617-14.098%2012.38-16.81%2022.451-1.834%206.81-1.417%2018.048.927%2025.006%202.278%206.762%206.336%2013.229%2010.217%2016.282%202.188%201.721%203.867%201.992%2012.333%201.992%205.39%200%2014.991-.279%2021.337-.62m334.254-3.54c4.394-6.386%206.982-15.182%206.982-23.73%200-4.038-.51-9.235-1.133-11.55-2.714-10.076-9.283-18.846-16.81-22.442-5.525-2.64-12.998-3.039-18.381-.983-5.331%202.036-11.13%207.055-14.957%2012.945l-2.807%204.32.647-3.36c1.377-7.153%202.488-10.402%204.382-12.809%202.168-2.756%2012.972-8.31%2016.164-8.31%201.113%200%202.023-.368%202.023-.817%200-1.325-5.286-8.23-9.267-12.105-3.339-3.25-10.689-7.828-11.342-7.066-.144.17-1.633%2016.844-3.308%2037.056s-3.289%2037.384-3.587%2038.16-.08%201.411.483%201.411%201.542%201.73%202.175%203.843c.861%202.872.88%204.44.074%206.207l-1.077%202.364%209.805.31c5.392.172%2015.94.403%2023.438.514l13.634.202zm-53.896-.602c1.568-2.51.588-4.715-2.434-5.474-3.703-.93-260.707.63-261.681%201.589-.463.455-.563%201.938-.222%203.297l.62%202.47h131.27c129.35%200%20131.289-.027%20132.447-1.882m-256.468-20.438c-.352-5.94-.88-12.58-1.174-14.757l-.533-3.957%207.05%201.22c16.55%202.863%2029.98%203.78%2054.571%203.726%2027.344-.061%2040.42-1.234%2063.158-5.668%2040.241-7.846%2073.571-23.077%2093.438-42.698%208.32-8.217%2013.29-15.502%2016.918-24.797%202.138-5.478%202.51-7.92%202.51-16.509%200-8.612-.37-11.025-2.533-16.57-3.012-7.719-7.258-14.16-10.915-16.556-2.536-1.662-7.487-1.708-113.276-1.055-60.844.375-111.886%201.044-113.428%201.486-7.057%202.024-9.81%205.305-10.822%2012.892-.454%203.403%201.091%2021.225%205.004%2057.723%203.113%2029.04%206.113%2057.552%206.665%2063.36s1.179%2011.1%201.392%2011.76c.214.66.89%201.2%201.503%201.2.816%200%20.942-2.878.472-10.8m269.262-142.784c-.565-3.643-1.028-10.93-1.028-16.193%200-8.025.463-10.986%202.868-18.345%204.4-13.464%2010.963-21.78%2016.208-20.538%203.523.835%205.729%202.985%208.334%208.121%202.15%204.242%203.74%205.393%209.805%207.104%206.383%201.802%2013.978-5.658%2013.82-13.572-.046-2.27-.99-5.908-2.1-8.082-1.51-2.958-3.125-4.443-6.424-5.902-3.645-1.612-5.833-1.877-12.659-1.53-13.545.69-19.767%204.996-26.093%2018.055-1.474%203.043-3.888%209.793-5.363%2015-2.375%208.38-2.685%2011.07-2.7%2023.441-.016%2013.855.01%2014.002%202.624%2017.114%201.452%201.726%202.705%204.078%202.784%205.225.106%201.54.25%201.385.548-.594.222-1.474-.06-5.661-.624-9.304m-21.146-2.656c-3.838-12.928-13.47-30.031-22.82-40.523l-3.817-4.284-5.663%205.078c-7.014%206.29-18.75%2014.146-28.14%2018.837-8.832%204.412-23.854%209.385-36.8%2012.182-8.35%201.804-12.896%202.132-30.002%202.167-17.61.035-21.495-.245-30.72-2.212-12.993-2.772-25.403-6.846-35.52-11.663-8.555-4.074-20.275-11.474-25.662-16.204l-3.535-3.104-4.834%206.543c-2.66%203.599-6.579%209.874-8.71%2013.945-3.733%207.13-8.619%2019-8.619%2020.94%200%20.606%2043.49.938%20122.813.938h122.813Zm-99.882-13.153c24.996-4.83%2047.305-16.232%2063.838-32.623%208.56-8.486%2016.49-19.554%2020.759-28.966%201.512-3.335%203.67-9.42%204.796-13.524%201.647-6.007%201.923-8.865%201.412-14.677-.349-3.969-1.725-11.105-3.06-15.857-2.75-9.793-2.838-10.43-1.998-14.4.336-1.584%201.02-4.824%201.52-7.2.502-2.376%201.433-5.616%202.07-7.2.639-1.584%201.364-8.712%201.613-15.84.317-9.072-.026-16.415-1.143-24.48-2.722-19.649-6.083-32.121-10.395-38.573-2.343-3.506-3.931-4.834-6.56-5.484-3.061-.756-3.982-.503-7.857%202.164-5.292%203.64-17.265%2016.635-21.491%2023.325-1.681%202.66-4.261%207.603-5.734%2010.983s-3.054%206.145-3.515%206.145-2.093-.893-3.627-1.985c-2.926-2.084-3.559-4.54-1.658-6.44.866-.867-.197-1.72-4.56-3.659-7.26-3.227-12.231-4.785-22.97-7.2-11.023-2.478-35.14-3.481-46.679-1.941-15.78%202.106-38.933%209.154-38.582%2011.746.098.726.457%202.234.799%203.352.494%201.622-.087%202.47-2.87%204.19-1.919%201.186-3.607%202-3.751%201.807-.144-.192-1.861-3.767-3.816-7.944-6.006-12.838-17.323-27.178-26.37-33.413-3.376-2.327-4.76-2.746-7.422-2.246-5.549%201.04-10.979%2010.132-12.798%2021.426-.531%203.301-1.21%206.396-1.507%206.877-1.448%202.343-4.345%2026.732-4.354%2036.66-.01%2011.708.981%2019.112%203.242%2024.201.745%201.677%201.792%204.916%202.327%207.198.8%203.413.66%204.862-.79%208.16-.968%202.206-2.714%208.091-3.879%2013.078-1.646%207.047-2%2010.788-1.589%2016.8.622%209.103%203.788%2018.884%209.462%2029.235%205.385%209.821%2010.02%2015.943%2017.812%2023.52%208.286%208.059%2015.763%2013.623%2025.612%2019.06%2013.597%207.504%2027.432%2012.096%2044.162%2014.658%2011.371%201.74%2038.342%201.233%2049.551-.933m-32.29-26.532c-5.24-1.519-12.199-6.886-14.61-11.267-1.256-2.284-2.41-6.161-2.565-8.616-.28-4.44-.304-4.47-4.72-5.596-2.44-.623-5.09-1.674-5.887-2.336-2.616-2.17.056-2.924%205.43-1.531%203.58.928%206.885%201.118%2010.6.61%202.968-.407%206.245-1.194%207.282-1.749s3.458-2.749%205.379-4.875c3.695-4.09%205.573-8.837%203.739-9.449-.586-.195-2.49-1.33-4.232-2.524-2.333-1.598-3.096-2.78-2.902-4.495.42-3.696%203.81-5.641%209.875-5.665%204.066-.016%205.84.445%207.44%201.936%203.126%202.912%202.722%206.332-1.019%208.613-1.716%201.046-3.512%202.034-3.991%202.196-1.722.582.53%205.667%204.34%209.801%202.137%202.318%205.399%204.714%207.248%205.324%203.4%201.122%2015.173.794%2019.283-.536%201.606-.52%202.16-.321%202.16.775%200%20.917-1.815%202.078-4.8%203.07-4.731%201.57-4.8%201.65-4.82%205.597-.063%2011.824-12.127%2021.946-25.834%2021.676-2.412-.048-5.74-.48-7.396-.96m17.486-6.044c2.682-1.248%205.837-3.492%207.013-4.987l2.136-2.716-4.259-2.165c-2.342-1.19-6.794-2.57-9.892-3.065-8.213-1.313-18.532.638-21.353%204.036-1.028%201.24-.94%201.898.52%203.86%205.228%207.026%2016.742%209.272%2025.835%205.037m-55.756-72.18c-2.64-1.829-7.087-4.182-9.883-5.23-4.385-1.644-5.705-1.756-9.6-.815-2.484.6-7.362%202.562-10.84%204.36-5.39%202.786-6.71%203.12-8.957%202.265-1.45-.552-2.47-1.54-2.267-2.197.566-1.832%2015.006-9.127%2020.612-10.412%203.947-.905%205.945-.884%209.6.1%209.84%202.649%2021.415%209.651%2021.415%2012.955%200%201.255-2.11%202.447-4.158%202.35-.617-.029-3.282-1.548-5.922-3.376m77.92%202.79c-.352-.353-.64-1.41-.64-2.352%200-3.357%2011.615-10.108%2021.2-12.32%204.625-1.069%206.071-1.024%2010.56.325%206.227%201.872%2018.38%208.263%2018.904%209.94.205.657-.82%201.648-2.278%202.202-2.258.859-3.496.558-8.352-2.03-3.135-1.672-7.918-3.629-10.627-4.35-4.276-1.136-5.52-1.113-9.426.175-2.475.816-7.133%203.186-10.352%205.266-5.76%203.723-7.723%204.41-8.989%203.143m66.789-37.5c-5.805-8.817-16.594-20.78-22.317-24.746l-4.07-2.82.56-5.988c.307-3.293%201.463-7.76%202.568-9.925%202.73-5.351%208.386-14.117%209.588-14.86%201.308-.808%204.802.351%204.802%201.594%200%20.543-2.376%205.733-5.28%2011.534-2.904%205.8-5.28%2011.557-5.28%2012.79%200%201.492%201.045%202.895%203.12%204.19%204.704%202.932%2014.357%2013.222%2019.397%2020.677%203.724%205.506%204.405%207.186%204.034%209.94-.246%201.822-.843%203.71-1.328%204.195-.535.535-2.811-2.05-5.794-6.58m-207.76%201.189c-1.888-4.146%201.402-9.475%2013.462-21.8l10.989-11.23-2.15-5.09c-1.181-2.8-3.82-8.17-5.861-11.935-3.541-6.53-3.633-6.918-1.995-8.4.945-.855%202.204-1.555%202.798-1.555%203.126%200%2014.454%2019.982%2015.234%2026.87.365%203.22-.004%203.691-8.274%2010.57-9.333%207.763-14.124%2012.966-16.805%2018.253-1.963%203.869-4.28%206.707-5.476%206.707-.458%200-1.322-1.076-1.921-2.39'%20style='fill:%23474747;stroke-width:.96'/%3e%3cellipse%20cx='885.983'%20cy='326.113'%20rx='19.82'%20ry='9.5'%20style='fill:%23d67e94;fill-opacity:1;fill-rule:evenodd'/%3e%3cpath%20d='M768.245%20553.884c-34.584-.425-65.472-1.106-68.64-1.514-4.874-.626-5.76-1.036-5.76-2.66%200-1.246.74-2.025%202.107-2.22%202.031-.289%201.986-.46-1.239-4.685-6.033-7.904-9-17.173-9.017-28.173-.02-13.202%204.312-24.407%2012.723-32.903%205.169-5.22%2011.028-8.174%2017.803-8.976%204.395-.52%204.716-.764%206.69-5.066%202.957-6.446%208.647-12.5%2015.396-16.381%205.638-3.243%205.82-3.47%205.39-6.716-.246-1.848-1.318-12.216-2.382-23.04s-2.18-20.483-2.48-21.464c-.301-.981-.253-4.137.107-7.013.49-3.927%201.407-6.088%203.682-8.679%203.357-3.823%207.78-6.044%2012.035-6.044%202.537%200%202.902-.423%203.93-4.56%201.798-7.234%2011.9-26.943%2017.748-34.623%202.94-3.863%205.347-7.245%205.347-7.516s-2.112-2.943-4.693-5.937c-8.903-10.33-14.962-21.968-18.367-35.282-2.657-10.386-2.608-26.228.113-36.489%201.107-4.176%201.977-8.025%201.934-8.553s-.96-4.848-2.036-9.6c-1.49-6.578-1.97-12.19-2.018-23.52-.064-15.45.788-24.187%204.027-41.28%203.402-17.95%205.9-24.071%2012.738-31.208%203.863-4.031%204.459-4.312%209.145-4.312%202.756%200%206.394.708%208.084%201.573%206.148%203.147%2012.488%209.508%2021.501%2021.573%205.062%206.775%209.466%2012.173%209.788%2011.994%205.254-2.927%2017.624-6.818%2027.464-8.64%2015.684-2.904%2025.987-3.717%2041.28-3.255%2016.281.49%2018.337.898%2040.801%208.088%205.545%201.775%2010.364%203.227%2010.71%203.227.344%200%201.797-1.998%203.227-4.439%203.675-6.27%2014.818-18.661%2020.597-22.903%202.686-1.972%206.98-4.382%209.542-5.355%203.684-1.4%205.379-1.571%208.1-.82%201.894.523%204.823%202.112%206.509%203.53%204.173%203.512%2010.736%2017.946%2012.78%2028.11.898%204.464%202.04%209.957%202.54%2012.206.498%202.249%201.35%209.62%201.891%2016.379.916%2011.417.807%2013.367-1.533%2027.47-2.758%2016.626-2.754%2021.395.03%2036.542%201.531%208.325%201.622%2010.875.686%2019.2-1.642%2014.604-6.52%2027.296-15.195%2039.532-2.313%203.263-4.205%206.223-4.205%206.579s2.001%202.87%204.448%205.588c9.456%2010.504%2018.083%2025.465%2022.856%2039.638%202.841%208.434%204.557%209.166%203.803%201.62-.864-8.645%201.09-26.744%203.767-34.907%204.026-12.274%208.325-20.196%2014.054-25.895%207.096-7.06%2012.731-9.115%2024.992-9.115%208.1%200%209.748.308%2014.736%202.758%205.074%202.491%205.885%203.326%208.4%208.64%203.888%208.22%203.796%2013.877-.336%2020.772-4.2%207.006-8.19%209.59-14.813%209.59-8.893%200-15.494-3.917-18.286-10.85-1.123-2.787-1.938-3.582-3.447-3.36-2.245.33-6.061%207.238-9.362%2016.947-1.87%205.5-2.013%207.332-1.454%2018.72%201.79%2036.46%201.788%2036.09.093%2042.233-.897%203.25-2.926%207.953-4.509%2010.45-2.436%203.844-3.007%205.98-3.716%2013.92-1.322%2014.795-1.625%2013.736%205.022%2017.54%206.906%203.952%2016.748%2014.699%2019.95%2021.783%201.89%204.181%202.634%204.879%206.236%205.842%208.443%202.258%2017.35%2011.826%2021.845%2023.465%202.52%206.524%203.388%2020.66%201.704%2027.75-1.284%205.409-5.388%2014.907-6.825%2015.795-1.648%201.018-.795%202.202%201.801%202.501%201.9.219%202.64.843%202.64%202.224%200%201.607-.861%202.028-5.28%202.584-7.178.903-148.756%202.654-201.6%202.493-23.496-.071-71.016-.478-105.6-.903m-18.564-8.31c.086-.101-.321-1.45-.905-2.996-1.076-2.852-.552-4.807%202.39-8.906.942-1.313.454-9.134-2.457-39.36-1.998-20.747-3.812-38.277-4.031-38.956-.316-.977-.977-.934-3.181.205-1.53.792-4.203%202.634-5.939%204.095-3.267%202.75-8.593%2010.395-8.593%2012.336%200%20.608%201.832%201.928%204.07%202.932%206.465%202.899%2010.133%206.696%2011.76%2012.17%202.17%207.311%201.77%208.23-1.46%203.351-3.222-4.863-7.834-8.747-12.9-10.864-1.83-.765-5.827-1.387-8.88-1.382-10.378.018-19.737%206.638-24.785%2017.534-1.236%202.668-2.78%207.827-3.43%2011.464-1.473%208.245-.243%2017.398%203.414%2025.407%202.545%205.573%208.209%2012.412%2011.262%2013.6%201.352.525%2043.196-.078%2043.665-.63m320.74-1.387c3.239-3.447%207.058-12.769%208.167-19.933.762-4.923.721-8.286-.16-13.217-3.15-17.632-14.186-28.974-28.214-28.998-9.142-.015-16.839%204.307-21.91%2012.305-1.529%202.41-2.78%203.728-2.78%202.928%200-3.66%203.086-11.235%205.498-13.495%203.112-2.917%209.995-6.54%2012.464-6.562.945-.008%202.324-.398%203.064-.867%201.109-.701.91-1.597-1.132-5.08-3.016-5.148-9.685-11.44-14.998-14.15-3.655-1.864-3.94-1.886-3.99-.308-.03.935-1.481%2018.332-3.225%2038.66-2.718%2031.67-2.98%2037.181-1.838%2038.507%201.54%201.786%201.991%206.154.949%209.189-.632%201.838-.33%202.144%202.444%202.486%201.74.215%2012.27.46%2023.397.544%2019.845.151%2020.272.112%2022.265-2.009m-53.372-1.346c2.02-1.828%202.267-4.236.603-5.9-.885-.885-30.902-1.125-129.84-1.038-70.778.063-129.983.39-131.567.727-2.042.434-2.972%201.255-3.194%202.819-.751%205.285-8.814%204.98%20132.115%204.98%20119.738%200%20130.267-.126%20131.883-1.588m-3.378-11.198c.488-.487%209.966-112.94%2010.576-125.481.487-10.006.325-12.533-.965-15.028-.853-1.65-3.181-4.012-5.174-5.251l-3.624-2.253-123.327-.261c-75.602-.16-125.916.097-130.018.666-10.167%201.409-15.017%205.95-15.67%2014.675-.21%202.794%202.04%2027.328%205%2054.52s6.022%2055.704%206.803%2063.36%201.57%2014.352%201.754%2014.88c.22.635%2043.307.874%20127.35.706%2069.86-.14%20127.142-.38%20127.295-.533m18.54-135.533c0-3.168-.64-10.512-1.417-16.32-.778-5.808-1.417-13.623-1.422-17.367-.014-11.947%205.034-27.329%2011.55-35.193%202.323-2.804%203.67-3.6%206.089-3.6%201.709%200%203.924.598%204.923%201.328s2.922%203.431%204.273%206c3.041%205.788%207.378%208.317%2013.237%207.722%202.244-.228%204.753-.973%205.575-1.656s2.599-3.122%203.946-5.422c2.034-3.47%202.343-4.898%201.817-8.406-1.22-8.13-6.546-13.05-15.703-14.503-4.87-.773-14.544.943-19.462%203.451-7.607%203.881-13.707%2014.34-18.611%2031.914-2.402%208.608-2.593%2010.529-2.29%2023.098.318%2013.257.414%2013.812%202.91%2016.777%202.903%203.447%204.162%209.449%203.4%2016.207-.305%202.702-.171%203.878.347%203.06.463-.732.84-3.922.838-7.09m-22.661-20.4c-.358-1.452-2.183-6.312-4.054-10.8-3.357-8.05-13.306-23.768-19.716-31.148l-3.29-3.787-6.123%205.707c-10.299%209.6-24.712%2018.28-39.852%2024.002-15.643%205.91-38.217%2010.026-54.99%2010.026-11.044%200-28.13-2.26-39.495-5.223-16.877-4.4-34.198-12.472-46.035-21.453-3.28-2.488-6.776-5.127-7.77-5.863-2.09-1.55-1.898-1.737-9.317%209.019-5.589%208.102-9.573%2015.87-12.923%2025.2l-2.5%206.96h246.716zm-97.22-13.53c11.897-2.769%2021.803-6.27%2031.372-11.09%2017.052-8.59%2032.973-22.126%2042.465-36.104%205.178-7.625%2010.92-19.884%2012.88-27.495.834-3.244%201.518-8.54%201.518-11.77%200-5.623-2.757-20.339-4.977-26.574-.868-2.438-.583-4.907%201.61-13.92%203.535-14.524%204.27-32.537%201.984-48.64-.88-6.202-2.25-13.87-3.046-17.037-.796-3.168-1.874-7.488-2.396-9.6-2.306-9.331-8.123-16.8-13.085-16.8-3.507%200-10.978%205.068-15.291%2010.374-2.014%202.478-4.53%205.395-5.591%206.483-3.937%204.036-7.08%208.846-11.401%2017.45-3.275%206.52-4.817%208.69-5.883%208.282-.794-.305-1.444-.89-1.444-1.3s-.864-.971-1.92-1.247c-2.124-.555-2.561-3.498-.784-5.274.624-.625.948-1.291.72-1.481-.23-.19-4.304-1.891-9.056-3.78-4.752-1.89-13.176-4.441-18.72-5.671-8.75-1.94-12.678-2.236-29.76-2.236-15.55%200-21.292.366-27.36%201.742-9.327%202.116-15.243%203.891-23.716%207.117l-6.435%202.45%201.388%202.684c1.227%202.372%201.213%202.859-.12%204.192-2.453%202.453-5.535%203.841-5.926%202.67-1.156-3.468-8.32-17.215-10.519-20.186-11.417-15.424-19.98-23.23-25.483-23.23-1.365%200-3.757%201.074-5.315%202.385-3.509%202.952-7.57%2011.071-8.41%2016.816-.347%202.376-1.214%206.48-1.925%209.12-.71%202.64-2.013%209.906-2.895%2016.146-1.149%208.134-1.47%2015.2-1.137%2024.96.444%2012.988%201.46%2018.36%205.485%2028.974.458%201.21.043%203.52-1.123%206.24-3.023%207.057-5.536%2019.19-5.543%2026.764-.009%209.234%202.927%2019.812%208.536%2030.754%202.43%204.741%207.01%2011.93%2010.178%2015.974%206.44%208.222%2016.789%2017.54%2026.86%2024.18%2012.381%208.165%2029.016%2014.869%2044.472%2017.922%2011.284%202.23%2012.755%202.319%2032.828%201.986%2014.476-.24%2020.589-.746%2026.965-2.23m-34.818-26.45c-5.176-1.393-10.163-4.916-13.905-9.822-1.961-2.57-2.714-4.819-3.017-9.006-.398-5.505-.448-5.588-3.74-6.205-4.729-.887-7.965-2.521-7.965-4.021%200-1.64.891-1.618%205.066.127%205.159%202.155%2014.97.956%2020.412-2.495%204.593-2.913%208.112-7.71%208.118-11.064.003-1.418-1.126-2.65-3.596-3.928-4.402-2.278-5.12-5.255-2.056-8.518%201.93-2.053%202.833-2.278%207.765-1.938%205.893.406%207.989%201.483%208.984%204.618.728%202.294-2.847%206.552-5.5%206.552-1.288%200-1.753.727-1.753%202.738%200%203.823%203.58%208.724%208.658%2011.853%205.488%203.383%2014.625%204.304%2020.272%202.045%202.084-.834%204.03-1.275%204.325-.98%201.117%201.116-.864%202.598-5.14%203.845l-4.43%201.292-.17%204.86c-.34%209.658-8.124%2018.066-18.857%2020.368-5.867%201.258-7.779%201.212-13.47-.32m17.207-5.352c4.221-1.916%208.886-5.929%208.886-7.645%200-1.64-6.935-4.643-13.454-5.826-3.382-.613-8.095-.823-10.472-.466-5.846.876-11.459%203.222-12.538%205.239-.684%201.276-.18%202.344%202.188%204.634%201.691%201.636%204.588%203.628%206.436%204.428%204.78%202.067%2013.988%201.89%2018.954-.364m-3.114-46.095c0-1.709-3.167-2.51-4.53-1.147-.532.532-.662%201.461-.288%202.065.954%201.544%204.818.808%204.818-.918m-52.767-26.912c-7.495-4.98-13.8-7.058-18.828-6.209-2.137.362-6.883%202.156-10.546%203.99-6.884%203.443-10.745%203.848-11.253%201.18-.2-1.054%201.764-2.616%206.23-4.954%203.588-1.879%208.973-4.123%2011.967-4.988%205.03-1.452%205.902-1.453%2011.452-.015%207.242%201.876%2013.611%205.04%2018.145%209.012%203.256%202.854%203.302%202.989%201.496%204.394-1.025.797-2.105%201.437-2.4%201.422s-3.113-1.74-6.263-3.832m78.308%202.54c-.602-.725-.857-1.936-.567-2.692.854-2.227%2011.085-8.383%2016.676-10.034%207.983-2.358%2014.45-1.453%2024.35%203.404%204.62%202.268%208.4%204.717%208.4%205.443%200%20.727-1.058%201.587-2.35%201.911-1.634.41-4.417-.444-9.137-2.805-3.732-1.868-8.627-3.671-10.877-4.009-4.967-.745-11.398%201.474-19.112%206.594-2.906%201.929-5.51%203.507-5.786%203.507-.277%200-.996-.593-1.597-1.318m66.215-37.329c-2.948-4.482-9.59-12.267-15.322-17.959l-10.118-10.046.134-5.47c.074-3.044.867-6.89%201.787-8.673%203.25-6.296%209.304-15.1%2010.77-15.662.822-.315%202.09.023%202.818.752%201.126%201.126.613%202.678-3.424%2010.355-2.61%204.967-5.177%2010.595-5.702%2012.506l-.956%203.475%207.088%205.914c6.784%205.662%2015.736%2016.425%2018.936%2022.767%201.179%202.338%201.298%203.754.546%206.48-.53%201.919-1.051%203.485-1.159%203.481-.107-.004-2.536-3.568-5.398-7.92m-206.871%201.953c-1.592-2.43-1.562-2.706.822-7.746%201.818-3.842%205.138-7.738%2012.54-14.713%205.536-5.217%2010.068-10.182%2010.07-11.032.003-1.693-6.59-16.068-9.312-20.304-1.28-1.992-1.45-3.052-.686-4.263%201.686-2.673%203.171-2.527%206.09.597%203.585%203.838%2011.734%2020.244%2011.924%2024.006.128%202.533-1.054%203.958-9.392%2011.324-5.722%205.054-11.192%2010.923-13.67%2014.666-7.37%2011.135-6.493%2010.355-8.386%207.465'%20style='fill:%23040403;stroke-width:.96'/%3e%3cellipse%20cx='894.927'%20cy='331.661'%20rx='.305'%20ry='.191'%20style='fill:%23c8c8c8;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='886.078'%20cy='370.851'%20rx='4.774'%20ry='.163'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='894.548'%20cy='404.879'%20rx='2.8'%20ry='4.271'%20style='fill:%23fff;fill-opacity:1;fill-rule:evenodd'/%3e%3cellipse%20cx='1145.216'%20cy='-344.084'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.73853%20.67422%20-.63988%20.76848%200%200)'/%3e%3cellipse%20cx='1161.324'%20cy='60.068'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.92465%20.38081%20-.33829%20.94104%200%200)'/%3e%3cellipse%20cx='1141.388'%20cy='122.194'%20rx='5.016'%20ry='5.572'%20style='display:inline;fill:%23d67e94;fill-opacity:1;fill-rule:evenodd;stroke-width:.149008'%20transform='matrix(.94198%20.33566%20-.2924%20.9563%200%200)'/%3e%3cellipse%20cx='818.868'%20cy='559.334'%20rx='2.166'%20ry='.747'%20style='fill:%23ffdb4d;fill-opacity:.996078;fill-rule:evenodd'/%3e%3cellipse%20cx='885.732'%20cy='370.645'%20rx='5.565'%20ry='.59'%20style='fill:%23000;fill-opacity:.996078;fill-rule:evenodd'/%3e%3cpath%20d='M866.308%20513.459c.286-3.163.778-14.75%201.092-25.75.626-21.883%202.814-56.19%204.603-72.16l1.137-10.16%2011.123-2.06c27.089-5.018%2031.22-5.495%2048.123-5.558%2013.803-.05%2018.12.284%2022.958%201.776%2023.23%207.168%2033.385%2022.843%2032.318%2049.886-.402%2010.184-.634%2011.15-4.61%2019.173-10.298%2020.783-35.818%2036.819-69.186%2043.475-9.613%201.918-43.738%207.114-46.78%207.124-.975.003-1.17-1.427-.778-5.746'%20style='fill:none;fill-rule:evenodd'/%3e%3cpath%20d='M576.847%20433.52c-33.704-.235-99.078%206.542-160.356%2016.937-23.08%203.915-36.666%206.601-37.525%207.418-.468.445%205.022%2046.53%205.601%2047.023.188.16%2013.49-2.372%2029.563-5.629%2016.072-3.256%2029.426-5.727%2029.676-5.49.249.237-.672%2060.911-2.047%20134.832s-2.491%20139.574-2.479%20145.895l.022%2011.494%203.216-.588c1.77-.323%2013.897-1.702%2026.948-3.064l23.728-2.477-.642-4.533c-1.421-10.022-2.926-56.672-2.938-91.041l-.012-36.44%202.633-.01c4.417-.016%2063.011-8.66%2075.912-11.199%2064.141-12.62%2097.624-37.064%20108.858-79.469%202.325-8.775%202.656-12.833%202.67-32.822l.015-22.808-3.855-10.51c-5.024-13.697-10.579-22.316-20.113-31.213-16.02-14.948-36.468-22.874-66.475-25.768-3.418-.33-7.586-.505-12.4-.539zm636.505%2035.667c-.13-.098-6.819%201.26-14.861%203.016s-19.41%204.239-25.26%205.518l-10.635%202.326-.761%2026.328c-.419%2014.48-1.108%2033.963-1.536%2043.295l-.777%2016.967h-49.62l-5.85%2015.299-5.85%2015.298%2029.664.297%2029.666.297-.736%2043.65c-1.442%2085.626%204.027%20112.955%2027.015%20135.01%2014.122%2013.55%2029.08%2018.88%2050.358%2017.946%2012.985-.571%2021.458-2.922%2032.003-8.877%209.584-5.412%2022.007-17.961%2029.965-30.27%206.415-9.92%207.08-10.596%208.075-8.217.596%201.426%203.184%206.841%205.752%2012.033%207.966%2016.11%2021.37%2026.758%2038.529%2030.606%209.198%202.062%2014.567%202.065%2024.728.018%2016.42-3.309%2033.579-14.094%2041.916-26.346l3.858-5.666.375%2012.662c.729%2024.579-2.982%20103.33-7.438%20157.861-2.161%2026.448-7.37%2078.352-8.304%2082.762-.862%204.062-1.95%204.325%2028.79-6.904%2028.175-10.292%2024.694-5.323%2027.409-39.143%205.007-62.374%208.853-206.478%208.873-332.47l.01-61.547-9.065.742c-4.986.409-16.171%201.32-24.857%202.023l-15.793%201.281.281%207.788c.155%204.283%201.116%2021.807%202.135%2038.94%201.019%2017.135%201.681%2040.667%201.473%2052.294l-.38%2021.14-5.565%2011.016c-16.58%2032.813-36.9%2049.854-52.655%2044.156-10.576-3.824-18.196-20.11-22.168-47.382-3.093-21.241-1.586-75.265%203.211-115.092.917-7.614%201.471-14.03%201.23-14.26-.429-.408-46.636-3.466-47.13-3.12-.524.37-3.907%2020.662-5.76%2034.56-1.345%2010.085-2.021%2025.13-2.234%2049.7l-.307%2035.237-3.781%209.824c-8.142%2021.155-18.597%2038.09-29.633%2047.994-8.266%207.419-15.621%2010.672-24.127%2010.672-14.265%200-24.223-10.575-28.883-30.674-1.518-6.546-1.877-14.732-1.826-41.53.062-32.434%202.157-85.708%203.45-87.696.365-.563%2012.02-.64%2027.22-.18l26.582.807%204.275-16.244c2.352-8.934%204.276-16.576%204.276-16.983s-13.686-.49-30.414-.183l-30.414.556.01-4.57c.01-2.514%201.298-24.33%202.87-48.479%201.574-24.148%202.753-43.987%202.622-44.086zm-637.755%204.483c39.818%201.266%2060.273%2020.246%2060.214%2056.125-.027%2016.786-5.486%2028.664-19.287%2041.97-17.871%2017.231-43.408%2028.121-79.402%2033.86-20.329%203.241-46.332%206.386-46.443%205.617-.769-5.3%201.502-60.645%203.61-87.998%202.315-30.021%203.72-39.97%205.731-40.568%205.452-1.622%2044.467-7.38%2057.33-8.461q9.714-.817%2018.247-.545m318.484%2038.47c-.188.072-.463.204-.676.292q.164.016.328.008c.117-.102.23-.201.348-.3zm-27.774%201.319c-.131.247-.286.418-.414.676q.205-.212.41-.42c-.002-.086.006-.17.005-.256m23.239%209.69a3%203%200%200%200-.317.02c-.126.045-.249.096-.375.14-.223.122-.468.253-.767.4.56-.144%201.224-.341%201.469-.465zm-180.018%2032.554c-2.19.021-4.52.183-6.92.49l-7.709.987-.836%2011.908c-1.009%2014.379-5.542%2042.777-10.76%2067.404-2.11%209.966-3.499%2018.32-3.085%2018.563%201.597.938%2028.273%205.28%2028.882%204.7.355-.336%202.447-8.751%204.65-18.7s4.128-18.188%204.276-18.307c.436-.351%2026.876%203.871%2027.408%204.377.267.254-.31%205.649-1.28%2011.988-3.335%2021.764-5.685%2054.309-5.05%2069.94.697%2017.141%203.933%2029.745%2010.85%2042.265%2014.65%2026.518%2043.54%2040.485%2070.12%2033.9%2013.125-3.251%2021.385-8.058%2033.624-19.564%206.273-5.897%2011.406-10.155%2011.406-9.463.002%202.18%206.81%2015.054%2010.201%2019.293%208.524%2010.65%2026.003%2016.739%2044.739%2015.584%2016.987-1.046%2031.645-7.116%2044.797-18.549l6.162-5.357%204.662%203.856c13.114%2010.844%2025.058%2018.005%2035.076%2021.03%205.889%201.78%2020.804%201.949%2028.756.327%2029.118-5.94%2055.819-28.938%2063.691-54.86%203.34-10.995%202.007-28.213-3.351-43.288-8.163-22.968-25.68-51.247-47.051-75.961l-10.274-11.881%202.133-14.326c1.173-7.88%201.889-14.558%201.592-14.84-.932-.886-39.456-6.63-40.135-5.985-.355.338-1.18%204.824-1.836%209.97-3.829%2030.07-18.986%2082.596-32.582%20112.91l-3.441%207.67-1.479-3.085c-.812-1.696-2.04-2.888-2.73-2.648s-8.756%202.803-17.924%205.697-16.67%205.743-16.67%206.328c0%201.644%204.335%209.367%2011.983%2021.35%206.844%2010.724%206.93%2010.956%204.804%2013.191-6.608%206.95-21.1%209.277-28.119%204.516-6.551-4.445-9.646-12.426-11.142-28.735-1.349-14.695.07-78.462%202.644-118.875.622-9.756.731-18.074.244-18.484-.875-.736-47.058-3.69-47.703-3.05-.183.181-.698%2027.367-1.144%2060.411l-.813%2060.082-5.596%2011.272c-7.092%2014.287-13.317%2023.002-21.527%2030.139-15.88%2013.804-33.219%2011.545-42.373-5.52-5.534-10.315-6.8-18.378-6.773-43.123.025-23.417.583-29.762%205.828-66.248%203.394-23.612%203.085-27.439-2.74-34.024-4.28-4.837-12.886-9.876-16.868-9.876-1.79%200-8.478%202.001-14.861%204.449-23.741%209.104-32.05%204.593-29.992-16.287.702-7.124.529-8.265-1.557-10.248-2.305-2.193-7.635-3.377-14.207-3.313m318.228%2097.344c.857-.938%2010.588%2010.005%2017.153%2019.289%205.915%208.364%2011.881%2020.573%2014.513%2029.7%203.154%2010.93%202.626%2024.265-1.355%2034.241-3.645%209.135-12.527%2017.563-21.045%2019.97-9.291%202.623-14.947%202.243-22.908-1.54-6-2.851-21.506-15.764-21.506-17.908%200-.394%202.573-5.923%205.717-12.285%206.83-13.823%2016.684-37.493%2023.574-56.63%202.755-7.649%205.39-14.325%205.857-14.837'%20style='fill:%23000;stroke-width:1.14084'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",lw={name:"ErrorPage",data(){return{id:null}},mounted(){this.id=this.$route.params.id}},aw={class:"error-container"},ow={class:"error-page"},nw={class:"error-content-section"},iw={class:"error-content"},sw={class:"error-message"},rw={key:0,class:"error-title"},cw={class:"error-description"};function dw(t,l,a,i,o,n){return e.openBlock(),e.createElementBlock("div",aw,[e.createElementVNode("div",ow,[l[0]||(l[0]=e.createElementVNode("div",{class:"error-logo-section"},[e.createElementVNode("img",{src:tw,alt:"Pristy logo",class:"pristy-logo"})],-1)),e.createElementVNode("div",nw,[e.createElementVNode("div",iw,[e.createElementVNode("div",sw,[o.id?(e.openBlock(),e.createElementBlock("h1",rw,e.toDisplayString(t.$t("error",{error:o.id})),1)):e.createCommentVNode("",!0),e.createElementVNode("span",cw,e.toDisplayString(t.$t(`errors.${o.id}`)),1)])])])])])}const mw=fe(lw,[["render",dw],["__scopeId","data-v-dcedb536"]]),bw={install(t){t.component("PaginatorComponent",zn),t.component("PDFComponent",Mn),t.component("PristyIcon",Wa),t.component("TreeExplorer",aa),t.component("CopyOrMovePopup",kn),t.component("EllipsisBreadcrumb",M2),t.component("BreadCrumbAlfresco",X2),t.component("ComplexBreadcrumb",In),t.component("ContentTableView",Gn),t.component("ContentListView",k2),t.component("ContentCompactTableView",Pa),t.component("ContentGridView",Dn),t.component("DynamicContentView",C2),t.component("ContentFiltersHeader",T2),t.component("ImageViewer",Un),t.component("VideoPlayer",Jn),t.component("AudioPlayer",En),t.component("PreviewPanel",v2),t.component("CreateWorkflowPopup",Vn),t.component("ImportNewVersionPopup",vn),t.component("ShareLinkPopup",xn),t.component("MemberListPopup",Rn),t.component("SendMailPopup",Sn),t.component("LayoutSelector",R2),t.component("ContentToolbar",S2),t.component("SelectionBar",x2),t.component("HelpKeyMessage",U2),t.component("SelectionStatus",F2),t.component("MemberList",Fn),t.component("ActionMenu",oa),t.component("CustomToastContent",J2),t.component("UploadTargetInfo",B2),t.component("FolderUpload",ei),t.component("ImportPopupWithWorker",H2),t.component("UploadStatus",E2),t.component("AddPairInConfigDialog",Q2),t.component("ConfigDatatable",P2),t.component("ConfigItemEditor",ti),t.component("ConfigSplitView",_2),t.component("ConfigUpload",K2),t.component("ListVersionConfig",$2),t.component("AddCriterionPopup",Lo),t.component("AdvancedSearchPanel",em),t.component("AdvancedViewPanel",tm),t.component("ExactSearch",ai),t.component("FavoriteViewMenu",lm),t.component("UserViewsFavoritesPanel",vo),t.component("SaveViewPopup",Fo),t.component("ViewResultsPanel",am),t.component("PdfToolsComponent",om),t.component("CodeMirrorEditor",dm),t.component("DiffViewerDialog",oi),t.component("ArrayEditor",Go),t.component("ConfigHealthBanner",bm),t.component("ErrorComponent",ii),t.component("WorkspaceCard",di),t.component("WorkspaceList",ym),t.component("AppLayout",Cm),t.component("AppSidebar",gi),t.component("AppTopbar",fi),t.component("AppSubmenu",yi),t.component("AppFooter",Tm),t.component("AppMobileLayout",Wi),t.component("SidebarProfileSection",Zi),t.component("ChatPanel",hm),t.component("ChatMessage",si),t.component("ChatInput",ri),t.component("ChatRoomList",ci)}};var Qo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Po(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Yi={exports:{}};var Gm;function uw(){return Gm||(Gm=1,(function(t,l){(function(a){t.exports=a()})(function(){return(function a(i,o,n){function s(m,h){if(!o[m]){if(!i[m]){var b=typeof Po=="function"&&Po;if(!h&&b)return b(m,!0);if(r)return r(m,!0);var p=new Error("Cannot find module '"+m+"'");throw p.code="MODULE_NOT_FOUND",p}var d=o[m]={exports:{}};i[m][0].call(d.exports,function(W){var Z=i[m][1][W];return s(Z||W)},d,d.exports,a,i,o,n)}return o[m].exports}for(var r=typeof Po=="function"&&Po,c=0;c<n.length;c++)s(n[c]);return s})({1:[function(a,i,o){var n=a("./utils"),s=a("./support"),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";o.encode=function(c){for(var m,h,b,p,d,W,Z,N=[],y=0,A=c.length,f=A,Y=n.getTypeOf(c)!=="string";y<c.length;)f=A-y,b=Y?(m=c[y++],h=y<A?c[y++]:0,y<A?c[y++]:0):(m=c.charCodeAt(y++),h=y<A?c.charCodeAt(y++):0,y<A?c.charCodeAt(y++):0),p=m>>2,d=(3&m)<<4|h>>4,W=1<f?(15&h)<<2|b>>6:64,Z=2<f?63&b:64,N.push(r.charAt(p)+r.charAt(d)+r.charAt(W)+r.charAt(Z));return N.join("")},o.decode=function(c){var m,h,b,p,d,W,Z=0,N=0,y="data:";if(c.substr(0,y.length)===y)throw new Error("Invalid base64 input, it looks like a data url.");var A,f=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===r.charAt(64)&&f--,c.charAt(c.length-2)===r.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=s.uint8array?new Uint8Array(0|f):new Array(0|f);Z<c.length;)m=r.indexOf(c.charAt(Z++))<<2|(p=r.indexOf(c.charAt(Z++)))>>4,h=(15&p)<<4|(d=r.indexOf(c.charAt(Z++)))>>2,b=(3&d)<<6|(W=r.indexOf(c.charAt(Z++))),A[N++]=m,d!==64&&(A[N++]=h),W!==64&&(A[N++]=b);return A}},{"./support":30,"./utils":32}],2:[function(a,i,o){var n=a("./external"),s=a("./stream/DataWorker"),r=a("./stream/Crc32Probe"),c=a("./stream/DataLengthProbe");function m(h,b,p,d,W){this.compressedSize=h,this.uncompressedSize=b,this.crc32=p,this.compression=d,this.compressedContent=W}m.prototype={getContentWorker:function(){var h=new s(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),b=this;return h.on("end",function(){if(this.streamInfo.data_length!==b.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new s(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},m.createWorkerFrom=function(h,b,p){return h.pipe(new r).pipe(new c("uncompressedSize")).pipe(b.compressWorker(p)).pipe(new c("compressedSize")).withStreamInfo("compression",b)},i.exports=m},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,i,o){var n=a("./stream/GenericWorker");o.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},o.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,i,o){var n=a("./utils"),s=(function(){for(var r,c=[],m=0;m<256;m++){r=m;for(var h=0;h<8;h++)r=1&r?3988292384^r>>>1:r>>>1;c[m]=r}return c})();i.exports=function(r,c){return r!==void 0&&r.length?n.getTypeOf(r)!=="string"?(function(m,h,b,p){var d=s,W=p+b;m^=-1;for(var Z=p;Z<W;Z++)m=m>>>8^d[255&(m^h[Z])];return-1^m})(0|c,r,r.length,0):(function(m,h,b,p){var d=s,W=p+b;m^=-1;for(var Z=p;Z<W;Z++)m=m>>>8^d[255&(m^h.charCodeAt(Z))];return-1^m})(0|c,r,r.length,0):0}},{"./utils":32}],5:[function(a,i,o){o.base64=!1,o.binary=!1,o.dir=!1,o.createFolders=!0,o.date=null,o.compression=null,o.compressionOptions=null,o.comment=null,o.unixPermissions=null,o.dosPermissions=null},{}],6:[function(a,i,o){var n=null;n=typeof Promise<"u"?Promise:a("lie"),i.exports={Promise:n}},{lie:37}],7:[function(a,i,o){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",s=a("pako"),r=a("./utils"),c=a("./stream/GenericWorker"),m=n?"uint8array":"array";function h(b,p){c.call(this,"FlateWorker/"+b),this._pako=null,this._pakoAction=b,this._pakoOptions=p,this.meta={}}o.magic="\b\0",r.inherits(h,c),h.prototype.processChunk=function(b){this.meta=b.meta,this._pako===null&&this._createPako(),this._pako.push(r.transformTo(m,b.data),!1)},h.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new s[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var b=this;this._pako.onData=function(p){b.push({data:p,meta:b.meta})}},o.compressWorker=function(b){return new h("Deflate",b)},o.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(a,i,o){function n(d,W){var Z,N="";for(Z=0;Z<W;Z++)N+=String.fromCharCode(255&d),d>>>=8;return N}function s(d,W,Z,N,y,A){var f,Y,X=d.file,G=d.compression,j=A!==m.utf8encode,L=r.transformTo("string",A(X.name)),z=r.transformTo("string",m.utf8encode(X.name)),O=X.comment,F=r.transformTo("string",A(O)),M=r.transformTo("string",m.utf8encode(O)),I=z.length!==X.name.length,g=M.length!==O.length,J="",ae="",Q="",pe=X.dir,P=X.date,ee={crc32:0,compressedSize:0,uncompressedSize:0};W&&!Z||(ee.crc32=d.crc32,ee.compressedSize=d.compressedSize,ee.uncompressedSize=d.uncompressedSize);var S=0;W&&(S|=8),j||!I&&!g||(S|=2048);var E=0,ye=0;pe&&(E|=16),y==="UNIX"?(ye=798,E|=(function(B,ue){var Ne=B;return B||(Ne=ue?16893:33204),(65535&Ne)<<16})(X.unixPermissions,pe)):(ye=20,E|=(function(B){return 63&(B||0)})(X.dosPermissions)),f=P.getUTCHours(),f<<=6,f|=P.getUTCMinutes(),f<<=5,f|=P.getUTCSeconds()/2,Y=P.getUTCFullYear()-1980,Y<<=4,Y|=P.getUTCMonth()+1,Y<<=5,Y|=P.getUTCDate(),I&&(ae=n(1,1)+n(h(L),4)+z,J+="up"+n(ae.length,2)+ae),g&&(Q=n(1,1)+n(h(F),4)+M,J+="uc"+n(Q.length,2)+Q);var _="";return _+=`
|