@mhosaic/feedback 0.31.0 → 0.32.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 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&&K.vnode!=null&&K.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,K.vnode&&K.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!=K.debounceRendering)&&((jt=K.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,m){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,m),v=b.__e,b.ref&&p.ref!=b.ref&&(p.ref&&dt(p.ref,null,b),m.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,m=r.length,d=m,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>m?p--:n<m&&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<m;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],m=c!=null&&(2&c.__u)==0;if(c===null&&l==null||m&&l==c.key&&u==c.type)return r;if(a>(m?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(K.event?K.event(t):t)}}}function ct(e,t,r,a,n,i,s,l,u,c){var m,d,p,b,v,C,h,x,R,y,_,g,q,k,F,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),i=[l=t.__e=r.__e]),(m=K.__b)&&m(t);e:if(typeof P=="function")try{if(x=t.props,R=P.prototype&&P.prototype.render,y=(m=P.contextType)&&a[m.__c],_=m?y?y.props.value:m.__:a,r.__c?h=(d=t.__c=r.__c).__=d.__E:(R?t.__c=d=new P(x,_):(t.__c=d=new Ie(x,_),d.constructor=P,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&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ce({},d.__s)),ce(d.__s,P.getDerivedStateFromProps(x,d.__s))),b=d.props,v=d.state,d.__v=t,p)R&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),R&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(R&&P.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=K.__r,q=0,R)d.state=d.__s,d.__d=!1,g&&g(t),m=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),m=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=m!=null&&m.type===ee&&m.key==null?rr(m.props.children):m,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);K.__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(m=K.diffed)&&m(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]);K.__c&&K.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){K.__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,m,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&&(K.__m&&K.__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"?m=b:c=="value"?v=b:c=="checked"?C=b:l&&typeof b!="function"||h[c]===b||ze(e,c,b,h[c],n);if(m)l||d&&(m.__html==d.__html||m.__html==e.innerHTML)||(e.innerHTML=m.__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){K.__e(n,r)}}function or(e,t,r){var a,n;if(K.unmount&&K.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){K.__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),K.__&&K.__(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,K,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,K={__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){X.__h&&X.__h(G,e,Re||t),Re=0;var r=G.__H||(G.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function E(e){return Re=1,Vo(fr,e)}function Vo(e,t,r){var a=je(_e++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):fr(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=G,!G.__f)){var n=function(l,u,c){if(!a.__c.__H)return!0;var m=a.__c.__H.__.filter(function(p){return p.__c});if(m.every(function(p){return!p.__N}))return!i||i.call(this,l,u,c);var d=a.__c.props!==l;return m.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};G.__f=!0;var i=G.shouldComponentUpdate,s=G.componentWillUpdate;G.componentWillUpdate=function(l,u,c){if(this.__e){var m=i;i=void 0,n(l,u,c),i=m}s&&s.call(this,l,u,c)},G.shouldComponentUpdate=n}return a.__N||a.__}function O(e,t){var r=je(_e++,3);!X.__s&&mt(r.__H,t)&&(r.__=e,r.u=t,G.__H.__h.push(r))}function ft(e,t){var r=je(_e++,4);!X.__s&&mt(r.__H,t)&&(r.__=e,r.u=t,G.__h.push(r))}function V(e){return Re=5,re(function(){return{current:e}},[])}function re(e,t){var r=je(_e++,7);return mt(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=[],X.__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=G,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),G=t}function ut(e){var t=G;e.__c=e.__(),G=t}function mt(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function fr(e,t){return typeof t=="function"?t(e):t}var _e,G,pt,ar,Re,ur,X,nr,ir,sr,lr,cr,dr,pr,Z=te(()=>{"use strict";ie();Re=0,ur=[],X=K,nr=X.__b,ir=X.__r,sr=X.diffed,lr=X.__c,cr=X.unmount,dr=X.__;X.__b=function(e){G=null,nr&&nr(e)},X.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),dr&&dr(e,t)},X.__r=function(e){ir&&ir(e),_e=0;var t=(G=e.__c).__H;t&&(pt===G?(t.__h=[],G.__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=G},X.diffed=function(e){sr&&sr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ur.push(t)!==1&&ar===X.requestAnimationFrame||((ar=X.requestAnimationFrame)||Xo)(Go)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),pt=G=null},X.__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=[],X.__e(a,r.__v)}}),lr&&lr(e,t)},X.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&&X.__e(t,r.__v))};pr=typeof requestAnimationFrame=="function"});function Dr(e){return e==="en"?on:rn}var rn,on,$r=te(()=>{"use strict";rn={"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."},on={"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 an(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(!an(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=`
1
+ "use strict";var MhosaicFeedback=(()=>{var Ke=Object.defineProperty;var zo=Object.getOwnPropertyDescriptor;var Fo=Object.getOwnPropertyNames;var Io=Object.prototype.hasOwnProperty;var Do=(e,t,r)=>t in e?Ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var Nt=(e,t)=>{for(var r in t)Ke(e,r,{get:t[r],enumerable:!0})},$o=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Fo(t))!Io.call(e,n)&&n!==r&&Ke(e,n,{get:()=>t[n],enumerable:!(a=zo(t,n))||a.enumerable});return e};var Oo=e=>$o(Ke({},"__esModule",{value:!0}),e);var Te=(e,t,r)=>Do(e,typeof t!="symbol"?t+"":t,r);function fe(e,t){for(var r in t)e[r]=t[r];return e}function bt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function S(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?Xe.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 We(e,s,a,n,null)}function We(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?++ar:n,__i:-1,__u:0};return n==null&&j.vnode!=null&&j.vnode(i),i}function re(e){return e.children}function Qe(e,t){this.props=e,this.context=t}function Ce(e,t){if(t==null)return e.__?Ce(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"?Ce(e):null}function ra(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=fe({},t);i.__v=t.__v+1,j.vnode&&j.vnode(i),ht(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?Ce(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,pr(a,i,n),t.__e=t.__=null,i.__e!=r&&lr(i)}}function lr(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}),lr(e)}function tr(e){(!e.__d&&(e.__d=!0)&&ge.push(e)&&!Ge.__r++||er!=j.debounceRendering)&&((er=j.debounceRendering)||nr)(Ge)}function Ge(){try{for(var e,t=1;ge.length;)ge.length>t&&ge.sort(ir),e=ge.shift(),t=ge.length,ra(e)}finally{ge.length=Ge.__r=0}}function cr(e,t,r,a,n,i,s,l,d,c,f){var p,u,b,x,C,_,k,R=a&&a.__k||Ve,y=t.length;for(d=oa(r,t,R,d,y),p=0;p<y;p++)(b=r.__k[p])!=null&&(u=b.__i!=-1&&R[b.__i]||Ue,b.__i=p,_=ht(e,b,u,n,i,s,l,d,c,f),x=b.__e,b.ref&&u.ref!=b.ref&&(u.ref&&vt(u.ref,null,b),f.push(b.ref,b.__c||x,b)),C==null&&x!=null&&(C=x),(k=!!(4&b.__u))||u.__k===b.__k?(d=dr(b,d,e,k),k&&u.__e&&(u.__e=null)):typeof b.type=="function"&&_!==void 0?d=_:x&&(d=x.nextSibling),b.__u&=-7);return r.__e=C,d}function oa(e,t,r,a,n){var i,s,l,d,c,f=r.length,p=f,u=0;for(e.__k=new Array(n),i=0;i<n;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=We(null,s,null,null,null):Ye(s)?s=e.__k[i]=We(re,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=We(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,d=i+u,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=aa(s,r,d,p))!=-1&&(p--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>f?u--:n<f&&u++),typeof s.type!="function"&&(s.__u|=4)):c!=d&&(c==d-1?u--:c==d+1?u++:(c>d?u--:u++,s.__u|=4))):e.__k[i]=null;if(p)for(i=0;i<f;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=Ce(l)),fr(l,l));return a}function dr(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=dr(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=Ce(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function aa(e,t,r,a){var n,i,s,l=e.key,d=e.type,c=t[r],f=c!=null&&(2&c.__u)==0;if(c===null&&l==null||f&&l==c.key&&d==c.type)return r;if(a>(f?1:0)){for(n=r-1,i=r+1;n>=0||i<t.length;)if((c=t[s=n>=0?n--:i++])!=null&&(2&c.__u)==0&&l==c.key&&d==c.type)return s}return-1}function rr(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||ta.test(t)?r:r+"px"}function He(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||rr(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||rr(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(sr,"$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[Ae]=a[Ae]:(r[Ae]=gt,e.addEventListener(t,i?ft:ut,i)):e.removeEventListener(t,i?ft:ut,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 or(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[je]==null)t[je]=gt++;else if(t[je]<r[Ae])return;return r(j.event?j.event(t):t)}}}function ht(e,t,r,a,n,i,s,l,d,c){var f,p,u,b,x,C,_,k,R,y,v,g,E,w,F,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),i=[l=t.__e=r.__e]),(f=j.__b)&&f(t);e:if(typeof P=="function")try{if(k=t.props,R=P.prototype&&P.prototype.render,y=(f=P.contextType)&&a[f.__c],v=f?y?y.props.value:f.__:a,r.__c?_=(p=t.__c=r.__c).__=p.__E:(R?t.__c=p=new P(k,v):(t.__c=p=new Qe(k,v),p.constructor=P,p.render=ia),y&&y.sub(p),p.state||(p.state={}),p.__n=a,u=p.__d=!0,p.__h=[],p._sb=[]),R&&p.__s==null&&(p.__s=p.state),R&&P.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=fe({},p.__s)),fe(p.__s,P.getDerivedStateFromProps(k,p.__s))),b=p.props,x=p.state,p.__v=t,u)R&&P.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),R&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(R&&P.getDerivedStateFromProps==null&&k!==b&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(k,v),t.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(k,p.__s,v)===!1){t.__v!=r.__v&&(p.props=k,p.state=p.__s,p.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(L){L&&(L.__=t)}),Ve.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(k,p.__s,v),R&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(b,x,C)})}if(p.context=v,p.props=k,p.__P=e,p.__e=!1,g=j.__r,E=0,R)p.state=p.__s,p.__d=!1,g&&g(t),f=p.render(p.props,p.state,p.context),Ve.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,g&&g(t),f=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++E<25);p.state=p.__s,p.getChildContext!=null&&(a=fe(fe({},a),p.getChildContext())),R&&!u&&p.getSnapshotBeforeUpdate!=null&&(C=p.getSnapshotBeforeUpdate(b,x)),w=f!=null&&f.type===re&&f.key==null?ur(f.props.children):f,l=cr(e,Ye(w)?w:[w],t,r,a,n,i,s,l,d,c),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),_&&(p.__E=p.__=null)}catch(L){if(t.__v=null,d||i!=null)if(L.then){for(t.__u|=d?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(F=i.length;F--;)bt(i[F]);mt(t)}else t.__e=r.__e,t.__k=r.__k,L.then||mt(t);j.__e(L,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=na(r.__e,t,r,a,n,i,s,d,c);return(f=j.diffed)&&f(t),128&t.__u?void 0:l}function mt(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(mt))}function pr(e,t,r){for(var a=0;a<r.length;a++)vt(r[a],r[++a],r[++a]);j.__c&&j.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){j.__e(i,n.__v)}})}function ur(e){return typeof e!="object"||e==null||e.__b>0?e:Ye(e)?e.map(ur):fe({},e)}function na(e,t,r,a,n,i,s,l,d){var c,f,p,u,b,x,C,_=r.props||Ue,k=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(k);e=document.createElementNS(n,R,k.is&&k),l&&(j.__m&&j.__m(t,i),l=!1),i=null}if(R==null)_===k||l&&e.data==k||(e.data=k);else{if(i=i&&Xe.call(e.childNodes),!l&&i!=null)for(_={},c=0;c<e.attributes.length;c++)_[(b=e.attributes[c]).name]=b.value;for(c in _)b=_[c],c=="dangerouslySetInnerHTML"?p=b:c=="children"||c in k||c=="value"&&"defaultValue"in k||c=="checked"&&"defaultChecked"in k||He(e,c,null,b,n);for(c in k)b=k[c],c=="children"?u=b:c=="dangerouslySetInnerHTML"?f=b:c=="value"?x=b:c=="checked"?C=b:l&&typeof b!="function"||_[c]===b||He(e,c,b,_[c],n);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),cr(t.type=="template"?e.content:e,Ye(u)?u:[u],t,r,a,R=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&Ce(r,0),l,d),i!=null)for(c=i.length;c--;)bt(i[c]);l||(c="value",R=="progress"&&x==null?e.removeAttribute("value"):x!=null&&(x!==e[c]||R=="progress"&&!x||R=="option"&&x!=_[c])&&He(e,c,x,_[c],n),c="checked",C!=null&&C!=e[c]&&He(e,c,C,_[c],n))}return e}function vt(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){j.__e(n,r)}}function fr(e,t,r){var a,n;if(j.unmount&&j.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||vt(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){j.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&fr(a[n],t,r||typeof e.type!="function");r||bt(e.__e),e.__c=e.__=e.__e=void 0}function ia(e,t,r){return this.constructor(e,r)}function Re(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),j.__&&j.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],ht(t,e=(!a&&r||t).__k=S(re,null,[e]),n||Ue,Ue,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Xe.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),pr(i,e,s)}var Xe,j,ar,Zo,ge,er,nr,ir,pt,je,Ae,sr,gt,ut,ft,ea,Ue,Ve,ta,Ye,de=ie(()=>{"use strict";Ue={},Ve=[],ta=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ye=Array.isArray;Xe=Ve.slice,j={__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}},ar=0,Zo=function(e){return e!=null&&e.constructor===void 0},Qe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=fe({},this.state),typeof e=="function"&&(e=e(fe({},r),this.props)),e&&fe(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),tr(this))},Qe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tr(this))},Qe.prototype.render=re,ge=[],nr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ir=function(e,t){return e.__v.__b-t.__v.__b},Ge.__r=0,pt=Math.random().toString(8),je="__d"+pt,Ae="__a"+pt,sr=/(PointerCapture)$|Capture$/i,gt=0,ut=or(!1),ft=or(!0),ea=0});function Ze(e,t){X.__h&&X.__h(V,e,Le||t),Le=0;var r=V.__H||(V.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function q(e){return Le=1,sa(kr,e)}function sa(e,t,r){var a=Ze(qe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):kr(void 0,t),function(l){var d=a.__N?a.__N[0]:a.__[0],c=a.t(d,l);d!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=V,!V.__f)){var n=function(l,d,c){if(!a.__c.__H)return!0;var f=a.__c.__H.__.filter(function(u){return u.__c});if(f.every(function(u){return!u.__N}))return!i||i.call(this,l,d,c);var p=a.__c.props!==l;return f.some(function(u){if(u.__N){var b=u.__[0];u.__=u.__N,u.__N=void 0,b!==u.__[0]&&(p=!0)}}),i&&i.call(this,l,d,c)||p};V.__f=!0;var i=V.shouldComponentUpdate,s=V.componentWillUpdate;V.componentWillUpdate=function(l,d,c){if(this.__e){var f=i;i=void 0,n(l,d,c),i=f}s&&s.call(this,l,d,c)},V.shouldComponentUpdate=n}return a.__N||a.__}function N(e,t){var r=Ze(qe++,3);!X.__s&&wt(r.__H,t)&&(r.__=e,r.u=t,V.__H.__h.push(r))}function xt(e,t){var r=Ze(qe++,4);!X.__s&&wt(r.__H,t)&&(r.__=e,r.u=t,V.__h.push(r))}function U(e){return Le=5,ne(function(){return{current:e}},[])}function ne(e,t){var r=Ze(qe++,7);return wt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function me(e,t){return Le=8,ne(function(){return e},t)}function la(){for(var e;e=wr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Je),t.__h.some(_t),t.__h=[]}catch(r){t.__h=[],X.__e(r,e.__v)}}}function ca(e){var t,r=function(){clearTimeout(a),xr&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);xr&&(t=requestAnimationFrame(r))}function Je(e){var t=V,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),V=t}function _t(e){var t=V;e.__c=e.__(),V=t}function wt(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function kr(e,t){return typeof t=="function"?t(e):t}var qe,V,yt,mr,Le,wr,X,gr,br,hr,vr,yr,_r,xr,oe=ie(()=>{"use strict";de();Le=0,wr=[],X=j,gr=X.__b,br=X.__r,hr=X.diffed,vr=X.__c,yr=X.unmount,_r=X.__;X.__b=function(e){V=null,gr&&gr(e)},X.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_r&&_r(e,t)},X.__r=function(e){br&&br(e),qe=0;var t=(V=e.__c).__H;t&&(yt===V?(t.__h=[],V.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Je),t.__h.some(_t),t.__h=[],qe=0)),yt=V},X.diffed=function(e){hr&&hr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(wr.push(t)!==1&&mr===X.requestAnimationFrame||((mr=X.requestAnimationFrame)||ca)(la)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),yt=V=null},X.__c=function(e,t){t.some(function(r){try{r.__h.some(Je),r.__h=r.__h.filter(function(a){return!a.__||_t(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],X.__e(a,r.__v)}}),vr&&vr(e,t)},X.unmount=function(e){yr&&yr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Je(a)}catch(n){t=n}}),r.__H=void 0,t&&X.__e(t,r.__v))};xr=typeof requestAnimationFrame=="function"});function Jr(e){return e==="en"?vn:hn}var hn,vn,Zr=ie(()=>{"use strict";hn={"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."},vn={"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 Et(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 yn(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 to(e,t){let r=eo(Et(e)),a=null,n=-1;for(let i of t){let s=eo(i);if(!yn(r,s))continue;let d=s.filter(c=>!c.startsWith(":")).length*100+s.length;d>n&&(a=i,n=d)}return a}var eo,Pt=ie(()=>{"use strict";eo=e=>e.split("/").filter(Boolean)});var ro,oo=ie(()=>{"use strict";ro=`
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 Ee(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function me(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 nn(e){return{dev:me(e.dev),bot:Ee(e.automated),human:me(e.client)}}function sn(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,m;let l=t.get(s);return{key:s,label:(m=(c=(u=l[0])==null?void 0:u.group)==null?void 0:c.label)!=null?m:"",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=nn(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]=E(new Set),s=m=>{i(d=>{let p=new Set(d);return p.has(m)?p.delete(m):p.add(m),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 m=(c=e==null?void 0:e.scenarios)!=null?c:[],d=m.some(p=>p.group);if(m.length===0)u=w("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)u=w("ul",{class:"qa-panel__list"},m.map(p=>w(Yr,{key:p.id,scenario:p,strings:a})));else{let p=sn(m);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=>me(h.dev))),bot:Ye(b.scenarios.map(h=>Ee(h.automated))),human:Ye(b.scenarios.map(h=>me(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 ln(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 m=(u=t.get(c.id))!=null?u:[];r.push({node:c,depth:s,hasChildren:m.length>0}),m.length>0&&a(c.id,s+1)}};return a(null,0),r}function cn(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 m of(i=l.pages)!=null?i:[])(m.role==="primary"?c.primaries:c.traversed).add(m.pattern);t.set(u,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var m,d,p,b;let u=(d=(m=s.scenario.group)==null?void 0:m.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]=E("pages"),[s,l]=E("");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(()=>ln(e.sitemap),[e]),m=re(()=>cn(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?m.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)}):m,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:me(x.dev),bot:Ee(x.automated),human:me(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 dn(){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 pn(){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===un}function io(){no||(no=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function mn(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 bn(e,t){if(!e||!t)return gn;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,P,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(),fn;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(I=>I.json()):Promise.resolve(t)).then(I=>{ao(I)?(n=I,p()):io()}).catch(()=>{})}let u=document.createElement("div");u.setAttribute("data-mqa-host",""),u.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((P=e.position)==null?void 0:P.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"}),m=document.createElement("style");m.textContent=Nr,c.appendChild(m);let d=document.createElement("div");c.appendChild(d);let p=()=>{};function b(){return e.getCurrentPage?e.getCurrentPage():n?Hr(window.location.pathname,mn(n)):null}function v(){let[D,I]=E(0),H=de(()=>I(W=>W+1),[]);p=H;let M=bn(n,b()),$=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},L=de(()=>{l()},[]),N=de(()=>{l(),C=!0,H()},[]),Q=de(()=>{C=!1,H()},[]);return O(()=>{let W=()=>H();return window.addEventListener("popstate",W),window.addEventListener(kt,W),()=>{window.removeEventListener("popstate",W),window.removeEventListener(kt,W)}},[]),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:$,strings:r})):null,w(Vr,{color:M.color,state:M.state,strings:r,onHover:()=>{y(),h=!0,L(),H()},onOpenModal:N}),C&&n?w(ro,{artifact:n,currentPattern:M.pattern,strings:r,onClose:Q}):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(),dn();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(),pn())}}}var kt,rt,tt,Te,Ae,un,no,fn,gn,lo=te(()=>{"use strict";ie();Z();$r();_t();Kr();Gr();Zr();oo();kt="mqa:locationchange",rt=!1,tt=0,Te=null,Ae=null;un=1;no=!1;fn={open(){},close(){},dispose(){}};gn={state:"unknown-page",color:"gray",pattern:null,page:null}});var co={};Mt(co,{createQaMeter:()=>hn});function hn(e){return so(e)}var po=te(()=>{"use strict";lo()});var kn={};Mt(kn,{createFeedback:()=>wn});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,D,I,H;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,$)=>{g.append("screenshot",M,$===0?"screenshot.png":`screenshot-${$+1}.png`)}),_.synthetic&&g.append("synthetic","true"),(D=_.user)!=null&&D.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=(I=e.getSignedIdentity)==null?void 0:I.call(e);F&&F.userHash&&F.exp&&((H=_.user)!=null&&H.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 P=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:k,body:g});if(!P.ok){let M=await P.text().catch(()=>"");throw new Error(`Feedback submit failed: ${P.status} ${M}`)}return P.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((D,I)=>B.append("attachment",D,`attachment-${I+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 P=await r(`${t}/api/feedback/v1/reports/widget/${y}/comments/`,F);if(!P.ok){let B=await P.text().catch(()=>"");throw new Error(`addComment failed: ${P.status} ${B}`)}return P.json()}async function m(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(P=>_.append("status",P)),(k=y.type)==null||k.forEach(P=>_.append("type",P)),(F=y.severity)==null||F.forEach(P=>_.append("severity",P)),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:m,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 m=new Error().stack;m&&(c.stack=m.split(`
616
+ `});function Fe(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function he(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function nt(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function it(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 st(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var ze,ao,no,io,so,lt=ie(()=>{"use strict";ze={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},ao={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},no={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},io={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},so={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function lo({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[ao[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return S("div",{class:"qa-pastille"},S("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${ze[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},S("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},S("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 co=ie(()=>{"use strict";de();lt()});function Ie({dev:e,bot:t,human:r,strings:a}){return S("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},S("span",{class:`qa-lanes__icon qa-lane ${Tt[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},S("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},S("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"}))),S("span",{class:`qa-lanes__icon qa-lane ${Tt[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},S("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"},S("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),S("path",{d:"M12 4.5v4"}),S("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),S("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),S("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),S("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),S("span",{class:`qa-lanes__icon qa-lane ${Tt[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},S("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"},S("circle",{cx:"12",cy:"8",r:"3.6"}),S("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var Tt,Mt=ie(()=>{"use strict";de();Tt={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function _n(e){return{dev:he(e.dev),bot:Fe(e.automated),human:he(e.client)}}function xn(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",d=(i=t.get(l))!=null?i:[];d.push(s),t.set(l,d)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var d,c,f;let l=t.get(s);return{key:s,label:(f=(c=(d=l[0])==null?void 0:d.group)==null?void 0:c.label)!=null?f:"",scenarios:l}})}function po(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function uo({scenario:e,strings:t}){let r=_n(e),a=e.automated.provenance;return S("li",{class:"qa-row","data-testid":"qa-scenario-row"},S("span",{class:"qa-row__title"},e.priority?S("span",{class:`qa-tag ${no[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,S("span",{class:"qa-row__name"},e.title),e.source==="testgen"?S("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?S("span",{class:"qa-tag"},t[io[e.caseStatus]]):null,e.grounding?S("span",{class:"qa-tag"},t[so[e.grounding]]):null,a?S("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),S(Ie,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function fo({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=q(new Set),s=f=>{i(p=>{let u=new Set(p);return u.has(f)?u.delete(f):u.add(f),u})},l=po(a["panel.freshness"],{date:it(r.generated_at),version:st(r.app_version),env:r.environment}),d;if(t==="no-tests")d=S("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")d=S("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let f=(c=e==null?void 0:e.scenarios)!=null?c:[],p=f.some(u=>u.group);if(f.length===0)d=S("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!p)d=S("ul",{class:"qa-panel__list"},f.map(u=>S(uo,{key:u.id,scenario:u,strings:a})));else{let u=xn(f);d=S("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},u.map(b=>{let x=n.has(b.key),C={dev:nt(b.scenarios.map(_=>he(_.dev))),bot:nt(b.scenarios.map(_=>Fe(_.automated))),human:nt(b.scenarios.map(_=>he(_.client)))};return S("li",{key:b.key,class:"qa-suite","data-testid":"qa-panel-group"},S("button",{type:"button",class:"qa-suite__head","aria-expanded":x,"data-testid":"qa-suite-group",onClick:()=>s(b.key)},S("span",{class:`qa-suite__chev ${x?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),S("span",{class:"qa-suite__key"},b.key),S("span",{class:"qa-suite__label"},b.label),S("span",{class:"qa-suite__count"},po(a["suite.cases"],{count:b.scenarios.length})),S(Ie,{dev:C.dev,bot:C.bot,human:C.human,strings:a})),x?S("ul",{class:"qa-suite__list"},b.scenarios.map(_=>S(uo,{key:_.id,scenario:_,strings:a}))):null)}))}}return S("section",{class:"qa-panel","data-testid":"qa-panel"},d,S("footer",{class:"qa-panel__foot"},S("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var mo=ie(()=>{"use strict";de();oe();Mt();lt()});function wn(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,d;for(let c of(l=t.get(i))!=null?l:[]){let f=(d=t.get(c.id))!=null?d:[];r.push({node:c,depth:s,hasChildren:f.length>0}),f.length>0&&a(c.id,s+1)}};return a(null,0),r}function kn(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let d=(a=l.external_key)!=null?a:l.id,c=(n=t.get(d))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let f of(i=l.pages)!=null?i:[])(f.role==="primary"?c.primaries:c.traversed).add(f.pattern);t.set(d,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var f,p,u,b;let d=(p=(f=s.scenario.group)==null?void 0:f.key)!=null?p:"~",c=(b=(u=l.scenario.group)==null?void 0:u.key)!=null?b:"~";return d!==c?d.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function go(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function bo(e){return`${Math.round(e)}%`}function ho({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=q("pages"),[s,l]=q("");N(()=>{let _=k=>{k.key==="Escape"&&a()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[a]);let d=t?Et(t):null,c=ne(()=>wn(e.sitemap),[e]),f=ne(()=>kn(e),[e]),p=ne(()=>{let _=new Map;for(let k of e.sitemap)_.set(k.path_pattern,k.title);return _},[e]),u=_=>{var k;return(k=p.get(_))!=null?k:_},b=s.trim().toLowerCase(),x=b?f.filter(_=>{var k,R;return _.scenario.title.toLowerCase().includes(b)||((R=(k=_.scenario.group)==null?void 0:k.label)!=null?R:"").toLowerCase().includes(b)}):f,C=go(r["panel.freshness"],{date:it(e.generated_at),version:st(e.app_version),env:e.environment});return S("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:_=>{_.target===_.currentTarget&&a()}},S("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},S("header",{class:"qa-modal__head"},S("h3",null,r["modal.title"]),S("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),S("div",{class:"qa-modal__freshness"},C),S("div",{class:"qa-kpi","data-testid":"qa-kpi"},S("div",{class:"qa-kpi__item"},S("span",{class:"qa-kpi__value"},bo(e.metric.pages_with_scenarios_pct)),S("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),S("div",{class:"qa-kpi__item"},S("span",{class:"qa-kpi__value"},bo(e.metric.scenarios_passing_pct)),S("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),S("nav",{class:"qa-tabs"},S("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),S("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),S("div",{class:"qa-modal__body"},n==="pages"?S("ul",{class:"qa-tree"},c.map(_=>{let k=d!==null&&_.node.path_pattern===d;return S("li",{key:_.node.id,class:`qa-tree__row ${k?"qa-tree__row--here":""}`,"data-testid":k?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+_.depth*1.1}rem`}},S("span",{class:`qa-dot ${ze[_.node.color]}`,"aria-hidden":"true"}),S("span",{class:`qa-tree__title ${_.node.structural?"qa-tree__title--structural":""}`},_.node.title||_.node.path_pattern),k?S("span",{class:"qa-tree__here"},` ${_.node.path_pattern} `):null,k?S("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,S("span",{class:"qa-tree__count"},String(_.node.counts.scenarios)))})):S("div",{class:"qa-scenarios"},S("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:_=>l(_.target.value)}),x.length===0?S("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):S("ul",{class:"qa-scenarios__list"},x.map(_=>{var v,g;let k=_.scenario,R={dev:he(k.dev),bot:Fe(k.automated),human:he(k.client)},y=[..._.traversed].map(u);return S("li",{key:(v=k.external_key)!=null?v:k.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},S("div",{class:"qa-scenarios__line"},S("span",{class:`qa-dot ${ze[k.color]}`,"aria-hidden":"true"}),(g=k.group)!=null&&g.key?S("span",{class:"qa-suitekey"},k.group.key):null,S("span",{class:"qa-scenarios__title"},k.title),k.source==="testgen"?S("span",{class:"qa-tag"},r["source.testgen"]):null,S(Ie,{dev:R.dev,bot:R.bot,human:R.human,strings:r})),S("div",{class:"qa-scenarios__pages"},_.primaries.size?S("span",{class:"qa-scenarios__primary"},go(r["modal.appliesTo"],{count:_.primaries.size})):null,y.length?S("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${y.join(", ")}`):null))}))))))}var vo=ie(()=>{"use strict";de();oe();Mt();Pt();lt()});function Sn(){if(ct++,dt)return;dt=!0,De=history.pushState,$e=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(At))};history.pushState=function(...r){let a=De.apply(this,r);return e(),a},history.replaceState=function(...r){let a=$e.apply(this,r);return e(),a}}function Cn(){ct>0&&ct--,!(ct>0||!dt)&&(dt=!1,De&&(history.pushState=De),$e&&(history.replaceState=$e),De=null,$e=null)}function yo(e){return typeof e=="object"&&e!==null&&e.format===Rn}function xo(){_o||(_o=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function En(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 Tn(e,t){if(!e||!t)return Pn;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 wo(e){var w,F,P,L;let{source:t}=e,r=Jr((w=e.locale)!=null?w:"fr"),a=typeof t=="object"?t:null;if(a&&!yo(a))return xo(),qn;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(I=>I.json()):Promise.resolve(t)).then(I=>{yo(I)?(n=I,u()):xo()}).catch(()=>{})}let d=document.createElement("div");d.setAttribute("data-mqa-host",""),d.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((P=e.position)==null?void 0:P.right)!==void 0&&d.style.setProperty("--mqa-right",`${e.position.right}px`),((L=e.position)==null?void 0:L.bottom)!==void 0&&d.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(d);let c=d.attachShadow({mode:"open"}),f=document.createElement("style");f.textContent=ro,c.appendChild(f);let p=document.createElement("div");c.appendChild(p);let u=()=>{};function b(){return e.getCurrentPage?e.getCurrentPage():n?to(window.location.pathname,En(n)):null}function x(){let[D,I]=q(0),Q=me(()=>I(J=>J+1),[]);u=Q;let A=Tn(n,b()),K=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},H=me(()=>{l()},[]),Y=me(()=>{l(),C=!0,Q()},[]),ee=me(()=>{C=!1,Q()},[]);return N(()=>{let J=()=>Q();return window.addEventListener("popstate",J),window.addEventListener(At,J),()=>{window.removeEventListener("popstate",J),window.removeEventListener(At,J)}},[]),S("div",{class:"qa-pastille-wrap",onMouseEnter:y,onMouseLeave:v},_?S("div",{class:"qa-panel-anchor"},S(fo,{page:A.page,state:A.state,meta:K,strings:r})):null,S(lo,{color:A.color,state:A.state,strings:r,onHover:()=>{y(),_=!0,H(),Q()},onOpenModal:Y}),C&&n?S(ho,{artifact:n,currentPattern:A.pattern,strings:r,onClose:ee}):null)}let C=!1,_=!1,k=null,R=140;function y(){k!==null&&(clearTimeout(k),k=null)}function v(){y(),k=setTimeout(()=>{k=null,!E&&(_=!1,u())},R)}function g(){Re(S(x,{}),p)}g(),Sn();let E=!1;return{open(){E||(l(),C=!0,u())},close(){E||(C=!1,u())},dispose(){E||(E=!0,y(),Re(null,p),d.remove(),Cn())}}}var At,dt,ct,De,$e,Rn,_o,qn,Pn,ko=ie(()=>{"use strict";de();oe();Zr();Pt();oo();co();mo();vo();At="mqa:locationchange",dt=!1,ct=0,De=null,$e=null;Rn=1;_o=!1;qn={open(){},close(){},dispose(){}};Pn={state:"unknown-page",color:"gray",pattern:null,page:null}});var So={};Nt(So,{createQaMeter:()=>Mn});function Mn(e){return wo(e)}var Co=ie(()=>{"use strict";ko()});var In={};Nt(In,{createFeedback:()=>Fn});var Ko=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function No(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}var Me=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);Te(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function Ho(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 jt(e,t){if(e.status===429)throw new Me(Ho(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function Ht(e,t){await jt(e,t);let r=await e.json().catch(()=>{});if(!Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an array)`);return r}async function Ne(e,t){await jt(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 Wt(e){var k,R;let t=((k=e.endpoint)!=null?k:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');No(t);let r=(R=e.fetch)!=null?R:globalThis.fetch;async function a(y){var L,D,I,Q;let v=y;if(e.beforeSend&&(v=await e.beforeSend(y)),v===!1)throw new Error("Submission cancelled by beforeSend");let g=new FormData;for(let A of Ko)g.append(A,String(v[A]));g.append("technical_context",JSON.stringify(v.technical_context)),((L=v.screenshots)!=null&&L.length?v.screenshots:v.screenshot?[v.screenshot]:[]).forEach((A,K)=>{g.append("screenshot",A,K===0?"screenshot.png":`screenshot-${K+1}.png`)}),v.synthetic&&g.append("synthetic","true"),(D=v.user)!=null&&D.id&&g.append("user",JSON.stringify(v.user)),v.widget_version&&g.append("widget_version",v.widget_version),v.page_path&&g.append("page_path",v.page_path);let w={Authorization:`Bearer ${e.apiKey}`};v.synthetic&&(w["X-Mhosaic-Capture-Source"]="error-tracking");let F=(I=e.getSignedIdentity)==null?void 0:I.call(e);F&&F.userHash&&F.exp&&((Q=v.user)!=null&&Q.id)&&(w["X-Mhosaic-User"]=String(v.user.id),w["X-Mhosaic-User-Hmac"]=F.userHash,w["X-Mhosaic-User-Exp"]=String(F.exp),F.email&&(w["X-Mhosaic-User-Email"]=F.email));let P=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:w,body:g});if(!P.ok){let A=await P.text().catch(()=>"");throw new Error(`Feedback submit failed: ${P.status} ${A}`)}return P.json()}function n(y){var E;let v={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":y},g=(E=e.getSignedIdentity)==null?void 0:E.call(e);return g&&g.userHash&&g.exp&&(v["X-Mhosaic-User-Hmac"]=g.userHash,v["X-Mhosaic-User-Exp"]=String(g.exp),g.email&&(v["X-Mhosaic-User-Email"]=g.email)),v}async function i(y){let v=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(y)});return v.status===404?[]:Ht(v,"listMine")}async function s(y){let v=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(y)});return v.status===404?[]:Ht(v,"listChangelog")}async function l(y,v,g){let E=await r(`${t}/api/feedback/v1/reports/widget/${y}/`,{method:"GET",headers:n(v),...g!=null&&g.signal?{signal:g.signal}:{}});return Ne(E,"getReport")}async function d(y,v){let g=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${y}/`,{method:"GET",headers:n(v)});return Ne(g,"getReportBySeq")}async function c(y,v,g,E,w){let F;if(w&&w.length>0){let L=new FormData;L.append("body",g),E!==void 0&&L.append("client_nonce",E),w.forEach((D,I)=>L.append("attachment",D,`attachment-${I+1}.png`)),F={method:"POST",headers:n(v),body:L}}else F={method:"POST",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({body:g,...E!==void 0&&{client_nonce:E}})};let P=await r(`${t}/api/feedback/v1/reports/widget/${y}/comments/`,F);if(!P.ok){let L=await P.text().catch(()=>"");throw new Error(`addComment failed: ${P.status} ${L}`)}return P.json()}async function f(y,v,g){let E=await r(`${t}/api/feedback/v1/reports/widget/${y}/`,{method:"PATCH",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({description:g})});if(!E.ok){let w=await E.text().catch(()=>"");throw new Error(`editDescription failed: ${E.status} ${w}`)}return E.json()}async function p(y,v){let g=await r(`${t}/api/feedback/v1/reports/widget/${y}/`,{method:"PATCH",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!g.ok){let E=await g.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${g.status} ${E}`)}return g.json()}async function u(y,v){let g=await r(`${t}/api/feedback/v1/reports/widget/${y}/`,{method:"PATCH",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!g.ok){let E=await g.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${g.status} ${E}`)}return g.json()}function b(y){var E,w,F;if(!y)return"";let v=new URLSearchParams;(E=y.status)==null||E.forEach(P=>v.append("status",P)),(w=y.type)==null||w.forEach(P=>v.append("type",P)),(F=y.severity)==null||F.forEach(P=>v.append("severity",P)),y.q&&v.set("q",y.q),y.mine&&v.set("mine","1"),y.ordering&&v.set("ordering",y.ordering),y.page&&y.page>1&&v.set("page",String(y.page)),y.pagePath&&v.set("page_path",y.pagePath);let g=v.toString();return g?`?${g}`:""}async function x(y,v,g){let E=await r(`${t}/api/feedback/v1/reports/widget/board/${b(v)}`,{method:"GET",headers:n(y),...g!=null&&g.signal?{signal:g.signal}:{}});if(E.status===404)return{count:0,next:null,previous:null,results:[]};let w=await Ne(E,"listBoard");if(!Array.isArray(w.results))throw new Error("listBoard: unexpected response shape (missing results[])");return w}async function C(y,v,g){let E=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${b(v)}`,{method:"GET",headers:n(y),...g!=null&&g.signal?{signal:g.signal}:{}});return E.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:Ne(E,"fetchBoardKpis")}async function _(y,v){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,...v?{email:v}:{}})});if(!g.ok)throw new Error(`checkVisibility failed: ${g.status}`);return!!(await g.json()).show}return{submitReport:a,checkVisibility:_,listMine:i,listChangelog:s,getReport:l,getReportBySeq:d,addComment:c,editDescription:f,closeAsResolved:p,reopenUnresolved:u,listBoard:x,fetchBoardKpis:C}}var jo=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Wo=[/^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 Qo(e){return Wo.some(t=>t.test(e))}function ye(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let a=typeof window!="undefined"?window.location.origin:"http://localhost",n=new URL(e,a),i=new URLSearchParams;return n.searchParams.forEach((s,l)=>{jo.test(l)||Qo(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 Uo=[/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,/\bBearer\s+[A-Za-z0-9._~+/=-]{16,}\b/g,/\bAuthorization\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{16,}["']?/gi,/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,/\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\b/g,/\bAKIA[0-9A-Z]{12,}\b/g,/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,/\bAIza[0-9A-Za-z_-]{35}\b/g,/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,/\bAC[a-f0-9]{32}\b/g,/\bSK[a-f0-9]{32}\b/g];function le(e){let t=e;for(let r of Uo)t=t.replace(r,"[redacted-token]");return t}function Qt(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,a=document.referrer||void 0,n=a!==void 0?ye(a):void 0,i=ye(window.location.pathname+window.location.search),s;try{let d=new URL(i,window.location.origin);s=d.pathname+d.search}catch(d){s=window.location.pathname}return{viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},platform:e.platform,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),...t!==void 0&&{connection:t},online:e.onLine,...r!==void 0&&{deviceMemory:r},hardwareConcurrency:e.hardwareConcurrency,...n!==void 0&&{referrer:n},title:le(document.title||"").slice(0,200),pathname:s}}function Vo(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 Ut(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(Vo).join(" "),d=le(l).slice(0,2e3),c={level:a,message:d,ts:Date.now()};if(a==="error"){let f=new Error().stack;f&&(c.stack=f.split(`
617
617
  `).slice(2,8).join(`
618
- `))}e.push(c)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function 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 m=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(m)}),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),m=$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(),m(),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",mr=!1;function Yo(){if(!(mr||typeof history=="undefined")){mr=!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 fe(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 m=!1;try{m=await e()}catch(d){m=!1}r||(n=m?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 K.vnode&&K.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 m;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=((m=e.attachments)!=null?m:[]).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,m]=E(null),[d,p]=E(null),[b,v]=E(!1),[C,h]=E(!1),[x,R]=E(""),[y,_]=E(!1),[g,q]=E(!1),[k,F]=E(""),[P,B]=E(!1),[D,I]=E(!1),[H,M]=E(!1),[$,L]=E([]),[N,Q]=E(""),W=V(null),f=V(!0),S=V($);S.current=$,O(()=>()=>S.current.forEach(A=>URL.revokeObjectURL(A.preview)),[]);let T=A=>{Q("");let U=5-$.length,oe=A.slice(0,Math.max(0,U));for(let J of oe){let ne=Ue(J);if(ne){Q(ne.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(ne.maxMb)));return}}if(oe.length){let J=oe.map(ne=>({blob:ne,preview:URL.createObjectURL(ne)}));L(ne=>[...ne,...J])}A.length>oe.length&&Q(a["form.screenshot.error_count"].replace("{max}",String(5)))},z=A=>{var J;let U=A.target,oe=Array.from((J=U.files)!=null?J:[]);oe.length&&T(oe),U.value=""},j=A=>{let U=$[A];U&&URL.revokeObjectURL(U.preview),L(oe=>oe.filter((J,ne)=>ne!==A)),Q("")},Y=async()=>{try{let A=await e.getReport(r,t);return f.current&&(m(A),p(null)),!0}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",A),!f.current)return!1;let U=xe(A,a);return p(U!=null?U:"load_failed"),!1}};O(()=>{f.current=!0;let A=fe(Y,ta);return()=>{f.current=!1,A.stop()}},[r,t]);let pe=async()=>{if(!(!k.trim()&&$.length===0||P)){B(!0);try{let A=`${r}:${Date.now()}`,U=$.map(J=>J.blob),oe=await e.addComment(r,t,k.trim(),A,U.length?U:void 0);if(!f.current)return;F(""),$.forEach(J=>URL.revokeObjectURL(J.preview)),L([]),Q(""),m(J=>J&&{...J,comments:ra(J.comments,oe)}),Y()}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",A),!f.current)return;p(a["detail.send_failed"])}finally{f.current&&B(!1)}}},go=async()=>{if(!(!u||!c))try{if(await navigator.clipboard.writeText(u(c.id)),!f.current)return;v(!0),setTimeout(()=>{f.current&&v(!1)},2e3)}catch(A){}},bo=()=>{c&&(R(c.description),q(!1),h(!0))},ho=()=>{h(!1),q(!1)},vo=async()=>{if(!c||y)return;let A=x.trim();if(A){_(!0),q(!1);try{let U=await e.editDescription(r,t,A);if(!f.current)return;m(U),h(!1)}catch(U){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",U),!f.current)return;q(!0)}finally{f.current&&_(!1)}}},yo=async()=>{if(!(D||H)){I(!0);try{let A=await e.closeAsResolved(r,t);if(!f.current)return;m(A)}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",A),!f.current)return;p(a["detail.close_failed"])}finally{f.current&&I(!1)}}},_o=async()=>{if(!(D||H)){M(!0);try{let A=await e.reopenUnresolved(r,t);if(!f.current)return;m(A)}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",A),!f.current)return;p(a["detail.reopen_failed"])}finally{f.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:()=>{Y()},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:A=>{R(A.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(A=>A.url):[c.screenshot_url]).filter(A=>!!A).map(A=>{let U=bt(A);return U?o("a",{class:"report-detail-screenshot",href:U,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:A,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:A,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(A=>o("li",{children:o(yr,{comment:A,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:A=>F(A.target.value),disabled:P}),$.length>0&&o("div",{class:"compose-attachments",children:$.map((A,U)=>o("div",{class:"compose-attachment",children:[o("img",{src:A.preview,alt:a["detail.attachment_alt"]}),o("button",{type:"button",class:"compose-attachment-remove","aria-label":a["detail.attach_remove"],onClick:()=>j(U),disabled:P,children:"\xD7"})]},A.preview))}),N&&o("p",{class:"compose-attach-error",role:"alert",children:N}),o("input",{ref:W,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 A;return(A=W.current)==null?void 0:A.click()},disabled:P||$.length>=5,children:a["detail.attach_add"]}),Rt&&o("button",{type:"button",class:"btn",onClick:yo,disabled:D||H,children:D?a["detail.close_busy"]:a["detail.close_cta"]}),Rt&&o("button",{type:"button",class:"btn btn--ghost",onClick:_o,disabled:D||H,children:H?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:pe,disabled:!k.trim()&&$.length===0||P,children:P?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,m,d;let r=(c=e.errors)!=null?c:[],a=((m=e.consoleLogs)!=null?m:[]).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(`
618
+ `))}e.push(c)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function Vt(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(n,i){let s=performance.now(),l=typeof n=="string"?n:n instanceof URL?n.toString():n.url,d=((i==null?void 0:i.method)||(n instanceof Request?n.method:"GET")).toUpperCase();try{let c=await r(n,i);return e.push({url:t(l),method:d,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let f=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:d,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:le(f)}),c}},()=>{window.fetch=r}}function Gt(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 Xt(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?le(n):void 0;e.push({message:le(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(d){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?le(s):void 0;e.push({message:le(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function Yt(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:ye(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var Se=class{constructor(t){Te(this,"max",t);Te(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 Jt(e={}){var b;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(b=e.sanitizeUrl)!=null?b:ye,i=new Se(t),s=new Se(r),l=new Se(a),d=Ut(i),c=Vt(s,n),f=Gt(s,n),p=Xt(l),u=Yt();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Qt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){d(),c(),f(),p(),u.dispose()}}}var Go={"fab.label":"Send feedback","page.badge.aria":"Feedback \u2014 {n} open on this page","page.badge.aria.one":"Feedback \u2014 1 open on this page","page.strip.text":"{n} open reports on this page","page.strip.text.one":"1 open report on this page","page.strip.view":"View","page.peek.title":"On this page","page.peek.viewAll":"View all {n}","page.peek.viewAll.one":"View 1 open report","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.success.seq":"Thanks \u2014 report #{seq} was sent. \u2713","form.discard.title":"Unsaved changes","form.discard.body":"Discard your feedback?","form.discard.keep":"Keep editing","form.discard.confirm":"Discard","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.screenshot.error_count":"Too many screenshots (max {max}).","form.context.label":"Page","form.capture.notice":"Console, network activity and errors are captured automatically to help us debug.","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports.","board.retry":"Try again","board.list.you":"you","board.list.count":"{n} of {total}","board.list.loadMore":"Show more","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.scope.thisPage":"This page","board.scope.allPages":"All pages","board.scope.onThisPage":"on this page","board.list.count.page":"{n} of {total} \xB7 this page","board.list.empty.page.title":"No feedback on this page yet.","board.list.empty.page.description":"Be the first to report something here \u2014 or browse the whole project.","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.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"},Xo={"fab.label":"Envoyer un commentaire","page.badge.aria":"Retours \u2014 {n} ouverts sur cette page","page.badge.aria.one":"Retours \u2014 1 ouvert sur cette page","page.strip.text":"{n} retours ouverts sur cette page","page.strip.text.one":"1 retour ouvert sur cette page","page.strip.view":"Voir","page.peek.title":"Sur cette page","page.peek.viewAll":"Voir les {n}","page.peek.viewAll.one":"Voir 1 retour ouvert","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.success.seq":"Merci \u2014 rapport n\xB0{seq} envoy\xE9. \u2713","form.discard.title":"Modifications non enregistr\xE9es","form.discard.body":"Abandonner votre commentaire ?","form.discard.keep":"Continuer la saisie","form.discard.confirm":"Abandonner","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.screenshot.error_count":"Trop de captures d\u2019\xE9cran (max {max}).","form.context.label":"Page","form.capture.notice":"La console, l\u2019activit\xE9 r\xE9seau et les erreurs sont captur\xE9es automatiquement pour faciliter le diagnostic.","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports.","board.retry":"R\xE9essayer","board.list.you":"vous","board.list.count":"{n} sur {total}","board.list.loadMore":"Afficher plus","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.scope.thisPage":"Cette page","board.scope.allPages":"Toutes les pages","board.scope.onThisPage":"sur cette page","board.list.count.page":"{n} sur {total} \xB7 cette page","board.list.empty.page.title":"Aucun retour sur cette page pour l\u2019instant.","board.list.empty.page.description":"Soyez le premier \xE0 signaler quelque chose ici \u2014 ou parcourez tout le projet.","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.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"},Yo={fr:Xo};function Jo(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=Yo[t])!=null?r:null}function Zt(e,t={}){var a;let r=(a=Jo(t.locale))!=null?a:{};return{...Go,...r,...e}}de();oe();function pe(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var kt="mfb:locationchange",Sr=!1;function da(){if(!(Sr||typeof history=="undefined")){Sr=!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(kt)),a}}}}function et(e){return da(),window.addEventListener("popstate",e),window.addEventListener(kt,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(kt,e)}}oe();var _e=new Map;function Cr(e,t){return`${e}|${t}`}function Rr(e){let t=_e.get(e);return t&&Date.now()-t.at<6e4?t:null}function qr(e,t,r){if(!_e.has(e)&&_e.size>=50){let a=_e.keys().next().value;a!==void 0&&_e.delete(a)}_e.delete(e),_e.set(e,{page:t,kpis:r,at:Date.now()})}var Er="mhosaic.boardView.";function Pr(e){try{let t=localStorage.getItem(Er+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Tr(e,t){try{localStorage.setItem(Er+e,JSON.stringify(t))}catch(r){}}function be(e,t){let r=!1,a=!1,n=0,i=null,s=typeof document!="undefined"?document:null,l=()=>Math.min(t*2**n,t*10),d=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let f=!1;try{f=await e()}catch(p){f=!1}r||(n=f?0:n+1,i=setTimeout(()=>{d()},l()))},c=()=>{r||!a||s!=null&&s.hidden||(a=!1,d())};return s==null||s.addEventListener("visibilitychange",c),d(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",c)}}}function Ee(e,t){return e instanceof Me?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}oe();de();de();var pa=0;function o(e,t,r,a,n,i){t||(t={});var s,l,d=t;if("ref"in d)for(l in d={},t)l=="ref"?s=t[l]:d[l]=t[l];var c={type:e,props:d,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--pa,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)d[l]===void 0&&(d[l]=s[l]);return j.vnode&&j.vnode(c),c}var Mr=/#(\d+)/g;function Be(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;Mr.lastIndex=0;let i;for(;(i=Mr.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 Ar({comment:e,strings:t,onOpenSeq:r,stableUrl:a}){var p;let n=e.is_mine,i=!n&&e.author_source==="mcp",s=!n&&e.author_source==="system",l=i?"mcp":s?"system":"staff",d=l==="mcp"?"detail.author.mcp":l==="system"?"detail.author.system":"detail.author.staff",c=e.author_label||t[d],f=((p=e.attachments)!=null?p:[]).filter(u=>u.url);return o("div",{class:`comment-bubble ${n?"is-mine":"is-other"}`,children:[!n&&c&&o("div",{class:`comment-author comment-author--${l}`,children:c}),e.body&&o("div",{class:"comment-body",children:Be(e.body,r)}),f.length>0&&o("div",{class:"comment-attachments",children:f.map(u=>{let b=a?a(`att:${u.id}`,u.url):u.url;return o("a",{class:"comment-attachment",href:b,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:b,alt:t["detail.attachment_alt"],loading:"lazy"})},u.id)})}),o("div",{class:"comment-time",children:ua(e.created_at)})]})}function ua(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var fa=["image/png","image/jpeg","image/webp"];function tt(e){return fa.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function Pe(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 St(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 ma=3e4;function rt({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l,buildPermalink:d,seed:c}){var Ft,It,Dt,$t,Ot,Kt;let[f,p]=q(null),[u,b]=q(null),[x,C]=q(!1),[_,k]=q(!1),[R,y]=q(""),[v,g]=q(!1),[E,w]=q(!1),[F,P]=q(""),[L,D]=q(!1),[I,Q]=q(!1),[A,K]=q(!1),[H,Y]=q([]),[ee,J]=q(""),m=U(null),h=U(!0),M=U(new Map),[,B]=q(0),W=45*6e4,z=(T,O)=>{if(!O)return O;let G=M.current.get(T);return G&&Date.now()-G.at<W?G.url:(M.current.set(T,{url:O,at:Date.now()}),O)},$=T=>{M.current.delete(T),B(O=>O+1)},te=U(H);te.current=H,N(()=>()=>te.current.forEach(T=>URL.revokeObjectURL(T.preview)),[]);let ae=T=>{J("");let O=5-H.length,G=T.slice(0,Math.max(0,O));for(let Z of G){let ce=tt(Z);if(ce){J(ce.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(ce.maxMb)));return}}if(G.length){let Z=G.map(ce=>({blob:ce,preview:URL.createObjectURL(ce)}));Y(ce=>[...ce,...Z])}T.length>G.length&&J(a["form.screenshot.error_count"].replace("{max}",String(5)))},we=T=>{var Z;let O=T.target,G=Array.from((Z=O.files)!=null?Z:[]);G.length&&ae(G),O.value=""},se=T=>{let O=H[T];O&&URL.revokeObjectURL(O.preview),Y(G=>G.filter((Z,ce)=>ce!==T)),J("")},ke=async()=>{try{let T=await e.getReport(r,t);return h.current&&(p(T),b(null)),!0}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",T),!h.current)return!1;let O=Ee(T,a);return b(O!=null?O:"load_failed"),!1}};N(()=>{h.current=!0;let T=be(ke,ma);return()=>{h.current=!1,T.stop()}},[r,t]);let ve=async()=>{if(!(!F.trim()&&H.length===0||L)){D(!0);try{let T=`${r}:${Date.now()}`,O=H.map(Z=>Z.blob),G=await e.addComment(r,t,F.trim(),T,O.length?O:void 0);if(!h.current)return;P(""),H.forEach(Z=>URL.revokeObjectURL(Z.preview)),Y([]),J(""),p(Z=>Z&&{...Z,comments:ga(Z.comments,G)}),ke()}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",T),!h.current)return;b(a["detail.send_failed"])}finally{h.current&&D(!1)}}},Oe=async()=>{if(!(!d||!f))try{if(await navigator.clipboard.writeText(d(f.id)),!h.current)return;C(!0),setTimeout(()=>{h.current&&C(!1)},2e3)}catch(T){}},Po=()=>{f&&(y(f.description),w(!1),k(!0))},To=()=>{k(!1),w(!1)},Mo=async()=>{if(!f||v)return;let T=R.trim();if(T){g(!0),w(!1);try{let O=await e.editDescription(r,t,T);if(!h.current)return;p(O),k(!1)}catch(O){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",O),!h.current)return;w(!0)}finally{h.current&&g(!1)}}},Ao=async()=>{if(!(I||A)){Q(!0);try{let T=await e.closeAsResolved(r,t);if(!h.current)return;p(T)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",T),!h.current)return;b(a["detail.close_failed"])}finally{h.current&&Q(!1)}}},Lo=async()=>{if(!(I||A)){K(!0);try{let T=await e.reopenUnresolved(r,t);if(!h.current)return;p(T)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",T),!h.current)return;b(a["detail.reopen_failed"])}finally{h.current&&K(!1)}}};if(!f&&!u){if(c){let T=o("span",{class:`pill pill-status pill-status--${c.status}`,children:(Ft=a[`status.${c.status}`])!=null?Ft:c.status});return o("div",{class:`report-detail variant-${s} is-seeded`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),T]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),T]}),o("div",{class:"report-detail-body",children:[o("div",{class:"report-detail-description-row",children:o("p",{class:"report-detail-description",children:Be(c.description,l)})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),o("div",{class:"mine-loading",children:a["mine.loading"]})]})]})}return o("div",{class:"mine-loading",children:a["mine.loading"]})}if(!f)return u&&u!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:u}),o("button",{type:"button",class:"btn",onClick:()=>{ke()},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 Lt=(It=f.is_mine)!=null?It:i,Bt=(Dt=f.can_moderate)!=null?Dt:Lt,zt=Bt&&f.status==="awaiting_validation",Bo=Bt;return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${f.status}`,children:($t=a[`status.${f.status}`])!=null?$t:f.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${f.status}`,children:(Ot=a[`status.${f.status}`])!=null?Ot:f.status})]}),o("div",{class:"report-detail-body",children:[o(ba,{detail:f,strings:a}),_?o("div",{class:"report-detail-edit",children:[o("textarea",{class:"report-detail-edit-input",value:R,onInput:T=>{y(T.target.value),w(!1)},disabled:v}),E&&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:To,disabled:v,children:a["detail.edit_cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:Mo,disabled:v||!R.trim(),children:v?a["detail.edit_saving"]:a["detail.edit_save"]})]})]}):o("div",{class:"report-detail-description-row",children:[o("p",{class:"report-detail-description",children:Be(f.description,l)}),Lt&&o("button",{type:"button",class:"btn btn--ghost report-detail-edit",onClick:Po,children:a["detail.edit"]})]}),d&&o("div",{class:"report-detail-permalink",children:o("button",{type:"button",class:"btn btn--ghost report-detail-copy-link",onClick:Oe,children:x?a["detail.copied"]:a["detail.copy_link"]})}),((Kt=f.screenshots)!=null&&Kt.length?f.screenshots.map(T=>T.url):[f.screenshot_url]).map((T,O)=>({url:z(`shot:${O}`,T!=null?T:null),pinKey:`shot:${O}`})).filter(T=>!!T.url).map(({url:T,pinKey:O})=>{let G=St(T);return G?o("a",{class:"report-detail-screenshot",href:G,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:T,alt:"",loading:"lazy",onError:()=>$(O)})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:T,alt:"",loading:"lazy",onError:()=>$(O)})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),f.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:f.comments.map(T=>o("li",{children:o(Ar,{comment:T,strings:a,...l&&{onOpenSeq:l},stableUrl:(O,G)=>{var Z;return(Z=z(O,G))!=null?Z:G}})}))}),f.status_history&&f.status_history.length>0&&o(Ca,{rows:f.status_history,strings:a}),f.technical_context&&o(ya,{ctx:f.technical_context,strings:a}),Bo?o("div",{class:"report-compose",children:[o("textarea",{value:F,placeholder:a["detail.compose_placeholder"],onInput:T=>P(T.target.value),disabled:L}),H.length>0&&o("div",{class:"compose-attachments",children:H.map((T,O)=>o("div",{class:"compose-attachment",children:[o("img",{src:T.preview,alt:a["detail.attachment_alt"]}),o("button",{type:"button",class:"compose-attachment-remove","aria-label":a["detail.attach_remove"],onClick:()=>se(O),disabled:L,children:"\xD7"})]},T.preview))}),ee&&o("p",{class:"compose-attach-error",role:"alert",children:ee}),o("input",{ref:m,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"compose-attach-input",onChange:we,hidden:!0}),o("div",{class:"report-compose-actions",children:[o("button",{type:"button",class:"btn btn--ghost compose-attach-btn",onClick:()=>{var T;return(T=m.current)==null?void 0:T.click()},disabled:L||H.length>=5,children:a["detail.attach_add"]}),zt&&o("button",{type:"button",class:"btn",onClick:Ao,disabled:I||A,children:I?a["detail.close_busy"]:a["detail.close_cta"]}),zt&&o("button",{type:"button",class:"btn btn--ghost",onClick:Lo,disabled:I||A,children:A?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ve,disabled:!F.trim()&&H.length===0||L,children:L?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),u&&o("div",{class:"error",children:u})]})]})}function ga(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function ba({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:Lr(e.created_at)})]}),e.page_url&&(()=>{let i=St(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:Pe(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:Pe(e.page_url,64)})]})})()]})}function Lr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var ha=20,va=15;function ya({ctx:e,strings:t}){var c,f,p;let r=(c=e.errors)!=null?c:[],a=((f=e.consoleLogs)!=null?f:[]).slice(-ha),n=((p=e.networkRequests)!=null?p:[]).slice(-va),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,d=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:d}),o("div",{class:"tech-body",children:[i&&o(_a,{device:i,strings:t}),r.length>0&&o(xa,{errors:r,strings:t}),a.length>0&&o(wa,{logs:a,strings:t}),n.length>0&&o(ka,{rows:n,strings:t})]})]})}function _a({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(re,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function xa({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:Sa(r.stack)})]}))})]})}function wa({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 ka({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:Pe(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Sa(e){let t=e.split(`
619
619
  `);return t.length<=12?e:t.slice(0,12).join(`
620
620
  `)+`
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 fa=3e4,ma=300,ga=["recent","oldest","updated","severity","status"],ba=["new","in_progress","awaiting_validation","closed","rejected"],ha=["bug","feature","question","praise","typo"],va=["blocker","high","medium","low"];function wr({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var M,$;let[i,s]=E(()=>br(t)),[l,u]=E(!0);O(()=>{hr(t,i)},[t,xr(i)]);let[c,m]=E(null),[d,p]=E(null),[b,v]=E(!0),[C,h]=E(null),[x,R]=E(n!=null?n:null),[y,_]=E(0),[g,q]=E(0),[k,F]=E((M=i.q)!=null?M:""),P=Ta(k,ma);O(()=>{s(L=>{var N;if(((N=L.q)!=null?N:"")===P)return L;if(P===""){let{q:Q,...W}=L;return W}return{...L,q:P}})},[P]),O(()=>{var L;F((L=i.q)!=null?L:"")},[i.q]);let B=re(()=>{var L,N,Q,W,f,S;return((N=(L=i.status)==null?void 0:L.length)!=null?N:0)+((W=(Q=i.type)==null?void 0:Q.length)!=null?W:0)+((S=(f=i.severity)==null?void 0:f.length)!=null?S:0)+(i.q?1:0)+(i.mine?1:0)},[i]);O(()=>{if(l)return Qe(()=>q(L=>L+1))},[l]);let D=re(()=>{var N;let L=!!((N=i.q)!=null&&N.trim());return l&&!L?{...i,pagePath:se(a!==void 0?{getCurrentPage:a}:{})}:i},[xr(i),l,g]);O(()=>{let L=!1;m(null),p(null),v(!0);let N=fe(async()=>{var Q;try{let[W,f]=await Promise.all([e.listBoard(t,D),e.fetchBoardKpis(t,D)]);return L||(m(W),p(f),h(null)),!0}catch(W){return L||h((Q=xe(W,r))!=null?Q:r["board.list.error"]),!1}finally{L||v(!1)}},fa);return()=>{L=!0,N.stop()}},[e,t,JSON.stringify(D)]);let I=re(()=>{var L;return!x||!c?null:(L=c.results.find(N=>N.id===x))!=null?L:null},[x,c]),H=L=>{R(L.id),_(N=>N+1)};return o("div",{class:"board-view",children:[o(ya,{strings:r,kpis:d,thisPage:l}),o(xa,{filters:i,onChange:s,searchDraft:k,onSearchDraftChange:F,activeCount:B,strings:r,thisPage:l,onToggleThisPage:()=>u(L=>!L)}),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(L=>L+1)},children:r["board.retry"]})]}),!C&&b&&!c&&o(Ca,{}),!C&&c&&c.results.length===0&&!b&&o(Sa,{strings:r,thisPage:l,onAllPages:()=>u(!1)}),!C&&c&&c.results.length>0&&o(wa,{rows:c.results,selectedId:x,onPick:H,strings:r,total:c.count,thisPage:l})]}),o("div",{class:`board-detail-wrap ${I?"has-selection":""}`,children:I?o(Ve,{api:e,externalId:t,reportId:I.id,strings:r,onBack:()=>R(null),canModerate:($=I.can_moderate)!=null?$:I.is_mine,variant:"board",onOpenSeq:L=>{e.getReportBySeq(L,t).then(N=>{R(N.id),_(Q=>Q+1)}).catch(()=>{})}},y):o("div",{class:"board-detail-empty",children:[o(Pa,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function ya({strings:e,kpis:t,thisPage:r}){let a=r?e["board.scope.onThisPage"]:(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${a}`:a})]})]}),o(_a,{kpis:t,strings:e})]})}function _a({kpis:e,strings:t}){var a,n,i,s,l,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 xa({filters:e,onChange:t,searchDraft:r,onSearchDraftChange:a,activeCount:n,strings:i,thisPage:s,onToggleThisPage:l}){var v,C,h,x,R,y,_;let u=g=>{if(g===""){let{status:q,...k}=e;t(k)}else t({...e,status:[g]})},c=g=>{if(g===""){let{type:q,...k}=e;t(k)}else t({...e,type:[g]})},m=g=>{if(g===""){let{severity:q,...k}=e;t(k)}else t({...e,severity:[g]})},d=g=>t({...e,ordering:g}),p=()=>{if(e.mine){let{mine:g,...q}=e;t(q)}else t({...e,mine:!0})},b=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":i["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${s?"is-active":""}`,"aria-pressed":s,onClick:()=>!s&&l(),children:i["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${s?"":"is-active"}`,"aria-pressed":!s,onClick:()=>s&&l(),children:i["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":i["board.sort"],value:(v=e.ordering)!=null?v:"recent",onChange:g=>d(g.target.value),children:ga.map(g=>o("option",{value:g,children:i[`board.sort.${g}`]},g))}),o("select",{class:"board-filter-select","aria-label":i["board.filter.status"],value:(h=(C=e.status)==null?void 0:C[0])!=null?h:"",onChange:g=>u(g.target.value),children:[o("option",{value:"",children:i["board.filter.status"]}),ba.map(g=>{var q;return o("option",{value:g,children:(q=i[`board.kpi.${g}`])!=null?q:g},g)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.type"],value:(R=(x=e.type)==null?void 0:x[0])!=null?R:"",onChange:g=>c(g.target.value),children:[o("option",{value:"",children:i["board.filter.type"]}),ha.map(g=>{var q;return o("option",{value:g,children:(q=i[`type.${g}`])!=null?q:g},g)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.severity"],value:(_=(y=e.severity)==null?void 0:y[0])!=null?_:"",onChange:g=>m(g.target.value),children:[o("option",{value:"",children:i["board.filter.severity"]}),va.map(g=>{var q;return o("option",{value:g,children:(q=i[`severity.${g}`])!=null?q:g},g)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:i["board.filter.search.placeholder"],value:r,onInput:g=>a(g.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:p}),o("span",{children:i["board.filter.mine"]})]}),n>0&&o("button",{type:"button",class:"board-filter-clear",onClick:b,children:[o(qa,{}),i["board.filter.clear"]]})]})}function wa({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(ka,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function ka({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(Ra,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Aa(e.created_at)})]})]})})}function Sa({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(Ea,{}),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 Ca(){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 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("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 qa(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Ea(){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 Pa(){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 Ta(e,t){let[r,a]=E(e);return O(()=>{let n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}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 Aa(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 Ma(e){return`pill pill-status pill-status--${e}`}function La(e){return`pill pill-severity pill-severity--${e}`}function za(){return"pill pill-type"}function Ba(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 Fa(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:Ma(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:za(),children:t[`type.${e.feedback_type}`]}),o("span",{class:La(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:Ba(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Fa(e.comment_count,t)]})]})]})}var Ia=3e4;function Da(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 $a(e){let t=new Map;for(let r of e){let a=Da(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:Oa(r),rows:a}))}function Oa(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]=E(null),[s,l]=E(null),[u,c]=E(!1),m=V(!0),d=async()=>{c(!0),l(null);try{let C=await e.listChangelog(t);return m.current&&i(C),!0}catch(C){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",C),m.current&&l(r["mine.error"]),!1}finally{m.current&&c(!1)}};O(()=>{m.current=!0;let C=fe(d,Ia);return()=>{m.current=!1,C.stop()}},[t]);let p=re(()=>n?$a(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 Ha(){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(Ha,{}),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"],Na=.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")Ka(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=Na,e.fillRect(Xe(t.x,t.w),Xe(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&ja(e,t,r);e.restore()}function Xe(e,t){return t<0?e+t:e}function Ka(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 ja(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 m=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,m,d,c,u,m,d)}e.imageSmoothingEnabled=!1;for(let u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let m=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,1,1,c,u,m,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=V(null),i=V(null),s=V(null),[l,u]=E("rectangle"),[c,m]=E(Cr[0]),[d,p]=E([]),[b,v]=E([]),[C,h]=E([]),x=V(!1),[R,y]=E(null),[_,g]=E(!1),[q,k]=E(!1),F=V(1);function P(f){p(S=>(v(T=>[...T,S]),[...S,f])),h([])}function B(){p(f=>(v(S=>[...S,f]),[])),h([])}function D(){v(f=>{if(f.length===0)return f;let S=f[f.length-1];return p(T=>(h(z=>[T,...z]),S)),f.slice(0,-1)})}function I(){h(f=>{if(f.length===0)return f;let S=f[0];return p(T=>(v(z=>[...z,T]),S)),f.slice(1)})}ft(()=>{let f=S=>{S.key==="Escape"&&(S.stopPropagation(),a())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[a]),O(()=>{let f=S=>{if(!(S.metaKey||S.ctrlKey))return;let z=S.key.toLowerCase();z==="z"?(S.preventDefault(),S.stopPropagation(),S.shiftKey?I():D()):z==="y"&&(S.preventDefault(),S.stopPropagation(),I())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[b,C,d]),O(()=>{let f=URL.createObjectURL(e),S=new Image;return S.onload=()=>{s.current=S,g(!0)},S.src=f,()=>URL.revokeObjectURL(f)},[e]),ft(()=>{if(!_||!n.current||!s.current||!i.current)return;let f=s.current,T=i.current.clientWidth-16,z=window.innerHeight*.65,j=Math.min(T/f.width,z/f.height,1);F.current=j;let Y=n.current;Y.width=f.width,Y.height=f.height,Y.style.width=`${f.width*j}px`,Y.style.height=`${f.height*j}px`,H()},[_]),O(()=>{H()},[d,R]);function H(){let f=n.current,S=s.current;if(!f||!S)return;let T=f.getContext("2d");if(T){T.clearRect(0,0,f.width,f.height),T.drawImage(S,0,0);for(let z of d)Rr(T,z,S);R&&Rr(T,R,S)}}function M(f){let T=n.current.getBoundingClientRect();return{x:(f.clientX-T.left)/F.current,y:(f.clientY-T.top)/F.current}}let $=f=>{if(!_)return;let{x:S,y:T}=M(f),z=n.current.width,j=Math.max(3,Math.round(z/400)),Y=Math.max(8,Math.round(z/80));if(l==="text"){let pe=window.prompt(t["annotator.text_prompt"]);pe&&pe.trim()&&P({kind:"text",x:S,y:T,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:T,w:0,h:0,color:c,lineWidth:j}):l==="arrow"?y({kind:"arrow",x1:S,y1:T,x2:S,y2:T,color:c,lineWidth:j}):l==="freehand"?y({kind:"freehand",points:[{x:S,y:T}],color:c,lineWidth:j}):l==="highlight"?y({kind:"highlight",x:S,y:T,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&y({kind:"blur",x:S,y:T,w:0,h:0,color:"#000000",lineWidth:0,tile:Y})},L=f=>{if(!x.current)return;let{x:S,y:T}=M(f);y(z=>z&&(z.kind==="rectangle"||z.kind==="highlight"||z.kind==="blur"?{...z,w:S-z.x,h:T-z.y}:z.kind==="arrow"?{...z,x2:S,y2:T}:z.kind==="freehand"?{...z,points:[...z.points,{x:S,y:T}]}:z))},N=()=>{y(f=>(x.current&&f&&((f.kind==="rectangle"||f.kind==="highlight"||f.kind==="blur")&&Math.abs(f.w)<4&&Math.abs(f.h)<4||f.kind==="arrow"&&Math.hypot(f.x2-f.x1,f.y2-f.y1)<4||f.kind==="freehand"&&f.points.length<3||P(f)),null)),x.current=!1},Q=async()=>{let f=n.current;if(f){k(!0);try{let S=await new Promise(T=>f.toBlob(T,"image/png",.92));S&&r(S)}finally{k(!1)}}},W=[{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:f=>{f.target===f.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:W.map(f=>o("button",{type:"button",onClick:()=>u(f.id),title:f.label,"aria-label":f.label,"aria-pressed":l===f.id,class:`annotator-tool ${l===f.id?"is-active":""}`,children:f.icon},f.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Cr.map(f=>o("button",{type:"button",onClick:()=>m(f),"aria-label":f,"aria-pressed":c===f,class:`annotator-color ${c===f?"is-active":""}`,style:{backgroundColor:f}},f)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:f=>m(f.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:D,disabled:b.length===0,title:t["annotator.undo"],children:[le.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:I,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:$,onMouseMove:L,onMouseUp:N,onMouseLeave:N,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:Q,disabled:q||!_,children:q?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var Qa=["bug","feature","question","praise","typo"],Wa=["blocker","high","medium","low"];function Er({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,u]=E(""),[c,m]=E("bug"),[d,p]=E("medium"),[b,v]=E(""),[C,h]=E([]),[x,R]=E(!1),[y,_]=E(null),g=V(null),q=V(null),k=a==="submitting",F=k?e["form.submitting"]:e["form.submit"],P=typeof window!="undefined"?window.location.href:"",B=l.trim()!==""||C.length>0;O(()=>{s==null||s(B)},[B]);let D=V(C);D.current=C,O(()=>()=>{D.current.forEach(f=>URL.revokeObjectURL(f.preview))},[]);let I=f=>{v("");let S=5-C.length,T=f.slice(0,Math.max(0,S));for(let z of T)if(z instanceof File){let j=Ue(z);if(j){v(j.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(j.maxMb)));return}}if(T.length){let z=T.map(j=>({blob:j,preview:URL.createObjectURL(j)}));h(j=>[...j,...z])}f.length>T.length&&v(e["form.screenshot.error_count"].replace("{max}",String(5)))},H=f=>{let S=C[f];S&&URL.revokeObjectURL(S.preview),h(T=>T.filter((z,j)=>j!==f)),v(""),g.current&&(g.current.value="")},M=f=>{var z;let S=f.target,T=Array.from((z=S.files)!=null?z:[]);T.length&&I(T),S.value=""},$=f=>{f.preventDefault(),f.stopPropagation(),R(!0)},L=f=>{f.preventDefault(),f.stopPropagation(),f.currentTarget===f.target&&R(!1)},N=f=>{var T,z;f.preventDefault(),f.stopPropagation(),R(!1);let S=Array.from((z=(T=f.dataTransfer)==null?void 0:T.files)!=null?z:[]);S.length&&I(S)};O(()=>{let f=q.current;if(!f)return;let S=T=>{var j;let z=(j=T.clipboardData)==null?void 0:j.items;if(z){for(let Y of Array.from(z))if(Y.kind==="file"&&Y.type.startsWith("image/")){let pe=Y.getAsFile();if(pe){T.preventDefault(),I([pe]);return}}}};return f.addEventListener("paste",S),()=>f.removeEventListener("paste",S)},[C.length]);let Q=f=>{let S=y;if(S===null||!C[S]){_(null);return}URL.revokeObjectURL(C[S].preview);let T={blob:f,preview:URL.createObjectURL(f)};h(z=>z.map((j,Y)=>Y===S?T:j)),_(null)};return o("form",{onSubmit:f=>{if(f.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(T=>T.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:f=>u(f.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:f=>m(f.target.value),children:Qa.map(f=>o("option",{value:f,children:e[`type.${f}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:d,onChange:f=>p(f.target.value),children:Wa.map(f=>o("option",{value:f,children:e[`severity.${f}`]}))})]})]}),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((f,S)=>o("div",{class:"screenshot-preview",children:[o("img",{src:f.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:()=>H(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"]]})]})]},f.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 f;return(f=g.current)==null?void 0:f.click()},onKeyDown:f=>{var S;(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),(S=g.current)==null||S.click())},onDragOver:$,onDragLeave:L,onDrop:N,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),P&&o("div",{class:"page-context",title:P,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:we(P,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:Q})]})}Z();function Ua(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 Va(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var Ga={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=>Ga[r.status]===t)}function Tr({rows:e,filter:t,onFilter:r,strings:a}){let n=Ua(e),i=Va(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 Xa=3e4;function Ar({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var B;let[i,s]=E(null),[l,u]=E(null),[c,m]=E(!1),[d,p]=E("all"),[b,v]=E(""),[C,h]=E(!1),[x,R]=E(!1),y=V(!0),_=async D=>{if(D.preventDefault(),!n||x)return;let I=parseInt(b.replace(/^#/,"").trim(),10);if(!Number.isInteger(I)||I<=0){h(!0);return}R(!0),h(!1);try{let H=await n(I);if(!y.current)return;H?v(""):h(!0)}finally{y.current&&R(!1)}},g=async()=>{var D;m(!0),u(null);try{let I=await e.listMine(t);return y.current&&s(I),!0}catch(I){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",I),y.current&&u((D=xe(I,r))!=null?D:r["mine.error"]),!1}finally{y.current&&m(!1)}};O(()=>{y.current=!0;let D=fe(g,Xa);return()=>{y.current=!1,D.stop()}},[t]);let q=i!==null&&i.length===0,k=i===null&&!l,F=i?Pr(i,d):null,P=!!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:D=>{v(D.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"]})]}),P&&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(D=>o("li",{children:o(Ge,{row:D,strings:r,onClick:()=>a(D)})}))})]})}Z();function Mr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=V(null),i=V(null);return O(()=>{var u;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let m=(d=n.current)==null?void 0:d.getRootNode();m instanceof ShadowRoot&&m.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]=E(null),[m,d]=E(!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&&!m&&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 Ya=6e4;function Ja(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 Za(){vt.clear()}function en(e,t,r){let a=`${t}|${r}`,n=vt.get(a);if(n&&Date.now()-n.fetchedAt<Ya)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=Ja(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]=E(0),[l,u]=E(0),c=de(()=>{Za(),u(m=>m+1)},[]);return O(()=>{if(!n||!t||!r){s(0);return}let m=!1,d=()=>{let b=se(a!==void 0?{getCurrentPage:a}:{});en(t,r,b).then(v=>{m||s(v)}).catch(()=>{m||s(0)})};d();let p=Qe(d);return()=>{m=!0,p()}},[t,r,n,l]),{open:i,refresh:c}}var Fr=`
621
+ \u2026`}function Ca({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:Lr(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 Ra=3e4,qa=300,Ea=["recent","oldest","updated","severity","status"],Pa=["new","in_progress","awaiting_validation","closed","rejected"],Ta=["bug","feature","question","praise","typo"],Ma=["blocker","high","medium","low"];function Fr({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var B,W;let[i,s]=q(()=>Pr(t)),[l,d]=q(!0);N(()=>{Tr(t,i)},[t,zr(i)]);let[c,f]=q(null),[p,u]=q(null),[b,x]=q(!0),[C,_]=q(!1),[k,R]=q(null),[y,v]=q(n!=null?n:null),[g,E]=q(0),[w,F]=q(0),[P,L]=q(null),[D,I]=q(!1),[Q,A]=q((B=i.q)!=null?B:""),K=Ha(Q,qa);N(()=>{s(z=>{var $;if((($=z.q)!=null?$:"")===K)return z;if(K===""){let{q:te,...ae}=z;return ae}return{...z,q:K}})},[K]),N(()=>{var z;A((z=i.q)!=null?z:"")},[i.q]);let H=ne(()=>{var z,$,te,ae,we,se;return(($=(z=i.status)==null?void 0:z.length)!=null?$:0)+((ae=(te=i.type)==null?void 0:te.length)!=null?ae:0)+((se=(we=i.severity)==null?void 0:we.length)!=null?se:0)+(i.q?1:0)+(i.mine?1:0)},[i]);N(()=>{if(l)return et(()=>F(z=>z+1))},[l]);let Y=ne(()=>{var $;let z=!!(($=i.q)!=null&&$.trim());return l&&!z?{...i,pagePath:pe(a!==void 0?{getCurrentPage:a}:{})}:i},[zr(i),l,w]);N(()=>{let z=!1,$=new AbortController,te=Cr(t,JSON.stringify(Y)),ae=Rr(te);ae?(f(ae.page),u(ae.kpis),_(!1),x(!1)):(f(se=>se?{...se,results:ja(se.results,Y)}:null),_(!0),x(!0)),L(null),I(!1);let we=be(async()=>{var se,ke;try{let ve=await e.listBoard(t,Y,{signal:$.signal}),Oe=(se=ve.kpis)!=null?se:await e.fetchBoardKpis(t,Y,{signal:$.signal});return z||(qr(te,ve,Oe),f(ve),u(Oe),_(!1),R(null)),!0}catch(ve){return z||R((ke=Ee(ve,r))!=null?ke:r["board.list.error"]),!1}finally{z||x(!1)}},Ra);return()=>{z=!0,we.stop(),$.abort()}},[e,t,JSON.stringify(Y)]);let ee=ne(()=>{if(!c)return[];if(!P||P.rows.length===0)return c.results;let z=new Set(c.results.map($=>$.id));return[...c.results,...P.rows.filter($=>!z.has($.id))]},[c,P]),J=P?P.hasMore:!!(c!=null&&c.next),m=async()=>{if(D||!c)return;let z=P?P.nextPage:2;I(!0);try{let $=await e.listBoard(t,{...Y,page:z});L(te=>{var ae;return{rows:[...(ae=te==null?void 0:te.rows)!=null?ae:[],...$.results],nextPage:z+1,hasMore:$.next!==null}})}catch($){}finally{I(!1)}},h=ne(()=>{var z;return y&&(z=ee.find($=>$.id===y))!=null?z:null},[y,ee]),M=z=>{v(z.id),E($=>$+1)};return o("div",{class:`board-view ${C?"is-stale":""}`,children:[o(Aa,{strings:r,kpis:p,thisPage:l}),o(Ba,{filters:i,onChange:s,searchDraft:Q,onSearchDraftChange:A,activeCount:H,strings:r,thisPage:l,onToggleThisPage:()=>d(z=>!z)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":b,children:[k&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:k}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{R(null),x(!0),F(z=>z+1)},children:r["board.retry"]})]}),!k&&b&&!c&&o(Da,{}),!k&&c&&ee.length===0&&(!b||C)&&o(Ia,{strings:r,thisPage:l,onAllPages:()=>d(!1)}),!k&&c&&ee.length>0&&o(re,{children:[o(za,{rows:ee,selectedId:y,onPick:M,strings:r,total:c.count,thisPage:l}),J&&!C&&o("button",{type:"button",class:"btn btn--ghost board-load-more",onClick:()=>{m()},disabled:D,children:r["board.list.loadMore"]})]})]}),o("div",{class:`board-detail-wrap ${y?"has-selection":""}`,children:y?o(rt,{api:e,externalId:t,reportId:y,strings:r,onBack:()=>v(null),canModerate:h?(W=h.can_moderate)!=null?W:h.is_mine:!1,...h?{seed:h}:{},variant:"board",onOpenSeq:z=>{e.getReportBySeq(z,t).then($=>{v($.id),E(te=>te+1)}).catch(()=>{})}},g):o("div",{class:"board-detail-empty",children:[o(Na,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Aa({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(La,{kpis:t,strings:e})]})}function La({kpis:e,strings:t}){var a,n,i,s,l,d;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((d=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?d:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(c=>o("div",{class:`board-kpi-card ${c.tone}`,children:[o("div",{class:"board-kpi-value",children:c.value}),o("div",{class:"board-kpi-label",children:c.label})]},c.key))})}function Ba({filters:e,onChange:t,searchDraft:r,onSearchDraftChange:a,activeCount:n,strings:i,thisPage:s,onToggleThisPage:l}){var x,C,_,k,R,y,v;let d=g=>{if(g===""){let{status:E,...w}=e;t(w)}else t({...e,status:[g]})},c=g=>{if(g===""){let{type:E,...w}=e;t(w)}else t({...e,type:[g]})},f=g=>{if(g===""){let{severity:E,...w}=e;t(w)}else t({...e,severity:[g]})},p=g=>t({...e,ordering:g}),u=()=>{if(e.mine){let{mine:g,...E}=e;t(E)}else t({...e,mine:!0})},b=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":i["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${s?"is-active":""}`,"aria-pressed":s,onClick:()=>!s&&l(),children:i["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${s?"":"is-active"}`,"aria-pressed":!s,onClick:()=>s&&l(),children:i["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":i["board.sort"],value:(x=e.ordering)!=null?x:"recent",onChange:g=>p(g.target.value),children:Ea.map(g=>o("option",{value:g,children:i[`board.sort.${g}`]},g))}),o("select",{class:"board-filter-select","aria-label":i["board.filter.status"],value:(_=(C=e.status)==null?void 0:C[0])!=null?_:"",onChange:g=>d(g.target.value),children:[o("option",{value:"",children:i["board.filter.status"]}),Pa.map(g=>{var E;return o("option",{value:g,children:(E=i[`board.kpi.${g}`])!=null?E:g},g)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.type"],value:(R=(k=e.type)==null?void 0:k[0])!=null?R:"",onChange:g=>c(g.target.value),children:[o("option",{value:"",children:i["board.filter.type"]}),Ta.map(g=>{var E;return o("option",{value:g,children:(E=i[`type.${g}`])!=null?E:g},g)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.severity"],value:(v=(y=e.severity)==null?void 0:y[0])!=null?v:"",onChange:g=>f(g.target.value),children:[o("option",{value:"",children:i["board.filter.severity"]}),Ma.map(g=>{var E;return o("option",{value:g,children:(E=i[`severity.${g}`])!=null?E:g},g)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:i["board.filter.search.placeholder"],value:r,onInput:g=>a(g.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:u}),o("span",{children:i["board.filter.mine"]})]}),n>0&&o("button",{type:"button",class:"board-filter-clear",onClick:b,children:[o(Oa,{}),i["board.filter.clear"]]})]})}function za({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(re,{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(Fa,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function Fa({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($a,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Wa(e.created_at)})]})]})})}function Ia({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(Ka,{}),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 Da(){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 $a(){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 Oa(){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 Ka(){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 Na(){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 Ha(e,t){let[r,a]=q(e);return N(()=>{let n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}var Br={blocker:0,high:1,medium:2,low:3};function ja(e,t){var n,i,s,l;let r=e;(n=t.status)!=null&&n.length&&(r=r.filter(d=>t.status.includes(d.status))),(i=t.type)!=null&&i.length&&(r=r.filter(d=>t.type.includes(d.feedback_type))),(s=t.severity)!=null&&s.length&&(r=r.filter(d=>t.severity.includes(d.severity))),t.mine&&(r=r.filter(d=>d.is_mine));let a=r.slice();switch((l=t.ordering)!=null?l:"recent"){case"oldest":a.sort((d,c)=>d.created_at.localeCompare(c.created_at));break;case"updated":a.sort((d,c)=>c.updated_at.localeCompare(d.updated_at));break;case"severity":a.sort((d,c)=>{var f,p;return((f=Br[d.severity])!=null?f:9)-((p=Br[c.severity])!=null?p:9)});break;case"status":break;default:a.sort((d,c)=>c.created_at.localeCompare(d.created_at))}return a}function zr(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 Wa(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`}oe();function Qa(e){return`pill pill-status pill-status--${e}`}function Ua(e){return`pill pill-severity pill-severity--${e}`}function Va(){return"pill pill-type"}function Ga(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 Xa(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function ot({row:e,strings:t,onClick:r,extraMeta:a}){var i;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:Qa(e.status),children:(i=t[`status.${e.status}`])!=null?i:e.status}),o("span",{class:Va(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Ua(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:Ga(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Xa(e.comment_count,t)]}),a&&o("span",{children:["\xB7 ",a]})]})]})}var Ya=3e4;function Ja(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 Za(e){let t=new Map;for(let r of e){let a=Ja(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:en(r),rows:a}))}function en(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Ir({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=q(null),[s,l]=q(null),[d,c]=q(!1),f=U(!0),p=async()=>{c(!0),l(null);try{let C=await e.listChangelog(t);return f.current&&i(C),!0}catch(C){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",C),f.current&&l(r["mine.error"]),!1}finally{f.current&&c(!1)}};N(()=>{f.current=!0;let C=be(p,Ya);return()=>{f.current=!1,C.stop()}},[t]);let u=ne(()=>n?Za(n):[],[n]),b=n===null&&!s,x=n!==null&&n.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{p()},disabled:d,children:d?r["mine.loading"]:r["mine.refresh"]})]}),b&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),x&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),u.length>0&&o("div",{class:"changelog-groups",children:u.map(C=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",C.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[C.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(C.rows.length))})]}),o("ul",{class:"mine-rows",children:C.rows.map(_=>o("li",{children:o(ot,{row:_,strings:r,onClick:()=>a(_),extraMeta:_.pr_number?`PR #${_.pr_number}`:void 0})}))})]},C.weekKey))})]})}function tn(){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 Dr({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o(tn,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}oe();oe();var $r=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],rn=.35;function Or(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")on(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=rn,e.fillRect(at(t.x,t.w),at(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&an(e,t,r);e.restore()}function at(e,t){return t<0?e+t:e}function on(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 an(e,t,r){if(!r)return;let a=at(t.x,t.w),n=at(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let d=n;d<n+s;d+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),p=Math.min(l,n+s-d);e.drawImage(r,c,d,f,p,c,d,f,p)}e.imageSmoothingEnabled=!1;for(let d=n;d<n+s;d+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),p=Math.min(l,n+s-d);e.drawImage(r,c,d,1,1,c,d,f,p)}e.imageSmoothingEnabled=!0}var ue={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Kr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=U(null),i=U(null),s=U(null),[l,d]=q("rectangle"),[c,f]=q($r[0]),[p,u]=q([]),[b,x]=q([]),[C,_]=q([]),k=U(!1),[R,y]=q(null),[v,g]=q(!1),[E,w]=q(!1),F=U(1);function P(m){u(h=>(x(M=>[...M,h]),[...h,m])),_([])}function L(){u(m=>(x(h=>[...h,m]),[])),_([])}function D(){x(m=>{if(m.length===0)return m;let h=m[m.length-1];return u(M=>(_(B=>[M,...B]),h)),m.slice(0,-1)})}function I(){_(m=>{if(m.length===0)return m;let h=m[0];return u(M=>(x(B=>[...B,M]),h)),m.slice(1)})}xt(()=>{let m=h=>{h.key==="Escape"&&(h.stopPropagation(),a())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[a]),N(()=>{let m=h=>{if(!(h.metaKey||h.ctrlKey))return;let B=h.key.toLowerCase();B==="z"?(h.preventDefault(),h.stopPropagation(),h.shiftKey?I():D()):B==="y"&&(h.preventDefault(),h.stopPropagation(),I())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[b,C,p]),N(()=>{let m=URL.createObjectURL(e),h=new Image;return h.onload=()=>{s.current=h,g(!0)},h.src=m,()=>URL.revokeObjectURL(m)},[e]),xt(()=>{if(!v||!n.current||!s.current||!i.current)return;let m=s.current,M=i.current.clientWidth-16,B=window.innerHeight*.65,W=Math.min(M/m.width,B/m.height,1);F.current=W;let z=n.current;z.width=m.width,z.height=m.height,z.style.width=`${m.width*W}px`,z.style.height=`${m.height*W}px`,Q()},[v]),N(()=>{Q()},[p,R]);function Q(){let m=n.current,h=s.current;if(!m||!h)return;let M=m.getContext("2d");if(M){M.clearRect(0,0,m.width,m.height),M.drawImage(h,0,0);for(let B of p)Or(M,B,h);R&&Or(M,R,h)}}function A(m){let M=n.current.getBoundingClientRect();return{x:(m.clientX-M.left)/F.current,y:(m.clientY-M.top)/F.current}}let K=m=>{if(!v)return;let{x:h,y:M}=A(m),B=n.current.width,W=Math.max(3,Math.round(B/400)),z=Math.max(8,Math.round(B/80));if(l==="text"){let $=window.prompt(t["annotator.text_prompt"]);$&&$.trim()&&P({kind:"text",x:h,y:M,text:$.trim(),color:c,fontSize:Math.max(16,Math.round(B/50)),lineWidth:1});return}k.current=!0,l==="rectangle"?y({kind:"rectangle",x:h,y:M,w:0,h:0,color:c,lineWidth:W}):l==="arrow"?y({kind:"arrow",x1:h,y1:M,x2:h,y2:M,color:c,lineWidth:W}):l==="freehand"?y({kind:"freehand",points:[{x:h,y:M}],color:c,lineWidth:W}):l==="highlight"?y({kind:"highlight",x:h,y:M,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&y({kind:"blur",x:h,y:M,w:0,h:0,color:"#000000",lineWidth:0,tile:z})},H=m=>{if(!k.current)return;let{x:h,y:M}=A(m);y(B=>B&&(B.kind==="rectangle"||B.kind==="highlight"||B.kind==="blur"?{...B,w:h-B.x,h:M-B.y}:B.kind==="arrow"?{...B,x2:h,y2:M}:B.kind==="freehand"?{...B,points:[...B.points,{x:h,y:M}]}:B))},Y=()=>{y(m=>(k.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||P(m)),null)),k.current=!1},ee=async()=>{let m=n.current;if(m){w(!0);try{let h=await new Promise(M=>m.toBlob(M,"image/png",.92));h&&r(h)}finally{w(!1)}}},J=[{id:"rectangle",icon:ue.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ue.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ue.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ue.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ue.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ue.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:m=>{m.target===m.currentTarget&&a()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:a,children:ue.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:J.map(m=>o("button",{type:"button",onClick:()=>d(m.id),title:m.label,"aria-label":m.label,"aria-pressed":l===m.id,class:`annotator-tool ${l===m.id?"is-active":""}`,children:m.icon},m.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[$r.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:D,disabled:b.length===0,title:t["annotator.undo"],children:[ue.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:I,disabled:C.length===0,title:t["annotator.redo"],children:[ue.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:L,disabled:p.length===0,children:[ue.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[p.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:v?o("canvas",{ref:n,onMouseDown:K,onMouseMove:H,onMouseUp:Y,onMouseLeave:Y,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ee,disabled:E||!v,children:E?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var nn=["bug","feature","question","praise","typo"],sn=["blocker","high","medium","low"];function Nr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,d]=q(""),[c,f]=q("bug"),[p,u]=q("medium"),[b,x]=q(""),[C,_]=q([]),[k,R]=q(!1),[y,v]=q(null),g=U(null),E=U(null),w=a==="submitting",F=w?e["form.submitting"]:e["form.submit"],P=typeof window!="undefined"?window.location.href:"",L=l.trim()!==""||C.length>0;N(()=>{s==null||s(L)},[L]);let D=U(C);D.current=C,N(()=>()=>{D.current.forEach(m=>URL.revokeObjectURL(m.preview))},[]);let I=m=>{x("");let h=5-C.length,M=m.slice(0,Math.max(0,h));for(let B of M)if(B instanceof File){let W=tt(B);if(W){x(W.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(W.maxMb)));return}}if(M.length){let B=M.map(W=>({blob:W,preview:URL.createObjectURL(W)}));_(W=>[...W,...B])}m.length>M.length&&x(e["form.screenshot.error_count"].replace("{max}",String(5)))},Q=m=>{let h=C[m];h&&URL.revokeObjectURL(h.preview),_(M=>M.filter((B,W)=>W!==m)),x(""),g.current&&(g.current.value="")},A=m=>{var B;let h=m.target,M=Array.from((B=h.files)!=null?B:[]);M.length&&I(M),h.value=""},K=m=>{m.preventDefault(),m.stopPropagation(),R(!0)},H=m=>{m.preventDefault(),m.stopPropagation(),m.currentTarget===m.target&&R(!1)},Y=m=>{var M,B;m.preventDefault(),m.stopPropagation(),R(!1);let h=Array.from((B=(M=m.dataTransfer)==null?void 0:M.files)!=null?B:[]);h.length&&I(h)};N(()=>{let m=E.current;if(!m)return;let h=M=>{var W;let B=(W=M.clipboardData)==null?void 0:W.items;if(B){for(let z of Array.from(B))if(z.kind==="file"&&z.type.startsWith("image/")){let $=z.getAsFile();if($){M.preventDefault(),I([$]);return}}}};return m.addEventListener("paste",h),()=>m.removeEventListener("paste",h)},[C.length]);let ee=m=>{let h=y;if(h===null||!C[h]){v(null);return}URL.revokeObjectURL(C[h].preview);let M={blob:m,preview:URL.createObjectURL(m)};_(B=>B.map((W,z)=>z===h?M:W)),v(null)};return o("form",{onSubmit:m=>{if(m.preventDefault(),!l.trim()){x(e["form.description.required"]);return}x("");let h={description:l.trim(),feedback_type:c,severity:p};C.length&&(h.screenshots=C.map(M=>M.blob),h.capture_method="manual"),t(h)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:l,placeholder:e["form.description.placeholder"],onInput:m=>d(m.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:c,onChange:m=>f(m.target.value),children:nn.map(m=>o("option",{value:m,children:e[`type.${m}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:p,onChange:m=>u(m.target.value),children:sn.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:A,"aria-hidden":"true",tabIndex:-1}),C.length>0&&o("div",{class:"screenshot-strip",children:C.map((m,h)=>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:()=>v(h),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"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:()=>Q(h),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14z"})}),e["form.screenshot.remove"]]})]})]},m.preview))}),C.length<5&&o("div",{ref:E,class:`screenshot-dropzone ${k?"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 h;(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),(h=g.current)==null||h.click())},onDragOver:K,onDragLeave:H,onDrop:Y,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),P&&o("div",{class:"page-context",title:P,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:Pe(P,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:w,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:w,children:F})]}),y!==null&&C[y]&&o(Kr,{imageBlob:C[y].blob,strings:e,onCancel:()=>v(null),onSave:ee})]})}oe();function ln(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 cn(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var dn={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Hr(e,t){return t==="all"?e:e.filter(r=>dn[r.status]===t)}function jr({rows:e,filter:t,onFilter:r,strings:a}){let n=ln(e),i=cn(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let d=t===l.key,c=d?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${d?" is-active":""}`,onClick:()=>r(c),"aria-pressed":d,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var pn=3e4;function Wr({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var L;let[i,s]=q(null),[l,d]=q(null),[c,f]=q(!1),[p,u]=q("all"),[b,x]=q(""),[C,_]=q(!1),[k,R]=q(!1),y=U(!0),v=async D=>{if(D.preventDefault(),!n||k)return;let I=parseInt(b.replace(/^#/,"").trim(),10);if(!Number.isInteger(I)||I<=0){_(!0);return}R(!0),_(!1);try{let Q=await n(I);if(!y.current)return;Q?x(""):_(!0)}finally{y.current&&R(!1)}},g=async()=>{var D;f(!0),d(null);try{let I=await e.listMine(t);return y.current&&s(I),!0}catch(I){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",I),y.current&&d((D=Ee(I,r))!=null?D:r["mine.error"]),!1}finally{y.current&&f(!1)}};N(()=>{y.current=!0;let D=be(g,pn);return()=>{y.current=!1,D.stop()}},[t]);let E=i!==null&&i.length===0,w=i===null&&!l,F=i?Hr(i,p):null,P=!!i&&i.length>0&&((L=F==null?void 0:F.length)!=null?L: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:v,children:[o("input",{type:"text",inputMode:"numeric",value:b,placeholder:r["mine.jump.placeholder"],"aria-label":r["mine.jump.aria"],onInput:D=>{x(D.target.value),_(!1)},disabled:k}),o("button",{type:"submit",class:"btn",disabled:k||!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(jr,{rows:i,filter:p,onFilter:u,strings:r}),w&&o("div",{class:"mine-loading",children:r["mine.loading"]}),l&&o("div",{class:"error",children:l}),E&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),P&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),F&&F.length>0&&o("ul",{class:"mine-rows",children:F.map(D=>o("li",{children:o(ot,{row:D,strings:r,onClick:()=>a(D)})}))})]})}oe();function Qr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=U(null),i=U(null);return N(()=>{var d;i.current=document.activeElement;let s=c=>{var p;if(c.key!=="Escape")return;let f=(p=n.current)==null?void 0:p.getRootNode();f instanceof ShadowRoot&&f.querySelector(".annotator-backdrop")||(c.stopPropagation(),e("escape"))};window.addEventListener("keydown",s);let l=(d=n.current)==null?void 0:d.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let c=i.current;c&&typeof c.focus=="function"&&c.focus()}},[e]),o("div",{class:`backdrop ${a?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e("backdrop")},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:()=>e("button"),children:"\xD7"}),t]})})}function Ur({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"]})]})}oe();function Vr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[d,c]=q(null),[f,p]=q(!1);return N(()=>{let u=!1,b=pe(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:b,status:["new","in_progress","awaiting_validation"]}).then(x=>{u||c(x.results.slice(0,5))}).catch(()=>{u||p(!0)}),()=>{u=!0}},[e,t]),o("div",{class:"page-peek",role:"region","aria-label":r["page.peek.title"],children:[o("div",{class:"page-peek-title",children:r["page.peek.title"]}),d===null&&!f&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),d!==null&&d.map(u=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(u.id),children:[o("span",{class:`page-peek-dot status-${u.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:u.description})]},u.id)),o("div",{class:"page-peek-footer",children:[o("button",{type:"button",class:"page-peek-viewall",onClick:i,children:n===1?r["page.peek.viewAll.one"]:r["page.peek.viewAll"].replace("{n}",String(n))}),o("button",{type:"button",class:"page-peek-send",onClick:l,children:r["fab.label"]})]})]})}oe();var un=6e4;function fn(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 Rt=new Map,Ct=new Map;function mn(){Rt.clear()}function qt(e,t,r){let a=`${t}|${r}`,n=Rt.get(a);if(n&&Date.now()-n.fetchedAt<un)return Promise.resolve(n.kpis);let i=Ct.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>(Rt.set(a,{kpis:l,fetchedAt:Date.now()}),l)).finally(()=>Ct.delete(a));return Ct.set(a,s),s}function gn(e,t,r){return qt(e,t,r).then(fn)}function Gr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=q(0),[l,d]=q(0),c=me(()=>{mn(),d(f=>f+1)},[]);return N(()=>{if(!n||!t||!r){s(0);return}let f=!1,p=()=>{let b=pe(a!==void 0?{getCurrentPage:a}:{});gn(t,r,b).then(x=>{f||s(x)}).catch(()=>{f||s(0)})};p();let u=et(p);return()=>{f=!0,u()}},[t,r,n,l]),{open:i,refresh:c}}var Xr=`
622
622
  :host {
623
623
  --mfb-accent: #3b82f6;
624
624
  --mfb-accent-contrast: #ffffff;
@@ -2378,6 +2378,20 @@ button.report-detail-edit {
2378
2378
  min-height: 0;
2379
2379
  overflow: hidden;
2380
2380
  }
2381
+ /* Stale-while-revalidate: a query change keeps the previous rows visible
2382
+ * (locally pre-filtered where the row data allows) and dims them while the
2383
+ * server confirms \u2014 the instant local response is the #352 "never inert"
2384
+ * guarantee, the dim is the "still confirming" affordance. */
2385
+ .board-view.is-stale .board-list,
2386
+ .board-view.is-stale .board-list-count,
2387
+ .board-view.is-stale .board-kpi-strip {
2388
+ opacity: 0.55;
2389
+ transition: opacity 0.15s ease;
2390
+ }
2391
+ .board-load-more {
2392
+ margin: 4px auto 8px;
2393
+ flex: 0 0 auto;
2394
+ }
2381
2395
  .board-list-count {
2382
2396
  font-size: var(--mfb-text-xs);
2383
2397
  color: var(--mfb-text-muted);
@@ -2666,7 +2680,7 @@ button.report-detail-edit {
2666
2680
  background: var(--mfb-surface-2);
2667
2681
  margin: var(--mfb-space-2) 0;
2668
2682
  }
2669
- `;function tn(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(m,{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 m({state:p}){var H;let b=de(async M=>{l({...n,status:"submitting"});try{let $=await e.onSubmit(M);R.refresh(),l({...n,status:"success",...$&&$.seq!==void 0&&{submittedSeq:$.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch($){typeof console!="undefined"&&console.warn("[mhosaic] submit:",$),l({...n,status:"error",error:e.strings["form.error"]})}},[]),v=(H=e.getExternalId)==null?void 0:H.call(e),C=M=>!e.api||!v?Promise.resolve(!1):e.api.getReportBySeq(M,v).then($=>(l({...n,open:!0,tab:"mine",selectedReportId:$.id}),!0)).catch(()=>!1),h=e.deepLinkParam===!1?void 0:M=>{let $=e.deepLinkParam||"mhfeedback";try{let L=new URL(window.location.href);return L.searchParams.set($,M),L.toString()}catch(L){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]=E(!e.requiresVisibilityCheck);O(()=>{if(!e.requiresVisibilityCheck){g(!0);return}if(!v||!e.checkVisibility){g(!1);return}let M=!1;return e.checkVisibility(v).then($=>{M||g($)}).catch(()=>{M||g(!1)}),()=>{M=!0}},[v]);let q=tn(e,v,_),k=!!(e.api&&v),[F,P]=E(!1),B=V({});return o(ee,{children:[q&&o("div",{class:"fab-area",onMouseEnter:()=>{B.current.close&&clearTimeout(B.current.close),B.current.open=setTimeout(()=>P(!0),250)},onMouseLeave:()=>{B.current.open&&clearTimeout(B.current.open),B.current.close=setTimeout(()=>P(!1),140)},onFocusIn:M=>{var $,L;B.current.close&&clearTimeout(B.current.close),(L=($=M.target).matches)!=null&&L.call($,":focus-visible")&&P(!0)},onFocusOut:()=>P(!1),onKeyDown:M=>M.key==="Escape"&&P(!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:()=>{P(!1),l({...n,open:!0,tab:"board"})},onPickRow:M=>{P(!1),l({...n,open:!0,tab:"board",boardSelectId:M})},onSend:()=>{P(!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 vn(){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 m(k){var $,L,N,Q,W,f;let F=($=k.screenshots)!=null&&$.length?k.screenshots:k.screenshot?[k.screenshot]:void 0,P=k.synthetic?void 0:F,B=n.snapshot();if(i){let{userHash:S,exp:T,...z}=i;B.user=z}s&&Object.keys(s).length>0&&(B.metadata={...s});let D=P!=null&&P.length?(L=k.capture_method)!=null?L:"manual":"none",I={description:k.description,feedback_type:(N=k.feedback_type)!=null?N:"bug",severity:(Q=k.severity)!=null?Q:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:D,technical_context:B};I.widget_version="0.31.0",P!=null&&P.length&&(I.screenshots=P,I.screenshot=P[0]),k.synthetic&&(I.synthetic=!0);let H=se(e);H&&(I.page_path=H),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(I.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let M=I;for(let S of u)M=await S(M);try{let S=await l.submitReport(M);return(W=e.onSubmitSuccess)==null||W.call(e,S),n.clear(),S}catch(S){let T=S instanceof Error?S:new Error(String(S));throw(f=e.onError)==null||f.call(e,T),T}}let d=Ir({host:c,strings:a,showFAB:(y=e.showFAB)!=null?y:!0,onSubmit:k=>m(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:P})=>{var B,D;b||(p=P({source:k.source,size:(B=k.size)!=null?B:"sm",position:(D=k.position)!=null?D:vn(),locale:F,...k.getCurrentPage&&{getCurrentPage:k.getCurrentPage}}))})}let v={show(){d.open()},hide(){d.close()},open(k){d.open()},async submit(k){return m({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 yn={enabled:!0,perFingerprintCooldownMs:3e5,sampleRate:1,maxDescriptionLen:200,globalRatePerMinute:30,maxDistinctFingerprints:200};function fo(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 _n(e,t){var n;let r=((n=e.stack)!=null?n:"").split(`
2683
+ `;function bn(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function Yr(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Xr,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null,s=!1;function l(u){n=u,Re(S(f,{state:u}),a)}function d(u){let{selectedReportId:b,boardSelectId:x,...C}=u;return C}function c(u){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&u&&qt(e.api,u,pe(e)).then(b=>{b.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function f({state:u}){var Q;let b=me(async A=>{l({...n,status:"submitting"});try{let K=await e.onSubmit(A);R.refresh(),l({...n,status:"success",...K&&K.seq!==void 0&&{submittedSeq:K.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(K){typeof console!="undefined"&&console.warn("[mhosaic] submit:",K),l({...n,status:"error",error:e.strings["form.error"]})}},[]),x=(Q=e.getExternalId)==null?void 0:Q.call(e),C=A=>!e.api||!x?Promise.resolve(!1):e.api.getReportBySeq(A,x).then(K=>(l({...n,open:!0,tab:"mine",selectedReportId:K.id}),!0)).catch(()=>!1),_=e.deepLinkParam===!1?void 0:A=>{let K=e.deepLinkParam||"mhfeedback";try{let H=new URL(window.location.href);return H.searchParams.set(K,A),H.toString()}catch(H){return""}},k=e.showPageActivity!==!1,R=Gr({...e.api!==void 0&&{api:e.api},...x!==void 0&&{externalId:x},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:k}),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"],[v,g]=q(!e.requiresVisibilityCheck);N(()=>{if(!e.requiresVisibilityCheck){g(!0);return}if(!x||!e.checkVisibility){g(!1);return}let A=!1;return e.checkVisibility(x).then(K=>{A||g(K)}).catch(()=>{A||g(!1)}),()=>{A=!0}},[x]);let E=bn(e,x,v),w=!!(e.api&&x),[F,P]=q(!1),L=U({});return o(re,{children:[E&&o("div",{class:"fab-area",onMouseEnter:()=>{L.current.close&&clearTimeout(L.current.close),L.current.open=setTimeout(()=>P(!0),250)},onMouseLeave:()=>{L.current.open&&clearTimeout(L.current.open),L.current.close=setTimeout(()=>P(!1),140)},onFocusIn:A=>{var K,H;L.current.close&&clearTimeout(L.current.close),(H=(K=A.target).matches)!=null&&H.call(K,":focus-visible")&&P(!0)},onFocusOut:()=>P(!1),onKeyDown:A=>A.key==="Escape"&&P(!1),children:[F&&!u.open&&k&&R.open>0&&e.api&&x&&o(Vr,{api:e.api,externalId:x,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:R.open,onViewAll:()=>{P(!1),l({...n,open:!0,tab:"board"})},onPickRow:A=>{P(!1),l({...n,open:!0,tab:"board",boardSelectId:A})},onSend:()=>{P(!1),c(x)}}),o(Dr,{label:y,onClick:()=>c(x),...R.open>0&&{count:R.open}})]}),u.open&&o(Qr,{onDismiss:A=>{if(A!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(d({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:u.tab==="board",children:[u.confirmingDiscard&&o("div",{class:"discard-confirm",role:"alertdialog","aria-modal":"true",children:o("div",{class:"discard-confirm-card",children:[o("p",{class:"discard-confirm-title",children:e.strings["form.discard.title"]}),o("p",{class:"discard-confirm-body",children:e.strings["form.discard.body"]}),o("div",{class:"discard-confirm-actions",children:[o("button",{type:"button",class:"btn",onClick:()=>l({...n,confirmingDiscard:!1}),children:e.strings["form.discard.keep"]}),o("button",{type:"button",class:"btn btn--primary",onClick:()=>{s=!1,l(d({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),w&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":u.tab==="send",class:`tab-button ${u.tab==="send"?"is-active":""}`,onClick:()=>l(d({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="mine",class:`tab-button ${u.tab==="mine"?"is-active":""}`,onClick:()=>l(d({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="changelog",class:`tab-button ${u.tab==="changelog"?"is-active":""}`,onClick:()=>l(d({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="board",class:`tab-button tab-button--board ${u.tab==="board"?"is-active":""}`,onClick:()=>l(d({...n,tab:"board"})),children:e.strings["tab.board"]})]}),u.tab==="send"&&o(re,{children:[w&&k&&o(Ur,{open:R.open,strings:e.strings,onView:()=>l(d({...n,tab:"board"}))}),o(Nr,{strings:e.strings,onSubmit:b,onCancel:()=>l({...n,open:!1,status:"idle"}),status:u.status,...u.error!==void 0&&{errorMessage:u.error},...u.submittedSeq!==void 0&&{submittedSeq:u.submittedSeq},onDirtyChange:A=>{s=A}})]}),u.tab==="mine"&&e.api&&x&&!u.selectedReportId&&o(Wr,{api:e.api,externalId:x,strings:e.strings,onSelect:A=>l({...n,selectedReportId:A.id}),onOpenSeq:C}),(u.tab==="mine"||u.tab==="changelog")&&e.api&&x&&u.selectedReportId&&o(rt,{api:e.api,externalId:x,reportId:u.selectedReportId,strings:e.strings,onBack:()=>l(d({...n})),onOpenSeq:C,..._&&{buildPermalink:_}}),u.tab==="changelog"&&e.api&&x&&!u.selectedReportId&&o(Ir,{api:e.api,externalId:x,strings:e.strings,onSelect:A=>l({...n,selectedReportId:A.id})}),u.tab==="board"&&e.api&&x&&o(Fr,{api:e.api,externalId:x,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...u.boardSelectId!==void 0&&{initialSelectedId:u.boardSelectId}})]})]})}l(n);function p(u){var k;let b=e.api,x=(k=e.getExternalId)==null?void 0:k.call(e);if(!b||!x||!u)return;let C=/^\d+$/.test(u)?parseInt(u,10):null;(C!==null?b.getReportBySeq(C,x):b.getReport(u,x)).then(R=>l({...n,open:!0,tab:"mine",selectedReportId:R.id})).catch(()=>{})}if(e.deepLinkParam!==!1)try{let u=e.deepLinkParam||"mhfeedback",b=new URLSearchParams(window.location.search).get(u);b&&p(b.trim())}catch(u){}return{open(){var u;c((u=e.getExternalId)==null?void 0:u.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),Re(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function An(){return{right:24+24/2,bottom:84}}function Ro(e){var C,_,k,R,y,v,g,E;let t=(C=e.env)!=null?C:"prod",r=(_=e.locale)!=null?_:typeof navigator!="undefined"?navigator.language:void 0,a=Zt((k=e.translations)!=null?k:{},r!==void 0?{locale:r}:{}),n=Jt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(R=e.metadata)!=null?R:{},l=Wt({apiKey:e.apiKey,endpoint:e.endpoint,...e.fetchImpl!==void 0&&{fetch:e.fetchImpl},...e.beforeSend!==void 0&&{beforeSend:e.beforeSend},getSignedIdentity:()=>!i||!i.userHash||!i.exp||!i.email?null:{userHash:i.userHash,exp:i.exp,email:i.email}}),d=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let w=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;w==null||w.appendChild(c)}else document.body.appendChild(c);async function f(w){var K,H,Y,ee,J,m;let F=(K=w.screenshots)!=null&&K.length?w.screenshots:w.screenshot?[w.screenshot]:void 0,P=w.synthetic?void 0:F,L=n.snapshot();if(i){let{userHash:h,exp:M,...B}=i;L.user=B}s&&Object.keys(s).length>0&&(L.metadata={...s});let D=P!=null&&P.length?(H=w.capture_method)!=null?H:"manual":"none",I={description:w.description,feedback_type:(Y=w.feedback_type)!=null?Y:"bug",severity:(ee=w.severity)!=null?ee:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:D,technical_context:L};I.widget_version="0.32.0",P!=null&&P.length&&(I.screenshots=P,I.screenshot=P[0]),w.synthetic&&(I.synthetic=!0);let Q=pe(e);Q&&(I.page_path=Q),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(I.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let A=I;for(let h of d)A=await h(A);try{let h=await l.submitReport(A);return(J=e.onSubmitSuccess)==null||J.call(e,h),n.clear(),h}catch(h){let M=h instanceof Error?h:new Error(String(h));throw(m=e.onError)==null||m.call(e,M),M}}let p=Yr({host:c,strings:a,showFAB:(y=e.showFAB)!=null?y:!0,onSubmit:w=>f(w),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(v=e.requiresVisibilityCheck)!=null?v:!1,checkVisibility:w=>l.checkVisibility(w,i==null?void 0:i.email),...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...e.openToCurrentPageFeedback!==void 0&&{openToCurrentPageFeedback:e.openToCurrentPageFeedback},...e.showPageActivity!==void 0&&{showPageActivity:e.showPageActivity}}),u,b=!1;if((g=e.qaMeter)!=null&&g.source){let w=e.qaMeter,F=(E=w.locale)!=null?E:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(Co(),So)).then(({createQaMeter:P})=>{var L,D;b||(u=P({source:w.source,size:(L=w.size)!=null?L:"sm",position:(D=w.position)!=null?D:An(),locale:F,...w.getCurrentPage&&{getCurrentPage:w.getCurrentPage}}))})}let x={show(){p.open()},hide(){p.close()},open(w){p.open()},async submit(w){return f({description:w.description,...w.feedback_type!==void 0&&{feedback_type:w.feedback_type},...w.severity!==void 0&&{severity:w.severity},...w.synthetic!==void 0&&{synthetic:w.synthetic},...w.screenshot!==void 0&&{screenshot:w.screenshot},...w.screenshots!==void 0&&{screenshots:w.screenshots}})},identify(w){i=w,p.notifyIdentityChanged()},setMetadata(w){s={...s,...w}},shutdown(){b=!0,u==null||u.dispose(),p.dispose(),n.dispose(),c.remove();let w=window;w.mhosaicFeedback===x&&delete w.mhosaicFeedback},_registerTransformer(w){d.push(w)}};return window.mhosaicFeedback=x,x}var Ln={enabled:!0,perFingerprintCooldownMs:3e5,sampleRate:1,maxDescriptionLen:200,globalRatePerMinute:30,maxDistinctFingerprints:200};function qo(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 Bn(e,t){var n;let r=((n=e.stack)!=null?n:"").split(`
2670
2684
  `).slice(0,4).join(`
2671
- `),a=e.message.slice(0,30);return`${e.name}:${a}|${t}|${r}`}function xn(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function mo(e,t={}){let r={...yn,...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=_n(p,window.location.pathname);if(n.has(b))return;let v=Date.now();if(!l(b,v))return;i.set(b,v);let C=xn(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(fo(b))}function m(p){u(fo(p.reason))}window.addEventListener("error",c),window.addEventListener("unhandledrejection",m);let d=a.shutdown.bind(a);return a.shutdown=()=>{window.removeEventListener("error",c),window.removeEventListener("unhandledrejection",m),i.clear(),d()},e}function wn(e){let{errorTracking:t,...r}=e,a=uo(r);return t!==!1&&mo(a,typeof t=="object"?t:void 0),a}return qo(kn);})();
2685
+ `),a=e.message.slice(0,30);return`${e.name}:${a}|${t}|${r}`}function zn(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function Eo(e,t={}){let r={...Ln,...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(u,b){if(r.globalRatePerMinute>0){let k=b-6e4;for(;s.length>0&&s[0]<k;)s.shift();if(s.length>=r.globalRatePerMinute)return!1}if(r.maxDistinctFingerprints>0&&!i.has(u)&&i.size>=r.maxDistinctFingerprints)return!1;if(r.perFingerprintCooldownMs<=0)return s.push(b),!0;let x=i.get(u);if(x!==void 0&&b-x<r.perFingerprintCooldownMs)return!1;let C=256,_=192;if(i.size>C){let k=b-r.perFingerprintCooldownMs*2;for(let[R,y]of i)y<k&&i.delete(R);if(i.size>C){let R=i.size-_,y=0;for(let v of i.keys()){if(y>=R)break;i.delete(v),y++}}}return s.push(b),!0}async function d(u){if(r.sampleRate<1&&Math.random()>=r.sampleRate)return;let b=Bn(u,window.location.pathname);if(n.has(b))return;let x=Date.now();if(!l(b,x))return;i.set(b,x);let C=zn(u.message?`${u.name}: ${u.message}`:u.name,r.maxDescriptionLen);n.add(b);try{await a.submit({description:C,feedback_type:"bug",severity:"high",synthetic:!0})}catch(_){}finally{n.delete(b)}}function c(u){var x;let b=(x=u.error)!=null?x:{name:"Error",message:u.message,stack:`at ${u.filename}:${u.lineno}:${u.colno}`};d(qo(b))}function f(u){d(qo(u.reason))}window.addEventListener("error",c),window.addEventListener("unhandledrejection",f);let p=a.shutdown.bind(a);return a.shutdown=()=>{window.removeEventListener("error",c),window.removeEventListener("unhandledrejection",f),i.clear(),p()},e}function Fn(e){let{errorTracking:t,...r}=e,a=Ro(r);return t!==!1&&Eo(a,typeof t=="object"?t:void 0),a}return Oo(In);})();
2672
2686
  //# sourceMappingURL=widget.min.js.map