@mhosaic/feedback 0.26.1 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/{chunk-3CYS47XC.mjs → chunk-BXUX5UTI.mjs} +504 -63
- package/dist/chunk-BXUX5UTI.mjs.map +1 -0
- package/dist/embed.min.js +183 -6
- package/dist/embed.min.js.map +1 -1
- package/dist/error-tracking.d.ts +1 -1
- package/dist/{index-B8Q72Whs.d.ts → index-BYDyenfe.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/loader/react.d.ts +1 -1
- package/dist/loader.d.ts +1 -1
- package/dist/react.d.ts +2 -2
- package/dist/react.mjs +1 -1
- package/dist/replay.d.ts +1 -1
- package/dist/telemetry.d.ts +1 -1
- package/dist/{types-CRCxVLFH.d.ts → types-C4iSSmUD.d.ts} +4 -0
- package/dist/webvitals.d.ts +1 -1
- package/dist/widget.min.js +184 -7
- package/dist/widget.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3CYS47XC.mjs.map +0 -1
package/dist/embed.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var MhosaicFeedback=(()=>{var ke=Object.defineProperty;var Gr=Object.getOwnPropertyDescriptor;var Yr=Object.getOwnPropertyNames;var Xr=Object.prototype.hasOwnProperty;var Jr=(e,t,r)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var V=(e,t)=>()=>(e&&(t=e(e=0)),t);var mt=(e,t)=>{for(var r in t)ke(e,r,{get:t[r],enumerable:!0})},Zr=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Yr(t))!Xr.call(e,n)&&n!==r&&ke(e,n,{get:()=>t[n],enumerable:!(a=Gr(t,n))||a.enumerable});return e};var eo=e=>Zr(ke({},"__esModule",{value:!0}),e);var je=(e,t,r)=>Jr(e,typeof t!="symbol"?t+"":t,r);function te(e,t){for(var r in t)e[r]=t[r];return e}function Je(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Me.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 Re(e,s,a,n,null)}function Re(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?++Pt:n,__i:-1,__u:0};return n==null&&$.vnode!=null&&$.vnode(i),i}function G(e){return e.children}function qe(e,t){this.props=e,this.context=t}function pe(e,t){if(t==null)return e.__?pe(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"?pe(e):null}function go(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=te({},t);i.__v=t.__v+1,$.vnode&&$.vnode(i),Ze(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?pe(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,Bt(a,i,n),t.__e=t.__=null,i.__e!=r&&At(i)}}function At(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}),At(e)}function Ct(e){(!e.__d&&(e.__d=!0)&&re.push(e)&&!Te.__r++||St!=$.debounceRendering)&&((St=$.debounceRendering)||Et)(Te)}function Te(){try{for(var e,t=1;re.length;)re.length>t&&re.sort(Tt),e=re.shift(),t=re.length,go(e)}finally{re.length=Te.__r=0}}function Lt(e,t,r,a,n,i,s,l,p,c,u){var d,g,h,R,C,v,m,f=a&&a.__k||Ee,b=t.length;for(p=ho(r,t,f,p,b),d=0;d<b;d++)(h=r.__k[d])!=null&&(g=h.__i!=-1&&f[h.__i]||Pe,h.__i=d,v=Ze(e,h,g,n,i,s,l,p,c,u),R=h.__e,h.ref&&g.ref!=h.ref&&(g.ref&&et(g.ref,null,h),u.push(h.ref,h.__c||R,h)),C==null&&R!=null&&(C=R),(m=!!(4&h.__u))||g.__k===h.__k?(p=zt(h,p,e,m),m&&g.__e&&(g.__e=null)):typeof h.type=="function"&&v!==void 0?p=v:R&&(p=R.nextSibling),h.__u&=-7);return r.__e=C,p}function ho(e,t,r,a,n){var i,s,l,p,c,u=r.length,d=u,g=0;for(e.__k=new Array(n),i=0;i<n;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=Re(null,s,null,null,null):Ae(s)?s=e.__k[i]=Re(G,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Re(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,p=i+g,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=vo(s,r,p,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>u?g--:n<u&&g++),typeof s.type!="function"&&(s.__u|=4)):c!=p&&(c==p-1?g--:c==p+1?g++:(c>p?g--:g++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<u;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=pe(l)),It(l,l));return a}function zt(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=zt(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=pe(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function vo(e,t,r,a){var n,i,s,l=e.key,p=e.type,c=t[r],u=c!=null&&(2&c.__u)==0;if(c===null&&l==null||u&&l==c.key&&p==c.type)return r;if(a>(u?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&&p==c.type)return s}return-1}function Rt(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||bo.test(t)?r:r+"px"}function Se(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||Rt(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||Rt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Mt,"$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[ge]=a[ge]:(r[ge]=Xe,e.addEventListener(t,i?Ge:Ve,i)):e.removeEventListener(t,i?Ge:Ve,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 qt(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[Ce]==null)t[Ce]=Xe++;else if(t[Ce]<r[ge])return;return r($.event?$.event(t):t)}}}function Ze(e,t,r,a,n,i,s,l,p,c){var u,d,g,h,R,C,v,m,f,b,q,k,E,w,H,A=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(p=!!(32&r.__u),i=[l=t.__e=r.__e]),(u=$.__b)&&u(t);e:if(typeof A=="function")try{if(m=t.props,f=A.prototype&&A.prototype.render,b=(u=A.contextType)&&a[u.__c],q=u?b?b.props.value:u.__:a,r.__c?v=(d=t.__c=r.__c).__=d.__E:(f?t.__c=d=new A(m,q):(t.__c=d=new qe(m,q),d.constructor=A,d.render=_o),b&&b.sub(d),d.state||(d.state={}),d.__n=a,g=d.__d=!0,d.__h=[],d._sb=[]),f&&d.__s==null&&(d.__s=d.state),f&&A.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=te({},d.__s)),te(d.__s,A.getDerivedStateFromProps(m,d.__s))),h=d.props,R=d.state,d.__v=t,g)f&&A.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),f&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(f&&A.getDerivedStateFromProps==null&&m!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(m,q),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(m,d.__s,q)===!1){t.__v!=r.__v&&(d.props=m,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(I){I&&(I.__=t)}),Ee.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(m,d.__s,q),f&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,R,C)})}if(d.context=q,d.props=m,d.__P=e,d.__e=!1,k=$.__r,E=0,f)d.state=d.__s,d.__d=!1,k&&k(t),u=d.render(d.props,d.state,d.context),Ee.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,k&&k(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(a=te(te({},a),d.getChildContext())),f&&!g&&d.getSnapshotBeforeUpdate!=null&&(C=d.getSnapshotBeforeUpdate(h,R)),w=u!=null&&u.type===G&&u.key==null?Ft(u.props.children):u,l=Lt(e,Ae(w)?w:[w],t,r,a,n,i,s,l,p,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(I){if(t.__v=null,p||i!=null)if(I.then){for(t.__u|=p?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(H=i.length;H--;)Je(i[H]);Ye(t)}else t.__e=r.__e,t.__k=r.__k,I.then||Ye(t);$.__e(I,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=yo(r.__e,t,r,a,n,i,s,p,c);return(u=$.diffed)&&u(t),128&t.__u?void 0:l}function Ye(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ye))}function Bt(e,t,r){for(var a=0;a<r.length;a++)et(r[a],r[++a],r[++a]);$.__c&&$.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){$.__e(i,n.__v)}})}function Ft(e){return typeof e!="object"||e==null||e.__b>0?e:Ae(e)?e.map(Ft):te({},e)}function yo(e,t,r,a,n,i,s,l,p){var c,u,d,g,h,R,C,v=r.props||Pe,m=t.props,f=t.type;if(f=="svg"?n="http://www.w3.org/2000/svg":f=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!f&&(f?h.localName==f:h.nodeType==3)){e=h,i[c]=null;break}}if(e==null){if(f==null)return document.createTextNode(m);e=document.createElementNS(n,f,m.is&&m),l&&($.__m&&$.__m(t,i),l=!1),i=null}if(f==null)v===m||l&&e.data==m||(e.data=m);else{if(i=i&&Me.call(e.childNodes),!l&&i!=null)for(v={},c=0;c<e.attributes.length;c++)v[(h=e.attributes[c]).name]=h.value;for(c in v)h=v[c],c=="dangerouslySetInnerHTML"?d=h:c=="children"||c in m||c=="value"&&"defaultValue"in m||c=="checked"&&"defaultChecked"in m||Se(e,c,null,h,n);for(c in m)h=m[c],c=="children"?g=h:c=="dangerouslySetInnerHTML"?u=h:c=="value"?R=h:c=="checked"?C=h:l&&typeof h!="function"||v[c]===h||Se(e,c,h,v[c],n);if(u)l||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),Lt(t.type=="template"?e.content:e,Ae(g)?g:[g],t,r,a,f=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&pe(r,0),l,p),i!=null)for(c=i.length;c--;)Je(i[c]);l||(c="value",f=="progress"&&R==null?e.removeAttribute("value"):R!=null&&(R!==e[c]||f=="progress"&&!R||f=="option"&&R!=v[c])&&Se(e,c,R,v[c],n),c="checked",C!=null&&C!=e[c]&&Se(e,c,C,v[c],n))}return e}function et(e,t,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&t==null||(e.__u=e(t))}else e.current=t}catch(n){$.__e(n,r)}}function It(e,t,r){var a,n;if($.unmount&&$.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||et(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){$.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&It(a[n],t,r||typeof e.type!="function");r||Je(e.__e),e.__c=e.__=e.__e=void 0}function _o(e,t,r){return this.constructor(e,r)}function ue(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),$.__&&$.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Ze(t,e=(!a&&r||t).__k=_(G,null,[e]),n||Pe,Pe,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Me.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),Bt(i,e,s)}var Me,$,Pt,fo,re,St,Et,Tt,Ue,Ce,ge,Mt,Xe,Ve,Ge,mo,Pe,Ee,bo,Ae,Z=V(()=>{"use strict";Pe={},Ee=[],bo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ae=Array.isArray;Me=Ee.slice,$={__e:function(e,t,r,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,a||{}),s=n.__d),s)return n.__E=n}catch(l){e=l}throw e}},Pt=0,fo=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=te({},this.state),typeof e=="function"&&(e=e(te({},r),this.props)),e&&te(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ct(this))},qe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ct(this))},qe.prototype.render=G,re=[],Et=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Tt=function(e,t){return e.__v.__b-t.__v.__b},Te.__r=0,Ue=Math.random().toString(8),Ce="__d"+Ue,ge="__a"+Ue,Mt=/(PointerCapture)$|Capture$/i,Xe=0,Ve=qt(!1),Ge=qt(!0),mo=0});function ze(e,t){O.__h&&O.__h(Q,e,he||t),he=0;var r=Q.__H||(Q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function P(e){return he=1,xo(Ut,e)}function xo(e,t,r){var a=ze(fe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):Ut(void 0,t),function(l){var p=a.__N?a.__N[0]:a.__[0],c=a.t(p,l);p!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=Q,!Q.__f)){var n=function(l,p,c){if(!a.__c.__H)return!0;var u=a.__c.__H.__.filter(function(g){return g.__c});if(u.every(function(g){return!g.__N}))return!i||i.call(this,l,p,c);var d=a.__c.props!==l;return u.some(function(g){if(g.__N){var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(d=!0)}}),i&&i.call(this,l,p,c)||d};Q.__f=!0;var i=Q.shouldComponentUpdate,s=Q.componentWillUpdate;Q.componentWillUpdate=function(l,p,c){if(this.__e){var u=i;i=void 0,n(l,p,c),i=u}s&&s.call(this,l,p,c)},Q.shouldComponentUpdate=n}return a.__N||a.__}function K(e,t){var r=ze(fe++,3);!O.__s&&at(r.__H,t)&&(r.__=e,r.u=t,Q.__H.__h.push(r))}function ot(e,t){var r=ze(fe++,4);!O.__s&&at(r.__H,t)&&(r.__=e,r.u=t,Q.__h.push(r))}function W(e){return he=5,Y(function(){return{current:e}},[])}function Y(e,t){var r=ze(fe++,7);return at(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function se(e,t){return he=8,Y(function(){return e},t)}function wo(){for(var e;e=jt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Le),t.__h.some(rt),t.__h=[]}catch(r){t.__h=[],O.__e(r,e.__v)}}}function ko(e){var t,r=function(){clearTimeout(a),Wt&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);Wt&&(t=requestAnimationFrame(r))}function Le(e){var t=Q,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Q=t}function rt(e){var t=Q;e.__c=e.__(),Q=t}function at(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function Ut(e,t){return typeof t=="function"?t(e):t}var fe,Q,tt,$t,he,jt,O,Ht,Dt,Kt,Nt,Qt,Ot,Wt,X=V(()=>{"use strict";Z();he=0,jt=[],O=$,Ht=O.__b,Dt=O.__r,Kt=O.diffed,Nt=O.__c,Qt=O.unmount,Ot=O.__;O.__b=function(e){Q=null,Ht&&Ht(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ot&&Ot(e,t)},O.__r=function(e){Dt&&Dt(e),fe=0;var t=(Q=e.__c).__H;t&&(tt===Q?(t.__h=[],Q.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Le),t.__h.some(rt),t.__h=[],fe=0)),tt=Q},O.diffed=function(e){Kt&&Kt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(jt.push(t)!==1&&$t===O.requestAnimationFrame||(($t=O.requestAnimationFrame)||ko)(wo)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),tt=Q=null},O.__c=function(e,t){t.some(function(r){try{r.__h.some(Le),r.__h=r.__h.filter(function(a){return!a.__||rt(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],O.__e(a,r.__v)}}),Nt&&Nt(e,t)},O.unmount=function(e){Qt&&Qt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Le(a)}catch(n){t=n}}),r.__H=void 0,t&&O.__e(t,r.__v))};Wt=typeof requestAnimationFrame=="function"});function gr(e){return e==="en"?Sa:ka}var ka,Sa,hr=V(()=>{"use strict";ka={"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."},Sa={"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 lt(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 Ca(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 yr(e,t){let r=vr(lt(e)),a=null,n=-1;for(let i of t){let s=vr(i);if(!Ca(r,s))continue;let p=s.filter(c=>!c.startsWith(":")).length*100+s.length;p>n&&(a=i,n=p)}return a}var vr,ct=V(()=>{"use strict";vr=e=>e.split("/").filter(Boolean)});var _r,xr=V(()=>{"use strict";_r=`
|
|
1
|
+
"use strict";var MhosaicFeedback=(()=>{var ke=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var ro=Object.prototype.hasOwnProperty;var oo=(e,t,r)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Y=(e,t)=>()=>(e&&(t=e(e=0)),t);var ht=(e,t)=>{for(var r in t)ke(e,r,{get:t[r],enumerable:!0})},ao=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of to(t))!ro.call(e,n)&&n!==r&&ke(e,n,{get:()=>t[n],enumerable:!(a=eo(t,n))||a.enumerable});return e};var no=e=>ao(ke({},"__esModule",{value:!0}),e);var Ue=(e,t,r)=>oo(e,typeof t!="symbol"?t+"":t,r);function re(e,t){for(var r in t)e[r]=t[r];return e}function Ze(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Me.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 Re(e,s,a,n,null)}function Re(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?++Mt:n,__i:-1,__u:0};return n==null&&I.vnode!=null&&I.vnode(i),i}function G(e){return e.children}function Pe(e,t){this.props=e,this.context=t}function ue(e,t){if(t==null)return e.__?ue(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ue(e):null}function xo(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=re({},t);i.__v=t.__v+1,I.vnode&&I.vnode(i),et(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?ue(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,$t(a,i,n),t.__e=t.__=null,i.__e!=r&&Bt(i)}}function Bt(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}),Bt(e)}function qt(e){(!e.__d&&(e.__d=!0)&&ae.push(e)&&!Ee.__r++||Pt!=I.debounceRendering)&&((Pt=I.debounceRendering)||At)(Ee)}function Ee(){try{for(var e,t=1;ae.length;)ae.length>t&&ae.sort(Lt),e=ae.shift(),t=ae.length,xo(e)}finally{ae.length=Ee.__r=0}}function Ft(e,t,r,a,n,i,s,l,u,c,p){var d,m,h,C,R,y,f,g=a&&a.__k||Te,b=t.length;for(u=wo(r,t,g,u,b),d=0;d<b;d++)(h=r.__k[d])!=null&&(m=h.__i!=-1&&g[h.__i]||qe,h.__i=d,y=et(e,h,m,n,i,s,l,u,c,p),C=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&tt(m.ref,null,h),p.push(h.ref,h.__c||C,h)),R==null&&C!=null&&(R=C),(f=!!(4&h.__u))||m.__k===h.__k?(u=It(h,u,e,f),f&&m.__e&&(m.__e=null)):typeof h.type=="function"&&y!==void 0?u=y:C&&(u=C.nextSibling),h.__u&=-7);return r.__e=R,u}function wo(e,t,r,a,n){var i,s,l,u,c,p=r.length,d=p,m=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]=Re(null,s,null,null,null):Ae(s)?s=e.__k[i]=Re(G,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Re(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,u=i+m,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=ko(s,r,u,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>p?m--:n<p&&m++),typeof s.type!="function"&&(s.__u|=4)):c!=u&&(c==u-1?m--:c==u+1?m++:(c>u?m--:m++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<p;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=ue(l)),Ht(l,l));return a}function It(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=It(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=ue(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ko(e,t,r,a){var n,i,s,l=e.key,u=e.type,c=t[r],p=c!=null&&(2&c.__u)==0;if(c===null&&l==null||p&&l==c.key&&u==c.type)return r;if(a>(p?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 Tt(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||_o.test(t)?r:r+"px"}function Se(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||Tt(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||Tt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(zt,"$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[be]=a[be]:(r[be]=Je,e.addEventListener(t,i?Ye:Ge,i)):e.removeEventListener(t,i?Ye:Ge,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 Et(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[Ce]==null)t[Ce]=Je++;else if(t[Ce]<r[be])return;return r(I.event?I.event(t):t)}}}function et(e,t,r,a,n,i,s,l,u,c){var p,d,m,h,C,R,y,f,g,b,T,w,P,k,H,M=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),i=[l=t.__e=r.__e]),(p=I.__b)&&p(t);e:if(typeof M=="function")try{if(f=t.props,g=M.prototype&&M.prototype.render,b=(p=M.contextType)&&a[p.__c],T=p?b?b.props.value:p.__:a,r.__c?y=(d=t.__c=r.__c).__=d.__E:(g?t.__c=d=new M(f,T):(t.__c=d=new Pe(f,T),d.constructor=M,d.render=Co),b&&b.sub(d),d.state||(d.state={}),d.__n=a,m=d.__d=!0,d.__h=[],d._sb=[]),g&&d.__s==null&&(d.__s=d.state),g&&M.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=re({},d.__s)),re(d.__s,M.getDerivedStateFromProps(f,d.__s))),h=d.props,C=d.state,d.__v=t,m)g&&M.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),g&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(g&&M.getDerivedStateFromProps==null&&f!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(f,T),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(f,d.__s,T)===!1){t.__v!=r.__v&&(d.props=f,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(A){A&&(A.__=t)}),Te.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(f,d.__s,T),g&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,C,R)})}if(d.context=T,d.props=f,d.__P=e,d.__e=!1,w=I.__r,P=0,g)d.state=d.__s,d.__d=!1,w&&w(t),p=d.render(d.props,d.state,d.context),Te.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,w&&w(t),p=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++P<25);d.state=d.__s,d.getChildContext!=null&&(a=re(re({},a),d.getChildContext())),g&&!m&&d.getSnapshotBeforeUpdate!=null&&(R=d.getSnapshotBeforeUpdate(h,C)),k=p!=null&&p.type===G&&p.key==null?Kt(p.props.children):p,l=Ft(e,Ae(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),y&&(d.__E=d.__=null)}catch(A){if(t.__v=null,u||i!=null)if(A.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(H=i.length;H--;)Ze(i[H]);Xe(t)}else t.__e=r.__e,t.__k=r.__k,A.then||Xe(t);I.__e(A,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=So(r.__e,t,r,a,n,i,s,u,c);return(p=I.diffed)&&p(t),128&t.__u?void 0:l}function Xe(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Xe))}function $t(e,t,r){for(var a=0;a<r.length;a++)tt(r[a],r[++a],r[++a]);I.__c&&I.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){I.__e(i,n.__v)}})}function Kt(e){return typeof e!="object"||e==null||e.__b>0?e:Ae(e)?e.map(Kt):re({},e)}function So(e,t,r,a,n,i,s,l,u){var c,p,d,m,h,C,R,y=r.props||qe,f=t.props,g=t.type;if(g=="svg"?n="http://www.w3.org/2000/svg":g=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((h=i[c])&&"setAttribute"in h==!!g&&(g?h.localName==g:h.nodeType==3)){e=h,i[c]=null;break}}if(e==null){if(g==null)return document.createTextNode(f);e=document.createElementNS(n,g,f.is&&f),l&&(I.__m&&I.__m(t,i),l=!1),i=null}if(g==null)y===f||l&&e.data==f||(e.data=f);else{if(i=i&&Me.call(e.childNodes),!l&&i!=null)for(y={},c=0;c<e.attributes.length;c++)y[(h=e.attributes[c]).name]=h.value;for(c in y)h=y[c],c=="dangerouslySetInnerHTML"?d=h:c=="children"||c in f||c=="value"&&"defaultValue"in f||c=="checked"&&"defaultChecked"in f||Se(e,c,null,h,n);for(c in f)h=f[c],c=="children"?m=h:c=="dangerouslySetInnerHTML"?p=h:c=="value"?C=h:c=="checked"?R=h:l&&typeof h!="function"||y[c]===h||Se(e,c,h,y[c],n);if(p)l||d&&(p.__html==d.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(d&&(e.innerHTML=""),Ft(t.type=="template"?e.content:e,Ae(m)?m:[m],t,r,a,g=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&ue(r,0),l,u),i!=null)for(c=i.length;c--;)Ze(i[c]);l||(c="value",g=="progress"&&C==null?e.removeAttribute("value"):C!=null&&(C!==e[c]||g=="progress"&&!C||g=="option"&&C!=y[c])&&Se(e,c,C,y[c],n),c="checked",R!=null&&R!=e[c]&&Se(e,c,R,y[c],n))}return e}function tt(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){I.__e(n,r)}}function Ht(e,t,r){var a,n;if(I.unmount&&I.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||tt(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){I.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&Ht(a[n],t,r||typeof e.type!="function");r||Ze(e.__e),e.__c=e.__=e.__e=void 0}function Co(e,t,r){return this.constructor(e,r)}function fe(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),I.__&&I.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],et(t,e=(!a&&r||t).__k=_(G,null,[e]),n||qe,qe,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Me.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),$t(i,e,s)}var Me,I,Mt,vo,ae,Pt,At,Lt,Ve,Ce,be,zt,Je,Ge,Ye,yo,qe,Te,_o,Ae,Z=Y(()=>{"use strict";qe={},Te=[],_o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ae=Array.isArray;Me=Te.slice,I={__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}},Mt=0,vo=function(e){return e!=null&&e.constructor===void 0},Pe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=re({},this.state),typeof e=="function"&&(e=e(re({},r),this.props)),e&&re(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),qt(this))},Pe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),qt(this))},Pe.prototype.render=G,ae=[],At=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Lt=function(e,t){return e.__v.__b-t.__v.__b},Ee.__r=0,Ve=Math.random().toString(8),Ce="__d"+Ve,be="__a"+Ve,zt=/(PointerCapture)$|Capture$/i,Je=0,Ge=Et(!1),Ye=Et(!0),yo=0});function ze(e,t){Q.__h&&Q.__h(O,e,he||t),he=0;var r=O.__H||(O.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function q(e){return he=1,Ro(Yt,e)}function Ro(e,t,r){var a=ze(me++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):Yt(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=O,!O.__f)){var n=function(l,u,c){if(!a.__c.__H)return!0;var p=a.__c.__H.__.filter(function(m){return m.__c});if(p.every(function(m){return!m.__N}))return!i||i.call(this,l,u,c);var d=a.__c.props!==l;return p.some(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(d=!0)}}),i&&i.call(this,l,u,c)||d};O.__f=!0;var i=O.shouldComponentUpdate,s=O.componentWillUpdate;O.componentWillUpdate=function(l,u,c){if(this.__e){var p=i;i=void 0,n(l,u,c),i=p}s&&s.call(this,l,u,c)},O.shouldComponentUpdate=n}return a.__N||a.__}function $(e,t){var r=ze(me++,3);!Q.__s&&nt(r.__H,t)&&(r.__=e,r.u=t,O.__H.__h.push(r))}function at(e,t){var r=ze(me++,4);!Q.__s&&nt(r.__H,t)&&(r.__=e,r.u=t,O.__h.push(r))}function W(e){return he=5,X(function(){return{current:e}},[])}function X(e,t){var r=ze(me++,7);return nt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function oe(e,t){return he=8,X(function(){return e},t)}function Po(){for(var e;e=Gt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Le),t.__h.some(ot),t.__h=[]}catch(r){t.__h=[],Q.__e(r,e.__v)}}}function qo(e){var t,r=function(){clearTimeout(a),Vt&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);Vt&&(t=requestAnimationFrame(r))}function Le(e){var t=O,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),O=t}function ot(e){var t=O;e.__c=e.__(),O=t}function nt(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function Yt(e,t){return typeof t=="function"?t(e):t}var me,O,rt,Dt,he,Gt,Q,Nt,Ot,Qt,Wt,jt,Ut,Vt,U=Y(()=>{"use strict";Z();he=0,Gt=[],Q=I,Nt=Q.__b,Ot=Q.__r,Qt=Q.diffed,Wt=Q.__c,jt=Q.unmount,Ut=Q.__;Q.__b=function(e){O=null,Nt&&Nt(e)},Q.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ut&&Ut(e,t)},Q.__r=function(e){Ot&&Ot(e),me=0;var t=(O=e.__c).__H;t&&(rt===O?(t.__h=[],O.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Le),t.__h.some(ot),t.__h=[],me=0)),rt=O},Q.diffed=function(e){Qt&&Qt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Gt.push(t)!==1&&Dt===Q.requestAnimationFrame||((Dt=Q.requestAnimationFrame)||qo)(Po)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),rt=O=null},Q.__c=function(e,t){t.some(function(r){try{r.__h.some(Le),r.__h=r.__h.filter(function(a){return!a.__||ot(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],Q.__e(a,r.__v)}}),Wt&&Wt(e,t)},Q.unmount=function(e){jt&&jt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Le(a)}catch(n){t=n}}),r.__H=void 0,t&&Q.__e(t,r.__v))};Vt=typeof requestAnimationFrame=="function"});function xr(e){return e==="en"?La:Aa}var Aa,La,wr=Y(()=>{"use strict";Aa={"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."},La={"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 pt(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 za(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 Sr(e,t){let r=kr(pt(e)),a=null,n=-1;for(let i of t){let s=kr(i);if(!za(r,s))continue;let u=s.filter(c=>!c.startsWith(":")).length*100+s.length;u>n&&(a=i,n=u)}return a}var kr,ut=Y(()=>{"use strict";kr=e=>e.split("/").filter(Boolean)});var Cr,Rr=Y(()=>{"use strict";Cr=`
|
|
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 ye(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function ae(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function $e(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function He(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 De(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var ve,wr,kr,Sr,Cr,Ke=V(()=>{"use strict";ve={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},wr={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},kr={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},Sr={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},Cr={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function Rr({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[wr[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return _("div",{class:"qa-pastille"},_("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${ve[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},_("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},_("polyline",{points:"1,6 7,6 9,2 12,10 15,4 17,6 23,6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))))}var qr=V(()=>{"use strict";Z();Ke()});function _e({dev:e,bot:t,human:r,strings:a}){return _("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},_("span",{class:`qa-lanes__icon qa-lane ${dt[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},_("path",{d:"M8 7l-5 5 5 5M16 7l5 5-5 5",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"}))),_("span",{class:`qa-lanes__icon qa-lane ${dt[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),_("path",{d:"M12 4.5v4"}),_("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),_("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),_("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),_("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),_("span",{class:`qa-lanes__icon qa-lane ${dt[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_("circle",{cx:"12",cy:"8",r:"3.6"}),_("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var dt,pt=V(()=>{"use strict";Z();dt={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function Ra(e){return{dev:ae(e.dev),bot:ye(e.automated),human:ae(e.client)}}function qa(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",p=(i=t.get(l))!=null?i:[];p.push(s),t.set(l,p)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var p,c,u;let l=t.get(s);return{key:s,label:(u=(c=(p=l[0])==null?void 0:p.group)==null?void 0:c.label)!=null?u:"",scenarios:l}})}function Pr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Er({scenario:e,strings:t}){let r=Ra(e),a=e.automated.provenance;return _("li",{class:"qa-row","data-testid":"qa-scenario-row"},_("span",{class:"qa-row__title"},e.priority?_("span",{class:`qa-tag ${kr[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,_("span",{class:"qa-row__name"},e.title),e.source==="testgen"?_("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?_("span",{class:"qa-tag"},t[Sr[e.caseStatus]]):null,e.grounding?_("span",{class:"qa-tag"},t[Cr[e.grounding]]):null,a?_("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),_(_e,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function Tr({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=P(new Set),s=u=>{i(d=>{let g=new Set(d);return g.has(u)?g.delete(u):g.add(u),g})},l=Pr(a["panel.freshness"],{date:He(r.generated_at),version:De(r.app_version),env:r.environment}),p;if(t==="no-tests")p=_("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")p=_("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let u=(c=e==null?void 0:e.scenarios)!=null?c:[],d=u.some(g=>g.group);if(u.length===0)p=_("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)p=_("ul",{class:"qa-panel__list"},u.map(g=>_(Er,{key:g.id,scenario:g,strings:a})));else{let g=qa(u);p=_("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},g.map(h=>{let R=n.has(h.key),C={dev:$e(h.scenarios.map(v=>ae(v.dev))),bot:$e(h.scenarios.map(v=>ye(v.automated))),human:$e(h.scenarios.map(v=>ae(v.client)))};return _("li",{key:h.key,class:"qa-suite","data-testid":"qa-panel-group"},_("button",{type:"button",class:"qa-suite__head","aria-expanded":R,"data-testid":"qa-suite-group",onClick:()=>s(h.key)},_("span",{class:`qa-suite__chev ${R?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),_("span",{class:"qa-suite__key"},h.key),_("span",{class:"qa-suite__label"},h.label),_("span",{class:"qa-suite__count"},Pr(a["suite.cases"],{count:h.scenarios.length})),_(_e,{dev:C.dev,bot:C.bot,human:C.human,strings:a})),R?_("ul",{class:"qa-suite__list"},h.scenarios.map(v=>_(Er,{key:v.id,scenario:v,strings:a}))):null)}))}}return _("section",{class:"qa-panel","data-testid":"qa-panel"},p,_("footer",{class:"qa-panel__foot"},_("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var Mr=V(()=>{"use strict";Z();X();pt();Ke()});function Pa(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,p;for(let c of(l=t.get(i))!=null?l:[]){let u=(p=t.get(c.id))!=null?p:[];r.push({node:c,depth:s,hasChildren:u.length>0}),u.length>0&&a(c.id,s+1)}};return a(null,0),r}function Ea(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let p=(a=l.external_key)!=null?a:l.id,c=(n=t.get(p))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let u of(i=l.pages)!=null?i:[])(u.role==="primary"?c.primaries:c.traversed).add(u.pattern);t.set(p,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var u,d,g,h;let p=(d=(u=s.scenario.group)==null?void 0:u.key)!=null?d:"~",c=(h=(g=l.scenario.group)==null?void 0:g.key)!=null?h:"~";return p!==c?p.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function Ar(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Lr(e){return`${Math.round(e)}%`}function zr({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=P("pages"),[s,l]=P("");K(()=>{let v=m=>{m.key==="Escape"&&a()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[a]);let p=t?lt(t):null,c=Y(()=>Pa(e.sitemap),[e]),u=Y(()=>Ea(e),[e]),d=Y(()=>{let v=new Map;for(let m of e.sitemap)v.set(m.path_pattern,m.title);return v},[e]),g=v=>{var m;return(m=d.get(v))!=null?m:v},h=s.trim().toLowerCase(),R=h?u.filter(v=>{var m,f;return v.scenario.title.toLowerCase().includes(h)||((f=(m=v.scenario.group)==null?void 0:m.label)!=null?f:"").toLowerCase().includes(h)}):u,C=Ar(r["panel.freshness"],{date:He(e.generated_at),version:De(e.app_version),env:e.environment});return _("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:v=>{v.target===v.currentTarget&&a()}},_("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},_("header",{class:"qa-modal__head"},_("h3",null,r["modal.title"]),_("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),_("div",{class:"qa-modal__freshness"},C),_("div",{class:"qa-kpi","data-testid":"qa-kpi"},_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},Lr(e.metric.pages_with_scenarios_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},Lr(e.metric.scenarios_passing_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),_("nav",{class:"qa-tabs"},_("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),_("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),_("div",{class:"qa-modal__body"},n==="pages"?_("ul",{class:"qa-tree"},c.map(v=>{let m=p!==null&&v.node.path_pattern===p;return _("li",{key:v.node.id,class:`qa-tree__row ${m?"qa-tree__row--here":""}`,"data-testid":m?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+v.depth*1.1}rem`}},_("span",{class:`qa-dot ${ve[v.node.color]}`,"aria-hidden":"true"}),_("span",{class:`qa-tree__title ${v.node.structural?"qa-tree__title--structural":""}`},v.node.title||v.node.path_pattern),m?_("span",{class:"qa-tree__here"},` ${v.node.path_pattern} `):null,m?_("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,_("span",{class:"qa-tree__count"},String(v.node.counts.scenarios)))})):_("div",{class:"qa-scenarios"},_("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:v=>l(v.target.value)}),R.length===0?_("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):_("ul",{class:"qa-scenarios__list"},R.map(v=>{var q,k;let m=v.scenario,f={dev:ae(m.dev),bot:ye(m.automated),human:ae(m.client)},b=[...v.traversed].map(g);return _("li",{key:(q=m.external_key)!=null?q:m.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},_("div",{class:"qa-scenarios__line"},_("span",{class:`qa-dot ${ve[m.color]}`,"aria-hidden":"true"}),(k=m.group)!=null&&k.key?_("span",{class:"qa-suitekey"},m.group.key):null,_("span",{class:"qa-scenarios__title"},m.title),m.source==="testgen"?_("span",{class:"qa-tag"},r["source.testgen"]):null,_(_e,{dev:f.dev,bot:f.bot,human:f.human,strings:r})),_("div",{class:"qa-scenarios__pages"},v.primaries.size?_("span",{class:"qa-scenarios__primary"},Ar(r["modal.appliesTo"],{count:v.primaries.size})):null,b.length?_("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${b.join(", ")}`):null))}))))))}var Br=V(()=>{"use strict";Z();X();pt();ct();Ke()});function Ta(){if(Ne++,Qe)return;Qe=!0,xe=history.pushState,we=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(ut))};history.pushState=function(...r){let a=xe.apply(this,r);return e(),a},history.replaceState=function(...r){let a=we.apply(this,r);return e(),a}}function Ma(){Ne>0&&Ne--,!(Ne>0||!Qe)&&(Qe=!1,xe&&(history.pushState=xe),we&&(history.replaceState=we),xe=null,we=null)}function Fr(e){return typeof e=="object"&&e!==null&&e.format===Aa}function $r(){Ir||(Ir=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function za(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 Fa(e,t){if(!e||!t)return Ba;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 Hr(e){var w,H,A,I;let{source:t}=e,r=gr((w=e.locale)!=null?w:"fr"),a=typeof t=="object"?t:null;if(a&&!Fr(a))return $r(),La;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(L=>L.json()):Promise.resolve(t)).then(L=>{Fr(L)?(n=L,g()):$r()}).catch(()=>{})}let p=document.createElement("div");p.setAttribute("data-mqa-host",""),p.setAttribute("data-mqa-size",(H=e.size)!=null?H:"md"),((A=e.position)==null?void 0:A.right)!==void 0&&p.style.setProperty("--mqa-right",`${e.position.right}px`),((I=e.position)==null?void 0:I.bottom)!==void 0&&p.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(p);let c=p.attachShadow({mode:"open"}),u=document.createElement("style");u.textContent=_r,c.appendChild(u);let d=document.createElement("div");c.appendChild(d);let g=()=>{};function h(){return e.getCurrentPage?e.getCurrentPage():n?yr(window.location.pathname,za(n)):null}function R(){let[z,L]=P(0),D=se(()=>L(B=>B+1),[]);g=D;let N=Fa(n,h()),j=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},U=se(()=>{l()},[]),x=se(()=>{l(),C=!0,D()},[]),M=se(()=>{C=!1,D()},[]);return K(()=>{let B=()=>D();return window.addEventListener("popstate",B),window.addEventListener(ut,B),()=>{window.removeEventListener("popstate",B),window.removeEventListener(ut,B)}},[]),_("div",{class:"qa-pastille-wrap",onMouseEnter:b,onMouseLeave:q},v?_("div",{class:"qa-panel-anchor"},_(Tr,{page:N.page,state:N.state,meta:j,strings:r})):null,_(Rr,{color:N.color,state:N.state,strings:r,onHover:()=>{b(),v=!0,U(),D()},onOpenModal:x}),C&&n?_(zr,{artifact:n,currentPattern:N.pattern,strings:r,onClose:M}):null)}let C=!1,v=!1,m=null,f=140;function b(){m!==null&&(clearTimeout(m),m=null)}function q(){b(),m=setTimeout(()=>{m=null,!E&&(v=!1,g())},f)}function k(){ue(_(R,{}),d)}k(),Ta();let E=!1;return{open(){E||(l(),C=!0,g())},close(){E||(C=!1,g())},dispose(){E||(E=!0,b(),ue(null,d),p.remove(),Ma())}}}var ut,Qe,Ne,xe,we,Aa,Ir,La,Ba,Dr=V(()=>{"use strict";Z();X();hr();ct();xr();qr();Mr();Br();ut="mqa:locationchange",Qe=!1,Ne=0,xe=null,we=null;Aa=1;Ir=!1;La={open(){},close(){},dispose(){}};Ba={state:"unknown-page",color:"gray",pattern:null,page:null}});var Kr={};mt(Kr,{createQaMeter:()=>Ia});function Ia(e){return Hr(e)}var Nr=V(()=>{"use strict";Dr()});var Ka={};mt(Ka,{configFromDataset:()=>Ur});var to=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function ro(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}function bt(e){var C,v;let t=((C=e.endpoint)!=null?C:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');ro(t);let r=(v=e.fetch)!=null?v:globalThis.fetch;async function a(m){var H,A,I,z;let f=m;if(e.beforeSend&&(f=await e.beforeSend(m)),f===!1)throw new Error("Submission cancelled by beforeSend");let b=new FormData;for(let L of to)b.append(L,String(f[L]));b.append("technical_context",JSON.stringify(f.technical_context)),((H=f.screenshots)!=null&&H.length?f.screenshots:f.screenshot?[f.screenshot]:[]).forEach((L,D)=>{b.append("screenshot",L,D===0?"screenshot.png":`screenshot-${D+1}.png`)}),f.synthetic&&b.append("synthetic","true"),(A=f.user)!=null&&A.id&&b.append("user",JSON.stringify(f.user)),f.widget_version&&b.append("widget_version",f.widget_version),f.page_path&&b.append("page_path",f.page_path);let k={Authorization:`Bearer ${e.apiKey}`};f.synthetic&&(k["X-Mhosaic-Capture-Source"]="error-tracking");let E=(I=e.getSignedIdentity)==null?void 0:I.call(e);E&&E.userHash&&E.exp&&((z=f.user)!=null&&z.id)&&(k["X-Mhosaic-User"]=String(f.user.id),k["X-Mhosaic-User-Hmac"]=E.userHash,k["X-Mhosaic-User-Exp"]=String(E.exp),E.email&&(k["X-Mhosaic-User-Email"]=E.email));let w=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:k,body:b});if(!w.ok){let L=await w.text().catch(()=>"");throw new Error(`Feedback submit failed: ${w.status} ${L}`)}return w.json()}function n(m){var q;let f={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":m},b=(q=e.getSignedIdentity)==null?void 0:q.call(e);return b&&b.userHash&&b.exp&&(f["X-Mhosaic-User-Hmac"]=b.userHash,f["X-Mhosaic-User-Exp"]=String(b.exp),b.email&&(f["X-Mhosaic-User-Email"]=b.email)),f}async function i(m){let f=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(m)});if(f.status===404)return[];if(!f.ok){let b=await f.text().catch(()=>"");throw new Error(`listMine failed: ${f.status} ${b}`)}return f.json()}async function s(m){let f=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(m)});if(f.status===404)return[];if(!f.ok){let b=await f.text().catch(()=>"");throw new Error(`listChangelog failed: ${f.status} ${b}`)}return f.json()}async function l(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"GET",headers:n(f)});if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`getReport failed: ${b.status} ${q}`)}return b.json()}async function p(m,f,b,q){let k=await r(`${t}/api/feedback/v1/reports/widget/${m}/comments/`,{method:"POST",headers:{...n(f),"Content-Type":"application/json"},body:JSON.stringify({body:b,...q!==void 0&&{client_nonce:q}})});if(!k.ok){let E=await k.text().catch(()=>"");throw new Error(`addComment failed: ${k.status} ${E}`)}return k.json()}async function c(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"PATCH",headers:{...n(f),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${b.status} ${q}`)}return b.json()}async function u(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"PATCH",headers:{...n(f),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${b.status} ${q}`)}return b.json()}function d(m){var q,k,E;if(!m)return"";let f=new URLSearchParams;(q=m.status)==null||q.forEach(w=>f.append("status",w)),(k=m.type)==null||k.forEach(w=>f.append("type",w)),(E=m.severity)==null||E.forEach(w=>f.append("severity",w)),m.q&&f.set("q",m.q),m.mine&&f.set("mine","1"),m.ordering&&f.set("ordering",m.ordering),m.page&&m.page>1&&f.set("page",String(m.page)),m.pagePath&&f.set("page_path",m.pagePath);let b=f.toString();return b?`?${b}`:""}async function g(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/board/${d(f)}`,{method:"GET",headers:n(m)});if(b.status===404)return{count:0,next:null,previous:null,results:[]};if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`listBoard failed: ${b.status} ${q}`)}return b.json()}async function h(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${d(f)}`,{method:"GET",headers:n(m)});if(b.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${b.status} ${q}`)}return b.json()}async function R(m,f){let b=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({external_id:m,...f?{email:f}:{}})});if(!b.ok)throw new Error(`checkVisibility failed: ${b.status}`);return!!(await b.json()).show}return{submitReport:a,checkVisibility:R,listMine:i,listChangelog:s,getReport:l,addComment:p,closeAsResolved:c,reopenUnresolved:u,listBoard:g,fetchBoardKpis:h}}var oo=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,ao=[/^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 no(e){return ao.some(t=>t.test(e))}function ie(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)=>{oo.test(l)||no(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 io=[/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,/\bBearer\s+[A-Za-z0-9._~+/=-]{16,}\b/g,/\bAuthorization\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{16,}["']?/gi,/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,/\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\b/g,/\bAKIA[0-9A-Z]{12,}\b/g,/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,/\bAIza[0-9A-Za-z_-]{35}\b/g,/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,/\bAC[a-f0-9]{32}\b/g,/\bSK[a-f0-9]{32}\b/g];function J(e){let t=e;for(let r of io)t=t.replace(r,"[redacted-token]");return t}function gt(){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?ie(a):void 0,i=ie(window.location.pathname+window.location.search),s;try{let p=new URL(i,window.location.origin);s=p.pathname+p.search}catch(p){s=window.location.pathname}return{viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},platform:e.platform,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),...t!==void 0&&{connection:t},online:e.onLine,...r!==void 0&&{deviceMemory:r},hardwareConcurrency:e.hardwareConcurrency,...n!==void 0&&{referrer:n},title:J(document.title||"").slice(0,200),pathname:s}}function so(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 ht(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(so).join(" "),p=J(l).slice(0,2e3),c={level:a,message:p,ts:Date.now()};if(a==="error"){let u=new Error().stack;u&&(c.stack=u.split(`
|
|
616
|
+
`});function ye(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function ie(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function Ke(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function He(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 De(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var ve,Pr,qr,Tr,Er,Ne=Y(()=>{"use strict";ve={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},Pr={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"},Tr={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},Er={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function Mr({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[Pr[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return _("div",{class:"qa-pastille"},_("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${ve[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},_("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},_("polyline",{points:"1,6 7,6 9,2 12,10 15,4 17,6 23,6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))))}var Ar=Y(()=>{"use strict";Z();Ne()});function _e({dev:e,bot:t,human:r,strings:a}){return _("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},_("span",{class:`qa-lanes__icon qa-lane ${ft[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},_("path",{d:"M8 7l-5 5 5 5M16 7l5 5-5 5",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"}))),_("span",{class:`qa-lanes__icon qa-lane ${ft[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),_("path",{d:"M12 4.5v4"}),_("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),_("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),_("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),_("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),_("span",{class:`qa-lanes__icon qa-lane ${ft[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_("circle",{cx:"12",cy:"8",r:"3.6"}),_("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var ft,mt=Y(()=>{"use strict";Z();ft={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function Ba(e){return{dev:ie(e.dev),bot:ye(e.automated),human:ie(e.client)}}function Fa(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,p;let l=t.get(s);return{key:s,label:(p=(c=(u=l[0])==null?void 0:u.group)==null?void 0:c.label)!=null?p:"",scenarios:l}})}function Lr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function zr({scenario:e,strings:t}){let r=Ba(e),a=e.automated.provenance;return _("li",{class:"qa-row","data-testid":"qa-scenario-row"},_("span",{class:"qa-row__title"},e.priority?_("span",{class:`qa-tag ${qr[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,_("span",{class:"qa-row__name"},e.title),e.source==="testgen"?_("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?_("span",{class:"qa-tag"},t[Tr[e.caseStatus]]):null,e.grounding?_("span",{class:"qa-tag"},t[Er[e.grounding]]):null,a?_("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),_(_e,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function Br({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=q(new Set),s=p=>{i(d=>{let m=new Set(d);return m.has(p)?m.delete(p):m.add(p),m})},l=Lr(a["panel.freshness"],{date:He(r.generated_at),version:De(r.app_version),env:r.environment}),u;if(t==="no-tests")u=_("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")u=_("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let p=(c=e==null?void 0:e.scenarios)!=null?c:[],d=p.some(m=>m.group);if(p.length===0)u=_("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)u=_("ul",{class:"qa-panel__list"},p.map(m=>_(zr,{key:m.id,scenario:m,strings:a})));else{let m=Fa(p);u=_("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},m.map(h=>{let C=n.has(h.key),R={dev:Ke(h.scenarios.map(y=>ie(y.dev))),bot:Ke(h.scenarios.map(y=>ye(y.automated))),human:Ke(h.scenarios.map(y=>ie(y.client)))};return _("li",{key:h.key,class:"qa-suite","data-testid":"qa-panel-group"},_("button",{type:"button",class:"qa-suite__head","aria-expanded":C,"data-testid":"qa-suite-group",onClick:()=>s(h.key)},_("span",{class:`qa-suite__chev ${C?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),_("span",{class:"qa-suite__key"},h.key),_("span",{class:"qa-suite__label"},h.label),_("span",{class:"qa-suite__count"},Lr(a["suite.cases"],{count:h.scenarios.length})),_(_e,{dev:R.dev,bot:R.bot,human:R.human,strings:a})),C?_("ul",{class:"qa-suite__list"},h.scenarios.map(y=>_(zr,{key:y.id,scenario:y,strings:a}))):null)}))}}return _("section",{class:"qa-panel","data-testid":"qa-panel"},u,_("footer",{class:"qa-panel__foot"},_("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var Fr=Y(()=>{"use strict";Z();U();mt();Ne()});function Ia(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 p=(u=t.get(c.id))!=null?u:[];r.push({node:c,depth:s,hasChildren:p.length>0}),p.length>0&&a(c.id,s+1)}};return a(null,0),r}function $a(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 p of(i=l.pages)!=null?i:[])(p.role==="primary"?c.primaries:c.traversed).add(p.pattern);t.set(u,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var p,d,m,h;let u=(d=(p=s.scenario.group)==null?void 0:p.key)!=null?d:"~",c=(h=(m=l.scenario.group)==null?void 0:m.key)!=null?h:"~";return u!==c?u.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function Ir(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function $r(e){return`${Math.round(e)}%`}function Kr({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=q("pages"),[s,l]=q("");$(()=>{let y=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[a]);let u=t?pt(t):null,c=X(()=>Ia(e.sitemap),[e]),p=X(()=>$a(e),[e]),d=X(()=>{let y=new Map;for(let f of e.sitemap)y.set(f.path_pattern,f.title);return y},[e]),m=y=>{var f;return(f=d.get(y))!=null?f:y},h=s.trim().toLowerCase(),C=h?p.filter(y=>{var f,g;return y.scenario.title.toLowerCase().includes(h)||((g=(f=y.scenario.group)==null?void 0:f.label)!=null?g:"").toLowerCase().includes(h)}):p,R=Ir(r["panel.freshness"],{date:He(e.generated_at),version:De(e.app_version),env:e.environment});return _("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:y=>{y.target===y.currentTarget&&a()}},_("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},_("header",{class:"qa-modal__head"},_("h3",null,r["modal.title"]),_("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),_("div",{class:"qa-modal__freshness"},R),_("div",{class:"qa-kpi","data-testid":"qa-kpi"},_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},$r(e.metric.pages_with_scenarios_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},$r(e.metric.scenarios_passing_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),_("nav",{class:"qa-tabs"},_("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),_("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),_("div",{class:"qa-modal__body"},n==="pages"?_("ul",{class:"qa-tree"},c.map(y=>{let f=u!==null&&y.node.path_pattern===u;return _("li",{key:y.node.id,class:`qa-tree__row ${f?"qa-tree__row--here":""}`,"data-testid":f?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+y.depth*1.1}rem`}},_("span",{class:`qa-dot ${ve[y.node.color]}`,"aria-hidden":"true"}),_("span",{class:`qa-tree__title ${y.node.structural?"qa-tree__title--structural":""}`},y.node.title||y.node.path_pattern),f?_("span",{class:"qa-tree__here"},` ${y.node.path_pattern} `):null,f?_("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,_("span",{class:"qa-tree__count"},String(y.node.counts.scenarios)))})):_("div",{class:"qa-scenarios"},_("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:y=>l(y.target.value)}),C.length===0?_("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):_("ul",{class:"qa-scenarios__list"},C.map(y=>{var T,w;let f=y.scenario,g={dev:ie(f.dev),bot:ye(f.automated),human:ie(f.client)},b=[...y.traversed].map(m);return _("li",{key:(T=f.external_key)!=null?T:f.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},_("div",{class:"qa-scenarios__line"},_("span",{class:`qa-dot ${ve[f.color]}`,"aria-hidden":"true"}),(w=f.group)!=null&&w.key?_("span",{class:"qa-suitekey"},f.group.key):null,_("span",{class:"qa-scenarios__title"},f.title),f.source==="testgen"?_("span",{class:"qa-tag"},r["source.testgen"]):null,_(_e,{dev:g.dev,bot:g.bot,human:g.human,strings:r})),_("div",{class:"qa-scenarios__pages"},y.primaries.size?_("span",{class:"qa-scenarios__primary"},Ir(r["modal.appliesTo"],{count:y.primaries.size})):null,b.length?_("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${b.join(", ")}`):null))}))))))}var Hr=Y(()=>{"use strict";Z();U();mt();ut();Ne()});function Ka(){if(Oe++,Qe)return;Qe=!0,xe=history.pushState,we=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(gt))};history.pushState=function(...r){let a=xe.apply(this,r);return e(),a},history.replaceState=function(...r){let a=we.apply(this,r);return e(),a}}function Ha(){Oe>0&&Oe--,!(Oe>0||!Qe)&&(Qe=!1,xe&&(history.pushState=xe),we&&(history.replaceState=we),xe=null,we=null)}function Dr(e){return typeof e=="object"&&e!==null&&e.format===Da}function Or(){Nr||(Nr=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function Oa(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 Wa(e,t){if(!e||!t)return Qa;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 Qr(e){var k,H,M,A;let{source:t}=e,r=xr((k=e.locale)!=null?k:"fr"),a=typeof t=="object"?t:null;if(a&&!Dr(a))return Or(),Na;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(E=>E.json()):Promise.resolve(t)).then(E=>{Dr(E)?(n=E,m()):Or()}).catch(()=>{})}let u=document.createElement("div");u.setAttribute("data-mqa-host",""),u.setAttribute("data-mqa-size",(H=e.size)!=null?H:"md"),((M=e.position)==null?void 0:M.right)!==void 0&&u.style.setProperty("--mqa-right",`${e.position.right}px`),((A=e.position)==null?void 0:A.bottom)!==void 0&&u.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(u);let c=u.attachShadow({mode:"open"}),p=document.createElement("style");p.textContent=Cr,c.appendChild(p);let d=document.createElement("div");c.appendChild(d);let m=()=>{};function h(){return e.getCurrentPage?e.getCurrentPage():n?Sr(window.location.pathname,Oa(n)):null}function C(){let[D,E]=q(0),K=oe(()=>E(B=>B+1),[]);m=K;let N=Wa(n,h()),j=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},V=oe(()=>{l()},[]),x=oe(()=>{l(),R=!0,K()},[]),z=oe(()=>{R=!1,K()},[]);return $(()=>{let B=()=>K();return window.addEventListener("popstate",B),window.addEventListener(gt,B),()=>{window.removeEventListener("popstate",B),window.removeEventListener(gt,B)}},[]),_("div",{class:"qa-pastille-wrap",onMouseEnter:b,onMouseLeave:T},y?_("div",{class:"qa-panel-anchor"},_(Br,{page:N.page,state:N.state,meta:j,strings:r})):null,_(Mr,{color:N.color,state:N.state,strings:r,onHover:()=>{b(),y=!0,V(),K()},onOpenModal:x}),R&&n?_(Kr,{artifact:n,currentPattern:N.pattern,strings:r,onClose:z}):null)}let R=!1,y=!1,f=null,g=140;function b(){f!==null&&(clearTimeout(f),f=null)}function T(){b(),f=setTimeout(()=>{f=null,!P&&(y=!1,m())},g)}function w(){fe(_(C,{}),d)}w(),Ka();let P=!1;return{open(){P||(l(),R=!0,m())},close(){P||(R=!1,m())},dispose(){P||(P=!0,b(),fe(null,d),u.remove(),Ha())}}}var gt,Qe,Oe,xe,we,Da,Nr,Na,Qa,Wr=Y(()=>{"use strict";Z();U();wr();ut();Rr();Ar();Fr();Hr();gt="mqa:locationchange",Qe=!1,Oe=0,xe=null,we=null;Da=1;Nr=!1;Na={open(){},close(){},dispose(){}};Qa={state:"unknown-page",color:"gray",pattern:null,page:null}});var jr={};ht(jr,{createQaMeter:()=>ja});function ja(e){return Qr(e)}var Ur=Y(()=>{"use strict";Wr()});var Ya={};ht(Ya,{configFromDataset:()=>Jr});var io=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function so(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}function vt(e){var R,y;let t=((R=e.endpoint)!=null?R:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');so(t);let r=(y=e.fetch)!=null?y:globalThis.fetch;async function a(f){var H,M,A,D;let g=f;if(e.beforeSend&&(g=await e.beforeSend(f)),g===!1)throw new Error("Submission cancelled by beforeSend");let b=new FormData;for(let E of io)b.append(E,String(g[E]));b.append("technical_context",JSON.stringify(g.technical_context)),((H=g.screenshots)!=null&&H.length?g.screenshots:g.screenshot?[g.screenshot]:[]).forEach((E,K)=>{b.append("screenshot",E,K===0?"screenshot.png":`screenshot-${K+1}.png`)}),g.synthetic&&b.append("synthetic","true"),(M=g.user)!=null&&M.id&&b.append("user",JSON.stringify(g.user)),g.widget_version&&b.append("widget_version",g.widget_version),g.page_path&&b.append("page_path",g.page_path);let w={Authorization:`Bearer ${e.apiKey}`};g.synthetic&&(w["X-Mhosaic-Capture-Source"]="error-tracking");let P=(A=e.getSignedIdentity)==null?void 0:A.call(e);P&&P.userHash&&P.exp&&((D=g.user)!=null&&D.id)&&(w["X-Mhosaic-User"]=String(g.user.id),w["X-Mhosaic-User-Hmac"]=P.userHash,w["X-Mhosaic-User-Exp"]=String(P.exp),P.email&&(w["X-Mhosaic-User-Email"]=P.email));let k=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:w,body:b});if(!k.ok){let E=await k.text().catch(()=>"");throw new Error(`Feedback submit failed: ${k.status} ${E}`)}return k.json()}function n(f){var T;let g={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":f},b=(T=e.getSignedIdentity)==null?void 0:T.call(e);return b&&b.userHash&&b.exp&&(g["X-Mhosaic-User-Hmac"]=b.userHash,g["X-Mhosaic-User-Exp"]=String(b.exp),b.email&&(g["X-Mhosaic-User-Email"]=b.email)),g}async function i(f){let g=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(f)});if(g.status===404)return[];if(!g.ok){let b=await g.text().catch(()=>"");throw new Error(`listMine failed: ${g.status} ${b}`)}return g.json()}async function s(f){let g=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(f)});if(g.status===404)return[];if(!g.ok){let b=await g.text().catch(()=>"");throw new Error(`listChangelog failed: ${g.status} ${b}`)}return g.json()}async function l(f,g){let b=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"GET",headers:n(g)});if(!b.ok){let T=await b.text().catch(()=>"");throw new Error(`getReport failed: ${b.status} ${T}`)}return b.json()}async function u(f,g,b,T){let w=await r(`${t}/api/feedback/v1/reports/widget/${f}/comments/`,{method:"POST",headers:{...n(g),"Content-Type":"application/json"},body:JSON.stringify({body:b,...T!==void 0&&{client_nonce:T}})});if(!w.ok){let P=await w.text().catch(()=>"");throw new Error(`addComment failed: ${w.status} ${P}`)}return w.json()}async function c(f,g){let b=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"PATCH",headers:{...n(g),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!b.ok){let T=await b.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${b.status} ${T}`)}return b.json()}async function p(f,g){let b=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"PATCH",headers:{...n(g),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!b.ok){let T=await b.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${b.status} ${T}`)}return b.json()}function d(f){var T,w,P;if(!f)return"";let g=new URLSearchParams;(T=f.status)==null||T.forEach(k=>g.append("status",k)),(w=f.type)==null||w.forEach(k=>g.append("type",k)),(P=f.severity)==null||P.forEach(k=>g.append("severity",k)),f.q&&g.set("q",f.q),f.mine&&g.set("mine","1"),f.ordering&&g.set("ordering",f.ordering),f.page&&f.page>1&&g.set("page",String(f.page)),f.pagePath&&g.set("page_path",f.pagePath);let b=g.toString();return b?`?${b}`:""}async function m(f,g){let b=await r(`${t}/api/feedback/v1/reports/widget/board/${d(g)}`,{method:"GET",headers:n(f)});if(b.status===404)return{count:0,next:null,previous:null,results:[]};if(!b.ok){let T=await b.text().catch(()=>"");throw new Error(`listBoard failed: ${b.status} ${T}`)}return b.json()}async function h(f,g){let b=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${d(g)}`,{method:"GET",headers:n(f)});if(b.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!b.ok){let T=await b.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${b.status} ${T}`)}return b.json()}async function C(f,g){let b=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(f),"Content-Type":"application/json"},body:JSON.stringify({external_id:f,...g?{email:g}:{}})});if(!b.ok)throw new Error(`checkVisibility failed: ${b.status}`);return!!(await b.json()).show}return{submitReport:a,checkVisibility:C,listMine:i,listChangelog:s,getReport:l,addComment:u,closeAsResolved:c,reopenUnresolved:p,listBoard:m,fetchBoardKpis:h}}var lo=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,co=[/^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 po(e){return co.some(t=>t.test(e))}function le(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)=>{lo.test(l)||po(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 J(e){let t=e;for(let r of uo)t=t.replace(r,"[redacted-token]");return t}function yt(){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?le(a):void 0,i=le(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:J(document.title||"").slice(0,200),pathname:s}}function fo(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 _t(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(fo).join(" "),u=J(l).slice(0,2e3),c={level:a,message:u,ts:Date.now()};if(a==="error"){let p=new Error().stack;p&&(c.stack=p.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 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,p=((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:p,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let u=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:p,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:J(u)}),c}},()=>{window.fetch=r}}function yt(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 _t(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?J(n):void 0;e.push({message:J(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(p){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?J(s):void 0;e.push({message:J(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function xt(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:ie(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 de=class{constructor(t){je(this,"max",t);je(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 wt(e={}){var h;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(h=e.sanitizeUrl)!=null?h:ie,i=new de(t),s=new de(r),l=new de(a),p=ht(i),c=vt(s,n),u=yt(s,n),d=_t(l),g=xt();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:gt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){p(),c(),u(),d(),g.dispose()}}}var lo={"fab.label":"Send feedback","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.screenshot.error_count":"Too many screenshots (max {max}).","form.context.label":"Page","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports.","board.retry":"Try again","board.list.you":"you","board.list.count":"{n} of {total}","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.scope.thisPage":"This page","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.reopen_failed":"Couldn\u2019t reopen the report. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},co={"fab.label":"Envoyer un commentaire","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.screenshot.error_count":"Trop de captures d\u2019\xE9cran (max {max}).","form.context.label":"Page","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports.","board.retry":"R\xE9essayer","board.list.you":"vous","board.list.count":"{n} sur {total}","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.scope.thisPage":"Cette page","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.reopen_failed":"Impossible de rouvrir le rapport. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},po={fr:co};function uo(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=po[t])!=null?r:null}function kt(e,t={}){var a;let r=(a=uo(t.locale))!=null?a:{};return{...lo,...r,...e}}Z();X();function me(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var nt="mfb:locationchange",Vt=!1;function So(){if(!(Vt||typeof history=="undefined")){Vt=!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(nt)),a}}}}function Gt(e){return So(),window.addEventListener("popstate",e),window.addEventListener(nt,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(nt,e)}}X();var Yt="mhosaic.boardView.";function Xt(e){try{let t=localStorage.getItem(Yt+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Jt(e,t){try{localStorage.setItem(Yt+e,JSON.stringify(t))}catch(r){}}function oe(e,t){let r=!1,a=!1,n=0,i=null,s=typeof document!="undefined"?document:null,l=()=>Math.min(t*2**n,t*10),p=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let u=!1;try{u=await e()}catch(d){u=!1}r||(n=u?0:n+1,i=setTimeout(()=>{p()},l()))},c=()=>{r||!a||s!=null&&s.hidden||(a=!1,p())};return s==null||s.addEventListener("visibilitychange",c),p(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",c)}}}X();Z();Z();var Co=0;function o(e,t,r,a,n,i){t||(t={});var s,l,p=t;if("ref"in p)for(l in p={},t)l=="ref"?s=t[l]:p[l]=t[l];var c={type:e,props:p,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Co,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)p[l]===void 0&&(p[l]=s[l]);return $.vnode&&$.vnode(c),c}function Zt({comment:e,strings:t}){let r=e.is_mine,a=!r&&e.author_source==="mcp",n=!r&&e.author_source==="system",i=a?"mcp":n?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",l=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&l&&o("div",{class:`comment-author comment-author--${i}`,children:l}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:Ro(e.created_at)})]})}function Ro(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var qo=["image/png","image/jpeg","image/webp"];function er(e){return qo.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function be(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),a=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-a)}`}function it(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 Po=3e4;function Be({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal"}){var L,D,N,j,U;let[l,p]=P(null),[c,u]=P(null),[d,g]=P(""),[h,R]=P(!1),[C,v]=P(!1),[m,f]=P(!1),b=W(!0),q=async()=>{try{let x=await e.getReport(r,t);return b.current&&(p(x),u(null)),!0}catch(x){return typeof console!="undefined"&&console.warn("[mhosaic] getReport:",x),b.current&&u("load_failed"),!1}};K(()=>{b.current=!0;let x=oe(q,Po);return()=>{b.current=!1,x.stop()}},[r,t]);let k=async()=>{if(!(!d.trim()||h)){R(!0);try{let x=`${r}:${Date.now()}`,M=await e.addComment(r,t,d.trim(),x);if(!b.current)return;g(""),p(B=>B&&{...B,comments:Eo(B.comments,M)}),q()}catch(x){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",x),!b.current)return;u(a["detail.send_failed"])}finally{b.current&&R(!1)}}},E=async()=>{if(!(C||m)){v(!0);try{let x=await e.closeAsResolved(r,t);if(!b.current)return;p(x)}catch(x){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",x),!b.current)return;u(a["detail.close_failed"])}finally{b.current&&v(!1)}}},w=async()=>{if(!(C||m)){f(!0);try{let x=await e.reopenUnresolved(r,t);if(!b.current)return;p(x)}catch(x){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",x),!b.current)return;u(a["detail.reopen_failed"])}finally{b.current&&f(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!l)return 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 H=(L=l.is_mine)!=null?L:i,A=(D=l.can_moderate)!=null?D:H,I=A&&l.status==="awaiting_validation",z=A;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--${l.status}`,children:(N=a[`status.${l.status}`])!=null?N:l.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(j=a[`status.${l.status}`])!=null?j:l.status})]}),o("div",{class:"report-detail-body",children:[o(To,{detail:l,strings:a}),o("p",{class:"report-detail-description",children:l.description}),((U=l.screenshots)!=null&&U.length?l.screenshots.map(x=>x.url):[l.screenshot_url]).filter(x=>!!x).map(x=>{let M=it(x);return M?o("a",{class:"report-detail-screenshot",href:M,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:x,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:x,alt:"",loading:"lazy"})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(x=>o("li",{children:o(Zt,{comment:x,strings:a})}))}),l.status_history&&l.status_history.length>0&&o(Ho,{rows:l.status_history,strings:a}),l.technical_context&&o(Lo,{ctx:l.technical_context,strings:a}),z?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:a["detail.compose_placeholder"],onInput:x=>g(x.target.value),disabled:h}),o("div",{class:"report-compose-actions",children:[I&&o("button",{type:"button",class:"btn",onClick:E,disabled:C||m,children:C?a["detail.close_busy"]:a["detail.close_cta"]}),I&&o("button",{type:"button",class:"btn btn--ghost",onClick:w,disabled:C||m,children:m?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:k,disabled:!d.trim()||h,children:h?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}function Eo(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function To({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:tr(e.created_at)})]}),e.page_url&&(()=>{let i=it(e.page_url);return o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),i?o("a",{class:"report-detail-context-url",href:i,target:"_blank",rel:"noopener noreferrer",children:be(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:be(e.page_url,64)})]})})()]})}function tr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var Mo=20,Ao=15;function Lo({ctx:e,strings:t}){var c,u,d;let r=(c=e.errors)!=null?c:[],a=((u=e.consoleLogs)!=null?u:[]).slice(-Mo),n=((d=e.networkRequests)!=null?d:[]).slice(-Ao),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,p=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:p}),o("div",{class:"tech-body",children:[i&&o(zo,{device:i,strings:t}),r.length>0&&o(Bo,{errors:r,strings:t}),a.length>0&&o(Fo,{logs:a,strings:t}),n.length>0&&o(Io,{rows:n,strings:t})]})]})}function zo({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(G,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function Bo({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:$o(r.stack)})]}))})]})}function Fo({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 Io({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let a=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${a?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:be(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function $o(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 xt(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 p=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:J(p)}),c}},()=>{window.fetch=r}}function wt(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 kt(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?J(n):void 0;e.push({message:J(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?J(s):void 0;e.push({message:J(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function St(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:le(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var pe=class{constructor(t){Ue(this,"max",t);Ue(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 Ct(e={}){var h;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(h=e.sanitizeUrl)!=null?h:le,i=new pe(t),s=new pe(r),l=new pe(a),u=_t(i),c=xt(s,n),p=wt(s,n),d=kt(l),m=St();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:yt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){u(),c(),p(),d(),m.dispose()}}}var mo={"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.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","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.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.reopen_failed":"Couldn\u2019t reopen the report. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},go={"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.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","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.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.reopen_failed":"Impossible de rouvrir le rapport. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},bo={fr:go};function ho(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=bo[t])!=null?r:null}function Rt(e,t={}){var a;let r=(a=ho(t.locale))!=null?a:{};return{...mo,...r,...e}}Z();U();function ee(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var it="mfb:locationchange",Xt=!1;function To(){if(!(Xt||typeof history=="undefined")){Xt=!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(it)),a}}}}function Be(e){return To(),window.addEventListener("popstate",e),window.addEventListener(it,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(it,e)}}U();var Jt="mhosaic.boardView.";function Zt(e){try{let t=localStorage.getItem(Jt+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function er(e,t){try{localStorage.setItem(Jt+e,JSON.stringify(t))}catch(r){}}function ne(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 p=!1;try{p=await e()}catch(d){p=!1}r||(n=p?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)}}}U();Z();Z();var Eo=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:--Eo,__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 I.vnode&&I.vnode(c),c}function tr({comment:e,strings:t}){let r=e.is_mine,a=!r&&e.author_source==="mcp",n=!r&&e.author_source==="system",i=a?"mcp":n?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",l=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&l&&o("div",{class:`comment-author comment-author--${i}`,children:l}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:Mo(e.created_at)})]})}function Mo(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var Ao=["image/png","image/jpeg","image/webp"];function rr(e){return Ao.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function ge(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 Lo=3e4;function Fe({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal"}){var E,K,N,j,V;let[l,u]=q(null),[c,p]=q(null),[d,m]=q(""),[h,C]=q(!1),[R,y]=q(!1),[f,g]=q(!1),b=W(!0),T=async()=>{try{let x=await e.getReport(r,t);return b.current&&(u(x),p(null)),!0}catch(x){return typeof console!="undefined"&&console.warn("[mhosaic] getReport:",x),b.current&&p("load_failed"),!1}};$(()=>{b.current=!0;let x=ne(T,Lo);return()=>{b.current=!1,x.stop()}},[r,t]);let w=async()=>{if(!(!d.trim()||h)){C(!0);try{let x=`${r}:${Date.now()}`,z=await e.addComment(r,t,d.trim(),x);if(!b.current)return;m(""),u(B=>B&&{...B,comments:zo(B.comments,z)}),T()}catch(x){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",x),!b.current)return;p(a["detail.send_failed"])}finally{b.current&&C(!1)}}},P=async()=>{if(!(R||f)){y(!0);try{let x=await e.closeAsResolved(r,t);if(!b.current)return;u(x)}catch(x){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",x),!b.current)return;p(a["detail.close_failed"])}finally{b.current&&y(!1)}}},k=async()=>{if(!(R||f)){g(!0);try{let x=await e.reopenUnresolved(r,t);if(!b.current)return;u(x)}catch(x){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",x),!b.current)return;p(a["detail.reopen_failed"])}finally{b.current&&g(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!l)return 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 H=(E=l.is_mine)!=null?E:i,M=(K=l.can_moderate)!=null?K:H,A=M&&l.status==="awaiting_validation",D=M;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--${l.status}`,children:(N=a[`status.${l.status}`])!=null?N:l.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${l.status}`,children:(j=a[`status.${l.status}`])!=null?j:l.status})]}),o("div",{class:"report-detail-body",children:[o(Bo,{detail:l,strings:a}),o("p",{class:"report-detail-description",children:l.description}),((V=l.screenshots)!=null&&V.length?l.screenshots.map(x=>x.url):[l.screenshot_url]).filter(x=>!!x).map(x=>{let z=st(x);return z?o("a",{class:"report-detail-screenshot",href:z,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:x,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:x,alt:"",loading:"lazy"})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(x=>o("li",{children:o(tr,{comment:x,strings:a})}))}),l.status_history&&l.status_history.length>0&&o(Qo,{rows:l.status_history,strings:a}),l.technical_context&&o($o,{ctx:l.technical_context,strings:a}),D?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:a["detail.compose_placeholder"],onInput:x=>m(x.target.value),disabled:h}),o("div",{class:"report-compose-actions",children:[A&&o("button",{type:"button",class:"btn",onClick:P,disabled:R||f,children:R?a["detail.close_busy"]:a["detail.close_cta"]}),A&&o("button",{type:"button",class:"btn btn--ghost",onClick:k,disabled:R||f,children:f?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:w,disabled:!d.trim()||h,children:h?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}function zo(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function Bo({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:or(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:ge(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:ge(e.page_url,64)})]})})()]})}function or(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var Fo=20,Io=15;function $o({ctx:e,strings:t}){var c,p,d;let r=(c=e.errors)!=null?c:[],a=((p=e.consoleLogs)!=null?p:[]).slice(-Fo),n=((d=e.networkRequests)!=null?d:[]).slice(-Io),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(Ko,{device:i,strings:t}),r.length>0&&o(Ho,{errors:r,strings:t}),a.length>0&&o(Do,{logs:a,strings:t}),n.length>0&&o(No,{rows:n,strings:t})]})]})}function Ko({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let a=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${a}`})}return e!=null&&e.platform&&r.push({label:t["detail.tech.device.platform"],value:e.platform}),e!=null&&e.language&&r.push({label:t["detail.tech.device.language"],value:e.language}),e!=null&&e.timezone&&r.push({label:t["detail.tech.device.timezone"],value:e.timezone}),e!=null&&e.connection&&r.push({label:t["detail.tech.device.connection"],value:e.connection}),r.length===0?null:o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.device"]}),o("dl",{class:"tech-device",children:r.map(a=>o(G,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function Ho({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:Oo(r.stack)})]}))})]})}function Do({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 No({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:ge(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Oo(e){let t=e.split(`
|
|
619
619
|
`);return t.length<=12?e:t.slice(0,12).join(`
|
|
620
620
|
`)+`
|
|
621
|
-
\u2026`}function Ho({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:tr(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 Do=3e4,Ko=["recent","oldest","updated","severity","status"],No=["new","in_progress","awaiting_validation","closed","rejected"],Qo=["bug","feature","question","praise","typo"],Oo=["blocker","high","medium","low"];function or({api:e,externalId:t,strings:r,getCurrentPage:a}){var I;let[n,i]=P(()=>Xt(t)),[s,l]=P(!0);K(()=>{Jt(t,n)},[t,rr(n)]);let[p,c]=P(null),[u,d]=P(null),[g,h]=P(!0),[R,C]=P(null),[v,m]=P(null),[f,b]=P(0),[q,k]=P(0),E=Y(()=>{var z,L,D,N,j,U;return((L=(z=n.status)==null?void 0:z.length)!=null?L:0)+((N=(D=n.type)==null?void 0:D.length)!=null?N:0)+((U=(j=n.severity)==null?void 0:j.length)!=null?U:0)+(n.q?1:0)+(n.mine?1:0)},[n]);K(()=>{if(s)return Gt(()=>k(z=>z+1))},[s]);let w=Y(()=>s?{...n,pagePath:me(a!==void 0?{getCurrentPage:a}:{})}:n,[rr(n),s,q]);K(()=>{let z=!1;h(!0);let L=oe(async()=>{try{let[D,N]=await Promise.all([e.listBoard(t,w),e.fetchBoardKpis(t,w)]);return z||(c(D),d(N),C(null)),!0}catch(D){return z||C(D instanceof Error?D.message:String(D)),!1}finally{z||h(!1)}},Do);return()=>{z=!0,L.stop()}},[e,t,JSON.stringify(w)]);let H=Y(()=>{var z;return!v||!p?null:(z=p.results.find(L=>L.id===v))!=null?z:null},[v,p]),A=z=>{m(z.id),b(L=>L+1)};return o("div",{class:"board-view",children:[o(Wo,{strings:r,kpis:u}),o(Uo,{filters:n,onChange:i,activeCount:E,strings:r,thisPage:s,onToggleThisPage:()=>l(z=>!z)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":g&&!p,children:[R&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:r["board.list.error"]}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{C(null),h(!0),k(z=>z+1)},children:r["board.retry"]})]}),!R&&g&&!p&&o(Xo,{}),!R&&p&&p.results.length===0&&!g&&o(Yo,{strings:r}),!R&&p&&p.results.length>0&&o(Vo,{rows:p.results,selectedId:v,onPick:A,strings:r,total:p.count})]}),o("div",{class:`board-detail-wrap ${H?"has-selection":""}`,children:H?o(Be,{api:e,externalId:t,reportId:H.id,strings:r,onBack:()=>m(null),canModerate:(I=H.can_moderate)!=null?I:H.is_mine,variant:"board"},f):o("div",{class:"board-detail-empty",children:[o(ta,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Wo({strings:e,kpis:t}){let r=(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${r}`:r})]})]}),o(jo,{kpis:t,strings:e})]})}function jo({kpis:e,strings:t}){var a,n,i,s,l,p;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((p=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?p:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(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 Uo({filters:e,onChange:t,activeCount:r,strings:a,thisPage:n,onToggleThisPage:i}){var h,R,C,v,m,f,b,q;let s=k=>{if(k===""){let{status:E,...w}=e;t(w)}else t({...e,status:[k]})},l=k=>{if(k===""){let{type:E,...w}=e;t(w)}else t({...e,type:[k]})},p=k=>{if(k===""){let{severity:E,...w}=e;t(w)}else t({...e,severity:[k]})},c=k=>t({...e,ordering:k}),u=k=>t({...e,q:k}),d=()=>{if(e.mine){let{mine:k,...E}=e;t(E)}else t({...e,mine:!0})},g=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":a["board.sort"],value:(h=e.ordering)!=null?h:"recent",onChange:k=>c(k.target.value),children:Ko.map(k=>o("option",{value:k,children:a[`board.sort.${k}`]},k))}),o("select",{class:"board-filter-select","aria-label":a["board.filter.status"],value:(C=(R=e.status)==null?void 0:R[0])!=null?C:"",onChange:k=>s(k.target.value),children:[o("option",{value:"",children:a["board.filter.status"]}),No.map(k=>{var E;return o("option",{value:k,children:(E=a[`board.kpi.${k}`])!=null?E:k},k)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.type"],value:(m=(v=e.type)==null?void 0:v[0])!=null?m:"",onChange:k=>l(k.target.value),children:[o("option",{value:"",children:a["board.filter.type"]}),Qo.map(k=>{var E;return o("option",{value:k,children:(E=a[`type.${k}`])!=null?E:k},k)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.severity"],value:(b=(f=e.severity)==null?void 0:f[0])!=null?b:"",onChange:k=>p(k.target.value),children:[o("option",{value:"",children:a["board.filter.severity"]}),Oo.map(k=>{var E;return o("option",{value:k,children:(E=a[`severity.${k}`])!=null?E:k},k)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:a["board.filter.search.placeholder"],value:(q=e.q)!=null?q:"",onInput:k=>u(k.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:d}),o("span",{children:a["board.filter.mine"]})]}),o("button",{type:"button",class:`board-chip ${n?"board-chip--on":""}`,onClick:i,children:["\u{1F4CD} ",a["board.scope.thisPage"],n?" \u2715":""]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:g,children:[o(Zo,{}),a["board.filter.clear"]]})]})}function Vo({rows:e,selectedId:t,onPick:r,strings:a,total:n}){return o(G,{children:[o("div",{class:"board-list-count",children:a["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Go,{row:i,selected:i.id===t,onPick:r,strings:a},i.id))})]})}function Go({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(Jo,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:ra(e.created_at)})]})]})})}function Yo({strings:e}){return o("div",{class:"board-empty",children:[o(ea,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function Xo(){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 Jo(){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 Zo(){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 ta(){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 rr(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 ra(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`}X();function oa(e){return`pill pill-status pill-status--${e}`}function aa(e){return`pill pill-severity pill-severity--${e}`}function na(){return"pill pill-type"}function ia(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 sa(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function Fe({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:oa(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:na(),children:t[`type.${e.feedback_type}`]}),o("span",{class:aa(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:a}),o("div",{class:"mine-row-meta",children:[o("span",{children:ia(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",sa(e.comment_count,t)]})]})]})}var la=3e4;function ca(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 da(e){let t=new Map;for(let r of e){let a=ca(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:pa(r),rows:a}))}function pa(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function ar({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=P(null),[s,l]=P(null),[p,c]=P(!1),u=W(!0),d=async()=>{c(!0),l(null);try{let C=await e.listChangelog(t);return u.current&&i(C),!0}catch(C){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",C),u.current&&l(r["mine.error"]),!1}finally{u.current&&c(!1)}};K(()=>{u.current=!0;let C=oe(d,la);return()=>{u.current=!1,C.stop()}},[t]);let g=Y(()=>n?da(n):[],[n]),h=n===null&&!s,R=n!==null&&n.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{d()},disabled:p,children:p?r["mine.loading"]:r["mine.refresh"]})]}),h&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),R&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),g.length>0&&o("div",{class:"changelog-groups",children:g.map(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(v=>o("li",{children:o(Fe,{row:v,strings:r,onClick:()=>a(v)})}))})]},C.weekKey))})]})}function ua(){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 nr({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(ua,{})})}X();X();var ir=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],fa=.35;function sr(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")ma(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=fa,e.fillRect(Ie(t.x,t.w),Ie(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&ba(e,t,r);e.restore()}function Ie(e,t){return t<0?e+t:e}function ma(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 ba(e,t,r){if(!r)return;let a=Ie(t.x,t.w),n=Ie(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let p=n;p<n+s;p+=l)for(let c=a;c<a+i;c+=l){let u=Math.min(l,a+i-c),d=Math.min(l,n+s-p);e.drawImage(r,c,p,u,d,c,p,u,d)}e.imageSmoothingEnabled=!1;for(let p=n;p<n+s;p+=l)for(let c=a;c<a+i;c+=l){let u=Math.min(l,a+i-c),d=Math.min(l,n+s-p);e.drawImage(r,c,p,1,1,c,p,u,d)}e.imageSmoothingEnabled=!0}var ee={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 lr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=W(null),i=W(null),s=W(null),[l,p]=P("rectangle"),[c,u]=P(ir[0]),[d,g]=P([]),[h,R]=P([]),[C,v]=P([]),m=W(!1),[f,b]=P(null),[q,k]=P(!1),[E,w]=P(!1),H=W(1);function A(y){g(S=>(R(T=>[...T,S]),[...S,y])),v([])}function I(){g(y=>(R(S=>[...S,y]),[])),v([])}function z(){R(y=>{if(y.length===0)return y;let S=y[y.length-1];return g(T=>(v(F=>[T,...F]),S)),y.slice(0,-1)})}function L(){v(y=>{if(y.length===0)return y;let S=y[0];return g(T=>(R(F=>[...F,T]),S)),y.slice(1)})}ot(()=>{let y=S=>{S.key==="Escape"&&(S.stopPropagation(),a())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[a]),K(()=>{let y=S=>{if(!(S.metaKey||S.ctrlKey))return;let F=S.key.toLowerCase();F==="z"?(S.preventDefault(),S.stopPropagation(),S.shiftKey?L():z()):F==="y"&&(S.preventDefault(),S.stopPropagation(),L())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[h,C,d]),K(()=>{let y=URL.createObjectURL(e),S=new Image;return S.onload=()=>{s.current=S,k(!0)},S.src=y,()=>URL.revokeObjectURL(y)},[e]),ot(()=>{if(!q||!n.current||!s.current||!i.current)return;let y=s.current,T=i.current.clientWidth-16,F=window.innerHeight*.65,ne=Math.min(T/y.width,F/y.height,1);H.current=ne;let ce=n.current;ce.width=y.width,ce.height=y.height,ce.style.width=`${y.width*ne}px`,ce.style.height=`${y.height*ne}px`,D()},[q]),K(()=>{D()},[d,f]);function D(){let y=n.current,S=s.current;if(!y||!S)return;let T=y.getContext("2d");if(T){T.clearRect(0,0,y.width,y.height),T.drawImage(S,0,0);for(let F of d)sr(T,F,S);f&&sr(T,f,S)}}function N(y){let T=n.current.getBoundingClientRect();return{x:(y.clientX-T.left)/H.current,y:(y.clientY-T.top)/H.current}}let j=y=>{if(!q)return;let{x:S,y:T}=N(y),F=n.current.width,ne=Math.max(3,Math.round(F/400)),ce=Math.max(8,Math.round(F/80));if(l==="text"){let We=window.prompt(t["annotator.text_prompt"]);We&&We.trim()&&A({kind:"text",x:S,y:T,text:We.trim(),color:c,fontSize:Math.max(16,Math.round(F/50)),lineWidth:1});return}m.current=!0,l==="rectangle"?b({kind:"rectangle",x:S,y:T,w:0,h:0,color:c,lineWidth:ne}):l==="arrow"?b({kind:"arrow",x1:S,y1:T,x2:S,y2:T,color:c,lineWidth:ne}):l==="freehand"?b({kind:"freehand",points:[{x:S,y:T}],color:c,lineWidth:ne}):l==="highlight"?b({kind:"highlight",x:S,y:T,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&b({kind:"blur",x:S,y:T,w:0,h:0,color:"#000000",lineWidth:0,tile:ce})},U=y=>{if(!m.current)return;let{x:S,y:T}=N(y);b(F=>F&&(F.kind==="rectangle"||F.kind==="highlight"||F.kind==="blur"?{...F,w:S-F.x,h:T-F.y}:F.kind==="arrow"?{...F,x2:S,y2:T}:F.kind==="freehand"?{...F,points:[...F.points,{x:S,y:T}]}:F))},x=()=>{b(y=>(m.current&&y&&((y.kind==="rectangle"||y.kind==="highlight"||y.kind==="blur")&&Math.abs(y.w)<4&&Math.abs(y.h)<4||y.kind==="arrow"&&Math.hypot(y.x2-y.x1,y.y2-y.y1)<4||y.kind==="freehand"&&y.points.length<3||A(y)),null)),m.current=!1},M=async()=>{let y=n.current;if(y){w(!0);try{let S=await new Promise(T=>y.toBlob(T,"image/png",.92));S&&r(S)}finally{w(!1)}}},B=[{id:"rectangle",icon:ee.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ee.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ee.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ee.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ee.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ee.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:y=>{y.target===y.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:ee.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:B.map(y=>o("button",{type:"button",onClick:()=>p(y.id),title:y.label,"aria-label":y.label,"aria-pressed":l===y.id,class:`annotator-tool ${l===y.id?"is-active":""}`,children:y.icon},y.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[ir.map(y=>o("button",{type:"button",onClick:()=>u(y),"aria-label":y,"aria-pressed":c===y,class:`annotator-color ${c===y?"is-active":""}`,style:{backgroundColor:y}},y)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:y=>u(y.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:z,disabled:h.length===0,title:t["annotator.undo"],children:[ee.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:L,disabled:C.length===0,title:t["annotator.redo"],children:[ee.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:I,disabled:d.length===0,children:[ee.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:q?o("canvas",{ref:n,onMouseDown:j,onMouseMove:U,onMouseUp:x,onMouseLeave:x,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:M,disabled:E||!q,children:E?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var ga=["bug","feature","question","praise","typo"],ha=["blocker","high","medium","low"];function cr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n}){let[i,s]=P(""),[l,p]=P("bug"),[c,u]=P("medium"),[d,g]=P(""),[h,R]=P([]),[C,v]=P(!1),[m,f]=P(null),b=W(null),q=W(null),k=a==="submitting",E=k?e["form.submitting"]:e["form.submit"],w=typeof window!="undefined"?window.location.href:"",H=W(h);H.current=h,K(()=>()=>{H.current.forEach(x=>URL.revokeObjectURL(x.preview))},[]);let A=x=>{g("");let M=5-h.length,B=x.slice(0,Math.max(0,M));for(let y of B)if(y instanceof File){let S=er(y);if(S){g(S.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(S.maxMb)));return}}if(B.length){let y=B.map(S=>({blob:S,preview:URL.createObjectURL(S)}));R(S=>[...S,...y])}x.length>B.length&&g(e["form.screenshot.error_count"].replace("{max}",String(5)))},I=x=>{let M=h[x];M&&URL.revokeObjectURL(M.preview),R(B=>B.filter((y,S)=>S!==x)),g(""),b.current&&(b.current.value="")},z=x=>{var y;let M=x.target,B=Array.from((y=M.files)!=null?y:[]);B.length&&A(B),M.value=""},L=x=>{x.preventDefault(),x.stopPropagation(),v(!0)},D=x=>{x.preventDefault(),x.stopPropagation(),x.currentTarget===x.target&&v(!1)},N=x=>{var B,y;x.preventDefault(),x.stopPropagation(),v(!1);let M=Array.from((y=(B=x.dataTransfer)==null?void 0:B.files)!=null?y:[]);M.length&&A(M)};K(()=>{let x=q.current;if(!x)return;let M=B=>{var S;let y=(S=B.clipboardData)==null?void 0:S.items;if(y){for(let T of Array.from(y))if(T.kind==="file"&&T.type.startsWith("image/")){let F=T.getAsFile();if(F){B.preventDefault(),A([F]);return}}}};return x.addEventListener("paste",M),()=>x.removeEventListener("paste",M)},[h.length]);let j=x=>{let M=m;if(M===null||!h[M]){f(null);return}URL.revokeObjectURL(h[M].preview);let B={blob:x,preview:URL.createObjectURL(x)};R(y=>y.map((S,T)=>T===M?B:S)),f(null)};return o("form",{onSubmit:x=>{if(x.preventDefault(),!i.trim()){g(e["form.description.required"]);return}g("");let M={description:i.trim(),feedback_type:l,severity:c};h.length&&(M.screenshots=h.map(B=>B.blob),M.capture_method="manual"),t(M)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:i,placeholder:e["form.description.placeholder"],onInput:x=>s(x.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:l,onChange:x=>p(x.target.value),children:ga.map(x=>o("option",{value:x,children:e[`type.${x}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:x=>u(x.target.value),children:ha.map(x=>o("option",{value:x,children:e[`severity.${x}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:b,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"mfb-sr-only",onChange:z,"aria-hidden":"true",tabIndex:-1}),h.length>0&&o("div",{class:"screenshot-strip",children:h.map((x,M)=>o("div",{class:"screenshot-preview",children:[o("img",{src:x.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>f(M),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:()=>I(M),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"]]})]})]},x.preview))}),h.length<5&&o("div",{ref:q,class:`screenshot-dropzone ${C?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var x;return(x=b.current)==null?void 0:x.click()},onKeyDown:x=>{var M;(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),(M=b.current)==null||M.click())},onDragOver:L,onDragLeave:D,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"]})]})]}),w&&o("div",{class:"page-context",title:w,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:be(w,90)})]}),d&&o("div",{class:"error",children:d}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children: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:E})]}),m!==null&&h[m]&&o(lr,{imageBlob:h[m].blob,strings:e,onCancel:()=>f(null),onSave:j})]})}X();function va(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 ya(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var _a={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function dr(e,t){return t==="all"?e:e.filter(r=>_a[r.status]===t)}function pr({rows:e,filter:t,onFilter:r,strings:a}){let n=va(e),i=ya(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let p=t===l.key,c=p?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${p?" is-active":""}`,onClick:()=>r(c),"aria-pressed":p,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var xa=3e4;function ur({api:e,externalId:t,strings:r,onSelect:a}){var f;let[n,i]=P(null),[s,l]=P(null),[p,c]=P(!1),[u,d]=P("all"),g=W(!0),h=async()=>{c(!0),l(null);try{let b=await e.listMine(t);return g.current&&i(b),!0}catch(b){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",b),g.current&&l(r["mine.error"]),!1}finally{g.current&&c(!1)}};K(()=>{g.current=!0;let b=oe(h,xa);return()=>{g.current=!1,b.stop()}},[t]);let R=n!==null&&n.length===0,C=n===null&&!s,v=n?dr(n,u):null,m=!!n&&n.length>0&&((f=v==null?void 0:v.length)!=null?f:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{h()},disabled:p,children:p?r["mine.loading"]:r["mine.refresh"]})]}),n&&n.length>0&&o(pr,{rows:n,filter:u,onFilter:d,strings:r}),C&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),R&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),m&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),v&&v.length>0&&o("ul",{class:"mine-rows",children:v.map(b=>o("li",{children:o(Fe,{row:b,strings:r,onClick:()=>a(b)})}))})]})}X();function fr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=W(null),i=W(null);return K(()=>{var p;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let u=(d=n.current)==null?void 0:d.getRootNode();u instanceof ShadowRoot&&u.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(p=n.current)==null?void 0:p.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let 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()},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,children:"\xD7"}),t]})})}var mr=`
|
|
621
|
+
\u2026`}function Qo({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:or(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 Wo=3e4,jo=["recent","oldest","updated","severity","status"],Uo=["new","in_progress","awaiting_validation","closed","rejected"],Vo=["bug","feature","question","praise","typo"],Go=["blocker","high","medium","low"];function nr({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var D;let[i,s]=q(()=>Zt(t)),[l,u]=q(!0);$(()=>{er(t,i)},[t,ar(i)]);let[c,p]=q(null),[d,m]=q(null),[h,C]=q(!0),[R,y]=q(null),[f,g]=q(n!=null?n:null),[b,T]=q(0),[w,P]=q(0),k=X(()=>{var E,K,N,j,V,x;return((K=(E=i.status)==null?void 0:E.length)!=null?K:0)+((j=(N=i.type)==null?void 0:N.length)!=null?j:0)+((x=(V=i.severity)==null?void 0:V.length)!=null?x:0)+(i.q?1:0)+(i.mine?1:0)},[i]);$(()=>{if(l)return Be(()=>P(E=>E+1))},[l]);let H=X(()=>l?{...i,pagePath:ee(a!==void 0?{getCurrentPage:a}:{})}:i,[ar(i),l,w]);$(()=>{let E=!1;C(!0);let K=ne(async()=>{try{let[N,j]=await Promise.all([e.listBoard(t,H),e.fetchBoardKpis(t,H)]);return E||(p(N),m(j),y(null)),!0}catch(N){return E||y(N instanceof Error?N.message:String(N)),!1}finally{E||C(!1)}},Wo);return()=>{E=!0,K.stop()}},[e,t,JSON.stringify(H)]);let M=X(()=>{var E;return!f||!c?null:(E=c.results.find(K=>K.id===f))!=null?E:null},[f,c]),A=E=>{g(E.id),T(K=>K+1)};return o("div",{class:"board-view",children:[o(Yo,{strings:r,kpis:d,thisPage:l}),o(Jo,{filters:i,onChange:s,activeCount:k,strings:r,thisPage:l,onToggleThisPage:()=>u(E=>!E)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":h&&!c,children:[R&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:r["board.list.error"]}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{y(null),C(!0),P(E=>E+1)},children:r["board.retry"]})]}),!R&&h&&!c&&o(ra,{}),!R&&c&&c.results.length===0&&!h&&o(ta,{strings:r,thisPage:l,onAllPages:()=>u(!1)}),!R&&c&&c.results.length>0&&o(Zo,{rows:c.results,selectedId:f,onPick:A,strings:r,total:c.count,thisPage:l})]}),o("div",{class:`board-detail-wrap ${M?"has-selection":""}`,children:M?o(Fe,{api:e,externalId:t,reportId:M.id,strings:r,onBack:()=>g(null),canModerate:(D=M.can_moderate)!=null?D:M.is_mine,variant:"board"},b):o("div",{class:"board-detail-empty",children:[o(ia,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Yo({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(Xo,{kpis:t,strings:e})]})}function Xo({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 Jo({filters:e,onChange:t,activeCount:r,strings:a,thisPage:n,onToggleThisPage:i}){var h,C,R,y,f,g,b,T;let s=w=>{if(w===""){let{status:P,...k}=e;t(k)}else t({...e,status:[w]})},l=w=>{if(w===""){let{type:P,...k}=e;t(k)}else t({...e,type:[w]})},u=w=>{if(w===""){let{severity:P,...k}=e;t(k)}else t({...e,severity:[w]})},c=w=>t({...e,ordering:w}),p=w=>t({...e,q:w}),d=()=>{if(e.mine){let{mine:w,...P}=e;t(P)}else t({...e,mine:!0})},m=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":a["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${n?"is-active":""}`,"aria-pressed":n,onClick:()=>!n&&i(),children:a["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${n?"":"is-active"}`,"aria-pressed":!n,onClick:()=>n&&i(),children:a["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":a["board.sort"],value:(h=e.ordering)!=null?h:"recent",onChange:w=>c(w.target.value),children:jo.map(w=>o("option",{value:w,children:a[`board.sort.${w}`]},w))}),o("select",{class:"board-filter-select","aria-label":a["board.filter.status"],value:(R=(C=e.status)==null?void 0:C[0])!=null?R:"",onChange:w=>s(w.target.value),children:[o("option",{value:"",children:a["board.filter.status"]}),Uo.map(w=>{var P;return o("option",{value:w,children:(P=a[`board.kpi.${w}`])!=null?P:w},w)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.type"],value:(f=(y=e.type)==null?void 0:y[0])!=null?f:"",onChange:w=>l(w.target.value),children:[o("option",{value:"",children:a["board.filter.type"]}),Vo.map(w=>{var P;return o("option",{value:w,children:(P=a[`type.${w}`])!=null?P:w},w)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.severity"],value:(b=(g=e.severity)==null?void 0:g[0])!=null?b:"",onChange:w=>u(w.target.value),children:[o("option",{value:"",children:a["board.filter.severity"]}),Go.map(w=>{var P;return o("option",{value:w,children:(P=a[`severity.${w}`])!=null?P:w},w)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:a["board.filter.search.placeholder"],value:(T=e.q)!=null?T:"",onInput:w=>p(w.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:d}),o("span",{children:a["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:m,children:[o(aa,{}),a["board.filter.clear"]]})]})}function Zo({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(G,{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(ea,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function ea({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(oa,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:sa(e.created_at)})]})]})})}function ta({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(na,{}),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 ra(){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 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("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 aa(){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 na(){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 ia(){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 ar(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 sa(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`}U();function la(e){return`pill pill-status pill-status--${e}`}function ca(e){return`pill pill-severity pill-severity--${e}`}function da(){return"pill pill-type"}function pa(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 ua(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function Ie({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:la(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:da(),children:t[`type.${e.feedback_type}`]}),o("span",{class:ca(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:pa(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",ua(e.comment_count,t)]})]})]})}var fa=3e4;function ma(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 ga(e){let t=new Map;for(let r of e){let a=ma(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:ba(r),rows:a}))}function ba(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),[u,c]=q(!1),p=W(!0),d=async()=>{c(!0),l(null);try{let R=await e.listChangelog(t);return p.current&&i(R),!0}catch(R){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",R),p.current&&l(r["mine.error"]),!1}finally{p.current&&c(!1)}};$(()=>{p.current=!0;let R=ne(d,fa);return()=>{p.current=!1,R.stop()}},[t]);let m=X(()=>n?ga(n):[],[n]),h=n===null&&!s,C=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"]})]}),h&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),C&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),m.length>0&&o("div",{class:"changelog-groups",children:m.map(R=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",R.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[R.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(R.rows.length))})]}),o("ul",{class:"mine-rows",children:R.rows.map(y=>o("li",{children:o(Ie,{row:y,strings:r,onClick:()=>a(y)})}))})]},R.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)})]})}U();U();var lr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],va=.35;function cr(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")ya(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=va,e.fillRect($e(t.x,t.w),$e(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&_a(e,t,r);e.restore()}function $e(e,t){return t<0?e+t:e}function ya(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 _a(e,t,r){if(!r)return;let a=$e(t.x,t.w),n=$e(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 p=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,p,d,c,u,p,d)}e.imageSmoothingEnabled=!1;for(let u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let p=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,1,1,c,u,p,d)}e.imageSmoothingEnabled=!0}var te={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 dr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=W(null),i=W(null),s=W(null),[l,u]=q("rectangle"),[c,p]=q(lr[0]),[d,m]=q([]),[h,C]=q([]),[R,y]=q([]),f=W(!1),[g,b]=q(null),[T,w]=q(!1),[P,k]=q(!1),H=W(1);function M(v){m(S=>(C(L=>[...L,S]),[...S,v])),y([])}function A(){m(v=>(C(S=>[...S,v]),[])),y([])}function D(){C(v=>{if(v.length===0)return v;let S=v[v.length-1];return m(L=>(y(F=>[L,...F]),S)),v.slice(0,-1)})}function E(){y(v=>{if(v.length===0)return v;let S=v[0];return m(L=>(C(F=>[...F,L]),S)),v.slice(1)})}at(()=>{let v=S=>{S.key==="Escape"&&(S.stopPropagation(),a())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[a]),$(()=>{let v=S=>{if(!(S.metaKey||S.ctrlKey))return;let F=S.key.toLowerCase();F==="z"?(S.preventDefault(),S.stopPropagation(),S.shiftKey?E():D()):F==="y"&&(S.preventDefault(),S.stopPropagation(),E())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[h,R,d]),$(()=>{let v=URL.createObjectURL(e),S=new Image;return S.onload=()=>{s.current=S,w(!0)},S.src=v,()=>URL.revokeObjectURL(v)},[e]),at(()=>{if(!T||!n.current||!s.current||!i.current)return;let v=s.current,L=i.current.clientWidth-16,F=window.innerHeight*.65,se=Math.min(L/v.width,F/v.height,1);H.current=se;let de=n.current;de.width=v.width,de.height=v.height,de.style.width=`${v.width*se}px`,de.style.height=`${v.height*se}px`,K()},[T]),$(()=>{K()},[d,g]);function K(){let v=n.current,S=s.current;if(!v||!S)return;let L=v.getContext("2d");if(L){L.clearRect(0,0,v.width,v.height),L.drawImage(S,0,0);for(let F of d)cr(L,F,S);g&&cr(L,g,S)}}function N(v){let L=n.current.getBoundingClientRect();return{x:(v.clientX-L.left)/H.current,y:(v.clientY-L.top)/H.current}}let j=v=>{if(!T)return;let{x:S,y:L}=N(v),F=n.current.width,se=Math.max(3,Math.round(F/400)),de=Math.max(8,Math.round(F/80));if(l==="text"){let je=window.prompt(t["annotator.text_prompt"]);je&&je.trim()&&M({kind:"text",x:S,y:L,text:je.trim(),color:c,fontSize:Math.max(16,Math.round(F/50)),lineWidth:1});return}f.current=!0,l==="rectangle"?b({kind:"rectangle",x:S,y:L,w:0,h:0,color:c,lineWidth:se}):l==="arrow"?b({kind:"arrow",x1:S,y1:L,x2:S,y2:L,color:c,lineWidth:se}):l==="freehand"?b({kind:"freehand",points:[{x:S,y:L}],color:c,lineWidth:se}):l==="highlight"?b({kind:"highlight",x:S,y:L,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&b({kind:"blur",x:S,y:L,w:0,h:0,color:"#000000",lineWidth:0,tile:de})},V=v=>{if(!f.current)return;let{x:S,y:L}=N(v);b(F=>F&&(F.kind==="rectangle"||F.kind==="highlight"||F.kind==="blur"?{...F,w:S-F.x,h:L-F.y}:F.kind==="arrow"?{...F,x2:S,y2:L}:F.kind==="freehand"?{...F,points:[...F.points,{x:S,y:L}]}:F))},x=()=>{b(v=>(f.current&&v&&((v.kind==="rectangle"||v.kind==="highlight"||v.kind==="blur")&&Math.abs(v.w)<4&&Math.abs(v.h)<4||v.kind==="arrow"&&Math.hypot(v.x2-v.x1,v.y2-v.y1)<4||v.kind==="freehand"&&v.points.length<3||M(v)),null)),f.current=!1},z=async()=>{let v=n.current;if(v){k(!0);try{let S=await new Promise(L=>v.toBlob(L,"image/png",.92));S&&r(S)}finally{k(!1)}}},B=[{id:"rectangle",icon:te.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:te.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:te.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:te.text,label:t["annotator.tool.text"]},{id:"highlight",icon:te.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:te.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:v=>{v.target===v.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:te.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:B.map(v=>o("button",{type:"button",onClick:()=>u(v.id),title:v.label,"aria-label":v.label,"aria-pressed":l===v.id,class:`annotator-tool ${l===v.id?"is-active":""}`,children:v.icon},v.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[lr.map(v=>o("button",{type:"button",onClick:()=>p(v),"aria-label":v,"aria-pressed":c===v,class:`annotator-color ${c===v?"is-active":""}`,style:{backgroundColor:v}},v)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:v=>p(v.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:D,disabled:h.length===0,title:t["annotator.undo"],children:[te.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:E,disabled:R.length===0,title:t["annotator.redo"],children:[te.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:A,disabled:d.length===0,children:[te.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:T?o("canvas",{ref:n,onMouseDown:j,onMouseMove:V,onMouseUp:x,onMouseLeave:x,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:z,disabled:P||!T,children:P?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var xa=["bug","feature","question","praise","typo"],wa=["blocker","high","medium","low"];function pr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n}){let[i,s]=q(""),[l,u]=q("bug"),[c,p]=q("medium"),[d,m]=q(""),[h,C]=q([]),[R,y]=q(!1),[f,g]=q(null),b=W(null),T=W(null),w=a==="submitting",P=w?e["form.submitting"]:e["form.submit"],k=typeof window!="undefined"?window.location.href:"",H=W(h);H.current=h,$(()=>()=>{H.current.forEach(x=>URL.revokeObjectURL(x.preview))},[]);let M=x=>{m("");let z=5-h.length,B=x.slice(0,Math.max(0,z));for(let v of B)if(v instanceof File){let S=rr(v);if(S){m(S.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(S.maxMb)));return}}if(B.length){let v=B.map(S=>({blob:S,preview:URL.createObjectURL(S)}));C(S=>[...S,...v])}x.length>B.length&&m(e["form.screenshot.error_count"].replace("{max}",String(5)))},A=x=>{let z=h[x];z&&URL.revokeObjectURL(z.preview),C(B=>B.filter((v,S)=>S!==x)),m(""),b.current&&(b.current.value="")},D=x=>{var v;let z=x.target,B=Array.from((v=z.files)!=null?v:[]);B.length&&M(B),z.value=""},E=x=>{x.preventDefault(),x.stopPropagation(),y(!0)},K=x=>{x.preventDefault(),x.stopPropagation(),x.currentTarget===x.target&&y(!1)},N=x=>{var B,v;x.preventDefault(),x.stopPropagation(),y(!1);let z=Array.from((v=(B=x.dataTransfer)==null?void 0:B.files)!=null?v:[]);z.length&&M(z)};$(()=>{let x=T.current;if(!x)return;let z=B=>{var S;let v=(S=B.clipboardData)==null?void 0:S.items;if(v){for(let L of Array.from(v))if(L.kind==="file"&&L.type.startsWith("image/")){let F=L.getAsFile();if(F){B.preventDefault(),M([F]);return}}}};return x.addEventListener("paste",z),()=>x.removeEventListener("paste",z)},[h.length]);let j=x=>{let z=f;if(z===null||!h[z]){g(null);return}URL.revokeObjectURL(h[z].preview);let B={blob:x,preview:URL.createObjectURL(x)};C(v=>v.map((S,L)=>L===z?B:S)),g(null)};return o("form",{onSubmit:x=>{if(x.preventDefault(),!i.trim()){m(e["form.description.required"]);return}m("");let z={description:i.trim(),feedback_type:l,severity:c};h.length&&(z.screenshots=h.map(B=>B.blob),z.capture_method="manual"),t(z)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:i,placeholder:e["form.description.placeholder"],onInput:x=>s(x.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:l,onChange:x=>u(x.target.value),children:xa.map(x=>o("option",{value:x,children:e[`type.${x}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:x=>p(x.target.value),children:wa.map(x=>o("option",{value:x,children:e[`severity.${x}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:b,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"mfb-sr-only",onChange:D,"aria-hidden":"true",tabIndex:-1}),h.length>0&&o("div",{class:"screenshot-strip",children:h.map((x,z)=>o("div",{class:"screenshot-preview",children:[o("img",{src:x.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>g(z),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),o("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),e["form.screenshot.annotate"]]}),o("button",{type:"button",class:"btn",onClick:()=>A(z),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"]]})]})]},x.preview))}),h.length<5&&o("div",{ref:T,class:`screenshot-dropzone ${R?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var x;return(x=b.current)==null?void 0:x.click()},onKeyDown:x=>{var z;(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),(z=b.current)==null||z.click())},onDragOver:E,onDragLeave:K,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"]})]})]}),k&&o("div",{class:"page-context",title:k,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:ge(k,90)})]}),d&&o("div",{class:"error",children:d}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children: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:P})]}),f!==null&&h[f]&&o(dr,{imageBlob:h[f].blob,strings:e,onCancel:()=>g(null),onSave:j})]})}U();function ka(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 Sa(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var Ca={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function ur(e,t){return t==="all"?e:e.filter(r=>Ca[r.status]===t)}function fr({rows:e,filter:t,onFilter:r,strings:a}){let n=ka(e),i=Sa(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 Ra=3e4;function mr({api:e,externalId:t,strings:r,onSelect:a}){var g;let[n,i]=q(null),[s,l]=q(null),[u,c]=q(!1),[p,d]=q("all"),m=W(!0),h=async()=>{c(!0),l(null);try{let b=await e.listMine(t);return m.current&&i(b),!0}catch(b){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",b),m.current&&l(r["mine.error"]),!1}finally{m.current&&c(!1)}};$(()=>{m.current=!0;let b=ne(h,Ra);return()=>{m.current=!1,b.stop()}},[t]);let C=n!==null&&n.length===0,R=n===null&&!s,y=n?ur(n,p):null,f=!!n&&n.length>0&&((g=y==null?void 0:y.length)!=null?g:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{h()},disabled:u,children:u?r["mine.loading"]:r["mine.refresh"]})]}),n&&n.length>0&&o(fr,{rows:n,filter:p,onFilter:d,strings:r}),R&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),C&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),f&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),y&&y.length>0&&o("ul",{class:"mine-rows",children:y.map(b=>o("li",{children:o(Ie,{row:b,strings:r,onClick:()=>a(b)})}))})]})}U();function gr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=W(null),i=W(null);return $(()=>{var u;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let p=(d=n.current)==null?void 0:d.getRootNode();p instanceof ShadowRoot&&p.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};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()},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,children:"\xD7"}),t]})})}function br({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"]})]})}U();function hr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[u,c]=q(null),[p,d]=q(!1);return $(()=>{let m=!1,h=ee(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:h,status:["new","in_progress","awaiting_validation"]}).then(C=>{m||c(C.results.slice(0,5))}).catch(()=>{m||d(!0)}),()=>{m=!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&&!p&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),u!==null&&u.map(m=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(m.id),children:[o("span",{class:`page-peek-dot status-${m.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:m.description})]},m.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"]})]})]})}U();var Pa=6e4;function qa(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 dt=new Map,ct=new Map;function Ta(){dt.clear()}function Ea(e,t,r){let a=`${t}|${r}`,n=dt.get(a);if(n&&Date.now()-n.fetchedAt<Pa)return Promise.resolve(n.open);let i=ct.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>{let u=qa(l);return dt.set(a,{open:u,fetchedAt:Date.now()}),u}).finally(()=>ct.delete(a));return ct.set(a,s),s}function vr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=q(0),[l,u]=q(0),c=oe(()=>{Ta(),u(p=>p+1)},[]);return $(()=>{if(!n||!t||!r){s(0);return}let p=!1,d=()=>{let h=ee(a!==void 0?{getCurrentPage:a}:{});Ea(t,r,h).then(C=>{p||s(C)}).catch(()=>{p||s(0)})};d();let m=Be(d);return()=>{p=!0,m()}},[t,r,n,l]),{open:i,refresh:c}}var yr=`
|
|
622
622
|
:host {
|
|
623
623
|
--mfb-accent: #3b82f6;
|
|
624
624
|
--mfb-accent-contrast: #ffffff;
|
|
@@ -691,10 +691,20 @@
|
|
|
691
691
|
soft-black background with a light steel-blue lucide-bug glyph;
|
|
692
692
|
custom SVG inlined (no emoji \u2014 emoji renders inconsistently across
|
|
693
693
|
OSes and can't inherit color). Two-layer elevation, scale-on-press. */
|
|
694
|
-
.fab {
|
|
694
|
+
.fab-area {
|
|
695
695
|
position: fixed;
|
|
696
696
|
bottom: 24px;
|
|
697
697
|
right: 24px;
|
|
698
|
+
/* No z-index on purpose: the modal .backdrop/.modal are later siblings in
|
|
699
|
+
the shadow root, so DOM order must keep them painting above the FAB \u2014
|
|
700
|
+
an explicit z-index here would trap the FAB on top of the open modal. */
|
|
701
|
+
}
|
|
702
|
+
.fab-area .fab {
|
|
703
|
+
position: relative;
|
|
704
|
+
right: auto;
|
|
705
|
+
bottom: auto;
|
|
706
|
+
}
|
|
707
|
+
.fab {
|
|
698
708
|
width: 48px;
|
|
699
709
|
height: 48px;
|
|
700
710
|
border-radius: 999px;
|
|
@@ -738,9 +748,43 @@
|
|
|
738
748
|
0 4px 12px rgba(0, 0, 0, 0.32),
|
|
739
749
|
0 2px 4px rgba(0, 0, 0, 0.40); }
|
|
740
750
|
}
|
|
751
|
+
|
|
752
|
+
/* Page-activity badge \u2014 absolute so it never shifts the FAB's layout. */
|
|
753
|
+
.fab-badge {
|
|
754
|
+
position: absolute;
|
|
755
|
+
top: -2px;
|
|
756
|
+
right: -2px;
|
|
757
|
+
min-width: 16px;
|
|
758
|
+
height: 16px;
|
|
759
|
+
padding: 0 4px;
|
|
760
|
+
box-sizing: border-box;
|
|
761
|
+
border-radius: 999px;
|
|
762
|
+
background: var(--mfb-accent);
|
|
763
|
+
color: #fff;
|
|
764
|
+
font-size: 10px;
|
|
765
|
+
font-weight: 700;
|
|
766
|
+
line-height: 16px;
|
|
767
|
+
text-align: center;
|
|
768
|
+
box-shadow: 0 0 0 2px var(--mfb-fab-bg);
|
|
769
|
+
animation: mfb-badge-in 150ms ease-out;
|
|
770
|
+
}
|
|
771
|
+
@keyframes mfb-badge-in {
|
|
772
|
+
from {
|
|
773
|
+
opacity: 0;
|
|
774
|
+
transform: scale(0.6);
|
|
775
|
+
}
|
|
776
|
+
to {
|
|
777
|
+
opacity: 1;
|
|
778
|
+
transform: scale(1);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
|
|
741
782
|
@media (prefers-reduced-motion: reduce) {
|
|
742
783
|
.fab { transition: none; }
|
|
743
784
|
.fab:hover, .fab:active { transform: none; }
|
|
785
|
+
.fab-badge {
|
|
786
|
+
animation: none;
|
|
787
|
+
}
|
|
744
788
|
}
|
|
745
789
|
|
|
746
790
|
/* Backdrop \u2014 fade in with a slight blur for depth. The blur gives the
|
|
@@ -2087,6 +2131,59 @@
|
|
|
2087
2131
|
background: var(--mfb-surface);
|
|
2088
2132
|
}
|
|
2089
2133
|
|
|
2134
|
+
/* Scope segmented control \u2014 [This page | All pages], front of the filter row. */
|
|
2135
|
+
.board-scope {
|
|
2136
|
+
display: inline-flex;
|
|
2137
|
+
border: 1px solid var(--mfb-border);
|
|
2138
|
+
border-radius: var(--mfb-radius);
|
|
2139
|
+
overflow: hidden;
|
|
2140
|
+
flex: none;
|
|
2141
|
+
}
|
|
2142
|
+
.board-scope-btn {
|
|
2143
|
+
border: none;
|
|
2144
|
+
background: none;
|
|
2145
|
+
padding: 6px 10px;
|
|
2146
|
+
font: inherit;
|
|
2147
|
+
font-size: var(--mfb-text-sm);
|
|
2148
|
+
color: var(--mfb-text-muted);
|
|
2149
|
+
cursor: pointer;
|
|
2150
|
+
}
|
|
2151
|
+
.board-scope-btn.is-active {
|
|
2152
|
+
background: color-mix(in srgb, var(--mfb-accent) 14%, transparent);
|
|
2153
|
+
color: var(--mfb-accent);
|
|
2154
|
+
font-weight: 600;
|
|
2155
|
+
}
|
|
2156
|
+
.board-scope-btn:focus-visible {
|
|
2157
|
+
outline: 2px solid var(--mfb-accent);
|
|
2158
|
+
outline-offset: -2px;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
/* Send-tab page-activity strip \u2014 one line, muted, non-blocking. */
|
|
2162
|
+
.page-strip {
|
|
2163
|
+
display: flex;
|
|
2164
|
+
align-items: center;
|
|
2165
|
+
justify-content: space-between;
|
|
2166
|
+
gap: var(--mfb-space-3);
|
|
2167
|
+
margin: var(--mfb-space-3) 0 0;
|
|
2168
|
+
padding: var(--mfb-space-2) var(--mfb-space-3);
|
|
2169
|
+
border-radius: var(--mfb-radius);
|
|
2170
|
+
background: var(--mfb-surface-2);
|
|
2171
|
+
color: var(--mfb-text-muted);
|
|
2172
|
+
font-size: var(--mfb-text-sm);
|
|
2173
|
+
}
|
|
2174
|
+
.page-strip-view {
|
|
2175
|
+
border: none;
|
|
2176
|
+
background: none;
|
|
2177
|
+
padding: 0;
|
|
2178
|
+
color: var(--mfb-accent);
|
|
2179
|
+
font-size: var(--mfb-text-sm);
|
|
2180
|
+
font-weight: 600;
|
|
2181
|
+
cursor: pointer;
|
|
2182
|
+
}
|
|
2183
|
+
.page-strip-view:hover {
|
|
2184
|
+
text-decoration: underline;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2090
2187
|
/* Master/detail layout \u2014 two-column at >=900px, stacked below. */
|
|
2091
2188
|
.board-body {
|
|
2092
2189
|
display: grid;
|
|
@@ -2315,5 +2412,85 @@
|
|
|
2315
2412
|
@media (prefers-reduced-motion: reduce) {
|
|
2316
2413
|
.skeleton-line { animation: none; }
|
|
2317
2414
|
}
|
|
2318
|
-
|
|
2415
|
+
|
|
2416
|
+
/* Hover peek panel \u2014 desktop-only ambient surface listing this page's
|
|
2417
|
+
open reports above the FAB (spec \xA73.2). Non-modal; never renders while
|
|
2418
|
+
the modal itself is open. */
|
|
2419
|
+
.page-peek {
|
|
2420
|
+
position: absolute;
|
|
2421
|
+
right: 0;
|
|
2422
|
+
bottom: 60px;
|
|
2423
|
+
width: 300px;
|
|
2424
|
+
padding: var(--mfb-space-3);
|
|
2425
|
+
border: 1px solid var(--mfb-border);
|
|
2426
|
+
border-radius: var(--mfb-radius-lg);
|
|
2427
|
+
background: var(--mfb-surface);
|
|
2428
|
+
color: var(--mfb-text);
|
|
2429
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
|
|
2430
|
+
font-size: var(--mfb-text-sm);
|
|
2431
|
+
}
|
|
2432
|
+
.page-peek-title {
|
|
2433
|
+
font-weight: 700;
|
|
2434
|
+
margin-bottom: var(--mfb-space-2);
|
|
2435
|
+
color: var(--mfb-text-muted);
|
|
2436
|
+
text-transform: uppercase;
|
|
2437
|
+
font-size: var(--mfb-text-xs);
|
|
2438
|
+
letter-spacing: 0.04em;
|
|
2439
|
+
}
|
|
2440
|
+
.page-peek-row {
|
|
2441
|
+
display: flex;
|
|
2442
|
+
align-items: center;
|
|
2443
|
+
gap: var(--mfb-space-2);
|
|
2444
|
+
width: 100%;
|
|
2445
|
+
padding: var(--mfb-space-2);
|
|
2446
|
+
border: none;
|
|
2447
|
+
border-radius: var(--mfb-radius);
|
|
2448
|
+
background: none;
|
|
2449
|
+
color: var(--mfb-text);
|
|
2450
|
+
text-align: left;
|
|
2451
|
+
cursor: pointer;
|
|
2452
|
+
}
|
|
2453
|
+
.page-peek-row:hover {
|
|
2454
|
+
background: var(--mfb-surface-2);
|
|
2455
|
+
}
|
|
2456
|
+
.page-peek-dot {
|
|
2457
|
+
width: 8px;
|
|
2458
|
+
height: 8px;
|
|
2459
|
+
border-radius: 50%;
|
|
2460
|
+
flex: none;
|
|
2461
|
+
}
|
|
2462
|
+
.page-peek-dot.status-new { background: #1e40af; }
|
|
2463
|
+
.page-peek-dot.status-in_progress { background: #92400e; }
|
|
2464
|
+
.page-peek-dot.status-awaiting_validation { background: #6b21a8; }
|
|
2465
|
+
.page-peek-dot.status-closed { background: #065f46; }
|
|
2466
|
+
.page-peek-dot.status-rejected { background: #991b1b; }
|
|
2467
|
+
.page-peek-desc {
|
|
2468
|
+
overflow: hidden;
|
|
2469
|
+
white-space: nowrap;
|
|
2470
|
+
text-overflow: ellipsis;
|
|
2471
|
+
}
|
|
2472
|
+
.page-peek-footer {
|
|
2473
|
+
display: flex;
|
|
2474
|
+
justify-content: space-between;
|
|
2475
|
+
margin-top: var(--mfb-space-2);
|
|
2476
|
+
padding-top: var(--mfb-space-2);
|
|
2477
|
+
border-top: 1px solid var(--mfb-border);
|
|
2478
|
+
}
|
|
2479
|
+
.page-peek-viewall,
|
|
2480
|
+
.page-peek-send {
|
|
2481
|
+
border: none;
|
|
2482
|
+
background: none;
|
|
2483
|
+
padding: 0;
|
|
2484
|
+
cursor: pointer;
|
|
2485
|
+
color: var(--mfb-accent);
|
|
2486
|
+
font-weight: 600;
|
|
2487
|
+
font-size: var(--mfb-text-sm);
|
|
2488
|
+
}
|
|
2489
|
+
.page-peek-skeleton div {
|
|
2490
|
+
height: 14px;
|
|
2491
|
+
border-radius: 4px;
|
|
2492
|
+
background: var(--mfb-surface-2);
|
|
2493
|
+
margin: var(--mfb-space-2) 0;
|
|
2494
|
+
}
|
|
2495
|
+
`;function Ma(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function _r(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=yr,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null;function s(p){n=p,fe(_(c,{state:p}),a)}function l(p){let{selectedReportId:d,boardSelectId:m,...h}=p;return h}function u(p){s({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&p&&e.api.fetchBoardKpis(p,{pagePath:ee(e)}).then(d=>{d.total>0&&n.open&&n.tab==="send"&&s({...n,tab:"board"})}).catch(()=>{})}function c({state:p}){var M;let d=oe(async A=>{s({...n,status:"submitting"});try{await e.onSubmit(A),C.refresh(),s({...n,status:"success"}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(D){typeof console!="undefined"&&console.warn("[mhosaic] submit:",D),s({...n,status:"error",error:e.strings["form.error"]})}},[]),m=(M=e.getExternalId)==null?void 0:M.call(e),h=e.showPageActivity!==!1,C=vr({...e.api!==void 0&&{api:e.api},...m!==void 0&&{externalId:m},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:h}),R=C.open===1?e.strings["page.badge.aria.one"]:C.open>0?e.strings["page.badge.aria"].replace("{n}",String(C.open)):e.strings["fab.label"],[y,f]=q(!e.requiresVisibilityCheck);$(()=>{if(!e.requiresVisibilityCheck){f(!0);return}if(!m||!e.checkVisibility){f(!1);return}let A=!1;return e.checkVisibility(m).then(D=>{A||f(D)}).catch(()=>{A||f(!1)}),()=>{A=!0}},[m]);let g=Ma(e,m,y),b=!!(e.api&&m),[T,w]=q(!1),P=W({});return o(G,{children:[g&&o("div",{class:"fab-area",onMouseEnter:()=>{P.current.close&&clearTimeout(P.current.close),P.current.open=setTimeout(()=>w(!0),250)},onMouseLeave:()=>{P.current.open&&clearTimeout(P.current.open),P.current.close=setTimeout(()=>w(!1),140)},onFocusIn:A=>{var D,E;P.current.close&&clearTimeout(P.current.close),(E=(D=A.target).matches)!=null&&E.call(D,":focus-visible")&&w(!0)},onFocusOut:()=>w(!1),onKeyDown:A=>A.key==="Escape"&&w(!1),children:[T&&!p.open&&h&&C.open>0&&e.api&&m&&o(hr,{api:e.api,externalId:m,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:C.open,onViewAll:()=>{w(!1),s({...n,open:!0,tab:"board"})},onPickRow:A=>{w(!1),s({...n,open:!0,tab:"board",boardSelectId:A})},onSend:()=>{w(!1),u(m)}}),o(sr,{label:R,onClick:()=>u(m),...C.open>0&&{count:C.open}})]}),p.open&&o(gr,{onDismiss:()=>s(l({...n,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:p.tab==="board",children:[b&&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:()=>s(l({...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:()=>s(l({...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:()=>s(l({...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:()=>s(l({...n,tab:"board"})),children:e.strings["tab.board"]})]}),p.tab==="send"&&o(G,{children:[b&&h&&o(br,{open:C.open,strings:e.strings,onView:()=>s(l({...n,tab:"board"}))}),o(pr,{strings:e.strings,onSubmit:d,onCancel:()=>s({...n,open:!1,status:"idle"}),status:p.status,...p.error!==void 0&&{errorMessage:p.error}})]}),p.tab==="mine"&&e.api&&m&&!p.selectedReportId&&o(mr,{api:e.api,externalId:m,strings:e.strings,onSelect:A=>s({...n,selectedReportId:A.id})}),(p.tab==="mine"||p.tab==="changelog")&&e.api&&m&&p.selectedReportId&&o(Fe,{api:e.api,externalId:m,reportId:p.selectedReportId,strings:e.strings,onBack:()=>s(l({...n}))}),p.tab==="changelog"&&e.api&&m&&!p.selectedReportId&&o(ir,{api:e.api,externalId:m,strings:e.strings,onSelect:A=>s({...n,selectedReportId:A.id})}),p.tab==="board"&&e.api&&m&&o(nr,{api:e.api,externalId:m,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...p.boardSelectId!==void 0&&{initialSelectedId:p.boardSelectId}})]})]})}return s(n),{open(){var p;u((p=e.getExternalId)==null?void 0:p.call(e))},close(){s({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),fe(null,a),e.host.innerHTML=""},notifyIdentityChanged(){s({...n})}}}function Ua(){return{right:24+24/2,bottom:84}}function bt(e){var R,y,f,g,b,T,w,P;let t=(R=e.env)!=null?R:"prod",r=(y=e.locale)!=null?y:typeof navigator!="undefined"?navigator.language:void 0,a=Rt((f=e.translations)!=null?f:{},r!==void 0?{locale:r}:{}),n=Ct({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(g=e.metadata)!=null?g:{},l=vt({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 p(k){var j,V,x,z,B,v;let H=(j=k.screenshots)!=null&&j.length?k.screenshots:k.screenshot?[k.screenshot]:void 0,M=k.synthetic?void 0:H,A=n.snapshot();if(i){let{userHash:S,exp:L,...F}=i;A.user=F}s&&Object.keys(s).length>0&&(A.metadata={...s});let D=M!=null&&M.length?(V=k.capture_method)!=null?V:"manual":"none",E={description:k.description,feedback_type:(x=k.feedback_type)!=null?x:"bug",severity:(z=k.severity)!=null?z:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:D,technical_context:A};E.widget_version="0.27.0",M!=null&&M.length&&(E.screenshots=M,E.screenshot=M[0]),k.synthetic&&(E.synthetic=!0);let K=ee(e);K&&(E.page_path=K),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(E.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let N=E;for(let S of u)N=await S(N);try{let S=await l.submitReport(N);return(B=e.onSubmitSuccess)==null||B.call(e,S),n.clear(),S}catch(S){let L=S instanceof Error?S:new Error(String(S));throw(v=e.onError)==null||v.call(e,L),L}}let d=_r({host:c,strings:a,showFAB:(b=e.showFAB)!=null?b:!0,onSubmit:async k=>{await p(k)},api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(T=e.requiresVisibilityCheck)!=null?T:!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}}),m,h=!1;if((w=e.qaMeter)!=null&&w.source){let k=e.qaMeter,H=(P=k.locale)!=null?P:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(Ur(),jr)).then(({createQaMeter:M})=>{var A,D;h||(m=M({source:k.source,size:(A=k.size)!=null?A:"sm",position:(D=k.position)!=null?D:Ua(),locale:H,...k.getCurrentPage&&{getCurrentPage:k.getCurrentPage}}))})}let C={show(){d.open()},hide(){d.close()},open(k){d.open()},async submit(k){return p({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(){h=!0,m==null||m.dispose(),d.dispose(),n.dispose(),c.remove();let k=window;k.mhosaicFeedback===C&&delete k.mhosaicFeedback},_registerTransformer(k){u.push(k)}};return window.mhosaicFeedback=C,C}var Xr=window;function Jr(e){if(!e.key||!e.endpoint)return null;let t=e.env;return{apiKey:e.key,endpoint:e.endpoint,...t!==void 0&&{env:t},...e.qaSource?{qaMeter:{source:e.qaSource,...e.qaLocale?{locale:e.qaLocale}:{}}}:{}}}function Va(){let e=document.currentScript;return e?Jr(e.dataset):null}var ce=null,Gr,Yr,We=(Yr=(Gr=Xr.Feedback)==null?void 0:Gr.q)!=null?Yr:[];function Zr(e){let[t,r]=e;if(t==="init"){if(ce)return;ce=bt(r);return}if(!ce){We.push(e);return}t==="identify"?ce.identify(r):t==="setMetadata"?ce.setMetadata(r):t==="open"&&ce.open(r)}var Vr=Va();Vr&&(ce=bt(Vr));for(;We.length>0;)Zr(We.shift());var Ga=Object.assign(function(t,r){Zr([t,r])},{q:We});Xr.Feedback=Ga;return no(Ya);})();
|
|
2319
2496
|
//# sourceMappingURL=embed.min.js.map
|