@mhosaic/feedback 0.18.1 → 0.20.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.
- package/dist/{chunk-5FVEQYA5.mjs → chunk-YV7LMW22.mjs} +129 -11
- package/dist/chunk-YV7LMW22.mjs.map +1 -0
- package/dist/embed.min.js +4 -4
- package/dist/embed.min.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/widget.min.js +5 -5
- package/dist/widget.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-5FVEQYA5.mjs.map +0 -1
package/dist/index.mjs
CHANGED
package/dist/react.mjs
CHANGED
package/dist/widget.min.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";var MhosaicFeedback=(()=>{var se=Object.defineProperty;var
|
|
1
|
+
"use strict";var MhosaicFeedback=(()=>{var se=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var Ot=Object.prototype.hasOwnProperty;var Vt=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qt=(e,t)=>{for(var r in t)se(e,r,{get:t[r],enumerable:!0})},Gt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jt(t))!Ot.call(e,a)&&a!==r&&se(e,a,{get:()=>t[a],enumerable:!(n=Ut(t,a))||n.enumerable});return e};var Xt=e=>Gt(se({},"__esModule",{value:!0}),e);var Se=(e,t,r)=>Vt(e,typeof t!="symbol"?t+"":t,r);var xo={};qt(xo,{createFeedback:()=>_o});var Jt=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Zt(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}function We(e){var _,w;let t=((_=e.endpoint)!=null?_:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Zt(t);let r=(w=e.fetch)!=null?w:globalThis.fetch;async function n(m){var E,L,P;let u=m;if(e.beforeSend&&(u=await e.beforeSend(m)),u===!1)throw new Error("Submission cancelled by beforeSend");let l=new FormData;for(let A of Jt)l.append(A,String(u[A]));l.append("technical_context",JSON.stringify(u.technical_context)),u.screenshot&&l.append("screenshot",u.screenshot,"screenshot.png"),u.synthetic&&l.append("synthetic","true"),(E=u.user)!=null&&E.id&&l.append("user",JSON.stringify(u.user)),u.widget_version&&l.append("widget_version",u.widget_version);let y={Authorization:`Bearer ${e.apiKey}`};u.synthetic&&(y["X-Mhosaic-Capture-Source"]="error-tracking");let C=(L=e.getSignedIdentity)==null?void 0:L.call(e);C&&C.userHash&&C.exp&&((P=u.user)!=null&&P.id)&&(y["X-Mhosaic-User"]=String(u.user.id),y["X-Mhosaic-User-Hmac"]=C.userHash,y["X-Mhosaic-User-Exp"]=String(C.exp),C.email&&(y["X-Mhosaic-User-Email"]=C.email));let M=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:y,body:l});if(!M.ok){let A=await M.text().catch(()=>"");throw new Error(`Feedback submit failed: ${M.status} ${A}`)}return M.json()}function a(m){var y;let u={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":m},l=(y=e.getSignedIdentity)==null?void 0:y.call(e);return l&&l.userHash&&l.exp&&(u["X-Mhosaic-User-Hmac"]=l.userHash,u["X-Mhosaic-User-Exp"]=String(l.exp),l.email&&(u["X-Mhosaic-User-Email"]=l.email)),u}async function i(m){let u=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:a(m)});if(u.status===404)return[];if(!u.ok){let l=await u.text().catch(()=>"");throw new Error(`listMine failed: ${u.status} ${l}`)}return u.json()}async function s(m){let u=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:a(m)});if(u.status===404)return[];if(!u.ok){let l=await u.text().catch(()=>"");throw new Error(`listChangelog failed: ${u.status} ${l}`)}return u.json()}async function c(m,u){let l=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"GET",headers:a(u)});if(!l.ok){let y=await l.text().catch(()=>"");throw new Error(`getReport failed: ${l.status} ${y}`)}return l.json()}async function f(m,u,l,y){let C=await r(`${t}/api/feedback/v1/reports/widget/${m}/comments/`,{method:"POST",headers:{...a(u),"Content-Type":"application/json"},body:JSON.stringify({body:l,...y!==void 0&&{client_nonce:y}})});if(!C.ok){let M=await C.text().catch(()=>"");throw new Error(`addComment failed: ${C.status} ${M}`)}return C.json()}async function d(m,u){let l=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"PATCH",headers:{...a(u),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!l.ok){let y=await l.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${l.status} ${y}`)}return l.json()}async function h(m,u){let l=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"PATCH",headers:{...a(u),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!l.ok){let y=await l.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${l.status} ${y}`)}return l.json()}function p(m){var y,C,M;if(!m)return"";let u=new URLSearchParams;(y=m.status)==null||y.forEach(E=>u.append("status",E)),(C=m.type)==null||C.forEach(E=>u.append("type",E)),(M=m.severity)==null||M.forEach(E=>u.append("severity",E)),m.q&&u.set("q",m.q),m.mine&&u.set("mine","1"),m.ordering&&u.set("ordering",m.ordering),m.page&&m.page>1&&u.set("page",String(m.page));let l=u.toString();return l?`?${l}`:""}async function g(m,u){let l=await r(`${t}/api/feedback/v1/reports/widget/board/${p(u)}`,{method:"GET",headers:a(m)});if(l.status===404)return{count:0,next:null,previous:null,results:[]};if(!l.ok){let y=await l.text().catch(()=>"");throw new Error(`listBoard failed: ${l.status} ${y}`)}return l.json()}async function b(m,u){let l=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${p(u)}`,{method:"GET",headers:a(m)});if(l.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!l.ok){let y=await l.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${l.status} ${y}`)}return l.json()}async function x(m,u){let l=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...a(m),"Content-Type":"application/json"},body:JSON.stringify({external_id:m,...u?{email:u}:{}})});if(!l.ok)throw new Error(`checkVisibility failed: ${l.status}`);return!!(await l.json()).show}return{submitReport:n,checkVisibility:x,listMine:i,listChangelog:s,getReport:c,addComment:f,closeAsResolved:d,reopenUnresolved:h,listBoard:g,fetchBoardKpis:b}}var Yt=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Qt=[/^eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,/^(?:sk|pk)_proj_[A-Za-z0-9_-]{16,}$/,/^gh[pousr]_[A-Za-z0-9]{30,}$/,/^(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}$/,/^AKIA[0-9A-Z]{12,}$/,/^xox[abprso]-[A-Za-z0-9-]{12,}$/,/^[a-f0-9]{40,}$/i,/^[A-Za-z0-9_-]{40,}$/];function er(e){return Qt.some(t=>t.test(e))}function Y(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let n=typeof window!="undefined"?window.location.origin:"http://localhost",a=new URL(e,n),i=new URLSearchParams;return a.searchParams.forEach((s,c)=>{Yt.test(c)||er(s)?i.set(c,"[redacted]"):i.set(c,s)}),a.search=i.toString(),a.hash=a.hash?"#[redacted]":"",a.toString()}catch(t){return e}}var tr=[/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,/\bBearer\s+[A-Za-z0-9._~+/=-]{16,}\b/g,/\bAuthorization\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{16,}["']?/gi,/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,/\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\b/g,/\bAKIA[0-9A-Z]{12,}\b/g,/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,/\bAIza[0-9A-Za-z_-]{35}\b/g,/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,/\bAC[a-f0-9]{32}\b/g,/\bSK[a-f0-9]{32}\b/g];function j(e){let t=e;for(let r of tr)t=t.replace(r,"[redacted-token]");return t}function He(){var c;let e=navigator,t=(c=e.connection)==null?void 0:c.effectiveType,r=e.deviceMemory,n=document.referrer||void 0,a=n!==void 0?Y(n):void 0,i=Y(window.location.pathname+window.location.search),s;try{let f=new URL(i,window.location.origin);s=f.pathname+f.search}catch(f){s=window.location.pathname}return{viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},platform:e.platform,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),...t!==void 0&&{connection:t},online:e.onLine,...r!==void 0&&{deviceMemory:r},hardwareConcurrency:e.hardwareConcurrency,...a!==void 0&&{referrer:a},title:j(document.title||"").slice(0,200),pathname:s}}function rr(e){if(e==null)return String(e);if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(e instanceof Error)return`${e.name}: ${e.message}`;if(e instanceof Element)return`<${e.tagName.toLowerCase()}>`;try{return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)}catch(t){try{return String(e)}catch(r){return"[unserializable]"}}}function Ne(e){let t=["log","info","warn","error","debug"],r={};for(let n of t){let a=console[n];typeof a=="function"&&(r[n]=a,console[n]=function(...s){try{let c=s.map(rr).join(" "),f=j(c).slice(0,2e3),d={level:n,message:f,ts:Date.now()};if(n==="error"){let h=new Error().stack;h&&(d.stack=h.split(`
|
|
2
2
|
`).slice(2,8).join(`
|
|
3
|
-
`))}e.push(c)}catch(l){}a.apply(console,s)})}return()=>{for(let[n,a]of Object.entries(r))console[n]=a}}function Ue(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(a,i){let s=performance.now(),l=typeof a=="string"?a:a instanceof URL?a.toString():a.url,f=((i==null?void 0:i.method)||(a instanceof Request?a.method:"GET")).toUpperCase();try{let c=await r(a,i);return e.push({url:t(l),method:f,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let h=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:f,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:j(h)}),c}},()=>{window.fetch=r}}function je(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,n=r.prototype.open,a=r.prototype.send;return r.prototype.open=function(s,l){return this.__mfb={method:s.toUpperCase(),url:typeof l=="string"?l:l.toString(),start:performance.now()},n.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let l=this.__mfb;if(!l)return;e.push({url:t(l.url),method:l.method,status:this.status,durationMs:Math.round(performance.now()-l.start),ts:Date.now()})}catch(l){}}),a.call(this,s!=null?s:null)},()=>{r.prototype.open=n,r.prototype.send=a}}function Oe(e){if(typeof window=="undefined")return()=>{};let t=n=>{let a=n.error instanceof Error?n.error.stack:void 0,i=a!==void 0?j(a):void 0;e.push({message:j(n.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=n=>{let a=n.reason,i=a instanceof Error?a.message:typeof a=="string"?a:(()=>{try{return JSON.stringify(a)}catch(f){return String(a)}})(),s=a instanceof Error?a.stack:void 0,l=s!==void 0?j(s):void 0;e.push({message:j(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function Ve(e=1e3){let t=[],r=[],n=null;if(typeof PerformanceObserver!="undefined")try{n=new PerformanceObserver(a=>{for(let i of a.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:Y(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),n.observe({entryTypes:["longtask","resource"]})}catch(a){}return{snapshot(){let a=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=a?{type:a.type,duration:a.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){n==null||n.disconnect()}}}var ee=class{constructor(t){Se(this,"max",t);Se(this,"items",[])}push(t){for(this.items.push(t);this.items.length>this.max;)this.items.shift()}snapshot(){return this.items.slice()}clear(){this.items.length=0}};function qe(e={}){var b;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:n=20}=e,a=(b=e.sanitizeUrl)!=null?b:Y,i=new ee(t),s=new ee(r),l=new ee(n),f=Ne(i),c=Ue(s,a),h=je(s,a),d=Oe(l),g=Ve();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:He(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){f(),c(),h(),d(),g.dispose()}}}var Qt={"fab.label":"Send feedback","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.context.label":"Page","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports. Try again.","board.list.you":"you","board.list.count":"{n} of {total}","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},er={"fab.label":"Envoyer un commentaire","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.context.label":"Page","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports. R\xE9essayez.","board.list.you":"vous","board.list.count":"{n} sur {total}","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},tr={fr:er};function rr(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=tr[t])!=null?r:null}function Ge(e,t={}){var n;let r=(n=rr(t.locale))!=null?n:{};return{...Qt,...r,...e}}var be,z,Qe,or,X,Xe,et,tt,Re,ce,ae,rt,Te,Ce,Ee,nr,ue={},fe=[],ar=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,he=Array.isArray;function G(e,t){for(var r in t)e[r]=t[r];return e}function Pe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ze(e,t,r){var n,a,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?be.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return de(e,s,n,a,null)}function de(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a==null?++Qe:a,__i:-1,__u:0};return a==null&&z.vnode!=null&&z.vnode(i),i}function U(e){return e.children}function pe(e,t){this.props=e,this.context=t}function te(e,t){if(t==null)return e.__?te(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?te(e):null}function ir(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],a=[],i=G({},t);i.__v=t.__v+1,z.vnode&&z.vnode(i),Ae(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,n,r==null?te(t):r,!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,it(n,i,a),t.__e=t.__=null,i.__e!=r&&ot(i)}}function ot(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ot(e)}function Ze(e){(!e.__d&&(e.__d=!0)&&X.push(e)&&!me.__r++||Xe!=z.debounceRendering)&&((Xe=z.debounceRendering)||et)(me)}function me(){try{for(var e,t=1;X.length;)X.length>t&&X.sort(tt),e=X.shift(),t=X.length,ir(e)}finally{X.length=me.__r=0}}function nt(e,t,r,n,a,i,s,l,f,c,h){var d,g,b,x,_,y,p,u=n&&n.__k||fe,m=t.length;for(f=sr(r,t,u,f,m),d=0;d<m;d++)(b=r.__k[d])!=null&&(g=b.__i!=-1&&u[b.__i]||ue,b.__i=d,y=Ae(e,b,g,a,i,s,l,f,c,h),x=b.__e,b.ref&&g.ref!=b.ref&&(g.ref&&Be(g.ref,null,b),h.push(b.ref,b.__c||x,b)),_==null&&x!=null&&(_=x),(p=!!(4&b.__u))||g.__k===b.__k?(f=at(b,f,e,p),p&&g.__e&&(g.__e=null)):typeof b.type=="function"&&y!==void 0?f=y:x&&(f=x.nextSibling),b.__u&=-7);return r.__e=_,f}function sr(e,t,r,n,a){var i,s,l,f,c,h=r.length,d=h,g=0;for(e.__k=new Array(a),i=0;i<a;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=de(null,s,null,null,null):he(s)?s=e.__k[i]=de(U,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=de(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,f=i+g,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=lr(s,r,f,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(a>h?g--:a<h&&g++),typeof s.type!="function"&&(s.__u|=4)):c!=f&&(c==f-1?g--:c==f+1?g++:(c>f?g--:g++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<h;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==n&&(n=te(l)),lt(l,l));return n}function at(e,t,r,n){var a,i;if(typeof e.type=="function"){for(a=e.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=e,t=at(a[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=te(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function lr(e,t,r,n){var a,i,s,l=e.key,f=e.type,c=t[r],h=c!=null&&(2&c.__u)==0;if(c===null&&l==null||h&&l==c.key&&f==c.type)return r;if(n>(h?1:0)){for(a=r-1,i=r+1;a>=0||i<t.length;)if((c=t[s=a>=0?a--:i++])!=null&&(2&c.__u)==0&&l==c.key&&f==c.type)return s}return-1}function Ye(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||ar.test(t)?r:r+"px"}function le(e,t,r,n,a){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ye(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Ye(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(rt,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[ae]=n[ae]:(r[ae]=Te,e.addEventListener(t,i?Ee:Ce,i)):e.removeEventListener(t,i?Ee:Ce,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(l){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Je(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[ce]==null)t[ce]=Te++;else if(t[ce]<r[ae])return;return r(z.event?z.event(t):t)}}}function Ae(e,t,r,n,a,i,s,l,f,c){var h,d,g,b,x,_,y,p,u,m,w,C,B,T,F,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),i=[l=t.__e=r.__e]),(h=z.__b)&&h(t);e:if(typeof P=="function")try{if(p=t.props,u=P.prototype&&P.prototype.render,m=(h=P.contextType)&&n[h.__c],w=h?m?m.props.value:h.__:n,r.__c?y=(d=t.__c=r.__c).__=d.__E:(u?t.__c=d=new P(p,w):(t.__c=d=new pe(p,w),d.constructor=P,d.render=dr),m&&m.sub(d),d.state||(d.state={}),d.__n=n,g=d.__d=!0,d.__h=[],d._sb=[]),u&&d.__s==null&&(d.__s=d.state),u&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=G({},d.__s)),G(d.__s,P.getDerivedStateFromProps(p,d.__s))),b=d.props,x=d.state,d.__v=t,g)u&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),u&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(u&&P.getDerivedStateFromProps==null&&p!==b&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(p,w),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(p,d.__s,w)===!1){t.__v!=r.__v&&(d.props=p,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(W){W&&(W.__=t)}),fe.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(p,d.__s,w),u&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(b,x,_)})}if(d.context=w,d.props=p,d.__P=e,d.__e=!1,C=z.__r,B=0,u)d.state=d.__s,d.__d=!1,C&&C(t),h=d.render(d.props,d.state,d.context),fe.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,C&&C(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++B<25);d.state=d.__s,d.getChildContext!=null&&(n=G(G({},n),d.getChildContext())),u&&!g&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(b,x)),T=h!=null&&h.type===U&&h.key==null?st(h.props.children):h,l=nt(e,he(T)?T:[T],t,r,n,a,i,s,l,f,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),y&&(d.__E=d.__=null)}catch(W){if(t.__v=null,f||i!=null)if(W.then){for(t.__u|=f?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(F=i.length;F--;)Pe(i[F]);Me(t)}else t.__e=r.__e,t.__k=r.__k,W.then||Me(t);z.__e(W,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=cr(r.__e,t,r,n,a,i,s,f,c);return(h=z.diffed)&&h(t),128&t.__u?void 0:l}function Me(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Me))}function it(e,t,r){for(var n=0;n<r.length;n++)Be(r[n],r[++n],r[++n]);z.__c&&z.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){z.__e(i,a.__v)}})}function st(e){return typeof e!="object"||e==null||e.__b>0?e:he(e)?e.map(st):G({},e)}function cr(e,t,r,n,a,i,s,l,f){var c,h,d,g,b,x,_,y=r.props||ue,p=t.props,u=t.type;if(u=="svg"?a="http://www.w3.org/2000/svg":u=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((b=i[c])&&"setAttribute"in b==!!u&&(u?b.localName==u:b.nodeType==3)){e=b,i[c]=null;break}}if(e==null){if(u==null)return document.createTextNode(p);e=document.createElementNS(a,u,p.is&&p),l&&(z.__m&&z.__m(t,i),l=!1),i=null}if(u==null)y===p||l&&e.data==p||(e.data=p);else{if(i=i&&be.call(e.childNodes),!l&&i!=null)for(y={},c=0;c<e.attributes.length;c++)y[(b=e.attributes[c]).name]=b.value;for(c in y)b=y[c],c=="dangerouslySetInnerHTML"?d=b:c=="children"||c in p||c=="value"&&"defaultValue"in p||c=="checked"&&"defaultChecked"in p||le(e,c,null,b,a);for(c in p)b=p[c],c=="children"?g=b:c=="dangerouslySetInnerHTML"?h=b:c=="value"?x=b:c=="checked"?_=b:l&&typeof b!="function"||y[c]===b||le(e,c,b,y[c],a);if(h)l||d&&(h.__html==d.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),nt(t.type=="template"?e.content:e,he(g)?g:[g],t,r,n,u=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:r.__k&&te(r,0),l,f),i!=null)for(c=i.length;c--;)Pe(i[c]);l||(c="value",u=="progress"&&x==null?e.removeAttribute("value"):x!=null&&(x!==e[c]||u=="progress"&&!x||u=="option"&&x!=y[c])&&le(e,c,x,y[c],a),c="checked",_!=null&&_!=e[c]&&le(e,c,_,y[c],a))}return e}function Be(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(a){z.__e(a,r)}}function lt(e,t,r){var n,a;if(z.unmount&&z.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Be(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){z.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&<(n[a],t,r||typeof e.type!="function");r||Pe(e.__e),e.__c=e.__=e.__e=void 0}function dr(e,t,r){return this.constructor(e,r)}function Fe(e,t,r){var n,a,i,s;t==document&&(t=document.documentElement),z.__&&z.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Ae(t,e=(!n&&r||t).__k=ze(U,null,[e]),a||ue,ue,t.namespaceURI,!n&&r?[r]:a?null:t.firstChild?be.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,s),it(i,e,s)}be=fe.slice,z={__e:function(e,t,r,n){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),s=a.__d),s)return a.__E=a}catch(l){e=l}throw e}},Qe=0,or=function(e){return e!=null&&e.constructor===void 0},pe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=G({},this.state),typeof e=="function"&&(e=e(G({},r),this.props)),e&&G(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ze(this))},pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ze(this))},pe.prototype.render=U,X=[],et=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tt=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,Re=Math.random().toString(8),ce="__d"+Re,ae="__a"+Re,rt=/(PointerCapture)$|Capture$/i,Te=0,Ce=Je(!1),Ee=Je(!0),nr=0;var re,L,Le,ct,ie=0,gt=[],$=z,dt=$.__b,pt=$.__r,ut=$.diffed,ft=$.__c,mt=$.unmount,bt=$.__;function ve(e,t){$.__h&&$.__h(L,e,ie||t),ie=0;var r=L.__H||(L.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function R(e){return ie=1,pr(yt,e)}function pr(e,t,r){var n=ve(re++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):yt(void 0,t),function(l){var f=n.__N?n.__N[0]:n.__[0],c=n.t(f,l);f!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=L,!L.__f)){var a=function(l,f,c){if(!n.__c.__H)return!0;var h=n.__c.__H.__.filter(function(g){return g.__c});if(h.every(function(g){return!g.__N}))return!i||i.call(this,l,f,c);var d=n.__c.props!==l;return h.some(function(g){if(g.__N){var b=g.__[0];g.__=g.__N,g.__N=void 0,b!==g.__[0]&&(d=!0)}}),i&&i.call(this,l,f,c)||d};L.__f=!0;var i=L.shouldComponentUpdate,s=L.componentWillUpdate;L.componentWillUpdate=function(l,f,c){if(this.__e){var h=i;i=void 0,a(l,f,c),i=h}s&&s.call(this,l,f,c)},L.shouldComponentUpdate=a}return n.__N||n.__}function D(e,t){var r=ve(re++,3);!$.__s&&De(r.__H,t)&&(r.__=e,r.u=t,L.__H.__h.push(r))}function $e(e,t){var r=ve(re++,4);!$.__s&&De(r.__H,t)&&(r.__=e,r.u=t,L.__h.push(r))}function K(e){return ie=5,J(function(){return{current:e}},[])}function J(e,t){var r=ve(re++,7);return De(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function vt(e,t){return ie=8,J(function(){return e},t)}function ur(){for(var e;e=gt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ge),t.__h.some(Ie),t.__h=[]}catch(r){t.__h=[],$.__e(r,e.__v)}}}$.__b=function(e){L=null,dt&&dt(e)},$.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),bt&&bt(e,t)},$.__r=function(e){pt&&pt(e),re=0;var t=(L=e.__c).__H;t&&(Le===L?(t.__h=[],L.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(ge),t.__h.some(Ie),t.__h=[],re=0)),Le=L},$.diffed=function(e){ut&&ut(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(gt.push(t)!==1&&ct===$.requestAnimationFrame||((ct=$.requestAnimationFrame)||fr)(ur)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Le=L=null},$.__c=function(e,t){t.some(function(r){try{r.__h.some(ge),r.__h=r.__h.filter(function(n){return!n.__||Ie(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],$.__e(n,r.__v)}}),ft&&ft(e,t)},$.unmount=function(e){mt&&mt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{ge(n)}catch(a){t=a}}),r.__H=void 0,t&&$.__e(t,r.__v))};var ht=typeof requestAnimationFrame=="function";function fr(e){var t,r=function(){clearTimeout(n),ht&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);ht&&(t=requestAnimationFrame(r))}function ge(e){var t=L,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),L=t}function Ie(e){var t=L;e.__c=e.__(),L=t}function De(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function yt(e,t){return typeof t=="function"?t(e):t}var mr=0;function o(e,t,r,n,a,i){t||(t={});var s,l,f=t;if("ref"in f)for(l in f={},t)l=="ref"?s=t[l]:f[l]=t[l];var c={type:e,props:f,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--mr,__i:-1,__u:0,__source:a,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)f[l]===void 0&&(f[l]=s[l]);return z.vnode&&z.vnode(c),c}function _t({comment:e,strings:t}){let r=e.is_mine,n=!r&&e.author_source==="mcp",a=!r&&e.author_source==="system",i=n?"mcp":a?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",l=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&l&&o("div",{class:`comment-author comment-author--${i}`,children:l}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:br(e.created_at)})]})}function br(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var hr=["image/png","image/jpeg","image/webp"];function xt(e){return hr.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function oe(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),n=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-n)}`}function We(e){if(!e)return;let t;try{t=new URL(e)}catch(r){return}if(t.protocol==="https:"||t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]"))return t.toString()}var gr=3e4;function ye({api:e,externalId:t,reportId:r,strings:n,onBack:a,canModerate:i=!0,variant:s="modal"}){var F,P,W;let[l,f]=R(null),[c,h]=R(null),[d,g]=R(""),[b,x]=R(!1),[_,y]=R(!1),p=K(!0),u=async()=>{try{let A=await e.getReport(r,t);if(!p.current)return;f(A),h(null)}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",A),!p.current)return;h("load_failed")}};D(()=>{p.current=!0,u();let A=setInterval(()=>{u()},gr);return()=>{p.current=!1,clearInterval(A)}},[r,t]);let m=async()=>{if(!(!d.trim()||b)){x(!0);try{let A=`${r}:${Date.now()}`,O=await e.addComment(r,t,d.trim(),A);if(!p.current)return;g(""),f(N=>N&&{...N,comments:vr(N.comments,O)}),u()}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",A),!p.current)return;h(n["detail.send_failed"])}finally{p.current&&x(!1)}}},w=async()=>{if(!_){y(!0);try{let A=await e.closeAsResolved(r,t);if(!p.current)return;f(A)}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",A),!p.current)return;h(n["detail.close_failed"])}finally{p.current&&y(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:n["mine.loading"]});if(!l)return o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:n["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:n["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.load_failed.cta"]]})]});let C=(F=l.is_mine)!=null?F:i,B=C&&l.status==="awaiting_validation",T=C;return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(P=n[`status.${l.status}`])!=null?P:l.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:a,"aria-label":n["board.back"],children:["\u2190 ",n["board.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(W=n[`status.${l.status}`])!=null?W:l.status})]}),o("div",{class:"report-detail-body",children:[o(yr,{detail:l,strings:n}),o("p",{class:"report-detail-description",children:l.description}),l.screenshot_url&&(()=>{let A=We(l.screenshot_url);return A?o("a",{class:"report-detail-screenshot",href:A,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})})})(),o("h3",{class:"report-detail-section",children:n["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:n["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(A=>o("li",{children:o(_t,{comment:A,strings:n})}))}),l.status_history&&l.status_history.length>0&&o(Mr,{rows:l.status_history,strings:n}),l.technical_context&&o(wr,{ctx:l.technical_context,strings:n}),T?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:n["detail.compose_placeholder"],onInput:A=>g(A.target.value),disabled:b}),o("div",{class:"report-compose-actions",children:[B&&o("button",{type:"button",class:"btn",onClick:w,disabled:_,children:_?n["detail.close_busy"]:n["detail.close_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:m,disabled:!d.trim()||b,children:b?n["detail.compose_sending"]:n["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:n["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}function vr(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function yr({detail:e,strings:t}){var a;let r=`detail.context.capture.${e.capture_method}`,n=(a=t[r])!=null?a:e.capture_method;return o("div",{class:"report-detail-context",children:[o("div",{class:"report-detail-context-pills",children:[o("span",{class:"pill pill-type",children:t[`type.${e.feedback_type}`]}),o("span",{class:`pill pill-severity pill-severity--${e.severity}`,children:t[`severity.${e.severity}`]}),o("span",{class:"pill pill-capture",children:n})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:wt(e.created_at)})]}),e.page_url&&(()=>{let i=We(e.page_url);return o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),i?o("a",{class:"report-detail-context-url",href:i,target:"_blank",rel:"noopener noreferrer",children:oe(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:oe(e.page_url,64)})]})})()]})}function wt(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var _r=20,xr=15;function wr({ctx:e,strings:t}){var c,h,d;let r=(c=e.errors)!=null?c:[],n=((h=e.consoleLogs)!=null?h:[]).slice(-_r),a=((d=e.networkRequests)!=null?d:[]).slice(-xr),i=e.device;if(!(!!i||r.length>0||n.length>0||a.length>0))return null;let l=r.length,f=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:f}),o("div",{class:"tech-body",children:[i&&o(kr,{device:i,strings:t}),r.length>0&&o(Sr,{errors:r,strings:t}),n.length>0&&o(Rr,{logs:n,strings:t}),a.length>0&&o(Cr,{rows:a,strings:t})]})]})}function kr({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let n=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${n}`})}return e!=null&&e.platform&&r.push({label:t["detail.tech.device.platform"],value:e.platform}),e!=null&&e.language&&r.push({label:t["detail.tech.device.language"],value:e.language}),e!=null&&e.timezone&&r.push({label:t["detail.tech.device.timezone"],value:e.timezone}),e!=null&&e.connection&&r.push({label:t["detail.tech.device.connection"],value:e.connection}),r.length===0?null:o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.device"]}),o("dl",{class:"tech-device",children:r.map(n=>o(U,{children:[o("dt",{children:n.label}),o("dd",{children:n.value})]}))})]})}function Sr({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:Er(r.stack)})]}))})]})}function Rr({logs:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.console"]}),o("ul",{class:"tech-console",children:e.map(r=>o("li",{class:`tech-console-row tech-console-row--${r.level}`,children:[o("span",{class:"tech-console-level",children:r.level}),o("span",{class:"tech-console-msg",children:r.message})]}))})]})}function Cr({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let n=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${n?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:oe(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Er(e){let t=e.split(`
|
|
3
|
+
`))}e.push(d)}catch(c){}a.apply(console,s)})}return()=>{for(let[n,a]of Object.entries(r))console[n]=a}}function Ue(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(a,i){let s=performance.now(),c=typeof a=="string"?a:a instanceof URL?a.toString():a.url,f=((i==null?void 0:i.method)||(a instanceof Request?a.method:"GET")).toUpperCase();try{let d=await r(a,i);return e.push({url:t(c),method:f,status:d.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),d}catch(d){let h=d instanceof Error?d.message:String(d);throw e.push({url:t(c),method:f,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:j(h)}),d}},()=>{window.fetch=r}}function je(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,n=r.prototype.open,a=r.prototype.send;return r.prototype.open=function(s,c){return this.__mfb={method:s.toUpperCase(),url:typeof c=="string"?c:c.toString(),start:performance.now()},n.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let c=this.__mfb;if(!c)return;e.push({url:t(c.url),method:c.method,status:this.status,durationMs:Math.round(performance.now()-c.start),ts:Date.now()})}catch(c){}}),a.call(this,s!=null?s:null)},()=>{r.prototype.open=n,r.prototype.send=a}}function Oe(e){if(typeof window=="undefined")return()=>{};let t=n=>{let a=n.error instanceof Error?n.error.stack:void 0,i=a!==void 0?j(a):void 0;e.push({message:j(n.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=n=>{let a=n.reason,i=a instanceof Error?a.message:typeof a=="string"?a:(()=>{try{return JSON.stringify(a)}catch(f){return String(a)}})(),s=a instanceof Error?a.stack:void 0,c=s!==void 0?j(s):void 0;e.push({message:j(i),...c!==void 0&&{stack:c},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function Ve(e=1e3){let t=[],r=[],n=null;if(typeof PerformanceObserver!="undefined")try{n=new PerformanceObserver(a=>{for(let i of a.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:Y(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),n.observe({entryTypes:["longtask","resource"]})}catch(a){}return{snapshot(){let a=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=a?{type:a.type,duration:a.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){n==null||n.disconnect()}}}var te=class{constructor(t){Se(this,"max",t);Se(this,"items",[])}push(t){for(this.items.push(t);this.items.length>this.max;)this.items.shift()}snapshot(){return this.items.slice()}clear(){this.items.length=0}};function qe(e={}){var b;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:n=20}=e,a=(b=e.sanitizeUrl)!=null?b:Y,i=new te(t),s=new te(r),c=new te(n),f=Ne(i),d=Ue(s,a),h=je(s,a),p=Oe(c),g=Ve();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:c.snapshot(),device:He(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),c.clear()},dispose(){f(),d(),h(),p(),g.dispose()}}}var or={"fab.label":"Send feedback","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.context.label":"Page","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports.","board.retry":"Try again","board.list.you":"you","board.list.count":"{n} of {total}","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.reopen_failed":"Couldn\u2019t reopen the report. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},nr={"fab.label":"Envoyer un commentaire","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.context.label":"Page","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports.","board.retry":"R\xE9essayer","board.list.you":"vous","board.list.count":"{n} sur {total}","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.reopen_failed":"Impossible de rouvrir le rapport. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},ar={fr:nr};function ir(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=ar[t])!=null?r:null}function Ge(e,t={}){var n;let r=(n=ir(t.locale))!=null?n:{};return{...or,...r,...e}}var be,F,Qe,sr,Z,Xe,et,tt,Re,ce,ae,rt,Me,Ce,Ee,lr,ue={},fe=[],cr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,he=Array.isArray;function J(e,t){for(var r in t)e[r]=t[r];return e}function Pe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ze(e,t,r){var n,a,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?be.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return de(e,s,n,a,null)}function de(e,t,r,n,a){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a==null?++Qe:a,__i:-1,__u:0};return a==null&&F.vnode!=null&&F.vnode(i),i}function N(e){return e.children}function pe(e,t){this.props=e,this.context=t}function re(e,t){if(t==null)return e.__?re(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?re(e):null}function dr(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,n=[],a=[],i=J({},t);i.__v=t.__v+1,F.vnode&&F.vnode(i),Be(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,n,r==null?re(t):r,!!(32&t.__u),a),i.__v=t.__v,i.__.__k[i.__i]=i,it(n,i,a),t.__e=t.__=null,i.__e!=r&&ot(i)}}function ot(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),ot(e)}function Je(e){(!e.__d&&(e.__d=!0)&&Z.push(e)&&!me.__r++||Xe!=F.debounceRendering)&&((Xe=F.debounceRendering)||et)(me)}function me(){try{for(var e,t=1;Z.length;)Z.length>t&&Z.sort(tt),e=Z.shift(),t=Z.length,dr(e)}finally{Z.length=me.__r=0}}function nt(e,t,r,n,a,i,s,c,f,d,h){var p,g,b,x,_,w,m,u=n&&n.__k||fe,l=t.length;for(f=pr(r,t,u,f,l),p=0;p<l;p++)(b=r.__k[p])!=null&&(g=b.__i!=-1&&u[b.__i]||ue,b.__i=p,w=Be(e,b,g,a,i,s,c,f,d,h),x=b.__e,b.ref&&g.ref!=b.ref&&(g.ref&&Fe(g.ref,null,b),h.push(b.ref,b.__c||x,b)),_==null&&x!=null&&(_=x),(m=!!(4&b.__u))||g.__k===b.__k?(f=at(b,f,e,m),m&&g.__e&&(g.__e=null)):typeof b.type=="function"&&w!==void 0?f=w:x&&(f=x.nextSibling),b.__u&=-7);return r.__e=_,f}function pr(e,t,r,n,a){var i,s,c,f,d,h=r.length,p=h,g=0;for(e.__k=new Array(a),i=0;i<a;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=de(null,s,null,null,null):he(s)?s=e.__k[i]=de(N,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=de(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,f=i+g,s.__=e,s.__b=e.__b+1,c=null,(d=s.__i=ur(s,r,f,p))!=-1&&(p--,(c=r[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(a>h?g--:a<h&&g++),typeof s.type!="function"&&(s.__u|=4)):d!=f&&(d==f-1?g--:d==f+1?g++:(d>f?g--:g++,s.__u|=4))):e.__k[i]=null;if(p)for(i=0;i<h;i++)(c=r[i])!=null&&(2&c.__u)==0&&(c.__e==n&&(n=re(c)),lt(c,c));return n}function at(e,t,r,n){var a,i;if(typeof e.type=="function"){for(a=e.__k,i=0;a&&i<a.length;i++)a[i]&&(a[i].__=e,t=at(a[i],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=re(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ur(e,t,r,n){var a,i,s,c=e.key,f=e.type,d=t[r],h=d!=null&&(2&d.__u)==0;if(d===null&&c==null||h&&c==d.key&&f==d.type)return r;if(n>(h?1:0)){for(a=r-1,i=r+1;a>=0||i<t.length;)if((d=t[s=a>=0?a--:i++])!=null&&(2&d.__u)==0&&c==d.key&&f==d.type)return s}return-1}function Ze(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||cr.test(t)?r:r+"px"}function le(e,t,r,n,a){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ze(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||Ze(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(rt,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r[ae]=n[ae]:(r[ae]=Me,e.addEventListener(t,i?Ee:Ce,i)):e.removeEventListener(t,i?Ee:Ce,i);else{if(a=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(c){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Ye(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[ce]==null)t[ce]=Me++;else if(t[ce]<r[ae])return;return r(F.event?F.event(t):t)}}}function Be(e,t,r,n,a,i,s,c,f,d){var h,p,g,b,x,_,w,m,u,l,y,C,M,E,L,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),i=[c=t.__e=r.__e]),(h=F.__b)&&h(t);e:if(typeof P=="function")try{if(m=t.props,u=P.prototype&&P.prototype.render,l=(h=P.contextType)&&n[h.__c],y=h?l?l.props.value:h.__:n,r.__c?w=(p=t.__c=r.__c).__=p.__E:(u?t.__c=p=new P(m,y):(t.__c=p=new pe(m,y),p.constructor=P,p.render=mr),l&&l.sub(p),p.state||(p.state={}),p.__n=n,g=p.__d=!0,p.__h=[],p._sb=[]),u&&p.__s==null&&(p.__s=p.state),u&&P.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=J({},p.__s)),J(p.__s,P.getDerivedStateFromProps(m,p.__s))),b=p.props,x=p.state,p.__v=t,g)u&&P.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),u&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(u&&P.getDerivedStateFromProps==null&&m!==b&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(m,y),t.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(m,p.__s,y)===!1){t.__v!=r.__v&&(p.props=m,p.state=p.__s,p.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(A){A&&(A.__=t)}),fe.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(m,p.__s,y),u&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(b,x,_)})}if(p.context=y,p.props=m,p.__P=e,p.__e=!1,C=F.__r,M=0,u)p.state=p.__s,p.__d=!1,C&&C(t),h=p.render(p.props,p.state,p.context),fe.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,C&&C(t),h=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++M<25);p.state=p.__s,p.getChildContext!=null&&(n=J(J({},n),p.getChildContext())),u&&!g&&p.getSnapshotBeforeUpdate!=null&&(_=p.getSnapshotBeforeUpdate(b,x)),E=h!=null&&h.type===N&&h.key==null?st(h.props.children):h,c=nt(e,he(E)?E:[E],t,r,n,a,i,s,c,f,d),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),w&&(p.__E=p.__=null)}catch(A){if(t.__v=null,f||i!=null)if(A.then){for(t.__u|=f?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;i[i.indexOf(c)]=null,t.__e=c}else{for(L=i.length;L--;)Pe(i[L]);Te(t)}else t.__e=r.__e,t.__k=r.__k,A.then||Te(t);F.__e(A,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):c=t.__e=fr(r.__e,t,r,n,a,i,s,f,d);return(h=F.diffed)&&h(t),128&t.__u?void 0:c}function Te(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Te))}function it(e,t,r){for(var n=0;n<r.length;n++)Fe(r[n],r[++n],r[++n]);F.__c&&F.__c(t,e),e.some(function(a){try{e=a.__h,a.__h=[],e.some(function(i){i.call(a)})}catch(i){F.__e(i,a.__v)}})}function st(e){return typeof e!="object"||e==null||e.__b>0?e:he(e)?e.map(st):J({},e)}function fr(e,t,r,n,a,i,s,c,f){var d,h,p,g,b,x,_,w=r.props||ue,m=t.props,u=t.type;if(u=="svg"?a="http://www.w3.org/2000/svg":u=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((b=i[d])&&"setAttribute"in b==!!u&&(u?b.localName==u:b.nodeType==3)){e=b,i[d]=null;break}}if(e==null){if(u==null)return document.createTextNode(m);e=document.createElementNS(a,u,m.is&&m),c&&(F.__m&&F.__m(t,i),c=!1),i=null}if(u==null)w===m||c&&e.data==m||(e.data=m);else{if(i=i&&be.call(e.childNodes),!c&&i!=null)for(w={},d=0;d<e.attributes.length;d++)w[(b=e.attributes[d]).name]=b.value;for(d in w)b=w[d],d=="dangerouslySetInnerHTML"?p=b:d=="children"||d in m||d=="value"&&"defaultValue"in m||d=="checked"&&"defaultChecked"in m||le(e,d,null,b,a);for(d in m)b=m[d],d=="children"?g=b:d=="dangerouslySetInnerHTML"?h=b:d=="value"?x=b:d=="checked"?_=b:c&&typeof b!="function"||w[d]===b||le(e,d,b,w[d],a);if(h)c||p&&(h.__html==p.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(p&&(e.innerHTML=""),nt(t.type=="template"?e.content:e,he(g)?g:[g],t,r,n,u=="foreignObject"?"http://www.w3.org/1999/xhtml":a,i,s,i?i[0]:r.__k&&re(r,0),c,f),i!=null)for(d=i.length;d--;)Pe(i[d]);c||(d="value",u=="progress"&&x==null?e.removeAttribute("value"):x!=null&&(x!==e[d]||u=="progress"&&!x||u=="option"&&x!=w[d])&&le(e,d,x,w[d],a),d="checked",_!=null&&_!=e[d]&&le(e,d,_,w[d],a))}return e}function Fe(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(a){F.__e(a,r)}}function lt(e,t,r){var n,a;if(F.unmount&&F.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Fe(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){F.__e(i,t)}n.base=n.__P=null}if(n=e.__k)for(a=0;a<n.length;a++)n[a]&<(n[a],t,r||typeof e.type!="function");r||Pe(e.__e),e.__c=e.__=e.__e=void 0}function mr(e,t,r){return this.constructor(e,r)}function Ae(e,t,r){var n,a,i,s;t==document&&(t=document.documentElement),F.__&&F.__(e,t),a=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Be(t,e=(!n&&r||t).__k=ze(N,null,[e]),a||ue,ue,t.namespaceURI,!n&&r?[r]:a?null:t.firstChild?be.call(t.childNodes):null,i,!n&&r?r:a?a.__e:t.firstChild,n,s),it(i,e,s)}be=fe.slice,F={__e:function(e,t,r,n){for(var a,i,s;t=t.__;)if((a=t.__c)&&!a.__)try{if((i=a.constructor)&&i.getDerivedStateFromError!=null&&(a.setState(i.getDerivedStateFromError(e)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(e,n||{}),s=a.__d),s)return a.__E=a}catch(c){e=c}throw e}},Qe=0,sr=function(e){return e!=null&&e.constructor===void 0},pe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=J({},this.state),typeof e=="function"&&(e=e(J({},r),this.props)),e&&J(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Je(this))},pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Je(this))},pe.prototype.render=N,Z=[],et=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tt=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,Re=Math.random().toString(8),ce="__d"+Re,ae="__a"+Re,rt=/(PointerCapture)$|Capture$/i,Me=0,Ce=Ye(!1),Ee=Ye(!0),lr=0;var oe,I,Le,ct,ie=0,gt=[],D=F,dt=D.__b,pt=D.__r,ut=D.diffed,ft=D.__c,mt=D.unmount,bt=D.__;function ve(e,t){D.__h&&D.__h(I,e,ie||t),ie=0;var r=I.__H||(I.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function R(e){return ie=1,br(yt,e)}function br(e,t,r){var n=ve(oe++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):yt(void 0,t),function(c){var f=n.__N?n.__N[0]:n.__[0],d=n.t(f,c);f!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=I,!I.__f)){var a=function(c,f,d){if(!n.__c.__H)return!0;var h=n.__c.__H.__.filter(function(g){return g.__c});if(h.every(function(g){return!g.__N}))return!i||i.call(this,c,f,d);var p=n.__c.props!==c;return h.some(function(g){if(g.__N){var b=g.__[0];g.__=g.__N,g.__N=void 0,b!==g.__[0]&&(p=!0)}}),i&&i.call(this,c,f,d)||p};I.__f=!0;var i=I.shouldComponentUpdate,s=I.componentWillUpdate;I.componentWillUpdate=function(c,f,d){if(this.__e){var h=i;i=void 0,a(c,f,d),i=h}s&&s.call(this,c,f,d)},I.shouldComponentUpdate=a}return n.__N||n.__}function K(e,t){var r=ve(oe++,3);!D.__s&&De(r.__H,t)&&(r.__=e,r.u=t,I.__H.__h.push(r))}function $e(e,t){var r=ve(oe++,4);!D.__s&&De(r.__H,t)&&(r.__=e,r.u=t,I.__h.push(r))}function W(e){return ie=5,Q(function(){return{current:e}},[])}function Q(e,t){var r=ve(oe++,7);return De(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function vt(e,t){return ie=8,Q(function(){return e},t)}function hr(){for(var e;e=gt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(ge),t.__h.some(Ie),t.__h=[]}catch(r){t.__h=[],D.__e(r,e.__v)}}}D.__b=function(e){I=null,dt&&dt(e)},D.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),bt&&bt(e,t)},D.__r=function(e){pt&&pt(e),oe=0;var t=(I=e.__c).__H;t&&(Le===I?(t.__h=[],I.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(ge),t.__h.some(Ie),t.__h=[],oe=0)),Le=I},D.diffed=function(e){ut&&ut(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(gt.push(t)!==1&&ct===D.requestAnimationFrame||((ct=D.requestAnimationFrame)||gr)(hr)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Le=I=null},D.__c=function(e,t){t.some(function(r){try{r.__h.some(ge),r.__h=r.__h.filter(function(n){return!n.__||Ie(n)})}catch(n){t.some(function(a){a.__h&&(a.__h=[])}),t=[],D.__e(n,r.__v)}}),ft&&ft(e,t)},D.unmount=function(e){mt&&mt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(n){try{ge(n)}catch(a){t=a}}),r.__H=void 0,t&&D.__e(t,r.__v))};var ht=typeof requestAnimationFrame=="function";function gr(e){var t,r=function(){clearTimeout(n),ht&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,35);ht&&(t=requestAnimationFrame(r))}function ge(e){var t=I,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),I=t}function Ie(e){var t=I;e.__c=e.__(),I=t}function De(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function yt(e,t){return typeof t=="function"?t(e):t}var _t="mhosaic.boardView.";function xt(e){try{let t=localStorage.getItem(_t+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function wt(e,t){try{localStorage.setItem(_t+e,JSON.stringify(t))}catch(r){}}var vr=0;function o(e,t,r,n,a,i){t||(t={});var s,c,f=t;if("ref"in f)for(c in f={},t)c=="ref"?s=t[c]:f[c]=t[c];var d={type:e,props:f,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vr,__i:-1,__u:0,__source:a,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(c in s)f[c]===void 0&&(f[c]=s[c]);return F.vnode&&F.vnode(d),d}function kt({comment:e,strings:t}){let r=e.is_mine,n=!r&&e.author_source==="mcp",a=!r&&e.author_source==="system",i=n?"mcp":a?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",c=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&c&&o("div",{class:`comment-author comment-author--${i}`,children:c}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:yr(e.created_at)})]})}function yr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var _r=["image/png","image/jpeg","image/webp"];function St(e){return _r.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function ne(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),n=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-n)}`}function Ke(e){if(!e)return;let t;try{t=new URL(e)}catch(r){return}if(t.protocol==="https:"||t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]"))return t.toString()}var xr=3e4;function ye({api:e,externalId:t,reportId:r,strings:n,onBack:a,canModerate:i=!0,variant:s="modal"}){var H,U,O;let[c,f]=R(null),[d,h]=R(null),[p,g]=R(""),[b,x]=R(!1),[_,w]=R(!1),[m,u]=R(!1),l=W(!0),y=async()=>{try{let T=await e.getReport(r,t);if(!l.current)return;f(T),h(null)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",T),!l.current)return;h("load_failed")}};K(()=>{l.current=!0,y();let T=setInterval(()=>{y()},xr);return()=>{l.current=!1,clearInterval(T)}},[r,t]);let C=async()=>{if(!(!p.trim()||b)){x(!0);try{let T=`${r}:${Date.now()}`,X=await e.addComment(r,t,p.trim(),T);if(!l.current)return;g(""),f(V=>V&&{...V,comments:wr(V.comments,X)}),y()}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",T),!l.current)return;h(n["detail.send_failed"])}finally{l.current&&x(!1)}}},M=async()=>{if(!(_||m)){w(!0);try{let T=await e.closeAsResolved(r,t);if(!l.current)return;f(T)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",T),!l.current)return;h(n["detail.close_failed"])}finally{l.current&&w(!1)}}},E=async()=>{if(!(_||m)){u(!0);try{let T=await e.reopenUnresolved(r,t);if(!l.current)return;f(T)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",T),!l.current)return;h(n["detail.reopen_failed"])}finally{l.current&&u(!1)}}};if(!c&&!d)return o("div",{class:"mine-loading",children:n["mine.loading"]});if(!c)return o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:n["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:n["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.load_failed.cta"]]})]});let L=(H=c.is_mine)!=null?H:i,P=L&&c.status==="awaiting_validation",A=L;return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:a,children:["\u2190 ",n["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${c.status}`,children:(U=n[`status.${c.status}`])!=null?U:c.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:a,"aria-label":n["board.back"],children:["\u2190 ",n["board.back"]]}),o("span",{class:`pill pill-status pill-status--${c.status}`,children:(O=n[`status.${c.status}`])!=null?O:c.status})]}),o("div",{class:"report-detail-body",children:[o(kr,{detail:c,strings:n}),o("p",{class:"report-detail-description",children:c.description}),c.screenshot_url&&(()=>{let T=Ke(c.screenshot_url);return T?o("a",{class:"report-detail-screenshot",href:T,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:c.screenshot_url,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:c.screenshot_url,alt:"",loading:"lazy"})})})(),o("h3",{class:"report-detail-section",children:n["detail.thread"]}),c.comments.length===0?o("p",{class:"report-detail-empty",children:n["detail.no_replies"]}):o("ul",{class:"report-comments",children:c.comments.map(T=>o("li",{children:o(kt,{comment:T,strings:n})}))}),c.status_history&&c.status_history.length>0&&o(Br,{rows:c.status_history,strings:n}),c.technical_context&&o(Cr,{ctx:c.technical_context,strings:n}),A?o("div",{class:"report-compose",children:[o("textarea",{value:p,placeholder:n["detail.compose_placeholder"],onInput:T=>g(T.target.value),disabled:b}),o("div",{class:"report-compose-actions",children:[P&&o("button",{type:"button",class:"btn",onClick:M,disabled:_||m,children:_?n["detail.close_busy"]:n["detail.close_cta"]}),P&&o("button",{type:"button",class:"btn btn--ghost",onClick:E,disabled:_||m,children:m?n["detail.reopen_busy"]:n["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:C,disabled:!p.trim()||b,children:b?n["detail.compose_sending"]:n["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:n["detail.teammate_notice"]}),d&&o("div",{class:"error",children:d})]})]})}function wr(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function kr({detail:e,strings:t}){var a;let r=`detail.context.capture.${e.capture_method}`,n=(a=t[r])!=null?a:e.capture_method;return o("div",{class:"report-detail-context",children:[o("div",{class:"report-detail-context-pills",children:[o("span",{class:"pill pill-type",children:t[`type.${e.feedback_type}`]}),o("span",{class:`pill pill-severity pill-severity--${e.severity}`,children:t[`severity.${e.severity}`]}),o("span",{class:"pill pill-capture",children:n})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:Rt(e.created_at)})]}),e.page_url&&(()=>{let i=Ke(e.page_url);return o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),i?o("a",{class:"report-detail-context-url",href:i,target:"_blank",rel:"noopener noreferrer",children:ne(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:ne(e.page_url,64)})]})})()]})}function Rt(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var Sr=20,Rr=15;function Cr({ctx:e,strings:t}){var d,h,p;let r=(d=e.errors)!=null?d:[],n=((h=e.consoleLogs)!=null?h:[]).slice(-Sr),a=((p=e.networkRequests)!=null?p:[]).slice(-Rr),i=e.device;if(!(!!i||r.length>0||n.length>0||a.length>0))return null;let c=r.length,f=c>0?`${t["detail.tech.title"]} \xB7 ${c} ${c===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:f}),o("div",{class:"tech-body",children:[i&&o(Er,{device:i,strings:t}),r.length>0&&o(Tr,{errors:r,strings:t}),n.length>0&&o(Mr,{logs:n,strings:t}),a.length>0&&o(Pr,{rows:a,strings:t})]})]})}function Er({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let n=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${n}`})}return e!=null&&e.platform&&r.push({label:t["detail.tech.device.platform"],value:e.platform}),e!=null&&e.language&&r.push({label:t["detail.tech.device.language"],value:e.language}),e!=null&&e.timezone&&r.push({label:t["detail.tech.device.timezone"],value:e.timezone}),e!=null&&e.connection&&r.push({label:t["detail.tech.device.connection"],value:e.connection}),r.length===0?null:o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.device"]}),o("dl",{class:"tech-device",children:r.map(n=>o(N,{children:[o("dt",{children:n.label}),o("dd",{children:n.value})]}))})]})}function Tr({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:zr(r.stack)})]}))})]})}function Mr({logs:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.console"]}),o("ul",{class:"tech-console",children:e.map(r=>o("li",{class:`tech-console-row tech-console-row--${r.level}`,children:[o("span",{class:"tech-console-level",children:r.level}),o("span",{class:"tech-console-msg",children:r.message})]}))})]})}function Pr({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let n=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${n?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:ne(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function zr(e){let t=e.split(`
|
|
4
4
|
`);return t.length<=12?e:t.slice(0,12).join(`
|
|
5
5
|
`)+`
|
|
6
|
-
\u2026`}function Mr({rows:e,strings:t}){return o("div",{class:"report-detail-history",children:[o("h3",{class:"report-detail-section",children:t["detail.history"]}),o("ol",{class:"status-history",children:e.map(r=>{var s,l;let n=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,a=(l=t[`status.${r.to_status}`])!=null?l:r.to_status,i=r.changed_by_source==="mcp"?"detail.author.mcp":r.changed_by_source==="system"?"detail.author.system":"detail.author.staff";return o("li",{class:"status-history-row",children:[o("span",{class:"status-history-time",children:wt(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:n}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:a})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var Tr=3e4,Pr=["new","in_progress","awaiting_validation","closed","rejected"],zr=["bug","feature","question","praise","typo"],Ar=["blocker","high","medium","low"];function kt({api:e,externalId:t,strings:r}){let[n,a]=R({}),[i,s]=R(null),[l,f]=R(null),[c,h]=R(!0),[d,g]=R(null),[b,x]=R(null),[_,y]=R(0),p=J(()=>{var w,C,B,T,F,P;return((C=(w=n.status)==null?void 0:w.length)!=null?C:0)+((T=(B=n.type)==null?void 0:B.length)!=null?T:0)+((P=(F=n.severity)==null?void 0:F.length)!=null?P:0)+(n.q?1:0)+(n.mine?1:0)},[n]);D(()=>{let w=!1,C=null,B=async()=>{try{let[T,F]=await Promise.all([e.listBoard(t,n),e.fetchBoardKpis(t,n)]);if(w)return;s(T),f(F),g(null)}catch(T){if(w)return;g(T instanceof Error?T.message:String(T))}finally{w||h(!1),w||(C=setTimeout(B,Tr))}};return h(!0),B(),()=>{w=!0,C&&clearTimeout(C)}},[e,t,jr(n)]);let u=J(()=>{var w;return!b||!i?null:(w=i.results.find(C=>C.id===b))!=null?w:null},[b,i]),m=w=>{x(w.id),y(C=>C+1)};return o("div",{class:"board-view",children:[o(Br,{strings:r,kpis:l}),o(Lr,{filters:n,onChange:a,activeCount:p,strings:r}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":c&&!i,children:[d&&o("div",{class:"board-error",children:r["board.list.error"]}),!d&&c&&!i&&o(Wr,{}),!d&&i&&i.results.length===0&&!c&&o(Dr,{strings:r}),!d&&i&&i.results.length>0&&o(Ir,{rows:i.results,selectedId:b,onPick:m,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${u?"has-selection":""}`,children:u?o(ye,{api:e,externalId:t,reportId:u.id,strings:r,onBack:()=>x(null),canModerate:u.is_mine,variant:"board"},_):o("div",{class:"board-detail-empty",children:[o(Ur,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Br({strings:e,kpis:t}){let r=(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${r}`:r})]})]}),o(Fr,{kpis:t,strings:e})]})}function Fr({kpis:e,strings:t}){var n,a,i,s,l,f;let r=[{key:"new",label:t["board.kpi.new"],value:String((a=(n=e==null?void 0:e.by_status)==null?void 0:n.new)!=null?a:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((f=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?f:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(c=>o("div",{class:`board-kpi-card ${c.tone}`,children:[o("div",{class:"board-kpi-value",children:c.value}),o("div",{class:"board-kpi-label",children:c.label})]},c.key))})}function Lr({filters:e,onChange:t,activeCount:r,strings:n}){var h,d,g,b,x,_,y;let a=p=>{if(p===""){let{status:u,...m}=e;t(m)}else t({...e,status:[p]})},i=p=>{if(p===""){let{type:u,...m}=e;t(m)}else t({...e,type:[p]})},s=p=>{if(p===""){let{severity:u,...m}=e;t(m)}else t({...e,severity:[p]})},l=p=>t({...e,q:p}),f=()=>{if(e.mine){let{mine:p,...u}=e;t(u)}else t({...e,mine:!0})},c=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":n["board.filter.status"],value:(d=(h=e.status)==null?void 0:h[0])!=null?d:"",onChange:p=>a(p.target.value),children:[o("option",{value:"",children:n["board.filter.status"]}),Pr.map(p=>{var u;return o("option",{value:p,children:(u=n[`board.kpi.${p}`])!=null?u:p},p)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.type"],value:(b=(g=e.type)==null?void 0:g[0])!=null?b:"",onChange:p=>i(p.target.value),children:[o("option",{value:"",children:n["board.filter.type"]}),zr.map(p=>{var u;return o("option",{value:p,children:(u=n[`type.${p}`])!=null?u:p},p)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.severity"],value:(_=(x=e.severity)==null?void 0:x[0])!=null?_:"",onChange:p=>s(p.target.value),children:[o("option",{value:"",children:n["board.filter.severity"]}),Ar.map(p=>{var u;return o("option",{value:p,children:(u=n[`severity.${p}`])!=null?u:p},p)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:n["board.filter.search.placeholder"],value:(y=e.q)!=null?y:"",onInput:p=>l(p.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:f}),o("span",{children:n["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:c,children:[o(Hr,{}),n["board.filter.clear"]]})]})}function Ir({rows:e,selectedId:t,onPick:r,strings:n,total:a}){return o(U,{children:[o("div",{class:"board-list-count",children:n["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(a))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o($r,{row:i,selected:i.id===t,onPick:r,strings:n},i.id))})]})}function $r({row:e,selected:t,onPick:r,strings:n}){var i,s;let a=e.is_mine?n["board.list.you"]:e.author_label||"\u2014";return o("li",{children:o("button",{type:"button",class:`board-row ${t?"is-selected":""}`,onClick:()=>r(e),"aria-pressed":t,children:[o("div",{class:"board-row-badges",children:[o("span",{class:`badge status-${e.status}`,children:(i=n[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=n[`severity.${e.severity}`])!=null?s:e.severity})]}),o("div",{class:"board-row-description",children:e.description}),o("div",{class:"board-row-meta",children:[o("span",{class:"board-row-author",children:a}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Kr,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Or(e.created_at)})]})]})})}function Dr({strings:e}){return o("div",{class:"board-empty",children:[o(Nr,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function Wr(){return o("ul",{class:"board-list board-list-skeleton","aria-hidden":"true",children:Array.from({length:5}).map((e,t)=>o("li",{children:o("div",{class:"board-row skeleton-row",children:[o("div",{class:"skeleton-line skeleton-badges"}),o("div",{class:"skeleton-line skeleton-text"}),o("div",{class:"skeleton-line skeleton-text short"})]})},t))})}function Kr(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Hr(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Nr(){return o("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("circle",{cx:"32",cy:"32",r:"28",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2"}),o("path",{d:"M22 32h20M32 22v20",stroke:"currentColor","stroke-opacity":"0.35","stroke-width":"2","stroke-linecap":"round"})]})}function Ur(){return o("svg",{width:"80",height:"80",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("rect",{x:"10",y:"12",width:"44",height:"36",rx:"4",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2"}),o("line",{x1:"18",y1:"22",x2:"46",y2:"22",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"30",x2:"38",y2:"30",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"38",x2:"32",y2:"38",stroke:"currentColor","stroke-opacity":"0.14","stroke-width":"2","stroke-linecap":"round"})]})}function jr(e){var t,r,n,a;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(n=e.severity)==null?void 0:n.slice().sort(),q:(a=e.q)!=null?a:"",m:!!e.mine})}function Or(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),n=Math.floor(r/6e4);if(n<1)return"just now";if(n<60)return`${n}m`;let a=Math.floor(n/60);if(a<24)return`${a}h`;let i=Math.floor(a/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}function Vr(e){return`pill pill-status pill-status--${e}`}function qr(e){return`pill pill-severity pill-severity--${e}`}function Gr(){return"pill pill-type"}function Xr(e){let t=Date.parse(e);if(!Number.isFinite(t))return"";let r=Math.max(1,Math.round((Date.now()-t)/1e3));if(r<60)return`${r}s`;let n=Math.round(r/60);if(n<60)return`${n}m`;let a=Math.round(n/60);return a<48?`${a}h`:`${Math.round(a/24)}d`}function Zr(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function _e({row:e,strings:t,onClick:r}){var a;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:Vr(e.status),children:(a=t[`status.${e.status}`])!=null?a:e.status}),o("span",{class:Gr(),children:t[`type.${e.feedback_type}`]}),o("span",{class:qr(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:Xr(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Zr(e.comment_count,t)]})]})]})}var Yr=3e4;function Jr(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=(t.getUTCDay()+6)%7;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-r)).toISOString().slice(0,10)}function Qr(e){let t=new Map;for(let r of e){let n=Jr(r.resolved_at);if(!n)continue;let a=t.get(n);a?a.push(r):t.set(n,[r])}return Array.from(t.entries()).sort(([r],[n])=>r<n?1:-1).map(([r,n])=>({weekKey:r,label:eo(r),rows:n}))}function eo(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function St({api:e,externalId:t,strings:r,onSelect:n}){let[a,i]=R(null),[s,l]=R(null),[f,c]=R(!1),h=K(!0),d=async()=>{c(!0),l(null);try{let _=await e.listChangelog(t);if(!h.current)return;i(_)}catch(_){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",_),!h.current)return;l(r["mine.error"])}finally{h.current&&c(!1)}};D(()=>{h.current=!0,d();let _=setInterval(()=>{d()},Yr);return()=>{h.current=!1,clearInterval(_)}},[t]);let g=J(()=>a?Qr(a):[],[a]),b=a===null&&!s,x=a!==null&&a.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{d()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),b&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),x&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),g.length>0&&o("div",{class:"changelog-groups",children:g.map(_=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",_.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[_.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(_.rows.length))})]}),o("ul",{class:"mine-rows",children:_.rows.map(y=>o("li",{children:o(_e,{row:y,strings:r,onClick:()=>n(y)})}))})]},_.weekKey))})]})}function to(){return o("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:[o("path",{d:"m8 2 1.88 1.88"}),o("path",{d:"M14.12 3.88 16 2"}),o("path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"}),o("path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"}),o("path",{d:"M12 20v-9"}),o("path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5"}),o("path",{d:"M6 13H2"}),o("path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4"}),o("path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4"}),o("path",{d:"M22 13h-4"}),o("path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4"})]})}function Rt({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(to,{})})}var Ct=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],ro=.35;function Et(e,t,r){if(e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.lineWidth,e.lineCap="round",e.lineJoin="round",t.kind==="rectangle")e.strokeRect(t.x,t.y,t.w,t.h);else if(t.kind==="arrow")oo(e,t.x1,t.y1,t.x2,t.y2);else if(t.kind==="freehand"){if(t.points.length<2){e.restore();return}e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let n=1;n<t.points.length;n++)e.lineTo(t.points[n].x,t.points[n].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let n=e.measureText(t.text),a=4,i=n.width+a*2,s=t.fontSize+a*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-a,t.y-a,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=ro,e.fillRect(xe(t.x,t.w),xe(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&no(e,t,r);e.restore()}function xe(e,t){return t<0?e+t:e}function oo(e,t,r,n,a){let s=Math.atan2(a-r,n-t);e.beginPath(),e.moveTo(t,r),e.lineTo(n,a),e.stroke(),e.beginPath(),e.moveTo(n,a),e.lineTo(n-14*Math.cos(s-Math.PI/6),a-14*Math.sin(s-Math.PI/6)),e.lineTo(n-14*Math.cos(s+Math.PI/6),a-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function no(e,t,r){if(!r)return;let n=xe(t.x,t.w),a=xe(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let f=a;f<a+s;f+=l)for(let c=n;c<n+i;c+=l){let h=Math.min(l,n+i-c),d=Math.min(l,a+s-f);e.drawImage(r,c,f,h,d,c,f,h,d)}e.imageSmoothingEnabled=!1;for(let f=a;f<a+s;f+=l)for(let c=n;c<n+i;c+=l){let h=Math.min(l,n+i-c),d=Math.min(l,a+s-f);e.drawImage(r,c,f,1,1,c,f,h,d)}e.imageSmoothingEnabled=!0}var q={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Mt({imageBlob:e,strings:t,onSave:r,onCancel:n}){let a=K(null),i=K(null),s=K(null),[l,f]=R("rectangle"),[c,h]=R(Ct[0]),[d,g]=R([]),[b,x]=R([]),[_,y]=R([]),p=K(!1),[u,m]=R(null),[w,C]=R(!1),[B,T]=R(!1),F=K(1);function P(v){g(k=>(x(E=>[...E,k]),[...k,v])),y([])}function W(){g(v=>(x(k=>[...k,v]),[])),y([])}function A(){x(v=>{if(v.length===0)return v;let k=v[v.length-1];return g(E=>(y(M=>[E,...M]),k)),v.slice(0,-1)})}function O(){y(v=>{if(v.length===0)return v;let k=v[0];return g(E=>(x(M=>[...M,E]),k)),v.slice(1)})}$e(()=>{let v=k=>{k.key==="Escape"&&(k.stopPropagation(),n())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[n]),D(()=>{let v=k=>{if(!(k.metaKey||k.ctrlKey))return;let M=k.key.toLowerCase();M==="z"?(k.preventDefault(),k.stopPropagation(),k.shiftKey?O():A()):M==="y"&&(k.preventDefault(),k.stopPropagation(),O())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[b,_,d]),D(()=>{let v=URL.createObjectURL(e),k=new Image;return k.onload=()=>{s.current=k,C(!0)},k.src=v,()=>URL.revokeObjectURL(v)},[e]),$e(()=>{if(!w||!a.current||!s.current||!i.current)return;let v=s.current,E=i.current.clientWidth-16,M=window.innerHeight*.65,V=Math.min(E/v.width,M/v.height,1);F.current=V;let Q=a.current;Q.width=v.width,Q.height=v.height,Q.style.width=`${v.width*V}px`,Q.style.height=`${v.height*V}px`,N()},[w]),D(()=>{N()},[d,u]);function N(){let v=a.current,k=s.current;if(!v||!k)return;let E=v.getContext("2d");if(E){E.clearRect(0,0,v.width,v.height),E.drawImage(k,0,0);for(let M of d)Et(E,M,k);u&&Et(E,u,k)}}function H(v){let E=a.current.getBoundingClientRect();return{x:(v.clientX-E.left)/F.current,y:(v.clientY-E.top)/F.current}}let Z=v=>{if(!w)return;let{x:k,y:E}=H(v),M=a.current.width,V=Math.max(3,Math.round(M/400)),Q=Math.max(8,Math.round(M/80));if(l==="text"){let ke=window.prompt(t["annotator.text_prompt"]);ke&&ke.trim()&&P({kind:"text",x:k,y:E,text:ke.trim(),color:c,fontSize:Math.max(16,Math.round(M/50)),lineWidth:1});return}p.current=!0,l==="rectangle"?m({kind:"rectangle",x:k,y:E,w:0,h:0,color:c,lineWidth:V}):l==="arrow"?m({kind:"arrow",x1:k,y1:E,x2:k,y2:E,color:c,lineWidth:V}):l==="freehand"?m({kind:"freehand",points:[{x:k,y:E}],color:c,lineWidth:V}):l==="highlight"?m({kind:"highlight",x:k,y:E,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&m({kind:"blur",x:k,y:E,w:0,h:0,color:"#000000",lineWidth:0,tile:Q})},ne=v=>{if(!p.current)return;let{x:k,y:E}=H(v);m(M=>M&&(M.kind==="rectangle"||M.kind==="highlight"||M.kind==="blur"?{...M,w:k-M.x,h:E-M.y}:M.kind==="arrow"?{...M,x2:k,y2:E}:M.kind==="freehand"?{...M,points:[...M.points,{x:k,y:E}]}:M))},we=()=>{m(v=>(p.current&&v&&((v.kind==="rectangle"||v.kind==="highlight"||v.kind==="blur")&&Math.abs(v.w)<4&&Math.abs(v.h)<4||v.kind==="arrow"&&Math.hypot(v.x2-v.x1,v.y2-v.y1)<4||v.kind==="freehand"&&v.points.length<3||P(v)),null)),p.current=!1},S=async()=>{let v=a.current;if(v){T(!0);try{let k=await new Promise(E=>v.toBlob(E,"image/png",.92));k&&r(k)}finally{T(!1)}}},I=[{id:"rectangle",icon:q.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:q.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:q.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:q.text,label:t["annotator.tool.text"]},{id:"highlight",icon:q.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:q.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:v=>{v.target===v.currentTarget&&n()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:n,children:q.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:I.map(v=>o("button",{type:"button",onClick:()=>f(v.id),title:v.label,"aria-label":v.label,"aria-pressed":l===v.id,class:`annotator-tool ${l===v.id?"is-active":""}`,children:v.icon},v.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Ct.map(v=>o("button",{type:"button",onClick:()=>h(v),"aria-label":v,"aria-pressed":c===v,class:`annotator-color ${c===v?"is-active":""}`,style:{backgroundColor:v}},v)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:v=>h(v.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:A,disabled:b.length===0,title:t["annotator.undo"],children:[q.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:O,disabled:_.length===0,title:t["annotator.redo"],children:[q.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:W,disabled:d.length===0,children:[q.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[d.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:w?o("canvas",{ref:a,onMouseDown:Z,onMouseMove:ne,onMouseUp:we,onMouseLeave:we,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:n,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:S,disabled:B||!w,children:B?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var ao=["bug","feature","question","praise","typo"],io=["blocker","high","medium","low"];function Tt({strings:e,onSubmit:t,onCancel:r,status:n,errorMessage:a}){let[i,s]=R(""),[l,f]=R("bug"),[c,h]=R("medium"),[d,g]=R(""),[b,x]=R(null),[_,y]=R(null),[p,u]=R(!1),[m,w]=R(!1),C=K(null),B=K(null),T=n==="submitting",F=T?e["form.submitting"]:e["form.submit"],P=typeof window!="undefined"?window.location.href:"";D(()=>()=>{_&&URL.revokeObjectURL(_)},[_]);let W=S=>{if(g(""),S instanceof File){let I=xt(S);if(I){g(I.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(I.maxMb)));return}}_&&URL.revokeObjectURL(_),x(S),y(URL.createObjectURL(S))},A=()=>{_&&URL.revokeObjectURL(_),y(null),x(null),g(""),C.current&&(C.current.value="")},O=S=>{var v;let I=(v=S.target.files)==null?void 0:v[0];I&&W(I)},N=S=>{S.preventDefault(),S.stopPropagation(),u(!0)},H=S=>{S.preventDefault(),S.stopPropagation(),S.currentTarget===S.target&&u(!1)},Z=S=>{var v,k;S.preventDefault(),S.stopPropagation(),u(!1);let I=(k=(v=S.dataTransfer)==null?void 0:v.files)==null?void 0:k[0];I&&W(I)};D(()=>{let S=B.current;if(!S)return;let I=v=>{var E;let k=(E=v.clipboardData)==null?void 0:E.items;if(k){for(let M of Array.from(k))if(M.kind==="file"&&M.type.startsWith("image/")){let V=M.getAsFile();if(V){v.preventDefault(),W(V);return}}}};return S.addEventListener("paste",I),()=>S.removeEventListener("paste",I)},[_]);let ne=S=>{_&&URL.revokeObjectURL(_),x(S),y(URL.createObjectURL(S)),w(!1)};return o("form",{onSubmit:S=>{if(S.preventDefault(),!i.trim()){g(e["form.description.required"]);return}g("");let I={description:i.trim(),feedback_type:l,severity:c};b&&(I.screenshot=b,I.capture_method="manual"),t(I)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:i,placeholder:e["form.description.placeholder"],onInput:S=>s(S.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:l,onChange:S=>f(S.target.value),children:ao.map(S=>o("option",{value:S,children:e[`type.${S}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:S=>h(S.target.value),children:io.map(S=>o("option",{value:S,children:e[`severity.${S}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:C,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:O,"aria-hidden":"true",tabIndex:-1}),_?o("div",{class:"screenshot-preview",children:[o("img",{src:_,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>w(!0),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),o("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),e["form.screenshot.annotate"]]}),o("button",{type:"button",class:"btn",onClick:A,children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14z"})}),e["form.screenshot.remove"]]})]})]}):o("div",{ref:B,class:`screenshot-dropzone ${p?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var S;return(S=C.current)==null?void 0:S.click()},onKeyDown:S=>{var I;(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),(I=C.current)==null||I.click())},onDragOver:N,onDragLeave:H,onDrop:Z,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),P&&o("div",{class:"page-context",title:P,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:oe(P,90)})]}),d&&o("div",{class:"error",children:d}),n==="error"&&a&&o("div",{class:"error",children:a}),n==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:T,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:T,children:F})]}),m&&b&&o(Mt,{imageBlob:b,strings:e,onCancel:()=>w(!1),onSave:ne})]})}function so(e){let t={new:0,in_progress:0,awaiting_validation:0,resolved:0,total:0};for(let r of e)switch(t.total+=1,r.status){case"new":t.new+=1;break;case"in_progress":t.in_progress+=1;break;case"awaiting_validation":t.awaiting_validation+=1;break;case"closed":case"rejected":case"duplicate":case"wontfix":t.resolved+=1;break}return t}function lo(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var co={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Pt(e,t){return t==="all"?e:e.filter(r=>co[r.status]===t)}function zt({rows:e,filter:t,onFilter:r,strings:n}){let a=so(e),i=lo(a),s=[{key:"new",label:n["kpi.new"],value:String(a.new)},{key:"in_progress",label:n["kpi.in_progress"],value:String(a.in_progress)},{key:"awaiting_validation",label:n["kpi.awaiting_validation"],value:String(a.awaiting_validation)},{key:"resolved",label:n["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let f=t===l.key,c=f?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${f?" is-active":""}`,onClick:()=>r(c),"aria-pressed":f,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var po=3e4;function At({api:e,externalId:t,strings:r,onSelect:n}){var u;let[a,i]=R(null),[s,l]=R(null),[f,c]=R(!1),[h,d]=R("all"),g=K(!0),b=async()=>{c(!0),l(null);try{let m=await e.listMine(t);if(!g.current)return;i(m)}catch(m){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",m),!g.current)return;l(r["mine.error"])}finally{g.current&&c(!1)}};D(()=>{g.current=!0,b();let m=setInterval(()=>{b()},po);return()=>{g.current=!1,clearInterval(m)}},[t]);let x=a!==null&&a.length===0,_=a===null&&!s,y=a?Pt(a,h):null,p=!!a&&a.length>0&&((u=y==null?void 0:y.length)!=null?u:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{b()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),a&&a.length>0&&o(zt,{rows:a,filter:h,onFilter:d,strings:r}),_&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),x&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),p&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),y&&y.length>0&&o("ul",{class:"mine-rows",children:y.map(m=>o("li",{children:o(_e,{row:m,strings:r,onClick:()=>n(m)})}))})]})}function Bt({onDismiss:e,children:t,closeLabel:r="Close",expanded:n=!1}){let a=K(null),i=K(null);return D(()=>{var f;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let h=(d=a.current)==null?void 0:d.getRootNode();h instanceof ShadowRoot&&h.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(f=a.current)==null?void 0:f.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let c=i.current;c&&typeof c.focus=="function"&&c.focus()}},[e]),o("div",{class:`backdrop ${n?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e()},children:o("div",{ref:a,class:`modal ${n?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:e,children:"\xD7"}),t]})})}var Ft=`
|
|
6
|
+
\u2026`}function Br({rows:e,strings:t}){return o("div",{class:"report-detail-history",children:[o("h3",{class:"report-detail-section",children:t["detail.history"]}),o("ol",{class:"status-history",children:e.map(r=>{var s,c;let n=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,a=(c=t[`status.${r.to_status}`])!=null?c:r.to_status,i=r.changed_by_source==="mcp"?"detail.author.mcp":r.changed_by_source==="system"?"detail.author.system":"detail.author.staff";return o("li",{class:"status-history-row",children:[o("span",{class:"status-history-time",children:Rt(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:n}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:a})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var Fr=3e4,Ar=["recent","oldest","updated","severity","status"],Lr=["new","in_progress","awaiting_validation","closed","rejected"],Ir=["bug","feature","question","praise","typo"],$r=["blocker","high","medium","low"];function Et({api:e,externalId:t,strings:r}){let[n,a]=R(()=>xt(t));K(()=>{wt(t,n)},[t,Ct(n)]);let[i,s]=R(null),[c,f]=R(null),[d,h]=R(!0),[p,g]=R(null),[b,x]=R(null),[_,w]=R(0),[m,u]=R(0),l=Q(()=>{var M,E,L,P,A,H;return((E=(M=n.status)==null?void 0:M.length)!=null?E:0)+((P=(L=n.type)==null?void 0:L.length)!=null?P:0)+((H=(A=n.severity)==null?void 0:A.length)!=null?H:0)+(n.q?1:0)+(n.mine?1:0)},[n]);K(()=>{let M=!1,E=null,L=async()=>{try{let[P,A]=await Promise.all([e.listBoard(t,n),e.fetchBoardKpis(t,n)]);if(M)return;s(P),f(A),g(null)}catch(P){if(M)return;g(P instanceof Error?P.message:String(P))}finally{M||h(!1),M||(E=setTimeout(L,Fr))}};return h(!0),L(),()=>{M=!0,E&&clearTimeout(E)}},[e,t,Ct(n),m]);let y=Q(()=>{var M;return!b||!i?null:(M=i.results.find(E=>E.id===b))!=null?M:null},[b,i]),C=M=>{x(M.id),w(E=>E+1)};return o("div",{class:"board-view",children:[o(Dr,{strings:r,kpis:c}),o(Wr,{filters:n,onChange:a,activeCount:l,strings:r}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":d&&!i,children:[p&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:r["board.list.error"]}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{g(null),h(!0),u(M=>M+1)},children:r["board.retry"]})]}),!p&&d&&!i&&o(jr,{}),!p&&i&&i.results.length===0&&!d&&o(Ur,{strings:r}),!p&&i&&i.results.length>0&&o(Hr,{rows:i.results,selectedId:b,onPick:C,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${y?"has-selection":""}`,children:y?o(ye,{api:e,externalId:t,reportId:y.id,strings:r,onBack:()=>x(null),canModerate:y.is_mine,variant:"board"},_):o("div",{class:"board-detail-empty",children:[o(Gr,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Dr({strings:e,kpis:t}){let r=(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${r}`:r})]})]}),o(Kr,{kpis:t,strings:e})]})}function Kr({kpis:e,strings:t}){var n,a,i,s,c,f;let r=[{key:"new",label:t["board.kpi.new"],value:String((a=(n=e==null?void 0:e.by_status)==null?void 0:n.new)!=null?a:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((f=(c=e==null?void 0:e.by_status)==null?void 0:c.awaiting_validation)!=null?f:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(d=>o("div",{class:`board-kpi-card ${d.tone}`,children:[o("div",{class:"board-kpi-value",children:d.value}),o("div",{class:"board-kpi-label",children:d.label})]},d.key))})}function Wr({filters:e,onChange:t,activeCount:r,strings:n}){var p,g,b,x,_,w,m,u;let a=l=>{if(l===""){let{status:y,...C}=e;t(C)}else t({...e,status:[l]})},i=l=>{if(l===""){let{type:y,...C}=e;t(C)}else t({...e,type:[l]})},s=l=>{if(l===""){let{severity:y,...C}=e;t(C)}else t({...e,severity:[l]})},c=l=>t({...e,ordering:l}),f=l=>t({...e,q:l}),d=()=>{if(e.mine){let{mine:l,...y}=e;t(y)}else t({...e,mine:!0})},h=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":n["board.sort"],value:(p=e.ordering)!=null?p:"recent",onChange:l=>c(l.target.value),children:Ar.map(l=>o("option",{value:l,children:n[`board.sort.${l}`]},l))}),o("select",{class:"board-filter-select","aria-label":n["board.filter.status"],value:(b=(g=e.status)==null?void 0:g[0])!=null?b:"",onChange:l=>a(l.target.value),children:[o("option",{value:"",children:n["board.filter.status"]}),Lr.map(l=>{var y;return o("option",{value:l,children:(y=n[`board.kpi.${l}`])!=null?y:l},l)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.type"],value:(_=(x=e.type)==null?void 0:x[0])!=null?_:"",onChange:l=>i(l.target.value),children:[o("option",{value:"",children:n["board.filter.type"]}),Ir.map(l=>{var y;return o("option",{value:l,children:(y=n[`type.${l}`])!=null?y:l},l)})]}),o("select",{class:"board-filter-select","aria-label":n["board.filter.severity"],value:(m=(w=e.severity)==null?void 0:w[0])!=null?m:"",onChange:l=>s(l.target.value),children:[o("option",{value:"",children:n["board.filter.severity"]}),$r.map(l=>{var y;return o("option",{value:l,children:(y=n[`severity.${l}`])!=null?y:l},l)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:n["board.filter.search.placeholder"],value:(u=e.q)!=null?u:"",onInput:l=>f(l.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:d}),o("span",{children:n["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:h,children:[o(Vr,{}),n["board.filter.clear"]]})]})}function Hr({rows:e,selectedId:t,onPick:r,strings:n,total:a}){return o(N,{children:[o("div",{class:"board-list-count",children:n["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(a))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Nr,{row:i,selected:i.id===t,onPick:r,strings:n},i.id))})]})}function Nr({row:e,selected:t,onPick:r,strings:n}){var i,s;let a=e.is_mine?n["board.list.you"]:e.author_label||"\u2014";return o("li",{children:o("button",{type:"button",class:`board-row ${t?"is-selected":""}`,onClick:()=>r(e),"aria-pressed":t,children:[o("div",{class:"board-row-badges",children:[o("span",{class:`badge status-${e.status}`,children:(i=n[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=n[`severity.${e.severity}`])!=null?s:e.severity})]}),o("div",{class:"board-row-description",children:e.description}),o("div",{class:"board-row-meta",children:[o("span",{class:"board-row-author",children:a}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Or,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Xr(e.created_at)})]})]})})}function Ur({strings:e}){return o("div",{class:"board-empty",children:[o(qr,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function jr(){return o("ul",{class:"board-list board-list-skeleton","aria-hidden":"true",children:Array.from({length:5}).map((e,t)=>o("li",{children:o("div",{class:"board-row skeleton-row",children:[o("div",{class:"skeleton-line skeleton-badges"}),o("div",{class:"skeleton-line skeleton-text"}),o("div",{class:"skeleton-line skeleton-text short"})]})},t))})}function Or(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Vr(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function qr(){return o("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("circle",{cx:"32",cy:"32",r:"28",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2"}),o("path",{d:"M22 32h20M32 22v20",stroke:"currentColor","stroke-opacity":"0.35","stroke-width":"2","stroke-linecap":"round"})]})}function Gr(){return o("svg",{width:"80",height:"80",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("rect",{x:"10",y:"12",width:"44",height:"36",rx:"4",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2"}),o("line",{x1:"18",y1:"22",x2:"46",y2:"22",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"30",x2:"38",y2:"30",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"38",x2:"32",y2:"38",stroke:"currentColor","stroke-opacity":"0.14","stroke-width":"2","stroke-linecap":"round"})]})}function Ct(e){var t,r,n,a,i;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(n=e.severity)==null?void 0:n.slice().sort(),q:(a=e.q)!=null?a:"",m:!!e.mine,o:(i=e.ordering)!=null?i:""})}function Xr(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),n=Math.floor(r/6e4);if(n<1)return"just now";if(n<60)return`${n}m`;let a=Math.floor(n/60);if(a<24)return`${a}h`;let i=Math.floor(a/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}function Jr(e){return`pill pill-status pill-status--${e}`}function Zr(e){return`pill pill-severity pill-severity--${e}`}function Yr(){return"pill pill-type"}function Qr(e){let t=Date.parse(e);if(!Number.isFinite(t))return"";let r=Math.max(1,Math.round((Date.now()-t)/1e3));if(r<60)return`${r}s`;let n=Math.round(r/60);if(n<60)return`${n}m`;let a=Math.round(n/60);return a<48?`${a}h`:`${Math.round(a/24)}d`}function eo(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function _e({row:e,strings:t,onClick:r}){var a;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:Jr(e.status),children:(a=t[`status.${e.status}`])!=null?a:e.status}),o("span",{class:Yr(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Zr(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:Qr(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",eo(e.comment_count,t)]})]})]})}var to=3e4;function ro(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=(t.getUTCDay()+6)%7;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-r)).toISOString().slice(0,10)}function oo(e){let t=new Map;for(let r of e){let n=ro(r.resolved_at);if(!n)continue;let a=t.get(n);a?a.push(r):t.set(n,[r])}return Array.from(t.entries()).sort(([r],[n])=>r<n?1:-1).map(([r,n])=>({weekKey:r,label:no(r),rows:n}))}function no(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Tt({api:e,externalId:t,strings:r,onSelect:n}){let[a,i]=R(null),[s,c]=R(null),[f,d]=R(!1),h=W(!0),p=async()=>{d(!0),c(null);try{let _=await e.listChangelog(t);if(!h.current)return;i(_)}catch(_){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",_),!h.current)return;c(r["mine.error"])}finally{h.current&&d(!1)}};K(()=>{h.current=!0,p();let _=setInterval(()=>{p()},to);return()=>{h.current=!1,clearInterval(_)}},[t]);let g=Q(()=>a?oo(a):[],[a]),b=a===null&&!s,x=a!==null&&a.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{p()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),b&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),x&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),g.length>0&&o("div",{class:"changelog-groups",children:g.map(_=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",_.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[_.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(_.rows.length))})]}),o("ul",{class:"mine-rows",children:_.rows.map(w=>o("li",{children:o(_e,{row:w,strings:r,onClick:()=>n(w)})}))})]},_.weekKey))})]})}function ao(){return o("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:[o("path",{d:"m8 2 1.88 1.88"}),o("path",{d:"M14.12 3.88 16 2"}),o("path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"}),o("path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"}),o("path",{d:"M12 20v-9"}),o("path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5"}),o("path",{d:"M6 13H2"}),o("path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4"}),o("path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4"}),o("path",{d:"M22 13h-4"}),o("path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4"})]})}function Mt({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(ao,{})})}var Pt=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],io=.35;function zt(e,t,r){if(e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.lineWidth,e.lineCap="round",e.lineJoin="round",t.kind==="rectangle")e.strokeRect(t.x,t.y,t.w,t.h);else if(t.kind==="arrow")so(e,t.x1,t.y1,t.x2,t.y2);else if(t.kind==="freehand"){if(t.points.length<2){e.restore();return}e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let n=1;n<t.points.length;n++)e.lineTo(t.points[n].x,t.points[n].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let n=e.measureText(t.text),a=4,i=n.width+a*2,s=t.fontSize+a*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-a,t.y-a,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=io,e.fillRect(xe(t.x,t.w),xe(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&lo(e,t,r);e.restore()}function xe(e,t){return t<0?e+t:e}function so(e,t,r,n,a){let s=Math.atan2(a-r,n-t);e.beginPath(),e.moveTo(t,r),e.lineTo(n,a),e.stroke(),e.beginPath(),e.moveTo(n,a),e.lineTo(n-14*Math.cos(s-Math.PI/6),a-14*Math.sin(s-Math.PI/6)),e.lineTo(n-14*Math.cos(s+Math.PI/6),a-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function lo(e,t,r){if(!r)return;let n=xe(t.x,t.w),a=xe(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let c=Math.max(4,t.tile);for(let f=a;f<a+s;f+=c)for(let d=n;d<n+i;d+=c){let h=Math.min(c,n+i-d),p=Math.min(c,a+s-f);e.drawImage(r,d,f,h,p,d,f,h,p)}e.imageSmoothingEnabled=!1;for(let f=a;f<a+s;f+=c)for(let d=n;d<n+i;d+=c){let h=Math.min(c,n+i-d),p=Math.min(c,a+s-f);e.drawImage(r,d,f,1,1,d,f,h,p)}e.imageSmoothingEnabled=!0}var G={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Bt({imageBlob:e,strings:t,onSave:r,onCancel:n}){let a=W(null),i=W(null),s=W(null),[c,f]=R("rectangle"),[d,h]=R(Pt[0]),[p,g]=R([]),[b,x]=R([]),[_,w]=R([]),m=W(!1),[u,l]=R(null),[y,C]=R(!1),[M,E]=R(!1),L=W(1);function P(v){g(k=>(x(z=>[...z,k]),[...k,v])),w([])}function A(){g(v=>(x(k=>[...k,v]),[])),w([])}function H(){x(v=>{if(v.length===0)return v;let k=v[v.length-1];return g(z=>(w(B=>[z,...B]),k)),v.slice(0,-1)})}function U(){w(v=>{if(v.length===0)return v;let k=v[0];return g(z=>(x(B=>[...B,z]),k)),v.slice(1)})}$e(()=>{let v=k=>{k.key==="Escape"&&(k.stopPropagation(),n())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[n]),K(()=>{let v=k=>{if(!(k.metaKey||k.ctrlKey))return;let B=k.key.toLowerCase();B==="z"?(k.preventDefault(),k.stopPropagation(),k.shiftKey?U():H()):B==="y"&&(k.preventDefault(),k.stopPropagation(),U())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[b,_,p]),K(()=>{let v=URL.createObjectURL(e),k=new Image;return k.onload=()=>{s.current=k,C(!0)},k.src=v,()=>URL.revokeObjectURL(v)},[e]),$e(()=>{if(!y||!a.current||!s.current||!i.current)return;let v=s.current,z=i.current.clientWidth-16,B=window.innerHeight*.65,q=Math.min(z/v.width,B/v.height,1);L.current=q;let ee=a.current;ee.width=v.width,ee.height=v.height,ee.style.width=`${v.width*q}px`,ee.style.height=`${v.height*q}px`,O()},[y]),K(()=>{O()},[p,u]);function O(){let v=a.current,k=s.current;if(!v||!k)return;let z=v.getContext("2d");if(z){z.clearRect(0,0,v.width,v.height),z.drawImage(k,0,0);for(let B of p)zt(z,B,k);u&&zt(z,u,k)}}function T(v){let z=a.current.getBoundingClientRect();return{x:(v.clientX-z.left)/L.current,y:(v.clientY-z.top)/L.current}}let X=v=>{if(!y)return;let{x:k,y:z}=T(v),B=a.current.width,q=Math.max(3,Math.round(B/400)),ee=Math.max(8,Math.round(B/80));if(c==="text"){let ke=window.prompt(t["annotator.text_prompt"]);ke&&ke.trim()&&P({kind:"text",x:k,y:z,text:ke.trim(),color:d,fontSize:Math.max(16,Math.round(B/50)),lineWidth:1});return}m.current=!0,c==="rectangle"?l({kind:"rectangle",x:k,y:z,w:0,h:0,color:d,lineWidth:q}):c==="arrow"?l({kind:"arrow",x1:k,y1:z,x2:k,y2:z,color:d,lineWidth:q}):c==="freehand"?l({kind:"freehand",points:[{x:k,y:z}],color:d,lineWidth:q}):c==="highlight"?l({kind:"highlight",x:k,y:z,w:0,h:0,color:d==="#ffffff"?"#fde047":d,lineWidth:1}):c==="blur"&&l({kind:"blur",x:k,y:z,w:0,h:0,color:"#000000",lineWidth:0,tile:ee})},V=v=>{if(!m.current)return;let{x:k,y:z}=T(v);l(B=>B&&(B.kind==="rectangle"||B.kind==="highlight"||B.kind==="blur"?{...B,w:k-B.x,h:z-B.y}:B.kind==="arrow"?{...B,x2:k,y2:z}:B.kind==="freehand"?{...B,points:[...B.points,{x:k,y:z}]}:B))},we=()=>{l(v=>(m.current&&v&&((v.kind==="rectangle"||v.kind==="highlight"||v.kind==="blur")&&Math.abs(v.w)<4&&Math.abs(v.h)<4||v.kind==="arrow"&&Math.hypot(v.x2-v.x1,v.y2-v.y1)<4||v.kind==="freehand"&&v.points.length<3||P(v)),null)),m.current=!1},S=async()=>{let v=a.current;if(v){E(!0);try{let k=await new Promise(z=>v.toBlob(z,"image/png",.92));k&&r(k)}finally{E(!1)}}},$=[{id:"rectangle",icon:G.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:G.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:G.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:G.text,label:t["annotator.tool.text"]},{id:"highlight",icon:G.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:G.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:v=>{v.target===v.currentTarget&&n()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:n,children:G.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:$.map(v=>o("button",{type:"button",onClick:()=>f(v.id),title:v.label,"aria-label":v.label,"aria-pressed":c===v.id,class:`annotator-tool ${c===v.id?"is-active":""}`,children:v.icon},v.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Pt.map(v=>o("button",{type:"button",onClick:()=>h(v),"aria-label":v,"aria-pressed":d===v,class:`annotator-color ${d===v?"is-active":""}`,style:{backgroundColor:v}},v)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:d,onInput:v=>h(v.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:H,disabled:b.length===0,title:t["annotator.undo"],children:[G.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:U,disabled:_.length===0,title:t["annotator.redo"],children:[G.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:A,disabled:p.length===0,children:[G.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[p.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:y?o("canvas",{ref:a,onMouseDown:X,onMouseMove:V,onMouseUp:we,onMouseLeave:we,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:n,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:S,disabled:M||!y,children:M?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var co=["bug","feature","question","praise","typo"],po=["blocker","high","medium","low"];function Ft({strings:e,onSubmit:t,onCancel:r,status:n,errorMessage:a}){let[i,s]=R(""),[c,f]=R("bug"),[d,h]=R("medium"),[p,g]=R(""),[b,x]=R(null),[_,w]=R(null),[m,u]=R(!1),[l,y]=R(!1),C=W(null),M=W(null),E=n==="submitting",L=E?e["form.submitting"]:e["form.submit"],P=typeof window!="undefined"?window.location.href:"";K(()=>()=>{_&&URL.revokeObjectURL(_)},[_]);let A=S=>{if(g(""),S instanceof File){let $=St(S);if($){g($.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String($.maxMb)));return}}_&&URL.revokeObjectURL(_),x(S),w(URL.createObjectURL(S))},H=()=>{_&&URL.revokeObjectURL(_),w(null),x(null),g(""),C.current&&(C.current.value="")},U=S=>{var v;let $=(v=S.target.files)==null?void 0:v[0];$&&A($)},O=S=>{S.preventDefault(),S.stopPropagation(),u(!0)},T=S=>{S.preventDefault(),S.stopPropagation(),S.currentTarget===S.target&&u(!1)},X=S=>{var v,k;S.preventDefault(),S.stopPropagation(),u(!1);let $=(k=(v=S.dataTransfer)==null?void 0:v.files)==null?void 0:k[0];$&&A($)};K(()=>{let S=M.current;if(!S)return;let $=v=>{var z;let k=(z=v.clipboardData)==null?void 0:z.items;if(k){for(let B of Array.from(k))if(B.kind==="file"&&B.type.startsWith("image/")){let q=B.getAsFile();if(q){v.preventDefault(),A(q);return}}}};return S.addEventListener("paste",$),()=>S.removeEventListener("paste",$)},[_]);let V=S=>{_&&URL.revokeObjectURL(_),x(S),w(URL.createObjectURL(S)),y(!1)};return o("form",{onSubmit:S=>{if(S.preventDefault(),!i.trim()){g(e["form.description.required"]);return}g("");let $={description:i.trim(),feedback_type:c,severity:d};b&&($.screenshot=b,$.capture_method="manual"),t($)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:i,placeholder:e["form.description.placeholder"],onInput:S=>s(S.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:c,onChange:S=>f(S.target.value),children:co.map(S=>o("option",{value:S,children:e[`type.${S}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:d,onChange:S=>h(S.target.value),children:po.map(S=>o("option",{value:S,children:e[`severity.${S}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:C,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:U,"aria-hidden":"true",tabIndex:-1}),_?o("div",{class:"screenshot-preview",children:[o("img",{src:_,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>y(!0),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),o("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),e["form.screenshot.annotate"]]}),o("button",{type:"button",class:"btn",onClick:H,children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14z"})}),e["form.screenshot.remove"]]})]})]}):o("div",{ref:M,class:`screenshot-dropzone ${m?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var S;return(S=C.current)==null?void 0:S.click()},onKeyDown:S=>{var $;(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),($=C.current)==null||$.click())},onDragOver:O,onDragLeave:T,onDrop:X,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),P&&o("div",{class:"page-context",title:P,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:ne(P,90)})]}),p&&o("div",{class:"error",children:p}),n==="error"&&a&&o("div",{class:"error",children:a}),n==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:E,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:E,children:L})]}),l&&b&&o(Bt,{imageBlob:b,strings:e,onCancel:()=>y(!1),onSave:V})]})}function uo(e){let t={new:0,in_progress:0,awaiting_validation:0,resolved:0,total:0};for(let r of e)switch(t.total+=1,r.status){case"new":t.new+=1;break;case"in_progress":t.in_progress+=1;break;case"awaiting_validation":t.awaiting_validation+=1;break;case"closed":case"rejected":case"duplicate":case"wontfix":t.resolved+=1;break}return t}function fo(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var mo={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function At(e,t){return t==="all"?e:e.filter(r=>mo[r.status]===t)}function Lt({rows:e,filter:t,onFilter:r,strings:n}){let a=uo(e),i=fo(a),s=[{key:"new",label:n["kpi.new"],value:String(a.new)},{key:"in_progress",label:n["kpi.in_progress"],value:String(a.in_progress)},{key:"awaiting_validation",label:n["kpi.awaiting_validation"],value:String(a.awaiting_validation)},{key:"resolved",label:n["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(c=>{let f=t===c.key,d=f?"all":c.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${c.key}${f?" is-active":""}`,onClick:()=>r(d),"aria-pressed":f,children:[o("span",{class:"kpi-value",children:c.value}),o("span",{class:"kpi-label",children:c.label})]})})})}var bo=3e4;function It({api:e,externalId:t,strings:r,onSelect:n}){var u;let[a,i]=R(null),[s,c]=R(null),[f,d]=R(!1),[h,p]=R("all"),g=W(!0),b=async()=>{d(!0),c(null);try{let l=await e.listMine(t);if(!g.current)return;i(l)}catch(l){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",l),!g.current)return;c(r["mine.error"])}finally{g.current&&d(!1)}};K(()=>{g.current=!0,b();let l=setInterval(()=>{b()},bo);return()=>{g.current=!1,clearInterval(l)}},[t]);let x=a!==null&&a.length===0,_=a===null&&!s,w=a?At(a,h):null,m=!!a&&a.length>0&&((u=w==null?void 0:w.length)!=null?u:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{b()},disabled:f,children:f?r["mine.loading"]:r["mine.refresh"]})]}),a&&a.length>0&&o(Lt,{rows:a,filter:h,onFilter:p,strings:r}),_&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),x&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),m&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),w&&w.length>0&&o("ul",{class:"mine-rows",children:w.map(l=>o("li",{children:o(_e,{row:l,strings:r,onClick:()=>n(l)})}))})]})}function $t({onDismiss:e,children:t,closeLabel:r="Close",expanded:n=!1}){let a=W(null),i=W(null);return K(()=>{var f;i.current=document.activeElement;let s=d=>{var p;if(d.key!=="Escape")return;let h=(p=a.current)==null?void 0:p.getRootNode();h instanceof ShadowRoot&&h.querySelector(".annotator-backdrop")||(d.stopPropagation(),e())};window.addEventListener("keydown",s);let c=(f=a.current)==null?void 0:f.querySelector("textarea, input, select, button");return c==null||c.focus(),()=>{window.removeEventListener("keydown",s);let d=i.current;d&&typeof d.focus=="function"&&d.focus()}},[e]),o("div",{class:`backdrop ${n?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e()},children:o("div",{ref:a,class:`modal ${n?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:e,children:"\xD7"}),t]})})}var Dt=`
|
|
7
7
|
:host {
|
|
8
8
|
--mfb-accent: #3b82f6;
|
|
9
9
|
--mfb-accent-contrast: #ffffff;
|
|
@@ -1690,7 +1690,7 @@
|
|
|
1690
1690
|
@media (prefers-reduced-motion: reduce) {
|
|
1691
1691
|
.skeleton-line { animation: none; }
|
|
1692
1692
|
}
|
|
1693
|
-
`;function
|
|
1693
|
+
`;function ho(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function Kt(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Dt,t.appendChild(r);let n=document.createElement("div");t.appendChild(n);let a={open:!1,status:"idle",tab:"send"},i=null;function s(d){a=d,Ae(ze(f,{state:d}),n)}function c(d){let{selectedReportId:h,...p}=d;return p}function f({state:d}){var w;let h=vt(async m=>{s({...a,status:"submitting"});try{await e.onSubmit(m),s({...a,status:"success"}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s({...a,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(u){typeof console!="undefined"&&console.warn("[mhosaic] submit:",u),s({...a,status:"error",error:e.strings["form.error"]})}},[]),p=(w=e.getExternalId)==null?void 0:w.call(e),[g,b]=R(!e.requiresVisibilityCheck);K(()=>{if(!e.requiresVisibilityCheck){b(!0);return}if(!p||!e.checkVisibility){b(!1);return}let m=!1;return e.checkVisibility(p).then(u=>{m||b(u)}).catch(()=>{m||b(!1)}),()=>{m=!0}},[p]);let x=ho(e,p,g),_=!!(e.api&&p);return o(N,{children:[x&&o(Mt,{label:e.strings["fab.label"],onClick:()=>s({...a,open:!0})}),d.open&&o($t,{onDismiss:()=>s(c({...a,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:d.tab==="board",children:[_&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":d.tab==="send",class:`tab-button ${d.tab==="send"?"is-active":""}`,onClick:()=>s(c({...a,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":d.tab==="mine",class:`tab-button ${d.tab==="mine"?"is-active":""}`,onClick:()=>s(c({...a,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":d.tab==="changelog",class:`tab-button ${d.tab==="changelog"?"is-active":""}`,onClick:()=>s(c({...a,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":d.tab==="board",class:`tab-button tab-button--board ${d.tab==="board"?"is-active":""}`,onClick:()=>s(c({...a,tab:"board"})),children:e.strings["tab.board"]})]}),d.tab==="send"&&o(Ft,{strings:e.strings,onSubmit:h,onCancel:()=>s({...a,open:!1,status:"idle"}),status:d.status,...d.error!==void 0&&{errorMessage:d.error}}),d.tab==="mine"&&e.api&&p&&!d.selectedReportId&&o(It,{api:e.api,externalId:p,strings:e.strings,onSelect:m=>s({...a,selectedReportId:m.id})}),(d.tab==="mine"||d.tab==="changelog")&&e.api&&p&&d.selectedReportId&&o(ye,{api:e.api,externalId:p,reportId:d.selectedReportId,strings:e.strings,onBack:()=>s(c({...a}))}),d.tab==="changelog"&&e.api&&p&&!d.selectedReportId&&o(Tt,{api:e.api,externalId:p,strings:e.strings,onSelect:m=>s({...a,selectedReportId:m.id})}),d.tab==="board"&&e.api&&p&&o(Et,{api:e.api,externalId:p,strings:e.strings})]})]})}return s(a),{open(){s({...a,open:!0})},close(){s({...a,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),Ae(null,n),e.host.innerHTML=""},notifyIdentityChanged(){s({...a})}}}function Wt(e){var b,x,_,w,m,u;let t=(b=e.env)!=null?b:"prod",r=(x=e.locale)!=null?x:typeof navigator!="undefined"?navigator.language:void 0,n=Ge((_=e.translations)!=null?_:{},r!==void 0?{locale:r}:{}),a=qe({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(w=e.metadata)!=null?w:{},c=We({apiKey:e.apiKey,endpoint:e.endpoint,...e.fetchImpl!==void 0&&{fetch:e.fetchImpl},...e.beforeSend!==void 0&&{beforeSend:e.beforeSend},getSignedIdentity:()=>!i||!i.userHash||!i.exp||!i.email?null:{userHash:i.userHash,exp:i.exp,email:i.email}}),f=[],d=document.createElement("div");if(d.className="mhosaic-feedback",e.attachTo){let l=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;l==null||l.appendChild(d)}else document.body.appendChild(d);async function h(l){var P,A,H,U,O;let y=l.synthetic?void 0:l.screenshot,C=a.snapshot();if(i){let{userHash:T,exp:X,...V}=i;C.user=V}s&&Object.keys(s).length>0&&(C.metadata={...s});let M=y?(P=l.capture_method)!=null?P:"manual":"none",E={description:l.description,feedback_type:(A=l.feedback_type)!=null?A:"bug",severity:(H=l.severity)!=null?H:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:M,technical_context:C};E.widget_version="0.20.0",y&&(E.screenshot=y),l.synthetic&&(E.synthetic=!0),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(E.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let L=E;for(let T of f)L=await T(L);try{let T=await c.submitReport(L);return(U=e.onSubmitSuccess)==null||U.call(e,T),a.clear(),T}catch(T){let X=T instanceof Error?T:new Error(String(T));throw(O=e.onError)==null||O.call(e,X),X}}let p=Kt({host:d,strings:n,showFAB:(m=e.showFAB)!=null?m:!0,onSubmit:async l=>{await h(l)},api:c,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(u=e.requiresVisibilityCheck)!=null?u:!1,checkVisibility:l=>c.checkVisibility(l,i==null?void 0:i.email)}),g={show(){p.open()},hide(){p.close()},open(l){p.open()},async submit(l){return h({description:l.description,...l.feedback_type!==void 0&&{feedback_type:l.feedback_type},...l.severity!==void 0&&{severity:l.severity},...l.synthetic!==void 0&&{synthetic:l.synthetic},...l.screenshot!==void 0&&{screenshot:l.screenshot}})},identify(l){i=l,p.notifyIdentityChanged()},setMetadata(l){s={...s,...l}},shutdown(){p.dispose(),a.dispose(),d.remove();let l=window;l.mhosaicFeedback===g&&delete l.mhosaicFeedback},_registerTransformer(l){f.push(l)}};return window.mhosaicFeedback=g,g}var go={enabled:!0,perFingerprintCooldownMs:3e5,sampleRate:1,maxDescriptionLen:200,globalRatePerMinute:30,maxDistinctFingerprints:200};function Ht(e){var t;if(e instanceof Error)return{name:e.name||"Error",message:String((t=e.message)!=null?t:""),...e.stack&&{stack:String(e.stack)}};if(typeof e=="string")return{name:"Error",message:e};if(e&&typeof e=="object"){let r=e;return{name:typeof r.name=="string"&&r.name||"Error",message:typeof r.message=="string"&&r.message||(()=>{try{return JSON.stringify(e)}catch(n){return String(e)}})(),...typeof r.stack=="string"&&{stack:r.stack}}}return{name:"Error",message:String(e)}}function vo(e,t){var a;let r=((a=e.stack)!=null?a:"").split(`
|
|
1694
1694
|
`).slice(0,4).join(`
|
|
1695
|
-
`),n=e.message.slice(0,30);return`${e.name}:${n}|${t}|${r}`}function
|
|
1695
|
+
`),n=e.message.slice(0,30);return`${e.name}:${n}|${t}|${r}`}function yo(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function Nt(e,t={}){let r={...go,...t};if(!r.enabled||typeof window=="undefined")return e;let n=e;if(n._errorTrackingArmed)return e;n._errorTrackingArmed=!0;let a=new Set,i=new Map,s=[];function c(g,b){if(r.globalRatePerMinute>0){let m=b-6e4;for(;s.length>0&&s[0]<m;)s.shift();if(s.length>=r.globalRatePerMinute)return!1}if(r.maxDistinctFingerprints>0&&!i.has(g)&&i.size>=r.maxDistinctFingerprints)return!1;if(r.perFingerprintCooldownMs<=0)return s.push(b),!0;let x=i.get(g);if(x!==void 0&&b-x<r.perFingerprintCooldownMs)return!1;let _=256,w=192;if(i.size>_){let m=b-r.perFingerprintCooldownMs*2;for(let[u,l]of i)l<m&&i.delete(u);if(i.size>_){let u=i.size-w,l=0;for(let y of i.keys()){if(l>=u)break;i.delete(y),l++}}}return s.push(b),!0}async function f(g){if(r.sampleRate<1&&Math.random()>=r.sampleRate)return;let b=vo(g,window.location.pathname);if(a.has(b))return;let x=Date.now();if(!c(b,x))return;i.set(b,x);let _=yo(g.message?`${g.name}: ${g.message}`:g.name,r.maxDescriptionLen);a.add(b);try{await n.submit({description:_,feedback_type:"bug",severity:"high",synthetic:!0})}catch(w){}finally{a.delete(b)}}function d(g){var x;let b=(x=g.error)!=null?x:{name:"Error",message:g.message,stack:`at ${g.filename}:${g.lineno}:${g.colno}`};f(Ht(b))}function h(g){f(Ht(g.reason))}window.addEventListener("error",d),window.addEventListener("unhandledrejection",h);let p=n.shutdown.bind(n);return n.shutdown=()=>{window.removeEventListener("error",d),window.removeEventListener("unhandledrejection",h),i.clear(),p()},e}function _o(e){let{errorTracking:t,...r}=e,n=Wt(r);return t!==!1&&Nt(n,typeof t=="object"?t:void 0),n}return Xt(xo);})();
|
|
1696
1696
|
//# sourceMappingURL=widget.min.js.map
|