@reticlehq/browser 3.1.0 → 3.3.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.
Files changed (71) hide show
  1. package/dist/actions/actions-dom.d.ts +2 -1
  2. package/dist/actions/actions-dom.js +28 -41
  3. package/dist/actions/actions.d.ts +0 -1
  4. package/dist/actions/actions.js +13 -7
  5. package/dist/actions/value-input.js +14 -5
  6. package/dist/connect-options.d.ts +1 -0
  7. package/dist/dom/addressing/source.d.ts +2 -1
  8. package/dist/dom/dom-ignore.d.ts +1 -0
  9. package/dist/dom/dom-ignore.js +13 -0
  10. package/dist/dom/query.js +28 -9
  11. package/dist/dom/snapshot.d.ts +1 -1
  12. package/dist/observers/console.js +38 -13
  13. package/dist/observers/departure.js +16 -8
  14. package/dist/observers/dom.js +3 -1
  15. package/dist/observers/download.js +3 -2
  16. package/dist/observers/error-repeats.d.ts +18 -0
  17. package/dist/observers/error-repeats.js +41 -0
  18. package/dist/observers/field.d.ts +2 -0
  19. package/dist/observers/field.js +86 -0
  20. package/dist/observers/frames.js +3 -4
  21. package/dist/observers/install-all.js +2 -0
  22. package/dist/observers/net-detail/network-body.d.ts +2 -0
  23. package/dist/observers/net-detail/network-body.js +24 -7
  24. package/dist/observers/network.js +49 -8
  25. package/dist/observers/route.js +4 -4
  26. package/dist/observers/state.js +18 -8
  27. package/dist/presenter/carousel/carousel.d.ts +13 -0
  28. package/dist/presenter/carousel/carousel.js +126 -0
  29. package/dist/presenter/carousel/offer-card.d.ts +21 -0
  30. package/dist/presenter/carousel/offer-card.js +55 -0
  31. package/dist/presenter/carousel/panel-slides.d.ts +7 -0
  32. package/dist/presenter/carousel/panel-slides.js +10 -0
  33. package/dist/presenter/carousel/talk-card.d.ts +8 -0
  34. package/dist/presenter/carousel/talk-card.js +20 -0
  35. package/dist/presenter/chrome/presenter-log.d.ts +2 -1
  36. package/dist/presenter/chrome/presenter-log.js +14 -3
  37. package/dist/presenter/chrome/presenter-report-copy.d.ts +0 -1
  38. package/dist/presenter/chrome/presenter-report-copy.js +1 -1
  39. package/dist/presenter/hud-telemetry.d.ts +3 -0
  40. package/dist/presenter/hud-telemetry.js +87 -0
  41. package/dist/presenter/presenter-account.js +1 -1
  42. package/dist/presenter/presenter-config.d.ts +5 -1
  43. package/dist/presenter/presenter-config.js +4 -1
  44. package/dist/presenter/presenter-controls.d.ts +1 -0
  45. package/dist/presenter/presenter-controls.js +12 -1
  46. package/dist/presenter/presenter-report-styles.js +4 -0
  47. package/dist/presenter/presenter-report.js +8 -7
  48. package/dist/presenter/presenter-settings-styles.js +2 -1
  49. package/dist/presenter/presenter-settings.d.ts +6 -4
  50. package/dist/presenter/presenter-settings.js +51 -5
  51. package/dist/presenter/presenter-shell-styles.js +16 -0
  52. package/dist/presenter/presenter-shell.d.ts +7 -0
  53. package/dist/presenter/presenter-shell.js +65 -5
  54. package/dist/presenter/presenter-styles.js +6 -0
  55. package/dist/presenter/presenter-workspace.d.ts +0 -7
  56. package/dist/presenter/presenter-workspace.js +7 -7
  57. package/dist/presenter/presenter.js +46 -10
  58. package/dist/presenter/tour/tour-view.js +7 -3
  59. package/dist/presenter/tour/tour.d.ts +3 -0
  60. package/dist/presenter/tour/tour.js +26 -2
  61. package/dist/recorder/recorder.js +25 -22
  62. package/dist/reticle-inject.d.ts +2 -0
  63. package/dist/reticle-inject.js +1337 -0
  64. package/dist/reticle.js +11 -1
  65. package/dist/review/annotator.d.ts +3 -0
  66. package/dist/review/annotator.js +37 -37
  67. package/dist/review/marks-for-agent.d.ts +9 -0
  68. package/dist/review/marks-for-agent.js +12 -0
  69. package/dist/util/captured-method.d.ts +0 -1
  70. package/dist/util/captured-method.js +1 -1
  71. package/package.json +8 -4
@@ -0,0 +1,1337 @@
1
+ "use strict";var ReticleSdk=(()=>{var Xu=Object.defineProperty;var NR=Object.getOwnPropertyDescriptor;var OR=Object.getOwnPropertyNames;var wR=Object.prototype.hasOwnProperty;var Wm=t=>{throw TypeError(t)};var T=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Ba=(t,e)=>{for(var n in e)Xu(t,n,{get:e[n],enumerable:!0})},CR=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of OR(e))!wR.call(t,i)&&i!==n&&Xu(t,i,{get:()=>e[i],enumerable:!(r=NR(e,i))||r.enumerable});return t};var IR=t=>CR(Xu({},"__esModule",{value:!0}),t);var Zu=(t,e,n)=>e.has(t)||Wm("Cannot "+n);var c=(t,e,n)=>(Zu(t,e,"read from private field"),n?n.call(t):e.get(t)),m=(t,e,n)=>e.has(t)?Wm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),u=(t,e,n,r)=>(Zu(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),h=(t,e,n)=>(Zu(t,e,"access private method"),n);var zm=(t,e,n,r)=>({set _(i){u(t,e,i,n)},get _(){return c(t,e,r)}});function qm(t){Qu=t}function Xm(){return Qu}function Zm(t){Ym=t.join(",")}function Le(t){return t.closest(Yi)!==null}function qi(t){return t!==null&&t.closest(Yi)!==null}function fn(t){let n=[Qu?"":Yi,LR,Ym].filter(r=>r.length>0).join(",");return t.closest(n)!==null}function kl(t){for(let e of Array.from(t.querySelectorAll(kR)))if(e.closest(Yi)===null&&!(e instanceof HTMLElement&&(e.hidden||e.closest("[hidden]")!==null))&&!(e instanceof HTMLElement&&getComputedStyle(e).display==="none"))return!0;return!1}var Yi,LR,Ym,Qu,kR,et=T(()=>{"use strict";Yi="[data-reticle-overlay],[data-reticle-cursor],[data-reticle-hud],[data-reticle-glow],[data-reticle-mark],[data-reticle-blocker],[data-reticle-tour]",LR="[data-agentation],#__next-build-watcher,nextjs-portal,[data-nextjs-dialog],[data-nextjs-toast]",Ym="",Qu=!1;kR='dialog[open], [aria-modal="true"]'});var Qm=T(()=>{"use strict"});var J,Ju,N,Cn,Fa=T(()=>{(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{let s={};for(let a of i)s[a]=a;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),a={};for(let l of s)a[l]=i[l];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(let a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(J||(J={}));(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ju||(Ju={}));N=J.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cn=t=>{switch(typeof t){case"undefined":return N.undefined;case"string":return N.string;case"number":return Number.isNaN(t)?N.nan:N.number;case"boolean":return N.boolean;case"function":return N.function;case"bigint":return N.bigint;case"symbol":return N.symbol;case"object":return Array.isArray(t)?N.array:t===null?N.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?N.promise:typeof Map<"u"&&t instanceof Map?N.map:typeof Set<"u"&&t instanceof Set?N.set:typeof Date<"u"&&t instanceof Date?N.date:N.object;default:return N.unknown}}});var x,DR,vt,Dl=T(()=>{Fa();x=J.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),DR=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),vt=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let l=r,d=0;for(;d<a.path.length;){let p=a.path[d];d===a.path.length-1?(l[p]=l[p]||{_errors:[]},l[p]._errors.push(n(a))):l[p]=l[p]||{_errors:[]},l=l[p],d++}}};return i(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,J.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let i of this.issues)if(i.path.length>0){let s=i.path[0];n[s]=n[s]||[],n[s].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};vt.create=t=>new vt(t)});var MR,ir,ep=T(()=>{Dl();Fa();MR=(t,e)=>{let n;switch(t.code){case x.invalid_type:t.received===N.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case x.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,J.jsonStringifyReplacer)}`;break;case x.unrecognized_keys:n=`Unrecognized key(s) in object: ${J.joinValues(t.keys,", ")}`;break;case x.invalid_union:n="Invalid input";break;case x.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${J.joinValues(t.options)}`;break;case x.invalid_enum_value:n=`Invalid enum value. Expected ${J.joinValues(t.options)}, received '${t.received}'`;break;case x.invalid_arguments:n="Invalid function arguments";break;case x.invalid_return_type:n="Invalid function return type";break;case x.invalid_date:n="Invalid date";break;case x.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:J.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case x.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case x.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case x.custom:n="Invalid input";break;case x.invalid_intersection_types:n="Intersection results could not be merged";break;case x.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case x.not_finite:n="Number must be finite";break;default:n=e.defaultError,J.assertNever(t)}return{message:n}},ir=MR});function PR(t){Jm=t}function Xi(){return Jm}var Jm,Ml=T(()=>{ep();Jm=ir});function y(t,e){let n=Xi(),r=Ga({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===ir?void 0:ir].filter(i=>!!i)});t.common.issues.push(r)}var Ga,$R,ze,H,Co,tt,Pl,$l,Kr,Zi,tp=T(()=>{Ml();ep();Ga=t=>{let{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let l="",d=r.filter(p=>!!p).slice().reverse();for(let p of d)l=p(a,{data:e,defaultError:l}).message;return{...i,path:s,message:l}},$R=[];ze=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let i of n){if(i.status==="aborted")return H;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let i of n){let s=await i.key,a=await i.value;r.push({key:s,value:a})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let i of n){let{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return H;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}},H=Object.freeze({status:"aborted"}),Co=t=>({status:"dirty",value:t}),tt=t=>({status:"valid",value:t}),Pl=t=>t.status==="aborted",$l=t=>t.status==="dirty",Kr=t=>t.status==="valid",Zi=t=>typeof Promise<"u"&&t instanceof Promise});var eg=T(()=>{});var M,tg=T(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(M||(M={}))});function K(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,l)=>{let{message:d}=t;return a.code==="invalid_enum_value"?{message:d??l.defaultError}:typeof l.data>"u"?{message:d??r??l.defaultError}:a.code!=="invalid_type"?{message:l.defaultError}:{message:d??n??l.defaultError}},description:i}}function ig(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function e0(t){return new RegExp(`^${ig(t)}$`)}function sg(t){let e=`${og}T${ig(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function t0(t,e){return!!((e==="v4"||!e)&&zR.test(t)||(e==="v6"||!e)&&qR.test(t))}function n0(t,e){if(!jR.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function r0(t,e){return!!((e==="v4"||!e)&&YR.test(t)||(e==="v6"||!e)&&XR.test(t))}function o0(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return s%a/10**i}function Qi(t){if(t instanceof Rt){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=Yt.create(Qi(r))}return new Rt({...t._def,shape:()=>e})}else return t instanceof cr?new cr({...t._def,type:Qi(t.element)}):t instanceof Yt?Yt.create(Qi(t.unwrap())):t instanceof Ln?Ln.create(Qi(t.unwrap())):t instanceof In?In.create(t.items.map(e=>Qi(e))):t}function rp(t,e){let n=Cn(t),r=Cn(e);if(t===e)return{valid:!0,data:t};if(n===N.object&&r===N.object){let i=J.objectKeys(e),s=J.objectKeys(t).filter(l=>i.indexOf(l)!==-1),a={...t,...e};for(let l of s){let d=rp(t[l],e[l]);if(!d.valid)return{valid:!1};a[l]=d.data}return{valid:!0,data:a}}else if(n===N.array&&r===N.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let a=t[s],l=e[s],d=rp(a,l);if(!d.valid)return{valid:!1};i.push(d.data)}return{valid:!0,data:i}}else return n===N.date&&r===N.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function ag(t,e){return new Fo({values:t,typeName:F.ZodEnum,...K(e)})}function rg(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function cg(t,e={},n){return t?zr.create().superRefine((r,i)=>{let s=t(r);if(s instanceof Promise)return s.then(a=>{if(!a){let l=rg(e,r),d=l.fatal??n??!0;i.addIssue({code:"custom",...l,fatal:d})}});if(!s){let a=rg(e,r),l=a.fatal??n??!0;i.addIssue({code:"custom",...a,fatal:l})}}):zr.create()}var qt,ng,q,UR,HR,BR,FR,GR,jR,VR,KR,WR,np,zR,YR,qR,XR,ZR,QR,og,JR,Wr,Io,Lo,ko,Do,Ji,Mo,Po,zr,ar,hn,es,cr,Rt,$o,sr,Ul,Uo,In,Hl,ts,ns,Bl,Ho,Bo,Fo,Go,Yr,Xt,Yt,Ln,jo,Vo,rs,i0,ja,Va,Ko,s0,F,a0,lg,dg,c0,l0,ug,d0,u0,p0,f0,h0,m0,g0,E0,b0,T0,_0,S0,x0,A0,y0,v0,R0,N0,O0,w0,C0,I0,L0,k0,D0,M0,P0,$0,U0,H0,B0,F0,G0,j0,pg=T(()=>{Dl();Ml();tg();tp();Fa();qt=class{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ng=(t,e)=>{if(Kr(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new vt(t.common.issues);return this._error=n,this._error}}};q=class{get description(){return this._def.description}_getType(e){return Cn(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Cn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ze,ctx:{common:e.parent.common,data:e.data,parsedType:Cn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Zi(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Cn(e)},i=this._parseSync({data:e,path:r.path,parent:r});return ng(r,i)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Cn(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:n});return Kr(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Kr(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Cn(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(Zi(i)?i:Promise.resolve(i));return ng(r,s)}refine(e,n){let r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{let a=e(i),l=()=>s.addIssue({code:x.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(l(),!1)):a?!0:(l(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Xt({schema:this,typeName:F.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Yt.create(this,this._def)}nullable(){return Ln.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cr.create(this)}promise(){return Yr.create(this,this._def)}or(e){return $o.create([this,e],this._def)}and(e){return Uo.create(this,e,this._def)}transform(e){return new Xt({...K(this._def),schema:this,typeName:F.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new jo({...K(this._def),innerType:this,defaultValue:n,typeName:F.ZodDefault})}brand(){return new ja({typeName:F.ZodBranded,type:this,...K(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new Vo({...K(this._def),innerType:this,catchValue:n,typeName:F.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Va.create(this,e)}readonly(){return Ko.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},UR=/^c[^\s-]{8,}$/i,HR=/^[0-9a-z]+$/,BR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,FR=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,GR=/^[a-z0-9_-]{21}$/i,jR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,VR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,KR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,WR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",zR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,YR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,qR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,XR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ZR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,QR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,og="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",JR=new RegExp(`^${og}$`);Wr=class t extends q{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==N.string){let s=this._getOrReturnCtx(e);return y(s,{code:x.invalid_type,expected:N.string,received:s.parsedType}),H}let r=new ze,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),y(i,{code:x.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),y(i,{code:x.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,l=e.data.length<s.value;(a||l)&&(i=this._getOrReturnCtx(e,i),a?y(i,{code:x.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):l&&y(i,{code:x.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")KR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"email",code:x.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")np||(np=new RegExp(WR,"u")),np.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"emoji",code:x.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")FR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"uuid",code:x.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")GR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"nanoid",code:x.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")UR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"cuid",code:x.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")HR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"cuid2",code:x.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")BR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"ulid",code:x.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),y(i,{validation:"url",code:x.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"regex",code:x.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),y(i,{code:x.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),y(i,{code:x.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),y(i,{code:x.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?sg(s).test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{code:x.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?JR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{code:x.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?e0(s).test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{code:x.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?VR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"duration",code:x.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?t0(e.data,s.version)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"ip",code:x.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?n0(e.data,s.alg)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"jwt",code:x.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?r0(e.data,s.version)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"cidr",code:x.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?ZR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"base64",code:x.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?QR.test(e.data)||(i=this._getOrReturnCtx(e,i),y(i,{validation:"base64url",code:x.invalid_string,message:s.message}),r.dirty()):J.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:x.invalid_string,...M.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...M.errToObj(e)})}url(e){return this._addCheck({kind:"url",...M.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...M.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...M.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...M.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...M.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...M.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...M.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...M.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...M.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...M.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...M.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...M.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...M.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...M.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...M.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...M.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...M.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...M.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...M.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...M.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...M.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...M.errToObj(n)})}nonempty(e){return this.min(1,M.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Wr.create=t=>new Wr({checks:[],typeName:F.ZodString,coerce:t?.coerce??!1,...K(t)});Io=class t extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==N.number){let s=this._getOrReturnCtx(e);return y(s,{code:x.invalid_type,expected:N.number,received:s.parsedType}),H}let r,i=new ze;for(let s of this._def.checks)s.kind==="int"?J.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),y(r,{code:x.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),y(r,{code:x.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),y(r,{code:x.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?o0(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),y(r,{code:x.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),y(r,{code:x.not_finite,message:s.message}),i.dirty()):J.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,M.toString(n))}gt(e,n){return this.setLimit("min",e,!1,M.toString(n))}lte(e,n){return this.setLimit("max",e,!0,M.toString(n))}lt(e,n){return this.setLimit("max",e,!1,M.toString(n))}setLimit(e,n,r,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:M.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:M.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:M.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:M.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:M.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:M.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:M.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:M.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:M.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:M.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&J.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};Io.create=t=>new Io({checks:[],typeName:F.ZodNumber,coerce:t?.coerce||!1,...K(t)});Lo=class t extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==N.bigint)return this._getInvalidInput(e);let r,i=new ze;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),y(r,{code:x.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),y(r,{code:x.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),y(r,{code:x.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):J.assertNever(s);return{status:i.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return y(n,{code:x.invalid_type,expected:N.bigint,received:n.parsedType}),H}gte(e,n){return this.setLimit("min",e,!0,M.toString(n))}gt(e,n){return this.setLimit("min",e,!1,M.toString(n))}lte(e,n){return this.setLimit("max",e,!0,M.toString(n))}lt(e,n){return this.setLimit("max",e,!1,M.toString(n))}setLimit(e,n,r,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:M.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:M.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:M.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:M.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:M.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:M.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Lo.create=t=>new Lo({checks:[],typeName:F.ZodBigInt,coerce:t?.coerce??!1,...K(t)});ko=class extends q{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==N.boolean){let r=this._getOrReturnCtx(e);return y(r,{code:x.invalid_type,expected:N.boolean,received:r.parsedType}),H}return tt(e.data)}};ko.create=t=>new ko({typeName:F.ZodBoolean,coerce:t?.coerce||!1,...K(t)});Do=class t extends q{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==N.date){let s=this._getOrReturnCtx(e);return y(s,{code:x.invalid_type,expected:N.date,received:s.parsedType}),H}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return y(s,{code:x.invalid_date}),H}let r=new ze,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),y(i,{code:x.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),y(i,{code:x.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):J.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:M.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:M.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};Do.create=t=>new Do({checks:[],coerce:t?.coerce||!1,typeName:F.ZodDate,...K(t)});Ji=class extends q{_parse(e){if(this._getType(e)!==N.symbol){let r=this._getOrReturnCtx(e);return y(r,{code:x.invalid_type,expected:N.symbol,received:r.parsedType}),H}return tt(e.data)}};Ji.create=t=>new Ji({typeName:F.ZodSymbol,...K(t)});Mo=class extends q{_parse(e){if(this._getType(e)!==N.undefined){let r=this._getOrReturnCtx(e);return y(r,{code:x.invalid_type,expected:N.undefined,received:r.parsedType}),H}return tt(e.data)}};Mo.create=t=>new Mo({typeName:F.ZodUndefined,...K(t)});Po=class extends q{_parse(e){if(this._getType(e)!==N.null){let r=this._getOrReturnCtx(e);return y(r,{code:x.invalid_type,expected:N.null,received:r.parsedType}),H}return tt(e.data)}};Po.create=t=>new Po({typeName:F.ZodNull,...K(t)});zr=class extends q{constructor(){super(...arguments),this._any=!0}_parse(e){return tt(e.data)}};zr.create=t=>new zr({typeName:F.ZodAny,...K(t)});ar=class extends q{constructor(){super(...arguments),this._unknown=!0}_parse(e){return tt(e.data)}};ar.create=t=>new ar({typeName:F.ZodUnknown,...K(t)});hn=class extends q{_parse(e){let n=this._getOrReturnCtx(e);return y(n,{code:x.invalid_type,expected:N.never,received:n.parsedType}),H}};hn.create=t=>new hn({typeName:F.ZodNever,...K(t)});es=class extends q{_parse(e){if(this._getType(e)!==N.undefined){let r=this._getOrReturnCtx(e);return y(r,{code:x.invalid_type,expected:N.void,received:r.parsedType}),H}return tt(e.data)}};es.create=t=>new es({typeName:F.ZodVoid,...K(t)});cr=class t extends q{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==N.array)return y(n,{code:x.invalid_type,expected:N.array,received:n.parsedType}),H;if(i.exactLength!==null){let a=n.data.length>i.exactLength.value,l=n.data.length<i.exactLength.value;(a||l)&&(y(n,{code:a?x.too_big:x.too_small,minimum:l?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(y(n,{code:x.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(y(n,{code:x.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,l)=>i.type._parseAsync(new qt(n,a,n.path,l)))).then(a=>ze.mergeArray(r,a));let s=[...n.data].map((a,l)=>i.type._parseSync(new qt(n,a,n.path,l)));return ze.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:M.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:M.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:M.toString(n)}})}nonempty(e){return this.min(1,e)}};cr.create=(t,e)=>new cr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:F.ZodArray,...K(e)});Rt=class t extends q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=J.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==N.object){let p=this._getOrReturnCtx(e);return y(p,{code:x.invalid_type,expected:N.object,received:p.parsedType}),H}let{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),l=[];if(!(this._def.catchall instanceof hn&&this._def.unknownKeys==="strip"))for(let p in i.data)a.includes(p)||l.push(p);let d=[];for(let p of a){let f=s[p],E=i.data[p];d.push({key:{status:"valid",value:p},value:f._parse(new qt(i,E,i.path,p)),alwaysSet:p in i.data})}if(this._def.catchall instanceof hn){let p=this._def.unknownKeys;if(p==="passthrough")for(let f of l)d.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(p==="strict")l.length>0&&(y(i,{code:x.unrecognized_keys,keys:l}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let f of l){let E=i.data[f];d.push({key:{status:"valid",value:f},value:p._parse(new qt(i,E,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let p=[];for(let f of d){let E=await f.key,g=await f.value;p.push({key:E,value:g,alwaysSet:f.alwaysSet})}return p}).then(p=>ze.mergeObjectSync(r,p)):ze.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(e){return M.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{let i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:M.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:F.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of J.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of J.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Qi(this)}partial(e){let n={};for(let r of J.objectKeys(this.shape)){let i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of J.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Yt;)s=s._def.innerType;n[r]=s}return new t({...this._def,shape:()=>n})}keyof(){return ag(J.objectKeys(this.shape))}};Rt.create=(t,e)=>new Rt({shape:()=>t,unknownKeys:"strip",catchall:hn.create(),typeName:F.ZodObject,...K(e)});Rt.strictCreate=(t,e)=>new Rt({shape:()=>t,unknownKeys:"strict",catchall:hn.create(),typeName:F.ZodObject,...K(e)});Rt.lazycreate=(t,e)=>new Rt({shape:t,unknownKeys:"strip",catchall:hn.create(),typeName:F.ZodObject,...K(e)});$o=class extends q{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(let l of s)if(l.result.status==="valid")return l.result;for(let l of s)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;let a=s.map(l=>new vt(l.ctx.common.issues));return y(n,{code:x.invalid_union,unionErrors:a}),H}if(n.common.async)return Promise.all(r.map(async s=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s,a=[];for(let d of r){let p={...n,common:{...n.common,issues:[]},parent:null},f=d._parseSync({data:n.data,path:n.path,parent:p});if(f.status==="valid")return f;f.status==="dirty"&&!s&&(s={result:f,ctx:p}),p.common.issues.length&&a.push(p.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;let l=a.map(d=>new vt(d));return y(n,{code:x.invalid_union,unionErrors:l}),H}}get options(){return this._def.options}};$o.create=(t,e)=>new $o({options:t,typeName:F.ZodUnion,...K(e)});sr=t=>t instanceof Ho?sr(t.schema):t instanceof Xt?sr(t.innerType()):t instanceof Bo?[t.value]:t instanceof Fo?t.options:t instanceof Go?J.objectValues(t.enum):t instanceof jo?sr(t._def.innerType):t instanceof Mo?[void 0]:t instanceof Po?[null]:t instanceof Yt?[void 0,...sr(t.unwrap())]:t instanceof Ln?[null,...sr(t.unwrap())]:t instanceof ja||t instanceof Ko?sr(t.unwrap()):t instanceof Vo?sr(t._def.innerType):[],Ul=class t extends q{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==N.object)return y(n,{code:x.invalid_type,expected:N.object,received:n.parsedType}),H;let r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(y(n,{code:x.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),H)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let i=new Map;for(let s of n){let a=sr(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let l of a){if(i.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);i.set(l,s)}}return new t({typeName:F.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...K(r)})}};Uo=class extends q{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(Pl(s)||Pl(a))return H;let l=rp(s.value,a.value);return l.valid?(($l(s)||$l(a))&&n.dirty(),{status:n.value,value:l.data}):(y(r,{code:x.invalid_intersection_types}),H)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Uo.create=(t,e,n)=>new Uo({left:t,right:e,typeName:F.ZodIntersection,...K(n)});In=class t extends q{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.array)return y(r,{code:x.invalid_type,expected:N.array,received:r.parsedType}),H;if(r.data.length<this._def.items.length)return y(r,{code:x.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),H;!this._def.rest&&r.data.length>this._def.items.length&&(y(r,{code:x.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let s=[...r.data].map((a,l)=>{let d=this._def.items[l]||this._def.rest;return d?d._parse(new qt(r,a,r.path,l)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>ze.mergeArray(n,a)):ze.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};In.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new In({items:t,typeName:F.ZodTuple,rest:null,...K(e)})};Hl=class t extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.object)return y(r,{code:x.invalid_type,expected:N.object,received:r.parsedType}),H;let i=[],s=this._def.keyType,a=this._def.valueType;for(let l in r.data)i.push({key:s._parse(new qt(r,l,r.path,l)),value:a._parse(new qt(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?ze.mergeObjectAsync(n,i):ze.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof q?new t({keyType:e,valueType:n,typeName:F.ZodRecord,...K(r)}):new t({keyType:Wr.create(),valueType:e,typeName:F.ZodRecord,...K(n)})}},ts=class extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.map)return y(r,{code:x.invalid_type,expected:N.map,received:r.parsedType}),H;let i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([l,d],p)=>({key:i._parse(new qt(r,l,r.path,[p,"key"])),value:s._parse(new qt(r,d,r.path,[p,"value"]))}));if(r.common.async){let l=new Map;return Promise.resolve().then(async()=>{for(let d of a){let p=await d.key,f=await d.value;if(p.status==="aborted"||f.status==="aborted")return H;(p.status==="dirty"||f.status==="dirty")&&n.dirty(),l.set(p.value,f.value)}return{status:n.value,value:l}})}else{let l=new Map;for(let d of a){let p=d.key,f=d.value;if(p.status==="aborted"||f.status==="aborted")return H;(p.status==="dirty"||f.status==="dirty")&&n.dirty(),l.set(p.value,f.value)}return{status:n.value,value:l}}}};ts.create=(t,e,n)=>new ts({valueType:e,keyType:t,typeName:F.ZodMap,...K(n)});ns=class t extends q{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==N.set)return y(r,{code:x.invalid_type,expected:N.set,received:r.parsedType}),H;let i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(y(r,{code:x.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(y(r,{code:x.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());let s=this._def.valueType;function a(d){let p=new Set;for(let f of d){if(f.status==="aborted")return H;f.status==="dirty"&&n.dirty(),p.add(f.value)}return{status:n.value,value:p}}let l=[...r.data.values()].map((d,p)=>s._parse(new qt(r,d,r.path,p)));return r.common.async?Promise.all(l).then(d=>a(d)):a(l)}min(e,n){return new t({...this._def,minSize:{value:e,message:M.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:M.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};ns.create=(t,e)=>new ns({valueType:t,minSize:null,maxSize:null,typeName:F.ZodSet,...K(e)});Bl=class t extends q{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==N.function)return y(n,{code:x.invalid_type,expected:N.function,received:n.parsedType}),H;function r(l,d){return Ga({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xi(),ir].filter(p=>!!p),issueData:{code:x.invalid_arguments,argumentsError:d}})}function i(l,d){return Ga({data:l,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Xi(),ir].filter(p=>!!p),issueData:{code:x.invalid_return_type,returnTypeError:d}})}let s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Yr){let l=this;return tt(async function(...d){let p=new vt([]),f=await l._def.args.parseAsync(d,s).catch(_=>{throw p.addIssue(r(d,_)),p}),E=await Reflect.apply(a,this,f);return await l._def.returns._def.type.parseAsync(E,s).catch(_=>{throw p.addIssue(i(E,_)),p})})}else{let l=this;return tt(function(...d){let p=l._def.args.safeParse(d,s);if(!p.success)throw new vt([r(d,p.error)]);let f=Reflect.apply(a,this,p.data),E=l._def.returns.safeParse(f,s);if(!E.success)throw new vt([i(f,E.error)]);return E.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:In.create(e).rest(ar.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||In.create([]).rest(ar.create()),returns:n||ar.create(),typeName:F.ZodFunction,...K(r)})}},Ho=class extends q{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Ho.create=(t,e)=>new Ho({getter:t,typeName:F.ZodLazy,...K(e)});Bo=class extends q{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return y(n,{received:n.data,code:x.invalid_literal,expected:this._def.value}),H}return{status:"valid",value:e.data}}get value(){return this._def.value}};Bo.create=(t,e)=>new Bo({value:t,typeName:F.ZodLiteral,...K(e)});Fo=class t extends q{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return y(n,{expected:J.joinValues(r),received:n.parsedType,code:x.invalid_type}),H}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return y(n,{received:n.data,code:x.invalid_enum_value,options:r}),H}return tt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};Fo.create=ag;Go=class extends q{_parse(e){let n=J.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==N.string&&r.parsedType!==N.number){let i=J.objectValues(n);return y(r,{expected:J.joinValues(i),received:r.parsedType,code:x.invalid_type}),H}if(this._cache||(this._cache=new Set(J.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=J.objectValues(n);return y(r,{received:r.data,code:x.invalid_enum_value,options:i}),H}return tt(e.data)}get enum(){return this._def.values}};Go.create=(t,e)=>new Go({values:t,typeName:F.ZodNativeEnum,...K(e)});Yr=class extends q{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==N.promise&&n.common.async===!1)return y(n,{code:x.invalid_type,expected:N.promise,received:n.parsedType}),H;let r=n.parsedType===N.promise?n.data:Promise.resolve(n.data);return tt(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Yr.create=(t,e)=>new Yr({type:t,typeName:F.ZodPromise,...K(e)});Xt=class extends q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===F.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{y(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async l=>{if(n.value==="aborted")return H;let d=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return d.status==="aborted"?H:d.status==="dirty"?Co(d.value):n.value==="dirty"?Co(d.value):d});{if(n.value==="aborted")return H;let l=this._def.schema._parseSync({data:a,path:r.path,parent:r});return l.status==="aborted"?H:l.status==="dirty"?Co(l.value):n.value==="dirty"?Co(l.value):l}}if(i.type==="refinement"){let a=l=>{let d=i.refinement(l,s);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){let l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?H:(l.status==="dirty"&&n.dirty(),a(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?H:(l.status==="dirty"&&n.dirty(),a(l.value).then(()=>({status:n.value,value:l.value}))))}if(i.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Kr(a))return H;let l=i.transform(a.value,s);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Kr(a)?Promise.resolve(i.transform(a.value,s)).then(l=>({status:n.value,value:l})):H);J.assertNever(i)}};Xt.create=(t,e,n)=>new Xt({schema:t,typeName:F.ZodEffects,effect:e,...K(n)});Xt.createWithPreprocess=(t,e,n)=>new Xt({schema:e,effect:{type:"preprocess",transform:t},typeName:F.ZodEffects,...K(n)});Yt=class extends q{_parse(e){return this._getType(e)===N.undefined?tt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Yt.create=(t,e)=>new Yt({innerType:t,typeName:F.ZodOptional,...K(e)});Ln=class extends q{_parse(e){return this._getType(e)===N.null?tt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ln.create=(t,e)=>new Ln({innerType:t,typeName:F.ZodNullable,...K(e)});jo=class extends q{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===N.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};jo.create=(t,e)=>new jo({innerType:t,typeName:F.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...K(e)});Vo=class extends q{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Zi(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new vt(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new vt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Vo.create=(t,e)=>new Vo({innerType:t,typeName:F.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...K(e)});rs=class extends q{_parse(e){if(this._getType(e)!==N.nan){let r=this._getOrReturnCtx(e);return y(r,{code:x.invalid_type,expected:N.nan,received:r.parsedType}),H}return{status:"valid",value:e.data}}};rs.create=t=>new rs({typeName:F.ZodNaN,...K(t)});i0=Symbol("zod_brand"),ja=class extends q{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},Va=class t extends q{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?H:s.status==="dirty"?(n.dirty(),Co(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{let i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?H:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:F.ZodPipeline})}},Ko=class extends q{_parse(e){let n=this._def.innerType._parse(e),r=i=>(Kr(i)&&(i.value=Object.freeze(i.value)),i);return Zi(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}};Ko.create=(t,e)=>new Ko({innerType:t,typeName:F.ZodReadonly,...K(e)});s0={object:Rt.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(F||(F={}));a0=(t,e={message:`Input not instance of ${t.name}`})=>cg(n=>n instanceof t,e),lg=Wr.create,dg=Io.create,c0=rs.create,l0=Lo.create,ug=ko.create,d0=Do.create,u0=Ji.create,p0=Mo.create,f0=Po.create,h0=zr.create,m0=ar.create,g0=hn.create,E0=es.create,b0=cr.create,T0=Rt.create,_0=Rt.strictCreate,S0=$o.create,x0=Ul.create,A0=Uo.create,y0=In.create,v0=Hl.create,R0=ts.create,N0=ns.create,O0=Bl.create,w0=Ho.create,C0=Bo.create,I0=Fo.create,L0=Go.create,k0=Yr.create,D0=Xt.create,M0=Yt.create,P0=Ln.create,$0=Xt.createWithPreprocess,U0=Va.create,H0=()=>lg().optional(),B0=()=>dg().optional(),F0=()=>ug().optional(),G0={string:(t=>Wr.create({...t,coerce:!0})),number:(t=>Io.create({...t,coerce:!0})),boolean:(t=>ko.create({...t,coerce:!0})),bigint:(t=>Lo.create({...t,coerce:!0})),date:(t=>Do.create({...t,coerce:!0}))},j0=H});var o={};Ba(o,{BRAND:()=>i0,DIRTY:()=>Co,EMPTY_PATH:()=>$R,INVALID:()=>H,NEVER:()=>j0,OK:()=>tt,ParseStatus:()=>ze,Schema:()=>q,ZodAny:()=>zr,ZodArray:()=>cr,ZodBigInt:()=>Lo,ZodBoolean:()=>ko,ZodBranded:()=>ja,ZodCatch:()=>Vo,ZodDate:()=>Do,ZodDefault:()=>jo,ZodDiscriminatedUnion:()=>Ul,ZodEffects:()=>Xt,ZodEnum:()=>Fo,ZodError:()=>vt,ZodFirstPartyTypeKind:()=>F,ZodFunction:()=>Bl,ZodIntersection:()=>Uo,ZodIssueCode:()=>x,ZodLazy:()=>Ho,ZodLiteral:()=>Bo,ZodMap:()=>ts,ZodNaN:()=>rs,ZodNativeEnum:()=>Go,ZodNever:()=>hn,ZodNull:()=>Po,ZodNullable:()=>Ln,ZodNumber:()=>Io,ZodObject:()=>Rt,ZodOptional:()=>Yt,ZodParsedType:()=>N,ZodPipeline:()=>Va,ZodPromise:()=>Yr,ZodReadonly:()=>Ko,ZodRecord:()=>Hl,ZodSchema:()=>q,ZodSet:()=>ns,ZodString:()=>Wr,ZodSymbol:()=>Ji,ZodTransformer:()=>Xt,ZodTuple:()=>In,ZodType:()=>q,ZodUndefined:()=>Mo,ZodUnion:()=>$o,ZodUnknown:()=>ar,ZodVoid:()=>es,addIssueToContext:()=>y,any:()=>h0,array:()=>b0,bigint:()=>l0,boolean:()=>ug,coerce:()=>G0,custom:()=>cg,date:()=>d0,datetimeRegex:()=>sg,defaultErrorMap:()=>ir,discriminatedUnion:()=>x0,effect:()=>D0,enum:()=>I0,function:()=>O0,getErrorMap:()=>Xi,getParsedType:()=>Cn,instanceof:()=>a0,intersection:()=>A0,isAborted:()=>Pl,isAsync:()=>Zi,isDirty:()=>$l,isValid:()=>Kr,late:()=>s0,lazy:()=>w0,literal:()=>C0,makeIssue:()=>Ga,map:()=>R0,nan:()=>c0,nativeEnum:()=>L0,never:()=>g0,null:()=>f0,nullable:()=>P0,number:()=>dg,object:()=>T0,objectUtil:()=>Ju,oboolean:()=>F0,onumber:()=>B0,optional:()=>M0,ostring:()=>H0,pipeline:()=>U0,preprocess:()=>$0,promise:()=>k0,quotelessJson:()=>DR,record:()=>v0,set:()=>N0,setErrorMap:()=>PR,strictObject:()=>_0,string:()=>lg,symbol:()=>u0,transformer:()=>D0,tuple:()=>y0,undefined:()=>p0,union:()=>S0,unknown:()=>m0,util:()=>J,void:()=>E0});var op=T(()=>{Ml();tp();eg();Fa();pg();Dl()});var ne=T(()=>{op();op()});var os,ip=T(()=>{"use strict";os={ACT:"reticle_act",ACT_SEQUENCE:"reticle_act_sequence",ACT_AND_WAIT:"reticle_act_and_wait",INVOKE:"reticle_invoke"}});var fg,hg,sp,mg,Zt,gg,xe,ut,Fl,Ka=T(()=>{"use strict";fg={FLOW_REPLAY:"flow_replay",MANUAL:"manual"},hg={PASS:"pass",DRIFT:"drift",ERROR:"error",FAIL:"fail"},sp=2,mg=new Set([1,sp]),Zt={TESTID:"testid",ROLE:"role",SIGNAL:"signal",COMPONENT:"component"},gg="unresolved",xe={ASSERT_SIGNAL:"assert-signal",ASSERT_VISIBLE:"assert-visible",ASSERT_STATE:"assert-state",ASSERT_NET:"assert-net",MARK_DYNAMIC:"mark-dynamic",SUCCESS_STATE:"success-state",INTENT:"intent"},ut={IDLE:"idle",RECORDING:"recording",ANNOTATING:"annotating"},Fl={ACTIVE:"active",QUARANTINED:"quarantined",DRAFT:"draft"}});var Eg,ap=T(()=>{"use strict";Eg={READ:"read",IDEMPOTENT:"idempotent",COMMITS:"commits"}});var b,bg=T(()=>{"use strict";b={DOM_ADDED:"dom.added",DOM_REMOVED:"dom.removed",DOM_ATTR:"dom.attr",DOM_TEXT:"dom.text",NET_REQUEST:"net.request",NET_PENDING:"net.pending",NET_STREAM:"net.stream",PERF:"perf",ROUTE_CHANGE:"route.change",CONSOLE_LOG:"console.log",CONSOLE_WARN:"console.warn",CONSOLE_ERROR:"console.error",CONSOLE_INFO:"console.info",CONSOLE_DEBUG:"console.debug",ERROR_UNCAUGHT:"error.uncaught",VISIBLE_SHOWN:"visible.shown",ANIM_START:"anim.start",ANIM_END:"anim.end",SCROLL_POSITION:"scroll.position",REVEAL_SHOWN:"reveal.shown",SIGNAL:"signal",STATE_CHANGE:"state.change",STORAGE_CHANGE:"storage.change",PAGE_HEALTH:"page.health",CONTEXT_OPENED:"context.opened",DIALOG_OPENED:"dialog.opened",RENDER_COMMIT:"render.commit",FOCUS_CHANGE:"focus.change",FIELD_CHANGE:"field.change",FLOW_RECORDED:"flow.recorded",TRANSPORT_OVERFLOW:"transport.overflow",TRUNCATED:"truncated",BLIND_SPOT:"blind-spot",SDK_FAILED:"sdk.failed",NET_DETAIL:"net.detail",HUMAN_CONTROL:"human.control",HUMAN_MARK:"human.mark",DOWNLOAD:"download",HUD_USED:"hud.used"}});function _g(t=cp,e=V0){return`ws://${e}:${String(t)}${Gl}`}var cp,Gl,jl,Tg,V0,lr,U,Ae,Wo,Sg,is,E5,xg,T5,Vl,Kl,Ag,ss,Wl,K0,_5,v,yg,vg,le,pt,C,De,as,ft,Nt=T(()=>{"use strict";bg();cp=4400,Gl="/reticle",jl=1,Tg=1,V0="localhost";lr={SESSION:"__reticle_session",PROJECT:"__reticle_project",OPENED:"__reticle_opened"},U={MAX_MESSAGE_BYTES:1024*1024,MAX_MESSAGES_PER_SECOND:2e4,MAX_SESSIONS:32,MAX_PENDING_CONNECTIONS:16,HELLO_TIMEOUT_MS:5e3,MAX_BUFFER_BYTES:8*1024*1024,MAX_SESSION_ID_LENGTH:128,MAX_URL_LENGTH:4096,MAX_TITLE_LENGTH:512,MAX_ADAPTERS:32,MAX_CONTRACT_NAMES:128,MAX_ADAPTER_NAME_LENGTH:128,MAX_TOKEN_LENGTH:512,MAX_COMMAND_ID_LENGTH:128,MAX_COMMAND_NAME_LENGTH:128,MAX_REF_LENGTH:128,MAX_ERROR_LENGTH:4096,MAX_STACK_LENGTH:4e3,MAX_SERIALIZE_DEPTH:8,MAX_COLLECTION_ITEMS:200,MAX_OBJECT_KEYS:200,MAX_STRING_LENGTH:64*1024,MAX_MARK_NOTE_LENGTH:2e3,MAX_MARK_LABEL_LENGTH:256},Ae="[REDACTED]",Wo="confirmDangerous",Sg="native",is={NO_PROVIDER:"no-visual-provider",CAPTURE_FAILED:"capture-failed",BASELINE_MISSING:"baseline-missing",DIMENSION_MISMATCH:"dimension-mismatch",FULL_PAGE_UNSUPPORTED:"full-page-unsupported",NOT_COMPOSITED:"window-not-composited"},E5=1440*60*1e3,xg=1,T5={MAX_EVENTS:2e3,MAX_AGE_MS:6e4,MAX_BYTES:U.MAX_BUFFER_BYTES},Vl="__reticle_renders",Kl={DOM:"dom",JOURNAL:"journal"},Ag={WINDOW:"window"},ss={LCP:"lcp",CLS:"cls",LONGTASK:"longtask"},Wl={HOVER_NATIVE_ENTER_LEAVE:"target has enter/leave handlers; synthetic hover may not trigger them \u2014 expect no state change",REAL_INPUT_FELL_BACK:"real-input provider was available but failed; fell back to synthetic dispatch",CLICK_OCCLUDED:"target is visually occluded by another element; a real user could not click it (synthetic dispatch still delivered the event) \u2014 dismiss the overlay or scroll the target clear",GLOBAL_PRESS:"press landed on the focused element or document \u2014 no named target was given, so this effect does not claim one"},K0="console.",_5=[b.CONSOLE_LOG,b.CONSOLE_WARN,b.CONSOLE_ERROR,b.CONSOLE_INFO].map(t=>t.slice(K0.length)),v={CLICK:"click",DBLCLICK:"dblclick",HOVER:"hover",FOCUS:"focus",BLUR:"blur",FILL:"fill",TYPE:"type",CLEAR:"clear",SELECT:"select",CHECK:"check",UNCHECK:"uncheck",SUBMIT:"submit",PRESS:"press",UPLOAD:"upload",SCROLL_INTO_VIEW:"scrollIntoView",SCROLL:"scroll",DRAG:"drag",TAP:"tap",ZOOM:"zoom",WEBMCP:"webmcp"},yg={TIMEOUT:"timeout",THROTTLED:"throttled"},vg={UNAVAILABLE:"component-state-unavailable"},le={VISIBLE:"visible",HIDDEN:"hidden",ENABLED:"enabled",DISABLED:"disabled",CHECKED:"checked",EXPANDED:"expanded",FOCUSED:"focused",PRESENT:"present",IN_VIEWPORT:"inViewport"},pt={ROLE:"role",TEXT:"text",LABEL:"label",PLACEHOLDER:"placeholder",TESTID:"testid",ALT:"alt",COMPONENT:"component"},C={SNAPSHOT:"snapshot",QUERY:"query",MATCH:"match",INSPECT:"inspect",ACT:"act",ACT_SEQUENCE:"act_sequence",ANIMATIONS:"animations",NARRATE:"narrate",CLOCK:"clock",CAPABILITIES:"capabilities",STATE_READ:"state_read",STORAGE_READ:"storage_read",SCROLL:"scroll",SESSION_CONFIG:"session_config",PRESENTER:"presenter",IMPACT:"impact",CAPTURE:"capture",NAVIGATE:"navigate",REFRESH:"refresh",FLOWS:"flows"},De={IDLE:"idle",READING:"reading",ACTING:"acting"},as={FULL:"full",INTERACTIVE:"interactive",STATUS:"status"},ft={HELLO:"hello",COMMAND:"command",COMMAND_RESULT:"command_result",EVENT:"event"}});var zl,lp,O,x5,W0,A5,qr=T(()=>{"use strict";zl={SIGNAL:"signal",NET:"net",STATE:"state"},lp={ELEMENT:"element",TEXT:"text"},O={ELEMENT:lp.ELEMENT,TEXT:lp.TEXT,SIGNAL:zl.SIGNAL,NET:zl.NET,STATE:zl.STATE,ROUTE:"route",CONSOLE:"console",ANIMATION:"animation",SETTLED:"settled",ALL_OF:"allOf",ANY_OF:"anyOf",NOT:"not"},x5=new Set(Object.values(zl)),W0=new Set(Object.values(lp)),A5=new Set([...W0,O.ROUTE])});var Qt,z0,Jt,R5,zo=T(()=>{"use strict";ne();Qt={WEB:"web",DESKTOP:"desktop",MOBILE:"mobile",SERVICE:"service",GAME:"game",DEVICE:"device"},z0=o.union([o.nativeEnum(Qt),o.string().regex(/^x-[a-z0-9-]+$/,"a surface this specification does not name must start with x-")]),Jt=o.object({surface:z0,instance:o.string().min(1),epoch:o.number().int().nonnegative().optional(),locator:o.string().optional(),revision:o.string().optional()}),R5=o.object({kind:o.enum(["instance","epoch"]),from:o.string(),to:o.string()})});var A,kt,Ot,ht,dp,up,mn=T(()=>{"use strict";ne();A={UI:"ui",NET:"net",STATE:"state",SIGNAL:"signal",LOG:"log",ROUTE:"route",STORAGE:"storage",TIME:"time",VISUAL:"visual"},kt=o.union([o.nativeEnum(A),o.string().regex(/^x-[a-z0-9-]+$/,"a channel this specification does not name must start with x-")]),Ot={INDEPENDENT:"independent",ACTUATION_DERIVED:"actuation-derived"},ht={CONSEQUENCE:"consequence",PRESENCE:"presence",CONTEXT:"context"},dp=o.object({id:kt,independence:o.nativeEnum(Ot),grade:o.nativeEnum(ht),note:o.string().optional()}),up={[A.UI]:{independence:Ot.ACTUATION_DERIVED,grade:ht.PRESENCE},[A.NET]:{independence:Ot.INDEPENDENT,grade:ht.CONSEQUENCE},[A.STATE]:{independence:Ot.ACTUATION_DERIVED,grade:ht.CONSEQUENCE},[A.SIGNAL]:{independence:Ot.ACTUATION_DERIVED,grade:ht.CONSEQUENCE},[A.LOG]:{independence:Ot.INDEPENDENT,grade:ht.CONTEXT},[A.ROUTE]:{independence:Ot.ACTUATION_DERIVED,grade:ht.PRESENCE},[A.STORAGE]:{independence:Ot.ACTUATION_DERIVED,grade:ht.CONSEQUENCE},[A.TIME]:{independence:Ot.INDEPENDENT,grade:ht.CONTEXT},[A.VISUAL]:{independence:Ot.ACTUATION_DERIVED,grade:ht.PRESENCE}}});var Rg=T(()=>{"use strict"});var k5,Ng=T(()=>{"use strict";ne();zo();k5=o.object({id:o.string().min(1),subject:Jt,capturedAt:o.number().int(),payload:o.unknown().optional()})});var P5,Og=T(()=>{"use strict";ne();P5=o.object({mutation:o.string().min(1)})});var Y0,pp,q0,X0,wg,Cg,fp,Ig,Lg,Wa=T(()=>{"use strict";ne();mn();Y0={USER:"user",DEVELOPER:"developer",AGENT:"agent",SYSTEM:"system",WORKFLOW:"workflow",DERIVED:"derived"},pp={DECLARED:"declared",BOUND:"bound",ABANDONED:"abandoned"},q0=o.object({id:o.string().min(1),statement:o.string().min(1),origin:o.nativeEnum(Y0),claims:o.array(o.string()).default([]),declaredAt:o.number().int().optional()}),X0=o.discriminatedUnion("status",[o.object({status:o.literal(pp.ABANDONED),abandonedBecause:o.string().trim().min(1)}),o.object({status:o.literal(pp.DECLARED),abandonedBecause:o.undefined().optional()}),o.object({status:o.literal(pp.BOUND),abandonedBecause:o.undefined().optional()})]),wg=q0.and(X0),Cg={BEFORE_ACTION:"before-action",AFTER_ACTION:"after-action"},fp=o.object({id:o.string().min(1),predicate:o.unknown(),reads:o.string().min(1),channels:o.array(kt).min(1)}),Ig=o.object({id:o.string().min(1),intent:o.string().optional(),statement:o.string().min(1),declaredAt:o.nativeEnum(Cg),assertions:o.array(fp).default([])}),Lg=o.object({id:o.string().min(1),statement:o.string().min(1),predicate:o.unknown(),channels:o.array(kt).min(1),severity:o.enum(["blocking","advisory"]).default("blocking")})});var Z0,cs,V5,hp,kg,Dg,Q0,Mg,Xr=T(()=>{"use strict";ne();mn();zo();Z0=o.object({id:o.string().min(1),window:o.string().min(1),channel:kt,at:o.number().int(),value:o.unknown(),summary:o.string().min(1)}),cs={AUTHORITATIVE:"authoritative",DERIVED:"derived",OBSERVED:"observed",LEARNED:"learned"},V5={[cs.LEARNED]:0,[cs.OBSERVED]:1,[cs.DERIVED]:2,[cs.AUTHORITATIVE]:3},hp=o.object({class:o.nativeEnum(cs),source:o.string().min(1),method:o.string().min(1),subject:Jt,at:o.number().int(),confidence:o.number().min(0).max(1).optional()}),kg=o.object({observation:Z0,provenance:hp,independence:o.nativeEnum(Ot),grade:o.nativeEnum(ht)}),Dg={CHANNEL_UNOBSERVED:"channel-unobserved",BOUNDARY_UNCROSSABLE:"boundary-uncrossable",BUFFER_TRUNCATED:"buffer-truncated",REDACTED:"redacted",STILL_IN_FLIGHT:"still-in-flight",EFFECT_ELSEWHERE:"effect-elsewhere"},Q0=o.object({kind:o.nativeEnum(Dg),channel:kt.optional(),detail:o.string().min(1),impeaching:o.boolean(),remedy:o.string().optional()}),Mg=o.object({window:o.string().min(1),observed:o.array(kt),blindSpots:o.array(Q0)})});var eN,tN,Yl,nN,ql,mp,q5,Pg=T(()=>{"use strict";ne();mn();Xr();eN=o.object({channel:kt}),tN=o.union([o.object({summary:o.string().min(1),valueContains:o.string().min(1)}),o.object({summary:o.string().min(1).optional(),valueContains:o.undefined().optional()})]),Yl=eN.and(tN),nN={EXACTLY:"exactly",AT_LEAST:"at-least",AT_MOST:"at-most"},ql={COUNT:"count",PRESENT:"present",ABSENT:"absent",MEASURE:"measure"},mp={EQUALS:"equals",AT_LEAST:"at-least",AT_MOST:"at-most"},q5=o.discriminatedUnion("kind",[o.object({kind:o.literal(ql.COUNT),match:Yl,op:o.nativeEnum(nN),value:o.number().int().nonnegative()}),o.object({kind:o.literal(ql.PRESENT),match:Yl}),o.object({kind:o.literal(ql.ABSENT),match:Yl}),o.object({kind:o.literal(ql.MEASURE),match:Yl,op:o.nativeEnum(mp),value:o.number().finite(),tolerance:o.number().nonnegative().finite().default(0)})])});var J5,gp,e2,Xl,$g,za,Ug,t2,Yo=T(()=>{"use strict";ne();zo();J5=o.object({name:o.string().min(1),meaning:o.string().min(1),parameters:o.unknown().optional(),mutating:o.boolean()}),gp={UNDECLARED:"undeclared",UNSUPPORTED:"unsupported",UNRESOLVED:"unresolved",UNAVAILABLE:"unavailable",GUARDED:"guarded",MALFORMED:"malformed"},e2=o.object({ref:o.string().min(1),describes:o.string().min(1),at:o.string().optional()}),Xl=o.object({id:o.string().min(1),actor:o.string().min(1),capability:o.string().min(1),target:o.string().optional(),parameters:o.unknown().optional(),at:o.number().int()}),$g=o.object({action:o.string().min(1),dispatched:o.boolean(),refused:o.object({reason:o.nativeEnum(gp),detail:o.string().min(1)}).optional(),subject:Jt,at:o.number().int()}),za={QUIESCENCE:"quiescence",TICKS:"ticks",ACK:"ack",SIGNAL:"signal",SETTLED_PHYSICAL:"settled-physical",EXIT:"exit",TERMINATED:"terminated",BUDGET_EXHAUSTED:"budget-exhausted"},Ug=o.object({id:o.string().min(1),openedAt:o.number().int(),closedAt:o.number().int().optional(),budgetMs:o.number().int().positive(),closes:o.nativeEnum(za),closedBy:o.nativeEnum(za).optional(),subject:Jt}),t2=new Set([za.BUDGET_EXHAUSTED,za.TERMINATED])});var Zl,rN,Hg,oN,Ep,bp,Bg,ls=T(()=>{"use strict";ne();mn();Zl={YES:"yes",NO:"no",UNKNOWN:"unknown",NO_FAULT:"no-fault"},rN=o.string().min(1),Hg={ADVANCED_OVER_FAILURE:"advanced-over-failure",CLAIMED_OVER_FAILURE:"claimed-over-failure",EFFECT_DISCARDED:"effect-discarded",CLAIM_UNCORROBORATED:"claim-uncorroborated",FAILURE_INSIDE_SUCCESS:"failure-inside-success",VALUE_NOT_APPLIED:"value-not-applied",DUPLICATED_EFFECT:"duplicated-effect",STALE_APPLIED:"stale-applied",NO_EFFECT:"no-effect",FAULT_MISATTRIBUTED:"fault-misattributed",EVIDENCE_SUPERSEDED:"evidence-superseded",EVIDENCE_PREDATES_EDIT:"evidence-predates-edit"},oN=o.union([o.nativeEnum(Hg),o.string().regex(/^x-[a-z0-9-]+$/,"an anomaly this specification does not name must start with x-")]),Ep={OBSERVED:"observed",ABSENCE_DERIVED:"absence-derived",ADVISORY:"advisory"},bp=o.object({kind:oN,tier:o.nativeEnum(Ep),claim:o.string().min(1),counter:o.string().min(1),between:o.tuple([kt,kt]),evidence:o.array(o.string()).default([])}),Bg=o.object({id:o.string().min(1),claim:o.string().min(1),window:o.string().min(1),verdict:o.nativeEnum(Zl),grade:o.nativeEnum(ht).optional(),reasons:o.array(rN).default([]),evidence:o.array(o.string()).default([]),anomalies:o.array(bp).default([]),supersedes:o.string().optional(),at:o.number().int()})});var iN,sN,aN,u2,Fg,cN,p2,Tp=T(()=>{"use strict";ne();Yo();Wa();Xr();ls();iN=o.string().min(1).regex(/^(?!.*(?:^|\/)\.{1,2}(?:\/|$))[^/]+(?:\/[^/]+)*$/,{message:"a flow name is `/`-separated segments: no empty segment, no leading or trailing slash, no `.` or `..`"}),sN=o.object({id:o.string().min(1),invoke:iN,with:o.unknown().optional(),at:o.number().int()}),aN=o.union([Xl,sN]),u2=o.object({name:o.string().min(1),version:o.number().int().positive(),startState:o.unknown().optional(),requires:o.unknown().optional(),ensures:o.unknown().optional(),claim:o.string().min(1),steps:o.array(aN),expects:o.array(fp).default([]),mayRebind:o.boolean().default(!1)}),Fg=o.object({verdict:o.string().min(1),expected:o.string().min(1),actual:o.string().min(1),evidence:o.array(o.string()).min(1),location:o.object({file:o.string(),line:o.number().int().optional(),symbol:o.string().optional()}).optional(),instruction:o.string().min(1)}),cN={INVARIANT:"invariant",FAILURE_MODE:"failure-mode",GAP:"gap",REPAIR_OUTCOME:"repair-outcome"},p2=o.object({id:o.string().min(1),kind:o.nativeEnum(cN),statement:o.string().min(1),provenance:hp,observations:o.number().int().nonnegative().default(0),promotedBy:o.string().optional(),promotedAt:o.number().int().optional()})});var lN,dN,x2,Gg=T(()=>{"use strict";ne();mn();Wa();Yo();Xr();ls();Tp();zo();lN="1.0",dN=o.object({constraint:o.string().min(1),at:o.number().int(),detail:o.string().min(1),evidence:o.array(o.string()).default([])}),x2=o.object({ovp:o.literal(lN),id:o.string().min(1),verifier:o.object({name:o.string().min(1),version:o.string().min(1),profile:o.string().optional()}),subject:Jt,channels:o.array(dp),witnesses:o.array(o.object({name:o.string().min(1),subject:Jt,channels:o.array(dp)})).default([]),intents:o.array(wg).default([]),claims:o.array(Ig).default([]),constraints:o.array(Lg).default([]),actions:o.array(Xl).default([]),receipts:o.array($g).default([]),windows:o.array(Ug).default([]),evidence:o.array(kg).default([]),coverage:o.array(Mg).default([]),anomalies:o.array(bp).default([]),verdicts:o.array(Bg).default([]),violations:o.array(dN).default([]),repairs:o.array(Fg).default([]),startedAt:o.number().int(),endedAt:o.number().int()})});var _p=T(()=>{"use strict";ls()});var Sp=T(()=>{"use strict";Wa();mn();Xr();Yo();ls()});var xp=T(()=>{"use strict";Yo();mn();_p();Xr();Sp()});var Ap=T(()=>{"use strict"});var jg=T(()=>{"use strict";Ap()});var qo,z2,Y2,q2,Vg=T(()=>{"use strict";ne();mn();qo={EFFECT:"effect",IN_REALM:"in-realm",SURFACE:"surface"},z2=[qo.EFFECT,qo.IN_REALM,qo.SURFACE],Y2={[qo.EFFECT]:[A.NET,A.LOG],[qo.IN_REALM]:[A.NET,A.LOG,A.STATE,A.SIGNAL],[qo.SURFACE]:[A.NET,A.LOG,A.STATE,A.SIGNAL,A.UI]},q2=o.object({name:o.string().min(1),version:o.string().min(1),platform:o.string().min(1),claims:o.nativeEnum(qo),homepage:o.string().optional()})});var Kg=T(()=>{"use strict";xp();mn();Yo();Xr();zo()});var Ya=T(()=>{"use strict";zo();mn();Rg();Ng();Og();Wa();Pg();Yo();Xr();ls();Tp();Gg();xp();_p();Ap();jg();Sp();Vg();Kg()});var ds,$e,Wg,mt,Xo=T(()=>{"use strict";ds={YES:"yes",NO:"no",UNKNOWN:"unknown",NO_FAULT:"no-fault"},$e={VERSION_SKEW:"version_skew",CAPABILITY_ABSENT:"capability-absent",INCONCLUSIVE:"inconclusive",OBSERVATION_LOST:"observation_lost",WINDOW_CLOSED_EARLY:"window_closed_early",ASSERTION_FAILED:"assertion_failed",CONTRADICTED:"contradicted",ALREADY_TRUE:"already_true",UNCLEAN_CAPTURE:"unclean_capture",VACUOUS_GRADE:"vacuous_grade",NOTHING_DECLARED:"nothing_declared",OUTCOME_PENDING:"outcome_pending",OUTCOME_UNREAD:"outcome_unread",UNSETTLED:"unsettled",EVIDENCE_INCOMPLETE:"evidence_incomplete",PROVED:"proved",ABSENCE_BLIND_SPOT:"absence_blind_spot"},Wg={BUFFER_LOSS:"buffer_loss",TRANSPORT_GAP:"transport_gap",BLIND_SPOT:"blind_spot",JOURNAL_LOSS:"journal_loss",OTHER:"other"},mt={CLOSED_SHADOW_ROOT:"closed-shadow-root",RATE_LIMITED:"rate-limited",CROSS_ORIGIN_IFRAME:"cross-origin-iframe",UNINSTRUMENTED_FRAME:"uninstrumented-frame",VIRTUALIZED_UNMOUNTED:"virtualized-unmounted",WRAPPED_NETWORK:"wrapped-network",UNOBSERVED_IPC:"unobserved-ipc",VERDICTLESS_SEND:"verdictless-send",UNWATCHED_STATE:"unwatched-state"}});var fN,hN,mN,gN,EN,bN,TN,_N,Ql,SN,xN,AN,yN,vN,RN,NN,ON,wN,CN,IN,LN,kN,DN,MN,PN,$N,CM,yp=T(()=>{"use strict";ne();Ya();qr();Xo();fN=3,hN=1,mN=2,gN={pass:ds.YES,fail:ds.NO},EN={network:O.NET,layout:O.ELEMENT},bN=o.string().brand(),TN={PASS:"pass",FAIL:"fail",PARTIAL:"partial",UNKNOWN:"unknown"},_N={PASS:"pass",FAIL:"fail",SKIPPED:"skipped",HEALED:"healed"},Ql={AUTH:"auth",PAYMENT:"payment",DB:"db",MIGRATION:"migration",RLS:"rls",SECRETS:"secrets",DESTRUCTIVE:"destructive",EXTERNAL:"external"},SN={LOW:"low",MEDIUM:"medium",HIGH:"high",CRITICAL:"critical"},xN={EDIT:"edit",CI:"ci",MANUAL:"manual",OEM:"oem"},AN={ADDED:"added",MODIFIED:"modified",DELETED:"deleted"},yN={CODING_AGENT:"coding-agent",OEM_PIPELINE:"oem-pipeline",HUMAN:"human"},vN={REACT:"react",NEXT:"next",VITE:"vite",OTHER:"other"},RN={PREVIEW:"preview",CI:"ci",LOCAL:"local"},NN={HIGH:"high",MEDIUM:"medium",LOW:"low"},ON={DEV:"dev",PROD_PREVIEW:"prod-preview"},wN=o.object({file:o.string(),line:o.number().optional(),component:o.string().optional()}),CN=o.object({path:o.string(),changeKind:o.nativeEnum(AN),risk:o.array(o.nativeEnum(Ql)).default([])}),IN=o.object({name:o.string(),status:o.nativeEnum(_N),steps:o.number(),durationMs:o.number(),oracle:o.string().optional(),healed:o.object({from:o.string(),to:o.string(),consequenceVerified:o.boolean()}).optional(),evidenceRef:o.string().optional(),failureReason:o.string().optional()}),LN=o.object({kind:o.preprocess(t=>typeof t=="string"?EN[t]??t:t,o.nativeEnum(O).optional()),predicate:o.string(),status:o.preprocess(t=>typeof t=="string"?gN[t]??t:t,o.nativeEnum(ds)),evidence:o.unknown().optional(),declaredBeforeActing:o.boolean().optional(),grade:o.string().optional(),couldNotSee:o.array(o.string()).optional(),reason:o.string().optional(),checkId:o.string().optional(),supersedes:o.string().optional()}),kN=o.object({surface:o.nativeEnum(Ql),severity:o.nativeEnum(SN),detail:o.string(),evidence:o.object({file:o.string().optional(),line:o.number().optional(),network:o.string().optional()}).optional(),gated:o.boolean().default(!1)}),DN=o.object({consoleErrors:o.array(o.object({level:o.string(),message:o.string(),at:o.number()})).default([]),networkAnomalies:o.array(o.object({method:o.string(),url:o.string(),status:o.number().optional(),issue:o.string()})).default([]),stateAssertions:o.array(o.object({store:o.string(),path:o.string(),expected:o.unknown(),actual:o.unknown(),ok:o.boolean()})).default([]),timeline:o.array(o.object({at:o.number(),kind:o.string(),summary:o.string()})).default([])}),MN=o.object({flow:o.string().optional(),step:o.number().optional(),expected:o.string(),actual:o.string(),sourceLocation:wN.optional(),suggestedPrompt:o.string()}),PN=o.object({status:o.nativeEnum(TN),reasons:o.array(o.string()).default([]),confidence:o.nativeEnum(NN),blockingRisks:o.number().default(0),checkId:o.string().optional(),supersedes:o.string().optional()}),$N=o.object({alg:o.string(),value:o.string(),signedAt:o.number()}),CM=o.object({schemaVersion:o.union([o.literal(fN),o.literal(mN),o.literal(hN)]),runId:bN,createdAt:o.number(),durationMs:o.number(),profile:o.nativeEnum(ON),project:o.object({name:o.string(),framework:o.nativeEnum(vN),commit:o.string().optional(),env:o.nativeEnum(RN).optional(),previewUrl:o.string().optional()}),agent:o.object({id:o.string(),kind:o.nativeEnum(yN),model:o.string().optional()}),trigger:o.object({kind:o.nativeEnum(xN),diffRef:o.string().optional(),note:o.string().optional()}),editEpoch:o.number().optional(),subject:Jt.optional(),changedFiles:o.array(CN).default([]),flows:o.array(IN).default([]),checks:o.array(LN).default([]),risks:o.array(kN).default([]),evidence:DN,repair:o.object({failurePackets:o.array(MN).default([])}).optional(),verdict:PN,signature:$N.optional()})});var HN,Jl,BN,FN,GN,jN,$M,VN,KN,WN,UM,HM,vp=T(()=>{"use strict";ne();Nt();Ka();yp();HN=o.array(o.string().refine(t=>!t.includes("="),t=>({message:`\`attrs\` takes attribute NAMES only, not \`name=value\` \u2014 got ${JSON.stringify(t)}. It PROJECTS each attribute onto the match, it does not filter on it. Drop the \`=value\` half and read the returned \`attrs\` map, or assert the value with an \`element\` predicate carrying \`value\`.`}))),Jl=o.object({by:o.nativeEnum(pt).optional(),value:o.string().optional(),role:o.string().optional(),name:o.string().optional(),text:o.string().optional(),label:o.string().optional(),placeholder:o.string().optional(),testid:o.string().optional(),alt:o.string().optional(),component:o.string().optional(),attrs:HN.optional(),source:o.object({file:o.string(),line:o.number(),column:o.number().optional()}).strict().optional(),scope:o.string().optional(),self:o.boolean().optional()}).strict(),BN=o.object({name:o.string(),steps:o.array(o.string())}),FN=o.object({surface:o.nativeEnum(Ql),paths:o.array(o.string()).optional(),note:o.string().optional()}),GN=o.object({owner:o.string().optional(),safety:o.array(o.string()).optional(),scope:o.array(o.string()).optional(),redact:o.array(o.string()).optional(),risk:o.array(FN).optional()}),jN=o.object({testids:o.array(o.string()),signals:o.array(o.string()),stores:o.array(o.string()),flows:o.array(BN),governance:GN.optional()}),$M=o.object({version:o.literal(xg),generatedAt:o.number(),capabilities:jN}),VN=o.object({consoleErrors:o.number().optional(),networkErrors:o.number().optional(),driftSteps:o.number().optional()}),KN=o.object({kind:o.nativeEnum(fg),name:o.string(),status:o.nativeEnum(hg),at:o.number(),summary:o.string().optional(),evidence:VN.optional(),durationMs:o.number().optional()}),WN=o.object({flows:o.array(o.string()).optional(),routes:o.array(o.string()).optional(),bestObservability:o.object({percent:o.number(),at:o.number()}).optional()}),UM=o.object({version:o.literal(1),learned:WN.optional(),runs:o.array(KN)}),HM=o.discriminatedUnion("kind",[o.object({kind:o.literal(xe.ASSERT_SIGNAL),name:o.string().min(1),dataMatches:o.record(o.unknown()).optional()}),o.object({kind:o.literal(xe.ASSERT_VISIBLE),testid:o.string().min(1)}),o.object({kind:o.literal(xe.ASSERT_STATE),statePath:o.string().min(1),store:o.string().min(1).optional(),equals:o.unknown().optional()}),o.object({kind:o.literal(xe.ASSERT_NET),net:o.object({method:o.string().min(1).optional(),urlContains:o.string().min(1).optional(),status:o.number().optional(),count:o.number().int().nonnegative().optional()})}),o.object({kind:o.literal(xe.MARK_DYNAMIC),testid:o.string().min(1)}),o.object({kind:o.literal(xe.SUCCESS_STATE),signal:o.string().min(1).optional(),testid:o.string().min(1).optional(),statePath:o.string().min(1).optional(),store:o.string().min(1).optional(),equals:o.unknown().optional(),hold:o.boolean().optional(),net:o.object({method:o.string().min(1).optional(),urlContains:o.string().min(1).optional(),status:o.number().optional(),count:o.number().int().nonnegative().optional()}).optional(),console:o.object({level:o.string().min(1).optional(),absent:o.boolean().optional()}).optional(),text:o.object({contains:o.string().min(1),scope:o.string().min(1).optional(),absent:o.boolean().optional(),visible:o.boolean().optional()}).optional()}),o.object({kind:o.literal(xe.INTENT),text:o.string().min(1)})])});var zg,Rp,Np=T(()=>{"use strict";ne();Ya();zg=o.object({op:o.nativeEnum(mp),value:o.number().finite(),tolerance:o.number().finite().nonnegative().optional()}).strict(),Rp=o.discriminatedUnion("property",[o.object({property:o.literal("nonEmpty")}).strict(),o.object({property:o.literal("oneOf"),values:o.array(o.unknown()).min(1)}).strict(),o.object({property:o.literal("withinTolerance"),of:o.number().finite(),tolerance:o.number().finite().nonnegative()}).strict(),o.object({property:o.literal("matchesPattern"),pattern:o.string().min(1)}).strict(),o.object({property:o.literal("type"),is:o.enum(["string","number","boolean","array","object"])}).strict(),o.object({property:o.literal("changed")}).strict(),o.object({property:o.literal("unchanged")}).strict(),o.object({property:o.literal("increased"),by:zg.optional()}).strict(),o.object({property:o.literal("decreased"),by:zg.optional()}).strict()])});function qN(t){if(t.kind!==void 0||typeof t[Op]!="string")return t;let e={...t,kind:t[Op]};return delete e[Op],e}function XN(t){if(typeof t!="object"||t===null||Array.isArray(t))return t;let n=qN(t),r=typeof n.kind=="string"?n.kind:"",i=zN[r],s=n;if(i!==void 0){s={...n};for(let[a,l]of Object.entries(i))s[a]!==void 0&&(s[l]===void 0&&(s[l]=s[a]),delete s[a])}return O.ELEMENT===r?ZN(s):s}function ZN(t){let e=YN.filter(i=>t[i]!==void 0);if(e.length===0)return t;let n={...t},r={};for(let i of e)r[i]=n[i],delete n[i];return n.query===void 0&&(n.query=r),n}function QN(){return o.discriminatedUnion("kind",[o.object({kind:o.literal(O.ELEMENT),query:Jl,state:o.nativeEnum(le).optional(),absent:o.boolean().optional()}).strict(),o.object({kind:o.literal(O.TEXT),contains:o.string().optional(),visible:o.boolean().optional(),absent:o.boolean().optional(),scope:o.string().optional(),self:o.boolean().optional(),satisfies:Rp.optional()}).strict(),o.object({kind:o.literal(O.NET),method:o.string().optional(),urlContains:o.string().optional(),status:o.number().optional(),ok:o.boolean().optional(),since:o.number().optional(),count:o.number().int().nonnegative().optional(),bodyContains:o.string().min(1).optional(),bodyMatches:o.record(o.string(),o.unknown()).optional(),requestBodyContains:o.string().min(1).optional(),requestBodyMatches:o.record(o.string(),o.unknown()).optional()}).strict(),o.object({kind:o.literal(O.ROUTE),pathname:o.string().optional(),contains:o.string().optional(),since:o.number().optional()}).strict(),o.object({kind:o.literal(O.CONSOLE),level:o.string().optional(),contains:o.string().min(1).optional(),absent:o.boolean().optional(),since:o.number().optional()}).strict(),o.object({kind:o.literal(O.ANIMATION),name:o.string().optional(),target:o.string().optional(),completed:o.boolean().optional(),since:o.number().optional()}).strict(),o.object({kind:o.literal(O.SIGNAL),name:o.string().optional(),dataMatches:o.record(o.unknown()).optional(),count:o.number().int().nonnegative().optional(),since:o.number().optional()}).strict(),o.object({kind:o.literal(O.STATE),store:o.string().optional(),path:o.string(),equals:o.unknown().optional(),satisfies:Rp.optional()}).strict(),o.object({kind:o.literal(O.SETTLED),quietMs:o.number().positive().optional()}).strict(),o.object({kind:o.literal(O.ALL_OF),predicates:o.array(qa).min(1)}).strict(),o.object({kind:o.literal(O.ANY_OF),predicates:o.array(qa).min(1)}).strict(),o.object({kind:o.literal(O.NOT),predicate:qa}).strict()])}function JN(t,e){if(typeof t!="object"||t===null)return;let n=t;O.TEXT===n.kind&&(n.contains===void 0&&n.satisfies===void 0&&e.addIssue({code:o.ZodIssueCode.custom,message:"a text predicate must say WHAT about the text: `contains` for a substring, `satisfies` for a property of it. With neither it matches any element with any text and cannot fail"}),n.satisfies!==void 0&&n.contains===void 0&&n.scope===void 0&&e.addIssue({code:o.ZodIssueCode.custom,message:"`satisfies` needs a subject: add `scope` (the element whose text is tested, with `self: true` to read the scope root itself) or a `contains` that selects one. Without either, the locator is every element on the page and the property would run against whichever one happened to match first"}))}var zN,Op,YN,qa,wp=T(()=>{"use strict";ne();vp();Nt();qr();Np();zN={[O.TEXT]:{text:"contains",value:"contains",query:"contains"},[O.ROUTE]:{path:"pathname",urlContains:"contains",url:"contains"},[O.NET]:{url:"urlContains",responseBodyMatches:"bodyMatches"},[O.CONSOLE]:{textContains:"contains"},[O.SIGNAL]:{data:"dataMatches"},[O.ALL_OF]:{of:"predicates"},[O.ANY_OF]:{of:"predicates"},[O.NOT]:{of:"predicate"}},Op="type",YN=["by","value","role","name","text","label","placeholder","testid","alt","component"];qa=o.lazy(()=>o.preprocess(XN,QN()).superRefine(JN))});function Yg(t){return`${t} is an element ref, which only exists in the session that minted it \u2014 scope by a CSS selector or a testid so the flow can check it again`}function ed(t){let e=(n,r)=>r!==void 0&&eO.test(r)?`${n} "${r}"`:void 0;switch(t.kind){case O.ALL_OF:case O.ANY_OF:for(let n of t.predicates){let r=ed(n);if(r!==void 0)return r}return;case O.NOT:return ed(t.predicate);case O.TEXT:return e("text.scope",t.scope);case O.ELEMENT:return e("element.query.scope",t.query.scope);case O.ANIMATION:return e("animation.target",t.target);default:return}}var eO,Cp=T(()=>{"use strict";qr();eO=/^e\d+$/});function Xg(t){let e=[];if(t.signal!==void 0){let a={kind:O.SIGNAL,name:t.signal};t.signalData!==void 0&&(a.dataMatches=t.signalData),t.signalCount!==void 0&&(a.count=t.signalCount,e.push({kind:O.SETTLED})),e.push(a)}if(t.route!==void 0){let a={kind:O.ROUTE};return t.route.pathname!==void 0&&(a.pathname=t.route.pathname),t.route.contains!==void 0&&(a.contains=t.route.contains),a}if(t.net!==void 0){let a={kind:O.NET};t.net.method!==void 0&&(a.method=t.net.method),t.net.urlContains!==void 0&&(a.urlContains=t.net.urlContains),t.net.status!==void 0&&(a.status=t.net.status),t.net.count!==void 0&&(a.count=t.net.count,e.push({kind:O.SETTLED})),e.push(a)}if(t.console!==void 0){let a={kind:O.CONSOLE};t.console.level!==void 0&&(a.level=t.console.level),t.console.absent!==void 0&&(a.absent=t.console.absent,t.console.absent&&e.push({kind:O.SETTLED})),e.push(a)}let n=t.state;if(n!==void 0){let a={kind:O.STATE,path:n.path};n.store!==void 0&&(a.store=n.store),n.equals!==void 0&&(a.equals=n.equals),n.hold===!0&&e.push({kind:O.SETTLED}),e.push(a)}let r=t.element;if(r!==void 0){let a={};r.testid!==void 0&&(a.testid=r.testid),r.role!==void 0&&(a.role=r.role),r.name!==void 0&&(a.name=r.name),Object.keys(a).length>0&&e.push({kind:O.ELEMENT,query:a})}let i=t.text;if(i!==void 0){let a={kind:O.TEXT,contains:i.contains};i.scope!==void 0&&(a.scope=i.scope),i.visible!==void 0&&(a.visible=i.visible),i.absent===!0&&(a.absent=!0,e.push({kind:O.SETTLED})),e.push(a)}let[s]=e;if(e.length!==0)return e.length===1&&s!==void 0?s:{kind:O.ALL_OF,predicates:e}}var qg,Ip=T(()=>{"use strict";ne();qr();qg=o.object({route:o.object({pathname:o.string().optional(),contains:o.string().optional()}).optional(),signal:o.string().optional(),signalData:o.record(o.unknown()).optional(),signalCount:o.number().int().nonnegative().optional(),net:o.object({method:o.string().optional(),urlContains:o.string().optional(),status:o.number().optional(),count:o.number().int().nonnegative().optional()}).strict().optional(),console:o.object({level:o.string().optional(),absent:o.boolean().optional()}).strict().optional(),element:o.object({testid:o.string().optional(),role:o.string().optional(),name:o.string().optional()}).strict().optional(),text:o.object({contains:o.string().min(1),scope:o.string().optional(),absent:o.boolean().optional(),visible:o.boolean().optional()}).strict().optional(),state:o.object({store:o.string().optional(),path:o.string(),equals:o.unknown().optional(),hold:o.boolean().optional()}).strict().optional()}).strict()});var Qg,tO,Lp,Zg,nO,Jg,rO,dP,eE=T(()=>{"use strict";ne();Ka();ap();Nt();wp();Cp();Ip();Ka();Qg=o.discriminatedUnion("kind",[o.object({kind:o.literal(Zt.TESTID),value:o.string().min(1),source:o.object({file:o.string(),line:o.number(),column:o.number().optional()}).optional()}),o.object({kind:o.literal(Zt.ROLE),role:o.string().min(1),name:o.string().optional()}),o.object({kind:o.literal(Zt.SIGNAL),name:o.string().min(1)}),o.object({kind:o.literal(Zt.COMPONENT),component:o.string().optional(),source:o.object({file:o.string(),line:o.number(),column:o.number().optional()}).optional(),role:o.string().optional(),name:o.string().optional()})]),tO=qa.superRefine((t,e)=>{let n=ed(t);n!==void 0&&e.addIssue({code:o.ZodIssueCode.custom,message:Yg(n)})}),Lp=o.union([tO,qg.transform(t=>Xg(t))]),Zg=o.array(Lp).transform(t=>t.filter(e=>e!==void 0)),nO=o.object({tool:o.string(),anchor:Qg,source:o.object({file:o.string().min(1),line:o.number().int().positive().optional()}).optional(),id:o.string().min(1).optional(),effect:o.nativeEnum(Eg).optional(),healed:o.object({from:o.string(),at:o.number()}).optional(),action:o.nativeEnum(v).optional(),args:o.record(o.unknown()).optional(),expect:Lp.optional(),degraded:o.boolean().optional(),timeoutMs:o.number().int().positive().optional(),invoke:o.string().min(1).optional()}),Jg=nO.extend({steps:o.lazy(()=>o.array(Jg).optional())}),rO=o.object({version:o.number().int().refine(t=>mg.has(t)),name:o.string(),intent:o.string().optional(),intentId:o.string().optional(),projectId:o.string().optional(),startPath:o.string().optional(),fixture:o.string().optional(),requires:Zg.optional(),ensures:Zg.optional(),createdAt:o.number(),steps:o.array(Jg),signalTimeoutMs:o.number().int().positive().optional(),success:Lp.optional(),dynamic:o.array(Qg).optional(),labels:o.array(o.string().min(1)).optional(),needs:o.array(o.string().min(1)).optional(),status:o.enum([Fl.ACTIVE,Fl.QUARANTINED,Fl.DRAFT]).optional(),learned:o.array(o.object({kind:o.string().min(1),step:o.number().int().min(-1),state:o.enum(["open","guarded"]),cleanRuns:o.number().int().nonnegative().optional()})).optional(),knownBugs:o.array(o.object({id:o.string().min(1),summary:o.string().min(1),assertions:o.array(o.string())})).optional(),quarantine:o.object({reason:o.string().min(1),since:o.string().min(1),owner:o.string().min(1),until:o.string().optional()}).optional()}),dP=o.object({name:o.string(),flow:rO})});var tE=T(()=>{"use strict"});var nE=T(()=>{"use strict"});var rE=T(()=>{"use strict"});var td,nd,oE,iE=T(()=>{"use strict";td="data-reticle-source",nd="__RETICLE_ROOT__",oE="__RETICLE_SDK_VERSION__"});var sE,aE=T(()=>{"use strict";Nt();sE=new Set([b.DOM_TEXT,b.ANIM_START,b.ANIM_END,b.RENDER_COMMIT,b.PAGE_HEALTH,b.SCROLL_POSITION])});function kp(t){let e=t.text;if(typeof e=="string"&&0<e.length)return e;let n=t.key;return typeof n=="string"&&0<n.length?n:oO}function aO(t){let e=t.modifiers;return Array.isArray(e)&&0<e.length}function cE(t){return aO(t)?!0:sO.has(kp(t).toLowerCase())}var oO,iO,sO,lE=T(()=>{"use strict";oO="Enter",iO=["Escape","Tab"],sO=new Set(iO.map(t=>t.toLowerCase()))});var Ye,_P,dE=T(()=>{"use strict";Xo();Ye={CODE:"code",ENVIRONMENT:"environment",HARNESS:"harness",COULD_NOT_SEE:"could-not-see",NONE:"none"},_P={[$e.ASSERTION_FAILED]:Ye.CODE,[$e.CONTRADICTED]:Ye.CODE,[$e.OUTCOME_PENDING]:Ye.ENVIRONMENT,[$e.UNSETTLED]:Ye.ENVIRONMENT,[$e.VERSION_SKEW]:Ye.HARNESS,[$e.WINDOW_CLOSED_EARLY]:Ye.HARNESS,[$e.NOTHING_DECLARED]:Ye.HARNESS,[$e.VACUOUS_GRADE]:Ye.HARNESS,[$e.ALREADY_TRUE]:Ye.HARNESS,[$e.CAPABILITY_ABSENT]:Ye.COULD_NOT_SEE,[$e.OBSERVATION_LOST]:Ye.COULD_NOT_SEE,[$e.UNCLEAN_CAPTURE]:Ye.COULD_NOT_SEE,[$e.EVIDENCE_INCOMPLETE]:Ye.COULD_NOT_SEE,[$e.ABSENCE_BLIND_SPOT]:Ye.COULD_NOT_SEE,[$e.OUTCOME_UNREAD]:Ye.COULD_NOT_SEE,[$e.INCONCLUSIVE]:Ye.COULD_NOT_SEE,[$e.PROVED]:Ye.NONE}});var Zo,cO,lO,dO,AP,uE=T(()=>{"use strict";ne();Zo={CONNECTING:"connecting",WAITING_FOR_APP:"waiting_for_app",FLOWS_FOUND:"flows_found",FLOW_STARTED:"flow_started",FLOW_FINISHED:"flow_finished",GRADING:"grading",PUSHED:"pushed"},cO=120,lO=200,dO=o.object({phase:o.enum([Zo.CONNECTING,Zo.WAITING_FOR_APP,Zo.FLOWS_FOUND,Zo.FLOW_STARTED,Zo.FLOW_FINISHED,Zo.GRADING,Zo.PUSHED]),index:o.number().int().nonnegative().optional(),total:o.number().int().nonnegative().optional(),name:o.string().max(cO).optional(),ok:o.boolean().optional(),at:o.number().int().nonnegative()}),AP=o.object({runId:o.string().min(1).max(200),events:o.array(dO).max(lO)})});function pE(t){return t===ye.ACTIVE||t===ye.PAUSED||t===ye.ENDED}var ye,Xa,kn,Qo,fE,hE,us,Dp=T(()=>{"use strict";ye={ACTIVE:"active",PAUSED:"paused",ENDED:"ended"};Xa="auto",kn={PAUSE:"pause",RESUME:"resume",END:"end",MESSAGE:"message",REPLAY:"replay",SYNC:"sync",HARNESS:"harness"},Qo={TESTID:"testid",COMPONENT:"component",ROLE:"role",POSITION:"position"},fE={HEARTBEAT_MS:5e3,STALE_THRESHOLD_MS:12e3,LEDGER_NOTICE_FRACTION:.25},hE={IDLE_END_MS:3e5,IDLE_END_MIN_MS:5e3,REAP_INTERVAL_MS:5e3,BRIDGE_LOST_MS:15e3,DAEMON_IDLE_SHUTDOWN_MS:3e5,DAEMON_IDLE_CHECK_MS:3e4},us={VISIBILITY:"visibilitychange",FOCUS:"focus",BLUR:"blur",HEARTBEAT:"heartbeat",INITIAL:"initial"}});var Zr,Qr,Za,Mp=T(()=>{"use strict";Zr={BUBBLE:"bubble",COLLAPSED:"collapsed",EXPANDED:"expanded"},Qr={CHAT:"chat",SETTINGS:"settings",REPORT:"report",NONE:"none"},Za={ON:"on",OFF:"off"}});var ps,gE,EE,mE,NP,bE=T(()=>{"use strict";ps="https://calendar.app.google/h9NRDbBBQetyTzWM6",gE="hey@reticle.sh",EE="mailto:hey@reticle.sh?subject=Reticle%20feedback",mE="npx @reticlehq/server identify --context company --email you@company.com",NP={HUMAN:`Stuck, or want Reticle to work differently? Talk to the founder: ${ps} \xB7 or leave your email: ${mE}`,AGENT:`If the person you are working with is stuck or Reticle got in their way, offer them a call with the founder (${ps}) or the email command (${mE}). Offer it; never book a call or submit an email for them.`}});function TE(t){let e="";for(let n=0;n<8;n++){let r=Math.floor(t()*Pp.length);e+=Pp[Math.min(Math.max(r,0),Pp.length-1)]}return e}var Pp,_E=T(()=>{"use strict";Pp="0123456789abcdefghijklmnopqrstuvwxyz"});var SE=T(()=>{"use strict"});var gn,$p,Qa,uO,IP,xE,rd,AE,od=T(()=>{"use strict";gn={FETCH:"fetch",XHR:"xhr",BEACON:"beacon",IPC:"ipc",DOCUMENT:"document",NAVIGATION:"navigation"},$p="ipc://",Qa={OK:200,ERROR:500},uO={NEXT_DEV_OVERLAY:"/__nextjs",NEXT_HMR:"/_next/webpack-hmr",NEXT_HMR_CHUNKS:"/_next/static/webpack/",WEBPACK_HOT_UPDATE:".hot-update.",VITE_CLIENT:"/@vite/",VITE_REACT_REFRESH:"/@react-refresh",VITE_PING:"/__vite_ping"},IP=Object.values(uO),xE="urlRaw",rd="requestShape",AE="none"});function Up(t){return pO.test(t)}function yE(t){let e=new Set;for(let n of t??[]){let r=n.trim().toLowerCase();r.length>0&&e.add(r)}return e}function vE(t,e){let n=yE(t?.keys?.filter(a=>typeof a=="string")),r=(t?.keys??[]).filter(a=>a instanceof RegExp),i=yE(t?.allow),s=[...i].filter(a=>Up(a)&&!n.has(a));return s.length>0&&e!==void 0&&e(`[reticle] redact.allow is exempting ${s.join(", ")} from redaction. The default rule treats ${s.length===1?"that key":"those keys"} as a credential, so ${s.length===1?"its value":"their values"} will now reach the agent transcript and the on-disk journal in cleartext.`),{isSensitiveKey:a=>{let l=a.toLowerCase();if(n.has(l))return!0;for(let d of r)if(d.lastIndex=0,d.test(a))return!0;return i.has(l)?!1:Up(a)}}}function RE(t){Hp=t}function He(t){return Hp===void 0?Up(t):Hp.isSensitiveKey(t)}function id(t,e=He){let n=t.indexOf("#"),r=n===-1?"":t.slice(n),i=n===-1?t:t.slice(0,n),s=i.indexOf("?"),a=s===-1?i:i.slice(0,s),l=s===-1?"":i.slice(s+1),d=!1,p=a,f=/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i.exec(a);f!==null&&(p=`${f[1]??""}${Ae}@${a.slice(f[0].length)}`,d=!0);let E=l;if(l!==""){let L=new URLSearchParams(l),D=!1;for(let G of[...L.keys()])e(G)&&(L.set(G,Ae),D=!0);D&&(E=L.toString(),d=!0)}let g=p.split("/");for(let L=0;L+1<g.length;L++){let D=g[L],G=g[L+1];D!==void 0&&G!==void 0&&G.length>=hO&&fO.test(D)&&(g[L+1]=Ae,d=!0)}let _=r;if(r.length>1&&(_=r.replace(/(^|[#&?/])([A-Za-z0-9_.-]+)=([^&\s]+)/g,(L,D,G)=>e(G)?`${D}${G}=${Ae}`:L),_!==r&&(d=!0)),!d)return t;let S=s===-1?"":`?${E}`;return`${g.join("/")}${S}${_}`}function Dn(t,e=He){let n=id(t,e);return n===t?{url:n}:{url:n,[xE]:t}}function NE(t){let e=new Set,n=[];for(let r of t?.keys??[]){if(typeof r!="string")continue;let i=r.trim();if(i.length===0||i.length>Fp)continue;let s=i.toLowerCase();if(!e.has(s)&&(e.add(s),n.push(i),n.length>=Bp))break}return n}function Jo(t){return t.replace(mO,Ae)}var pO,Hp,fO,hO,Bp,Fp,mO,Gp=T(()=>{"use strict";Nt();od();pO=/password|passwd|passcode|pass[-_]?phrase|(?:otp|totp|mfa|recovery|backup)[-_]?codes?|(?:^|[-_])(?:otp|totp)(?=$|[-_])|secret|(?:(?:access|refresh|auth|bearer|api|id|session|csrf|client)[-_]?tokens?|(?:^|[-_])tokens?(?=$|[-_]))|session[-_]?id|(?:^|[-_])(?:sid|pwd|jwt)(?=$|[-_])|authorization|(?:^|[-_])(?:set[-_])?cookie(?=$|[-_])|api[-_]?key|access[-_]?key|private[-_]?key|client[-_]?secret|credit[-_]?card|card[-_]?(?:number|num|no|pan)(?=$|[-_])|(?:^|[-_])(?:card|pan)(?=$|[-_])|cvv|cvc|ssn|(?:^|[-_])(?:signature|sig)$|(?:^|[-_])credential$|x-(?:amz|goog)-(?:signature|credential|security-token)$/i;fO=/^(reset|verify|verification|confirm|activate|invite|magic|magiclink|token|key|oauth|unsubscribe|password)$/i,hO=12;Bp=64,Fp=128;mO=/eyJ[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{4,}\.[A-Za-z0-9_-]{4,}|(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{10,}|sk-(?:ant|proj|svcacct|admin)-[A-Za-z0-9_-]{20,}|(?:AKIA|ASIA)[0-9A-Z]{16}|gh[pousr]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{22,}|AIza[0-9A-Za-z_-]{35}|xox[baprs]-[A-Za-z0-9-]{10,}|ya29\.[A-Za-z0-9._-]{20,}/g});var Mn,sd=T(()=>{"use strict";Mn={WEB:"web",WEBVIEW:"webview",NATIVE:"native",SERVICE:"service"}});function jp(){return[A.UI,A.NET,A.STATE,A.SIGNAL,A.LOG,A.ROUTE,A.TIME]}var HP,BP,ad=T(()=>{"use strict";Ya();qr();HP={[O.ELEMENT]:[A.UI],[O.TEXT]:[A.UI],[O.SIGNAL]:[A.SIGNAL],[O.NET]:[A.NET],[O.STATE]:[A.STATE],[O.ROUTE]:[A.ROUTE],[O.CONSOLE]:[A.LOG],[O.ANIMATION]:[A.UI,A.TIME],[O.SETTLED]:[A.TIME,A.NET],[O.ALL_OF]:jp(),[O.ANY_OF]:jp(),[O.NOT]:jp()};BP=Object.fromEntries(Object.entries(up).map(([t,e])=>[t,e.independence]))});var cd,OE,gO,wE,CE,IE,EO,bO,Kp,TO,_O,XP,Wp=T(()=>{"use strict";ne();Mp();Nt();Dp();Gp();sd();ad();cd=o.string().min(1).max(U.MAX_SESSION_ID_LENGTH),OE=o.string().max(U.MAX_REF_LENGTH),gO=o.string().min(1).max(8),wE=o.object({kind:o.nativeEnum(kn),text:o.string().optional()}),CE=o.object({control:o.string().max(48).regex(/^[a-z][a-zA-Z-]*(\.[a-zA-Z-]+)?$/).optional(),toggle:o.nativeEnum(Za).optional(),view:o.nativeEnum(Zr).optional(),panel:o.nativeEnum(Qr).optional()}),IE=o.object({note:o.string().min(1).max(U.MAX_MARK_NOTE_LENGTH),anchor:o.string().max(U.MAX_REF_LENGTH),strategy:o.nativeEnum(Qo),label:o.string().max(U.MAX_MARK_LABEL_LENGTH).optional(),source:o.object({file:o.string().max(U.MAX_URL_LENGTH),line:o.number().int().min(0)}).optional(),route:o.string().max(U.MAX_URL_LENGTH).optional()}),EO=o.object({t:o.number(),type:o.nativeEnum(b),sessionId:cd,ref:OE.optional(),seq:o.number().int().min(0).optional(),actionId:OE.optional(),attribution:o.nativeEnum(Ag).optional(),documentId:gO.optional(),editEpoch:o.number().int().min(0).optional(),data:o.record(o.unknown()).default({})}),bO=o.object({kind:o.literal(ft.HELLO),protocolVersion:o.number().int().min(Tg).max(jl),sessionId:cd,url:o.string().max(U.MAX_URL_LENGTH),title:o.string().max(U.MAX_TITLE_LENGTH),projectId:cd.optional(),adapters:o.array(o.string().max(U.MAX_ADAPTER_NAME_LENGTH)).max(U.MAX_ADAPTERS),token:o.string().max(U.MAX_TOKEN_LENGTH).optional(),platform:o.nativeEnum(Mn).optional(),channels:o.array(o.nativeEnum(A)).max(U.MAX_ADAPTERS).optional(),commands:o.array(o.string().max(U.MAX_TOKEN_LENGTH)).max(U.MAX_ADAPTERS).optional(),contractParts:o.object({commands:o.array(o.string()).max(U.MAX_CONTRACT_NAMES),events:o.array(o.string()).max(U.MAX_CONTRACT_NAMES),actions:o.array(o.string()).max(U.MAX_CONTRACT_NAMES)}).optional(),hasCapabilities:o.boolean().optional(),captureBodies:o.boolean().optional(),sourceMapping:o.boolean().optional(),sdkVersion:o.string().max(U.MAX_ADAPTER_NAME_LENGTH).optional(),contract:o.string().max(U.MAX_ADAPTER_NAME_LENGTH).optional(),redactKeys:o.array(o.string().min(1).max(Fp)).max(Bp).optional()}),Kp=o.object({kind:o.literal(ft.COMMAND),id:o.string().min(1).max(U.MAX_COMMAND_ID_LENGTH),sessionId:cd.optional(),name:o.string().min(1).max(U.MAX_COMMAND_NAME_LENGTH),args:o.record(o.unknown()).default({})}),TO=o.object({kind:o.literal(ft.COMMAND_RESULT),id:o.string().min(1).max(U.MAX_COMMAND_ID_LENGTH),ok:o.boolean(),result:o.unknown().optional(),error:o.string().max(U.MAX_ERROR_LENGTH).optional()}),_O=o.object({kind:o.literal(ft.EVENT),event:EO}),XP=o.discriminatedUnion("kind",[bO,Kp,TO,_O])});var SO,xO,Jr,AO,Ne,yO,vO,RO,NO,OO,wO,zp,LE,CO,kE,fs=T(()=>{"use strict";ne();SO={AGENT:"agent",HUMAN:"human"},xO={BUG:"bug",GAP:"gap",AMBIGUITY:"ambiguity",FEATURE_REQUEST:"feature_request",IMPROVEMENT:"improvement",EXPERIENCE:"experience"},Jr={WEB:"web",ELECTRON:"electron",TAURI:"tauri"},AO={BLINK:"blink",GECKO:"gecko",WEBKIT:"webkit"},Ne={CHROME:"chrome",EDGE:"edge",ARC:"arc",DIA:"dia",BRAVE:"brave",OPERA:"opera",FIREFOX:"firefox",SAFARI:"safari",OTHER:"other"},yO={CDP:"cdp",SDK:"sdk"},vO={USER:"user",PROJECT:"project"},RO=4e3,NO=8e3,OO=1,wO=5,zp=1e3,LE=o.object({source:o.nativeEnum(SO),kind:o.nativeEnum(xO),text:o.string().min(1).max(RO),trace:o.string().max(NO).optional(),rating:o.number().int().min(OO).max(wO).optional(),need:o.string().max(zp).optional(),impact:o.string().max(zp).optional(),currentApproach:o.string().max(zp).optional(),model:o.string().min(1).max(64).optional(),clientVersion:o.string().min(1).max(32).optional(),stack:o.string().min(1).max(64).optional(),stackMajor:o.number().int().nonnegative().optional(),runtime:o.nativeEnum(Jr).optional(),engine:o.nativeEnum(AO).optional(),driver:o.nativeEnum(yO).optional(),client:o.string().min(1).max(64).optional(),mcpScope:o.nativeEnum(vO).optional()}),CO={COMPANY:"company",SIDE_PROJECT:"side_project",OPEN_SOURCE:"open_source",LEARNING:"learning"},kE=o.object({context:o.nativeEnum(CO),company:o.string().min(1).max(128).optional(),email:o.string().min(3).max(254).optional()})});var Pn,$n,dd,ei,IO,LO,s$,ld,kO,DO,MO,Ja,a$,DE=T(()=>{"use strict";ne();Nt();Xo();fs();Wp();od();Pn={SSE:"sse",WS:"ws",FETCH:"fetch"},$n={OPEN:"open",IN:"in",OUT:"out",CLOSE:"close"},dd={UP:"up",DOWN:"down"},ei={LOCAL:"local",SESSION:"session",COOKIE:"cookies"},IO=o.object({name:o.string().describe("Cookie name."),value:o.string().describe("Cookie value."),domain:o.string().optional().describe("Cookie domain. Defaults to the navigation URL domain."),path:o.string().optional().describe('Cookie path. Defaults to "/".'),url:o.string().optional().describe("Cookie URL. Defaults to the navigation URL."),httpOnly:o.boolean().optional().describe("Whether the cookie is httpOnly."),secure:o.boolean().optional().describe("Whether the cookie is secure."),sameSite:o.enum(["Strict","Lax","None"]).optional().describe("SameSite policy."),expires:o.number().optional().describe("Unix timestamp in seconds for cookie expiration.")}),LO=o.union([o.record(o.string()),o.array(IO)]),s$=o.object({local:o.record(o.string()).optional().describe("Key-value pairs to seed into window.localStorage before first navigation."),session:o.record(o.string()).optional().describe("Key-value pairs to seed into window.sessionStorage before first navigation."),cookies:LO.optional().describe("Cookies to seed before first navigation: a name-value record scoped to the lease URL or an array of cookie objects.")}),ld=o.object({role:o.string().optional(),name:o.string().optional()}),kO=o.object({mimeType:o.string(),bytes:o.number(),filename:o.string().optional(),lines:o.number().optional(),preview:o.string().optional(),previewTruncated:o.boolean().optional()}).passthrough(),DO=o.object({transport:o.nativeEnum(Pn),direction:o.nativeEnum($n),url:o.string()}).passthrough(),MO=o.object({id:o.string(),method:o.string(),url:o.string(),status:o.number(),ok:o.boolean(),durationMs:o.number(),initiator:o.string(),urlRaw:o.string().optional(),[rd]:o.string().optional()}).passthrough(),Ja=o.object({message:o.string()}).passthrough(),a$={[b.DOM_ADDED]:ld,[b.DOM_REMOVED]:ld,[b.DOM_ATTR]:o.object({attr:o.string(),value:o.string().optional(),old:o.string().optional()}).passthrough(),[b.DOM_TEXT]:o.object({text:o.string(),old:o.string().optional()}),[b.NET_REQUEST]:MO,[b.NET_PENDING]:o.object({id:o.string(),method:o.string(),url:o.string(),initiator:o.string(),urlRaw:o.string().optional()}),[b.NET_STREAM]:DO,[b.DOWNLOAD]:kO,[b.PERF]:o.object({metric:o.nativeEnum(ss),value:o.number(),at:o.number()}),[b.ROUTE_CHANGE]:o.object({from:o.string(),to:o.string(),pathname:o.string(),search:o.string(),hash:o.string()}),[b.CONSOLE_LOG]:Ja,[b.CONSOLE_WARN]:Ja,[b.CONSOLE_ERROR]:Ja,[b.CONSOLE_INFO]:Ja,[b.CONSOLE_DEBUG]:Ja,[b.ERROR_UNCAUGHT]:o.object({message:o.string(),source:o.string().optional(),line:o.number().optional(),kind:o.string().optional()}).passthrough(),[b.VISIBLE_SHOWN]:ld,[b.ANIM_START]:o.object({name:o.string()}),[b.ANIM_END]:o.object({name:o.string()}),[b.SCROLL_POSITION]:o.object({x:o.number(),y:o.number(),percent:o.number(),direction:o.nativeEnum(dd)}),[b.REVEAL_SHOWN]:ld.passthrough(),[b.SIGNAL]:o.object({name:o.string(),data:o.unknown().optional()}),[b.STATE_CHANGE]:o.object({name:o.string(),value:o.unknown()}).passthrough(),[b.STORAGE_CHANGE]:o.object({area:o.nativeEnum(ei),key:o.string(),old:o.string().optional(),new:o.string().optional()}),[b.PAGE_HEALTH]:o.object({hidden:o.boolean(),focused:o.boolean(),reason:o.string().optional(),brand:o.nativeEnum(Ne).optional(),runtime:o.string().optional(),engine:o.string().optional()}).passthrough(),[b.CONTEXT_OPENED]:o.object({href:o.string().optional()}).passthrough(),[b.DIALOG_OPENED]:o.object({kind:o.enum(["alert","confirm","prompt"]),message:o.string().optional(),answered:o.union([o.boolean(),o.null()]).optional()}).passthrough(),[b.RENDER_COMMIT]:o.object({commits:o.number()}),[b.FOCUS_CHANGE]:o.object({to:o.string().optional(),from:o.string().optional(),toBody:o.boolean()}),[b.FIELD_CHANGE]:o.object({field:o.string(),kind:o.enum(["input","change"]),length:o.number().int().nonnegative(),value:o.string().optional(),redacted:o.literal(!0).optional()}),[b.FLOW_RECORDED]:o.object({name:o.string(),flow:o.unknown()}),[b.TRANSPORT_OVERFLOW]:o.object({dropped:o.number()}),[b.TRUNCATED]:o.object({channel:o.string(),dropped:o.number()}),[b.BLIND_SPOT]:o.object({kind:o.nativeEnum(mt),count:o.number()}),[b.SDK_FAILED]:o.object({site:o.string().max(64),message:o.string().max(500),errorType:o.string().max(64).optional()}),[b.NET_DETAIL]:o.object({url:o.string(),method:o.string().optional(),status:o.number(),headers:o.record(o.string()),resourceType:o.string().optional()}).passthrough(),[b.HUMAN_CONTROL]:wE,[b.HUMAN_MARK]:IE,[b.HUD_USED]:CE}});var d$,ME=T(()=>{"use strict";Nt();d$=new Set([b.NET_REQUEST,b.NET_PENDING,b.NET_STREAM,b.NET_DETAIL,b.CONSOLE_ERROR,b.CONSOLE_WARN,b.ERROR_UNCAUGHT,b.ROUTE_CHANGE,b.SIGNAL,b.STORAGE_CHANGE,b.FLOW_RECORDED,b.TRANSPORT_OVERFLOW,b.TRUNCATED,b.BLIND_SPOT])});var PE=T(()=>{"use strict"});var $E,UE=T(()=>{"use strict";$E=t=>t});var ue,g$,E$,b$,HE=T(()=>{"use strict";ad();ue={UI_ADVANCED_REQUEST_FAILED:"ui-advanced-request-failed",SIGNAL_CONTRADICTED:"signal-contradicted",RESPONSE_IGNORED:"response-ignored",SIGNAL_WITHOUT_CONSEQUENCE:"signal-without-consequence",STATE_VS_RENDER:"state-vs-render",CONSEQUENCE_ELSEWHERE:"consequence-elsewhere",DUPLICATE_REQUEST:"duplicate-request",DUPLICATE_REQUEST_UNRELATED:"duplicate-request-unrelated",STALE_RESPONSE_APPLIED:"stale-response-applied",PARTIAL_FAILURE_IN_OK_RESPONSE:"partial-failure-in-ok-response",UNIT_MISMATCH:"unit-mismatch",WRITE_FIELD_IGNORED:"write-field-ignored",REQUEST_NEVER_SETTLED:"request-never-settled",FAILURE_MISATTRIBUTED:"failure-misattributed",ACTION_HAD_NO_EFFECT:"action-had-no-effect",ROUTE_RENDERED_NOTHING:"route-rendered-nothing",ROUTE_RENDERED_NOTHING_CRASHED:"route-rendered-nothing-crashed",EVIDENCE_SUPERSEDED:"evidence-superseded",EVIDENCE_PREDATES_EDIT:"evidence-predates-edit"},g$=new Set([ue.REQUEST_NEVER_SETTLED,ue.RESPONSE_IGNORED,ue.SIGNAL_WITHOUT_CONSEQUENCE,ue.STATE_VS_RENDER,ue.CONSEQUENCE_ELSEWHERE,ue.ROUTE_RENDERED_NOTHING,ue.ACTION_HAD_NO_EFFECT,ue.DUPLICATE_REQUEST,ue.EVIDENCE_SUPERSEDED,ue.EVIDENCE_PREDATES_EDIT]),E$=new Set([ue.DUPLICATE_REQUEST_UNRELATED]),b$={[ue.UI_ADVANCED_REQUEST_FAILED]:[A.UI,A.NET],[ue.SIGNAL_CONTRADICTED]:[A.SIGNAL,A.NET],[ue.RESPONSE_IGNORED]:[A.NET,A.UI],[ue.SIGNAL_WITHOUT_CONSEQUENCE]:[A.SIGNAL,A.NET],[ue.STATE_VS_RENDER]:[A.STATE,A.UI],[ue.CONSEQUENCE_ELSEWHERE]:[A.NET,A.UI],[ue.DUPLICATE_REQUEST]:[A.NET,A.NET],[ue.DUPLICATE_REQUEST_UNRELATED]:[A.NET,A.NET],[ue.STALE_RESPONSE_APPLIED]:[A.NET,A.UI],[ue.PARTIAL_FAILURE_IN_OK_RESPONSE]:[A.NET,A.NET],[ue.UNIT_MISMATCH]:[A.UI,A.NET],[ue.WRITE_FIELD_IGNORED]:[A.NET,A.NET],[ue.REQUEST_NEVER_SETTLED]:[A.TIME,A.NET],[ue.FAILURE_MISATTRIBUTED]:[A.UI,A.NET],[ue.ACTION_HAD_NO_EFFECT]:[A.NET,A.UI],[ue.ROUTE_RENDERED_NOTHING]:[A.ROUTE,A.NET],[ue.ROUTE_RENDERED_NOTHING_CRASHED]:[A.ROUTE,A.LOG],[ue.EVIDENCE_SUPERSEDED]:[A.TIME,A.UI],[ue.EVIDENCE_PREDATES_EDIT]:[A.TIME,A.UI]}});var eo,ud,S$,x$,BE=T(()=>{"use strict";Nt();eo="__reticleIpc",ud="reticle_capture",S$=is.FULL_PAGE_UNSUPPORTED,x$=is.NOT_COMPOSITED});var FE=T(()=>{"use strict"});function GE(t){return t===hs.CALM||t===hs.WAITING||t===hs.ASK||t===hs.WARN}var hs,jE,v$,R$,VE=T(()=>{"use strict";hs={CALM:"calm",WAITING:"waiting",ASK:"ask",WARN:"warn"};jE="note that a lease is a SEPARATE context: the human watching this tab sees nothing of what you do there, so prefer this tab while someone is following along",v$='tab hidden and may be un-focusable from here; timers and rAF are clamped in a background tab, so an action can land on a page that never advances. Refocus it, or acquire a guaranteed scriptable context yourself with `reticle_run { tool: "reticle_lease", action: "acquire", url }` (a human can equivalently run `reticle drive <url>`) \u2014 '+jE,R$="tab is not hidden but has not reported health recently \u2014 usually a quiet page rather than a stuck one, and very often still driveable. This is also the tab a human can see, so try it first. Timing-sensitive work (animations, debounces, gestures) is what degrades: pass `refuseWhenThrottled: true` to refuse rather than act over events that may not land. Lease a separate context only if a drive here actually fails; "+jE});var KE,L$,k$,D$,WE=T(()=>{"use strict";ne();Nt();Xo();qr();KE=1,L$=o.object({v:o.literal(KE),actionId:o.string().min(1).max(U.MAX_REF_LENGTH),tool:o.string().min(1).max(U.MAX_COMMAND_NAME_LENGTH),args:o.record(o.unknown()).default({}),effect:o.unknown().optional(),settled:o.boolean().optional(),settledInMs:o.number().int().min(0).optional(),seqRange:o.object({from:o.number().int().min(0),to:o.number().int().min(0)}).optional(),tRange:o.object({from:o.number().int().min(0),to:o.number().int().min(0)}),at:o.number().int().min(0)}),k$=o.object({v:o.literal(KE),channel:o.literal(Kl.JOURNAL),capBytes:o.number().int().min(1).optional(),bytesOnDisk:o.number().int().min(0).optional(),droppedInBatch:o.number().int().min(0).optional(),at:o.number().optional()}),D$=o.object({claim:o.string().min(1).max(U.MAX_STRING_LENGTH),verified:o.nativeEnum(ds),source:o.string().max(U.MAX_URL_LENGTH).optional(),kind:o.nativeEnum(O).optional(),declaredBeforeActing:o.boolean().optional(),grade:o.string().max(U.MAX_STRING_LENGTH).optional(),couldNotSee:o.array(o.string().max(U.MAX_STRING_LENGTH)).optional(),reason:o.string().max(U.MAX_STRING_LENGTH).optional()})});var zE=T(()=>{"use strict"});var U$,YE=T(()=>{"use strict";ne();U$=o.object({port:o.number(),pid:o.number(),cwd:o.string(),projectId:o.string().optional(),startedAt:o.number()})});var F$,qE=T(()=>{"use strict";ne();F$=o.object({port:o.number(),pid:o.number(),root:o.string(),url:o.string(),sdkVersion:o.string().min(1).optional(),startedAt:o.number(),projectId:o.string().optional()})});var PO,V$,XE=T(()=>{"use strict";ne();PO=o.object({directory:o.string().min(1),lastSeenAt:o.number()}),V$=o.object({version:o.literal(1),projects:o.record(o.string(),PO)})});var $O,Yp,UO,HO,BO,z$,ZE=T(()=>{"use strict";ne();$O=1,Yp={DECLARED:"declared",BOUND:"bound",PROVED:"proved"},UO=o.object({route:o.string().optional(),flow:o.string().optional(),files:o.array(o.string()).optional()}),HO=o.object({verdictId:o.string(),grade:o.string(),at:o.number()}),BO=o.object({id:o.string().min(1),statement:o.string().min(1),state:o.enum([Yp.DECLARED,Yp.BOUND,Yp.PROVED]),declaredAt:o.number(),binding:o.unknown().optional(),surface:UO.optional(),provenBy:HO.optional(),amended:o.array(o.object({statement:o.string(),at:o.number()})).optional()}),z$=o.object({version:o.literal($O),intents:o.record(o.string(),BO)})});var QE=T(()=>{"use strict"});var dr,X$,JE=T(()=>{"use strict";dr={NO_SOURCE_MAPPING:"no-source-mapping",NO_STORE_REGISTERED:"no-store-registered",NO_SIGNAL_ON_MUTATION:"no-signal-on-mutation",UNDECLARED_CONTROL:"undeclared-control",MISSING_TESTID:"missing-testid",UNDECLARED_CHANGE:"undeclared-change",INTENT_UNDISCHARGED:"intent-undischarged",NO_FLOW_INTENT:"no-flow-intent",SOURCE_MAPPING_OFF:"source-mapping-off"},X$={[dr.NO_SOURCE_MAPPING]:"add the Reticle build plugin (@reticlehq/vite-plugin, @reticlehq/next, or the babel plugin) so elements carry data-reticle-source",[dr.NO_STORE_REGISTERED]:"register the store with reticle.registerStore(name, getState) so state can be read directly instead of inferred from the DOM",[dr.NO_SIGNAL_ON_MUTATION]:"fire reticle.signal(name, data) where this state is committed \u2014 commitAndSignal binds the two so they cannot drift",[dr.UNDECLARED_CONTROL]:"add this control to reticle.describe() so the capability contract matches what the app actually exposes",[dr.MISSING_TESTID]:'add data-testid="..." on this control so the flow can name it after a refactor',[dr.UNDECLARED_CHANGE]:'declare it with reticle_intent { action: "declare", intents: [{ id, statement }] } \u2014 the statement is prose, in your own words: which user does what, and what should become true',[dr.INTENT_UNDISCHARGED]:'draw a verdict whose `until` asserts the intent itself, then it discharges \u2014 or call reticle_run({ tool: "reticle_context" }) to see exactly what is still owed',[dr.SOURCE_MAPPING_OFF]:"nothing to install \u2014 this build has sourceMapping turned off, so no element carries data-reticle-source. Re-enable it in the Reticle plugin options unless this app renders through a non-DOM reconciler (react-three-fiber, react-pdf, ink), where the stamp is what would break it",[dr.NO_FLOW_INTENT]:'save it again with intent: "<which user does what, and what should become true>" \u2014 prose, in your own words \u2014 or set intentId to an intent already in the ledger'}});function qp(t){let e=t.toLowerCase().replace(/^\[|\]$/g,"");if(jO.includes(e))return!0;let n=e.split(".");return KO===n.length&&VO===n[0]&&n.every(r=>{if(!/^\d{1,3}$/.test(r))return!1;let i=Number(r);return i>=0&&i<=WO})}function eb(t,e){return qp(e)||zO.includes(t.toLowerCase())?!0:e.toLowerCase()===YO}function tb(t,e){return e!==void 0&&GO.has(e.trim().toLowerCase())?!1:FO.test(t.replace(/[_-]+/g," "))}var FO,GO,jO,VO,KO,WO,zO,YO,nb=T(()=>{"use strict";FO=/\b(delete|remove|destroy|erase|drop|terminate|revoke|reset|close account|cancel subscription|purchase|buy|pay|payment|place order|confirm order|send money|send funds|transfer|withdraw|refund)\b/i,GO=new Set(["option","radio"]),jO=["localhost","::1","0:0:0:0:0:0:0:1"],VO="127",KO=4,WO=255;zO=["file:","app:","tauri:"],YO="tauri.localhost"});function qO(t){return Array.isArray(t)||typeof t=="string"}function XO(t){if(Array.isArray(t))return{keys:[...t.slice(0,49).map((n,r)=>String(r)),Xp],total:t.length+1};if(typeof t=="string")return{keys:[Xp],total:1};if(t instanceof Map){let e=[],n=0;for(let r of t.keys())n+=1,typeof r=="string"&&e.length<49&&e.push(r);return t.has(ec)?{keys:e,total:n}:{keys:[...e,ec],total:n+1}}if(t instanceof Set){let e=[];for(let n of t)typeof n=="string"&&e.length<49&&e.push(n);return{keys:[...e,ec],total:t.size+1}}if(typeof t=="object"&&t!==null){let e=Object.keys(t);return{keys:e.slice(0,50),total:e.length}}return{keys:[],total:0}}function pd(t){let{keys:e,total:n}=XO(t);return{found:!1,value:null,availableKeys:e,...n>e.length?{totalKeys:n}:{}}}function rb(t,e){let n=e.split(".").filter(i=>i.length>0),r=t;for(let i of n){if(Xp===i&&qO(r)){r=r.length;continue}if(Array.isArray(r)){let s=Number(i);if(!Number.isInteger(s)||s<0||String(s)!==i||s>=r.length)return pd(r);r=r[s];continue}if(r instanceof Map){if(r.has(i)){r=r.get(i);continue}if(ec===i){r=r.size;continue}return pd(r)}if(r instanceof Set){if(ec===i){r=r.size;continue}if(r.has(i)){r=!0;continue}return pd(r)}if(typeof r=="object"&&r!==null&&Object.hasOwn(r,i)){r=r[i];continue}return pd(r)}return{found:!0,value:r}}function ms(t,e){if(e<0)return t;if(t instanceof Date)return Number.isNaN(t.getTime())?null:t.toISOString();if(t instanceof Set)return e===0?`[Set(${String(t.size)})]`:[...t].map(n=>ms(n,e-1));if(t instanceof Map){if(e===0)return`{Map(${String(t.size)})}`;let n=Object.create(null);for(let[r,i]of t)n[String(r)]=ms(i,e-1);return n}if(Array.isArray(t))return e===0?`[Array(${String(t.length)})]`:t.map(n=>ms(n,e-1));if(typeof t=="object"&&t!==null){let n=Object.keys(t);if(e===0)return`{\u2026${String(n.length)} keys}`;let r=Object.create(null);for(let i of n)r[i]=ms(t[i],e-1);return r}return t}var Xp,ec,ob=T(()=>{"use strict";Xp="length";ec="size"});var tU,nU,ib=T(()=>{"use strict";Nt();tU={[le.ENABLED]:"en",[le.DISABLED]:"dis",[le.CHECKED]:"chk",[le.EXPANDED]:"exp",[le.FOCUSED]:"focus"},nU=new Set([le.PRESENT,le.VISIBLE,le.HIDDEN])});var ti,iU,sU,sb=T(()=>{"use strict";ne();ti={SHARE_PROOF:"share_proof",RUN_HISTORY:"run_history",TEAM_REVIEW:"team_review",CORPUS_HEAL:"corpus_heal",CI_GATE:"ci_gate",HOSTED_RUNNER:"hosted_runner"},iU=o.object({capability:o.nativeEnum(ti),reason:o.string(),unlockedBy:o.string(),learnMoreUrl:o.string().url()}),sU={[ti.SHARE_PROOF]:{reason:"Sharing a verification result with a teammate needs a hosted, linkable proof page.",unlockedBy:"Link a free Reticle Cloud account (reticle login), then share the run."},[ti.RUN_HISTORY]:{reason:"Run history beyond this session lives in the hosted dashboard; local keeps only a buffer.",unlockedBy:"Link a free Reticle Cloud account to keep run history and trends."},[ti.TEAM_REVIEW]:{reason:"A shared review queue of pinned mistakes is a team feature \u2014 it needs a hosted store.",unlockedBy:"Add your team to Reticle Cloud to share a review queue."},[ti.CORPUS_HEAL]:{reason:"Corpus-ranked heal uses refactor outcomes learned across the fleet, served from the cloud.",unlockedBy:"Enable the hosted heal service on Reticle Cloud."},[ti.CI_GATE]:{reason:"Verify-before-merge is a governance gate that runs in your CI against a hosted policy.",unlockedBy:"Configure the Reticle Cloud CI gate for your repository."},[ti.HOSTED_RUNNER]:{reason:"Verifying without a local browser (CI, a background agent, or a deployed URL) needs a browser we run for you.",unlockedBy:"Link a Reticle Cloud account to run verifications on hosted browsers."}}});var tc,ab,cb,ZO,lb,db=T(()=>{"use strict";ne();tc={INSTALL:"install",ONBOARD:"onboard",FIRST_RUN:"first_run"},ab={STARTED:"started",COMPLETED:"completed",FAILED:"failed",ABANDONED:"abandoned",SKIPPED:"skipped"},cb={[tc.INSTALL]:["script_started","runtime_ready","cli_installed","agents_detected","mcp_registered"],[tc.ONBOARD]:["tour_started","concept_shown","first_look","first_act","first_verdict"],[tc.FIRST_RUN]:["project_detected","instrumented","app_connected","driven","flow_recorded","verdict_produced"]},ZO=Object.values(cb).flatMap(t=>[...t]),lb=o.object({phase:o.nativeEnum(tc),step:o.enum(ZO),status:o.nativeEnum(ab),elapsedMs:o.number().int().nonnegative().optional(),reason:o.string().max(64).optional(),stack:o.string().max(64).optional(),unattended:o.boolean().optional()})});var ub,Zp=T(()=>{"use strict";ub={AUTH_REFUSED:"auth_refused",LEASE_EXPIRED:"lease_expired",TAB_GONE:"tab_gone",APP_NOT_REOPENED:"app_not_reopened",CONFIG_ELSEWHERE:"config_elsewhere",NO_LISTENER_NO_CONFIG:"no_listener_no_config",NO_LISTENER:"no_listener",NO_CONFIG:"no_config",SDK_NOT_REACHING_DAEMON:"sdk_not_reaching_daemon"}});var QO,pb,Qp=T(()=>{"use strict";ne();Zp();QO={NO_SESSION:"no_session",NO_MATCH:"no_match",UNSUPPORTED:"unsupported",BAD_ARGS:"bad_args",NOT_READY:"not_ready",OTHER:"other"},pb=o.object({tool:o.string().min(1).max(64),reason:o.nativeEnum(QO),noSessionReason:o.nativeEnum(ub).optional(),retried:o.boolean()})});var fb,JO,ew,Jp,tw,nw,hb,rw,ow,mb,ef=T(()=>{"use strict";ne();fb=o.object({fingerprint:o.string().min(1).max(64),count:o.number().int().nonnegative(),message:o.string().max(300),tool:o.string().max(64).optional()}),JO={NONE:"none",LOCAL_ONLY:"local_only",REMOTE:"remote"},ew={GITHUB:"github",GITLAB:"gitlab",BITBUCKET:"bitbucket",AZURE:"azure",SOURCEHUT:"sourcehut",CODEBERG:"codeberg",SELF_HOSTED:"self_hosted"},Jp=o.object({rssMb:o.number().int().nonnegative(),heapUsedMb:o.number().int().nonnegative(),freeMemMb:o.number().int().nonnegative(),totalMemMb:o.number().int().nonnegative(),load1x100:o.number().int().nonnegative(),cpuCount:o.number().int().nonnegative()}),tw=o.object({totalMs:o.number().int().nonnegative(),maxMs:o.number().int().nonnegative()}),nw=o.object({attempts:o.number().int().nonnegative(),successes:o.number().int().nonnegative(),failures:o.record(o.string(),o.number().int().nonnegative()).optional()}),hb=o.object({durationMs:o.number().int().nonnegative(),toolCalls:o.number().int().nonnegative(),toolCounts:o.record(o.string(),o.number().int().nonnegative()),toolErrors:o.number().int().nonnegative(),errors:o.array(fb).max(40).optional(),sdkFailures:o.number().int().nonnegative().optional(),sdkErrors:o.array(fb).max(40).optional(),verifications:o.number().int().nonnegative(),bugsFound:o.number().int().nonnegative().optional(),bugKinds:o.record(o.string(),o.number().int().nonnegative()).optional(),toolParams:o.record(o.string(),o.record(o.string(),o.number().int().nonnegative())).optional(),connections:o.record(o.string(),nw).optional(),toolTiming:o.record(o.string(),tw).optional(),busyMs:o.number().int().nonnegative().optional(),browserMs:o.number().int().nonnegative().optional(),browserCommands:o.number().int().nonnegative().optional(),peakConcurrentTools:o.number().int().nonnegative().optional(),unknownToolCalls:o.number().int().nonnegative().optional(),unknownTools:o.record(o.string().max(64),o.number().int().nonnegative()).optional(),noSessionErrors:o.number().int().nonnegative().optional(),postSocketFailures:o.number().int().nonnegative().optional(),postRetriesSaved:o.number().int().nonnegative().optional(),consecutiveRepeats:o.record(o.number().int().positive()).optional(),abandonedActions:o.number().int().nonnegative().optional(),machine:Jp.optional(),clients:o.array(o.string().max(64)).max(8).optional(),clientVersions:o.record(o.string().max(64),o.string().max(32)).optional(),surface:o.string().max(32).optional(),appConnects:o.number().int().nonnegative().optional(),msToFirstApp:o.number().int().nonnegative().optional(),endReason:o.enum(["never_used","explored","abandoned","verified","client_left"]).optional(),feedbackPrompted:o.number().int().nonnegative().optional(),errorClasses:o.record(o.string().max(16),o.number().int().nonnegative()).optional(),errorsRecovered:o.number().int().nonnegative().optional(),errorsRepeated:o.number().int().nonnegative().optional(),endedWithVerdict:o.boolean().optional(),updateNudged:o.boolean().optional(),updateOffered:o.string().max(32).optional(),hudControls:o.record(o.number()).optional(),hudViewMs:o.record(o.number()).optional(),hudPanelMs:o.record(o.number()).optional(),hudJourney:o.array(o.string().max(64)).max(60).optional(),hudJourneyCut:o.literal(!0).optional(),final:o.boolean(),exit:o.enum(["idle","signal","unknown"]).optional()}),rw={TINY:"tiny",SMALL:"small",MEDIUM:"medium",LARGE:"large",HUGE:"huge"},ow={NO_APP_FOUND:"no_app_found",MANIFEST_UNRECOGNISED:"manifest_unrecognised",WORKSPACE_APPS_UNRECOGNISED:"workspace_apps_unrecognised",WORKSPACE_ROOT_NO_APPS:"workspace_root_no_apps",DISCOVERY_FAILED:"discovery_failed"},mb=o.object({stack:o.string().min(1).max(64).optional(),stackSource:o.enum(["cwd","workspace"]).optional(),stackUnknownReason:o.nativeEnum(ow).optional(),stackMajor:o.number().int().nonnegative().optional(),size:o.nativeEnum(rw).optional(),monorepo:o.boolean().optional(),git:o.nativeEnum(JO),forge:o.nativeEnum(ew).optional(),ageWeeks:o.number().int().nonnegative().optional(),flowCount:o.number().int().nonnegative(),baselineCount:o.number().int().nonnegative(),visualBaselineCount:o.number().int().nonnegative(),runCount:o.number().int().nonnegative(),hasContract:o.boolean(),initialized:o.boolean().optional(),appConnectedBefore:o.boolean().optional(),capsuleCount:o.number().int().nonnegative(),featuresUsed:o.array(o.string().max(32)).max(24),featureDepth:o.number().min(0).max(1)})});var gb,tf=T(()=>{"use strict";gb={ACTIVE:"active",MISSING:"missing",INVALID:"invalid",EXPIRED:"expired",EVAL:"eval"}});var iw,en,vU,sw,aw,cw,lw,dw,Eb,uw,pw,fw,hw,mw,gw,Ew,bw,Tw,_w,Sw,xw,Aw,RU,bb=T(()=>{"use strict";ne();db();Qp();ef();fs();Xo();fs();tf();iw=3,en={RETICLE_INSTALLED:"reticle_installed",CLI_COMMAND_RUN:"cli_command_run",DAEMON_STARTED:"daemon_started",DAEMON_STOPPED:"daemon_stopped",SESSION_PROGRESS:"session_progress",VERIFICATION_COMPLETED:"verification_completed",PROJECT_PROFILED:"project_profiled",VERSION_CHANGED:"version_changed",RUNTIME_CRASHED:"runtime_crashed",FEEDBACK_SUBMITTED:"feedback_submitted",IDENTIFIED:"identified",MCP_CLIENT_CONNECTED:"mcp_client_connected",APP_INSTRUMENTED:"app_instrumented",MCP_CONNECTION_LOST:"mcp_connection_lost",INIT_COMPLETED:"init_completed",ONBOARDING_STEP:"onboarding_step",BUG_FOUND:"bug_found",TOOL_REFUSED:"tool_refused"},vU=new Set([en.DAEMON_STARTED,en.DAEMON_STOPPED,en.SESSION_PROGRESS,en.MCP_CLIENT_CONNECTED,en.APP_INSTRUMENTED,en.PROJECT_PROFILED,en.VERIFICATION_COMPLETED,en.BUG_FOUND,en.RUNTIME_CRASHED,en.FEEDBACK_SUBMITTED,en.TOOL_REFUSED]),sw={HUMAN:"human",AGENT:"agent"},aw={GIT_ORIGIN:"git_origin",GIT_ROOT:"git_root",PACKAGE_ROOT:"package_root",CWD:"cwd"},cw={HARNESS:"harness"},lw=o.object({via:o.string().min(1).max(64),verified:o.string().min(1).max(16),passed:o.boolean(),falseGreenCaught:o.boolean(),durationMs:o.number().int().nonnegative().optional(),browser:o.string().min(1).max(16).optional(),brand:o.nativeEnum(Ne).optional(),reason:o.nativeEnum($e).optional(),uncleanLoss:o.nativeEnum(Wg).optional(),driven:o.nativeEnum(cw).optional()}),dw=o.object({from:o.string().min(1).max(64),to:o.string().min(1).max(64),nudged:o.boolean().optional(),direction:o.string().min(1).max(16)}),Eb={RETICLE:"reticle",OTHER:"other"},uw=o.object({kind:o.string().min(1).max(32),errorType:o.string().min(1).max(64).optional(),fingerprint:o.string().min(1).max(64).optional(),message:o.string().max(300).optional(),frames:o.array(o.string().max(120)).max(12).optional(),tool:o.string().min(1).max(64).optional(),breadcrumb:o.array(o.string().max(64)).max(12).optional(),nodeVersion:o.string().max(24).optional(),arch:o.string().max(16).optional(),machine:Jp.optional(),syscall:o.string().max(32).optional(),errno:o.string().max(32).optional(),loopback:o.boolean().optional(),port:o.enum([Eb.RETICLE,Eb.OTHER]).optional(),internalFrame:o.string().max(64).optional()}),pw={CONTRADICTION:"contradiction",CRAWL:"crawl",REPLAY:"replay",ASSERTION:"assertion"},fw={APP:"app",REQUEST:"request",RETICLE:"reticle",UNCLASSIFIED:"unclassified"},hw=o.object({source:o.nativeEnum(pw),kind:o.string().min(1).max(64),falseGreen:o.boolean(),tool:o.string().min(1).max(64).optional(),repeat:o.boolean(),attribution:o.nativeEnum(fw),fingerprint:o.string().max(16).optional()}),mw=o.object({reconnect:o.boolean(),daemonAgeMs:o.number().int().nonnegative(),client:o.string().min(1).max(64).optional(),appConnected:o.boolean().optional()}),gw=o.object({initialized:o.boolean(),agentAttached:o.boolean(),msToFirstApp:o.number().int().nonnegative()}),Ew={FIRST:"first",BUDGET_SPENT:"budget_spent",RECOVERED:"recovered"},bw={SSE_ENDED:"sse_ended",DAEMON_SHUTDOWN:"daemon_shutdown",SSE_ERROR:"sse_error",SSE_ABORTED:"sse_aborted",SSE_CLOSED:"sse_closed",CONNECT_ERROR:"connect_error",OTHER:"other"},Tw=o.object({stage:o.nativeEnum(Ew),reason:o.nativeEnum(bw),attempts:o.number().int().nonnegative(),pendingLost:o.number().int().nonnegative().optional()}),_w={SKILL_FILE:"skill_file",NPX_SKILL:"npx_skill",PLUGIN:"plugin",DOCS_SITE:"docs_site",README:"readme",CLI_DIRECT:"cli_direct",UNKNOWN:"unknown"},Sw={CONTAINER:"container",HOSTED_WORKSPACE:"hosted_workspace",NO_TTY:"no_tty"},xw={CONNECTED:"connected",NO_DAEMON:"no_daemon",NO_SESSION:"no_session",NO_PAGE:"no_page"},Aw=o.object({ok:o.boolean(),reason:o.string().max(64).optional(),stack:o.string().max(64).optional(),mcpRegistered:o.boolean().optional(),confirmation:o.nativeEnum(xw).optional()}),RU=o.object({v:o.literal(iw),anonymousId:o.string().min(1).max(128),projectId:o.string().min(1).max(128).optional(),sessionId:o.string().min(1).max(64).optional(),event:o.nativeEnum(en),ts:o.number().int().nonnegative(),version:o.string().min(1).max(64),ci:o.boolean(),automation:o.nativeEnum(Sw).optional(),projectIdSource:o.nativeEnum(aw).optional(),os:o.string().min(1).max(32),tzOffsetMin:o.number().int().min(-900).max(900).optional(),feedback:LE.optional(),actor:o.nativeEnum(sw).optional(),command:o.string().min(1).max(32).optional(),flags:o.array(o.string().max(32)).max(16).optional(),session:hb.optional(),project:mb.optional(),verification:lw.optional(),versionChange:dw.optional(),crash:uw.optional(),identity:kE.optional(),connection:mw.optional(),init:Aw.optional(),onboarding:lb.optional(),bug:hw.optional(),refusal:pb.optional(),outage:Tw.optional(),instrumentation:gw.optional(),installSource:o.nativeEnum(_w).optional(),licenseId:o.string().min(1).max(64).optional(),licenseStatus:o.nativeEnum(gb).optional(),licenseKeyPresent:o.boolean().optional()})});var Tb=T(()=>{"use strict"});var CU,_b=T(()=>{"use strict";ip();CU={SESSIONS:"reticle_sessions",LOOK:"reticle_look",SNAPSHOT:"reticle_snapshot",QUERY:"reticle_query",INSPECT:"reticle_inspect",ACT:os.ACT,ACT_SEQUENCE:os.ACT_SEQUENCE,ACT_AND_WAIT:os.ACT_AND_WAIT,OBSERVE:"reticle_observe",LINEAGE:"reticle_lineage",WAIT_FOR:"reticle_wait_for",NETWORK:"reticle_network",CONSOLE:"reticle_console",ANIMATIONS:"reticle_animations",ASSERT:"reticle_assert",RECONCILE:"reticle_reconcile",BASELINE_SAVE:"reticle_baseline_save",BASELINE_LIST:"reticle_baseline_list",DIFF:"reticle_diff",RECORD_START:"reticle_record_start",RECORD_STOP:"reticle_record_stop",REPLAY:"reticle_replay",EXPLORE:"reticle_explore",NARRATE:"reticle_narrate",CLOCK:"reticle_clock",STATE:"reticle_state",STORAGE:"reticle_storage",CAPABILITIES:"reticle_capabilities",CONTRACT_SAVE:"reticle_contract_save",DOMAIN:"reticle_domain",FLOW_SAVE:"reticle_flow_save",FLOW_LIST:"reticle_flow_list",FLOW_LOAD:"reticle_flow_load",FLOW_DELETE:"reticle_flow_delete",FLOW_REPLAY:"reticle_flow_replay",FLOW_VERIFY:"reticle_flow_verify",FLOW_SAVE_RECORDED:"reticle_flow_save_recorded",FLOW_HEAL:"reticle_flow_heal",FLOW_MUTATE:"reticle_flow_mutate",ANNOTATE:"reticle_annotate",AFFECTED:"reticle_affected",COVERAGE:"reticle_coverage",VERIFY_CHANGE:"reticle_verify_change",VERIFY_EXPLORE:"reticle_verify_explore",INTENT:"reticle_intent",CONTEXT:"reticle_context",VERIFY:"reticle_verify",PROJECT:"reticle_project",MEMORY:"reticle_memory",RUN_RECORD:"reticle_run_record",SCREENSHOT:"reticle_screenshot",NETWORK_MOCK:"reticle_network_mock",VIEWPORT:"reticle_viewport",VISUAL_DIFF:"reticle_visual_diff",CRAWL:"reticle_crawl",SCROLL_TO:"reticle_scroll_to",SESSION_TUNE:"reticle_session_tune",END_SESSION:"reticle_end_session",YIELD:"reticle_yield",RESUME:"reticle_resume",MESSAGES:"reticle_messages",REVIEW:"reticle_review",WAIT_READY:"reticle_wait_ready",NAVIGATE:"reticle_navigate",REFRESH:"reticle_refresh",RUN_EXPORT:"reticle_run_export",BASELINE:"reticle_baseline",SESSION:"reticle_session",RECORD:"reticle_record",FLOW:"reticle_flow",LEASE:"reticle_lease",LEASE_ACQUIRE:"reticle_lease_acquire",LEASE_RELEASE:"reticle_lease_release",TOOLS:"reticle_tools",RUN:"reticle_run",FEEDBACK:"reticle_feedback"}});var Sb=T(()=>{"use strict"});var xb=T(()=>{"use strict"});var $U,UU,HU,Ab=T(()=>{"use strict";Ya();fs();sd();$U={[Jr.WEB]:{surface:Qt.WEB,isDesktopShell:!1,usesWebKit:!1,ownsCoverageKinds:!1,hasOwnBaselineDirectory:!1},[Jr.ELECTRON]:{surface:Qt.DESKTOP,isDesktopShell:!0,projectMarker:{dependency:"electron"},usesWebKit:!1,ownsCoverageKinds:!0,hasOwnBaselineDirectory:!0},[Jr.TAURI]:{surface:Qt.DESKTOP,isDesktopShell:!0,projectMarker:{file:"src-tauri/tauri.conf.json"},usesWebKit:!0,ownsCoverageKinds:!1,hasOwnBaselineDirectory:!0}},UU={[Jr.WEB]:Mn.WEB,[Jr.ELECTRON]:Mn.WEBVIEW,[Jr.TAURI]:Mn.WEBVIEW},HU={[Qt.WEB]:{reset:"cheap",replayPrefix:"free",time:"injectable",observation:"exact",actions:"reversible"},[Qt.DESKTOP]:{reset:"cheap",replayPrefix:"free",time:"injectable",observation:"exact",actions:"reversible"},[Qt.MOBILE]:{reset:"costly",replayPrefix:"costly",time:"wall",observation:"exact",actions:"reversible"},[Qt.SERVICE]:{reset:"costly",replayPrefix:"unsafe",time:"wall",observation:"exact",actions:"irreversible"},[Qt.GAME]:{reset:"cheap",replayPrefix:"free",time:"stepped",observation:"exact",actions:"reversible"},[Qt.DEVICE]:{reset:"costly",replayPrefix:"unsafe",time:"wall",observation:"sampled",actions:"irreversible"}}});var Rb,yw,vw,yb,Rw,Nb,Nw,vb,Ow,ww,Cw,Ob,wb=T(()=>{"use strict";ne();Rb=o.object({calls:o.number().int().nonnegative(),verdicts:o.number().int().nonnegative(),passed:o.number().int().nonnegative(),failed:o.number().int().nonnegative(),unknown:o.number().int().nonnegative(),refusals:o.number().int().nonnegative(),marks:o.number().int().nonnegative(),sessions:o.number().int().nonnegative(),tokensReturned:o.number().int().nonnegative(),drivingMs:o.number().int().nonnegative()}),yw=o.object({date:o.string(),counts:Rb}),vw=o.object({longestRunMs:o.number().int().nonnegative(),bestVerdictDay:o.number().int().nonnegative(),bestDefectDay:o.number().int().nonnegative(),streakDays:o.number().int().nonnegative(),bestStreakDays:o.number().int().nonnegative()}),yb=o.object({value:o.number().nonnegative(),basis:o.string()}),Rw=o.object({tokens:yb,minutes:yb}),Nb=10,Nw=o.object({at:o.number().int().nonnegative(),title:o.string(),detail:o.string().optional(),source:o.string().optional()}),vb=o.object({counts:Rb,days:o.array(yw),records:vw,savings:Rw,since:o.number().int().nonnegative(),defects:o.array(Nw).default([])}),Ow=o.object({signedIn:o.boolean(),org:o.string().optional(),email:o.string().optional(),host:o.string().optional()}),ww=o.object({claimed:o.boolean(),expiresAt:o.number().optional(),daysRemaining:o.number().optional(),claimUrl:o.string().optional(),drivable:o.boolean().optional(),eligible:o.boolean().optional()}),Cw=o.object({provider:o.string(),harnessEnabled:o.boolean(),harnessEntitled:o.boolean()}),Ob=o.object({schemaVersion:o.number().int().positive(),project:vb,global:vb,projectName:o.string().optional(),dashboardUrl:o.string().optional(),account:Ow.optional(),harnessOffer:ww.optional(),harnessConfig:Cw.optional()})});var Cb=T(()=>{"use strict"});function gs(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619)>>>0;return e.toString(16).padStart(8,"0")}function Ib(t){let e=Object.keys(t).sort().map(n=>`${n}:${[...t[n]??[]].sort().join(",")}`).join("|");return gs(e)}var nf,nc,Lb=T(()=>{"use strict";Nt();nf=Ib({messageKinds:Object.values(ft),commands:Object.values(C),actions:Object.values(v),events:Object.values(b)}),nc={commands:Object.values(C),events:Object.values(b),actions:Object.values(v)}});var kb,Db=T(()=>{"use strict";kb="[Reticle] this page could not open a websocket to "});var P=T(()=>{"use strict";Qm();tE();nE();rE();Nt();iE();aE();lE();Xo();dE();uE();Dp();Mp();bE();_E();SE();Wp();DE();ME();Ka();ip();eE();ap();PE();yp();vp();UE();od();HE();BE();qr();Np();wp();Cp();Ip();FE();VE();WE();zE();YE();qE();XE();ZE();QE();JE();nb();Gp();ob();ib();sb();bb();Zp();Qp();Tb();_b();Sb();sd();ad();xb();Ab();ef();tf();fs();wb();Cb();Lb();Db()});function ni(t){let e=U.MAX_REF_LENGTH;return e>=t.length?t:`${t.slice(0,e)}${Iw}`}function Dw(t){try{let e=t?.getItem(Ub),n=e==null?Number.NaN:Number(e);return Number.isSafeInteger(n)&&n>0?n:0}catch{return 0}}var $b,Iw,rf,Lw,Ub,kw,oc,je,ic,ur,Es,bs,Ts,pr,Hb,of,Bb,rc,X,gt=T(()=>{"use strict";P();$b=1e4,Iw="\u2026",rf="e";Lw=1e3,Ub="__reticle_ref_base",kw=100;rc=class{constructor(e=()=>globalThis.sessionStorage){m(this,pr);m(this,oc,new WeakMap);m(this,je,new Map);m(this,ic);m(this,ur,0);m(this,Es,0);m(this,bs,0);m(this,Ts,0);u(this,ic,e)}get size(){return c(this,je).size}markEdited(){u(this,Ts,c(this,ur))}mintedBeforeLastEdit(e){if(c(this,Ts)===0||!e.startsWith(rf))return!1;let n=Number(e.slice(rf.length));return Number.isSafeInteger(n)&&n>0&&n<=c(this,Ts)}refFor(e){let n=c(this,oc).get(e);if(n!==void 0){let i=c(this,je).get(n);return c(this,je).delete(n),c(this,je).set(n,i??new WeakRef(e)),n}c(this,ur)>=c(this,Es)&&h(this,pr,Hb).call(this),u(this,ur,c(this,ur)+1);let r=$E(`${rf}${String(c(this,ur))}`);return c(this,oc).set(e,r),c(this,je).set(r,new WeakRef(e)),u(this,bs,c(this,bs)+1),c(this,bs)>=Lw?(u(this,bs,0),h(this,pr,Bb).call(this)):c(this,je).size>$b&&h(this,pr,of).call(this),r}resolve(e){let n=c(this,je).get(e);if(n===void 0)return null;let r=n.deref();return r===void 0||!r.isConnected?(c(this,je).delete(e),null):(c(this,je).delete(e),c(this,je).set(e,n),r)}};oc=new WeakMap,je=new WeakMap,ic=new WeakMap,ur=new WeakMap,Es=new WeakMap,bs=new WeakMap,Ts=new WeakMap,pr=new WeakSet,Hb=function(){let e;try{e=c(this,ic).call(this)}catch{e=void 0}let n=Math.max(Dw(e),c(this,ur));u(this,Es,n+kw);try{e?.setItem(Ub,String(c(this,Es)))}catch{}u(this,ur,n)},of=function(){let e=c(this,je).keys().next();e.done!==!0&&c(this,je).delete(e.value)},Bb=function(){for(let[e,n]of c(this,je)){let r=n.deref();(r===void 0||!r.isConnected)&&c(this,je).delete(e)}for(;c(this,je).size>$b;)h(this,pr,of).call(this)};X=new rc});function qb(t,e){if(t===null||typeof t!="object")return;let r=(t.ownerDocument??t).defaultView;if(r!=null)return r[e]}function fr(t,e,n){let r=qb(t,e)??n;return typeof r=="function"&&t instanceof r}function Zb(t){let e=wt(t)?"HTMLTextAreaElement":"HTMLInputElement",n=qb(t,e);if(typeof n!="function")return;let r=n.prototype;return typeof r=="object"&&r!==null?r:void 0}var hr,uf,Dt,Oe,wt,Un,cc,Xb,md,mr=T(()=>{"use strict";hr=t=>fr(t,"Element",typeof Element>"u"?void 0:Element),uf=t=>fr(t,"HTMLImageElement",typeof HTMLImageElement>"u"?void 0:HTMLImageElement),Dt=t=>fr(t,"HTMLElement",typeof HTMLElement>"u"?void 0:HTMLElement),Oe=t=>fr(t,"HTMLInputElement",typeof HTMLInputElement>"u"?void 0:HTMLInputElement),wt=t=>fr(t,"HTMLTextAreaElement",typeof HTMLTextAreaElement>"u"?void 0:HTMLTextAreaElement),Un=t=>fr(t,"HTMLSelectElement",typeof HTMLSelectElement>"u"?void 0:HTMLSelectElement),cc=t=>fr(t,"HTMLButtonElement",typeof HTMLButtonElement>"u"?void 0:HTMLButtonElement),Xb=t=>fr(t,"HTMLFormElement",typeof HTMLFormElement>"u"?void 0:HTMLFormElement),md=t=>fr(t,"HTMLIFrameElement",typeof HTMLIFrameElement>"u"?void 0:HTMLIFrameElement)});function Qb(t){return(t.match(/-?\d*\.?\d+(?:e[-+]?\d+)?|NaN|Infinity|-Infinity/gi)??[]).map(n=>Number(n))}function Ww(t){return/NaN|Infinity/i.test(t)?!0:Qb(t).some(e=>!Number.isFinite(e))}function zw(t){let e=Qb(t).filter(s=>Number.isFinite(s));if(e.length===0)return!0;let n=e.filter((s,a)=>a%2===0),r=e.filter((s,a)=>a%2===1),i=s=>s.every(a=>a===s[0]);return n.length>1&&i(n)&&i(r)}function gd(t){let e=[],n=0;for(let i of Vw)for(let s of Array.from(t.querySelectorAll(i)))for(let a of Kw){let l=s.getAttribute(a);if(l===null)continue;n+=1;let d=l.length>120?`${l.slice(0,120)}\u2026`:l;Ww(l)?e.push({kind:"non-finite-coordinates",tag:i,attr:a,sample:d}):l.trim().length===0?e.push({kind:"empty-geometry",tag:i,attr:a,sample:d}):zw(l)&&e.push({kind:"degenerate-geometry",tag:i,attr:a,sample:d})}let r=t.querySelectorAll("canvas").length>0;return{examined:n,findings:e,canvas:r}}function Jb(t,e){let n=e.Chart?.getChart?.(t);if(n!=null)return{library:"chartjs",data:n.data??null};let r=e.echarts?.getInstanceByDom?.(t);return r!=null?{library:"echarts",data:r.getOption?.()??null}:null}var Vw,Kw,pf=T(()=>{"use strict";Vw=["path","polyline","polygon"],Kw=["d","points"]});function lc(t,e,n){let r=Math.max(0,Math.min(n,e.remainingCharacters));if(t.length<=r)return e.remainingCharacters-=t.length,t;e.truncatedValues+=1;let i=r<=dc.length?dc.slice(0,r):`${t.slice(0,r-dc.length)}${dc}`;return e.remainingCharacters-=i.length,i}function uc(t,e,n,r){if(r!==void 0&&He(r))return Ae;if(n>U.MAX_SERIALIZE_DEPTH||e.nodes>=xs)return e.truncatedValues+=1,dc;if(e.nodes+=1,t===null||typeof t=="boolean")return t;if(typeof t=="string")return lc(t,e,r?.toLowerCase()==="error"?U.MAX_ERROR_LENGTH:U.MAX_STRING_LENGTH);if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="bigint")return t.toString();if(typeof t>"u"||typeof t=="function"||typeof t=="symbol")return As;if(t instanceof Date)return Number.isNaN(t.getTime())?null:t.toISOString();if(t instanceof Map){let i=Object.create(null),s=0;for(let[a,l]of t){if(e.nodes>=xs||s>=U.MAX_COLLECTION_ITEMS){e.droppedItems+=t.size-s;break}let d=lc(typeof a=="string"?a:String(a),e,eT),p=uc(l,e,n+1,d);p!==As&&(i[d]=p),s+=1}return i}if(t instanceof Set){let i=[],s=0;for(let a of t){if(e.nodes>=xs||s>=U.MAX_COLLECTION_ITEMS){e.droppedItems+=t.size-s;break}let l=uc(a,e,n+1);i.push(l===As?null:l),s+=1}return i}if(ArrayBuffer.isView(t)&&!(t instanceof DataView)){let i=t.length,s=[],a=0;for(let l of t){if(e.nodes>=xs||a>=U.MAX_COLLECTION_ITEMS){e.droppedItems+=i-a;break}s.push(l),e.nodes+=1,a+=1}return s}if(t instanceof Error)return{name:lc(t.name,e,256),message:lc(t.message,e,U.MAX_ERROR_LENGTH)};if(e.seen.has(t))return"[CIRCULAR]";e.seen.add(t);try{if(Array.isArray(t)){let d=[],p=t.slice(0,U.MAX_COLLECTION_ITEMS);e.droppedItems+=Math.max(0,t.length-p.length);for(let f of p){if(e.nodes>=xs){e.droppedItems+=1;continue}let E=uc(f,e,n+1);if(e.nodes>=xs){e.droppedItems+=1;continue}d.push(E===As?null:E)}return d}let i=Object.create(null),s=Object.keys(t),a=s.slice(0,U.MAX_OBJECT_KEYS);e.droppedItems+=Math.max(0,s.length-a.length);let l=a.map(d=>{try{let p=t[d];return{key:d,value:p,scalar:p===null||typeof p!="object",ok:!0}}catch{return{key:d,value:void 0,scalar:!0,ok:!1}}});for(let d of[...l.filter(p=>p.scalar),...l.filter(p=>!p.scalar)]){let p=lc(d.key,e,eT);if(!d.ok){i[p]=ff;continue}try{let f=uc(d.value,e,n+1,d.key);f!==As&&(i[p]=f)}catch{i[p]=ff}}return i}finally{e.seen.delete(t)}}function hf(t){return pc(t).value}function pc(t){let e={seen:new WeakSet,remainingCharacters:Yw,nodes:0,droppedItems:0,truncatedValues:0},n=uc(t,e,0),r=n===As?null:n;if(e.droppedItems===0&&e.truncatedValues===0)return{value:r};let i=[];return e.droppedItems>0&&i.push(`${e.droppedItems} item(s) dropped`),e.truncatedValues>0&&i.push(`${e.truncatedValues} value(s) truncated`),{value:r,truncation:{droppedItems:e.droppedItems,truncatedValues:e.truncatedValues,note:`partial \u2014 ${i.join(", ")}; this is NOT the whole value. Scope the read with \`path\`/\`depth\` to see the rest.`}}}function Hn(t){try{return JSON.stringify(hf(t))}catch{return JSON.stringify(ff)}}var dc,ff,As,eT,Yw,xs,Bn=T(()=>{"use strict";P();dc="[TRUNCATED]",ff="[UNSERIALIZABLE]",As=Symbol("omit"),eT=256,Yw=Math.floor(U.MAX_MESSAGE_BYTES/4),xs=U.MAX_COLLECTION_ITEMS*5});function qw(t){if(t===null)return;let e=/^(.*):(\d+):(\d+)$/.exec(t);if(e===null)return;let n=e[1],r=Number(e[2]);if(!(n===void 0||n.length===0||!Number.isFinite(r)))return{file:n,line:r}}function fc(t){let e=t.closest(`[${mf}]`);return e!==null?qw(e.getAttribute(mf)):void 0}function Ed(t,e){return e!==void 0?{file:e.file,line:e.line}:fc(t)}function tT(t){return t.querySelector(`[${mf}]`)!==null}function bd(t){return t===void 0?void 0:`${t.file}:${String(t.line)}`}var mf,hc=T(()=>{"use strict";P();mf=td});function Qw(t){let e=t.type.toLowerCase();return Zw.has(e)?"textbox":e==="checkbox"?"checkbox":e==="radio"?"radio":e==="range"?"slider":e==="number"?"spinbutton":e==="submit"||e==="button"||e==="reset"?"button":"textbox"}function Jw(t){let e=t.getAttribute("aria-label");if(e!==null&&e.trim().length>0)return!0;let n=t.getAttribute("aria-labelledby");if(n!==null&&n.trim().length>0)return!0;let r=t.getAttribute("title");return r!==null&&r.trim().length>0}function we(t){let e=t.getAttribute("role");if(e!==null&&e.trim().length>0)return e.trim();switch(t.tagName.toLowerCase()){case"a":return t.hasAttribute("href")?"link":"generic";case"button":return"button";case"input":return Qw(t);case"textarea":return"textbox";case"select":return t.multiple?"listbox":"combobox";case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"heading";case"ul":case"ol":return"list";case"li":return"listitem";case"nav":return"navigation";case"main":return"main";case"aside":return"complementary";case"dialog":return"dialog";case"img":return"img";case"table":return"table";case"tr":return"row";case"tbody":case"thead":case"tfoot":return"rowgroup";case"td":return t.closest('[role~="grid"], [role~="treegrid"]')!==null?"gridcell":"cell";case"th":{let r=(t.getAttribute("scope")??"").toLowerCase();return r==="row"||r==="rowgroup"?"rowheader":"columnheader"}case"option":return"option";case"optgroup":return"group";case"section":return Jw(t)?"region":"generic";case"article":return"article";case"fieldset":return"group";case"details":return"group";case"summary":return"button";case"progress":return"progressbar";case"meter":return"meter";case"output":return"status";case"hr":return"separator";case"area":return t.hasAttribute("href")?"link":"generic";case"form":return"form";case"p":return"paragraph";case"header":return"banner";case"footer":return"contentinfo";default:return"generic"}}function mc(t){return t.replace(/\s+/g," ").trim()}function eC(t){let e=t.getAttribute("aria-labelledby");if(e===null)return null;let n=[];for(let i of e.split(/\s+/)){let s=t.ownerDocument.getElementById(i);s!==null&&n.push(mc(Td(s)))}let r=n.join(" ").trim();return r.length>0?r:null}function Td(t){if(t.nodeType===Node.TEXT_NODE)return t.textContent??"";if(t.nodeType!==Node.ELEMENT_NODE)return"";let e=t;if(e.getAttribute("aria-hidden")==="true")return"";if(uf(e)){let r=e.getAttribute("alt");return r===null?"":r}let n=[];for(let r of e.childNodes){let i=Td(r);i.length>0&&n.push(i)}return n.join(" ")}function Ee(t){let e=eC(t);if(e!==null)return e;let n=t.getAttribute("aria-label");if(n!==null&&n.trim().length>0)return n.trim();if(uf(t)){let i=t.getAttribute("alt");if(i!==null)return i.trim()}if(Oe(t)||wt(t)||Un(t)){let i=t.labels;if(i!==null&&i.length>0){let s=[...i].map(a=>mc(Td(a))).join(" ").trim();if(s.length>0)return s}if(Oe(t)){let s=t.type.toLowerCase();if(s==="submit"||s==="button"||s==="reset"){let a=mc(t.value);if(a.length>0)return a}}if(Oe(t)||wt(t)){let s=t.getAttribute("placeholder");if(s!==null&&s.trim().length>0)return s.trim()}}if(Xw.has(we(t))){let i=mc(Td(t));if(i.length>0)return i}let r=t.getAttribute("title");return r!==null&&r.trim().length>0?r.trim():""}function gf(t,e){let n=t.getAttribute(e);if(n!==null)return n==="true"}function gr(t,e=nt(t)){let n=[le.PRESENT];n.push(e?le.VISIBLE:le.HIDDEN);let i=(cc(t)||Oe(t)||Un(t)||wt(t))&&t.disabled||gf(t,"aria-disabled")===!0;return n.push(i?le.DISABLED:le.ENABLED),(Oe(t)&&(t.type==="checkbox"||t.type==="radio")&&t.checked||gf(t,"aria-checked")===!0)&&n.push(le.CHECKED),gf(t,"aria-expanded")===!0&&n.push(le.EXPANDED),t.ownerDocument.activeElement===t&&n.push(le.FOCUSED),n}function Ef(t){if(!Oe(t)&&!wt(t)&&!Un(t))return!1;let e=t.getAttribute("autocomplete")??"",n=[t.getAttribute("name")??"",t.id,t.getAttribute("data-testid")??"",t.getAttribute("aria-label")??""],r=/current-password|new-password|cc-number|cc-csc|one-time-code/i.test(e);return Oe(t)&&t.type.toLowerCase()==="password"||r||n.some(He)}function bf(t){return Oe(t)||wt(t)||Un(t)?Ef(t)?Ae:t.value:t.getAttribute("aria-valuenow")??void 0}function tC(t){if(t.getAttribute("aria-hidden")==="true"||Dt(t)&&t.hidden)return!0;let e=t.ownerDocument.defaultView;if(e!==null){let n=e.getComputedStyle(t);if(n.display==="none"||n.visibility==="hidden"||n.visibility==="collapse"||Number.parseFloat(n.opacity||"1")===0)return!0}return!1}function Tf(t,e){if(!nt(t,e))return!1;let n=t.ownerDocument.defaultView;if(n===null)return!1;let r=t.getBoundingClientRect();return r.width<=0||r.height<=0?!1:r.bottom>0&&r.right>0&&r.top<n.innerHeight&&r.left<n.innerWidth}function nt(t,e){if(!t.isConnected)return!1;let n=e?.get(t);if(n!==void 0)return n;let r=t.parentElement,i=!tC(t)&&(r===null||nt(r,e));return e!==void 0&&e.set(t,i),i}function nC(t){let e=mc(t.textContent??"");return e.length>nT?`${e.slice(0,nT)}\u2026`:e}function Fn(t,e){let n=bf(t),r=nC(t),i=Ee(t),s=nt(t,e),a={ref:X.refFor(t),role:we(t),name:i,states:gr(t,s),visible:s};n!==void 0&&n.length>0&&(a.value=n),r.length>0&&r!==i&&(a.text=r);let l=bd(fc(t));if(l!==void 0&&(a.source=l),t.querySelector("path, polyline, polygon")!==null){let d=gd(t).findings;d.length>0&&(a.chart=d)}return a}var Xw,Zw,nT,Mt=T(()=>{"use strict";P();mr();gt();pf();Bn();hc();Xw=new Set(["button","link","heading","option","listitem","cell","checkbox","columnheader","radio","row","rowheader","tab","tooltip","menuitem","menuitemcheckbox","menuitemradio","treeitem","gridcell","switch","status","alert"]),Zw=new Set(["text","email","tel","url","search","password",""]);nT=80});function lT(t){let e=[],n=new Set,r;try{r=t.querySelectorAll(SC)}catch{return e}for(let i=0;i<r.length&&e.length<xC;i+=1){let s=r[i]?.getAttribute(cT);if(s==null)continue;let a=s.trim();a.length===0||n.has(a)||a.startsWith(AC)||(n.add(a),e.push(a))}return e}var cT,SC,xC,AC,dT=T(()=>{"use strict";cT="data-testid",SC=`[${cT}]`,xC=200,AC="reticle-"});var Sf,yC,Gn,gc=T(()=>{"use strict";Sf=globalThis,yC=typeof Sf.console?.warn=="function"?Sf.console.warn.bind(Sf.console):null,Gn=(...t)=>{yC?.(...t)}});function fT(t){return xf.add(t),()=>xf.delete(t)}function vC(t){if(t===null||typeof t!="object"&&typeof t!="function")return!1;let e=t;return typeof e.getState=="function"&&typeof e.subscribe=="function"}function hT(t,e,n){if(OC(t,e),vC(e)){let r=()=>e.getState(),i=s=>e.subscribe(s);ys.set(t,r),Sd.set(t,i),uT(t,r,i);return}if(typeof e!="function"){let r=typeof e=="object"&&e!==null&&"subscribe"in e;Gn(`[reticle] store "${t}" is neither a getter function nor a {getState, subscribe} store`+(r?" \u2014 it has subscribe but no getState. Wrap it with an adapter or add getState.":"."));return}if(ys.set(t,e),n!==void 0){Sd.set(t,n),uT(t,e,n);return}NC(t)}function uT(t,e,n){for(let r of xf)try{r([t,e,n])}catch{}}function mT(t){ys.delete(t),Sd.delete(t)}function no(){return[...ys.keys()]}function gT(){let t=[];for(let[e,n]of Sd){let r=ys.get(e);r!==void 0&&t.push([e,r,n])}return t}function yf(t){let e={};for(let[n,r]of ys)if(!(t!==void 0&&n!==t))try{e[n]=r()}catch(i){e[n]={__error:i instanceof Error?i.message:String(i)}}return e}function ET(t){return Ec(t).stores}function Ec(t){let e={},n={};for(let[r,i]of Object.entries(yf(t))){let s=pc(i);e[r]=s.value,s.truncation!==void 0&&(n[r]=s.truncation)}return Object.keys(n).length>0?{stores:e,truncation:n}:{stores:e}}function NC(t){RC.has(t)||pT.has(t)||(pT.add(t),Gn(`[reticle] store "${t}" was registered without a subscribe function. It can be READ, but its changes are invisible: no STATE_CHANGE events, no state diffs in causal summaries, and a state predicate will never see it update. Pass the store object (or a subscribe callback) to fix.`))}function xd(t,e){bT.set(t,e)}function OC(t,e){if(e===null||typeof e!="object"&&typeof e!="function")return;Af.set(e,t);let n=bT.get(e);n!==void 0&&Af.set(n,t)}function TT(t){if(!(t===null||typeof t!="object"&&typeof t!="function"))return Af.get(t)}var Er,ys,Sd,xf,pT,RC,Af,bT,ri=T(()=>{"use strict";P();gc();Bn();Er=globalThis,ys=Er.__reticleStores??(Er.__reticleStores=new Map),Sd=Er.__reticleStoreSubs??(Er.__reticleStoreSubs=new Map),xf=Er.__reticleStoreListeners??(Er.__reticleStoreListeners=new Set);pT=new Set,RC=new Set([Vl]);Af=new WeakMap,bT=new WeakMap});function _T(){return typeof document>"u"?[]:lT(document)}function ST(){return no().filter(t=>Vl!==t)}function Ad(t,e){let n=[...t];for(let r of e)n.includes(r)||n.push(r);return n}function wC(){return{testids:[],signals:[],stores:[],flows:[]}}function Rf(t,e){if(e!==void 0)for(let n of e)t.includes(n)||t.push(n)}function yd(t){xT=t}function vs(t){if(Rf(Ct.testids,t.testids),Rf(Ct.signals,t.signals),Rf(Ct.stores,t.stores),t.flows!==void 0)for(let e of t.flows){let n=Ct.flows.find(r=>r.name===e.name);n===void 0?Ct.flows.push({name:e.name,steps:[...e.steps]}):n.steps=[...e.steps]}xT?.()}function ro(){return{testids:Ad(Ct.testids,_T()),signals:[...Ct.signals],stores:Ad(Ct.stores,ST()),flows:Ct.flows.map(t=>({name:t.name,steps:[...t.steps]})),...Xm()?{presenterExposed:!0}:{}}}function AT(){return[...Ct.testids]}function vd(){return Ct.signals.length>0||Ct.flows.length>0||Ad(Ct.testids,_T()).length>0||Ad(Ct.stores,ST()).length>0}var vf,Ct,xT,oo=T(()=>{"use strict";P();et();dT();ri();vf=globalThis;Ct=vf.__reticleCapabilities??(vf.__reticleCapabilities=wC())});function yT(t){Rs.some(e=>e.name===t.name)||Rs.push(t)}function jn(t){for(let e of Rs){let n=e.identify(t);if(n!==null)return n}return null}function Rd(t){for(let e of Rs){if(e.readState===void 0)continue;let n=e.readState(t);if(n!==void 0)return n}}function Nd(t){for(let e of Rs)if(e.hasHoverHandlers!==void 0&&e.hasHoverHandlers(t))return!0;return!1}function Od(){return Rs.map(t=>t.name)}var Nf,Rs,oi=T(()=>{"use strict";Nf=globalThis,Rs=Nf.__reticleAdapters??(Nf.__reticleAdapters=[])});function Id(){return If>0}function Be(t){If+=1;try{return t()}finally{If-=1}}var If,ws=T(()=>{"use strict";If=0});var tn,$T,rI,UT,HT,Dd,z,pe,BT,FT,GT,so,jT,Ve=T(()=>{"use strict";tn=globalThis,$T=typeof tn.setTimeout=="function"?tn.setTimeout.bind(tn):null,rI=typeof tn.clearTimeout=="function"?tn.clearTimeout.bind(tn):null,UT=typeof tn.requestAnimationFrame=="function"?tn.requestAnimationFrame.bind(tn):null,HT=typeof tn.performance?.now=="function"?tn.performance.now.bind(tn.performance):null,Dd=()=>HT?HT():0,z=(t,e=0)=>$T?$T(t,e):0,pe=t=>{rI?.(t)},BT=(t,e)=>{let n=!1,r=0,i=()=>{n||(t(),!n&&(r=z(i,e)))};return r=z(i,e),()=>{n=!0,pe(r)}},FT=200,GT=(t=FT)=>new Promise(e=>{let n=!1,r=s=>{n||(n=!0,pe(i),e({settled:s}))},i=z(()=>r(!1),t);UT?UT(()=>r(!0)):z(()=>r(!0),0)}),so=()=>GT().then(()=>{}),jT=async(t=FT)=>(await Promise.resolve(),GT(t))});function P_(t,e){return`${kb}${t}. ${String(e)} attempts, all failed. That is everything the page can see: from inside the browser it cannot tell a daemon that is not there from one it is not allowed to reach, so this is not evidence about the daemon. What answers it: run \`npx @reticlehq/server status\` to see whether one is listening and on which port. If your app runs in a container, devcontainer or WSL, the daemon is on a different host, so set the URL explicitly (Vite: VITE_RETICLE_WS_URL, or reticle.connect({ url })). An https page cannot open a ws:// socket at all. Still retrying\u2026`}function $_(t,e){return`no bridge at ${t} \u2014 ${String(e)} attempt${e===1?"":"s"}`}var Wf=T(()=>{"use strict";P()});var Ke,Pt,rh=T(()=>{"use strict";Ke={READ:"read",ACT:"act",NARRATION:"narration",HUMAN:"human"},Pt={PASS:"pass",FAIL:"fail"}});function Lc(t){switch(t){case v.CLICK:case v.DBLCLICK:return"Clicking";case v.FILL:case v.TYPE:return"Typing into";case v.HOVER:return"Hovering";case v.SELECT:return"Selecting";case v.SUBMIT:return"Submitting";case v.CHECK:case v.UNCHECK:return"Toggling";case v.UPLOAD:return"Uploading to";case v.DRAG:return"Dragging";default:return t}}var oh=T(()=>{"use strict";P()});function yr(t){return typeof t=="string"&&t.length>0}function V1(t){return`${t.file.split("/").pop()??t.file}:${t.line}`}function lx(t){if(yr(t.testid))return{strategy:Sn.TESTID,value:t.testid,stable:!0};if(yr(t.component)&&t.source!==void 0)return{strategy:Sn.COMPONENT,value:`${t.component}@${V1(t.source)}`,stable:!0};if(yr(t.component)&&(yr(t.role)||yr(t.name))){let e=yr(t.name)?t.name:t.role;return{strategy:Sn.COMPONENT,value:`${t.component}[${e??""}]`,stable:!0}}if(yr(t.role)&&yr(t.name))return{strategy:Sn.ROLE,value:`${t.role}:${t.name}`,stable:!1};if(yr(t.role)){let e=t.nth!==void 0?`#${t.nth}`:"";return{strategy:Sn.ROLE,value:`${t.role}${e}`,stable:!1}}return{strategy:Sn.POSITION,value:`el#${t.nth??0}`,stable:!1}}var Sn,dx=T(()=>{"use strict";Sn={TESTID:"testid",COMPONENT:"component",ROLE:"role",POSITION:"position"}});function z1(t,e,n){return n.length>0?e.length>0?`${e} "${n}"`:`"${n}"`:e.length>0?e:t.tagName.toLowerCase()}function $c(t){let e=t.getAttribute(K1)??void 0,n=jn(t),r=n?.componentStack[0],i=Ed(t,n?.source),s=we(t),a=Ee(t),l={};e!==void 0&&(l.testid=e),r!==void 0&&(l.component=r),i!==void 0&&(l.source=i),s.length>0&&(l.role=s),a.length>0&&(l.name=a);let d=lx(l),p={anchor:d.value,strategy:W1[d.strategy],label:z1(t,s,a)};return i!==void 0&&(p.source=i),p}var K1,W1,lh=T(()=>{"use strict";P();dx();Mt();oi();hc();K1="data-testid",W1={[Sn.TESTID]:Qo.TESTID,[Sn.COMPONENT]:Qo.COMPONENT,[Sn.ROLE]:Qo.ROLE,[Sn.POSITION]:Qo.POSITION}});function ux(t){return`${String(t)} ${t===1?"note":"notes"} on this page`}function px(t,e){let n=t.length,r=`I marked ${String(n)} ${n===1?"issue":"issues"} on ${e} with Reticle. Fix each one, then verify it in the running app:`,i=t.map((s,a)=>{let l=s.source===void 0?s.anchor:`${s.anchor}, ${s.source}`;return`${String(a+1)}. ${s.note}
2
+ ${s.label} (${l}) on ${s.route}`});return[r,"",...i].join(`
3
+ `)}var fx=T(()=>{"use strict"});var nu,se,dh,gx,Ex,bx,hx,Tx,_x,Sx=T(()=>{"use strict";nu="data-reticle-mark",se=t=>`[${nu}="${t}"]`,dh="What should change?",gx="Add",Ex="Cancel",bx="+",hx=2147483601,Tx=`
4
+ ${se("root")}{position:fixed;inset:0;pointer-events:none;z-index:${String(hx)};}
5
+ ${se("root")}[data-hide="1"] ${se("pin")}{display:none;}
6
+ html[data-reticle-mark-active] *{cursor:crosshair !important;}
7
+ html[data-reticle-mark-active] [data-reticle-overlay],
8
+ html[data-reticle-mark-active] [data-reticle-overlay] *,
9
+ html[data-reticle-mark-active] ${se("pop")},
10
+ html[data-reticle-mark-active] ${se("pop")} *,
11
+ html[data-reticle-mark-active] ${se("pin")},
12
+ html[data-reticle-mark-active] ${se("pending")}{cursor:pointer !important;}
13
+ ${se("hi")}{position:fixed;pointer-events:none;opacity:0;box-sizing:border-box;
14
+ border:2px solid color-mix(in srgb, var(--reticle-mark-accent, #0088ff) 50%, transparent);
15
+ border-radius:4px;background:color-mix(in srgb, var(--reticle-mark-accent, #0088ff) 4%, transparent);}
16
+ ${se("hi")}[data-on="1"]{opacity:1;animation:reticle-mark-hi-in .12s ease-out;}
17
+ ${se("hilabel")}{position:absolute;top:-28px;left:0;font:500 11px/1.2 system-ui,sans-serif;color:#fff;
18
+ background:rgba(0,0,0,.85);padding:.35rem .6rem;border-radius:.375rem;white-space:nowrap;
19
+ max-width:280px;overflow:hidden;text-overflow:ellipsis;pointer-events:none;}
20
+ ${se("sel")}{position:fixed;pointer-events:none;box-sizing:border-box;border-radius:4px;
21
+ border:2px solid color-mix(in srgb, var(--reticle-mark-accent, #0088ff) 60%, transparent);
22
+ background:color-mix(in srgb, var(--reticle-mark-accent, #0088ff) 5%, transparent);}
23
+ ${se("pin")},${se("pending")}{position:fixed;pointer-events:auto;width:22px;height:22px;
24
+ margin:0;border:none;border-radius:50%;background:var(--reticle-mark-accent, #0088ff);color:#fff;
25
+ font:600 11px/22px system-ui,sans-serif;text-align:center;cursor:pointer;
26
+ box-shadow:0 2px 6px rgba(0,0,0,.2),inset 0 0 0 1px rgba(0,0,0,.04);
27
+ transform:translate(-50%,-50%);user-select:none;z-index:1;}
28
+ ${se("pin")}:hover{transform:translate(-50%,-50%) scale(1.1);z-index:2;}
29
+ ${se("pin")}[data-stale="1"]{opacity:.45;}
30
+ ${se("pending")}{cursor:default;}
31
+ ${se("tip")}{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%) scale(.909);
32
+ background:#1a1a1a;color:#fff;padding:8px 12px;border-radius:12px;min-width:120px;max-width:200px;
33
+ box-shadow:0 4px 20px rgba(0,0,0,.3),0 0 0 1px rgba(255,255,255,.08);pointer-events:none;text-align:left;
34
+ font:400 13px/1.4 system-ui,sans-serif;display:none;z-index:3;}
35
+ ${se("pin")}:hover ${se("tip")}{display:block;}
36
+ ${se("tipq")}{display:block;font-size:12px;font-style:italic;color:rgba(255,255,255,.6);
37
+ margin-bottom:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
38
+ ${se("tipn")}{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
39
+ ${se("pop")}{position:fixed;pointer-events:auto;width:280px;box-sizing:border-box;padding:12px 16px 14px;
40
+ background:#1a1a1a;border-radius:16px;color:#fff;z-index:${String(hx+8)};
41
+ box-shadow:0 4px 24px rgba(0,0,0,.3),0 0 0 1px rgba(255,255,255,.08);
42
+ font:13px/1.45 system-ui,-apple-system,"Segoe UI",sans-serif;transform:translateX(-50%);opacity:0;}
43
+ ${se("pop")}[data-in="1"]{opacity:1;animation:reticle-mark-pop-in .2s cubic-bezier(.34,1.56,.64,1) forwards;}
44
+ ${se("pop")}.reticle-mark-shake{animation:reticle-mark-shake .25s ease-out;}
45
+ ${se("pop")} .reticle-mark-where{font-size:12px;font-weight:400;color:rgba(255,255,255,.5);
46
+ margin-bottom:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
47
+ ${se("pop")} textarea{box-sizing:border-box;width:100%;min-height:52px;resize:none;padding:8px 10px;
48
+ font:13px/1.45 inherit;background:rgba(255,255,255,.05);color:#fff;
49
+ border:1px solid rgba(255,255,255,.15);border-radius:8px;outline:none;}
50
+ ${se("pop")} textarea:focus{border-color:var(--reticle-mark-accent, #0088ff);}
51
+ ${se("pop")} textarea::placeholder{color:rgba(255,255,255,.35);}
52
+ ${se("pop")} .reticle-mark-row{display:flex;justify-content:flex-end;gap:6px;margin-top:8px;}
53
+ ${se("pop")} button{font:500 12px/1 system-ui,sans-serif;padding:.4rem .875rem;border-radius:1rem;
54
+ border:none;cursor:pointer;background:transparent;color:rgba(255,255,255,.5);}
55
+ ${se("pop")} button:hover{background:rgba(255,255,255,.1);color:rgba(255,255,255,.8);}
56
+ ${se("pop")} button[data-send]{background:var(--reticle-mark-accent, #0088ff);color:#fff;}
57
+ ${se("pop")} button[data-send]:disabled{opacity:.4;cursor:not-allowed;}
58
+ @keyframes reticle-mark-hi-in{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}
59
+ @keyframes reticle-mark-pop-in{from{opacity:0;transform:translateX(-50%) scale(.95) translateY(4px)}
60
+ to{opacity:1;transform:translateX(-50%) scale(1) translateY(0)}}
61
+ @keyframes reticle-mark-shake{
62
+ 0%,100%{transform:translateX(-50%)}
63
+ 20%{transform:translateX(calc(-50% - 3px))}
64
+ 40%{transform:translateX(calc(-50% + 3px))}
65
+ 60%{transform:translateX(calc(-50% - 2px))}
66
+ 80%{transform:translateX(calc(-50% + 2px))}}
67
+ `,_x=`<div ${nu}="hi"><span ${nu}="hilabel"></span></div><div ${nu}="sel" hidden></div>`});function yx(t){return t.source===void 0?void 0:`${t.source.file}:${String(t.source.line)}`}function ou(){return typeof location>"u"?"":location.pathname+location.search}function X1(t){return $c(t).anchor}function Z1(t){if(t===void 0||typeof getComputedStyle>"u")return!1;let e=getComputedStyle(t).position;return e==="fixed"||e==="sticky"}function Rx(t,e){let n=document.elementsFromPoint.bind(document);if(n!==void 0){for(let r of n(t,e))if(!qi(r))return r}}function Nx(t,e){let n=window.innerWidth,r=window.innerHeight,i=Math.min(Math.max(t,ru+xx/2),n-ru-xx/2),s=e+12;return s+Ax>r-ru&&(s=Math.max(ru,e-Ax-12)),{left:i,top:s}}function Q1(t){let e=t.getAttribute("data-testid");if(e!==null&&e.length>0)return e;let n=t.tagName.toLowerCase(),r=t.getAttribute("aria-label");if(r!==null&&r.length>0)return`${n} "${r}"`;let i=(t.textContent??"").trim().replace(/\s+/g," ").slice(0,40);return i.length>0?`${n} "${i}"`:n}function Ux(t){let e=new Si(t);return e.mount(),e}var Y1,q1,xx,Ax,ru,Wn,uh,vr,Vs,Ks,Bc,Fc,Gc,$t,Ut,Ws,pi,It,fi,rn,Rr,on,ot,ho,hi,Nr,Or,mi,gi,jc,Ei,zs,Ys,bi,w,Ox,Uc,wx,Cx,Ix,Lx,iu,ph,fh,kx,hh,Ti,_i,Dx,mh,gh,Mx,Eh,bh,Px,Hc,Th,$x,xn,Si,vx,_h=T(()=>{"use strict";ws();P();et();lh();fx();Ve();Sx();Y1=130,q1=250,xx=280,Ax=170,ru=8,Wn="data-reticle-mark",uh="data-reticle-mark-active",vr=t=>`[${Wn}="${t}"]`,Si=class{constructor(e){m(this,w);m(this,Vs);m(this,Ks);m(this,Bc);m(this,Fc);m(this,Gc);m(this,$t);m(this,Ut);m(this,Ws);m(this,pi);m(this,It);m(this,fi);m(this,rn);m(this,Rr);m(this,on,!1);m(this,ot,[]);m(this,ho);m(this,hi);m(this,Nr);m(this,Or);m(this,mi);m(this,gi);m(this,jc);m(this,Ei);m(this,zs);m(this,Ys);m(this,bi);m(this,Ti);m(this,_i,{x:0,y:0});u(this,Vs,e.emit),u(this,Ks,e.now),u(this,Bc,e.onMark),u(this,Fc,e.shouldBlock??(()=>!0)),u(this,Gc,e.onCountChange)}get active(){return c(this,on)}get markCount(){return c(this,ot).length}mount(){if(c(this,$t)!==void 0||typeof document>"u")return;let e=document.createElement("style");e.setAttribute(Wn,"style"),e.textContent=Tx,document.head.appendChild(e);let n=document.createElement("div");n.setAttribute(Wn,"root"),n.innerHTML=_x,document.body.appendChild(n),u(this,$t,n),u(this,Ut,n.querySelector(vr("hi"))??void 0),u(this,Ws,n.querySelector(vr("hilabel"))??void 0),u(this,pi,n.querySelector(vr("sel"))??void 0);let r=new AbortController;u(this,Ys,r),document.addEventListener("click",i=>h(this,w,Cx).call(this,i),{capture:!0,signal:r.signal}),document.addEventListener("mousemove",i=>h(this,w,Ix).call(this,i),{passive:!0,capture:!0,signal:r.signal}),document.addEventListener("keydown",i=>h(this,w,wx).call(this,i),{signal:r.signal}),window.addEventListener("scroll",()=>h(this,w,Th).call(this),{capture:!0,signal:r.signal}),window.addEventListener("resize",()=>h(this,w,Th).call(this),{signal:r.signal}),u(this,bi,new MutationObserver(()=>this.syncAnchors())),c(this,bi).observe(document.documentElement,{childList:!0,subtree:!0}),c(this,zs)!==void 0&&this.setAccent(c(this,zs))}setAccent(e){u(this,zs,e),c(this,$t)?.style.setProperty("--reticle-mark-accent",e)}attachFlagButton(e){this.attachChrome({markersBtn:e})}attachChrome(e){u(this,Or,e.markersBtn),u(this,mi,e.clearBtn),u(this,gi,e.copyRow),u(this,jc,e.onCount),u(this,Ei,e.countEl),c(this,Or)?.addEventListener("click",n=>{n.stopPropagation(),h(this,w,Ox).call(this)}),c(this,mi)?.addEventListener("click",n=>{n.stopPropagation(),this.clearAll()}),h(this,w,Uc).call(this)}destroy(){c(this,Ys)?.abort(),u(this,Ys,void 0),c(this,bi)?.disconnect(),u(this,bi,void 0),c(this,rn)!==void 0&&pe(c(this,rn)),c(this,Rr)!==void 0&&pe(c(this,Rr)),h(this,w,xn).call(this),document.documentElement.removeAttribute(uh),c(this,$t)?.remove(),document.querySelectorAll(`style[${Wn}="style"]`).forEach(e=>e.remove()),u(this,$t,void 0),u(this,on,!1),u(this,ot,[])}toggle(e){u(this,on,e??!c(this,on)),c(this,on)?document.documentElement.setAttribute(uh,"1"):(document.documentElement.removeAttribute(uh),h(this,w,iu).call(this),h(this,w,xn).call(this)),h(this,w,Uc).call(this)}agentPrompt(e){return px(c(this,ot),e)}clearAll(){h(this,w,xn).call(this);for(let e of c(this,ot))e.pin.remove();u(this,ot,[]),h(this,w,Uc).call(this)}syncAnchors(){let e=ou();for(let n of c(this,ot))n.target!==void 0&&document.contains(n.target)?n.pin.removeAttribute("data-stale"):(n.target=void 0,n.pin.setAttribute("data-stale","1")),n.pin.hidden=n.route!==e;h(this,w,Hc).call(this)}};Vs=new WeakMap,Ks=new WeakMap,Bc=new WeakMap,Fc=new WeakMap,Gc=new WeakMap,$t=new WeakMap,Ut=new WeakMap,Ws=new WeakMap,pi=new WeakMap,It=new WeakMap,fi=new WeakMap,rn=new WeakMap,Rr=new WeakMap,on=new WeakMap,ot=new WeakMap,ho=new WeakMap,hi=new WeakMap,Nr=new WeakMap,Or=new WeakMap,mi=new WeakMap,gi=new WeakMap,jc=new WeakMap,Ei=new WeakMap,zs=new WeakMap,Ys=new WeakMap,bi=new WeakMap,w=new WeakSet,Ox=function(){let e=c(this,$t);if(e===void 0)return;let n=e.getAttribute("data-hide")==="1"?"0":"1";n==="1"?e.setAttribute("data-hide","1"):e.removeAttribute("data-hide"),c(this,Or)?.setAttribute("data-active",n==="0"?"0":"1"),c(this,Or)?.setAttribute("aria-pressed",n==="1"?"true":"false")},Uc=function(){var n,r;let e=c(this,ot).length;if((n=c(this,Gc))==null||n.call(this,e),c(this,Ei)!==void 0&&(c(this,Ei).textContent=String(e),c(this,Ei).hidden=e===0),c(this,mi)?.toggleAttribute("disabled",e===0),(r=c(this,jc))==null||r.call(this,e),c(this,gi)!==void 0){c(this,gi).hidden=e===0;let i=c(this,gi).querySelector("[data-reticle-marks-text]");i!==null&&(i.textContent=ux(e))}c(this,Or)?.toggleAttribute("disabled",e===0)},wx=function(e){if(!(e.key!=="Escape"||!c(this,on))){if(c(this,It)!==void 0){e.preventDefault(),h(this,w,xn).call(this);return}this.toggle(!1)}},Cx=function(e){if(!c(this,on)||Id())return;let n=e.target;if(!(n instanceof Element))return;let r=n.hasAttribute(vx)?Rx(e.clientX,e.clientY):n;if(r===void 0||Le(r)||c(this,Or)?.contains(r)===!0||c(this,mi)?.contains(r)===!0||r.closest(vr("pin"))!==null||r.closest(vr("pop"))!==null)return;if(c(this,It)!==void 0){e.preventDefault(),e.stopPropagation(),h(this,w,gh).call(this);return}let i=r instanceof HTMLElement?r:r.parentElement;if(i===null)return;c(this,Fc).call(this)?(e.preventDefault(),e.stopPropagation()):e.preventDefault();let s=X1(i),a=c(this,ot).find(l=>l.anchor===s&&l.route===ou());if(a!==void 0){h(this,w,ph).call(this,a);return}h(this,w,kx).call(this,i,e.clientX,e.clientY)},Ix=function(e){c(this,rn)!==void 0&&pe(c(this,rn)),u(this,rn,z(()=>{u(this,rn,void 0),h(this,w,Lx).call(this,e)},Y1))},Lx=function(e){if(c(this,Ut)===void 0)return;let n=e.target,r=n instanceof Element&&n.hasAttribute(vx)?Rx(e.clientX,e.clientY):n;if(!c(this,on)||c(this,It)!==void 0||!(r instanceof Element)||Le(r)||r.closest(vr("pin"))!==null){c(this,Ut).setAttribute("data-on","0");return}let s=r.getBoundingClientRect();if(s.width===0&&s.height===0){c(this,Ut).setAttribute("data-on","0");return}c(this,Ut).style.left=`${String(s.left)}px`,c(this,Ut).style.top=`${String(s.top)}px`,c(this,Ut).style.width=`${String(s.width)}px`,c(this,Ut).style.height=`${String(s.height)}px`,c(this,Ut).setAttribute("data-on","1"),c(this,Ws)!==void 0&&(c(this,Ws).textContent=Q1(r))},iu=function(){c(this,rn)!==void 0&&(pe(c(this,rn)),u(this,rn,void 0)),c(this,Ut)?.setAttribute("data-on","0")},ph=function(e){h(this,w,xn).call(this),u(this,ho,e),u(this,hi,e.anchor),u(this,Nr,e.target),h(this,w,iu).call(this);let n=h(this,w,fh).call(this,e);h(this,w,hh).call(this,e.label,n.x,n.y,e.note),h(this,w,bh).call(this,n.x,n.y),h(this,w,Hc).call(this)},fh=function(e){let n=e.target;if(n!==void 0&&n.isConnected){let r=n.getBoundingClientRect();if(r.width>0||r.height>0)return{x:r.left+r.width/2,y:r.top+r.height/2}}return{x:e.clientX,y:e.isFixed?e.clientY:e.yDoc-window.scrollY}},kx=function(e,n,r){let i=$c(e),s=i.anchor;if(c(this,hi)===s&&c(this,It)!==void 0){h(this,w,gh).call(this);return}h(this,w,xn).call(this),h(this,w,iu).call(this),u(this,ho,void 0),u(this,hi,s),u(this,Nr,e);let a=i.source!==void 0?`${i.label} \xB7 ${i.source.file}:${String(i.source.line)}`:i.label;h(this,w,hh).call(this,a,n,r,""),h(this,w,bh).call(this,n,r),h(this,w,Hc).call(this),h(this,w,Dx).call(this,i,n,r)},hh=function(e,n,r,i){let s=document.createElement("div");s.setAttribute(Wn,"pop"),s.setAttribute("role","dialog"),s.setAttribute("aria-label",dh),s.innerHTML=`<div class="reticle-mark-where"></div>
68
+ <textarea rows="2" placeholder="${dh}"></textarea>
69
+ <div class="reticle-mark-row">
70
+ <button type="button" data-cancel data-reticle-mark-cancel>${Ex}</button>
71
+ <button type="button" data-send data-reticle-mark-send disabled>${gx}</button>
72
+ </div>`;let a=s.querySelector(".reticle-mark-where");a!==null&&(a.textContent=e);let l=Nx(n,r);s.style.left=`${String(l.left)}px`,s.style.top=`${String(l.top)}px`,c(this,$t)?.appendChild(s),u(this,It,s),requestAnimationFrame(()=>s.setAttribute("data-in","1"));let d=s.querySelector("textarea"),p=s.querySelector("button[data-send]");d!==null&&(d.value=i,p!==null&&(p.disabled=d.value.trim().length===0),d.addEventListener("input",()=>{p!==null&&(p.disabled=d.value.trim().length===0)}),d.addEventListener("keydown",f=>{f.stopPropagation(),!f.isComposing&&(f.key==="Escape"?(f.preventDefault(),h(this,w,xn).call(this)):f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),h(this,w,mh).call(this)))}),z(()=>d.focus(),50)),s.querySelector("button[data-cancel]")?.addEventListener("click",()=>h(this,w,xn).call(this)),p?.addEventListener("click",()=>h(this,w,mh).call(this)),u(this,Ti,void 0),u(this,_i,{x:n,y:r})},Ti=new WeakMap,_i=new WeakMap,Dx=function(e,n,r){u(this,Ti,e),u(this,_i,{x:n,y:r})},mh=function(){let e=c(this,It)?.querySelector("textarea")?.value.trim()??"";if(e.length===0)return;let n=c(this,ho);if(n!==void 0){n.note=e;let i=n.pin.querySelector(vr("tipn"));i!==null&&(i.textContent=e),c(this,Vs).call(this,b.HUMAN_MARK,{note:e,anchor:n.anchor,label:n.label,route:n.route}),h(this,w,Eh).call(this,e,n.anchor,n.label,c(this,ot).indexOf(n)+1,n.source),h(this,w,xn).call(this);return}let r=c(this,Ti);r!==void 0&&(h(this,w,Mx).call(this,e,r,c(this,_i).x,c(this,_i).y),h(this,w,xn).call(this))},gh=function(){let e=c(this,It);e!==void 0&&(e.classList.remove("reticle-mark-shake"),e.offsetWidth,e.classList.add("reticle-mark-shake"),c(this,Rr)!==void 0&&pe(c(this,Rr)),u(this,Rr,z(()=>{e.classList.remove("reticle-mark-shake"),u(this,Rr,void 0)},q1)))},Mx=function(e,n,r,i){let s={note:e,anchor:n.anchor,strategy:n.strategy,label:n.label,route:ou()};n.source!==void 0&&(s.source=n.source),c(this,Vs).call(this,b.HUMAN_MARK,s),c(this,Ks).call(this),h(this,w,Px).call(this,n,e,r,i),h(this,w,Eh).call(this,e,n.anchor,n.label,c(this,ot).length,yx(n))},Eh=function(e,n,r,i,s){var l;let a={note:e,anchor:n,label:r,index:i};s!==void 0&&(a.source=s),(l=c(this,Bc))==null||l.call(this,a)},bh=function(e,n){c(this,fi)?.remove();let r=document.createElement("div");r.setAttribute(Wn,"pending"),r.textContent=bx,r.style.left=`${String(e)}px`,r.style.top=`${String(n)}px`,c(this,$t)?.appendChild(r),u(this,fi,r)},Px=function(e,n,r,i){if(c(this,$t)===void 0)return;let s=document.createElement("button");s.type="button",s.setAttribute(Wn,"pin"),s.setAttribute("aria-label",e.label);let a=c(this,ot).length+1;s.innerHTML=`<span>${String(a)}</span><span ${Wn}="tip"><span ${Wn}="tipq"></span><span ${Wn}="tipn"></span></span>`;let l=s.querySelector(vr("tipq")),d=s.querySelector(vr("tipn"));l!==null&&(l.textContent=e.label),d!==null&&(d.textContent=n);let p=Z1(c(this,Nr)),f=p?i:i+window.scrollY;s.style.left=`${String(r/window.innerWidth*100)}%`,s.style.top=`${String(p?i:f-window.scrollY)}px`,c(this,$t).appendChild(s);let E={id:`${e.anchor}:${String(c(this,Ks).call(this))}:${String(a)}`,note:n,label:e.label,anchor:e.anchor,route:ou(),xPct:r/window.innerWidth*100,yDoc:f,clientX:r,clientY:i,isFixed:p,pin:s,target:c(this,Nr),source:yx(e)};s.addEventListener("click",g=>{g.preventDefault(),g.stopPropagation(),c(this,on)&&h(this,w,ph).call(this,E)}),c(this,ot).push(E),h(this,w,Uc).call(this)},Hc=function(){let e=c(this,pi);if(e===void 0)return;let n=c(this,Nr);if(n===void 0||!document.contains(n)||c(this,It)===void 0){e.hidden=!0;return}let r=n.getBoundingClientRect();e.hidden=!1,e.style.left=`${String(r.left)}px`,e.style.top=`${String(r.top)}px`,e.style.width=`${String(r.width)}px`,e.style.height=`${String(r.height)}px`},Th=function(){for(let e of c(this,ot)){if(e.isFixed){e.pin.style.top=`${String(e.clientY)}px`;continue}e.pin.style.top=`${String(e.yDoc-window.scrollY)}px`}h(this,w,$x).call(this),h(this,w,Hc).call(this)},$x=function(){let e=c(this,It),n=c(this,ho);if(e===void 0||n===void 0)return;let r=h(this,w,fh).call(this,n),i=Nx(r.x,r.y);e.style.left=`${String(i.left)}px`,e.style.top=`${String(i.top)}px`},xn=function(){c(this,It)?.remove(),u(this,It,void 0),c(this,fi)?.remove(),u(this,fi,void 0),u(this,hi,void 0),u(this,Nr,void 0),u(this,Ti,void 0),u(this,ho,void 0),c(this,pi)!==void 0&&(c(this,pi).hidden=!0)};vx="data-reticle-blocker"});var J1,su,ek,Hx,Bx=T(()=>{"use strict";J1={view:'<g><path d="M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0"/><path d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7s-8.268-2.943-9.542-7"/></g>',pointer:'<path d="M15.042 21.672L13.684 16.6m0 0l-2.51 2.225l.569-9.47l5.227 7.917l-3.286-.672ZM12 2.25V4.5m5.834.166l-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243l-1.59-1.59"/>',send:'<path d="M6 12 3.269 3.126A59.768 59.768 0 0 1 21.485 12 59.77 59.77 0 0 1 3.27 20.876L5.999 12Zm0 0h7.5"/>',chart:'<path d="M9 19v-6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2m0 0V9a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v10m-6 0a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2m0 0V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2"/>',"caret-down":'<path d="m19 9l-7 7l-7-7"/>',check:'<path d="m5 13l4 4L19 7"/>',remove:'<path d="m4.5 19.5l15-15m-15 0l15 15"/>',pause:'<path d="M10 9v6m4-6v6m7-3a9 9 0 1 1-18 0a9 9 0 0 1 18 0"/>',play:'<g><path d="m14.752 11.168l-3.197-2.132A1 1 0 0 0 10 9.87v4.263a1 1 0 0 0 1.555.832l3.197-2.132a1 1 0 0 0 0-1.664"/><path d="M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0"/></g>',stop:'<g><path d="M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0"/><path d="M9 10a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z"/></g>',copy:'<path d="M8 7v8a2 2 0 0 0 2 2h6M8 7V5a2 2 0 0 1 2-2h4.586a1 1 0 0 1 .707.293l4.414 4.414a1 1 0 0 1 .293.707V15a2 2 0 0 1-2 2h-2M8 7H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-2"/>',download:'<path d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"/>',message:'<path d="M8.625 9.75a.375.375 0 1 1-.75 0a.375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0a.375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0a.375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227c1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332a48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"/>',gear:'<g><path d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87c.074.04.147.083.22.127c.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 0 1 0 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 0 1 0-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124c.072-.044.146-.087.22-.128c.332-.183.582-.495.644-.869l.214-1.281Z"/><path d="M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z"/></g>',layout:'<path d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6Zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6Zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"/>',trash:'<path d="m19 7l-.867 12.142A2 2 0 0 1 16.138 21H7.862a2 2 0 0 1-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v3M4 7h16"/>',help:'<path d="M8.228 9c.549-1.165 2.03-2 3.772-2c2.21 0 4 1.343 4 3c0 1.4-1.278 2.575-3.006 2.907c-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0"/>',"caret-right":'<path d="m9 5l7 7l-7 7"/>',annotate:'<path d="m16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"/>',sync:'<path d="M4.5 12c0-1.232.046-2.453.138-3.662a4.006 4.006 0 0 1 3.7-3.7a48.678 48.678 0 0 1 7.324 0a4.006 4.006 0 0 1 3.7 3.7c.017.22.032.441.046.662M4.5 12l-3-3m3 3l3-3m12 3c0 1.232-.046 2.453-.138 3.662a4.006 4.006 0 0 1-3.7 3.7a48.657 48.657 0 0 1-7.324 0a4.006 4.006 0 0 1-3.7-3.7c-.017-.22-.032-.441-.046-.662M19.5 12l-3 3m3-3l3 3"/>'},su=J1,ek={chart:'<path fill="currentColor" d="M2 11a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1zm6-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1zm6-3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1z"/>',annotate:'<path fill="currentColor" fill-rule="evenodd" d="m5.433 13.916l1.262-3.154a4 4 0 0 1 .885-1.343L14.5 2.5a2.121 2.121 0 1 1 3 3l-6.92 6.919c-.383.383-.84.684-1.343.885l-3.154 1.262a.5.5 0 0 1-.65-.65ZM2.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0 0 10 3H3.75A2.75 2.75 0 0 0 1 5.75v10.5A2.75 2.75 0 0 0 3.75 19h10.5A2.75 2.75 0 0 0 17 16.25V10a.75.75 0 0 0-1.5 0v6.25c0 .69-.56 1.25-1.25 1.25H3.75c-.69 0-1.25-.56-1.25-1.25V5.75Z" clip-rule="evenodd"/>',message:'<path fill="currentColor" fill-rule="evenodd" d="M10 2c-2.236 0-4.43.18-6.57.524C1.993 2.755 1 4.014 1 5.426v5.148c0 1.413.993 2.67 2.43 2.902c.848.137 1.705.248 2.57.331v3.443a.75.75 0 0 0 1.28.53l3.58-3.579a.78.78 0 0 1 .527-.224a41.202 41.202 0 0 0 5.183-.5c1.437-.232 2.43-1.49 2.43-2.903V5.426c0-1.413-.993-2.67-2.43-2.902A41.289 41.289 0 0 0 10 2Zm0 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2ZM8 8a1 1 0 1 1-2 0a1 1 0 0 1 2 0Zm5 1a1 1 0 1 0 0-2a1 1 0 0 0 0 2Z" clip-rule="evenodd"/>',view:'<g fill="currentColor"><path d="M10 12a2 2 0 1 0 0-4a2 2 0 0 0 0 4"/><path fill-rule="evenodd" d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10M14 10a4 4 0 1 1-8 0a4 4 0 0 1 8 0" clip-rule="evenodd"/></g>',gear:'<path fill="currentColor" fill-rule="evenodd" d="M7.84 1.804A1 1 0 0 1 8.82 1h2.36a1 1 0 0 1 .98.804l.331 1.652a6.993 6.993 0 0 1 1.929 1.115l1.598-.54a1 1 0 0 1 1.186.447l1.18 2.044a1 1 0 0 1-.205 1.251l-1.267 1.113a7.047 7.047 0 0 1 0 2.228l1.267 1.113a1 1 0 0 1 .206 1.25l-1.18 2.045a1 1 0 0 1-1.187.447l-1.598-.54a6.993 6.993 0 0 1-1.929 1.115l-.33 1.652a1 1 0 0 1-.98.804H8.82a1 1 0 0 1-.98-.804l-.331-1.652a6.993 6.993 0 0 1-1.929-1.115l-1.598.54a1 1 0 0 1-1.186-.447l-1.18-2.044a1 1 0 0 1 .205-1.251l1.267-1.114a7.05 7.05 0 0 1 0-2.227L1.821 7.773a1 1 0 0 1-.206-1.25l1.18-2.045a1 1 0 0 1 1.187-.447l1.598.54a6.993 6.993 0 0 1 1.93-1.115l.33-1.652ZM10 13a3 3 0 1 0 0-6a3 3 0 0 0 0 6Z" clip-rule="evenodd"/>'},Hx=ek});function tk(t,e){let n=`${t}:${String(e)}`,r=Fx.get(n);if(r!==void 0)return document.importNode(r,!0);let i=su[t];if(i===void 0)throw new Error(`missing heroicon body: ${String(t)}`);let a=new DOMParser().parseFromString(`<svg xmlns="${Vc}" viewBox="${Kc}" fill="none">${i}</svg>`,"image/svg+xml").documentElement,l=a instanceof SVGSVGElement?document.importNode(a,!0):document.createElementNS(Vc,"svg");return l.setAttribute("viewBox",Kc),l.setAttribute("width",String(e)),l.setAttribute("height",String(e)),l.setAttribute("fill","none"),a instanceof SVGSVGElement||(l.innerHTML=i),Fx.set(n,l),document.importNode(l,!0)}function zn(t,e=16){let n=document.createElement("span");return n.className="reticle-hi-icon",n.setAttribute("aria-hidden","true"),n.style.width=`${String(e)}px`,n.style.height=`${String(e)}px`,n.appendChild(tk(t,e)),n}function Sh(t,e,n=16){t.replaceChildren(zn(e,n))}function be(t,e=16){let n=su[t];if(n===void 0)throw new Error(`missing heroicon body: ${String(t)}`);return`<span class="reticle-hi-icon" aria-hidden="true" style="width:${String(e)}px;height:${String(e)}px"><svg xmlns="${Vc}" viewBox="${Kc}" width="${String(e)}" height="${String(e)}" fill="none">${n}</svg></span>`}function xi(t,e=16){let n=su[t],r=Hx[t];if(n===void 0||r===void 0)throw new Error(`missing heroicon toggle pair: ${String(t)}`);let i=String(e);return`<span class="reticle-hi-toggle" aria-hidden="true" style="width:${i}px;height:${i}px"><span class="reticle-hi-icon reticle-hi-icon--outline" style="width:${i}px;height:${i}px"><svg xmlns="${Vc}" viewBox="${Kc}" width="${i}" height="${i}" fill="none">${n}</svg></span><span class="reticle-hi-icon reticle-hi-icon--solid" style="width:${i}px;height:${i}px"><svg xmlns="${Vc}" viewBox="${Kc}" width="${i}" height="${i}" fill="currentColor">${r}</svg></span></span>`}var V,re,Vc,Kc,Fx,Yn=T(()=>{"use strict";Bx();V={VIEW:"view",POINTER:"pointer",SEND:"send",CHART:"chart",CARET_DOWN:"caret-down",CHECK:"check",REMOVE:"remove",PAUSE:"pause",PLAY:"play",STOP:"stop",COPY:"copy",DOWNLOAD:"download",MESSAGE:"message",GEAR:"gear",LAYOUT:"layout",TRASH:"trash",HELP:"help",CARET_RIGHT:"caret-right",ANNOTATE:"annotate",SYNC:"sync"},re={CHIP:11,LOG:11,TALLY:12,CTL:10,SEND:14,MIN:12,HELP:12,TOOLBAR:18,FAB:22},Vc="http://www.w3.org/2000/svg",Kc="0 0 24 24",Fx=new Map});function Wc(t){t.scrollTop=t.scrollHeight}function Wx(t){Wc(t),requestAnimationFrame(()=>{Wc(t),requestAnimationFrame(()=>Wc(t))}),z(()=>Wc(t),uk)}function zx(t){return[...t.children].filter(e=>e.hasAttribute(Vx))}function Ah(t,e){let n=zx(t);for(let r of n.slice(0,Math.max(0,n.length-e)))r.remove()}function Yx(t){for(let e of zx(t))e.remove()}function yh(t){return t===void 0||!Number.isFinite(t)||t<=0?nk:Math.floor(t)}function Yc(t){let e=Math.max(0,Math.floor(t/1e3));if(e<60)return`${e}s`;let n=Math.floor(e/60);if(n<60)return e%60===0?`${n}m`:`${n}m ${e%60}s`;let r=Math.floor(n/60);return n%60===0?`${r}h`:`${r}h ${n%60}m`}function qx(t){return Yc(t)}function Xx(t,e,n,r,i){let s=document.createElement("div");s.setAttribute(Vx,""),s.setAttribute(ak,e);let a=document.createElement("span");a.setAttribute(au,""),a.textContent=r;let l=[];e!==Ke.HUMAN&&l.push(a);let d=rk[e],p=ok[e];if(d.length>0||p!==void 0){let g=document.createElement("span");if(g.className=lk,g.setAttribute("data-mode",ik[e]),p!==void 0&&g.appendChild(zn(p,re.LOG)),d.length>0){let _=document.createElement("span");_.className="reticle-chip-label",_.textContent=d,g.appendChild(_)}l.push(g)}let f=document.createElement("span");f.className=ck,f.textContent=n;let E=document.createElement("span");return E.className=xh,l.push(f),e!==Ke.HUMAN&&l.push(E),s.append(...l),t.appendChild(s),Ah(t,i),requestAnimationFrame(()=>{Wc(t)}),{result:g=>{if(g===Pt.PASS){E.textContent="",E.className=`${xh} ${Gx.pass}`;return}E.textContent=` ${sk[g]}`,E.className=`${xh} ${Gx[g]}`}}}var nk,rk,ok,jx,ik,sk,Gx,zc,Vx,au,ak,ck,xh,lk,dk,uk,Kx,mo=T(()=>{"use strict";P();rh();Ve();Yn();nk=50,rk={read:"READ",act:"ACT",narration:"",human:""},ok={read:V.VIEW,act:V.POINTER},jx={[De.IDLE]:"",[De.READING]:"READING",[De.ACTING]:"ACTING"},ik={read:De.READING,act:De.ACTING,narration:De.IDLE,human:De.IDLE},sk={pass:"",fail:"Fail"},Gx={pass:"reticle-pass",fail:"reticle-fail"},zc="data-reticle-log",Vx="data-reticle-log-row",au="data-reticle-log-time",ak="data-kind",ck="reticle-log-text",xh="reticle-res",lk="reticle-chip",dk="Agent activity will appear here",uk=160,Kx=`
73
+ [data-reticle-log]{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;pointer-events:auto;touch-action:pan-y;
74
+ display:flex;flex-direction:column;
75
+ gap:4px;padding:8px 10px 10px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.16) transparent;
76
+ background:transparent;}
77
+ [data-reticle-log]:empty{align-items:center;justify-content:center;}
78
+ [data-reticle-log]:empty::after{content:"${dk}";display:block;padding:24px 16px;text-align:center;
79
+ color:var(--reticle-faint);font-size:11.5px;line-height:1.5;letter-spacing:.01em;}
80
+ [data-reticle-log]::-webkit-scrollbar{width:8px;}
81
+ [data-reticle-log]::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:8px;border:2px solid transparent;background-clip:content-box;}
82
+ [data-reticle-log]::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.26);background-clip:content-box;}
83
+ [data-reticle-log-row]{display:flex;align-items:flex-start;gap:7px;font-size:11.5px;line-height:1.45;
84
+ padding:4px 2px;background:transparent;border:none;border-radius:0;
85
+ content-visibility:auto;contain-intrinsic-size:auto 28px;}
86
+ [data-reticle-log-row][data-kind="narration"]{padding:6px 2px;color:var(--reticle-muted);font-size:11px;font-style:italic;}
87
+ /**
88
+ * The kind marker is an ICON, not a pill.
89
+ *
90
+ * A row is "what the agent did"; wrapping READ / ACT in an uppercase capsule made the label louder
91
+ * than the action next to it, and forty of them down a panel read as a wall of badges. The icon
92
+ * carries the same distinction in the appearance colour and gets out of the way of the text.
93
+ */
94
+ [data-reticle-log] [data-reticle-log-row] .reticle-chip{display:inline-flex;align-items:center;
95
+ flex:none;padding:0;border:none;background:none;box-shadow:none;border-radius:0;
96
+ color:var(--reticle-c-active);opacity:.85;line-height:0;padding-top:2px;}
97
+ [data-reticle-log] [data-reticle-log-row] .reticle-chip svg{display:block;fill:none;stroke:currentColor;
98
+ stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
99
+ [data-reticle-log] [data-reticle-log-row] .reticle-chip-label{
100
+ position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
101
+ [data-reticle-log] [data-reticle-log-row][data-kind="read"] .reticle-chip{opacity:.5;}
102
+ [${au}]{flex:none;color:var(--reticle-faint);font-size:9px;font-variant-numeric:tabular-nums;padding-top:2px;min-width:2em;opacity:.85;}
103
+ [data-reticle-log] .reticle-log-text{flex:1;min-width:0;color:var(--reticle-muted);overflow-wrap:anywhere;word-break:break-word;}
104
+ [data-reticle-log] .reticle-res{flex:none;font-size:7.5px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--reticle-bad);opacity:.75;padding-top:2px;}
105
+ [data-reticle-log] .reticle-res.reticle-pass{display:none;}
106
+ [data-reticle-log-row][data-kind="human"]{align-self:flex-end;max-width:78%;margin:6px 0 2px;
107
+ padding:8px 12px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);
108
+ border-radius:16px 16px 4px 16px;box-shadow:inset 0 1px 0 rgba(255,255,255,.08);}
109
+ [data-reticle-log-row][data-kind="human"] .reticle-log-text{color:var(--reticle-fg);font-size:12px;line-height:1.45;}
110
+ `});function Jx(t,e=typeof navigator>"u"?void 0:navigator){return t!==void 0?t:e?.webdriver===!0?0:pk}var Ai,Zx,qc,Qx,cu,pk,An,eA,tA,nA,go,rA,oA,iA,wr,Eo,_t,lu,vh,ke,qe,j,sA,Xc,Zc,qs,Xs,Ht,Zs,du,uu,pu,fu,aA,Rh,Nh,sn,$,Oh,hu,St,Ge,Qc,I,wh,Qs,Ch,mu,cA,Jc,lA,Ih,gu,qn,dA,Eu,bu,Tu,Lh,_u,uA,pA,kh,it=T(()=>{"use strict";Ai={SESSION:"session",BUSY:"busy"},Zx=Ai.SESSION,qc="data-busy",Qx="1",cu="0",pk=450;An={IDLE:"idle",BUSY:"busy",FADING:"fading"},eA=700,tA=1e3,nA=4e3,go={READY:"Ready",PLANNING_PREFIX:"planning next action \xB7 ",STOPPED:"stopped",STOPPED_PREFIX:"stopped \xB7 ",NOW:"now",SINCE_LAST:" since last action"},rA=3e5,oA=5e3,iA=250,wr="1",Eo="0",_t="data-on",lu="data-reticle-state",vh="unreachable",ke="data-reticle-min",qe="data-reticle-chat",j="data-reticle-dock",sA="data-reticle-fab",Xc="data-reticle-chat-toggle",Zc="data-reticle-chat-panel",qs="data-reticle-chat-placement",Xs="data-reticle-settings-placement",Ht="data-reticle-dock-align",Zs={ABOVE:"above",BELOW:"below"},du="data-reticle-markers-btn",uu="data-reticle-clear-marks",pu="data-reticle-copy-marks",fu="data-reticle-marks-row",aA="data-reticle-mark-count",Rh="data-reticle-annotate-btn",Nh="data-reticle-chat-min",sn="data-reticle-report",$="data-reticle-report-panel",Oh="data-reticle-report-close",hu="data-reticle-report-btn",St="data-reticle-chat-pill",Ge="data-reticle-settings",Qc="data-reticle-settings-btn",I="data-reticle-settings-panel",wh="data-reticle-settings-close",Qs="data-reticle-setting",Ch="reticle-presenter-settings",mu="reticle-presenter-minimised",cA="data-reticle-ambient-glow",Jc="data-reticle-live",lA="data-reticle-block",Ih="data-reticle-hidden",gu="data-reticle-log-ts",qn="data-reticle-reduce-motion",dA="https://github.com/reticlehq/reticle/blob/main/docs/getting-started.md",Eu="data-dragged",bu="--reticle-hud-x",Tu="--reticle-hud-y",Lh=4,_u=8,uA="[data-reticle-pause], [data-reticle-annotate-btn], [data-reticle-markers-btn], [data-reticle-clear-marks], [data-reticle-copy-marks], [data-reticle-end], [data-reticle-min-btn], [data-reticle-settings-btn], [data-reticle-settings-panel], [data-reticle-report-btn], [data-reticle-report-panel], [data-reticle-chat-panel], [data-reticle-chat-toggle], [data-reticle-workspace-btn], [data-reticle-workspace-menu], [data-reticle-copy], [data-reticle-export], input, textarea, select, a, .reticle-head-ctl, [data-reticle-tally], .reticle-maxhint",pA="data-reticle-throttled",kh=100});var Bt,Dh,el,Cr,fA,Su,hA,Ir=T(()=>{"use strict";Bt="reticle-hud-surface",Dh="linear-gradient(165deg,#121218 0%,#09090c 42%,#000 100%)",el=`background:${Dh};box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 0 0 1px rgba(255,255,255,.09);`,Cr="0 16px 40px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.08)",fA=`
111
+ .${Bt}{
112
+ position:relative;overflow:hidden;
113
+ contain:layout style paint;
114
+ ${el}
115
+ }
116
+ .${Bt}::before,
117
+ [data-reticle-hud] .reticle-hud-deco::after{
118
+ content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;z-index:1;
119
+ background:
120
+ radial-gradient(ellipse 120% 70% at 50% -18%,rgba(255,255,255,.07),transparent 52%),
121
+ linear-gradient(180deg,rgba(255,255,255,.035) 0%,transparent 36%,rgba(0,0,0,.12) 100%);
122
+ }
123
+ .${Bt} > *{position:relative;z-index:2;}`,Su="reticle-hud-log-well",hA=`
124
+ .${Su}{
125
+ /* A settled height, but still allowed to shrink: pinned with flex:none it pushed the composer
126
+ off the bottom of the panel the moment the rest of the content grew. */
127
+ /* A flex column, so the feed inside actually FILLS the height: as a plain block the log was only
128
+ as tall as its rows, which left the empty-state line floating near the top of an otherwise
129
+ empty panel instead of centred in it. */
130
+ position:relative;display:flex;flex-direction:column;
131
+ flex:1 1 auto;height:210px;min-height:96px;max-height:210px;overflow:hidden;
132
+ contain:layout style paint;
133
+ margin:0 6px;border-radius:12px;background:transparent;}
134
+ .${Su} > *{position:relative;z-index:1;}`});function Js(t){return t.getAttribute(Eu)==="1"}function xu(t,e,n,r,i,s,a=_u){let l=a,d=a,p=Math.max(l,i-n-a),f=Math.max(d,s-r-a);return{left:Math.max(l,Math.min(t,p)),top:Math.max(d,Math.min(e,f))}}function ea(t,e,n){t.setAttribute(Eu,"1"),t.style.setProperty(bu,`${String(e)}px`),t.style.setProperty(Tu,`${String(n)}px`)}function Mh(t){t.removeAttribute(Eu),t.style.removeProperty(bu),t.style.removeProperty(Tu)}function Au(t){let e=t.getBoundingClientRect();return{left:e.left,top:e.top,width:e.width,height:e.height}}function yu(t){let e=t.style.getPropertyValue(bu),n=t.style.getPropertyValue(Tu);if(e!==""&&n!=="")return{left:Number.parseFloat(e),top:Number.parseFloat(n)};let r=t.getBoundingClientRect();return{left:r.left,top:r.top}}function tl(t){if(!Js(t))return;let{left:e,top:n}=yu(t),{width:r,height:i}=Au(t),s=xu(e,n,r,i,window.innerWidth,window.innerHeight);ea(t,s.left,s.top)}var vu=T(()=>{"use strict";it()});function gk(t){if(t.length===0)return;let e=t[0]?.left??0,n=t[0]?.top??0,r=t[0]?.right??0,i=t[0]?.bottom??0;for(let s of t.slice(1))e=Math.min(e,s.left),n=Math.min(n,s.top),r=Math.max(r,s.right),i=Math.max(i,s.bottom);return{left:e,top:n,right:r,bottom:i}}function _A(t,e,n){return t>=n?Zs.ABOVE:e>=n?Zs.BELOW:e>t?Zs.BELOW:Zs.ABOVE}function SA(t,e,n,r){let i=Zs.ABOVE===t?e-r:n-r;return Math.max(0,i)}function xA(t,e,n){let r=`${String(n)}px`;t.style.setProperty(e,r),t.style.maxHeight=r}function AA(t,e){t.style.removeProperty(e),t.style.removeProperty("max-height")}function Ru(t){if(t===null)return!1;let e=window.getComputedStyle(t);return e.display!=="none"&&e.visibility!=="hidden"}function Ek(t){let e=t.querySelector(`[${mA}]`);if(e instanceof HTMLElement)return e;if(t.hasAttribute(mA)||Js(t))return t}function yA(t,e){let n=Ek(t);if(n===void 0)return;let r=e.getAttribute(qe)==="1",i=e.getAttribute(Ge)==="1",s=t.querySelector(`[${Zc}]`),a=t.querySelector(`[${I}]`),l=_u,d=window.innerWidth,p=window.innerHeight,f=n.getBoundingClientRect(),E=f.top-l,g=p-f.bottom-l;if(r&&s instanceof HTMLElement&&Ru(s)){let oe=s.getBoundingClientRect().height||bA,Se=_A(E,g,oe+gA);t.setAttribute(qs,Se);let me=Math.min(bA,Math.max(hk,SA(Se,E,g,gA)));xA(s,"--reticle-chat-max-h",me)}else t.removeAttribute(qs),s instanceof HTMLElement&&AA(s,"--reticle-chat-max-h");if(i&&a instanceof HTMLElement&&Ru(a)){let oe=a.getBoundingClientRect().height||TA,Se=_A(E,g,oe+fk+EA);t.setAttribute(Xs,Se);let me=Math.min(TA,Math.max(mk,SA(Se,E,g,EA)));xA(a,"--reticle-settings-max-h",me)}else t.removeAttribute(Xs),a instanceof HTMLElement&&AA(a,"--reticle-settings-max-h");let _=Math.max(r&&s instanceof HTMLElement?s.getBoundingClientRect().width:0,i&&a instanceof HTMLElement?a.getBoundingClientRect().width:0);if(r||i){let oe=f.right-_,Se=f.left+_;oe<l||f.left<l?t.setAttribute(Ht,"start"):Se>d-l||f.right>d-l?t.setAttribute(Ht,"end"):t.setAttribute(Ht,"end")}else t.removeAttribute(Ht);if(!r&&!i){Js(t)&&tl(t);return}let S=[f];r&&s instanceof HTMLElement&&Ru(s)&&S.push(s.getBoundingClientRect()),i&&a instanceof HTMLElement&&Ru(a)&&S.push(a.getBoundingClientRect());let L=gk(S);if(L===void 0)return;let D=0,G=0;if(L.left<l?D=l-L.left:L.right>d-l&&(D=d-l-L.right),L.top<l?G=l-L.top:L.bottom>p-l&&(G=p-l-L.bottom),D===0&&G===0)return;let B=t.getBoundingClientRect(),Q=Js(t)?yu(t):{left:B.left,top:B.top};ea(t,Q.left+D,Q.top+G)}function Lr(t,e){Nu!==void 0&&cancelAnimationFrame(Nu),Nu=requestAnimationFrame(()=>{Nu=void 0,yA(t,e),requestAnimationFrame(()=>yA(t,e))})}function vA(t){let e=t.querySelector(`[${j}]`);return e instanceof HTMLElement?e:void 0}var mA,gA,EA,fk,hk,bA,TA,mk,Nu,Ou=T(()=>{"use strict";it();vu();mA="data-reticle-hud",gA=8,EA=12,fk=44,hk=160,bA=420,TA=520,mk=200});function NA(t,e){let n=()=>{Lr(t,e)},r=new AbortController,{signal:i}=r,s=()=>n();window.addEventListener("resize",s,{signal:i});let a;typeof ResizeObserver<"u"&&(a=new ResizeObserver(()=>n()),a.observe(t));let l=new MutationObserver(()=>n());l.observe(e,{attributes:!0,attributeFilter:[ke,qe,Ge]});let d=()=>n();return window.visualViewport?.addEventListener("resize",d,{signal:i}),window.visualViewport?.addEventListener("scroll",d,{signal:i}),()=>{r.abort(),a?.disconnect(),l.disconnect()}}function bk(t,e,n={}){let r=!1,i=0,s=0,a=0,l=0,d=!1,p,f=()=>{let B=d;if(r=!1,e.classList.remove(RA),p=void 0,d=!1,B){let Q=t.parentElement;Q instanceof HTMLElement?Lr(t,Q):tl(t)}n.onDragEnd?.(B)},E=B=>{if(B.button!==0)return;let Q=B.target;if(!(Q instanceof Element)||Q.closest(uA)!==null)return;let oe=t.getBoundingClientRect();i=B.clientX,s=B.clientY,a=oe.left,l=oe.top,r=!0,d=!1,p=B.pointerId,e.classList.add(RA),typeof e.setPointerCapture=="function"&&e.setPointerCapture(B.pointerId),B.preventDefault()},g=B=>{if(!r||B.pointerId!==p)return;let Q=B.clientX-i,oe=B.clientY-s;if(!d&&Math.abs(Q)<Lh&&Math.abs(oe)<Lh)return;d=!0,n.onDragMove?.();let Se=Au(t),me=xu(a+Q,l+oe,Se.width,Se.height,window.innerWidth,window.innerHeight);ea(t,me.left,me.top),B.preventDefault()},_=B=>{typeof e.releasePointerCapture=="function"&&e.releasePointerCapture(B)},S=B=>{!r||B.pointerId!==p||(d&&B.preventDefault(),_(B.pointerId),f())},L=B=>{!r||B.pointerId!==p||(_(B.pointerId),f())},D=new AbortController,{signal:G}=D;return e.addEventListener("pointerdown",E,{signal:G}),e.addEventListener("pointermove",g,{signal:G}),e.addEventListener("pointerup",S,{signal:G}),e.addEventListener("pointercancel",L,{signal:G}),()=>{D.abort(),r&&_(p??0),f()}}function OA(t,e,n={}){let r=e.map(i=>bk(t,i,n));return()=>{for(let i of r)i()}}var RA,Ph=T(()=>{"use strict";it();Ou();vu();vu();RA="reticle-drag-handle--dragging"});var wu,$h=T(()=>{"use strict";it();Ir();wu=`
135
+ [data-reticle-overlay][${Ge}="1"] [data-reticle-chat-panel]{
136
+ display:none !important;visibility:hidden !important;pointer-events:none !important;}
137
+ [${I}]{
138
+ position:absolute;right:0;left:auto;top:auto;bottom:calc(100% + 12px);z-index:30;
139
+ box-sizing:border-box;display:flex;flex-direction:column;width:272px;min-height:0;
140
+ max-width:min(272px,calc(100vw - 16px));
141
+ max-height:min(var(--reticle-settings-max-h,78vh),calc(100vh - 96px));
142
+ padding:0;border:none;border-radius:16px;overflow:hidden;
143
+ box-shadow:${Cr};
144
+ color:var(--reticle-fg);font-size:13px;line-height:1.35;
145
+ opacity:0;pointer-events:none;visibility:hidden;touch-action:manipulation;
146
+ transform:translate3d(0,6px,0) scale(.98);
147
+ transition:opacity .14s ease,transform .18s cubic-bezier(.22,1,.36,1),visibility .14s;
148
+ contain:none;isolation:isolate;${el}}
149
+ [${j}][${Xs}="below"] [${I}]{
150
+ bottom:auto;top:calc(100% + 12px);}
151
+ [${j}][${Ht}="start"] [${I}]{
152
+ right:auto;left:0;}
153
+ [${j}][${Xs}="below"] [${I}].${Bt}::after{
154
+ top:auto;bottom:100%;margin-top:0;margin-bottom:-4px;box-shadow:-1px -1px 0 0 rgba(255,255,255,.08);}
155
+ [${j}][${Ht}="start"] [${I}].${Bt}::after{
156
+ right:auto;left:14px;}
157
+ [data-reticle-overlay][${Ge}="1"] [${I}]{
158
+ opacity:1;pointer-events:auto;visibility:visible;transform:translate3d(0,0,0) scale(1);}
159
+ [${I}] .reticle-settings-inner{
160
+ position:relative;z-index:2;display:grid;grid-template-rows:auto minmax(0,1fr) auto;
161
+ flex:1 1 auto;min-height:0;max-height:100%;overflow:hidden;}
162
+ [${I}] .reticle-settings-head{
163
+ display:flex;flex-shrink:0;align-items:center;justify-content:space-between;gap:8px;
164
+ padding:12px 14px 8px;border-bottom:1px solid rgba(255,255,255,.06);}
165
+ [${I}] .reticle-settings-title{
166
+ font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:rgba(255,255,255,.45);}
167
+ [${I}].${Bt}::after{
168
+ content:"";position:absolute;top:100%;right:14px;width:8px;height:8px;margin-top:-4px;
169
+ background:#000;transform:rotate(45deg);box-shadow:1px 1px 0 0 rgba(255,255,255,.08);z-index:0;pointer-events:none;}
170
+ [${I}] .reticle-settings-close{
171
+ position:relative;top:auto;right:auto;z-index:1;
172
+ display:inline-flex;align-items:center;justify-content:center;
173
+ width:24px;height:24px;padding:0;border:none;border-radius:999px;cursor:pointer;
174
+ background:rgba(255,255,255,.06);color:var(--reticle-muted);line-height:0;
175
+ transition:background .15s,color .15s,transform .1s;}
176
+ [${I}] .reticle-settings-close:hover{background:rgba(255,255,255,.12);color:var(--reticle-fg);}
177
+ [${I}] .reticle-settings-close:active{transform:scale(.94);}
178
+ [${I}] .reticle-settings-close:focus-visible{outline:2px solid rgba(59,130,246,.65);outline-offset:1px;}
179
+ [${I}] .reticle-settings-body{
180
+ min-height:0;padding:6px 0 4px;overflow-x:hidden;overflow-y:auto;
181
+ overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
182
+ scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent;
183
+ background:linear-gradient(180deg,#0a0a0e 0%,#000 100%);}
184
+ [${I}] .reticle-settings-body::-webkit-scrollbar{width:8px;}
185
+ [${I}] .reticle-settings-body::-webkit-scrollbar-thumb{
186
+ background:rgba(255,255,255,.14);border-radius:8px;border:2px solid transparent;background-clip:content-box;}
187
+ [${I}] .reticle-settings-row{
188
+ display:flex;align-items:center;justify-content:space-between;gap:12px;
189
+ padding:8px 14px;min-height:30px;}
190
+ [${I}] .reticle-settings-label{
191
+ display:inline-flex;align-items:center;gap:6px;color:rgba(255,255,255,.62);font-size:13px;font-weight:500;}
192
+ [${I}] .reticle-settings-help{
193
+ display:inline-flex;align-items:center;justify-content:center;
194
+ width:14px;height:14px;border:none;border-radius:999px;padding:0;cursor:help;
195
+ background:transparent;color:rgba(255,255,255,.35);line-height:0;flex:none;}
196
+ [${I}] .reticle-settings-help:hover{color:rgba(255,255,255,.75);}
197
+ [${I}] .reticle-settings-help:focus-visible{outline:2px solid rgba(59,130,246,.55);outline-offset:1px;}
198
+ [${I}] .reticle-settings-cycle{
199
+ display:inline-flex;align-items:center;gap:8px;border:none;border-radius:8px;cursor:pointer;
200
+ background:rgba(255,255,255,.08);color:#fff;font:inherit;font-size:12px;font-weight:600;
201
+ padding:5px 8px 5px 10px;transition:background .15s,transform .1s;}
202
+ [${I}] .reticle-settings-cycle:hover{background:rgba(255,255,255,.12);}
203
+ [${I}] .reticle-settings-cycle:active{transform:scale(.97);}
204
+ [${I}] .reticle-settings-cycle:focus-visible{outline:2px solid rgba(59,130,246,.55);outline-offset:1px;}
205
+ [${I}] .reticle-settings-dots{display:inline-flex;flex-direction:column;gap:2px;}
206
+ [${I}] .reticle-settings-dot{
207
+ width:3px;height:3px;border-radius:999px;background:rgba(255,255,255,.22);}
208
+ [${I}] .reticle-settings-dot[data-on="1"]{background:var(--reticle-accent);}
209
+ [${I}] .reticle-settings-toggle{
210
+ position:relative;width:28px;height:18px;border:none;border-radius:999px;cursor:pointer;padding:0;flex:none;
211
+ background:rgba(255,255,255,.16);transition:background .15s ease,box-shadow .15s ease;}
212
+ [${I}] .reticle-settings-toggle[data-on="1"]{background:var(--reticle-accent);}
213
+ [${I}] .reticle-settings-toggle::after{
214
+ content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;
215
+ background:#fafafa;box-shadow:0 1px 2px rgba(0,0,0,.35);transition:transform .15s ease;}
216
+ [${I}] .reticle-settings-toggle[data-on="1"]::after{transform:translateX(10px);}
217
+ [${I}] .reticle-settings-toggle:focus-visible{outline:2px solid rgba(59,130,246,.55);outline-offset:2px;}
218
+ [${I}] .reticle-settings-row[data-disabled="1"]{opacity:.45;pointer-events:none;}
219
+ [${I}] .reticle-settings-section{
220
+ padding:10px 14px 6px;color:rgba(255,255,255,.38);font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;}
221
+ [${I}] .reticle-settings-swatches{
222
+ display:flex;gap:8px;flex-wrap:wrap;padding:0 14px 10px;}
223
+ [${I}] .reticle-settings-swatch{
224
+ width:24px;height:24px;border-radius:999px;padding:0;cursor:pointer;
225
+ border:2px solid transparent;background-clip:padding-box;
226
+ box-shadow:inset 0 0 0 1px rgba(0,0,0,.25);transition:transform .12s,border-color .12s;}
227
+ [${I}] .reticle-settings-swatch:hover{transform:scale(1.06);}
228
+ [${I}] .reticle-settings-swatch[data-on="1"]{
229
+ border-color:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.35);}
230
+ [${I}] .reticle-settings-swatch:focus-visible{outline:2px solid rgba(59,130,246,.65);outline-offset:2px;}
231
+ [${I}] .reticle-settings-checkrow{
232
+ display:flex;align-items:center;gap:10px;padding:7px 14px;color:rgba(255,255,255,.8);font-size:13px;
233
+ cursor:pointer;user-select:none;margin:0;transition:background .12s;}
234
+ [${I}] .reticle-settings-checkrow:hover{background:rgba(255,255,255,.03);}
235
+ [${I}] .reticle-settings-check{
236
+ width:16px;height:16px;border-radius:5px;border:1px solid rgba(255,255,255,.22);
237
+ background:rgba(255,255,255,.04);display:inline-flex;align-items:center;justify-content:center;
238
+ color:transparent;font-size:10px;line-height:1;flex:none;transition:background .12s,border-color .12s,color .12s;}
239
+ [${I}] .reticle-settings-check[data-on="1"]{
240
+ background:#fafafa;border-color:#fafafa;color:#111;}
241
+ [${I}] .reticle-settings-check:focus-visible{outline:2px solid rgba(59,130,246,.55);outline-offset:2px;}
242
+ [${I}] .reticle-settings-foot{
243
+ flex-shrink:0;margin-top:2px;border-top:1px solid rgba(255,255,255,.08);
244
+ display:flex;flex-direction:column;gap:0;background:#000;}
245
+ [${I}] .reticle-settings-reset{
246
+ width:100%;display:flex;align-items:center;justify-content:center;gap:6px;
247
+ border:none;background:rgba(255,255,255,.04);color:rgba(255,255,255,.78);font:inherit;font-size:12px;font-weight:600;
248
+ padding:10px 14px;cursor:pointer;text-align:center;transition:background .12s,color .12s;}
249
+ [${I}] .reticle-settings-reset:hover{background:rgba(255,255,255,.08);color:#fff;}
250
+ [${I}] .reticle-settings-reset:focus-visible{outline:2px solid rgba(59,130,246,.55);outline-offset:-2px;}
251
+ [${I}] .reticle-settings-link{
252
+ width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;
253
+ border:none;background:transparent;color:rgba(255,255,255,.82);font:inherit;font-size:13px;
254
+ padding:11px 14px;cursor:pointer;text-align:left;transition:background .12s,color .12s;
255
+ text-decoration:none;box-sizing:border-box;}
256
+ [${I}] .reticle-settings-link-caret{display:inline-flex;align-items:center;flex:none;opacity:.55;}
257
+ [${I}] .reticle-settings-link:hover{background:rgba(255,255,255,.04);color:#fff;}
258
+ [${I}] .reticle-settings-link:focus-visible{outline:2px solid rgba(59,130,246,.55);outline-offset:-2px;}
259
+ [data-reticle-overlay][${Ge}="1"] [data-reticle-hud] .reticle-tb-tip{
260
+ opacity:0;visibility:hidden;transition-delay:0s;}
261
+ /* The dock's accent IS the theme's active colour, published as --reticle-accent on the overlay by
262
+ applyPresenterSettings. It used to be a seventh independent picker with its own attribute. */
263
+ [data-reticle-dock]{--reticle-accent-soft:color-mix(in srgb,var(--reticle-accent) 18%,transparent);}
264
+ /* One chip per theme: three bands (active, idle, ended) over the theme's name. */
265
+ [${I}] .reticle-settings-themes{
266
+ display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:8px;padding:4px 14px 12px;}
267
+ [${I}] .reticle-settings-theme{
268
+ display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;overflow:hidden;
269
+ border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(255,255,255,.03);
270
+ cursor:pointer;transition:border-color .15s ease,background .15s ease;}
271
+ [${I}] .reticle-settings-theme:hover{background:rgba(255,255,255,.07);}
272
+ [${I}] .reticle-settings-theme[data-on="1"]{
273
+ border-color:#fff;background:rgba(255,255,255,.1);}
274
+ [${I}] .reticle-settings-theme-band{display:block;height:6px;}
275
+ [${I}] .reticle-settings-theme-band:first-of-type{height:10px;}
276
+ [${I}] .reticle-settings-theme-name{
277
+ display:block;padding:5px 6px 6px;color:rgba(255,255,255,.78);font-size:11px;text-align:center;}
278
+ [data-reticle-blocker]{
279
+ position:fixed;inset:0;z-index:1;background:rgba(0,0,0,.16);pointer-events:auto;}
280
+ [data-reticle-overlay][data-reticle-block="0"] [data-reticle-blocker]{
281
+ display:none;pointer-events:none;}
282
+ [data-reticle-overlay][data-reticle-hidden="1"] [${j}],
283
+ [data-reticle-overlay][data-reticle-hidden="1"] [${I}]{display:none !important;}
284
+
285
+ `});function Xe(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function nl(t){try{let e=new URL(t).protocol;return e==="https:"||e==="http:"}catch{return!1}}var Uh=T(()=>{"use strict"});function CA(t){let n=(t??"").trim().split(/[\s._-]+/).filter(r=>r.length>0).slice(0,2).map(r=>[...r][0]??"").join("");return n.length>0?n.toUpperCase():de.AVATAR_FALLBACK}function ta(t,e={},n=!1){if(t===void 0)return"";if(!t.signedIn)return n?`<div class="reticle-account" ${wA}><button type="button" class="reticle-account-signin" ${yi} title="${de.SIGNIN_TITLE}" aria-label="${de.SIGNIN_TITLE}">${de.SIGNED_OUT}</button></div>`:"";let r=t.org??"",i=r.length>0?Xe(r):de.SIGNED_IN_AS,s=`<span class="reticle-account-avatar" aria-hidden="true">${Xe(CA(t.org))}</span>`,a=`<button type="button" class="reticle-account-trigger" ${Hh} aria-haspopup="true" aria-expanded="false" title="${de.TRIGGER_TITLE}" aria-label="${de.TRIGGER_TITLE}: ${i}">${s}</button>`;return`<div class="reticle-account" ${wA}>${a}${Sk(t,e)}</div>`}function Cu(t,e){return e===void 0||e.length===0?"":`<div class="reticle-account-row"><span class="reticle-account-k">${Xe(t)}</span><span class="reticle-account-v" title="${Xe(e)}">${Xe(e)}</span></div>`}function Sk(t,e){let n=t.org??"",r=`<div class="reticle-account-head"><span class="reticle-account-avatar reticle-account-avatar--lg" aria-hidden="true">${Xe(CA(t.org))}</span><span class="reticle-account-who"><span class="reticle-account-org">${n.length>0?Xe(n):de.SIGNED_IN_AS}</span>`+(t.email!==void 0&&t.email.length>0?`<span class="reticle-account-email" title="${Xe(t.email)}">${Xe(t.email)}</span>`:`<span class="reticle-account-email">${de.SIGNED_IN_AS}</span>`)+"</span></div>",i=Cu(de.HOST_LABEL,t.host)+Cu(de.PROJECT_LABEL,e.projectName)+Cu(de.VERDICTS_LABEL,e.verdicts!==void 0?String(e.verdicts):void 0)+Cu(de.DEFECTS_LABEL,e.defects!==void 0?String(e.defects):void 0),a=e.dashboardUrl!==void 0&&nl(e.dashboardUrl)?`<a class="reticle-account-action" data-reticle-account-dashboard href="${Xe(e.dashboardUrl??"")}" target="_blank" rel="noreferrer noopener" title="${de.DASHBOARD_TITLE}">${be(V.VIEW,re.HELP)}<span>${de.DASHBOARD_ACTION}</span></a>`:`<button type="button" class="reticle-account-action reticle-account-action--hint" ${yi} data-reticle-copy="${de.LINK_COMMAND}" title="${de.LINK_HINT}"><span>${de.LINK_HINT}</span></button>`,l=`<button type="button" class="reticle-account-action" ${Tk} data-reticle-copy="${de.SIGNOUT_COMMAND}" title="${de.SIGNOUT_TITLE}"><span>${de.SIGNOUT_ACTION}</span></button>`;return`<div class="reticle-account-menu" ${Iu} role="menu" aria-label="${de.MENU_LABEL}" aria-hidden="true" hidden>`+r+(i.length>0?`<div class="reticle-account-rows">${i}</div>`:"")+`<div class="reticle-account-actions">${a}${l}</div></div>`}function Fh(t){return t===void 0||!nl(t)?"":`<button type="button" class="reticle-sync-now" ${Bh} title="${de.SYNC_TITLE}" aria-label="${de.SYNC_TITLE}">${be(V.SYNC,re.HELP)}</button>`}function IA(t){let e=new AbortController,{signal:n}=e,r=s=>{for(let a of t.querySelectorAll(`[${Iu}]`))a!==s&&(a.setAttribute("hidden",""),a.setAttribute("aria-hidden","true"));for(let a of t.querySelectorAll(`[${Hh}]`))s!==void 0&&a.parentElement===s.parentElement||a.setAttribute("aria-expanded","false")},i=s=>{let a=s.querySelector("span")??s,l=a.textContent;a.textContent=de.COPIED,setTimeout(()=>{a.textContent=l},_k)};return t.addEventListener("click",s=>{let a=s.target;if(!(a instanceof Element))return;let l=a.closest(`[${Hh}]`);if(l instanceof HTMLElement){s.preventDefault(),s.stopPropagation();let f=l.parentElement?.querySelector(`[${Iu}]`);if(!(f instanceof HTMLElement))return;let E=!f.hasAttribute("hidden");if(r(),E)return;f.removeAttribute("hidden"),f.setAttribute("aria-hidden","false"),l.setAttribute("aria-expanded","true");return}let d=a.closest("[data-reticle-copy]");if(d instanceof HTMLElement){s.preventDefault(),s.stopPropagation();let f=d.getAttribute("data-reticle-copy")??"";f.length>0&&navigator.clipboard?.writeText(f).catch(()=>{}),i(d);return}let p=a.closest(`[${yi}]`);if(p instanceof HTMLElement){s.preventDefault(),s.stopPropagation(),navigator.clipboard?.writeText(de.SIGNIN_COMMAND).catch(()=>{}),i(p);return}r()},{signal:n}),document.addEventListener("pointerdown",s=>{let a=s.target;a instanceof Node&&t.contains(a)||r()},{signal:n}),document.addEventListener("keydown",s=>{s.key!=="Escape"||t.querySelector(`[${Iu}]:not([hidden])`)===null||(s.stopPropagation(),r())},{signal:n}),()=>e.abort()}var wA,yi,Bh,Hh,Iu,Tk,de,_k,rl=T(()=>{"use strict";Yn();Uh();wA="data-reticle-account",yi="data-reticle-account-signin",Bh="data-reticle-sync-now",Hh="data-reticle-account-trigger",Iu="data-reticle-account-menu",Tk="data-reticle-account-signout",de={SIGNED_OUT:"Sign in",SIGNIN_TITLE:"Run `reticle login` in your terminal \u2014 click to copy the command",SIGNIN_COMMAND:"reticle login",DASHBOARD_TITLE:"Open this project on the dashboard",SYNC_TITLE:"Push to the dashboard now, instead of waiting for the next sync",COPIED:"Copied",AVATAR_FALLBACK:"\u2022",MENU_LABEL:"Reticle account",TRIGGER_TITLE:"Your Reticle account",SIGNED_IN_AS:"Signed in",DASHBOARD_ACTION:"Open dashboard",LINK_HINT:"Not linked \u2014 run `reticle link` to keep a record on the dashboard",LINK_COMMAND:"reticle link",SIGNOUT_ACTION:"Sign out",SIGNOUT_TITLE:"Run `reticle logout` in your terminal \u2014 click to copy the command",SIGNOUT_COMMAND:"reticle logout",PROJECT_LABEL:"Project",HOST_LABEL:"Host",VERDICTS_LABEL:"Verdicts",DEFECTS_LABEL:"Defects found"},_k=1200});var HA={};Ba(HA,{OutputDetail:()=>yn,PresenterSettingsPanel:()=>il,SETTINGS_ACCOUNT_ATTR:()=>Yh,SETTINGS_CSS:()=>wu,blockerHtml:()=>Zh,getPresenterSettings:()=>Ft,loadPresenterSettings:()=>zh,paintHarnessRow:()=>$A,paintSettingsAccount:()=>qh,settingsPanelHtml:()=>Xh,statusTheme:()=>sl,syncPageBlocker:()=>al});function sl(t){return Wh.find(e=>e.id===t)??xk}function Ft(){return Ze}function zh(){if(typeof localStorage>"u")return{...an};try{let t=localStorage.getItem(Ch);if(t===null)return{...an};let e=JSON.parse(t);if(typeof e!="object"||e===null)return{...an};let n=e;return{outputDetail:Ak(n.outputDetail)?n.outputDetail:an.outputDetail,reactComponents:n.reactComponents===!0,hideUntilRestart:!1,statusThemeId:yk(n.statusThemeId)?n.statusThemeId:an.statusThemeId,ambientGlow:typeof n.ambientGlow=="boolean"?n.ambientGlow:an.ambientGlow,clearOnCopy:n.clearOnCopy===!0,blockPageInteractions:typeof n.blockPageInteractions=="boolean"?n.blockPageInteractions:an.blockPageInteractions,showTally:typeof n.showTally=="boolean"?n.showTally:an.showTally,showTimestamps:typeof n.showTimestamps=="boolean"?n.showTimestamps:an.showTimestamps,autoOpenChat:typeof n.autoOpenChat=="boolean"?n.autoOpenChat:an.autoOpenChat,reduceMotion:typeof n.reduceMotion=="boolean"?n.reduceMotion:an.reduceMotion}}catch{return{...an}}}function Ak(t){return t===yn.MINIMAL||t===yn.STANDARD||t===yn.VERBOSE}function yk(t){return Wh.some(e=>e.id===t)}function vk(t){if(Ze=t,!(typeof localStorage>"u"))try{localStorage.setItem(Ch,JSON.stringify(t))}catch{}}function Rk(t){let e={...Ze,...t};return vk(e),e}function Nk(){return be(V.HELP,re.HELP)}function Gh(t,e){let n=Nk();return`<span class="reticle-settings-label">${t}<button type="button" class="reticle-settings-help" data-reticle-settings-help title="${e}" aria-label="${e}">${n}</button></span>`}function bo(t,e,n,r=""){return`<div class="reticle-settings-row" ${r}>
286
+ ${Gh(e,n)}
287
+ <button type="button" class="reticle-settings-toggle" ${Qs}="${t}" role="switch" aria-checked="false"></button>
288
+ </div>`}function LA(t,e,n){return`<label class="reticle-settings-checkrow" data-reticle-check-row="${t}">
289
+ <span class="reticle-settings-check" data-reticle-check="${t}" role="checkbox" aria-checked="${n?"true":"false"}" tabindex="0"></span>
290
+ <span class="reticle-settings-check-label">${e}</span>
291
+ </label>`}function $A(t,e){let n=t.querySelector(`[${MA}]`);if(!(n instanceof HTMLElement))return;if(e===void 0){n.hidden=!0;return}n.hidden=!1;let r=n.querySelector(`[${Qs}="harnessEnabled"]`);if(!(r instanceof HTMLElement))return;let i=e.harnessEntitled;r.setAttribute("aria-checked",e.harnessEnabled&&i?"true":"false"),r.setAttribute("aria-disabled",i?"false":"true");let s=n.querySelector("[data-reticle-help]");s instanceof HTMLElement&&(s.title=i?PA:Ok)}function qh(t,e,n,r={}){let i=t.querySelector(`[${DA}]`),s=t.querySelector(`[${Yh}]`);if(!(i instanceof HTMLElement)||!(s instanceof HTMLElement))return;let a=ta(e,{...r,dashboardUrl:n},!0);i.hidden=a.length===0,s.innerHTML=a}function Xh(){let t=be(V.REMOVE,re.MIN),e=be(V.CARET_RIGHT,re.HELP),n="How much detail is included when you copy or export the run",r="Include React component paths in exported run state when available",i="Hide the Reticle HUD until you reload the page",s=PA;return`<div ${I} class="reticle-settings ${Bt}" role="region" aria-label="Reticle settings" aria-hidden="true">
292
+ <div class="reticle-settings-inner">
293
+ <div class="reticle-settings-head">
294
+ <span class="reticle-settings-title">Settings</span>
295
+ <button type="button" ${wh} class="reticle-settings-close" title="Close settings" aria-label="Close settings">${t}</button>
296
+ </div>
297
+ <div class="reticle-settings-body">
298
+ <div class="reticle-settings-section">Session</div>
299
+ <div class="reticle-settings-row">
300
+ ${Gh("Output Detail",n)}
301
+ <button type="button" class="reticle-settings-cycle" data-reticle-settings-cycle="outputDetail"><span data-reticle-cycle-label></span><span class="reticle-settings-dots" data-reticle-cycle-dots></span></button>
302
+ </div>
303
+ ${bo("autoOpenChat","Auto-open chat","On by default. Opens the agent chat by itself when a session starts and when you expand the HUD. Off leaves the toolbar bare until you ask for the chat.")}
304
+ ${bo("showTimestamps","Show timestamps","Show relative timestamps on each activity-log row")}
305
+ ${bo("showTally","Show verdict tally","Show the pass/fail score pill in the toolbar")}
306
+ <div class="reticle-settings-section">Inspector</div>
307
+ ${bo("reactComponents","React Components",r,"data-reticle-settings-react-row")}
308
+ <div class="reticle-settings-section">Interaction</div>
309
+ ${LA("blockPageInteractions","Block page interactions",!0)}
310
+ ${LA("clearOnCopy","Clear on copy/send",!1)}
311
+ ${bo("hideUntilRestart","Hide Until Restart",i)}
312
+ ${bo("harnessEnabled","Autonomous driving",s,`${MA} hidden`)}
313
+ ${bo("reduceMotion","Reduce motion","Reduce HUD animations for accessibility")}
314
+ <div class="reticle-settings-section">Account</div>
315
+ <div class="reticle-settings-row" ${DA} hidden>
316
+ ${Gh("Workspace",wk)}
317
+ <span ${Yh}></span>
318
+ </div>
319
+ <div class="reticle-settings-section">Status theme</div>
320
+ ${bo("ambientGlow","Page glow","Glow the page edges in the status colour while a session is live. Off keeps the HUD signals and leaves your app alone.")}
321
+ <div class="reticle-settings-themes" data-reticle-settings-themes></div>
322
+ </div>
323
+ <div class="reticle-settings-foot">
324
+ <button type="button" class="reticle-settings-reset" data-reticle-settings-reset>Reset HUD position</button>
325
+ <button type="button" class="reticle-settings-link" data-reticle-settings-mcp>Manage MCP &amp; Webhooks<span class="reticle-settings-link-caret" aria-hidden="true">${e}</span></button>
326
+ <a class="reticle-settings-link" data-reticle-feedback-email href="${EE}" target="_blank" rel="noopener noreferrer" title="${Lu.EMAIL_TITLE}">${Lu.EMAIL}<span class="reticle-settings-link-caret" aria-hidden="true">${e}</span></a>
327
+ <a class="reticle-settings-link" data-reticle-feedback-call href="${ps}" target="_blank" rel="noopener noreferrer" title="${Lu.CALL_TITLE}">${Lu.CALL}<span class="reticle-settings-link-caret" aria-hidden="true">${e}</span></a>
328
+ </div>
329
+ </div>
330
+ </div>`}function kA(t,e){let n=sl(e.statusThemeId);t.style.setProperty("--reticle-mark-accent",n.active),t.style.setProperty("--reticle-accent",n.active),t.style.setProperty("--reticle-c-active",n.active),t.style.setProperty("--reticle-c-idle",n.idle),t.style.setProperty("--reticle-c-ended",n.ended),t.setAttribute(cA,e.ambientGlow?"1":"0"),e.hideUntilRestart?t.setAttribute(Ih,"1"):t.removeAttribute(Ih),t.setAttribute(gu,e.showTimestamps?"1":"0"),t.setAttribute(qn,e.reduceMotion?"1":"0");let r=t.querySelector("[data-reticle-tally]");r instanceof HTMLElement&&!e.showTally&&r.setAttribute("hidden","")}function al(t,e,n){t.setAttribute(lA,e.blockPageInteractions&&n?"1":"0")}function Zh(){return'<div data-reticle-blocker aria-hidden="true"></div>'}var yn,vi,Wh,xk,ol,an,Ze,Yh,DA,MA,PA,Ok,wk,Lu,xt,st,Xn,kr,ae,jh,cn,Vh,To,Kh,UA,il,na=T(()=>{"use strict";it();Yn();Ir();Ph();Ou();$h();P();rl();yn={MINIMAL:"minimal",STANDARD:"standard",VERBOSE:"verbose"},vi={SIGNAL:"signal",TRAFFIC:"traffic",MONO:"mono",NEON:"neon",EMBER:"ember"},Wh=[{id:vi.SIGNAL,label:"Signal",active:"#3b82f6",idle:"#eab308",ended:"#ef4444"},{id:vi.TRAFFIC,label:"Traffic",active:"#22c55e",idle:"#eab308",ended:"#ef4444"},{id:vi.MONO,label:"Mono",active:"#fafafa",idle:"#a3a3a3",ended:"#525252"},{id:vi.NEON,label:"Neon",active:"#06b6d4",idle:"#a855f7",ended:"#f43f5e"},{id:vi.EMBER,label:"Ember",active:"#f97316",idle:"#facc15",ended:"#7f1d1d"}],xk={id:vi.SIGNAL,label:"Signal",active:"#3b82f6",idle:"#eab308",ended:"#ef4444"};ol=[{value:yn.MINIMAL,label:"Minimal"},{value:yn.STANDARD,label:"Standard"},{value:yn.VERBOSE,label:"Verbose"}],an={outputDetail:yn.STANDARD,statusThemeId:vi.SIGNAL,ambientGlow:!0,reactComponents:!1,hideUntilRestart:!1,clearOnCopy:!1,blockPageInteractions:!0,showTally:!1,showTimestamps:!0,autoOpenChat:!0,reduceMotion:!1},Ze=zh();Yh="data-reticle-settings-account",DA="data-reticle-settings-account-row",MA="data-reticle-settings-harness-row",PA="Let Reticle drive this app by itself to find defects. Set here or in your dashboard \u2014 both write to the same place.",Ok="Autonomous driving runs on Reticle\u2019s model spend, so it needs a plan or the free period. Claim it from the chat panel.",wk="Whether this machine is signed in to a Reticle workspace. Signing in happens in your terminal.";Lu={EMAIL:"Email the founder",EMAIL_TITLE:`Write to ${gE}: a problem, a wish, anything`,CALL:"Book a call",CALL_TITLE:"Pick a time to talk it through"};il=class{constructor(e={}){m(this,ae);m(this,xt);m(this,st);m(this,Xn);m(this,kr);u(this,kr,e),Ze=zh()}contains(e){return c(this,st)?.contains(e)===!0}mount(e){u(this,xt,e);let n=e.querySelector(`[${I}]`);u(this,st,n instanceof HTMLElement?n:void 0),c(this,st)?.addEventListener("pointerdown",s=>{s.stopPropagation()});let r=e.querySelector(`[${Qc}]`);u(this,Xn,r instanceof HTMLElement?r:void 0);let i=e.querySelector(`[${wh}]`);i instanceof HTMLElement&&Sh(i,V.REMOVE,re.MIN),c(this,Xn)!==void 0&&(Sh(c(this,Xn),V.GEAR,re.TOOLBAR),c(this,Xn).addEventListener("click",s=>{s.stopPropagation(),this.toggle()})),e.querySelector('[data-reticle-settings-cycle="outputDetail"]')?.addEventListener("click",s=>{s.stopPropagation();let a=ol.findIndex(d=>d.value===Ze.outputDetail),l=ol[(a+1)%ol.length];l!==void 0&&h(this,ae,cn).call(this,{outputDetail:l.value})});for(let s of e.querySelectorAll(".reticle-settings-help"))s.addEventListener("click",a=>{a.stopPropagation()});for(let s of e.querySelectorAll(`[${Qs}]`)){let a=()=>{if(!(s instanceof HTMLElement))return;let l=s.getAttribute(Qs);if(l==="harnessEnabled"){if(s.getAttribute("aria-disabled")==="true")return;let d=s.getAttribute("aria-checked")!=="true";s.setAttribute("aria-checked",d?"true":"false"),c(this,kr).onHarness?.(d)}else if(l==="reactComponents")h(this,ae,cn).call(this,{reactComponents:!Ze.reactComponents});else if(l==="hideUntilRestart"){let d=!Ze.hideUntilRestart;h(this,ae,cn).call(this,{hideUntilRestart:d}),d&&c(this,kr).onHideUntilRestart?.()}else l==="showTally"?h(this,ae,cn).call(this,{showTally:!Ze.showTally}):l==="autoOpenChat"?h(this,ae,cn).call(this,{autoOpenChat:!Ze.autoOpenChat}):l==="showTimestamps"?h(this,ae,cn).call(this,{showTimestamps:!Ze.showTimestamps}):l==="reduceMotion"?h(this,ae,cn).call(this,{reduceMotion:!Ze.reduceMotion}):l==="ambientGlow"&&h(this,ae,cn).call(this,{ambientGlow:!Ze.ambientGlow})};s.addEventListener("click",l=>{l.stopPropagation(),a()}),s.addEventListener("keydown",l=>{l instanceof KeyboardEvent&&(l.key===" "||l.key==="Enter")&&(l.preventDefault(),l.stopPropagation(),a())})}for(let s of e.querySelectorAll("[data-reticle-check]")){let a=()=>{if(!(s instanceof HTMLElement))return;let d=s.getAttribute("data-reticle-check");d==="clearOnCopy"?h(this,ae,cn).call(this,{clearOnCopy:!Ze.clearOnCopy}):d==="blockPageInteractions"&&h(this,ae,cn).call(this,{blockPageInteractions:!Ze.blockPageInteractions})};s.closest("[data-reticle-check-row]")?.addEventListener("click",d=>{d.stopPropagation(),!(d.target instanceof HTMLElement&&d.target.classList.contains("reticle-settings-help"))&&a()}),s.addEventListener("keydown",d=>{d instanceof KeyboardEvent&&(d.key===" "||d.key==="Enter")&&(d.preventDefault(),a())})}e.querySelector("[data-reticle-settings-mcp]")?.addEventListener("click",s=>{s.stopPropagation(),window.open(dA,"_blank","noopener,noreferrer")}),e.querySelector("[data-reticle-settings-reset]")?.addEventListener("click",s=>{s.stopPropagation();let a=e.querySelector(`[${j}]`);a instanceof HTMLElement&&Mh(a)}),i?.addEventListener("click",s=>{s.stopPropagation(),this.close()}),h(this,ae,UA).call(this),h(this,ae,Vh).call(this),kA(e,Ze),c(this,kr).onSettingsChange?.(Ze)}paintHarness(e){let n=c(this,st);n!==void 0&&$A(n,e)}teardown(){u(this,xt,void 0),u(this,st,void 0),u(this,Xn,void 0)}isOpen(){return c(this,xt)?.getAttribute(Ge)==="1"}open(){c(this,xt)!==void 0&&(c(this,kr).onBeforeOpen?.(),c(this,xt).setAttribute(Ge,"1"),c(this,st)?.setAttribute("aria-hidden","false"),c(this,Xn)?.setAttribute("data-active","1"),h(this,ae,jh).call(this))}close(){c(this,xt)!==void 0&&(c(this,xt).setAttribute(Ge,"0"),c(this,st)?.setAttribute("aria-hidden","true"),c(this,Xn)?.setAttribute("data-active","0"),h(this,ae,jh).call(this))}toggle(){this.isOpen()?this.close():this.open()}};xt=new WeakMap,st=new WeakMap,Xn=new WeakMap,kr=new WeakMap,ae=new WeakSet,jh=function(){if(c(this,xt)===void 0)return;let e=vA(c(this,xt));e!==void 0&&Lr(e,c(this,xt))},cn=function(e){let n=Rk(e);c(this,xt)!==void 0&&kA(c(this,xt),n),h(this,ae,Vh).call(this),c(this,kr).onSettingsChange?.(n)},Vh=function(){let e=Ze,n=c(this,st)?.querySelector("[data-reticle-cycle-label]");n!=null&&(n.textContent=ol.find(i=>i.value===e.outputDetail)?.label??"Standard");let r=c(this,st)?.querySelector("[data-reticle-cycle-dots]");r?.replaceChildren(...ol.map(i=>{let s=document.createElement("span");return s.className="reticle-settings-dot",s.setAttribute("data-on",i.value===e.outputDetail?"1":"0"),s})),h(this,ae,To).call(this,"reactComponents",e.reactComponents),h(this,ae,To).call(this,"hideUntilRestart",e.hideUntilRestart),h(this,ae,To).call(this,"showTally",e.showTally),h(this,ae,To).call(this,"autoOpenChat",e.autoOpenChat),h(this,ae,To).call(this,"showTimestamps",e.showTimestamps),h(this,ae,To).call(this,"reduceMotion",e.reduceMotion),h(this,ae,To).call(this,"ambientGlow",e.ambientGlow),h(this,ae,Kh).call(this,"clearOnCopy",e.clearOnCopy),h(this,ae,Kh).call(this,"blockPageInteractions",e.blockPageInteractions);for(let i of c(this,st)?.querySelectorAll("[data-reticle-theme]")??[])i instanceof HTMLElement&&i.setAttribute("data-on",i.getAttribute("data-reticle-theme")===e.statusThemeId?"1":"0")},To=function(e,n){let r=c(this,st)?.querySelector(`[${Qs}="${e}"]`);r instanceof HTMLElement&&(r.setAttribute("data-on",n?"1":"0"),r.setAttribute("aria-checked",n?"true":"false"))},Kh=function(e,n){let r=c(this,st)?.querySelector(`[data-reticle-check="${e}"]`);r instanceof HTMLElement&&(r.setAttribute("data-on",n?"1":"0"),r.setAttribute("aria-checked",n?"true":"false"),r.textContent=n?"\u2713":"")},UA=function(){let e=c(this,st)?.querySelector("[data-reticle-settings-themes]");e?.replaceChildren(...Wh.map(n=>{let r=document.createElement("button");r.type="button",r.className="reticle-settings-theme",r.setAttribute("data-reticle-theme",n.id),r.title=n.label,r.setAttribute("aria-label",`${n.label} status theme`);for(let s of[n.active,n.idle,n.ended]){let a=document.createElement("span");a.className="reticle-settings-theme-band",a.style.background=s,r.appendChild(a)}let i=document.createElement("span");return i.className="reticle-settings-theme-name",i.textContent=n.label,r.appendChild(i),r.addEventListener("click",s=>{s.stopPropagation(),h(this,ae,cn).call(this,{statusThemeId:n.id})}),r}))}});function kk(){let t=globalThis[nd];return typeof t=="string"&&t.length>0?t:void 0}function Dk(t){let n=t.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(i=>i.length>0),r=n[n.length-1];return r!==void 0&&r.length>0?r:em}function Mk(){if(typeof window>"u")return;let t=new URLSearchParams(window.location.search).get(lr.PROJECT);return t!==null&&t.length>0?t:void 0}function WA(){let t=kk(),e=Mk(),n=t!==void 0?Dk(t):em;if(t===void 0&&e===void 0)return{folder:n};let r={folder:n};return t!==void 0&&(r.root=t),e!==void 0&&(r.projectId=e),r}function zA(){let t=be(V.LAYOUT,re.HELP),e=be(V.CARET_DOWN,re.HELP),n=be(V.COPY,re.HELP);return`<div class="reticle-workspace-wrap">
331
+ <button type="button" class="reticle-workspace" ${Du} aria-haspopup="true" aria-expanded="false" title="${ku}">
332
+ <span class="reticle-workspace-icon" aria-hidden="true">${t}</span>
333
+ <span class="reticle-workspace-name" ${jA}>${em}</span>
334
+ <span class="reticle-workspace-caret" aria-hidden="true">${e}</span>
335
+ </button>
336
+ <div class="reticle-workspace-menu" ${GA} role="region" aria-label="${ku}" aria-hidden="true" hidden>
337
+ <div class="reticle-workspace-menu-head">
338
+ <div class="reticle-workspace-menu-title">${ku}</div>
339
+ <div class="reticle-workspace-menu-actions">
340
+ <button type="button" class="reticle-workspace-copy" ${Qh} title="${BA}" aria-label="${BA}">${n}</button>
341
+ </div>
342
+ </div>
343
+ <div class="reticle-workspace-menu-row"><span class="reticle-workspace-menu-k">Folder</span><span class="reticle-workspace-menu-v" data-reticle-workspace-folder></span></div>
344
+ <div class="reticle-workspace-menu-row"><span class="reticle-workspace-menu-k">Path</span><span class="reticle-workspace-menu-v reticle-workspace-menu-path" ${VA}></span></div>
345
+ <div class="reticle-workspace-menu-row" data-reticle-workspace-project-row hidden><span class="reticle-workspace-menu-k">${Ik}</span><span class="reticle-workspace-menu-v" ${KA}></span></div>
346
+ </div>
347
+ </div>`}function FA(t){let e=WA(),n=t.querySelector(".reticle-workspace-wrap");if(n instanceof HTMLElement){let f=e.root!==void 0||e.projectId!==void 0;n.toggleAttribute("hidden",!f)}let r=t.querySelector(`[${Du}] [${jA}]`);r instanceof HTMLElement&&(r.textContent=e.folder);let i=t.querySelector("[data-reticle-workspace-folder]");i instanceof HTMLElement&&(i.textContent=e.folder);let s=t.querySelector(`[${VA}]`);s instanceof HTMLElement&&(s.textContent=e.root??"-",s.title=e.root??"");let a=t.querySelector(`[${KA}]`),l=t.querySelector("[data-reticle-workspace-project-row]"),d=t.querySelector(`[${Qh}]`);e.projectId!==void 0?(l?.removeAttribute("hidden"),a instanceof HTMLElement&&(a.textContent=e.projectId)):(l?.setAttribute("hidden",""),a instanceof HTMLElement&&(a.textContent="")),d instanceof HTMLButtonElement&&(d.disabled=e.root===void 0);let p=t.querySelector(`[${Du}]`);p instanceof HTMLElement&&e.root!==void 0&&(p.title=`${ku}: ${e.root}`)}function YA(t){let e=new AbortController;FA(t);let n=t.querySelector(`[${Du}]`),r=t.querySelector(`[${GA}]`),i=t.querySelector(`[${Qh}]`);if(!(n instanceof HTMLElement)||!(r instanceof HTMLElement))return()=>{};let s=()=>{r.setAttribute("aria-hidden","true"),r.setAttribute("hidden",""),n.setAttribute("aria-expanded","false")},a=()=>{FA(t),r.removeAttribute("hidden"),r.setAttribute("aria-hidden","false"),n.setAttribute("aria-expanded","true")},l=()=>{r.getAttribute("aria-hidden")==="true"||r.hasAttribute("hidden")?a():s()},d=_=>{_.stopPropagation(),l()},p=_=>{let S=_.target;if(!(S instanceof Element))return;let L=S.closest(`[${yi}]`);if(L===null)return;_.stopPropagation(),navigator.clipboard?.writeText(de.SIGNIN_COMMAND).catch(()=>{});let D=L.textContent;L.textContent=de.COPIED,setTimeout(()=>{L.textContent=D},Ck)};r.addEventListener("click",p);let f=_=>{let S=_.target;S instanceof Node&&(n.contains(S)||r.contains(S)||s())},E=_=>{_.key==="Escape"&&(r.getAttribute("aria-hidden")==="true"||r.hasAttribute("hidden")||(_.preventDefault(),_.stopPropagation(),s()))},g=_=>{_.stopPropagation();let S=WA().root;if(S!==void 0&&(navigator.clipboard?.writeText(S),i instanceof HTMLButtonElement)){let L=i.title;i.title=Lk,window.setTimeout(()=>{i.title=L},1200)}};return n.addEventListener("click",d),r.addEventListener("pointerdown",_=>_.stopPropagation()),i?.addEventListener("click",g),document.addEventListener("pointerdown",f,{signal:e.signal}),document.addEventListener("keydown",E,{signal:e.signal}),()=>{n.removeEventListener("click",d),i?.removeEventListener("click",g),e.abort()}}function qA(t,e,n,r={}){let i=t.querySelector(`[${Jh}]`);i instanceof HTMLElement&&(i.innerHTML=ta(e,{...r,dashboardUrl:n},!0))}var Du,GA,jA,VA,KA,Qh,Jh,Ck,ku,Ik,BA,Lk,em,tm=T(()=>{"use strict";P();Yn();rl();Du="data-reticle-workspace-btn",GA="data-reticle-workspace-menu",jA="data-reticle-workspace-name",VA="data-reticle-workspace-path",KA="data-reticle-workspace-project",Qh="data-reticle-workspace-copy",Jh="data-reticle-toolbar-account",Ck=1200,ku="Workspace",Ik="Project",BA="Copy path",Lk="Copied",em="This page"});function JA(t,e){let n=e?V.PLAY:V.PAUSE,r=e?_o.RESUME:_o.PAUSE;t.setAttribute("aria-label",r),t.setAttribute("title",r),t.replaceChildren(zn(n,re.TOOLBAR)),t.classList.toggle("reticle-tb-btn--primary",e),t.setAttribute("data-active",e?"1":"0")}function Mu(t,e,n){let r=n===void 0?"":`<span class="reticle-tb-kbd">${n}</span>`;return`<div class="reticle-tb-wrap">${t}<span class="reticle-tb-tip">${e}${r}</span></div>`}function jk(){let t=`<button type="button" data-reticle-pause class="reticle-tb-btn" title="${_o.PAUSE}" aria-label="${_o.PAUSE}">${be(V.PAUSE,Ri)}</button>`,e=`<span data-reticle-badge class="reticle-pause-badge">${Hk}</span>`,n=`<span class="reticle-tb-tip">${_o.PAUSE}</span>`;return`<div class="reticle-tb-wrap reticle-tb-wrap--pause">${t}${e}${n}</div>`}function Vk(t){return{pauseBtn:t.querySelector("[data-reticle-pause]")??void 0,endBtn:t.querySelector("[data-reticle-end]")??void 0,banner:t.querySelector("[data-reticle-banner]")??void 0,copyBtn:t.querySelector("[data-reticle-copy]")??void 0,exportBtn:t.querySelector("[data-reticle-export]")??void 0,exportMsg:t.querySelector("[data-reticle-export-msg]")??void 0,flows:t.querySelector("[data-reticle-flows]")??void 0}}var Pk,XA,$k,Uk,_o,Hk,ty,ZA,QA,Bk,Fk,Gk,ny,ry,nm,rm,om,ey,Ri,oy,iy,sy,ay,cy,Gt,Dr,Zn,Ni,cl,ll,ra,Oi,jt,at,im,ly,dy,uy,py,sm,Pu,$u=T(()=>{"use strict";P();Ve();it();Yn();na();tm();Pk="data-reticle-state",XA="data-reticle-tone",$k="data-on",Uk="0",_o={PAUSE:"Pause",RESUME:"Resume",END:"End",SEND:"Send"},Hk="PAUSED",ty="Session ended",ZA="Copy run",QA="Export",Bk="Replay a flow",Fk="Copied \u2713",Gk="reticle-run.json",ny=4e3,ry=`
348
+ [data-reticle-chat-panel] [data-reticle-foot]{flex:none;padding:8px 10px 10px;border-top:1px solid rgba(255,255,255,.07);
349
+ background:linear-gradient(180deg,rgba(0,0,0,.35) 0%,rgba(0,0,0,.55) 100%);pointer-events:auto;}
350
+ [data-reticle-chat-panel] .reticle-hud-log-well{margin:0 0 4px;}
351
+ [data-reticle-chat-panel] .reticle-workspace-wrap{position:relative;align-self:flex-start;max-width:100%;}
352
+ [data-reticle-chat-panel] .reticle-workspace{
353
+ display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:3px 8px 3px 6px;border-radius:999px;cursor:pointer;
354
+ border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:rgba(255,255,255,.78);
355
+ font:inherit;font-size:11px;font-weight:500;line-height:1.2;
356
+ box-shadow:inset 0 1px 0 rgba(255,255,255,.05);transition:background .15s,border-color .15s,color .15s;}
357
+ [data-reticle-chat-panel] .reticle-workspace:hover{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.14);color:#fff;}
358
+ [data-reticle-chat-panel] .reticle-workspace[aria-expanded="true"]{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.16);color:#fff;}
359
+ [data-reticle-chat-panel] .reticle-workspace-icon,
360
+ [data-reticle-chat-panel] .reticle-workspace-caret{display:inline-flex;align-items:center;opacity:.72;flex:none;}
361
+ [data-reticle-chat-panel] .reticle-workspace-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:min(200px,calc(100vw - 120px));}
362
+ [data-reticle-chat-panel] .reticle-workspace[aria-expanded="true"] .reticle-workspace-caret{transform:rotate(180deg);}
363
+ [data-reticle-chat-panel] .reticle-workspace-caret{transition:transform .18s ease;}
364
+ [data-reticle-chat-panel] .reticle-workspace-menu{
365
+ position:absolute;left:0;bottom:calc(100% + 6px);z-index:8;min-width:min(268px,calc(100vw - 48px));max-width:min(300px,calc(100vw - 48px));
366
+ padding:10px 12px;border-radius:12px;background:#000;color:rgba(255,255,255,.86);font-size:11px;line-height:1.35;
367
+ box-shadow:0 12px 32px rgba(0,0,0,.58),inset 0 1px 0 rgba(255,255,255,.07),0 0 0 1px rgba(255,255,255,.1);
368
+ transform:translateY(4px) scale(.98);opacity:0;pointer-events:none;visibility:hidden;
369
+ transition:opacity .16s ease,transform .2s cubic-bezier(.19,1,.22,1),visibility .16s;}
370
+ [data-reticle-chat-panel] .reticle-workspace[aria-expanded="true"] + .reticle-workspace-menu,
371
+ [data-reticle-chat-panel] .reticle-workspace-menu[aria-hidden="false"]{
372
+ transform:translateY(0) scale(1);opacity:1;pointer-events:auto;visibility:visible;}
373
+ [data-reticle-chat-panel] .reticle-workspace-menu-head{
374
+ display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;}
375
+ [data-reticle-chat-panel] .reticle-workspace-menu-title{
376
+ color:rgba(255,255,255,.42);font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;}
377
+ [data-reticle-chat-panel] .reticle-workspace-copy{
378
+ display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;border-radius:6px;
379
+ background:rgba(255,255,255,.06);color:rgba(255,255,255,.7);cursor:pointer;line-height:0;transition:background .12s,color .12s;}
380
+ [data-reticle-chat-panel] .reticle-workspace-copy:hover:not(:disabled){background:rgba(255,255,255,.12);color:#fff;}
381
+ [data-reticle-chat-panel] .reticle-workspace-copy:disabled{opacity:.35;cursor:not-allowed;}
382
+ /* The account capsule, to the right of the menu title. Matches the local idiom in this block:
383
+ the workspace menu predates the design tokens used in the report panel and states its own
384
+ greys, so a token here would be the only one and would not match its neighbours. */
385
+ [data-reticle-chat-panel] .reticle-workspace-menu-actions{
386
+ display:flex;align-items:center;gap:6px;}
387
+ [data-reticle-chat-panel] .reticle-workspace-menu-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:4px 0;}
388
+ [data-reticle-chat-panel] .reticle-workspace-menu-k{flex:none;color:rgba(255,255,255,.42);}
389
+ [data-reticle-chat-panel] .reticle-workspace-menu-v{min-width:0;text-align:right;color:rgba(255,255,255,.9);font-weight:500;word-break:break-all;}
390
+ [data-reticle-chat-panel] .reticle-banner{display:none;flex:none;align-items:center;gap:8px;padding:10px 14px;color:var(--reticle-fg);
391
+ font-size:12px;font-weight:500;border-bottom:1px solid var(--reticle-line2);background:var(--reticle-surface);}
392
+ [data-reticle-overlay][data-reticle-state="ended"] [data-reticle-chat-panel] .reticle-banner{display:block;}
393
+ [data-reticle-overlay][data-reticle-state="paused"] [data-reticle-glow][data-on="1"]{
394
+ box-shadow:inset 0 0 0 2px rgba(255,255,255,.2);}
395
+ [data-reticle-overlay][data-reticle-state="ended"] [data-reticle-glow][data-on="1"]{
396
+ box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);}
397
+ [data-reticle-overlay][data-reticle-tone="waiting"] [data-reticle-chat-panel]{
398
+ --reticle-accent:var(--reticle-state);
399
+ --reticle-accent-soft:color-mix(in srgb,var(--reticle-state) 18%,transparent);}
400
+ [data-reticle-overlay][data-reticle-tone="waiting"] [data-reticle-banner]{font-weight:500;color:var(--reticle-fg);}
401
+ [data-reticle-overlay][data-reticle-tone="waiting"] [data-reticle-glow][data-on="1"]{
402
+ box-shadow:inset 0 0 0 1px rgba(255,255,255,.16);}
403
+ [data-reticle-overlay][data-reticle-tone="ask"] [data-reticle-chat-panel],
404
+ [data-reticle-overlay][data-reticle-tone="warn"] [data-reticle-chat-panel]{
405
+ --reticle-accent:var(--reticle-state);
406
+ --reticle-accent-soft:color-mix(in srgb,var(--reticle-state) 18%,transparent);}
407
+ [data-reticle-overlay][data-reticle-tone="ask"] [data-reticle-banner],
408
+ [data-reticle-overlay][data-reticle-tone="warn"] [data-reticle-banner]{font-weight:500;color:var(--reticle-fg);}
409
+ [data-reticle-overlay][data-reticle-tone="ask"] [data-reticle-glow][data-on="1"],
410
+ [data-reticle-overlay][data-reticle-tone="warn"] [data-reticle-glow][data-on="1"]{
411
+ box-shadow:inset 0 0 0 2px rgba(255,255,255,.22);}
412
+ [data-reticle-chat-panel] .reticle-flows{display:none;flex:none;flex-wrap:wrap;align-content:flex-start;gap:6px;
413
+ padding:9px 12px;border-top:1px solid var(--reticle-line2);max-height:88px;overflow-y:auto;overscroll-behavior:contain;
414
+ pointer-events:auto;touch-action:pan-y;}
415
+ [data-reticle-chat-panel] .reticle-flows[data-has="1"]{display:flex;}
416
+ [data-reticle-chat-panel] .reticle-flows::-webkit-scrollbar{width:9px;}
417
+ [data-reticle-chat-panel] .reticle-flows::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:9px;border:2px solid transparent;background-clip:content-box;}
418
+ [data-reticle-chat-panel] .reticle-flows-cap{flex:0 0 100%;margin-bottom:1px;color:var(--reticle-faint);font-size:9.5px;letter-spacing:.09em;text-transform:uppercase;}
419
+ [data-reticle-chat-panel] .reticle-flow{pointer-events:auto;cursor:pointer;display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 10px;
420
+ border-radius:7px;border:1px solid var(--reticle-line);background:rgba(255,255,255,.04);color:var(--reticle-muted);
421
+ font-family:var(--reticle-font);font-size:11px;font-weight:500;transition:background .15s,color .15s,border-color .15s,transform .1s;}
422
+ [data-reticle-chat-panel] .reticle-flow:hover{color:var(--reticle-fg);background:var(--reticle-accent-soft);border-color:var(--reticle-accent);}
423
+ [data-reticle-chat-panel] .reticle-flow:active{transform:scale(.95);}
424
+ [data-reticle-overlay][data-reticle-state="paused"] [data-reticle-hud] .reticle-tb-btn--primary{
425
+ box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 0 12px rgba(255,255,255,.04);}
426
+ [data-reticle-chat-panel] .reticle-marks-row{display:flex;align-items:center;justify-content:space-between;gap:8px;
427
+ padding:7px 12px;border-top:1px solid var(--reticle-line2);pointer-events:auto;}
428
+ [data-reticle-chat-panel] .reticle-marks-row[hidden]{display:none;}
429
+ [data-reticle-chat-panel] .reticle-marks-text{color:var(--reticle-muted);font-size:11px;}
430
+ [data-reticle-chat-panel] .reticle-marks-copy{display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 10px;
431
+ border-radius:7px;border:1px solid var(--reticle-line);background:rgba(255,255,255,.04);color:var(--reticle-fg);
432
+ font-family:var(--reticle-font);font-size:11px;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s;}
433
+ [data-reticle-chat-panel] .reticle-marks-copy:hover{background:var(--reticle-accent-soft);border-color:var(--reticle-accent);}
434
+ [data-reticle-chat-panel] .reticle-marks-copy[data-copied="1"]{color:#22c55e;border-color:#22c55e;}
435
+ [data-reticle-hud] .reticle-export-msg{position:absolute;width:1px;height:1px;margin:-1px;padding:0;
436
+ overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;}
437
+ `;nm="Agent chat",rm="Hide markers",om="Clear all",ey="Copy for your agent",Ri=re.TOOLBAR;oy=[jk(),Mu(`<button type="button" ${Xc} class="reticle-tb-btn reticle-tb-btn--toggle" title="${nm}" aria-label="${nm}" aria-pressed="false" data-active="0">${xi(V.MESSAGE,Ri)}</button>`,nm),Mu(`<button type="button" ${du} class="reticle-tb-btn reticle-tb-btn--toggle" title="${rm}" aria-label="${rm}" aria-pressed="false" data-active="0" disabled>${xi(V.VIEW,Ri)}</button>`,rm,"H"),Mu(`<button type="button" data-reticle-end class="reticle-tb-btn" title="${_o.END}" aria-label="${_o.END}">${be(V.STOP,Ri)}</button>`,_o.END),Mu(`<button type="button" ${uu} class="reticle-tb-btn" title="${om}" aria-label="${om}" data-danger disabled>${be(V.TRASH,Ri)}</button>`,om,"X"),`<button type="button" data-reticle-copy class="reticle-tb-btn reticle-tb-btn--export" title="${ZA}" aria-label="${ZA}" hidden>${be(V.COPY,Ri)}</button>`,`<button type="button" data-reticle-export class="reticle-tb-btn reticle-tb-btn--export" title="${QA}" aria-label="${QA}" hidden>${be(V.DOWNLOAD,Ri)}</button>`,'<span data-reticle-export-msg class="reticle-export-msg" aria-live="polite"></span>'].join(""),iy=`<div data-reticle-banner class="reticle-banner">${ty}</div>`,sy=`<div ${fu} class="reticle-marks-row" hidden><span data-reticle-marks-text class="reticle-marks-text"></span><button type="button" ${pu} class="reticle-marks-copy" title="${ey}">${be(V.COPY,re.HELP)}<span>${ey}</span></button></div>`,ay=`<div data-reticle-flows class="reticle-flows"><span class="reticle-flows-cap">${Bk}</span></div>`,cy=`<div data-reticle-foot><div class="reticle-foot-stack">${zA()}</div></div>`;Pu=class{constructor(e){m(this,at);m(this,Gt,{pauseBtn:void 0,endBtn:void 0,banner:void 0,copyBtn:void 0,exportBtn:void 0,exportMsg:void 0,flows:void 0});m(this,Dr,ye.ACTIVE);m(this,Zn);m(this,Ni);m(this,cl);m(this,ll,[]);m(this,ra);m(this,Oi);m(this,jt);u(this,jt,e)}get state(){return c(this,Dr)}mount(e,n){u(this,Oi,new AbortController);let{signal:r}=c(this,Oi);u(this,Ni,e),u(this,cl,n),u(this,Gt,Vk(e));let i=c(this,Gt).pauseBtn;i!==void 0&&JA(i,c(this,Dr)===ye.PAUSED),c(this,Gt).pauseBtn?.addEventListener("click",()=>h(this,at,uy).call(this),{signal:r}),c(this,Gt).endBtn?.addEventListener("click",()=>h(this,at,py).call(this),{signal:r}),c(this,Gt).flows?.addEventListener("click",s=>{let a=s.target;if(!(a instanceof HTMLElement))return;let l=a.closest("[data-reticle-replay]")?.getAttribute("data-reticle-replay");l!=null&&l.length>0&&c(this,jt).emit(kn.REPLAY,l)},{signal:r}),c(this,Gt).copyBtn?.addEventListener("click",()=>h(this,at,ly).call(this),{signal:r}),c(this,Gt).exportBtn?.addEventListener("click",()=>h(this,at,dy).call(this),{signal:r}),u(this,ra,YA(e)),this.setState(ye.ACTIVE)}teardown(){var e;c(this,Oi)?.abort(),u(this,Oi,void 0),(e=c(this,ra))==null||e.call(this),u(this,ra,void 0),c(this,Zn)!==void 0&&pe(c(this,Zn)),u(this,Zn,void 0)}setFlows(e){let n=Array.isArray(e)?e:[];u(this,ll,n.map(r=>{if(typeof r=="string")return r.length>0?{name:r}:null;if(typeof r=="object"&&r!==null){let i=r,s=i.name;if(typeof s!="string"||s.length===0)return null;let a=i.start;return typeof a=="string"&&a.length>0?{name:s,start:a}:{name:s}}return null}).filter(r=>r!==null)),h(this,at,sm).call(this)}refilterFlows(){h(this,at,sm).call(this)}setState(e,n,r){u(this,Dr,e),c(this,Ni)?.setAttribute(Pk,e);let i=r!==void 0&&r!==hs.CALM;i?c(this,Ni)?.setAttribute(XA,r):c(this,Ni)?.removeAttribute(XA),c(this,Zn)!==void 0&&(pe(c(this,Zn)),u(this,Zn,void 0));let s=c(this,Gt),a=e===ye.ENDED;if(s.pauseBtn!==void 0&&(JA(s.pauseBtn,e===ye.PAUSED),s.pauseBtn.disabled=a),s.endBtn!==void 0&&(s.endBtn.disabled=a),s.copyBtn!==void 0&&(a?s.copyBtn.removeAttribute("hidden"):s.copyBtn.setAttribute("hidden","")),s.exportBtn!==void 0&&(a?s.exportBtn.removeAttribute("hidden"):s.exportBtn.setAttribute("hidden","")),s.banner!==void 0){let l=n!==void 0&&n.trim().length>0?n.trim():"";s.banner.textContent=i&&l.length>0?l:`${ty}${l.length>0?` \xB7 ${l}`:""}`}if(a){let l=c(this,cl);u(this,Zn,z(()=>{l?.setAttribute($k,Uk)},c(this,jt).endedFadeMs))}c(this,jt).onStateChange?.(e)}};Gt=new WeakMap,Dr=new WeakMap,Zn=new WeakMap,Ni=new WeakMap,cl=new WeakMap,ll=new WeakMap,ra=new WeakMap,Oi=new WeakMap,jt=new WeakMap,at=new WeakSet,im=function(){return JSON.stringify(c(this,jt).runState(),null,2)},ly=function(){navigator.clipboard?.writeText(h(this,at,im).call(this)),Ft().clearOnCopy&&c(this,jt).clearRunLog?.();let e=c(this,Gt).exportMsg;e!==void 0&&(e.textContent=Fk,e.setAttribute("data-show","1"),z(()=>e.setAttribute("data-show","0"),1600))},dy=function(){let e=new Blob([h(this,at,im).call(this)],{type:"application/json"}),n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=Gk,r.click(),URL.revokeObjectURL(n),Ft().clearOnCopy&&c(this,jt).clearRunLog?.()},uy=function(){c(this,Dr)===ye.PAUSED?(c(this,jt).emit(kn.RESUME),this.setState(ye.ACTIVE)):c(this,Dr)===ye.ACTIVE&&(c(this,jt).emit(kn.PAUSE),this.setState(ye.PAUSED))},py=function(){c(this,Dr)!==ye.ENDED&&(c(this,jt).emit(kn.END),this.setState(ye.ENDED))},sm=function(){let e=c(this,Gt).flows;if(e===void 0)return;let n=e.ownerDocument,r=new Set(Array.from(n.querySelectorAll("[data-testid]")).map(s=>s.getAttribute("data-testid"))),i=c(this,ll).filter(s=>s.start===void 0||r.has(s.start));e.querySelectorAll("[data-reticle-replay]").forEach(s=>s.remove());for(let s of i){let a=n.createElement("button");a.type="button",a.className="reticle-flow",a.setAttribute("data-reticle-replay",s.name),a.textContent=`\u25B6 ${s.name}`,e.appendChild(a)}e.setAttribute("data-has",i.length>0?"1":"0")}});var Z,R,Te,Vt,am,fy,hy=T(()=>{"use strict";mo();it();it();Ir();Z="data-reticle-overlay",R="data-reticle-hud",Te="data-reticle-chat-panel",Vt="data-reticle-state",am="data-reticle-tone",fy=`
438
+ /**
439
+ * ONE colour says what the session is doing, and the user picks all three.
440
+ *
441
+ * --reticle-state resolves against the overlay's state attributes, and everything that signals -
442
+ * the dot, the chat panel's wash and glow, the page edges, the collapsed FAB's halo - reads it.
443
+ * The defaults are blue / amber / red; the settings panel writes --reticle-c-* from the swatches,
444
+ * because a signal colour that disappears into the user's own palette is not a signal.
445
+ */
446
+ [${Z}]{
447
+ --reticle-c-active:#3b82f6;--reticle-c-idle:#eab308;--reticle-c-ended:#ef4444;
448
+ --reticle-state:var(--reticle-c-idle);}
449
+ [${Z}][${Jc}="active"]{--reticle-state:var(--reticle-c-active);}
450
+ [${Z}][${Vt}="paused"]{--reticle-state:var(--reticle-c-idle);}
451
+ [${Z}][${Vt}="ended"]{--reticle-state:var(--reticle-c-ended);}
452
+ [${j}]{
453
+ --reticle-surface:rgba(255,255,255,.06);
454
+ /* No literal here: --reticle-accent is published on the overlay from the chosen status theme.
455
+ Redefining it on the dock made every accented control - toolbar toggles, focus rings, the send
456
+ button - stay blue no matter which theme was picked, because the dock's value won for its own
457
+ subtree. The fallback only matters if the presenter is mounted without settings. */
458
+ --reticle-accent:var(--reticle-c-active,#3b82f6);
459
+ --reticle-accent-soft:color-mix(in srgb,var(--reticle-accent) 18%,transparent);
460
+ --reticle-bg:#050506;--reticle-bg2:#0c0c10;
461
+ --reticle-fg:#fff;--reticle-muted:rgba(255,255,255,.85);--reticle-faint:rgba(255,255,255,.5);
462
+ --reticle-line:rgba(255,255,255,.12);--reticle-line2:rgba(255,255,255,.08);
463
+ --reticle-read:#d4d4d4;--reticle-ok:#fafafa;--reticle-bad:#f5f5f5;
464
+ --reticle-font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
465
+ --reticle-shell-ease:cubic-bezier(.22,1,.36,1);
466
+ --reticle-shell-fast:.22s var(--reticle-shell-ease);
467
+ --reticle-mark-accent:var(--reticle-accent);
468
+ position:fixed;right:20px;bottom:20px;left:auto;
469
+ z-index:2147483647;pointer-events:none;display:flex;flex-direction:column;align-items:flex-end;gap:8px;
470
+ overflow:visible;max-width:calc(100vw - 24px);font-family:var(--reticle-font);-webkit-font-smoothing:antialiased;
471
+ /**
472
+ * ONE width for the dock and the chat above it. They were 420px and 320px, so the toolbar
473
+ * overhung the panel it belongs to and the pair read as two unrelated widgets.
474
+ */
475
+ /* ONE width for the chat, the capsule and the toolbar. It used to be 440 with a "compact" 340
476
+ toggle; 340 is the size that actually reads well beside an app, so it is simply the size. */
477
+ --reticle-dock-w:340px;
478
+ /* The log is the reason the panel exists, so it gets the height rather than the chrome. */
479
+ --reticle-chat-h:660px;
480
+ opacity:0;transform:translate3d(0,8px,0);transition:opacity var(--reticle-shell-fast),transform var(--reticle-shell-fast);}
481
+ [${j}][data-dragged="1"]{left:var(--reticle-hud-x);top:var(--reticle-hud-y);bottom:auto;right:auto;transform:none;}
482
+ [${j}][data-dragged="1"][data-on="1"]{transform:none;}
483
+ [${j}][data-on="1"]{opacity:1;transform:translate3d(0,0,0);pointer-events:none;}
484
+ [${j}][data-on="0"]{opacity:0;pointer-events:none;}
485
+ /**
486
+ * The panel is GLASS, tinted by the state colour, with the glow sitting behind it - restored from
487
+ * the version before this one, where a flat near-black card had replaced it. Kept at ~92% opacity
488
+ * rather than a real backdrop-filter: blur(24px) here was measured as the single most expensive
489
+ * thing in the whole SDK (+4pp of main thread on the hostile fixture), and the tint buys the look
490
+ * without the bill.
491
+ */
492
+ [${Te}]{
493
+ background:
494
+ radial-gradient(130% 90% at 50% 0%,color-mix(in srgb,var(--reticle-c-active) 18%,transparent),transparent 62%),
495
+ linear-gradient(180deg,rgba(13,15,22,.96),rgba(19,22,32,.94));
496
+ border:1px solid color-mix(in srgb,var(--reticle-c-active) 26%,rgba(255,255,255,.1));
497
+ display:none;position:absolute;right:0;left:auto;bottom:calc(100% + 8px);top:auto;z-index:5;
498
+ box-sizing:border-box;width:var(--reticle-dock-w);max-width:min(var(--reticle-dock-w),calc(100vw - 16px));
499
+ max-height:min(var(--reticle-chat-max-h,var(--reticle-chat-h)),calc(100vh - 120px));
500
+ flex-direction:column;overflow:hidden;text-align:left;
501
+ color:var(--reticle-fg);font-size:13px;line-height:1.5;
502
+ border-radius:16px;
503
+ box-shadow:${Cr},0 0 54px -18px var(--reticle-c-active);
504
+ contain:layout style paint;
505
+ transform:translateZ(0);
506
+ pointer-events:none;}
507
+ [${j}][${qs}="below"] [${Te}]{
508
+ bottom:auto;top:calc(100% + 8px);}
509
+ [${j}][${Ht}="start"] [${Te}]{
510
+ right:auto;left:0;}
511
+ [${Z}][${qe}="1"] [${Te}]{
512
+ display:flex;pointer-events:auto;}
513
+ /**
514
+ * Idle, and not blocking the page: the card is not in use.
515
+ *
516
+ * The log fills the panel and sets pointer-events itself, so a click meant for a control sitting
517
+ * under the card landed on an empty transcript. Playwright named that div. The card passes the
518
+ * event through. The buttons stay clickable, which is the chrome a person still needs (#992).
519
+ */
520
+ [${Z}][data-reticle-mode="idle"][data-reticle-block="0"] [${Te}],
521
+ [${Z}][data-reticle-mode="idle"][data-reticle-block="0"] [${Te}] [data-reticle-log]{
522
+ pointer-events:none;}
523
+ [${Z}][data-reticle-mode="idle"][data-reticle-block="0"] [${Te}] :is(button,a,input,select,textarea){
524
+ pointer-events:auto;}
525
+ /**
526
+ * Minimising the chat leaves a CAPSULE, not a hole: the same glass, the same state dot, the last
527
+ * thing the agent did - sitting directly above the toolbar capsule and reopening the panel when
528
+ * clicked. Leaving the toolbar alone above an empty gap would make a minimised session look
529
+ * identical to no session at all.
530
+ */
531
+ [${St}]{
532
+ display:none;position:absolute;right:0;left:auto;bottom:calc(100% + 8px);z-index:5;
533
+ box-sizing:border-box;width:var(--reticle-dock-w);
534
+ max-width:min(var(--reticle-dock-w),calc(100vw - 16px));
535
+ align-items:center;gap:9px;padding:9px 16px;border-radius:999px;cursor:pointer;
536
+ background:
537
+ radial-gradient(120% 160% at 50% 0%,color-mix(in srgb,var(--reticle-state) 18%,transparent),transparent 70%),
538
+ linear-gradient(180deg,rgba(13,15,22,.96),rgba(19,22,32,.94));
539
+ border:1px solid color-mix(in srgb,var(--reticle-state) 26%,rgba(255,255,255,.1));
540
+ box-shadow:${Cr},0 0 34px -14px var(--reticle-state);
541
+ color:var(--reticle-muted);font-family:var(--reticle-font);font-size:11px;line-height:1;
542
+ transition:transform .1s ease,border-color .2s ease;}
543
+ [${j}][${qs}="below"] [${St}]{bottom:auto;top:calc(100% + 8px);}
544
+ [${j}][${Ht}="start"] [${St}]{right:auto;left:0;}
545
+ [${Z}][${ke}="0"]:not([${qe}="1"]) [${St}]{
546
+ display:inline-flex;pointer-events:auto;}
547
+ [${St}]:hover{border-color:color-mix(in srgb,var(--reticle-c-active) 45%,transparent);}
548
+ [${St}]:active{transform:scale(.98);}
549
+ /* No dot in the capsule: the mark, the border and the glow already carry the state colour, and a
550
+ pulsing dot next to a line of text that changes on its own was two things moving for one fact. */
551
+ [${St}] .reticle-mark{flex:none;height:14px;width:auto;color:var(--reticle-fg);opacity:.9;}
552
+ /* Header: who this panel belongs to, and what the session is doing right now. */
553
+ [${Te}] .reticle-chat-head{
554
+ flex:none;display:flex;align-items:center;gap:8px;padding:11px 44px 9px 14px;
555
+ border-bottom:1px solid rgba(255,255,255,.06);}
556
+ [${Te}] .reticle-chat-brand{display:inline-flex;align-items:center;gap:7px;color:var(--reticle-fg);}
557
+ /* The account capsule lives in the header, not the toolbar. The toolbar row is already 13px over its
558
+ own width, so a 20px avatar there pushed the close button outside the panel. The header has the
559
+ space, is visible under exactly the same condition, and is where an account avatar belongs anyway.
560
+ margin-left:auto right-aligns it; the head reserves 44px of right padding for the caret above it,
561
+ so the two never overlap. The :empty rule keeps the gap closed when no account state was sent. */
562
+ [${Te}] .reticle-head-account{margin-left:auto;display:inline-flex;align-items:center;}
563
+ [${Te}] .reticle-head-account:empty{display:none;}
564
+ [${Te}] .reticle-chat-brand .reticle-mark{height:14px;width:auto;}
565
+ [${Te}] .reticle-chat-brandname{font-size:12.5px;font-weight:600;letter-spacing:.01em;}
566
+ /* No state word here: the activity strip immediately below already says "idle \xB7 21s", and the
567
+ dot in front of it carries the same colour. One fact, one place. */
568
+ [${St}] .reticle-chat-pill-text{
569
+ flex:1;text-align:left;
570
+ min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
571
+ font-variant-numeric:tabular-nums;letter-spacing:.01em;}
572
+ [${St}] .reticle-chat-pill-time{
573
+ flex:none;color:var(--reticle-faint);font-variant-numeric:tabular-nums;}
574
+ [${St}] .reticle-chat-pill-caret{
575
+ flex:none;display:inline-flex;color:var(--reticle-faint);line-height:0;transform:rotate(180deg);}
576
+ [${St}] .reticle-chat-pill-caret svg{
577
+ display:block;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
578
+ /* Minimise the chat without collapsing the whole HUD \u2014 sits over the panel's top-right corner. */
579
+ [${j}] .reticle-chat-min{
580
+ position:absolute;top:6px;right:6px;z-index:4;
581
+ width:26px;height:26px;padding:0;border:none;border-radius:50%;cursor:pointer;
582
+ display:inline-flex;align-items:center;justify-content:center;
583
+ background:transparent;color:rgba(255,255,255,.6);line-height:0;}
584
+ [${j}] .reticle-chat-min:hover{background:rgba(255,255,255,.07);color:var(--reticle-fg);}
585
+ [${j}] .reticle-chat-min svg{display:block;fill:none;stroke:currentColor;stroke-width:1.5;
586
+ stroke-linecap:round;stroke-linejoin:round;}
587
+ [${Z}][${gu}="0"] [${au}]{display:none;}
588
+ [${Z}][${qn}="1"] [${R}],
589
+ [${Z}][${qn}="1"] [${Te}],
590
+ [${Z}][${qn}="1"] [data-reticle-settings-panel]{
591
+ transition-duration:.01ms !important;}
592
+ [${Z}][${qn}="1"] .reticle-fab-pulse,
593
+ [${Z}][${qn}="1"] .reticle-act-dot,
594
+ [${Z}][${qn}="1"] [data-bump="1"]{animation:none !important;}
595
+ [${R}]{
596
+ /* Centre the toolbar in the pill. The toolbar is 32px inside a 36px content box and, as a plain
597
+ block child, sat flush against padding-top - every icon rode 2px high in a rounded bar, which
598
+ is exactly the offset the eye picks up on a pill. */
599
+ position:relative;box-sizing:border-box;pointer-events:auto;flex:none;
600
+ display:flex;align-items:center;
601
+ width:44px;height:44px;min-height:44px;max-height:44px;overflow:visible;
602
+ background:${Dh};
603
+ color:#fff;border:none;border-radius:22px;
604
+ box-shadow:0 2px 12px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.06),0 0 0 1px rgba(255,255,255,.1);
605
+ contain:layout style;
606
+ transition:width .26s var(--reticle-shell-ease),border-radius .26s var(--reticle-shell-ease),
607
+ transform var(--reticle-shell-fast),opacity .18s ease;
608
+ will-change:width,border-radius,transform;}
609
+ [${Z}][${ke}="0"] [${R}]{
610
+ box-shadow:0 4px 20px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.08),0 0 0 1px rgba(255,255,255,.12);}
611
+ [${R}] .reticle-hud-deco{
612
+ position:absolute;inset:0;z-index:0;border-radius:inherit;pointer-events:none;
613
+ opacity:0;visibility:hidden;}
614
+ [${Z}][${ke}="0"] [${R}] .reticle-hud-deco{
615
+ opacity:1;visibility:visible;}
616
+ [${R}][data-on="0"]{opacity:0;transform:scale(.8);pointer-events:none;}
617
+ [${R}][data-on="1"]{opacity:1;transform:scale(1);}
618
+ /* The expanded HUD IS the shared column width; the toolbar fills its content box. Sizing the
619
+ toolbar to the dock width instead pushed it past the HUD's padding, and the last button - Exit -
620
+ rendered outside the rounded box it belongs to. */
621
+ [${Z}][${ke}="0"] [${R}]{
622
+ width:min(calc(100vw - 24px),var(--reticle-dock-w));height:44px;min-height:44px;max-height:44px;
623
+ min-width:44px;border-radius:24px;padding:4px 6px;}
624
+ [${R}] .reticle-fab{
625
+ position:absolute;inset:0;z-index:2;display:inline-flex;align-items:center;justify-content:center;
626
+ width:44px;height:44px;padding:0;margin:0;border:none;border-radius:22px;cursor:pointer;
627
+ background:transparent;color:var(--reticle-fg);line-height:0;
628
+ transition:background .15s ease,transform .1s ease;}
629
+ /**
630
+ * Collapsed, the circle IS the whole HUD - so it has to say on its own whether Reticle is working,
631
+ * waiting or done. It carries the state colour as a halo: breathing while the agent drives, a
632
+ * steady soft ring while idle, and a flat dim ring once the session has ended.
633
+ */
634
+ [${Z}][${ke}="1"] [${R}] .reticle-fab{
635
+ cursor:grab;touch-action:none;user-select:none;
636
+ box-shadow:0 0 0 1px color-mix(in srgb,var(--reticle-state) 55%,transparent),
637
+ 0 0 14px -2px color-mix(in srgb,var(--reticle-state) 45%,transparent);}
638
+ [${Z}][${ke}="1"][${Jc}="active"] [${R}] .reticle-fab{
639
+ animation:reticle-fab-breathe 1.6s ease-in-out infinite;}
640
+ [${Z}][${ke}="1"][${Vt}="ended"] [${R}] .reticle-fab{
641
+ animation:none;box-shadow:0 0 0 1px color-mix(in srgb,var(--reticle-state) 40%,transparent);}
642
+ @keyframes reticle-fab-breathe{
643
+ 0%,100%{box-shadow:0 0 0 1px color-mix(in srgb,var(--reticle-state) 70%,transparent),
644
+ 0 0 16px -2px color-mix(in srgb,var(--reticle-state) 55%,transparent)}
645
+ 50%{box-shadow:0 0 0 2px var(--reticle-state),
646
+ 0 0 28px 2px color-mix(in srgb,var(--reticle-state) 70%,transparent)}}
647
+ [${Z}][${qn}="1"] [${R}] .reticle-fab{animation:none;}
648
+ [${Z}][${ke}="1"] [${R}] .reticle-fab.reticle-drag-handle--dragging{
649
+ cursor:grabbing;}
650
+ [${R}] .reticle-fab-mark{height:22px;width:auto;pointer-events:none;}
651
+ [${R}] .reticle-fab:hover{background:rgba(255,255,255,.08);}
652
+ [${R}] .reticle-fab:active{transform:scale(.95);}
653
+ [${R}] .reticle-fab:focus-visible{outline:2px solid color-mix(in srgb,var(--reticle-accent) 75%,transparent);outline-offset:2px;}
654
+ [${R}] .reticle-fab-pulse{
655
+ position:absolute;top:6px;right:6px;width:6px;height:6px;border-radius:50%;
656
+ background:var(--reticle-accent);opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s;}
657
+ [${R}] .reticle-fab[data-pulse="1"] .reticle-fab-pulse{opacity:1;transform:scale(1);}
658
+ [${R}] .reticle-fab-badge{
659
+ position:absolute;top:-13px;right:-13px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;
660
+ background:var(--reticle-accent);color:#fff;font-size:10px;font-weight:600;
661
+ display:flex;align-items:center;justify-content:center;pointer-events:none;
662
+ box-shadow:0 1px 3px rgba(0,0,0,.15);}
663
+ [${R}] .reticle-fab-badge[hidden]{display:none;}
664
+ [${Z}][${ke}="0"] [${R}] .reticle-fab{
665
+ opacity:0;pointer-events:none;visibility:hidden;}
666
+ /* The toolbar is the third element in the same column, so it carries the same width as the chat
667
+ and the capsule above it and spreads its groups across it, rather than hugging its icons. */
668
+ [${R}] .reticle-toolbar{
669
+ position:relative;z-index:1;display:none;align-items:center;justify-content:space-between;
670
+ box-sizing:border-box;width:100%;
671
+ gap:4px;height:32px;padding:0 2px;
672
+ overflow:visible;opacity:0;transform:scale(.94);pointer-events:none;
673
+ transition:opacity .2s var(--reticle-shell-ease),transform .18s var(--reticle-shell-ease);}
674
+ [${Z}][${ke}="0"] [${R}] .reticle-toolbar{
675
+ display:flex;opacity:1;transform:scale(1);pointer-events:auto;}
676
+ /* The HUD block is transformed, which makes it a stacking context at level 0 inside the dock, so a
677
+ tooltip's z-index only ranked it within the block and it drew behind the chat and settings panels,
678
+ its siblings. Lift the block while a tooltip can show. */
679
+ [${R}]:hover,[${R}]:focus-within{z-index:${String(kh)};}
680
+ [${R}] .reticle-toolbar-drag{cursor:grab;touch-action:none;user-select:none;}
681
+ [${R}] .reticle-toolbar-drag.reticle-drag-handle--dragging{cursor:grabbing;}
682
+ [${R}] .reticle-toolbar-actions{
683
+ display:inline-flex;align-items:center;gap:2px;flex:none;
684
+ padding:2px;border-radius:999px;background:rgba(0,0,0,.2);}
685
+ [${R}] .reticle-toolbar-chrome{display:inline-flex;align-items:center;gap:2px;flex:none;}
686
+ [${R}] .reticle-tb-sep{width:1px;height:14px;background:rgba(255,255,255,.12);margin:0 4px;flex:none;align-self:center;}
687
+
688
+ [${R}] .reticle-tb-wrap{position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;}
689
+ [${R}] .reticle-tb-btn{
690
+ flex:none;display:inline-flex;align-items:center;justify-content:center;
691
+ width:32px;height:32px;padding:0;border:none;border-radius:50%;cursor:pointer;
692
+ background:transparent;color:rgba(255,255,255,.85);line-height:0;
693
+ transition:background-color .15s ease,color .15s ease,transform .1s ease,opacity .2s ease;}
694
+ [${R}] .reticle-tb-btn:hover{background:rgba(255,255,255,.12);color:#fff;}
695
+ [${R}] .reticle-tb-btn:active{transform:scale(.92);}
696
+ [${R}] .reticle-tb-btn:focus-visible{outline:2px solid color-mix(in srgb,var(--reticle-accent) 65%,transparent);outline-offset:1px;}
697
+ [${R}] .reticle-tb-btn:disabled{opacity:.35;cursor:not-allowed;transform:none;}
698
+ [${R}] .reticle-tb-btn[data-active="1"]{color:var(--reticle-accent);
699
+ background:color-mix(in srgb, var(--reticle-accent) 25%, transparent);}
700
+ [${R}] .reticle-tb-btn--toggle[data-active="1"]{
701
+ color:var(--reticle-accent);background:transparent;}
702
+ [${R}] .reticle-tb-btn--toggle[data-active="1"]:hover{background:rgba(255,255,255,.06);color:var(--reticle-accent);}
703
+ [${R}] .reticle-hi-toggle{
704
+ position:relative;display:inline-flex;align-items:center;justify-content:center;
705
+ width:18px;height:18px;line-height:0;flex:none;}
706
+ [${R}] .reticle-hi-toggle .reticle-hi-icon{
707
+ position:absolute;inset:0;display:inline-flex;align-items:center;justify-content:center;
708
+ transition:opacity .14s ease;}
709
+ [${R}] .reticle-hi-toggle .reticle-hi-icon--solid{opacity:0;}
710
+ [${R}] .reticle-hi-toggle .reticle-hi-icon--solid svg{
711
+ transform:scale(1.12);transform-origin:center;}
712
+ /*
713
+ * Active toggles keep the OUTLINE icon. The solid heroicon is a filled glyph next to 1.5px strokes
714
+ * everywhere else, so a pressed button reads as a heavier typeface rather than as a state. Accent
715
+ * colour and the background above already carry the state without changing the icon's weight.
716
+ */
717
+ [${R}] .reticle-tb-btn--toggle[data-active="1"] .reticle-hi-icon--outline{opacity:1;}
718
+ [${R}] .reticle-tb-btn--toggle .reticle-hi-icon--solid{opacity:0;}
719
+ [${R}] .reticle-tb-btn--toggle .reticle-hi-icon--solid svg{color:inherit;}
720
+ [${R}] .reticle-tb-btn--primary[data-active="1"]{
721
+ color:#fff;background:rgba(255,255,255,.14);}
722
+ [${R}] .reticle-tb-btn[data-danger]:hover:not(:disabled){color:#ff383c;
723
+ background:color-mix(in srgb, #ff383c 25%, transparent);}
724
+ /**
725
+ * The toolbar is a FIXED number of slots.
726
+ *
727
+ * Copy and Export appear when a session ends, and the bar is already full - eleven icons in a pill
728
+ * sized for nine renders the last one outside the rounded box. They take the two slots Pause and End
729
+ * vacate: neither can do anything to an ended session, so the bar swaps two dead controls for two
730
+ * live ones and never changes width.
731
+ */
732
+ [${R}] .reticle-tb-btn--export{display:none;}
733
+ [${Z}][${Vt}="ended"] [${R}] .reticle-tb-btn--export{display:inline-flex;}
734
+ [${Z}][${Vt}="ended"] [${R}] [data-reticle-pause],
735
+ [${Z}][${Vt}="ended"] [${R}] [data-reticle-end]{display:none;}
736
+ [${R}] .reticle-tb-tip{
737
+ position:absolute;bottom:calc(100% + 14px);left:50%;transform:translateX(-50%) scale(.95);
738
+ padding:6px 10px;background:#1a1a1a;color:rgba(255,255,255,.9);font-size:12px;font-weight:500;
739
+ border-radius:8px;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;z-index:${String(kh)};
740
+ box-shadow:0 2px 8px rgba(0,0,0,.3);transition:opacity .135s ease,transform .135s ease,visibility .135s;}
741
+ [${R}] .reticle-tb-tip::after{
742
+ content:"";position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%) rotate(45deg);
743
+ width:8px;height:8px;background:#1a1a1a;border-radius:0 0 2px 0;}
744
+ [${R}] .reticle-tb-wrap:hover .reticle-tb-tip{
745
+ opacity:1;visibility:visible;transform:translateX(-50%) scale(1);transition-delay:.3s;}
746
+ [${R}] .reticle-tb-wrap:has(.reticle-tb-btn:disabled):hover .reticle-tb-tip{opacity:0;visibility:hidden;}
747
+ [${R}] .reticle-tb-wrap--pause:hover .reticle-pause-badge{opacity:0;}
748
+ [${R}] .reticle-tb-kbd{margin-left:4px;opacity:.5;}
749
+ [${R}] .reticle-pause-badge{
750
+ display:none;position:absolute;bottom:calc(100% + 5px);left:50%;transform:translateX(-50%);
751
+ align-items:center;flex:none;font-weight:600;letter-spacing:.08em;font-size:7px;
752
+ color:var(--reticle-fg);border:1px solid rgba(255,255,255,.16);background:rgba(0,0,0,.55);
753
+ padding:2px 6px;border-radius:999px;white-space:nowrap;pointer-events:none;z-index:2;
754
+ transition:opacity .12s ease;}
755
+ [${Z}][${Vt}="paused"] [data-reticle-badge]{display:inline-flex;}
756
+ /**
757
+ * The mode, ON the status row rather than under it.
758
+ *
759
+ * The action text beside it is flex:1, so this claims the right edge of the row and takes its space
760
+ * from the elided action text. Nothing above or below moves: growing and shrinking by the height of
761
+ * this pill on every tool call makes one status line look like a second UI appearing and leaving.
762
+ */
763
+ [${j}] .reticle-chip{display:none;flex:none;align-items:center;gap:4px;font-size:8px;font-weight:600;letter-spacing:.06em;
764
+ height:16px;padding:0 7px;line-height:1;border-radius:999px;text-transform:uppercase;
765
+ background:rgba(255,255,255,.06);opacity:0;transition:opacity .12s ease;}
766
+ [${j}] .reticle-chip[data-mode="reading"],
767
+ [${j}] .reticle-chip[data-mode="acting"]{opacity:1;}
768
+ [${j}] .reticle-chip[data-mode="reading"],
769
+ [${j}] .reticle-chip[data-mode="acting"]{display:inline-flex;color:var(--reticle-fg);}
770
+ [${j}] .reticle-tally[hidden]{display:none;}
771
+ [${j}] .reticle-tally{align-self:center;flex:none;}
772
+ [${j}] .reticle-pill-group{
773
+ display:inline-flex;align-items:stretch;flex:none;border-radius:999px;overflow:hidden;
774
+ background:rgba(255,255,255,.06);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1);}
775
+ [${j}] .reticle-pill-segment{
776
+ display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;
777
+ font-size:11px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1;color:var(--reticle-fg);}
778
+ [${j}] .reticle-pill-segment[data-z="1"]{opacity:.4;}
779
+ [${j}] .reticle-t-pass.reticle-pill-segment{background:rgba(34,197,94,.14);color:#bbf7d0;}
780
+ [${j}] .reticle-t-fail.reticle-pill-segment{background:rgba(239,68,68,.14);color:#fecaca;}
781
+ [${j}] .reticle-pill-sep{width:1px;align-self:stretch;background:rgba(255,255,255,.12);flex:none;margin:0;}
782
+ [${j}] .reticle-pill-count{min-width:1ch;}
783
+ [${j}] .reticle-tally .reticle-hi-icon{opacity:.92;}
784
+ @keyframes reticle-tally-pop{0%{transform:scale(1)}38%{transform:scale(1.3)}100%{transform:scale(1)}}
785
+ [${j}] .reticle-tally [data-bump="1"]{display:inline-flex;animation:reticle-tally-pop .36s cubic-bezier(.16,1,.3,1);}
786
+ [${R}] .reticle-hi-icon{display:inline-flex;align-items:center;justify-content:center;line-height:1;flex-shrink:0;color:inherit;}
787
+ [${R}] .reticle-hi-icon svg{display:block;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
788
+ [${R}] .reticle-live{display:none;}
789
+ [${Te}] .reticle-act-strip{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;
790
+ border-bottom:1px solid rgba(255,255,255,.07);background:rgba(0,0,0,.22);}
791
+ [${Te}] .reticle-act-dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--reticle-faint);
792
+ box-shadow:0 0 0 2px rgba(255,255,255,.04);transition:background .2s,box-shadow .2s;}
793
+ /**
794
+ * The status dot carries the session state in COLOUR, not only in the word next to it - and in the
795
+ * user's own colour for that state, so it reads against their app rather than ours.
796
+ */
797
+ [${Te}] .reticle-act-strip[data-liveness="active"] .reticle-act-dot,
798
+ [${Te}] .reticle-act-strip[data-liveness="idle"] .reticle-act-dot{
799
+ background:var(--reticle-state);
800
+ box-shadow:0 0 0 2px color-mix(in srgb,var(--reticle-state) 18%,transparent),
801
+ 0 0 8px color-mix(in srgb,var(--reticle-state) 45%,transparent);}
802
+ [${Te}] .reticle-act-strip[data-liveness="idle"] .reticle-act-dot{
803
+ animation:reticle-idle-pulse 2.4s ease-in-out infinite;}
804
+ /**
805
+ * Unreachable: present, and plainly not working.
806
+ *
807
+ * Muted rather than alarming. Nothing is broken in the user's app \u2014 Reticle simply has nobody to
808
+ * talk to \u2014 and a dev overlay that shouts about its own plumbing is one the user turns off.
809
+ */
810
+ [${Z}][${Vt}="unreachable"]{--reticle-state:var(--reticle-faint);}
811
+ [${Z}][${Vt}="unreachable"] [${Te}] .reticle-act-dot{animation:none;}
812
+ [${Z}][${Vt}="paused"] [${Te}] .reticle-act-dot,
813
+ [${Z}][${Vt}="ended"] [${Te}] .reticle-act-dot{animation:none;}
814
+ @keyframes reticle-idle-pulse{0%,100%{opacity:.45;transform:scale(.92)}50%{opacity:1;transform:scale(1)}}
815
+ [${Te}] .reticle-act{display:block;flex:1;min-width:0;color:var(--reticle-muted);font-size:11px;
816
+ font-variant-numeric:tabular-nums;letter-spacing:.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
817
+ [${Te}] .reticle-act-strip[data-liveness="active"] .reticle-act{color:var(--reticle-fg);}
818
+ [${R}] .reticle-pass{color:var(--reticle-ok);}[${R}] .reticle-fail{color:var(--reticle-bad);}
819
+ /**
820
+ * Paused and ended keep the STATE colour rather than washing out to grey.
821
+ *
822
+ * These three rules predate the status theme and forced the accent to a fixed grey, so the moment a
823
+ * session paused or ended every lit control in the toolbar lost its colour - the HUD read as
824
+ * switched off exactly when the person is looking at it to find out what happened. The colour is
825
+ * the theme's own paused/ended colour now, so "which state am I in" is answered by the same hue
826
+ * everywhere: the dot, the glow, the FAB halo, and the toolbar.
827
+ */
828
+ [${Z}][${Vt}="paused"] [${R}],
829
+ [${Z}][${Vt}="ended"] [${R}],
830
+ [${Z}][${am}="waiting"] [${R}]{
831
+ --reticle-accent:var(--reticle-state);
832
+ --reticle-accent-soft:color-mix(in srgb,var(--reticle-state) 18%,transparent);}
833
+ [${Z}][${am}="ask"] [${R}],
834
+ [${Z}][${am}="warn"] [${R}]{
835
+ --reticle-accent:var(--reticle-state);
836
+ --reticle-accent-soft:color-mix(in srgb,var(--reticle-state) 18%,transparent);}
837
+ @media (max-width:480px){
838
+ [${Te}]{width:min(100vw - 24px,320px);max-height:min(360px,calc(100vh - 100px));}
839
+ [${Z}][${ke}="0"] [${R}]{max-width:calc(100vw - 24px);}
840
+ }`});var my,gy,Ey,by=T(()=>{"use strict";Ir();my=20,gy=28,Ey=`
841
+ /* The control establishes its own stacking context, and a high one.
842
+ Its menu is absolutely positioned inside a panel whose other children (the log well, the act strip)
843
+ are themselves positioned with their own z-index, so a z-index on the MENU alone was being compared
844
+ inside the wrong context and lost to a sibling with a lower number. Raising it here, on the thing
845
+ that contains the menu, is what actually puts the menu above them. 9 clears the workspace menu's 8,
846
+ which is the highest in-panel chrome. */
847
+ /* The header row has to out-stack the log well, or nothing inside it can.
848
+ .reticle-chat-head is position:relative with z-index:2, so it IS a stacking context and the number
849
+ below is scoped inside it -- while the log well is a SIBLING, also at z-index:2, and later in DOM
850
+ order. Equal z, later sibling wins, so the well painted over the whole header and took the open
851
+ menu with it. The menu measured correctly and was invisible, which is the shape of bug that reads
852
+ as "the dropdown does not work". Raising the header is what lets its children escape; the two only
853
+ overlap while a menu is open, so nothing else moves. */
854
+ .reticle-chat-head{z-index:3;}
855
+ .reticle-account{position:relative;z-index:9;display:inline-flex;align-items:center;gap:6px;flex:none;}
856
+ .reticle-account-avatar{
857
+ display:inline-flex;align-items:center;justify-content:center;
858
+ width:${String(my)}px;height:${String(my)}px;border-radius:999px;
859
+ font-size:9px;font-weight:600;letter-spacing:.02em;
860
+ background:rgba(255,255,255,.12);color:rgba(255,255,255,.92);user-select:none;}
861
+ .reticle-account-avatar--lg{
862
+ width:${String(gy)}px;height:${String(gy)}px;font-size:11px;}
863
+
864
+ /* The trigger is the avatar plus a hit area, never a second visual element: an avatar that looks
865
+ like a button reads as an action, and this one opens a menu about a state. */
866
+ .reticle-account-trigger{
867
+ display:inline-flex;align-items:center;justify-content:center;
868
+ padding:0;border:none;background:transparent;cursor:pointer;line-height:0;border-radius:999px;
869
+ transition:box-shadow .12s,opacity .12s;}
870
+ .reticle-account-trigger:hover{opacity:.85;}
871
+ .reticle-account-trigger:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(255,255,255,.35);}
872
+ .reticle-account-trigger[aria-expanded="true"]{box-shadow:0 0 0 2px rgba(255,255,255,.28);}
873
+
874
+ .reticle-account-signin{
875
+ border:none;border-radius:6px;padding:2px 9px;cursor:pointer;font:inherit;font-size:10.5px;
876
+ background:rgba(255,255,255,.06);color:rgba(255,255,255,.75);transition:background .12s,color .12s;}
877
+ .reticle-account-signin:hover{background:rgba(255,255,255,.12);color:#fff;}
878
+
879
+ /* Anchored to the control and opening DOWNWARD.
880
+ Not upward, which is what it looked like it wanted: all three surfaces mount this near the TOP of
881
+ a panel whose own overflow is hidden for its rounded corners, so a menu opening upward is laid
882
+ out correctly and then clipped away entirely -- present to the probe, invisible to the eye. Panels
883
+ grow downward and have the height, so down is the direction that stays inside the box. */
884
+ .reticle-account-menu{
885
+ position:absolute;right:0;top:calc(100% + 8px);z-index:6;
886
+ min-width:212px;max-width:280px;padding:10px;box-sizing:border-box;
887
+ display:flex;flex-direction:column;gap:8px;
888
+ border-radius:10px;
889
+ /* The HUD's own surface tokens, not a colour invented here. A menu with its own near-black is a
890
+ second design language in the same panel, and a translucent one lets the panel's empty-state text
891
+ read straight through the rows -- which is what the first version did. */
892
+ ${el}
893
+ box-shadow:inset 0 1px 0 rgba(255,255,255,.09),${Cr};
894
+ font-size:11px;color:rgba(255,255,255,.78);text-align:left;}
895
+ .reticle-account-menu[hidden]{display:none;}
896
+
897
+ .reticle-account-head{display:flex;align-items:center;gap:8px;min-width:0;}
898
+ .reticle-account-who{display:flex;flex-direction:column;min-width:0;gap:1px;}
899
+ .reticle-account-org{
900
+ font-size:11.5px;font-weight:600;color:rgba(255,255,255,.95);
901
+ overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
902
+ .reticle-account-email{
903
+ font-size:10.5px;color:rgba(255,255,255,.55);
904
+ overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
905
+
906
+ .reticle-account-rows{
907
+ display:flex;flex-direction:column;gap:4px;
908
+ padding-top:8px;border-top:1px solid rgba(255,255,255,.08);}
909
+ .reticle-account-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;}
910
+ .reticle-account-k{color:rgba(255,255,255,.5);flex:none;}
911
+ .reticle-account-v{
912
+ color:rgba(255,255,255,.88);min-width:0;
913
+ overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
914
+ font-variant-numeric:tabular-nums;}
915
+
916
+ .reticle-account-actions{
917
+ display:flex;flex-direction:column;gap:2px;
918
+ padding-top:8px;border-top:1px solid rgba(255,255,255,.08);}
919
+ .reticle-account-action{
920
+ display:flex;align-items:center;gap:6px;width:100%;box-sizing:border-box;
921
+ padding:5px 6px;border:none;border-radius:6px;cursor:pointer;
922
+ font:inherit;font-size:11px;text-align:left;text-decoration:none;
923
+ background:transparent;color:rgba(255,255,255,.8);transition:background .12s,color .12s;}
924
+ .reticle-account-action:hover{background:rgba(255,255,255,.08);color:#fff;}
925
+ .reticle-account-action:focus-visible{outline:none;background:rgba(255,255,255,.1);color:#fff;}
926
+ /* The unlinked hint is a sentence, not a verb: it wraps rather than truncating, because a clipped
927
+ instruction is worse than a tall menu. */
928
+ .reticle-account-action--hint{
929
+ color:rgba(255,255,255,.5);font-size:10.5px;line-height:1.35;white-space:normal;cursor:pointer;}
930
+
931
+ .reticle-account-dashboard{
932
+ display:inline-flex;align-items:center;justify-content:center;
933
+ border:none;background:transparent;color:rgba(255,255,255,.6);cursor:pointer;line-height:0;padding:2px;}
934
+ .reticle-account-dashboard:hover{color:#fff;}
935
+ `});var Kk,Ty,_y=T(()=>{"use strict";Ir();it();Kk="data-reticle-overlay",Ty=`
936
+ [${$}]{
937
+ position:absolute;right:0;left:auto;bottom:calc(100% + 12px);z-index:31;
938
+ box-sizing:border-box;display:flex;flex-direction:column;width:var(--reticle-dock-w);
939
+ max-width:min(var(--reticle-dock-w),calc(100vw - 16px));max-height:calc(100vh - 140px);
940
+ opacity:0;visibility:hidden;transform:translate3d(0,6px,0) scale(.98);pointer-events:none;
941
+ border-radius:16px;border:1px solid color-mix(in srgb,var(--reticle-c-active) 26%,rgba(255,255,255,.1));
942
+ background:
943
+ radial-gradient(130% 90% at 50% 0%,color-mix(in srgb,var(--reticle-c-active) 18%,transparent),transparent 62%),
944
+ linear-gradient(180deg,rgba(13,15,22,.96),rgba(19,22,32,.94));
945
+ box-shadow:${Cr},0 0 54px -18px var(--reticle-c-active);
946
+ color:var(--reticle-fg);font-family:var(--reticle-font);
947
+ transition:opacity .18s ease,transform .18s ease,visibility .18s;}
948
+ [${j}][${Ht}="start"] [${$}]{right:auto;left:0;}
949
+ [${Kk}][${sn}="1"] [${$}]{
950
+ opacity:1;visibility:visible;transform:translate3d(0,0,0) scale(1);pointer-events:auto;}
951
+ [${$}] .reticle-report-inner{
952
+ display:flex;flex-direction:column;min-height:0;overflow:hidden;}
953
+ [${$}] .reticle-report-head{
954
+ flex:none;display:flex;align-items:center;gap:8px;padding:11px 12px 9px 14px;
955
+ border-bottom:1px solid rgba(255,255,255,.06);}
956
+ [${$}] .reticle-report-title{font-size:12.5px;font-weight:600;}
957
+ [${$}] .reticle-report-scope{
958
+ margin-left:auto;padding:3px 9px;border-radius:999px;cursor:pointer;
959
+ border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.04);
960
+ color:var(--reticle-muted);font:inherit;font-size:10.5px;}
961
+ [${$}] .reticle-report-scope:hover{background:rgba(255,255,255,.08);color:var(--reticle-fg);}
962
+ [${$}] .reticle-report-close{
963
+ flex:none;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;
964
+ border:none;background:transparent;color:var(--reticle-faint);cursor:pointer;line-height:0;}
965
+ [${$}] .reticle-report-close svg{display:block;fill:none;stroke:currentColor;stroke-width:1.6;}
966
+ [${$}] .reticle-report-body{
967
+ min-height:0;overflow-y:auto;padding:12px 14px 6px;
968
+ scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent;}
969
+ [${$}] .reticle-report-empty{
970
+ margin:0;padding:22px 6px;text-align:center;color:var(--reticle-faint);font-size:11.5px;}
971
+ /* The streak sits above the hero, as a flame and a number: it is the one stat that is about
972
+ TODAY, so it reads first and never competes with the count it sits over. */
973
+ [${$}] .reticle-report-streak{
974
+ display:inline-flex;align-items:baseline;gap:5px;margin-bottom:8px;padding:3px 9px;
975
+ border-radius:999px;background:rgba(255,255,255,.05);
976
+ border:1px solid color-mix(in srgb,var(--reticle-c-active) 22%,transparent);
977
+ font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;}
978
+ [${$}] .reticle-report-streak-label{
979
+ color:var(--reticle-faint);font-size:9.5px;font-weight:400;letter-spacing:.04em;text-transform:uppercase;}
980
+ [${$}] .reticle-report-hero{display:flex;flex-direction:column;gap:2px;margin-bottom:10px;}
981
+ [${$}] .reticle-report-hero-value{
982
+ font-size:34px;font-weight:700;line-height:1;letter-spacing:-.02em;color:var(--reticle-c-active);}
983
+ [${$}] .reticle-report-hero-label{color:var(--reticle-muted);font-size:11.5px;}
984
+ [${$}] .reticle-report-verdicts{display:flex;gap:6px;margin-bottom:12px;}
985
+ [${$}] .reticle-report-verdict{
986
+ flex:1;padding:5px 8px;border-radius:8px;font-size:10.5px;text-align:center;
987
+ background:rgba(255,255,255,.05);color:var(--reticle-muted);}
988
+ [${$}] .reticle-report-verdict[data-kind="fail"]{color:#fca5a5;}
989
+ [${$}] .reticle-report-verdict[data-kind="unknown"]{color:#fcd34d;}
990
+ [${$}] .reticle-report-grid{
991
+ display:grid;grid-template-columns:repeat(3,1fr);gap:6px;}
992
+ [${$}] .reticle-report-card{
993
+ display:flex;flex-direction:column;gap:2px;padding:8px;border-radius:10px;
994
+ background:rgba(255,255,255,.04);}
995
+ [${$}] .reticle-report-value{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;}
996
+ [${$}] .reticle-report-label{color:var(--reticle-faint);font-size:9.5px;line-height:1.3;}
997
+ /* An estimate is labelled as one, and its label carries what it is measured against. */
998
+ [${$}] .reticle-report-basis{
999
+ display:block;margin-top:2px;color:var(--reticle-c-active);opacity:.8;
1000
+ font-size:8.5px;letter-spacing:.06em;text-transform:uppercase;cursor:help;}
1001
+ [${$}] .reticle-report-defects-wrap{margin-top:14px;}
1002
+ /* The heading and its push control on one line, so the button reads as belonging to this section
1003
+ rather than floating above the list. */
1004
+ [${$}] .reticle-report-defects-head{
1005
+ display:flex;align-items:center;justify-content:space-between;gap:8px;}
1006
+ [${$}] .reticle-report-defects{
1007
+ display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;}
1008
+ /* A left rule rather than a card per row: ten cards in a 320px panel is a wall, and the rule keeps
1009
+ the list scannable as a list \u2014 which is what a person is doing when they open this. */
1010
+ [${$}] .reticle-report-defect{
1011
+ display:flex;flex-direction:column;gap:1px;padding:4px 0 4px 8px;
1012
+ border-left:2px solid color-mix(in srgb,#f87171 70%,transparent);}
1013
+ [${$}] .reticle-report-defect-title{
1014
+ font-size:11px;line-height:1.35;overflow-wrap:anywhere;}
1015
+ [${$}] .reticle-report-defect-detail{
1016
+ color:var(--reticle-faint);font-size:10px;line-height:1.35;overflow-wrap:anywhere;}
1017
+ [${$}] .reticle-report-defect-source{
1018
+ color:var(--reticle-faint);font-size:9.5px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
1019
+ overflow-wrap:anywhere;}
1020
+ .reticle-report-defect-link{flex:none;display:inline-flex;align-items:center;justify-content:center;
1021
+ width:20px;height:20px;border-radius:6px;color:var(--reticle-faint);pointer-events:auto;
1022
+ opacity:0;transition:opacity .12s ease,color .12s ease,background .12s ease;}
1023
+ .reticle-report-defect:hover .reticle-report-defect-link,
1024
+ .reticle-report-defect-link:focus-visible{opacity:1;}
1025
+ .reticle-report-defect-link:hover{color:var(--reticle-fg);background:rgba(255,255,255,.07);}
1026
+ [${$}] .reticle-report-defects-more{
1027
+ display:inline-block;margin-top:8px;font-size:10px;color:var(--reticle-c-active);
1028
+ text-decoration:none;}
1029
+ [${$}] .reticle-report-defects-more:hover{text-decoration:underline;}
1030
+ [${$}] .reticle-report-local-only{
1031
+ margin:14px 0 0;padding-top:10px;border-top:1px solid var(--reticle-line);
1032
+ color:var(--reticle-faint);font-size:10px;line-height:1.45;}
1033
+ [${$}] .reticle-report-local-only code{
1034
+ font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--reticle-c-active);}
1035
+ [${$}] .reticle-report-chart-wrap{margin-top:12px;}
1036
+ [${$}] .reticle-report-section{
1037
+ display:block;margin-bottom:6px;color:var(--reticle-faint);font-size:9.5px;
1038
+ letter-spacing:.06em;text-transform:uppercase;}
1039
+ /* Thirty fixed slots, not a flex row: one recorded day is one thin bar on a month's axis, and a
1040
+ single stretched block would read as "a month of solid work" on the day you install it. */
1041
+ [${$}] .reticle-report-chart{
1042
+ display:grid;grid-template-columns:repeat(30,1fr);align-items:end;gap:2px;height:44px;padding:0 1px;}
1043
+ [${$}] .reticle-report-bar{
1044
+ min-width:2px;border-radius:2px 2px 0 0;
1045
+ background:color-mix(in srgb,var(--reticle-c-active) 55%,transparent);}
1046
+ [${$}] .reticle-report-bar[data-hot="1"]{background:#f87171;}
1047
+ [${$}] .reticle-report-foot{
1048
+ flex:none;display:flex;flex-wrap:wrap;gap:6px;padding:10px 14px 8px;
1049
+ border-top:1px solid rgba(255,255,255,.06);}
1050
+ [${$}] .reticle-report-share{
1051
+ padding:5px 10px;border-radius:8px;cursor:pointer;font:inherit;font-size:11px;
1052
+ border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.04);color:var(--reticle-muted);}
1053
+ [${$}] .reticle-report-share:hover{background:rgba(255,255,255,.09);color:var(--reticle-fg);}
1054
+ [${$}] .reticle-report-refer{
1055
+ border-color:color-mix(in srgb,var(--reticle-c-active) 45%,transparent);color:var(--reticle-fg);}
1056
+ [${$}] .reticle-report-links{
1057
+ flex:none;display:flex;gap:12px;padding:0 14px 12px;}
1058
+ [${$}] .reticle-report-links a{
1059
+ color:var(--reticle-faint);font-size:10.5px;text-decoration:none;}
1060
+ [${$}] .reticle-report-links a:hover{color:var(--reticle-fg);text-decoration:underline;}
1061
+
1062
+ /* Who this record belongs to, and the push-now control. Tokens only \u2014 no literal colours. */
1063
+ [${$}] .reticle-report-identity{
1064
+ display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:10px 14px 0;min-height:0;}
1065
+ [${$}] .reticle-report-identity:empty{display:none;}
1066
+ [${$}] .reticle-sync-now{
1067
+ display:inline-flex;align-items:center;justify-content:center;
1068
+ border:none;background:transparent;color:var(--reticle-faint);cursor:pointer;line-height:0;padding:2px;}
1069
+ [${$}] .reticle-sync-now:hover{color:var(--reticle-fg);}
1070
+ /* The one moment this control has an opinion: it says it is going, not that it has arrived. */
1071
+ [${$}] .reticle-sync-now[data-syncing="1"]{
1072
+ color:var(--reticle-c-active);animation:reticle-sync-spin 900ms linear infinite;}
1073
+ @keyframes reticle-sync-spin{to{transform:rotate(360deg);}}
1074
+ @media (prefers-reduced-motion:reduce){
1075
+ [${$}] .reticle-sync-now[data-syncing="1"]{animation:none;}}
1076
+ `});function xy(t){try{return t?.getItem(zk)==="1"}catch{return!1}}function Ay(t,e){if(t===void 0)return"";if(t.claimed){let r=t.daysRemaining;if(r===void 0||0>r)return"";let i=Yk>=r?dl.ending(r):dl.claimed(r);return`<div ${Sy} class="reticle-offer reticle-offer-claimed">${ul(i)}</div>`}if(t.eligible===!1||t.drivable===!1||e)return"";let n=t.claimUrl;return n===void 0||n.length===0?"":`<div ${Sy} class="reticle-offer" role="note">
1077
+ <span class="reticle-offer-title">${ul(dl.HEADLINE)}</span>
1078
+ <p class="reticle-offer-body">${ul(dl.BODY)}</p>
1079
+ <a ${Wk} class="reticle-offer-claim" href="${ul(n)}" target="_blank" rel="noopener noreferrer">${ul(dl.CLAIM)}</a>
1080
+ </div>`}var Sy,Wk,zk,dl,Yk,ul,yy,Uu=T(()=>{"use strict";Sy="data-reticle-offer",Wk="data-reticle-offer-claim",zk="reticle.harnessOffer.dismissed",dl={HEADLINE:"Get Harness free for 3 months",BODY:"Explores your app and saves every journey as a free replay.",CLAIM:"Claim now",DISMISS:"Not now",claimed:t=>`Harness active \u2014 ${String(t)} days left`,ending:t=>1>=t?"Harness free period ends today":`Harness free period ends in ${String(t)} days`},Yk=14;ul=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");yy=`
1081
+ .reticle-offer{margin:8px 10px;padding:10px 12px;border:1px solid var(--reticle-line,#2a2f3a);border-radius:10px;background:var(--reticle-surface-inset,rgba(255,255,255,.03));}
1082
+ .reticle-offer-title{display:block;font-weight:600;font-size:12px;padding-right:18px;}
1083
+ .reticle-offer-body{margin:6px 0 8px;font-size:11px;line-height:1.45;opacity:.8;}
1084
+ .reticle-offer-claim{display:inline-block;font-size:11px;font-weight:600;padding:4px 10px;border-radius:6px;background:var(--reticle-accent,#4f7cff);color:#fff;text-decoration:none;}
1085
+ .reticle-offer-claimed{margin:6px 10px;font-size:10px;opacity:.6;}
1086
+ `});function vy(){return`<div class="reticle-talk">
1087
+ <span class="reticle-talk-title">${Hu(cm.HEADLINE)}</span>
1088
+ <p class="reticle-talk-body">${Hu(cm.BODY)}</p>
1089
+ <a ${qk} class="reticle-talk-book" href="${Hu(ps)}" target="_blank" rel="noopener noreferrer">${Hu(cm.BOOK)}</a>
1090
+ </div>`}var qk,cm,Hu,Ry,lm=T(()=>{"use strict";P();qk="data-reticle-talk-book",cm={HEADLINE:"Talk to Founders",BODY:"Tell us where Reticle got in your way.",BOOK:"Book a call"},Hu=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");Ry=`
1091
+ .reticle-talk-title{display:block;font-weight:600;font-size:12px;padding-right:18px;}
1092
+ .reticle-talk-body{margin:6px 0 8px;font-size:11px;line-height:1.45;opacity:.8;}
1093
+ .reticle-talk-book{display:inline-block;font-size:11px;font-weight:600;padding:4px 10px;border-radius:6px;background:var(--reticle-accent,#4f7cff);color:#fff;text-decoration:none;}
1094
+ `});function um(t){let e=dm.get(t);e!==void 0&&clearInterval(e),dm.delete(t)}function Xk(){try{return globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches===!0}catch{return!1}}function Ly(t,e){t.setAttribute("data-active",String(e)),t.querySelectorAll(`[${wy}]`).forEach((n,r)=>{n.hidden=r!==e}),t.querySelectorAll(`[${Bu}]`).forEach((n,r)=>{n.setAttribute("aria-current",String(r===e))})}function Qk(t,e){if(t.length===0)return"";let n=Zk(e,t.length),r=t.map((s,a)=>`<div ${wy}="${s.id}" class="reticle-carousel-slide"${a===n?"":" hidden"}>${s.html}</div>`).join(""),i=t.length===1?"":`<div class="reticle-carousel-dots">${t.map((s,a)=>`<button type="button" ${Bu}="${String(a)}" class="reticle-carousel-dot" aria-label="${s.id}" aria-current="${String(a===n)}"></button>`).join("")}</div>`;return`<div ${Oy} class="reticle-carousel" role="region" aria-label="Reticle" data-active="${String(n)}">
1095
+ <button type="button" ${Cy} class="reticle-carousel-close" aria-label="${Ny}" title="${Ny}">\xD7</button>
1096
+ <div class="reticle-carousel-track">${r}</div>
1097
+ ${i}
1098
+ </div>`}function Jk(t){try{return t?.getItem(Iy)==="1"}catch{return!1}}function ky(t,e,n){let r=t.querySelector(`:scope > [${Oy}]`),i=Number(r?.getAttribute("data-active")??"0");if(r?.remove(),um(t),Jk(n))return;let s=Qk(e,i);if(s==="")return;t.insertAdjacentHTML("afterbegin",s);let a=t.firstElementChild;if(a instanceof HTMLElement){a.querySelector(`[${Cy}]`)?.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation();try{n?.setItem(Iy,"1")}catch{}um(t),a.remove()});for(let l of a.querySelectorAll(`[${Bu}]`))l.addEventListener("click",d=>{d.preventDefault(),d.stopPropagation(),Ly(a,Number(l.getAttribute(Bu)))});eD(t,a,e.length)}}function eD(t,e,n){if(n<2||Xk())return;let r=!1,i=()=>{r=!0},s=()=>{r=!1};e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",s),e.addEventListener("focusin",i),e.addEventListener("focusout",s),dm.set(t,setInterval(()=>{if(!e.isConnected){um(t);return}r||Ly(e,(Number(e.getAttribute("data-active"))+1)%n)},6e3))}var Oy,wy,Bu,Cy,Iy,Ny,dm,Zk,Dy,pm=T(()=>{"use strict";Oy="data-reticle-carousel",wy="data-reticle-carousel-slide",Bu="data-reticle-carousel-dot",Cy="data-reticle-carousel-close",Iy="reticle.carousel.dismissed",Ny="Close",dm=new WeakMap;Zk=(t,e)=>Number.isInteger(t)&&t>=0&&t<e?t:0;Dy=`
1099
+ .reticle-carousel{position:relative;margin:8px 10px;padding:10px 12px 8px;border:1px solid var(--reticle-line,#2a2f3a);border-radius:10px;background:var(--reticle-surface-inset,rgba(255,255,255,.03));}
1100
+ .reticle-carousel-track{height:100px;overflow:hidden;}
1101
+ .reticle-carousel-slide .reticle-offer,.reticle-carousel-slide .reticle-talk{margin:0;padding:0;border:0;background:none;}
1102
+ .reticle-carousel-close{position:absolute;top:4px;right:6px;width:20px;height:20px;padding:0;border:0;background:none;color:inherit;opacity:.55;cursor:pointer;font-size:14px;line-height:20px;}
1103
+ .reticle-carousel-close:hover{opacity:1;}
1104
+ .reticle-carousel-dots{display:flex;justify-content:center;gap:6px;margin-top:6px;}
1105
+ .reticle-carousel-dot{width:6px;height:6px;padding:0;border:0;border-radius:999px;background:currentColor;opacity:.3;cursor:pointer;}
1106
+ .reticle-carousel-dot[aria-current="true"]{opacity:.9;}
1107
+ `});var My,Py=T(()=>{"use strict";mo();$u();hy();$h();by();Ir();_y();Uu();lm();pm();My=`
1108
+ [data-reticle-overlay]{position:fixed;inset:0;pointer-events:none;z-index:${String(2147483600)};}
1109
+ /**
1110
+ * The session glow: the page itself says an agent is here, and BREATHES while it is working.
1111
+ *
1112
+ * A white 1px hairline with no animation replaced the accent-coloured, pulsing border, and the one
1113
+ * signal you could read without looking at the HUD - "something is driving my app right now" -
1114
+ * disappeared with it. The accent follows the HUD's own swatch (--reticle-mark-accent, set on the
1115
+ * overlay root), so glow, cursor and dock stay one colour.
1116
+ */
1117
+ [data-reticle-glow]{position:fixed;inset:0;pointer-events:none;z-index:${String(2147483600)};opacity:0;
1118
+ --reticle-glow:var(--reticle-state,var(--reticle-mark-accent,#6366f1));
1119
+ transition:opacity .25s ease;
1120
+ box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--reticle-glow) 70%,transparent),
1121
+ inset 0 0 22px 4px color-mix(in srgb,var(--reticle-glow) 26%,transparent);}
1122
+ [data-reticle-glow][data-on="1"]{opacity:1;animation:reticle-pulse 2.4s ease-in-out infinite;}
1123
+ [data-reticle-glow][data-on="1"][data-busy="1"]{animation:reticle-shimmer 1.1s ease-in-out infinite;}
1124
+ @keyframes reticle-pulse{
1125
+ 0%,100%{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--reticle-glow) 60%,transparent),
1126
+ inset 0 0 18px 3px color-mix(in srgb,var(--reticle-glow) 18%,transparent)}
1127
+ 50%{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--reticle-glow) 80%,transparent),
1128
+ inset 0 0 30px 6px color-mix(in srgb,var(--reticle-glow) 32%,transparent)}}
1129
+ @keyframes reticle-shimmer{
1130
+ 0%,100%{box-shadow:inset 0 0 0 3px color-mix(in srgb,var(--reticle-glow) 85%,transparent),
1131
+ inset 0 0 30px 7px color-mix(in srgb,var(--reticle-glow) 42%,transparent)}
1132
+ 50%{box-shadow:inset 0 0 0 3px var(--reticle-glow),
1133
+ inset 0 0 46px 12px color-mix(in srgb,var(--reticle-glow) 58%,transparent)}}
1134
+ [data-reticle-overlay][data-reticle-reduce-motion="1"] [data-reticle-glow][data-on="1"]{animation:none;}
1135
+ /* The page glow is the one signal that paints over the USER's app, so it is theirs to switch off.
1136
+ Every other signal - dot, panel, capsule, FAB halo - stays. */
1137
+ [data-reticle-overlay][data-reticle-ambient-glow="0"] [data-reticle-glow]{display:none;}
1138
+ [data-reticle-cursor]{position:fixed;top:0;left:0;width:20px;height:20px;margin:-10px 0 0 -10px;
1139
+ border:2px solid #fafafa;border-radius:50%;background:rgba(255,255,255,.12);pointer-events:none;
1140
+ z-index:2147483646;opacity:0;transition:transform .32s cubic-bezier(.22,1,.36,1),opacity .2s ease;}
1141
+ [data-reticle-cursor][data-on="1"]{opacity:1;}
1142
+ [data-reticle-cursor]::after{content:"";position:absolute;inset:6px;border-radius:50%;background:#fafafa;}
1143
+ [data-reticle-ripple]{position:fixed;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;
1144
+ background:rgba(255,255,255,.35);pointer-events:none;z-index:2147483645;animation:reticle-ripple .45s ease-out forwards;}
1145
+ @keyframes reticle-ripple{from{transform:scale(.5);opacity:.7}to{transform:scale(4);opacity:0}}
1146
+ [data-reticle-ring]{position:fixed;pointer-events:none;z-index:2147483644;border:1px solid rgba(255,255,255,.55);border-radius:6px;
1147
+ box-shadow:none;opacity:0;transition:opacity .15s ease;}
1148
+ [data-reticle-ring][data-on="1"]{opacity:1;}
1149
+ [data-reticle-mode="reading"] [data-reticle-glow][data-on="1"]{box-shadow:inset 0 0 0 2px rgba(255,255,255,.22);}
1150
+ [data-reticle-mode="reading"] [data-reticle-ring]{border-color:rgba(255,255,255,.7);box-shadow:none;}
1151
+ [data-reticle-overlay][data-reticle-throttled="1"] [data-reticle-glow][data-on="1"]{
1152
+ box-shadow:inset 0 0 0 2px rgba(255,255,255,.18);}
1153
+ [data-reticle-overlay] .reticle-hi-icon,
1154
+ [data-reticle-overlay] .reticle-sl-icon{display:inline-flex;align-items:center;justify-content:center;line-height:1;flex-shrink:0;color:inherit;overflow:visible;}
1155
+ [data-reticle-overlay] .reticle-hi-icon svg,
1156
+ [data-reticle-overlay] .reticle-sl-icon svg{display:block;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;overflow:visible;}
1157
+ ${fA}
1158
+ ${hA}
1159
+ ${fy}
1160
+ ${wu}
1161
+ ${Ty}
1162
+ ${Ey}
1163
+ ${yy}
1164
+ ${Ry}
1165
+ ${Dy}
1166
+ ${Kx}
1167
+ ${ry}`});function Qn(t){return t<1e3?String(Math.round(t)):t<1e6?`${Uy(t/1e3)}k`:`${Uy(t/1e6)}M`}function Uy(t){return t>=10?String(Math.round(t)):String(Math.round(t*10)/10)}function pl(t){let e=Math.floor(t/1e3);if(e<60)return`${String(e)}s`;let n=Math.floor(e/60);if(n<60)return`${String(n)}m`;let r=Math.floor(n/60);return n%60===0?`${String(r)}h`:`${String(r)}h ${String(n%60)}m`}function fm(t,e){let n=t.counts,r=e!==void 0&&e.length>0?` on ${e}`:"",i=[`My agent verified its own work ${String(n.verdicts)} times${r}.`,`${String(n.failed)} checks it refused to pass before I looked at any of them.`];return n.unknown>0&&i.push(`${String(n.unknown)} came back "unknown" - it drove the app and could not tell. That is the number I watch.`),t.records.longestRunMs>0&&i.push(`Longest unattended run: ${pl(t.records.longestRunMs)}.`),i.join(`
1168
+ `)}function Hy(t){let e=new URLSearchParams({text:t,url:So.SITE});return $y.length>0&&e.set("via",$y),`https://twitter.com/intent/tweet?${e.toString()}`}function By(){return`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(So.SITE)}`}function hm(){return`I have been verifying my agent's work from inside the running app with Reticle - it returns pass/fail with the file:line to fix. ${So.SITE}`}function Fy(t){let e=Ob.safeParse(t);return e.success?e.data:void 0}var So,$y,te,mm=T(()=>{"use strict";P();So={DOCS:"https://docs.reticle.sh",SITE:"https://reticle.sh",GITHUB:"https://github.com/reticlehq/reticle",DISCORD:"https://discord.gg/BwAbzv9ZRz"},$y="",te={TITLE:"Impact",PROJECT:"This project",GLOBAL:"Everything on this machine",HERO_DEFECTS:"checks Reticle refused to pass",VERDICTS:"Verdicts",PASSED:"passed",FAILED:"failed",UNKNOWN:"unknown",UNKNOWN_HELP:"Reticle drove the app and could not tell what happened. Not a pass - shown, not hidden.",CALLS:"Tool calls",TOKENS:"Tokens returned",DRIVING:"Time driving",SESSIONS:"Sessions",STREAK:"day streak",LONGEST:"Longest run",SAVED_TOKENS:"Tokens saved",SAVED_MINUTES:"Time saved",ESTIMATE_TAG:"estimate",CHART:"Verdicts, last 30 days",DEFECTS:"What broke",DEFECTS_MORE:"Manage all of them on the dashboard \u2014 triage, assign, and push to GitHub",DEFECT_LINK_TITLE:"Open on the dashboard to triage or push to GitHub",LOCAL_ONLY:"This record stops at this machine.",LOCAL_ONLY_ACTION:"reticle login",LOCAL_ONLY_TAIL:"keeps it, and lets a team see it.",UNLINKED:"Signed in, but this repo is not linked.",UNLINKED_ACTION:"reticle link",UNLINKED_TAIL:"sends this record to your workspace.",DEFECTS_NONE:"Nothing has failed a declared consequence yet.",EMPTY:"Nothing recorded yet. Drive the app once and this fills in.",SHARE:"Share",COPY:"Copy",COPIED:"Copied",REFER:"Send to a friend"}});function Yy(){let t=be(V.REMOVE,re.MIN);return`<div ${$} class="reticle-report ${Bt}" role="region" aria-label="Reticle impact" aria-hidden="true">
1169
+ <div class="reticle-report-inner">
1170
+ <div class="reticle-report-head">
1171
+ <span class="reticle-report-title">${te.TITLE}</span>
1172
+ <button type="button" ${jy} class="reticle-report-scope" aria-pressed="false">${te.PROJECT}</button>
1173
+ <button type="button" ${Oh} class="reticle-report-close" title="Close" aria-label="Close impact">${t}</button>
1174
+ </div>
1175
+ <div class="reticle-report-body" data-reticle-report-body></div>
1176
+ <div class="reticle-report-foot">
1177
+ <button type="button" ${Vy} class="reticle-report-share">Post on X</button>
1178
+ <button type="button" ${Ky} class="reticle-report-share">LinkedIn</button>
1179
+ <button type="button" ${Wy} class="reticle-report-share">${te.COPY}</button>
1180
+ <button type="button" ${zy} class="reticle-report-share reticle-report-refer">${te.REFER}</button>
1181
+ </div>
1182
+ <div class="reticle-report-links">
1183
+ <a data-reticle-link="docs" href="${So.DOCS}" target="_blank" rel="noreferrer noopener">Docs</a>
1184
+ <a data-reticle-link="github" href="${So.GITHUB}" target="_blank" rel="noreferrer noopener">GitHub</a>
1185
+ <a data-reticle-link="site" href="${So.SITE}" target="_blank" rel="noreferrer noopener">reticle.sh</a>
1186
+ <a data-reticle-link="discord" href="${So.DISCORD}" target="_blank" rel="noreferrer noopener">Discord</a>
1187
+ </div>
1188
+ </div>
1189
+ </div>`}function xo(t,e,n){let r=n===void 0?"":`<span class="reticle-report-basis" title="${n}">${te.ESTIMATE_TAG}</span>`;return`<div class="reticle-report-card"><span class="reticle-report-value">${t}</span><span class="reticle-report-label">${e}${r}</span></div>`}function nD(t){let e=t.days.slice(-30);if(e.length===0)return"";let n=Math.max(1,...e.map(i=>i.counts.verdicts)),r=e.map(i=>{let s=Math.max(4,Math.round(i.counts.verdicts/n*100)),a=`${i.date}: ${String(i.counts.verdicts)} verdicts, ${String(i.counts.failed)} defects`,l=i.counts.failed>0?' data-hot="1"':"";return`<span class="reticle-report-bar" style="height:${String(s)}%" title="${a}"${l}></span>`}).join("");return`<div class="reticle-report-chart-wrap"><span class="reticle-report-section">${te.CHART}</span><div class="reticle-report-chart">${r}</div></div>`}function rD(t,e){let n=(t.defects??[]).slice(0,Nb);if(n.length===0)return"";let r=e!==void 0&&nl(e),i=r?`<a class="reticle-report-defect-link" data-reticle-link="defect" href="${Xe(e)}" target="_blank" rel="noreferrer noopener" title="${te.DEFECT_LINK_TITLE}" aria-label="${te.DEFECT_LINK_TITLE}">${be(V.VIEW,re.SEND)}</a>`:"",s=n.map(d=>{let p=d.detail===void 0?"":`<span class="reticle-report-defect-detail">${Xe(d.detail)}</span>`,f=d.source===void 0?"":`<span class="reticle-report-defect-source">${Xe(d.source)}</span>`;return`<li class="reticle-report-defect"><span class="reticle-report-defect-title">${Xe(d.title)}</span>${p}${f}${i}</li>`}).join(""),a=r?`<a class="reticle-report-defects-more" data-reticle-link="dashboard" href="${Xe(e)}" target="_blank" rel="noreferrer noopener">${te.DEFECTS_MORE}${t.counts.failed>n.length?` (${String(t.counts.failed)})`:""}</a>`:"",l=Fh(e);return`<div class="reticle-report-defects-wrap"><div class="reticle-report-defects-head"><span class="reticle-report-section">${te.DEFECTS}</span>${l}</div><ul class="reticle-report-defects">${s}</ul>${a}</div>`}function oD(t,e,n,r){let i=t.counts;if(i.calls===0)return`<p class="reticle-report-empty">${te.EMPTY}</p>`;let s=t.records.streakDays>0?`<span class="reticle-report-streak" title="Consecutive days with at least one verdict">\u{1F525} ${String(t.records.streakDays)} <span class="reticle-report-streak-label">${te.STREAK}</span></span>`:"",a=`<div class="reticle-report-hero"><span class="reticle-report-hero-value">${Qn(i.failed)}</span><span class="reticle-report-hero-label">${te.HERO_DEFECTS}</span></div>`,l=`<div class="reticle-report-verdicts" title="${te.UNKNOWN_HELP}">
1190
+ <span class="reticle-report-verdict" data-kind="pass">${Qn(i.passed)} ${te.PASSED}</span>
1191
+ <span class="reticle-report-verdict" data-kind="fail">${Qn(i.failed)} ${te.FAILED}</span>
1192
+ <span class="reticle-report-verdict" data-kind="unknown">${Qn(i.unknown)} ${te.UNKNOWN}</span>
1193
+ </div>`,d=[xo(Qn(i.verdicts),te.VERDICTS),xo(Qn(i.calls),te.CALLS),xo(pl(i.drivingMs),te.DRIVING),xo(Qn(i.sessions),te.SESSIONS),xo(pl(t.records.longestRunMs),te.LONGEST),xo(Qn(i.tokensReturned),te.TOKENS),xo(Qn(t.savings.tokens.value),te.SAVED_TOKENS,t.savings.tokens.basis),xo(pl(t.savings.minutes.value*6e4),te.SAVED_MINUTES,t.savings.minutes.basis)].join("");return`${`<div class="reticle-report-identity">${ta(n,{dashboardUrl:e,projectName:r,verdicts:i.verdicts,defects:i.failed})}${Fh(e)}</div>`}${s}${a}${l}<div class="reticle-report-grid">${d}</div>${rD(t,e)}${nD(t)}${iD(t,e,n)}`}function iD(t,e,n){if(e!==void 0||t.counts.verdicts<=0||n===void 0)return"";let[r,i,s]=n.signedIn?[te.UNLINKED,te.UNLINKED_ACTION,te.UNLINKED_TAIL]:[te.LOCAL_ONLY,te.LOCAL_ONLY_ACTION,te.LOCAL_ONLY_TAIL];return`<p class="reticle-report-local-only">${r} <code>${i}</code> ${s}</p>`}var jy,Vy,Ky,Wy,zy,tD,sD,Gy,wi,oa,Ao,Jn,Mr,ia,ct,qy,Fu,gm,fl,Gu,Xy=T(()=>{"use strict";P();Yn();Ir();Uh();rl();it();mm();jy="data-reticle-report-scope",Vy="data-reticle-share-x",Ky="data-reticle-share-in",Wy="data-reticle-share-copy",zy="data-reticle-refer",tD=1600;sD=1200,Gy="data-syncing",Gu=class{constructor(e={}){m(this,ct);m(this,wi);m(this,oa);m(this,Ao);m(this,Jn);m(this,Mr,!1);m(this,ia);u(this,ia,e)}mount(e){u(this,Ao,e),u(this,wi,e.querySelector(`[${$}]`)??void 0),u(this,oa,e.querySelector("[data-reticle-report-body]")??void 0),e.querySelector(`[${Oh}]`)?.addEventListener("click",r=>{r.stopPropagation(),this.close()});let n=e.querySelector(`[${jy}]`);n?.addEventListener("click",r=>{r.stopPropagation(),u(this,Mr,!c(this,Mr)),n.setAttribute("aria-pressed",c(this,Mr)?"true":"false"),n.textContent=c(this,Mr)?te.GLOBAL:te.PROJECT,h(this,ct,Fu).call(this)}),e.querySelector(`[${Vy}]`)?.addEventListener("click",r=>{r.stopPropagation(),h(this,ct,gm).call(this,Hy(this.shareText()))}),e.querySelector(`[${Ky}]`)?.addEventListener("click",r=>{r.stopPropagation(),h(this,ct,fl).call(this,this.shareText()),h(this,ct,gm).call(this,By())}),e.querySelector(`[${Wy}]`)?.addEventListener("click",r=>{r.stopPropagation(),h(this,ct,fl).call(this,this.shareText(),r.currentTarget)}),e.querySelector(`[${zy}]`)?.addEventListener("click",r=>{r.stopPropagation(),h(this,ct,fl).call(this,hm(),r.currentTarget)}),e.addEventListener("click",r=>{let i=r.target;if(!(i instanceof Element))return;let s=i.closest(`[${yi}]`);if(s!==null){r.stopPropagation(),h(this,ct,fl).call(this,de.SIGNIN_COMMAND,s);return}let a=i.closest(`[${Bh}]`);a!==null&&(r.stopPropagation(),c(this,ia).onSyncNow?.(),a.setAttribute(Gy,"1"),setTimeout(()=>a.removeAttribute(Gy),sD))})}setSnapshot(e){u(this,Jn,e),this.isOpen()&&h(this,ct,Fu).call(this)}snapshot(){return c(this,Jn)}isOpen(){return c(this,Ao)?.getAttribute(sn)==="1"}open(){c(this,Ao)!==void 0&&(c(this,ia).onBeforeOpen?.(),h(this,ct,Fu).call(this),c(this,Ao).setAttribute(sn,"1"),c(this,wi)?.setAttribute("aria-hidden","false"))}close(){c(this,Ao)?.setAttribute(sn,"0"),c(this,wi)?.setAttribute("aria-hidden","true")}toggle(){this.isOpen()?this.close():this.open()}contains(e){return c(this,wi)?.contains(e)===!0}shareText(){let e=c(this,Jn);return e===void 0?hm():c(this,Mr)?fm(e.global):fm(e.project,e.projectName)}};wi=new WeakMap,oa=new WeakMap,Ao=new WeakMap,Jn=new WeakMap,Mr=new WeakMap,ia=new WeakMap,ct=new WeakSet,qy=function(){let e=c(this,Jn);if(e!==void 0)return c(this,Mr)?e.global:e.project},Fu=function(){let e=h(this,ct,qy).call(this);c(this,oa)!==void 0&&(c(this,oa).innerHTML=e===void 0?`<p class="reticle-report-empty">${te.EMPTY}</p>`:oD(e,c(this,Jn)?.dashboardUrl,c(this,Jn)?.account,c(this,Jn)?.projectName))},gm=function(e){window.open(e,"_blank","noopener,noreferrer")},fl=async function(e,n){try{await navigator.clipboard?.writeText(e)}catch{}if(n instanceof HTMLElement){let r=n.textContent??"";n.textContent=te.COPIED,window.setTimeout(()=>{n.textContent=r},tD)}}});function Qy(t,e){let n=Ay(t,e);return[...n===""?[]:[{id:Zy.HARNESS,html:n}],{id:Zy.FOUNDERS,html:vy()}]}var Zy,Jy=T(()=>{"use strict";Uu();lm();Zy={HARNESS:"harness",FOUNDERS:"founders"}});var Em,ev,bm,aD,tv,nv=T(()=>{"use strict";Em="Reticle",ev='<path d="M92.82 92.16C93.07 93.4 91.77 94.4 90.63 93.83C89.62 93.33 88.62 92.82 87.63 92.3C71.14 83.78 54.79 72.27 39.61 57.96C39.09 57.49 38.57 56.98 38.06 56.49C22.45 41.52 9.78 25.14 .33 8.52C0.29 8.45 .25 8.38 .2 8.31C-0.44 7.2 .51 5.84 1.79 6.05L24.07 9.71C43.06 12.83 60.63 11.75 75.55 6.53L93.95 .09C95.15-0.33 96.31 .78 95.93 1.98L90.1 20.49C85.37 35.48 84.9 52.97 88.69 71.73L92.83 92.16H92.82Z"/><path d="M58.72 89.23L6.15 92.8C5.24 92.86 4.48 92.13 4.51 91.22L6.56 30.39C6.61 28.91 8.51 28.36 9.35 29.57C16.23 39.43 24.98 52.35 33.01 61.26C41.05 70.17 50.6 78.72 59.62 86.56C60.65 87.45 60.08 89.13 58.72 89.23Z"/>',bm=`<svg class="reticle-mark" viewBox="0 0 96 94" fill="currentColor" aria-hidden="true">${ev}</svg>`,aD=`<svg class="reticle-fab-mark" viewBox="0 0 96 94" fill="currentColor" aria-hidden="true">${ev}</svg>`,tv=`<button type="button" class="reticle-fab" data-reticle-fab aria-label="Start ${Em}" aria-expanded="false">${aD}<span class="reticle-fab-pulse" aria-hidden="true"></span><span data-reticle-mark-count class="reticle-fab-badge" hidden>0</span></button>`});function lD(){try{return globalThis.sessionStorage.getItem(mu)==="1"}catch{return!1}}function sv(t){try{t?globalThis.sessionStorage.setItem(mu,"1"):globalThis.sessionStorage.removeItem(mu)}catch{}}function vm(t){return t&&!lD()}var rv,cD,Tm,ov,iv,_m,Sm,xm,ge,lt,ln,Ci,er,sa,At,aa,ca,Ii,Li,ki,Di,Mi,Pi,yo,tr,la,da,ml,Lt,Am,av,cv,ym,lv,ju,Vu,hl,Rm=T(()=>{"use strict";et();Xy();tm();rl();na();it();Uu();pm();Jy();nv();mo();Ph();Ou();Yn();Ir();$u();na();rv="reticle-toolbar-drag",cD=120,Tm="Annotate",ov="Minimise chat",iv="Open agent chat",_m="Impact",Sm="Settings",xm="Exit",hl=class{constructor(e={}){m(this,Lt);m(this,ge);m(this,lt);m(this,ln);m(this,Ci);m(this,er);m(this,sa);m(this,At);m(this,aa);m(this,ca);m(this,Ii,!1);m(this,Li,!1);m(this,ki);m(this,Di,!1);m(this,Mi);m(this,Pi);m(this,yo,new Gu({onBeforeOpen:()=>{c(this,At).close(),this.closeChat()},onSyncNow:()=>c(this,tr).onSyncNow?.()}));m(this,tr);m(this,la);m(this,da);m(this,ml);m(this,ju,e=>{if(c(this,ge)===void 0||c(this,lt)===void 0||!c(this,At).isOpen())return;let n=e.target;n instanceof Node&&(c(this,lt).contains(n)||c(this,At).contains(n)||c(this,At).close())});m(this,Vu,e=>{if(e.key!=="Escape"||c(this,ge)===void 0||e.defaultPrevented||kl(document))return;let n=e.target;if(!(n instanceof HTMLElement&&(n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.isContentEditable===!0))){if(this.isChatOpen()){this.closeChat();return}if(c(this,At).isOpen()){c(this,At).close();return}this.isCollapsed()||this.collapse()}});u(this,tr,e),u(this,At,new il({...e.settings,onBeforeOpen:()=>{this.closeChat(),c(this,yo).close(),e.settings?.onBeforeOpen?.()}}))}paintHarness(e){c(this,At).paintHarness(e)}paintAccount(e,n,r={}){u(this,la,{account:e,dashboardUrl:n,details:r}),c(this,ge)!==void 0&&(qA(c(this,ge),e,n,r),qh(c(this,ge),e,n,r))}paintOffer(e){u(this,ml,e),h(this,Lt,Am).call(this)}static dockHtml(e,n,r,i,s){let a=xi(V.ANNOTATE,re.TOOLBAR),l=xi(V.CHART,re.TOOLBAR),d=xi(V.GEAR,re.TOOLBAR),p=be(V.REMOVE,re.TOOLBAR);return`<div ${j}>
1194
+ <div ${Zc} class="reticle-chat-panel ${Bt}" role="region" aria-label="Reticle session" aria-hidden="true">
1195
+ <div class="reticle-chat-head">
1196
+ <span class="reticle-chat-brand">${bm}<span class="reticle-chat-brandname">${Em}</span></span>
1197
+ <span ${Jh} class="reticle-head-account"></span>
1198
+ </div>
1199
+ <button type="button" ${Nh} class="reticle-chat-min" title="${ov}" aria-label="${ov}">${be(V.CARET_DOWN,re.TOOLBAR)}</button>
1200
+ ${e}
1201
+ <span class="reticle-tally" data-reticle-tally hidden></span>
1202
+ ${n}
1203
+ <div class="${Su}"><div ${r}></div></div>
1204
+ ${i}
1205
+ ${s}
1206
+ </div>
1207
+ <button type="button" ${St} class="reticle-chat-pill" title="${iv}" aria-label="${iv}">
1208
+ ${bm}
1209
+ <span class="reticle-chat-pill-text" data-reticle-chat-pill-text></span>
1210
+ <span class="reticle-chat-pill-time" data-reticle-chat-pill-time></span>
1211
+ <span class="reticle-chat-pill-caret" aria-hidden="true">${be(V.CARET_DOWN,re.TOOLBAR)}</span>
1212
+ </button>
1213
+ ${Xh()}
1214
+ ${Yy()}
1215
+ <div data-reticle-hud>
1216
+ <div class="reticle-hud-deco" aria-hidden="true"></div>
1217
+ ${tv}
1218
+ <div class="reticle-toolbar ${rv}" role="toolbar" aria-label="Reticle controls">
1219
+ <div class="reticle-toolbar-actions">${oy}</div>
1220
+ <span class="reticle-tb-sep" aria-hidden="true"></span>
1221
+ <div class="reticle-toolbar-chrome">
1222
+ <div class="reticle-tb-wrap">
1223
+ <button type="button" ${Rh} class="reticle-tb-btn reticle-tb-btn--toggle" title="${Tm}" aria-label="${Tm}" aria-pressed="false" data-active="0">${a}</button>
1224
+ <span class="reticle-tb-tip">${Tm}</span>
1225
+ </div>
1226
+ <div class="reticle-tb-wrap">
1227
+ <button type="button" ${hu} class="reticle-tb-btn reticle-tb-btn--toggle" title="${_m}" aria-label="${_m}" aria-pressed="false" data-active="0">${l}</button>
1228
+ <span class="reticle-tb-tip">${_m}</span>
1229
+ </div>
1230
+ <div class="reticle-tb-wrap">
1231
+ <button type="button" ${Qc} class="reticle-tb-btn reticle-tb-btn--toggle" title="${Sm}" aria-label="${Sm}" aria-pressed="false" data-active="0">${d}</button>
1232
+ <span class="reticle-tb-tip">${Sm}</span>
1233
+ </div>
1234
+ <div class="reticle-tb-wrap">
1235
+ <button type="button" data-reticle-min-btn class="reticle-tb-btn" title="${xm}" aria-label="${xm}">${p}</button>
1236
+ <span class="reticle-tb-tip">${xm}<span class="reticle-tb-kbd">Esc</span></span>
1237
+ </div>
1238
+ </div>
1239
+ </div>
1240
+ </div>
1241
+ </div>`}get report(){return c(this,yo)}isAnnotateOn(){return c(this,Di)}setAnnotateOn(e){u(this,Di,e),c(this,ki)?.setAttribute("aria-pressed",e?"true":"false"),c(this,ki)?.setAttribute("data-active",e?"1":"0")}mount(e){u(this,Pi,new AbortController);let{signal:n}=c(this,Pi);u(this,ge,e),u(this,lt,e.querySelector(`[${j}]`)??void 0);let r=e.querySelector(`[${sA}]`);u(this,ln,r instanceof HTMLButtonElement?r:void 0);let i=e.querySelector(`[${Zc}]`);u(this,Ci,i instanceof HTMLElement?i:void 0);let s=e.querySelector(`[${Xc}]`);u(this,er,s instanceof HTMLElement?s:void 0);let a=e.querySelector(`[${Rh}]`);u(this,ki,a instanceof HTMLButtonElement?a:void 0),c(this,ki)?.addEventListener("click",g=>{g.preventDefault(),g.stopPropagation(),this.setAnnotateOn(!c(this,Di)),c(this,tr).onAnnotateToggle?.(c(this,Di))},{signal:n}),e.querySelector(`[${St}]`)?.addEventListener("click",g=>{g.preventDefault(),g.stopPropagation(),this.showChat()},{signal:n}),e.querySelector(`[${Nh}]`)?.addEventListener("click",g=>{g.preventDefault(),g.stopPropagation(),this.closeChat()},{signal:n});let p=e.querySelector("[data-reticle-min-btn]");u(this,sa,p instanceof HTMLButtonElement?p:void 0),e.setAttribute(ke,"1"),e.setAttribute(Ge,"0"),e.removeAttribute(qe),c(this,At).mount(e),c(this,yo).mount(e),u(this,Mi,new MutationObserver(()=>h(this,Lt,ym).call(this))),c(this,Mi).observe(e,{attributes:!0,attributeFilter:[qe,Ge,sn]}),h(this,Lt,ym).call(this),e.querySelector(`[${hu}]`)?.addEventListener("click",g=>{g.preventDefault(),g.stopPropagation(),c(this,yo).toggle()},{signal:n}),c(this,ln)?.addEventListener("click",g=>{if(g.stopPropagation(),c(this,Li)){u(this,Li,!1);return}this.expand()},{signal:n}),c(this,sa)?.addEventListener("click",g=>{g.stopPropagation(),this.collapse()},{signal:n}),c(this,er)?.addEventListener("click",g=>{g.stopPropagation(),this.toggleChat()},{signal:n});let f=e.querySelector(`.${rv}`),E=[c(this,ln),f].filter(g=>g instanceof HTMLElement);if(c(this,lt)!==void 0&&E.length>0&&(u(this,aa,OA(c(this,lt),E,{onDragMove:()=>{u(this,Li,!0)},onDragEnd:g=>{g&&this.isCollapsed()&&u(this,Li,!0)}})),u(this,ca,NA(c(this,lt),e))),document.addEventListener("pointerdown",c(this,ju),{signal:n}),document.addEventListener("keydown",c(this,Vu),{signal:n}),u(this,da,IA(e)),c(this,la)!==void 0){let g=c(this,la);this.paintAccount(g.account,g.dashboardUrl,g.details)}h(this,Lt,Am).call(this)}teardown(){var e,n,r;(e=c(this,da))==null||e.call(this),u(this,da,void 0),c(this,Pi)?.abort(),u(this,Pi,void 0),c(this,Mi)?.disconnect(),u(this,Mi,void 0),(n=c(this,aa))==null||n.call(this),u(this,aa,void 0),(r=c(this,ca))==null||r.call(this),u(this,ca,void 0),c(this,At).teardown(),u(this,ge,void 0),u(this,lt,void 0),u(this,ln,void 0),u(this,Ci,void 0),u(this,er,void 0),u(this,sa,void 0)}isCollapsed(){return c(this,ge)?.getAttribute(ke)==="1"}isChatOpen(){return c(this,ge)?.getAttribute(qe)==="1"}expand(){c(this,ge)===void 0||!this.isCollapsed()||c(this,Ii)||(h(this,Lt,lv).call(this),c(this,ge).setAttribute(ke,"0"),sv(!1),c(this,ln)!==void 0&&c(this,ln).setAttribute("aria-expanded","true"),c(this,tr).onExpand?.(),this.openChat(),c(this,lt)!==void 0&&Lr(c(this,lt),c(this,ge)))}collapse(){c(this,ge)!==void 0&&(u(this,Ii,!1),this.closeChat(),c(this,At).close(),c(this,ge).setAttribute(ke,"1"),sv(!0),c(this,ln)!==void 0&&c(this,ln).setAttribute("aria-expanded","false"),c(this,tr).onCollapse?.())}openChat(){if(c(this,ge)===void 0||(this.isCollapsed()&&this.expand(),c(this,At).close(),this.isChatOpen()))return;c(this,ge).setAttribute(qe,"1");let e=c(this,ge).querySelector("[data-reticle-log]");e!==null&&Wx(e),c(this,Ci)?.setAttribute("aria-hidden","false"),c(this,er)?.setAttribute("data-active","1"),c(this,er)?.setAttribute("aria-pressed","true"),c(this,tr).onChatOpen?.(),c(this,lt)!==void 0&&Lr(c(this,lt),c(this,ge))}closeChat(){c(this,ge)===void 0||!this.isChatOpen()||(c(this,ge).removeAttribute(qe),c(this,Ci)?.setAttribute("aria-hidden","true"),c(this,er)?.setAttribute("data-active","0"),c(this,er)?.setAttribute("aria-pressed","false"),c(this,tr).onChatClose?.(),c(this,lt)!==void 0&&Lr(c(this,lt),c(this,ge)))}toggleChat(){this.isChatOpen()?this.closeChat():this.showChat()}showChat(){c(this,yo).close(),this.openChat()}pulseFab(e){c(this,ln)?.setAttribute("data-pulse",e?"1":"0")}};ge=new WeakMap,lt=new WeakMap,ln=new WeakMap,Ci=new WeakMap,er=new WeakMap,sa=new WeakMap,At=new WeakMap,aa=new WeakMap,ca=new WeakMap,Ii=new WeakMap,Li=new WeakMap,ki=new WeakMap,Di=new WeakMap,Mi=new WeakMap,Pi=new WeakMap,yo=new WeakMap,tr=new WeakMap,la=new WeakMap,da=new WeakMap,ml=new WeakMap,Lt=new WeakSet,Am=function(){let e=c(this,ge)?.querySelector(`[${zc}]`);if(!(e instanceof HTMLElement))return;let n=xy(h(this,Lt,cv).call(this));ky(e,Qy(c(this,ml),n),h(this,Lt,av).call(this))},av=function(){try{return globalThis.sessionStorage}catch{return}},cv=function(){try{return globalThis.localStorage}catch{return}},ym=function(){let e=c(this,ge);if(e===void 0)return;let n=(r,i)=>{let s=e.querySelector(`[${r}]`);s?.setAttribute("data-active",i?"1":"0"),s?.setAttribute("aria-pressed",i?"true":"false")};n(Xc,e.getAttribute(qe)==="1"),n(Qc,e.getAttribute(Ge)==="1"),n(hu,e.getAttribute(sn)==="1")},lv=function(){u(this,Ii,!0),window.setTimeout(()=>{u(this,Ii,!1)},cD)},ju=new WeakMap,Vu=new WeakMap});function dv(t){let e=t.startMs??t.now,n={reads:0,acts:0,narrations:0,human:0,passes:0,fails:0};for(let r of t.runLog)r.kind===Ke.READ?n.reads+=1:r.kind===Ke.ACT?n.acts+=1:r.kind===Ke.NARRATION?n.narrations+=1:r.kind===Ke.HUMAN&&(n.human+=1),r.result===Pt.PASS?n.passes+=1:r.result===Pt.FAIL&&(n.fails+=1);return{session:t.sessionId,url:typeof location>"u"?"":location.href,state:t.state,startedMs:e,durationMs:Math.max(0,(t.endMs??t.now)-e),counts:n,capabilities:ro(),log:t.runLog.map(r=>({...r}))}}var uv=T(()=>{"use strict";mo();oo()});function pv(t,e,n){t!==void 0&&(t.setAttribute("data-on","1"),t.style.transform=`translate(${String(e)}px, ${String(n)}px)`)}function fv(t,e){t!==void 0&&(t.style.left=`${String(e.left-4)}px`,t.style.top=`${String(e.top-4)}px`,t.style.width=`${String(e.width+8)}px`,t.style.height=`${String(e.height+8)}px`,t.setAttribute("data-on","1"),z(()=>t.setAttribute("data-on","0"),700))}function hv(t,e,n){if(t===void 0)return;let r=document.createElement("div");r.setAttribute("data-reticle-ripple",""),r.style.left=`${String(e)}px`,r.style.top=`${String(n)}px`,t.appendChild(r),z(()=>r.remove(),520)}function Nm(t){return new Promise(e=>z(e,t))}var mv=T(()=>{"use strict";Ve()});var vn,$i,Rn,Nn,vo,ua,pa,Ui,gl,fa,El,dn,gv,Om,wm,Ev,Ku,bv=T(()=>{"use strict";P();Ve();it();Ku=class{constructor(e){m(this,dn);m(this,vn,An.IDLE);m(this,$i,0);m(this,Rn);m(this,Nn);m(this,vo);m(this,ua);m(this,pa);m(this,Ui);m(this,gl);m(this,fa);m(this,El);u(this,pa,e.now),u(this,Ui,e.idleAfterMs),u(this,gl,e.glowFadeMs),u(this,fa,e.borderMode),u(this,El,e.setMode)}setElements(e,n){u(this,vo,e),u(this,ua,n)}phase(){return c(this,vn)}lastActivityMs(){return c(this,$i)}resetActivity(e){u(this,$i,e)}markActivity(e=c(this,pa).call(this)){u(this,$i,e),(c(this,vn)===An.IDLE||c(this,vn)===An.FADING)&&h(this,dn,gv).call(this),h(this,dn,Om).call(this)}scheduleIdle(){h(this,dn,Om).call(this)}teardown(){c(this,Rn)!==void 0&&pe(c(this,Rn)),c(this,Nn)!==void 0&&pe(c(this,Nn)),u(this,Rn,void 0),u(this,Nn,void 0)}};vn=new WeakMap,$i=new WeakMap,Rn=new WeakMap,Nn=new WeakMap,vo=new WeakMap,ua=new WeakMap,pa=new WeakMap,Ui=new WeakMap,gl=new WeakMap,fa=new WeakMap,El=new WeakMap,dn=new WeakSet,gv=function(){c(this,Nn)!==void 0&&(pe(c(this,Nn)),u(this,Nn,void 0)),u(this,vn,An.BUSY),c(this,fa)===Ai.SESSION?c(this,vo)?.setAttribute(qc,Qx):c(this,vo)?.setAttribute(_t,wr),c(this,ua)?.setAttribute(_t,wr)},Om=function(){c(this,Rn)!==void 0&&pe(c(this,Rn)),u(this,Rn,z(()=>h(this,dn,wm).call(this),c(this,Ui)))},wm=function(){if(u(this,Rn,void 0),c(this,vn)!==An.BUSY)return;let e=c(this,pa).call(this)-c(this,$i);if(e<c(this,Ui)){u(this,Rn,z(()=>h(this,dn,wm).call(this),c(this,Ui)-e));return}h(this,dn,Ev).call(this)},Ev=function(){u(this,vn,An.FADING),c(this,fa)===Ai.SESSION?c(this,vo)?.setAttribute(qc,cu):c(this,vo)?.setAttribute(_t,Eo),c(this,ua)?.setAttribute(_t,Eo),c(this,El).call(this,De.IDLE),u(this,Nn,z(()=>{u(this,Nn,void 0),c(this,vn)===An.FADING&&u(this,vn,An.IDLE)},c(this,gl)))}});function Tv(t,e,n){let r=dD(e);if(t===void 0)return r;if(r.passes===0&&r.fails===0)return t.setAttribute("hidden",""),t.replaceChildren(),r;let i=t.ownerDocument;t.removeAttribute("hidden"),t.className="reticle-tally reticle-pill-group reticle-head-ctl",t.replaceChildren();let s=i.createElement("span");if(s.className="reticle-t-pass reticle-pill-segment",r.passes===0&&s.setAttribute("data-z","1"),r.passes>n.passes&&s.setAttribute("data-bump","1"),s.append(zn(V.CHECK,re.TALLY)),r.passes>0){let d=i.createElement("span");d.className="reticle-pill-count",d.textContent=String(r.passes),s.append(d)}let a=i.createElement("span");a.className="reticle-pill-sep",a.setAttribute("aria-hidden","true");let l=i.createElement("span");if(l.className="reticle-t-fail reticle-pill-segment",r.fails===0&&l.setAttribute("data-z","1"),r.fails>n.fails&&l.setAttribute("data-bump","1"),l.append(zn(V.REMOVE,re.TALLY)),r.fails>0){let d=i.createElement("span");d.className="reticle-pill-count",d.textContent=String(r.fails),l.append(d)}return t.append(s,a,l),r}function dD(t){let e=0,n=0;for(let r of t)r.result===Pt.PASS?e+=1:r.result===Pt.FAIL&&(n+=1);return{passes:e,fails:n}}var _v=T(()=>{"use strict";mo();Yn()});function xv(t){return Cm??(Cm=new Set([...uD,...Object.entries(pD).flatMap(([e,n])=>n.map(r=>`${e}.${r}`))])),Cm.has(t)}var uD,Sv,pD,Cm,Av=T(()=>{"use strict";uD=["fab","pause","chat-toggle","markers-btn","end","clear-marks","copy-marks","copy","export","annotate-btn","report-btn","settings-btn","min-btn","chat-min","chat-pill","replay","carousel-dot","carousel-close","offer-claim","talk-book","account-signin","account-trigger","account-signout","account-dashboard","sync-now","report-scope","report-close","share-x","share-in","share-copy","refer","settings-close","settings-help","settings-reset","settings-mcp","feedback-email","feedback-call","workspace-btn","workspace-copy","mark-cancel","mark-send"],Sv=["setting","check","settings-cycle","theme","tour-target","link"],pD={setting:["autoOpenChat","showTimestamps","showTally","reactComponents","hideUntilRestart","harnessEnabled","reduceMotion","ambientGlow"],check:["blockPageInteractions","clearOnCopy"],"settings-cycle":["outputDetail"],theme:["signal","traffic","mono","neon","ember"],"tour-target":["copy","back","done","next","skip"],link:["docs","github","site","discord","defect","dashboard"]}});var yv=T(()=>{"use strict";Av()});function Rv(t){for(let e of Array.from(t.attributes)){if(!e.name.startsWith(vv))continue;let n=e.name.slice(vv.length),r=Sv.includes(n)?`${n}.${e.value}`:n;if(xv(r))return r}}function hD(t){for(let e of t)if(e instanceof Element&&Rv(e)!==void 0)return e}function mD(t){return t.getAttribute(ke)==="1"?{view:Zr.BUBBLE,panel:Qr.NONE}:t.getAttribute(Ge)==="1"?{view:Zr.EXPANDED,panel:Qr.SETTINGS}:t.getAttribute(sn)==="1"?{view:Zr.EXPANDED,panel:Qr.REPORT}:t.getAttribute(qe)==="1"?{view:Zr.EXPANDED,panel:Qr.CHAT}:{view:Zr.COLLAPSED,panel:Qr.NONE}}function Nv(t,e,n){let r=d=>{try{n(d)}catch{}},i=d=>{let p=hD(d.composedPath());if(p===void 0||!qi(p))return;let f=Rv(p);if(f!==void 0){if(!fD.has(p.getAttribute("role")??"")){r({control:f});return}z(()=>{let E=p.getAttribute("aria-checked")==="true";r({control:f,toggle:E?Za.ON:Za.OFF})},0)}},s="",a=()=>{let d=mD(e),p=`${d.view}/${d.panel}`;p!==s&&(s=p,r(d))};t.addEventListener("click",i,!0);let l=new MutationObserver(a);return l.observe(e,{attributes:!0,attributeFilter:[ke,qe,Ge,sn]}),a(),()=>{t.removeEventListener("click",i,!0),l.disconnect()}}var vv,fD,Ov=T(()=>{"use strict";yv();P();et();Ve();it();vv="data-reticle-",fD=new Set(["switch","checkbox"])});var $v={};Ba($v,{GlowPhase:()=>An,LOG_KIND:()=>Ke,LOG_RESULT:()=>Pt,Presenter:()=>Im});var gD,ga,Ce,Pr,Hi,Tl,Bi,$r,Ea,ba,Ro,Ur,Fi,Ta,_a,un,Sa,_l,Gi,Kt,Hr,dt,xa,Sl,xl,ji,Br,On,Fr,wn,No,Oo,Aa,ya,Wt,Ie,va,Y,wv,ha,Lm,Cv,bl,km,Iv,Lv,kv,Dv,Mv,ma,Pv,Im,Uv=T(()=>{"use strict";P();gt();Wf();oh();Ve();mo();Py();Rm();mm();it();uv();mv();bv();Yn();_v();$u();na();Rm();Ov();it();mo();gD=1600,Im=class{constructor(e={}){m(this,Y);m(this,ga);m(this,Ce);m(this,Pr);m(this,Hi);m(this,Tl);m(this,Bi);m(this,$r);m(this,Ea);m(this,ba);m(this,Ro);m(this,Ur);m(this,Fi);m(this,Ta,{passes:0,fails:0});m(this,_a,De.IDLE);m(this,un);m(this,Sa);m(this,_l);m(this,Gi);m(this,Kt);m(this,Hr,"");m(this,dt);m(this,xa);m(this,Sl);m(this,xl);m(this,ji);m(this,Br,[]);m(this,On,!1);m(this,Fr);m(this,wn);m(this,No);m(this,Oo);m(this,Aa);m(this,ya);m(this,Wt);m(this,Ie);m(this,va);u(this,ga,Jx(e.paceMs)),u(this,un,e.now??Dd),u(this,Sa,e.heartbeatMs??tA),u(this,_l,e.idleNoticeMs??nA),u(this,xa,e.idleEndMs??rA),u(this,Sl,e.sessionId??""),u(this,Gi,e.border??Zx),u(this,Kt,new Ku({now:c(this,un),idleAfterMs:e.idleAfterMs??eA,glowFadeMs:e.glowFadeMs??iA,borderMode:c(this,Gi),setMode:n=>this.setMode(n)})),u(this,Fr,yh(e.logMax)),u(this,Oo,e.onControl),u(this,Aa,e.onHudUse),u(this,Wt,new Pu({emit:(n,r)=>{var i;return(i=c(this,Oo))==null?void 0:i.call(this,r!==void 0?{kind:n,text:r}:{kind:n})},logHuman:n=>{this.log(Ke.HUMAN,n)},endedFadeMs:e.endedFadeMs??ny,runState:()=>this.runState(),clearRunLog:()=>h(this,Y,kv).call(this),onStateChange:()=>h(this,Y,ha).call(this)})),u(this,Ie,new hl({onChatOpen:()=>c(this,Ie).pulseFab(!1),onExpand:()=>h(this,Y,ha).call(this),onAnnotateToggle:()=>h(this,Y,ha).call(this),onCollapse:()=>h(this,Y,ha).call(this),onSyncNow:()=>{var n;return(n=c(this,Oo))==null?void 0:n.call(this,{kind:kn.SYNC})},settings:{onBeforeOpen:()=>{c(this,Ie).isCollapsed()&&c(this,Ie).expand()},onHideUntilRestart:()=>h(this,Y,Dv).call(this),onSettingsChange:n=>h(this,Y,Mv).call(this,n),onHarness:n=>{var r;return(r=c(this,Oo))==null?void 0:r.call(this,{kind:kn.HARNESS,text:n?"on":"off"})}}}))}setControlHandler(e){u(this,Oo,e)}get state(){return c(this,Wt).state}get sessionActive(){return c(this,On)}setState(e,n,r){c(this,Wt).setState(e,n,r)}refilterFlows(){c(this,Wt).refilterFlows()}handlePush(e){let n=e.args;if(e.name===C.FLOWS)return void c(this,Wt).setFlows(n.flows);if(e.name===C.IMPACT){let a=Fy(n.snapshot);a!==void 0&&(c(this,Ie).report.setSnapshot(a),c(this,Ie).paintOffer(a.harnessOffer),c(this,Ie).paintHarness(a.harnessConfig),c(this,Ie).paintAccount(a.account,a.dashboardUrl,{projectName:a.projectName,dashboardUrl:a.dashboardUrl,verdicts:a.project.counts.verdicts,defects:a.project.counts.failed}));return}let r=n.state,i=n.tone,s=typeof n.text=="string"&&n.text.length>0?n.text:void 0;pE(r)&&this.setState(r,s,GE(i)?i:void 0)}get logMax(){return c(this,Fr)}set logMax(e){u(this,Fr,yh(e)),h(this,Y,Pv).call(this)}mount(){if(c(this,Ce)!==void 0||typeof document>"u")return;let e=document.createElement("style");e.setAttribute("data-reticle-overlay",""),e.textContent=My,document.head.appendChild(e);let n=document.createElement("div");n.setAttribute("data-reticle-overlay","");let r=`<div class="reticle-act-strip" data-liveness="idle"><span class="reticle-act-dot" aria-hidden="true"></span><span class="reticle-act">${go.READY}</span><span class="reticle-chip" data-reticle-chip></span></div>`;n.innerHTML=`
1242
+ ${Zh()}
1243
+ <div data-reticle-glow></div>
1244
+ <div data-reticle-cursor></div>
1245
+ <div data-reticle-ring></div>
1246
+ ${hl.dockHtml(r,iy,zc,sy+ay,cy)}`,document.body.appendChild(n),u(this,Ce,n),u(this,Pr,n.querySelector("[data-reticle-glow]")??void 0),u(this,Hi,n.querySelector("[data-reticle-cursor]")??void 0),u(this,Tl,n.querySelector("[data-reticle-ring]")??void 0),u(this,Bi,n.querySelector("[data-reticle-hud]")??void 0),u(this,$r,n.querySelector(".reticle-act")??void 0),u(this,Ea,n.querySelector(".reticle-act-strip")??void 0),u(this,ba,n.querySelector("[data-reticle-chat-pill-text]")??void 0),u(this,Ro,n.querySelector("[data-reticle-chat-pill-time]")??void 0),u(this,wn,n.querySelector(`[${zc}]`)??void 0),u(this,Ur,n.querySelector("[data-reticle-chip]")??void 0),u(this,Fi,n.querySelector("[data-reticle-tally]")??void 0),c(this,Ie).mount(n),al(n,Ft(),!1),c(this,Kt).setElements(c(this,Pr),c(this,Hi)),c(this,Wt).mount(n,c(this,Pr)),c(this,Aa)!==void 0&&u(this,ya,Nv(document,n,c(this,Aa))),this.setMode(c(this,_a)),h(this,Y,ma).call(this)}bindAnnotator(e){u(this,va,e);let n=c(this,Ce);if(n===void 0)return;let r=n.querySelector(`[${du}]`),i=n.querySelector(`[${uu}]`),s=n.querySelector(`[${aA}]`),a=n.querySelector(`[${pu}]`),l=n.querySelector(`[${fu}]`),d={};l instanceof HTMLElement&&(d.copyRow=l);let p=e.markCount;d.onCount=f=>{p===0&&f>0&&c(this,Ie).openChat(),p=f},a instanceof HTMLElement&&a.addEventListener("click",f=>{f.stopPropagation(),h(this,Y,wv).call(this,e,a)}),r instanceof HTMLElement&&(d.markersBtn=r),i instanceof HTMLElement&&(d.clearBtn=i),s instanceof HTMLElement&&(d.countEl=s),e.attachChrome(d),e.setAccent(sl(Ft().statusThemeId).active),h(this,Y,ha).call(this)}destroy(){var e;c(this,Kt).teardown(),c(this,dt)!==void 0&&pe(c(this,dt)),u(this,dt,void 0),(e=c(this,ya))==null||e.call(this),u(this,ya,void 0),c(this,Ie).teardown(),c(this,Wt).teardown(),u(this,On,!1),u(this,No,void 0),u(this,wn,void 0),c(this,Ce)?.remove(),document.querySelectorAll("style[data-reticle-overlay]").forEach(n=>n.remove()),u(this,Ce,void 0)}sessionStart(){if(this.state===ye.ENDED){h(this,Y,Cv).call(this);return}c(this,On)||(vh===c(this,Ce)?.getAttribute(lu)&&c(this,Ce).removeAttribute(lu),u(this,On,!0),c(this,xl)??u(this,xl,c(this,un).call(this)),u(this,ji,void 0),h(this,Y,Lm).call(this),c(this,Kt).resetActivity(c(this,un).call(this)),h(this,Y,km).call(this),vm(Ft().autoOpenChat)&&c(this,Ie).openChat())}showUnreachable(e,n){if(c(this,On))return;c(this,Ce)?.setAttribute(lu,vh),c(this,Ce)?.querySelector("[data-reticle-dock]")?.setAttribute(_t,wr),c(this,Bi)?.setAttribute(_t,wr),u(this,Hr,$_(e,n)),h(this,Y,bl).call(this,c(this,Hr),!0),vm(Ft().autoOpenChat)&&c(this,Ie).openChat()}sessionEnd(){if(!c(this,On))return;u(this,On,!1),c(this,dt)!==void 0&&(pe(c(this,dt)),u(this,dt,void 0)),c(this,Ce)?.querySelector("[data-reticle-dock]")?.setAttribute(_t,Eo),c(this,Bi)?.setAttribute(_t,Eo),c(this,Ie).collapse(),c(this,Gi)===Ai.SESSION&&(c(this,Pr)?.setAttribute(_t,Eo),c(this,Pr)?.setAttribute(qc,cu))}markActivity(){c(this,Kt).markActivity()}scheduleIdle(){c(this,Kt).scheduleIdle()}glowPhase(){return c(this,Kt).phase()}get mode(){return c(this,_a)}setMode(e){if(u(this,_a,e),c(this,Ce)?.setAttribute("data-reticle-mode",e),c(this,Ur)!==void 0){let n=jx[e];if(c(this,Ur).setAttribute("data-mode",e),c(this,Ur).replaceChildren(),n.length>0){let r=e===De.READING?V.VIEW:e===De.ACTING?V.POINTER:void 0;r!==void 0&&c(this,Ur).appendChild(zn(r,re.CHIP));let i=document.createElement("span");i.className="reticle-chip-label",i.textContent=n,c(this,Ur).appendChild(i)}}e===De.READING&&c(this,Hi)?.setAttribute(_t,Eo)}status(e){this.markActivity(),c(this,Ro)!==void 0&&(c(this,Ro).textContent=go.NOW),u(this,Hr,e),h(this,Y,bl).call(this,e,!1)}setIdleEndMs(e){Number.isFinite(e)&&u(this,xa,Math.max(oA,Math.floor(e)))}runState(){let e=dv({sessionId:c(this,Sl),state:this.state,startMs:c(this,xl),endMs:c(this,ji),now:c(this,un).call(this),runLog:c(this,Br)}),n=Ft();return n.outputDetail===yn.MINIMAL?{session:e.session,url:e.url,state:e.state,startedMs:e.startedMs,durationMs:e.durationMs,counts:e.counts}:n.outputDetail===yn.VERBOSE&&n.reactComponents?{...e,includeReactComponents:!0}:e}log(e,n,r){let i=c(this,un).call(this);if(c(this,Kt).markActivity(i),c(this,wn)===void 0)return;let s=n.trim();if(s.length===0)return;c(this,No)??u(this,No,i);let a=r!==void 0?{at:i-c(this,No),kind:e,text:s,result:r}:{at:i-c(this,No),kind:e,text:s};for(c(this,Br).push(a);c(this,Br).length>c(this,Fr);)c(this,Br).shift();let l=qx(i-c(this,No)),d=Xx(c(this,wn),e,s,l,c(this,Fr));return r!==void 0&&d.result(r),c(this,Ie).isCollapsed()&&c(this,Ie).pulseFab(!0),h(this,Y,ma).call(this),{result:p=>{d.result(p),a.result=p,h(this,Y,ma).call(this)}}}narrate(e,n="info"){let r=n==="info"?e:`[${n}] ${e}`;return this.log(Ke.NARRATION,r)}setThrottled(e){c(this,Ce)?.setAttribute(pA,e?"1":"0"),e&&c(this,$r)!==void 0&&(c(this,$r).textContent="Tab backgrounded - actions throttled. Bring tab to front or use `reticle drive`.")}async beforeAct(e,n,r){let i=X.resolve(e);if(this.status(`${Lc(n)} ${r}`),!(i instanceof HTMLElement)){await Nm(c(this,ga));return}let s=i.getBoundingClientRect(),a=s.left+s.width/2,l=s.top+s.height/2;pv(c(this,Hi),a,l),fv(c(this,Tl),s),await Nm(c(this,ga)),(v.CLICK===n||v.DBLCLICK===n||v.SUBMIT===n)&&hv(c(this,Ce),a,l)}};ga=new WeakMap,Ce=new WeakMap,Pr=new WeakMap,Hi=new WeakMap,Tl=new WeakMap,Bi=new WeakMap,$r=new WeakMap,Ea=new WeakMap,ba=new WeakMap,Ro=new WeakMap,Ur=new WeakMap,Fi=new WeakMap,Ta=new WeakMap,_a=new WeakMap,un=new WeakMap,Sa=new WeakMap,_l=new WeakMap,Gi=new WeakMap,Kt=new WeakMap,Hr=new WeakMap,dt=new WeakMap,xa=new WeakMap,Sl=new WeakMap,xl=new WeakMap,ji=new WeakMap,Br=new WeakMap,On=new WeakMap,Fr=new WeakMap,wn=new WeakMap,No=new WeakMap,Oo=new WeakMap,Aa=new WeakMap,ya=new WeakMap,Wt=new WeakMap,Ie=new WeakMap,va=new WeakMap,Y=new WeakSet,wv=function(e,n){let r=e.agentPrompt(window.location.href);navigator.clipboard?.writeText(r).catch(()=>{}),n.setAttribute("data-copied","1"),z(()=>n.removeAttribute("data-copied"),gD),Ft().clearOnCopy&&e.clearAll()},ha=function(){let e=!c(this,Ie).isCollapsed()&&c(this,Ie).isAnnotateOn();c(this,va)?.toggle(e),c(this,Ce)!==void 0&&al(c(this,Ce),Ft(),e)},Lm=function(){c(this,Ce)?.querySelector("[data-reticle-dock]")?.setAttribute(_t,wr),c(this,Bi)?.setAttribute(_t,wr),c(this,Gi)===Ai.SESSION&&c(this,Pr)?.setAttribute(_t,wr)},Cv=function(){c(this,Wt).setState(ye.ACTIVE),u(this,ji,void 0),h(this,Y,Lm).call(this),c(this,Kt).resetActivity(c(this,un).call(this)),h(this,Y,km).call(this)},bl=function(e,n){c(this,$r)!==void 0&&(c(this,$r).textContent=e);let r=n?"idle":"active";c(this,Ea)!==void 0&&c(this,Ea).setAttribute("data-liveness",r),c(this,Ce)?.setAttribute(Jc,r),c(this,ba)!==void 0&&(c(this,ba).textContent=n?c(this,Hr)!==""?c(this,Hr):go.READY:e)},km=function(){c(this,dt)!==void 0&&pe(c(this,dt));let e=()=>{h(this,Y,Iv).call(this),u(this,dt,z(e,c(this,Sa)))};u(this,dt,z(e,c(this,Sa)))},Iv=function(){if(!c(this,On)||c(this,$r)===void 0||this.state===ye.ENDED)return;let e=c(this,un).call(this)-c(this,Kt).lastActivityMs();if(e>=c(this,xa)){h(this,Y,Lv).call(this,e);return}if(e<c(this,_l)||c(this,Hr)==="")return;let n=go.SINCE_LAST;h(this,Y,bl).call(this,`${go.PLANNING_PREFIX}${Yc(e)}${n}`,!0),c(this,Ro)!==void 0&&(c(this,Ro).textContent=Yc(e))},Lv=function(e){u(this,ji,c(this,un).call(this)),c(this,Wt).setState(ye.ENDED,`${go.STOPPED_PREFIX}${Yc(e)} quiet`),h(this,Y,bl).call(this,go.STOPPED,!1),c(this,dt)!==void 0&&(pe(c(this,dt)),u(this,dt,void 0))},kv=function(){u(this,Br,[]),u(this,Ta,{passes:0,fails:0}),c(this,wn)!==void 0&&Yx(c(this,wn)),h(this,Y,ma).call(this)},Dv=function(){c(this,Ce)?.setAttribute("data-reticle-hidden","1"),c(this,Ie).collapse()},Mv=function(e){if(c(this,va)?.setAccent(sl(e.statusThemeId).active),e.showTally?h(this,Y,ma).call(this):c(this,Fi)?.setAttribute("hidden",""),c(this,Ce)!==void 0){let n=ye.ACTIVE===c(this,Wt).state&&!c(this,Ie).isCollapsed();al(c(this,Ce),e,n)}},ma=function(){if(!Ft().showTally){c(this,Fi)?.setAttribute("hidden","");return}u(this,Ta,Tv(c(this,Fi),c(this,Br),c(this,Ta)))},Pv=function(){c(this,wn)!==void 0&&Ah(c(this,wn),c(this,Fr))}});var Ue,Hv,Bv,Fv,Gv=T(()=>{"use strict";Ue={NONE:"none",HUD:"hud",APP:"app",HUD_CHAT:"hud-chat",HUD_ANNOTATE:"hud-annotate",HUD_IMPACT:"hud-impact",HUD_SETTINGS:"hud-settings"},Hv=[{label:"Verify one flow",text:"verify the login flow with Reticle, and tell me the verdict"},{label:"Check what is proved",text:"/reticle"},{label:"Let it loose",text:"monkey-test the checkout flow with Reticle and tell me what breaks"}],Bv=[{id:"connect",title:"Yayyy! It is connected",say:"That panel is Reticle. Seeing it is your proof the SDK is connected to your app.",why:"It only mounts on a connected session, so it cannot show up without one. Having the tools is not the same as being set up.",call:'reticle_session { action: "list" }',anchor:Ue.HUD},{id:"look",title:"Look, without pixels",say:"Take a semantic snapshot. You get the controls and their refs, not pixels, so you can point at things by name.",why:"A ref is stable across snapshots, which is what lets you plan several steps before spending any of them.",call:'reticle_look { action: "page" }',anchor:Ue.APP},{id:"declare",title:"Say it first",say:'Decide what should happen BEFORE you touch anything. "Clicking Pay makes the receipt appear" is a claim that can be wrong.',why:"This is the whole idea. A consequence named first is a check; the same sentence written after the fact is a rationalisation, and it is the difference between a verdict and a story.",call:'until: { signal: "order:placed" } // a consequence \u2014 not until: { ms: 500 }',anchor:Ue.NONE},{id:"verdict",title:"Act, and prove it",say:"Act and prove in one call. The answer says verified yes / no / unknown, and `because` names the evidence that decided it.",why:'Only `reticle_act_and_wait` and `reticle_assert` produce a verdict. A drive that ends without one has no result, however many tools it used \u2014 and "unknown" is an honest answer, not a pass.',call:'reticle_act_and_wait { ref, action: "click", until: { signal: "order:placed" } }',anchor:Ue.HUD}],Fv=[{id:"hud-chat",title:"Activity Panel",say:"Watch what your agent is doing in your app, as it happens.",anchor:Ue.HUD_CHAT,tryIt:"Open it."},{id:"hud-annotate",title:"Annotate",say:"Click anywhere in your app to drop a numbered pin with a note. Hand the pins to your agent and it fixes them.",anchor:Ue.HUD_ANNOTATE,tryIt:"Turn it on, then click something in your app."},{id:"hud-impact",title:"What's the impact?",say:"Everything Reticle has done here. Every bug it caught, every metric.",anchor:Ue.HUD_IMPACT,tryIt:"Take a look."},{id:"hud-settings",title:"Make it yours",say:"Change how Reticle looks and behaves.",anchor:Ue.HUD_SETTINGS,tryIt:"Open it."}]});var Dm=T(()=>{"use strict";Gv()});function $m(){return[...Mm.map(bD),{index:ED,title:"Get Started",body:"Paste one of these into Claude Code, Cursor, Codex, or whatever you use.",anchor:Ue.NONE,prompts:Hv}]}function Al(t){return t.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")}function TD(t){return Al(t).replace(/`([^`]+)`/g,'<code class="reticle-tour-code">$1</code>')}function Um(t,e){let n=t+e;return n<0?0:n>Wu-1?Wu-1:n}function zv(t,e,n){let r=Math.max(0,t.left),i=Math.max(0,t.top),s=Math.min(e,t.left+t.width),a=Math.min(n,t.top+t.height);return[{left:0,top:0,width:e,height:i},{left:0,top:a,width:e,height:n-a},{left:0,top:i,width:r,height:a-i},{left:s,top:i,width:e-s,height:a-i}].filter(d=>d.width>0&&d.height>0)}function Yv(t){let e=$m().map(a=>`<span class="reticle-tour-dot${a.index===t.index?" is-on":""}" aria-hidden="true"></span>`).join(""),n=t.tryIt===void 0?"":`<p class="reticle-tour-try" ${Gr}="try">${Al(t.tryIt)}</p>`,r=t.prompts===void 0?"":'<div class="reticle-tour-prompts">'+t.prompts.map((a,l)=>`<div class="reticle-tour-prompt" ${yl}="${String(l)}"><span class="reticle-tour-prompt-label">${Al(a.label)}</span><pre class="reticle-tour-prompt-text">${Al(a.text)}</pre><button type="button" class="reticle-tour-copy" ${Gr}="copy" ${yl}="${String(l)}">${Pm}</button></div>`).join("")+"</div>",i=t.index===0?"":`<button type="button" class="reticle-tour-back" ${Gr}="back">Back</button>`,s=Hm(t.index)?`<button type="button" class="reticle-tour-next" ${Gr}="done">Done</button>`:`<button type="button" class="reticle-tour-next" ${Gr}="next">Next</button>`;return`<div class="reticle-tour-card" role="dialog" aria-modal="false" aria-label="Reticle tour"><button type="button" class="reticle-tour-skip" ${Gr}="skip" aria-label="Skip the tour">Skip</button><p class="reticle-tour-step">Step ${String(t.index+1)} of ${String(Wu)}</p><h2 class="reticle-tour-title">${Al(t.title)}</h2><p class="reticle-tour-body">${TD(t.body)}</p>`+n+r+`<div class="reticle-tour-foot"><div class="reticle-tour-dots">${e}</div><div class="reticle-tour-nav">${i}${s}</div></div></div>`}var Mm,ED,Wu,ee,Gr,yl,Pm,jv,Vv,Kv,bD,Wv,Hm,qv,Xv=T(()=>{"use strict";Dm();Mm=[...Bv.slice(0,1),...Fv],ED=Mm.length,Wu=Mm.length+1,ee="data-reticle-tour",Gr="data-reticle-tour-target",yl="data-reticle-tour-prompt",Pm="Copy",jv="Copied",Vv="Selected \u2014 press Ctrl/Cmd+C",Kv=1600,bD=(t,e)=>({index:e,title:t.title,body:t.say,anchor:t.anchor??Ue.NONE,...t.tryIt===void 0?{}:{tryIt:t.tryIt}}),Wv=t=>t.tryIt!==void 0;Hm=t=>t===Wu-1;qv=`
1247
+ [${ee}]{position:fixed;inset:0;z-index:${String(2147483630)};pointer-events:none;
1248
+ font:13px/1.55 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;}
1249
+ [${ee}] .reticle-tour-scrim{position:absolute;inset:0;background:rgba(6,8,14,.55);
1250
+ backdrop-filter:blur(1.5px);pointer-events:auto;z-index:0;}
1251
+ /* Blocks the click everywhere the hole is not. Same job as the scrim, minus the one rectangle the
1252
+ slide is inviting somebody to press. */
1253
+ [${ee}] .reticle-tour-blocker{position:absolute;pointer-events:auto;z-index:0;}
1254
+ /* Ringed slides dim through the ring's own 9999px shadow, which leaves a hole over the thing being
1255
+ pointed at. The scrim would cover that hole -- dimming the HUD the slide is ABOUT, and washing
1256
+ the page twice (~80% rather than 55%).
1257
+ It is cleared for the clicks too, and that half was missing. A scrim blocks only while it is
1258
+ VISIBLY blocking: reported from the field on 3.1.0 by several users, one of whom removed the
1259
+ plugin, because a cleared scrim went on eating every press on a page that looked lit and
1260
+ reachable. An overlay that looks transparent and behaves opaque reads as the app being broken. */
1261
+ [${ee}] .reticle-tour-scrim.is-clear{background:transparent;backdrop-filter:none;
1262
+ pointer-events:none;}
1263
+ /* Above the ring, and the z-index is the whole point.
1264
+ The ring is appended after the card, and both are positioned with an auto z-index, so the ring
1265
+ painted on top of it -- and the ring's dimming IS a 9999px shadow, which therefore fell across the
1266
+ card as well. On every ringed slide the card was washed at 55% and read as sitting BEHIND the page
1267
+ it was drawn over. The ring must stay above the scrim and below the card; saying so explicitly is
1268
+ the fix, because DOM order alone cannot express "between these two". */
1269
+ [${ee}] .reticle-tour-card{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
1270
+ width:min(430px,calc(100vw - 32px));box-sizing:border-box;pointer-events:auto;z-index:3;
1271
+ background:#14161d;color:#e8eaf0;border:1px solid #2b303d;border-radius:14px;padding:20px 20px 16px;
1272
+ box-shadow:0 24px 60px rgba(0,0,0,.5);}
1273
+ [${ee}] .reticle-tour-skip{position:absolute;top:10px;right:12px;background:none;border:0;
1274
+ color:#8a93a6;font:inherit;font-size:12px;cursor:pointer;padding:4px 6px;border-radius:6px;}
1275
+ [${ee}] .reticle-tour-skip:hover{color:#e8eaf0;background:rgba(255,255,255,.06);}
1276
+ [${ee}] .reticle-tour-step{margin:0 0 6px;font-size:11px;letter-spacing:.06em;
1277
+ text-transform:uppercase;color:#7f8798;}
1278
+ [${ee}] .reticle-tour-title{margin:0 0 8px;font-size:18px;line-height:1.25;font-weight:650;
1279
+ color:#f2f4f8;}
1280
+ [${ee}] .reticle-tour-body{margin:0 0 10px;color:#c9cedb;}
1281
+ /* A call named inside a sentence. Sets its own colour for the reason every other text class does:
1282
+ an inherited one loses to any direct element selector in the host app. */
1283
+ [${ee}] .reticle-tour-code{padding:1px 5px;border-radius:5px;background:#0c0e14;
1284
+ border:1px solid #232834;color:#9fb6ff;
1285
+ font:11.5px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere;}
1286
+ [${ee}] .reticle-tour-try{margin:0 0 12px;padding:8px 10px;border-radius:8px;
1287
+ background:rgba(99,102,241,.1);border:1px solid rgba(99,102,241,.32);color:#c7cbff;
1288
+ font-size:12.5px;font-weight:550;}
1289
+ [${ee}] .reticle-tour-prompts{display:flex;flex-direction:column;gap:8px;margin:0 0 12px;}
1290
+ [${ee}] .reticle-tour-prompt{display:grid;gap:6px;padding:9px 10px;border-radius:8px;
1291
+ background:#0c0e14;border:1px solid #232834;
1292
+ grid-template-columns:1fr auto;grid-template-areas:"label copy" "text text";align-items:center;}
1293
+ [${ee}] .reticle-tour-prompt-label{grid-area:label;color:#8a93a6;font-size:11px;
1294
+ letter-spacing:.05em;text-transform:uppercase;}
1295
+ [${ee}] .reticle-tour-prompt-text{grid-area:text;width:100%;box-sizing:border-box;margin:0;
1296
+ white-space:pre-wrap;overflow-wrap:anywhere;color:#c9cedb;
1297
+ font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;}
1298
+ [${ee}] .reticle-tour-copy{grid-area:copy;padding:5px 10px;border-radius:6px;
1299
+ border:1px solid #2b303d;background:transparent;color:#c9cedb;font:inherit;font-size:11.5px;
1300
+ font-weight:600;cursor:pointer;white-space:nowrap;}
1301
+ [${ee}] .reticle-tour-copy:hover{background:rgba(255,255,255,.07);color:#fff;}
1302
+ /* The flash that tells somebody the click did something. Colour AND text: colour alone is not an
1303
+ answer for the people who cannot see the difference. */
1304
+ [${ee}] .reticle-tour-copy.is-done{background:#16a34a;border-color:#16a34a;color:#fff;}
1305
+ [${ee}] .reticle-tour-copy.is-manual{background:#b45309;border-color:#b45309;color:#fff;}
1306
+ [${ee}] .reticle-tour-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;}
1307
+ [${ee}] .reticle-tour-dots{display:flex;gap:6px;}
1308
+ [${ee}] .reticle-tour-dot{width:6px;height:6px;border-radius:50%;background:#333a49;}
1309
+ [${ee}] .reticle-tour-dot.is-on{background:#6366f1;}
1310
+ [${ee}] .reticle-tour-nav{display:flex;gap:8px;}
1311
+ [${ee}] .reticle-tour-back,[${ee}] .reticle-tour-next{padding:8px 14px;border-radius:8px;
1312
+ font:inherit;font-weight:600;cursor:pointer;border:1px solid #2b303d;background:transparent;color:#c9cedb;}
1313
+ [${ee}] .reticle-tour-next{background:#6366f1;border-color:#6366f1;color:#fff;}
1314
+ [${ee}] .reticle-tour-next:hover{filter:brightness(1.08);}
1315
+ [${ee}] .reticle-tour-back:hover{background:rgba(255,255,255,.06);color:#e8eaf0;}
1316
+ [${ee}] .reticle-tour-ring{position:absolute;border-radius:14px;pointer-events:none;z-index:1;
1317
+ box-shadow:0 0 0 3px #6366f1,0 0 0 9999px rgba(6,8,14,.55);transition:all .25s ease;}
1318
+ /* A ring somebody is being asked to press, rather than to look at: it pulses, so the invitation in
1319
+ the prose has something on the page agreeing with it. */
1320
+ [${ee}] .reticle-tour-ring.is-live{animation:reticle-tour-pulse 1.8s ease-in-out infinite;}
1321
+ @keyframes reticle-tour-pulse{
1322
+ 0%,100%{box-shadow:0 0 0 3px #6366f1,0 0 0 9999px rgba(6,8,14,.55);}
1323
+ 50%{box-shadow:0 0 0 6px rgba(99,102,241,.55),0 0 0 9999px rgba(6,8,14,.55);}
1324
+ }
1325
+ /* A REGION, not a target. The spotlight above cuts a hole in the dimming, which is right for
1326
+ something small and wrong for the app: the hole becomes the whole viewport, the dimming
1327
+ disappears, and the card is left competing with a fully lit page while the ring edges sit off at
1328
+ the margins pointing at nothing. An outline says "all of this" without turning the lights on. */
1329
+ [${ee}] .reticle-tour-ring.is-region{box-shadow:none;border:2px dashed #7c83f5;
1330
+ background:rgba(99,102,241,.06);}
1331
+ @media (prefers-reduced-motion:reduce){
1332
+ [${ee}] .reticle-tour-ring{transition:none;}
1333
+ }
1334
+ `});var eR={};Ba(eR,{TOUR_SEEN_KEY_PREFIX:()=>Zv,isLastSlide:()=>Hm,mountTour:()=>RD,openedByReticle:()=>Qv,safeLocalStorage:()=>ND,tourAlreadySeen:()=>Jv,tourSeenKey:()=>Bm});function xD(t,e){let n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(let a of e){let l=t.querySelector(a)?.getBoundingClientRect();l===void 0||l.width<=0||l.height<=0||(n=Math.min(n,l.left),r=Math.min(r,l.top),i=Math.max(i,l.left+l.width),s=Math.max(s,l.top+l.height))}if(i!==Number.NEGATIVE_INFINITY)return{left:n,top:r,width:i-n,height:s-r}}function yD(t,e){if(Ue.HUD===e)return xD(t,SD);let n=AD[e];if(n!==void 0){let r=t.querySelector(n)?.getBoundingClientRect();return r===void 0?void 0:r}if(Ue.APP===e)for(let r of _D){let i=t.querySelector(r);if(i===null)continue;let s=i.getBoundingClientRect();if(s.width>0)return s}}function Qv(t){if(t===void 0||t==="")return!1;let e=new URLSearchParams(t.startsWith("?")?t.slice(1):t);return e.has(lr.OPENED)||e.has(lr.SESSION)||e.has(lr.PROJECT)}function Jv(t,e){if(t===void 0)return!0;try{return t.getItem(Bm(e))!==null}catch{return!0}}function vD(t,e){try{t?.setItem(Bm(e),"1")}catch{}}function RD(t){if(t.isDriving()||Qv(t.search)||t.navigator?.webdriver===!0||Jv(t.storage,t.projectId))return;let e=t.document,n=e.createElement("style");n.setAttribute(ee,""),n.textContent=qv,e.head.appendChild(n);let r=e.createElement("div");r.setAttribute(ee,"");let i=$m(),s=0,a=!0,l=()=>{},d=()=>{},p=()=>{a&&(a=!1,l(),d(),r.remove(),n.remove())},f=()=>{a&&(vD(t.storage,t.projectId),p())},E=()=>{t.isDriving()&&p()},g=()=>{let D=i[s];if(D!==void 0&&(r.innerHTML=`<div class="reticle-tour-scrim"></div>${Yv(D)}`,Ue.NONE!==D.anchor)){let G=yD(e,D.anchor);if(G!==void 0&&G.width>0){let B=Ue.APP===D.anchor,Q=e.createElement("div");Q.className=B?"reticle-tour-ring is-region":"reticle-tour-ring";let oe=B?-2:6;if(Q.style.left=`${String(Math.round(G.left-oe))}px`,Q.style.top=`${String(Math.round(G.top-oe))}px`,Q.style.width=`${String(Math.round(G.width+oe*2))}px`,Q.style.height=`${String(Math.round(G.height+oe*2))}px`,r.appendChild(Q),B||r.querySelector(".reticle-tour-scrim")?.classList.add("is-clear"),Wv(D)){Q.classList.add("is-live"),r.querySelector(".reticle-tour-scrim")?.remove();let Se=e.defaultView;for(let me of zv({left:G.left-oe,top:G.top-oe,width:G.width+oe*2,height:G.height+oe*2},Se?.innerWidth??e.documentElement.clientWidth,Se?.innerHeight??e.documentElement.clientHeight)){let Re=e.createElement("div");Re.className="reticle-tour-blocker",Re.style.left=`${String(Math.round(me.left))}px`,Re.style.top=`${String(Math.round(me.top))}px`,Re.style.width=`${String(Math.round(me.width))}px`,Re.style.height=`${String(Math.round(me.height))}px`,r.appendChild(Re)}}}}},_=D=>{let G=i[s],B=Number(D.getAttribute(yl)),Q=G?.prompts?.[B];if(Q===void 0)return;let oe=(Re,zt)=>{D.textContent=Re,D.classList.add(zt),e.defaultView?.setTimeout(()=>{D.textContent=Pm,D.classList.remove(zt)},Kv)},Se=Re=>{if(Re){oe(jv,"is-done");return}let zt=r.querySelector(`.reticle-tour-prompt[${yl}="${String(B)}"] .reticle-tour-prompt-text`);zt!==null&&t.select?.(zt),oe(Vv,"is-manual")},me=t.copy?.(Q.text);if(me===void 0){Se(!1);return}if(typeof me=="boolean"){Se(me);return}me.then(Se).catch(()=>{Se(!1)})};r.addEventListener("click",D=>{let G=D.target;if(!(G instanceof Element))return;let B=G.closest(`[${Gr}]`);if(B===null)return;let Q=B.getAttribute(Gr);if(Q===null)return;if(D.preventDefault(),D.stopPropagation(),Q==="skip"||Q==="done"){f();return}if(Q==="copy"){_(B);return}let oe=Um(s,Q==="back"?-1:1);oe!==s&&(s=oe,g())});let S=D=>{if(!a||kl(e))return;let G=D.key==="ArrowRight"?1:D.key==="ArrowLeft"?-1:0;if(D.key==="Escape"){D.preventDefault(),f();return}if(G===0)return;let B=Um(s,G);B!==s&&(D.preventDefault(),s=B,g())};e.addEventListener("keydown",S),l=()=>{e.removeEventListener("keydown",S)},g(),e.body.appendChild(r);let L=e.querySelector("[data-reticle-overlay]");if(L!==null){let D=new MutationObserver(E);D.observe(L,{attributes:!0,attributeFilter:["data-reticle-mode"]}),d=()=>D.disconnect(),E()}return{destroy:f,isOpen:()=>a}}function ND(){try{return window.localStorage}catch{return}}var Zv,_D,SD,AD,Bm,tR=T(()=>{"use strict";Xv();Dm();P();et();Zv="reticle.tour.seen.",_D=["main","#root","#app"],SD=["[data-reticle-hud]","[data-reticle-chat-panel]"];AD={[Ue.HUD_CHAT]:"[data-reticle-chat-toggle]",[Ue.HUD_ANNOTATE]:"[data-reticle-annotate-btn]",[Ue.HUD_IMPACT]:"[data-reticle-report-btn]",[Ue.HUD_SETTINGS]:"[data-reticle-settings-btn]"};Bm=t=>`${Zv}${t}`});var $D={};Ba($D,{Annotator:()=>Si,RefRegistry:()=>rc,Reticle:()=>Da,SESSION_AUTO:()=>Xa,adapterNames:()=>Od,buildSnapshot:()=>_d,canvasChartData:()=>Jb,commitAndSignal:()=>_R,createReticleEmitter:()=>TR,describe:()=>Fn,elementHasHoverHandlers:()=>Nd,executeAction:()=>yc,executeSequence:()=>Gd,getAccessibleName:()=>Ee,getCapabilities:()=>ro,getRole:()=>we,getStates:()=>gr,hasCapabilities:()=>vd,identifyComponent:()=>jn,inspectChart:()=>gd,installAnnotator:()=>Ux,isVisible:()=>nt,jotaiStore:()=>uR,markAdapterSource:()=>xd,matchQuery:()=>bc,mobxStore:()=>hR,piniaStore:()=>ER,pushStore:()=>bR,readComponentState:()=>Rd,readStores:()=>ET,readStoresWithTruncation:()=>Ec,recoilStore:()=>mR,refs:()=>X,registerAdapter:()=>yT,registerCapabilities:()=>vs,registerReticleDomain:()=>SR,registerStore:()=>hT,resolveMarkAnchor:()=>$c,reticle:()=>Yu,runQuery:()=>Cd,setCapabilitiesListener:()=>yd,setIgnoreSelectors:()=>Zm,sourceOwner:()=>TT,storeNames:()=>no,svelteStore:()=>gR,tanstackQueryStore:()=>dR,unregisterStore:()=>mT,valtioStore:()=>fR,xstateStore:()=>pR});et();P();var Mb="__reticle_session";function Pb(t,e,n){let r=()=>{try{let l=e?.getItem(Mb);return l!=null&&l.length>0?l:void 0}catch{return}},i=l=>{try{e?.setItem(Mb,l)}catch{}},a=(t!==void 0&&t.length>0?t:void 0)??r()??n();return i(a),a}gt();var Mw="vite:afterUpdate",Pw=3,$w="no longer resolves to an element",Uw="the code changed underneath it";function sf(t){return t!==null&&typeof t=="object"?t:void 0}function Hw(t){return typeof sf(t)?.on=="function"}function Bw(t){let e=sf(t)?.updates;if(!Array.isArray(e))return[];let n=[];for(let r of e){let i=sf(r)?.path;typeof i=="string"&&i.length>0&&!n.includes(i)&&n.push(i)}return n}var sc,_s,Ss,af=class{constructor(e){m(this,sc,0);m(this,_s,[]);m(this,Ss);u(this,Ss,e)}get current(){return c(this,sc)}observe(e){Hw(e)&&e.on(Mw,n=>this.applied(Bw(n)))}applied(e){u(this,sc,c(this,sc)+1),u(this,_s,e.slice(0,Pw)),c(this,Ss).markEdited()}staleRefMessage(e){let n=`ref '${ni(e)}' ${$w}`;if(!c(this,Ss).mintedBeforeLastEdit(e))return n;let r=c(this,_s).length===0?"the page hot-updated":`${c(this,_s).join(", ")} hot-updated`;return`${n} \u2014 ${r} after this ref was taken, so ${Uw} and the framework replaced the node. Query again for a fresh ref: this is your own edit landing, not the app failing.`}};sc=new WeakMap,_s=new WeakMap,Ss=new WeakMap;var ac=new af(X);P();P();function he(t,e){return t[e]}function Fb(t){let e=Object.getOwnPropertyDescriptor(t,"value");return e===void 0?void 0:he(e,"set")}var cf=0,to=new Set,Gb=new WeakSet,df=new WeakSet,Fw=4e3,Gw=250,lf=0;function jw(){for(let t of to)t.deref()===void 0&&to.delete(t);for(;to.size>Fw;){let t=to.values().next();if(t.done===!0)break;to.delete(t.value)}}function Vb(){let t=[];for(let e of to){let n=e.deref();n!==void 0&&t.push(n)}return t}var fd=new Set;function jb(t,e){if(!Gb.has(t)){Gb.add(t),to.add(new WeakRef(t)),lf+=1,lf>=Gw&&(lf=0,jw()),df.add(e);for(let n of fd)n(t)}}function Kb(){return Vb()}function Wb(t){return df.has(t)}function hd(t){if(!df.has(t))return null;for(let e of Vb())if(e.host===t)return e;return null}function zb(t){return fd.add(t),()=>fd.delete(t)}function Yb(){let t=Element.prototype,e=he(t,"attachShadow");if(typeof e!="function")return()=>{};cf+=1;let n=function(s){let a=e.call(this,s);return jb(a,this),a};t.attachShadow=n;let r=i=>{for(let s of i.querySelectorAll("*")){let a=s.shadowRoot;a!==null&&(jb(a,s),r(a))}};return document.documentElement!==null&&r(document.documentElement),()=>{he(t,"attachShadow")===n&&(t.attachShadow=e),cf-=1,!(cf>0)&&(to.clear(),fd.clear())}}mr();Mt();gt();et();var oT=new Set(["button","link","textbox","checkbox","radio","combobox","listbox","slider","spinbutton","switch","tab","menuitem","option"]),rC=new Set(["script","style","noscript","template","head","meta","link"]),oC=new Set(["alert","status"]);function iC(t,e){if(oC.has(e))return!0;let n=t.getAttribute("aria-live");return n!==null&&n!=="off"}var rT=80;function sC(t){let e="";for(let r of t.childNodes)r.nodeType===3&&(e+=r.textContent??"");let n=e.replace(/\s+/g," ").trim();return n.length>rT?`${n.slice(0,rT)}\u2026`:n}var aC=50;function iT(t){return t.getAttribute("aria-hidden")==="true"?!0:t instanceof HTMLElement&&t.hidden}function cC(t){return rC.has(t.tagName.toLowerCase())||fn(t)?!0:iT(t)}function lC(t){let e=gr(t).filter(n=>n===le.DISABLED||n===le.CHECKED||n===le.EXPANDED||n===le.FOCUSED);return e.length>0?` [${e.join(",")}]`:""}function dC(t,e,n,r,i,s=""){let a=" ".repeat(e),l=bf(t),d=r,p=d.length>0?` "${d}"`:"",f=oT.has(n)||d.length>0?` (ref=${X.refFor(t)})`:"",E=l!==void 0&&l.length>0?` [value="${l}"]`:"",g=i.length>0?` [${i}]`:"",_=s.length>0?` [text="${s}"]`:"";return`${a}- ${n}${p}${f}${E}${_}${g}${lC(t)}`}function uC(t,e){return`${" ".repeat(t)}- text "${e}"`}function pC(t){if(t===null)return"";let e=t.display;if(e==="grid"||e==="inline-grid"){let n=t.gridTemplateColumns;return n!==""&&n!=="none"?`grid-cols:${n}`:"grid"}return""}function fC(t,e){for(let n of t){if(e.unread.length>=aC){e.unreadOverflow=!0;return}e.unread.push(X.refFor(n))}}function hC(t){let e=[...t.children],n=t.shadowRoot??hd(t);if(n!==null&&e.push(...n.children),md(t))try{let r=t.contentDocument?.body;r!=null&&e.push(...r.children)}catch{}return e}function sT(t,e,n,r){if(cC(t)){iT(t)&&(n.hiddenSkipped+=1);return}let i=t.ownerDocument.defaultView,s=i!==null?i.getComputedStyle(t):null;if(s!==null&&s.display==="none"){n.hiddenSkipped+=1;return}let a=we(t),l=Ee(t),d=oT.has(a),p=r||iC(t,a),f=n.mode===as.INTERACTIVE&&!p,E=!f&&l.length===0?sC(t):"",g=f?"":pC(s),_=d,S=_||a!=="generic"||l.length>0||E.length>0||g.length>0,L=f?_:S;f&&!L&&S&&(n.leanSkipped+=1),L?(n.nodes+=1,n.lines.push(a==="generic"&&E.length>0&&g.length===0?uC(e,E):dC(t,e,a,l,g,E)),_f(t,e+1,n,p)):_f(t,e,n,p)}function _f(t,e,n,r=!1){if(e>n.maxDepth)return;let i=hC(t);for(let s=0;s<i.length;s+=1){if(n.nodes>=n.maxNodes){n.truncated=!0,fC(i.slice(s),n);return}let a=i[s];a!==void 0&&sT(a,e,n,r)}}function mC(t){let e=t.querySelectorAll('[role="dialog"], dialog[open], [aria-modal="true"]'),n=[];for(let r of e)Le(r)||nt(r)&&n.push(Ee(r)||"(unnamed dialog)");return n}function gC(t){if(t!==document.body)return;let e=document.body.querySelectorAll('[role="dialog"], dialog[open], [aria-modal="true"]'),n,r;for(let a of e)if(!Le(a)){if(nt(a)){n=a;break}r??(r=a)}if(n??(n=r),n===void 0)return;let i=n,s=Array.from(document.body.children).filter(a=>!a.contains(i));if(s.length!==0&&s.every(a=>a.getAttribute("aria-hidden")==="true"))return"the rest of the page is aria-hidden behind an open overlay (a focus-trap modal), so this snapshot shows only the overlay. If it will not close its cleanup may be stuck on a throttled tab: dismiss the overlay, or snapshot with { scope } inside it."}function EC(t){let e=mC(t),n=gC(t);return{route:`${location.pathname}${location.search}${location.hash}`,title:document.title,...e.length>0?{visibleDialogs:e}:{},...n!==void 0?{overlayHidingPage:n}:{}}}function _d(t={}){let e=t.mode??as.FULL,n=t.scope!==void 0?X.resolve(t.scope)??document.querySelector(t.scope):document.body,r=t.scope!==void 0&&!(n instanceof Element),i=n instanceof Element?n:document.body,s=EC(i);if(r)return{tree:"",status:s,nodes:0,truncated:!1,scopeMissing:!0};if(e===as.STATUS)return{tree:"",status:s,nodes:0,truncated:!1};let a={lines:[],nodes:0,leanSkipped:0,hiddenSkipped:0,truncated:!1,mode:e,maxNodes:t.maxNodes??400,maxDepth:t.maxDepth??20,unread:[],unreadOverflow:!1};return t.includeRoot===!0?sT(i,0,a,!1):_f(i,0,a),{tree:a.lines.join(`
1335
+ `),status:s,nodes:a.nodes,truncated:a.truncated,...a.nodes===0?{domElements:i.querySelectorAll("*").length}:{},...a.leanSkipped>0?{leanSkipped:a.leanSkipped}:{},...a.hiddenSkipped>0?{hiddenSkipped:a.hiddenSkipped}:{},...a.unread.length>0?{unread:a.unread}:{},...a.unreadOverflow?{unreadOverflow:!0}:{}}}var bC=["filter","opacity","transform","mix-blend-mode","backdrop-filter"],TC={filter:"none",opacity:"1",transform:"none","mix-blend-mode":"normal","backdrop-filter":"none"};function _C(t){if(t.id.length>0)return`#${t.id}`;let e=t.getAttribute("class");return e!==null&&e.trim().length>0?`.${e.trim().split(/\s+/).join(".")}`:t.tagName.toLowerCase()}function aT(t){let e=t.ownerDocument.defaultView;if(e===null)return[];let n=[];for(let r=t;r!==null&&r!==t.ownerDocument.documentElement;r=r.parentElement){let i=e.getComputedStyle(r);for(let s of bC){let a=i.getPropertyValue(s);a.length>0&&a!==TC[s]&&n.push({on:_C(r),property:s,value:a})}}return n}P();mr();Mt();et();Bn();oo();oi();gt();var wd="data-testid",kT=td,CC=12,IC=2e3,LC=`[${kT}], [${wd}], button, a, input, select, textarea, [role]`;function io(t){return[...Node.ELEMENT_NODE===t.nodeType?[t]:[],...Array.from(t.querySelectorAll("*"))]}function Ns(t){return t.replace(/\s+/g," ").trim().normalize("NFC")}function Os(t,e){return Ns(t).toLowerCase().includes(Ns(e).toLowerCase())}function kC(t,e){return Ns(t)===Ns(e)}var DC=["script","style","template","noscript"];function DT(t){return DC.includes(t.tagName.toLowerCase())}function MC(t){if(Oe(t)){let e=t.type.toLowerCase();if(e==="submit"||e==="button"||e==="reset")return t.value}return DT(t)?"":Array.from(t.childNodes).filter(e=>Node.TEXT_NODE===e.nodeType).map(e=>e.textContent??"").join("")}function wf(t,e){if(DT(t)||fn(t)||!nt(t,e))return"";let n="";for(let r of Array.from(t.childNodes))Node.TEXT_NODE===r.nodeType?n+=r.textContent??"":hr(r)&&(n+=wf(r,e));return n}function PC(t){if(Oe(t)||wt(t)||Un(t))return!0;let e=t.tagName.toLowerCase();return e==="button"||e==="meter"||e==="output"||e==="progress"||t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}function Cf(t){if(t===void 0)return{container:document.body,scopeMissing:!1};let e=X.resolve(t);if(Dt(e))return{container:e,scopeMissing:!1};try{let n=document.querySelector(t);if(Dt(n))return{container:n,scopeMissing:!1}}catch{}return{container:null,scopeMissing:!0}}function $C(t,e){let n=`${e.file}:${e.line}:`.replace(/\\/g,"\\\\").replace(/"/g,'\\"');try{return Array.from(t.querySelectorAll(`[${kT}^="${n}"]`))}catch{return[]}}function UC(t,e){let n=[],r=0;for(let i of Array.from(t.querySelectorAll(LC))){if(r>=IC)break;r+=1;let s=jn(i);s!==null&&s.componentStack[0]===e&&n.push(i)}return n}function vT(t,e){if(e.source!==void 0){let n=$C(t,e.source);if(n.length>0)return n}return e.component!==void 0&&e.component.length>0?UC(t,e.component):[]}function Of(t,e,n){return io(t).filter(r=>we(r)===e&&(n===void 0||kC(Ee(r),n)))}function RT(t,e){return io(t).filter(n=>Os(MC(n),e))}function NT(t,e){return io(t).filter(n=>PC(n)&&Os(Ee(n),e))}function OT(t,e){return io(t).filter(n=>{let r=n.getAttribute("placeholder");return r!==null&&Os(r,e)})}function wT(t,e){return io(t).filter(n=>n.getAttribute(wd)===e)}function CT(t,e){return io(t).filter(n=>{let r=n.getAttribute("alt");return r!==null&&Os(r,e)})}function IT(t,e){let n=e.by,r=e.value;if(n!==void 0&&r!==void 0)switch(n){case pt.ROLE:return Of(t,r,e.name);case pt.TEXT:return RT(t,r);case pt.LABEL:return NT(t,r);case pt.PLACEHOLDER:return OT(t,r);case pt.TESTID:return wT(t,r);case pt.ALT:return CT(t,r);case pt.COMPONENT:return vT(t,{...e,component:e.component??r});default:throw new Error(`unsupported query strategy '${String(n)}' - use one of: ${Object.values(pt).join(", ")}`)}return e.component!==void 0||e.source!==void 0?vT(t,e):e.role!==void 0?Of(t,e.role,e.name):e.text!==void 0?RT(t,e.text):e.label!==void 0?NT(t,e.label):e.placeholder!==void 0?OT(t,e.placeholder):e.testid!==void 0?wT(t,e.testid):e.alt!==void 0?CT(t,e.alt):[]}function HC(t){try{return t.contentDocument?.body??null}catch{return null}}var BC=3;function FC(t){let e=[],n=(r,i)=>{for(let s of r.querySelectorAll("*")){let a=s.shadowRoot??hd(s);if(a!==null){e.push(a),n(a,i);continue}if(i>=BC||!md(s))continue;let l=HC(s);l!==null&&(e.push(l),n(l,i+1))}};return n(t,0),e}function GC(t){let{container:e,scopeMissing:n}=Cf(t.scope);if(e===null)return{candidates:[],scopeMissing:!0};if(t.self===!0)return t.scope===void 0?{candidates:[],scopeMissing:n}:t.text!==void 0&&!Os(wf(e,new Map),t.text)?{candidates:[],scopeMissing:n}:{candidates:fn(e)?[]:[e],scopeMissing:n};let r=new Set,i=[],s=a=>{for(let l of a)r.has(l)||fn(l)||(r.add(l),i.push(l))};s(IT(e,t));for(let a of FC(e))s(IT(a,t));return{candidates:i,scopeMissing:n}}var jC=512,VC=12;function KC(t,e){let n={};for(let r of e.slice(0,VC)){let i=t.getAttribute(r);i!==null&&(n[r]=He(r)?Ae:i.slice(0,jC))}return Object.keys(n).length>0?n:void 0}function WC(t,e,n){return le.IN_VIEWPORT===e?Tf(t,n):gr(t,nt(t,n)).includes(e)}var LT=U.MAX_COLLECTION_ITEMS;function bc(t,e,n=LT){let r=GC(t),i=r.candidates,s=r.scopeMissing,a=new Map,l=e===void 0?i:i.filter(g=>WC(g,e,a)),d=t.attrs,p=l.slice(0,Math.max(0,Math.min(n,LT))),f=p.length>1,E=p.map(g=>{let _=Fn(g,a);if(f&&Tf(g,a)&&!_.states.includes(le.IN_VIEWPORT)&&(_={..._,states:[..._.states,le.IN_VIEWPORT]}),d===void 0||d.length===0)return _;let S=KC(g,d);return S===void 0?_:{..._,attrs:S}});return{matched:l.length>0,count:l.length,elements:E,...s?{scopeMissing:!0}:{},...l.length===0?{hint:MT(t)}:{}}}function zC(t){let e=t.getAttribute("aria-labelledby");if(e===null)return;let n=e.split(/\s+/).map(r=>r.length>0?t.ownerDocument.getElementById(r)?.textContent?.trim()??"":"").filter(r=>r.length>0).join(" ");return n.length>0?n:void 0}function YC(t){let e=Cf(t.scope).container??document.body,n=[],r=["list","listbox","grid","table","tree","treegrid","dialog","alertdialog","navigation","main","banner","form","search","menu","menubar","tablist"];for(let i of r){let s=Of(e,i,void 0);for(let a of s){if(Le(a))continue;let l=a.getAttribute("aria-label")??zC(a)??a.getAttribute("data-testid")??void 0,d=a.querySelectorAll("[role]"),p=[];for(let E of Array.from(d)){if(p.length>=3)break;let g=E.getAttribute("role"),_=E.getAttribute("aria-label")??E.getAttribute("data-testid")??E.textContent?.trim().slice(0,40)??"";g!==null&&_.length>0&&p.push(`${g}[${_}]`)}let f={role:i,childCount:d.length,sample:p};if(l!==void 0&&l.length>0&&(f.name=l),n.push(f),n.length>=10)return n}}return n}function qC(t,e){let n,r=-1,i=new Map;for(let s of io(t)){if(fn(s)||!Os(wf(s,i),e))continue;let a=0;for(let l=s.parentElement;l!==null;l=l.parentElement)a++;a>r&&(n=s,r=a)}return n}function XC(t){return t.text!==void 0?t.text:pt.TEXT===t.by?t.value:void 0}var ZC=5;function QC(t,e){let n=pt.ROLE===e.by?e.value:void 0,r=e.name;if(n===void 0||r===void 0||r.length===0)return[];let i=Ns(r).toLowerCase();if(i.length===0)return[];let s=[];for(let a of io(t)){if(fn(a)||we(a)!==n)continue;let l=Ns(Ee(a));if(l.length===0)continue;let d=l.toLowerCase();if(!(!d.includes(i)&&!i.includes(d))&&(s.includes(l)||s.push(l),s.length>=ZC))break}return s}function MT(t){let e=Cf(t.scope).container??document.body,n=e.querySelectorAll(`[${wd}]`),r=[],i=new Set;for(let E of Array.from(n)){if(fn(E))continue;let g=E.getAttribute(wd);g===null||g.length===0||i.has(g)||(i.add(g),r.length<CC&&r.push(g))}let s=AT(),a=r.some(E=>s.includes(E)),d={route:`${location.pathname}${location.search}`,presentTestids:r,...i.size>r.length?{presentTestidsTotal:i.size}:{},presentRegions:YC(t),knownEmptyState:a},p=XC(t);if(p!==void 0){let E=qC(e,p);E!==void 0&&(d.splitText=Fn(E))}let f=QC(e,t);return f.length>0&&(d.nameNearMiss=f),d}function Cd(t,e){let n=bc(t,void 0,e),r=n.scopeMissing===!0?{scopeMissing:!0}:{};return n.elements.length===0?{elements:n.elements,count:n.count,hint:MT(t),...r}:{elements:n.elements,count:n.count,...r}}P();ws();gt();P();Mt();var JC=new Set(["submit","button","reset","image"]);function eI(t){return t.isContentEditable||t instanceof HTMLTextAreaElement?!0:t instanceof HTMLInputElement?!JC.has(t.type.toLowerCase()):!1}function Ld(t){let e=t.closest("form"),n=eI(t)?["",""]:[t.textContent??"",t.getAttribute("value")??""];return[Ee(t),...n,t.getAttribute("title")??"",t.getAttribute("aria-label")??"",t.getAttribute("href")??"",e?.getAttribute("action")??""].join(" ")}var tI='button[type="submit"], input[type="submit"], button:not([type]):not([type=""])';function PT(t){let e=t.closest("form")?.querySelector(tI);return e instanceof HTMLElement?e:null}function Tc(t,e){return tb(t,e)}mr();function kd(t,e){let n=Zb(t),r=n===void 0?void 0:Fb(n);r!==void 0?r.call(t,e):t.value=e;let i=t.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0}));return t.dispatchEvent(new Event("change",{bubbles:!0})),!i}function nI(t){let e=t.getAttribute("contenteditable");if(t.isContentEditable||e!==null&&e!=="false"||t.getAttribute("role")==="textbox")return!0;if(!("editContext"in t))return!1;let n=t;return n.editContext!==null&&n.editContext!==void 0}function Lf(t,e){if(nI(t))throw new Error(`cannot ${e} a contenteditable or EditContext editor; use press or an input`)}function kf(t,e){if(t.disabled)throw new Error(`cannot ${e} a disabled <${t.tagName.toLowerCase()}> \u2014 a user could not edit it, so forcing the value would put the app in a state nobody can reach`);if(t.readOnly)throw new Error(`cannot ${e} a readonly <${t.tagName.toLowerCase()}> \u2014 a user could not edit it, so forcing the value would put the app in a state nobody can reach`)}Mt();oi();mr();Ve();et();var Df=200,VT=" | ",oI=3,iI=/\p{L}/u;function sI(t){return iI.test(t)}var aI=3;function cI(t){return t instanceof Element&&t.querySelectorAll("*").length>aI}var Cs,_c,ao,Mf,Pf,Md=class{constructor(){m(this,ao);m(this,Cs,new Set);m(this,_c,0)}collect(e){for(let n of e){if(h(this,ao,Mf).call(this))return;if(n.type==="characterData"){h(this,ao,Pf).call(this,n.target.textContent,n.target.parentElement);continue}for(let r of n.addedNodes){if(h(this,ao,Mf).call(this))return;if(cI(r))continue;let i=oI===r.nodeType?r.parentElement:lI(r);h(this,ao,Pf).call(this,r.textContent,i)}}}effect(e){let n=[...c(this,Cs)].filter(i=>i!==e);if(n.length===0)return{};let r=n.join(VT);return{appeared:r.length>Df?`${r.slice(0,Df)}\u2026`:r}}};Cs=new WeakMap,_c=new WeakMap,ao=new WeakSet,Mf=function(){return c(this,_c)>Df},Pf=function(e,n){if(n!==null&&fn(n))return;let r=(e??"").replace(/\s+/g," ").trim();r.length!==0&&sI(r)&&(c(this,Cs).has(r)||(c(this,Cs).add(r),u(this,_c,c(this,_c)+(r.length+VT.length))))};function lI(t){return t instanceof Element?t:t.parentElement}P();ws();Ve();mr();var $f=t=>new Promise(e=>z(e,t));function WT(t,e=""){return typeof t=="string"?t:e}function $d(t){return kp(t)}function zT(t){let e=t.modifiers,n=Array.isArray(e)?e.map(i=>WT(i).toLowerCase()):[],r=(...i)=>i.some(s=>n.includes(s));return{metaKey:r("meta","cmd","command","super","win"),ctrlKey:r("control","ctrl"),shiftKey:r("shift"),altKey:r("alt","option","opt")}}function Pd(t,e){let n=t.code;return typeof n=="string"&&0<n.length?n:e===" "?"Space":e.length===1?/[a-z]/i.test(e)?`Key${e.toUpperCase()}`:/[0-9]/.test(e)?`Digit${e}`:"":/^[A-Z][A-Za-z0-9]*$/.test(e)&&dI.has(e)?e:""}var dI=new Set(["Enter","Escape","Tab","Backspace","Delete","Home","End","PageUp","PageDown","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Insert","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]),uI="no document to press into";function YT(){let t=document.activeElement;if(Dt(t)&&document.body!==t)return t;if(Dt(document.body))return document.body;let e=document.documentElement;if(Dt(e))return e;throw new Error(uI)}function qT(t,e,n){return t.length===0&&cE(n)&&v.PRESS===e}function XT(t){let e=t.keys;return Array.isArray(e)?e.map(n=>WT(n)).filter(n=>n.length>0):[]}var pI=33,KT=500;async function ZT(t,e,n,r,i){let s=Date.now();for(i>KT&&await $f(KT);Date.now()-s<i;)Be(()=>t.dispatchEvent(new KeyboardEvent("keydown",{key:e,code:n,bubbles:!0,cancelable:!0,repeat:!0,...r}))),await $f(Math.min(pI,Math.max(0,i-(Date.now()-s))))}async function QT(t,e,n,r){let i=!1;for(let s of e){let a=Pd({},s);Be(()=>t.dispatchEvent(new KeyboardEvent("keydown",{key:s,code:a,bubbles:!0,cancelable:!0,...n})))||(i=!0)}r>0&&await $f(r);for(let s of[...e].reverse()){let a=Pd({},s);Be(()=>t.dispatchEvent(new KeyboardEvent("keyup",{key:s,code:a,bubbles:!0,...n})))}return i}gt();et();var fI=[[.5,.5],[.25,.25],[.75,.25],[.25,.75],[.75,.75]],hI=3;function Ud(t,e){if(e.width===0||e.height===0)return null;let n=t.ownerDocument;if(typeof n.elementFromPoint!="function")return null;let r=n,i=(d,p)=>(r.elementsFromPoint?.(d,p)??[n.elementFromPoint(d,p)]).find(E=>E!==null&&!qi(E))??null,s=new Map;for(let[d,p]of fI){let f=i(e.left+e.width*d,e.top+e.height*p);f!==null&&(f===t||t.contains(f)||f.contains(t)||s.set(f,(s.get(f)??0)+1))}let a=null,l=0;for(let[d,p]of s)p>l&&(a=d,l=p);return l>=hI?a:null}Ve();ws();var Hd={occluded:!1,occludedBy:null,scrolledIntoView:!1};function En(t,e,n={}){return new MouseEvent(e,{...n,view:t.ownerDocument.defaultView})}function Bd(t,e,n){let r={...n,view:t.ownerDocument.defaultView};return typeof PointerEvent=="function"?new PointerEvent(e,r):new MouseEvent(e,r)}async function Fd(t,e,n){let r=t.ownerDocument,i=r.activeElement??r.body,s={bubbles:!0,cancelable:!0,detail:n??0};Sc(t,"pointerdown",i),Be(()=>t.dispatchEvent(En(t,"mousedown",s))),t.tabIndex>=0&&typeof t.focus=="function"&&t.focus();let a=0;if(e!==void 0&&e.ms>0){let d=e.now();await e.sleep(e.ms),a=e.now()-d}return Sc(t,"pointerup",i),Be(()=>t.dispatchEvent(En(t,"mouseup",s))),{prevented:!Be(()=>t.dispatchEvent(En(t,"click",s))),heldMs:a}}function mI(t){return t.width>0||t.height>0}function gI(t,e){let n=t.ownerDocument.defaultView;if(n===null)return!1;let r=e.left+e.width/2,i=e.top+e.height/2;return r<0||i<0||r>n.innerWidth||i>n.innerHeight}function EI(t,e){let n=Ud(t,e);return n===null?{occluded:!1,occludedBy:null}:{occluded:!0,occludedBy:X.refFor(n)}}function o_(t){if(typeof t.getBoundingClientRect!="function")return Hd;let e=t.getBoundingClientRect();if(!mI(e))return Hd;let n=!1;return gI(t,e)&&typeof t.scrollIntoView=="function"&&(t.scrollIntoView({block:"center",inline:"center"}),n=!0,e=t.getBoundingClientRect()),{...EI(t,e),scrolledIntoView:n}}function Sc(t,e,n=null){Be(()=>t.dispatchEvent(Bd(t,e,{bubbles:!0,cancelable:!0,relatedTarget:n})))}function i_(t,e,n=null){Be(()=>t.dispatchEvent(Bd(t,e,{bubbles:!1,cancelable:!0,relatedTarget:n})))}function bI(t){if(typeof DataTransfer!="function")return null;let e=new DataTransfer,n=Array.isArray(t)?t:t!==void 0?[t]:[];for(let r of n)if(typeof r=="object"&&r!==null){let i=r;typeof i.mime=="string"&&typeof i.value=="string"&&e.setData(i.mime,i.value)}return e}var rt=1,JT=0,e_=5;function t_(t){let e=t.getBoundingClientRect();return{x:e.left+e.width/2,y:e.top+e.height/2}}function TI(t,e,n){return{x:Math.round(t.x+(e.x-t.x)*n),y:Math.round(t.y+(e.y-t.y)*n)}}async function Uf(t,e,n){let r=e??t,i=t_(t),s=t_(r),a=(_,S,L,D,G)=>{let Q={bubbles:!(S.endsWith("enter")||S.endsWith("leave")),cancelable:!0,clientX:L.x,clientY:L.y,screenX:L.x,screenY:L.y,buttons:D,button:0,...G!==void 0?{relatedTarget:G}:{}};_.dispatchEvent(S.startsWith("pointer")?Bd(_,S,{...Q,pointerId:1,isPrimary:!0}):En(_,S,Q))},l=t.getBoundingClientRect(),d=e!==null?r.getBoundingClientRect():null,p=(_,S)=>S.x>=_.left&&S.x<=_.right&&S.y>=_.top&&S.y<=_.bottom;a(t,"pointerdown",i,rt),a(t,"mousedown",i,rt),await so();let f=!1,E=!1;for(let _=1;_<=e_;_+=1){let S=TI(i,s,_/e_);!f&&!p(l,S)&&(f=!0,a(t,"pointerout",S,rt,r),a(t,"mouseout",S,rt,r),a(t,"pointerleave",S,rt,r),a(t,"mouseleave",S,rt,r)),f&&!E&&d!==null&&p(d,S)&&(E=!0,a(r,"pointerover",S,rt,t),a(r,"mouseover",S,rt,t),a(r,"pointerenter",S,rt,t),a(r,"mouseenter",S,rt,t)),a(r,"pointermove",S,rt),a(r,"mousemove",S,rt),await so()}!E&&d!==null&&(a(r,"pointerover",s,rt,t),a(r,"mouseover",s,rt,t),a(r,"pointerenter",s,rt,t),a(r,"mouseenter",s,rt,t)),a(r,"pointerup",s,JT),a(r,"mouseup",s,JT);let g=!1;if(typeof DragEvent=="function"){let _=bI(n),S={bubbles:!0,cancelable:!0};_!==null&&(S.dataTransfer=_),t.dispatchEvent(new DragEvent("dragstart",S)),await so(),r.dispatchEvent(new DragEvent("dragenter",S)),r.dispatchEvent(new DragEvent("dragover",S)),await so(),g=!r.dispatchEvent(new DragEvent("drop",S)),t.dispatchEvent(new DragEvent("dragend",S))}return g}async function s_(t,e){let n=_I(t);n_(t,"pointerdown"),Be(()=>t.dispatchEvent(r_("touchstart",n))),t.tabIndex>=0&&typeof t.focus=="function"&&t.focus();let r=0;if(e!==void 0&&e.ms>0){let s=e.now();await e.sleep(e.ms),r=e.now()-s}return Be(()=>t.dispatchEvent(r_("touchend",[]))),n_(t,"pointerup"),{prevented:!Be(()=>t.dispatchEvent(En(t,"click",{bubbles:!0,cancelable:!0}))),heldMs:r}}function n_(t,e){Be(()=>t.dispatchEvent(Bd(t,e,{bubbles:!0,cancelable:!0,pointerType:"touch",isPrimary:!0,width:23,height:23})))}function _I(t){if(typeof Touch!="function"||typeof t.getBoundingClientRect!="function")return[];let e=t.getBoundingClientRect();try{return[new Touch({identifier:0,target:t,clientX:e.left+e.width/2,clientY:e.top+e.height/2})]}catch{return[]}}function r_(t,e){if(typeof TouchEvent=="function")try{return new TouchEvent(t,{bubbles:!0,cancelable:!0,touches:e,targetTouches:e,changedTouches:e})}catch{}return new Event(t,{bubbles:!0,cancelable:!0})}gt();var SI=400,xI=.8;function AI(t,e){let n=t;for(;n!==null&&n!==document.body;){let r=getComputedStyle(n),i=e==="x"?r.overflowX:r.overflowY,s=e==="x"?n.scrollWidth>n.clientWidth:n.scrollHeight>n.clientHeight;if((i==="auto"||i==="scroll")&&s)return n;n=n.parentElement}return document.scrollingElement??document.documentElement}function a_(t,e,n,r){let i=t!==void 0?X.resolve(t):null;return Hf(i instanceof Element?i:void 0,e,n,r)}function Hf(t,e,n,r){let s=t!==void 0?AI(t,r!==void 0&&r!==0&&(e===void 0||e===0)?"x":"y"):document.scrollingElement??document.documentElement,a=s.scrollTop,l=s.scrollLeft;if(n!==void 0&&n>=0&&n<=1)s.scrollTop=Math.round(s.scrollHeight*n);else if(r!==void 0&&r!==0&&(s.scrollLeft=l+r),r===void 0||e!==void 0&&e!==0){let f=e??(Math.round(s.clientHeight*xI)||SI);s.scrollTop=a+f}s.dispatchEvent(new Event("scroll",{bubbles:!1}));let d=s.scrollTop,p=s.scrollLeft;return{scrolled:d!==a||p!==l,scrollTop:d,scrollHeight:s.scrollHeight,clientHeight:s.clientHeight,atEnd:d+s.clientHeight>=s.scrollHeight-1,atStart:d<=1,scrollLeft:p,scrollWidth:s.scrollWidth,clientWidth:s.clientWidth,atLeftEnd:p<=1,atRightEnd:p+s.clientWidth>=s.scrollWidth-1}}function xc(t,e=""){return typeof t=="string"?t:e}function yI(t){let e=X.resolve(t);if(e===null)throw new Error(`ref '${ni(t)}' no longer resolves to an element`);if(!Dt(e))throw new Error(`ref '${ni(t)}' is not an HTMLElement`);return e}function vI(t){let e=t.getAttribute("data-testid")??void 0,n=jn(t),r={};e!==void 0&&(r.testid=e);let i=n?.componentStack[0];i!==void 0&&(r.component=i),n?.source!==void 0&&(r.source=n.source);let s=we(t),a=Ee(t);return s.length>0&&(r.role=s),a.length>0&&(r.name=a),r}var RI=(t,e,n,r,i,s,a)=>{let l={ok:!0,ref:t,action:e,dispatched:!0,settled:r,settleReason:i,effect:n};return s.testid!==void 0&&(l.testid=s.testid),s.component!==void 0&&(l.component=s.component),s.source!==void 0&&(l.source=s.source),s.role!==void 0&&(l.role=s.role),s.name!==void 0&&(l.name=s.name),a!==void 0&&(l.warning=a),l},NI=new Set([v.FILL,v.TYPE,v.CLEAR,v.SELECT]),OI=t=>NI.has(t),wI=new Set([v.CLICK,v.DBLCLICK,v.CHECK,v.UNCHECK]);function u_(t,e){return e!==v.CHECK&&e!==v.UNCHECK?!1:Oe(t)&&t.checked===(e===v.CHECK)}function p_(t){let e=xc(t.toRef);return e!==""?e:xc(t.target)}var c_=new Set(["content","name","type","__base64"]),CI=new Set([Wo,Sg,"holdMs"]);function II(t){let e=Object.keys(t),n=e.filter(i=>!c_.has(i)&&!CI.has(i));if(n.length===0&&e.some(i=>c_.has(i)))return;let r=n.length===0?"no file was described":`upload does not read ${n.join(", ")}, so it would be dropped`;throw new Error(`upload needs the file described as args: { name, content?, type? } \u2014 ${r}. To upload a file from disk, use the reticle daemon which reads it via args.path and delivers real bytes; calling with { path } directly reaches only fabricated content.`)}function LI(t,e,n){let r=e===v.CLICK||e===v.DBLCLICK||e===v.CHECK||e===v.UNCHECK||e===v.DRAG||e===v.SUBMIT||e===v.PRESS&&$d(n)==="Enter",i=e===v.DRAG?X.resolve(p_(n)):null,s=e===v.PRESS&&$d(n)==="Enter"?PT(t):null,a=Tc(Ld(t),we(t))||s!==null&&Tc(Ld(s),we(s)),l=Dt(i)&&Tc(Ld(i),we(i));if(r&&(a||l)&&n[Wo]!==!0)throw new Error(`potentially destructive action blocked; retry with args.${Wo}=true`)}function f_(t){return!gr(t).includes(le.DISABLED)}function l_(t){if(Oe(t)||wt(t)||Un(t))return t.value}function d_(t){let e=t.ownerDocument.activeElement;return e===null||e===t.ownerDocument.body?null:X.refFor(e)}var kI=3e4;function Ac(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:Math.min(t,kI)}async function DI(t,e,n){if(v.CLICK===e){let r=Ac(n.holdMs);return await Fd(t,r===0?void 0:{ms:r,sleep:Ff,now:()=>Date.now()})}if(v.TAP===e){let r=Ac(n.holdMs);return await s_(t,r===0?void 0:{ms:r,sleep:Ff,now:()=>Date.now()})}return{prevented:await PI(t,e,n),heldMs:0}}var MI="cannot zoom from inside the page \u2014 CSS zoom changes how it LOOKS without changing the layout viewport, visualViewport or media queries, so a layout that breaks at 200% would be reported as checked and passing. Drive a real browser (reticle drive <url>, or reticle_lease) and zoom there.";function Bf(t){return typeof t=="number"&&Number.isFinite(t)?t:void 0}async function PI(t,e,n){switch(e){case v.DBLCLICK:return await Fd(t,void 0,1),await Fd(t,void 0,2),!Be(()=>t.dispatchEvent(En(t,"dblclick",{bubbles:!0,cancelable:!0,detail:2})));case v.HOVER:{let r=t.ownerDocument,i=r.activeElement??r.body;Sc(t,"pointerover",i),t.dispatchEvent(En(t,"mouseover",{bubbles:!0,relatedTarget:i})),i_(t,"pointerenter",i),t.dispatchEvent(En(t,"mouseenter",{relatedTarget:i})),Sc(t,"pointermove",i);let s=t.dispatchEvent(En(t,"mousemove",{bubbles:!0,cancelable:!0})),a=Ac(n.holdMs);return a>0&&await Ff(a),!s}case v.FOCUS:return t.focus(),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),!1;case v.BLUR:{let i=t.getRootNode().activeElement===t;return t.blur(),i||(t.dispatchEvent(new FocusEvent("blur")),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0}))),!1}case v.FILL:if(Oe(t)||wt(t)){if(typeof n.value!="string")throw new Error("fill requires a string `value` \u2014 pass it nested, as args: { value: '\u2026' }. To empty a field on purpose use the `clear` action, or fill with an explicit \"\".");return kf(t,"fill"),t.focus(),kd(t,n.value)}throw Lf(t,"fill"),new Error(`cannot fill a <${t.tagName.toLowerCase()}>`);case v.TYPE:if(Oe(t)||wt(t)){if(typeof n.text!="string")throw new Error("type requires a string `text` \u2014 pass it nested, as args: { text: '\u2026' }.");return kf(t,"type"),t.focus(),kd(t,t.value+n.text)}throw Lf(t,"type into"),new Error(`cannot type into a <${t.tagName.toLowerCase()}>`);case v.CLEAR:if(Oe(t)||wt(t))return kd(t,"");throw new Error(`cannot clear a <${t.tagName.toLowerCase()}>`);case v.SELECT:if(Un(t)){if(typeof n.value!="string")throw new Error("select requires a string `value` \u2014 pass it nested, as args: { value: '\u2026' }.");let r=n.value,i=Array.from(t.options);if(!i.some(s=>s.value===r)){let s=i.map(a=>`${a.value} (${a.label})`).join(", ");throw new Error(`no <option> with value '${ni(r)}' \u2014 available: ${i.length===0?"(none)":s}`)}return t.value=r,t.dispatchEvent(new Event("change",{bubbles:!0})),!1}throw new Error(`cannot select on a <${t.tagName.toLowerCase()}>`);case v.CHECK:case v.UNCHECK:{if(!Oe(t))throw new Error(`cannot (un)check a <${t.tagName.toLowerCase()}>`);if(!f_(t))throw new Error(`cannot ${e} a disabled control \u2014 a real user could not, so neither will Reticle`);if(t.type==="radio"&&e===v.UNCHECK)throw new Error("cannot uncheck a radio button \u2014 a real user could not; select another radio in the group");if(u_(t,e))return!1;let r=En(t,"click",{bubbles:!0,cancelable:!0,composed:!0});return!Be(()=>t.dispatchEvent(r))||r.defaultPrevented}case v.SUBMIT:{let r=Xb(t)?t:t.closest("form");if(r===null)throw new Error("no form to submit");return r.requestSubmit(),!1}case v.PRESS:{let r=zT(n),i=XT(n);if(i.length>0)return await QT(t,i,r,Ac(n.holdMs));let s=$d(n),a=Pd(n,s),l=Be(()=>t.dispatchEvent(new KeyboardEvent("keydown",{key:s,code:a,bubbles:!0,cancelable:!0,...r}))),d=Ac(n.holdMs);return d>0&&await ZT(t,s,a,r,d),Be(()=>t.dispatchEvent(new KeyboardEvent("keyup",{key:s,code:a,bubbles:!0,...r}))),!l}case v.SCROLL_INTO_VIEW:return t.scrollIntoView(),!1;case v.ZOOM:throw new Error(MI);case v.SCROLL:{let r=Bf(n.dy),i=Bf(n.dx),s=Bf(n.fraction);return Hf(t,r,s,i),!1}case v.UPLOAD:{if(!Oe(t)||t.type!=="file")throw new Error('upload target must be a <input type="file">');II(n);let r=xc(n.content,"reticle test file"),i=r;if(n.__base64===!0){let d=atob(r),p=new Uint8Array(d.length);for(let f=0;f<d.length;f++)p[f]=d.charCodeAt(f);i=p.buffer.slice(0)}let s=new File([i],xc(n.name,"file.txt"),{type:xc(n.type,"text/plain")}),a=new DataTransfer;a.items.add(s),t.files=a.files;let l=t.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0}));return t.dispatchEvent(new Event("change",{bubbles:!0})),!l}case v.DRAG:{let r=p_(n);if(r==="")return await Uf(t,null,n.data);let i=X.resolve(r);if(!Dt(i))throw new Error(`drag target '${ni(r)}' did not resolve to an element \u2014 pass a ref from reticle_snapshot or reticle_query as args.toRef (alias: args.target)`);return await Uf(t,i,n.data)}default:throw new Error(`unknown action '${e}'`)}}function $I(t){if(!(typeof t!="number"||!Number.isFinite(t)))return Math.max(0,Math.min(t,UI))}var UI=200;async function yc(t,e,n={}){let r=0<t.length,i=qT(t,e,n)?YT():yI(t);r&&LI(i,e,n);let s=r?vI(i):{},a=nt(i),l=f_(i),d=d_(i),p=l_(i),f=wI.has(e)?o_(i):Hd,E=u_(i,e),g=0,_=new Md,S=new MutationObserver(Re=>{g+=Re.length,_.collect(Re)});S.observe(i.ownerDocument.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0});let L=!1,D=0,G=!1,B=null;try{let Re=await DI(i,e,n);L=Re.prevented,D=Re.heldMs}finally{let Re=$I(n.settleMs),zt=await jT(Re);G=zt.settled,B=zt.settled?null:yg.TIMEOUT,S.disconnect()}let Q=l_(i),oe=d_(i),Se={dispatched:!0,targetMatched:r&&i.isConnected,visible:a,enabled:l,defaultPrevented:L,focusMoved:d!==oe?`${d??"null"}->${oe??"null"}`:null,valueChanged:OI(e)?p!==Q:!1,domMutatedWithin:g,..._.effect(Q),occluded:f.occluded,occludedBy:f.occludedBy,scrolledIntoView:f.scrolledIntoView,...D>0?{heldMs:D}:{},...E?{alreadyAtValue:!0}:{}},me=r?f.occluded?Wl.CLICK_OCCLUDED:e===v.HOVER&&Nd(i)?Wl.HOVER_NATIVE_ENTER_LEAVE:void 0:Wl.GLOBAL_PRESS;return RI(t,e,Se,G,B,s,me)}var Ff=t=>new Promise(e=>z(e,t));async function h_(t,e,n=!1){if(Tc(t)&&!n)throw new Error(`potentially destructive WebMCP tool blocked; retry with ${Wo}=true`);let r=navigator.modelContext;if(r===void 0||typeof r.callTool!="function")throw new Error("WebMCP (navigator.modelContext) not available on this page");return await r.callTool(t,e)}async function Gd(t){let e=[],n=[];for(let r of t){let i=await yc(r.ref,r.action,r.args??{});e.push(i.effect);let s={ref:i.ref,action:i.action,dispatched:i.dispatched,settled:i.settled,settleReason:i.settleReason};i.testid!==void 0&&(s.testid=i.testid),i.component!==void 0&&(s.component=i.component),i.role!==void 0&&(s.role=i.role),i.name!==void 0&&(s.name=i.name),i.source!==void 0&&(s.source=i.source),i.warning!==void 0&&(s.warning=i.warning),n.push(s)}return{ok:!0,count:t.length,effects:e,steps:n}}Mt();hc();var m_="data-theme";function HI(){let t=new Set;for(let e of Array.from(document.styleSheets)){let n=null;try{n=e.cssRules}catch{continue}if(n!==null){for(let r of Array.from(n))if(r instanceof CSSStyleRule)for(let i of Array.from(r.style))i.startsWith("--")&&t.add(i)}}return t}function BI(){let t=new Map,e=document.body??document.documentElement;if(e===null)return t;let n=getComputedStyle(e),r=document.createElement("span");r.style.position="absolute",r.style.pointerEvents="none",document.body.appendChild(r);try{for(let i of HI()){let s=FI(r,n.getPropertyValue(i).trim());if(s===null)continue;let a=t.get(s);a===void 0?t.set(s,[i]):a.push(i)}}finally{r.remove()}for(let i of t.values())i.sort();return t}function FI(t,e){return e.length===0||(t.style.color="",t.style.color=e,t.style.color==="")?null:getComputedStyle(t).color}function g_(t){return t==="rgba(0, 0, 0, 0)"||t==="transparent"}function GI(){let t=document.documentElement;if(t===null)return null;let e=Array.from(t.classList).map(i=>`.${i}`).join(""),n=t.getAttribute(m_),r=`${e}${n===null?"":`[${m_}="${n}"]`}`;return r.length===0?null:r}function E_(t){return t.length===1?t[0]??null:null}function b_(t){let e=BI(),n=e.get(t.color)??[],r=e.get(t.backgroundColor)??[],i=!g_(t.color)&&n.length===0,s=!g_(t.backgroundColor)&&r.length===0,a=0;for(let l of e.values())a+=l.length;return{colorToken:E_(n),colorTokens:n,backgroundToken:E_(r),backgroundTokens:r,offTheme:a>0&&(i||s),tokenCount:a,themeScope:GI()}}gt();mr();P();Bn();function W(t){try{t()}catch{}}function Vn(t){try{return t()}catch{return}}function vc(t){try{return t()}catch{return null}}function jd(t){let e={};if(t===null)return e;for(let n=0;n<t.length;n+=1){let r=t.key(n);if(r===null)continue;let i=t.getItem(r)??"";e[r]=He(r)?Ae:Jo(i)}return e}function T_(){let t={},e="";try{e=typeof document<"u"?document.cookie:""}catch{return t}for(let n of e.split(";")){let r=n.indexOf("=");if(r===-1)continue;let i=n.slice(0,r).trim();if(i==="")continue;if(He(i)){t[i]=Ae;continue}let s="";try{s=decodeURIComponent(n.slice(r+1).trim())}catch{s=n.slice(r+1).trim()}t[i]=Jo(s)}return t}function __(t){return t===ei.LOCAL?jd(vc(()=>window.localStorage)):t===ei.SESSION?jd(vc(()=>window.sessionStorage)):ei.COOKIE===t?T_():{local:jd(vc(()=>window.localStorage)),session:jd(vc(()=>window.sessionStorage)),cookies:T_()}}function ii(t,e){if(e!==null)return He(t)?Ae:Jo(e)}function S_(t){if(typeof Storage>"u")return()=>{};let e=Storage.prototype,n=Object.getOwnPropertyDescriptor(e,"setItem")?.value,r=Object.getOwnPropertyDescriptor(e,"removeItem")?.value,i=Object.getOwnPropertyDescriptor(e,"clear")?.value;if(n===void 0||r===void 0||i===void 0)return()=>{};let s=f=>f===vc(()=>window.sessionStorage)?ei.SESSION:ei.LOCAL,a=(f,E)=>{try{return f.getItem(E)}catch{return null}},l=function(f,E){let g=Vn(()=>a(this,f))??null;n.call(this,f,E),g!==E&&W(()=>{t(b.STORAGE_CHANGE,{area:s(this),key:f,...ii(f,g)===void 0?{}:{old:ii(f,g)},new:ii(f,E)??Ae})})};e.setItem=l;let d=function(f){let E=Vn(()=>a(this,f))??null;r.call(this,f),W(()=>{t(b.STORAGE_CHANGE,{area:s(this),key:f,...ii(f,E)===void 0?{}:{old:ii(f,E)}})})};e.removeItem=d;let p=function(){let f=s(this),E=[];try{for(let g=0;g<this.length;g+=1){let _=this.key(g);_!==null&&E.push({key:_,old:a(this,_)})}}catch{}i.call(this);for(let{key:g,old:_}of E)W(()=>{t(b.STORAGE_CHANGE,{area:f,key:g,...ii(g,_)===void 0?{}:{old:ii(g,_)}})})};return e.clear=p,()=>{e.setItem===l&&(e.setItem=n),e.removeItem===d&&(e.removeItem=r),e.clear===p&&(e.clear=i)}}P();Ve();et();var jI=is.FULL_PAGE_UNSUPPORTED,VI=[jI,is.NOT_COMPOSITED],KI="__TAURI_INTERNALS__";function WI(){let t=window[KI];if(typeof t?.invoke!="function")return;let e=t.invoke.bind(t);return async n=>{let r=await e(ud,{fullPage:n===!0});return typeof r=="string"?r:null}}async function zI(t){let e=[...document.querySelectorAll(Yi)],n=e.map(r=>r.style.visibility);for(let r of e)r.style.visibility="hidden";try{return e.length>0&&(await so(),await so()),await t()}finally{e.forEach((r,i)=>{r.style.visibility=n[i]??""})}}async function x_(t=!1){let e=window[eo],n=typeof e?.capture=="function"?e.capture:WI();if(n===void 0)return{ok:!1,reason:"no desktop capture helper installed"};try{let r=await zI(()=>n(t));return typeof r=="string"&&r.length>0?{ok:!0,path:r}:{ok:!1,reason:"capture returned no image"}}catch(r){let i=r instanceof Error?r.message:String(r);for(let s of VI)if(i.includes(s))return{ok:!1,reason:s};return{ok:!1,reason:i}}}oi();ri();Bn();oo();function YI(t,e){return Object.getOwnPropertyDescriptor(t,e)?.value}function bn(t,e){let n=YI(t,e);if(n===void 0)throw new Error(`[Reticle] cannot patch ${String(e)}: it is not an own property of the target`);return n}var qI=12e4,Ls=!1,br=0,A_=0,y_=1,Tr=[],Is=null,si,Vd={};function v_(){if(Is===null)return;let t=Is,e=t.clearTimeout.bind(window);si!==void 0&&e(si),si=t.setTimeout.bind(window)(()=>{si=void 0,ks()},qI)}function R_(){return Ls}function N_(){if(Ls||typeof window>"u")return;Ls=!0,br=0,A_=Date.now(),Is={setTimeout:bn(window,"setTimeout"),clearTimeout:bn(window,"clearTimeout"),setInterval:bn(window,"setInterval"),clearInterval:bn(window,"clearInterval"),dateNow:bn(Date,"now")};let t=(r,i,s)=>{let a=y_;return y_+=1,Tr.push({id:a,time:br+Math.max(0,i),cb:r,interval:s}),a},e=r=>{Tr=Tr.filter(i=>i.id!==r)},n=(r,i)=>()=>{r(...i)};window.setTimeout=((r,i=0,...s)=>t(n(r,s),i)),window.clearTimeout=(r=>e(r)),window.setInterval=((r,i=0,...s)=>t(n(r,s),i,Math.max(1,i))),window.clearInterval=(r=>e(r)),Vd={setTimeout:he(window,"setTimeout"),clearTimeout:he(window,"clearTimeout"),setInterval:he(window,"setInterval"),clearInterval:he(window,"clearInterval")},Date.now=()=>A_+br,Vd.dateNow=he(Date,"now"),v_()}function O_(t){if(!Ls)return;let e=br+Math.max(0,t),n=0;for(;n+=1,!(n>1e5);){let i=Tr.filter(s=>s.time<=e).sort((s,a)=>s.time-a.time)[0];if(i===void 0)break;Tr=Tr.filter(s=>s!==i),br=i.time,i.cb(),i.interval!==void 0&&Tr.push({...i,time:br+i.interval})}br=e,v_()}function ks(){if(!Ls||Is===null)return;let t=Is,e=Tr;si!==void 0&&(t.clearTimeout.bind(window)(si),si=void 0);let n=Vd;Vd={},window.setTimeout===n.setTimeout&&(window.setTimeout=t.setTimeout),window.clearTimeout===n.clearTimeout&&(window.clearTimeout=t.clearTimeout),window.setInterval===n.setInterval&&(window.setInterval=t.setInterval),window.clearInterval===n.clearInterval&&(window.clearInterval=t.clearInterval),Date.now===n.dateNow&&(Date.now=t.dateNow);let r=br;if(Is=null,Tr=[],Ls=!1,br=0,e.length===0)return;let i=t.setTimeout.bind(window),s=t.setInterval.bind(window),a=new Map,l={},d=p=>{a.delete(p),a.size===0&&l.current!==void 0&&ZI(t,l.current)};for(let p of e)p.interval!==void 0?a.set(p.id,s(p.cb,p.interval)):a.set(p.id,i(()=>{d(p.id),p.cb()},Math.max(0,p.time-r)));l.current=XI(a,t,d)}function XI(t,e,n){let r=i=>{let s=i.bind(window);return(a=>{let l=t.get(a);if(l===void 0){s(a);return}s(l),n(a)})};return window.clearTimeout=r(e.clearTimeout),window.clearInterval=r(e.clearInterval),{clearTimeout:he(window,"clearTimeout"),clearInterval:he(window,"clearInterval")}}function ZI(t,e){window.clearTimeout===e.clearTimeout&&(window.clearTimeout=t.clearTimeout),window.clearInterval===e.clearInterval&&(window.clearInterval=t.clearInterval)}var Wd="_reticle_reload";function ve(t){return typeof t=="string"?t:void 0}function C_(t){return typeof t=="number"?t:void 0}function Kd(t){return typeof t=="object"&&t!==null?t:{}}function QI(t){if(typeof t!="object"||t===null)return;let e=t;if(!(typeof e.file!="string"||typeof e.line!="number"))return{file:e.file,line:e.line,column:C_(e.column)}}function JI(t){return{by:ve(t.by),value:ve(t.value),role:ve(t.role),name:ve(t.name),text:ve(t.text),label:ve(t.label),placeholder:ve(t.placeholder),testid:ve(t.testid),alt:ve(t.alt),component:ve(t.component),scope:ve(t.scope),self:t.self===!0?!0:void 0,attrs:Array.isArray(t.attrs)?t.attrs.filter(e=>typeof e=="string"):void 0,source:QI(t.source)}}function eL(t){let e=X.resolve(t);if(e===null)throw new Error(ac.staleRefMessage(t));let n=e.getBoundingClientRect(),r=jn(e),i=e.ownerDocument.defaultView,s=i!==null?i.getComputedStyle(e):null,a=s!==null?{color:s.color,backgroundColor:s.backgroundColor,opacity:s.opacity,cursor:s.cursor,display:s.display,visibility:s.visibility}:null,l=bd(Ed(e,r?.source)),d=l!==void 0?void 0:tT(e.ownerDocument)?"This element has no source stamp. Others on the page do, so the stamping loader is running \u2014 the nearest stamped ancestor is out of range, or this element is rendered outside instrumented code.":"No element in this document carries a source stamp, so the stamping loader is not running: an older adapter, a bundler whose hook never ran, or a build the plugin was dropped from. Add @reticlehq/vite-plugin (or @reticlehq/babel-plugin) to the dev build and restart the dev server to get `file:line` back.",p={scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight,overflowY:s?.overflowY??"visible",scrollLeft:e.scrollLeft,scrollWidth:e.scrollWidth,clientWidth:e.clientWidth,overflowX:s?.overflowX??"visible"},f=aT(e);return{...Fn(e),...l!==void 0?{source:l}:{},...f.length>0?{paintContext:f}:{},...d!==void 0?{sourceUnavailable:d}:{},tag:e.tagName.toLowerCase(),href:e.getAttribute("href")??void 0,formAction:cc(e)||Oe(e)?e.form?.getAttribute("action")??void 0:void 0,formText:cc(e)||Oe(e)?e.form?.textContent??void 0:void 0,box:{x:n.x,y:n.y,width:n.width,height:n.height},occluded:tL(e,n),styles:a,scroll:p,theme:s!==null?b_(s):null,component:r}}function tL(t,e){return Ud(t,e)!==null}function nL(t){return typeof t=="object"&&t!==null&&"ok"in t&&typeof t.ok=="boolean"}var w_={ok:!1,reason:vg.UNAVAILABLE};function rL(t,e,n,r){let i=no();if(n!==void 0||r!==void 0){let d=yf(e),p=e!==void 0?d[e]:{stores:d,storeNames:i},f=n!==void 0?rb(p,n):{found:!0,value:p},E=f.found&&r!==void 0?ms(f.value,r):f.value,g=pc(E);return{store:e,path:n,found:f.found,value:g.value,...g.truncation===void 0?{}:{truncation:g.truncation},..."availableKeys"in f?{availableKeys:f.availableKeys}:{},..."totalKeys"in f?{totalKeys:f.totalKeys}:{},storeNames:i}}let{stores:s,truncation:a}=Ec(e),l={stores:s,storeNames:i};if(a!==void 0&&(l.truncation=a),t!==void 0&&t.length>0){let d=X.resolve(t);if(d===null)l.component=w_;else{let p=Rd(d);l.component=nL(p)?p:w_}}return l}function oL(){let t=document;return typeof t.getAnimations!="function"?{animations:[]}:{animations:t.getAnimations().map(n=>{let r=n.effect,i=r?.getTiming(),s=r?.target??null;return{playState:n.playState,currentTime:n.currentTime,duration:i?.duration,target:s===null?null:Fn(s)}})}}function iL(t,e){if(t.length===0||t.length>U.MAX_URL_LENGTH)return null;try{let n=new URL(t,e);return n.protocol==="http:"||n.protocol==="https:"?n.toString():null}catch{return null}}function I_(){let t=new Map;return t.set(C.SNAPSHOT,e=>_d({scope:ve(e.scope),mode:ve(e.mode)??as.FULL,includeRoot:e.includeRoot===!0})),t.set(C.QUERY,e=>{let n=e.limit;return Cd(JI(e),typeof n=="number"?n:void 0)}),t.set(C.MATCH,e=>bc(Jl.parse(Kd(e.query)),ve(e.state))),t.set(C.ACT,e=>{let n=ve(e.action)??"";if(n===v.WEBMCP){let r=Kd(e.args);return h_(ve(r.tool)??"",Kd(r.params),r[Wo]===!0)}return yc(ve(e.ref)??"",n,Kd(e.args))}),t.set(C.ACT_SEQUENCE,e=>Gd(Array.isArray(e.steps)?e.steps:[])),t.set(C.INSPECT,e=>eL(ve(e.ref)??"")),t.set(C.ANIMATIONS,()=>oL()),t.set(C.CLOCK,e=>{if(e.reset===!0)ks();else{e.freeze===!0&&N_();let n=e.advanceMs;typeof n=="number"&&O_(n)}return{frozen:R_()}}),t.set(C.STATE_READ,e=>rL(ve(e.ref),ve(e.store),ve(e.path),C_(e.depth))),t.set(C.STORAGE_READ,e=>__(ve(e.area))),t.set(C.CAPABILITIES,()=>ro()),t.set(C.CAPTURE,e=>x_(e.fullPage===!0)),t.set(C.SCROLL,e=>{let n=e.dy,r=e.fraction;return a_(ve(e.ref),typeof n=="number"?n:void 0,typeof r=="number"?r:void 0)}),t.set(C.NAVIGATE,e=>{let n=ve(e.url);if(n===void 0||n.length===0)return{ok:!1,reason:"url required"};let r=iL(n,window.location.href);return r===null?{ok:!1,reason:"only http(s) navigation is allowed"}:(window.location.assign(r),{ok:!0,url:r})}),t.set(C.REFRESH,e=>{if(e.hard===!0){let n=new URL(window.location.href);n.searchParams.set(Wd,String(Date.now())),window.location.replace(n.toString())}else window.location.reload();return{ok:!0}}),t}P();Ve();gc();Bn();function sL(t){if(typeof document>"u")return()=>{};let e=()=>{document.visibilityState==="visible"&&t()};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}var Gf=1e3,aL=3e4;function cL(t){return Math.min(t*2,aL)}var lL=500,dL=1008,uL=3,Et,_r,co,qd,Sr,Ds,ai,Ms,Nc,Ps,Oc,$s,ci,Us,Hs,bt,wc,fe,L_,zd,jf,k_,Vf,Kf,D_,Rc,M_,Yd=class{constructor(e){m(this,fe);m(this,Et);m(this,_r,[]);m(this,co,[]);m(this,qd,0);m(this,Sr,!1);m(this,Ds);m(this,ai,Gf);m(this,Ms,!1);m(this,Nc,!1);m(this,Ps,0);m(this,Oc,!1);m(this,$s,0);m(this,ci);m(this,Us);m(this,Hs);m(this,bt);m(this,wc);u(this,bt,e),u(this,wc,e.now??Dd)}connect(){typeof WebSocket>"u"||(u(this,Sr,!1),c(this,Hs)??u(this,Hs,(c(this,bt).onVisible??sL)(()=>h(this,fe,L_).call(this))),h(this,fe,zd).call(this))}sendEvent(e){h(this,fe,Rc).call(this,Hn({kind:ft.EVENT,event:e}),{seq:e.seq,t:e.t,type:e.type})}reannounce(){c(this,Et)===void 0||c(this,Et).readyState!==WebSocket.OPEN||c(this,Et).send(JSON.stringify(c(this,bt).hello()))}close(){var e;u(this,Sr,!0),(e=c(this,Hs))==null||e.call(this),u(this,Hs,void 0),c(this,Et)?.close(),u(this,Et,void 0)}};Et=new WeakMap,_r=new WeakMap,co=new WeakMap,qd=new WeakMap,Sr=new WeakMap,Ds=new WeakMap,ai=new WeakMap,Ms=new WeakMap,Nc=new WeakMap,Ps=new WeakMap,Oc=new WeakMap,$s=new WeakMap,ci=new WeakMap,Us=new WeakMap,Hs=new WeakMap,bt=new WeakMap,wc=new WeakMap,fe=new WeakSet,L_=function(){c(this,Sr)||(u(this,ai,Gf),c(this,Et)===void 0&&h(this,fe,zd).call(this))},zd=function(){let e;try{e=new WebSocket(c(this,bt).url)}catch{h(this,fe,Kf).call(this),h(this,fe,Vf).call(this),h(this,fe,jf).call(this);return}u(this,Et,e),e.onopen=()=>{u(this,Ds,void 0),u(this,Ms,!1),u(this,Nc,!0),u(this,ai,Gf);let n=c(this,bt).hello();c(this,Us)??u(this,Us,n.sessionId),e.send(JSON.stringify(n)),h(this,fe,M_).call(this,e,n.sessionId);let r=[...c(this,_r),...c(this,co)].sort((i,s)=>i.order-s.order);for(let i of r)e.send(i.text);u(this,_r,[]),u(this,co,[]),c(this,bt).onConnected?.()},e.onmessage=n=>{let r=n.data;h(this,fe,D_).call(this,typeof r=="string"?r:String(r))},e.onclose=n=>{if(u(this,Et,void 0),n.code===dL){u(this,Sr,!0);let r=n.reason.length>0?n.reason:"policy violation";Gn(`[reticle] bridge refused the connection: ${r} \u2014 not retrying.`),c(this,bt).onConnectionLost?.();return}h(this,fe,Kf).call(this),h(this,fe,Vf).call(this),h(this,fe,jf).call(this)},e.onerror=()=>{e.close()}},jf=function(){if(c(this,Sr))return;let e=c(this,ai);u(this,ai,cL(e)),(c(this,bt).schedule??z)(()=>h(this,fe,k_).call(this),e)},k_=function(){c(this,Sr)||c(this,Et)!==void 0||h(this,fe,zd).call(this)},Vf=function(){c(this,Nc)||c(this,Oc)||(u(this,Ps,c(this,Ps)+1),c(this,Ps)>=uL&&(u(this,Oc,!0),c(this,bt).onUnreachable?.({url:c(this,bt).url,attempts:c(this,Ps)})))},Kf=function(){let e=c(this,wc).call(this);c(this,Ds)??u(this,Ds,e),!c(this,Ms)&&e-c(this,Ds)>=hE.BRIDGE_LOST_MS&&(u(this,Ms,!0),c(this,bt).onConnectionLost?.())},D_=async function(e){let n;try{n=JSON.parse(e)}catch{return}let r=Kp.safeParse(n);if(!r.success){let a=n?.id;typeof a=="string"&&a.length>0&&h(this,fe,Rc).call(this,Hn({kind:ft.COMMAND_RESULT,id:a,ok:!1,error:"this page could not parse the command \u2014 the @reticlehq/browser SDK and the daemon are probably different versions. Nothing ran."}));return}let i=r.data;if(i.sessionId!==void 0&&i.sessionId!==c(this,Us)){h(this,fe,Rc).call(this,Hn({kind:ft.COMMAND_RESULT,id:i.id,ok:!1,error:`command addressed to session ${i.sessionId} but this page is ${c(this,Us)??"(none)"} \u2014 the page reconnected under a new id, or two sessions share a socket. Nothing ran.`}));return}let s;try{s=await c(this,bt).handleCommand(i)}catch(a){s={ok:!1,error:a instanceof Error?a.message:String(a)}}h(this,fe,Rc).call(this,Hn({kind:ft.COMMAND_RESULT,id:i.id,ok:s.ok,result:s.result,error:s.error}))},Rc=function(e,n){if(c(this,Et)!==void 0&&c(this,Et).readyState===WebSocket.OPEN){c(this,Et).send(e);return}if(c(this,_r).length+c(this,co).length>=lL){let s=c(this,_r).length>0?c(this,_r).shift():c(this,co).shift();if(s?.event!==void 0){u(this,$s,c(this,$s)+1);let a=c(this,ci);(a===void 0||s.event.t<a.t)&&u(this,ci,s.event)}}let r=n!==void 0&&sE.has(n.type),i=zm(this,qd)._++;r?c(this,_r).push({text:e,event:n,order:i}):c(this,co).push({text:e,event:n,order:i})},M_=function(e,n){let r=c(this,ci);if(r===void 0)return;let i={t:r.t,seq:r.seq,type:b.TRANSPORT_OVERFLOW,sessionId:n,data:{dropped:c(this,$s)}};e.send(Hn({kind:ft.EVENT,event:i})),u(this,ci,void 0),u(this,$s,0)};Wf();oi();P();ri();function U_(){let t=[A.UI,A.NET,A.LOG,A.ROUTE,A.STORAGE,A.TIME,A.SIGNAL];return no().length>0?[...t,A.STATE]:t}P();var pL="__TAURI_INTERNALS__";function H_(){if(typeof window>"u")return Mn.SERVICE;let t=window;return t[eo]!==void 0||t[pL]!==void 0?Mn.WEBVIEW:Mn.WEB}var fL=[C.SNAPSHOT,C.QUERY,C.MATCH,C.INSPECT,C.ACT,C.ACT_SEQUENCE,C.ANIMATIONS,C.NARRATE,C.CLOCK,C.CAPABILITIES,C.STATE_READ,C.STORAGE_READ,C.SCROLL,C.SESSION_CONFIG,C.PRESENTER,C.IMPACT,C.CAPTURE,C.NAVIGATE,C.REFRESH,C.FLOWS];function B_(){return[...fL]}oo();P();Mt();gt();et();mr();function hL(t){try{return t.contentDocument?.body??null}catch{return null}}function zf(t){let e=[],n=(r,i)=>{if(!(i>=3))for(let s of r.querySelectorAll("iframe")){let a=hL(s);a!==null&&(e.push(a),n(a,i+1))}};return n(t,0),e}function F_(t){let e=new AbortController,n=()=>{for(let i of zf(document))t(i)};n();let r=i=>{i.target instanceof HTMLIFrameElement&&n()};return document.addEventListener("load",r,{capture:!0,signal:e.signal}),()=>e.abort()}function G_(t){let e=hr(t)?t:null;return e===null?void 0:e.closest("[data-testid]")?.getAttribute("data-testid")??X.refFor(e)}var mL=["class","hidden","disabled","open","aria-hidden","aria-expanded","aria-selected","aria-checked","data-state","style","src","href","value"],j_=120;function Xd(t){if(t!==null)return t.length>j_?`${t.slice(0,j_)}\u2026`:t}var gL=new Set(["dialog","alertdialog"]),EL=new Set(["alert","status"]),Cc=40;function V_(t,e){return t!=="generic"||e.length>0}var bL=40;function K_(t){let e=we(t),n=Ee(t);if(V_(e,n))return{role:e,name:n,el:t};let r=0;for(let i of t.querySelectorAll("*")){if(r>=bL)return;if(r+=1,Le(i))continue;let s=we(i),a=Ee(i);if(V_(s,a))return{role:s,name:a,el:i}}}var TL=3;function Yf(t){let e="";for(let r of t)r.nodeType===TL&&(e+=r.nodeValue??"");let n=e.trim();return n.length>0?n:void 0}function W_(t){let e=Yb(),n=new MutationObserver(a=>{let l=0,d=0,p=0,f=0;for(let E of a){if(E.type==="attributes"){let g=E.target;if(hr(g)&&E.attributeName!==null&&!Le(g)){if(p>=Cc){f+=1;continue}p+=1;let _=Xd(g.getAttribute(E.attributeName)),S=Xd(E.oldValue);t(b.DOM_ATTR,{attr:E.attributeName,..._===void 0?{}:{value:_},...S===void 0?{}:{old:S}},X.refFor(g))}continue}if(E.type==="characterData"){let g=E.target.parentElement;if(g!==null&&!Le(g)){if(p>=Cc){f+=1;continue}p+=1;let _=(E.target.textContent??"").trim().slice(0,80),S=Xd(E.oldValue?.trim()??null);t(b.DOM_TEXT,{text:_,...S===void 0?{}:{old:S}},X.refFor(g))}continue}if(Yf(E.addedNodes)!==void 0||Yf(E.removedNodes)!==void 0){let g=hr(E.target)?E.target:null;if(g!==null&&!Le(g))if(p>=Cc)f+=1;else{p+=1;let _=(g.textContent??"").trim().slice(0,80),S=Xd(Yf(E.removedNodes)??null);t(b.DOM_TEXT,{text:_,...S===void 0?{}:{old:S}},X.refFor(g))}}for(let g of E.addedNodes){if(!hr(g))continue;if(l>=Cc){f+=1;continue}if(Le(g))continue;let _=K_(g);if(_===void 0)continue;let{role:S,name:L}=_;l+=1;let D=X.refFor(_.el);t(b.DOM_ADDED,{role:S,name:L,region:G_(E.target)},D),(gL.has(S)||EL.has(S)||g.getAttribute("aria-modal")==="true")&&nt(g)&&t(b.VISIBLE_SHOWN,{role:S,name:L},D)}for(let g of E.removedNodes){if(!hr(g))continue;if(d>=Cc){f+=1;continue}if(Le(g)||hr(E.target)&&Le(E.target))continue;let _=K_(g);if(_===void 0)continue;let{role:S,name:L}=_;d+=1,t(b.DOM_REMOVED,{role:S,name:L,region:G_(E.target)})}}f>0&&t(b.TRUNCATED,{channel:Kl.DOM,dropped:f})}),r={subtree:!0,childList:!0,attributes:!0,attributeFilter:mL,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0};n.observe(document.documentElement,r);for(let a of Kb())n.observe(a,r);let i=zb(a=>n.observe(a,r)),s=F_(a=>n.observe(a,r));return()=>{s(),i(),e(),n.disconnect()}}P();ri();Bn();function z_(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function _L(t,e){if(!z_(t)||!z_(e))return Object.is(t,e)?[]:[{path:"",old:t,new:e}];let n=[];for(let r of new Set([...Object.keys(t),...Object.keys(e)]))Object.is(t[r],e[r])||n.push({path:r,old:t[r],new:e[r]});return n}function Y_(t,e){return He(t)?Ae:hf(e)}function SL(t,e){if(Object.is(t,e))return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}}function q_(t){try{return t()}catch{return}}function X_(t){let e=new Map,n=([i,s,a])=>{try{e.get(i)?.()}catch{}let l=q_(s);e.set(i,a(()=>{W(()=>{let d=q_(s),p=_L(l,d);l=d;for(let f of p){let E=Y_(f.path,f.new),g=Y_(f.path,f.old);!He(f.path)&&SL(g,E)||W(()=>t(b.STATE_CHANGE,{name:i,path:f.path,value:E,old:g}))}})}))};for(let i of gT())n(i);e.size===0&&t(b.BLIND_SPOT,{kind:mt.UNWATCHED_STATE,count:1});let r=fT(i=>{let s=e.size===0;n(i),s&&e.size>0&&t(b.BLIND_SPOT,{kind:mt.UNWATCHED_STATE,count:0})});return()=>{r();for(let i of e.values())try{i()}catch{}e.clear()}}P();Mt();function Bs(t){if(!(t instanceof Element)||t===document.body)return;let e=we(t),n=Ee(t);return n.length>0?`${e} "${n}"`:e}function xL(t){return t===null||t===document.body}function Z_(t){let e=new AbortController,{signal:n}=e,r=null,i=a=>{let l=a.target,d=r;r=l,t(b.FOCUS_CHANGE,{...Bs(l)===void 0?{}:{to:Bs(l)},...Bs(d)===void 0?{}:{from:Bs(d)},toBody:xL(l)})},s=a=>{if(a.relatedTarget!==null)return;let l=r;r=null,t(b.FOCUS_CHANGE,{...Bs(l)===void 0?{}:{from:Bs(l)},toBody:!0})};return document.addEventListener("focusin",i,{signal:n}),document.addEventListener("focusout",s,{signal:n}),()=>e.abort()}P();Mt();var Q_=160,AL=150,yL=/^(cc-|current-password|new-password)/i;function J_(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement}function vL(t){let e=t.getAttribute("data-testid");if(e!==null&&e.length>0)return e;if(t.name.length>0)return t.name;let n=Ee(t);if(n.length>0)return n;let r=t.getAttribute("id");return r!==null&&r.length>0?r:t.tagName.toLowerCase()}function RL(t){if(t instanceof HTMLInputElement&&t.type==="password")return!0;let e=t.getAttribute("autocomplete");if(e!==null&&yL.test(e))return!0;for(let n of[t.name,t.getAttribute("data-testid"),t.getAttribute("id")])if(n!==null&&n.length>0&&He(n))return!0;return!1}function eS(t){let e=new AbortController,{signal:n}=e,r=new Map,i=(d,p)=>{let f=d.value,E=RL(d);t(b.FIELD_CHANGE,{field:vL(d),kind:p,length:f.length,...E?{redacted:!0}:{value:f.length>Q_?`${f.slice(0,Q_)}\u2026`:f}})},s=d=>{let p=r.get(d);p!==void 0&&clearTimeout(p),r.delete(d)},a=d=>{let p=d.target;J_(p)&&(s(p),r.set(p,setTimeout(()=>{r.delete(p),i(p,"input")},AL)))},l=d=>{let p=d.target;J_(p)&&(s(p),i(p,"change"))};return document.addEventListener("input",a,{signal:n,capture:!0}),document.addEventListener("change",l,{signal:n,capture:!0}),()=>{for(let d of r.values())clearTimeout(d);r.clear(),e.abort()}}P();function NL(t){let e=t;for(let n=0;n<3;n+=1){let r=Array.from(e.children).filter(s=>s instanceof HTMLElement),i=r.length===1?r[0]:void 0;if(i===void 0||i.offsetHeight<e.scrollHeight*.9)return e;e=i}return e}function OL(t){let e=t.scrollHeight,n=t.clientHeight;if(n<=0||e<n*1.2)return 0;let r=NL(t),i=Array.from(r.children).filter(f=>f instanceof HTMLElement);if(i.length<2)return 0;let s=1/0,a=0,l=0;for(let f of i){let E=f.offsetTop,g=E+f.offsetHeight;E<s&&(s=E),g>a&&(a=g),l+=f.offsetHeight}let d=Math.max(0,s)+Math.max(0,e-a);if(d<e*.25)return 0;let p=l/i.length;return p<=0?0:Math.round(d/p)}function tS(){let t=0;for(let e of document.querySelectorAll("*"))e.scrollHeight<=e.clientHeight||(t+=OL(e));return t}Ve();function wL(){let t=0;for(let e of document.querySelectorAll("*"))e.tagName.includes("-")&&e.shadowRoot===null&&(Wb(e)||e.children.length>0||(e.textContent??"").trim().length>0||e.offsetHeight<=0&&e.offsetWidth<=0||(t+=1));return t}function CL(t){let e=t.getAttribute("src");if(e===null||e.length===0)return!1;try{return t.contentDocument===null}catch{return!0}}function IL(t){let e=0;for(let n of t)CL(n)&&(e+=1);return e}function LL(){return IL(Array.from(document.querySelectorAll("iframe")))}function kL(){return zf(document).length}var DL=250;function nS(t){let e=[{kind:mt.CROSS_ORIGIN_IFRAME,count:LL},{kind:mt.UNINSTRUMENTED_FRAME,count:kL},{kind:mt.CLOSED_SHADOW_ROOT,count:wL},{kind:mt.VIRTUALIZED_UNMOUNTED,count:tS}],n=new Map,r=()=>{for(let a of e){let l=a.count();l!==n.get(a.kind)&&(n.set(a.kind,l),l>0&&t(b.BLIND_SPOT,{kind:a.kind,count:l}))}};r();let i,s=new MutationObserver(()=>{i===void 0&&(i=z(()=>{i=void 0,r()},DL))});return s.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{i!==void 0&&pe(i),s.disconnect()}}P();P();Bn();Ve();var ML=/application\/json|text\/|application\/xml|x-www-form-urlencoded|graphql/i,PL=/event-stream|x-ndjson|application\/stream/i,$L=/event-stream/i;function iS(t,e){return t!==null&&$L.test(t)?!1:e===null}var UL=500;async function sS(t){let e;try{return await Promise.race([t,new Promise(n=>{e=z(()=>n(void 0),UL)})])}finally{e!==void 0&&pe(e)}}function qf(t){return t===null||PL.test(t)?!1:ML.test(t)}var aS=8192,HL=262144,BL=256,Ic=aS;function cS(t){Number.isFinite(t)&&(Ic=Math.min(HL,Math.max(BL,Math.floor(t))))}var FL=aS*2;function GL(t){let e=Ic*2;return t?Math.min(e,FL):e}var jL=/\b(Bearer|Basic)\s+(?=[A-Za-z0-9._~+/=-]{16,})(?=[A-Za-z0-9._~+/=-]*[\d._~+/=-])[A-Za-z0-9._~+/=-]+/gi;function rS(t){return t.replace(jL,(e,n)=>`${n} ${Ae}`).replace(/([A-Za-z0-9_.-]+)(\s*[=:]\s*"?)([^&\s,;"}]+)/g,(e,n,r)=>He(n)?`${n}${r}${Ae}`:e)}var oS=4096;function Xf(t,e){return e&&t>=400}function Zf(t,e){let n=lo(t,e);return n.body.length<=oS?n:{body:n.body.slice(0,oS),truncated:!0}}function lo(t,e){let n=e!==null&&/json|graphql/i.test(e),r=GL(!n),i=t.length>r,s=i?t.slice(0,r):t,a;if(n)try{a=Hn(JSON.parse(s))}catch{a=rS(s)}else a=rS(s);a=Jo(a);let l=i||a.length>Ic;return{body:a.length>Ic?a.slice(0,Ic):a,truncated:l}}var VL=/text\/|json|csv|xml|ndjson|javascript/i,KL=2e3;function lS(t,e={}){if(typeof URL.createObjectURL!="function")return()=>{};let n=new AbortController,r=URL.createObjectURL.bind(URL),i=new Map,s=he(URL,"createObjectURL"),a=function(_){let S=r(_);return W(()=>{if(typeof Blob<"u"&&_ instanceof Blob){let L=VL.test(_.type)?_.text().catch(()=>{}):Promise.resolve(void 0);i.set(S,{type:_.type,size:_.size,text:L})}}),S};URL.createObjectURL=a;let l=(g,_)=>{let S=i.get(g);S!==void 0&&(i.delete(g),S.text.then(L=>{W(()=>{d(S,_,L)})}))},d=(g,_,S)=>{let L={mimeType:g.type,bytes:g.size};if(_!==void 0&&_.length>0&&(L.filename=_),S!==void 0&&(L.lines=S.split(`
1336
+ `).filter(D=>D.length>0).length,e.capturePreview===!0)){let{body:D,truncated:G}=lo(S.slice(0,KL),g.type);L.preview=D,G&&(L.previewTruncated=!0)}t(b.DOWNLOAD,L)},p=g=>{W(()=>{let _=g.target,S=_ instanceof Element?_.closest("a[download]"):null;S!==null&&l(S.getAttribute("href")??"",S.getAttribute("download")??void 0)})};document.addEventListener("click",p,{capture:!0,signal:n.signal});let f=he(HTMLAnchorElement.prototype,"click"),E=function(){let _=Vn(()=>this.hasAttribute("download")?{href:this.getAttribute("href")??"",name:this.getAttribute("download")??void 0}:void 0);f.call(this),W(()=>{_!==void 0&&l(_.href,_.name)})};return HTMLAnchorElement.prototype.click=E,()=>{n.abort(),URL.createObjectURL===a&&(URL.createObjectURL=s),HTMLAnchorElement.prototype.click===E&&(HTMLAnchorElement.prototype.click=f),i.clear()}}P();function dS(t){let e=he(window,"open");if(e===void 0)return()=>{};let r=function(i,s,a){let l=e.call(this,i,s,a);return W(()=>{t(b.CONTEXT_OPENED,{...i===void 0?{}:{href:i}})}),l};return window.open=r,()=>{window.open===r&&(window.open=e)}}P();P();P();Ve();var WL=1e4;function uS(t,e,n,r,i,s){if(!iS(i,s)||typeof e.body?.getReader!="function")return;let a;try{a=e.clone()}catch{return}let l=a.body;l!==null&&(t(b.NET_STREAM,{transport:Pn.FETCH,direction:$n.OPEN,url:r,id:n}),(async()=>{let d=l.getReader(),p=!1,f,E=new Promise(g=>{f=z(()=>g("expired"),WL)});try{for(;;){let g=await Promise.race([d.read(),E]);if(g==="expired"){p=!0,d.cancel().catch(()=>{});break}if(g.done)break}}catch{}finally{f!==void 0&&pe(f)}t(b.NET_STREAM,{transport:Pn.FETCH,direction:$n.CLOSE,url:r,id:n,...p?{gaveUp:!0}:{}})})())}function zL(t){if(t instanceof ArrayBuffer)return t.byteLength;if(typeof Blob<"u"&&t instanceof Blob)return t.size;if(ArrayBuffer.isView(t))return t.byteLength}function Qf(t,e){if(typeof t!="string"){let r=zL(t);return r===void 0?{frameType:typeof t}:{frameType:"binary",frameBytes:r}}let n={frameBytes:t.length};if(e){let{body:r,truncated:i}=lo(t,"application/json");n.frame=r,i&&(n.frameTruncated=!0)}return n}var Fs={NULL:"0",STRING:"s",NUMBER:"n",BOOLEAN:"b",OTHER:"?"};function Zd(t){if(t===null)return Fs.NULL;if(Array.isArray(t))return`[${t.map(Zd).join(",")}]`;if(typeof t=="object"){let e=t;return`{${Object.keys(e).sort().map(n=>`${n}:${Zd(e[n])}`).join(",")}}`}return typeof t=="string"?Fs.STRING:typeof t=="number"?Fs.NUMBER:typeof t=="boolean"?Fs.BOOLEAN:Fs.OTHER}function pS(t,e){return gs(`${t}#${String(e)}`)}function YL(t){try{return Zd(JSON.parse(t))}catch{return Fs.OTHER}}function Jf(t,e){let n,r="application/json",i=AE;if(typeof t=="string")n=t,n.length>0&&(i=pS(YL(n),n.length));else if(typeof URLSearchParams<"u"&&t instanceof URLSearchParams){if(n=t.toString(),r="application/x-www-form-urlencoded",n.length>0){let d=Object.fromEntries(new URLSearchParams(n));i=pS(Zd(d),n.length)}}else if(t!=null){let d=t.constructor?.name??typeof t;return e?{requestBodyType:d}:{}}let s={[rd]:i};if(!e||n===void 0||n.length===0)return s;let{body:a,truncated:l}=lo(n,r);return l?{...s,requestBody:a,requestBodyTruncated:!0}:{...s,requestBody:a}}function fS(t){return t>=200&&t<400}function hS(t,e,n){let r={};t!==""&&(r.statusText=t),e!==null&&e!==""&&(r.contentType=e);let i=n!==null?Number.parseInt(n,10):Number.NaN;return Number.isFinite(i)&&(r.responseSize=i),r}function qL(t){return typeof t=="string"?t:t instanceof URL?t.href:t.url}function XL(t,e){return e?.method!==void 0?e.method.toUpperCase():t instanceof Request?t.method.toUpperCase():"GET"}var ZL=/@reticlehq|reticle\.ts|network\.ts|transport\.ts|<anonymous>|new Promise|node:internal/i,QL=/node_modules|\/\.vite\/deps\//i;function JL(t){if(t===void 0)return;let e=t.split(`
1337
+ `).slice(1).map(r=>r.trim()).filter(r=>r.length>0&&!ZL.test(r));return(e.find(r=>!QL.test(r))??e[0])?.slice(0,300)}function eh(){return JL(new Error().stack)}function e1(t){if(t===void 0)return{};let e={};return t.responseStart>0&&t.requestStart>0&&(e.ttfbMs=Math.round(t.responseStart-t.requestStart)),t.transferSize>0&&(e.transferSize=t.transferSize),e}function mS(t){try{let e=performance.getEntriesByName(t,"resource");return e1(e[e.length-1])}catch{return{}}}function t1(t){try{return new URL(t,location.href).pathname===Gl}catch{return t.includes(Gl)}}function n1(t){try{return Function.prototype.toString.call(t).includes("native code")}catch{return!1}}var gS=new WeakSet;function ES(t,e={}){var zi,Vm;let n=e.captureBodies===!0,r=e.captureErrorBodies!==!1,i=e.reinterpret,s=bn(window,"fetch"),a=s.bind(window);!n1(s)&&!gS.has(s)&&t(b.BLIND_SPOT,{kind:mt.WRAPPED_NETWORK,count:1});let l=0,d=()=>`n${++l}`;window.fetch=async(Pe,ie)=>{let We=qL(Pe);if(e.ignore?.(We)===!0)return a(Pe,ie);let ce=d(),Qe=performance.now(),yt=XL(Pe,ie),Ma=Dn(We),Pa=Ma.url,Il=Vn(()=>eh()),$a=Il===void 0?{}:{initiatorStack:Il};W(()=>{t(b.NET_PENDING,{id:ce,method:yt,...Ma,initiator:"fetch",...$a})});try{let Je=await a(Pe,ie),AR=performance.now(),Ua=Vn(()=>Je.headers.get("content-type"))??null;W(()=>{uS(t,Je,ce,Pa,Ua,Je.headers.get("content-length"))}),Cl.add(We);let Km=Ha=>{W(()=>{t(b.NET_REQUEST,{id:ce,method:yt,...Ma,status:Je.status,ok:fS(Je.status),durationMs:Math.round(AR-Qe),initiator:"fetch",...$a,...mS(We),...hS(Je.statusText,Ua,Je.headers.get("content-length")),...Jf(ie?.body,n),...Ha,...i?.(Pa,Ll=>Je.headers.get(Ll))??{}})})},yR=Xf(Je.status,r);if((n||yR)&&qf(Ua)){let Ha;try{Ha=Je.clone()}catch{}(async()=>{let Ll={};if(Ha!==void 0)try{let qu=await sS(Ha.text());if(qu!==void 0){let{body:vR,truncated:RR}=n?lo(qu,Ua):Zf(qu,Ua);Ll={responseBody:vR,...RR?{responseBodyTruncated:!0}:{},...n?{}:{responseBodyReason:"error-status"}}}}catch{}try{Km(Ll)}catch{}})().catch(()=>{})}else Km({});return Je}catch(Je){throw W(()=>{t(b.NET_REQUEST,{id:ce,method:yt,url:Pa,status:0,ok:!1,error:Je instanceof Error?Je.message:String(Je),durationMs:Math.round(performance.now()-Qe),initiator:"fetch",...$a})}),Je}};let p=bn(window,"fetch");gS.add(p);let f=new WeakMap,E=XMLHttpRequest.prototype,g=he(E,"open"),_=he(E,"send"),S=g;E.open=function(Pe,ie,...We){W(()=>{f.set(this,{id:d(),method:Pe.toUpperCase(),url:id(String(ie)),rawUrl:String(ie),start:0})}),S.call(this,Pe,ie,...We)};let L=he(E,"open"),D=new WeakSet;E.send=function(Pe){W(()=>{let ie=f.get(this);if(ie!==void 0){ie.start=performance.now(),ie.reqBody=Pe??null,ie.initiatorStack=eh();let We=ie.initiatorStack===void 0?{}:{initiatorStack:ie.initiatorStack};t(b.NET_PENDING,{id:ie.id,method:ie.method,...Dn(ie.rawUrl),initiator:"xhr",...We}),D.has(this)||(D.add(this),this.addEventListener("loadend",()=>{W(()=>{let ce=f.get(this);if(ce===void 0)return;Cl.add(ce.rawUrl);let Qe=this.getResponseHeader("content-type"),yt={},Ma=this.responseType===""||this.responseType==="text",Pa=Xf(this.status,r);if((n||Pa)&&Ma&&qf(Qe))try{let{body:Il,truncated:$a}=n?lo(this.responseText,Qe):Zf(this.responseText,Qe);yt={responseBody:Il,...$a?{responseBodyTruncated:!0}:{},...n?{}:{responseBodyReason:"error-status"}}}catch{}t(b.NET_REQUEST,{id:ce.id,method:ce.method,...Dn(ce.rawUrl),status:this.status,ok:fS(this.status),durationMs:Math.round(performance.now()-ce.start),initiator:"xhr",...ce.initiatorStack===void 0?{}:{initiatorStack:ce.initiatorStack},...mS(ce.rawUrl),...hS(this.statusText,Qe,this.getResponseHeader("content-length")),...Jf(ce.reqBody,n),...yt})})}))}}),_.call(this,Pe??null)};let G=he(E,"send"),B=window.EventSource,Q=window.WebSocket,oe,Se;n&&typeof B=="function"&&(window.EventSource=class extends B{constructor(Pe,ie){super(Pe,ie),W(()=>{let We=Dn(String(Pe));t(b.NET_STREAM,{transport:Pn.SSE,direction:$n.OPEN,...We}),this.addEventListener("message",ce=>{W(()=>{t(b.NET_STREAM,{transport:Pn.SSE,direction:$n.IN,...We,...Qf(ce.data,n)})})})})}},oe=window.EventSource),n&&typeof Q=="function"&&(window.WebSocket=(Vm=class extends Q{constructor(ie,We){super(ie,We);m(this,zi);u(this,zi,t1(String(ie))),!c(this,zi)&&W(()=>{let ce=Dn(String(ie));t(b.NET_STREAM,{transport:Pn.WS,direction:$n.OPEN,...ce}),this.addEventListener("message",Qe=>{W(()=>{t(b.NET_STREAM,{transport:Pn.WS,direction:$n.IN,...ce,...Qf(Qe.data,n)})})})})}send(ie){if(c(this,zi)){super.send(ie);return}super.send(ie),W(()=>{t(b.NET_STREAM,{transport:Pn.WS,direction:$n.OUT,...Dn(this.url),...Qf(ie,n)})})}},zi=new WeakMap,Vm),Se=window.WebSocket);let me=typeof navigator<"u"?Object.getPrototypeOf(navigator):null,Re=me===null?void 0:Object.getOwnPropertyDescriptor(me,"sendBeacon")?.value,zt;me!==null&&Re!==void 0&&(zt=function(Pe,ie){let We=d(),ce=Vn(()=>Dn(String(Pe))),Qe=Vn(()=>eh()),yt=Re.call(this,Pe,ie);return W(()=>{t(b.NET_REQUEST,{id:We,method:"POST",...ce,status:0,ok:yt,queued:yt,durationMs:0,initiator:"beacon",...Qe===void 0?{}:{initiatorStack:Qe},...Jf(ie,!1)})}),yt},me.sendBeacon=zt);let Cl=new Set,Gm=0,xR=200,jm;if(typeof PerformanceObserver<"u")try{let Pe=new PerformanceObserver(ie=>{for(let We of ie.getEntries()){let ce=We;if(Gm>=xR)return;let Qe=ce.initiatorType||"other";if(Qe==="fetch"||Qe==="xmlhttprequest")continue;let yt=ce.name;Cl.has(yt)||(Cl.add(yt),Gm+=1,t(b.NET_REQUEST,{id:d(),method:"GET",...Dn(yt),durationMs:Math.round(ce.duration),initiator:Qe,...ce.transferSize>0?{transferSize:ce.transferSize}:{},...(ce.responseStatus??0)>0?{status:ce.responseStatus,ok:(ce.responseStatus??0)>=200&&(ce.responseStatus??0)<400}:{}}))}});jm=Pe,Pe.observe({type:"resource",buffered:!0})}catch{}return()=>{jm?.disconnect(),window.fetch===p&&(window.fetch=s),he(E,"open")===L&&(E.open=g),he(E,"send")===G&&(E.send=_),oe!==void 0&&window.EventSource===oe&&(window.EventSource=B),Se!==void 0&&window.WebSocket===Se&&(window.WebSocket=Q),me!==null&&Re!==void 0&&me.sendBeacon===zt&&(me.sendBeacon=Re)}}P();var r1="Tauri-Response",o1="error",bS={OK:"Ok",ERROR:"Err"},TS=/^(?:ipc:\/\/[^/]*|https?:\/\/ipc\.localhost(?::\d+)?)\/(.+)$/;function _S(t,e){let r=TS.exec(t)?.[1];if(r===void 0)return;let i=e(r1)!==o1;return{url:`${$p}${r}`,initiator:gn.IPC,method:gn.IPC,ok:i,status:i?Qa.OK:Qa.ERROR,statusText:i?bS.OK:bS.ERROR}}function SS(t){return TS.exec(t)?.[1]===ud}function i1(){return navigator.userAgent.includes("Electron")}function xS(t,e={}){let n=window[eo];if(typeof n?.subscribe!="function")return i1()&&t(b.BLIND_SPOT,{kind:mt.UNOBSERVED_IPC,count:1}),()=>{};let r=n.subscribe(i=>{W(()=>{let s=`${$p}${i.channel}`;if(i.phase==="start"){t(b.NET_PENDING,{id:i.id,method:gn.IPC,url:s,initiator:gn.IPC});return}let a=i.oneWay===!0&&i.ok===void 0;a&&t(b.BLIND_SPOT,{kind:mt.VERDICTLESS_SEND,count:1});let l=i.ok===!0;t(b.NET_REQUEST,{id:i.id,method:gn.IPC,url:s,...a?{}:{ok:l,status:l?Qa.OK:Qa.ERROR},...i.oneWay===!0?{oneWay:!0}:{},durationMs:i.durationMs??0,initiator:gn.IPC,...i.error===void 0?{}:{error:i.error},...i.responseSize===void 0?{}:{responseSize:i.responseSize},...e.captureBodies===!0?{...i.requestBody===void 0?{}:{requestBody:i.requestBody},...i.responseBody===void 0?{}:{responseBody:i.responseBody},...i.responseBodyTruncated===!0?{responseBodyTruncated:!0}:{}}:{}})})});return()=>{n.unsubscribe?.(r)}}P();function AS(t){if(typeof PerformanceObserver!="function")return()=>{};let e=[],n=(s,a)=>{try{let l=new PerformanceObserver(d=>{for(let p of d.getEntries())a(p)});l.observe({type:s,buffered:!0}),e.push(l)}catch{}},r=0,i=0;return n("largest-contentful-paint",s=>{let a=Math.round(s.startTime);a<=i||(i=a,t(b.PERF,{metric:ss.LCP,value:a,at:a}))}),n("layout-shift",s=>{let a=s;a.hadRecentInput!==!0&&(r+=a.value??0,t(b.PERF,{metric:ss.CLS,value:r,at:Math.round(s.startTime)}))}),n("longtask",s=>{t(b.PERF,{metric:ss.LONGTASK,value:Math.round(s.duration),at:Math.round(s.startTime)})}),()=>{for(let s of e)s.disconnect()}}P();function s1(){return{pathname:location.pathname,search:location.search,hash:location.hash,href:location.href}}function yS(t){let e=new AbortController,n=he(history,"pushState"),r=he(history,"replaceState"),i=n.bind(history),s=r.bind(history),a=location.href,l=E=>{W(()=>{let g=s1();g.href!==E&&(a=g.href,t(b.ROUTE_CHANGE,{from:E,to:g.href,pathname:g.pathname,search:g.search,hash:g.hash}))})},d=(E,g,_)=>{let S=location.href;i(E,g,_??null),l(S)},p=(E,g,_)=>{let S=location.href;s(E,g,_??null),l(S)};history.pushState=d,history.replaceState=p;let f=()=>{l(a)};return window.addEventListener("popstate",f,{signal:e.signal}),window.addEventListener("hashchange",f,{signal:e.signal}),()=>{history.pushState===d&&(history.pushState=n),history.replaceState===p&&(history.replaceState=r),e.abort()}}P();var a1=new Set(["navigate","reload","back_forward"]);function c1(){try{let[t]=performance.getEntriesByType("navigation");return t}catch{return}}function vS(t){let e=c1(),n=e?.type,r=e?.name;if(e===void 0||typeof r!="string"||r.length===0)return()=>{};if(typeof n!="string"||!a1.has(n))return()=>{};let i=e.responseStatus,s=typeof i=="number"&&i>0;return t(b.NET_REQUEST,{id:`doc-${String(Math.round(e.duration??0))}`,method:"GET",url:r,initiator:gn.DOCUMENT,durationMs:Math.round(e.duration??0),...s?{status:i,ok:i<400}:{},navigationType:n,...typeof e.transferSize=="number"?{transferSize:e.transferSize}:{}}),()=>{}}P();var l1=/^(javascript|mailto|tel|sms|blob|data):/i;function d1(t){if(!(t instanceof Element))return;let e=t.closest("a");return e instanceof HTMLAnchorElement?e:void 0}function u1(t,e,n){if(t.length===0||l1.test(t))return!1;if(e)return!0;try{let r=new URL(t,n),i=new URL(n);return r.origin===i.origin?r.pathname!==i.pathname||r.search!==i.search:!0}catch{return!1}}function RS(t){if(typeof document>"u")return()=>{};let e=0,n=r=>{W(()=>{let i=d1(r.target);if(i===void 0)return;let s=i.getAttribute("href")??"",a=document.location.href,l=i.hasAttribute("download");if(!u1(s,l,a))return;let d=new URL(s,a).toString();queueMicrotask(()=>{W(()=>{r.defaultPrevented||(e+=1,t(b.NET_PENDING,{id:`nav-${String(e)}`,method:"GET",url:d,initiator:gn.NAVIGATION,...l?{download:!0}:{}}))})})})};return document.addEventListener("click",n,!0),()=>document.removeEventListener("click",n,!0)}P();Bn();P();var p1=3,f1=256,h1={emit:!0},m1={emit:!1};function g1(t){if(t<10)return!1;let e=t;for(;e%10===0;)e/=10;return e===1}function E1(t){return gs([t.message,t.source??"",t.line===void 0?"":String(t.line),t.kind??"",t.stack??""].join("\0"))}function NS(t=p1,e=f1){let n=new Map;return{admit(r){let i=E1(r),s=(n.get(i)??0)+1;if(n.delete(i),n.size>=e){let a=n.keys().next();(a.done??!1)||n.delete(a.value)}return n.set(i,s),s<=t?h1:g1(s)?{emit:!0,repeats:s}:m1}}}var OS="securitypolicyviolation",b1="report",T1={log:b.CONSOLE_LOG,warn:b.CONSOLE_WARN,error:b.CONSOLE_ERROR,info:b.CONSOLE_INFO,debug:b.CONSOLE_DEBUG};function _1(t){return t.map(e=>typeof e=="string"?e:e instanceof Error?e.message:Hn(e)).join(" ")}var wS=U.MAX_STACK_LENGTH;function th(t){if(!(t===void 0||t.length===0))return t.length>wS?t.slice(0,wS):t}function S1(t){for(let e of t)if(e instanceof Error)return th(e.stack)}function CS(t){let e=["log","warn","error","info","debug"],n=new Map,r=new Map;for(let E of e){let g=bn(console,E);n.set(E,g);let _=g.bind(console),S=(...L)=>{_(...L),W(()=>{let D=E==="error"?S1(L):void 0;t(T1[E],{message:_1(L),...D===void 0?{}:{stack:D}})})};r.set(E,S),console[E]=S}let i=NS(),s=E=>{let g=i.admit(E);g.emit&&t(b.ERROR_UNCAUGHT,{...E,...g.repeats===void 0?{}:{repeats:g.repeats}})},a=E=>{if(!(E instanceof ErrorEvent)){let g=E.target;if(!(g instanceof Element)||g===document)return;let _=g.tagName.toLowerCase(),S=g.getAttribute("src")??g.getAttribute("href")??"";W(()=>{let L=`<${_}> failed to load${S.length===0?"":`: ${S}`}`;s({message:L,kind:"resource",...S.length===0?{}:{source:S}})});return}W(()=>{let g=th(E.error instanceof Error?E.error.stack:void 0),_={message:E.message,source:E.filename,line:E.lineno,...g===void 0?{}:{stack:g}};s(_)})},l=E=>{W(()=>{let g=E.reason,_=th(g instanceof Error?g.stack:void 0),S={message:g instanceof Error?g.message:String(g),kind:"unhandledrejection",..._===void 0?{}:{stack:_}};s(S)})},d=E=>{let g=E.blockedURI.length===0?"inline content":E.blockedURI,_=b1===E.disposition;t(_?b.CONSOLE_WARN:b.CONSOLE_ERROR,{message:_?`[Report Only] Content Security Policy directive: ${E.violatedDirective} would block ${g}`:`Content Security Policy directive: ${E.violatedDirective} blocked ${g}`,kind:OS,...E.blockedURI.length===0?{}:{source:E.blockedURI}})},p=new AbortController,{signal:f}=p;return window.addEventListener("error",a,{capture:!0,signal:f}),window.addEventListener("unhandledrejection",l,{signal:f}),window.addEventListener(OS,d,{capture:!0,signal:f}),()=>{for(let[E,g]of n)console[E]===r.get(E)&&(console[E]=g);p.abort()}}P();ws();var x1={alert:void 0,confirm:!1,prompt:null},A1=["alert","confirm","prompt"];function IS(t){let e=window,n=new Map,r=new Map;for(let i of A1){let s=e[i];if(typeof s!="function")continue;n.set(i,s);let a=s.bind(window),l=(...d)=>{if(!Id())return a(...d);let p=x1[i],f=d[0];return W(()=>{t(b.DIALOG_OPENED,{kind:i,...typeof f=="string"?{message:f}:{},...p===void 0?{}:{answered:p}})}),p};r.set(i,l),e[i]=l}return()=>{for(let[i,s]of n)e[i]===r.get(i)&&(e[i]=s)}}P();gt();et();function LS(t){let e=new AbortController,{signal:n}=e,r=a=>{let l=a.target;l instanceof Element&&!Le(l)&&t(b.ANIM_START,{name:a.animationName},X.refFor(l))},i=a=>{let l=a.target;l instanceof Element&&!Le(l)&&t(b.ANIM_END,{name:a.animationName},X.refFor(l))},s=a=>{let l=a.target;l instanceof Element&&!Le(l)&&t(b.ANIM_END,{name:a.propertyName,kind:"transition"},X.refFor(l))};return document.addEventListener("animationstart",r,{capture:!0,signal:n}),document.addEventListener("animationend",i,{capture:!0,signal:n}),document.addEventListener("transitionend",s,{capture:!0,signal:n}),()=>e.abort()}P();gt();Ve();var kS=100,y1="[data-reticle-reveal], [data-reveal], section";function DS(t){let e=new AbortController,{signal:n}=e,r=0,i=0,s,a=()=>{r=performance.now();let p=window.scrollY,f=Math.max(1,document.documentElement.scrollHeight-window.innerHeight);t(b.SCROLL_POSITION,{x:window.scrollX,y:p,percent:Math.round(p/f*100),direction:p>=i?dd.DOWN:dd.UP}),i=p},l=()=>{let p=performance.now()-r;if(p>=kS){s!==void 0&&(pe(s),s=void 0),a();return}s===void 0&&(s=z(()=>{s=void 0,a()},kS-p))};window.addEventListener("scroll",l,{passive:!0,signal:n});let d;if(typeof IntersectionObserver=="function"){d=new IntersectionObserver(f=>{for(let E of f)E.isIntersecting&&t(b.REVEAL_SHOWN,{ratio:E.intersectionRatio},X.refFor(E.target))},{threshold:.25});let p=d;for(let f of document.querySelectorAll(y1))p.observe(f)}return()=>{e.abort(),s!==void 0&&pe(s),d?.disconnect()}}P();Ve();function v1(){let t=window;return t.__TAURI_INTERNALS__!==void 0||t.__TAURI__!==void 0?"tauri":navigator.userAgent.includes("Electron")||t[eo]!==void 0?"electron":"web"}function R1(){let t=navigator.userAgent;return/Chrome|Chromium|Edg\//.test(t)?"blink":/Gecko\/|Firefox/.test(t)?"gecko":"webkit"}var N1={"google chrome":Ne.CHROME,chrome:Ne.CHROME,"microsoft edge":Ne.EDGE,edge:Ne.EDGE,brave:Ne.BRAVE,opera:Ne.OPERA,arc:Ne.ARC,dia:Ne.DIA,firefox:Ne.FIREFOX,safari:Ne.SAFARI};function O1(t){return t==="chromium"||t.includes("not")&&t.includes("brand")}function w1(){try{let n=navigator.userAgentData?.brands;if(Array.isArray(n)){let r;for(let i of n){let s=typeof i?.brand=="string"?i.brand.toLowerCase():"";if(s===""||O1(s))continue;let a=N1[s];if(a!==void 0)if(Ne.CHROME===a)r=a;else return a}return r??Ne.OTHER}}catch{}let t=navigator.userAgent;return/Edg\//.test(t)?Ne.EDGE:/OPR\/|Opera/.test(t)?Ne.OPERA:/Firefox/.test(t)?Ne.FIREFOX:/Chrome|Chromium/.test(t)?Ne.CHROME:/Safari/.test(t)?Ne.SAFARI:Ne.OTHER}function C1(){return{hidden:document.visibilityState==="hidden",focused:document.hasFocus(),runtime:v1(),engine:R1(),brand:w1()}}function MS(t){let e=new AbortController,{signal:n}=e,r=s=>{t(b.PAGE_HEALTH,{...C1(),reason:s})};document.addEventListener("visibilitychange",()=>r(us.VISIBILITY),{signal:n}),window.addEventListener("focus",()=>r(us.FOCUS),{signal:n}),window.addEventListener("blur",()=>r(us.BLUR),{signal:n}),r(us.INITIAL);let i=BT(()=>r(us.HEARTBEAT),fE.HEARTBEAT_MS);return()=>{i(),e.abort()}}P();var Me={CONNECT:"connect",DOM_OBSERVER:"dom_observer",NETWORK_OBSERVER:"network_observer",CONSOLE_OBSERVER:"console_observer",IPC_OBSERVER:"ipc_observer",HEALTH_OBSERVER:"health_observer",ROUTER_OBSERVER:"router_observer",ANIMATION_OBSERVER:"animation_observer",STORE_ADAPTER:"store_adapter",SNAPSHOT:"snapshot",ACTION:"action",COMMAND:"command",RECORDER:"recorder",TRANSPORT:"transport",TEARDOWN:"teardown"},I1=500;function nh(t,e,n){try{let r=n instanceof Error?n.message:String(n);t(b.SDK_FAILED,{site:e,message:r.slice(0,I1),...n instanceof Error?{errorType:n.constructor.name.slice(0,64)}:{}})}catch{}}function Fe(t,e,n){try{return n()}catch(r){return nh(t,e,r),()=>{}}}function PS(t,e){for(let n of e)try{n()}catch(r){nh(t,Me.TEARDOWN,r)}}function $S(t,e){return[Fe(t,Me.NETWORK_OBSERVER,()=>ES(t,{captureBodies:e.captureBodies,...e.captureErrorBodies===void 0?{}:{captureErrorBodies:e.captureErrorBodies},reinterpret:_S,ignore:SS})),Fe(t,Me.IPC_OBSERVER,()=>xS(t,{captureBodies:e.captureBodies})),Fe(t,Me.ANIMATION_OBSERVER,()=>AS(t)),Fe(t,Me.ROUTER_OBSERVER,()=>yS(t)),Fe(t,Me.NETWORK_OBSERVER,()=>vS(t)),Fe(t,Me.NETWORK_OBSERVER,()=>RS(t)),Fe(t,Me.CONSOLE_OBSERVER,()=>CS(t)),Fe(t,Me.CONSOLE_OBSERVER,()=>IS(t)),Fe(t,Me.ANIMATION_OBSERVER,()=>LS(t)),Fe(t,Me.DOM_OBSERVER,()=>DS(t)),Fe(t,Me.DOM_OBSERVER,()=>W_(t)),Fe(t,Me.STORE_ADAPTER,()=>S_(t)),Fe(t,Me.STORE_ADAPTER,()=>X_(t)),Fe(t,Me.DOM_OBSERVER,()=>Z_(t)),Fe(t,Me.DOM_OBSERVER,()=>eS(t)),Fe(t,Me.NETWORK_OBSERVER,()=>lS(t,{capturePreview:e.captureBodies})),Fe(t,Me.DOM_OBSERVER,()=>nS(t)),Fe(t,Me.HEALTH_OBSERVER,()=>MS(t)),Fe(t,Me.DOM_OBSERVER,()=>dS(t))]}var L1=["position:fixed","bottom:8px","right:8px","z-index:2147483647","font:11px ui-monospace,SFMono-Regular,Menlo,monospace","background:#151823","color:#e6e9f0","border:1px solid #2a2f3d","border-radius:8px","padding:6px 10px","pointer-events:none","opacity:0.85"].join(";");function US(){let t=document.createElement("div");return t.setAttribute("data-reticle-overlay",""),t.style.cssText=L1,t.textContent="Reticle: connecting\u2026",document.body.appendChild(t),{update:e=>{t.textContent=`Reticle ${e.connected?"\u25CF":"\u25CB"} ${String(e.events)} events`},destroy:()=>{t.remove()}}}rh();oh();P();gt();Mt();function Tn(t,e=""){return typeof t=="string"?t:e}function xr(t){let e=Tn(t);return e===""?void 0:e}function Qd(t){let e=X.resolve(t);if(!(e instanceof Element))return t;let n=Fn(e);return n.name.length>0?`${n.role} "${n.name}"`:`${n.role} (${t})`}function HS(t){switch(t){case C.ACT:case C.ACT_SEQUENCE:return De.ACTING;case C.SNAPSHOT:case C.QUERY:case C.MATCH:case C.INSPECT:case C.ANIMATIONS:case C.STATE_READ:case C.CAPABILITIES:return De.READING;default:return De.IDLE}}function BS(t,e={}){switch(t){case C.SNAPSHOT:return"Looking at the page";case C.QUERY:case C.MATCH:{let n=t===C.MATCH?e.query??{}:e,r=k1(n);return r!==void 0?`Finding ${r}`:"Finding an element"}case C.INSPECT:{let n=xr(e.ref);return n!==void 0?`Inspecting ${Qd(n)}`:"Inspecting an element"}case C.ANIMATIONS:return"Reading animations";case C.STATE_READ:{let n=xr(e.store);return n!==void 0?`Reading state: ${n}`:"Reading state"}case C.CAPABILITIES:return"Reading capabilities";default:return t}}function k1(t){let e=xr(t.testid)??(pt.TESTID===Tn(t.by)?xr(t.value):void 0);if(e!==void 0)return`[testid=${e}]`;let n=xr(t.name),r=xr(t.value)??xr(t.text)??xr(t.label)??xr(t.role);return r!==void 0?n!==void 0?`"${r}" (${n})`:`"${r}"`:n!==void 0?`"${n}"`:void 0}gc();P();P();hc();Mt();et();oo();var FS=["position:fixed","top:8px","left:50%","transform:translateX(-50%)","z-index:2147483647","display:flex","gap:6px","align-items:center","flex-wrap:wrap","max-width:90vw","font:12px ui-sans-serif,system-ui,sans-serif","background:#151823","color:#e6e9f0","border:1px solid #2a2f3d","border-radius:10px","padding:6px 10px","box-shadow:0 8px 30px rgba(0,0,0,.5)"].join(";"),Jd=["font:inherit","cursor:pointer","background:#262b3a","color:#e6e9f0","border:1px solid #3a4151","border-radius:7px","padding:3px 9px"].join(";"),ih=["font:inherit","background:#0e1018","color:#e6e9f0","border:1px solid #3a4151","border-radius:7px","padding:3px 8px"].join(";"),GS=["opacity:.75","margin-left:4px"].join(";"),jS=["display:flex","gap:6px","align-items:center","flex-wrap:wrap"].join(";");var D1="recorded 0 steps",M1="recording\u2026",VS="ready",P1="pick an annotation",$1="data-testid",U1=os.ACT,sh={record:"Record",stop:"Stop",annotate:"Annotate"},H1={[xe.ASSERT_SIGNAL]:"assert signal",[xe.ASSERT_VISIBLE]:"assert visible",[xe.ASSERT_STATE]:"assert state",[xe.ASSERT_NET]:"assert request",[xe.MARK_DYNAMIC]:"mark dynamic",[xe.SUCCESS_STATE]:"success state",[xe.INTENT]:"intent"},B1=new Set([xe.ASSERT_SIGNAL,xe.SUCCESS_STATE]),F1="recorded-flow";function zS(t){let e=t.getAttribute($1);if(e!==null&&e.length>0)return{anchor:{kind:Zt.TESTID,value:e},degraded:!1};let n=we(t),r=Ee(t);return n!=="generic"&&(n.length>0||r.length>0)?{anchor:r.length>0?{kind:Zt.ROLE,role:n,name:r}:{kind:Zt.ROLE,role:n},degraded:!1}:{anchor:{kind:Zt.ROLE,role:gg},degraded:!0}}function KS(t){return t instanceof HTMLTextAreaElement?!0:t instanceof HTMLInputElement&&kc(t)==="textbox"}function kc(t){let e=t.type.toLowerCase();return e==="checkbox"?"checkbox":e==="radio"?"radio":["text","email","tel","url","search","password",""].includes(e)?"textbox":"other"}function Gs(t,e,n){let{anchor:r,degraded:i}=zS(t),s={tool:U1,anchor:r,action:e};n!==void 0&&(s.args=n),i&&(s.degraded=!0);let a=fc(t);return a!==void 0&&(s.source=a.line===void 0?{file:a.file}:{file:a.file,line:a.line}),s}function G1(t,e,n,r,i){let s=e.map(p=>({...p})),a=[],l;for(let p of n){if(p.kind===xe.MARK_DYNAMIC){a.push(p.anchor);continue}if(p.kind===xe.SUCCESS_STATE){p.signal!==void 0&&(l={kind:O.SIGNAL,name:p.signal});continue}let f=s.at(-1);f!==void 0&&(p.kind===xe.ASSERT_SIGNAL&&p.signal!==void 0?f.expect=WS(f.expect,{kind:O.SIGNAL,name:p.signal}):p.kind===xe.ASSERT_VISIBLE&&(f.expect=WS(f.expect,{kind:O.ELEMENT,query:j1(p.anchor)})))}let d={version:sp,name:t,createdAt:r,steps:s};return i!==void 0&&i.length>0&&(d.startPath=i),a.length>0&&(d.dynamic=a),l!==void 0&&(d.success=l),d}function WS(t,e){return t===void 0?e:t.kind===O.ALL_OF?{kind:O.ALL_OF,predicates:[...t.predicates,e]}:{kind:O.ALL_OF,predicates:[t,e]}}function j1(t){return t.kind===Zt.TESTID?{testid:t.value}:t.kind===Zt.ROLE?t.name!==void 0?{role:t.role,name:t.name}:{role:t.role}:{}}var di,nn,Tt,Pc,po,Ar,js,fo,ui,Kn,_n,k,YS,Dc,qS,XS,ZS,QS,uo,JS,ex,ch,tx,nx,rx,li,ox,eu,ix,sx,Mc,tu,ax,ah=class{constructor(e){m(this,k);m(this,di);m(this,nn,ut.IDLE);m(this,Tt,[]);m(this,Pc);m(this,po,[]);m(this,Ar);m(this,js);m(this,fo);m(this,ui);m(this,Kn);m(this,_n);u(this,di,e)}phase(){return c(this,nn)}steps(){return c(this,Tt).map(e=>({...e}))}mount(){c(this,fo)===void 0&&(typeof document>"u"||(h(this,k,ox).call(this),h(this,k,YS).call(this)))}destroy(){c(this,js)?.abort(),u(this,js,void 0),c(this,fo)?.remove(),u(this,fo,void 0),u(this,ui,void 0),u(this,Kn,void 0),u(this,nn,ut.IDLE),u(this,Tt,[]),u(this,po,[]),u(this,_n,void 0),u(this,Ar,void 0)}};di=new WeakMap,nn=new WeakMap,Tt=new WeakMap,Pc=new WeakMap,po=new WeakMap,Ar=new WeakMap,js=new WeakMap,fo=new WeakMap,ui=new WeakMap,Kn=new WeakMap,_n=new WeakMap,k=new WeakSet,YS=function(){let e=new AbortController;u(this,js,e);let n={capture:!0,signal:e.signal};document.addEventListener("click",r=>h(this,k,qS).call(this,r),n),document.addEventListener("input",r=>h(this,k,XS).call(this,r),n),document.addEventListener("change",r=>h(this,k,ZS).call(this,r),n),document.addEventListener("submit",r=>h(this,k,QS).call(this,r),n)},Dc=function(e){let n=e.target;if(n instanceof Element&&!Le(n))return n},qS=function(e){let n=h(this,k,Dc).call(this,e);if(n!==void 0){if(c(this,nn)===ut.ANNOTATING){h(this,k,JS).call(this,n);return}c(this,nn)===ut.RECORDING&&(n instanceof HTMLInputElement&&(kc(n)==="checkbox"||kc(n)==="radio")||n instanceof HTMLSelectElement||(h(this,k,uo).call(this),c(this,Tt).push(Gs(n,v.CLICK))))}},XS=function(e){if(c(this,nn)!==ut.RECORDING)return;let n=h(this,k,Dc).call(this,e);n===void 0||!KS(n)||u(this,Ar,{el:n,value:n.value})},ZS=function(e){if(c(this,nn)!==ut.RECORDING)return;let n=h(this,k,Dc).call(this,e);if(n!==void 0){if(n instanceof HTMLInputElement&&kc(n)==="checkbox"){h(this,k,uo).call(this),c(this,Tt).push(Gs(n,n.checked?v.CHECK:v.UNCHECK));return}if(n instanceof HTMLInputElement&&kc(n)==="radio"){h(this,k,uo).call(this),c(this,Tt).push(Gs(n,v.CHECK));return}if(n instanceof HTMLSelectElement){h(this,k,uo).call(this),c(this,Tt).push(Gs(n,v.SELECT,{value:n.value}));return}KS(n)&&(u(this,Ar,{el:n,value:n.value}),h(this,k,uo).call(this))}},QS=function(e){if(c(this,nn)!==ut.RECORDING)return;let n=h(this,k,Dc).call(this,e);n!==void 0&&(h(this,k,uo).call(this),c(this,Tt).push(Gs(n,v.SUBMIT)))},uo=function(){let e=c(this,Ar);if(e===void 0)return;u(this,Ar,void 0);let n=Ef(e.el)?Ae:e.value;c(this,Tt).push(Gs(e.el,v.FILL,{value:n}))},JS=function(e){let n=c(this,_n);if(n===void 0)return;let{anchor:r}=zS(e),i={kind:n.kind,anchor:r},s=h(this,k,ch).call(this);s!==void 0&&(i.signal=s),c(this,po).push(i),u(this,_n,void 0),h(this,k,li).call(this,ut.RECORDING),h(this,k,Mc).call(this)},ex=function(){let e=c(this,_n);if(e===void 0)return;let n=c(this,Tt).at(-1);if(n===void 0){u(this,_n,void 0),h(this,k,li).call(this,ut.RECORDING),h(this,k,Mc).call(this);return}let r={kind:e.kind,anchor:n.anchor},i=h(this,k,ch).call(this);i!==void 0&&(r.signal=i),c(this,po).push(r),u(this,_n,void 0),h(this,k,li).call(this,ut.RECORDING),h(this,k,Mc).call(this)},ch=function(){let n=c(this,Kn)?.querySelector("[data-reticle-signal]")?.value??"";return n.length>0?n:void 0},tx=function(){u(this,Tt,[]),u(this,Pc,typeof location>"u"?void 0:location.pathname),u(this,po,[]),u(this,Ar,void 0),u(this,_n,void 0),h(this,k,li).call(this,ut.RECORDING),h(this,k,tu).call(this,M1)},nx=function(){h(this,k,uo).call(this);let e=h(this,k,ax).call(this)??c(this,di).defaultName??F1,n=G1(e,c(this,Tt),c(this,po),c(this,di).now(),c(this,Pc));c(this,di).emit(b.FLOW_RECORDED,{name:e,flow:n}),h(this,k,tu).call(this,c(this,Tt).length===0?D1:VS),h(this,k,li).call(this,ut.IDLE),h(this,k,Mc).call(this)},rx=function(){c(this,nn)===ut.RECORDING&&(h(this,k,li).call(this,ut.ANNOTATING),h(this,k,tu).call(this,P1),h(this,k,ix).call(this))},li=function(e){u(this,nn,e)},ox=function(){let e=document.createElement("div");e.setAttribute("data-reticle-overlay",""),e.style.cssText=FS;let n=document.createElement("input");n.setAttribute("data-reticle-name",""),n.setAttribute("placeholder","flow name"),n.style.cssText=ih,e.appendChild(n),e.appendChild(h(this,k,eu).call(this,"record",sh.record,()=>h(this,k,tx).call(this))),e.appendChild(h(this,k,eu).call(this,"stop",sh.stop,()=>h(this,k,nx).call(this))),e.appendChild(h(this,k,eu).call(this,"annotate",sh.annotate,()=>h(this,k,rx).call(this)));let r=document.createElement("span");r.setAttribute("data-reticle-status",""),r.style.cssText=GS,r.textContent=VS,e.appendChild(r);let i=document.createElement("div");i.setAttribute("data-reticle-menu",""),i.style.cssText=jS,e.appendChild(i),document.body.appendChild(e),u(this,fo,e),u(this,ui,r),u(this,Kn,i)},eu=function(e,n,r){let i=document.createElement("button");return i.setAttribute("data-reticle-action",e),i.textContent=n,i.style.cssText=Jd,i.addEventListener("click",r),i},ix=function(){let e=c(this,Kn);if(e!==void 0){e.textContent="";for(let n of Object.values(xe)){if(n===xe.INTENT)continue;let r=document.createElement("button");r.setAttribute("data-reticle-annkind",n),r.textContent=H1[n],r.style.cssText=Jd,r.addEventListener("click",()=>h(this,k,sx).call(this,n)),e.appendChild(r)}}},sx=function(e){u(this,_n,{kind:e});let n=c(this,Kn);if(n===void 0)return;if(B1.has(e)){let i=document.createElement("select");i.setAttribute("data-reticle-signal",""),i.style.cssText=ih;for(let s of ro().signals){let a=document.createElement("option");a.value=s,a.textContent=s,i.appendChild(a)}n.appendChild(i)}let r=document.createElement("button");r.setAttribute("data-reticle-action","annotate-confirm"),r.textContent="on prior step",r.style.cssText=Jd,r.addEventListener("click",()=>h(this,k,ex).call(this)),n.appendChild(r)},Mc=function(){c(this,Kn)!==void 0&&(c(this,Kn).textContent="")},tu=function(e){c(this,ui)!==void 0&&(c(this,ui).textContent=e)},ax=function(){let n=c(this,fo)?.querySelector("[data-reticle-name]")?.value.trim()??"";return n.length>0?n:void 0};function cx(t){return new ah(t)}_h();function OD(t,e){return t==="production"&&!e}function wD(t,e,n,r,i="http:"){let s;try{s=new URL(e)}catch{return{allowed:!1,reason:"invalid Reticle bridge URL"}}if(s.protocol!=="ws:"&&s.protocol!=="wss:")return{allowed:!1,reason:"Reticle bridge URL must use ws:// or wss://"};if((r?.length??0)>U.MAX_TOKEN_LENGTH)return{allowed:!1,reason:`Reticle pairing token exceeds ${String(U.MAX_TOKEN_LENGTH)} characters`};let a=!qp(s.hostname);return a&&s.protocol!=="wss:"?{allowed:!1,reason:"a non-local Reticle bridge must use wss://"}:!eb(i,t)||a?n?r===void 0||r.length===0?{allowed:!1,reason:"a pairing token is required outside localhost"}:{allowed:!0}:{allowed:!1,reason:"Reticle is disabled outside localhost unless allowNonLocalhost is explicitly enabled"}:{allowed:!0}}var CD="Session ended - lost connection to Reticle (the agent is no longer running).";function ID(t,e){return t===void 0||t===Xa?e():t}function LD(){try{let t=new URL(window.location.href);if(!t.searchParams.has(Wd))return;t.searchParams.delete(Wd),window.history.replaceState(window.history.state,"",t.toString())}catch{}}function nR(t){let e=new URLSearchParams(t),n={},r=e.get(lr.SESSION),i=e.get(lr.PROJECT);return r!==null&&r.length>0&&(n.session=r),i!==null&&i.length>0&&(n.projectId=i),n}function kD(t,e){let n=nR(e),r=t.session!==void 0&&t.session!==Xa?t.session:void 0,i=t.projectId??n.projectId;return{session:r??n.session,projectId:i!==void 0&&i.length>0?i:void 0}}function DD(t){return{t:t.t,seq:t.seq,type:t.type,sessionId:t.sessionId,ref:t.ref,documentId:t.documentId,editEpoch:0===t.editEpoch?void 0:t.editEpoch,data:t.data}}var jr,vl,Vi,nr,Ki,zu,Rl,wo,_e,Ra,Nl,Ol,wl,Wi,rr,Na,Oa,wa,Ca,Ia,La,ka,Vr,pn,rR,or,oR,iR,sR,aR,Da=class{constructor(){m(this,pn);m(this,jr);m(this,vl,new Map);m(this,Vi,[]);m(this,nr,!1);m(this,Ki,"default");m(this,zu,TE(Math.random));m(this,Rl,0);m(this,wo);m(this,_e);m(this,Ra,new Map);m(this,Nl);m(this,Ol,!1);m(this,wl,!1);m(this,Wi);m(this,rr);m(this,Na,0);m(this,Oa);m(this,wa);m(this,Ca,!1);m(this,Ia);m(this,La);m(this,ka,[]);m(this,Vr);m(this,or,(e,n,r)=>{let i=DD({seq:c(this,Na),t:Math.round(performance.now()-c(this,Rl)),type:e,sessionId:c(this,Ki),documentId:c(this,zu),editEpoch:ac.current,data:n,ref:r});try{c(this,jr)?.sendEvent(i),u(this,Na,c(this,Na)+1),c(this,wo)?.update({connected:!0,events:c(this,Na)}),e===b.ROUTE_CHANGE&&c(this,_e)?.refilterFlows()}catch{}})}connect(e={}){if(c(this,nr)||typeof window>"u"||typeof document>"u")return;let r=globalThis.process?.env?.NODE_ENV;if(OD(r,e.allowInProduction===!0)){globalThis.console.warn("[Reticle] disabled in production (NODE_ENV=production). Gate the import behind import.meta.env.DEV, or pass allowInProduction:true to override.");return}LD();let i=e.url??_g(cp),s=wD(window.location.hostname,i,e.allowNonLocalhost===!0,e.token,window.location.protocol);if(!s.allowed){globalThis.console.warn(`[Reticle] ${s.reason??"connection blocked"}`);return}e.root!==void 0&&e.root.length>0&&(globalThis[nd]=e.root);let a=e.sdkVersion??globalThis[oE];u(this,wa,typeof a=="string"&&a.length>0?a:void 0);let l=kD(e,window.location.search),d=ID(l.session,()=>"");u(this,Ki,Pb(d.length>0?d:void 0,typeof globalThis.sessionStorage>"u"?void 0:globalThis.sessionStorage,()=>typeof globalThis.crypto?.randomUUID=="function"?`s${globalThis.crypto.randomUUID()}`:`s${Date.now().toString(36)}`)),u(this,Oa,e.token!==void 0&&e.token.length>0?e.token:void 0),u(this,La,l.projectId),h(this,pn,oR).call(this,e.redact),u(this,Rl,performance.now()),u(this,vl,I_()),u(this,jr,new Yd({url:i,hello:()=>h(this,pn,iR).call(this),handleCommand:f=>h(this,pn,sR).call(this,f),onConnected:()=>{u(this,wl,!0),c(this,_e)?.sessionStart()},onConnectionLost:()=>{ks(),c(this,_e)?.sessionActive===!0&&c(this,_e).setState(ye.ENDED,CD)},onUnreachable:({url:f,attempts:E})=>{Gn(P_(f,E)),c(this,_e)?.showUnreachable(f,E)}})),yd(()=>c(this,jr)?.reannounce()),qm(e.exposePresenter===!0),e.networkBodyMaxChars!==void 0&&cS(e.networkBodyMaxChars);let p=c(this,or);u(this,Ca,e.captureNetworkBodies===!0),u(this,Ia,typeof e.sourceMapping=="boolean"?e.sourceMapping:void 0),u(this,Vi,$S(p,{captureBodies:c(this,Ca),...e.captureErrorBodies===void 0?{}:{captureErrorBodies:e.captureErrorBodies}})),e.overlay===!0&&(u(this,wo,US()),c(this,wo).update({connected:!0,events:0})),e.present!==!1&&h(this,pn,rR).call(this,e),e.recorder===!0&&(u(this,Wi,cx({emit:p,now:()=>Date.now()})),c(this,Wi).mount()),(e.annotate??e.present!==!1)&&(u(this,rr,new Si({emit:p,now:()=>Date.now(),onMark:f=>c(this,_e)?.log(Ke.HUMAN,`\u{1F6A9} #${String(f.index)} ${f.anchor}${f.source!==void 0?` \xB7 ${f.source}`:""} \u2014 ${f.note}`),shouldBlock:()=>{var f;return((f=c(this,Nl))==null?void 0:f.call(this).blockPageInteractions)??!0}})),c(this,rr).mount(),c(this,_e)?.bindAnnotator(c(this,rr))),c(this,jr).connect(),u(this,nr,!0)}get connected(){return c(this,nr)}signal(e,n={}){c(this,or).call(this,b.SIGNAL,{name:e,data:n})}state(e,n){c(this,or).call(this,b.STATE_CHANGE,{name:e,value:n})}renderCommit(e){e>0&&c(this,or).call(this,b.RENDER_COMMIT,{commits:e})}describe(e){vs(e)}endSession(){c(this,_e)?.setState(ye.ENDED)}observeHotUpdates(e){ac.observe(e)}disconnect(){c(this,nr)&&(PS(c(this,or),c(this,Vi)),u(this,Vi,[]),c(this,jr)?.close(),u(this,jr,void 0),c(this,wo)?.destroy(),u(this,wo,void 0),c(this,_e)?.sessionEnd(),c(this,_e)?.destroy(),u(this,_e,void 0),c(this,Wi)?.destroy(),u(this,Wi,void 0),c(this,rr)?.destroy(),u(this,rr,void 0),ks(),u(this,nr,!1))}};jr=new WeakMap,vl=new WeakMap,Vi=new WeakMap,nr=new WeakMap,Ki=new WeakMap,zu=new WeakMap,Rl=new WeakMap,wo=new WeakMap,_e=new WeakMap,Ra=new WeakMap,Nl=new WeakMap,Ol=new WeakMap,wl=new WeakMap,Wi=new WeakMap,rr=new WeakMap,Na=new WeakMap,Oa=new WeakMap,wa=new WeakMap,Ca=new WeakMap,Ia=new WeakMap,La=new WeakMap,ka=new WeakMap,Vr=new WeakMap,pn=new WeakSet,rR=function(e){c(this,Ol)||(u(this,Ol,!0),Promise.resolve().then(()=>(Uv(),$v)).then(({Presenter:n})=>Promise.resolve().then(()=>(na(),HA)).then(r=>({Presenter:n,settings:r}))).then(({Presenter:n,settings:r})=>{if(!c(this,nr))return;u(this,Nl,r.getPresenterSettings);let i={};e.pace!==void 0&&(i.paceMs=e.pace),e.narrationDwellMs!==void 0&&(i.narrationDwellMs=e.narrationDwellMs),e.border!==void 0&&(i.border=e.border),e.logMax!==void 0&&(i.logMax=e.logMax),e.endedFadeMs!==void 0&&(i.endedFadeMs=e.endedFadeMs),e.idleEndMs!==void 0&&(i.idleEndMs=e.idleEndMs),i.sessionId=c(this,Ki),i.onControl=a=>c(this,or).call(this,b.HUMAN_CONTROL,a.text!==void 0?{kind:a.kind,text:a.text}:{kind:a.kind}),i.onHudUse=a=>c(this,or).call(this,b.HUD_USED,{...a});let s=new n(i);u(this,_e,s),s.mount();for(let a of c(this,Ra).values())s.handlePush(a);c(this,Ra).clear(),Promise.resolve().then(()=>(tR(),eR)).then(a=>{if(!c(this,nr))return;let l=a.mountTour({document,storage:a.safeLocalStorage(),projectId:nR(window.location.search).projectId??window.location.origin,isDriving:()=>De.IDLE!==s.mode,search:window.location.search,navigator,copy:d=>navigator.clipboard?.writeText(d).then(()=>!0,()=>!1)??!1,select:d=>{let p=window.getSelection();if(p===null)return;let f=document.createRange();f.selectNodeContents(d),p.removeAllRanges(),p.addRange(f)}});l!==void 0&&c(this,Vi).push(l.destroy)}),c(this,wl)&&s.sessionStart(),c(this,rr)!==void 0&&s.bindAnnotator(c(this,rr))}).catch(()=>{}))},or=new WeakMap,oR=function(e){RE(vE(e,Gn)),u(this,ka,NE(e))},iR=function(){return{kind:ft.HELLO,protocolVersion:jl,sessionId:c(this,Ki),...c(this,La)===void 0?{}:{projectId:c(this,La)},url:location.href,title:document.title,adapters:Od(),...c(this,Oa)===void 0?{}:{token:c(this,Oa)},hasCapabilities:vd(),channels:U_(),platform:H_(),commands:B_(),captureBodies:c(this,Ca),...c(this,Ia)===void 0?{}:{sourceMapping:c(this,Ia)},...c(this,wa)===void 0?{}:{sdkVersion:c(this,wa)},contract:nf,contractParts:{commands:[...nc.commands],events:[...nc.events],actions:[...nc.actions]},...c(this,ka).length===0?{}:{redactKeys:c(this,ka)}}},sR=async function(e){if(e.name===C.NARRATE)return c(this,_e)?.sessionStart(),c(this,_e)?.narrate(Tn(e.args.text),Tn(e.args.level,"info")),{ok:!0,result:{shown:c(this,_e)!==void 0}};if(e.name===C.SESSION_CONFIG){let r=e.args.idleEndMs;return typeof r=="number"&&c(this,_e)?.setIdleEndMs(r),{ok:!0,result:{applied:c(this,_e)!==void 0,idleEndMs:r}}}if(e.name===C.PRESENTER||e.name===C.FLOWS||e.name===C.IMPACT)return c(this,_e)===void 0?(c(this,Ra).set(e.name,e),{ok:!0,result:{applied:!1,buffered:!0}}):(c(this,_e).handlePush(e),{ok:!0,result:{applied:!0}});let n=c(this,vl).get(e.name);if(n===void 0)return{ok:!1,error:`unknown command '${e.name}'`};c(this,_e)?.sessionStart(),await h(this,pn,aR).call(this,e);try{let r=await n(e.args);return c(this,Vr)?.result(Pt.PASS),{ok:!0,result:r}}catch(r){return c(this,Vr)?.result(Pt.FAIL),{ok:!1,error:r instanceof Error?r.message:String(r)}}finally{u(this,Vr,void 0),c(this,_e)?.scheduleIdle()}},aR=async function(e){let n=c(this,_e);if(n!==void 0)if(n.setMode(HS(e.name)),u(this,Vr,void 0),e.name===C.ACT){let r=Tn(e.args.ref),i=Qd(r);u(this,Vr,n.log(Ke.ACT,`${Lc(Tn(e.args.action))} ${i}`)),await n.beforeAct(r,Tn(e.args.action),i)}else if(e.name===C.ACT_SEQUENCE){let r=Array.isArray(e.args.steps)?e.args.steps:[];for(let i of r){let s=i,a=Tn(s.ref),l=Qd(a);u(this,Vr,n.log(Ke.ACT,`${Lc(Tn(s.action))} ${l}`)),await n.beforeAct(a,Tn(s.action),l)}}else{let r=BS(e.name,e.args);n.status(r),n.log(Ke.READ,r)}};var Fm=globalThis,Yu=Fm.__reticleInstance??(Fm.__reticleInstance=new Da);P();et();oi();ri();gc();ri();function dR(t){let e={getState:()=>{let n={};for(let r of t.getQueryCache().getAll()){let i=r.queryKey.map(s=>String(s)).join("/");n[i]={status:r.state.status,fetchStatus:r.state.fetchStatus,isStale:r.isStale?.(),dataUpdatedAt:r.state.dataUpdatedAt,error:r.state.error?.message??null,data:r.state.data}}return n},subscribe:n=>t.getQueryCache().subscribe(n)};return xd(e,t),e}function uR(t,e){return{getState:()=>{let n={};for(let[r,i]of Object.entries(e))n[r]=t.get(i);return n},subscribe:n=>{let r=Object.values(e).map(i=>t.sub(i,n));return()=>{for(let i of r)i()}}}}function pR(t){return{getState:()=>t.getSnapshot(),subscribe:e=>{let n=t.subscribe(e);return()=>n.unsubscribe()}}}function fR(t,e,n){return{getState:()=>e(t),subscribe:r=>n(t,r)}}function hR(t,e,n){return{getState:()=>e(t),subscribe:r=>n(()=>e(t),()=>r())}}var cR={HAS_VALUE:"hasValue",LOADING:"loading",HAS_ERROR:"hasError"};function MD(t){if(t.state===cR.HAS_ERROR){let e=t.contents;return{status:t.state,value:null,error:e instanceof Error?e.message:String(e)}}return t.state!==cR.HAS_VALUE?{status:t.state,value:null,error:null}:{status:t.state,value:t.contents,error:null}}function mR(t,e,n){return{getState:()=>{let r=e(),i={};for(let[s,a]of Object.entries(t))i[s]=MD(r.getLoadable(a));return i},subscribe:n}}function lR(t){if(typeof t=="function"){t();return}t.unsubscribe()}function gR(t,e=Gn){let n=!1;return{getState:()=>{let r,i=!1;return lR(t.subscribe(s=>{r=s,i=!0})),!i&&!n&&(n=!0,e("[reticle] a store passed to svelteStore did not call its subscriber synchronously, so its current value cannot be read. reticle_state will report undefined for it. Svelte stores always call back immediately; an RxJS Observable does not unless it is a BehaviorSubject.")),r},subscribe:r=>{let i=!0,s=t.subscribe(()=>{i||r()});return i=!1,()=>lR(s)}}}var PD={detached:!0,flush:"sync"};function ER(t){return{getState:()=>t.$state,subscribe:e=>t.$subscribe(()=>e(),{...PD})}}function bR(t){let e=t,n=new Set;return{store:{getState:()=>e,subscribe:i=>(n.add(i),()=>n.delete(i))},push:i=>{e=i;for(let s of n)s()}}}oo();function TR(t={}){let e=t.target??Yu;return{signal(n,r={}){e.connected&&e.signal(n,r)},state(n,r){e.connected&&e.state(n,r)}}}function _R(t,e,n,r){let i=e();return t.signal(n,r),i}oo();function SR(t){let e={};t.testids!==void 0&&(e.testids=[...t.testids]),t.signals!==void 0&&(e.signals=[...t.signals]),t.stores!==void 0&&(e.stores=[...t.stores]),vs(e)}pf();Mt();gt();_h();lh();return IR($D);})();