@mushi-mushi/web 1.20.0 → 1.21.0

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.
@@ -1,14 +1,14 @@
1
- (function(){'use strict';var Sn=4194304,nr=1.5*1024*1024;function En(t){try{return JSON.stringify(t)}catch{return null}}function kn(t,e=Sn){let r=En(t);if(r===null)return {ok:false,bytes:0,maxBytes:e,serializeFailed:true,reason:"Report could not be serialized (circular reference in metadata?)"};let n=new TextEncoder().encode(r).length;return n<=e?{ok:true,bytes:n,maxBytes:e}:{ok:false,bytes:n,maxBytes:e,reason:`Report payload ${Wt(n)} exceeds limit ${Wt(e)}`}}function Wt(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(2)} MB`}var Vt=false,Rn="X-Mushi-User-Token",Cn="X-Mushi-Project",sr="X-Mushi-SDK-Package",ir="X-Mushi-SDK-Version";function Tn(t){let e={"Content-Type":"application/json","X-Mushi-Api-Key":t.apiKey,[Cn]:t.projectId};return t.sdkPackage&&(e[sr]=t.sdkPackage),t.sdkVersion&&(e[ir]=t.sdkVersion),t.userToken&&(e[Rn]=t.userToken),t.internalKind&&(e[$e]=t.internalKind),e}var Ue="https://dxptnwrhwsqckaftyymj.supabase.co/functions/v1/api",$e="X-Mushi-Internal",Re="__mushiInternal",Mn=1e4,$n=2;function or(t){let{projectId:e,apiKey:r,apiEndpoint:n=Ue,timeout:s=Mn,maxRetries:i=$n,getUserToken:a,sdkPackage:o,sdkVersion:l}=t,g=n.replace(/\/$/,"");async function p(d,m,c,f=i,S,$){let R=`${g}${m}`,E=new AbortController,y=setTimeout(()=>E.abort(),s),k=a?.()??null;try{let b=await fetch(R,{method:d,headers:{...Tn({apiKey:r,projectId:e,sdkPackage:o,sdkVersion:l,userToken:k,internalKind:S}),...$},body:c?JSON.stringify(c):void 0,signal:E.signal,...S?{[Re]:S}:{}});if(clearTimeout(y),b.status===307||b.status===308){let W=b.headers.get("Location");if(W&&f>0){let A=W.replace(/\/v1\/.*$/,"").replace(/\/$/,"");if(A!==g)return g=A,p(d,m,c,f-1,S,$)}}if(!b.ok){let W=await b.json().catch(()=>({}));if((b.status===401||b.status===403)&&!Vt){Vt=!0;let A=g===Ue?"Get the correct values at: https://kensaur.us/mushi-mushi/admin/projects":"Get the correct values from your Mushi console's Projects page.";console.error(`[Mushi] Credentials rejected (HTTP ${b.status}). Check your Project ID and API key scope (must be "report:write"). `+A);}return b.status>=500&&f>0?(await Kt(Gt(i-f)),p(d,m,c,f-1,S,$)):{ok:!1,error:{code:W.error?.code||`HTTP_${b.status}`,message:W.error?.message||W.message||`HTTP ${b.status} error`}}}let _=await b.json();return {ok:!0,data:_&&typeof _=="object"&&"ok"in _&&"data"in _?_.data:_}}catch(b){return clearTimeout(y),f>0&&An(b)?(await Kt(Gt(i-f)),p(d,m,c,f-1,S)):{ok:false,error:{code:"NETWORK_ERROR",message:b instanceof Error?b.message:"Unknown network error"}}}}async function w(d,m,c,f){let S=await Ln(c),$=String(Date.now()),R=await In(r,`${e}.${$}.${S}`),E=`${g}${m}`,y=await fetch(E,{method:d,headers:{"Content-Type":"application/json","X-Mushi-Api-Key":r,"X-Mushi-Project":e,...o?{[sr]:o}:{},...l?{[ir]:l}:{},[$e]:"reporter-poll","X-Reporter-Token-Hash":S,"X-Reporter-Ts":$,"X-Reporter-Hmac":R},body:f?JSON.stringify(f):void 0,[Re]:"reporter-poll"});if(!y.ok){let b=await y.json().catch(()=>({}));return {ok:false,error:{code:`HTTP_${y.status}`,message:b.error?.message??b.message??`HTTP ${y.status} error`}}}let k=await y.json();return {ok:true,data:k.data??k}}return {async submitReport(d){let m=kn(d);return m.ok?p("POST","/v1/reports",d,i,"report-submit"):{ok:false,error:{code:m.serializeFailed?"SERIALIZE_FAILED":"PAYLOAD_TOO_LARGE",message:m.reason??"Report payload exceeds size limit"}}},async getReportStatus(d){return p("GET",`/v1/reports/${d}/status`,void 0,i,"report-status")},async getSdkConfig(){return p("GET","/v1/sdk/config",void 0,i,"sdk-config")},async askAssistant(d){return p("POST","/v1/sdk/assistant",{message:d.message,threadId:d.threadId??null,context:d.context??null},1,"community")},async getLatestSdkVersion(d){let m=new URLSearchParams({package:d}).toString();return p("GET",`/v1/sdk/latest-version?${m}`,void 0,i,"sdk-config")},async postDiscoveryEvent(d){return p("POST","/v1/sdk/discovery",d,1,"discovery")},async listReporterReports(d){return w("GET","/v1/reporter/reports",d)},async listReporterComments(d,m){return w("GET",`/v1/reporter/reports/${d}/comments`,m)},async replyToReporterReport(d,m,c,f){return w("POST",`/v1/reporter/reports/${d}/reply`,m,{body:c,...f?{feedback_signal:f}:{}})},async reopenReporterReport(d,m,c){return w("POST",`/v1/reporter/reports/${d}/reopen`,m,{note:c??""})},async listNotifications(d,m){let c=new URLSearchParams;m?.since&&c.set("since",m.since),m?.limit&&c.set("limit",String(m.limit));let f=c.size?`?${c.toString()}`:"";return w("GET",`/v1/notifications${f}`,d)},async markNotificationRead(d,m){return w("POST",`/v1/notifications/${d}/read`,m,{})},async listReporterFeatureBoard(d){return w("GET","/v1/reporter/feature-board",d)},async voteReporterFeatureBoard(d,m){return w("POST",`/v1/reporter/feature-board/${d}/vote`,m,{})},async submitActivity(d,m,c){return p("POST","/v1/sdk/activity",{user_id:d,user_traits:c?.userTraits,opted_in:c?.optedIn,reporter_token_hash:c?.reporterTokenHash,...c?.hostJwt?{host_jwt:c.hostJwt}:{},events:m},1,"discovery")},async getMyPoints(d){return p("GET",`/v1/sdk/me/points?userId=${encodeURIComponent(d)}`,void 0,1,"reporter-poll")},async getMyTier(d){return p("GET",`/v1/sdk/me/tier?userId=${encodeURIComponent(d)}`,void 0,1,"reporter-poll")},async getMyHistory(d,m){let c=new URLSearchParams({userId:d,...m?.limit?{limit:String(m.limit)}:{}});return p("GET",`/v1/sdk/me/history?${c}`,void 0,1,"reporter-poll")},async getHallOfFame(d=10){return p("GET",`/v1/sdk/hall-of-fame?limit=${d}`,void 0,1,"reporter-poll")},async sendMagicLink(d){return p("POST","/v1/tester/magic-link",{email:d},1,"community")},async linkReporterToken(d,m){return p("POST","/v1/tester/link-reporter",{reporter_token_hash:d},1,"community",{Authorization:`Bearer ${m}`})},async getCrossAppReports(d,m){let c=new URLSearchParams;m?.limit&&c.set("limit",String(m.limit)),m?.offset&&c.set("offset",String(m.offset));let f=c.size?`?${c.toString()}`:"";return p("GET",`/v1/tester/cross-app-reports${f}`,void 0,1,"community",{Authorization:`Bearer ${d}`})},async getMyReputation(d){return p("GET","/v1/tester/reputation",void 0,1,"community",{Authorization:`Bearer ${d}`})},async getPublicLeaderboard(d=20){return p("GET",`/v1/public/tester-leaderboard?limit=${d}`,void 0,1,"reporter-poll")},async getTesterStatus(d){return p("GET","/v1/me/tester-status",void 0,1,"community",{Authorization:`Bearer ${d}`})}}}async function Ln(t){let e=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(t));return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}async function In(t,e){let r=await crypto.subtle.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},false,["sign"]),n=await crypto.subtle.sign("HMAC",r,new TextEncoder().encode(e));return Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("")}function Kt(t){return new Promise(e=>setTimeout(e,t))}function Gt(t){return Math.min(1e3*2**t+Math.random()*500,1e4)}function An(t){return t instanceof DOMException&&t.name==="AbortError"||t instanceof TypeError}function ot(...t){return t.find(e=>e!==void 0&&e!=="")}function ie(t){try{let e=undefined;return typeof e=="object"&&e!==null?e[t]:void 0}catch{return}}function ge(t){try{return t()}catch{return}}function ar(){let t=ot(ie("VITE_MUSHI_PROJECT_ID"),ie("NEXT_PUBLIC_MUSHI_PROJECT_ID"),ie("NUXT_PUBLIC_MUSHI_PROJECT_ID"),ie("EXPO_PUBLIC_MUSHI_PROJECT_ID"),ge(()=>process.env.NEXT_PUBLIC_MUSHI_PROJECT_ID),ge(()=>process.env.EXPO_PUBLIC_MUSHI_PROJECT_ID),ge(()=>process.env.MUSHI_PROJECT_ID)),e=ot(ie("VITE_MUSHI_API_KEY"),ie("NEXT_PUBLIC_MUSHI_API_KEY"),ie("NUXT_PUBLIC_MUSHI_API_KEY"),ie("EXPO_PUBLIC_MUSHI_API_KEY"),ge(()=>process.env.NEXT_PUBLIC_MUSHI_API_KEY),ge(()=>process.env.EXPO_PUBLIC_MUSHI_API_KEY),ge(()=>process.env.MUSHI_API_KEY)),r=ot(ie("VITE_MUSHI_API_ENDPOINT"),ie("NEXT_PUBLIC_MUSHI_API_ENDPOINT"),ie("NUXT_PUBLIC_MUSHI_API_ENDPOINT"),ie("EXPO_PUBLIC_MUSHI_API_ENDPOINT"),ge(()=>process.env.NEXT_PUBLIC_MUSHI_API_ENDPOINT),ge(()=>process.env.EXPO_PUBLIC_MUSHI_API_ENDPOINT),ge(()=>process.env.MUSHI_API_ENDPOINT)),n={};return t&&(n.projectId=t),e&&(n.apiKey=e),r&&(n.apiEndpoint=r),n}var _n=10,Pn=2e3,Dn=[/^(.)\1{10,}$/,/^[A-Z\s!?]{20,}$/,/^[\d\s]+$/,/^[^a-zA-Z\u00C0-\u024F\u4E00-\u9FFF\u3040-\u309F\u30A0-\u30FF]{10,}$/,/^(asdf|qwerty|lorem ipsum)[.,!?\s]*$/i],On=/^[bcdfghjklmnpqrstvwxz]{6,}/i;function lr(t={}){let{enabled:e=true,blockObviousSpam:r=true,minDescriptionLength:n=_n,maxDescriptionLength:s=Pn}=t;function i(o){if(!e)return {passed:true};let l=o.trim();if(l.length<n)return {passed:false,reason:`Too short (min ${n} characters)`};if(l.length>s)return {passed:false,reason:`Too long (max ${s} characters)`};if(r){for(let p of Dn)if(p.test(l))return {passed:false,reason:"Detected as spam"};if(On.test(l))return {passed:false,reason:"Detected as gibberish"};if(l.split(/\s+/).filter(p=>p.length>1).length<2)return {passed:false,reason:"Description needs at least 2 words"}}return {passed:true}}function a(o){let l=o.trim();return l.length<=s?l:l.slice(0,s)+"..."}return {check:i,truncate:a}}var Yt={debug:10,info:20,warn:30,error:40,fatal:50,silent:99},Hn={debug:"DBG",info:"INF",warn:"WRN",error:"ERR",fatal:"FTL"},ee={reset:"\x1B[0m",dim:"\x1B[2m",bold:"\x1B[1m",cyan:"\x1B[36m",green:"\x1B[32m",yellow:"\x1B[33m",red:"\x1B[31m",white:"\x1B[37m",bgRed:"\x1B[41m"},Bn={debug:ee.dim,info:ee.green,warn:ee.yellow,error:ee.red,fatal:`${ee.bgRed}${ee.white}${ee.bold}`};function Nn(){try{if(typeof globalThis.Deno<"u")return "json"}catch{}let t=typeof globalThis.process<"u"?globalThis.process:void 0;if(t?.env){if(t.env.NODE_ENV==="production"||t.env.LOG_FORMAT==="json")return "json";if(t.env.LOG_FORMAT==="pretty"||t.stdout?.isTTY)return "pretty"}return typeof globalThis.window<"u"?"pretty":"json"}function Fn(t){let e=[];for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="object"?e.push(`${r}=${JSON.stringify(n)}`):e.push(`${r}=${String(n)}`));return e.join(" ")}function Un(t){let{ts:e,level:r,scope:n,msg:s,...i}=t,a=e.slice(11,23),o=Bn[r]??"",l=Hn[r]??r.toUpperCase(),g=Object.keys(i).length>0?` ${ee.dim}${Fn(i)}${ee.reset}`:"";return `${ee.dim}${a}${ee.reset} ${o}${l}${ee.reset} ${ee.cyan}[${n}]${ee.reset} ${s}${g}`}function qn(t){return JSON.stringify(t)}function jn(t){return t==="stderr"?(e,r)=>{console.error(r);}:(e,r)=>{switch(e){case "error":case "fatal":console.error(r);break;case "warn":console.warn(r);break;default:console.log(r);}}}function cr(t,e,r,n,s){let i=e;function a(o,l,g){if(Yt[o]<Yt[i])return;let p={ts:new Date().toISOString(),level:o,scope:t,msg:l,...r,...g};s(o,n(p));}return {debug:(o,l)=>a("debug",o,l),info:(o,l)=>a("info",o,l),warn:(o,l)=>a("warn",o,l),error:(o,l)=>a("error",o,l),fatal:(o,l)=>a("fatal",o,l),child(o,l){return cr(`${t}:${o}`,i,{...r,...l},n,s)},setLevel(o){i=o;}}}function qe(t){let{scope:e,level:r="info",meta:n={},format:s="auto",destination:i="stdout"}=t,o=(s==="auto"?Nn():s)==="json"?qn:Un,l=jn(i);return cr(e,r,n,o,l)}var lt={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},fatal:()=>{},child:()=>lt,setLevel:()=>{}},zn="mushi-mushi-keyring",Ce="keys",ur="offline-queue/v1",Be=null,Ne=null;function Wn(){return typeof globalThis<"u"&&typeof globalThis.crypto<"u"&&typeof globalThis.crypto.subtle<"u"&&typeof indexedDB<"u"}function dr(){return new Promise((t,e)=>{let r=indexedDB.open(zn,1);r.onupgradeneeded=()=>{let n=r.result;n.objectStoreNames.contains(Ce)||n.createObjectStore(Ce);},r.onsuccess=()=>t(r.result),r.onerror=()=>e(r.error);})}async function Vn(){let t=await dr();return new Promise((e,r)=>{let s=t.transaction(Ce,"readonly").objectStore(Ce).get(ur);s.onsuccess=()=>e(s.result??null),s.onerror=()=>r(s.error);})}async function Kn(t){let e=await dr();return new Promise((r,n)=>{let s=e.transaction(Ce,"readwrite");s.objectStore(Ce).put(t,ur),s.oncomplete=()=>r(),s.onerror=()=>n(s.error);})}async function pr(){if(Be)return Be;if(Ne)return Ne;if(!Wn())throw new Error("Web Crypto + IndexedDB required for offline queue encryption");return Ne=(async()=>{let t=await Vn();if(t)return Be=t,t;let e=await crypto.subtle.generateKey({name:"AES-GCM",length:256},false,["encrypt","decrypt"]);return await Kn(e),Be=e,e})(),Ne}function Xt(t){let e="";for(let r of t)e+=String.fromCharCode(r);return btoa(e)}function Jt(t){let e=atob(t),r=new Uint8Array(new ArrayBuffer(e.length));for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}async function Gn(t){let e=await pr(),r=crypto.getRandomValues(new Uint8Array(12)),n=new TextEncoder().encode(JSON.stringify(t)),s=new Uint8Array(await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,n));return {_mme:1,iv:Xt(r),ct:Xt(s)}}function Yn(t){return !!t&&typeof t=="object"&&t._mme===1&&typeof t.iv=="string"&&typeof t.ct=="string"}async function Xn(t){let e=await pr(),r=Jt(t.iv),n=Jt(t.ct),s=await crypto.subtle.decrypt({name:"AES-GCM",iv:r},e,n);return JSON.parse(new TextDecoder().decode(s))}var fe=qe({scope:"mushi:queue",level:"warn"}),Jn="mushi-mushi",Q="offline-reports",Zn=1,at="mushi_offline_queue",Qn=10,es=6e4,ts=3e4,rs=8,ns=1440*60*1e3;function hr(t={}){let{enabled:e=true,maxQueueSize:r=50,syncOnReconnect:n=true,encryptAtRest:s=true}=t,i=null,a=null,o=null;async function l(M){let C=new Date().toISOString();if(!s)return {...M,queuedAt:C};try{let T=await Gn(M);return {id:M.id,queuedAt:C,payload:T}}catch(T){return fe.warn("Offline queue: encryption failed, storing plaintext",{err:String(T)}),{...M,queuedAt:C}}}async function g(M){if(p(M))try{return await Xn(M.payload)}catch(C){return fe.warn("Offline queue: decrypt failed, dropping row",{err:String(C),id:M.id}),null}return M}function p(M){return !!M.payload&&Yn(M.payload)}function w(M){let C=M.attempts;return typeof C=="number"&&Number.isFinite(C)?C:0}function d(M,C){let T=M.queuedAt;if(!T)return false;let H=Date.parse(T);return Number.isNaN(H)?false:C-H>ns}function m(){return o||(typeof indexedDB<"u"?o="indexeddb":typeof localStorage<"u"?o="localstorage":o="none",o)}function c(){return new Promise((M,C)=>{let T=indexedDB.open(Jn,Zn);T.onupgradeneeded=()=>{let H=T.result;H.objectStoreNames.contains(Q)||H.createObjectStore(Q,{keyPath:"id"});},T.onsuccess=()=>M(T.result),T.onerror=()=>{o="localstorage",C(T.error);};})}async function f(M){let C=await c(),T=await l(M);return new Promise((H,P)=>{let ae=C.transaction(Q,"readwrite");ae.objectStore(Q).put(T),ae.oncomplete=()=>H(),ae.onerror=()=>P(ae.error);})}async function S(){let M=await c();return new Promise((C,T)=>{let P=M.transaction(Q,"readonly").objectStore(Q).getAll();P.onsuccess=()=>C(P.result),P.onerror=()=>T(P.error);})}async function $(M){let C=await c();return new Promise((T,H)=>{let P=C.transaction(Q,"readwrite");P.objectStore(Q).delete(M),P.oncomplete=()=>T(),P.onerror=()=>H(P.error);})}async function R(M){let C=await c();return new Promise((T,H)=>{let P=C.transaction(Q,"readwrite");P.objectStore(Q).put(M),P.oncomplete=()=>T(),P.onerror=()=>H(P.error);})}async function E(){let M=await c();return new Promise((C,T)=>{let P=M.transaction(Q,"readonly").objectStore(Q).count();P.onsuccess=()=>C(P.result),P.onerror=()=>T(P.error);})}async function y(){let M=await c();return new Promise((C,T)=>{let H=M.transaction(Q,"readwrite");H.objectStore(Q).clear(),H.oncomplete=()=>C(),H.onerror=()=>T(H.error);})}function k(){try{let M=localStorage.getItem(at);return M?JSON.parse(M):[]}catch{return []}}function b(M){try{localStorage.setItem(at,JSON.stringify(M));}catch{}}async function _(M){let C=k();C.push(await l(M)),b(C);}function V(M){let C=k().filter(T=>T.id!==M);b(C);}function W(M){let C=k(),T=C.findIndex(H=>H.id===M.id);T>=0&&(C[T]=M,b(C));}async function A(M,C){try{M==="indexeddb"?await $(C):V(C);}catch(T){fe.debug("Offline queue: row removal failed (will age out)",{id:C,err:String(T)});}}async function G(M,C){try{return M==="indexeddb"?await R(C):W(C),!0}catch(T){return fe.debug("Offline queue: row persist failed",{id:C.id,err:String(T)}),false}}async function Se(M){if(!e)return;if(await de()>=r){fe.warn("Offline queue full \u2014 dropping report",{maxQueueSize:r});return}let T=m();if(T==="indexeddb")try{await f(M);return}catch{o="localstorage";}if(T==="localstorage"||o==="localstorage"){await _(M);return}}function Y(M){return Math.min(1e3*2**M+Math.random()*500,es)}function K(M){return new Promise(C=>setTimeout(C,M))}async function q(M){if(!e)return {sent:0,failed:0};let C,T=m();if(T==="indexeddb")try{C=await S();}catch{C=k();}else C=k();let H=Date.now(),P=[];for(let ne of C)if(d(ne,H)){let J=ne.id;await A(T,J),fe.debug("Offline queue: evicting stale report",{id:J});}else P.push(ne);C=P;let ae=C.slice(0,Qn),Me=0,Ee=0;for(let ne=0;ne<ae.length;ne++){let J=ae[ne],D=J.id,st=await g(J);if(!st){await A(T,D),Ee++;continue}let B=await M.submitReport(st);if(B.ok)await A(T,D),Me++;else {let Oe=B.error?.code==="HTTP_400"||B.error?.code==="HTTP_413"||B.error?.code==="HTTP_422"||B.error?.code==="INGEST_ERROR"||B.error?.code==="VALIDATION_ERROR"||B.error?.code==="PAYLOAD_TOO_LARGE"||B.error?.code==="SERIALIZE_FAILED"||typeof B.error?.message=="string"&&/invalid payload|description must be at least|validation/i.test(B.error.message),He=!Oe&&(B.error?.code==="NETWORK_ERROR"||B.error?.code==="HTTP_403"||B.error?.code==="HTTP_429"||B.error?.code==="HTTP_502"||B.error?.code==="HTTP_503"||B.error?.code==="HTTP_504"||typeof B.error?.code=="string"&&B.error.code.startsWith("HTTP_5"));if(Oe)await A(T,D);else if(He){let ke=w(J)+1;ke>=rs?(await A(T,D),fe.warn("Offline queue: giving up on report after repeated failures",{id:D,attempts:ke,code:B.error?.code})):(J.attempts=ke,await G(T,J)?fe.debug("Offline queue: transient failure, will retry",{id:D,attempts:ke,code:B.error?.code}):(await A(T,D),fe.warn("Offline queue: dropping report (attempt counter unpersistable)",{id:D,code:B.error?.code})));}Ee++,ne<ae.length-1&&await K(Y(ne));}}return {sent:Me,failed:Ee}}async function de(){if(m()==="indexeddb")try{return await E()}catch{return k().length}return k().length}async function me(){if(m()==="indexeddb")try{await y();}catch{}try{localStorage.removeItem(at);}catch{}}function De(M){if(!e||!n||typeof window>"u")return;let C=()=>{navigator.onLine&&q(M).catch(()=>{});};window.addEventListener("online",C),a=setInterval(()=>{de().then(T=>{T>0&&C();});},ts),i=()=>{window.removeEventListener("online",C),a&&(clearInterval(a),a=null);};}function F(){i?.(),i=null;}return {enqueue:Se,flush:q,size:de,clear:me,startAutoSync:De,stopAutoSync:F}}function ct(){let t=typeof navigator<"u"?navigator:void 0,e=typeof window<"u"?window:void 0,r=typeof document<"u"?document:void 0,n=typeof screen<"u"?screen:void 0;is(t);let s=t&&"connection"in t?t.connection:void 0;return {userAgent:t?.userAgent??"unknown",platform:t?.platform??"unknown",language:t?.language??"en",viewport:{width:e?.innerWidth??0,height:e?.innerHeight??0},url:e?.location?.href??"",referrer:r?.referrer??"",timestamp:new Date().toISOString(),timezone:Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone??"UTC",connection:s?{effectiveType:s.effectiveType,downlink:s.downlink,rtt:s.rtt}:void 0,deviceMemory:t?.deviceMemory,hardwareConcurrency:t?.hardwareConcurrency,route:e?.location?.pathname,nearestTestid:ss(r),userAgentData:as(t),screen:ls(n,e),prefersColorScheme:cs(e),prefersReducedMotion:oe(e,"(prefers-reduced-motion: reduce)"),prefersReducedData:oe(e,"(prefers-reduced-data: reduce)"),prefersContrast:us(e),forcedColors:oe(e,"(forced-colors: active)"),online:typeof t?.onLine=="boolean"?t.onLine:void 0,displayMode:ds(e),documentTitle:r?.title?.slice(0,200),buildId:ps(r),pageLoadTiming:hs(e)}}function ss(t){if(!t)return;let e=t.activeElement??null,r=0;for(;e&&r<20;){let n=e.getAttribute?.("data-testid");if(n)return n;e=e.parentElement,r++;}}var ue=null,Zt=false;function is(t){if(Zt)return;let e=t?.userAgentData;e?.getHighEntropyValues&&(Zt=true,e.getHighEntropyValues(["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList"]).then(r=>{ue=r;}).catch(()=>{}));}function os(t){if(!t?.length)return;let e=t.filter(n=>!/not.?a.?brand/i.test(n.brand));return e.length===0?void 0:e.find(n=>!/chromium|google chrome/i.test(n.brand))??e[0]}function as(t){let e=t?.userAgentData;if(!e&&!ue)return;let r=ue?.fullVersionList,n=os(r??e?.brands),s={};return n&&(s.browser=n.brand,s.browserVersion=n.version),e?.platform&&(s.os=e.platform),ue?.platformVersion&&(s.osVersion=ue.platformVersion),typeof e?.mobile=="boolean"&&(s.mobile=e.mobile),ue?.model&&(s.model=ue.model),ue?.architecture&&(s.architecture=ue.architecture),ue?.bitness&&(s.bitness=ue.bitness),Object.keys(s).length===0?void 0:s}function ls(t,e){if(!t&&!e)return;let r={};typeof t?.width=="number"&&(r.width=t.width),typeof t?.height=="number"&&(r.height=t.height),typeof e?.devicePixelRatio=="number"&&(r.devicePixelRatio=e.devicePixelRatio),typeof t?.colorDepth=="number"&&(r.colorDepth=t.colorDepth);let n=t?.orientation?.type;return n&&(r.orientation=n),Object.keys(r).length===0?void 0:r}function oe(t,e){if(t?.matchMedia)try{return t.matchMedia(e).matches}catch{return}}function cs(t){if(t?.matchMedia)return oe(t,"(prefers-color-scheme: dark)")?"dark":oe(t,"(prefers-color-scheme: light)")?"light":"no-preference"}function us(t){if(t?.matchMedia)return oe(t,"(prefers-contrast: more)")?"more":oe(t,"(prefers-contrast: less)")?"less":oe(t,"(prefers-contrast: custom)")?"custom":"no-preference"}function ds(t){if(t?.matchMedia){if(oe(t,"(display-mode: fullscreen)"))return "fullscreen";if(oe(t,"(display-mode: standalone)"))return "standalone";if(oe(t,"(display-mode: minimal-ui)"))return "minimal-ui";if(oe(t,"(display-mode: browser)"))return "browser"}}function ps(t){if(!t)return;let r=t.querySelector?.('meta[name="mushi:build"]')?.content?.trim();if(r)return r.slice(0,64)}function hs(t){let e=t?.performance;if(!e?.getEntriesByType)return;let r;try{r=e.getEntriesByType("navigation")[0];}catch{return}if(!r)return;let n=r.startTime??0,s={};return r.domContentLoadedEventEnd>0&&(s.domContentLoadedMs=Math.round(r.domContentLoadedEventEnd-n)),r.loadEventEnd>0&&(s.loadCompleteMs=Math.round(r.loadEventEnd-n)),r.responseStart>0&&(s.timeToFirstByteMs=Math.round(r.responseStart-n)),typeof r.type=="string"&&(s.navigationType=r.type),Object.keys(s).length===0?void 0:s}var Qt="mushi_reporter_token";function X(){if(typeof localStorage<"u"){let e=localStorage.getItem(Qt);if(e)return e}let t=ms();if(typeof localStorage<"u")try{localStorage.setItem(Qt,t);}catch{}return t}function ms(){if(typeof crypto<"u"&&crypto.randomUUID)return `mushi_${crypto.randomUUID()}`;let t=new Uint8Array(16);if(typeof crypto<"u")crypto.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);return `mushi_${Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}`}function ut(){let t=typeof crypto<"u"?crypto:void 0;if(t?.randomUUID)return t.randomUUID();let e=new Uint8Array(16);if(t?.getRandomValues)t.getRandomValues(e);else for(let n=0;n<e.length;n++)e[n]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return `${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20,32)}`}var er="mushi_fingerprint_hash";function gs(){let t=typeof navigator<"u"?navigator:void 0,e=typeof screen<"u"?screen:void 0,r=typeof window<"u"?window:void 0;return {userAgent:t?.userAgent??"unknown",platform:t?.platform??"unknown",language:t?.language??"en",timezone:Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone??"UTC",screenWidth:e?.width??0,screenHeight:e?.height??0,pixelRatio:r?.devicePixelRatio??1,deviceMemory:t?.deviceMemory,hardwareConcurrency:t?.hardwareConcurrency}}async function fs(t){if(typeof crypto<"u"&&crypto.subtle){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("")}let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return `fbk_${(e>>>0).toString(16).padStart(8,"0")}`}async function mr(){if(typeof localStorage<"u"){let n=localStorage.getItem(er);if(n)return n}let t=gs(),e=JSON.stringify(t),r=await fs(e);if(typeof localStorage<"u")try{localStorage.setItem(er,r);}catch{}return r}var tr="mushi_session_id",Fe=null;function Le(){if(Fe)return Fe;if(typeof sessionStorage<"u"){let e=sessionStorage.getItem(tr);if(e)return Fe=e,e}let t=bs();if(Fe=t,typeof sessionStorage<"u")try{sessionStorage.setItem(tr,t);}catch{}return t}function bs(){let t=Date.now().toString(36),e=Math.random().toString(36).slice(2,8);return `ms_${t}_${e}`}var ys=10,vs=1,ws=5e3;function gr(t={}){let{maxBurst:e=ys,refillRate:r=vs,refillIntervalMs:n=ws}=t,s=e,i=Date.now();function a(){let p=Date.now(),w=p-i,d=Math.floor(w/n);d>0&&(s=Math.min(e,s+d*r),i=p);}function o(){return a(),s>0?(s--,true):false}function l(){s=e,i=Date.now();}function g(){return a(),s}return {tryConsume:o,reset:l,availableTokens:g}}var xs=[{key:"ssns",regex:/\b\d{3}-\d{2}-\d{4}\b/g,replacement:"[REDACTED_SSN]"},{key:"creditCards",regex:/\b(?:\d[ -]*){12,18}\d\b/g,replacement:"[REDACTED_CC]"},{key:"secretTokens",regex:/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,replacement:"[REDACTED_AWS_KEY]"},{key:"secretTokens",regex:/(?:aws_secret_access_key|secret_access_key)["'\s:=]+[A-Za-z0-9/+=]{40}\b/gi,replacement:"aws_secret_access_key=[REDACTED_AWS_SECRET]"},{key:"secretTokens",regex:/\b(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{24,}\b/g,replacement:"[REDACTED_STRIPE_KEY]"},{key:"secretTokens",regex:/\bpk_(?:live|test)_[A-Za-z0-9]{24,}\b/g,replacement:"[REDACTED_STRIPE_PK]"},{key:"secretTokens",regex:/\bxox[abpor]-[A-Za-z0-9-]{10,}\b/g,replacement:"[REDACTED_SLACK_TOKEN]"},{key:"secretTokens",regex:/\bghp_[A-Za-z0-9]{36}\b/g,replacement:"[REDACTED_GITHUB_PAT]"},{key:"secretTokens",regex:/\bgithub_pat_[A-Za-z0-9_]{80,}\b/g,replacement:"[REDACTED_GITHUB_PAT]"},{key:"secretTokens",regex:/\bsk-(?:proj-)?[A-Za-z0-9_-]{20,}\b/g,replacement:"[REDACTED_OPENAI_KEY]"},{key:"secretTokens",regex:/\bsk-ant-[A-Za-z0-9_-]{20,}\b/g,replacement:"[REDACTED_ANTHROPIC_KEY]"},{key:"secretTokens",regex:/\bAIza[0-9A-Za-z_-]{35}\b/g,replacement:"[REDACTED_GOOGLE_KEY]"},{key:"secretTokens",regex:/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,replacement:"[REDACTED_JWT]"},{key:"emails",regex:/\b[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}\b/g,replacement:"[REDACTED_EMAIL]"},{key:"phones",regex:/(?:\+\d{1,3}[\s.-])?\(?\d{2,4}\)?[\s.-]\d{3,4}[\s.-]\d{3,4}\b/g,replacement:"[REDACTED_PHONE]"},{key:"ipAddresses",regex:/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,replacement:"[REDACTED_IP]"},{key:"ipv6",regex:/\b(?:[A-Fa-f0-9]{1,4}:){2,7}[A-Fa-f0-9]{0,4}\b/g,replacement:"[REDACTED_IPV6]"}],Ss={emails:true,phones:true,creditCards:true,ssns:true,ipAddresses:false,secretTokens:true,ipv6:false};function fr(t={}){let e={...Ss,...t},r=xs.filter(i=>e[i.key]);function n(i){if(!i)return i;let a=i;for(let{regex:o,replacement:l}of r)a=a.replace(new RegExp(o.source,o.flags),l);return a}function s(i,a){let o={...i};for(let l of a)typeof o[l]=="string"&&(o[l]=n(o[l]));return o}return {scrub:n,scrubObject:s}}var Es=50,ks=500;function br(t={}){let e=Math.max(1,t.max??Es),r=Math.max(50,t.maxMessageLength??ks),n=[];return {add(s){let i=typeof s.timestamp=="number"?s.timestamp:Date.now(),a=typeof s.message=="string"&&s.message.length>r?`${s.message.slice(0,r)}\u2026`:s.message,o={timestamp:i,category:s.category,level:s.level??"info",message:a??"",...s.data?{data:s.data}:{}};for(n.push(o);n.length>e;)n.shift();},getAll(){return n.slice()},clear(){n=[];},size(){return n.length}}}var rr=8*1024,Rs=1e3;function yr(t){if(t instanceof Error){let e=t.name||"Error",r=t.message||String(t),n=typeof t.stack=="string"&&t.stack.length>0?t.stack.slice(0,rr):void 0,s=t.cause;return {name:e,message:r,...n?{stack:n}:{},...s!==void 0?{cause:s instanceof Error?s.message:s}:{}}}if(typeof t=="string")return {name:"Error",message:t};if(t&&typeof t=="object"){let e=t,r=typeof e.name=="string"?e.name:"Error",n=typeof e.message=="string"?e.message:(()=>{try{return JSON.stringify(e).slice(0,Rs)}catch{return String(e)}})(),s=typeof e.stack=="string"?e.stack.slice(0,rr):void 0;return {name:r,message:n,...s?{stack:s}:{}}}return t===void 0?{name:"Error",message:"unknown"}:{name:"Error",message:String(t)}}function Cs(t){let e=t.length%4===0?"":"=".repeat(4-t.length%4),r=t.replace(/-/g,"+").replace(/_/g,"/")+e;if(typeof atob=="function")return atob(r);let n=globalThis.Buffer;return n?n.from(r,"base64").toString("binary"):""}function vr(t){if(typeof t!="string")return null;let e=t.split(".");if(e.length!==3)return null;try{let r=Cs(e[1]),n=JSON.parse(r),s=typeof n.projectId=="string"?n.projectId:void 0,i=typeof n.sub=="string"?n.sub:void 0;return !s||!i?null:{projectId:s,sub:i,...typeof n.email=="string"?{email:n.email}:{},...typeof n.name=="string"?{name:n.name}:{},...typeof n.iat=="number"?{iat:n.iat}:{},...typeof n.exp=="number"?{exp:n.exp}:{}}}catch{return null}}var Ts=new Set(["kensaur.us","www.kensaur.us"]),Ms={"glot-it":"glot.it",glotit:"glot.it","solo-boss-cloud":"sbc-front.vercel.app","mushi-mushi":"mushimushi.dev"},$s={"mushi-mushi":"https://kensaur.us/mushi-mushi/admin/favicon.svg","solo-boss-cloud":"https://sbc-front.vercel.app/favicon.svg","glot-it":"https://kensaur.us/glot-it/apple-touch-icon.png",glotit:"https://kensaur.us/glot-it/apple-touch-icon.png"},Ls=["www.google.com","icons.duckduckgo.com","icon.horse"];function wr(t){try{let e=new URL(t).hostname.toLowerCase();return Ls.some(r=>e===r||e.endsWith(`.${r}`))}catch{return false}}function Is(t,e=32){return [`https://${t}/favicon.svg`,`https://${t}/favicon.ico`,`https://${t}/favicon-32x32.png`,`https://${t}/apple-touch-icon.png`]}function xr(t){let e=[],r=s=>{let i=s?.trim().toLowerCase();!i||e.includes(i)||e.push(i);};r(_s(t.repo_url)),r(Ms[t.project_slug.toLowerCase()]);let n=t.sdk_origin?As(t.sdk_origin):null;return n&&!Ts.has(n)&&r(n),e}function Sr(t,e=32){if(t.icon_url?.trim())return [t.icon_url.trim()];let r=new Set,n=[],s=a=>{!a||r.has(a)||wr(a)||(r.add(a),n.push(a));},i=$s[t.project_slug.toLowerCase()];i&&s(i);for(let a of xr(t))for(let o of Is(a,e))s(o);return n}function As(t){let e=t.trim();if(!e||/^(capacitor|file|content|app):/i.test(e))return null;try{let n=new URL(e.includes("://")?e:`https://${e}`).hostname.toLowerCase();return n==="localhost"||n==="127.0.0.1"||n.endsWith(".local")?null:n}catch{return null}}function _s(t){if(!t?.trim())return null;try{let e=new URL(t.trim()),r=e.hostname.toLowerCase(),n=e.pathname.replace(/^\/+|\/+$/g,"").split("/").filter(Boolean);if(n.length<2)return null;let s=n[1].replace(/\.git$/i,"").toLowerCase();return /^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(s)||r==="github.com"&&s.endsWith(".github.io")?s:r!=="github.com"&&r!=="www.github.com"?r:null}catch{return null}}function Er(t){return xr(t)[0]??null}function kr(t){if(typeof document>"u"||!t.complete||t.naturalWidth===0||t.naturalHeight===0)return false;try{let e=document.createElement("canvas"),r=t.naturalWidth,n=t.naturalHeight;e.width=r,e.height=n;let s=e.getContext("2d");if(!s)return !1;s.drawImage(t,0,0);let{data:i}=s.getImageData(0,0,r,n),a=0,o=0,l=0;for(let p=0;p<i.length;p+=4){let w=i[p],d=i[p+1],m=i[p+2];if(i[p+3]<128)continue;a++;let f=Math.max(w,d,m),S=Math.min(w,d,m),$=f-S;l=Math.max(l,$),o+=$;}return a===0?!0:o/a<14&&l<24}catch{return wr(t.src)}}function Rr(t){let e=t.trim().split(/[\s._-]+/).filter(Boolean);return e.length>=2?`${e[0][0]??""}${e[1][0]??""}`.toUpperCase():(t.replace(/[^a-zA-Z0-9]/g,"").slice(0,2)||t.slice(0,2)||"?").toUpperCase()}function Cr(){if(typeof document>"u")return null;let t=['link[rel="icon"]','link[rel="shortcut icon"]','link[rel="apple-touch-icon"]'];for(let e of t){let n=document.querySelector(e)?.href;if(n&&Ps(n))return n}return null}function Ps(t){try{let e=typeof location<"u"?location.href:void 0,r=new URL(t,e).protocol;return r==="http:"||r==="https:"}catch{return false}}async function Mr(t,e=nr){if(!t.startsWith("data:image/")||Tr(t)<=e)return t;if(typeof document>"u")return null;let r=new Image;await new Promise((i,a)=>{r.onload=()=>i(),r.onerror=()=>a(new Error("screenshot_decode_failed")),r.src=t;});let n=[.65,.5,.35,.25],s=[1,.85,.7,.55,.4];for(let i of s){let a=document.createElement("canvas"),o=Math.max(1,Math.round(r.naturalWidth*i)),l=Math.max(1,Math.round(r.naturalHeight*i));a.width=o,a.height=l;let g=a.getContext("2d");if(g){g.drawImage(r,0,0,o,l);for(let p of n){let w=a.toDataURL("image/jpeg",p);if(Tr(w)<=e)return w}}}return null}function Tr(t){let e=t.indexOf(",");if(e<0)return t.length;let r=t.slice(e+1);return Math.ceil(r.length*3/4)}var je={widget:{trigger:"Report Issue",title:"Report an Issue",close:"Close",back:"Back",submit:"Submit",submitting:"Submitting\u2026",submitted:"Thank you! Your report has been submitted.",error:"Something went wrong. Please try again."},step1:{heading:"What kind of issue?",categories:{bug:"Bug",slow:"Slow / Laggy",visual:"Visual Glitch",confusing:"Confusing",other:"Other"},categoryDescriptions:{bug:"Something is broken or not working",slow:"Performance issue or slow loading",visual:"Layout, styling, or display problem",confusing:"Hard to understand or navigate",other:"Something else"}},step2:{heading:"What happened?",intents:{bug:["Crash","Unresponsive","Data loss","Wrong result","Other"],slow:["Page load","Interaction","API call","Animation","Other"],visual:["Layout broken","Overlapping","Missing element","Wrong color/font","Other"],confusing:["Unclear label","Missing help","Unexpected flow","Lost navigation","Other"],other:["Feature request","Accessibility","Typo","Other"]}},step3:{heading:"Tell us more",descriptionPlaceholder:"Describe what happened\u2026",screenshotButton:"Attach Screenshot",screenshotAttached:"Screenshot attached \u2713",screenshotCapturing:"Taking screenshot\u2026",screenshotFailed:"Couldn't capture \u2014 describe it instead",screenshotPreviewAlt:"Preview of the screenshot that will be sent",screenshotSensitiveHint:"Check the preview \u2014 remove it if any private info (balances, personal details) is visible.",elementButton:"Select Element",elementSelected:"Element selected \u2713",elementCapturing:"Click anything on the page\u2026",elementSelectorHint:"Click any element \xB7 Esc to cancel",optional:"(optional)",tooShort:"A bit more detail helps us fix it faster",examplePrompts:["The save button does nothing","Page froze for 10 seconds","Layout looks broken here"]}};var $r={widget:{trigger:"\u554F\u984C\u3092\u5831\u544A",title:"\u554F\u984C\u3092\u5831\u544A\u3059\u308B",close:"\u9589\u3058\u308B",back:"\u623B\u308B",submit:"\u9001\u4FE1",submitting:"\u9001\u4FE1\u4E2D\u2026",submitted:"\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01\u30EC\u30DD\u30FC\u30C8\u304C\u9001\u4FE1\u3055\u308C\u307E\u3057\u305F\u3002",error:"\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"},step1:{heading:"\u3069\u306E\u3088\u3046\u306A\u554F\u984C\u3067\u3059\u304B\uFF1F",categories:{bug:"\u30D0\u30B0",slow:"\u9045\u3044\u30FB\u91CD\u3044",visual:"\u8868\u793A\u306E\u554F\u984C",confusing:"\u308F\u304B\u308A\u306B\u304F\u3044",other:"\u305D\u306E\u4ED6"},categoryDescriptions:{bug:"\u52D5\u4F5C\u3057\u306A\u3044\u3001\u58CA\u308C\u3066\u3044\u308B",slow:"\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u304C\u60AA\u3044\u3001\u8AAD\u307F\u8FBC\u307F\u304C\u9045\u3044",visual:"\u30EC\u30A4\u30A2\u30A6\u30C8\u3001\u30C7\u30B6\u30A4\u30F3\u3001\u8868\u793A\u306E\u554F\u984C",confusing:"\u7406\u89E3\u3057\u306B\u304F\u3044\u3001\u64CD\u4F5C\u304C\u308F\u304B\u308A\u306B\u304F\u3044",other:"\u305D\u306E\u4ED6\u306E\u554F\u984C"}},step2:{heading:"\u4F55\u304C\u8D77\u304D\u307E\u3057\u305F\u304B\uFF1F",intents:{bug:["\u30AF\u30E9\u30C3\u30B7\u30E5","\u7121\u53CD\u5FDC","\u30C7\u30FC\u30BF\u6D88\u5931","\u8AA4\u3063\u305F\u7D50\u679C","\u305D\u306E\u4ED6"],slow:["\u30DA\u30FC\u30B8\u8AAD\u8FBC","\u64CD\u4F5C\u53CD\u5FDC","API\u901A\u4FE1","\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3","\u305D\u306E\u4ED6"],visual:["\u30EC\u30A4\u30A2\u30A6\u30C8\u5D29\u308C","\u8981\u7D20\u306E\u91CD\u306A\u308A","\u8981\u7D20\u304C\u8868\u793A\u3055\u308C\u306A\u3044","\u8272/\u30D5\u30A9\u30F3\u30C8\u304C\u9055\u3046","\u305D\u306E\u4ED6"],confusing:["\u30E9\u30D9\u30EB\u304C\u4E0D\u660E\u77AD","\u30D8\u30EB\u30D7\u304C\u306A\u3044","\u4E88\u60F3\u5916\u306E\u30D5\u30ED\u30FC","\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u8FF7\u5B50","\u305D\u306E\u4ED6"],other:["\u6A5F\u80FD\u8981\u671B","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3","\u8AA4\u5B57\u8131\u5B57","\u305D\u306E\u4ED6"]}},step3:{heading:"\u8A73\u7D30\u3092\u6559\u3048\u3066\u304F\u3060\u3055\u3044",descriptionPlaceholder:"\u4F55\u304C\u8D77\u304D\u305F\u304B\u8AAC\u660E\u3057\u3066\u304F\u3060\u3055\u3044\u2026",screenshotButton:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6DFB\u4ED8",screenshotAttached:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6DFB\u4ED8\u6E08\u307F \u2713",screenshotCapturing:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u64AE\u5F71\u4E2D\u2026",screenshotFailed:"\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F \u2014 \u6587\u5B57\u3067\u6559\u3048\u3066\u304F\u3060\u3055\u3044",screenshotPreviewAlt:"\u9001\u4FE1\u3055\u308C\u308B\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306E\u30D7\u30EC\u30D3\u30E5\u30FC",screenshotSensitiveHint:"\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u78BA\u8A8D\u3057\u3001\u6B8B\u9AD8\u3084\u500B\u4EBA\u60C5\u5831\u306A\u3069\u304C\u5199\u3063\u3066\u3044\u308C\u3070\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\u3002",elementButton:"\u8981\u7D20\u3092\u9078\u629E",elementSelected:"\u8981\u7D20\u9078\u629E\u6E08\u307F \u2713",elementCapturing:"\u30DA\u30FC\u30B8\u4E0A\u306E\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF\u2026",elementSelectorHint:"\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF \xB7 Esc \u3067\u30AD\u30E3\u30F3\u30BB\u30EB",optional:"\uFF08\u4EFB\u610F\uFF09",tooShort:"\u3082\u3046\u5C11\u3057\u8A73\u3057\u304F\u6559\u3048\u3066\u304F\u3060\u3055\u3044",examplePrompts:["\u4FDD\u5B58\u30DC\u30BF\u30F3\u304C\u53CD\u5FDC\u3057\u306A\u3044","\u30DA\u30FC\u30B8\u304C10\u79D2\u56FA\u307E\u3063\u305F","\u30EC\u30A4\u30A2\u30A6\u30C8\u304C\u5D29\u308C\u3066\u3044\u308B"]}};var Lr={widget:{trigger:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",close:"\u0E1B\u0E34\u0E14",back:"\u0E01\u0E25\u0E31\u0E1A",submit:"\u0E2A\u0E48\u0E07",submitting:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u2026",submitted:"\u0E02\u0E2D\u0E1A\u0E04\u0E38\u0E13\u0E04\u0E23\u0E31\u0E1A/\u0E04\u0E48\u0E30! \u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E16\u0E39\u0E01\u0E2A\u0E48\u0E07\u0E41\u0E25\u0E49\u0E27",error:"\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"},step1:{heading:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E2B\u0E19?",categories:{bug:"\u0E1A\u0E31\u0E01",slow:"\u0E0A\u0E49\u0E32 / \u0E41\u0E25\u0E04",visual:"\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25\u0E1C\u0E34\u0E14\u0E1B\u0E01\u0E15\u0E34",confusing:"\u0E2A\u0E31\u0E1A\u0E2A\u0E19",other:"\u0E2D\u0E37\u0E48\u0E19\u0E46"},categoryDescriptions:{bug:"\u0E21\u0E35\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E2A\u0E35\u0E22\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E33\u0E07\u0E32\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",slow:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E20\u0E32\u0E1E\u0E2B\u0E23\u0E37\u0E2D\u0E42\u0E2B\u0E25\u0E14\u0E0A\u0E49\u0E32",visual:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C \u0E2A\u0E44\u0E15\u0E25\u0E4C \u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E32\u0E23\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25",confusing:"\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E22\u0E32\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E33\u0E17\u0E32\u0E07\u0E22\u0E32\u0E01",other:"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19"}},step2:{heading:"\u0E40\u0E01\u0E34\u0E14\u0E2D\u0E30\u0E44\u0E23\u0E02\u0E36\u0E49\u0E19?",intents:{bug:["\u0E41\u0E04\u0E23\u0E0A","\u0E44\u0E21\u0E48\u0E15\u0E2D\u0E1A\u0E2A\u0E19\u0E2D\u0E07","\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2B\u0E32\u0E22","\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"],slow:["\u0E42\u0E2B\u0E25\u0E14\u0E2B\u0E19\u0E49\u0E32","\u0E01\u0E32\u0E23\u0E42\u0E15\u0E49\u0E15\u0E2D\u0E1A","API","\u0E41\u0E2D\u0E19\u0E34\u0E40\u0E21\u0E0A\u0E31\u0E19","\u0E2D\u0E37\u0E48\u0E19\u0E46"],visual:["\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E40\u0E2A\u0E35\u0E22","\u0E0B\u0E49\u0E2D\u0E19\u0E17\u0E31\u0E1A","\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E2B\u0E32\u0E22","\u0E2A\u0E35/\u0E1F\u0E2D\u0E19\u0E15\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"],confusing:["\u0E1B\u0E49\u0E32\u0E22\u0E44\u0E21\u0E48\u0E0A\u0E31\u0E14","\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E41\u0E19\u0E30\u0E19\u0E33","\u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E44\u0E21\u0E48\u0E04\u0E32\u0E14\u0E04\u0E34\u0E14","\u0E2B\u0E25\u0E07\u0E17\u0E32\u0E07","\u0E2D\u0E37\u0E48\u0E19\u0E46"],other:["\u0E02\u0E2D\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C","\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07","\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"]}},step3:{heading:"\u0E1A\u0E2D\u0E01\u0E40\u0E23\u0E32\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",descriptionPlaceholder:"\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19\u2026",screenshotButton:"\u0E41\u0E19\u0E1A\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15",screenshotAttached:"\u0E41\u0E19\u0E1A\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u0E41\u0E25\u0E49\u0E27 \u2713",screenshotCapturing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E16\u0E48\u0E32\u0E22\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u2026",screenshotFailed:"\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E16\u0E48\u0E32\u0E22\u0E20\u0E32\u0E1E\u0E44\u0E14\u0E49 \u2014 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E41\u0E17\u0E19",screenshotPreviewAlt:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u0E17\u0E35\u0E48\u0E08\u0E30\u0E16\u0E39\u0E01\u0E2A\u0E48\u0E07",screenshotSensitiveHint:"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E20\u0E32\u0E1E \u2014 \u0E2B\u0E32\u0E01\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E31\u0E27 (\u0E22\u0E2D\u0E14\u0E40\u0E07\u0E34\u0E19 \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E1A\u0E38\u0E04\u0E04\u0E25) \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E1A\u0E2D\u0E2D\u0E01",elementButton:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A",elementSelected:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E41\u0E25\u0E49\u0E27 \u2713",elementCapturing:"\u0E04\u0E25\u0E34\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E1A\u0E19\u0E2B\u0E19\u0E49\u0E32\u2026",elementSelectorHint:"\u0E04\u0E25\u0E34\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E43\u0E14\u0E01\u0E47\u0E44\u0E14\u0E49 \xB7 Esc \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",optional:"(\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)",tooShort:"\u0E01\u0E23\u0E38\u0E13\u0E32\u0E43\u0E2B\u0E49\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",examplePrompts:["\u0E1B\u0E38\u0E48\u0E21\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19","\u0E2B\u0E19\u0E49\u0E32\u0E04\u0E49\u0E32\u0E07\u0E19\u0E32\u0E19 10 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35","\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E1E\u0E31\u0E07"]}};var Ir={widget:{trigger:"Reportar problema",title:"Reportar un problema",close:"Cerrar",back:"Volver",submit:"Enviar",submitting:"Enviando\u2026",submitted:"\xA1Gracias! Tu reporte ha sido enviado.",error:"Algo sali\xF3 mal. Por favor, int\xE9ntalo de nuevo."},step1:{heading:"\xBFQu\xE9 tipo de problema?",categories:{bug:"Error",slow:"Lento",visual:"Problema visual",confusing:"Confuso",other:"Otro"},categoryDescriptions:{bug:"Algo est\xE1 roto o no funciona",slow:"Problema de rendimiento o carga lenta",visual:"Problema de dise\xF1o, estilo o visualizaci\xF3n",confusing:"Dif\xEDcil de entender o navegar",other:"Otro problema"}},step2:{heading:"\xBFQu\xE9 pas\xF3?",intents:{bug:["Crash","Sin respuesta","P\xE9rdida de datos","Resultado incorrecto","Otro"],slow:["Carga de p\xE1gina","Interacci\xF3n","Llamada API","Animaci\xF3n","Otro"],visual:["Layout roto","Superposici\xF3n","Elemento faltante","Color/fuente incorrecta","Otro"],confusing:["Etiqueta confusa","Sin ayuda","Flujo inesperado","Navegaci\xF3n perdida","Otro"],other:["Solicitud de funci\xF3n","Accesibilidad","Error tipogr\xE1fico","Otro"]}},step3:{heading:"Cu\xE9ntanos m\xE1s",descriptionPlaceholder:"Describe lo que pas\xF3\u2026",screenshotButton:"Adjuntar captura",screenshotAttached:"Captura adjunta \u2713",screenshotCapturing:"Tomando captura\u2026",screenshotFailed:"No se pudo capturar \u2014 descr\xEDbelo en su lugar",screenshotPreviewAlt:"Vista previa de la captura que se enviar\xE1",screenshotSensitiveHint:"Revisa la vista previa \u2014 qu\xEDtala si se ve informaci\xF3n privada (saldos, datos personales).",elementButton:"Seleccionar elemento",elementSelected:"Elemento seleccionado \u2713",elementCapturing:"Haz clic en cualquier elemento\u2026",elementSelectorHint:"Clic en cualquier elemento \xB7 Esc para cancelar",optional:"(opcional)",tooShort:"Un poco m\xE1s de detalle nos ayuda a resolverlo",examplePrompts:["El bot\xF3n guardar no responde","La p\xE1gina se congel\xF3 10 segundos","El dise\xF1o se ve roto aqu\xED"]}};var Ds={en:je,ja:$r,th:Lr,es:Ir};function dt(t){let e=t&&t!=="auto"?t:typeof navigator<"u"?navigator.language??navigator.languages?.[0]:void 0;if(!e)return je;let r=e.split("-")[0].toLowerCase();return Ds[r]??je}function Ar(t,e="",r=""){let n=t==="dark",s=k=>/^#[0-9a-fA-F]{3,8}$/.test(k)?k:"",i=s(e),a=s(r),o=n?"#0F0E0C":"#F8F4ED",l=n?"#F2EBDD":"#0E0D0B",g=n?"#928B7E":"#5C5852",p=n?"#5A5650":"#9A9489",w=n?"#7A7268":"#6E6760",d=n?"rgba(242,235,221,0.10)":"rgba(14,13,11,0.10)",m=n?"rgba(242,235,221,0.18)":"rgba(14,13,11,0.16)",c=i||(n?"#FF5A47":"#E03C2C"),f=n?`${c}1F`:`${c}14`,S=a||(n?"#FFE5E0":"#7A1F15"),$="'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'Cambria', Georgia, 'Times New Roman', serif",R="system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', sans-serif",E="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace",y="cubic-bezier(0.22, 1, 0.36, 1)";return `
1
+ (function(){'use strict';var no=Object.defineProperty;var st=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var Yr=(t,e)=>{for(var r in e)no(t,r,{get:e[r],enumerable:true});};function so(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in t&&t.BYTES_PER_ELEMENT===1}function Xr(t,e=""){if(typeof t!="number"){let r=e&&`"${e}" `;throw new TypeError(`${r}expected number, got ${typeof t}`)}if(!Number.isSafeInteger(t)||t<0){let r=e&&`"${e}" `;throw new RangeError(`${r}expected integer >= 0, got ${t}`)}}function ot(t,e,r=""){let n=so(t),s=t?.length,o=e!==void 0;if(!n||o){let l=r&&`"${r}" `,i="",a=n?`length=${s}`:`type=${typeof t}`,m=l+"expected Uint8Array"+i+", got "+a;throw n?new RangeError(m):new TypeError(m)}return t}function Jr(t){if(typeof t!="function"||typeof t.create!="function")throw new TypeError("Hash must wrapped by utils.createHasher");if(Xr(t.outputLen),Xr(t.blockLen),t.outputLen<1)throw new Error('"outputLen" must be >= 1');if(t.blockLen<1)throw new Error('"blockLen" must be >= 1')}function Ke(t,e=true){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function ft(t,e){ot(t,void 0,"digestInto() output");let r=e.outputLen;if(t.length<r)throw new RangeError('"digestInto() output" expected to be of length >='+r)}function Ie(...t){for(let e=0;e<t.length;e++)t[e].fill(0);}function bt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function xe(t,e){return t<<32-e|t>>>e}function qe(t,e={}){let r=(s,o)=>t(o).update(s).digest(),n=t(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.canXOF=n.canXOF,r.create=s=>t(s),Object.assign(r,e),Object.freeze(r)}var je,yt=st(()=>{"use strict";je=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});});function Zr(t,e,r){return t&e^~t&r}function Qr(t,e,r){return t&e^t&r^e&r}var it,Ae,_e,Q,ee,en=st(()=>{"use strict";yt();it=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,r,n,s){this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.buffer=new Uint8Array(e),this.view=bt(this.buffer);}update(e){Ke(this),ot(e);let{view:r,buffer:n,blockLen:s}=this,o=e.length;for(let l=0;l<o;){let i=Math.min(s-this.pos,o-l);if(i===s){let a=bt(e);for(;s<=o-l;l+=s)this.process(a,l);continue}n.set(e.subarray(l,l+i),this.pos),this.pos+=i,l+=i,this.pos===s&&(this.process(r,0),this.pos=0);}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ke(this),ft(e,this),this.finished=!0;let{buffer:r,view:n,blockLen:s,isLE:o}=this,{pos:l}=this;r[l++]=128,Ie(this.buffer.subarray(l)),this.padOffset>s-l&&(this.process(n,0),l=0);for(let g=l;g<s;g++)r[g]=0;n.setBigUint64(s-8,BigInt(this.length*8),o),this.process(n,0);let i=bt(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let m=a/4,p=this.get();if(m>p.length)throw new Error("_sha2: outputLen bigger than state");for(let g=0;g<m;g++)i.setUint32(4*g,p[g],o);}digest(){let{buffer:e,outputLen:r}=this;this.digestInto(e);let n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:r,buffer:n,length:s,finished:o,destroyed:l,pos:i}=this;return e.destroyed=l,e.finished=o,e.length=s,e.pos=i,s%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}},Ae=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_e=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),Q=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),ee=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function oo(t,e=false){return e?{h:Number(t&vt),l:Number(t>>tn&vt)}:{h:Number(t>>tn&vt)|0,l:Number(t&vt)|0}}function rn(t,e=false){let r=t.length,n=new Uint32Array(r),s=new Uint32Array(r);for(let o=0;o<r;o++){let{h:l,l:i}=oo(t[o],e);[n[o],s[o]]=[l,i];}return [n,s]}function ke(t,e,r,n){let s=(e>>>0)+(n>>>0);return {h:t+r+(s/2**32|0)|0,l:s|0}}var vt,tn,Qt,er,ze,We,at,lt,nn,sn,on,an,ln,cn,un=st(()=>{"use strict";vt=BigInt(4294967295),tn=BigInt(32);Qt=(t,e,r)=>t>>>r,er=(t,e,r)=>t<<32-r|e>>>r,ze=(t,e,r)=>t>>>r|e<<32-r,We=(t,e,r)=>t<<32-r|e>>>r,at=(t,e,r)=>t<<64-r|e>>>r-32,lt=(t,e,r)=>t>>>r-32|e<<64-r;nn=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),sn=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,on=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),an=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,ln=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),cn=(t,e,r,n,s,o)=>e+r+n+s+o+(t/2**32|0)|0;});var tr={};Yr(tr,{_SHA224:()=>St,_SHA256:()=>wt,_SHA384:()=>kt,_SHA512:()=>Et,_SHA512_224:()=>Rt,_SHA512_256:()=>Ct,sha224:()=>po,sha256:()=>uo,sha384:()=>mo,sha512:()=>ho,sha512_224:()=>fo,sha512_256:()=>go});var ao,Oe,xt,wt,St,dn,lo,co,Be,Ne,Ye,Et,kt,re,ne,Rt,Ct,uo,po,ho,mo,go,fo,rr=st(()=>{"use strict";en();un();yt();ao=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Oe=new Uint32Array(64),xt=class extends it{constructor(e){super(64,e,8,!1);}get(){let{A:e,B:r,C:n,D:s,E:o,F:l,G:i,H:a}=this;return [e,r,n,s,o,l,i,a]}set(e,r,n,s,o,l,i,a){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=o|0,this.F=l|0,this.G=i|0,this.H=a|0;}process(e,r){for(let g=0;g<16;g++,r+=4)Oe[g]=e.getUint32(r,!1);for(let g=16;g<64;g++){let u=Oe[g-15],c=Oe[g-2],h=xe(u,7)^xe(u,18)^u>>>3,y=xe(c,17)^xe(c,19)^c>>>10;Oe[g]=y+Oe[g-7]+h+Oe[g-16]|0;}let{A:n,B:s,C:o,D:l,E:i,F:a,G:m,H:p}=this;for(let g=0;g<64;g++){let u=xe(i,6)^xe(i,11)^xe(i,25),c=p+u+Zr(i,a,m)+ao[g]+Oe[g]|0,y=(xe(n,2)^xe(n,13)^xe(n,22))+Qr(n,s,o)|0;p=m,m=a,a=i,i=l+c|0,l=o,o=s,s=n,n=c+y|0;}n=n+this.A|0,s=s+this.B|0,o=o+this.C|0,l=l+this.D|0,i=i+this.E|0,a=a+this.F|0,m=m+this.G|0,p=p+this.H|0,this.set(n,s,o,l,i,a,m,p);}roundClean(){Ie(Oe);}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Ie(this.buffer);}},wt=class extends xt{A=Ae[0]|0;B=Ae[1]|0;C=Ae[2]|0;D=Ae[3]|0;E=Ae[4]|0;F=Ae[5]|0;G=Ae[6]|0;H=Ae[7]|0;constructor(){super(32);}},St=class extends xt{A=_e[0]|0;B=_e[1]|0;C=_e[2]|0;D=_e[3]|0;E=_e[4]|0;F=_e[5]|0;G=_e[6]|0;H=_e[7]|0;constructor(){super(28);}},dn=rn(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),lo=dn[0],co=dn[1],Be=new Uint32Array(80),Ne=new Uint32Array(80),Ye=class extends it{constructor(e){super(128,e,16,!1);}get(){let{Ah:e,Al:r,Bh:n,Bl:s,Ch:o,Cl:l,Dh:i,Dl:a,Eh:m,El:p,Fh:g,Fl:u,Gh:c,Gl:h,Hh:y,Hl:v}=this;return [e,r,n,s,o,l,i,a,m,p,g,u,c,h,y,v]}set(e,r,n,s,o,l,i,a,m,p,g,u,c,h,y,v){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=o|0,this.Cl=l|0,this.Dh=i|0,this.Dl=a|0,this.Eh=m|0,this.El=p|0,this.Fh=g|0,this.Fl=u|0,this.Gh=c|0,this.Gl=h|0,this.Hh=y|0,this.Hl=v|0;}process(e,r){for(let k=0;k<16;k++,r+=4)Be[k]=e.getUint32(r),Ne[k]=e.getUint32(r+=4);for(let k=16;k<80;k++){let M=Be[k-15]|0,S=Ne[k-15]|0,E=ze(M,S,1)^ze(M,S,8)^Qt(M,S,7),O=We(M,S,1)^We(M,S,8)^er(M,S,7),w=Be[k-2]|0,B=Ne[k-2]|0,H=ze(w,B,19)^at(w,B,61)^Qt(w,B,6),F=We(w,B,19)^lt(w,B,61)^er(w,B,6),te=on(O,F,Ne[k-7],Ne[k-16]),Z=an(te,E,H,Be[k-7],Be[k-16]);Be[k]=Z|0,Ne[k]=te|0;}let{Ah:n,Al:s,Bh:o,Bl:l,Ch:i,Cl:a,Dh:m,Dl:p,Eh:g,El:u,Fh:c,Fl:h,Gh:y,Gl:v,Hh:I,Hl:R}=this;for(let k=0;k<80;k++){let M=ze(g,u,14)^ze(g,u,18)^at(g,u,41),S=We(g,u,14)^We(g,u,18)^lt(g,u,41),E=g&c^~g&y,O=u&h^~u&v,w=ln(R,S,O,co[k],Ne[k]),B=cn(w,I,M,E,lo[k],Be[k]),H=w|0,F=ze(n,s,28)^at(n,s,34)^at(n,s,39),te=We(n,s,28)^lt(n,s,34)^lt(n,s,39),Z=n&o^n&i^o&i,J=s&l^s&a^l&a;I=y|0,R=v|0,y=c|0,v=h|0,c=g|0,h=u|0,{h:g,l:u}=ke(m|0,p|0,B|0,H|0),m=i|0,p=a|0,i=o|0,a=l|0,o=n|0,l=s|0;let q=nn(H,te,J);n=sn(q,B,F,Z),s=q|0;}(({h:n,l:s}=ke(this.Ah|0,this.Al|0,n|0,s|0))),{h:o,l}=ke(this.Bh|0,this.Bl|0,o|0,l|0),{h:i,l:a}=ke(this.Ch|0,this.Cl|0,i|0,a|0),{h:m,l:p}=ke(this.Dh|0,this.Dl|0,m|0,p|0),{h:g,l:u}=ke(this.Eh|0,this.El|0,g|0,u|0),{h:c,l:h}=ke(this.Fh|0,this.Fl|0,c|0,h|0),{h:y,l:v}=ke(this.Gh|0,this.Gl|0,y|0,v|0),{h:I,l:R}=ke(this.Hh|0,this.Hl|0,I|0,R|0),this.set(n,s,o,l,i,a,m,p,g,u,c,h,y,v,I,R);}roundClean(){Ie(Be,Ne);}destroy(){this.destroyed=!0,Ie(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},Et=class extends Ye{Ah=ee[0]|0;Al=ee[1]|0;Bh=ee[2]|0;Bl=ee[3]|0;Ch=ee[4]|0;Cl=ee[5]|0;Dh=ee[6]|0;Dl=ee[7]|0;Eh=ee[8]|0;El=ee[9]|0;Fh=ee[10]|0;Fl=ee[11]|0;Gh=ee[12]|0;Gl=ee[13]|0;Hh=ee[14]|0;Hl=ee[15]|0;constructor(){super(64);}},kt=class extends Ye{Ah=Q[0]|0;Al=Q[1]|0;Bh=Q[2]|0;Bl=Q[3]|0;Ch=Q[4]|0;Cl=Q[5]|0;Dh=Q[6]|0;Dl=Q[7]|0;Eh=Q[8]|0;El=Q[9]|0;Fh=Q[10]|0;Fl=Q[11]|0;Gh=Q[12]|0;Gl=Q[13]|0;Hh=Q[14]|0;Hl=Q[15]|0;constructor(){super(48);}},re=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),ne=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]),Rt=class extends Ye{Ah=re[0]|0;Al=re[1]|0;Bh=re[2]|0;Bl=re[3]|0;Ch=re[4]|0;Cl=re[5]|0;Dh=re[6]|0;Dl=re[7]|0;Eh=re[8]|0;El=re[9]|0;Fh=re[10]|0;Fl=re[11]|0;Gh=re[12]|0;Gl=re[13]|0;Hh=re[14]|0;Hl=re[15]|0;constructor(){super(28);}},Ct=class extends Ye{Ah=ne[0]|0;Al=ne[1]|0;Bh=ne[2]|0;Bl=ne[3]|0;Ch=ne[4]|0;Cl=ne[5]|0;Dh=ne[6]|0;Dl=ne[7]|0;Eh=ne[8]|0;El=ne[9]|0;Fh=ne[10]|0;Fl=ne[11]|0;Gh=ne[12]|0;Gl=ne[13]|0;Hh=ne[14]|0;Hl=ne[15]|0;constructor(){super(32);}},uo=qe(()=>new wt,je(1)),po=qe(()=>new St,je(4)),ho=qe(()=>new Et,je(3)),mo=qe(()=>new kt,je(2)),go=qe(()=>new Ct,je(6)),fo=qe(()=>new Rt,je(5));});var pn={};Yr(pn,{_HMAC:()=>ct,hmac:()=>bo});var ct,bo,hn=st(()=>{"use strict";yt();ct=class{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,r){if(Jr(e),ot(r,void 0,"key"),this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,s=new Uint8Array(n);s.set(r.length>n?e.create().update(r).digest():r);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),Ie(s);}update(e){return Ke(this),this.iHash.update(e),this}digestInto(e){Ke(this),ft(e,this),this.finished=!0;let r=e.subarray(0,this.outputLen);this.iHash.digestInto(r),this.oHash.update(r),this.oHash.digestInto(r),this.destroy();}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:r,iHash:n,finished:s,destroyed:o,blockLen:l,outputLen:i}=this;return e=e,e.finished=s,e.destroyed=o,e.blockLen=l,e.outputLen=i,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy();}},bo=(()=>{let t=((e,r,n)=>new ct(e,r).update(n).digest());return t.create=(e,r)=>new ct(e,r),t})();});var yo=4194304,Mn=1.5*1024*1024;function vo(t){try{return JSON.stringify(t)}catch{return null}}function xo(t,e=yo){let r=vo(t);if(r===null)return {ok:false,bytes:0,maxBytes:e,serializeFailed:true,reason:"Report could not be serialized (circular reference in metadata?)"};let n=new TextEncoder().encode(r).length;return n<=e?{ok:true,bytes:n,maxBytes:e}:{ok:false,bytes:n,maxBytes:e,reason:`Report payload ${mn(n)} exceeds limit ${mn(e)}`}}function mn(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(2)} MB`}function $n(){try{let e=globalThis.crypto;if(e?.subtle)return e.subtle}catch{}return null}function Lt(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}async function ar(t){let e=$n();if(e){let n=await e.digest("SHA-256",new TextEncoder().encode(t));return Lt(new Uint8Array(n))}let{sha256:r}=await Promise.resolve().then(()=>(rr(),tr));return Lt(r(new TextEncoder().encode(t)))}async function wo(t,e){let r=$n();if(r){let l=await r.importKey("raw",new TextEncoder().encode(t),{name:"HMAC",hash:"SHA-256"},false,["sign"]),i=await r.sign("HMAC",l,new TextEncoder().encode(e));return Lt(new Uint8Array(i))}let{hmac:n}=await Promise.resolve().then(()=>(hn(),pn)),{sha256:s}=await Promise.resolve().then(()=>(rr(),tr)),o=n(s,new TextEncoder().encode(t),new TextEncoder().encode(e));return Lt(o)}var gn=false,So="X-Mushi-User-Token",Eo="X-Mushi-Project",Ln="X-Mushi-SDK-Package",In="X-Mushi-SDK-Version";function ko(t){let e={"Content-Type":"application/json","X-Mushi-Api-Key":t.apiKey,[Eo]:t.projectId};return t.sdkPackage&&(e[Ln]=t.sdkPackage),t.sdkVersion&&(e[In]=t.sdkVersion),t.userToken&&(e[So]=t.userToken),t.internalKind&&(e[ut]=t.internalKind),e}var It="https://dxptnwrhwsqckaftyymj.supabase.co/functions/v1/api",ut="X-Mushi-Internal",Xe="__mushiInternal",Ro=1e4,Co=2;function An(t){let{projectId:e,apiKey:r,apiEndpoint:n=It,timeout:s=Ro,maxRetries:o=Co,getUserToken:l,sdkPackage:i,sdkVersion:a}=t,m=n.replace(/\/$/,"");async function p(u,c,h,y=o,v,I){let R=`${m}${c}`,k=new AbortController,M=setTimeout(()=>k.abort(),s),S=l?.()??null;try{let E=await fetch(R,{method:u,headers:{...ko({apiKey:r,projectId:e,sdkPackage:i,sdkVersion:a,userToken:S,internalKind:v}),...I},body:h?JSON.stringify(h):void 0,signal:k.signal,...v?{[Xe]:v}:{}});if(clearTimeout(M),E.status===307||E.status===308){let B=E.headers.get("Location");if(B&&y>0){let H=B.replace(/\/v1\/.*$/,"").replace(/\/$/,"");if(H!==m)return m=H,p(u,c,h,y-1,v,I)}}if(!E.ok){let B=await E.json().catch(()=>({}));if((E.status===401||E.status===403)&&!gn){gn=!0;let H=m===It?"Get the correct values at: https://kensaur.us/mushi-mushi/admin/projects":"Get the correct values from your Mushi console's Projects page.";console.error(`[Mushi] Credentials rejected (HTTP ${E.status}). Check your Project ID and API key scope (must be "report:write"). `+H);}return E.status>=500&&y>0?(await fn(bn(o-y)),p(u,c,h,y-1,v,I)):{ok:!1,error:{code:B.error?.code||`HTTP_${E.status}`,message:B.error?.message||B.message||`HTTP ${E.status} error`}}}let O=await E.json();return {ok:!0,data:O&&typeof O=="object"&&"ok"in O&&"data"in O?O.data:O}}catch(E){return clearTimeout(M),y>0&&To(E)?(await fn(bn(o-y)),p(u,c,h,y-1,v)):{ok:false,error:{code:"NETWORK_ERROR",message:E instanceof Error?E.message:"Unknown network error"}}}}async function g(u,c,h,y){let v=await ar(h),I=String(Date.now()),R=await wo(r,`${e}.${I}.${v}`),k=`${m}${c}`,M=await fetch(k,{method:u,headers:{"Content-Type":"application/json","X-Mushi-Api-Key":r,"X-Mushi-Project":e,...i?{[Ln]:i}:{},...a?{[In]:a}:{},[ut]:"reporter-poll","X-Reporter-Token-Hash":v,"X-Reporter-Ts":I,"X-Reporter-Hmac":R},body:y?JSON.stringify(y):void 0,[Xe]:"reporter-poll"});if(!M.ok){let E=await M.json().catch(()=>({}));return {ok:false,error:{code:`HTTP_${M.status}`,message:E.error?.message??E.message??`HTTP ${M.status} error`}}}let S=await M.json();return {ok:true,data:S.data??S}}return {async submitReport(u){let c=xo(u);return c.ok?p("POST","/v1/reports",u,o,"report-submit"):{ok:false,error:{code:c.serializeFailed?"SERIALIZE_FAILED":"PAYLOAD_TOO_LARGE",message:c.reason??"Report payload exceeds size limit"}}},async getReportStatus(u){return p("GET",`/v1/reports/${u}/status`,void 0,o,"report-status")},async getSdkConfig(){return p("GET","/v1/sdk/config",void 0,o,"sdk-config")},async askAssistant(u){return p("POST","/v1/sdk/assistant",{message:u.message,threadId:u.threadId??null,context:u.context??null},1,"community")},async getLatestSdkVersion(u){let c=new URLSearchParams({package:u}).toString();return p("GET",`/v1/sdk/latest-version?${c}`,void 0,o,"sdk-config")},async postDiscoveryEvent(u){return p("POST","/v1/sdk/discovery",u,1,"discovery")},async listReporterReports(u){return g("GET","/v1/reporter/reports",u)},async listReporterComments(u,c){return g("GET",`/v1/reporter/reports/${u}/comments`,c)},async replyToReporterReport(u,c,h,y){return g("POST",`/v1/reporter/reports/${u}/reply`,c,{body:h,...y?{feedback_signal:y}:{}})},async reopenReporterReport(u,c,h){return g("POST",`/v1/reporter/reports/${u}/reopen`,c,{note:h??""})},async listNotifications(u,c){let h=new URLSearchParams;c?.since&&h.set("since",c.since),c?.limit&&h.set("limit",String(c.limit));let y=h.size?`?${h.toString()}`:"";return g("GET",`/v1/notifications${y}`,u)},async markNotificationRead(u,c){return g("POST",`/v1/notifications/${u}/read`,c,{})},async listReporterFeatureBoard(u){return g("GET","/v1/reporter/feature-board",u)},async voteReporterFeatureBoard(u,c){return g("POST",`/v1/reporter/feature-board/${u}/vote`,c,{})},async submitActivity(u,c,h){return p("POST","/v1/sdk/activity",{user_id:u,user_traits:h?.userTraits,opted_in:h?.optedIn,reporter_token_hash:h?.reporterTokenHash,...h?.hostJwt?{host_jwt:h.hostJwt}:{},events:c},1,"discovery")},async getMyPoints(u){return p("GET",`/v1/sdk/me/points?userId=${encodeURIComponent(u)}`,void 0,1,"reporter-poll")},async getMyTier(u){return p("GET",`/v1/sdk/me/tier?userId=${encodeURIComponent(u)}`,void 0,1,"reporter-poll")},async getMyHistory(u,c){let h=new URLSearchParams({userId:u,...c?.limit?{limit:String(c.limit)}:{}});return p("GET",`/v1/sdk/me/history?${h}`,void 0,1,"reporter-poll")},async getHallOfFame(u=10){return p("GET",`/v1/sdk/hall-of-fame?limit=${u}`,void 0,1,"reporter-poll")},async sendMagicLink(u){return p("POST","/v1/tester/magic-link",{email:u},1,"community")},async linkReporterToken(u,c){return p("POST","/v1/tester/link-reporter",{reporter_token_hash:u},1,"community",{Authorization:`Bearer ${c}`})},async getCrossAppReports(u,c){let h=new URLSearchParams;c?.limit&&h.set("limit",String(c.limit)),c?.offset&&h.set("offset",String(c.offset));let y=h.size?`?${h.toString()}`:"";return p("GET",`/v1/tester/cross-app-reports${y}`,void 0,1,"community",{Authorization:`Bearer ${u}`})},async getMyReputation(u){return p("GET","/v1/tester/reputation",void 0,1,"community",{Authorization:`Bearer ${u}`})},async getPublicLeaderboard(u=20){return p("GET",`/v1/public/tester-leaderboard?limit=${u}`,void 0,1,"reporter-poll")},async getTesterStatus(u){return p("GET","/v1/me/tester-status",void 0,1,"community",{Authorization:`Bearer ${u}`})}}}function fn(t){return new Promise(e=>setTimeout(e,t))}function bn(t){return Math.min(1e3*2**t+Math.random()*500,1e4)}function To(t){return t instanceof DOMException&&t.name==="AbortError"||t instanceof TypeError}function nr(...t){return t.find(e=>e!==void 0&&e!=="")}function be(t){try{let e=undefined;return typeof e=="object"&&e!==null?e[t]:void 0}catch{return}}function Pe(t){try{return t()}catch{return}}function _n(){let t=nr(be("VITE_MUSHI_PROJECT_ID"),be("NEXT_PUBLIC_MUSHI_PROJECT_ID"),be("NUXT_PUBLIC_MUSHI_PROJECT_ID"),be("EXPO_PUBLIC_MUSHI_PROJECT_ID"),Pe(()=>process.env.NEXT_PUBLIC_MUSHI_PROJECT_ID),Pe(()=>process.env.EXPO_PUBLIC_MUSHI_PROJECT_ID),Pe(()=>process.env.MUSHI_PROJECT_ID)),e=nr(be("VITE_MUSHI_API_KEY"),be("NEXT_PUBLIC_MUSHI_API_KEY"),be("NUXT_PUBLIC_MUSHI_API_KEY"),be("EXPO_PUBLIC_MUSHI_API_KEY"),Pe(()=>process.env.NEXT_PUBLIC_MUSHI_API_KEY),Pe(()=>process.env.EXPO_PUBLIC_MUSHI_API_KEY),Pe(()=>process.env.MUSHI_API_KEY)),r=nr(be("VITE_MUSHI_API_ENDPOINT"),be("NEXT_PUBLIC_MUSHI_API_ENDPOINT"),be("NUXT_PUBLIC_MUSHI_API_ENDPOINT"),be("EXPO_PUBLIC_MUSHI_API_ENDPOINT"),Pe(()=>process.env.NEXT_PUBLIC_MUSHI_API_ENDPOINT),Pe(()=>process.env.EXPO_PUBLIC_MUSHI_API_ENDPOINT),Pe(()=>process.env.MUSHI_API_ENDPOINT)),n={};return t&&(n.projectId=t),e&&(n.apiKey=e),r&&(n.apiEndpoint=r),n}var Mo=10,$o=2e3,Lo=[/^(.)\1{10,}$/,/^[A-Z\s!?]{20,}$/,/^[\d\s]+$/,/^[^a-zA-Z\u00C0-\u024F\u4E00-\u9FFF\u3040-\u309F\u30A0-\u30FF]{10,}$/,/^(asdf|qwerty|lorem ipsum)[.,!?\s]*$/i],Io=/^[bcdfghjklmnpqrstvwxz]{6,}/i;function Pn(t={}){let{enabled:e=true,blockObviousSpam:r=true,minDescriptionLength:n=Mo,maxDescriptionLength:s=$o}=t;function o(i){if(!e)return {passed:true};let a=i.trim();if(a.length<n)return {passed:false,reason:`Too short (min ${n} characters)`};if(a.length>s)return {passed:false,reason:`Too long (max ${s} characters)`};if(r){for(let p of Lo)if(p.test(a))return {passed:false,reason:"Detected as spam"};if(Io.test(a))return {passed:false,reason:"Detected as gibberish"};if(a.split(/\s+/).filter(p=>p.length>1).length<2)return {passed:false,reason:"Description needs at least 2 words"}}return {passed:true}}function l(i){let a=i.trim();return a.length<=s?a:a.slice(0,s)+"..."}return {check:o,truncate:l}}var yn={debug:10,info:20,warn:30,error:40,fatal:50,silent:99},Ao={debug:"DBG",info:"INF",warn:"WRN",error:"ERR",fatal:"FTL"},pe={reset:"\x1B[0m",dim:"\x1B[2m",bold:"\x1B[1m",cyan:"\x1B[36m",green:"\x1B[32m",yellow:"\x1B[33m",red:"\x1B[31m",white:"\x1B[37m",bgRed:"\x1B[41m"},_o={debug:pe.dim,info:pe.green,warn:pe.yellow,error:pe.red,fatal:`${pe.bgRed}${pe.white}${pe.bold}`};function Po(){try{if(typeof globalThis.Deno<"u")return "json"}catch{}let t=typeof globalThis.process<"u"?globalThis.process:void 0;if(t?.env){if(t.env.NODE_ENV==="production"||t.env.LOG_FORMAT==="json")return "json";if(t.env.LOG_FORMAT==="pretty"||t.stdout?.isTTY)return "pretty"}return typeof globalThis.window<"u"?"pretty":"json"}function Do(t){let e=[];for(let[r,n]of Object.entries(t))n!=null&&(typeof n=="object"?e.push(`${r}=${JSON.stringify(n)}`):e.push(`${r}=${String(n)}`));return e.join(" ")}function Ho(t){let{ts:e,level:r,scope:n,msg:s,...o}=t,l=e.slice(11,23),i=_o[r]??"",a=Ao[r]??r.toUpperCase(),m=Object.keys(o).length>0?` ${pe.dim}${Do(o)}${pe.reset}`:"";return `${pe.dim}${l}${pe.reset} ${i}${a}${pe.reset} ${pe.cyan}[${n}]${pe.reset} ${s}${m}`}function Oo(t){return JSON.stringify(t)}function Bo(t){return t==="stderr"?(e,r)=>{console.error(r);}:(e,r)=>{switch(e){case "error":case "fatal":console.error(r);break;case "warn":console.warn(r);break;default:console.log(r);}}}function Dn(t,e,r,n,s){let o=e;function l(i,a,m){if(yn[i]<yn[o])return;let p={ts:new Date().toISOString(),level:i,scope:t,msg:a,...r,...m};s(i,n(p));}return {debug:(i,a)=>l("debug",i,a),info:(i,a)=>l("info",i,a),warn:(i,a)=>l("warn",i,a),error:(i,a)=>l("error",i,a),fatal:(i,a)=>l("fatal",i,a),child(i,a){return Dn(`${t}:${i}`,o,{...r,...a},n,s)},setLevel(i){o=i;}}}function At(t){let{scope:e,level:r="info",meta:n={},format:s="auto",destination:o="stdout"}=t,i=(s==="auto"?Po():s)==="json"?Oo:Ho,a=Bo(o);return Dn(e,r,n,i,a)}var lr={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},fatal:()=>{},child:()=>lr,setLevel:()=>{}},No="mushi-mushi-keyring",Je="keys",Hn="offline-queue/v1",Tt=null,Mt=null;function Uo(){return typeof globalThis<"u"&&typeof globalThis.crypto<"u"&&typeof globalThis.crypto.subtle<"u"&&typeof indexedDB<"u"}function On(){return new Promise((t,e)=>{let r=indexedDB.open(No,1);r.onupgradeneeded=()=>{let n=r.result;n.objectStoreNames.contains(Je)||n.createObjectStore(Je);},r.onsuccess=()=>t(r.result),r.onerror=()=>e(r.error);})}async function Fo(){let t=await On();return new Promise((e,r)=>{let s=t.transaction(Je,"readonly").objectStore(Je).get(Hn);s.onsuccess=()=>e(s.result??null),s.onerror=()=>r(s.error);})}async function qo(t){let e=await On();return new Promise((r,n)=>{let s=e.transaction(Je,"readwrite");s.objectStore(Je).put(t,Hn),s.oncomplete=()=>r(),s.onerror=()=>n(s.error);})}async function Bn(){if(Tt)return Tt;if(Mt)return Mt;if(!Uo())throw new Error("Web Crypto + IndexedDB required for offline queue encryption");return Mt=(async()=>{let t=await Fo();if(t)return Tt=t,t;let e=await crypto.subtle.generateKey({name:"AES-GCM",length:256},false,["encrypt","decrypt"]);return await qo(e),Tt=e,e})(),Mt}function vn(t){let e="";for(let r of t)e+=String.fromCharCode(r);return btoa(e)}function xn(t){let e=atob(t),r=new Uint8Array(new ArrayBuffer(e.length));for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}async function jo(t){let e=await Bn(),r=crypto.getRandomValues(new Uint8Array(12)),n=new TextEncoder().encode(JSON.stringify(t)),s=new Uint8Array(await crypto.subtle.encrypt({name:"AES-GCM",iv:r},e,n));return {_mme:1,iv:vn(r),ct:vn(s)}}function zo(t){return !!t&&typeof t=="object"&&t._mme===1&&typeof t.iv=="string"&&typeof t.ct=="string"}async function Wo(t){let e=await Bn(),r=xn(t.iv),n=xn(t.ct),s=await crypto.subtle.decrypt({name:"AES-GCM",iv:r},e,n);return JSON.parse(new TextDecoder().decode(s))}var De=At({scope:"mushi:queue",level:"warn"}),Vo="mushi-mushi",de="offline-reports",Go=1,sr="mushi_offline_queue",Ko=10,Yo=6e4,Xo=3e4,Jo=8,Zo=1440*60*1e3;function Nn(t={}){let{enabled:e=true,maxQueueSize:r=50,syncOnReconnect:n=true,encryptAtRest:s=true}=t,o=null,l=null,i=null;async function a(T){let L=new Date().toISOString();if(!s)return {...T,queuedAt:L};try{let _=await jo(T);return {id:T.id,queuedAt:L,payload:_}}catch(_){return De.warn("Offline queue: encryption failed, storing plaintext",{err:String(_)}),{...T,queuedAt:L}}}async function m(T){if(p(T))try{return await Wo(T.payload)}catch(L){return De.warn("Offline queue: decrypt failed, dropping row",{err:String(L),id:T.id}),null}return T}function p(T){return !!T.payload&&zo(T.payload)}function g(T){let L=T.attempts;return typeof L=="number"&&Number.isFinite(L)?L:0}function u(T,L){let _=T.queuedAt;if(!_)return false;let N=Date.parse(_);return Number.isNaN(N)?false:L-N>Zo}function c(){return i||(typeof indexedDB<"u"?i="indexeddb":typeof localStorage<"u"?i="localstorage":i="none",i)}function h(){return new Promise((T,L)=>{let _=indexedDB.open(Vo,Go);_.onupgradeneeded=()=>{let N=_.result;N.objectStoreNames.contains(de)||N.createObjectStore(de,{keyPath:"id"});},_.onsuccess=()=>T(_.result),_.onerror=()=>{i="localstorage",L(_.error);};})}async function y(T){let L=await h(),_=await a(T);return new Promise((N,C)=>{let le=L.transaction(de,"readwrite");le.objectStore(de).put(_),le.oncomplete=()=>N(),le.onerror=()=>C(le.error);})}async function v(){let T=await h();return new Promise((L,_)=>{let C=T.transaction(de,"readonly").objectStore(de).getAll();C.onsuccess=()=>L(C.result),C.onerror=()=>_(C.error);})}async function I(T){let L=await h();return new Promise((_,N)=>{let C=L.transaction(de,"readwrite");C.objectStore(de).delete(T),C.oncomplete=()=>_(),C.onerror=()=>N(C.error);})}async function R(T){let L=await h();return new Promise((_,N)=>{let C=L.transaction(de,"readwrite");C.objectStore(de).put(T),C.oncomplete=()=>_(),C.onerror=()=>N(C.error);})}async function k(){let T=await h();return new Promise((L,_)=>{let C=T.transaction(de,"readonly").objectStore(de).count();C.onsuccess=()=>L(C.result),C.onerror=()=>_(C.error);})}async function M(){let T=await h();return new Promise((L,_)=>{let N=T.transaction(de,"readwrite");N.objectStore(de).clear(),N.oncomplete=()=>L(),N.onerror=()=>_(N.error);})}function S(){try{let T=localStorage.getItem(sr);return T?JSON.parse(T):[]}catch{return []}}function E(T){try{localStorage.setItem(sr,JSON.stringify(T));}catch{}}async function O(T){let L=S();L.push(await a(T)),E(L);}function w(T){let L=S().filter(_=>_.id!==T);E(L);}function B(T){let L=S(),_=L.findIndex(N=>N.id===T.id);_>=0&&(L[_]=T,E(L));}async function H(T,L){try{T==="indexeddb"?await I(L):w(L);}catch(_){De.debug("Offline queue: row removal failed (will age out)",{id:L,err:String(_)});}}async function F(T,L){try{return T==="indexeddb"?await R(L):B(L),!0}catch(_){return De.debug("Offline queue: row persist failed",{id:L.id,err:String(_)}),false}}async function te(T){if(!e)return;if(await P()>=r){De.warn("Offline queue full \u2014 dropping report",{maxQueueSize:r});return}let _=c();if(_==="indexeddb")try{await y(T);return}catch{i="localstorage";}if(_==="localstorage"||i==="localstorage"){await O(T);return}}function Z(T){return Math.min(1e3*2**T+Math.random()*500,Yo)}function J(T){return new Promise(L=>setTimeout(L,T))}async function q(T){if(!e)return {sent:0,failed:0};let L,_=c();if(_==="indexeddb")try{L=await v();}catch{L=S();}else L=S();let N=Date.now(),C=[];for(let ie of L)if(u(ie,N)){let X=ie.id;await H(_,X),De.debug("Offline queue: evicting stale report",{id:X});}else C.push(ie);L=C;let le=L.slice(0,Ko),ce=0,G=0;for(let ie=0;ie<le.length;ie++){let X=le[ie],ae=X.id,Te=await m(X);if(!Te){await H(_,ae),G++;continue}let j=await T.submitReport(Te);if(j.ok)await H(_,ae),ce++;else {let rt=j.error?.code==="HTTP_400"||j.error?.code==="HTTP_413"||j.error?.code==="HTTP_422"||j.error?.code==="INGEST_ERROR"||j.error?.code==="VALIDATION_ERROR"||j.error?.code==="PAYLOAD_TOO_LARGE"||j.error?.code==="SERIALIZE_FAILED"||typeof j.error?.message=="string"&&/invalid payload|description must be at least|validation/i.test(j.error.message),mt=!rt&&(j.error?.code==="NETWORK_ERROR"||j.error?.code==="HTTP_403"||j.error?.code==="HTTP_429"||j.error?.code==="HTTP_502"||j.error?.code==="HTTP_503"||j.error?.code==="HTTP_504"||typeof j.error?.code=="string"&&j.error.code.startsWith("HTTP_5"));if(rt)await H(_,ae);else if(mt){let Fe=g(X)+1;Fe>=Jo?(await H(_,ae),De.warn("Offline queue: giving up on report after repeated failures",{id:ae,attempts:Fe,code:j.error?.code})):(X.attempts=Fe,await F(_,X)?De.debug("Offline queue: transient failure, will retry",{id:ae,attempts:Fe,code:j.error?.code}):(await H(_,ae),De.warn("Offline queue: dropping report (attempt counter unpersistable)",{id:ae,code:j.error?.code})));}G++,ie<le.length-1&&await J(Z(ie));}}return {sent:ce,failed:G}}async function P(){if(c()==="indexeddb")try{return await k()}catch{return S().length}return S().length}async function $(){if(c()==="indexeddb")try{await M();}catch{}try{localStorage.removeItem(sr);}catch{}}function Se(T){if(!e||!n||typeof window>"u")return;let L=()=>{navigator.onLine&&q(T).catch(()=>{});};window.addEventListener("online",L),l=setInterval(()=>{P().then(_=>{_>0&&L();});},Xo),o=()=>{window.removeEventListener("online",L),l&&(clearInterval(l),l=null);};}function me(){o?.(),o=null;}return {enqueue:te,flush:q,size:P,clear:$,startAutoSync:Se,stopAutoSync:me}}function cr(){let t=typeof navigator<"u"?navigator:void 0,e=typeof window<"u"?window:void 0,r=typeof document<"u"?document:void 0,n=typeof screen<"u"?screen:void 0;ei(t);let s=t&&"connection"in t?t.connection:void 0;return {userAgent:t?.userAgent??"unknown",platform:t?.platform??"unknown",language:t?.language??"en",viewport:{width:e?.innerWidth??0,height:e?.innerHeight??0},url:e?.location?.href??"",referrer:r?.referrer??"",timestamp:new Date().toISOString(),timezone:Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone??"UTC",connection:s?{effectiveType:s.effectiveType,downlink:s.downlink,rtt:s.rtt}:void 0,deviceMemory:t?.deviceMemory,hardwareConcurrency:t?.hardwareConcurrency,route:e?.location?.pathname,nearestTestid:Qo(r),userAgentData:ri(t),screen:ni(n,e),prefersColorScheme:si(e),prefersReducedMotion:ye(e,"(prefers-reduced-motion: reduce)"),prefersReducedData:ye(e,"(prefers-reduced-data: reduce)"),prefersContrast:oi(e),forcedColors:ye(e,"(forced-colors: active)"),online:typeof t?.onLine=="boolean"?t.onLine:void 0,displayMode:ii(e),documentTitle:r?.title?.slice(0,200),buildId:ai(r),pageLoadTiming:li(e)}}function Qo(t){if(!t)return;let e=t.activeElement??null,r=0;for(;e&&r<20;){let n=e.getAttribute?.("data-testid");if(n)return n;e=e.parentElement,r++;}}var we=null,wn=false;function ei(t){if(wn)return;let e=t?.userAgentData;e?.getHighEntropyValues&&(wn=true,e.getHighEntropyValues(["architecture","bitness","model","platformVersion","uaFullVersion","fullVersionList"]).then(r=>{we=r;}).catch(()=>{}));}function ti(t){if(!t?.length)return;let e=t.filter(n=>!/not.?a.?brand/i.test(n.brand));return e.length===0?void 0:e.find(n=>!/chromium|google chrome/i.test(n.brand))??e[0]}function ri(t){let e=t?.userAgentData;if(!e&&!we)return;let r=we?.fullVersionList,n=ti(r??e?.brands),s={};return n&&(s.browser=n.brand,s.browserVersion=n.version),e?.platform&&(s.os=e.platform),we?.platformVersion&&(s.osVersion=we.platformVersion),typeof e?.mobile=="boolean"&&(s.mobile=e.mobile),we?.model&&(s.model=we.model),we?.architecture&&(s.architecture=we.architecture),we?.bitness&&(s.bitness=we.bitness),Object.keys(s).length===0?void 0:s}function ni(t,e){if(!t&&!e)return;let r={};typeof t?.width=="number"&&(r.width=t.width),typeof t?.height=="number"&&(r.height=t.height),typeof e?.devicePixelRatio=="number"&&(r.devicePixelRatio=e.devicePixelRatio),typeof t?.colorDepth=="number"&&(r.colorDepth=t.colorDepth);let n=t?.orientation?.type;return n&&(r.orientation=n),Object.keys(r).length===0?void 0:r}function ye(t,e){if(t?.matchMedia)try{return t.matchMedia(e).matches}catch{return}}function si(t){if(t?.matchMedia)return ye(t,"(prefers-color-scheme: dark)")?"dark":ye(t,"(prefers-color-scheme: light)")?"light":"no-preference"}function oi(t){if(t?.matchMedia)return ye(t,"(prefers-contrast: more)")?"more":ye(t,"(prefers-contrast: less)")?"less":ye(t,"(prefers-contrast: custom)")?"custom":"no-preference"}function ii(t){if(t?.matchMedia){if(ye(t,"(display-mode: fullscreen)"))return "fullscreen";if(ye(t,"(display-mode: standalone)"))return "standalone";if(ye(t,"(display-mode: minimal-ui)"))return "minimal-ui";if(ye(t,"(display-mode: browser)"))return "browser"}}function ai(t){if(!t)return;let r=t.querySelector?.('meta[name="mushi:build"]')?.content?.trim();if(r)return r.slice(0,64)}function li(t){let e=t?.performance;if(!e?.getEntriesByType)return;let r;try{r=e.getEntriesByType("navigation")[0];}catch{return}if(!r)return;let n=r.startTime??0,s={};return r.domContentLoadedEventEnd>0&&(s.domContentLoadedMs=Math.round(r.domContentLoadedEventEnd-n)),r.loadEventEnd>0&&(s.loadCompleteMs=Math.round(r.loadEventEnd-n)),r.responseStart>0&&(s.timeToFirstByteMs=Math.round(r.responseStart-n)),typeof r.type=="string"&&(s.navigationType=r.type),Object.keys(s).length===0?void 0:s}var or="mushi_reporter_token";function ci(t){return `mushi:reporter-token:${t}`}function Sn(){if(typeof crypto<"u"&&crypto.randomUUID)return `mushi_${crypto.randomUUID()}`;let t=new Uint8Array(16);if(typeof crypto<"u")crypto.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);return `mushi_${Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}`}function ir(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(t);return e&&e.length>0?e:null}catch{return null}}function En(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(t,e);}catch{}}function oe(t){if(!t){let o=ir(or);if(o)return o;let l=Sn();return En(or,l),l}let e=ci(t),r=ir(e);if(r)return r;let s=ir(or)??Sn();return En(e,s),s}function ur(){let t=typeof crypto<"u"?crypto:void 0;if(t?.randomUUID)return t.randomUUID();let e=new Uint8Array(16);if(t?.getRandomValues)t.getRandomValues(e);else for(let n=0;n<e.length;n++)e[n]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let r=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return `${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20,32)}`}var kn="mushi_fingerprint_hash";function ui(){let t=typeof navigator<"u"?navigator:void 0,e=typeof screen<"u"?screen:void 0,r=typeof window<"u"?window:void 0;return {userAgent:t?.userAgent??"unknown",platform:t?.platform??"unknown",language:t?.language??"en",timezone:Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone??"UTC",screenWidth:e?.width??0,screenHeight:e?.height??0,pixelRatio:r?.devicePixelRatio??1,deviceMemory:t?.deviceMemory,hardwareConcurrency:t?.hardwareConcurrency}}async function di(t){if(typeof crypto<"u"&&crypto.subtle){let r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("")}let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return `fbk_${(e>>>0).toString(16).padStart(8,"0")}`}async function Un(){if(typeof localStorage<"u"){let n=localStorage.getItem(kn);if(n)return n}let t=ui(),e=JSON.stringify(t),r=await di(e);if(typeof localStorage<"u")try{localStorage.setItem(kn,r);}catch{}return r}var Rn="mushi_session_id",$t=null;function dt(){if($t)return $t;if(typeof sessionStorage<"u"){let e=sessionStorage.getItem(Rn);if(e)return $t=e,e}let t=pi();if($t=t,typeof sessionStorage<"u")try{sessionStorage.setItem(Rn,t);}catch{}return t}function pi(){let t=Date.now().toString(36),e=Math.random().toString(36).slice(2,8);return `ms_${t}_${e}`}var hi=10,mi=1,gi=5e3;function Fn(t={}){let{maxBurst:e=hi,refillRate:r=mi,refillIntervalMs:n=gi}=t,s=e,o=Date.now();function l(){let p=Date.now(),g=p-o,u=Math.floor(g/n);u>0&&(s=Math.min(e,s+u*r),o=p);}function i(){return l(),s>0?(s--,true):false}function a(){s=e,o=Date.now();}function m(){return l(),s}return {tryConsume:i,reset:a,availableTokens:m}}var fi=[{key:"ssns",regex:/\b\d{3}-\d{2}-\d{4}\b/g,replacement:"[REDACTED_SSN]"},{key:"creditCards",regex:/\b(?:\d[ -]*){12,18}\d\b/g,replacement:"[REDACTED_CC]"},{key:"secretTokens",regex:/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,replacement:"[REDACTED_AWS_KEY]"},{key:"secretTokens",regex:/(?:aws_secret_access_key|secret_access_key)["'\s:=]+[A-Za-z0-9/+=]{40}\b/gi,replacement:"aws_secret_access_key=[REDACTED_AWS_SECRET]"},{key:"secretTokens",regex:/\b(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{24,}\b/g,replacement:"[REDACTED_STRIPE_KEY]"},{key:"secretTokens",regex:/\bpk_(?:live|test)_[A-Za-z0-9]{24,}\b/g,replacement:"[REDACTED_STRIPE_PK]"},{key:"secretTokens",regex:/\bxox[abpor]-[A-Za-z0-9-]{10,}\b/g,replacement:"[REDACTED_SLACK_TOKEN]"},{key:"secretTokens",regex:/\bghp_[A-Za-z0-9]{36}\b/g,replacement:"[REDACTED_GITHUB_PAT]"},{key:"secretTokens",regex:/\bgithub_pat_[A-Za-z0-9_]{80,}\b/g,replacement:"[REDACTED_GITHUB_PAT]"},{key:"secretTokens",regex:/\bsk-(?:proj-)?[A-Za-z0-9_-]{20,}\b/g,replacement:"[REDACTED_OPENAI_KEY]"},{key:"secretTokens",regex:/\bsk-ant-[A-Za-z0-9_-]{20,}\b/g,replacement:"[REDACTED_ANTHROPIC_KEY]"},{key:"secretTokens",regex:/\bAIza[0-9A-Za-z_-]{35}\b/g,replacement:"[REDACTED_GOOGLE_KEY]"},{key:"secretTokens",regex:/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,replacement:"[REDACTED_JWT]"},{key:"emails",regex:/\b[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}\b/g,replacement:"[REDACTED_EMAIL]"},{key:"phones",regex:/(?:\+\d{1,3}[\s.-])?\(?\d{2,4}\)?[\s.-]\d{3,4}[\s.-]\d{3,4}\b/g,replacement:"[REDACTED_PHONE]"},{key:"ipAddresses",regex:/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,replacement:"[REDACTED_IP]"},{key:"ipv6",regex:/\b(?:[A-Fa-f0-9]{1,4}:){2,7}[A-Fa-f0-9]{0,4}\b/g,replacement:"[REDACTED_IPV6]"}],bi={emails:true,phones:true,creditCards:true,ssns:true,ipAddresses:false,secretTokens:true,ipv6:false};function qn(t={}){let e={...bi,...t},r=fi.filter(o=>e[o.key]);function n(o){if(!o)return o;let l=o;for(let{regex:i,replacement:a}of r)l=l.replace(new RegExp(i.source,i.flags),a);return l}function s(o,l){let i={...o};for(let a of l)typeof i[a]=="string"&&(i[a]=n(i[a]));return i}return {scrub:n,scrubObject:s}}var yi=50,vi=500;function jn(t={}){let e=Math.max(1,t.max??yi),r=Math.max(50,t.maxMessageLength??vi),n=[];return {add(s){let o=typeof s.timestamp=="number"?s.timestamp:Date.now(),l=typeof s.message=="string"&&s.message.length>r?`${s.message.slice(0,r)}\u2026`:s.message,i={timestamp:o,category:s.category,level:s.level??"info",message:l??"",...s.data?{data:s.data}:{}};for(n.push(i);n.length>e;)n.shift();},getAll(){return n.slice()},clear(){n=[];},size(){return n.length}}}var Cn=8*1024,xi=1e3;function zn(t){if(t instanceof Error){let e=t.name||"Error",r=t.message||String(t),n=typeof t.stack=="string"&&t.stack.length>0?t.stack.slice(0,Cn):void 0,s=t.cause;return {name:e,message:r,...n?{stack:n}:{},...s!==void 0?{cause:s instanceof Error?s.message:s}:{}}}if(typeof t=="string")return {name:"Error",message:t};if(t&&typeof t=="object"){let e=t,r=typeof e.name=="string"?e.name:"Error",n=typeof e.message=="string"?e.message:(()=>{try{return JSON.stringify(e).slice(0,xi)}catch{return String(e)}})(),s=typeof e.stack=="string"?e.stack.slice(0,Cn):void 0;return {name:r,message:n,...s?{stack:s}:{}}}return t===void 0?{name:"Error",message:"unknown"}:{name:"Error",message:String(t)}}var se={paper:"#F8F4ED",paperRaised:"#FFFFFF",ink:"#0E0D0B",inkMuted:"#5C5852",inkFaint:"#9A9489",inkDim:"#6E6760",rule:"rgba(14,13,11,0.10)",ruleStrong:"rgba(14,13,11,0.16)",accent:"#E03C2C",accentWash:"rgba(224,60,44,0.08)",accentInk:"#7A1F15",ok:"#16A34A",danger:"#DC2626"},wi={paper:"#0F0E0C",paperRaised:"#1A1815",ink:"#F2EBDD",inkMuted:"#928B7E",inkFaint:"#5A5650",inkDim:"#7A7268",rule:"rgba(242,235,221,0.10)",ruleStrong:"rgba(242,235,221,0.18)",accent:"#FF5A47",accentWash:"rgba(255,90,71,0.12)",accentInk:"#FFE5E0",ok:"#4ADE80",danger:"#F87171"},dr={free:se.inkMuted,explorer:"#2563EB",contributor:"#7C3AED",champion:"#D97706",default:se.accent},_t={bg:"#0FFF50",fg:"#0a1a0a",border:"#00C43A"},Wn="#FAF7F0",Vn="#ffffff",pr={light:"#9A2A1E",dark:"#7A1F15"},hr={light:"#B52F1F",dark:"#C4321E"},Gn={light:{sent:{fg:"#1E4A8C",bg:"rgba(30,74,140,0.08)",border:"rgba(30,74,140,0.16)"},review:{fg:"#8A5A00",bg:"rgba(180,120,0,0.10)",border:"rgba(180,120,0,0.18)"},fixing:{fg:"#9A3D12",bg:"rgba(224,60,44,0.10)",border:"rgba(224,60,44,0.18)"},fixed:{fg:"#1F6B3A",bg:"rgba(31,107,58,0.10)",border:"rgba(31,107,58,0.18)"}},dark:{sent:{fg:"#A8C4FF",bg:"rgba(120,160,255,0.12)",border:"rgba(120,160,255,0.22)"},review:{fg:"#FFD27A",bg:"rgba(255,190,90,0.12)",border:"rgba(255,190,90,0.22)"},fixing:{fg:"#FFB899",bg:"rgba(255,120,60,0.12)",border:"rgba(255,120,60,0.24)"},fixed:{fg:"#8FE3B0",bg:"rgba(80,200,130,0.12)",border:"rgba(80,200,130,0.22)"}}};function mr(t){return t==="dark"?wi:se}var Kn={wide:32},Yn={control:4},Ze={fontDisplay:"'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'Cambria', Georgia, 'Times New Roman', serif",fontBody:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Display', 'Segoe UI', sans-serif",fontMono:"ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace",sizeBody:14,lineBody:1.55},Qe={base:99999,banner:99998,panel:1e5,overlay:2147483647},Pt={easeStamp:"cubic-bezier(0.22, 1, 0.36, 1)",durationFast:200},et={bannerHeight:36,fabSize:52,edgeTabWidth:32,gutter:24,panelWidth:360,panelMaxHeight:480,panelSheetBreakpoint:480};function Tn(t){return /^#[0-9a-fA-F]{3,8}$/.test(t)?t:""}function Xn(t,e="",r=""){let n=mr(t),s=Tn(e),o=Tn(r),l=s||n.accent,i=s?t==="dark"?`${l}1F`:`${l}14`:n.accentWash,a=o||n.accentInk;return {accent:l,accentWash:i,accentInk:a}}function Si(t){let e=t.length%4===0?"":"=".repeat(4-t.length%4),r=t.replace(/-/g,"+").replace(/_/g,"/")+e;if(typeof atob=="function")return atob(r);let n=globalThis.Buffer;return n?n.from(r,"base64").toString("binary"):""}function Jn(t){if(typeof t!="string")return null;let e=t.split(".");if(e.length!==3)return null;try{let r=Si(e[1]),n=JSON.parse(r),s=typeof n.projectId=="string"?n.projectId:void 0,o=typeof n.sub=="string"?n.sub:void 0;return !s||!o?null:{projectId:s,sub:o,...typeof n.email=="string"?{email:n.email}:{},...typeof n.name=="string"?{name:n.name}:{},...typeof n.iat=="number"?{iat:n.iat}:{},...typeof n.exp=="number"?{exp:n.exp}:{}}}catch{return null}}var Ei=new Set(["kensaur.us","www.kensaur.us"]),ki={"glot-it":"glot.it",glotit:"glot.it","solo-boss-cloud":"sbc-front.vercel.app","mushi-mushi":"mushimushi.dev"},Ri={"mushi-mushi":"https://kensaur.us/mushi-mushi/admin/favicon.svg","solo-boss-cloud":"https://sbc-front.vercel.app/favicon.svg","glot-it":"https://kensaur.us/glot-it/apple-touch-icon.png",glotit:"https://kensaur.us/glot-it/apple-touch-icon.png"},Ci=["www.google.com","icons.duckduckgo.com","icon.horse"];function Zn(t){try{let e=new URL(t).hostname.toLowerCase();return Ci.some(r=>e===r||e.endsWith(`.${r}`))}catch{return false}}function Ti(t,e=32){return [`https://${t}/favicon.svg`,`https://${t}/favicon.ico`,`https://${t}/favicon-32x32.png`,`https://${t}/apple-touch-icon.png`]}function Qn(t){let e=[],r=s=>{let o=s?.trim().toLowerCase();!o||e.includes(o)||e.push(o);};r($i(t.repo_url)),r(ki[t.project_slug.toLowerCase()]);let n=t.sdk_origin?Mi(t.sdk_origin):null;return n&&!Ei.has(n)&&r(n),e}function es(t,e=32){if(t.icon_url?.trim())return [t.icon_url.trim()];let r=new Set,n=[],s=l=>{!l||r.has(l)||Zn(l)||(r.add(l),n.push(l));},o=Ri[t.project_slug.toLowerCase()];o&&s(o);for(let l of Qn(t))for(let i of Ti(l,e))s(i);return n}function Mi(t){let e=t.trim();if(!e||/^(capacitor|file|content|app):/i.test(e))return null;try{let n=new URL(e.includes("://")?e:`https://${e}`).hostname.toLowerCase();return n==="localhost"||n==="127.0.0.1"||n.endsWith(".local")?null:n}catch{return null}}function $i(t){if(!t?.trim())return null;try{let e=new URL(t.trim()),r=e.hostname.toLowerCase(),n=e.pathname.replace(/^\/+|\/+$/g,"").split("/").filter(Boolean);if(n.length<2)return null;let s=n[1].replace(/\.git$/i,"").toLowerCase();return /^[a-z0-9][a-z0-9.-]*\.[a-z]{2,}$/i.test(s)||r==="github.com"&&s.endsWith(".github.io")?s:r!=="github.com"&&r!=="www.github.com"?r:null}catch{return null}}function ts(t){return Qn(t)[0]??null}function rs(t){if(typeof document>"u"||!t.complete||t.naturalWidth===0||t.naturalHeight===0)return false;try{let e=document.createElement("canvas"),r=t.naturalWidth,n=t.naturalHeight;e.width=r,e.height=n;let s=e.getContext("2d");if(!s)return !1;s.drawImage(t,0,0);let{data:o}=s.getImageData(0,0,r,n),l=0,i=0,a=0;for(let p=0;p<o.length;p+=4){let g=o[p],u=o[p+1],c=o[p+2];if(o[p+3]<128)continue;l++;let y=Math.max(g,u,c),v=Math.min(g,u,c),I=y-v;a=Math.max(a,I),i+=I;}return l===0?!0:i/l<14&&a<24}catch{return Zn(t.src)}}function ns(t){let e=t.trim().split(/[\s._-]+/).filter(Boolean);return e.length>=2?`${e[0][0]??""}${e[1][0]??""}`.toUpperCase():(t.replace(/[^a-zA-Z0-9]/g,"").slice(0,2)||t.slice(0,2)||"?").toUpperCase()}function ss(){if(typeof document>"u")return null;let t=['link[rel="icon"]','link[rel="shortcut icon"]','link[rel="apple-touch-icon"]'];for(let e of t){let n=document.querySelector(e)?.href;if(n&&Li(n))return n}return null}function Li(t){try{let e=typeof location<"u"?location.href:void 0,r=new URL(t,e).protocol;return r==="http:"||r==="https:"}catch{return false}}async function is(t,e=Mn){if(!t.startsWith("data:image/")||os(t)<=e)return t;if(typeof document>"u")return null;let r=new Image;await new Promise((o,l)=>{r.onload=()=>o(),r.onerror=()=>l(new Error("screenshot_decode_failed")),r.src=t;});let n=[.65,.5,.35,.25],s=[1,.85,.7,.55,.4];for(let o of s){let l=document.createElement("canvas"),i=Math.max(1,Math.round(r.naturalWidth*o)),a=Math.max(1,Math.round(r.naturalHeight*o));l.width=i,l.height=a;let m=l.getContext("2d");if(m){m.drawImage(r,0,0,i,a);for(let p of n){let g=l.toDataURL("image/jpeg",p);if(os(g)<=e)return g}}}return null}function os(t){let e=t.indexOf(",");if(e<0)return t.length;let r=t.slice(e+1);return Math.ceil(r.length*3/4)}var Dt={widget:{trigger:"Report Issue",title:"Report an Issue",close:"Close",back:"Back",submit:"Submit",submitting:"Submitting\u2026",submitted:"Thank you! Your report has been submitted.",error:"Could not send your report. Check your connection and try again."},step1:{heading:"What kind of issue?",reportSectionLabel:"Report an issue",moreNavLabel:"More",moreNav:{yourReports:"Your reports",yourReportsDesc:"See status, developer replies, and respond",unreadNew:"new",communityIdeas:"Community ideas",communityIdeasDesc:"Vote on features and see what shipped",leaderboard:"Leaderboard",joinCommunity:"Join community \xB7 Track reports across apps",myAccount:"My account"},categories:{bug:"Bug",slow:"Slow / Laggy",visual:"Visual Glitch",confusing:"Confusing",other:"Other"},categoryDescriptions:{bug:"Something is broken or not working",slow:"Performance issue or slow loading",visual:"Layout, styling, or display problem",confusing:"Hard to understand or navigate",other:"Something else"}},step2:{heading:"What happened?",intents:{bug:["Crash","Unresponsive","Data loss","Wrong result","Other"],slow:["Page load","Interaction","API call","Animation","Other"],visual:["Layout broken","Overlapping","Missing element","Wrong color/font","Other"],confusing:["Unclear label","Missing help","Unexpected flow","Lost navigation","Other"],other:["Feature request","Accessibility","Typo","Other"]}},step3:{heading:"Tell us more",descriptionPlaceholder:"Describe what happened\u2026",screenshotButton:"Attach Screenshot",screenshotAttached:"Screenshot attached \u2713",screenshotCapturing:"Taking screenshot\u2026",screenshotFailed:"Couldn't capture \u2014 describe it instead",screenshotPreviewAlt:"Preview of the screenshot that will be sent",screenshotSensitiveHint:"Check the preview \u2014 remove it if any private info (balances, personal details) is visible.",elementButton:"Select Element",elementSelected:"Element selected \u2713",elementCapturing:"Click anything on the page\u2026",elementSelectorHint:"Click any element \xB7 Esc to cancel",optional:"(optional)",tooShort:"A bit more detail helps us fix it faster",examplePrompts:["The save button does nothing","Page froze for 10 seconds","Layout looks broken here"]},assistant:{defaultLabel:"Ask",defaultGreeting:"Ask about this page \u2014 I only use what you see here.",inputPlaceholder:"Type your question\u2026",sendAriaLabel:"Send",hubDescription:"Get help using this app",thinking:"Thinking\u2026",errors:{noResponse:"No response \u2014 check your connection and try again.",generic:"Could not reach the assistant. Try again in a moment."}},flows:{eyebrows:{inbox:"Mushi \xB7 Inbox",roadmap:"Mushi \xB7 Roadmap",community:"Mushi \xB7 Community",identity:"Mushi \xB7 Identity",signIn:"Mushi \xB7 Sign in",allApps:"Mushi \xB7 All apps",receipt:"Mushi \xB7 Receipt",thread:"Mushi \xB7 Inbox"},reports:{title:"Your reports",loading:"Loading reports\u2026",empty:"No reports from this browser yet.",leaderboardLink:"Leaderboard"},roadmap:{title:"Community ideas",loading:"Loading ideas\u2026",empty:"No community ideas yet. Be the first to suggest one.",shipped:"Shipped",vote:"Vote",voted:"Voted",voteCount:"{n} votes",untitled:"Untitled idea"},leaderboard:{title:"Global leaderboard",loading:"Loading leaderboard\u2026",empty:"No contributors yet \u2014 be the first!",signInPrompt:"Sign in to see your rank \u2192",myRank:"You are ranked #{rank} this month",footer:"Global contributors this month \xB7 Points refresh monthly",anon:"Anon"},account:{title:"Mushi account",checkEmailTitle:"Check your email",joinTitle:"Join the community",emailLabel:"Email address",emailPlaceholder:"Email",signInPrompt:"Sign in to see your reports across all apps and climb the global leaderboard. No password needed.",magicLinkSent:"We sent a sign-in link to {email}. Click it to connect your reports across apps.",resendEmail:"Resend email",sendLink:"Send sign-in link",sending:"Sending\u2026",crossAppReports:"My reports across all apps \u2192",viewLeaderboard:"View global leaderboard \u2192",signOut:"Sign out",rankSummary:"Rank #{rank} \xB7 {points} pts this month"},crossApp:{title:"My reports",loading:"Loading your reports\u2026",empty:"No reports filed yet.",unknownApp:"Unknown app"},thread:{title:"Report thread",loading:"Loading thread\u2026",empty:"No developer replies yet.",confirmFixed:"Yes, fixed for me",notFixed:"Not fixed yet",replyPlaceholder:"Reply to the developer\u2026",send:"Send"},success:{trackReport:"Track this report \u203A",receipt:"Receipt",delivering:"Delivering to the team\u2026",queuedOffline:"Queued offline",queuedHint:"We'll send it the moment you're back online.",trackOnMushi:"Track on Mushi",slaDefault:"We will review your report."},featureRequest:{label:"Feature request",description:"Suggest a change"},poweredBy:"Powered by Mushi v{version}"}};var as={widget:{trigger:"\u554F\u984C\u3092\u5831\u544A",title:"\u554F\u984C\u3092\u5831\u544A\u3059\u308B",close:"\u9589\u3058\u308B",back:"\u623B\u308B",submit:"\u9001\u4FE1",submitting:"\u9001\u4FE1\u4E2D\u2026",submitted:"\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01\u30EC\u30DD\u30FC\u30C8\u304C\u9001\u4FE1\u3055\u308C\u307E\u3057\u305F\u3002",error:"\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"},step1:{heading:"\u3069\u306E\u3088\u3046\u306A\u554F\u984C\u3067\u3059\u304B\uFF1F",reportSectionLabel:"\u554F\u984C\u3092\u5831\u544A",moreNavLabel:"\u305D\u306E\u4ED6",moreNav:{yourReports:"\u3042\u306A\u305F\u306E\u30EC\u30DD\u30FC\u30C8",yourReportsDesc:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3001\u958B\u767A\u8005\u304B\u3089\u306E\u8FD4\u4FE1\u3001\u8FD4\u7B54",unreadNew:"\u4EF6\u306E\u65B0\u7740",communityIdeas:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u30A2\u30A4\u30C7\u30A2",communityIdeasDesc:"\u6A5F\u80FD\u306B\u6295\u7968\u3057\u3066\u30EA\u30EA\u30FC\u30B9\u72B6\u6CC1\u3092\u78BA\u8A8D",leaderboard:"\u30EA\u30FC\u30C0\u30FC\u30DC\u30FC\u30C9",joinCommunity:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306B\u53C2\u52A0 \xB7 \u30A2\u30D7\u30EA\u6A2A\u65AD\u3067\u30EC\u30DD\u30FC\u30C8\u3092\u8FFD\u8DE1",myAccount:"\u30DE\u30A4\u30A2\u30AB\u30A6\u30F3\u30C8"},categories:{bug:"\u30D0\u30B0",slow:"\u9045\u3044\u30FB\u91CD\u3044",visual:"\u8868\u793A\u306E\u554F\u984C",confusing:"\u308F\u304B\u308A\u306B\u304F\u3044",other:"\u305D\u306E\u4ED6"},categoryDescriptions:{bug:"\u52D5\u4F5C\u3057\u306A\u3044\u3001\u58CA\u308C\u3066\u3044\u308B",slow:"\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u304C\u60AA\u3044\u3001\u8AAD\u307F\u8FBC\u307F\u304C\u9045\u3044",visual:"\u30EC\u30A4\u30A2\u30A6\u30C8\u3001\u30C7\u30B6\u30A4\u30F3\u3001\u8868\u793A\u306E\u554F\u984C",confusing:"\u7406\u89E3\u3057\u306B\u304F\u3044\u3001\u64CD\u4F5C\u304C\u308F\u304B\u308A\u306B\u304F\u3044",other:"\u305D\u306E\u4ED6\u306E\u554F\u984C"}},step2:{heading:"\u4F55\u304C\u8D77\u304D\u307E\u3057\u305F\u304B\uFF1F",intents:{bug:["\u30AF\u30E9\u30C3\u30B7\u30E5","\u7121\u53CD\u5FDC","\u30C7\u30FC\u30BF\u6D88\u5931","\u8AA4\u3063\u305F\u7D50\u679C","\u305D\u306E\u4ED6"],slow:["\u30DA\u30FC\u30B8\u8AAD\u8FBC","\u64CD\u4F5C\u53CD\u5FDC","API\u901A\u4FE1","\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3","\u305D\u306E\u4ED6"],visual:["\u30EC\u30A4\u30A2\u30A6\u30C8\u5D29\u308C","\u8981\u7D20\u306E\u91CD\u306A\u308A","\u8981\u7D20\u304C\u8868\u793A\u3055\u308C\u306A\u3044","\u8272/\u30D5\u30A9\u30F3\u30C8\u304C\u9055\u3046","\u305D\u306E\u4ED6"],confusing:["\u30E9\u30D9\u30EB\u304C\u4E0D\u660E\u77AD","\u30D8\u30EB\u30D7\u304C\u306A\u3044","\u4E88\u60F3\u5916\u306E\u30D5\u30ED\u30FC","\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u8FF7\u5B50","\u305D\u306E\u4ED6"],other:["\u6A5F\u80FD\u8981\u671B","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3","\u8AA4\u5B57\u8131\u5B57","\u305D\u306E\u4ED6"]}},step3:{heading:"\u8A73\u7D30\u3092\u6559\u3048\u3066\u304F\u3060\u3055\u3044",descriptionPlaceholder:"\u4F55\u304C\u8D77\u304D\u305F\u304B\u8AAC\u660E\u3057\u3066\u304F\u3060\u3055\u3044\u2026",screenshotButton:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6DFB\u4ED8",screenshotAttached:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u6DFB\u4ED8\u6E08\u307F \u2713",screenshotCapturing:"\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u64AE\u5F71\u4E2D\u2026",screenshotFailed:"\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F \u2014 \u6587\u5B57\u3067\u6559\u3048\u3066\u304F\u3060\u3055\u3044",screenshotPreviewAlt:"\u9001\u4FE1\u3055\u308C\u308B\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8\u306E\u30D7\u30EC\u30D3\u30E5\u30FC",screenshotSensitiveHint:"\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u78BA\u8A8D\u3057\u3001\u6B8B\u9AD8\u3084\u500B\u4EBA\u60C5\u5831\u306A\u3069\u304C\u5199\u3063\u3066\u3044\u308C\u3070\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\u3002",elementButton:"\u8981\u7D20\u3092\u9078\u629E",elementSelected:"\u8981\u7D20\u9078\u629E\u6E08\u307F \u2713",elementCapturing:"\u30DA\u30FC\u30B8\u4E0A\u306E\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF\u2026",elementSelectorHint:"\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF \xB7 Esc \u3067\u30AD\u30E3\u30F3\u30BB\u30EB",optional:"\uFF08\u4EFB\u610F\uFF09",tooShort:"\u3082\u3046\u5C11\u3057\u8A73\u3057\u304F\u6559\u3048\u3066\u304F\u3060\u3055\u3044",examplePrompts:["\u4FDD\u5B58\u30DC\u30BF\u30F3\u304C\u53CD\u5FDC\u3057\u306A\u3044","\u30DA\u30FC\u30B8\u304C10\u79D2\u56FA\u307E\u3063\u305F","\u30EC\u30A4\u30A2\u30A6\u30C8\u304C\u5D29\u308C\u3066\u3044\u308B"]},assistant:{defaultLabel:"\u8CEA\u554F",defaultGreeting:"\u3053\u306E\u30DA\u30FC\u30B8\u306B\u3064\u3044\u3066\u8CEA\u554F\u3057\u3066\u304F\u3060\u3055\u3044 \u2014 \u8868\u793A\u3055\u308C\u3066\u3044\u308B\u5185\u5BB9\u3060\u3051\u3092\u4F7F\u3044\u307E\u3059\u3002",inputPlaceholder:"\u8CEA\u554F\u3092\u5165\u529B\u2026",sendAriaLabel:"\u9001\u4FE1",hubDescription:"\u3053\u306E\u30A2\u30D7\u30EA\u306E\u4F7F\u3044\u65B9\u3092\u805E\u304F",thinking:"\u8003\u3048\u4E2D\u2026",errors:{noResponse:"\u5FDC\u7B54\u304C\u3042\u308A\u307E\u305B\u3093 \u2014 \u63A5\u7D9A\u3092\u78BA\u8A8D\u3057\u3066\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",generic:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u306B\u63A5\u7D9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3057\u3070\u3089\u304F\u3057\u3066\u304B\u3089\u518D\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}},flows:{eyebrows:{inbox:"Mushi \xB7 \u53D7\u4FE1\u7BB1",roadmap:"Mushi \xB7 \u30A2\u30A4\u30C7\u30A2",community:"Mushi \xB7 \u30B3\u30DF\u30E5\u30CB\u30C6\u30A3",identity:"Mushi \xB7 \u30A2\u30AB\u30A6\u30F3\u30C8",signIn:"Mushi \xB7 \u30B5\u30A4\u30F3\u30A4\u30F3",allApps:"Mushi \xB7 \u5168\u30A2\u30D7\u30EA",receipt:"Mushi \xB7 \u53D7\u4ED8",thread:"Mushi \xB7 \u53D7\u4FE1\u7BB1"},reports:{title:"\u3042\u306A\u305F\u306E\u30EC\u30DD\u30FC\u30C8",loading:"\u30EC\u30DD\u30FC\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u3053\u306E\u30D6\u30E9\u30A6\u30B6\u304B\u3089\u306E\u30EC\u30DD\u30FC\u30C8\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",leaderboardLink:"\u30E9\u30F3\u30AD\u30F3\u30B0"},roadmap:{title:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u30A2\u30A4\u30C7\u30A2",loading:"\u30A2\u30A4\u30C7\u30A2\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u30A2\u30A4\u30C7\u30A2\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u6700\u521D\u306E\u63D0\u6848\u3092\u3069\u3046\u305E\u3002",shipped:"\u30EA\u30EA\u30FC\u30B9\u6E08\u307F",vote:"\u6295\u7968",voted:"\u6295\u7968\u6E08\u307F",voteCount:"{n} \u7968",untitled:"\u7121\u984C\u306E\u30A2\u30A4\u30C7\u30A2"},leaderboard:{title:"\u30B0\u30ED\u30FC\u30D0\u30EB\u30E9\u30F3\u30AD\u30F3\u30B0",loading:"\u30E9\u30F3\u30AD\u30F3\u30B0\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u53C2\u52A0\u8005\u304C\u3044\u307E\u305B\u3093 \u2014 \u6700\u521D\u306E\u4E00\u4EBA\u306B\u306A\u308D\u3046\u3002",signInPrompt:"\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u9806\u4F4D\u3092\u898B\u308B \u2192",myRank:"\u4ECA\u6708\u306E\u9806\u4F4D\u306F #{rank}",footer:"\u4ECA\u6708\u306E\u30B0\u30ED\u30FC\u30D0\u30EB\u8CA2\u732E\u8005 \xB7 \u30DD\u30A4\u30F3\u30C8\u306F\u6BCE\u6708\u30EA\u30BB\u30C3\u30C8",anon:"\u533F\u540D"},account:{title:"Mushi \u30A2\u30AB\u30A6\u30F3\u30C8",checkEmailTitle:"\u30E1\u30FC\u30EB\u3092\u78BA\u8A8D",joinTitle:"\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306B\u53C2\u52A0",emailLabel:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",emailPlaceholder:"\u30E1\u30FC\u30EB",signInPrompt:"\u30B5\u30A4\u30F3\u30A4\u30F3\u3059\u308B\u3068\u5168\u30A2\u30D7\u30EA\u306E\u30EC\u30DD\u30FC\u30C8\u3068\u30E9\u30F3\u30AD\u30F3\u30B0\u304C\u898B\u3089\u308C\u307E\u3059\u3002\u30D1\u30B9\u30EF\u30FC\u30C9\u4E0D\u8981\u3002",magicLinkSent:"{email} \u306B\u30B5\u30A4\u30F3\u30A4\u30F3\u30EA\u30F3\u30AF\u3092\u9001\u308A\u307E\u3057\u305F\u3002\u30EA\u30F3\u30AF\u3092\u958B\u3044\u3066\u30EC\u30DD\u30FC\u30C8\u3092\u63A5\u7D9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",resendEmail:"\u30E1\u30FC\u30EB\u3092\u518D\u9001",sendLink:"\u30B5\u30A4\u30F3\u30A4\u30F3\u30EA\u30F3\u30AF\u3092\u9001\u308B",sending:"\u9001\u4FE1\u4E2D\u2026",crossAppReports:"\u5168\u30A2\u30D7\u30EA\u306E\u30EC\u30DD\u30FC\u30C8 \u2192",viewLeaderboard:"\u30B0\u30ED\u30FC\u30D0\u30EB\u30E9\u30F3\u30AD\u30F3\u30B0 \u2192",signOut:"\u30B5\u30A4\u30F3\u30A2\u30A6\u30C8",rankSummary:"\u9806\u4F4D #{rank} \xB7 \u4ECA\u6708 {points} pts"},crossApp:{title:"\u30DE\u30A4\u30EC\u30DD\u30FC\u30C8",loading:"\u30EC\u30DD\u30FC\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u307E\u3060\u30EC\u30DD\u30FC\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\u3002",unknownApp:"\u4E0D\u660E\u306A\u30A2\u30D7\u30EA"},thread:{title:"\u30EC\u30DD\u30FC\u30C8\u30B9\u30EC\u30C3\u30C9",loading:"\u30B9\u30EC\u30C3\u30C9\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D\u2026",empty:"\u958B\u767A\u8005\u304B\u3089\u306E\u8FD4\u4FE1\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",confirmFixed:"\u306F\u3044\u3001\u76F4\u308A\u307E\u3057\u305F",notFixed:"\u307E\u3060\u76F4\u3063\u3066\u3044\u307E\u305B\u3093",replyPlaceholder:"\u958B\u767A\u8005\u306B\u8FD4\u4FE1\u2026",send:"\u9001\u4FE1"},success:{trackReport:"\u3053\u306E\u30EC\u30DD\u30FC\u30C8\u3092\u8FFD\u8DE1 \u203A",receipt:"\u53D7\u4ED8",delivering:"\u30C1\u30FC\u30E0\u306B\u9001\u4FE1\u4E2D\u2026",queuedOffline:"\u30AA\u30D5\u30E9\u30A4\u30F3\u5F85\u6A5F\u4E2D",queuedHint:"\u30AA\u30F3\u30E9\u30A4\u30F3\u306B\u623B\u308A\u6B21\u7B2C\u9001\u4FE1\u3057\u307E\u3059\u3002",trackOnMushi:"Mushi\u3067\u8FFD\u8DE1",slaDefault:"\u30EC\u30DD\u30FC\u30C8\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002"},featureRequest:{label:"\u6A5F\u80FD\u30EA\u30AF\u30A8\u30B9\u30C8",description:"\u5909\u66F4\u3092\u63D0\u6848"},poweredBy:"Mushi v{version}"}};var ls={widget:{trigger:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",close:"\u0E1B\u0E34\u0E14",back:"\u0E01\u0E25\u0E31\u0E1A",submit:"\u0E2A\u0E48\u0E07",submitting:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u2026",submitted:"\u0E02\u0E2D\u0E1A\u0E04\u0E38\u0E13\u0E04\u0E23\u0E31\u0E1A/\u0E04\u0E48\u0E30! \u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E16\u0E39\u0E01\u0E2A\u0E48\u0E07\u0E41\u0E25\u0E49\u0E27",error:"\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 \u0E01\u0E23\u0E38\u0E13\u0E32\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07"},step1:{heading:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E44\u0E2B\u0E19?",reportSectionLabel:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32",moreNavLabel:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",moreNav:{yourReports:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",yourReportsDesc:"\u0E14\u0E39\u0E2A\u0E16\u0E32\u0E19\u0E30 \u0E04\u0E33\u0E15\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 \u0E41\u0E25\u0E30\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A",unreadNew:"\u0E43\u0E2B\u0E21\u0E48",communityIdeas:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E08\u0E32\u0E01\u0E0A\u0E38\u0E21\u0E0A\u0E19",communityIdeasDesc:"\u0E42\u0E2B\u0E27\u0E15\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C\u0E41\u0E25\u0E30\u0E14\u0E39\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E1B\u0E25\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27",leaderboard:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33",joinCommunity:"\u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E0A\u0E38\u0E21\u0E0A\u0E19 \xB7 \u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E49\u0E32\u0E21\u0E41\u0E2D\u0E1B",myAccount:"\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19"},categories:{bug:"\u0E1A\u0E31\u0E01",slow:"\u0E0A\u0E49\u0E32 / \u0E41\u0E25\u0E04",visual:"\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25\u0E1C\u0E34\u0E14\u0E1B\u0E01\u0E15\u0E34",confusing:"\u0E2A\u0E31\u0E1A\u0E2A\u0E19",other:"\u0E2D\u0E37\u0E48\u0E19\u0E46"},categoryDescriptions:{bug:"\u0E21\u0E35\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E2A\u0E35\u0E22\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E33\u0E07\u0E32\u0E19\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07",slow:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E1B\u0E23\u0E30\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E20\u0E32\u0E1E\u0E2B\u0E23\u0E37\u0E2D\u0E42\u0E2B\u0E25\u0E14\u0E0A\u0E49\u0E32",visual:"\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C \u0E2A\u0E44\u0E15\u0E25\u0E4C \u0E2B\u0E23\u0E37\u0E2D\u0E01\u0E32\u0E23\u0E41\u0E2A\u0E14\u0E07\u0E1C\u0E25",confusing:"\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E22\u0E32\u0E01\u0E2B\u0E23\u0E37\u0E2D\u0E19\u0E33\u0E17\u0E32\u0E07\u0E22\u0E32\u0E01",other:"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19"}},step2:{heading:"\u0E40\u0E01\u0E34\u0E14\u0E2D\u0E30\u0E44\u0E23\u0E02\u0E36\u0E49\u0E19?",intents:{bug:["\u0E41\u0E04\u0E23\u0E0A","\u0E44\u0E21\u0E48\u0E15\u0E2D\u0E1A\u0E2A\u0E19\u0E2D\u0E07","\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2B\u0E32\u0E22","\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E18\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"],slow:["\u0E42\u0E2B\u0E25\u0E14\u0E2B\u0E19\u0E49\u0E32","\u0E01\u0E32\u0E23\u0E42\u0E15\u0E49\u0E15\u0E2D\u0E1A","API","\u0E41\u0E2D\u0E19\u0E34\u0E40\u0E21\u0E0A\u0E31\u0E19","\u0E2D\u0E37\u0E48\u0E19\u0E46"],visual:["\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E40\u0E2A\u0E35\u0E22","\u0E0B\u0E49\u0E2D\u0E19\u0E17\u0E31\u0E1A","\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E2B\u0E32\u0E22","\u0E2A\u0E35/\u0E1F\u0E2D\u0E19\u0E15\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"],confusing:["\u0E1B\u0E49\u0E32\u0E22\u0E44\u0E21\u0E48\u0E0A\u0E31\u0E14","\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E41\u0E19\u0E30\u0E19\u0E33","\u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E44\u0E21\u0E48\u0E04\u0E32\u0E14\u0E04\u0E34\u0E14","\u0E2B\u0E25\u0E07\u0E17\u0E32\u0E07","\u0E2D\u0E37\u0E48\u0E19\u0E46"],other:["\u0E02\u0E2D\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C","\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07","\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E1C\u0E34\u0E14","\u0E2D\u0E37\u0E48\u0E19\u0E46"]}},step3:{heading:"\u0E1A\u0E2D\u0E01\u0E40\u0E23\u0E32\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",descriptionPlaceholder:"\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19\u2026",screenshotButton:"\u0E41\u0E19\u0E1A\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15",screenshotAttached:"\u0E41\u0E19\u0E1A\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u0E41\u0E25\u0E49\u0E27 \u2713",screenshotCapturing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E16\u0E48\u0E32\u0E22\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u2026",screenshotFailed:"\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E16\u0E48\u0E32\u0E22\u0E20\u0E32\u0E1E\u0E44\u0E14\u0E49 \u2014 \u0E42\u0E1B\u0E23\u0E14\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E41\u0E17\u0E19",screenshotPreviewAlt:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2A\u0E01\u0E23\u0E35\u0E19\u0E0A\u0E47\u0E2D\u0E15\u0E17\u0E35\u0E48\u0E08\u0E30\u0E16\u0E39\u0E01\u0E2A\u0E48\u0E07",screenshotSensitiveHint:"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E20\u0E32\u0E1E \u2014 \u0E2B\u0E32\u0E01\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E31\u0E27 (\u0E22\u0E2D\u0E14\u0E40\u0E07\u0E34\u0E19 \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E48\u0E27\u0E19\u0E1A\u0E38\u0E04\u0E04\u0E25) \u0E42\u0E1B\u0E23\u0E14\u0E25\u0E1A\u0E2D\u0E2D\u0E01",elementButton:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A",elementSelected:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E41\u0E25\u0E49\u0E27 \u2713",elementCapturing:"\u0E04\u0E25\u0E34\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E1A\u0E19\u0E2B\u0E19\u0E49\u0E32\u2026",elementSelectorHint:"\u0E04\u0E25\u0E34\u0E01\u0E2D\u0E07\u0E04\u0E4C\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E43\u0E14\u0E01\u0E47\u0E44\u0E14\u0E49 \xB7 Esc \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",optional:"(\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)",tooShort:"\u0E01\u0E23\u0E38\u0E13\u0E32\u0E43\u0E2B\u0E49\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21",examplePrompts:["\u0E1B\u0E38\u0E48\u0E21\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E44\u0E21\u0E48\u0E17\u0E33\u0E07\u0E32\u0E19","\u0E2B\u0E19\u0E49\u0E32\u0E04\u0E49\u0E32\u0E07\u0E19\u0E32\u0E19 10 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35","\u0E40\u0E25\u0E22\u0E4C\u0E40\u0E2D\u0E32\u0E15\u0E4C\u0E1E\u0E31\u0E07"]},assistant:{defaultLabel:"\u0E16\u0E32\u0E21",defaultGreeting:"\u0E16\u0E32\u0E21\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49 \u2014 \u0E43\u0E0A\u0E49\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E40\u0E2B\u0E47\u0E19\u0E1A\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E2D",inputPlaceholder:"\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E04\u0E33\u0E16\u0E32\u0E21\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u2026",sendAriaLabel:"\u0E2A\u0E48\u0E07",hubDescription:"\u0E02\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E0A\u0E48\u0E27\u0E22\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E41\u0E2D\u0E1B",thinking:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E34\u0E14\u2026",errors:{noResponse:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23\u0E15\u0E2D\u0E1A\u0E01\u0E25\u0E31\u0E1A \u2014 \u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E41\u0E25\u0E49\u0E27\u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",generic:"\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E1C\u0E39\u0E49\u0E0A\u0E48\u0E27\u0E22\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E25\u0E2D\u0E07\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E43\u0E19\u0E2D\u0E35\u0E01\u0E2A\u0E31\u0E01\u0E04\u0E23\u0E39\u0E48"}},flows:{eyebrows:{inbox:"Mushi \xB7 \u0E01\u0E25\u0E48\u0E2D\u0E07\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32",roadmap:"Mushi \xB7 \u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22",community:"Mushi \xB7 \u0E0A\u0E38\u0E21\u0E0A\u0E19",identity:"Mushi \xB7 \u0E1A\u0E31\u0E0D\u0E0A\u0E35",signIn:"Mushi \xB7 \u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",allApps:"Mushi \xB7 \u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B",receipt:"Mushi \xB7 \u0E43\u0E1A\u0E23\u0E31\u0E1A",thread:"Mushi \xB7 \u0E01\u0E25\u0E48\u0E2D\u0E07\u0E02\u0E32\u0E40\u0E02\u0E49\u0E32"},reports:{title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E08\u0E32\u0E01\u0E40\u0E1A\u0E23\u0E32\u0E27\u0E4C\u0E40\u0E0B\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49",leaderboardLink:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33"},roadmap:{title:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E08\u0E32\u0E01\u0E0A\u0E38\u0E21\u0E0A\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22 \u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E41\u0E23\u0E01\u0E17\u0E35\u0E48\u0E40\u0E2A\u0E19\u0E2D\u0E44\u0E14\u0E49",shipped:"\u0E1B\u0E25\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27",vote:"\u0E42\u0E2B\u0E27\u0E15",voted:"\u0E42\u0E2B\u0E27\u0E15\u0E41\u0E25\u0E49\u0E27",voteCount:"{n} \u0E42\u0E2B\u0E27\u0E15",untitled:"\u0E44\u0E2D\u0E40\u0E14\u0E35\u0E22\u0E44\u0E21\u0E48\u0E21\u0E35\u0E0A\u0E37\u0E48\u0E2D"},leaderboard:{title:"\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 \u2014 \u0E21\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E41\u0E23\u0E01",signInPrompt:"\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u2192",myRank:"\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13\u0E04\u0E37\u0E2D #{rank} \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49",footer:"\u0E1C\u0E39\u0E49\u0E23\u0E48\u0E27\u0E21\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49 \xB7 \u0E04\u0E30\u0E41\u0E19\u0E19\u0E23\u0E35\u0E40\u0E0B\u0E47\u0E15\u0E17\u0E38\u0E01\u0E40\u0E14\u0E37\u0E2D\u0E19",anon:"\u0E44\u0E21\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E37\u0E48\u0E2D"},account:{title:"\u0E1A\u0E31\u0E0D\u0E0A\u0E35 Mushi",checkEmailTitle:"\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E2D\u0E35\u0E40\u0E21\u0E25",joinTitle:"\u0E40\u0E02\u0E49\u0E32\u0E23\u0E48\u0E27\u0E21\u0E0A\u0E38\u0E21\u0E0A\u0E19",emailLabel:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",emailPlaceholder:"\u0E2D\u0E35\u0E40\u0E21\u0E25",signInPrompt:"\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B\u0E41\u0E25\u0E30\u0E44\u0E15\u0E48\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A \u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19",magicLinkSent:"\u0E40\u0E23\u0E32\u0E2A\u0E48\u0E07\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A\u0E44\u0E1B\u0E17\u0E35\u0E48 {email} \u0E41\u0E25\u0E49\u0E27 \u0E04\u0E25\u0E34\u0E01\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13",resendEmail:"\u0E2A\u0E48\u0E07\u0E2D\u0E35\u0E40\u0E21\u0E25\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07",sendLink:"\u0E2A\u0E48\u0E07\u0E25\u0E34\u0E07\u0E01\u0E4C\u0E40\u0E02\u0E49\u0E32\u0E2A\u0E39\u0E48\u0E23\u0E30\u0E1A\u0E1A",sending:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u2026",crossAppReports:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19\u0E17\u0E38\u0E01\u0E41\u0E2D\u0E1B \u2192",viewLeaderboard:"\u0E14\u0E39\u0E01\u0E23\u0E30\u0E14\u0E32\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33\u0E17\u0E31\u0E48\u0E27\u0E42\u0E25\u0E01 \u2192",signOut:"\u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E23\u0E30\u0E1A\u0E1A",rankSummary:"\u0E2D\u0E31\u0E19\u0E14\u0E31\u0E1A #{rank} \xB7 {points} pts \u0E40\u0E14\u0E37\u0E2D\u0E19\u0E19\u0E35\u0E49"},crossApp:{title:"\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E09\u0E31\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",unknownApp:"\u0E41\u0E2D\u0E1B\u0E44\u0E21\u0E48\u0E17\u0E23\u0E32\u0E1A\u0E0A\u0E37\u0E48\u0E2D"},thread:{title:"\u0E40\u0E18\u0E23\u0E14\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",loading:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E40\u0E18\u0E23\u0E14\u2026",empty:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E33\u0E15\u0E2D\u0E1A\u0E08\u0E32\u0E01\u0E17\u0E35\u0E21\u0E1E\u0E31\u0E12\u0E19\u0E32",confirmFixed:"\u0E43\u0E0A\u0E48 \u0E41\u0E01\u0E49\u0E41\u0E25\u0E49\u0E27",notFixed:"\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E41\u0E01\u0E49",replyPlaceholder:"\u0E15\u0E2D\u0E1A\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u2026",send:"\u0E2A\u0E48\u0E07"},success:{trackReport:"\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E19\u0E35\u0E49 \u203A",receipt:"\u0E43\u0E1A\u0E23\u0E31\u0E1A",delivering:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2A\u0E48\u0E07\u0E44\u0E1B\u0E22\u0E31\u0E07\u0E17\u0E35\u0E21\u2026",queuedOffline:"\u0E04\u0E34\u0E27\u0E2D\u0E2D\u0E1F\u0E44\u0E25\u0E19\u0E4C",queuedHint:"\u0E08\u0E30\u0E2A\u0E48\u0E07\u0E17\u0E31\u0E19\u0E17\u0E35\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E2D\u0E2D\u0E19\u0E44\u0E25\u0E19\u0E4C",trackOnMushi:"\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E1A\u0E19 Mushi",slaDefault:"\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13"},featureRequest:{label:"\u0E02\u0E2D\u0E1F\u0E35\u0E40\u0E08\u0E2D\u0E23\u0E4C",description:"\u0E40\u0E2A\u0E19\u0E2D\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07"},poweredBy:"Powered by Mushi v{version}"}};var cs={widget:{trigger:"Reportar problema",title:"Reportar un problema",close:"Cerrar",back:"Volver",submit:"Enviar",submitting:"Enviando\u2026",submitted:"\xA1Gracias! Tu reporte ha sido enviado.",error:"No se pudo enviar tu reporte. Revisa tu conexi\xF3n e int\xE9ntalo de nuevo."},step1:{heading:"\xBFQu\xE9 tipo de problema?",reportSectionLabel:"Reportar un problema",moreNavLabel:"M\xE1s",moreNav:{yourReports:"Tus reportes",yourReportsDesc:"Ver estado, respuestas del desarrollador y responder",unreadNew:"nuevos",communityIdeas:"Ideas de la comunidad",communityIdeasDesc:"Vota funciones y mira qu\xE9 se lanz\xF3",leaderboard:"Clasificaci\xF3n",joinCommunity:"Unirse a la comunidad \xB7 Rastrea reportes entre apps",myAccount:"Mi cuenta"},categories:{bug:"Error",slow:"Lento",visual:"Problema visual",confusing:"Confuso",other:"Otro"},categoryDescriptions:{bug:"Algo est\xE1 roto o no funciona",slow:"Problema de rendimiento o carga lenta",visual:"Problema de dise\xF1o, estilo o visualizaci\xF3n",confusing:"Dif\xEDcil de entender o navegar",other:"Otro problema"}},step2:{heading:"\xBFQu\xE9 pas\xF3?",intents:{bug:["Cierre inesperado","Sin respuesta","P\xE9rdida de datos","Resultado incorrecto","Otro"],slow:["Carga de p\xE1gina","Interacci\xF3n","Llamada API","Animaci\xF3n","Otro"],visual:["Layout roto","Superposici\xF3n","Elemento faltante","Color/fuente incorrecta","Otro"],confusing:["Etiqueta confusa","Sin ayuda","Flujo inesperado","Navegaci\xF3n perdida","Otro"],other:["Solicitud de funci\xF3n","Accesibilidad","Error tipogr\xE1fico","Otro"]}},step3:{heading:"Cu\xE9ntanos m\xE1s",descriptionPlaceholder:"Describe lo que pas\xF3\u2026",screenshotButton:"Adjuntar captura",screenshotAttached:"Captura adjunta \u2713",screenshotCapturing:"Tomando captura\u2026",screenshotFailed:"No se pudo capturar \u2014 descr\xEDbelo en su lugar",screenshotPreviewAlt:"Vista previa de la captura que se enviar\xE1",screenshotSensitiveHint:"Revisa la vista previa \u2014 qu\xEDtala si se ve informaci\xF3n privada (saldos, datos personales).",elementButton:"Seleccionar elemento",elementSelected:"Elemento seleccionado \u2713",elementCapturing:"Haz clic en cualquier elemento\u2026",elementSelectorHint:"Clic en cualquier elemento \xB7 Esc para cancelar",optional:"(opcional)",tooShort:"Un poco m\xE1s de detalle nos ayuda a resolverlo",examplePrompts:["El bot\xF3n guardar no responde","La p\xE1gina se congel\xF3 10 segundos","El dise\xF1o se ve roto aqu\xED"]},assistant:{defaultLabel:"Preguntar",defaultGreeting:"Pregunta sobre esta p\xE1gina \u2014 solo uso lo que ves aqu\xED.",inputPlaceholder:"Escribe tu pregunta\u2026",sendAriaLabel:"Enviar",hubDescription:"Obt\xE9n ayuda para usar esta app",thinking:"Pensando\u2026",errors:{noResponse:"Sin respuesta \u2014 revisa tu conexi\xF3n e int\xE9ntalo de nuevo.",generic:"No se pudo contactar al asistente. Int\xE9ntalo en un momento."}},flows:{eyebrows:{inbox:"Mushi \xB7 Bandeja",roadmap:"Mushi \xB7 Ideas",community:"Mushi \xB7 Comunidad",identity:"Mushi \xB7 Cuenta",signIn:"Mushi \xB7 Acceso",allApps:"Mushi \xB7 Todas las apps",receipt:"Mushi \xB7 Recibo",thread:"Mushi \xB7 Bandeja"},reports:{title:"Tus reportes",loading:"Cargando reportes\u2026",empty:"A\xFAn no hay reportes en este navegador.",leaderboardLink:"Clasificaci\xF3n"},roadmap:{title:"Ideas de la comunidad",loading:"Cargando ideas\u2026",empty:"A\xFAn no hay ideas. S\xE9 el primero en sugerir una.",shipped:"Publicado",vote:"Votar",voted:"Votado",voteCount:"{n} votos",untitled:"Idea sin t\xEDtulo"},leaderboard:{title:"Clasificaci\xF3n global",loading:"Cargando clasificaci\xF3n\u2026",empty:"A\xFAn no hay colaboradores \u2014 s\xE9 el primero.",signInPrompt:"Inicia sesi\xF3n para ver tu puesto \u2192",myRank:"Est\xE1s en el puesto #{rank} este mes",footer:"Colaboradores globales este mes \xB7 Los puntos se reinician mensualmente",anon:"An\xF3nimo"},account:{title:"Cuenta Mushi",checkEmailTitle:"Revisa tu correo",joinTitle:"\xDAnete a la comunidad",emailLabel:"Correo electr\xF3nico",emailPlaceholder:"Correo",signInPrompt:"Inicia sesi\xF3n para ver tus reportes en todas las apps y subir en la clasificaci\xF3n. Sin contrase\xF1a.",magicLinkSent:"Enviamos un enlace de acceso a {email}. \xC1brelo para conectar tus reportes.",resendEmail:"Reenviar correo",sendLink:"Enviar enlace de acceso",sending:"Enviando\u2026",crossAppReports:"Mis reportes en todas las apps \u2192",viewLeaderboard:"Ver clasificaci\xF3n global \u2192",signOut:"Cerrar sesi\xF3n",rankSummary:"Puesto #{rank} \xB7 {points} pts este mes"},crossApp:{title:"Mis reportes",loading:"Cargando tus reportes\u2026",empty:"A\xFAn no has enviado reportes.",unknownApp:"App desconocida"},thread:{title:"Hilo del reporte",loading:"Cargando hilo\u2026",empty:"A\xFAn no hay respuestas del equipo.",confirmFixed:"S\xED, qued\xF3 resuelto",notFixed:"A\xFAn no est\xE1 resuelto",replyPlaceholder:"Responder al desarrollador\u2026",send:"Enviar"},success:{trackReport:"Seguir este reporte \u203A",receipt:"Recibo",delivering:"Enviando al equipo\u2026",queuedOffline:"En cola sin conexi\xF3n",queuedHint:"Lo enviaremos en cuanto vuelvas a estar en l\xEDnea.",trackOnMushi:"Seguir en Mushi",slaDefault:"Revisaremos tu reporte."},featureRequest:{label:"Solicitud de funci\xF3n",description:"Sugerir un cambio"},poweredBy:"Con tecnolog\xEDa de Mushi v{version}"}};var Ii={en:Dt,ja:as,th:ls,es:cs};function gr(t){let e=t&&t!=="auto"?t:typeof navigator<"u"?navigator.language??navigator.languages?.[0]:void 0;if(!e)return Dt;let r=e.split("-")[0].toLowerCase();return Ii[r]??Dt}function us(t,e="",r=""){let n=t==="dark",s=n?"dark":"light",o=mr(s),l=Xn(s,e,r),i=Gn[s];return {isDark:n,paper:o.paper,paperRaised:o.paperRaised,ink:o.ink,inkMuted:o.inkMuted,inkFaint:o.inkFaint,inkDim:o.inkDim,rule:o.rule,ruleStrong:o.ruleStrong,widgetAccent:l.accent,widgetAccentWash:l.accentWash,widgetAccentInk:l.accentInk,widgetAccentShadow:n?pr.dark:pr.light,ok:o.ok,danger:o.danger,onAccent:Wn,inverse:Vn,neonBannerBg:_t.bg,neonBannerFg:_t.fg,neonBannerBorder:_t.border,brandBannerBorder:n?hr.dark:hr.light,statusSent:i.sent,statusReview:i.review,statusFixing:i.fixing,statusFixed:i.fixed,statusClosedBg:n?"rgba(242,235,221,0.06)":"rgba(14,13,11,0.05)",fontDisplay:Ze.fontDisplay,fontBody:Ze.fontBody,fontMono:Ze.fontMono,easeStamp:Pt.easeStamp,zBanner:Qe.banner,zPanel:Qe.panel,zOverlay:Qe.overlay,fabSize:et.fabSize,panelWidth:et.panelWidth,panelSheetBreakpoint:et.panelSheetBreakpoint}}function ds(t,e="",r=""){let n=us(t,e,r),{isDark:s,paper:o,paperRaised:l,ink:i,inkMuted:a,inkFaint:m,inkDim:p,rule:g,ruleStrong:u,widgetAccent:c,widgetAccentWash:h,widgetAccentInk:y,widgetAccentShadow:v,ok:I,danger:R,onAccent:k,inverse:M,neonBannerBg:S,neonBannerFg:E,neonBannerBorder:O,brandBannerBorder:w,statusSent:B,statusReview:H,statusFixing:F,statusFixed:te,statusClosedBg:Z,fontDisplay:J,fontBody:q,fontMono:P,easeStamp:$,zBanner:Se,fabSize:me}=n,{sizeBody:T,lineBody:L}=Ze,{durationFast:_}=Pt,{bannerHeight:N,gutter:C,panelWidth:le,panelMaxHeight:ce,panelSheetBreakpoint:G,edgeTabWidth:ie}=et,X=me+12,{base:ae}=Qe,Te=Yn.control;return `
2
2
  :host {
3
3
  all: initial;
4
- font-family: ${R};
5
- font-size: 14px;
6
- line-height: 1.55;
7
- color: ${l};
4
+ font-family: ${q};
5
+ font-size: ${T}px;
6
+ line-height: ${L};
7
+ color: ${i};
8
8
  -webkit-font-smoothing: antialiased;
9
9
  -moz-osx-font-smoothing: grayscale;
10
10
  font-feature-settings: 'ss01', 'cv11'; /* nicer system-ui glyphs where supported */
11
- --mushi-ok: ${n?"#4ade80":"#16a34a"};
11
+ --mushi-ok: ${I};
12
12
  /* SDK contract: the host element is always pass-through. Only the
13
13
  interactive surfaces (.mushi-trigger, .mushi-banner, .mushi-panel)
14
14
  opt back into pointer events so the widget never creates an
@@ -26,24 +26,24 @@
26
26
 
27
27
  .mushi-trigger {
28
28
  position: fixed;
29
- width: 52px;
30
- height: 52px;
31
- border: 1px solid ${m};
32
- border-radius: 4px;
29
+ width: ${me}px;
30
+ height: ${me}px;
31
+ border: 1px solid ${u};
32
+ border-radius: ${Te}px;
33
33
  background: ${o};
34
- color: ${l};
34
+ color: ${i};
35
35
  cursor: pointer;
36
36
  display: flex;
37
37
  align-items: center;
38
38
  justify-content: center;
39
- font-family: ${$};
39
+ font-family: ${J};
40
40
  font-size: 22px;
41
41
  line-height: 1;
42
42
  box-shadow:
43
- 0 1px 0 ${d},
43
+ 0 1px 0 ${g},
44
44
  0 6px 14px -8px rgba(14,13,11,0.35),
45
45
  inset 0 -3px 0 ${c};
46
- transition: transform 200ms ${y}, box-shadow 200ms ${y};
46
+ transition: transform ${_}ms ${$}, box-shadow ${_}ms ${$};
47
47
  overflow: visible;
48
48
  isolation: isolate;
49
49
  }
@@ -57,19 +57,19 @@
57
57
  border-radius: 50%;
58
58
  background: ${c};
59
59
  box-shadow: 0 0 0 0 ${c};
60
- animation: mushi-pulse 2.4s ${y} infinite;
60
+ animation: mushi-pulse 2.4s ${$} infinite;
61
61
  }
62
62
  .mushi-trigger:hover {
63
63
  transform: translateY(-2px) rotate(-1.5deg);
64
64
  box-shadow:
65
- 0 1px 0 ${d},
65
+ 0 1px 0 ${g},
66
66
  0 14px 24px -10px rgba(14,13,11,0.45),
67
67
  inset 0 -3px 0 ${c};
68
68
  }
69
69
  .mushi-trigger:active {
70
70
  transform: translateY(0) rotate(0);
71
71
  box-shadow:
72
- 0 1px 0 ${d},
72
+ 0 1px 0 ${g},
73
73
  0 2px 4px -2px rgba(14,13,11,0.35),
74
74
  inset 0 -2px 0 ${c};
75
75
  }
@@ -82,41 +82,41 @@
82
82
  can compose with the hover transform without fighting it. Respects
83
83
  prefers-reduced-motion. */
84
84
  @keyframes mushi-trigger-pulse {
85
- 0% { box-shadow: 0 0 0 0 rgba(212, 67, 50, 0.55), 0 1px 0 ${d}, 0 10px 24px -14px rgba(14,13,11,0.45); }
86
- 70% { box-shadow: 0 0 0 16px rgba(212, 67, 50, 0), 0 1px 0 ${d}, 0 10px 24px -14px rgba(14,13,11,0.45); }
87
- 100% { box-shadow: 0 0 0 0 rgba(212, 67, 50, 0), 0 1px 0 ${d}, 0 10px 24px -14px rgba(14,13,11,0.45); }
85
+ 0% { box-shadow: 0 0 0 0 rgba(212, 67, 50, 0.55), 0 1px 0 ${g}, 0 10px 24px -14px rgba(14,13,11,0.45); }
86
+ 70% { box-shadow: 0 0 0 16px rgba(212, 67, 50, 0), 0 1px 0 ${g}, 0 10px 24px -14px rgba(14,13,11,0.45); }
87
+ 100% { box-shadow: 0 0 0 0 rgba(212, 67, 50, 0), 0 1px 0 ${g}, 0 10px 24px -14px rgba(14,13,11,0.45); }
88
88
  }
89
89
  .mushi-trigger-pulse {
90
- animation: mushi-trigger-pulse 800ms ${y} 3;
90
+ animation: mushi-trigger-pulse 800ms ${$} 3;
91
91
  }
92
92
  @media (prefers-reduced-motion: reduce) {
93
93
  .mushi-trigger-pulse { animation: none; }
94
94
  }
95
95
  .mushi-trigger.bottom-right {
96
- bottom: var(--mushi-bottom, calc(24px + env(safe-area-inset-bottom, 0px)));
97
- right: var(--mushi-right, calc(24px + env(safe-area-inset-right, 0px)));
96
+ bottom: var(--mushi-bottom, calc(${C}px + env(safe-area-inset-bottom, 0px)));
97
+ right: var(--mushi-right, calc(${C}px + env(safe-area-inset-right, 0px)));
98
98
  }
99
99
  .mushi-trigger.bottom-left {
100
- bottom: var(--mushi-bottom, calc(24px + env(safe-area-inset-bottom, 0px)));
101
- left: var(--mushi-left, calc(24px + env(safe-area-inset-left, 0px)));
100
+ bottom: var(--mushi-bottom, calc(${C}px + env(safe-area-inset-bottom, 0px)));
101
+ left: var(--mushi-left, calc(${C}px + env(safe-area-inset-left, 0px)));
102
102
  }
103
103
  .mushi-trigger.top-right {
104
- top: var(--mushi-top, calc(24px + env(safe-area-inset-top, 0px)));
105
- right: var(--mushi-right, calc(24px + env(safe-area-inset-right, 0px)));
104
+ top: var(--mushi-top, calc(${C}px + env(safe-area-inset-top, 0px)));
105
+ right: var(--mushi-right, calc(${C}px + env(safe-area-inset-right, 0px)));
106
106
  }
107
107
  .mushi-trigger.top-left {
108
- top: var(--mushi-top, calc(24px + env(safe-area-inset-top, 0px)));
109
- left: var(--mushi-left, calc(24px + env(safe-area-inset-left, 0px)));
108
+ top: var(--mushi-top, calc(${C}px + env(safe-area-inset-top, 0px)));
109
+ left: var(--mushi-left, calc(${C}px + env(safe-area-inset-left, 0px)));
110
110
  }
111
111
  .mushi-trigger.edge-tab {
112
- width: 32px;
112
+ width: ${ie}px;
113
113
  height: 88px;
114
114
  border-radius: 4px 0 0 4px;
115
115
  writing-mode: vertical-rl;
116
116
  text-orientation: upright;
117
117
  font-size: 16px;
118
118
  box-shadow:
119
- 0 1px 0 ${d},
119
+ 0 1px 0 ${g},
120
120
  0 10px 24px -14px rgba(14,13,11,0.45),
121
121
  inset -3px 0 0 ${c};
122
122
  }
@@ -129,13 +129,13 @@
129
129
  left: var(--mushi-left, 0);
130
130
  border-radius: 0 4px 4px 0;
131
131
  box-shadow:
132
- 0 1px 0 ${d},
132
+ 0 1px 0 ${g},
133
133
  0 10px 24px -14px rgba(14,13,11,0.45),
134
134
  inset 3px 0 0 ${c};
135
135
  }
136
136
  .mushi-trigger.shrunk {
137
- width: 36px;
138
- height: 36px;
137
+ width: ${N}px;
138
+ height: ${N}px;
139
139
  opacity: 0.82;
140
140
  transform: scale(0.92);
141
141
  }
@@ -155,10 +155,10 @@
155
155
  }
156
156
  .mushi-trigger.dragging {
157
157
  cursor: grabbing !important;
158
- z-index: calc(var(--z, 99999) + 2);
158
+ z-index: calc(var(--z, ${ae}) + 2);
159
159
  transition: none !important;
160
160
  box-shadow:
161
- 0 1px 0 ${d},
161
+ 0 1px 0 ${g},
162
162
  0 20px 40px -12px rgba(14,13,11,0.55),
163
163
  inset 0 -3px 0 ${c};
164
164
  opacity: 0.92;
@@ -175,14 +175,14 @@
175
175
 
176
176
  .mushi-panel {
177
177
  position: fixed;
178
- width: 360px;
179
- max-width: calc(100vw - 32px);
180
- max-height: min(480px, calc(100dvh - 120px - var(--mushi-keyboard-inset, 0px)));
178
+ width: ${le}px;
179
+ max-width: calc(100vw - ${Kn.wide}px);
180
+ max-height: min(${ce}px, calc(100dvh - 120px - var(--mushi-keyboard-inset, 0px)));
181
181
  background: ${o};
182
- border: 1px solid ${m};
182
+ border: 1px solid ${u};
183
183
  border-radius: 6px;
184
184
  box-shadow:
185
- 0 1px 0 ${d},
185
+ 0 1px 0 ${g},
186
186
  0 24px 56px -20px rgba(14,13,11,0.30),
187
187
  0 8px 16px -8px rgba(14,13,11,0.20);
188
188
  overflow: hidden;
@@ -196,7 +196,7 @@
196
196
  bottom: calc(var(--mushi-keyboard-inset, 0px) + 8px) !important;
197
197
  }
198
198
  /* On narrow mobile, fill the width as a bottom sheet */
199
- @media (max-width: 480px) {
199
+ @media (max-width: ${G}px) {
200
200
  .mushi-panel {
201
201
  left: 0 !important;
202
202
  right: 0 !important;
@@ -210,41 +210,41 @@
210
210
  bottom: calc(var(--mushi-keyboard-inset, 0px) + 4px) !important;
211
211
  }
212
212
  }
213
- .mushi-panel.open { animation: mushi-stamp-in 320ms ${y} both; }
213
+ .mushi-panel.open { animation: mushi-stamp-in 320ms ${$} both; }
214
214
  .mushi-panel.closed { display: none; }
215
215
  .mushi-panel.bottom-right {
216
- bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, 24px) + 64px));
217
- right: var(--mushi-right, calc(24px + env(safe-area-inset-right, 0px)));
216
+ bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, ${C}px) + ${X}px));
217
+ right: var(--mushi-right, calc(${C}px + env(safe-area-inset-right, 0px)));
218
218
  --mushi-origin: bottom right;
219
219
  }
220
220
  .mushi-panel.bottom-left {
221
- bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, 24px) + 64px));
222
- left: var(--mushi-left, calc(24px + env(safe-area-inset-left, 0px)));
221
+ bottom: var(--mushi-panel-bottom, calc(var(--mushi-bottom, ${C}px) + ${X}px));
222
+ left: var(--mushi-left, calc(${C}px + env(safe-area-inset-left, 0px)));
223
223
  --mushi-origin: bottom left;
224
224
  }
225
225
  .mushi-panel.top-right {
226
- top: var(--mushi-panel-top, calc(var(--mushi-top, 24px) + 64px));
227
- right: var(--mushi-right, calc(24px + env(safe-area-inset-right, 0px)));
226
+ top: var(--mushi-panel-top, calc(var(--mushi-top, ${C}px) + ${X}px));
227
+ right: var(--mushi-right, calc(${C}px + env(safe-area-inset-right, 0px)));
228
228
  --mushi-origin: top right;
229
229
  }
230
230
  .mushi-panel.top-left {
231
- top: var(--mushi-panel-top, calc(var(--mushi-top, 24px) + 64px));
232
- left: var(--mushi-left, calc(24px + env(safe-area-inset-left, 0px)));
231
+ top: var(--mushi-panel-top, calc(var(--mushi-top, ${C}px) + ${X}px));
232
+ left: var(--mushi-left, calc(${C}px + env(safe-area-inset-left, 0px)));
233
233
  --mushi-origin: top left;
234
234
  }
235
235
  .mushi-outdated {
236
236
  margin: 12px 14px 0;
237
237
  padding: 10px 12px;
238
- border: 1px solid ${f};
239
- background: ${f};
240
- color: ${S};
241
- font-family: ${R};
238
+ border: 1px solid ${h};
239
+ background: ${h};
240
+ color: ${y};
241
+ font-family: ${q};
242
242
  font-size: 12px;
243
243
  line-height: 1.4;
244
244
  }
245
245
  .mushi-outdated strong {
246
246
  display: block;
247
- font-family: ${E};
247
+ font-family: ${P};
248
248
  font-size: 10px;
249
249
  letter-spacing: 0.12em;
250
250
  text-transform: uppercase;
@@ -253,7 +253,7 @@
253
253
  .mushi-outdated span {
254
254
  display: block;
255
255
  margin-top: 3px;
256
- color: ${g};
256
+ color: ${a};
257
257
  }
258
258
 
259
259
  @keyframes mushi-stamp-in {
@@ -264,7 +264,7 @@
264
264
 
265
265
  .mushi-header {
266
266
  padding: 13px 18px 10px;
267
- border-bottom: 1px solid ${d};
267
+ border-bottom: 1px solid ${g};
268
268
  display: grid;
269
269
  grid-template-columns: auto 1fr auto;
270
270
  align-items: end;
@@ -278,8 +278,8 @@
278
278
  height: 22px;
279
279
  border-radius: 3px;
280
280
  background: ${c};
281
- color: #FAF7F0;
282
- font-family: ${$};
281
+ color: ${k};
282
+ font-family: ${J};
283
283
  font-size: 14px;
284
284
  font-weight: 600;
285
285
  line-height: 1;
@@ -294,19 +294,19 @@
294
294
  gap: 2px;
295
295
  }
296
296
  .mushi-header-eyebrow {
297
- font-family: ${E};
297
+ font-family: ${P};
298
298
  font-size: 10px;
299
299
  letter-spacing: 0.18em;
300
300
  text-transform: uppercase;
301
- color: ${g};
301
+ color: ${a};
302
302
  }
303
303
  .mushi-header h3 {
304
- font-family: ${$};
304
+ font-family: ${J};
305
305
  font-size: 19px;
306
306
  font-weight: 500;
307
307
  line-height: 1.15;
308
308
  letter-spacing: -0.01em;
309
- color: ${l};
309
+ color: ${i};
310
310
  }
311
311
  .mushi-header-meta {
312
312
  align-self: start;
@@ -315,28 +315,28 @@
315
315
  gap: 6px;
316
316
  }
317
317
  .mushi-step-counter {
318
- font-family: ${E};
318
+ font-family: ${P};
319
319
  font-size: 11px;
320
- color: ${g};
320
+ color: ${a};
321
321
  letter-spacing: 0.06em;
322
322
  tab-size: 2ch;
323
323
  padding-top: 2px;
324
324
  }
325
325
  .mushi-step-counter b {
326
326
  font-weight: 600;
327
- color: ${l};
327
+ color: ${i};
328
328
  }
329
329
  .mushi-close {
330
330
  background: none;
331
331
  border: none;
332
332
  cursor: pointer;
333
333
  padding: 2px 4px;
334
- color: ${g};
335
- font-family: ${R};
334
+ color: ${a};
335
+ font-family: ${q};
336
336
  font-size: 16px;
337
337
  line-height: 1;
338
338
  border-radius: 0;
339
- transition: color 150ms ${y};
339
+ transition: color 150ms ${$};
340
340
  }
341
341
  .mushi-back {
342
342
  align-self: flex-start;
@@ -346,8 +346,8 @@
346
346
  padding: 3px 0;
347
347
  margin: 0 0 2px;
348
348
  min-height: 22px;
349
- color: ${g};
350
- font-family: ${E};
349
+ color: ${a};
350
+ font-family: ${P};
351
351
  font-size: 11px;
352
352
  font-weight: 500;
353
353
  letter-spacing: 0.06em;
@@ -357,11 +357,11 @@
357
357
  display: inline-flex;
358
358
  align-items: center;
359
359
  gap: 4px;
360
- transition: color 150ms ${y};
360
+ transition: color 150ms ${$};
361
361
  white-space: nowrap;
362
362
  }
363
363
  .mushi-close:hover { color: ${c}; }
364
- .mushi-back:hover { color: ${l}; }
364
+ .mushi-back:hover { color: ${i}; }
365
365
  .mushi-close:focus-visible {
366
366
  outline: 1.5px solid ${c};
367
367
  outline-offset: 2px;
@@ -382,10 +382,10 @@
382
382
  overflow-y: auto;
383
383
  flex: 1;
384
384
  scrollbar-width: thin;
385
- scrollbar-color: ${p} transparent;
385
+ scrollbar-color: ${m} transparent;
386
386
  }
387
387
  .mushi-body::-webkit-scrollbar { width: 6px; }
388
- .mushi-body::-webkit-scrollbar-thumb { background: ${p}; border-radius: 3px; }
388
+ .mushi-body::-webkit-scrollbar-thumb { background: ${m}; border-radius: 3px; }
389
389
 
390
390
  .mushi-option-btn {
391
391
  display: grid;
@@ -395,12 +395,12 @@
395
395
  width: 100%;
396
396
  padding: 11px 0;
397
397
  border: none;
398
- border-bottom: 1px solid ${d};
398
+ border-bottom: 1px solid ${g};
399
399
  background: transparent;
400
400
  cursor: pointer;
401
401
  color: inherit;
402
402
  text-align: left;
403
- transition: padding 220ms ${y}, color 220ms ${y};
403
+ transition: padding 220ms ${$}, color 220ms ${$};
404
404
  position: relative;
405
405
  }
406
406
  .mushi-option-btn:last-child { border-bottom: none; }
@@ -415,11 +415,11 @@
415
415
  font-size: 18px;
416
416
  line-height: 1;
417
417
  flex-shrink: 0;
418
- filter: ${n?"none":"grayscale(0.15)"};
418
+ filter: ${s?"none":"grayscale(0.15)"};
419
419
  }
420
420
  .mushi-option-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
421
421
  .mushi-option-label {
422
- font-family: ${$};
422
+ font-family: ${J};
423
423
  font-size: 16px;
424
424
  font-weight: 500;
425
425
  letter-spacing: -0.005em;
@@ -427,16 +427,16 @@
427
427
  }
428
428
  .mushi-option-desc {
429
429
  font-size: 12px;
430
- color: ${g};
430
+ color: ${a};
431
431
  letter-spacing: 0.005em;
432
432
  }
433
433
  .mushi-option-arrow {
434
- font-family: ${E};
434
+ font-family: ${P};
435
435
  font-size: 14px;
436
- color: ${p};
436
+ color: ${m};
437
437
  opacity: 0;
438
438
  transform: translateX(-4px);
439
- transition: opacity 220ms ${y}, transform 220ms ${y}, color 220ms ${y};
439
+ transition: opacity 220ms ${$}, transform 220ms ${$}, color 220ms ${$};
440
440
  }
441
441
  /* Feature-request and Reports-inbox entries sit above the five
442
442
  category cards as discoverable shortcuts. We give them a subtle
@@ -446,8 +446,8 @@
446
446
  .mushi-feature-entry,
447
447
  .mushi-reports-entry {
448
448
  padding-left: 10px;
449
- border-left: 2px solid ${p};
450
- transition: padding 220ms ${y}, color 220ms ${y}, border-color 220ms ${y};
449
+ border-left: 2px solid ${m};
450
+ transition: padding 220ms ${$}, color 220ms ${$}, border-color 220ms ${$};
451
451
  }
452
452
  .mushi-feature-entry:hover,
453
453
  .mushi-reports-entry:hover {
@@ -465,16 +465,16 @@
465
465
  align-items: center;
466
466
  padding: 12px 4px 12px 0;
467
467
  border: 0;
468
- border-bottom: 1px solid ${d};
468
+ border-bottom: 1px solid ${g};
469
469
  background: transparent;
470
- color: ${l};
470
+ color: ${i};
471
471
  cursor: pointer;
472
472
  text-align: left;
473
- transition: background 180ms ${y}, padding-left 180ms ${y};
473
+ transition: background 180ms ${$}, padding-left 180ms ${$};
474
474
  }
475
475
  .mushi-report-row:hover,
476
476
  .mushi-report-row:focus-visible {
477
- background: ${n?"rgba(242,235,221,0.04)":"rgba(14,13,11,0.03)"};
477
+ background: ${s?"rgba(242,235,221,0.04)":"rgba(14,13,11,0.03)"};
478
478
  padding-left: 4px;
479
479
  }
480
480
  .mushi-report-main {
@@ -499,7 +499,7 @@
499
499
  .mushi-report-status {
500
500
  display: inline-flex;
501
501
  align-items: center;
502
- font-family: ${E};
502
+ font-family: ${P};
503
503
  font-size: 10px;
504
504
  font-weight: 600;
505
505
  letter-spacing: 0.04em;
@@ -509,35 +509,35 @@
509
509
  border: 1px solid transparent;
510
510
  }
511
511
  .mushi-status-sent {
512
- color: ${n?"#A8C4FF":"#1E4A8C"};
513
- background: ${n?"rgba(120,160,255,0.12)":"rgba(30,74,140,0.08)"};
514
- border-color: ${n?"rgba(120,160,255,0.22)":"rgba(30,74,140,0.16)"};
512
+ color: ${B.fg};
513
+ background: ${B.bg};
514
+ border-color: ${B.border};
515
515
  }
516
516
  .mushi-status-review {
517
- color: ${n?"#FFD27A":"#8A5A00"};
518
- background: ${n?"rgba(255,190,90,0.12)":"rgba(180,120,0,0.10)"};
519
- border-color: ${n?"rgba(255,190,90,0.22)":"rgba(180,120,0,0.18)"};
517
+ color: ${H.fg};
518
+ background: ${H.bg};
519
+ border-color: ${H.border};
520
520
  }
521
521
  .mushi-status-fixing {
522
- color: ${n?"#FFB899":"#9A3D12"};
523
- background: ${n?"rgba(255,120,60,0.12)":"rgba(224,60,44,0.10)"};
524
- border-color: ${n?"rgba(255,120,60,0.24)":"rgba(224,60,44,0.18)"};
522
+ color: ${F.fg};
523
+ background: ${F.bg};
524
+ border-color: ${F.border};
525
525
  }
526
526
  .mushi-status-fixed {
527
- color: ${n?"#8FE3B0":"#1F6B3A"};
528
- background: ${n?"rgba(80,200,130,0.12)":"rgba(31,107,58,0.10)"};
529
- border-color: ${n?"rgba(80,200,130,0.22)":"rgba(31,107,58,0.18)"};
527
+ color: ${te.fg};
528
+ background: ${te.bg};
529
+ border-color: ${te.border};
530
530
  }
531
531
  .mushi-status-closed,
532
532
  .mushi-status-unknown {
533
- color: ${g};
534
- background: ${n?"rgba(242,235,221,0.06)":"rgba(14,13,11,0.05)"};
535
- border-color: ${m};
533
+ color: ${a};
534
+ background: ${Z};
535
+ border-color: ${u};
536
536
  }
537
537
  .mushi-report-when {
538
- font-family: ${E};
538
+ font-family: ${P};
539
539
  font-size: 10px;
540
- color: ${p};
540
+ color: ${m};
541
541
  }
542
542
  .mushi-unread-badge {
543
543
  display: inline-flex;
@@ -547,17 +547,17 @@
547
547
  height: 18px;
548
548
  padding: 0 5px;
549
549
  border-radius: 999px;
550
- font-family: ${E};
550
+ font-family: ${P};
551
551
  font-size: 10px;
552
552
  font-weight: 700;
553
- color: ${S};
553
+ color: ${y};
554
554
  background: ${c};
555
555
  }
556
556
  .mushi-report-chevron {
557
557
  font-size: 18px;
558
558
  line-height: 1;
559
- color: ${p};
560
- transition: color 180ms ${y}, transform 180ms ${y};
559
+ color: ${m};
560
+ transition: color 180ms ${$}, transform 180ms ${$};
561
561
  }
562
562
  .mushi-report-row:hover .mushi-report-chevron,
563
563
  .mushi-report-row:focus-visible .mushi-report-chevron {
@@ -565,7 +565,7 @@
565
565
  transform: translateX(2px);
566
566
  }
567
567
  .mushi-thread-summary {
568
- border-bottom: 1px solid ${d};
568
+ border-bottom: 1px solid ${g};
569
569
  padding-bottom: 10px;
570
570
  margin-bottom: 10px;
571
571
  }
@@ -585,26 +585,25 @@
585
585
  }
586
586
  .mushi-thread-comment {
587
587
  padding: 8px 10px;
588
- border: 1px solid ${d};
589
- background: ${n?"rgba(242,235,221,0.04)":"rgba(14,13,11,0.03)"};
588
+ border: 1px solid ${g};
589
+ background: ${s?"rgba(242,235,221,0.04)":"rgba(14,13,11,0.03)"};
590
590
  }
591
591
  .mushi-thread-comment.reporter {
592
- border-color: ${f};
593
- background: ${f};
592
+ border-color: ${h};
593
+ background: ${h};
594
594
  }
595
595
  .mushi-thread-comment strong {
596
596
  display: block;
597
- font-family: ${E};
597
+ font-family: ${P};
598
598
  font-size: 10px;
599
- letter-spacing: 0.08em;
600
- text-transform: uppercase;
599
+ letter-spacing: 0.04em;
601
600
  margin-bottom: 3px;
602
601
  }
603
602
  .mushi-thread-comment p,
604
603
  .mushi-muted,
605
604
  .mushi-error-inline {
606
605
  font-size: 12px;
607
- color: ${g};
606
+ color: ${a};
608
607
  line-height: 1.45;
609
608
  }
610
609
  .mushi-error-inline { color: ${c}; }
@@ -615,12 +614,10 @@
615
614
  gap: 8px;
616
615
  padding: 6px 10px 6px 12px;
617
616
  border-left: 2px solid ${c};
618
- background: ${f};
619
- color: ${S};
620
- font-family: ${E};
621
- font-size: 11px;
622
- letter-spacing: 0.12em;
623
- text-transform: uppercase;
617
+ background: ${h};
618
+ color: ${y};
619
+ font-family: ${J};
620
+ font-size: 13px;
624
621
  margin: 4px 0 14px;
625
622
  border-radius: 0 3px 3px 0;
626
623
  }
@@ -630,38 +627,8 @@
630
627
  flex-direction: column;
631
628
  gap: 2px;
632
629
  }
633
- .mushi-intent-btn {
634
- display: flex;
635
- align-items: center;
636
- justify-content: space-between;
637
- gap: 12px;
638
- padding: 12px 0;
639
- border: none;
640
- border-bottom: 1px solid ${d};
641
- background: transparent;
642
- cursor: pointer;
643
- color: inherit;
644
- text-align: left;
645
- font-family: ${$};
646
- font-size: 15px;
647
- transition: padding 220ms ${y}, color 220ms ${y};
648
- }
649
- .mushi-intent-btn::after {
650
- content: '\u2192';
651
- font-family: ${E};
652
- font-size: 13px;
653
- color: ${p};
654
- opacity: 0;
655
- transform: translateX(-4px);
656
- transition: opacity 220ms ${y}, transform 220ms ${y};
657
- }
658
- .mushi-intent-btn:last-child { border-bottom: none; }
659
- .mushi-intent-btn:hover { padding-left: 6px; color: ${c}; }
660
- .mushi-intent-btn:hover::after { opacity: 1; transform: translateX(0); color: ${c}; }
661
- .mushi-intent-btn:focus-visible {
662
- outline: none;
663
- padding-left: 6px;
664
- box-shadow: inset 2px 0 0 ${c};
630
+ .mushi-intents .mushi-option-btn {
631
+ grid-template-columns: 1fr auto;
665
632
  }
666
633
 
667
634
  /* Example starter chips \u2014 reduce first-report activation energy */
@@ -673,20 +640,20 @@
673
640
  }
674
641
  .mushi-example-chip {
675
642
  padding: 4px 10px;
676
- border: 1px solid ${d};
643
+ border: 1px solid ${g};
677
644
  border-radius: 12px;
678
645
  background: transparent;
679
- color: ${g};
680
- font-family: ${R};
646
+ color: ${a};
647
+ font-family: ${q};
681
648
  font-size: 11px;
682
649
  cursor: pointer;
683
- transition: color 150ms ${y}, border-color 150ms ${y}, background 150ms ${y};
650
+ transition: color 150ms ${$}, border-color 150ms ${$}, background 150ms ${$};
684
651
  white-space: nowrap;
685
652
  }
686
653
  .mushi-example-chip:hover {
687
- color: ${l};
688
- border-color: ${g};
689
- background: ${n?"rgba(242,235,221,0.06)":"rgba(14,13,11,0.04)"};
654
+ color: ${i};
655
+ border-color: ${a};
656
+ background: ${s?"rgba(242,235,221,0.06)":"rgba(14,13,11,0.04)"};
690
657
  }
691
658
  .mushi-example-chip:focus-visible {
692
659
  outline: 2px solid ${c};
@@ -701,12 +668,12 @@
701
668
  position: absolute;
702
669
  bottom: 4px;
703
670
  right: 0;
704
- font-family: ${E};
671
+ font-family: ${P};
705
672
  font-size: 10px;
706
673
  letter-spacing: 0.04em;
707
- color: ${p};
674
+ color: ${m};
708
675
  pointer-events: none;
709
- transition: color 200ms ${y};
676
+ transition: color 200ms ${$};
710
677
  }
711
678
 
712
679
  .mushi-textarea {
@@ -714,18 +681,18 @@
714
681
  min-height: 96px;
715
682
  padding: 8px 0 10px;
716
683
  border: none;
717
- border-bottom: 1px solid ${m};
684
+ border-bottom: 1px solid ${u};
718
685
  background: transparent;
719
- color: ${l};
720
- font-family: ${R};
686
+ color: ${i};
687
+ font-family: ${q};
721
688
  font-size: 14px;
722
689
  line-height: 1.5;
723
690
  resize: vertical;
724
691
  outline: none;
725
- transition: border-color 200ms ${y};
692
+ transition: border-color 200ms ${$};
726
693
  }
727
694
  .mushi-textarea::placeholder {
728
- color: ${p};
695
+ color: ${m};
729
696
  font-style: italic;
730
697
  }
731
698
  .mushi-textarea:focus { border-bottom-color: ${c}; }
@@ -741,35 +708,35 @@
741
708
  align-items: center;
742
709
  gap: 6px;
743
710
  padding: 5px 10px;
744
- border: 1px solid ${m};
711
+ border: 1px solid ${u};
745
712
  border-radius: 3px;
746
713
  background: transparent;
747
- color: ${g};
748
- font-family: ${E};
714
+ color: ${a};
715
+ font-family: ${P};
749
716
  font-size: 11px;
750
717
  letter-spacing: 0.04em;
751
718
  text-transform: uppercase;
752
719
  cursor: pointer;
753
- transition: color 180ms ${y}, border-color 180ms ${y}, background 180ms ${y};
720
+ transition: color 180ms ${$}, border-color 180ms ${$}, background 180ms ${$};
754
721
  }
755
722
  .mushi-attach-btn:hover {
756
- color: ${l};
757
- border-color: ${l};
723
+ color: ${i};
724
+ border-color: ${i};
758
725
  }
759
726
  .mushi-attach-btn.active {
760
727
  color: ${c};
761
728
  border-color: ${c};
762
- background: ${f};
729
+ background: ${h};
763
730
  }
764
731
  .mushi-attach-btn.danger {
765
- color: ${S};
766
- border-color: ${f};
732
+ color: ${y};
733
+ border-color: ${h};
767
734
  background: transparent;
768
735
  }
769
736
  .mushi-attach-btn.danger:hover {
770
737
  color: ${c};
771
738
  border-color: ${c};
772
- background: ${f};
739
+ background: ${h};
773
740
  }
774
741
  .mushi-attach-btn.loading {
775
742
  opacity: 0.7;
@@ -777,7 +744,7 @@
777
744
  }
778
745
  .mushi-attach-btn.error {
779
746
  color: ${c};
780
- border-color: ${f};
747
+ border-color: ${h};
781
748
  }
782
749
  .mushi-attach-btn:focus-visible {
783
750
  outline: 2px solid ${c};
@@ -801,15 +768,15 @@
801
768
  max-width: 100%;
802
769
  max-height: 160px;
803
770
  width: auto;
804
- border: 1px solid ${m};
771
+ border: 1px solid ${u};
805
772
  border-radius: 3px;
806
773
  object-fit: contain;
807
774
  align-self: flex-start;
808
775
  }
809
776
  .mushi-screenshot-hint {
810
777
  margin: 0;
811
- color: ${g};
812
- font-family: ${E};
778
+ color: ${a};
779
+ font-family: ${P};
813
780
  font-size: 10.5px;
814
781
  line-height: 1.4;
815
782
  letter-spacing: 0.02em;
@@ -817,11 +784,11 @@
817
784
  .mushi-identified-user {
818
785
  margin: 8px 0 0;
819
786
  font-size: 11.5px;
820
- color: ${g};
787
+ color: ${a};
821
788
  line-height: 1.4;
822
789
  }
823
790
  .mushi-identified-user strong {
824
- color: ${l};
791
+ color: ${i};
825
792
  font-weight: 600;
826
793
  }
827
794
  .mushi-annotate-toolbar {
@@ -849,18 +816,18 @@
849
816
 
850
817
  .mushi-footer {
851
818
  padding: 14px 22px 16px;
852
- border-top: 1px solid ${d};
819
+ border-top: 1px solid ${g};
853
820
  display: flex;
854
821
  align-items: center;
855
822
  justify-content: space-between;
856
823
  gap: 12px;
857
824
  }
858
825
  .mushi-footer-hint {
859
- font-family: ${E};
826
+ font-family: ${P};
860
827
  font-size: 10px;
861
828
  letter-spacing: 0.10em;
862
829
  text-transform: uppercase;
863
- color: ${p};
830
+ color: ${m};
864
831
  }
865
832
  .mushi-submit {
866
833
  position: relative;
@@ -871,15 +838,15 @@
871
838
  border: 1px solid ${c};
872
839
  border-radius: 3px;
873
840
  background: ${c};
874
- color: #FAF7F0;
875
- font-family: ${E};
841
+ color: ${k};
842
+ font-family: ${P};
876
843
  font-size: 11px;
877
844
  letter-spacing: 0.16em;
878
845
  text-transform: uppercase;
879
846
  cursor: pointer;
880
847
  overflow: hidden;
881
- transition: transform 180ms ${y}, box-shadow 180ms ${y};
882
- box-shadow: 0 2px 0 ${n?"#7A1F15":"#9A2A1E"};
848
+ transition: transform 180ms ${$}, box-shadow 180ms ${$};
849
+ box-shadow: 0 2px 0 ${v};
883
850
  }
884
851
  .mushi-submit::after {
885
852
  content: '';
@@ -888,15 +855,15 @@
888
855
  background: radial-gradient(circle at center, rgba(255,255,255,0.35) 0%, transparent 60%);
889
856
  opacity: 0;
890
857
  transform: scale(0.4);
891
- transition: opacity 280ms ${y}, transform 380ms ${y};
858
+ transition: opacity 280ms ${$}, transform 380ms ${$};
892
859
  pointer-events: none;
893
860
  }
894
861
  .mushi-submit:hover {
895
862
  transform: translateY(-1px);
896
- box-shadow: 0 3px 0 ${n?"#7A1F15":"#9A2A1E"};
863
+ box-shadow: 0 3px 0 ${v};
897
864
  }
898
865
  .mushi-submit:hover::after { opacity: 1; transform: scale(1.4); }
899
- .mushi-submit:active { transform: translateY(1px); box-shadow: 0 1px 0 ${n?"#7A1F15":"#9A2A1E"}; }
866
+ .mushi-submit:active { transform: translateY(1px); box-shadow: 0 1px 0 ${v}; }
900
867
  .mushi-submit:disabled {
901
868
  cursor: wait;
902
869
  opacity: 0.7;
@@ -907,15 +874,15 @@
907
874
  }
908
875
  .mushi-submit-arrow {
909
876
  display: inline-block;
910
- transition: transform 220ms ${y};
877
+ transition: transform 220ms ${$};
911
878
  }
912
879
  .mushi-submit:hover .mushi-submit-arrow { transform: translateX(3px); }
913
880
 
914
881
  .mushi-brand-footer {
915
882
  padding: 9px 14px 11px;
916
- border-top: 1px solid ${d};
917
- color: ${p};
918
- font-family: ${E};
883
+ border-top: 1px solid ${g};
884
+ color: ${m};
885
+ font-family: ${P};
919
886
  font-size: 9px;
920
887
  letter-spacing: 0.16em;
921
888
  text-align: center;
@@ -928,8 +895,8 @@
928
895
  justify-content: center;
929
896
  gap: 8px;
930
897
  padding: 10px 22px 14px;
931
- color: ${p};
932
- font-family: ${E};
898
+ color: ${m};
899
+ font-family: ${P};
933
900
  font-size: 11px;
934
901
  letter-spacing: 0.10em;
935
902
  }
@@ -937,17 +904,17 @@
937
904
  display: inline-flex;
938
905
  align-items: baseline;
939
906
  gap: 4px;
940
- transition: color 200ms ${y};
907
+ transition: color 200ms ${$};
941
908
  }
942
- .mushi-step-num.done { color: ${g}; text-decoration: line-through; text-decoration-color: ${p}; }
909
+ .mushi-step-num.done { color: ${a}; text-decoration: line-through; text-decoration-color: ${m}; }
943
910
  .mushi-step-num.active {
944
911
  color: ${c};
945
- font-family: ${$};
912
+ font-family: ${J};
946
913
  font-size: 14px;
947
914
  font-weight: 600;
948
915
  letter-spacing: 0;
949
916
  }
950
- .mushi-step-sep { width: 14px; height: 1px; background: ${d}; }
917
+ .mushi-step-sep { width: 14px; height: 1px; background: ${g}; }
951
918
 
952
919
  .mushi-success {
953
920
  text-align: center;
@@ -976,37 +943,37 @@
976
943
  stroke-dashoffset: 280;
977
944
  transform: rotate(-90deg);
978
945
  transform-origin: center;
979
- animation: mushi-stamp-ring 700ms ${y} 80ms forwards;
946
+ animation: mushi-stamp-ring 700ms ${$} 80ms forwards;
980
947
  }
981
948
  .mushi-success-stamp-label {
982
- font-family: ${$};
949
+ font-family: ${J};
983
950
  font-size: 18px;
984
951
  font-weight: 600;
985
952
  color: ${c};
986
953
  letter-spacing: 0.04em;
987
954
  transform: rotate(-6deg);
988
955
  opacity: 0;
989
- animation: mushi-stamp-press 360ms ${y} 600ms forwards;
956
+ animation: mushi-stamp-press 360ms ${$} 600ms forwards;
990
957
  }
991
958
  .mushi-success-headline {
992
- font-family: ${$};
959
+ font-family: ${J};
993
960
  font-size: 18px;
994
961
  font-weight: 500;
995
- color: ${l};
962
+ color: ${i};
996
963
  margin-bottom: 4px;
997
964
  }
998
965
  .mushi-success-meta {
999
- font-family: ${E};
966
+ font-family: ${P};
1000
967
  font-size: 11px;
1001
968
  letter-spacing: 0.10em;
1002
969
  text-transform: uppercase;
1003
- color: ${g};
970
+ color: ${a};
1004
971
  }
1005
972
 
1006
973
  /* \u2500\u2500 Two-way receipt (success step) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1007
974
  /* The receipt block sits below the stamp/meta. Three states: */
1008
975
  /* 1. delivering... (spinner pill, while host onSubmit awaits) */
1009
- /* 2. confirmed (Receipt #abc12345 + Track on Mushi link) */
976
+ /* 2. confirmed (Receipt id + Track on Mushi link) */
1010
977
  /* 3. queued offline (warn pill \u2014 degrade gracefully) */
1011
978
  .mushi-success-receipt {
1012
979
  margin-top: 14px;
@@ -1022,15 +989,15 @@
1022
989
  align-items: center;
1023
990
  justify-content: center;
1024
991
  gap: 8px;
1025
- font-family: ${E};
992
+ font-family: ${P};
1026
993
  font-size: 11px;
1027
994
  letter-spacing: 0.05em;
1028
- color: ${g};
995
+ color: ${a};
1029
996
  }
1030
997
  .mushi-success-receipt-label {
1031
998
  text-transform: uppercase;
1032
999
  letter-spacing: 0.10em;
1033
- color: ${g};
1000
+ color: ${a};
1034
1001
  }
1035
1002
  .mushi-success-receipt-id {
1036
1003
  display: inline-flex;
@@ -1039,9 +1006,9 @@
1039
1006
  padding: 3px 8px;
1040
1007
  border-radius: 4px;
1041
1008
  background: transparent;
1042
- border: 1px dashed ${d};
1009
+ border: 1px dashed ${g};
1043
1010
  color: inherit;
1044
- font-family: ${E};
1011
+ font-family: ${P};
1045
1012
  font-size: 12px;
1046
1013
  letter-spacing: 0.02em;
1047
1014
  cursor: pointer;
@@ -1066,8 +1033,8 @@
1066
1033
  padding: 6px 10px;
1067
1034
  border-radius: 4px;
1068
1035
  background: ${c};
1069
- color: #fff;
1070
- font-family: ${E};
1036
+ color: ${M};
1037
+ font-family: ${P};
1071
1038
  font-size: 11px;
1072
1039
  letter-spacing: 0.10em;
1073
1040
  text-transform: uppercase;
@@ -1083,7 +1050,7 @@
1083
1050
  width: 11px;
1084
1051
  height: 11px;
1085
1052
  border-radius: 50%;
1086
- border: 1.5px solid ${d};
1053
+ border: 1.5px solid ${g};
1087
1054
  border-top-color: ${c};
1088
1055
  animation: mushi-receipt-spin 0.8s linear infinite;
1089
1056
  }
@@ -1091,7 +1058,7 @@
1091
1058
  to { transform: rotate(360deg); }
1092
1059
  }
1093
1060
  .mushi-success-receipt-hint {
1094
- color: ${g};
1061
+ color: ${a};
1095
1062
  font-style: italic;
1096
1063
  }
1097
1064
  .mushi-success-receipt-warn {
@@ -1101,7 +1068,7 @@
1101
1068
  display: block;
1102
1069
  margin: 12px auto 0;
1103
1070
  font-size: 12px;
1104
- font-family: ${E};
1071
+ font-family: ${P};
1105
1072
  color: ${c};
1106
1073
  text-decoration: underline;
1107
1074
  text-underline-offset: 2px;
@@ -1113,11 +1080,11 @@
1113
1080
  .mushi-success-my-reports:hover { opacity: 0.75; }
1114
1081
  .mushi-success-sla {
1115
1082
  margin-top: 2px;
1116
- font-family: ${$};
1083
+ font-family: ${J};
1117
1084
  font-size: 12px;
1118
1085
  line-height: 1.45;
1119
1086
  text-align: center;
1120
- color: ${g};
1087
+ color: ${a};
1121
1088
  max-width: 260px;
1122
1089
  }
1123
1090
  .mushi-success-sla-default {
@@ -1139,13 +1106,13 @@
1139
1106
  border-left: 2px solid ${c};
1140
1107
  color: ${c};
1141
1108
  font-size: 12px;
1142
- font-family: ${E};
1109
+ font-family: ${P};
1143
1110
  letter-spacing: 0.02em;
1144
1111
  }
1145
1112
 
1146
1113
  /* \u2500\u2500 Rewards nudge (category step) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1147
1114
  .mushi-rewards-nudge {
1148
- border-top: 1px solid ${d};
1115
+ border-top: 1px solid ${g};
1149
1116
  padding: 10px 0 4px;
1150
1117
  margin-top: 6px;
1151
1118
  }
@@ -1162,20 +1129,20 @@
1162
1129
  flex-shrink: 0;
1163
1130
  }
1164
1131
  .mushi-rewards-tier-name {
1165
- font-family: ${E};
1132
+ font-family: ${P};
1166
1133
  font-size: 11px;
1167
1134
  letter-spacing: 0.08em;
1168
1135
  text-transform: uppercase;
1169
- color: ${l};
1136
+ color: ${i};
1170
1137
  }
1171
1138
  .mushi-rewards-pts-count {
1172
- font-family: ${E};
1139
+ font-family: ${P};
1173
1140
  font-size: 11px;
1174
- color: ${g};
1141
+ color: ${a};
1175
1142
  margin-right: auto;
1176
1143
  }
1177
1144
  .mushi-rewards-pts-earn {
1178
- font-family: ${E};
1145
+ font-family: ${P};
1179
1146
  font-size: 10px;
1180
1147
  color: ${c};
1181
1148
  letter-spacing: 0.04em;
@@ -1183,7 +1150,7 @@
1183
1150
  }
1184
1151
  .mushi-tier-bar-track {
1185
1152
  height: 3px;
1186
- background: ${m};
1153
+ background: ${u};
1187
1154
  border-radius: 2px;
1188
1155
  overflow: hidden;
1189
1156
  margin-bottom: 5px;
@@ -1192,12 +1159,12 @@
1192
1159
  height: 100%;
1193
1160
  background: ${c};
1194
1161
  border-radius: 2px;
1195
- transition: width 600ms ${y};
1162
+ transition: width 600ms ${$};
1196
1163
  }
1197
1164
  .mushi-rewards-next-label {
1198
- font-family: ${E};
1165
+ font-family: ${P};
1199
1166
  font-size: 10px;
1200
- color: ${g};
1167
+ color: ${a};
1201
1168
  text-align: right;
1202
1169
  letter-spacing: 0.02em;
1203
1170
  }
@@ -1206,11 +1173,11 @@
1206
1173
  .mushi-success-rewards {
1207
1174
  margin-top: 14px;
1208
1175
  padding-top: 12px;
1209
- border-top: 1px solid ${d};
1176
+ border-top: 1px solid ${g};
1210
1177
  width: 100%;
1211
1178
  }
1212
1179
  .mushi-success-pts-award {
1213
- font-family: ${E};
1180
+ font-family: ${P};
1214
1181
  font-size: 22px;
1215
1182
  font-weight: 700;
1216
1183
  color: ${c};
@@ -1218,7 +1185,7 @@
1218
1185
  letter-spacing: 0.06em;
1219
1186
  margin-bottom: 10px;
1220
1187
  opacity: 0;
1221
- animation: mushi-pts-pop 420ms ${y} 900ms forwards;
1188
+ animation: mushi-pts-pop 420ms ${$} 900ms forwards;
1222
1189
  }
1223
1190
  .success-bar { margin: 0 0 5px; }
1224
1191
 
@@ -1229,15 +1196,15 @@
1229
1196
 
1230
1197
  /* \u2500\u2500\u2500 Beta mode strip (category step) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1231
1198
  /* Brand palette: widgetAccent (vermillion) + washi ink for the strip.
1232
- The previous indigo (#6366f1) is the single most recognisable AI-template
1199
+ The previous generic indigo purple is the single most recognisable AI-template
1233
1200
  colour; replaced with the widget's own vermillion wash so the beta panel
1234
1201
  reads as a Mushi-native surface rather than a generic SaaS plug-in. */
1235
1202
 
1236
1203
  .mushi-beta-strip {
1237
1204
  margin: 0 16px 2px;
1238
1205
  padding: 9px 12px;
1239
- background: ${f};
1240
- border: 1px solid ${n?"rgba(255,90,71,0.22)":"rgba(224,60,44,0.16)"};
1206
+ background: ${h};
1207
+ border: 1px solid ${s?"rgba(255,90,71,0.22)":"rgba(224,60,44,0.16)"};
1241
1208
  border-radius: 4px;
1242
1209
  display: flex;
1243
1210
  flex-direction: column;
@@ -1256,8 +1223,8 @@
1256
1223
  padding: 1px 6px;
1257
1224
  border-radius: 3px;
1258
1225
  background: ${c};
1259
- color: #FAF7F0;
1260
- font-family: ${E};
1226
+ color: ${k};
1227
+ font-family: ${P};
1261
1228
  font-size: 9px;
1262
1229
  font-weight: 700;
1263
1230
  letter-spacing: 0.14em;
@@ -1269,14 +1236,14 @@
1269
1236
 
1270
1237
  .mushi-beta-msg {
1271
1238
  font-size: 11px;
1272
- color: ${g};
1239
+ color: ${a};
1273
1240
  line-height: 1.45;
1274
1241
  }
1275
1242
 
1276
1243
  .mushi-beta-contact-hint {
1277
1244
  font-size: 10px;
1278
- color: ${p};
1279
- font-family: ${E};
1245
+ color: ${m};
1246
+ font-family: ${P};
1280
1247
  letter-spacing: 0.06em;
1281
1248
  }
1282
1249
 
@@ -1291,7 +1258,7 @@
1291
1258
 
1292
1259
  .mushi-beta-perks li {
1293
1260
  font-size: 12px;
1294
- color: ${S};
1261
+ color: ${y};
1295
1262
  font-weight: 500;
1296
1263
  }
1297
1264
 
@@ -1303,7 +1270,7 @@
1303
1270
 
1304
1271
  .mushi-changelog-summary {
1305
1272
  font-size: 11px;
1306
- color: ${w};
1273
+ color: ${p};
1307
1274
  cursor: pointer;
1308
1275
  list-style: none;
1309
1276
  display: flex;
@@ -1334,7 +1301,7 @@
1334
1301
 
1335
1302
  .mushi-changelog-list li {
1336
1303
  font-size: 11px;
1337
- color: ${w};
1304
+ color: ${p};
1338
1305
  line-height: 1.5;
1339
1306
  }
1340
1307
 
@@ -1343,8 +1310,8 @@
1343
1310
  .mushi-beta-success-footer {
1344
1311
  margin-top: 14px;
1345
1312
  padding: 10px 14px;
1346
- background: ${f};
1347
- border: 1px solid ${n?"rgba(255,90,71,0.18)":"rgba(224,60,44,0.14)"};
1313
+ background: ${h};
1314
+ border: 1px solid ${s?"rgba(255,90,71,0.18)":"rgba(224,60,44,0.14)"};
1348
1315
  border-radius: 4px;
1349
1316
  display: flex;
1350
1317
  flex-direction: column;
@@ -1354,7 +1321,7 @@
1354
1321
 
1355
1322
  .mushi-beta-success-line {
1356
1323
  font-size: 12px;
1357
- color: ${S};
1324
+ color: ${y};
1358
1325
  line-height: 1.5;
1359
1326
  }
1360
1327
 
@@ -1375,19 +1342,19 @@
1375
1342
  fix \u2014 Workstream C). Horizontal padding also clears the left/right
1376
1343
  insets for landscape notches. */
1377
1344
  box-sizing: border-box;
1378
- min-height: 36px;
1345
+ min-height: ${N}px;
1379
1346
  display: flex;
1380
1347
  align-items: center;
1381
1348
  justify-content: center;
1382
1349
  gap: 10px;
1383
1350
  padding: 0 calc(16px + env(safe-area-inset-right, 0px)) 0 calc(16px + env(safe-area-inset-left, 0px));
1384
- font-family: ${E};
1351
+ font-family: ${P};
1385
1352
  font-size: 12px;
1386
1353
  letter-spacing: 0.04em;
1387
1354
  white-space: nowrap;
1388
1355
  overflow: hidden;
1389
- z-index: var(--mushi-banner-z, 99998);
1390
- animation: mushi-banner-slide-in 0.3s ${y} both;
1356
+ z-index: var(--mushi-banner-z, ${Se});
1357
+ animation: mushi-banner-slide-in 0.3s ${$} both;
1391
1358
  }
1392
1359
 
1393
1360
  .mushi-banner.top { top: 0; padding-top: env(safe-area-inset-top, 0px); }
@@ -1395,17 +1362,17 @@
1395
1362
 
1396
1363
  /* --- neon variant (electric lime \u2014 dev / beta tool aesthetic) --- */
1397
1364
  .mushi-banner.neon {
1398
- background: #0FFF50;
1399
- color: #0a1a0a;
1400
- border-bottom: 1.5px solid #00C43A;
1365
+ background: ${S};
1366
+ color: ${E};
1367
+ border-bottom: 1.5px solid ${O};
1401
1368
  }
1402
1369
  .mushi-banner.neon.bottom {
1403
- border-top: 1.5px solid #00C43A;
1370
+ border-top: 1.5px solid ${O};
1404
1371
  border-bottom: none;
1405
1372
  }
1406
1373
  .mushi-banner.neon .mushi-banner-btn {
1407
1374
  background: rgba(0,0,0,0.14);
1408
- color: #0a1a0a;
1375
+ color: ${E};
1409
1376
  border: 1px solid rgba(0,0,0,0.22);
1410
1377
  }
1411
1378
  .mushi-banner.neon .mushi-banner-btn:hover {
@@ -1415,16 +1382,16 @@
1415
1382
  /* --- brand variant (widgetAccent \u2014 editorial, app-quality) --- */
1416
1383
  .mushi-banner.brand {
1417
1384
  background: ${c};
1418
- color: #fff;
1419
- border-bottom: 1.5px solid ${n?"#C4321E":"#B52F1F"};
1385
+ color: ${M};
1386
+ border-bottom: 1.5px solid ${w};
1420
1387
  }
1421
1388
  .mushi-banner.brand.bottom {
1422
- border-top: 1.5px solid ${n?"#C4321E":"#B52F1F"};
1389
+ border-top: 1.5px solid ${w};
1423
1390
  border-bottom: none;
1424
1391
  }
1425
1392
  .mushi-banner.brand .mushi-banner-btn {
1426
1393
  background: rgba(255,255,255,0.18);
1427
- color: #fff;
1394
+ color: ${M};
1428
1395
  border: 1px solid rgba(255,255,255,0.32);
1429
1396
  }
1430
1397
  .mushi-banner.brand .mushi-banner-btn:hover {
@@ -1437,23 +1404,23 @@
1437
1404
  opacity values were effectively invisible \u2014 users could not distinguish
1438
1405
  the banner from the page content below it. */
1439
1406
  .mushi-banner.subtle {
1440
- background: ${n?"rgba(15,14,12,0.88)":"rgba(248,244,237,0.92)"};
1407
+ background: ${s?"rgba(15,14,12,0.88)":"rgba(248,244,237,0.92)"};
1441
1408
  backdrop-filter: blur(14px);
1442
1409
  -webkit-backdrop-filter: blur(14px);
1443
- color: ${l};
1444
- border-bottom: 1px solid ${m};
1410
+ color: ${i};
1411
+ border-bottom: 1px solid ${u};
1445
1412
  }
1446
1413
  .mushi-banner.subtle.bottom {
1447
- border-top: 1px solid ${m};
1414
+ border-top: 1px solid ${u};
1448
1415
  border-bottom: none;
1449
1416
  }
1450
1417
  .mushi-banner.subtle .mushi-banner-btn {
1451
- background: ${n?"rgba(242,235,221,0.10)":"rgba(14,13,11,0.08)"};
1452
- color: ${l};
1453
- border: 1px solid ${m};
1418
+ background: ${s?"rgba(242,235,221,0.10)":"rgba(14,13,11,0.08)"};
1419
+ color: ${i};
1420
+ border: 1px solid ${u};
1454
1421
  }
1455
1422
  .mushi-banner.subtle .mushi-banner-btn:hover {
1456
- background: ${n?"rgba(242,235,221,0.18)":"rgba(14,13,11,0.14)"};
1423
+ background: ${s?"rgba(242,235,221,0.18)":"rgba(14,13,11,0.14)"};
1457
1424
  }
1458
1425
 
1459
1426
  .mushi-banner-label {
@@ -1467,7 +1434,7 @@
1467
1434
  .mushi-banner--rich {
1468
1435
  justify-content: space-between;
1469
1436
  gap: 12px;
1470
- min-height: 36px;
1437
+ min-height: ${N}px;
1471
1438
  height: auto;
1472
1439
  padding: 4px 12px 4px 16px;
1473
1440
  white-space: normal;
@@ -1502,8 +1469,8 @@
1502
1469
  background: rgba(255,255,255,0.14);
1503
1470
  }
1504
1471
  .mushi-banner.subtle .mushi-banner-pill {
1505
- border-color: ${m};
1506
- background: ${n?"rgba(242,235,221,0.08)":"rgba(14,13,11,0.06)"};
1472
+ border-color: ${u};
1473
+ background: ${s?"rgba(242,235,221,0.08)":"rgba(14,13,11,0.06)"};
1507
1474
  }
1508
1475
  .mushi-banner-message {
1509
1476
  min-width: 0;
@@ -1528,7 +1495,7 @@
1528
1495
  font-size: 11px;
1529
1496
  }
1530
1497
  .mushi-banner-actions::-webkit-scrollbar { display: none; }
1531
- @media (max-width: 480px) {
1498
+ @media (max-width: ${G}px) {
1532
1499
  /* Phones: keep only the primary bug CTA (+ dismiss outside the nav). */
1533
1500
  .mushi-banner-actions .mushi-banner-extra { display: none; }
1534
1501
  }
@@ -1608,7 +1575,7 @@
1608
1575
  border: none;
1609
1576
  cursor: pointer;
1610
1577
  font-size: 11px;
1611
- font-family: ${E};
1578
+ font-family: ${P};
1612
1579
  opacity: 0.75;
1613
1580
  color: inherit;
1614
1581
  padding: 2px 6px;
@@ -1649,8 +1616,19 @@
1649
1616
  .mushi-success-pts-award { opacity: 1; }
1650
1617
  }
1651
1618
 
1652
- .mushi-community-footer{display:flex;align-items:center;gap:8px;padding:10px 0 2px;border-top:1px solid ${n?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.07)"};margin-top:8px;flex-wrap:wrap}
1619
+ .mushi-community-footer{display:flex;align-items:center;gap:8px;padding:10px 0 2px;border-top:1px solid ${s?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.07)"};margin-top:8px;flex-wrap:wrap}
1653
1620
  .mushi-community-btn{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1621
+ .mushi-section-label{
1622
+ margin:0 0 6px;
1623
+ font-family:${P};
1624
+ font-size:11px;
1625
+ letter-spacing:0.06em;
1626
+ text-transform:uppercase;
1627
+ color:${m};
1628
+ }
1629
+ .mushi-more-nav{margin-top:4px}
1630
+ .mushi-more-nav-panel{display:flex;flex-direction:column;gap:0;border-top:1px dashed ${g};padding-top:2px}
1631
+ .mushi-more-nav-link{align-self:flex-start;margin:6px 0 2px;padding:0}
1654
1632
  /* \u2500\u2500 "More issue types \u2192" toggle (progressive disclosure) \u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1655
1633
  .mushi-more-toggle {
1656
1634
  display: flex;
@@ -1659,32 +1637,32 @@
1659
1637
  width: 100%;
1660
1638
  padding: 11px 0;
1661
1639
  border: none;
1662
- border-top: 1px dashed ${d};
1640
+ border-top: 1px dashed ${g};
1663
1641
  background: transparent;
1664
1642
  cursor: pointer;
1665
- color: ${g};
1666
- font-family: ${R};
1643
+ color: ${a};
1644
+ font-family: ${q};
1667
1645
  font-size: 13px;
1668
1646
  text-align: left;
1669
- transition: color 180ms ${y};
1647
+ transition: color 180ms ${$};
1670
1648
  }
1671
1649
  .mushi-more-toggle:hover { color: ${c}; }
1672
1650
  .mushi-more-toggle:hover .mushi-more-toggle-arrow { transform: translateX(3px); }
1673
1651
  .mushi-more-toggle-text { flex: 1; }
1674
1652
  .mushi-more-toggle-count {
1675
- font-family: ${E};
1653
+ font-family: ${P};
1676
1654
  font-size: 10px;
1677
1655
  letter-spacing: 0.08em;
1678
1656
  text-transform: uppercase;
1679
- color: ${p};
1680
- background: ${n?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.06)"};
1657
+ color: ${m};
1658
+ background: ${s?"rgba(255,255,255,0.07)":"rgba(0,0,0,0.06)"};
1681
1659
  padding: 2px 6px;
1682
1660
  border-radius: 10px;
1683
1661
  }
1684
1662
  .mushi-more-toggle-arrow {
1685
1663
  font-size: 14px;
1686
1664
  opacity: 0.5;
1687
- transition: transform 180ms ${y};
1665
+ transition: transform 180ms ${$};
1688
1666
  }
1689
1667
  /* \u2500\u2500 Step slide-in \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1690
1668
  @keyframes mushi-step-in {
@@ -1701,23 +1679,23 @@
1701
1679
  .mushi-categories-expanded {
1702
1680
  animation: mushi-step-in 180ms ease both;
1703
1681
  }
1704
- .mushi-link-btn{background:none;border:none;padding:4px 2px;cursor:pointer;color:${c};font-size:12px;font-family:${E};text-decoration:underline;text-underline-offset:2px}
1682
+ .mushi-link-btn{background:none;border:none;padding:4px 2px;cursor:pointer;color:${c};font-size:12px;font-family:${P};text-decoration:underline;text-underline-offset:2px}
1705
1683
  .mushi-link-btn:hover{opacity:0.8}
1706
1684
  .mushi-link-btn:focus-visible,.mushi-nav-item:focus-visible{outline:2px solid ${c};outline-offset:2px;border-radius:2px}
1707
- .mushi-nav-item{display:block;width:100%;text-align:left;background:${n?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.04)"};border:1px solid ${n?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)"};border-radius:8px;padding:10px 14px;margin-bottom:8px;cursor:pointer;font-size:13px;color:${l};transition:background .15s,border-color .15s}
1708
- .mushi-nav-item:hover{background:${n?"rgba(255,255,255,0.09)":"rgba(0,0,0,0.07)"}}
1709
- .mushi-account-card{display:flex;align-items:center;gap:12px;background:${n?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"};border-radius:10px;padding:12px 14px;margin-bottom:14px}
1710
- .mushi-account-avatar{width:40px;height:40px;border-radius:50%;background:${f};color:${S};display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;flex-shrink:0}
1685
+ .mushi-nav-item{display:block;width:100%;text-align:left;background:${s?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.04)"};border:1px solid ${s?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)"};border-radius:8px;padding:10px 14px;margin-bottom:8px;cursor:pointer;font-size:13px;color:${i};transition:background .15s,border-color .15s}
1686
+ .mushi-nav-item:hover{background:${s?"rgba(255,255,255,0.09)":"rgba(0,0,0,0.07)"}}
1687
+ .mushi-account-card{display:flex;align-items:center;gap:12px;background:${s?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"};border-radius:10px;padding:12px 14px;margin-bottom:14px}
1688
+ .mushi-account-avatar{width:40px;height:40px;border-radius:50%;background:${h};color:${y};display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;flex-shrink:0}
1711
1689
  .mushi-account-info{display:flex;flex-direction:column;gap:2px;min-width:0}
1712
- .mushi-account-info strong{font:700 14px/1.3 inherit;color:${l}}
1713
- .mushi-account-rank,.mushi-xapp-app-name,.mushi-label{font-size:12px;color:${w};font-family:${E}}
1690
+ .mushi-account-info strong{font:700 14px/1.3 inherit;color:${i}}
1691
+ .mushi-account-rank,.mushi-xapp-app-name,.mushi-label{font-size:12px;color:${p};font-family:${P}}
1714
1692
  .mushi-account-rank{display:block}
1715
1693
  .mushi-xapp-app-head{display:flex;align-items:center;gap:8px;margin:0 0 6px}
1716
1694
  .mushi-xapp-app-name{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin:0}
1717
- .mushi-app-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;border:1px solid ${n?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.1)"};background:#fff;overflow:hidden;flex-shrink:0}
1695
+ .mushi-app-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;border:1px solid ${s?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.1)"};background:${l};overflow:hidden;flex-shrink:0}
1718
1696
  .mushi-app-icon-img{display:block;width:16px;height:16px;object-fit:contain}
1719
- .mushi-app-icon-initials{font-size:9px;font-weight:700;color:${w};line-height:1}
1720
- .mushi-app-icon-initials-only{background:${n?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}
1697
+ .mushi-app-icon-initials{font-size:9px;font-weight:700;color:${p};line-height:1}
1698
+ .mushi-app-icon-initials-only{background:${s?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}
1721
1699
  .mushi-header-host-icon{display:block;width:20px;height:20px;border-radius:4px;object-fit:contain}
1722
1700
  .mushi-xapp-group{margin-bottom:14px}
1723
1701
  .mushi-label{display:block;font-weight:600;margin-bottom:6px}
@@ -1725,284 +1703,302 @@
1725
1703
  /* \u2500\u2500 Assistant tab (P5) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1726
1704
  .mushi-assistant{display:flex;flex-direction:column;height:100%;min-height:0;max-height:60vh}
1727
1705
  .mushi-assistant-log{flex:1;min-height:120px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:4px 2px 8px}
1728
- .mushi-assistant-greeting{font:400 14px/1.5 ${R};color:${g};padding:6px 2px}
1706
+ .mushi-assistant-greeting{font:400 14px/1.5 ${q};color:${a};padding:6px 2px}
1729
1707
  .mushi-assistant-suggestions{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
1730
- .mushi-assistant-chip{background:${f};color:${S};border:1px solid ${m};border-radius:999px;padding:5px 12px;font-size:12px;cursor:pointer;font-family:${R};transition:background .15s}
1731
- .mushi-assistant-chip:hover{background:${n?"rgba(255,90,71,0.22)":"rgba(224,60,44,0.14)"}}
1708
+ .mushi-assistant-chip{background:${h};color:${y};border:1px solid ${u};border-radius:999px;padding:5px 12px;font-size:12px;cursor:pointer;font-family:${q};transition:background .15s}
1709
+ .mushi-assistant-chip:hover{background:${s?"rgba(255,90,71,0.22)":"rgba(224,60,44,0.14)"}}
1732
1710
  .mushi-assistant-chip:focus-visible{outline:2px solid ${c};outline-offset:2px}
1733
- .mushi-assistant-msg{max-width:85%;padding:8px 12px;border-radius:12px;font:400 14px/1.45 ${R};white-space:pre-wrap;word-break:break-word}
1734
- .mushi-assistant-msg-user{align-self:flex-end;background:${c};color:#fff;border-bottom-right-radius:4px}
1735
- .mushi-assistant-msg-bot{align-self:flex-start;background:${n?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.05)"};color:${l};border-bottom-left-radius:4px}
1711
+ .mushi-assistant-msg{max-width:85%;padding:8px 12px;border-radius:12px;font:400 14px/1.45 ${q};white-space:pre-wrap;word-break:break-word}
1712
+ .mushi-assistant-msg-user{align-self:flex-end;background:${c};color:${M};border-bottom-right-radius:4px}
1713
+ .mushi-assistant-msg-bot{align-self:flex-start;background:${s?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.05)"};color:${i};border-bottom-left-radius:4px}
1736
1714
  .mushi-assistant-thinking{opacity:0.6;font-size:18px;letter-spacing:2px}
1737
- .mushi-assistant-error{align-self:flex-start;color:${n?"#F87171":"#DC2626"};font-size:12px;padding:4px 2px}
1738
- .mushi-assistant-form{display:flex;align-items:flex-end;gap:8px;border-top:1px solid ${d};padding-top:8px}
1739
- .mushi-assistant-input{flex:1;resize:none;max-height:120px;border:1px solid ${m};border-radius:10px;padding:8px 12px;font:400 14px/1.4 ${R};background:${o};color:${l}}
1715
+ .mushi-assistant-error{align-self:flex-start;color:${R};font-size:12px;padding:4px 2px}
1716
+ .mushi-assistant-form{display:flex;align-items:flex-end;gap:8px;border-top:1px solid ${g};padding-top:8px}
1717
+ .mushi-assistant-input{flex:1;resize:none;max-height:120px;border:1px solid ${u};border-radius:10px;padding:8px 12px;font:400 14px/1.4 ${q};background:${o};color:${i}}
1740
1718
  .mushi-assistant-input:focus-visible{outline:2px solid ${c};outline-offset:1px}
1741
- .mushi-assistant-submit{flex-shrink:0;width:36px;height:36px;border:none;border-radius:50%;background:${c};color:#fff;font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s,opacity .15s}
1719
+ .mushi-assistant-submit{flex-shrink:0;width:36px;height:36px;border:none;border-radius:50%;background:${c};color:${M};font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s,opacity .15s}
1742
1720
  .mushi-assistant-submit:hover{transform:translateY(-1px)}
1743
1721
  .mushi-assistant-submit:disabled{opacity:0.5;cursor:default;transform:none}
1744
1722
  .mushi-assistant-submit:focus-visible{outline:2px solid ${c};outline-offset:2px}
1745
- `}var be="@mushi-mushi/web",te="1.20.0";var ze={bug:"\u26A0\uFE0F",slow:"\u{1F40C}",visual:"\u{1F3A8}",confusing:"\u{1F615}",other:"\u{1F4DD}"},pt="Feature request";function ht(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "Sent";case "classified":case "triaged":case "grouped":case "dispatched":return "Review";case "fixing":return "Fixing";case "fixed":case "resolved":case "completed":return "Fixed";case "dismissed":return "Closed";default:return t.replace(/_/g," ").slice(0,12)}}function _r(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "Submitted";case "classified":case "triaged":case "grouped":case "dispatched":return "In review";case "fixing":return "Fix in progress";case "fixed":case "resolved":case "completed":return "Fixed \u2014 confirm?";case "verified":return "Verified";case "reopened":return "Reopened";case "dismissed":return "Closed";default:return t.replace(/_/g," ")}}function We(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "sent";case "classified":case "triaged":case "grouped":case "dispatched":return "review";case "fixing":return "fixing";case "fixed":case "resolved":case "completed":return "fixed";case "verified":return "fixed";case "reopened":return "fixing";case "dismissed":return "closed";default:return "unknown"}}function Ve(t){let e=Date.parse(t);if(Number.isNaN(e))return "";let r=Date.now()-e;if(r<0)return "just now";let n=Math.floor(r/1e3);if(n<60)return "just now";let s=Math.floor(n/60);if(s<60)return `${s}m ago`;let i=Math.floor(s/60);if(i<24)return `${i}h ago`;let a=Math.floor(i/24);if(a<7)return `${a}d ago`;let o=Math.floor(a/7);return o<5?`${o}w ago`:new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ke(t){return t<10?`0${t}`:String(t)}var Ie=3,ve={category:1,intent:2,details:3};function Pr(t){return (t.metaKey||t.ctrlKey)&&t.key==="Enter"}function v(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Dr(t){let e=t.appDomain??Er({project_slug:t.appSlug??""}),r=v(Rr(t.appName)),n=Sr({project_slug:t.appSlug??"",sdk_origin:t.appDomain?`https://${t.appDomain}`:null});return n.length?`<span class="mushi-app-icon" data-mushi-favicon data-candidates="${v(JSON.stringify(n))}" data-initials="${r}" aria-hidden="true" title="${v(e??t.appName)}">
1746
- <img class="mushi-app-icon-img" src="${v(n[0])}" alt="" referrerpolicy="no-referrer" width="16" height="16" />
1723
+ `}var He="@mushi-mushi/web",he="1.21.0";var Ht={bug:"\u26A0\uFE0F",slow:"\u{1F40C}",visual:"\u{1F3A8}",confusing:"\u{1F615}",other:"\u{1F4DD}"},fr="Feature request";function br(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "Sent";case "classified":case "triaged":case "grouped":case "dispatched":return "Review";case "fixing":return "Fixing";case "fixed":case "resolved":case "completed":return "Fixed";case "dismissed":return "Closed";default:return t.replace(/_/g," ").slice(0,12)}}function ps(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "Submitted";case "classified":case "triaged":case "grouped":case "dispatched":return "In review";case "fixing":return "Fix in progress";case "fixed":case "resolved":case "completed":return "Fixed \u2014 confirm?";case "verified":return "Verified";case "reopened":return "Reopened";case "dismissed":return "Closed";default:return t.replace(/_/g," ")}}function Ot(t){switch(t){case "new":case "queued":case "pending":case "submitted":return "sent";case "classified":case "triaged":case "grouped":case "dispatched":return "review";case "fixing":return "fixing";case "fixed":case "resolved":case "completed":return "fixed";case "verified":return "fixed";case "reopened":return "fixing";case "dismissed":return "closed";default:return "unknown"}}function Bt(t){let e=Date.parse(t);if(Number.isNaN(e))return "";let r=Date.now()-e;if(r<0)return "just now";let n=Math.floor(r/1e3);if(n<60)return "just now";let s=Math.floor(n/60);if(s<60)return `${s}m ago`;let o=Math.floor(s/60);if(o<24)return `${o}h ago`;let l=Math.floor(o/24);if(l<7)return `${l}d ago`;let i=Math.floor(l/7);return i<5?`${i}w ago`:new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function yr(t){return t<10?`0${t}`:String(t)}var vr=3,Nt={category:1,intent:2,details:3};function hs(t){return (t.metaKey||t.ctrlKey)&&t.key==="Enter"}function b(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function ms(t){let e=t.appDomain??ts({project_slug:t.appSlug??""}),r=b(ns(t.appName)),n=es({project_slug:t.appSlug??"",sdk_origin:t.appDomain?`https://${t.appDomain}`:null});return n.length?`<span class="mushi-app-icon" data-mushi-favicon data-candidates="${b(JSON.stringify(n))}" data-initials="${r}" aria-hidden="true" title="${b(e??t.appName)}">
1724
+ <img class="mushi-app-icon-img" src="${b(n[0])}" alt="" referrerpolicy="no-referrer" width="16" height="16" />
1747
1725
  <span class="mushi-app-icon-initials" hidden>${r}</span>
1748
- </span>`:`<span class="mushi-app-icon mushi-app-icon-initials-only" aria-hidden="true">${r}</span>`}function Or(t){t.querySelectorAll("[data-mushi-favicon]").forEach(e=>{let r=e.querySelector(".mushi-app-icon-img"),n=e.querySelector(".mushi-app-icon-initials");if(!r||!n)return;let s=[];try{s=JSON.parse(e.dataset.candidates??"[]");}catch{s=[];}let i=0,a=()=>{i+=1,i<s.length?r.src=s[i]:(r.remove(),n.hidden=false,e.classList.add("mushi-app-icon-initials-only"));};r.onerror=a,r.onload=()=>{kr(r)&&a();};});}function Br(t){switch(t.step){case "category":return Hs(t);case "intent":return Ks(t);case "details":return Gs(t);case "success":return Ys(t);case "reports":return Us(t);case "report-detail":return Vs(t);case "leaderboard":return js(t);case "roadmap":return qs(t);case "account":return zs(t);case "cross-app-reports":return Ws(t);case "assistant":return Os(t)}}function Os(t){let e=t.callbacks.assistantLabel||"Ask",r=t.callbacks.assistantGreeting||"Ask me anything about this app.",n=t.callbacks.assistantSuggestions??[],i=t.assistantTurns.length===0?`<div class="mushi-assistant-greeting">${v(r)}</div>
1749
- ${n.length?`<div class="mushi-assistant-suggestions">${n.map(l=>`<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${v(l)}">${v(l)}</button>`).join("")}</div>`:""}`:t.assistantTurns.map(l=>{let g=l.role==="user"?"mushi-assistant-msg-user":"mushi-assistant-msg-bot",p=l.options&&l.options.length?`<div class="mushi-assistant-suggestions">${l.options.map(w=>`<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${v(w)}">${v(w)}</button>`).join("")}</div>`:"";return `<div class="mushi-assistant-msg ${g}">${v(l.text)}</div>${p}`}).join(""),a=t.assistantSending?'<div class="mushi-assistant-msg mushi-assistant-msg-bot mushi-assistant-thinking">\u2026</div>':"",o=t.assistantError?`<div class="mushi-assistant-error" role="alert">${v(t.assistantError)}</div>`:"";return `
1750
- ${re(t,{title:e,showBack:true})}
1726
+ </span>`:`<span class="mushi-app-icon mushi-app-icon-initials-only" aria-hidden="true">${r}</span>`}function gs(t){t.querySelectorAll("[data-mushi-favicon]").forEach(e=>{let r=e.querySelector(".mushi-app-icon-img"),n=e.querySelector(".mushi-app-icon-initials");if(!r||!n)return;let s=[];try{s=JSON.parse(e.dataset.candidates??"[]");}catch{s=[];}let o=0,l=()=>{o+=1,o<s.length?r.src=s[o]:(r.remove(),n.hidden=false,e.classList.add("mushi-app-icon-initials-only"));};r.onerror=l,r.onload=()=>{rs(r)&&l();};});}function bs(t){switch(t.step){case "category":return Di(t);case "intent":return Wi(t);case "details":return Vi(t);case "success":return Gi(t);case "reports":return Ni(t);case "report-detail":return zi(t);case "leaderboard":return Fi(t);case "roadmap":return Ui(t);case "account":return qi(t);case "cross-app-reports":return ji(t);case "assistant":return Ai(t)}}function Ai(t){let e=t.locale,r=t.callbacks.assistantLabel||e.assistant.defaultLabel,n=t.callbacks.assistantGreeting||e.assistant.defaultGreeting,s=t.callbacks.assistantSuggestions??[],l=t.assistantTurns.length===0?`<div class="mushi-assistant-greeting">${b(n)}</div>
1727
+ ${s.length?`<div class="mushi-assistant-suggestions">${s.map(m=>`<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${b(m)}">${b(m)}</button>`).join("")}</div>`:""}`:t.assistantTurns.map(m=>{let p=m.role==="user"?"mushi-assistant-msg-user":"mushi-assistant-msg-bot",g=m.options&&m.options.length?`<div class="mushi-assistant-suggestions">${m.options.map(u=>`<button type="button" class="mushi-assistant-chip" data-action="assistant-suggest" data-value="${b(u)}">${b(u)}</button>`).join("")}</div>`:"";return `<div class="mushi-assistant-msg ${p}">${b(m.text)}</div>${g}`}).join(""),i=t.assistantSending?`<div class="mushi-assistant-msg mushi-assistant-msg-bot mushi-assistant-thinking" role="status" aria-live="polite">${b(e.assistant.thinking)}</div>`:"",a=t.assistantError?`<div class="mushi-assistant-error" role="alert">${b(t.assistantError)}</div>`:"";return `
1728
+ ${ge(t,{title:r,showBack:true})}
1751
1729
  <div class="mushi-assistant">
1752
1730
  <div class="mushi-assistant-log">
1731
+ ${l}
1753
1732
  ${i}
1754
1733
  ${a}
1755
- ${o}
1756
1734
  </div>
1757
1735
  <form class="mushi-assistant-form" data-action="assistant-send">
1758
1736
  <textarea
1759
1737
  class="mushi-assistant-input"
1760
1738
  rows="1"
1761
- placeholder="Type your question\u2026"
1739
+ placeholder="${b(e.assistant.inputPlaceholder)}"
1762
1740
  ${t.assistantSending?"disabled":""}
1763
1741
  ></textarea>
1764
- <button type="submit" class="mushi-assistant-submit" ${t.assistantSending?"disabled":""} aria-label="Send">\u2191</button>
1742
+ <button type="submit" class="mushi-assistant-submit" ${t.assistantSending?"disabled":""} aria-label="${b(e.assistant.sendAriaLabel)}">\u2191</button>
1765
1743
  </form>
1766
1744
  </div>
1767
- `}function Nr(t){if(!t.sdkFreshness||t.config.outdatedBanner==="off"||t.config.outdatedBanner==="console-only")return "";let{latest:e,current:r,deprecated:n,message:s}=t.sdkFreshness;return !e&&!n?"":`
1745
+ `}function ys(t){if(!t.sdkFreshness||t.config.outdatedBanner==="off"||t.config.outdatedBanner==="console-only")return "";let{latest:e,current:r,deprecated:n,message:s}=t.sdkFreshness;return !e&&!n?"":`
1768
1746
  <div class="mushi-outdated" role="status">
1769
- <strong>Mushi SDK ${v(r)}</strong>
1770
- ${e?`latest is ${v(e)}.`:"needs attention."}
1771
- ${s?`<span>${v(s)}</span>`:""}
1747
+ <strong>Mushi SDK ${b(r)}</strong>
1748
+ ${e?`latest is ${b(e)}.`:"needs attention."}
1749
+ ${s?`<span>${b(s)}</span>`:""}
1772
1750
  </div>
1773
- `}function Fr(t){return t.config.brandFooter===false?"":`<div class="mushi-brand-footer">Powered by Mushi v${v(t.sdkVersion)}</div>`}function re(t,e){let r=t.locale,{title:n,showBack:s=false,step:i,eyebrow:a}=e,o=s?`<button type="button" class="mushi-back" data-action="back" aria-label="${v(r.widget.back)}">\u2190 ${v(r.widget.back)}</button>`:`<span class="mushi-header-eyebrow">${v(a??"Mushi \xB7 Report")}</span>`,l=i?`<span class="mushi-step-counter" aria-label="Step ${i} of ${Ie}"><b>${Ke(i)}</b> / ${Ke(Ie)}</span>`:"";return `
1751
+ `}function vs(t){return t.config.brandFooter===false?"":`<div class="mushi-brand-footer">${b(t.locale.flows.poweredBy.replace("{version}",t.sdkVersion))}</div>`}function ge(t,e){let r=t.locale,{title:n,showBack:s=false,step:o,eyebrow:l}=e,i=s?`<button type="button" class="mushi-back" data-action="back" aria-label="${b(r.widget.back)}">\u2190 ${b(r.widget.back)}</button>`:`<span class="mushi-header-eyebrow">${b(l??"Mushi \xB7 Report")}</span>`,a=o?`<span class="mushi-step-counter" aria-label="Step ${o} of ${vr}"><b>${yr(o)}</b> / ${yr(vr)}</span>`:"";return `
1774
1752
  <div class="mushi-header">
1775
- <div class="mushi-header-mark" aria-hidden="true">${t.pageFaviconHref?`<img class="mushi-header-host-icon" src="${v(t.pageFaviconHref)}" alt="" referrerpolicy="no-referrer" width="20" height="20" />`:"\u866B"}</div>
1753
+ <div class="mushi-header-mark" aria-hidden="true">${t.pageFaviconHref?`<img class="mushi-header-host-icon" src="${b(t.pageFaviconHref)}" alt="" referrerpolicy="no-referrer" width="20" height="20" />`:"\u866B"}</div>
1776
1754
  <div class="mushi-header-titles">
1777
- ${o}
1755
+ ${i}
1778
1756
  <h3>${n}</h3>
1779
1757
  </div>
1780
1758
  <div class="mushi-header-meta">
1781
- ${l}
1782
- <button type="button" class="mushi-close" data-action="close" aria-label="${v(r.widget.close)}">\u2715</button>
1759
+ ${a}
1760
+ <button type="button" class="mushi-close" data-action="close" aria-label="${b(r.widget.close)}">\u2715</button>
1783
1761
  </div>
1784
1762
  </div>
1785
- `}function mt(t,e){let r=[];for(let n=1;n<=Ie;n++){let s=n<e?"mushi-step-num done":n===e?"mushi-step-num active":"mushi-step-num";r.push(`<span class="${s}">${Ke(n)}</span>`),n<Ie&&r.push('<span class="mushi-step-sep" aria-hidden="true"></span>');}return `<div class="mushi-step-indicator" aria-hidden="true">${r.join("")}</div>`}function Hs(t){let e=t.locale,r=t.config.categories&&t.config.categories.length>0?t.config.categories.map(d=>({id:d.id,icon:d.icon??"\u{1F4AC}",label:d.label,desc:d.description??""})):["bug","slow","visual","confusing","other"].map(d=>({id:d,icon:ze[d],label:e.step1.categories[d],desc:e.step1.categoryDescriptions[d]})),n=({id:d,icon:m,label:c,desc:f})=>`
1786
- <button type="button" class="mushi-option-btn" data-category="${v(d)}" role="radio" aria-checked="false">
1787
- <span class="mushi-option-icon" aria-hidden="true">${v(m)}</span>
1763
+ `}function _i(t){let e=1;return t.callbacks.onFeatureBoardRequest&&(e+=1),t.callbacks.assistantEnabled&&(e+=1),t.rewardsState&&(e+=1),e+=1,e}function Pi(t){let e=t.locale,r=e.step1.moreNav,n=_i(t),s=`${e.step1.moreNavLabel} (${n})`,o=t.unreadCount(),l=o?`${r.yourReports} (${o} ${r.unreadNew})`:r.yourReports,i=[`<button type="button" class="mushi-option-btn mushi-reports-entry" data-action="reports">
1764
+ <span class="mushi-option-icon" aria-hidden="true">\u{1F4EC}</span>
1765
+ <div class="mushi-option-text">
1766
+ <span class="mushi-option-label">${b(l)}</span>
1767
+ <span class="mushi-option-desc">${b(r.yourReportsDesc)}</span>
1768
+ </div>
1769
+ <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1770
+ </button>`];t.callbacks.onFeatureBoardRequest&&i.push(`
1771
+ <button type="button" class="mushi-option-btn" data-action="roadmap">
1772
+ <span class="mushi-option-icon" aria-hidden="true">\u{1F5F3}\uFE0F</span>
1773
+ <div class="mushi-option-text">
1774
+ <span class="mushi-option-label">${b(r.communityIdeas)}</span>
1775
+ <span class="mushi-option-desc">${b(r.communityIdeasDesc)}</span>
1776
+ </div>
1777
+ <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1778
+ </button>`),t.callbacks.assistantEnabled&&i.push(`
1779
+ <button type="button" class="mushi-option-btn" data-action="assistant">
1780
+ <span class="mushi-option-icon" aria-hidden="true">\u{1F4AC}</span>
1781
+ <div class="mushi-option-text">
1782
+ <span class="mushi-option-label">${b(t.callbacks.assistantLabel||e.assistant.defaultLabel)}</span>
1783
+ <span class="mushi-option-desc">${b(e.assistant.hubDescription)}</span>
1784
+ </div>
1785
+ <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1786
+ </button>`),t.rewardsState&&i.push(`
1787
+ <button type="button" class="mushi-link-btn mushi-more-nav-link" data-action="open-leaderboard">\u{1F3C6} ${b(r.leaderboard)}</button>`),i.push(`
1788
+ <button type="button" class="mushi-link-btn mushi-more-nav-link" data-action="open-account">
1789
+ ${t.testerInfo?`\u{1F464} ${b(t.testerInfo.public_handle??t.testerInfo.display_name??r.myAccount)}`:`\u{1F310} ${b(r.joinCommunity)}`}
1790
+ </button>`);let a=t.showMoreNav?`<div class="mushi-more-nav-panel">${i.join("")}</div>`:"";return `
1791
+ <div class="mushi-more-nav">
1792
+ <button
1793
+ type="button"
1794
+ class="mushi-more-toggle mushi-more-nav-toggle"
1795
+ data-action="toggle-more-nav"
1796
+ aria-expanded="${t.showMoreNav?"true":"false"}"
1797
+ >
1798
+ <span class="mushi-more-toggle-text">${b(s)}</span>
1799
+ <span class="mushi-more-toggle-arrow" aria-hidden="true">${t.showMoreNav?"\u25BE":"\u25B8"}</span>
1800
+ </button>
1801
+ ${a}
1802
+ </div>
1803
+ `}function Di(t){let e=t.locale,r=t.config.categories&&t.config.categories.length>0?t.config.categories.map(u=>({id:u.id,icon:u.icon??"\u{1F4AC}",label:u.label,desc:u.description??""})):["bug","slow","visual","confusing","other"].map(u=>({id:u,icon:Ht[u],label:e.step1.categories[u],desc:e.step1.categoryDescriptions[u]})),n=({id:u,icon:c,label:h,desc:y})=>`
1804
+ <button type="button" class="mushi-option-btn" data-category="${b(u)}" role="radio" aria-checked="false">
1805
+ <span class="mushi-option-icon" aria-hidden="true">${b(c)}</span>
1788
1806
  <div class="mushi-option-text">
1789
- <span class="mushi-option-label">${v(c)}</span>
1790
- ${f?`<span class="mushi-option-desc">${v(f)}</span>`:""}
1807
+ <span class="mushi-option-label">${b(h)}</span>
1808
+ ${y?`<span class="mushi-option-desc">${b(y)}</span>`:""}
1791
1809
  </div>
1792
1810
  <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1793
1811
  </button>
1794
- `,s=t.config.categories&&t.config.categories.length>0,i=1,a=s?r:r.slice(0,i),o=s?[]:r.slice(i),l=o.length>0,g=a.map(n).join(""),p=o.map(n).join(""),w=l?t.showAllCategories?`<div class="mushi-categories-expanded">${p}</div>`:`<button type="button" class="mushi-more-toggle" data-action="show-all-categories">
1812
+ `,s=t.config.categories&&t.config.categories.length>0,o=1,l=s?r:r.slice(0,o),i=s?[]:r.slice(o),a=i.length>0,m=l.map(n).join(""),p=i.map(n).join(""),g=a?t.showAllCategories?`<div class="mushi-categories-expanded">${p}</div>`:`<button type="button" class="mushi-more-toggle" data-action="show-all-categories">
1795
1813
  <span class="mushi-more-toggle-text">More issue types</span>
1796
- <span class="mushi-more-toggle-count">${o.length} more</span>
1814
+ <span class="mushi-more-toggle-count">${i.length} more</span>
1797
1815
  <span class="mushi-more-toggle-arrow" aria-hidden="true">\u2192</span>
1798
1816
  </button>`:"";return `
1799
- ${re(t,{title:e.step1.heading,step:ve.category})}
1800
- ${t.config.betaMode?.enabled?Fs(t):""}
1801
- <div class="mushi-body" role="radiogroup" aria-label="${v(e.step1.heading)}">
1802
- <button type="button" class="mushi-option-btn mushi-reports-entry" data-action="reports">
1803
- <span class="mushi-option-icon" aria-hidden="true">\u{1F4EC}</span>
1804
- <div class="mushi-option-text">
1805
- <span class="mushi-option-label">Your reports${t.unreadCount()?` (${t.unreadCount()} new)`:""}</span>
1806
- <span class="mushi-option-desc">See status, developer replies, and respond</span>
1807
- </div>
1808
- <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1809
- </button>
1810
- ${Bs(t)}
1811
- ${t.callbacks.onFeatureBoardRequest?`
1812
- <button type="button" class="mushi-option-btn" data-action="roadmap">
1813
- <span class="mushi-option-icon" aria-hidden="true">\u{1F5F3}\uFE0F</span>
1814
- <div class="mushi-option-text">
1815
- <span class="mushi-option-label">Community ideas</span>
1816
- <span class="mushi-option-desc">Vote on features and see what shipped</span>
1817
- </div>
1818
- <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1819
- </button>`:""}
1817
+ ${ge(t,{title:e.step1.heading,step:Nt.category})}
1818
+ ${t.config.betaMode?.enabled?Bi(t):""}
1819
+ <div class="mushi-body" role="radiogroup" aria-label="${b(e.step1.heading)}">
1820
+ <p class="mushi-section-label">${b(e.step1.reportSectionLabel)}</p>
1821
+ ${Hi(t)}
1822
+ ${m}
1820
1823
  ${g}
1821
- ${w}
1822
- ${t.rewardsState?Zs(t):""}
1823
- <div class="mushi-community-footer">
1824
- <button type="button" class="mushi-link-btn mushi-community-btn" data-action="open-account">
1825
- ${t.testerInfo?`\u{1F464} ${v(t.testerInfo.public_handle??t.testerInfo.display_name??"My account")}`:"\u{1F310} Join community \xB7 Track reports across apps"}
1826
- </button>
1827
- ${t.rewardsState?'<button type="button" class="mushi-link-btn" data-action="open-leaderboard">\u{1F3C6} Leaderboard</button>':""}
1828
- </div>
1824
+ ${t.rewardsState?Xi(t):""}
1825
+ ${Pi(t)}
1829
1826
  </div>
1830
- ${mt(t,ve.category)}
1831
- `}function Bs(t){if(!(t.config.featureRequestCard!==false))return "";let r=t.config.featureRequestLabel||"Feature request",n=t.config.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise";return `
1827
+ `}function Hi(t){if(!(t.config.featureRequestCard!==false))return "";let r=t.locale.flows.featureRequest,n=t.config.featureRequestLabel||r.label,s=t.config.featureRequestDescription||r.description;return `
1832
1828
  <button
1833
1829
  type="button"
1834
1830
  class="mushi-option-btn mushi-feature-entry"
1835
1831
  data-action="feature-request"
1836
- aria-label="${v(r)}"
1832
+ aria-label="${b(n)}"
1837
1833
  >
1838
1834
  <span class="mushi-option-icon" aria-hidden="true">\u2728</span>
1839
1835
  <div class="mushi-option-text">
1840
- <span class="mushi-option-label">${v(r)}</span>
1841
- <span class="mushi-option-desc">${v(n)}</span>
1836
+ <span class="mushi-option-label">${b(n)}</span>
1837
+ <span class="mushi-option-desc">${b(s)}</span>
1842
1838
  </div>
1843
1839
  <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
1844
1840
  </button>
1845
- `}function Ns(t){let e=t.config.betaMode?.changelogItems;if(!e?.length)return "";let r=e[0],n=r.items.map(i=>`<li>\u2022 ${v(i)}</li>`).join("");return `
1841
+ `}function Oi(t){let e=t.config.betaMode?.changelogItems;if(!e?.length)return "";let r=e[0],n=r.items.map(o=>`<li>\u2022 ${b(o)}</li>`).join("");return `
1846
1842
  <details class="mushi-changelog">
1847
- <summary class="mushi-changelog-summary">${r.date?`What\u2019s new in ${v(r.version)} \xB7 ${v(r.date)}`:`What\u2019s new in ${v(r.version)}`}</summary>
1843
+ <summary class="mushi-changelog-summary">${r.date?`What\u2019s new in ${b(r.version)} \xB7 ${b(r.date)}`:`What\u2019s new in ${b(r.version)}`}</summary>
1848
1844
  <ul class="mushi-changelog-list">${n}</ul>
1849
1845
  </details>
1850
- `}function Fs(t){let e=t.config.betaMode,r=v(e.appName??"This app"),n=e.message?v(e.message):`${r} is in early development \u2014 updates ship weekly`,s=e.contactEmail?v(e.contactEmail):null,i=e.perks??[];return `
1846
+ `}function Bi(t){let e=t.config.betaMode,r=b(e.appName??"This app"),n=e.message?b(e.message):`${r} is in early development`,s=e.contactEmail?b(e.contactEmail):null,o=e.perks??[];return `
1851
1847
  <div class="mushi-beta-strip" role="note" aria-label="Beta status">
1852
1848
  <div class="mushi-beta-strip-row">
1853
1849
  <span class="mushi-beta-tag" aria-hidden="true">BETA</span>
1854
1850
  <span class="mushi-beta-msg">${n}</span>
1855
1851
  </div>
1856
1852
  ${s?`<div class="mushi-beta-contact-hint">Reports go to ${s} \xB7 reviewed by the team</div>`:""}
1857
- ${i.length>0?`
1853
+ ${o.length>0?`
1858
1854
  <ul class="mushi-beta-perks" aria-label="Beta tester perks">
1859
- ${i.map(a=>`<li>\u2713 ${v(a)}</li>`).join("")}
1855
+ ${o.map(l=>`<li>\u2713 ${b(l)}</li>`).join("")}
1860
1856
  </ul>
1861
1857
  `:""}
1862
- ${Ns(t)}
1858
+ ${Oi(t)}
1863
1859
  </div>
1864
- `}function Us(t){let e=t.reporterReports.map(n=>{let s=n.summary??n.description??`Report ${n.id.slice(0,8)}`,i=We(n.status),a=Ve(n.created_at),o=n.unread_count&&n.unread_count>0?`<span class="mushi-unread-badge" aria-label="${n.unread_count} unread">${n.unread_count}</span>`:"";return `
1865
- <button type="button" class="mushi-report-row" data-report-id="${v(n.id)}" aria-label="View report: ${v(s)}">
1860
+ `}function Ni(t){let e=t.locale.flows,r=t.reporterReports.map(s=>{let o=s.summary??s.description??`Report ${s.id.slice(0,8)}`,l=Ot(s.status),i=Bt(s.created_at),a=s.unread_count&&s.unread_count>0?`<span class="mushi-unread-badge" aria-label="${s.unread_count} unread">${s.unread_count}</span>`:"";return `
1861
+ <button type="button" class="mushi-report-row" data-report-id="${b(s.id)}" aria-label="View report: ${b(o)}">
1866
1862
  <div class="mushi-report-main">
1867
- <span class="mushi-report-title">${v(s)}</span>
1863
+ <span class="mushi-report-title">${b(o)}</span>
1868
1864
  <span class="mushi-report-meta">
1869
- <span class="mushi-report-status mushi-status-${i}">${v(ht(n.status))}</span>
1870
- ${a?`<span class="mushi-report-when">${v(a)}</span>`:""}
1871
- ${o}
1865
+ <span class="mushi-report-status mushi-status-${l}">${b(br(s.status))}</span>
1866
+ ${i?`<span class="mushi-report-when">${b(i)}</span>`:""}
1867
+ ${a}
1872
1868
  </span>
1873
1869
  </div>
1874
1870
  <span class="mushi-report-chevron" aria-hidden="true">\u203A</span>
1875
- </button>`}).join(""),r=t.rewardsState?'<button type="button" class="mushi-leaderboard-link" data-action="open-leaderboard">\u{1F3C6} Leaderboard</button>':"";return `
1876
- ${re(t,{title:"Your reports",showBack:true,eyebrow:"Mushi \xB7 Inbox"})}
1871
+ </button>`}).join(""),n=t.rewardsState?`<button type="button" class="mushi-leaderboard-link" data-action="open-leaderboard">\u{1F3C6} ${b(e.reports.leaderboardLink)}</button>`:"";return `
1872
+ ${ge(t,{title:e.reports.title,showBack:true,eyebrow:e.eyebrows.inbox})}
1877
1873
  <div class="mushi-body">
1878
- ${t.reporterLoading?'<p class="mushi-muted">Loading reports\u2026</p>':""}
1879
- ${t.reporterError?`<p class="mushi-error-inline">${v(t.reporterError)}</p>`:""}
1880
- ${e||(t.reporterLoading?"":'<p class="mushi-muted">No reports from this browser yet.</p>')}
1881
- ${r}
1874
+ ${t.reporterLoading?`<p class="mushi-muted">${b(e.reports.loading)}</p>`:""}
1875
+ ${t.reporterError?`<p class="mushi-error-inline">${b(t.reporterError)}</p>`:""}
1876
+ ${r||(t.reporterLoading?"":`<p class="mushi-muted">${b(e.reports.empty)}</p>`)}
1877
+ ${n}
1882
1878
  </div>
1883
- `}function qs(t){let e=t.featureBoard.map(r=>{let n=String(r.id??""),s=v(String(r.subject??"Untitled idea")),i=Number(r.vote_count??0),a=!!r.shipped_at,o=!!r.my_vote,l=a?"Shipped":String(r.status_label??r.status??"open");return `
1879
+ `}function Ui(t){let e=t.locale.flows,r=t.featureBoard.map(n=>{let s=String(n.id??""),o=b(String(n.subject??e.roadmap.untitled)),l=Number(n.vote_count??0),i=!!n.shipped_at,a=!!n.my_vote,m=i?e.roadmap.shipped:String(n.status_label??n.status??"open"),p=e.roadmap.voteCount.replace("{n}",String(l));return `
1884
1880
  <div class="mushi-report-row mushi-roadmap-row">
1885
1881
  <div class="mushi-report-main">
1886
- <span class="mushi-report-title">${s}</span>
1882
+ <span class="mushi-report-title">${o}</span>
1887
1883
  <span class="mushi-report-meta">
1888
- <span class="mushi-report-status">${v(l)}</span>
1889
- <span class="mushi-report-when">${i} vote${i===1?"":"s"}</span>
1884
+ <span class="mushi-report-status">${b(m)}</span>
1885
+ <span class="mushi-report-when">${b(p)}</span>
1890
1886
  </span>
1891
1887
  </div>
1892
1888
  ${t.callbacks.onFeatureBoardVote?`
1893
- <button type="button" class="mushi-vote-btn" data-vote-id="${v(n)}" aria-pressed="${o}">
1894
- ${o?"Voted":"Vote"}
1889
+ <button type="button" class="mushi-vote-btn" data-vote-id="${b(s)}" aria-pressed="${a}">
1890
+ ${a?b(e.roadmap.voted):b(e.roadmap.vote)}
1895
1891
  </button>`:""}
1896
1892
  </div>`}).join("");return `
1897
- ${re(t,{title:"Community ideas",showBack:true,eyebrow:"Mushi \xB7 Roadmap"})}
1893
+ ${ge(t,{title:e.roadmap.title,showBack:true,eyebrow:e.eyebrows.roadmap})}
1898
1894
  <div class="mushi-body">
1899
- ${t.reporterLoading?'<p class="mushi-muted">Loading ideas\u2026</p>':""}
1900
- ${t.reporterError?`<p class="mushi-error-inline">${v(t.reporterError)}</p>`:""}
1901
- ${e||(t.reporterLoading?"":'<p class="mushi-muted">No community ideas yet. Be the first to suggest one.</p>')}
1895
+ ${t.reporterLoading?`<p class="mushi-muted">${b(e.roadmap.loading)}</p>`:""}
1896
+ ${t.reporterError?`<p class="mushi-error-inline">${b(t.reporterError)}</p>`:""}
1897
+ ${r||(t.reporterLoading?"":`<p class="mushi-muted">${b(e.roadmap.empty)}</p>`)}
1902
1898
  </div>
1903
- `}function js(t){let e=t.globalLeaderboard!==null||t.globalLeaderboardLoading,r=e?t.globalLeaderboard??[]:(t.leaderboardEntries??[]).map(o=>({tester_id:"",public_handle:null,display_name:o.display_name,rank:0,points_30d:o.points_30d,total_points:o.total_points})),n=e?t.globalLeaderboardLoading:t.leaderboardLoading,s=t.testerReputation?.rank??null,i=r.map((o,l)=>{let g=o.rank||l+1,p=t.testerReputation&&o.tester_id===t.testerReputation.tester_id;return `
1904
- <div class="mushi-lb-row ${g===1?"mushi-lb-top":""}${p?" mushi-lb-me":""}">
1905
- <span class="mushi-lb-rank">#${g}</span>
1906
- <span class="mushi-lb-name">${v(o.public_handle??o.display_name??"Anon")}</span>
1907
- <span class="mushi-lb-pts">${(o.points_30d??o.total_points).toLocaleString()} pts</span>
1899
+ `}function Fi(t){let e=t.locale.flows,r=t.globalLeaderboard!==null||t.globalLeaderboardLoading,n=r?t.globalLeaderboard??[]:(t.leaderboardEntries??[]).map(a=>({tester_id:"",public_handle:null,display_name:a.display_name,rank:0,points_30d:a.points_30d,total_points:a.total_points})),s=r?t.globalLeaderboardLoading:t.leaderboardLoading,o=t.testerReputation?.rank??null,l=n.map((a,m)=>{let p=a.rank||m+1,g=t.testerReputation&&a.tester_id===t.testerReputation.tester_id;return `
1900
+ <div class="mushi-lb-row ${p===1?"mushi-lb-top":""}${g?" mushi-lb-me":""}">
1901
+ <span class="mushi-lb-rank">#${p}</span>
1902
+ <span class="mushi-lb-name">${b(a.public_handle??a.display_name??e.leaderboard.anon)}</span>
1903
+ <span class="mushi-lb-pts">${(a.points_30d??a.total_points).toLocaleString()} pts</span>
1908
1904
  </div>
1909
- `}).join(""),a=s?`<div class="mushi-lb-myrank">You are ranked <strong>#${s}</strong> this month</div>`:t.testerJwt?"":'<button type="button" class="mushi-link-btn" data-action="open-account">Sign in to see your rank \u2192</button>';return `
1910
- ${re(t,{title:"\u{1F3C6} Global Leaderboard",showBack:true,eyebrow:"Mushi \xB7 Community"})}
1905
+ `}).join(""),i=o?`<div class="mushi-lb-myrank">${b(e.leaderboard.myRank.replace("{rank}",String(o)))}</div>`:t.testerJwt?"":`<button type="button" class="mushi-link-btn" data-action="open-account">${b(e.leaderboard.signInPrompt)}</button>`;return `
1906
+ ${ge(t,{title:e.leaderboard.title,showBack:true,eyebrow:e.eyebrows.community})}
1911
1907
  <div class="mushi-body">
1912
- ${n?'<p class="mushi-muted">Loading leaderboard\u2026</p>':""}
1913
- ${!n&&!r.length?'<p class="mushi-muted">No contributors yet \u2014 be the first!</p>':""}
1914
- <div class="mushi-lb-list">${i}</div>
1915
- ${a}
1916
- <p class="mushi-lb-note">Global contributors this month \xB7 Points refresh monthly</p>
1908
+ ${s?`<p class="mushi-muted">${b(e.leaderboard.loading)}</p>`:""}
1909
+ ${!s&&!n.length?`<p class="mushi-muted">${b(e.leaderboard.empty)}</p>`:""}
1910
+ <div class="mushi-lb-list">${l}</div>
1911
+ ${i}
1912
+ <p class="mushi-lb-note">${b(e.leaderboard.footer)}</p>
1917
1913
  </div>
1918
- `}function zs(t){let e=t.testerInfo;if(e){let r=e.public_handle??e.display_name??"Tester",n=t.testerReputation;return `
1919
- ${re(t,{title:"\u866B Mushi Account",showBack:true,eyebrow:"Mushi \xB7 Identity"})}
1914
+ `}function qi(t){let e=t.locale.flows,r=t.testerInfo;if(r){let n=r.public_handle??r.display_name??e.leaderboard.anon,s=t.testerReputation,o=s?e.account.rankSummary.replace("{rank}",String(s.rank??"\u2014")).replace("{points}",(s.points_30d??0).toLocaleString()):"";return `
1915
+ ${ge(t,{title:e.account.title,showBack:true,eyebrow:e.eyebrows.identity})}
1920
1916
  <div class="mushi-body">
1921
1917
  <div class="mushi-account-card">
1922
- <div class="mushi-account-avatar">${v(r.charAt(0).toUpperCase())}</div>
1918
+ <div class="mushi-account-avatar">${b(n.charAt(0).toUpperCase())}</div>
1923
1919
  <div class="mushi-account-info">
1924
- <strong>${v(r)}</strong>
1925
- ${n?`<span class="mushi-account-rank">Rank #${n.rank??"\u2014"} \xB7 ${(n.points_30d??0).toLocaleString()} pts this month</span>`:""}
1920
+ <strong>${b(n)}</strong>
1921
+ ${s?`<span class="mushi-account-rank">${b(o)}</span>`:""}
1926
1922
  </div>
1927
1923
  </div>
1928
1924
  <button type="button" class="mushi-nav-item" data-action="open-cross-app-reports">
1929
- My reports across all apps \u2192
1925
+ ${b(e.account.crossAppReports)}
1930
1926
  </button>
1931
1927
  <button type="button" class="mushi-nav-item" data-action="open-global-leaderboard">
1932
- View global leaderboard \u2192
1928
+ ${b(e.account.viewLeaderboard)}
1933
1929
  </button>
1934
- <button type="button" class="mushi-link-btn" data-action="sign-out-tester">Sign out</button>
1930
+ <button type="button" class="mushi-link-btn" data-action="sign-out-tester">${b(e.account.signOut)}</button>
1935
1931
  </div>
1936
1932
  `}return t.magicLinkSent?`
1937
- ${re(t,{title:"\u866B Check your email",showBack:true,eyebrow:"Mushi \xB7 Sign in"})}
1933
+ ${ge(t,{title:e.account.checkEmailTitle,showBack:true,eyebrow:e.eyebrows.signIn})}
1938
1934
  <div class="mushi-body">
1939
- <p class="mushi-muted">We sent a sign-in link to <strong>${v(t.magicLinkEmail)}</strong>. Click it to connect your reports across apps and join the community.</p>
1940
- <button type="button" class="mushi-link-btn" data-action="resend-magic-link">Resend email</button>
1941
- ${t.magicLinkError?`<p class="mushi-error">${v(t.magicLinkError)}</p>`:""}
1935
+ <p class="mushi-muted">${b(e.account.magicLinkSent.replace("{email}",t.magicLinkEmail))}</p>
1936
+ <button type="button" class="mushi-link-btn" data-action="resend-magic-link">${b(e.account.resendEmail)}</button>
1937
+ ${t.magicLinkError?`<p class="mushi-error">${b(t.magicLinkError)}</p>`:""}
1942
1938
  </div>
1943
1939
  `:`
1944
- ${re(t,{title:"\u866B Join the community",showBack:true,eyebrow:"Mushi \xB7 Sign in"})}
1940
+ ${ge(t,{title:e.account.joinTitle,showBack:true,eyebrow:e.eyebrows.signIn})}
1945
1941
  <div class="mushi-body">
1946
- <p class="mushi-muted">Sign in to see your reports across all apps and climb the global leaderboard. No password needed.</p>
1947
- <label class="mushi-label" for="mushi-email-input">Email address</label>
1942
+ <p class="mushi-muted">${b(e.account.signInPrompt)}</p>
1943
+ <label class="mushi-label" for="mushi-email-input">${b(e.account.emailLabel)}</label>
1948
1944
  <input
1949
1945
  id="mushi-email-input"
1950
1946
  type="email"
1951
1947
  class="mushi-textarea"
1952
1948
  data-role="magic-link-email"
1953
- placeholder="you@example.com"
1949
+ placeholder="${b(e.account.emailPlaceholder)}"
1954
1950
  autocomplete="email"
1955
- value="${v(t.magicLinkEmail)}"
1951
+ value="${b(t.magicLinkEmail)}"
1956
1952
  style="padding: 10px 12px; height: auto; resize: none;"
1957
1953
  />
1958
- ${t.magicLinkError?`<p class="mushi-error">${v(t.magicLinkError)}</p>`:""}
1954
+ ${t.magicLinkError?`<p class="mushi-error">${b(t.magicLinkError)}</p>`:""}
1959
1955
  <button type="button" class="mushi-submit" data-action="send-magic-link"${t.magicLinkSending?' disabled aria-disabled="true"':""}>
1960
- <span>${t.magicLinkSending?"Sending\u2026":"Send sign-in link"}</span><span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
1956
+ <span>${t.magicLinkSending?b(e.account.sending):b(e.account.sendLink)}</span><span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
1961
1957
  </button>
1962
1958
  </div>
1963
- `}function Ws(t){let e=t.crossAppReports??[],r=new Map;for(let s of e){let i=s.project_id??"unknown";r.has(i)||r.set(i,{name:s.app_name??"Unknown App",slug:s.app_slug??null,domain:s.app_domain??null,reports:[]}),r.get(i).reports.push(s);}let n=[...r.entries()].map(([s,i])=>`
1959
+ `}function ji(t){let e=t.locale.flows,r=t.crossAppReports??[],n=new Map;for(let o of r){let l=o.project_id??"unknown";n.has(l)||n.set(l,{name:o.app_name??e.crossApp.unknownApp,slug:o.app_slug??null,domain:o.app_domain??null,reports:[]}),n.get(l).reports.push(o);}let s=[...n.entries()].map(([o,l])=>`
1964
1960
  <div class="mushi-xapp-group">
1965
1961
  <div class="mushi-xapp-app-head">
1966
- ${Dr({appName:i.name,appSlug:i.slug,appDomain:i.domain})}
1967
- <h4 class="mushi-xapp-app-name">${v(i.name)}</h4>
1962
+ ${ms({appName:l.name,appSlug:l.slug,appDomain:l.domain})}
1963
+ <h4 class="mushi-xapp-app-name">${b(l.name)}</h4>
1968
1964
  </div>
1969
- ${i.reports.map(o=>{let l=We(o.status);return `
1970
- <div class="mushi-report-row" data-report-id="${v(o.id)}" tabindex="0" role="button">
1971
- <span class="mushi-report-status mushi-status-${l}">${v(ht(o.status))}</span>
1972
- <span class="mushi-report-title">${v(o.title??o.category)}</span>
1973
- <span class="mushi-report-when">${v(Ve(o.created_at))}</span>
1965
+ ${l.reports.map(a=>{let m=Ot(a.status);return `
1966
+ <div class="mushi-report-row" data-report-id="${b(a.id)}" tabindex="0" role="button">
1967
+ <span class="mushi-report-status mushi-status-${m}">${b(br(a.status))}</span>
1968
+ <span class="mushi-report-title">${b(a.title??a.category)}</span>
1969
+ <span class="mushi-report-when">${b(Bt(a.created_at))}</span>
1974
1970
  </div>
1975
1971
  `}).join("")}
1976
1972
  </div>
1977
1973
  `).join("");return `
1978
- ${re(t,{title:"My reports",showBack:true,eyebrow:"Mushi \xB7 All apps"})}
1974
+ ${ge(t,{title:e.crossApp.title,showBack:true,eyebrow:e.eyebrows.allApps})}
1979
1975
  <div class="mushi-body">
1980
- ${t.crossAppLoading?'<p class="mushi-muted">Loading your reports\u2026</p>':""}
1981
- ${!t.crossAppLoading&&!e.length?'<p class="mushi-muted">No reports filed yet.</p>':""}
1982
- ${n}
1976
+ ${t.crossAppLoading?`<p class="mushi-muted">${b(e.crossApp.loading)}</p>`:""}
1977
+ ${!t.crossAppLoading&&!r.length?`<p class="mushi-muted">${b(e.crossApp.empty)}</p>`:""}
1978
+ ${s}
1983
1979
  </div>
1984
- `}function Vs(t){let e=t.reporterReports.find(a=>a.id===t.selectedReportId),r=e?.status??"unknown",n=We(r),s=e?.created_at?Ve(e.created_at):"",i=t.reporterComments.map(a=>`
1985
- <div class="mushi-thread-comment ${a.author_kind}">
1986
- <strong>${v(a.author_kind==="reporter"?"You":a.author_name??"Developer")}</strong>
1987
- <p>${v(a.body)}</p>
1980
+ `}function zi(t){let e=t.locale.flows,r=t.reporterReports.find(i=>i.id===t.selectedReportId),n=r?.status??"unknown",s=Ot(n),o=r?.created_at?Bt(r.created_at):"",l=t.reporterComments.map(i=>`
1981
+ <div class="mushi-thread-comment ${i.author_kind}">
1982
+ <strong>${b(i.author_kind==="reporter"?"You":i.author_name??"Developer")}</strong>
1983
+ <p>${b(i.body)}</p>
1988
1984
  </div>
1989
1985
  `).join("");return `
1990
- ${re(t,{title:"Report thread",showBack:true,eyebrow:"Mushi \xB7 Inbox"})}
1986
+ ${ge(t,{title:e.thread.title,showBack:true,eyebrow:e.eyebrows.thread})}
1991
1987
  <div class="mushi-body">
1992
1988
  <div class="mushi-thread-summary">
1993
1989
  <div class="mushi-thread-summary-meta">
1994
- <span class="mushi-report-status mushi-status-${n}">${v(_r(r))}</span>
1995
- ${s?`<span class="mushi-report-when">Reported ${v(s)}</span>`:""}
1990
+ <span class="mushi-report-status mushi-status-${s}">${b(ps(n))}</span>
1991
+ ${o?`<span class="mushi-report-when">Reported ${b(o)}</span>`:""}
1996
1992
  </div>
1997
- <p>${v(e?.summary??e?.description??"Report details")}</p>
1993
+ <p>${b(r?.summary??r?.description??"Report details")}</p>
1998
1994
  </div>
1999
1995
  <div class="mushi-thread">
2000
- ${t.reporterLoading?'<p class="mushi-muted">Loading thread\u2026</p>':i||'<p class="mushi-muted">No developer replies yet.</p>'}
1996
+ ${t.reporterLoading?`<p class="mushi-muted">${b(e.thread.loading)}</p>`:l||`<p class="mushi-muted">${b(e.thread.empty)}</p>`}
2001
1997
  </div>
2002
- ${["fixed","resolved","verified"].includes(r)?`
1998
+ ${["fixed","resolved","verified"].includes(n)?`
2003
1999
  <div class="mushi-verify-actions" role="group" aria-label="Fix verification">
2004
- <button type="button" class="mushi-intent-btn" data-action="reporter-confirms">Yes, fixed for me</button>
2005
- <button type="button" class="mushi-intent-btn" data-action="reporter-not-fixed">Not fixed yet</button>
2000
+ <button type="button" class="mushi-option-btn" data-action="reporter-confirms">${b(e.thread.confirmFixed)}</button>
2001
+ <button type="button" class="mushi-option-btn" data-action="reporter-not-fixed">${b(e.thread.notFixed)}</button>
2006
2002
  </div>
2007
2003
  `:""}
2008
2004
  <textarea class="mushi-textarea" data-role="reporter-reply" rows="3" placeholder="Reply to the developer\u2026"></textarea>
@@ -2010,32 +2006,32 @@
2010
2006
  <span>Reply</span><span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
2011
2007
  </button>
2012
2008
  </div>
2013
- `}function Ks(t){let e=t.locale,r=t.selectedCategory,i=(t.resolveCustomCategory(r)?.intents??(e.step2.intents[r]||[])).map(l=>`
2014
- <button type="button" class="mushi-intent-btn" data-intent="${v(l)}">
2015
- ${v(l)}
2009
+ `}function Wi(t){let e=t.locale,r=t.selectedCategory,o=(t.resolveCustomCategory(r)?.intents??(e.step2.intents[r]||[])).map(a=>`
2010
+ <button type="button" class="mushi-option-btn" data-intent="${b(a)}">
2011
+ <span class="mushi-option-text"><span class="mushi-option-label">${b(a)}</span></span>
2012
+ <span class="mushi-option-arrow" aria-hidden="true">\u2192</span>
2016
2013
  </button>
2017
- `).join(""),a=t.categoryIcon(r),o=t.categoryLabel(r);return `
2018
- ${re(t,{title:e.step2.heading,showBack:true,step:ve.intent})}
2014
+ `).join(""),l=t.categoryIcon(r),i=t.categoryLabel(r);return `
2015
+ ${ge(t,{title:e.step2.heading,showBack:true,step:Nt.intent})}
2019
2016
  <div class="mushi-body">
2020
2017
  <div class="mushi-selected-category">
2021
- <span aria-hidden="true">${v(a)}</span>
2022
- <span>${v(o)}</span>
2018
+ <span aria-hidden="true">${b(l)}</span>
2019
+ <span>${b(i)}</span>
2023
2020
  </div>
2024
2021
  <div class="mushi-intents">
2025
- ${i}
2022
+ ${o}
2026
2023
  </div>
2027
2024
  </div>
2028
- ${mt(t,ve.intent)}
2029
- `}function Gs(t){let e=t.locale,r=t.effectiveMinLength(),n=t.screenshotCapturing?e.step3.screenshotCapturing:t.screenshotError?e.step3.screenshotFailed:t.screenshotAttached?e.step3.screenshotAttached:e.step3.screenshotButton,s=["mushi-attach-btn",t.screenshotAttached?"active":"",t.screenshotError?"error":"",t.screenshotCapturing?"loading":""].filter(Boolean).join(" "),i=t.elementCapturing?e.step3.elementCapturing:t.elementSelected?e.step3.elementSelected:e.step3.elementButton,a=["mushi-attach-btn",t.elementSelected?"active":"",t.elementCapturing?"loading":""].filter(Boolean).join(" "),o=e.step3.examplePrompts.map(l=>`<button type="button" class="mushi-example-chip" data-example="${v(l)}">${v(l)}</button>`).join("");return `
2030
- ${re(t,{title:e.step3.heading,showBack:true,step:ve.details})}
2025
+ `}function Vi(t){let e=t.locale,r=t.effectiveMinLength(),n=t.screenshotCapturing?e.step3.screenshotCapturing:t.screenshotError?e.step3.screenshotFailed:t.screenshotAttached?e.step3.screenshotAttached:e.step3.screenshotButton,s=["mushi-attach-btn",t.screenshotAttached?"active":"",t.screenshotError?"error":"",t.screenshotCapturing?"loading":""].filter(Boolean).join(" "),o=t.elementCapturing?e.step3.elementCapturing:t.elementSelected?e.step3.elementSelected:e.step3.elementButton,l=["mushi-attach-btn",t.elementSelected?"active":"",t.elementCapturing?"loading":""].filter(Boolean).join(" "),i=e.step3.examplePrompts.map(a=>`<button type="button" class="mushi-example-chip" data-example="${b(a)}">${b(a)}</button>`).join("");return `
2026
+ ${ge(t,{title:e.step3.heading,showBack:true,step:Nt.details})}
2031
2027
  <div class="mushi-body">
2032
- <div class="mushi-example-chips" aria-label="Example prompts">${o}</div>
2028
+ <div class="mushi-example-chips" aria-label="Example prompts">${i}</div>
2033
2029
  <div class="mushi-textarea-wrap">
2034
2030
  <textarea
2035
2031
  class="mushi-textarea"
2036
- placeholder="${v(e.step3.descriptionPlaceholder)}"
2032
+ placeholder="${b(e.step3.descriptionPlaceholder)}"
2037
2033
  rows="4"
2038
- aria-label="${v(e.step3.heading)}"
2034
+ aria-label="${b(e.step3.heading)}"
2039
2035
  autofocus
2040
2036
  ></textarea>
2041
2037
  <div class="mushi-char-counter" data-role="char-counter" aria-hidden="true">
@@ -2046,28 +2042,28 @@
2046
2042
  <button type="button" class="${s}"
2047
2043
  data-action="screenshot"
2048
2044
  ${t.screenshotCapturing?"disabled":""}
2049
- aria-label="${v(n)}"
2045
+ aria-label="${b(n)}"
2050
2046
  >
2051
2047
  ${t.screenshotCapturing?'<span class="mushi-spinner" aria-hidden="true"></span>':"\u{1F4F8}"}
2052
- ${v(n)}
2048
+ ${b(n)}
2053
2049
  </button>
2054
2050
  ${t.screenshotAttached&&t.allowScreenshotRemove?'<button type="button" class="mushi-attach-btn danger" data-action="remove-screenshot" aria-label="Remove screenshot">\u2715 Remove</button>':""}
2055
2051
  ${t.screenshotAttached?'<button type="button" class="mushi-attach-btn" data-action="annotate-screenshot" aria-label="Mark up screenshot">\u270F Mark up</button><div class="mushi-annotate-host" data-role="annotate-host"></div>':""}
2056
- <button type="button" class="${a}"
2052
+ <button type="button" class="${l}"
2057
2053
  data-action="element"
2058
2054
  ${t.elementCapturing?"disabled":""}
2059
- aria-label="${v(i)}"
2055
+ aria-label="${b(o)}"
2060
2056
  >
2061
2057
  ${t.elementCapturing?'<span class="mushi-spinner" aria-hidden="true"></span>':"\u{1F3AF}"}
2062
- ${v(i)}
2058
+ ${b(o)}
2063
2059
  </button>
2064
2060
  </div>
2065
2061
  ${t.screenshotAttached&&t.screenshotPreview?`<figure class="mushi-screenshot-preview">
2066
- <img src="${v(t.screenshotPreview)}" alt="${v(e.step3.screenshotPreviewAlt)}" />
2067
- ${t.screenshotHint?`<figcaption class="mushi-screenshot-hint">\u26A0 ${v(t.screenshotHint)}</figcaption>`:""}
2062
+ <img src="${b(t.screenshotPreview)}" alt="${b(e.step3.screenshotPreviewAlt)}" />
2063
+ ${t.screenshotHint?`<figcaption class="mushi-screenshot-hint">\u26A0 ${b(t.screenshotHint)}</figcaption>`:""}
2068
2064
  </figure>`:""}
2069
2065
  <div class="mushi-error" style="display:none" role="alert"></div>
2070
- ${t.identifiedUser?`<p class="mushi-identified-user" aria-label="Reporting as ${v(t.identifiedUser.name??t.identifiedUser.email??"")}">\u{1F464} Reporting as <strong>${v(t.identifiedUser.name??t.identifiedUser.email??"you")}</strong></p>`:""}
2066
+ ${t.identifiedUser?`<p class="mushi-identified-user" aria-label="Reporting as ${b(t.identifiedUser.name??t.identifiedUser.email??"")}">\u{1F464} Reporting as <strong>${b(t.identifiedUser.name??t.identifiedUser.email??"you")}</strong></p>`:""}
2071
2067
  </div>
2072
2068
  <div class="mushi-footer">
2073
2069
  <span class="mushi-footer-hint" aria-hidden="true">\u2318 + ENTER \u2192 send</span>
@@ -2076,9 +2072,8 @@
2076
2072
  <span class="mushi-submit-arrow" aria-hidden="true">\u2192</span>
2077
2073
  </button>
2078
2074
  </div>
2079
- ${mt(t,ve.details)}
2080
- `}function Ys(t){let e=t.locale,n=(t.submittedAt??new Date).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:false});return `
2081
- ${re(t,{title:e.widget.title,showBack:true,eyebrow:"Mushi \xB7 Receipt"})}
2075
+ `}function Gi(t){let e=t.locale,n=(t.submittedAt??new Date).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:false});return `
2076
+ ${ge(t,{title:e.widget.title,showBack:true,eyebrow:"Mushi \xB7 Receipt"})}
2082
2077
  <div class="mushi-body">
2083
2078
  <div class="mushi-success">
2084
2079
  <div class="mushi-success-stamp" aria-hidden="true">
@@ -2087,83 +2082,82 @@
2087
2082
  </div>
2088
2083
  <div class="mushi-success-headline">${e.widget.submitted}</div>
2089
2084
  <div class="mushi-success-meta">REPORT \xB7 ${n}</div>
2090
- ${Xs(t)}
2091
- ${t.rewardsState?Qs(t):""}
2092
- ${t.config.betaMode?.enabled?Js(t):""}
2085
+ ${Ki(t)}
2086
+ ${t.rewardsState?Ji(t):""}
2087
+ ${t.config.betaMode?.enabled?Yi(t):""}
2093
2088
  <button type="button" class="mushi-link-btn mushi-success-my-reports" data-action="view-my-reports">
2094
- \u{1F4EC} Track this report &rsaquo;
2089
+ ${b(t.locale.flows.success.trackReport)}
2095
2090
  </button>
2096
2091
  </div>
2097
2092
  </div>
2098
- `}function Xs(t){if(t.lastSubmitQueuedOffline)return `
2093
+ `}function Ki(t){let e=t.locale.flows.success;if(t.lastSubmitQueuedOffline)return `
2099
2094
  <div class="mushi-success-receipt" role="status">
2100
2095
  <div class="mushi-success-receipt-row mushi-success-receipt-warn">
2101
- <span class="mushi-success-receipt-label">Queued offline</span>
2102
- <span class="mushi-success-receipt-hint">We&rsquo;ll send it the moment you&rsquo;re back online.</span>
2096
+ <span class="mushi-success-receipt-label">${b(e.queuedOffline)}</span>
2097
+ <span class="mushi-success-receipt-hint">${b(e.queuedHint)}</span>
2103
2098
  </div>
2104
2099
  </div>
2105
2100
  `;if(!t.lastReportId)return `
2106
2101
  <div class="mushi-success-receipt" role="status">
2107
2102
  <div class="mushi-success-receipt-row">
2108
2103
  <span class="mushi-success-receipt-spinner" aria-hidden="true"></span>
2109
- <span class="mushi-success-receipt-hint">Delivering to the team\u2026</span>
2104
+ <span class="mushi-success-receipt-hint">${b(e.delivering)}</span>
2110
2105
  </div>
2111
- ${Hr(t)}
2106
+ ${fs(t)}
2112
2107
  </div>
2113
- `;let e=`#${t.lastReportId.slice(0,8)}`,r=(t.config.dashboardUrl??"").replace(/\/$/,""),n=r?`${r}/reports/${encodeURIComponent(t.lastReportId)}`:"";return `
2108
+ `;let r=`#${t.lastReportId.slice(0,8)}`,n=(t.config.dashboardUrl??"").replace(/\/$/,""),s=n?`${n}/reports/${encodeURIComponent(t.lastReportId)}`:"";return `
2114
2109
  <div class="mushi-success-receipt" role="status">
2115
2110
  <div class="mushi-success-receipt-row">
2116
- <span class="mushi-success-receipt-label">Receipt</span>
2111
+ <span class="mushi-success-receipt-label">${b(e.receipt)}</span>
2117
2112
  <button
2118
2113
  type="button"
2119
2114
  class="mushi-success-receipt-id"
2120
2115
  data-action="copy-report-id"
2121
- data-copy-id="${v(t.lastReportId)}"
2122
- title="Copy report id ${v(t.lastReportId)}"
2123
- aria-label="Copy report id ${v(t.lastReportId)}"
2124
- >${v(e)}<span class="mushi-success-receipt-copy" aria-hidden="true">\u2398</span></button>
2116
+ data-copy-id="${b(t.lastReportId)}"
2117
+ title="Copy report id ${b(t.lastReportId)}"
2118
+ aria-label="Copy report id ${b(t.lastReportId)}"
2119
+ >${b(r)}<span class="mushi-success-receipt-copy" aria-hidden="true">\u2398</span></button>
2125
2120
  </div>
2126
- ${n?`
2121
+ ${s?`
2127
2122
  <a
2128
2123
  class="mushi-success-receipt-track"
2129
- href="${v(n)}"
2124
+ href="${b(s)}"
2130
2125
  target="_blank"
2131
2126
  rel="noopener noreferrer"
2132
- >Track on Mushi <span aria-hidden="true">\u2197</span></a>
2127
+ >${b(e.trackOnMushi)} <span aria-hidden="true">\u2197</span></a>
2133
2128
  `:""}
2134
- ${Hr(t)}
2129
+ ${fs(t)}
2135
2130
  </div>
2136
- `}function Hr(t){let e=(t.config.responseSlaLabel??"").trim();return e?`<div class="mushi-success-sla">${v(e)}</div>`:'<div class="mushi-success-sla mushi-success-sla-default">A human will look at this within a working day.</div>'}function Js(t){let e=t.config.betaMode,r=e.contactEmail?v(e.contactEmail):null,n=v(e.appName??"the team");return `
2131
+ `}function fs(t){let e=(t.config.responseSlaLabel??"").trim();return e?`<div class="mushi-success-sla">${b(e)}</div>`:`<div class="mushi-success-sla mushi-success-sla-default">${b(t.locale.flows.success.slaDefault)}</div>`}function Yi(t){let e=t.config.betaMode,r=e.contactEmail?b(e.contactEmail):null,n=b(e.appName??"the team");return `
2137
2132
  <div class="mushi-beta-success-footer" role="note" aria-label="Beta feedback acknowledgement">
2138
2133
  ${r?`<div class="mushi-beta-success-line">\u{1F4EC} Sent to ${r}</div>`:`<div class="mushi-beta-success-line">\u{1F4EC} Sent to ${n}</div>`}
2139
- <div class="mushi-beta-success-line mushi-beta-success-dim">We aim to review within 48h \xB7 thank you for helping build this</div>
2140
2134
  </div>
2141
- `}function Zs(t){let{tier:e,nextTier:r,totalPoints:n,pointsForReport:s}=t.rewardsState,i=e?.displayName??"Free",a=e?.slug??"free",o=t.tierColor(a),l=100,g="";if(r){let p=e?.pointsThreshold??0,w=r.pointsThreshold;l=w>p?Math.round(Math.min(1,(n-p)/(w-p))*100):100,g=`${Math.max(0,w-n).toLocaleString()} pts to ${v(r.displayName)}`;}return `
2135
+ `}function Xi(t){let{tier:e,nextTier:r,totalPoints:n,pointsForReport:s}=t.rewardsState,o=e?.displayName??"Free",l=e?.slug??"free",i=t.tierColor(l),a=100,m="";if(r){let p=e?.pointsThreshold??0,g=r.pointsThreshold;a=g>p?Math.round(Math.min(1,(n-p)/(g-p))*100):100,m=`${Math.max(0,g-n).toLocaleString()} pts to ${b(r.displayName)}`;}return `
2142
2136
  <div class="mushi-rewards-nudge" aria-label="Rewards progress">
2143
2137
  <div class="mushi-rewards-row">
2144
- <span class="mushi-tier-pip" style="background:${o}" aria-hidden="true"></span>
2145
- <span class="mushi-rewards-tier-name">${v(i)}</span>
2138
+ <span class="mushi-tier-pip" style="background:${i}" aria-hidden="true"></span>
2139
+ <span class="mushi-rewards-tier-name">${b(o)}</span>
2146
2140
  <span class="mushi-rewards-pts-count">${n.toLocaleString()} pts</span>
2147
2141
  <span class="mushi-rewards-pts-earn">+${s} pts for a report</span>
2148
2142
  </div>
2149
2143
  ${r?`
2150
- <div class="mushi-tier-bar-track" role="progressbar" aria-valuenow="${l}" aria-valuemin="0" aria-valuemax="100" aria-label="Progress to ${v(r.displayName)}">
2151
- <div class="mushi-tier-bar-fill" style="width:${l}%"></div>
2144
+ <div class="mushi-tier-bar-track" role="progressbar" aria-valuenow="${a}" aria-valuemin="0" aria-valuemax="100" aria-label="Progress to ${b(r.displayName)}">
2145
+ <div class="mushi-tier-bar-fill" style="width:${a}%"></div>
2152
2146
  </div>
2153
- <div class="mushi-rewards-next-label">${g}</div>
2147
+ <div class="mushi-rewards-next-label">${m}</div>
2154
2148
  `:""}
2155
2149
  </div>
2156
- `}function Qs(t){let{tier:e,nextTier:r,totalPoints:n,pointsForReport:s}=t.rewardsState,i=n+s,a=100,o="";if(r){let l=e?.pointsThreshold??0,g=r.pointsThreshold;a=g>l?Math.round(Math.min(1,(i-l)/(g-l))*100):100;let p=Math.max(0,g-i);o=p>0?`${p.toLocaleString()} pts to ${v(r.displayName)}`:`\u{1F389} ${v(r.displayName)} reached!`;}return `
2150
+ `}function Ji(t){let{tier:e,nextTier:r,totalPoints:n,pointsForReport:s}=t.rewardsState,o=n+s,l=100,i="";if(r){let a=e?.pointsThreshold??0,m=r.pointsThreshold;l=m>a?Math.round(Math.min(1,(o-a)/(m-a))*100):100;let p=Math.max(0,m-o);i=p>0?`${p.toLocaleString()} pts to ${b(r.displayName)}`:`\u{1F389} ${b(r.displayName)} reached!`;}return `
2157
2151
  <div class="mushi-success-rewards">
2158
2152
  <div class="mushi-success-pts-award">+${s} pts</div>
2159
2153
  ${r?`
2160
- <div class="mushi-tier-bar-track success-bar" role="progressbar" aria-valuenow="${a}" aria-valuemin="0" aria-valuemax="100" aria-label="Progress to ${v(r.displayName)}">
2161
- <div class="mushi-tier-bar-fill" style="width:${a}%"></div>
2154
+ <div class="mushi-tier-bar-track success-bar" role="progressbar" aria-valuenow="${l}" aria-valuemin="0" aria-valuemax="100" aria-label="Progress to ${b(r.displayName)}">
2155
+ <div class="mushi-tier-bar-fill" style="width:${l}%"></div>
2162
2156
  </div>
2163
- <div class="mushi-rewards-next-label">${o}</div>
2157
+ <div class="mushi-rewards-next-label">${i}</div>
2164
2158
  `:""}
2165
2159
  </div>
2166
- `}var Ge=class t{constructor(e={},r,n=te){this.sdkVersion=n;this.config={position:e.position??"bottom-right",anchor:e.anchor??{},theme:e.theme??"auto",triggerText:e.triggerText||"\u{1F41B}",expandedTitle:e.expandedTitle??"",mode:e.mode??"conversational",locale:e.locale??"auto",zIndex:e.zIndex??99999,trigger:e.trigger??"auto",bannerConfig:e.bannerConfig??{},attachToSelector:e.attachToSelector??"",inset:e.inset??{},respectSafeArea:e.respectSafeArea??true,hideOnSelector:e.hideOnSelector??"",hideOnRoutes:e.hideOnRoutes??[],environments:e.environments??{},smartHide:e.smartHide??false,draggable:e.draggable??false,brandFooter:e.brandFooter??true,outdatedBanner:e.outdatedBanner??"auto",screenshotSensitiveHint:e.screenshotSensitiveHint??true,betaMode:e.betaMode??{},minDescriptionLength:e.minDescriptionLength??20,dashboardUrl:e.dashboardUrl??"",responseSlaLabel:e.responseSlaLabel??"",featureRequestCard:e.featureRequestCard??true,featureRequestLabel:e.featureRequestLabel||"Feature request",featureRequestDescription:e.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise",avoidSelectors:e.avoidSelectors??[],categories:e.categories??[],accent:e.accent??"",accentText:e.accentText??""},this.callbacks=r,this.locale=dt(this.config.locale==="auto"?void 0:this.config.locale),this.host=document.createElement("div"),this.host.id="mushi-mushi-widget",this.shadow=this.host.attachShadow({mode:"closed"});}sdkVersion;host;shadow;config;callbacks;locale;isOpen=false;step="category";selectedCategory=null;selectedIntent=null;viaFeatureRequest=false;showAllCategories=false;screenshotAttached=false;screenshotCapturing=false;screenshotError=false;allowScreenshotRemove=true;screenshotPreview=null;elementSelected=false;elementCapturing=false;submitting=false;selectorHint=null;triggerVisible=true;triggerShrunk=false;triggerHiddenByScroll=false;mountedAt=null;nudgeShown=false;nudgeEl=null;nudgeTimer=null;sdkFreshness=null;reporterReports=[];featureBoard=[];reporterComments=[];selectedReportId=null;reporterLoading=false;reporterError=null;attachedLaunchers=[];smartHideCleanup=null;smartHideTimer=null;submittedAt=null;successTimer=null;autoCloseTimer=null;rewardsState=null;leaderboardEntries=null;leaderboardLoading=false;lastReportId=null;lastSubmitQueuedOffline=false;bannerDismissed=false;bannerResizeObserver=null;fabPos=null;vvCleanup=null;identifiedUser=null;testerJwt=null;testerInfo=null;crossAppReports=null;crossAppLoading=false;globalLeaderboard=null;globalLeaderboardLoading=false;testerReputation=null;magicLinkSent=false;magicLinkEmail="";magicLinkError="";magicLinkSending=false;assistantTurns=[];assistantThreadId=null;assistantSending=false;assistantError=null;mount(){this.host.isConnected||(this.syncHostChromeState(),document.body.appendChild(this.host),this.syncAttachedLaunchers(),this.syncSmartHide(),this.render(),this.mountedAt=Date.now());}getIsMounted(){return this.host.isConnected}updateConfig(e={}){this.config={...this.config,...e.position?{position:e.position}:{},...e.anchor!==void 0?{anchor:e.anchor}:{},...e.theme?{theme:e.theme}:{},...e.triggerText!==void 0?{triggerText:e.triggerText||"\u{1F41B}"}:{},...e.expandedTitle!==void 0?{expandedTitle:e.expandedTitle}:{},...e.mode?{mode:e.mode}:{},...e.locale?{locale:e.locale}:{},...e.zIndex!==void 0?{zIndex:e.zIndex}:{},...e.trigger?{trigger:e.trigger}:{},...e.attachToSelector!==void 0?{attachToSelector:e.attachToSelector}:{},...e.inset!==void 0?{inset:e.inset}:{},...e.respectSafeArea!==void 0?{respectSafeArea:e.respectSafeArea}:{},...e.hideOnSelector!==void 0?{hideOnSelector:e.hideOnSelector}:{},...e.hideOnRoutes!==void 0?{hideOnRoutes:e.hideOnRoutes}:{},...e.environments!==void 0?{environments:e.environments}:{},...e.smartHide!==void 0?{smartHide:e.smartHide}:{},...e.draggable!==void 0?{draggable:e.draggable}:{},...e.brandFooter!==void 0?{brandFooter:e.brandFooter}:{},...e.outdatedBanner!==void 0?{outdatedBanner:e.outdatedBanner}:{},...e.screenshotSensitiveHint!==void 0?{screenshotSensitiveHint:e.screenshotSensitiveHint}:{},...e.betaMode!==void 0?{betaMode:e.betaMode}:{},...e.minDescriptionLength!==void 0?{minDescriptionLength:e.minDescriptionLength}:{},...e.dashboardUrl!==void 0?{dashboardUrl:e.dashboardUrl}:{},...e.responseSlaLabel!==void 0?{responseSlaLabel:e.responseSlaLabel}:{},...e.featureRequestCard!==void 0?{featureRequestCard:e.featureRequestCard}:{},...e.featureRequestLabel!==void 0?{featureRequestLabel:e.featureRequestLabel||"Feature request"}:{},...e.featureRequestDescription!==void 0?{featureRequestDescription:e.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise"}:{},...e.bannerConfig!==void 0?{bannerConfig:e.bannerConfig}:{},...e.categories!==void 0?{categories:e.categories}:{}},this.locale=dt(this.config.locale==="auto"?void 0:this.config.locale),this.host.isConnected&&this.syncHostChromeState(),this.syncAttachedLaunchers(),this.syncSmartHide(),this.render();}resolveCustomCategory(e){return this.config.categories?.find(r=>r.id===e)}resolveBaseCategory(e){return ["bug","slow","visual","confusing","other"].includes(e)?e:this.resolveCustomCategory(e)?.baseCategory??"other"}categoryIcon(e){let r=this.resolveCustomCategory(e);return r?.icon?r.icon:ze[e]??"\u{1F4AC}"}categoryLabel(e){let r=this.resolveCustomCategory(e);return r?r.label:this.locale.step1.categories[e]??e}open(e){if(!this.isOpen){if(this.isOpen=true,this.screenshotAttached=false,this.screenshotCapturing=false,this.screenshotError=false,this.screenshotPreview=null,this.elementSelected=false,this.elementCapturing=false,this.submitting=false,this.submittedAt=null,this.removeSelectorHint(),this.lastReportId=null,this.lastSubmitQueuedOffline=false,this.viaFeatureRequest=false,e?.featureRequest)this.selectedCategory="other",this.selectedIntent=pt,this.viaFeatureRequest=true,this.step="details";else if(e?.category){let r=this.resolveCustomCategory(e.category);["bug","slow","visual","confusing","other"].includes(e.category)||r!==void 0?(this.selectedCategory=e.category,this.selectedIntent=null,this.step=r&&(!r.intents||r.intents.length===0)?"details":"intent"):(this.selectedCategory=null,this.selectedIntent=null,this.step="category");}else this.selectedCategory=null,this.selectedIntent=null,this.step="category";this.render(),this.callbacks.onOpen();}}close(){this.isOpen&&(this.isOpen=false,this.showAllCategories=false,this.render(),this.callbacks.onClose());}openAssistantTab(){if(!this.callbacks.assistantEnabled){this.open();return}this.isOpen||(this.isOpen=true,this.callbacks.onOpen()),this.step="assistant",this.assistantError=null,this.render(),setTimeout(()=>{this.shadow.querySelector(".mushi-assistant-input")?.focus();},0);}async sendAssistantMessage(e){let r=e.trim();if(!(!r||this.assistantSending||!this.callbacks.onAssistantAsk)){this.assistantSending=true,this.assistantError=null,this.assistantTurns.push({role:"user",text:r}),this.render();try{let n=await this.callbacks.onAssistantAsk(r,this.assistantThreadId);n?(n.threadId&&(this.assistantThreadId=n.threadId),n.kind==="clarify"?this.assistantTurns.push({role:"assistant",text:n.question??"Could you tell me a bit more?",...n.options&&n.options.length?{options:n.options}:{}}):this.assistantTurns.push({role:"assistant",text:n.text??"\u2026"})):this.assistantError="No response \u2014 please try again.";}catch{this.assistantError="Something went wrong. Please try again.";}finally{this.assistantSending=false,this.render(),setTimeout(()=>{let n=this.shadow.querySelector(".mushi-assistant-log");n&&(n.scrollTop=n.scrollHeight);},0);}}}pulseTrigger(){if(this.isOpen)return;let e=this.shadow.querySelector(".mushi-trigger");e&&(e.classList.add("mushi-trigger-pulse"),window.setTimeout(()=>{e.classList.remove("mushi-trigger-pulse");},2400));}getIsOpen(){return this.isOpen}showTrigger(){this.triggerVisible=true,this.render();}hideTrigger(){this.triggerVisible=false,this.render();}setTrigger(e){this.updateConfig({trigger:e});}attachTo(e,r={}){let s=(typeof e=="string"?Array.from(document.querySelectorAll(e)):[e]).map(i=>{let a=o=>{o.preventDefault(),this.updateConfig(r),this.open();};return i.addEventListener("click",a),()=>i.removeEventListener("click",a)});return ()=>s.forEach(i=>i())}setScreenshotAttached(e){this.screenshotAttached=e,e||(this.screenshotPreview=null),this.isOpen&&this.render();}setScreenshotPreview(e){this.screenshotPreview=e,this.isOpen&&this.render();}resolveScreenshotHint(){let e=this.config.screenshotSensitiveHint;return e===false?null:typeof e=="string"?e.trim()?e:null:this.locale.step3.screenshotSensitiveHint}setAllowScreenshotRemove(e){this.allowScreenshotRemove=e,this.isOpen&&this.render();}setElementSelected(e){this.elementSelected=e,this.elementCapturing=false,this.removeSelectorHint(),this.isOpen&&this.render();}setScreenshotCapturing(e){this.screenshotCapturing=e,this.screenshotError=false,this.isOpen&&this.render();}setScreenshotError(e){this.screenshotError=e,this.screenshotCapturing=false,this.isOpen&&this.render();}setElementCapturing(e){this.elementCapturing=e,e?this.showSelectorHint():this.removeSelectorHint(),this.isOpen&&this.render();}hidePanel(){let e=this.shadow.querySelector(".mushi-panel");e&&(e.style.display="none");}showPanel(){let e=this.shadow.querySelector(".mushi-panel");e&&(e.style.display="");}showSelectorHint(){this.removeSelectorHint();let e=document.createElement("div");e.id="mushi-selector-hint",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.style.cssText=`
2160
+ `}var Ut=class t{constructor(e={},r,n=he){this.sdkVersion=n;this.config={position:e.position??"bottom-right",anchor:e.anchor??{},theme:e.theme??"auto",triggerText:e.triggerText||"\u{1F41B}",expandedTitle:e.expandedTitle??"",mode:e.mode??"conversational",locale:e.locale??"auto",zIndex:e.zIndex??99999,trigger:e.trigger??"auto",bannerConfig:e.bannerConfig??{},attachToSelector:e.attachToSelector??"",inset:e.inset??{},respectSafeArea:e.respectSafeArea??true,hideOnSelector:e.hideOnSelector??"",hideOnRoutes:e.hideOnRoutes??[],environments:e.environments??{},smartHide:e.smartHide??false,draggable:e.draggable??false,brandFooter:e.brandFooter??false,outdatedBanner:e.outdatedBanner??"auto",screenshotSensitiveHint:e.screenshotSensitiveHint??true,betaMode:e.betaMode??{},minDescriptionLength:e.minDescriptionLength??20,dashboardUrl:e.dashboardUrl??"",responseSlaLabel:e.responseSlaLabel??"",featureRequestCard:e.featureRequestCard??true,featureRequestLabel:e.featureRequestLabel||"Feature request",featureRequestDescription:e.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise",avoidSelectors:e.avoidSelectors??[],categories:e.categories??[],accent:e.accent??"",accentText:e.accentText??""},this.callbacks=r,this.locale=gr(this.config.locale==="auto"?void 0:this.config.locale),this.host=document.createElement("div"),this.host.id="mushi-mushi-widget",this.shadow=this.host.attachShadow({mode:"open"});}sdkVersion;host;shadow;config;callbacks;locale;isOpen=false;step="category";selectedCategory=null;selectedIntent=null;viaFeatureRequest=false;showAllCategories=false;showMoreNav=false;screenshotAttached=false;screenshotCapturing=false;screenshotError=false;allowScreenshotRemove=true;screenshotPreview=null;elementSelected=false;elementCapturing=false;submitting=false;selectorHint=null;triggerVisible=true;triggerShrunk=false;triggerHiddenByScroll=false;mountedAt=null;nudgeShown=false;nudgeEl=null;nudgeTimer=null;sdkFreshness=null;reporterReports=[];featureBoard=[];reporterComments=[];selectedReportId=null;reporterLoading=false;reporterError=null;attachedLaunchers=[];smartHideCleanup=null;smartHideTimer=null;submittedAt=null;successTimer=null;autoCloseTimer=null;rewardsState=null;leaderboardEntries=null;leaderboardLoading=false;lastReportId=null;lastSubmitQueuedOffline=false;bannerDismissed=false;bannerResizeObserver=null;fabPos=null;vvCleanup=null;identifiedUser=null;testerJwt=null;testerInfo=null;crossAppReports=null;crossAppLoading=false;globalLeaderboard=null;globalLeaderboardLoading=false;testerReputation=null;magicLinkSent=false;magicLinkEmail="";magicLinkError="";magicLinkSending=false;assistantTurns=[];assistantThreadId=null;assistantSending=false;assistantError=null;mount(){this.host.isConnected||(this.syncHostChromeState(),document.body.appendChild(this.host),this.syncAttachedLaunchers(),this.syncSmartHide(),this.render(),this.mountedAt=Date.now());}getIsMounted(){return this.host.isConnected}updateConfig(e={}){this.config={...this.config,...e.position?{position:e.position}:{},...e.anchor!==void 0?{anchor:e.anchor}:{},...e.theme?{theme:e.theme}:{},...e.triggerText!==void 0?{triggerText:e.triggerText||"\u{1F41B}"}:{},...e.expandedTitle!==void 0?{expandedTitle:e.expandedTitle}:{},...e.mode?{mode:e.mode}:{},...e.locale?{locale:e.locale}:{},...e.zIndex!==void 0?{zIndex:e.zIndex}:{},...e.trigger?{trigger:e.trigger}:{},...e.attachToSelector!==void 0?{attachToSelector:e.attachToSelector}:{},...e.inset!==void 0?{inset:e.inset}:{},...e.respectSafeArea!==void 0?{respectSafeArea:e.respectSafeArea}:{},...e.hideOnSelector!==void 0?{hideOnSelector:e.hideOnSelector}:{},...e.hideOnRoutes!==void 0?{hideOnRoutes:e.hideOnRoutes}:{},...e.environments!==void 0?{environments:e.environments}:{},...e.smartHide!==void 0?{smartHide:e.smartHide}:{},...e.draggable!==void 0?{draggable:e.draggable}:{},...e.brandFooter!==void 0?{brandFooter:e.brandFooter}:{},...e.outdatedBanner!==void 0?{outdatedBanner:e.outdatedBanner}:{},...e.screenshotSensitiveHint!==void 0?{screenshotSensitiveHint:e.screenshotSensitiveHint}:{},...e.betaMode!==void 0?{betaMode:e.betaMode}:{},...e.minDescriptionLength!==void 0?{minDescriptionLength:e.minDescriptionLength}:{},...e.dashboardUrl!==void 0?{dashboardUrl:e.dashboardUrl}:{},...e.responseSlaLabel!==void 0?{responseSlaLabel:e.responseSlaLabel}:{},...e.featureRequestCard!==void 0?{featureRequestCard:e.featureRequestCard}:{},...e.featureRequestLabel!==void 0?{featureRequestLabel:e.featureRequestLabel||"Feature request"}:{},...e.featureRequestDescription!==void 0?{featureRequestDescription:e.featureRequestDescription||"Suggest something new \u2014 even rough ideas help us prioritise"}:{},...e.bannerConfig!==void 0?{bannerConfig:e.bannerConfig}:{},...e.categories!==void 0?{categories:e.categories}:{}},this.locale=gr(this.config.locale==="auto"?void 0:this.config.locale),this.host.isConnected&&this.syncHostChromeState(),this.syncAttachedLaunchers(),this.syncSmartHide(),this.render();}resolveCustomCategory(e){return this.config.categories?.find(r=>r.id===e)}resolveBaseCategory(e){return ["bug","slow","visual","confusing","other"].includes(e)?e:this.resolveCustomCategory(e)?.baseCategory??"other"}categoryIcon(e){let r=this.resolveCustomCategory(e);return r?.icon?r.icon:Ht[e]??"\u{1F4AC}"}categoryLabel(e){let r=this.resolveCustomCategory(e);return r?r.label:this.locale.step1.categories[e]??e}open(e){if(!this.isOpen){if(this.isOpen=true,this.screenshotAttached=false,this.screenshotCapturing=false,this.screenshotError=false,this.screenshotPreview=null,this.elementSelected=false,this.elementCapturing=false,this.submitting=false,this.submittedAt=null,this.removeSelectorHint(),this.lastReportId=null,this.lastSubmitQueuedOffline=false,this.viaFeatureRequest=false,e?.featureRequest)this.selectedCategory="other",this.selectedIntent=fr,this.viaFeatureRequest=true,this.step="details";else if(e?.category){let r=this.resolveCustomCategory(e.category);["bug","slow","visual","confusing","other"].includes(e.category)||r!==void 0?(this.selectedCategory=e.category,this.selectedIntent=null,this.step=r&&(!r.intents||r.intents.length===0)?"details":"intent"):(this.selectedCategory=null,this.selectedIntent=null,this.step="category");}else this.selectedCategory=null,this.selectedIntent=null,this.step="category";this.render(),this.callbacks.onOpen();}}close(){this.isOpen&&(this.isOpen=false,this.showAllCategories=false,this.showMoreNav=false,this.render(),this.callbacks.onClose());}openAssistantTab(){if(!this.callbacks.assistantEnabled){this.open();return}this.isOpen||(this.isOpen=true,this.callbacks.onOpen()),this.step="assistant",this.assistantError=null,this.render(),setTimeout(()=>{this.shadow.querySelector(".mushi-assistant-input")?.focus();},0);}async sendAssistantMessage(e){let r=e.trim();if(!(!r||this.assistantSending||!this.callbacks.onAssistantAsk)){this.assistantSending=true,this.assistantError=null,this.assistantTurns.push({role:"user",text:r}),this.render();try{let n=await this.callbacks.onAssistantAsk(r,this.assistantThreadId);n?(n.threadId&&(this.assistantThreadId=n.threadId),n.kind==="clarify"?this.assistantTurns.push({role:"assistant",text:n.question??"Could you tell me a bit more?",...n.options&&n.options.length?{options:n.options}:{}}):this.assistantTurns.push({role:"assistant",text:n.text??"\u2026"})):this.assistantError=this.locale.assistant.errors.noResponse;}catch{this.assistantError=this.locale.assistant.errors.generic;}finally{this.assistantSending=false,this.render(),setTimeout(()=>{let n=this.shadow.querySelector(".mushi-assistant-log");n&&(n.scrollTop=n.scrollHeight);},0);}}}pulseTrigger(){if(this.isOpen)return;let e=this.shadow.querySelector(".mushi-trigger");e&&(e.classList.add("mushi-trigger-pulse"),window.setTimeout(()=>{e.classList.remove("mushi-trigger-pulse");},2400));}getIsOpen(){return this.isOpen}showTrigger(){this.triggerVisible=true,this.render();}hideTrigger(){this.triggerVisible=false,this.render();}setTrigger(e){this.updateConfig({trigger:e});}attachTo(e,r={}){let s=(typeof e=="string"?Array.from(document.querySelectorAll(e)):[e]).map(o=>{let l=i=>{i.preventDefault(),this.updateConfig(r),this.open();};return o.addEventListener("click",l),()=>o.removeEventListener("click",l)});return ()=>s.forEach(o=>o())}setScreenshotAttached(e){this.screenshotAttached=e,e||(this.screenshotPreview=null),this.isOpen&&this.render();}setScreenshotPreview(e){this.screenshotPreview=e,this.isOpen&&this.render();}resolveScreenshotHint(){let e=this.config.screenshotSensitiveHint;return e===false?null:typeof e=="string"?e.trim()?e:null:this.locale.step3.screenshotSensitiveHint}setAllowScreenshotRemove(e){this.allowScreenshotRemove=e,this.isOpen&&this.render();}setElementSelected(e){this.elementSelected=e,this.elementCapturing=false,this.removeSelectorHint(),this.isOpen&&this.render();}setScreenshotCapturing(e){this.screenshotCapturing=e,this.screenshotError=false,this.isOpen&&this.render();}setScreenshotError(e){this.screenshotError=e,this.screenshotCapturing=false,this.isOpen&&this.render();}setElementCapturing(e){this.elementCapturing=e,e?this.showSelectorHint():this.removeSelectorHint(),this.isOpen&&this.render();}hidePanel(){let e=this.shadow.querySelector(".mushi-panel");e&&(e.style.display="none");}showPanel(){let e=this.shadow.querySelector(".mushi-panel");e&&(e.style.display="");}showSelectorHint(){this.removeSelectorHint();let e=document.createElement("div");e.id="mushi-selector-hint",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.style.cssText=`
2167
2161
  position: fixed;
2168
2162
  bottom: 24px;
2169
2163
  left: 50%;
@@ -2196,7 +2190,7 @@
2196
2190
  backdrop-filter: blur(4px);
2197
2191
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
2198
2192
  animation: mushi-fade-in 0.15s ease forwards;
2199
- `,n.textContent=this.locale.step3.tooShort.startsWith("A bit")?"Found a bug? One sentence is enough \u{1F41B}":"\u30D0\u30B0\u3092\u898B\u3064\u3051\u305F\uFF1F\u4E00\u884C\u3067\u5927\u4E08\u592B\u3067\u3059 \u{1F41B}",document.body.appendChild(n),this.nudgeEl=n,this.nudgeTimer!==null&&clearTimeout(this.nudgeTimer),this.nudgeTimer=setTimeout(()=>this.removeNudge(),5e3);}removeNudge(){this.nudgeTimer!==null&&(clearTimeout(this.nudgeTimer),this.nudgeTimer=null),this.nudgeEl?.remove(),this.nudgeEl=null,document.getElementById("mushi-nudge-bubble")?.remove();}setSdkFreshness(e){this.sdkFreshness=e,this.isOpen&&this.render();}setRewardsState(e){this.rewardsState=e,this.isOpen&&this.render();}setLeaderboard(e,r=false){this.leaderboardEntries=e,this.leaderboardLoading=r,this.isOpen&&this.step==="leaderboard"&&this.render();}setIdentifiedUser(e){this.identifiedUser=e,this.isOpen&&this.render();}setTesterSession(e,r){this.testerJwt=e,this.testerInfo=r,this.isOpen&&this.render();}setGlobalLeaderboard(e,r=false){this.globalLeaderboard=e,this.globalLeaderboardLoading=r,this.isOpen&&(this.step==="leaderboard"||this.step==="account")&&this.render();}setCrossAppReports(e,r=false){this.crossAppReports=e,this.crossAppLoading=r,this.isOpen&&this.step==="cross-app-reports"&&this.render();}setTesterReputation(e){this.testerReputation=e,this.isOpen&&(this.step==="account"||this.step==="leaderboard")&&this.render();}destroy(){this.successTimer!==null&&(clearTimeout(this.successTimer),this.successTimer=null),this.autoCloseTimer!==null&&(clearTimeout(this.autoCloseTimer),this.autoCloseTimer=null),this.smartHideTimer!==null&&(clearTimeout(this.smartHideTimer),this.smartHideTimer=null),this.smartHideCleanup?.(),this.smartHideCleanup=null,this.teardownViewportHandlers(),this.attachedLaunchers.forEach(e=>e()),this.attachedLaunchers=[],this.removeSelectorHint(),this.removeNudge(),this.removeBodyNudge(),this.host.remove();}syncHostChromeState(){let e=this.host.style;e.setProperty("position","fixed"),e.setProperty("top","0"),e.setProperty("left","0"),e.setProperty("width","0"),e.setProperty("height","0"),e.setProperty("overflow","visible"),e.setProperty("pointer-events","none"),e.setProperty("z-index",String(this.config.zIndex)),e.setProperty("margin","0"),e.setProperty("padding","0"),e.setProperty("border","none"),e.setProperty("background","none");}isSuppressedByHost(){if(!this.config.hideOnSelector||typeof document>"u")return false;try{return !!document.querySelector(this.config.hideOnSelector)}catch{return false}}getWidgetDiagnostics(){let e=this.host.style,r=e.pointerEvents==="none"&&(e.width==="0"||e.width==="0px")&&(e.height==="0"||e.height==="0px"),n=this.host.isConnected?{width:this.host.offsetWidth,height:this.host.offsetHeight}:null,s=this.isSuppressedByHost()||this.isRouteHidden()||!this.triggerVisible,i=this.config.trigger==="banner"&&!this.bannerDismissed&&!this.isSuppressedByHost()&&!this.isRouteHidden()&&this.triggerVisible;return {widgetHostPointerSafe:r,widgetHostBounds:n,widgetSuppressed:s,bannerRendered:i}}syncAttachedLaunchers(){this.attachedLaunchers.forEach(e=>e()),this.attachedLaunchers=[],!(this.config.trigger!=="attach"||!this.config.attachToSelector)&&(typeof document>"u"||this.attachedLaunchers.push(this.attachTo(this.config.attachToSelector)));}syncSmartHide(){if(this.smartHideCleanup?.(),this.smartHideCleanup=null,this.triggerShrunk=false,this.triggerHiddenByScroll=false,!this.config.smartHide||typeof window>"u")return;let e=this.config.smartHide===true?{onScroll:"shrink",onIdleMs:900}:this.config.smartHide;if(!e.onScroll)return;let r=()=>{e.onScroll==="hide"?this.triggerHiddenByScroll=true:this.triggerShrunk=true,this.render(),this.smartHideTimer!==null&&clearTimeout(this.smartHideTimer),this.smartHideTimer=setTimeout(()=>{this.triggerHiddenByScroll=false,this.triggerShrunk=false,this.render();},e.onIdleMs??900);};window.addEventListener("scroll",r,{passive:true}),this.smartHideCleanup=()=>window.removeEventListener("scroll",r);}shouldRenderTrigger(){if(!this.triggerVisible||this.triggerHiddenByScroll||this.config.trigger==="manual"||this.config.trigger==="hidden"||this.config.trigger==="attach"||this.config.trigger==="banner"||this.isMobileSmartHidden()||this.isRouteHidden()||this.isSuppressedByHost())return false;let e=this.config.environments[this.detectEnvironment()];return e!=="never"&&e!=="manual"}static BANNER_HEIGHT=36;static BODY_NUDGE_PROP="--mushi-banner-offset";applyBodyNudge(e,r=t.BANNER_HEIGHT){let n=`${r}px`;document.documentElement.style.setProperty(t.BODY_NUDGE_PROP,n),e==="top"?document.body.dataset.mushiBannerNudged==="top"?document.body.style.paddingTop=n:document.body.style.paddingTop||(document.body.style.paddingTop=n,document.body.dataset.mushiBannerNudged="top"):document.body.dataset.mushiBannerNudged==="bottom"?document.body.style.paddingBottom=n:document.body.style.paddingBottom||(document.body.style.paddingBottom=n,document.body.dataset.mushiBannerNudged="bottom");}trackBannerHeight(e,r){let n=()=>{let s=e.getBoundingClientRect().height;s>0&&this.applyBodyNudge(r,s);};requestAnimationFrame(n),typeof ResizeObserver<"u"&&(this.bannerResizeObserver=new ResizeObserver(n),this.bannerResizeObserver.observe(e));}removeBodyNudge(){this.bannerResizeObserver?.disconnect(),this.bannerResizeObserver=null,document.documentElement.style.removeProperty(t.BODY_NUDGE_PROP);let e=document.body.dataset.mushiBannerNudged;e==="top"?(document.body.style.paddingTop="",delete document.body.dataset.mushiBannerNudged):e==="bottom"&&(document.body.style.paddingBottom="",delete document.body.dataset.mushiBannerNudged);}renderBanner(){if(this.config.trigger!=="banner")return;if(this.bannerDismissed){this.removeBodyNudge();return}if(!this.triggerVisible){this.removeBodyNudge();return}if(this.isRouteHidden()){this.removeBodyNudge();return}if(this.isSuppressedByHost()){this.removeBodyNudge();return}let e=this.config.bannerConfig??{},r=e.variant??"brand",n=e.position??"top",s=e.message?.trim()??"",i=s.length>0,a=e.bugCta??"\u{1F41B} Report a bug",o=e.featureCta!==false,l=e.featureCtaLabel??"Request feature",g=e.zIndex??(this.config.zIndex??99999)-1,p=document.createElement("div");p.className=`mushi-banner ${r} ${n}${i?" mushi-banner--rich":""}`,p.style.setProperty("--mushi-banner-z",String(g)),p.setAttribute("role","banner");let w=document.createElement("button");if(w.className="mushi-banner-dismiss",w.textContent="\u2715",w.setAttribute("aria-label","Dismiss feedback banner"),w.addEventListener("click",()=>{this.bannerDismissed=true,this.removeBodyNudge(),this.render();}),i){let d=document.createElement("div");d.className="mushi-banner-body";let m=e.label===false?null:e.label??"Beta";if(m){let R=document.createElement("span");R.className="mushi-banner-pill",R.textContent=m,d.appendChild(R);}let c=document.createElement("span");c.className="mushi-banner-message",c.textContent=s,d.appendChild(c),p.appendChild(d);let f=document.createElement("nav");f.className="mushi-banner-actions",f.setAttribute("aria-label","Feedback banner actions");let S=(R=false)=>{let E=document.createElement("span");E.className=`mushi-banner-divider${R?" mushi-banner-extra":""}`,E.setAttribute("aria-hidden","true"),E.textContent="|",f.appendChild(E);},$=(R,E,y=false)=>{let k=document.createElement("button");k.type="button",k.className=`mushi-banner-link${y?" mushi-banner-extra":""}`,k.textContent=R,k.addEventListener("click",E),f.appendChild(k);};$(a,()=>this.open()),o&&(S(true),$(l,()=>this.open({featureRequest:true}),true));for(let R of e.links??[]){let E=R.label?.trim();if(!E)continue;let y=R.href&&(/^https?:\/\//i.test(R.href)||R.href.startsWith("/"))?R.href:void 0;if(S(true),y){let k=document.createElement("a");k.className="mushi-banner-link mushi-banner-extra",k.href=y,k.textContent=E,k.target="_blank",k.rel="noopener noreferrer",f.appendChild(k);}else $(E,()=>{R.featureRequest?this.open({featureRequest:true}):this.open();},true);}S(true),$("\u{1F4EC} My reports",()=>this.openReporter(),true),p.appendChild(f),p.appendChild(w);}else {let d=document.createElement("button");if(d.className="mushi-banner-btn",d.textContent=a,d.addEventListener("click",()=>this.open()),p.appendChild(d),o){let c=document.createElement("button");c.className="mushi-banner-btn",c.textContent=l,c.addEventListener("click",()=>this.open({featureRequest:true})),p.appendChild(c);}let m=document.createElement("button");m.className="mushi-banner-my-reports",m.textContent="\u{1F4EC} My reports",m.setAttribute("aria-label","View my submitted reports"),m.addEventListener("click",()=>this.openReporter()),p.appendChild(m),p.appendChild(w);}this.shadow.appendChild(p),this.applyBodyNudge(n),this.trackBannerHeight(p,n);}effectiveTrigger(){if(!this.config.smartHide||typeof window>"u")return this.config.trigger;let e=this.config.smartHide===true?{onMobile:"edge-tab"}:this.config.smartHide;return window.matchMedia("(max-width: 768px)").matches&&e.onMobile==="edge-tab"?"edge-tab":this.config.trigger}isMobileSmartHidden(){if(!this.config.smartHide||typeof window>"u")return false;let e=this.config.smartHide===true?{onMobile:"edge-tab"}:this.config.smartHide;return window.matchMedia("(max-width: 768px)").matches&&e.onMobile==="hide"}detectEnvironment(){let e=typeof location<"u"?location.hostname:"";return e==="localhost"||e==="127.0.0.1"||e.endsWith(".local")?"development":/\b(staging|stage|preview|dev)\b/i.test(e)?"staging":"production"}isRouteHidden(){return !this.config.hideOnRoutes.length||typeof location>"u"?false:this.config.hideOnRoutes.some(e=>location.pathname.includes(e))}getTheme(){let e=this.config.theme;if(e==="light"||e==="dark")return e;if(e==="inherit"){let r=document.documentElement,n=r.getAttribute("data-color-scheme")||r.getAttribute("data-theme")||r.getAttribute("color-scheme")||"";if(/dark/i.test(n))return "dark";if(/light/i.test(n))return "light";if(r.classList.contains("dark"))return "dark";if(r.classList.contains("light"))return "light";try{let i=getComputedStyle(r).backgroundColor.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(i)return .299*+i[1]+.587*+i[2]+.114*+i[3]<128?"dark":"light"}catch{}}return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}render(){let e=this.getTheme(),r=this.config.position,n=this.locale;this.bannerResizeObserver?.disconnect(),this.bannerResizeObserver=null,this.shadow.innerHTML="";let s=document.createElement("style");if(s.textContent=Ar(e,this.config.accent??"",this.config.accentText??""),this.shadow.appendChild(s),this.renderBanner(),this.shouldRenderTrigger()){let a=this.effectiveTrigger(),o=document.createElement("button");if(o.className=`mushi-trigger ${r}${a==="edge-tab"?" edge-tab":""}${this.triggerShrunk?" shrunk":""}`,o.textContent=this.config.triggerText,o.setAttribute("aria-label",n.widget.trigger),o.setAttribute("aria-haspopup","dialog"),o.setAttribute("aria-expanded",String(this.isOpen)),o.style.zIndex=String(this.config.zIndex),this.applyInsetVars(o),o.addEventListener("click",()=>{this.removeNudge(),this.isOpen?this.close():this.open();}),o.addEventListener("mouseenter",()=>{let l=this.mountedAt?Date.now()-this.mountedAt:0;!this.nudgeShown&&!this.isOpen&&l>=3e4&&this.showNudge();}),o.addEventListener("mouseleave",()=>{this.nudgeEl&&(this.nudgeTimer!==null&&clearTimeout(this.nudgeTimer),this.nudgeTimer=setTimeout(()=>this.removeNudge(),2e3));}),o.addEventListener("keydown",l=>{let g=this.config.draggable;if(!g)return;let p=8,w=typeof g=="object"?g.axis??"both":"both",d=0,m=0;if(w!=="y"&&(l.key==="ArrowLeft"?d=-p:l.key==="ArrowRight"&&(d=p)),w!=="x"&&(l.key==="ArrowUp"?m=-p:l.key==="ArrowDown"&&(m=p)),d!==0||m!==0){l.preventDefault();let c=this.fabPos??{x:0,y:0};this.moveFab(o,c.x+d,c.y+m,false);}}),this.config.draggable&&this.attachDragHandlers(o),this.shadow.appendChild(o),this.fabPos&&this.config.draggable){let l=this.fabPos;this.fabPos={x:0,y:0},this.moveFab(o,l.x,l.y,false);}}let i=document.createElement("div");if(i.className=`mushi-panel ${r}${this.isOpen?" open":" closed"}`,i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",n.widget.title),i.style.zIndex=String(this.config.zIndex+1),this.applyInsetVars(i),this.isOpen){let a=this.renderCtx();i.innerHTML=`${Nr(a)}${Br(a)}${Fr(a)}`,this.shadow.appendChild(i),this.attachHandlers(i),this.trapFocus(i),this.attachViewportHandlers(i);}else this.teardownViewportHandlers();}computeAvoidTopPx(e=8){let r=this.config.avoidSelectors;if(!r?.length)return null;let n=0;for(let s of r)try{let i=document.querySelector(s);if(!i)continue;let a=i.getBoundingClientRect();a.bottom>n&&a.width>0&&a.height>0&&(n=a.bottom);}catch{}return n>0?Math.ceil(n)+e:null}computeAvoidBottomPx(e=8){let r=this.config.avoidSelectors;if(!r?.length)return null;let n=0;for(let s of r)try{let i=document.querySelector(s);if(!i)continue;let a=i.getBoundingClientRect();if(a.width>0&&a.height>0){let o=window.innerHeight-a.top+e;o>n&&(n=o);}}catch{}return n>0?Math.ceil(n):null}applyInsetVars(e){let{anchor:r}=this.config;if(r&&Object.keys(r).length>0)["top","right","bottom","left"].forEach(i=>{let a=r[i];a!==void 0&&e.style.setProperty(`--mushi-${i}`,a);}),e.style.setProperty("--mushi-safe-area",this.config.respectSafeArea?"1":"0");else {let{inset:i}=this.config;this.config.respectSafeArea||["top","right","bottom","left"].forEach(a=>{i[a]===void 0&&e.style.setProperty(`--mushi-${a}`,"24px");}),["top","right","bottom","left"].forEach(a=>{let o=i[a];o!==void 0&&e.style.setProperty(`--mushi-${a}`,o==="auto"?"auto":`${o}px`);}),e.style.setProperty("--mushi-safe-area",this.config.respectSafeArea?"1":"0");}let n=r?.top!==void 0||this.config.position?.startsWith("top"),s=r?.bottom!==void 0||this.config.position?.startsWith("bottom")||!this.config.position;if(n){let i=this.computeAvoidTopPx();i!==null&&e.style.setProperty("--mushi-top",`${i}px`);}if(s){let i=this.computeAvoidBottomPx();i!==null&&e.style.setProperty("--mushi-bottom",`${i}px`);}}fabStorageKey(){let e=this.config.projectId??"";return `mushi_fab_pos${e?`_${e}`:""}`}moveFab(e,r,n,s){let i=(()=>{let Y=this.config.draggable;return Y&&typeof Y=="object"?Y.axis??"both":"both"})(),a=window.innerWidth,o=window.innerHeight,l=e.offsetWidth||52,g=e.offsetHeight||52,p=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-left")||"0")||0,w=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-right")||"0")||0,d=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-top")||"0")||0,m=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-bottom")||"0")||0,c=8,f=e.getBoundingClientRect(),S=this.fabPos?.x??0,$=this.fabPos?.y??0,R=f.left-S,E=f.top-$,y=p+c-R,k=a-w-c-l-R,b=d+c-E,_=o-m-c-g-E,V=i==="y"?0:Math.max(y,Math.min(k,r)),W=i==="x"?0:Math.max(b,Math.min(_,n)),A=V;if(s){let Y=this.config.draggable;(Y===true||typeof Y=="object"&&(Y.snapToEdge??true))&&i!=="y"&&(A=f.left+l/2<a/2?p+c-R:a-w-c-l-R);}this.fabPos={x:A,y:W},e.style.setProperty("--mushi-drag-x",`${A}px`),e.style.setProperty("--mushi-drag-y",`${W}px`),e.style.setProperty("--mushi-drag-active","1");let G=this.config.draggable;if(G===true||typeof G=="object"&&(G.persist??true))try{localStorage.setItem(this.fabStorageKey(),JSON.stringify(this.fabPos));}catch{}}loadFabPos(){let e=this.config.draggable;if(!(!e||!(e===true||typeof e=="object"&&(e.persist??true))))try{let n=localStorage.getItem(this.fabStorageKey());if(n){let s=JSON.parse(n);typeof s?.x=="number"&&typeof s?.y=="number"&&(this.fabPos=s);}}catch{}}attachDragHandlers(e){this.fabPos===null&&this.loadFabPos();let r=0,n=0,s=0,i=0,a=false,o=false,l=d=>{if(d.button!==0&&d.pointerType!=="touch")return;e.setPointerCapture(d.pointerId),r=d.clientX,n=d.clientY;let m=this.fabPos??{x:0,y:0};s=m.x,i=m.y,a=true,o=false;},g=6,p=d=>{if(!a)return;let m=d.clientX-r,c=d.clientY-n;!o&&Math.hypot(m,c)>g&&(o=true,e.classList.add("dragging"),e.setAttribute("aria-grabbed","true")),o&&(d.preventDefault(),this.moveFab(e,s+m,i+c,false));},w=d=>{if(a){if(a=false,e.classList.remove("dragging"),e.removeAttribute("aria-grabbed"),o){let m=d.clientX-r,c=d.clientY-n;this.moveFab(e,s+m,i+c,true);let f=S=>{S.stopImmediatePropagation(),e.removeEventListener("click",f,{capture:true});};e.addEventListener("click",f,{capture:true});}o=false;}};e.addEventListener("pointerdown",l),e.addEventListener("pointermove",p),e.addEventListener("pointerup",w),e.addEventListener("pointercancel",w);}attachViewportHandlers(e){this.teardownViewportHandlers();let r=window.visualViewport;if(!r)return;let n=()=>{let i=window.innerHeight-r.height-r.offsetTop;i>50?(e.style.setProperty("--mushi-keyboard-inset",`${Math.round(i)}px`),e.classList.add("keyboard-open"),e.querySelector('textarea, input[type="text"]')?.scrollIntoView({block:"nearest",behavior:"smooth"})):(e.style.setProperty("--mushi-keyboard-inset","0px"),e.classList.remove("keyboard-open"));};r.addEventListener("resize",n,{passive:true}),r.addEventListener("scroll",n,{passive:true});let s=()=>requestAnimationFrame(n);e.addEventListener("focusin",s),this.vvCleanup=()=>{r.removeEventListener("resize",n),r.removeEventListener("scroll",n),e.removeEventListener("focusin",s);};}teardownViewportHandlers(){this.vvCleanup?.(),this.vvCleanup=null;}effectiveMinLength(){let e=this.config.minDescriptionLength??20,r=this.config.locale==="auto"?typeof navigator<"u"?navigator.language??"":"":this.config.locale??"";return /^(ja|zh|ko)/i.test(r)?Math.max(4,Math.floor(e/2)):e}tierColor(e){return {free:"#6b7280",explorer:"#3b82f6",contributor:"#8b5cf6",champion:"#f59e0b"}[e]??"#6c47ff"}renderCtx(){return {config:this.config,rewardsState:this.rewardsState,lastReportId:this.lastReportId,reporterLoading:this.reporterLoading,locale:this.locale,identifiedUser:this.identifiedUser,testerReputation:this.testerReputation,testerInfo:this.testerInfo,screenshotCapturing:this.screenshotCapturing,screenshotAttached:this.screenshotAttached,screenshotPreview:this.screenshotPreview,screenshotHint:this.resolveScreenshotHint(),reporterError:this.reporterError,magicLinkError:this.magicLinkError,elementCapturing:this.elementCapturing,submitting:this.submitting,sdkFreshness:this.sdkFreshness,screenshotError:this.screenshotError,reporterReports:this.reporterReports,magicLinkSending:this.magicLinkSending,magicLinkEmail:this.magicLinkEmail,globalLeaderboardLoading:this.globalLeaderboardLoading,globalLeaderboard:this.globalLeaderboard,elementSelected:this.elementSelected,crossAppLoading:this.crossAppLoading,callbacks:this.callbacks,testerJwt:this.testerJwt,submittedAt:this.submittedAt,step:this.step,selectedReportId:this.selectedReportId,selectedCategory:this.selectedCategory,sdkVersion:this.sdkVersion,reporterComments:this.reporterComments,magicLinkSent:this.magicLinkSent,leaderboardLoading:this.leaderboardLoading,leaderboardEntries:this.leaderboardEntries,lastSubmitQueuedOffline:this.lastSubmitQueuedOffline,featureBoard:this.featureBoard,crossAppReports:this.crossAppReports,allowScreenshotRemove:this.allowScreenshotRemove,unreadCount:()=>this.unreadCount(),tierColor:e=>this.tierColor(e),resolveCustomCategory:e=>this.resolveCustomCategory(e),effectiveMinLength:()=>this.effectiveMinLength(),categoryLabel:e=>this.categoryLabel(e),categoryIcon:e=>this.categoryIcon(e),assistantTurns:this.assistantTurns,assistantSending:this.assistantSending,assistantError:this.assistantError,showAllCategories:this.showAllCategories,pageFaviconHref:Cr()}}attachHandlers(e){let r=this.locale;Or(e),e.querySelector('[data-action="close"]')?.addEventListener("click",()=>this.close()),e.querySelector('[data-action="back"]')?.addEventListener("click",()=>{this.step==="intent"?(this.step="category",this.selectedCategory=null):this.step==="details"?this.viaFeatureRequest?(this.step="category",this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false):(this.step="intent",this.selectedIntent=null):this.step==="reports"?this.step="category":this.step==="report-detail"?(this.step="reports",this.selectedReportId=null):this.step==="leaderboard"?this.step="reports":this.step==="roadmap"?this.step="category":this.step==="assistant"?this.step="category":this.step==="account"?this.step="category":this.step==="cross-app-reports"?this.step="account":this.step==="success"&&(this.step="category",this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false),this.step==="category"&&(this.showAllCategories=false),this.render();}),e.querySelector('[data-action="show-all-categories"]')?.addEventListener("click",()=>{this.showAllCategories=true,this.render();}),e.querySelector('[data-action="assistant"]')?.addEventListener("click",()=>{this.openAssistantTab();}),e.querySelectorAll('[data-action="assistant-suggest"]').forEach(a=>{a.addEventListener("click",()=>{let o=a.dataset.value;o&&this.sendAssistantMessage(o);});});{let a=e.querySelector('[data-action="assistant-send"]');if(a){let o=a.querySelector(".mushi-assistant-input");a.addEventListener("submit",l=>{l.preventDefault();let g=o?.value??"";o&&(o.value=""),this.sendAssistantMessage(g);}),o?.addEventListener("keydown",l=>{l.key==="Enter"&&!l.shiftKey&&(l.preventDefault(),a.requestSubmit());});}}e.querySelector('[data-action="reports"]')?.addEventListener("click",()=>{this.loadReporterReports();}),e.querySelector('[data-action="roadmap"]')?.addEventListener("click",()=>{this.loadFeatureBoard();}),e.querySelectorAll("[data-vote-id]").forEach(a=>{a.addEventListener("click",()=>{let o=a.dataset.voteId;o&&this.voteFeatureBoard(o);});}),e.querySelector('[data-action="feature-request"]')?.addEventListener("click",()=>{this.selectedCategory="other",this.selectedIntent=pt,this.viaFeatureRequest=true,this.step="details",this.render();}),e.querySelectorAll("[data-report-id]").forEach(a=>{a.addEventListener("click",()=>{let o=a.dataset.reportId;o&&this.loadReporterComments(o);});}),e.querySelector('[data-action="open-leaderboard"]')?.addEventListener("click",()=>{this.step="leaderboard",this.callbacks.onLeaderboardOpen?.(),this.callbacks.onGlobalLeaderboardOpen?.(),this.render();}),e.querySelector('[data-action="open-account"]')?.addEventListener("click",()=>{this.step="account",this.render();}),e.querySelector('[data-action="open-cross-app-reports"]')?.addEventListener("click",()=>{this.step="cross-app-reports",this.crossAppLoading=true,this.crossAppReports=null,this.render(),this.callbacks.onCrossAppReportsOpen?this.callbacks.onCrossAppReportsOpen():(this.crossAppLoading=false,this.crossAppReports=[],this.render());}),e.querySelector('[data-action="open-global-leaderboard"]')?.addEventListener("click",()=>{this.step="leaderboard",this.globalLeaderboard=null,this.globalLeaderboardLoading=true,this.render(),this.callbacks.onGlobalLeaderboardOpen?this.callbacks.onGlobalLeaderboardOpen():(this.globalLeaderboardLoading=false,this.globalLeaderboard=[],this.render());}),e.querySelector('[data-action="send-magic-link"]')?.addEventListener("click",()=>{this.handleMagicLinkSend(e);}),e.querySelector('[data-action="resend-magic-link"]')?.addEventListener("click",()=>{this.magicLinkSent=false,this.magicLinkError="",this.render();}),e.querySelector('[data-action="sign-out-tester"]')?.addEventListener("click",()=>{this.testerJwt=null,this.testerInfo=null,this.testerReputation=null,this.crossAppReports=null,this.magicLinkSent=false,this.magicLinkEmail="",this.step="category",this.callbacks.onTesterSignOut?.(),this.render();}),e.querySelector('[data-action="reporter-reply"]')?.addEventListener("click",()=>{this.submitReporterReply(e);}),e.querySelector('[data-action="reporter-confirms"]')?.addEventListener("click",()=>{this.submitReporterFeedback("confirms");}),e.querySelector('[data-action="reporter-not-fixed"]')?.addEventListener("click",()=>{this.submitReporterReopen();}),e.querySelector('[data-action="view-my-reports"]')?.addEventListener("click",()=>{this.loadReporterReports();}),e.querySelector('[data-action="copy-report-id"]')?.addEventListener("click",a=>{let o=a.currentTarget,l=o.dataset.copyId;if(!l)return;let g=o.innerHTML,p=()=>{o.innerHTML="Copied \u2713",window.setTimeout(()=>{o.isConnected&&(o.innerHTML=g);},1600);};try{navigator.clipboard?.writeText?navigator.clipboard.writeText(l).then(p).catch(()=>p()):p();}catch{p();}}),e.querySelectorAll("[data-category]").forEach(a=>{a.addEventListener("click",()=>{let o=a.dataset.category??"other";this.selectedCategory=o;let l=this.resolveCustomCategory(o);this.step=l&&(!l.intents||l.intents.length===0)?"details":"intent",this.render();});}),e.querySelectorAll("[data-intent]").forEach(a=>{a.addEventListener("click",()=>{this.selectedIntent=a.dataset.intent??null,this.step="details",this.render();});});let n=e.querySelector(".mushi-textarea"),s=e.querySelector('[data-role="char-current"]');if(n&&s){let a=this.effectiveMinLength(),o=()=>{let l=n.value.trim().length;s.textContent=String(l);let g=e.querySelector('[data-role="char-counter"]');g&&(g.style.color=l>=a?"var(--mushi-ok, #22c55e)":"");};n.addEventListener("input",o);}e.querySelectorAll("[data-example]").forEach(a=>{a.addEventListener("click",()=>{let o=a.dataset.example??"";n&&(n.value=o,n.focus(),n.dispatchEvent(new Event("input")));});}),e.querySelector('[data-action="screenshot"]')?.addEventListener("click",()=>{this.callbacks.onScreenshotRequest();}),e.querySelector('[data-action="remove-screenshot"]')?.addEventListener("click",()=>{this.callbacks.onScreenshotRemove?.();}),e.querySelector('[data-action="annotate-screenshot"]')?.addEventListener("click",()=>{let a=e.querySelector('[data-role="annotate-host"]');a&&this.callbacks.onScreenshotAnnotateRequest&&this.callbacks.onScreenshotAnnotateRequest(a);}),e.querySelector('[data-action="element"]')?.addEventListener("click",()=>{this.callbacks.onElementSelectorRequest?.();});let i=()=>{let a=e.querySelector(".mushi-textarea"),o=a?.value?.trim()??"",l=e.querySelector(".mushi-error"),g=this.effectiveMinLength();if(o.length<g){if(l){let w=`${r.step3.tooShort} (${o.length}/${g})`;l.textContent=w,l.style.display="block",a?.focus();}return}this.submitting=true,this.submittedAt=new Date,this.lastReportId=null,this.lastSubmitQueuedOffline=false,this.render();let p=(async()=>{try{let w=this.selectedCategory,d=this.resolveBaseCategory(w),m=this.config.categories&&this.config.categories.length>0,c=this.callbacks.onSubmit({category:d,...m?{userCategory:w}:{},description:o,intent:this.selectedIntent??void 0});return c&&typeof c.then=="function"?await c??null:null}catch{return {reportId:null,queuedOffline:true}}})();this.successTimer=setTimeout(()=>{this.successTimer=null,this.submitting=false,this.step="success",this.render(),p.then(w=>{if(this.step!=="success")return;w&&(this.lastReportId=w.reportId??null,this.lastSubmitQueuedOffline=!!w.queuedOffline,this.render()),this.autoCloseTimer!==null&&clearTimeout(this.autoCloseTimer);let d=this.lastReportId&&this.config.dashboardUrl?6e3:2800;this.autoCloseTimer=setTimeout(()=>{this.autoCloseTimer=null,this.step==="success"&&this.close();},d);});},500);};e.querySelector('[data-action="submit"]')?.addEventListener("click",i),e.addEventListener("keydown",a=>{if(a.key==="Escape"){this.close();return}this.step==="details"&&Pr(a)&&(a.preventDefault(),i());});}trapFocus(e){requestAnimationFrame(()=>{let r=e.querySelector("textarea");if(r){r.focus();return}let n=e.querySelectorAll("button, textarea, [tabindex]");n.length>0&&n[0].focus();});}unreadCount(){return this.reporterReports.reduce((e,r)=>e+(r.unread_count??0),0)}async loadFeatureBoard(){this.step="roadmap",this.reporterLoading=true,this.reporterError=null,this.render();try{this.featureBoard=await this.callbacks.onFeatureBoardRequest?.()??[];}catch(e){this.reporterError=e instanceof Error?e.message:"Could not load community ideas.";}finally{this.reporterLoading=false,this.render();}}async voteFeatureBoard(e){if(!(!this.callbacks.onFeatureBoardVote||this.reporterLoading)){this.reporterLoading=true,this.render();try{await this.callbacks.onFeatureBoardVote(e),this.featureBoard=await this.callbacks.onFeatureBoardRequest?.()??this.featureBoard;}catch(r){this.reporterError=r instanceof Error?r.message:"Could not update vote.";}finally{this.reporterLoading=false,this.render();}}}async submitReporterReopen(){let e=this.selectedReportId;if(!(!e||this.reporterLoading)){this.reporterLoading=true,this.render();try{this.callbacks.onReporterReopen?await this.callbacks.onReporterReopen(e,"Not fixed for me"):await this.callbacks.onReporterFeedback?.(e,"not_fixed","Not fixed for me"),await this.loadReporterReports();}catch(r){this.reporterError=r instanceof Error?r.message:"Could not reopen report.";}finally{this.reporterLoading=false,this.render();}}}async loadReporterReports(){this.step="reports",this.reporterLoading=true,this.reporterError=null,this.render();try{this.reporterReports=await this.callbacks.onReporterReportsRequest?.()??[];}catch(e){this.reporterError=e instanceof Error?e.message:"Could not load reports.";}finally{this.reporterLoading=false,this.render();}}async loadReporterComments(e){this.selectedReportId=e,this.step="report-detail",this.reporterLoading=true,this.reporterError=null,this.render();try{this.reporterComments=await this.callbacks.onReporterCommentsRequest?.(e)??[];}catch(r){this.reporterError=r instanceof Error?r.message:"Could not load thread.";}finally{this.reporterLoading=false,this.render();}}async submitReporterFeedback(e){let r=this.selectedReportId;if(!(!r||this.reporterLoading)){this.reporterLoading=true,this.render();try{await this.callbacks.onReporterFeedback?.(r,e),await this.loadReporterReports(),r&&await this.loadReporterComments(r);}catch(n){this.reporterError=n instanceof Error?n.message:"Could not send feedback.",this.reporterLoading=false,this.render();}}}async submitReporterReply(e){let r=this.selectedReportId,n=e.querySelector('[data-role="reporter-reply"]'),s=e.querySelector('[data-action="reporter-reply"]'),i=n?.value.trim()??"";if(!(!r||!i||this.reporterLoading)){this.reporterLoading=true,s&&(s.disabled=true),this.render();try{await this.callbacks.onReporterReply?.(r,i),n&&(n.value=""),await this.loadReporterComments(r);}catch(a){this.reporterError=a instanceof Error?a.message:"Could not send reply.",this.reporterLoading=false,this.render();}}}async handleMagicLinkSend(e){if(this.magicLinkSending)return;let n=(e.querySelector('[data-role="magic-link-email"]')?.value??this.magicLinkEmail).trim();if(!n||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){this.magicLinkError="Please enter a valid email address.",this.render();return}this.magicLinkEmail=n,this.magicLinkError="",this.magicLinkSending=true,this.render();try{await this.callbacks.onMushiSignIn?.(n),this.magicLinkSent=!0;}catch(s){this.magicLinkError=s instanceof Error?s.message:"Could not send sign-in link. Try again.";}finally{this.magicLinkSending=false,this.render();}}getRecorderStep(){return this.step}getRecorderTrigger(){return this.shadow.querySelector(".mushi-trigger")}getRecorderCategoryButton(e){return this.shadow.querySelector(`[data-category="${e}"]`)}getRecorderIntentButton(e){return Array.from(this.shadow.querySelectorAll("[data-intent]")).find(r=>r.dataset.intent===e)??null}getRecorderSubmitButton(){return this.shadow.querySelector('[data-action="submit"]')}recorderClickTrigger(){this.isOpen&&this.close(),this.open();}openReporter(){this.isOpen||(this.isOpen=true,this.render()),this.loadReporterReports();}recorderSelectCategory(e){this.isOpen||this.open(),this.step!=="category"&&(this.selectedCategory=null,this.selectedIntent=null,this.step="category",this.render()),this.selectedCategory=e,this.step="intent",this.render();}recorderSelectIntent(e){!this.isOpen||this.step!=="intent"||(this.selectedIntent=e,this.step="details",this.render());}recorderFocusDescription(){this.shadow.querySelector(".mushi-textarea")?.focus();}recorderSubmit(){this.shadow.querySelector('[data-action="submit"]')?.click();}recorderOpenMyReports(){this.isOpen||this.open(),this.loadReporterReports();}};function Ye(t){if(!t)return null;let e=t.getBoundingClientRect();return e.width===0&&e.height===0?null:{x:e.left+e.width/2,y:e.top+e.height/2}}function Ur(t){if(typeof globalThis>"u")return;let e={ready:()=>t.getIsMounted(),getStep:()=>t.getRecorderStep(),getTriggerCenter:()=>Ye(t.getRecorderTrigger()),getCategoryCenter:r=>Ye(t.getRecorderCategoryButton(r)),getIntentCenter:r=>Ye(t.getRecorderIntentButton(r)),getSubmitCenter:()=>Ye(t.getRecorderSubmitButton()),clickTrigger:()=>t.recorderClickTrigger(),selectCategory:r=>t.recorderSelectCategory(r),selectIntent:r=>t.recorderSelectIntent(r),focusDescription:()=>t.recorderFocusDescription(),submit:()=>t.recorderSubmit(),openMyReports:()=>t.recorderOpenMyReports()};globalThis.__mushiRecorder=e;}var Kr="mushi_session_min_day_",Ae=[],gt=null,ft=null,ye=null,vt=null,Gr=null,_e=null,xe=false,Pe=null,wt=0,ei=300*1e3,Yr=0,ti=900*1e3;function xt(){return Date.now()<Yr}function St(t){t?.startsWith("HTTP_4")&&(Yr=Date.now()+ti);}var qr=new Set;function bt(t){return `mushi_rewards_consent_${t}`}function ri(t){try{return localStorage.getItem(bt(t))==="1"}catch{return false}}function yt(t,e){try{e?localStorage.setItem(bt(t),"1"):localStorage.removeItem(bt(t)),xe=e;}catch{}}function Xr(){return new Date().toISOString().slice(0,10)}function Jr(t){try{let e=sessionStorage.getItem(`${Kr}${t}_${Xr()}`);return e?parseInt(e,10):0}catch{return 0}}function ni(t){let e=Xr(),r=`${Kr}${t}_${e}`;try{let n=Jr(t)+1;return sessionStorage.setItem(r,String(n)),n}catch{return 99}}function Zr(t){_e=t.client,ye=t.userId,vt=t.traits??null,Gr=t.reporterToken??null;let{projectId:e}=t,r=Math.max(3e4,t.config.flushIntervalMs??3e5);t.config.consentMode==="auto"?(xe=true,yt(e,true)):xe=ri(e),t.config.trackActivity&&oi(e),gt&&clearInterval(gt),gt=setInterval(()=>si(t),r),ft&&clearInterval(ft),ft=setInterval(()=>{if(!xe||!ye)return;let n=Jr(e);n<60&&(ni(e),Te({action:"session_minute",metadata:{minutes_today:n+1}}));},6e4),t.config.showInWidget&&Et(ye).then(n=>{n&&rn(n,t.config);}),t.config.consentMode!=="auto"&&!xe&&ai(e,t.config);}function Qr(t,e){ye=t,vt=e??null,Pe=null,wt=0;}function Te(t){!xe||!ye||Ae.push({...t,queuedAt:Date.now()});}async function si(t){if(!xe||!ye||Ae.length===0)return;let e=null;if(t.config.verifyUserToken)try{e=await t.config.verifyUserToken();}catch{}if(xt())return;let r=Ae.splice(0,100);try{let n=await t.client.submitActivity(ye,r,{userTraits:vt??void 0,reporterTokenHash:Gr??void 0,optedIn:!0,hostJwt:e??void 0});n.ok||(St(n.error?.code),n.error?.code?.startsWith("HTTP_4")||Ae.unshift(...r.slice(0,50)));}catch{Ae.unshift(...r.slice(0,50));}}async function en(t){let e=Date.now();return Pe&&e-wt<ei?Pe:Et(t)}async function Et(t){if(!_e||xt())return null;let e=await _e.getMyTier(t);return e.ok&&e.data?(Pe=e.data,wt=Date.now(),Pe):(St(e.error?.code),null)}async function tn(t=10){if(!_e||xt())return null;try{let e=await _e.getHallOfFame(t);return e.ok&&e.data?(e.data.data??[]).map(r=>({display_name:r.display_name,tier_name:r.tier_name,total_points:r.total_points,points_30d:r.points_30d})):(St(e.error?.code),null)}catch{return null}}var jr=null,zr=null,Wr=null,Vr="";function oi(t){let e=()=>{let n=location.pathname;if(n===Vr)return;Vr=n,!qr.has(`${t}:${n}`)&&(qr.add(`${t}:${n}`),Te({action:"screen_view_unique_per_day",metadata:{route:n}}));};Wr=history.pushState.bind(history),history.pushState=function(...n){Wr(...n),e();},window.addEventListener("popstate",e),e(),jr=new MutationObserver(()=>e());let r=document.querySelector("main")??document.body;jr.observe(r,{childList:true,subtree:false}),zr=n=>{let s=n.target.closest("[data-testid]");if(!s)return;let i=s.dataset.testid;i&&Te({action:"element_selected",metadata:{testid:i,route:location.pathname}});},document.addEventListener("click",zr,{capture:true,passive:true});}var we=null;function rn(t,e){if(!e.showInWidget)return;we&&we.remove(),we=document.createElement("div"),we.id="mushi-tier-badge",Object.assign(we.style,{position:"fixed",bottom:"56px",right:"16px",zIndex:"2147483645",fontFamily:"system-ui, sans-serif"});let r=we.attachShadow({mode:"closed"});r.innerHTML=`
2193
+ `,n.textContent=this.locale.step3.tooShort.startsWith("A bit")?"Found a bug? One sentence is enough \u{1F41B}":"\u30D0\u30B0\u3092\u898B\u3064\u3051\u305F\uFF1F\u4E00\u884C\u3067\u5927\u4E08\u592B\u3067\u3059 \u{1F41B}",document.body.appendChild(n),this.nudgeEl=n,this.nudgeTimer!==null&&clearTimeout(this.nudgeTimer),this.nudgeTimer=setTimeout(()=>this.removeNudge(),5e3);}removeNudge(){this.nudgeTimer!==null&&(clearTimeout(this.nudgeTimer),this.nudgeTimer=null),this.nudgeEl?.remove(),this.nudgeEl=null,document.getElementById("mushi-nudge-bubble")?.remove();}setSdkFreshness(e){this.sdkFreshness=e,this.isOpen&&this.render();}setRewardsState(e){this.rewardsState=e,this.isOpen&&this.render();}setLeaderboard(e,r=false){this.leaderboardEntries=e,this.leaderboardLoading=r,this.isOpen&&this.step==="leaderboard"&&this.render();}setIdentifiedUser(e){this.identifiedUser=e,this.isOpen&&this.render();}setTesterSession(e,r){this.testerJwt=e,this.testerInfo=r,this.isOpen&&this.render();}setGlobalLeaderboard(e,r=false){this.globalLeaderboard=e,this.globalLeaderboardLoading=r,this.isOpen&&(this.step==="leaderboard"||this.step==="account")&&this.render();}setCrossAppReports(e,r=false){this.crossAppReports=e,this.crossAppLoading=r,this.isOpen&&this.step==="cross-app-reports"&&this.render();}setTesterReputation(e){this.testerReputation=e,this.isOpen&&(this.step==="account"||this.step==="leaderboard")&&this.render();}destroy(){this.successTimer!==null&&(clearTimeout(this.successTimer),this.successTimer=null),this.autoCloseTimer!==null&&(clearTimeout(this.autoCloseTimer),this.autoCloseTimer=null),this.smartHideTimer!==null&&(clearTimeout(this.smartHideTimer),this.smartHideTimer=null),this.smartHideCleanup?.(),this.smartHideCleanup=null,this.teardownViewportHandlers(),this.attachedLaunchers.forEach(e=>e()),this.attachedLaunchers=[],this.removeSelectorHint(),this.removeNudge(),this.removeBodyNudge(),this.host.remove();}syncHostChromeState(){let e=this.host.style;e.setProperty("position","fixed"),e.setProperty("top","0"),e.setProperty("left","0"),e.setProperty("width","0"),e.setProperty("height","0"),e.setProperty("overflow","visible"),e.setProperty("pointer-events","none"),e.setProperty("z-index",String(this.config.zIndex)),e.setProperty("margin","0"),e.setProperty("padding","0"),e.setProperty("border","none"),e.setProperty("background","none");}isSuppressedByHost(){if(!this.config.hideOnSelector||typeof document>"u")return false;try{return !!document.querySelector(this.config.hideOnSelector)}catch{return false}}getWidgetDiagnostics(){let e=this.host.style,r=e.pointerEvents==="none"&&(e.width==="0"||e.width==="0px")&&(e.height==="0"||e.height==="0px"),n=this.host.isConnected?{width:this.host.offsetWidth,height:this.host.offsetHeight}:null,s=this.isSuppressedByHost()||this.isRouteHidden()||!this.triggerVisible,o=this.config.trigger==="banner"&&!this.bannerDismissed&&!this.isSuppressedByHost()&&!this.isRouteHidden()&&this.triggerVisible;return {widgetHostPointerSafe:r,widgetHostBounds:n,widgetSuppressed:s,bannerRendered:o}}syncAttachedLaunchers(){this.attachedLaunchers.forEach(e=>e()),this.attachedLaunchers=[],!(this.config.trigger!=="attach"||!this.config.attachToSelector)&&(typeof document>"u"||this.attachedLaunchers.push(this.attachTo(this.config.attachToSelector)));}syncSmartHide(){if(this.smartHideCleanup?.(),this.smartHideCleanup=null,this.triggerShrunk=false,this.triggerHiddenByScroll=false,!this.config.smartHide||typeof window>"u")return;let e=this.config.smartHide===true?{onScroll:"shrink",onIdleMs:900}:this.config.smartHide;if(!e.onScroll)return;let r=()=>{e.onScroll==="hide"?this.triggerHiddenByScroll=true:this.triggerShrunk=true,this.render(),this.smartHideTimer!==null&&clearTimeout(this.smartHideTimer),this.smartHideTimer=setTimeout(()=>{this.triggerHiddenByScroll=false,this.triggerShrunk=false,this.render();},e.onIdleMs??900);};window.addEventListener("scroll",r,{passive:true}),this.smartHideCleanup=()=>window.removeEventListener("scroll",r);}shouldRenderTrigger(){if(!this.triggerVisible||this.triggerHiddenByScroll||this.config.trigger==="manual"||this.config.trigger==="hidden"||this.config.trigger==="attach"||this.config.trigger==="banner"||this.isMobileSmartHidden()||this.isRouteHidden()||this.isSuppressedByHost())return false;let e=this.config.environments[this.detectEnvironment()];return e!=="never"&&e!=="manual"}static BANNER_HEIGHT=36;static BODY_NUDGE_PROP="--mushi-banner-offset";applyBodyNudge(e,r=t.BANNER_HEIGHT){let n=`${r}px`;document.documentElement.style.setProperty(t.BODY_NUDGE_PROP,n),e==="top"?document.body.dataset.mushiBannerNudged==="top"?document.body.style.paddingTop=n:document.body.style.paddingTop||(document.body.style.paddingTop=n,document.body.dataset.mushiBannerNudged="top"):document.body.dataset.mushiBannerNudged==="bottom"?document.body.style.paddingBottom=n:document.body.style.paddingBottom||(document.body.style.paddingBottom=n,document.body.dataset.mushiBannerNudged="bottom");}trackBannerHeight(e,r){let n=()=>{let s=e.getBoundingClientRect().height;s>0&&this.applyBodyNudge(r,s);};requestAnimationFrame(n),typeof ResizeObserver<"u"&&(this.bannerResizeObserver=new ResizeObserver(n),this.bannerResizeObserver.observe(e));}removeBodyNudge(){this.bannerResizeObserver?.disconnect(),this.bannerResizeObserver=null,document.documentElement.style.removeProperty(t.BODY_NUDGE_PROP);let e=document.body.dataset.mushiBannerNudged;e==="top"?(document.body.style.paddingTop="",delete document.body.dataset.mushiBannerNudged):e==="bottom"&&(document.body.style.paddingBottom="",delete document.body.dataset.mushiBannerNudged);}renderBanner(){if(this.config.trigger!=="banner")return;if(this.bannerDismissed){this.removeBodyNudge();return}if(!this.triggerVisible){this.removeBodyNudge();return}if(this.isRouteHidden()){this.removeBodyNudge();return}if(this.isSuppressedByHost()){this.removeBodyNudge();return}let e=this.config.bannerConfig??{},r=e.variant??"brand",n=e.position??"top",s=e.message?.trim()??"",o=s.length>0,l=e.bugCta??"\u{1F41B} Report a bug",i=e.featureCta!==false,a=e.featureCtaLabel??"Request feature",m=e.zIndex??(this.config.zIndex??99999)-1,p=document.createElement("div");p.className=`mushi-banner ${r} ${n}${o?" mushi-banner--rich":""}`,p.style.setProperty("--mushi-banner-z",String(m)),p.setAttribute("role","banner");let g=document.createElement("button");if(g.className="mushi-banner-dismiss",g.textContent="\u2715",g.setAttribute("aria-label","Dismiss feedback banner"),g.addEventListener("click",()=>{this.bannerDismissed=true,this.removeBodyNudge(),this.render();}),o){let u=document.createElement("div");u.className="mushi-banner-body";let c=e.label===false?null:e.label??"Beta";if(c){let R=document.createElement("span");R.className="mushi-banner-pill",R.textContent=c,u.appendChild(R);}let h=document.createElement("span");h.className="mushi-banner-message",h.textContent=s,u.appendChild(h),p.appendChild(u);let y=document.createElement("nav");y.className="mushi-banner-actions",y.setAttribute("aria-label","Feedback banner actions");let v=(R=false)=>{let k=document.createElement("span");k.className=`mushi-banner-divider${R?" mushi-banner-extra":""}`,k.setAttribute("aria-hidden","true"),k.textContent="|",y.appendChild(k);},I=(R,k,M=false)=>{let S=document.createElement("button");S.type="button",S.className=`mushi-banner-link${M?" mushi-banner-extra":""}`,S.textContent=R,S.addEventListener("click",k),y.appendChild(S);};I(l,()=>this.open()),i&&(v(true),I(a,()=>this.open({featureRequest:true}),true));for(let R of e.links??[]){let k=R.label?.trim();if(!k)continue;let M=R.href&&(/^https?:\/\//i.test(R.href)||R.href.startsWith("/"))?R.href:void 0;if(v(true),M){let S=document.createElement("a");S.className="mushi-banner-link mushi-banner-extra",S.href=M,S.textContent=k,S.target="_blank",S.rel="noopener noreferrer",y.appendChild(S);}else I(k,()=>{R.featureRequest?this.open({featureRequest:true}):this.open();},true);}v(true),I("\u{1F4EC} My reports",()=>this.openReporter(),true),p.appendChild(y),p.appendChild(g);}else {let u=document.createElement("button");if(u.className="mushi-banner-btn",u.textContent=l,u.addEventListener("click",()=>this.open()),p.appendChild(u),i){let h=document.createElement("button");h.className="mushi-banner-btn",h.textContent=a,h.addEventListener("click",()=>this.open({featureRequest:true})),p.appendChild(h);}let c=document.createElement("button");c.className="mushi-banner-my-reports",c.textContent="\u{1F4EC} My reports",c.setAttribute("aria-label","View my submitted reports"),c.addEventListener("click",()=>this.openReporter()),p.appendChild(c),p.appendChild(g);}this.shadow.appendChild(p),this.applyBodyNudge(n),this.trackBannerHeight(p,n);}effectiveTrigger(){if(!this.config.smartHide||typeof window>"u")return this.config.trigger;let e=this.config.smartHide===true?{onMobile:"edge-tab"}:this.config.smartHide;return window.matchMedia("(max-width: 768px)").matches&&e.onMobile==="edge-tab"?"edge-tab":this.config.trigger}isMobileSmartHidden(){if(!this.config.smartHide||typeof window>"u")return false;let e=this.config.smartHide===true?{onMobile:"edge-tab"}:this.config.smartHide;return window.matchMedia("(max-width: 768px)").matches&&e.onMobile==="hide"}detectEnvironment(){let e=typeof location<"u"?location.hostname:"";return e==="localhost"||e==="127.0.0.1"||e.endsWith(".local")?"development":/\b(staging|stage|preview|dev)\b/i.test(e)?"staging":"production"}isRouteHidden(){return !this.config.hideOnRoutes.length||typeof location>"u"?false:this.config.hideOnRoutes.some(e=>location.pathname.includes(e))}getTheme(){let e=this.config.theme;if(e==="light"||e==="dark")return e;if(e==="inherit"){let r=document.documentElement,n=r.getAttribute("data-color-scheme")||r.getAttribute("data-theme")||r.getAttribute("color-scheme")||"";if(/dark/i.test(n))return "dark";if(/light/i.test(n))return "light";if(r.classList.contains("dark"))return "dark";if(r.classList.contains("light"))return "light";try{let o=getComputedStyle(r).backgroundColor.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(o)return .299*+o[1]+.587*+o[2]+.114*+o[3]<128?"dark":"light"}catch{}}return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}render(){let e=this.getTheme(),r=this.config.position,n=this.locale;this.bannerResizeObserver?.disconnect(),this.bannerResizeObserver=null,this.shadow.innerHTML="";let s=document.createElement("style");if(s.textContent=ds(e,this.config.accent??"",this.config.accentText??""),this.shadow.appendChild(s),this.renderBanner(),this.shouldRenderTrigger()){let l=this.effectiveTrigger(),i=document.createElement("button");if(i.className=`mushi-trigger ${r}${l==="edge-tab"?" edge-tab":""}${this.triggerShrunk?" shrunk":""}`,i.textContent=this.config.triggerText,i.setAttribute("aria-label",n.widget.trigger),i.setAttribute("aria-haspopup","dialog"),i.setAttribute("aria-expanded",String(this.isOpen)),i.style.zIndex=String(this.config.zIndex),this.applyInsetVars(i),i.addEventListener("click",()=>{this.removeNudge(),this.isOpen?this.close():this.open();}),i.addEventListener("mouseenter",()=>{let a=this.mountedAt?Date.now()-this.mountedAt:0;!this.nudgeShown&&!this.isOpen&&a>=3e4&&this.showNudge();}),i.addEventListener("mouseleave",()=>{this.nudgeEl&&(this.nudgeTimer!==null&&clearTimeout(this.nudgeTimer),this.nudgeTimer=setTimeout(()=>this.removeNudge(),2e3));}),i.addEventListener("keydown",a=>{let m=this.config.draggable;if(!m)return;let p=8,g=typeof m=="object"?m.axis??"both":"both",u=0,c=0;if(g!=="y"&&(a.key==="ArrowLeft"?u=-p:a.key==="ArrowRight"&&(u=p)),g!=="x"&&(a.key==="ArrowUp"?c=-p:a.key==="ArrowDown"&&(c=p)),u!==0||c!==0){a.preventDefault();let h=this.fabPos??{x:0,y:0};this.moveFab(i,h.x+u,h.y+c,false);}}),this.config.draggable&&this.attachDragHandlers(i),this.shadow.appendChild(i),this.fabPos&&this.config.draggable){let a=this.fabPos;this.fabPos={x:0,y:0},this.moveFab(i,a.x,a.y,false);}}let o=document.createElement("div");if(o.className=`mushi-panel ${r}${this.isOpen?" open":" closed"}`,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-label",n.widget.title),o.style.zIndex=String(this.config.zIndex+1),this.applyInsetVars(o),this.isOpen){let l=this.renderCtx();o.innerHTML=`${ys(l)}${bs(l)}${vs(l)}`,this.shadow.appendChild(o),this.attachHandlers(o),this.trapFocus(o),this.attachViewportHandlers(o);}else this.teardownViewportHandlers();}computeAvoidTopPx(e=8){let r=this.config.avoidSelectors;if(!r?.length)return null;let n=0;for(let s of r)try{let o=document.querySelector(s);if(!o)continue;let l=o.getBoundingClientRect();l.bottom>n&&l.width>0&&l.height>0&&(n=l.bottom);}catch{}return n>0?Math.ceil(n)+e:null}computeAvoidBottomPx(e=8){let r=this.config.avoidSelectors;if(!r?.length)return null;let n=0;for(let s of r)try{let o=document.querySelector(s);if(!o)continue;let l=o.getBoundingClientRect();if(l.width>0&&l.height>0){let i=window.innerHeight-l.top+e;i>n&&(n=i);}}catch{}return n>0?Math.ceil(n):null}applyInsetVars(e){let{anchor:r}=this.config;if(r&&Object.keys(r).length>0)["top","right","bottom","left"].forEach(o=>{let l=r[o];l!==void 0&&e.style.setProperty(`--mushi-${o}`,l);}),e.style.setProperty("--mushi-safe-area",this.config.respectSafeArea?"1":"0");else {let{inset:o}=this.config;this.config.respectSafeArea||["top","right","bottom","left"].forEach(l=>{o[l]===void 0&&e.style.setProperty(`--mushi-${l}`,"24px");}),["top","right","bottom","left"].forEach(l=>{let i=o[l];i!==void 0&&e.style.setProperty(`--mushi-${l}`,i==="auto"?"auto":`${i}px`);}),e.style.setProperty("--mushi-safe-area",this.config.respectSafeArea?"1":"0");}let n=r?.top!==void 0||this.config.position?.startsWith("top"),s=r?.bottom!==void 0||this.config.position?.startsWith("bottom")||!this.config.position;if(n){let o=this.computeAvoidTopPx();o!==null&&e.style.setProperty("--mushi-top",`${o}px`);}if(s){let o=this.computeAvoidBottomPx();o!==null&&e.style.setProperty("--mushi-bottom",`${o}px`);}}fabStorageKey(){let e=this.config.projectId??"";return `mushi_fab_pos${e?`_${e}`:""}`}moveFab(e,r,n,s){let o=(()=>{let Z=this.config.draggable;return Z&&typeof Z=="object"?Z.axis??"both":"both"})(),l=window.innerWidth,i=window.innerHeight,a=e.offsetWidth||52,m=e.offsetHeight||52,p=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-left")||"0")||0,g=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-right")||"0")||0,u=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-top")||"0")||0,c=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sai-bottom")||"0")||0,h=8,y=e.getBoundingClientRect(),v=this.fabPos?.x??0,I=this.fabPos?.y??0,R=y.left-v,k=y.top-I,M=p+h-R,S=l-g-h-a-R,E=u+h-k,O=i-c-h-m-k,w=o==="y"?0:Math.max(M,Math.min(S,r)),B=o==="x"?0:Math.max(E,Math.min(O,n)),H=w;if(s){let Z=this.config.draggable;(Z===true||typeof Z=="object"&&(Z.snapToEdge??true))&&o!=="y"&&(H=y.left+a/2<l/2?p+h-R:l-g-h-a-R);}this.fabPos={x:H,y:B},e.style.setProperty("--mushi-drag-x",`${H}px`),e.style.setProperty("--mushi-drag-y",`${B}px`),e.style.setProperty("--mushi-drag-active","1");let F=this.config.draggable;if(F===true||typeof F=="object"&&(F.persist??true))try{localStorage.setItem(this.fabStorageKey(),JSON.stringify(this.fabPos));}catch{}}loadFabPos(){let e=this.config.draggable;if(!(!e||!(e===true||typeof e=="object"&&(e.persist??true))))try{let n=localStorage.getItem(this.fabStorageKey());if(n){let s=JSON.parse(n);typeof s?.x=="number"&&typeof s?.y=="number"&&(this.fabPos=s);}}catch{}}attachDragHandlers(e){this.fabPos===null&&this.loadFabPos();let r=0,n=0,s=0,o=0,l=false,i=false,a=u=>{if(u.button!==0&&u.pointerType!=="touch")return;e.setPointerCapture(u.pointerId),r=u.clientX,n=u.clientY;let c=this.fabPos??{x:0,y:0};s=c.x,o=c.y,l=true,i=false;},m=6,p=u=>{if(!l)return;let c=u.clientX-r,h=u.clientY-n;!i&&Math.hypot(c,h)>m&&(i=true,e.classList.add("dragging"),e.setAttribute("aria-grabbed","true")),i&&(u.preventDefault(),this.moveFab(e,s+c,o+h,false));},g=u=>{if(l){if(l=false,e.classList.remove("dragging"),e.removeAttribute("aria-grabbed"),i){let c=u.clientX-r,h=u.clientY-n;this.moveFab(e,s+c,o+h,true);let y=v=>{v.stopImmediatePropagation(),e.removeEventListener("click",y,{capture:true});};e.addEventListener("click",y,{capture:true});}i=false;}};e.addEventListener("pointerdown",a),e.addEventListener("pointermove",p),e.addEventListener("pointerup",g),e.addEventListener("pointercancel",g);}attachViewportHandlers(e){this.teardownViewportHandlers();let r=window.visualViewport;if(!r)return;let n=()=>{let o=window.innerHeight-r.height-r.offsetTop;o>50?(e.style.setProperty("--mushi-keyboard-inset",`${Math.round(o)}px`),e.classList.add("keyboard-open"),e.querySelector('textarea, input[type="text"]')?.scrollIntoView({block:"nearest",behavior:"smooth"})):(e.style.setProperty("--mushi-keyboard-inset","0px"),e.classList.remove("keyboard-open"));};r.addEventListener("resize",n,{passive:true}),r.addEventListener("scroll",n,{passive:true});let s=()=>requestAnimationFrame(n);e.addEventListener("focusin",s),this.vvCleanup=()=>{r.removeEventListener("resize",n),r.removeEventListener("scroll",n),e.removeEventListener("focusin",s);};}teardownViewportHandlers(){this.vvCleanup?.(),this.vvCleanup=null;}effectiveMinLength(){let e=this.config.minDescriptionLength??20,r=this.config.locale==="auto"?typeof navigator<"u"?navigator.language??"":"":this.config.locale??"";return /^(ja|zh|ko)/i.test(r)?Math.max(4,Math.floor(e/2)):e}tierColor(e){return dr[e]??dr.default}renderCtx(){return {config:this.config,rewardsState:this.rewardsState,lastReportId:this.lastReportId,reporterLoading:this.reporterLoading,locale:this.locale,identifiedUser:this.identifiedUser,testerReputation:this.testerReputation,testerInfo:this.testerInfo,screenshotCapturing:this.screenshotCapturing,screenshotAttached:this.screenshotAttached,screenshotPreview:this.screenshotPreview,screenshotHint:this.resolveScreenshotHint(),reporterError:this.reporterError,magicLinkError:this.magicLinkError,elementCapturing:this.elementCapturing,submitting:this.submitting,sdkFreshness:this.sdkFreshness,screenshotError:this.screenshotError,reporterReports:this.reporterReports,magicLinkSending:this.magicLinkSending,magicLinkEmail:this.magicLinkEmail,globalLeaderboardLoading:this.globalLeaderboardLoading,globalLeaderboard:this.globalLeaderboard,elementSelected:this.elementSelected,crossAppLoading:this.crossAppLoading,callbacks:this.callbacks,testerJwt:this.testerJwt,submittedAt:this.submittedAt,step:this.step,selectedReportId:this.selectedReportId,selectedCategory:this.selectedCategory,sdkVersion:this.sdkVersion,reporterComments:this.reporterComments,magicLinkSent:this.magicLinkSent,leaderboardLoading:this.leaderboardLoading,leaderboardEntries:this.leaderboardEntries,lastSubmitQueuedOffline:this.lastSubmitQueuedOffline,featureBoard:this.featureBoard,crossAppReports:this.crossAppReports,allowScreenshotRemove:this.allowScreenshotRemove,unreadCount:()=>this.unreadCount(),tierColor:e=>this.tierColor(e),resolveCustomCategory:e=>this.resolveCustomCategory(e),effectiveMinLength:()=>this.effectiveMinLength(),categoryLabel:e=>this.categoryLabel(e),categoryIcon:e=>this.categoryIcon(e),assistantTurns:this.assistantTurns,assistantSending:this.assistantSending,assistantError:this.assistantError,showAllCategories:this.showAllCategories,showMoreNav:this.showMoreNav,pageFaviconHref:ss()}}attachHandlers(e){let r=this.locale;gs(e),e.querySelector('[data-action="close"]')?.addEventListener("click",()=>this.close()),e.querySelector('[data-action="back"]')?.addEventListener("click",()=>{this.step==="intent"?(this.step="category",this.selectedCategory=null):this.step==="details"?this.viaFeatureRequest?(this.step="category",this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false):(this.step="intent",this.selectedIntent=null):this.step==="reports"?this.step="category":this.step==="report-detail"?(this.step="reports",this.selectedReportId=null):this.step==="leaderboard"?this.step="reports":this.step==="roadmap"?this.step="category":this.step==="assistant"?this.step="category":this.step==="account"?this.step="category":this.step==="cross-app-reports"?this.step="account":this.step==="success"&&(this.step="category",this.selectedCategory=null,this.selectedIntent=null,this.viaFeatureRequest=false),this.step==="category"&&(this.showAllCategories=false,this.showMoreNav=false),this.render();}),e.querySelector('[data-action="show-all-categories"]')?.addEventListener("click",()=>{this.showAllCategories=true,this.render();}),e.querySelector('[data-action="toggle-more-nav"]')?.addEventListener("click",()=>{this.showMoreNav=!this.showMoreNav,this.render();}),e.querySelector('[data-action="assistant"]')?.addEventListener("click",()=>{this.openAssistantTab();}),e.querySelectorAll('[data-action="assistant-suggest"]').forEach(l=>{l.addEventListener("click",()=>{let i=l.dataset.value;i&&this.sendAssistantMessage(i);});});{let l=e.querySelector('[data-action="assistant-send"]');if(l){let i=l.querySelector(".mushi-assistant-input");l.addEventListener("submit",a=>{a.preventDefault();let m=i?.value??"";i&&(i.value=""),this.sendAssistantMessage(m);}),i?.addEventListener("keydown",a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),l.requestSubmit());});}}e.querySelector('[data-action="reports"]')?.addEventListener("click",()=>{this.loadReporterReports();}),e.querySelector('[data-action="roadmap"]')?.addEventListener("click",()=>{this.loadFeatureBoard();}),e.querySelectorAll("[data-vote-id]").forEach(l=>{l.addEventListener("click",()=>{let i=l.dataset.voteId;i&&this.voteFeatureBoard(i);});}),e.querySelector('[data-action="feature-request"]')?.addEventListener("click",()=>{this.selectedCategory="other",this.selectedIntent=fr,this.viaFeatureRequest=true,this.step="details",this.render();}),e.querySelectorAll("[data-report-id]").forEach(l=>{l.addEventListener("click",()=>{let i=l.dataset.reportId;i&&this.loadReporterComments(i);});}),e.querySelector('[data-action="open-leaderboard"]')?.addEventListener("click",()=>{this.step="leaderboard",this.callbacks.onLeaderboardOpen?.(),this.callbacks.onGlobalLeaderboardOpen?.(),this.render();}),e.querySelector('[data-action="open-account"]')?.addEventListener("click",()=>{this.step="account",this.render();}),e.querySelector('[data-action="open-cross-app-reports"]')?.addEventListener("click",()=>{this.step="cross-app-reports",this.crossAppLoading=true,this.crossAppReports=null,this.render(),this.callbacks.onCrossAppReportsOpen?this.callbacks.onCrossAppReportsOpen():(this.crossAppLoading=false,this.crossAppReports=[],this.render());}),e.querySelector('[data-action="open-global-leaderboard"]')?.addEventListener("click",()=>{this.step="leaderboard",this.globalLeaderboard=null,this.globalLeaderboardLoading=true,this.render(),this.callbacks.onGlobalLeaderboardOpen?this.callbacks.onGlobalLeaderboardOpen():(this.globalLeaderboardLoading=false,this.globalLeaderboard=[],this.render());}),e.querySelector('[data-action="send-magic-link"]')?.addEventListener("click",()=>{this.handleMagicLinkSend(e);}),e.querySelector('[data-action="resend-magic-link"]')?.addEventListener("click",()=>{this.magicLinkSent=false,this.magicLinkError="",this.render();}),e.querySelector('[data-action="sign-out-tester"]')?.addEventListener("click",()=>{this.testerJwt=null,this.testerInfo=null,this.testerReputation=null,this.crossAppReports=null,this.magicLinkSent=false,this.magicLinkEmail="",this.step="category",this.callbacks.onTesterSignOut?.(),this.render();}),e.querySelector('[data-action="reporter-reply"]')?.addEventListener("click",()=>{this.submitReporterReply(e);}),e.querySelector('[data-action="reporter-confirms"]')?.addEventListener("click",()=>{this.submitReporterFeedback("confirms");}),e.querySelector('[data-action="reporter-not-fixed"]')?.addEventListener("click",()=>{this.submitReporterReopen();}),e.querySelector('[data-action="view-my-reports"]')?.addEventListener("click",()=>{this.loadReporterReports();}),e.querySelector('[data-action="copy-report-id"]')?.addEventListener("click",l=>{let i=l.currentTarget,a=i.dataset.copyId;if(!a)return;let m=i.innerHTML,p=()=>{i.innerHTML="Copied \u2713",window.setTimeout(()=>{i.isConnected&&(i.innerHTML=m);},1600);};try{navigator.clipboard?.writeText?navigator.clipboard.writeText(a).then(p).catch(()=>p()):p();}catch{p();}}),e.querySelectorAll("[data-category]").forEach(l=>{l.addEventListener("click",()=>{let i=l.dataset.category??"other";this.selectedCategory=i;let a=this.resolveCustomCategory(i);this.step=a&&(!a.intents||a.intents.length===0)?"details":"intent",this.render();});}),e.querySelectorAll("[data-intent]").forEach(l=>{l.addEventListener("click",()=>{this.selectedIntent=l.dataset.intent??null,this.step="details",this.render();});});let n=e.querySelector(".mushi-textarea"),s=e.querySelector('[data-role="char-current"]');if(n&&s){let l=this.effectiveMinLength(),i=()=>{let a=n.value.trim().length;s.textContent=String(a);let m=e.querySelector('[data-role="char-counter"]');m&&(m.style.color=a>=l?"var(--mushi-ok, #22c55e)":"");};n.addEventListener("input",i);}e.querySelectorAll("[data-example]").forEach(l=>{l.addEventListener("click",()=>{let i=l.dataset.example??"";n&&(n.value=i,n.focus(),n.dispatchEvent(new Event("input")));});}),e.querySelector('[data-action="screenshot"]')?.addEventListener("click",()=>{this.callbacks.onScreenshotRequest();}),e.querySelector('[data-action="remove-screenshot"]')?.addEventListener("click",()=>{this.callbacks.onScreenshotRemove?.();}),e.querySelector('[data-action="annotate-screenshot"]')?.addEventListener("click",()=>{let l=e.querySelector('[data-role="annotate-host"]');l&&this.callbacks.onScreenshotAnnotateRequest&&this.callbacks.onScreenshotAnnotateRequest(l);}),e.querySelector('[data-action="element"]')?.addEventListener("click",()=>{this.callbacks.onElementSelectorRequest?.();});let o=()=>{let l=e.querySelector(".mushi-textarea"),i=l?.value?.trim()??"",a=e.querySelector(".mushi-error"),m=this.effectiveMinLength();if(i.length<m){if(a){let g=`${r.step3.tooShort} (${i.length}/${m})`;a.textContent=g,a.style.display="block",l?.focus();}return}this.submitting=true,this.submittedAt=new Date,this.lastReportId=null,this.lastSubmitQueuedOffline=false,this.render();let p=(async()=>{try{let g=this.selectedCategory,u=this.resolveBaseCategory(g),c=this.config.categories&&this.config.categories.length>0,h=this.callbacks.onSubmit({category:u,...c?{userCategory:g}:{},description:i,intent:this.selectedIntent??void 0});return h&&typeof h.then=="function"?await h??null:null}catch{return {reportId:null,queuedOffline:true}}})();this.successTimer=setTimeout(()=>{this.successTimer=null,this.submitting=false,this.step="success",this.render(),p.then(g=>{if(this.step!=="success")return;g&&(this.lastReportId=g.reportId??null,this.lastSubmitQueuedOffline=!!g.queuedOffline,this.render()),this.autoCloseTimer!==null&&clearTimeout(this.autoCloseTimer);let u=this.lastReportId&&this.config.dashboardUrl?6e3:2800;this.autoCloseTimer=setTimeout(()=>{this.autoCloseTimer=null,this.step==="success"&&this.close();},u);});},500);};e.querySelector('[data-action="submit"]')?.addEventListener("click",o),e.addEventListener("keydown",l=>{if(l.key==="Escape"){this.close();return}this.step==="details"&&hs(l)&&(l.preventDefault(),o());});}trapFocus(e){requestAnimationFrame(()=>{let r=e.querySelector("textarea");if(r){r.focus();return}let n=e.querySelectorAll("button, textarea, [tabindex]");n.length>0&&n[0].focus();});}unreadCount(){return this.reporterReports.reduce((e,r)=>e+(r.unread_count??0),0)}async loadFeatureBoard(){this.step="roadmap",this.reporterLoading=true,this.reporterError=null,this.render();try{this.featureBoard=await this.callbacks.onFeatureBoardRequest?.()??[];}catch(e){this.reporterError=e instanceof Error?e.message:"Could not load community ideas.";}finally{this.reporterLoading=false,this.render();}}async voteFeatureBoard(e){if(!(!this.callbacks.onFeatureBoardVote||this.reporterLoading)){this.reporterLoading=true,this.render();try{await this.callbacks.onFeatureBoardVote(e),this.featureBoard=await this.callbacks.onFeatureBoardRequest?.()??this.featureBoard;}catch(r){this.reporterError=r instanceof Error?r.message:"Could not update vote.";}finally{this.reporterLoading=false,this.render();}}}async submitReporterReopen(){let e=this.selectedReportId;if(!(!e||this.reporterLoading)){this.reporterLoading=true,this.render();try{this.callbacks.onReporterReopen?await this.callbacks.onReporterReopen(e,"Not fixed for me"):await this.callbacks.onReporterFeedback?.(e,"not_fixed","Not fixed for me"),await this.loadReporterReports();}catch(r){this.reporterError=r instanceof Error?r.message:"Could not reopen report.";}finally{this.reporterLoading=false,this.render();}}}async refreshReporterInboxQuiet(){try{this.reporterReports=await this.callbacks.onReporterReportsRequest?.()??[],this.isOpen&&this.render();}catch{}}async loadReporterReports(){this.step="reports",this.reporterLoading=true,this.reporterError=null,this.render();try{this.reporterReports=await this.callbacks.onReporterReportsRequest?.()??[];}catch(e){this.reporterError=e instanceof Error?e.message:"Could not load reports.";}finally{this.reporterLoading=false,this.render();}}async loadReporterComments(e){this.selectedReportId=e,this.step="report-detail",this.reporterLoading=true,this.reporterError=null,this.render();try{this.reporterComments=await this.callbacks.onReporterCommentsRequest?.(e)??[];}catch(r){this.reporterError=r instanceof Error?r.message:"Could not load thread.";}finally{this.reporterLoading=false,this.render();}}async submitReporterFeedback(e){let r=this.selectedReportId;if(!(!r||this.reporterLoading)){this.reporterLoading=true,this.render();try{await this.callbacks.onReporterFeedback?.(r,e),await this.loadReporterReports(),r&&await this.loadReporterComments(r);}catch(n){this.reporterError=n instanceof Error?n.message:"Could not send feedback.",this.reporterLoading=false,this.render();}}}async submitReporterReply(e){let r=this.selectedReportId,n=e.querySelector('[data-role="reporter-reply"]'),s=e.querySelector('[data-action="reporter-reply"]'),o=n?.value.trim()??"";if(!(!r||!o||this.reporterLoading)){this.reporterLoading=true,s&&(s.disabled=true),this.render();try{await this.callbacks.onReporterReply?.(r,o),n&&(n.value=""),await this.loadReporterComments(r);}catch(l){this.reporterError=l instanceof Error?l.message:"Could not send reply.",this.reporterLoading=false,this.render();}}}async handleMagicLinkSend(e){if(this.magicLinkSending)return;let n=(e.querySelector('[data-role="magic-link-email"]')?.value??this.magicLinkEmail).trim();if(!n||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){this.magicLinkError="Please enter a valid email address.",this.render();return}this.magicLinkEmail=n,this.magicLinkError="",this.magicLinkSending=true,this.render();try{await this.callbacks.onMushiSignIn?.(n),this.magicLinkSent=!0;}catch(s){this.magicLinkError=s instanceof Error?s.message:"Could not send sign-in link. Try again.";}finally{this.magicLinkSending=false,this.render();}}getRecorderStep(){return this.step}getRecorderCategoryStepIA(){return {sectionLabel:this.shadow.querySelector(".mushi-section-label")?.textContent?.trim()??"",moreToggle:!!this.shadow.querySelector('[data-action="toggle-more-nav"]'),footerStepIndicators:this.shadow.querySelectorAll(".mushi-step-indicator").length}}getRecorderTrigger(){return this.shadow.querySelector(".mushi-trigger")}getRecorderCategoryButton(e){return this.shadow.querySelector(`[data-category="${e}"]`)}getRecorderIntentButton(e){return Array.from(this.shadow.querySelectorAll("[data-intent]")).find(r=>r.dataset.intent===e)??null}getRecorderSubmitButton(){return this.shadow.querySelector('[data-action="submit"]')}recorderClickTrigger(){this.isOpen&&this.close(),this.open();}openReporter(){this.isOpen||(this.isOpen=true,this.render()),this.loadReporterReports();}recorderSelectCategory(e){this.isOpen||this.open(),this.step!=="category"&&(this.selectedCategory=null,this.selectedIntent=null,this.step="category",this.render()),this.selectedCategory=e,this.step="intent",this.render();}recorderSelectIntent(e){!this.isOpen||this.step!=="intent"||(this.selectedIntent=e,this.step="details",this.render());}recorderFocusDescription(){this.shadow.querySelector(".mushi-textarea")?.focus();}recorderSubmit(){this.shadow.querySelector('[data-action="submit"]')?.click();}recorderOpenMyReports(){this.isOpen||this.open(),this.loadReporterReports();}};function Ft(t){if(!t)return null;let e=t.getBoundingClientRect();return e.width===0&&e.height===0?null:{x:e.left+e.width/2,y:e.top+e.height/2}}function xs(t){if(typeof globalThis>"u")return;let e={ready:()=>t.getIsMounted(),getStep:()=>t.getRecorderStep(),getCategoryStepIA:()=>t.getRecorderCategoryStepIA(),getTriggerCenter:()=>Ft(t.getRecorderTrigger()),getCategoryCenter:r=>Ft(t.getRecorderCategoryButton(r)),getIntentCenter:r=>Ft(t.getRecorderIntentButton(r)),getSubmitCenter:()=>Ft(t.getRecorderSubmitButton()),clickTrigger:()=>t.recorderClickTrigger(),selectCategory:r=>t.recorderSelectCategory(r),selectIntent:r=>t.recorderSelectIntent(r),focusDescription:()=>t.recorderFocusDescription(),submit:()=>t.recorderSubmit(),openMyReports:()=>t.recorderOpenMyReports()};globalThis.__mushiRecorder=e;}var Zi=3e4,Qi=3e5,ea=6e4,ta=60,Cs="mushi_session_min_day_",pt=[],xr=null,wr=null,Ue=null,Ts=null,Sr=null,ht=null,Ge=false,qt=null,Ms=0,ra=300*1e3,$s=0,na=900*1e3;function Rr(){return Date.now()<$s}function Cr(t){t?.startsWith("HTTP_4")&&($s=Date.now()+na);}var ws=new Set;function Er(t){return `mushi_rewards_consent_${t}`}function sa(t){try{return localStorage.getItem(Er(t))==="1"}catch{return false}}function kr(t,e){try{e?localStorage.setItem(Er(t),"1"):localStorage.removeItem(Er(t)),Ge=e;}catch{}}function Ls(){return new Date().toISOString().slice(0,10)}function Is(t){try{let e=sessionStorage.getItem(`${Cs}${t}_${Ls()}`);return e?parseInt(e,10):0}catch{return 0}}function oa(t){let e=Ls(),r=`${Cs}${t}_${e}`;try{let n=Is(t)+1;return sessionStorage.setItem(r,String(n)),n}catch{return 99}}function As(t){ht=t.client,Ue=t.userId,Ts=t.traits??null,Sr=t.reporterToken??null;let{projectId:e}=t,r=Math.max(Zi,t.config.flushIntervalMs??Qi);t.config.consentMode==="auto"?(Ge=true,kr(e,true)):Ge=sa(e),t.config.trackActivity&&la(e),xr&&clearInterval(xr),xr=setInterval(()=>ia(t),r),wr&&clearInterval(wr),wr=setInterval(()=>{if(!Ge||!Ue)return;let n=Is(e);n<ta&&(oa(e),tt({action:"session_minute",metadata:{minutes_today:n+1}}));},ea),t.config.showInWidget&&Tr(Ue).then(n=>{n&&Ds(n,t.config);}),t.config.consentMode!=="auto"&&!Ge&&ca(e,t.config);}function tt(t){!Ge||!Ue||pt.push({...t,queuedAt:Date.now()});}async function ia(t){if(!Ge||!Ue||pt.length===0)return;let e=null;if(t.config.verifyUserToken)try{e=await t.config.verifyUserToken();}catch{}if(Rr())return;let r=pt.splice(0,100);try{let n=Sr?await ar(Sr):void 0,s=await t.client.submitActivity(Ue,r,{userTraits:Ts??void 0,reporterTokenHash:n,optedIn:!0,hostJwt:e??void 0});s.ok||(Cr(s.error?.code),s.error?.code?.startsWith("HTTP_4")||pt.unshift(...r.slice(0,50)));}catch{pt.unshift(...r.slice(0,50));}}async function _s(t){let e=Date.now();return qt&&e-Ms<ra?qt:Tr(t)}async function Tr(t){if(!ht||Rr())return null;let e=await ht.getMyTier(t);return e.ok&&e.data?(qt=e.data,Ms=Date.now(),qt):(Cr(e.error?.code),null)}async function Ps(t=10){if(!ht||Rr())return null;try{let e=await ht.getHallOfFame(t);return e.ok&&e.data?(e.data.data??[]).map(r=>({display_name:r.display_name,tier_name:r.tier_name,total_points:r.total_points,points_30d:r.points_30d})):(Cr(e.error?.code),null)}catch{return null}}var Ss=null,Es=null,ks=null,Rs="";function la(t){let e=()=>{let n=location.pathname;if(n===Rs)return;Rs=n,!ws.has(`${t}:${n}`)&&(ws.add(`${t}:${n}`),tt({action:"screen_view_unique_per_day",metadata:{route:n}}));};ks=history.pushState.bind(history),history.pushState=function(...n){ks(...n),e();},window.addEventListener("popstate",e),e(),Ss=new MutationObserver(()=>e());let r=document.querySelector("main")??document.body;Ss.observe(r,{childList:true,subtree:false}),Es=n=>{let s=n.target.closest("[data-testid]");if(!s)return;let o=s.dataset.testid;o&&tt({action:"element_selected",metadata:{testid:o,route:location.pathname}});},document.addEventListener("click",Es,{capture:true,passive:true});}var Ve=null;function Ds(t,e){if(!e.showInWidget)return;Ve&&Ve.remove(),Ve=document.createElement("div"),Ve.id="mushi-tier-badge",Object.assign(Ve.style,{position:"fixed",bottom:"56px",right:"16px",zIndex:"2147483645",fontFamily:"system-ui, sans-serif"});let r=Ve.attachShadow({mode:"closed"});r.innerHTML=`
2200
2194
  <style>
2201
2195
  :host { display: block; }
2202
2196
  .badge {
@@ -2218,7 +2212,7 @@
2218
2212
  width: 6px;
2219
2213
  height: 6px;
2220
2214
  border-radius: 50%;
2221
- background: #6c47ff;
2215
+ background: ${se.accent};
2222
2216
  flex-shrink: 0;
2223
2217
  }
2224
2218
  </style>
@@ -2226,20 +2220,20 @@
2226
2220
  <span class="dot"></span>
2227
2221
  <span>${t.displayName}</span>
2228
2222
  </div>
2229
- `,document.body.appendChild(we);}var pe=null;function ai(t,e){if(pe)return;pe=document.createElement("div"),pe.id="mushi-consent-banner",Object.assign(pe.style,{position:"fixed",bottom:"80px",right:"16px",zIndex:"2147483646",maxWidth:"280px",fontFamily:"system-ui, sans-serif"});let r=pe.attachShadow({mode:"closed"});r.innerHTML=`
2223
+ `,document.body.appendChild(Ve);}var Re=null;function ca(t,e){if(Re)return;Re=document.createElement("div"),Re.id="mushi-consent-banner",Object.assign(Re.style,{position:"fixed",bottom:"80px",right:"16px",zIndex:"2147483646",maxWidth:"280px",fontFamily:"system-ui, sans-serif"});let r=Re.attachShadow({mode:"closed"});r.innerHTML=`
2230
2224
  <style>
2231
2225
  :host { display: block; }
2232
2226
  .banner {
2233
- background: #fff;
2234
- border: 1px solid #e5e7eb;
2227
+ background: ${se.paperRaised};
2228
+ border: 1px solid ${se.ruleStrong};
2235
2229
  border-radius: 12px;
2236
2230
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
2237
2231
  padding: 14px 16px;
2238
2232
  font-size: 13px;
2239
2233
  line-height: 1.5;
2240
- color: #374151;
2234
+ color: ${se.inkMuted};
2241
2235
  }
2242
- .title { font-weight: 700; margin-bottom: 6px; color: #111827; }
2236
+ .title { font-weight: 700; margin-bottom: 6px; color: ${se.ink}; }
2243
2237
  .actions { display: flex; gap: 8px; margin-top: 10px; }
2244
2238
  button {
2245
2239
  flex: 1;
@@ -2250,8 +2244,8 @@
2250
2244
  font-size: 12px;
2251
2245
  font-weight: 600;
2252
2246
  }
2253
- .accept { background: #6c47ff; color: #fff; }
2254
- .decline { background: #f3f4f6; color: #374151; }
2247
+ .accept { background: ${se.accent}; color: ${se.paperRaised}; }
2248
+ .decline { background: ${se.paper}; color: ${se.inkMuted}; }
2255
2249
  </style>
2256
2250
  <div class="banner">
2257
2251
  <div class="title">\u{1F3AF} Earn rewards</div>
@@ -2261,23 +2255,23 @@
2261
2255
  <button class="decline" id="decline">No thanks</button>
2262
2256
  </div>
2263
2257
  </div>
2264
- `,r.getElementById("accept")?.addEventListener("click",()=>{yt(t,true),pe?.remove(),pe=null,e.showInWidget&&ye&&Et(ye).then(n=>{n&&rn(n,e);});}),r.getElementById("decline")?.addEventListener("click",()=>{yt(t,false),pe?.remove(),pe=null;}),document.body.appendChild(pe);}function kt(){let t=[],e={},r=["log","warn","error","info","debug"];for(let n of r){let s=console[n];e[n]=s,console[n]=(...i)=>{let a=i.map(l=>{try{return typeof l=="string"?l:JSON.stringify(l)}catch{return String(l)}}).join(" ").slice(0,500),o={level:n,message:a,timestamp:Date.now()};n==="error"&&i[0]instanceof Error&&(o.stack=i[0].stack?.slice(0,1e3)),t.push(o),t.length>50&&t.shift(),s.call(console,...i);};}return {getEntries(){return [...t]},clear(){t.length=0;},destroy(){for(let n of r)e[n]&&(console[n]=e[n]);}}}var li=[/\/v1\/sdk(?:\/|$)/,/\/v1\/reports(?:\/|$)/,/\/v1\/notifications(?:\/|$)/,/\/v1\/reputation(?:\/|$)/];function Xe(t){return typeof t=="string"?t:t instanceof URL?t.href:t.url}function Je(t,e){let r=e?.[Re];if(r)return r;let n=di(e?.headers,$e);if(n)return n;if(typeof Request<"u"&&t instanceof Request){let s=t.headers.get($e);if(s)return s}return null}function Ze(t,e={}){if([...li,...e.ignoreUrls??[]].some(s=>ci(t,s)))return true;let n=ui(e.apiEndpoint);return n?Rt(t).startsWith(n):false}function ci(t,e){return typeof e=="string"?Rt(t).includes(e):(e.lastIndex=0,e.test(t))}function ui(t){if(!t)return null;let e=Rt(t),r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)}function Rt(t){try{return new URL(t,typeof location<"u"?location.href:"http://localhost").href}catch{return t}}function di(t,e){if(!t)return null;if(typeof Headers<"u"&&t instanceof Headers)return t.get(e);if(Array.isArray(t))return t.find(([s])=>s.toLowerCase()===e.toLowerCase())?.[1]??null;let r=t;return r[e]??r[e.toLowerCase()]??null}var pi=30,hi="00";function mi(){let t=crypto.getRandomValues(new Uint8Array(16)),e=crypto.getRandomValues(new Uint8Array(8)),r=i=>Array.from(i).map(a=>a.toString(16).padStart(2,"0")).join(""),n=r(t),s=r(e);return {traceparent:`${hi}-${n}-${s}-01`,traceId:n,spanId:s}}function gi(t,e){for(let r of e)if(typeof r=="string"){if(t.includes(r))return true}else if(r.test(t))return true;return false}function Ct(t={}){let e=[],r=globalThis.fetch,n=t;globalThis.fetch=async function(a,o){let l=Date.now(),g=o?.method?.toUpperCase()??"GET",p=Xe(a),d=!Je(a,o)&&!Ze(p,n),m,c=o,f=n.tracePropagation;if(d&&f?.enabled&&f.corsUrls?.length&&gi(p,f.corsUrls)){let{traceparent:S,traceId:$}=mi();m=$;let R=o?.headers?new Headers(o.headers):new Headers;R.set("traceparent",S),n.sessionId&&R.set("x-mushi-session",n.sessionId),c={...o,headers:R};}try{let S=await r.call(globalThis,a,c);return d&&s({method:g,url:nn(p),status:S.status,duration:Date.now()-l,timestamp:l,...m?{traceId:m}:{}}),S}catch(S){throw d&&s({method:g,url:nn(p),status:0,duration:Date.now()-l,timestamp:l,error:S instanceof Error?S.message:"Network error",...m?{traceId:m}:{}}),S}};function s(i){e.push(i),e.length>pi&&e.shift();}return {getEntries(){return [...e]},clear(){e.length=0;},updateOptions(i){n=i;},destroy(){globalThis.fetch=r;}}}function nn(t){try{let e=new URL(t),r=e.pathname+e.search;return r.length>200?e.origin+r.slice(0,200)+"...":e.origin+r}catch{return t.slice(0,200)}}function $t(t={}){let e=t;async function r(){try{if(typeof document>"u")return null;let n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return null;let i=window.innerWidth,a=window.innerHeight,o=Math.min(window.devicePixelRatio||1,2);n.width=i*o,n.height=a*o,s.scale(o,o);let l=bi(e.privacy),g=`
2265
- <svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${a}">
2258
+ `,r.getElementById("accept")?.addEventListener("click",()=>{kr(t,true),Re?.remove(),Re=null,e.showInWidget&&Ue&&Tr(Ue).then(n=>{n&&Ds(n,e);});}),r.getElementById("decline")?.addEventListener("click",()=>{kr(t,false),Re?.remove(),Re=null;}),document.body.appendChild(Re);}function Mr(){let t=[],e={},r=["log","warn","error","info","debug"];for(let n of r){let s=console[n];e[n]=s,console[n]=(...o)=>{let l=o.map(a=>{try{return typeof a=="string"?a:JSON.stringify(a)}catch{return String(a)}}).join(" ").slice(0,500),i={level:n,message:l,timestamp:Date.now()};n==="error"&&o[0]instanceof Error&&(i.stack=o[0].stack?.slice(0,1e3)),t.push(i),t.length>50&&t.shift(),s.call(console,...o);};}return {getEntries(){return [...t]},clear(){t.length=0;},destroy(){for(let n of r)e[n]&&(console[n]=e[n]);}}}var ua=[/\/v1\/sdk(?:\/|$)/,/\/v1\/reports(?:\/|$)/,/\/v1\/notifications(?:\/|$)/,/\/v1\/reputation(?:\/|$)/];function jt(t){return typeof t=="string"?t:t instanceof URL?t.href:t.url}function zt(t,e){let r=e?.[Xe];if(r)return r;let n=ha(e?.headers,ut);if(n)return n;if(typeof Request<"u"&&t instanceof Request){let s=t.headers.get(ut);if(s)return s}return null}function Wt(t,e={}){if([...ua,...e.ignoreUrls??[]].some(s=>da(t,s)))return true;let n=pa(e.apiEndpoint);return n?$r(t).startsWith(n):false}function da(t,e){return typeof e=="string"?$r(t).includes(e):(e.lastIndex=0,e.test(t))}function pa(t){if(!t)return null;let e=$r(t),r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)}function $r(t){try{return new URL(t,typeof location<"u"?location.href:"http://localhost").href}catch{return t}}function ha(t,e){if(!t)return null;if(typeof Headers<"u"&&t instanceof Headers)return t.get(e);if(Array.isArray(t))return t.find(([s])=>s.toLowerCase()===e.toLowerCase())?.[1]??null;let r=t;return r[e]??r[e.toLowerCase()]??null}var ma=30,ga="00";function fa(){let t=crypto.getRandomValues(new Uint8Array(16)),e=crypto.getRandomValues(new Uint8Array(8)),r=o=>Array.from(o).map(l=>l.toString(16).padStart(2,"0")).join(""),n=r(t),s=r(e);return {traceparent:`${ga}-${n}-${s}-01`,traceId:n,spanId:s}}function ba(t,e){for(let r of e)if(typeof r=="string"){if(t.includes(r))return true}else if(r.test(t))return true;return false}function Lr(t={}){let e=[],r=globalThis.fetch,n=t;globalThis.fetch=async function(l,i){let a=Date.now(),m=i?.method?.toUpperCase()??"GET",p=jt(l),u=!zt(l,i)&&!Wt(p,n),c,h=i,y=n.tracePropagation;if(u&&y?.enabled&&y.corsUrls?.length&&ba(p,y.corsUrls)){let{traceparent:v,traceId:I}=fa();c=I;let R=i?.headers?new Headers(i.headers):new Headers;R.set("traceparent",v),n.sessionId&&R.set("x-mushi-session",n.sessionId),h={...i,headers:R};}try{let v=await r.call(globalThis,l,h);return u&&s({method:m,url:Hs(p),status:v.status,duration:Date.now()-a,timestamp:a,...c?{traceId:c}:{}}),v}catch(v){throw u&&s({method:m,url:Hs(p),status:0,duration:Date.now()-a,timestamp:a,error:v instanceof Error?v.message:"Network error",...c?{traceId:c}:{}}),v}};function s(o){e.push(o),e.length>ma&&e.shift();}return {getEntries(){return [...e]},clear(){e.length=0;},updateOptions(o){n=o;},destroy(){globalThis.fetch=r;}}}function Hs(t){try{let e=new URL(t),r=e.pathname+e.search;return r.length>200?e.origin+r.slice(0,200)+"...":e.origin+r}catch{return t.slice(0,200)}}function _r(t={}){let e=t;async function r(){try{if(typeof document>"u")return null;let n=document.createElement("canvas"),s=n.getContext("2d");if(!s)return null;let o=window.innerWidth,l=window.innerHeight,i=Math.min(window.devicePixelRatio||1,2);n.width=o*i,n.height=l*i,s.scale(i,i);let a=va(e.privacy),m=`
2259
+ <svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${l}">
2266
2260
  <foreignObject width="100%" height="100%">
2267
2261
  <div xmlns="http://www.w3.org/1999/xhtml">
2268
- ${new XMLSerializer().serializeToString(l)}
2262
+ ${new XMLSerializer().serializeToString(a)}
2269
2263
  </div>
2270
2264
  </foreignObject>
2271
2265
  </svg>
2272
- `,p=new Image,w=new Blob([g],{type:"image/svg+xml;charset=utf-8"}),d=URL.createObjectURL(w);return new Promise(m=>{p.onload=()=>{try{s.drawImage(p,0,0,i,a),URL.revokeObjectURL(d);let c=n.toDataURL("image/jpeg",.7);m(c);}catch{URL.revokeObjectURL(d),e.onFailed?.("taint"),Tt("taint"),m(null);}},p.onerror=()=>{URL.revokeObjectURL(d),e.onFailed?.("error"),Tt("error"),m(null);},p.src=d;})}catch{return e.onFailed?.("error"),Tt("error"),null}}return {take:r,updateOptions(n){e=n;}}}function Tt(t){try{document.dispatchEvent(new CustomEvent("mushi:screenshot_failed",{detail:{reason:t},bubbles:!1}));}catch{}}var fi=['input[type="password"]',"[data-mushi-redact]"];function bi(t){let e=document.documentElement.cloneNode(true);e.querySelector("#mushi-mushi-widget")?.remove(),vi(e);let r=t?.redactSelectors!==void 0?t.redactSelectors:fi;for(let n of r)for(let s of Mt(e,n))yi(s);for(let n of t?.blockSelectors??[])for(let s of Mt(e,n))s.remove();for(let n of t?.maskSelectors??[])for(let s of Mt(e,n))wi(s);return e}function Mt(t,e){try{return Array.from(t.querySelectorAll(e))}catch{return []}}function yi(t){for((t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value="",t.setAttribute("value","")),t.textContent="",t.setAttribute("style",`${t.getAttribute("style")??""};background:#000!important;color:#000!important;text-shadow:none!important;border-color:#000!important;`),t.setAttribute("data-mushi-redacted","true");t.firstChild;)t.removeChild(t.firstChild);}function vi(t){let e=typeof location<"u"?location.origin:"";for(let r of t.querySelectorAll("img, video, iframe, object, embed, picture"))r.remove();for(let r of t.querySelectorAll('link[rel="stylesheet"], link[as="style"]')){let n=r.getAttribute("href");(!n||on(n,e))&&r.remove();}for(let r of t.querySelectorAll("style")){let n=sn(r.textContent??"",e);n!==r.textContent&&(r.textContent=n);}for(let r of t.querySelectorAll("[style]")){let n=r.getAttribute("style");if(!n)continue;let s=sn(n,e);s!==n&&r.setAttribute("style",s);}for(let r of t.querySelectorAll("script"))r.remove();}function sn(t,e){return t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,(r,n,s)=>{let i=s.trim();return !i||i.startsWith("data:")||i.startsWith("#")?r:on(i,e)?"none":r})}function on(t,e){if(!t||t.startsWith("data:")||t.startsWith("blob:"))return false;try{let r=new URL(t,typeof location<"u"?location.href:"http://localhost/");return !!e&&r.origin!==e}catch{return true}}function wi(t){(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value="",t.setAttribute("value",""),t.setAttribute("placeholder","\u2022\u2022\u2022\u2022")),t.textContent=t.children.length===0?"\u2022\u2022\u2022\u2022":t.textContent,t.setAttribute("style",`${t.getAttribute("style")??""};background:#8f8f8f!important;color:transparent!important;text-shadow:none!important;`),t.setAttribute("data-mushi-masked","true");}function xi(t){if(!t||!t.tagName)return;let e=t,r=e.tagName.toLowerCase(),n=e.id?`#${e.id}`:"",s=e.classList&&e.classList.length>0?`.${e.classList[0]}`:"";return `${r}${n}${s}`}function Lt(){let t={},e=[];if(typeof PerformanceObserver<"u"){try{let r=new PerformanceObserver(n=>{for(let s of n.getEntries())s.name==="first-contentful-paint"&&(t.fcp=s.startTime);});r.observe({type:"paint",buffered:!0}),e.push(r);}catch{}try{let r=new PerformanceObserver(n=>{let s=n.getEntries();s.length>0&&(t.lcp=s[s.length-1].startTime);});r.observe({type:"largest-contentful-paint",buffered:!0}),e.push(r);}catch{}try{let r=0,n=new PerformanceObserver(s=>{for(let i of s.getEntries())i.hadRecentInput||(r+=i.value??0,t.cls=r);});n.observe({type:"layout-shift",buffered:!0}),e.push(n);}catch{}try{let r=0,n=new PerformanceObserver(s=>{r+=s.getEntries().length,t.longTasks=r;});n.observe({type:"longtask",buffered:!0}),e.push(n);}catch{}try{let r=new Map,n=new PerformanceObserver(s=>{for(let i of s.getEntries()){let a=i.interactionId;if(!a)continue;let o=r.get(a)??0;if(i.duration>o&&r.set(a,i.duration),i.duration>(t.inp??0)){t.inp=i.duration;let l=i.processingStart-i.startTime,g=i.processingEnd-i.processingStart,p=i.startTime+i.duration-i.processingEnd;t.inpAttribution={eventType:i.name,targetSelector:xi(i.target),inputDelay:Math.max(0,l),processingDuration:Math.max(0,g),presentationDelay:Math.max(0,p)};}}});n.observe({type:"event",durationThreshold:40,buffered:!0}),e.push(n);}catch{}try{let r=new PerformanceObserver(n=>{for(let s of n.getEntries())t.fid===void 0&&(t.fid=s.processingStart-s.startTime);});r.observe({type:"first-input",buffered:!0}),e.push(r);}catch{}}if(typeof performance<"u"&&performance.getEntriesByType)try{let r=performance.getEntriesByType("navigation");r.length>0&&r[0]&&(t.ttfb=r[0].responseStart-r[0].requestStart);}catch{}return {getMetrics(){return {...t}},destroy(){for(let r of e)r.disconnect();e.length=0;}}}function It(){let t=false,e=null,r=null;function n(c){let f=c,S=0;for(;f&&S<20;){let $=f.getAttribute?.("data-testid");if($)return $;f=f.parentElement,S++;}return null}function s(c){let f=[],S=c;for(;S&&S!==document.body;){let $=1,R=S.previousElementSibling;for(;R;)R.tagName===S.tagName&&$++,R=R.previousElementSibling;let E=S.tagName.toLowerCase();f.unshift($>1?`${E}[${$}]`:E),S=S.parentElement;}return "//"+f.join("/")}function i(c){let f=c.getBoundingClientRect();return {tagName:c.tagName.toLowerCase(),id:c.id||void 0,className:c.className||void 0,textContent:c.textContent?.trim().slice(0,200)||void 0,xpath:s(c),rect:{x:Math.round(f.x),y:Math.round(f.y),width:Math.round(f.width),height:Math.round(f.height)},nearestTestid:n(c)||void 0,route:typeof window<"u"?window.location.pathname:void 0}}function a(){let c=document.createElement("div");return c.style.cssText=`
2266
+ `,p=new Image,g=new Blob([m],{type:"image/svg+xml;charset=utf-8"}),u=URL.createObjectURL(g);return new Promise(c=>{p.onload=()=>{try{s.drawImage(p,0,0,o,l),URL.revokeObjectURL(u);let h=n.toDataURL("image/jpeg",.7);c(h);}catch{URL.revokeObjectURL(u),e.onFailed?.("taint"),Ir("taint"),c(null);}},p.onerror=()=>{URL.revokeObjectURL(u),e.onFailed?.("error"),Ir("error"),c(null);},p.src=u;})}catch{return e.onFailed?.("error"),Ir("error"),null}}return {take:r,updateOptions(n){e=n;}}}function Ir(t){try{document.dispatchEvent(new CustomEvent("mushi:screenshot_failed",{detail:{reason:t},bubbles:!1}));}catch{}}var ya=['input[type="password"]',"[data-mushi-redact]"];function va(t){let e=document.documentElement.cloneNode(true);e.querySelector("#mushi-mushi-widget")?.remove(),wa(e);let r=t?.redactSelectors!==void 0?t.redactSelectors:ya;for(let n of r)for(let s of Ar(e,n))xa(s);for(let n of t?.blockSelectors??[])for(let s of Ar(e,n))s.remove();for(let n of t?.maskSelectors??[])for(let s of Ar(e,n))Sa(s);return e}function Ar(t,e){try{return Array.from(t.querySelectorAll(e))}catch{return []}}function xa(t){for((t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value="",t.setAttribute("value","")),t.textContent="",t.setAttribute("style",`${t.getAttribute("style")??""};background:#000!important;color:#000!important;text-shadow:none!important;border-color:#000!important;`),t.setAttribute("data-mushi-redacted","true");t.firstChild;)t.removeChild(t.firstChild);}function wa(t){let e=typeof location<"u"?location.origin:"";for(let r of t.querySelectorAll("img, video, iframe, object, embed, picture"))r.remove();for(let r of t.querySelectorAll('link[rel="stylesheet"], link[as="style"]')){let n=r.getAttribute("href");(!n||Bs(n,e))&&r.remove();}for(let r of t.querySelectorAll("style")){let n=Os(r.textContent??"",e);n!==r.textContent&&(r.textContent=n);}for(let r of t.querySelectorAll("[style]")){let n=r.getAttribute("style");if(!n)continue;let s=Os(n,e);s!==n&&r.setAttribute("style",s);}for(let r of t.querySelectorAll("script"))r.remove();}function Os(t,e){return t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,(r,n,s)=>{let o=s.trim();return !o||o.startsWith("data:")||o.startsWith("#")?r:Bs(o,e)?"none":r})}function Bs(t,e){if(!t||t.startsWith("data:")||t.startsWith("blob:"))return false;try{let r=new URL(t,typeof location<"u"?location.href:"http://localhost/");return !!e&&r.origin!==e}catch{return true}}function Sa(t){(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(t.value="",t.setAttribute("value",""),t.setAttribute("placeholder","\u2022\u2022\u2022\u2022")),t.textContent=t.children.length===0?"\u2022\u2022\u2022\u2022":t.textContent,t.setAttribute("style",`${t.getAttribute("style")??""};background:#8f8f8f!important;color:transparent!important;text-shadow:none!important;`),t.setAttribute("data-mushi-masked","true");}function Ea(t){if(!t||!t.tagName)return;let e=t,r=e.tagName.toLowerCase(),n=e.id?`#${e.id}`:"",s=e.classList&&e.classList.length>0?`.${e.classList[0]}`:"";return `${r}${n}${s}`}function Pr(){let t={},e=[];if(typeof PerformanceObserver<"u"){try{let r=new PerformanceObserver(n=>{for(let s of n.getEntries())s.name==="first-contentful-paint"&&(t.fcp=s.startTime);});r.observe({type:"paint",buffered:!0}),e.push(r);}catch{}try{let r=new PerformanceObserver(n=>{let s=n.getEntries();s.length>0&&(t.lcp=s[s.length-1].startTime);});r.observe({type:"largest-contentful-paint",buffered:!0}),e.push(r);}catch{}try{let r=0,n=new PerformanceObserver(s=>{for(let o of s.getEntries())o.hadRecentInput||(r+=o.value??0,t.cls=r);});n.observe({type:"layout-shift",buffered:!0}),e.push(n);}catch{}try{let r=0,n=new PerformanceObserver(s=>{r+=s.getEntries().length,t.longTasks=r;});n.observe({type:"longtask",buffered:!0}),e.push(n);}catch{}try{let r=new Map,n=new PerformanceObserver(s=>{for(let o of s.getEntries()){let l=o.interactionId;if(!l)continue;let i=r.get(l)??0;if(o.duration>i&&r.set(l,o.duration),o.duration>(t.inp??0)){t.inp=o.duration;let a=o.processingStart-o.startTime,m=o.processingEnd-o.processingStart,p=o.startTime+o.duration-o.processingEnd;t.inpAttribution={eventType:o.name,targetSelector:Ea(o.target),inputDelay:Math.max(0,a),processingDuration:Math.max(0,m),presentationDelay:Math.max(0,p)};}}});n.observe({type:"event",durationThreshold:40,buffered:!0}),e.push(n);}catch{}try{let r=new PerformanceObserver(n=>{for(let s of n.getEntries())t.fid===void 0&&(t.fid=s.processingStart-s.startTime);});r.observe({type:"first-input",buffered:!0}),e.push(r);}catch{}}if(typeof performance<"u"&&performance.getEntriesByType)try{let r=performance.getEntriesByType("navigation");r.length>0&&r[0]&&(t.ttfb=r[0].responseStart-r[0].requestStart);}catch{}return {getMetrics(){return {...t}},destroy(){for(let r of e)r.disconnect();e.length=0;}}}function Dr(){let t=false,e=null,r=null;function n(h){let y=h,v=0;for(;y&&v<20;){let I=y.getAttribute?.("data-testid");if(I)return I;y=y.parentElement,v++;}return null}function s(h){let y=[],v=h;for(;v&&v!==document.body;){let I=1,R=v.previousElementSibling;for(;R;)R.tagName===v.tagName&&I++,R=R.previousElementSibling;let k=v.tagName.toLowerCase();y.unshift(I>1?`${k}[${I}]`:k),v=v.parentElement;}return "//"+y.join("/")}function o(h){let y=h.getBoundingClientRect();return {tagName:h.tagName.toLowerCase(),id:h.id||void 0,className:h.className||void 0,textContent:h.textContent?.trim().slice(0,200)||void 0,xpath:s(h),rect:{x:Math.round(y.x),y:Math.round(y.y),width:Math.round(y.width),height:Math.round(y.height)},nearestTestid:n(h)||void 0,route:typeof window<"u"?window.location.pathname:void 0}}function l(){let h=document.createElement("div");return h.style.cssText=`
2273
2267
  position: fixed;
2274
2268
  pointer-events: none;
2275
2269
  z-index: 2147483647;
2276
- border: 2px solid #6366f1;
2277
- background: rgba(99, 102, 241, 0.1);
2270
+ border: 2px solid ${se.accent};
2271
+ background: ${se.accentWash};
2278
2272
  border-radius: 4px;
2279
2273
  transition: all 0.1s ease;
2280
2274
  display: none;
2281
- `,document.body.appendChild(c),c}function o(c){if(!e)return;let f=c.getBoundingClientRect();e.style.left=`${f.left}px`,e.style.top=`${f.top}px`,e.style.width=`${f.width}px`,e.style.height=`${f.height}px`,e.style.display="block";}function l(c){let f=c.target;f!==e&&o(f);}function g(c){c.preventDefault(),c.stopPropagation();let f=c.target;if(f===e||(c.composedPath?c.composedPath():[]).some(E=>E instanceof Element&&E.id==="mushi-mushi-widget"))return;let R=i(f);w(R);}function p(c){c.key==="Escape"&&w(null);}function w(c){m(),r?.(c),r=null;}function d(){return t&&m(),new Promise(c=>{r=c,t=true,e=a(),document.body.style.cursor="crosshair",document.addEventListener("mousemove",l,true),document.addEventListener("click",g,true),document.addEventListener("keydown",p,true);})}function m(){t&&(t=false,document.body.style.cursor="",document.removeEventListener("mousemove",l,true),document.removeEventListener("click",g,true),document.removeEventListener("keydown",p,true),e&&(e.remove(),e=null));}return {activate:d,deactivate:m,isActive:()=>t}}function At(){let t=[],e=history.pushState,r=history.replaceState,n=()=>a("popstate"),s=()=>a("hashchange");a("initial");function i(l){t.push(l),t.length>120&&t.shift();}function a(l){typeof location>"u"||i({ts:Date.now(),kind:"route",payload:{source:l,route:`${location.pathname}${location.search}${location.hash}`,href:location.href}});}function o(l){let g=l.target instanceof Element?l.target:null;if(!g)return;let p=g.closest('button,a,[role="button"],input,textarea,select,[data-mushi-track]')??g;i({ts:Date.now(),kind:"click",payload:{tag:p.tagName.toLowerCase(),id:p.id||void 0,text:Si(p)}});}return history.pushState=function(...g){let p=e.apply(this,g);return a("pushState"),p},history.replaceState=function(...g){let p=r.apply(this,g);return a("replaceState"),p},window.addEventListener("popstate",n),window.addEventListener("hashchange",s),document.addEventListener("click",o,true),{setScreen(l){i({ts:Date.now(),kind:"screen",payload:l});},getEntries(l={}){return [...t,...(l.consoleLogs??[]).map(p=>({ts:p.timestamp,kind:"log",payload:{level:p.level,message:p.message}})),...(l.networkLogs??[]).map(p=>({ts:p.timestamp,kind:"request",payload:{method:p.method,url:p.url,status:p.status,duration:p.duration,error:p.error}}))].sort((p,w)=>p.ts-w.ts).slice(-120)},clear(){t.length=0;},destroy(){history.pushState=e,history.replaceState=r,window.removeEventListener("popstate",n),window.removeEventListener("hashchange",s),document.removeEventListener("click",o,true);}}}function Si(t){let e=(t.textContent??"").replace(/\s+/g," ").trim();return e?e.slice(0,80):void 0}var Ei=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,ki=/^[0-9a-f]{20,}$/i,Ri=/^\d+$/,Ci=/^[a-z0-9]{16,}$/i;function an(t){return t.length===0?t:Ei.test(t)||ki.test(t)||Ri.test(t)||Ci.test(t)&&/\d/.test(t)?"[id]":t}function ln(t,e){let r=t.length>1&&t.endsWith("/")?t.slice(0,-1):t;if(e?.length){let n=Ti(r,e);if(n)return n}return "/"+r.split("/").filter(n=>n.length>0).map(an).join("/")}function Ti(t,e){let r=t.split("/").filter(s=>s.length>0),n=[...e].sort((s,i)=>i.split("/").length-s.split("/").length);for(let s of n){let i=s.split("/").filter(o=>o.length>0);if(i.length!==r.length)continue;let a=true;for(let o=0;o<i.length;o++){let l=i[o],g=r[o];if(!(l.startsWith("[")&&l.endsWith("]"))&&!l.startsWith(":")&&l!==g){a=false;break}}if(a)return "/"+i.join("/")}return null}function Mi(){if(typeof document>"u")return [];let t=new Set,e=document.querySelectorAll("[data-testid]");for(let r of Array.from(e)){let n=r.getAttribute("data-testid");n&&n.length>0&&n.length<120&&t.add(n);}return Array.from(t).sort()}function $i(){if(typeof window>"u")return [];try{let t=new URLSearchParams(window.location.search),e=new Set;return t.forEach((r,n)=>e.add(n)),Array.from(e).sort()}catch{return []}}function Li(){if(typeof document>"u")return null;let t=s=>(s??"").replace(/\s+/g," ").trim().slice(0,200),e=t(document.querySelector("h1")?.textContent);if(e)return e;let r=t(document.title);return r||t(document.querySelector("main")?.textContent)||null}async function Ii(t){if(!t||typeof crypto>"u"||!crypto.subtle)return null;try{let e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),n=new Uint8Array(r),s="";for(let i=0;i<n.length;i++)s+=n[i].toString(16).padStart(2,"0");return s}catch{return null}}function _t(t){let{config:e,getRecentNetworkPaths:r,getUserId:n,getSessionId:s,onEvent:i}=t,a=e.throttleMs??6e4,o=e.captureDomSummary!==false,l=e.userIdSource??"auto",g=new Map,p=null,w=null;async function d(){if(typeof window>"u")return;let y=ln(window.location.pathname,e.routeTemplates),k=Date.now(),b=g.get(y)??0;if(k-b<a)return;g.set(y,k);let _=null;l==="auto"?_=n()??s():l==="session-only"&&(_=s());let V={route:y,page_title:typeof document<"u"&&(document.title||"").slice(0,300)||null,dom_summary:o?Li():null,testids:Mi(),network_paths:r().slice(-50),query_param_keys:$i(),user_id_hash:await Ii(_),observed_at:new Date().toISOString()};i(V);}function m(){w||(w=setTimeout(()=>{w=null,d();},100));}function c(){if(typeof window>"u")return;let y=window.location.pathname+window.location.search;y!==p&&(p=y,m());}if(typeof window>"u")return {destroy:()=>{},flushNow:()=>{}};let f=window.history.pushState.bind(window.history),S=window.history.replaceState.bind(window.history),$=function(...k){let b=f(...k);return c(),b},R=function(...k){let b=S(...k);return c(),b};window.history.pushState=$,window.history.replaceState=R;let E=()=>c();return window.addEventListener("popstate",E),m(),{destroy(){window.removeEventListener("popstate",E),window.history.pushState===$&&(window.history.pushState=f),window.history.replaceState===R&&(window.history.replaceState=S),w&&(clearTimeout(w),w=null),g.clear();},flushNow(){g.clear(),d();}}}function cn(t,e,r){let n=l=>l.timestamp,s=l=>l.type===2,i=l=>l.type===4,a=Date.now()-e,o=0;for(let l=0;l<t.length;l++){let g=n(t[l]);if(typeof g=="number"&&g>=a)break;s(t[l])&&(o=i(t[l-1])?l-1:l);}if(t.length-o>r){for(let l=o+1;l<t.length;l++)if(s(t[l])&&t.length-l<=r){o=i(t[l-1])?l-1:l;break}}o>0&&t.splice(0,o);}function Ai(t){let e=[],r=false,n=i=>{if(!r)return;let a=i.target instanceof Element?i.target:null,o=a?.tagName?.toLowerCase()??"unknown",l=a?.closest("[data-testid]")?.getAttribute("data-testid")??void 0;e.push({type:"lite_click",timestamp:Date.now(),data:{tag:o,testId:l}}),e.length>400&&e.shift();},s=()=>{r=false,document.removeEventListener("click",n,true);};return {start(){r||(r=true,document.addEventListener("click",n,true));},stop:s,flush(){let i=Date.now()-t;return e.filter(a=>a.timestamp>=i)},destroy(){s(),e.length=0;}}}var Qe=null;async function _i(){if(Qe)return Qe;try{return Qe=await import('rrweb'),Qe}catch{return null}}async function un(t){let e=t.maxDurationMs??3e4,r=await _i();if(!r?.record)return Ai(e);let n=r.record,s=[],i=null,a=false,o=['input[type="password"]',...t.redactSelectors??[]],l=()=>{i?.(),i=null,a=false;};return {start(){a||(a=true,i=n({emit(g){s.push(g),cn(s,e,400);},maskAllInputs:true,maskAllText:true,maskTextSelector:o.join(","),checkoutEveryNms:e,sampling:{mousemove:false,mouseInteraction:true,scroll:150,media:800}})??null);},stop:l,flush(){return cn(s,e,400),[...s]},destroy(){l(),s.length=0;}}}function dn(t,e){return new Promise((r,n)=>{let s=new Image;s.onload=()=>{let i=document.createElement("div");i.style.position="relative",i.style.display="inline-block",i.style.maxWidth="100%";let a=document.createElement("canvas"),o=document.createElement("canvas"),l=Math.min(1,720/s.width),g=Math.round(s.width*l),p=Math.round(s.height*l);for(let k of [a,o])k.width=g,k.height=p,k.style.width="100%",k.style.height="auto",k.style.display="block";o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.cursor="crosshair";let w=a.getContext("2d"),d=o.getContext("2d");if(!w||!d){n(new Error("Canvas not supported"));return}w.drawImage(s,0,0,g,p),i.appendChild(a),i.appendChild(o),e.appendChild(i);let m="highlight",c=false,f=null,S=[],$=k=>{let b=o.getBoundingClientRect(),_="touches"in k?k.touches[0]??k.changedTouches[0]:null,V=_?_.clientX:k.clientX,W=_?_.clientY:k.clientY;return {x:(V-b.left)/b.width*g,y:(W-b.top)/b.height*p}},R=()=>{d.clearRect(0,0,g,p);for(let k of S)if(k.tool==="highlight"&&k.points.length>=2){let[b,_]=k.points;d.fillStyle="rgba(255, 230, 0, 0.35)",d.fillRect(Math.min(b.x,_.x),Math.min(b.y,_.y),Math.abs(_.x-b.x),Math.abs(_.y-b.y));}else if(k.tool==="arrow"&&k.points.length>=2){let[b,_]=k.points;d.strokeStyle="#ef4444",d.lineWidth=3,d.beginPath(),d.moveTo(b.x,b.y),d.lineTo(_.x,_.y),d.stroke();}},E=k=>{c=true,f=$(k);},y=k=>{if(!c||!f)return;c=false;let b=$(k);if(m==="blur"){let _=Math.min(f.x,b.x),V=Math.min(f.y,b.y),W=Math.abs(b.x-f.x),A=Math.abs(b.y-f.y);W>=1&&A>=1&&(w.filter="blur(8px)",w.drawImage(a,_,V,W,A,_,V,W,A),w.filter="none");}else S.push({tool:m,points:[f,b]});f=null,R();};o.addEventListener("mousedown",E),o.addEventListener("mouseup",y),o.addEventListener("touchstart",E,{passive:true}),o.addEventListener("touchend",y),r({canvas:a,setTool(k){m=k;},getDataUrl(){let k=document.createElement("canvas");k.width=g,k.height=p;let b=k.getContext("2d");return b?(b.drawImage(a,0,0),b.drawImage(o,0,0),k.toDataURL("image/jpeg",.85)):t},destroy(){o.removeEventListener("mousedown",E),o.removeEventListener("mouseup",y),o.removeEventListener("touchstart",E),o.removeEventListener("touchend",y),i.remove();}});},s.onerror=()=>n(new Error("Failed to load screenshot")),s.src=t;})}function pn(){try{let t=globalThis;return t.Sentry?t.Sentry:void 0}catch{return}}function Pi(){try{return globalThis.__SENTRY_REPLAY__}catch{return}}function Di(){try{let t=globalThis,e=t.__SENTRY__,r=t.Sentry;return e?.version==="9"||r&&typeof r.lastEventId=="function"?e?.version==="9"?"v9":"v8":e?.version==="8"?"v8":r&&typeof r.getCurrentHub=="function"?"v7":"unknown"}catch{return "unknown"}}function Pt(t,e={}){let r=Math.max(0,e.breadcrumbsLimit??30),n={},s=pn();if(!s)return n;n.sdk=Di();try{let o=s;if(typeof o.lastEventId=="function")n.eventId=o.lastEventId()??void 0;else {let g=s.getCurrentHub?.()?.getScope?.();n.eventId=g?.getLastEventId?.()??void 0;}}catch{}let i;try{let o=s;typeof o.getCurrentScope=="function"?i=o.getCurrentScope():i=s.getCurrentHub?.()?.getScope?.();}catch{}if(i){try{let o=i.getUser?.();o&&(n.user={id:typeof o.id=="string"?o.id:void 0,email:typeof o.email=="string"?o.email:void 0,username:typeof o.username=="string"?o.username:void 0,ip_address:typeof o.ip_address=="string"?o.ip_address:void 0});}catch{}try{let o=i.getTags?.();if(o&&typeof o=="object"){let l={};for(let[g,p]of Object.entries(o))(typeof p=="string"||typeof p=="number"||typeof p=="boolean")&&(l[g]=p);Object.keys(l).length>0&&(n.tags=l);}}catch{}try{n.transactionName=i.getTransactionName?.()??i.getTransaction?.()?.name??void 0;}catch{}try{n.sessionId=i.getSession?.()?.sid??void 0;}catch{}try{let o=i.getBreadcrumbs?.()??i._breadcrumbs??[];if(Array.isArray(o)&&o.length>0){let l=o.slice(-r);n.breadcrumbs=l.map(g=>{let p=g;return {timestamp:typeof p.timestamp=="number"?p.timestamp<1e12?Math.round(p.timestamp*1e3):p.timestamp:void 0,category:typeof p.category=="string"?p.category:void 0,level:typeof p.level=="string"?p.level:void 0,message:typeof p.message=="string"?p.message:void 0,type:typeof p.type=="string"?p.type:void 0,data:p.data&&typeof p.data=="object"?p.data:void 0}});}}catch{}}try{let o=s,l;if(typeof o.getActiveSpan=="function"?l=o.getActiveSpan():i?.getSpan&&(l=i.getSpan()),l){let g=l.spanContext?.();n.traceId=g?.traceId??l.traceId??void 0,n.spanId=g?.spanId??l.spanId??void 0;}}catch{}let a;try{let o=s;typeof o.getClient=="function"?a=o.getClient():a=s.getCurrentHub?.()?.getClient?.();}catch{}if(a){try{let o=a.getOptions?.();o?.release&&(n.release=o.release),o?.environment&&(n.environment=o.environment);}catch{}try{let o=a.getDsn?.();if(o?.host&&o?.projectId&&n.eventId){let l=o.host.replace(/^o\d+\./,"");n.issueUrl=`https://${l}/issues/?query=${encodeURIComponent(n.eventId)}`;}}catch{}}try{let l=s.getReplay?.()??Pi();n.replayId=l?.getReplayId?.()??void 0;}catch{}return n}function Dt(t,e={}){let r=pn();if(r){try{let n=r;typeof n.setTag=="function"&&(n.setTag("mushi.report_id",t),e.reportUrl&&n.setTag("mushi.report_url",e.reportUrl)),typeof n.setContext=="function"&&n.setContext("mushi_report",{id:t,...e.reportUrl?{url:e.reportUrl}:{},captured_at:new Date().toISOString()}),typeof n.addBreadcrumb=="function"&&n.addBreadcrumb({category:"mushi",type:"info",level:"info",message:`Mushi report submitted (${t})`,data:{report_id:t,...e.reportUrl?{url:e.reportUrl}:{}}});}catch{}try{let s=r.getCurrentHub?.()?.getScope?.();s&&(s.setTag?.("mushi.report_id",t),e.reportUrl&&s.setTag?.("mushi.report_url",e.reportUrl),s.setContext?.("mushi_report",{id:t,...e.reportUrl?{url:e.reportUrl}:{}}));}catch{}}}var Oi=["/login","/logout","/signup","/sso/*","/auth/*"];function mn(t,e={}){let r=[];if(e.rageClick!==false){let f=function(S){let $=Date.now();if(S.target===c){if(m.push($),m=m.filter(R=>$-R<500),m.length>=3){let R=S.target;t.onTrigger("rage_click",{element:R.tagName,id:R.id,text:R.textContent?.slice(0,50)}),m=[];}}else c=S.target,m=[$];};let m=[],c=null;document.addEventListener("click",f,true),r.push(()=>document.removeEventListener("click",f,true));}if(e.longTask!==false&&typeof PerformanceObserver<"u")try{let m=new PerformanceObserver(c=>{for(let f of c.getEntries())f.duration>5e3&&t.onTrigger("long_task",{duration:Math.round(f.duration),startTime:Math.round(f.startTime)});});m.observe({entryTypes:["longtask"]}),r.push(()=>m.disconnect());}catch{}let n=Hi(e.apiCascade);if(n.enabled){let m=[],c=globalThis.fetch;globalThis.fetch=async function(...f){let[S,$]=f,R=Xe(S),E=!!Je(S,$)||Ze(R,{apiEndpoint:e.apiEndpoint,ignoreUrls:n.ignoreUrls});try{let y=await c.apply(this,f);return !E&&!y.ok&&y.status>=400&&hn(m,t),y}catch(y){throw E||hn(m,t),y}},r.push(()=>{globalThis.fetch=c;});}if((e.pageDwell===true||typeof e.pageDwell=="object"&&e.pageDwell!==null)&&typeof window<"u"){let R=function(A){return f.some(G=>G.endsWith("/*")?A.startsWith(G.slice(0,-2)):A===G||A.startsWith(G+"/"))},E=function(){let A=window.location?.pathname??"";R(A)||t.onTrigger("page_dwell",{thresholdMs:c,path:A});},y=function(){S&&clearTimeout(S);let A=window.location?.pathname??"";R(A)||(S=setTimeout(E,c));},k=function(){let A=window.location?.pathname??"";A!==$&&($=A,y());};let m=typeof e.pageDwell=="object"?e.pageDwell??{}:{},c=m.thresholdMs||300*1e3,f=m.excludeRoutes!==void 0?m.excludeRoutes:Oi,S=null,$=window.location?.pathname??"";y();let b=window.history,_=b?.pushState,V=b?.replaceState;b&&_&&V&&(b.pushState=function(...A){let G=_.apply(this,A);return k(),G},b.replaceState=function(...A){let G=V.apply(this,A);return k(),G});let W=()=>k();window.addEventListener("popstate",W),r.push(()=>{S&&clearTimeout(S),window.removeEventListener("popstate",W),b&&_&&(b.pushState=_),b&&V&&(b.replaceState=V);});}if((e.firstSession===true||typeof e.firstSession=="object"&&e.firstSession!==null)&&typeof window<"u"){let m=typeof e.firstSession=="object"?e.firstSession??{}:{},c=m.delayMs??45*1e3,f=m.storageKey??(e.projectId?`mushi:${e.projectId}:firstSessionShown`:"mushi:firstSessionShown"),S=false;try{S=window.localStorage?.getItem(f)==="1";}catch{}if(!S){let $=setTimeout(()=>{try{window.localStorage?.setItem(f,"1");}catch{}t.onTrigger("first_session",{delayMs:c});},c);r.push(()=>clearTimeout($));}}if(e.errorBoundary){let m=function(f){t.onTrigger("error_boundary",{message:f.message,filename:f.filename,lineno:f.lineno,colno:f.colno});},c=function(f){t.onTrigger("error_boundary",{message:f.reason instanceof Error?f.reason.message:String(f.reason),type:"unhandled_rejection"});};window.addEventListener("error",m),window.addEventListener("unhandledrejection",c),r.push(()=>{window.removeEventListener("error",m),window.removeEventListener("unhandledrejection",c);});}return {destroy(){r.forEach(m=>m());}}}function Hi(t){return t===false?{enabled:false,ignoreUrls:[]}:t&&typeof t=="object"?{enabled:t.enabled!==false,ignoreUrls:t.ignoreUrls??[]}:{enabled:true,ignoreUrls:[]}}function hn(t,e){let r=Date.now();t.push(r);let n=t.filter(s=>r-s<1e4);n.length>=3&&(e.onTrigger("api_cascade",{failureCount:n.length,windowMs:1e4}),t.length=0);}var gn="mushi:lastDismiss",et="mushi:consecDismiss",Ot="mushi:lastShown";function tt(t){try{return localStorage.getItem(t)}catch{return null}}function rt(t,e){try{localStorage.setItem(t,e);}catch{}}function fn(t={}){let e=t.maxProactivePerSession??2,r=t.dismissCooldownHours??24,n=t.suppressAfterDismissals??3,s=(t.reshowCooldownMinutes??30)*60*1e3,i=0,a=new Set;function o(w){let d=Date.now();if(parseInt(tt(et)??"0",10)>=n)return false;let c=tt(gn);if(c&&d-parseInt(c,10)<r*60*60*1e3)return false;if(s>0&&i===0){let f=tt(Ot);if(f&&d-parseInt(f,10)<s)return false}return i>=e||a.has(w)?false:(a.add(w),i++,rt(Ot,String(d)),true)}function l(){rt(gn,String(Date.now()));let w=parseInt(tt(et)??"0",10);rt(et,String(w+1));}function g(){rt(et,"0");}function p(){i=0,a.clear();try{localStorage.removeItem(Ot);}catch{}}return {shouldShow:o,recordDismissal:l,recordSubmission:g,reset:p}}var he=null,nt=class{constructor(){}static init(e){if(he)return qe({scope:"mushi",level:"warn",format:"pretty"}).warn("Already initialized \u2014 call destroy() first to reinitialize"),he;let r={...ar(),...e};if(!r.projectId)throw new Error("[mushi] projectId is required \u2014 set NEXT_PUBLIC_MUSHI_PROJECT_ID / VITE_MUSHI_PROJECT_ID / MUSHI_PROJECT_ID or pass it explicitly");if(!r.apiKey)throw new Error("[mushi] apiKey is required \u2014 set NEXT_PUBLIC_MUSHI_API_KEY / VITE_MUSHI_API_KEY / MUSHI_API_KEY or pass it explicitly");return r.enabled===false?Ji():(he=Bi(r),he)}static getInstance(){return he}static destroy(){he?.destroy(),he=null;}static diagnose(){return he?.diagnose()??vn()}};function Bi(t){let e=Fi(t),r=e,n=t.debug??false?qe({scope:"mushi",level:"debug",format:"pretty"}):lt,s=null,i=null,a=or({projectId:e.projectId,apiKey:e.apiKey,...e.apiEndpoint?{apiEndpoint:e.apiEndpoint}:{},getUserToken:()=>s,sdkPackage:be,sdkVersion:te}),o=lr(e.preFilter),l=hr(e.offline),g=gr({maxBurst:10,refillRate:1,refillIntervalMs:5e3}),p=fr();function w(u){return u.map(h=>{let x={...h};if(typeof h.message=="string"&&(x.message=p.scrub(h.message)),h.data&&typeof h.data=="object"){let I={};for(let[L,O]of Object.entries(h.data))I[L]=typeof O=="string"?p.scrub(O):O;x.data=I;}return x})}function d(u){if(!u)return;let h={};for(let[x,I]of Object.entries(u))h[x]=typeof I=="string"?p.scrub(I):I;return h}let m=null,c=null,f=null,S=null,$=null,R=null,E=At(),y=null,k=0,b,_=`mushi:tester-jwt:${e.projectId}`;function V(){try{return typeof localStorage<"u"?localStorage.getItem(_):null}catch{return null}}function A(){try{typeof localStorage<"u"&&localStorage.removeItem(_);}catch{}}async function G(u){let h=await a.getTesterStatus(u);if(!h.ok||!h.data){A();return}let x=h.data;if(!x.is_tester||!x.tester_id){A();return}b.setTesterSession(u,{id:x.tester_id,public_handle:x.public_handle??null,display_name:x.display_name??null});let I=await a.getMyReputation(u);if(I.ok&&I.data){let L=I.data;L.reputation&&b.setTesterReputation(L.reputation);}}function Se(){if(r.capture?.console!==false?m??=kt():(m?.destroy(),m=null),r.capture?.network!==false){let L={apiEndpoint:Ht(r),ignoreUrls:r.capture?.ignoreUrls,tracePropagation:r.capture?.tracePropagation,sessionId:Le()};c?c.updateOptions(L):c=Ct(L);}else c?.destroy(),c=null;if(r.capture?.performance!==false?f??=Lt():(f?.destroy(),f=null),r.capture?.screenshot!=="off"){let L={privacy:r.privacy};r.capture?.screenshotProvider?S=null:S?S.updateOptions(L):S=$t(L);}else S=null;!S&&!r.capture?.screenshotProvider&&(q=null),b.setAllowScreenshotRemove(r.privacy?.allowUserRemoveScreenshot!==false),r.capture?.elementSelector!==false?$??=It():($?.deactivate(),$=null,de=null);let u=r.capture?.discoverInventory,h=u===true?{}:u&&typeof u=="object"?u:null;h!=null&&h.enabled!==false?(R?.destroy(),R=_t({config:h,getRecentNetworkPaths:()=>c?c.getEntries().map(L=>{try{let O=new URL(L.url,typeof window<"u"?window.location.href:"http://localhost");return O.host&&typeof window<"u"&&O.host!==window.location.host?null:O.pathname}catch{return null}}).filter(L=>L!=null&&L.length>0&&L.length<200):[],getUserId:()=>F?.id??null,getSessionId:Le,onEvent:L=>{a.postDiscoveryEvent({...L,sdk_version:te}).catch(O=>{n.debug("discovery emit failed",{err:String(O)});});}})):(R?.destroy(),R=null);let I=r.capture?.replay??"off";if(I==="rrweb"||I==="lite"){let L=++k;un({redactSelectors:r.privacy?.redactSelectors}).then(O=>{if(L!==k){O.destroy();return}y?.destroy(),y=O,y.start();});}else k++,y?.destroy(),y=null;}let Y=new Map;function K(u,h){Y.get(u)?.forEach(x=>x({type:u,data:h}));}let q=null,de=null,me=null,De=false,F=null,M={},C={},T=br({max:50});T.add({category:"lifecycle",level:"info",message:"Mushi SDK init",data:{projectId:e.projectId,sdkVersion:te}});let H=null;H=Zi(T);let P=false;async function ae(){if(P)return null;let u=r.capture?.screenshotProvider;if(u){P=true;try{return await u()??null}catch(L){n.warn("screenshotProvider threw, falling back to built-in capturer",{error:L instanceof Error?L.message:String(L)});}finally{P=false;}}if(!S)return null;P=true;let h=b.getIsOpen();h&&b.hidePanel();let x=document.getElementById("mushi-mushi-widget"),I=x?.style.visibility??"";x&&(x.style.visibility="hidden"),await new Promise(L=>{requestAnimationFrame(()=>requestAnimationFrame(()=>L()));});try{return await S.take()}finally{P=false,x&&(x.style.visibility=I),h&&b.showPanel();}}async function Me(u){let h=r.capture?.screenshot;!(S||r.capture?.screenshotProvider)||h==="off"||q||u==="open"&&h!=="auto"||u==="submit"&&h!=="on-report"&&h!=="auto"||(n.debug("Auto-capturing screenshot",{when:u,mode:h}),q=await ae(),b.setScreenshotAttached(q!==null),b.setScreenshotPreview(q));}b=new Ge(e.widget,{onSubmit:async({category:u,userCategory:h,description:x,intent:I})=>(n.info("Report submitted",{category:u,userCategory:h,intent:I}),J?.recordSubmission(),await Me("submit"),await ke(u,x,I,h)??{reportId:null,queuedOffline:true}),onOpen:()=>{n.debug("Widget opened"),Me("open"),y?.start(),K("widget:opened");},onClose:()=>{n.debug("Widget closed"),me&&(J?.recordDismissal(),K("proactive:dismissed",{type:me})),q=null,de=null,me=null,K("widget:closed");},onScreenshotRequest:async()=>{!(S||r.capture?.screenshotProvider)||r.capture?.screenshot==="off"||(n.debug("Taking screenshot"),q=await ae(),b.setScreenshotAttached(q!==null),b.setScreenshotPreview(q));},onScreenshotRemove:()=>{n.debug("Screenshot attachment removed"),q=null,b.setScreenshotAttached(false);},onScreenshotAnnotateRequest:async u=>{if(!q||u.childElementCount>0)return;let h;try{h=await dn(q,u);}catch(Z){n.warn("Screenshot annotation failed",{error:Z instanceof Error?Z.message:String(Z)});return}let x=document.createElement("div");x.className="mushi-annotate-toolbar";let I=Z=>{(q=h.getDataUrl(),b.setScreenshotAttached(true),b.setScreenshotPreview(q)),h.destroy(),x.remove();},L=[{id:"highlight",label:"\u270F\uFE0F Highlight"},{id:"blur",label:"\u{1F512} Blur"},{id:"arrow",label:"\u2197\uFE0F Arrow"}];for(let Z of L){let N=document.createElement("button");N.type="button",N.className="mushi-attach-btn",N.dataset.tool=Z.id,N.textContent=Z.label,N.addEventListener("click",()=>{h.setTool(Z.id),x.querySelectorAll("button[data-tool]").forEach(le=>le.classList.remove("active")),N.classList.add("active");}),x.appendChild(N);}x.querySelector('button[data-tool="highlight"]')?.classList.add("active");let O=document.createElement("button");O.type="button",O.className="mushi-attach-btn",O.textContent="\u2713 Done",O.addEventListener("click",()=>I()),x.appendChild(O),u.insertBefore(x,u.firstChild);},onElementSelectorRequest:async()=>{if(!(!$||r.capture?.elementSelector===false)){n.debug("Element selector activated"),b.setElementCapturing(true),b.hidePanel();try{let u=await $.activate();u?(de=u,b.setElementSelected(!0),n.debug("Element selected",{tagName:u.tagName,xpath:u.xpath})):b.setElementCapturing(!1);}finally{b.showPanel();}}},async onReporterReportsRequest(){let u=await a.listReporterReports(X());if(!u.ok)throw new Error(u.error?.message??"Could not load reports");return u.data?.reports??[]},async onReporterCommentsRequest(u){let h=await a.listReporterComments(u,X());if(!h.ok)throw new Error(h.error?.message??"Could not load thread");return h.data?.comments??[]},async onReporterReply(u,h){let x=await a.replyToReporterReport(u,X(),h);if(!x.ok)throw new Error(x.error?.message??"Could not send reply")},async onReporterFeedback(u,h,x){let I=await a.replyToReporterReport(u,X(),x??"",h);if(!I.ok)throw new Error(I.error?.message??"Could not send feedback");return I.data?.feedback??null},async onReporterReopen(u,h){let x=await a.reopenReporterReport(u,X(),h);if(!x.ok)throw new Error(x.error?.message??"Could not reopen report");return x.data?.outcome??null},async onFeatureBoardRequest(){let u=await a.listReporterFeatureBoard(X());if(!u.ok)throw new Error(u.error?.message??"Could not load community ideas");return u.data?.tickets??[]},async onFeatureBoardVote(u){let h=await a.voteReporterFeatureBoard(u,X());if(!h.ok)throw new Error(h.error?.message??"Could not vote");return h.data??{voted:true,action:"added"}},onLeaderboardOpen(){b.setLeaderboard(null,true),tn(10).then(u=>{b.setLeaderboard(u,false);});},async onMushiSignIn(u){let h=await a.sendMagicLink(u);if(!h.ok)throw new Error(h.error?.message??"Could not send sign-in link");return {ok:true}},async onGlobalLeaderboardOpen(){b.setGlobalLeaderboard(null,true);try{let u=V(),h=await a.getPublicLeaderboard(50),I=(h.ok?h.data?.leaderboard??[]:[]).map(L=>({tester_id:L.tester_id,rank:L.rank,public_handle:L.public_handle,display_name:L.display_name,points_30d:L.points_30d,total_points:L.total_points??0,badge:L.badge_slug}));if(b.setGlobalLeaderboard(I,!1),u){let L=await a.getMyReputation(u);if(L.ok&&L.data){let O=L.data;O.reputation&&b.setTesterReputation(O.reputation);}}}catch{b.setGlobalLeaderboard([],false);}},async onCrossAppReportsOpen(){let u=V();if(!u){b.setCrossAppReports([],false);return}try{let h=await a.getCrossAppReports(u),x=h.ok?h.data?.reports??[]:[];b.setCrossAppReports(x,!1);}catch{b.setCrossAppReports([],false);}},onTesterSignOut(){A();},assistantEnabled:e.assistant?.enabled===true,...e.assistant?.label?{assistantLabel:e.assistant.label}:{},...e.assistant?.greeting?{assistantGreeting:e.assistant.greeting}:{},...e.assistant?.suggestions?{assistantSuggestions:e.assistant.suggestions}:{},async onAssistantAsk(u,h){let x=await a.askAssistant({message:u,threadId:h,context:i});return x.ok?x.data??null:null}},te),Se(),typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>b.mount()):b.mount());let Ee=V();Ee&&G(Ee).catch(()=>A());let ne=null,J=null,D=r.proactive;D&&(D.rageClick!==false||D.longTask!==false||D.apiCascade!==false||D.errorBoundary===true||D.pageDwell||D.firstSession)&&typeof document<"u"&&(J=fn(D?.cooldown),ne=mn({onTrigger:(u,h)=>{if(!J.shouldShow(u)){n.debug("Proactive trigger suppressed by fatigue prevention",{type:u});return}n.info("Proactive trigger fired",{type:u,context:h}),me=u,K("proactive:triggered",{type:u,context:h}),u==="first_session"?b.pulseTrigger?.():b.open();}},{rageClick:D?.rageClick,longTask:D?.longTask,apiCascade:D?.apiCascade,apiEndpoint:Ht(r),errorBoundary:D?.errorBoundary,pageDwell:D?.pageDwell,firstSession:D?.firstSession,projectId:e.projectId}),n.debug("Proactive triggers enabled",{rageClick:D?.rageClick!==false,longTask:D?.longTask!==false,apiCascade:D?.apiCascade!==false,errorBoundary:D?.errorBoundary===true,pageDwell:!!D?.pageDwell,firstSession:!!D?.firstSession})),l.startAutoSync(a),l.flush(a).then(u=>{u.sent>0&&n.info("Synced offline reports",{sent:u.sent});});function B(u){if(De=true,u.enabled===false){r=e,Ki(t.projectId),Se(),b.updateConfig(r.widget),n.debug("Runtime SDK config disabled; using bootstrap config",{version:u.version});return}r=Ni(r,u),Se(),u.widget&&b.updateConfig(r.widget),n.debug("Applied runtime SDK config",{version:u.version});}if(qi(t)){let u=Wi(t.projectId);u&&B(u),a.getSdkConfig().then(h=>{h.ok&&h.data?(Vi(t.projectId,h.data),B(h.data)):h.error&&n.debug("Runtime SDK config unavailable",h.error);}).catch(h=>{n.debug("Runtime SDK config fetch failed",{error:h instanceof Error?h.message:String(h)});});}else n.debug("Runtime SDK config disabled via runtimeConfig:false; using static bootstrap config");Oe(),n.info("Initialized",{projectId:t.projectId});async function Oe(){if(r.widget?.outdatedBanner==="off")return;let u=Gi(be);u&&He(u);let h=await a.getLatestSdkVersion(be);!h.ok||!h.data||(Yi(be,h.data),He(h.data));}function He(u){let h=u.latest,x=!!(h&&Xi(te,h));if(!x&&!u.deprecated)return;let I=u.deprecationMessage??(x?`Update ${be} to ${h}.`:null);n.warn("Mushi SDK is outdated",{package:be,current:te,latest:h,deprecated:u.deprecated,message:I}),r.widget?.outdatedBanner!=="console-only"&&b.setSdkFreshness({latest:h,current:te,deprecated:u.deprecated,message:I});}async function ke(u,h,x,I){let L=o.check(h);if(!L.passed){n.info("Report blocked by pre-filter",{reason:L.reason});return}let O=t.preFilter?.wasmClassifier;if(O)try{let z=await O.classify({description:h,category:u,url:typeof location<"u"?location.href:void 0,hasScreenshot:q!==null,hasSelectedElement:de!==null,hasNetworkErrors:c?.getEntries()?.some(se=>se.status>=400||!!se.error)??!1,hasConsoleErrors:m?.getEntries()?.some(se=>se.level==="error")??!1,proactiveTrigger:me??void 0});if(z.verdict==="block"){n.info("Report blocked by on-device classifier",{modelId:z.modelId,confidence:z.confidence,reason:z.reason});return}n.debug("On-device classifier verdict",{...z});}catch(z){n.warn("On-device classifier threw \u2014 falling through to server",{error:z instanceof Error?z.message:String(z)});}if(!g.tryConsume()){n.warn("Report throttled \u2014 rate limit exceeded");return}let Z=p.scrub(o.truncate(h)),N=t.sentry?Pt(t.sentry):void 0,le=await mr().catch(()=>null),Nt=r.capture?.console===false?void 0:m?.getEntries(),Ft=r.capture?.network===false?void 0:c?.getEntries(),Ut=w(T.getAll()),qt=d(Object.keys(C).length>0?{...C}:void 0),jt=N?{...N,...N.breadcrumbs?{breadcrumbs:w(N.breadcrumbs)}:{},...N.tags?{tags:d(N.tags)}:{}}:void 0,zt=q?await Mr(q).catch(()=>null):null;q&&!zt&&n.warn("Screenshot dropped \u2014 could not compress under wire budget");let ce={id:ut(),projectId:t.projectId,category:u,...I?{userCategory:I}:{},description:Z,userIntent:x,environment:ct(),consoleLogs:Nt,networkLogs:Ft,performanceMetrics:r.capture?.performance===false?void 0:f?.getMetrics(),timeline:E.getEntries({consoleLogs:Nt,networkLogs:Ft}),screenshotDataUrl:zt??void 0,selectedElement:de??void 0,...y?{replayEvents:y.flush()}:{},metadata:{...M,...F?{user:F}:{},...N?.release?{sentryRelease:N.release}:{}},sessionId:Le(),reporterToken:X(),...le?{fingerprintHash:le}:{},appVersion:t.integrations?.vercel?.analyticsId,sdkPackage:be,sdkVersion:te,proactiveTrigger:me??void 0,...Ut.length>0?{breadcrumbs:Ut}:{},...qt?{tags:qt}:{},...jt?{sentryContext:jt}:{},sentryEventId:N?.eventId,sentryReplayId:N?.replayId,createdAt:new Date().toISOString()};if(T.add({category:"lifecycle",level:"info",message:`Mushi report submitting (${u})`,data:{reportId:ce.id,category:u}}),t.integrations?.custom){let z={addMetadata(se,xn){ce.metadata[se]=xn;},setCategory(se){ce.category=se;},setDescription(se){ce.description=se;}};t.integrations.custom(z);}let U=ce;if(t.beforeSendFeedback)try{let z=await Promise.race([Promise.resolve(t.beforeSendFeedback(ce)),new Promise(se=>setTimeout(()=>se(ce),2e3))]);if(z===null){n.info("Report dropped by beforeSendFeedback hook",{reportId:ce.id});return}U=z;}catch(z){n.warn("beforeSendFeedback hook threw \u2014 sending unmodified report",{error:z instanceof Error?z.message:String(z)});}if(K("report:submitted",{reportId:U.id}),typeof navigator<"u"&&!navigator.onLine)return await l.enqueue(U),n.info("Offline \u2014 report queued",{reportId:U.id}),K("report:queued",{reportId:U.id}),{reportId:null,queuedOffline:true};let j=await a.submitReport(U);if(!j.ok&&j.error?.code==="PAYLOAD_TOO_LARGE"&&(Array.isArray(U.replayEvents)&&U.replayEvents.length>0&&(n.warn("Report too large \u2014 dropping replay buffer and retrying",{reportId:U.id}),U={...U,replayEvents:void 0},j=await a.submitReport(U)),!j.ok&&j.error?.code==="PAYLOAD_TOO_LARGE"&&U.screenshotDataUrl&&(n.warn("Report still too large \u2014 dropping screenshot and retrying",{reportId:U.id}),U={...U,screenshotDataUrl:void 0},j=await a.submitReport(U))),j.ok){if(n.info("Report sent",{reportId:j.data?.reportId}),K("report:sent",{reportId:j.data?.reportId}),j.data?.cursorAgentId){let z=j.data;K("report:dispatched",{reportId:z.reportId,agentId:z.cursorAgentId,fixId:z.fixId});}T.add({category:"lifecycle",level:"info",message:`Mushi report sent (${j.data?.reportId??ce.id})`}),Te({action:"report_submit",metadata:{category:u,reportId:j.data?.reportId??ce.id}});try{t.sentry&&j.data?.reportId&&Dt(j.data.reportId);}catch{}}else j.error?.code==="PAYLOAD_TOO_LARGE"||j.error?.code==="SERIALIZE_FAILED"?(n.warn("Report exceeds size limit after degradation \u2014 dropping",{reportId:U.id,error:j.error}),K("report:failed",{reportId:U.id,error:j.error}),T.add({category:"lifecycle",level:"error",message:`Mushi report dropped \u2014 payload too large (${U.id})`})):(n.warn("Report failed, queuing for retry",{reportId:U.id,error:j.error}),await l.enqueue(U),K("report:failed",{reportId:U.id,error:j.error}),T.add({category:"lifecycle",level:"warning",message:`Mushi report queued for retry (${U.id})`}));return q=null,de=null,me=null,j?.ok?{reportId:j.data?.reportId??ce.id,queuedOffline:false}:{reportId:null,queuedOffline:true}}let it={report(u){b.open(u);},on(u,h){return Y.has(u)||Y.set(u,new Set),Y.get(u).add(h),()=>Y.get(u)?.delete(h)},setUser(u){F=u;},setMetadata(u,h){M[u]=h;},setScreen(u){E.setScreen(u);},isOpen(){return b.getIsOpen()},open(){b.open();},openWith(u){b.open({category:u});},show(){b.showTrigger();},hide(){b.hideTrigger();},attachTo(u,h){return b.attachTo(u,h)},setTrigger(u){b.setTrigger(u);},openReporter(){b.openReporter();},close(){b.close();},updateConfig(u){B(u);},diagnose(){return ji({apiEndpoint:Ht(r),widgetMounted:b.getIsMounted(),runtimeConfigLoaded:De,captureScreenshotAvailable:S!==null,captureNetworkIntercepting:c!==null,widgetDiagnostics:b.getWidgetDiagnostics()})},destroy(){ne?.destroy(),J?.reset(),b.destroy(),m?.destroy(),c?.destroy(),f?.destroy(),$?.deactivate(),E.destroy(),R?.destroy(),R=null,y?.destroy(),y=null,l.stopAutoSync(),H?.(),H=null,T.clear(),Y.clear(),he=null,n.debug("Destroyed");},async captureEvent(u){if(!g.tryConsume())return n.warn("captureEvent throttled \u2014 rate limit exceeded"),null;let h=p.scrub(o.truncate(u.description)),x=u.category??"bug",I=t.sentry?Pt(t.sentry):void 0,L=w(T.getAll()),O=d(Object.keys(C).length===0&&!u.tags?void 0:{...C,...u.tags??{}}),Z=I?{...I,...I.breadcrumbs?{breadcrumbs:w(I.breadcrumbs)}:{},...I.tags?{tags:d(I.tags)}:{}}:void 0,N={id:ut(),projectId:t.projectId,category:x,description:h,environment:ct(),timeline:E.getEntries(),metadata:{...u.metadata??{},...F?{user:F}:{},...u.error?{error:u.error}:{},...u.severity?{severity:u.severity}:{},...u.component?{component:u.component}:{},...u.source?{source:u.source}:{source:"captureEvent"}},...L.length>0?{breadcrumbs:L}:{},...O&&Object.keys(O).length>0?{tags:O}:{},...Z?{sentryContext:Z}:{},sessionId:Le(),reporterToken:X(),sdkPackage:be,sdkVersion:te,sentryEventId:I?.eventId,sentryReplayId:I?.replayId,createdAt:new Date().toISOString()};if(K("report:submitted",{reportId:N.id}),typeof navigator<"u"&&!navigator.onLine)return await l.enqueue(N),K("report:queued",{reportId:N.id}),null;let le=await a.submitReport(N);if(le.ok){K("report:sent",{reportId:le.data?.reportId});try{t.sentry&&le.data?.reportId&&Dt(le.data.reportId);}catch{}return le.data?.reportId??null}return await l.enqueue(N),K("report:failed",{reportId:N.id,error:le.error}),null},async captureException(u,h){let x=yr(u);T.add({category:"lifecycle",level:"error",message:`Mushi.captureException(${x.name}): ${x.message}`,...x.stack?{data:{stack:x.stack.slice(0,500)}}:{}});let I=h?.description?.trim()||`${x.name}: ${x.message}`||"Uncaught exception";return it.captureEvent({description:I,category:h?.category??"bug",severity:h?.severity??"high",...h?.component?{component:h.component}:{},...h?.tags?{tags:h.tags}:{},source:h?.source??"captureException",error:{name:x.name,message:x.message,...x.stack?{stack:x.stack}:{}},metadata:{...h?.metadata??{},...x.cause?{cause:x.cause}:{}}})},identify(u,h){if(F={id:u,...h?.email?{email:h.email}:{},...h?.name?{name:h.name}:{}},b.setIdentifiedUser(F.name||F.email?{name:F.name,email:F.email}:null),h)for(let[x,I]of Object.entries(h))x!=="email"&&x!=="name"&&(M[`user.${x}`]=I);if(T.add({category:"lifecycle",level:"info",message:`Mushi.identify(${u})`}),r.rewards?.enabled){let x={client:a,config:r.rewards,projectId:e.projectId,userId:u,traits:h?{email:h.email,name:h.name,provider:h.provider}:void 0};F.id===u?Zr(x):Qr(u,x.traits),r.rewards.showInWidget!==false&&a.getMyPoints(u).then(I=>{if(!I.ok)return;let L=I.data;b.setRewardsState({tier:L.tier?{slug:L.tier.slug??"free",displayName:L.tier.display_name??"Free",pointsThreshold:L.tier.points_threshold??0}:null,nextTier:L.next_tier?{displayName:L.next_tier.display_name??"",pointsThreshold:L.next_tier.points_threshold??0}:null,totalPoints:L.total_points??0,pointsForReport:L.report_submit_pts??50});}).catch(()=>{});}},identifyWithToken(u){if(s=u&&typeof u=="string"?u:null,s){let h=vr(s);h?.sub&&(F={id:h.sub,...h.email?{email:h.email}:{},...h.name?{name:h.name}:{}},b.setIdentifiedUser(F.name||F.email?{name:F.name,email:F.email}:null)),T.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken()"});}else F=null,b.setIdentifiedUser(null),T.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken(null)"});},publishPageContext(u){i=u&&u.route?u:null;},openAssistant(){b.openAssistantTab();},addBreadcrumb(u){T.add(u);},getBreadcrumbs(){return T.getAll()},setTag(u,h){typeof u!="string"||u.length===0||(C[u]=h);},setTags(u){if(!(!u||typeof u!="object"))for(let[h,x]of Object.entries(u))typeof h=="string"&&h.length>0&&(C[h]=x);},clearTag(u){if(typeof u=="string"&&u.length>0){delete C[u];return}for(let h of Object.keys(C))delete C[h];},async getReputation(){if(!F?.id)return null;let u=await a.getMyPoints(F.id);return u.ok?{totalPoints:u.data.total_points??0,points30d:u.data.points_30d??0,reputation:1,confirmedBugs:0,totalReports:0}:null},async getTier(){return F?.id?en(F.id):null},recordActivity(u,h){r.rewards?.enabled&&Te({action:u,metadata:h});},pulseTrigger(){b.pulseTrigger?.();},async listMyReports(){let u=await a.listReporterReports(X());return u.ok?u.data?.reports??[]:[]},async listMyComments(u){let h=await a.listReporterComments(u,X());return h.ok?h.data?.comments??[]:[]},async replyToReport(u,h){let x=await a.replyToReporterReport(u,X(),h);return x.ok?x.data?.comment??null:null},async submitFeedbackSignal(u,h,x){let I=await a.replyToReporterReport(u,X(),x??"",h);return I.ok?I.data?.feedback??null:null},async reopenReport(u,h){let x=await a.reopenReporterReport(u,X(),h);return x.ok?x.data?.outcome??null:null},openMyReports(){b.recorderOpenMyReports();},async getHallOfFame(u=20){let h=await a.getHallOfFame(u);return h.ok?h.data?.data??[]:[]}};if(typeof globalThis<"u"&&(e.debug??false)&&Ur(b),typeof window<"u"&&typeof localStorage<"u"){let u="mushi:last-run",h=null;try{let x=localStorage.getItem(u);h=x===null?null:x==="unfinished",localStorage.setItem(u,"unfinished");}catch{h=null;}try{window.addEventListener("pagehide",()=>{try{localStorage.setItem(u,"clean");}catch{}});}catch{}if(typeof e.onCrashedLastRun=="function")try{e.onCrashedLastRun(h);}catch(x){n.warn("onCrashedLastRun hook threw",{error:x instanceof Error?x.message:String(x)});}}return it}function Ni(t,e){let r=e.native?.triggerMode,n=e.widget?.launcher,s=n??e.widget?.trigger??(r==="none"||r==="shake"?"manual":void 0),i=n==="hidden"||e.widget?.trigger==="hidden",a=t.widget?.trigger,o=s==="hidden"&&!i&&a&&a!=="hidden"?a:s,l=e.widget,g=l?.bannerVariant,p=l?.bannerPosition,w=l?.bannerMessage,d=l?.bannerLabel,m=l?.bannerBugCta,c=l?.bannerFeatureCta,f=g||p||w!=null||d!=null||m!=null||c!=null?{...t.widget?.bannerConfig??{},...g?{variant:g}:{},...p?{position:p}:{},...w!=null?{message:w}:{},...d!=null?{label:d===""?false:d}:{},...m!=null?{bugCta:m??void 0}:{},...c!=null?{featureCta:c}:{}}:void 0;return {...t,widget:{...t.widget,...e.widget,...o?{trigger:o}:{},...f?{bannerConfig:f}:{},...t.widget?.betaMode?{betaMode:t.widget.betaMode}:{}},capture:{...t.capture,...e.capture},privacy:{...t.privacy}}}function Fi(t){if(!t.preset)return t;let e=Ui(t.preset);return {...t,widget:{...e.widget,...t.widget},capture:{...e.capture,...t.capture},proactive:{...e.proactive,...t.proactive,cooldown:{...e.proactive?.cooldown,...t.proactive?.cooldown}}}}function Ui(t){switch(t){case "manual-only":return {widget:{trigger:"manual",outdatedBanner:"console-only"},capture:{console:true,network:true,performance:false,screenshot:"on-report",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}};case "beta-loud":return {widget:{trigger:"auto",outdatedBanner:"banner"},capture:{console:true,network:true,performance:true,screenshot:"auto",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true}};case "internal-debug":return {widget:{trigger:"auto",outdatedBanner:"banner",brandFooter:true},capture:{console:true,network:true,performance:true,screenshot:"auto",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true,cooldown:{maxProactivePerSession:10,dismissCooldownHours:0,suppressAfterDismissals:99}}};case "production-calm":return {widget:{trigger:"auto",outdatedBanner:"console-only"},capture:{console:true,network:true,performance:false,screenshot:"on-report",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}}}}function Ht(t){return t.apiEndpoint??Ue}function qi(t){return t.runtimeConfig!==false}async function ji(t){let e=await zi(t.apiEndpoint);return {apiEndpointReachable:e.reachable,cspAllowsEndpoint:e.cspAllowed,widgetMounted:t.widgetMounted,shadowDomAvailable:typeof HTMLElement<"u"&&typeof HTMLElement.prototype.attachShadow=="function",dialogSupported:typeof HTMLDialogElement<"u",runtimeConfigLoaded:t.runtimeConfigLoaded,captureScreenshotAvailable:t.captureScreenshotAvailable,captureNetworkIntercepting:t.captureNetworkIntercepting,sdkVersion:te,widgetHostPointerSafe:t.widgetDiagnostics?.widgetHostPointerSafe??false,widgetHostBounds:t.widgetDiagnostics?.widgetHostBounds??null,widgetSuppressed:t.widgetDiagnostics?.widgetSuppressed??false,bannerRendered:t.widgetDiagnostics?.bannerRendered??false}}async function vn(){return {apiEndpointReachable:false,cspAllowsEndpoint:false,widgetMounted:false,shadowDomAvailable:typeof HTMLElement<"u"&&typeof HTMLElement.prototype.attachShadow=="function",dialogSupported:typeof HTMLDialogElement<"u",runtimeConfigLoaded:false,captureScreenshotAvailable:false,captureNetworkIntercepting:false,sdkVersion:te,widgetHostPointerSafe:false,widgetHostBounds:null,widgetSuppressed:false,bannerRendered:false}}async function zi(t){if(typeof fetch>"u")return {reachable:false,cspAllowed:false};let e=typeof AbortController<"u"?new AbortController:null,r=e?setTimeout(()=>e.abort(),3e3):null;try{return {reachable:(await fetch(`${t.replace(/\/$/,"")}/health`,{method:"GET",cache:"no-store",...e?{signal:e.signal}:{},[Re]:"diagnose"})).ok,cspAllowed:!0}}catch{return {reachable:false,cspAllowed:false}}finally{r&&clearTimeout(r);}}function Bt(t){return `mushi:sdk-config:${t}`}function wn(t){return `mushi:sdk-version:${t}`}function Wi(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(Bt(t));return e?JSON.parse(e).config??null:null}catch{return null}}function Vi(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Bt(t),JSON.stringify({cachedAt:Date.now(),config:e}));}catch{}}function Ki(t){if(!(typeof localStorage>"u"))try{localStorage.removeItem(Bt(t));}catch{}}function Gi(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(wn(t));if(!e)return null;let r=JSON.parse(e);return !r.data||!r.cachedAt||Date.now()-r.cachedAt>864e5?null:r.data}catch{return null}}function Yi(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(wn(t),JSON.stringify({cachedAt:Date.now(),data:e}));}catch{}}function Xi(t,e){let r=bn(t),n=bn(e);for(let s=0;s<Math.max(r.length,n.length);s++){let i=r[s]??0,a=n[s]??0;if(i<a)return true;if(i>a)return false}return false}function bn(t){return t.split(/[.-]/).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e))}function Ji(){return {report:()=>{},on:()=>()=>{},setUser:()=>{},setMetadata:()=>{},setScreen:()=>{},isOpen:()=>false,open:()=>{},close:()=>{},updateConfig:()=>{},diagnose:vn,openWith:()=>{},show:()=>{},hide:()=>{},attachTo:()=>()=>{},setTrigger:()=>{},openReporter:()=>{},destroy:()=>{he=null;},captureEvent:async()=>null,captureException:async()=>null,identify:()=>{},identifyWithToken:()=>{},publishPageContext:()=>{},openAssistant:()=>{},addBreadcrumb:()=>{},getBreadcrumbs:()=>[],setTag:()=>{},setTags:()=>{},clearTag:()=>{},getReputation:async()=>null,getTier:async()=>null,recordActivity:()=>{},pulseTrigger:()=>{},listMyReports:async()=>[],listMyComments:async()=>[],replyToReport:async()=>null,submitFeedbackSignal:async()=>null,reopenReport:async()=>null,openMyReports:()=>{},getHallOfFame:async()=>[]}}function Zi(t){if(typeof window>"u")return ()=>{};let e=[];try{let r=a=>{t.add({category:"navigation",level:"info",message:`${a}: ${window.location.pathname}`,data:{url:window.location.href,kind:a}});},n=()=>r("popstate");window.addEventListener("popstate",n,{passive:!0}),e.push(()=>window.removeEventListener("popstate",n));let s=window.history.pushState,i=window.history.replaceState;window.history.pushState=function(...o){let l=s.apply(this,o);try{r("pushState");}catch{}return l},window.history.replaceState=function(...o){let l=i.apply(this,o);try{r("replaceState");}catch{}return l},e.push(()=>{window.history.pushState=s,window.history.replaceState=i;});}catch{}try{let r=console.error,n=console.warn;console.error=function(...s){try{t.add({category:"console",level:"error",message:s.map(yn).join(" ")});}catch{}return r.apply(this,s)},console.warn=function(...s){try{t.add({category:"console",level:"warning",message:s.map(yn).join(" ")});}catch{}return n.apply(this,s)},e.push(()=>{console.error=r,console.warn=n;});}catch{}try{let r=n=>{try{let s=n.target;if(!(s instanceof Element))return;let i=s,a=0;for(;i&&a<10;){let o=i.getAttribute("data-testid");if(o){let l=(i.textContent??"").trim().slice(0,80);t.add({category:"ui.click",level:"info",message:`clicked ${o}${l?` \u2014 ${l}`:""}`,data:{testid:o,tag:i.tagName.toLowerCase()}});return}i=i.parentElement,a++;}}catch{}};document.addEventListener("click",r,{passive:!0,capture:!0}),e.push(()=>document.removeEventListener("click",r,!0));}catch{}return ()=>{for(let r of e)try{r();}catch{}}}function yn(t){try{if(t instanceof Error)return `${t.name}: ${t.message}`;if(typeof t=="object"&&t!==null){let r=JSON.stringify(t);return r.length>200?`${r.slice(0,200)}\u2026`:r}let e=String(t);return e.length>200?`${e.slice(0,200)}\u2026`:e}catch{return `[${typeof t}]`}}function Qi(){let t=document.currentScript;if(t&&t.dataset&&t.dataset.project)return t;let e=Array.from(document.querySelectorAll("script[data-project][data-key]"));return e.length>0?e[e.length-1]:null}function eo(t){let e=t.project?.trim(),r=t.key?.trim();if(!e||!r)return null;let n={};t.trigger&&(n.trigger=t.trigger),t.theme&&(n.theme=t.theme),t.position&&(n.position=t.position),t.triggerText&&(n.triggerText=t.triggerText);let s=t.bannerVariant,i=t.bannerPosition;(s||i)&&(n.bannerConfig={...s?{variant:s}:{},...i?{position:i}:{}});let a={projectId:e,apiKey:r};return t.endpoint&&(a.apiEndpoint=t.endpoint),t.debug==="true"&&(a.debug=true),Object.keys(n).length>0&&(a.widget=n),a}function to(){if(typeof document>"u"||typeof window>"u")return;let t=window;if(t.__mushiLoaderInit)return;let e=Qi();if(!e)return;let r=eo(e.dataset);if(r){t.__mushiLoaderInit=true;try{nt.init(r);}catch{}}}to();
2275
+ `,document.body.appendChild(h),h}function i(h){if(!e)return;let y=h.getBoundingClientRect();e.style.left=`${y.left}px`,e.style.top=`${y.top}px`,e.style.width=`${y.width}px`,e.style.height=`${y.height}px`,e.style.display="block";}function a(h){let y=h.target;y!==e&&i(y);}function m(h){h.preventDefault(),h.stopPropagation();let y=h.target;if(y===e||(h.composedPath?h.composedPath():[]).some(k=>k instanceof Element&&k.id==="mushi-mushi-widget"))return;let R=o(y);g(R);}function p(h){h.key==="Escape"&&g(null);}function g(h){c(),r?.(h),r=null;}function u(){return t&&c(),new Promise(h=>{r=h,t=true,e=l(),document.body.style.cursor="crosshair",document.addEventListener("mousemove",a,true),document.addEventListener("click",m,true),document.addEventListener("keydown",p,true);})}function c(){t&&(t=false,document.body.style.cursor="",document.removeEventListener("mousemove",a,true),document.removeEventListener("click",m,true),document.removeEventListener("keydown",p,true),e&&(e.remove(),e=null));}return {activate:u,deactivate:c,isActive:()=>t}}function Hr(){let t=[],e=history.pushState,r=history.replaceState,n=()=>l("popstate"),s=()=>l("hashchange");l("initial");function o(a){t.push(a),t.length>120&&t.shift();}function l(a){typeof location>"u"||o({ts:Date.now(),kind:"route",payload:{source:a,route:`${location.pathname}${location.search}${location.hash}`,href:location.href}});}function i(a){let m=a.target instanceof Element?a.target:null;if(!m)return;let p=m.closest('button,a,[role="button"],input,textarea,select,[data-mushi-track]')??m;o({ts:Date.now(),kind:"click",payload:{tag:p.tagName.toLowerCase(),id:p.id||void 0,text:ka(p)}});}return history.pushState=function(...m){let p=e.apply(this,m);return l("pushState"),p},history.replaceState=function(...m){let p=r.apply(this,m);return l("replaceState"),p},window.addEventListener("popstate",n),window.addEventListener("hashchange",s),document.addEventListener("click",i,true),{setScreen(a){o({ts:Date.now(),kind:"screen",payload:a});},getEntries(a={}){return [...t,...(a.consoleLogs??[]).map(p=>({ts:p.timestamp,kind:"log",payload:{level:p.level,message:p.message}})),...(a.networkLogs??[]).map(p=>({ts:p.timestamp,kind:"request",payload:{method:p.method,url:p.url,status:p.status,duration:p.duration,error:p.error}}))].sort((p,g)=>p.ts-g.ts).slice(-120)},clear(){t.length=0;},destroy(){history.pushState=e,history.replaceState=r,window.removeEventListener("popstate",n),window.removeEventListener("hashchange",s),document.removeEventListener("click",i,true);}}}function ka(t){let e=(t.textContent??"").replace(/\s+/g," ").trim();return e?e.slice(0,80):void 0}var Ra=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Ca=/^[0-9a-f]{20,}$/i,Ta=/^\d+$/,Ma=/^[a-z0-9]{16,}$/i;function Ns(t){return t.length===0?t:Ra.test(t)||Ca.test(t)||Ta.test(t)||Ma.test(t)&&/\d/.test(t)?"[id]":t}function Us(t,e){let r=t.length>1&&t.endsWith("/")?t.slice(0,-1):t;if(e?.length){let n=$a(r,e);if(n)return n}return "/"+r.split("/").filter(n=>n.length>0).map(Ns).join("/")}function $a(t,e){let r=t.split("/").filter(s=>s.length>0),n=[...e].sort((s,o)=>o.split("/").length-s.split("/").length);for(let s of n){let o=s.split("/").filter(i=>i.length>0);if(o.length!==r.length)continue;let l=true;for(let i=0;i<o.length;i++){let a=o[i],m=r[i];if(!(a.startsWith("[")&&a.endsWith("]"))&&!a.startsWith(":")&&a!==m){l=false;break}}if(l)return "/"+o.join("/")}return null}function La(){if(typeof document>"u")return [];let t=new Set,e=document.querySelectorAll("[data-testid]");for(let r of Array.from(e)){let n=r.getAttribute("data-testid");n&&n.length>0&&n.length<120&&t.add(n);}return Array.from(t).sort()}function Ia(){if(typeof window>"u")return [];try{let t=new URLSearchParams(window.location.search),e=new Set;return t.forEach((r,n)=>e.add(n)),Array.from(e).sort()}catch{return []}}function Aa(){if(typeof document>"u")return null;let t=s=>(s??"").replace(/\s+/g," ").trim().slice(0,200),e=t(document.querySelector("h1")?.textContent);if(e)return e;let r=t(document.title);return r||t(document.querySelector("main")?.textContent)||null}async function _a(t){if(!t||typeof crypto>"u"||!crypto.subtle)return null;try{let e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),n=new Uint8Array(r),s="";for(let o=0;o<n.length;o++)s+=n[o].toString(16).padStart(2,"0");return s}catch{return null}}function Or(t){let{config:e,getRecentNetworkPaths:r,getUserId:n,getSessionId:s,onEvent:o}=t,l=e.throttleMs??6e4,i=e.captureDomSummary!==false,a=e.userIdSource??"auto",m=new Map,p=null,g=null;async function u(){if(typeof window>"u")return;let M=Us(window.location.pathname,e.routeTemplates),S=Date.now(),E=m.get(M)??0;if(S-E<l)return;m.set(M,S);let O=null;a==="auto"?O=n()??s():a==="session-only"&&(O=s());let w={route:M,page_title:typeof document<"u"&&(document.title||"").slice(0,300)||null,dom_summary:i?Aa():null,testids:La(),network_paths:r().slice(-50),query_param_keys:Ia(),user_id_hash:await _a(O),observed_at:new Date().toISOString()};o(w);}function c(){g||(g=setTimeout(()=>{g=null,u();},100));}function h(){if(typeof window>"u")return;let M=window.location.pathname+window.location.search;M!==p&&(p=M,c());}if(typeof window>"u")return {destroy:()=>{},flushNow:()=>{}};let y=window.history.pushState.bind(window.history),v=window.history.replaceState.bind(window.history),I=function(...S){let E=y(...S);return h(),E},R=function(...S){let E=v(...S);return h(),E};window.history.pushState=I,window.history.replaceState=R;let k=()=>h();return window.addEventListener("popstate",k),c(),{destroy(){window.removeEventListener("popstate",k),window.history.pushState===I&&(window.history.pushState=y),window.history.replaceState===R&&(window.history.replaceState=v),g&&(clearTimeout(g),g=null),m.clear();},flushNow(){m.clear(),u();}}}function Fs(t,e,r){let n=a=>a.timestamp,s=a=>a.type===2,o=a=>a.type===4,l=Date.now()-e,i=0;for(let a=0;a<t.length;a++){let m=n(t[a]);if(typeof m=="number"&&m>=l)break;s(t[a])&&(i=o(t[a-1])?a-1:a);}if(t.length-i>r){for(let a=i+1;a<t.length;a++)if(s(t[a])&&t.length-a<=r){i=o(t[a-1])?a-1:a;break}}i>0&&t.splice(0,i);}function Pa(t){let e=[],r=false,n=o=>{if(!r)return;let l=o.target instanceof Element?o.target:null,i=l?.tagName?.toLowerCase()??"unknown",a=l?.closest("[data-testid]")?.getAttribute("data-testid")??void 0;e.push({type:"lite_click",timestamp:Date.now(),data:{tag:i,testId:a}}),e.length>400&&e.shift();},s=()=>{r=false,document.removeEventListener("click",n,true);};return {start(){r||(r=true,document.addEventListener("click",n,true));},stop:s,flush(){let o=Date.now()-t;return e.filter(l=>l.timestamp>=o)},destroy(){s(),e.length=0;}}}var Vt=null;async function Da(){if(Vt)return Vt;try{return Vt=await import('rrweb'),Vt}catch{return null}}async function qs(t){let e=t.maxDurationMs??3e4,r=await Da();if(!r?.record)return Pa(e);let n=r.record,s=[],o=null,l=false,i=['input[type="password"]',...t.redactSelectors??[]],a=()=>{o?.(),o=null,l=false;};return {start(){l||(l=true,o=n({emit(m){s.push(m),Fs(s,e,400);},maskAllInputs:true,maskAllText:true,maskTextSelector:i.join(","),checkoutEveryNms:e,sampling:{mousemove:false,mouseInteraction:true,scroll:150,media:800}})??null);},stop:a,flush(){return Fs(s,e,400),[...s]},destroy(){a(),s.length=0;}}}function js(t,e){return new Promise((r,n)=>{let s=new Image;s.onload=()=>{let o=document.createElement("div");o.style.position="relative",o.style.display="inline-block",o.style.maxWidth="100%";let l=document.createElement("canvas"),i=document.createElement("canvas"),a=Math.min(1,720/s.width),m=Math.round(s.width*a),p=Math.round(s.height*a);for(let S of [l,i])S.width=m,S.height=p,S.style.width="100%",S.style.height="auto",S.style.display="block";i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.cursor="crosshair";let g=l.getContext("2d"),u=i.getContext("2d");if(!g||!u){n(new Error("Canvas not supported"));return}g.drawImage(s,0,0,m,p),o.appendChild(l),o.appendChild(i),e.appendChild(o);let c="highlight",h=false,y=null,v=[],I=S=>{let E=i.getBoundingClientRect(),O="touches"in S?S.touches[0]??S.changedTouches[0]:null,w=O?O.clientX:S.clientX,B=O?O.clientY:S.clientY;return {x:(w-E.left)/E.width*m,y:(B-E.top)/E.height*p}},R=()=>{u.clearRect(0,0,m,p);for(let S of v)if(S.tool==="highlight"&&S.points.length>=2){let[E,O]=S.points;u.fillStyle="rgba(255, 230, 0, 0.35)",u.fillRect(Math.min(E.x,O.x),Math.min(E.y,O.y),Math.abs(O.x-E.x),Math.abs(O.y-E.y));}else if(S.tool==="arrow"&&S.points.length>=2){let[E,O]=S.points;u.strokeStyle="#ef4444",u.lineWidth=3,u.beginPath(),u.moveTo(E.x,E.y),u.lineTo(O.x,O.y),u.stroke();}},k=S=>{h=true,y=I(S);},M=S=>{if(!h||!y)return;h=false;let E=I(S);if(c==="blur"){let O=Math.min(y.x,E.x),w=Math.min(y.y,E.y),B=Math.abs(E.x-y.x),H=Math.abs(E.y-y.y);B>=1&&H>=1&&(g.filter="blur(8px)",g.drawImage(l,O,w,B,H,O,w,B,H),g.filter="none");}else v.push({tool:c,points:[y,E]});y=null,R();};i.addEventListener("mousedown",k),i.addEventListener("mouseup",M),i.addEventListener("touchstart",k,{passive:true}),i.addEventListener("touchend",M),r({canvas:l,setTool(S){c=S;},getDataUrl(){let S=document.createElement("canvas");S.width=m,S.height=p;let E=S.getContext("2d");return E?(E.drawImage(l,0,0),E.drawImage(i,0,0),S.toDataURL("image/jpeg",.85)):t},destroy(){i.removeEventListener("mousedown",k),i.removeEventListener("mouseup",M),i.removeEventListener("touchstart",k),i.removeEventListener("touchend",M),o.remove();}});},s.onerror=()=>n(new Error("Failed to load screenshot")),s.src=t;})}function zs(){try{let t=globalThis;return t.Sentry?t.Sentry:void 0}catch{return}}function Ha(){try{return globalThis.__SENTRY_REPLAY__}catch{return}}function Oa(){try{let t=globalThis,e=t.__SENTRY__,r=t.Sentry;return e?.version==="9"||r&&typeof r.lastEventId=="function"?e?.version==="9"?"v9":"v8":e?.version==="8"?"v8":r&&typeof r.getCurrentHub=="function"?"v7":"unknown"}catch{return "unknown"}}function Br(t,e={}){let r=Math.max(0,e.breadcrumbsLimit??30),n={},s=zs();if(!s)return n;n.sdk=Oa();try{let i=s;if(typeof i.lastEventId=="function")n.eventId=i.lastEventId()??void 0;else {let m=s.getCurrentHub?.()?.getScope?.();n.eventId=m?.getLastEventId?.()??void 0;}}catch{}let o;try{let i=s;typeof i.getCurrentScope=="function"?o=i.getCurrentScope():o=s.getCurrentHub?.()?.getScope?.();}catch{}if(o){try{let i=o.getUser?.();i&&(n.user={id:typeof i.id=="string"?i.id:void 0,email:typeof i.email=="string"?i.email:void 0,username:typeof i.username=="string"?i.username:void 0,ip_address:typeof i.ip_address=="string"?i.ip_address:void 0});}catch{}try{let i=o.getTags?.();if(i&&typeof i=="object"){let a={};for(let[m,p]of Object.entries(i))(typeof p=="string"||typeof p=="number"||typeof p=="boolean")&&(a[m]=p);Object.keys(a).length>0&&(n.tags=a);}}catch{}try{n.transactionName=o.getTransactionName?.()??o.getTransaction?.()?.name??void 0;}catch{}try{n.sessionId=o.getSession?.()?.sid??void 0;}catch{}try{let i=o.getBreadcrumbs?.()??o._breadcrumbs??[];if(Array.isArray(i)&&i.length>0){let a=i.slice(-r);n.breadcrumbs=a.map(m=>{let p=m;return {timestamp:typeof p.timestamp=="number"?p.timestamp<1e12?Math.round(p.timestamp*1e3):p.timestamp:void 0,category:typeof p.category=="string"?p.category:void 0,level:typeof p.level=="string"?p.level:void 0,message:typeof p.message=="string"?p.message:void 0,type:typeof p.type=="string"?p.type:void 0,data:p.data&&typeof p.data=="object"?p.data:void 0}});}}catch{}}try{let i=s,a;if(typeof i.getActiveSpan=="function"?a=i.getActiveSpan():o?.getSpan&&(a=o.getSpan()),a){let m=a.spanContext?.();n.traceId=m?.traceId??a.traceId??void 0,n.spanId=m?.spanId??a.spanId??void 0;}}catch{}let l;try{let i=s;typeof i.getClient=="function"?l=i.getClient():l=s.getCurrentHub?.()?.getClient?.();}catch{}if(l){try{let i=l.getOptions?.();i?.release&&(n.release=i.release),i?.environment&&(n.environment=i.environment);}catch{}try{let i=l.getDsn?.();if(i?.host&&i?.projectId&&n.eventId){let a=i.host.replace(/^o\d+\./,"");n.issueUrl=`https://${a}/issues/?query=${encodeURIComponent(n.eventId)}`;}}catch{}}try{let a=s.getReplay?.()??Ha();n.replayId=a?.getReplayId?.()??void 0;}catch{}return n}function Nr(t,e={}){let r=zs();if(r){try{let n=r;typeof n.setTag=="function"&&(n.setTag("mushi.report_id",t),e.reportUrl&&n.setTag("mushi.report_url",e.reportUrl)),typeof n.setContext=="function"&&n.setContext("mushi_report",{id:t,...e.reportUrl?{url:e.reportUrl}:{},captured_at:new Date().toISOString()}),typeof n.addBreadcrumb=="function"&&n.addBreadcrumb({category:"mushi",type:"info",level:"info",message:`Mushi report submitted (${t})`,data:{report_id:t,...e.reportUrl?{url:e.reportUrl}:{}}});}catch{}try{let s=r.getCurrentHub?.()?.getScope?.();s&&(s.setTag?.("mushi.report_id",t),e.reportUrl&&s.setTag?.("mushi.report_url",e.reportUrl),s.setContext?.("mushi_report",{id:t,...e.reportUrl?{url:e.reportUrl}:{}}));}catch{}}}var Ba=["/login","/logout","/signup","/sso/*","/auth/*"];function Vs(t,e={}){let r=[];if(e.rageClick!==false){let y=function(v){let I=Date.now();if(v.target===h){if(c.push(I),c=c.filter(R=>I-R<500),c.length>=3){let R=v.target;t.onTrigger("rage_click",{element:R.tagName,id:R.id,text:R.textContent?.slice(0,50)}),c=[];}}else h=v.target,c=[I];};let c=[],h=null;document.addEventListener("click",y,true),r.push(()=>document.removeEventListener("click",y,true));}if(e.longTask!==false&&typeof PerformanceObserver<"u")try{let c=new PerformanceObserver(h=>{for(let y of h.getEntries())y.duration>5e3&&t.onTrigger("long_task",{duration:Math.round(y.duration),startTime:Math.round(y.startTime)});});c.observe({entryTypes:["longtask"]}),r.push(()=>c.disconnect());}catch{}let n=Na(e.apiCascade);if(n.enabled){let c=[],h=globalThis.fetch;globalThis.fetch=async function(...y){let[v,I]=y,R=jt(v),k=!!zt(v,I)||Wt(R,{apiEndpoint:e.apiEndpoint,ignoreUrls:n.ignoreUrls});try{let M=await h.apply(this,y);return !k&&!M.ok&&M.status>=400&&Ws(c,t),M}catch(M){throw k||Ws(c,t),M}},r.push(()=>{globalThis.fetch=h;});}if((e.pageDwell===true||typeof e.pageDwell=="object"&&e.pageDwell!==null)&&typeof window<"u"){let R=function(H){return y.some(F=>F.endsWith("/*")?H.startsWith(F.slice(0,-2)):H===F||H.startsWith(F+"/"))},k=function(){let H=window.location?.pathname??"";R(H)||t.onTrigger("page_dwell",{thresholdMs:h,path:H});},M=function(){v&&clearTimeout(v);let H=window.location?.pathname??"";R(H)||(v=setTimeout(k,h));},S=function(){let H=window.location?.pathname??"";H!==I&&(I=H,M());};let c=typeof e.pageDwell=="object"?e.pageDwell??{}:{},h=c.thresholdMs||300*1e3,y=c.excludeRoutes!==void 0?c.excludeRoutes:Ba,v=null,I=window.location?.pathname??"";M();let E=window.history,O=E?.pushState,w=E?.replaceState;E&&O&&w&&(E.pushState=function(...H){let F=O.apply(this,H);return S(),F},E.replaceState=function(...H){let F=w.apply(this,H);return S(),F});let B=()=>S();window.addEventListener("popstate",B),r.push(()=>{v&&clearTimeout(v),window.removeEventListener("popstate",B),E&&O&&(E.pushState=O),E&&w&&(E.replaceState=w);});}if((e.firstSession===true||typeof e.firstSession=="object"&&e.firstSession!==null)&&typeof window<"u"){let c=typeof e.firstSession=="object"?e.firstSession??{}:{},h=c.delayMs??45*1e3,y=c.storageKey??(e.projectId?`mushi:${e.projectId}:firstSessionShown`:"mushi:firstSessionShown"),v=false;try{v=window.localStorage?.getItem(y)==="1";}catch{}if(!v){let I=setTimeout(()=>{try{window.localStorage?.setItem(y,"1");}catch{}t.onTrigger("first_session",{delayMs:h});},h);r.push(()=>clearTimeout(I));}}if(e.errorBoundary){let c=function(y){t.onTrigger("error_boundary",{message:y.message,filename:y.filename,lineno:y.lineno,colno:y.colno});},h=function(y){t.onTrigger("error_boundary",{message:y.reason instanceof Error?y.reason.message:String(y.reason),type:"unhandled_rejection"});};window.addEventListener("error",c),window.addEventListener("unhandledrejection",h),r.push(()=>{window.removeEventListener("error",c),window.removeEventListener("unhandledrejection",h);});}return {destroy(){r.forEach(c=>c());}}}function Na(t){return t===false?{enabled:false,ignoreUrls:[]}:t&&typeof t=="object"?{enabled:t.enabled!==false,ignoreUrls:t.ignoreUrls??[]}:{enabled:true,ignoreUrls:[]}}function Ws(t,e){let r=Date.now();t.push(r);let n=t.filter(s=>r-s<1e4);n.length>=3&&(e.onTrigger("api_cascade",{failureCount:n.length,windowMs:1e4}),t.length=0);}var Gs="mushi:lastDismiss",Gt="mushi:consecDismiss",Ur="mushi:lastShown";function Kt(t){try{return localStorage.getItem(t)}catch{return null}}function Yt(t,e){try{localStorage.setItem(t,e);}catch{}}function Ks(t={}){let e=t.maxProactivePerSession??2,r=t.dismissCooldownHours??24,n=t.suppressAfterDismissals??3,s=(t.reshowCooldownMinutes??30)*60*1e3,o=0,l=new Set;function i(g){let u=Date.now();if(parseInt(Kt(Gt)??"0",10)>=n)return false;let h=Kt(Gs);if(h&&u-parseInt(h,10)<r*60*60*1e3)return false;if(s>0&&o===0){let y=Kt(Ur);if(y&&u-parseInt(y,10)<s)return false}return o>=e||l.has(g)?false:(l.add(g),o++,Yt(Ur,String(u)),true)}function a(){Yt(Gs,String(Date.now()));let g=parseInt(Kt(Gt)??"0",10);Yt(Gt,String(g+1));}function m(){Yt(Gt,"0");}function p(){o=0,l.clear();try{localStorage.removeItem(Ur);}catch{}}return {shouldShow:i,recordDismissal:a,recordSubmission:m,reset:p}}function Ys(t,e){if(t.appVersion)return t.appVersion;let r=t.integrations?.vercel?.analyticsId;return r||e?.buildId}var Ce=null,Xt=class{constructor(){}static init(e){if(Ce)return At({scope:"mushi",level:"warn",format:"pretty"}).warn("Already initialized \u2014 call destroy() first to reinitialize"),Ce;let r={..._n(),...e};if(!r.projectId)throw new Error("[mushi] projectId is required \u2014 set NEXT_PUBLIC_MUSHI_PROJECT_ID / VITE_MUSHI_PROJECT_ID / MUSHI_PROJECT_ID or pass it explicitly");if(!r.apiKey)throw new Error("[mushi] apiKey is required \u2014 set NEXT_PUBLIC_MUSHI_API_KEY / VITE_MUSHI_API_KEY / MUSHI_API_KEY or pass it explicitly");return r.enabled===false?Qa():(Ce=Ua(r),Ce)}static getInstance(){return Ce}static destroy(){Ce?.destroy(),Ce=null;}static diagnose(){return Ce?.diagnose()??Zs()}};function Ua(t){let e=qa(t),r=e.projectId,n=()=>oe(r),s=e,o=t.debug??false?At({scope:"mushi",level:"debug",format:"pretty"}):lr,l=null,i=null,a=An({projectId:e.projectId,apiKey:e.apiKey,...e.apiEndpoint?{apiEndpoint:e.apiEndpoint}:{},getUserToken:()=>l,sdkPackage:He,sdkVersion:he}),m=Pn(e.preFilter),p=Nn(e.offline),g=Fn({maxBurst:10,refillRate:1,refillIntervalMs:5e3}),u=qn();function c(d){return d.map(f=>{let x={...f};if(typeof f.message=="string"&&(x.message=u.scrub(f.message)),f.data&&typeof f.data=="object"){let D={};for(let[A,U]of Object.entries(f.data))D[A]=typeof U=="string"?u.scrub(U):U;x.data=D;}return x})}function h(d){if(!d)return;let f={};for(let[x,D]of Object.entries(d))f[x]=typeof D=="string"?u.scrub(D):D;return f}let y=null,v=null,I=null,R=null,k=null,M=null,S=Hr(),E=null,O=0,w,B=`mushi:tester-jwt:${e.projectId}`;function H(){try{return typeof localStorage<"u"?localStorage.getItem(B):null}catch{return null}}function te(){try{typeof localStorage<"u"&&localStorage.removeItem(B);}catch{}}async function Z(d){let f=await a.getTesterStatus(d);if(!f.ok||!f.data){te();return}let x=f.data;if(!x.is_tester||!x.tester_id){te();return}w.setTesterSession(d,{id:x.tester_id,public_handle:x.public_handle??null,display_name:x.display_name??null});let D=await a.getMyReputation(d);if(D.ok&&D.data){let A=D.data;A.reputation&&w.setTesterReputation(A.reputation);}}function J(){if(s.capture?.console!==false?y??=Mr():(y?.destroy(),y=null),s.capture?.network!==false){let A={apiEndpoint:Fr(s),ignoreUrls:s.capture?.ignoreUrls,tracePropagation:s.capture?.tracePropagation,sessionId:dt()};v?v.updateOptions(A):v=Lr(A);}else v?.destroy(),v=null;if(s.capture?.performance!==false?I??=Pr():(I?.destroy(),I=null),s.capture?.screenshot!=="off"){let A={privacy:s.privacy};s.capture?.screenshotProvider?R=null:R?R.updateOptions(A):R=_r(A);}else R=null;!R&&!s.capture?.screenshotProvider&&($=null),w.setAllowScreenshotRemove(s.privacy?.allowUserRemoveScreenshot!==false),s.capture?.elementSelector!==false?k??=Dr():(k?.deactivate(),k=null,Se=null);let d=s.capture?.discoverInventory,f=d===true?{}:d&&typeof d=="object"?d:null;f!=null&&f.enabled!==false?(M?.destroy(),M=Or({config:f,getRecentNetworkPaths:()=>v?v.getEntries().map(A=>{try{let U=new URL(A.url,typeof window<"u"?window.location.href:"http://localhost");return U.host&&typeof window<"u"&&U.host!==window.location.host?null:U.pathname}catch{return null}}).filter(A=>A!=null&&A.length>0&&A.length<200):[],getUserId:()=>C?.id??null,getSessionId:dt,onEvent:A=>{a.postDiscoveryEvent({...A,sdk_version:he}).catch(U=>{o.debug("discovery emit failed",{err:String(U)});});}})):(M?.destroy(),M=null);let D=s.capture?.replay??"off";if(D==="rrweb"||D==="lite"){let A=++O;qs({redactSelectors:s.privacy?.redactSelectors}).then(U=>{if(A!==O){U.destroy();return}E?.destroy(),E=U,E.start();});}else O++,E?.destroy(),E=null;}let q=new Map;function P(d,f){q.get(d)?.forEach(x=>x({type:d,data:f}));}let $=null,Se=null,me=null,T=false,L=true,_=null,N=null,C=null,le={},ce={},G=jn({max:50});G.add({category:"lifecycle",level:"info",message:"Mushi SDK init",data:{projectId:e.projectId,sdkVersion:he}});let ie=null;ie=el(G);let X=false;function ae(){w.refreshReporterInboxQuiet();}function Te(){_&&clearInterval(_),_=null,N&&typeof document<"u"&&document.removeEventListener("visibilitychange",N),N=null;}function j(){if(Te(),!L)return;_=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||ae();},6e4),typeof document<"u"&&(N=()=>{document.visibilityState==="visible"&&ae();},document.addEventListener("visibilitychange",N)),ae();}function rt(d,f){if(!s.rewards?.enabled)return;let x={client:a,config:s.rewards,projectId:r,userId:d,traits:f,reporterToken:n()};As(x),s.rewards.showInWidget!==false&&a.getMyPoints(d).then(D=>{if(!D.ok)return;let A=D.data;w.setRewardsState({tier:A.tier?{slug:A.tier.slug??"free",displayName:A.tier.display_name??"Free",pointsThreshold:A.tier.points_threshold??0}:null,nextTier:A.next_tier?{displayName:A.next_tier.display_name??"",pointsThreshold:A.next_tier.points_threshold??0}:null,totalPoints:A.total_points??0,pointsForReport:A.report_submit_pts??50});}).catch(()=>{});}async function mt(){if(X)return null;let d=s.capture?.screenshotProvider;if(d){X=true;try{return await d()??null}catch(A){o.warn("screenshotProvider threw, falling back to built-in capturer",{error:A instanceof Error?A.message:String(A)});}finally{X=false;}}if(!R)return null;X=true;let f=w.getIsOpen();f&&w.hidePanel();let x=document.getElementById("mushi-mushi-widget"),D=x?.style.visibility??"";x&&(x.style.visibility="hidden"),await new Promise(A=>{requestAnimationFrame(()=>requestAnimationFrame(()=>A()));});try{return await R.take()}finally{X=false,x&&(x.style.visibility=D),f&&w.showPanel();}}async function Fe(d){let f=s.capture?.screenshot;!(R||s.capture?.screenshotProvider)||f==="off"||$||d==="open"&&f!=="auto"||d==="submit"&&f!=="on-report"&&f!=="auto"||(o.debug("Auto-capturing screenshot",{when:d,mode:f}),$=await mt(),w.setScreenshotAttached($!==null),w.setScreenshotPreview($));}w=new Ut(e.widget,{onSubmit:async({category:d,userCategory:f,description:x,intent:D})=>(o.info("Report submitted",{category:d,userCategory:f,intent:D}),nt?.recordSubmission(),await Fe("submit"),await to(d,x,D,f)??{reportId:null,queuedOffline:true}),onOpen:()=>{o.debug("Widget opened"),Fe("open"),E?.start(),P("widget:opened");},onClose:()=>{o.debug("Widget closed"),me&&(nt?.recordDismissal(),P("proactive:dismissed",{type:me})),$=null,Se=null,me=null,P("widget:closed");},onScreenshotRequest:async()=>{!(R||s.capture?.screenshotProvider)||s.capture?.screenshot==="off"||(o.debug("Taking screenshot"),$=await mt(),w.setScreenshotAttached($!==null),w.setScreenshotPreview($));},onScreenshotRemove:()=>{o.debug("Screenshot attachment removed"),$=null,w.setScreenshotAttached(false);},onScreenshotAnnotateRequest:async d=>{if(!$||d.childElementCount>0)return;let f;try{f=await js($,d);}catch(ue){o.warn("Screenshot annotation failed",{error:ue instanceof Error?ue.message:String(ue)});return}let x=document.createElement("div");x.className="mushi-annotate-toolbar";let D=ue=>{($=f.getDataUrl(),w.setScreenshotAttached(true),w.setScreenshotPreview($)),f.destroy(),x.remove();},A=[{id:"highlight",label:"\u270F\uFE0F Highlight"},{id:"blur",label:"\u{1F512} Blur"},{id:"arrow",label:"\u2197\uFE0F Arrow"}];for(let ue of A){let K=document.createElement("button");K.type="button",K.className="mushi-attach-btn",K.dataset.tool=ue.id,K.textContent=ue.label,K.addEventListener("click",()=>{f.setTool(ue.id),x.querySelectorAll("button[data-tool]").forEach(Me=>Me.classList.remove("active")),K.classList.add("active");}),x.appendChild(K);}x.querySelector('button[data-tool="highlight"]')?.classList.add("active");let U=document.createElement("button");U.type="button",U.className="mushi-attach-btn",U.textContent="\u2713 Done",U.addEventListener("click",()=>D()),x.appendChild(U),d.insertBefore(x,d.firstChild);},onElementSelectorRequest:async()=>{if(!(!k||s.capture?.elementSelector===false)){o.debug("Element selector activated"),w.setElementCapturing(true),w.hidePanel();try{let d=await k.activate();d?(Se=d,w.setElementSelected(!0),o.debug("Element selected",{tagName:d.tagName,xpath:d.xpath})):w.setElementCapturing(!1);}finally{w.showPanel();}}},async onReporterReportsRequest(){let d=await a.listReporterReports(oe(r));if(!d.ok)throw new Error(d.error?.message??"Could not load reports");return d.data?.reports??[]},async onReporterCommentsRequest(d){let f=await a.listReporterComments(d,oe(r));if(!f.ok)throw new Error(f.error?.message??"Could not load thread");return f.data?.comments??[]},async onReporterReply(d,f){let x=await a.replyToReporterReport(d,oe(r),f);if(!x.ok)throw new Error(x.error?.message??"Could not send reply")},async onReporterFeedback(d,f,x){let D=await a.replyToReporterReport(d,oe(r),x??"",f);if(!D.ok)throw new Error(D.error?.message??"Could not send feedback");return D.data?.feedback??null},async onReporterReopen(d,f){let x=await a.reopenReporterReport(d,oe(r),f);if(!x.ok)throw new Error(x.error?.message??"Could not reopen report");return x.data?.outcome??null},async onFeatureBoardRequest(){let d=await a.listReporterFeatureBoard(oe(r));if(!d.ok)throw new Error(d.error?.message??"Could not load community ideas");return d.data?.tickets??[]},async onFeatureBoardVote(d){let f=await a.voteReporterFeatureBoard(d,oe(r));if(!f.ok)throw new Error(f.error?.message??"Could not vote");return f.data??{voted:true,action:"added"}},onLeaderboardOpen(){w.setLeaderboard(null,true),Ps(10).then(d=>{w.setLeaderboard(d,false);});},async onMushiSignIn(d){let f=await a.sendMagicLink(d);if(!f.ok)throw new Error(f.error?.message??"Could not send sign-in link");return {ok:true}},async onGlobalLeaderboardOpen(){w.setGlobalLeaderboard(null,true);try{let d=H(),f=await a.getPublicLeaderboard(50),D=(f.ok?f.data?.leaderboard??[]:[]).map(A=>({tester_id:A.tester_id,rank:A.rank,public_handle:A.public_handle,display_name:A.display_name,points_30d:A.points_30d,total_points:A.total_points??0,badge:A.badge_slug}));if(w.setGlobalLeaderboard(D,!1),d){let A=await a.getMyReputation(d);if(A.ok&&A.data){let U=A.data;U.reputation&&w.setTesterReputation(U.reputation);}}}catch{w.setGlobalLeaderboard([],false);}},async onCrossAppReportsOpen(){let d=H();if(!d){w.setCrossAppReports([],false);return}try{let f=await a.getCrossAppReports(d),x=f.ok?f.data?.reports??[]:[];w.setCrossAppReports(x,!1);}catch{w.setCrossAppReports([],false);}},onTesterSignOut(){te();},assistantEnabled:e.assistant?.enabled===true,...e.assistant?.label?{assistantLabel:e.assistant.label}:{},...e.assistant?.greeting?{assistantGreeting:e.assistant.greeting}:{},...e.assistant?.suggestions?{assistantSuggestions:e.assistant.suggestions}:{},async onAssistantAsk(d,f){let x=await a.askAssistant({message:d,threadId:f,context:i});return x.ok?x.data??null:null}},he),J(),typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>w.mount()):w.mount());let Jt=H();Jt&&Z(Jt).catch(()=>te());let jr=null,nt=null,Y=s.proactive;Y&&(Y.rageClick!==false||Y.longTask!==false||Y.apiCascade!==false||Y.errorBoundary===true||Y.pageDwell||Y.firstSession)&&typeof document<"u"&&(nt=Ks(Y?.cooldown),jr=Vs({onTrigger:(d,f)=>{if(!nt.shouldShow(d)){o.debug("Proactive trigger suppressed by fatigue prevention",{type:d});return}o.info("Proactive trigger fired",{type:d,context:f}),me=d,P("proactive:triggered",{type:d,context:f}),d==="first_session"?w.pulseTrigger?.():w.open();}},{rageClick:Y?.rageClick,longTask:Y?.longTask,apiCascade:Y?.apiCascade,apiEndpoint:Fr(s),errorBoundary:Y?.errorBoundary,pageDwell:Y?.pageDwell,firstSession:Y?.firstSession,projectId:e.projectId}),o.debug("Proactive triggers enabled",{rageClick:Y?.rageClick!==false,longTask:Y?.longTask!==false,apiCascade:Y?.apiCascade!==false,errorBoundary:Y?.errorBoundary===true,pageDwell:!!Y?.pageDwell,firstSession:!!Y?.firstSession})),p.startAutoSync(a),p.flush(a).then(d=>{d.sent>0&&o.info("Synced offline reports",{sent:d.sent});});function Zt(d){if(T=true,L=d.reporterNotificationsEnabled!==false,d.enabled===false){s=e,Ya(t.projectId),J(),w.updateConfig(s.widget),Te(),o.debug("Runtime SDK config disabled; using bootstrap config",{version:d.version});return}s=Fa(s,d),J(),d.widget&&w.updateConfig(s.widget),L?j():Te(),o.debug("Applied runtime SDK config",{version:d.version});}if(za(t)){let d=Ga(t.projectId);d&&Zt(d),a.getSdkConfig().then(f=>{f.ok&&f.data?(Ka(t.projectId,f.data),Zt(f.data)):f.error&&o.debug("Runtime SDK config unavailable",f.error);}).catch(f=>{o.debug("Runtime SDK config fetch failed",{error:f instanceof Error?f.message:String(f)});});}else o.debug("Runtime SDK config disabled via runtimeConfig:false; using static bootstrap config");eo(),j(),o.info("Initialized",{projectId:t.projectId});async function eo(){if(s.widget?.outdatedBanner==="off")return;let d=Xa(He);d&&zr(d);let f=await a.getLatestSdkVersion(He);!f.ok||!f.data||(Ja(He,f.data),zr(f.data));}function zr(d){let f=d.latest,x=!!(f&&Za(he,f));if(!x&&!d.deprecated)return;let D=d.deprecationMessage??(x?`Update ${He} to ${f}.`:null);o.warn("Mushi SDK is outdated",{package:He,current:he,latest:f,deprecated:d.deprecated,message:D}),s.widget?.outdatedBanner!=="console-only"&&w.setSdkFreshness({latest:f,current:he,deprecated:d.deprecated,message:D});}async function to(d,f,x,D){let A=m.check(f);if(!A.passed){o.info("Report blocked by pre-filter",{reason:A.reason});return}let U=t.preFilter?.wasmClassifier;if(U)try{let V=await U.classify({description:f,category:d,url:typeof location<"u"?location.href:void 0,hasScreenshot:$!==null,hasSelectedElement:Se!==null,hasNetworkErrors:v?.getEntries()?.some(fe=>fe.status>=400||!!fe.error)??!1,hasConsoleErrors:y?.getEntries()?.some(fe=>fe.level==="error")??!1,proactiveTrigger:me??void 0});if(V.verdict==="block"){o.info("Report blocked by on-device classifier",{modelId:V.modelId,confidence:V.confidence,reason:V.reason});return}o.debug("On-device classifier verdict",{...V});}catch(V){o.warn("On-device classifier threw \u2014 falling through to server",{error:V instanceof Error?V.message:String(V)});}if(!g.tryConsume()){o.warn("Report throttled \u2014 rate limit exceeded");return}let ue=u.scrub(m.truncate(f)),K=t.sentry?Br(t.sentry):void 0,Me=await Un().catch(()=>null),Ee=s.capture?.console===false?void 0:y?.getEntries(),$e=s.capture?.network===false?void 0:v?.getEntries(),Le=c(G.getAll()),gt=h(Object.keys(ce).length>0?{...ce}:void 0),Vr=K?{...K,...K.breadcrumbs?{breadcrumbs:c(K.breadcrumbs)}:{},...K.tags?{tags:h(K.tags)}:{}}:void 0,Gr=$?await is($).catch(()=>null):null;$&&!Gr&&o.warn("Screenshot dropped \u2014 could not compress under wire budget");let Kr=cr(),ve={id:ur(),projectId:t.projectId,category:d,...D?{userCategory:D}:{},description:ue,userIntent:x,environment:Kr,consoleLogs:Ee,networkLogs:$e,performanceMetrics:s.capture?.performance===false?void 0:I?.getMetrics(),timeline:S.getEntries({consoleLogs:Ee,networkLogs:$e}),screenshotDataUrl:Gr??void 0,selectedElement:Se??void 0,...E?{replayEvents:E.flush()}:{},metadata:{...le,...C?{user:C}:{},...K?.release?{sentryRelease:K.release}:{}},sessionId:dt(),reporterToken:oe(r),...Me?{fingerprintHash:Me}:{},appVersion:Ys(s,Kr),sdkPackage:He,sdkVersion:he,proactiveTrigger:me??void 0,...Le.length>0?{breadcrumbs:Le}:{},...gt?{tags:gt}:{},...Vr?{sentryContext:Vr}:{},sentryEventId:K?.eventId,sentryReplayId:K?.replayId,createdAt:new Date().toISOString()};if(G.add({category:"lifecycle",level:"info",message:`Mushi report submitting (${d})`,data:{reportId:ve.id,category:d}}),t.integrations?.custom){let V={addMetadata(fe,ro){ve.metadata[fe]=ro;},setCategory(fe){ve.category=fe;},setDescription(fe){ve.description=fe;}};t.integrations.custom(V);}let z=ve;if(t.beforeSendFeedback)try{let V=await Promise.race([Promise.resolve(t.beforeSendFeedback(ve)),new Promise(fe=>setTimeout(()=>fe(ve),2e3))]);if(V===null){o.info("Report dropped by beforeSendFeedback hook",{reportId:ve.id});return}z=V;}catch(V){o.warn("beforeSendFeedback hook threw \u2014 sending unmodified report",{error:V instanceof Error?V.message:String(V)});}if(P("report:submitted",{reportId:z.id}),typeof navigator<"u"&&!navigator.onLine)return await p.enqueue(z),o.info("Offline \u2014 report queued",{reportId:z.id}),P("report:queued",{reportId:z.id}),{reportId:null,queuedOffline:true};let W=await a.submitReport(z);if(!W.ok&&W.error?.code==="PAYLOAD_TOO_LARGE"&&(Array.isArray(z.replayEvents)&&z.replayEvents.length>0&&(o.warn("Report too large \u2014 dropping replay buffer and retrying",{reportId:z.id}),z={...z,replayEvents:void 0},W=await a.submitReport(z)),!W.ok&&W.error?.code==="PAYLOAD_TOO_LARGE"&&z.screenshotDataUrl&&(o.warn("Report still too large \u2014 dropping screenshot and retrying",{reportId:z.id}),z={...z,screenshotDataUrl:void 0},W=await a.submitReport(z))),W.ok){if(o.info("Report sent",{reportId:W.data?.reportId}),P("report:sent",{reportId:W.data?.reportId}),ae(),W.data?.cursorAgentId){let V=W.data;P("report:dispatched",{reportId:V.reportId,agentId:V.cursorAgentId,fixId:V.fixId});}G.add({category:"lifecycle",level:"info",message:`Mushi report sent (${W.data?.reportId??ve.id})`}),tt({action:"report_submit",metadata:{category:d,reportId:W.data?.reportId??ve.id}});try{t.sentry&&W.data?.reportId&&Nr(W.data.reportId);}catch{}}else W.error?.code==="PAYLOAD_TOO_LARGE"||W.error?.code==="SERIALIZE_FAILED"?(o.warn("Report exceeds size limit after degradation \u2014 dropping",{reportId:z.id,error:W.error}),P("report:failed",{reportId:z.id,error:W.error}),G.add({category:"lifecycle",level:"error",message:`Mushi report dropped \u2014 payload too large (${z.id})`})):(o.warn("Report failed, queuing for retry",{reportId:z.id,error:W.error}),await p.enqueue(z),P("report:failed",{reportId:z.id,error:W.error}),G.add({category:"lifecycle",level:"warning",message:`Mushi report queued for retry (${z.id})`}));return $=null,Se=null,me=null,W?.ok?{reportId:W.data?.reportId??ve.id,queuedOffline:false}:{reportId:null,queuedOffline:true}}let Wr={report(d){w.open(d);},on(d,f){return q.has(d)||q.set(d,new Set),q.get(d).add(f),()=>q.get(d)?.delete(f)},setUser(d){C=d;},setMetadata(d,f){le[d]=f;},setScreen(d){S.setScreen(d);},isOpen(){return w.getIsOpen()},open(){w.open();},openWith(d){w.open({category:d});},show(){w.showTrigger();},hide(){w.hideTrigger();},attachTo(d,f){return w.attachTo(d,f)},setTrigger(d){w.setTrigger(d);},openReporter(){w.openReporter();},close(){w.close();},updateConfig(d){Zt(d);},diagnose(){return Wa({apiEndpoint:Fr(s),widgetMounted:w.getIsMounted(),runtimeConfigLoaded:T,captureScreenshotAvailable:R!==null,captureNetworkIntercepting:v!==null,widgetDiagnostics:w.getWidgetDiagnostics()})},destroy(){jr?.destroy(),nt?.reset(),w.destroy(),y?.destroy(),v?.destroy(),I?.destroy(),k?.deactivate(),S.destroy(),M?.destroy(),M=null,E?.destroy(),E=null,p.stopAutoSync(),Te(),ie?.(),ie=null,G.clear(),q.clear(),Ce=null,o.debug("Destroyed");},async captureEvent(d){if(!g.tryConsume())return o.warn("captureEvent throttled \u2014 rate limit exceeded"),null;let f=u.scrub(m.truncate(d.description)),x=d.category??"bug",D=t.sentry?Br(t.sentry):void 0,A=c(G.getAll()),U=h(Object.keys(ce).length===0&&!d.tags?void 0:{...ce,...d.tags??{}}),ue=D?{...D,...D.breadcrumbs?{breadcrumbs:c(D.breadcrumbs)}:{},...D.tags?{tags:h(D.tags)}:{}}:void 0,K=cr(),Me={id:ur(),projectId:t.projectId,category:x,description:f,environment:K,timeline:S.getEntries(),metadata:{...d.metadata??{},...C?{user:C}:{},...d.error?{error:d.error}:{},...d.severity?{severity:d.severity}:{},...d.component?{component:d.component}:{},...d.source?{source:d.source}:{source:"captureEvent"}},...A.length>0?{breadcrumbs:A}:{},...U&&Object.keys(U).length>0?{tags:U}:{},...ue?{sentryContext:ue}:{},sessionId:dt(),reporterToken:oe(r),appVersion:Ys(s,K),sdkPackage:He,sdkVersion:he,sentryEventId:D?.eventId,sentryReplayId:D?.replayId,createdAt:new Date().toISOString()},Ee=Me;if(s.beforeSendFeedback)try{let Le=await Promise.race([Promise.resolve(s.beforeSendFeedback(Me)),new Promise(gt=>setTimeout(()=>gt(Me),2e3))]);if(Le===null)return o.info("captureEvent dropped by beforeSendFeedback hook",{reportId:Me.id}),null;Ee=Le;}catch(Le){o.warn("captureEvent beforeSendFeedback threw \u2014 sending unmodified report",{error:Le instanceof Error?Le.message:String(Le)});}if(P("report:submitted",{reportId:Ee.id}),typeof navigator<"u"&&!navigator.onLine)return await p.enqueue(Ee),P("report:queued",{reportId:Ee.id}),null;let $e=await a.submitReport(Ee);if($e.ok){P("report:sent",{reportId:$e.data?.reportId});try{t.sentry&&$e.data?.reportId&&Nr($e.data.reportId);}catch{}return $e.data?.reportId??null}return await p.enqueue(Ee),P("report:failed",{reportId:Ee.id,error:$e.error}),null},async captureException(d,f){let x=zn(d);G.add({category:"lifecycle",level:"error",message:`Mushi.captureException(${x.name}): ${x.message}`,...x.stack?{data:{stack:x.stack.slice(0,500)}}:{}});let D=f?.description?.trim()||`${x.name}: ${x.message}`||"Uncaught exception";return Wr.captureEvent({description:D,category:f?.category??"bug",severity:f?.severity??"high",...f?.component?{component:f.component}:{},...f?.tags?{tags:f.tags}:{},source:f?.source??"captureException",error:{name:x.name,message:x.message,...x.stack?{stack:x.stack}:{}},metadata:{...f?.metadata??{},...x.cause?{cause:x.cause}:{}}})},identify(d,f){if(C={id:d,...f?.email?{email:f.email}:{},...f?.name?{name:f.name}:{}},w.setIdentifiedUser(C.name||C.email?{name:C.name,email:C.email}:null),f)for(let[x,D]of Object.entries(f))x!=="email"&&x!=="name"&&(le[`user.${x}`]=D);G.add({category:"lifecycle",level:"info",message:`Mushi.identify(${d})`}),rt(d,f?{email:f.email,name:f.name,provider:f.provider}:void 0);},identifyWithToken(d){if(l=d&&typeof d=="string"?d:null,l){let f=Jn(l);f?.sub&&(C={id:f.sub,...f.email?{email:f.email}:{},...f.name?{name:f.name}:{}},w.setIdentifiedUser(C.name||C.email?{name:C.name,email:C.email}:null),rt(C.id,{email:C.email,name:C.name})),G.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken()"});}else C=null,w.setIdentifiedUser(null),G.add({category:"lifecycle",level:"info",message:"Mushi.identifyWithToken(null)"});},publishPageContext(d){i=d&&d.route?d:null;},openAssistant(){w.openAssistantTab();},addBreadcrumb(d){G.add(d);},getBreadcrumbs(){return G.getAll()},setTag(d,f){typeof d!="string"||d.length===0||(ce[d]=f);},setTags(d){if(!(!d||typeof d!="object"))for(let[f,x]of Object.entries(d))typeof f=="string"&&f.length>0&&(ce[f]=x);},clearTag(d){if(typeof d=="string"&&d.length>0){delete ce[d];return}for(let f of Object.keys(ce))delete ce[f];},async getReputation(){if(!C?.id)return null;let d=await a.getMyPoints(C.id);return d.ok?{totalPoints:d.data.total_points??0,points30d:d.data.points_30d??0,reputation:1,confirmedBugs:0,totalReports:0}:null},async getTier(){return C?.id?_s(C.id):null},recordActivity(d,f){s.rewards?.enabled&&tt({action:d,metadata:f});},pulseTrigger(){w.pulseTrigger?.();},async listMyReports(){let d=await a.listReporterReports(oe(r));return d.ok?d.data?.reports??[]:[]},async listMyComments(d){let f=await a.listReporterComments(d,oe(r));return f.ok?f.data?.comments??[]:[]},async replyToReport(d,f){let x=await a.replyToReporterReport(d,oe(r),f);return x.ok?x.data?.comment??null:null},async submitFeedbackSignal(d,f,x){let D=await a.replyToReporterReport(d,oe(r),x??"",f);return D.ok?D.data?.feedback??null:null},async reopenReport(d,f){let x=await a.reopenReporterReport(d,oe(r),f);return x.ok?x.data?.outcome??null:null},openMyReports(){w.recorderOpenMyReports();},async getHallOfFame(d=20){let f=await a.getHallOfFame(d);return f.ok?f.data?.data??[]:[]}};if(typeof globalThis<"u"&&(e.debug??false)&&xs(w),typeof window<"u"&&typeof localStorage<"u"){let d="mushi:last-run",f=null;try{let x=localStorage.getItem(d);f=x===null?null:x==="unfinished",localStorage.setItem(d,"unfinished");}catch{f=null;}try{window.addEventListener("pagehide",()=>{try{localStorage.setItem(d,"clean");}catch{}});}catch{}if(typeof e.onCrashedLastRun=="function")try{e.onCrashedLastRun(f);}catch(x){o.warn("onCrashedLastRun hook threw",{error:x instanceof Error?x.message:String(x)});}}return Wr}function Fa(t,e){let r=e.native?.triggerMode,n=e.widget?.launcher,s=n??e.widget?.trigger??(r==="none"||r==="shake"?"manual":void 0),o=n==="hidden"||e.widget?.trigger==="hidden",l=t.widget?.trigger,i=s==="hidden"&&!o&&l&&l!=="hidden"?l:s,a=e.widget,m=a?.bannerVariant,p=a?.bannerPosition,g=a?.bannerMessage,u=a?.bannerLabel,c=a?.bannerBugCta,h=a?.bannerFeatureCta,y=m||p||g!=null||u!=null||c!=null||h!=null?{...t.widget?.bannerConfig??{},...m?{variant:m}:{},...p?{position:p}:{},...g!=null?{message:g}:{},...u!=null?{label:u===""?false:u}:{},...c!=null?{bugCta:c??void 0}:{},...h!=null?{featureCta:h}:{}}:void 0;return {...t,widget:{...t.widget,...e.widget,...i?{trigger:i}:{},...y?{bannerConfig:y}:{},...t.widget?.betaMode?{betaMode:t.widget.betaMode}:{}},capture:{...t.capture,...e.capture},privacy:{...t.privacy}}}function qa(t){if(!t.preset)return t;let e=ja(t.preset);return {...t,widget:{...e.widget,...t.widget},capture:{...e.capture,...t.capture},proactive:{...e.proactive,...t.proactive,cooldown:{...e.proactive?.cooldown,...t.proactive?.cooldown}}}}function ja(t){switch(t){case "manual-only":return {widget:{trigger:"manual",outdatedBanner:"console-only"},capture:{console:true,network:true,performance:false,screenshot:"on-report",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}};case "beta-loud":return {widget:{trigger:"auto",outdatedBanner:"banner"},capture:{console:true,network:true,performance:true,screenshot:"auto",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true}};case "internal-debug":return {widget:{trigger:"auto",outdatedBanner:"banner",brandFooter:true},capture:{console:true,network:true,performance:true,screenshot:"auto",elementSelector:true},proactive:{rageClick:true,longTask:true,apiCascade:true,errorBoundary:true,cooldown:{maxProactivePerSession:10,dismissCooldownHours:0,suppressAfterDismissals:99}}};case "production-calm":return {widget:{trigger:"auto",outdatedBanner:"console-only"},capture:{console:true,network:true,performance:false,screenshot:"on-report",elementSelector:false},proactive:{rageClick:false,longTask:false,apiCascade:false,errorBoundary:false}}}}function Fr(t){return t.apiEndpoint??It}function za(t){return t.runtimeConfig!==false}async function Wa(t){let e=await Va(t.apiEndpoint);return {apiEndpointReachable:e.reachable,cspAllowsEndpoint:e.cspAllowed,widgetMounted:t.widgetMounted,shadowDomAvailable:typeof HTMLElement<"u"&&typeof HTMLElement.prototype.attachShadow=="function",dialogSupported:typeof HTMLDialogElement<"u",runtimeConfigLoaded:t.runtimeConfigLoaded,captureScreenshotAvailable:t.captureScreenshotAvailable,captureNetworkIntercepting:t.captureNetworkIntercepting,sdkVersion:he,widgetHostPointerSafe:t.widgetDiagnostics?.widgetHostPointerSafe??false,widgetHostBounds:t.widgetDiagnostics?.widgetHostBounds??null,widgetSuppressed:t.widgetDiagnostics?.widgetSuppressed??false,bannerRendered:t.widgetDiagnostics?.bannerRendered??false}}async function Zs(){return {apiEndpointReachable:false,cspAllowsEndpoint:false,widgetMounted:false,shadowDomAvailable:typeof HTMLElement<"u"&&typeof HTMLElement.prototype.attachShadow=="function",dialogSupported:typeof HTMLDialogElement<"u",runtimeConfigLoaded:false,captureScreenshotAvailable:false,captureNetworkIntercepting:false,sdkVersion:he,widgetHostPointerSafe:false,widgetHostBounds:null,widgetSuppressed:false,bannerRendered:false}}async function Va(t){if(typeof fetch>"u")return {reachable:false,cspAllowed:false};let e=typeof AbortController<"u"?new AbortController:null,r=e?setTimeout(()=>e.abort(),3e3):null;try{return {reachable:(await fetch(`${t.replace(/\/$/,"")}/health`,{method:"GET",cache:"no-store",...e?{signal:e.signal}:{},[Xe]:"diagnose"})).ok,cspAllowed:!0}}catch{return {reachable:false,cspAllowed:false}}finally{r&&clearTimeout(r);}}function qr(t){return `mushi:sdk-config:${t}`}function Qs(t){return `mushi:sdk-version:${t}`}function Ga(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(qr(t));return e?JSON.parse(e).config??null:null}catch{return null}}function Ka(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(qr(t),JSON.stringify({cachedAt:Date.now(),config:e}));}catch{}}function Ya(t){if(!(typeof localStorage>"u"))try{localStorage.removeItem(qr(t));}catch{}}function Xa(t){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(Qs(t));if(!e)return null;let r=JSON.parse(e);return !r.data||!r.cachedAt||Date.now()-r.cachedAt>864e5?null:r.data}catch{return null}}function Ja(t,e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Qs(t),JSON.stringify({cachedAt:Date.now(),data:e}));}catch{}}function Za(t,e){let r=Xs(t),n=Xs(e);for(let s=0;s<Math.max(r.length,n.length);s++){let o=r[s]??0,l=n[s]??0;if(o<l)return true;if(o>l)return false}return false}function Xs(t){return t.split(/[.-]/).map(e=>Number.parseInt(e,10)).filter(e=>Number.isFinite(e))}function Qa(){return {report:()=>{},on:()=>()=>{},setUser:()=>{},setMetadata:()=>{},setScreen:()=>{},isOpen:()=>false,open:()=>{},close:()=>{},updateConfig:()=>{},diagnose:Zs,openWith:()=>{},show:()=>{},hide:()=>{},attachTo:()=>()=>{},setTrigger:()=>{},openReporter:()=>{},destroy:()=>{Ce=null;},captureEvent:async()=>null,captureException:async()=>null,identify:()=>{},identifyWithToken:()=>{},publishPageContext:()=>{},openAssistant:()=>{},addBreadcrumb:()=>{},getBreadcrumbs:()=>[],setTag:()=>{},setTags:()=>{},clearTag:()=>{},getReputation:async()=>null,getTier:async()=>null,recordActivity:()=>{},pulseTrigger:()=>{},listMyReports:async()=>[],listMyComments:async()=>[],replyToReport:async()=>null,submitFeedbackSignal:async()=>null,reopenReport:async()=>null,openMyReports:()=>{},getHallOfFame:async()=>[]}}function el(t){if(typeof window>"u")return ()=>{};let e=[];try{let r=l=>{t.add({category:"navigation",level:"info",message:`${l}: ${window.location.pathname}`,data:{url:window.location.href,kind:l}});},n=()=>r("popstate");window.addEventListener("popstate",n,{passive:!0}),e.push(()=>window.removeEventListener("popstate",n));let s=window.history.pushState,o=window.history.replaceState;window.history.pushState=function(...i){let a=s.apply(this,i);try{r("pushState");}catch{}return a},window.history.replaceState=function(...i){let a=o.apply(this,i);try{r("replaceState");}catch{}return a},e.push(()=>{window.history.pushState=s,window.history.replaceState=o;});}catch{}try{let r=console.error,n=console.warn;console.error=function(...s){try{t.add({category:"console",level:"error",message:s.map(Js).join(" ")});}catch{}return r.apply(this,s)},console.warn=function(...s){try{t.add({category:"console",level:"warning",message:s.map(Js).join(" ")});}catch{}return n.apply(this,s)},e.push(()=>{console.error=r,console.warn=n;});}catch{}try{let r=n=>{try{let s=n.target;if(!(s instanceof Element))return;let o=s,l=0;for(;o&&l<10;){let i=o.getAttribute("data-testid");if(i){let a=(o.textContent??"").trim().slice(0,80);t.add({category:"ui.click",level:"info",message:`clicked ${i}${a?` \u2014 ${a}`:""}`,data:{testid:i,tag:o.tagName.toLowerCase()}});return}o=o.parentElement,l++;}}catch{}};document.addEventListener("click",r,{passive:!0,capture:!0}),e.push(()=>document.removeEventListener("click",r,!0));}catch{}return ()=>{for(let r of e)try{r();}catch{}}}function Js(t){try{if(t instanceof Error)return `${t.name}: ${t.message}`;if(typeof t=="object"&&t!==null){let r=JSON.stringify(t);return r.length>200?`${r.slice(0,200)}\u2026`:r}let e=String(t);return e.length>200?`${e.slice(0,200)}\u2026`:e}catch{return `[${typeof t}]`}}function tl(){let t=document.currentScript;if(t&&t.dataset&&t.dataset.project)return t;let e=Array.from(document.querySelectorAll("script[data-project][data-key]"));return e.length>0?e[e.length-1]:null}function rl(t){let e=t.project?.trim(),r=t.key?.trim();if(!e||!r)return null;let n={};t.trigger&&(n.trigger=t.trigger),t.theme&&(n.theme=t.theme),t.position&&(n.position=t.position),t.triggerText&&(n.triggerText=t.triggerText);let s=t.bannerVariant,o=t.bannerPosition;(s||o)&&(n.bannerConfig={...s?{variant:s}:{},...o?{position:o}:{}});let l={projectId:e,apiKey:r};return t.endpoint&&(l.apiEndpoint=t.endpoint),t.debug==="true"&&(l.debug=true),Object.keys(n).length>0&&(l.widget=n),l}function nl(){if(typeof document>"u"||typeof window>"u")return;let t=window;if(t.__mushiLoaderInit)return;let e=tl();if(!e)return;let r=rl(e.dataset);if(r){t.__mushiLoaderInit=true;try{Xt.init(r);}catch{}}}nl();
2282
2276
  })();//# sourceMappingURL=mushi.loader.global.js.map
2283
2277
  //# sourceMappingURL=mushi.loader.global.js.map