PageSourceSearch

https://www.lbr.lu/mjrcs-web-front/assets/GuichetNewAppointmentView-m9T-2xqp.js

js lbr.lu collected 2026-10-02 05:17:04 UTC 37,690 bytes, 1 lines download raw bytes

1import{$ as e,I as a,N as l,Q as i,St as n,V as t,X as o,_ as d,c as u,d as c,f as s,ft as r,g as p,i as m,it as g,l as v,m as b,mt as y,t as h,tt as f,u as I,y as _,z as k}from"./_plugin-vue_export-helper-BOtcModL.js";import{s as C}from"./runtime-dom.esm-bundler-CC6M3s8d.js";import{$ as w,Ci as q,Fa as N,i as L,o as S,r as j}from"./vue-router-sH2p8H80.js";import"./main-Bwa1sscH.js";import{t as E}from"./LbrLabel-DQSFTYQR.js";import{t as x}from"./LbrInput-lTPqYqAo.js";import{Fn as A,N as O,Nn as U,Tn as D,Yt as P,_n as M,in as T,qn as $}from"./index-CPP0TwgC.js";import{t as R}from"./LbrStepper-CezkmE2J.js";import{n as F,t as J}from"./GuichetFeedbackState--ARYKzFW.js";import{i as B,r as V}from"./LbrMultiFileUpload-HitvWrgO.js";import{t as G}from"./LbrFileUpload-DVutugMY.js";import{i as H,n as Q,o as z,r as Y,s as W,t as X}from"./GuichetAppointmentStepSlot-B6bSgng5.js";import{t as Z}from"./GuichetPageTitle-BQ9ovNE8.js";import{t as K}from"./LbrPhoneInput-Rpr2j0Dl.js";import{r as ee,t as ae}from"./LbrChoiceCard-CWJbAz5K.js";var le={key:0,class:"guichet-documents-assistance-confirmation__documents"},ie={key:0},ne={class:"guichet-documents-assistance-confirmation__actions"},te={id:"guichet-step-comment-form"},oe={class:"guichet-step-comment-form__row"},de={class:"guichet-step-comment-form__row"},ue={key:0,class:"guichet-step-comment-form__half"},ce={class:"guichet-conditions__link",href:"/mjrcs-web-front/personal-data",target:"_blank",rel:"noopener noreferrer"},se=_({__name:"GuichetAppointmentStepComment",props:{pageId:{},selection:{},service:{},legalForm:{},hour:{},date:{},site:{},complementaryServices:{},documentAssistanceRequested:{type:Boolean}},emits:["update:completion"],setup(e,{emit:t}){const b=L(),h=F(),f=S(),_=y(!1),C=y(!1),w=y(""),q=y(),N=t,j=e,A=r({comment:"",email:"",phone:"",givenName:"",surName:"",rcsNumber:""});l(function(){const e=f.getAccountSelected?.account;e&&f.isLoggedCert&&(A.email=e.email??"",A.surName=e.name??"",A.givenName=e.surName??"")});const P=u(()=>{const e=A.email.trim();return Boolean(A.givenName.trim()&&A.surName.trim()&&A.phone.trim()&&/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(e)&&C.value)}),M=u(()=>{const e=[Boolean(A.givenName.trim()),Boolean(A.surName.trim()),Boolean(A.phone.trim()),/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(A.email.trim()),C.value].filter(Boolean).length;return Math.round(e/5*100)}),T=u(()=>!j.selection&&"INS"!==j.service?.code);function $(e){return"DE"===f.getLang?e.libellePieceDe||e.libellePiece:"EN"===f.getLang&&e.libellePieceEn||e.libellePiece}function R(e){return"DE"===f.getLang?e.serviceLabelDe||e.serviceLabel||e.serviceCode:"EN"===f.getLang?e.serviceLabelEn||e.serviceLabel||e.serviceCode:e.serviceLabel||e.serviceCode}const B=u(()=>{if(!q.value)return[];const e=h.getAppointmentByID(q.value);if(!e)return[];const a=[],l=new Set,i=e.prestationCode??"",n=e.requirements.filter(e=>!e.serviceCode||e.serviceCode===i);n.length&&(i&&l.add(i),a.push({key:`primary-${i}`,labelId:"documents-primary-section-title",requirements:n}));for(const o of e.complementaryServices??[]){const i=e.requirements.filter(e=>e.serviceCode===o.serviceCode);i.length&&(l.add(o.serviceCode),a.push({key:`complementary-${o.serviceCode}`,labelId:"documents-complementary-section-title",serviceLabel:R(o),requirements:i}))}const t=e.requirements.filter(e=>e.serviceCode&&!l.has(e.serviceCode));return t.length&&a.push({key:"complementary-other",labelId:"documents-complementary-section-title",requirements:t}),a});function V(e){w.value&&b.push({name:"guichet-appointment-details-by-hash",params:{hashId:w.value},query:e?{section:"documents"}:void 0})}return o(M,e=>N("update:completion",e),{immediate:!0}),(l,t)=>w.value?(a(),I(J,{key:0,class:"guichet-documents-assistance-confirmation",icon:"life-ring",tone:"info"},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"documents-assistance-banner-title"},null,8,["page-id"])]),action:i(()=>[v("div",ne,[d(D,{"page-id":e.pageId,"label-id":"documents-assistance-view-appointment","prepend-icon":"calendar-check",onOnClick:t[0]||(t[0]=e=>V(!1))},null,8,["page-id"]),d(U,{"page-id":e.pageId,"label-id":"documents-assistance-upload-action","prepe
1nd-icon":"file-arrow-up","append-icon":"arrow-right","margin-enabled":!1,onOnClick:t[1]||(t[1]=e=>V(!0))},null,8,["page-id"])])]),default:i(()=>[d(E,{"page-id":e.pageId,"label-id":"documents-assistance-banner-description"},null,8,["page-id"]),B.value.length?(a(),s("div",le,[v("h3",null,[d(E,{"page-id":e.pageId,"label-id":"documents-preparation-title"},null,8,["page-id"])]),(a(!0),s(m,null,k(B.value,l=>(a(),s("section",{key:l.key},[v("h4",null,[d(E,{"page-id":e.pageId,"label-id":l.labelId},null,8,["page-id","label-id"]),l.serviceLabel?(a(),s("span",ie," — "+g(l.serviceLabel),1)):c("",!0)]),v("ul",null,[(a(!0),s(m,null,k(l.requirements,i=>(a(),s("li",{key:`${l.key}-${i.codePiece}`},[v("span",null,g($(i)),1),v("strong",null,[d(E,{"page-id":e.pageId,"label-id":i.indicMandatory?"document-required":"document-optional"},null,8,["page-id","label-id"])])]))),128))])]))),128))])):c("",!0)]),_:1})):(a(),I(W,{key:1,"has-shadows":""},{default:i(()=>[d(H,{"page-id":e.pageId,icon:"user-pen"},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"contact-title"},null,8,["page-id"])]),subtitle:i(()=>[d(E,{"page-id":e.pageId,"label-id":"contact-description"},null,8,["page-id"])]),_:1},8,["page-id"]),d(z,null,{default:i(()=>[v("div",te,[v("div",oe,[v("div",null,[d(x,{value:A.surName,"onUpdate:value":t[2]||(t[2]=e=>A.surName=e),disabled:n(f).isLoggedCert,"page-id":e.pageId,"label-id":"surName",name:"surName",required:""},null,8,["value","disabled","page-id"])]),v("div",null,[d(x,{value:A.givenName,"onUpdate:value":t[3]||(t[3]=e=>A.givenName=e),disabled:n(f).isLoggedCert,"page-id":e.pageId,"label-id":"givenName",name:"givenName",required:""},null,8,["value","disabled","page-id"])])]),v("div",de,[v("div",null,[d(K,{"model-value":A.phone,"onUpdate:modelValue":t[4]||(t[4]=e=>A.phone=e),"page-id":e.pageId,"label-id":"phone",name:"phone",required:""},null,8,["model-value","page-id"])]),v("div",null,[d(x,{value:A.email,"onUpdate:value":t[5]||(t[5]=e=>A.email=e),disabled:n(f).isLoggedCert,"page-id":e.pageId,"label-id":"email",name:"email",required:""},null,8,["value","disabled","page-id"])])]),T.value?(a(),s("div",ue,[d(x,{value:A.rcsNumber,"onUpdate:value":t[6]||(t[6]=e=>A.rcsNumber=e),"page-id":e.pageId,"label-id":"rcsNumber",name:"rcsNumber"},null,8,["value","page-id"])])):c("",!0),v("div",null,[d(O,{value:A.comment,"onUpdate:value":t[7]||(t[7]=e=>A.comment=e),"page-id":e.pageId,name:"comment","label-id":"comment",required:!1,"maximum-character":200,"max-length":200},null,8,["value","page-id"])]),d(ee,{modelValue:C.value,"onUpdate:modelValue":t[8]||(t[8]=e=>C.value=e),class:"guichet-conditions",name:"conditionsAccepted",required:""},{requiredText:i(()=>[d(E,{"page-id":e.pageId,"label-id":"conditions-required"},null,8,["page-id"])]),default:i(()=>[d(E,{"page-id":e.pageId,"label-id":"conditions-prefix"},null,8,["page-id"]),t[10]||(t[10]=p(g(" ")+" ",-1)),v("a",ce,[d(E,{"page-id":e.pageId,"label-id":"conditions-link"},null,8,["page-id"])])]),_:1},8,["modelValue"])])]),_:1}),d(Y,{id:"guichet-step-comment-actions"},{default:i(()=>[d(U,{"page-id":e.pageId,"label-id":"save","prepend-icon":"calendar-check","append-icon":"arrow-right","margin-enabled":!1,disabled:!P.value||_.value,onClick:t[9]||(t[9]=e=>async function(){if(P.value&&!_.value){_.value=!0;try{const e=await h.createAppointment({comment:A.comment,date:j.date,startHour:j.hour,formJuCode:j.selection?.resolution.formJuCode??j.legalForm?.code,prestationCode:j.selection?.resolution.serviceCode??j.service?.code,journeyCardCode:j.selection?.cardCode,journeyOutcomeCode:j.selection?.outcomeCode,journeyAnswers:j.selection?.answers,complementaryServices:j.complementaryServices,resolutionToken:j.selection?.resolution.token,mention:"EMPTY",siteId:j.site,firstName:A.givenName.trim(),lastName:A.surName.trim(),email:A.email.trim(),phone:A.phone.trim(),rcsNumber:j.selection?.company?.rcsNumber??A.rcsNumber});if(j.documentAssistanceRequested&&e?.hashId)return q.value=e.id,await h.fetchAppointmentRequirements(e.id),void(w.value=e.hashId);b.push({name:"guichet-appointment-details-by-hash",params:{hashId:e.hashId}})}catch(e){}finally{_.value=!1}}}())},null,8,["page-id","disabled"])]),_:1})]),_:1}))}}),re={class:"guichet-company-search"},pe={class:"guichet-company-search__intro"},me={class:"guichet-company-search__icon"},ge={key:3,class:"guichet-company-search__results","aria-live":"polite"},ve={class:"guichet-company-search__count"},be=["onClick"],ye={class:"guichet-company-search__result-icon"},he={class:"guichet-company-search__result-content"},fe={key:0},Ie={class:"guichet-company-search__select"},_e={key:0,class:"guichet-company-confirm"},ke={class:"guichet-company-confirm__summary"},Ce={class:"guichet-company-confirm__icon","aria-hidden":"true"},we={key:0},qe={key:1},Ne={key:2},Le={class:"guichet-company-confirm__question"},Se={class:"guichet-company-confirm__actions"},je=h(_({__name:"GuichetCompanySearch",props:{pageId:{}},emits:["back","select"],setup(e,{emit:l}){const n=l,o=y([]),r=y(!1),b=y(!1),h=y(!1),f=y(),_=y(!1),C=u(()=>{const e=new N;return e.set("count",String(o.value.length)),e});function w(e){return e.dataLuxembourgCompany?.legalFormCode??e.dataForeignCompany?.legalFormForeign}function q(e){return e.dataLuxembourgCompany?.address?.replace(/\b(L-\d{4})(?=\S)/g,"$1 ")}async function L(e){const a=e?.trim();if(a&&!r.value){r.value=!0,b.value=!1,h.value=!0;try{o.value=(await T(a))._items.filter(e=>Boolean(e.id))}catch{o.value=[],b.value=!0}finally{r.value=!1}}}function S(){_.value=!1,f.value=void 0}function j(){const e=f.value;e?.id&&(_.value=!1,n("select",{rcsNumber:e.id,name:e.name??e.id,legalFormCode:w(e)}),f.value=void 0)}return(l,u)=>{const y=t("font-awesome-icon");return a(),s("section",re,[v("button",{type:"button",class:"guichet-company-search__back",onClick:u[0]||(u[0]=e=>n("back"))},[d(y,{icon:"arrow-left","aria-hidden":"true"}),d(E,{"page-id":e.pageId,"label-id":"journey-back"},null,8,["page-id"])]),v("div",pe,[v("span",me,[d(y,{icon:"building"})]),v("div",null,[v("h3",null,[d(E,{"page-id":e.pageId,"label-id":"company-search-title"},null,8,["page-id"])]),v("p",null,[d(E,{"page-id":e.pageId,"label-id":"company-search-description"},null,8,["page-id"])])])]),d(P,{"page-id":e.pageId,"label-id":"company-search-input","disabled-button-search":r.value,onUpdateResult:L},null,8,["page-id","disabled-button-search"]),r.value?(a(),I(J,{key:0,loading:""})):b.value?(a(),I(J,{key:1,icon:"triangle-exclamation"},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"company-search-error-title"},null,8,["page-id"])]),default:i(()=>[d(E,{"page-id":e.pageId,"label-id":"company-search-error-description"},null,8,["page-id"])]),_:1})):h.value&&0===o.value.length?(a(),I(J,{key:2,icon:"magnifying-glass"},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"company-search-empty-title"},null,8,["page-id"])]),default:i(()=>[d(E,{"page-id":e.pageId,"label-id":"company-search-empty-description"},null,8,["page-id"])]),_:1})):o.value.length?(a(),s("div",ge,[v("p",ve,[d(E,{"page-id":e.pageId,"label-id":"company-search-results",replace:C.value},null,8,["page-id","replace"])]),(a(!0),s(m,null,k(o.value,l=>(a(),s("button",{key:l.id,type:"button",class:"guichet-company-search__result",onClick:e=>function(e){e.id&&(f.value=e,_.value=!0)}(l)},[v("span",ye,[d(y,{icon:"building"})]),v("span",he,[v("strong",null,g(l.name),1),v("span",null,[d(E,{"page-id":e.pageId,"label-id":"company-search-rcs"},null,8,["page-id"]),p(" "+g(l.id)+" ",1),w(l)?(a(),s(m,{key:0},[p(" · "+g(w(l)),1)],64)):c("",!0)]),l.observation?(a(),s("small",fe,g(l.observation),1)):c("",!0)]),v("span",Ie,[d(E,{"page-id":e.pageId,"label-id":"company-search-select"},null,8,["page-id"]),d(y,{icon:"arrow-right"})])],8,be))),128))])):c("",!0),d(M,{show:_.value,"onUpdate:show":u[1]||(u[1]=e=>_.value=e),"page-id":e.pageId,"label-id":"company-confirm","closable-outside":!1,"custom-small-modal":!0,"classic-modal":!1,"enable-fullscreen-button":!1,onCloseModal:S},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"company-confirm-title"},null,8,["page-id"])]),body:i(()=>[f.value?(a(),s("div",_e,[v("p",null,[d(E,{"page-id":e.pageId,"label-id":"company-confirm-description"},null,8,["page-id"])]),v("div",ke,[v("span",Ce,[d(y,{icon:"building"})]),v("div",null,[v("strong",null,g(f.value.name),1),v("span",null,[d(E,{"page-id":e.pageId,"label-id":"company-search-rcs"},null,8,["page-id"]),p(" "+g(f.value.id),1)]),w(f.value)?(a(),s("span",we,[d(E,{"page-id":e.pageId,"label-id":"company-confirm-legal-form"},null,8,["page-id"]),p(" "+g(w(f.value)),1)])):c("",!0),q(f.value)?(a(),s("span",qe,[d(E,{"page-id":e.pageId,"label-id":"company-confirm-ad
1dress"},null,8,["page-id"]),p(" "+g(q(f.value)),1)])):c("",!0),f.value.observation?(a(),s("small",Ne,g(f.value.observation),1)):c("",!0)])]),v("strong",Le,[d(E,{"page-id":e.pageId,"label-id":"company-confirm-question"},null,8,["page-id"])])])):c("",!0)]),footer:i(()=>[v("div",Se,[d(D,{"page-id":e.pageId,"label-id":"company-confirm-cancel","prepend-icon":"arrow-left",onOnClick:S},null,8,["page-id"]),d(U,{"page-id":e.pageId,"label-id":"company-confirm-action","prepend-icon":"check",onOnClick:j},null,8,["page-id"])])]),_:1},8,["show","page-id"])])}}}),[["__scopeId","data-v-3a70ba06"]]),Ee={key:2,class:"guichet-journey-step__indication"},xe={key:3,class:"guichet-journey-step__company"},Ae={key:6,class:"guichet-journey-step__grid"},Oe=h(_({__name:"GuichetAppointmentStepJourney",props:{pageId:{}},emits:["resolved"],setup(e,{emit:n}){const o=n,r=F(),h=y(!0),f=y(!1),_=y(),C=y(!1),w=y(),q=y(),N=y([]),L=y([]),S=u(()=>r.journey?.questions.find(e=>e.code===q.value)),j=u(()=>"ASBL"===D()?.trim().toUpperCase()),x=u(()=>{const e=S.value?.indicationLabelId;return j.value&&"question-prestation-indication"===e?"question-prestation-indication-asbl":e}),A=u(()=>S.value?S.value.options.filter(e=>!e.nextQuestionCode||U(e.nextQuestionCode,e.formJuCode)).map(e=>function(e){return"PRESTATION_SELECTION"===S.value?.code&&j.value?{...e,labelId:O(e.labelId)||e.labelId,descriptionLabelId:O(e.descriptionLabelId),indicationLabelId:O(e.indicationLabelId)}:e}(e)):r.journey?.cards??[]);function O(e){return e&&/^prestation-(mod|accounts|radiation|statutes)-/.test(e)?e.replace(/-(title|description|indication)$/,"-asbl-$1"):e}function U(e,a){const l=r.journey?.questions.find(a=>a.code===e);return!(!l||l.formJuCode&&l.formJuCode!==(a||D()))}function D(){if(w.value?.legalFormCode)return w.value.legalFormCode;for(let e=N.value.length-1;e>=0;e-=1){const a=N.value[e],l=(r.journey?.questions.find(e=>e.code===a.questionCode))?.options.find(e=>e.code===a.optionCode);if(l?.formJuCode)return l.formJuCode}}function P(e){return U(e)?(q.value=e,!0):(f.value=!0,!1)}async function M(e){if(_.value&&e){h.value=!0,f.value=!1;try{const a=await r.resolveJourney({cardCode:_.value.code,outcomeCode:e,rcsNumber:w.value?.rcsNumber,answers:N.value});o("resolved",{cardCode:_.value.code,cardLabelId:_.value.labelId,outcomeCode:e,answers:[...N.value],company:w.value,resolution:a}),V()}catch{f.value=!0}finally{h.value=!1}}}function T(){N.value.pop();const e=L.value.pop();e?q.value=e:"COMPANY_SEARCH"===_.value?.entryType?(q.value=void 0,C.value=!0):V()}async function $(){_.value&&(_.value.firstQuestionCode?P(_.value.firstQuestionCode):await M(_.value.outcomeCode))}async function R(e){w.value=e,C.value=!1,await $()}function B(){N.value=[],L.value=[],q.value=void 0,C.value=!0}function V(){_.value=void 0,w.value=void 0,q.value=void 0,N.value=[],L.value=[],C.value=!1}return l(async()=>{try{r.journey||await r.fetchJourney()}catch{f.value=!0}finally{h.value=!1}}),(l,n)=>{const o=t("font-awesome-icon");return a(),I(W,{"has-shadows":""},{default:i(()=>[d(H,{"page-id":e.pageId,icon:"route"},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":C.value?"company-search-title":S.value?S.value.labelId:"journey-title"},null,8,["page-id","label-id"])]),subtitle:i(()=>[d(E,{"page-id":e.pageId,"label-id":C.value?"company-search-description":S.value?.descriptionLabelId||"journey-description"},null,8,["page-id","label-id"])]),_:1},8,["page-id"]),d(z,{class:"guichet-journey-step"},{default:i(()=>[C.value?(a(),I(je,{key:0,"page-id":e.pageId,onBack:V,onSelect:R},null,8,["page-id"])):S.value?(a(),s("button",{key:1,type:"button",class:"guichet-journey-step__back",onClick:T},[d(o,{icon:"arrow-left","aria-hidden":"true"}),d(E,{"page-id":e.pageId,"label-id":"journey-back"},null,8,["page-id"])])):c("",!0),!C.value&&x.value?(a(),s("div",Ee,[d(o,{icon:"circle-info","aria-hidden":"true"}),d(E,{"page-id":e.pageId,"label-id":x.value},null,8,["page-id","label-id"])])):c("",!0),!C.value&&w.value&&S.value?(a(),s("div",xe,[v("span",null,[d(o,{icon:"building"})]),v("div",null,[v("small",null,[d(E,{"page-id":e.pageId,"label-id":"company-selected"},null,8,["page-id"])]),v("strong",null,g(w.value.name),1),v("small",null,[p(g(w.value.rcsNumber),1),w.value.legalFormCode?(a(),s(m,{key:0},[p(" · "+g(w.value.legalFormCode),1)],64)):c("",!0)])]),v("button",{type:"button",onClick:B},[d(o,{icon:"pen-to-square","aria-hidden":"true"}),d(E,{"page-id":e.pageId,"label-id":"company-change"},null,8,["page-id"])])])):c("",!0),!C.value&&h.value?(a(),I(J,{key:4,loading:""})):!C.value&&f.value?(a(),I(J,{key:5,icon:"triangle-exclamation"},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"journey-error-title"},null,8,["page-id"])]),default:i(()=>[d(E,{"page-id":e.pageId,"label-id":"journey-error-description"},null,8,["page-id"])]),_:1})):C.value?c("",!0):(a(),s("div",Ae,[(a(!0),s(m,null,k(A.value,l=>(a(),I(ae,{key:l.code,compact:Boolean(S.value),"style-vars":{"--card-accent":l.accent||"#a8ded7"},onSelect:e=>async function(e){if(!_.value)return _.value=e,void("COMPANY_SEARCH"===_.value.entryType?C.value=!0:await $());const a=e;q.value&&(L.value.push(q.value),N.value.push({questionCode:q.value,optionCode:a.code})),a.nextQuestionCode?P(a.nextQuestionCode):await M(a.outcomeCode)}(l)},b({icon:i(()=>[d(o,{icon:l.icon||"circle-question"},null,8,["icon"])]),title:i(()=>[d(E,{"page-id":e.pageId,"label-id":l.labelId},null,8,["page-id","label-id"])]),description:i(()=>[l.descriptionLabelId?(a(),I(E,{key:0,"page-id":e.pageId,"label-id":l.descriptionLabelId},null,8,["page-id","label-id"])):c("",!0)]),action:i(()=>[d(E,{"page-id":e.pageId,"label-id":l.actionLabelId||"journey-choose"},null,8,["page-id","label-id"])]),_:2},[l.indicationLabelId?{name:"indication",fn:i(()=>[d(E,{"page-id":e.pageId,"label-id":l.indicationLabelId},null,8,["page-id","label-id"])]),key:"0"}:void 0]),1032,["compact","style-vars","onSelect"]))),128))]))]),_:1})]),_:1})}}}),[["__scopeId","data-v-d30005f6"]]),Ue={class:"guichet-documents-introduction"},De={key:1},Pe={class:"guichet-document-copy"},Me={key:0},Te={key:2,class:"guichet-preparation-empty"},$e={class:"guichet-documents-introduction__actions"},Re={class:"guichet-documents-introduction"},Fe={class:"guichet-document-copy"},Je={key:0},Be={class:"guichet-documents-introduction__actions"},Ve={class:"guichet-document-complementaries"},Ge={class:"guichet-document-complementaries__list"}
1,He={class:"guichet-document-complementaries__copy"},Qe={key:0},ze={key:0,class:"guichet-document-complementaries__totals"},Ye={key:0},We={class:"guichet-documents-introduction__actions"},Xe={class:"guichet-preparation-copy"},Ze={key:1,class:"guichet-document-sections"},Ke={key:0},ea={class:"guichet-preparation-documents"},aa={class:"guichet-document-copy"},la={key:0},ia={key:0,class:"guichet-preparation-empty"},na={class:"guichet-preparation-actions"},ta=h(_({__name:"GuichetAppointmentStepDocuments",props:{resolutionToken:{},pageId:{},serviceCode:{},complementaryServices:{},assistanceRequested:{type:Boolean}},emits:["ready","update:complementary-services","update:assistance-requested"],setup(e,{emit:t}){const o=e,r=t,b=F(),h=S(),_=y([]),C=y([]),q=y(new Set((o.complementaryServices??[]).map(({configId:e})=>e))),N=y({}),L=y(!0),j=y(!1),x=y(!1),A=y(!1),O=y(!1),P=y("primary"),T=y(!1),$=y(Boolean(o.assistanceRequested));let R=0;const Q=u(()=>C.value.filter(({configId:e})=>q.value.has(e))),Y=u(()=>Q.value.map(({configId:e})=>({configId:e}))),X=u(()=>new Set(Q.value.map(({serviceCode:e})=>e))),Z=u(()=>_.value.filter(({serviceCode:e})=>!e||e===o.serviceCode||!X.value.has(e))),K=u(()=>Q.value.map(e=>({key:`complementary-${e.configId}`,labelId:"documents-complementary-section-title",service:e,requirements:_.value.filter(({serviceCode:a})=>a===e.serviceCode)})).filter(({requirements:e})=>e.length>0)),ae=u(()=>"complementary"===P.value?K.value:Z.value.length?[{key:"primary",labelId:"documents-primary-section-title",requirements:Z.value}]:[]),le=u(()=>"complementary"===P.value||0===C.value.length?"documents-preparation-continue":"documents-preparation-continue-complementary"),ie=u(()=>C.value.reduce((e,a)=>e+(q.value.has(a.configId)?a.durationMinutes:0),0)),ne=u(()=>C.value.reduce((e,a)=>e+(q.value.has(a.configId)?a.priceDetails?.estimatedTotalPriceIncludingVat??0:0),0));function te(e){return"DE"===h.getLang?e.libellePieceDe||e.libellePiece:"EN"===h.getLang&&e.libellePieceEn||e.libellePiece}function oe(e){return"DE"===h.getLang?e.explicationDe||e.explication||e.explicationEn:"EN"===h.getLang?e.explicationEn||e.explication||e.explicationDe:e.explication||e.explicationEn||e.explicationDe}function de(e){return`${e.serviceCode||o.serviceCode||""}\0${e.codePiece}`}function ue(e){return de(e).replace(/[^a-zA-Z0-9_-]/g,"-")}function ce(e){return"DE"===h.getLang?e.serviceLabelDe||e.serviceLabel||e.serviceCode:"EN"===h.getLang?e.serviceLabelEn||e.serviceLabel||e.serviceCode:e.serviceLabel||e.serviceCode}function se(e){$.value=e,r("update:assistance-requested",e)}function re(){se(!1),P.value="primary",A.value=!1}function pe(){P.value="complementary",O.value=!1}async function me(){const e=++R;L.value=!0;try{const a=await b.fetchJourneyRequirements(o.resolutionToken,Y.value);if(e!==R)return;_.value=a;const l=new Set(a.map(de));for(const e of Object.keys(N.value))l.has(e)||delete N.value[e]}finally{e===R&&(L.value=!1)}}async function ge(){j.value=!0;try{for(const e of _.value){const a=N.value[de(e)];if(!a)continue;const l=e.serviceCode||o.serviceCode;if(!l)throw new Error("Missing service code for journey document");await b.addJourneyDocument(o.resolutionToken,a.name||a.file.name,l,e.codePiece,a.file,Y.value)}r("ready")}finally{j.value=!1}}async function ve(){"primary"!==P.value||T.value||!C.value.length?await ge():x.value=!0}function be(){j.value||(A.value=!1,O.value=!1,se(!0),!C.value.length||T.value?r("ready"):x.value=!0)}async function ye(){x.value=!1,T.value=!0,$.value?r("ready"):K.value.length?O.value=!0:await ge()}function he(){x.value=!1,T.value=!1,$.value?A.value=!0:P.value="primary"}function fe(){O.value=!1,x.value=!0}return l(async()=>{try{try{C.value=await b.fetchJourneyComplementaryServices(o.resolutionToken),r("update:complementary-services",Y.value)}catch(e){}await me()}finally{A.value=!0}}),(l,t)=>(a(),s(m,null,[A.value?(a(),I(M,{key:0,show:A.value,"onUpdate:show":t[0]||(t[0]=e=>A.value=e),"page-id":e.pageId,"label-id":"documents-introduction-title",closable:!1,"closable-outside":!1,"show-close-icon":!1,"classic-modal":!1,"custom-small-modal":!1},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"documents-introduction-title"},null,8,["page-id"])]),body:i(()=>[v("div",Ue,[v("p",null,[d(E,{"page-id":e.pageId,"label-id":"documents-introduction-description"},null,8,["page-id"])]),L.value?(a(),I(J,{key:0,loading:""})):Z.value.length?(a(),s("ul",De,[(a(!0),s(m,null,k(Z.value,l=>(a(),s("li",{key:de(l)},[v("span",Pe,[v("span",null,g(te(l)),1),oe(l)?(a(),s("small",Me,g(oe(l)),1)):c("",!0)]),v("strong",{class:f({mandatory:l.indicMandatory})},[d(E,{"page-id":e.pageId,"label-id":l.indicMandatory?"document-required":"document-optional"},null,8,["page-id","label-id"])],2)]))),128))])):(a(),s("p",Te,[d(E,{"page-id":e.pageId,"label-id":"documents-preparation-empty"},null,8,["page-id"])]))])]),footer:i(()=>[v("div",$e,[d(D,{"page-id":e.pageId,"label-id":"documents-introduction-assistance","prepend-icon":"life-ring",disabled:j.value||L.value,onOnClick:be},null,8,["page-id","disabled"]),d(U,{"page-id":e.pageId,"label-id":"documents-introduction-upload","prepe
1nd-icon":"file-arrow-up","append-icon":"arrow-right",disabled:j.value||L.value,"margin-enabled":!1,onOnClick:re},null,8,["page-id","disabled"])])]),_:1},8,["show","page-id"])):c("",!0),O.value?(a(),I(M,{key:1,show:O.value,"onUpdate:show":t[1]||(t[1]=e=>O.value=e),"page-id":e.pageId,"label-id":"complementary-documents-introduction-title",closable:!1,"closable-outside":!1,"show-close-icon":!1,"classic-modal":!1,"custom-small-modal":!1},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"complementary-documents-introduction-title"},null,8,["page-id"])]),body:i(()=>[v("div",Re,[v("p",null,[d(E,{"page-id":e.pageId,"label-id":"complementary-documents-introduction-description"},null,8,["page-id"])]),(a(!0),s(m,null,k(K.value,l=>(a(),s("section",{key:`introduction-${l.key}`,class:"guichet-documents-introduction__group"},[v("h3",null,g(ce(l.service)),1),v("ul",null,[(a(!0),s(m,null,k(l.requirements,l=>(a(),s("li",{key:de(l)},[v("span",Fe,[v("span",null,g(te(l)),1),oe(l)?(a(),s("small",Je,g(oe(l)),1)):c("",!0)]),v("strong",{class:f({mandatory:l.indicMandatory})},[d(E,{"page-id":e.pageId,"label-id":l.indicMandatory?"document-required":"document-optional"},null,8,["page-id","label-id"])],2)]))),128))])]))),128))])]),footer:i(()=>[v("div",Be,[d(D,{"page-id":e.pageId,"label-id":"complementary-documents-introduction-back","prepend-icon":"arrow-left",disabled:j.value||L.value,onOnClick:fe},null,8,["page-id","disabled"]),d(U,{"page-id":e.pageId,"label-id":"complementary-documents-introduction-upload","prepe
1nd-icon":"file-arrow-up","append-icon":"arrow-right",disabled:j.value||L.value,"margin-enabled":!1,onOnClick:pe},null,8,["page-id","disabled"])])]),_:1},8,["show","page-id"])):c("",!0),x.value?(a(),I(M,{key:2,show:x.value,"onUpdate:show":t[2]||(t[2]=e=>x.value=e),"page-id":e.pageId,"label-id":"complementary-introduction-title",closable:!1,"closable-outside":!1,"show-close-icon":!1,"classic-modal":!1,"custom-small-modal":!1},{title:i(()=>[d(E,{"page-id":e.pageId,"label-id":"complementary-introduction-title"},null,8,["page-id"])]),body:i(()=>[v("section",Ve,[v("p",null,[d(E,{"page-id":e.pageId,"label-id":"complementary-services-description"},null,8,["page-id"])]),v("div",Ge,[(a(!0),s(m,null,k(C.value,l=>(a(),I(ee,{key:l.configId,class:"guichet-document-complementaries__option",disabled:L.value,"model-value":q.value.has(l.configId),name:`guichet-complementary-${l.configId}`,"onUpdate:modelValue":e=>async function(e,a){const l=new Set(q.value);a?l.add(e):l.delete(e),q.value=l,r("update:complementary-services",Y.value),await me()}(l.configId,e)},{default:i(()=>[v("span",He,[v("strong",null,g(ce(l)),1),v("small",null,[p(g(l.durationMinutes)+" ",1),d(E,{"page-id":e.pageId,"label-id":"minutes-short"},null,8,["page-id"])]),null!=l.priceDetails?.estimatedTotalPriceIncludingVat?(a(),s("small",Qe,[d(E,{"page-id":e.pageId,"label-id":"complementary-service-total-price"},null,8,["page-id"]),p(" "+g(n(w)(l.priceDetails.estimatedTotalPriceIncludingVat)),1)])):c("",!0)])]),_:2},1032,["disabled","model-value","name","onUpdate:modelValue"]))),128))]),ie.value?(a(),s("div",ze,[v("span",null,[d(E,{"page-id":e.pageId,"label-id":"complementary-duration-added"},null,8,["page-id"]),v("strong",null,[p(g(ie.value)+" ",1),d(E,{"page-id":e.pageId,"label-id":"minutes-short"},null,8,["page-id"])])]),ne.value?(a(),s("span",Ye,[d(E,{"page-id":e.pageId,"label-id":"complementary-price-added"},null,8,["page-id"]),v("strong",null,g(n(w)(ne.value)),1)])):c("",!0)])):c("",!0)])]),footer:i(()=>[v("div",We,[d(D,{"page-id":e.pageId,"label-id":"complementary-introduction-back","prepend-icon":"arrow-left",disabled:L.value||j.value,onOnClick:he},null,8,["page-id","disabled"]),d(U,{"page-id":e.pageId,"label-id":"complementary-introduction-continue","prepend-icon":"check","append-icon":"arrow-right",disabled:L.value||j.value,"margin-enabled":!1,onOnClick:ye},null,8,["page-id","disabled"])])]),_:1},8,["show","page-id"])):c("",!0),d(W,{"has-shadows":""},{default:i(()=>[d(H,{"page-id":e.pageId,"label-id":"documents-preparation-title",icon:"folder-open"},null,8,["page-id"]),d(z,null,{default:i(()=>[v("p",Xe,[d(E,{"page-id":e.pageId,"label-id":"documents-preparation-description"},null,8,["page-id"])]),L.value?(a(),I(J,{key:0,loading:""})):(a(),s("div",Ze,[(a(!0),s(m,null,k(ae.value,l=>(a(),s("section",{key:l.key,class:"guichet-document-section"},[v("h3",null,[d(E,{"page-id":e.pageId,"label-id":l.labelId},null,8,["page-id","label-id"]),l.service?(a(),s("span",Ke," — "+g(ce(l.service)),1)):c("",!0)]),v("div",ea,[(a(!0),s(m,null,k(l.requirements,l=>(a(),s("article",{key:de(l)},[v("header",null,[v("span",aa,[v("strong",null,g(te(l)),1),oe(l)?(a(),s("small",la,g(oe(l)),1)):c("",!0)]),v("span",{class:f({mandatory:l.indicMandatory})},[d(E,{"page-id":e.pageId,"label-id":l.indicMandatory?"document-required":"document-optional"},null,8,["page-id","label-id"])],2)]),d(G,{"model-value":N.value[de(l)],name:`journey-document-${ue(l)}`,"page-id":e.pageId,"label-id":"upload-required-document","allowed-types":n(V),"max-size-in-bytes":n(B),compact:"","show-heading":!1,"show-help":!1,"onUpdate:modelValue":e=>function(e,a){const l=de(e);a?N.value[l]=a:delete N.value[l]}(l,e)},null,8,["model-value","name","page-id","allowed-types","max-size-in-bytes","onUpdate:modelValue"])]))),128))])]))),128)),0===ae.value.length?(a(),s("p",ia,[d(E,{"page-id":e.pageId,"label-id":"documents-preparation-empty"},null,8,["page-id"])])):c("",!0)])),v("div",na,[d(D,{"page-id":e.pageId,"label-id":"documents-upload-help","prepend-icon":"life-ring",disabled:j.value||L.value,onOnClick:be},null,8,["page-id","disabled"]),d(U,{"page-id":e.pageId,"label-id":le.value,"prepe
1nd-icon":"arrow-right","append-icon":"arrow-right",disabled:j.value||L.value,"margin-enabled":!1,onOnClick:ve},null,8,["page-id","label-id","disabled"])])]),_:1})]),_:1})],64))}}),[["__scopeId","data-v-5afc1906"]]),oa={id:"guichet-new-appointment-page",class:"container"},da={key:0,class:"guichet-login-callout","aria-labelledby":"guichet-login-callout-title"},ua={class:"guichet-login-callout__icon","aria-hidden":"true"},ca={class:"guichet-login-callout__copy"},sa={id:"guichet-login-callout-title"},ra={id:"guichet-new-appointment-container"},pa={class:"guichet-new-appointment-step"},ma={class:"guichet-selected-site-summary"},ga={class:"guichet-selected-site-summary__title"},va={"aria-hidden":"true"},ba={class:"guichet-selected-site-summary__details"},ya=["href"],ha={class:"guichet-selected-site-summary__map-frame"},fa=["src","title"],Ia={class:"guichet-login-modal__body"},_a={class:"guichet-login-modal__icon","aria-hidden":"true"},ka={class:"guichet-login-modal__actions"},Ca="GUICHET-NEW-APPOINTMENT",wa="guichet-booking-login-state",qa=_({extends:$,data:()=>({pageId:"GUICHET-NEW-APPOINTMENT"}),__name:"GuichetNewAppointmentView",setup(o){const r=y(1),p=y(),m=y(""),h=y(""),f=y(),_=y(),k=y(0),w=y([]),N=y(!1),x=S(),O=L(),P=j(),T=y(!1),$=y();function F(){!function(){const e={currentStep:r.value,selection:p.value,selectedHour:m.value,selectedDate:h.value,selectedSite:f.value,selectedSiteDetails:_.value,contactCompletion:k.value,complementaryServices:w.value,documentAssistanceRequested:N.value,pendingAvailability:$.value};sessionStorage.setItem(wa,JSON.stringify(e))}(),A(O,P,!0)}function J(){T.value=!1,F()}function B(e){p.value=e,m.value="",h.value="",f.value=void 0,_.value=void 0,k.value=0,w.value=[],N.value=!1,r.value=e.resolution.qualificationRequired?3:2}function V(e){m.value=e.hour,h.value=e.date,f.value=e.site,_.value=e.siteDetails,r.value=4}function G(e){const a=null!=f.value&&f.value!==e.site;f.value=e.site,_.value=e.siteDetails,a&&(h.value="",m.value="")}function H(e){x.isLoggedCert?V(e):($.value=e,T.value=!0)}function Y(){T.value=!1,$.value&&(V($.value),$.value=void 0)}function K(e){const a=ae.value[e]?.id;null!=a&&a<r.value&&(r.value=a)}function ee(e){return r.value===e?"inprogress":r.value>e?"finished":"waiting"}l(function(){const e=sessionStorage.getItem(wa);if(e){sessionStorage.removeItem(wa);try{const a=JSON.parse(e);if(p.value=a.selection,m.value=a.selectedHour??"",h.value=a.selectedDate??"",f.value=a.selectedSite,_.value=a.selectedSiteDetails,k.value=a.contactCompletion??0,w.value=a.complementaryServices??[],N.value=a.documentAssistanceRequested??!1,a.pendingAvailability)return void V(a.pendingAvailability);r.value=Math.min(4,Math.max(1,a.currentStep??1))}catch(a){}}});const ae=u(()=>[{id:1,labelId:"journey-step",state:ee(1),active:1===r.value},{id:2,labelId:"documents-step",state:ee(2),active:2===r.value},{id:3,labelId:"slot",state:ee(3),active:3===r.value},{id:4,labelId:"contact",state:ee(4),active:4===r.value}]),le=u(()=>{const e=Math.max(0,r.value-1),a=4===r.value?k.value/100:0;return Math.round((e+a)/ae.value.length*100)}),ie=u(()=>q(h.value?new Date(h.value):void 0)),ne=u(()=>_.value?.name??""),te=u(()=>{const e=_.value;return encodeURIComponent(`${e?.name??""} ${e?.address??""}`.trim())}),oe=u(()=>`https://www.google.com/maps?q=${te.value}&output=embed`),de=u(()=>`https://www.google.com/maps/search/?api=1&query=${te.value}`),ue=u(()=>`${x.getField(Ca,"selected-site-map-title").labelName??""} ${ne.value}`.trim());return(l,o)=>{const u=t("font-awesome-icon");return a(),s("div",oa,[d(U,{class:"guichet-back-home","page-id":Ca,"label-id":"back-home","prepend-icon":"arrow-left",type:"btn-link","margin-enabled":!1,onOnClick:o[0]||(o[0]=e=>n(O).push({name:"guichet-home"}))}),d(Z,null,{title:i(()=>[d(E,{"page-id":Ca,"label-id":"new_appointments"})]),subtitle:i(()=>[d(E,{"page-id":Ca,"label-id":"new-appointments-description-guided"})]),_:1}),n(x).isLoggedCert?c("",!0):(a(),s("aside",da,[v("span",ua,[d(u,{icon:"user-check"})]),v("div",ca,[v("strong",sa,[d(E,{"page-id":Ca,"label-id":"login-recommendation-title"})]),v("p",null,[d(E,{"page-id":Ca,"label-id":"login-recommendation"})])]),d(U,{class:"guichet-login-callout__action","page-id":Ca,"label-id":"login-recommendation-action","prepe
1nd-icon":"right-to-bracket","margin-enabled":!1,onOnClick:F})])),d(W,{class:"guichet-new-appointment-progress"},{default:i(()=>[d(z,null,{default:i(()=>[(a(),I(R,{key:r.value,"page-id":Ca,"label-id":"stepper",vertical:!1,clickable:"",steps:ae.value,onClickStep:K},null,8,["steps"]))]),_:1})]),_:1}),v("div",ra,[v("main",pa,[e(d(Oe,{"page-id":Ca,onResolved:B},null,512),[[C,1===r.value]]),3===r.value&&p.value?(a(),I(X,{key:0,"resolution-token":p.value.resolution.token,"service-code":p.value.resolution.serviceCode,"legal-form-code":p.value.resolution.formJuCode,hour:m.value,site:f.value,date:h.value,"page-id":Ca,"complementary-services":w.value,"hide-site-preview":"",onSiteChange:G,onSelectAvailability:H},null,8,["resolution-token","service-code","legal-form-code","hour","site","date","complementary-services"])):c("",!0),2===r.value&&p.value&&!p.value.resolution.qualificationRequired?(a(),I(ta,{key:1,"resolution-token":p.value.resolution.token,"service-code":p.value.resolution.serviceCode,"page-id":Ca,"complementary-services":w.value,"assistance-requested":N.value,"onUpdate:assistanceRequested":o[1]||(o[1]=e=>N.value=e),"onUpdate:complementaryServices":o[2]||(o[2]=e=>w.value=e),onReady:o[3]||(o[3]=e=>r.value=3)},null,8,["resolution-token","service-code","complementary-services","assistance-requested"])):c("",!0),4===r.value&&p.value?(a(),I(se,{key:2,selection:p.value,"page-id":Ca,hour:m.value,site:f.value,date:h.value,"complementary-services":w.value,"document-assistance-requested":N.value,"onUpdate:completion":o[4]||(o[4]=e=>k.value=e)},null,8,["selection","hour","site","date","complementary-services","document-assistance-requested"])):c("",!0)]),d(Q,{id:"guichet-new-appointment-summary","page-id":Ca,"progress-value":le.value,"show-classification":!1,appointment:{date:ie.value,startHour:m.value,endHour:"",company:p.value?.company}},b({_:2},[_.value?{name:"top",fn:i(()=>[v("section",ma,[v("div",ga,[v("span",va,[d(u,{icon:"location-dot"})]),v("strong",null,[d(E,{"page-id":Ca,"label-id":"selected-site-title"})])]),v("div",ba,[v("strong",null,g(_.value.name),1),v("address",null,g(_.value.address),1),v("a",{href:de.value,target:"_blank",rel:"noopener noreferrer",class:"guichet-selected-site-summary__directions"},[d(E,{"page-id":Ca,"label-id":"selected-site-directions"}),d(u,{icon:"arrow-up-right-from-square","aria-hidden":"true"})],8,ya)]),v("div",ha,[(a(),s("iframe",{key:oe.value,"data-test":"selected-site-map",src:oe.value,title:ue.value,loading:"lazy",referrerpolicy:"no-referrer-when-downgrade",allowfullscreen:""},null,8,fa))])])]),key:"0"}:void 0,p.value?{name:"journey",fn:i(()=>[d(E,{"page-id":Ca,"label-id":p.value.cardLabelId},null,8,["label-id"])]),key:"1"}:void 0]),1032,["progress-value","appointment"])]),d(M,{show:T.value,"onUpdate:show":o[5]||(o[5]=e=>T.value=e),"page-id":Ca,"label-id":"login-certificate-modal","closable-outside":!1,"custom-small-modal":!0,"classic-modal":!1,"enable-fullscreen-button":!1,"show-close-icon":!1,onCloseModal:Y},{title:i(()=>[d(E,{"page-id":Ca,"label-id":"login-certificate-modal-title"})]),body:i(()=>[v("div",Ia,[v("span",_a,[d(u,{icon:"user-shield"})]),d(E,{"page-id":Ca,"label-id":"login-certificate-modal-description"})])]),footer:i(()=>[v("div",ka,[d(D,{"page-id":Ca,"label-id":"login-certificate-modal-continue",onOnClick:Y}),d(U,{"page-id":Ca,"label-id":"login-certificate-modal-action","prepend-icon":"right-to-bracket",onOnClick:J})])]),_:1},8,["show"])])}}});export{qa as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.