PageSourceSearch

https://bicy.ch/_next/static/chunks/3900-3a9e24ecae40d899.js

js bicy.ch collected 2026-10-09 01:29:59 UTC 9,219 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7dee6a06-5b72-4564-bd28-ab9c41e708de",e._sentryDebugIdIdentifier="sentry-dbid-7dee6a06-5b72-4564-bd28-ab9c41e708de")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3900],{35212:(e,t,n)=>{n.d(t,{gC:()=>w,tA:()=>m,CV:()=>y,QM:()=>v});var r=n(87585),i=n(70974),a=n(99848),o=n(96747),s=n(83976);let l={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",webp:"image/webp",pdf:"application/pdf"},p=new Set([...Object.values(l),"image/heic","image/heif"]),u=e=>{var t;let n=(null!=(t=e.type)?t:"").toLowerCase();return p.has(n)?n:null},d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2500,r=Math.max(e,t);if(r<=n)return{width:e,height:t};let i=n/r;return{width:Math.round(e*i),height:Math.round(t*i)}},c=(e,t)=>"".concat(e.replace(/\.[^.]*$/,"")||"document",".").concat(t),h=async(e,t)=>{let{default:r}=await n.e(2246).then(n.t.bind(n,72119,23)),i=await r({blob:e,toType:"image/jpeg",quality:.85});return new File([Array.isArray(i)?i[0]:i],c(t,"jpg"),{type:"image/jpeg"})},g=async e=>{var t;let n=await createImageBitmap(e),r=d(n.width,n.height);if(r.width===n.width&&"image/jpeg"===e.type)return n.close(),e;let i=document.createElement("canvas");i.width=r.width,i.height=r.height,null==(t=i.getContext("2d"))||t.drawImage(n,0,0,r.width,r.height),n.close();let a=await new Promise(e=>
1i.toBlob(e,"image/jpeg",.85));if(!a)throw Error("Image re-encoding failed");return new File([a],c(e.name,"jpg"),{type:"image/jpeg"})},f=async(e,t)=>{let n=(e=>{var t;let n=u(e);return n?"image/heic"===n||"image/heif"===n:["heic","heif"].includes((0,s.QC)(null!=(t=e.name)?t:""))})(e)?await h(e,e.name):new File([e],e.name,{type:(e=>{var t,n,r;return null!=(r=null!=(n=u(e))?n:l[(0,s.QC)(null!=(t=e.name)?t:"")])?r:""})(e)});return t&&n.type.startsWith("image/")&&(n=await g(n)),n},m={purpose:"public-asset"},w={purpose:"identity-document"},v=async(e,t,n)=>{let s=await f(e,"public-asset"!==t.purpose),l={purpose:t.purpose,contentType:s.type,targetUserId:t.targetUserId,linkToken:t.linkToken,salePoint:t.salePoint},{data:p}=await i.A.post("/api/blob/upload-token",l,{headers:t.posBusToken?{[a.E]:t.posBusToken}:void 0,timeout:3e4}),u=await (0,r.yJ)(p.pathname,s,{access:p.access,token:p.clientToken,contentType:s.type,onUploadProgress:e=>null==n?void 0:n(Math.round(e.percentage)),abortSignal:AbortSignal.timeout(12e4)});return{value:"private"===p.access?(0,o.Tg)(p.pathname):u.url,file:s}},b=new Set(["BlobRequestAbortedError","BlobServiceNotAvailable","BlobServiceRateLimited","TimeoutError","AbortError"]),y=e=>{var t;return(null==e?void 0:e.isAxiosError)?!e.response:e instanceof TypeError||b.has(null!=(t=null==e?void 0:e.name)?t:"")}},57576:(e,t,n)=>{n.d(t,{Ay:()=>d,Wt:()=>l});var r=n(45920),i=n(28019),a=n(91785);function o(){let e=(0,r._)(["\n  border-radius: 8px;\n  ","\n"]);return o=function(){return e},e}function s(){let e=(0,r._)(["\n  border-radius: 8px;\n  ","\n"]);return s=function(){return e},e}let l=e=>!!(null==e?void 0:e.trim()),p=a.A.img(o(),e=>{let{$fill:t}=e;return t?"\n    display: block;\n    width: 100%;\n    height: auto;\n    /* Same compact height as the default thumbnail — only the width grows. */\n    max-height: 200px;\n    /* Keep aspect ratio: when full width would exceed max-height, the image is\n       letterboxed and centered inside the full-width box (no left-cropping). */\n    object-fit: contain;\n    object-position: center;\n  ":"\n    max-width: 100%;\n    max-height: 200px;\n    height: auto;\n  "}),u=a.A.embed(s(),e=>{let{$fill:t}=e;return t?"\n    width: 100%;\n    height: 200px;\n  ":"\n    width: 200px;\n    max-width: 100%;\n    height: 200px;\n  "}),d=e=>{let{url:t,pdf:n,alt:r,className:a,fill:o}=e;return l(t)?(null!=n?n:(e=>!!e&&e.trim().split(/[?#]/)[0].toLowerCase().endsWith(".pdf"))(t))?(0,i.jsx)(u,{$fill:o,className:a,src:null!=t?t:void 0,type:"application/pdf","aria-label":r}):(0,i.jsx)(p,{$fill:o,className:a,src:(e=>{let t="/image/upload/",n=e.indexOf(t);if(-1===n)return e;let r=n+t.length,i=e.slice(r);return i.startsWith("f_auto")?e:"".concat(e.slice(0,r),"f_auto/").concat(i)})(null!=t?t:""),alt:r,"data-sentry-element":"PreviewImage","data-sentry-component":"DocumentPreview","data-sentry-source-file":"DocumentPreview.tsx"}):null}},73900:(e,t,n)=>{n.d(t,{Q:()=>j});var r=n(45920),i=n(28019),a=n(91785),o=n(57576),s=n(82327),l=n(35212),p=n(47451),u=n(60796),d=n(83976);function c(){let e=(0,r._)(["\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  gap: 8px;\n  width: 100%;\n  cursor: pointer;\n"]);return c=function(){return e},e}function h(){let e=(0,r._)(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: ",";\n  color: ",";\n  margin: 0;\n\n  @media "," {\n    font-size: ",";\n  }\n"]);return h=function(){return e},e}function g(){let e=(0,r._)(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: auto;\n  gap: 8px;\n  padding: 8px 12px;\n  margin-left: auto;\n  border-radius: 10px;\n  font-weight: ",";\n  color: ",";\n  background-color: ",";\n  border-radius: 30px;\n  cursor: pointer;\n\n  input {\n    display: none;\n    width: fit-content;\n  }\n"]);return g=function(){return e},e}function f(){let e=(0,r._)(["\n  display: contents;\n  cursor: pointer;\n\n  input {\n    display: none;\n  }\n"]);return f=function(){return e},e}function m(){let e=(0,r._)(["\n  font-size: ",";\n  color: ",";\n"]);return m=function(){return e},e}let w=a.A.div(c()),v=a.A.p(h(),u.A.fontSize.xs,u.A.colors.error.dark,u.A.queries.tabletAndUp,u.A.fontSize.sm),b=a.A.label(g(),u.A.fontWeight.medium,u.A.colors.primary.default,u.A.colors.tertiary.default),y=a.A.label(f()),x=a.A.span(m(),u.A.fontSize.sm,u.A.colors.gray.default);class j extends p.Component{componentWillUnmount(){this.revokeLocalPreview()}revokeLocalPreview(){this.state.localPreview&&URL.revokeObjectURL(this.state.localPreview.url)}renderFileInput(){return(0,i.jsx)("input",{id:this.props.id,type:"file",onChange:this.handleFileChange,accept:".png,.jpg,.jpeg,.webp,.heic,.heif,.pdf"})}renderPreview(){let{localPreview:e}=this.state;return(null==e?void 0:e.value)===this.props.value?(0,i.jsx)(o.Ay,{url:e.url,pdf:e.pdf,fill:this.props.fillPreview}):(0,i.jsx)(o.Ay,{url:this.props.value,fill:this.props.fillPreview})}render(){return(0,i.jsxs)(w,{"data-sentry-element":"Container","data-sentry-component":"MediaUpload","data-sentry-source-file":"MediaUpload.tsx",children:[""!==this.props.value&&-1===this.state.progress&&this.renderPreview(),this.state.progress>-1&&(0,i.jsxs)(i.Fragment,{children:[this.state.progress,"%"]}),!this.state.error&&this.state.file&&(0,i.jsx)(x,{children:this.state.file.name}),this.state.error&&(0,i.jsxs)(v,{children:["Erreur: ",this.state.error]}),this.props.children?(0,i.jsxs)(y,{htmlFor:this.props.id,children:[this.props.children,this.renderFileInput()]}):(0,i.jsxs)(b,{htmlFor:this.props.id,children:["Parcourir...",this.renderFileInput()]})]})}constructor(...e){super(...e),this.state={progress:-1},this.latestUpload=0,this.handleFileChange=e=>{var t,n;if(!e.target.files)return;this.setState({error:void 0,progress:0});let r=e.target.files[0];if(!(0,d.gK)(r))return void this.setState({error:"Formats accept\xe9s: jpg, jpeg, png, webp, heic et pdf",progress:-1});if(!(0,d.Bv)(r.size))return void this.setState({error:"Taille maximale: ".concat(d.sO," Mb"),progress:-1});this.setState({file:r}),null==(t=(n=this.props).onUploadingChange)||t.call(n,!0);let i=++this.latestUpload;(0,l.QM)(r,this.props.uploadContext,e=>this.setState({progress:e})).then(e=>{var t,n;i===this.latestUpload&&(null==(t=(n=this.props).onUploadingChange)||t.call(n,!1),this.revokeLocalPreview(),this.setState({error:void 0,progress:-1,localPreview:{value:e.value,url:URL.createObjectURL(e.file),pdf:"application/pdf"===e.file.type}}),this.props.onChange(this.props.id,e.value))},e=>{var t,n;i===this.latestUpload&&(null==(t=(n=this.props).onUploadingChange)||t.call(n,!1),(0,l.CV)(e)?(s.C.info("Media upload failed (timeout/network)",{message:null==e?void 0:e.message}),this.setState({error:"L'envoi a \xe9chou\xe9 (connexion lente ?). R\xe9essayez.",progress:-1})):(s.C.error("Media upload error",e),this.setState({error:"L'envoi a \xe9chou\xe9. R\xe9essayez.",progress:-1})))})}}}},83976:(e,t,n)=>{n.d(t,{Bv:()=>l,QC:()=>o,gK:()=>s,sO:()=>r});let r=9,i=["image/png","image/jpeg","image/webp","image/heic","image/heif","application/pdf"],a=["png","jpg","jpeg","webp","heic","heif","pdf"],o=e=>{let t=e.lastIndexOf(".");return t<1?"":e.slice(t+1).toLowerCase()},s=e=>{var t,n;if(!e)return!1;let r=(null!=(t=e.type)?t:"").toLowerCase();return!!(r&&i.includes(r))||a.includes(o(null!=(n=e.name)?n:""))},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;return e/1e6<t}},96747:(e,t,n)=>{n.d(t,{Iq:()=>r,Tg:()=>i});let r="/api/files/",i=e=>"".concat(r).concat(e)}
1,99848:(e,t,n)=>{n.d(t,{E:()=>r});let r="x-pos-bus-token"}}]);

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.