PageSourceSearch

https://www.librinova.com/build/assets/index-Baoqhfnh.js

js librinova.com collected 2026-10-01 11:43:45 UTC 8,067 bytes, 1 lines download raw bytes

1import{t as e}from"./axios-CT2XOAfC.js";import{Mt as t}from"./reactivity.esm-bundler-Bfe6_cug.js";import{A as n,B as r,M as i,P as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,m,n as h,y as g,z as _}from"./modal-CqmjxRS6.js";import{c as v,t as y}from"./global-CNtcV31R.js";import{t as ee}from"./left_menu-DNgqse09.js";var b={props:{post_id:{type:Number,required:!0},parent_id:{type:Number,required:!1},user_fullname:{type:String,required:!1}},data(){return{author_name:``,content:``,user_logged:window.user_logged,loading:!1,error:null}},methods:{async post(){let{author_name:t,content:n,post_id:r,parent_id:i}=this;this.loading=!0,this.error=null;try{let{data:a}=await e.post(`/blog/comments`,{author_name:t,content:n,post_id:r,parent_id:i});if(!a.is_ok){this.error=`Veuillez remplir tous les champs`;return}this.author_name=``,this.content=``,this.$emit(`posted`)}catch(e){this.error=e.response&&e.response.status===401?`Votre session a expiré. Reconnectez-vous, votre commentaire est conservé.`:`Votre commentaire n'a pas pu être publié : le blog est momentanément indisponible. Réessayez dans quelques minutes.`}finally{this.loading=!1}}},mounted(){this.author_name=this.user_fullname}},x={class:`comments-form`},S={class:`form-title`},C={class:`form-group`},w={class:`form-group`},T={key:0,class:`msg-error`},E={class:`btn btn-primary`},D={key:0},O={key:1,class:`spinner-form`},k={key:1,class:`login-msg`},A={class:`help`};function j(e,i,s,d,p,h){let v=a(`ln-modal-auth-toggle`);return n(),o(`div`,x,[p.user_logged?(n(),o(`form`,{key:0,method:`post`,onSubmit:i[2]||=u(e=>h.post(),[`prevent`])},[m(`label`,S,t(s.parent_id?`Répondre`:`Ajouter un commentaire`),1),m(`div`,C,[i[3]||=m(`label`,null,`Nom`,-1),r(m(`input`,{"onUpdate:modelValue":i[0]||=e=>p.author_name=e,class:`ln-input form-control`,type:`text`},null,512),[[l,p.author_name]])]),m(`div`,w,[i[4]||=m(`label`,null,`Contenu`,-1),r(m(`textarea`,{"onUpdate:modelValue":i[1]||=e=>p.content=e,class:`ln-input form-control`},null,512),[[l,p.content]]),p.error?(n(),o(`div`,T,t(p.error),1)):f(``,!0)]),m(`button`,E,[p.loading?(n(),o(`div`,O,[...i[5]||=[m(`div`,{class:`loader`},null,-1)]])):(n(),o(`span`,D,`Envoyer`))])],32)):(n(),o(`div`,k,[m(`p`,A,[g(`Pour `+t(s.parent_id?`répondre`:`commenter cet article`)+`, `,1),c(v,{class:`link blue`,screen:`signup`},{default:_(()=>[...i[6]||=[g(`inscrivez-vous`,-1)]]),_:1}),i[8]||=g(` ou `,-1),c(v,{class:`link blue`,screen:`signin`},{default:_(()=>[...i[7]||=[g(`connectez vous`,-1)]]),_:1}),i[9]||=g(` avec votre compte Librinova.`,-1)])]))])}var M=h(b,[[`render`,j]]),N={components:{CommentsForm:M},props:{post_id:{type:Number,required:!0},user_fullname:{type:String,required:!1}},data(){return{comments:[],loading:!1}},computed:{threaded_comments(){let{comments:e}=this,t=[];return e.forEach(n=>{if(n.parent!==0)return;let r=e.filter(e=>e.parent===n.id);r.sort((e,t)=>e.id>t.id?1:-1),t.push({...n,children:r})}),t}},methods:{async fetch_comments(){let{post_id:t}=this;try{let{data:n}=await e.get(`/blog/comments`,{params:{post_id:t}});this.comments=n.comments||[]}catch{this.comments=[]}}},async mounted(){this.loading=!0,await this.fetch_comments(),this.loading=!1}},P={class:`ln-blog-comments`}
1,F={key:0},I={key:0},L={class:`comments-list`},R={key:1,class:`spinner-list`};function z(e,r,s,l,u,h){let _=a(`comments-item`),v=a(`comments-form`);return n(),o(`div`,null,[m(`div`,P,[m(`h2`,null,[u.comments.length?(n(),o(`span`,F,t(u.comments.length),1)):f(``,!0),g(` `+t(u.comments.length>1||u.comments.length===0?`commentaires`:`commentaire`),1)]),u.loading?(n(),o(`div`,R,[...r[2]||=[m(`div`,{class:`loader`},null,-1)]])):(n(),o(`div`,I,[m(`div`,L,[(n(!0),o(d,null,i(h.threaded_comments,e=>(n(),p(_,{key:e.id,comment:e,post_id:s.post_id,user_fullname:s.user_fullname,onAnswerPosted:r[0]||=e=>h.fetch_comments()},null,8,[`comment`,`post_id`,`user_fullname`]))),128))]),c(v,{post_id:s.post_id,user_fullname:s.user_fullname,onPosted:r[1]||=e=>h.fetch_comments()},null,8,[`post_id`,`user_fullname`])]))])])}var te=h(N,[[`render`,z]]),B={data(){return{blog:!0,librinova:!0,email:``,error:null,success:null}},methods:{async subscribe(){this.error=``,this.success=!1;let{email:t,blog:n,librinova:r}=this,i=[];n&&i.push(e.post(`/blog/subscribe-notification-list`,{email:t})),r&&i.push(e.post(`/api/newsletter/subscribe`,{email:t})),(await Promise.all(i)).some(e=>!e.data.is_ok)?this.error=`Une erreur est survenue lors de l'inscription à la newsletter.`:this.success=!0}}},V={class:`subscribe`},H={class:`content`},U={class:`circle-icon-basic letter`},W={class:`form-group`},G={class:`check-group`},K={class:`check-style`},q={class:`check-group`},J={class:`check-style`},Y={key:0,class:`msg-error`},X={key:1,class:`msg-success`};function Z(e,i,d,p,h,_){let v=a(`image-cdn`);return n(),o(`div`,V,[m(`div`,H,[i[11]||=m(`div`,{class:`ln-acrom-title`},`Vous voulez recevoir des informations de Librinova ?`,-1),m(`form`,{onSubmit:i[3]||=u((...e)=>_.subscribe&&_.subscribe(...e),[`prevent`])},[m(`div`,U,[c(v,{path:`/librinova/img/common/dot-blue.png`,source:`cloudinary`,options:{alt:`circle link`,title:`circle link`,class:`circle-element`}})]),m(`div`,W,[m(`div`,G,[m(`label`,K,[r(m(`input`,{name:`blog`,type:`checkbox`,"onUpdate:modelValue":i[0]||=e=>h.blog=e},null,512),[[s,h.blog]]),i[4]||=g(),i[5]||=m(`span`,{class:`small`},`Être prévenu lorsqu'un nouvel article est publié sur le blog`,-1),i[6]||=m(`span`,{class:`checkmark`},null,-1)])]),m(`div`,q,[m(`label`,J,[r(m(`input`,{name:`librinova`,type:`checkbox`,"onUpdate:modelValue":i[1]||=e=>h.librinova=e},null,512),[[s,h.librinova]]),i[7]||=g(),i[8]||=m(`span`,{class:`small`},`Être tenu au courant de toutes les actualités du monde du livre`,-1),i[9]||=m(`span`,{class:`checkmark`},null,-1)])])]),r(m(`input`,{id:`email`,name:`email`,type:`text`,placeholder:`Mon adresse email`,class:`form-control`,required:!0,"onUpdate:modelValue":i[2]||=e=>h.email=e},null,512),[[l,h.email]]),i[10]||=m(`button`,{class:`btn btn-primary`},`Je m'inscris`,-1),h.error?(n(),o(`div`,Y,t(h.error),1)):f(``,!0),h.success?(n(),o(`div`,X,`Vous êtes désormais inscrit.`)):f(``,!0)],32)])])}var Q=h(B,[[`render`,Z]]),ne={name:`comments-item`,components:{CommentsForm:M},props:{comment:{type:Object,required:!0},post_id:{type:Number,required:!0},user_fullname:{type:String,required:!1}},data(){return{showForm:!1}}},re={class:`comment-item`},ie={class:`comment-item-header`},ae={class:`comment-item-meta`},oe={class:`comment-item-date`},$=[`innerHTML`],se={class:`comment-item-footer`},ce={key:0,class:`comment-item-answers`},le={key:1,class:`comments-list`};function ue(e,r,s,c,l,h){let g=a(`image-cdn`),_=a(`comments-form`),v=a(`comments-item`);return n(),o(`div`,re,[m(`div`,ie,[m(`h3`,null,[m(`span`,null,t(s.comment.author_name),1),s.comment.author_is_admin?(n(),p(g,{key:0,path:`/librinova/img/comments/librinova.png`,source:`cloudinary`,options:{alt:`Librinova officiel`}})):f(``,!0)]),r[2]||=m(`div`,{class:`comment-item-separator`},`|`,-1),m(`div`,ae,[m(`div`,oe,t(s.comment.date),1)])]),m(`div`,{class:`comment-item-content`,innerHTML:s.comment.content},null,8,$),m(`div`,se,[s.comment.parent?f(``,!0):(n(),o(`a`,{key:0,href:`#`,onClick:r[0]||=u(e=>l.showForm=!l.showForm,[`prevent`]),class:`link blue`},` Répondre `))]),s.comment.parent?f(``,!0):(n(),o(`div`,ce,[l.showForm?(n(),p(_,{key:0,post_id:s.post_id,parent_id:s.comment.id,user_fullname:s.user_fullname,onPosted:r[1]||=t=>e.$emit(`answer-posted`)},null,8,[`post_id`,`parent_id`,`user_fullname`])):f(``,!0),s.comment.children.length>0?(n(),o(`div`,le,[(n(!0),o(d,null,i(s.comment.children,e=>(n(),p(v,{key:e.id,comment:e,post_id:s.post_id,user_fullname:s.user_fullname},null,8,[`comment`,`post_id`,`user_fullname`]))),128))])):f(``,!0)]))])}var de=h(ne,[[`render`,ue]]),fe=document.querySelectorAll(`.vue`);Array.prototype.forEach.call(fe,(e,t)=>{let n=y();n.component(`ln-carousel`,v),n.component(`ln-left-menu`,ee),n.component(`ln-blog-comments`,te),n.component(`ln-blog-subscription-form`,Q),n.component(`comments-item`,de),n.mou
1nt(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.