PageSourceSearch

https://www.cooperpetcare.app/_next/static/chunks/5269.482899560d895c30.js

js cooperpetcare.app collected 2026-09-24 13:55:10 UTC 18,036 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5269],{5269:(e,t,r)=>{r.d(t,{et:()=>x,ag:()=>h,dw:()=>y,sY:()=>m,Ah:()=>b,n0:()=>g,iE:()=>E,R2:()=>z,JX:()=>j,FU:()=>k,vX:()=>o});var a=r(95155),n=r(12115),s=r(2793);let l="image/jpeg,image/png,image/webp,audio/mpeg,audio/mp4,audio/webm,audio/ogg,audio/wav,video/mp4,video/webm,video/quicktime";function i(e){let t=e.type.split(";")[0];if(!l.split(",").includes(t))throw Error("format");let r=t.split("/")[0];if(!e.size||e.size>1024*({image:5,audio:10,video:20})[r]*1024)throw Error("size");return r}async function o(e,t){let r=i(e),a=await t({action:"get-upload-url",content_type:e.type.split(";")[0],size_bytes:e.size});if(!(await fetch(a.upload_url,{method:"PUT",headers:a.upload_headers,body:e,signal:AbortSignal.timeout(6e4)})).ok)throw Error("upload");return{type:r,attachment_id:a.attachment_id}}function c(e){let t=Math.floor(e/60),r=Math.floor(e%60);return`${t}:${r.toString().padStart(2,"0")}`}function d({src:e,duration:t,labels:r,dark:l}){let i=(0,n.useRef)(null),[o,d]=(0,n.useState)(!1),[u,p]=(0,n.useState)(0),[x,h]=(0,n.useState)(t||0),m=Math.max(t||x,1),b=Math.min(1,u/m),f=e=>{Number.isFinite(e.duration)&&e.duration>0&&h(e.duration)};return(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[(0,a.jsx)("audio",{ref:i,src:e,preload:"metadata",onLoadedMetadata:e=>f(e.currentTarget),onDurationChange:e=>f(e.currentTarget),onTimeUpdate:e=>p(e.currentTarget.currentTime),onPlay:()=>d(!0),onPause:()=>d(!1),onEnded:()=>{d(!1),p(0)}}),(0,a.jsx)("button",{type:"button","aria-label":o?r.pause:r.play,onClick:()=>{let e=i.current;e&&(e.paused?e.play().catch(()=>d(!1)):e.pause())},className:"flex size-8 shrink-0 items-center justify-center rounded-full outline-none "+(l?"bg-white text-[#242832]":"bg-text-strong-950 text-white"),children:o?(0,a.jsx)(s.FNz,{className:"size-4"}):(0,a.jsx)(s.V$0,{className:"size-4"})}),(0,a.jsxs)("div",{className:"relative h-4 min-w-0 flex-1 cursor-pointer touch-none",onPointerDown:e=>{let t=i.current;if(!t)return;let r=e.currentTarget.getBoundingClientRect();t.currentTime=Math.min(1,Math.max(0,(e.clientX-r.left)/r.width))*m,p(t.currentTime)},children:[(0,a.jsx)("span",{className:"absolute inset-x-0 top-1/2 h-[3px] -translate-y-1/2 rounded-full "+(l?"bg-white/30":"bg-neutral-300")}),(0,a.jsx)("span",{className:"absolute left-0 top-1/2 h-[3px] -translate-y-1/2 rounded-full "+(l?"bg-white":"bg-text-strong-950"),style:{width:`${100*b}%`}}),(0,a.jsx)("span",{className:"absolute top-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full "+(l?"bg-white":"bg-text-strong-950"),style:{left:`${100*b}%`}})]}),(0,a.jsx)("span",{className:"shrink-0 text-paragraph-xs tabular-nums "+(l?"text-white/80":"text-text-strong-950"),children:c(o||u>0?Math.floor(u):t||x)})]})}function u(e){return(0,a.jsx)(d,{...e})}function p({seconds:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"size-2.5 shrink-0 animate-pulse rounded-full bg-error-base"}),(0,a.jsx)("span",{className:"text-paragraph-sm tabular-nums text-text-strong-950",children:c(e)}),(0,a.jsx)("div",{className:"flex flex-1 items-center justify-center gap-[3px] overflow-hidden",children:Array.from({length:20}).map((e,t)=>(0,a.jsx)("div",{className:"w-[3px] shrink-0 rounded-full bg-neutral-400",style:{height:`${8+7*t%5*3}px`,animation:"pulse 0.5s ease-in-out infinite alternate",animationDelay:`${.05*t}s`}},t))})]})}function x({disabled:e,onSend:t,labels:r,className:o,micClassName:c,hideMic:d}){let x=(0,n.useRef)(null),m=(0,n.useRef)(null),b=(0,n.useRef)(null),f=(0,n.useRef)(null),g=(0,n.useRef)(!0),j=(0,n.useRef)(!1),y=(0,n.useRef)(e);y.current=e;
1let[w,v]=(0,n.useState)(!1),[k,N]=(0,n.useState)(0),z=(0,n.useRef)(0),[E,R]=(0,n.useState)(null),[C,S]=(0,n.useState)(""),[M,L]=(0,n.useState)(!1),[T,P]=(0,n.useState)(!1),[_,U]=(0,n.useState)(""),F=()=>{b.current?.getTracks().forEach(e=>e.stop()),b.current=null,f.current&&clearTimeout(f.current)};(0,n.useEffect)(()=>(g.current=!0,()=>{g.current=!1,m.current&&(m.current.onstop=null),F()}),[]),(0,n.useEffect)(()=>{e&&(m.current&&(m.current.onstop=null),F(),L(!1))},[e]),(0,n.useEffect)(()=>{if(!M)return;N(0);let e=Date.now(),t=setInterval(()=>{let t=Math.floor((Date.now()-e)/1e3);z.current=t,N(t)},250);return()=>clearInterval(t)},[M]),(0,n.useEffect)(()=>{if(!E)return void S("");let e=URL.createObjectURL(E);return S(e),()=>URL.revokeObjectURL(e)},[E]);let I=e=>{try{i(e),R(e),U("")}catch{U(r.limits)}},D=!!E&&E.type.startsWith("audio/"),$=async e=>{P(!0),U("");try{await t(e),g.current&&R(null)}catch{g.current&&U(r.failed)}finally{g.current&&P(!1)}},X=async()=>{if(!j.current&&!y.current&&!M){j.current=!0,v(!0),U("");try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});if(!g.current||y.current)return void e.getTracks().forEach(e=>e.stop());b.current=e;let t=["audio/webm;codecs=opus","audio/mp4"].find(e=>MediaRecorder.isTypeSupported(e));if(!t)throw Error("unsupported");let a=new MediaRecorder(e,{mimeType:t}),n=[],s=0;m.current=a,a.ondataavailable=e=>{e.data.size&&(n.push(e.data),s+=e.data.size),s>0xa00000&&"recording"===a.state&&a.stop()},a.onerror=()=>{F(),L(!1),U(r.failed)},a.onstop=()=>{F(),g.current&&(L(!1),I(new Blob(n,{type:t.split(";")[0]})))},a.start(1e3),L(!0),f.current=setTimeout(()=>{"recording"===a.state&&a.stop()},18e4)}catch{F(),g.current&&U(r.failed)}finally{j.current=!1,g.current&&v(!1)}}};return(0,a.jsxs)("div",{className:o??"flex shrink-0 items-center gap-1",children:[(0,a.jsx)("input",{ref:x,type:"file",accept:l,hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&I(t),e.target.value=""}}),(0,a.jsx)("button",{type:"button",className:"flex size-10 shrink-0 items-center justify-center text-[20px] leading-none text-text-strong-950 disabled:opacity-40",disabled:e||T||M,"aria-label":r.attach,title:r.limits,onClick:()=>x.current?.click(),children:"+"}),!d&&(0,a.jsx)("button",{type:"button",className:"flex size-10 shrink-0 items-center justify-center text-text-strong-950 disabled:opacity-40 "+(c||""),disabled:e||T||!!E||w||M,"aria-label":r.record,onClick:()=>void X(),children:(0,a.jsx)(s.RQr,{size:20,"aria-hidden":"true"})}),(M||D)&&(0,a.jsxs)("div",{className:"absolute inset-x-0 bottom-full z-10 mb-2 flex h-14 items-center gap-2 rounded-2xl border border-stroke-soft-200 bg-bg-white-0 px-3 text-text-strong-950 shadow-lg",children:[(0,a.jsx)("button",{type:"button","aria-label":r.discard||r.cancel,disabled:T,onClick:()=>{m.current&&(m.current.onstop=null,"recording"===m.current.state&&m.current.stop()),F(),L(!1),R(null),U("")},className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-bg-weak-50 disabled:opacity-40",children:(0,a.jsx)(s.WFf,{size:18,className:"text-error-base"})}),(0,a.jsx)("div",{className:"flex h-10 min-w-0 flex-1 items-center gap-3 rounded-full bg-bg-weak-50 px-4",children:M?(0,a.jsx)(p,{seconds:k}):(0,a.jsx)(u,{src:C,duration:z.current,labels:{play:r.play||r.record,pause:r.pause||r.stop}})}),M?(0,a.jsx)("button",{type:"button","aria-label":r.stopReview||r.stop,onClick:()=>m.current?.stop(),className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-bg-weak-50",children:(0,a.jsx)(s.FNz,{size:18,className:"text-text-strong-950"})}):(0,a.jsx)("button",{type:"button","aria-label":r.send,disabled:e||T,onClick:()=>void $(E),className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-text-strong-950 text-white disabled:opacity-40",children:T?(0,a.jsx)("span",{className:"text-paragraph-sm",children:"…"}):(0,a.jsx)(s.avw,{size:18,"aria-hidden":"true"})})]}),(_||E&&!D)&&(0,a.jsxs)("div",{className:"absolute inset-x-0 bottom-full z-10 mb-2 rounded-2xl border border-stroke-soft-200 bg-bg-white-0 p-3 text-text-strong-950 shadow-lg",children:[_&&(0,a.jsx)("p",{role:"alert",className:"text-paragraph-xs",children:_}),E&&!D&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h,{type:E.type.split("/")[0],src:C,label:r.image}),(0,a.jsx)("p",{className:"my-2 text-paragraph-xs",children:r.limits}),(0,a.jsxs)("div",{className:"flex justify-end gap-4",children:[(0,a.jsx)("button",{type:"button",disabled:T,onClick:()=>{R(null),U("")},children:r.cancel}),(0,a.jsx)("button",{type:"button",disabled:e||T,onClick:()=>void $(E),children:T?"…":r.send})]})]})]})]})}function h({type:e,src:t,label:r,audioLabels:s}
1){let[l,i]=(0,n.useState)(t),o=e=>e?.split("?")[0];if((0,n.useEffect)(()=>{o(t)!==o(l)&&i(t)},[t,l]),!l||!/^(https:|blob:)/.test(l))return(0,a.jsx)("p",{role:"status",children:"…"});let c={src:l,onError:()=>{t!==l&&i(t)},className:"max-h-64 w-full rounded-xl"};return"image"===e?(0,a.jsx)("a",{href:t||l,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)("img",{...c,alt:r,loading:"lazy",className:"max-h-64 max-w-full rounded-xl object-contain"})}):"audio"===e?s?(0,a.jsx)("div",{className:"flex min-w-[240px] max-w-full items-center rounded-2xl px-3 py-2.5",style:{background:"#242832"},"aria-label":r,children:(0,a.jsx)(d,{src:l,labels:s,dark:!0})}):(0,a.jsx)("audio",{...c,controls:!0,preload:"none","aria-label":r}):"video"===e?(0,a.jsx)("video",{...c,controls:!0,preload:"metadata",playsInline:!0,"aria-label":r}):null}function m({id:e,title:t,status:r,summary:n,labels:s}){return(0,a.jsxs)("article",{className:"mt-2 rounded-xl border border-stroke-soft-200 p-3 text-paragraph-xs",children:[(0,a.jsxs)("strong",{children:[t," \xb7 #",e]}),(0,a.jsx)("p",{children:"resolved"===r?s.resolved:s.open}),n&&(0,a.jsx)("p",{className:"mt-1 whitespace-pre-wrap",children:n})]})}function b({items:e,labels:t}){return e.length?(0,a.jsx)(a.Fragment,{children:["open","resolved"].filter(t=>e.some(e=>e.status===t)).map(r=>(0,a.jsxs)("div",{className:"pb-2",children:[(0,a.jsxs)("span",{className:"block pb-2 pt-3 uppercase text-text-strong-950",style:{fontSize:11,fontWeight:400,letterSpacing:"0.06em",lineHeight:1.2},children:["open"===r?t.open:t.resolved," \xb7"," ",e.filter(e=>e.status===r).length]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.filter(e=>e.status===r).map(e=>(0,a.jsxs)("article",{className:"rounded-2xl border border-stroke-soft-200 bg-bg-white-0 p-3.5",children:[(0,a.jsx)("h3",{className:"text-label-sm",children:e.title}),e.summary&&(0,a.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-paragraph-sm",children:e.summary}),(0,a.jsxs)("p",{className:"mt-2 text-paragraph-xs text-text-soft-400",children:["#",e.id,e.closed_by&&` \xb7 ${e.closed_by}`]})]},e.id))})]},r))}):(0,a.jsx)("p",{className:"rounded-2xl bg-bg-weak-50 px-4 py-5 text-center text-paragraph-sm",children:t.empty})}var f=r(47650);let g=(0,n.forwardRef)(function({children:e,header:t,footer:r,pinned:n,className:s},l){return(0,a.jsxs)("div",{ref:l,className:"flex min-h-0 flex-col overflow-hidden bg-bg-white-0 text-text-strong-950 "+(s||""),children:[t&&(0,a.jsx)("div",{className:"shrink-0",children:t}),n&&(0,a.jsx)("div",{className:"shrink-0",children:n}),e,r&&(0,a.jsx)("div",{className:"shrink-0",children:r})]})});function j({text:e,reply:t,quoteLabel:r,renderText:n,timestamp:s}){let l=e.split(/(https?:\/\/[^\s]+)/g);return(0,a.jsxs)(a.Fragment,{children:[t&&(0,a.jsx)(k,{reply:t,label:r}),(0,a.jsxs)("p",{className:"whitespace-pre-wrap break-words overflow-hidden text-paragraph-sm leading-relaxed",children:[n?n(e):l.map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"underline break-all",children:e},t):e),s&&(0,a.jsx)("span",{className:"float-right ml-3 mt-0.5 flex items-center gap-1",children:s})]})]})}let y=(0,n.forwardRef)(function({emojiLabel:e,onEmoji:t,className:r,...n},s){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v,{label:e,disabled:n.disabled,onSelect:t}),(0,a.jsx)("textarea",{...n,ref:s,className:"max-h-[120px] min-h-[24px] w-full resize-none bg-transparent text-paragraph-sm text-text-strong-950 leading-[24px] placeholder:text-text-soft-400 focus:outline-none disabled:opacity-50 "+(r||"")})]})}),w=["\uD83D\uDC4D","❤️","\uD83D\uDE02","\uD83D\uDE2E","\uD83D\uDE22","\uD83D\uDE4F","\uD83D\uDC3E","\uD83D\uDE0A"];function v({onSelect:e,label:t,disabled:r}
1){let[s,l]=(0,n.useState)(!1),i=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!s)return;let e=e=>{o.current?.contains(e.target)||l(!1)};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[s]),(0,a.jsxs)("span",{ref:o,className:"relative inline-flex shrink-0",onKeyDown:e=>{"Escape"===e.key&&(l(!1),i.current?.focus(),e.stopPropagation())},children:[(0,a.jsx)("button",{ref:i,type:"button","aria-label":t,"aria-expanded":s,disabled:r,className:"inline-flex size-8 items-center justify-center rounded-full text-primary-base hover:bg-bg-weak-50 disabled:opacity-40",onClick:()=>l(!s),children:"☺"}),s&&(0,a.jsx)("span",{role:"group","aria-label":t,className:"absolute bottom-full left-0 z-50 mb-2 grid w-44 grid-cols-4 gap-1 rounded-2xl border border-stroke-soft-200 bg-bg-white-0 p-2 shadow-lg",children:w.map(t=>(0,a.jsx)("button",{type:"button","aria-label":t,className:"size-9 rounded-full text-xl hover:bg-bg-weak-50",onClick:()=>{l(!1),i.current?.focus(),e(t)},children:t},t))})]})}function k({reply:e,label:t,onCancel:r,cancelLabel:n}){return(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 rounded-lg border-l-2 border-current bg-primary-alpha-10 px-3 py-2 text-paragraph-xs",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{children:t}),(0,a.jsx)("div",{className:"truncate",children:e.text||e.type})]}),r&&(0,a.jsx)("button",{type:"button",className:"size-8 shrink-0","aria-label":n,onClick:r,children:"\xd7"})]})}(0,n.createContext)(null).Provider;let N=(0,n.createContext)(null);function z({own:e}){let t=(0,n.useContext)(N),r=(0,n.useRef)(null),s=(0,n.useRef)(null),[l,i]=(0,n.useState)(null),o=!!l;if((0,n.useEffect)(()=>{if(!o)return;let e=()=>i(null),t=t=>{let a=t.target;s.current?.contains(a)||r.current?.contains(a)||e()},a=t=>{"Escape"===t.key&&(e(),r.current?.focus())};return document.addEventListener("pointerdown",t),document.addEventListener("keydown",a),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{document.removeEventListener("pointerdown",t),document.removeEventListener("keydown",a),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[o]),!t)return null;let c=l?Math.max(8,Math.min(e?l.left:l.right-184,window.innerWidth-184-8)):0,d=!l||l.bottom+156+8<window.innerHeight;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{ref:r,type:"button","aria-label":t.labels.options,"aria-haspopup":"menu","aria-expanded":o,className:"inline-flex size-6 shrink-0 items-center justify-center self-center rounded-full text-text-soft-400 hover:bg-bg-weak-50 active:bg-bg-weak-50",onClick:()=>i(o?null:r.current?.getBoundingClientRect()??null),children:(0,a.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,a.jsx)("path",{d:"m6 9 6 6 6-6"})})}),l&&(0,f.createPortal)((0,a.jsxs)("div",{ref:s,role:"menu","aria-label":t.labels.options,onPointerDown:e=>e.stopPropagation(),className:"fixed z-[60] rounded-2xl border border-stroke-soft-200 bg-bg-white-0 p-1.5 shadow-lg",style:{width:184,left:c,...d?{top:l.bottom+4}:{bottom:window.innerHeight-l.top+4}},children:[(0,a.jsx)("button",{type:"button",role:"menuitem",className:"block w-full rounded-xl px-3 py-2 text-left text-paragraph-sm text-text-strong-950 hover:bg-bg-weak-50",onClick:()=>{i(null),t.reply()},children:t.labels.reply}),t.react&&(0,a.jsx)("div",{role:"group","aria-label":t.labels.react,className:"mt-1 grid grid-cols-4 gap-1 border-t border-stroke-soft-200 pt-1.5",children:w.map(e=>(0,a.jsx)("button",{type:"button","aria-label":e,"aria-pressed":t.mine===e,disabled:t.pending,className:"size-10 rounded-full text-xl hover:bg-bg-weak-50 aria-pressed:bg-primary-alpha-10 disabled:opacity-40",onClick:()=>{i(null),t.react?.(e)},children:e},e))})]}),document.body)]})}function E({children:e,reply:t,reactions:r,actions:s,labels:l,disabled:i}){let o=(0,n.useRef)(null),[c,d]=(0,n.useState)(0),[u,p]=(0,n.use
1State)(!1),[x,h]=(0,n.useState)(!1),m=Object.entries(r||{}).reduce((e,[,t])=>(e[t]=(e[t]||0)+1,e),{}),b=async e=>{if(!u&&!i&&s.react){p(!0),h(!1);try{await s.react(t.message_id,r?.[s.currentUserId||""]===e?null:e)}catch{h(!0)}finally{p(!1)}}},f=i?null:{reply:()=>s.selectReply(t),react:s.react?e=>void b(e):void 0,mine:r?.[s.currentUserId||""],pending:u,labels:{reply:l.reply,react:l.react,options:l.options??l.react}};return(0,a.jsx)(N.Provider,{value:f,children:(0,a.jsxs)("div",{className:"min-w-0",style:{touchAction:"pan-y"},onPointerDown:e=>{i||0!==e.button||e.target.closest("button,a,input,audio,video,textarea,select")||(o.current={x:e.clientX,y:e.clientY,id:e.pointerId,cancelled:!1})},onPointerMove:e=>{let t=o.current;if(!t||t.id!==e.pointerId||t.cancelled)return;let r=e.clientX-t.x,a=e.clientY-t.y;if(Math.abs(a)>12&&Math.abs(a)>Math.abs(r)){t.cancelled=!0,d(0);return}r>12&&Math.abs(r)>1.5*Math.abs(a)&&(e.currentTarget.setPointerCapture?.(e.pointerId),d(Math.min(r,64)))},onPointerUp:e=>{let r=o.current;r&&r.id===e.pointerId&&!r.cancelled&&e.clientX-r.x>=52&&Math.abs(e.clientY-r.y)<(e.clientX-r.x)/1.5&&s.selectReply(t),o.current=null,d(0)},onPointerCancel:()=>{o.current=null,d(0)},children:[(0,a.jsx)("div",{style:{transform:c?`translateX(${c}px)`:void 0},children:e}),!i&&(Object.keys(m).length>0||x)&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-1 px-2 pt-1",children:[Object.entries(m).map(([e,t])=>(0,a.jsxs)("button",{type:"button",disabled:u||!s.react,"aria-pressed":r?.[s.currentUserId||""]===e,className:"rounded-full border border-stroke-soft-200 px-2 py-1 text-paragraph-xs aria-pressed:bg-primary-alpha-10",onClick:()=>void b(e),children:[e," ",t]},e)),x&&(0,a.jsx)("span",{role:"alert",className:"text-paragraph-xs text-error-base",children:l.failed})]})]})})}}}]);

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.