@mhosaic/feedback 0.34.0 → 0.36.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/embed.min.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var MhosaicFeedback=(()=>{var Oe=Object.defineProperty;var Oo=Object.getOwnPropertyDescriptor;var No=Object.getOwnPropertyNames;var jo=Object.prototype.hasOwnProperty;var Wo=(e,t,r)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var Qt=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},Qo=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of No(t))!jo.call(e,n)&&n!==r&&Oe(e,n,{get:()=>t[n],enumerable:!(a=Oo(t,n))||a.enumerable});return e};var Uo=e=>Qo(Oe({},"__esModule",{value:!0}),e);var Me=(e,t,r)=>Wo(e,typeof t!="symbol"?t+"":t,r);function fe(e,t){for(var r in t)e[r]=t[r];return e}function yt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ye.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 Qe(e,s,a,n,null)}function Qe(e,t,r,a,n){var i={type:e,props:t,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n==null?++lr:n,__i:-1,__u:0};return n==null&&W.vnode!=null&&W.vnode(i),i}function oe(e){return e.children}function Ue(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 ca(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=fe({},t);i.__v=t.__v+1,W.vnode&&W.vnode(i),_t(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?Re(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,gr(a,i,n),t.__e=t.__=null,i.__e!=r&&ur(i)}}function ur(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}),ur(e)}function nr(e){(!e.__d&&(e.__d=!0)&&ge.push(e)&&!Xe.__r++||ar!=W.debounceRendering)&&((ar=W.debounceRendering)||cr)(Xe)}function Xe(){try{for(var e,t=1;ge.length;)ge.length>t&&ge.sort(dr),e=ge.shift(),t=ge.length,ca(e)}finally{ge.length=Xe.__r=0}}function fr(e,t,r,a,n,i,s,l,d,c,f){var p,u,h,k,C,x,w,P=a&&a.__k||Ge,L=t.length;for(d=da(r,t,P,d,L),p=0;p<L;p++)(h=r.__k[p])!=null&&(u=h.__i!=-1&&P[h.__i]||Ve,h.__i=p,x=_t(e,h,u,n,i,s,l,d,c,f),k=h.__e,h.ref&&u.ref!=h.ref&&(u.ref&&xt(u.ref,null,h),f.push(h.ref,h.__c||k,h)),C==null&&k!=null&&(C=k),(w=!!(4&h.__u))||u.__k===h.__k?(d=mr(h,d,e,w),w&&u.__e&&(u.__e=null)):typeof h.type=="function"&&x!==void 0?d=x:k&&(d=k.nextSibling),h.__u&=-7);return r.__e=C,d}function da(e,t,r,a,n){var i,s,l,d,c,f=r.length,p=f,u=0;for(e.__k=new Array(n),i=0;i<n;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]=Qe(null,s,null,null,null):Je(s)?s=e.__k[i]=Qe(oe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Qe(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,d=i+u,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=pa(s,r,d,p))!=-1&&(p--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>f?u--:n<f&&u++),typeof s.type!="function"&&(s.__u|=4)):c!=d&&(c==d-1?u--:c==d+1?u++:(c>d?u--:u++,s.__u|=4))):e.__k[i]=null;if(p)for(i=0;i<f;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=Re(l)),hr(l,l));return a}function mr(e,t,r,a){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=mr(n[i],t,r,a));return t}e.__e!=t&&(a&&(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 pa(e,t,r,a){var n,i,s,l=e.key,d=e.type,c=t[r],f=c!=null&&(2&c.__u)==0;if(c===null&&l==null||f&&l==c.key&&d==c.type)return r;if(a>(f?1:0)){for(n=r-1,i=r+1;n>=0||i<t.length;)if((c=t[s=n>=0?n--:i++])!=null&&(2&c.__u)==0&&l==c.key&&d==c.type)return s}return-1}function ir(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||la.test(t)?r:r+"px"}function je(e,t,r,a,n){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(t in a)r&&t in r||ir(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||ir(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(pr,"$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?a?r[Le]=a[Le]:(r[Le]=vt,e.addEventListener(t,i?bt:gt,i)):e.removeEventListener(t,i?bt:gt,i);else{if(n=="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 sr(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[We]==null)t[We]=vt++;else if(t[We]<r[Le])return;return r(W.event?W.event(t):t)}}}function _t(e,t,r,a,n,i,s,l,d,c){var f,p,u,h,k,C,x,w,P,L,S,g,y,b,B,E=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),i=[l=t.__e=r.__e]),(f=W.__b)&&f(t);e:if(typeof E=="function")try{if(w=t.props,P=E.prototype&&E.prototype.render,L=(f=E.contextType)&&a[f.__c],S=f?L?L.props.value:f.__:a,r.__c?x=(p=t.__c=r.__c).__=p.__E:(P?t.__c=p=new E(w,S):(t.__c=p=new Ue(w,S),p.constructor=E,p.render=fa),L&&L.sub(p),p.state||(p.state={}),p.__n=a,u=p.__d=!0,p.__h=[],p._sb=[]),P&&p.__s==null&&(p.__s=p.state),P&&E.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=fe({},p.__s)),fe(p.__s,E.getDerivedStateFromProps(w,p.__s))),h=p.props,k=p.state,p.__v=t,u)P&&E.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),P&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(P&&E.getDerivedStateFromProps==null&&w!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(w,S),t.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(w,p.__s,S)===!1){t.__v!=r.__v&&(p.props=w,p.state=p.__s,p.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(A){A&&(A.__=t)}),Ge.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(w,p.__s,S),P&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,k,C)})}if(p.context=S,p.props=w,p.__P=e,p.__e=!1,g=W.__r,y=0,P)p.state=p.__s,p.__d=!1,g&&g(t),f=p.render(p.props,p.state,p.context),Ge.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,g&&g(t),f=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++y<25);p.state=p.__s,p.getChildContext!=null&&(a=fe(fe({},a),p.getChildContext())),P&&!u&&p.getSnapshotBeforeUpdate!=null&&(C=p.getSnapshotBeforeUpdate(h,k)),b=f!=null&&f.type===oe&&f.key==null?br(f.props.children):f,l=fr(e,Je(b)?b:[b],t,r,a,n,i,s,l,d,c),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),x&&(p.__E=p.__=null)}catch(A){if(t.__v=null,d||i!=null)if(A.then){for(t.__u|=d?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(B=i.length;B--;)yt(i[B]);ht(t)}else t.__e=r.__e,t.__k=r.__k,A.then||ht(t);W.__e(A,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=ua(r.__e,t,r,a,n,i,s,d,c);return(f=W.diffed)&&f(t),128&t.__u?void 0:l}function ht(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ht))}function gr(e,t,r){for(var a=0;a<r.length;a++)xt(r[a],r[++a],r[++a]);W.__c&&W.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){W.__e(i,n.__v)}})}function br(e){return typeof e!="object"||e==null||e.__b>0?e:Je(e)?e.map(br):fe({},e)}function ua(e,t,r,a,n,i,s,l,d){var c,f,p,u,h,k,C,x=r.props||Ve,w=t.props,P=t.type;if(P=="svg"?n="http://www.w3.org/2000/svg":P=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!P&&(P?h.localName==P:h.nodeType==3)){e=h,i[c]=null;break}}if(e==null){if(P==null)return document.createTextNode(w);e=document.createElementNS(n,P,w.is&&w),l&&(W.__m&&W.__m(t,i),l=!1),i=null}if(P==null)x===w||l&&e.data==w||(e.data=w);else{if(i=i&&Ye.call(e.childNodes),!l&&i!=null)for(x={},c=0;c<e.attributes.length;c++)x[(h=e.attributes[c]).name]=h.value;for(c in x)h=x[c],c=="dangerouslySetInnerHTML"?p=h:c=="children"||c in w||c=="value"&&"defaultValue"in w||c=="checked"&&"defaultChecked"in w||je(e,c,null,h,n);for(c in w)h=w[c],c=="children"?u=h:c=="dangerouslySetInnerHTML"?f=h:c=="value"?k=h:c=="checked"?C=h:l&&typeof h!="function"||x[c]===h||je(e,c,h,x[c],n);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),fr(t.type=="template"?e.content:e,Je(u)?u:[u],t,r,a,P=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&Re(r,0),l,d),i!=null)for(c=i.length;c--;)yt(i[c]);l||(c="value",P=="progress"&&k==null?e.removeAttribute("value"):k!=null&&(k!==e[c]||P=="progress"&&!k||P=="option"&&k!=x[c])&&je(e,c,k,x[c],n),c="checked",C!=null&&C!=e[c]&&je(e,c,C,x[c],n))}return e}function xt(e,t,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&t==null||(e.__u=e(t))}else e.current=t}catch(n){W.__e(n,r)}}function hr(e,t,r){var a,n;if(W.unmount&&W.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||xt(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){W.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&hr(a[n],t,r||typeof e.type!="function");r||yt(e.__e),e.__c=e.__=e.__e=void 0}function fa(e,t,r){return this.constructor(e,r)}function qe(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),W.__&&W.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],_t(t,e=(!a&&r||t).__k=_(oe,null,[e]),n||Ve,Ve,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Ye.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),gr(i,e,s)}var Ye,W,lr,ia,ge,ar,cr,dr,mt,We,Le,pr,vt,gt,bt,sa,Ve,Ge,la,Je,de=ie(()=>{"use strict";Ve={},Ge=[],la=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Je=Array.isArray;Ye=Ge.slice,W={__e:function(e,t,r,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,a||{}),s=n.__d),s)return n.__E=n}catch(l){e=l}throw e}},lr=0,ia=function(e){return e!=null&&e.constructor===void 0},Ue.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=fe({},this.state),typeof e=="function"&&(e=e(fe({},r),this.props)),e&&fe(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),nr(this))},Ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),nr(this))},Ue.prototype.render=oe,ge=[],cr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,dr=function(e,t){return e.__v.__b-t.__v.__b},Xe.__r=0,mt=Math.random().toString(8),We="__d"+mt,Le="__a"+mt,pr=/(PointerCapture)$|Capture$/i,vt=0,gt=sr(!1),bt=sr(!0),sa=0});function et(e,t){X.__h&&X.__h(V,e,Be||t),Be=0;var r=V.__H||(V.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function R(e){return Be=1,ma(qr,e)}function ma(e,t,r){var a=et(Pe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):qr(void 0,t),function(l){var d=a.__N?a.__N[0]:a.__[0],c=a.t(d,l);d!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=V,!V.__f)){var n=function(l,d,c){if(!a.__c.__H)return!0;var f=a.__c.__H.__.filter(function(u){return u.__c});if(f.every(function(u){return!u.__N}))return!i||i.call(this,l,d,c);var p=a.__c.props!==l;return f.some(function(u){if(u.__N){var h=u.__[0];u.__=u.__N,u.__N=void 0,h!==u.__[0]&&(p=!0)}}),i&&i.call(this,l,d,c)||p};V.__f=!0;var i=V.shouldComponentUpdate,s=V.componentWillUpdate;V.componentWillUpdate=function(l,d,c){if(this.__e){var f=i;i=void 0,n(l,d,c),i=f}s&&s.call(this,l,d,c)},V.shouldComponentUpdate=n}return a.__N||a.__}function N(e,t){var r=et(Pe++,3);!X.__s&&Ct(r.__H,t)&&(r.__=e,r.u=t,V.__H.__h.push(r))}function St(e,t){var r=et(Pe++,4);!X.__s&&Ct(r.__H,t)&&(r.__=e,r.u=t,V.__h.push(r))}function U(e){return Be=5,ne(function(){return{current:e}},[])}function ne(e,t){var r=et(Pe++,7);return Ct(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function me(e,t){return Be=8,ne(function(){return e},t)}function ga(){for(var e;e=Rr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ze),t.__h.some(kt),t.__h=[]}catch(r){t.__h=[],X.__e(r,e.__v)}}}function ba(e){var t,r=function(){clearTimeout(a),Cr&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);Cr&&(t=requestAnimationFrame(r))}function Ze(e){var t=V,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),V=t}function kt(e){var t=V;e.__c=e.__(),V=t}function Ct(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function qr(e,t){return typeof t=="function"?t(e):t}var Pe,V,wt,vr,Be,Rr,X,yr,_r,xr,wr,kr,Sr,Cr,re=ie(()=>{"use strict";de();Be=0,Rr=[],X=W,yr=X.__b,_r=X.__r,xr=X.diffed,wr=X.__c,kr=X.unmount,Sr=X.__;X.__b=function(e){V=null,yr&&yr(e)},X.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Sr&&Sr(e,t)},X.__r=function(e){_r&&_r(e),Pe=0;var t=(V=e.__c).__H;t&&(wt===V?(t.__h=[],V.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Ze),t.__h.some(kt),t.__h=[],Pe=0)),wt=V},X.diffed=function(e){xr&&xr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Rr.push(t)!==1&&vr===X.requestAnimationFrame||((vr=X.requestAnimationFrame)||ba)(ga)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),wt=V=null},X.__c=function(e,t){t.some(function(r){try{r.__h.some(Ze),r.__h=r.__h.filter(function(a){return!a.__||kt(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],X.__e(a,r.__v)}}),wr&&wr(e,t)},X.unmount=function(e){kr&&kr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Ze(a)}catch(n){t=n}}),r.__H=void 0,t&&X.__e(t,r.__v))};Cr=typeof requestAnimationFrame=="function"});function ro(e){return e==="en"?Cn:Sn}var Sn,Cn,oo=ie(()=>{"use strict";Sn={"pastille.label":"Suivi des tests","pastille.loading":"Chargement\u2026","pastille.unavailable":"Statuts indisponibles","pastille.unknownPage":"Page inconnue","pastille.unknownPageHint":"Cette route n\u2019est pas encore au plan du site des tests.","panel.freshness":"Statuts g\xE9n\xE9r\xE9s le {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"Aucun sc\xE9nario li\xE9 \xE0 cette page.","panel.openSitemap":"Voir le plan du site","panel.sitemapLink":"Plan du site","panel.scenarioCountOne":"{count} sc\xE9nario","panel.scenarioCountMany":"{count} sc\xE9narios","panel.laneAutomated":"Automatis\xE9","panel.laneDev":"D\xE9v","panel.laneClient":"Client","lane.notTested":"Non test\xE9","lane.validatedBy":"Valid\xE9 par {by}","lane.rejectedBy":"Rejet\xE9 par {by}","lane.stale":"Valid\xE9 en v{version}, version actuelle v{current}","lane.clientPending":"Non test\xE9 \u2014 plateforme requise","lane.bot":"Automatis\xE9 (bot)","lane.code":"D\xE9veloppeur (code)","lane.human":"Humain","laneState.ok":"\xC0 jour","laneState.issue":"Probl\xE8me","laneState.none":"Non fait / p\xE9rim\xE9","color.green":"Valid\xE9","color.yellow":"En attente","color.red":"En \xE9chec","color.gray":"Non couvert","automated.passing":"R\xE9ussi","automated.failing":"En \xE9chec","automated.flaky":"Instable","automated.neverRun":"Jamais ex\xE9cut\xE9","source.testgen":"g\xE9n\xE9r\xE9","source.testgenHint":"Sc\xE9nario g\xE9n\xE9r\xE9 automatiquement (testgen)","suite.cases":"{count} cas","case.covered":"auto","case.manual":"manuel","case.blocked":"bloqu\xE9","case.openQuestion":"question produit","grounding.verified":"attendu v\xE9rifi\xE9","grounding.confirmLive":"\xE0 confirmer en live","grounding.productQuestion":"d\xE9cision produit","modal.title":"Plan du site \u2014 suivi des tests","modal.close":"Fermer","modal.tabPages":"Pages","modal.tabScenarios":"Sc\xE9narios","modal.youAreHere":"vous \xEAtes ici","modal.search":"Filtrer les sc\xE9narios\u2026","modal.noMatch":"Aucun sc\xE9nario ne correspond au filtre.","modal.traversed":"Travers\xE9es","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages avec \u2265 1 sc\xE9nario","modal.kpiScenariosPassing":"Sc\xE9narios passants","panel.noTests":"Aucun test ne couvre encore cette page.","panel.unknownPage":"Page inconnue du registre QA."},Cn={"pastille.label":"Test tracking","pastille.loading":"Loading\u2026","pastille.unavailable":"Statuses unavailable","pastille.unknownPage":"Unknown page","pastille.unknownPageHint":"This route isn\u2019t in the test sitemap yet.","panel.freshness":"Statuses generated on {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"No scenario linked to this page.","panel.openSitemap":"View sitemap","panel.sitemapLink":"Sitemap","panel.scenarioCountOne":"{count} scenario","panel.scenarioCountMany":"{count} scenarios","panel.laneAutomated":"Automated","panel.laneDev":"Dev","panel.laneClient":"Client","lane.notTested":"Not tested","lane.validatedBy":"Validated by {by}","lane.rejectedBy":"Rejected by {by}","lane.stale":"Validated in v{version}, current version v{current}","lane.clientPending":"Not tested \u2014 platform required","lane.bot":"Automated (bot)","lane.code":"Developer (code)","lane.human":"Human","laneState.ok":"Up to date","laneState.issue":"Issue","laneState.none":"Not done / stale","color.green":"Validated","color.yellow":"Pending","color.red":"Failing","color.gray":"Not covered","automated.passing":"Passing","automated.failing":"Failing","automated.flaky":"Flaky","automated.neverRun":"Never run","source.testgen":"generated","source.testgenHint":"Auto-generated scenario (testgen)","suite.cases":"{count} cases","case.covered":"auto","case.manual":"manual","case.blocked":"blocked","case.openQuestion":"product question","grounding.verified":"expected verified","grounding.confirmLive":"confirm live","grounding.productQuestion":"product decision","modal.title":"Sitemap \u2014 test tracking","modal.close":"Close","modal.tabPages":"Pages","modal.tabScenarios":"Scenarios","modal.youAreHere":"you are here","modal.search":"Filter scenarios\u2026","modal.noMatch":"No scenario matches the filter.","modal.traversed":"Traversed","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages with \u2265 1 scenario","modal.kpiScenariosPassing":"Passing scenarios","panel.noTests":"No tests cover this page yet.","panel.unknownPage":"Page unknown to the QA registry."}});function Mt(e){if(!e)return"/";let t=e.startsWith("/")?e:`/${e}`;return t=t.replace(/\/{2,}/g,"/"),t.length>1&&(t=t.replace(/\/+$/,"")),t.length>0?t:"/"}function Rn(e,t){let r=t.length;for(;r>0;){let a=t[r-1];if(a!==void 0&&a.startsWith(":")&&a.endsWith("?"))r--;else break}return e.length<r||e.length>t.length?!1:e.every((a,n)=>{let i=t[n];return i!==void 0&&(i.startsWith(":")||i===a)})}function no(e,t){let r=ao(Mt(e)),a=null,n=-1;for(let i of t){let s=ao(i);if(!Rn(r,s))continue;let d=s.filter(c=>!c.startsWith(":")).length*100+s.length;d>n&&(a=i,n=d)}return a}var ao,At=ie(()=>{"use strict";ao=e=>e.split("/").filter(Boolean)});var io,so=ie(()=>{"use strict";io=`
1
+ "use strict";var MhosaicFeedback=(()=>{var Oe=Object.defineProperty;var Oo=Object.getOwnPropertyDescriptor;var No=Object.getOwnPropertyNames;var Wo=Object.prototype.hasOwnProperty;var jo=(e,t,r)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var Qt=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},Qo=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of No(t))!Wo.call(e,n)&&n!==r&&Oe(e,n,{get:()=>t[n],enumerable:!(a=Oo(t,n))||a.enumerable});return e};var Uo=e=>Qo(Oe({},"__esModule",{value:!0}),e);var Ae=(e,t,r)=>jo(e,typeof t!="symbol"?t+"":t,r);function fe(e,t){for(var r in t)e[r]=t[r];return e}function xt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ye.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 Qe(e,s,a,n,null)}function Qe(e,t,r,a,n){var i={type:e,props:t,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n==null?++lr:n,__i:-1,__u:0};return n==null&&Q.vnode!=null&&Q.vnode(i),i}function oe(e){return e.children}function Ue(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 da(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=fe({},t);i.__v=t.__v+1,Q.vnode&&Q.vnode(i),_t(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?Re(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,gr(a,i,n),t.__e=t.__=null,i.__e!=r&&ur(i)}}function ur(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}),ur(e)}function nr(e){(!e.__d&&(e.__d=!0)&&ge.push(e)&&!Xe.__r++||ar!=Q.debounceRendering)&&((ar=Q.debounceRendering)||dr)(Xe)}function Xe(){try{for(var e,t=1;ge.length;)ge.length>t&&ge.sort(cr),e=ge.shift(),t=ge.length,da(e)}finally{ge.length=Xe.__r=0}}function fr(e,t,r,a,n,i,s,l,c,d,u){var p,f,b,k,R,x,_,P=a&&a.__k||Ge,z=t.length;for(c=ca(r,t,P,c,z),p=0;p<z;p++)(b=r.__k[p])!=null&&(f=b.__i!=-1&&P[b.__i]||Ve,b.__i=p,x=_t(e,b,f,n,i,s,l,c,d,u),k=b.__e,b.ref&&f.ref!=b.ref&&(f.ref&&wt(f.ref,null,b),u.push(b.ref,b.__c||k,b)),R==null&&k!=null&&(R=k),(_=!!(4&b.__u))||f.__k===b.__k?(c=mr(b,c,e,_),_&&f.__e&&(f.__e=null)):typeof b.type=="function"&&x!==void 0?c=x:k&&(c=k.nextSibling),b.__u&=-7);return r.__e=R,c}function ca(e,t,r,a,n){var i,s,l,c,d,u=r.length,p=u,f=0;for(e.__k=new Array(n),i=0;i<n;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]=Qe(null,s,null,null,null):Je(s)?s=e.__k[i]=Qe(oe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Qe(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,c=i+f,s.__=e,s.__b=e.__b+1,l=null,(d=s.__i=pa(s,r,c,p))!=-1&&(p--,(l=r[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(n>u?f--:n<u&&f++),typeof s.type!="function"&&(s.__u|=4)):d!=c&&(d==c-1?f--:d==c+1?f++:(d>c?f--:f++,s.__u|=4))):e.__k[i]=null;if(p)for(i=0;i<u;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=Re(l)),hr(l,l));return a}function mr(e,t,r,a){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=mr(n[i],t,r,a));return t}e.__e!=t&&(a&&(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 pa(e,t,r,a){var n,i,s,l=e.key,c=e.type,d=t[r],u=d!=null&&(2&d.__u)==0;if(d===null&&l==null||u&&l==d.key&&c==d.type)return r;if(a>(u?1:0)){for(n=r-1,i=r+1;n>=0||i<t.length;)if((d=t[s=n>=0?n--:i++])!=null&&(2&d.__u)==0&&l==d.key&&c==d.type)return s}return-1}function ir(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||la.test(t)?r:r+"px"}function We(e,t,r,a,n){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(t in a)r&&t in r||ir(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||ir(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(pr,"$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?a?r[Le]=a[Le]:(r[Le]=yt,e.addEventListener(t,i?ht:bt,i)):e.removeEventListener(t,i?ht:bt,i);else{if(n=="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 sr(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[je]==null)t[je]=yt++;else if(t[je]<r[Le])return;return r(Q.event?Q.event(t):t)}}}function _t(e,t,r,a,n,i,s,l,c,d){var u,p,f,b,k,R,x,_,P,z,w,m,v,T,F,h=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),i=[l=t.__e=r.__e]),(u=Q.__b)&&u(t);e:if(typeof h=="function")try{if(_=t.props,P=h.prototype&&h.prototype.render,z=(u=h.contextType)&&a[u.__c],w=u?z?z.props.value:u.__:a,r.__c?x=(p=t.__c=r.__c).__=p.__E:(P?t.__c=p=new h(_,w):(t.__c=p=new Ue(_,w),p.constructor=h,p.render=fa),z&&z.sub(p),p.state||(p.state={}),p.__n=a,f=p.__d=!0,p.__h=[],p._sb=[]),P&&p.__s==null&&(p.__s=p.state),P&&h.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=fe({},p.__s)),fe(p.__s,h.getDerivedStateFromProps(_,p.__s))),b=p.props,k=p.state,p.__v=t,f)P&&h.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),P&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(P&&h.getDerivedStateFromProps==null&&_!==b&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(_,w),t.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(_,p.__s,w)===!1){t.__v!=r.__v&&(p.props=_,p.state=p.__s,p.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(B){B&&(B.__=t)}),Ge.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(_,p.__s,w),P&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(b,k,R)})}if(p.context=w,p.props=_,p.__P=e,p.__e=!1,m=Q.__r,v=0,P)p.state=p.__s,p.__d=!1,m&&m(t),u=p.render(p.props,p.state,p.context),Ge.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,m&&m(t),u=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++v<25);p.state=p.__s,p.getChildContext!=null&&(a=fe(fe({},a),p.getChildContext())),P&&!f&&p.getSnapshotBeforeUpdate!=null&&(R=p.getSnapshotBeforeUpdate(b,k)),T=u!=null&&u.type===oe&&u.key==null?br(u.props.children):u,l=fr(e,Je(T)?T:[T],t,r,a,n,i,s,l,c,d),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),x&&(p.__E=p.__=null)}catch(B){if(t.__v=null,c||i!=null)if(B.then){for(t.__u|=c?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--;)xt(i[F]);vt(t)}else t.__e=r.__e,t.__k=r.__k,B.then||vt(t);Q.__e(B,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=ua(r.__e,t,r,a,n,i,s,c,d);return(u=Q.diffed)&&u(t),128&t.__u?void 0:l}function vt(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(vt))}function gr(e,t,r){for(var a=0;a<r.length;a++)wt(r[a],r[++a],r[++a]);Q.__c&&Q.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){Q.__e(i,n.__v)}})}function br(e){return typeof e!="object"||e==null||e.__b>0?e:Je(e)?e.map(br):fe({},e)}function ua(e,t,r,a,n,i,s,l,c){var d,u,p,f,b,k,R,x=r.props||Ve,_=t.props,P=t.type;if(P=="svg"?n="http://www.w3.org/2000/svg":P=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((b=i[d])&&"setAttribute"in b==!!P&&(P?b.localName==P:b.nodeType==3)){e=b,i[d]=null;break}}if(e==null){if(P==null)return document.createTextNode(_);e=document.createElementNS(n,P,_.is&&_),l&&(Q.__m&&Q.__m(t,i),l=!1),i=null}if(P==null)x===_||l&&e.data==_||(e.data=_);else{if(i=i&&Ye.call(e.childNodes),!l&&i!=null)for(x={},d=0;d<e.attributes.length;d++)x[(b=e.attributes[d]).name]=b.value;for(d in x)b=x[d],d=="dangerouslySetInnerHTML"?p=b:d=="children"||d in _||d=="value"&&"defaultValue"in _||d=="checked"&&"defaultChecked"in _||We(e,d,null,b,n);for(d in _)b=_[d],d=="children"?f=b:d=="dangerouslySetInnerHTML"?u=b:d=="value"?k=b:d=="checked"?R=b:l&&typeof b!="function"||x[d]===b||We(e,d,b,x[d],n);if(u)l||p&&(u.__html==p.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(p&&(e.innerHTML=""),fr(t.type=="template"?e.content:e,Je(f)?f:[f],t,r,a,P=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&Re(r,0),l,c),i!=null)for(d=i.length;d--;)xt(i[d]);l||(d="value",P=="progress"&&k==null?e.removeAttribute("value"):k!=null&&(k!==e[d]||P=="progress"&&!k||P=="option"&&k!=x[d])&&We(e,d,k,x[d],n),d="checked",R!=null&&R!=e[d]&&We(e,d,R,x[d],n))}return e}function wt(e,t,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&t==null||(e.__u=e(t))}else e.current=t}catch(n){Q.__e(n,r)}}function hr(e,t,r){var a,n;if(Q.unmount&&Q.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||wt(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){Q.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&hr(a[n],t,r||typeof e.type!="function");r||xt(e.__e),e.__c=e.__=e.__e=void 0}function fa(e,t,r){return this.constructor(e,r)}function qe(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),Q.__&&Q.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],_t(t,e=(!a&&r||t).__k=y(oe,null,[e]),n||Ve,Ve,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Ye.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),gr(i,e,s)}var Ye,Q,lr,ia,ge,ar,dr,cr,gt,je,Le,pr,yt,bt,ht,sa,Ve,Ge,la,Je,ce=ie(()=>{"use strict";Ve={},Ge=[],la=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Je=Array.isArray;Ye=Ge.slice,Q={__e:function(e,t,r,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,a||{}),s=n.__d),s)return n.__E=n}catch(l){e=l}throw e}},lr=0,ia=function(e){return e!=null&&e.constructor===void 0},Ue.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=fe({},this.state),typeof e=="function"&&(e=e(fe({},r),this.props)),e&&fe(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),nr(this))},Ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),nr(this))},Ue.prototype.render=oe,ge=[],dr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,cr=function(e,t){return e.__v.__b-t.__v.__b},Xe.__r=0,gt=Math.random().toString(8),je="__d"+gt,Le="__a"+gt,pr=/(PointerCapture)$|Capture$/i,yt=0,bt=sr(!1),ht=sr(!0),sa=0});function et(e,t){Y.__h&&Y.__h(V,e,Be||t),Be=0;var r=V.__H||(V.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function q(e){return Be=1,ma(qr,e)}function ma(e,t,r){var a=et(Pe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):qr(void 0,t),function(l){var c=a.__N?a.__N[0]:a.__[0],d=a.t(c,l);c!==d&&(a.__N=[d,a.__[1]],a.__c.setState({}))}],a.__c=V,!V.__f)){var n=function(l,c,d){if(!a.__c.__H)return!0;var u=a.__c.__H.__.filter(function(f){return f.__c});if(u.every(function(f){return!f.__N}))return!i||i.call(this,l,c,d);var p=a.__c.props!==l;return u.some(function(f){if(f.__N){var b=f.__[0];f.__=f.__N,f.__N=void 0,b!==f.__[0]&&(p=!0)}}),i&&i.call(this,l,c,d)||p};V.__f=!0;var i=V.shouldComponentUpdate,s=V.componentWillUpdate;V.componentWillUpdate=function(l,c,d){if(this.__e){var u=i;i=void 0,n(l,c,d),i=u}s&&s.call(this,l,c,d)},V.shouldComponentUpdate=n}return a.__N||a.__}function j(e,t){var r=et(Pe++,3);!Y.__s&&Rt(r.__H,t)&&(r.__=e,r.u=t,V.__H.__h.push(r))}function Ct(e,t){var r=et(Pe++,4);!Y.__s&&Rt(r.__H,t)&&(r.__=e,r.u=t,V.__h.push(r))}function U(e){return Be=5,ne(function(){return{current:e}},[])}function ne(e,t){var r=et(Pe++,7);return Rt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function me(e,t){return Be=8,ne(function(){return e},t)}function ga(){for(var e;e=Rr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ze),t.__h.some(St),t.__h=[]}catch(r){t.__h=[],Y.__e(r,e.__v)}}}function ba(e){var t,r=function(){clearTimeout(a),Cr&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);Cr&&(t=requestAnimationFrame(r))}function Ze(e){var t=V,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),V=t}function St(e){var t=V;e.__c=e.__(),V=t}function Rt(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function qr(e,t){return typeof t=="function"?t(e):t}var Pe,V,kt,vr,Be,Rr,Y,yr,xr,_r,wr,kr,Sr,Cr,re=ie(()=>{"use strict";ce();Be=0,Rr=[],Y=Q,yr=Y.__b,xr=Y.__r,_r=Y.diffed,wr=Y.__c,kr=Y.unmount,Sr=Y.__;Y.__b=function(e){V=null,yr&&yr(e)},Y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Sr&&Sr(e,t)},Y.__r=function(e){xr&&xr(e),Pe=0;var t=(V=e.__c).__H;t&&(kt===V?(t.__h=[],V.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Ze),t.__h.some(St),t.__h=[],Pe=0)),kt=V},Y.diffed=function(e){_r&&_r(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Rr.push(t)!==1&&vr===Y.requestAnimationFrame||((vr=Y.requestAnimationFrame)||ba)(ga)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),kt=V=null},Y.__c=function(e,t){t.some(function(r){try{r.__h.some(Ze),r.__h=r.__h.filter(function(a){return!a.__||St(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],Y.__e(a,r.__v)}}),wr&&wr(e,t)},Y.unmount=function(e){kr&&kr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Ze(a)}catch(n){t=n}}),r.__H=void 0,t&&Y.__e(t,r.__v))};Cr=typeof requestAnimationFrame=="function"});function ro(e){return e==="en"?Rn:Cn}var Cn,Rn,oo=ie(()=>{"use strict";Cn={"pastille.label":"Suivi des tests","pastille.loading":"Chargement\u2026","pastille.unavailable":"Statuts indisponibles","pastille.unknownPage":"Page inconnue","pastille.unknownPageHint":"Cette route n\u2019est pas encore au plan du site des tests.","panel.freshness":"Statuts g\xE9n\xE9r\xE9s le {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"Aucun sc\xE9nario li\xE9 \xE0 cette page.","panel.openSitemap":"Voir le plan du site","panel.sitemapLink":"Plan du site","panel.scenarioCountOne":"{count} sc\xE9nario","panel.scenarioCountMany":"{count} sc\xE9narios","panel.laneAutomated":"Automatis\xE9","panel.laneDev":"D\xE9v","panel.laneClient":"Client","lane.notTested":"Non test\xE9","lane.validatedBy":"Valid\xE9 par {by}","lane.rejectedBy":"Rejet\xE9 par {by}","lane.stale":"Valid\xE9 en v{version}, version actuelle v{current}","lane.clientPending":"Non test\xE9 \u2014 plateforme requise","lane.bot":"Automatis\xE9 (bot)","lane.code":"D\xE9veloppeur (code)","lane.human":"Humain","laneState.ok":"\xC0 jour","laneState.issue":"Probl\xE8me","laneState.none":"Non fait / p\xE9rim\xE9","color.green":"Valid\xE9","color.yellow":"En attente","color.red":"En \xE9chec","color.gray":"Non couvert","automated.passing":"R\xE9ussi","automated.failing":"En \xE9chec","automated.flaky":"Instable","automated.neverRun":"Jamais ex\xE9cut\xE9","source.testgen":"g\xE9n\xE9r\xE9","source.testgenHint":"Sc\xE9nario g\xE9n\xE9r\xE9 automatiquement (testgen)","suite.cases":"{count} cas","case.covered":"auto","case.manual":"manuel","case.blocked":"bloqu\xE9","case.openQuestion":"question produit","grounding.verified":"attendu v\xE9rifi\xE9","grounding.confirmLive":"\xE0 confirmer en live","grounding.productQuestion":"d\xE9cision produit","modal.title":"Plan du site \u2014 suivi des tests","modal.close":"Fermer","modal.tabPages":"Pages","modal.tabScenarios":"Sc\xE9narios","modal.youAreHere":"vous \xEAtes ici","modal.search":"Filtrer les sc\xE9narios\u2026","modal.noMatch":"Aucun sc\xE9nario ne correspond au filtre.","modal.traversed":"Travers\xE9es","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages avec \u2265 1 sc\xE9nario","modal.kpiScenariosPassing":"Sc\xE9narios passants","panel.noTests":"Aucun test ne couvre encore cette page.","panel.unknownPage":"Page inconnue du registre QA."},Rn={"pastille.label":"Test tracking","pastille.loading":"Loading\u2026","pastille.unavailable":"Statuses unavailable","pastille.unknownPage":"Unknown page","pastille.unknownPageHint":"This route isn\u2019t in the test sitemap yet.","panel.freshness":"Statuses generated on {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"No scenario linked to this page.","panel.openSitemap":"View sitemap","panel.sitemapLink":"Sitemap","panel.scenarioCountOne":"{count} scenario","panel.scenarioCountMany":"{count} scenarios","panel.laneAutomated":"Automated","panel.laneDev":"Dev","panel.laneClient":"Client","lane.notTested":"Not tested","lane.validatedBy":"Validated by {by}","lane.rejectedBy":"Rejected by {by}","lane.stale":"Validated in v{version}, current version v{current}","lane.clientPending":"Not tested \u2014 platform required","lane.bot":"Automated (bot)","lane.code":"Developer (code)","lane.human":"Human","laneState.ok":"Up to date","laneState.issue":"Issue","laneState.none":"Not done / stale","color.green":"Validated","color.yellow":"Pending","color.red":"Failing","color.gray":"Not covered","automated.passing":"Passing","automated.failing":"Failing","automated.flaky":"Flaky","automated.neverRun":"Never run","source.testgen":"generated","source.testgenHint":"Auto-generated scenario (testgen)","suite.cases":"{count} cases","case.covered":"auto","case.manual":"manual","case.blocked":"blocked","case.openQuestion":"product question","grounding.verified":"expected verified","grounding.confirmLive":"confirm live","grounding.productQuestion":"product decision","modal.title":"Sitemap \u2014 test tracking","modal.close":"Close","modal.tabPages":"Pages","modal.tabScenarios":"Scenarios","modal.youAreHere":"you are here","modal.search":"Filter scenarios\u2026","modal.noMatch":"No scenario matches the filter.","modal.traversed":"Traversed","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages with \u2265 1 scenario","modal.kpiScenariosPassing":"Passing scenarios","panel.noTests":"No tests cover this page yet.","panel.unknownPage":"Page unknown to the QA registry."}});function At(e){if(!e)return"/";let t=e.startsWith("/")?e:`/${e}`;return t=t.replace(/\/{2,}/g,"/"),t.length>1&&(t=t.replace(/\/+$/,"")),t.length>0?t:"/"}function qn(e,t){let r=t.length;for(;r>0;){let a=t[r-1];if(a!==void 0&&a.startsWith(":")&&a.endsWith("?"))r--;else break}return e.length<r||e.length>t.length?!1:e.every((a,n)=>{let i=t[n];return i!==void 0&&(i.startsWith(":")||i===a)})}function no(e,t){let r=ao(At(e)),a=null,n=-1;for(let i of t){let s=ao(i);if(!qn(r,s))continue;let c=s.filter(d=>!d.startsWith(":")).length*100+s.length;c>n&&(a=i,n=c)}return a}var ao,Mt=ie(()=>{"use strict";ao=e=>e.split("/").filter(Boolean)});var io,so=ie(()=>{"use strict";io=`
2
2
  :host {
3
3
  --mqa-z-index: 2147483639;
4
4
  --mqa-z-panel: 2147483638;
@@ -613,12 +613,12 @@
613
613
  background: var(--mqa-surface);
614
614
  border-radius: 4px;
615
615
  }
616
- `});function Ie(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function he(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function st(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function lt(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function ct(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var Fe,lo,co,po,uo,dt=ie(()=>{"use strict";Fe={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},lo={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},co={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},po={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},uo={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function fo({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[lo[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return _("div",{class:"qa-pastille"},_("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${Fe[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},_("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},_("polyline",{points:"1,6 7,6 9,2 12,10 15,4 17,6 23,6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))))}var mo=ie(()=>{"use strict";de();dt()});function De({dev:e,bot:t,human:r,strings:a}){return _("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},_("span",{class:`qa-lanes__icon qa-lane ${Lt[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},_("path",{d:"M8 7l-5 5 5 5M16 7l5 5-5 5",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"}))),_("span",{class:`qa-lanes__icon qa-lane ${Lt[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),_("path",{d:"M12 4.5v4"}),_("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),_("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),_("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),_("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),_("span",{class:`qa-lanes__icon qa-lane ${Lt[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_("circle",{cx:"12",cy:"8",r:"3.6"}),_("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var Lt,Bt=ie(()=>{"use strict";de();Lt={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function qn(e){return{dev:he(e.dev),bot:Ie(e.automated),human:he(e.client)}}function Pn(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",d=(i=t.get(l))!=null?i:[];d.push(s),t.set(l,d)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var d,c,f;let l=t.get(s);return{key:s,label:(f=(c=(d=l[0])==null?void 0:d.group)==null?void 0:c.label)!=null?f:"",scenarios:l}})}function go(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function bo({scenario:e,strings:t}){let r=qn(e),a=e.automated.provenance;return _("li",{class:"qa-row","data-testid":"qa-scenario-row"},_("span",{class:"qa-row__title"},e.priority?_("span",{class:`qa-tag ${co[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,_("span",{class:"qa-row__name"},e.title),e.source==="testgen"?_("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?_("span",{class:"qa-tag"},t[po[e.caseStatus]]):null,e.grounding?_("span",{class:"qa-tag"},t[uo[e.grounding]]):null,a?_("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),_(De,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function ho({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=R(new Set),s=f=>{i(p=>{let u=new Set(p);return u.has(f)?u.delete(f):u.add(f),u})},l=go(a["panel.freshness"],{date:lt(r.generated_at),version:ct(r.app_version),env:r.environment}),d;if(t==="no-tests")d=_("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")d=_("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let f=(c=e==null?void 0:e.scenarios)!=null?c:[],p=f.some(u=>u.group);if(f.length===0)d=_("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!p)d=_("ul",{class:"qa-panel__list"},f.map(u=>_(bo,{key:u.id,scenario:u,strings:a})));else{let u=Pn(f);d=_("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},u.map(h=>{let k=n.has(h.key),C={dev:st(h.scenarios.map(x=>he(x.dev))),bot:st(h.scenarios.map(x=>Ie(x.automated))),human:st(h.scenarios.map(x=>he(x.client)))};return _("li",{key:h.key,class:"qa-suite","data-testid":"qa-panel-group"},_("button",{type:"button",class:"qa-suite__head","aria-expanded":k,"data-testid":"qa-suite-group",onClick:()=>s(h.key)},_("span",{class:`qa-suite__chev ${k?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),_("span",{class:"qa-suite__key"},h.key),_("span",{class:"qa-suite__label"},h.label),_("span",{class:"qa-suite__count"},go(a["suite.cases"],{count:h.scenarios.length})),_(De,{dev:C.dev,bot:C.bot,human:C.human,strings:a})),k?_("ul",{class:"qa-suite__list"},h.scenarios.map(x=>_(bo,{key:x.id,scenario:x,strings:a}))):null)}))}}return _("section",{class:"qa-panel","data-testid":"qa-panel"},d,_("footer",{class:"qa-panel__foot"},_("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var vo=ie(()=>{"use strict";de();re();Bt();dt()});function En(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,d;for(let c of(l=t.get(i))!=null?l:[]){let f=(d=t.get(c.id))!=null?d:[];r.push({node:c,depth:s,hasChildren:f.length>0}),f.length>0&&a(c.id,s+1)}};return a(null,0),r}function Tn(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let d=(a=l.external_key)!=null?a:l.id,c=(n=t.get(d))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let f of(i=l.pages)!=null?i:[])(f.role==="primary"?c.primaries:c.traversed).add(f.pattern);t.set(d,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var f,p,u,h;let d=(p=(f=s.scenario.group)==null?void 0:f.key)!=null?p:"~",c=(h=(u=l.scenario.group)==null?void 0:u.key)!=null?h:"~";return d!==c?d.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function yo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function _o(e){return`${Math.round(e)}%`}function xo({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=R("pages"),[s,l]=R("");N(()=>{let x=w=>{w.key==="Escape"&&a()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[a]);let d=t?Mt(t):null,c=ne(()=>En(e.sitemap),[e]),f=ne(()=>Tn(e),[e]),p=ne(()=>{let x=new Map;for(let w of e.sitemap)x.set(w.path_pattern,w.title);return x},[e]),u=x=>{var w;return(w=p.get(x))!=null?w:x},h=s.trim().toLowerCase(),k=h?f.filter(x=>{var w,P;return x.scenario.title.toLowerCase().includes(h)||((P=(w=x.scenario.group)==null?void 0:w.label)!=null?P:"").toLowerCase().includes(h)}):f,C=yo(r["panel.freshness"],{date:lt(e.generated_at),version:ct(e.app_version),env:e.environment});return _("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:x=>{x.target===x.currentTarget&&a()}},_("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},_("header",{class:"qa-modal__head"},_("h3",null,r["modal.title"]),_("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),_("div",{class:"qa-modal__freshness"},C),_("div",{class:"qa-kpi","data-testid":"qa-kpi"},_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},_o(e.metric.pages_with_scenarios_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},_o(e.metric.scenarios_passing_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),_("nav",{class:"qa-tabs"},_("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),_("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),_("div",{class:"qa-modal__body"},n==="pages"?_("ul",{class:"qa-tree"},c.map(x=>{let w=d!==null&&x.node.path_pattern===d;return _("li",{key:x.node.id,class:`qa-tree__row ${w?"qa-tree__row--here":""}`,"data-testid":w?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+x.depth*1.1}rem`}},_("span",{class:`qa-dot ${Fe[x.node.color]}`,"aria-hidden":"true"}),_("span",{class:`qa-tree__title ${x.node.structural?"qa-tree__title--structural":""}`},x.node.title||x.node.path_pattern),w?_("span",{class:"qa-tree__here"},` ${x.node.path_pattern} `):null,w?_("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,_("span",{class:"qa-tree__count"},String(x.node.counts.scenarios)))})):_("div",{class:"qa-scenarios"},_("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:x=>l(x.target.value)}),k.length===0?_("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):_("ul",{class:"qa-scenarios__list"},k.map(x=>{var S,g;let w=x.scenario,P={dev:he(w.dev),bot:Ie(w.automated),human:he(w.client)},L=[...x.traversed].map(u);return _("li",{key:(S=w.external_key)!=null?S:w.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},_("div",{class:"qa-scenarios__line"},_("span",{class:`qa-dot ${Fe[w.color]}`,"aria-hidden":"true"}),(g=w.group)!=null&&g.key?_("span",{class:"qa-suitekey"},w.group.key):null,_("span",{class:"qa-scenarios__title"},w.title),w.source==="testgen"?_("span",{class:"qa-tag"},r["source.testgen"]):null,_(De,{dev:P.dev,bot:P.bot,human:P.human,strings:r})),_("div",{class:"qa-scenarios__pages"},x.primaries.size?_("span",{class:"qa-scenarios__primary"},yo(r["modal.appliesTo"],{count:x.primaries.size})):null,L.length?_("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${L.join(", ")}`):null))}))))))}var wo=ie(()=>{"use strict";de();re();Bt();At();dt()});function Mn(){if(pt++,ut)return;ut=!0,Ke=history.pushState,$e=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(zt))};history.pushState=function(...r){let a=Ke.apply(this,r);return e(),a},history.replaceState=function(...r){let a=$e.apply(this,r);return e(),a}}function An(){pt>0&&pt--,!(pt>0||!ut)&&(ut=!1,Ke&&(history.pushState=Ke),$e&&(history.replaceState=$e),Ke=null,$e=null)}function ko(e){return typeof e=="object"&&e!==null&&e.format===Ln}function Co(){So||(So=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function zn(e){let t=new Set;for(let r of e.pages)r.page&&t.add(r.page.path_pattern);for(let r of e.sitemap)t.add(r.path_pattern);return[...t]}function In(e,t){if(!e||!t)return Fn;let r=e.pages.find(n=>n.page&&n.page.path_pattern===t);return r&&r.page?{state:"known",color:r.color,pattern:t,page:r}:e.sitemap.some(n=>n.path_pattern===t)?{state:"no-tests",color:"gray",pattern:t,page:null}:{state:"unknown-page",color:"gray",pattern:t,page:null}}function Ro(e){var b,B,E,A;let{source:t}=e,r=ro((b=e.locale)!=null?b:"fr"),a=typeof t=="object"?t:null;if(a&&!ko(a))return Co(),Bn;let n=a,i=!1,s=null;function l(){if(n||i)return;i=!0,s=(typeof t=="function"?t():typeof t=="string"?fetch(t).then(D=>D.json()):Promise.resolve(t)).then(D=>{ko(D)?(n=D,u()):Co()}).catch(()=>{})}let d=document.createElement("div");d.setAttribute("data-mqa-host",""),d.setAttribute("data-mqa-size",(B=e.size)!=null?B:"md"),((E=e.position)==null?void 0:E.right)!==void 0&&d.style.setProperty("--mqa-right",`${e.position.right}px`),((A=e.position)==null?void 0:A.bottom)!==void 0&&d.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(d);let c=d.attachShadow({mode:"open"}),f=document.createElement("style");f.textContent=io,c.appendChild(f);let p=document.createElement("div");c.appendChild(p);let u=()=>{};function h(){return e.getCurrentPage?e.getCurrentPage():n?no(window.location.pathname,zn(n)):null}function k(){let[K,D]=R(0),j=me(()=>D(J=>J+1),[]);u=j;let q=In(n,h()),I=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},$=me(()=>{l()},[]),Y=me(()=>{l(),C=!0,j()},[]),ee=me(()=>{C=!1,j()},[]);return N(()=>{let J=()=>j();return window.addEventListener("popstate",J),window.addEventListener(zt,J),()=>{window.removeEventListener("popstate",J),window.removeEventListener(zt,J)}},[]),_("div",{class:"qa-pastille-wrap",onMouseEnter:L,onMouseLeave:S},x?_("div",{class:"qa-panel-anchor"},_(ho,{page:q.page,state:q.state,meta:I,strings:r})):null,_(fo,{color:q.color,state:q.state,strings:r,onHover:()=>{L(),x=!0,$(),j()},onOpenModal:Y}),C&&n?_(xo,{artifact:n,currentPattern:q.pattern,strings:r,onClose:ee}):null)}let C=!1,x=!1,w=null,P=140;function L(){w!==null&&(clearTimeout(w),w=null)}function S(){L(),w=setTimeout(()=>{w=null,!y&&(x=!1,u())},P)}function g(){qe(_(k,{}),p)}g(),Mn();let y=!1;return{open(){y||(l(),C=!0,u())},close(){y||(C=!1,u())},dispose(){y||(y=!0,L(),qe(null,p),d.remove(),An())}}}var zt,ut,pt,Ke,$e,Ln,So,Bn,Fn,qo=ie(()=>{"use strict";de();re();oo();At();so();mo();vo();wo();zt="mqa:locationchange",ut=!1,pt=0,Ke=null,$e=null;Ln=1;So=!1;Bn={open(){},close(){},dispose(){}};Fn={state:"unknown-page",color:"gray",pattern:null,page:null}});var Po={};Qt(Po,{createQaMeter:()=>Dn});function Dn(e){return Ro(e)}var Eo=ie(()=>{"use strict";qo()});var On={};Qt(On,{configFromDataset:()=>Bo});var Vo=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Go(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.`)}var Ae=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);Me(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function Xo(e){let t=e.headers.get("Retry-After"),r=t?Number.parseInt(t,10):NaN;return Number.isFinite(r)&&r>=0?r:0}async function Vt(e,t){if(e.status===429)throw new Ae(Xo(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function Ut(e,t){await Vt(e,t);let r=await e.json().catch(()=>{});if(!Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an array)`);return r}async function Ne(e,t){await Vt(e,t);let r=await e.json().catch(()=>{});if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an object)`);return r}function Gt(e){var P,L;let t=((P=e.endpoint)!=null?P:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Go(t);let r=(L=e.fetch)!=null?L:globalThis.fetch;async function a(S){var K,D,j,q;let g=S;if(e.beforeSend&&(g=await e.beforeSend(S)),g===!1)throw new Error("Submission cancelled by beforeSend");let y=new FormData;for(let I of Vo)y.append(I,String(g[I]));y.append("technical_context",JSON.stringify(g.technical_context)),((K=g.screenshots)!=null&&K.length?g.screenshots:g.screenshot?[g.screenshot]:[]).forEach((I,$)=>{y.append("screenshot",I,$===0?"screenshot.png":`screenshot-${$+1}.png`)}),g.synthetic&&y.append("synthetic","true"),(D=g.user)!=null&&D.id&&y.append("user",JSON.stringify(g.user)),g.widget_version&&y.append("widget_version",g.widget_version),g.page_path&&y.append("page_path",g.page_path);let B={Authorization:`Bearer ${e.apiKey}`};g.synthetic&&(B["X-Mhosaic-Capture-Source"]="error-tracking");let E=(j=e.getSignedIdentity)==null?void 0:j.call(e);E&&E.userHash&&E.exp&&((q=g.user)!=null&&q.id)&&(B["X-Mhosaic-User"]=String(g.user.id),B["X-Mhosaic-User-Hmac"]=E.userHash,B["X-Mhosaic-User-Exp"]=String(E.exp),E.email&&(B["X-Mhosaic-User-Email"]=E.email));let A=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:B,body:y});if(!A.ok){let I=await A.text().catch(()=>"");throw new Error(`Feedback submit failed: ${A.status} ${I}`)}return A.json()}function n(S){var b;let g={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":S},y=(b=e.getSignedIdentity)==null?void 0:b.call(e);return y&&y.userHash&&y.exp&&(g["X-Mhosaic-User-Hmac"]=y.userHash,g["X-Mhosaic-User-Exp"]=String(y.exp),y.email&&(g["X-Mhosaic-User-Email"]=y.email)),g}async function i(S){let g=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(S)});return g.status===404?[]:Ut(g,"listMine")}async function s(S){var E;if(((E=S==null?void 0:S.onLine)!=null?E:typeof navigator!="undefined"?navigator.onLine:!0)===!1)return"offline";let y=`${t}/api/feedback/v1/widget-manifest/?pk=${encodeURIComponent(e.apiKey)}`,b;try{b=await r(y,{method:"GET",redirect:"manual"})}catch(A){return"blocked"}if(b.type==="opaqueredirect"||b.status>=300&&b.status<400)return"intercepted";let B;try{B=await r(y,{method:"GET",headers:{Authorization:`Bearer ${e.apiKey}`}})}catch(A){return"preflight"}return B.status===401||B.status===403?"key":B.status===429?"throttle":"healthy"}async function l(S){let g=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(S)});return g.status===404?[]:Ut(g,"listChangelog")}async function d(S,g,y){let b=await r(`${t}/api/feedback/v1/reports/widget/${S}/`,{method:"GET",headers:n(g),...y!=null&&y.signal?{signal:y.signal}:{}});return Ne(b,"getReport")}async function c(S,g){let y=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${S}/`,{method:"GET",headers:n(g)});return Ne(y,"getReportBySeq")}async function f(S,g,y,b,B){let E;if(B&&B.length>0){let K=new FormData;K.append("body",y),b!==void 0&&K.append("client_nonce",b),B.forEach((D,j)=>K.append("attachment",D,`attachment-${j+1}.png`)),E={method:"POST",headers:n(g),body:K}}else E={method:"POST",headers:{...n(g),"Content-Type":"application/json"},body:JSON.stringify({body:y,...b!==void 0&&{client_nonce:b}})};let A=await r(`${t}/api/feedback/v1/reports/widget/${S}/comments/`,E);if(!A.ok){let K=await A.text().catch(()=>"");throw new Error(`addComment failed: ${A.status} ${K}`)}return A.json()}async function p(S,g,y){let b=await r(`${t}/api/feedback/v1/reports/widget/${S}/`,{method:"PATCH",headers:{...n(g),"Content-Type":"application/json"},body:JSON.stringify({description:y})});if(!b.ok){let B=await b.text().catch(()=>"");throw new Error(`editDescription failed: ${b.status} ${B}`)}return b.json()}async function u(S,g){let y=await r(`${t}/api/feedback/v1/reports/widget/${S}/`,{method:"PATCH",headers:{...n(g),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!y.ok){let b=await y.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${y.status} ${b}`)}return y.json()}async function h(S,g){let y=await r(`${t}/api/feedback/v1/reports/widget/${S}/`,{method:"PATCH",headers:{...n(g),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!y.ok){let b=await y.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${y.status} ${b}`)}return y.json()}function k(S){var b,B,E;if(!S)return"";let g=new URLSearchParams;(b=S.status)==null||b.forEach(A=>g.append("status",A)),(B=S.type)==null||B.forEach(A=>g.append("type",A)),(E=S.severity)==null||E.forEach(A=>g.append("severity",A)),S.q&&g.set("q",S.q),S.mine&&g.set("mine","1"),S.ordering&&g.set("ordering",S.ordering),S.page&&S.page>1&&g.set("page",String(S.page)),S.pagePath&&g.set("page_path",S.pagePath);let y=g.toString();return y?`?${y}`:""}async function C(S,g,y){let b=await r(`${t}/api/feedback/v1/reports/widget/board/${k(g)}`,{method:"GET",headers:n(S),...y!=null&&y.signal?{signal:y.signal}:{}});if(b.status===404)return{count:0,next:null,previous:null,results:[]};let B=await Ne(b,"listBoard");if(!Array.isArray(B.results))throw new Error("listBoard: unexpected response shape (missing results[])");return B}async function x(S,g,y){let b=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${k(g)}`,{method:"GET",headers:n(S),...y!=null&&y.signal?{signal:y.signal}:{}});return b.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:Ne(b,"fetchBoardKpis")}async function w(S,g){let y=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(S),"Content-Type":"application/json"},body:JSON.stringify({external_id:S,...g?{email:g}:{}})});if(!y.ok)throw new Error(`checkVisibility failed: ${y.status}`);return!!(await y.json()).show}return{submitReport:a,checkVisibility:w,listMine:i,listChangelog:l,diagnose:s,endpointHost:(()=>{try{return new URL(t).host}catch(S){return t}})(),getReport:d,getReportBySeq:c,addComment:f,editDescription:p,closeAsResolved:u,reopenUnresolved:h,listBoard:C,fetchBoardKpis:x}}var Yo=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Jo=[/^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 Zo(e){return Jo.some(t=>t.test(e))}function ye(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let a=typeof window!="undefined"?window.location.origin:"http://localhost",n=new URL(e,a),i=new URLSearchParams;return n.searchParams.forEach((s,l)=>{Yo.test(l)||Zo(s)?i.set(l,"[redacted]"):i.set(l,s)}),n.search=i.toString(),n.hash=n.hash?"#[redacted]":"",n.toString()}catch(t){return e}}var ea=[/\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 le(e){let t=e;for(let r of ea)t=t.replace(r,"[redacted-token]");return t}function Xt(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,a=document.referrer||void 0,n=a!==void 0?ye(a):void 0,i=ye(window.location.pathname+window.location.search),s;try{let d=new URL(i,window.location.origin);s=d.pathname+d.search}catch(d){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,...n!==void 0&&{referrer:n},title:le(document.title||"").slice(0,200),pathname:s}}function ta(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 Yt(e){let t=["log","info","warn","error","debug"],r={};for(let a of t){let n=console[a];typeof n=="function"&&(r[a]=n,console[a]=function(...s){try{let l=s.map(ta).join(" "),d=le(l).slice(0,2e3),c={level:a,message:d,ts:Date.now()};if(a==="error"){let f=new Error().stack;f&&(c.stack=f.split(`
616
+ `});function Ie(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function he(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function lt(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function dt(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function ct(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var Fe,lo,co,po,uo,pt=ie(()=>{"use strict";Fe={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},lo={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},co={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},po={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},uo={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function fo({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[lo[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return y("div",{class:"qa-pastille"},y("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${Fe[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},y("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},y("polyline",{points:"1,6 7,6 9,2 12,10 15,4 17,6 23,6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))))}var mo=ie(()=>{"use strict";ce();pt()});function De({dev:e,bot:t,human:r,strings:a}){return y("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},y("span",{class:`qa-lanes__icon qa-lane ${Lt[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},y("path",{d:"M8 7l-5 5 5 5M16 7l5 5-5 5",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"}))),y("span",{class:`qa-lanes__icon qa-lane ${Lt[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},y("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),y("path",{d:"M12 4.5v4"}),y("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),y("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),y("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),y("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),y("span",{class:`qa-lanes__icon qa-lane ${Lt[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},y("circle",{cx:"12",cy:"8",r:"3.6"}),y("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var Lt,Bt=ie(()=>{"use strict";ce();Lt={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function Pn(e){return{dev:he(e.dev),bot:Ie(e.automated),human:he(e.client)}}function Tn(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",c=(i=t.get(l))!=null?i:[];c.push(s),t.set(l,c)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var c,d,u;let l=t.get(s);return{key:s,label:(u=(d=(c=l[0])==null?void 0:c.group)==null?void 0:d.label)!=null?u:"",scenarios:l}})}function go(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function bo({scenario:e,strings:t}){let r=Pn(e),a=e.automated.provenance;return y("li",{class:"qa-row","data-testid":"qa-scenario-row"},y("span",{class:"qa-row__title"},e.priority?y("span",{class:`qa-tag ${co[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,y("span",{class:"qa-row__name"},e.title),e.source==="testgen"?y("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?y("span",{class:"qa-tag"},t[po[e.caseStatus]]):null,e.grounding?y("span",{class:"qa-tag"},t[uo[e.grounding]]):null,a?y("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),y(De,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function ho({page:e,state:t,meta:r,strings:a}){var d;let[n,i]=q(new Set),s=u=>{i(p=>{let f=new Set(p);return f.has(u)?f.delete(u):f.add(u),f})},l=go(a["panel.freshness"],{date:dt(r.generated_at),version:ct(r.app_version),env:r.environment}),c;if(t==="no-tests")c=y("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")c=y("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let u=(d=e==null?void 0:e.scenarios)!=null?d:[],p=u.some(f=>f.group);if(u.length===0)c=y("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!p)c=y("ul",{class:"qa-panel__list"},u.map(f=>y(bo,{key:f.id,scenario:f,strings:a})));else{let f=Tn(u);c=y("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},f.map(b=>{let k=n.has(b.key),R={dev:lt(b.scenarios.map(x=>he(x.dev))),bot:lt(b.scenarios.map(x=>Ie(x.automated))),human:lt(b.scenarios.map(x=>he(x.client)))};return y("li",{key:b.key,class:"qa-suite","data-testid":"qa-panel-group"},y("button",{type:"button",class:"qa-suite__head","aria-expanded":k,"data-testid":"qa-suite-group",onClick:()=>s(b.key)},y("span",{class:`qa-suite__chev ${k?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),y("span",{class:"qa-suite__key"},b.key),y("span",{class:"qa-suite__label"},b.label),y("span",{class:"qa-suite__count"},go(a["suite.cases"],{count:b.scenarios.length})),y(De,{dev:R.dev,bot:R.bot,human:R.human,strings:a})),k?y("ul",{class:"qa-suite__list"},b.scenarios.map(x=>y(bo,{key:x.id,scenario:x,strings:a}))):null)}))}}return y("section",{class:"qa-panel","data-testid":"qa-panel"},c,y("footer",{class:"qa-panel__foot"},y("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var vo=ie(()=>{"use strict";ce();re();Bt();pt()});function En(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,c;for(let d of(l=t.get(i))!=null?l:[]){let u=(c=t.get(d.id))!=null?c:[];r.push({node:d,depth:s,hasChildren:u.length>0}),u.length>0&&a(d.id,s+1)}};return a(null,0),r}function An(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let c=(a=l.external_key)!=null?a:l.id,d=(n=t.get(c))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let u of(i=l.pages)!=null?i:[])(u.role==="primary"?d.primaries:d.traversed).add(u.pattern);t.set(c,d)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var u,p,f,b;let c=(p=(u=s.scenario.group)==null?void 0:u.key)!=null?p:"~",d=(b=(f=l.scenario.group)==null?void 0:f.key)!=null?b:"~";return c!==d?c.localeCompare(d):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function yo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function xo(e){return`${Math.round(e)}%`}function _o({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=q("pages"),[s,l]=q("");j(()=>{let x=_=>{_.key==="Escape"&&a()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[a]);let c=t?At(t):null,d=ne(()=>En(e.sitemap),[e]),u=ne(()=>An(e),[e]),p=ne(()=>{let x=new Map;for(let _ of e.sitemap)x.set(_.path_pattern,_.title);return x},[e]),f=x=>{var _;return(_=p.get(x))!=null?_:x},b=s.trim().toLowerCase(),k=b?u.filter(x=>{var _,P;return x.scenario.title.toLowerCase().includes(b)||((P=(_=x.scenario.group)==null?void 0:_.label)!=null?P:"").toLowerCase().includes(b)}):u,R=yo(r["panel.freshness"],{date:dt(e.generated_at),version:ct(e.app_version),env:e.environment});return y("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:x=>{x.target===x.currentTarget&&a()}},y("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},y("header",{class:"qa-modal__head"},y("h3",null,r["modal.title"]),y("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),y("div",{class:"qa-modal__freshness"},R),y("div",{class:"qa-kpi","data-testid":"qa-kpi"},y("div",{class:"qa-kpi__item"},y("span",{class:"qa-kpi__value"},xo(e.metric.pages_with_scenarios_pct)),y("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),y("div",{class:"qa-kpi__item"},y("span",{class:"qa-kpi__value"},xo(e.metric.scenarios_passing_pct)),y("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),y("nav",{class:"qa-tabs"},y("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),y("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),y("div",{class:"qa-modal__body"},n==="pages"?y("ul",{class:"qa-tree"},d.map(x=>{let _=c!==null&&x.node.path_pattern===c;return y("li",{key:x.node.id,class:`qa-tree__row ${_?"qa-tree__row--here":""}`,"data-testid":_?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+x.depth*1.1}rem`}},y("span",{class:`qa-dot ${Fe[x.node.color]}`,"aria-hidden":"true"}),y("span",{class:`qa-tree__title ${x.node.structural?"qa-tree__title--structural":""}`},x.node.title||x.node.path_pattern),_?y("span",{class:"qa-tree__here"},` ${x.node.path_pattern} `):null,_?y("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,y("span",{class:"qa-tree__count"},String(x.node.counts.scenarios)))})):y("div",{class:"qa-scenarios"},y("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:x=>l(x.target.value)}),k.length===0?y("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):y("ul",{class:"qa-scenarios__list"},k.map(x=>{var w,m;let _=x.scenario,P={dev:he(_.dev),bot:Ie(_.automated),human:he(_.client)},z=[...x.traversed].map(f);return y("li",{key:(w=_.external_key)!=null?w:_.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},y("div",{class:"qa-scenarios__line"},y("span",{class:`qa-dot ${Fe[_.color]}`,"aria-hidden":"true"}),(m=_.group)!=null&&m.key?y("span",{class:"qa-suitekey"},_.group.key):null,y("span",{class:"qa-scenarios__title"},_.title),_.source==="testgen"?y("span",{class:"qa-tag"},r["source.testgen"]):null,y(De,{dev:P.dev,bot:P.bot,human:P.human,strings:r})),y("div",{class:"qa-scenarios__pages"},x.primaries.size?y("span",{class:"qa-scenarios__primary"},yo(r["modal.appliesTo"],{count:x.primaries.size})):null,z.length?y("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${z.join(", ")}`):null))}))))))}var wo=ie(()=>{"use strict";ce();re();Bt();Mt();pt()});function Mn(){if(ut++,ft)return;ft=!0,Ke=history.pushState,$e=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(zt))};history.pushState=function(...r){let a=Ke.apply(this,r);return e(),a},history.replaceState=function(...r){let a=$e.apply(this,r);return e(),a}}function Ln(){ut>0&&ut--,!(ut>0||!ft)&&(ft=!1,Ke&&(history.pushState=Ke),$e&&(history.replaceState=$e),Ke=null,$e=null)}function ko(e){return typeof e=="object"&&e!==null&&e.format===Bn}function Co(){So||(So=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function Fn(e){let t=new Set;for(let r of e.pages)r.page&&t.add(r.page.path_pattern);for(let r of e.sitemap)t.add(r.path_pattern);return[...t]}function Dn(e,t){if(!e||!t)return In;let r=e.pages.find(n=>n.page&&n.page.path_pattern===t);return r&&r.page?{state:"known",color:r.color,pattern:t,page:r}:e.sitemap.some(n=>n.path_pattern===t)?{state:"no-tests",color:"gray",pattern:t,page:null}:{state:"unknown-page",color:"gray",pattern:t,page:null}}function Ro(e){var T,F,h,B;let{source:t}=e,r=ro((T=e.locale)!=null?T:"fr"),a=typeof t=="object"?t:null;if(a&&!ko(a))return Co(),zn;let n=a,i=!1,s=null;function l(){if(n||i)return;i=!0,s=(typeof t=="function"?t():typeof t=="string"?fetch(t).then(K=>K.json()):Promise.resolve(t)).then(K=>{ko(K)?(n=K,f()):Co()}).catch(()=>{})}let c=document.createElement("div");c.setAttribute("data-mqa-host",""),c.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((h=e.position)==null?void 0:h.right)!==void 0&&c.style.setProperty("--mqa-right",`${e.position.right}px`),((B=e.position)==null?void 0:B.bottom)!==void 0&&c.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(c);let d=c.attachShadow({mode:"open"}),u=document.createElement("style");u.textContent=io,d.appendChild(u);let p=document.createElement("div");d.appendChild(p);let f=()=>{};function b(){return e.getCurrentPage?e.getCurrentPage():n?no(window.location.pathname,Fn(n)):null}function k(){let[D,K]=q(0),O=me(()=>K(G=>G+1),[]);f=O;let C=Dn(n,b()),I=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},H=me(()=>{l()},[]),J=me(()=>{l(),R=!0,O()},[]),ee=me(()=>{R=!1,O()},[]);return j(()=>{let G=()=>O();return window.addEventListener("popstate",G),window.addEventListener(zt,G),()=>{window.removeEventListener("popstate",G),window.removeEventListener(zt,G)}},[]),y("div",{class:"qa-pastille-wrap",onMouseEnter:z,onMouseLeave:w},x?y("div",{class:"qa-panel-anchor"},y(ho,{page:C.page,state:C.state,meta:I,strings:r})):null,y(fo,{color:C.color,state:C.state,strings:r,onHover:()=>{z(),x=!0,H(),O()},onOpenModal:J}),R&&n?y(_o,{artifact:n,currentPattern:C.pattern,strings:r,onClose:ee}):null)}let R=!1,x=!1,_=null,P=140;function z(){_!==null&&(clearTimeout(_),_=null)}function w(){z(),_=setTimeout(()=>{_=null,!v&&(x=!1,f())},P)}function m(){qe(y(k,{}),p)}m(),Mn();let v=!1;return{open(){v||(l(),R=!0,f())},close(){v||(R=!1,f())},dispose(){v||(v=!0,z(),qe(null,p),c.remove(),Ln())}}}var zt,ft,ut,Ke,$e,Bn,So,zn,In,qo=ie(()=>{"use strict";ce();re();oo();Mt();so();mo();vo();wo();zt="mqa:locationchange",ft=!1,ut=0,Ke=null,$e=null;Bn=1;So=!1;zn={open(){},close(){},dispose(){}};In={state:"unknown-page",color:"gray",pattern:null,page:null}});var Po={};Qt(Po,{createQaMeter:()=>Kn});function Kn(e){return Ro(e)}var To=ie(()=>{"use strict";qo()});var Nn={};Qt(Nn,{configFromDataset:()=>Bo});var Vo=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Go(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.`)}var Me=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);Ae(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function Xo(e){let t=e.headers.get("Retry-After"),r=t?Number.parseInt(t,10):NaN;return Number.isFinite(r)&&r>=0?r:0}async function Vt(e,t){if(e.status===429)throw new Me(Xo(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function Ut(e,t){await Vt(e,t);let r=await e.json().catch(()=>{});if(!Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an array)`);return r}async function Ne(e,t){await Vt(e,t);let r=await e.json().catch(()=>{});if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an object)`);return r}function Gt(e){var P,z;let t=((P=e.endpoint)!=null?P:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Go(t);let r=(z=e.fetch)!=null?z:globalThis.fetch;async function a(w){var D,K,O,C;let m=w;if(e.beforeSend&&(m=await e.beforeSend(w)),m===!1)throw new Error("Submission cancelled by beforeSend");let v=new FormData;for(let I of Vo)v.append(I,String(m[I]));v.append("technical_context",JSON.stringify(m.technical_context)),((D=m.screenshots)!=null&&D.length?m.screenshots:m.screenshot?[m.screenshot]:[]).forEach((I,H)=>{v.append("screenshot",I,H===0?"screenshot.png":`screenshot-${H+1}.png`)}),m.synthetic&&v.append("synthetic","true"),(K=m.user)!=null&&K.id&&v.append("user",JSON.stringify(m.user)),m.widget_version&&v.append("widget_version",m.widget_version),m.page_path&&v.append("page_path",m.page_path);let F={Authorization:`Bearer ${e.apiKey}`};m.synthetic&&(F["X-Mhosaic-Capture-Source"]="error-tracking");let h=(O=e.getSignedIdentity)==null?void 0:O.call(e);h&&h.userHash&&h.exp&&((C=m.user)!=null&&C.id)&&(F["X-Mhosaic-User"]=String(m.user.id),F["X-Mhosaic-User-Hmac"]=h.userHash,F["X-Mhosaic-User-Exp"]=String(h.exp),h.email&&(F["X-Mhosaic-User-Email"]=h.email));let B=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:F,body:v});if(!B.ok){let I=await B.text().catch(()=>"");throw new Error(`Feedback submit failed: ${B.status} ${I}`)}return B.json()}function n(w){var T;let m={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":w},v=(T=e.getSignedIdentity)==null?void 0:T.call(e);return v&&v.userHash&&v.exp&&(m["X-Mhosaic-User-Hmac"]=v.userHash,m["X-Mhosaic-User-Exp"]=String(v.exp),v.email&&(m["X-Mhosaic-User-Email"]=v.email)),m}async function i(w){let m=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(w)});return m.status===404?[]:Ut(m,"listMine")}async function s(w){var h;if(((h=w==null?void 0:w.onLine)!=null?h:typeof navigator!="undefined"?navigator.onLine:!0)===!1)return"offline";let v=`${t}/api/feedback/v1/widget-manifest/?pk=${encodeURIComponent(e.apiKey)}`,T;try{T=await r(v,{method:"GET",redirect:"manual"})}catch(B){return"blocked"}if(T.type==="opaqueredirect"||T.status>=300&&T.status<400)return"intercepted";let F;try{F=await r(v,{method:"GET",headers:{Authorization:`Bearer ${e.apiKey}`}})}catch(B){return"preflight"}return F.status===401||F.status===403?"key":F.status===429?"throttle":"healthy"}async function l(w){let m=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(w)});return m.status===404?[]:Ut(m,"listChangelog")}async function c(w,m,v){let T=await r(`${t}/api/feedback/v1/reports/widget/${w}/`,{method:"GET",headers:n(m),...v!=null&&v.signal?{signal:v.signal}:{}});return Ne(T,"getReport")}async function d(w,m){let v=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${w}/`,{method:"GET",headers:n(m)});return Ne(v,"getReportBySeq")}async function u(w,m,v,T,F){let h;if(F&&F.length>0){let D=new FormData;D.append("body",v),T!==void 0&&D.append("client_nonce",T),F.forEach((K,O)=>D.append("attachment",K,`attachment-${O+1}.png`)),h={method:"POST",headers:n(m),body:D}}else h={method:"POST",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({body:v,...T!==void 0&&{client_nonce:T}})};let B=await r(`${t}/api/feedback/v1/reports/widget/${w}/comments/`,h);if(!B.ok){let D=await B.text().catch(()=>"");throw new Error(`addComment failed: ${B.status} ${D}`)}return B.json()}async function p(w,m,v){let T=await r(`${t}/api/feedback/v1/reports/widget/${w}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({description:v})});if(!T.ok){let F=await T.text().catch(()=>"");throw new Error(`editDescription failed: ${T.status} ${F}`)}return T.json()}async function f(w,m){let v=await r(`${t}/api/feedback/v1/reports/widget/${w}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!v.ok){let T=await v.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${v.status} ${T}`)}return v.json()}async function b(w,m){let v=await r(`${t}/api/feedback/v1/reports/widget/${w}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!v.ok){let T=await v.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${v.status} ${T}`)}return v.json()}function k(w){var T,F,h;if(!w)return"";let m=new URLSearchParams;(T=w.status)==null||T.forEach(B=>m.append("status",B)),(F=w.type)==null||F.forEach(B=>m.append("type",B)),(h=w.severity)==null||h.forEach(B=>m.append("severity",B)),w.q&&m.set("q",w.q),w.mine&&m.set("mine","1"),w.ordering&&m.set("ordering",w.ordering),w.page&&w.page>1&&m.set("page",String(w.page)),w.pagePath&&m.set("page_path",w.pagePath);let v=m.toString();return v?`?${v}`:""}async function R(w,m,v){let T=await r(`${t}/api/feedback/v1/reports/widget/board/${k(m)}`,{method:"GET",headers:n(w),...v!=null&&v.signal?{signal:v.signal}:{}});if(T.status===404)return{count:0,next:null,previous:null,results:[]};let F=await Ne(T,"listBoard");if(!Array.isArray(F.results))throw new Error("listBoard: unexpected response shape (missing results[])");return F}async function x(w,m,v){let T=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${k(m)}`,{method:"GET",headers:n(w),...v!=null&&v.signal?{signal:v.signal}:{}});return T.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:Ne(T,"fetchBoardKpis")}async function _(w,m){let v=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(w),"Content-Type":"application/json"},body:JSON.stringify({external_id:w,...m?{email:m}:{}})});if(!v.ok)throw new Error(`checkVisibility failed: ${v.status}`);return!!(await v.json()).show}return{submitReport:a,checkVisibility:_,listMine:i,listChangelog:l,diagnose:s,endpointHost:(()=>{try{return new URL(t).host}catch(w){return t}})(),getReport:c,getReportBySeq:d,addComment:u,editDescription:p,closeAsResolved:f,reopenUnresolved:b,listBoard:R,fetchBoardKpis:x}}var Yo=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Jo=[/^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 Zo(e){return Jo.some(t=>t.test(e))}function ye(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let a=typeof window!="undefined"?window.location.origin:"http://localhost",n=new URL(e,a),i=new URLSearchParams;return n.searchParams.forEach((s,l)=>{Yo.test(l)||Zo(s)?i.set(l,"[redacted]"):i.set(l,s)}),n.search=i.toString(),n.hash=n.hash?"#[redacted]":"",n.toString()}catch(t){return e}}var ea=[/\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 le(e){let t=e;for(let r of ea)t=t.replace(r,"[redacted-token]");return t}function Xt(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,a=document.referrer||void 0,n=a!==void 0?ye(a):void 0,i=ye(window.location.pathname+window.location.search),s;try{let c=new URL(i,window.location.origin);s=c.pathname+c.search}catch(c){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,...n!==void 0&&{referrer:n},title:le(document.title||"").slice(0,200),pathname:s}}function ta(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 Yt(e){let t=["log","info","warn","error","debug"],r={};for(let a of t){let n=console[a];typeof n=="function"&&(r[a]=n,console[a]=function(...s){try{let l=s.map(ta).join(" "),c=le(l).slice(0,2e3),d={level:a,message:c,ts:Date.now()};if(a==="error"){let u=new Error().stack;u&&(d.stack=u.split(`
617
617
  `).slice(2,8).join(`
618
- `))}e.push(c)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function Jt(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(n,i){let s=performance.now(),l=typeof n=="string"?n:n instanceof URL?n.toString():n.url,d=((i==null?void 0:i.method)||(n instanceof Request?n.method:"GET")).toUpperCase();try{let c=await r(n,i);return e.push({url:t(l),method:d,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let f=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:d,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:le(f)}),c}},()=>{window.fetch=r}}function Zt(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,a=r.prototype.open,n=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()},a.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){}}),n.call(this,s!=null?s:null)},()=>{r.prototype.open=a,r.prototype.send=n}}function er(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?le(n):void 0;e.push({message:le(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(d){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?le(s):void 0;e.push({message:le(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 tr(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.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:ye(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var Ce=class{constructor(t){Me(this,"max",t);Me(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 rr(e={}){var h;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(h=e.sanitizeUrl)!=null?h:ye,i=new Ce(t),s=new Ce(r),l=new Ce(a),d=Yt(i),c=Jt(s,n),f=Zt(s,n),p=er(l),u=tr();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Xt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){d(),c(),f(),p(),u.dispose()}}}var ra={"fab.label":"Send feedback","page.badge.aria":"Feedback \u2014 {n} open on this page","page.badge.aria.one":"Feedback \u2014 1 open on this page","page.strip.text":"{n} open reports on this page","page.strip.text.one":"1 open report on this page","page.strip.view":"View","page.peek.title":"On this page","page.peek.viewAll":"View all {n}","page.peek.viewAll.one":"View 1 open report","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.success.seq":"Thanks \u2014 report #{seq} was sent. \u2713","form.discard.title":"Unsaved changes","form.discard.body":"Discard your feedback?","form.discard.keep":"Keep editing","form.discard.confirm":"Discard","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.screenshot.error_count":"Too many screenshots (max {max}).","form.context.label":"Page","form.capture.notice":"Console, network activity and errors are captured automatically to help us debug.","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.list.loadMore":"Show more","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.scope.thisPage":"This page","board.scope.allPages":"All pages","board.scope.onThisPage":"on this page","board.list.count.page":"{n} of {total} \xB7 this page","board.list.empty.page.title":"No feedback on this page yet.","board.list.empty.page.description":"Be the first to report something here \u2014 or browse the whole project.","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.validate.banner":"{count} fix(es) awaiting your confirmation","mine.validate.confirm":"Fix works","mine.validate.reopen":"Still broken","mine.validate.view":"Review","diag.run":"Diagnose","diag.running":"Checking the connection\u2026","diag.offline":"You appear to be offline. Reconnect and retry.","diag.blocked":"The feedback service is unreachable from this network. A firewall or proxy is blocking it \u2014 ask IT to allow {host}.","diag.intercepted":"Your corporate network (SSL-inspection proxy) is intercepting widget traffic. Ask IT to add {host} to the inspection bypass list.","diag.preflight":"A network proxy is blocking the widget\u2019s secure requests (CORS preflight). Ask IT to allow {host}.","diag.key":"The widget\u2019s access key was rejected. Contact the site team.","diag.throttle":"Too many requests right now \u2014 wait a moment and retry.","diag.healthy":"The service is reachable \u2014 this looks like a temporary hiccup. Retry.","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.jump.placeholder":"#","mine.jump.go":"Open","mine.jump.aria":"Open a report by number","mine.jump.not_found":"No report with that number.","error.rate_limited":"Too many requests \u2014 retry in {seconds}s.","error.rate_limited_generic":"Too many requests \u2014 try again in a moment.","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.attach_add":"Add image","detail.attach_remove":"Remove","detail.attachment_alt":"Attached image","detail.copy_link":"Copy link","detail.copied":"Link copied","detail.edit":"Edit","detail.edit_save":"Save","detail.edit_cancel":"Cancel","detail.edit_saving":"Saving\u2026","detail.edit_failed":"Could not save your changes.","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"},oa={"fab.label":"Envoyer un commentaire","page.badge.aria":"Retours \u2014 {n} ouverts sur cette page","page.badge.aria.one":"Retours \u2014 1 ouvert sur cette page","page.strip.text":"{n} retours ouverts sur cette page","page.strip.text.one":"1 retour ouvert sur cette page","page.strip.view":"Voir","page.peek.title":"Sur cette page","page.peek.viewAll":"Voir les {n}","page.peek.viewAll.one":"Voir 1 retour ouvert","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.success.seq":"Merci \u2014 rapport n\xB0{seq} envoy\xE9. \u2713","form.discard.title":"Modifications non enregistr\xE9es","form.discard.body":"Abandonner votre commentaire ?","form.discard.keep":"Continuer la saisie","form.discard.confirm":"Abandonner","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.screenshot.error_count":"Trop de captures d\u2019\xE9cran (max {max}).","form.context.label":"Page","form.capture.notice":"La console, l\u2019activit\xE9 r\xE9seau et les erreurs sont captur\xE9es automatiquement pour faciliter le diagnostic.","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.list.loadMore":"Afficher plus","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.scope.thisPage":"Cette page","board.scope.allPages":"Toutes les pages","board.scope.onThisPage":"sur cette page","board.list.count.page":"{n} sur {total} \xB7 cette page","board.list.empty.page.title":"Aucun retour sur cette page pour l\u2019instant.","board.list.empty.page.description":"Soyez le premier \xE0 signaler quelque chose ici \u2014 ou parcourez tout le projet.","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.validate.banner":"{count} correctif(s) \xE0 confirmer","mine.validate.confirm":"Corrig\xE9 \u2713","mine.validate.reopen":"Toujours cass\xE9","mine.validate.view":"Voir","diag.run":"Diagnostiquer","diag.running":"V\xE9rification de la connexion\u2026","diag.offline":"Vous semblez hors ligne. Reconnectez-vous puis r\xE9essayez.","diag.blocked":"Le service de feedback est injoignable depuis ce r\xE9seau. Un pare-feu ou proxy le bloque \u2014 demandez \xE0 votre TI d\u2019autoriser {host}.","diag.intercepted":"Votre r\xE9seau d\u2019entreprise (inspection SSL) intercepte le trafic du widget. Demandez \xE0 votre TI d\u2019ajouter {host} \xE0 la liste d\u2019exclusion.","diag.preflight":"Un proxy r\xE9seau bloque les requ\xEAtes s\xE9curis\xE9es du widget (pr\xE9flight CORS). Demandez \xE0 votre TI d\u2019autoriser {host}.","diag.key":"La cl\xE9 d\u2019acc\xE8s du widget a \xE9t\xE9 refus\xE9e. Contactez l\u2019\xE9quipe du site.","diag.throttle":"Trop de requ\xEAtes pour le moment \u2014 patientez puis r\xE9essayez.","diag.healthy":"Le service est joignable \u2014 le probl\xE8me semble passager. R\xE9essayez.","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.jump.placeholder":"#","mine.jump.go":"Ouvrir","mine.jump.aria":"Ouvrir un rapport par num\xE9ro","mine.jump.not_found":"Aucun rapport avec ce num\xE9ro.","error.rate_limited":"Trop de requ\xEAtes \u2014 r\xE9essaie dans {seconds} s.","error.rate_limited_generic":"Trop de requ\xEAtes \u2014 r\xE9essaie dans un instant.","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.attach_add":"Ajouter une image","detail.attach_remove":"Retirer","detail.attachment_alt":"Image jointe","detail.copy_link":"Copier le lien","detail.copied":"Lien copi\xE9","detail.edit":"Modifier","detail.edit_save":"Enregistrer","detail.edit_cancel":"Annuler","detail.edit_saving":"Enregistrement\u2026","detail.edit_failed":"Impossible d\u2019enregistrer vos modifications.","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"},aa={fr:oa};function na(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=aa[t])!=null?r:null}function or(e,t={}){var a;let r=(a=na(t.locale))!=null?a:{};return{...ra,...r,...e}}de();re();function pe(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var Rt="mfb:locationchange",Pr=!1;function ha(){if(!(Pr||typeof history=="undefined")){Pr=!0;for(let e of["pushState","replaceState"]){let t=history[e];history[e]=function(...r){let a=t.apply(this,r);return window.dispatchEvent(new Event(Rt)),a}}}}function tt(e){return ha(),window.addEventListener("popstate",e),window.addEventListener(Rt,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(Rt,e)}}re();re();de();de();var va=0;function o(e,t,r,a,n,i){t||(t={});var s,l,d=t;if("ref"in d)for(l in d={},t)l=="ref"?s=t[l]:d[l]=t[l];var c={type:e,props:d,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--va,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)d[l]===void 0&&(d[l]=s[l]);return W.vnode&&W.vnode(c),c}function rt({api:e,strings:t,host:r}){var l;let[a,n]=R("idle"),i=async()=>{n("running");try{n(await e.diagnose())}catch(d){n("blocked")}};if(a==="idle")return o("button",{type:"button",class:"btn diag-btn",onClick:()=>{i()},children:t["diag.run"]});if(a==="running")return o("div",{class:"diag-result",children:t["diag.running"]});let s=`diag.${a}`;return o("div",{class:"diag-result",children:((l=t[s])!=null?l:a).replace("{host}",r)})}var _e=new Map;function Er(e,t){return`${e}|${t}`}function Tr(e){let t=_e.get(e);return t&&Date.now()-t.at<6e4?t:null}function Mr(e,t,r){if(!_e.has(e)&&_e.size>=50){let a=_e.keys().next().value;a!==void 0&&_e.delete(a)}_e.delete(e),_e.set(e,{page:t,kpis:r,at:Date.now()})}var Ar="mhosaic.boardView.";function Lr(e){try{let t=localStorage.getItem(Ar+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Br(e,t){try{localStorage.setItem(Ar+e,JSON.stringify(t))}catch(r){}}function be(e,t){let r=!1,a=!1,n=0,i=null,s=typeof document!="undefined"?document:null,l=()=>Math.min(t*2**n,t*10),d=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let f=!1;try{f=await e()}catch(p){f=!1}r||(n=f?0:n+1,i=setTimeout(()=>{d()},l()))},c=()=>{r||!a||s!=null&&s.hidden||(a=!1,d())};return s==null||s.addEventListener("visibilitychange",c),d(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",c)}}}function Ee(e,t){return e instanceof Ae?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}re();var zr=/#(\d+)/g;function ze(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;zr.lastIndex=0;let i;for(;(i=zr.exec(r))!==null;){i.index>n&&a.push(r.slice(n,i.index));let s=Number(i[1]);a.push(o("button",{type:"button",class:"seq-link",onClick:()=>t(s),"aria-label":`Open report #${s}`,children:["#",s]})),n=i.index+i[0].length}return n<r.length&&a.push(r.slice(n)),a.length?a:[r]}function Fr({comment:e,strings:t,onOpenSeq:r,stableUrl:a}){var p;let n=e.is_mine,i=!n&&e.author_source==="mcp",s=!n&&e.author_source==="system",l=i?"mcp":s?"system":"staff",d=l==="mcp"?"detail.author.mcp":l==="system"?"detail.author.system":"detail.author.staff",c=e.author_label||t[d],f=((p=e.attachments)!=null?p:[]).filter(u=>u.url);return o("div",{class:`comment-bubble ${n?"is-mine":"is-other"}`,children:[!n&&c&&o("div",{class:`comment-author comment-author--${l}`,children:c}),e.body&&o("div",{class:"comment-body",children:ze(e.body,r)}),f.length>0&&o("div",{class:"comment-attachments",children:f.map(u=>{let h=a?a(`att:${u.id}`,u.url):u.url;return o("a",{class:"comment-attachment",href:h,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:h,alt:t["detail.attachment_alt"],loading:"lazy"})},u.id)})}),o("div",{class:"comment-time",children:ya(e.created_at)})]})}function ya(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var _a=["image/png","image/jpeg","image/webp"];function ot(e){return _a.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function Te(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),a=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-a)}`}function qt(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 xa=3e4;function at({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l,buildPermalink:d,seed:c}){var $t,Ht,Ot,Nt,jt,Wt;let[f,p]=R(null),[u,h]=R(null),[k,C]=R(!1),[x,w]=R(!1),[P,L]=R(""),[S,g]=R(!1),[y,b]=R(!1),[B,E]=R(""),[A,K]=R(!1),[D,j]=R(!1),[q,I]=R(!1),[$,Y]=R([]),[ee,J]=R(""),m=U(null),v=U(!0),M=U(new Map),[,z]=R(0),Q=45*6e4,F=(T,O)=>{if(!O)return O;let G=M.current.get(T);return G&&Date.now()-G.at<Q?G.url:(M.current.set(T,{url:O,at:Date.now()}),O)},H=T=>{M.current.delete(T),z(O=>O+1)},te=U($);te.current=$,N(()=>()=>te.current.forEach(T=>URL.revokeObjectURL(T.preview)),[]);let ae=T=>{J("");let O=5-$.length,G=T.slice(0,Math.max(0,O));for(let Z of G){let ce=ot(Z);if(ce){J(ce.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(ce.maxMb)));return}}if(G.length){let Z=G.map(ce=>({blob:ce,preview:URL.createObjectURL(ce)}));Y(ce=>[...ce,...Z])}T.length>G.length&&J(a["form.screenshot.error_count"].replace("{max}",String(5)))},ke=T=>{var Z;let O=T.target,G=Array.from((Z=O.files)!=null?Z:[]);G.length&&ae(G),O.value=""},se=T=>{let O=$[T];O&&URL.revokeObjectURL(O.preview),Y(G=>G.filter((Z,ce)=>ce!==T)),J("")},Se=async()=>{try{let T=await e.getReport(r,t);return v.current&&(p(T),h(null)),!0}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",T),!v.current)return!1;let O=Ee(T,a);return h(O!=null?O:"load_failed"),!1}};N(()=>{v.current=!0;let T=be(Se,xa);return()=>{v.current=!1,T.stop()}},[r,t]);let ve=async()=>{if(!(!B.trim()&&$.length===0||A)){K(!0);try{let T=`${r}:${Date.now()}`,O=$.map(Z=>Z.blob),G=await e.addComment(r,t,B.trim(),T,O.length?O:void 0);if(!v.current)return;E(""),$.forEach(Z=>URL.revokeObjectURL(Z.preview)),Y([]),J(""),p(Z=>Z&&{...Z,comments:wa(Z.comments,G)}),Se()}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",T),!v.current)return;h(a["detail.send_failed"])}finally{v.current&&K(!1)}}},He=async()=>{if(!(!d||!f))try{if(await navigator.clipboard.writeText(d(f.id)),!v.current)return;C(!0),setTimeout(()=>{v.current&&C(!1)},2e3)}catch(T){}},Fo=()=>{f&&(L(f.description),b(!1),w(!0))},Io=()=>{w(!1),b(!1)},Do=async()=>{if(!f||S)return;let T=P.trim();if(T){g(!0),b(!1);try{let O=await e.editDescription(r,t,T);if(!v.current)return;p(O),w(!1)}catch(O){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",O),!v.current)return;b(!0)}finally{v.current&&g(!1)}}},Ko=async()=>{if(!(D||q)){j(!0);try{let T=await e.closeAsResolved(r,t);if(!v.current)return;p(T)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",T),!v.current)return;h(a["detail.close_failed"])}finally{v.current&&j(!1)}}},$o=async()=>{if(!(D||q)){I(!0);try{let T=await e.reopenUnresolved(r,t);if(!v.current)return;p(T)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",T),!v.current)return;h(a["detail.reopen_failed"])}finally{v.current&&I(!1)}}};if(!f&&!u){if(c){let T=o("span",{class:`pill pill-status pill-status--${c.status}`,children:($t=a[`status.${c.status}`])!=null?$t:c.status});return o("div",{class:`report-detail variant-${s} is-seeded`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),T]}),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:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),T]}),o("div",{class:"report-detail-body",children:[o("div",{class:"report-detail-description-row",children:o("p",{class:"report-detail-description",children:ze(c.description,l)})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),o("div",{class:"mine-loading",children:a["mine.loading"]})]})]})}return o("div",{class:"mine-loading",children:a["mine.loading"]})}if(!f)return u&&u!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:u}),o("button",{type:"button",class:"btn",onClick:()=>{Se()},children:a["board.retry"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]}):o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:a["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:a["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]});let It=(Ht=f.is_mine)!=null?Ht:i,Dt=(Ot=f.can_moderate)!=null?Ot:It,Kt=Dt&&f.status==="awaiting_validation",Ho=Dt;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:n,children:["\u2190 ",a["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${f.status}`,children:(Nt=a[`status.${f.status}`])!=null?Nt:f.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:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${f.status}`,children:(jt=a[`status.${f.status}`])!=null?jt:f.status})]}),o("div",{class:"report-detail-body",children:[o(ka,{detail:f,strings:a}),x?o("div",{class:"report-detail-edit",children:[o("textarea",{class:"report-detail-edit-input",value:P,onInput:T=>{L(T.target.value),b(!1)},disabled:S}),y&&o("p",{class:"error",role:"alert",children:a["detail.edit_failed"]}),o("div",{class:"report-detail-edit-actions",children:[o("button",{type:"button",class:"btn btn--ghost",onClick:Io,disabled:S,children:a["detail.edit_cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:Do,disabled:S||!P.trim(),children:S?a["detail.edit_saving"]:a["detail.edit_save"]})]})]}):o("div",{class:"report-detail-description-row",children:[o("p",{class:"report-detail-description",children:ze(f.description,l)}),It&&o("button",{type:"button",class:"btn btn--ghost report-detail-edit",onClick:Fo,children:a["detail.edit"]})]}),d&&o("div",{class:"report-detail-permalink",children:o("button",{type:"button",class:"btn btn--ghost report-detail-copy-link",onClick:He,children:k?a["detail.copied"]:a["detail.copy_link"]})}),((Wt=f.screenshots)!=null&&Wt.length?f.screenshots.map(T=>T.url):[f.screenshot_url]).map((T,O)=>({url:F(`shot:${O}`,T!=null?T:null),pinKey:`shot:${O}`})).filter(T=>!!T.url).map(({url:T,pinKey:O})=>{let G=qt(T);return G?o("a",{class:"report-detail-screenshot",href:G,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:T,alt:"",loading:"lazy",onError:()=>H(O)})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:T,alt:"",loading:"lazy",onError:()=>H(O)})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),f.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:f.comments.map(T=>o("li",{children:o(Fr,{comment:T,strings:a,...l&&{onOpenSeq:l},stableUrl:(O,G)=>{var Z;return(Z=F(O,G))!=null?Z:G}})}))}),f.status_history&&f.status_history.length>0&&o(Aa,{rows:f.status_history,strings:a}),f.technical_context&&o(Ra,{ctx:f.technical_context,strings:a}),Ho?o("div",{class:"report-compose",children:[o("textarea",{value:B,placeholder:a["detail.compose_placeholder"],onInput:T=>E(T.target.value),disabled:A}),$.length>0&&o("div",{class:"compose-attachments",children:$.map((T,O)=>o("div",{class:"compose-attachment",children:[o("img",{src:T.preview,alt:a["detail.attachment_alt"]}),o("button",{type:"button",class:"compose-attachment-remove","aria-label":a["detail.attach_remove"],onClick:()=>se(O),disabled:A,children:"\xD7"})]},T.preview))}),ee&&o("p",{class:"compose-attach-error",role:"alert",children:ee}),o("input",{ref:m,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"compose-attach-input",onChange:ke,hidden:!0}),o("div",{class:"report-compose-actions",children:[o("button",{type:"button",class:"btn btn--ghost compose-attach-btn",onClick:()=>{var T;return(T=m.current)==null?void 0:T.click()},disabled:A||$.length>=5,children:a["detail.attach_add"]}),Kt&&o("button",{type:"button",class:"btn",onClick:Ko,disabled:D||q,children:D?a["detail.close_busy"]:a["detail.close_cta"]}),Kt&&o("button",{type:"button",class:"btn btn--ghost",onClick:$o,disabled:D||q,children:q?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ve,disabled:!B.trim()&&$.length===0||A,children:A?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),u&&o("div",{class:"error",children:u})]})]})}function wa(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function ka({detail:e,strings:t}){var n;let r=`detail.context.capture.${e.capture_method}`,a=(n=t[r])!=null?n: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:a})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:Ir(e.created_at)})]}),e.page_url&&(()=>{let i=qt(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:Te(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:Te(e.page_url,64)})]})})()]})}function Ir(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var Sa=20,Ca=15;function Ra({ctx:e,strings:t}){var c,f,p;let r=(c=e.errors)!=null?c:[],a=((f=e.consoleLogs)!=null?f:[]).slice(-Sa),n=((p=e.networkRequests)!=null?p:[]).slice(-Ca),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,d=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:d}),o("div",{class:"tech-body",children:[i&&o(qa,{device:i,strings:t}),r.length>0&&o(Pa,{errors:r,strings:t}),a.length>0&&o(Ea,{logs:a,strings:t}),n.length>0&&o(Ta,{rows:n,strings:t})]})]})}function qa({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let a=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${a}`})}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(a=>o(oe,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function Pa({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:Ma(r.stack)})]}))})]})}function Ea({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 Ta({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 a=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${a?" 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:Te(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Ma(e){let t=e.split(`
618
+ `))}e.push(d)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function Jt(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(n,i){let s=performance.now(),l=typeof n=="string"?n:n instanceof URL?n.toString():n.url,c=((i==null?void 0:i.method)||(n instanceof Request?n.method:"GET")).toUpperCase();try{let d=await r(n,i);return e.push({url:t(l),method:c,status:d.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),d}catch(d){let u=d instanceof Error?d.message:String(d);throw e.push({url:t(l),method:c,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:le(u)}),d}},()=>{window.fetch=r}}function Zt(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,a=r.prototype.open,n=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()},a.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){}}),n.call(this,s!=null?s:null)},()=>{r.prototype.open=a,r.prototype.send=n}}function er(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?le(n):void 0;e.push({message:le(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(c){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?le(s):void 0;e.push({message:le(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 tr(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.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:ye(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var Ce=class{constructor(t){Ae(this,"max",t);Ae(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 rr(e={}){var b;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(b=e.sanitizeUrl)!=null?b:ye,i=new Ce(t),s=new Ce(r),l=new Ce(a),c=Yt(i),d=Jt(s,n),u=Zt(s,n),p=er(l),f=tr();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Xt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){c(),d(),u(),p(),f.dispose()}}}var ra={"fab.label":"Send feedback","page.badge.aria":"Feedback \u2014 {n} open on this page","page.badge.aria.one":"Feedback \u2014 1 open on this page","page.strip.text":"{n} open reports on this page","page.strip.text.one":"1 open report on this page","page.strip.view":"View","page.peek.title":"On this page","page.peek.viewAll":"View all {n}","page.peek.viewAll.one":"View 1 open report","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.success.seq":"Thanks \u2014 report #{seq} was sent. \u2713","form.discard.title":"Unsaved changes","form.discard.body":"Discard your feedback?","form.discard.keep":"Keep editing","form.discard.confirm":"Discard","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.screenshot.error_count":"Too many screenshots (max {max}).","form.context.label":"Page","form.capture.notice":"Console, network activity and errors are captured automatically to help us debug.","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.list.loadMore":"Show more","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.scope.thisPage":"This page","board.scope.allPages":"All pages","board.scope.onThisPage":"on this page","board.list.count.page":"{n} of {total} \xB7 this page","board.list.empty.page.title":"No feedback on this page yet.","board.list.empty.page.description":"Be the first to report something here \u2014 or browse the whole project.","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.validate.banner":"{count} fix(es) awaiting your confirmation","mine.validate.confirm":"Fix works","mine.validate.reopen":"Still broken","mine.validate.view":"Review","diag.run":"Diagnose","diag.running":"Checking the connection\u2026","diag.offline":"You appear to be offline. Reconnect and retry.","diag.blocked":"The feedback service is unreachable from this network. A firewall or proxy is blocking it \u2014 ask IT to allow {host}.","diag.intercepted":"Your corporate network (SSL-inspection proxy) is intercepting widget traffic. Ask IT to add {host} to the inspection bypass list.","diag.preflight":"A network proxy is blocking the widget\u2019s secure requests (CORS preflight). Ask IT to allow {host}.","diag.key":"The widget\u2019s access key was rejected. Contact the site team.","diag.throttle":"Too many requests right now \u2014 wait a moment and retry.","diag.healthy":"The service is reachable \u2014 this looks like a temporary hiccup. Retry.","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.jump.placeholder":"#","mine.jump.go":"Open","mine.jump.aria":"Open a report by number","mine.jump.not_found":"No report with that number.","error.rate_limited":"Too many requests \u2014 retry in {seconds}s.","error.rate_limited_generic":"Too many requests \u2014 try again in a moment.","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.attach_add":"Add image","detail.attach_remove":"Remove","detail.attachment_alt":"Attached image","detail.copy_link":"Copy link","detail.copied":"Link copied","detail.edit":"Edit","detail.edit_save":"Save","detail.edit_cancel":"Cancel","detail.edit_saving":"Saving\u2026","detail.edit_failed":"Could not save your changes.","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)","detail.verified.badge":"Agent-verified","detail.verified.title":"Proof of fix","detail.verified.functional":"Functional check","detail.verified.ui":"UI check","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"},oa={"fab.label":"Envoyer un commentaire","page.badge.aria":"Retours \u2014 {n} ouverts sur cette page","page.badge.aria.one":"Retours \u2014 1 ouvert sur cette page","page.strip.text":"{n} retours ouverts sur cette page","page.strip.text.one":"1 retour ouvert sur cette page","page.strip.view":"Voir","page.peek.title":"Sur cette page","page.peek.viewAll":"Voir les {n}","page.peek.viewAll.one":"Voir 1 retour ouvert","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.success.seq":"Merci \u2014 rapport n\xB0{seq} envoy\xE9. \u2713","form.discard.title":"Modifications non enregistr\xE9es","form.discard.body":"Abandonner votre commentaire ?","form.discard.keep":"Continuer la saisie","form.discard.confirm":"Abandonner","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.screenshot.error_count":"Trop de captures d\u2019\xE9cran (max {max}).","form.context.label":"Page","form.capture.notice":"La console, l\u2019activit\xE9 r\xE9seau et les erreurs sont captur\xE9es automatiquement pour faciliter le diagnostic.","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.list.loadMore":"Afficher plus","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.scope.thisPage":"Cette page","board.scope.allPages":"Toutes les pages","board.scope.onThisPage":"sur cette page","board.list.count.page":"{n} sur {total} \xB7 cette page","board.list.empty.page.title":"Aucun retour sur cette page pour l\u2019instant.","board.list.empty.page.description":"Soyez le premier \xE0 signaler quelque chose ici \u2014 ou parcourez tout le projet.","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.validate.banner":"{count} correctif(s) \xE0 confirmer","mine.validate.confirm":"Corrig\xE9 \u2713","mine.validate.reopen":"Toujours cass\xE9","mine.validate.view":"Voir","diag.run":"Diagnostiquer","diag.running":"V\xE9rification de la connexion\u2026","diag.offline":"Vous semblez hors ligne. Reconnectez-vous puis r\xE9essayez.","diag.blocked":"Le service de feedback est injoignable depuis ce r\xE9seau. Un pare-feu ou proxy le bloque \u2014 demandez \xE0 votre TI d\u2019autoriser {host}.","diag.intercepted":"Votre r\xE9seau d\u2019entreprise (inspection SSL) intercepte le trafic du widget. Demandez \xE0 votre TI d\u2019ajouter {host} \xE0 la liste d\u2019exclusion.","diag.preflight":"Un proxy r\xE9seau bloque les requ\xEAtes s\xE9curis\xE9es du widget (pr\xE9flight CORS). Demandez \xE0 votre TI d\u2019autoriser {host}.","diag.key":"La cl\xE9 d\u2019acc\xE8s du widget a \xE9t\xE9 refus\xE9e. Contactez l\u2019\xE9quipe du site.","diag.throttle":"Trop de requ\xEAtes pour le moment \u2014 patientez puis r\xE9essayez.","diag.healthy":"Le service est joignable \u2014 le probl\xE8me semble passager. R\xE9essayez.","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.jump.placeholder":"#","mine.jump.go":"Ouvrir","mine.jump.aria":"Ouvrir un rapport par num\xE9ro","mine.jump.not_found":"Aucun rapport avec ce num\xE9ro.","error.rate_limited":"Trop de requ\xEAtes \u2014 r\xE9essaie dans {seconds} s.","error.rate_limited_generic":"Trop de requ\xEAtes \u2014 r\xE9essaie dans un instant.","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.attach_add":"Ajouter une image","detail.attach_remove":"Retirer","detail.attachment_alt":"Image jointe","detail.copy_link":"Copier le lien","detail.copied":"Lien copi\xE9","detail.edit":"Modifier","detail.edit_save":"Enregistrer","detail.edit_cancel":"Annuler","detail.edit_saving":"Enregistrement\u2026","detail.edit_failed":"Impossible d\u2019enregistrer vos modifications.","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)","detail.verified.badge":"V\xE9rifi\xE9 par l\u2019agent","detail.verified.title":"Preuve de correction","detail.verified.functional":"Fonctionnel v\xE9rifi\xE9","detail.verified.ui":"Interface v\xE9rifi\xE9e","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"},aa={fr:oa};function na(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=aa[t])!=null?r:null}function or(e,t={}){var a;let r=(a=na(t.locale))!=null?a:{};return{...ra,...r,...e}}ce();re();function pe(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var qt="mfb:locationchange",Pr=!1;function ha(){if(!(Pr||typeof history=="undefined")){Pr=!0;for(let e of["pushState","replaceState"]){let t=history[e];history[e]=function(...r){let a=t.apply(this,r);return window.dispatchEvent(new Event(qt)),a}}}}function tt(e){return ha(),window.addEventListener("popstate",e),window.addEventListener(qt,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(qt,e)}}re();re();ce();ce();var va=0;function o(e,t,r,a,n,i){t||(t={});var s,l,c=t;if("ref"in c)for(l in c={},t)l=="ref"?s=t[l]:c[l]=t[l];var d={type:e,props:c,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--va,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return Q.vnode&&Q.vnode(d),d}function rt({api:e,strings:t,host:r}){var l;let[a,n]=q("idle"),i=async()=>{n("running");try{n(await e.diagnose())}catch(c){n("blocked")}};if(a==="idle")return o("button",{type:"button",class:"btn diag-btn",onClick:()=>{i()},children:t["diag.run"]});if(a==="running")return o("div",{class:"diag-result",children:t["diag.running"]});let s=`diag.${a}`;return o("div",{class:"diag-result",children:((l=t[s])!=null?l:a).replace("{host}",r)})}var xe=new Map;function Tr(e,t){return`${e}|${t}`}function Er(e){let t=xe.get(e);return t&&Date.now()-t.at<6e4?t:null}function Ar(e,t,r){if(!xe.has(e)&&xe.size>=50){let a=xe.keys().next().value;a!==void 0&&xe.delete(a)}xe.delete(e),xe.set(e,{page:t,kpis:r,at:Date.now()})}var Mr="mhosaic.boardView.";function Lr(e){try{let t=localStorage.getItem(Mr+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Br(e,t){try{localStorage.setItem(Mr+e,JSON.stringify(t))}catch(r){}}function be(e,t){let r=!1,a=!1,n=0,i=null,s=typeof document!="undefined"?document:null,l=()=>Math.min(t*2**n,t*10),c=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let u=!1;try{u=await e()}catch(p){u=!1}r||(n=u?0:n+1,i=setTimeout(()=>{c()},l()))},d=()=>{r||!a||s!=null&&s.hidden||(a=!1,c())};return s==null||s.addEventListener("visibilitychange",d),c(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",d)}}}function Te(e,t){return e instanceof Me?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}re();var zr=/#(\d+)/g;function ze(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;zr.lastIndex=0;let i;for(;(i=zr.exec(r))!==null;){i.index>n&&a.push(r.slice(n,i.index));let s=Number(i[1]);a.push(o("button",{type:"button",class:"seq-link",onClick:()=>t(s),"aria-label":`Open report #${s}`,children:["#",s]})),n=i.index+i[0].length}return n<r.length&&a.push(r.slice(n)),a.length?a:[r]}function Fr({comment:e,strings:t,onOpenSeq:r,stableUrl:a}){var p;let n=e.is_mine,i=!n&&e.author_source==="mcp",s=!n&&e.author_source==="system",l=i?"mcp":s?"system":"staff",c=l==="mcp"?"detail.author.mcp":l==="system"?"detail.author.system":"detail.author.staff",d=e.author_label||t[c],u=((p=e.attachments)!=null?p:[]).filter(f=>f.url);return o("div",{class:`comment-bubble ${n?"is-mine":"is-other"}`,children:[!n&&d&&o("div",{class:`comment-author comment-author--${l}`,children:d}),e.body&&o("div",{class:"comment-body",children:ze(e.body,r)}),u.length>0&&o("div",{class:"comment-attachments",children:u.map(f=>{let b=a?a(`att:${f.id}`,f.url):f.url;return o("a",{class:"comment-attachment",href:b,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:b,alt:t["detail.attachment_alt"],loading:"lazy"})},f.id)})}),o("div",{class:"comment-time",children:ya(e.created_at)})]})}function ya(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var xa=["image/png","image/jpeg","image/webp"];function ot(e){return xa.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function Ee(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),a=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-a)}`}function at(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 _a=3e4;function nt({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l,buildPermalink:c,seed:d}){var $t,Ht,Ot,Nt,Wt,jt;let[u,p]=q(null),[f,b]=q(null),[k,R]=q(!1),[x,_]=q(!1),[P,z]=q(""),[w,m]=q(!1),[v,T]=q(!1),[F,h]=q(""),[B,D]=q(!1),[K,O]=q(!1),[C,I]=q(!1),[H,J]=q([]),[ee,G]=q(""),S=U(null),g=U(!0),E=U(new Map),[,A]=q(0),W=45*6e4,M=(L,N)=>{if(!N)return N;let X=E.current.get(L);return X&&Date.now()-X.at<W?X.url:(E.current.set(L,{url:N,at:Date.now()}),N)},$=L=>{E.current.delete(L),A(N=>N+1)},te=U(H);te.current=H,j(()=>()=>te.current.forEach(L=>URL.revokeObjectURL(L.preview)),[]);let ae=L=>{G("");let N=5-H.length,X=L.slice(0,Math.max(0,N));for(let Z of X){let de=ot(Z);if(de){G(de.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(de.maxMb)));return}}if(X.length){let Z=X.map(de=>({blob:de,preview:URL.createObjectURL(de)}));J(de=>[...de,...Z])}L.length>X.length&&G(a["form.screenshot.error_count"].replace("{max}",String(5)))},ke=L=>{var Z;let N=L.target,X=Array.from((Z=N.files)!=null?Z:[]);X.length&&ae(X),N.value=""},se=L=>{let N=H[L];N&&URL.revokeObjectURL(N.preview),J(X=>X.filter((Z,de)=>de!==L)),G("")},Se=async()=>{try{let L=await e.getReport(r,t);return g.current&&(p(L),b(null)),!0}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",L),!g.current)return!1;let N=Te(L,a);return b(N!=null?N:"load_failed"),!1}};j(()=>{g.current=!0;let L=be(Se,_a);return()=>{g.current=!1,L.stop()}},[r,t]);let ve=async()=>{if(!(!F.trim()&&H.length===0||B)){D(!0);try{let L=`${r}:${Date.now()}`,N=H.map(Z=>Z.blob),X=await e.addComment(r,t,F.trim(),L,N.length?N:void 0);if(!g.current)return;h(""),H.forEach(Z=>URL.revokeObjectURL(Z.preview)),J([]),G(""),p(Z=>Z&&{...Z,comments:wa(Z.comments,X)}),Se()}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",L),!g.current)return;b(a["detail.send_failed"])}finally{g.current&&D(!1)}}},He=async()=>{if(!(!c||!u))try{if(await navigator.clipboard.writeText(c(u.id)),!g.current)return;R(!0),setTimeout(()=>{g.current&&R(!1)},2e3)}catch(L){}},Fo=()=>{u&&(z(u.description),T(!1),_(!0))},Io=()=>{_(!1),T(!1)},Do=async()=>{if(!u||w)return;let L=P.trim();if(L){m(!0),T(!1);try{let N=await e.editDescription(r,t,L);if(!g.current)return;p(N),_(!1)}catch(N){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",N),!g.current)return;T(!0)}finally{g.current&&m(!1)}}},Ko=async()=>{if(!(K||C)){O(!0);try{let L=await e.closeAsResolved(r,t);if(!g.current)return;p(L)}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",L),!g.current)return;b(a["detail.close_failed"])}finally{g.current&&O(!1)}}},$o=async()=>{if(!(K||C)){I(!0);try{let L=await e.reopenUnresolved(r,t);if(!g.current)return;p(L)}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",L),!g.current)return;b(a["detail.reopen_failed"])}finally{g.current&&I(!1)}}};if(!u&&!f){if(d){let L=o("span",{class:`pill pill-status pill-status--${d.status}`,children:($t=a[`status.${d.status}`])!=null?$t:d.status});return o("div",{class:`report-detail variant-${s} is-seeded`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),L]}),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:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),L]}),o("div",{class:"report-detail-body",children:[o("div",{class:"report-detail-description-row",children:o("p",{class:"report-detail-description",children:ze(d.description,l)})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),o("div",{class:"mine-loading",children:a["mine.loading"]})]})]})}return o("div",{class:"mine-loading",children:a["mine.loading"]})}if(!u)return f&&f!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:f}),o("button",{type:"button",class:"btn",onClick:()=>{Se()},children:a["board.retry"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]}):o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:a["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:a["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]});let It=(Ht=u.is_mine)!=null?Ht:i,Dt=(Ot=u.can_moderate)!=null?Ot:It,Kt=Dt&&u.status==="awaiting_validation",Ho=Dt;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:n,children:["\u2190 ",a["detail.back"]]}),o("span",{class:"report-detail-header-pills",children:[o("span",{class:`pill pill-status pill-status--${u.status}`,children:(Nt=a[`status.${u.status}`])!=null?Nt:u.status}),u.verification&&o("span",{class:"pill pill-verified",children:a["detail.verified.badge"]})]})]}),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:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:"report-detail-header-pills",children:[o("span",{class:`pill pill-status pill-status--${u.status}`,children:(Wt=a[`status.${u.status}`])!=null?Wt:u.status}),u.verification&&o("span",{class:"pill pill-verified",children:a["detail.verified.badge"]})]})]}),o("div",{class:"report-detail-body",children:[o(ka,{detail:u,strings:a}),x?o("div",{class:"report-detail-edit",children:[o("textarea",{class:"report-detail-edit-input",value:P,onInput:L=>{z(L.target.value),T(!1)},disabled:w}),v&&o("p",{class:"error",role:"alert",children:a["detail.edit_failed"]}),o("div",{class:"report-detail-edit-actions",children:[o("button",{type:"button",class:"btn btn--ghost",onClick:Io,disabled:w,children:a["detail.edit_cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:Do,disabled:w||!P.trim(),children:w?a["detail.edit_saving"]:a["detail.edit_save"]})]})]}):o("div",{class:"report-detail-description-row",children:[o("p",{class:"report-detail-description",children:ze(u.description,l)}),It&&o("button",{type:"button",class:"btn btn--ghost report-detail-edit",onClick:Fo,children:a["detail.edit"]})]}),c&&o("div",{class:"report-detail-permalink",children:o("button",{type:"button",class:"btn btn--ghost report-detail-copy-link",onClick:He,children:k?a["detail.copied"]:a["detail.copy_link"]})}),((jt=u.screenshots)!=null&&jt.length?u.screenshots.map(L=>L.url):[u.screenshot_url]).map((L,N)=>({url:M(`shot:${N}`,L!=null?L:null),pinKey:`shot:${N}`})).filter(L=>!!L.url).map(({url:L,pinKey:N})=>{let X=at(L);return X?o("a",{class:"report-detail-screenshot",href:X,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:L,alt:"",loading:"lazy",onError:()=>$(N)})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:L,alt:"",loading:"lazy",onError:()=>$(N)})})}),u.verification&&o(qa,{verification:u.verification,strings:a,pinUrl:M,unpinUrl:$}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),u.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:u.comments.map(L=>o("li",{children:o(Fr,{comment:L,strings:a,...l&&{onOpenSeq:l},stableUrl:(N,X)=>{var Z;return(Z=M(N,X))!=null?Z:X}})}))}),u.status_history&&u.status_history.length>0&&o(La,{rows:u.status_history,strings:a}),u.technical_context&&o(Ra,{ctx:u.technical_context,strings:a}),Ho?o("div",{class:"report-compose",children:[o("textarea",{value:F,placeholder:a["detail.compose_placeholder"],onInput:L=>h(L.target.value),disabled:B}),H.length>0&&o("div",{class:"compose-attachments",children:H.map((L,N)=>o("div",{class:"compose-attachment",children:[o("img",{src:L.preview,alt:a["detail.attachment_alt"]}),o("button",{type:"button",class:"compose-attachment-remove","aria-label":a["detail.attach_remove"],onClick:()=>se(N),disabled:B,children:"\xD7"})]},L.preview))}),ee&&o("p",{class:"compose-attach-error",role:"alert",children:ee}),o("input",{ref:S,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"compose-attach-input",onChange:ke,hidden:!0}),o("div",{class:"report-compose-actions",children:[o("button",{type:"button",class:"btn btn--ghost compose-attach-btn",onClick:()=>{var L;return(L=S.current)==null?void 0:L.click()},disabled:B||H.length>=5,children:a["detail.attach_add"]}),Kt&&o("button",{type:"button",class:"btn",onClick:Ko,disabled:K||C,children:K?a["detail.close_busy"]:a["detail.close_cta"]}),Kt&&o("button",{type:"button",class:"btn btn--ghost",onClick:$o,disabled:K||C,children:C?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ve,disabled:!F.trim()&&H.length===0||B,children:B?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),f&&o("div",{class:"error",children:f})]})]})}function wa(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function ka({detail:e,strings:t}){var n;let r=`detail.context.capture.${e.capture_method}`,a=(n=t[r])!=null?n: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:a})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:Ir(e.created_at)})]}),e.page_url&&(()=>{let i=at(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:Ee(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:Ee(e.page_url,64)})]})})()]})}function Ir(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var Sa=20,Ca=15;function Ra({ctx:e,strings:t}){var d,u,p;let r=(d=e.errors)!=null?d:[],a=((u=e.consoleLogs)!=null?u:[]).slice(-Sa),n=((p=e.networkRequests)!=null?p:[]).slice(-Ca),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,c=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:c}),o("div",{class:"tech-body",children:[i&&o(Pa,{device:i,strings:t}),r.length>0&&o(Ta,{errors:r,strings:t}),a.length>0&&o(Ea,{logs:a,strings:t}),n.length>0&&o(Aa,{rows:n,strings:t})]})]})}function qa({verification:e,strings:t,pinUrl:r,unpinUrl:a}){return o("details",{class:"report-detail-verification",children:[o("summary",{children:t["detail.verified.title"]}),o("div",{class:"verification-body",children:[o("p",{class:"verification-evidence",children:e.evidence}),o("div",{class:"verification-meta",children:[o("span",{children:[e.functional_ok?"\u2713":"\u2717"," ",t["detail.verified.functional"]]}),o("span",{children:[e.ui_ok?"\u2713":"\u2717"," ",t["detail.verified.ui"]]}),o("span",{children:[e.environment,e.app_version?` \xB7 ${e.app_version}`:""]})]}),e.screenshots.length>0&&o("div",{class:"verification-shots",children:e.screenshots.map((n,i)=>{var d,u;let s=`verif:${i}`,l=r(s,n.url);if(!l)return null;let c=at(l);return c?o("a",{class:"report-detail-screenshot",href:c,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:l,alt:(d=n.caption)!=null?d:"",loading:"lazy",onError:()=>a(s)})},i):o("div",{class:"report-detail-screenshot",children:o("img",{src:l,alt:(u=n.caption)!=null?u:"",loading:"lazy",onError:()=>a(s)})},i)})})]})]})}function Pa({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let a=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${a}`})}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(a=>o(oe,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function Ta({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:Ma(r.stack)})]}))})]})}function Ea({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 Aa({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 a=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${a?" 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:Ee(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Ma(e){let t=e.split(`
619
619
  `);return t.length<=12?e:t.slice(0,12).join(`
620
620
  `)+`
621
- \u2026`}function Aa({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 a=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,n=(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:Ir(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:a}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:n})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var La=3e4,Ba=300,za=["recent","oldest","updated","severity","status"],Fa=["new","in_progress","awaiting_validation","closed","rejected"],Ia=["bug","feature","question","praise","typo"],Da=["blocker","high","medium","low"];function $r({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var z,Q;let[i,s]=R(()=>Lr(t)),[l,d]=R(!0);N(()=>{Br(t,i)},[t,Kr(i)]);let[c,f]=R(null),[p,u]=R(null),[h,k]=R(!0),[C,x]=R(!1),[w,P]=R(null),[L,S]=R(n!=null?n:null),[g,y]=R(0),[b,B]=R(0),[E,A]=R(null),[K,D]=R(!1),[j,q]=R((z=i.q)!=null?z:""),I=Xa(j,Ba);N(()=>{s(F=>{var H;if(((H=F.q)!=null?H:"")===I)return F;if(I===""){let{q:te,...ae}=F;return ae}return{...F,q:I}})},[I]),N(()=>{var F;q((F=i.q)!=null?F:"")},[i.q]);let $=ne(()=>{var F,H,te,ae,ke,se;return((H=(F=i.status)==null?void 0:F.length)!=null?H:0)+((ae=(te=i.type)==null?void 0:te.length)!=null?ae:0)+((se=(ke=i.severity)==null?void 0:ke.length)!=null?se:0)+(i.q?1:0)+(i.mine?1:0)},[i]);N(()=>{if(l)return tt(()=>B(F=>F+1))},[l]);let Y=ne(()=>{var H;let F=!!((H=i.q)!=null&&H.trim());return l&&!F?{...i,pagePath:pe(a!==void 0?{getCurrentPage:a}:{})}:i},[Kr(i),l,b]);N(()=>{let F=!1,H=new AbortController,te=Er(t,JSON.stringify(Y)),ae=Tr(te);ae?(f(ae.page),u(ae.kpis),x(!1),k(!1)):(f(se=>se?{...se,results:Ya(se.results,Y)}:null),x(!0),k(!0)),A(null),D(!1);let ke=be(async()=>{var se,Se;try{let ve=await e.listBoard(t,Y,{signal:H.signal}),He=(se=ve.kpis)!=null?se:await e.fetchBoardKpis(t,Y,{signal:H.signal});return F||(Mr(te,ve,He),f(ve),u(He),x(!1),P(null)),!0}catch(ve){return F||P((Se=Ee(ve,r))!=null?Se:r["board.list.error"]),!1}finally{F||k(!1)}},La);return()=>{F=!0,ke.stop(),H.abort()}},[e,t,JSON.stringify(Y)]);let ee=ne(()=>{if(!c)return[];if(!E||E.rows.length===0)return c.results;let F=new Set(c.results.map(H=>H.id));return[...c.results,...E.rows.filter(H=>!F.has(H.id))]},[c,E]),J=E?E.hasMore:!!(c!=null&&c.next),m=async()=>{if(K||!c)return;let F=E?E.nextPage:2;D(!0);try{let H=await e.listBoard(t,{...Y,page:F});A(te=>{var ae;return{rows:[...(ae=te==null?void 0:te.rows)!=null?ae:[],...H.results],nextPage:F+1,hasMore:H.next!==null}})}catch(H){}finally{D(!1)}},v=ne(()=>{var F;return L&&(F=ee.find(H=>H.id===L))!=null?F:null},[L,ee]),M=F=>{S(F.id),y(H=>H+1)};return o("div",{class:`board-view ${C?"is-stale":""}`,children:[o(Ka,{strings:r,kpis:p,thisPage:l}),o(Ha,{filters:i,onChange:s,searchDraft:j,onSearchDraftChange:q,activeCount:$,strings:r,thisPage:l,onToggleThisPage:()=>d(F=>!F)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":h,children:[w&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:w}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{P(null),k(!0),B(F=>F+1)},children:r["board.retry"]}),o(rt,{api:e,strings:r,host:e.endpointHost})]}),!w&&h&&!c&&o(Wa,{}),!w&&c&&ee.length===0&&(!h||C)&&o(ja,{strings:r,thisPage:l,onAllPages:()=>d(!1)}),!w&&c&&ee.length>0&&o(oe,{children:[o(Oa,{rows:ee,selectedId:L,onPick:M,strings:r,total:c.count,thisPage:l}),J&&!C&&o("button",{type:"button",class:"btn btn--ghost board-load-more",onClick:()=>{m()},disabled:K,children:r["board.list.loadMore"]})]})]}),o("div",{class:`board-detail-wrap ${L?"has-selection":""}`,children:L?o(at,{api:e,externalId:t,reportId:L,strings:r,onBack:()=>S(null),canModerate:v?(Q=v.can_moderate)!=null?Q:v.is_mine:!1,...v?{seed:v}:{},variant:"board",onOpenSeq:F=>{e.getReportBySeq(F,t).then(H=>{S(H.id),y(te=>te+1)}).catch(()=>{})}},g):o("div",{class:"board-detail-empty",children:[o(Ga,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Ka({strings:e,kpis:t,thisPage:r}){let a=r?e["board.scope.onThisPage"]:(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 ${a}`:a})]})]}),o($a,{kpis:t,strings:e})]})}function $a({kpis:e,strings:t}){var a,n,i,s,l,d;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n: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((d=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?d: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 Ha({filters:e,onChange:t,searchDraft:r,onSearchDraftChange:a,activeCount:n,strings:i,thisPage:s,onToggleThisPage:l}){var k,C,x,w,P,L,S;let d=g=>{if(g===""){let{status:y,...b}=e;t(b)}else t({...e,status:[g]})},c=g=>{if(g===""){let{type:y,...b}=e;t(b)}else t({...e,type:[g]})},f=g=>{if(g===""){let{severity:y,...b}=e;t(b)}else t({...e,severity:[g]})},p=g=>t({...e,ordering:g}),u=()=>{if(e.mine){let{mine:g,...y}=e;t(y)}else t({...e,mine:!0})},h=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":i["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${s?"is-active":""}`,"aria-pressed":s,onClick:()=>!s&&l(),children:i["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${s?"":"is-active"}`,"aria-pressed":!s,onClick:()=>s&&l(),children:i["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":i["board.sort"],value:(k=e.ordering)!=null?k:"recent",onChange:g=>p(g.target.value),children:za.map(g=>o("option",{value:g,children:i[`board.sort.${g}`]},g))}),o("select",{class:"board-filter-select","aria-label":i["board.filter.status"],value:(x=(C=e.status)==null?void 0:C[0])!=null?x:"",onChange:g=>d(g.target.value),children:[o("option",{value:"",children:i["board.filter.status"]}),Fa.map(g=>{var y;return o("option",{value:g,children:(y=i[`board.kpi.${g}`])!=null?y:g},g)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.type"],value:(P=(w=e.type)==null?void 0:w[0])!=null?P:"",onChange:g=>c(g.target.value),children:[o("option",{value:"",children:i["board.filter.type"]}),Ia.map(g=>{var y;return o("option",{value:g,children:(y=i[`type.${g}`])!=null?y:g},g)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.severity"],value:(S=(L=e.severity)==null?void 0:L[0])!=null?S:"",onChange:g=>f(g.target.value),children:[o("option",{value:"",children:i["board.filter.severity"]}),Da.map(g=>{var y;return o("option",{value:g,children:(y=i[`severity.${g}`])!=null?y:g},g)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:i["board.filter.search.placeholder"],value:r,onInput:g=>a(g.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:u}),o("span",{children:i["board.filter.mine"]})]}),n>0&&o("button",{type:"button",class:"board-filter-clear",onClick:h,children:[o(Ua,{}),i["board.filter.clear"]]})]})}function Oa({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(oe,{children:[o("div",{class:"board-list-count",children:a[i?"board.list.count.page":"board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(s=>o(Na,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function Na({row:e,selected:t,onPick:r,strings:a}){var i,s;let n=e.is_mine?a["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=a[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=a[`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:n}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Qa,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Ja(e.created_at)})]})]})})}function ja({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(Va,{}),o("h3",{children:e[t?"board.list.empty.page.title":"board.list.empty.title"]}),o("p",{children:e[t?"board.list.empty.page.description":"board.list.empty.description"]}),t&&o("button",{type:"button",class:"btn btn--ghost",onClick:r,children:e["board.scope.allPages"]})]})}function Wa(){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 Qa(){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 Ua(){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 Va(){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 Ga(){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 Xa(e,t){let[r,a]=R(e);return N(()=>{let n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}var Dr={blocker:0,high:1,medium:2,low:3};function Ya(e,t){var n,i,s,l;let r=e;(n=t.status)!=null&&n.length&&(r=r.filter(d=>t.status.includes(d.status))),(i=t.type)!=null&&i.length&&(r=r.filter(d=>t.type.includes(d.feedback_type))),(s=t.severity)!=null&&s.length&&(r=r.filter(d=>t.severity.includes(d.severity))),t.mine&&(r=r.filter(d=>d.is_mine));let a=r.slice();switch((l=t.ordering)!=null?l:"recent"){case"oldest":a.sort((d,c)=>d.created_at.localeCompare(c.created_at));break;case"updated":a.sort((d,c)=>c.updated_at.localeCompare(d.updated_at));break;case"severity":a.sort((d,c)=>{var f,p;return((f=Dr[d.severity])!=null?f:9)-((p=Dr[c.severity])!=null?p:9)});break;case"status":break;default:a.sort((d,c)=>c.created_at.localeCompare(d.created_at))}return a}function Kr(e){var t,r,a,n,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:(a=e.severity)==null?void 0:a.slice().sort(),q:(n=e.q)!=null?n:"",m:!!e.mine,o:(i=e.ordering)!=null?i:""})}function Ja(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m`;let n=Math.floor(a/60);if(n<24)return`${n}h`;let i=Math.floor(n/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}re();function Za(e){return`pill pill-status pill-status--${e}`}function en(e){return`pill pill-severity pill-severity--${e}`}function tn(){return"pill pill-type"}function rn(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 a=Math.round(r/60);if(a<60)return`${a}m`;let n=Math.round(a/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function on(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function nt({row:e,strings:t,onClick:r,extraMeta:a}){var i;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:Za(e.status),children:(i=t[`status.${e.status}`])!=null?i:e.status}),o("span",{class:tn(),children:t[`type.${e.feedback_type}`]}),o("span",{class:en(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:rn(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",on(e.comment_count,t)]}),a&&o("span",{children:["\xB7 ",a]})]})]})}var an=3e4;function nn(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 sn(e){let t=new Map;for(let r of e){let a=nn(r.resolved_at);if(!a)continue;let n=t.get(a);n?n.push(r):t.set(a,[r])}return Array.from(t.entries()).sort(([r],[a])=>r<a?1:-1).map(([r,a])=>({weekKey:r,label:ln(r),rows:a}))}function ln(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Hr({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=R(null),[s,l]=R(null),[d,c]=R(!1),f=U(!0),p=async()=>{c(!0),l(null);try{let C=await e.listChangelog(t);return f.current&&i(C),!0}catch(C){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",C),f.current&&l(r["mine.error"]),!1}finally{f.current&&c(!1)}};N(()=>{f.current=!0;let C=be(p,an);return()=>{f.current=!1,C.stop()}},[t]);let u=ne(()=>n?sn(n):[],[n]),h=n===null&&!s,k=n!==null&&n.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:d,children:d?r["mine.loading"]:r["mine.refresh"]})]}),h&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),k&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),u.length>0&&o("div",{class:"changelog-groups",children:u.map(C=>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}",C.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[C.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(C.rows.length))})]}),o("ul",{class:"mine-rows",children:C.rows.map(x=>o("li",{children:o(nt,{row:x,strings:r,onClick:()=>a(x),extraMeta:x.pr_number?`PR #${x.pr_number}`:void 0})}))})]},C.weekKey))})]})}function cn(){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 Or({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o(cn,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}re();re();var Nr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],dn=.35;function jr(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")pn(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 a=1;a<t.points.length;a++)e.lineTo(t.points[a].x,t.points[a].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let a=e.measureText(t.text),n=4,i=a.width+n*2,s=t.fontSize+n*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-n,t.y-n,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=dn,e.fillRect(it(t.x,t.w),it(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&un(e,t,r);e.restore()}function it(e,t){return t<0?e+t:e}function pn(e,t,r,a,n){let s=Math.atan2(n-r,a-t);e.beginPath(),e.moveTo(t,r),e.lineTo(a,n),e.stroke(),e.beginPath(),e.moveTo(a,n),e.lineTo(a-14*Math.cos(s-Math.PI/6),n-14*Math.sin(s-Math.PI/6)),e.lineTo(a-14*Math.cos(s+Math.PI/6),n-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function un(e,t,r){if(!r)return;let a=it(t.x,t.w),n=it(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 d=n;d<n+s;d+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),p=Math.min(l,n+s-d);e.drawImage(r,c,d,f,p,c,d,f,p)}e.imageSmoothingEnabled=!1;for(let d=n;d<n+s;d+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),p=Math.min(l,n+s-d);e.drawImage(r,c,d,1,1,c,d,f,p)}e.imageSmoothingEnabled=!0}var ue={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 Wr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=U(null),i=U(null),s=U(null),[l,d]=R("rectangle"),[c,f]=R(Nr[0]),[p,u]=R([]),[h,k]=R([]),[C,x]=R([]),w=U(!1),[P,L]=R(null),[S,g]=R(!1),[y,b]=R(!1),B=U(1);function E(m){u(v=>(k(M=>[...M,v]),[...v,m])),x([])}function A(){u(m=>(k(v=>[...v,m]),[])),x([])}function K(){k(m=>{if(m.length===0)return m;let v=m[m.length-1];return u(M=>(x(z=>[M,...z]),v)),m.slice(0,-1)})}function D(){x(m=>{if(m.length===0)return m;let v=m[0];return u(M=>(k(z=>[...z,M]),v)),m.slice(1)})}St(()=>{let m=v=>{v.key==="Escape"&&(v.stopPropagation(),a())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[a]),N(()=>{let m=v=>{if(!(v.metaKey||v.ctrlKey))return;let z=v.key.toLowerCase();z==="z"?(v.preventDefault(),v.stopPropagation(),v.shiftKey?D():K()):z==="y"&&(v.preventDefault(),v.stopPropagation(),D())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[h,C,p]),N(()=>{let m=URL.createObjectURL(e),v=new Image;return v.onload=()=>{s.current=v,g(!0)},v.src=m,()=>URL.revokeObjectURL(m)},[e]),St(()=>{if(!S||!n.current||!s.current||!i.current)return;let m=s.current,M=i.current.clientWidth-16,z=window.innerHeight*.65,Q=Math.min(M/m.width,z/m.height,1);B.current=Q;let F=n.current;F.width=m.width,F.height=m.height,F.style.width=`${m.width*Q}px`,F.style.height=`${m.height*Q}px`,j()},[S]),N(()=>{j()},[p,P]);function j(){let m=n.current,v=s.current;if(!m||!v)return;let M=m.getContext("2d");if(M){M.clearRect(0,0,m.width,m.height),M.drawImage(v,0,0);for(let z of p)jr(M,z,v);P&&jr(M,P,v)}}function q(m){let M=n.current.getBoundingClientRect();return{x:(m.clientX-M.left)/B.current,y:(m.clientY-M.top)/B.current}}let I=m=>{if(!S)return;let{x:v,y:M}=q(m),z=n.current.width,Q=Math.max(3,Math.round(z/400)),F=Math.max(8,Math.round(z/80));if(l==="text"){let H=window.prompt(t["annotator.text_prompt"]);H&&H.trim()&&E({kind:"text",x:v,y:M,text:H.trim(),color:c,fontSize:Math.max(16,Math.round(z/50)),lineWidth:1});return}w.current=!0,l==="rectangle"?L({kind:"rectangle",x:v,y:M,w:0,h:0,color:c,lineWidth:Q}):l==="arrow"?L({kind:"arrow",x1:v,y1:M,x2:v,y2:M,color:c,lineWidth:Q}):l==="freehand"?L({kind:"freehand",points:[{x:v,y:M}],color:c,lineWidth:Q}):l==="highlight"?L({kind:"highlight",x:v,y:M,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&L({kind:"blur",x:v,y:M,w:0,h:0,color:"#000000",lineWidth:0,tile:F})},$=m=>{if(!w.current)return;let{x:v,y:M}=q(m);L(z=>z&&(z.kind==="rectangle"||z.kind==="highlight"||z.kind==="blur"?{...z,w:v-z.x,h:M-z.y}:z.kind==="arrow"?{...z,x2:v,y2:M}:z.kind==="freehand"?{...z,points:[...z.points,{x:v,y:M}]}:z))},Y=()=>{L(m=>(w.current&&m&&((m.kind==="rectangle"||m.kind==="highlight"||m.kind==="blur")&&Math.abs(m.w)<4&&Math.abs(m.h)<4||m.kind==="arrow"&&Math.hypot(m.x2-m.x1,m.y2-m.y1)<4||m.kind==="freehand"&&m.points.length<3||E(m)),null)),w.current=!1},ee=async()=>{let m=n.current;if(m){b(!0);try{let v=await new Promise(M=>m.toBlob(M,"image/png",.92));v&&r(v)}finally{b(!1)}}},J=[{id:"rectangle",icon:ue.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ue.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ue.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ue.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ue.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ue.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:m=>{m.target===m.currentTarget&&a()},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:a,children:ue.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:J.map(m=>o("button",{type:"button",onClick:()=>d(m.id),title:m.label,"aria-label":m.label,"aria-pressed":l===m.id,class:`annotator-tool ${l===m.id?"is-active":""}`,children:m.icon},m.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Nr.map(m=>o("button",{type:"button",onClick:()=>f(m),"aria-label":m,"aria-pressed":c===m,class:`annotator-color ${c===m?"is-active":""}`,style:{backgroundColor:m}},m)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:m=>f(m.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:K,disabled:h.length===0,title:t["annotator.undo"],children:[ue.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:D,disabled:C.length===0,title:t["annotator.redo"],children:[ue.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:A,disabled:p.length===0,children:[ue.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:S?o("canvas",{ref:n,onMouseDown:I,onMouseMove:$,onMouseUp:Y,onMouseLeave:Y,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:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ee,disabled:y||!S,children:y?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var fn=["bug","feature","question","praise","typo"],mn=["blocker","high","medium","low"];function Qr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,d]=R(""),[c,f]=R("bug"),[p,u]=R("medium"),[h,k]=R(""),[C,x]=R([]),[w,P]=R(!1),[L,S]=R(null),g=U(null),y=U(null),b=a==="submitting",B=b?e["form.submitting"]:e["form.submit"],E=typeof window!="undefined"?window.location.href:"",A=l.trim()!==""||C.length>0;N(()=>{s==null||s(A)},[A]);let K=U(C);K.current=C,N(()=>()=>{K.current.forEach(m=>URL.revokeObjectURL(m.preview))},[]);let D=m=>{k("");let v=5-C.length,M=m.slice(0,Math.max(0,v));for(let z of M)if(z instanceof File){let Q=ot(z);if(Q){k(Q.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(Q.maxMb)));return}}if(M.length){let z=M.map(Q=>({blob:Q,preview:URL.createObjectURL(Q)}));x(Q=>[...Q,...z])}m.length>M.length&&k(e["form.screenshot.error_count"].replace("{max}",String(5)))},j=m=>{let v=C[m];v&&URL.revokeObjectURL(v.preview),x(M=>M.filter((z,Q)=>Q!==m)),k(""),g.current&&(g.current.value="")},q=m=>{var z;let v=m.target,M=Array.from((z=v.files)!=null?z:[]);M.length&&D(M),v.value=""},I=m=>{m.preventDefault(),m.stopPropagation(),P(!0)},$=m=>{m.preventDefault(),m.stopPropagation(),m.currentTarget===m.target&&P(!1)},Y=m=>{var M,z;m.preventDefault(),m.stopPropagation(),P(!1);let v=Array.from((z=(M=m.dataTransfer)==null?void 0:M.files)!=null?z:[]);v.length&&D(v)};N(()=>{let m=y.current;if(!m)return;let v=M=>{var Q;let z=(Q=M.clipboardData)==null?void 0:Q.items;if(z){for(let F of Array.from(z))if(F.kind==="file"&&F.type.startsWith("image/")){let H=F.getAsFile();if(H){M.preventDefault(),D([H]);return}}}};return m.addEventListener("paste",v),()=>m.removeEventListener("paste",v)},[C.length]);let ee=m=>{let v=L;if(v===null||!C[v]){S(null);return}URL.revokeObjectURL(C[v].preview);let M={blob:m,preview:URL.createObjectURL(m)};x(z=>z.map((Q,F)=>F===v?M:Q)),S(null)};return o("form",{onSubmit:m=>{if(m.preventDefault(),!l.trim()){k(e["form.description.required"]);return}k("");let v={description:l.trim(),feedback_type:c,severity:p};C.length&&(v.screenshots=C.map(M=>M.blob),v.capture_method="manual"),t(v)},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:l,placeholder:e["form.description.placeholder"],onInput:m=>d(m.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:m=>f(m.target.value),children:fn.map(m=>o("option",{value:m,children:e[`type.${m}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:p,onChange:m=>u(m.target.value),children:mn.map(m=>o("option",{value:m,children:e[`severity.${m}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:g,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"mfb-sr-only",onChange:q,"aria-hidden":"true",tabIndex:-1}),C.length>0&&o("div",{class:"screenshot-strip",children:C.map((m,v)=>o("div",{class:"screenshot-preview",children:[o("img",{src:m.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>S(v),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:()=>j(v),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"]]})]})]},m.preview))}),C.length<5&&o("div",{ref:y,class:`screenshot-dropzone ${w?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var m;return(m=g.current)==null?void 0:m.click()},onKeyDown:m=>{var v;(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),(v=g.current)==null||v.click())},onDragOver:I,onDragLeave:$,onDrop:Y,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"]})]})]}),E&&o("div",{class:"page-context",title:E,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:Te(E,90)})]}),o("div",{class:"capture-notice",children:e["form.capture.notice"]}),h&&o("div",{class:"error",children:h}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:i!==void 0?e["form.success.seq"].replace("{seq}",String(i)):e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:b,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:b,children:B})]}),L!==null&&C[L]&&o(Wr,{imageBlob:C[L].blob,strings:e,onCancel:()=>S(null),onSave:ee})]})}re();function gn(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 bn(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var hn={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Ur(e,t){return t==="all"?e:e.filter(r=>hn[r.status]===t)}function Vr({rows:e,filter:t,onFilter:r,strings:a}){let n=gn(e),i=bn(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let d=t===l.key,c=d?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${d?" is-active":""}`,onClick:()=>r(c),"aria-pressed":d,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var vn=3e4;function Gr({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var j;let[i,s]=R(null),[l,d]=R(null),[c,f]=R(!1),[p,u]=R("all"),[h,k]=R(null),C=async(q,I)=>{k(q);try{I==="confirm"?await e.closeAsResolved(q,t):await e.reopenUnresolved(q,t),await B()}catch($){typeof console!="undefined"&&console.warn("[mhosaic] validate:",$),y.current&&d(r["mine.error"])}finally{y.current&&k(null)}},[x,w]=R(""),[P,L]=R(!1),[S,g]=R(!1),y=U(!0),b=async q=>{if(q.preventDefault(),!n||S)return;let I=parseInt(x.replace(/^#/,"").trim(),10);if(!Number.isInteger(I)||I<=0){L(!0);return}g(!0),L(!1);try{let $=await n(I);if(!y.current)return;$?w(""):L(!0)}finally{y.current&&g(!1)}},B=async()=>{var q;f(!0),d(null);try{let I=await e.listMine(t);return y.current&&s(I),!0}catch(I){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",I),y.current&&d((q=Ee(I,r))!=null?q:r["mine.error"]),!1}finally{y.current&&f(!1)}};N(()=>{y.current=!0;let q=be(B,vn);return()=>{y.current=!1,q.stop()}},[t]);let E=i!==null&&i.length===0,A=i===null&&!l,K=i?Ur(i,p):null,D=!!i&&i.length>0&&((j=K==null?void 0:K.length)!=null?j:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("div",{class:"mine-list-header-actions",children:[n&&o("form",{class:"mine-jump",onSubmit:b,children:[o("input",{type:"text",inputMode:"numeric",value:x,placeholder:r["mine.jump.placeholder"],"aria-label":r["mine.jump.aria"],onInput:q=>{w(q.target.value),L(!1)},disabled:S}),o("button",{type:"submit",class:"btn",disabled:S||!x.trim(),children:r["mine.jump.go"]})]}),o("button",{type:"button",class:"btn",onClick:()=>{B()},disabled:c,children:c?r["mine.loading"]:r["mine.refresh"]})]})]}),P&&o("div",{class:"mine-jump-error error",role:"alert",children:r["mine.jump.not_found"]}),i&&i.some(q=>q.status==="awaiting_validation")&&o("div",{class:"validate-banner",role:"status",children:[o("span",{children:r["mine.validate.banner"].replace("{count}",String(i.filter(q=>q.status==="awaiting_validation").length))}),o("button",{type:"button",class:"btn",onClick:()=>u("awaiting_validation"),children:r["mine.validate.view"]})]}),i&&i.length>0&&o(Vr,{rows:i,filter:p,onFilter:u,strings:r}),A&&o("div",{class:"mine-loading",children:r["mine.loading"]}),l&&o("div",{class:"error",children:[l,o(rt,{api:e,strings:r,host:e.endpointHost})]}),E&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),D&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),K&&K.length>0&&o("ul",{class:"mine-rows",children:K.map(q=>o("li",{children:[o(nt,{row:q,strings:r,onClick:()=>a(q)}),q.status==="awaiting_validation"&&o("div",{class:"validate-actions",children:[o("button",{type:"button",class:"btn",disabled:h===q.id,onClick:()=>{C(q.id,"confirm")},children:r["mine.validate.confirm"]}),o("button",{type:"button",class:"btn btn--ghost",disabled:h===q.id,onClick:()=>{C(q.id,"reopen")},children:r["mine.validate.reopen"]})]})]}))})]})}re();function Xr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=U(null),i=U(null);return N(()=>{var d;i.current=document.activeElement;let s=c=>{var p;if(c.key!=="Escape")return;let f=(p=n.current)==null?void 0:p.getRootNode();f instanceof ShadowRoot&&f.querySelector(".annotator-backdrop")||(c.stopPropagation(),e("escape"))};window.addEventListener("keydown",s);let l=(d=n.current)==null?void 0:d.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 ${a?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e("backdrop")},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:()=>e("button"),children:"\xD7"}),t]})})}function Yr({open:e,strings:t,onView:r}){if(e===0)return null;let a=e===1?t["page.strip.text.one"]:t["page.strip.text"].replace("{n}",String(e));return o("div",{class:"page-strip",children:[o("span",{children:a}),o("button",{type:"button",class:"page-strip-view",onClick:r,children:t["page.strip.view"]})]})}re();function Jr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[d,c]=R(null),[f,p]=R(!1);return N(()=>{let u=!1,h=pe(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:h,status:["new","in_progress","awaiting_validation"]}).then(k=>{u||c(k.results.slice(0,5))}).catch(()=>{u||p(!0)}),()=>{u=!0}},[e,t]),o("div",{class:"page-peek",role:"region","aria-label":r["page.peek.title"],children:[o("div",{class:"page-peek-title",children:r["page.peek.title"]}),d===null&&!f&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),d!==null&&d.map(u=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(u.id),children:[o("span",{class:`page-peek-dot status-${u.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:u.description})]},u.id)),o("div",{class:"page-peek-footer",children:[o("button",{type:"button",class:"page-peek-viewall",onClick:i,children:n===1?r["page.peek.viewAll.one"]:r["page.peek.viewAll"].replace("{n}",String(n))}),o("button",{type:"button",class:"page-peek-send",onClick:l,children:r["fab.label"]})]})]})}re();var yn=6e4;function _n(e){var r,a,n;let t=e.by_status;return((r=t.new)!=null?r:0)+((a=t.in_progress)!=null?a:0)+((n=t.awaiting_validation)!=null?n:0)}var Et=new Map,Pt=new Map;function xn(){Et.clear()}function Tt(e,t,r){let a=`${t}|${r}`,n=Et.get(a);if(n&&Date.now()-n.fetchedAt<yn)return Promise.resolve(n.kpis);let i=Pt.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>(Et.set(a,{kpis:l,fetchedAt:Date.now()}),l)).finally(()=>Pt.delete(a));return Pt.set(a,s),s}function wn(e,t,r){return Tt(e,t,r).then(_n)}function Zr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=R(0),[l,d]=R(0),c=me(()=>{xn(),d(f=>f+1)},[]);return N(()=>{if(!n||!t||!r){s(0);return}let f=!1,p=()=>{let h=pe(a!==void 0?{getCurrentPage:a}:{});wn(t,r,h).then(k=>{f||s(k)}).catch(()=>{f||s(0)})};p();let u=tt(p);return()=>{f=!0,u()}},[t,r,n,l]),{open:i,refresh:c}}var eo=`
621
+ \u2026`}function La({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 a=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,n=(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:Ir(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:a}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:n})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var Ba=3e4,za=300,Fa=["recent","oldest","updated","severity","status"],Ia=["new","in_progress","awaiting_validation","closed","rejected"],Da=["bug","feature","question","praise","typo"],Ka=["blocker","high","medium","low"];function $r({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var A,W;let[i,s]=q(()=>Lr(t)),[l,c]=q(!0);j(()=>{Br(t,i)},[t,Kr(i)]);let[d,u]=q(null),[p,f]=q(null),[b,k]=q(!0),[R,x]=q(!1),[_,P]=q(null),[z,w]=q(n!=null?n:null),[m,v]=q(0),[T,F]=q(0),[h,B]=q(null),[D,K]=q(!1),[O,C]=q((A=i.q)!=null?A:""),I=Ya(O,za);j(()=>{s(M=>{var $;if((($=M.q)!=null?$:"")===I)return M;if(I===""){let{q:te,...ae}=M;return ae}return{...M,q:I}})},[I]),j(()=>{var M;C((M=i.q)!=null?M:"")},[i.q]);let H=ne(()=>{var M,$,te,ae,ke,se;return(($=(M=i.status)==null?void 0:M.length)!=null?$:0)+((ae=(te=i.type)==null?void 0:te.length)!=null?ae:0)+((se=(ke=i.severity)==null?void 0:ke.length)!=null?se:0)+(i.q?1:0)+(i.mine?1:0)},[i]);j(()=>{if(l)return tt(()=>F(M=>M+1))},[l]);let J=ne(()=>{var $;let M=!!(($=i.q)!=null&&$.trim());return l&&!M?{...i,pagePath:pe(a!==void 0?{getCurrentPage:a}:{})}:i},[Kr(i),l,T]);j(()=>{let M=!1,$=new AbortController,te=Tr(t,JSON.stringify(J)),ae=Er(te);ae?(u(ae.page),f(ae.kpis),x(!1),k(!1)):(u(se=>se?{...se,results:Ja(se.results,J)}:null),x(!0),k(!0)),B(null),K(!1);let ke=be(async()=>{var se,Se;try{let ve=await e.listBoard(t,J,{signal:$.signal}),He=(se=ve.kpis)!=null?se:await e.fetchBoardKpis(t,J,{signal:$.signal});return M||(Ar(te,ve,He),u(ve),f(He),x(!1),P(null)),!0}catch(ve){return M||P((Se=Te(ve,r))!=null?Se:r["board.list.error"]),!1}finally{M||k(!1)}},Ba);return()=>{M=!0,ke.stop(),$.abort()}},[e,t,JSON.stringify(J)]);let ee=ne(()=>{if(!d)return[];if(!h||h.rows.length===0)return d.results;let M=new Set(d.results.map($=>$.id));return[...d.results,...h.rows.filter($=>!M.has($.id))]},[d,h]),G=h?h.hasMore:!!(d!=null&&d.next),S=async()=>{if(D||!d)return;let M=h?h.nextPage:2;K(!0);try{let $=await e.listBoard(t,{...J,page:M});B(te=>{var ae;return{rows:[...(ae=te==null?void 0:te.rows)!=null?ae:[],...$.results],nextPage:M+1,hasMore:$.next!==null}})}catch($){}finally{K(!1)}},g=ne(()=>{var M;return z&&(M=ee.find($=>$.id===z))!=null?M:null},[z,ee]),E=M=>{w(M.id),v($=>$+1)};return o("div",{class:`board-view ${R?"is-stale":""}`,children:[o($a,{strings:r,kpis:p,thisPage:l}),o(Oa,{filters:i,onChange:s,searchDraft:O,onSearchDraftChange:C,activeCount:H,strings:r,thisPage:l,onToggleThisPage:()=>c(M=>!M)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":b,children:[_&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:_}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{P(null),k(!0),F(M=>M+1)},children:r["board.retry"]}),o(rt,{api:e,strings:r,host:e.endpointHost})]}),!_&&b&&!d&&o(Qa,{}),!_&&d&&ee.length===0&&(!b||R)&&o(ja,{strings:r,thisPage:l,onAllPages:()=>c(!1)}),!_&&d&&ee.length>0&&o(oe,{children:[o(Na,{rows:ee,selectedId:z,onPick:E,strings:r,total:d.count,thisPage:l}),G&&!R&&o("button",{type:"button",class:"btn btn--ghost board-load-more",onClick:()=>{S()},disabled:D,children:r["board.list.loadMore"]})]})]}),o("div",{class:`board-detail-wrap ${z?"has-selection":""}`,children:z?o(nt,{api:e,externalId:t,reportId:z,strings:r,onBack:()=>w(null),canModerate:g?(W=g.can_moderate)!=null?W:g.is_mine:!1,...g?{seed:g}:{},variant:"board",onOpenSeq:M=>{e.getReportBySeq(M,t).then($=>{w($.id),v(te=>te+1)}).catch(()=>{})}},m):o("div",{class:"board-detail-empty",children:[o(Xa,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function $a({strings:e,kpis:t,thisPage:r}){let a=r?e["board.scope.onThisPage"]:(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 ${a}`:a})]})]}),o(Ha,{kpis:t,strings:e})]})}function Ha({kpis:e,strings:t}){var a,n,i,s,l,c;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n: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((c=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?c: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 Oa({filters:e,onChange:t,searchDraft:r,onSearchDraftChange:a,activeCount:n,strings:i,thisPage:s,onToggleThisPage:l}){var k,R,x,_,P,z,w;let c=m=>{if(m===""){let{status:v,...T}=e;t(T)}else t({...e,status:[m]})},d=m=>{if(m===""){let{type:v,...T}=e;t(T)}else t({...e,type:[m]})},u=m=>{if(m===""){let{severity:v,...T}=e;t(T)}else t({...e,severity:[m]})},p=m=>t({...e,ordering:m}),f=()=>{if(e.mine){let{mine:m,...v}=e;t(v)}else t({...e,mine:!0})},b=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":i["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${s?"is-active":""}`,"aria-pressed":s,onClick:()=>!s&&l(),children:i["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${s?"":"is-active"}`,"aria-pressed":!s,onClick:()=>s&&l(),children:i["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":i["board.sort"],value:(k=e.ordering)!=null?k:"recent",onChange:m=>p(m.target.value),children:Fa.map(m=>o("option",{value:m,children:i[`board.sort.${m}`]},m))}),o("select",{class:"board-filter-select","aria-label":i["board.filter.status"],value:(x=(R=e.status)==null?void 0:R[0])!=null?x:"",onChange:m=>c(m.target.value),children:[o("option",{value:"",children:i["board.filter.status"]}),Ia.map(m=>{var v;return o("option",{value:m,children:(v=i[`board.kpi.${m}`])!=null?v:m},m)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.type"],value:(P=(_=e.type)==null?void 0:_[0])!=null?P:"",onChange:m=>d(m.target.value),children:[o("option",{value:"",children:i["board.filter.type"]}),Da.map(m=>{var v;return o("option",{value:m,children:(v=i[`type.${m}`])!=null?v:m},m)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.severity"],value:(w=(z=e.severity)==null?void 0:z[0])!=null?w:"",onChange:m=>u(m.target.value),children:[o("option",{value:"",children:i["board.filter.severity"]}),Ka.map(m=>{var v;return o("option",{value:m,children:(v=i[`severity.${m}`])!=null?v:m},m)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:i["board.filter.search.placeholder"],value:r,onInput:m=>a(m.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:f}),o("span",{children:i["board.filter.mine"]})]}),n>0&&o("button",{type:"button",class:"board-filter-clear",onClick:b,children:[o(Va,{}),i["board.filter.clear"]]})]})}function Na({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(oe,{children:[o("div",{class:"board-list-count",children:a[i?"board.list.count.page":"board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(s=>o(Wa,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function Wa({row:e,selected:t,onPick:r,strings:a}){var i,s;let n=e.is_mine?a["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=a[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=a[`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:n}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Ua,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Za(e.created_at)})]})]})})}function ja({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(Ga,{}),o("h3",{children:e[t?"board.list.empty.page.title":"board.list.empty.title"]}),o("p",{children:e[t?"board.list.empty.page.description":"board.list.empty.description"]}),t&&o("button",{type:"button",class:"btn btn--ghost",onClick:r,children:e["board.scope.allPages"]})]})}function Qa(){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 Ua(){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 Va(){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 Ga(){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 Xa(){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 Ya(e,t){let[r,a]=q(e);return j(()=>{let n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}var Dr={blocker:0,high:1,medium:2,low:3};function Ja(e,t){var n,i,s,l;let r=e;(n=t.status)!=null&&n.length&&(r=r.filter(c=>t.status.includes(c.status))),(i=t.type)!=null&&i.length&&(r=r.filter(c=>t.type.includes(c.feedback_type))),(s=t.severity)!=null&&s.length&&(r=r.filter(c=>t.severity.includes(c.severity))),t.mine&&(r=r.filter(c=>c.is_mine));let a=r.slice();switch((l=t.ordering)!=null?l:"recent"){case"oldest":a.sort((c,d)=>c.created_at.localeCompare(d.created_at));break;case"updated":a.sort((c,d)=>d.updated_at.localeCompare(c.updated_at));break;case"severity":a.sort((c,d)=>{var u,p;return((u=Dr[c.severity])!=null?u:9)-((p=Dr[d.severity])!=null?p:9)});break;case"status":break;default:a.sort((c,d)=>d.created_at.localeCompare(c.created_at))}return a}function Kr(e){var t,r,a,n,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:(a=e.severity)==null?void 0:a.slice().sort(),q:(n=e.q)!=null?n:"",m:!!e.mine,o:(i=e.ordering)!=null?i:""})}function Za(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m`;let n=Math.floor(a/60);if(n<24)return`${n}h`;let i=Math.floor(n/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}re();function en(e){return`pill pill-status pill-status--${e}`}function tn(e){return`pill pill-severity pill-severity--${e}`}function rn(){return"pill pill-type"}function on(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 a=Math.round(r/60);if(a<60)return`${a}m`;let n=Math.round(a/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function an(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function it({row:e,strings:t,onClick:r,extraMeta:a}){var i;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:en(e.status),children:(i=t[`status.${e.status}`])!=null?i:e.status}),o("span",{class:rn(),children:t[`type.${e.feedback_type}`]}),o("span",{class:tn(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:on(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",an(e.comment_count,t)]}),a&&o("span",{children:["\xB7 ",a]})]})]})}var nn=3e4;function sn(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 ln(e){let t=new Map;for(let r of e){let a=sn(r.resolved_at);if(!a)continue;let n=t.get(a);n?n.push(r):t.set(a,[r])}return Array.from(t.entries()).sort(([r],[a])=>r<a?1:-1).map(([r,a])=>({weekKey:r,label:dn(r),rows:a}))}function dn(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Hr({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=q(null),[s,l]=q(null),[c,d]=q(!1),u=U(!0),p=async()=>{d(!0),l(null);try{let R=await e.listChangelog(t);return u.current&&i(R),!0}catch(R){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",R),u.current&&l(r["mine.error"]),!1}finally{u.current&&d(!1)}};j(()=>{u.current=!0;let R=be(p,nn);return()=>{u.current=!1,R.stop()}},[t]);let f=ne(()=>n?ln(n):[],[n]),b=n===null&&!s,k=n!==null&&n.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:c,children:c?r["mine.loading"]:r["mine.refresh"]})]}),b&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),k&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),f.length>0&&o("div",{class:"changelog-groups",children:f.map(R=>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}",R.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[R.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(R.rows.length))})]}),o("ul",{class:"mine-rows",children:R.rows.map(x=>o("li",{children:o(it,{row:x,strings:r,onClick:()=>a(x),extraMeta:x.pr_number?`PR #${x.pr_number}`:void 0})}))})]},R.weekKey))})]})}function cn(){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 Or({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o(cn,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}re();re();var Nr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],pn=.35;function Wr(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")un(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 a=1;a<t.points.length;a++)e.lineTo(t.points[a].x,t.points[a].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let a=e.measureText(t.text),n=4,i=a.width+n*2,s=t.fontSize+n*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-n,t.y-n,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=pn,e.fillRect(st(t.x,t.w),st(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&fn(e,t,r);e.restore()}function st(e,t){return t<0?e+t:e}function un(e,t,r,a,n){let s=Math.atan2(n-r,a-t);e.beginPath(),e.moveTo(t,r),e.lineTo(a,n),e.stroke(),e.beginPath(),e.moveTo(a,n),e.lineTo(a-14*Math.cos(s-Math.PI/6),n-14*Math.sin(s-Math.PI/6)),e.lineTo(a-14*Math.cos(s+Math.PI/6),n-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function fn(e,t,r){if(!r)return;let a=st(t.x,t.w),n=st(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 c=n;c<n+s;c+=l)for(let d=a;d<a+i;d+=l){let u=Math.min(l,a+i-d),p=Math.min(l,n+s-c);e.drawImage(r,d,c,u,p,d,c,u,p)}e.imageSmoothingEnabled=!1;for(let c=n;c<n+s;c+=l)for(let d=a;d<a+i;d+=l){let u=Math.min(l,a+i-d),p=Math.min(l,n+s-c);e.drawImage(r,d,c,1,1,d,c,u,p)}e.imageSmoothingEnabled=!0}var ue={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 jr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=U(null),i=U(null),s=U(null),[l,c]=q("rectangle"),[d,u]=q(Nr[0]),[p,f]=q([]),[b,k]=q([]),[R,x]=q([]),_=U(!1),[P,z]=q(null),[w,m]=q(!1),[v,T]=q(!1),F=U(1);function h(S){f(g=>(k(E=>[...E,g]),[...g,S])),x([])}function B(){f(S=>(k(g=>[...g,S]),[])),x([])}function D(){k(S=>{if(S.length===0)return S;let g=S[S.length-1];return f(E=>(x(A=>[E,...A]),g)),S.slice(0,-1)})}function K(){x(S=>{if(S.length===0)return S;let g=S[0];return f(E=>(k(A=>[...A,E]),g)),S.slice(1)})}Ct(()=>{let S=g=>{g.key==="Escape"&&(g.stopPropagation(),a())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[a]),j(()=>{let S=g=>{if(!(g.metaKey||g.ctrlKey))return;let A=g.key.toLowerCase();A==="z"?(g.preventDefault(),g.stopPropagation(),g.shiftKey?K():D()):A==="y"&&(g.preventDefault(),g.stopPropagation(),K())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[b,R,p]),j(()=>{let S=URL.createObjectURL(e),g=new Image;return g.onload=()=>{s.current=g,m(!0)},g.src=S,()=>URL.revokeObjectURL(S)},[e]),Ct(()=>{if(!w||!n.current||!s.current||!i.current)return;let S=s.current,E=i.current.clientWidth-16,A=window.innerHeight*.65,W=Math.min(E/S.width,A/S.height,1);F.current=W;let M=n.current;M.width=S.width,M.height=S.height,M.style.width=`${S.width*W}px`,M.style.height=`${S.height*W}px`,O()},[w]),j(()=>{O()},[p,P]);function O(){let S=n.current,g=s.current;if(!S||!g)return;let E=S.getContext("2d");if(E){E.clearRect(0,0,S.width,S.height),E.drawImage(g,0,0);for(let A of p)Wr(E,A,g);P&&Wr(E,P,g)}}function C(S){let E=n.current.getBoundingClientRect();return{x:(S.clientX-E.left)/F.current,y:(S.clientY-E.top)/F.current}}let I=S=>{if(!w)return;let{x:g,y:E}=C(S),A=n.current.width,W=Math.max(3,Math.round(A/400)),M=Math.max(8,Math.round(A/80));if(l==="text"){let $=window.prompt(t["annotator.text_prompt"]);$&&$.trim()&&h({kind:"text",x:g,y:E,text:$.trim(),color:d,fontSize:Math.max(16,Math.round(A/50)),lineWidth:1});return}_.current=!0,l==="rectangle"?z({kind:"rectangle",x:g,y:E,w:0,h:0,color:d,lineWidth:W}):l==="arrow"?z({kind:"arrow",x1:g,y1:E,x2:g,y2:E,color:d,lineWidth:W}):l==="freehand"?z({kind:"freehand",points:[{x:g,y:E}],color:d,lineWidth:W}):l==="highlight"?z({kind:"highlight",x:g,y:E,w:0,h:0,color:d==="#ffffff"?"#fde047":d,lineWidth:1}):l==="blur"&&z({kind:"blur",x:g,y:E,w:0,h:0,color:"#000000",lineWidth:0,tile:M})},H=S=>{if(!_.current)return;let{x:g,y:E}=C(S);z(A=>A&&(A.kind==="rectangle"||A.kind==="highlight"||A.kind==="blur"?{...A,w:g-A.x,h:E-A.y}:A.kind==="arrow"?{...A,x2:g,y2:E}:A.kind==="freehand"?{...A,points:[...A.points,{x:g,y:E}]}:A))},J=()=>{z(S=>(_.current&&S&&((S.kind==="rectangle"||S.kind==="highlight"||S.kind==="blur")&&Math.abs(S.w)<4&&Math.abs(S.h)<4||S.kind==="arrow"&&Math.hypot(S.x2-S.x1,S.y2-S.y1)<4||S.kind==="freehand"&&S.points.length<3||h(S)),null)),_.current=!1},ee=async()=>{let S=n.current;if(S){T(!0);try{let g=await new Promise(E=>S.toBlob(E,"image/png",.92));g&&r(g)}finally{T(!1)}}},G=[{id:"rectangle",icon:ue.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ue.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ue.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ue.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ue.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ue.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:S=>{S.target===S.currentTarget&&a()},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:a,children:ue.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:G.map(S=>o("button",{type:"button",onClick:()=>c(S.id),title:S.label,"aria-label":S.label,"aria-pressed":l===S.id,class:`annotator-tool ${l===S.id?"is-active":""}`,children:S.icon},S.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Nr.map(S=>o("button",{type:"button",onClick:()=>u(S),"aria-label":S,"aria-pressed":d===S,class:`annotator-color ${d===S?"is-active":""}`,style:{backgroundColor:S}},S)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:d,onInput:S=>u(S.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:D,disabled:b.length===0,title:t["annotator.undo"],children:[ue.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:K,disabled:R.length===0,title:t["annotator.redo"],children:[ue.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:B,disabled:p.length===0,children:[ue.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:w?o("canvas",{ref:n,onMouseDown:I,onMouseMove:H,onMouseUp:J,onMouseLeave:J,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:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ee,disabled:v||!w,children:v?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var mn=["bug","feature","question","praise","typo"],gn=["blocker","high","medium","low"];function Qr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,c]=q(""),[d,u]=q("bug"),[p,f]=q("medium"),[b,k]=q(""),[R,x]=q([]),[_,P]=q(!1),[z,w]=q(null),m=U(null),v=U(null),T=a==="submitting",F=T?e["form.submitting"]:e["form.submit"],h=typeof window!="undefined"?window.location.href:"",B=l.trim()!==""||R.length>0;j(()=>{s==null||s(B)},[B]);let D=U(R);D.current=R,j(()=>()=>{D.current.forEach(g=>URL.revokeObjectURL(g.preview))},[]);let K=g=>{k("");let E=5-R.length,A=g.slice(0,Math.max(0,E));for(let W of A)if(W instanceof File){let M=ot(W);if(M){k(M.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(M.maxMb)));return}}if(A.length){let W=A.map(M=>({blob:M,preview:URL.createObjectURL(M)}));x(M=>[...M,...W])}g.length>A.length&&k(e["form.screenshot.error_count"].replace("{max}",String(5)))},O=g=>{let E=R[g];E&&URL.revokeObjectURL(E.preview),x(A=>A.filter((W,M)=>M!==g)),k(""),m.current&&(m.current.value="")},C=g=>{var W;let E=g.target,A=Array.from((W=E.files)!=null?W:[]);A.length&&K(A),E.value=""},I=g=>{g.preventDefault(),g.stopPropagation(),P(!0)},H=g=>{g.preventDefault(),g.stopPropagation(),g.currentTarget===g.target&&P(!1)},J=g=>{var A,W;g.preventDefault(),g.stopPropagation(),P(!1);let E=Array.from((W=(A=g.dataTransfer)==null?void 0:A.files)!=null?W:[]);E.length&&K(E)},ee=g=>{var W;let E=(W=g.clipboardData)==null?void 0:W.items;if(!E)return;let A=[];for(let M of Array.from(E))if(M.kind==="file"&&M.type.startsWith("image/")){let $=M.getAsFile();$&&A.push($)}A.length&&(g.preventDefault(),K(A))},G=g=>{let E=z;if(E===null||!R[E]){w(null);return}URL.revokeObjectURL(R[E].preview);let A={blob:g,preview:URL.createObjectURL(g)};x(W=>W.map((M,$)=>$===E?A:M)),w(null)};return o("form",{onSubmit:g=>{if(g.preventDefault(),!l.trim()){k(e["form.description.required"]);return}k("");let E={description:l.trim(),feedback_type:d,severity:p};R.length&&(E.screenshots=R.map(A=>A.blob),E.capture_method="manual"),t(E)},onPaste:ee,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:l,placeholder:e["form.description.placeholder"],onInput:g=>c(g.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:d,onChange:g=>u(g.target.value),children:mn.map(g=>o("option",{value:g,children:e[`type.${g}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:p,onChange:g=>f(g.target.value),children:gn.map(g=>o("option",{value:g,children:e[`severity.${g}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:m,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"mfb-sr-only",onChange:C,"aria-hidden":"true",tabIndex:-1}),R.length>0&&o("div",{class:"screenshot-strip",children:R.map((g,E)=>o("div",{class:"screenshot-preview",children:[o("img",{src:g.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>w(E),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:()=>O(E),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"]]})]})]},g.preview))}),R.length<5&&o("div",{ref:v,class:`screenshot-dropzone ${_?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var g;return(g=m.current)==null?void 0:g.click()},onKeyDown:g=>{var E;(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),(E=m.current)==null||E.click())},onDragOver:I,onDragLeave:H,onDrop:J,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"]})]})]}),h&&o("div",{class:"page-context",title:h,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:Ee(h,90)})]}),o("div",{class:"capture-notice",children:e["form.capture.notice"]}),b&&o("div",{class:"error",children:b}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:i!==void 0?e["form.success.seq"].replace("{seq}",String(i)):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})]}),z!==null&&R[z]&&o(jr,{imageBlob:R[z].blob,strings:e,onCancel:()=>w(null),onSave:G})]})}re();function bn(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 hn(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var vn={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Ur(e,t){return t==="all"?e:e.filter(r=>vn[r.status]===t)}function Vr({rows:e,filter:t,onFilter:r,strings:a}){let n=bn(e),i=hn(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let c=t===l.key,d=c?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${c?" is-active":""}`,onClick:()=>r(d),"aria-pressed":c,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var yn=3e4;function Gr({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var O;let[i,s]=q(null),[l,c]=q(null),[d,u]=q(!1),[p,f]=q("all"),[b,k]=q(null),R=async(C,I)=>{k(C);try{I==="confirm"?await e.closeAsResolved(C,t):await e.reopenUnresolved(C,t),await F()}catch(H){typeof console!="undefined"&&console.warn("[mhosaic] validate:",H),v.current&&c(r["mine.error"])}finally{v.current&&k(null)}},[x,_]=q(""),[P,z]=q(!1),[w,m]=q(!1),v=U(!0),T=async C=>{if(C.preventDefault(),!n||w)return;let I=parseInt(x.replace(/^#/,"").trim(),10);if(!Number.isInteger(I)||I<=0){z(!0);return}m(!0),z(!1);try{let H=await n(I);if(!v.current)return;H?_(""):z(!0)}finally{v.current&&m(!1)}},F=async()=>{var C;u(!0),c(null);try{let I=await e.listMine(t);return v.current&&s(I),!0}catch(I){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",I),v.current&&c((C=Te(I,r))!=null?C:r["mine.error"]),!1}finally{v.current&&u(!1)}};j(()=>{v.current=!0;let C=be(F,yn);return()=>{v.current=!1,C.stop()}},[t]);let h=i!==null&&i.length===0,B=i===null&&!l,D=i?Ur(i,p):null,K=!!i&&i.length>0&&((O=D==null?void 0:D.length)!=null?O:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("div",{class:"mine-list-header-actions",children:[n&&o("form",{class:"mine-jump",onSubmit:T,children:[o("input",{type:"text",inputMode:"numeric",value:x,placeholder:r["mine.jump.placeholder"],"aria-label":r["mine.jump.aria"],onInput:C=>{_(C.target.value),z(!1)},disabled:w}),o("button",{type:"submit",class:"btn",disabled:w||!x.trim(),children:r["mine.jump.go"]})]}),o("button",{type:"button",class:"btn",onClick:()=>{F()},disabled:d,children:d?r["mine.loading"]:r["mine.refresh"]})]})]}),P&&o("div",{class:"mine-jump-error error",role:"alert",children:r["mine.jump.not_found"]}),i&&i.some(C=>C.status==="awaiting_validation")&&o("div",{class:"validate-banner",role:"status",children:[o("span",{children:r["mine.validate.banner"].replace("{count}",String(i.filter(C=>C.status==="awaiting_validation").length))}),o("button",{type:"button",class:"btn",onClick:()=>f("awaiting_validation"),children:r["mine.validate.view"]})]}),i&&i.length>0&&o(Vr,{rows:i,filter:p,onFilter:f,strings:r}),B&&o("div",{class:"mine-loading",children:r["mine.loading"]}),l&&o("div",{class:"error",children:[l,o(rt,{api:e,strings:r,host:e.endpointHost})]}),h&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),K&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),D&&D.length>0&&o("ul",{class:"mine-rows",children:D.map(C=>o("li",{children:[o(it,{row:C,strings:r,onClick:()=>a(C)}),C.status==="awaiting_validation"&&o("div",{class:"validate-actions",children:[o("button",{type:"button",class:"btn",disabled:b===C.id,onClick:()=>{R(C.id,"confirm")},children:r["mine.validate.confirm"]}),o("button",{type:"button",class:"btn btn--ghost",disabled:b===C.id,onClick:()=>{R(C.id,"reopen")},children:r["mine.validate.reopen"]})]})]}))})]})}re();function Xr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=U(null),i=U(null);return j(()=>{var c;i.current=document.activeElement;let s=d=>{var p;if(d.key!=="Escape")return;let u=(p=n.current)==null?void 0:p.getRootNode();u instanceof ShadowRoot&&u.querySelector(".annotator-backdrop")||(d.stopPropagation(),e("escape"))};window.addEventListener("keydown",s);let l=(c=n.current)==null?void 0:c.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let d=i.current;d&&typeof d.focus=="function"&&d.focus()}},[e]),o("div",{class:`backdrop ${a?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e("backdrop")},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:()=>e("button"),children:"\xD7"}),t]})})}function Yr({open:e,strings:t,onView:r}){if(e===0)return null;let a=e===1?t["page.strip.text.one"]:t["page.strip.text"].replace("{n}",String(e));return o("div",{class:"page-strip",children:[o("span",{children:a}),o("button",{type:"button",class:"page-strip-view",onClick:r,children:t["page.strip.view"]})]})}re();function Jr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[c,d]=q(null),[u,p]=q(!1);return j(()=>{let f=!1,b=pe(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:b,status:["new","in_progress","awaiting_validation"]}).then(k=>{f||d(k.results.slice(0,5))}).catch(()=>{f||p(!0)}),()=>{f=!0}},[e,t]),o("div",{class:"page-peek",role:"region","aria-label":r["page.peek.title"],children:[o("div",{class:"page-peek-title",children:r["page.peek.title"]}),c===null&&!u&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),c!==null&&c.map(f=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(f.id),children:[o("span",{class:`page-peek-dot status-${f.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:f.description})]},f.id)),o("div",{class:"page-peek-footer",children:[o("button",{type:"button",class:"page-peek-viewall",onClick:i,children:n===1?r["page.peek.viewAll.one"]:r["page.peek.viewAll"].replace("{n}",String(n))}),o("button",{type:"button",class:"page-peek-send",onClick:l,children:r["fab.label"]})]})]})}re();var xn=6e4;function _n(e){var r,a,n;let t=e.by_status;return((r=t.new)!=null?r:0)+((a=t.in_progress)!=null?a:0)+((n=t.awaiting_validation)!=null?n:0)}var Tt=new Map,Pt=new Map;function wn(){Tt.clear()}function Et(e,t,r){let a=`${t}|${r}`,n=Tt.get(a);if(n&&Date.now()-n.fetchedAt<xn)return Promise.resolve(n.kpis);let i=Pt.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>(Tt.set(a,{kpis:l,fetchedAt:Date.now()}),l)).finally(()=>Pt.delete(a));return Pt.set(a,s),s}function kn(e,t,r){return Et(e,t,r).then(_n)}function Zr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=q(0),[l,c]=q(0),d=me(()=>{wn(),c(u=>u+1)},[]);return j(()=>{if(!n||!t||!r){s(0);return}let u=!1,p=()=>{let b=pe(a!==void 0?{getCurrentPage:a}:{});kn(t,r,b).then(k=>{u||s(k)}).catch(()=>{u||s(0)})};p();let f=tt(p);return()=>{u=!0,f()}},[t,r,n,l]),{open:i,refresh:d}}var eo=`
622
622
  :host {
623
623
  --mfb-accent: #3b82f6;
624
624
  --mfb-accent-contrast: #ffffff;
@@ -1525,6 +1525,10 @@
1525
1525
  .pill-status--awaiting_validation { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
1526
1526
  .pill-status--closed { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
1527
1527
  .pill-status--rejected, .pill-status--wontfix, .pill-status--duplicate { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }
1528
+ /* Agent-verified fix badge (Phase B) \u2014 emerald, same family as
1529
+ .pill-status--closed but its own modifier since it layers alongside
1530
+ the status pill rather than replacing it. */
1531
+ .pill-verified { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
1528
1532
  .pill-type { background: var(--mfb-surface); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
1529
1533
  .pill-severity { background: var(--mfb-surface); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
1530
1534
  .pill-severity--blocker { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
@@ -1539,6 +1543,7 @@
1539
1543
  justify-content: space-between;
1540
1544
  gap: 8px;
1541
1545
  }
1546
+ .report-detail-header-pills { display: inline-flex; align-items: center; gap: 6px; }
1542
1547
  .report-detail-body { display: flex; flex-direction: column; gap: 10px; }
1543
1548
  .report-detail-description {
1544
1549
  font-size: 14px;
@@ -1892,12 +1897,14 @@ button.report-detail-edit {
1892
1897
  /* Transparency drawer \u2014 closed by default. The user can click open to
1893
1898
  verify what their browser sent: device, errors, console tail, network
1894
1899
  tail. Read-only; purely a trust-building gesture. */
1895
- .report-detail-tech {
1900
+ .report-detail-tech,
1901
+ .report-detail-verification {
1896
1902
  border: 1px solid var(--mfb-border);
1897
1903
  border-radius: var(--mfb-radius);
1898
1904
  background: var(--mfb-surface);
1899
1905
  }
1900
- .report-detail-tech > summary {
1906
+ .report-detail-tech > summary,
1907
+ .report-detail-verification > summary {
1901
1908
  cursor: pointer;
1902
1909
  padding: 8px 10px;
1903
1910
  font-size: 11px;
@@ -1907,15 +1914,19 @@ button.report-detail-edit {
1907
1914
  user-select: none;
1908
1915
  list-style: none;
1909
1916
  }
1910
- .report-detail-tech > summary::-webkit-details-marker { display: none; }
1911
- .report-detail-tech > summary::before {
1917
+ .report-detail-tech > summary::-webkit-details-marker,
1918
+ .report-detail-verification > summary::-webkit-details-marker { display: none; }
1919
+ .report-detail-tech > summary::before,
1920
+ .report-detail-verification > summary::before {
1912
1921
  content: '\u25B8';
1913
1922
  display: inline-block;
1914
1923
  margin-right: 6px;
1915
1924
  transition: transform 120ms;
1916
1925
  }
1917
- .report-detail-tech[open] > summary::before { transform: rotate(90deg); }
1918
- .tech-body {
1926
+ .report-detail-tech[open] > summary::before,
1927
+ .report-detail-verification[open] > summary::before { transform: rotate(90deg); }
1928
+ .tech-body,
1929
+ .verification-body {
1919
1930
  padding: 0 10px 10px 10px;
1920
1931
  display: flex;
1921
1932
  flex-direction: column;
@@ -1995,6 +2006,31 @@ button.report-detail-edit {
1995
2006
  .tech-network-url { word-break: break-all; }
1996
2007
  .tech-network-time { text-align: right; color: var(--mfb-text-muted); font-variant-numeric: tabular-nums; }
1997
2008
 
2009
+ /* Proof-of-fix drawer (Phase B) \u2014 shares the collapsible shell rules
2010
+ with .report-detail-tech above (grouped selectors): closed by
2011
+ default, rotating \u25B8 marker. Surfaces an agent's verification pass
2012
+ so the submitter can see the evidence behind the "V\xE9rifi\xE9 par
2013
+ l'agent" badge. */
2014
+ .verification-evidence {
2015
+ margin: 0;
2016
+ font-size: 12px;
2017
+ white-space: pre-wrap;
2018
+ }
2019
+ .verification-meta {
2020
+ display: flex;
2021
+ gap: 12px;
2022
+ flex-wrap: wrap;
2023
+ font-size: 11px;
2024
+ color: var(--mfb-text-muted);
2025
+ }
2026
+ .verification-shots {
2027
+ display: flex;
2028
+ gap: 8px;
2029
+ flex-wrap: wrap;
2030
+ }
2031
+ .verification-shots .report-detail-screenshot { width: 96px; flex: 0 0 auto; }
2032
+ .verification-shots .report-detail-screenshot img { max-height: 96px; }
2033
+
1998
2034
  /* KPI strip \u2014 four pills above the My Reports list. Each is clickable
1999
2035
  to filter the rows below. Borrowed from thePnr's FeedbackKPICards. */
2000
2036
  .kpi-strip {
@@ -2696,5 +2732,5 @@ button.report-detail-edit {
2696
2732
  background: var(--mfb-surface-2);
2697
2733
  margin: var(--mfb-space-2) 0;
2698
2734
  }
2699
- `;function kn(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function to(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=eo,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null,s=!1;function l(u){n=u,qe(_(f,{state:u}),a)}function d(u){let{selectedReportId:h,boardSelectId:k,...C}=u;return C}function c(u){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&u&&Tt(e.api,u,pe(e)).then(h=>{h.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function f({state:u}){var j;let h=me(async q=>{l({...n,status:"submitting"});try{let I=await e.onSubmit(q);P.refresh(),l({...n,status:"success",...I&&I.seq!==void 0&&{submittedSeq:I.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(I){typeof console!="undefined"&&console.warn("[mhosaic] submit:",I),l({...n,status:"error",error:e.strings["form.error"]})}},[]),k=(j=e.getExternalId)==null?void 0:j.call(e),C=q=>!e.api||!k?Promise.resolve(!1):e.api.getReportBySeq(q,k).then(I=>(l({...n,open:!0,tab:"mine",selectedReportId:I.id}),!0)).catch(()=>!1),x=e.deepLinkParam===!1?void 0:q=>{let I=e.deepLinkParam||"mhfeedback";try{let $=new URL(window.location.href);return $.searchParams.set(I,q),$.toString()}catch($){return""}},w=e.showPageActivity!==!1,P=Zr({...e.api!==void 0&&{api:e.api},...k!==void 0&&{externalId:k},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:w}),L=P.open===1?e.strings["page.badge.aria.one"]:P.open>0?e.strings["page.badge.aria"].replace("{n}",String(P.open)):e.strings["fab.label"],[S,g]=R(!e.requiresVisibilityCheck);N(()=>{if(!e.requiresVisibilityCheck){g(!0);return}if(!k||!e.checkVisibility){g(!1);return}let q=!1;return e.checkVisibility(k).then(I=>{q||g(I)}).catch(()=>{q||g(!1)}),()=>{q=!0}},[k]);let y=kn(e,k,S),b=!!(e.api&&k),[B,E]=R(!1),A=U({});return o(oe,{children:[y&&o("div",{class:"fab-area",onMouseEnter:()=>{A.current.close&&clearTimeout(A.current.close),A.current.open=setTimeout(()=>E(!0),250)},onMouseLeave:()=>{A.current.open&&clearTimeout(A.current.open),A.current.close=setTimeout(()=>E(!1),140)},onFocusIn:q=>{var I,$;A.current.close&&clearTimeout(A.current.close),($=(I=q.target).matches)!=null&&$.call(I,":focus-visible")&&E(!0)},onFocusOut:()=>E(!1),onKeyDown:q=>q.key==="Escape"&&E(!1),children:[B&&!u.open&&w&&P.open>0&&e.api&&k&&o(Jr,{api:e.api,externalId:k,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:P.open,onViewAll:()=>{E(!1),l({...n,open:!0,tab:"board"})},onPickRow:q=>{E(!1),l({...n,open:!0,tab:"board",boardSelectId:q})},onSend:()=>{E(!1),c(k)}}),o(Or,{label:L,onClick:()=>c(k),...P.open>0&&{count:P.open}})]}),u.open&&o(Xr,{onDismiss:q=>{if(q!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(d({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:u.tab==="board",children:[u.confirmingDiscard&&o("div",{class:"discard-confirm",role:"alertdialog","aria-modal":"true",children:o("div",{class:"discard-confirm-card",children:[o("p",{class:"discard-confirm-title",children:e.strings["form.discard.title"]}),o("p",{class:"discard-confirm-body",children:e.strings["form.discard.body"]}),o("div",{class:"discard-confirm-actions",children:[o("button",{type:"button",class:"btn",onClick:()=>l({...n,confirmingDiscard:!1}),children:e.strings["form.discard.keep"]}),o("button",{type:"button",class:"btn btn--primary",onClick:()=>{s=!1,l(d({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),b&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":u.tab==="send",class:`tab-button ${u.tab==="send"?"is-active":""}`,onClick:()=>l(d({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="mine",class:`tab-button ${u.tab==="mine"?"is-active":""}`,onClick:()=>l(d({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="changelog",class:`tab-button ${u.tab==="changelog"?"is-active":""}`,onClick:()=>l(d({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="board",class:`tab-button tab-button--board ${u.tab==="board"?"is-active":""}`,onClick:()=>l(d({...n,tab:"board"})),children:e.strings["tab.board"]})]}),u.tab==="send"&&o(oe,{children:[b&&w&&o(Yr,{open:P.open,strings:e.strings,onView:()=>l(d({...n,tab:"board"}))}),o(Qr,{strings:e.strings,onSubmit:h,onCancel:()=>l({...n,open:!1,status:"idle"}),status:u.status,...u.error!==void 0&&{errorMessage:u.error},...u.submittedSeq!==void 0&&{submittedSeq:u.submittedSeq},onDirtyChange:q=>{s=q}})]}),u.tab==="mine"&&e.api&&k&&!u.selectedReportId&&o(Gr,{api:e.api,externalId:k,strings:e.strings,onSelect:q=>l({...n,selectedReportId:q.id}),onOpenSeq:C}),(u.tab==="mine"||u.tab==="changelog")&&e.api&&k&&u.selectedReportId&&o(at,{api:e.api,externalId:k,reportId:u.selectedReportId,strings:e.strings,onBack:()=>l(d({...n})),onOpenSeq:C,...x&&{buildPermalink:x}}),u.tab==="changelog"&&e.api&&k&&!u.selectedReportId&&o(Hr,{api:e.api,externalId:k,strings:e.strings,onSelect:q=>l({...n,selectedReportId:q.id})}),u.tab==="board"&&e.api&&k&&o($r,{api:e.api,externalId:k,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...u.boardSelectId!==void 0&&{initialSelectedId:u.boardSelectId}})]})]})}l(n);function p(u){var w;let h=e.api,k=(w=e.getExternalId)==null?void 0:w.call(e);if(!h||!k||!u)return;let C=/^\d+$/.test(u)?parseInt(u,10):null;(C!==null?h.getReportBySeq(C,k):h.getReport(u,k)).then(P=>l({...n,open:!0,tab:"mine",selectedReportId:P.id})).catch(()=>{})}if(e.deepLinkParam!==!1)try{let u=e.deepLinkParam||"mhfeedback",h=new URLSearchParams(window.location.search).get(u);h&&p(h.trim())}catch(u){}return{open(){var u;c((u=e.getExternalId)==null?void 0:u.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),qe(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function Kn(){return{right:24+24/2,bottom:84}}function Ft(e){var C,x,w,P,L,S,g,y;let t=(C=e.env)!=null?C:"prod",r=(x=e.locale)!=null?x:typeof navigator!="undefined"?navigator.language:void 0,a=or((w=e.translations)!=null?w:{},r!==void 0?{locale:r}:{}),n=rr({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(P=e.metadata)!=null?P:{},l=Gt({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}}),d=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let b=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;b==null||b.appendChild(c)}else document.body.appendChild(c);async function f(b){var I,$,Y,ee,J,m;let B=(I=b.screenshots)!=null&&I.length?b.screenshots:b.screenshot?[b.screenshot]:void 0,E=b.synthetic?void 0:B,A=n.snapshot();if(i){let{userHash:v,exp:M,...z}=i;A.user=z}s&&Object.keys(s).length>0&&(A.metadata={...s});let K=E!=null&&E.length?($=b.capture_method)!=null?$:"manual":"none",D={description:b.description,feedback_type:(Y=b.feedback_type)!=null?Y:"bug",severity:(ee=b.severity)!=null?ee:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:K,technical_context:A};D.widget_version="0.34.0",E!=null&&E.length&&(D.screenshots=E,D.screenshot=E[0]),b.synthetic&&(D.synthetic=!0);let j=pe(e);j&&(D.page_path=j),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(D.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let q=D;for(let v of d)q=await v(q);try{let v=await l.submitReport(q);return(J=e.onSubmitSuccess)==null||J.call(e,v),n.clear(),v}catch(v){let M=v instanceof Error?v:new Error(String(v));throw(m=e.onError)==null||m.call(e,M),M}}let p=to({host:c,strings:a,showFAB:(L=e.showFAB)!=null?L:!0,onSubmit:b=>f(b),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(S=e.requiresVisibilityCheck)!=null?S:!1,checkVisibility:b=>l.checkVisibility(b,i==null?void 0:i.email),...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...e.openToCurrentPageFeedback!==void 0&&{openToCurrentPageFeedback:e.openToCurrentPageFeedback},...e.showPageActivity!==void 0&&{showPageActivity:e.showPageActivity}}),u,h=!1;if((g=e.qaMeter)!=null&&g.source){let b=e.qaMeter,B=(y=b.locale)!=null?y:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(Eo(),Po)).then(({createQaMeter:E})=>{var A,K;h||(u=E({source:b.source,size:(A=b.size)!=null?A:"sm",position:(K=b.position)!=null?K:Kn(),locale:B,...b.getCurrentPage&&{getCurrentPage:b.getCurrentPage}}))})}let k={show(){p.open()},hide(){p.close()},open(b){p.open()},async submit(b){return f({description:b.description,...b.feedback_type!==void 0&&{feedback_type:b.feedback_type},...b.severity!==void 0&&{severity:b.severity},...b.synthetic!==void 0&&{synthetic:b.synthetic},...b.screenshot!==void 0&&{screenshot:b.screenshot},...b.screenshots!==void 0&&{screenshots:b.screenshots}})},identify(b){i=b,p.notifyIdentityChanged()},setMetadata(b){s={...s,...b}},shutdown(){h=!0,u==null||u.dispose(),p.dispose(),n.dispose(),c.remove();let b=window;b.mhosaicFeedback===k&&delete b.mhosaicFeedback},_registerTransformer(b){d.push(b)}};return window.mhosaicFeedback=k,k}var Lo=window;function Bo(e){if(!e.key||!e.endpoint)return null;let t=e.env;return{apiKey:e.key,endpoint:e.endpoint,...t!==void 0&&{env:t},...e.qaSource?{qaMeter:{source:e.qaSource,...e.qaLocale?{locale:e.qaLocale}:{}}}:{}}}function $n(){let e=document.currentScript;return e?Bo(e.dataset):null}var we=null,Mo,Ao,ft=(Ao=(Mo=Lo.Feedback)==null?void 0:Mo.q)!=null?Ao:[];function zo(e){let[t,r]=e;if(t==="init"){if(we)return;we=Ft(r);return}if(!we){ft.push(e);return}t==="identify"?we.identify(r):t==="setMetadata"?we.setMetadata(r):t==="open"&&we.open(r)}var To=$n();To&&(we=Ft(To));for(;ft.length>0;)zo(ft.shift());var Hn=Object.assign(function(t,r){zo([t,r])},{q:ft});Lo.Feedback=Hn;return Uo(On);})();
2735
+ `;function Sn(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function to(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=eo,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null,s=!1;function l(f){n=f,qe(y(u,{state:f}),a)}function c(f){let{selectedReportId:b,boardSelectId:k,...R}=f;return R}function d(f){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&f&&Et(e.api,f,pe(e)).then(b=>{b.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function u({state:f}){var O;let b=me(async C=>{l({...n,status:"submitting"});try{let I=await e.onSubmit(C);P.refresh(),l({...n,status:"success",...I&&I.seq!==void 0&&{submittedSeq:I.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(I){typeof console!="undefined"&&console.warn("[mhosaic] submit:",I),l({...n,status:"error",error:e.strings["form.error"]})}},[]),k=(O=e.getExternalId)==null?void 0:O.call(e),R=C=>!e.api||!k?Promise.resolve(!1):e.api.getReportBySeq(C,k).then(I=>(l({...n,open:!0,tab:"mine",selectedReportId:I.id}),!0)).catch(()=>!1),x=e.deepLinkParam===!1?void 0:C=>{let I=e.deepLinkParam||"mhfeedback";try{let H=new URL(window.location.href);return H.searchParams.set(I,C),H.toString()}catch(H){return""}},_=e.showPageActivity!==!1,P=Zr({...e.api!==void 0&&{api:e.api},...k!==void 0&&{externalId:k},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:_}),z=P.open===1?e.strings["page.badge.aria.one"]:P.open>0?e.strings["page.badge.aria"].replace("{n}",String(P.open)):e.strings["fab.label"],[w,m]=q(!e.requiresVisibilityCheck);j(()=>{if(!e.requiresVisibilityCheck){m(!0);return}if(!k||!e.checkVisibility){m(!1);return}let C=!1;return e.checkVisibility(k).then(I=>{C||m(I)}).catch(()=>{C||m(!1)}),()=>{C=!0}},[k]);let v=Sn(e,k,w),T=!!(e.api&&k),[F,h]=q(!1),B=U({});return o(oe,{children:[v&&o("div",{class:"fab-area",onMouseEnter:()=>{B.current.close&&clearTimeout(B.current.close),B.current.open=setTimeout(()=>h(!0),250)},onMouseLeave:()=>{B.current.open&&clearTimeout(B.current.open),B.current.close=setTimeout(()=>h(!1),140)},onFocusIn:C=>{var I,H;B.current.close&&clearTimeout(B.current.close),(H=(I=C.target).matches)!=null&&H.call(I,":focus-visible")&&h(!0)},onFocusOut:()=>h(!1),onKeyDown:C=>C.key==="Escape"&&h(!1),children:[F&&!f.open&&_&&P.open>0&&e.api&&k&&o(Jr,{api:e.api,externalId:k,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:P.open,onViewAll:()=>{h(!1),l({...n,open:!0,tab:"board"})},onPickRow:C=>{h(!1),l({...n,open:!0,tab:"board",boardSelectId:C})},onSend:()=>{h(!1),d(k)}}),o(Or,{label:z,onClick:()=>d(k),...P.open>0&&{count:P.open}})]}),f.open&&o(Xr,{onDismiss:C=>{if(C!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(c({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:f.tab==="board",children:[f.confirmingDiscard&&o("div",{class:"discard-confirm",role:"alertdialog","aria-modal":"true",children:o("div",{class:"discard-confirm-card",children:[o("p",{class:"discard-confirm-title",children:e.strings["form.discard.title"]}),o("p",{class:"discard-confirm-body",children:e.strings["form.discard.body"]}),o("div",{class:"discard-confirm-actions",children:[o("button",{type:"button",class:"btn",onClick:()=>l({...n,confirmingDiscard:!1}),children:e.strings["form.discard.keep"]}),o("button",{type:"button",class:"btn btn--primary",onClick:()=>{s=!1,l(c({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),T&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":f.tab==="send",class:`tab-button ${f.tab==="send"?"is-active":""}`,onClick:()=>l(c({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":f.tab==="mine",class:`tab-button ${f.tab==="mine"?"is-active":""}`,onClick:()=>l(c({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":f.tab==="changelog",class:`tab-button ${f.tab==="changelog"?"is-active":""}`,onClick:()=>l(c({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":f.tab==="board",class:`tab-button tab-button--board ${f.tab==="board"?"is-active":""}`,onClick:()=>l(c({...n,tab:"board"})),children:e.strings["tab.board"]})]}),f.tab==="send"&&o(oe,{children:[T&&_&&o(Yr,{open:P.open,strings:e.strings,onView:()=>l(c({...n,tab:"board"}))}),o(Qr,{strings:e.strings,onSubmit:b,onCancel:()=>l({...n,open:!1,status:"idle"}),status:f.status,...f.error!==void 0&&{errorMessage:f.error},...f.submittedSeq!==void 0&&{submittedSeq:f.submittedSeq},onDirtyChange:C=>{s=C}})]}),f.tab==="mine"&&e.api&&k&&!f.selectedReportId&&o(Gr,{api:e.api,externalId:k,strings:e.strings,onSelect:C=>l({...n,selectedReportId:C.id}),onOpenSeq:R}),(f.tab==="mine"||f.tab==="changelog")&&e.api&&k&&f.selectedReportId&&o(nt,{api:e.api,externalId:k,reportId:f.selectedReportId,strings:e.strings,onBack:()=>l(c({...n})),onOpenSeq:R,...x&&{buildPermalink:x}}),f.tab==="changelog"&&e.api&&k&&!f.selectedReportId&&o(Hr,{api:e.api,externalId:k,strings:e.strings,onSelect:C=>l({...n,selectedReportId:C.id})}),f.tab==="board"&&e.api&&k&&o($r,{api:e.api,externalId:k,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...f.boardSelectId!==void 0&&{initialSelectedId:f.boardSelectId}})]})]})}l(n);function p(f){var _;let b=e.api,k=(_=e.getExternalId)==null?void 0:_.call(e);if(!b||!k||!f)return;let R=/^\d+$/.test(f)?parseInt(f,10):null;(R!==null?b.getReportBySeq(R,k):b.getReport(f,k)).then(P=>l({...n,open:!0,tab:"mine",selectedReportId:P.id})).catch(()=>{})}if(e.deepLinkParam!==!1)try{let f=e.deepLinkParam||"mhfeedback",b=new URLSearchParams(window.location.search).get(f);b&&p(b.trim())}catch(f){}return{open(){var f;d((f=e.getExternalId)==null?void 0:f.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),qe(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function $n(){return{right:24+24/2,bottom:84}}function Ft(e){var x,_,P,z,w,m,v,T,F;let t=(x=e.env)!=null?x:"prod",r=(_=e.locale)!=null?_:typeof navigator!="undefined"?navigator.language:void 0,a=or((P=e.translations)!=null?P:{},r!==void 0?{locale:r}:{}),n=rr({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(z=e.metadata)!=null?z:{},l=Gt({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}}),c=[],d=document.createElement("div");if(d.className="mhosaic-feedback",e.attachTo){let h=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;h==null||h.appendChild(d)}else document.body.appendChild(d);async function u(h){var J,ee,G,S,g,E;let B=(J=h.screenshots)!=null&&J.length?h.screenshots:h.screenshot?[h.screenshot]:void 0,D=h.synthetic?void 0:B,K=n.snapshot();if(i){let{userHash:A,exp:W,...M}=i;K.user=M}s&&Object.keys(s).length>0&&(K.metadata={...s});let O=D!=null&&D.length?(ee=h.capture_method)!=null?ee:"manual":"none",C={description:h.description,feedback_type:(G=h.feedback_type)!=null?G:"bug",severity:(S=h.severity)!=null?S:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:O,technical_context:K};C.widget_version="0.36.0",D!=null&&D.length&&(C.screenshots=D,C.screenshot=D[0]),h.synthetic&&(C.synthetic=!0);let I=pe(e);I&&(C.page_path=I),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(C.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let H=C;for(let A of c)H=await A(H);try{let A=await l.submitReport(H);return(g=e.onSubmitSuccess)==null||g.call(e,A),n.clear(),A}catch(A){let W=A instanceof Error?A:new Error(String(A));throw(E=e.onError)==null||E.call(e,W),W}}let p={host:d,strings:a,showFAB:(w=e.showFAB)!=null?w:!0,onSubmit:h=>u(h),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(m=e.requiresVisibilityCheck)!=null?m:!1,checkVisibility:h=>l.checkVisibility(h,i==null?void 0:i.email),...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...e.openToCurrentPageFeedback!==void 0&&{openToCurrentPageFeedback:e.openToCurrentPageFeedback},...e.showPageActivity!==void 0&&{showPageActivity:e.showPageActivity}},f=to(p);if(e.openToCurrentPageFeedback===void 0&&e.showFAB!==!1){let h=(v=e.fetchImpl)!=null?v:globalThis.fetch;(async()=>{var B,D;try{let K=await h(`${e.endpoint}/api/feedback/v1/widget-manifest/?pk=${encodeURIComponent(e.apiKey)}`);if(!K.ok)return;let O=await K.json(),C=(D=(B=O==null?void 0:O.config)==null?void 0:B.behavior)==null?void 0:D.openToCurrentPageFeedback;typeof C=="boolean"&&p.openToCurrentPageFeedback===void 0&&(p.openToCurrentPageFeedback=C)}catch(K){}})()}let b,k=!1;if((T=e.qaMeter)!=null&&T.source){let h=e.qaMeter,B=(F=h.locale)!=null?F:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(To(),Po)).then(({createQaMeter:D})=>{var K,O;k||(b=D({source:h.source,size:(K=h.size)!=null?K:"sm",position:(O=h.position)!=null?O:$n(),locale:B,...h.getCurrentPage&&{getCurrentPage:h.getCurrentPage}}))})}let R={show(){f.open()},hide(){f.close()},open(h){f.open()},async submit(h){return u({description:h.description,...h.feedback_type!==void 0&&{feedback_type:h.feedback_type},...h.severity!==void 0&&{severity:h.severity},...h.synthetic!==void 0&&{synthetic:h.synthetic},...h.screenshot!==void 0&&{screenshot:h.screenshot},...h.screenshots!==void 0&&{screenshots:h.screenshots}})},identify(h){i=h,f.notifyIdentityChanged()},setMetadata(h){s={...s,...h}},shutdown(){k=!0,b==null||b.dispose(),f.dispose(),n.dispose(),d.remove();let h=window;h.mhosaicFeedback===R&&delete h.mhosaicFeedback},_registerTransformer(h){c.push(h)}};return window.mhosaicFeedback=R,R}var Lo=window;function Bo(e){if(!e.key||!e.endpoint)return null;let t=e.env;return{apiKey:e.key,endpoint:e.endpoint,...t!==void 0&&{env:t},...e.qaSource?{qaMeter:{source:e.qaSource,...e.qaLocale?{locale:e.qaLocale}:{}}}:{}}}function Hn(){let e=document.currentScript;return e?Bo(e.dataset):null}var we=null,Ao,Mo,mt=(Mo=(Ao=Lo.Feedback)==null?void 0:Ao.q)!=null?Mo:[];function zo(e){let[t,r]=e;if(t==="init"){if(we)return;we=Ft(r);return}if(!we){mt.push(e);return}t==="identify"?we.identify(r):t==="setMetadata"?we.setMetadata(r):t==="open"&&we.open(r)}var Eo=Hn();Eo&&(we=Ft(Eo));for(;mt.length>0;)zo(mt.shift());var On=Object.assign(function(t,r){zo([t,r])},{q:mt});Lo.Feedback=On;return Uo(Nn);})();
2700
2736
  //# sourceMappingURL=embed.min.js.map