PageSourceSearch

https://communaute.bergeredefrance.fr/_nuxt/chunk/B5RRF-O3.js

js bergeredefrance.fr collected 2026-10-03 21:46:28 UTC 15,422 bytes, 1 lines download raw bytes

1import{_ as U,o as a,c,F as k,C as V,n as s,t as i,k as W,w as T,j as w,b as C,v as Y,y as le,V as ie,a4 as Q,G as ae,a5 as ce,af as re,H as K,p as ue,x as de,a6 as J,a7 as Z,ag as _e,e as t,f,D as pe,m as h,i as M,a as n,a0 as me,a9 as fe,aw as ye,K as ge,N as ve,h as he}from"./CyZptx9T.js";import{b as Se}from"./CssAQtqy.js";import{E as z}from"../entry/CvOj14bM.js";const j={Confirmed:"Confirmed",MissingHashtags:"MissingHashtags",AlreadyUsed:"AlreadyUsed",PublishedBeforeCampaign:"PublishedBeforeCampaign",PostNotFound:"PostNotFound",MissingComplianceMention:"MissingComplianceMention",ComplianceMentionNotFirst:"ComplianceMentionNotFirst"},$e="AppTabs_container",be="AppTabs_tab",Pe="AppTabs_tabSelected",ke={container:$e,tab:be,tabSelected:Pe},we={props:{value:{type:String,default:null},tabs:{type:Object,default:()=>{}},isPersisted:{type:Boolean,default:!0},testIdPrefix:{type:String,default:null}},emits:["update:value"],watch:{value(d){if(!this.$options||!this.$options.parent||!this.$options.parent._name||!this.isPersisted)return;const _=window.sessionStorage,r=`tab-${this.$options.parent._name.replace("<","").replace(">","")}`;_.setItem(r,d)}},mounted(){if(!this.$options||!this.$options.parent||!this.$options.parent._name||!this.isPersisted)return;const d=window.sessionStorage,_=`tab-${this.$options.parent._name.replace("<","").replace(">","")}`;d.getItem(_)&&this.tabs[d.getItem(_)]&&this.$emit("update:value",d.getItem(_))},methods:{select(d){this.$emit("update:value",d)}}},Ce=["data-custom-tab","data-testid","onClick"];function Te(d,_,r,S,o,p){return a(),c("div",{class:s(d.$style.container)},[(a(!0),c(k,null,V(r.tabs,(u,g)=>(a(),c("div",{key:u,class:s({[d.$style.tab]:!0,[d.$style.tabSelected]:r.value===g}),"data-custom-tab":g.replace(" ","-"),"data-testid":r.testIdPrefix?`${r.testIdPrefix}-${g}`:null,onClick:v=>p.select(g)},i(u),11,Ce))),128))],2)}const Ie={$style:ke},Me=U(we,[["render",Te],["__cssModules",Ie]]),Fe="AppFilterButton_filterButton",Be="AppFilterButton_filtersCount",Ae={filterButton:Fe,filtersCount:Be},je={__name:"AppFilterButton",props:{activeFiltersCount:{type:Number,default:0}},emits:["openFilter"],setup(d,{emit:_}){const r=_;return(S,o)=>{const p=Y;return a(),W(p,{type:"light",icon:["fas","filter"],class:s(S.$style.filterButton),onClick:o[0]||(o[0]=u=>r("openFilter"))},{default:T(()=>[w(i(S.$t("general.filter"))+" ",1),d.activeFiltersCount>0?(a(),c("span",{key:0,class:s(S.$style.filtersCount)},i(d.activeFiltersCount),3)):C("",!0)]),_:1},8,["class"])}}},Re={$style:Ae},qt=U(je,[["__cssModules",Re]]),Ne="edit_content",He="edit_title",Oe="edit_tabs",De="edit_unloggedContent",We="edit_boldText",Ue="edit_button",Le={content:Ne,title:He,tabs:Oe,unloggedContent:De,boldText:We,button:Ue},qe={key:0},Xe={__name:"edit",setup(d){const _=h(!1),r=h("profile"),S=le(),o=ie(),{t:p}=Q(),u=ae(),g=ce(),v=re(),{currentUserAccount:F}=K(ue()),{getCurrentBrandCategoryId:R}=K(de()),$=M(()=>{const l={profile:p("panel_profile.public_profile")};return(o.getCustomFieldsByPlaces("ProductTestings").length>0||o.getCustomFieldsByPlaces("Address").length>0)&&(l.testing=p("panel_profile.testing_profile")),o.getCustomFieldsByPlaces("PrivateProfile").length>0&&(l.preferences=p("panel_profile.private_profile")),l.notifications=p("panel_profile.notifications"),S.isReferralEnabled&&(l.referral=p("panel_profile.referral")),l.account=p("panel_profile.account_settings"),l});J(r,l=>{g.push({name:"editProfile",params:{brandCategoryId:R.value,view:l}}),N(l)}),J(()=>u.params.view,l=>{l&&Object.prototype.hasOwnProperty.call($.value,l)&&(r.value=l)}),Z(async()=>{_.value=!0,F.value&&o.getCustomFieldsByPlaces("ProductTestings").length===0&&o.getCustomFieldsByPlaces("Introduction").length===0&&await o.fetchCustomFields(F.value.id),u.params&&Object.prototype.hasOwnProperty.call($.value,u.params.view)?r.value=u.params.view:r.value="profile"});function N(l){if(!v.isMobile)return;const m=document.querySelector(`[data-custom-tab="${l}"]`);m&&m.scrollIntoView({behavior:"smooth",block:"end",inline:"center"})}u.params&&Object.prototype.hasOwnProperty.call($,u.params.view)&&(r.value=u.params.view);const B=$[r]?`- ${$[r]}`:"",H={title:`${p("panel_profile.edit_profile")} ${B}`};return _e(H),(l,m)=>{const L=Me,I=ye,q=Y,O=pe;return t(_)?(a(),c("div",qe,[f(O,null,{default:T(()=>[n("div",{class:s(l.$style.content)},[n("h1",{class:s(l.$style.title)},i(t(p)("panel_profile.edit_profile")),3),t(F)?(a(),c(k,{key:0},[n("div",{onTouchmove:m[1]||(m[1]=me(()=>{},["stop"]))},[f(L,{id:"tabs",value:t(r),"onUpdate:value":m[0]||(m[0]=X=>fe(r)?r.value=X:null),tabs:t($),class:s(l.$style.tabs),"is-persisted":!1},null,8,["value","tabs","class"])],32),f(I)],64)):(a(),c("div",{key:1,class:s(l.$style.unloggedContent)},[n("div",{class:s(l.$style.boldText)},i(t(p)("panel_profile.log_in_or_register_to_edit_your_profile")),3),n("div",null,i(t(p)("panel_profile.in_order_to_edit_your_profile_you_should_first_create_or_log_in_to_your_account")),1),f(q,{class:s(l.$style.button),onClick:("useAuthentication"in l?l.useAuthentication:t(ge))().openPopupRegister},{default:T(()=>[w(i(t(p)("general.login_register")),1)]),_:1},8,["class","onClick"])],2))],2)]),_:1})])):C("",!0)}}},Ee={$style:Le},ze=U(Xe,[["__cssModules",Ee]]),Xt=Object.freeze(Object.defineProperty({__proto__:null,default:ze},Symbol.toStringTag,{value:"Module"})),Ve="SocialPostSelection_container",Ye="SocialPostSelection_title",Ge="SocialPostSelection_scrollBody",Ke="SocialPostSelection_grid",Je="SocialPostSelection_cell",Qe="SocialPostSelection_cover",Ze="SocialPostSelection_cellSelected",xe="SocialPostSelection_selectedOverlay",et="SocialPostSelection_loadMore",tt="SocialPostSelection_footer",st="SocialPostSelection_empty",ot="SocialPostSelection_emptyHeader",nt="SocialPostSelection_emptyTitle",lt="SocialPostSelection_emptyDescription",it="SocialPostSelection_whatToDo",at="SocialPostSelection_whatToDoTitle",ct="SocialPostSelection_result",rt
1="SocialPostSelection_resultStatus",ut="SocialPostSelection_successIcon",dt="SocialPostSelection_rejectedIcon",_t="SocialPostSelection_errorHeader",pt="SocialPostSelection_errorTitle",mt="SocialPostSelection_errorSubtitle",ft="SocialPostSelection_details",yt="SocialPostSelection_detailsTitle",gt="SocialPostSelection_checkRows",vt="SocialPostSelection_checkRow",ht="SocialPostSelection_foundIcon",St="SocialPostSelection_missingIcon",$t="SocialPostSelection_checkLabel",bt="SocialPostSelection_foundText",Pt="SocialPostSelection_missingText",kt="SocialPostSelection_resultCover",wt="SocialPostSelection_resultCoverRejected",Ct="SocialPostSelection_commitment",Tt="SocialPostSelection_commitmentIcon",It={container:Ve,title:Ye,scrollBody:Ge,grid:Ke,cell:Je,cover:Qe,cellSelected:Ze,selectedOverlay:xe,loadMore:et,footer:tt,empty:st,emptyHeader:ot,emptyTitle:nt,emptyDescription:lt,whatToDo:it,whatToDoTitle:at,result:ct,resultStatus:rt,successIcon:ut,rejectedIcon:dt,errorHeader:_t,errorTitle:pt,errorSubtitle:mt,details:ft,detailsTitle:yt,checkRows:gt,checkRow:vt,foundIcon:ht,missingIcon:St,checkLabel:$t,foundText:bt,missingText:Pt,resultCover:kt,resultCoverRejected:wt,commitment:Ct,commitmentIcon:Tt},Mt=["onClick"],Ft=["src"],Bt=["src"],At=["src"],jt={key:0},Rt=["src"],Nt={__name:"SocialPostSelection",props:{externalActionId:{type:Number,required:!0},externalActionType:{type:String,default:""},hashtags:{type:Array,default:()=>[]},complianceWordings:{type:Array,default:()=>[]},requireWordingFirst:{type:Boolean,default:!1}},setup(d){const _=d,{$bus:r,$toast:S}=ve(),{t:o}=Q(),p={[z.SocialPostInstagramHashtag]:{name:"Instagram",url:"https://www.instagram.com",postUrl:e=>`https://www.instagram.com/p/${e}/`},[z.SocialPostTikTokHashtag]:{name:"TikTok",url:"https://www.tiktok.com",postUrl:e=>`https://www.tiktok.com/@/video/${e}`},[z.SocialPostYouTubeHashtag]:{name:"YouTube",url:"https://www.youtube.com",postUrl:e=>`https://www.youtube.com/watch?v=${e}`}},u=h("list"),g=h([]),v=h(null),F=h(null),R=h(null),$=h(1),N=h(!1),B=h(!1),H=h(!1),l=h({status:null,missingHashtags:[],complianceWordingMissing:!1,complianceWordingNotFirst:!1}),m=M(()=>p[_.externalActionType]??{name:"",url:"#"}),L=M(()=>u.value==="list"?o("missions.select_your_post"):o("missions.requirement_check")),I=M(()=>g.value.find(e=>e.clientId===v.value)),q=M(()=>!B.value&&g.value.length===0),O=M(()=>[j.MissingHashtags,j.MissingComplianceMention,j.ComplianceMentionNotFirst].includes(l.value.status)),X=M(()=>{const e=_.hashtags.map(b=>({key:`hashtag-${b}`,label:o("missions.hashtag"),tag:`#${b}`,found:!l.value.missingHashtags.includes(b)}));return _.complianceWordings.length&&e.push({key:"wording",label:l.value.complianceWordingNotFirst?o("missions.collaboration_mention_must_be_at_the_beginning_of_the_post"):o("missions.collaboration_mention"),tag:null,found:!l.value.complianceWordingMissing&&!l.value.complianceWordingNotFirst}),e}),x=M(()=>{switch(l.value.status){case j.AlreadyUsed:return o("missions.this_post_has_already_been_used_to_validate_a_mission");case j.PublishedBeforeCampaign:return o("missions.this_post_was_published_before_the_campaign_start_date");default:return o("missions.we_couldnt_check_this_post_please_try_again")}});async function E({reset:e=!1}={}){e?(g.value=[],v.value=null,F.value=null,R.value=null,$.value=1,B.value=!0):H.value=!0;try{const b=await $fetch("socialPosts",{params:{type:_.externalActionType,cursor:F.value,reelsCursor:R.value,page:$.value}}),D=new Set(g.value.map(P=>P.clientId));g.value.push(...(b?.posts??[]).filter(P=>!D.has(P.clientId))),F.value=b?.nextCursor??null,R.value=b?.nextReelsCursor??null,N.value=b?.hasMore??!1}catch(b){N.value=!1,b?.status!==404&&S.error(o("general.something_went_wrong"))}finally{B.value=!1,H.value=!1}}function ee(){E({reset:!0})}function te(){$.value+=1,E()}function se(e){v.value=e}async function oe(){if(v.value){u.value="confirming";try{const e=await $fetch("socialPosts/confirm",{method:"POST",body:{externalActionId:_.externalActionId,postId:v.value,page:$.value}});
1e?.status===j.Confirmed?u.value="success":(l.value={status:e?.status,missingHashtags:e?.missingHashtags??[],complianceWordingMissing:e?.complianceWordingMissing??!1,complianceWordingNotFirst:e?.complianceWordingNotFirst??!1},u.value="rejected")}catch(e){if(e?.status===401){S.error(o("general.your_account_is_no_longer_connected_to_approve_future_posts_you_will_need_to_reconnect")),r.$emit("popup_close");return}S.error(o("general.something_went_wrong")),u.value="list"}}}function ne(){S.success(o("missions.your_post_has_been_validated")),r.$emit("popup_close")}function G(){const e=O.value&&v.value?m.value.postUrl(v.value):m.value.url;window.open(e,"_blank","noopener,noreferrer")}return Z(()=>{E({reset:!0})}),(e,b)=>{const D=Se,P=he,A=Y;return a(),c("div",{class:s(e.$style.container)},[n("div",{class:s(e.$style.title)},i(t(L)),3),t(u)==="list"?(a(),c(k,{key:0},[t(B)?(a(),W(D,{key:0})):(a(),c(k,{key:1},[n("div",{class:s(e.$style.scrollBody)},[t(q)?(a(),c("div",{key:0,class:s(e.$style.empty)},[n("div",{class:s(e.$style.emptyHeader)},[n("div",{class:s(e.$style.emptyTitle)},i(t(o)("missions.no_recent_posts_found")),3),n("p",{class:s(e.$style.emptyDescription)},i(t(o)("missions.we_couldnt_find_any_recent_posts_on_your_X_profile_make_sure_youve_posted_the_content_for_this_mission",{platform:t(m).name})),3)],2),n("div",{class:s(e.$style.whatToDo)},[n("span",{class:s(e.$style.whatToDoTitle)},i(t(o)("missions.what_to_do")),3),n("ul",null,[n("li",null,i(t(o)("missions.make_sure_youve_published_your_post_on_X",{platform:t(m).name})),1),n("li",null,i(t(o)("missions.wait_a_few_moments_for_X_to_sync",{platform:t(m).name})),1),n("li",null,i(t(o)("missions.click_refresh_below_to_load_your_latest_posts")),1)])],2)],2)):(a(),c(k,{key:1},[n("div",{class:s(e.$style.grid)},[(a(!0),c(k,null,V(t(g),y=>(a(),c("div",{key:y.clientId,class:s({[e.$style.cell]:!0,[e.$style.cellSelected]:y.clientId===t(v)}),onClick:Dt=>se(y.clientId)},[n("img",{src:y.cover,alt:"",class:s(e.$style.cover)},null,10,Ft),y.clientId===t(v)?(a(),c("div",{key:0,class:s(e.$style.selectedOverlay)},[f(P,{icon:["fas","check-circle"]})],2)):C("",!0)],10,Mt))),128))],2),t(N)?(a(),W(A,{key:0,type:"light",class:s(e.$style.loadMore),"is-loading":t(H),onClick:te},{default:T(()=>[w(i(t(o)("missions.load_more")),1)]),_:1},8,["class","is-loading"])):C("",!0)],64))],2),n("div",{class:s(e.$style.footer)},[f(A,{type:"light",onClick:ee},{default:T(()=>[w(i(t(o)("missions.refresh")),1)]),_:1}),f(A,{"is-disabled":!t(v),onClick:oe},{default:T(()=>[w(i(t(o)("missions.continue")),1)]),_:1},8,["is-disabled"])],2)],64))],64)):t(u)==="confirming"?(a(),W(D,{key:1})):t(u)==="success"?(a(),c("div",{key:2,class:s(e.$style.result)},[n("div",{class:s(e.$style.resultStatus)},[f(P,{icon:["fas","check-circle"],class:s(e.$style.successIcon)},null,8,["class"]),n("span",null,i(t(o)("missions.respects_all_the_requirements")),1)],2),t(I)?(a(),c("img",{key:0,src:t(I).cover,alt:"",class:s(e.$style.resultCover)},null,10,Bt)):C("",!0),n("div",{class:s(e.$style.commitment),"data-testid":"post-commitment-notice"},[f(P,{icon:["fas","info-circle"],class:s(e.$style.commitmentIcon),"aria-hidden":"true"},null,8,["class"]),n("span",null,i(t(o)("missions.keep_your_post_online_with_its_hashtags_deleting_it_or_removing_them_may_cancel_your_reward")),1)],2),n("div",{class:s(e.$style.footer)},[f(A,{onClick:ne},{default:T(()=>[w(i(t(o)("missions.done")),1)]),_:1})],2)],2)):t(u)==="rejected"?(a(),c("div",{key:3,class:s(e.$style.result)},[t(O)?(a(),c(k,{key:0},[n("div",{class:s(e.$style.errorHeader)},[f(P,{icon:["fas","times-circle"],class:s(e.$style.rejectedIcon)},null,8,["class"]),n("div",{class:s(e.$style.errorTitle)},i(t(o)("missions.some_elements_are_missing")),3),n("div",{class:s(e.$style.errorSubtitle)},i(t(o)("missions.edit_your_post_on_X_then_come_back_here_to_try_again",{platform:t(m).name})),3)],2),t(I)?(a(),c("img",{key:0,src:t(I).cover,alt:"",class:s([e.$style.resultCover,e.$style.resultCoverRejected])},null,10,At)):C("",!0),n("div",{class:s(e.$style.details)},[n("span",{class:s(e.$style.detailsTitle)},i(t(o)("missions.details")),3),n("div",{class:s(e.$style.checkRows)},[(a(!0),c(k,null,V(t(X),y=>(a(),c("div",{key:y.key,class:s(e.$style.checkRow),"data-testid":"requirement-check-row"},[f(P,{icon:["fas",y.found?"check-circle":"times-circle"],class:s(y.found?e.$style.foun
1dIcon:e.$style.missingIcon)},null,8,["icon","class"]),n("span",{class:s(e.$style.checkLabel)},[w(i(y.label),1),y.tag?(a(),c("strong",jt,i(y.tag),1)):C("",!0)],2),n("span",{class:s(y.found?e.$style.foundText:e.$style.missingText)},i(y.found?t(o)("missions.found"):t(o)("missions.missing")),3)],2))),128))],2)],2),n("div",{class:s(e.$style.footer)},[f(A,{onClick:G},{default:T(()=>[w(i(t(o)("missions.go_to_X",{platform:t(m).name})),1)]),_:1})],2)],64)):(a(),c(k,{key:1},[n("div",{class:s(e.$style.resultStatus)},[f(P,{icon:["fas","times-circle"],class:s(e.$style.rejectedIcon)},null,8,["class"]),n("div",null,i(t(x)),1)],2),t(I)?(a(),c("img",{key:0,src:t(I).cover,alt:"",class:s([e.$style.resultCover,e.$style.resultCoverRejected])},null,10,Rt)):C("",!0),n("div",{class:s(e.$style.footer)},[f(A,{onClick:G},{default:T(()=>[w(i(t(o)("missions.go_to_X",{platform:t(m).name})),1)]),_:1})],2)],64))],2)):C("",!0)],2)}}},Ht={$style:It},Ot=U(Nt,[["__cssModules",Ht]]),Et=Object.freeze(Object.defineProperty({__proto__:null,default:Ot},Symbol.toStringTag,{value:"Module"}));export{Et as S,Me as _,qt as a,Xt as e};

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