@snagset/server 0.1.35 → 0.1.37

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 (119) hide show
  1. package/dist/app.js +5 -0
  2. package/dist/app.js.map +1 -1
  3. package/dist/routes/account.js +2 -1
  4. package/dist/routes/account.js.map +1 -1
  5. package/dist/routes/assignees.js +10 -0
  6. package/dist/routes/assignees.js.map +1 -1
  7. package/dist/routes/commentEdit.js +15 -3
  8. package/dist/routes/commentEdit.js.map +1 -1
  9. package/dist/routes/comments.js +6 -0
  10. package/dist/routes/comments.js.map +1 -1
  11. package/dist/routes/instance.js +8 -1
  12. package/dist/routes/instance.js.map +1 -1
  13. package/dist/routes/integrations.js +19 -12
  14. package/dist/routes/integrations.js.map +1 -1
  15. package/dist/routes/invites.js +36 -20
  16. package/dist/routes/invites.js.map +1 -1
  17. package/dist/routes/mcpTokens.js +17 -11
  18. package/dist/routes/mcpTokens.js.map +1 -1
  19. package/dist/routes/members.js +9 -7
  20. package/dist/routes/members.js.map +1 -1
  21. package/dist/routes/owner.js.map +1 -1
  22. package/dist/routes/reviewLinks.js +13 -0
  23. package/dist/routes/reviewLinks.js.map +1 -1
  24. package/dist/routes/rounds.js +7 -3
  25. package/dist/routes/rounds.js.map +1 -1
  26. package/dist/routes/sessions.js +7 -4
  27. package/dist/routes/sessions.js.map +1 -1
  28. package/dist/routes/sites.js +22 -13
  29. package/dist/routes/sites.js.map +1 -1
  30. package/dist/routes/threads.js +43 -10
  31. package/dist/routes/threads.js.map +1 -1
  32. package/dist/studioReviewers.js +3 -1
  33. package/dist/studioReviewers.js.map +1 -1
  34. package/dist/vendor/types/names.js +2 -0
  35. package/dist/vendor/types/roles.js +65 -0
  36. package/package.json +1 -1
  37. package/static/dashboard/assets/CompositeItem-CJog0hVD.js +1 -0
  38. package/static/dashboard/assets/{ConfirmDialog-s6KLZt6w.js → ConfirmDialog-D2seMnrm.js} +1 -1
  39. package/static/dashboard/assets/{CopyButton-Cqz1MLVB.js → CopyButton-Bc4lyikk.js} +1 -1
  40. package/static/dashboard/assets/{FieldItemContext-4dJ9QpEG.js → FieldItemContext-CzXi3fsx.js} +1 -1
  41. package/static/dashboard/assets/{InstallTag-B4frNgVO.js → InstallTag-SMFR2B0h.js} +1 -1
  42. package/static/dashboard/assets/McpTokens-BXqxvFAS.js +1 -0
  43. package/static/dashboard/assets/{SaveState-DfBHRtEq.js → SaveState-Cmf4iv03.js} +1 -1
  44. package/static/dashboard/assets/_app-DwywpWfz.js +56 -0
  45. package/static/dashboard/assets/{_app-5y2NMiTw.js → _app-bdnugJ8u.js} +1 -1
  46. package/static/dashboard/assets/activity-qDQs5Zz8.js +1 -0
  47. package/static/dashboard/assets/{arrow-left-iXAzDNV6.js → arrow-left-CDK8KGdH.js} +1 -1
  48. package/static/dashboard/assets/{avatar-DkFTIwsR.js → avatar-BIbCnV-M.js} +1 -1
  49. package/static/dashboard/assets/badge-BD0L3Rdr.js +1 -0
  50. package/static/dashboard/assets/{card-C4v3pSqd.js → card-CCRzd-vJ.js} +1 -1
  51. package/static/dashboard/assets/{check-BKP4SJjJ.js → check-CvTMcsU6.js} +1 -1
  52. package/static/dashboard/assets/{chevron-right-BVbfidnK.js → chevron-right-NPSJD-jD.js} +1 -1
  53. package/static/dashboard/assets/{copy-nRZWPHR1.js → copy-CwAe5Q6l.js} +1 -1
  54. package/static/dashboard/assets/{dialog-lgIL_ZCX.js → dialog-CvU77XfW.js} +2 -2
  55. package/static/dashboard/assets/{dropdown-menu-DyLLQk8L.js → dropdown-menu-VHkK2Dt7.js} +1 -1
  56. package/static/dashboard/assets/{image-off-B6flKQEZ.js → image-off-wPLko91u.js} +1 -1
  57. package/static/dashboard/assets/index-B1JGVSdd.js +169 -0
  58. package/static/dashboard/assets/index-CpG77B7f.css +1 -0
  59. package/static/dashboard/assets/invite-DWNnOuAZ.js +1 -0
  60. package/static/dashboard/assets/{label-CL3Ivlhy.js → label-C6rZlF0y.js} +1 -1
  61. package/static/dashboard/assets/labels-DhKmOzOU.js +1 -0
  62. package/static/dashboard/assets/{layout-grid-B-9bb2Av.js → layout-grid-CPYmheoR.js} +1 -1
  63. package/static/dashboard/assets/parts-sBoh2K5o.js +6 -0
  64. package/static/dashboard/assets/{plus-BOeukd4A.js → plus-B7K-9XU0.js} +1 -1
  65. package/static/dashboard/assets/s._site-DKfVuunu.js +1 -0
  66. package/static/dashboard/assets/s._site.comments-DqDBqjhy.js +54 -0
  67. package/static/dashboard/assets/s._site.reviewers-yBn4jjwr.js +1 -0
  68. package/static/dashboard/assets/s._site.settings-CsiWJZ8D.js +1 -0
  69. package/static/dashboard/assets/{setup-DjA-0YhC.js → setup-DrjzRZp8.js} +1 -1
  70. package/static/dashboard/assets/{sign-in-vMnULz18.js → sign-in-BsM2n_hk.js} +1 -1
  71. package/static/dashboard/assets/sign-up-BXcvVUC-.js +1 -0
  72. package/static/dashboard/assets/sites-DRTZAXN_.js +1 -0
  73. package/static/dashboard/assets/studio-CEwWJLvF.js +1 -0
  74. package/static/dashboard/assets/{studio-CBGrW0G1.js → studio-DdM6OVdO.js} +1 -1
  75. package/static/dashboard/assets/studio.index-BOXLD6ah.js +1 -0
  76. package/static/dashboard/assets/studio.integrations-B7XK6X3K.js +1 -0
  77. package/static/dashboard/assets/studio.members-DSJEjb1M.js +6 -0
  78. package/static/dashboard/assets/{sun-ygOg7Lon.js → sun-DojiLt7X.js} +1 -1
  79. package/static/dashboard/assets/{switch-CYLwE1-9.js → switch-SJYZN0-3.js} +1 -1
  80. package/static/dashboard/assets/{table-BgojscGP.js → table-BDQkr8bT.js} +1 -1
  81. package/static/dashboard/assets/{useAriaLabelledBy-Ce10PDSC.js → useAriaLabelledBy-BDqDB_Wq.js} +1 -1
  82. package/static/dashboard/assets/{useBaseQuery-BI_bJwNl.js → useBaseQuery-DXKWEN1Y.js} +1 -1
  83. package/static/dashboard/assets/useQuery-BCK_zdLj.js +1 -0
  84. package/static/dashboard/assets/useRender-hAtJO9As.js +1 -0
  85. package/static/dashboard/assets/{useValueChanged-Dh5Yg1r8.js → useValueChanged-B9j_H2Sq.js} +1 -1
  86. package/static/dashboard/assets/{users-BXCV1C3P.js → users-jrxD0Qlm.js} +1 -1
  87. package/static/dashboard/assets/{welcome-C9fdUqeW.js → welcome-BGT16RMO.js} +3 -3
  88. package/static/dashboard/assets/{widget-signin-DiXxk1Ln.js → widget-signin-A_kxUEvx.js} +1 -1
  89. package/static/dashboard/assets/you-CdfLrYaC.js +1 -0
  90. package/static/dashboard/assets/{zod-khKoKeAB.js → zod-C7-R6TNW.js} +1 -1
  91. package/static/dashboard/index.html +2 -2
  92. package/static/widget/build.json +2 -2
  93. package/static/widget/snag.capture.js +1 -1
  94. package/static/widget/snag.dock.js +5 -5
  95. package/static/widget/snag.js +1 -1
  96. package/static/widget/snag.runtime.js +2 -2
  97. package/static/dashboard/assets/CompositeItem-DpSaUtYZ.js +0 -1
  98. package/static/dashboard/assets/_app-CnifsCfr.js +0 -56
  99. package/static/dashboard/assets/activity-DX3WrmQt.js +0 -1
  100. package/static/dashboard/assets/badge-CrUHZwEL.js +0 -1
  101. package/static/dashboard/assets/index-D6Jv0m8R.css +0 -1
  102. package/static/dashboard/assets/index-DMCyFEmS.js +0 -169
  103. package/static/dashboard/assets/invite-CrR7zqFd.js +0 -1
  104. package/static/dashboard/assets/labels--UUyt9uB.js +0 -1
  105. package/static/dashboard/assets/me-6-FBHysO.js +0 -1
  106. package/static/dashboard/assets/parts-b71WkkoI.js +0 -1
  107. package/static/dashboard/assets/s._site-MtCDp62_.js +0 -1
  108. package/static/dashboard/assets/s._site.comments-vNVUqPN4.js +0 -54
  109. package/static/dashboard/assets/s._site.reviewers-BMYyb10D.js +0 -1
  110. package/static/dashboard/assets/s._site.settings-BaBm7RJi.js +0 -1
  111. package/static/dashboard/assets/sign-up-K_HV-_C8.js +0 -1
  112. package/static/dashboard/assets/sites-Dw-qQxr1.js +0 -1
  113. package/static/dashboard/assets/studio-DcijgVQL.js +0 -1
  114. package/static/dashboard/assets/studio.index-D-9QUrvv.js +0 -1
  115. package/static/dashboard/assets/studio.integrations-Djhl8gKq.js +0 -1
  116. package/static/dashboard/assets/studio.members-DaS0HWwE.js +0 -6
  117. package/static/dashboard/assets/useQuery-Cl9FITTP.js +0 -1
  118. package/static/dashboard/assets/useRender-Ck8DP-Z3.js +0 -1
  119. package/static/dashboard/assets/you-CZGeTvq7.js +0 -1
@@ -1 +1 @@
1
- import{aL as I}from"./index-DMCyFEmS.js";var me=e=>e.type==="checkbox",Se=e=>e.type==="file",te=e=>e instanceof Date,p=e=>e==null;const He=e=>typeof e=="object";var N=e=>!p(e)&&!Array.isArray(e)&&He(e)&&!te(e),Gr=e=>N(e)&&e.target?me(e.target)?e.target.checked:Se(e.target)?e.target.files:e.target.value:e;const Kr=/[.[\]'"]/;var ue=e=>e.split(Kr).filter(Boolean),Zr=(e,s)=>s.split(".").some((r,i,l)=>!isNaN(Number(r))&&e.has(l.slice(0,i).join("."))),Te=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function C(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const s=typeof FileList<"u"&&e instanceof FileList;if(Te&&(e instanceof Blob||s))return e;const r=Array.isArray(e);if(!r&&e.constructor!==Object)return e;const i=r?[]:Object.create(Object.getPrototypeOf(e));for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(i[l]=C(e[l]));return i}const oe={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},X={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},J={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Dr="root",je=["__proto__","constructor","prototype"],Jr=/^\w*$/;var ne=e=>Jr.test(e),O=e=>e===void 0,v=(e,s,r)=>{if(!s||!N(e))return r;const i=ne(s)?[s]:ue(s);if(i.some(u=>je.includes(u)))return r;const l=i.reduce((u,o)=>p(u)?void 0:u[o],e);return O(l)||l===e?O(e[s])?r:e[s]:l},re=e=>typeof e=="boolean",G=e=>typeof e=="function",k=(e,s,r)=>{let i=-1;const l=ne(s)?[s]:ue(s),u=l.length,o=u-1;for(;++i<u;){const c=l[i];let m=r;if(i!==o){const E=e[c];m=N(E)||Array.isArray(E)?E:isNaN(+l[i+1])?{}:[]}if(je.includes(c))return;e[c]=m,e=e[c]}};const Qr=I.createContext(null);Qr.displayName="HookFormControlContext";var Xr=(e,s,r,i=!0)=>{const l={};for(const u in e)Object.defineProperty(l,u,{get:()=>{const o=u;return s._proxyFormState[o]!==X.all&&(s._proxyFormState[o]=!i||X.all),e[o]}});return l};const et=Te?I.useLayoutEffect:I.useEffect;var rt=e=>{const s=e.constructor&&e.constructor.prototype;return N(s)&&s.hasOwnProperty("isPrototypeOf")},Me=e=>p(e)||!He(e);const lr=(e,s)=>s.length===0&&!Array.isArray(e)&&!rt(e);function Q(e,s,r=new WeakMap){if(e===s)return!0;if(Me(e)||Me(s))return Object.is(e,s);if(te(e)&&te(s))return Object.is(e.getTime(),s.getTime());const i=Object.keys(e),l=Object.keys(s);if(i.length!==l.length)return!1;if(lr(e,i)||lr(s,l))return Object.is(e,s);if(!i.length&&Array.isArray(e)!==Array.isArray(s))return!1;const u=r.get(e);if(u&&u.has(s))return!0;if(u)u.add(s);else{const o=new WeakSet;o.add(s),r.set(e,o)}for(const o of i){const c=e[o];if(!(o in s))return!1;if(o!=="ref"){const m=s[o];if(te(c)&&te(m)||(N(c)||Array.isArray(c))&&(N(m)||Array.isArray(m))?!Q(c,m,r):!Object.is(c,m))return!1}}return!0}function tt(e){const s=I.useRef(!1),r=I.useRef(!1),i=I.useRef(void 0),l=I.useRef(0);l.current++,r.current;const u=I.useCallback((c,m,E)=>{if(c&&(s.current||r.current&&l.current>1)){const T=m();Q(i.current,T)||E(T)}s.current=!0},[]),o=I.useCallback((c,m)=>{c&&(i.current=C(m()))},[]);return{resyncIfNeeded:u,snapshot:o}}var M=e=>typeof e=="string",st=(e,s,r,i,l)=>M(e)?(i&&s.watch.add(e),v(r,e,l)):Array.isArray(e)?e.map(u=>(i&&s.watch.add(u),v(r,u,v(l,u)))):(i&&(s.watchAll=!0),r),De=e=>({isOnSubmit:!e||e===X.onSubmit,isOnBlur:e===X.onBlur,isOnChange:e===X.onChange,isOnAll:e===X.all,isOnTouch:e===X.onTouched}),Ue=(e,s,r)=>{if(r)return!1;if(s.watchAll||s.watch.has(e))return!0;for(const i of s.watch)if(e.startsWith(i)&&e.charAt(i.length)===".")return!0;return!1};const Ve=(e,s,r,i)=>{for(const l of r||Object.keys(e)){if(l==="_f")continue;const u=r?v(e,l):e[l];if(u){const{_f:o}=u;if(o){if(o.refs&&o.refs[0]&&s(o.refs[0],l)&&!i)return!0;if(o.ref&&s(o.ref,o.name)&&!i)return!0;if(Ve(u,s))break}else if((N(u)||Array.isArray(u))&&Ve(u,s))break}}};var ur=(e,s,r)=>{const i=v(e,r),l=Array.isArray(i)?i:[];return k(l,Dr,s[r]),k(e,r,l),e},B=e=>N(e)&&!Object.keys(e).length,ke=e=>{if(!Te)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},ze=e=>e.type==="radio",Oe=e=>e instanceof RegExp,Ye=(e,s,r,i,l)=>s?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:l||!0}}:{};const fr={value:!1,isValid:!1},cr={value:!0,isValid:!0};var xr=e=>{if(!Array.isArray(e))return fr;if(e.length>1){const r=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.value);return{value:r,isValid:!!r.length}}const s=e[0];return!s||!s.checked||s.disabled?fr:!s.attributes||!("value"in s.attributes)||O(s.value)||s.value===""?cr:{value:s.value,isValid:!0}};const dr={isValid:!1,value:null};var kr=e=>Array.isArray(e)?e.reduce((s,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:s,dr):dr;function yr(e,s,r="validate"){if(M(e)||Array.isArray(e)&&e.every(M)||re(e)&&!e)return{type:r,message:M(e)?e:"",ref:s}}var le=e=>N(e)&&!Oe(e)?e:{value:e,message:""},hr=async(e,s,r,i,l,u)=>{const{ref:o,refs:c,required:m,maxLength:E,minLength:T,min:H,max:j,pattern:$,validate:A,name:F,valueAsNumber:b,mount:fe}=e._f,w=v(r,F);if(!fe||s.has(F))return{};const ee=c?c[0]:o,P=D=>{if(l&&ee.reportValidity){const x=re(D)?"":D||"";c?c.forEach(R=>R.setCustomValidity(x)):ee.setCustomValidity(x),ee.reportValidity()}},S={},ce=ze(o),be=me(o),Ae=ce||be,ae=(b||Se(o))&&O(o.value)&&O(w)||ke(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,se=Ye.bind(null,F,i,S),Fe=(D,x,R,W=J.maxLength,K=J.minLength)=>{const q=D?x:R;S[F]={type:D?W:K,message:q,ref:o,...se(D?W:K,q)}};if(u?!Array.isArray(w)||!w.length:m&&(!Ae&&(ae||p(w))||re(w)&&!w||be&&!xr(c).isValid||ce&&!kr(c).isValid)){const{value:D,message:x}=M(m)?{value:!!m,message:m}:le(m);if(D&&(S[F]={type:J.required,message:x,ref:ee,...se(J.required,x)},!i))return P(x),S}if(!ae&&(!p(H)||!p(j))){let D,x;const R=le(j),W=le(H);if(!p(w)&&!te(w)&&!isNaN(w)){const K=o.valueAsNumber||w&&+w;p(R.value)||(D=K>R.value),p(W.value)||(x=K<W.value)}else{const K=o.valueAsDate||new Date(w),q=ye=>new Date(new Date().toDateString()+" "+ye),we=o.type=="time",Y=o.type=="week";M(R.value)&&w&&(D=we?q(w)>q(R.value):Y?w>R.value:K>new Date(R.value)),M(W.value)&&w&&(x=we?q(w)<q(W.value):Y?w<W.value:K<new Date(W.value))}if((D||x)&&(Fe(!!D,R.message,W.message,J.max,J.min),!i))return P(S[F].message),S}if((E||T)&&!ae&&(M(w)||u&&Array.isArray(w))){const D=le(E),x=le(T),R=!p(D.value)&&w.length>+D.value,W=!p(x.value)&&w.length<+x.value;if((R||W)&&(Fe(R,D.message,x.message),!i))return P(S[F].message),S}if($&&!ae&&M(w)){const{value:D,message:x}=le($);if(Oe(D)&&!w.match(D)&&(S[F]={type:J.pattern,message:x,ref:o,...se(J.pattern,x)},!i))return P(x),S}if(A){if(G(A)){const D=await A(w,r),x=yr(D,ee);if(x&&(S[F]={...x,...se(J.validate,x.message)},!i))return P(x.message),S}else if(N(A)){let D={};for(const x in A){if(!B(D)&&!i)break;const R=yr(await A[x](w,r),ee,x);R&&(D={...R,...se(x,R.message)},P(R.message),i&&(S[F]=D))}if(!B(D)&&(S[F]={ref:ee,...D},!i))return S}}const de=S[F];return P(de?de.message:!0),S},xe=e=>Array.isArray(e)?e:[e],Or=e=>Array.isArray(e)?e.filter(Boolean):[];function it(e,s){const r=s.length-1;let i=0;for(;i<r;){if(p(e)){e=void 0;break}e=e[s[i]],i++}return e}function nt(e){for(const s in e)if(e.hasOwnProperty(s)&&!O(e[s]))return!1;return!0}function U(e,s){if(M(s)&&Object.prototype.hasOwnProperty.call(e,s))return delete e[s],e;const r=Array.isArray(s)?s:ne(s)?[s]:ue(s);if(r.some(o=>je.includes(String(o))))return e;const i=r.length===1?e:it(e,r),l=r.length-1,u=r[l];return i&&delete i[u],l!==0&&(N(i)&&B(i)||Array.isArray(i)&&nt(i))&&U(e,r.slice(0,-1)),e}const at=I.createContext(null);at.displayName="HookFormContext";var gr=()=>{let e=[];return{get observers(){return e},next:l=>{for(const u of e)u.next&&u.next(l)},subscribe:l=>(e.push(l),{unsubscribe:()=>{e=e.filter(u=>u!==l)}}),unsubscribe:()=>{e=[]}}};function Sr(e,s){const r={};for(const i in e)if(e.hasOwnProperty(i)){const l=e[i],u=s[i];if(l&&N(l)&&u){const o=Sr(l,u);N(o)&&(r[i]=o)}else e[i]&&(r[i]=u)}return r}const vr=(e,s)=>e!==null&&He(e)&&Object.prototype.hasOwnProperty.call(e,s);var ot=(e,s)=>{if(!s)return!1;let r=e;for(const i of ne(s)?[s]:ue(s)){if(!vr(r,i))return vr(e,s);r=r[i]}return!0},Tr=e=>e.type==="select-multiple",lt=e=>ze(e)||me(e),Pe=e=>ke(e)&&e.isConnected;function _r(e){return Array.isArray(e)||N(e)}function Rr(e,s,r="",i=[]){for(const l in e){const u=r?`${r}.${l}`:l,o=e[l];_r(o)&&_r(v(s,u))?Rr(o,s,u,i):i.push(u)}return i}var ut=e=>{for(const s in e)if(G(e[s]))return!0;return!1};function Cr(e){return Array.isArray(e)||N(e)&&!ut(e)}function Lr(e){return!!(e&&"_f"in e)}function Ir(e){return Array.isArray(e)?!e.some(s=>!O(s)):!Object.keys(e).length}function Be(e,s){Array.isArray(e)?e[s]=void 0:delete e[s]}function $e(e,s={},r){for(const i in e){const l=e[i],u=r&&r[i];Cr(l)&&(!Array.isArray(l)||!Lr(u))?(s[i]=Array.isArray(l)?[]:{},$e(l,s[i],u),Ir(s[i])&&Be(s,i)):O(l)||(s[i]=!0)}return s}function ie(e,s,r,i){r||(r=$e(s,{},i));for(const l in e){const u=e[l],o=i&&i[l];Cr(u)&&(!Array.isArray(u)||!Lr(o))?(O(s)||Me(r[l])?r[l]=$e(u,Array.isArray(u)?[]:{},o):ie(u,p(s)?{}:s[l],r[l],o),Ir(r[l])&&Be(r,l)):Q(u,s[l])?Be(r,l):r[l]=!0}return r}var ft=(e,s)=>{const r=s.split("."),i=[];let l=r[0];for(let u=1;u<r.length;l+="."+r[u++])!isNaN(+r[u])&&e.has(l)&&i.push(`${l}.${r[u]}`);return i},Nr=(e,{valueAsNumber:s,valueAsDate:r,setValueAs:i})=>O(e)?e:s?e===""?NaN:e&&+e:r&&M(e)?new Date(e):i?i(e):e;function Vr(e){const s=e.ref;return Se(s)?s.files:ze(s)?kr(e.refs).value:Tr(s)?[...s.selectedOptions].map(({value:r})=>r):me(s)?xr(e.refs).value:Nr(s.value,e)}var ct=(e,s,r,i)=>{const l={};for(const u of e){const o=v(s,u);o&&k(l,u,o._f)}return{criteriaMode:r,names:[...e],fields:l,shouldUseNativeValidation:i}},_e=e=>O(e)?e:Oe(e)?e.source:N(e)?Oe(e.value)?e.value.source:e.value:e;const mr="AsyncFunction";var dt=e=>{if(!e||!e.validate)return!1;if(G(e.validate))return e.validate.constructor.name===mr;if(N(e.validate)){for(const s in e.validate)if(e.validate[s].constructor.name===mr)return!0}return!1},yt=e=>e.mount&&(e.required||!O(e.required)&&e.required!==!1||!O(e.min)||!O(e.max)||!O(e.maxLength)||!O(e.minLength)||e.pattern||e.validate);function br(e,s,r){const i=v(e,r);if(i||ne(r))return{error:i,name:r};const l=r.split(".");for(;l.length;){const u=l.join("."),o=v(s,u),c=v(e,u);if(o&&!Array.isArray(o)&&r!==u)return{name:r};if(c&&c.type)return{name:u,error:c};if(c&&c.root&&c.root.type)return{name:`${u}.root`,error:c.root};l.pop()}return{name:r}}var ht=(e,s,r,i)=>{r(e);const l=Object.keys(e).filter(u=>u!=="name");return!l.length||i&&l.length>=Object.keys(s).length||l.find(u=>s[u]===(!i||X.all))},gt=(e,s,r)=>!e||!s||e===s||xe(e).some(i=>i&&(r?i===s||i.startsWith(s+"."):i.startsWith(s)||s.startsWith(i))),vt=(e,s,r,i,l)=>l.isOnAll?!1:!r&&l.isOnTouch?!(s||e):(r?i.isOnBlur:l.isOnBlur)?!e:(r?i.isOnChange:l.isOnChange)?e:!0,_t=(e,s)=>{const r=v(e,s);!Or(r).length&&!r?.root&&U(e,s)};const Vt={mode:X.onSubmit,reValidateMode:X.onChange,shouldFocusError:!0},pe="form",mt=(e,s)=>{for(const r in e)r in s||delete e[r];Object.assign(e,s)},Ur={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function bt(e={}){let s={...Vt,...e},r={...C(Ur),isLoading:G(s.defaultValues),errors:s.errors||{},disabled:s.disabled||!1},i={},l=N(s.defaultValues)||N(s.values)?C(s.defaultValues||s.values)||{}:{},u=s.shouldUnregister?{}:C(l),o={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const m={},E={};let T=0,H=De(s.mode),j=De(s.reValidateMode);const $={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},A={...$};let F={...A};const b={array:gr(),state:gr()};let fe=0;const w=s.criteriaMode===X.all,ee=(t,a)=>n=>{clearTimeout(E[t]),E[t]=setTimeout(a,n)},P=async t=>{if(!o.keepIsValid&&!s.disabled&&(A.isValid||F.isValid||t)){const a=++fe;let n;s.resolver?(n=B((await R()).errors),a===fe&&S()):n=await q({fields:i,onlyCheckValid:!0,eventType:oe.VALID}),a===fe&&n!==r.isValid&&b.state.next({isValid:n})}},S=(t,a)=>{!s.disabled&&(A.isValidating||A.validatingFields||F.isValidating||F.validatingFields)&&((t||c.mount).forEach(n=>{n&&(a?k(r.validatingFields,n,a):U(r.validatingFields,n))}),b.state.next({validatingFields:r.validatingFields,isValidating:!B(r.validatingFields)}))},ce=()=>{r.dirtyFields=ie(l,u,void 0,i)},be=(t,a=[],n,f,d=!0,y=!0)=>{if(f&&n&&!s.disabled){o.action=!0;const h=v(i,t);if(o.actionArrayLengths.has(t)||o.actionArrayLengths.set(t,Array.isArray(h)?h.length:0),y&&Array.isArray(h)){const V=n(h,f.argA,f.argB);d&&k(i,t,V)}const g=v(r.errors,t);if(y&&Array.isArray(g)){const V=g.root,L=n(g,f.argA,f.argB)||g;V&&(L.root=V),d&&k(r.errors,t,L),_t(r.errors,t)}const _=v(r.touchedFields,t);if((A.touchedFields||F.touchedFields)&&y&&Array.isArray(_)){const V=n(_,f.argA,f.argB);d&&k(r.touchedFields,t,V)}(A.dirtyFields||F.dirtyFields)&&ce(),b.state.next({name:t,isDirty:Y(t,a),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else k(u,t,a)},Ae=(t,a)=>{k(r.errors,t,a),r.errors={...r.errors},b.state.next({errors:r.errors})},ae=t=>{r.errors=t,b.state.next({errors:r.errors,isValid:!1})},se=t=>{const a=ne(t)?[t]:ue(t);let n=u,f=l;for(let d=0;d<a.length-1;d++){const y=a[d];if(n=p(n)?n:n[y],f=p(f)?f:f[y],n===null&&f!==null)return!0}return!1},Fe=t=>{if(!o.actionArrayLengths.size)return!1;const a=ne(t)?[t]:ue(t);let n=u,f="",d=-1,y=0;for(let h=0;h<a.length;h++){if(p(n))return!1;const g=a[h];if(f=f?`${f}.${g}`:g,Array.isArray(n)&&+g>=n.length)return d===-1?!1:h===d?+g<y:!0;o.actionArrayLengths.has(f)&&(d=h+1,y=o.actionArrayLengths.get(f)),n=n[g]}return!1},de=(t,a,n,f)=>{const d=v(i,t);if(d){if(se(t)||Fe(t))return;const y=O(v(u,t)),h=v(u,t,O(n)?v(l,t):n);O(h)||f&&f.defaultChecked||a?k(u,t,a?h:Vr(d._f)):Re(t,h),o.mount&&!o.action&&(P(),y&&r.isDirty&&(A.isDirty||F.isDirty)&&(Y()||(r.isDirty=!1,b.state.next({...r}))),e.shouldUnregister&&y&&!O(v(u,t))&&Ue(t,c)&&(o.watch=!0))}},D=(t,a,n,f,d)=>{let y=!1,h=!1;const g={name:t};if(!s.disabled||f===!0){if(!n||f){const _=Q(v(l,t),a);(A.isDirty||F.isDirty)&&(h=r.isDirty,r.isDirty=g.isDirty=!_||Y(),y=h!==g.isDirty),h=!!v(r.dirtyFields,t),_!==r.isDirty?mt(r.dirtyFields,ie(l,u,void 0,i)):_?U(r.dirtyFields,t):k(r.dirtyFields,t,!0),g.dirtyFields=r.dirtyFields,y=y||(A.dirtyFields||F.dirtyFields)&&h!==!_}if(n){const _=v(r.touchedFields,t);_||(k(r.touchedFields,t,n),g.touchedFields=r.touchedFields,y=y||(A.touchedFields||F.touchedFields)&&_!==n)}y&&d&&b.state.next(g)}return y?g:{}},x=(t,a,n,f)=>{const d=v(r.errors,t),y=(A.isValid||F.isValid)&&re(a)&&r.isValid!==a;if(s.delayError&&n?(m[t]=ee(t,()=>Ae(t,n)),m[t](s.delayError)):(clearTimeout(E[t]),delete m[t],n?k(r.errors,t,n):U(r.errors,t),r.errors={...r.errors}),(n?!Q(d,n):d)||!B(f)||y){const h={...f,...y&&re(a)?{isValid:a}:{},errors:r.errors,name:t};b.state.next(h)}},R=async t=>(S(t,!0),await s.resolver(u,s.context,ct(t||c.mount,i,s.criteriaMode,s.shouldUseNativeValidation))),W=async t=>{const{errors:a}=await R(t);if(S(t),t){for(const n of t){const f=v(a,n);f?c.array.has(n)&&N(f)&&!Object.keys(f).some(d=>!Number.isNaN(Number(d)))?ur(r.errors,{[n]:f},n):k(r.errors,n,f):U(r.errors,n)}r.errors={...r.errors}}else r.errors=a;return a},K=async({name:t,eventType:a})=>{if(e.validate){const n=await e.validate({formValues:u,formState:r,name:t,eventType:a});if(N(n))for(const f in n){const d=n[f];d&&Ee(`${pe}.${f}`,{message:M(d.message)?d.message:"",type:d.type||J.validate})}else M(n)||!n?Ee(pe,{message:n||"",type:J.validate}):Xe(pe);return n}return!0},q=async({fields:t,onlyCheckValid:a,name:n,eventType:f,context:d={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(d.runRootValidation=!0,!await K({name:n,eventType:f})&&(d.valid=!1,a)))return d.valid;for(const y in t){const h=t[y];if(h){const{_f:g,..._}=h;if(g){const V=c.array.has(g.name),L=h._f&&dt(h._f),z=A.validatingFields||A.isValidating||F.validatingFields||F.isValidating;L&&z&&S([g.name],!0);const Z=await hr(h,c.disabled,u,w,s.shouldUseNativeValidation&&!a,V);if(L&&z&&S([g.name]),Z[g.name]&&(d.valid=!1,a)||(!a&&(v(Z,g.name)?V?ur(r.errors,Z,g.name):k(r.errors,g.name,Z[g.name]):U(r.errors,g.name)),e.shouldUseNativeValidation&&Z[g.name]))break}!B(_)&&await q({context:d,onlyCheckValid:a,fields:_,name:y,eventType:f})}}return d.valid},we=()=>{for(const t of c.unMount){const a=v(i,t);a&&(a._f.refs?a._f.refs.every(n=>!Pe(n)):!Pe(a._f.ref))&&Le(t)}c.unMount=new Set},Y=(t,a)=>(t&&a&&k(u,t,a),!Q(o.mount?u:l,l)),ye=(t,a,n)=>st(t,c,{...o.mount?u:O(a)||M(t)?l:a},n,a),Pr=t=>Or(v(o.mount?u:l,t,s.shouldUnregister?v(l,t,[]):[])),Re=(t,a,n={},f=!1,d=!1,y=!1)=>{const h=v(i,t);let g=a;if(h){const _=h._f;_&&(!_.disabled&&k(u,t,Nr(a,_)),g=ke(_.ref)&&p(a)?"":a,Tr(_.ref)?[..._.ref.options].forEach(V=>V.selected=g.includes(V.value)):_.refs?me(_.ref)?_.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(g)?V.checked=!!g.find(L=>L===V.value):V.checked=g===V.value||!!g)}):_.refs.forEach(V=>V.checked=V.value===g):Se(_.ref)?_.ref.value="":(_.ref.value=g,!_.ref.type&&!d&&!y&&b.state.next({name:t,values:f?u:C(u)})))}(n.shouldDirty||n.shouldTouch)&&D(t,g,n.shouldTouch,n.shouldDirty,!d),n.shouldValidate&&Ce(t,{delayError:n.delayError})},Ge=(t,a,n,f=!1,d=!1,y=!1)=>{c.array.has(t)&&b.array.next({name:t,values:f?u:C(u)});for(const h in a){if(!a.hasOwnProperty(h))continue;const g=a[h],_=t+"."+h,V=v(i,_);(c.array.has(t)||N(g)||V&&!V._f)&&!te(g)?Ge(_,g,n,f,d,y):Re(_,g,n,f,d,y)}},Ke=(t,a,n,f,d=!1)=>{const y=v(i,t),h=c.array.has(t),g=f?a:C(a),_=v(u,t),V=Q(_,g);if(V||k(u,t,g),h)b.array.next({name:t,values:f?u:C(u)}),(A.isDirty||A.dirtyFields||F.isDirty||F.dirtyFields)&&n.shouldDirty&&(ce(),d||b.state.next({name:t,dirtyFields:r.dirtyFields,isDirty:Y(t,g)}));else{const L=Array.isArray(g)&&!g.length||B(g),z=!V&&!d;!y||y._f||p(g)||L?Re(t,g,n,f,d,z):Ge(t,g,n,f,d,z)}if(!V&&!d){const L=Ue(t,c),z=f?u:C(u);if(b.state.next({...L&&r,name:o.mount||L?t:void 0,values:z}),!h)for(const Z of ft(c.array,t))b.state.next({name:Z,values:z})}},he=(t,a,n={})=>Ke(t,a,n,!1),pr=(t,a={})=>{const n=G(t)?t(u):t;if(!Q(u,n)){u={...u,...n};for(const f of c.mount)ot(n,f)&&Ke(f,v(n,f),a,!0,!0);b.state.next({...r,name:void 0,type:void 0,...T?{values:u}:{}}),a.shouldValidate&&P()}},Ze=async t=>{o.mount=!0;const a=t.target;let n=a.name,f=!0;const d=v(i,n),y=h=>{f=Number.isNaN(h)||te(h)&&isNaN(h.getTime())||Q(h,v(u,n,h))};if(d){let h,g;const _=a.type?Vr(d._f):Gr(t),V=t.type===oe.BLUR||t.type===oe.FOCUS_OUT,L=!yt(d._f)&&!e.validate&&!s.resolver&&!v(r.errors,n)&&!d._f.deps,z=L||vt(V,v(r.touchedFields,n),r.isSubmitted,j,H),Z=Ue(n,c,V);if(k(u,n,C(_)),V){if(!a||!a.readOnly){d._f.onBlur&&d._f.onBlur(t);const ve=m[n];ve&&ve(0)}}else d._f.onChange&&d._f.onChange(t);const ge=D(n,_,V),zr=!B(ge)||Z;if(!V&&b.state.next({name:n,type:t.type,...T?{values:C(u)}:{}}),z)return(!L||!r.isValid)&&(A.isValid||F.isValid)&&(s.mode==="onBlur"?V&&P():V||P()),zr&&b.state.next({name:n,...Z?{}:ge});if(!s.resolver&&e.validate&&await K({name:n,eventType:t.type}),!V&&Z&&b.state.next({...r}),s.resolver){const{errors:ve}=await R([n]);if(S([n]),y(_),!f){!B(ge)&&b.state.next(ge);return}const Yr=br(r.errors,i,n),or=br(ve,i,Yr.name||n);h=or.error,n=or.name,g=B(ve)}else S([n],!0),h=(await hr(d,c.disabled,u,w,s.shouldUseNativeValidation))[n],S([n]),y(_),f&&(h?g=!1:(A.isValid||F.isValid)&&(g=await q({fields:i,onlyCheckValid:!0,name:n,eventType:t.type})));f&&(d._f.deps&&(!Array.isArray(d._f.deps)||d._f.deps.length>0)&&Ce(d._f.deps),x(n,g,h,ge))}},Je=(t,a)=>{if(v(r.errors,a)&&t.focus)return t.focus(),1},Ce=async(t,a={})=>{let n,f;const d=xe(t);if(s.resolver){const y=await W(O(t)?t:d);n=B(y),f=t?!d.some(h=>v(y,h)):n}else t?(f=(await Promise.all(d.map(async y=>{const h=v(i,y);return await q({fields:h&&h._f?{[y]:h}:h,eventType:oe.TRIGGER})}))).every(Boolean),!(!f&&!r.isValid)&&P()):f=n=await q({fields:i,name:t,eventType:oe.TRIGGER});if(a.delayError&&s.delayError&&M(t)){const y=v(r.errors,t);y?(U(r.errors,t),m[t]=ee(t,()=>Ae(t,y)),m[t](s.delayError)):(clearTimeout(E[t]),delete m[t])}if(a.shouldTouch)for(const y of t?d:c.mount)!c.array.has(y)&&k(r.touchedFields,y,!0);return b.state.next({...!M(t)||(A.isValid||F.isValid)&&n!==r.isValid?{}:{name:t},...s.resolver||!t?{isValid:n}:{},...a.shouldTouch&&(A.touchedFields||F.touchedFields)?{touchedFields:r.touchedFields}:{},errors:r.errors}),a.shouldFocus&&!f&&Ve(i,Je,t?d:c.mount),f},Mr=(t,a)=>{let n={...o.mount?u:l};return a&&(n=Sr(a.dirtyFields?r.dirtyFields:r.touchedFields,n)),O(t)?n:M(t)?v(n,t):t.map(f=>v(n,f))},Br=t=>O(t)?{...r.errors}:M(t)?v(r.errors,t):t.map(a=>v(r.errors,a)),Qe=(t,a)=>{const n=a||r,f=v(n.errors,t);return{invalid:!!f,isDirty:!!v(n.dirtyFields,t),error:f,isValidating:!!v(r.validatingFields,t),isTouched:!!v(n.touchedFields,t)}},Xe=t=>{const a=t?xe(t):void 0;a?.forEach(n=>U(r.errors,n)),a?a.forEach(n=>{b.state.next({name:n,errors:r.errors})}):(r.errors={},b.state.next({errors:r.errors}))},Ee=(t,a,n)=>{const f=(v(i,t,{_f:{}})._f||{}).ref,d=v(r.errors,t)||{},{ref:y,message:h,type:g,..._}=d;k(r.errors,t,{..._,...a,ref:f}),b.state.next({name:t,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&f&&f.focus&&f.focus()},$r=(t,a)=>{if(G(t)){T++;const{unsubscribe:n}=b.state.subscribe({next:d=>"values"in d&&t(d.values||ye(void 0,a),d)});let f=!1;return{unsubscribe:()=>{f||(f=!0,T--,n())}}}return ye(t,a,!0)},er=t=>{var a;const n=!!(!((a=t.formState)===null||a===void 0)&&a.values);n&&T++;const{unsubscribe:f}=b.state.subscribe({next:y=>{if(gt(t.name,y.name,t.exact)&&ht(y,t.formState||A,nr,t.reRenderRoot)){const h={...u};t.callback({values:h,...r,...y,defaultValues:l})}}});if(!n)return f;let d=!1;return()=>{d||(d=!0,T--,f())}},Wr=t=>(o.mount=!0,F={...F,...t.formState},er({...t,formState:{...$,...t.formState}})),Le=(t,a={})=>{for(const n of t?xe(t):c.mount)c.mount.delete(n),c.array.delete(n),a.keepValue||(U(i,n),U(u,n)),!a.keepError&&U(r.errors,n),!a.keepDirty&&U(r.dirtyFields,n),!a.keepTouched&&U(r.touchedFields,n),!a.keepIsValidating&&U(r.validatingFields,n),!s.shouldUnregister&&!a.keepDefaultValue&&U(l,n);T&&b.state.next({values:C(u)}),b.state.next({...r,...a.keepDirty?{}:{isDirty:Y()}}),!a.keepIsValid&&P()},rr=({disabled:t,name:a})=>{if(re(t)&&o.mount||t||c.disabled.has(a)){const d=c.disabled.has(a)!==!!t;t?c.disabled.add(a):c.disabled.delete(a),d&&o.mount&&!o.action&&P()}},Ie=(t,a={})=>{let n=v(i,t);const f=re(a.disabled)||re(s.disabled),d=!c.registerName.has(t)&&n&&n._f&&!n._f.mount;return k(i,t,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:t}},name:t,mount:!0,...a}}),c.mount.add(t),n&&!d?rr({disabled:re(a.disabled)?a.disabled:s.disabled,name:t}):de(t,!0,a.value),{...f?{disabled:a.disabled||s.disabled}:{},...s.progressive?{required:!!a.required,min:_e(a.min),max:_e(a.max),minLength:_e(a.minLength),maxLength:_e(a.maxLength),pattern:_e(a.pattern)}:{},name:t,onChange:Ze,onBlur:Ze,ref:y=>{if(y){c.registerName.add(t),Ie(t,a),c.registerName.delete(t),n=v(i,t);const h=O(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,g=lt(h),_=n._f.refs||[];if(g?_.find(L=>L===h):h===n._f.ref)return;const V={...n._f};g?(V.refs=[..._.filter(Pe),h,...Array.isArray(v(l,t))?[{}]:[]],V.ref={type:h.type,name:t}):(V.ref=h,delete V.refs),k(i,t,{_f:V}),de(t,!1,void 0,h)}else n=v(i,t,{}),n._f&&(n._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(Zr(c.array,t)&&o.action)&&c.unMount.add(t)}}},Ne=()=>s.shouldFocusError&&!s.shouldUseNativeValidation&&Ve(i,Je,c.mount),qr=t=>{re(t)&&(b.state.next({disabled:t}),Ve(i,(a,n)=>{const f=v(i,n);f&&(a.disabled=f._f.disabled||t,Array.isArray(f._f.refs)&&f._f.refs.forEach(d=>{d.disabled=f._f.disabled||t}))},0,!1))},tr=(t,a)=>async n=>{let f,d;n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let y=C(u);if(b.state.next({isSubmitting:!0}),s.resolver){const{errors:h,values:g}=await R();S(),r.errors=h,y=C(g)}else await q({fields:i,eventType:oe.SUBMIT});if(c.disabled.size)for(const h of c.disabled)U(y,h);if(U(r.errors,Dr),B(r.errors)){b.state.next({errors:{}});try{f=await t(y,n)}catch(h){d=h}}else a&&await a({...r.errors},n),Ne(),setTimeout(Ne);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(r.errors)&&!d,submitCount:r.submitCount+1,errors:r.errors}),d)throw d;return f},Hr=(t,a={})=>{v(i,t)&&(O(a.defaultValue)?he(t,C(v(l,t))):(he(t,a.defaultValue),k(l,t,C(a.defaultValue))),a.keepTouched||U(r.touchedFields,t),a.keepDirty||(U(r.dirtyFields,t),r.isDirty=a.defaultValue?Y(t,C(v(l,t))):Y()),a.keepError||(U(r.errors,t),P()),b.state.next({...r}))},sr=(t,a={})=>{const n=t?C(t):l,f=C(n),d=B(t),y=f,h=i;if(a.keepDefaultValues||(l=n),!a.keepValues){if(a.keepDirtyValues){const g=new Set([...c.mount,...Rr(ie(l,u,void 0,h),r.dirtyFields)]);for(const _ of g){const V=v(r.dirtyFields,_),L=v(u,_),z=v(y,_);V&&!O(L)?k(y,_,L):!V&&!O(z)&&he(_,z)}}else{if(Te&&O(t))for(const g of c.mount){const _=v(i,g);if(_&&_._f){const V=Array.isArray(_._f.refs)?_._f.refs[0]:_._f.ref;if(ke(V)){const L=V.closest("form");if(L){L.reset();break}}}}if(a.keepFieldsRef)for(const g of c.mount)he(g,v(y,g));else i={}}if(s.shouldUnregister){if(u=a.keepDefaultValues?C(l):{},a.keepFieldsRef)for(const g of c.mount)k(u,g,v(y,g))}else u=C(y);b.array.next({values:{...y}}),b.state.next({name:void 0,type:void 0,values:{...y}})}c={mount:a.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!A.isValid||!!a.keepIsValid||!!a.keepDirtyValues||!s.shouldUnregister&&!B(y),o.watch=!!s.shouldUnregister,o.keepIsValid=!!a.keepIsValid,o.action=!1,o.actionArrayLengths.clear(),a.keepErrors||(r.errors={}),b.state.next({submitCount:a.keepSubmitCount?r.submitCount:0,isDirty:d?!1:a.keepDirty?r.isDirty:a.keepValues?Y():!!(a.keepDefaultValues&&!Q(t,l)),isSubmitted:a.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:d?{}:a.keepDirtyValues?a.keepDefaultValues&&u?ie(l,u,void 0,h):r.dirtyFields:a.keepDefaultValues&&t?ie(l,t,void 0,h):a.keepDirty?r.dirtyFields:{},touchedFields:a.keepTouched?r.touchedFields:{},errors:a.keepErrors?r.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:l})},ir=(t,a)=>sr(G(t)?t(u):t,{...s.resetOptions,...a}),jr=(t,a={})=>{const n=v(i,t),f=n&&n._f;if(f){const d=f.refs?f.refs[0]:f.ref;d.focus&&setTimeout(()=>{d.focus(),a.shouldSelect&&G(d.select)&&d.select()})}},nr=t=>{const{name:a,type:n,values:f,...d}=t;r={...r,...d}};b.state.subscribe({next:nr});const ar={control:{register:Ie,unregister:Le,getFieldState:Qe,handleSubmit:tr,setError:Ee,_subscribe:er,_runSchema:R,_updateIsValidating:S,_focusError:Ne,_getWatch:ye,_getDirty:Y,_setValid:P,_setFieldArray:be,_setDisabledField:rr,_setErrors:ae,_getFieldArray:Pr,_reset:sr,_resetDefaultValues:()=>G(s.defaultValues)&&s.defaultValues().then(t=>{ir(t,s.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:we,_disableForm:qr,_subjects:b,_proxyFormState:A,get _fields(){return i},get _formValues(){return u},get _state(){return o},set _state(t){o=t},get _defaultValues(){return l},get _names(){return c},set _names(t){c=t},get _formState(){return r},get _options(){return s},set _options(t){s={...s,...t},H=De(s.mode),j=De(s.reValidateMode)}},subscribe:Wr,trigger:Ce,register:Ie,handleSubmit:tr,watch:$r,setValue:he,setValues:pr,getValues:Mr,getErrors:Br,reset:ir,resetField:Hr,resetDefaultValues:(t,a={})=>{if(l=C(t),!a.keepDirty){const n=ie(l,u,void 0,i);r.dirtyFields=n,r.isDirty=!B(n)}a.keepIsValid||P(),b.state.next({...r,defaultValues:l})},clearErrors:Xe,unregister:Le,setError:Ee,setFocus:jr,getFieldState:Qe};return{...ar,formControl:ar}}function kt(e={}){const s=I.useRef(void 0),r=I.useRef(void 0),i=I.useRef(e.formControl),[l,u]=I.useState(()=>({...C(Ur),isLoading:G(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:G(e.defaultValues)?void 0:e.defaultValues}));if(!s.current||e.formControl&&i.current!==e.formControl)if(i.current=e.formControl,e.formControl)s.current={...e.formControl,formState:l},e.defaultValues&&!G(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:E,...T}=bt(e);s.current={...T,formState:l}}const o=s.current.control;o._options=e;const{resyncIfNeeded:c,snapshot:m}=tt();return et(()=>{const E=()=>({...o._formState,defaultValues:o._defaultValues});c(!0,E,u);const T=o._subscribe({formState:o._proxyFormState,callback:()=>u({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return u(H=>({...H,isReady:!0})),o._formState.isReady=!0,()=>{T(),m(!0,E)}},[o,c,m]),I.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),I.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),I.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),I.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),I.useEffect(()=>{if(o._proxyFormState.isDirty){const E=o._getDirty();E!==l.isDirty&&o._subjects.state.next({isDirty:E})}},[o,l.isDirty]),I.useEffect(()=>{var E;e.values&&!Q(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((E=o._options.resetOptions)===null||E===void 0)&&E.keepIsValid||o._setValid(),r.current=e.values,u(T=>({...T}))):o._resetDefaultValues()},[o,e.values]),I.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),s.current.formState=I.useMemo(()=>Xr(l,o),[o,l]),s.current}const Ar=(e,s,r)=>{if(e&&"reportValidity"in e){const i=v(r,s);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},We=(e,s)=>{for(const r in s.fields){const i=s.fields[r];i&&i.ref&&"reportValidity"in i.ref?Ar(i.ref,r,e):i&&i.refs&&i.refs.forEach(l=>Ar(l,r,e))}},Fr=(e,s)=>{s.shouldUseNativeValidation&&We(e,s);const r={};for(const i in e){const l=v(s.fields,i),u=Object.assign(e[i]||{},{ref:l&&l.refs?l.refs[0]:l&&l.ref});if(At(s.names||Object.keys(e),i)){const o=Object.assign({},v(r,i));k(o,"root",u),k(r,i,o)}else k(r,i,u)}return r},At=(e,s)=>{const r=wr(s).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(i=>wr(i).match(`^${r}\\.\\d+`))};function wr(e){return e.replace(/\[(\d+)]/g,".$1").replace(/[[\]]/g,"")}function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var r=arguments[s];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},qe.apply(null,arguments)}function Er(e,s){try{var r=e()}catch(i){return s(i)}return r&&r.then?r.then(void 0,s):r}function Ft(e,s){for(var r=Object.create(null);e.length;){var i=e[0],l=i.code,u=i.message,o=i.path.join(".");if(!r[o])if("unionErrors"in i){var c,m,E=i.unionErrors.reduce(function(j,$){return $.errors.length<j.errors.length?$:j}).errors[0];r[o]={message:(c=E?.message)!=null?c:u,type:(m=E?.code)!=null?m:l}}else r[o]={message:u,type:l};if("unionErrors"in i&&i.unionErrors.forEach(function(j){return j.errors.forEach(function($){return e.push($)})}),s){var T=r[o].types,H=T&&T[i.code];r[o]=Ye(o,s,r,l,H?[].concat(H,i.message):i.message)}e.shift()}return r}function wt(e,s){for(var r=Object.create(null),i=function(){var l=e[0],u=l.code,o=l.message,c=l.path.join(".");if(!r[c])if(l.code==="invalid_union"&&l.errors.length>0){var m,E,T=l.errors.reduce(function($,A){return A.length<$.length?A:$})[0];r[c]={message:(m=T?.message)!=null?m:o,type:(E=T?.code)!=null?E:u}}else r[c]={message:o,type:u};if(l.code==="invalid_union"&&l.errors.forEach(function($){return $.forEach(function(A){return e.push(qe({},A,{path:[].concat(l.path,A.path)}))})}),s){var H=r[c].types,j=H&&H[l.code];r[c]=Ye(c,s,r,u,j?[].concat(j,l.message):l.message)}e.shift()};e.length;)i();return r}function Ot(e,s,r){if(r===void 0&&(r={}),(function(i){return"_zod"in i&&typeof i._zod=="object"})(e))return function(i,l,u){try{return Promise.resolve(Er(function(){function o(m){return u.shouldUseNativeValidation&&We({},u),{errors:{},values:r.raw?Object.assign({},i):m}}var c=e;return r.mode==="sync"?o(c.parse(i,s)):Promise.resolve(c.parseAsync(i,s)).then(o)},function(o){if((function(c){var m;return!(c==null||(m=c._zod)==null||(m=m.traits)==null||!m.has("$ZodError"))})(o))return{values:{},errors:Fr(wt(o.issues,!u.shouldUseNativeValidation&&u.criteriaMode==="all"),u)};throw o}))}catch(o){return Promise.reject(o)}};if((function(i){return"_def"in i&&typeof i._def=="object"})(e))return function(i,l,u){try{return Promise.resolve(Er(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](i,s)).then(function(o){return u.shouldUseNativeValidation&&We({},u),{errors:{},values:r.raw?Object.assign({},i):o}})},function(o){if((function(c){return Array.isArray(c?.issues)})(o))return{values:{},errors:Fr(Ft(o.errors,!u.shouldUseNativeValidation&&u.criteriaMode==="all"),u)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}export{Ot as a,kt as u};
1
+ import{aP as I}from"./index-B1JGVSdd.js";var me=e=>e.type==="checkbox",Se=e=>e.type==="file",te=e=>e instanceof Date,p=e=>e==null;const He=e=>typeof e=="object";var N=e=>!p(e)&&!Array.isArray(e)&&He(e)&&!te(e),Gr=e=>N(e)&&e.target?me(e.target)?e.target.checked:Se(e.target)?e.target.files:e.target.value:e;const Kr=/[.[\]'"]/;var ue=e=>e.split(Kr).filter(Boolean),Zr=(e,s)=>s.split(".").some((r,i,l)=>!isNaN(Number(r))&&e.has(l.slice(0,i).join("."))),Te=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function C(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const s=typeof FileList<"u"&&e instanceof FileList;if(Te&&(e instanceof Blob||s))return e;const r=Array.isArray(e);if(!r&&e.constructor!==Object)return e;const i=r?[]:Object.create(Object.getPrototypeOf(e));for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(i[l]=C(e[l]));return i}const oe={BLUR:"blur",FOCUS_OUT:"focusout",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},X={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},J={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Dr="root",je=["__proto__","constructor","prototype"],Jr=/^\w*$/;var ne=e=>Jr.test(e),O=e=>e===void 0,v=(e,s,r)=>{if(!s||!N(e))return r;const i=ne(s)?[s]:ue(s);if(i.some(u=>je.includes(u)))return r;const l=i.reduce((u,o)=>p(u)?void 0:u[o],e);return O(l)||l===e?O(e[s])?r:e[s]:l},re=e=>typeof e=="boolean",G=e=>typeof e=="function",k=(e,s,r)=>{let i=-1;const l=ne(s)?[s]:ue(s),u=l.length,o=u-1;for(;++i<u;){const c=l[i];let m=r;if(i!==o){const E=e[c];m=N(E)||Array.isArray(E)?E:isNaN(+l[i+1])?{}:[]}if(je.includes(c))return;e[c]=m,e=e[c]}};const Qr=I.createContext(null);Qr.displayName="HookFormControlContext";var Xr=(e,s,r,i=!0)=>{const l={};for(const u in e)Object.defineProperty(l,u,{get:()=>{const o=u;return s._proxyFormState[o]!==X.all&&(s._proxyFormState[o]=!i||X.all),e[o]}});return l};const et=Te?I.useLayoutEffect:I.useEffect;var rt=e=>{const s=e.constructor&&e.constructor.prototype;return N(s)&&s.hasOwnProperty("isPrototypeOf")},Me=e=>p(e)||!He(e);const lr=(e,s)=>s.length===0&&!Array.isArray(e)&&!rt(e);function Q(e,s,r=new WeakMap){if(e===s)return!0;if(Me(e)||Me(s))return Object.is(e,s);if(te(e)&&te(s))return Object.is(e.getTime(),s.getTime());const i=Object.keys(e),l=Object.keys(s);if(i.length!==l.length)return!1;if(lr(e,i)||lr(s,l))return Object.is(e,s);if(!i.length&&Array.isArray(e)!==Array.isArray(s))return!1;const u=r.get(e);if(u&&u.has(s))return!0;if(u)u.add(s);else{const o=new WeakSet;o.add(s),r.set(e,o)}for(const o of i){const c=e[o];if(!(o in s))return!1;if(o!=="ref"){const m=s[o];if(te(c)&&te(m)||(N(c)||Array.isArray(c))&&(N(m)||Array.isArray(m))?!Q(c,m,r):!Object.is(c,m))return!1}}return!0}function tt(e){const s=I.useRef(!1),r=I.useRef(!1),i=I.useRef(void 0),l=I.useRef(0);l.current++,r.current;const u=I.useCallback((c,m,E)=>{if(c&&(s.current||r.current&&l.current>1)){const T=m();Q(i.current,T)||E(T)}s.current=!0},[]),o=I.useCallback((c,m)=>{c&&(i.current=C(m()))},[]);return{resyncIfNeeded:u,snapshot:o}}var M=e=>typeof e=="string",st=(e,s,r,i,l)=>M(e)?(i&&s.watch.add(e),v(r,e,l)):Array.isArray(e)?e.map(u=>(i&&s.watch.add(u),v(r,u,v(l,u)))):(i&&(s.watchAll=!0),r),De=e=>({isOnSubmit:!e||e===X.onSubmit,isOnBlur:e===X.onBlur,isOnChange:e===X.onChange,isOnAll:e===X.all,isOnTouch:e===X.onTouched}),Ue=(e,s,r)=>{if(r)return!1;if(s.watchAll||s.watch.has(e))return!0;for(const i of s.watch)if(e.startsWith(i)&&e.charAt(i.length)===".")return!0;return!1};const Ve=(e,s,r,i)=>{for(const l of r||Object.keys(e)){if(l==="_f")continue;const u=r?v(e,l):e[l];if(u){const{_f:o}=u;if(o){if(o.refs&&o.refs[0]&&s(o.refs[0],l)&&!i)return!0;if(o.ref&&s(o.ref,o.name)&&!i)return!0;if(Ve(u,s))break}else if((N(u)||Array.isArray(u))&&Ve(u,s))break}}};var ur=(e,s,r)=>{const i=v(e,r),l=Array.isArray(i)?i:[];return k(l,Dr,s[r]),k(e,r,l),e},B=e=>N(e)&&!Object.keys(e).length,ke=e=>{if(!Te)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},ze=e=>e.type==="radio",Oe=e=>e instanceof RegExp,Ye=(e,s,r,i,l)=>s?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[i]:l||!0}}:{};const fr={value:!1,isValid:!1},cr={value:!0,isValid:!0};var xr=e=>{if(!Array.isArray(e))return fr;if(e.length>1){const r=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.value);return{value:r,isValid:!!r.length}}const s=e[0];return!s||!s.checked||s.disabled?fr:!s.attributes||!("value"in s.attributes)||O(s.value)||s.value===""?cr:{value:s.value,isValid:!0}};const dr={isValid:!1,value:null};var kr=e=>Array.isArray(e)?e.reduce((s,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:s,dr):dr;function yr(e,s,r="validate"){if(M(e)||Array.isArray(e)&&e.every(M)||re(e)&&!e)return{type:r,message:M(e)?e:"",ref:s}}var le=e=>N(e)&&!Oe(e)?e:{value:e,message:""},hr=async(e,s,r,i,l,u)=>{const{ref:o,refs:c,required:m,maxLength:E,minLength:T,min:H,max:j,pattern:$,validate:A,name:F,valueAsNumber:b,mount:fe}=e._f,w=v(r,F);if(!fe||s.has(F))return{};const ee=c?c[0]:o,P=D=>{if(l&&ee.reportValidity){const x=re(D)?"":D||"";c?c.forEach(R=>R.setCustomValidity(x)):ee.setCustomValidity(x),ee.reportValidity()}},S={},ce=ze(o),be=me(o),Ae=ce||be,ae=(b||Se(o))&&O(o.value)&&O(w)||ke(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,se=Ye.bind(null,F,i,S),Fe=(D,x,R,W=J.maxLength,K=J.minLength)=>{const q=D?x:R;S[F]={type:D?W:K,message:q,ref:o,...se(D?W:K,q)}};if(u?!Array.isArray(w)||!w.length:m&&(!Ae&&(ae||p(w))||re(w)&&!w||be&&!xr(c).isValid||ce&&!kr(c).isValid)){const{value:D,message:x}=M(m)?{value:!!m,message:m}:le(m);if(D&&(S[F]={type:J.required,message:x,ref:ee,...se(J.required,x)},!i))return P(x),S}if(!ae&&(!p(H)||!p(j))){let D,x;const R=le(j),W=le(H);if(!p(w)&&!te(w)&&!isNaN(w)){const K=o.valueAsNumber||w&&+w;p(R.value)||(D=K>R.value),p(W.value)||(x=K<W.value)}else{const K=o.valueAsDate||new Date(w),q=ye=>new Date(new Date().toDateString()+" "+ye),we=o.type=="time",Y=o.type=="week";M(R.value)&&w&&(D=we?q(w)>q(R.value):Y?w>R.value:K>new Date(R.value)),M(W.value)&&w&&(x=we?q(w)<q(W.value):Y?w<W.value:K<new Date(W.value))}if((D||x)&&(Fe(!!D,R.message,W.message,J.max,J.min),!i))return P(S[F].message),S}if((E||T)&&!ae&&(M(w)||u&&Array.isArray(w))){const D=le(E),x=le(T),R=!p(D.value)&&w.length>+D.value,W=!p(x.value)&&w.length<+x.value;if((R||W)&&(Fe(R,D.message,x.message),!i))return P(S[F].message),S}if($&&!ae&&M(w)){const{value:D,message:x}=le($);if(Oe(D)&&!w.match(D)&&(S[F]={type:J.pattern,message:x,ref:o,...se(J.pattern,x)},!i))return P(x),S}if(A){if(G(A)){const D=await A(w,r),x=yr(D,ee);if(x&&(S[F]={...x,...se(J.validate,x.message)},!i))return P(x.message),S}else if(N(A)){let D={};for(const x in A){if(!B(D)&&!i)break;const R=yr(await A[x](w,r),ee,x);R&&(D={...R,...se(x,R.message)},P(R.message),i&&(S[F]=D))}if(!B(D)&&(S[F]={ref:ee,...D},!i))return S}}const de=S[F];return P(de?de.message:!0),S},xe=e=>Array.isArray(e)?e:[e],Or=e=>Array.isArray(e)?e.filter(Boolean):[];function it(e,s){const r=s.length-1;let i=0;for(;i<r;){if(p(e)){e=void 0;break}e=e[s[i]],i++}return e}function nt(e){for(const s in e)if(e.hasOwnProperty(s)&&!O(e[s]))return!1;return!0}function U(e,s){if(M(s)&&Object.prototype.hasOwnProperty.call(e,s))return delete e[s],e;const r=Array.isArray(s)?s:ne(s)?[s]:ue(s);if(r.some(o=>je.includes(String(o))))return e;const i=r.length===1?e:it(e,r),l=r.length-1,u=r[l];return i&&delete i[u],l!==0&&(N(i)&&B(i)||Array.isArray(i)&&nt(i))&&U(e,r.slice(0,-1)),e}const at=I.createContext(null);at.displayName="HookFormContext";var gr=()=>{let e=[];return{get observers(){return e},next:l=>{for(const u of e)u.next&&u.next(l)},subscribe:l=>(e.push(l),{unsubscribe:()=>{e=e.filter(u=>u!==l)}}),unsubscribe:()=>{e=[]}}};function Sr(e,s){const r={};for(const i in e)if(e.hasOwnProperty(i)){const l=e[i],u=s[i];if(l&&N(l)&&u){const o=Sr(l,u);N(o)&&(r[i]=o)}else e[i]&&(r[i]=u)}return r}const vr=(e,s)=>e!==null&&He(e)&&Object.prototype.hasOwnProperty.call(e,s);var ot=(e,s)=>{if(!s)return!1;let r=e;for(const i of ne(s)?[s]:ue(s)){if(!vr(r,i))return vr(e,s);r=r[i]}return!0},Tr=e=>e.type==="select-multiple",lt=e=>ze(e)||me(e),Pe=e=>ke(e)&&e.isConnected;function _r(e){return Array.isArray(e)||N(e)}function Rr(e,s,r="",i=[]){for(const l in e){const u=r?`${r}.${l}`:l,o=e[l];_r(o)&&_r(v(s,u))?Rr(o,s,u,i):i.push(u)}return i}var ut=e=>{for(const s in e)if(G(e[s]))return!0;return!1};function Cr(e){return Array.isArray(e)||N(e)&&!ut(e)}function Lr(e){return!!(e&&"_f"in e)}function Ir(e){return Array.isArray(e)?!e.some(s=>!O(s)):!Object.keys(e).length}function Be(e,s){Array.isArray(e)?e[s]=void 0:delete e[s]}function $e(e,s={},r){for(const i in e){const l=e[i],u=r&&r[i];Cr(l)&&(!Array.isArray(l)||!Lr(u))?(s[i]=Array.isArray(l)?[]:{},$e(l,s[i],u),Ir(s[i])&&Be(s,i)):O(l)||(s[i]=!0)}return s}function ie(e,s,r,i){r||(r=$e(s,{},i));for(const l in e){const u=e[l],o=i&&i[l];Cr(u)&&(!Array.isArray(u)||!Lr(o))?(O(s)||Me(r[l])?r[l]=$e(u,Array.isArray(u)?[]:{},o):ie(u,p(s)?{}:s[l],r[l],o),Ir(r[l])&&Be(r,l)):Q(u,s[l])?Be(r,l):r[l]=!0}return r}var ft=(e,s)=>{const r=s.split("."),i=[];let l=r[0];for(let u=1;u<r.length;l+="."+r[u++])!isNaN(+r[u])&&e.has(l)&&i.push(`${l}.${r[u]}`);return i},Nr=(e,{valueAsNumber:s,valueAsDate:r,setValueAs:i})=>O(e)?e:s?e===""?NaN:e&&+e:r&&M(e)?new Date(e):i?i(e):e;function Vr(e){const s=e.ref;return Se(s)?s.files:ze(s)?kr(e.refs).value:Tr(s)?[...s.selectedOptions].map(({value:r})=>r):me(s)?xr(e.refs).value:Nr(s.value,e)}var ct=(e,s,r,i)=>{const l={};for(const u of e){const o=v(s,u);o&&k(l,u,o._f)}return{criteriaMode:r,names:[...e],fields:l,shouldUseNativeValidation:i}},_e=e=>O(e)?e:Oe(e)?e.source:N(e)?Oe(e.value)?e.value.source:e.value:e;const mr="AsyncFunction";var dt=e=>{if(!e||!e.validate)return!1;if(G(e.validate))return e.validate.constructor.name===mr;if(N(e.validate)){for(const s in e.validate)if(e.validate[s].constructor.name===mr)return!0}return!1},yt=e=>e.mount&&(e.required||!O(e.required)&&e.required!==!1||!O(e.min)||!O(e.max)||!O(e.maxLength)||!O(e.minLength)||e.pattern||e.validate);function br(e,s,r){const i=v(e,r);if(i||ne(r))return{error:i,name:r};const l=r.split(".");for(;l.length;){const u=l.join("."),o=v(s,u),c=v(e,u);if(o&&!Array.isArray(o)&&r!==u)return{name:r};if(c&&c.type)return{name:u,error:c};if(c&&c.root&&c.root.type)return{name:`${u}.root`,error:c.root};l.pop()}return{name:r}}var ht=(e,s,r,i)=>{r(e);const l=Object.keys(e).filter(u=>u!=="name");return!l.length||i&&l.length>=Object.keys(s).length||l.find(u=>s[u]===(!i||X.all))},gt=(e,s,r)=>!e||!s||e===s||xe(e).some(i=>i&&(r?i===s||i.startsWith(s+"."):i.startsWith(s)||s.startsWith(i))),vt=(e,s,r,i,l)=>l.isOnAll?!1:!r&&l.isOnTouch?!(s||e):(r?i.isOnBlur:l.isOnBlur)?!e:(r?i.isOnChange:l.isOnChange)?e:!0,_t=(e,s)=>{const r=v(e,s);!Or(r).length&&!r?.root&&U(e,s)};const Vt={mode:X.onSubmit,reValidateMode:X.onChange,shouldFocusError:!0},pe="form",mt=(e,s)=>{for(const r in e)r in s||delete e[r];Object.assign(e,s)},Ur={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function bt(e={}){let s={...Vt,...e},r={...C(Ur),isLoading:G(s.defaultValues),errors:s.errors||{},disabled:s.disabled||!1},i={},l=N(s.defaultValues)||N(s.values)?C(s.defaultValues||s.values)||{}:{},u=s.shouldUnregister?{}:C(l),o={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const m={},E={};let T=0,H=De(s.mode),j=De(s.reValidateMode);const $={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},A={...$};let F={...A};const b={array:gr(),state:gr()};let fe=0;const w=s.criteriaMode===X.all,ee=(t,a)=>n=>{clearTimeout(E[t]),E[t]=setTimeout(a,n)},P=async t=>{if(!o.keepIsValid&&!s.disabled&&(A.isValid||F.isValid||t)){const a=++fe;let n;s.resolver?(n=B((await R()).errors),a===fe&&S()):n=await q({fields:i,onlyCheckValid:!0,eventType:oe.VALID}),a===fe&&n!==r.isValid&&b.state.next({isValid:n})}},S=(t,a)=>{!s.disabled&&(A.isValidating||A.validatingFields||F.isValidating||F.validatingFields)&&((t||c.mount).forEach(n=>{n&&(a?k(r.validatingFields,n,a):U(r.validatingFields,n))}),b.state.next({validatingFields:r.validatingFields,isValidating:!B(r.validatingFields)}))},ce=()=>{r.dirtyFields=ie(l,u,void 0,i)},be=(t,a=[],n,f,d=!0,y=!0)=>{if(f&&n&&!s.disabled){o.action=!0;const h=v(i,t);if(o.actionArrayLengths.has(t)||o.actionArrayLengths.set(t,Array.isArray(h)?h.length:0),y&&Array.isArray(h)){const V=n(h,f.argA,f.argB);d&&k(i,t,V)}const g=v(r.errors,t);if(y&&Array.isArray(g)){const V=g.root,L=n(g,f.argA,f.argB)||g;V&&(L.root=V),d&&k(r.errors,t,L),_t(r.errors,t)}const _=v(r.touchedFields,t);if((A.touchedFields||F.touchedFields)&&y&&Array.isArray(_)){const V=n(_,f.argA,f.argB);d&&k(r.touchedFields,t,V)}(A.dirtyFields||F.dirtyFields)&&ce(),b.state.next({name:t,isDirty:Y(t,a),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else k(u,t,a)},Ae=(t,a)=>{k(r.errors,t,a),r.errors={...r.errors},b.state.next({errors:r.errors})},ae=t=>{r.errors=t,b.state.next({errors:r.errors,isValid:!1})},se=t=>{const a=ne(t)?[t]:ue(t);let n=u,f=l;for(let d=0;d<a.length-1;d++){const y=a[d];if(n=p(n)?n:n[y],f=p(f)?f:f[y],n===null&&f!==null)return!0}return!1},Fe=t=>{if(!o.actionArrayLengths.size)return!1;const a=ne(t)?[t]:ue(t);let n=u,f="",d=-1,y=0;for(let h=0;h<a.length;h++){if(p(n))return!1;const g=a[h];if(f=f?`${f}.${g}`:g,Array.isArray(n)&&+g>=n.length)return d===-1?!1:h===d?+g<y:!0;o.actionArrayLengths.has(f)&&(d=h+1,y=o.actionArrayLengths.get(f)),n=n[g]}return!1},de=(t,a,n,f)=>{const d=v(i,t);if(d){if(se(t)||Fe(t))return;const y=O(v(u,t)),h=v(u,t,O(n)?v(l,t):n);O(h)||f&&f.defaultChecked||a?k(u,t,a?h:Vr(d._f)):Re(t,h),o.mount&&!o.action&&(P(),y&&r.isDirty&&(A.isDirty||F.isDirty)&&(Y()||(r.isDirty=!1,b.state.next({...r}))),e.shouldUnregister&&y&&!O(v(u,t))&&Ue(t,c)&&(o.watch=!0))}},D=(t,a,n,f,d)=>{let y=!1,h=!1;const g={name:t};if(!s.disabled||f===!0){if(!n||f){const _=Q(v(l,t),a);(A.isDirty||F.isDirty)&&(h=r.isDirty,r.isDirty=g.isDirty=!_||Y(),y=h!==g.isDirty),h=!!v(r.dirtyFields,t),_!==r.isDirty?mt(r.dirtyFields,ie(l,u,void 0,i)):_?U(r.dirtyFields,t):k(r.dirtyFields,t,!0),g.dirtyFields=r.dirtyFields,y=y||(A.dirtyFields||F.dirtyFields)&&h!==!_}if(n){const _=v(r.touchedFields,t);_||(k(r.touchedFields,t,n),g.touchedFields=r.touchedFields,y=y||(A.touchedFields||F.touchedFields)&&_!==n)}y&&d&&b.state.next(g)}return y?g:{}},x=(t,a,n,f)=>{const d=v(r.errors,t),y=(A.isValid||F.isValid)&&re(a)&&r.isValid!==a;if(s.delayError&&n?(m[t]=ee(t,()=>Ae(t,n)),m[t](s.delayError)):(clearTimeout(E[t]),delete m[t],n?k(r.errors,t,n):U(r.errors,t),r.errors={...r.errors}),(n?!Q(d,n):d)||!B(f)||y){const h={...f,...y&&re(a)?{isValid:a}:{},errors:r.errors,name:t};b.state.next(h)}},R=async t=>(S(t,!0),await s.resolver(u,s.context,ct(t||c.mount,i,s.criteriaMode,s.shouldUseNativeValidation))),W=async t=>{const{errors:a}=await R(t);if(S(t),t){for(const n of t){const f=v(a,n);f?c.array.has(n)&&N(f)&&!Object.keys(f).some(d=>!Number.isNaN(Number(d)))?ur(r.errors,{[n]:f},n):k(r.errors,n,f):U(r.errors,n)}r.errors={...r.errors}}else r.errors=a;return a},K=async({name:t,eventType:a})=>{if(e.validate){const n=await e.validate({formValues:u,formState:r,name:t,eventType:a});if(N(n))for(const f in n){const d=n[f];d&&Ee(`${pe}.${f}`,{message:M(d.message)?d.message:"",type:d.type||J.validate})}else M(n)||!n?Ee(pe,{message:n||"",type:J.validate}):Xe(pe);return n}return!0},q=async({fields:t,onlyCheckValid:a,name:n,eventType:f,context:d={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(d.runRootValidation=!0,!await K({name:n,eventType:f})&&(d.valid=!1,a)))return d.valid;for(const y in t){const h=t[y];if(h){const{_f:g,..._}=h;if(g){const V=c.array.has(g.name),L=h._f&&dt(h._f),z=A.validatingFields||A.isValidating||F.validatingFields||F.isValidating;L&&z&&S([g.name],!0);const Z=await hr(h,c.disabled,u,w,s.shouldUseNativeValidation&&!a,V);if(L&&z&&S([g.name]),Z[g.name]&&(d.valid=!1,a)||(!a&&(v(Z,g.name)?V?ur(r.errors,Z,g.name):k(r.errors,g.name,Z[g.name]):U(r.errors,g.name)),e.shouldUseNativeValidation&&Z[g.name]))break}!B(_)&&await q({context:d,onlyCheckValid:a,fields:_,name:y,eventType:f})}}return d.valid},we=()=>{for(const t of c.unMount){const a=v(i,t);a&&(a._f.refs?a._f.refs.every(n=>!Pe(n)):!Pe(a._f.ref))&&Le(t)}c.unMount=new Set},Y=(t,a)=>(t&&a&&k(u,t,a),!Q(o.mount?u:l,l)),ye=(t,a,n)=>st(t,c,{...o.mount?u:O(a)||M(t)?l:a},n,a),Pr=t=>Or(v(o.mount?u:l,t,s.shouldUnregister?v(l,t,[]):[])),Re=(t,a,n={},f=!1,d=!1,y=!1)=>{const h=v(i,t);let g=a;if(h){const _=h._f;_&&(!_.disabled&&k(u,t,Nr(a,_)),g=ke(_.ref)&&p(a)?"":a,Tr(_.ref)?[..._.ref.options].forEach(V=>V.selected=g.includes(V.value)):_.refs?me(_.ref)?_.refs.forEach(V=>{(!V.defaultChecked||!V.disabled)&&(Array.isArray(g)?V.checked=!!g.find(L=>L===V.value):V.checked=g===V.value||!!g)}):_.refs.forEach(V=>V.checked=V.value===g):Se(_.ref)?_.ref.value="":(_.ref.value=g,!_.ref.type&&!d&&!y&&b.state.next({name:t,values:f?u:C(u)})))}(n.shouldDirty||n.shouldTouch)&&D(t,g,n.shouldTouch,n.shouldDirty,!d),n.shouldValidate&&Ce(t,{delayError:n.delayError})},Ge=(t,a,n,f=!1,d=!1,y=!1)=>{c.array.has(t)&&b.array.next({name:t,values:f?u:C(u)});for(const h in a){if(!a.hasOwnProperty(h))continue;const g=a[h],_=t+"."+h,V=v(i,_);(c.array.has(t)||N(g)||V&&!V._f)&&!te(g)?Ge(_,g,n,f,d,y):Re(_,g,n,f,d,y)}},Ke=(t,a,n,f,d=!1)=>{const y=v(i,t),h=c.array.has(t),g=f?a:C(a),_=v(u,t),V=Q(_,g);if(V||k(u,t,g),h)b.array.next({name:t,values:f?u:C(u)}),(A.isDirty||A.dirtyFields||F.isDirty||F.dirtyFields)&&n.shouldDirty&&(ce(),d||b.state.next({name:t,dirtyFields:r.dirtyFields,isDirty:Y(t,g)}));else{const L=Array.isArray(g)&&!g.length||B(g),z=!V&&!d;!y||y._f||p(g)||L?Re(t,g,n,f,d,z):Ge(t,g,n,f,d,z)}if(!V&&!d){const L=Ue(t,c),z=f?u:C(u);if(b.state.next({...L&&r,name:o.mount||L?t:void 0,values:z}),!h)for(const Z of ft(c.array,t))b.state.next({name:Z,values:z})}},he=(t,a,n={})=>Ke(t,a,n,!1),pr=(t,a={})=>{const n=G(t)?t(u):t;if(!Q(u,n)){u={...u,...n};for(const f of c.mount)ot(n,f)&&Ke(f,v(n,f),a,!0,!0);b.state.next({...r,name:void 0,type:void 0,...T?{values:u}:{}}),a.shouldValidate&&P()}},Ze=async t=>{o.mount=!0;const a=t.target;let n=a.name,f=!0;const d=v(i,n),y=h=>{f=Number.isNaN(h)||te(h)&&isNaN(h.getTime())||Q(h,v(u,n,h))};if(d){let h,g;const _=a.type?Vr(d._f):Gr(t),V=t.type===oe.BLUR||t.type===oe.FOCUS_OUT,L=!yt(d._f)&&!e.validate&&!s.resolver&&!v(r.errors,n)&&!d._f.deps,z=L||vt(V,v(r.touchedFields,n),r.isSubmitted,j,H),Z=Ue(n,c,V);if(k(u,n,C(_)),V){if(!a||!a.readOnly){d._f.onBlur&&d._f.onBlur(t);const ve=m[n];ve&&ve(0)}}else d._f.onChange&&d._f.onChange(t);const ge=D(n,_,V),zr=!B(ge)||Z;if(!V&&b.state.next({name:n,type:t.type,...T?{values:C(u)}:{}}),z)return(!L||!r.isValid)&&(A.isValid||F.isValid)&&(s.mode==="onBlur"?V&&P():V||P()),zr&&b.state.next({name:n,...Z?{}:ge});if(!s.resolver&&e.validate&&await K({name:n,eventType:t.type}),!V&&Z&&b.state.next({...r}),s.resolver){const{errors:ve}=await R([n]);if(S([n]),y(_),!f){!B(ge)&&b.state.next(ge);return}const Yr=br(r.errors,i,n),or=br(ve,i,Yr.name||n);h=or.error,n=or.name,g=B(ve)}else S([n],!0),h=(await hr(d,c.disabled,u,w,s.shouldUseNativeValidation))[n],S([n]),y(_),f&&(h?g=!1:(A.isValid||F.isValid)&&(g=await q({fields:i,onlyCheckValid:!0,name:n,eventType:t.type})));f&&(d._f.deps&&(!Array.isArray(d._f.deps)||d._f.deps.length>0)&&Ce(d._f.deps),x(n,g,h,ge))}},Je=(t,a)=>{if(v(r.errors,a)&&t.focus)return t.focus(),1},Ce=async(t,a={})=>{let n,f;const d=xe(t);if(s.resolver){const y=await W(O(t)?t:d);n=B(y),f=t?!d.some(h=>v(y,h)):n}else t?(f=(await Promise.all(d.map(async y=>{const h=v(i,y);return await q({fields:h&&h._f?{[y]:h}:h,eventType:oe.TRIGGER})}))).every(Boolean),!(!f&&!r.isValid)&&P()):f=n=await q({fields:i,name:t,eventType:oe.TRIGGER});if(a.delayError&&s.delayError&&M(t)){const y=v(r.errors,t);y?(U(r.errors,t),m[t]=ee(t,()=>Ae(t,y)),m[t](s.delayError)):(clearTimeout(E[t]),delete m[t])}if(a.shouldTouch)for(const y of t?d:c.mount)!c.array.has(y)&&k(r.touchedFields,y,!0);return b.state.next({...!M(t)||(A.isValid||F.isValid)&&n!==r.isValid?{}:{name:t},...s.resolver||!t?{isValid:n}:{},...a.shouldTouch&&(A.touchedFields||F.touchedFields)?{touchedFields:r.touchedFields}:{},errors:r.errors}),a.shouldFocus&&!f&&Ve(i,Je,t?d:c.mount),f},Mr=(t,a)=>{let n={...o.mount?u:l};return a&&(n=Sr(a.dirtyFields?r.dirtyFields:r.touchedFields,n)),O(t)?n:M(t)?v(n,t):t.map(f=>v(n,f))},Br=t=>O(t)?{...r.errors}:M(t)?v(r.errors,t):t.map(a=>v(r.errors,a)),Qe=(t,a)=>{const n=a||r,f=v(n.errors,t);return{invalid:!!f,isDirty:!!v(n.dirtyFields,t),error:f,isValidating:!!v(r.validatingFields,t),isTouched:!!v(n.touchedFields,t)}},Xe=t=>{const a=t?xe(t):void 0;a?.forEach(n=>U(r.errors,n)),a?a.forEach(n=>{b.state.next({name:n,errors:r.errors})}):(r.errors={},b.state.next({errors:r.errors}))},Ee=(t,a,n)=>{const f=(v(i,t,{_f:{}})._f||{}).ref,d=v(r.errors,t)||{},{ref:y,message:h,type:g,..._}=d;k(r.errors,t,{..._,...a,ref:f}),b.state.next({name:t,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&f&&f.focus&&f.focus()},$r=(t,a)=>{if(G(t)){T++;const{unsubscribe:n}=b.state.subscribe({next:d=>"values"in d&&t(d.values||ye(void 0,a),d)});let f=!1;return{unsubscribe:()=>{f||(f=!0,T--,n())}}}return ye(t,a,!0)},er=t=>{var a;const n=!!(!((a=t.formState)===null||a===void 0)&&a.values);n&&T++;const{unsubscribe:f}=b.state.subscribe({next:y=>{if(gt(t.name,y.name,t.exact)&&ht(y,t.formState||A,nr,t.reRenderRoot)){const h={...u};t.callback({values:h,...r,...y,defaultValues:l})}}});if(!n)return f;let d=!1;return()=>{d||(d=!0,T--,f())}},Wr=t=>(o.mount=!0,F={...F,...t.formState},er({...t,formState:{...$,...t.formState}})),Le=(t,a={})=>{for(const n of t?xe(t):c.mount)c.mount.delete(n),c.array.delete(n),a.keepValue||(U(i,n),U(u,n)),!a.keepError&&U(r.errors,n),!a.keepDirty&&U(r.dirtyFields,n),!a.keepTouched&&U(r.touchedFields,n),!a.keepIsValidating&&U(r.validatingFields,n),!s.shouldUnregister&&!a.keepDefaultValue&&U(l,n);T&&b.state.next({values:C(u)}),b.state.next({...r,...a.keepDirty?{}:{isDirty:Y()}}),!a.keepIsValid&&P()},rr=({disabled:t,name:a})=>{if(re(t)&&o.mount||t||c.disabled.has(a)){const d=c.disabled.has(a)!==!!t;t?c.disabled.add(a):c.disabled.delete(a),d&&o.mount&&!o.action&&P()}},Ie=(t,a={})=>{let n=v(i,t);const f=re(a.disabled)||re(s.disabled),d=!c.registerName.has(t)&&n&&n._f&&!n._f.mount;return k(i,t,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:t}},name:t,mount:!0,...a}}),c.mount.add(t),n&&!d?rr({disabled:re(a.disabled)?a.disabled:s.disabled,name:t}):de(t,!0,a.value),{...f?{disabled:a.disabled||s.disabled}:{},...s.progressive?{required:!!a.required,min:_e(a.min),max:_e(a.max),minLength:_e(a.minLength),maxLength:_e(a.maxLength),pattern:_e(a.pattern)}:{},name:t,onChange:Ze,onBlur:Ze,ref:y=>{if(y){c.registerName.add(t),Ie(t,a),c.registerName.delete(t),n=v(i,t);const h=O(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,g=lt(h),_=n._f.refs||[];if(g?_.find(L=>L===h):h===n._f.ref)return;const V={...n._f};g?(V.refs=[..._.filter(Pe),h,...Array.isArray(v(l,t))?[{}]:[]],V.ref={type:h.type,name:t}):(V.ref=h,delete V.refs),k(i,t,{_f:V}),de(t,!1,void 0,h)}else n=v(i,t,{}),n._f&&(n._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(Zr(c.array,t)&&o.action)&&c.unMount.add(t)}}},Ne=()=>s.shouldFocusError&&!s.shouldUseNativeValidation&&Ve(i,Je,c.mount),qr=t=>{re(t)&&(b.state.next({disabled:t}),Ve(i,(a,n)=>{const f=v(i,n);f&&(a.disabled=f._f.disabled||t,Array.isArray(f._f.refs)&&f._f.refs.forEach(d=>{d.disabled=f._f.disabled||t}))},0,!1))},tr=(t,a)=>async n=>{let f,d;n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let y=C(u);if(b.state.next({isSubmitting:!0}),s.resolver){const{errors:h,values:g}=await R();S(),r.errors=h,y=C(g)}else await q({fields:i,eventType:oe.SUBMIT});if(c.disabled.size)for(const h of c.disabled)U(y,h);if(U(r.errors,Dr),B(r.errors)){b.state.next({errors:{}});try{f=await t(y,n)}catch(h){d=h}}else a&&await a({...r.errors},n),Ne(),setTimeout(Ne);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:B(r.errors)&&!d,submitCount:r.submitCount+1,errors:r.errors}),d)throw d;return f},Hr=(t,a={})=>{v(i,t)&&(O(a.defaultValue)?he(t,C(v(l,t))):(he(t,a.defaultValue),k(l,t,C(a.defaultValue))),a.keepTouched||U(r.touchedFields,t),a.keepDirty||(U(r.dirtyFields,t),r.isDirty=a.defaultValue?Y(t,C(v(l,t))):Y()),a.keepError||(U(r.errors,t),P()),b.state.next({...r}))},sr=(t,a={})=>{const n=t?C(t):l,f=C(n),d=B(t),y=f,h=i;if(a.keepDefaultValues||(l=n),!a.keepValues){if(a.keepDirtyValues){const g=new Set([...c.mount,...Rr(ie(l,u,void 0,h),r.dirtyFields)]);for(const _ of g){const V=v(r.dirtyFields,_),L=v(u,_),z=v(y,_);V&&!O(L)?k(y,_,L):!V&&!O(z)&&he(_,z)}}else{if(Te&&O(t))for(const g of c.mount){const _=v(i,g);if(_&&_._f){const V=Array.isArray(_._f.refs)?_._f.refs[0]:_._f.ref;if(ke(V)){const L=V.closest("form");if(L){L.reset();break}}}}if(a.keepFieldsRef)for(const g of c.mount)he(g,v(y,g));else i={}}if(s.shouldUnregister){if(u=a.keepDefaultValues?C(l):{},a.keepFieldsRef)for(const g of c.mount)k(u,g,v(y,g))}else u=C(y);b.array.next({values:{...y}}),b.state.next({name:void 0,type:void 0,values:{...y}})}c={mount:a.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!A.isValid||!!a.keepIsValid||!!a.keepDirtyValues||!s.shouldUnregister&&!B(y),o.watch=!!s.shouldUnregister,o.keepIsValid=!!a.keepIsValid,o.action=!1,o.actionArrayLengths.clear(),a.keepErrors||(r.errors={}),b.state.next({submitCount:a.keepSubmitCount?r.submitCount:0,isDirty:d?!1:a.keepDirty?r.isDirty:a.keepValues?Y():!!(a.keepDefaultValues&&!Q(t,l)),isSubmitted:a.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:d?{}:a.keepDirtyValues?a.keepDefaultValues&&u?ie(l,u,void 0,h):r.dirtyFields:a.keepDefaultValues&&t?ie(l,t,void 0,h):a.keepDirty?r.dirtyFields:{},touchedFields:a.keepTouched?r.touchedFields:{},errors:a.keepErrors?r.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:l})},ir=(t,a)=>sr(G(t)?t(u):t,{...s.resetOptions,...a}),jr=(t,a={})=>{const n=v(i,t),f=n&&n._f;if(f){const d=f.refs?f.refs[0]:f.ref;d.focus&&setTimeout(()=>{d.focus(),a.shouldSelect&&G(d.select)&&d.select()})}},nr=t=>{const{name:a,type:n,values:f,...d}=t;r={...r,...d}};b.state.subscribe({next:nr});const ar={control:{register:Ie,unregister:Le,getFieldState:Qe,handleSubmit:tr,setError:Ee,_subscribe:er,_runSchema:R,_updateIsValidating:S,_focusError:Ne,_getWatch:ye,_getDirty:Y,_setValid:P,_setFieldArray:be,_setDisabledField:rr,_setErrors:ae,_getFieldArray:Pr,_reset:sr,_resetDefaultValues:()=>G(s.defaultValues)&&s.defaultValues().then(t=>{ir(t,s.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:we,_disableForm:qr,_subjects:b,_proxyFormState:A,get _fields(){return i},get _formValues(){return u},get _state(){return o},set _state(t){o=t},get _defaultValues(){return l},get _names(){return c},set _names(t){c=t},get _formState(){return r},get _options(){return s},set _options(t){s={...s,...t},H=De(s.mode),j=De(s.reValidateMode)}},subscribe:Wr,trigger:Ce,register:Ie,handleSubmit:tr,watch:$r,setValue:he,setValues:pr,getValues:Mr,getErrors:Br,reset:ir,resetField:Hr,resetDefaultValues:(t,a={})=>{if(l=C(t),!a.keepDirty){const n=ie(l,u,void 0,i);r.dirtyFields=n,r.isDirty=!B(n)}a.keepIsValid||P(),b.state.next({...r,defaultValues:l})},clearErrors:Xe,unregister:Le,setError:Ee,setFocus:jr,getFieldState:Qe};return{...ar,formControl:ar}}function kt(e={}){const s=I.useRef(void 0),r=I.useRef(void 0),i=I.useRef(e.formControl),[l,u]=I.useState(()=>({...C(Ur),isLoading:G(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:G(e.defaultValues)?void 0:e.defaultValues}));if(!s.current||e.formControl&&i.current!==e.formControl)if(i.current=e.formControl,e.formControl)s.current={...e.formControl,formState:l},e.defaultValues&&!G(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:E,...T}=bt(e);s.current={...T,formState:l}}const o=s.current.control;o._options=e;const{resyncIfNeeded:c,snapshot:m}=tt();return et(()=>{const E=()=>({...o._formState,defaultValues:o._defaultValues});c(!0,E,u);const T=o._subscribe({formState:o._proxyFormState,callback:()=>u({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return u(H=>({...H,isReady:!0})),o._formState.isReady=!0,()=>{T(),m(!0,E)}},[o,c,m]),I.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),I.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),I.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),I.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),I.useEffect(()=>{if(o._proxyFormState.isDirty){const E=o._getDirty();E!==l.isDirty&&o._subjects.state.next({isDirty:E})}},[o,l.isDirty]),I.useEffect(()=>{var E;e.values&&!Q(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((E=o._options.resetOptions)===null||E===void 0)&&E.keepIsValid||o._setValid(),r.current=e.values,u(T=>({...T}))):o._resetDefaultValues()},[o,e.values]),I.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),s.current.formState=I.useMemo(()=>Xr(l,o),[o,l]),s.current}const Ar=(e,s,r)=>{if(e&&"reportValidity"in e){const i=v(r,s);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},We=(e,s)=>{for(const r in s.fields){const i=s.fields[r];i&&i.ref&&"reportValidity"in i.ref?Ar(i.ref,r,e):i&&i.refs&&i.refs.forEach(l=>Ar(l,r,e))}},Fr=(e,s)=>{s.shouldUseNativeValidation&&We(e,s);const r={};for(const i in e){const l=v(s.fields,i),u=Object.assign(e[i]||{},{ref:l&&l.refs?l.refs[0]:l&&l.ref});if(At(s.names||Object.keys(e),i)){const o=Object.assign({},v(r,i));k(o,"root",u),k(r,i,o)}else k(r,i,u)}return r},At=(e,s)=>{const r=wr(s).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(i=>wr(i).match(`^${r}\\.\\d+`))};function wr(e){return e.replace(/\[(\d+)]/g,".$1").replace(/[[\]]/g,"")}function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var r=arguments[s];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},qe.apply(null,arguments)}function Er(e,s){try{var r=e()}catch(i){return s(i)}return r&&r.then?r.then(void 0,s):r}function Ft(e,s){for(var r=Object.create(null);e.length;){var i=e[0],l=i.code,u=i.message,o=i.path.join(".");if(!r[o])if("unionErrors"in i){var c,m,E=i.unionErrors.reduce(function(j,$){return $.errors.length<j.errors.length?$:j}).errors[0];r[o]={message:(c=E?.message)!=null?c:u,type:(m=E?.code)!=null?m:l}}else r[o]={message:u,type:l};if("unionErrors"in i&&i.unionErrors.forEach(function(j){return j.errors.forEach(function($){return e.push($)})}),s){var T=r[o].types,H=T&&T[i.code];r[o]=Ye(o,s,r,l,H?[].concat(H,i.message):i.message)}e.shift()}return r}function wt(e,s){for(var r=Object.create(null),i=function(){var l=e[0],u=l.code,o=l.message,c=l.path.join(".");if(!r[c])if(l.code==="invalid_union"&&l.errors.length>0){var m,E,T=l.errors.reduce(function($,A){return A.length<$.length?A:$})[0];r[c]={message:(m=T?.message)!=null?m:o,type:(E=T?.code)!=null?E:u}}else r[c]={message:o,type:u};if(l.code==="invalid_union"&&l.errors.forEach(function($){return $.forEach(function(A){return e.push(qe({},A,{path:[].concat(l.path,A.path)}))})}),s){var H=r[c].types,j=H&&H[l.code];r[c]=Ye(c,s,r,u,j?[].concat(j,l.message):l.message)}e.shift()};e.length;)i();return r}function Ot(e,s,r){if(r===void 0&&(r={}),(function(i){return"_zod"in i&&typeof i._zod=="object"})(e))return function(i,l,u){try{return Promise.resolve(Er(function(){function o(m){return u.shouldUseNativeValidation&&We({},u),{errors:{},values:r.raw?Object.assign({},i):m}}var c=e;return r.mode==="sync"?o(c.parse(i,s)):Promise.resolve(c.parseAsync(i,s)).then(o)},function(o){if((function(c){var m;return!(c==null||(m=c._zod)==null||(m=m.traits)==null||!m.has("$ZodError"))})(o))return{values:{},errors:Fr(wt(o.issues,!u.shouldUseNativeValidation&&u.criteriaMode==="all"),u)};throw o}))}catch(o){return Promise.reject(o)}};if((function(i){return"_def"in i&&typeof i._def=="object"})(e))return function(i,l,u){try{return Promise.resolve(Er(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](i,s)).then(function(o){return u.shouldUseNativeValidation&&We({},u),{errors:{},values:r.raw?Object.assign({},i):o}})},function(o){if((function(c){return Array.isArray(c?.issues)})(o))return{values:{},errors:Fr(Ft(o.errors,!u.shouldUseNativeValidation&&u.criteriaMode==="all"),u)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}export{Ot as a,kt as u};
@@ -21,8 +21,8 @@
21
21
  </script>
22
22
  <link rel="icon" href="/mark.svg" type="image/svg+xml" />
23
23
  <title>Snagset</title>
24
- <script type="module" crossorigin src="/assets/index-DMCyFEmS.js"></script>
25
- <link rel="stylesheet" crossorigin href="/assets/index-D6Jv0m8R.css">
24
+ <script type="module" crossorigin src="/assets/index-B1JGVSdd.js"></script>
25
+ <link rel="stylesheet" crossorigin href="/assets/index-CpG77B7f.css">
26
26
  </head>
27
27
  <body>
28
28
  <div id="app"></div>
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "0.1.35",
3
- "cv": "0.1.35+e49887"
2
+ "version": "0.1.37",
3
+ "cv": "0.1.37+5397de"
4
4
  }
@@ -1,4 +1,4 @@
1
- const Me="Snagset",H="snagset",T="snagset.v1",Ze="Snagset",Pe="Snag",Ie="Snags",Ue={root:"data-snag-root"},j=e=>Ue[e],Be={anchor:"data-snag-anchor",ignore:"data-snag-ignore",mask:"data-snag-mask",nomask:"data-snag-nomask",src:"data-snag-src",component:"data-snag-component"},A=e=>Be[e],We={mask:"snag-mask",block:"snag-block"},q=e=>We[e],d={font:"--snag-font",accent:"--snag-accent",onAccent:"--snag-onAccent",bg:"--snag-bg",fg:"--snag-fg",muted:"--snag-muted",border:"--snag-border",radius:"--snag-radius",shadow:"--snag-shadow",z:"--snag-z",motion:"--snag-motion",surface:"--snag-surface",sunken:"--snag-sunken",hover:"--snag-hover",focus:"--snag-focus",disabled:"--snag-disabled",statusOpen:"--snag-status-open",statusProgress:"--snag-status-progress",statusReview:"--snag-status-review",statusResolved:"--snag-status-resolved",anchorOrphan:"--snag-anchor-orphan",tbH:"--snag-tb-h",dockW:"--snag-dock-w",kb:"--snag-kb",thumbX:"--snag-thumb-x",thumbW:"--snag-thumb-w"},He=e=>`var(${d[e]})`,C={query:["snag_t","snag_off","snag_debug","snag_theme"],fragment:["snag_k"]},je="snag:disclosure:v1",qe="snag:identity",Fe="data-snag-theme",Ve={session:e=>`snag:session:${e}`,silent:e=>`snag:silent:${e}`,identity:qe,threads:(e,t)=>`snag:threads:${e}:${t}`,seen:(e,t)=>`snag:seen:${e}:${t}`,counts:e=>`snag:counts:${e}`,list:(e,t)=>`snag:list:${e}:${t}`,draft:(e,t)=>`snag:draft:${e}:${t}`,outbox:e=>`snag:outbox:${e}`,mode:"snag:mode",handoff:"snag:handoff",seenCoach:"snag:seen-coach",disclosure:je},z={database:"snag:blobs",store:"blobs"},Ke={route:"snagset:route"};function Xe(e,t){let n="Unknown";/Edg\//.test(e)?n="Edge":/OPR\//.test(e)?n="Opera":/Firefox\//.test(e)?n="Firefox":/Chrome\//.test(e)?n="Chrome":/Safari\//.test(e)&&(n="Safari");let r="";if(/Macintosh/.test(e)?r="macOS":/Windows/.test(e)?r="Windows":/iPhone|iPad/.test(e)?r="iOS":/Android/.test(e)?r="Android":/Linux/.test(e)&&(r="Linux"),t?.brands?.length){const s=t.brands.find(i=>!/Not.?A.?Brand/i.test(i.brand));s&&(n=s.brand)}t?.platform&&(r=t.platform);let a=!1;try{a=typeof matchMedia=="function"&&matchMedia("(pointer:coarse)").matches}catch{}const o=t?.mobile??(a||/Mobi|iPhone|Android/.test(e))?"Mobile":"Desktop";return{browser:n,os:r,device:o}}const Ye={ok:{status:"ok"},release:{status:"disabled",reason:"Screenshots are not available in this release."},"config-off":{status:"disabled",reason:"Screenshots are switched off for this project."},"feature-off":{status:"disabled",reason:"Screenshots are switched off for this project."},"reviewer-removed":{status:"disabled",reason:"You removed the screenshot before sending."},"csp-blocked":{status:"failed",reason:"Your Content-Security-Policy blocks data: images, so no screenshot could be taken."},"engine-load-failed":{status:"failed",reason:"The screenshot engine could not be loaded."},"engine-failed":{status:"failed",reason:"The screenshot engine failed on this page."},timeout:{status:"timeout",reason:"The screenshot timed out."},tainted:{status:"tainted",reason:"A cross-origin image made the page canvas unreadable."},"scope-forced":{status:"ok",reason:"The page was too large to capture in full; captured the area around your pin."},"masking-failed":{status:"failed",reason:"Masking could not be verified, so the screenshot was discarded."},navigated:{status:"failed",reason:"The page changed while the screenshot was being taken."}},Qe={disabled:"Console and network capture is off for this project.",truncated:"Earlier console and network entries were dropped to fit the buffer."};function v(e={}){const t=Ye[e.screenshot??"release"],n=e.breadcrumbs??"disabled",r=[];t.reason&&r.push(t.reason),n!=="ok"&&r.push(Qe[n]);const a={screenshot:t.status,breadcrumbs:n,reasons:r};return e.blindSpots?.length&&(a.blindSpots=e.blindSpots),e.droppedCategories?.length&&(a.droppedCategories=e.droppedCategories),e.maskedCount!==void 0&&e.maskedCount>0&&(a.maskedCount=e.maskedCount),a}function Je(e,t,n,r=!1){const a=e.capture?.breadcrumbs??"disabled";if(n){e.capture=v({screenshot:"config-off",breadcrumbs:a});return}if(r&&!t){e.capture=v({screenshot:"reviewer-removed",breadcrumbs:a});return}t&&(e.capture=v({screenshot:t.situation,breadcrumbs:a,...t.blindSpots.length?{blindSpots:t.blindSpots}:{},...t.maskedCount>0?{maskedCount:t.maskedCount}:{}}))}const Ge="pass(?:word|wd)?|pwd|secret|token|api[_-]?key|apikey|auth(?:orization)?|credential|session|sid|cookie|jwt|bearer|otp|mfa|totp|cvv|cvc|ssn|nino|iban|card(?:[_-]?number)?|account[_-]?number|private[_-]?key|signature|client[_-]?secret|refresh[_-]?token|access[_-]?token",et=new RegExp(`(["'\`]?)(?<![A-Za-z0-9])(?:${Ge})[\\w-]*\\b\\1?\\s*[:=]\\s*(?:(["'\`])((?:\\\\.|(?!\\2)[^\\\\])*)\\2|([^\\s,;&}\\])]{3,}))`,"gi"),tt=/^(?:Bearer|Basic|Digest|Negotiate|Token)$/i,nt=(e,t,n,r,a,o,s)=>{if(!n&&tt.test(a)&&s.slice(o+e.length).startsWith(" [redacted]")||(n?r:a).startsWith("[redacted"))return e;const i=n?`${n}${r}${n}`:a;return e.slice(0,e.length-i.length)+(n?`${n}[redacted]${n}`:"[redacted]")},F=/data:[a-z0-9.+-]*\/?[a-z0-9.+-]*;base64,[A-Za-z0-9+/=]{16,}/gi,V=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{0,}/g,K=/\b(sk-[A-Za-z0-9]+-[A-Za-z0-9_-]{20,}|sk-ant-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{20,}|(sk|pk|rk)_(live|test)_[A-Za-z0-9]{16,}|gh[pousr]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{20,}|glpat-[A-Za-z0-9_-]{16,}|xox[baprs]-[A-Za-z0-9-]{10,}|xapp-[A-Za-z0-9-]{10,}|AKIA[0-9A-Z]{16}|ASIA[0-9A-Z]{16}|AIza[0-9A-Za-z_-]{35}|ya29\.[A-Za-z0-9_-]{20,}|SG\.[A-Za-z0-9_-]{20,}|npm_[A-Za-z0-9]{30,}|dop_v1_[a-f0-9]{40,}|shpat_[a-f0-9]{30,}|sbp_[a-f0-9]{30,}|hf_[A-Za-z0-9]{30,}|nvapi-[A-Za-z0-9_-]{20,})\b/g,rt=/\b(Bearer|Basic|Digest|Negotiate|Token)\s+[A-Za-z0-9._~+/=-]{8,}/gi,X=/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z]{2,24})+\b/g,R=/\b(?:\d[ -]?){12,18}\d\b/g,Y=/\b(?=[A-Za-z0-9+/]*[a-z])(?=[A-Za-z0-9+/]*[A-Z])(?=[A-Za-z0-9+/]*\d)[A-Za-z0-9+/]{40,}={0,2}\b/g,Q=/\b[0-9a-f]{32,}\b/gi,J=/\b(?=[A-Za-z0-9_-]*[a-z])(?=[A-Za-z0-9_-]*[A-Z])(?=[A-Za-z0-9_-]*\d)[A-Za-z0-9_-]{40,}\b/g,G=/\b[a-z][a-z0-9]{1,15}(?:_[a-z0-9]{1,15}){0,2}_(?=[A-Za-z0-9_-]*[A-Z])(?=[A-Za-z0-9_-]*\d)[A-Za-z0-9_-]{24,}\b/g,ee=/\b[a-z][a-z0-9+.-]*:\/\/[^\s/:@]+:[^\s/@]+@/gi,at=/^(?=[A-Za-z0-9_~.+/=-]*[a-z])(?=[A-Za-z0-9_~.+/=-]*[A-Z])(?=[A-Za-z0-9_~.+/=-]*\d)[A-Za-z0-9_~.+/=-]{24,}$/;function y(e,t){e.lastIndex=0;const n=e.test(t);return e.lastIndex=0,n}function te(e){const t=e.replace(/[ -]/g,"");if(t.length<13||t.length>19)return!1;let n=0,r=!1;for(let a=t.length-1;a>=0;a--){let o=t.charCodeAt(a)-48;r&&(o*=2,o>9&&(o-=9)),n+=o,r=!r}return n%10===0}function ot(e){R.lastIndex=0;for(const t of e.matchAll(R))if(te(t[0]))return!0;return!1}function E(e){let t=e;return t=t.replace(F,"data:[redacted]"),t=t.replace(rt,"$1 [redacted]"),t=t.replace(et,nt),t=t.replace(V,"[redacted:jwt]"),t=t.replace(K,"[redacted:key]"),t=t.replace(G,"[redacted:key]"),t=t.replace(ee,"[redacted:url-cred]@"),t=t.replace(X,"[redacted:email]"),t=t.replace(R,n=>te(n)?"[redacted:card]":n),t=t.replace(J,n=>`[redacted:b64:${n.length}]`),t=t.replace(Y,n=>`[redacted:b64:${n.length}]`),t=t.replace(Q,n=>`[redacted:hex:${n.length}]`),t}const st=C.query,it=C.fragment;function ne(e,t=[]){let n;try{const r=globalThis.location?.href;n=new URL(e,r)}catch{return E(e)}n.username="",n.password="";for(const r of[...n.searchParams.keys()]){if(it.includes(r)){n.searchParams.set(r,"[redacted]");continue}if(st.includes(r))continue;if(!t.includes(r)){n.searchParams.set(r,"[redacted]");continue}const a=n.searchParams.get(r)??"";E(a)!==a&&n.searchParams.set(r,"[redacted]")}return n.hash&&n.hash.length>1&&(n.hash=t.includes("#")?n.hash:"#[redacted]"),E(n.toString().replace(/%5Bredacted%5D/gi,"[redacted]"))}function O(e){return e.length>120?!0:y(X,e)||y(V,e)||y(K,e)||y(Q,e)||y(Y,e)||y(F,e)||y(J,e)||y(G,e)||y(ee,e)||at.test(e)||ot(e)}const ct=/^eyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/,lt=/^[a-f0-9]{32,}$/i,dt=/^(?=[A-Za-z0-9_-]{24,}$)(?=.*[A-Za-z])(?=.*\d)[A-Za-z0-9_-]+$/,ut="[redacted]";function ht(e){return e.includes("/")?e.split("/").map(t=>ct.test(t)||lt.test(t)||dt.test(t)?ut:t).join("/"):e}const ft=/\/index\.(html?|php)$/i;function gt(e){if(!e.startsWith("/"))return e;let t=e.replace(ft,"/");return t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t.toLowerCase()}function re(e){try{const t=e.querySelector(`meta[name="${Ke.route}"]`)?.getAttribute("content")?.trim();return!t||t.length>512||!t.startsWith("/")?null:t}catch{return null}}const mt=[/^utm_/,/^(gclid|gbraid|wbraid|fbclid|msclkid|ttclid|twclid|igshid|yclid|li_fat_id)$/,/^(mc_cid|mc_eid|_hsenc|_hsmi|vero_id|oly_enc_id|oly_anon_id)$/,/^_vercel_/,/^__vercel_/,/^_rsc$/],pt=[...C.query,...C.fragment];function bt(e,t=[]){return pt.includes(e)||t.includes(e)?!0:mt.some(n=>n.test(e))}function wt(e,t={}){const n=t.significantQueryParams??[];if(n!=="*"&&n.length===0)return;let r;try{r=new URLSearchParams(e)}catch{return}const a={};for(const[o,s]of r)bt(o,t.ignoredQueryParams??[])||n!=="*"&&!n.includes(o)||(a[o]=s);return Object.keys(a).length>0?a:void 0}function ae(e,t){const n=e.length>4096?e.slice(0,4096):e,r=ne(n,t);return r.length<=2048?r:r.slice(0,2048)+`\u2026[+${r.length-2048}]`}function yt(e=location,t={}){const n=ht(e.pathname),r=t.routeOverride??(t.doc?re(t.doc):typeof document<"u"?re(document):null),a=wt(e.search??"",t.query);return{route:gt(r??n),pathname:n,...a?{query:a}:{},origin:e.origin}}function $t(){try{return typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches}catch{return!1}}function xt(e){const t=e.urlParamAllowList??[];let n;try{n=ae(location.href,t)}catch{try{n=ae(document.URL,t)}catch{n=E(location.origin+location.pathname)}}let r=innerWidth,a=innerHeight;(r===0||a===0)&&(r=document.documentElement.clientWidth,a=document.documentElement.clientHeight);let o={w:0,h:0};try{o={w:screen.width,h:screen.height}}catch{}const s=navigator.userAgent||"",i=navigator.userAgentData,l=i?{brands:(i.brands??[]).map(u=>({brand:u.brand,version:u.version})),platform:i.platform,mobile:i.mobile}:void 0,h={schemaVersion:T,url:n,page:e.page,viewport:{w:r,h:a,dpr:devicePixelRatio||1},screen:o,ua:s,derived:Xe(s,l),language:navigator.language||navigator.languages?.[0]||"en",prefersColorScheme:$t()?"dark":"light",timestamp:new Date().toISOString(),capture:v({breadcrumbs:e.breadcrumbs?.status??"disabled"})};return l&&(h.uaData=l),e.breadcrumbs&&e.breadcrumbs.status!=="disabled"&&(h.breadcrumbs=e.breadcrumbs.records),h}const At={product:Me,set:Ze,item:Pe,items:Ie};function oe(e){return(t,n)=>(e[t]??"").replace(/\{(\w+)\}/g,(r,a)=>{const o=n?.[a]??At[a];return o===void 0?r:String(o)})}const se=e=>new Intl.NumberFormat().format(e),ie=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(t)},ce={"where.anchored":"{label}","where.approximate":"position approximate \u2014 the page changed","where.orphaned":"moved \u2014 the element is gone","status.open":"Active","status.progress":"In progress","status.review":"In review","status.resolved":"Resolved","author.unknown":"Someone","label.image":"an image","label.link":"a link","label.button":"a button","label.tag":"the {tag}"},S=oe(ce),vt={"detail.details":"Anchor details","detail.hidden":"This element isn't visible right now \u2014 it may be inside a closed menu, tab, or accordion.","detail.orphaned":"The element this was pinned to has moved or gone \u2014 it was {label}.","detail.approximate":"The page changed since this was written, so the pin is close rather than exact \u2014 it points at {label}.","detail.unavailable":"Some of the matching steps couldn't load, so this was judged with the basic ones only.","detail.filedat":"Filed at {query}.","detail.openquery":"Open with original query","capture.agent":"{browser} \xB7 {os}","capture.agent.noos":"{browser}","capture.device":"{device} \xB7 {w}\xD7{h} @{dpr}x","capture.device.at1x":"{device} \xB7 {w}\xD7{h}"},Et={"export.title":"{product} \u2014 {origin}","export.summary.one":"1 comment, {unresolved} unresolved \xB7 exported {date}","export.summary.many":"{total} comments, {unresolved} unresolved \xB7 exported {date}","export.heading":"{n} \xB7 {key} \u2014 {status}","export.on":"On {label}","export.device":"Device","export.selector":"Selector","export.by":"By","export.nobody":"_(no comment)_","cursor.proxy":"Pick an element \u2014 Tab to move, Enter to comment","cursor.at":"{role}, {name}, {i} of {n}","cursor.here":"{role} {name}","export.screenshot":"Screenshot {key}","label.text":"\u201C{text}\u201D","hint.fine":"Click anything to comment \u2014 Esc when done","hint.coarse":"Tap anything to comment","highlight.chip":"{tag} \xB7 {name} \xB7 {w}\xD7{h}","highlight.chip.unnamed":"{tag} \xB7 {w}\xD7{h}"},f=oe({...ce,...vt,...Et}),St=[`[${A("mask")}]`,`.${q("mask")}`,`.${q("block")}`].join(", ");function le(e,t){return O(t)||!!e.closest?.(St)}function de(e){const n=(e.innerText??e.textContent??"").slice(0,512).trim().replace(/\s+/g," ");if(n&&!le(e,n))return f("label.text",{text:n.length>52?n.slice(0,52)+"\u2026":n});const r=e.tagName.toLowerCase();return r==="img"?f("label.image"):r==="a"?f("label.link"):r==="button"?f("label.button"):f("label.tag",{tag:r})}function _t(e,t){const n=t.trim().replace(/\s+/g," ");return n&&!le(e,n)?f("label.text",{text:n.length>52?n.slice(0,52)+"\u2026":n}):de(e)}const ue={open:{colour:"#4f6ef7"},progress:{colour:"#f59e0b"},review:{colour:"#8b5cf6"},resolved:{colour:"#10b981"}},kt=e=>e in ue?S(`status.${e}`):e;class Tt extends Error{code;constructor(t,n){super(n??t),this.name="AdapterError",this.code=t}}function he(e,t){const{anchorPending:n,anchorReasons:r,screenshotBlob:a,...o}=e;return o.attachments?.length&&t?.size&&(o.attachments=o.attachments.map(s=>{const i=t.get(s.id);return i?{...s,url:i}:s})),o}function fe(e){const t=e.context,n=t?.derived,r=t?.viewport;if(!t||!n||!r)return"";const a=Math.round(r.dpr*100)/100,o=n.os?f("capture.agent",{browser:n.browser,os:n.os}):f("capture.agent.noos",{browser:n.browser}),s=a===1?f("capture.device.at1x",{device:n.device,w:r.w,h:r.h}):f("capture.device",{device:n.device,w:r.w,h:r.h,dpr:a});return`${o} \xB7 ${s}`}function Ct(e,t,n){const r=e.map(l=>he(l,n)),a=r.filter(l=>l.status!=="resolved").length,o=[],s=[`# ${f("export.title",{origin:t.origin})}`,"",f(r.length===1?"export.summary.one":"export.summary.many",{total:se(r.length),unresolved:se(a),date:ie(t.exportedAt)})],i=new Map;for(const l of r)i.set(l.route,[...i.get(l.route)??[],l]);for(const[l,h]of i)s.push("","---","",`## ${l}`),h.forEach((u,b)=>{const m=u.comments[0];s.push("",`### ${f("export.heading",{n:b+1,key:u.key,status:kt(u.status)})}`,"",`**${f("export.on",{label:u.anchor.label})}**`,...u.anchorState==="anchored"?[]:[f(`detail.${u.anchorState}`,{label:u.anchor.label})],...u.anchor.css?[`**${f("export.selector")}** \`${u.anchor.css}\``]:[],...fe(u)?[`**${f("export.device")}** ${fe(u)}`]:[],`**${f("export.by")}** ${m?.author.name??u.createdBy.name} \xB7 ${ie(u.createdAt)}`,"",m?.body??f("export.nobody"));for(const c of u.attachments??[])c.url.startsWith("data:")&&(s.push("",`![${f("export.screenshot",{key:u.key})}][${c.id}]`),o.push(`[${c.id}]: ${c.url}`));for(const c of u.comments.slice(1))s.push("",`- **${c.author.name}** \u2014 ${c.body??""}`)});return o.length&&s.push("","---","",...o),s.join(`
1
+ const Me="Snagset",H="snagset",T="snagset.v1",Ze="Snagset",Pe="Snag",Ie="Snags",Ue={root:"data-snag-root"},j=e=>Ue[e],Be={anchor:"data-snag-anchor",ignore:"data-snag-ignore",mask:"data-snag-mask",nomask:"data-snag-nomask",src:"data-snag-src",component:"data-snag-component"},A=e=>Be[e],We={mask:"snag-mask",block:"snag-block"},q=e=>We[e],d={font:"--snag-font",accent:"--snag-accent",onAccent:"--snag-onAccent",bg:"--snag-bg",fg:"--snag-fg",muted:"--snag-muted",border:"--snag-border",radius:"--snag-radius",shadow:"--snag-shadow",z:"--snag-z",motion:"--snag-motion",surface:"--snag-surface",sunken:"--snag-sunken",hover:"--snag-hover",focus:"--snag-focus",disabled:"--snag-disabled",statusOpen:"--snag-status-open",statusProgress:"--snag-status-progress",statusReview:"--snag-status-review",statusResolved:"--snag-status-resolved",anchorOrphan:"--snag-anchor-orphan",tbH:"--snag-tb-h",dockW:"--snag-dock-w",kb:"--snag-kb",thumbX:"--snag-thumb-x",thumbW:"--snag-thumb-w"},He=e=>`var(${d[e]})`,C={query:["snag_t","snag_off","snag_debug","snag_theme"],fragment:["snag_k"]},je="snag:disclosure:v1",qe="snag:identity",Fe="data-snag-theme",Ve={session:e=>`snag:session:${e}`,silent:e=>`snag:silent:${e}`,identity:qe,threads:(e,t)=>`snag:threads:${e}:${t}`,seen:(e,t)=>`snag:seen:${e}:${t}`,filter:(e,t)=>`snag:filter:${e}:${t}`,counts:e=>`snag:counts:${e}`,list:(e,t)=>`snag:list:${e}:${t}`,draft:(e,t)=>`snag:draft:${e}:${t}`,outbox:e=>`snag:outbox:${e}`,mode:"snag:mode",handoff:"snag:handoff",seenCoach:"snag:seen-coach",disclosure:je},z={database:"snag:blobs",store:"blobs"},Ke={route:"snagset:route"};function Xe(e,t){let n="Unknown";/Edg\//.test(e)?n="Edge":/OPR\//.test(e)?n="Opera":/Firefox\//.test(e)?n="Firefox":/Chrome\//.test(e)?n="Chrome":/Safari\//.test(e)&&(n="Safari");let r="";if(/Macintosh/.test(e)?r="macOS":/Windows/.test(e)?r="Windows":/iPhone|iPad/.test(e)?r="iOS":/Android/.test(e)?r="Android":/Linux/.test(e)&&(r="Linux"),t?.brands?.length){const s=t.brands.find(i=>!/Not.?A.?Brand/i.test(i.brand));s&&(n=s.brand)}t?.platform&&(r=t.platform);let a=!1;try{a=typeof matchMedia=="function"&&matchMedia("(pointer:coarse)").matches}catch{}const o=t?.mobile??(a||/Mobi|iPhone|Android/.test(e))?"Mobile":"Desktop";return{browser:n,os:r,device:o}}const Ye={ok:{status:"ok"},release:{status:"disabled",reason:"Screenshots are not available in this release."},"config-off":{status:"disabled",reason:"Screenshots are switched off for this project."},"feature-off":{status:"disabled",reason:"Screenshots are switched off for this project."},"reviewer-removed":{status:"disabled",reason:"You removed the screenshot before sending."},"csp-blocked":{status:"failed",reason:"Your Content-Security-Policy blocks data: images, so no screenshot could be taken."},"engine-load-failed":{status:"failed",reason:"The screenshot engine could not be loaded."},"engine-failed":{status:"failed",reason:"The screenshot engine failed on this page."},timeout:{status:"timeout",reason:"The screenshot timed out."},tainted:{status:"tainted",reason:"A cross-origin image made the page canvas unreadable."},"scope-forced":{status:"ok",reason:"The page was too large to capture in full; captured the area around your pin."},"masking-failed":{status:"failed",reason:"Masking could not be verified, so the screenshot was discarded."},navigated:{status:"failed",reason:"The page changed while the screenshot was being taken."}},Qe={disabled:"Console and network capture is off for this project.",truncated:"Earlier console and network entries were dropped to fit the buffer."};function v(e={}){const t=Ye[e.screenshot??"release"],n=e.breadcrumbs??"disabled",r=[];t.reason&&r.push(t.reason),n!=="ok"&&r.push(Qe[n]);const a={screenshot:t.status,breadcrumbs:n,reasons:r};return e.blindSpots?.length&&(a.blindSpots=e.blindSpots),e.droppedCategories?.length&&(a.droppedCategories=e.droppedCategories),e.maskedCount!==void 0&&e.maskedCount>0&&(a.maskedCount=e.maskedCount),a}function Je(e,t,n,r=!1){const a=e.capture?.breadcrumbs??"disabled";if(n){e.capture=v({screenshot:"config-off",breadcrumbs:a});return}if(r&&!t){e.capture=v({screenshot:"reviewer-removed",breadcrumbs:a});return}t&&(e.capture=v({screenshot:t.situation,breadcrumbs:a,...t.blindSpots.length?{blindSpots:t.blindSpots}:{},...t.maskedCount>0?{maskedCount:t.maskedCount}:{}}))}const Ge="pass(?:word|wd)?|pwd|secret|token|api[_-]?key|apikey|auth(?:orization)?|credential|session|sid|cookie|jwt|bearer|otp|mfa|totp|cvv|cvc|ssn|nino|iban|card(?:[_-]?number)?|account[_-]?number|private[_-]?key|signature|client[_-]?secret|refresh[_-]?token|access[_-]?token",et=new RegExp(`(["'\`]?)(?<![A-Za-z0-9])(?:${Ge})[\\w-]*\\b\\1?\\s*[:=]\\s*(?:(["'\`])((?:\\\\.|(?!\\2)[^\\\\])*)\\2|([^\\s,;&}\\])]{3,}))`,"gi"),tt=/^(?:Bearer|Basic|Digest|Negotiate|Token)$/i,nt=(e,t,n,r,a,o,s)=>{if(!n&&tt.test(a)&&s.slice(o+e.length).startsWith(" [redacted]")||(n?r:a).startsWith("[redacted"))return e;const i=n?`${n}${r}${n}`:a;return e.slice(0,e.length-i.length)+(n?`${n}[redacted]${n}`:"[redacted]")},F=/data:[a-z0-9.+-]*\/?[a-z0-9.+-]*;base64,[A-Za-z0-9+/=]{16,}/gi,V=/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{0,}/g,K=/\b(sk-[A-Za-z0-9]+-[A-Za-z0-9_-]{20,}|sk-ant-[A-Za-z0-9_-]{20,}|sk-[A-Za-z0-9]{20,}|(sk|pk|rk)_(live|test)_[A-Za-z0-9]{16,}|gh[pousr]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{20,}|glpat-[A-Za-z0-9_-]{16,}|xox[baprs]-[A-Za-z0-9-]{10,}|xapp-[A-Za-z0-9-]{10,}|AKIA[0-9A-Z]{16}|ASIA[0-9A-Z]{16}|AIza[0-9A-Za-z_-]{35}|ya29\.[A-Za-z0-9_-]{20,}|SG\.[A-Za-z0-9_-]{20,}|npm_[A-Za-z0-9]{30,}|dop_v1_[a-f0-9]{40,}|shpat_[a-f0-9]{30,}|sbp_[a-f0-9]{30,}|hf_[A-Za-z0-9]{30,}|nvapi-[A-Za-z0-9_-]{20,})\b/g,rt=/\b(Bearer|Basic|Digest|Negotiate|Token)\s+[A-Za-z0-9._~+/=-]{8,}/gi,X=/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z]{2,24})+\b/g,R=/\b(?:\d[ -]?){12,18}\d\b/g,Y=/\b(?=[A-Za-z0-9+/]*[a-z])(?=[A-Za-z0-9+/]*[A-Z])(?=[A-Za-z0-9+/]*\d)[A-Za-z0-9+/]{40,}={0,2}\b/g,Q=/\b[0-9a-f]{32,}\b/gi,J=/\b(?=[A-Za-z0-9_-]*[a-z])(?=[A-Za-z0-9_-]*[A-Z])(?=[A-Za-z0-9_-]*\d)[A-Za-z0-9_-]{40,}\b/g,G=/\b[a-z][a-z0-9]{1,15}(?:_[a-z0-9]{1,15}){0,2}_(?=[A-Za-z0-9_-]*[A-Z])(?=[A-Za-z0-9_-]*\d)[A-Za-z0-9_-]{24,}\b/g,ee=/\b[a-z][a-z0-9+.-]*:\/\/[^\s/:@]+:[^\s/@]+@/gi,at=/^(?=[A-Za-z0-9_~.+/=-]*[a-z])(?=[A-Za-z0-9_~.+/=-]*[A-Z])(?=[A-Za-z0-9_~.+/=-]*\d)[A-Za-z0-9_~.+/=-]{24,}$/;function y(e,t){e.lastIndex=0;const n=e.test(t);return e.lastIndex=0,n}function te(e){const t=e.replace(/[ -]/g,"");if(t.length<13||t.length>19)return!1;let n=0,r=!1;for(let a=t.length-1;a>=0;a--){let o=t.charCodeAt(a)-48;r&&(o*=2,o>9&&(o-=9)),n+=o,r=!r}return n%10===0}function ot(e){R.lastIndex=0;for(const t of e.matchAll(R))if(te(t[0]))return!0;return!1}function E(e){let t=e;return t=t.replace(F,"data:[redacted]"),t=t.replace(rt,"$1 [redacted]"),t=t.replace(et,nt),t=t.replace(V,"[redacted:jwt]"),t=t.replace(K,"[redacted:key]"),t=t.replace(G,"[redacted:key]"),t=t.replace(ee,"[redacted:url-cred]@"),t=t.replace(X,"[redacted:email]"),t=t.replace(R,n=>te(n)?"[redacted:card]":n),t=t.replace(J,n=>`[redacted:b64:${n.length}]`),t=t.replace(Y,n=>`[redacted:b64:${n.length}]`),t=t.replace(Q,n=>`[redacted:hex:${n.length}]`),t}const st=C.query,it=C.fragment;function ne(e,t=[]){let n;try{const r=globalThis.location?.href;n=new URL(e,r)}catch{return E(e)}n.username="",n.password="";for(const r of[...n.searchParams.keys()]){if(it.includes(r)){n.searchParams.set(r,"[redacted]");continue}if(st.includes(r))continue;if(!t.includes(r)){n.searchParams.set(r,"[redacted]");continue}const a=n.searchParams.get(r)??"";E(a)!==a&&n.searchParams.set(r,"[redacted]")}return n.hash&&n.hash.length>1&&(n.hash=t.includes("#")?n.hash:"#[redacted]"),E(n.toString().replace(/%5Bredacted%5D/gi,"[redacted]"))}function O(e){return e.length>120?!0:y(X,e)||y(V,e)||y(K,e)||y(Q,e)||y(Y,e)||y(F,e)||y(J,e)||y(G,e)||y(ee,e)||at.test(e)||ot(e)}const ct=/^eyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/,lt=/^[a-f0-9]{32,}$/i,dt=/^(?=[A-Za-z0-9_-]{24,}$)(?=.*[A-Za-z])(?=.*\d)[A-Za-z0-9_-]+$/,ut="[redacted]";function ht(e){return e.includes("/")?e.split("/").map(t=>ct.test(t)||lt.test(t)||dt.test(t)?ut:t).join("/"):e}const ft=/\/index\.(html?|php)$/i;function gt(e){if(!e.startsWith("/"))return e;let t=e.replace(ft,"/");return t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t.toLowerCase()}function re(e){try{const t=e.querySelector(`meta[name="${Ke.route}"]`)?.getAttribute("content")?.trim();return!t||t.length>512||!t.startsWith("/")?null:t}catch{return null}}const mt=[/^utm_/,/^(gclid|gbraid|wbraid|fbclid|msclkid|ttclid|twclid|igshid|yclid|li_fat_id)$/,/^(mc_cid|mc_eid|_hsenc|_hsmi|vero_id|oly_enc_id|oly_anon_id)$/,/^_vercel_/,/^__vercel_/,/^_rsc$/],pt=[...C.query,...C.fragment];function bt(e,t=[]){return pt.includes(e)||t.includes(e)?!0:mt.some(n=>n.test(e))}function wt(e,t={}){const n=t.significantQueryParams??[];if(n!=="*"&&n.length===0)return;let r;try{r=new URLSearchParams(e)}catch{return}const a={};for(const[o,s]of r)bt(o,t.ignoredQueryParams??[])||n!=="*"&&!n.includes(o)||(a[o]=s);return Object.keys(a).length>0?a:void 0}function ae(e,t){const n=e.length>4096?e.slice(0,4096):e,r=ne(n,t);return r.length<=2048?r:r.slice(0,2048)+`\u2026[+${r.length-2048}]`}function yt(e=location,t={}){const n=ht(e.pathname),r=t.routeOverride??(t.doc?re(t.doc):typeof document<"u"?re(document):null),a=wt(e.search??"",t.query);return{route:gt(r??n),pathname:n,...a?{query:a}:{},origin:e.origin}}function $t(){try{return typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches}catch{return!1}}function xt(e){const t=e.urlParamAllowList??[];let n;try{n=ae(location.href,t)}catch{try{n=ae(document.URL,t)}catch{n=E(location.origin+location.pathname)}}let r=innerWidth,a=innerHeight;(r===0||a===0)&&(r=document.documentElement.clientWidth,a=document.documentElement.clientHeight);let o={w:0,h:0};try{o={w:screen.width,h:screen.height}}catch{}const s=navigator.userAgent||"",i=navigator.userAgentData,l=i?{brands:(i.brands??[]).map(u=>({brand:u.brand,version:u.version})),platform:i.platform,mobile:i.mobile}:void 0,h={schemaVersion:T,url:n,page:e.page,viewport:{w:r,h:a,dpr:devicePixelRatio||1},screen:o,ua:s,derived:Xe(s,l),language:navigator.language||navigator.languages?.[0]||"en",prefersColorScheme:$t()?"dark":"light",timestamp:new Date().toISOString(),capture:v({breadcrumbs:e.breadcrumbs?.status??"disabled"})};return l&&(h.uaData=l),e.breadcrumbs&&e.breadcrumbs.status!=="disabled"&&(h.breadcrumbs=e.breadcrumbs.records),h}const At={product:Me,set:Ze,item:Pe,items:Ie};function oe(e){return(t,n)=>(e[t]??"").replace(/\{(\w+)\}/g,(r,a)=>{const o=n?.[a]??At[a];return o===void 0?r:String(o)})}const se=e=>new Intl.NumberFormat().format(e),ie=e=>{const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(t)},ce={"where.anchored":"{label}","where.approximate":"position approximate \u2014 the page changed","where.orphaned":"moved \u2014 the element is gone","status.open":"Active","status.progress":"In progress","status.review":"In review","status.resolved":"Resolved","author.unknown":"Someone","label.image":"an image","label.link":"a link","label.button":"a button","label.tag":"the {tag}"},S=oe(ce),vt={"detail.details":"Anchor details","detail.hidden":"This element isn't visible right now \u2014 it may be inside a closed menu, tab, or accordion.","detail.orphaned":"The element this was pinned to has moved or gone \u2014 it was {label}.","detail.approximate":"The page changed since this was written, so the pin is close rather than exact \u2014 it points at {label}.","detail.unavailable":"Some of the matching steps couldn't load, so this was judged with the basic ones only.","detail.filedat":"Filed at {query}.","detail.openquery":"Open with original query","capture.agent":"{browser} \xB7 {os}","capture.agent.noos":"{browser}","capture.device":"{device} \xB7 {w}\xD7{h} @{dpr}x","capture.device.at1x":"{device} \xB7 {w}\xD7{h}"},Et={"export.title":"{product} \u2014 {origin}","export.summary.one":"1 comment, {unresolved} unresolved \xB7 exported {date}","export.summary.many":"{total} comments, {unresolved} unresolved \xB7 exported {date}","export.heading":"{n} \xB7 {key} \u2014 {status}","export.on":"On {label}","export.device":"Device","export.selector":"Selector","export.by":"By","export.nobody":"_(no comment)_","cursor.proxy":"Pick an element \u2014 Tab to move, Enter to comment","cursor.at":"{role}, {name}, {i} of {n}","cursor.here":"{role} {name}","export.screenshot":"Screenshot {key}","label.text":"\u201C{text}\u201D","hint.fine":"Click anything to comment \u2014 Esc when done","hint.coarse":"Tap anything to comment","highlight.chip":"{tag} \xB7 {name} \xB7 {w}\xD7{h}","highlight.chip.unnamed":"{tag} \xB7 {w}\xD7{h}"},f=oe({...ce,...vt,...Et}),St=[`[${A("mask")}]`,`.${q("mask")}`,`.${q("block")}`].join(", ");function le(e,t){return O(t)||!!e.closest?.(St)}function de(e){const n=(e.innerText??e.textContent??"").slice(0,512).trim().replace(/\s+/g," ");if(n&&!le(e,n))return f("label.text",{text:n.length>52?n.slice(0,52)+"\u2026":n});const r=e.tagName.toLowerCase();return r==="img"?f("label.image"):r==="a"?f("label.link"):r==="button"?f("label.button"):f("label.tag",{tag:r})}function _t(e,t){const n=t.trim().replace(/\s+/g," ");return n&&!le(e,n)?f("label.text",{text:n.length>52?n.slice(0,52)+"\u2026":n}):de(e)}const ue={open:{colour:"#4f6ef7"},progress:{colour:"#f59e0b"},review:{colour:"#8b5cf6"},resolved:{colour:"#10b981"}},kt=e=>e in ue?S(`status.${e}`):e;class Tt extends Error{code;constructor(t,n){super(n??t),this.name="AdapterError",this.code=t}}function he(e,t){const{anchorPending:n,anchorReasons:r,screenshotBlob:a,...o}=e;return o.attachments?.length&&t?.size&&(o.attachments=o.attachments.map(s=>{const i=t.get(s.id);return i?{...s,url:i}:s})),o}function fe(e){const t=e.context,n=t?.derived,r=t?.viewport;if(!t||!n||!r)return"";const a=Math.round(r.dpr*100)/100,o=n.os?f("capture.agent",{browser:n.browser,os:n.os}):f("capture.agent.noos",{browser:n.browser}),s=a===1?f("capture.device.at1x",{device:n.device,w:r.w,h:r.h}):f("capture.device",{device:n.device,w:r.w,h:r.h,dpr:a});return`${o} \xB7 ${s}`}function Ct(e,t,n){const r=e.map(l=>he(l,n)),a=r.filter(l=>l.status!=="resolved").length,o=[],s=[`# ${f("export.title",{origin:t.origin})}`,"",f(r.length===1?"export.summary.one":"export.summary.many",{total:se(r.length),unresolved:se(a),date:ie(t.exportedAt)})],i=new Map;for(const l of r)i.set(l.route,[...i.get(l.route)??[],l]);for(const[l,h]of i)s.push("","---","",`## ${l}`),h.forEach((u,b)=>{const m=u.comments[0];s.push("",`### ${f("export.heading",{n:b+1,key:u.key,status:kt(u.status)})}`,"",`**${f("export.on",{label:u.anchor.label})}**`,...u.anchorState==="anchored"?[]:[f(`detail.${u.anchorState}`,{label:u.anchor.label})],...u.anchor.css?[`**${f("export.selector")}** \`${u.anchor.css}\``]:[],...fe(u)?[`**${f("export.device")}** ${fe(u)}`]:[],`**${f("export.by")}** ${m?.author.name??u.createdBy.name} \xB7 ${ie(u.createdAt)}`,"",m?.body??f("export.nobody"));for(const c of u.attachments??[])c.url.startsWith("data:")&&(s.push("",`![${f("export.screenshot",{key:u.key})}][${c.id}]`),o.push(`[${c.id}]: ${c.url}`));for(const c of u.comments.slice(1))s.push("",`- **${c.author.name}** \u2014 ${c.body??""}`)});return o.length&&s.push("","---","",...o),s.join(`
2
2
  `)+`
3
3
  `}function zt(e,t,n){return JSON.stringify({schemaVersion:T,...t,threads:e.map(r=>he(r,n))},null,2)}function Nt(e,t,n,r){const a=n.exportedAt.slice(0,10);return e==="md"?{name:`${H}-${a}.md`,mime:"text/markdown",text:Ct(t,n,r)}:{name:`${H}-${a}.json`,mime:"application/json",text:zt(t,n,r)}}function Rt(e,t,n){const r=e.ownerDocument??e,a=URL.createObjectURL(new Blob([t.text],{type:`${t.mime};charset=utf-8`})),o=r.createElement("a");o.href=a,o.download=t.name,o.style.display="none",e.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,composed:!1})),o.remove(),n.setTimeout(()=>URL.revokeObjectURL(a),0)}let x=null;function Ot(){return x||(x=new Promise((e,t)=>{let n;try{n=indexedDB.open(z.database,1)}catch(r){t(r);return}n.onupgradeneeded=()=>{n.result.createObjectStore(z.store).createIndex("project",["uid","env"])},n.onsuccess=()=>{n.result.onversionchange=()=>{n.result.close(),x=null},e(n.result)},n.onerror=()=>t(n.error??new Error("indexeddb-unavailable")),n.onblocked=()=>t(new Error("indexeddb-blocked"))}),x.catch(()=>{x=null}),x)}function D(e,t){return Ot().then(n=>new Promise((r,a)=>{const o=n.transaction(z.store,e),s=t(o.objectStore(z.store));o.oncomplete=()=>r(s.result),o.onerror=()=>a(o.error??s.error??new Error("indexeddb-error")),o.onabort=()=>{const i=o.error;i&&(i.name==="QuotaExceededError"||/quota/i.test(i.message??""))?a(new Tt("local_quota_exceeded")):a(i??new Error("indexeddb-abort"))}}))}async function ge(e,t){const{blob:n,...r}=t,a={...r,bytes:await n.arrayBuffer(),type:n.type};await D("readwrite",o=>o.put(a,e))}function me(e){return D("readonly",t=>t.get(e)).then(t=>{if(!t)return null;const{bytes:n,type:r,...a}=t;return{...a,blob:new Blob([n],{type:r})}})}function Dt(e){return D("readwrite",t=>t.delete(e)).then(()=>{})}function Lt(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>typeof r.result=="string"?t(r.result):n(new Error("read-failed")),r.onerror=()=>n(r.error??new Error("read-failed")),r.readAsDataURL(e)})}function Mt(e){const t=/^data:([^;,]+)?(;base64)?,(.*)$/s.exec(e);if(!t)throw new Error("not-a-data-uri");const n=t[1]??"application/octet-stream";if(!t[2])return new Blob([decodeURIComponent(t[3])],{type:n});const r=atob(t[3]),a=new Uint8Array(r.length);for(let o=0;o<r.length;o++)a[o]=r.charCodeAt(o);return new Blob([a],{type:n})}async function Zt(e){const t=e.flatMap(r=>r.attachments??[]).filter(r=>!/^https?:/i.test(r.url??"")),n=new Map;return t.length===0||await Promise.all(t.map(async r=>{const a=await me(r.id).catch(()=>null);a&&n.set(r.id,await Lt(a.blob))})),n}async function Pt(e,t,n){const r=JSON.parse(e);if(r.schemaVersion!==T||!Array.isArray(r.threads))throw new Error(`not a ${T} archive`);const a=[];let o=0;for(const s of r.threads){if(!s.attachments?.length){a.push(s);continue}const i=[];for(const l of s.attachments)if(l.url.startsWith("data:")){const h=Mt(l.url);await ge(l.id,{blob:h,uid:t,env:n,kind:l.kind,...l.width!==void 0?{width:l.width}:{},...l.height!==void 0?{height:l.height}:{},createdAt:Date.now()}),o++,i.push({...l,url:""})}else i.push(l);a.push({...s,attachments:i})}return localStorage.setItem(Ve.threads(t,n),JSON.stringify(a)),{threads:a.length,blobs:o}}function L(e){return e.getBoundingClientRect()}function pe(e){if(e.closest('[inert],[aria-hidden="true"]'))return!1;const t=e.checkVisibility;if(typeof t=="function")return t.call(e,{contentVisibilityAuto:!0,opacityProperty:!1,visibilityProperty:!0});const n=L(e);if(!(n.width>0||n.height>0||e.getClientRects().length>0))return!1;const a=e.ownerDocument?.defaultView;return a?a.getComputedStyle(e).visibility!=="hidden":!0}const be=`[${j("root")}]`;function we(e){const t=e.parentElement;return!t||t===e.ownerDocument.body||t===e.ownerDocument.documentElement||t.closest(be)?null:t}function ye(e){for(const t of e.children)if(!t.closest(be)&&pe(t))return t;return null}const $e=10;function xe(e){let t=e,n=0;for(;n++<$e;){const r=t.getRootNode();if(!(r instanceof ShadowRoot))break;t=r.host}return t}function It(e){const t=[];let n=e,r=0;for(;r++<$e;){const a=n.getRootNode();if(!(a instanceof ShadowRoot))break;n=a.host,t.unshift(n)}return t}const Ut=/[\u200B-\u200D\u2060\uFEFF]/gu,Bt=/[\s\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]+/gu,Wt=[[/[\u2018\u2019\u201A\u201B]/gu,"'"],[/[\u201C\u201D\u201E\u201F]/gu,'"'],[/[\u2010-\u2015\u2212]/gu,"-"],[/\u2026/gu,"..."],[/\u2044/gu,"/"]];function Ht(e){let t=e.normalize("NFC").replace(Ut,"");for(const[n,r]of Wt)t=t.replace(n,r);return t.replace(Bt," ").trim()}const jt=[A("anchor"),"data-testid","data-test-id","data-test","data-cy","data-qa","data-pw","data-automation-id"],qt=256,Ft=200,Vt=12;function Kt(e){for(const t of jt){const n=e.getAttribute(t);if(n)return{attr:t,value:n}}}function Xt(e,t=Vt){const n=[];let r=e;for(;r&&r.nodeType===1&&n.length<t;){const a=r.tagName.toLowerCase();if(a==="html")break;const o=r.parentElement;if(o){const s=[...o.children].filter(i=>i.tagName===r.tagName);n.push(s.length>1?`${a}:nth-of-type(${s.indexOf(r)+1})`:a)}else n.push(a);r=o}return n.reverse()}function Ae(e){const t=e.getAttribute("role");if(t)return t;const n=e.tagName.toLowerCase();if(n==="button")return"button";if(n==="a"&&e.hasAttribute("href"))return"link";if(n==="input"){const r=(e.getAttribute("type")??"text").toLowerCase();return r==="checkbox"||r==="radio"||r==="button"||r==="submit"?r==="submit"?"button":r:"textbox"}if(/^h[1-6]$/.test(n))return"heading";if(n==="nav")return"navigation";if(n==="img")return"img"}function M(e){const t=e.getAttribute("aria-label");if(t?.trim())return t.trim();const n=e.getAttribute("aria-labelledby");if(n){const o=n.split(/\s+/).map(s=>e.ownerDocument.getElementById(s)?.textContent??"").join(" ").trim();if(o)return o}const r=e.getAttribute("alt")??e.getAttribute("title");if(r?.trim())return r.trim();const a=(e.textContent??"").trim();return a?a.slice(0,qt):void 0}function Yt(e){const t=e.tagName.toLowerCase();return t==="img"?S("label.image"):t==="a"?S("label.link"):t==="button"?S("label.button"):S("label.tag",{tag:t})}function Qt(e){return e<480?"xs":e<768?"sm":e<1024?"md":e<1440?"lg":"xl"}function Jt(e,t={}){const n=xe(e),r=Kt(n),a=L(n),o=n.ownerDocument,s=o.defaultView?.scrollX??0,i=o.defaultView?.scrollY??0,l=Ht(n.textContent??"").slice(0,Ft),h={path:Xt(n),rect:{x:a.left+s,y:a.top+i,w:a.width,h:a.height},label:t.label??Yt(n)};r&&(h.testid=r.value),t.domid&&(h.domid=t.domid),t.css&&(h.css=t.css),t.hostPath?.length&&(h.hostPath=t.hostPath),t.xpath&&(h.xpath=t.xpath);const u=Ae(n);u&&(h.role=u);const b=M(n);b&&(h.accessibleName=b),l&&(h.text={exact:l}),t.point&&a.width>0&&a.height>0&&(h.offset={fx:ve((t.point.x-a.left)/a.width),fy:ve((t.point.y-a.top)/a.height)});const m=t.viewportWidth??o.defaultView?.innerWidth;return m&&(h.breakpoint=Qt(m)),h}const ve=e=>e<0?0:e>1?1:e,Gt='a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"]),[role], h1,h2,h3,h4,h5,h6, img, video, figure, table, li,main, nav, header, footer, aside, section[aria-label], form, [data-testid]',en=`[${j("root")}]`;function Ee(e=document.body){return[...e.querySelectorAll(Gt)].filter(t=>!t.closest(en)&&pe(t))}function tn(e,t){const n=e.ownerDocument??document,r=n.createElement("button");r.type="button",r.className="snag-cursor-proxy",r.setAttribute("aria-label",f("cursor.proxy")),r.style.cssText="position:fixed;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none",e.appendChild(r);let a=[],o=-1,s=null,i=null;const l=()=>i??a[o]??null;function h(c){const w=Ae(c),p=M(c),$=i?0:o+1;t.announce(i||!p?f("cursor.here",{role:w??c.tagName.toLowerCase(),name:p??""}):f("cursor.at",{role:w??c.tagName.toLowerCase(),name:p,i:$,n:a.length}))}function u(c){c&&(t.show(c),c.scrollIntoView({block:"nearest",behavior:"auto"}),h(c))}function b(c){i=null,a.length!==0&&(o=o<0?c===1?0:a.length-1:(o+c+a.length)%a.length,u(a[o]))}function m(c){const w=l();if(!w)return;const p=c==="out"?we(w):ye(w);if(!p)return;const $=a.indexOf(p);$>=0?(i=null,o=$):i=p,u(p)}return r.addEventListener("keydown",c=>{if(!(c.metaKey||c.ctrlKey||c.altKey))switch(c.key){case"Tab":case"ArrowDown":case"ArrowRight":c.preventDefault(),b(c.key==="Tab"&&c.shiftKey?-1:1);return;case"ArrowUp":case"ArrowLeft":c.preventDefault(),b(-1);return;case"[":c.preventDefault(),m("out");return;case"]":c.preventDefault(),m("in");return;case"Enter":case" ":{const w=l();if(!w)return;c.preventDefault();const p=w.getBoundingClientRect();t.pick(w,{x:p.left+p.width/2,y:p.top+p.height/2});return}}}),{engage(){a=Ee(n.body),o=-1,i=null,s=e.activeElement??n.activeElement,r.focus({preventScroll:!0})},release(){i=null,e.activeElement===r&&s?.focus?.(),s=null},destroy(){r.remove()}}}const g=Object.fromEntries(Object.keys(d).map(e=>[e,He(e)])),nn=Object.entries(ue).map(([e,t])=>` ${d[`status${e[0].toUpperCase()}${e.slice(1)}`]}:${t.colour};`).join(`
4
4
  `);`${g.font}${g.fg}${d.font}${d.accent}${d.bg}${d.fg}${d.muted}${d.border}${d.radius}${d.shadow}${d.z}${d.motion}${d.surface}${g.fg}${g.bg}${d.sunken}${g.fg}${g.bg}${d.hover}${g.fg}${g.bg}${d.onAccent}${d.focus}${g.accent}${g.fg}${d.disabled}${g.muted}${g.bg}${nn}${d.anchorOrphan}${Fe}${d.accent}${d.onAccent}${d.bg}${d.fg}${d.muted}${d.border}${d.shadow}${d.motion}${d.bg}${d.fg}${d.muted}${d.border}${d.accent}${d.onAccent}${d.surface}${d.sunken}${d.hover}${d.focus}${d.disabled}${d.shadow}${d.anchorOrphan}`;const Se={highlight:2,chip:4},_e=new WeakMap;function rn(e,t,n){let r=_e.get(e);if(r||_e.set(e,r=new Set),r.has(t))return;r.add(t);try{const s=new CSSStyleSheet;s.replaceSync(n),e.adoptedStyleSheets=[...e.adoptedStyleSheets,s];return}catch{}const o=(e.ownerDocument??document).createElement("style");o.setAttribute(`data-snag-${t}`,""),o.textContent=n,e.appendChild(o)}const an=` .snag-hl-layer{position:fixed;inset:0;pointer-events:none;z-index:${Se.highlight};contain:layout style;overflow:hidden}.snag-hl{position:absolute;box-sizing:border-box;border:2px solid ${g.accent};border-radius:3px;background:color-mix(in srgb,${g.accent} 12%,transparent);box-shadow:0 0 0 100vmax color-mix(in srgb,#000 4%,transparent);transition:top ${g.motion},left ${g.motion},width ${g.motion},height ${g.motion}}.snag-hl-chip{position:absolute;background:${g.accent};color:${g.onAccent};font:600 11px/1.5 ${g.font};padding:2px 7px;border-radius:4px;white-space:nowrap;max-width:min(48ch,90vw);overflow:hidden;text-overflow:ellipsis}.snag-hint{position:fixed;top:calc(12px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:${Se.chip};pointer-events:none;background:${g.bg};color:${g.fg};border:1px solid ${g.border};box-shadow:${g.shadow};border-radius:999px;padding:7px 14px;font:500 12px/1 ${g.font};white-space:nowrap;max-width:calc(100vw - 24px);overflow:hidden;text-overflow:ellipsis}`;function on(e,t,n){const r=e.ownerDocument??document;rn(e,"highlight",an);const a=r.createElement("div");a.className="snag-hl-layer",a.hidden=!0;const o=r.createElement("div");o.className="snag-hl";const s=r.createElement("div");s.className="snag-hl-chip",a.append(o,s);const i=r.createElement("div");i.className="snag-hint",i.setAttribute("role","status"),i.hidden=!0,i.textContent=f(t?"hint.coarse":"hint.fine");let l;function h(m){const c=L(m);if(c.width<=0&&c.height<=0)return u();a.hidden=!1,o.style.left=`${c.left}px`,o.style.top=`${c.top}px`,o.style.width=`${c.width}px`,o.style.height=`${c.height}px`;const w=M(m),p=m.tagName.toLowerCase(),$=Math.round(c.width),W=Math.round(c.height);s.textContent=w?f("highlight.chip",{tag:p,name:w,w:$,h:W}):f("highlight.chip.unnamed",{tag:p,w:$,h:W});const Le=c.top>=22;s.style.top=Le?`${c.top-20}px`:`${c.bottom+4}px`,s.style.left=`${Math.max(2,c.left)}px`,t&&(clearTimeout(l),l=setTimeout(u,400))}function u(){a.hidden=!0}let b=null;return{show:h,clear:u,setActive(m){n&&(b??=tn(e,{...n,show:h}),m?b.engage():b.release()),m||u(),m?e.append(a,i):(a.remove(),i.remove()),i.hidden=!m},destroy(){clearTimeout(l),b?.destroy(),a.remove(),i.remove()}}}const sn=new Set(["role","name","aria-label","rel","href"]);function cn(e,t){let n=sn.has(e);n||=e.startsWith("data-")&&_(e);let r=_(t)&&t.length<100;return r||=t.startsWith("#")&&_(t.slice(1)),n&&r}function ln(e){return _(e)}function dn(e){return _(e)}function un(e){return!0}function ke(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(e.tagName.toLowerCase()==="html")return"html";const n={root:document.body,idName:ln,className:dn,tagName:un,attr:cn,timeoutMs:1e3,seedMinLength:3,optimizedMinLength:2,maxNumberOfPathChecks:1/0},r=new Date,a={...n,...t},o=pn(a.root,n);let s,i=0;for(const h of hn(e,a,o)){if(new Date().getTime()-r.getTime()>a.timeoutMs||i>=a.maxNumberOfPathChecks){const b=gn(e,o);if(!b)throw new Error(`Timeout: Can't find a unique selector after ${a.timeoutMs}ms`);return k(b)}if(i++,I(h,o)){s=h;break}}if(!s)throw new Error("Selector was not found.");const l=[...Ne(s,e,a,o,r)];return l.sort(Z),l.length>0?k(l[0]):k(s)}function*hn(e,t,n){const r=[];let a=[],o=e,s=0;for(;o&&o!==n;){const i=fn(o,t);for(const l of i)l.level=s;if(r.push(i),o=o.parentElement,s++,a.push(...ze(r)),s>=t.seedMinLength){a.sort(Z);for(const l of a)yield l;a=[]}}a.sort(Z);for(const i of a)yield i}function _(e){if(/^[a-z\-]{3,}$/i.test(e)){const t=e.split(/-|[A-Z]/);for(const n of t)if(n.length<=2||/[^aeiou]{4,}/i.test(n))return!1;return!0}return!1}function fn(e,t){const n=[],r=e.getAttribute("id");r&&t.idName(r)&&n.push({name:"#"+CSS.escape(r),penalty:0});for(let s=0;s<e.classList.length;s++){const i=e.classList[s];t.className(i)&&n.push({name:"."+CSS.escape(i),penalty:1})}for(let s=0;s<e.attributes.length;s++){const i=e.attributes[s];t.attr(i.name,i.value)&&n.push({name:`[${CSS.escape(i.name)}="${CSS.escape(i.value)}"]`,penalty:2})}const a=e.tagName.toLowerCase();if(t.tagName(a)){n.push({name:a,penalty:5});const s=P(e,a);s!==void 0&&n.push({name:Ce(a,s),penalty:10})}const o=P(e);return o!==void 0&&n.push({name:mn(a,o),penalty:50}),n}function k(e){let t=e[0],n=t.name;for(let r=1;r<e.length;r++){const a=e[r].level||0;t.level===a-1?n=`${e[r].name} > ${n}`:n=`${e[r].name} ${n}`,t=e[r]}return n}function Te(e){return e.map(t=>t.penalty).reduce((t,n)=>t+n,0)}function Z(e,t){return Te(e)-Te(t)}function P(e,t){const n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let a=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&(t===void 0||r.tagName.toLowerCase()===t)&&a++,r!==e);)r=r.nextSibling;return a}function gn(e,t){let n=0,r=e;const a=[];for(;r&&r!==t;){const o=r.tagName.toLowerCase(),s=P(r,o);if(s===void 0)return;a.push({name:Ce(o,s),penalty:NaN,level:n}),r=r.parentElement,n++}if(I(a,t))return a}function mn(e,t){return e==="html"?"html":`${e}:nth-child(${t})`}function Ce(e,t){return e==="html"?"html":`${e}:nth-of-type(${t})`}function*ze(e,t=[]){if(e.length>0)for(let n of e[0])yield*ze(e.slice(1,e.length),t.concat(n));else yield t}function pn(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function I(e,t){const n=k(e);switch(t.querySelectorAll(n).length){case 0:throw new Error(`Can't select any node with this selector: ${n}`);case 1:return!0;default:return!1}}function*Ne(e,t,n,r,a){if(e.length>2&&e.length>n.optimizedMinLength)for(let o=1;o<e.length-1;o++){if(new Date().getTime()-a.getTime()>n.timeoutMs)return;const i=[...e];i.splice(o,1),I(i,r)&&r.querySelector(k(i))===t&&(yield i,yield*Ne(i,t,n,r,a))}}const bn=A("anchor").replace(/anchor$/,""),wn=[A("anchor"),"data-testid","data-test-id","data-test","data-cy","data-qa","data-pw","data-automation-id"],Re=new Set([...wn,"name","aria-label","role","type","itemprop"]),yn=new Set(["name","type","role","aria-label","itemprop","href","alt","lang"]),$n=[/^class$|^style$/,/^data-v-/,/^_ngcontent-|^_nghost-|^ng-version$|^ng-reflect-/,/^data-reactid$|^data-react-checksum$|^data-react-helmet$/,/^data-radix-|^data-headlessui-|^data-floating-ui-|^data-state$|^data-side$/,/^data-svelte-h$|^data-astro-|^data-styled|^data-emotion$/],xn=[/^[0-9a-f]{8}-[0-9a-f]{4}-/i,/^[0-9a-f]{16,}$/i,/^:r[0-9a-z]+:$/,/^«r[0-9a-z]+»$/,/^\d{4,}$/,/^(ember|mui|mat|cdk|headlessui|radix|reach)-?\d/i,/^(ember|mui|mat|cdk|headlessui|radix|reach)(-?[a-z]+)*-?\d+$/i];function An(e){return e.startsWith(bn)&&e!==A("anchor")||e.startsWith("aria-")&&e!=="aria-label"||$n.some(t=>t.test(e))?!1:Re.has(e)||yn.has(e)}function vn(e,t){return!t||t.length>120||e==="href"&&(t.includes("?")||/^[a-z]+:\/\//i.test(t))?!0:xn.some(n=>n.test(t))}const N=(e,t)=>!vn(e,t)&&!O(t);function U(e){return N("id",e)&&/^[a-zA-Z0-9_-]+$/.test(e)}const En=e=>`"${e.replace(/([\\"])/g,"\\$1")}"`,Oe=e=>e.replace(/"[^"]*"|'[^']*'|#([A-Za-z_-][\w-]*)/g,(t,n)=>n?`[id=${En(n)}]`:t);function De(e,t,n){try{return n.querySelectorAll(e).length===1&&n.querySelector(e)===t}catch{return!1}}function B(e,t=document.body){const n={root:t,tagName:()=>!0,idName:U,seedMinLength:2,optimizedMinLength:2};try{const r=ke(e,{...n,timeoutMs:150,className:()=>!1,attr:(o,s)=>Re.has(o)&&N(o,s)}),a=Oe(r);if(De(a,e,t))return a}catch{}try{const r=ke(e,{...n,timeoutMs:300,className:Sn,attr:(o,s)=>An(o)&&N(o,s)}),a=Oe(r);return De(a,e,t)?a:void 0}catch{return}}function Sn(e){return!(!e||e.length>60||/^[a-z-]*\d/.test(e)||/[:[\]/]/.test(e)||/_[A-Za-z0-9]{5,}$/.test(e)||/^[a-z]+-[0-9a-f]{6,}$/i.test(e))}function _n(e){const t=[];let n=e;for(let r=0;n&&n.nodeType===1&&r<40;r++){const a=n.tagName.toLowerCase();let o=1,s=!1;for(let i=n.previousElementSibling;i;i=i.previousElementSibling)i.tagName===n.tagName&&o++;for(let i=n.nextElementSibling;!s&&i;i=i.nextElementSibling)i.tagName===n.tagName&&(s=!0);t.unshift(o>1||s?`${a}[${o}]`:a),n=n.parentElement}return`/${t.join("/")}`}function kn(e){const t=xe(e),n={},r=It(e);if(r.length){const o=r.map(s=>B(s)).filter(s=>!!s);o.length&&(n.hostPath=o)}const a=B(t);a&&(n.css=a),t.id&&U(t.id)&&(n.domid=t.id);try{n.xpath=_n(t)}catch{}return n}export{Je as applyShotOutcome,Nt as buildExport,Ee as candidates,xt as captureContext,v as captureReport,on as createAddChrome,Jt as createElementAnchor,Dt as deleteBlob,de as deriveAnchorLabel,yt as derivePageRef,_t as deriveQuoteLabel,kn as describeElement,Rt as download,B as generateCss,me as getBlob,Pt as importArchive,O as isSensitiveValue,U as isStableId,N as isUsableAttrValue,ye as narrow,ge as putBlob,E as redactText,ne as redactUrl,Zt as resolveAttachmentUris,we as widen};