@hublo/mstaff-client-sdk 0.2.63 → 0.2.65
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/core.cjs +2 -2
- package/dist/core.js +518 -427
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var qe=Object.defineProperty;var Qe=(e,t,i)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var C=(e,t,i)=>(Qe(e,typeof t!="symbol"?t+"":t,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("vue"),Ge=require("axios"),Ke=require("pinia"),We=require("@vueuse/core");function Je(e){return $.getCurrentScope()?($.onScopeDispose(e),!0):!1}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;/*!
|
|
2
2
|
* cookie
|
|
3
3
|
* Copyright(c) 2012-2014 Roman Shtylman
|
|
4
4
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
5
5
|
* MIT Licensed
|
|
6
|
-
*/var ie=Fe,Z=He,ze=Object.prototype.toString,_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Fe(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var i={},n=t||{},s=n.decode||Qe,c=0;c<e.length;){var l=e.indexOf("=",c);if(l===-1)break;var m=e.indexOf(";",c);if(m===-1)m=e.length;else if(m<l){c=e.lastIndexOf(";",l-1)+1;continue}var u=e.slice(c,l).trim();if(i[u]===void 0){var r=e.slice(l+1,m).trim();r.charCodeAt(0)===34&&(r=r.slice(1,-1)),i[u]=Ke(r,s)}c=m+1}return i}function He(e,t,i){var n=i||{},s=n.encode||qe;if(typeof s!="function")throw new TypeError("option encode is invalid");if(!_.test(e))throw new TypeError("argument name is invalid");var c=s(t);if(c&&!_.test(c))throw new TypeError("argument val is invalid");var l=e+"="+c;if(n.maxAge!=null){var m=n.maxAge-0;if(isNaN(m)||!isFinite(m))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(m)}if(n.domain){if(!_.test(n.domain))throw new TypeError("option domain is invalid");l+="; Domain="+n.domain}if(n.path){if(!_.test(n.path))throw new TypeError("option path is invalid");l+="; Path="+n.path}if(n.expires){var u=n.expires;if(!Ge(u)||isNaN(u.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+u.toUTCString()}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.partitioned&&(l+="; Partitioned"),n.priority){var r=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(r){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var a=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(a){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l}function Qe(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function qe(e){return encodeURIComponent(e)}function Ge(e){return ze.call(e)==="[object Date]"||e instanceof Date}function Ke(e,t){try{return t(e)}catch{return e}}function We(){const e=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof e=="boolean"?e:typeof document=="object"&&typeof document.cookie=="string"}function Je(e){return typeof e=="string"?ie(e):typeof e=="object"&&e!==null?e:{}}function z(e,t={}){const i=Ze(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}function Ze(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class Xe{constructor(t,i={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const s=this.cookies;this.cookies=ie(document.cookie),this._checkChanges(s)};const n=typeof document>"u"?"":document.cookie;this.cookies=Je(t||n),this.defaultSetOptions=i,this.HAS_DOCUMENT_COOKIE=We()}_emitChange(t){for(let i=0;i<this.changeListeners.length;++i)this.changeListeners[i](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:z(this.cookies[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,i={}){return i.doNotUpdate||this.update(),z(this.cookies[t],i)}getAll(t={}){t.doNotUpdate||this.update();const i={};for(let n in this.cookies)i[n]=z(this.cookies[n],t);return i}set(t,i,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const s=typeof i=="string"?i:JSON.stringify(i);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:s}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=Z(t,s,n)),this._emitChange({name:t,value:i,options:n})}remove(t,i){const n=i=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),i),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=Z(t,"",n)),this._emitChange({name:t,value:void 0,options:i})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const i=this.changeListeners.indexOf(t);i>=0&&this.changeListeners.splice(i,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}function Ye(e,{doNotParse:t=!1,autoUpdateDependencies:i=!1}={},n=new Xe){const s=i?[...e||[]]:e;let c=n.getAll({doNotParse:!0});const l=L.ref(0),m=()=>{const u=n.getAll({doNotParse:!0});et(s||null,u,c)&&l.value++,c=u};return n.addChangeListener(m),Ve(()=>{n.removeChangeListener(m)}),{get:(...u)=>(i&&s&&!s.includes(u[0])&&s.push(u[0]),l.value,n.get(u[0],{doNotParse:t,...u[1]})),getAll:(...u)=>(l.value,n.getAll({doNotParse:t,...u[0]})),set:(...u)=>n.set(...u),remove:(...u)=>n.remove(...u),addChangeListener:(...u)=>n.addChangeListener(...u),removeChangeListener:(...u)=>n.removeChangeListener(...u)}}function et(e,t,i){if(!e)return!0;for(const n of e)if(t[n]!==i[n])return!0;return!1}const tt=()=>typeof window<"u"&&typeof window.document<"u",O=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,T=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t];let s=e;const c=m=>m!=null,l=m=>typeof m=="object";for(const[m,u]of n.entries()){if(!c(s))return i;if(m===n.length-1)return c(s[u])?s[u]:i;if(!l(s[u]))return i;s=s[u]}return i},Q=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t],s=m=>typeof m=="number"||/^\d$/g.test(m),c=m=>parseInt(m,10);let l=e;return n.forEach((m,u)=>{if(u===n.length-1)l[m]=i;else{const r=s(n[u+1])?[]:{};m=s(m)?c(m):m,l[m]=l[m]??r,l=l[m]}}),e},se=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},K=(e,t)=>{const i={...e};for(const[n,s]of Object.entries(t))n in i&&typeof i[n]=="object"&&typeof s=="object"?i[n]=K(i[n],s):i[n]=se(s);return i},nt=e=>e.startsWith("http:")?e.replace("http:","https:"):e,it=(e,t=!1)=>e.startsWith("http:")||e.startsWith("https:")?e:t?`https://${e}`:`http://${e}`,re=()=>typeof window<"u"&&(window!=null&&window.location)?new URL(window.location).hostname:void 0,X=()=>{const e=re();return!e||e==="localhost"?e:`.${e}`},st=()=>({path:"/"}),rt=e=>({path:"/",domain:e,sameSite:"none",secure:!0}),F=e=>{if(!(O()||!e))return e.startsWith("localhost")?st():rt(e)};function oe(){const e=Ye(),t=c=>e.get(c),i=(c,l)=>e.set(c,l,F(X())),n=c=>{e.remove(c),e.remove(c,F(re())),e.remove(c,F(X()))};return{getItem:t,setItem:i,removeItem:n,clear:()=>Object.keys(e.getAll()).forEach(c=>n(c))}}let x=null;function j(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=oe()){if(x)return x;function i(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function s(){return t.getItem(e.expiration)}function c(p,h){const b=a(p);if(!b.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,p),t.setItem(e.refresh,h),t.setItem(e.expiration,((b.exp-60)*1e3).toString())}function l(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function m(){return u()&&!r()}function u(){return!!i()}function r(){const p=s();return p?new Date(p)<new Date:!0}function a(p){return JSON.parse(atob(p.split(".")[1]))}function f(){return t}return x={keys:e,getAuthToken:i,getRefreshToken:n,getExpiration:s,authenticate:c,clear:l,isAuthenticated:m,hasAuth:u,isExpired:r,getStorage:f},x}function ot(e){let t={"Content-Type":"application/json"};e&&i(e);function i(b,w=!1){return t=w?b:{...t,...b},this}function n(){return t}function s(b,w){return t[b]=w,this}function c(b){return t[b]}function l(b){return t[b]&&delete t[b],this}function m(b){return s("Authorization","Bearer "+b),this}function u(){return l("Authorization"),this}function r(){return!!c("Authorization")}function a(){return s("Content-Type","multipart/form-data"),this}function f(){return s("Content-Type","application/json"),this}function p(){return c("Content-Type")==="multipart/form-data"}function h(){return c("Content-Type")==="application/json"}return{setHeaders:i,getHeaders:n,setHeader:s,getHeader:c,removeHeader:l,setAuthorization:m,removeAuthorization:u,hasAuthorization:r,setFormData:a,setJson:f,isFormData:p,isJson:h}}function at(e){let t=null;e&&i(e);function i(s){if(s=s.toLowerCase(),!["get","post","put","patch","delete"].includes(s))throw new Error("Invalid method.");return t=s,this}function n(){return t}return{setMethod:i,getMethod:n}}function ct(e,t,i){let n=null;i&&s(i);function s(r){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return r instanceof FormData?t.setFormData():l(r)&&(r=m(r),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),r.append("_method","PUT")),n=r,this}function c(){return n}function l(r){for(const a in r){const f=r[a];if(u(f))return!0;if(typeof f=="object"&&l(f))return!0}return!1}function m(r,a=null,f=0){const p=!a;p&&(a=new FormData);for(const h in r){const b=r[h];u(b)?(r[h]="<<FileIndex:"+f+">>",a.append(f,b,b.name),f++):typeof b=="object"&&(r[h]=m(r[h],a,f))}return p?(a.append("payload",JSON.stringify(r)),a):r}function u(r){return typeof File<"u"&&r instanceof File||typeof Blob<"u"&&r instanceof Blob}return{setPayload:s,getPayload:c}}const E=class E{constructor(t={}){C(this,"level",3);C(this,"logger");C(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=E.LEVEL_DEBUG&&B(this.logger.debug,this.prefix,t)}info(...t){this.level<=E.LEVEL_INFO&&B(this.logger.info,this.prefix,t)}warn(...t){this.level<=E.LEVEL_WARN&&B(this.logger.warn,this.prefix,t)}error(...t){this.level<=E.LEVEL_ERROR&&B(this.logger.error,this.prefix,t)}};C(E,"LEVEL_DEBUG",0),C(E,"LEVEL_INFO",1),C(E,"LEVEL_WARN",2),C(E,"LEVEL_ERROR",3),C(E,"LEVEL_OFF",4);let V=E;const B=(e,t,i)=>{t?e(t,...i):e(...i)},S=new V({prefix:"[SDK]"});let ae=null,ce=null,ue=null,le="/",de=null;const ut=()=>ae,lt=e=>{if(S.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");ae=e},dt=()=>ce,mt=e=>{if(S.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");ce=e},ft=()=>de,pt=e=>{de=e},ht=()=>ue,yt=e=>{if(S.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");ue=e},gt=e=>{S.info("[Config] Base Assets Urls:",e),le=e},bt=()=>le,$={getEnvironment:ut,getApiHost:dt,getErrorHandler:ft,setEnvironment:lt,setApiHost:mt,setErrorHandler:pt,getMainAppHost:ht,setMainAppHost:yt,setBaseAssetsUrl:gt,getBaseAssetsUrl:bt};function wt(e){const t=$.getApiHost().replace(/\/$/g,"");let i=null,n={},s={};e&&m(e);function c(){return t+u()+h()}function l(){return u(!0,!0)}function m(d){return i="/"+d.replace(/^\//g,""),this}function u(d=!0,P=!1){return d?i.replace(/:(\w+)/g,(v,I)=>P?"*":s[I]||":"+I):i}function r(d){return n=d,this}function a(d,P){return n[d]=P,this}function f(d){return n[d]&&delete n[d],this}function p(){return Object.keys(n).length>0}function h(d=!0){if(!p())return"";let P="";for(const v in n)if(Array.isArray(n[v]))for(const I of n[v])P+=(P.length?"&":"")+`${v}[]=`+I;else P+=(P.length?"&":"")+v+"="+n[v];return(d?"?":"")+P}function b(d){return s=d,this}function w(d,P){return s[d]=P,this}function k(d){return s[d]&&delete s[d],this}return{setPath:m,getPath:u,getUri:c,getMockUri:l,setQueryParams:r,setQueryParam:a,removeQueryParam:f,hasQuery:p,getQueryString:h,setRouteParams:b,setRouteParam:w,removeRouteParam:k}}function Rt(e){let t=[];function i(){return t=r(arguments),l(),this}function n(){return t.length>0}function s(a){return t.includes(a.trim())?this:(t.push(a.trim()),l(),this)}function c(a){const f=t.indexOf(a.trim());return f===-1?this:(t.splice(f,1),l(),this)}function l(){t.length?e.setQueryParam("groups",u(t)):e.removeQueryParam("groups")}function m(a){return a.split(",").map(f=>f.trim())}function u(a){return a.join(",")}function r(a){let f=[];return a.length===1?typeof a[0]=="string"?f=m(a[0]):Array.isArray(a[0])&&(f=a[0]):f=Array.from(a),f}return{setGroups:i,hasGroups:n,addGroup:s,removeGroup:c}}function At(e){let t=!1,i=!1,n=1,s=10;function c(){return t=!0,l(),this}function l(){i=!0;const h=p(arguments);return r(h.page||1,!1),a(h.perPage||s,!1),f(),this}function m(){return i=!1,f(),this}function u(){return i}function r(h,b=!0){return t=!0,i=!0,n=h,b&&f(),this}function a(h,b=!0){return t=!0,i=!0,s=h,b&&f(),this}function f(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",s)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function p(h){if(h.length===1&&typeof h[0]=="object")return h[0];const b={};return h.length>=1&&(b.page=h[0]),h.length>=2&&(b.perPage=h[1]),b}return{isList:c,paginate:l,disablePagination:m,hasPagination:u,setPage:r,setPerPage:a}}function Pt(e){let t=!1,i="id",n="ASC";function s(){t=!0;const a=r(arguments);return a.orderBy&&l(a.orderBy,!1),a.orderDir&&m(a.orderDir,!1),u(),this}function c(){return t}function l(a,f=!0){return t=!0,i=a,f&&u(),this}function m(a,f=!0){if(a=a.toUpperCase(),["ASC","DESC"].indexOf(a)===-1)throw new Error("Invalid order direction");return t=!0,n=a,f&&u(),this}function u(){c()&&(e.setQueryParam("orderBy",i),e.setQueryParam("orderDirection",n))}function r(a){if(a.length===1&&typeof a[0]=="object")return a[0];const f={};return a.length>=1&&(f.orderBy=a[0]),a.length>=2&&(f.orderDir=a[1]),f}return{setOrder:s,hasOrder:c,setOrderBy:l,setOrderDir:m}}function vt(){let e=!1;function t(){return e=!0,this}function i(){return e}return{setSilent:t,isSilent:i}}function Et(){let e="json";function t(n="json"){if(["arraybuffer","document","json","text","stream","blob"].indexOf(n)===-1)throw new Error("Invalid response type");return e=n,this}function i(){return e}return{setResponseType:t,getResponseType:i}}function It(e){function t(){return e}function i(){return e.data}function n(){return e.data}return{getResponse:t,getData:i,getPayload:n}}function Ct(e,t=!1){let i=!1,n=!1;return e.response?(i=!0,n=!0):e.request&&(i=!0),!t&&$.getErrorHandler()&&$.getErrorHandler()(e),{sent:i,responded:n,error:e}}function St(e){function t(){return e}function i(){return e.data}function n(){return e.data}function s(){return e.data["@type"]==="hydra:Collection"}function c(){return s()?e.data["hydra:member"]:null}function l(){return s()?e.data["hydra:totalItems"]:null}function m(){return s()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function r(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:i,getPayload:n,isCollection:s,getCollection:c,getTotal:l,hasPagination:m,getPage:u,getPages:r}}function kt(e,t,i,n,s,c){async function l(){const u=i.getMethod(),r=t.getUri(),a=e.getHeaders(),f=n.getPayload(),p=[r];["post","put","patch"].includes(u)&&p.push(f||{}),p.push({headers:a,responseType:c.getResponseType()}),S.info("[Request] Sending request:",`[${u.toUpperCase()}]`,r);try{const h=await xe[u](...p);return m(h)}catch(h){throw Ct(h,s.isSilent())}}function m(u){if(u.headers){const r=Object.keys(u.headers),a=r.map(f=>f.toLowerCase()).indexOf("content-type");if(a!==-1&&u.headers[r[a]].includes("application/ld+json"))return St(u)}return It(u)}return{send:l}}function A(e,t="get",i=null){const n=ot(),s=wt(e),c=at(t),l=ct(c,n,i),m=Rt(s),u=At(s),r=Pt(s),a=vt(),f=Et(),p=kt(n,s,c,l,a,f);return{...n,...s,...c,...l,...m,...u,...r,...a,...f,...p}}function y(e,t="get",i=null){const n=A(e,t,i),s=j();s.isAuthenticated()&&n.setAuthorization(s.getAuthToken());const c=n.send;return n.send=async function(){if(!n.hasAuthorization())throw new Error("::SDK Request:: Request cannot be sent, missing authorization header.");return c()},n}const Ot=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Tt=()=>({listByCandidateAndEstablishment:Ot}),$t=(e,t,i)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(i),Lt=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Mt=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),Dt=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),Nt=(e,t)=>y("/v2/candidates/lookup").setQueryParam("email",e).setQueryParam("establishment-id",t),jt=(e,t)=>y("/v2/candidates").setMethod("post").setQueryParam("establishment-id",e).setPayload(t),_t=(e,t,i)=>y("/v2/candidates/:candidateId").setQueryParam("establishment-id",t).setRouteParams({candidateId:e}).setMethod("put").setPayload(i),xt=e=>y("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({registrationToken:e}),Bt=e=>y("/candidate/register/open").setMethod("post").setQueryParam("groups","register:token").setPayload(e),Ut=(e,t)=>y("/establishment/:establishmentId:/candidate/invitation").setRouteParams({establishmentId:e}).setMethod("post").setPayload(t),Vt=()=>({share:$t,isArchived:Lt,archive:Mt,unarchive:Dt,lookupCandidate:Nt,createCandidate:jt,updateCandidate:_t,closeIncompleteRegistration:xt,openNewRegistration:Bt,updateInvitation:Ut}),zt=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),Ft=(e,t,i)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(i),Ht=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),Qt=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),qt=()=>({getForEstablishmentCandidate:zt,postForEstablishmentCandidate:Ft,update:Ht,remove:Qt}),Gt=()=>A("contractType").isList().addGroup("Term:id").addGroup("Term:name"),Kt=(e,t=!0)=>y("contractType/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Wt=()=>({list:Gt,listByEstablishment:Kt}),Jt=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),Zt=e=>y("/v2/talent/mark-as-seen/:talentId").setRouteParams({talentId:e}).setMethod("post"),Xt=()=>({list:Jt,markAsSeen:Zt}),Yt=(e,t,i)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(i),en=()=>({syncCandidateLabels:Yt}),tn=()=>A("diploma").isList().addGroup("Term:id").addGroup("Term:name"),nn=()=>({list:tn}),sn=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),rn=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),on=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),an=e=>y("document/recruiter").setMethod("post").setPayload(e),cn=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),un=()=>({listByCandidate:sn,listByCandidateAndEstablishmentFromRecruiter:rn,listByCandidateAndEstablishmentFromCandidate:on,addFromRecruiter:an,remove:cn}),ln=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),dn=()=>({listByCandidateAndEstablishment:ln}),mn=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),fn=(e,t)=>y("/v2/emails/send").setMethod("post").setPayload({recipientIds:e,...t}),pn=()=>({sendToCandidate:mn,sendToRecipients:fn}),hn=(e,t=!0)=>{const i=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&i.setQueryParam("global",!0),i},yn=()=>y("/v2/self/email-templates").isList().disablePagination(),gn=()=>({listByEstablishment:hn,listSelf:yn}),bn=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),wn=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),Rn=(e,t,i=null)=>{const n=i!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:i}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},An=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Pn=(e,t,i)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(i),vn=()=>({readById:bn,readByState:wn,upsert:Rn,uploadLogoAndBanner:An,publish:Pn}),En=e=>A("establishment/:establishmentId").setRouteParams({establishmentId:e}),In=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),W=()=>({read:En,authorizations:In}),Cn=e=>A("feature-flag/maintenance").setMethod("post").setPayload(e),Sn=(e,t)=>A("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),kn=()=>({maintenanceModeEnabled:Cn,forEstablishment:Sn}),On=()=>A("job").isList().addGroup("Term:id").addGroup("Term:name"),Tn=(e,t=!0)=>y("job/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),$n=()=>({list:On,listByEstablishment:Tn}),Ln=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Mn=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Dn=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),Nn=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),jn=(e,t,i)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(i).setRouteParams({establishmentId:e,candidateId:t}),_n=()=>({listByEstablishment:Ln,addToEstablishment:Mn,update:Dn,remove:Nn,syncForCandidate:jn}),xn=e=>A("offer/:offerId").setRouteParams({offerId:e}),Bn=()=>({read:xn}),Un=(e,t=!1)=>{const i=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&i.setQueryParam("exclude-me",1),i},Vn=()=>({listByEstablishment:Un}),zn=e=>y("/recruitment/:recruitmentId").setRouteParams({recruitmentId:e}),Fn=e=>y("/recruitment/mine/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Hn=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Qn=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),qn=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Gn=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),Kn=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),Wn=()=>({read:zn,mineByEstablishment:Fn,mineWithoutCandidate:Hn,mineWithCandidate:Qn,withCandidate:qn,addCandidates:Gn,removeCandidate:Kn}),Jn=(e,t,i,n=null)=>{const s=A("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=i),t==="offer"&&(c.offerId=i),n&&(c.referer=n),s.setPayload(c),s},Zn=(e,t)=>A("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),Xn=e=>A("candidate/register/read/:token").setRouteParams({token:e}),Yn=e=>A("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),ei=()=>({open:Jn,update:Zn,read:Xn,close:Yn}),ti=(e,t)=>y("/v2/registrations/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),ni=()=>({lookupEstablishment:ti}),ii=()=>A("speciality").isList().addGroup("Term:id").addGroup("Term:name"),si=(e,t=!0)=>y("speciality/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),ri=()=>({list:ii,listByEstablishment:si}),oi=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),ai=()=>({listByEstablishment:oi}),ci=(e,t)=>y("/v2/talents/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),ui=e=>y("/v2/talents/index").setMethod("post").setPayload(e),li=()=>({lookupTalent:ci,addCandidateToTalentPool:ui}),di=e=>A("user/email/isset/:email").setRouteParams({email:e}),mi=()=>y("user/self").addGroup("user:self"),fi=e=>y("/user/:uuid").setRouteParams({uuid:e}),pi=e=>A("/user/:uuid").setRouteParams({uuid:e}),hi=e=>y("/user/:id/uuid").setRouteParams({id:e}),J=()=>({emailExists:di,self:mi,byUuidPrivate:fi,byUuid:pi,fetchUuid:hi});let U;function me(){if(U)return U;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!j().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const r=(await J().self().send()).getData();e.user={id:r.id,email:r.email,firstName:r.firstName,lastName:r.lastName,avatar:r.avatar},e.roles=r.roles},i=async r=>{if(!j().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[r]=(await W().authorizations(r).send()).getData()},n=r=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(r)};return U={fetchSelf:t,fetchPermission:i,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(r,...a)=>{const f=e.establishments[r];if(f===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${r}`);return a.every(p=>f[p]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},U}async function yi(e,...t){if(!j().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=me();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let s=0;s<t.length;s++){const c=t[s];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const gi=Be.defineStore("authorization",{state:()=>({user:void 0,establishments:{}}),getters:{roles:e=>e.user.roles??[],isRH(){return this.roles.includes("ROLE_RH")},isCandidate(){return this.roles.includes("ROLE_CANDIDATE")},isAdmin(){return this.roles.includes("ROLE_ADMIN")}},actions:{async fetchSelf(e){if(this.user===void 0||e){const t=await J().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const i=await W().authorizations(e).send();this.establishments[e]=i.getData()}},hasPermission(e,...t){const i=this.establishments[e];return i===void 0?!1:t.every(n=>i[n]===!0)}}});let D=null;function g(){if(D)return D;const e=$.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),i=!!t,n=e!=="prod"&&e!=="production";let s=null;function c(){return i}function l(){const p=window.analytics=window.analytics||[];if(!p.initialize&&p.invoked)S.error("Segment snippet included twice.");else{p.invoked=!0,p.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],p.factory=function(h){return function(){if(window.analytics.initialized)return window.analytics[h].apply(window.analytics,arguments);const b=Array.prototype.slice.call(arguments);return b.unshift(h),p.push(b),p}};for(let h=0;h<p.methods.length;h++){const b=p.methods[h];p[b]=p.factory(b)}p.load=function(h,b){const w=document.createElement("script");w.id="analytics-script",w.type="text/javascript",w.async=!0,w.src="https://cdn.segment.com/analytics.js/v1/"+h+"/analytics.min.js",w.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const k=document.getElementsByTagName("script")[0];k.parentNode.insertBefore(w,k),p._loadOptions=b},p._writeKey=t,p.SNIPPET_VERSION="4.16.1",p.load(t),p.page(),p.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function m(){return s!==null||(s=new Promise((p,h)=>{if(!c())return f("Analytics is disabled."),p();if(window.addEventListener("analytics-ready",()=>{f("Analytics script loaded successfully."),p()}),window.addEventListener("analytics-error",()=>{f("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),h()}),f("Loading Analytics script."),window.analytics)return p();l()})),s}async function u(p,h){if(!O())try{if(await this.analyticsScriptReady(),f("[identify]",[p,h]),c())return window.analytics.identify(p,h)}catch{f("[identify]",[p,h],"error")}}async function r(p,h,b){if(!O()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),f("[page]",[p,h,b]),c())return window.analytics.page(p,{category:h,...b})}catch(w){console.log(w),f("[page]",[p,h,b],"error")}}}async function a(p,h,b){if(!O()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),f("[track]",[p,h,b]),c())return window.analytics.track(p,{category:h,...b})}catch{f("[track]",[p,h,b],"error")}}}function f(p,h=[],b="info"){h||(h=[]),n&&S[b](`::SDK Analytics:: ${p}`,...h)}return D={analyticsScriptReady:m,isEnabled:c,identify:u,page:r,track:a,consoleMessage:f},D}g.destroy=()=>D=null;function fe(){const e="Hubler Application";function t(r){if(!r)throw new Error(`Missing arguments for domain "${e}"`);const a=!!r.offerId;if(a&&!r.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:r.establishmentId?r.establishmentId.toString():null,jobOfferId:a?r.offerId.toString():null,recruitmentId:a?r.recruitmentId.toString():null,selections:[a?"Application":"Spontaneous Application"]}}async function i(r){return g().page("Application Authentication Viewed",e,t(r))}async function n(r){return g().page("Application Magic Link Viewed",e,t(r))}async function s(r){return g().page("Application Job Viewed",e,t(r))}async function c(r){return g().page("Application Information Viewed",e,t(r))}async function l(r){return g().page("Application Document Viewed",e,t(r))}async function m(r){return g().page("Application Success Viewed",e,t(r))}async function u(r){if(!r.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(r),error:r.error})}return{applicationAuthenticationViewed:i,applicationMagicLinkViewed:n,applicationJobViewed:s,applicationInformationViewed:c,applicationDocumentViewed:l,applicationSuccessViewed:m,applicationFormFailed:u}}function pe(){const e="Profile";function t(d,P){var I;if(!d)throw new Error(`Missing arguments for domain "${e}"`);const v={companyId:d.companyId?d.companyId.toString():null,hublerId:(I=d.hublerId)==null?void 0:I.toString()};return P&&(v.productId=d.companyId?d.companyId+"_2":null),d.recruitmentId&&(v.recruitmentId=d.recruitmentId.toString()),d.selections&&(v.selections=d.selections),d.institutionId&&(v.institutionId=d.institutionId.map(String)),v}async function i(d){return g().track(d.name,e,t(d.properties),!0)}async function n(d){return g().track(d.name,e,t(d.properties,!0))}async function s(d){return g().track(d.name,e,t(d.properties,!0))}async function c(d){return g().track(d.name,e,t(d.properties,!0))}async function l(d){return g().track(d.name,e,t(d.properties,!0))}async function m(d){return g().track(d.name,e,t(d.properties,!0))}async function u(d){return g().track(d.name,e,t(d.properties,!0))}async function r(d){return g().track(d.name,e,t(d.properties,!0))}async function a(d){return g().track(d.name,e,t(d.properties,!0))}async function f(d){return g().track(d.name,e,t(d.properties,!0))}async function p(d){return g().track(d.name,e,t(d.properties,!0))}async function h(d){return g().track(d.name,e,t(d.properties,!0))}async function b(d){return g().track(d.name,e,t(d.properties,!0))}async function w(d){return g().page(d.name,d.properties.category,t(d.properties,!1))}async function k(d){return g().track(d.name,e,t(d.properties,!1))}return{profileDocumentDeleted:i,profileLabelAdded:n,profileLabelRemoved:s,profileShared:c,profileArchived:l,profileCandidateAdded:m,profileCommentAdded:u,profileDocumentAdded:r,profileDocumentDownloaded:a,profileDocumentRequested:f,profileRecruitmentAdded:p,profileRecruitmentRemoved:h,profileTabSelected:b,profileViewed:w,profileEmailSent:k}}function he(){const e="Recruitment";function t(n){if(!n)throw new Error(`Missing arguments for domain "${e}"`);const s={companyId:n.companyId?n.companyId.toString():null};return n.institutionId&&(s.institutionId=[n.institutionId.toString()]),n.origin&&(s.origin=n.origin.toString()),s}async function i(n){return g().track(n.name,e,{...t(n),recruitmentId:n.recruitmentId.toString(),count:parseInt(n.count)})}return{candidateAdded:i}}function ye(){const e="Visual Builder";function t(o,Ne){if(!o)throw new Error(`Missing arguments for domain "${e}"`);const M={companyId:o.companyId?o.companyId.toString():null};return Ne&&(M.productId=o.companyId?o.companyId+"_2":null),o.selections&&(M.selections=o.selections),o.error&&(M.error=o.error),o.institutionId&&(M.institutionId=[o.institutionId.toString()]),M}async function i(o){return g().page(o.name,e,t(o.properties,!0))}async function n(o){return g().track(o.name,e,t(o.properties),!0)}async function s(o){return g().track(o.name,e,t(o.properties,!0))}async function c(o){return g().page(o.name,e,t(o.properties,!0))}async function l(o){return g().page(o.name,e,t(o.properties,!0))}async function m(o){return g().track(o.name,e,t(o.properties,!0))}async function u(o){return g().page(o.name,e,t(o.properties,!0))}async function r(o){return g().page(o.name,e,t(o.properties,!0))}async function a(o){return g().page(o.name,e,t(o.properties,!0))}async function f(o){return g().track(o.name,e,t(o.properties,!0))}async function p(o){return g().page(o.name,e,t(o.properties,!0))}async function h(o){return g().page(o.name,e,t(o.properties,!0))}async function b(o){return g().track(o.name,e,t(o.properties,!0))}async function w(o){return g().track(o.name,e,t(o.properties,!0))}async function k(o){return g().page(o.name,e,t(o.properties,!0))}async function d(o){return g().page(o.name,e,t(o.properties,!0))}async function P(o){return g().page(o.name,e,t(o.properties,!0))}async function v(o){return g().page(o.name,e,t(o.properties,!0))}async function I(o){return g().page(o.name,e,t(o.properties,!1))}async function Ae(o){return g().track(o.name,e,t(o.properties,!0))}async function Pe(o){return g().track(o.name,e,t(o.properties,!0))}async function ve(o){return g().track(o.name,e,t(o.properties,!0))}async function Ee(o){return g().track(o.name,e,t(o.properties,!0))}async function Ie(o){return g().track(o.name,e,t(o.properties,!0))}async function Ce(o){return g().track(o.name,e,t(o.properties,!0))}async function Se(o){return g().track(o.name,e,t(o.properties,!0))}async function ke(o){return g().track(o.name,e,t(o.properties,!0))}async function Oe(o){return g().track(o.name,e,t(o.properties,!0))}async function Te(o){return g().track(o.name,e,t(o.properties,!0))}async function $e(o){return g().track(o.name,e,t(o.properties,!0))}async function Le(o){return g().track(o.name,e,t(o.properties,!0))}async function Me(o){return g().track(o.name,e,t(o.properties,!0))}async function De(o){return g().page(o.name,e,t(o.properties,!1))}return{careerSitePreviewViewed:i,careerSitePublished:n,setupBenefitCustomAdded:s,setupBenefitViewed:c,setupCandidateInformationViewed:l,setupContactAdded:m,setupContactViewed:u,setupEditionDoneViewed:r,setupExternalLinkViewed:a,setupImageUploaded:f,setupImageViewed:p,setupLocationViewed:h,setupPresentationContentAdded:b,setupPresentationNewTabAdded:w,setupPresentationViewed:k,setupSettingsDoneViewed:d,setupSocialNetworkViewed:P,setupThemeViewed:v,visualBuilderViewed:I,setupImageUploadFailed:Ae,fastCopyLinkClicked:Pe,setupBenefitCustomDeleted:ve,setupBenefitCustomEdited:Ee,setupContactDeleted:Ie,setupContactEdited:Ce,setupContactNewClicked:Se,setupPresentationContentDeleted:ke,setupPresentationContentDuplicated:Oe,setupPresentationContentMoved:Te,setupPresentationTabDeleted:$e,setupPresentationTabEdited:Le,setupPresentationTabMoved:Me,setupSEOViewed:De}}const Y=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:fe,useAnalyticsProfile:pe,useAnalyticsRecruitment:he,useAnalyticsVisualBuilder:ye},Symbol.toStringTag,{value:"Module"}));function bi(){function e(i){return g().identify(i.id,{email:i.email,firstName:i.firstname,lastName:i.lastname,createdAt:i.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let i=!1;return function(n){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(i=!0)}(navigator.userAgent||navigator.vendor||window.opera),i}return{identifyCandidate:e}}const wi="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";let ge=!1;const be=()=>new Promise(e=>{O()||ge||window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),Pi())}),Ri=(e,t)=>be().then(()=>{O()||Ai(e,t)}),Ai=(e,t)=>{const i=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(i,"place_changed",()=>{const n=i.getPlace();n.formatted_address&&t&&t(n.formatted_address,n)})},Pi=()=>{window.onGmapScriptReady=()=>{};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+wi+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e),ge=!0},vi={scriptReady:be,autocompleteInput:Ri},Ei={common:{the:"le",from:"de"},timeAgo:{"just-now":"à l'instant",ago:"il y a {0}",in:"dans {0}","last-month":"le mois dernier","next-month":"le mois prochain",month:"mois | mois","last-year":"l'année dernière","next-year":"l'année prochaine",year:"an | ans",yesterday:"hier",tomorrow:"demain",day:"jour | jours","last-week":"la semaine dernière","next-week":"la semaine prochaine",week:"semaine | semaines",hour:"heure | heures",minute:"minute | minutes",second:"seconde | secondes"}},Ii={fr:Ei};let q=null;const we=()=>q,Ci=(e={})=>{let t=e.locale||"fr";const i=u=>t=u,n=()=>t,s=K(Ii,(e==null?void 0:e.messages)||{}),c=(u,r)=>{const a=T(s,`${t}.${u}`);return a?r?Si(a,r):a:u},l=(u,r)=>{const a=T(s,`${t}.${u}`);return a?ki(a,r):u};return q={t:c,tNode:l,setLocale:i,getLocale:n,install:u=>{u.config.globalProperties.$t=c,u.config.globalProperties.$tNode=l}},q},Si=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(i,n)=>T(t,n)):null,ki=(e,t)=>{if(!e)return null;const i=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const s=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(s==="text")return()=>ee.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const l={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((r,a)=>(a[3]===void 0?Q(r,a[1],T(t,a[1])):Q(r,a[1],T(t,a[3])),r),l),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((r,a)=>{let f=a[2];return new RegExp(/^[0-9]*$/).exec(a[2])?f=parseInt(a[2]):new RegExp(/^(true|false)$/).exec(a[2])&&(f=a[2]==="true"),r[a[1]]=f,r},l)),m=>ee[s](c,t,m,l)});return{setup:(n,{slots:s})=>()=>i.map(c=>c(s))}},ee={slot:(e,t,i,n)=>L.h("span",{class:"node node--slot"},i[e.trim()](n)),variable:(e,t)=>L.h("span",{class:"node node--variable"},T(t,e.trim())),text:e=>L.h("span",{class:"node node--text"},e)};function Oi(e){const{t}=we(),i={justNow:t("timeAgo.just-now"),past:n=>n.match(/\d/)?t("timeAgo.ago",[n]):n,future:n=>n.match(/\d/)?t("timeAgo.in",[n]):n,month:(n,s)=>n===1?t(s?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,s)=>n===1?t(s?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,s)=>n===1?t(s?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,s)=>n===1?t(s?"timeAgo.last-week":"timeAgo.next-week"):`${n} ${t("timeAgo.week",n)}`,hour:n=>`${n} ${t("timeAgo.hour",n)}`,minute:n=>`${n} ${t("timeAgo.minute",n)}`,second:n=>`${n} ${t("timeAgo.second",n)}`,invalid:""};return Ue.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:i})}function Ti(){let e=null;function t(){return e}function i(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function s(){return e.action}function c(){return e.arguments}function l(){return!!(e&&e.controller&&e.action)}function m(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((u,r)=>{const a=r.split("=");return a[0]==="controller"||a[0]==="action"?u[a[0]]=decodeURIComponent(a[1]):u.arguments[a[0]]=decodeURIComponent(a[1]),u},{controller:null,action:null,arguments:{}}))}return m(),{getParams:t,getController:i,getControllerComposableName:n,getAction:s,getArguments:c,hasAction:l}}function $i(){async function e({domain:n,event:s,...c}){const l="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(l))throw new Error(`Domain ${n} is not defined`);const m=Y[l]();if(!i(m,s))throw new Error(`Event ${s} is not defined in domain ${n}`);return m[s](c)}function t(n){return!!Y[n]}function i(n,s){return!!n[s]}return{call:e}}const te=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:$i},Symbol.toStringTag,{value:"Module"}));function Li(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!i())throw new Error(`Controller ${e.getController()} not found`);const s=te[e.getControllerComposableName()]();if(!n(s))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return s[e.getAction()](e.getArguments())}function i(){return e.getControllerComposableName()in te}function n(s){return e.getAction()in s}return{dispatch:t}}function Mi(){let e=!1;function t(s,c,l){n(),l()}function i(s,c,l){if(!e)return e=!0,t(s,c,l);l()}function n(){const s=Ti();if(!s.hasAction())return;Li(s).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:i,handle:n}}const Di=()=>({getAssetUrl:t=>`${$.getBaseAssetsUrl()}${t}`}),R=()=>$.getMainAppHost(),Ni=()=>`${R()}/rh/establishments`,ji=e=>`${R()}/rh/establishment/${e}`,_i=e=>{var t;return typeof e=="string"?e:typeof e=="object"&&((t=e==null?void 0:e.urls)!=null&&t.display)?e.urls.display:null},xi=()=>`${R()}/rh/dashboard`,Bi=e=>`${R()}/candidate-invite/establishment/${e}`,Ui=(e,t=!1)=>t?`${R()}/cvbank/${e}`:`${R()}/rh/establishment/${e}/cvtheque`,Vi=(e,t)=>`${R()}/user-profile/establishment/${e}/user/${t}`,zi=e=>`${R()}/rh/establishment/${e}/recruitment`,Fi=(e,t)=>`${R()}/rh/establishment/${e}/recruitment/${t}`,Hi=(e,t)=>`${R()}/rh/establishment/${e}/recruitment/${t}/kanban`,Qi=e=>`${R()}/rh/establishment/${e}/career-configuration`,qi=(e,t=null)=>t?`${R()}/career-website/${e}/${t}`:`${R()}/career-website/${e}`,Gi=(e,t)=>`${R()}/career-website-preview/${e}/${t}`,Ki=(e,t=null)=>{const i=R().replace("://",`://${e}.`);return t?`${i}?_version=${t}`:`${i}`},Wi=e=>`${R()}/rh/establishment/${e}/stats`,Ji=e=>`${R()}/rh/establishment/${e}/backoffice`,Zi=()=>`${R()}/rh/settings/general`;function Xi(){return{root:R,establishments:Ni,establishment:ji,img:_i,dashboard:xi,candidateInvite:Bi,cvtheque:Ui,userProfile:Vi,recruitments:zi,recruitment:Fi,recruitmentKanban:Hi,career:Qi,careerConfig:qi,careerPreview:Gi,careerWebsite:Ki,statistics:Wi,backoffice:Ji,userSettings:Zi}}const ne=new Set;let N,G={ignore:e=>e.startsWith("Ui")};const H=e=>{if(e!=null&&e.classList){e._cssChecked=!0;for(const t of e.classList)N.has(t)||ne.has(t)||G.ignore(t)||(ne.add(t),S.error(`Undefined CSS class: ${t}`))}},Re=e=>{var t;for(const i of e)if(i!=null&&i.cssRules&&(i==null?void 0:i.cssRules.length)>0)Re(i.cssRules);else if(i.selectorText){const n=(t=i.selectorText)==null?void 0:t.match(/\.[\w-]+/g);if(n)for(const s of n)N.add(s.substr(1))}},Yi=(e={})=>{if(N)return N;N=new Set,G={...G,...e},Re(document.styleSheets),new MutationObserver(i=>{for(const n of i)if(n.type==="childList"&&(n!=null&&n.addedNodes)){for(const s of n.addedNodes)if(!(s.nodeType===3||s.nodeType===8)){H(s);for(const c of s.querySelectorAll("*"))H(c)}}else(n==null?void 0:n.attributeName)==="class"&&H(n.target)}).observe(document,{attributes:!0,childList:!0,subtree:!0})},es="0.2.62";exports.BaseLogger=V;exports.Gmap=vi;exports.SDKConfig=$;exports.SDKLogger=S;exports.VERSION=es;exports._clone=se;exports._get=T;exports._merge=K;exports._set=Q;exports.createI18n=Ci;exports.ensureScheme=it;exports.inBrowser=tt;exports.inNode=O;exports.secureScheme=nt;exports.useActivityRepository=Tt;exports.useAnalyticsHublerApplication=fe;exports.useAnalyticsIdentify=bi;exports.useAnalyticsProfile=pe;exports.useAnalyticsRecruitment=he;exports.useAnalyticsVisualBuilder=ye;exports.useAssetUrls=Di;exports.useAuthentication=j;exports.useAuthorization=me;exports.useAuthorizationStore=gi;exports.useCanAccessEstablishmentMiddleware=yi;exports.useCandidateRepository=Vt;exports.useCommentRepository=qt;exports.useContractTypeRepository=Wt;exports.useCookieStorage=oe;exports.useCvbankRepository=Xt;exports.useCvthequeRepository=en;exports.useDiplomaRepository=nn;exports.useDocumentRepository=un;exports.useDomainUrls=Xi;exports.useEmailHistoryRepository=dn;exports.useEmailRepository=pn;exports.useEmailTemplateRepository=gn;exports.useEstablishmentCareerRepository=vn;exports.useEstablishmentRepository=W;exports.useFeatureFlagRepository=kn;exports.useI18n=we;exports.useJobRepository=$n;exports.useLabelRepository=_n;exports.useLocaleTimeAgo=Oi;exports.useOfferRepository=Bn;exports.usePrivateRequest=y;exports.useQSAction=Mi;exports.useRecruiterRepository=Vn;exports.useRecruitmentRepository=Wn;exports.useRegisterRepository=ei;exports.useRegistrationRepository=ni;exports.useRequest=A;exports.useSpecialityRepository=ri;exports.useTagRepository=ai;exports.useTalentRepository=li;exports.useUndefinedCssClasses=Yi;exports.useUserRepository=J;
|
|
6
|
+
*/var ae=Xe,te=Ye,Ze=Object.prototype.toString,x=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Xe(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var i={},n=t||{},s=n.decode||et,c=0;c<e.length;){var l=e.indexOf("=",c);if(l===-1)break;var m=e.indexOf(";",c);if(m===-1)m=e.length;else if(m<l){c=e.lastIndexOf(";",l-1)+1;continue}var u=e.slice(c,l).trim();if(i[u]===void 0){var r=e.slice(l+1,m).trim();r.charCodeAt(0)===34&&(r=r.slice(1,-1)),i[u]=it(r,s)}c=m+1}return i}function Ye(e,t,i){var n=i||{},s=n.encode||tt;if(typeof s!="function")throw new TypeError("option encode is invalid");if(!x.test(e))throw new TypeError("argument name is invalid");var c=s(t);if(c&&!x.test(c))throw new TypeError("argument val is invalid");var l=e+"="+c;if(n.maxAge!=null){var m=n.maxAge-0;if(isNaN(m)||!isFinite(m))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(m)}if(n.domain){if(!x.test(n.domain))throw new TypeError("option domain is invalid");l+="; Domain="+n.domain}if(n.path){if(!x.test(n.path))throw new TypeError("option path is invalid");l+="; Path="+n.path}if(n.expires){var u=n.expires;if(!nt(u)||isNaN(u.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+u.toUTCString()}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.partitioned&&(l+="; Partitioned"),n.priority){var r=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(r){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var a=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(a){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l}function et(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function tt(e){return encodeURIComponent(e)}function nt(e){return Ze.call(e)==="[object Date]"||e instanceof Date}function it(e,t){try{return t(e)}catch{return e}}function st(){const e=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof e=="boolean"?e:typeof document=="object"&&typeof document.cookie=="string"}function rt(e){return typeof e=="string"?ae(e):typeof e=="object"&&e!==null?e:{}}function H(e,t={}){const i=ot(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}function ot(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class at{constructor(t,i={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const s=this.cookies;this.cookies=ae(document.cookie),this._checkChanges(s)};const n=typeof document>"u"?"":document.cookie;this.cookies=rt(t||n),this.defaultSetOptions=i,this.HAS_DOCUMENT_COOKIE=st()}_emitChange(t){for(let i=0;i<this.changeListeners.length;++i)this.changeListeners[i](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:H(this.cookies[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,i={}){return i.doNotUpdate||this.update(),H(this.cookies[t],i)}getAll(t={}){t.doNotUpdate||this.update();const i={};for(let n in this.cookies)i[n]=H(this.cookies[n],t);return i}set(t,i,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const s=typeof i=="string"?i:JSON.stringify(i);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:s}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=te(t,s,n)),this._emitChange({name:t,value:i,options:n})}remove(t,i){const n=i=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),i),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=te(t,"",n)),this._emitChange({name:t,value:void 0,options:i})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const i=this.changeListeners.indexOf(t);i>=0&&this.changeListeners.splice(i,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}function ct(e,{doNotParse:t=!1,autoUpdateDependencies:i=!1}={},n=new at){const s=i?[...e||[]]:e;let c=n.getAll({doNotParse:!0});const l=$.ref(0),m=()=>{const u=n.getAll({doNotParse:!0});ut(s||null,u,c)&&l.value++,c=u};return n.addChangeListener(m),Je(()=>{n.removeChangeListener(m)}),{get:(...u)=>(i&&s&&!s.includes(u[0])&&s.push(u[0]),l.value,n.get(u[0],{doNotParse:t,...u[1]})),getAll:(...u)=>(l.value,n.getAll({doNotParse:t,...u[0]})),set:(...u)=>n.set(...u),remove:(...u)=>n.remove(...u),addChangeListener:(...u)=>n.addChangeListener(...u),removeChangeListener:(...u)=>n.removeChangeListener(...u)}}function ut(e,t,i){if(!e)return!0;for(const n of e)if(t[n]!==i[n])return!0;return!1}const lt=()=>{let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},dt=()=>typeof window<"u"&&typeof window.document<"u",T=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,L=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t];let s=e;const c=m=>m!=null,l=m=>typeof m=="object";for(const[m,u]of n.entries()){if(!c(s))return i;if(m===n.length-1)return c(s[u])?s[u]:i;if(!l(s[u]))return i;s=s[u]}return i},G=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t],s=m=>typeof m=="number"||/^\d$/g.test(m),c=m=>parseInt(m,10);let l=e;return n.forEach((m,u)=>{if(u===n.length-1)l[m]=i;else{const r=s(n[u+1])?[]:{};m=s(m)?c(m):m,l[m]=l[m]??r,l=l[m]}}),e},ce=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},Z=(e,t)=>{const i={...e};for(const[n,s]of Object.entries(t))n in i&&typeof i[n]=="object"&&typeof s=="object"?i[n]=Z(i[n],s):i[n]=ce(s);return i},mt=e=>typeof e=="boolean",pt=e=>typeof e=="number",ft=e=>typeof e=="string",X=e=>Array.isArray(e),ue=e=>typeof e=="object"&&!X(e)&&e!==null,ht=e=>e instanceof Date,yt=e=>typeof e=="function",le=e=>e===null,de=e=>e===void 0,me=e=>le(e)||de(e),gt=e=>!me(e),bt=e=>!!e,wt=e=>!e,At=(e,t)=>X(e)&&e.every(i=>t(i)),vt=(e,t)=>ue(e)&&Object.values(e).every(i=>t(i)),Rt=e=>e.startsWith("http:")?e.replace("http:","https:"):e,Pt=(e,t=!1)=>e.startsWith("http:")||e.startsWith("https:")?e:t?`https://${e}`:`http://${e}`,pe=()=>typeof window<"u"&&(window!=null&&window.location)?new URL(window.location).hostname:void 0,ne=()=>{const e=pe();return!e||e==="localhost"?e:`.${e}`},kt=()=>({path:"/"}),Et=e=>({path:"/",domain:e,sameSite:"none",secure:!0}),q=e=>{if(!(T()||!e))return e.startsWith("localhost")?kt():Et(e)};function fe(){const e=ct(),t=c=>e.get(c),i=(c,l)=>e.set(c,l,q(ne())),n=c=>{e.remove(c),e.remove(c,q(pe())),e.remove(c,q(ne()))};return{getItem:t,setItem:i,removeItem:n,clear:()=>Object.keys(e.getAll()).forEach(c=>n(c))}}let _=null;function j(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=fe()){if(_)return _;function i(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function s(){return t.getItem(e.expiration)}function c(f,h){const b=a(f);if(!b.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,f),t.setItem(e.refresh,h),t.setItem(e.expiration,((b.exp-60)*1e3).toString())}function l(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function m(){return u()&&!r()}function u(){return!!i()}function r(){const f=s();return f?new Date(f)<new Date:!0}function a(f){return JSON.parse(atob(f.split(".")[1]))}function p(){return t}return _={keys:e,getAuthToken:i,getRefreshToken:n,getExpiration:s,authenticate:c,clear:l,isAuthenticated:m,hasAuth:u,isExpired:r,getStorage:p},_}function It(e){let t={"Content-Type":"application/json"};e&&i(e);function i(b,w=!1){return t=w?b:{...t,...b},this}function n(){return t}function s(b,w){return t[b]=w,this}function c(b){return t[b]}function l(b){return t[b]&&delete t[b],this}function m(b){return s("Authorization","Bearer "+b),this}function u(){return l("Authorization"),this}function r(){return!!c("Authorization")}function a(){return s("Content-Type","multipart/form-data"),this}function p(){return s("Content-Type","application/json"),this}function f(){return c("Content-Type")==="multipart/form-data"}function h(){return c("Content-Type")==="application/json"}return{setHeaders:i,getHeaders:n,setHeader:s,getHeader:c,removeHeader:l,setAuthorization:m,removeAuthorization:u,hasAuthorization:r,setFormData:a,setJson:p,isFormData:f,isJson:h}}function Ct(e){let t=null;e&&i(e);function i(s){if(s=s.toLowerCase(),!["get","post","put","patch","delete"].includes(s))throw new Error("Invalid method.");return t=s,this}function n(){return t}return{setMethod:i,getMethod:n}}function St(e,t,i){let n=null;i&&s(i);function s(r){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return r instanceof FormData?t.setFormData():l(r)&&(r=m(r),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),r.append("_method","PUT")),n=r,this}function c(){return n}function l(r){for(const a in r){const p=r[a];if(u(p))return!0;if(typeof p=="object"&&l(p))return!0}return!1}function m(r,a=null,p=0){const f=!a;f&&(a=new FormData);for(const h in r){const b=r[h];u(b)?(r[h]="<<FileIndex:"+p+">>",a.append(p,b,b.name),p++):typeof b=="object"&&(r[h]=m(r[h],a,p))}return f?(a.append("payload",JSON.stringify(r)),a):r}function u(r){return typeof File<"u"&&r instanceof File||typeof Blob<"u"&&r instanceof Blob}return{setPayload:s,getPayload:c}}const E=class E{constructor(t={}){C(this,"level",3);C(this,"logger");C(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=E.LEVEL_DEBUG&&B(this.logger.debug,this.prefix,t)}info(...t){this.level<=E.LEVEL_INFO&&B(this.logger.info,this.prefix,t)}warn(...t){this.level<=E.LEVEL_WARN&&B(this.logger.warn,this.prefix,t)}error(...t){this.level<=E.LEVEL_ERROR&&B(this.logger.error,this.prefix,t)}};C(E,"LEVEL_DEBUG",0),C(E,"LEVEL_INFO",1),C(E,"LEVEL_WARN",2),C(E,"LEVEL_ERROR",3),C(E,"LEVEL_OFF",4);let F=E;const B=(e,t,i)=>{t?e(t,...i):e(...i)},A=new F({prefix:"[SDK]"});let he=null,ye=null,ge=null,be="/",we=null;const Ot=()=>he,Tt=e=>{if(A.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");he=e},Lt=()=>ye,$t=e=>{if(A.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");ye=e},Mt=()=>we,Nt=e=>{we=e},Dt=()=>ge,jt=e=>{if(A.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");ge=e},xt=e=>{A.info("[Config] Base Assets Urls:",e),be=e},_t=()=>be,O={getEnvironment:Ot,getApiHost:Lt,getErrorHandler:Mt,setEnvironment:Tt,setApiHost:$t,setErrorHandler:Nt,getMainAppHost:Dt,setMainAppHost:jt,setBaseAssetsUrl:xt,getBaseAssetsUrl:_t};function Bt(e){const t=O.getApiHost().replace(/\/$/g,"");let i=null,n={},s={};e&&m(e);function c(){return t+u()+h()}function l(){return u(!0,!0)}function m(d){return i="/"+d.replace(/^\//g,""),this}function u(d=!0,P=!1){return d?i.replace(/:(\w+)/g,(k,I)=>P?"*":s[I]||":"+I):i}function r(d){return n=d,this}function a(d,P){return n[d]=P,this}function p(d){return n[d]&&delete n[d],this}function f(){return Object.keys(n).length>0}function h(d=!0){if(!f())return"";let P="";for(const k in n)if(Array.isArray(n[k]))for(const I of n[k])P+=(P.length?"&":"")+`${k}[]=`+I;else P+=(P.length?"&":"")+k+"="+n[k];return(d?"?":"")+P}function b(d){return s=d,this}function w(d,P){return s[d]=P,this}function S(d){return s[d]&&delete s[d],this}return{setPath:m,getPath:u,getUri:c,getMockUri:l,setQueryParams:r,setQueryParam:a,removeQueryParam:p,hasQuery:f,getQueryString:h,setRouteParams:b,setRouteParam:w,removeRouteParam:S}}function Ut(e){let t=[];function i(){return t=r(arguments),l(),this}function n(){return t.length>0}function s(a){return t.includes(a.trim())?this:(t.push(a.trim()),l(),this)}function c(a){const p=t.indexOf(a.trim());return p===-1?this:(t.splice(p,1),l(),this)}function l(){t.length?e.setQueryParam("groups",u(t)):e.removeQueryParam("groups")}function m(a){return a.split(",").map(p=>p.trim())}function u(a){return a.join(",")}function r(a){let p=[];return a.length===1?typeof a[0]=="string"?p=m(a[0]):Array.isArray(a[0])&&(p=a[0]):p=Array.from(a),p}return{setGroups:i,hasGroups:n,addGroup:s,removeGroup:c}}function zt(e){let t=!1,i=!1,n=1,s=10;function c(){return t=!0,l(),this}function l(){i=!0;const h=f(arguments);return r(h.page||1,!1),a(h.perPage||s,!1),p(),this}function m(){return i=!1,p(),this}function u(){return i}function r(h,b=!0){return t=!0,i=!0,n=h,b&&p(),this}function a(h,b=!0){return t=!0,i=!0,s=h,b&&p(),this}function p(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",s)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function f(h){if(h.length===1&&typeof h[0]=="object")return h[0];const b={};return h.length>=1&&(b.page=h[0]),h.length>=2&&(b.perPage=h[1]),b}return{isList:c,paginate:l,disablePagination:m,hasPagination:u,setPage:r,setPerPage:a}}function Ft(e){let t=!1,i="id",n="ASC";function s(){t=!0;const a=r(arguments);return a.orderBy&&l(a.orderBy,!1),a.orderDir&&m(a.orderDir,!1),u(),this}function c(){return t}function l(a,p=!0){return t=!0,i=a,p&&u(),this}function m(a,p=!0){if(a=a.toUpperCase(),["ASC","DESC"].indexOf(a)===-1)throw new Error("Invalid order direction");return t=!0,n=a,p&&u(),this}function u(){c()&&(e.setQueryParam("orderBy",i),e.setQueryParam("orderDirection",n))}function r(a){if(a.length===1&&typeof a[0]=="object")return a[0];const p={};return a.length>=1&&(p.orderBy=a[0]),a.length>=2&&(p.orderDir=a[1]),p}return{setOrder:s,hasOrder:c,setOrderBy:l,setOrderDir:m}}function Vt(){let e=!1;function t(){return e=!0,this}function i(){return e}return{setSilent:t,isSilent:i}}function Ht(){let e="json";function t(n="json"){if(["arraybuffer","document","json","text","stream","blob"].indexOf(n)===-1)throw new Error("Invalid response type");return e=n,this}function i(){return e}return{setResponseType:t,getResponseType:i}}function qt(e){function t(){return e}function i(){return e.data}function n(){return e.data}return{getResponse:t,getData:i,getPayload:n}}function Qt(e,t=!1){let i=!1,n=!1;return e.response?(i=!0,n=!0):e.request&&(i=!0),!t&&O.getErrorHandler()&&O.getErrorHandler()(e),{sent:i,responded:n,error:e}}function Gt(e){function t(){return e}function i(){return e.data}function n(){return e.data}function s(){return e.data["@type"]==="hydra:Collection"}function c(){return s()?e.data["hydra:member"]:null}function l(){return s()?e.data["hydra:totalItems"]:null}function m(){return s()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function r(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:i,getPayload:n,isCollection:s,getCollection:c,getTotal:l,hasPagination:m,getPage:u,getPages:r}}function Kt(e,t,i,n,s,c){async function l(){const u=i.getMethod(),r=t.getUri(),a=e.getHeaders(),p=n.getPayload(),f=[r];["post","put","patch"].includes(u)&&f.push(p||{}),f.push({headers:a,responseType:c.getResponseType()}),A.info("[Request] Sending request:",`[${u.toUpperCase()}]`,r);try{const h=await Ge[u](...f);return m(h)}catch(h){throw Qt(h,s.isSilent())}}function m(u){if(u.headers){const r=Object.keys(u.headers),a=r.map(p=>p.toLowerCase()).indexOf("content-type");if(a!==-1&&u.headers[r[a]].includes("application/ld+json"))return Gt(u)}return qt(u)}return{send:l}}function R(e,t="get",i=null){const n=It(),s=Bt(e),c=Ct(t),l=St(c,n,i),m=Ut(s),u=zt(s),r=Ft(s),a=Vt(),p=Ht(),f=Kt(n,s,c,l,a,p);return{...n,...s,...c,...l,...m,...u,...r,...a,...p,...f}}function y(e,t="get",i=null){const n=R(e,t,i),s=j();s.isAuthenticated()&&n.setAuthorization(s.getAuthToken());const c=n.send;return n.send=async function(){if(!n.hasAuthorization())throw new Error("::SDK Request:: Request cannot be sent, missing authorization header.");return c()},n}const Wt=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Jt=()=>({listByCandidateAndEstablishment:Wt}),Zt=(e,t,i)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(i),Xt=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Yt=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),en=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),tn=(e,t)=>y("/v2/candidates/lookup").setQueryParam("email",e).setQueryParam("establishment-id",t),nn=(e,t)=>y("/v2/candidates").setMethod("post").setQueryParam("establishment-id",e).setPayload(t),sn=(e,t,i)=>y("/v2/candidates/:candidateId").setQueryParam("establishment-id",t).setRouteParams({candidateId:e}).setMethod("put").setPayload(i),rn=e=>y("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({registrationToken:e}),on=e=>y("/candidate/register/open").setMethod("post").setQueryParam("groups","register:token").setPayload(e),an=(e,t)=>y("/establishment/:establishmentId:/candidate/invitation").setRouteParams({establishmentId:e}).setMethod("post").setPayload(t),cn=()=>({share:Zt,isArchived:Xt,archive:Yt,unarchive:en,lookupCandidate:tn,createCandidate:nn,updateCandidate:sn,closeIncompleteRegistration:rn,openNewRegistration:on,updateInvitation:an}),un=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),ln=(e,t,i)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(i),dn=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),mn=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),pn=()=>({getForEstablishmentCandidate:un,postForEstablishmentCandidate:ln,update:dn,remove:mn}),fn=()=>R("contractType").isList().addGroup("Term:id").addGroup("Term:name"),hn=(e,t=!0)=>y("contractType/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),yn=()=>({list:fn,listByEstablishment:hn}),gn=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),bn=e=>y("/v2/talent/mark-as-seen/:talentId").setRouteParams({talentId:e}).setMethod("post"),wn=()=>({list:gn,markAsSeen:bn}),An=(e,t,i)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(i),vn=()=>({syncCandidateLabels:An}),Rn=()=>R("diploma").isList().addGroup("Term:id").addGroup("Term:name"),Pn=()=>({list:Rn}),kn=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),En=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),In=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),Cn=e=>y("document/recruiter").setMethod("post").setPayload(e),Sn=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),On=()=>({listByCandidate:kn,listByCandidateAndEstablishmentFromRecruiter:En,listByCandidateAndEstablishmentFromCandidate:In,addFromRecruiter:Cn,remove:Sn}),Tn=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),Ln=()=>({listByCandidateAndEstablishment:Tn}),$n=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),Mn=(e,t)=>y("/v2/emails/send").setMethod("post").setPayload({recipientIds:e,...t}),Nn=()=>({sendToCandidate:$n,sendToRecipients:Mn}),Dn=(e,t=!0)=>{const i=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&i.setQueryParam("global",!0),i},jn=()=>y("/v2/self/email-templates").isList().disablePagination(),xn=()=>({listByEstablishment:Dn,listSelf:jn}),_n=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),Bn=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),Un=(e,t,i=null)=>{const n=i!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:i}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},zn=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Fn=(e,t,i)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(i),Vn=()=>({readById:_n,readByState:Bn,upsert:Un,uploadLogoAndBanner:zn,publish:Fn}),Hn=e=>R("establishment/:establishmentId").setRouteParams({establishmentId:e}),qn=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),Y=()=>({read:Hn,authorizations:qn}),Qn=e=>R("feature-flag/maintenance").setMethod("post").setPayload(e),Gn=(e,t)=>R("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),Kn=()=>({maintenanceModeEnabled:Qn,forEstablishment:Gn}),Wn=()=>R("job").isList().addGroup("Term:id").addGroup("Term:name"),Jn=(e,t=!0)=>y("job/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Zn=()=>({list:Wn,listByEstablishment:Jn}),Xn=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Yn=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),ei=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),ti=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),ni=(e,t,i)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(i).setRouteParams({establishmentId:e,candidateId:t}),ii=()=>({listByEstablishment:Xn,addToEstablishment:Yn,update:ei,remove:ti,syncForCandidate:ni}),si=e=>R("offer/:offerId").setRouteParams({offerId:e}),ri=()=>({read:si}),oi=(e,t=!1)=>{const i=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&i.setQueryParam("exclude-me",1),i},ai=()=>({listByEstablishment:oi}),ci=e=>y("/recruitment/:recruitmentId").setRouteParams({recruitmentId:e}),ui=e=>y("/recruitment/mine/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),li=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),di=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),mi=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),pi=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),fi=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),hi=()=>({read:ci,mineByEstablishment:ui,mineWithoutCandidate:li,mineWithCandidate:di,withCandidate:mi,addCandidates:pi,removeCandidate:fi}),yi=(e,t,i,n=null)=>{const s=R("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=i),t==="offer"&&(c.offerId=i),n&&(c.referer=n),s.setPayload(c),s},gi=(e,t)=>R("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),bi=e=>R("candidate/register/read/:token").setRouteParams({token:e}),wi=e=>R("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),Ai=()=>({open:yi,update:gi,read:bi,close:wi}),vi=(e,t)=>y("/v2/registrations/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Ri=()=>({lookupEstablishment:vi}),Pi=()=>R("speciality").isList().addGroup("Term:id").addGroup("Term:name"),ki=(e,t=!0)=>y("speciality/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Ei=()=>({list:Pi,listByEstablishment:ki}),Ii=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Ci=()=>({listByEstablishment:Ii}),Si=(e,t)=>y("/v2/talents/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Oi=e=>y("/v2/talents/index").setMethod("post").setPayload(e),Ti=()=>({lookupTalent:Si,addCandidateToTalentPool:Oi}),Li=e=>R("user/email/isset/:email").setRouteParams({email:e}),$i=()=>y("user/self").addGroup("user:self"),Mi=e=>y("/user/:uuid").setRouteParams({uuid:e}),Ni=e=>R("/user/:uuid").setRouteParams({uuid:e}),Di=e=>y("/user/:id/uuid").setRouteParams({id:e}),ee=()=>({emailExists:Li,self:$i,byUuidPrivate:Mi,byUuid:Ni,fetchUuid:Di});let U;function Ae(){if(U)return U;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!j().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const r=(await ee().self().send()).getData();e.user={id:r.id,email:r.email,firstName:r.firstName,lastName:r.lastName,avatar:r.avatar},e.roles=r.roles},i=async r=>{if(!j().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[r]=(await Y().authorizations(r).send()).getData()},n=r=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(r)};return U={fetchSelf:t,fetchPermission:i,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(r,...a)=>{const p=e.establishments[r];if(p===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${r}`);return a.every(f=>p[f]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},U}async function ji(e,...t){if(!j().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=Ae();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let s=0;s<t.length;s++){const c=t[s];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const xi=Ke.defineStore("authorization",{state:()=>({user:void 0,establishments:{}}),getters:{roles:e=>e.user.roles??[],isRH(){return this.roles.includes("ROLE_RH")},isCandidate(){return this.roles.includes("ROLE_CANDIDATE")},isAdmin(){return this.roles.includes("ROLE_ADMIN")}},actions:{async fetchSelf(e){if(this.user===void 0||e){const t=await ee().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const i=await Y().authorizations(e).send();this.establishments[e]=i.getData()}},hasPermission(e,...t){const i=this.establishments[e];return i===void 0?!1:t.every(n=>i[n]===!0)}}});let N=null;function g(){if(N)return N;const e=O.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),i=!!t,n=e!=="prod"&&e!=="production";let s=null;function c(){return i}function l(){const f=window.analytics=window.analytics||[];if(!f.initialize&&f.invoked)A.error("Segment snippet included twice.");else{f.invoked=!0,f.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],f.factory=function(h){return function(){if(window.analytics.initialized)return window.analytics[h].apply(window.analytics,arguments);const b=Array.prototype.slice.call(arguments);return b.unshift(h),f.push(b),f}};for(let h=0;h<f.methods.length;h++){const b=f.methods[h];f[b]=f.factory(b)}f.load=function(h,b){const w=document.createElement("script");w.id="analytics-script",w.type="text/javascript",w.async=!0,w.src="https://cdn.segment.com/analytics.js/v1/"+h+"/analytics.min.js",w.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(w,S),f._loadOptions=b},f._writeKey=t,f.SNIPPET_VERSION="4.16.1",f.load(t),f.page(),f.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function m(){return s!==null||(s=new Promise((f,h)=>{if(!c())return p("Analytics is disabled."),f();if(window.addEventListener("analytics-ready",()=>{p("Analytics script loaded successfully."),f()}),window.addEventListener("analytics-error",()=>{p("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),h()}),p("Loading Analytics script."),window.analytics)return f();l()})),s}async function u(f,h){if(!T())try{if(await this.analyticsScriptReady(),p("[identify]",[f,h]),c())return window.analytics.identify(f,h)}catch{p("[identify]",[f,h],"error")}}async function r(f,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),p("[page]",[f,h,b]),c())return window.analytics.page(f,{category:h,...b})}catch(w){console.log(w),p("[page]",[f,h,b],"error")}}}async function a(f,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),p("[track]",[f,h,b]),c())return window.analytics.track(f,{category:h,...b})}catch{p("[track]",[f,h,b],"error")}}}function p(f,h=[],b="info"){h||(h=[]),n&&A[b](`::SDK Analytics:: ${f}`,...h)}return N={analyticsScriptReady:m,isEnabled:c,identify:u,page:r,track:a,consoleMessage:p},N}g.destroy=()=>N=null;function ve(){const e="Hubler Application";function t(r){if(!r)throw new Error(`Missing arguments for domain "${e}"`);const a=!!r.offerId;if(a&&!r.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:r.establishmentId?r.establishmentId.toString():null,jobOfferId:a?r.offerId.toString():null,recruitmentId:a?r.recruitmentId.toString():null,selections:[a?"Application":"Spontaneous Application"]}}async function i(r){return g().page("Application Authentication Viewed",e,t(r))}async function n(r){return g().page("Application Magic Link Viewed",e,t(r))}async function s(r){return g().page("Application Job Viewed",e,t(r))}async function c(r){return g().page("Application Information Viewed",e,t(r))}async function l(r){return g().page("Application Document Viewed",e,t(r))}async function m(r){return g().page("Application Success Viewed",e,t(r))}async function u(r){if(!r.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(r),error:r.error})}return{applicationAuthenticationViewed:i,applicationMagicLinkViewed:n,applicationJobViewed:s,applicationInformationViewed:c,applicationDocumentViewed:l,applicationSuccessViewed:m,applicationFormFailed:u}}function Re(){const e="Profile";function t(d,P){var I;if(!d)throw new Error(`Missing arguments for domain "${e}"`);const k={companyId:d.companyId?d.companyId.toString():null,hublerId:(I=d.hublerId)==null?void 0:I.toString()};return P&&(k.productId=d.companyId?d.companyId+"_2":null),d.recruitmentId&&(k.recruitmentId=d.recruitmentId.toString()),d.selections&&(k.selections=d.selections),d.institutionId&&(k.institutionId=d.institutionId.map(String)),k}async function i(d){return g().track(d.name,e,t(d.properties),!0)}async function n(d){return g().track(d.name,e,t(d.properties,!0))}async function s(d){return g().track(d.name,e,t(d.properties,!0))}async function c(d){return g().track(d.name,e,t(d.properties,!0))}async function l(d){return g().track(d.name,e,t(d.properties,!0))}async function m(d){return g().track(d.name,e,t(d.properties,!0))}async function u(d){return g().track(d.name,e,t(d.properties,!0))}async function r(d){return g().track(d.name,e,t(d.properties,!0))}async function a(d){return g().track(d.name,e,t(d.properties,!0))}async function p(d){return g().track(d.name,e,t(d.properties,!0))}async function f(d){return g().track(d.name,e,t(d.properties,!0))}async function h(d){return g().track(d.name,e,t(d.properties,!0))}async function b(d){return g().track(d.name,e,t(d.properties,!0))}async function w(d){return g().page(d.name,d.properties.category,t(d.properties,!1))}async function S(d){return g().track(d.name,e,t(d.properties,!1))}return{profileDocumentDeleted:i,profileLabelAdded:n,profileLabelRemoved:s,profileShared:c,profileArchived:l,profileCandidateAdded:m,profileCommentAdded:u,profileDocumentAdded:r,profileDocumentDownloaded:a,profileDocumentRequested:p,profileRecruitmentAdded:f,profileRecruitmentRemoved:h,profileTabSelected:b,profileViewed:w,profileEmailSent:S}}function Pe(){const e="Recruitment";function t(n){if(!n)throw new Error(`Missing arguments for domain "${e}"`);const s={companyId:n.companyId?n.companyId.toString():null};return n.institutionId&&(s.institutionId=[n.institutionId.toString()]),n.origin&&(s.origin=n.origin.toString()),s}async function i(n){return g().track(n.name,e,{...t(n),recruitmentId:n.recruitmentId.toString(),count:parseInt(n.count)})}return{candidateAdded:i}}function ke(){const e="Visual Builder";function t(o,He){if(!o)throw new Error(`Missing arguments for domain "${e}"`);const M={companyId:o.companyId?o.companyId.toString():null};return He&&(M.productId=o.companyId?o.companyId+"_2":null),o.selections&&(M.selections=o.selections),o.error&&(M.error=o.error),o.institutionId&&(M.institutionId=[o.institutionId.toString()]),M}async function i(o){return g().page(o.name,e,t(o.properties,!0))}async function n(o){return g().track(o.name,e,t(o.properties),!0)}async function s(o){return g().track(o.name,e,t(o.properties,!0))}async function c(o){return g().page(o.name,e,t(o.properties,!0))}async function l(o){return g().page(o.name,e,t(o.properties,!0))}async function m(o){return g().track(o.name,e,t(o.properties,!0))}async function u(o){return g().page(o.name,e,t(o.properties,!0))}async function r(o){return g().page(o.name,e,t(o.properties,!0))}async function a(o){return g().page(o.name,e,t(o.properties,!0))}async function p(o){return g().track(o.name,e,t(o.properties,!0))}async function f(o){return g().page(o.name,e,t(o.properties,!0))}async function h(o){return g().page(o.name,e,t(o.properties,!0))}async function b(o){return g().track(o.name,e,t(o.properties,!0))}async function w(o){return g().track(o.name,e,t(o.properties,!0))}async function S(o){return g().page(o.name,e,t(o.properties,!0))}async function d(o){return g().page(o.name,e,t(o.properties,!0))}async function P(o){return g().page(o.name,e,t(o.properties,!0))}async function k(o){return g().page(o.name,e,t(o.properties,!0))}async function I(o){return g().page(o.name,e,t(o.properties,!1))}async function Te(o){return g().track(o.name,e,t(o.properties,!0))}async function Le(o){return g().track(o.name,e,t(o.properties,!0))}async function $e(o){return g().track(o.name,e,t(o.properties,!0))}async function Me(o){return g().track(o.name,e,t(o.properties,!0))}async function Ne(o){return g().track(o.name,e,t(o.properties,!0))}async function De(o){return g().track(o.name,e,t(o.properties,!0))}async function je(o){return g().track(o.name,e,t(o.properties,!0))}async function xe(o){return g().track(o.name,e,t(o.properties,!0))}async function _e(o){return g().track(o.name,e,t(o.properties,!0))}async function Be(o){return g().track(o.name,e,t(o.properties,!0))}async function Ue(o){return g().track(o.name,e,t(o.properties,!0))}async function ze(o){return g().track(o.name,e,t(o.properties,!0))}async function Fe(o){return g().track(o.name,e,t(o.properties,!0))}async function Ve(o){return g().page(o.name,e,t(o.properties,!1))}return{careerSitePreviewViewed:i,careerSitePublished:n,setupBenefitCustomAdded:s,setupBenefitViewed:c,setupCandidateInformationViewed:l,setupContactAdded:m,setupContactViewed:u,setupEditionDoneViewed:r,setupExternalLinkViewed:a,setupImageUploaded:p,setupImageViewed:f,setupLocationViewed:h,setupPresentationContentAdded:b,setupPresentationNewTabAdded:w,setupPresentationViewed:S,setupSettingsDoneViewed:d,setupSocialNetworkViewed:P,setupThemeViewed:k,visualBuilderViewed:I,setupImageUploadFailed:Te,fastCopyLinkClicked:Le,setupBenefitCustomDeleted:$e,setupBenefitCustomEdited:Me,setupContactDeleted:Ne,setupContactEdited:De,setupContactNewClicked:je,setupPresentationContentDeleted:xe,setupPresentationContentDuplicated:_e,setupPresentationContentMoved:Be,setupPresentationTabDeleted:Ue,setupPresentationTabEdited:ze,setupPresentationTabMoved:Fe,setupSEOViewed:Ve}}const ie=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:ve,useAnalyticsProfile:Re,useAnalyticsRecruitment:Pe,useAnalyticsVisualBuilder:ke},Symbol.toStringTag,{value:"Module"}));function _i(){function e(i){return g().identify(i.id,{email:i.email,firstName:i.firstname,lastName:i.lastname,createdAt:i.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let i=!1;return function(n){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(i=!0)}(navigator.userAgent||navigator.vendor||window.opera),i}return{identifyCandidate:e}}let z=null;const Bi=async(e,t)=>{try{return await V(),A.info("[identify]",[e,t]),window.analytics.identify(e,t)}catch{A.error("[identify]",[e,t])}},Ui=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await V(),A.info("[page]",[e,t,i]),window.analytics.page(e,{category:t,...i})}catch{A.error("[page]",[e,t,i])}},zi=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await V(),A.info("[track]",[e,t,i]),window.analytics.track(e,{category:t,...i})}catch{A.error("[track]",[e,t,i])}},K=()=>{const e=O.getEnvironment();return e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ"},Ee=()=>{const e=window.analytics=window.analytics||[];if(!e.initialize&&e.invoked)A.error("Segment snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],e.factory=function(t){return function(){if(window.analytics.initialized)return window.analytics[t].apply(window.analytics,arguments);const i=Array.prototype.slice.call(arguments);return i.unshift(t),e.push(i),e}};for(let t=0;t<e.methods.length;t++){const i=e.methods[t];e[i]=e.factory(i)}e.load=function(t,i){const n=document.createElement("script");n.id="analytics-script",n.type="text/javascript",n.async=!0,n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js",n.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s),e._loadOptions=i},e._writeKey=K(),e.SNIPPET_VERSION="4.16.1",e.load(K()),e.page(),e.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}},V=()=>(z!==null||(z=new Promise((e,t)=>{if(window.addEventListener("analytics-ready",()=>{A.info("Analytics script loaded successfully."),e()}),window.addEventListener("analytics-error",()=>{A.error("Analytics script failed to load. Consider disabling your AdBlocker."),t()}),A.info("Loading Analytics script."),window.analytics)return e();Ee()})),z),Fi={key:K,appendScript:Ee,ready:V,identify:Bi,page:Ui,track:zi},Vi="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";let Ie=!1;const Ce=()=>new Promise(e=>{T()||Ie||window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),Qi())}),Hi=(e,t)=>Ce().then(()=>{T()||qi(e,t)}),qi=(e,t)=>{const i=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(i,"place_changed",()=>{const n=i.getPlace();n.formatted_address&&t&&t(n.formatted_address,n)})},Qi=()=>{window.onGmapScriptReady=()=>{};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+Vi+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e),Ie=!0},Gi={scriptReady:Ce,autocompleteInput:Hi},Ki={common:{the:"le",from:"de"},timeAgo:{"just-now":"à l'instant",ago:"il y a {0}",in:"dans {0}","last-month":"le mois dernier","next-month":"le mois prochain",month:"mois | mois","last-year":"l'année dernière","next-year":"l'année prochaine",year:"an | ans",yesterday:"hier",tomorrow:"demain",day:"jour | jours","last-week":"la semaine dernière","next-week":"la semaine prochaine",week:"semaine | semaines",hour:"heure | heures",minute:"minute | minutes",second:"seconde | secondes"}},Wi={fr:Ki};let W=null;const Se=()=>W,Ji=(e={})=>{let t=e.locale||"fr";const i=u=>t=u,n=()=>t,s=Z(Wi,(e==null?void 0:e.messages)||{}),c=(u,r)=>{const a=L(s,`${t}.${u}`);return a?r?Zi(a,r):a:u},l=(u,r)=>{const a=L(s,`${t}.${u}`);return a?Xi(a,r):u};return W={t:c,tNode:l,setLocale:i,getLocale:n,install:u=>{u.config.globalProperties.$t=c,u.config.globalProperties.$tNode=l}},W},Zi=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(i,n)=>L(t,n)):null,Xi=(e,t)=>{if(!e)return null;const i=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const s=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(s==="text")return()=>se.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const l={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((r,a)=>(a[3]===void 0?G(r,a[1],L(t,a[1])):G(r,a[1],L(t,a[3])),r),l),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((r,a)=>{let p=a[2];return new RegExp(/^[0-9]*$/).exec(a[2])?p=parseInt(a[2]):new RegExp(/^(true|false)$/).exec(a[2])&&(p=a[2]==="true"),r[a[1]]=p,r},l)),m=>se[s](c,t,m,l)});return{setup:(n,{slots:s})=>()=>i.map(c=>c(s))}},se={slot:(e,t,i,n)=>$.h("span",{class:"node node--slot"},i[e.trim()](n)),variable:(e,t)=>$.h("span",{class:"node node--variable"},L(t,e.trim())),text:e=>$.h("span",{class:"node node--text"},e)};function Yi(e){const{t}=Se(),i={justNow:t("timeAgo.just-now"),past:n=>n.match(/\d/)?t("timeAgo.ago",[n]):n,future:n=>n.match(/\d/)?t("timeAgo.in",[n]):n,month:(n,s)=>n===1?t(s?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,s)=>n===1?t(s?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,s)=>n===1?t(s?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,s)=>n===1?t(s?"timeAgo.last-week":"timeAgo.next-week"):`${n} ${t("timeAgo.week",n)}`,hour:n=>`${n} ${t("timeAgo.hour",n)}`,minute:n=>`${n} ${t("timeAgo.minute",n)}`,second:n=>`${n} ${t("timeAgo.second",n)}`,invalid:""};return We.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:i})}function es(){let e=null;function t(){return e}function i(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function s(){return e.action}function c(){return e.arguments}function l(){return!!(e&&e.controller&&e.action)}function m(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((u,r)=>{const a=r.split("=");return a[0]==="controller"||a[0]==="action"?u[a[0]]=decodeURIComponent(a[1]):u.arguments[a[0]]=decodeURIComponent(a[1]),u},{controller:null,action:null,arguments:{}}))}return m(),{getParams:t,getController:i,getControllerComposableName:n,getAction:s,getArguments:c,hasAction:l}}function ts(){async function e({domain:n,event:s,...c}){const l="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(l))throw new Error(`Domain ${n} is not defined`);const m=ie[l]();if(!i(m,s))throw new Error(`Event ${s} is not defined in domain ${n}`);return m[s](c)}function t(n){return!!ie[n]}function i(n,s){return!!n[s]}return{call:e}}const re=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:ts},Symbol.toStringTag,{value:"Module"}));function ns(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!i())throw new Error(`Controller ${e.getController()} not found`);const s=re[e.getControllerComposableName()]();if(!n(s))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return s[e.getAction()](e.getArguments())}function i(){return e.getControllerComposableName()in re}function n(s){return e.getAction()in s}return{dispatch:t}}function is(){let e=!1;function t(s,c,l){n(),l()}function i(s,c,l){if(!e)return e=!0,t(s,c,l);l()}function n(){const s=es();if(!s.hasAction())return;ns(s).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:i,handle:n}}const ss=()=>({getAssetUrl:t=>`${O.getBaseAssetsUrl()}${t}`}),v=()=>O.getMainAppHost(),rs=()=>`${v()}/rh/establishments`,os=e=>`${v()}/rh/establishment/${e}`,as=e=>{var t;return typeof e=="string"?e:typeof e=="object"&&((t=e==null?void 0:e.urls)!=null&&t.display)?e.urls.display:null},cs=()=>`${v()}/rh/dashboard`,us=e=>`${v()}/candidate-invite/establishment/${e}`,ls=(e,t=!1)=>t?`${v()}/cvbank/${e}`:`${v()}/rh/establishment/${e}/cvtheque`,ds=(e,t)=>`${v()}/user-profile/establishment/${e}/user/${t}`,ms=e=>`${v()}/rh/establishment/${e}/recruitment`,ps=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}`,fs=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}/kanban`,hs=e=>`${v()}/rh/establishment/${e}/career-configuration`,ys=(e,t=null)=>t?`${v()}/career-website/${e}/${t}`:`${v()}/career-website/${e}`,gs=(e,t)=>`${v()}/career-website-preview/${e}/${t}`,bs=(e,t=null)=>{const i=v().replace("://",`://${e}.`);return t?`${i}?_version=${t}`:`${i}`},ws=e=>`${v()}/rh/establishment/${e}/stats`,As=e=>`${v()}/rh/establishment/${e}/backoffice`,vs=()=>`${v()}/rh/settings/general`;function Rs(){return{root:v,establishments:rs,establishment:os,img:as,dashboard:cs,candidateInvite:us,cvtheque:ls,userProfile:ds,recruitments:ms,recruitment:ps,recruitmentKanban:fs,career:hs,careerConfig:ys,careerPreview:gs,careerWebsite:bs,statistics:ws,backoffice:As,userSettings:vs}}const oe=new Set;let D,J={ignore:e=>e.startsWith("Ui")};const Q=e=>{if(e!=null&&e.classList){e._cssChecked=!0;for(const t of e.classList)D.has(t)||oe.has(t)||J.ignore(t)||(oe.add(t),A.error(`Undefined CSS class: ${t}`))}},Oe=e=>{var t;for(const i of e)if(i!=null&&i.cssRules&&(i==null?void 0:i.cssRules.length)>0)Oe(i.cssRules);else if(i.selectorText){const n=(t=i.selectorText)==null?void 0:t.match(/\.[\w-]+/g);if(n)for(const s of n)D.add(s.substr(1))}},Ps=(e={})=>{if(D)return D;D=new Set,J={...J,...e},Oe(document.styleSheets),new MutationObserver(i=>{for(const n of i)if(n.type==="childList"&&(n!=null&&n.addedNodes)){for(const s of n.addedNodes)if(!(s.nodeType===3||s.nodeType===8)){Q(s);for(const c of s.querySelectorAll("*"))Q(c)}}else(n==null?void 0:n.attributeName)==="class"&&Q(n.target)}).observe(document,{attributes:!0,childList:!0,subtree:!0})},ks="0.2.64";exports.Analytics=Fi;exports.BaseLogger=F;exports.Gmap=Gi;exports.SDKConfig=O;exports.SDKLogger=A;exports.VERSION=ks;exports._clone=ce;exports._get=L;exports._merge=Z;exports._set=G;exports.createI18n=Ji;exports.ensureScheme=Pt;exports.inBrowser=dt;exports.inNode=T;exports.isArray=X;exports.isArrayOf=At;exports.isBoolean=mt;exports.isDate=ht;exports.isFalsy=wt;exports.isFunction=yt;exports.isMobile=lt;exports.isNotNullOrUndefined=gt;exports.isNull=le;exports.isNullOrUndefined=me;exports.isNumber=pt;exports.isObject=ue;exports.isObjectOf=vt;exports.isString=ft;exports.isTruthy=bt;exports.isUndefined=de;exports.secureScheme=Rt;exports.useActivityRepository=Jt;exports.useAnalyticsHublerApplication=ve;exports.useAnalyticsIdentify=_i;exports.useAnalyticsProfile=Re;exports.useAnalyticsRecruitment=Pe;exports.useAnalyticsVisualBuilder=ke;exports.useAssetUrls=ss;exports.useAuthentication=j;exports.useAuthorization=Ae;exports.useAuthorizationStore=xi;exports.useCanAccessEstablishmentMiddleware=ji;exports.useCandidateRepository=cn;exports.useCommentRepository=pn;exports.useContractTypeRepository=yn;exports.useCookieStorage=fe;exports.useCvbankRepository=wn;exports.useCvthequeRepository=vn;exports.useDiplomaRepository=Pn;exports.useDocumentRepository=On;exports.useDomainUrls=Rs;exports.useEmailHistoryRepository=Ln;exports.useEmailRepository=Nn;exports.useEmailTemplateRepository=xn;exports.useEstablishmentCareerRepository=Vn;exports.useEstablishmentRepository=Y;exports.useFeatureFlagRepository=Kn;exports.useI18n=Se;exports.useJobRepository=Zn;exports.useLabelRepository=ii;exports.useLocaleTimeAgo=Yi;exports.useOfferRepository=ri;exports.usePrivateRequest=y;exports.useQSAction=is;exports.useRecruiterRepository=ai;exports.useRecruitmentRepository=hi;exports.useRegisterRepository=Ai;exports.useRegistrationRepository=Ri;exports.useRequest=R;exports.useSpecialityRepository=Ei;exports.useTagRepository=Ci;exports.useTalentRepository=Ti;exports.useUndefinedCssClasses=Ps;exports.useUserRepository=ee;
|