@mhosaic/feedback 0.28.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var MhosaicFeedback=(()=>{var Re=Object.defineProperty;var to=Object.getOwnPropertyDescriptor;var ro=Object.getOwnPropertyNames;var oo=Object.prototype.hasOwnProperty;var ao=(e,t,r)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var J=(e,t)=>()=>(e&&(t=e(e=0)),t);var vt=(e,t)=>{for(var r in t)Re(e,r,{get:t[r],enumerable:!0})},no=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ro(t))!oo.call(e,n)&&n!==r&&Re(e,n,{get:()=>t[n],enumerable:!(a=to(t,n))||a.enumerable});return e};var io=e=>no(Re({},"__esModule",{value:!0}),e);var he=(e,t,r)=>ao(e,typeof t!="symbol"?t+"":t,r);function ae(e,t){for(var r in t)e[r]=t[r];return e}function tt(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?Be.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Te(e,s,a,n,null)}function Te(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?++zt:n,__i:-1,__u:0};return n==null&&$.vnode!=null&&$.vnode(i),i}function Y(e){return e.children}function Ae(e,t){this.props=e,this.context=t}function ue(e,t){if(t==null)return e.__?ue(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"?ue(e):null}function ko(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=ae({},t);i.__v=t.__v+1,$.vnode&&$.vnode(i),rt(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?ue(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,Kt(a,i,n),t.__e=t.__=null,i.__e!=r&&Dt(i)}}function Dt(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}),Dt(e)}function At(e){(!e.__d&&(e.__d=!0)&&ie.push(e)&&!ze.__r++||Tt!=$.debounceRendering)&&((Tt=$.debounceRendering)||Bt)(ze)}function ze(){try{for(var e,t=1;ie.length;)ie.length>t&&ie.sort(Ft),e=ie.shift(),t=ie.length,ko(e)}finally{ie.length=ze.__r=0}}function $t(e,t,r,a,n,i,s,l,p,d,m){var c,g,f,R,S,v,w,b=a&&a.__k||Le,h=t.length;for(p=So(r,t,b,p,h),c=0;c<h;c++)(f=r.__k[c])!=null&&(g=f.__i!=-1&&b[f.__i]||Me,f.__i=c,v=rt(e,f,g,n,i,s,l,p,d,m),R=f.__e,f.ref&&g.ref!=f.ref&&(g.ref&&ot(g.ref,null,f),m.push(f.ref,f.__c||R,f)),S==null&&R!=null&&(S=R),(w=!!(4&f.__u))||g.__k===f.__k?(p=Nt(f,p,e,w),w&&g.__e&&(g.__e=null)):typeof f.type=="function"&&v!==void 0?p=v:R&&(p=R.nextSibling),f.__u&=-7);return r.__e=S,p}function So(e,t,r,a,n){var i,s,l,p,d,m=r.length,c=m,g=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]=Te(null,s,null,null,null):Fe(s)?s=e.__k[i]=Te(Y,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Te(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,p=i+g,s.__=e,s.__b=e.__b+1,l=null,(d=s.__i=Co(s,r,p,c))!=-1&&(c--,(l=r[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(n>m?g--:n<m&&g++),typeof s.type!="function"&&(s.__u|=4)):d!=p&&(d==p-1?g--:d==p+1?g++:(d>p?g--:g++,s.__u|=4))):e.__k[i]=null;if(c)for(i=0;i<m;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=ue(l)),Ot(l,l));return a}function Nt(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=Nt(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=ue(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Co(e,t,r,a){var n,i,s,l=e.key,p=e.type,d=t[r],m=d!=null&&(2&d.__u)==0;if(d===null&&l==null||m&&l==d.key&&p==d.type)return r;if(a>(m?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&&p==d.type)return s}return-1}function Mt(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||wo.test(t)?r:r+"px"}function Pe(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||Mt(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||Mt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(It,"$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[ye]=a[ye]:(r[ye]=et,e.addEventListener(t,i?Je:Xe,i)):e.removeEventListener(t,i?Je:Xe,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 Lt(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[Ee]==null)t[Ee]=et++;else if(t[Ee]<r[ye])return;return r($.event?$.event(t):t)}}}function rt(e,t,r,a,n,i,s,l,p,d){var m,c,g,f,R,S,v,w,b,h,y,k,P,x,F,L=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(p=!!(32&r.__u),i=[l=t.__e=r.__e]),(m=$.__b)&&m(t);e:if(typeof L=="function")try{if(w=t.props,b=L.prototype&&L.prototype.render,h=(m=L.contextType)&&a[m.__c],y=m?h?h.props.value:m.__:a,r.__c?v=(c=t.__c=r.__c).__=c.__E:(b?t.__c=c=new L(w,y):(t.__c=c=new Ae(w,y),c.constructor=L,c.render=qo),h&&h.sub(c),c.state||(c.state={}),c.__n=a,g=c.__d=!0,c.__h=[],c._sb=[]),b&&c.__s==null&&(c.__s=c.state),b&&L.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ae({},c.__s)),ae(c.__s,L.getDerivedStateFromProps(w,c.__s))),f=c.props,R=c.state,c.__v=t,g)b&&L.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),b&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(b&&L.getDerivedStateFromProps==null&&w!==f&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(w,y),t.__v==r.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(w,c.__s,y)===!1){t.__v!=r.__v&&(c.props=w,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(I){I&&(I.__=t)}),Le.push.apply(c.__h,c._sb),c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(w,c.__s,y),b&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(f,R,S)})}if(c.context=y,c.props=w,c.__P=e,c.__e=!1,k=$.__r,P=0,b)c.state=c.__s,c.__d=!1,k&&k(t),m=c.render(c.props,c.state,c.context),Le.push.apply(c.__h,c._sb),c._sb=[];else do c.__d=!1,k&&k(t),m=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++P<25);c.state=c.__s,c.getChildContext!=null&&(a=ae(ae({},a),c.getChildContext())),b&&!g&&c.getSnapshotBeforeUpdate!=null&&(S=c.getSnapshotBeforeUpdate(f,R)),x=m!=null&&m.type===Y&&m.key==null?Ht(m.props.children):m,l=$t(e,Fe(x)?x:[x],t,r,a,n,i,s,l,p,d),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),v&&(c.__E=c.__=null)}catch(I){if(t.__v=null,p||i!=null)if(I.then){for(t.__u|=p?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--;)tt(i[F]);Ze(t)}else t.__e=r.__e,t.__k=r.__k,I.then||Ze(t);$.__e(I,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=Ro(r.__e,t,r,a,n,i,s,p,d);return(m=$.diffed)&&m(t),128&t.__u?void 0:l}function Ze(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ze))}function Kt(e,t,r){for(var a=0;a<r.length;a++)ot(r[a],r[++a],r[++a]);$.__c&&$.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){$.__e(i,n.__v)}})}function Ht(e){return typeof e!="object"||e==null||e.__b>0?e:Fe(e)?e.map(Ht):ae({},e)}function Ro(e,t,r,a,n,i,s,l,p){var d,m,c,g,f,R,S,v=r.props||Me,w=t.props,b=t.type;if(b=="svg"?n="http://www.w3.org/2000/svg":b=="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((f=i[d])&&"setAttribute"in f==!!b&&(b?f.localName==b:f.nodeType==3)){e=f,i[d]=null;break}}if(e==null){if(b==null)return document.createTextNode(w);e=document.createElementNS(n,b,w.is&&w),l&&($.__m&&$.__m(t,i),l=!1),i=null}if(b==null)v===w||l&&e.data==w||(e.data=w);else{if(i=i&&Be.call(e.childNodes),!l&&i!=null)for(v={},d=0;d<e.attributes.length;d++)v[(f=e.attributes[d]).name]=f.value;for(d in v)f=v[d],d=="dangerouslySetInnerHTML"?c=f:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||Pe(e,d,null,f,n);for(d in w)f=w[d],d=="children"?g=f:d=="dangerouslySetInnerHTML"?m=f:d=="value"?R=f:d=="checked"?S=f:l&&typeof f!="function"||v[d]===f||Pe(e,d,f,v[d],n);if(m)l||c&&(m.__html==c.__html||m.__html==e.innerHTML)||(e.innerHTML=m.__html),t.__k=[];else if(c&&(e.innerHTML=""),$t(t.type=="template"?e.content:e,Fe(g)?g:[g],t,r,a,b=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&ue(r,0),l,p),i!=null)for(d=i.length;d--;)tt(i[d]);l||(d="value",b=="progress"&&R==null?e.removeAttribute("value"):R!=null&&(R!==e[d]||b=="progress"&&!R||b=="option"&&R!=v[d])&&Pe(e,d,R,v[d],n),d="checked",S!=null&&S!=e[d]&&Pe(e,d,S,v[d],n))}return e}function ot(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){$.__e(n,r)}}function Ot(e,t,r){var a,n;if($.unmount&&$.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||ot(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){$.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&Ot(a[n],t,r||typeof e.type!="function");r||tt(e.__e),e.__c=e.__=e.__e=void 0}function qo(e,t,r){return this.constructor(e,r)}function fe(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),$.__&&$.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],rt(t,e=(!a&&r||t).__k=_(Y,null,[e]),n||Me,Me,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Be.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),Kt(i,e,s)}var Be,$,zt,_o,ie,Tt,Bt,Ft,Ye,Ee,ye,It,et,Xe,Je,xo,Me,Le,wo,Fe,te=J(()=>{"use strict";Me={},Le=[],wo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;Be=Le.slice,$={__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}},zt=0,_o=function(e){return e!=null&&e.constructor===void 0},Ae.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ae({},this.state),typeof e=="function"&&(e=e(ae({},r),this.props)),e&&ae(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),At(this))},Ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),At(this))},Ae.prototype.render=Y,ie=[],Bt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ft=function(e,t){return e.__v.__b-t.__v.__b},ze.__r=0,Ye=Math.random().toString(8),Ee="__d"+Ye,ye="__a"+Ye,It=/(PointerCapture)$|Capture$/i,et=0,Xe=Lt(!1),Je=Lt(!0),xo=0});function De(e,t){Q.__h&&Q.__h(H,e,_e||t),_e=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function E(e){return _e=1,Po(Zt,e)}function Po(e,t,r){var a=De(me++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):Zt(void 0,t),function(l){var p=a.__N?a.__N[0]:a.__[0],d=a.t(p,l);p!==d&&(a.__N=[d,a.__[1]],a.__c.setState({}))}],a.__c=H,!H.__f)){var n=function(l,p,d){if(!a.__c.__H)return!0;var m=a.__c.__H.__.filter(function(g){return g.__c});if(m.every(function(g){return!g.__N}))return!i||i.call(this,l,p,d);var c=a.__c.props!==l;return m.some(function(g){if(g.__N){var f=g.__[0];g.__=g.__N,g.__N=void 0,f!==g.__[0]&&(c=!0)}}),i&&i.call(this,l,p,d)||c};H.__f=!0;var i=H.shouldComponentUpdate,s=H.componentWillUpdate;H.componentWillUpdate=function(l,p,d){if(this.__e){var m=i;i=void 0,n(l,p,d),i=m}s&&s.call(this,l,p,d)},H.shouldComponentUpdate=n}return a.__N||a.__}function D(e,t){var r=De(me++,3);!Q.__s&&st(r.__H,t)&&(r.__=e,r.u=t,H.__H.__h.push(r))}function it(e,t){var r=De(me++,4);!Q.__s&&st(r.__H,t)&&(r.__=e,r.u=t,H.__h.push(r))}function W(e){return _e=5,Z(function(){return{current:e}},[])}function Z(e,t){var r=De(me++,7);return st(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function ne(e,t){return _e=8,Z(function(){return e},t)}function Eo(){for(var e;e=Jt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ie),t.__h.some(nt),t.__h=[]}catch(r){t.__h=[],Q.__e(r,e.__v)}}}function To(e){var t,r=function(){clearTimeout(a),Xt&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);Xt&&(t=requestAnimationFrame(r))}function Ie(e){var t=H,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),H=t}function nt(e){var t=H;e.__c=e.__(),H=t}function st(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function Zt(e,t){return typeof t=="function"?t(e):t}var me,H,at,Qt,_e,Jt,Q,Wt,jt,Ut,Vt,Gt,Yt,Xt,G=J(()=>{"use strict";te();_e=0,Jt=[],Q=$,Wt=Q.__b,jt=Q.__r,Ut=Q.diffed,Vt=Q.__c,Gt=Q.unmount,Yt=Q.__;Q.__b=function(e){H=null,Wt&&Wt(e)},Q.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Yt&&Yt(e,t)},Q.__r=function(e){jt&&jt(e),me=0;var t=(H=e.__c).__H;t&&(at===H?(t.__h=[],H.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Ie),t.__h.some(nt),t.__h=[],me=0)),at=H},Q.diffed=function(e){Ut&&Ut(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Jt.push(t)!==1&&Qt===Q.requestAnimationFrame||((Qt=Q.requestAnimationFrame)||To)(Eo)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),at=H=null},Q.__c=function(e,t){t.some(function(r){try{r.__h.some(Ie),r.__h=r.__h.filter(function(a){return!a.__||nt(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],Q.__e(a,r.__v)}}),Vt&&Vt(e,t)},Q.unmount=function(e){Gt&&Gt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Ie(a)}catch(n){t=n}}),r.__H=void 0,t&&Q.__e(t,r.__v))};Xt=typeof requestAnimationFrame=="function"});function Cr(e){return e==="en"?Ba:za}var za,Ba,Rr=J(()=>{"use strict";za={"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."},Ba={"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 ft(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 Fa(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 Pr(e,t){let r=qr(ft(e)),a=null,n=-1;for(let i of t){let s=qr(i);if(!Fa(r,s))continue;let p=s.filter(d=>!d.startsWith(":")).length*100+s.length;p>n&&(a=i,n=p)}return a}var qr,mt=J(()=>{"use strict";qr=e=>e.split("/").filter(Boolean)});var Er,Tr=J(()=>{"use strict";Er=`
1
+ "use strict";var MhosaicFeedback=(()=>{var Me=Object.defineProperty;var wo=Object.getOwnPropertyDescriptor;var ko=Object.getOwnPropertyNames;var So=Object.prototype.hasOwnProperty;var Co=(e,t,r)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var te=(e,t)=>()=>(e&&(t=e(e=0)),t);var Mt=(e,t)=>{for(var r in t)Me(e,r,{get:t[r],enumerable:!0})},Ro=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ko(t))!So.call(e,n)&&n!==r&&Me(e,n,{get:()=>t[n],enumerable:!(a=wo(t,n))||a.enumerable});return e};var qo=e=>Ro(Me({},"__esModule",{value:!0}),e);var ke=(e,t,r)=>Co(e,typeof t!="symbol"?t+"":t,r);function ce(e,t){for(var r in t)e[r]=t[r];return e}function lt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(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?He.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 Fe(e,s,a,n,null)}function Fe(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?++Vt:n,__i:-1,__u:0};return n==null&&H.vnode!=null&&H.vnode(i),i}function ee(e){return e.children}function Ie(e,t){this.props=e,this.context=t}function ve(e,t){if(t==null)return e.__?ve(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"?ve(e):null}function Ko(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=ce({},t);i.__v=t.__v+1,H.vnode&&H.vnode(i),ct(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?ve(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,tr(a,i,n),t.__e=t.__=null,i.__e!=r&&Jt(i)}}function Jt(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}),Jt(e)}function Qt(e){(!e.__d&&(e.__d=!0)&&ue.push(e)&&!Oe.__r++||jt!=H.debounceRendering)&&((jt=H.debounceRendering)||Gt)(Oe)}function Oe(){try{for(var e,t=1;ue.length;)ue.length>t&&ue.sort(Xt),e=ue.shift(),t=ue.length,Ko(e)}finally{ue.length=Oe.__r=0}}function Zt(e,t,r,a,n,i,s,l,u,c,f){var d,p,b,v,C,h,x,R=a&&a.__k||$e,y=t.length;for(u=jo(r,t,R,u,y),d=0;d<y;d++)(b=r.__k[d])!=null&&(p=b.__i!=-1&&R[b.__i]||De,b.__i=d,h=ct(e,b,p,n,i,s,l,u,c,f),v=b.__e,b.ref&&p.ref!=b.ref&&(p.ref&&dt(p.ref,null,b),f.push(b.ref,b.__c||v,b)),C==null&&v!=null&&(C=v),(x=!!(4&b.__u))||p.__k===b.__k?(u=er(b,u,e,x),x&&p.__e&&(p.__e=null)):typeof b.type=="function"&&h!==void 0?u=h:v&&(u=v.nextSibling),b.__u&=-7);return r.__e=C,u}function jo(e,t,r,a,n){var i,s,l,u,c,f=r.length,d=f,p=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]=Fe(null,s,null,null,null):Ne(s)?s=e.__k[i]=Fe(ee,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Fe(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,u=i+p,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=Qo(s,r,u,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>f?p--:n<f&&p++),typeof s.type!="function"&&(s.__u|=4)):c!=u&&(c==u-1?p--:c==u+1?p++:(c>u?p--:p++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<f;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=ve(l)),or(l,l));return a}function er(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=er(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=ve(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Qo(e,t,r,a){var n,i,s,l=e.key,u=e.type,c=t[r],f=c!=null&&(2&c.__u)==0;if(c===null&&l==null||f&&l==c.key&&u==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&&u==c.type)return s}return-1}function Wt(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||No.test(t)?r:r+"px"}function ze(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||Wt(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||Wt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Yt,"$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[Ce]=a[Ce]:(r[Ce]=st,e.addEventListener(t,i?nt:at,i)):e.removeEventListener(t,i?nt:at,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 Ut(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[Be]==null)t[Be]=st++;else if(t[Be]<r[Ce])return;return r(H.event?H.event(t):t)}}}function ct(e,t,r,a,n,i,s,l,u,c){var f,d,p,b,v,C,h,x,R,y,_,g,q,k,F,E=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),i=[l=t.__e=r.__e]),(f=H.__b)&&f(t);e:if(typeof E=="function")try{if(x=t.props,R=E.prototype&&E.prototype.render,y=(f=E.contextType)&&a[f.__c],_=f?y?y.props.value:f.__:a,r.__c?h=(d=t.__c=r.__c).__=d.__E:(R?t.__c=d=new E(x,_):(t.__c=d=new Ie(x,_),d.constructor=E,d.render=Uo),y&&y.sub(d),d.state||(d.state={}),d.__n=a,p=d.__d=!0,d.__h=[],d._sb=[]),R&&d.__s==null&&(d.__s=d.state),R&&E.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ce({},d.__s)),ce(d.__s,E.getDerivedStateFromProps(x,d.__s))),b=d.props,v=d.state,d.__v=t,p)R&&E.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),R&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(R&&E.getDerivedStateFromProps==null&&x!==b&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(x,_),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(x,d.__s,_)===!1){t.__v!=r.__v&&(d.props=x,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(B){B&&(B.__=t)}),$e.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(x,d.__s,_),R&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(b,v,C)})}if(d.context=_,d.props=x,d.__P=e,d.__e=!1,g=H.__r,q=0,R)d.state=d.__s,d.__d=!1,g&&g(t),f=d.render(d.props,d.state,d.context),$e.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,g&&g(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++q<25);d.state=d.__s,d.getChildContext!=null&&(a=ce(ce({},a),d.getChildContext())),R&&!p&&d.getSnapshotBeforeUpdate!=null&&(C=d.getSnapshotBeforeUpdate(b,v)),k=f!=null&&f.type===ee&&f.key==null?rr(f.props.children):f,l=Zt(e,Ne(k)?k:[k],t,r,a,n,i,s,l,u,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),h&&(d.__E=d.__=null)}catch(B){if(t.__v=null,u||i!=null)if(B.then){for(t.__u|=u?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--;)lt(i[F]);it(t)}else t.__e=r.__e,t.__k=r.__k,B.then||it(t);H.__e(B,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=Wo(r.__e,t,r,a,n,i,s,u,c);return(f=H.diffed)&&f(t),128&t.__u?void 0:l}function it(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(it))}function tr(e,t,r){for(var a=0;a<r.length;a++)dt(r[a],r[++a],r[++a]);H.__c&&H.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){H.__e(i,n.__v)}})}function rr(e){return typeof e!="object"||e==null||e.__b>0?e:Ne(e)?e.map(rr):ce({},e)}function Wo(e,t,r,a,n,i,s,l,u){var c,f,d,p,b,v,C,h=r.props||De,x=t.props,R=t.type;if(R=="svg"?n="http://www.w3.org/2000/svg":R=="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((b=i[c])&&"setAttribute"in b==!!R&&(R?b.localName==R:b.nodeType==3)){e=b,i[c]=null;break}}if(e==null){if(R==null)return document.createTextNode(x);e=document.createElementNS(n,R,x.is&&x),l&&(H.__m&&H.__m(t,i),l=!1),i=null}if(R==null)h===x||l&&e.data==x||(e.data=x);else{if(i=i&&He.call(e.childNodes),!l&&i!=null)for(h={},c=0;c<e.attributes.length;c++)h[(b=e.attributes[c]).name]=b.value;for(c in h)b=h[c],c=="dangerouslySetInnerHTML"?d=b:c=="children"||c in x||c=="value"&&"defaultValue"in x||c=="checked"&&"defaultChecked"in x||ze(e,c,null,b,n);for(c in x)b=x[c],c=="children"?p=b:c=="dangerouslySetInnerHTML"?f=b:c=="value"?v=b:c=="checked"?C=b:l&&typeof b!="function"||h[c]===b||ze(e,c,b,h[c],n);if(f)l||d&&(f.__html==d.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(d&&(e.innerHTML=""),Zt(t.type=="template"?e.content:e,Ne(p)?p:[p],t,r,a,R=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&ve(r,0),l,u),i!=null)for(c=i.length;c--;)lt(i[c]);l||(c="value",R=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[c]||R=="progress"&&!v||R=="option"&&v!=h[c])&&ze(e,c,v,h[c],n),c="checked",C!=null&&C!=e[c]&&ze(e,c,C,h[c],n))}return e}function dt(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){H.__e(n,r)}}function or(e,t,r){var a,n;if(H.unmount&&H.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||dt(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){H.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&or(a[n],t,r||typeof e.type!="function");r||lt(e.__e),e.__c=e.__=e.__e=void 0}function Uo(e,t,r){return this.constructor(e,r)}function ye(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),H.__&&H.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],ct(t,e=(!a&&r||t).__k=w(ee,null,[e]),n||De,De,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?He.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),tr(i,e,s)}var He,H,Vt,Oo,ue,jt,Gt,Xt,ot,Be,Ce,Yt,st,at,nt,Ho,De,$e,No,Ne,ie=te(()=>{"use strict";De={},$e=[],No=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ne=Array.isArray;He=$e.slice,H={__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}},Vt=0,Oo=function(e){return e!=null&&e.constructor===void 0},Ie.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ce({},this.state),typeof e=="function"&&(e=e(ce({},r),this.props)),e&&ce(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Qt(this))},Ie.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Qt(this))},Ie.prototype.render=ee,ue=[],Gt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xt=function(e,t){return e.__v.__b-t.__v.__b},Oe.__r=0,ot=Math.random().toString(8),Be="__d"+ot,Ce="__a"+ot,Yt=/(PointerCapture)$|Capture$/i,st=0,at=Ut(!1),nt=Ut(!0),Ho=0});function je(e,t){U.__h&&U.__h(W,e,Re||t),Re=0;var r=W.__H||(W.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function P(e){return Re=1,Vo(mr,e)}function Vo(e,t,r){var a=je(_e++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):mr(void 0,t),function(l){var u=a.__N?a.__N[0]:a.__[0],c=a.t(u,l);u!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=W,!W.__f)){var n=function(l,u,c){if(!a.__c.__H)return!0;var f=a.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!i||i.call(this,l,u,c);var d=a.__c.props!==l;return f.some(function(p){if(p.__N){var b=p.__[0];p.__=p.__N,p.__N=void 0,b!==p.__[0]&&(d=!0)}}),i&&i.call(this,l,u,c)||d};W.__f=!0;var i=W.shouldComponentUpdate,s=W.componentWillUpdate;W.componentWillUpdate=function(l,u,c){if(this.__e){var f=i;i=void 0,n(l,u,c),i=f}s&&s.call(this,l,u,c)},W.shouldComponentUpdate=n}return a.__N||a.__}function O(e,t){var r=je(_e++,3);!U.__s&&ft(r.__H,t)&&(r.__=e,r.u=t,W.__H.__h.push(r))}function mt(e,t){var r=je(_e++,4);!U.__s&&ft(r.__H,t)&&(r.__=e,r.u=t,W.__h.push(r))}function Q(e){return Re=5,re(function(){return{current:e}},[])}function re(e,t){var r=je(_e++,7);return ft(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function de(e,t){return Re=8,re(function(){return e},t)}function Go(){for(var e;e=ur.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ke),t.__h.some(ut),t.__h=[]}catch(r){t.__h=[],U.__e(r,e.__v)}}}function Xo(e){var t,r=function(){clearTimeout(a),pr&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);pr&&(t=requestAnimationFrame(r))}function Ke(e){var t=W,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),W=t}function ut(e){var t=W;e.__c=e.__(),W=t}function ft(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function mr(e,t){return typeof t=="function"?t(e):t}var _e,W,pt,ar,Re,ur,U,nr,ir,sr,lr,cr,dr,pr,Z=te(()=>{"use strict";ie();Re=0,ur=[],U=H,nr=U.__b,ir=U.__r,sr=U.diffed,lr=U.__c,cr=U.unmount,dr=U.__;U.__b=function(e){W=null,nr&&nr(e)},U.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),dr&&dr(e,t)},U.__r=function(e){ir&&ir(e),_e=0;var t=(W=e.__c).__H;t&&(pt===W?(t.__h=[],W.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Ke),t.__h.some(ut),t.__h=[],_e=0)),pt=W},U.diffed=function(e){sr&&sr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ur.push(t)!==1&&ar===U.requestAnimationFrame||((ar=U.requestAnimationFrame)||Xo)(Go)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),pt=W=null},U.__c=function(e,t){t.some(function(r){try{r.__h.some(Ke),r.__h=r.__h.filter(function(a){return!a.__||ut(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],U.__e(a,r.__v)}}),lr&&lr(e,t)},U.unmount=function(e){cr&&cr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Ke(a)}catch(n){t=n}}),r.__H=void 0,t&&U.__e(t,r.__v))};pr=typeof requestAnimationFrame=="function"});function Dr(e){return e==="en"?tn:en}var en,tn,$r=te(()=>{"use strict";en={"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."},tn={"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 yt(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 Hr(e,t){let r=Or(yt(e)),a=null,n=-1;for(let i of t){let s=Or(i);if(!rn(r,s))continue;let u=s.filter(c=>!c.startsWith(":")).length*100+s.length;u>n&&(a=i,n=u)}return a}var Or,_t=te(()=>{"use strict";Or=e=>e.split("/").filter(Boolean)});var Nr,Kr=te(()=>{"use strict";Nr=`
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 we(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function le(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function Qe(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function We(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 je(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var xe,Ar,Mr,Lr,zr,Ue=J(()=>{"use strict";xe={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},Ar={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},Mr={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},Lr={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},zr={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function Br({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[Ar[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 ${xe[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 Fr=J(()=>{"use strict";te();Ue()});function ke({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 ${gt[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 ${gt[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 ${gt[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 gt,bt=J(()=>{"use strict";te();gt={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function Ia(e){return{dev:le(e.dev),bot:we(e.automated),human:le(e.client)}}function Da(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",p=(i=t.get(l))!=null?i:[];p.push(s),t.set(l,p)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var p,d,m;let l=t.get(s);return{key:s,label:(m=(d=(p=l[0])==null?void 0:p.group)==null?void 0:d.label)!=null?m:"",scenarios:l}})}function Ir(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Dr({scenario:e,strings:t}){let r=Ia(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 ${Mr[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[Lr[e.caseStatus]]):null,e.grounding?_("span",{class:"qa-tag"},t[zr[e.grounding]]):null,a?_("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),_(ke,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function $r({page:e,state:t,meta:r,strings:a}){var d;let[n,i]=E(new Set),s=m=>{i(c=>{let g=new Set(c);return g.has(m)?g.delete(m):g.add(m),g})},l=Ir(a["panel.freshness"],{date:We(r.generated_at),version:je(r.app_version),env:r.environment}),p;if(t==="no-tests")p=_("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")p=_("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let m=(d=e==null?void 0:e.scenarios)!=null?d:[],c=m.some(g=>g.group);if(m.length===0)p=_("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!c)p=_("ul",{class:"qa-panel__list"},m.map(g=>_(Dr,{key:g.id,scenario:g,strings:a})));else{let g=Da(m);p=_("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},g.map(f=>{let R=n.has(f.key),S={dev:Qe(f.scenarios.map(v=>le(v.dev))),bot:Qe(f.scenarios.map(v=>we(v.automated))),human:Qe(f.scenarios.map(v=>le(v.client)))};return _("li",{key:f.key,class:"qa-suite","data-testid":"qa-panel-group"},_("button",{type:"button",class:"qa-suite__head","aria-expanded":R,"data-testid":"qa-suite-group",onClick:()=>s(f.key)},_("span",{class:`qa-suite__chev ${R?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),_("span",{class:"qa-suite__key"},f.key),_("span",{class:"qa-suite__label"},f.label),_("span",{class:"qa-suite__count"},Ir(a["suite.cases"],{count:f.scenarios.length})),_(ke,{dev:S.dev,bot:S.bot,human:S.human,strings:a})),R?_("ul",{class:"qa-suite__list"},f.scenarios.map(v=>_(Dr,{key:v.id,scenario:v,strings:a}))):null)}))}}return _("section",{class:"qa-panel","data-testid":"qa-panel"},p,_("footer",{class:"qa-panel__foot"},_("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var Nr=J(()=>{"use strict";te();G();bt();Ue()});function $a(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,p;for(let d of(l=t.get(i))!=null?l:[]){let m=(p=t.get(d.id))!=null?p:[];r.push({node:d,depth:s,hasChildren:m.length>0}),m.length>0&&a(d.id,s+1)}};return a(null,0),r}function Na(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let p=(a=l.external_key)!=null?a:l.id,d=(n=t.get(p))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let m of(i=l.pages)!=null?i:[])(m.role==="primary"?d.primaries:d.traversed).add(m.pattern);t.set(p,d)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var m,c,g,f;let p=(c=(m=s.scenario.group)==null?void 0:m.key)!=null?c:"~",d=(f=(g=l.scenario.group)==null?void 0:g.key)!=null?f:"~";return p!==d?p.localeCompare(d):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function Kr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Hr(e){return`${Math.round(e)}%`}function Or({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=E("pages"),[s,l]=E("");D(()=>{let v=w=>{w.key==="Escape"&&a()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[a]);let p=t?ft(t):null,d=Z(()=>$a(e.sitemap),[e]),m=Z(()=>Na(e),[e]),c=Z(()=>{let v=new Map;for(let w of e.sitemap)v.set(w.path_pattern,w.title);return v},[e]),g=v=>{var w;return(w=c.get(v))!=null?w:v},f=s.trim().toLowerCase(),R=f?m.filter(v=>{var w,b;return v.scenario.title.toLowerCase().includes(f)||((b=(w=v.scenario.group)==null?void 0:w.label)!=null?b:"").toLowerCase().includes(f)}):m,S=Kr(r["panel.freshness"],{date:We(e.generated_at),version:je(e.app_version),env:e.environment});return _("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:v=>{v.target===v.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"},S),_("div",{class:"qa-kpi","data-testid":"qa-kpi"},_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},Hr(e.metric.pages_with_scenarios_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},Hr(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"},d.map(v=>{let w=p!==null&&v.node.path_pattern===p;return _("li",{key:v.node.id,class:`qa-tree__row ${w?"qa-tree__row--here":""}`,"data-testid":w?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+v.depth*1.1}rem`}},_("span",{class:`qa-dot ${xe[v.node.color]}`,"aria-hidden":"true"}),_("span",{class:`qa-tree__title ${v.node.structural?"qa-tree__title--structural":""}`},v.node.title||v.node.path_pattern),w?_("span",{class:"qa-tree__here"},` ${v.node.path_pattern} `):null,w?_("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,_("span",{class:"qa-tree__count"},String(v.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:v=>l(v.target.value)}),R.length===0?_("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):_("ul",{class:"qa-scenarios__list"},R.map(v=>{var y,k;let w=v.scenario,b={dev:le(w.dev),bot:we(w.automated),human:le(w.client)},h=[...v.traversed].map(g);return _("li",{key:(y=w.external_key)!=null?y:w.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},_("div",{class:"qa-scenarios__line"},_("span",{class:`qa-dot ${xe[w.color]}`,"aria-hidden":"true"}),(k=w.group)!=null&&k.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,_(ke,{dev:b.dev,bot:b.bot,human:b.human,strings:r})),_("div",{class:"qa-scenarios__pages"},v.primaries.size?_("span",{class:"qa-scenarios__primary"},Kr(r["modal.appliesTo"],{count:v.primaries.size})):null,h.length?_("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${h.join(", ")}`):null))}))))))}var Qr=J(()=>{"use strict";te();G();bt();mt();Ue()});function Ka(){if(Ve++,Ge)return;Ge=!0,Se=history.pushState,Ce=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(ht))};history.pushState=function(...r){let a=Se.apply(this,r);return e(),a},history.replaceState=function(...r){let a=Ce.apply(this,r);return e(),a}}function Ha(){Ve>0&&Ve--,!(Ve>0||!Ge)&&(Ge=!1,Se&&(history.pushState=Se),Ce&&(history.replaceState=Ce),Se=null,Ce=null)}function Wr(e){return typeof e=="object"&&e!==null&&e.format===Oa}function Ur(){jr||(jr=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function Wa(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 Ua(e,t){if(!e||!t)return ja;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 Vr(e){var x,F,L,I;let{source:t}=e,r=Cr((x=e.locale)!=null?x:"fr"),a=typeof t=="object"?t:null;if(a&&!Wr(a))return Ur(),Qa;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(q=>q.json()):Promise.resolve(t)).then(q=>{Wr(q)?(n=q,g()):Ur()}).catch(()=>{})}let p=document.createElement("div");p.setAttribute("data-mqa-host",""),p.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((L=e.position)==null?void 0:L.right)!==void 0&&p.style.setProperty("--mqa-right",`${e.position.right}px`),((I=e.position)==null?void 0:I.bottom)!==void 0&&p.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(p);let d=p.attachShadow({mode:"open"}),m=document.createElement("style");m.textContent=Er,d.appendChild(m);let c=document.createElement("div");d.appendChild(c);let g=()=>{};function f(){return e.getCurrentPage?e.getCurrentPage():n?Pr(window.location.pathname,Wa(n)):null}function R(){let[M,q]=E(0),z=ne(()=>q(O=>O+1),[]);g=z;let N=Ua(n,f()),j=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},U=ne(()=>{l()},[]),V=ne(()=>{l(),S=!0,z()},[]),B=ne(()=>{S=!1,z()},[]);return D(()=>{let O=()=>z();return window.addEventListener("popstate",O),window.addEventListener(ht,O),()=>{window.removeEventListener("popstate",O),window.removeEventListener(ht,O)}},[]),_("div",{class:"qa-pastille-wrap",onMouseEnter:h,onMouseLeave:y},v?_("div",{class:"qa-panel-anchor"},_($r,{page:N.page,state:N.state,meta:j,strings:r})):null,_(Br,{color:N.color,state:N.state,strings:r,onHover:()=>{h(),v=!0,U(),z()},onOpenModal:V}),S&&n?_(Or,{artifact:n,currentPattern:N.pattern,strings:r,onClose:B}):null)}let S=!1,v=!1,w=null,b=140;function h(){w!==null&&(clearTimeout(w),w=null)}function y(){h(),w=setTimeout(()=>{w=null,!P&&(v=!1,g())},b)}function k(){fe(_(R,{}),c)}k(),Ka();let P=!1;return{open(){P||(l(),S=!0,g())},close(){P||(S=!1,g())},dispose(){P||(P=!0,h(),fe(null,c),p.remove(),Ha())}}}var ht,Ge,Ve,Se,Ce,Oa,jr,Qa,ja,Gr=J(()=>{"use strict";te();G();Rr();mt();Tr();Fr();Nr();Qr();ht="mqa:locationchange",Ge=!1,Ve=0,Se=null,Ce=null;Oa=1;jr=!1;Qa={open(){},close(){},dispose(){}};ja={state:"unknown-page",color:"gray",pattern:null,page:null}});var Yr={};vt(Yr,{createQaMeter:()=>Va});function Va(e){return Vr(e)}var Xr=J(()=>{"use strict";Gr()});var en={};vt(en,{createFeedback:()=>Za});var so=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function lo(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 ve=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);he(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function co(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 _t(e,t){if(e.status===429)throw new ve(co(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function yt(e,t){await _t(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 qe(e,t){await _t(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 xt(e){var v,w;let t=((v=e.endpoint)!=null?v:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');lo(t);let r=(w=e.fetch)!=null?w:globalThis.fetch;async function a(b){var L,I,M,q;let h=b;if(e.beforeSend&&(h=await e.beforeSend(b)),h===!1)throw new Error("Submission cancelled by beforeSend");let y=new FormData;for(let z of so)y.append(z,String(h[z]));y.append("technical_context",JSON.stringify(h.technical_context)),((L=h.screenshots)!=null&&L.length?h.screenshots:h.screenshot?[h.screenshot]:[]).forEach((z,N)=>{y.append("screenshot",z,N===0?"screenshot.png":`screenshot-${N+1}.png`)}),h.synthetic&&y.append("synthetic","true"),(I=h.user)!=null&&I.id&&y.append("user",JSON.stringify(h.user)),h.widget_version&&y.append("widget_version",h.widget_version),h.page_path&&y.append("page_path",h.page_path);let P={Authorization:`Bearer ${e.apiKey}`};h.synthetic&&(P["X-Mhosaic-Capture-Source"]="error-tracking");let x=(M=e.getSignedIdentity)==null?void 0:M.call(e);x&&x.userHash&&x.exp&&((q=h.user)!=null&&q.id)&&(P["X-Mhosaic-User"]=String(h.user.id),P["X-Mhosaic-User-Hmac"]=x.userHash,P["X-Mhosaic-User-Exp"]=String(x.exp),x.email&&(P["X-Mhosaic-User-Email"]=x.email));let F=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:P,body:y});if(!F.ok){let z=await F.text().catch(()=>"");throw new Error(`Feedback submit failed: ${F.status} ${z}`)}return F.json()}function n(b){var k;let h={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":b},y=(k=e.getSignedIdentity)==null?void 0:k.call(e);return y&&y.userHash&&y.exp&&(h["X-Mhosaic-User-Hmac"]=y.userHash,h["X-Mhosaic-User-Exp"]=String(y.exp),y.email&&(h["X-Mhosaic-User-Email"]=y.email)),h}async function i(b){let h=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(b)});return h.status===404?[]:yt(h,"listMine")}async function s(b){let h=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(b)});return h.status===404?[]:yt(h,"listChangelog")}async function l(b,h){let y=await r(`${t}/api/feedback/v1/reports/widget/${b}/`,{method:"GET",headers:n(h)});return qe(y,"getReport")}async function p(b,h){let y=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${b}/`,{method:"GET",headers:n(h)});return qe(y,"getReportBySeq")}async function d(b,h,y,k){let P=await r(`${t}/api/feedback/v1/reports/widget/${b}/comments/`,{method:"POST",headers:{...n(h),"Content-Type":"application/json"},body:JSON.stringify({body:y,...k!==void 0&&{client_nonce:k}})});if(!P.ok){let x=await P.text().catch(()=>"");throw new Error(`addComment failed: ${P.status} ${x}`)}return P.json()}async function m(b,h){let y=await r(`${t}/api/feedback/v1/reports/widget/${b}/`,{method:"PATCH",headers:{...n(h),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!y.ok){let k=await y.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${y.status} ${k}`)}return y.json()}async function c(b,h){let y=await r(`${t}/api/feedback/v1/reports/widget/${b}/`,{method:"PATCH",headers:{...n(h),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!y.ok){let k=await y.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${y.status} ${k}`)}return y.json()}function g(b){var k,P,x;if(!b)return"";let h=new URLSearchParams;(k=b.status)==null||k.forEach(F=>h.append("status",F)),(P=b.type)==null||P.forEach(F=>h.append("type",F)),(x=b.severity)==null||x.forEach(F=>h.append("severity",F)),b.q&&h.set("q",b.q),b.mine&&h.set("mine","1"),b.ordering&&h.set("ordering",b.ordering),b.page&&b.page>1&&h.set("page",String(b.page)),b.pagePath&&h.set("page_path",b.pagePath);let y=h.toString();return y?`?${y}`:""}async function f(b,h){let y=await r(`${t}/api/feedback/v1/reports/widget/board/${g(h)}`,{method:"GET",headers:n(b)});if(y.status===404)return{count:0,next:null,previous:null,results:[]};let k=await qe(y,"listBoard");if(!Array.isArray(k.results))throw new Error("listBoard: unexpected response shape (missing results[])");return k}async function R(b,h){let y=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${g(h)}`,{method:"GET",headers:n(b)});return y.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:qe(y,"fetchBoardKpis")}async function S(b,h){let y=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(b),"Content-Type":"application/json"},body:JSON.stringify({external_id:b,...h?{email:h}:{}})});if(!y.ok)throw new Error(`checkVisibility failed: ${y.status}`);return!!(await y.json()).show}return{submitReport:a,checkVisibility:S,listMine:i,listChangelog:s,getReport:l,getReportBySeq:p,addComment:d,closeAsResolved:m,reopenUnresolved:c,listBoard:f,fetchBoardKpis:R}}var po=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,uo=[/^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 fo(e){return uo.some(t=>t.test(e))}function ce(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)=>{po.test(l)||fo(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 mo=[/\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 ee(e){let t=e;for(let r of mo)t=t.replace(r,"[redacted-token]");return t}function wt(){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?ce(a):void 0,i=ce(window.location.pathname+window.location.search),s;try{let p=new URL(i,window.location.origin);s=p.pathname+p.search}catch(p){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:ee(document.title||"").slice(0,200),pathname:s}}function go(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 kt(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(go).join(" "),p=ee(l).slice(0,2e3),d={level:a,message:p,ts:Date.now()};if(a==="error"){let m=new Error().stack;m&&(d.stack=m.split(`
616
+ `});function Ee(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function fe(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function Ye(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function Je(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 Ze(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var qe,jr,Qr,Wr,Ur,et=te(()=>{"use strict";qe={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},jr={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},Qr={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},Wr={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},Ur={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function Vr({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[jr[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return w("div",{class:"qa-pastille"},w("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${qe[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},w("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},w("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 Gr=te(()=>{"use strict";ie();et()});function Pe({dev:e,bot:t,human:r,strings:a}){return w("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},w("span",{class:`qa-lanes__icon qa-lane ${xt[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},w("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},w("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"}))),w("span",{class:`qa-lanes__icon qa-lane ${xt[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},w("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"},w("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),w("path",{d:"M12 4.5v4"}),w("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),w("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),w("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),w("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),w("span",{class:`qa-lanes__icon qa-lane ${xt[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},w("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"},w("circle",{cx:"12",cy:"8",r:"3.6"}),w("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var xt,wt=te(()=>{"use strict";ie();xt={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function on(e){return{dev:fe(e.dev),bot:Ee(e.automated),human:fe(e.client)}}function an(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",u=(i=t.get(l))!=null?i:[];u.push(s),t.set(l,u)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var u,c,f;let l=t.get(s);return{key:s,label:(f=(c=(u=l[0])==null?void 0:u.group)==null?void 0:c.label)!=null?f:"",scenarios:l}})}function Xr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Yr({scenario:e,strings:t}){let r=on(e),a=e.automated.provenance;return w("li",{class:"qa-row","data-testid":"qa-scenario-row"},w("span",{class:"qa-row__title"},e.priority?w("span",{class:`qa-tag ${Qr[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,w("span",{class:"qa-row__name"},e.title),e.source==="testgen"?w("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?w("span",{class:"qa-tag"},t[Wr[e.caseStatus]]):null,e.grounding?w("span",{class:"qa-tag"},t[Ur[e.grounding]]):null,a?w("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),w(Pe,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function Jr({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=P(new Set),s=f=>{i(d=>{let p=new Set(d);return p.has(f)?p.delete(f):p.add(f),p})},l=Xr(a["panel.freshness"],{date:Je(r.generated_at),version:Ze(r.app_version),env:r.environment}),u;if(t==="no-tests")u=w("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")u=w("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let f=(c=e==null?void 0:e.scenarios)!=null?c:[],d=f.some(p=>p.group);if(f.length===0)u=w("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)u=w("ul",{class:"qa-panel__list"},f.map(p=>w(Yr,{key:p.id,scenario:p,strings:a})));else{let p=an(f);u=w("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},p.map(b=>{let v=n.has(b.key),C={dev:Ye(b.scenarios.map(h=>fe(h.dev))),bot:Ye(b.scenarios.map(h=>Ee(h.automated))),human:Ye(b.scenarios.map(h=>fe(h.client)))};return w("li",{key:b.key,class:"qa-suite","data-testid":"qa-panel-group"},w("button",{type:"button",class:"qa-suite__head","aria-expanded":v,"data-testid":"qa-suite-group",onClick:()=>s(b.key)},w("span",{class:`qa-suite__chev ${v?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),w("span",{class:"qa-suite__key"},b.key),w("span",{class:"qa-suite__label"},b.label),w("span",{class:"qa-suite__count"},Xr(a["suite.cases"],{count:b.scenarios.length})),w(Pe,{dev:C.dev,bot:C.bot,human:C.human,strings:a})),v?w("ul",{class:"qa-suite__list"},b.scenarios.map(h=>w(Yr,{key:h.id,scenario:h,strings:a}))):null)}))}}return w("section",{class:"qa-panel","data-testid":"qa-panel"},u,w("footer",{class:"qa-panel__foot"},w("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var Zr=te(()=>{"use strict";ie();Z();wt();et()});function nn(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,u;for(let c of(l=t.get(i))!=null?l:[]){let f=(u=t.get(c.id))!=null?u:[];r.push({node:c,depth:s,hasChildren:f.length>0}),f.length>0&&a(c.id,s+1)}};return a(null,0),r}function sn(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let u=(a=l.external_key)!=null?a:l.id,c=(n=t.get(u))!=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(u,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var f,d,p,b;let u=(d=(f=s.scenario.group)==null?void 0:f.key)!=null?d:"~",c=(b=(p=l.scenario.group)==null?void 0:p.key)!=null?b:"~";return u!==c?u.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function eo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function to(e){return`${Math.round(e)}%`}function ro({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=P("pages"),[s,l]=P("");O(()=>{let h=x=>{x.key==="Escape"&&a()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[a]);let u=t?yt(t):null,c=re(()=>nn(e.sitemap),[e]),f=re(()=>sn(e),[e]),d=re(()=>{let h=new Map;for(let x of e.sitemap)h.set(x.path_pattern,x.title);return h},[e]),p=h=>{var x;return(x=d.get(h))!=null?x:h},b=s.trim().toLowerCase(),v=b?f.filter(h=>{var x,R;return h.scenario.title.toLowerCase().includes(b)||((R=(x=h.scenario.group)==null?void 0:x.label)!=null?R:"").toLowerCase().includes(b)}):f,C=eo(r["panel.freshness"],{date:Je(e.generated_at),version:Ze(e.app_version),env:e.environment});return w("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:h=>{h.target===h.currentTarget&&a()}},w("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},w("header",{class:"qa-modal__head"},w("h3",null,r["modal.title"]),w("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),w("div",{class:"qa-modal__freshness"},C),w("div",{class:"qa-kpi","data-testid":"qa-kpi"},w("div",{class:"qa-kpi__item"},w("span",{class:"qa-kpi__value"},to(e.metric.pages_with_scenarios_pct)),w("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),w("div",{class:"qa-kpi__item"},w("span",{class:"qa-kpi__value"},to(e.metric.scenarios_passing_pct)),w("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),w("nav",{class:"qa-tabs"},w("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),w("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),w("div",{class:"qa-modal__body"},n==="pages"?w("ul",{class:"qa-tree"},c.map(h=>{let x=u!==null&&h.node.path_pattern===u;return w("li",{key:h.node.id,class:`qa-tree__row ${x?"qa-tree__row--here":""}`,"data-testid":x?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+h.depth*1.1}rem`}},w("span",{class:`qa-dot ${qe[h.node.color]}`,"aria-hidden":"true"}),w("span",{class:`qa-tree__title ${h.node.structural?"qa-tree__title--structural":""}`},h.node.title||h.node.path_pattern),x?w("span",{class:"qa-tree__here"},` ${h.node.path_pattern} `):null,x?w("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,w("span",{class:"qa-tree__count"},String(h.node.counts.scenarios)))})):w("div",{class:"qa-scenarios"},w("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:h=>l(h.target.value)}),v.length===0?w("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):w("ul",{class:"qa-scenarios__list"},v.map(h=>{var _,g;let x=h.scenario,R={dev:fe(x.dev),bot:Ee(x.automated),human:fe(x.client)},y=[...h.traversed].map(p);return w("li",{key:(_=x.external_key)!=null?_:x.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},w("div",{class:"qa-scenarios__line"},w("span",{class:`qa-dot ${qe[x.color]}`,"aria-hidden":"true"}),(g=x.group)!=null&&g.key?w("span",{class:"qa-suitekey"},x.group.key):null,w("span",{class:"qa-scenarios__title"},x.title),x.source==="testgen"?w("span",{class:"qa-tag"},r["source.testgen"]):null,w(Pe,{dev:R.dev,bot:R.bot,human:R.human,strings:r})),w("div",{class:"qa-scenarios__pages"},h.primaries.size?w("span",{class:"qa-scenarios__primary"},eo(r["modal.appliesTo"],{count:h.primaries.size})):null,y.length?w("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${y.join(", ")}`):null))}))))))}var oo=te(()=>{"use strict";ie();Z();wt();_t();et()});function ln(){if(tt++,rt)return;rt=!0,Te=history.pushState,Ae=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(kt))};history.pushState=function(...r){let a=Te.apply(this,r);return e(),a},history.replaceState=function(...r){let a=Ae.apply(this,r);return e(),a}}function cn(){tt>0&&tt--,!(tt>0||!rt)&&(rt=!1,Te&&(history.pushState=Te),Ae&&(history.replaceState=Ae),Te=null,Ae=null)}function ao(e){return typeof e=="object"&&e!==null&&e.format===dn}function io(){no||(no=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function un(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 fn(e,t){if(!e||!t)return mn;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 so(e){var k,F,E,B;let{source:t}=e,r=Dr((k=e.locale)!=null?k:"fr"),a=typeof t=="object"?t:null;if(a&&!ao(a))return io(),pn;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(T=>T.json()):Promise.resolve(t)).then(T=>{ao(T)?(n=T,p()):io()}).catch(()=>{})}let u=document.createElement("div");u.setAttribute("data-mqa-host",""),u.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((E=e.position)==null?void 0:E.right)!==void 0&&u.style.setProperty("--mqa-right",`${e.position.right}px`),((B=e.position)==null?void 0:B.bottom)!==void 0&&u.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(u);let c=u.attachShadow({mode:"open"}),f=document.createElement("style");f.textContent=Nr,c.appendChild(f);let d=document.createElement("div");c.appendChild(d);let p=()=>{};function b(){return e.getCurrentPage?e.getCurrentPage():n?Hr(window.location.pathname,un(n)):null}function v(){let[$,T]=P(0),D=de(()=>T(Y=>Y+1),[]);p=D;let M=fn(n,b()),I=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},K=de(()=>{l()},[]),X=de(()=>{l(),C=!0,D()},[]),J=de(()=>{C=!1,D()},[]);return O(()=>{let Y=()=>D();return window.addEventListener("popstate",Y),window.addEventListener(kt,Y),()=>{window.removeEventListener("popstate",Y),window.removeEventListener(kt,Y)}},[]),w("div",{class:"qa-pastille-wrap",onMouseEnter:y,onMouseLeave:_},h?w("div",{class:"qa-panel-anchor"},w(Jr,{page:M.page,state:M.state,meta:I,strings:r})):null,w(Vr,{color:M.color,state:M.state,strings:r,onHover:()=>{y(),h=!0,K(),D()},onOpenModal:X}),C&&n?w(ro,{artifact:n,currentPattern:M.pattern,strings:r,onClose:J}):null)}let C=!1,h=!1,x=null,R=140;function y(){x!==null&&(clearTimeout(x),x=null)}function _(){y(),x=setTimeout(()=>{x=null,!q&&(h=!1,p())},R)}function g(){ye(w(v,{}),d)}g(),ln();let q=!1;return{open(){q||(l(),C=!0,p())},close(){q||(C=!1,p())},dispose(){q||(q=!0,y(),ye(null,d),u.remove(),cn())}}}var kt,rt,tt,Te,Ae,dn,no,pn,mn,lo=te(()=>{"use strict";ie();Z();$r();_t();Kr();Gr();Zr();oo();kt="mqa:locationchange",rt=!1,tt=0,Te=null,Ae=null;dn=1;no=!1;pn={open(){},close(){},dispose(){}};mn={state:"unknown-page",color:"gray",pattern:null,page:null}});var co={};Mt(co,{createQaMeter:()=>gn});function gn(e){return so(e)}var po=te(()=>{"use strict";lo()});var xn={};Mt(xn,{createFeedback:()=>_n});var Eo=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Po(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 Se=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);ke(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function To(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 zt(e,t){if(e.status===429)throw new Se(To(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function Lt(e,t){await zt(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 Le(e,t){await zt(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 Bt(e){var x,R;let t=((x=e.endpoint)!=null?x:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Po(t);let r=(R=e.fetch)!=null?R:globalThis.fetch;async function a(y){var B,$,T,D;let _=y;if(e.beforeSend&&(_=await e.beforeSend(y)),_===!1)throw new Error("Submission cancelled by beforeSend");let g=new FormData;for(let M of Eo)g.append(M,String(_[M]));g.append("technical_context",JSON.stringify(_.technical_context)),((B=_.screenshots)!=null&&B.length?_.screenshots:_.screenshot?[_.screenshot]:[]).forEach((M,I)=>{g.append("screenshot",M,I===0?"screenshot.png":`screenshot-${I+1}.png`)}),_.synthetic&&g.append("synthetic","true"),($=_.user)!=null&&$.id&&g.append("user",JSON.stringify(_.user)),_.widget_version&&g.append("widget_version",_.widget_version),_.page_path&&g.append("page_path",_.page_path);let k={Authorization:`Bearer ${e.apiKey}`};_.synthetic&&(k["X-Mhosaic-Capture-Source"]="error-tracking");let F=(T=e.getSignedIdentity)==null?void 0:T.call(e);F&&F.userHash&&F.exp&&((D=_.user)!=null&&D.id)&&(k["X-Mhosaic-User"]=String(_.user.id),k["X-Mhosaic-User-Hmac"]=F.userHash,k["X-Mhosaic-User-Exp"]=String(F.exp),F.email&&(k["X-Mhosaic-User-Email"]=F.email));let E=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:k,body:g});if(!E.ok){let M=await E.text().catch(()=>"");throw new Error(`Feedback submit failed: ${E.status} ${M}`)}return E.json()}function n(y){var q;let _={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":y},g=(q=e.getSignedIdentity)==null?void 0:q.call(e);return g&&g.userHash&&g.exp&&(_["X-Mhosaic-User-Hmac"]=g.userHash,_["X-Mhosaic-User-Exp"]=String(g.exp),g.email&&(_["X-Mhosaic-User-Email"]=g.email)),_}async function i(y){let _=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(y)});return _.status===404?[]:Lt(_,"listMine")}async function s(y){let _=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(y)});return _.status===404?[]:Lt(_,"listChangelog")}async function l(y,_){let g=await r(`${t}/api/feedback/v1/reports/widget/${y}/`,{method:"GET",headers:n(_)});return Le(g,"getReport")}async function u(y,_){let g=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${y}/`,{method:"GET",headers:n(_)});return Le(g,"getReportBySeq")}async function c(y,_,g,q,k){let F;if(k&&k.length>0){let B=new FormData;B.append("body",g),q!==void 0&&B.append("client_nonce",q),k.forEach(($,T)=>B.append("attachment",$,`attachment-${T+1}.png`)),F={method:"POST",headers:n(_),body:B}}else F={method:"POST",headers:{...n(_),"Content-Type":"application/json"},body:JSON.stringify({body:g,...q!==void 0&&{client_nonce:q}})};let E=await r(`${t}/api/feedback/v1/reports/widget/${y}/comments/`,F);if(!E.ok){let B=await E.text().catch(()=>"");throw new Error(`addComment failed: ${E.status} ${B}`)}return E.json()}async function f(y,_,g){let q=await r(`${t}/api/feedback/v1/reports/widget/${y}/`,{method:"PATCH",headers:{...n(_),"Content-Type":"application/json"},body:JSON.stringify({description:g})});if(!q.ok){let k=await q.text().catch(()=>"");throw new Error(`editDescription failed: ${q.status} ${k}`)}return q.json()}async function d(y,_){let g=await r(`${t}/api/feedback/v1/reports/widget/${y}/`,{method:"PATCH",headers:{...n(_),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!g.ok){let q=await g.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${g.status} ${q}`)}return g.json()}async function p(y,_){let g=await r(`${t}/api/feedback/v1/reports/widget/${y}/`,{method:"PATCH",headers:{...n(_),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!g.ok){let q=await g.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${g.status} ${q}`)}return g.json()}function b(y){var q,k,F;if(!y)return"";let _=new URLSearchParams;(q=y.status)==null||q.forEach(E=>_.append("status",E)),(k=y.type)==null||k.forEach(E=>_.append("type",E)),(F=y.severity)==null||F.forEach(E=>_.append("severity",E)),y.q&&_.set("q",y.q),y.mine&&_.set("mine","1"),y.ordering&&_.set("ordering",y.ordering),y.page&&y.page>1&&_.set("page",String(y.page)),y.pagePath&&_.set("page_path",y.pagePath);let g=_.toString();return g?`?${g}`:""}async function v(y,_){let g=await r(`${t}/api/feedback/v1/reports/widget/board/${b(_)}`,{method:"GET",headers:n(y)});if(g.status===404)return{count:0,next:null,previous:null,results:[]};let q=await Le(g,"listBoard");if(!Array.isArray(q.results))throw new Error("listBoard: unexpected response shape (missing results[])");return q}async function C(y,_){let g=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${b(_)}`,{method:"GET",headers:n(y)});return g.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:Le(g,"fetchBoardKpis")}async function h(y,_){let g=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(y),"Content-Type":"application/json"},body:JSON.stringify({external_id:y,..._?{email:_}:{}})});if(!g.ok)throw new Error(`checkVisibility failed: ${g.status}`);return!!(await g.json()).show}return{submitReport:a,checkVisibility:h,listMine:i,listChangelog:s,getReport:l,getReportBySeq:u,addComment:c,editDescription:f,closeAsResolved:d,reopenUnresolved:p,listBoard:v,fetchBoardKpis:C}}var Ao=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Mo=[/^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 Lo(e){return Mo.some(t=>t.test(e))}function ge(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)=>{Ao.test(l)||Lo(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 zo=[/\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 ae(e){let t=e;for(let r of zo)t=t.replace(r,"[redacted-token]");return t}function Ft(){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?ge(a):void 0,i=ge(window.location.pathname+window.location.search),s;try{let u=new URL(i,window.location.origin);s=u.pathname+u.search}catch(u){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:ae(document.title||"").slice(0,200),pathname:s}}function Bo(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 It(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(Bo).join(" "),u=ae(l).slice(0,2e3),c={level:a,message:u,ts:Date.now()};if(a==="error"){let f=new Error().stack;f&&(c.stack=f.split(`
617
617
  `).slice(2,8).join(`
618
- `))}e.push(d)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function St(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,p=((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:p,status:d.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),d}catch(d){let m=d instanceof Error?d.message:String(d);throw e.push({url:t(l),method:p,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:ee(m)}),d}},()=>{window.fetch=r}}function Ct(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 Rt(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?ee(n):void 0;e.push({message:ee(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(p){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?ee(s):void 0;e.push({message:ee(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 qt(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:ce(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 pe=class{constructor(t){he(this,"max",t);he(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 Pt(e={}){var f;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(f=e.sanitizeUrl)!=null?f:ce,i=new pe(t),s=new pe(r),l=new pe(a),p=kt(i),d=St(s,n),m=Ct(s,n),c=Rt(l),g=qt();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:wt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){p(),d(),m(),c(),g.dispose()}}}var bo={"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.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.loading":"Loading\u2026","mine.error":"Could not load your reports.","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.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"},ho={"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.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.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","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.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"},vo={fr:ho};function yo(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=vo[t])!=null?r:null}function Et(e,t={}){var a;let r=(a=yo(t.locale))!=null?a:{};return{...bo,...r,...e}}te();G();function re(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var lt="mfb:locationchange",er=!1;function Ao(){if(!(er||typeof history=="undefined")){er=!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(lt)),a}}}}function $e(e){return Ao(),window.addEventListener("popstate",e),window.addEventListener(lt,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(lt,e)}}G();var tr="mhosaic.boardView.";function rr(e){try{let t=localStorage.getItem(tr+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function or(e,t){try{localStorage.setItem(tr+e,JSON.stringify(t))}catch(r){}}function se(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),p=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let m=!1;try{m=await e()}catch(c){m=!1}r||(n=m?0:n+1,i=setTimeout(()=>{p()},l()))},d=()=>{r||!a||s!=null&&s.hidden||(a=!1,p())};return s==null||s.addEventListener("visibilitychange",d),p(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",d)}}}function ge(e,t){return e instanceof ve?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}G();te();te();var Mo=0;function o(e,t,r,a,n,i){t||(t={});var s,l,p=t;if("ref"in p)for(l in p={},t)l=="ref"?s=t[l]:p[l]=t[l];var d={type:e,props:p,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Mo,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)p[l]===void 0&&(p[l]=s[l]);return $.vnode&&$.vnode(d),d}var ar=/#(\d+)/g;function Ne(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;ar.lastIndex=0;let i;for(;(i=ar.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 nr({comment:e,strings:t,onOpenSeq:r}){let a=e.is_mine,n=!a&&e.author_source==="mcp",i=!a&&e.author_source==="system",s=n?"mcp":i?"system":"staff",l=s==="mcp"?"detail.author.mcp":s==="system"?"detail.author.system":"detail.author.staff",p=e.author_label||t[l];return o("div",{class:`comment-bubble ${a?"is-mine":"is-other"}`,children:[!a&&p&&o("div",{class:`comment-author comment-author--${s}`,children:p}),o("div",{class:"comment-body",children:Ne(e.body,r)}),o("div",{class:"comment-time",children:Lo(e.created_at)})]})}function Lo(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var zo=["image/png","image/jpeg","image/webp"];function ir(e){return zo.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function be(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 ct(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 Bo=3e4;function Ke({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l}){var z,N,j,U,V;let[p,d]=E(null),[m,c]=E(null),[g,f]=E(""),[R,S]=E(!1),[v,w]=E(!1),[b,h]=E(!1),y=W(!0),k=async()=>{try{let B=await e.getReport(r,t);return y.current&&(d(B),c(null)),!0}catch(B){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",B),!y.current)return!1;let O=ge(B,a);return c(O!=null?O:"load_failed"),!1}};D(()=>{y.current=!0;let B=se(k,Bo);return()=>{y.current=!1,B.stop()}},[r,t]);let P=async()=>{if(!(!g.trim()||R)){S(!0);try{let B=`${r}:${Date.now()}`,O=await e.addComment(r,t,g.trim(),B);if(!y.current)return;f(""),d(u=>u&&{...u,comments:Fo(u.comments,O)}),k()}catch(B){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",B),!y.current)return;c(a["detail.send_failed"])}finally{y.current&&S(!1)}}},x=async()=>{if(!(v||b)){w(!0);try{let B=await e.closeAsResolved(r,t);if(!y.current)return;d(B)}catch(B){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",B),!y.current)return;c(a["detail.close_failed"])}finally{y.current&&w(!1)}}},F=async()=>{if(!(v||b)){h(!0);try{let B=await e.reopenUnresolved(r,t);if(!y.current)return;d(B)}catch(B){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",B),!y.current)return;c(a["detail.reopen_failed"])}finally{y.current&&h(!1)}}};if(!p&&!m)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!p)return m&&m!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:m}),o("button",{type:"button",class:"btn",onClick:()=>{k()},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 L=(z=p.is_mine)!=null?z:i,I=(N=p.can_moderate)!=null?N:L,M=I&&p.status==="awaiting_validation",q=I;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--${p.status}`,children:(j=a[`status.${p.status}`])!=null?j:p.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--${p.status}`,children:(U=a[`status.${p.status}`])!=null?U:p.status})]}),o("div",{class:"report-detail-body",children:[o(Io,{detail:p,strings:a}),o("p",{class:"report-detail-description",children:Ne(p.description,l)}),((V=p.screenshots)!=null&&V.length?p.screenshots.map(B=>B.url):[p.screenshot_url]).filter(B=>!!B).map(B=>{let O=ct(B);return O?o("a",{class:"report-detail-screenshot",href:O,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:B,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:B,alt:"",loading:"lazy"})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),p.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:p.comments.map(B=>o("li",{children:o(nr,{comment:B,strings:a,...l&&{onOpenSeq:l}})}))}),p.status_history&&p.status_history.length>0&&o(jo,{rows:p.status_history,strings:a}),p.technical_context&&o(No,{ctx:p.technical_context,strings:a}),q?o("div",{class:"report-compose",children:[o("textarea",{value:g,placeholder:a["detail.compose_placeholder"],onInput:B=>f(B.target.value),disabled:R}),o("div",{class:"report-compose-actions",children:[M&&o("button",{type:"button",class:"btn",onClick:x,disabled:v||b,children:v?a["detail.close_busy"]:a["detail.close_cta"]}),M&&o("button",{type:"button",class:"btn btn--ghost",onClick:F,disabled:v||b,children:b?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:P,disabled:!g.trim()||R,children:R?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),m&&o("div",{class:"error",children:m})]})]})}function Fo(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function Io({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:sr(e.created_at)})]}),e.page_url&&(()=>{let i=ct(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:be(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:be(e.page_url,64)})]})})()]})}function sr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var Do=20,$o=15;function No({ctx:e,strings:t}){var d,m,c;let r=(d=e.errors)!=null?d:[],a=((m=e.consoleLogs)!=null?m:[]).slice(-Do),n=((c=e.networkRequests)!=null?c:[]).slice(-$o),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,p=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:p}),o("div",{class:"tech-body",children:[i&&o(Ko,{device:i,strings:t}),r.length>0&&o(Ho,{errors:r,strings:t}),a.length>0&&o(Oo,{logs:a,strings:t}),n.length>0&&o(Qo,{rows:n,strings:t})]})]})}function Ko({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(Y,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function Ho({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:Wo(r.stack)})]}))})]})}function Oo({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 Qo({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:be(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Wo(e){let t=e.split(`
618
+ `))}e.push(c)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function Dt(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,u=((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:u,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:u,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:ae(f)}),c}},()=>{window.fetch=r}}function $t(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 Ot(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?ae(n):void 0;e.push({message:ae(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(u){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?ae(s):void 0;e.push({message:ae(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 Ht(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:ge(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 he=class{constructor(t){ke(this,"max",t);ke(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 Nt(e={}){var b;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(b=e.sanitizeUrl)!=null?b:ge,i=new he(t),s=new he(r),l=new he(a),u=It(i),c=Dt(s,n),f=$t(s,n),d=Ot(l),p=Ht();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Ft(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){u(),c(),f(),d(),p.dispose()}}}var Fo={"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.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.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"},Io={"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.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.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"},Do={fr:Io};function $o(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=Do[t])!=null?r:null}function Kt(e,t={}){var a;let r=(a=$o(t.locale))!=null?a:{};return{...Fo,...r,...e}}ie();Z();function se(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var gt="mfb:locationchange",fr=!1;function Yo(){if(!(fr||typeof history=="undefined")){fr=!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(gt)),a}}}}function Qe(e){return Yo(),window.addEventListener("popstate",e),window.addEventListener(gt,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(gt,e)}}Z();var gr="mhosaic.boardView.";function br(e){try{let t=localStorage.getItem(gr+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function hr(e,t){try{localStorage.setItem(gr+e,JSON.stringify(t))}catch(r){}}function me(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),u=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let f=!1;try{f=await e()}catch(d){f=!1}r||(n=f?0:n+1,i=setTimeout(()=>{u()},l()))},c=()=>{r||!a||s!=null&&s.hidden||(a=!1,u())};return s==null||s.addEventListener("visibilitychange",c),u(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",c)}}}function xe(e,t){return e instanceof Se?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}Z();ie();ie();var Jo=0;function o(e,t,r,a,n,i){t||(t={});var s,l,u=t;if("ref"in u)for(l in u={},t)l=="ref"?s=t[l]:u[l]=t[l];var c={type:e,props:u,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Jo,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return H.vnode&&H.vnode(c),c}var vr=/#(\d+)/g;function We(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;vr.lastIndex=0;let i;for(;(i=vr.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 yr({comment:e,strings:t,onOpenSeq:r}){var f;let a=e.is_mine,n=!a&&e.author_source==="mcp",i=!a&&e.author_source==="system",s=n?"mcp":i?"system":"staff",l=s==="mcp"?"detail.author.mcp":s==="system"?"detail.author.system":"detail.author.staff",u=e.author_label||t[l],c=((f=e.attachments)!=null?f:[]).filter(d=>d.url);return o("div",{class:`comment-bubble ${a?"is-mine":"is-other"}`,children:[!a&&u&&o("div",{class:`comment-author comment-author--${s}`,children:u}),e.body&&o("div",{class:"comment-body",children:We(e.body,r)}),c.length>0&&o("div",{class:"comment-attachments",children:c.map(d=>o("a",{class:"comment-attachment",href:d.url,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:d.url,alt:t["detail.attachment_alt"],loading:"lazy"})},d.id))}),o("div",{class:"comment-time",children:Zo(e.created_at)})]})}function Zo(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var ea=["image/png","image/jpeg","image/webp"];function Ue(e){return ea.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function we(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 bt(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 ta=3e4;function Ve({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l,buildPermalink:u}){var qt,Et,Pt,Tt,At;let[c,f]=P(null),[d,p]=P(null),[b,v]=P(!1),[C,h]=P(!1),[x,R]=P(""),[y,_]=P(!1),[g,q]=P(!1),[k,F]=P(""),[E,B]=P(!1),[$,T]=P(!1),[D,M]=P(!1),[I,K]=P([]),[X,J]=P(""),Y=Q(null),m=Q(!0),S=Q(I);S.current=I,O(()=>()=>S.current.forEach(L=>URL.revokeObjectURL(L.preview)),[]);let A=L=>{J("");let j=5-I.length,oe=L.slice(0,Math.max(0,j));for(let G of oe){let ne=Ue(G);if(ne){J(ne.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(ne.maxMb)));return}}if(oe.length){let G=oe.map(ne=>({blob:ne,preview:URL.createObjectURL(ne)}));K(ne=>[...ne,...G])}L.length>oe.length&&J(a["form.screenshot.error_count"].replace("{max}",String(5)))},z=L=>{var G;let j=L.target,oe=Array.from((G=j.files)!=null?G:[]);oe.length&&A(oe),j.value=""},N=L=>{let j=I[L];j&&URL.revokeObjectURL(j.preview),K(oe=>oe.filter((G,ne)=>ne!==L)),J("")},V=async()=>{try{let L=await e.getReport(r,t);return m.current&&(f(L),p(null)),!0}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",L),!m.current)return!1;let j=xe(L,a);return p(j!=null?j:"load_failed"),!1}};O(()=>{m.current=!0;let L=me(V,ta);return()=>{m.current=!1,L.stop()}},[r,t]);let pe=async()=>{if(!(!k.trim()&&I.length===0||E)){B(!0);try{let L=`${r}:${Date.now()}`,j=I.map(G=>G.blob),oe=await e.addComment(r,t,k.trim(),L,j.length?j:void 0);if(!m.current)return;F(""),I.forEach(G=>URL.revokeObjectURL(G.preview)),K([]),J(""),f(G=>G&&{...G,comments:ra(G.comments,oe)}),V()}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",L),!m.current)return;p(a["detail.send_failed"])}finally{m.current&&B(!1)}}},go=async()=>{if(!(!u||!c))try{if(await navigator.clipboard.writeText(u(c.id)),!m.current)return;v(!0),setTimeout(()=>{m.current&&v(!1)},2e3)}catch(L){}},bo=()=>{c&&(R(c.description),q(!1),h(!0))},ho=()=>{h(!1),q(!1)},vo=async()=>{if(!c||y)return;let L=x.trim();if(L){_(!0),q(!1);try{let j=await e.editDescription(r,t,L);if(!m.current)return;f(j),h(!1)}catch(j){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",j),!m.current)return;q(!0)}finally{m.current&&_(!1)}}},yo=async()=>{if(!($||D)){T(!0);try{let L=await e.closeAsResolved(r,t);if(!m.current)return;f(L)}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",L),!m.current)return;p(a["detail.close_failed"])}finally{m.current&&T(!1)}}},_o=async()=>{if(!($||D)){M(!0);try{let L=await e.reopenUnresolved(r,t);if(!m.current)return;f(L)}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",L),!m.current)return;p(a["detail.reopen_failed"])}finally{m.current&&M(!1)}}};if(!c&&!d)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!c)return d&&d!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:d}),o("button",{type:"button",class:"btn",onClick:()=>{V()},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 St=(qt=c.is_mine)!=null?qt:i,Ct=(Et=c.can_moderate)!=null?Et:St,Rt=Ct&&c.status==="awaiting_validation",xo=Ct;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--${c.status}`,children:(Pt=a[`status.${c.status}`])!=null?Pt:c.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${c.status}`,children:(Tt=a[`status.${c.status}`])!=null?Tt:c.status})]}),o("div",{class:"report-detail-body",children:[o(oa,{detail:c,strings:a}),C?o("div",{class:"report-detail-edit",children:[o("textarea",{class:"report-detail-edit-input",value:x,onInput:L=>{R(L.target.value),q(!1)},disabled:y}),g&&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:ho,disabled:y,children:a["detail.edit_cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:vo,disabled:y||!x.trim(),children:y?a["detail.edit_saving"]:a["detail.edit_save"]})]})]}):o("div",{class:"report-detail-description-row",children:[o("p",{class:"report-detail-description",children:We(c.description,l)}),St&&o("button",{type:"button",class:"btn btn--ghost report-detail-edit",onClick:bo,children:a["detail.edit"]})]}),u&&o("div",{class:"report-detail-permalink",children:o("button",{type:"button",class:"btn btn--ghost report-detail-copy-link",onClick:go,children:b?a["detail.copied"]:a["detail.copy_link"]})}),((At=c.screenshots)!=null&&At.length?c.screenshots.map(L=>L.url):[c.screenshot_url]).filter(L=>!!L).map(L=>{let j=bt(L);return j?o("a",{class:"report-detail-screenshot",href:j,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:L,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:L,alt:"",loading:"lazy"})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),c.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:c.comments.map(L=>o("li",{children:o(yr,{comment:L,strings:a,...l&&{onOpenSeq:l}})}))}),c.status_history&&c.status_history.length>0&&o(ua,{rows:c.status_history,strings:a}),c.technical_context&&o(ia,{ctx:c.technical_context,strings:a}),xo?o("div",{class:"report-compose",children:[o("textarea",{value:k,placeholder:a["detail.compose_placeholder"],onInput:L=>F(L.target.value),disabled:E}),I.length>0&&o("div",{class:"compose-attachments",children:I.map((L,j)=>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:()=>N(j),disabled:E,children:"\xD7"})]},L.preview))}),X&&o("p",{class:"compose-attach-error",role:"alert",children:X}),o("input",{ref:Y,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"compose-attach-input",onChange:z,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=Y.current)==null?void 0:L.click()},disabled:E||I.length>=5,children:a["detail.attach_add"]}),Rt&&o("button",{type:"button",class:"btn",onClick:yo,disabled:$||D,children:$?a["detail.close_busy"]:a["detail.close_cta"]}),Rt&&o("button",{type:"button",class:"btn btn--ghost",onClick:_o,disabled:$||D,children:D?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:pe,disabled:!k.trim()&&I.length===0||E,children:E?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),d&&o("div",{class:"error",children:d})]})]})}function ra(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function oa({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:_r(e.created_at)})]}),e.page_url&&(()=>{let i=bt(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:we(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:we(e.page_url,64)})]})})()]})}function _r(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var aa=20,na=15;function ia({ctx:e,strings:t}){var c,f,d;let r=(c=e.errors)!=null?c:[],a=((f=e.consoleLogs)!=null?f:[]).slice(-aa),n=((d=e.networkRequests)!=null?d:[]).slice(-na),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,u=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:u}),o("div",{class:"tech-body",children:[i&&o(sa,{device:i,strings:t}),r.length>0&&o(la,{errors:r,strings:t}),a.length>0&&o(ca,{logs:a,strings:t}),n.length>0&&o(da,{rows:n,strings:t})]})]})}function sa({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(ee,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function la({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:pa(r.stack)})]}))})]})}function ca({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 da({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:we(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function pa(e){let t=e.split(`
619
619
  `);return t.length<=12?e:t.slice(0,12).join(`
620
620
  `)+`
621
- \u2026`}function jo({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:sr(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 Uo=3e4,Vo=["recent","oldest","updated","severity","status"],Go=["new","in_progress","awaiting_validation","closed","rejected"],Yo=["bug","feature","question","praise","typo"],Xo=["blocker","high","medium","low"];function cr({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var M;let[i,s]=E(()=>rr(t)),[l,p]=E(!0);D(()=>{or(t,i)},[t,lr(i)]);let[d,m]=E(null),[c,g]=E(null),[f,R]=E(!0),[S,v]=E(null),[w,b]=E(n!=null?n:null),[h,y]=E(0),[k,P]=E(0),x=Z(()=>{var q,z,N,j,U,V;return((z=(q=i.status)==null?void 0:q.length)!=null?z:0)+((j=(N=i.type)==null?void 0:N.length)!=null?j:0)+((V=(U=i.severity)==null?void 0:U.length)!=null?V:0)+(i.q?1:0)+(i.mine?1:0)},[i]);D(()=>{if(l)return $e(()=>P(q=>q+1))},[l]);let F=Z(()=>{var z;let q=!!((z=i.q)!=null&&z.trim());return l&&!q?{...i,pagePath:re(a!==void 0?{getCurrentPage:a}:{})}:i},[lr(i),l,k]);D(()=>{let q=!1;R(!0);let z=se(async()=>{var N;try{let[j,U]=await Promise.all([e.listBoard(t,F),e.fetchBoardKpis(t,F)]);return q||(m(j),g(U),v(null)),!0}catch(j){return q||v((N=ge(j,r))!=null?N:r["board.list.error"]),!1}finally{q||R(!1)}},Uo);return()=>{q=!0,z.stop()}},[e,t,JSON.stringify(F)]);let L=Z(()=>{var q;return!w||!d?null:(q=d.results.find(z=>z.id===w))!=null?q:null},[w,d]),I=q=>{b(q.id),y(z=>z+1)};return o("div",{class:"board-view",children:[o(Jo,{strings:r,kpis:c,thisPage:l}),o(ea,{filters:i,onChange:s,activeCount:x,strings:r,thisPage:l,onToggleThisPage:()=>p(q=>!q)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":f&&!d,children:[S&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:S}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{v(null),R(!0),P(q=>q+1)},children:r["board.retry"]})]}),!S&&f&&!d&&o(aa,{}),!S&&d&&d.results.length===0&&!f&&o(oa,{strings:r,thisPage:l,onAllPages:()=>p(!1)}),!S&&d&&d.results.length>0&&o(ta,{rows:d.results,selectedId:w,onPick:I,strings:r,total:d.count,thisPage:l})]}),o("div",{class:`board-detail-wrap ${L?"has-selection":""}`,children:L?o(Ke,{api:e,externalId:t,reportId:L.id,strings:r,onBack:()=>b(null),canModerate:(M=L.can_moderate)!=null?M:L.is_mine,variant:"board",onOpenSeq:q=>{e.getReportBySeq(q,t).then(z=>{b(z.id),y(N=>N+1)}).catch(()=>{})}},h):o("div",{class:"board-detail-empty",children:[o(la,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Jo({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(Zo,{kpis:t,strings:e})]})}function Zo({kpis:e,strings:t}){var a,n,i,s,l,p;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((p=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?p: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 ea({filters:e,onChange:t,activeCount:r,strings:a,thisPage:n,onToggleThisPage:i}){var f,R,S,v,w,b,h,y;let s=k=>{if(k===""){let{status:P,...x}=e;t(x)}else t({...e,status:[k]})},l=k=>{if(k===""){let{type:P,...x}=e;t(x)}else t({...e,type:[k]})},p=k=>{if(k===""){let{severity:P,...x}=e;t(x)}else t({...e,severity:[k]})},d=k=>t({...e,ordering:k}),m=k=>t({...e,q:k}),c=()=>{if(e.mine){let{mine:k,...P}=e;t(P)}else t({...e,mine:!0})},g=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":a["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${n?"is-active":""}`,"aria-pressed":n,onClick:()=>!n&&i(),children:a["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${n?"":"is-active"}`,"aria-pressed":!n,onClick:()=>n&&i(),children:a["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":a["board.sort"],value:(f=e.ordering)!=null?f:"recent",onChange:k=>d(k.target.value),children:Vo.map(k=>o("option",{value:k,children:a[`board.sort.${k}`]},k))}),o("select",{class:"board-filter-select","aria-label":a["board.filter.status"],value:(S=(R=e.status)==null?void 0:R[0])!=null?S:"",onChange:k=>s(k.target.value),children:[o("option",{value:"",children:a["board.filter.status"]}),Go.map(k=>{var P;return o("option",{value:k,children:(P=a[`board.kpi.${k}`])!=null?P:k},k)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.type"],value:(w=(v=e.type)==null?void 0:v[0])!=null?w:"",onChange:k=>l(k.target.value),children:[o("option",{value:"",children:a["board.filter.type"]}),Yo.map(k=>{var P;return o("option",{value:k,children:(P=a[`type.${k}`])!=null?P:k},k)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.severity"],value:(h=(b=e.severity)==null?void 0:b[0])!=null?h:"",onChange:k=>p(k.target.value),children:[o("option",{value:"",children:a["board.filter.severity"]}),Xo.map(k=>{var P;return o("option",{value:k,children:(P=a[`severity.${k}`])!=null?P:k},k)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:a["board.filter.search.placeholder"],value:(y=e.q)!=null?y:"",onInput:k=>m(k.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:c}),o("span",{children:a["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:g,children:[o(ia,{}),a["board.filter.clear"]]})]})}function ta({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(Y,{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(ra,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function ra({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(na,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:ca(e.created_at)})]})]})})}function oa({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(sa,{}),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 aa(){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 na(){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 ia(){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 sa(){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 la(){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 lr(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 ca(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`}G();function da(e){return`pill pill-status pill-status--${e}`}function pa(e){return`pill pill-severity pill-severity--${e}`}function ua(){return"pill pill-type"}function fa(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 ma(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function He({row:e,strings:t,onClick:r}){var n;let a=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:da(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:ua(),children:t[`type.${e.feedback_type}`]}),o("span",{class:pa(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:a}),o("div",{class:"mine-row-meta",children:[o("span",{children:fa(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",ma(e.comment_count,t)]})]})]})}var ga=3e4;function ba(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 ha(e){let t=new Map;for(let r of e){let a=ba(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:va(r),rows:a}))}function va(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function dr({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=E(null),[s,l]=E(null),[p,d]=E(!1),m=W(!0),c=async()=>{d(!0),l(null);try{let S=await e.listChangelog(t);return m.current&&i(S),!0}catch(S){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",S),m.current&&l(r["mine.error"]),!1}finally{m.current&&d(!1)}};D(()=>{m.current=!0;let S=se(c,ga);return()=>{m.current=!1,S.stop()}},[t]);let g=Z(()=>n?ha(n):[],[n]),f=n===null&&!s,R=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:()=>{c()},disabled:p,children:p?r["mine.loading"]:r["mine.refresh"]})]}),f&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),R&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),g.length>0&&o("div",{class:"changelog-groups",children:g.map(S=>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}",S.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[S.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(S.rows.length))})]}),o("ul",{class:"mine-rows",children:S.rows.map(v=>o("li",{children:o(He,{row:v,strings:r,onClick:()=>a(v)})}))})]},S.weekKey))})]})}function ya(){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 pr({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o(ya,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}G();G();var ur=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],_a=.35;function fr(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")xa(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=_a,e.fillRect(Oe(t.x,t.w),Oe(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&wa(e,t,r);e.restore()}function Oe(e,t){return t<0?e+t:e}function xa(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 wa(e,t,r){if(!r)return;let a=Oe(t.x,t.w),n=Oe(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 p=n;p<n+s;p+=l)for(let d=a;d<a+i;d+=l){let m=Math.min(l,a+i-d),c=Math.min(l,n+s-p);e.drawImage(r,d,p,m,c,d,p,m,c)}e.imageSmoothingEnabled=!1;for(let p=n;p<n+s;p+=l)for(let d=a;d<a+i;d+=l){let m=Math.min(l,a+i-d),c=Math.min(l,n+s-p);e.drawImage(r,d,p,1,1,d,p,m,c)}e.imageSmoothingEnabled=!0}var oe={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 mr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=W(null),i=W(null),s=W(null),[l,p]=E("rectangle"),[d,m]=E(ur[0]),[c,g]=E([]),[f,R]=E([]),[S,v]=E([]),w=W(!1),[b,h]=E(null),[y,k]=E(!1),[P,x]=E(!1),F=W(1);function L(u){g(C=>(R(T=>[...T,C]),[...C,u])),v([])}function I(){g(u=>(R(C=>[...C,u]),[])),v([])}function M(){R(u=>{if(u.length===0)return u;let C=u[u.length-1];return g(T=>(v(A=>[T,...A]),C)),u.slice(0,-1)})}function q(){v(u=>{if(u.length===0)return u;let C=u[0];return g(T=>(R(A=>[...A,T]),C)),u.slice(1)})}it(()=>{let u=C=>{C.key==="Escape"&&(C.stopPropagation(),a())};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[a]),D(()=>{let u=C=>{if(!(C.metaKey||C.ctrlKey))return;let A=C.key.toLowerCase();A==="z"?(C.preventDefault(),C.stopPropagation(),C.shiftKey?q():M()):A==="y"&&(C.preventDefault(),C.stopPropagation(),q())};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[f,S,c]),D(()=>{let u=URL.createObjectURL(e),C=new Image;return C.onload=()=>{s.current=C,k(!0)},C.src=u,()=>URL.revokeObjectURL(u)},[e]),it(()=>{if(!y||!n.current||!s.current||!i.current)return;let u=s.current,T=i.current.clientWidth-16,A=window.innerHeight*.65,K=Math.min(T/u.width,A/u.height,1);F.current=K;let X=n.current;X.width=u.width,X.height=u.height,X.style.width=`${u.width*K}px`,X.style.height=`${u.height*K}px`,z()},[y]),D(()=>{z()},[c,b]);function z(){let u=n.current,C=s.current;if(!u||!C)return;let T=u.getContext("2d");if(T){T.clearRect(0,0,u.width,u.height),T.drawImage(C,0,0);for(let A of c)fr(T,A,C);b&&fr(T,b,C)}}function N(u){let T=n.current.getBoundingClientRect();return{x:(u.clientX-T.left)/F.current,y:(u.clientY-T.top)/F.current}}let j=u=>{if(!y)return;let{x:C,y:T}=N(u),A=n.current.width,K=Math.max(3,Math.round(A/400)),X=Math.max(8,Math.round(A/80));if(l==="text"){let de=window.prompt(t["annotator.text_prompt"]);de&&de.trim()&&L({kind:"text",x:C,y:T,text:de.trim(),color:d,fontSize:Math.max(16,Math.round(A/50)),lineWidth:1});return}w.current=!0,l==="rectangle"?h({kind:"rectangle",x:C,y:T,w:0,h:0,color:d,lineWidth:K}):l==="arrow"?h({kind:"arrow",x1:C,y1:T,x2:C,y2:T,color:d,lineWidth:K}):l==="freehand"?h({kind:"freehand",points:[{x:C,y:T}],color:d,lineWidth:K}):l==="highlight"?h({kind:"highlight",x:C,y:T,w:0,h:0,color:d==="#ffffff"?"#fde047":d,lineWidth:1}):l==="blur"&&h({kind:"blur",x:C,y:T,w:0,h:0,color:"#000000",lineWidth:0,tile:X})},U=u=>{if(!w.current)return;let{x:C,y:T}=N(u);h(A=>A&&(A.kind==="rectangle"||A.kind==="highlight"||A.kind==="blur"?{...A,w:C-A.x,h:T-A.y}:A.kind==="arrow"?{...A,x2:C,y2:T}:A.kind==="freehand"?{...A,points:[...A.points,{x:C,y:T}]}:A))},V=()=>{h(u=>(w.current&&u&&((u.kind==="rectangle"||u.kind==="highlight"||u.kind==="blur")&&Math.abs(u.w)<4&&Math.abs(u.h)<4||u.kind==="arrow"&&Math.hypot(u.x2-u.x1,u.y2-u.y1)<4||u.kind==="freehand"&&u.points.length<3||L(u)),null)),w.current=!1},B=async()=>{let u=n.current;if(u){x(!0);try{let C=await new Promise(T=>u.toBlob(T,"image/png",.92));C&&r(C)}finally{x(!1)}}},O=[{id:"rectangle",icon:oe.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:oe.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:oe.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:oe.text,label:t["annotator.tool.text"]},{id:"highlight",icon:oe.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:oe.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:u=>{u.target===u.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:oe.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:O.map(u=>o("button",{type:"button",onClick:()=>p(u.id),title:u.label,"aria-label":u.label,"aria-pressed":l===u.id,class:`annotator-tool ${l===u.id?"is-active":""}`,children:u.icon},u.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[ur.map(u=>o("button",{type:"button",onClick:()=>m(u),"aria-label":u,"aria-pressed":d===u,class:`annotator-color ${d===u?"is-active":""}`,style:{backgroundColor:u}},u)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:d,onInput:u=>m(u.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:M,disabled:f.length===0,title:t["annotator.undo"],children:[oe.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:q,disabled:S.length===0,title:t["annotator.redo"],children:[oe.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:I,disabled:c.length===0,children:[oe.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[c.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:y?o("canvas",{ref:n,onMouseDown:j,onMouseMove:U,onMouseUp:V,onMouseLeave:V,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:B,disabled:P||!y,children:P?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var ka=["bug","feature","question","praise","typo"],Sa=["blocker","high","medium","low"];function gr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,p]=E(""),[d,m]=E("bug"),[c,g]=E("medium"),[f,R]=E(""),[S,v]=E([]),[w,b]=E(!1),[h,y]=E(null),k=W(null),P=W(null),x=a==="submitting",F=x?e["form.submitting"]:e["form.submit"],L=typeof window!="undefined"?window.location.href:"",I=l.trim()!==""||S.length>0;D(()=>{s==null||s(I)},[I]);let M=W(S);M.current=S,D(()=>()=>{M.current.forEach(u=>URL.revokeObjectURL(u.preview))},[]);let q=u=>{R("");let C=5-S.length,T=u.slice(0,Math.max(0,C));for(let A of T)if(A instanceof File){let K=ir(A);if(K){R(K.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(K.maxMb)));return}}if(T.length){let A=T.map(K=>({blob:K,preview:URL.createObjectURL(K)}));v(K=>[...K,...A])}u.length>T.length&&R(e["form.screenshot.error_count"].replace("{max}",String(5)))},z=u=>{let C=S[u];C&&URL.revokeObjectURL(C.preview),v(T=>T.filter((A,K)=>K!==u)),R(""),k.current&&(k.current.value="")},N=u=>{var A;let C=u.target,T=Array.from((A=C.files)!=null?A:[]);T.length&&q(T),C.value=""},j=u=>{u.preventDefault(),u.stopPropagation(),b(!0)},U=u=>{u.preventDefault(),u.stopPropagation(),u.currentTarget===u.target&&b(!1)},V=u=>{var T,A;u.preventDefault(),u.stopPropagation(),b(!1);let C=Array.from((A=(T=u.dataTransfer)==null?void 0:T.files)!=null?A:[]);C.length&&q(C)};D(()=>{let u=P.current;if(!u)return;let C=T=>{var K;let A=(K=T.clipboardData)==null?void 0:K.items;if(A){for(let X of Array.from(A))if(X.kind==="file"&&X.type.startsWith("image/")){let de=X.getAsFile();if(de){T.preventDefault(),q([de]);return}}}};return u.addEventListener("paste",C),()=>u.removeEventListener("paste",C)},[S.length]);let B=u=>{let C=h;if(C===null||!S[C]){y(null);return}URL.revokeObjectURL(S[C].preview);let T={blob:u,preview:URL.createObjectURL(u)};v(A=>A.map((K,X)=>X===C?T:K)),y(null)};return o("form",{onSubmit:u=>{if(u.preventDefault(),!l.trim()){R(e["form.description.required"]);return}R("");let C={description:l.trim(),feedback_type:d,severity:c};S.length&&(C.screenshots=S.map(T=>T.blob),C.capture_method="manual"),t(C)},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:u=>p(u.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:u=>m(u.target.value),children:ka.map(u=>o("option",{value:u,children:e[`type.${u}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:u=>g(u.target.value),children:Sa.map(u=>o("option",{value:u,children:e[`severity.${u}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:k,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"mfb-sr-only",onChange:N,"aria-hidden":"true",tabIndex:-1}),S.length>0&&o("div",{class:"screenshot-strip",children:S.map((u,C)=>o("div",{class:"screenshot-preview",children:[o("img",{src:u.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>y(C),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:()=>z(C),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"]]})]})]},u.preview))}),S.length<5&&o("div",{ref:P,class:`screenshot-dropzone ${w?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var u;return(u=k.current)==null?void 0:u.click()},onKeyDown:u=>{var C;(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),(C=k.current)==null||C.click())},onDragOver:j,onDragLeave:U,onDrop:V,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"]})]})]}),L&&o("div",{class:"page-context",title:L,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:be(L,90)})]}),o("div",{class:"capture-notice",children:e["form.capture.notice"]}),f&&o("div",{class:"error",children:f}),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:x,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:x,children:F})]}),h!==null&&S[h]&&o(mr,{imageBlob:S[h].blob,strings:e,onCancel:()=>y(null),onSave:B})]})}G();function Ca(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 Ra(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var qa={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function br(e,t){return t==="all"?e:e.filter(r=>qa[r.status]===t)}function hr({rows:e,filter:t,onFilter:r,strings:a}){let n=Ca(e),i=Ra(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 p=t===l.key,d=p?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${p?" is-active":""}`,onClick:()=>r(d),"aria-pressed":p,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var Pa=3e4;function vr({api:e,externalId:t,strings:r,onSelect:a}){var b;let[n,i]=E(null),[s,l]=E(null),[p,d]=E(!1),[m,c]=E("all"),g=W(!0),f=async()=>{var h;d(!0),l(null);try{let y=await e.listMine(t);return g.current&&i(y),!0}catch(y){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",y),g.current&&l((h=ge(y,r))!=null?h:r["mine.error"]),!1}finally{g.current&&d(!1)}};D(()=>{g.current=!0;let h=se(f,Pa);return()=>{g.current=!1,h.stop()}},[t]);let R=n!==null&&n.length===0,S=n===null&&!s,v=n?br(n,m):null,w=!!n&&n.length>0&&((b=v==null?void 0:v.length)!=null?b:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{f()},disabled:p,children:p?r["mine.loading"]:r["mine.refresh"]})]}),n&&n.length>0&&o(hr,{rows:n,filter:m,onFilter:c,strings:r}),S&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),R&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),w&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),v&&v.length>0&&o("ul",{class:"mine-rows",children:v.map(h=>o("li",{children:o(He,{row:h,strings:r,onClick:()=>a(h)})}))})]})}G();function yr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=W(null),i=W(null);return D(()=>{var p;i.current=document.activeElement;let s=d=>{var c;if(d.key!=="Escape")return;let m=(c=n.current)==null?void 0:c.getRootNode();m instanceof ShadowRoot&&m.querySelector(".annotator-backdrop")||(d.stopPropagation(),e("escape"))};window.addEventListener("keydown",s);let l=(p=n.current)==null?void 0:p.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 _r({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"]})]})}G();function xr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[p,d]=E(null),[m,c]=E(!1);return D(()=>{let g=!1,f=re(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:f,status:["new","in_progress","awaiting_validation"]}).then(R=>{g||d(R.results.slice(0,5))}).catch(()=>{g||c(!0)}),()=>{g=!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"]}),p===null&&!m&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),p!==null&&p.map(g=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(g.id),children:[o("span",{class:`page-peek-dot status-${g.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:g.description})]},g.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"]})]})]})}G();var Ea=6e4;function Ta(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 ut=new Map,pt=new Map;function Aa(){ut.clear()}function Ma(e,t,r){let a=`${t}|${r}`,n=ut.get(a);if(n&&Date.now()-n.fetchedAt<Ea)return Promise.resolve(n.open);let i=pt.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>{let p=Ta(l);return ut.set(a,{open:p,fetchedAt:Date.now()}),p}).finally(()=>pt.delete(a));return pt.set(a,s),s}function wr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=E(0),[l,p]=E(0),d=ne(()=>{Aa(),p(m=>m+1)},[]);return D(()=>{if(!n||!t||!r){s(0);return}let m=!1,c=()=>{let f=re(a!==void 0?{getCurrentPage:a}:{});Ma(t,r,f).then(R=>{m||s(R)}).catch(()=>{m||s(0)})};c();let g=$e(c);return()=>{m=!0,g()}},[t,r,n,l]),{open:i,refresh:d}}var kr=`
621
+ \u2026`}function ua({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:_r(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 ma=3e4,fa=["recent","oldest","updated","severity","status"],ga=["new","in_progress","awaiting_validation","closed","rejected"],ba=["bug","feature","question","praise","typo"],ha=["blocker","high","medium","low"];function wr({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var $;let[i,s]=P(()=>br(t)),[l,u]=P(!0);O(()=>{hr(t,i)},[t,xr(i)]);let[c,f]=P(null),[d,p]=P(null),[b,v]=P(!0),[C,h]=P(null),[x,R]=P(n!=null?n:null),[y,_]=P(0),[g,q]=P(0),k=re(()=>{var T,D,M,I,K,X;return((D=(T=i.status)==null?void 0:T.length)!=null?D:0)+((I=(M=i.type)==null?void 0:M.length)!=null?I:0)+((X=(K=i.severity)==null?void 0:K.length)!=null?X:0)+(i.q?1:0)+(i.mine?1:0)},[i]);O(()=>{if(l)return Qe(()=>q(T=>T+1))},[l]);let F=re(()=>{var D;let T=!!((D=i.q)!=null&&D.trim());return l&&!T?{...i,pagePath:se(a!==void 0?{getCurrentPage:a}:{})}:i},[xr(i),l,g]);O(()=>{let T=!1;v(!0);let D=me(async()=>{var M;try{let[I,K]=await Promise.all([e.listBoard(t,F),e.fetchBoardKpis(t,F)]);return T||(f(I),p(K),h(null)),!0}catch(I){return T||h((M=xe(I,r))!=null?M:r["board.list.error"]),!1}finally{T||v(!1)}},ma);return()=>{T=!0,D.stop()}},[e,t,JSON.stringify(F)]);let E=re(()=>{var T;return!x||!c?null:(T=c.results.find(D=>D.id===x))!=null?T:null},[x,c]),B=T=>{R(T.id),_(D=>D+1)};return o("div",{class:"board-view",children:[o(va,{strings:r,kpis:d,thisPage:l}),o(_a,{filters:i,onChange:s,activeCount:k,strings:r,thisPage:l,onToggleThisPage:()=>u(T=>!T)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":b&&!c,children:[C&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:C}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{h(null),v(!0),q(T=>T+1)},children:r["board.retry"]})]}),!C&&b&&!c&&o(Sa,{}),!C&&c&&c.results.length===0&&!b&&o(ka,{strings:r,thisPage:l,onAllPages:()=>u(!1)}),!C&&c&&c.results.length>0&&o(xa,{rows:c.results,selectedId:x,onPick:B,strings:r,total:c.count,thisPage:l})]}),o("div",{class:`board-detail-wrap ${E?"has-selection":""}`,children:E?o(Ve,{api:e,externalId:t,reportId:E.id,strings:r,onBack:()=>R(null),canModerate:($=E.can_moderate)!=null?$:E.is_mine,variant:"board",onOpenSeq:T=>{e.getReportBySeq(T,t).then(D=>{R(D.id),_(M=>M+1)}).catch(()=>{})}},y):o("div",{class:"board-detail-empty",children:[o(Ea,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function va({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(ya,{kpis:t,strings:e})]})}function ya({kpis:e,strings:t}){var a,n,i,s,l,u;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((u=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?u: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 _a({filters:e,onChange:t,activeCount:r,strings:a,thisPage:n,onToggleThisPage:i}){var b,v,C,h,x,R,y,_;let s=g=>{if(g===""){let{status:q,...k}=e;t(k)}else t({...e,status:[g]})},l=g=>{if(g===""){let{type:q,...k}=e;t(k)}else t({...e,type:[g]})},u=g=>{if(g===""){let{severity:q,...k}=e;t(k)}else t({...e,severity:[g]})},c=g=>t({...e,ordering:g}),f=g=>t({...e,q:g}),d=()=>{if(e.mine){let{mine:g,...q}=e;t(q)}else t({...e,mine:!0})},p=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":a["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${n?"is-active":""}`,"aria-pressed":n,onClick:()=>!n&&i(),children:a["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${n?"":"is-active"}`,"aria-pressed":!n,onClick:()=>n&&i(),children:a["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":a["board.sort"],value:(b=e.ordering)!=null?b:"recent",onChange:g=>c(g.target.value),children:fa.map(g=>o("option",{value:g,children:a[`board.sort.${g}`]},g))}),o("select",{class:"board-filter-select","aria-label":a["board.filter.status"],value:(C=(v=e.status)==null?void 0:v[0])!=null?C:"",onChange:g=>s(g.target.value),children:[o("option",{value:"",children:a["board.filter.status"]}),ga.map(g=>{var q;return o("option",{value:g,children:(q=a[`board.kpi.${g}`])!=null?q:g},g)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.type"],value:(x=(h=e.type)==null?void 0:h[0])!=null?x:"",onChange:g=>l(g.target.value),children:[o("option",{value:"",children:a["board.filter.type"]}),ba.map(g=>{var q;return o("option",{value:g,children:(q=a[`type.${g}`])!=null?q:g},g)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.severity"],value:(y=(R=e.severity)==null?void 0:R[0])!=null?y:"",onChange:g=>u(g.target.value),children:[o("option",{value:"",children:a["board.filter.severity"]}),ha.map(g=>{var q;return o("option",{value:g,children:(q=a[`severity.${g}`])!=null?q:g},g)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:a["board.filter.search.placeholder"],value:(_=e.q)!=null?_:"",onInput:g=>f(g.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:d}),o("span",{children:a["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:p,children:[o(Ra,{}),a["board.filter.clear"]]})]})}function xa({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(ee,{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(Ca,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Pa(e.created_at)})]})]})})}function ka({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(qa,{}),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 Sa(){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 Ca(){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 Ra(){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 qa(){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 Ea(){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 xr(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 Pa(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`}Z();function Ta(e){return`pill pill-status pill-status--${e}`}function Aa(e){return`pill pill-severity pill-severity--${e}`}function Ma(){return"pill pill-type"}function La(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 za(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function Ge({row:e,strings:t,onClick:r}){var n;let a=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:Ta(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:Ma(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Aa(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:a}),o("div",{class:"mine-row-meta",children:[o("span",{children:La(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",za(e.comment_count,t)]})]})]})}var Ba=3e4;function Fa(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 Ia(e){let t=new Map;for(let r of e){let a=Fa(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:Da(r),rows:a}))}function Da(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function kr({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=P(null),[s,l]=P(null),[u,c]=P(!1),f=Q(!0),d=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)}};O(()=>{f.current=!0;let C=me(d,Ba);return()=>{f.current=!1,C.stop()}},[t]);let p=re(()=>n?Ia(n):[],[n]),b=n===null&&!s,v=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:()=>{d()},disabled:u,children:u?r["mine.loading"]:r["mine.refresh"]})]}),b&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),v&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),p.length>0&&o("div",{class:"changelog-groups",children:p.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(h=>o("li",{children:o(Ge,{row:h,strings:r,onClick:()=>a(h)})}))})]},C.weekKey))})]})}function $a(){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 Sr({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o($a,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}Z();Z();var Cr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],Oa=.35;function Rr(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")Ha(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=Oa,e.fillRect(Xe(t.x,t.w),Xe(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&Na(e,t,r);e.restore()}function Xe(e,t){return t<0?e+t:e}function Ha(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 Na(e,t,r){if(!r)return;let a=Xe(t.x,t.w),n=Xe(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,f,d,c,u,f,d)}e.imageSmoothingEnabled=!1;for(let u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,1,1,c,u,f,d)}e.imageSmoothingEnabled=!0}var le={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 qr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=Q(null),i=Q(null),s=Q(null),[l,u]=P("rectangle"),[c,f]=P(Cr[0]),[d,p]=P([]),[b,v]=P([]),[C,h]=P([]),x=Q(!1),[R,y]=P(null),[_,g]=P(!1),[q,k]=P(!1),F=Q(1);function E(m){p(S=>(v(A=>[...A,S]),[...S,m])),h([])}function B(){p(m=>(v(S=>[...S,m]),[])),h([])}function $(){v(m=>{if(m.length===0)return m;let S=m[m.length-1];return p(A=>(h(z=>[A,...z]),S)),m.slice(0,-1)})}function T(){h(m=>{if(m.length===0)return m;let S=m[0];return p(A=>(v(z=>[...z,A]),S)),m.slice(1)})}mt(()=>{let m=S=>{S.key==="Escape"&&(S.stopPropagation(),a())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[a]),O(()=>{let m=S=>{if(!(S.metaKey||S.ctrlKey))return;let z=S.key.toLowerCase();z==="z"?(S.preventDefault(),S.stopPropagation(),S.shiftKey?T():$()):z==="y"&&(S.preventDefault(),S.stopPropagation(),T())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[b,C,d]),O(()=>{let m=URL.createObjectURL(e),S=new Image;return S.onload=()=>{s.current=S,g(!0)},S.src=m,()=>URL.revokeObjectURL(m)},[e]),mt(()=>{if(!_||!n.current||!s.current||!i.current)return;let m=s.current,A=i.current.clientWidth-16,z=window.innerHeight*.65,N=Math.min(A/m.width,z/m.height,1);F.current=N;let V=n.current;V.width=m.width,V.height=m.height,V.style.width=`${m.width*N}px`,V.style.height=`${m.height*N}px`,D()},[_]),O(()=>{D()},[d,R]);function D(){let m=n.current,S=s.current;if(!m||!S)return;let A=m.getContext("2d");if(A){A.clearRect(0,0,m.width,m.height),A.drawImage(S,0,0);for(let z of d)Rr(A,z,S);R&&Rr(A,R,S)}}function M(m){let A=n.current.getBoundingClientRect();return{x:(m.clientX-A.left)/F.current,y:(m.clientY-A.top)/F.current}}let I=m=>{if(!_)return;let{x:S,y:A}=M(m),z=n.current.width,N=Math.max(3,Math.round(z/400)),V=Math.max(8,Math.round(z/80));if(l==="text"){let pe=window.prompt(t["annotator.text_prompt"]);pe&&pe.trim()&&E({kind:"text",x:S,y:A,text:pe.trim(),color:c,fontSize:Math.max(16,Math.round(z/50)),lineWidth:1});return}x.current=!0,l==="rectangle"?y({kind:"rectangle",x:S,y:A,w:0,h:0,color:c,lineWidth:N}):l==="arrow"?y({kind:"arrow",x1:S,y1:A,x2:S,y2:A,color:c,lineWidth:N}):l==="freehand"?y({kind:"freehand",points:[{x:S,y:A}],color:c,lineWidth:N}):l==="highlight"?y({kind:"highlight",x:S,y:A,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&y({kind:"blur",x:S,y:A,w:0,h:0,color:"#000000",lineWidth:0,tile:V})},K=m=>{if(!x.current)return;let{x:S,y:A}=M(m);y(z=>z&&(z.kind==="rectangle"||z.kind==="highlight"||z.kind==="blur"?{...z,w:S-z.x,h:A-z.y}:z.kind==="arrow"?{...z,x2:S,y2:A}:z.kind==="freehand"?{...z,points:[...z.points,{x:S,y:A}]}:z))},X=()=>{y(m=>(x.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)),x.current=!1},J=async()=>{let m=n.current;if(m){k(!0);try{let S=await new Promise(A=>m.toBlob(A,"image/png",.92));S&&r(S)}finally{k(!1)}}},Y=[{id:"rectangle",icon:le.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:le.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:le.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:le.text,label:t["annotator.tool.text"]},{id:"highlight",icon:le.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:le.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:le.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:Y.map(m=>o("button",{type:"button",onClick:()=>u(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:[Cr.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:$,disabled:b.length===0,title:t["annotator.undo"],children:[le.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:T,disabled:C.length===0,title:t["annotator.redo"],children:[le.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:B,disabled:d.length===0,children:[le.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[d.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:_?o("canvas",{ref:n,onMouseDown:I,onMouseMove:K,onMouseUp:X,onMouseLeave:X,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:J,disabled:q||!_,children:q?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var Ka=["bug","feature","question","praise","typo"],ja=["blocker","high","medium","low"];function Er({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,u]=P(""),[c,f]=P("bug"),[d,p]=P("medium"),[b,v]=P(""),[C,h]=P([]),[x,R]=P(!1),[y,_]=P(null),g=Q(null),q=Q(null),k=a==="submitting",F=k?e["form.submitting"]:e["form.submit"],E=typeof window!="undefined"?window.location.href:"",B=l.trim()!==""||C.length>0;O(()=>{s==null||s(B)},[B]);let $=Q(C);$.current=C,O(()=>()=>{$.current.forEach(m=>URL.revokeObjectURL(m.preview))},[]);let T=m=>{v("");let S=5-C.length,A=m.slice(0,Math.max(0,S));for(let z of A)if(z instanceof File){let N=Ue(z);if(N){v(N.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(N.maxMb)));return}}if(A.length){let z=A.map(N=>({blob:N,preview:URL.createObjectURL(N)}));h(N=>[...N,...z])}m.length>A.length&&v(e["form.screenshot.error_count"].replace("{max}",String(5)))},D=m=>{let S=C[m];S&&URL.revokeObjectURL(S.preview),h(A=>A.filter((z,N)=>N!==m)),v(""),g.current&&(g.current.value="")},M=m=>{var z;let S=m.target,A=Array.from((z=S.files)!=null?z:[]);A.length&&T(A),S.value=""},I=m=>{m.preventDefault(),m.stopPropagation(),R(!0)},K=m=>{m.preventDefault(),m.stopPropagation(),m.currentTarget===m.target&&R(!1)},X=m=>{var A,z;m.preventDefault(),m.stopPropagation(),R(!1);let S=Array.from((z=(A=m.dataTransfer)==null?void 0:A.files)!=null?z:[]);S.length&&T(S)};O(()=>{let m=q.current;if(!m)return;let S=A=>{var N;let z=(N=A.clipboardData)==null?void 0:N.items;if(z){for(let V of Array.from(z))if(V.kind==="file"&&V.type.startsWith("image/")){let pe=V.getAsFile();if(pe){A.preventDefault(),T([pe]);return}}}};return m.addEventListener("paste",S),()=>m.removeEventListener("paste",S)},[C.length]);let J=m=>{let S=y;if(S===null||!C[S]){_(null);return}URL.revokeObjectURL(C[S].preview);let A={blob:m,preview:URL.createObjectURL(m)};h(z=>z.map((N,V)=>V===S?A:N)),_(null)};return o("form",{onSubmit:m=>{if(m.preventDefault(),!l.trim()){v(e["form.description.required"]);return}v("");let S={description:l.trim(),feedback_type:c,severity:d};C.length&&(S.screenshots=C.map(A=>A.blob),S.capture_method="manual"),t(S)},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=>u(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:Ka.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:d,onChange:m=>p(m.target.value),children:ja.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:M,"aria-hidden":"true",tabIndex:-1}),C.length>0&&o("div",{class:"screenshot-strip",children:C.map((m,S)=>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),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:()=>D(S),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:q,class:`screenshot-dropzone ${x?"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 S;(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),(S=g.current)==null||S.click())},onDragOver:I,onDragLeave:K,onDrop:X,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),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:we(E,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:k,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:k,children:F})]}),y!==null&&C[y]&&o(qr,{imageBlob:C[y].blob,strings:e,onCancel:()=>_(null),onSave:J})]})}Z();function Qa(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 Wa(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var Ua={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Pr(e,t){return t==="all"?e:e.filter(r=>Ua[r.status]===t)}function Tr({rows:e,filter:t,onFilter:r,strings:a}){let n=Qa(e),i=Wa(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 u=t===l.key,c=u?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${u?" is-active":""}`,onClick:()=>r(c),"aria-pressed":u,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var Va=3e4;function Ar({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var B;let[i,s]=P(null),[l,u]=P(null),[c,f]=P(!1),[d,p]=P("all"),[b,v]=P(""),[C,h]=P(!1),[x,R]=P(!1),y=Q(!0),_=async $=>{if($.preventDefault(),!n||x)return;let T=parseInt(b.replace(/^#/,"").trim(),10);if(!Number.isInteger(T)||T<=0){h(!0);return}R(!0),h(!1);try{let D=await n(T);if(!y.current)return;D?v(""):h(!0)}finally{y.current&&R(!1)}},g=async()=>{var $;f(!0),u(null);try{let T=await e.listMine(t);return y.current&&s(T),!0}catch(T){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",T),y.current&&u(($=xe(T,r))!=null?$:r["mine.error"]),!1}finally{y.current&&f(!1)}};O(()=>{y.current=!0;let $=me(g,Va);return()=>{y.current=!1,$.stop()}},[t]);let q=i!==null&&i.length===0,k=i===null&&!l,F=i?Pr(i,d):null,E=!!i&&i.length>0&&((B=F==null?void 0:F.length)!=null?B: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:_,children:[o("input",{type:"text",inputMode:"numeric",value:b,placeholder:r["mine.jump.placeholder"],"aria-label":r["mine.jump.aria"],onInput:$=>{v($.target.value),h(!1)},disabled:x}),o("button",{type:"submit",class:"btn",disabled:x||!b.trim(),children:r["mine.jump.go"]})]}),o("button",{type:"button",class:"btn",onClick:()=>{g()},disabled:c,children:c?r["mine.loading"]:r["mine.refresh"]})]})]}),C&&o("div",{class:"mine-jump-error error",role:"alert",children:r["mine.jump.not_found"]}),i&&i.length>0&&o(Tr,{rows:i,filter:d,onFilter:p,strings:r}),k&&o("div",{class:"mine-loading",children:r["mine.loading"]}),l&&o("div",{class:"error",children:l}),q&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),E&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),F&&F.length>0&&o("ul",{class:"mine-rows",children:F.map($=>o("li",{children:o(Ge,{row:$,strings:r,onClick:()=>a($)})}))})]})}Z();function Mr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=Q(null),i=Q(null);return O(()=>{var u;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let f=(d=n.current)==null?void 0:d.getRootNode();f instanceof ShadowRoot&&f.querySelector(".annotator-backdrop")||(c.stopPropagation(),e("escape"))};window.addEventListener("keydown",s);let l=(u=n.current)==null?void 0:u.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 Lr({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"]})]})}Z();function zr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[u,c]=P(null),[f,d]=P(!1);return O(()=>{let p=!1,b=se(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:b,status:["new","in_progress","awaiting_validation"]}).then(v=>{p||c(v.results.slice(0,5))}).catch(()=>{p||d(!0)}),()=>{p=!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"]}),u===null&&!f&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),u!==null&&u.map(p=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(p.id),children:[o("span",{class:`page-peek-dot status-${p.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:p.description})]},p.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"]})]})]})}Z();var Ga=6e4;function Xa(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 vt=new Map,ht=new Map;function Ya(){vt.clear()}function Ja(e,t,r){let a=`${t}|${r}`,n=vt.get(a);if(n&&Date.now()-n.fetchedAt<Ga)return Promise.resolve(n.open);let i=ht.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>{let u=Xa(l);return vt.set(a,{open:u,fetchedAt:Date.now()}),u}).finally(()=>ht.delete(a));return ht.set(a,s),s}function Br(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=P(0),[l,u]=P(0),c=de(()=>{Ya(),u(f=>f+1)},[]);return O(()=>{if(!n||!t||!r){s(0);return}let f=!1,d=()=>{let b=se(a!==void 0?{getCurrentPage:a}:{});Ja(t,r,b).then(v=>{f||s(v)}).catch(()=>{f||s(0)})};d();let p=Qe(d);return()=>{f=!0,p()}},[t,r,n,l]),{open:i,refresh:c}}var Fr=`
622
622
  :host {
623
623
  --mfb-accent: #3b82f6;
624
624
  --mfb-accent-contrast: #ffffff;
@@ -1403,6 +1403,31 @@
1403
1403
  justify-content: space-between;
1404
1404
  }
1405
1405
  .mine-list-header h2 { margin: 0; font-size: var(--mfb-text-lg); font-weight: 600; letter-spacing: -0.01em; }
1406
+ /* #85 \u2014 header actions: jump-by-#seq box + refresh. */
1407
+ .mine-list-header-actions {
1408
+ display: flex;
1409
+ align-items: center;
1410
+ gap: 6px;
1411
+ }
1412
+ .mine-jump {
1413
+ display: flex;
1414
+ align-items: center;
1415
+ gap: 4px;
1416
+ }
1417
+ .mine-jump input {
1418
+ font: inherit;
1419
+ font-size: 13px;
1420
+ width: 56px;
1421
+ padding: 5px 8px;
1422
+ border: 1px solid var(--mfb-border);
1423
+ border-radius: var(--mfb-radius);
1424
+ background: var(--mfb-surface);
1425
+ color: inherit;
1426
+ }
1427
+ .mine-jump-error {
1428
+ margin-top: 6px;
1429
+ font-size: 12px;
1430
+ }
1406
1431
  .mine-loading { color: var(--mfb-text-muted); font-size: 13px; }
1407
1432
  .mine-empty {
1408
1433
  text-align: center;
@@ -1608,12 +1633,77 @@
1608
1633
  .comment-author--staff { color: #1e40af; }
1609
1634
  .comment-author--system { color: var(--mfb-text-muted); }
1610
1635
  .comment-body { white-space: pre-wrap; }
1636
+ /* #91 \u2014 image attachments rendered inside a comment bubble. */
1637
+ .comment-attachments {
1638
+ display: flex;
1639
+ flex-wrap: wrap;
1640
+ gap: 6px;
1641
+ margin-top: 6px;
1642
+ }
1643
+ .comment-attachment {
1644
+ display: block;
1645
+ line-height: 0;
1646
+ border-radius: 8px;
1647
+ overflow: hidden;
1648
+ border: 1px solid var(--mfb-border);
1649
+ }
1650
+ .comment-attachment img {
1651
+ width: 96px;
1652
+ height: 96px;
1653
+ object-fit: cover;
1654
+ display: block;
1655
+ }
1611
1656
  .comment-time {
1612
1657
  font-size: 10px;
1613
1658
  margin-top: 4px;
1614
1659
  opacity: 0.7;
1615
1660
  }
1616
1661
 
1662
+ /* F4 \u2014 author edits the description in place. */
1663
+ .report-detail-description-row {
1664
+ display: flex;
1665
+ align-items: flex-start;
1666
+ gap: 8px;
1667
+ }
1668
+ .report-detail-description-row .report-detail-description {
1669
+ flex: 1;
1670
+ margin: 0;
1671
+ }
1672
+ .report-detail-edit {
1673
+ display: flex;
1674
+ flex-direction: column;
1675
+ gap: 6px;
1676
+ }
1677
+ .report-detail-edit-input {
1678
+ font: inherit;
1679
+ font-size: 13px;
1680
+ padding: 8px 10px;
1681
+ border: 1px solid var(--mfb-border);
1682
+ border-radius: var(--mfb-radius);
1683
+ background: var(--mfb-surface);
1684
+ color: inherit;
1685
+ min-height: 72px;
1686
+ resize: vertical;
1687
+ }
1688
+ .report-detail-edit-actions {
1689
+ display: flex;
1690
+ justify-content: flex-end;
1691
+ gap: 6px;
1692
+ }
1693
+ .report-detail-edit.btn,
1694
+ button.report-detail-edit {
1695
+ flex: 0 0 auto;
1696
+ font-size: 12px;
1697
+ padding: 4px 8px;
1698
+ }
1699
+ /* #85 \u2014 shareable-permalink affordance under the description. */
1700
+ .report-detail-permalink {
1701
+ margin: -2px 0 6px;
1702
+ }
1703
+ .report-detail-copy-link {
1704
+ font-size: 12px;
1705
+ padding: 4px 8px;
1706
+ }
1617
1707
  .report-compose {
1618
1708
  display: flex;
1619
1709
  flex-direction: column;
@@ -1636,6 +1726,50 @@
1636
1726
  justify-content: flex-end;
1637
1727
  gap: 6px;
1638
1728
  }
1729
+ /* #91 \u2014 pending image attachments in the reply compose box. */
1730
+ .compose-attachments {
1731
+ display: flex;
1732
+ flex-wrap: wrap;
1733
+ gap: 6px;
1734
+ }
1735
+ .compose-attachment {
1736
+ position: relative;
1737
+ width: 64px;
1738
+ height: 64px;
1739
+ border-radius: 8px;
1740
+ overflow: hidden;
1741
+ border: 1px solid var(--mfb-border);
1742
+ }
1743
+ .compose-attachment img {
1744
+ width: 100%;
1745
+ height: 100%;
1746
+ object-fit: cover;
1747
+ display: block;
1748
+ }
1749
+ .compose-attachment-remove {
1750
+ position: absolute;
1751
+ top: 2px;
1752
+ right: 2px;
1753
+ width: 20px;
1754
+ height: 20px;
1755
+ display: grid;
1756
+ place-items: center;
1757
+ padding: 0;
1758
+ background: rgba(255, 255, 255, 0.92);
1759
+ border: 1px solid var(--mfb-border);
1760
+ border-radius: 999px;
1761
+ font-size: 15px;
1762
+ line-height: 1;
1763
+ cursor: pointer;
1764
+ color: #111827;
1765
+ }
1766
+ .compose-attachment-remove:hover { background: #fff; }
1767
+ .compose-attach-btn { margin-right: auto; }
1768
+ .compose-attach-error {
1769
+ margin: 0;
1770
+ font-size: 12px;
1771
+ color: var(--mfb-danger, #b91c1c);
1772
+ }
1639
1773
 
1640
1774
  /* v0.15.3 \u2014 teammate-viewing notice. Shown in place of the compose
1641
1775
  * box when a non-submitter opens a project-wide row from the Board
@@ -2532,7 +2666,7 @@
2532
2666
  background: var(--mfb-surface-2);
2533
2667
  margin: var(--mfb-space-2) 0;
2534
2668
  }
2535
- `;function La(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function Sr(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=kr,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(c){n=c,fe(_(m,{state:c}),a)}function p(c){let{selectedReportId:g,boardSelectId:f,...R}=c;return R}function d(c){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&c&&e.api.fetchBoardKpis(c,{pagePath:re(e)}).then(g=>{g.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function m({state:c}){var I;let g=ne(async M=>{l({...n,status:"submitting"});try{let q=await e.onSubmit(M);S.refresh(),l({...n,status:"success",...q&&q.seq!==void 0&&{submittedSeq:q.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(q){typeof console!="undefined"&&console.warn("[mhosaic] submit:",q),l({...n,status:"error",error:e.strings["form.error"]})}},[]),f=(I=e.getExternalId)==null?void 0:I.call(e),R=e.showPageActivity!==!1,S=wr({...e.api!==void 0&&{api:e.api},...f!==void 0&&{externalId:f},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:R}),v=S.open===1?e.strings["page.badge.aria.one"]:S.open>0?e.strings["page.badge.aria"].replace("{n}",String(S.open)):e.strings["fab.label"],[w,b]=E(!e.requiresVisibilityCheck);D(()=>{if(!e.requiresVisibilityCheck){b(!0);return}if(!f||!e.checkVisibility){b(!1);return}let M=!1;return e.checkVisibility(f).then(q=>{M||b(q)}).catch(()=>{M||b(!1)}),()=>{M=!0}},[f]);let h=La(e,f,w),y=!!(e.api&&f),[k,P]=E(!1),x=W({});return o(Y,{children:[h&&o("div",{class:"fab-area",onMouseEnter:()=>{x.current.close&&clearTimeout(x.current.close),x.current.open=setTimeout(()=>P(!0),250)},onMouseLeave:()=>{x.current.open&&clearTimeout(x.current.open),x.current.close=setTimeout(()=>P(!1),140)},onFocusIn:M=>{var q,z;x.current.close&&clearTimeout(x.current.close),(z=(q=M.target).matches)!=null&&z.call(q,":focus-visible")&&P(!0)},onFocusOut:()=>P(!1),onKeyDown:M=>M.key==="Escape"&&P(!1),children:[k&&!c.open&&R&&S.open>0&&e.api&&f&&o(xr,{api:e.api,externalId:f,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:S.open,onViewAll:()=>{P(!1),l({...n,open:!0,tab:"board"})},onPickRow:M=>{P(!1),l({...n,open:!0,tab:"board",boardSelectId:M})},onSend:()=>{P(!1),d(f)}}),o(pr,{label:v,onClick:()=>d(f),...S.open>0&&{count:S.open}})]}),c.open&&o(yr,{onDismiss:M=>{if(M!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(p({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:c.tab==="board",children:[c.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(p({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),y&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":c.tab==="send",class:`tab-button ${c.tab==="send"?"is-active":""}`,onClick:()=>l(p({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="mine",class:`tab-button ${c.tab==="mine"?"is-active":""}`,onClick:()=>l(p({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="changelog",class:`tab-button ${c.tab==="changelog"?"is-active":""}`,onClick:()=>l(p({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="board",class:`tab-button tab-button--board ${c.tab==="board"?"is-active":""}`,onClick:()=>l(p({...n,tab:"board"})),children:e.strings["tab.board"]})]}),c.tab==="send"&&o(Y,{children:[y&&R&&o(_r,{open:S.open,strings:e.strings,onView:()=>l(p({...n,tab:"board"}))}),o(gr,{strings:e.strings,onSubmit:g,onCancel:()=>l({...n,open:!1,status:"idle"}),status:c.status,...c.error!==void 0&&{errorMessage:c.error},...c.submittedSeq!==void 0&&{submittedSeq:c.submittedSeq},onDirtyChange:M=>{s=M}})]}),c.tab==="mine"&&e.api&&f&&!c.selectedReportId&&o(vr,{api:e.api,externalId:f,strings:e.strings,onSelect:M=>l({...n,selectedReportId:M.id})}),(c.tab==="mine"||c.tab==="changelog")&&e.api&&f&&c.selectedReportId&&o(Ke,{api:e.api,externalId:f,reportId:c.selectedReportId,strings:e.strings,onBack:()=>l(p({...n})),onOpenSeq:M=>{var q;(q=e.api)==null||q.getReportBySeq(M,f).then(z=>l({...n,selectedReportId:z.id})).catch(()=>{})}}),c.tab==="changelog"&&e.api&&f&&!c.selectedReportId&&o(dr,{api:e.api,externalId:f,strings:e.strings,onSelect:M=>l({...n,selectedReportId:M.id})}),c.tab==="board"&&e.api&&f&&o(cr,{api:e.api,externalId:f,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...c.boardSelectId!==void 0&&{initialSelectedId:c.boardSelectId}})]})]})}return l(n),{open(){var c;d((c=e.getExternalId)==null?void 0:c.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),fe(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function Ga(){return{right:24+24/2,bottom:84}}function Jr(e){var S,v,w,b,h,y,k,P;let t=(S=e.env)!=null?S:"prod",r=(v=e.locale)!=null?v:typeof navigator!="undefined"?navigator.language:void 0,a=Et((w=e.translations)!=null?w:{},r!==void 0?{locale:r}:{}),n=Pt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(b=e.metadata)!=null?b:{},l=xt({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}}),p=[],d=document.createElement("div");if(d.className="mhosaic-feedback",e.attachTo){let x=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;x==null||x.appendChild(d)}else document.body.appendChild(d);async function m(x){var j,U,V,B,O,u;let F=(j=x.screenshots)!=null&&j.length?x.screenshots:x.screenshot?[x.screenshot]:void 0,L=x.synthetic?void 0:F,I=n.snapshot();if(i){let{userHash:C,exp:T,...A}=i;I.user=A}s&&Object.keys(s).length>0&&(I.metadata={...s});let M=L!=null&&L.length?(U=x.capture_method)!=null?U:"manual":"none",q={description:x.description,feedback_type:(V=x.feedback_type)!=null?V:"bug",severity:(B=x.severity)!=null?B:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:M,technical_context:I};q.widget_version="0.28.0",L!=null&&L.length&&(q.screenshots=L,q.screenshot=L[0]),x.synthetic&&(q.synthetic=!0);let z=re(e);z&&(q.page_path=z),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(q.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let N=q;for(let C of p)N=await C(N);try{let C=await l.submitReport(N);return(O=e.onSubmitSuccess)==null||O.call(e,C),n.clear(),C}catch(C){let T=C instanceof Error?C:new Error(String(C));throw(u=e.onError)==null||u.call(e,T),T}}let c=Sr({host:d,strings:a,showFAB:(h=e.showFAB)!=null?h:!0,onSubmit:x=>m(x),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(y=e.requiresVisibilityCheck)!=null?y:!1,checkVisibility:x=>l.checkVisibility(x,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}}),g,f=!1;if((k=e.qaMeter)!=null&&k.source){let x=e.qaMeter,F=(P=x.locale)!=null?P:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(Xr(),Yr)).then(({createQaMeter:L})=>{var I,M;f||(g=L({source:x.source,size:(I=x.size)!=null?I:"sm",position:(M=x.position)!=null?M:Ga(),locale:F,...x.getCurrentPage&&{getCurrentPage:x.getCurrentPage}}))})}let R={show(){c.open()},hide(){c.close()},open(x){c.open()},async submit(x){return m({description:x.description,...x.feedback_type!==void 0&&{feedback_type:x.feedback_type},...x.severity!==void 0&&{severity:x.severity},...x.synthetic!==void 0&&{synthetic:x.synthetic},...x.screenshot!==void 0&&{screenshot:x.screenshot},...x.screenshots!==void 0&&{screenshots:x.screenshots}})},identify(x){i=x,c.notifyIdentityChanged()},setMetadata(x){s={...s,...x}},shutdown(){f=!0,g==null||g.dispose(),c.dispose(),n.dispose(),d.remove();let x=window;x.mhosaicFeedback===R&&delete x.mhosaicFeedback},_registerTransformer(x){p.push(x)}};return window.mhosaicFeedback=R,R}var Ya={enabled:!0,perFingerprintCooldownMs:3e5,sampleRate:1,maxDescriptionLen:200,globalRatePerMinute:30,maxDistinctFingerprints:200};function Zr(e){var t;if(e instanceof Error)return{name:e.name||"Error",message:String((t=e.message)!=null?t:""),...e.stack&&{stack:String(e.stack)}};if(typeof e=="string")return{name:"Error",message:e};if(e&&typeof e=="object"){let r=e;return{name:typeof r.name=="string"&&r.name||"Error",message:typeof r.message=="string"&&r.message||(()=>{try{return JSON.stringify(e)}catch(a){return String(e)}})(),...typeof r.stack=="string"&&{stack:r.stack}}}return{name:"Error",message:String(e)}}function Xa(e,t){var n;let r=((n=e.stack)!=null?n:"").split(`
2669
+ `;function Za(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function Ir(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Fr,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(p){n=p,ye(w(f,{state:p}),a)}function u(p){let{selectedReportId:b,boardSelectId:v,...C}=p;return C}function c(p){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&p&&e.api.fetchBoardKpis(p,{pagePath:se(e)}).then(b=>{b.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function f({state:p}){var D;let b=de(async M=>{l({...n,status:"submitting"});try{let I=await e.onSubmit(M);R.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"]})}},[]),v=(D=e.getExternalId)==null?void 0:D.call(e),C=M=>!e.api||!v?Promise.resolve(!1):e.api.getReportBySeq(M,v).then(I=>(l({...n,open:!0,tab:"mine",selectedReportId:I.id}),!0)).catch(()=>!1),h=e.deepLinkParam===!1?void 0:M=>{let I=e.deepLinkParam||"mhfeedback";try{let K=new URL(window.location.href);return K.searchParams.set(I,M),K.toString()}catch(K){return""}},x=e.showPageActivity!==!1,R=Br({...e.api!==void 0&&{api:e.api},...v!==void 0&&{externalId:v},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:x}),y=R.open===1?e.strings["page.badge.aria.one"]:R.open>0?e.strings["page.badge.aria"].replace("{n}",String(R.open)):e.strings["fab.label"],[_,g]=P(!e.requiresVisibilityCheck);O(()=>{if(!e.requiresVisibilityCheck){g(!0);return}if(!v||!e.checkVisibility){g(!1);return}let M=!1;return e.checkVisibility(v).then(I=>{M||g(I)}).catch(()=>{M||g(!1)}),()=>{M=!0}},[v]);let q=Za(e,v,_),k=!!(e.api&&v),[F,E]=P(!1),B=Q({});return o(ee,{children:[q&&o("div",{class:"fab-area",onMouseEnter:()=>{B.current.close&&clearTimeout(B.current.close),B.current.open=setTimeout(()=>E(!0),250)},onMouseLeave:()=>{B.current.open&&clearTimeout(B.current.open),B.current.close=setTimeout(()=>E(!1),140)},onFocusIn:M=>{var I,K;B.current.close&&clearTimeout(B.current.close),(K=(I=M.target).matches)!=null&&K.call(I,":focus-visible")&&E(!0)},onFocusOut:()=>E(!1),onKeyDown:M=>M.key==="Escape"&&E(!1),children:[F&&!p.open&&x&&R.open>0&&e.api&&v&&o(zr,{api:e.api,externalId:v,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:R.open,onViewAll:()=>{E(!1),l({...n,open:!0,tab:"board"})},onPickRow:M=>{E(!1),l({...n,open:!0,tab:"board",boardSelectId:M})},onSend:()=>{E(!1),c(v)}}),o(Sr,{label:y,onClick:()=>c(v),...R.open>0&&{count:R.open}})]}),p.open&&o(Mr,{onDismiss:M=>{if(M!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(u({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:p.tab==="board",children:[p.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(u({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),k&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":p.tab==="send",class:`tab-button ${p.tab==="send"?"is-active":""}`,onClick:()=>l(u({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="mine",class:`tab-button ${p.tab==="mine"?"is-active":""}`,onClick:()=>l(u({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="changelog",class:`tab-button ${p.tab==="changelog"?"is-active":""}`,onClick:()=>l(u({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="board",class:`tab-button tab-button--board ${p.tab==="board"?"is-active":""}`,onClick:()=>l(u({...n,tab:"board"})),children:e.strings["tab.board"]})]}),p.tab==="send"&&o(ee,{children:[k&&x&&o(Lr,{open:R.open,strings:e.strings,onView:()=>l(u({...n,tab:"board"}))}),o(Er,{strings:e.strings,onSubmit:b,onCancel:()=>l({...n,open:!1,status:"idle"}),status:p.status,...p.error!==void 0&&{errorMessage:p.error},...p.submittedSeq!==void 0&&{submittedSeq:p.submittedSeq},onDirtyChange:M=>{s=M}})]}),p.tab==="mine"&&e.api&&v&&!p.selectedReportId&&o(Ar,{api:e.api,externalId:v,strings:e.strings,onSelect:M=>l({...n,selectedReportId:M.id}),onOpenSeq:C}),(p.tab==="mine"||p.tab==="changelog")&&e.api&&v&&p.selectedReportId&&o(Ve,{api:e.api,externalId:v,reportId:p.selectedReportId,strings:e.strings,onBack:()=>l(u({...n})),onOpenSeq:C,...h&&{buildPermalink:h}}),p.tab==="changelog"&&e.api&&v&&!p.selectedReportId&&o(kr,{api:e.api,externalId:v,strings:e.strings,onSelect:M=>l({...n,selectedReportId:M.id})}),p.tab==="board"&&e.api&&v&&o(wr,{api:e.api,externalId:v,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...p.boardSelectId!==void 0&&{initialSelectedId:p.boardSelectId}})]})]})}l(n);function d(p){var x;let b=e.api,v=(x=e.getExternalId)==null?void 0:x.call(e);if(!b||!v||!p)return;let C=/^\d+$/.test(p)?parseInt(p,10):null;(C!==null?b.getReportBySeq(C,v):b.getReport(p,v)).then(R=>l({...n,open:!0,tab:"mine",selectedReportId:R.id})).catch(()=>{})}if(e.deepLinkParam!==!1)try{let p=e.deepLinkParam||"mhfeedback",b=new URLSearchParams(window.location.search).get(p);b&&d(b.trim())}catch(p){}return{open(){var p;c((p=e.getExternalId)==null?void 0:p.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),ye(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function bn(){return{right:24+24/2,bottom:84}}function uo(e){var C,h,x,R,y,_,g,q;let t=(C=e.env)!=null?C:"prod",r=(h=e.locale)!=null?h:typeof navigator!="undefined"?navigator.language:void 0,a=Kt((x=e.translations)!=null?x:{},r!==void 0?{locale:r}:{}),n=Nt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(R=e.metadata)!=null?R:{},l=Bt({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}}),u=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let k=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;k==null||k.appendChild(c)}else document.body.appendChild(c);async function f(k){var I,K,X,J,Y,m;let F=(I=k.screenshots)!=null&&I.length?k.screenshots:k.screenshot?[k.screenshot]:void 0,E=k.synthetic?void 0:F,B=n.snapshot();if(i){let{userHash:S,exp:A,...z}=i;B.user=z}s&&Object.keys(s).length>0&&(B.metadata={...s});let $=E!=null&&E.length?(K=k.capture_method)!=null?K:"manual":"none",T={description:k.description,feedback_type:(X=k.feedback_type)!=null?X:"bug",severity:(J=k.severity)!=null?J:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:$,technical_context:B};T.widget_version="0.29.0",E!=null&&E.length&&(T.screenshots=E,T.screenshot=E[0]),k.synthetic&&(T.synthetic=!0);let D=se(e);D&&(T.page_path=D),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(T.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let M=T;for(let S of u)M=await S(M);try{let S=await l.submitReport(M);return(Y=e.onSubmitSuccess)==null||Y.call(e,S),n.clear(),S}catch(S){let A=S instanceof Error?S:new Error(String(S));throw(m=e.onError)==null||m.call(e,A),A}}let d=Ir({host:c,strings:a,showFAB:(y=e.showFAB)!=null?y:!0,onSubmit:k=>f(k),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(_=e.requiresVisibilityCheck)!=null?_:!1,checkVisibility:k=>l.checkVisibility(k,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}}),p,b=!1;if((g=e.qaMeter)!=null&&g.source){let k=e.qaMeter,F=(q=k.locale)!=null?q:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(po(),co)).then(({createQaMeter:E})=>{var B,$;b||(p=E({source:k.source,size:(B=k.size)!=null?B:"sm",position:($=k.position)!=null?$:bn(),locale:F,...k.getCurrentPage&&{getCurrentPage:k.getCurrentPage}}))})}let v={show(){d.open()},hide(){d.close()},open(k){d.open()},async submit(k){return f({description:k.description,...k.feedback_type!==void 0&&{feedback_type:k.feedback_type},...k.severity!==void 0&&{severity:k.severity},...k.synthetic!==void 0&&{synthetic:k.synthetic},...k.screenshot!==void 0&&{screenshot:k.screenshot},...k.screenshots!==void 0&&{screenshots:k.screenshots}})},identify(k){i=k,d.notifyIdentityChanged()},setMetadata(k){s={...s,...k}},shutdown(){b=!0,p==null||p.dispose(),d.dispose(),n.dispose(),c.remove();let k=window;k.mhosaicFeedback===v&&delete k.mhosaicFeedback},_registerTransformer(k){u.push(k)}};return window.mhosaicFeedback=v,v}var hn={enabled:!0,perFingerprintCooldownMs:3e5,sampleRate:1,maxDescriptionLen:200,globalRatePerMinute:30,maxDistinctFingerprints:200};function mo(e){var t;if(e instanceof Error)return{name:e.name||"Error",message:String((t=e.message)!=null?t:""),...e.stack&&{stack:String(e.stack)}};if(typeof e=="string")return{name:"Error",message:e};if(e&&typeof e=="object"){let r=e;return{name:typeof r.name=="string"&&r.name||"Error",message:typeof r.message=="string"&&r.message||(()=>{try{return JSON.stringify(e)}catch(a){return String(e)}})(),...typeof r.stack=="string"&&{stack:r.stack}}}return{name:"Error",message:String(e)}}function vn(e,t){var n;let r=((n=e.stack)!=null?n:"").split(`
2536
2670
  `).slice(0,4).join(`
2537
- `),a=e.message.slice(0,30);return`${e.name}:${a}|${t}|${r}`}function Ja(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function eo(e,t={}){let r={...Ya,...t};if(!r.enabled||typeof window=="undefined")return e;let a=e;if(a._errorTrackingArmed)return e;a._errorTrackingArmed=!0;let n=new Set,i=new Map,s=[];function l(g,f){if(r.globalRatePerMinute>0){let w=f-6e4;for(;s.length>0&&s[0]<w;)s.shift();if(s.length>=r.globalRatePerMinute)return!1}if(r.maxDistinctFingerprints>0&&!i.has(g)&&i.size>=r.maxDistinctFingerprints)return!1;if(r.perFingerprintCooldownMs<=0)return s.push(f),!0;let R=i.get(g);if(R!==void 0&&f-R<r.perFingerprintCooldownMs)return!1;let S=256,v=192;if(i.size>S){let w=f-r.perFingerprintCooldownMs*2;for(let[b,h]of i)h<w&&i.delete(b);if(i.size>S){let b=i.size-v,h=0;for(let y of i.keys()){if(h>=b)break;i.delete(y),h++}}}return s.push(f),!0}async function p(g){if(r.sampleRate<1&&Math.random()>=r.sampleRate)return;let f=Xa(g,window.location.pathname);if(n.has(f))return;let R=Date.now();if(!l(f,R))return;i.set(f,R);let S=Ja(g.message?`${g.name}: ${g.message}`:g.name,r.maxDescriptionLen);n.add(f);try{await a.submit({description:S,feedback_type:"bug",severity:"high",synthetic:!0})}catch(v){}finally{n.delete(f)}}function d(g){var R;let f=(R=g.error)!=null?R:{name:"Error",message:g.message,stack:`at ${g.filename}:${g.lineno}:${g.colno}`};p(Zr(f))}function m(g){p(Zr(g.reason))}window.addEventListener("error",d),window.addEventListener("unhandledrejection",m);let c=a.shutdown.bind(a);return a.shutdown=()=>{window.removeEventListener("error",d),window.removeEventListener("unhandledrejection",m),i.clear(),c()},e}function Za(e){let{errorTracking:t,...r}=e,a=Jr(r);return t!==!1&&eo(a,typeof t=="object"?t:void 0),a}return io(en);})();
2671
+ `),a=e.message.slice(0,30);return`${e.name}:${a}|${t}|${r}`}function yn(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function fo(e,t={}){let r={...hn,...t};if(!r.enabled||typeof window=="undefined")return e;let a=e;if(a._errorTrackingArmed)return e;a._errorTrackingArmed=!0;let n=new Set,i=new Map,s=[];function l(p,b){if(r.globalRatePerMinute>0){let x=b-6e4;for(;s.length>0&&s[0]<x;)s.shift();if(s.length>=r.globalRatePerMinute)return!1}if(r.maxDistinctFingerprints>0&&!i.has(p)&&i.size>=r.maxDistinctFingerprints)return!1;if(r.perFingerprintCooldownMs<=0)return s.push(b),!0;let v=i.get(p);if(v!==void 0&&b-v<r.perFingerprintCooldownMs)return!1;let C=256,h=192;if(i.size>C){let x=b-r.perFingerprintCooldownMs*2;for(let[R,y]of i)y<x&&i.delete(R);if(i.size>C){let R=i.size-h,y=0;for(let _ of i.keys()){if(y>=R)break;i.delete(_),y++}}}return s.push(b),!0}async function u(p){if(r.sampleRate<1&&Math.random()>=r.sampleRate)return;let b=vn(p,window.location.pathname);if(n.has(b))return;let v=Date.now();if(!l(b,v))return;i.set(b,v);let C=yn(p.message?`${p.name}: ${p.message}`:p.name,r.maxDescriptionLen);n.add(b);try{await a.submit({description:C,feedback_type:"bug",severity:"high",synthetic:!0})}catch(h){}finally{n.delete(b)}}function c(p){var v;let b=(v=p.error)!=null?v:{name:"Error",message:p.message,stack:`at ${p.filename}:${p.lineno}:${p.colno}`};u(mo(b))}function f(p){u(mo(p.reason))}window.addEventListener("error",c),window.addEventListener("unhandledrejection",f);let d=a.shutdown.bind(a);return a.shutdown=()=>{window.removeEventListener("error",c),window.removeEventListener("unhandledrejection",f),i.clear(),d()},e}function _n(e){let{errorTracking:t,...r}=e,a=uo(r);return t!==!1&&fo(a,typeof t=="object"?t:void 0),a}return qo(xn);})();
2538
2672
  //# sourceMappingURL=widget.min.js.map