Files
log/my-blog/static/oauth/assets/comment-atproto-BQKPMV57.js
2025-06-19 17:13:02 +09:00

148 lines
1.1 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var uK=Object.defineProperty;var tx=t=>{throw TypeError(t)};var cK=(t,e,r)=>e in t?uK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var De=(t,e,r)=>cK(t,typeof e!="symbol"?e+"":e,r),Vm=(t,e,r)=>e.has(t)||tx("Cannot "+r);var R=(t,e,r)=>(Vm(t,e,"read from private field"),r?r.call(t):e.get(t)),me=(t,e,r)=>e.has(t)?tx("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Z=(t,e,r,n)=>(Vm(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),z=(t,e,r)=>(Vm(t,e,"access private method"),r);var up=(t,e,r,n)=>({set _(i){Z(t,e,i,r)},get _(){return R(t,e,n)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();var S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bh(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var UA={exports:{}},vh={},$A={exports:{}},he={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Lc=Symbol.for("react.element"),dK=Symbol.for("react.portal"),pK=Symbol.for("react.fragment"),fK=Symbol.for("react.strict_mode"),hK=Symbol.for("react.profiler"),yK=Symbol.for("react.provider"),mK=Symbol.for("react.context"),gK=Symbol.for("react.forward_ref"),bK=Symbol.for("react.suspense"),vK=Symbol.for("react.memo"),EK=Symbol.for("react.lazy"),rx=Symbol.iterator;function wK(t){return t===null||typeof t!="object"?null:(t=rx&&t[rx]||t["@@iterator"],typeof t=="function"?t:null)}var OA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KA=Object.assign,VA={};function $a(t,e,r){this.props=t,this.context=e,this.refs=VA,this.updater=r||OA}$a.prototype.isReactComponent={};$a.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};$a.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function MA(){}MA.prototype=$a.prototype;function pv(t,e,r){this.props=t,this.context=e,this.refs=VA,this.updater=r||OA}var fv=pv.prototype=new MA;fv.constructor=pv;KA(fv,$a.prototype);fv.isPureReactComponent=!0;var nx=Array.isArray,NA=Object.prototype.hasOwnProperty,hv={current:null},zA={key:!0,ref:!0,__self:!0,__source:!0};function FA(t,e,r){var n,i={},o=null,s=null;if(e!=null)for(n in e.ref!==void 0&&(s=e.ref),e.key!==void 0&&(o=""+e.key),e)NA.call(e,n)&&!zA.hasOwnProperty(n)&&(i[n]=e[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(t&&t.defaultProps)for(n in l=t.defaultProps,l)i[n]===void 0&&(i[n]=l[n]);return{$$typeof:Lc,type:t,key:o,ref:s,props:i,_owner:hv.current}}function _K(t,e){return{$$typeof:Lc,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function yv(t){return typeof t=="object"&&t!==null&&t.$$typeof===Lc}function xK(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var ix=/\/+/g;function Mm(t,e){return typeof t=="object"&&t!==null&&t.key!=null?xK(""+t.key):e.toString(36)}function Yp(t,e,r,n,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var s=!1;if(t===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case Lc:case dK:s=!0}}if(s)return s=t,i=i(s),t=n===""?"."+Mm(s,0):n,nx(i)?(r="",t!=null&&(r=t.replace(ix,"$&/")+"/"),Yp(i,e,r,"",function(c){return c})):i!=null&&(yv(i)&&(i=_K(i,r+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(ix,"$&/")+"/")+t)),e.push(i)),1;if(s=0,n=n===""?".":n+":",nx(t))for(var l=0;l<t.length;l++){o=t[l];var u=n+Mm(o,l);s+=Yp(o,e,r,u,i)}else if(u=wK(t),typeof u=="function")for(t=u.call(t),l=0;!(o=t.next()).done;)o=o.value,u=n+Mm(o,l++),s+=Yp(o,e,r,u,i);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return s}function cp(t,e,r){if(t==null)return t;var n=[],i=0;return Yp(t,n,"","",function(o){return e.call(r,o,i++)}),n}function RK(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Gt={current:null},ef={transition:null},AK={ReactCurrentDispatcher:Gt,ReactCurrentBatchConfig:ef,ReactCurrentOwner:hv};function qA(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:cp,forEach:function(t,e,r){cp(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return cp(t,function(){e++}),e},toArray:function(t){return cp(t,function(e){return e})||[]},only:function(t){if(!yv(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};he.Component=$a;he.Fragment=pK;he.Profiler=hK;he.PureComponent=pv;he.StrictMode=fK;he.Suspense=bK;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AK;he.act=qA;he.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=KA({},t.props),i=t.key,o=t.ref,s=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,s=hv.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(u in e)NA.call(e,u)&&!zA.hasOwnProperty(u)&&(n[u]=e[u]===void 0&&l!==void 0?l[u]:e[u])}var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];n.children=l}return{$$typeof:Lc,type:t.type,key:i,ref:o,props:n,_owner:s}};he.createContext=function(t){return t={$$typeof:mK,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:yK,_context:t},t.Consumer=t};he.createElement=FA;he.createFactory=function(t){var e=FA.bind(null,t);return e.type=t,e};he.createRef=function(){return{current:null}};he.forwardRef=function(t){return{$$typeof:gK,render:t}};he.isValidElement=yv;he.lazy=function(t){return{$$typeof:EK,_payload:{_status:-1,_result:t},_init:RK}};he.memo=function(t,e){return{$$typeof:vK,type:t,compare:e===void 0?null:e}};he.startTransition=function(t){var e=ef.transition;ef.transition={};try{t()}finally{ef.transition=e}};he.unstable_act=qA;he.useCallback=function(t,e){return Gt.current.useCallback(t,e)};he.useContext=function(t){return Gt.current.useContext(t)};he.useDebugValue=function(){};he.useDeferredValue=function(t){return Gt.current.useDeferredValue(t)};he.useEffect=function(t,e){return Gt.current.useEffect(t,e)};he.useId=function(){return Gt.current.useId()};he.useImperativeHandle=function(t,e,r){return Gt.current.useImperativeHandle(t,e,r)};he.useInsertionEffect=function(t,e){return Gt.current.useInsertionEffect(t,e)};he.useLayoutEffect=function(t,e){return Gt.current.useLayoutEffect(t,e)};he.useMemo=function(t,e){return Gt.current.useMemo(t,e)};he.useReducer=function(t,e,r){return Gt.current.useReducer(t,e,r)};he.useRef=function(t){return Gt.current.useRef(t)};he.useState=function(t){return Gt.current.useState(t)};he.useSyncExternalStore=function(t,e,r){return Gt.current.useSyncExternalStore(t,e,r)};he.useTransition=function(){return Gt.current.useTransition()};he.version="18.3.1";$A.exports=he;var ye=$A.exports;/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var SK=ye,CK=Symbol.for("react.element"),TK=Symbol.for("react.fragment"),kK=Object.prototype.hasOwnProperty,LK=SK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,PK={key:!0,ref:!0,__self:!0,__source:!0};function GA(t,e,r){var n,i={},o=null,s=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)kK.call(e,n)&&!PK.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:CK,type:t,key:o,ref:s,props:i,_owner:LK.current}}vh.Fragment=TK;vh.jsx=GA;vh.jsxs=GA;UA.exports=vh;var P=UA.exports,Hg={},HA={exports:{}},_r={},XA={exports:{}},WA={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(t){function e(q,ne){var ce=q.length;q.push(ne);e:for(;0<ce;){var ze=ce-1>>>1,lt=q[ze];if(0<i(lt,ne))q[ze]=ne,q[ce]=lt,ce=ze;else break e}}function r(q){return q.length===0?null:q[0]}function n(q){if(q.length===0)return null;var ne=q[0],ce=q.pop();if(ce!==ne){q[0]=ce;e:for(var ze=0,lt=q.length,ap=lt>>>1;ze<ap;){var Jo=2*(ze+1)-1,Km=q[Jo],Zo=Jo+1,lp=q[Zo];if(0>i(Km,ce))Zo<lt&&0>i(lp,Km)?(q[ze]=lp,q[Zo]=ce,ze=Zo):(q[ze]=Km,q[Jo]=ce,ze=Jo);else if(Zo<lt&&0>i(lp,ce))q[ze]=lp,q[Zo]=ce,ze=Zo;else break e}}return ne}function i(q,ne){var ce=q.sortIndex-ne.sortIndex;return ce!==0?ce:q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,f=null,h=3,g=!1,b=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(q){for(var ne=r(c);ne!==null;){if(ne.callback===null)n(c);else if(ne.startTime<=q)n(c),ne.sortIndex=ne.expirationTime,e(u,ne);else break;ne=r(c)}}function A(q){if(w=!1,E(q),!b)if(r(u)!==null)b=!0,$m(L);else{var ne=r(c);ne!==null&&Om(A,ne.startTime-q)}}function L(q,ne){b=!1,w&&(w=!1,y(j),j=-1),g=!0;var ce=h;try{for(E(ne),f=r(u);f!==null&&(!(f.expirationTime>ne)||q&&!Zt());){var ze=f.callback;if(typeof ze=="function"){f.callback=null,h=f.priorityLevel;var lt=ze(f.expirationTime<=ne);ne=t.unstable_now(),typeof lt=="function"?f.callback=lt:f===r(u)&&n(u),E(ne)}else n(u);f=r(u)}if(f!==null)var ap=!0;else{var Jo=r(c);Jo!==null&&Om(A,Jo.startTime-ne),ap=!1}return ap}finally{f=null,h=ce,g=!1}}var D=!1,B=null,j=-1,pe=5,ee=-1;function Zt(){return!(t.unstable_now()-ee<pe)}function Li(){if(B!==null){var q=t.unstable_now();ee=q;var ne=!0;try{ne=B(!0,q)}finally{ne?Pi():(D=!1,B=null)}}else D=!1}var Pi;if(typeof m=="function")Pi=function(){m(Li)};else if(typeof MessageChannel<"u"){var ex=new MessageChannel,lK=ex.port2;ex.port1.onmessage=Li,Pi=function(){lK.postMessage(null)}}else Pi=function(){C(Li,0)};function $m(q){B=q,D||(D=!0,Pi())}function Om(q,ne){j=C(function(){q(t.unstable_now())},ne)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(q){q.callback=null},t.unstable_continueExecution=function(){b||g||(b=!0,$m(L))},t.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):pe=0<q?Math.floor(1e3/q):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(q){switch(h){case 1:case 2:case 3:var ne=3;break;default:ne=h}var ce=h;h=ne;try{return q()}finally{h=ce}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(q,ne){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ce=h;h=q;try{return ne()}finally{h=ce}},t.unstable_scheduleCallback=function(q,ne,ce){var ze=t.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?ze+ce:ze):ce=ze,q){case 1:var lt=-1;break;case 2:lt=250;break;case 5:lt=1073741823;break;case 4:lt=1e4;break;default:lt=5e3}return lt=ce+lt,q={id:d++,callback:ne,priorityLevel:q,startTime:ce,expirationTime:lt,sortIndex:-1},ce>ze?(q.sortIndex=ce,e(c,q),r(u)===null&&q===r(c)&&(w?(y(j),j=-1):w=!0,Om(A,ce-ze))):(q.sortIndex=lt,e(u,q),b||g||(b=!0,$m(L))),q},t.unstable_shouldYield=Zt,t.unstable_wrapCallback=function(q){var ne=h;return function(){var ce=h;h=ne;try{return q.apply(this,arguments)}finally{h=ce}}}})(WA);XA.exports=WA;var DK=XA.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var BK=ye,wr=DK;function I(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var JA=new Set,Wu={};function Ds(t,e){xa(t,e),xa(t+"Capture",e)}function xa(t,e){for(Wu[t]=e,t=0;t<e.length;t++)JA.add(e[t])}var Ei=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xg=Object.prototype.hasOwnProperty,IK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ox={},sx={};function jK(t){return Xg.call(sx,t)?!0:Xg.call(ox,t)?!1:IK.test(t)?sx[t]=!0:(ox[t]=!0,!1)}function UK(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function $K(t,e,r,n){if(e===null||typeof e>"u"||UK(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ht(t,e,r,n,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var xt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){xt[t]=new Ht(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];xt[e]=new Ht(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){xt[t]=new Ht(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){xt[t]=new Ht(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){xt[t]=new Ht(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){xt[t]=new Ht(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){xt[t]=new Ht(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){xt[t]=new Ht(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){xt[t]=new Ht(t,5,!1,t.toLowerCase(),null,!1,!1)});var mv=/[\-:]([a-z])/g;function gv(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(mv,gv);xt[e]=new Ht(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(mv,gv);xt[e]=new Ht(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(mv,gv);xt[e]=new Ht(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){xt[t]=new Ht(t,1,!1,t.toLowerCase(),null,!1,!1)});xt.xlinkHref=new Ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){xt[t]=new Ht(t,1,!1,t.toLowerCase(),null,!0,!0)});function bv(t,e,r,n){var i=xt.hasOwnProperty(e)?xt[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&($K(e,r,i,n)&&(r=null),n||i===null?jK(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Ai=BK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,dp=Symbol.for("react.element"),ea=Symbol.for("react.portal"),ta=Symbol.for("react.fragment"),vv=Symbol.for("react.strict_mode"),Wg=Symbol.for("react.profiler"),ZA=Symbol.for("react.provider"),QA=Symbol.for("react.context"),Ev=Symbol.for("react.forward_ref"),Jg=Symbol.for("react.suspense"),Zg=Symbol.for("react.suspense_list"),wv=Symbol.for("react.memo"),qi=Symbol.for("react.lazy"),YA=Symbol.for("react.offscreen"),ax=Symbol.iterator;function uu(t){return t===null||typeof t!="object"?null:(t=ax&&t[ax]||t["@@iterator"],typeof t=="function"?t:null)}var Ve=Object.assign,Nm;function ku(t){if(Nm===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Nm=e&&e[1]||""}return`
`+Nm+t}var zm=!1;function Fm(t,e){if(!t||zm)return"";zm=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(`
`),o=n.stack.split(`
`),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var u=`
`+i[s].replace(" at new "," at ");return t.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",t.displayName)),u}while(1<=s&&0<=l);break}}}finally{zm=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ku(t):""}function OK(t){switch(t.tag){case 5:return ku(t.type);case 16:return ku("Lazy");case 13:return ku("Suspense");case 19:return ku("SuspenseList");case 0:case 2:case 15:return t=Fm(t.type,!1),t;case 11:return t=Fm(t.type.render,!1),t;case 1:return t=Fm(t.type,!0),t;default:return""}}function Qg(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ta:return"Fragment";case ea:return"Portal";case Wg:return"Profiler";case vv:return"StrictMode";case Jg:return"Suspense";case Zg:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case QA:return(t.displayName||"Context")+".Consumer";case ZA:return(t._context.displayName||"Context")+".Provider";case Ev:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case wv:return e=t.displayName||null,e!==null?e:Qg(t.type)||"Memo";case qi:e=t._payload,t=t._init;try{return Qg(t(e))}catch{}}return null}function KK(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qg(e);case 8:return e===vv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function po(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function eS(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function VK(t){var e=eS(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){n=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function pp(t){t._valueTracker||(t._valueTracker=VK(t))}function tS(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=eS(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Af(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Yg(t,e){var r=e.checked;return Ve({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function lx(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=po(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function rS(t,e){e=e.checked,e!=null&&bv(t,"checked",e,!1)}function eb(t,e){rS(t,e);var r=po(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?tb(t,e.type,r):e.hasOwnProperty("defaultValue")&&tb(t,e.type,po(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ux(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function tb(t,e,r){(e!=="number"||Af(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Lu=Array.isArray;function pa(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+po(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function rb(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(I(91));return Ve({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function cx(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(I(92));if(Lu(r)){if(1<r.length)throw Error(I(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:po(r)}}function nS(t,e){var r=po(e.value),n=po(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function dx(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function iS(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function nb(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?iS(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var fp,oS=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(fp=fp||document.createElement("div"),fp.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=fp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ju(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var Iu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},MK=["Webkit","ms","Moz","O"];Object.keys(Iu).forEach(function(t){MK.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Iu[e]=Iu[t]})});function sS(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||Iu.hasOwnProperty(t)&&Iu[t]?(""+e).trim():e+"px"}function aS(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=sS(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var NK=Ve({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ib(t,e){if(e){if(NK[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(I(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(I(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(I(61))}if(e.style!=null&&typeof e.style!="object")throw Error(I(62))}}function ob(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sb=null;function _v(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ab=null,fa=null,ha=null;function px(t){if(t=Bc(t)){if(typeof ab!="function")throw Error(I(280));var e=t.stateNode;e&&(e=Rh(e),ab(t.stateNode,t.type,e))}}function lS(t){fa?ha?ha.push(t):ha=[t]:fa=t}function uS(){if(fa){var t=fa,e=ha;if(ha=fa=null,px(t),e)for(t=0;t<e.length;t++)px(e[t])}}function cS(t,e){return t(e)}function dS(){}var qm=!1;function pS(t,e,r){if(qm)return t(e,r);qm=!0;try{return cS(t,e,r)}finally{qm=!1,(fa!==null||ha!==null)&&(dS(),uS())}}function Zu(t,e){var r=t.stateNode;if(r===null)return null;var n=Rh(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(I(231,e,typeof r));return r}var lb=!1;if(Ei)try{var cu={};Object.defineProperty(cu,"passive",{get:function(){lb=!0}}),window.addEventListener("test",cu,cu),window.removeEventListener("test",cu,cu)}catch{lb=!1}function zK(t,e,r,n,i,o,s,l,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(d){this.onError(d)}}var ju=!1,Sf=null,Cf=!1,ub=null,FK={onError:function(t){ju=!0,Sf=t}};function qK(t,e,r,n,i,o,s,l,u){ju=!1,Sf=null,zK.apply(FK,arguments)}function GK(t,e,r,n,i,o,s,l,u){if(qK.apply(this,arguments),ju){if(ju){var c=Sf;ju=!1,Sf=null}else throw Error(I(198));Cf||(Cf=!0,ub=c)}}function Bs(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function fS(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function fx(t){if(Bs(t)!==t)throw Error(I(188))}function HK(t){var e=t.alternate;if(!e){if(e=Bs(t),e===null)throw Error(I(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var o=i.alternate;if(o===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===r)return fx(i),t;if(o===n)return fx(i),e;o=o.sibling}throw Error(I(188))}if(r.return!==n.return)r=i,n=o;else{for(var s=!1,l=i.child;l;){if(l===r){s=!0,r=i,n=o;break}if(l===n){s=!0,n=i,r=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===r){s=!0,r=o,n=i;break}if(l===n){s=!0,n=o,r=i;break}l=l.sibling}if(!s)throw Error(I(189))}}if(r.alternate!==n)throw Error(I(190))}if(r.tag!==3)throw Error(I(188));return r.stateNode.current===r?t:e}function hS(t){return t=HK(t),t!==null?yS(t):null}function yS(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=yS(t);if(e!==null)return e;t=t.sibling}return null}var mS=wr.unstable_scheduleCallback,hx=wr.unstable_cancelCallback,XK=wr.unstable_shouldYield,WK=wr.unstable_requestPaint,Fe=wr.unstable_now,JK=wr.unstable_getCurrentPriorityLevel,xv=wr.unstable_ImmediatePriority,gS=wr.unstable_UserBlockingPriority,Tf=wr.unstable_NormalPriority,ZK=wr.unstable_LowPriority,bS=wr.unstable_IdlePriority,Eh=null,Tn=null;function QK(t){if(Tn&&typeof Tn.onCommitFiberRoot=="function")try{Tn.onCommitFiberRoot(Eh,t,void 0,(t.current.flags&128)===128)}catch{}}var hn=Math.clz32?Math.clz32:tV,YK=Math.log,eV=Math.LN2;function tV(t){return t>>>=0,t===0?32:31-(YK(t)/eV|0)|0}var hp=64,yp=4194304;function Pu(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function kf(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,s=r&268435455;if(s!==0){var l=s&~i;l!==0?n=Pu(l):(o&=s,o!==0&&(n=Pu(o)))}else s=r&~i,s!==0?n=Pu(s):o!==0&&(n=Pu(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-hn(e),i=1<<r,n|=t[r],e&=~i;return n}function rV(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nV(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var s=31-hn(o),l=1<<s,u=i[s];u===-1?(!(l&r)||l&n)&&(i[s]=rV(l,e)):u<=e&&(t.expiredLanes|=l),o&=~l}}function cb(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function vS(){var t=hp;return hp<<=1,!(hp&4194240)&&(hp=64),t}function Gm(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function Pc(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-hn(e),t[e]=r}function iV(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-hn(r),o=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~o}}function Rv(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-hn(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var xe=0;function ES(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var wS,Av,_S,xS,RS,db=!1,mp=[],to=null,ro=null,no=null,Qu=new Map,Yu=new Map,Xi=[],oV="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function yx(t,e){switch(t){case"focusin":case"focusout":to=null;break;case"dragenter":case"dragleave":ro=null;break;case"mouseover":case"mouseout":no=null;break;case"pointerover":case"pointerout":Qu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yu.delete(e.pointerId)}}function du(t,e,r,n,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Bc(e),e!==null&&Av(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function sV(t,e,r,n,i){switch(e){case"focusin":return to=du(to,t,e,r,n,i),!0;case"dragenter":return ro=du(ro,t,e,r,n,i),!0;case"mouseover":return no=du(no,t,e,r,n,i),!0;case"pointerover":var o=i.pointerId;return Qu.set(o,du(Qu.get(o)||null,t,e,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,Yu.set(o,du(Yu.get(o)||null,t,e,r,n,i)),!0}return!1}function AS(t){var e=fs(t.target);if(e!==null){var r=Bs(e);if(r!==null){if(e=r.tag,e===13){if(e=fS(r),e!==null){t.blockedOn=e,RS(t.priority,function(){_S(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function tf(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=pb(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);sb=n,r.target.dispatchEvent(n),sb=null}else return e=Bc(r),e!==null&&Av(e),t.blockedOn=r,!1;e.shift()}return!0}function mx(t,e,r){tf(t)&&r.delete(e)}function aV(){db=!1,to!==null&&tf(to)&&(to=null),ro!==null&&tf(ro)&&(ro=null),no!==null&&tf(no)&&(no=null),Qu.forEach(mx),Yu.forEach(mx)}function pu(t,e){t.blockedOn===e&&(t.blockedOn=null,db||(db=!0,wr.unstable_scheduleCallback(wr.unstable_NormalPriority,aV)))}function ec(t){function e(i){return pu(i,t)}if(0<mp.length){pu(mp[0],t);for(var r=1;r<mp.length;r++){var n=mp[r];n.blockedOn===t&&(n.blockedOn=null)}}for(to!==null&&pu(to,t),ro!==null&&pu(ro,t),no!==null&&pu(no,t),Qu.forEach(e),Yu.forEach(e),r=0;r<Xi.length;r++)n=Xi[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Xi.length&&(r=Xi[0],r.blockedOn===null);)AS(r),r.blockedOn===null&&Xi.shift()}var ya=Ai.ReactCurrentBatchConfig,Lf=!0;function lV(t,e,r,n){var i=xe,o=ya.transition;ya.transition=null;try{xe=1,Sv(t,e,r,n)}finally{xe=i,ya.transition=o}}function uV(t,e,r,n){var i=xe,o=ya.transition;ya.transition=null;try{xe=4,Sv(t,e,r,n)}finally{xe=i,ya.transition=o}}function Sv(t,e,r,n){if(Lf){var i=pb(t,e,r,n);if(i===null)rg(t,e,n,Pf,r),yx(t,n);else if(sV(i,t,e,r,n))n.stopPropagation();else if(yx(t,n),e&4&&-1<oV.indexOf(t)){for(;i!==null;){var o=Bc(i);if(o!==null&&wS(o),o=pb(t,e,r,n),o===null&&rg(t,e,n,Pf,r),o===i)break;i=o}i!==null&&n.stopPropagation()}else rg(t,e,n,null,r)}}var Pf=null;function pb(t,e,r,n){if(Pf=null,t=_v(n),t=fs(t),t!==null)if(e=Bs(t),e===null)t=null;else if(r=e.tag,r===13){if(t=fS(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Pf=t,null}function SS(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(JK()){case xv:return 1;case gS:return 4;case Tf:case ZK:return 16;case bS:return 536870912;default:return 16}default:return 16}}var Zi=null,Cv=null,rf=null;function CS(){if(rf)return rf;var t,e=Cv,r=e.length,n,i="value"in Zi?Zi.value:Zi.textContent,o=i.length;for(t=0;t<r&&e[t]===i[t];t++);var s=r-t;for(n=1;n<=s&&e[r-n]===i[o-n];n++);return rf=i.slice(t,1<n?1-n:void 0)}function nf(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function gp(){return!0}function gx(){return!1}function xr(t){function e(r,n,i,o,s){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in t)t.hasOwnProperty(l)&&(r=t[l],this[l]=r?r(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?gp:gx,this.isPropagationStopped=gx,this}return Ve(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=gp)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=gp)},persist:function(){},isPersistent:gp}),e}var Oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tv=xr(Oa),Dc=Ve({},Oa,{view:0,detail:0}),cV=xr(Dc),Hm,Xm,fu,wh=Ve({},Dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kv,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==fu&&(fu&&t.type==="mousemove"?(Hm=t.screenX-fu.screenX,Xm=t.screenY-fu.screenY):Xm=Hm=0,fu=t),Hm)},movementY:function(t){return"movementY"in t?t.movementY:Xm}}),bx=xr(wh),dV=Ve({},wh,{dataTransfer:0}),pV=xr(dV),fV=Ve({},Dc,{relatedTarget:0}),Wm=xr(fV),hV=Ve({},Oa,{animationName:0,elapsedTime:0,pseudoElement:0}),yV=xr(hV),mV=Ve({},Oa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),gV=xr(mV),bV=Ve({},Oa,{data:0}),vx=xr(bV),vV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EV={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _V(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=wV[t])?!!e[t]:!1}function kv(){return _V}var xV=Ve({},Dc,{key:function(t){if(t.key){var e=vV[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=nf(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?EV[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kv,charCode:function(t){return t.type==="keypress"?nf(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?nf(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),RV=xr(xV),AV=Ve({},wh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ex=xr(AV),SV=Ve({},Dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kv}),CV=xr(SV),TV=Ve({},Oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),kV=xr(TV),LV=Ve({},wh,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),PV=xr(LV),DV=[9,13,27,32],Lv=Ei&&"CompositionEvent"in window,Uu=null;Ei&&"documentMode"in document&&(Uu=document.documentMode);var BV=Ei&&"TextEvent"in window&&!Uu,TS=Ei&&(!Lv||Uu&&8<Uu&&11>=Uu),wx=" ",_x=!1;function kS(t,e){switch(t){case"keyup":return DV.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function LS(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ra=!1;function IV(t,e){switch(t){case"compositionend":return LS(e);case"keypress":return e.which!==32?null:(_x=!0,wx);case"textInput":return t=e.data,t===wx&&_x?null:t;default:return null}}function jV(t,e){if(ra)return t==="compositionend"||!Lv&&kS(t,e)?(t=CS(),rf=Cv=Zi=null,ra=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return TS&&e.locale!=="ko"?null:e.data;default:return null}}var UV={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xx(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!UV[t.type]:e==="textarea"}function PS(t,e,r,n){lS(n),e=Df(e,"onChange"),0<e.length&&(r=new Tv("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var $u=null,tc=null;function $V(t){NS(t,0)}function _h(t){var e=oa(t);if(tS(e))return t}function OV(t,e){if(t==="change")return e}var DS=!1;if(Ei){var Jm;if(Ei){var Zm="oninput"in document;if(!Zm){var Rx=document.createElement("div");Rx.setAttribute("oninput","return;"),Zm=typeof Rx.oninput=="function"}Jm=Zm}else Jm=!1;DS=Jm&&(!document.documentMode||9<document.documentMode)}function Ax(){$u&&($u.detachEvent("onpropertychange",BS),tc=$u=null)}function BS(t){if(t.propertyName==="value"&&_h(tc)){var e=[];PS(e,tc,t,_v(t)),pS($V,e)}}function KV(t,e,r){t==="focusin"?(Ax(),$u=e,tc=r,$u.attachEvent("onpropertychange",BS)):t==="focusout"&&Ax()}function VV(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return _h(tc)}function MV(t,e){if(t==="click")return _h(e)}function NV(t,e){if(t==="input"||t==="change")return _h(e)}function zV(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var gn=typeof Object.is=="function"?Object.is:zV;function rc(t,e){if(gn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!Xg.call(e,i)||!gn(t[i],e[i]))return!1}return!0}function Sx(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cx(t,e){var r=Sx(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Sx(r)}}function IS(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?IS(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function jS(){for(var t=window,e=Af();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Af(t.document)}return e}function Pv(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function FV(t){var e=jS(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&IS(r.ownerDocument.documentElement,r)){if(n!==null&&Pv(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=Cx(r,o);var s=Cx(r,n);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var qV=Ei&&"documentMode"in document&&11>=document.documentMode,na=null,fb=null,Ou=null,hb=!1;function Tx(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;hb||na==null||na!==Af(n)||(n=na,"selectionStart"in n&&Pv(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ou&&rc(Ou,n)||(Ou=n,n=Df(fb,"onSelect"),0<n.length&&(e=new Tv("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=na)))}function bp(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var ia={animationend:bp("Animation","AnimationEnd"),animationiteration:bp("Animation","AnimationIteration"),animationstart:bp("Animation","AnimationStart"),transitionend:bp("Transition","TransitionEnd")},Qm={},US={};Ei&&(US=document.createElement("div").style,"AnimationEvent"in window||(delete ia.animationend.animation,delete ia.animationiteration.animation,delete ia.animationstart.animation),"TransitionEvent"in window||delete ia.transitionend.transition);function xh(t){if(Qm[t])return Qm[t];if(!ia[t])return t;var e=ia[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in US)return Qm[t]=e[r];return t}var $S=xh("animationend"),OS=xh("animationiteration"),KS=xh("animationstart"),VS=xh("transitionend"),MS=new Map,kx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function To(t,e){MS.set(t,e),Ds(e,[t])}for(var Ym=0;Ym<kx.length;Ym++){var eg=kx[Ym],GV=eg.toLowerCase(),HV=eg[0].toUpperCase()+eg.slice(1);To(GV,"on"+HV)}To($S,"onAnimationEnd");To(OS,"onAnimationIteration");To(KS,"onAnimationStart");To("dblclick","onDoubleClick");To("focusin","onFocus");To("focusout","onBlur");To(VS,"onTransitionEnd");xa("onMouseEnter",["mouseout","mouseover"]);xa("onMouseLeave",["mouseout","mouseover"]);xa("onPointerEnter",["pointerout","pointerover"]);xa("onPointerLeave",["pointerout","pointerover"]);Ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ds("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Du="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),XV=new Set("cancel close invalid load scroll toggle".split(" ").concat(Du));function Lx(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,GK(n,e,void 0,t),t.currentTarget=null}function NS(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var o=void 0;if(e)for(var s=n.length-1;0<=s;s--){var l=n[s],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==o&&i.isPropagationStopped())break e;Lx(i,l,c),o=u}else for(s=0;s<n.length;s++){if(l=n[s],u=l.instance,c=l.currentTarget,l=l.listener,u!==o&&i.isPropagationStopped())break e;Lx(i,l,c),o=u}}}if(Cf)throw t=ub,Cf=!1,ub=null,t}function Ce(t,e){var r=e[vb];r===void 0&&(r=e[vb]=new Set);var n=t+"__bubble";r.has(n)||(zS(e,t,2,!1),r.add(n))}function tg(t,e,r){var n=0;e&&(n|=4),zS(r,t,n,e)}var vp="_reactListening"+Math.random().toString(36).slice(2);function nc(t){if(!t[vp]){t[vp]=!0,JA.forEach(function(r){r!=="selectionchange"&&(XV.has(r)||tg(r,!1,t),tg(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[vp]||(e[vp]=!0,tg("selectionchange",!1,e))}}function zS(t,e,r,n){switch(SS(e)){case 1:var i=lV;break;case 4:i=uV;break;default:i=Sv}r=i.bind(null,e,r,t),i=void 0,!lb||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function rg(t,e,r,n,i){var o=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var l=n.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=n.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;l!==null;){if(s=fs(l),s===null)return;if(u=s.tag,u===5||u===6){n=o=s;continue e}l=l.parentNode}}n=n.return}pS(function(){var c=o,d=_v(r),f=[];e:{var h=MS.get(t);if(h!==void 0){var g=Tv,b=t;switch(t){case"keypress":if(nf(r)===0)break e;case"keydown":case"keyup":g=RV;break;case"focusin":b="focus",g=Wm;break;case"focusout":b="blur",g=Wm;break;case"beforeblur":case"afterblur":g=Wm;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=bx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=pV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=CV;break;case $S:case OS:case KS:g=yV;break;case VS:g=kV;break;case"scroll":g=cV;break;case"wheel":g=PV;break;case"copy":case"cut":case"paste":g=gV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Ex}var w=(e&4)!==0,C=!w&&t==="scroll",y=w?h!==null?h+"Capture":null:h;w=[];for(var m=c,E;m!==null;){E=m;var A=E.stateNode;if(E.tag===5&&A!==null&&(E=A,y!==null&&(A=Zu(m,y),A!=null&&w.push(ic(m,A,E)))),C)break;m=m.return}0<w.length&&(h=new g(h,b,null,r,d),f.push({event:h,listeners:w}))}}if(!(e&7)){e:{if(h=t==="mouseover"||t==="pointerover",g=t==="mouseout"||t==="pointerout",h&&r!==sb&&(b=r.relatedTarget||r.fromElement)&&(fs(b)||b[wi]))break e;if((g||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,g?(b=r.relatedTarget||r.toElement,g=c,b=b?fs(b):null,b!==null&&(C=Bs(b),b!==C||b.tag!==5&&b.tag!==6)&&(b=null)):(g=null,b=c),g!==b)){if(w=bx,A="onMouseLeave",y="onMouseEnter",m="mouse",(t==="pointerout"||t==="pointerover")&&(w=Ex,A="onPointerLeave",y="onPointerEnter",m="pointer"),C=g==null?h:oa(g),E=b==null?h:oa(b),h=new w(A,m+"leave",g,r,d),h.target=C,h.relatedTarget=E,A=null,fs(d)===c&&(w=new w(y,m+"enter",b,r,d),w.target=E,w.relatedTarget=C,A=w),C=A,g&&b)t:{for(w=g,y=b,m=0,E=w;E;E=zs(E))m++;for(E=0,A=y;A;A=zs(A))E++;for(;0<m-E;)w=zs(w),m--;for(;0<E-m;)y=zs(y),E--;for(;m--;){if(w===y||y!==null&&w===y.alternate)break t;w=zs(w),y=zs(y)}w=null}else w=null;g!==null&&Px(f,h,g,w,!1),b!==null&&C!==null&&Px(f,C,b,w,!0)}}e:{if(h=c?oa(c):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var L=OV;else if(xx(h))if(DS)L=NV;else{L=VV;var D=KV}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(L=MV);if(L&&(L=L(t,c))){PS(f,L,r,d);break e}D&&D(t,h,c),t==="focusout"&&(D=h._wrapperState)&&D.controlled&&h.type==="number"&&tb(h,"number",h.value)}switch(D=c?oa(c):window,t){case"focusin":(xx(D)||D.contentEditable==="true")&&(na=D,fb=c,Ou=null);break;case"focusout":Ou=fb=na=null;break;case"mousedown":hb=!0;break;case"contextmenu":case"mouseup":case"dragend":hb=!1,Tx(f,r,d);break;case"selectionchange":if(qV)break;case"keydown":case"keyup":Tx(f,r,d)}var B;if(Lv)e:{switch(t){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else ra?kS(t,r)&&(j="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(j="onCompositionStart");j&&(TS&&r.locale!=="ko"&&(ra||j!=="onCompositionStart"?j==="onCompositionEnd"&&ra&&(B=CS()):(Zi=d,Cv="value"in Zi?Zi.value:Zi.textContent,ra=!0)),D=Df(c,j),0<D.length&&(j=new vx(j,t,null,r,d),f.push({event:j,listeners:D}),B?j.data=B:(B=LS(r),B!==null&&(j.data=B)))),(B=BV?IV(t,r):jV(t,r))&&(c=Df(c,"onBeforeInput"),0<c.length&&(d=new vx("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:c}),d.data=B))}NS(f,e)})}function ic(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Df(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Zu(t,r),o!=null&&n.unshift(ic(t,o,i)),o=Zu(t,e),o!=null&&n.push(ic(t,o,i))),t=t.return}return n}function zs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Px(t,e,r,n,i){for(var o=e._reactName,s=[];r!==null&&r!==n;){var l=r,u=l.alternate,c=l.stateNode;if(u!==null&&u===n)break;l.tag===5&&c!==null&&(l=c,i?(u=Zu(r,o),u!=null&&s.unshift(ic(r,u,l))):i||(u=Zu(r,o),u!=null&&s.push(ic(r,u,l)))),r=r.return}s.length!==0&&t.push({event:e,listeners:s})}var WV=/\r\n?/g,JV=/\u0000|\uFFFD/g;function Dx(t){return(typeof t=="string"?t:""+t).replace(WV,`
`).replace(JV,"")}function Ep(t,e,r){if(e=Dx(e),Dx(t)!==e&&r)throw Error(I(425))}function Bf(){}var yb=null,mb=null;function gb(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var bb=typeof setTimeout=="function"?setTimeout:void 0,ZV=typeof clearTimeout=="function"?clearTimeout:void 0,Bx=typeof Promise=="function"?Promise:void 0,QV=typeof queueMicrotask=="function"?queueMicrotask:typeof Bx<"u"?function(t){return Bx.resolve(null).then(t).catch(YV)}:bb;function YV(t){setTimeout(function(){throw t})}function ng(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),ec(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);ec(e)}function io(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Ix(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Ka=Math.random().toString(36).slice(2),Sn="__reactFiber$"+Ka,oc="__reactProps$"+Ka,wi="__reactContainer$"+Ka,vb="__reactEvents$"+Ka,eM="__reactListeners$"+Ka,tM="__reactHandles$"+Ka;function fs(t){var e=t[Sn];if(e)return e;for(var r=t.parentNode;r;){if(e=r[wi]||r[Sn]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Ix(t);t!==null;){if(r=t[Sn])return r;t=Ix(t)}return e}t=r,r=t.parentNode}return null}function Bc(t){return t=t[Sn]||t[wi],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function oa(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(I(33))}function Rh(t){return t[oc]||null}var Eb=[],sa=-1;function ko(t){return{current:t}}function Pe(t){0>sa||(t.current=Eb[sa],Eb[sa]=null,sa--)}function Se(t,e){sa++,Eb[sa]=t.current,t.current=e}var fo={},It=ko(fo),or=ko(!1),xs=fo;function Ra(t,e){var r=t.type.contextTypes;if(!r)return fo;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function sr(t){return t=t.childContextTypes,t!=null}function If(){Pe(or),Pe(It)}function jx(t,e,r){if(It.current!==fo)throw Error(I(168));Se(It,e),Se(or,r)}function FS(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(I(108,KK(t)||"Unknown",i));return Ve({},r,n)}function jf(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||fo,xs=It.current,Se(It,t),Se(or,or.current),!0}function Ux(t,e,r){var n=t.stateNode;if(!n)throw Error(I(169));r?(t=FS(t,e,xs),n.__reactInternalMemoizedMergedChildContext=t,Pe(or),Pe(It),Se(It,t)):Pe(or),Se(or,r)}var li=null,Ah=!1,ig=!1;function qS(t){li===null?li=[t]:li.push(t)}function rM(t){Ah=!0,qS(t)}function Lo(){if(!ig&&li!==null){ig=!0;var t=0,e=xe;try{var r=li;for(xe=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}li=null,Ah=!1}catch(i){throw li!==null&&(li=li.slice(t+1)),mS(xv,Lo),i}finally{xe=e,ig=!1}}return null}var aa=[],la=0,Uf=null,$f=0,Tr=[],kr=0,Rs=null,fi=1,hi="";function os(t,e){aa[la++]=$f,aa[la++]=Uf,Uf=t,$f=e}function GS(t,e,r){Tr[kr++]=fi,Tr[kr++]=hi,Tr[kr++]=Rs,Rs=t;var n=fi;t=hi;var i=32-hn(n)-1;n&=~(1<<i),r+=1;var o=32-hn(e)+i;if(30<o){var s=i-i%5;o=(n&(1<<s)-1).toString(32),n>>=s,i-=s,fi=1<<32-hn(e)+i|r<<i|n,hi=o+t}else fi=1<<o|r<<i|n,hi=t}function Dv(t){t.return!==null&&(os(t,1),GS(t,1,0))}function Bv(t){for(;t===Uf;)Uf=aa[--la],aa[la]=null,$f=aa[--la],aa[la]=null;for(;t===Rs;)Rs=Tr[--kr],Tr[kr]=null,hi=Tr[--kr],Tr[kr]=null,fi=Tr[--kr],Tr[kr]=null}var Er=null,vr=null,Be=!1,cn=null;function HS(t,e){var r=Pr(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function $x(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Er=t,vr=io(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Er=t,vr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=Rs!==null?{id:fi,overflow:hi}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Pr(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Er=t,vr=null,!0):!1;default:return!1}}function wb(t){return(t.mode&1)!==0&&(t.flags&128)===0}function _b(t){if(Be){var e=vr;if(e){var r=e;if(!$x(t,e)){if(wb(t))throw Error(I(418));e=io(r.nextSibling);var n=Er;e&&$x(t,e)?HS(n,r):(t.flags=t.flags&-4097|2,Be=!1,Er=t)}}else{if(wb(t))throw Error(I(418));t.flags=t.flags&-4097|2,Be=!1,Er=t}}}function Ox(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Er=t}function wp(t){if(t!==Er)return!1;if(!Be)return Ox(t),Be=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!gb(t.type,t.memoizedProps)),e&&(e=vr)){if(wb(t))throw XS(),Error(I(418));for(;e;)HS(t,e),e=io(e.nextSibling)}if(Ox(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(I(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){vr=io(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}vr=null}}else vr=Er?io(t.stateNode.nextSibling):null;return!0}function XS(){for(var t=vr;t;)t=io(t.nextSibling)}function Aa(){vr=Er=null,Be=!1}function Iv(t){cn===null?cn=[t]:cn.push(t)}var nM=Ai.ReactCurrentBatchConfig;function hu(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(I(309));var n=r.stateNode}if(!n)throw Error(I(147,t));var i=n,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},e._stringRef=o,e)}if(typeof t!="string")throw Error(I(284));if(!r._owner)throw Error(I(290,t))}return t}function _p(t,e){throw t=Object.prototype.toString.call(e),Error(I(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Kx(t){var e=t._init;return e(t._payload)}function WS(t){function e(y,m){if(t){var E=y.deletions;E===null?(y.deletions=[m],y.flags|=16):E.push(m)}}function r(y,m){if(!t)return null;for(;m!==null;)e(y,m),m=m.sibling;return null}function n(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function i(y,m){return y=lo(y,m),y.index=0,y.sibling=null,y}function o(y,m,E){return y.index=E,t?(E=y.alternate,E!==null?(E=E.index,E<m?(y.flags|=2,m):E):(y.flags|=2,m)):(y.flags|=1048576,m)}function s(y){return t&&y.alternate===null&&(y.flags|=2),y}function l(y,m,E,A){return m===null||m.tag!==6?(m=dg(E,y.mode,A),m.return=y,m):(m=i(m,E),m.return=y,m)}function u(y,m,E,A){var L=E.type;return L===ta?d(y,m,E.props.children,A,E.key):m!==null&&(m.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===qi&&Kx(L)===m.type)?(A=i(m,E.props),A.ref=hu(y,m,E),A.return=y,A):(A=df(E.type,E.key,E.props,null,y.mode,A),A.ref=hu(y,m,E),A.return=y,A)}function c(y,m,E,A){return m===null||m.tag!==4||m.stateNode.containerInfo!==E.containerInfo||m.stateNode.implementation!==E.implementation?(m=pg(E,y.mode,A),m.return=y,m):(m=i(m,E.children||[]),m.return=y,m)}function d(y,m,E,A,L){return m===null||m.tag!==7?(m=Es(E,y.mode,A,L),m.return=y,m):(m=i(m,E),m.return=y,m)}function f(y,m,E){if(typeof m=="string"&&m!==""||typeof m=="number")return m=dg(""+m,y.mode,E),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case dp:return E=df(m.type,m.key,m.props,null,y.mode,E),E.ref=hu(y,null,m),E.return=y,E;case ea:return m=pg(m,y.mode,E),m.return=y,m;case qi:var A=m._init;return f(y,A(m._payload),E)}if(Lu(m)||uu(m))return m=Es(m,y.mode,E,null),m.return=y,m;_p(y,m)}return null}function h(y,m,E,A){var L=m!==null?m.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return L!==null?null:l(y,m,""+E,A);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case dp:return E.key===L?u(y,m,E,A):null;case ea:return E.key===L?c(y,m,E,A):null;case qi:return L=E._init,h(y,m,L(E._payload),A)}if(Lu(E)||uu(E))return L!==null?null:d(y,m,E,A,null);_p(y,E)}return null}function g(y,m,E,A,L){if(typeof A=="string"&&A!==""||typeof A=="number")return y=y.get(E)||null,l(m,y,""+A,L);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case dp:return y=y.get(A.key===null?E:A.key)||null,u(m,y,A,L);case ea:return y=y.get(A.key===null?E:A.key)||null,c(m,y,A,L);case qi:var D=A._init;return g(y,m,E,D(A._payload),L)}if(Lu(A)||uu(A))return y=y.get(E)||null,d(m,y,A,L,null);_p(m,A)}return null}function b(y,m,E,A){for(var L=null,D=null,B=m,j=m=0,pe=null;B!==null&&j<E.length;j++){B.index>j?(pe=B,B=null):pe=B.sibling;var ee=h(y,B,E[j],A);if(ee===null){B===null&&(B=pe);break}t&&B&&ee.alternate===null&&e(y,B),m=o(ee,m,j),D===null?L=ee:D.sibling=ee,D=ee,B=pe}if(j===E.length)return r(y,B),Be&&os(y,j),L;if(B===null){for(;j<E.length;j++)B=f(y,E[j],A),B!==null&&(m=o(B,m,j),D===null?L=B:D.sibling=B,D=B);return Be&&os(y,j),L}for(B=n(y,B);j<E.length;j++)pe=g(B,y,j,E[j],A),pe!==null&&(t&&pe.alternate!==null&&B.delete(pe.key===null?j:pe.key),m=o(pe,m,j),D===null?L=pe:D.sibling=pe,D=pe);return t&&B.forEach(function(Zt){return e(y,Zt)}),Be&&os(y,j),L}function w(y,m,E,A){var L=uu(E);if(typeof L!="function")throw Error(I(150));if(E=L.call(E),E==null)throw Error(I(151));for(var D=L=null,B=m,j=m=0,pe=null,ee=E.next();B!==null&&!ee.done;j++,ee=E.next()){B.index>j?(pe=B,B=null):pe=B.sibling;var Zt=h(y,B,ee.value,A);if(Zt===null){B===null&&(B=pe);break}t&&B&&Zt.alternate===null&&e(y,B),m=o(Zt,m,j),D===null?L=Zt:D.sibling=Zt,D=Zt,B=pe}if(ee.done)return r(y,B),Be&&os(y,j),L;if(B===null){for(;!ee.done;j++,ee=E.next())ee=f(y,ee.value,A),ee!==null&&(m=o(ee,m,j),D===null?L=ee:D.sibling=ee,D=ee);return Be&&os(y,j),L}for(B=n(y,B);!ee.done;j++,ee=E.next())ee=g(B,y,j,ee.value,A),ee!==null&&(t&&ee.alternate!==null&&B.delete(ee.key===null?j:ee.key),m=o(ee,m,j),D===null?L=ee:D.sibling=ee,D=ee);return t&&B.forEach(function(Li){return e(y,Li)}),Be&&os(y,j),L}function C(y,m,E,A){if(typeof E=="object"&&E!==null&&E.type===ta&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case dp:e:{for(var L=E.key,D=m;D!==null;){if(D.key===L){if(L=E.type,L===ta){if(D.tag===7){r(y,D.sibling),m=i(D,E.props.children),m.return=y,y=m;break e}}else if(D.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===qi&&Kx(L)===D.type){r(y,D.sibling),m=i(D,E.props),m.ref=hu(y,D,E),m.return=y,y=m;break e}r(y,D);break}else e(y,D);D=D.sibling}E.type===ta?(m=Es(E.props.children,y.mode,A,E.key),m.return=y,y=m):(A=df(E.type,E.key,E.props,null,y.mode,A),A.ref=hu(y,m,E),A.return=y,y=A)}return s(y);case ea:e:{for(D=E.key;m!==null;){if(m.key===D)if(m.tag===4&&m.stateNode.containerInfo===E.containerInfo&&m.stateNode.implementation===E.implementation){r(y,m.sibling),m=i(m,E.children||[]),m.return=y,y=m;break e}else{r(y,m);break}else e(y,m);m=m.sibling}m=pg(E,y.mode,A),m.return=y,y=m}return s(y);case qi:return D=E._init,C(y,m,D(E._payload),A)}if(Lu(E))return b(y,m,E,A);if(uu(E))return w(y,m,E,A);_p(y,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,m!==null&&m.tag===6?(r(y,m.sibling),m=i(m,E),m.return=y,y=m):(r(y,m),m=dg(E,y.mode,A),m.return=y,y=m),s(y)):r(y,m)}return C}var Sa=WS(!0),JS=WS(!1),Of=ko(null),Kf=null,ua=null,jv=null;function Uv(){jv=ua=Kf=null}function $v(t){var e=Of.current;Pe(Of),t._currentValue=e}function xb(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function ma(t,e){Kf=t,jv=ua=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ir=!0),t.firstContext=null)}function Or(t){var e=t._currentValue;if(jv!==t)if(t={context:t,memoizedValue:e,next:null},ua===null){if(Kf===null)throw Error(I(308));ua=t,Kf.dependencies={lanes:0,firstContext:t}}else ua=ua.next=t;return e}var hs=null;function Ov(t){hs===null?hs=[t]:hs.push(t)}function ZS(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,Ov(e)):(r.next=i.next,i.next=r),e.interleaved=r,_i(t,n)}function _i(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Gi=!1;function Kv(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function QS(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function yi(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function oo(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ve&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,_i(t,r)}return i=n.interleaved,i===null?(e.next=e,Ov(n)):(e.next=i.next,i.next=e),n.interleaved=e,_i(t,r)}function of(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Rv(t,r)}}function Vx(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=s:o=o.next=s,r=r.next}while(r!==null);o===null?i=o=e:o=o.next=e}else i=o=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Vf(t,e,r,n){var i=t.updateQueue;Gi=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,c=u.next;u.next=null,s===null?o=c:s.next=c,s=u;var d=t.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==s&&(l===null?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(o!==null){var f=i.baseState;s=0,d=c=u=null,l=o;do{var h=l.lane,g=l.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var b=t,w=l;switch(h=e,g=r,w.tag){case 1:if(b=w.payload,typeof b=="function"){f=b.call(g,f,h);break e}f=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=w.payload,h=typeof b=="function"?b.call(g,f,h):b,h==null)break e;f=Ve({},f,h);break e;case 2:Gi=!0}}l.callback!==null&&l.lane!==0&&(t.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else g={eventTime:g,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(c=d=g,u=f):d=d.next=g,s|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(u=f),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=d,e=i.shared.interleaved,e!==null){i=e;do s|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);Ss|=s,t.lanes=s,t.memoizedState=f}}function Mx(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(I(191,i));i.call(n)}}}var Ic={},kn=ko(Ic),sc=ko(Ic),ac=ko(Ic);function ys(t){if(t===Ic)throw Error(I(174));return t}function Vv(t,e){switch(Se(ac,e),Se(sc,t),Se(kn,Ic),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:nb(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=nb(e,t)}Pe(kn),Se(kn,e)}function Ca(){Pe(kn),Pe(sc),Pe(ac)}function YS(t){ys(ac.current);var e=ys(kn.current),r=nb(e,t.type);e!==r&&(Se(sc,t),Se(kn,r))}function Mv(t){sc.current===t&&(Pe(kn),Pe(sc))}var $e=ko(0);function Mf(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var og=[];function Nv(){for(var t=0;t<og.length;t++)og[t]._workInProgressVersionPrimary=null;og.length=0}var sf=Ai.ReactCurrentDispatcher,sg=Ai.ReactCurrentBatchConfig,As=0,Ke=null,nt=null,pt=null,Nf=!1,Ku=!1,lc=0,iM=0;function At(){throw Error(I(321))}function zv(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!gn(t[r],e[r]))return!1;return!0}function Fv(t,e,r,n,i,o){if(As=o,Ke=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,sf.current=t===null||t.memoizedState===null?lM:uM,t=r(n,i),Ku){o=0;do{if(Ku=!1,lc=0,25<=o)throw Error(I(301));o+=1,pt=nt=null,e.updateQueue=null,sf.current=cM,t=r(n,i)}while(Ku)}if(sf.current=zf,e=nt!==null&&nt.next!==null,As=0,pt=nt=Ke=null,Nf=!1,e)throw Error(I(300));return t}function qv(){var t=lc!==0;return lc=0,t}function Rn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ke.memoizedState=pt=t:pt=pt.next=t,pt}function Kr(){if(nt===null){var t=Ke.alternate;t=t!==null?t.memoizedState:null}else t=nt.next;var e=pt===null?Ke.memoizedState:pt.next;if(e!==null)pt=e,nt=t;else{if(t===null)throw Error(I(310));nt=t,t={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},pt===null?Ke.memoizedState=pt=t:pt=pt.next=t}return pt}function uc(t,e){return typeof e=="function"?e(t):e}function ag(t){var e=Kr(),r=e.queue;if(r===null)throw Error(I(311));r.lastRenderedReducer=t;var n=nt,i=n.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}n.baseQueue=i=o,r.pending=null}if(i!==null){o=i.next,n=n.baseState;var l=s=null,u=null,c=o;do{var d=c.lane;if((As&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=f,s=n):u=u.next=f,Ke.lanes|=d,Ss|=d}c=c.next}while(c!==null&&c!==o);u===null?s=n:u.next=l,gn(n,e.memoizedState)||(ir=!0),e.memoizedState=n,e.baseState=s,e.baseQueue=u,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do o=i.lane,Ke.lanes|=o,Ss|=o,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function lg(t){var e=Kr(),r=e.queue;if(r===null)throw Error(I(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,o=e.memoizedState;if(i!==null){r.pending=null;var s=i=i.next;do o=t(o,s.action),s=s.next;while(s!==i);gn(o,e.memoizedState)||(ir=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),r.lastRenderedState=o}return[o,n]}function e1(){}function t1(t,e){var r=Ke,n=Kr(),i=e(),o=!gn(n.memoizedState,i);if(o&&(n.memoizedState=i,ir=!0),n=n.queue,Gv(i1.bind(null,r,n,t),[t]),n.getSnapshot!==e||o||pt!==null&&pt.memoizedState.tag&1){if(r.flags|=2048,cc(9,n1.bind(null,r,n,i,e),void 0,null),yt===null)throw Error(I(349));As&30||r1(r,e,i)}return i}function r1(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Ke.updateQueue,e===null?(e={lastEffect:null,stores:null},Ke.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function n1(t,e,r,n){e.value=r,e.getSnapshot=n,o1(e)&&s1(t)}function i1(t,e,r){return r(function(){o1(e)&&s1(t)})}function o1(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!gn(t,r)}catch{return!0}}function s1(t){var e=_i(t,1);e!==null&&yn(e,t,1,-1)}function Nx(t){var e=Rn();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:uc,lastRenderedState:t},e.queue=t,t=t.dispatch=aM.bind(null,Ke,t),[e.memoizedState,t]}function cc(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Ke.updateQueue,e===null?(e={lastEffect:null,stores:null},Ke.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function a1(){return Kr().memoizedState}function af(t,e,r,n){var i=Rn();Ke.flags|=t,i.memoizedState=cc(1|e,r,void 0,n===void 0?null:n)}function Sh(t,e,r,n){var i=Kr();n=n===void 0?null:n;var o=void 0;if(nt!==null){var s=nt.memoizedState;if(o=s.destroy,n!==null&&zv(n,s.deps)){i.memoizedState=cc(e,r,o,n);return}}Ke.flags|=t,i.memoizedState=cc(1|e,r,o,n)}function zx(t,e){return af(8390656,8,t,e)}function Gv(t,e){return Sh(2048,8,t,e)}function l1(t,e){return Sh(4,2,t,e)}function u1(t,e){return Sh(4,4,t,e)}function c1(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function d1(t,e,r){return r=r!=null?r.concat([t]):null,Sh(4,4,c1.bind(null,e,t),r)}function Hv(){}function p1(t,e){var r=Kr();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&zv(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function f1(t,e){var r=Kr();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&zv(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function h1(t,e,r){return As&21?(gn(r,e)||(r=vS(),Ke.lanes|=r,Ss|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,ir=!0),t.memoizedState=r)}function oM(t,e){var r=xe;xe=r!==0&&4>r?r:4,t(!0);var n=sg.transition;sg.transition={};try{t(!1),e()}finally{xe=r,sg.transition=n}}function y1(){return Kr().memoizedState}function sM(t,e,r){var n=ao(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},m1(t))g1(e,r);else if(r=ZS(t,e,r,n),r!==null){var i=qt();yn(r,t,n,i),b1(r,e,n)}}function aM(t,e,r){var n=ao(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(m1(t))g1(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,l=o(s,r);if(i.hasEagerState=!0,i.eagerState=l,gn(l,s)){var u=e.interleaved;u===null?(i.next=i,Ov(e)):(i.next=u.next,u.next=i),e.interleaved=i;return}}catch{}finally{}r=ZS(t,e,i,n),r!==null&&(i=qt(),yn(r,t,n,i),b1(r,e,n))}}function m1(t){var e=t.alternate;return t===Ke||e!==null&&e===Ke}function g1(t,e){Ku=Nf=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function b1(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Rv(t,r)}}var zf={readContext:Or,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useInsertionEffect:At,useLayoutEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useMutableSource:At,useSyncExternalStore:At,useId:At,unstable_isNewReconciler:!1},lM={readContext:Or,useCallback:function(t,e){return Rn().memoizedState=[t,e===void 0?null:e],t},useContext:Or,useEffect:zx,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,af(4194308,4,c1.bind(null,e,t),r)},useLayoutEffect:function(t,e){return af(4194308,4,t,e)},useInsertionEffect:function(t,e){return af(4,2,t,e)},useMemo:function(t,e){var r=Rn();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Rn();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=sM.bind(null,Ke,t),[n.memoizedState,t]},useRef:function(t){var e=Rn();return t={current:t},e.memoizedState=t},useState:Nx,useDebugValue:Hv,useDeferredValue:function(t){return Rn().memoizedState=t},useTransition:function(){var t=Nx(!1),e=t[0];return t=oM.bind(null,t[1]),Rn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ke,i=Rn();if(Be){if(r===void 0)throw Error(I(407));r=r()}else{if(r=e(),yt===null)throw Error(I(349));As&30||r1(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,zx(i1.bind(null,n,o,t),[t]),n.flags|=2048,cc(9,n1.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=Rn(),e=yt.identifierPrefix;if(Be){var r=hi,n=fi;r=(n&~(1<<32-hn(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=lc++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=iM++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},uM={readContext:Or,useCallback:p1,useContext:Or,useEffect:Gv,useImperativeHandle:d1,useInsertionEffect:l1,useLayoutEffect:u1,useMemo:f1,useReducer:ag,useRef:a1,useState:function(){return ag(uc)},useDebugValue:Hv,useDeferredValue:function(t){var e=Kr();return h1(e,nt.memoizedState,t)},useTransition:function(){var t=ag(uc)[0],e=Kr().memoizedState;return[t,e]},useMutableSource:e1,useSyncExternalStore:t1,useId:y1,unstable_isNewReconciler:!1},cM={readContext:Or,useCallback:p1,useContext:Or,useEffect:Gv,useImperativeHandle:d1,useInsertionEffect:l1,useLayoutEffect:u1,useMemo:f1,useReducer:lg,useRef:a1,useState:function(){return lg(uc)},useDebugValue:Hv,useDeferredValue:function(t){var e=Kr();return nt===null?e.memoizedState=t:h1(e,nt.memoizedState,t)},useTransition:function(){var t=lg(uc)[0],e=Kr().memoizedState;return[t,e]},useMutableSource:e1,useSyncExternalStore:t1,useId:y1,unstable_isNewReconciler:!1};function Yr(t,e){if(t&&t.defaultProps){e=Ve({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Rb(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Ve({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Ch={isMounted:function(t){return(t=t._reactInternals)?Bs(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=qt(),i=ao(t),o=yi(n,i);o.payload=e,r!=null&&(o.callback=r),e=oo(t,o,i),e!==null&&(yn(e,t,i,n),of(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=qt(),i=ao(t),o=yi(n,i);o.tag=1,o.payload=e,r!=null&&(o.callback=r),e=oo(t,o,i),e!==null&&(yn(e,t,i,n),of(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=qt(),n=ao(t),i=yi(r,n);i.tag=2,e!=null&&(i.callback=e),e=oo(t,i,n),e!==null&&(yn(e,t,n,r),of(e,t,n))}};function Fx(t,e,r,n,i,o,s){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,o,s):e.prototype&&e.prototype.isPureReactComponent?!rc(r,n)||!rc(i,o):!0}function v1(t,e,r){var n=!1,i=fo,o=e.contextType;return typeof o=="object"&&o!==null?o=Or(o):(i=sr(e)?xs:It.current,n=e.contextTypes,o=(n=n!=null)?Ra(t,i):fo),e=new e(r,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Ch,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function qx(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&Ch.enqueueReplaceState(e,e.state,null)}function Ab(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},Kv(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=Or(o):(o=sr(e)?xs:It.current,i.context=Ra(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(Rb(t,e,o,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&Ch.enqueueReplaceState(i,i.state,null),Vf(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Ta(t,e){try{var r="",n=e;do r+=OK(n),n=n.return;while(n);var i=r}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:t,source:e,stack:i,digest:null}}function ug(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Sb(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var dM=typeof WeakMap=="function"?WeakMap:Map;function E1(t,e,r){r=yi(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){qf||(qf=!0,Ub=n),Sb(t,e)},r}function w1(t,e,r){r=yi(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){Sb(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Sb(t,e),typeof n!="function"&&(so===null?so=new Set([this]):so.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),r}function Gx(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new dM;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=AM.bind(null,t,e,r),e.then(t,t))}function Hx(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Xx(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=yi(-1,1),e.tag=2,oo(r,e,1))),r.lanes|=1),t)}var pM=Ai.ReactCurrentOwner,ir=!1;function Nt(t,e,r,n){e.child=t===null?JS(e,null,r,n):Sa(e,t.child,r,n)}function Wx(t,e,r,n,i){r=r.render;var o=e.ref;return ma(e,i),n=Fv(t,e,r,n,o,i),r=qv(),t!==null&&!ir?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,xi(t,e,i)):(Be&&r&&Dv(e),e.flags|=1,Nt(t,e,n,i),e.child)}function Jx(t,e,r,n,i){if(t===null){var o=r.type;return typeof o=="function"&&!t0(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,_1(t,e,o,n,i)):(t=df(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(r=r.compare,r=r!==null?r:rc,r(s,n)&&t.ref===e.ref)return xi(t,e,i)}return e.flags|=1,t=lo(o,n),t.ref=e.ref,t.return=e,e.child=t}function _1(t,e,r,n,i){if(t!==null){var o=t.memoizedProps;if(rc(o,n)&&t.ref===e.ref)if(ir=!1,e.pendingProps=n=o,(t.lanes&i)!==0)t.flags&131072&&(ir=!0);else return e.lanes=t.lanes,xi(t,e,i)}return Cb(t,e,r,n,i)}function x1(t,e,r){var n=e.pendingProps,i=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Se(da,gr),gr|=r;else{if(!(r&1073741824))return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Se(da,gr),gr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,Se(da,gr),gr|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,Se(da,gr),gr|=n;return Nt(t,e,i,r),e.child}function R1(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Cb(t,e,r,n,i){var o=sr(r)?xs:It.current;return o=Ra(e,o),ma(e,i),r=Fv(t,e,r,n,o,i),n=qv(),t!==null&&!ir?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,xi(t,e,i)):(Be&&n&&Dv(e),e.flags|=1,Nt(t,e,r,i),e.child)}function Zx(t,e,r,n,i){if(sr(r)){var o=!0;jf(e)}else o=!1;if(ma(e,i),e.stateNode===null)lf(t,e),v1(e,r,n),Ab(e,r,n,i),n=!0;else if(t===null){var s=e.stateNode,l=e.memoizedProps;s.props=l;var u=s.context,c=r.contextType;typeof c=="object"&&c!==null?c=Or(c):(c=sr(r)?xs:It.current,c=Ra(e,c));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==n||u!==c)&&qx(e,s,n,c),Gi=!1;var h=e.memoizedState;s.state=h,Vf(e,n,s,i),u=e.memoizedState,l!==n||h!==u||or.current||Gi?(typeof d=="function"&&(Rb(e,r,d,n),u=e.memoizedState),(l=Gi||Fx(e,r,l,n,h,u,c))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=u),s.props=n,s.state=u,s.context=c,n=l):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,QS(t,e),l=e.memoizedProps,c=e.type===e.elementType?l:Yr(e.type,l),s.props=c,f=e.pendingProps,h=s.context,u=r.contextType,typeof u=="object"&&u!==null?u=Or(u):(u=sr(r)?xs:It.current,u=Ra(e,u));var g=r.getDerivedStateFromProps;(d=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||h!==u)&&qx(e,s,n,u),Gi=!1,h=e.memoizedState,s.state=h,Vf(e,n,s,i);var b=e.memoizedState;l!==f||h!==b||or.current||Gi?(typeof g=="function"&&(Rb(e,r,g,n),b=e.memoizedState),(c=Gi||Fx(e,r,c,n,h,b,u)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,b,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,b,u)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=b),s.props=n,s.state=b,s.context=u,n=c):(typeof s.componentDidUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),n=!1)}return Tb(t,e,r,n,o,i)}function Tb(t,e,r,n,i,o){R1(t,e);var s=(e.flags&128)!==0;if(!n&&!s)return i&&Ux(e,r,!1),xi(t,e,o);n=e.stateNode,pM.current=e;var l=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&s?(e.child=Sa(e,t.child,null,o),e.child=Sa(e,null,l,o)):Nt(t,e,l,o),e.memoizedState=n.state,i&&Ux(e,r,!0),e.child}function A1(t){var e=t.stateNode;e.pendingContext?jx(t,e.pendingContext,e.pendingContext!==e.context):e.context&&jx(t,e.context,!1),Vv(t,e.containerInfo)}function Qx(t,e,r,n,i){return Aa(),Iv(i),e.flags|=256,Nt(t,e,r,n),e.child}var kb={dehydrated:null,treeContext:null,retryLane:0};function Lb(t){return{baseLanes:t,cachePool:null,transitions:null}}function S1(t,e,r){var n=e.pendingProps,i=$e.current,o=!1,s=(e.flags&128)!==0,l;if((l=s)||(l=t!==null&&t.memoizedState===null?!1:(i&2)!==0),l?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Se($e,i&1),t===null)return _b(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=n.children,t=n.fallback,o?(n=e.mode,o=e.child,s={mode:"hidden",children:s},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Lh(s,n,0,null),t=Es(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Lb(r),e.memoizedState=kb,t):Xv(e,s));if(i=t.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return fM(t,e,s,n,l,i,r);if(o){o=n.fallback,s=e.mode,i=t.child,l=i.sibling;var u={mode:"hidden",children:n.children};return!(s&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=u,e.deletions=null):(n=lo(i,u),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=lo(l,o):(o=Es(o,s,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,s=t.child.memoizedState,s=s===null?Lb(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~r,e.memoizedState=kb,n}return o=t.child,t=o.sibling,n=lo(o,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function Xv(t,e){return e=Lh({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function xp(t,e,r,n){return n!==null&&Iv(n),Sa(e,t.child,null,r),t=Xv(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function fM(t,e,r,n,i,o,s){if(r)return e.flags&256?(e.flags&=-257,n=ug(Error(I(422))),xp(t,e,s,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,i=e.mode,n=Lh({mode:"visible",children:n.children},i,0,null),o=Es(o,i,s,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,e.mode&1&&Sa(e,t.child,null,s),e.child.memoizedState=Lb(s),e.memoizedState=kb,o);if(!(e.mode&1))return xp(t,e,s,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,o=Error(I(419)),n=ug(o,n,void 0),xp(t,e,s,n)}if(l=(s&t.childLanes)!==0,ir||l){if(n=yt,n!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,_i(t,i),yn(n,t,i,-1))}return e0(),n=ug(Error(I(421))),xp(t,e,s,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=SM.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,vr=io(i.nextSibling),Er=e,Be=!0,cn=null,t!==null&&(Tr[kr++]=fi,Tr[kr++]=hi,Tr[kr++]=Rs,fi=t.id,hi=t.overflow,Rs=e),e=Xv(e,n.children),e.flags|=4096,e)}function Yx(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),xb(t.return,e,r)}function cg(t,e,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function C1(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(Nt(t,e,n.children,r),n=$e.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Yx(t,r,e);else if(t.tag===19)Yx(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Se($e,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&Mf(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),cg(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Mf(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}cg(e,!0,r,null,o);break;case"together":cg(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function lf(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function xi(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Ss|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(I(153));if(e.child!==null){for(t=e.child,r=lo(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=lo(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function hM(t,e,r){switch(e.tag){case 3:A1(e),Aa();break;case 5:YS(e);break;case 1:sr(e.type)&&jf(e);break;case 4:Vv(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Se(Of,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Se($e,$e.current&1),e.flags|=128,null):r&e.child.childLanes?S1(t,e,r):(Se($e,$e.current&1),t=xi(t,e,r),t!==null?t.sibling:null);Se($e,$e.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return C1(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Se($e,$e.current),n)break;return null;case 22:case 23:return e.lanes=0,x1(t,e,r)}return xi(t,e,r)}var T1,Pb,k1,L1;T1=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Pb=function(){};k1=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,ys(kn.current);var o=null;switch(r){case"input":i=Yg(t,i),n=Yg(t,n),o=[];break;case"select":i=Ve({},i,{value:void 0}),n=Ve({},n,{value:void 0}),o=[];break;case"textarea":i=rb(t,i),n=rb(t,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Bf)}ib(r,n);var s;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(s in l)l.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Wu.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in n){var u=n[c];if(l=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(r||(r={}),r[s]=u[s])}else r||(o||(o=[]),o.push(c,r)),r=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(o=o||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Wu.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&Ce("scroll",t),o||l===u||(o=[])):(o=o||[]).push(c,u))}r&&(o=o||[]).push("style",r);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};L1=function(t,e,r,n){r!==n&&(e.flags|=4)};function yu(t,e){if(!Be)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function St(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function yM(t,e,r){var n=e.pendingProps;switch(Bv(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(e),null;case 1:return sr(e.type)&&If(),St(e),null;case 3:return n=e.stateNode,Ca(),Pe(or),Pe(It),Nv(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(wp(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,cn!==null&&(Kb(cn),cn=null))),Pb(t,e),St(e),null;case 5:Mv(e);var i=ys(ac.current);if(r=e.type,t!==null&&e.stateNode!=null)k1(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(I(166));return St(e),null}if(t=ys(kn.current),wp(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[Sn]=e,n[oc]=o,t=(e.mode&1)!==0,r){case"dialog":Ce("cancel",n),Ce("close",n);break;case"iframe":case"object":case"embed":Ce("load",n);break;case"video":case"audio":for(i=0;i<Du.length;i++)Ce(Du[i],n);break;case"source":Ce("error",n);break;case"img":case"image":case"link":Ce("error",n),Ce("load",n);break;case"details":Ce("toggle",n);break;case"input":lx(n,o),Ce("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},Ce("invalid",n);break;case"textarea":cx(n,o),Ce("invalid",n)}ib(r,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?n.textContent!==l&&(o.suppressHydrationWarning!==!0&&Ep(n.textContent,l,t),i=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Ep(n.textContent,l,t),i=["children",""+l]):Wu.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&Ce("scroll",n)}switch(r){case"input":pp(n),ux(n,o,!0);break;case"textarea":pp(n),dx(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=Bf)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=iS(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=s.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=s.createElement(r,{is:n.is}):(t=s.createElement(r),r==="select"&&(s=t,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):t=s.createElementNS(t,r),t[Sn]=e,t[oc]=n,T1(t,e,!1,!1),e.stateNode=t;e:{switch(s=ob(r,n),r){case"dialog":Ce("cancel",t),Ce("close",t),i=n;break;case"iframe":case"object":case"embed":Ce("load",t),i=n;break;case"video":case"audio":for(i=0;i<Du.length;i++)Ce(Du[i],t);i=n;break;case"source":Ce("error",t),i=n;break;case"img":case"image":case"link":Ce("error",t),Ce("load",t),i=n;break;case"details":Ce("toggle",t),i=n;break;case"input":lx(t,n),i=Yg(t,n),Ce("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=Ve({},n,{value:void 0}),Ce("invalid",t);break;case"textarea":cx(t,n),i=rb(t,n),Ce("invalid",t);break;default:i=n}ib(r,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var u=l[o];o==="style"?aS(t,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&oS(t,u)):o==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&Ju(t,u):typeof u=="number"&&Ju(t,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Wu.hasOwnProperty(o)?u!=null&&o==="onScroll"&&Ce("scroll",t):u!=null&&bv(t,o,u,s))}switch(r){case"input":pp(t),ux(t,n,!1);break;case"textarea":pp(t),dx(t);break;case"option":n.value!=null&&t.setAttribute("value",""+po(n.value));break;case"select":t.multiple=!!n.multiple,o=n.value,o!=null?pa(t,!!n.multiple,o,!1):n.defaultValue!=null&&pa(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=Bf)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return St(e),null;case 6:if(t&&e.stateNode!=null)L1(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(I(166));if(r=ys(ac.current),ys(kn.current),wp(e)){if(n=e.stateNode,r=e.memoizedProps,n[Sn]=e,(o=n.nodeValue!==r)&&(t=Er,t!==null))switch(t.tag){case 3:Ep(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Ep(n.nodeValue,r,(t.mode&1)!==0)}o&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Sn]=e,e.stateNode=n}return St(e),null;case 13:if(Pe($e),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Be&&vr!==null&&e.mode&1&&!(e.flags&128))XS(),Aa(),e.flags|=98560,o=!1;else if(o=wp(e),n!==null&&n.dehydrated!==null){if(t===null){if(!o)throw Error(I(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(I(317));o[Sn]=e}else Aa(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;St(e),o=!1}else cn!==null&&(Kb(cn),cn=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||$e.current&1?it===0&&(it=3):e0())),e.updateQueue!==null&&(e.flags|=4),St(e),null);case 4:return Ca(),Pb(t,e),t===null&&nc(e.stateNode.containerInfo),St(e),null;case 10:return $v(e.type._context),St(e),null;case 17:return sr(e.type)&&If(),St(e),null;case 19:if(Pe($e),o=e.memoizedState,o===null)return St(e),null;if(n=(e.flags&128)!==0,s=o.rendering,s===null)if(n)yu(o,!1);else{if(it!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(s=Mf(t),s!==null){for(e.flags|=128,yu(o,!1),n=s.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)o=r,t=n,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,t=s.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return Se($e,$e.current&1|2),e.child}t=t.sibling}o.tail!==null&&Fe()>ka&&(e.flags|=128,n=!0,yu(o,!1),e.lanes=4194304)}else{if(!n)if(t=Mf(s),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),yu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Be)return St(e),null}else 2*Fe()-o.renderingStartTime>ka&&r!==1073741824&&(e.flags|=128,n=!0,yu(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(r=o.last,r!==null?r.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Fe(),e.sibling=null,r=$e.current,Se($e,n?r&1|2:r&1),e):(St(e),null);case 22:case 23:return Yv(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?gr&1073741824&&(St(e),e.subtreeFlags&6&&(e.flags|=8192)):St(e),null;case 24:return null;case 25:return null}throw Error(I(156,e.tag))}function mM(t,e){switch(Bv(e),e.tag){case 1:return sr(e.type)&&If(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ca(),Pe(or),Pe(It),Nv(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Mv(e),null;case 13:if(Pe($e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(I(340));Aa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Pe($e),null;case 4:return Ca(),null;case 10:return $v(e.type._context),null;case 22:case 23:return Yv(),null;case 24:return null;default:return null}}var Rp=!1,Dt=!1,gM=typeof WeakSet=="function"?WeakSet:Set,M=null;function ca(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Me(t,e,n)}else r.current=null}function Db(t,e,r){try{r()}catch(n){Me(t,e,n)}}var eR=!1;function bM(t,e){if(yb=Lf,t=jS(),Pv(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var s=0,l=-1,u=-1,c=0,d=0,f=t,h=null;t:for(;;){for(var g;f!==r||i!==0&&f.nodeType!==3||(l=s+i),f!==o||n!==0&&f.nodeType!==3||(u=s+n),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===t)break t;if(h===r&&++c===i&&(l=s),h===o&&++d===n&&(u=s),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(mb={focusedElem:t,selectionRange:r},Lf=!1,M=e;M!==null;)if(e=M,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,M=t;else for(;M!==null;){e=M;try{var b=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,C=b.memoizedState,y=e.stateNode,m=y.getSnapshotBeforeUpdate(e.elementType===e.type?w:Yr(e.type,w),C);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var E=e.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(A){Me(e,e.return,A)}if(t=e.sibling,t!==null){t.return=e.return,M=t;break}M=e.return}return b=eR,eR=!1,b}function Vu(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&Db(e,r,o)}i=i.next}while(i!==n)}}function Th(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Bb(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function P1(t){var e=t.alternate;e!==null&&(t.alternate=null,P1(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Sn],delete e[oc],delete e[vb],delete e[eM],delete e[tM])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function D1(t){return t.tag===5||t.tag===3||t.tag===4}function tR(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||D1(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ib(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Bf));else if(n!==4&&(t=t.child,t!==null))for(Ib(t,e,r),t=t.sibling;t!==null;)Ib(t,e,r),t=t.sibling}function jb(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(jb(t,e,r),t=t.sibling;t!==null;)jb(t,e,r),t=t.sibling}var wt=null,un=!1;function Di(t,e,r){for(r=r.child;r!==null;)B1(t,e,r),r=r.sibling}function B1(t,e,r){if(Tn&&typeof Tn.onCommitFiberUnmount=="function")try{Tn.onCommitFiberUnmount(Eh,r)}catch{}switch(r.tag){case 5:Dt||ca(r,e);case 6:var n=wt,i=un;wt=null,Di(t,e,r),wt=n,un=i,wt!==null&&(un?(t=wt,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):wt.removeChild(r.stateNode));break;case 18:wt!==null&&(un?(t=wt,r=r.stateNode,t.nodeType===8?ng(t.parentNode,r):t.nodeType===1&&ng(t,r),ec(t)):ng(wt,r.stateNode));break;case 4:n=wt,i=un,wt=r.stateNode.containerInfo,un=!0,Di(t,e,r),wt=n,un=i;break;case 0:case 11:case 14:case 15:if(!Dt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Db(r,e,s),i=i.next}while(i!==n)}Di(t,e,r);break;case 1:if(!Dt&&(ca(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Me(r,e,l)}Di(t,e,r);break;case 21:Di(t,e,r);break;case 22:r.mode&1?(Dt=(n=Dt)||r.memoizedState!==null,Di(t,e,r),Dt=n):Di(t,e,r);break;default:Di(t,e,r)}}function rR(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new gM),e.forEach(function(n){var i=CM.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Jr(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var o=t,s=e,l=s;e:for(;l!==null;){switch(l.tag){case 5:wt=l.stateNode,un=!1;break e;case 3:wt=l.stateNode.containerInfo,un=!0;break e;case 4:wt=l.stateNode.containerInfo,un=!0;break e}l=l.return}if(wt===null)throw Error(I(160));B1(o,s,i),wt=null,un=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(c){Me(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)I1(e,t),e=e.sibling}function I1(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Jr(e,t),wn(t),n&4){try{Vu(3,t,t.return),Th(3,t)}catch(w){Me(t,t.return,w)}try{Vu(5,t,t.return)}catch(w){Me(t,t.return,w)}}break;case 1:Jr(e,t),wn(t),n&512&&r!==null&&ca(r,r.return);break;case 5:if(Jr(e,t),wn(t),n&512&&r!==null&&ca(r,r.return),t.flags&32){var i=t.stateNode;try{Ju(i,"")}catch(w){Me(t,t.return,w)}}if(n&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,s=r!==null?r.memoizedProps:o,l=t.type,u=t.updateQueue;if(t.updateQueue=null,u!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&rS(i,o),ob(l,s);var c=ob(l,o);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];d==="style"?aS(i,f):d==="dangerouslySetInnerHTML"?oS(i,f):d==="children"?Ju(i,f):bv(i,d,f,c)}switch(l){case"input":eb(i,o);break;case"textarea":nS(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var g=o.value;g!=null?pa(i,!!o.multiple,g,!1):h!==!!o.multiple&&(o.defaultValue!=null?pa(i,!!o.multiple,o.defaultValue,!0):pa(i,!!o.multiple,o.multiple?[]:"",!1))}i[oc]=o}catch(w){Me(t,t.return,w)}}break;case 6:if(Jr(e,t),wn(t),n&4){if(t.stateNode===null)throw Error(I(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(w){Me(t,t.return,w)}}break;case 3:if(Jr(e,t),wn(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{ec(e.containerInfo)}catch(w){Me(t,t.return,w)}break;case 4:Jr(e,t),wn(t);break;case 13:Jr(e,t),wn(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Zv=Fe())),n&4&&rR(t);break;case 22:if(d=r!==null&&r.memoizedState!==null,t.mode&1?(Dt=(c=Dt)||d,Jr(e,t),Dt=c):Jr(e,t),wn(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!d&&t.mode&1)for(M=t,d=t.child;d!==null;){for(f=M=d;M!==null;){switch(h=M,g=h.child,h.tag){case 0:case 11:case 14:case 15:Vu(4,h,h.return);break;case 1:ca(h,h.return);var b=h.stateNode;if(typeof b.componentWillUnmount=="function"){n=h,r=h.return;try{e=n,b.props=e.memoizedProps,b.state=e.memoizedState,b.componentWillUnmount()}catch(w){Me(n,r,w)}}break;case 5:ca(h,h.return);break;case 22:if(h.memoizedState!==null){iR(f);continue}}g!==null?(g.return=h,M=g):iR(f)}d=d.sibling}e:for(d=null,f=t;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=f.stateNode,u=f.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=sS("display",s))}catch(w){Me(t,t.return,w)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(w){Me(t,t.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Jr(e,t),wn(t),n&4&&rR(t);break;case 21:break;default:Jr(e,t),wn(t)}}function wn(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(D1(r)){var n=r;break e}r=r.return}throw Error(I(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Ju(i,""),n.flags&=-33);var o=tR(t);jb(t,o,i);break;case 3:case 4:var s=n.stateNode.containerInfo,l=tR(t);Ib(t,l,s);break;default:throw Error(I(161))}}catch(u){Me(t,t.return,u)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function vM(t,e,r){M=t,j1(t)}function j1(t,e,r){for(var n=(t.mode&1)!==0;M!==null;){var i=M,o=i.child;if(i.tag===22&&n){var s=i.memoizedState!==null||Rp;if(!s){var l=i.alternate,u=l!==null&&l.memoizedState!==null||Dt;l=Rp;var c=Dt;if(Rp=s,(Dt=u)&&!c)for(M=i;M!==null;)s=M,u=s.child,s.tag===22&&s.memoizedState!==null?oR(i):u!==null?(u.return=s,M=u):oR(i);for(;o!==null;)M=o,j1(o),o=o.sibling;M=i,Rp=l,Dt=c}nR(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,M=o):nR(t)}}function nR(t){for(;M!==null;){var e=M;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Dt||Th(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Dt)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Yr(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&Mx(e,o,n);break;case 3:var s=e.updateQueue;if(s!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Mx(e,s,r)}break;case 5:var l=e.stateNode;if(r===null&&e.flags&4){r=l;var u=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&ec(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}Dt||e.flags&512&&Bb(e)}catch(h){Me(e,e.return,h)}}if(e===t){M=null;break}if(r=e.sibling,r!==null){r.return=e.return,M=r;break}M=e.return}}function iR(t){for(;M!==null;){var e=M;if(e===t){M=null;break}var r=e.sibling;if(r!==null){r.return=e.return,M=r;break}M=e.return}}function oR(t){for(;M!==null;){var e=M;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Th(4,e)}catch(u){Me(e,r,u)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(u){Me(e,i,u)}}var o=e.return;try{Bb(e)}catch(u){Me(e,o,u)}break;case 5:var s=e.return;try{Bb(e)}catch(u){Me(e,s,u)}}}catch(u){Me(e,e.return,u)}if(e===t){M=null;break}var l=e.sibling;if(l!==null){l.return=e.return,M=l;break}M=e.return}}var EM=Math.ceil,Ff=Ai.ReactCurrentDispatcher,Wv=Ai.ReactCurrentOwner,$r=Ai.ReactCurrentBatchConfig,ve=0,yt=null,Qe=null,_t=0,gr=0,da=ko(0),it=0,dc=null,Ss=0,kh=0,Jv=0,Mu=null,Yt=null,Zv=0,ka=1/0,si=null,qf=!1,Ub=null,so=null,Ap=!1,Qi=null,Gf=0,Nu=0,$b=null,uf=-1,cf=0;function qt(){return ve&6?Fe():uf!==-1?uf:uf=Fe()}function ao(t){return t.mode&1?ve&2&&_t!==0?_t&-_t:nM.transition!==null?(cf===0&&(cf=vS()),cf):(t=xe,t!==0||(t=window.event,t=t===void 0?16:SS(t.type)),t):1}function yn(t,e,r,n){if(50<Nu)throw Nu=0,$b=null,Error(I(185));Pc(t,r,n),(!(ve&2)||t!==yt)&&(t===yt&&(!(ve&2)&&(kh|=r),it===4&&Wi(t,_t)),ar(t,n),r===1&&ve===0&&!(e.mode&1)&&(ka=Fe()+500,Ah&&Lo()))}function ar(t,e){var r=t.callbackNode;nV(t,e);var n=kf(t,t===yt?_t:0);if(n===0)r!==null&&hx(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&hx(r),e===1)t.tag===0?rM(sR.bind(null,t)):qS(sR.bind(null,t)),QV(function(){!(ve&6)&&Lo()}),r=null;else{switch(ES(n)){case 1:r=xv;break;case 4:r=gS;break;case 16:r=Tf;break;case 536870912:r=bS;break;default:r=Tf}r=z1(r,U1.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function U1(t,e){if(uf=-1,cf=0,ve&6)throw Error(I(327));var r=t.callbackNode;if(ga()&&t.callbackNode!==r)return null;var n=kf(t,t===yt?_t:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=Hf(t,n);else{e=n;var i=ve;ve|=2;var o=O1();(yt!==t||_t!==e)&&(si=null,ka=Fe()+500,vs(t,e));do try{xM();break}catch(l){$1(t,l)}while(!0);Uv(),Ff.current=o,ve=i,Qe!==null?e=0:(yt=null,_t=0,e=it)}if(e!==0){if(e===2&&(i=cb(t),i!==0&&(n=i,e=Ob(t,i))),e===1)throw r=dc,vs(t,0),Wi(t,n),ar(t,Fe()),r;if(e===6)Wi(t,n);else{if(i=t.current.alternate,!(n&30)&&!wM(i)&&(e=Hf(t,n),e===2&&(o=cb(t),o!==0&&(n=o,e=Ob(t,o))),e===1))throw r=dc,vs(t,0),Wi(t,n),ar(t,Fe()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(I(345));case 2:ss(t,Yt,si);break;case 3:if(Wi(t,n),(n&130023424)===n&&(e=Zv+500-Fe(),10<e)){if(kf(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){qt(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=bb(ss.bind(null,t,Yt,si),e);break}ss(t,Yt,si);break;case 4:if(Wi(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var s=31-hn(n);o=1<<s,s=e[s],s>i&&(i=s),n&=~o}if(n=i,n=Fe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*EM(n/1960))-n,10<n){t.timeoutHandle=bb(ss.bind(null,t,Yt,si),n);break}ss(t,Yt,si);break;case 5:ss(t,Yt,si);break;default:throw Error(I(329))}}}return ar(t,Fe()),t.callbackNode===r?U1.bind(null,t):null}function Ob(t,e){var r=Mu;return t.current.memoizedState.isDehydrated&&(vs(t,e).flags|=256),t=Hf(t,e),t!==2&&(e=Yt,Yt=r,e!==null&&Kb(e)),t}function Kb(t){Yt===null?Yt=t:Yt.push.apply(Yt,t)}function wM(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!gn(o(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Wi(t,e){for(e&=~Jv,e&=~kh,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-hn(e),n=1<<r;t[r]=-1,e&=~n}}function sR(t){if(ve&6)throw Error(I(327));ga();var e=kf(t,0);if(!(e&1))return ar(t,Fe()),null;var r=Hf(t,e);if(t.tag!==0&&r===2){var n=cb(t);n!==0&&(e=n,r=Ob(t,n))}if(r===1)throw r=dc,vs(t,0),Wi(t,e),ar(t,Fe()),r;if(r===6)throw Error(I(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ss(t,Yt,si),ar(t,Fe()),null}function Qv(t,e){var r=ve;ve|=1;try{return t(e)}finally{ve=r,ve===0&&(ka=Fe()+500,Ah&&Lo())}}function Cs(t){Qi!==null&&Qi.tag===0&&!(ve&6)&&ga();var e=ve;ve|=1;var r=$r.transition,n=xe;try{if($r.transition=null,xe=1,t)return t()}finally{xe=n,$r.transition=r,ve=e,!(ve&6)&&Lo()}}function Yv(){gr=da.current,Pe(da)}function vs(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,ZV(r)),Qe!==null)for(r=Qe.return;r!==null;){var n=r;switch(Bv(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&If();break;case 3:Ca(),Pe(or),Pe(It),Nv();break;case 5:Mv(n);break;case 4:Ca();break;case 13:Pe($e);break;case 19:Pe($e);break;case 10:$v(n.type._context);break;case 22:case 23:Yv()}r=r.return}if(yt=t,Qe=t=lo(t.current,null),_t=gr=e,it=0,dc=null,Jv=kh=Ss=0,Yt=Mu=null,hs!==null){for(e=0;e<hs.length;e++)if(r=hs[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,o=r.pending;if(o!==null){var s=o.next;o.next=i,n.next=s}r.pending=n}hs=null}return t}function $1(t,e){do{var r=Qe;try{if(Uv(),sf.current=zf,Nf){for(var n=Ke.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Nf=!1}if(As=0,pt=nt=Ke=null,Ku=!1,lc=0,Wv.current=null,r===null||r.return===null){it=1,dc=e,Qe=null;break}e:{var o=t,s=r.return,l=r,u=e;if(e=_t,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=Hx(s);if(g!==null){g.flags&=-257,Xx(g,s,l,o,e),g.mode&1&&Gx(o,c,e),e=g,u=c;var b=e.updateQueue;if(b===null){var w=new Set;w.add(u),e.updateQueue=w}else b.add(u);break e}else{if(!(e&1)){Gx(o,c,e),e0();break e}u=Error(I(426))}}else if(Be&&l.mode&1){var C=Hx(s);if(C!==null){!(C.flags&65536)&&(C.flags|=256),Xx(C,s,l,o,e),Iv(Ta(u,l));break e}}o=u=Ta(u,l),it!==4&&(it=2),Mu===null?Mu=[o]:Mu.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var y=E1(o,u,e);Vx(o,y);break e;case 1:l=u;var m=o.type,E=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(so===null||!so.has(E)))){o.flags|=65536,e&=-e,o.lanes|=e;var A=w1(o,l,e);Vx(o,A);break e}}o=o.return}while(o!==null)}V1(r)}catch(L){e=L,Qe===r&&r!==null&&(Qe=r=r.return);continue}break}while(!0)}function O1(){var t=Ff.current;return Ff.current=zf,t===null?zf:t}function e0(){(it===0||it===3||it===2)&&(it=4),yt===null||!(Ss&268435455)&&!(kh&268435455)||Wi(yt,_t)}function Hf(t,e){var r=ve;ve|=2;var n=O1();(yt!==t||_t!==e)&&(si=null,vs(t,e));do try{_M();break}catch(i){$1(t,i)}while(!0);if(Uv(),ve=r,Ff.current=n,Qe!==null)throw Error(I(261));return yt=null,_t=0,it}function _M(){for(;Qe!==null;)K1(Qe)}function xM(){for(;Qe!==null&&!XK();)K1(Qe)}function K1(t){var e=N1(t.alternate,t,gr);t.memoizedProps=t.pendingProps,e===null?V1(t):Qe=e,Wv.current=null}function V1(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=mM(r,e),r!==null){r.flags&=32767,Qe=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{it=6,Qe=null;return}}else if(r=yM(r,e,gr),r!==null){Qe=r;return}if(e=e.sibling,e!==null){Qe=e;return}Qe=e=t}while(e!==null);it===0&&(it=5)}function ss(t,e,r){var n=xe,i=$r.transition;try{$r.transition=null,xe=1,RM(t,e,r,n)}finally{$r.transition=i,xe=n}return null}function RM(t,e,r,n){do ga();while(Qi!==null);if(ve&6)throw Error(I(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(I(177));t.callbackNode=null,t.callbackPriority=0;var o=r.lanes|r.childLanes;if(iV(t,o),t===yt&&(Qe=yt=null,_t=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ap||(Ap=!0,z1(Tf,function(){return ga(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=$r.transition,$r.transition=null;var s=xe;xe=1;var l=ve;ve|=4,Wv.current=null,bM(t,r),I1(r,t),FV(mb),Lf=!!yb,mb=yb=null,t.current=r,vM(r),WK(),ve=l,xe=s,$r.transition=o}else t.current=r;if(Ap&&(Ap=!1,Qi=t,Gf=i),o=t.pendingLanes,o===0&&(so=null),QK(r.stateNode),ar(t,Fe()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(qf)throw qf=!1,t=Ub,Ub=null,t;return Gf&1&&t.tag!==0&&ga(),o=t.pendingLanes,o&1?t===$b?Nu++:(Nu=0,$b=t):Nu=0,Lo(),null}function ga(){if(Qi!==null){var t=ES(Gf),e=$r.transition,r=xe;try{if($r.transition=null,xe=16>t?16:t,Qi===null)var n=!1;else{if(t=Qi,Qi=null,Gf=0,ve&6)throw Error(I(331));var i=ve;for(ve|=4,M=t.current;M!==null;){var o=M,s=o.child;if(M.flags&16){var l=o.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(M=c;M!==null;){var d=M;switch(d.tag){case 0:case 11:case 15:Vu(8,d,o)}var f=d.child;if(f!==null)f.return=d,M=f;else for(;M!==null;){d=M;var h=d.sibling,g=d.return;if(P1(d),d===c){M=null;break}if(h!==null){h.return=g,M=h;break}M=g}}}var b=o.alternate;if(b!==null){var w=b.child;if(w!==null){b.child=null;do{var C=w.sibling;w.sibling=null,w=C}while(w!==null)}}M=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,M=s;else e:for(;M!==null;){if(o=M,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Vu(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,M=y;break e}M=o.return}}var m=t.current;for(M=m;M!==null;){s=M;var E=s.child;if(s.subtreeFlags&2064&&E!==null)E.return=s,M=E;else e:for(s=m;M!==null;){if(l=M,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Th(9,l)}}catch(L){Me(l,l.return,L)}if(l===s){M=null;break e}var A=l.sibling;if(A!==null){A.return=l.return,M=A;break e}M=l.return}}if(ve=i,Lo(),Tn&&typeof Tn.onPostCommitFiberRoot=="function")try{Tn.onPostCommitFiberRoot(Eh,t)}catch{}n=!0}return n}finally{xe=r,$r.transition=e}}return!1}function aR(t,e,r){e=Ta(r,e),e=E1(t,e,1),t=oo(t,e,1),e=qt(),t!==null&&(Pc(t,1,e),ar(t,e))}function Me(t,e,r){if(t.tag===3)aR(t,t,r);else for(;e!==null;){if(e.tag===3){aR(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(so===null||!so.has(n))){t=Ta(r,t),t=w1(e,t,1),e=oo(e,t,1),t=qt(),e!==null&&(Pc(e,1,t),ar(e,t));break}}e=e.return}}function AM(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=qt(),t.pingedLanes|=t.suspendedLanes&r,yt===t&&(_t&r)===r&&(it===4||it===3&&(_t&130023424)===_t&&500>Fe()-Zv?vs(t,0):Jv|=r),ar(t,e)}function M1(t,e){e===0&&(t.mode&1?(e=yp,yp<<=1,!(yp&130023424)&&(yp=4194304)):e=1);var r=qt();t=_i(t,e),t!==null&&(Pc(t,e,r),ar(t,r))}function SM(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),M1(t,r)}function CM(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(I(314))}n!==null&&n.delete(e),M1(t,r)}var N1;N1=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||or.current)ir=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return ir=!1,hM(t,e,r);ir=!!(t.flags&131072)}else ir=!1,Be&&e.flags&1048576&&GS(e,$f,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;lf(t,e),t=e.pendingProps;var i=Ra(e,It.current);ma(e,r),i=Fv(null,e,n,t,i,r);var o=qv();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,sr(n)?(o=!0,jf(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Kv(e),i.updater=Ch,e.stateNode=i,i._reactInternals=e,Ab(e,n,t,r),e=Tb(null,e,n,!0,o,r)):(e.tag=0,Be&&o&&Dv(e),Nt(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(lf(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=kM(n),t=Yr(n,t),i){case 0:e=Cb(null,e,n,t,r);break e;case 1:e=Zx(null,e,n,t,r);break e;case 11:e=Wx(null,e,n,t,r);break e;case 14:e=Jx(null,e,n,Yr(n.type,t),r);break e}throw Error(I(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Yr(n,i),Cb(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Yr(n,i),Zx(t,e,n,i,r);case 3:e:{if(A1(e),t===null)throw Error(I(387));n=e.pendingProps,o=e.memoizedState,i=o.element,QS(t,e),Vf(e,n,null,r);var s=e.memoizedState;if(n=s.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Ta(Error(I(423)),e),e=Qx(t,e,n,r,i);break e}else if(n!==i){i=Ta(Error(I(424)),e),e=Qx(t,e,n,r,i);break e}else for(vr=io(e.stateNode.containerInfo.firstChild),Er=e,Be=!0,cn=null,r=JS(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Aa(),n===i){e=xi(t,e,r);break e}Nt(t,e,n,r)}e=e.child}return e;case 5:return YS(e),t===null&&_b(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,gb(n,i)?s=null:o!==null&&gb(n,o)&&(e.flags|=32),R1(t,e),Nt(t,e,s,r),e.child;case 6:return t===null&&_b(e),null;case 13:return S1(t,e,r);case 4:return Vv(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Sa(e,null,n,r):Nt(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Yr(n,i),Wx(t,e,n,i,r);case 7:return Nt(t,e,e.pendingProps,r),e.child;case 8:return Nt(t,e,e.pendingProps.children,r),e.child;case 12:return Nt(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Se(Of,n._currentValue),n._currentValue=s,o!==null)if(gn(o.value,s)){if(o.children===i.children&&!or.current){e=xi(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===n){if(o.tag===1){u=yi(-1,r&-r),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=r,u=o.alternate,u!==null&&(u.lanes|=r),xb(o.return,r,e),l.lanes|=r;break}u=u.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(I(341));s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),xb(s,r,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Nt(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,ma(e,r),i=Or(i),n=n(i),e.flags|=1,Nt(t,e,n,r),e.child;case 14:return n=e.type,i=Yr(n,e.pendingProps),i=Yr(n.type,i),Jx(t,e,n,i,r);case 15:return _1(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Yr(n,i),lf(t,e),e.tag=1,sr(n)?(t=!0,jf(e)):t=!1,ma(e,r),v1(e,n,i),Ab(e,n,i,r),Tb(null,e,n,!0,t,r);case 19:return C1(t,e,r);case 22:return x1(t,e,r)}throw Error(I(156,e.tag))};function z1(t,e){return mS(t,e)}function TM(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pr(t,e,r,n){return new TM(t,e,r,n)}function t0(t){return t=t.prototype,!(!t||!t.isReactComponent)}function kM(t){if(typeof t=="function")return t0(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Ev)return 11;if(t===wv)return 14}return 2}function lo(t,e){var r=t.alternate;return r===null?(r=Pr(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function df(t,e,r,n,i,o){var s=2;if(n=t,typeof t=="function")t0(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case ta:return Es(r.children,i,o,e);case vv:s=8,i|=8;break;case Wg:return t=Pr(12,r,e,i|2),t.elementType=Wg,t.lanes=o,t;case Jg:return t=Pr(13,r,e,i),t.elementType=Jg,t.lanes=o,t;case Zg:return t=Pr(19,r,e,i),t.elementType=Zg,t.lanes=o,t;case YA:return Lh(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ZA:s=10;break e;case QA:s=9;break e;case Ev:s=11;break e;case wv:s=14;break e;case qi:s=16,n=null;break e}throw Error(I(130,t==null?t:typeof t,""))}return e=Pr(s,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function Es(t,e,r,n){return t=Pr(7,t,n,e),t.lanes=r,t}function Lh(t,e,r,n){return t=Pr(22,t,n,e),t.elementType=YA,t.lanes=r,t.stateNode={isHidden:!1},t}function dg(t,e,r){return t=Pr(6,t,null,e),t.lanes=r,t}function pg(t,e,r){return e=Pr(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function LM(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gm(0),this.expirationTimes=Gm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function r0(t,e,r,n,i,o,s,l,u){return t=new LM(t,e,r,l,u),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Pr(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kv(o),t}function PM(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ea,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function F1(t){if(!t)return fo;t=t._reactInternals;e:{if(Bs(t)!==t||t.tag!==1)throw Error(I(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(sr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(I(171))}if(t.tag===1){var r=t.type;if(sr(r))return FS(t,r,e)}return e}function q1(t,e,r,n,i,o,s,l,u){return t=r0(r,n,!0,t,i,o,s,l,u),t.context=F1(null),r=t.current,n=qt(),i=ao(r),o=yi(n,i),o.callback=e??null,oo(r,o,i),t.current.lanes=i,Pc(t,i,n),ar(t,n),t}function Ph(t,e,r,n){var i=e.current,o=qt(),s=ao(i);return r=F1(r),e.context===null?e.context=r:e.pendingContext=r,e=yi(o,s),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=oo(i,e,s),t!==null&&(yn(t,i,s,o),of(t,i,s)),s}function Xf(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function lR(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function n0(t,e){lR(t,e),(t=t.alternate)&&lR(t,e)}function DM(){return null}var G1=typeof reportError=="function"?reportError:function(t){console.error(t)};function i0(t){this._internalRoot=t}Dh.prototype.render=i0.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(I(409));Ph(t,e,null,null)};Dh.prototype.unmount=i0.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Cs(function(){Ph(null,t,null,null)}),e[wi]=null}};function Dh(t){this._internalRoot=t}Dh.prototype.unstable_scheduleHydration=function(t){if(t){var e=xS();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Xi.length&&e!==0&&e<Xi[r].priority;r++);Xi.splice(r,0,t),r===0&&AS(t)}};function o0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Bh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function uR(){}function BM(t,e,r,n,i){if(i){if(typeof n=="function"){var o=n;n=function(){var c=Xf(s);o.call(c)}}var s=q1(e,n,t,0,null,!1,!1,"",uR);return t._reactRootContainer=s,t[wi]=s.current,nc(t.nodeType===8?t.parentNode:t),Cs(),s}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var l=n;n=function(){var c=Xf(u);l.call(c)}}var u=r0(t,0,!1,null,null,!1,!1,"",uR);return t._reactRootContainer=u,t[wi]=u.current,nc(t.nodeType===8?t.parentNode:t),Cs(function(){Ph(e,u,r,n)}),u}function Ih(t,e,r,n,i){var o=r._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var u=Xf(s);l.call(u)}}Ph(e,s,t,i)}else s=BM(r,e,t,i,n);return Xf(s)}wS=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=Pu(e.pendingLanes);r!==0&&(Rv(e,r|1),ar(e,Fe()),!(ve&6)&&(ka=Fe()+500,Lo()))}break;case 13:Cs(function(){var n=_i(t,1);if(n!==null){var i=qt();yn(n,t,1,i)}}),n0(t,1)}};Av=function(t){if(t.tag===13){var e=_i(t,134217728);if(e!==null){var r=qt();yn(e,t,134217728,r)}n0(t,134217728)}};_S=function(t){if(t.tag===13){var e=ao(t),r=_i(t,e);if(r!==null){var n=qt();yn(r,t,e,n)}n0(t,e)}};xS=function(){return xe};RS=function(t,e){var r=xe;try{return xe=t,e()}finally{xe=r}};ab=function(t,e,r){switch(e){case"input":if(eb(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=Rh(n);if(!i)throw Error(I(90));tS(n),eb(n,i)}}}break;case"textarea":nS(t,r);break;case"select":e=r.value,e!=null&&pa(t,!!r.multiple,e,!1)}};cS=Qv;dS=Cs;var IM={usingClientEntryPoint:!1,Events:[Bc,oa,Rh,lS,uS,Qv]},mu={findFiberByHostInstance:fs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jM={bundleType:mu.bundleType,version:mu.version,rendererPackageName:mu.rendererPackageName,rendererConfig:mu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ai.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=hS(t),t===null?null:t.stateNode},findFiberByHostInstance:mu.findFiberByHostInstance||DM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sp.isDisabled&&Sp.supportsFiber)try{Eh=Sp.inject(jM),Tn=Sp}catch{}}_r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IM;_r.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!o0(e))throw Error(I(200));return PM(t,e,null,r)};_r.createRoot=function(t,e){if(!o0(t))throw Error(I(299));var r=!1,n="",i=G1;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=r0(t,1,!1,null,null,r,!1,n,i),t[wi]=e.current,nc(t.nodeType===8?t.parentNode:t),new i0(e)};_r.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(I(188)):(t=Object.keys(t).join(","),Error(I(268,t)));return t=hS(e),t=t===null?null:t.stateNode,t};_r.flushSync=function(t){return Cs(t)};_r.hydrate=function(t,e,r){if(!Bh(e))throw Error(I(200));return Ih(null,t,e,!0,r)};_r.hydrateRoot=function(t,e,r){if(!o0(t))throw Error(I(405));var n=r!=null&&r.hydratedSources||null,i=!1,o="",s=G1;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),e=q1(e,null,t,1,r??null,i,!1,o,s),t[wi]=e.current,nc(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new Dh(e)};_r.render=function(t,e,r){if(!Bh(e))throw Error(I(200));return Ih(null,t,e,!1,r)};_r.unmountComponentAtNode=function(t){if(!Bh(t))throw Error(I(40));return t._reactRootContainer?(Cs(function(){Ih(null,null,t,!1,function(){t._reactRootContainer=null,t[wi]=null})}),!0):!1};_r.unstable_batchedUpdates=Qv;_r.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Bh(r))throw Error(I(200));if(t==null||t._reactInternals===void 0)throw Error(I(38));return Ih(t,e,r,!1,n)};_r.version="18.3.1-next-f1338f8080-20240426";function H1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H1)}catch(t){console.error(t)}}H1(),HA.exports=_r;var UM=HA.exports,cR=UM;Hg.createRoot=cR.createRoot,Hg.hydrateRoot=cR.hydrateRoot;var Vb={};Symbol.dispose??(Symbol.dispose=Symbol("@@dispose"));Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("@@asyncDispose"));var jh={},X1={},G={},Mb={},Nb={},Po={},Uh={},Ln={},jc={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.objectUtil=t.util=void 0;var e;(function(i){i.assertEqual=u=>{};function o(u){}i.assertIs=o;function s(u){throw new Error}i.assertNever=s,i.arrayToEnum=u=>{const c={};for(const d of u)c[d]=d;return c},i.getValidEnumValues=u=>{const c=i.objectKeys(u).filter(f=>typeof u[u[f]]!="number"),d={};for(const f of c)d[f]=u[f];return i.objectValues(d)},i.objectValues=u=>i.objectKeys(u).map(function(c){return u[c]}),i.objectKeys=typeof Object.keys=="function"?u=>Object.keys(u):u=>{const c=[];for(const d in u)Object.prototype.hasOwnProperty.call(u,d)&&c.push(d);return c},i.find=(u,c)=>{for(const d of u)if(c(d))return d},i.isInteger=typeof Number.isInteger=="function"?u=>Number.isInteger(u):u=>typeof u=="number"&&Number.isFinite(u)&&Math.floor(u)===u;function l(u,c=" | "){return u.map(d=>typeof d=="string"?`'${d}'`:d).join(c)}i.joinValues=l,i.jsonStringifyReplacer=(u,c)=>typeof c=="bigint"?c.toString():c})(e||(t.util=e={}));var r;(function(i){i.mergeShapes=(o,s)=>({...o,...s})})(r||(t.objectUtil=r={})),t.ZodParsedType=e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const n=i=>{switch(typeof i){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return Number.isNaN(i)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":return Array.isArray(i)?t.ZodParsedType.array:i===null?t.ZodParsedType.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?t.ZodParsedType.promise:typeof Map<"u"&&i instanceof Map?t.ZodParsedType.map:typeof Set<"u"&&i instanceof Set?t.ZodParsedType.set:typeof Date<"u"&&i instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}};t.getParsedType=n})(jc);Object.defineProperty(Ln,"__esModule",{value:!0});Ln.ZodError=Ln.quotelessJson=Ln.ZodIssueCode=void 0;const W1=jc;Ln.ZodIssueCode=W1.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const $M=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");Ln.quotelessJson=$M;class pc extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let l=n,u=0;for(;u<s.path.length;){const c=s.path[u];u===s.path.length-1?(l[c]=l[c]||{_errors:[]},l[c]._errors.push(r(s))):l[c]=l[c]||{_errors:[]},l=l[c],u++}}};return i(this),n}static assert(e){if(!(e instanceof pc))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,W1.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Ln.ZodError=pc;pc.create=t=>new pc(t);Object.defineProperty(Uh,"__esModule",{value:!0});const Ct=Ln,Qo=jc,OM=(t,e)=>{let r;switch(t.code){case Ct.ZodIssueCode.invalid_type:t.received===Qo.ZodParsedType.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Ct.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Qo.util.jsonStringifyReplacer)}`;break;case Ct.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${Qo.util.joinValues(t.keys,", ")}`;break;case Ct.ZodIssueCode.invalid_union:r="Invalid input";break;case Ct.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Qo.util.joinValues(t.options)}`;break;case Ct.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${Qo.util.joinValues(t.options)}, received '${t.received}'`;break;case Ct.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Ct.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Ct.ZodIssueCode.invalid_date:r="Invalid date";break;case Ct.ZodIssueCode.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Qo.util.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Ct.ZodIssueCode.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Ct.ZodIssueCode.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Ct.ZodIssueCode.custom:r="Invalid input";break;case Ct.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Ct.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Ct.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=e.defaultError,Qo.util.assertNever(t)}return{message:r}};Uh.default=OM;var KM=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Po,"__esModule",{value:!0});Po.defaultErrorMap=void 0;Po.setErrorMap=VM;Po.getErrorMap=MM;const J1=KM(Uh);Po.defaultErrorMap=J1.default;let Z1=J1.default;function VM(t){Z1=t}function MM(){return Z1}var s0={};(function(t){var e=S&&S.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.EMPTY_PATH=t.makeIssue=void 0,t.addIssueToContext=o;const r=Po,n=e(Uh),i=g=>{const{data:b,path:w,errorMaps:C,issueData:y}=g,m=[...w,...y.path||[]],E={...y,path:m};if(y.message!==void 0)return{...y,path:m,message:y.message};let A="";const L=C.filter(D=>!!D).slice().reverse();for(const D of L)A=D(E,{data:b,defaultError:A}).message;return{...y,path:m,message:A}};t.makeIssue=i,t.EMPTY_PATH=[];function o(g,b){const w=(0,r.getErrorMap)(),C=(0,t.makeIssue)({issueData:b,data:g.data,path:g.path,errorMaps:[g.common.contextualErrorMap,g.schemaErrorMap,w,w===n.default?void 0:n.default].filter(y=>!!y)});g.common.issues.push(C)}class s{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(b,w){const C=[];for(const y of w){if(y.status==="aborted")return t.INVALID;y.status==="dirty"&&b.dirty(),C.push(y.value)}return{status:b.value,value:C}}static async mergeObjectAsync(b,w){const C=[];for(const y of w){const m=await y.key,E=await y.value;C.push({key:m,value:E})}return s.mergeObjectSync(b,C)}static mergeObjectSync(b,w){const C={};for(const y of w){const{key:m,value:E}=y;if(m.status==="aborted"||E.status==="aborted")return t.INVALID;m.status==="dirty"&&b.dirty(),E.status==="dirty"&&b.dirty(),m.value!=="__proto__"&&(typeof E.value<"u"||y.alwaysSet)&&(C[m.value]=E.value)}return{status:b.value,value:C}}}t.ParseStatus=s,t.INVALID=Object.freeze({status:"aborted"});const l=g=>({status:"dirty",value:g});t.DIRTY=l;const u=g=>({status:"valid",value:g});t.OK=u;const c=g=>g.status==="aborted";t.isAborted=c;const d=g=>g.status==="dirty";t.isDirty=d;const f=g=>g.status==="valid";t.isValid=f;const h=g=>typeof Promise<"u"&&g instanceof Promise;t.isAsync=h})(s0);var Q1={};Object.defineProperty(Q1,"__esModule",{value:!0});var T={},$h={};Object.defineProperty($h,"__esModule",{value:!0});$h.errorUtil=void 0;var dR;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(dR||($h.errorUtil=dR={}));Object.defineProperty(T,"__esModule",{value:!0});T.discriminatedUnion=T.date=T.boolean=T.bigint=T.array=T.any=T.coerce=T.ZodFirstPartyTypeKind=T.late=T.ZodSchema=T.Schema=T.ZodReadonly=T.ZodPipeline=T.ZodBranded=T.BRAND=T.ZodNaN=T.ZodCatch=T.ZodDefault=T.ZodNullable=T.ZodOptional=T.ZodTransformer=T.ZodEffects=T.ZodPromise=T.ZodNativeEnum=T.ZodEnum=T.ZodLiteral=T.ZodLazy=T.ZodFunction=T.ZodSet=T.ZodMap=T.ZodRecord=T.ZodTuple=T.ZodIntersection=T.ZodDiscriminatedUnion=T.ZodUnion=T.ZodObject=T.ZodArray=T.ZodVoid=T.ZodNever=T.ZodUnknown=T.ZodAny=T.ZodNull=T.ZodUndefined=T.ZodSymbol=T.ZodDate=T.ZodBoolean=T.ZodBigInt=T.ZodNumber=T.ZodString=T.ZodType=void 0;T.NEVER=T.void=T.unknown=T.union=T.undefined=T.tuple=T.transformer=T.symbol=T.string=T.strictObject=T.set=T.record=T.promise=T.preprocess=T.pipeline=T.ostring=T.optional=T.onumber=T.oboolean=T.object=T.number=T.nullable=T.null=T.never=T.nativeEnum=T.nan=T.map=T.literal=T.lazy=T.intersection=T.instanceof=T.function=T.enum=T.effect=void 0;T.datetimeRegex=tC;T.custom=nC;const $=Ln,Cp=Po,X=$h,k=s0,K=jc;class Un{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const pR=(t,e)=>{if((0,k.isValid)(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new $.ZodError(t.common.issues);return this._error=r,this._error}}};function re(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,l)=>{const{message:u}=t;return s.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:u??n??l.defaultError}:s.code!=="invalid_type"?{message:l.defaultError}:{message:u??r??l.defaultError}},description:i}}class oe{get description(){return this._def.description}_getType(e){return(0,K.getParsedType)(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:(0,K.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,K.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if((0,k.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,K.getParsedType)(e)},i=this._parseSync({data:e,path:n.path,parent:n});return pR(n,i)}"~validate"(e){var n,i;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,K.getParsedType)(e)};if(!this["~standard"].async)try{const o=this._parseSync({data:e,path:[],parent:r});return(0,k.isValid)(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(i=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(o=>(0,k.isValid)(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,K.getParsedType)(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await((0,k.isAsync)(i)?i:Promise.resolve(i));return pR(n,o)}refine(e,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{const s=e(i),l=()=>o.addIssue({code:$.ZodIssueCode.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(u=>u?!0:(l(),!1)):s?!0:(l(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new bn({schema:this,typeName:Y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Pn.create(this,this._def)}nullable(){return go.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mn.create(this)}promise(){return Pa.create(this,this._def)}or(e){return mc.create([this,e],this._def)}and(e){return gc.create(this,e,this._def)}transform(e){return new bn({...re(this._def),schema:this,typeName:Y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new _c({...re(this._def),innerType:this,defaultValue:r,typeName:Y.ZodDefault})}brand(){return new a0({typeName:Y.ZodBranded,type:this,...re(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new xc({...re(this._def),innerType:this,catchValue:r,typeName:Y.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Uc.create(this,e)}readonly(){return Rc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}T.ZodType=oe;T.Schema=oe;T.ZodSchema=oe;const NM=/^c[^\s-]{8,}$/i,zM=/^[0-9a-z]+$/,FM=/^[0-9A-HJKMNP-TV-Z]{26}$/i,qM=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,GM=/^[a-z0-9_-]{21}$/i,HM=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,XM=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,WM=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let fg;const ZM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,QM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,YM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,eN=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,tN=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rN=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Y1="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",nN=new RegExp(`^${Y1}$`);function eC(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function iN(t){return new RegExp(`^${eC(t)}$`)}function tC(t){let e=`${Y1}T${eC(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function oN(t,e){return!!((e==="v4"||!e)&&ZM.test(t)||(e==="v6"||!e)&&YM.test(t))}function sN(t,e){if(!HM.test(t))return!1;try{const[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function aN(t,e){return!!((e==="v4"||!e)&&QM.test(t)||(e==="v6"||!e)&&eN.test(t))}class pn extends oe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.ZodParsedType.string){const o=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(o,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.string,received:o.parsedType}),k.INVALID}const n=new k.ParseStatus;let i;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,l=e.data.length<o.value;(s||l)&&(i=this._getOrReturnCtx(e,i),s?(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):l&&(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")WM.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"email",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")fg||(fg=new RegExp(JM,"u")),fg.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"emoji",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")qM.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"uuid",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")GM.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"nanoid",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")NM.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"cuid",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")zM.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"cuid2",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")FM.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"ulid",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"url",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"regex",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?tC(o).test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?nN.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?iN(o).test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?XM.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"duration",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?oN(e.data,o.version)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"ip",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?sN(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"jwt",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?aN(e.data,o.version)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"cidr",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?tN.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"base64",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?rN.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{validation:"base64url",code:$.ZodIssueCode.invalid_string,message:o.message}),n.dirty()):K.util.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:$.ZodIssueCode.invalid_string,...X.errorUtil.errToObj(n)})}_addCheck(e){return new pn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...X.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...X.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...X.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...X.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...X.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...X.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...X.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...X.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...X.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...X.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...X.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...X.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...X.errorUtil.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...X.errorUtil.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...X.errorUtil.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...X.errorUtil.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...X.errorUtil.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...X.errorUtil.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...X.errorUtil.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...X.errorUtil.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...X.errorUtil.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...X.errorUtil.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...X.errorUtil.errToObj(r)})}nonempty(e){return this.min(1,X.errorUtil.errToObj(e))}trim(){return new pn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new pn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new pn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}T.ZodString=pn;pn.create=t=>new pn({checks:[],typeName:Y.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...re(t)});function lN(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return o%s/10**i}class ho extends oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.ZodParsedType.number){const o=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(o,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.number,received:o.parsedType}),k.INVALID}let n;const i=new k.ParseStatus;for(const o of this._def.checks)o.kind==="int"?K.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?lN(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.not_finite,message:o.message}),i.dirty()):K.util.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,X.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,X.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,X.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,X.errorUtil.toString(r))}setLimit(e,r,n,i){return new ho({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:X.errorUtil.toString(i)}]})}_addCheck(e){return new ho({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:X.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:X.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:X.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:X.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:X.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:X.errorUtil.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:X.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:X.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:X.errorUtil.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&K.util.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}T.ZodNumber=ho;ho.create=t=>new ho({checks:[],typeName:Y.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...re(t)});class yo extends oe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.ZodParsedType.bigint)return this._getInvalidInput(e);let n;const i=new k.ParseStatus;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):K.util.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.bigint,received:r.parsedType}),k.INVALID}gte(e,r){return this.setLimit("min",e,!0,X.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,X.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,X.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,X.errorUtil.toString(r))}setLimit(e,r,n,i){return new yo({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:X.errorUtil.toString(i)}]})}_addCheck(e){return new yo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:X.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:X.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:X.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:X.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:X.errorUtil.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}T.ZodBigInt=yo;yo.create=t=>new yo({checks:[],typeName:Y.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...re(t)});class fc extends oe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.ZodParsedType.boolean){const n=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.boolean,received:n.parsedType}),k.INVALID}return(0,k.OK)(e.data)}}T.ZodBoolean=fc;fc.create=t=>new fc({typeName:Y.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...re(t)});class Ts extends oe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.ZodParsedType.date){const o=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(o,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.date,received:o.parsedType}),k.INVALID}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(o,{code:$.ZodIssueCode.invalid_date}),k.INVALID}const n=new k.ParseStatus;let i;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),(0,k.addIssueToContext)(i,{code:$.ZodIssueCode.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):K.util.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ts({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:X.errorUtil.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:X.errorUtil.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}T.ZodDate=Ts;Ts.create=t=>new Ts({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Y.ZodDate,...re(t)});class Wf extends oe{_parse(e){if(this._getType(e)!==K.ZodParsedType.symbol){const n=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.symbol,received:n.parsedType}),k.INVALID}return(0,k.OK)(e.data)}}T.ZodSymbol=Wf;Wf.create=t=>new Wf({typeName:Y.ZodSymbol,...re(t)});class hc extends oe{_parse(e){if(this._getType(e)!==K.ZodParsedType.undefined){const n=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.undefined,received:n.parsedType}),k.INVALID}return(0,k.OK)(e.data)}}T.ZodUndefined=hc;hc.create=t=>new hc({typeName:Y.ZodUndefined,...re(t)});class yc extends oe{_parse(e){if(this._getType(e)!==K.ZodParsedType.null){const n=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.null,received:n.parsedType}),k.INVALID}return(0,k.OK)(e.data)}}T.ZodNull=yc;yc.create=t=>new yc({typeName:Y.ZodNull,...re(t)});class La extends oe{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,k.OK)(e.data)}}T.ZodAny=La;La.create=t=>new La({typeName:Y.ZodAny,...re(t)});class ws extends oe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,k.OK)(e.data)}}T.ZodUnknown=ws;ws.create=t=>new ws({typeName:Y.ZodUnknown,...re(t)});class Ri extends oe{_parse(e){const r=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.never,received:r.parsedType}),k.INVALID}}T.ZodNever=Ri;Ri.create=t=>new Ri({typeName:Y.ZodNever,...re(t)});class Jf extends oe{_parse(e){if(this._getType(e)!==K.ZodParsedType.undefined){const n=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.void,received:n.parsedType}),k.INVALID}return(0,k.OK)(e.data)}}T.ZodVoid=Jf;Jf.create=t=>new Jf({typeName:Y.ZodVoid,...re(t)});class mn extends oe{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==K.ZodParsedType.array)return(0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.array,received:r.parsedType}),k.INVALID;if(i.exactLength!==null){const s=r.data.length>i.exactLength.value,l=r.data.length<i.exactLength.value;(s||l)&&((0,k.addIssueToContext)(r,{code:s?$.ZodIssueCode.too_big:$.ZodIssueCode.too_small,minimum:l?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&((0,k.addIssueToContext)(r,{code:$.ZodIssueCode.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&((0,k.addIssueToContext)(r,{code:$.ZodIssueCode.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,l)=>i.type._parseAsync(new Un(r,s,r.path,l)))).then(s=>k.ParseStatus.mergeArray(n,s));const o=[...r.data].map((s,l)=>i.type._parseSync(new Un(r,s,r.path,l)));return k.ParseStatus.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new mn({...this._def,minLength:{value:e,message:X.errorUtil.toString(r)}})}max(e,r){return new mn({...this._def,maxLength:{value:e,message:X.errorUtil.toString(r)}})}length(e,r){return new mn({...this._def,exactLength:{value:e,message:X.errorUtil.toString(r)}})}nonempty(e){return this.min(1,e)}}T.ZodArray=mn;mn.create=(t,e)=>new mn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Y.ZodArray,...re(e)});function Js(t){if(t instanceof Ue){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Pn.create(Js(n))}return new Ue({...t._def,shape:()=>e})}else return t instanceof mn?new mn({...t._def,type:Js(t.element)}):t instanceof Pn?Pn.create(Js(t.unwrap())):t instanceof go?go.create(Js(t.unwrap())):t instanceof $n?$n.create(t.items.map(e=>Js(e))):t}class Ue extends oe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=K.util.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==K.ZodParsedType.object){const c=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(c,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.object,received:c.parsedType}),k.INVALID}const{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ri&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||l.push(c);const u=[];for(const c of s){const d=o[c],f=i.data[c];u.push({key:{status:"valid",value:c},value:d._parse(new Un(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Ri){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of l)u.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(c==="strict")l.length>0&&((0,k.addIssueToContext)(i,{code:$.ZodIssueCode.unrecognized_keys,keys:l}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of l){const f=i.data[d];u.push({key:{status:"valid",value:d},value:c._parse(new Un(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of u){const f=await d.key,h=await d.value;c.push({key:f,value:h,alwaysSet:d.alwaysSet})}return c}).then(c=>k.ParseStatus.mergeObjectSync(n,c)):k.ParseStatus.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return X.errorUtil.errToObj,new Ue({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var o,s;const i=((s=(o=this._def).errorMap)==null?void 0:s.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:X.errorUtil.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new Ue({...this._def,unknownKeys:"strip"})}passthrough(){return new Ue({...this._def,unknownKeys:"passthrough"})}extend(e){return new Ue({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Ue({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Y.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Ue({...this._def,catchall:e})}pick(e){const r={};for(const n of K.util.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Ue({...this._def,shape:()=>r})}omit(e){const r={};for(const n of K.util.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Ue({...this._def,shape:()=>r})}deepPartial(){return Js(this)}partial(e){const r={};for(const n of K.util.objectKeys(this.shape)){const i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new Ue({...this._def,shape:()=>r})}required(e){const r={};for(const n of K.util.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof Pn;)o=o._def.innerType;r[n]=o}return new Ue({...this._def,shape:()=>r})}keyof(){return rC(K.util.objectKeys(this.shape))}}T.ZodObject=Ue;Ue.create=(t,e)=>new Ue({shape:()=>t,unknownKeys:"strip",catchall:Ri.create(),typeName:Y.ZodObject,...re(e)});Ue.strictCreate=(t,e)=>new Ue({shape:()=>t,unknownKeys:"strict",catchall:Ri.create(),typeName:Y.ZodObject,...re(e)});Ue.lazycreate=(t,e)=>new Ue({shape:t,unknownKeys:"strip",catchall:Ri.create(),typeName:Y.ZodObject,...re(e)});class mc extends oe{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(const l of o)if(l.result.status==="valid")return l.result;for(const l of o)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const s=o.map(l=>new $.ZodError(l.ctx.common.issues));return(0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_union,unionErrors:s}),k.INVALID}if(r.common.async)return Promise.all(n.map(async o=>{const s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const u of n){const c={...r,common:{...r.common,issues:[]},parent:null},d=u._parseSync({data:r.data,path:r.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const l=s.map(u=>new $.ZodError(u));return(0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_union,unionErrors:l}),k.INVALID}}get options(){return this._def.options}}T.ZodUnion=mc;mc.create=(t,e)=>new mc({options:t,typeName:Y.ZodUnion,...re(e)});const ni=t=>t instanceof vc?ni(t.schema):t instanceof bn?ni(t.innerType()):t instanceof Ec?[t.value]:t instanceof mo?t.options:t instanceof wc?K.util.objectValues(t.enum):t instanceof _c?ni(t._def.innerType):t instanceof hc?[void 0]:t instanceof yc?[null]:t instanceof Pn?[void 0,...ni(t.unwrap())]:t instanceof go?[null,...ni(t.unwrap())]:t instanceof a0||t instanceof Rc?ni(t.unwrap()):t instanceof xc?ni(t._def.innerType):[];class Oh extends oe{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.ZodParsedType.object)return(0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.object,received:r.parsedType}),k.INVALID;const n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):((0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),k.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const i=new Map;for(const o of r){const s=ni(o.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const l of s){if(i.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);i.set(l,o)}}return new Oh({typeName:Y.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...re(n)})}}T.ZodDiscriminatedUnion=Oh;function zb(t,e){const r=(0,K.getParsedType)(t),n=(0,K.getParsedType)(e);if(t===e)return{valid:!0,data:t};if(r===K.ZodParsedType.object&&n===K.ZodParsedType.object){const i=K.util.objectKeys(e),o=K.util.objectKeys(t).filter(l=>i.indexOf(l)!==-1),s={...t,...e};for(const l of o){const u=zb(t[l],e[l]);if(!u.valid)return{valid:!1};s[l]=u.data}return{valid:!0,data:s}}else if(r===K.ZodParsedType.array&&n===K.ZodParsedType.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let o=0;o<t.length;o++){const s=t[o],l=e[o],u=zb(s,l);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===K.ZodParsedType.date&&n===K.ZodParsedType.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class gc extends oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=(o,s)=>{if((0,k.isAborted)(o)||(0,k.isAborted)(s))return k.INVALID;const l=zb(o.value,s.value);return l.valid?(((0,k.isDirty)(o)||(0,k.isDirty)(s))&&r.dirty(),{status:r.value,value:l.data}):((0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_intersection_types}),k.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}T.ZodIntersection=gc;gc.create=(t,e,r)=>new gc({left:t,right:e,typeName:Y.ZodIntersection,...re(r)});class $n extends oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.ZodParsedType.array)return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.array,received:n.parsedType}),k.INVALID;if(n.data.length<this._def.items.length)return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),k.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,k.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((s,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new Un(n,s,n.path,l)):null}).filter(s=>!!s);return n.common.async?Promise.all(o).then(s=>k.ParseStatus.mergeArray(r,s)):k.ParseStatus.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new $n({...this._def,rest:e})}}T.ZodTuple=$n;$n.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $n({items:t,typeName:Y.ZodTuple,rest:null,...re(e)})};class bc extends oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.ZodParsedType.object)return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.object,received:n.parsedType}),k.INVALID;const i=[],o=this._def.keyType,s=this._def.valueType;for(const l in n.data)i.push({key:o._parse(new Un(n,l,n.path,l)),value:s._parse(new Un(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?k.ParseStatus.mergeObjectAsync(r,i):k.ParseStatus.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof oe?new bc({keyType:e,valueType:r,typeName:Y.ZodRecord,...re(n)}):new bc({keyType:pn.create(),valueType:e,typeName:Y.ZodRecord,...re(r)})}}T.ZodRecord=bc;class Zf extends oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.ZodParsedType.map)return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.map,received:n.parsedType}),k.INVALID;const i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([l,u],c)=>({key:i._parse(new Un(n,l,n.path,[c,"key"])),value:o._parse(new Un(n,u,n.path,[c,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of s){const c=await u.key,d=await u.value;if(c.status==="aborted"||d.status==="aborted")return k.INVALID;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(c.value,d.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const u of s){const c=u.key,d=u.value;if(c.status==="aborted"||d.status==="aborted")return k.INVALID;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(c.value,d.value)}return{status:r.value,value:l}}}}T.ZodMap=Zf;Zf.create=(t,e,r)=>new Zf({valueType:e,keyType:t,typeName:Y.ZodMap,...re(r)});class ks extends oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.ZodParsedType.set)return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.set,received:n.parsedType}),k.INVALID;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&((0,k.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&((0,k.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const o=this._def.valueType;function s(u){const c=new Set;for(const d of u){if(d.status==="aborted")return k.INVALID;d.status==="dirty"&&r.dirty(),c.add(d.value)}return{status:r.value,value:c}}const l=[...n.data.values()].map((u,c)=>o._parse(new Un(n,u,n.path,c)));return n.common.async?Promise.all(l).then(u=>s(u)):s(l)}min(e,r){return new ks({...this._def,minSize:{value:e,message:X.errorUtil.toString(r)}})}max(e,r){return new ks({...this._def,maxSize:{value:e,message:X.errorUtil.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}T.ZodSet=ks;ks.create=(t,e)=>new ks({valueType:t,minSize:null,maxSize:null,typeName:Y.ZodSet,...re(e)});class ba extends oe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.ZodParsedType.function)return(0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.function,received:r.parsedType}),k.INVALID;function n(l,u){return(0,k.makeIssue)({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,Cp.getErrorMap)(),Cp.defaultErrorMap].filter(c=>!!c),issueData:{code:$.ZodIssueCode.invalid_arguments,argumentsError:u}})}function i(l,u){return(0,k.makeIssue)({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,Cp.getErrorMap)(),Cp.defaultErrorMap].filter(c=>!!c),issueData:{code:$.ZodIssueCode.invalid_return_type,returnTypeError:u}})}const o={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Pa){const l=this;return(0,k.OK)(async function(...u){const c=new $.ZodError([]),d=await l._def.args.parseAsync(u,o).catch(g=>{throw c.addIssue(n(u,g)),c}),f=await Reflect.apply(s,this,d);return await l._def.returns._def.type.parseAsync(f,o).catch(g=>{throw c.addIssue(i(f,g)),c})})}else{const l=this;return(0,k.OK)(function(...u){const c=l._def.args.safeParse(u,o);if(!c.success)throw new $.ZodError([n(u,c.error)]);const d=Reflect.apply(s,this,c.data),f=l._def.returns.safeParse(d,o);if(!f.success)throw new $.ZodError([i(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ba({...this._def,args:$n.create(e).rest(ws.create())})}returns(e){return new ba({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new ba({args:e||$n.create([]).rest(ws.create()),returns:r||ws.create(),typeName:Y.ZodFunction,...re(n)})}}T.ZodFunction=ba;class vc extends oe{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}T.ZodLazy=vc;vc.create=(t,e)=>new vc({getter:t,typeName:Y.ZodLazy,...re(e)});class Ec extends oe{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(r,{received:r.data,code:$.ZodIssueCode.invalid_literal,expected:this._def.value}),k.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}T.ZodLiteral=Ec;Ec.create=(t,e)=>new Ec({value:t,typeName:Y.ZodLiteral,...re(e)});function rC(t,e){return new mo({values:t,typeName:Y.ZodEnum,...re(e)})}class mo extends oe{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return(0,k.addIssueToContext)(r,{expected:K.util.joinValues(n),received:r.parsedType,code:$.ZodIssueCode.invalid_type}),k.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return(0,k.addIssueToContext)(r,{received:r.data,code:$.ZodIssueCode.invalid_enum_value,options:n}),k.INVALID}return(0,k.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return mo.create(e,{...this._def,...r})}exclude(e,r=this._def){return mo.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}T.ZodEnum=mo;mo.create=rC;class wc extends oe{_parse(e){const r=K.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==K.ZodParsedType.string&&n.parsedType!==K.ZodParsedType.number){const i=K.util.objectValues(r);return(0,k.addIssueToContext)(n,{expected:K.util.joinValues(i),received:n.parsedType,code:$.ZodIssueCode.invalid_type}),k.INVALID}if(this._cache||(this._cache=new Set(K.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=K.util.objectValues(r);return(0,k.addIssueToContext)(n,{received:n.data,code:$.ZodIssueCode.invalid_enum_value,options:i}),k.INVALID}return(0,k.OK)(e.data)}get enum(){return this._def.values}}T.ZodNativeEnum=wc;wc.create=(t,e)=>new wc({values:t,typeName:Y.ZodNativeEnum,...re(e)});class Pa extends oe{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==K.ZodParsedType.promise&&r.common.async===!1)return(0,k.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.promise,received:r.parsedType}),k.INVALID;const n=r.parsedType===K.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,k.OK)(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}T.ZodPromise=Pa;Pa.create=(t,e)=>new Pa({type:t,typeName:Y.ZodPromise,...re(e)});class bn extends oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:s=>{(0,k.addIssueToContext)(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async l=>{if(r.value==="aborted")return k.INVALID;const u=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return u.status==="aborted"?k.INVALID:u.status==="dirty"||r.value==="dirty"?(0,k.DIRTY)(u.value):u});{if(r.value==="aborted")return k.INVALID;const l=this._def.schema._parseSync({data:s,path:n.path,parent:n});return l.status==="aborted"?k.INVALID:l.status==="dirty"||r.value==="dirty"?(0,k.DIRTY)(l.value):l}}if(i.type==="refinement"){const s=l=>{const u=i.refinement(l,o);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?k.INVALID:(l.status==="dirty"&&r.dirty(),s(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?k.INVALID:(l.status==="dirty"&&r.dirty(),s(l.value).then(()=>({status:r.value,value:l.value}))))}if(i.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,k.isValid)(s))return k.INVALID;const l=i.transform(s.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>(0,k.isValid)(s)?Promise.resolve(i.transform(s.value,o)).then(l=>({status:r.value,value:l})):k.INVALID);K.util.assertNever(i)}}T.ZodEffects=bn;T.ZodTransformer=bn;bn.create=(t,e,r)=>new bn({schema:t,typeName:Y.ZodEffects,effect:e,...re(r)});bn.createWithPreprocess=(t,e,r)=>new bn({schema:e,effect:{type:"preprocess",transform:t},typeName:Y.ZodEffects,...re(r)});class Pn extends oe{_parse(e){return this._getType(e)===K.ZodParsedType.undefined?(0,k.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}T.ZodOptional=Pn;Pn.create=(t,e)=>new Pn({innerType:t,typeName:Y.ZodOptional,...re(e)});class go extends oe{_parse(e){return this._getType(e)===K.ZodParsedType.null?(0,k.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}T.ZodNullable=go;go.create=(t,e)=>new go({innerType:t,typeName:Y.ZodNullable,...re(e)});class _c extends oe{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===K.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}T.ZodDefault=_c;_c.create=(t,e)=>new _c({innerType:t,typeName:Y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...re(e)});class xc extends oe{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,k.isAsync)(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new $.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new $.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}T.ZodCatch=xc;xc.create=(t,e)=>new xc({innerType:t,typeName:Y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...re(e)});class Qf extends oe{_parse(e){if(this._getType(e)!==K.ZodParsedType.nan){const n=this._getOrReturnCtx(e);return(0,k.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:K.ZodParsedType.nan,received:n.parsedType}),k.INVALID}return{status:"valid",value:e.data}}}T.ZodNaN=Qf;Qf.create=t=>new Qf({typeName:Y.ZodNaN,...re(t)});T.BRAND=Symbol("zod_brand");class a0 extends oe{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}T.ZodBranded=a0;class Uc extends oe{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?k.INVALID:o.status==="dirty"?(r.dirty(),(0,k.DIRTY)(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?k.INVALID:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new Uc({in:e,out:r,typeName:Y.ZodPipeline})}}T.ZodPipeline=Uc;class Rc extends oe{_parse(e){const r=this._def.innerType._parse(e),n=i=>((0,k.isValid)(i)&&(i.value=Object.freeze(i.value)),i);return(0,k.isAsync)(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}}T.ZodReadonly=Rc;Rc.create=(t,e)=>new Rc({innerType:t,typeName:Y.ZodReadonly,...re(e)});function fR(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function nC(t,e={},r){return t?La.create().superRefine((n,i)=>{const o=t(n);if(o instanceof Promise)return o.then(s=>{if(!s){const l=fR(e,n),u=l.fatal??r??!0;i.addIssue({code:"custom",...l,fatal:u})}});if(!o){const s=fR(e,n),l=s.fatal??r??!0;i.addIssue({code:"custom",...s,fatal:l})}}):La.create()}T.late={object:Ue.lazycreate};var Y;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Y||(T.ZodFirstPartyTypeKind=Y={}));const uN=(t,e={message:`Input not instance of ${t.name}`})=>nC(r=>r instanceof t,e);T.instanceof=uN;const iC=pn.create;T.string=iC;const oC=ho.create;T.number=oC;const cN=Qf.create;T.nan=cN;const dN=yo.create;T.bigint=dN;const sC=fc.create;T.boolean=sC;const pN=Ts.create;T.date=pN;const fN=Wf.create;T.symbol=fN;const hN=hc.create;T.undefined=hN;const yN=yc.create;T.null=yN;const mN=La.create;T.any=mN;const gN=ws.create;T.unknown=gN;const bN=Ri.create;T.never=bN;const vN=Jf.create;T.void=vN;const EN=mn.create;T.array=EN;const wN=Ue.create;T.object=wN;const _N=Ue.strictCreate;T.strictObject=_N;const xN=mc.create;T.union=xN;const RN=Oh.create;T.discriminatedUnion=RN;const AN=gc.create;T.intersection=AN;const SN=$n.create;T.tuple=SN;const CN=bc.create;T.record=CN;const TN=Zf.create;T.map=TN;const kN=ks.create;T.set=kN;const LN=ba.create;T.function=LN;const PN=vc.create;T.lazy=PN;const DN=Ec.create;T.literal=DN;const BN=mo.create;T.enum=BN;const IN=wc.create;T.nativeEnum=IN;const jN=Pa.create;T.promise=jN;const aC=bn.create;T.effect=aC;T.transformer=aC;const UN=Pn.create;T.optional=UN;const $N=go.create;T.nullable=$N;const ON=bn.createWithPreprocess;T.preprocess=ON;const KN=Uc.create;T.pipeline=KN;const VN=()=>iC().optional();T.ostring=VN;const MN=()=>oC().optional();T.onumber=MN;const NN=()=>sC().optional();T.oboolean=NN;T.coerce={string:t=>pn.create({...t,coerce:!0}),number:t=>ho.create({...t,coerce:!0}),boolean:t=>fc.create({...t,coerce:!0}),bigint:t=>yo.create({...t,coerce:!0}),date:t=>Ts.create({...t,coerce:!0})};T.NEVER=k.INVALID;(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Po,t),r(s0,t),r(Q1,t),r(jc,t),r(T,t),r(Ln,t)})(Nb);(function(t){var e=S&&S.__createBinding||(Object.create?function(s,l,u,c){c===void 0&&(c=u);var d=Object.getOwnPropertyDescriptor(l,u);(!d||("get"in d?!l.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return l[u]}}),Object.defineProperty(s,c,d)}:function(s,l,u,c){c===void 0&&(c=u),s[c]=l[u]}),r=S&&S.__setModuleDefault||(Object.create?function(s,l){Object.defineProperty(s,"default",{enumerable:!0,value:l})}:function(s,l){s.default=l}),n=S&&S.__importStar||function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var u in s)u!=="default"&&Object.prototype.hasOwnProperty.call(s,u)&&e(l,s,u);return r(l,s),l},i=S&&S.__exportStar||function(s,l){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(l,u)&&e(l,s,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const o=n(Nb);t.z=o,i(Nb,t),t.default=o})(Mb);(function(t){var e=S&&S.__createBinding||(Object.create?function(o,s,l,u){u===void 0&&(u=l);var c=Object.getOwnPropertyDescriptor(s,l);(!c||("get"in c?!s.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(o,u,c)}:function(o,s,l,u){u===void 0&&(u=l),o[u]=s[l]}),r=S&&S.__exportStar||function(o,s){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&e(s,o,l)},n=S&&S.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(Mb);r(Mb,t),t.default=i.default})(G);var Si={},Kh={},Va={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.JwtVerifyError=t.JwtCreateError=t.JwkError=t.ERR_JWT_VERIFY=t.ERR_JWT_CREATE=t.ERR_JWT_INVALID=t.ERR_JWK_NOT_FOUND=t.ERR_JWK_INVALID=t.ERR_JWKS_NO_MATCHING_KEY=void 0,t.ERR_JWKS_NO_MATCHING_KEY="ERR_JWKS_NO_MATCHING_KEY",t.ERR_JWK_INVALID="ERR_JWK_INVALID",t.ERR_JWK_NOT_FOUND="ERR_JWK_NOT_FOUND",t.ERR_JWT_INVALID="ERR_JWT_INVALID",t.ERR_JWT_CREATE="ERR_JWT_CREATE",t.ERR_JWT_VERIFY="ERR_JWT_VERIFY";class e extends TypeError{constructor(o="JWK error",s=t.ERR_JWK_INVALID,l){super(o,l),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:s})}}t.JwkError=e;class r extends Error{constructor(o="Unable to create JWT",s=t.ERR_JWT_CREATE,l){super(o,l),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:s})}static from(o,s,l){return o instanceof r?o:o instanceof e?new r(l,o.code,{cause:o}):new r(l,s,{cause:o})}}t.JwtCreateError=r;class n extends Error{constructor(o="Invalid JWT",s=t.ERR_JWT_VERIFY,l){super(o,l),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:s})}static from(o,s,l){return o instanceof n?o:o instanceof e?new n(l,o.code,{cause:o}):new n(l,s,{cause:o})}}t.JwtVerifyError=n})(Va);Object.defineProperty(Kh,"__esModule",{value:!0});Kh.jwkAlgorithms=zN;const hg=Va,{process:Tp}=globalThis;var kA;const hR=typeof Tp<"u"&&typeof((kA=Tp==null?void 0:Tp.versions)==null?void 0:kA.node)=="string";function*zN(t){if(t.alg){yield t.alg;return}switch(t.kty){case"EC":{if((t.use==="enc"||t.use===void 0)&&(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),t.use==="sig"||t.use===void 0){const e="crv"in t?t.crv:void 0;switch(e){case"P-256":case"P-384":yield`ES${e.slice(-3)}`;break;case"P-521":yield"ES512";break;case"secp256k1":hR&&(yield"ES256K");break;default:throw new hg.JwkError(`Unsupported crv "${e}"`)}}return}case"OKP":{if(!t.use)throw new hg.JwkError('Missing "use" Parameter value');yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW";return}case"RSA":{(t.use==="enc"||t.use===void 0)&&(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",hR&&(yield"RSA1_5")),(t.use==="sig"||t.use===void 0)&&(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512");return}case"oct":{(t.use==="enc"||t.use===void 0)&&(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),(t.use==="sig"||t.use===void 0)&&(yield"HS256",yield"HS384",yield"HS512");return}default:throw new hg.JwkError(`Unsupported kty "${t.kty}"`)}}var $c={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.jwkPubSchema=t.jwkValidator=t.jwkSchema=t.jwkUnknownKeySchema=t.jwkSymKeySchema=t.jwkOkpKeySchema=t.jwkEcSecp256k1KeySchema=t.jwkEcKeySchema=t.jwkRsaKeySchema=t.jwkBaseSchema=t.keyUsageSchema=void 0;const e=G;t.keyUsageSchema=e.z.enum(["sign","verify","encrypt","decrypt","wrapKey","unwrapKey","deriveKey","deriveBits"]),t.jwkBaseSchema=e.z.object({kty:e.z.string().min(1),alg:e.z.string().min(1).optional(),kid:e.z.string().min(1).optional(),ext:e.z.boolean().optional(),use:e.z.enum(["sig","enc"]).optional(),key_ops:e.z.array(t.keyUsageSchema).optional(),x5c:e.z.array(e.z.string()).optional(),x5t:e.z.string().min(1).optional(),"x5t#S256":e.z.string().min(1).optional(),x5u:e.z.string().url().optional()}),t.jwkRsaKeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("RSA"),alg:e.z.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:e.z.string().min(1),e:e.z.string().min(1),d:e.z.string().min(1).optional(),p:e.z.string().min(1).optional(),q:e.z.string().min(1).optional(),dp:e.z.string().min(1).optional(),dq:e.z.string().min(1).optional(),qi:e.z.string().min(1).optional(),oth:e.z.array(e.z.object({r:e.z.string().optional(),d:e.z.string().optional(),t:e.z.string().optional()})).nonempty().optional()}),t.jwkEcKeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("EC"),alg:e.z.enum(["ES256","ES384","ES512"]).optional(),crv:e.z.enum(["P-256","P-384","P-521"]),x:e.z.string().min(1),y:e.z.string().min(1),d:e.z.string().min(1).optional()}),t.jwkEcSecp256k1KeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("EC"),alg:e.z.enum(["ES256K"]).optional(),crv:e.z.enum(["secp256k1"]),x:e.z.string().min(1),y:e.z.string().min(1),d:e.z.string().min(1).optional()}),t.jwkOkpKeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("OKP"),alg:e.z.enum(["EdDSA"]).optional(),crv:e.z.enum(["Ed25519","Ed448"]),x:e.z.string().min(1),d:e.z.string().min(1).optional()}),t.jwkSymKeySchema=t.jwkBaseSchema.extend({kty:e.z.literal("oct"),alg:e.z.enum(["HS256","HS384","HS512"]).optional(),k:e.z.string()}),t.jwkUnknownKeySchema=t.jwkBaseSchema.extend({kty:e.z.string().refine(r=>r!=="RSA"&&r!=="EC"&&r!=="OKP"&&r!=="oct")}),t.jwkSchema=e.z.union([t.jwkUnknownKeySchema,t.jwkRsaKeySchema,t.jwkEcKeySchema,t.jwkEcSecp256k1KeySchema,t.jwkOkpKeySchema,t.jwkSymKeySchema]),t.jwkValidator=t.jwkSchema.refine(r=>r.use!=null||r.key_ops!=null,"use or key_ops required").refine(r=>!r.use||!r.key_ops||r.key_ops.every(n=>r.use==="sig"?n==="sign"||n==="verify":n==="encrypt"||n==="decrypt"),"use and key_ops must be consistent"),t.jwkPubSchema=t.jwkValidator.refine(r=>r.kid!=null,"kid is required").refine(r=>!("k"in r)&&!("d"in r),"private key not allowed")})($c);var Da={};Object.defineProperty(Da,"__esModule",{value:!0});Da.jwksPubSchema=Da.jwksSchema=void 0;const Yf=G,lC=$c;Da.jwksSchema=Yf.z.object({keys:Yf.z.array(lC.jwkSchema)});Da.jwksPubSchema=Yf.z.object({keys:Yf.z.array(lC.jwkPubSchema)});var Vh={},l0={},ht={};function FN(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(r[s]!==255)throw new TypeError(o+" is ambiguous");r[s]=i}var l=t.length,u=t.charAt(0),c=Math.log(l)/Math.log(256),d=Math.log(256)/Math.log(l);function f(b){if(b instanceof Uint8Array||(ArrayBuffer.isView(b)?b=new Uint8Array(b.buffer,b.byteOffset,b.byteLength):Array.isArray(b)&&(b=Uint8Array.from(b))),!(b instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(b.length===0)return"";for(var w=0,C=0,y=0,m=b.length;y!==m&&b[y]===0;)y++,w++;for(var E=(m-y)*d+1>>>0,A=new Uint8Array(E);y!==m;){for(var L=b[y],D=0,B=E-1;(L!==0||D<C)&&B!==-1;B--,D++)L+=256*A[B]>>>0,A[B]=L%l>>>0,L=L/l>>>0;if(L!==0)throw new Error("Non-zero carry");C=D,y++}for(var j=E-C;j!==E&&A[j]===0;)j++;for(var pe=u.repeat(w);j<E;++j)pe+=t.charAt(A[j]);return pe}function h(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return new Uint8Array;var w=0;if(b[w]!==" "){for(var C=0,y=0;b[w]===u;)C++,w++;for(var m=(b.length-w)*c+1>>>0,E=new Uint8Array(m);b[w];){var A=r[b.charCodeAt(w)];if(A===255)return;for(var L=0,D=m-1;(A!==0||L<y)&&D!==-1;D--,L++)A+=l*E[D]>>>0,E[D]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");y=L,w++}if(b[w]!==" "){for(var B=m-y;B!==m&&E[B]===0;)B++;for(var j=new Uint8Array(C+(m-B)),pe=C;B!==m;)j[pe++]=E[B++];return j}}}function g(b){var w=h(b);if(w)return w;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:h,decode:g}}var qN=FN,GN=qN;const HN=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},u0=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},XN=t=>new TextEncoder().encode(t),WN=t=>new TextDecoder().decode(t);class JN{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class ZN{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return uC(this,e)}}class QN{constructor(e){this.decoders=e}or(e){return uC(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const uC=(t,e)=>new QN({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class YN{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new JN(e,r,n),this.decoder=new ZN(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Mh=({name:t,prefix:e,encode:r,decode:n})=>new YN(t,e,r,n),Oc=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=GN(r,e);return Mh({prefix:t,name:e,encode:n,decode:o=>u0(i(o))})},e2=(t,e,r,n)=>{const i={};for(let d=0;d<e.length;++d)i[e[d]]=d;let o=t.length;for(;t[o-1]==="=";)--o;const s=new Uint8Array(o*r/8|0);let l=0,u=0,c=0;for(let d=0;d<o;++d){const f=i[t[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);u=u<<r|f,l+=r,l>=8&&(l-=8,s[c++]=255&u>>l)}if(l>=r||255&u<<8-l)throw new SyntaxError("Unexpected end of data");return s},t2=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<<r)-1;let o="",s=0,l=0;for(let u=0;u<t.length;++u)for(l=l<<8|t[u],s+=8;s>r;)s-=r,o+=e[i&l>>s];if(s&&(o+=e[i&l<<r-s]),n)for(;o.length*r&7;)o+="=";return o},Rt=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>Mh({prefix:e,name:t,encode(i){return t2(i,n,r)},decode(i){return e2(i,n,r,t)}}),r2=Rt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),n2=Rt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),i2=Rt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),o2=Rt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),cC=Object.freeze(Object.defineProperty({__proto__:null,base64:r2,base64pad:n2,base64url:i2,base64urlpad:o2},Symbol.toStringTag,{value:"Module"})),c0=bh(cC);Object.defineProperty(ht,"__esModule",{value:!0});ht.segmentedStringRefinementFactory=ht.jwtCharsRefinement=ht.cachedGetter=ht.preferredOrderCmp=ht.isDefined=void 0;ht.matchesAny=u2;ht.parseB64uJson=p2;const s2=c0,Zs=G,a2=t=>t!==void 0;ht.isDefined=a2;const l2=t=>(e,r)=>{const n=t.indexOf(e),i=t.indexOf(r);return n===i?0:n===-1?1:i===-1?-1:n-i};ht.preferredOrderCmp=l2;function u2(t){return t==null?e=>!0:Array.isArray(t)?e=>t.includes(e):e=>e===t}const c2=(t,e)=>function(){const r=t.call(this);return Object.defineProperty(this,t.name,{get:()=>r,enumerable:!0,configurable:!0}),r};ht.cachedGetter=c2;const d2=new TextDecoder;function p2(t){const e=s2.base64url.baseDecode(t),r=d2.decode(e);return JSON.parse(r)}const f2=(t,e)=>{let r;for(let n=0;n<t.length;n++)if(r=t.charCodeAt(n),!(65<=r&&r<=90||97<=r&&r<=122||48<=r&&r<=57||r===45||r===95||r===46)){const i=String.fromCodePoint(t.codePointAt(n));return e.addIssue({code:Zs.ZodIssueCode.custom,message:`Invalid character "${i}" in JWT at position ${n}`})}};ht.jwtCharsRefinement=f2;const h2=(t,e=2)=>{if(!Number.isFinite(t)||t<1||(t|0)!==t)throw new TypeError(`Count must be a natural number (got ${t})`);const r=t*e+(t-1),n="Invalid JWT format";return(i,o)=>{if(i.length<r)return o.addIssue({code:Zs.ZodIssueCode.custom,message:`${n}: too short`}),!1;let s=0;for(let l=0;l<t-1;l++){const u=i.indexOf(".",s);if(u===-1)return o.addIssue({code:Zs.ZodIssueCode.custom,message:`${n}: expected ${t} segments, got ${l+1}`}),!1;if(u-s<e)return o.addIssue({code:Zs.ZodIssueCode.custom,message:`${n}: segment ${l+1} is too short`}),!1;s=u+1}return i.indexOf(".",s)!==-1?(o.addIssue({code:Zs.ZodIssueCode.custom,message:`${n}: too many segments`}),!1):i.length-s<e?(o.addIssue({code:Zs.ZodIssueCode.custom,message:`${n}: last segment is too short`}),!1):!0}};ht.segmentedStringRefinementFactory=h2;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.jwtPayloadSchema=t.htuSchema=t.jwtHeaderSchema=t.isUnsignedJwt=t.unsignedJwtSchema=t.isSignedJwt=t.signedJwtSchema=void 0;const e=G,r=$c,n=ht;t.signedJwtSchema=e.z.string().superRefine(n.jwtCharsRefinement).superRefine((0,n.segmentedStringRefinementFactory)(3));const i=s=>t.signedJwtSchema.safeParse(s).success;t.isSignedJwt=i,t.unsignedJwtSchema=e.z.string().superRefine(n.jwtCharsRefinement).superRefine((0,n.segmentedStringRefinementFactory)(2));const o=s=>t.unsignedJwtSchema.safeParse(s).success;t.isUnsignedJwt=o,t.jwtHeaderSchema=e.z.object({alg:e.z.string(),jku:e.z.string().url().optional(),jwk:e.z.object({kty:e.z.string(),crv:e.z.string().optional(),x:e.z.string().optional(),y:e.z.string().optional(),e:e.z.string().optional(),n:e.z.string().optional()}).optional(),kid:e.z.string().optional(),x5u:e.z.string().optional(),x5c:e.z.array(e.z.string()).optional(),x5t:e.z.string().optional(),"x5t#S256":e.z.string().optional(),typ:e.z.string().optional(),cty:e.z.string().optional(),crit:e.z.array(e.z.string()).optional()}).passthrough(),t.htuSchema=e.z.string().superRefine((s,l)=>{try{const u=new URL(s);u.protocol!=="http:"&&u.protocol!=="https:"&&l.addIssue({code:e.z.ZodIssueCode.custom,message:"Only http: and https: protocols are allowed"}),(u.username||u.password)&&l.addIssue({code:e.z.ZodIssueCode.custom,message:"Credentials not allowed"}),u.search&&l.addIssue({code:e.z.ZodIssueCode.custom,message:"Query string not allowed"}),u.hash&&l.addIssue({code:e.z.ZodIssueCode.custom,message:"Fragment not allowed"})}catch{l.addIssue({code:e.z.ZodIssueCode.invalid_string,validation:"url"})}return s}),t.jwtPayloadSchema=e.z.object({iss:e.z.string().optional(),aud:e.z.union([e.z.string(),e.z.array(e.z.string()).nonempty()]).optional(),sub:e.z.string().optional(),exp:e.z.number().int().optional(),nbf:e.z.number().int().optional(),iat:e.z.number().int().optional(),jti:e.z.string().optional(),htm:e.z.string().optional(),htu:t.htuSchema.optional(),ath:e.z.string().optional(),acr:e.z.string().optional(),azp:e.z.string().optional(),amr:e.z.array(e.z.string()).optional(),cnf:e.z.object({kid:e.z.string().optional(),jwk:r.jwkPubSchema.optional(),jwe:e.z.string().optional(),jku:e.z.string().url().optional(),jkt:e.z.string().optional(),"x5t#S256":e.z.string().optional(),osc:e.z.string().optional()}).optional(),client_id:e.z.string().optional(),scope:e.z.string().optional(),nonce:e.z.string().optional(),at_hash:e.z.string().optional(),c_hash:e.z.string().optional(),s_hash:e.z.string().optional(),auth_time:e.z.number().int().optional(),name:e.z.string().optional(),family_name:e.z.string().optional(),given_name:e.z.string().optional(),middle_name:e.z.string().optional(),nickname:e.z.string().optional(),preferred_username:e.z.string().optional(),gender:e.z.string().optional(),picture:e.z.string().url().optional(),profile:e.z.string().url().optional(),website:e.z.string().url().optional(),birthdate:e.z.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:e.z.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:e.z.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?$/).optional(),updated_at:e.z.number().int().optional(),email:e.z.string().optional(),email_verified:e.z.boolean().optional(),phone_number:e.z.string().optional(),phone_number_verified:e.z.boolean().optional(),address:e.z.object({formatted:e.z.string().optional(),street_address:e.z.string().optional(),locality:e.z.string().optional(),region:e.z.string().optional(),postal_code:e.z.string().optional(),country:e.z.string().optional()}).optional(),authorization_details:e.z.array(e.z.object({type:e.z.string(),locations:e.z.array(e.z.string()).optional(),actions:e.z.array(e.z.string()).optional(),datatypes:e.z.array(e.z.string()).optional(),identifier:e.z.string().optional(),privileges:e.z.array(e.z.string()).optional()}).passthrough()).optional()}).passthrough()})(l0);Object.defineProperty(Vh,"__esModule",{value:!0});Vh.unsafeDecodeJwt=y2;const kp=Va,yR=l0,mR=ht;function y2(t){const{0:e,1:r,length:n}=t.split(".");if(n>3||n<2)throw new kp.JwtVerifyError(void 0,kp.ERR_JWT_INVALID);const i=yR.jwtHeaderSchema.parse((0,mR.parseB64uJson)(e));if(n===2&&(i==null?void 0:i.alg)!=="none")throw new kp.JwtVerifyError(void 0,kp.ERR_JWT_INVALID);const o=yR.jwtPayloadSchema.parse((0,mR.parseB64uJson)(r));return{header:i,payload:o}}var dC={};Object.defineProperty(dC,"__esModule",{value:!0});var Nh={},m2=S&&S.__runInitializers||function(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0},yg=S&&S.__esDecorate||function(t,e,r,n,i,o){function s(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var l=n.kind,u=l==="getter"?"get":l==="setter"?"set":"value",c=!e&&t?n.static?t:t.prototype:null,d=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f,h=!1,g=r.length-1;g>=0;g--){var b={};for(var w in n)b[w]=w==="access"?{}:n[w];for(var w in n.access)b.access[w]=n.access[w];b.addInitializer=function(y){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(y||null))};var C=(0,r[g])(l==="accessor"?{get:d.get,set:d.set}:d[u],b);if(l==="accessor"){if(C===void 0)continue;if(C===null||typeof C!="object")throw new TypeError("Object expected");(f=s(C.get))&&(d.get=f),(f=s(C.set))&&(d.set=f),(f=s(C.init))&&i.unshift(f)}else(f=s(C))&&(l==="field"?i.unshift(f):d[u]=f)}c&&Object.defineProperty(c,n.name,d),h=!0};Object.defineProperty(Nh,"__esModule",{value:!0});Nh.Key=void 0;const g2=Kh,b2=Va,v2=$c,mg=ht,gR=v2.jwkSchema.readonly();let E2=(()=>{var t;let e=[],r,n,i;return t=class{constructor(s){if(Object.defineProperty(this,"jwk",{enumerable:!0,configurable:!0,writable:!0,value:(m2(this,e),s)}),!s.use)throw new b2.JwkError('Missing "use" Parameter value')}get isPrivate(){const{jwk:s}=this;return"d"in s&&s.d!==void 0||"k"in s&&s.k!==void 0}get isSymetric(){const{jwk:s}=this;return"k"in s&&s.k!==void 0}get privateJwk(){return this.isPrivate?this.jwk:void 0}get publicJwk(){if(!this.isSymetric)return gR.parse({...this.jwk,d:void 0,k:void 0})}get bareJwk(){if(this.isSymetric)return;const{kty:s,crv:l,e:u,n:c,x:d,y:f}=this.jwk;return gR.parse({crv:l,e:u,kty:s,n:c,x:d,y:f})}get use(){return this.jwk.use}get alg(){return this.jwk.alg}get kid(){return this.jwk.kid}get crv(){return this.jwk.crv}get algorithms(){return Object.freeze(Array.from((0,g2.jwkAlgorithms)(this.jwk)))}},(()=>{const o=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[mg.cachedGetter],n=[mg.cachedGetter],i=[mg.cachedGetter],yg(t,null,r,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:s=>"publicJwk"in s,get:s=>s.publicJwk},metadata:o},null,e),yg(t,null,n,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:s=>"bareJwk"in s,get:s=>s.bareJwk},metadata:o},null,e),yg(t,null,i,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:s=>"algorithms"in s,get:s=>s.algorithms},metadata:o},null,e),o&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),t})();Nh.Key=E2;var zh={},w2=S&&S.__runInitializers||function(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0},gg=S&&S.__esDecorate||function(t,e,r,n,i,o){function s(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var l=n.kind,u=l==="getter"?"get":l==="setter"?"set":"value",c=!e&&t?n.static?t:t.prototype:null,d=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f,h=!1,g=r.length-1;g>=0;g--){var b={};for(var w in n)b[w]=w==="access"?{}:n[w];for(var w in n.access)b.access[w]=n.access[w];b.addInitializer=function(y){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(y||null))};var C=(0,r[g])(l==="accessor"?{get:d.get,set:d.set}:d[u],b);if(l==="accessor"){if(C===void 0)continue;if(C===null||typeof C!="object")throw new TypeError("Object expected");(f=s(C.get))&&(d.get=f),(f=s(C.set))&&(d.set=f),(f=s(C.init))&&i.unshift(f)}else(f=s(C))&&(l==="field"?i.unshift(f):d[u]=f)}c&&Object.defineProperty(c,n.name,d),h=!0};Object.defineProperty(zh,"__esModule",{value:!0});zh.Keyset=void 0;const Sr=Va,_2=Vh,Yo=ht,x2=t=>t.privateJwk,R2=t=>t.publicJwk;let A2=(()=>{var t;let e=[],r,n,i;return t=class{constructor(s,l=s instanceof t?[...s.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"]){Object.defineProperty(this,"preferredSigningAlgorithms",{enumerable:!0,configurable:!0,writable:!0,value:(w2(this,e),l)}),Object.defineProperty(this,"keys",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const u=[],c=new Set;for(const d of s)if(d&&(u.push(d),d.kid)){if(c.has(d.kid))throw new Sr.JwkError(`Duplicate key: ${d.kid}`);c.add(d.kid)}this.keys=Object.freeze(u)}get size(){return this.keys.length}get signAlgorithms(){const s=new Set;for(const l of this)if(l.use==="sig")for(const u of l.algorithms)s.add(u);return Object.freeze([...s].sort((0,Yo.preferredOrderCmp)(this.preferredSigningAlgorithms)))}get publicJwks(){return{keys:Array.from(this,R2).filter(Yo.isDefined)}}get privateJwks(){return{keys:Array.from(this,x2).filter(Yo.isDefined)}}has(s){return this.keys.some(l=>l.kid===s)}get(s){for(const l of this.list(s))return l;throw new Sr.JwkError(`Key not found ${s.kid||s.alg||"<unknown>"}`,Sr.ERR_JWK_NOT_FOUND)}*list(s){var l,u;if(((l=s.kid)==null?void 0:l.length)!==0&&((u=s.alg)==null?void 0:u.length)!==0){for(const c of this)if(!(s.use&&c.use!==s.use)){if(Array.isArray(s.kid)){if(!c.kid||!s.kid.includes(c.kid))continue}else if(s.kid&&c.kid!==s.kid)continue;if(Array.isArray(s.alg)){if(!s.alg.some(d=>c.algorithms.includes(d)))continue}else if(typeof s.alg=="string"&&!c.algorithms.includes(s.alg))continue;yield c}}}findPrivateKey({kid:s,alg:l,use:u}){const c=[];for(const h of this.list({kid:s,alg:l,use:u}))if(h.isPrivate){if(typeof l=="string")return[h,l];c.push(h)}const d=(0,Yo.matchesAny)(l),f=c.map(h=>[h,h.algorithms.filter(d)]);for(const h of this.preferredSigningAlgorithms)for(const[g,b]of f)if(b.includes(h))return[g,h];for(const[h,g]of f)for(const b of g)return[h,b];throw new Sr.JwkError(`No private key found for ${s||l||u||"<unknown>"}`,Sr.ERR_JWK_NOT_FOUND)}[(r=[Yo.cachedGetter],n=[Yo.cachedGetter],i=[Yo.cachedGetter],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:s,kid:l,...u},c){try{const[d,f]=this.findPrivateKey({alg:s,kid:l,use:"sig"}),h={...u,alg:f,kid:d.kid};return typeof c=="function"&&(c=await c(h,d)),await d.createJwt(h,c)}catch(d){throw Sr.JwtCreateError.from(d)}}async verifyJwt(s,l){const{header:u}=(0,_2.unsafeDecodeJwt)(s),{kid:c,alg:d}=u,f=[];for(const h of this.list({kid:c,alg:d}))try{return{...await h.verifyJwt(s,l),key:h}}catch(g){f.push(g)}switch(f.length){case 0:throw new Sr.JwtVerifyError("No key matched",Sr.ERR_JWKS_NO_MATCHING_KEY);case 1:throw Sr.JwtVerifyError.from(f[0],Sr.ERR_JWT_INVALID);default:throw Sr.JwtVerifyError.from(f,Sr.ERR_JWT_INVALID)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const o=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;gg(t,null,r,{kind:"getter",name:"signAlgorithms",static:!1,private:!1,access:{has:s=>"signAlgorithms"in s,get:s=>s.signAlgorithms},metadata:o},null,e),gg(t,null,n,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:s=>"publicJwks"in s,get:s=>s.publicJwks},metadata:o},null,e),gg(t,null,i,{kind:"getter",name:"privateJwks",static:!1,private:!1,access:{has:s=>"privateJwks"in s,get:s=>s.privateJwks},metadata:o},null,e),o&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:o})})(),t})();zh.Keyset=A2;(function(t){var e=S&&S.__createBinding||(Object.create?function(i,o,s,l){l===void 0&&(l=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,l,u)}:function(i,o,s,l){l===void 0&&(l=s),i[l]=o[s]}),r=S&&S.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=void 0;var n=G;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return n.ZodError}}),r(Kh,t),r(Va,t),r($c,t),r(Da,t),r(Vh,t),r(dC,t),r(l0,t),r(Nh,t),r(zh,t),r(ht,t)})(Si);var pC={},Fh={};const ie=crypto,lr=t=>t instanceof CryptoKey,fC=async(t,e)=>{const r=`SHA-${t.slice(-3)}`;return new Uint8Array(await ie.subtle.digest(r,e))},He=new TextEncoder,Vr=new TextDecoder,eh=2**32;function Vn(...t){const e=t.reduce((i,{length:o})=>i+o,0),r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function S2(t,e){return Vn(He.encode(t),new Uint8Array([0]),e)}function Fb(t,e,r){if(e<0||e>=eh)throw new RangeError(`value must be >= 0 and <= ${eh-1}. Received ${e}`);t.set([e>>>24,e>>>16,e>>>8,e&255],r)}function hC(t){const e=Math.floor(t/eh),r=t%eh,n=new Uint8Array(8);return Fb(n,e,0),Fb(n,r,4),n}function d0(t){const e=new Uint8Array(4);return Fb(e,t),e}function bg(t){return Vn(d0(t.length),t)}async function C2(t,e,r){const n=Math.ceil((e>>3)/32),i=new Uint8Array(n*32);for(let o=0;o<n;o++){const s=new Uint8Array(4+t.length+r.length);s.set(d0(o+1)),s.set(t,4),s.set(r,4+t.length),i.set(await fC("sha256",s),o*32)}return i.slice(0,e>>3)}const p0=t=>{let e=t;typeof e=="string"&&(e=He.encode(e));const r=32768,n=[];for(let i=0;i<e.length;i+=r)n.push(String.fromCharCode.apply(null,e.subarray(i,i+r)));return btoa(n.join(""))},Ze=t=>p0(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"),yC=t=>{const e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r},qe=t=>{let e=t;e instanceof Uint8Array&&(e=Vr.decode(e)),e=e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return yC(e)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};let mt=class extends Error{constructor(e,r){var n;super(e,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(n=Error.captureStackTrace)==null||n.call(Error,this,this.constructor)}};mt.code="ERR_JOSE_GENERIC";class Mt extends mt{constructor(e,r,n="unspecified",i="unspecified"){super(e,{cause:{claim:n,reason:i,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=n,this.reason=i,this.payload=r}}Mt.code="ERR_JWT_CLAIM_VALIDATION_FAILED";class th extends mt{constructor(e,r,n="unspecified",i="unspecified"){super(e,{cause:{claim:n,reason:i,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=n,this.reason=i,this.payload=r}}th.code="ERR_JWT_EXPIRED";class Ac extends mt{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}}Ac.code="ERR_JOSE_ALG_NOT_ALLOWED";class we extends mt{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}}we.code="ERR_JOSE_NOT_SUPPORTED";class Ba extends mt{constructor(e="decryption operation failed",r){super(e,r),this.code="ERR_JWE_DECRYPTION_FAILED"}}Ba.code="ERR_JWE_DECRYPTION_FAILED";class F extends mt{constructor(){super(...arguments),this.code="ERR_JWE_INVALID"}}F.code="ERR_JWE_INVALID";class _e extends mt{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}}_e.code="ERR_JWS_INVALID";class zt extends mt{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}}zt.code="ERR_JWT_INVALID";class f0 extends mt{constructor(){super(...arguments),this.code="ERR_JWK_INVALID"}}f0.code="ERR_JWK_INVALID";class qh extends mt{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID"}}qh.code="ERR_JWKS_INVALID";class Gh extends mt{constructor(e="no applicable key found in the JSON Web Key Set",r){super(e,r),this.code="ERR_JWKS_NO_MATCHING_KEY"}}Gh.code="ERR_JWKS_NO_MATCHING_KEY";class h0 extends mt{constructor(e="multiple matching keys found in the JSON Web Key Set",r){super(e,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS"}}h0.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";class y0 extends mt{constructor(e="request timed out",r){super(e,r),this.code="ERR_JWKS_TIMEOUT"}}y0.code="ERR_JWKS_TIMEOUT";class Hh extends mt{constructor(e="signature verification failed",r){super(e,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}Hh.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";const T2=Object.freeze(Object.defineProperty({__proto__:null,JOSEAlgNotAllowed:Ac,JOSEError:mt,JOSENotSupported:we,JWEDecryptionFailed:Ba,JWEInvalid:F,JWKInvalid:f0,JWKSInvalid:qh,JWKSMultipleMatchingKeys:h0,JWKSNoMatchingKey:Gh,JWKSTimeout:y0,JWSInvalid:_e,JWSSignatureVerificationFailed:Hh,JWTClaimValidationFailed:Mt,JWTExpired:th,JWTInvalid:zt},Symbol.toStringTag,{value:"Module"})),Xh=ie.getRandomValues.bind(ie);function mC(t){switch(t){case"A128GCM":case"A128GCMKW":case"A192GCM":case"A192GCMKW":case"A256GCM":case"A256GCMKW":return 96;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return 128;default:throw new we(`Unsupported JWE Algorithm: ${t}`)}}const k2=t=>Xh(new Uint8Array(mC(t)>>3)),gC=(t,e)=>{if(e.length<<3!==mC(t))throw new F("Invalid Initialization Vector length")},rh=(t,e)=>{const r=t.byteLength<<3;if(r!==e)throw new F(`Invalid Content Encryption Key length. Expected ${e} bits, got ${r} bits`)},L2=(t,e)=>{if(!(t instanceof Uint8Array))throw new TypeError("First argument must be a buffer");if(!(e instanceof Uint8Array))throw new TypeError("Second argument must be a buffer");if(t.length!==e.length)throw new TypeError("Input buffers must have the same length");const r=t.length;let n=0,i=-1;for(;++i<r;)n|=t[i]^e[i];return n===0};function dt(t,e="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${e} must be ${t}`)}function pi(t,e){return t.name===e}function pf(t){return parseInt(t.name.slice(4),10)}function P2(t){switch(t){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function bC(t,e){if(e.length&&!e.some(r=>t.usages.includes(r))){let r="CryptoKey does not support this operation, its usages must include ";if(e.length>2){const n=e.pop();r+=`one of ${e.join(", ")}, or ${n}.`}else e.length===2?r+=`one of ${e[0]} or ${e[1]}.`:r+=`${e[0]}.`;throw new TypeError(r)}}function D2(t,e,...r){switch(e){case"HS256":case"HS384":case"HS512":{if(!pi(t.algorithm,"HMAC"))throw dt("HMAC");const n=parseInt(e.slice(2),10);if(pf(t.algorithm.hash)!==n)throw dt(`SHA-${n}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!pi(t.algorithm,"RSASSA-PKCS1-v1_5"))throw dt("RSASSA-PKCS1-v1_5");const n=parseInt(e.slice(2),10);if(pf(t.algorithm.hash)!==n)throw dt(`SHA-${n}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!pi(t.algorithm,"RSA-PSS"))throw dt("RSA-PSS");const n=parseInt(e.slice(2),10);if(pf(t.algorithm.hash)!==n)throw dt(`SHA-${n}`,"algorithm.hash");break}case"EdDSA":{if(t.algorithm.name!=="Ed25519"&&t.algorithm.name!=="Ed448")throw dt("Ed25519 or Ed448");break}case"Ed25519":{if(!pi(t.algorithm,"Ed25519"))throw dt("Ed25519");break}case"ES256":case"ES384":case"ES512":{if(!pi(t.algorithm,"ECDSA"))throw dt("ECDSA");const n=P2(e);if(t.algorithm.namedCurve!==n)throw dt(n,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}bC(t,r)}function bo(t,e,...r){switch(e){case"A128GCM":case"A192GCM":case"A256GCM":{if(!pi(t.algorithm,"AES-GCM"))throw dt("AES-GCM");const n=parseInt(e.slice(1,4),10);if(t.algorithm.length!==n)throw dt(n,"algorithm.length");break}case"A128KW":case"A192KW":case"A256KW":{if(!pi(t.algorithm,"AES-KW"))throw dt("AES-KW");const n=parseInt(e.slice(1,4),10);if(t.algorithm.length!==n)throw dt(n,"algorithm.length");break}case"ECDH":{switch(t.algorithm.name){case"ECDH":case"X25519":case"X448":break;default:throw dt("ECDH, X25519, or X448")}break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":if(!pi(t.algorithm,"PBKDF2"))throw dt("PBKDF2");break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(!pi(t.algorithm,"RSA-OAEP"))throw dt("RSA-OAEP");const n=parseInt(e.slice(9),10)||1;if(pf(t.algorithm.hash)!==n)throw dt(`SHA-${n}`,"algorithm.hash");break}default:throw new TypeError("CryptoKey does not support this operation")}bC(t,r)}function vC(t,e,...r){var n;if(r=r.filter(Boolean),r.length>2){const i=r.pop();t+=`one of type ${r.join(", ")}, or ${i}.`}else r.length===2?t+=`one of type ${r[0]} or ${r[1]}.`:t+=`of type ${r[0]}.`;return e==null?t+=` Received ${e}`:typeof e=="function"&&e.name?t+=` Received function ${e.name}`:typeof e=="object"&&e!=null&&(n=e.constructor)!=null&&n.name&&(t+=` Received an instance of ${e.constructor.name}`),t}const jt=(t,...e)=>vC("Key must be ",t,...e);function EC(t,e,...r){return vC(`Key for the ${t} algorithm must be `,e,...r)}const wC=t=>lr(t)?!0:(t==null?void 0:t[Symbol.toStringTag])==="KeyObject",Ut=["CryptoKey"];async function B2(t,e,r,n,i,o){if(!(e instanceof Uint8Array))throw new TypeError(jt(e,"Uint8Array"));const s=parseInt(t.slice(1,4),10),l=await ie.subtle.importKey("raw",e.subarray(s>>3),"AES-CBC",!1,["decrypt"]),u=await ie.subtle.importKey("raw",e.subarray(0,s>>3),{hash:`SHA-${s<<1}`,name:"HMAC"},!1,["sign"]),c=Vn(o,n,r,hC(o.length<<3)),d=new Uint8Array((await ie.subtle.sign("HMAC",u,c)).slice(0,s>>3));let f;try{f=L2(i,d)}catch{}if(!f)throw new Ba;let h;try{h=new Uint8Array(await ie.subtle.decrypt({iv:n,name:"AES-CBC"},l,r))}catch{}if(!h)throw new Ba;return h}async function I2(t,e,r,n,i,o){let s;e instanceof Uint8Array?s=await ie.subtle.importKey("raw",e,"AES-GCM",!1,["decrypt"]):(bo(e,t,"decrypt"),s=e);try{return new Uint8Array(await ie.subtle.decrypt({additionalData:o,iv:n,name:"AES-GCM",tagLength:128},s,Vn(r,i)))}catch{throw new Ba}}const _C=async(t,e,r,n,i,o)=>{if(!lr(e)&&!(e instanceof Uint8Array))throw new TypeError(jt(e,...Ut,"Uint8Array"));if(!n)throw new F("JWE Initialization Vector missing");if(!i)throw new F("JWE Authentication Tag missing");switch(gC(t,n),t){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return e instanceof Uint8Array&&rh(e,parseInt(t.slice(-3),10)),B2(t,e,r,n,i,o);case"A128GCM":case"A192GCM":case"A256GCM":return e instanceof Uint8Array&&rh(e,parseInt(t.slice(1,4),10)),I2(t,e,r,n,i,o);default:throw new we("Unsupported JWE Content Encryption Algorithm")}},Kc=(...t)=>{const e=t.filter(Boolean);if(e.length===0||e.length===1)return!0;let r;for(const n of e){const i=Object.keys(n);if(!r||r.size===0){r=new Set(i);continue}for(const o of i){if(r.has(o))return!1;r.add(o)}}return!0};function j2(t){return typeof t=="object"&&t!==null}function Xe(t){if(!j2(t)||Object.prototype.toString.call(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}const Wh=[{hash:"SHA-256",name:"HMAC"},!0,["sign"]];function xC(t,e){if(t.algorithm.length!==parseInt(e.slice(1,4),10))throw new TypeError(`Invalid key size for alg: ${e}`)}function RC(t,e,r){if(lr(t))return bo(t,e,r),t;if(t instanceof Uint8Array)return ie.subtle.importKey("raw",t,"AES-KW",!0,[r]);throw new TypeError(jt(t,...Ut,"Uint8Array"))}const qb=async(t,e,r)=>{const n=await RC(e,t,"wrapKey");xC(n,t);const i=await ie.subtle.importKey("raw",r,...Wh);return new Uint8Array(await ie.subtle.wrapKey("raw",i,n,"AES-KW"))},Gb=async(t,e,r)=>{const n=await RC(e,t,"unwrapKey");xC(n,t);const i=await ie.subtle.unwrapKey("raw",r,n,"AES-KW",...Wh);return new Uint8Array(await ie.subtle.exportKey("raw",i))};async function AC(t,e,r,n,i=new Uint8Array(0),o=new Uint8Array(0)){if(!lr(t))throw new TypeError(jt(t,...Ut));if(bo(t,"ECDH"),!lr(e))throw new TypeError(jt(e,...Ut));bo(e,"ECDH","deriveBits");const s=Vn(bg(He.encode(r)),bg(i),bg(o),d0(n));let l;t.algorithm.name==="X25519"?l=256:t.algorithm.name==="X448"?l=448:l=Math.ceil(parseInt(t.algorithm.namedCurve.substr(-3),10)/8)<<3;const u=new Uint8Array(await ie.subtle.deriveBits({name:t.algorithm.name,public:t},e,l));return C2(u,n,s)}async function U2(t){if(!lr(t))throw new TypeError(jt(t,...Ut));return ie.subtle.generateKey(t.algorithm,!0,["deriveBits"])}function SC(t){if(!lr(t))throw new TypeError(jt(t,...Ut));return["P-256","P-384","P-521"].includes(t.algorithm.namedCurve)||t.algorithm.name==="X25519"||t.algorithm.name==="X448"}function $2(t){if(!(t instanceof Uint8Array)||t.length<8)throw new F("PBES2 Salt Input must be 8 or more octets")}function O2(t,e){if(t instanceof Uint8Array)return ie.subtle.importKey("raw",t,"PBKDF2",!1,["deriveBits"]);if(lr(t))return bo(t,e,"deriveBits","deriveKey"),t;throw new TypeError(jt(t,...Ut,"Uint8Array"))}async function CC(t,e,r,n){$2(t);const i=S2(e,t),o=parseInt(e.slice(13,16),10),s={hash:`SHA-${e.slice(8,11)}`,iterations:r,name:"PBKDF2",salt:i},l={length:o,name:"AES-KW"},u=await O2(n,e);if(u.usages.includes("deriveBits"))return new Uint8Array(await ie.subtle.deriveBits(s,u,o));if(u.usages.includes("deriveKey"))return ie.subtle.deriveKey(s,u,l,!1,["wrapKey","unwrapKey"]);throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"')}const K2=async(t,e,r,n=2048,i=Xh(new Uint8Array(16)))=>{const o=await CC(i,t,n,e);return{encryptedKey:await qb(t.slice(-6),o,r),p2c:n,p2s:Ze(i)}},V2=async(t,e,r,n,i)=>{const o=await CC(i,t,n,e);return Gb(t.slice(-6),o,r)};function nh(t){switch(t){case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":return"RSA-OAEP";default:throw new we(`alg ${t} is not supported either by JOSE or your javascript runtime`)}}const Jh=(t,e)=>{if(t.startsWith("RS")||t.startsWith("PS")){const{modulusLength:r}=e.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${t} requires key modulusLength to be 2048 bits or larger`)}},M2=async(t,e,r)=>{if(!lr(e))throw new TypeError(jt(e,...Ut));if(bo(e,t,"encrypt","wrapKey"),Jh(t,e),e.usages.includes("encrypt"))return new Uint8Array(await ie.subtle.encrypt(nh(t),e,r));if(e.usages.includes("wrapKey")){const n=await ie.subtle.importKey("raw",r,...Wh);return new Uint8Array(await ie.subtle.wrapKey("raw",n,e,nh(t)))}throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation')},N2=async(t,e,r)=>{if(!lr(e))throw new TypeError(jt(e,...Ut));if(bo(e,t,"decrypt","unwrapKey"),Jh(t,e),e.usages.includes("decrypt"))return new Uint8Array(await ie.subtle.decrypt(nh(t),e,r));if(e.usages.includes("unwrapKey")){const n=await ie.subtle.unwrapKey("raw",r,e,nh(t),...Wh);return new Uint8Array(await ie.subtle.exportKey("raw",n))}throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation')};function Ma(t){return Xe(t)&&typeof t.kty=="string"}function z2(t){return t.kty!=="oct"&&typeof t.d=="string"}function F2(t){return t.kty!=="oct"&&typeof t.d>"u"}function q2(t){return Ma(t)&&t.kty==="oct"&&typeof t.k=="string"}function G2(t){let e,r;switch(t.kty){case"RSA":{switch(t.alg){case"PS256":case"PS384":case"PS512":e={name:"RSA-PSS",hash:`SHA-${t.alg.slice(-3)}`},r=t.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":e={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${t.alg.slice(-3)}`},r=t.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":e={name:"RSA-OAEP",hash:`SHA-${parseInt(t.alg.slice(-3),10)||1}`},r=t.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new we('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(t.alg){case"ES256":e={name:"ECDSA",namedCurve:"P-256"},r=t.d?["sign"]:["verify"];break;case"ES384":e={name:"ECDSA",namedCurve:"P-384"},r=t.d?["sign"]:["verify"];break;case"ES512":e={name:"ECDSA",namedCurve:"P-521"},r=t.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":e={name:"ECDH",namedCurve:t.crv},r=t.d?["deriveBits"]:[];break;default:throw new we('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(t.alg){case"Ed25519":e={name:"Ed25519"},r=t.d?["sign"]:["verify"];break;case"EdDSA":e={name:t.crv},r=t.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":e={name:t.crv},r=t.d?["deriveBits"]:[];break;default:throw new we('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new we('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:e,keyUsages:r}}const TC=async t=>{if(!t.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');const{algorithm:e,keyUsages:r}=G2(t),n=[e,t.ext??!1,t.key_ops??r],i={...t};return delete i.alg,delete i.use,ie.subtle.importKey("jwk",i,...n)},kC=t=>qe(t);let Fs,qs;const LC=t=>(t==null?void 0:t[Symbol.toStringTag])==="KeyObject",ih=async(t,e,r,n,i=!1)=>{let o=t.get(e);if(o!=null&&o[n])return o[n];const s=await TC({...r,alg:n});return i&&Object.freeze(e),o?o[n]=s:t.set(e,{[n]:s}),s},H2=(t,e)=>{if(LC(t)){let r=t.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?kC(r.k):(qs||(qs=new WeakMap),ih(qs,t,r,e))}return Ma(t)?t.k?qe(t.k):(qs||(qs=new WeakMap),ih(qs,t,t,e,!0)):t},X2=(t,e)=>{if(LC(t)){let r=t.export({format:"jwk"});return r.k?kC(r.k):(Fs||(Fs=new WeakMap),ih(Fs,t,r,e))}return Ma(t)?t.k?qe(t.k):(Fs||(Fs=new WeakMap),ih(Fs,t,t,e,!0)):t},uo={normalizePublicKey:H2,normalizePrivateKey:X2};function m0(t){switch(t){case"A128GCM":return 128;case"A192GCM":return 192;case"A256GCM":case"A128CBC-HS256":return 256;case"A192CBC-HS384":return 384;case"A256CBC-HS512":return 512;default:throw new we(`Unsupported JWE Algorithm: ${t}`)}}const ds=t=>Xh(new Uint8Array(m0(t)>>3)),PC=(t,e)=>{const r=(t.match(/.{1,64}/g)||[]).join(`
`);return`-----BEGIN ${e}-----
${r}
-----END ${e}-----`},DC=async(t,e,r)=>{if(!lr(r))throw new TypeError(jt(r,...Ut));if(!r.extractable)throw new TypeError("CryptoKey is not extractable");if(r.type!==t)throw new TypeError(`key is not a ${t} key`);return PC(p0(new Uint8Array(await ie.subtle.exportKey(e,r))),`${t.toUpperCase()} KEY`)},W2=t=>DC("public","spki",t),J2=t=>DC("private","pkcs8",t),Oi=(t,e,r=0)=>{r===0&&(e.unshift(e.length),e.unshift(6));const n=t.indexOf(e[0],r);if(n===-1)return!1;const i=t.subarray(n,n+e.length);return i.length!==e.length?!1:i.every((o,s)=>o===e[s])||Oi(t,e,n+1)},bR=t=>{switch(!0){case Oi(t,[42,134,72,206,61,3,1,7]):return"P-256";case Oi(t,[43,129,4,0,34]):return"P-384";case Oi(t,[43,129,4,0,35]):return"P-521";case Oi(t,[43,101,110]):return"X25519";case Oi(t,[43,101,111]):return"X448";case Oi(t,[43,101,112]):return"Ed25519";case Oi(t,[43,101,113]):return"Ed448";default:throw new we("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},BC=async(t,e,r,n,i)=>{let o,s;const l=new Uint8Array(atob(r.replace(t,"")).split("").map(c=>c.charCodeAt(0))),u=e==="spki";switch(n){case"PS256":case"PS384":case"PS512":o={name:"RSA-PSS",hash:`SHA-${n.slice(-3)}`},s=u?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":o={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${n.slice(-3)}`},s=u?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":o={name:"RSA-OAEP",hash:`SHA-${parseInt(n.slice(-3),10)||1}`},s=u?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":o={name:"ECDSA",namedCurve:"P-256"},s=u?["verify"]:["sign"];break;case"ES384":o={name:"ECDSA",namedCurve:"P-384"},s=u?["verify"]:["sign"];break;case"ES512":o={name:"ECDSA",namedCurve:"P-521"},s=u?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const c=bR(l);o=c.startsWith("P-")?{name:"ECDH",namedCurve:c}:{name:c},s=u?[]:["deriveBits"];break}case"Ed25519":o={name:"Ed25519"},s=u?["verify"]:["sign"];break;case"EdDSA":o={name:bR(l)},s=u?["verify"]:["sign"];break;default:throw new we('Invalid or unsupported "alg" (Algorithm) value')}return ie.subtle.importKey(e,l,o,(i==null?void 0:i.extractable)??!1,s)},Z2=(t,e,r)=>BC(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"pkcs8",t,e,r),IC=(t,e,r)=>BC(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",t,e,r);function vR(t){const e=[];let r=0;for(;r<t.length;){const n=jC(t.subarray(r));e.push(n),r+=n.byteLength}return e}function jC(t){let e=0,r=t[0]&31;if(e++,r===31){for(r=0;t[e]>=128;)r=r*128+t[e]-128,e++;r=r*128+t[e]-128,e++}let n=0;if(t[e]<128)n=t[e],e++;else if(n===128){for(n=0;t[e+n]!==0||t[e+n+1]!==0;){if(n>t.byteLength)throw new TypeError("invalid indefinite form length");n++}const o=e+n+2;return{byteLength:o,contents:t.subarray(e,e+n),raw:t.subarray(0,o)}}else{const o=t[e]&127;e++,n=0;for(let s=0;s<o;s++)n=n*256+t[e],e++}const i=e+n;return{byteLength:i,contents:t.subarray(e,i),raw:t.subarray(0,i)}}function Q2(t){const e=vR(vR(jC(t).contents)[0].contents);return p0(e[e[0].raw[0]===160?6:5].raw)}function Y2(t){const e=t.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g,""),r=yC(e);return PC(Q2(r),"PUBLIC KEY")}const e3=(t,e,r)=>{let n;try{n=Y2(t)}catch(i){throw new TypeError("Failed to parse the X.509 certificate",{cause:i})}return IC(n,e,r)};async function t3(t,e,r){if(typeof t!="string"||t.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw new TypeError('"spki" must be SPKI formatted string');return IC(t,e,r)}async function r3(t,e,r){if(typeof t!="string"||t.indexOf("-----BEGIN CERTIFICATE-----")!==0)throw new TypeError('"x509" must be X.509 formatted string');return e3(t,e,r)}async function n3(t,e,r){if(typeof t!="string"||t.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return Z2(t,e,r)}async function Vc(t,e){if(!Xe(t))throw new TypeError("JWK must be an object");switch(e||(e=t.alg),t.kty){case"oct":if(typeof t.k!="string"||!t.k)throw new TypeError('missing "k" (Key Value) Parameter value');return qe(t.k);case"RSA":if("oth"in t&&t.oth!==void 0)throw new we('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return TC({...t,alg:e});default:throw new we('Unsupported "kty" (Key Type) Parameter value')}}const Qs=t=>t==null?void 0:t[Symbol.toStringTag],Hb=(t,e,r)=>{var n,i;if(e.use!==void 0&&e.use!=="sig")throw new TypeError("Invalid key for this operation, when present its use must be sig");if(e.key_ops!==void 0&&((i=(n=e.key_ops).includes)==null?void 0:i.call(n,r))!==!0)throw new TypeError(`Invalid key for this operation, when present its key_ops must include ${r}`);if(e.alg!==void 0&&e.alg!==t)throw new TypeError(`Invalid key for this operation, when present its alg must be ${t}`);return!0},i3=(t,e,r,n)=>{if(!(e instanceof Uint8Array)){if(n&&Ma(e)){if(q2(e)&&Hb(t,e,r))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!wC(e))throw new TypeError(EC(t,e,...Ut,"Uint8Array",n?"JSON Web Key":null));if(e.type!=="secret")throw new TypeError(`${Qs(e)} instances for symmetric algorithms must be of type "secret"`)}},o3=(t,e,r,n)=>{if(n&&Ma(e))switch(r){case"sign":if(z2(e)&&Hb(t,e,r))return;throw new TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(F2(e)&&Hb(t,e,r))return;throw new TypeError("JSON Web Key for this operation be a public JWK")}if(!wC(e))throw new TypeError(EC(t,e,...Ut,n?"JSON Web Key":null));if(e.type==="secret")throw new TypeError(`${Qs(e)} instances for asymmetric algorithms must not be of type "secret"`);if(r==="sign"&&e.type==="public")throw new TypeError(`${Qs(e)} instances for asymmetric algorithm signing must be of type "private"`);if(r==="decrypt"&&e.type==="public")throw new TypeError(`${Qs(e)} instances for asymmetric algorithm decryption must be of type "private"`);if(e.algorithm&&r==="verify"&&e.type==="private")throw new TypeError(`${Qs(e)} instances for asymmetric algorithm verifying must be of type "public"`);if(e.algorithm&&r==="encrypt"&&e.type==="private")throw new TypeError(`${Qs(e)} instances for asymmetric algorithm encryption must be of type "public"`)};function UC(t,e,r,n){e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?i3(e,r,n,t):o3(e,r,n,t)}const $C=UC.bind(void 0,!1),Xb=UC.bind(void 0,!0);async function s3(t,e,r,n,i){if(!(r instanceof Uint8Array))throw new TypeError(jt(r,"Uint8Array"));const o=parseInt(t.slice(1,4),10),s=await ie.subtle.importKey("raw",r.subarray(o>>3),"AES-CBC",!1,["encrypt"]),l=await ie.subtle.importKey("raw",r.subarray(0,o>>3),{hash:`SHA-${o<<1}`,name:"HMAC"},!1,["sign"]),u=new Uint8Array(await ie.subtle.encrypt({iv:n,name:"AES-CBC"},s,e)),c=Vn(i,n,u,hC(i.length<<3)),d=new Uint8Array((await ie.subtle.sign("HMAC",l,c)).slice(0,o>>3));return{ciphertext:u,tag:d,iv:n}}async function a3(t,e,r,n,i){let o;r instanceof Uint8Array?o=await ie.subtle.importKey("raw",r,"AES-GCM",!1,["encrypt"]):(bo(r,t,"encrypt"),o=r);const s=new Uint8Array(await ie.subtle.encrypt({additionalData:i,iv:n,name:"AES-GCM",tagLength:128},o,e)),l=s.slice(-16);return{ciphertext:s.slice(0,-16),tag:l,iv:n}}const OC=async(t,e,r,n,i)=>{if(!lr(r)&&!(r instanceof Uint8Array))throw new TypeError(jt(r,...Ut,"Uint8Array"));switch(n?gC(t,n):n=k2(t),t){case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r instanceof Uint8Array&&rh(r,parseInt(t.slice(-3),10)),s3(t,e,r,n,i);case"A128GCM":case"A192GCM":case"A256GCM":return r instanceof Uint8Array&&rh(r,parseInt(t.slice(1,4),10)),a3(t,e,r,n,i);default:throw new we("Unsupported JWE Content Encryption Algorithm")}};async function l3(t,e,r,n){const i=t.slice(0,7),o=await OC(i,r,e,n,new Uint8Array(0));return{encryptedKey:o.ciphertext,iv:Ze(o.iv),tag:Ze(o.tag)}}async function u3(t,e,r,n,i){const o=t.slice(0,7);return _C(o,e,r,n,i,new Uint8Array(0))}async function c3(t,e,r,n,i){var o;switch($C(t,e,"decrypt"),e=await((o=uo.normalizePrivateKey)==null?void 0:o.call(uo,e,t))||e,t){case"dir":{if(r!==void 0)throw new F("Encountered unexpected JWE Encrypted Key");return e}case"ECDH-ES":if(r!==void 0)throw new F("Encountered unexpected JWE Encrypted Key");case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!Xe(n.epk))throw new F('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');if(!SC(e))throw new we("ECDH with the provided key is not allowed or not supported by your javascript runtime");const s=await Vc(n.epk,t);let l,u;if(n.apu!==void 0){if(typeof n.apu!="string")throw new F('JOSE Header "apu" (Agreement PartyUInfo) invalid');try{l=qe(n.apu)}catch{throw new F("Failed to base64url decode the apu")}}if(n.apv!==void 0){if(typeof n.apv!="string")throw new F('JOSE Header "apv" (Agreement PartyVInfo) invalid');try{u=qe(n.apv)}catch{throw new F("Failed to base64url decode the apv")}}const c=await AC(s,e,t==="ECDH-ES"?n.enc:t,t==="ECDH-ES"?m0(n.enc):parseInt(t.slice(-5,-2),10),l,u);if(t==="ECDH-ES")return c;if(r===void 0)throw new F("JWE Encrypted Key missing");return Gb(t.slice(-6),c,r)}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{if(r===void 0)throw new F("JWE Encrypted Key missing");return N2(t,e,r)}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{if(r===void 0)throw new F("JWE Encrypted Key missing");if(typeof n.p2c!="number")throw new F('JOSE Header "p2c" (PBES2 Count) missing or invalid');const s=(i==null?void 0:i.maxPBES2Count)||1e4;if(n.p2c>s)throw new F('JOSE Header "p2c" (PBES2 Count) out is of acceptable bounds');if(typeof n.p2s!="string")throw new F('JOSE Header "p2s" (PBES2 Salt) missing or invalid');let l;try{l=qe(n.p2s)}catch{throw new F("Failed to base64url decode the p2s")}return V2(t,e,r,n.p2c,l)}case"A128KW":case"A192KW":case"A256KW":{if(r===void 0)throw new F("JWE Encrypted Key missing");return Gb(t,e,r)}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{if(r===void 0)throw new F("JWE Encrypted Key missing");if(typeof n.iv!="string")throw new F('JOSE Header "iv" (Initialization Vector) missing or invalid');if(typeof n.tag!="string")throw new F('JOSE Header "tag" (Authentication Tag) missing or invalid');let s;try{s=qe(n.iv)}catch{throw new F("Failed to base64url decode the iv")}let l;try{l=qe(n.tag)}catch{throw new F("Failed to base64url decode the tag")}return u3(t,e,r,s,l)}default:throw new we('Invalid or unsupported "alg" (JWE Algorithm) header value')}}function Mc(t,e,r,n,i){if(i.crit!==void 0&&(n==null?void 0:n.crit)===void 0)throw new t('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||n.crit===void 0)return new Set;if(!Array.isArray(n.crit)||n.crit.length===0||n.crit.some(s=>typeof s!="string"||s.length===0))throw new t('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let o;r!==void 0?o=new Map([...Object.entries(r),...e.entries()]):o=e;for(const s of n.crit){if(!o.has(s))throw new we(`Extension Header Parameter "${s}" is not recognized`);if(i[s]===void 0)throw new t(`Extension Header Parameter "${s}" is missing`);if(o.get(s)&&n[s]===void 0)throw new t(`Extension Header Parameter "${s}" MUST be integrity protected`)}return new Set(n.crit)}const Wb=(t,e)=>{if(e!==void 0&&(!Array.isArray(e)||e.some(r=>typeof r!="string")))throw new TypeError(`"${t}" option must be an array of strings`);if(e)return new Set(e)};async function g0(t,e,r){if(!Xe(t))throw new F("Flattened JWE must be an object");if(t.protected===void 0&&t.header===void 0&&t.unprotected===void 0)throw new F("JOSE Header missing");if(t.iv!==void 0&&typeof t.iv!="string")throw new F("JWE Initialization Vector incorrect type");if(typeof t.ciphertext!="string")throw new F("JWE Ciphertext missing or incorrect type");if(t.tag!==void 0&&typeof t.tag!="string")throw new F("JWE Authentication Tag incorrect type");if(t.protected!==void 0&&typeof t.protected!="string")throw new F("JWE Protected Header incorrect type");if(t.encrypted_key!==void 0&&typeof t.encrypted_key!="string")throw new F("JWE Encrypted Key incorrect type");if(t.aad!==void 0&&typeof t.aad!="string")throw new F("JWE AAD incorrect type");if(t.header!==void 0&&!Xe(t.header))throw new F("JWE Shared Unprotected Header incorrect type");if(t.unprotected!==void 0&&!Xe(t.unprotected))throw new F("JWE Per-Recipient Unprotected Header incorrect type");let n;if(t.protected)try{const E=qe(t.protected);n=JSON.parse(Vr.decode(E))}catch{throw new F("JWE Protected Header is invalid")}if(!Kc(n,t.header,t.unprotected))throw new F("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");const i={...n,...t.header,...t.unprotected};if(Mc(F,new Map,r==null?void 0:r.crit,n,i),i.zip!==void 0)throw new we('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:o,enc:s}=i;if(typeof o!="string"||!o)throw new F("missing JWE Algorithm (alg) in JWE Header");if(typeof s!="string"||!s)throw new F("missing JWE Encryption Algorithm (enc) in JWE Header");const l=r&&Wb("keyManagementAlgorithms",r.keyManagementAlgorithms),u=r&&Wb("contentEncryptionAlgorithms",r.contentEncryptionAlgorithms);if(l&&!l.has(o)||!l&&o.startsWith("PBES2"))throw new Ac('"alg" (Algorithm) Header Parameter value not allowed');if(u&&!u.has(s))throw new Ac('"enc" (Encryption Algorithm) Header Parameter value not allowed');let c;if(t.encrypted_key!==void 0)try{c=qe(t.encrypted_key)}catch{throw new F("Failed to base64url decode the encrypted_key")}let d=!1;typeof e=="function"&&(e=await e(n,t),d=!0);let f;try{f=await c3(o,e,c,i,r)}catch(E){if(E instanceof TypeError||E instanceof F||E instanceof we)throw E;f=ds(s)}let h,g;if(t.iv!==void 0)try{h=qe(t.iv)}catch{throw new F("Failed to base64url decode the iv")}if(t.tag!==void 0)try{g=qe(t.tag)}catch{throw new F("Failed to base64url decode the tag")}const b=He.encode(t.protected??"");let w;t.aad!==void 0?w=Vn(b,He.encode("."),He.encode(t.aad)):w=b;let C;try{C=qe(t.ciphertext)}catch{throw new F("Failed to base64url decode the ciphertext")}const m={plaintext:await _C(s,f,C,h,g,w)};if(t.protected!==void 0&&(m.protectedHeader=n),t.aad!==void 0)try{m.additionalAuthenticatedData=qe(t.aad)}catch{throw new F("Failed to base64url decode the aad")}return t.unprotected!==void 0&&(m.sharedUnprotectedHeader=t.unprotected),t.header!==void 0&&(m.unprotectedHeader=t.header),d?{...m,key:e}:m}async function KC(t,e,r){if(t instanceof Uint8Array&&(t=Vr.decode(t)),typeof t!="string")throw new F("Compact JWE must be a string or Uint8Array");const{0:n,1:i,2:o,3:s,4:l,length:u}=t.split(".");if(u!==5)throw new F("Invalid Compact JWE");const c=await g0({ciphertext:s,iv:o||void 0,protected:n,tag:l||void 0,encrypted_key:i||void 0},e,r),d={plaintext:c.plaintext,protectedHeader:c.protectedHeader};return typeof e=="function"?{...d,key:c.key}:d}async function d3(t,e,r){if(!Xe(t))throw new F("General JWE must be an object");if(!Array.isArray(t.recipients)||!t.recipients.every(Xe))throw new F("JWE Recipients missing or incorrect type");if(!t.recipients.length)throw new F("JWE Recipients has no members");for(const n of t.recipients)try{return await g0({aad:t.aad,ciphertext:t.ciphertext,encrypted_key:n.encrypted_key,header:n.header,iv:t.iv,protected:t.protected,tag:t.tag,unprotected:t.unprotected},e,r)}catch{}throw new Ba}const VC=Symbol(),p3=async t=>{if(t instanceof Uint8Array)return{kty:"oct",k:Ze(t)};if(!lr(t))throw new TypeError(jt(t,...Ut,"Uint8Array"));if(!t.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");const{ext:e,key_ops:r,alg:n,use:i,...o}=await ie.subtle.exportKey("jwk",t);return o};async function f3(t){return W2(t)}async function h3(t){return J2(t)}async function MC(t){return p3(t)}async function NC(t,e,r,n,i={}){var u;let o,s,l;switch($C(t,r,"encrypt"),r=await((u=uo.normalizePublicKey)==null?void 0:u.call(uo,r,t))||r,t){case"dir":{l=r;break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{if(!SC(r))throw new we("ECDH with the provided key is not allowed or not supported by your javascript runtime");const{apu:c,apv:d}=i;let{epk:f}=i;f||(f=(await U2(r)).privateKey);const{x:h,y:g,crv:b,kty:w}=await MC(f),C=await AC(r,f,t==="ECDH-ES"?e:t,t==="ECDH-ES"?m0(e):parseInt(t.slice(-5,-2),10),c,d);if(s={epk:{x:h,crv:b,kty:w}},w==="EC"&&(s.epk.y=g),c&&(s.apu=Ze(c)),d&&(s.apv=Ze(d)),t==="ECDH-ES"){l=C;break}l=n||ds(e);const y=t.slice(-6);o=await qb(y,C,l);break}case"RSA1_5":case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":{l=n||ds(e),o=await M2(t,r,l);break}case"PBES2-HS256+A128KW":case"PBES2-HS384+A192KW":case"PBES2-HS512+A256KW":{l=n||ds(e);const{p2c:c,p2s:d}=i;({encryptedKey:o,...s}=await K2(t,r,l,c,d));break}case"A128KW":case"A192KW":case"A256KW":{l=n||ds(e),o=await qb(t,r,l);break}case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":{l=n||ds(e);const{iv:c}=i;({encryptedKey:o,...s}=await l3(t,r,l,c));break}default:throw new we('Invalid or unsupported "alg" (JWE Algorithm) header value')}return{cek:l,encryptedKey:o,parameters:s}}class oh{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("plaintext must be an instance of Uint8Array");this._plaintext=e}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._sharedUnprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._sharedUnprotectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}async encrypt(e,r){if(!this._protectedHeader&&!this._unprotectedHeader&&!this._sharedUnprotectedHeader)throw new F("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");if(!Kc(this._protectedHeader,this._unprotectedHeader,this._sharedUnprotectedHeader))throw new F("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader,...this._sharedUnprotectedHeader};if(Mc(F,new Map,r==null?void 0:r.crit,this._protectedHeader,n),n.zip!==void 0)throw new we('JWE "zip" (Compression Algorithm) Header Parameter is not supported.');const{alg:i,enc:o}=n;if(typeof i!="string"||!i)throw new F('JWE "alg" (Algorithm) Header Parameter missing or invalid');if(typeof o!="string"||!o)throw new F('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');let s;if(this._cek&&(i==="dir"||i==="ECDH-ES"))throw new TypeError(`setContentEncryptionKey cannot be called with JWE "alg" (Algorithm) Header ${i}`);let l;{let w;({cek:l,encryptedKey:s,parameters:w}=await NC(i,o,e,this._cek,this._keyManagementParameters)),w&&(r&&VC in r?this._unprotectedHeader?this._unprotectedHeader={...this._unprotectedHeader,...w}:this.setUnprotectedHeader(w):this._protectedHeader?this._protectedHeader={...this._protectedHeader,...w}:this.setProtectedHeader(w))}let u,c,d;this._protectedHeader?c=He.encode(Ze(JSON.stringify(this._protectedHeader))):c=He.encode(""),this._aad?(d=Ze(this._aad),u=Vn(c,He.encode("."),He.encode(d))):u=c;const{ciphertext:f,tag:h,iv:g}=await OC(o,this._plaintext,l,this._iv,u),b={ciphertext:Ze(f)};return g&&(b.iv=Ze(g)),h&&(b.tag=Ze(h)),s&&(b.encrypted_key=Ze(s)),d&&(b.aad=d),this._protectedHeader&&(b.protected=Vr.decode(c)),this._sharedUnprotectedHeader&&(b.unprotected=this._sharedUnprotectedHeader),this._unprotectedHeader&&(b.header=this._unprotectedHeader),b}}class y3{constructor(e,r,n){this.parent=e,this.key=r,this.options=n}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addRecipient(...e){return this.parent.addRecipient(...e)}encrypt(...e){return this.parent.encrypt(...e)}done(){return this.parent}}class m3{constructor(e){this._recipients=[],this._plaintext=e}addRecipient(e,r){const n=new y3(this,e,{crit:r==null?void 0:r.crit});return this._recipients.push(n),n}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setSharedUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setSharedUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}setAdditionalAuthenticatedData(e){return this._aad=e,this}async encrypt(){var i,o,s;if(!this._recipients.length)throw new F("at least one recipient must be added");if(this._recipients.length===1){const[l]=this._recipients,u=await new oh(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(l.unprotectedHeader).encrypt(l.key,{...l.options}),c={ciphertext:u.ciphertext,iv:u.iv,recipients:[{}],tag:u.tag};return u.aad&&(c.aad=u.aad),u.protected&&(c.protected=u.protected),u.unprotected&&(c.unprotected=u.unprotected),u.encrypted_key&&(c.recipients[0].encrypted_key=u.encrypted_key),u.header&&(c.recipients[0].header=u.header),c}let e;for(let l=0;l<this._recipients.length;l++){const u=this._recipients[l];if(!Kc(this._protectedHeader,this._unprotectedHeader,u.unprotectedHeader))throw new F("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");const c={...this._protectedHeader,...this._unprotectedHeader,...u.unprotectedHeader},{alg:d}=c;if(typeof d!="string"||!d)throw new F('JWE "alg" (Algorithm) Header Parameter missing or invalid');if(d==="dir"||d==="ECDH-ES")throw new F('"dir" and "ECDH-ES" alg may only be used with a single recipient');if(typeof c.enc!="string"||!c.enc)throw new F('JWE "enc" (Encryption Algorithm) Header Parameter missing or invalid');if(!e)e=c.enc;else if(e!==c.enc)throw new F('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients');if(Mc(F,new Map,u.options.crit,this._protectedHeader,c),c.zip!==void 0)throw new we('JWE "zip" (Compression Algorithm) Header Parameter is not supported.')}const r=ds(e),n={ciphertext:"",iv:"",recipients:[],tag:""};for(let l=0;l<this._recipients.length;l++){const u=this._recipients[l],c={};n.recipients.push(c);const f={...this._protectedHeader,...this._unprotectedHeader,...u.unprotectedHeader}.alg.startsWith("PBES2")?2048+l:void 0;if(l===0){const b=await new oh(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(r).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(u.unprotectedHeader).setKeyManagementParameters({p2c:f}).encrypt(u.key,{...u.options,[VC]:!0});n.ciphertext=b.ciphertext,n.iv=b.iv,n.tag=b.tag,b.aad&&(n.aad=b.aad),b.protected&&(n.protected=b.protected),b.unprotected&&(n.unprotected=b.unprotected),c.encrypted_key=b.encrypted_key,b.header&&(c.header=b.header);continue}const{encryptedKey:h,parameters:g}=await NC(((i=u.unprotectedHeader)==null?void 0:i.alg)||((o=this._protectedHeader)==null?void 0:o.alg)||((s=this._unprotectedHeader)==null?void 0:s.alg),e,u.key,r,{p2c:f});c.encrypted_key=Ze(h),(u.unprotectedHeader||g)&&(c.header={...u.unprotectedHeader,...g})}return n}}function zC(t,e){const r=`SHA-${t.slice(-3)}`;switch(t){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:t.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:e.namedCurve};case"Ed25519":return{name:"Ed25519"};case"EdDSA":return{name:e.name};default:throw new we(`alg ${t} is not supported either by JOSE or your javascript runtime`)}}async function FC(t,e,r){if(r==="sign"&&(e=await uo.normalizePrivateKey(e,t)),r==="verify"&&(e=await uo.normalizePublicKey(e,t)),lr(e))return D2(e,t,r),e;if(e instanceof Uint8Array){if(!t.startsWith("HS"))throw new TypeError(jt(e,...Ut));return ie.subtle.importKey("raw",e,{hash:`SHA-${t.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(jt(e,...Ut,"Uint8Array","JSON Web Key"))}const g3=async(t,e,r,n)=>{const i=await FC(t,e,"verify");Jh(t,i);const o=zC(t,i.algorithm);try{return await ie.subtle.verify(o,i,r,n)}catch{return!1}};async function b0(t,e,r){if(!Xe(t))throw new _e("Flattened JWS must be an object");if(t.protected===void 0&&t.header===void 0)throw new _e('Flattened JWS must have either of the "protected" or "header" members');if(t.protected!==void 0&&typeof t.protected!="string")throw new _e("JWS Protected Header incorrect type");if(t.payload===void 0)throw new _e("JWS Payload missing");if(typeof t.signature!="string")throw new _e("JWS Signature missing or incorrect type");if(t.header!==void 0&&!Xe(t.header))throw new _e("JWS Unprotected Header incorrect type");let n={};if(t.protected)try{const w=qe(t.protected);n=JSON.parse(Vr.decode(w))}catch{throw new _e("JWS Protected Header is invalid")}if(!Kc(n,t.header))throw new _e("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const i={...n,...t.header},o=Mc(_e,new Map([["b64",!0]]),r==null?void 0:r.crit,n,i);let s=!0;if(o.has("b64")&&(s=n.b64,typeof s!="boolean"))throw new _e('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:l}=i;if(typeof l!="string"||!l)throw new _e('JWS "alg" (Algorithm) Header Parameter missing or invalid');const u=r&&Wb("algorithms",r.algorithms);if(u&&!u.has(l))throw new Ac('"alg" (Algorithm) Header Parameter value not allowed');if(s){if(typeof t.payload!="string")throw new _e("JWS Payload must be a string")}else if(typeof t.payload!="string"&&!(t.payload instanceof Uint8Array))throw new _e("JWS Payload must be a string or an Uint8Array instance");let c=!1;typeof e=="function"?(e=await e(n,t),c=!0,Xb(l,e,"verify"),Ma(e)&&(e=await Vc(e,l))):Xb(l,e,"verify");const d=Vn(He.encode(t.protected??""),He.encode("."),typeof t.payload=="string"?He.encode(t.payload):t.payload);let f;try{f=qe(t.signature)}catch{throw new _e("Failed to base64url decode the signature")}if(!await g3(l,e,f,d))throw new Hh;let g;if(s)try{g=qe(t.payload)}catch{throw new _e("Failed to base64url decode the payload")}else typeof t.payload=="string"?g=He.encode(t.payload):g=t.payload;const b={payload:g};return t.protected!==void 0&&(b.protectedHeader=n),t.header!==void 0&&(b.unprotectedHeader=t.header),c?{...b,key:e}:b}async function qC(t,e,r){if(t instanceof Uint8Array&&(t=Vr.decode(t)),typeof t!="string")throw new _e("Compact JWS must be a string or Uint8Array");const{0:n,1:i,2:o,length:s}=t.split(".");if(s!==3)throw new _e("Invalid Compact JWS");const l=await b0({payload:i,protected:n,signature:o},e,r),u={payload:l.payload,protectedHeader:l.protectedHeader};return typeof e=="function"?{...u,key:l.key}:u}async function b3(t,e,r){if(!Xe(t))throw new _e("General JWS must be an object");if(!Array.isArray(t.signatures)||!t.signatures.every(Xe))throw new _e("JWS Signatures missing or incorrect type");for(const n of t.signatures)try{return await b0({header:n.header,payload:t.payload,protected:n.protected,signature:n.signature},e,r)}catch{}throw new Hh}const Ki=t=>Math.floor(t.getTime()/1e3),GC=60,HC=GC*60,v0=HC*24,v3=v0*7,E3=v0*365.25,w3=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,zu=t=>{const e=w3.exec(t);if(!e||e[4]&&e[1])throw new TypeError("Invalid time period format");const r=parseFloat(e[2]),n=e[3].toLowerCase();let i;switch(n){case"sec":case"secs":case"second":case"seconds":case"s":i=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":i=Math.round(r*GC);break;case"hour":case"hours":case"hr":case"hrs":case"h":i=Math.round(r*HC);break;case"day":case"days":case"d":i=Math.round(r*v0);break;case"week":case"weeks":case"w":i=Math.round(r*v3);break;default:i=Math.round(r*E3);break}return e[1]==="-"||e[4]==="ago"?-i:i},ER=t=>t.toLowerCase().replace(/^application\//,""),_3=(t,e)=>typeof t=="string"?e.includes(t):Array.isArray(t)?e.some(Set.prototype.has.bind(new Set(t))):!1,E0=(t,e,r={})=>{let n;try{n=JSON.parse(Vr.decode(e))}catch{}if(!Xe(n))throw new zt("JWT Claims Set must be a top-level JSON object");const{typ:i}=r;if(i&&(typeof t.typ!="string"||ER(t.typ)!==ER(i)))throw new Mt('unexpected "typ" JWT header value',n,"typ","check_failed");const{requiredClaims:o=[],issuer:s,subject:l,audience:u,maxTokenAge:c}=r,d=[...o];c!==void 0&&d.push("iat"),u!==void 0&&d.push("aud"),l!==void 0&&d.push("sub"),s!==void 0&&d.push("iss");for(const b of new Set(d.reverse()))if(!(b in n))throw new Mt(`missing required "${b}" claim`,n,b,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(n.iss))throw new Mt('unexpected "iss" claim value',n,"iss","check_failed");if(l&&n.sub!==l)throw new Mt('unexpected "sub" claim value',n,"sub","check_failed");if(u&&!_3(n.aud,typeof u=="string"?[u]:u))throw new Mt('unexpected "aud" claim value',n,"aud","check_failed");let f;switch(typeof r.clockTolerance){case"string":f=zu(r.clockTolerance);break;case"number":f=r.clockTolerance;break;case"undefined":f=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const{currentDate:h}=r,g=Ki(h||new Date);if((n.iat!==void 0||c)&&typeof n.iat!="number")throw new Mt('"iat" claim must be a number',n,"iat","invalid");if(n.nbf!==void 0){if(typeof n.nbf!="number")throw new Mt('"nbf" claim must be a number',n,"nbf","invalid");if(n.nbf>g+f)throw new Mt('"nbf" claim timestamp check failed',n,"nbf","check_failed")}if(n.exp!==void 0){if(typeof n.exp!="number")throw new Mt('"exp" claim must be a number',n,"exp","invalid");if(n.exp<=g-f)throw new th('"exp" claim timestamp check failed',n,"exp","check_failed")}if(c){const b=g-n.iat,w=typeof c=="number"?c:zu(c);if(b-f>w)throw new th('"iat" claim timestamp check failed (too far in the past)',n,"iat","check_failed");if(b<0-f)throw new Mt('"iat" claim timestamp check failed (it should be in the past)',n,"iat","check_failed")}return n};async function x3(t,e,r){var s;const n=await qC(t,e,r);if((s=n.protectedHeader.crit)!=null&&s.includes("b64")&&n.protectedHeader.b64===!1)throw new zt("JWTs MUST NOT use unencoded payload");const o={payload:E0(n.protectedHeader,n.payload,r),protectedHeader:n.protectedHeader};return typeof e=="function"?{...o,key:n.key}:o}async function R3(t,e,r){const n=await KC(t,e,r),i=E0(n.protectedHeader,n.plaintext,r),{protectedHeader:o}=n;if(o.iss!==void 0&&o.iss!==i.iss)throw new Mt('replicated "iss" claim header parameter mismatch',i,"iss","mismatch");if(o.sub!==void 0&&o.sub!==i.sub)throw new Mt('replicated "sub" claim header parameter mismatch',i,"sub","mismatch");if(o.aud!==void 0&&JSON.stringify(o.aud)!==JSON.stringify(i.aud))throw new Mt('replicated "aud" claim header parameter mismatch',i,"aud","mismatch");const s={payload:i,protectedHeader:o};return typeof e=="function"?{...s,key:n.key}:s}class XC{constructor(e){this._flattened=new oh(e)}setContentEncryptionKey(e){return this._flattened.setContentEncryptionKey(e),this}setInitializationVector(e){return this._flattened.setInitializationVector(e),this}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}setKeyManagementParameters(e){return this._flattened.setKeyManagementParameters(e),this}async encrypt(e,r){const n=await this._flattened.encrypt(e,r);return[n.protected,n.encrypted_key,n.iv,n.ciphertext,n.tag].join(".")}}const A3=async(t,e,r)=>{const n=await FC(t,e,"sign");Jh(t,n);const i=await ie.subtle.sign(zC(t,n.algorithm),n,r);return new Uint8Array(i)};class w0{constructor(e){if(!(e instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,r){if(!this._protectedHeader&&!this._unprotectedHeader)throw new _e("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!Kc(this._protectedHeader,this._unprotectedHeader))throw new _e("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const n={...this._protectedHeader,...this._unprotectedHeader},i=Mc(_e,new Map([["b64",!0]]),r==null?void 0:r.crit,this._protectedHeader,n);let o=!0;if(i.has("b64")&&(o=this._protectedHeader.b64,typeof o!="boolean"))throw new _e('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:s}=n;if(typeof s!="string"||!s)throw new _e('JWS "alg" (Algorithm) Header Parameter missing or invalid');Xb(s,e,"sign");let l=this._payload;o&&(l=He.encode(Ze(l)));let u;this._protectedHeader?u=He.encode(Ze(JSON.stringify(this._protectedHeader))):u=He.encode("");const c=Vn(u,He.encode("."),l),d=await A3(s,e,c),f={signature:Ze(d),payload:""};return o&&(f.payload=Vr.decode(l)),this._unprotectedHeader&&(f.header=this._unprotectedHeader),this._protectedHeader&&(f.protected=Vr.decode(u)),f}}class WC{constructor(e){this._flattened=new w0(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,r){const n=await this._flattened.sign(e,r);if(n.payload===void 0)throw new TypeError("use the flattened module for creating JWS with b64: false");return`${n.protected}.${n.payload}.${n.signature}`}}class S3{constructor(e,r,n){this.parent=e,this.key=r,this.options=n}setProtectedHeader(e){if(this.protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this.protectedHeader=e,this}setUnprotectedHeader(e){if(this.unprotectedHeader)throw new TypeError("setUnprotectedHeader can only be called once");return this.unprotectedHeader=e,this}addSignature(...e){return this.parent.addSignature(...e)}sign(...e){return this.parent.sign(...e)}done(){return this.parent}}class C3{constructor(e){this._signatures=[],this._payload=e}addSignature(e,r){const n=new S3(this,e,r);return this._signatures.push(n),n}async sign(){if(!this._signatures.length)throw new _e("at least one signature must be added");const e={signatures:[],payload:""};for(let r=0;r<this._signatures.length;r++){const n=this._signatures[r],i=new w0(this._payload);i.setProtectedHeader(n.protectedHeader),i.setUnprotectedHeader(n.unprotectedHeader);const{payload:o,...s}=await i.sign(n.key,n.options);if(r===0)e.payload=o;else if(e.payload!==o)throw new _e("inconsistent use of JWS Unencoded Payload (RFC7797)");e.signatures.push(s)}return e}}function es(t,e){if(!Number.isFinite(e))throw new TypeError(`Invalid ${t} input`);return e}class _0{constructor(e={}){if(!Xe(e))throw new TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return typeof e=="number"?this._payload={...this._payload,nbf:es("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:es("setNotBefore",Ki(e))}:this._payload={...this._payload,nbf:Ki(new Date)+zu(e)},this}setExpirationTime(e){return typeof e=="number"?this._payload={...this._payload,exp:es("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:es("setExpirationTime",Ki(e))}:this._payload={...this._payload,exp:Ki(new Date)+zu(e)},this}setIssuedAt(e){return typeof e>"u"?this._payload={...this._payload,iat:Ki(new Date)}:e instanceof Date?this._payload={...this._payload,iat:es("setIssuedAt",Ki(e))}:typeof e=="string"?this._payload={...this._payload,iat:es("setIssuedAt",Ki(new Date)+zu(e))}:this._payload={...this._payload,iat:es("setIssuedAt",e)},this}}class T3 extends _0{setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,r){var i;const n=new WC(He.encode(JSON.stringify(this._payload)));if(n.setProtectedHeader(this._protectedHeader),Array.isArray((i=this._protectedHeader)==null?void 0:i.crit)&&this._protectedHeader.crit.includes("b64")&&this._protectedHeader.b64===!1)throw new zt("JWTs MUST NOT use unencoded payload");return n.sign(e,r)}}class k3 extends _0{setProtectedHeader(e){if(this._protectedHeader)throw new TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setKeyManagementParameters(e){if(this._keyManagementParameters)throw new TypeError("setKeyManagementParameters can only be called once");return this._keyManagementParameters=e,this}setContentEncryptionKey(e){if(this._cek)throw new TypeError("setContentEncryptionKey can only be called once");return this._cek=e,this}setInitializationVector(e){if(this._iv)throw new TypeError("setInitializationVector can only be called once");return this._iv=e,this}replicateIssuerAsHeader(){return this._replicateIssuerAsHeader=!0,this}replicateSubjectAsHeader(){return this._replicateSubjectAsHeader=!0,this}replicateAudienceAsHeader(){return this._replicateAudienceAsHeader=!0,this}async encrypt(e,r){const n=new XC(He.encode(JSON.stringify(this._payload)));return this._replicateIssuerAsHeader&&(this._protectedHeader={...this._protectedHeader,iss:this._payload.iss}),this._replicateSubjectAsHeader&&(this._protectedHeader={...this._protectedHeader,sub:this._payload.sub}),this._replicateAudienceAsHeader&&(this._protectedHeader={...this._protectedHeader,aud:this._payload.aud}),n.setProtectedHeader(this._protectedHeader),this._iv&&n.setInitializationVector(this._iv),this._cek&&n.setContentEncryptionKey(this._cek),this._keyManagementParameters&&n.setKeyManagementParameters(this._keyManagementParameters),n.encrypt(e,r)}}const Bi=(t,e)=>{if(typeof t!="string"||!t)throw new f0(`${e} missing or invalid`)};async function JC(t,e){if(!Xe(t))throw new TypeError("JWK must be an object");if(e??(e="sha256"),e!=="sha256"&&e!=="sha384"&&e!=="sha512")throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');let r;switch(t.kty){case"EC":Bi(t.crv,'"crv" (Curve) Parameter'),Bi(t.x,'"x" (X Coordinate) Parameter'),Bi(t.y,'"y" (Y Coordinate) Parameter'),r={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":Bi(t.crv,'"crv" (Subtype of Key Pair) Parameter'),Bi(t.x,'"x" (Public Key) Parameter'),r={crv:t.crv,kty:t.kty,x:t.x};break;case"RSA":Bi(t.e,'"e" (Exponent) Parameter'),Bi(t.n,'"n" (Modulus) Parameter'),r={e:t.e,kty:t.kty,n:t.n};break;case"oct":Bi(t.k,'"k" (Key Value) Parameter'),r={k:t.k,kty:t.kty};break;default:throw new we('"kty" (Key Type) Parameter missing or unsupported')}const n=He.encode(JSON.stringify(r));return Ze(await fC(e,n))}async function L3(t,e){e??(e="sha256");const r=await JC(t,e);return`urn:ietf:params:oauth:jwk-thumbprint:sha-${e.slice(-3)}:${r}`}async function P3(t,e){const r={...t,...e==null?void 0:e.header};if(!Xe(r.jwk))throw new _e('"jwk" (JSON Web Key) Header Parameter must be a JSON object');const n=await Vc({...r.jwk,ext:!0},r.alg);if(n instanceof Uint8Array||n.type!=="public")throw new _e('"jwk" (JSON Web Key) Header Parameter must be a public key');return n}function D3(t){switch(typeof t=="string"&&t.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";default:throw new we('Unsupported "alg" value for a JSON Web Key Set')}}function B3(t){return t&&typeof t=="object"&&Array.isArray(t.keys)&&t.keys.every(I3)}function I3(t){return Xe(t)}function ZC(t){return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}class j3{constructor(e){if(this._cached=new WeakMap,!B3(e))throw new qh("JSON Web Key Set malformed");this._jwks=ZC(e)}async getKey(e,r){const{alg:n,kid:i}={...e,...r==null?void 0:r.header},o=D3(n),s=this._jwks.keys.filter(c=>{let d=o===c.kty;if(d&&typeof i=="string"&&(d=i===c.kid),d&&typeof c.alg=="string"&&(d=n===c.alg),d&&typeof c.use=="string"&&(d=c.use==="sig"),d&&Array.isArray(c.key_ops)&&(d=c.key_ops.includes("verify")),d)switch(n){case"ES256":d=c.crv==="P-256";break;case"ES256K":d=c.crv==="secp256k1";break;case"ES384":d=c.crv==="P-384";break;case"ES512":d=c.crv==="P-521";break;case"Ed25519":d=c.crv==="Ed25519";break;case"EdDSA":d=c.crv==="Ed25519"||c.crv==="Ed448";break}return d}),{0:l,length:u}=s;if(u===0)throw new Gh;if(u!==1){const c=new h0,{_cached:d}=this;throw c[Symbol.asyncIterator]=async function*(){for(const f of s)try{yield await wR(d,f,n)}catch{}},c}return wR(this._cached,l,n)}}async function wR(t,e,r){const n=t.get(e)||t.set(e,{}).get(e);if(n[r]===void 0){const i=await Vc({...e,ext:!0},r);if(i instanceof Uint8Array||i.type!=="public")throw new qh("JSON Web Key Set members must be public keys");n[r]=i}return n[r]}function Jb(t){const e=new j3(t),r=async(n,i)=>e.getKey(n,i);return Object.defineProperties(r,{jwks:{value:()=>ZC(e._jwks),enumerable:!0,configurable:!1,writable:!1}}),r}const U3=async(t,e,r)=>{let n,i,o=!1;typeof AbortController=="function"&&(n=new AbortController,i=setTimeout(()=>{o=!0,n.abort()},e));const s=await fetch(t.href,{signal:n?n.signal:void 0,redirect:"manual",headers:r.headers}).catch(l=>{throw o?new y0:l});if(i!==void 0&&clearTimeout(i),s.status!==200)throw new mt("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await s.json()}catch{throw new mt("Failed to parse the JSON Web Key Set HTTP response as JSON")}};function $3(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}let Zb;var Qp,LA;(typeof navigator>"u"||!((LA=(Qp=navigator.userAgent)==null?void 0:Qp.startsWith)!=null&&LA.call(Qp,"Mozilla/5.0 ")))&&(Zb="jose/v5.10.0");const Fu=Symbol();function O3(t,e){return!(typeof t!="object"||t===null||!("uat"in t)||typeof t.uat!="number"||Date.now()-t.uat>=e||!("jwks"in t)||!Xe(t.jwks)||!Array.isArray(t.jwks.keys)||!Array.prototype.every.call(t.jwks.keys,Xe))}class K3{constructor(e,r){if(!(e instanceof URL))throw new TypeError("url must be an instance of URL");this._url=new URL(e.href),this._options={agent:r==null?void 0:r.agent,headers:r==null?void 0:r.headers},this._timeoutDuration=typeof(r==null?void 0:r.timeoutDuration)=="number"?r==null?void 0:r.timeoutDuration:5e3,this._cooldownDuration=typeof(r==null?void 0:r.cooldownDuration)=="number"?r==null?void 0:r.cooldownDuration:3e4,this._cacheMaxAge=typeof(r==null?void 0:r.cacheMaxAge)=="number"?r==null?void 0:r.cacheMaxAge:6e5,(r==null?void 0:r[Fu])!==void 0&&(this._cache=r==null?void 0:r[Fu],O3(r==null?void 0:r[Fu],this._cacheMaxAge)&&(this._jwksTimestamp=this._cache.uat,this._local=Jb(this._cache.jwks)))}coolingDown(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cooldownDuration:!1}fresh(){return typeof this._jwksTimestamp=="number"?Date.now()<this._jwksTimestamp+this._cacheMaxAge:!1}async getKey(e,r){(!this._local||!this.fresh())&&await this.reload();try{return await this._local(e,r)}catch(n){if(n instanceof Gh&&this.coolingDown()===!1)return await this.reload(),this._local(e,r);throw n}}async reload(){this._pendingFetch&&$3()&&(this._pendingFetch=void 0);const e=new Headers(this._options.headers);Zb&&!e.has("User-Agent")&&(e.set("User-Agent",Zb),this._options.headers=Object.fromEntries(e.entries())),this._pendingFetch||(this._pendingFetch=U3(this._url,this._timeoutDuration,this._options).then(r=>{this._local=Jb(r),this._cache&&(this._cache.uat=Date.now(),this._cache.jwks=r),this._jwksTimestamp=Date.now(),this._pendingFetch=void 0}).catch(r=>{throw this._pendingFetch=void 0,r})),await this._pendingFetch}}function V3(t,e){const r=new K3(t,e),n=async(i,o)=>r.getKey(i,o);return Object.defineProperties(n,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>!!r._pendingFetch,enumerable:!0,configurable:!1},jwks:{value:()=>{var i;return(i=r._local)==null?void 0:i.jwks()},enumerable:!0,configurable:!1,writable:!1}}),n}const M3=Fu;class N3 extends _0{encode(){const e=Ze(JSON.stringify({alg:"none"})),r=Ze(JSON.stringify(this._payload));return`${e}.${r}.`}static decode(e,r){if(typeof e!="string")throw new zt("Unsecured JWT must be a string");const{0:n,1:i,2:o,length:s}=e.split(".");if(s!==3||o!=="")throw new zt("Invalid Unsecured JWT");let l;try{if(l=JSON.parse(Vr.decode(qe(n))),l.alg!=="none")throw new Error}catch{throw new zt("Invalid Unsecured JWT")}return{payload:E0(l,qe(i),r),header:l}}}const z3=Ze,x0=qe,F3=Object.freeze(Object.defineProperty({__proto__:null,decode:x0,encode:z3},Symbol.toStringTag,{value:"Module"}));function q3(t){let e;if(typeof t=="string"){const r=t.split(".");(r.length===3||r.length===5)&&([e]=r)}else if(typeof t=="object"&&t)if("protected"in t)e=t.protected;else throw new TypeError("Token does not contain a Protected Header");try{if(typeof e!="string"||!e)throw new Error;const r=JSON.parse(Vr.decode(x0(e)));if(!Xe(r))throw new Error;return r}catch{throw new TypeError("Invalid Token or Protected Header formatting")}}function G3(t){if(typeof t!="string")throw new zt("JWTs must use Compact JWS serialization, JWT must be a string");const{1:e,length:r}=t.split(".");if(r===5)throw new zt("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new zt("Invalid JWT");if(!e)throw new zt("JWTs must contain a payload");let n;try{n=x0(e)}catch{throw new zt("Failed to base64url decode the payload")}let i;try{i=JSON.parse(Vr.decode(n))}catch{throw new zt("Failed to parse the decoded payload as JSON")}if(!Xe(i))throw new zt("Invalid JWT Claims Set");return i}async function H3(t,e){let r,n,i;switch(t){case"HS256":case"HS384":case"HS512":r=parseInt(t.slice(-3),10),n={name:"HMAC",hash:`SHA-${r}`,length:r},i=["sign","verify"];break;case"A128CBC-HS256":case"A192CBC-HS384":case"A256CBC-HS512":return r=parseInt(t.slice(-3),10),Xh(new Uint8Array(r>>3));case"A128KW":case"A192KW":case"A256KW":r=parseInt(t.slice(1,4),10),n={name:"AES-KW",length:r},i=["wrapKey","unwrapKey"];break;case"A128GCMKW":case"A192GCMKW":case"A256GCMKW":case"A128GCM":case"A192GCM":case"A256GCM":r=parseInt(t.slice(1,4),10),n={name:"AES-GCM",length:r},i=["encrypt","decrypt"];break;default:throw new we('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return ie.subtle.generateKey(n,(e==null?void 0:e.extractable)??!1,i)}function vg(t){const e=(t==null?void 0:t.modulusLength)??2048;if(typeof e!="number"||e<2048)throw new we("Invalid or unsupported modulusLength option provided, 2048 bits or larger keys must be used");return e}async function X3(t,e){let r,n;switch(t){case"PS256":case"PS384":case"PS512":r={name:"RSA-PSS",hash:`SHA-${t.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:vg(e)},n=["sign","verify"];break;case"RS256":case"RS384":case"RS512":r={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${t.slice(-3)}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:vg(e)},n=["sign","verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":r={name:"RSA-OAEP",hash:`SHA-${parseInt(t.slice(-3),10)||1}`,publicExponent:new Uint8Array([1,0,1]),modulusLength:vg(e)},n=["decrypt","unwrapKey","encrypt","wrapKey"];break;case"ES256":r={name:"ECDSA",namedCurve:"P-256"},n=["sign","verify"];break;case"ES384":r={name:"ECDSA",namedCurve:"P-384"},n=["sign","verify"];break;case"ES512":r={name:"ECDSA",namedCurve:"P-521"},n=["sign","verify"];break;case"Ed25519":r={name:"Ed25519"},n=["sign","verify"];break;case"EdDSA":{n=["sign","verify"];const i=(e==null?void 0:e.crv)??"Ed25519";switch(i){case"Ed25519":case"Ed448":r={name:i};break;default:throw new we("Invalid or unsupported crv option provided")}break}case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{n=["deriveKey","deriveBits"];const i=(e==null?void 0:e.crv)??"P-256";switch(i){case"P-256":case"P-384":case"P-521":{r={name:"ECDH",namedCurve:i};break}case"X25519":case"X448":r={name:i};break;default:throw new we("Invalid or unsupported crv option provided, supported values are P-256, P-384, P-521, X25519, and X448")}break}default:throw new we('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}return ie.subtle.generateKey(r,(e==null?void 0:e.extractable)??!1,n)}async function W3(t,e){return X3(t,e)}async function J3(t,e){return H3(t,e)}const Z3="WebCryptoAPI",Q3=Object.freeze(Object.defineProperty({__proto__:null,CompactEncrypt:XC,CompactSign:WC,EmbeddedJWK:P3,EncryptJWT:k3,FlattenedEncrypt:oh,FlattenedSign:w0,GeneralEncrypt:m3,GeneralSign:C3,SignJWT:T3,UnsecuredJWT:N3,base64url:F3,calculateJwkThumbprint:JC,calculateJwkThumbprintUri:L3,compactDecrypt:KC,compactVerify:qC,createLocalJWKSet:Jb,createRemoteJWKSet:V3,cryptoRuntime:Z3,decodeJwt:G3,decodeProtectedHeader:q3,errors:T2,experimental_jwksCache:M3,exportJWK:MC,exportPKCS8:h3,exportSPKI:f3,flattenedDecrypt:g0,flattenedVerify:b0,generalDecrypt:d3,generalVerify:b3,generateKeyPair:W3,generateSecret:J3,importJWK:Vc,importPKCS8:n3,importSPKI:t3,importX509:r3,jwksCache:Fu,jwtDecrypt:R3,jwtVerify:x3},Symbol.toStringTag,{value:"Module"})),Y3=bh(Q3);var R0={};Object.defineProperty(R0,"__esModule",{value:!0});R0.either=ez;function ez(t,e){if(t!=null&&e!=null&&t!==e)throw new TypeError(`Expected "${e}", got "${t}"`);return t??e??void 0}Object.defineProperty(Fh,"__esModule",{value:!0});Fh.JoseKey=void 0;const as=Y3,We=Si,tz=R0,{JOSEError:_R}=as.errors;class A0 extends We.Key{async getKeyObj(e){if(!this.algorithms.includes(e))throw new We.JwkError(`Key cannot be used with algorithm "${e}"`);try{return await(0,as.importJWK)(this.jwk,e)}catch(r){throw new We.JwkError("Failed to import JWK",void 0,{cause:r})}}async createJwt(e,r){try{const{kid:n}=e;if(n&&n!==this.kid)throw new We.JwtCreateError(`Invalid "kid" (${n}) used to sign with key "${this.kid}"`);const{alg:i}=e;if(!i)throw new We.JwtCreateError('Missing "alg" in JWT header');const o=await this.getKeyObj(i);return await new as.SignJWT(r).setProtectedHeader({...e,alg:i,kid:this.kid}).sign(o)}catch(n){throw n instanceof _R?new We.JwtCreateError(n.message,n.code,{cause:n}):We.JwtCreateError.from(n)}}async verifyJwt(e,r){try{const n=await(0,as.jwtVerify)(e,async({alg:s})=>this.getKeyObj(s),{...r,algorithms:this.algorithms}),i=We.jwtHeaderSchema.safeParse(n.protectedHeader);if(!i.success)throw new We.JwtVerifyError("Invalid JWT header",void 0,{cause:i.error});const o=We.jwtPayloadSchema.safeParse(n.payload);if(!o.success)throw new We.JwtVerifyError("Invalid JWT payload",void 0,{cause:o.error});return{protectedHeader:i.data,payload:o.data}}catch(n){throw n instanceof _R?new We.JwtVerifyError(n.message,n.code,{cause:n}):We.JwtVerifyError.from(n)}}static async generateKeyPair(e=["ES256"],r){if(!e.length)throw new We.JwkError("No algorithms provided for key generation");const n=[];for(const i of e)try{return await(0,as.generateKeyPair)(i,r)}catch(o){n.push(o)}throw new We.JwkError("Failed to generate key pair",void 0,{cause:new AggregateError(n,"None of the algorithms worked")})}static async generate(e=["ES256"],r,n){const i=await this.generateKeyPair(e,{...n,extractable:!0});return this.fromImportable(i.privateKey,r)}static async fromImportable(e,r){if(typeof e=="string"){if(e.startsWith("-----"))return this.fromPKCS8(e,"",r);if(e.startsWith("{"))return this.fromJWK(e,r);throw new We.JwkError("Invalid input")}if(typeof e=="object")return"kty"in e||"alg"in e?this.fromJWK(e,r):this.fromKeyLike(e,r);throw new We.JwkError("Invalid input")}static async fromKeyLike(e,r,n){const i=await(0,as.exportJWK)(e);if(n){if(!i.alg)i.alg=n;else if(i.alg!==n)throw new We.JwkError('Invalid "alg" in JWK')}return this.fromJWK(i,r)}static async fromPKCS8(e,r,n){const i=await(0,as.importPKCS8)(e,r,{extractable:!0});return this.fromKeyLike(i,n)}static async fromJWK(e,r){const n=typeof e=="string"?JSON.parse(e):e;if(!n||typeof n!="object")throw new We.JwkError("Invalid JWK");const i=(0,tz.either)(n.kid,r),o=n.use||"sig";return new A0(We.jwkValidator.parse({...n,kid:i,use:o}))}}Fh.JoseKey=A0;(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Fh,t)})(pC);var Nc={};Object.defineProperty(Nc,"__esModule",{value:!0});Nc.toSubtleAlgorithm=rz;Nc.fromSubtleAlgorithm=nz;Nc.isCryptoKeyPair=iz;function rz(t,e,r){switch(t){case"PS256":case"PS384":case"PS512":return{name:"RSA-PSS",hash:`SHA-${t.slice(-3)}`,modulusLength:(r==null?void 0:r.modulusLength)??2048,publicExponent:new Uint8Array([1,0,1])};case"RS256":case"RS384":case"RS512":return{name:"RSASSA-PKCS1-v1_5",hash:`SHA-${t.slice(-3)}`,modulusLength:(r==null?void 0:r.modulusLength)??2048,publicExponent:new Uint8Array([1,0,1])};case"ES256":case"ES384":return{name:"ECDSA",namedCurve:`P-${t.slice(-3)}`};case"ES512":return{name:"ECDSA",namedCurve:"P-521"};default:throw new TypeError(`Unsupported alg "${t}"`)}}function nz(t){switch(t.name){case"RSA-PSS":case"RSASSA-PKCS1-v1_5":{const e=t.hash.name;switch(e){case"SHA-256":case"SHA-384":case"SHA-512":return`${t.name==="RSA-PSS"?"PS":"RS"}${e.slice(-3)}`;default:throw new TypeError("unsupported RsaHashedKeyAlgorithm hash")}}case"ECDSA":{const e=t.namedCurve;switch(e){case"P-256":case"P-384":case"P-512":return`ES${e.slice(-3)}`;case"P-521":return"ES512";default:throw new TypeError("unsupported EcKeyAlgorithm namedCurve")}}case"Ed448":case"Ed25519":return"EdDSA";default:throw new TypeError(`Unexpected algorithm "${t.name}"`)}}function iz(t,e){return typeof t=="object"&&t!==null&&"privateKey"in t&&t.privateKey instanceof CryptoKey&&t.privateKey.type==="private"&&(e==null||t.privateKey.extractable===e)&&t.privateKey.usages.includes("sign")&&"publicKey"in t&&t.publicKey instanceof CryptoKey&&t.publicKey.type==="public"&&t.publicKey.extractable===!0&&t.publicKey.usages.includes("verify")}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WebcryptoKey=t.jwkWithAlgSchema=void 0;const e=G,r=Si,n=pC,i=Nc;t.jwkWithAlgSchema=e.z.intersection(r.jwkSchema,e.z.object({alg:e.z.string()}));class o extends n.JoseKey{static async generate(l=["ES256"],u=crypto.randomUUID(),c){const d=await this.generateKeyPair(l,c);if(!(0,i.isCryptoKeyPair)(d))throw new TypeError("Invalid CryptoKeyPair");return this.fromKeypair(d,u)}static async fromKeypair(l,u){const{key_ops:c,use:d,alg:f=(0,i.fromSubtleAlgorithm)(l.privateKey.algorithm),...h}=await crypto.subtle.exportKey("jwk",l.privateKey.extractable?l.privateKey:l.publicKey);if(d&&d!=="sig")throw new TypeError(`Unsupported JWK use "${d}"`);if(c&&!c.some(g=>g==="sign"||g==="verify"))throw new TypeError(`Invalid key_ops "${c}" for "sig" use`);return new o(t.jwkWithAlgSchema.parse({...h,kid:u,alg:f,use:"sig"}),l)}constructor(l,u){super(l),Object.defineProperty(this,"cryptoKeyPair",{enumerable:!0,configurable:!0,writable:!0,value:u})}get isPrivate(){return!0}get privateJwk(){if(super.isPrivate)return this.jwk;throw new Error("Private Webcrypto Key not exportable")}async getKeyObj(l){if(this.jwk.alg!==l)throw new r.JwkError(`Key cannot be used with algorithm "${l}"`);return this.cryptoKeyPair.privateKey}}t.WebcryptoKey=o})(X1);(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(X1,t)})(jh);var S0={},C0={},Do={},Ci={},On={};Object.defineProperty(On,"__esModule",{value:!0});On.InvalidDidError=On.DidError=void 0;class Sc extends Error{constructor(e,r,n,i=400,o){super(r,{cause:o}),Object.defineProperty(this,"did",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:i})}get statusCode(){return this.status}toString(){return`${this.constructor.name} ${this.code} (${this.did}): ${this.message}`}static from(e,r){if(e instanceof Sc)return e;const n=e instanceof Error?e.message:typeof e=="string"?e:"An unknown error occurred",i=(typeof(e==null?void 0:e.statusCode)=="number"?e.statusCode:void 0)??(typeof(e==null?void 0:e.status)=="number"?e.status:void 0);return new Sc(r,n,"did-unknown-error",i,e)}}On.DidError=Sc;let oz=class extends Sc{constructor(e,r,n){super(e,r,"did-invalid",400,n)}};On.InvalidDidError=oz;var T0={},Is={};Object.defineProperty(Is,"__esModule",{value:!0});Is.DID_PLC_PREFIX=void 0;Is.isDidPlc=sz;Is.asDidPlc=az;Is.assertDidPlc=YC;const Lp=On,Zh="did:plc:";Is.DID_PLC_PREFIX=Zh;const QC=Zh.length,qu=32;function sz(t){if(typeof t!="string"||t.length!==qu||!t.startsWith(Zh))return!1;for(let e=QC;e<qu;e++)if(!eT(t.charCodeAt(e)))return!1;return!0}function az(t){return YC(t),t}function YC(t){if(typeof t!="string")throw new Lp.InvalidDidError(typeof t,"DID must be a string");if(!t.startsWith(Zh))throw new Lp.InvalidDidError(t,"Invalid did:plc prefix");if(t.length!==qu)throw new Lp.InvalidDidError(t,`did:plc must be ${qu} characters long`);for(let e=QC;e<qu;e++)if(!eT(t.charCodeAt(e)))throw new Lp.InvalidDidError(t,`Invalid character at position ${e}`)}const eT=t=>t>=97&&t<=122||t>=50&&t<=55;var tT={},ur={};Object.defineProperty(ur,"__esModule",{value:!0});ur.didSchema=ur.DID_PREFIX=void 0;ur.assertDidMethod=rT;ur.extractDidMethod=lz;ur.assertDidMsid=nT;ur.assertDid=Qh;ur.isDid=uz;ur.asDid=cz;const xR=G,br=On,sh="did:";ur.DID_PREFIX=sh;const ah=sh.length;function rT(t,e=0,r=t.length){if(!Number.isFinite(r)||!Number.isFinite(e)||r<e||r>t.length)throw new TypeError("Invalid start or end position");if(r===e)throw new br.InvalidDidError(t,"Empty method name");let n;for(let i=e;i<r;i++)if(n=t.charCodeAt(i),(n<97||n>122)&&(n<48||n>57))throw new br.InvalidDidError(t,`Invalid character at position ${i} in DID method name`)}function lz(t){const e=t.indexOf(":",ah);return t.slice(ah,e)}function nT(t,e=0,r=t.length){if(!Number.isFinite(r)||!Number.isFinite(e)||r<e||r>t.length)throw new TypeError("Invalid start or end position");if(r===e)throw new br.InvalidDidError(t,"DID method-specific id must not be empty");let n;for(let i=e;i<r;i++)if(n=t.charCodeAt(i),(n<97||n>122)&&(n<65||n>90)&&(n<48||n>57)&&n!==46&&n!==45&&n!==95){if(n===58){if(i===r-1)throw new br.InvalidDidError(t,'DID cannot end with ":"');continue}if(n===37){if(n=t.charCodeAt(++i),(n<48||n>57)&&(n<65||n>70))throw new br.InvalidDidError(t,`Invalid pct-encoded character at position ${i}`);if(n=t.charCodeAt(++i),(n<48||n>57)&&(n<65||n>70))throw new br.InvalidDidError(t,`Invalid pct-encoded character at position ${i}`);if(i>=r)throw new br.InvalidDidError(t,`Incomplete pct-encoded character at position ${i-2}`);continue}throw new br.InvalidDidError(t,`Disallowed character in DID at position ${i}`)}}function Qh(t){if(typeof t!="string")throw new br.InvalidDidError(typeof t,"DID must be a string");const{length:e}=t;if(e>2048)throw new br.InvalidDidError(t,"DID is too long (2048 chars max)");if(!t.startsWith(sh))throw new br.InvalidDidError(t,`DID requires "${sh}" prefix`);const r=t.indexOf(":",ah);if(r===-1)throw new br.InvalidDidError(t,"Missing colon after method name");rT(t,ah,r),nT(t,r+1,e)}function uz(t){try{return Qh(t),!0}catch(e){if(e instanceof br.DidError)return!1;throw e}}function cz(t){return Qh(t),t}ur.didSchema=xR.z.string().superRefine((t,e)=>{try{return Qh(t),!0}catch(r){return e.addIssue({code:xR.z.ZodIssueCode.custom,message:r instanceof Error?r.message:"Unexpected error"}),!1}});(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DID_WEB_PREFIX=void 0,t.isDidWeb=n,t.asDidWeb=i,t.assertDidWeb=o,t.didWebToUrl=s,t.urlToDidWeb=l;const e=On,r=ur;t.DID_WEB_PREFIX="did:web:";function n(u){if(typeof u!="string"||!u.startsWith(t.DID_WEB_PREFIX)||u.charAt(t.DID_WEB_PREFIX.length)===":")return!1;try{return s(u),!0}catch{return!1}}function i(u){return o(u),u}function o(u){if(typeof u!="string")throw new e.InvalidDidError(typeof u,"DID must be a string");if(!u.startsWith(t.DID_WEB_PREFIX))throw new e.InvalidDidError(u,"Invalid did:web prefix");if(u.charAt(t.DID_WEB_PREFIX.length)===":")throw new e.InvalidDidError(u,"did:web MSID must not start with a colon");s(u)}function s(u){(0,r.assertDidMsid)(u,t.DID_WEB_PREFIX.length);const c=t.DID_WEB_PREFIX.length,d=u.indexOf(":",c),f=d===-1?u.slice(c):u.slice(c,d),h=d===-1?"":u.slice(d);try{const g=new URL(`https://${f.replaceAll("%3A",":")}${h.replaceAll(":","/")}`);return g.hostname==="localhost"&&(g.protocol="http:"),g}catch(g){throw new e.InvalidDidError(u,"Invalid Web DID",g)}}function l(u){const c=u.port?`%3A${u.port}`:"",d=u.pathname==="/"?"":u.pathname.replaceAll("/",":");return`did:web:${u.hostname}${c}${d}`}})(tT);(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Is,t),r(tT,t)})(T0);Object.defineProperty(Ci,"__esModule",{value:!0});Ci.atprotoDidSchema=void 0;Ci.isAtprotoDid=iT;Ci.asAtprotoDid=pz;Ci.assertAtprotoDid=oT;Ci.assertAtprotoDidWeb=k0;Ci.isAtprotoDidWeb=sT;const dz=G,lh=On,mi=T0;Ci.atprotoDidSchema=dz.z.string().refine(iT,'Atproto only allows "plc" and "web" DID methods');function iT(t){return typeof t!="string"?!1:t.startsWith(mi.DID_PLC_PREFIX)?(0,mi.isDidPlc)(t):t.startsWith(mi.DID_WEB_PREFIX)?sT(t):!1}function pz(t){return oT(t),t}function oT(t){if(typeof t!="string")throw new lh.InvalidDidError(typeof t,"DID must be a string");if(t.startsWith(mi.DID_PLC_PREFIX))(0,mi.assertDidPlc)(t);else if(t.startsWith(mi.DID_WEB_PREFIX))k0(t);else throw new lh.InvalidDidError(t,'Atproto only allows "plc" and "web" DID methods')}function k0(t){if((0,mi.assertDidWeb)(t),t.includes(":",mi.DID_WEB_PREFIX.length))throw new lh.InvalidDidError(t,"Atproto does not allow path components in Web DIDs");if(t.includes("%3A",mi.DID_WEB_PREFIX.length)&&!t.startsWith("did:web:localhost%3A"))throw new lh.InvalidDidError(t,"Atproto does not allow port numbers in Web DIDs, except for localhost")}function sT(t){try{return k0(t),!0}catch{return!1}}var aT={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.didDocumentValidator=t.didDocumentSchema=void 0;const e=G,r=ur,n=e.z.string().refine(h=>{try{return new URL(h),!0}catch{return!1}},"RFC3968 compliant URI"),i=e.z.union([r.didSchema,e.z.array(r.didSchema)]),o=e.z.union([n,e.z.string().regex(/^#[^#]+$/)]),s=e.z.object({id:o,type:e.z.string().min(1),controller:i,publicKeyJwk:e.z.record(e.z.string(),e.z.unknown()).optional(),publicKeyMultibase:e.z.string().optional()}),l=o,u=e.z.union([e.z.string(),e.z.array(e.z.string())]),c=e.z.union([n,e.z.record(e.z.string(),n),e.z.array(e.z.union([n,e.z.record(e.z.string(),n)])).nonempty()]),d=e.z.object({id:l,type:u,serviceEndpoint:c}),f=e.z.union([o,s]);t.didDocumentSchema=e.z.object({"@context":e.z.union([e.z.literal("https://www.w3.org/ns/did/v1"),e.z.array(e.z.string().url()).nonempty().refine(h=>h[0]==="https://www.w3.org/ns/did/v1",{message:"First @context must be https://www.w3.org/ns/did/v1"})]),id:r.didSchema,controller:i.optional(),alsoKnownAs:e.z.array(n).optional(),service:e.z.array(d).optional(),authentication:e.z.array(f).optional(),verificationMethod:e.z.array(e.z.union([s,o])).optional()}),t.didDocumentValidator=t.didDocumentSchema.superRefine(({id:h,service:g},b)=>{if(g){const w=new Set;for(let C=0;C<g.length;C++){const y=g[C],m=y.id.startsWith("#")?`${h}${y.id}`:y.id;w.has(m)?b.addIssue({code:e.z.ZodIssueCode.custom,message:`Duplicate service id (${y.id}) found in the document`,path:["service",C,"id"]}):w.add(m)}}})})(aT);(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ci,t),r(aT,t),r(On,t),r(ur,t),r(T0,t)})(Do);var zc={},Na={},Yh={};Object.defineProperty(Yh,"__esModule",{value:!0});Yh.LRUCache=void 0;const Gs=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,lT=new Set,Qb=typeof process=="object"&&process?process:{},uT=(t,e,r,n)=>{typeof Qb.emitWarning=="function"?Qb.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)};let uh=globalThis.AbortController,RR=globalThis.AbortSignal;var PA;if(typeof uh>"u"){RR=class{constructor(){De(this,"onabort");De(this,"_onabort",[]);De(this,"reason");De(this,"aborted",!1)}addEventListener(n,i){this._onabort.push(i)}},uh=class{constructor(){De(this,"signal",new RR);e()}abort(n){var i,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const s of this.signal._onabort)s(n);(o=(i=this.signal).onabort)==null||o.call(i,n)}}};let t=((PA=Qb.env)==null?void 0:PA.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,uT("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const fz=t=>!lT.has(t),Vi=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),cT=t=>Vi(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ff:null:null;class ff extends Array{constructor(e){super(e),this.fill(0)}}var va;const ps=class ps{constructor(e,r){De(this,"heap");De(this,"length");if(!R(ps,va))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=cT(e);if(!r)return[];Z(ps,va,!0);const n=new ps(e,r);return Z(ps,va,!1),n}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};va=new WeakMap,me(ps,va,!1);let Yb=ps;var DA,BA,en,fr,tn,rn,Ea,wa,rt,nn,Je,ke,te,Kt,hr,Lt,ut,on,ct,sn,an,yr,ln,Ji,Vt,V,tv,gs,di,Tc,mr,dT,bs,_a,kc,Mi,Ni,rv,hf,yf,Te,nv,Bu,zi,iv;const Y_=class Y_{constructor(e){me(this,V);me(this,en);me(this,fr);me(this,tn);me(this,rn);me(this,Ea);me(this,wa);De(this,"ttl");De(this,"ttlResolution");De(this,"ttlAutopurge");De(this,"updateAgeOnGet");De(this,"updateAgeOnHas");De(this,"allowStale");De(this,"noDisposeOnSet");De(this,"noUpdateTTL");De(this,"maxEntrySize");De(this,"sizeCalculation");De(this,"noDeleteOnFetchRejection");De(this,"noDeleteOnStaleGet");De(this,"allowStaleOnFetchAbort");De(this,"allowStaleOnFetchRejection");De(this,"ignoreFetchAbort");me(this,rt);me(this,nn);me(this,Je);me(this,ke);me(this,te);me(this,Kt);me(this,hr);me(this,Lt);me(this,ut);me(this,on);me(this,ct);me(this,sn);me(this,an);me(this,yr);me(this,ln);me(this,Ji);me(this,Vt);me(this,gs,()=>{});me(this,di,()=>{});me(this,Tc,()=>{});me(this,mr,()=>!1);me(this,bs,e=>{});me(this,_a,(e,r,n)=>{});me(this,kc,(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});De(this,DA,"LRUCache");const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:l,allowStale:u,dispose:c,disposeAfter:d,noDisposeOnSet:f,noUpdateTTL:h,maxSize:g=0,maxEntrySize:b=0,sizeCalculation:w,fetchMethod:C,memoMethod:y,noDeleteOnFetchRejection:m,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:L,ignoreFetchAbort:D}=e;if(r!==0&&!Vi(r))throw new TypeError("max option must be a nonnegative integer");const B=r?cT(r):Array;if(!B)throw new Error("invalid max value: "+r);if(Z(this,en,r),Z(this,fr,g),this.maxEntrySize=b||R(this,fr),this.sizeCalculation=w,this.sizeCalculation){if(!R(this,fr)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(Z(this,wa,y),C!==void 0&&typeof C!="function")throw new TypeError("fetchMethod must be a function if specified");if(Z(this,Ea,C),Z(this,Ji,!!C),Z(this,Je,new Map),Z(this,ke,new Array(r).fill(void 0)),Z(this,te,new Array(r).fill(void 0)),Z(this,Kt,new B(r)),Z(this,hr,new B(r)),Z(this,Lt,0),Z(this,ut,0),Z(this,on,Yb.create(r)),Z(this,rt,0),Z(this,nn,0),typeof c=="function"&&Z(this,tn,c),typeof d=="function"?(Z(this,rn,d),Z(this,ct,[])):(Z(this,rn,void 0),Z(this,ct,void 0)),Z(this,ln,!!R(this,tn)),Z(this,Vt,!!R(this,rn)),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!m,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!L,this.ignoreFetchAbort=!!D,this.maxEntrySize!==0){if(R(this,fr)!==0&&!Vi(R(this,fr)))throw new TypeError("maxSize must be a positive integer if specified");if(!Vi(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");z(this,V,dT).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!l,this.ttlResolution=Vi(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!Vi(this.ttl))throw new TypeError("ttl must be a positive integer if specified");z(this,V,tv).call(this)}if(R(this,en)===0&&this.ttl===0&&R(this,fr)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!R(this,en)&&!R(this,fr)){const j="LRU_CACHE_UNBOUNDED";fz(j)&&(lT.add(j),uT("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,Y_))}}static unsafeExposeInternals(e){return{starts:R(e,an),ttls:R(e,yr),sizes:R(e,sn),keyMap:R(e,Je),keyList:R(e,ke),valList:R(e,te),next:R(e,Kt),prev:R(e,hr),get head(){return R(e,Lt)},get tail(){return R(e,ut)},free:R(e,on),isBackgroundFetch:r=>{var n;return z(n=e,V,Te).call(n,r)},backgroundFetch:(r,n,i,o)=>{var s;return z(s=e,V,yf).call(s,r,n,i,o)},moveToTail:r=>{var n;return z(n=e,V,Bu).call(n,r)},indexes:r=>{var n;return z(n=e,V,Mi).call(n,r)},rindexes:r=>{var n;return z(n=e,V,Ni).call(n,r)},isStale:r=>{var n;return R(n=e,mr).call(n,r)}}}get max(){return R(this,en)}get maxSize(){return R(this,fr)}get calculatedSize(){return R(this,nn)}get size(){return R(this,rt)}get fetchMethod(){return R(this,Ea)}get memoMethod(){return R(this,wa)}get dispose(){return R(this,tn)}get disposeAfter(){return R(this,rn)}getRemainingTTL(e){return R(this,Je).has(e)?1/0:0}*entries(){for(const e of z(this,V,Mi).call(this))R(this,te)[e]!==void 0&&R(this,ke)[e]!==void 0&&!z(this,V,Te).call(this,R(this,te)[e])&&(yield[R(this,ke)[e],R(this,te)[e]])}*rentries(){for(const e of z(this,V,Ni).call(this))R(this,te)[e]!==void 0&&R(this,ke)[e]!==void 0&&!z(this,V,Te).call(this,R(this,te)[e])&&(yield[R(this,ke)[e],R(this,te)[e]])}*keys(){for(const e of z(this,V,Mi).call(this)){const r=R(this,ke)[e];r!==void 0&&!z(this,V,Te).call(this,R(this,te)[e])&&(yield r)}}*rkeys(){for(const e of z(this,V,Ni).call(this)){const r=R(this,ke)[e];r!==void 0&&!z(this,V,Te).call(this,R(this,te)[e])&&(yield r)}}*values(){for(const e of z(this,V,Mi).call(this))R(this,te)[e]!==void 0&&!z(this,V,Te).call(this,R(this,te)[e])&&(yield R(this,te)[e])}*rvalues(){for(const e of z(this,V,Ni).call(this))R(this,te)[e]!==void 0&&!z(this,V,Te).call(this,R(this,te)[e])&&(yield R(this,te)[e])}[(BA=Symbol.iterator,DA=Symbol.toStringTag,BA)](){return this.entries()}find(e,r={}){for(const n of z(this,V,Mi).call(this)){const i=R(this,te)[n],o=z(this,V,Te).call(this,i)?i.__staleWhileFetching:i;if(o!==void 0&&e(o,R(this,ke)[n],this))return this.get(R(this,ke)[n],r)}}forEach(e,r=this){for(const n of z(this,V,Mi).call(this)){const i=R(this,te)[n],o=z(this,V,Te).call(this,i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,R(this,ke)[n],this)}}rforEach(e,r=this){for(const n of z(this,V,Ni).call(this)){const i=R(this,te)[n],o=z(this,V,Te).call(this,i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,R(this,ke)[n],this)}}purgeStale(){let e=!1;for(const r of z(this,V,Ni).call(this,{allowStale:!0}))R(this,mr).call(this,r)&&(z(this,V,zi).call(this,R(this,ke)[r],"expire"),e=!0);return e}info(e){const r=R(this,Je).get(e);if(r===void 0)return;const n=R(this,te)[r],i=z(this,V,Te).call(this,n)?n.__staleWhileFetching:n;if(i===void 0)return;const o={value:i};if(R(this,yr)&&R(this,an)){const s=R(this,yr)[r],l=R(this,an)[r];if(s&&l){const u=s-(Gs.now()-l);o.ttl=u,o.start=Date.now()}}return R(this,sn)&&(o.size=R(this,sn)[r]),o}dump(){const e=[];for(const r of z(this,V,Mi).call(this,{allowStale:!0})){const n=R(this,ke)[r],i=R(this,te)[r],o=z(this,V,Te).call(this,i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;const s={value:o};if(R(this,yr)&&R(this,an)){s.ttl=R(this,yr)[r];const l=Gs.now()-R(this,an)[r];s.start=Math.floor(Date.now()-l)}R(this,sn)&&(s.size=R(this,sn)[r]),e.unshift([n,s])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const i=Date.now()-n.start;n.start=Gs.now()-i}this.set(r,n.value,n)}}set(e,r,n={}){var h,g,b,w,C;if(r===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n;let{noUpdateTTL:c=this.noUpdateTTL}=n;const d=R(this,kc).call(this,e,r,n.size||0,l);if(this.maxEntrySize&&d>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),z(this,V,zi).call(this,e,"set"),this;let f=R(this,rt)===0?void 0:R(this,Je).get(e);if(f===void 0)f=R(this,rt)===0?R(this,ut):R(this,on).length!==0?R(this,on).pop():R(this,rt)===R(this,en)?z(this,V,hf).call(this,!1):R(this,rt),R(this,ke)[f]=e,R(this,te)[f]=r,R(this,Je).set(e,f),R(this,Kt)[R(this,ut)]=f,R(this,hr)[f]=R(this,ut),Z(this,ut,f),up(this,rt)._++,R(this,_a).call(this,f,d,u),u&&(u.set="add"),c=!1;else{z(this,V,Bu).call(this,f);const y=R(this,te)[f];if(r!==y){if(R(this,Ji)&&z(this,V,Te).call(this,y)){y.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:m}=y;m!==void 0&&!s&&(R(this,ln)&&((h=R(this,tn))==null||h.call(this,m,e,"set")),R(this,Vt)&&((g=R(this,ct))==null||g.push([m,e,"set"])))}else s||(R(this,ln)&&((b=R(this,tn))==null||b.call(this,y,e,"set")),R(this,Vt)&&((w=R(this,ct))==null||w.push([y,e,"set"])));if(R(this,bs).call(this,f),R(this,_a).call(this,f,d,u),R(this,te)[f]=r,u){u.set="replace";const m=y&&z(this,V,Te).call(this,y)?y.__staleWhileFetching:y;m!==void 0&&(u.oldValue=m)}}else u&&(u.set="update")}if(i!==0&&!R(this,yr)&&z(this,V,tv).call(this),R(this,yr)&&(c||R(this,Tc).call(this,f,i,o),u&&R(this,di).call(this,u,f)),!s&&R(this,Vt)&&R(this,ct)){const y=R(this,ct);let m;for(;m=y==null?void 0:y.shift();)(C=R(this,rn))==null||C.call(this,...m)}return this}pop(){var e;try{for(;R(this,rt);){const r=R(this,te)[R(this,Lt)];if(z(this,V,hf).call(this,!0),z(this,V,Te).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(R(this,Vt)&&R(this,ct)){const r=R(this,ct);let n;for(;n=r==null?void 0:r.shift();)(e=R(this,rn))==null||e.call(this,...n)}}}has(e,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=R(this,Je).get(e);if(o!==void 0){const s=R(this,te)[o];if(z(this,V,Te).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(R(this,mr).call(this,o))i&&(i.has="stale",R(this,di).call(this,i,o));else return n&&R(this,gs).call(this,o),i&&(i.has="hit",R(this,di).call(this,i,o)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){const{allowStale:n=this.allowStale}=r,i=R(this,Je).get(e);if(i===void 0||!n&&R(this,mr).call(this,i))return;const o=R(this,te)[i];return z(this,V,Te).call(this,o)?o.__staleWhileFetching:o}async fetch(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:w,forceRefresh:C=!1,status:y,signal:m}=r;if(!R(this,Ji))return y&&(y.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:y});const E={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:l,size:u,sizeCalculation:c,noUpdateTTL:d,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:b,ignoreFetchAbort:g,status:y,signal:m};let A=R(this,Je).get(e);if(A===void 0){y&&(y.fetch="miss");const L=z(this,V,yf).call(this,e,A,E,w);return L.__returned=L}else{const L=R(this,te)[A];if(z(this,V,Te).call(this,L)){const ee=n&&L.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",ee&&(y.returnedStale=!0)),ee?L.__staleWhileFetching:L.__returned=L}const D=R(this,mr).call(this,A);if(!C&&!D)return y&&(y.fetch="hit"),z(this,V,Bu).call(this,A),i&&R(this,gs).call(this,A),y&&R(this,di).call(this,y,A),L;const B=z(this,V,yf).call(this,e,A,E,w),pe=B.__staleWhileFetching!==void 0&&n;return y&&(y.fetch=D?"stale":"refresh",pe&&D&&(y.returnedStale=!0)),pe?B.__staleWhileFetching:B.__returned=B}}async forceFetch(e,r={}){const n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){const n=R(this,wa);if(!n)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:o,...s}=r,l=this.get(e,s);if(!o&&l!==void 0)return l;const u=n(e,l,{options:s,context:i});return this.set(e,u,s),u}get(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=r,l=R(this,Je).get(e);if(l!==void 0){const u=R(this,te)[l],c=z(this,V,Te).call(this,u);return s&&R(this,di).call(this,s,l),R(this,mr).call(this,l)?(s&&(s.get="stale"),c?(s&&n&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),n?u.__staleWhileFetching:void 0):(o||z(this,V,zi).call(this,e,"expire"),s&&n&&(s.returnedStale=!0),n?u:void 0)):(s&&(s.get="hit"),c?u.__staleWhileFetching:(z(this,V,Bu).call(this,l),i&&R(this,gs).call(this,l),u))}else s&&(s.get="miss")}delete(e){return z(this,V,zi).call(this,e,"delete")}clear(){return z(this,V,iv).call(this,"delete")}};en=new WeakMap,fr=new WeakMap,tn=new WeakMap,rn=new WeakMap,Ea=new WeakMap,wa=new WeakMap,rt=new WeakMap,nn=new WeakMap,Je=new WeakMap,ke=new WeakMap,te=new WeakMap,Kt=new WeakMap,hr=new WeakMap,Lt=new WeakMap,ut=new WeakMap,on=new WeakMap,ct=new WeakMap,sn=new WeakMap,an=new WeakMap,yr=new WeakMap,ln=new WeakMap,Ji=new WeakMap,Vt=new WeakMap,V=new WeakSet,tv=function(){const e=new ff(R(this,en)),r=new ff(R(this,en));Z(this,yr,e),Z(this,an,r),Z(this,Tc,(o,s,l=Gs.now())=>{if(r[o]=s!==0?l:0,e[o]=s,s!==0&&this.ttlAutopurge){const u=setTimeout(()=>{R(this,mr).call(this,o)&&z(this,V,zi).call(this,R(this,ke)[o],"expire")},s+1);u.unref&&u.unref()}}),Z(this,gs,o=>{r[o]=e[o]!==0?Gs.now():0}),Z(this,di,(o,s)=>{if(e[s]){const l=e[s],u=r[s];if(!l||!u)return;o.ttl=l,o.start=u,o.now=n||i();const c=o.now-u;o.remainingTTL=l-c}});let n=0;const i=()=>{const o=Gs.now();if(this.ttlResolution>0){n=o;const s=setTimeout(()=>n=0,this.ttlResolution);s.unref&&s.unref()}return o};this.getRemainingTTL=o=>{const s=R(this,Je).get(o);if(s===void 0)return 0;const l=e[s],u=r[s];if(!l||!u)return 1/0;const c=(n||i())-u;return l-c},Z(this,mr,o=>{const s=r[o],l=e[o];return!!l&&!!s&&(n||i())-s>l})},gs=new WeakMap,di=new WeakMap,Tc=new WeakMap,mr=new WeakMap,dT=function(){const e=new ff(R(this,en));Z(this,nn,0),Z(this,sn,e),Z(this,bs,r=>{Z(this,nn,R(this,nn)-e[r]),e[r]=0}),Z(this,kc,(r,n,i,o)=>{if(z(this,V,Te).call(this,n))return 0;if(!Vi(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!Vi(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),Z(this,_a,(r,n,i)=>{if(e[r]=n,R(this,fr)){const o=R(this,fr)-e[r];for(;R(this,nn)>o;)z(this,V,hf).call(this,!0)}Z(this,nn,R(this,nn)+e[r]),i&&(i.entrySize=n,i.totalCalculatedSize=R(this,nn))})},bs=new WeakMap,_a=new WeakMap,kc=new WeakMap,Mi=function*({allowStale:e=this.allowStale}={}){if(R(this,rt))for(let r=R(this,ut);!(!z(this,V,rv).call(this,r)||((e||!R(this,mr).call(this,r))&&(yield r),r===R(this,Lt)));)r=R(this,hr)[r]},Ni=function*({allowStale:e=this.allowStale}={}){if(R(this,rt))for(let r=R(this,Lt);!(!z(this,V,rv).call(this,r)||((e||!R(this,mr).call(this,r))&&(yield r),r===R(this,ut)));)r=R(this,Kt)[r]},rv=function(e){return e!==void 0&&R(this,Je).get(R(this,ke)[e])===e},hf=function(e){var o,s;const r=R(this,Lt),n=R(this,ke)[r],i=R(this,te)[r];return R(this,Ji)&&z(this,V,Te).call(this,i)?i.__abortController.abort(new Error("evicted")):(R(this,ln)||R(this,Vt))&&(R(this,ln)&&((o=R(this,tn))==null||o.call(this,i,n,"evict")),R(this,Vt)&&((s=R(this,ct))==null||s.push([i,n,"evict"]))),R(this,bs).call(this,r),e&&(R(this,ke)[r]=void 0,R(this,te)[r]=void 0,R(this,on).push(r)),R(this,rt)===1?(Z(this,Lt,Z(this,ut,0)),R(this,on).length=0):Z(this,Lt,R(this,Kt)[r]),R(this,Je).delete(n),up(this,rt)._--,r},yf=function(e,r,n,i){const o=r===void 0?void 0:R(this,te)[r];if(z(this,V,Te).call(this,o))return o;const s=new uh,{signal:l}=n;l==null||l.addEventListener("abort",()=>s.abort(l.reason),{signal:s.signal});const u={signal:s.signal,options:n,context:i},c=(w,C=!1)=>{const{aborted:y}=s.signal,m=n.ignoreFetchAbort&&w!==void 0;if(n.status&&(y&&!C?(n.status.fetchAborted=!0,n.status.fetchError=s.signal.reason,m&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),y&&!m&&!C)return f(s.signal.reason);const E=g;return R(this,te)[r]===g&&(w===void 0?E.__staleWhileFetching?R(this,te)[r]=E.__staleWhileFetching:z(this,V,zi).call(this,e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,w,u.options))),w},d=w=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=w),f(w)),f=w=>{const{aborted:C}=s.signal,y=C&&n.allowStaleOnFetchAbort,m=y||n.allowStaleOnFetchRejection,E=m||n.noDeleteOnFetchRejection,A=g;if(R(this,te)[r]===g&&(!E||A.__staleWhileFetching===void 0?z(this,V,zi).call(this,e,"fetch"):y||(R(this,te)[r]=A.__staleWhileFetching)),m)return n.status&&A.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),A.__staleWhileFetching;if(A.__returned===A)throw w},h=(w,C)=>{var m;const y=(m=R(this,Ea))==null?void 0:m.call(this,e,o,u);y&&y instanceof Promise&&y.then(E=>w(E===void 0?void 0:E),C),s.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(w(void 0),n.allowStaleOnFetchAbort&&(w=E=>c(E,!0)))})};n.status&&(n.status.fetchDispatched=!0);const g=new Promise(h).then(c,d),b=Object.assign(g,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,b,{...u.options,status:void 0}),r=R(this,Je).get(e)):R(this,te)[r]=b,b},Te=function(e){if(!R(this,Ji))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof uh},nv=function(e,r){R(this,hr)[r]=e,R(this,Kt)[e]=r},Bu=function(e){e!==R(this,ut)&&(e===R(this,Lt)?Z(this,Lt,R(this,Kt)[e]):z(this,V,nv).call(this,R(this,hr)[e],R(this,Kt)[e]),z(this,V,nv).call(this,R(this,ut),e),Z(this,ut,e))},zi=function(e,r){var i,o,s,l;let n=!1;if(R(this,rt)!==0){const u=R(this,Je).get(e);if(u!==void 0)if(n=!0,R(this,rt)===1)z(this,V,iv).call(this,r);else{R(this,bs).call(this,u);const c=R(this,te)[u];if(z(this,V,Te).call(this,c)?c.__abortController.abort(new Error("deleted")):(R(this,ln)||R(this,Vt))&&(R(this,ln)&&((i=R(this,tn))==null||i.call(this,c,e,r)),R(this,Vt)&&((o=R(this,ct))==null||o.push([c,e,r]))),R(this,Je).delete(e),R(this,ke)[u]=void 0,R(this,te)[u]=void 0,u===R(this,ut))Z(this,ut,R(this,hr)[u]);else if(u===R(this,Lt))Z(this,Lt,R(this,Kt)[u]);else{const d=R(this,hr)[u];R(this,Kt)[d]=R(this,Kt)[u];const f=R(this,Kt)[u];R(this,hr)[f]=R(this,hr)[u]}up(this,rt)._--,R(this,on).push(u)}}if(R(this,Vt)&&((s=R(this,ct))!=null&&s.length)){const u=R(this,ct);let c;for(;c=u==null?void 0:u.shift();)(l=R(this,rn))==null||l.call(this,...c)}return n},iv=function(e){var r,n,i;for(const o of z(this,V,Ni).call(this,{allowStale:!0})){const s=R(this,te)[o];if(z(this,V,Te).call(this,s))s.__abortController.abort(new Error("deleted"));else{const l=R(this,ke)[o];R(this,ln)&&((r=R(this,tn))==null||r.call(this,s,l,e)),R(this,Vt)&&((n=R(this,ct))==null||n.push([s,l,e]))}}if(R(this,Je).clear(),R(this,te).fill(void 0),R(this,ke).fill(void 0),R(this,yr)&&R(this,an)&&(R(this,yr).fill(0),R(this,an).fill(0)),R(this,sn)&&R(this,sn).fill(0),Z(this,Lt,0),Z(this,ut,0),R(this,on).length=0,Z(this,nn,0),Z(this,rt,0),R(this,Vt)&&R(this,ct)){const o=R(this,ct);let s;for(;s=o==null?void 0:o.shift();)(i=R(this,rn))==null||i.call(this,...s)}};let ev=Y_;Yh.LRUCache=ev;var L0={};Object.defineProperty(L0,"__esModule",{value:!0});L0.roughSizeOfObject=hz;const Eg=new WeakMap;function hz(t){const e=new Set,r=[t];let n=0;for(;r.length;){const i=r.pop();switch(typeof i){case"string":n+=12+4*Math.ceil(i.length/4);break;case"number":n+=12;break;case"boolean":n+=4;break;case"object":if(n+=4,i===null)break;if(Eg.has(i)){n+=Eg.get(i);break}if(e.has(i))continue;if(e.add(i),Array.isArray(i))n+=4,r.push(...i);else{n+=8;const o=Object.getOwnPropertyNames(i);for(let s=0;s<o.length;s++){n+=4;const l=o[s],u=i[l];u!==void 0&&r.push(u),r.push(l)}}break;case"function":n+=8;break;case"symbol":n+=8;break;case"bigint":n+=16;break}}return typeof t=="object"&&t!==null&&Eg.set(t,n),n}var yz=S&&S.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Pp=S&&S.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ls;Object.defineProperty(Na,"__esModule",{value:!0});Na.SimpleStoreMemory=void 0;const mz=Yh,gz=L0,pT=Symbol("nullItem"),bz=t=>t===null?pT:t,AR=t=>t===pT?null:t;class vz{constructor({sizeCalculation:e,...r}){ls.set(this,void 0),yz(this,ls,new mz.LRUCache({...r,allowStale:!1,updateAgeOnGet:!1,updateAgeOnHas:!1,sizeCalculation:e?(n,i)=>e(AR(n),i):r.maxEntrySize!=null||r.maxSize!=null?gz.roughSizeOfObject:void 0}),"f")}get(e){const r=Pp(this,ls,"f").get(e);if(r!==void 0)return AR(r)}set(e,r){Pp(this,ls,"f").set(e,bz(r))}del(e){Pp(this,ls,"f").delete(e)}clear(){Pp(this,ls,"f").clear()}}Na.SimpleStoreMemory=vz;ls=new WeakMap;Object.defineProperty(zc,"__esModule",{value:!0});zc.DidCacheMemory=void 0;const Ez=Na,SR=3600*1e3,wz=50*1024*1024;class _z extends Ez.SimpleStoreMemory{constructor(e){super((e==null?void 0:e.max)==null?{ttl:SR,maxSize:wz,...e}:{ttl:SR,...e})}}zc.DidCacheMemory=_z;var ey={},za={},ty={};Object.defineProperty(ty,"__esModule",{value:!0});ty.CachedGetter=void 0;const xz=()=>!0,Rz=()=>!1;class Az{constructor(e,r,n){Object.defineProperty(this,"getter",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"pending",{enumerable:!0,configurable:!0,writable:!0,value:new Map})}async get(e,r={}){var u,c,d;(u=r.signal)==null||u.throwIfAborted();const n=(c=this.options)==null?void 0:c.isStale,i=r.noCache?Rz:r.allowStale||n==null?xz:async f=>!await n(e,f);let o;for(;o=this.pending.get(e);){try{const{isFresh:f,value:h}=await o;if(f||await i(h))return h}catch{}(d=r.signal)==null||d.throwIfAborted()}const s=Promise.resolve().then(async()=>{const f=await this.getStored(e,r);return f!==void 0&&await i(f)?{isFresh:!1,value:f}:Promise.resolve().then(async()=>(0,this.getter)(e,r,f)).catch(async h=>{var g;if(f!==void 0)try{const b=(g=this.options)==null?void 0:g.deleteOnError;await(b==null?void 0:b(h,e,f))&&await this.delStored(e,h)}catch(b){throw new AggregateError([h,b],"Error while deleting stored value")}throw h}).then(async h=>(await this.setStored(e,h),{isFresh:!0,value:h}))}).finally(()=>{this.pending.delete(e)});if(this.pending.has(e))throw new Error("Concurrent request for the same key");this.pending.set(e,s);const{value:l}=await s;return l}async getStored(e,r){try{return await this.store.get(e,r)}catch{return}}async setStored(e,r){var n;try{await this.store.set(e,r)}catch(i){const o=(n=this.options)==null?void 0:n.onStoreError;await(o==null?void 0:o(i,e,r))}}async delStored(e,r){await this.store.del(e)}}ty.CachedGetter=Az;var fT={};Object.defineProperty(fT,"__esModule",{value:!0});(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(ty,t),r(fT,t)})(za);Object.defineProperty(ey,"__esModule",{value:!0});ey.DidResolverCached=void 0;const Sz=za,Cz=zc;class Tz{constructor(e,r=new Cz.DidCacheMemory){Object.defineProperty(this,"getter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.getter=new Sz.CachedGetter((n,i)=>e.resolve(n,i),r)}async resolve(e,r){return this.getter.get(e,r)}}ey.DidResolverCached=Tz;var hT={};Object.defineProperty(hT,"__esModule",{value:!0});var ry={},ny={},Mn={},Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.FetchError=void 0;class kz extends Error{constructor(e,r,n){super(r,n),Object.defineProperty(this,"statusCode",{enumerable:!0,configurable:!0,writable:!0,value:e})}get expose(){return!0}}Fa.FetchError=kz;var P0={},qa={};Object.defineProperty(qa,"__esModule",{value:!0});qa.toRequestTransformer=Lz;qa.asRequest=yT;function Lz(t){return function(e,r){return t.call(this,yT(e,r))}}function yT(t,e){return!e&&t instanceof Request?t:new Request(t,e)}var Bt={};Object.defineProperty(Bt,"__esModule",{value:!0});Bt.extractUrl=Bt.MaxBytesTransformStream=Bt.ifString=void 0;Bt.isIp=Pz;Bt.padLines=jz;Bt.cancelBody=mT;Bt.logCancellationError=gT;Bt.stringifyMessage=Uz;function Pz(t){return!!(t.match(/^\d+\.\d+\.\d+\.\d+$/)||t.startsWith("[")&&t.endsWith("]"))}const Dz=t=>typeof t=="string"?t:void 0;Bt.ifString=Dz;class Bz extends TransformStream{constructor(e){if(!(e>=0))throw new TypeError("maxBytes must be a non-negative number");let r=0;super({transform:(n,i)=>{(r+=n.length)<=e?i.enqueue(n):i.error(new Error("Response too large"))}})}}Bt.MaxBytesTransformStream=Bz;const Iz=/\r?\n/g;function jz(t,e){return t&&e+t.replace(Iz,`$&${e}`)}async function mT(t,e){t.body&&!t.bodyUsed&&!t.body.locked&&typeof t.body.cancel=="function"&&(typeof e=="function"?t.body.cancel().catch(e):e==="log"?t.body.cancel().catch(gT):await t.body.cancel())}function gT(t){console.warn("Failed to cancel response body",t)}async function Uz(t){try{const e=$z(t.headers),r=await Oz(t);return e&&r?`${e}
${r}`:e||r}finally{mT(t,"log")}}function $z(t){return Array.from(t).map(([e,r])=>`${e}: ${r}`).join(`
`)}async function Oz(t){var e;try{const r=await t.blob();if((e=r.type)!=null&&e.startsWith("text/")){const n=await r.text();return JSON.stringify(n)}if(/application\/(?:\w+\+)?json/.test(r.type)){const n=await r.text();return n.includes(`
`)?JSON.stringify(JSON.parse(n)):n}return`[Body size: ${r.size}, type: ${JSON.stringify(r.type)} ]`}catch{return"[Body could not be read]"}}const Kz=t=>typeof t=="string"?new URL(t):t instanceof URL?t:new URL(t.url);Bt.extractUrl=Kz;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FORBIDDEN_DOMAIN_NAMES=t.FetchRequestError=void 0,t.protocolCheckRequestTransform=l,t.explicitRedirectCheckRequestTransform=u,t.requireHostHeaderTransform=c,t.forbiddenDomainNameRequestTransform=d;const e=Fa,r=qa,n=Bt;class i extends e.FetchError{constructor(h,g,b,w){if(g==null||!b){const C=s(o(w==null?void 0:w.cause));g??(g=C[0]),b||(b=C[1])}super(g,b,w),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:h})}get expose(){return this.statusCode!==500}static from(h,g){return g instanceof i?g:new i(h,void 0,void 0,{cause:g})}}t.FetchRequestError=i;function o(f){return f instanceof TypeError&&f.message==="fetch failed"&&f.cause!==void 0?f.cause:f}function s(f){if(typeof f=="string"&&f.length>0)return[500,f];if(!(f instanceof Error))return[500,"Failed to fetch"];switch(f.message){case"failed to fetch the data URL":return[400,f.message];case"unexpected redirect":case"cors failure":case"blocked":case"proxy authentication required":return[502,f.message]}const h=f.code;if(typeof h=="string")switch(!0){case h==="ENOTFOUND":return[400,"Invalid hostname"];case h==="ECONNREFUSED":return[502,"Connection refused"];case h==="DEPTH_ZERO_SELF_SIGNED_CERT":return[502,"Self-signed certificate"];case h.startsWith("ERR_TLS"):return[502,"TLS error"];case h.startsWith("ECONN"):return[502,"Connection error"];default:return[500,`${h} error`]}return[500,f.message]}function l(f){return(h,g)=>{const{protocol:b,port:w}=(0,n.extractUrl)(h),C=(0,r.asRequest)(h,g),y=Object.hasOwn(f,b)?f[b]:void 0;if(y){if(y!==!0){if(!y.allowCustomPort&&w!=="")throw new i(C,400,`Custom ${b} ports not allowed`)}}else throw new i(C,400,`Forbidden protocol "${b}"`);return C}}function u(){return(f,h)=>{const g=(0,r.asRequest)(f,h);if((h==null?void 0:h.redirect)!=null)return g;if(g.redirect==="follow")throw new i(g,500,'Request redirect must be "error" or "manual"');return g}}function c(){return(f,h)=>{const{protocol:g,hostname:b}=(0,n.extractUrl)(f),w=(0,r.asRequest)(f,h);if(g!=="http:"&&g!=="https:")throw new i(w,400,`"${g}" requests are not allowed`);if(!b||(0,n.isIp)(b))throw new i(w,400,"Invalid hostname");return w}}t.DEFAULT_FORBIDDEN_DOMAIN_NAMES=["example.com","*.example.com","example.org","*.example.org","example.net","*.example.net","googleusercontent.com","*.googleusercontent.com"];function d(f=t.DEFAULT_FORBIDDEN_DOMAIN_NAMES){const h=new Set(f);return h.size===0?r.asRequest:async(g,b)=>{const{hostname:w}=(0,n.extractUrl)(g),C=(0,r.asRequest)(g,b);if(h.has(w))throw new i(C,403,"Forbidden hostname");let y=w.indexOf(".");for(;y!==-1;){const m=w.slice(y+1);if(h.has(`*.${m}`))throw new i(C,403,"Forbidden hostname");y=w.indexOf(".",y+1)}return C}}})(P0);var Ye={},iy={},oy={};Object.defineProperty(oy,"__esModule",{value:!0});oy.pipe=Vz;oy.pipeTwo=bT;function Vz(...t){return t.reduce(bT)}function bT(t,e){return async(...r)=>e(await t(...r))}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.pipeTwo=t.pipe=void 0;var e=oy;Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return e.pipe}}),Object.defineProperty(t,"pipeTwo",{enumerable:!0,get:function(){return e.pipeTwo}})})(iy);var Fc={},Mz=S&&S.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Dp=S&&S.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},us;Object.defineProperty(Fc,"__esModule",{value:!0});Fc.TransformedResponse=void 0;class Nz extends Response{constructor(e,r){if(!e.body)throw new TypeError("Response body is not available");if(e.bodyUsed)throw new TypeError("Response body is already used");super(e.body.pipeThrough(r),{status:e.status,statusText:e.statusText,headers:e.headers}),us.set(this,void 0),Mz(this,us,e,"f")}get url(){return Dp(this,us,"f").url}get redirected(){return Dp(this,us,"f").redirected}get type(){return Dp(this,us,"f").type}get statusText(){return Dp(this,us,"f").statusText}}Fc.TransformedResponse=Nz;us=new WeakMap;Object.defineProperty(Ye,"__esModule",{value:!0});Ye.fetchJsonZodProcessor=Ye.FetchResponseError=void 0;Ye.peekJson=Gz;Ye.checkLength=D0;Ye.extractLength=wT;Ye.extractMime=sy;Ye.cancelBodyOnError=qc;Ye.fetchOkProcessor=Hz;Ye.fetchOkTransformer=_T;Ye.fetchMaxSizeProcessor=Xz;Ye.fetchResponseMaxSizeChecker=xT;Ye.fetchTypeProcessor=RT;Ye.fetchResponseTypeChecker=AT;Ye.fetchResponseJsonTransformer=ST;Ye.fetchJsonProcessor=Wz;Ye.fetchJsonValidatorProcessor=CT;const zz=iy,Fz=Fa,vT=Fc,_s=Bt,ET=/^application\/(?:[^()<>@,;:/[\]\\?={} \t]+\+)?json$/i;class Kn extends Fz.FetchError{constructor(e,r=e.status,n=e.statusText,i){super(r,n,i),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:e})}static async from(e,r=qz,n=e.status,i){const o=typeof r=="string"?r:typeof r=="function"?await r(e):void 0;return new Kn(e,n,o,i)}}Ye.FetchResponseError=Kn;const qz=async t=>{const e=sy(t);if(e)try{if(e==="text/plain")return await t.text();if(ET.test(e)){const r=await t.json();if(typeof r=="string")return r;if(typeof r=="object"&&r!=null){const n=(0,_s.ifString)(r.error_description);if(n)return n;const i=(0,_s.ifString)(r.error);if(i)return i;const o=(0,_s.ifString)(r.message);if(o)return o}}}catch{}};async function Gz(t,e=1/0){if(sy(t)!=="application/json")return;D0(t,e);const n=t.clone();return(t.body&&e<1/0?new vT.TransformedResponse(n,new _s.MaxBytesTransformStream(e)):n).json()}function D0(t,e){if(!(e>=0))throw new TypeError("maxBytes must be a non-negative number");const r=wT(t);if(r!=null&&r>e)throw new Kn(t,502,"Response too large");return r}function wT(t){const e=t.headers.get("Content-Length");if(e==null)return;if(!/^\d+$/.test(e))throw new Kn(t,502,"Invalid Content-Length");const r=Number(e);if(!Number.isSafeInteger(r))throw new Kn(t,502,"Content-Length too large");return r}function sy(t){const e=t.headers.get("Content-Type");if(e!=null)return e.split(";",1)[0].trim()}function qc(t,e=_s.logCancellationError){return async r=>{try{return await t(r)}catch(n){throw await(0,_s.cancelBody)(r,e??void 0),n}}}function Hz(t){return qc(e=>_T(e,t))}async function _T(t,e){if(t.ok)return t;throw await Kn.from(t,e)}function Xz(t){if(t===1/0)return e=>e;if(!Number.isFinite(t)||t<0)throw new TypeError("maxBytes must be a 0, Infinity or a positive number");return qc(e=>xT(e,t))}function xT(t,e){if(e===1/0||(D0(t,e),!t.body))return t;const r=new _s.MaxBytesTransformStream(e);return new vT.TransformedResponse(t,r)}function RT(t,e=!0){const r=typeof t=="string"?n=>n===t:t instanceof RegExp?n=>t.test(n):t;return qc(n=>AT(n,r,e))}async function AT(t,e,r=!0){const n=sy(t);if(n){if(!e(n.toLowerCase()))throw await Kn.from(t,`Unexpected response Content-Type (${n})`,502)}else if(r)throw await Kn.from(t,"Missing response Content-Type header",502);return t}async function ST(t){try{const e=await t.json();return{response:t,json:e}}catch(e){throw new Kn(t,502,"Unable to parse response as JSON",{cause:e})}}function Wz(t=ET,e=!0){return(0,zz.pipe)(RT(t,e),qc(ST))}function CT(t,e){if("parseAsync"in t&&typeof t.parseAsync=="function")return async r=>t.parseAsync(r.json,e);if("parse"in t&&typeof t.parse=="function")return async r=>t.parse(r.json,e);throw new TypeError("Invalid schema")}Ye.fetchJsonZodProcessor=CT;var Ga={};Object.defineProperty(Ga,"__esModule",{value:!0});Ga.timedFetch=void 0;Ga.loggedFetch=Qz;Ga.bindFetch=e4;const Jz=P0,B0=qa,Zz=Fc,Bp=Bt;function Qz({fetch:t=globalThis.fetch,logRequest:e=!0,logResponse:r=!0,logError:n=!0}){const i=e===!0?async l=>{const u=await(0,Bp.stringifyMessage)(l);console.info(`> ${l.method} ${l.url}
${(0,Bp.padLines)(u," ")}`)}:e||void 0,o=r===!0?async l=>{const u=await(0,Bp.stringifyMessage)(l.clone());console.info(`< HTTP/1.1 ${l.status} ${l.statusText}
${(0,Bp.padLines)(u," ")}`)}:r||void 0,s=n===!0?async l=>{console.error("< Error:",l)}:n||void 0;return!i&&!o&&!s?t:(0,B0.toRequestTransformer)(async function(l){i&&await i(l);try{const u=await t.call(this,l);return o&&await o(u,l),u}catch(u){throw s&&await s(u,l),u}})}const Yz=(t=6e4,e=globalThis.fetch)=>{if(t===1/0)return e;if(!Number.isFinite(t)||t<=0)throw new TypeError("Timeout must be positive");return(0,B0.toRequestTransformer)(async function(r){var c,d;const n=new AbortController,i=n.signal,o=()=>{n.abort()},s=()=>{var f;clearTimeout(l),(f=r.signal)==null||f.removeEventListener("abort",o)},l=setTimeout(o,t);typeof l=="object"&&((c=l.unref)==null||c.call(l)),(d=r.signal)==null||d.addEventListener("abort",o),i.addEventListener("abort",s);const u=await e.call(this,r,{signal:i});if(u.body){const f=new TransformStream({flush:s});return new Zz.TransformedResponse(u,f)}else return s(),u})};Ga.timedFetch=Yz;function e4(t=globalThis.fetch,e=globalThis){return(0,B0.toRequestTransformer)(async r=>{try{return await t.call(e,r)}catch(n){throw Jz.FetchRequestError.from(r,n)}})}(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Fa,t),r(P0,t),r(Ye,t),r(Ga,t),r(qa,t),r(Bt,t)})(Mn);Object.defineProperty(ny,"__esModule",{value:!0});ny.DidResolverBase=void 0;const t4=G,ts=Do,CR=Mn;class r4{constructor(e){Object.defineProperty(this,"methods",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.methods=new Map(Object.entries(e))}async resolve(e,r){var o;(o=r==null?void 0:r.signal)==null||o.throwIfAborted();const n=(0,ts.extractDidMethod)(e),i=this.methods.get(n);if(!i)throw new ts.DidError(e,"Unsupported DID method","did-method-invalid",400);try{const s=await i.resolve(e,r);if(s.id!==e)throw new ts.DidError(e,`DID document id (${s.id}) does not match DID`,"did-document-id-mismatch",400);return s}catch(s){if(s instanceof CR.FetchResponseError){const l=s.response.status>=500?502:s.response.status;throw new ts.DidError(e,s.message,"did-fetch-error",l,s)}throw s instanceof CR.FetchError?new ts.DidError(e,s.message,"did-fetch-error",400,s):s instanceof t4.ZodError?new ts.DidError(e,s.message,"did-document-format-error",503,s):ts.DidError.from(s,e)}}}ny.DidResolverBase=r4;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0});Gc.DidPlcMethod=void 0;const TT=Do,mf=Mn,n4=iy,i4=(0,n4.pipe)((0,mf.fetchOkProcessor)(),(0,mf.fetchJsonProcessor)(/^application\/(did\+ld\+)?json$/),(0,mf.fetchJsonZodProcessor)(TT.didDocumentValidator));class o4{constructor(e){Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"plcDirectoryUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.plcDirectoryUrl=new URL((e==null?void 0:e.plcDirectoryUrl)||"https://plc.directory/"),this.fetch=(0,mf.bindFetch)(e==null?void 0:e.fetch)}async resolve(e,r){(0,TT.assertDidPlc)(e);const n=new URL(`/${encodeURIComponent(e)}`,this.plcDirectoryUrl);return this.fetch(n,{redirect:"error",headers:{accept:"application/did+ld+json,application/json"},signal:r==null?void 0:r.signal}).then(i4)}}Gc.DidPlcMethod=o4;var Ha={};Object.defineProperty(Ha,"__esModule",{value:!0});Ha.DidWebMethod=void 0;Ha.buildDidWebDocumentUrl=kT;const I0=Do,gf=Mn,s4=iy,a4=(0,s4.pipe)((0,gf.fetchOkProcessor)(),(0,gf.fetchJsonProcessor)(/^application\/(did\+ld\+)?json$/),(0,gf.fetchJsonZodProcessor)(I0.didDocumentValidator));class l4{constructor({fetch:e=globalThis.fetch,allowHttp:r=!0}={}){Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowHttp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=(0,gf.bindFetch)(e),this.allowHttp=r}async resolve(e,r){const n=kT(e);if(!this.allowHttp&&n.protocol==="http:")throw new I0.DidError(e,'Resolution of "http" did:web is not allowed',"did-web-http-not-allowed");return this.fetch(n,{redirect:"error",headers:{accept:"application/did+ld+json,application/json"},signal:r==null?void 0:r.signal}).then(a4)}}Ha.DidWebMethod=l4;function kT(t){const e=(0,I0.didWebToUrl)(t);return e.pathname==="/"?new URL("/.well-known/did.json",e):new URL(`${e.pathname}/did.json`,e)}Object.defineProperty(ry,"__esModule",{value:!0});ry.DidResolverCommon=void 0;const u4=ny,c4=Gc,d4=Ha;class p4 extends u4.DidResolverBase{constructor(e){super({plc:new c4.DidPlcMethod(e),web:new d4.DidWebMethod(e)})}}ry.DidResolverCommon=p4;var LT={};Object.defineProperty(LT,"__esModule",{value:!0});var PT={};(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gc,t),r(Ha,t)})(PT);var DT={};Object.defineProperty(DT,"__esModule",{value:!0});(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Do,t),r(zc,t),r(ey,t),r(hT,t),r(ry,t),r(LT,t),r(PT,t),r(DT,t)})(C0);var ay={},Xa={};Object.defineProperty(Xa,"__esModule",{value:!0});Xa.isResolvedHandle=h4;const f4=Do;function h4(t){return t===null||(0,f4.isAtprotoDid)(t)}var BT={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AppViewHandleResolver=t.xrpcErrorSchema=void 0;const e=G,r=Xa;t.xrpcErrorSchema=e.z.object({error:e.z.string(),message:e.z.string().optional()});class n{static from(o,s){return typeof o=="string"||o instanceof URL?new n(o,s):o}constructor(o,s){Object.defineProperty(this,"serviceUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serviceUrl=new URL(o),this.fetch=(s==null?void 0:s.fetch)??globalThis.fetch}async resolve(o,s){const l=new URL("/xrpc/com.atproto.identity.resolveHandle",this.serviceUrl);l.searchParams.set("handle",o);const u=await this.fetch.call(null,l,{cache:s!=null&&s.noCache?"no-cache":void 0,signal:s==null?void 0:s.signal,redirect:"error"}),c=await u.json();if(u.status===400){const f=t.xrpcErrorSchema.parse(c);if(f.error==="InvalidRequest"&&f.message==="Unable to resolve handle")return null}if(!u.ok)throw new TypeError("Invalid response from resolveHandle method");const d=c==null?void 0:c.did;if(!(0,r.isResolvedHandle)(d))throw new TypeError("Invalid DID returned from resolveHandle method");return d}}t.AppViewHandleResolver=n})(BT);var ly={},Hc={},uy={};Object.defineProperty(uy,"__esModule",{value:!0});uy.DnsHandleResolver=void 0;const y4=Xa,m4="_atproto",wg="did=";class g4{constructor(e){Object.defineProperty(this,"resolveTxt",{enumerable:!0,configurable:!0,writable:!0,value:e})}async resolve(e){const r=await this.resolveTxt.call(null,`${m4}.${e}`);if(!r)return null;for(let n=0;n<r.length;n++){if(!r[n].startsWith(wg))continue;for(let o=n+1;o<r.length;o++)if(r[o].startsWith(wg))return null;const i=r[n].slice(wg.length);return(0,y4.isResolvedHandle)(i)?i:null}return null}}uy.DnsHandleResolver=g4;var cy={};Object.defineProperty(cy,"__esModule",{value:!0});cy.WellKnownHandleResolver=void 0;const b4=Xa;class v4{constructor(e){Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=(e==null?void 0:e.fetch)??globalThis.fetch}async resolve(e,r){var i;const n=new URL("/.well-known/atproto-did",`https://${e}`);try{const l=(await(await this.fetch.call(null,n,{cache:r!=null&&r.noCache?"no-cache":void 0,signal:r==null?void 0:r.signal,redirect:"error"})).text()).split(`
`)[0].trim();return(0,b4.isResolvedHandle)(l)?l:null}catch{return(i=r==null?void 0:r.signal)==null||i.throwIfAborted(),null}}}cy.WellKnownHandleResolver=v4;Object.defineProperty(Hc,"__esModule",{value:!0});Hc.AtprotoHandleResolver=void 0;const TR=uy,E4=cy,w4=()=>{};class _4{constructor(e){Object.defineProperty(this,"httpResolver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dnsResolver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dnsResolverFallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.httpResolver=new E4.WellKnownHandleResolver(e),this.dnsResolver=new TR.DnsHandleResolver(e.resolveTxt),this.dnsResolverFallback=e.resolveTxtFallback?new TR.DnsHandleResolver(e.resolveTxtFallback):void 0}async resolve(e,r){var s,l,u;(s=r==null?void 0:r.signal)==null||s.throwIfAborted();const n=new AbortController,{signal:i}=n;(l=r==null?void 0:r.signal)==null||l.addEventListener("abort",()=>n.abort(),{signal:i});const o={...r,signal:i};try{const c=this.dnsResolver.resolve(e,o),d=this.httpResolver.resolve(e,o);d.catch(w4);const f=await c;if(f)return f;i.throwIfAborted();const h=await d;return h||(i.throwIfAborted(),((u=this.dnsResolverFallback)==null?void 0:u.resolve(e,o))??null)}finally{n.abort()}}}Hc.AtprotoHandleResolver=_4;Object.defineProperty(ly,"__esModule",{value:!0});ly.AtprotoDohHandleResolver=void 0;const x4=Hc;class R4 extends x4.AtprotoHandleResolver{constructor(e){super({...e,resolveTxt:A4(e),resolveTxtFallback:void 0})}}ly.AtprotoDohHandleResolver=R4;function A4({dohEndpoint:t,fetch:e=globalThis.fetch}){return async r=>{var o,s,l;const n=new URL(t);n.searchParams.set("type","TXT"),n.searchParams.set("name",r);const i=await e(n,{method:"GET",headers:{accept:"application/dns-json"},redirect:"follow"});try{const u=(o=i.headers.get("content-type"))==null?void 0:o.trim();if(i.ok){if((u==null?void 0:u.match(/application\/(dns-)?json/i))==null)throw new TypeError("Unexpected response from DoH server")}else{const d=u!=null&&u.startsWith("text/plain")?await i.text():`Failed to resolve ${r}`;throw new TypeError(d)}return((s=T4(await i.json()).Answer)==null?void 0:s.filter(P4).map(D4))??null}finally{i.bodyUsed===!1&&((l=i.body)==null||l.cancel().catch(S4))}}}function S4(t){(!(t instanceof DOMException)||t.name!=="AbortError")&&console.error("An error occurred while cancelling the response body:",t)}function C4(t){return!(typeof t!="object"||t===null||!("Status"in t)||typeof t.Status!="number"||"Answer"in t&&!k4(t.Answer,L4))}function T4(t){if(C4(t))return t;throw new TypeError("Invalid DoH response")}function k4(t,e){return Array.isArray(t)&&t.every(e)}function L4(t){return typeof t=="object"&&t!==null&&"name"in t&&typeof t.name=="string"&&"type"in t&&typeof t.type=="number"&&"data"in t&&typeof t.data=="string"&&"TTL"in t&&typeof t.TTL=="number"}function P4(t){return t.type===16}function D4(t){return t.data.replace(/^"|"$/g,"").replace(/\\"/g,'"')}var dy={};Object.defineProperty(dy,"__esModule",{value:!0});dy.CachedHandleResolver=void 0;const B4=za,I4=Na;class j4{constructor(e,r=new I4.SimpleStoreMemory({max:1e3,ttl:10*6e4})){Object.defineProperty(this,"getter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.getter=new B4.CachedGetter((n,i)=>e.resolve(n,i),r)}async resolve(e,r){return this.getter.get(e,r)}}dy.CachedHandleResolver=j4;(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xa,t),r(BT,t),r(ly,t),r(Hc,t),r(dy,t)})(ay);var Rr={},Xc={};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.CLIENT_ASSERTION_TYPE_JWT_BEARER=void 0;Xc.CLIENT_ASSERTION_TYPE_JWT_BEARER="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";var Ti={},cr={};Object.defineProperty(cr,"__esModule",{value:!0});cr.numberPreprocess=cr.jsonObjectPreprocess=void 0;cr.isHostnameIP=U4;cr.isLoopbackHost=IT;cr.isLoopbackUrl=$4;cr.safeUrl=O4;cr.extractUrlPath=K4;function U4(t){return!!(t.match(/^\d+\.\d+\.\d+\.\d+$/)||t.startsWith("[")&&t.endsWith("]"))}function IT(t){return t==="localhost"||t==="127.0.0.1"||t==="[::1]"}function $4(t){const e=typeof t=="string"?new URL(t):t;return IT(e.hostname)}function O4(t){try{return new URL(t)}catch{return null}}function K4(t){const e=t.startsWith("https://")?8:t.startsWith("http://")?7:-1;if(e===-1)throw new TypeError('URL must use the "https:" or "http:" protocol');const r=t.indexOf("#",e),n=t.indexOf("?",e),i=n!==-1&&(r===-1||n<r)?n:-1,o=r===-1?i===-1?t.length:i:i===-1?r:Math.min(r,i),s=t.indexOf("/",e),l=s===-1||s>o?o:s;if(e===l)throw new TypeError("URL must contain a host");return t.substring(l,o)}const V4=t=>{if(typeof t=="string"&&t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t};cr.jsonObjectPreprocess=V4;const M4=t=>{if(typeof t=="string"){const e=Number(t);if(!Number.isNaN(e))return e}return t};cr.numberPreprocess=M4;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.privateUseUriSchema=t.webUriSchema=t.httpsUriSchema=t.loopbackUriSchema=t.dangerousUriSchema=void 0;const e=G,r=cr,n=URL.canParse??(i=>{try{return new URL(i),!0}catch{return!1}});t.dangerousUriSchema=e.z.string().refine(i=>i.includes(":")&&n(i),{message:"Invalid URL"}),t.loopbackUriSchema=t.dangerousUriSchema.superRefine((i,o)=>{if(!i.startsWith("http://"))return o.addIssue({code:e.ZodIssueCode.custom,message:'URL must use the "http:" protocol'}),!1;const s=new URL(i);return(0,r.isLoopbackHost)(s.hostname)?!0:(o.addIssue({code:e.ZodIssueCode.custom,message:'URL must use "localhost", "127.0.0.1" or "[::1]" as hostname'}),!1)}),t.httpsUriSchema=t.dangerousUriSchema.superRefine((i,o)=>{if(!i.startsWith("https://"))return o.addIssue({code:e.ZodIssueCode.custom,message:'URL must use the "https:" protocol'}),!1;const s=new URL(i);if((0,r.isLoopbackHost)(s.hostname))return o.addIssue({code:e.ZodIssueCode.custom,message:"https: URL must not use a loopback host"}),!1;if(!(0,r.isHostnameIP)(s.hostname)){if(!s.hostname.includes("."))return o.addIssue({code:e.ZodIssueCode.custom,message:"Domain name must contain at least two segments"}),!1;if(s.hostname.endsWith(".local"))return o.addIssue({code:e.ZodIssueCode.custom,message:'Domain name must not end with ".local"'}),!1}return!0}),t.webUriSchema=e.z.string().superRefine((i,o)=>{if(i.startsWith("http://")){const s=t.loopbackUriSchema.safeParse(i);return s.success||s.error.issues.forEach(o.addIssue,o),s.success}if(i.startsWith("https://")){const s=t.httpsUriSchema.safeParse(i);return s.success||s.error.issues.forEach(o.addIssue,o),s.success}return o.addIssue({code:e.ZodIssueCode.custom,message:'URL must use the "http:" or "https:" protocol'}),!1}),t.privateUseUriSchema=t.dangerousUriSchema.superRefine((i,o)=>{const s=i.indexOf("."),l=i.indexOf(":");if(s===-1||l===-1||s>l)return o.addIssue({code:e.ZodIssueCode.custom,message:'Private-use URI scheme requires a "." as part of the protocol'}),!1;const u=new URL(i);return u.protocol.includes(".")?u.hostname?(o.addIssue({code:e.ZodIssueCode.custom,message:'Private-use URI schemes must not include a hostname (only one "/" is allowed after the protocol, as per RFC 8252)'}),!1):!0:(o.addIssue({code:e.ZodIssueCode.custom,message:"Invalid private-use URI scheme"}),!1)})})(Ti);var j0={},Bo={},ki={};Object.defineProperty(ki,"__esModule",{value:!0});ki.oauthClientIdSchema=void 0;const N4=G;ki.oauthClientIdSchema=N4.z.string().min(1);var Wa={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.oauthRedirectUriSchema=t.oauthPrivateUseRedirectURISchema=t.oauthHttpsRedirectURISchema=t.oauthLoopbackRedirectURISchema=void 0;const e=G,r=Ti;t.oauthLoopbackRedirectURISchema=r.loopbackUriSchema.superRefine((n,i)=>n.startsWith("http://localhost")?(i.addIssue({code:e.ZodIssueCode.custom,message:'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead'}),!1):!0),t.oauthHttpsRedirectURISchema=r.httpsUriSchema,t.oauthPrivateUseRedirectURISchema=r.privateUseUriSchema,t.oauthRedirectUriSchema=e.z.union([t.oauthLoopbackRedirectURISchema,t.oauthHttpsRedirectURISchema,t.oauthPrivateUseRedirectURISchema],{message:'URL must use the "https:" or "http:" protocol, or a private-use URI scheme (RFC 8252)'})})(Wa);var js={};Object.defineProperty(js,"__esModule",{value:!0});js.oauthScopeSchema=void 0;const z4=G;js.oauthScopeSchema=z4.z.string().regex(/^[\x21\x23-\x5B\x5D-\x7E]+(?: [\x21\x23-\x5B\x5D-\x7E]+)*$/);Object.defineProperty(Bo,"__esModule",{value:!0});Bo.oauthClientIdLoopbackSchema=void 0;Bo.isOAuthClientIdLoopback=X4;Bo.assertOAuthLoopbackClientId=jT;Bo.parseOAuthLoopbackClientId=U0;const F4=G,q4=ki,G4=Wa,H4=js,rs="http://localhost";Bo.oauthClientIdLoopbackSchema=q4.oauthClientIdSchema.superRefine((t,e)=>{try{return jT(t),!0}catch(r){return e.addIssue({code:F4.ZodIssueCode.custom,message:r instanceof TypeError?r.message:"Invalid loopback client ID"}),!1}});function X4(t){try{return U0(t),!0}catch{return!1}}function jT(t){U0(t)}function U0(t){if(t.startsWith(rs)){if(t.includes("#",rs.length))throw new TypeError("Loopback ClientID must not contain a hash component")}else throw new TypeError(`Loopback ClientID must start with "${rs}"`);const e=t.length>rs.length&&t[rs.length]==="/"?rs.length+1:rs.length;if(t.length===e)return{};if(t[e]!=="?")throw new TypeError("Loopback ClientID must not contain a path component");const r=new URLSearchParams(t.slice(e+1));for(const o of r.keys())if(o!=="redirect_uri"&&o!=="scope")throw new TypeError(`Invalid query parameter "${o}" in client ID`);const n=r.get("scope")??void 0;if(n!=null){if(r.getAll("scope").length>1)throw new TypeError("Loopback ClientID must contain at most one scope query parameter");if(!H4.oauthScopeSchema.safeParse(n).success)throw new TypeError("Invalid scope query parameter in client ID")}const i=r.has("redirect_uri")?r.getAll("redirect_uri").map(o=>G4.oauthLoopbackRedirectURISchema.parse(o)):void 0;return{scope:n,redirect_uris:i}}Object.defineProperty(j0,"__esModule",{value:!0});j0.atprotoLoopbackClientMetadata=J4;const W4=Bo;function J4(t){const{scope:e="atproto",redirect_uris:r=["http://127.0.0.1/","http://[::1]/"]}=(0,W4.parseOAuthLoopbackClientId)(t);return{client_id:t,scope:e,redirect_uris:r,response_types:["code"],grant_types:["authorization_code","refresh_token"],token_endpoint_auth_method:"none",application_type:"native",dpop_bound_access_tokens:!0}}var Wc={};Object.defineProperty(Wc,"__esModule",{value:!0});Wc.oauthAccessTokenSchema=void 0;const Z4=G;Wc.oauthAccessTokenSchema=Z4.z.string().min(1);var py={};Object.defineProperty(py,"__esModule",{value:!0});py.oauthAuthenticationErrorResponseSchema=void 0;const Q4=G;py.oauthAuthenticationErrorResponseSchema=Q4.z.enum(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"]);var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});Jc.oauthAuthorizationCodeGrantTokenRequestSchema=void 0;const Ip=G,Y4=Wa;Jc.oauthAuthorizationCodeGrantTokenRequestSchema=Ip.z.object({grant_type:Ip.z.literal("authorization_code"),code:Ip.z.string().min(1),redirect_uri:Y4.oauthRedirectUriSchema,code_verifier:Ip.z.string().min(43).max(128).regex(/^[a-zA-Z0-9-._~]+$/).optional()});var fy={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationDetailsSchema=t.oauthAuthorizationDetailSchema=void 0;const e=G,r=Ti;t.oauthAuthorizationDetailSchema=e.z.object({type:e.z.string(),locations:e.z.array(r.dangerousUriSchema).optional(),actions:e.z.array(e.z.string()).optional(),datatypes:e.z.array(e.z.string()).optional(),identifier:e.z.string().optional(),privileges:e.z.array(e.z.string()).optional()}),t.oauthAuthorizationDetailsSchema=e.z.array(t.oauthAuthorizationDetailSchema)})(fy);var Ja={};Object.defineProperty(Ja,"__esModule",{value:!0});Ja.oauthAuthorizationRequestJarSchema=void 0;const kR=G,LR=Si;Ja.oauthAuthorizationRequestJarSchema=kR.z.object({request:kR.z.union([LR.signedJwtSchema,LR.unsignedJwtSchema])});var hy={},Za={},Zc={};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.oauthCodeChallengeMethodSchema=void 0;const e8=G;Zc.oauthCodeChallengeMethodSchema=e8.z.enum(["S256","plain"]);var Qc={};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.oauthResponseModeSchema=void 0;const t8=G;Qc.oauthResponseModeSchema=t8.z.enum(["query","fragment","form_post"]);var Qa={};Object.defineProperty(Qa,"__esModule",{value:!0});Qa.oauthResponseTypeSchema=void 0;const r8=G;Qa.oauthResponseTypeSchema=r8.z.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"]);var Yc={};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.oidcClaimsParameterSchema=void 0;const n8=G;Yc.oidcClaimsParameterSchema=n8.z.enum(["auth_time","nonce","acr","name","family_name","given_name","middle_name","nickname","preferred_username","gender","picture","profile","website","birthdate","zoneinfo","locale","updated_at","email","email_verified","phone_number","phone_number_verified","address"]);var ed={};Object.defineProperty(ed,"__esModule",{value:!0});ed.oidcClaimsPropertiesSchema=void 0;const ms=G,PR=ms.z.union([ms.z.string(),ms.z.number(),ms.z.boolean()]);ed.oidcClaimsPropertiesSchema=ms.z.object({essential:ms.z.boolean().optional(),value:PR.optional(),values:ms.z.array(PR).optional()});var td={};Object.defineProperty(td,"__esModule",{value:!0});td.oidcEntityTypeSchema=void 0;const i8=G;td.oidcEntityTypeSchema=i8.z.enum(["userinfo","id_token"]);Object.defineProperty(Za,"__esModule",{value:!0});Za.oauthAuthorizationRequestParametersSchema=void 0;const Et=G,o8=Si,s8=fy,a8=ki,l8=Zc,u8=Wa,c8=Qc,d8=Qa,p8=js,f8=Yc,h8=ed,y8=td,_g=cr;Za.oauthAuthorizationRequestParametersSchema=Et.z.object({client_id:a8.oauthClientIdSchema,state:Et.z.string().optional(),redirect_uri:u8.oauthRedirectUriSchema.optional(),scope:p8.oauthScopeSchema.optional(),response_type:d8.oauthResponseTypeSchema,code_challenge:Et.z.string().optional(),code_challenge_method:l8.oauthCodeChallengeMethodSchema.optional(),dpop_jkt:Et.z.string().optional(),response_mode:c8.oauthResponseModeSchema.optional(),nonce:Et.z.string().optional(),max_age:Et.z.preprocess(_g.numberPreprocess,Et.z.number().int().min(0)).optional(),claims:Et.z.preprocess(_g.jsonObjectPreprocess,Et.z.record(y8.oidcEntityTypeSchema,Et.z.record(f8.oidcClaimsParameterSchema,Et.z.union([Et.z.literal(null),h8.oidcClaimsPropertiesSchema])))).optional(),login_hint:Et.z.string().min(1).optional(),ui_locales:Et.z.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?( [a-z]{2,3}(-[A-Z]{2})?)*$/).optional(),id_token_hint:o8.signedJwtSchema.optional(),display:Et.z.enum(["page","popup","touch","wap"]).optional(),prompt:Et.z.enum(["none","login","consent","select_account"]).optional(),authorization_details:Et.z.preprocess(_g.jsonObjectPreprocess,s8.oauthAuthorizationDetailsSchema).optional()});Object.defineProperty(hy,"__esModule",{value:!0});hy.oauthAuthorizationRequestParSchema=void 0;const m8=G,g8=Ja,b8=Za;hy.oauthAuthorizationRequestParSchema=m8.z.union([b8.oauthAuthorizationRequestParametersSchema,g8.oauthAuthorizationRequestJarSchema]);var yy={},rd={},nd={};Object.defineProperty(nd,"__esModule",{value:!0});nd.oauthRequestUriSchema=void 0;const v8=G;nd.oauthRequestUriSchema=v8.z.string();Object.defineProperty(rd,"__esModule",{value:!0});rd.oauthAuthorizationRequestUriSchema=void 0;const E8=G,w8=nd;rd.oauthAuthorizationRequestUriSchema=E8.z.object({request_uri:w8.oauthRequestUriSchema});Object.defineProperty(yy,"__esModule",{value:!0});yy.oauthAuthorizationRequestQuerySchema=void 0;const _8=G,x8=Ja,R8=Za,A8=rd;yy.oauthAuthorizationRequestQuerySchema=_8.z.union([R8.oauthAuthorizationRequestParametersSchema,x8.oauthAuthorizationRequestJarSchema,A8.oauthAuthorizationRequestUriSchema]);var UT={},Ya={};Object.defineProperty(Ya,"__esModule",{value:!0});Ya.oauthIssuerIdentifierSchema=void 0;const jp=G,S8=Ti;Ya.oauthIssuerIdentifierSchema=S8.webUriSchema.superRefine((t,e)=>{if(t.endsWith("/"))return e.addIssue({code:jp.z.ZodIssueCode.custom,message:"Issuer URL must not end with a slash"}),!1;const r=new URL(t);if(r.username||r.password)return e.addIssue({code:jp.z.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),!1;if(r.hash||r.search)return e.addIssue({code:jp.z.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"}),!1;const n=r.pathname==="/"?r.origin:r.href;return t!==n?(e.addIssue({code:jp.z.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"}),!1):!0});(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.oauthAuthorizationServerMetadataValidator=t.oauthAuthorizationServerMetadataSchema=void 0;const e=G,r=Zc,n=Ya,i=Ti;t.oauthAuthorizationServerMetadataSchema=e.z.object({issuer:n.oauthIssuerIdentifierSchema,claims_supported:e.z.array(e.z.string()).optional(),claims_locales_supported:e.z.array(e.z.string()).optional(),claims_parameter_supported:e.z.boolean().optional(),request_parameter_supported:e.z.boolean().optional(),request_uri_parameter_supported:e.z.boolean().optional(),require_request_uri_registration:e.z.boolean().optional(),scopes_supported:e.z.array(e.z.string()).optional(),subject_types_supported:e.z.array(e.z.string()).optional(),response_types_supported:e.z.array(e.z.string()).optional(),response_modes_supported:e.z.array(e.z.string()).optional(),grant_types_supported:e.z.array(e.z.string()).optional(),code_challenge_methods_supported:e.z.array(r.oauthCodeChallengeMethodSchema).min(1).optional(),ui_locales_supported:e.z.array(e.z.string()).optional(),id_token_signing_alg_values_supported:e.z.array(e.z.string()).optional(),display_values_supported:e.z.array(e.z.string()).optional(),request_object_signing_alg_values_supported:e.z.array(e.z.string()).optional(),authorization_response_iss_parameter_supported:e.z.boolean().optional(),authorization_details_types_supported:e.z.array(e.z.string()).optional(),request_object_encryption_alg_values_supported:e.z.array(e.z.string()).optional(),request_object_encryption_enc_values_supported:e.z.array(e.z.string()).optional(),jwks_uri:i.webUriSchema.optional(),authorization_endpoint:i.webUriSchema,token_endpoint:i.webUriSchema,token_endpoint_auth_methods_supported:e.z.array(e.z.string()).default(["client_secret_basic"]),token_endpoint_auth_signing_alg_values_supported:e.z.array(e.z.string()).optional(),revocation_endpoint:i.webUriSchema.optional(),introspection_endpoint:i.webUriSchema.optional(),pushed_authorization_request_endpoint:i.webUriSchema.optional(),require_pushed_authorization_requests:e.z.boolean().optional(),userinfo_endpoint:i.webUriSchema.optional(),end_session_endpoint:i.webUriSchema.optional(),registration_endpoint:i.webUriSchema.optional(),dpop_signing_alg_values_supported:e.z.array(e.z.string()).optional(),protected_resources:e.z.array(i.webUriSchema).optional(),client_id_metadata_document_supported:e.z.boolean().optional()}),t.oauthAuthorizationServerMetadataValidator=t.oauthAuthorizationServerMetadataSchema.superRefine((o,s)=>{o.require_pushed_authorization_requests&&!o.pushed_authorization_request_endpoint&&s.addIssue({code:e.z.ZodIssueCode.custom,message:'"pushed_authorization_request_endpoint" required when "require_pushed_authorization_requests" is true'})}).superRefine((o,s)=>{o.response_types_supported&&(o.response_types_supported.includes("code")||s.addIssue({code:e.z.ZodIssueCode.custom,message:'Response type "code" is required'}))}).superRefine((o,s)=>{var l;(l=o.token_endpoint_auth_signing_alg_values_supported)!=null&&l.includes("none")&&s.addIssue({code:e.z.ZodIssueCode.custom,message:'Client authentication method "none" is not allowed'})})})(UT);var id={};Object.defineProperty(id,"__esModule",{value:!0});id.oauthClientCredentialsGrantTokenRequestSchema=void 0;const DR=G;id.oauthClientCredentialsGrantTokenRequestSchema=DR.z.object({grant_type:DR.z.literal("client_credentials")});var $T={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.oauthClientCredentialsSchema=t.oauthClientCredentialsNoneSchema=t.oauthClientCredentialsSecretPostSchema=t.oauthClientCredentialsJwtBearerSchema=void 0;const e=G,r=Si,n=Xc,i=ki;t.oauthClientCredentialsJwtBearerSchema=e.z.object({client_id:i.oauthClientIdSchema,client_assertion_type:e.z.literal(n.CLIENT_ASSERTION_TYPE_JWT_BEARER),client_assertion:r.signedJwtSchema}),t.oauthClientCredentialsSecretPostSchema=e.z.object({client_id:i.oauthClientIdSchema,client_secret:e.z.string()}),t.oauthClientCredentialsNoneSchema=e.z.object({client_id:i.oauthClientIdSchema}),t.oauthClientCredentialsSchema=e.z.union([t.oauthClientCredentialsJwtBearerSchema,t.oauthClientCredentialsSecretPostSchema,t.oauthClientCredentialsNoneSchema])})($T);var OT={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.conventionalOAuthClientIdSchema=t.oauthClientIdDiscoverableSchema=void 0,t.isOAuthClientIdDiscoverable=o,t.isConventionalOAuthClientId=s,t.assertOAuthDiscoverableClientId=l,t.parseOAuthDiscoverableClientId=u;const e=G,r=ki,n=Ti,i=cr;t.oauthClientIdDiscoverableSchema=e.z.intersection(r.oauthClientIdSchema,n.httpsUriSchema).superRefine((c,d)=>{const f=new URL(c);return f.username||f.password?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID must not contain credentials"}),!1):f.hash?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID must not contain a fragment"}),!1):f.pathname==="/"?(d.addIssue({code:e.z.ZodIssueCode.custom,message:'ClientID must contain a path component (e.g. "/client-metadata.json")'}),!1):f.pathname.endsWith("/")?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID path must not end with a trailing slash"}),!1):(0,i.isHostnameIP)(f.hostname)?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID hostname must not be an IP address"}),!1):(0,i.extractUrlPath)(c)!==f.pathname?(d.addIssue({code:e.z.ZodIssueCode.custom,message:`ClientID must be in canonical form ("${f.href}", got "${c}")`}),!1):!0});function o(c){return t.oauthClientIdDiscoverableSchema.safeParse(c).success}t.conventionalOAuthClientIdSchema=t.oauthClientIdDiscoverableSchema.superRefine((c,d)=>{const f=new URL(c);return f.port?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID must not contain a port"}),!1):f.search?(d.addIssue({code:e.z.ZodIssueCode.custom,message:"ClientID must not contain a query string"}),!1):f.pathname!=="/oauth-client-metadata.json"?(d.addIssue({code:e.z.ZodIssueCode.custom,message:'ClientID must be "/oauth-client-metadata.json"'}),!1):!0});function s(c){return t.conventionalOAuthClientIdSchema.safeParse(c).success}function l(c){t.oauthClientIdDiscoverableSchema.parse(c)}function u(c){return new URL(t.oauthClientIdDiscoverableSchema.parse(c))}})(OT);var my={},od={};Object.defineProperty(od,"__esModule",{value:!0});od.oauthEndpointAuthMethod=void 0;const C8=G;od.oauthEndpointAuthMethod=C8.z.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]);var sd={};Object.defineProperty(sd,"__esModule",{value:!0});sd.oauthGrantTypeSchema=void 0;const T8=G;sd.oauthGrantTypeSchema=T8.z.enum(["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:ietf:params:oauth:grant-type:saml2-bearer"]);Object.defineProperty(my,"__esModule",{value:!0});my.oauthClientMetadataSchema=void 0;const je=G,k8=Si,L8=ki,P8=od,D8=sd,B8=Wa,I8=Qa,j8=js,gu=Ti;my.oauthClientMetadataSchema=je.z.object({redirect_uris:je.z.array(B8.oauthRedirectUriSchema).nonempty(),response_types:je.z.array(I8.oauthResponseTypeSchema).nonempty().default(["code"]),grant_types:je.z.array(D8.oauthGrantTypeSchema).nonempty().default(["authorization_code"]),scope:j8.oauthScopeSchema.optional(),token_endpoint_auth_method:P8.oauthEndpointAuthMethod.default("client_secret_basic"),token_endpoint_auth_signing_alg:je.z.string().optional(),userinfo_signed_response_alg:je.z.string().optional(),userinfo_encrypted_response_alg:je.z.string().optional(),jwks_uri:gu.webUriSchema.optional(),jwks:k8.jwksPubSchema.optional(),application_type:je.z.enum(["web","native"]).default("web"),subject_type:je.z.enum(["public","pairwise"]).default("public"),request_object_signing_alg:je.z.string().optional(),id_token_signed_response_alg:je.z.string().optional(),authorization_signed_response_alg:je.z.string().default("RS256"),authorization_encrypted_response_enc:je.z.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:je.z.string().optional(),client_id:L8.oauthClientIdSchema.optional(),client_name:je.z.string().optional(),client_uri:gu.webUriSchema.optional(),policy_uri:gu.webUriSchema.optional(),tos_uri:gu.webUriSchema.optional(),logo_uri:gu.webUriSchema.optional(),default_max_age:je.z.number().optional(),require_auth_time:je.z.boolean().optional(),contacts:je.z.array(je.z.string().email()).optional(),tls_client_certificate_bound_access_tokens:je.z.boolean().optional(),dpop_bound_access_tokens:je.z.boolean().optional(),authorization_details_types:je.z.array(je.z.string()).optional()});var gy={};Object.defineProperty(gy,"__esModule",{value:!0});gy.OAUTH_ENDPOINT_NAMES=void 0;gy.OAUTH_ENDPOINT_NAMES=["token","revocation","introspection","pushed_authorization_request"];var KT={};Object.defineProperty(KT,"__esModule",{value:!0});var by={};Object.defineProperty(by,"__esModule",{value:!0});by.oauthParResponseSchema=void 0;const xg=G;by.oauthParResponseSchema=xg.z.object({request_uri:xg.z.string(),expires_in:xg.z.number().int().positive()});var ad={};Object.defineProperty(ad,"__esModule",{value:!0});ad.oauthPasswordGrantTokenRequestSchema=void 0;const Up=G;ad.oauthPasswordGrantTokenRequestSchema=Up.z.object({grant_type:Up.z.literal("password"),username:Up.z.string(),password:Up.z.string()});var vy={};Object.defineProperty(vy,"__esModule",{value:!0});vy.oauthProtectedResourceMetadataSchema=void 0;const Ii=G,U8=Ya,bu=Ti;vy.oauthProtectedResourceMetadataSchema=Ii.z.object({resource:bu.webUriSchema.refine(t=>!t.includes("?"),{message:"Resource URL must not contain query parameters"}).refine(t=>!t.includes("#"),{message:"Resource URL must not contain a fragment"}),authorization_servers:Ii.z.array(U8.oauthIssuerIdentifierSchema).optional(),jwks_uri:bu.webUriSchema.optional(),scopes_supported:Ii.z.array(Ii.z.string()).optional(),bearer_methods_supported:Ii.z.array(Ii.z.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:Ii.z.array(Ii.z.string()).optional(),resource_documentation:bu.webUriSchema.optional(),resource_policy_uri:bu.webUriSchema.optional(),resource_tos_uri:bu.webUriSchema.optional()});var ld={},el={};Object.defineProperty(el,"__esModule",{value:!0});el.oauthRefreshTokenSchema=void 0;const $8=G;el.oauthRefreshTokenSchema=$8.z.string().min(1);Object.defineProperty(ld,"__esModule",{value:!0});ld.oauthRefreshTokenGrantTokenRequestSchema=void 0;const BR=G,O8=el;ld.oauthRefreshTokenGrantTokenRequestSchema=BR.z.object({grant_type:BR.z.literal("refresh_token"),refresh_token:O8.oauthRefreshTokenSchema});var Ey={};Object.defineProperty(Ey,"__esModule",{value:!0});Ey.oauthTokenIdentificationSchema=void 0;const Rg=G,K8=Wc,V8=el;Ey.oauthTokenIdentificationSchema=Rg.z.object({token:Rg.z.union([K8.oauthAccessTokenSchema,V8.oauthRefreshTokenSchema]),token_type_hint:Rg.z.enum(["access_token","refresh_token"]).optional()});var wy={};Object.defineProperty(wy,"__esModule",{value:!0});wy.oauthTokenRequestSchema=void 0;const M8=G,N8=Jc,z8=id,F8=ad,q8=ld;wy.oauthTokenRequestSchema=M8.z.discriminatedUnion("grant_type",[N8.oauthAuthorizationCodeGrantTokenRequestSchema,q8.oauthRefreshTokenGrantTokenRequestSchema,F8.oauthPasswordGrantTokenRequestSchema,z8.oauthClientCredentialsGrantTokenRequestSchema]);var _y={},ud={};Object.defineProperty(ud,"__esModule",{value:!0});ud.oauthTokenTypeSchema=void 0;const Ag=G;ud.oauthTokenTypeSchema=Ag.z.union([Ag.z.string().regex(/^DPoP$/i).transform(()=>"DPoP"),Ag.z.string().regex(/^Bearer$/i).transform(()=>"Bearer")]);Object.defineProperty(_y,"__esModule",{value:!0});_y.oauthTokenResponseSchema=void 0;const vu=G,G8=Si,H8=fy,X8=ud;_y.oauthTokenResponseSchema=vu.z.object({access_token:vu.z.string(),token_type:X8.oauthTokenTypeSchema,scope:vu.z.string().optional(),refresh_token:vu.z.string().optional(),expires_in:vu.z.number().optional(),id_token:G8.signedJwtSchema.optional(),authorization_details:H8.oauthAuthorizationDetailsSchema.optional()}).passthrough();var xy={};Object.defineProperty(xy,"__esModule",{value:!0});xy.oidcAuthenticationErrorResponseSchema=void 0;const W8=G;xy.oidcAuthenticationErrorResponseSchema=W8.z.enum(["interaction_required","login_required","account_selection_required","consent_required","invalid_request_uri","invalid_request_object","request_not_supported","request_uri_not_supported","registration_not_supported"]);var Ry={};Object.defineProperty(Ry,"__esModule",{value:!0});Ry.oidcUserinfoSchema=void 0;const Cr=G;Ry.oidcUserinfoSchema=Cr.z.object({sub:Cr.z.string(),iss:Cr.z.string().url().optional(),aud:Cr.z.union([Cr.z.string(),Cr.z.array(Cr.z.string()).min(1)]).optional(),email:Cr.z.string().email().optional(),email_verified:Cr.z.boolean().optional(),name:Cr.z.string().optional(),preferred_username:Cr.z.string().optional(),picture:Cr.z.string().url().optional()});(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xc,t),r(Ti,t),r(cr,t),r(j0,t),r(Wc,t),r(py,t),r(Jc,t),r(fy,t),r(Ja,t),r(hy,t),r(Za,t),r(yy,t),r(rd,t),r(UT,t),r(id,t),r($T,t),r(OT,t),r(Bo,t),r(ki,t),r(my,t),r(od,t),r(gy,t),r(sd,t),r(KT,t),r(Ya,t),r(by,t),r(ad,t),r(vy,t),r(Wa,t),r(ld,t),r(el,t),r(nd,t),r(Qc,t),r(Qa,t),r(js,t),r(Ey,t),r(wy,t),r(_y,t),r(ud,t),r(xy,t),r(Yc,t),r(ed,t),r(td,t),r(Ry,t)})(Rr);var cd={},Io={};(function(t){var e=S&&S.__classPrivateFieldSet||function(c,d,f,h,g){if(h==="m")throw new TypeError("Private method is not writable");if(h==="a"&&!g)throw new TypeError("Private accessor was defined without a setter");if(typeof d=="function"?c!==d||!g:!d.has(c))throw new TypeError("Cannot write private member to an object whose class did not declare it");return h==="a"?g.call(c,f):g?g.value=f:d.set(c,f),f},r=S&&S.__classPrivateFieldGet||function(c,d,f,h){if(f==="a"&&!h)throw new TypeError("Private accessor was defined without a getter");if(typeof d=="function"?c!==d||!h:!d.has(c))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?h:f==="a"?h.call(c):h?h.value:d.get(c)};Object.defineProperty(t,"__esModule",{value:!0}),t.includesSpaceSeparatedValue=t.CustomEventTarget=t.CustomEvent=t.timeoutSignal=t.ifString=void 0,t.contentMime=o,t.combineSignals=u,Symbol.dispose??(Symbol.dispose=Symbol("@@dispose"));const n=c=>typeof c=="string"?c:void 0;t.ifString=n;const i=(c,d)=>{var b,w,C;if(!Number.isInteger(c)||c<0)throw new TypeError("Expected a positive integer");(b=d==null?void 0:d.signal)==null||b.throwIfAborted();const f=new AbortController,{signal:h}=f;(w=d==null?void 0:d.signal)==null||w.addEventListener("abort",y=>f.abort(y),{once:!0,signal:h});const g=setTimeout(y=>f.abort(y),c,new Error("Timeout"));return(C=g==null?void 0:g.unref)==null||C.call(g),h.addEventListener("abort",()=>clearTimeout(g),{once:!0,signal:h}),Object.defineProperty(h,Symbol.dispose,{value:()=>f.abort()}),h};t.timeoutSignal=i;function o(c){var d;return(d=c.get("content-type"))==null?void 0:d.split(";")[0].trim()}t.CustomEvent=globalThis.CustomEvent??(()=>{var c;class d extends Event{constructor(h,g){if(!arguments.length)throw new TypeError("type argument is required");super(h,g),c.set(this,void 0),e(this,c,(g==null?void 0:g.detail)??null,"f")}get detail(){return r(this,c,"f")}}return c=new WeakMap,Object.defineProperties(d.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:"CustomEvent"},detail:{enumerable:!0}}),d})();class s{constructor(){Object.defineProperty(this,"eventTarget",{enumerable:!0,configurable:!0,writable:!0,value:new EventTarget})}addEventListener(d,f,h){this.eventTarget.addEventListener(d,f,h)}removeEventListener(d,f,h){this.eventTarget.removeEventListener(d,f,h)}dispatchCustomEvent(d,f,h){return this.eventTarget.dispatchEvent(new t.CustomEvent(d,{...h,detail:f}))}}t.CustomEventTarget=s;const l=(c,d)=>{if(d.length===0)throw new TypeError("Value cannot be empty");if(d.includes(" "))throw new TypeError("Value cannot contain spaces");const f=c.length,h=d.length;if(f<h)return!1;let g=c.indexOf(d),b;for(;g!==-1;){if(b=g+h,(g===0||c[g-1]===" ")&&(b===f||c[b]===" "))return!0;g=c.indexOf(d,b+1)}return!1};t.includesSpaceSeparatedValue=l;function u(c){const d=new AbortController,f=function(h){const g=new Error("This operation was aborted",{cause:this.reason});d.abort(g)};for(const h of c)if(h){if(h.aborted)throw d.abort(),new Error("One of the signals is already aborted",{cause:h.reason});h.addEventListener("abort",f,{signal:d.signal})}return d[Symbol.dispose]=()=>{const h=new Error("AbortController was disposed");d.abort(h)},d}})(Io);Object.defineProperty(cd,"__esModule",{value:!0});cd.OAuthAuthorizationServerMetadataResolver=void 0;const IR=Rr,Eu=Mn,J8=za,Z8=Io;class Q8 extends J8.CachedGetter{constructor(e,r,n){super(async(i,o)=>this.fetchMetadata(i,o),e),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowHttpIssuer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=(0,Eu.bindFetch)(r),this.allowHttpIssuer=(n==null?void 0:n.allowHttpIssuer)===!0}async get(e,r){const n=IR.oauthIssuerIdentifierSchema.parse(e);if(!this.allowHttpIssuer&&n.startsWith("http:"))throw new TypeError("Unsecure issuer URL protocol only allowed in development and test environments");return super.get(n,r)}async fetchMetadata(e,r){const n=new URL("/.well-known/oauth-authorization-server",e),i=new Request(n,{headers:{accept:"application/json"},cache:r!=null&&r.noCache?"no-cache":void 0,signal:r==null?void 0:r.signal,redirect:"manual"}),o=await this.fetch(i);if(o.status!==200)throw await(0,Eu.cancelBody)(o,"log"),await Eu.FetchResponseError.from(o,`Unexpected status code ${o.status} for "${n}"`,void 0,{cause:i});if((0,Z8.contentMime)(o.headers)!=="application/json")throw await(0,Eu.cancelBody)(o,"log"),await Eu.FetchResponseError.from(o,`Unexpected content type for "${n}"`,void 0,{cause:i});const s=IR.oauthAuthorizationServerMetadataValidator.parse(await o.json());if(s.issuer!==e)throw new TypeError(`Invalid issuer ${s.issuer}`);if(s.client_id_metadata_document_supported!==!0)throw new TypeError(`Authorization server "${e}" does not support client_id_metadata_document`);return s}}cd.OAuthAuthorizationServerMetadataResolver=Q8;var dd={};Object.defineProperty(dd,"__esModule",{value:!0});dd.OAuthCallbackError=void 0;class ch extends Error{static from(e,r,n){if(e instanceof ch)return e;const i=e instanceof Error?e.message:void 0;return new ch(r,i,n,e)}constructor(e,r=e.get("error_description")||"OAuth callback error",n,i){super(r,{cause:i}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:n})}}dd.OAuthCallbackError=ch;var Ay={},VT={},Sy={},jo={},$0={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DisallowedDomainError=t.UnsupportedDomainError=t.ReservedHandleError=t.InvalidHandleError=t.isValidTld=t.isValidHandle=t.normalizeAndEnsureValidHandle=t.normalizeHandle=t.ensureValidHandleRegex=t.ensureValidHandle=t.DISALLOWED_TLDS=t.INVALID_HANDLE=void 0,t.INVALID_HANDLE="handle.invalid",t.DISALLOWED_TLDS=[".local",".arpa",".invalid",".localhost",".internal",".example",".alt",".onion"];const e=f=>{if(!/^[a-zA-Z0-9.-]*$/.test(f))throw new l("Disallowed characters in handle (ASCII letters, digits, dashes, periods only)");if(f.length>253)throw new l("Handle is too long (253 chars max)");const h=f.split(".");if(h.length<2)throw new l("Handle domain needs at least two parts");for(let g=0;g<h.length;g++){const b=h[g];if(b.length<1)throw new l("Handle parts can not be empty");if(b.length>63)throw new l("Handle part too long (max 63 chars)");if(b.endsWith("-")||b.startsWith("-"))throw new l("Handle parts can not start or end with hyphens");if(g+1===h.length&&!/^[a-zA-Z]/.test(b))throw new l("Handle final component (TLD) must start with ASCII letter")}};t.ensureValidHandle=e;const r=f=>{if(!/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/.test(f))throw new l("Handle didn't validate via regex");if(f.length>253)throw new l("Handle is too long (253 chars max)")};t.ensureValidHandleRegex=r;const n=f=>f.toLowerCase();t.normalizeHandle=n;const i=f=>{const h=(0,t.normalizeHandle)(f);return(0,t.ensureValidHandle)(h),h};t.normalizeAndEnsureValidHandle=i;const o=f=>{try{(0,t.ensureValidHandle)(f)}catch(h){if(h instanceof l)return!1;throw h}return!0};t.isValidHandle=o;const s=f=>!t.DISALLOWED_TLDS.some(h=>f.endsWith(h));t.isValidTld=s;class l extends Error{}t.InvalidHandleError=l;class u extends Error{}t.ReservedHandleError=u;class c extends Error{}t.UnsupportedDomainError=c;class d extends Error{}t.DisallowedDomainError=d})($0);var gi={};Object.defineProperty(gi,"__esModule",{value:!0});gi.InvalidDidError=gi.ensureValidDidRegex=gi.ensureValidDid=void 0;const Y8=t=>{if(!t.startsWith("did:"))throw new ui('DID requires "did:" prefix');if(!/^[a-zA-Z0-9._:%-]*$/.test(t))throw new ui("Disallowed characters in DID (ASCII letters, digits, and a couple other characters only)");const{length:e,1:r}=t.split(":");if(e<3)throw new ui("DID requires prefix, method, and method-specific content");if(!/^[a-z]+$/.test(r))throw new ui("DID method must be lower-case letters");if(t.endsWith(":")||t.endsWith("%"))throw new ui('DID can not end with ":" or "%"');if(t.length>2*1024)throw new ui("DID is too long (2048 chars max)")};gi.ensureValidDid=Y8;const e5=t=>{if(!/^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$/.test(t))throw new ui("DID didn't validate via regex");if(t.length>2*1024)throw new ui("DID is too long (2048 chars max)")};gi.ensureValidDidRegex=e5;class ui extends Error{}gi.InvalidDidError=ui;var O0={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidNsidError=t.ensureValidNsidRegex=t.ensureValidNsid=t.NSID=void 0;class e{static parse(s){return new e(s)}static create(s,l){const u=[...s.split(".").reverse(),l].join(".");return new e(u)}static isValid(s){try{return e.parse(s),!0}catch{return!1}}constructor(s){Object.defineProperty(this,"segments",{enumerable:!0,configurable:!0,writable:!0,value:[]}),(0,t.ensureValidNsid)(s),this.segments=s.split(".")}get authority(){return this.segments.slice(0,this.segments.length-1).reverse().join(".")}get name(){return this.segments.at(this.segments.length-1)}toString(){return this.segments.join(".")}}t.NSID=e;const r=o=>{const s=o;if(!/^[a-zA-Z0-9.-]*$/.test(s))throw new i("Disallowed characters in NSID (ASCII letters, digits, dashes, periods only)");if(s.length>317)throw new i("NSID is too long (317 chars max)");const l=s.split(".");if(l.length<3)throw new i("NSID needs at least three parts");for(let u=0;u<l.length;u++){const c=l[u];if(c.length<1)throw new i("NSID parts can not be empty");if(c.length>63)throw new i("NSID part too long (max 63 chars)");if(c.endsWith("-")||c.startsWith("-"))throw new i("NSID parts can not start or end with hyphen");if(/^[0-9]/.test(c)&&u===0)throw new i("NSID first part may not start with a digit");if(!/^[a-zA-Z][a-zA-Z0-9]*$/.test(c)&&u+1===l.length)throw new i("NSID name part must be only letters and digits (and no leading digit)")}};t.ensureValidNsid=r;const n=o=>{if(!/^[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(\.[a-zA-Z]([a-zA-Z0-9]{0,62})?)$/.test(o))throw new i("NSID didn't validate via regex");if(o.length>317)throw new i("NSID is too long (317 chars max)")};t.ensureValidNsidRegex=n;class i extends Error{}t.InvalidNsidError=i})(O0);var MT={},Ia={};Object.defineProperty(Ia,"__esModule",{value:!0});Ia.ensureValidAtUriRegex=Ia.ensureValidAtUri=void 0;const NT=gi,zT=$0,FT=O0,t5=t=>{const e=t.split("#");if(e.length>2)throw new Error('ATURI can have at most one "#", separating fragment out');const r=e[1]||null;if(t=e[0],!/^[a-zA-Z0-9._~:@!$&')(*+,;=%/-]*$/.test(t))throw new Error("Disallowed characters in ATURI (ASCII)");const n=t.split("/");if(n.length>=3&&(n[0]!=="at:"||n[1].length!==0))throw new Error('ATURI must start with "at://"');if(n.length<3)throw new Error("ATURI requires at least method and authority sections");try{n[2].startsWith("did:")?(0,NT.ensureValidDid)(n[2]):(0,zT.ensureValidHandle)(n[2])}catch{throw new Error("ATURI authority must be a valid handle or DID")}if(n.length>=4){if(n[3].length===0)throw new Error("ATURI can not have a slash after authority without a path segment");try{(0,FT.ensureValidNsid)(n[3])}catch{throw new Error("ATURI requires first path segment (if supplied) to be valid NSID")}}if(n.length>=5&&n[4].length===0)throw new Error("ATURI can not have a slash after collection, unless record key is provided");if(n.length>=6)throw new Error("ATURI path can have at most two parts, and no trailing slash");if(e.length>=2&&r==null)throw new Error("ATURI fragment must be non-empty and start with slash");if(r!=null){if(r.length===0||r[0]!=="/")throw new Error("ATURI fragment must be non-empty and start with slash");if(!/^\/[a-zA-Z0-9._~:@!$&')(*+,;=%[\]/-]*$/.test(r))throw new Error("Disallowed characters in ATURI fragment (ASCII)")}if(t.length>8*1024)throw new Error("ATURI is far too long")};Ia.ensureValidAtUri=t5;const r5=t=>{const e=/^at:\/\/(?<authority>[a-zA-Z0-9._:%-]+)(\/(?<collection>[a-zA-Z0-9-.]+)(\/(?<rkey>[a-zA-Z0-9._~:@!$&%')(*+,;=-]+))?)?(#(?<fragment>\/[a-zA-Z0-9._~:@!$&%')(*+,;=\-[\]/\\]*))?$/,r=t.match(e);if(!r||!r.groups)throw new Error("ATURI didn't validate via regex");const n=r.groups;try{(0,zT.ensureValidHandleRegex)(n.authority)}catch{try{(0,NT.ensureValidDidRegex)(n.authority)}catch{throw new Error("ATURI authority must be a valid handle or DID")}}if(n.collection)try{(0,FT.ensureValidNsidRegex)(n.collection)}catch{throw new Error("ATURI collection path segment must be a valid NSID")}if(t.length>8*1024)throw new Error("ATURI is far too long")};Ia.ensureValidAtUriRegex=r5;(function(t){var e=S&&S.__createBinding||(Object.create?function(l,u,c,d){d===void 0&&(d=c);var f=Object.getOwnPropertyDescriptor(u,c);(!f||("get"in f?!u.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(l,d,f)}:function(l,u,c,d){d===void 0&&(d=c),l[d]=u[c]}),r=S&&S.__exportStar||function(l,u){for(var c in l)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&e(u,l,c)};Object.defineProperty(t,"__esModule",{value:!0}),t.AtUri=t.ATP_URI_REGEX=void 0,r(Ia,t),t.ATP_URI_REGEX=/^(at:\/\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z0-9][a-z0-9.:-]*))(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;const n=/^(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;class i{constructor(u,c){Object.defineProperty(this,"hash",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"host",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathname",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"searchParams",{enumerable:!0,configurable:!0,writable:!0,value:void 0});let d;if(c){if(d=o(c),!d)throw new Error(`Invalid at uri: ${c}`);const f=s(u);if(!f)throw new Error(`Invalid path: ${u}`);Object.assign(d,f)}else if(d=o(u),!d)throw new Error(`Invalid at uri: ${u}`);this.hash=d.hash,this.host=d.host,this.pathname=d.pathname,this.searchParams=d.searchParams}static make(u,c,d){let f=u;return c&&(f+="/"+c),d&&(f+="/"+d),new i(f)}get protocol(){return"at:"}get origin(){return`at://${this.host}`}get hostname(){return this.host}set hostname(u){this.host=u}get search(){return this.searchParams.toString()}set search(u){this.searchParams=new URLSearchParams(u)}get collection(){return this.pathname.split("/").filter(Boolean)[0]||""}set collection(u){const c=this.pathname.split("/").filter(Boolean);c[0]=u,this.pathname=c.join("/")}get rkey(){return this.pathname.split("/").filter(Boolean)[1]||""}set rkey(u){const c=this.pathname.split("/").filter(Boolean);c[0]||(c[0]="undefined"),c[1]=u,this.pathname=c.join("/")}get href(){return this.toString()}toString(){let u=this.pathname||"/";u.startsWith("/")||(u=`/${u}`);let c=this.searchParams.toString();c&&!c.startsWith("?")&&(c=`?${c}`);let d=this.hash;return d&&!d.startsWith("#")&&(d=`#${d}`),`at://${this.host}${u}${c}${d}`}}t.AtUri=i;function o(l){const u=t.ATP_URI_REGEX.exec(l);if(u)return{hash:u[5]||"",host:u[2]||"",pathname:u[3]||"",searchParams:new URLSearchParams(u[4]||"")}}function s(l){const u=n.exec(l);if(u)return{hash:u[3]||"",pathname:u[1]||"",searchParams:new URLSearchParams(u[2]||"")}}})(MT);var co={};Object.defineProperty(co,"__esModule",{value:!0});co.InvalidTidError=co.isValidTid=co.ensureValidTid=void 0;const ov=13,qT=/^[234567abcdefghij][234567abcdefghijklmnopqrstuvwxyz]{12}$/,n5=t=>{if(t.length!==ov)throw new sv(`TID must be ${ov} characters`);if(!qT.test(t))throw new sv("TID syntax not valid (regex)")};co.ensureValidTid=n5;const i5=t=>t.length===ov&&qT.test(t);co.isValidTid=i5;class sv extends Error{}co.InvalidTidError=sv;var GT={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidRecordKeyError=t.isValidRecordKey=t.ensureValidRecordKey=void 0;const e=i=>{if(i.length>512||i.length<1)throw new n("record key must be 1 to 512 characters");if(!/^[a-zA-Z0-9_~.:-]{1,512}$/.test(i))throw new n("record key syntax not valid (regex)");if(i==="."||i==="..")throw new n('record key can not be "." or ".."')};t.ensureValidRecordKey=e;const r=i=>{try{(0,t.ensureValidRecordKey)(i)}catch(o){if(o instanceof n)return!1;throw o}return!0};t.isValidRecordKey=r;class n extends Error{}t.InvalidRecordKeyError=n})(GT);var HT={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidDatetimeError=t.normalizeDatetimeAlways=t.normalizeDatetime=t.isValidDatetime=t.ensureValidDatetime=void 0;const e=s=>{const l=new Date(s);if(isNaN(l.getTime()))throw new o("datetime did not parse as ISO 8601");if(l.toISOString().startsWith("-"))throw new o("datetime normalized to a negative time");if(!/^[0-9]{4}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](.[0-9]{1,20})?(Z|([+-][0-2][0-9]:[0-5][0-9]))$/.test(s))throw new o("datetime didn't validate via regex");if(s.length>64)throw new o("datetime is too long (64 chars max)");if(s.endsWith("-00:00"))throw new o('datetime can not use "-00:00" for UTC timezone');if(s.startsWith("000"))throw new o("datetime so close to year zero not allowed")};t.ensureValidDatetime=e;const r=s=>{try{(0,t.ensureValidDatetime)(s)}catch(l){if(l instanceof o)return!1;throw l}return!0};t.isValidDatetime=r;const n=s=>{if((0,t.isValidDatetime)(s)){const c=new Date(s).toISOString();if((0,t.isValidDatetime)(c))return c}if(!/.*(([+-]\d\d:?\d\d)|[a-zA-Z])$/.test(s)){const c=new Date(s+"Z");if(!isNaN(c.getTime())){const d=c.toISOString();if((0,t.isValidDatetime)(d))return d}}const l=new Date(s);if(isNaN(l.getTime()))throw new o("datetime did not parse as any timestamp format");const u=l.toISOString();if((0,t.isValidDatetime)(u))return u;throw new o("datetime normalized to invalid timestamp string")};t.normalizeDatetime=n;const i=s=>{try{return(0,t.normalizeDatetime)(s)}catch(l){if(l instanceof o)return new Date(0).toISOString();throw l}};t.normalizeDatetimeAlways=i;class o extends Error{}t.InvalidDatetimeError=o})(HT);(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r($0,t),r(gi,t),r(O0,t),r(MT,t),r(co,t),r(GT,t),r(HT,t)})(jo);Object.defineProperty(Sy,"__esModule",{value:!0});Sy.IdentityResolver=void 0;const XT=jo,o5=ay;class s5{constructor(e,r){Object.defineProperty(this,"didResolver",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"handleResolver",{enumerable:!0,configurable:!0,writable:!0,value:r})}async resolve(e,r){var o;const n=(0,o5.isResolvedHandle)(e)?await this.getDocumentFromDid(e,r):await this.getDocumentFromHandle(e,r),i=(o=n.service)==null?void 0:o.find(l5,n);if(!i)throw new TypeError(`No valid "AtprotoPersonalDataServer" service found in "${n.id}" DID document`);return{did:n.id,pds:new URL(i.serviceEndpoint),handle:a5(n)}}async getDocumentFromDid(e,r){return this.didResolver.resolve(e,r)}async getDocumentFromHandle(e,r){var s,l;const n=(0,XT.normalizeAndEnsureValidHandle)(e),i=await this.handleResolver.resolve(n,r);if(!i)throw new TypeError(`Handle "${n}" does not resolve to a DID`);(s=r==null?void 0:r.signal)==null||s.throwIfAborted();const o=await this.didResolver.resolve(i,r);if(!((l=o.alsoKnownAs)!=null&&l.includes(`at://${n}`)))throw new TypeError(`Did document for "${i}" does not include the handle "${n}"`);return o}}Sy.IdentityResolver=s5;function a5(t){if(t.alsoKnownAs){for(const e of t.alsoKnownAs)if(e.startsWith("at://")){const r=e.slice(5);if((0,XT.isValidHandle)(r))return r}}}function l5(t){return typeof t.serviceEndpoint=="string"&&t.type==="AtprotoPersonalDataServer"&&(t.id.startsWith("#")?t.id==="#atproto_pds":t.id===`${this.id}#atproto_pds`)}(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Sy,t)})(VT);var tl={};Object.defineProperty(tl,"__esModule",{value:!0});tl.FALLBACK_ALG=void 0;tl.FALLBACK_ALG="ES256";var rl={};Object.defineProperty(rl,"__esModule",{value:!0});rl.AuthMethodUnsatisfiableError=void 0;class u5 extends Error{}rl.AuthMethodUnsatisfiableError=u5;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.TokenRevokedError=void 0;class c5 extends Error{constructor(e,r=`The session for "${e}" was successfully revoked`,n){super(r,n),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:e})}}Us.TokenRevokedError=c5;var nl={};Object.defineProperty(nl,"__esModule",{value:!0});nl.negotiateClientAuthMethod=p5;nl.createClientCredentialsFactory=f5;const d5=Rr,bf=tl,Sg=rl;function p5(t,e,r){const n=e.token_endpoint_auth_method,i=WT(t);if(!i.includes(n))throw new Error(`The server does not support "${n}" authentication. Supported methods are: ${i.join(", ")}.`);if(n==="private_key_jwt"){if(!r)throw new Error("A keyset is required for private_key_jwt");const o=JT(t);for(const s of r.list({use:"sig",alg:o}))if(s.isPrivate&&s.kid)return{method:"private_key_jwt",kid:s.kid};throw new Error(o.includes(bf.FALLBACK_ALG)?`Client authentication method "${n}" requires at least one "${bf.FALLBACK_ALG}" signing key with a "kid" property`:`Authorization server requires "${n}" authentication method, but does not support "${bf.FALLBACK_ALG}" algorithm.`)}if(n==="none")return{method:"none"};throw new Error('The ATProto OAuth spec requires that client use either "none" or "private_key_jwt" authentication method.'+(n==="client_secret_basic"?' You might want to explicitly set "token_endpoint_auth_method" to one of those values in the client metadata document.':` You set "${n}" which is not allowed.`))}function f5(t,e,r,n,i){if(!WT(e).includes(t.method))throw new Sg.AuthMethodUnsatisfiableError(`Client authentication method "${t.method}" no longer supported`);if(t.method==="none")return()=>({payload:{client_id:r.client_id}});if(t.method==="private_key_jwt")try{if(!i)throw new Error("A keyset is required for private_key_jwt");const[o,s]=i.findPrivateKey({use:"sig",kid:t.kid,alg:JT(e)});return async()=>({payload:{client_id:r.client_id,client_assertion_type:d5.CLIENT_ASSERTION_TYPE_JWT_BEARER,client_assertion:await o.createJwt({alg:s},{iss:r.client_id,sub:r.client_id,aud:e.issuer,jti:await n.generateNonce(),iat:Math.floor(Date.now()/1e3),exp:Math.floor(Date.now()/1e3)+60})}})}catch(o){throw new Sg.AuthMethodUnsatisfiableError("Failed to load private key",{cause:o})}throw new Sg.AuthMethodUnsatisfiableError(`Unsupported auth method ${t.method}`)}function WT(t){return t.token_endpoint_auth_methods_supported}function JT(t){return t.token_endpoint_auth_signing_alg_values_supported??[bf.FALLBACK_ALG]}var pd={};Object.defineProperty(pd,"__esModule",{value:!0});pd.OAuthProtectedResourceMetadataResolver=void 0;const h5=Rr,wu=Mn,y5=za,m5=Io;class g5 extends y5.CachedGetter{constructor(e,r=globalThis.fetch,n){super(async(i,o)=>this.fetchMetadata(i,o),e),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowHttpResource",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetch=(0,wu.bindFetch)(r),this.allowHttpResource=(n==null?void 0:n.allowHttpResource)===!0}async get(e,r){const{protocol:n,origin:i}=new URL(e);if(n!=="https:"&&n!=="http:")throw new TypeError(`Invalid protected resource metadata URL protocol: ${n}`);if(n==="http:"&&!this.allowHttpResource)throw new TypeError(`Unsecure resource metadata URL (${n}) only allowed in development and test environments`);return super.get(i,r)}async fetchMetadata(e,r){const n=new URL("/.well-known/oauth-protected-resource",e),i=new Request(n,{signal:r==null?void 0:r.signal,headers:{accept:"application/json"},cache:r!=null&&r.noCache?"no-cache":void 0,redirect:"manual"}),o=await this.fetch(i);if(o.status!==200)throw await(0,wu.cancelBody)(o,"log"),await wu.FetchResponseError.from(o,`Unexpected status code ${o.status} for "${n}"`,void 0,{cause:i});if((0,m5.contentMime)(o.headers)!=="application/json")throw await(0,wu.cancelBody)(o,"log"),await wu.FetchResponseError.from(o,`Unexpected content type for "${n}"`,void 0,{cause:i});const s=h5.oauthProtectedResourceMetadataSchema.parse(await o.json());if(s.resource!==e)throw new TypeError(`Invalid issuer ${s.resource}`);return s}}pd.OAuthProtectedResourceMetadataResolver=g5;var Cy={},fd={};Object.defineProperty(fd,"__esModule",{value:!0});fd.OAuthResolverError=void 0;const b5=G;class dh extends Error{constructor(e,r){super(e,r)}static from(e,r){if(e instanceof dh)return e;const n=e instanceof b5.ZodError?`${e.errors[0].path} ${e.errors[0].message}`:null,i=(r??"Unable to resolve identity")+(n?` (${n})`:"");return new dh(i,{cause:e})}}fd.OAuthResolverError=dh;Object.defineProperty(Cy,"__esModule",{value:!0});Cy.OAuthResolver=void 0;const v5=Rr,Hs=fd;class E5{constructor(e,r,n){Object.defineProperty(this,"identityResolver",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"protectedResourceMetadataResolver",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"authorizationServerMetadataResolver",{enumerable:!0,configurable:!0,writable:!0,value:n})}async resolve(e,r){return/^https?:\/\//.test(e)?this.resolveFromService(e,r):this.resolveFromIdentity(e,r)}async resolveFromService(e,r){var n;try{return{metadata:await this.getResourceServerMetadata(e,r)}}catch(i){if(!((n=r==null?void 0:r.signal)!=null&&n.aborted)&&i instanceof Hs.OAuthResolverError)try{const o=v5.oauthIssuerIdentifierSchema.safeParse(e);if(o.success)return{metadata:await this.getAuthorizationServerMetadata(o.data,r)}}catch{}throw i}}async resolveFromIdentity(e,r){var o;const n=await this.resolveIdentity(e,r);(o=r==null?void 0:r.signal)==null||o.throwIfAborted();const i=await this.getResourceServerMetadata(n.pds,r);return{identity:n,metadata:i}}async resolveIdentity(e,r){try{return await this.identityResolver.resolve(e,r)}catch(n){throw Hs.OAuthResolverError.from(n,`Failed to resolve identity: ${e}`)}}async getAuthorizationServerMetadata(e,r){try{return await this.authorizationServerMetadataResolver.get(e,r)}catch(n){throw Hs.OAuthResolverError.from(n,`Failed to resolve OAuth server metadata for issuer: ${e}`)}}async getResourceServerMetadata(e,r){var n,i,o;try{const s=await this.protectedResourceMetadataResolver.get(e,r);if(((n=s.authorization_servers)==null?void 0:n.length)!==1)throw new Hs.OAuthResolverError((i=s.authorization_servers)!=null&&i.length?`Unable to determine authorization server for PDS: ${e}`:`No authorization servers found for PDS: ${e}`);const l=s.authorization_servers[0];(o=r==null?void 0:r.signal)==null||o.throwIfAborted();const u=await this.getAuthorizationServerMetadata(l,r);if(u.protected_resources&&!u.protected_resources.includes(s.resource))throw new Hs.OAuthResolverError(`PDS "${e}" not protected by issuer "${l}"`);return u}catch(s){throw Hs.OAuthResolverError.from(s,`Failed to resolve OAuth server metadata for resource: ${e}`)}}}Cy.OAuthResolver=E5;var hd={},yd={},ZT={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.atprotoTokenResponseSchema=t.atprotoScopeSchema=t.isAtprotoScope=void 0;const e=G,r=Do,n=Rr,i=Io,o=s=>(0,i.includesSpaceSeparatedValue)(s,"atproto");t.isAtprotoScope=o,t.atprotoScopeSchema=e.z.string().refine(t.isAtprotoScope,'The "atproto" scope is required'),t.atprotoTokenResponseSchema=n.oauthTokenResponseSchema.extend({token_type:e.z.literal("DPoP"),sub:r.atprotoDidSchema,scope:t.atprotoScopeSchema,id_token:e.z.never().optional()})})(ZT);var il={};Object.defineProperty(il,"__esModule",{value:!0});il.TokenRefreshError=void 0;class w5 extends Error{constructor(e,r,n){super(r,n),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:e})}}il.TokenRefreshError=w5;var Ty={};Object.defineProperty(Ty,"__esModule",{value:!0});Ty.dpopFetchWrapper=x5;const _5=c0,QT=Mn;var IA;const av=(IA=globalThis.crypto)==null?void 0:IA.subtle,jR=globalThis.ReadableStream;function x5({key:t,supportedAlgs:e,nonces:r,sha256:n=typeof av<"u"?C5:void 0,isAuthServer:i,fetch:o=globalThis.fetch}){if(!n)throw new TypeError("crypto.subtle is not available in this environment. Please provide a sha256 function.");const s=S5(t,e);return async function(l,u){const c=u==null&&l instanceof Request?l:new Request(l,u),d=c.headers.get("Authorization"),f=d!=null&&d.startsWith("DPoP ")?await n(d.slice(5)):void 0,{origin:h}=new URL(c.url),g=c.method,b=R5(c.url);let w;try{w=await r.get(h)}catch{}const C=await UR(t,s,g,b,w,f);c.headers.set("DPoP",C);const y=await o.call(this,c),m=y.headers.get("DPoP-Nonce");if(!m||m===w)return y;try{await r.set(h,m)}catch{}if(!await A5(y,i)||l===c||jR&&(u==null?void 0:u.body)instanceof jR)return y;await(0,QT.cancelBody)(y,"log");const A=await UR(t,s,g,b,m,f),L=new Request(l,u);L.headers.set("DPoP",A);const D=await o.call(this,L),B=D.headers.get("DPoP-Nonce");if(!B||B===w)return D;try{await r.set(h,B)}catch{}return D}}function R5(t){const e=t.indexOf("#"),r=t.indexOf("?"),n=e===-1?r:r===-1?e:Math.min(e,r);return n===-1?t:t.slice(0,n)}async function UR(t,e,r,n,i,o){const s=t.bareJwk;if(!s)throw new Error("Only asymmetric keys can be used as DPoP proofs");const l=Math.floor(Date.now()/1e3);return t.createJwt({alg:e,typ:"dpop+jwt",jwk:s},{iat:l,jti:Math.random().toString(36).slice(2),htm:r,htu:n,nonce:i,ath:o})}async function A5(t,e){if((e===void 0||e===!1)&&t.status===401){const r=t.headers.get("WWW-Authenticate");if(r!=null&&r.startsWith("DPoP"))return r.includes('error="use_dpop_nonce"')}if((e===void 0||e===!0)&&t.status===400)try{const r=await(0,QT.peekJson)(t,10240);return typeof r=="object"&&(r==null?void 0:r.error)==="use_dpop_nonce"}catch{return!1}return!1}function S5(t,e){if(e){const r=e.find(n=>t.algorithms.includes(n));if(r)return r}else{const[r]=t.algorithms;if(r)return r}throw new Error("Key does not match any alg supported by the server")}async function C5(t){if(av==null)throw new Error("crypto.subtle is not available in this environment. Please provide a sha256 function.");const e=new TextEncoder().encode(t),r=await av.digest("SHA-256",e),n=new Uint8Array(r);return _5.base64url.baseEncode(n)}var ol={};Object.defineProperty(ol,"__esModule",{value:!0});ol.OAuthResponseError=void 0;const $R=Io;class T5 extends Error{constructor(e,r){const n=typeof r=="object"?r:void 0,i=(0,$R.ifString)(n==null?void 0:n.error),o=(0,$R.ifString)(n==null?void 0:n.error_description),s=i?`"${i}"`:"unknown",l=o?`: ${o}`:"",u=`OAuth ${s} error${l}`;super(u),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"payload",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"error",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"errorDescription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.error=i,this.errorDescription=o}get status(){return this.response.status}get headers(){return this.response.headers}}ol.OAuthResponseError=T5;var k5=S&&S.__addDisposableResource||function(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e},L5=S&&S.__disposeResources||function(t){return function(e){function r(s){e.error=e.hasError?new t(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var n,i=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&i===1)return i=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(o,function(l){return r(l),o()})}else i|=1}catch(l){r(l)}if(i===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}}(typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});Object.defineProperty(yd,"__esModule",{value:!0});yd.OAuthServerAgent=void 0;const P5=Rr,OR=Mn,D5=ZT,B5=il,I5=Ty,j5=nl,U5=ol,$5=Io;class O5{constructor(e,r,n,i,o,s,l,u,c){Object.defineProperty(this,"authMethod",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"dpopKey",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"serverMetadata",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"clientMetadata",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"dpopNonces",{enumerable:!0,configurable:!0,writable:!0,value:o}),Object.defineProperty(this,"oauthResolver",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(this,"keyset",{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(this,"dpopFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientCredentialsFactory",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.clientCredentialsFactory=(0,j5.createClientCredentialsFactory)(e,n,i,l,u),this.dpopFetch=(0,I5.dpopFetchWrapper)({fetch:(0,OR.bindFetch)(c),key:r,supportedAlgs:n.dpop_signing_alg_values_supported,sha256:async d=>l.sha256(d),nonces:o,isAuthServer:!0})}get issuer(){return this.serverMetadata.issuer}async revoke(e){try{await this.request("revocation",{token:e})}catch{}}async exchangeCode(e,r){const n=Date.now(),i=await this.request("token",{grant_type:"authorization_code",redirect_uri:this.clientMetadata.redirect_uris[0],code:e,code_verifier:r});try{return{aud:await this.verifyIssuer(i.sub),sub:i.sub,iss:this.issuer,scope:i.scope,refresh_token:i.refresh_token,access_token:i.access_token,token_type:i.token_type,expires_at:typeof i.expires_in=="number"?new Date(n+i.expires_in*1e3).toISOString():void 0}}catch(o){throw await this.revoke(i.access_token),o}}async refresh(e){if(!e.refresh_token)throw new B5.TokenRefreshError(e.sub,"No refresh token available");const r=await this.verifyIssuer(e.sub),n=Date.now(),i=await this.request("token",{grant_type:"refresh_token",refresh_token:e.refresh_token});return{aud:r,sub:e.sub,iss:this.issuer,scope:i.scope,refresh_token:i.refresh_token,access_token:i.access_token,token_type:i.token_type,expires_at:typeof i.expires_in=="number"?new Date(n+i.expires_in*1e3).toISOString():void 0}}async verifyIssuer(e){const r={stack:[],error:void 0,hasError:!1};try{const n=k5(r,(0,$5.timeoutSignal)(1e4),!1),i=await this.oauthResolver.resolveFromIdentity(e,{noCache:!0,allowStale:!1,signal:n});if(this.issuer!==i.metadata.issuer)throw new TypeError("Issuer mismatch");return i.identity.pds.href}catch(n){r.error=n,r.hasError=!0}finally{L5(r)}}async request(e,r){const n=this.serverMetadata[`${e}_endpoint`];if(!n)throw new Error(`No ${e} endpoint available`);const i=await this.clientCredentialsFactory(),{response:o,json:s}=await this.dpopFetch(n,{method:"POST",headers:{...i.headers,"Content-Type":"application/x-www-form-urlencoded"},body:K5({...r,...i.payload})}).then((0,OR.fetchJsonProcessor)());if(o.ok)switch(e){case"token":return D5.atprotoTokenResponseSchema.parse(s);case"pushed_authorization_request":return P5.oauthParResponseSchema.parse(s);default:return s}else throw new U5.OAuthResponseError(o,s)}}yd.OAuthServerAgent=O5;function K5(t){return new URLSearchParams(Object.entries(t).filter(V5).map(M5)).toString()}function V5(t){return t[1]!==void 0}function M5(t){const e=t[0],r=t[1];switch(typeof r){case"string":return[e,r];case"number":case"boolean":return[e,String(r)];default:{const n=JSON.stringify(r);if(n===void 0)throw new Error(`Unsupported value type for ${e}: ${String(r)}`);return[e,n]}}}Object.defineProperty(hd,"__esModule",{value:!0});hd.OAuthServerFactory=void 0;const N5=nl,z5=yd;class F5{constructor(e,r,n,i,o,s){Object.defineProperty(this,"clientMetadata",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"resolver",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"keyset",{enumerable:!0,configurable:!0,writable:!0,value:o}),Object.defineProperty(this,"dpopNonceCache",{enumerable:!0,configurable:!0,writable:!0,value:s})}async fromIssuer(e,r,n,i){const o=await this.resolver.getAuthorizationServerMetadata(e,i);return r==="legacy"&&(r=(0,N5.negotiateClientAuthMethod)(o,this.clientMetadata,this.keyset)),this.fromMetadata(o,r,n)}async fromMetadata(e,r,n){return new z5.OAuthServerAgent(r,n,e,this.clientMetadata,this.dpopNonceCache,this.resolver,this.runtime,this.keyset,this.fetch)}}hd.OAuthServerFactory=F5;var md={},sl={};Object.defineProperty(sl,"__esModule",{value:!0});sl.TokenInvalidError=void 0;class q5 extends Error{constructor(e,r=`The session for "${e}" is invalid`,n){super(r,n),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:e})}}sl.TokenInvalidError=q5;Object.defineProperty(md,"__esModule",{value:!0});md.OAuthSession=void 0;const G5=Mn,H5=sl,X5=Us,W5=Ty,KR=globalThis.ReadableStream;class J5{constructor(e,r,n,i=globalThis.fetch){Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"sub",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"sessionGetter",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"dpopFetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dpopFetch=(0,W5.dpopFetchWrapper)({fetch:(0,G5.bindFetch)(i),key:e.dpopKey,supportedAlgs:e.serverMetadata.dpop_signing_alg_values_supported,sha256:async o=>e.runtime.sha256(o),nonces:e.dpopNonces,isAuthServer:!1})}get did(){return this.sub}get serverMetadata(){return this.server.serverMetadata}async getTokenSet(e){const{tokenSet:r}=await this.sessionGetter.get(this.sub,{noCache:e===!0,allowStale:e===!1});return r}async getTokenInfo(e="auto"){const r=await this.getTokenSet(e),n=r.expires_at==null?void 0:new Date(r.expires_at);return{expiresAt:n,get expired(){return n==null?void 0:n.getTime()<Date.now()-5e3},scope:r.scope,iss:r.iss,aud:r.aud,sub:r.sub}}async signOut(){try{const e=await this.getTokenSet(!1);await this.server.revoke(e.access_token)}finally{await this.sessionGetter.delStored(this.sub,new X5.TokenRevokedError(this.sub))}}async fetchHandler(e,r){const n=await this.getTokenSet("auto"),i=new URL(e,n.aud),o=`${n.token_type} ${n.access_token}`,s=new Headers(r==null?void 0:r.headers);s.set("Authorization",o);const l=await this.dpopFetch(i,{...r,headers:s});if(!VR(l))return l;let u;try{u=await this.getTokenSet(!0)}catch{return l}if(KR&&(r==null?void 0:r.body)instanceof KR)return l;const c=`${u.token_type} ${u.access_token}`,d=new URL(e,u.aud);s.set("Authorization",c);const f=await this.dpopFetch(d,{...r,headers:s});return VR(f)&&await this.sessionGetter.delStored(this.sub,new H5.TokenInvalidError(this.sub)),f}}md.OAuthSession=J5;function VR(t){if(t.status!==401)return!1;const e=t.headers.get("WWW-Authenticate");return e!=null&&(e.startsWith("Bearer ")||e.startsWith("DPoP "))&&e.includes('error="invalid_token"')}var ky={},Ly={};Object.defineProperty(Ly,"__esModule",{value:!0});Ly.requestLocalLock=void 0;const $p=new Map;function Z5(t){return new Promise(e=>{const n=($p.get(t)??Promise.resolve()).then(()=>new Promise(i=>{e(()=>{$p.get(t)===n&&$p.delete(t),i()})}));$p.set(t,n)})}const Q5=(t,e)=>Z5(t).then(async r=>{try{return await e()}finally{r()}});Ly.requestLocalLock=Q5;Object.defineProperty(ky,"__esModule",{value:!0});ky.Runtime=void 0;const Cg=c0,Y5=Ly;class eF{constructor(e){Object.defineProperty(this,"implementation",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"hasImplementationLock",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"usingLock",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const{requestLock:r}=e;this.hasImplementationLock=r!=null,this.usingLock=(r==null?void 0:r.bind(e))||Y5.requestLocalLock}async generateKey(e){const r=Array.from(e).sort(rF);return this.implementation.createKey(r)}async sha256(e){const r=new TextEncoder().encode(e),n=await this.implementation.digest(r,{name:"sha256"});return Cg.base64url.baseEncode(n)}async generateNonce(e=16){const r=await this.implementation.getRandomValues(e);return Cg.base64url.baseEncode(r)}async generatePKCE(e){const r=await this.generateVerifier(e);return{verifier:r,challenge:await this.sha256(r),method:"S256"}}async calculateJwkThumbprint(e){const r=tF(e),n=JSON.stringify(r);return this.sha256(n)}async generateVerifier(e=32){if(e<32||e>96)throw new TypeError("Invalid code_verifier length");const r=await this.implementation.getRandomValues(e);return Cg.base64url.baseEncode(r)}}ky.Runtime=eF;function tF(t){const e=r=>{const n=t[r];if(typeof n!="string"||!n)throw new TypeError(`"${r}" Parameter missing or invalid`);return n};switch(t.kty){case"EC":return{crv:e("crv"),kty:e("kty"),x:e("x"),y:e("y")};case"OKP":return{crv:e("crv"),kty:e("kty"),x:e("x")};case"RSA":return{e:e("e"),kty:e("kty"),n:e("n")};case"oct":return{k:e("k"),kty:e("kty")};default:throw new TypeError('"kty" (Key Type) Parameter missing or unsupported')}}function rF(t,e){if(t==="ES256K")return-1;if(e==="ES256K")return 1;for(const r of["ES","PS","RS"])if(t.startsWith(r)){if(e.startsWith(r)){const n=parseInt(t.slice(2,5)),i=parseInt(e.slice(2,5));return n-i}return-1}else if(e.startsWith(r))return 1;return 0}var gd={},MR=S&&S.__addDisposableResource||function(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(i=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(o){return Promise.reject(o)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e},nF=S&&S.__disposeResources||function(t){return function(e){function r(s){e.error=e.hasError?new t(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var n,i=0;function o(){for(;n=e.stack.pop();)try{if(!n.async&&i===1)return i=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(o,function(l){return r(l),o()})}else i|=1}catch(l){r(l)}if(i===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}}(typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n});Object.defineProperty(gd,"__esModule",{value:!0});gd.SessionGetter=void 0;const iF=za,NR=rl,oF=sl,ns=il,sF=Us,aF=ol,Tg=Io;class lF extends iF.CachedGetter{constructor(e,r,n){super(async(i,o,s)=>{var f;if(s===void 0){const h="The session was deleted by another process",g=new ns.TokenRefreshError(i,h);throw this.dispatchEvent("deleted",{sub:i,cause:g}),g}const{dpopKey:l,authMethod:u="legacy",tokenSet:c}=s;if(i!==c.sub)throw new ns.TokenRefreshError(i,"Stored session sub mismatch");if(!c.refresh_token)throw new ns.TokenRefreshError(i,"No refresh token available");const d=await r.fromIssuer(c.iss,u,l);(f=o==null?void 0:o.signal)==null||f.throwIfAborted();try{const h=await d.refresh(c);if(i!==h.sub)throw new ns.TokenRefreshError(i,"Token set sub mismatch");return{dpopKey:l,tokenSet:h,authMethod:d.authMethod}}catch(h){if(h instanceof aF.OAuthResponseError&&h.status===400&&h.error==="invalid_grant"){if(!n.hasImplementationLock){await new Promise(w=>setTimeout(w,1e3));const b=await this.getStored(i);if(b===void 0){const w="The session was deleted by another process";throw new ns.TokenRefreshError(i,w,{cause:h})}else if(b.tokenSet.access_token!==c.access_token||b.tokenSet.refresh_token!==c.refresh_token)return b}const g=h.errorDescription??"The session was revoked";throw new ns.TokenRefreshError(i,g,{cause:h})}throw h}},e,{isStale:(i,{tokenSet:o})=>o.expires_at!=null&&new Date(o.expires_at).getTime()<Date.now()+1e4+3e4*Math.random(),onStoreError:async(i,o,{tokenSet:s,dpopKey:l,authMethod:u="legacy"})=>{if(!(i instanceof NR.AuthMethodUnsatisfiableError))try{await(await r.fromIssuer(s.iss,u,l)).revoke(s.refresh_token??s.access_token)}catch{}throw i},deleteOnError:async i=>i instanceof ns.TokenRefreshError||i instanceof sF.TokenRevokedError||i instanceof oF.TokenInvalidError||i instanceof NR.AuthMethodUnsatisfiableError}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"eventTarget",{enumerable:!0,configurable:!0,writable:!0,value:new Tg.CustomEventTarget})}addEventListener(e,r,n){this.eventTarget.addEventListener(e,r,n)}removeEventListener(e,r,n){this.eventTarget.removeEventListener(e,r,n)}dispatchEvent(e,r){return this.eventTarget.dispatchCustomEvent(e,r)}async setStored(e,r){if(e!==r.tokenSet.sub)throw new TypeError("Token set does not match the expected sub");await super.setStored(e,r),this.dispatchEvent("updated",{sub:e,...r})}async delStored(e,r){await super.delStored(e,r),this.dispatchEvent("deleted",{sub:e,cause:r})}async getSession(e,r){return this.get(e,{noCache:r===!0,allowStale:r===!1})}async get(e,r){const n=await this.runtime.usingLock(`@atproto-oauth-client-${e}`,async()=>{const i={stack:[],error:void 0,hasError:!1};try{const o=MR(i,(0,Tg.timeoutSignal)(3e4,r),!1),s=MR(i,(0,Tg.combineSignals)([r==null?void 0:r.signal,o]),!1);return await super.get(e,{...r,signal:s.signal})}catch(o){i.error=o,i.hasError=!0}finally{nF(i)}});if(e!==n.tokenSet.sub)throw new Error("Token set does not match the expected sub");return n}}gd.SessionGetter=lF;var K0={},bd={};Object.defineProperty(bd,"__esModule",{value:!0});bd.clientMetadataSchema=void 0;const uF=G,kg=Rr;bd.clientMetadataSchema=kg.oauthClientMetadataSchema.extend({client_id:uF.z.union([kg.oauthClientIdDiscoverableSchema,kg.oauthClientIdLoopbackSchema])});Object.defineProperty(K0,"__esModule",{value:!0});K0.validateClientMetadata=dF;const zR=Rr,FR=tl,cF=bd;function dF(t,e){var s;!t.jwks&&!t.jwks_uri&&(e!=null&&e.size)&&(t={...t,jwks:e.toJSON()});const r=cF.clientMetadataSchema.parse(t);r.client_id.startsWith("http:")?(0,zR.assertOAuthLoopbackClientId)(r.client_id):(0,zR.assertOAuthDiscoverableClientId)(r.client_id);const n=(s=r.scope)==null?void 0:s.split(" ");if(!(n!=null&&n.includes("atproto")))throw new TypeError('Client metadata must include the "atproto" scope');if(!r.response_types.includes("code"))throw new TypeError('"response_types" must include "code"');if(!r.grant_types.includes("authorization_code"))throw new TypeError('"grant_types" must include "authorization_code"');const i=r.token_endpoint_auth_method,o=r.token_endpoint_auth_signing_alg;switch(i){case"none":if(o)throw new TypeError(`"token_endpoint_auth_signing_alg" must not be provided when "token_endpoint_auth_method" is "${i}"`);break;case"private_key_jwt":{if(!o)throw new TypeError(`"token_endpoint_auth_signing_alg" must be provided when "token_endpoint_auth_method" is "${i}"`);const l=e?Array.from(e.list({use:"sig"})).filter(u=>u.isPrivate&&u.kid):null;if(!(l!=null&&l.some(u=>u.algorithms.includes(FR.FALLBACK_ALG))))throw new TypeError(`Client authentication method "${i}" requires at least one "${FR.FALLBACK_ALG}" signing key with a "kid" property`);if(r.jwks){for(const u of l)if(!r.jwks.keys.some(c=>c.kid===u.kid))throw new TypeError(`Key with kid "${u.kid}" not found in jwks`)}else if(!r.jwks_uri)throw new TypeError(`Client authentication method "${i}" requires a JWKS`);break}default:throw new TypeError(`Unsupported "token_endpoint_auth_method" value: ${i}`)}return r}Object.defineProperty(Ay,"__esModule",{value:!0});Ay.OAuthClient=void 0;const qR=Si,pF=Rr,Op=C0,GR=ay,fF=VT,Lg=Na,hF=tl,yF=rl,mF=Us,gF=cd,ei=dd,bF=nl,vF=pd,EF=Cy,wF=hd,_F=md,xF=ky,RF=gd,AF=Io,SF=K0;class CF extends AF.CustomEventTarget{static async fetchMetadata({clientId:e,fetch:r=globalThis.fetch,signal:n}){var u,c,d,f,h;n==null||n.throwIfAborted();const i=new Request(e,{redirect:"error",signal:n}),o=await r(i);if(o.status!==200)throw(c=(u=o.body)==null?void 0:u.cancel)==null||c.call(u),new TypeError(`Failed to fetch client metadata: ${o.status}`);const s=(d=o.headers.get("content-type"))==null?void 0:d.split(";")[0].trim();if(s!=="application/json")throw(h=(f=o.body)==null?void 0:f.cancel)==null||h.call(f),new TypeError(`Invalid client metadata content type: ${s}`);const l=await o.json();return n==null||n.throwIfAborted(),pF.oauthClientMetadataSchema.parse(l)}constructor({fetch:e=globalThis.fetch,allowHttp:r=!1,stateStore:n,sessionStore:i,didCache:o=void 0,dpopNonceCache:s=new Lg.SimpleStoreMemory({ttl:6e4,max:100}),handleCache:l=void 0,authorizationServerMetadataCache:u=new Lg.SimpleStoreMemory({ttl:6e4,max:100}),protectedResourceMetadataCache:c=new Lg.SimpleStoreMemory({ttl:6e4,max:100}),responseMode:d,clientMetadata:f,handleResolver:h,plcDirectoryUrl:g,runtimeImplementation:b,keyset:w}){super(),Object.defineProperty(this,"clientMetadata",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"responseMode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"keyset",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"runtime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"oauthResolver",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"serverFactory",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sessionGetter",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stateStore",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.keyset=w?w instanceof qR.Keyset?w:new qR.Keyset(w):void 0,this.clientMetadata=(0,SF.validateClientMetadata)(f,this.keyset),this.responseMode=d,this.runtime=new xF.Runtime(b),this.fetch=e,this.oauthResolver=new EF.OAuthResolver(new fF.IdentityResolver(new Op.DidResolverCached(new Op.DidResolverCommon({fetch:e,plcDirectoryUrl:g,allowHttp:r}),o),new GR.CachedHandleResolver(GR.AppViewHandleResolver.from(h,{fetch:e}),l)),new vF.OAuthProtectedResourceMetadataResolver(c,e,{allowHttpResource:r}),new gF.OAuthAuthorizationServerMetadataResolver(u,e,{allowHttpIssuer:r})),this.serverFactory=new wF.OAuthServerFactory(this.clientMetadata,this.runtime,this.oauthResolver,this.fetch,this.keyset,s),this.sessionGetter=new RF.SessionGetter(i,this.serverFactory,this.runtime),this.stateStore=n;for(const C of["deleted","updated"])this.sessionGetter.addEventListener(C,y=>{this.dispatchCustomEvent(C,y.detail)||y.preventDefault()})}get identityResolver(){return this.oauthResolver.identityResolver}get didResolver(){return this.identityResolver.didResolver}get handleResolver(){return this.identityResolver.handleResolver}get jwks(){var e;return((e=this.keyset)==null?void 0:e.publicJwks)??{keys:[]}}async authorize(e,{signal:r,...n}={}){const i=(n==null?void 0:n.redirect_uri)??this.clientMetadata.redirect_uris[0];if(!this.clientMetadata.redirect_uris.includes(i))throw new TypeError("Invalid redirect_uri");const{identity:o,metadata:s}=await this.oauthResolver.resolve(e,{signal:r}),l=await this.runtime.generatePKCE(),u=await this.runtime.generateKey(s.dpop_signing_alg_values_supported||[hF.FALLBACK_ALG]),c=(0,bF.negotiateClientAuthMethod)(s,this.clientMetadata,this.keyset),d=await this.runtime.generateNonce();await this.stateStore.set(d,{iss:s.issuer,dpopKey:u,authMethod:c,verifier:l.verifier,appState:n==null?void 0:n.state});const f={...n,client_id:this.clientMetadata.client_id,redirect_uri:i,code_challenge:l.challenge,code_challenge_method:l.method,state:d,login_hint:(o==null?void 0:o.handle)??(o==null?void 0:o.did),response_mode:this.responseMode,response_type:"code",scope:(n==null?void 0:n.scope)??this.clientMetadata.scope},h=new URL(s.authorization_endpoint);if(h.protocol!=="https:"&&h.protocol!=="http:")throw new TypeError(`Invalid authorization endpoint protocol: ${h.protocol}`);if(s.pushed_authorization_request_endpoint){const b=await(await this.serverFactory.fromMetadata(s,c,u)).request("pushed_authorization_request",f);return h.searchParams.set("client_id",this.clientMetadata.client_id),h.searchParams.set("request_uri",b.request_uri),h}else{if(s.require_pushed_authorization_requests)throw new Error("Server requires pushed authorization requests (PAR) but no PAR endpoint is available");for(const[b,w]of Object.entries(f))w&&h.searchParams.set(b,String(w));if(h.pathname.length+h.search.length<2048)return h;if(!s.pushed_authorization_request_endpoint)throw new Error("Login URL too long")}throw new Error("Server does not support pushed authorization requests (PAR)")}async abortRequest(e){e.searchParams.get("request_uri")}async callback(e){if(e.get("response")!=null)throw new ei.OAuthCallbackError(e,"JARM not supported");const n=e.get("iss"),i=e.get("state"),o=e.get("error"),s=e.get("code");if(!i)throw new ei.OAuthCallbackError(e,'Missing "state" parameter');const l=await this.stateStore.get(i);if(l)await this.stateStore.del(i);else throw new ei.OAuthCallbackError(e,`Unknown authorization session "${i}"`);try{if(o!=null)throw new ei.OAuthCallbackError(e,void 0,l.appState);if(!s)throw new ei.OAuthCallbackError(e,'Missing "code" query param',l.appState);const u=await this.serverFactory.fromIssuer(l.iss,l.authMethod??"legacy",l.dpopKey);if(n!=null){if(!u.issuer)throw new ei.OAuthCallbackError(e,"Issuer not found in metadata",l.appState);if(u.issuer!==n)throw new ei.OAuthCallbackError(e,"Issuer mismatch",l.appState)}else if(u.serverMetadata.authorization_response_iss_parameter_supported)throw new ei.OAuthCallbackError(e,"iss missing from the response",l.appState);const c=await u.exchangeCode(s,l.verifier);try{return await this.sessionGetter.setStored(c.sub,{dpopKey:l.dpopKey,authMethod:u.authMethod,tokenSet:c}),{session:this.createSession(u,c.sub),state:l.appState??null}}catch(d){throw await u.revoke(c.refresh_token||c.access_token),d}}catch(u){throw ei.OAuthCallbackError.from(u,e,l.appState)}}async restore(e,r="auto"){(0,Op.assertAtprotoDid)(e);const{dpopKey:n,authMethod:i="legacy",tokenSet:o}=await this.sessionGetter.get(e,{noCache:r===!0,allowStale:r===!1});try{const s=await this.serverFactory.fromIssuer(o.iss,i,n,{noCache:r===!0,allowStale:r===!1});return this.createSession(s,e)}catch(s){throw s instanceof yF.AuthMethodUnsatisfiableError&&await this.sessionGetter.delStored(e,s),s}}async revoke(e){(0,Op.assertAtprotoDid)(e);const{dpopKey:r,authMethod:n="legacy",tokenSet:i}=await this.sessionGetter.get(e,{allowStale:!0});try{await(await this.serverFactory.fromIssuer(i.iss,n,r)).revoke(i.access_token)}finally{await this.sessionGetter.delStored(e,new mF.TokenRevokedError(e))}}createSession(e,r){return new _F.OAuthSession(e,r,this.sessionGetter,this.fetch)}}Ay.OAuthClient=CF;var YT={};Object.defineProperty(YT,"__esModule",{value:!0});var ek={};Object.defineProperty(ek,"__esModule",{value:!0});(function(t){var e=S&&S.__createBinding||(Object.create?function(i,o,s,l){l===void 0&&(l=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,l,u)}:function(i,o,s,l){l===void 0&&(l=s),i[l]=o[s]}),r=S&&S.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.FetchResponseError=t.FetchRequestError=t.FetchError=void 0,r(C0,t);var n=Mn;Object.defineProperty(t,"FetchError",{enumerable:!0,get:function(){return n.FetchError}}),Object.defineProperty(t,"FetchRequestError",{enumerable:!0,get:function(){return n.FetchRequestError}}),Object.defineProperty(t,"FetchResponseError",{enumerable:!0,get:function(){return n.FetchResponseError}}),r(ay,t),r(Do,t),r(Rr,t),r(cd,t),r(dd,t),r(Ay,t),r(pd,t),r(fd,t),r(ol,t),r(yd,t),r(hd,t),r(md,t),r(YT,t),r(gd,t),r(ek,t),r(bd,t),r(sl,t),r(il,t),r(Us,t)})(S0);var Py={},Dy={},tk={},By={},vd={},Ed={},wd={},_d={};Object.defineProperty(_d,"__esModule",{value:!0});_d.handleRequest=rk;_d.promisify=TF;function rk(t,e,r){const n=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{e(t.result),n()},o=()=>{r(t.error||new Error("Unknown error")),n()};t.addEventListener("success",i),t.addEventListener("error",o)}function TF(t){return new Promise((e,r)=>{rk(t,e,r)})}Object.defineProperty(wd,"__esModule",{value:!0});wd.DBIndex=void 0;const _u=_d;class kF{constructor(e){Object.defineProperty(this,"idbIndex",{enumerable:!0,configurable:!0,writable:!0,value:e})}count(e){return(0,_u.promisify)(this.idbIndex.count(e))}get(e){return(0,_u.promisify)(this.idbIndex.get(e))}getKey(e){return(0,_u.promisify)(this.idbIndex.getKey(e))}getAll(e,r){return(0,_u.promisify)(this.idbIndex.getAll(e,r))}getAllKeys(e,r){return(0,_u.promisify)(this.idbIndex.getAllKeys(e,r))}deleteAll(e){return new Promise((r,n)=>{const i=this.idbIndex.openCursor(e);i.onsuccess=function(o){const s=o.target.result;s?(s.delete(),s.continue()):r()},i.onerror=function(o){var s;n(((s=o.target)==null?void 0:s.error)||new Error("Unexpected error"))}})}}wd.DBIndex=kF;Object.defineProperty(Ed,"__esModule",{value:!0});Ed.DBObjectStore=void 0;const LF=wd,ji=_d;class PF{constructor(e){Object.defineProperty(this,"idbObjStore",{enumerable:!0,configurable:!0,writable:!0,value:e})}get name(){return this.idbObjStore.name}index(e){return new LF.DBIndex(this.idbObjStore.index(e))}get(e){return(0,ji.promisify)(this.idbObjStore.get(e))}getKey(e){return(0,ji.promisify)(this.idbObjStore.getKey(e))}getAll(e,r){return(0,ji.promisify)(this.idbObjStore.getAll(e,r))}getAllKeys(e,r){return(0,ji.promisify)(this.idbObjStore.getAllKeys(e,r))}add(e,r){return(0,ji.promisify)(this.idbObjStore.add(e,r))}put(e,r){return(0,ji.promisify)(this.idbObjStore.put(e,r))}delete(e){return(0,ji.promisify)(this.idbObjStore.delete(e))}clear(){return(0,ji.promisify)(this.idbObjStore.clear())}}Ed.DBObjectStore=PF;var Kp=S&&S.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Pg=S&&S.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ti;Object.defineProperty(vd,"__esModule",{value:!0});vd.DBTransaction=void 0;const DF=Ed;class BF{constructor(e){ti.set(this,void 0),Kp(this,ti,e,"f");const r=()=>{i()},n=()=>{i()},i=()=>{Kp(this,ti,null,"f"),e.removeEventListener("abort",r),e.removeEventListener("complete",n)};e.addEventListener("abort",r),e.addEventListener("complete",n)}get tx(){if(!Pg(this,ti,"f"))throw new Error("Transaction already ended");return Pg(this,ti,"f")}async abort(){const{tx:e}=this;Kp(this,ti,null,"f"),e.abort()}async commit(){var r;const{tx:e}=this;Kp(this,ti,null,"f"),(r=e.commit)==null||r.call(e)}objectStore(e){const r=this.tx.objectStore(e);return new DF.DBObjectStore(r)}[(ti=new WeakMap,Symbol.dispose)](){Pg(this,ti,"f")&&this.commit()}}vd.DBTransaction=BF;var Dg=S&&S.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Bg=S&&S.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ui;Object.defineProperty(By,"__esModule",{value:!0});By.DB=void 0;const IF=vd;class V0{static async open(e,r,n){const i=await new Promise((o,s)=>{const l=indexedDB.open(e,r.length);l.onerror=()=>s(l.error),l.onsuccess=()=>o(l.result),l.onupgradeneeded=({oldVersion:u,newVersion:c})=>{const d=l.result;try{for(let f=u;f<(c??r.length);++f){const h=r[f];if(h)h(d);else throw new Error(`Missing migration for version ${f}`)}}catch(f){d.close(),s(f)}}});return new V0(i,n)}constructor(e,r){Object.defineProperty(this,"txOptions",{enumerable:!0,configurable:!0,writable:!0,value:r}),Ui.set(this,void 0),Dg(this,Ui,e,"f");const n=()=>{Dg(this,Ui,null,"f"),e.removeEventListener("versionchange",n),e.removeEventListener("close",n),e.close()};e.addEventListener("versionchange",n),e.addEventListener("close",n)}get db(){if(!Bg(this,Ui,"f"))throw new Error("Database closed");return Bg(this,Ui,"f")}get name(){return this.db.name}get objectStoreNames(){return this.db.objectStoreNames}get version(){return this.db.version}async transaction(e,r,n){return new Promise(async(i,o)=>{try{const s=this.db.transaction(e,r,this.txOptions);let l={done:!1};s.oncomplete=()=>{l.done?i(l.value):o(new Error("Transaction completed without result"))},s.onerror=()=>o(s.error),s.onabort=()=>o(s.error||new Error("Transaction aborted"));try{l={done:!0,value:await n(new IF.DBTransaction(s))},s.commit()}catch(u){throw s.abort(),u}}catch(s){o(s)}})}close(){const{db:e}=this;Dg(this,Ui,null,"f"),e.close()}[(Ui=new WeakMap,Symbol.dispose)](){if(Bg(this,Ui,"f"))return this.close()}}By.DB=V0;(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(By,t),r(wd,t),r(Ed,t),r(vd,t)})(tk);var Vp=S&&S.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},xu=S&&S.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},$i,Ru;Object.defineProperty(Dy,"__esModule",{value:!0});Dy.BrowserOAuthDatabase=void 0;const nk=jh,jF=tk;function HR(t){if(!(t instanceof nk.WebcryptoKey)||!t.kid)throw new Error("Invalid key object");return{keyId:t.kid,keyPair:t.cryptoKeyPair}}async function XR(t){return nk.WebcryptoKey.fromKeypair(t.keyPair,t.keyId)}const WR=["state","session","didCache","dpopNonceCache","handleCache","authorizationServerMetadataCache","protectedResourceMetadataCache"];class UF{constructor(e){$i.set(this,void 0),Ru.set(this,void 0),Vp(this,$i,jF.DB.open((e==null?void 0:e.name)??"@atproto-oauth-client",[r=>{for(const n of WR)r.createObjectStore(n,{autoIncrement:!0}).createIndex("expiresAt","expiresAt",{unique:!1})}],{durability:(e==null?void 0:e.durability)??"strict"}),"f"),Vp(this,Ru,setInterval(()=>{this.cleanup()},(e==null?void 0:e.cleanupInterval)??3e4),"f")}async run(e,r,n){return await(await xu(this,$i,"f")).transaction([e],r,o=>n(o.objectStore(e)))}createStore(e,{encode:r,decode:n,expiresAt:i}){return{get:async o=>{const s=await this.run(e,"readonly",l=>l.get(o));if(s!==void 0){if(s.expiresAt!=null&&new Date(s.expiresAt)<new Date){await this.run(e,"readwrite",l=>l.delete(o));return}return n(s.value)}},set:async(o,s)=>{var u;const l={value:await r(s),expiresAt:(u=i(s))==null?void 0:u.toISOString()};await this.run(e,"readwrite",c=>c.put(l,o))},del:async o=>{await this.run(e,"readwrite",s=>s.delete(o))}}}getSessionStore(){return this.createStore("session",{expiresAt:({tokenSet:e})=>e.refresh_token||e.expires_at==null?null:new Date(e.expires_at),encode:({dpopKey:e,...r})=>({...r,dpopKey:HR(e)}),decode:async({dpopKey:e,...r})=>({...r,dpopKey:await XR(e)})})}getStateStore(){return this.createStore("state",{expiresAt:e=>new Date(Date.now()+10*6e4),encode:({dpopKey:e,...r})=>({...r,dpopKey:HR(e)}),decode:async({dpopKey:e,...r})=>({...r,dpopKey:await XR(e)})})}getDpopNonceCache(){return this.createStore("dpopNonceCache",{expiresAt:e=>new Date(Date.now()+6e5),encode:e=>e,decode:e=>e})}getDidCache(){return this.createStore("didCache",{expiresAt:e=>new Date(Date.now()+6e4),encode:e=>e,decode:e=>e})}getHandleCache(){return this.createStore("handleCache",{expiresAt:e=>new Date(Date.now()+6e4),encode:e=>e,decode:e=>e})}getAuthorizationServerMetadataCache(){return this.createStore("authorizationServerMetadataCache",{expiresAt:e=>new Date(Date.now()+6e4),encode:e=>e,decode:e=>e})}getProtectedResourceMetadataCache(){return this.createStore("protectedResourceMetadataCache",{expiresAt:e=>new Date(Date.now()+6e4),encode:e=>e,decode:e=>e})}async cleanup(){const e=await xu(this,$i,"f");for(const r of WR)await e.transaction([r],"readwrite",n=>n.objectStore(r).index("expiresAt").deleteAll(IDBKeyRange.upperBound(Date.now())))}async[($i=new WeakMap,Ru=new WeakMap,Symbol.asyncDispose)](){clearInterval(xu(this,Ru,"f")),Vp(this,Ru,void 0,"f");const e=xu(this,$i,"f");Vp(this,$i,Promise.reject(new Error("Database has been disposed")),"f"),xu(this,$i,"f").catch(()=>null);const r=await e.catch(()=>null);r&&await(r[Symbol.asyncDispose]||r[Symbol.dispose]).call(r)}}Dy.BrowserOAuthDatabase=UF;var Iy={};Object.defineProperty(Iy,"__esModule",{value:!0});Iy.BrowserRuntimeImplementation=void 0;const $F=jh;var jA;const OF=(jA=navigator.locks)!=null&&jA.request?(t,e)=>navigator.locks.request(t,{mode:"exclusive"},async()=>e()):void 0;class KF{constructor(){if(Object.defineProperty(this,"requestLock",{enumerable:!0,configurable:!0,writable:!0,value:OF}),typeof crypto!="object"||!(crypto!=null&&crypto.subtle))throw new Error("Crypto with CryptoSubtle is required. If running in a browser, make sure the current page is loaded over HTTPS.");this.requestLock||console.warn("Locks API not available. You should consider using a more recent browser.")}async createKey(e){return $F.WebcryptoKey.generate(e)}getRandomValues(e){return crypto.getRandomValues(new Uint8Array(e))}async digest(e,{name:r}){switch(r){case"sha256":case"sha384":case"sha512":{const n=await crypto.subtle.digest(`SHA-${r.slice(3)}`,e);return new Uint8Array(n)}default:throw new Error(`Unsupported digest algorithm: ${r}`)}}}Iy.BrowserRuntimeImplementation=KF;var xd={};Object.defineProperty(xd,"__esModule",{value:!0});xd.LoginContinuedInParentWindowError=void 0;class VF extends Error{constructor(){super("Login complete, please close the popup window."),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:"LOGIN_CONTINUED_IN_PARENT_WINDOW"})}}xd.LoginContinuedInParentWindowError=VF;var jy={};Object.defineProperty(jy,"__esModule",{value:!0});jy.buildLoopbackClientId=NF;const MF=Rr;function NF(t,e="127.0.0.1"){if(!(0,MF.isLoopbackHost)(t.hostname))throw new TypeError(`Expected a loopback host, got ${t.hostname}`);const r=`http://${t.hostname==="localhost"?e:t.hostname}${t.port&&!t.port.startsWith(":")?`:${t.port}`:t.port}${t.pathname}`;return`http://localhost${t.pathname==="/"?"":t.pathname}?redirect_uri=${encodeURIComponent(r)}`}var ik;Object.defineProperty(Py,"__esModule",{value:!0});Py.BrowserOAuthClient=void 0;const Mp=S0,vf=Rr,zF=Dy,FF=Iy,Ig=xd,qF=jy,An="@@atproto/oauth-client-browser",JR=`${An}(popup-channel)`,Au=`${An}(popup-state):`,ZR=new BroadcastChannel(`${An}(synchronization-channel)`);class ph extends Mp.OAuthClient{static async load({clientId:e,...r}){if(e.startsWith("http:")){const n=(0,vf.atprotoLoopbackClientMetadata)(e);return new ph({clientMetadata:n,...r})}else if(e.startsWith("https:")){(0,vf.assertOAuthDiscoverableClientId)(e);const n=await Mp.OAuthClient.fetchMetadata({clientId:e,...r});return new ph({clientMetadata:n,...r})}else throw new TypeError(`Invalid client id: ${e}`)}constructor({clientMetadata:e=(0,vf.atprotoLoopbackClientMetadata)((0,qF.buildLoopbackClientId)(window.location)),responseMode:r="fragment",...n}){var l;if(!((l=globalThis.crypto)!=null&&l.subtle))throw new Error("WebCrypto API is required");if(!["query","fragment"].includes(r))throw new TypeError(`Invalid response mode: ${r}`);const i=new zF.BrowserOAuthDatabase;super({...n,clientMetadata:e,responseMode:r,keyset:void 0,runtimeImplementation:new FF.BrowserRuntimeImplementation,sessionStore:i.getSessionStore(),stateStore:i.getStateStore(),didCache:i.getDidCache(),handleCache:i.getHandleCache(),dpopNonceCache:i.getDpopNonceCache(),authorizationServerMetadataCache:i.getAuthorizationServerMetadataCache(),protectedResourceMetadataCache:i.getProtectedResourceMetadataCache()}),Object.defineProperty(this,ik,{enumerable:!0,configurable:!0,writable:!0,value:void 0});const o=new AbortController,{signal:s}=o;this[Symbol.dispose]=()=>o.abort(),s.addEventListener("abort",()=>i[Symbol.asyncDispose](),{once:!0}),this.addEventListener("deleted",({detail:{sub:u}})=>{localStorage.getItem(`${An}(sub)`)===u&&localStorage.removeItem(`${An}(sub)`)});for(const u of["deleted","updated"])this.sessionGetter.addEventListener(u,({detail:c})=>{ZR.postMessage([u,c])});ZR.addEventListener("message",u=>{if(u.source!==window){const[c,d]=u.data;this.dispatchCustomEvent(c,d)}},{signal:s})}async init(e){await GF(this.clientMetadata);const r=await this.signInCallback();if(r)return localStorage.setItem(`${An}(sub)`,r.session.sub),r;const n=localStorage.getItem(`${An}(sub)`);if(n)try{return{session:await this.restore(n,e)}}catch(i){throw localStorage.removeItem(`${An}(sub)`),i}}async restore(e,r){const n=await super.restore(e,r);return localStorage.setItem(`${An}(sub)`,n.sub),n}async revoke(e){return localStorage.removeItem(`${An}(sub)`),super.revoke(e)}async signIn(e,r){return(r==null?void 0:r.display)==="popup"?this.signInPopup(e,r):this.signInRedirect(e,r)}async signInRedirect(e,r){const n=await this.authorize(e,r);return window.location.href=n.href,new Promise((i,o)=>{setTimeout(s=>{this.abortRequest(n).then(()=>o(s),l=>o(new AggregateError([s,l])))},5e3,new Error("User navigated back"))})}async signInPopup(e,r){var l;const n="width=600,height=600,menubar=no,toolbar=no";let i=window.open("about:blank","_blank",n);const o=`${Math.random().toString(36).slice(2)}`,s=await this.authorize(e,{...r,state:`${Au}${o}`,display:(r==null?void 0:r.display)??"popup"});return(l=r==null?void 0:r.signal)==null||l.throwIfAborted(),i?i.window.location.href=s.href:i=window.open(s.href,"_blank",n),i==null||i.focus(),new Promise((u,c)=>{var w;const d=new BroadcastChannel(JR),f=()=>{var C;clearTimeout(g),d.removeEventListener("message",b),d.close(),(C=r==null?void 0:r.signal)==null||C.removeEventListener("abort",h),i==null||i.close()},h=()=>{var C;c(new Error((C=r==null?void 0:r.signal)!=null&&C.aborted?"Aborted":"Timeout")),f()};(w=r==null?void 0:r.signal)==null||w.addEventListener("abort",h);const g=setTimeout(h,5*6e4),b=async({data:C})=>{var m;if(C.key!==o||!("result"in C))return;d.postMessage({key:o,ack:!0}),f();const{result:y}=C;if(y.status==="fulfilled"){const E=y.value;try{(m=r==null?void 0:r.signal)==null||m.throwIfAborted(),u(await this.restore(E,!1))}catch(A){c(A),this.revoke(E)}}else{const{message:E,params:A}=y.reason;c(new Mp.OAuthCallbackError(new URLSearchParams(A),E))}};d.addEventListener("message",b)})}readCallbackParams(){const e=this.responseMode==="fragment"?new URLSearchParams(location.hash.slice(1)):new URLSearchParams(location.search);if(!e.has("state")||!(e.has("code")||e.has("error")))return null;const r=i=>location.origin===i.origin&&location.pathname===i.pathname;return this.clientMetadata.redirect_uris.map(i=>new URL(i)).some(r)?e:null}async signInCallback(){const e=this.readCallbackParams();if(!e)return null;this.responseMode==="fragment"?history.replaceState(null,"",location.pathname+location.search):this.responseMode==="query"&&history.replaceState(null,"",location.pathname);const r=n=>{const i=new BroadcastChannel(JR);return new Promise(o=>{const s=c=>{clearTimeout(u),i.removeEventListener("message",l),i.close(),o(c)},l=({data:c})=>{"ack"in c&&n.key===c.key&&s(!0)};i.addEventListener("message",l),i.postMessage(n);const u=setTimeout(s,500,!1)})};return this.callback(e).then(async n=>{var i;if((i=n.state)!=null&&i.startsWith(Au))throw await r({key:n.state.slice(Au.length),result:{status:"fulfilled",value:n.session.sub}})||await n.session.signOut(),new Ig.LoginContinuedInParentWindowError;return n}).catch(async n=>{var i;throw n instanceof Mp.OAuthCallbackError&&((i=n.state)!=null&&i.startsWith(Au))?(await r({key:n.state.slice(Au.length),result:{status:"rejected",reason:{message:n.message,params:Array.from(n.params.entries())}}}),new Ig.LoginContinuedInParentWindowError):n}).catch(n=>{throw n instanceof Ig.LoginContinuedInParentWindowError&&window.close(),n})}dispose(){this[Symbol.dispose]()}}Py.BrowserOAuthClient=ph;ik=Symbol.dispose;function GF(t){if(!(0,vf.isOAuthClientIdLoopback)(t.client_id)||window.location.hostname!=="localhost")return;const e=new URL(window.location.href);for(const r of t.redirect_uris){const n=new URL(r);if((n.hostname==="127.0.0.1"||n.hostname==="[::1]")&&(!n.port||n.port===e.port)&&n.protocol===e.protocol&&n.pathname===e.pathname)throw n.port=e.port,window.location.href=n.href,new Error("Redirecting to loopback IP...")}throw new Error(`Please use the loopback IP address instead of ${e}`)}(function(t){var e=S&&S.__createBinding||(Object.create?function(i,o,s,l){l===void 0&&(l=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,l,u)}:function(i,o,s,l){l===void 0&&(l=s),i[l]=o[s]}),r=S&&S.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&e(o,i,s)};Object.defineProperty(t,"__esModule",{value:!0}),t.buildLoopbackClientId=void 0,r(jh,t),r(S0,t),r(Py,t),r(xd,t);var n=jy;Object.defineProperty(t,"buildLoopbackClientId",{enumerable:!0,get:function(){return n.buildLoopbackClientId}})})(Vb);var Ef={},Ls={},Uo={},al={};Object.defineProperty(al,"__esModule",{value:!0});al.toLexUri=HF;al.requiredPropertiesRefinement=XF;const jg=G;function HF(t,e){if(t.split("#").length>2)throw new Error("Uri can only have one hash segment");if(t.startsWith("lex:"))return t;if(t.startsWith("#")){if(!e)throw new Error(`Unable to resolve uri without anchor: ${t}`);return`${e}${t}`}return`lex:${t}`}function XF(t,e){if(t.required!==void 0){if(!Array.isArray(t.required)){e.addIssue({code:jg.z.ZodIssueCode.invalid_type,received:typeof t.required,expected:"array"});return}if(t.properties===void 0){t.required.length>0&&e.addIssue({code:jg.z.ZodIssueCode.custom,message:"Required fields defined but no properties defined"});return}for(const r of t.required)t.properties[r]===void 0&&e.addIssue({code:jg.z.ZodIssueCode.custom,message:`Required field "${r}" not defined`})}}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LexiconDefNotFoundError=t.InvalidLexiconError=t.ValidationError=t.lexiconDoc=t.lexUserType=t.lexRecord=t.lexXrpcSubscription=t.lexXrpcProcedure=t.lexXrpcQuery=t.lexXrpcError=t.lexXrpcSubscriptionMessage=t.lexXrpcBody=t.lexXrpcParameters=t.lexObject=t.lexToken=t.lexPrimitiveArray=t.lexArray=t.lexBlob=t.lexRefVariant=t.lexRefUnion=t.lexRef=t.lexIpldType=t.lexCidLink=t.lexBytes=t.lexPrimitive=t.lexUnknown=t.lexString=t.lexStringFormat=t.lexInteger=t.lexBoolean=void 0,t.isValidLexiconDoc=i,t.isObj=o,t.isDiscriminatedObject=s,t.parseLexiconDoc=l;const e=G,r=jo,n=al;t.lexBoolean=e.z.object({type:e.z.literal("boolean"),description:e.z.string().optional(),default:e.z.boolean().optional(),const:e.z.boolean().optional()}).strict(),t.lexInteger=e.z.object({type:e.z.literal("integer"),description:e.z.string().optional(),default:e.z.number().int().optional(),minimum:e.z.number().int().optional(),maximum:e.z.number().int().optional(),enum:e.z.number().int().array().optional(),const:e.z.number().int().optional()}).strict(),t.lexStringFormat=e.z.enum(["datetime","uri","at-uri","did","handle","at-identifier","nsid","cid","language","tid","record-key"]),t.lexString=e.z.object({type:e.z.literal("string"),format:t.lexStringFormat.optional(),description:e.z.string().optional(),default:e.z.string().optional(),minLength:e.z.number().int().optional(),maxLength:e.z.number().int().optional(),minGraphemes:e.z.number().int().optional(),maxGraphemes:e.z.number().int().optional(),enum:e.z.string().array().optional(),const:e.z.string().optional(),knownValues:e.z.string().array().optional()}).strict(),t.lexUnknown=e.z.object({type:e.z.literal("unknown"),description:e.z.string().optional()}).strict(),t.lexPrimitive=e.z.discriminatedUnion("type",[t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown]),t.lexBytes=e.z.object({type:e.z.literal("bytes"),description:e.z.string().optional(),maxLength:e.z.number().optional(),minLength:e.z.number().optional()}).strict(),t.lexCidLink=e.z.object({type:e.z.literal("cid-link"),description:e.z.string().optional()}).strict(),t.lexIpldType=e.z.discriminatedUnion("type",[t.lexBytes,t.lexCidLink]),t.lexRef=e.z.object({type:e.z.literal("ref"),description:e.z.string().optional(),ref:e.z.string()}).strict(),t.lexRefUnion=e.z.object({type:e.z.literal("union"),description:e.z.string().optional(),refs:e.z.string().array(),closed:e.z.boolean().optional()}).strict(),t.lexRefVariant=e.z.discriminatedUnion("type",[t.lexRef,t.lexRefUnion]),t.lexBlob=e.z.object({type:e.z.literal("blob"),description:e.z.string().optional(),accept:e.z.string().array().optional(),maxSize:e.z.number().optional()}).strict(),t.lexArray=e.z.object({type:e.z.literal("array"),description:e.z.string().optional(),items:e.z.discriminatedUnion("type",[t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown,t.lexBytes,t.lexCidLink,t.lexRef,t.lexRefUnion,t.lexBlob]),minLength:e.z.number().int().optional(),maxLength:e.z.number().int().optional()}).strict(),t.lexPrimitiveArray=t.lexArray.merge(e.z.object({items:t.lexPrimitive}).strict()),t.lexToken=e.z.object({type:e.z.literal("token"),description:e.z.string().optional()}).strict(),t.lexObject=e.z.object({type:e.z.literal("object"),description:e.z.string().optional(),required:e.z.string().array().optional(),nullable:e.z.string().array().optional(),properties:e.z.record(e.z.discriminatedUnion("type",[t.lexArray,t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown,t.lexBytes,t.lexCidLink,t.lexRef,t.lexRefUnion,t.lexBlob]))}).strict().superRefine(n.requiredPropertiesRefinement),t.lexXrpcParameters=e.z.object({type:e.z.literal("params"),description:e.z.string().optional(),required:e.z.string().array().optional(),properties:e.z.record(e.z.discriminatedUnion("type",[t.lexPrimitiveArray,t.lexBoolean,t.lexInteger,t.lexString,t.lexUnknown]))}).strict().superRefine(n.requiredPropertiesRefinement),t.lexXrpcBody=e.z.object({description:e.z.string().optional(),encoding:e.z.string(),schema:e.z.union([t.lexRefVariant,t.lexObject]).optional()}).strict(),t.lexXrpcSubscriptionMessage=e.z.object({description:e.z.string().optional(),schema:e.z.union([t.lexRefVariant,t.lexObject]).optional()}).strict(),t.lexXrpcError=e.z.object({name:e.z.string(),description:e.z.string().optional()}).strict(),t.lexXrpcQuery=e.z.object({type:e.z.literal("query"),description:e.z.string().optional(),parameters:t.lexXrpcParameters.optional(),output:t.lexXrpcBody.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexXrpcProcedure=e.z.object({type:e.z.literal("procedure"),description:e.z.string().optional(),parameters:t.lexXrpcParameters.optional(),input:t.lexXrpcBody.optional(),output:t.lexXrpcBody.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexXrpcSubscription=e.z.object({type:e.z.literal("subscription"),description:e.z.string().optional(),parameters:t.lexXrpcParameters.optional(),message:t.lexXrpcSubscriptionMessage.optional(),errors:t.lexXrpcError.array().optional()}).strict(),t.lexRecord=e.z.object({type:e.z.literal("record"),description:e.z.string().optional(),key:e.z.string().optional(),record:t.lexObject}).strict(),t.lexUserType=e.z.custom(f=>{if(!(!f||typeof f!="object")&&f.type!==void 0)switch(f.type){case"record":return t.lexRecord.parse(f);case"query":return t.lexXrpcQuery.parse(f);case"procedure":return t.lexXrpcProcedure.parse(f);case"subscription":return t.lexXrpcSubscription.parse(f);case"blob":return t.lexBlob.parse(f);case"array":return t.lexArray.parse(f);case"token":return t.lexToken.parse(f);case"object":return t.lexObject.parse(f);case"boolean":return t.lexBoolean.parse(f);case"integer":return t.lexInteger.parse(f);case"string":return t.lexString.parse(f);case"bytes":return t.lexBytes.parse(f);case"cid-link":return t.lexCidLink.parse(f);case"unknown":return t.lexUnknown.parse(f)}},f=>!f||typeof f!="object"?{message:"Must be an object",fatal:!0}:f.type===void 0?{message:"Must have a type",fatal:!0}:typeof f.type!="string"?{message:"Type property must be a string",fatal:!0}:{message:`Invalid type: ${f.type} must be one of: record, query, procedure, subscription, blob, array, token, object, boolean, integer, string, bytes, cid-link, unknown`,fatal:!0}),t.lexiconDoc=e.z.object({lexicon:e.z.literal(1),id:e.z.string().refine(f=>r.NSID.isValid(f),{message:"Must be a valid NSID"}),revision:e.z.number().optional(),description:e.z.string().optional(),defs:e.z.record(t.lexUserType)}).strict().superRefine((f,h)=>{for(const g in f.defs){const b=f.defs[g];g!=="main"&&(b.type==="record"||b.type==="procedure"||b.type==="query"||b.type==="subscription")&&h.addIssue({code:e.z.ZodIssueCode.custom,message:"Records, procedures, queries, and subscriptions must be the main definition."})}});function i(f){return t.lexiconDoc.safeParse(f).success}function o(f){return f!=null&&typeof f=="object"}function s(f){return o(f)&&"$type"in f&&typeof f.$type=="string"}function l(f){return t.lexiconDoc.parse(f),f}class u extends Error{}t.ValidationError=u;class c extends Error{}t.InvalidLexiconError=c;class d extends Error{}t.LexiconDefNotFoundError=d})(Uo);var Uy={},$s={},$o={},M0={},$y={},WF=ok,QR=128,JF=-128,ZF=Math.pow(2,31);function ok(t,e,r){e=e||[],r=r||0;for(var n=r;t>=ZF;)e[r++]=t&255|QR,t/=128;for(;t&JF;)e[r++]=t&255|QR,t>>>=7;return e[r]=t|0,ok.bytes=r-n+1,e}var QF=lv,YF=128,YR=127;function lv(t,n){var r=0,n=n||0,i=0,o=n,s,l=t.length;do{if(o>=l)throw lv.bytes=0,new RangeError("Could not decode varint");s=t[o++],r+=i<28?(s&YR)<<i:(s&YR)*Math.pow(2,i),i+=7}while(s>=YF);return lv.bytes=o-n,r}var eq=Math.pow(2,7),tq=Math.pow(2,14),rq=Math.pow(2,21),nq=Math.pow(2,28),iq=Math.pow(2,35),oq=Math.pow(2,42),sq=Math.pow(2,49),aq=Math.pow(2,56),lq=Math.pow(2,63),uq=function(t){return t<eq?1:t<tq?2:t<rq?3:t<nq?4:t<iq?5:t<oq?6:t<sq?7:t<aq?8:t<lq?9:10},cq={encode:WF,decode:QF,encodingLength:uq},fh=cq;const uv=(t,e=0)=>[fh.decode(t,e),fh.decode.bytes],hh=(t,e,r=0)=>(fh.encode(t,e,r),e),yh=t=>fh.encodingLength(t),dq=(t,e)=>{const r=e.byteLength,n=yh(t),i=n+yh(r),o=new Uint8Array(i+r);return hh(t,o,0),hh(r,o,n),o.set(e,i),new N0(t,r,e,o)},pq=t=>{const e=u0(t),[r,n]=uv(e),[i,o]=uv(e.subarray(n)),s=e.subarray(n+o);if(s.byteLength!==i)throw new Error("Incorrect length");return new N0(r,i,s,e)},fq=(t,e)=>t===e?!0:t.code===e.code&&t.size===e.size&&HN(t.bytes,e.bytes);class N0{constructor(e,r,n,i){this.code=e,this.size=r,this.digest=n,this.bytes=i}}const ci=Oc({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),hq=Oc({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),yq=Object.freeze(Object.defineProperty({__proto__:null,base58btc:ci,base58flickr:hq},Symbol.toStringTag,{value:"Module"})),Gu=Rt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),mq=Rt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gq=Rt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),bq=Rt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),vq=Rt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Eq=Rt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),wq=Rt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),_q=Rt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),xq=Rt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Rq=Object.freeze(Object.defineProperty({__proto__:null,base32:Gu,base32hex:vq,base32hexpad:wq,base32hexpadupper:_q,base32hexupper:Eq,base32pad:gq,base32padupper:bq,base32upper:mq,base32z:xq},Symbol.toStringTag,{value:"Module"}));class Tt{constructor(e,r,n,i){this.code=r,this.version=e,this.multihash=n,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:zp,byteLength:zp,code:Np,version:Np,multihash:Np,bytes:Np,_baseCache:zp,asCID:zp})}toV0(){switch(this.version){case 0:return this;default:{const{code:e,multihash:r}=this;if(e!==Su)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==Tq)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Tt.createV0(r)}}}toV1(){switch(this.version){case 0:{const{code:e,digest:r}=this.multihash,n=dq(e,r);return Tt.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&fq(this.multihash,e.multihash)}toString(e){const{bytes:r,version:n,_baseCache:i}=this;switch(n){case 0:return Sq(r,i,e||ci.encoder);default:return Cq(r,i,e||Gu.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return Lq(/^0\.0/,Pq),!!(e&&(e[tA]||e.asCID===e))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Tt)return e;if(e!=null&&e.asCID===e){const{version:r,code:n,multihash:i,bytes:o}=e;return new Tt(r,n,i,o||eA(r,n,i.bytes))}else if(e!=null&&e[tA]===!0){const{version:r,multihash:n,code:i}=e,o=pq(n);return Tt.create(r,i,o)}else return null}static create(e,r,n){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(e){case 0:{if(r!==Su)throw new Error(`Version 0 CID must use dag-pb (code: ${Su}) block encoding`);return new Tt(e,r,n,n.bytes)}case 1:{const i=eA(e,r,n.bytes);return new Tt(e,r,n,i)}default:throw new Error("Invalid version")}}static createV0(e){return Tt.create(0,Su,e)}static createV1(e,r){return Tt.create(1,e,r)}static decode(e){const[r,n]=Tt.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return r}static decodeFirst(e){const r=Tt.inspectBytes(e),n=r.size-r.multihashSize,i=u0(e.subarray(n,n+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error("Incorrect length");const o=i.subarray(r.multihashSize-r.digestSize),s=new N0(r.multihashCode,r.digestSize,o,i);return[r.version===0?Tt.createV0(s):Tt.createV1(r.codec,s),e.subarray(r.size)]}static inspectBytes(e){let r=0;const n=()=>{const[f,h]=uv(e.subarray(r));return r+=h,f};let i=n(),o=Su;if(i===18?(i=0,r=0):i===1&&(o=n()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);const s=r,l=n(),u=n(),c=r+u,d=c-s;return{version:i,codec:o,multihashCode:l,digestSize:u,multihashSize:d,size:c}}static parse(e,r){const[n,i]=Aq(e,r),o=Tt.decode(i);return o._baseCache.set(n,e),o}}const Aq=(t,e)=>{switch(t[0]){case"Q":{const r=e||ci;return[ci.prefix,r.decode(`${ci.prefix}${t}`)]}case ci.prefix:{const r=e||ci;return[ci.prefix,r.decode(t)]}case Gu.prefix:{const r=e||Gu;return[Gu.prefix,r.decode(t)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}}},Sq=(t,e,r)=>{const{prefix:n}=r;if(n!==ci.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=e.get(n);if(i==null){const o=r.encode(t).slice(1);return e.set(n,o),o}else return i},Cq=(t,e,r)=>{const{prefix:n}=r,i=e.get(n);if(i==null){const o=r.encode(t);return e.set(n,o),o}else return i},Su=112,Tq=18,eA=(t,e,r)=>{const n=yh(t),i=n+yh(e),o=new Uint8Array(i+r.byteLength);return hh(t,o,0),hh(e,o,n),o.set(r,i),o},tA=Symbol.for("@ipld/js-cid/CID"),Np={writable:!1,configurable:!1,enumerable:!0},zp={writable:!1,enumerable:!1,configurable:!1},kq="0.0.0-dev",Lq=(t,e)=>{if(t.test(kq))console.warn(e);else throw new Error(e)},Pq=`CID.isCID(v) is deprecated and will be removed in the next major release.
Following code pattern:
if (CID.isCID(value)) {
doSomethingWithCID(value)
}
Is replaced with:
const cid = CID.asCID(value)
if (cid) {
// Make sure to use cid instead of value
doSomethingWithCID(cid)
}
`,Dq=Object.freeze(Object.defineProperty({__proto__:null,CID:Tt},Symbol.toStringTag,{value:"Module"})),ll=bh(Dq);var Nn={},Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.isObject=Cn.assure=Cn.create=Cn.is=void 0;const Bq=(t,e)=>e.safeParse(t).success;Cn.is=Bq;const Iq=t=>e=>t.safeParse(e).success;Cn.create=Iq;const jq=(t,e)=>t.parse(e);Cn.assure=jq;const Uq=t=>typeof t=="object"&&t!==null;Cn.isObject=Uq;var ja={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseIntWithFallback=t.dedupeStrs=t.range=t.chunkArray=t.errHasMsg=t.isErrnoException=t.asyncFilter=t.s32decode=t.s32encode=t.streamToBuffer=t.flattenUint8Arrays=t.bailableWait=t.wait=t.jitter=t.noUndefinedVals=void 0,t.omit=r;const e=m=>(Object.keys(m).forEach(E=>{m[E]===void 0&&delete m[E]}),m);t.noUndefinedVals=e;function r(m,E){if(!m)return m;const A={},L=Object.keys(m);for(let D=0;D<L.length;D++){const B=L[D];E.includes(B)||(A[B]=m[B])}return A}const n=m=>Math.round((Math.random()-.5)*m*2);t.jitter=n;const i=m=>new Promise(E=>setTimeout(E,m));t.wait=i;const o=m=>{let E;const A=new Promise(L=>{const D=setTimeout(L,m);E=()=>{clearTimeout(D),L()}});return{bail:E,wait:()=>A}};t.bailableWait=o;const s=m=>{const E=m.reduce((D,B)=>D+B.length,0),A=new Uint8Array(E);let L=0;return m.forEach(D=>{A.set(D,L),L+=D.length}),A};t.flattenUint8Arrays=s;const l=async m=>{const E=[];for await(const A of m)E.push(A);return(0,t.flattenUint8Arrays)(E)};t.streamToBuffer=l;const u="234567abcdefghijklmnopqrstuvwxyz",c=m=>{let E="";for(;m;){const A=m%32;m=Math.floor(m/32),E=u.charAt(A)+E}return E};t.s32encode=c;const d=m=>{let E=0;for(const A of m)E=E*32+u.indexOf(A);return E};t.s32decode=d;const f=async(m,E)=>{const A=await Promise.all(m.map(L=>E(L)));return m.filter((L,D)=>A[D])};t.asyncFilter=f;const h=m=>!!m&&m.code;t.isErrnoException=h;const g=(m,E)=>!!m&&typeof m=="object"&&m.message===E;t.errHasMsg=g;const b=(m,E)=>m.reduce((A,L,D)=>{const B=Math.floor(D/E);return A[B]||(A[B]=[]),A[B].push(L),A},[]);t.chunkArray=b;const w=m=>{const E=[];for(let A=0;A<m;A++)E.push(A);return E};t.range=w;const C=m=>[...new Set(m)];t.dedupeStrs=C;const y=(m,E)=>{const A=parseInt(m||"",10);return isNaN(A)?E:A};t.parseIntWithFallback=y})(ja);var Rd={};Object.defineProperty(Rd,"__esModule",{value:!0});Rd.mapDefined=void 0;Rd.keyBy=$q;function $q(t,e){return t.reduce((r,n)=>(r.set(n[e],n),r),new Map)}const Oq=(t,e)=>{const r=[];for(const n of t){const i=e(n);i!==void 0&&r.push(i)}return r};Rd.mapDefined=Oq;var sk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncBufferFullError=t.AsyncBuffer=t.allComplete=t.createDeferrables=t.createDeferrable=t.readFromGenerator=void 0,t.allFulfilled=u,t.handleAllSettledErrors=c,t.isRejectedResult=d,t.isFulfilledResult=h;const e=ja,r=async(w,C,y=Promise.resolve(),m=Number.MAX_SAFE_INTEGER)=>{const E=[];let A,L=!1;const D=async()=>{if(await C(E.at(-1)))return!0;const j=(0,e.bailableWait)(20);return await j.wait(),A=j.bail,L?!1:await D()},B=new Promise(j=>{y.then(()=>{D().then(()=>j())})});try{for(;E.length<m;){const j=await Promise.race([w.next(),B]);if(!j)break;const pe=j;if(pe.done)break;E.push(pe.value)}}finally{L=!0,A&&A()}return E};t.readFromGenerator=r;const n=()=>{let w;const C=new Promise(y=>{w=()=>y()});return{resolve:w,complete:C}};t.createDeferrable=n;const i=w=>{const C=[];for(let y=0;y<w;y++)C.push((0,t.createDeferrable)());return C};t.createDeferrables=i;const o=async w=>{await Promise.all(w.map(C=>C.complete))};t.allComplete=o;class s{constructor(C){Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:C}),Object.defineProperty(this,"buffer",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"promise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolve",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"closed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"toThrow",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.promise=Promise.resolve(),this.resolve=()=>null,this.resetPromise()}get curr(){return this.buffer}get size(){return this.buffer.length}get isClosed(){return this.closed}resetPromise(){this.promise=new Promise(C=>this.resolve=C)}push(C){this.buffer.push(C),this.resolve()}pushMany(C){C.forEach(y=>this.buffer.push(y)),this.resolve()}async*events(){for(;;){if(this.closed&&this.buffer.length===0){if(this.toThrow)throw this.toThrow;return}if(await this.promise,this.toThrow)throw this.toThrow;if(this.maxSize&&this.size>this.maxSize)throw new l(this.maxSize);const[C,...y]=this.buffer;C?(this.buffer=y,yield C):this.resetPromise()}}throw(C){this.toThrow=C,this.closed=!0,this.resolve()}close(){this.closed=!0,this.resolve()}}t.AsyncBuffer=s;class l extends Error{constructor(C){super(`ReachedMaxBufferSize: ${C}`)}}t.AsyncBufferFullError=l;function u(w){return Promise.allSettled(w).then(c)}function c(w){const C=w.filter(d).map(f);if(C.length===0)return w.map(g);throw C.length===1?C[0]:new AggregateError(C,`Multiple errors: ${C.map(b).join(`
`)}`)}function d(w){return w.status==="rejected"}function f(w){return w.reason}function h(w){return w.status==="fulfilled"}function g(w){return w.value}function b(w){return w instanceof Error?w.message:String(w)}})(sk);var Oy={};Object.defineProperty(Oy,"__esModule",{value:!0});Oy.TID=void 0;const Fp=ja,rA=13;let Ug=0,nA=0,qp=null;function iA(t){return t.replaceAll("-","")}class Hi{constructor(e){Object.defineProperty(this,"str",{enumerable:!0,configurable:!0,writable:!0,value:void 0});const r=iA(e);if(r.length!==rA)throw new Error(`Poorly formatted TID: ${r.length} length`);this.str=r}static next(e){const r=Math.max(Date.now(),Ug);r===Ug&&nA++,Ug=r;const n=r*1e3+nA;qp===null&&(qp=Math.floor(Math.random()*32));const i=Hi.fromTime(n,qp);return!e||i.newerThan(e)?i:Hi.fromTime(e.timestamp()+1,qp)}static nextStr(e){return Hi.next(e?new Hi(e):void 0).toString()}static fromTime(e,r){const n=`${(0,Fp.s32encode)(e)}${(0,Fp.s32encode)(r).padStart(2,"2")}`;return new Hi(n)}static fromStr(e){return new Hi(e)}static oldestFirst(e,r){return e.compareTo(r)}static newestFirst(e,r){return r.compareTo(e)}static is(e){return iA(e).length===rA}timestamp(){return(0,Fp.s32decode)(this.str.slice(0,11))}clockid(){return(0,Fp.s32decode)(this.str.slice(11,13))}formatted(){const e=this.toString();return`${e.slice(0,4)}-${e.slice(4,7)}-${e.slice(7,11)}-${e.slice(11,13)}`}toString(){return this.str}compareTo(e){return this.str>e.str?1:this.str<e.str?-1:0}equals(e){return this.str===e.str}newerThan(e){return this.compareTo(e)>0}olderThan(e){return this.compareTo(e)<0}}Oy.TID=Hi;var ak={};function Kq(t,e){for(let r=0;r<t.byteLength;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return t.byteLength>e.byteLength?1:t.byteLength<e.byteLength?-1:0}function Vq(t,e){e||(e=t.reduce((i,o)=>i+o.length,0));const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function Mq(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}const Nq=Mh({prefix:"\0",name:"identity",encode:t=>WN(t),decode:t=>XN(t)}),zq=Object.freeze(Object.defineProperty({__proto__:null,identity:Nq},Symbol.toStringTag,{value:"Module"})),Fq=Rt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),qq=Object.freeze(Object.defineProperty({__proto__:null,base2:Fq},Symbol.toStringTag,{value:"Module"})),Gq=Rt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Hq=Object.freeze(Object.defineProperty({__proto__:null,base8:Gq},Symbol.toStringTag,{value:"Module"})),Xq=Oc({prefix:"9",name:"base10",alphabet:"0123456789"}),Wq=Object.freeze(Object.defineProperty({__proto__:null,base10:Xq},Symbol.toStringTag,{value:"Module"})),Jq=Rt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Zq=Rt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Qq=Object.freeze(Object.defineProperty({__proto__:null,base16:Jq,base16upper:Zq},Symbol.toStringTag,{value:"Module"})),Yq=Oc({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),eG=Oc({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),tG=Object.freeze(Object.defineProperty({__proto__:null,base36:Yq,base36upper:eG},Symbol.toStringTag,{value:"Module"})),lk=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),rG=lk.reduce((t,e,r)=>(t[r]=e,t),[]),nG=lk.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function iG(t){return t.reduce((e,r)=>(e+=rG[r],e),"")}function oG(t){const e=[];for(const r of t){const n=nG[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const sG=Mh({prefix:"🚀",name:"base256emoji",encode:iG,decode:oG}),aG=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:sG},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const oA={...zq,...qq,...Hq,...Wq,...Qq,...Rq,...tG,...yq,...cC,...aG};function uk(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const sA=uk("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),$g=uk("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),ck={utf8:sA,"utf-8":sA,hex:oA.base16,latin1:$g,ascii:$g,binary:$g,...oA};function lG(t,e="utf8"){const r=ck[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return r.decoder.decode(`${r.prefix}${t}`)}function uG(t,e="utf8"){const r=ck[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return r.encoder.encode(t).substring(1)}function cG(t,e){if(t.length!==e.length)throw new Error("Inputs should have the same length");const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}const dG=Object.freeze(Object.defineProperty({__proto__:null,compare:Kq,concat:Vq,equals:Mq,fromString:lG,toString:uG,xor:cG},Symbol.toStringTag,{value:"Module"})),dk=bh(dG);(function(t){var e=S&&S.__createBinding||(Object.create?function(c,d,f,h){h===void 0&&(h=f);var g=Object.getOwnPropertyDescriptor(d,f);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[f]}}),Object.defineProperty(c,h,g)}:function(c,d,f,h){h===void 0&&(h=f),c[h]=d[f]}),r=S&&S.__setModuleDefault||(Object.create?function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}:function(c,d){c.default=d}),n=S&&S.__importStar||function(){var c=function(d){return c=Object.getOwnPropertyNames||function(f){var h=[];for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(h[h.length]=g);return h},c(d)};return function(d){if(d&&d.__esModule)return d;var f={};if(d!=null)for(var h=c(d),g=0;g<h.length;g++)h[g]!=="default"&&e(f,d,h[g]);return r(f,d),f}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ipldEquals=t.ipldToJson=t.jsonToIpld=void 0;const i=ll,o=n(dk),s=c=>{if(Array.isArray(c))return c.map(d=>(0,t.jsonToIpld)(d));if(c&&typeof c=="object"){if(typeof c.$link=="string"&&Object.keys(c).length===1)return i.CID.parse(c.$link);if(typeof c.$bytes=="string"&&Object.keys(c).length===1)return o.fromString(c.$bytes,"base64");const d={};for(const f of Object.keys(c))d[f]=(0,t.jsonToIpld)(c[f]);return d}return c};t.jsonToIpld=s;const l=c=>{if(Array.isArray(c))return c.map(d=>(0,t.ipldToJson)(d));if(c&&typeof c=="object"){if(c instanceof Uint8Array)return{$bytes:o.toString(c,"base64")};if(i.CID.asCID(c))return{$link:c.toString()};const d={};for(const f of Object.keys(c))d[f]=(0,t.ipldToJson)(c[f]);return d}return c};t.ipldToJson=l;const u=(c,d)=>{var f;if(Array.isArray(c)&&Array.isArray(d)){if(c.length!==d.length)return!1;for(let h=0;h<c.length;h++)if(!(0,t.ipldEquals)(c[h],d[h]))return!1;return!0}if(c&&d&&typeof c=="object"&&typeof d=="object"){if(c instanceof Uint8Array&&d instanceof Uint8Array)return o.equals(c,d);if(i.CID.asCID(c)&&i.CID.asCID(d))return(f=i.CID.asCID(c))==null?void 0:f.equals(i.CID.asCID(d));if(Object.keys(c).length!==Object.keys(d).length)return!1;for(const h of Object.keys(c))if(!(0,t.ipldEquals)(c[h],d[h]))return!1;return!0}return c===d};t.ipldEquals=u})(ak);var Ad={};Object.defineProperty(Ad,"__esModule",{value:!0});Ad.retry=pk;Ad.createRetryable=fG;Ad.backoffMs=fk;const pG=ja;async function pk(t,e={}){const{maxRetries:r=3,retryable:n=()=>!0,getWaitMs:i=fk}=e;let o=0,s;for(;!s;)try{return await t()}catch(l){const u=i(o);o<r&&u!==null&&n(l)?(o+=1,u!==0&&await(0,pG.wait)(u)):s=l}throw s}function fG(t){return async(e,r)=>pk(e,{...r,retryable:t})}function fk(t,e=100,r=1e3){const n=Math.pow(2,t)*e,i=Math.min(n,r);return hG(i)}function hG(t){const e=t*.15;return t+yG(-e,e)}function yG(t,e){return Math.random()*(e-t)+t}var hk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.def=t.schema=void 0;const e=ll,r=G,n=r.z.unknown().transform((o,s)=>{const l=e.CID.asCID(o);return l??(s.addIssue({code:r.z.ZodIssueCode.custom,message:"Not a valid CID"}),r.z.NEVER)}),i=r.z.object({version:r.z.literal(1),roots:r.z.array(n)});t.schema={cid:n,carHeader:i,bytes:r.z.instanceof(Uint8Array),string:r.z.string(),array:r.z.array(r.z.unknown()),map:r.z.record(r.z.string(),r.z.unknown()),unknown:r.z.unknown()},t.def={cid:{name:"cid",schema:t.schema.cid},carHeader:{name:"CAR header",schema:t.schema.carHeader},bytes:{name:"bytes",schema:t.schema.bytes},string:{name:"string",schema:t.schema.string},map:{name:"map",schema:t.schema.map},unknown:{name:"unknown",schema:t.schema.unknown}}})(hk);var yk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.addHoursToDate=t.lessThanAgoMs=t.DAY=t.HOUR=t.MINUTE=t.SECOND=void 0,t.SECOND=1e3,t.MINUTE=t.SECOND*60,t.HOUR=t.MINUTE*60,t.DAY=t.HOUR*24;const e=(n,i)=>Date.now()<n.getTime()+i;t.lessThanAgoMs=e;const r=(n,i)=>{const o=i?new Date(i):new Date;return o.setHours(o.getHours()+n),o};t.addHoursToDate=r})(yk);var er={},z0={},F0={},q0={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENDED_PICTOGRAPHIC=t.CLUSTER_BREAK=void 0,function(e){e[e.CR=0]="CR",e[e.LF=1]="LF",e[e.CONTROL=2]="CONTROL",e[e.EXTEND=3]="EXTEND",e[e.REGIONAL_INDICATOR=4]="REGIONAL_INDICATOR",e[e.SPACINGMARK=5]="SPACINGMARK",e[e.L=6]="L",e[e.V=7]="V",e[e.T=8]="T",e[e.LV=9]="LV",e[e.LVT=10]="LVT",e[e.OTHER=11]="OTHER",e[e.PREPEND=12]="PREPEND",e[e.E_BASE=13]="E_BASE",e[e.E_MODIFIER=14]="E_MODIFIER",e[e.ZWJ=15]="ZWJ",e[e.GLUE_AFTER_ZWJ=16]="GLUE_AFTER_ZWJ",e[e.E_BASE_GAZ=17]="E_BASE_GAZ"}(t.CLUSTER_BREAK||(t.CLUSTER_BREAK={})),t.EXTENDED_PICTOGRAPHIC=101})(q0);var G0={};Object.defineProperty(G0,"__esModule",{value:!0});const fe=q0,ri=0,Og=1,mG=2,gG=3,bG=4;class vG{static isSurrogate(e,r){return 55296<=e.charCodeAt(r)&&e.charCodeAt(r)<=56319&&56320<=e.charCodeAt(r+1)&&e.charCodeAt(r+1)<=57343}static codePointAt(e,r){r===void 0&&(r=0);const n=e.charCodeAt(r);if(55296<=n&&n<=56319&&r<e.length-1){const i=n,o=e.charCodeAt(r+1);return 56320<=o&&o<=57343?(i-55296)*1024+(o-56320)+65536:i}if(56320<=n&&n<=57343&&r>=1){const i=e.charCodeAt(r-1),o=n;return 55296<=i&&i<=56319?(i-55296)*1024+(o-56320)+65536:o}return n}static shouldBreak(e,r,n,i,o,s){const l=[e].concat(r).concat([n]),u=[i].concat(o).concat([s]),c=l[l.length-2],d=n,f=s,h=l.lastIndexOf(fe.CLUSTER_BREAK.REGIONAL_INDICATOR);if(h>0&&l.slice(1,h).every(function(b){return b===fe.CLUSTER_BREAK.REGIONAL_INDICATOR})&&[fe.CLUSTER_BREAK.PREPEND,fe.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(c)===-1)return l.filter(function(b){return b===fe.CLUSTER_BREAK.REGIONAL_INDICATOR}).length%2===1?gG:bG;if(c===fe.CLUSTER_BREAK.CR&&d===fe.CLUSTER_BREAK.LF)return ri;if(c===fe.CLUSTER_BREAK.CONTROL||c===fe.CLUSTER_BREAK.CR||c===fe.CLUSTER_BREAK.LF)return Og;if(d===fe.CLUSTER_BREAK.CONTROL||d===fe.CLUSTER_BREAK.CR||d===fe.CLUSTER_BREAK.LF)return Og;if(c===fe.CLUSTER_BREAK.L&&(d===fe.CLUSTER_BREAK.L||d===fe.CLUSTER_BREAK.V||d===fe.CLUSTER_BREAK.LV||d===fe.CLUSTER_BREAK.LVT))return ri;if((c===fe.CLUSTER_BREAK.LV||c===fe.CLUSTER_BREAK.V)&&(d===fe.CLUSTER_BREAK.V||d===fe.CLUSTER_BREAK.T))return ri;if((c===fe.CLUSTER_BREAK.LVT||c===fe.CLUSTER_BREAK.T)&&d===fe.CLUSTER_BREAK.T)return ri;if(d===fe.CLUSTER_BREAK.EXTEND||d===fe.CLUSTER_BREAK.ZWJ)return ri;if(d===fe.CLUSTER_BREAK.SPACINGMARK)return ri;if(c===fe.CLUSTER_BREAK.PREPEND)return ri;const g=u.slice(0,-1).lastIndexOf(fe.EXTENDED_PICTOGRAPHIC);return g!==-1&&u[g]===fe.EXTENDED_PICTOGRAPHIC&&l.slice(g+1,-2).every(function(b){return b===fe.CLUSTER_BREAK.EXTEND})&&c===fe.CLUSTER_BREAK.ZWJ&&f===fe.EXTENDED_PICTOGRAPHIC?ri:r.indexOf(fe.CLUSTER_BREAK.REGIONAL_INDICATOR)!==-1?mG:c===fe.CLUSTER_BREAK.REGIONAL_INDICATOR&&d===fe.CLUSTER_BREAK.REGIONAL_INDICATOR?ri:Og}}G0.default=vG;var H0={};Object.defineProperty(H0,"__esModule",{value:!0});class EG{constructor(e,r){this._index=0,this._str=e,this._nextBreak=r}[Symbol.iterator](){return this}next(){let e;if((e=this._nextBreak(this._str,this._index))<this._str.length){const r=this._str.slice(this._index,e);return this._index=e,{value:r,done:!1}}if(this._index<this._str.length){const r=this._str.slice(this._index);return this._index=this._str.length,{value:r,done:!1}}return{value:void 0,done:!0}}}H0.default=EG;var mk=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(F0,"__esModule",{value:!0});const a=q0,Gp=mk(G0),wG=mk(H0);class ai{static nextBreak(e,r){if(r===void 0&&(r=0),r<0)return 0;if(r>=e.length-1)return e.length;const n=Gp.default.codePointAt(e,r),i=ai.getGraphemeBreakProperty(n),o=ai.getEmojiProperty(n),s=[],l=[];for(let u=r+1;u<e.length;u++){if(Gp.default.isSurrogate(e,u-1))continue;const c=Gp.default.codePointAt(e,u),d=ai.getGraphemeBreakProperty(c),f=ai.getEmojiProperty(c);if(Gp.default.shouldBreak(i,s,d,o,l,f))return u;s.push(d),l.push(f)}return e.length}splitGraphemes(e){const r=[];let n=0,i;for(;(i=ai.nextBreak(e,n))<e.length;)r.push(e.slice(n,i)),n=i;return n<e.length&&r.push(e.slice(n)),r}iterateGraphemes(e){return new wG.default(e,ai.nextBreak)}countGraphemes(e){let r=0,n=0,i;for(;(i=ai.nextBreak(e,n))<e.length;)n=i,r++;return n<e.length&&r++,r}static getGraphemeBreakProperty(e){if(e<48905){if(e<44116){if(e<4141){if(e<2818){if(e<2363)if(e<1759){if(e<1471){if(e<127){if(e<11){if(e<10){if(0<=e&&e<=9)return a.CLUSTER_BREAK.CONTROL}else if(e===10)return a.CLUSTER_BREAK.LF}else if(e<13){if(11<=e&&e<=12)return a.CLUSTER_BREAK.CONTROL}else if(e<14){if(e===13)return a.CLUSTER_BREAK.CR}else if(14<=e&&e<=31)return a.CLUSTER_BREAK.CONTROL}else if(e<768){if(e<173){if(127<=e&&e<=159)return a.CLUSTER_BREAK.CONTROL}else if(e===173)return a.CLUSTER_BREAK.CONTROL}else if(e<1155){if(768<=e&&e<=879)return a.CLUSTER_BREAK.EXTEND}else if(e<1425){if(1155<=e&&e<=1161)return a.CLUSTER_BREAK.EXTEND}else if(1425<=e&&e<=1469)return a.CLUSTER_BREAK.EXTEND}else if(e<1552){if(e<1476){if(e<1473){if(e===1471)return a.CLUSTER_BREAK.EXTEND}else if(1473<=e&&e<=1474)return a.CLUSTER_BREAK.EXTEND}else if(e<1479){if(1476<=e&&e<=1477)return a.CLUSTER_BREAK.EXTEND}else if(e<1536){if(e===1479)return a.CLUSTER_BREAK.EXTEND}else if(1536<=e&&e<=1541)return a.CLUSTER_BREAK.PREPEND}else if(e<1648){if(e<1564){if(1552<=e&&e<=1562)return a.CLUSTER_BREAK.EXTEND}else if(e<1611){if(e===1564)return a.CLUSTER_BREAK.CONTROL}else if(1611<=e&&e<=1631)return a.CLUSTER_BREAK.EXTEND}else if(e<1750){if(e===1648)return a.CLUSTER_BREAK.EXTEND}else if(e<1757){if(1750<=e&&e<=1756)return a.CLUSTER_BREAK.EXTEND}else if(e===1757)return a.CLUSTER_BREAK.PREPEND}else if(e<2075){if(e<1840)if(e<1770){if(e<1767){if(1759<=e&&e<=1764)return a.CLUSTER_BREAK.EXTEND}else if(1767<=e&&e<=1768)return a.CLUSTER_BREAK.EXTEND}else if(e<1807){if(1770<=e&&e<=1773)return a.CLUSTER_BREAK.EXTEND}else{if(e===1807)return a.CLUSTER_BREAK.PREPEND;if(e===1809)return a.CLUSTER_BREAK.EXTEND}else if(e<2027){if(e<1958){if(1840<=e&&e<=1866)return a.CLUSTER_BREAK.EXTEND}else if(1958<=e&&e<=1968)return a.CLUSTER_BREAK.EXTEND}else if(e<2045){if(2027<=e&&e<=2035)return a.CLUSTER_BREAK.EXTEND}else if(e<2070){if(e===2045)return a.CLUSTER_BREAK.EXTEND}else if(2070<=e&&e<=2073)return a.CLUSTER_BREAK.EXTEND}else if(e<2200){if(e<2089){if(e<2085){if(2075<=e&&e<=2083)return a.CLUSTER_BREAK.EXTEND}else if(2085<=e&&e<=2087)return a.CLUSTER_BREAK.EXTEND}else if(e<2137){if(2089<=e&&e<=2093)return a.CLUSTER_BREAK.EXTEND}else if(e<2192){if(2137<=e&&e<=2139)return a.CLUSTER_BREAK.EXTEND}else if(2192<=e&&e<=2193)return a.CLUSTER_BREAK.PREPEND}else if(e<2275){if(e<2250){if(2200<=e&&e<=2207)return a.CLUSTER_BREAK.EXTEND}else if(e<2274){if(2250<=e&&e<=2273)return a.CLUSTER_BREAK.EXTEND}else if(e===2274)return a.CLUSTER_BREAK.PREPEND}else if(e<2307){if(2275<=e&&e<=2306)return a.CLUSTER_BREAK.EXTEND}else{if(e===2307)return a.CLUSTER_BREAK.SPACINGMARK;if(e===2362)return a.CLUSTER_BREAK.EXTEND}else if(e<2561){if(e<2434){if(e<2381){if(e<2366){if(e===2363)return a.CLUSTER_BREAK.SPACINGMARK;if(e===2364)return a.CLUSTER_BREAK.EXTEND}else if(e<2369){if(2366<=e&&e<=2368)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<2377){if(2369<=e&&e<=2376)return a.CLUSTER_BREAK.EXTEND}else if(2377<=e&&e<=2380)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<2385){if(e<2382){if(e===2381)return a.CLUSTER_BREAK.EXTEND}else if(2382<=e&&e<=2383)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<2402){if(2385<=e&&e<=2391)return a.CLUSTER_BREAK.EXTEND}else if(e<2433){if(2402<=e&&e<=2403)return a.CLUSTER_BREAK.EXTEND}else if(e===2433)return a.CLUSTER_BREAK.EXTEND}else if(e<2503){if(e<2494){if(e<2492){if(2434<=e&&e<=2435)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===2492)return a.CLUSTER_BREAK.EXTEND}else if(e<2495){if(e===2494)return a.CLUSTER_BREAK.EXTEND}else if(e<2497){if(2495<=e&&e<=2496)return a.CLUSTER_BREAK.SPACINGMARK}else if(2497<=e&&e<=2500)return a.CLUSTER_BREAK.EXTEND}else if(e<2519){if(e<2507){if(2503<=e&&e<=2504)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<2509){if(2507<=e&&e<=2508)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===2509)return a.CLUSTER_BREAK.EXTEND}else if(e<2530){if(e===2519)return a.CLUSTER_BREAK.EXTEND}else if(e<2558){if(2530<=e&&e<=2531)return a.CLUSTER_BREAK.EXTEND}else if(e===2558)return a.CLUSTER_BREAK.EXTEND}else if(e<2691){if(e<2631){if(e<2620){if(e<2563){if(2561<=e&&e<=2562)return a.CLUSTER_BREAK.EXTEND}else if(e===2563)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<2622){if(e===2620)return a.CLUSTER_BREAK.EXTEND}else if(e<2625){if(2622<=e&&e<=2624)return a.CLUSTER_BREAK.SPACINGMARK}else if(2625<=e&&e<=2626)return a.CLUSTER_BREAK.EXTEND}else if(e<2672){if(e<2635){if(2631<=e&&e<=2632)return a.CLUSTER_BREAK.EXTEND}else if(e<2641){if(2635<=e&&e<=2637)return a.CLUSTER_BREAK.EXTEND}else if(e===2641)return a.CLUSTER_BREAK.EXTEND}else if(e<2677){if(2672<=e&&e<=2673)return a.CLUSTER_BREAK.EXTEND}else if(e<2689){if(e===2677)return a.CLUSTER_BREAK.EXTEND}else if(2689<=e&&e<=2690)return a.CLUSTER_BREAK.EXTEND}else if(e<2761){if(e<2750){if(e===2691)return a.CLUSTER_BREAK.SPACINGMARK;if(e===2748)return a.CLUSTER_BREAK.EXTEND}else if(e<2753){if(2750<=e&&e<=2752)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<2759){if(2753<=e&&e<=2757)return a.CLUSTER_BREAK.EXTEND}else if(2759<=e&&e<=2760)return a.CLUSTER_BREAK.EXTEND}else if(e<2786){if(e<2763){if(e===2761)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<2765){if(2763<=e&&e<=2764)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===2765)return a.CLUSTER_BREAK.EXTEND}else if(e<2810){if(2786<=e&&e<=2787)return a.CLUSTER_BREAK.EXTEND}else if(e<2817){if(2810<=e&&e<=2815)return a.CLUSTER_BREAK.EXTEND}else if(e===2817)return a.CLUSTER_BREAK.EXTEND}else if(e<3315){if(e<3076){if(e<2946){if(e<2887){if(e<2878){if(e<2876){if(2818<=e&&e<=2819)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===2876)return a.CLUSTER_BREAK.EXTEND}else if(e<2880){if(2878<=e&&e<=2879)return a.CLUSTER_BREAK.EXTEND}else if(e<2881){if(e===2880)return a.CLUSTER_BREAK.SPACINGMARK}else if(2881<=e&&e<=2884)return a.CLUSTER_BREAK.EXTEND}else if(e<2893){if(e<2891){if(2887<=e&&e<=2888)return a.CLUSTER_BREAK.SPACINGMARK}else if(2891<=e&&e<=2892)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<2901){if(e===2893)return a.CLUSTER_BREAK.EXTEND}else if(e<2914){if(2901<=e&&e<=2903)return a.CLUSTER_BREAK.EXTEND}else if(2914<=e&&e<=2915)return a.CLUSTER_BREAK.EXTEND}else if(e<3014){if(e<3007){if(e===2946||e===3006)return a.CLUSTER_BREAK.EXTEND}else if(e<3008){if(e===3007)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3009){if(e===3008)return a.CLUSTER_BREAK.EXTEND}else if(3009<=e&&e<=3010)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3031){if(e<3018){if(3014<=e&&e<=3016)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3021){if(3018<=e&&e<=3020)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===3021)return a.CLUSTER_BREAK.EXTEND}else if(e<3072){if(e===3031)return a.CLUSTER_BREAK.EXTEND}else if(e<3073){if(e===3072)return a.CLUSTER_BREAK.EXTEND}else if(3073<=e&&e<=3075)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3262){if(e<3146){if(e<3134){if(e===3076||e===3132)return a.CLUSTER_BREAK.EXTEND}else if(e<3137){if(3134<=e&&e<=3136)return a.CLUSTER_BREAK.EXTEND}else if(e<3142){if(3137<=e&&e<=3140)return a.CLUSTER_BREAK.SPACINGMARK}else if(3142<=e&&e<=3144)return a.CLUSTER_BREAK.EXTEND}else if(e<3201){if(e<3157){if(3146<=e&&e<=3149)return a.CLUSTER_BREAK.EXTEND}else if(e<3170){if(3157<=e&&e<=3158)return a.CLUSTER_BREAK.EXTEND}else if(3170<=e&&e<=3171)return a.CLUSTER_BREAK.EXTEND}else if(e<3202){if(e===3201)return a.CLUSTER_BREAK.EXTEND}else if(e<3260){if(3202<=e&&e<=3203)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===3260)return a.CLUSTER_BREAK.EXTEND}else if(e<3270){if(e<3264){if(e===3262)return a.CLUSTER_BREAK.SPACINGMARK;if(e===3263)return a.CLUSTER_BREAK.EXTEND}else if(e<3266){if(3264<=e&&e<=3265)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3267){if(e===3266)return a.CLUSTER_BREAK.EXTEND}else if(3267<=e&&e<=3268)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3276){if(e<3271){if(e===3270)return a.CLUSTER_BREAK.EXTEND}else if(e<3274){if(3271<=e&&e<=3272)return a.CLUSTER_BREAK.SPACINGMARK}else if(3274<=e&&e<=3275)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3285){if(3276<=e&&e<=3277)return a.CLUSTER_BREAK.EXTEND}else if(e<3298){if(3285<=e&&e<=3286)return a.CLUSTER_BREAK.EXTEND}else if(3298<=e&&e<=3299)return a.CLUSTER_BREAK.EXTEND}else if(e<3551){if(e<3406){if(e<3391){if(e<3330){if(e<3328){if(e===3315)return a.CLUSTER_BREAK.SPACINGMARK}else if(3328<=e&&e<=3329)return a.CLUSTER_BREAK.EXTEND}else if(e<3387){if(3330<=e&&e<=3331)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3390){if(3387<=e&&e<=3388)return a.CLUSTER_BREAK.EXTEND}else if(e===3390)return a.CLUSTER_BREAK.EXTEND}else if(e<3398){if(e<3393){if(3391<=e&&e<=3392)return a.CLUSTER_BREAK.SPACINGMARK}else if(3393<=e&&e<=3396)return a.CLUSTER_BREAK.EXTEND}else if(e<3402){if(3398<=e&&e<=3400)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3405){if(3402<=e&&e<=3404)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===3405)return a.CLUSTER_BREAK.EXTEND}else if(e<3530){if(e<3426){if(e===3406)return a.CLUSTER_BREAK.PREPEND;if(e===3415)return a.CLUSTER_BREAK.EXTEND}else if(e<3457){if(3426<=e&&e<=3427)return a.CLUSTER_BREAK.EXTEND}else if(e<3458){if(e===3457)return a.CLUSTER_BREAK.EXTEND}else if(3458<=e&&e<=3459)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3538){if(e<3535){if(e===3530)return a.CLUSTER_BREAK.EXTEND}else if(e<3536){if(e===3535)return a.CLUSTER_BREAK.EXTEND}else if(3536<=e&&e<=3537)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3542){if(3538<=e&&e<=3540)return a.CLUSTER_BREAK.EXTEND}else if(e<3544){if(e===3542)return a.CLUSTER_BREAK.EXTEND}else if(3544<=e&&e<=3550)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3893){if(e<3655){if(e<3633){if(e<3570){if(e===3551)return a.CLUSTER_BREAK.EXTEND}else if(3570<=e&&e<=3571)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3635){if(e===3633)return a.CLUSTER_BREAK.EXTEND}else if(e<3636){if(e===3635)return a.CLUSTER_BREAK.SPACINGMARK}else if(3636<=e&&e<=3642)return a.CLUSTER_BREAK.EXTEND}else if(e<3764)if(e<3761){if(3655<=e&&e<=3662)return a.CLUSTER_BREAK.EXTEND}else{if(e===3761)return a.CLUSTER_BREAK.EXTEND;if(e===3763)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3784){if(3764<=e&&e<=3772)return a.CLUSTER_BREAK.EXTEND}else if(e<3864){if(3784<=e&&e<=3790)return a.CLUSTER_BREAK.EXTEND}else if(3864<=e&&e<=3865)return a.CLUSTER_BREAK.EXTEND}else if(e<3967){if(e<3897){if(e===3893||e===3895)return a.CLUSTER_BREAK.EXTEND}else if(e<3902){if(e===3897)return a.CLUSTER_BREAK.EXTEND}else if(e<3953){if(3902<=e&&e<=3903)return a.CLUSTER_BREAK.SPACINGMARK}else if(3953<=e&&e<=3966)return a.CLUSTER_BREAK.EXTEND}else if(e<3981){if(e<3968){if(e===3967)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<3974){if(3968<=e&&e<=3972)return a.CLUSTER_BREAK.EXTEND}else if(3974<=e&&e<=3975)return a.CLUSTER_BREAK.EXTEND}else if(e<3993){if(3981<=e&&e<=3991)return a.CLUSTER_BREAK.EXTEND}else if(e<4038){if(3993<=e&&e<=4028)return a.CLUSTER_BREAK.EXTEND}else if(e===4038)return a.CLUSTER_BREAK.EXTEND}else if(e<7204){if(e<6448){if(e<5938){if(e<4226){if(e<4157){if(e<4146){if(e<4145){if(4141<=e&&e<=4144)return a.CLUSTER_BREAK.EXTEND}else if(e===4145)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<4153){if(4146<=e&&e<=4151)return a.CLUSTER_BREAK.EXTEND}else if(e<4155){if(4153<=e&&e<=4154)return a.CLUSTER_BREAK.EXTEND}else if(4155<=e&&e<=4156)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<4184){if(e<4182){if(4157<=e&&e<=4158)return a.CLUSTER_BREAK.EXTEND}else if(4182<=e&&e<=4183)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<4190){if(4184<=e&&e<=4185)return a.CLUSTER_BREAK.EXTEND}else if(e<4209){if(4190<=e&&e<=4192)return a.CLUSTER_BREAK.EXTEND}else if(4209<=e&&e<=4212)return a.CLUSTER_BREAK.EXTEND}else if(e<4352){if(e<4229){if(e===4226)return a.CLUSTER_BREAK.EXTEND;if(e===4228)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<4237){if(4229<=e&&e<=4230)return a.CLUSTER_BREAK.EXTEND}else if(e===4237||e===4253)return a.CLUSTER_BREAK.EXTEND}else if(e<4957){if(e<4448){if(4352<=e&&e<=4447)return a.CLUSTER_BREAK.L}else if(e<4520){if(4448<=e&&e<=4519)return a.CLUSTER_BREAK.V}else if(4520<=e&&e<=4607)return a.CLUSTER_BREAK.T}else if(e<5906){if(4957<=e&&e<=4959)return a.CLUSTER_BREAK.EXTEND}else if(e<5909){if(5906<=e&&e<=5908)return a.CLUSTER_BREAK.EXTEND}else if(e===5909)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6089){if(e<6070){if(e<5970){if(e<5940){if(5938<=e&&e<=5939)return a.CLUSTER_BREAK.EXTEND}else if(e===5940)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6002){if(5970<=e&&e<=5971)return a.CLUSTER_BREAK.EXTEND}else if(e<6068){if(6002<=e&&e<=6003)return a.CLUSTER_BREAK.EXTEND}else if(6068<=e&&e<=6069)return a.CLUSTER_BREAK.EXTEND}else if(e<6078){if(e<6071){if(e===6070)return a.CLUSTER_BREAK.SPACINGMARK}else if(6071<=e&&e<=6077)return a.CLUSTER_BREAK.EXTEND}else if(e<6086){if(6078<=e&&e<=6085)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6087){if(e===6086)return a.CLUSTER_BREAK.EXTEND}else if(6087<=e&&e<=6088)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6277)if(e<6155){if(e<6109){if(6089<=e&&e<=6099)return a.CLUSTER_BREAK.EXTEND}else if(e===6109)return a.CLUSTER_BREAK.EXTEND}else if(e<6158){if(6155<=e&&e<=6157)return a.CLUSTER_BREAK.EXTEND}else{if(e===6158)return a.CLUSTER_BREAK.CONTROL;if(e===6159)return a.CLUSTER_BREAK.EXTEND}else if(e<6435){if(e<6313){if(6277<=e&&e<=6278)return a.CLUSTER_BREAK.EXTEND}else if(e<6432){if(e===6313)return a.CLUSTER_BREAK.EXTEND}else if(6432<=e&&e<=6434)return a.CLUSTER_BREAK.EXTEND}else if(e<6439){if(6435<=e&&e<=6438)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6441){if(6439<=e&&e<=6440)return a.CLUSTER_BREAK.EXTEND}else if(6441<=e&&e<=6443)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6971){if(e<6744)if(e<6681){if(e<6451){if(e<6450){if(6448<=e&&e<=6449)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===6450)return a.CLUSTER_BREAK.EXTEND}else if(e<6457){if(6451<=e&&e<=6456)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6679){if(6457<=e&&e<=6459)return a.CLUSTER_BREAK.EXTEND}else if(6679<=e&&e<=6680)return a.CLUSTER_BREAK.EXTEND}else if(e<6741){if(e<6683){if(6681<=e&&e<=6682)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===6683)return a.CLUSTER_BREAK.EXTEND}else if(e<6742){if(e===6741)return a.CLUSTER_BREAK.SPACINGMARK}else{if(e===6742)return a.CLUSTER_BREAK.EXTEND;if(e===6743)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6771){if(e<6754){if(e<6752){if(6744<=e&&e<=6750)return a.CLUSTER_BREAK.EXTEND}else if(e===6752)return a.CLUSTER_BREAK.EXTEND}else if(e<6757){if(e===6754)return a.CLUSTER_BREAK.EXTEND}else if(e<6765){if(6757<=e&&e<=6764)return a.CLUSTER_BREAK.EXTEND}else if(6765<=e&&e<=6770)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6912){if(e<6783){if(6771<=e&&e<=6780)return a.CLUSTER_BREAK.EXTEND}else if(e<6832){if(e===6783)return a.CLUSTER_BREAK.EXTEND}else if(6832<=e&&e<=6862)return a.CLUSTER_BREAK.EXTEND}else if(e<6916){if(6912<=e&&e<=6915)return a.CLUSTER_BREAK.EXTEND}else if(e<6964){if(e===6916)return a.CLUSTER_BREAK.SPACINGMARK}else if(6964<=e&&e<=6970)return a.CLUSTER_BREAK.EXTEND}else if(e<7080){if(e<7019){if(e<6973){if(e===6971)return a.CLUSTER_BREAK.SPACINGMARK;if(e===6972)return a.CLUSTER_BREAK.EXTEND}else if(e<6978){if(6973<=e&&e<=6977)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<6979){if(e===6978)return a.CLUSTER_BREAK.EXTEND}else if(6979<=e&&e<=6980)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7073){if(e<7040){if(7019<=e&&e<=7027)return a.CLUSTER_BREAK.EXTEND}else if(e<7042){if(7040<=e&&e<=7041)return a.CLUSTER_BREAK.EXTEND}else if(e===7042)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7074){if(e===7073)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7078){if(7074<=e&&e<=7077)return a.CLUSTER_BREAK.EXTEND}else if(7078<=e&&e<=7079)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7144)if(e<7083){if(e<7082){if(7080<=e&&e<=7081)return a.CLUSTER_BREAK.EXTEND}else if(e===7082)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7142){if(7083<=e&&e<=7085)return a.CLUSTER_BREAK.EXTEND}else{if(e===7142)return a.CLUSTER_BREAK.EXTEND;if(e===7143)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7150){if(e<7146){if(7144<=e&&e<=7145)return a.CLUSTER_BREAK.EXTEND}else if(e<7149){if(7146<=e&&e<=7148)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===7149)return a.CLUSTER_BREAK.EXTEND}else if(e<7151){if(e===7150)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7154){if(7151<=e&&e<=7153)return a.CLUSTER_BREAK.EXTEND}else if(7154<=e&&e<=7155)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43346){if(e<11647){if(e<7415){if(e<7380){if(e<7220){if(e<7212){if(7204<=e&&e<=7211)return a.CLUSTER_BREAK.SPACINGMARK}else if(7212<=e&&e<=7219)return a.CLUSTER_BREAK.EXTEND}else if(e<7222){if(7220<=e&&e<=7221)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7376){if(7222<=e&&e<=7223)return a.CLUSTER_BREAK.EXTEND}else if(7376<=e&&e<=7378)return a.CLUSTER_BREAK.EXTEND}else if(e<7394){if(e<7393){if(7380<=e&&e<=7392)return a.CLUSTER_BREAK.EXTEND}else if(e===7393)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<7405){if(7394<=e&&e<=7400)return a.CLUSTER_BREAK.EXTEND}else if(e===7405||e===7412)return a.CLUSTER_BREAK.EXTEND}else if(e<8205)if(e<7616){if(e<7416){if(e===7415)return a.CLUSTER_BREAK.SPACINGMARK}else if(7416<=e&&e<=7417)return a.CLUSTER_BREAK.EXTEND}else if(e<8203){if(7616<=e&&e<=7679)return a.CLUSTER_BREAK.EXTEND}else{if(e===8203)return a.CLUSTER_BREAK.CONTROL;if(e===8204)return a.CLUSTER_BREAK.EXTEND}else if(e<8288){if(e<8206){if(e===8205)return a.CLUSTER_BREAK.ZWJ}else if(e<8232){if(8206<=e&&e<=8207)return a.CLUSTER_BREAK.CONTROL}else if(8232<=e&&e<=8238)return a.CLUSTER_BREAK.CONTROL}else if(e<8400){if(8288<=e&&e<=8303)return a.CLUSTER_BREAK.CONTROL}else if(e<11503){if(8400<=e&&e<=8432)return a.CLUSTER_BREAK.EXTEND}else if(11503<=e&&e<=11505)return a.CLUSTER_BREAK.EXTEND}else if(e<43043){if(e<42612){if(e<12330){if(e<11744){if(e===11647)return a.CLUSTER_BREAK.EXTEND}else if(11744<=e&&e<=11775)return a.CLUSTER_BREAK.EXTEND}else if(e<12441){if(12330<=e&&e<=12335)return a.CLUSTER_BREAK.EXTEND}else if(e<42607){if(12441<=e&&e<=12442)return a.CLUSTER_BREAK.EXTEND}else if(42607<=e&&e<=42610)return a.CLUSTER_BREAK.EXTEND}else if(e<43010){if(e<42654){if(42612<=e&&e<=42621)return a.CLUSTER_BREAK.EXTEND}else if(e<42736){if(42654<=e&&e<=42655)return a.CLUSTER_BREAK.EXTEND}else if(42736<=e&&e<=42737)return a.CLUSTER_BREAK.EXTEND}else if(e<43014){if(e===43010)return a.CLUSTER_BREAK.EXTEND}else if(e===43014||e===43019)return a.CLUSTER_BREAK.EXTEND}else if(e<43188){if(e<43047){if(e<43045){if(43043<=e&&e<=43044)return a.CLUSTER_BREAK.SPACINGMARK}else if(43045<=e&&e<=43046)return a.CLUSTER_BREAK.EXTEND}else if(e<43052){if(e===43047)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43136){if(e===43052)return a.CLUSTER_BREAK.EXTEND}else if(43136<=e&&e<=43137)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43263){if(e<43204){if(43188<=e&&e<=43203)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43232){if(43204<=e&&e<=43205)return a.CLUSTER_BREAK.EXTEND}else if(43232<=e&&e<=43249)return a.CLUSTER_BREAK.EXTEND}else if(e<43302){if(e===43263)return a.CLUSTER_BREAK.EXTEND}else if(e<43335){if(43302<=e&&e<=43309)return a.CLUSTER_BREAK.EXTEND}else if(43335<=e&&e<=43345)return a.CLUSTER_BREAK.EXTEND}else if(e<43698){if(e<43493){if(e<43444)if(e<43392){if(e<43360){if(43346<=e&&e<=43347)return a.CLUSTER_BREAK.SPACINGMARK}else if(43360<=e&&e<=43388)return a.CLUSTER_BREAK.L}else if(e<43395){if(43392<=e&&e<=43394)return a.CLUSTER_BREAK.EXTEND}else{if(e===43395)return a.CLUSTER_BREAK.SPACINGMARK;if(e===43443)return a.CLUSTER_BREAK.EXTEND}else if(e<43450){if(e<43446){if(43444<=e&&e<=43445)return a.CLUSTER_BREAK.SPACINGMARK}else if(43446<=e&&e<=43449)return a.CLUSTER_BREAK.EXTEND}else if(e<43452){if(43450<=e&&e<=43451)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43454){if(43452<=e&&e<=43453)return a.CLUSTER_BREAK.EXTEND}else if(43454<=e&&e<=43456)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43573){if(e<43567){if(e<43561){if(e===43493)return a.CLUSTER_BREAK.EXTEND}else if(43561<=e&&e<=43566)return a.CLUSTER_BREAK.EXTEND}else if(e<43569){if(43567<=e&&e<=43568)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43571){if(43569<=e&&e<=43570)return a.CLUSTER_BREAK.EXTEND}else if(43571<=e&&e<=43572)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43597){if(e<43587){if(43573<=e&&e<=43574)return a.CLUSTER_BREAK.EXTEND}else if(e===43587||e===43596)return a.CLUSTER_BREAK.EXTEND}else if(e<43644){if(e===43597)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===43644||e===43696)return a.CLUSTER_BREAK.EXTEND}else if(e<44006){if(e<43756)if(e<43710){if(e<43703){if(43698<=e&&e<=43700)return a.CLUSTER_BREAK.EXTEND}else if(43703<=e&&e<=43704)return a.CLUSTER_BREAK.EXTEND}else if(e<43713){if(43710<=e&&e<=43711)return a.CLUSTER_BREAK.EXTEND}else{if(e===43713)return a.CLUSTER_BREAK.EXTEND;if(e===43755)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<43766){if(e<43758){if(43756<=e&&e<=43757)return a.CLUSTER_BREAK.EXTEND}else if(e<43765){if(43758<=e&&e<=43759)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===43765)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<44003){if(e===43766)return a.CLUSTER_BREAK.EXTEND}else if(e<44005){if(44003<=e&&e<=44004)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===44005)return a.CLUSTER_BREAK.EXTEND}else if(e<44032)if(e<44009){if(e<44008){if(44006<=e&&e<=44007)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===44008)return a.CLUSTER_BREAK.EXTEND}else if(e<44012){if(44009<=e&&e<=44010)return a.CLUSTER_BREAK.SPACINGMARK}else{if(e===44012)return a.CLUSTER_BREAK.SPACINGMARK;if(e===44013)return a.CLUSTER_BREAK.EXTEND}else if(e<44061){if(e<44033){if(e===44032)return a.CLUSTER_BREAK.LV}else if(e<44060){if(44033<=e&&e<=44059)return a.CLUSTER_BREAK.LVT}else if(e===44060)return a.CLUSTER_BREAK.LV}else if(e<44088){if(44061<=e&&e<=44087)return a.CLUSTER_BREAK.LVT}else if(e<44089){if(e===44088)return a.CLUSTER_BREAK.LV}else if(44089<=e&&e<=44115)return a.CLUSTER_BREAK.LVT}else if(e<46497){if(e<45293){if(e<44704){if(e<44397){if(e<44256){if(e<44173){if(e<44144){if(e<44117){if(e===44116)return a.CLUSTER_BREAK.LV}else if(44117<=e&&e<=44143)return a.CLUSTER_BREAK.LVT}else if(e<44145){if(e===44144)return a.CLUSTER_BREAK.LV}else if(e<44172){if(44145<=e&&e<=44171)return a.CLUSTER_BREAK.LVT}else if(e===44172)return a.CLUSTER_BREAK.LV}else if(e<44201){if(e<44200){if(44173<=e&&e<=44199)return a.CLUSTER_BREAK.LVT}else if(e===44200)return a.CLUSTER_BREAK.LV}else if(e<44228){if(44201<=e&&e<=44227)return a.CLUSTER_BREAK.LVT}else if(e<44229){if(e===44228)return a.CLUSTER_BREAK.LV}else if(44229<=e&&e<=44255)return a.CLUSTER_BREAK.LVT}else if(e<44313){if(e<44284){if(e<44257){if(e===44256)return a.CLUSTER_BREAK.LV}else if(44257<=e&&e<=44283)return a.CLUSTER_BREAK.LVT}else if(e<44285){if(e===44284)return a.CLUSTER_BREAK.LV}else if(e<44312){if(44285<=e&&e<=44311)return a.CLUSTER_BREAK.LVT}else if(e===44312)return a.CLUSTER_BREAK.LV}else if(e<44368){if(e<44340){if(44313<=e&&e<=44339)return a.CLUSTER_BREAK.LVT}else if(e<44341){if(e===44340)return a.CLUSTER_BREAK.LV}else if(44341<=e&&e<=44367)return a.CLUSTER_BREAK.LVT}else if(e<44369){if(e===44368)return a.CLUSTER_BREAK.LV}else if(e<44396){if(44369<=e&&e<=44395)return a.CLUSTER_BREAK.LVT}else if(e===44396)return a.CLUSTER_BREAK.LV}else if(e<44537){if(e<44480){if(e<44425){if(e<44424){if(44397<=e&&e<=44423)return a.CLUSTER_BREAK.LVT}else if(e===44424)return a.CLUSTER_BREAK.LV}else if(e<44452){if(44425<=e&&e<=44451)return a.CLUSTER_BREAK.LVT}else if(e<44453){if(e===44452)return a.CLUSTER_BREAK.LV}else if(44453<=e&&e<=44479)return a.CLUSTER_BREAK.LVT}else if(e<44508){if(e<44481){if(e===44480)return a.CLUSTER_BREAK.LV}else if(44481<=e&&e<=44507)return a.CLUSTER_BREAK.LVT}else if(e<44509){if(e===44508)return a.CLUSTER_BREAK.LV}else if(e<44536){if(44509<=e&&e<=44535)return a.CLUSTER_BREAK.LVT}else if(e===44536)return a.CLUSTER_BREAK.LV}else if(e<44620){if(e<44565){if(e<44564){if(44537<=e&&e<=44563)return a.CLUSTER_BREAK.LVT}else if(e===44564)return a.CLUSTER_BREAK.LV}else if(e<44592){if(44565<=e&&e<=44591)return a.CLUSTER_BREAK.LVT}else if(e<44593){if(e===44592)return a.CLUSTER_BREAK.LV}else if(44593<=e&&e<=44619)return a.CLUSTER_BREAK.LVT}else if(e<44649){if(e<44621){if(e===44620)return a.CLUSTER_BREAK.LV}else if(e<44648){if(44621<=e&&e<=44647)return a.CLUSTER_BREAK.LVT}else if(e===44648)return a.CLUSTER_BREAK.LV}else if(e<44676){if(44649<=e&&e<=44675)return a.CLUSTER_BREAK.LVT}else if(e<44677){if(e===44676)return a.CLUSTER_BREAK.LV}else if(44677<=e&&e<=44703)return a.CLUSTER_BREAK.LVT}else if(e<44985){if(e<44844){if(e<44761){if(e<44732){if(e<44705){if(e===44704)return a.CLUSTER_BREAK.LV}else if(44705<=e&&e<=44731)return a.CLUSTER_BREAK.LVT}else if(e<44733){if(e===44732)return a.CLUSTER_BREAK.LV}else if(e<44760){if(44733<=e&&e<=44759)return a.CLUSTER_BREAK.LVT}else if(e===44760)return a.CLUSTER_BREAK.LV}else if(e<44789){if(e<44788){if(44761<=e&&e<=44787)return a.CLUSTER_BREAK.LVT}else if(e===44788)return a.CLUSTER_BREAK.LV}else if(e<44816){if(44789<=e&&e<=44815)return a.CLUSTER_BREAK.LVT}else if(e<44817){if(e===44816)return a.CLUSTER_BREAK.LV}else if(44817<=e&&e<=44843)return a.CLUSTER_BREAK.LVT}else if(e<44901){if(e<44872){if(e<44845){if(e===44844)return a.CLUSTER_BREAK.LV}else if(44845<=e&&e<=44871)return a.CLUSTER_BREAK.LVT}else if(e<44873){if(e===44872)return a.CLUSTER_BREAK.LV}else if(e<44900){if(44873<=e&&e<=44899)return a.CLUSTER_BREAK.LVT}else if(e===44900)return a.CLUSTER_BREAK.LV}else if(e<44956){if(e<44928){if(44901<=e&&e<=44927)return a.CLUSTER_BREAK.LVT}else if(e<44929){if(e===44928)return a.CLUSTER_BREAK.LV}else if(44929<=e&&e<=44955)return a.CLUSTER_BREAK.LVT}else if(e<44957){if(e===44956)return a.CLUSTER_BREAK.LV}else if(e<44984){if(44957<=e&&e<=44983)return a.CLUSTER_BREAK.LVT}else if(e===44984)return a.CLUSTER_BREAK.LV}else if(e<45152){if(e<45068){if(e<45013){if(e<45012){if(44985<=e&&e<=45011)return a.CLUSTER_BREAK.LVT}else if(e===45012)return a.CLUSTER_BREAK.LV}else if(e<45040){if(45013<=e&&e<=45039)return a.CLUSTER_BREAK.LVT}else if(e<45041){if(e===45040)return a.CLUSTER_BREAK.LV}else if(45041<=e&&e<=45067)return a.CLUSTER_BREAK.LVT}else if(e<45097){if(e<45069){if(e===45068)return a.CLUSTER_BREAK.LV}else if(e<45096){if(45069<=e&&e<=45095)return a.CLUSTER_BREAK.LVT}else if(e===45096)return a.CLUSTER_BREAK.LV}else if(e<45124){if(45097<=e&&e<=45123)return a.CLUSTER_BREAK.LVT}else if(e<45125){if(e===45124)return a.CLUSTER_BREAK.LV}else if(45125<=e&&e<=45151)return a.CLUSTER_BREAK.LVT}else if(e<45209){if(e<45180){if(e<45153){if(e===45152)return a.CLUSTER_BREAK.LV}else if(45153<=e&&e<=45179)return a.CLUSTER_BREAK.LVT}else if(e<45181){if(e===45180)return a.CLUSTER_BREAK.LV}else if(e<45208){if(45181<=e&&e<=45207)return a.CLUSTER_BREAK.LVT}else if(e===45208)return a.CLUSTER_BREAK.LV}else if(e<45264){if(e<45236){if(45209<=e&&e<=45235)return a.CLUSTER_BREAK.LVT}else if(e<45237){if(e===45236)return a.CLUSTER_BREAK.LV}else if(45237<=e&&e<=45263)return a.CLUSTER_BREAK.LVT}else if(e<45265){if(e===45264)return a.CLUSTER_BREAK.LV}else if(e<45292){if(45265<=e&&e<=45291)return a.CLUSTER_BREAK.LVT}else if(e===45292)return a.CLUSTER_BREAK.LV}else if(e<45908){if(e<45600){if(e<45433){if(e<45376){if(e<45321){if(e<45320){if(45293<=e&&e<=45319)return a.CLUSTER_BREAK.LVT}else if(e===45320)return a.CLUSTER_BREAK.LV}else if(e<45348){if(45321<=e&&e<=45347)return a.CLUSTER_BREAK.LVT}else if(e<45349){if(e===45348)return a.CLUSTER_BREAK.LV}else if(45349<=e&&e<=45375)return a.CLUSTER_BREAK.LVT}else if(e<45404){if(e<45377){if(e===45376)return a.CLUSTER_BREAK.LV}else if(45377<=e&&e<=45403)return a.CLUSTER_BREAK.LVT}else if(e<45405){if(e===45404)return a.CLUSTER_BREAK.LV}else if(e<45432){if(45405<=e&&e<=45431)return a.CLUSTER_BREAK.LVT}else if(e===45432)return a.CLUSTER_BREAK.LV}else if(e<45516){if(e<45461){if(e<45460){if(45433<=e&&e<=45459)return a.CLUSTER_BREAK.LVT}else if(e===45460)return a.CLUSTER_BREAK.LV}else if(e<45488){if(45461<=e&&e<=45487)return a.CLUSTER_BREAK.LVT}else if(e<45489){if(e===45488)return a.CLUSTER_BREAK.LV}else if(45489<=e&&e<=45515)return a.CLUSTER_BREAK.LVT}else if(e<45545){if(e<45517){if(e===45516)return a.CLUSTER_BREAK.LV}else if(e<45544){if(45517<=e&&e<=45543)return a.CLUSTER_BREAK.LVT}else if(e===45544)return a.CLUSTER_BREAK.LV}else if(e<45572){if(45545<=e&&e<=45571)return a.CLUSTER_BREAK.LVT}else if(e<45573){if(e===45572)return a.CLUSTER_BREAK.LV}else if(45573<=e&&e<=45599)return a.CLUSTER_BREAK.LVT}else if(e<45741){if(e<45657){if(e<45628){if(e<45601){if(e===45600)return a.CLUSTER_BREAK.LV}else if(45601<=e&&e<=45627)return a.CLUSTER_BREAK.LVT}else if(e<45629){if(e===45628)return a.CLUSTER_BREAK.LV}else if(e<45656){if(45629<=e&&e<=45655)return a.CLUSTER_BREAK.LVT}else if(e===45656)return a.CLUSTER_BREAK.LV}else if(e<45712){if(e<45684){if(45657<=e&&e<=45683)return a.CLUSTER_BREAK.LVT}else if(e<45685){if(e===45684)return a.CLUSTER_BREAK.LV}else if(45685<=e&&e<=45711)return a.CLUSTER_BREAK.LVT}else if(e<45713){if(e===45712)return a.CLUSTER_BREAK.LV}else if(e<45740){if(45713<=e&&e<=45739)return a.CLUSTER_BREAK.LVT}else if(e===45740)return a.CLUSTER_BREAK.LV}else if(e<45824){if(e<45769){if(e<45768){if(45741<=e&&e<=45767)return a.CLUSTER_BREAK.LVT}else if(e===45768)return a.CLUSTER_BREAK.LV}else if(e<45796){if(45769<=e&&e<=45795)return a.CLUSTER_BREAK.LVT}else if(e<45797){if(e===45796)return a.CLUSTER_BREAK.LV}else if(45797<=e&&e<=45823)return a.CLUSTER_BREAK.LVT}else if(e<45853){if(e<45825){if(e===45824)return a.CLUSTER_BREAK.LV}else if(e<45852){if(45825<=e&&e<=45851)return a.CLUSTER_BREAK.LVT}else if(e===45852)return a.CLUSTER_BREAK.LV}else if(e<45880){if(45853<=e&&e<=45879)return a.CLUSTER_BREAK.LVT}else if(e<45881){if(e===45880)return a.CLUSTER_BREAK.LV}else if(45881<=e&&e<=45907)return a.CLUSTER_BREAK.LVT}else if(e<46189){if(e<46048){if(e<45965){if(e<45936){if(e<45909){if(e===45908)return a.CLUSTER_BREAK.LV}else if(45909<=e&&e<=45935)return a.CLUSTER_BREAK.LVT}else if(e<45937){if(e===45936)return a.CLUSTER_BREAK.LV}else if(e<45964){if(45937<=e&&e<=45963)return a.CLUSTER_BREAK.LVT}else if(e===45964)return a.CLUSTER_BREAK.LV}else if(e<45993){if(e<45992){if(45965<=e&&e<=45991)return a.CLUSTER_BREAK.LVT}else if(e===45992)return a.CLUSTER_BREAK.LV}else if(e<46020){if(45993<=e&&e<=46019)return a.CLUSTER_BREAK.LVT}else if(e<46021){if(e===46020)return a.CLUSTER_BREAK.LV}else if(46021<=e&&e<=46047)return a.CLUSTER_BREAK.LVT}else if(e<46105){if(e<46076){if(e<46049){if(e===46048)return a.CLUSTER_BREAK.LV}else if(46049<=e&&e<=46075)return a.CLUSTER_BREAK.LVT}else if(e<46077){if(e===46076)return a.CLUSTER_BREAK.LV}else if(e<46104){if(46077<=e&&e<=46103)return a.CLUSTER_BREAK.LVT}else if(e===46104)return a.CLUSTER_BREAK.LV}else if(e<46160){if(e<46132){if(46105<=e&&e<=46131)return a.CLUSTER_BREAK.LVT}else if(e<46133){if(e===46132)return a.CLUSTER_BREAK.LV}else if(46133<=e&&e<=46159)return a.CLUSTER_BREAK.LVT}else if(e<46161){if(e===46160)return a.CLUSTER_BREAK.LV}else if(e<46188){if(46161<=e&&e<=46187)return a.CLUSTER_BREAK.LVT}else if(e===46188)return a.CLUSTER_BREAK.LV}else if(e<46356){if(e<46272){if(e<46217){if(e<46216){if(46189<=e&&e<=46215)return a.CLUSTER_BREAK.LVT}else if(e===46216)return a.CLUSTER_BREAK.LV}else if(e<46244){if(46217<=e&&e<=46243)return a.CLUSTER_BREAK.LVT}else if(e<46245){if(e===46244)return a.CLUSTER_BREAK.LV}else if(46245<=e&&e<=46271)return a.CLUSTER_BREAK.LVT}else if(e<46301){if(e<46273){if(e===46272)return a.CLUSTER_BREAK.LV}else if(e<46300){if(46273<=e&&e<=46299)return a.CLUSTER_BREAK.LVT}else if(e===46300)return a.CLUSTER_BREAK.LV}else if(e<46328){if(46301<=e&&e<=46327)return a.CLUSTER_BREAK.LVT}else if(e<46329){if(e===46328)return a.CLUSTER_BREAK.LV}else if(46329<=e&&e<=46355)return a.CLUSTER_BREAK.LVT}else if(e<46413){if(e<46384){if(e<46357){if(e===46356)return a.CLUSTER_BREAK.LV}else if(46357<=e&&e<=46383)return a.CLUSTER_BREAK.LVT}else if(e<46385){if(e===46384)return a.CLUSTER_BREAK.LV}else if(e<46412){if(46385<=e&&e<=46411)return a.CLUSTER_BREAK.LVT}else if(e===46412)return a.CLUSTER_BREAK.LV}else if(e<46468){if(e<46440){if(46413<=e&&e<=46439)return a.CLUSTER_BREAK.LVT}else if(e<46441){if(e===46440)return a.CLUSTER_BREAK.LV}else if(46441<=e&&e<=46467)return a.CLUSTER_BREAK.LVT}else if(e<46469){if(e===46468)return a.CLUSTER_BREAK.LV}else if(e<46496){if(46469<=e&&e<=46495)return a.CLUSTER_BREAK.LVT}else if(e===46496)return a.CLUSTER_BREAK.LV}else if(e<47701){if(e<47112){if(e<46804){if(e<46637){if(e<46580){if(e<46525){if(e<46524){if(46497<=e&&e<=46523)return a.CLUSTER_BREAK.LVT}else if(e===46524)return a.CLUSTER_BREAK.LV}else if(e<46552){if(46525<=e&&e<=46551)return a.CLUSTER_BREAK.LVT}else if(e<46553){if(e===46552)return a.CLUSTER_BREAK.LV}else if(46553<=e&&e<=46579)return a.CLUSTER_BREAK.LVT}else if(e<46608){if(e<46581){if(e===46580)return a.CLUSTER_BREAK.LV}else if(46581<=e&&e<=46607)return a.CLUSTER_BREAK.LVT}else if(e<46609){if(e===46608)return a.CLUSTER_BREAK.LV}else if(e<46636){if(46609<=e&&e<=46635)return a.CLUSTER_BREAK.LVT}else if(e===46636)return a.CLUSTER_BREAK.LV}else if(e<46720){if(e<46665){if(e<46664){if(46637<=e&&e<=46663)return a.CLUSTER_BREAK.LVT}else if(e===46664)return a.CLUSTER_BREAK.LV}else if(e<46692){if(46665<=e&&e<=46691)return a.CLUSTER_BREAK.LVT}else if(e<46693){if(e===46692)return a.CLUSTER_BREAK.LV}else if(46693<=e&&e<=46719)return a.CLUSTER_BREAK.LVT}else if(e<46749){if(e<46721){if(e===46720)return a.CLUSTER_BREAK.LV}else if(e<46748){if(46721<=e&&e<=46747)return a.CLUSTER_BREAK.LVT}else if(e===46748)return a.CLUSTER_BREAK.LV}else if(e<46776){if(46749<=e&&e<=46775)return a.CLUSTER_BREAK.LVT}else if(e<46777){if(e===46776)return a.CLUSTER_BREAK.LV}else if(46777<=e&&e<=46803)return a.CLUSTER_BREAK.LVT}else if(e<46945){if(e<46861){if(e<46832){if(e<46805){if(e===46804)return a.CLUSTER_BREAK.LV}else if(46805<=e&&e<=46831)return a.CLUSTER_BREAK.LVT}else if(e<46833){if(e===46832)return a.CLUSTER_BREAK.LV}else if(e<46860){if(46833<=e&&e<=46859)return a.CLUSTER_BREAK.LVT}else if(e===46860)return a.CLUSTER_BREAK.LV}else if(e<46916){if(e<46888){if(46861<=e&&e<=46887)return a.CLUSTER_BREAK.LVT}else if(e<46889){if(e===46888)return a.CLUSTER_BREAK.LV}else if(46889<=e&&e<=46915)return a.CLUSTER_BREAK.LVT}else if(e<46917){if(e===46916)return a.CLUSTER_BREAK.LV}else if(e<46944){if(46917<=e&&e<=46943)return a.CLUSTER_BREAK.LVT}else if(e===46944)return a.CLUSTER_BREAK.LV}else if(e<47028){if(e<46973){if(e<46972){if(46945<=e&&e<=46971)return a.CLUSTER_BREAK.LVT}else if(e===46972)return a.CLUSTER_BREAK.LV}else if(e<47e3){if(46973<=e&&e<=46999)return a.CLUSTER_BREAK.LVT}else if(e<47001){if(e===47e3)return a.CLUSTER_BREAK.LV}else if(47001<=e&&e<=47027)return a.CLUSTER_BREAK.LVT}else if(e<47057){if(e<47029){if(e===47028)return a.CLUSTER_BREAK.LV}else if(e<47056){if(47029<=e&&e<=47055)return a.CLUSTER_BREAK.LVT}else if(e===47056)return a.CLUSTER_BREAK.LV}else if(e<47084){if(47057<=e&&e<=47083)return a.CLUSTER_BREAK.LVT}else if(e<47085){if(e===47084)return a.CLUSTER_BREAK.LV}else if(47085<=e&&e<=47111)return a.CLUSTER_BREAK.LVT}else if(e<47393){if(e<47252){if(e<47169){if(e<47140){if(e<47113){if(e===47112)return a.CLUSTER_BREAK.LV}else if(47113<=e&&e<=47139)return a.CLUSTER_BREAK.LVT}else if(e<47141){if(e===47140)return a.CLUSTER_BREAK.LV}else if(e<47168){if(47141<=e&&e<=47167)return a.CLUSTER_BREAK.LVT}else if(e===47168)return a.CLUSTER_BREAK.LV}else if(e<47197){if(e<47196){if(47169<=e&&e<=47195)return a.CLUSTER_BREAK.LVT}else if(e===47196)return a.CLUSTER_BREAK.LV}else if(e<47224){if(47197<=e&&e<=47223)return a.CLUSTER_BREAK.LVT}else if(e<47225){if(e===47224)return a.CLUSTER_BREAK.LV}else if(47225<=e&&e<=47251)return a.CLUSTER_BREAK.LVT}else if(e<47309){if(e<47280){if(e<47253){if(e===47252)return a.CLUSTER_BREAK.LV}else if(47253<=e&&e<=47279)return a.CLUSTER_BREAK.LVT}else if(e<47281){if(e===47280)return a.CLUSTER_BREAK.LV}else if(e<47308){if(47281<=e&&e<=47307)return a.CLUSTER_BREAK.LVT}else if(e===47308)return a.CLUSTER_BREAK.LV}else if(e<47364){if(e<47336){if(47309<=e&&e<=47335)return a.CLUSTER_BREAK.LVT}else if(e<47337){if(e===47336)return a.CLUSTER_BREAK.LV}else if(47337<=e&&e<=47363)return a.CLUSTER_BREAK.LVT}else if(e<47365){if(e===47364)return a.CLUSTER_BREAK.LV}else if(e<47392){if(47365<=e&&e<=47391)return a.CLUSTER_BREAK.LVT}else if(e===47392)return a.CLUSTER_BREAK.LV}else if(e<47560){if(e<47476){if(e<47421){if(e<47420){if(47393<=e&&e<=47419)return a.CLUSTER_BREAK.LVT}else if(e===47420)return a.CLUSTER_BREAK.LV}else if(e<47448){if(47421<=e&&e<=47447)return a.CLUSTER_BREAK.LVT}else if(e<47449){if(e===47448)return a.CLUSTER_BREAK.LV}else if(47449<=e&&e<=47475)return a.CLUSTER_BREAK.LVT}else if(e<47505){if(e<47477){if(e===47476)return a.CLUSTER_BREAK.LV}else if(e<47504){if(47477<=e&&e<=47503)return a.CLUSTER_BREAK.LVT}else if(e===47504)return a.CLUSTER_BREAK.LV}else if(e<47532){if(47505<=e&&e<=47531)return a.CLUSTER_BREAK.LVT}else if(e<47533){if(e===47532)return a.CLUSTER_BREAK.LV}else if(47533<=e&&e<=47559)return a.CLUSTER_BREAK.LVT}else if(e<47617){if(e<47588){if(e<47561){if(e===47560)return a.CLUSTER_BREAK.LV}else if(47561<=e&&e<=47587)return a.CLUSTER_BREAK.LVT}else if(e<47589){if(e===47588)return a.CLUSTER_BREAK.LV}else if(e<47616){if(47589<=e&&e<=47615)return a.CLUSTER_BREAK.LVT}else if(e===47616)return a.CLUSTER_BREAK.LV}else if(e<47672){if(e<47644){if(47617<=e&&e<=47643)return a.CLUSTER_BREAK.LVT}else if(e<47645){if(e===47644)return a.CLUSTER_BREAK.LV}else if(47645<=e&&e<=47671)return a.CLUSTER_BREAK.LVT}else if(e<47673){if(e===47672)return a.CLUSTER_BREAK.LV}else if(e<47700){if(47673<=e&&e<=47699)return a.CLUSTER_BREAK.LVT}else if(e===47700)return a.CLUSTER_BREAK.LV}else if(e<48316){if(e<48008){if(e<47841){if(e<47784){if(e<47729){if(e<47728){if(47701<=e&&e<=47727)return a.CLUSTER_BREAK.LVT}else if(e===47728)return a.CLUSTER_BREAK.LV}else if(e<47756){if(47729<=e&&e<=47755)return a.CLUSTER_BREAK.LVT}else if(e<47757){if(e===47756)return a.CLUSTER_BREAK.LV}else if(47757<=e&&e<=47783)return a.CLUSTER_BREAK.LVT}else if(e<47812){if(e<47785){if(e===47784)return a.CLUSTER_BREAK.LV}else if(47785<=e&&e<=47811)return a.CLUSTER_BREAK.LVT}else if(e<47813){if(e===47812)return a.CLUSTER_BREAK.LV}else if(e<47840){if(47813<=e&&e<=47839)return a.CLUSTER_BREAK.LVT}else if(e===47840)return a.CLUSTER_BREAK.LV}else if(e<47924){if(e<47869){if(e<47868){if(47841<=e&&e<=47867)return a.CLUSTER_BREAK.LVT}else if(e===47868)return a.CLUSTER_BREAK.LV}else if(e<47896){if(47869<=e&&e<=47895)return a.CLUSTER_BREAK.LVT}else if(e<47897){if(e===47896)return a.CLUSTER_BREAK.LV}else if(47897<=e&&e<=47923)return a.CLUSTER_BREAK.LVT}else if(e<47953){if(e<47925){if(e===47924)return a.CLUSTER_BREAK.LV}else if(e<47952){if(47925<=e&&e<=47951)return a.CLUSTER_BREAK.LVT}else if(e===47952)return a.CLUSTER_BREAK.LV}else if(e<47980){if(47953<=e&&e<=47979)return a.CLUSTER_BREAK.LVT}else if(e<47981){if(e===47980)return a.CLUSTER_BREAK.LV}else if(47981<=e&&e<=48007)return a.CLUSTER_BREAK.LVT}else if(e<48149){if(e<48065){if(e<48036){if(e<48009){if(e===48008)return a.CLUSTER_BREAK.LV}else if(48009<=e&&e<=48035)return a.CLUSTER_BREAK.LVT}else if(e<48037){if(e===48036)return a.CLUSTER_BREAK.LV}else if(e<48064){if(48037<=e&&e<=48063)return a.CLUSTER_BREAK.LVT}else if(e===48064)return a.CLUSTER_BREAK.LV}else if(e<48120){if(e<48092){if(48065<=e&&e<=48091)return a.CLUSTER_BREAK.LVT}else if(e<48093){if(e===48092)return a.CLUSTER_BREAK.LV}else if(48093<=e&&e<=48119)return a.CLUSTER_BREAK.LVT}else if(e<48121){if(e===48120)return a.CLUSTER_BREAK.LV}else if(e<48148){if(48121<=e&&e<=48147)return a.CLUSTER_BREAK.LVT}else if(e===48148)return a.CLUSTER_BREAK.LV}else if(e<48232){if(e<48177){if(e<48176){if(48149<=e&&e<=48175)return a.CLUSTER_BREAK.LVT}else if(e===48176)return a.CLUSTER_BREAK.LV}else if(e<48204){if(48177<=e&&e<=48203)return a.CLUSTER_BREAK.LVT}else if(e<48205){if(e===48204)return a.CLUSTER_BREAK.LV}else if(48205<=e&&e<=48231)return a.CLUSTER_BREAK.LVT}else if(e<48261){if(e<48233){if(e===48232)return a.CLUSTER_BREAK.LV}else if(e<48260){if(48233<=e&&e<=48259)return a.CLUSTER_BREAK.LVT}else if(e===48260)return a.CLUSTER_BREAK.LV}else if(e<48288){if(48261<=e&&e<=48287)return a.CLUSTER_BREAK.LVT}else if(e<48289){if(e===48288)return a.CLUSTER_BREAK.LV}else if(48289<=e&&e<=48315)return a.CLUSTER_BREAK.LVT}else if(e<48597){if(e<48456){if(e<48373){if(e<48344){if(e<48317){if(e===48316)return a.CLUSTER_BREAK.LV}else if(48317<=e&&e<=48343)return a.CLUSTER_BREAK.LVT}else if(e<48345){if(e===48344)return a.CLUSTER_BREAK.LV}else if(e<48372){if(48345<=e&&e<=48371)return a.CLUSTER_BREAK.LVT}else if(e===48372)return a.CLUSTER_BREAK.LV}else if(e<48401){if(e<48400){if(48373<=e&&e<=48399)return a.CLUSTER_BREAK.LVT}else if(e===48400)return a.CLUSTER_BREAK.LV}else if(e<48428){if(48401<=e&&e<=48427)return a.CLUSTER_BREAK.LVT}else if(e<48429){if(e===48428)return a.CLUSTER_BREAK.LV}else if(48429<=e&&e<=48455)return a.CLUSTER_BREAK.LVT}else if(e<48513){if(e<48484){if(e<48457){if(e===48456)return a.CLUSTER_BREAK.LV}else if(48457<=e&&e<=48483)return a.CLUSTER_BREAK.LVT}else if(e<48485){if(e===48484)return a.CLUSTER_BREAK.LV}else if(e<48512){if(48485<=e&&e<=48511)return a.CLUSTER_BREAK.LVT}else if(e===48512)return a.CLUSTER_BREAK.LV}else if(e<48568){if(e<48540){if(48513<=e&&e<=48539)return a.CLUSTER_BREAK.LVT}else if(e<48541){if(e===48540)return a.CLUSTER_BREAK.LV}else if(48541<=e&&e<=48567)return a.CLUSTER_BREAK.LVT}else if(e<48569){if(e===48568)return a.CLUSTER_BREAK.LV}else if(e<48596){if(48569<=e&&e<=48595)return a.CLUSTER_BREAK.LVT}else if(e===48596)return a.CLUSTER_BREAK.LV}else if(e<48764){if(e<48680){if(e<48625){if(e<48624){if(48597<=e&&e<=48623)return a.CLUSTER_BREAK.LVT}else if(e===48624)return a.CLUSTER_BREAK.LV}else if(e<48652){if(48625<=e&&e<=48651)return a.CLUSTER_BREAK.LVT}else if(e<48653){if(e===48652)return a.CLUSTER_BREAK.LV}else if(48653<=e&&e<=48679)return a.CLUSTER_BREAK.LVT}else if(e<48709){if(e<48681){if(e===48680)return a.CLUSTER_BREAK.LV}else if(e<48708){if(48681<=e&&e<=48707)return a.CLUSTER_BREAK.LVT}else if(e===48708)return a.CLUSTER_BREAK.LV}else if(e<48736){if(48709<=e&&e<=48735)return a.CLUSTER_BREAK.LVT}else if(e<48737){if(e===48736)return a.CLUSTER_BREAK.LV}else if(48737<=e&&e<=48763)return a.CLUSTER_BREAK.LVT}else if(e<48821){if(e<48792){if(e<48765){if(e===48764)return a.CLUSTER_BREAK.LV}else if(48765<=e&&e<=48791)return a.CLUSTER_BREAK.LVT}else if(e<48793){if(e===48792)return a.CLUSTER_BREAK.LV}else if(e<48820){if(48793<=e&&e<=48819)return a.CLUSTER_BREAK.LVT}else if(e===48820)return a.CLUSTER_BREAK.LV}else if(e<48876){if(e<48848){if(48821<=e&&e<=48847)return a.CLUSTER_BREAK.LVT}else if(e<48849){if(e===48848)return a.CLUSTER_BREAK.LV}else if(48849<=e&&e<=48875)return a.CLUSTER_BREAK.LVT}else if(e<48877){if(e===48876)return a.CLUSTER_BREAK.LV}else if(e<48904){if(48877<=e&&e<=48903)return a.CLUSTER_BREAK.LVT}else if(e===48904)return a.CLUSTER_BREAK.LV}else if(e<53720){if(e<51312){if(e<50108){if(e<49493){if(e<49212){if(e<49045){if(e<48988){if(e<48933){if(e<48932){if(48905<=e&&e<=48931)return a.CLUSTER_BREAK.LVT}else if(e===48932)return a.CLUSTER_BREAK.LV}else if(e<48960){if(48933<=e&&e<=48959)return a.CLUSTER_BREAK.LVT}else if(e<48961){if(e===48960)return a.CLUSTER_BREAK.LV}else if(48961<=e&&e<=48987)return a.CLUSTER_BREAK.LVT}else if(e<49016){if(e<48989){if(e===48988)return a.CLUSTER_BREAK.LV}else if(48989<=e&&e<=49015)return a.CLUSTER_BREAK.LVT}else if(e<49017){if(e===49016)return a.CLUSTER_BREAK.LV}else if(e<49044){if(49017<=e&&e<=49043)return a.CLUSTER_BREAK.LVT}else if(e===49044)return a.CLUSTER_BREAK.LV}else if(e<49128){if(e<49073){if(e<49072){if(49045<=e&&e<=49071)return a.CLUSTER_BREAK.LVT}else if(e===49072)return a.CLUSTER_BREAK.LV}else if(e<49100){if(49073<=e&&e<=49099)return a.CLUSTER_BREAK.LVT}else if(e<49101){if(e===49100)return a.CLUSTER_BREAK.LV}else if(49101<=e&&e<=49127)return a.CLUSTER_BREAK.LVT}else if(e<49157){if(e<49129){if(e===49128)return a.CLUSTER_BREAK.LV}else if(e<49156){if(49129<=e&&e<=49155)return a.CLUSTER_BREAK.LVT}else if(e===49156)return a.CLUSTER_BREAK.LV}else if(e<49184){if(49157<=e&&e<=49183)return a.CLUSTER_BREAK.LVT}else if(e<49185){if(e===49184)return a.CLUSTER_BREAK.LV}else if(49185<=e&&e<=49211)return a.CLUSTER_BREAK.LVT}else if(e<49352){if(e<49269){if(e<49240){if(e<49213){if(e===49212)return a.CLUSTER_BREAK.LV}else if(49213<=e&&e<=49239)return a.CLUSTER_BREAK.LVT}else if(e<49241){if(e===49240)return a.CLUSTER_BREAK.LV}else if(e<49268){if(49241<=e&&e<=49267)return a.CLUSTER_BREAK.LVT}else if(e===49268)return a.CLUSTER_BREAK.LV}else if(e<49297){if(e<49296){if(49269<=e&&e<=49295)return a.CLUSTER_BREAK.LVT}else if(e===49296)return a.CLUSTER_BREAK.LV}else if(e<49324){if(49297<=e&&e<=49323)return a.CLUSTER_BREAK.LVT}else if(e<49325){if(e===49324)return a.CLUSTER_BREAK.LV}else if(49325<=e&&e<=49351)return a.CLUSTER_BREAK.LVT}else if(e<49409){if(e<49380){if(e<49353){if(e===49352)return a.CLUSTER_BREAK.LV}else if(49353<=e&&e<=49379)return a.CLUSTER_BREAK.LVT}else if(e<49381){if(e===49380)return a.CLUSTER_BREAK.LV}else if(e<49408){if(49381<=e&&e<=49407)return a.CLUSTER_BREAK.LVT}else if(e===49408)return a.CLUSTER_BREAK.LV}else if(e<49464){if(e<49436){if(49409<=e&&e<=49435)return a.CLUSTER_BREAK.LVT}else if(e<49437){if(e===49436)return a.CLUSTER_BREAK.LV}else if(49437<=e&&e<=49463)return a.CLUSTER_BREAK.LVT}else if(e<49465){if(e===49464)return a.CLUSTER_BREAK.LV}else if(e<49492){if(49465<=e&&e<=49491)return a.CLUSTER_BREAK.LVT}else if(e===49492)return a.CLUSTER_BREAK.LV}else if(e<49800){if(e<49633){if(e<49576){if(e<49521){if(e<49520){if(49493<=e&&e<=49519)return a.CLUSTER_BREAK.LVT}else if(e===49520)return a.CLUSTER_BREAK.LV}else if(e<49548){if(49521<=e&&e<=49547)return a.CLUSTER_BREAK.LVT}else if(e<49549){if(e===49548)return a.CLUSTER_BREAK.LV}else if(49549<=e&&e<=49575)return a.CLUSTER_BREAK.LVT}else if(e<49604){if(e<49577){if(e===49576)return a.CLUSTER_BREAK.LV}else if(49577<=e&&e<=49603)return a.CLUSTER_BREAK.LVT}else if(e<49605){if(e===49604)return a.CLUSTER_BREAK.LV}else if(e<49632){if(49605<=e&&e<=49631)return a.CLUSTER_BREAK.LVT}else if(e===49632)return a.CLUSTER_BREAK.LV}else if(e<49716){if(e<49661){if(e<49660){if(49633<=e&&e<=49659)return a.CLUSTER_BREAK.LVT}else if(e===49660)return a.CLUSTER_BREAK.LV}else if(e<49688){if(49661<=e&&e<=49687)return a.CLUSTER_BREAK.LVT}else if(e<49689){if(e===49688)return a.CLUSTER_BREAK.LV}else if(49689<=e&&e<=49715)return a.CLUSTER_BREAK.LVT}else if(e<49745){if(e<49717){if(e===49716)return a.CLUSTER_BREAK.LV}else if(e<49744){if(49717<=e&&e<=49743)return a.CLUSTER_BREAK.LVT}else if(e===49744)return a.CLUSTER_BREAK.LV}else if(e<49772){if(49745<=e&&e<=49771)return a.CLUSTER_BREAK.LVT}else if(e<49773){if(e===49772)return a.CLUSTER_BREAK.LV}else if(49773<=e&&e<=49799)return a.CLUSTER_BREAK.LVT}else if(e<49941){if(e<49857){if(e<49828){if(e<49801){if(e===49800)return a.CLUSTER_BREAK.LV}else if(49801<=e&&e<=49827)return a.CLUSTER_BREAK.LVT}else if(e<49829){if(e===49828)return a.CLUSTER_BREAK.LV}else if(e<49856){if(49829<=e&&e<=49855)return a.CLUSTER_BREAK.LVT}else if(e===49856)return a.CLUSTER_BREAK.LV}else if(e<49912){if(e<49884){if(49857<=e&&e<=49883)return a.CLUSTER_BREAK.LVT}else if(e<49885){if(e===49884)return a.CLUSTER_BREAK.LV}else if(49885<=e&&e<=49911)return a.CLUSTER_BREAK.LVT}else if(e<49913){if(e===49912)return a.CLUSTER_BREAK.LV}else if(e<49940){if(49913<=e&&e<=49939)return a.CLUSTER_BREAK.LVT}else if(e===49940)return a.CLUSTER_BREAK.LV}else if(e<50024){if(e<49969){if(e<49968){if(49941<=e&&e<=49967)return a.CLUSTER_BREAK.LVT}else if(e===49968)return a.CLUSTER_BREAK.LV}else if(e<49996){if(49969<=e&&e<=49995)return a.CLUSTER_BREAK.LVT}else if(e<49997){if(e===49996)return a.CLUSTER_BREAK.LV}else if(49997<=e&&e<=50023)return a.CLUSTER_BREAK.LVT}else if(e<50053){if(e<50025){if(e===50024)return a.CLUSTER_BREAK.LV}else if(e<50052){if(50025<=e&&e<=50051)return a.CLUSTER_BREAK.LVT}else if(e===50052)return a.CLUSTER_BREAK.LV}else if(e<50080){if(50053<=e&&e<=50079)return a.CLUSTER_BREAK.LVT}else if(e<50081){if(e===50080)return a.CLUSTER_BREAK.LV}else if(50081<=e&&e<=50107)return a.CLUSTER_BREAK.LVT}else if(e<50697){if(e<50389){if(e<50248){if(e<50165){if(e<50136){if(e<50109){if(e===50108)return a.CLUSTER_BREAK.LV}else if(50109<=e&&e<=50135)return a.CLUSTER_BREAK.LVT}else if(e<50137){if(e===50136)return a.CLUSTER_BREAK.LV}else if(e<50164){if(50137<=e&&e<=50163)return a.CLUSTER_BREAK.LVT}else if(e===50164)return a.CLUSTER_BREAK.LV}else if(e<50193){if(e<50192){if(50165<=e&&e<=50191)return a.CLUSTER_BREAK.LVT}else if(e===50192)return a.CLUSTER_BREAK.LV}else if(e<50220){if(50193<=e&&e<=50219)return a.CLUSTER_BREAK.LVT}else if(e<50221){if(e===50220)return a.CLUSTER_BREAK.LV}else if(50221<=e&&e<=50247)return a.CLUSTER_BREAK.LVT}else if(e<50305){if(e<50276){if(e<50249){if(e===50248)return a.CLUSTER_BREAK.LV}else if(50249<=e&&e<=50275)return a.CLUSTER_BREAK.LVT}else if(e<50277){if(e===50276)return a.CLUSTER_BREAK.LV}else if(e<50304){if(50277<=e&&e<=50303)return a.CLUSTER_BREAK.LVT}else if(e===50304)return a.CLUSTER_BREAK.LV}else if(e<50360){if(e<50332){if(50305<=e&&e<=50331)return a.CLUSTER_BREAK.LVT}else if(e<50333){if(e===50332)return a.CLUSTER_BREAK.LV}else if(50333<=e&&e<=50359)return a.CLUSTER_BREAK.LVT}else if(e<50361){if(e===50360)return a.CLUSTER_BREAK.LV}else if(e<50388){if(50361<=e&&e<=50387)return a.CLUSTER_BREAK.LVT}else if(e===50388)return a.CLUSTER_BREAK.LV}else if(e<50556){if(e<50472){if(e<50417){if(e<50416){if(50389<=e&&e<=50415)return a.CLUSTER_BREAK.LVT}else if(e===50416)return a.CLUSTER_BREAK.LV}else if(e<50444){if(50417<=e&&e<=50443)return a.CLUSTER_BREAK.LVT}else if(e<50445){if(e===50444)return a.CLUSTER_BREAK.LV}else if(50445<=e&&e<=50471)return a.CLUSTER_BREAK.LVT}else if(e<50501){if(e<50473){if(e===50472)return a.CLUSTER_BREAK.LV}else if(e<50500){if(50473<=e&&e<=50499)return a.CLUSTER_BREAK.LVT}else if(e===50500)return a.CLUSTER_BREAK.LV}else if(e<50528){if(50501<=e&&e<=50527)return a.CLUSTER_BREAK.LVT}else if(e<50529){if(e===50528)return a.CLUSTER_BREAK.LV}else if(50529<=e&&e<=50555)return a.CLUSTER_BREAK.LVT}else if(e<50613){if(e<50584){if(e<50557){if(e===50556)return a.CLUSTER_BREAK.LV}else if(50557<=e&&e<=50583)return a.CLUSTER_BREAK.LVT}else if(e<50585){if(e===50584)return a.CLUSTER_BREAK.LV}else if(e<50612){if(50585<=e&&e<=50611)return a.CLUSTER_BREAK.LVT}else if(e===50612)return a.CLUSTER_BREAK.LV}else if(e<50668){if(e<50640){if(50613<=e&&e<=50639)return a.CLUSTER_BREAK.LVT}else if(e<50641){if(e===50640)return a.CLUSTER_BREAK.LV}else if(50641<=e&&e<=50667)return a.CLUSTER_BREAK.LVT}else if(e<50669){if(e===50668)return a.CLUSTER_BREAK.LV}else if(e<50696){if(50669<=e&&e<=50695)return a.CLUSTER_BREAK.LVT}else if(e===50696)return a.CLUSTER_BREAK.LV}else if(e<51004){if(e<50837){if(e<50780){if(e<50725){if(e<50724){if(50697<=e&&e<=50723)return a.CLUSTER_BREAK.LVT}else if(e===50724)return a.CLUSTER_BREAK.LV}else if(e<50752){if(50725<=e&&e<=50751)return a.CLUSTER_BREAK.LVT}else if(e<50753){if(e===50752)return a.CLUSTER_BREAK.LV}else if(50753<=e&&e<=50779)return a.CLUSTER_BREAK.LVT}else if(e<50808){if(e<50781){if(e===50780)return a.CLUSTER_BREAK.LV}else if(50781<=e&&e<=50807)return a.CLUSTER_BREAK.LVT}else if(e<50809){if(e===50808)return a.CLUSTER_BREAK.LV}else if(e<50836){if(50809<=e&&e<=50835)return a.CLUSTER_BREAK.LVT}else if(e===50836)return a.CLUSTER_BREAK.LV}else if(e<50920){if(e<50865){if(e<50864){if(50837<=e&&e<=50863)return a.CLUSTER_BREAK.LVT}else if(e===50864)return a.CLUSTER_BREAK.LV}else if(e<50892){if(50865<=e&&e<=50891)return a.CLUSTER_BREAK.LVT}else if(e<50893){if(e===50892)return a.CLUSTER_BREAK.LV}else if(50893<=e&&e<=50919)return a.CLUSTER_BREAK.LVT}else if(e<50949){if(e<50921){if(e===50920)return a.CLUSTER_BREAK.LV}else if(e<50948){if(50921<=e&&e<=50947)return a.CLUSTER_BREAK.LVT}else if(e===50948)return a.CLUSTER_BREAK.LV}else if(e<50976){if(50949<=e&&e<=50975)return a.CLUSTER_BREAK.LVT}else if(e<50977){if(e===50976)return a.CLUSTER_BREAK.LV}else if(50977<=e&&e<=51003)return a.CLUSTER_BREAK.LVT}else if(e<51145){if(e<51061){if(e<51032){if(e<51005){if(e===51004)return a.CLUSTER_BREAK.LV}else if(51005<=e&&e<=51031)return a.CLUSTER_BREAK.LVT}else if(e<51033){if(e===51032)return a.CLUSTER_BREAK.LV}else if(e<51060){if(51033<=e&&e<=51059)return a.CLUSTER_BREAK.LVT}else if(e===51060)return a.CLUSTER_BREAK.LV}else if(e<51116){if(e<51088){if(51061<=e&&e<=51087)return a.CLUSTER_BREAK.LVT}else if(e<51089){if(e===51088)return a.CLUSTER_BREAK.LV}else if(51089<=e&&e<=51115)return a.CLUSTER_BREAK.LVT}else if(e<51117){if(e===51116)return a.CLUSTER_BREAK.LV}else if(e<51144){if(51117<=e&&e<=51143)return a.CLUSTER_BREAK.LVT}else if(e===51144)return a.CLUSTER_BREAK.LV}else if(e<51228){if(e<51173){if(e<51172){if(51145<=e&&e<=51171)return a.CLUSTER_BREAK.LVT}else if(e===51172)return a.CLUSTER_BREAK.LV}else if(e<51200){if(51173<=e&&e<=51199)return a.CLUSTER_BREAK.LVT}else if(e<51201){if(e===51200)return a.CLUSTER_BREAK.LV}else if(51201<=e&&e<=51227)return a.CLUSTER_BREAK.LVT}else if(e<51257){if(e<51229){if(e===51228)return a.CLUSTER_BREAK.LV}else if(e<51256){if(51229<=e&&e<=51255)return a.CLUSTER_BREAK.LVT}else if(e===51256)return a.CLUSTER_BREAK.LV}else if(e<51284){if(51257<=e&&e<=51283)return a.CLUSTER_BREAK.LVT}else if(e<51285){if(e===51284)return a.CLUSTER_BREAK.LV}else if(51285<=e&&e<=51311)return a.CLUSTER_BREAK.LVT}else if(e<52516){if(e<51901){if(e<51593){if(e<51452){if(e<51369){if(e<51340){if(e<51313){if(e===51312)return a.CLUSTER_BREAK.LV}else if(51313<=e&&e<=51339)return a.CLUSTER_BREAK.LVT}else if(e<51341){if(e===51340)return a.CLUSTER_BREAK.LV}else if(e<51368){if(51341<=e&&e<=51367)return a.CLUSTER_BREAK.LVT}else if(e===51368)return a.CLUSTER_BREAK.LV}else if(e<51397){if(e<51396){if(51369<=e&&e<=51395)return a.CLUSTER_BREAK.LVT}else if(e===51396)return a.CLUSTER_BREAK.LV}else if(e<51424){if(51397<=e&&e<=51423)return a.CLUSTER_BREAK.LVT}else if(e<51425){if(e===51424)return a.CLUSTER_BREAK.LV}else if(51425<=e&&e<=51451)return a.CLUSTER_BREAK.LVT}else if(e<51509){if(e<51480){if(e<51453){if(e===51452)return a.CLUSTER_BREAK.LV}else if(51453<=e&&e<=51479)return a.CLUSTER_BREAK.LVT}else if(e<51481){if(e===51480)return a.CLUSTER_BREAK.LV}else if(e<51508){if(51481<=e&&e<=51507)return a.CLUSTER_BREAK.LVT}else if(e===51508)return a.CLUSTER_BREAK.LV}else if(e<51564){if(e<51536){if(51509<=e&&e<=51535)return a.CLUSTER_BREAK.LVT}else if(e<51537){if(e===51536)return a.CLUSTER_BREAK.LV}else if(51537<=e&&e<=51563)return a.CLUSTER_BREAK.LVT}else if(e<51565){if(e===51564)return a.CLUSTER_BREAK.LV}else if(e<51592){if(51565<=e&&e<=51591)return a.CLUSTER_BREAK.LVT}else if(e===51592)return a.CLUSTER_BREAK.LV}else if(e<51760){if(e<51676){if(e<51621){if(e<51620){if(51593<=e&&e<=51619)return a.CLUSTER_BREAK.LVT}else if(e===51620)return a.CLUSTER_BREAK.LV}else if(e<51648){if(51621<=e&&e<=51647)return a.CLUSTER_BREAK.LVT}else if(e<51649){if(e===51648)return a.CLUSTER_BREAK.LV}else if(51649<=e&&e<=51675)return a.CLUSTER_BREAK.LVT}else if(e<51705){if(e<51677){if(e===51676)return a.CLUSTER_BREAK.LV}else if(e<51704){if(51677<=e&&e<=51703)return a.CLUSTER_BREAK.LVT}else if(e===51704)return a.CLUSTER_BREAK.LV}else if(e<51732){if(51705<=e&&e<=51731)return a.CLUSTER_BREAK.LVT}else if(e<51733){if(e===51732)return a.CLUSTER_BREAK.LV}else if(51733<=e&&e<=51759)return a.CLUSTER_BREAK.LVT}else if(e<51817){if(e<51788){if(e<51761){if(e===51760)return a.CLUSTER_BREAK.LV}else if(51761<=e&&e<=51787)return a.CLUSTER_BREAK.LVT}else if(e<51789){if(e===51788)return a.CLUSTER_BREAK.LV}else if(e<51816){if(51789<=e&&e<=51815)return a.CLUSTER_BREAK.LVT}else if(e===51816)return a.CLUSTER_BREAK.LV}else if(e<51872){if(e<51844){if(51817<=e&&e<=51843)return a.CLUSTER_BREAK.LVT}else if(e<51845){if(e===51844)return a.CLUSTER_BREAK.LV}else if(51845<=e&&e<=51871)return a.CLUSTER_BREAK.LVT}else if(e<51873){if(e===51872)return a.CLUSTER_BREAK.LV}else if(e<51900){if(51873<=e&&e<=51899)return a.CLUSTER_BREAK.LVT}else if(e===51900)return a.CLUSTER_BREAK.LV}else if(e<52208){if(e<52041){if(e<51984){if(e<51929){if(e<51928){if(51901<=e&&e<=51927)return a.CLUSTER_BREAK.LVT}else if(e===51928)return a.CLUSTER_BREAK.LV}else if(e<51956){if(51929<=e&&e<=51955)return a.CLUSTER_BREAK.LVT}else if(e<51957){if(e===51956)return a.CLUSTER_BREAK.LV}else if(51957<=e&&e<=51983)return a.CLUSTER_BREAK.LVT}else if(e<52012){if(e<51985){if(e===51984)return a.CLUSTER_BREAK.LV}else if(51985<=e&&e<=52011)return a.CLUSTER_BREAK.LVT}else if(e<52013){if(e===52012)return a.CLUSTER_BREAK.LV}else if(e<52040){if(52013<=e&&e<=52039)return a.CLUSTER_BREAK.LVT}else if(e===52040)return a.CLUSTER_BREAK.LV}else if(e<52124){if(e<52069){if(e<52068){if(52041<=e&&e<=52067)return a.CLUSTER_BREAK.LVT}else if(e===52068)return a.CLUSTER_BREAK.LV}else if(e<52096){if(52069<=e&&e<=52095)return a.CLUSTER_BREAK.LVT}else if(e<52097){if(e===52096)return a.CLUSTER_BREAK.LV}else if(52097<=e&&e<=52123)return a.CLUSTER_BREAK.LVT}else if(e<52153){if(e<52125){if(e===52124)return a.CLUSTER_BREAK.LV}else if(e<52152){if(52125<=e&&e<=52151)return a.CLUSTER_BREAK.LVT}else if(e===52152)return a.CLUSTER_BREAK.LV}else if(e<52180){if(52153<=e&&e<=52179)return a.CLUSTER_BREAK.LVT}else if(e<52181){if(e===52180)return a.CLUSTER_BREAK.LV}else if(52181<=e&&e<=52207)return a.CLUSTER_BREAK.LVT}else if(e<52349){if(e<52265){if(e<52236){if(e<52209){if(e===52208)return a.CLUSTER_BREAK.LV}else if(52209<=e&&e<=52235)return a.CLUSTER_BREAK.LVT}else if(e<52237){if(e===52236)return a.CLUSTER_BREAK.LV}else if(e<52264){if(52237<=e&&e<=52263)return a.CLUSTER_BREAK.LVT}else if(e===52264)return a.CLUSTER_BREAK.LV}else if(e<52320){if(e<52292){if(52265<=e&&e<=52291)return a.CLUSTER_BREAK.LVT}else if(e<52293){if(e===52292)return a.CLUSTER_BREAK.LV}else if(52293<=e&&e<=52319)return a.CLUSTER_BREAK.LVT}else if(e<52321){if(e===52320)return a.CLUSTER_BREAK.LV}else if(e<52348){if(52321<=e&&e<=52347)return a.CLUSTER_BREAK.LVT}else if(e===52348)return a.CLUSTER_BREAK.LV}else if(e<52432){if(e<52377){if(e<52376){if(52349<=e&&e<=52375)return a.CLUSTER_BREAK.LVT}else if(e===52376)return a.CLUSTER_BREAK.LV}else if(e<52404){if(52377<=e&&e<=52403)return a.CLUSTER_BREAK.LVT}else if(e<52405){if(e===52404)return a.CLUSTER_BREAK.LV}else if(52405<=e&&e<=52431)return a.CLUSTER_BREAK.LVT}else if(e<52461){if(e<52433){if(e===52432)return a.CLUSTER_BREAK.LV}else if(e<52460){if(52433<=e&&e<=52459)return a.CLUSTER_BREAK.LVT}else if(e===52460)return a.CLUSTER_BREAK.LV}else if(e<52488){if(52461<=e&&e<=52487)return a.CLUSTER_BREAK.LVT}else if(e<52489){if(e===52488)return a.CLUSTER_BREAK.LV}else if(52489<=e&&e<=52515)return a.CLUSTER_BREAK.LVT}else if(e<53105){if(e<52797){if(e<52656){if(e<52573){if(e<52544){if(e<52517){if(e===52516)return a.CLUSTER_BREAK.LV}else if(52517<=e&&e<=52543)return a.CLUSTER_BREAK.LVT}else if(e<52545){if(e===52544)return a.CLUSTER_BREAK.LV}else if(e<52572){if(52545<=e&&e<=52571)return a.CLUSTER_BREAK.LVT}else if(e===52572)return a.CLUSTER_BREAK.LV}else if(e<52601){if(e<52600){if(52573<=e&&e<=52599)return a.CLUSTER_BREAK.LVT}else if(e===52600)return a.CLUSTER_BREAK.LV}else if(e<52628){if(52601<=e&&e<=52627)return a.CLUSTER_BREAK.LVT}else if(e<52629){if(e===52628)return a.CLUSTER_BREAK.LV}else if(52629<=e&&e<=52655)return a.CLUSTER_BREAK.LVT}else if(e<52713){if(e<52684){if(e<52657){if(e===52656)return a.CLUSTER_BREAK.LV}else if(52657<=e&&e<=52683)return a.CLUSTER_BREAK.LVT}else if(e<52685){if(e===52684)return a.CLUSTER_BREAK.LV}else if(e<52712){if(52685<=e&&e<=52711)return a.CLUSTER_BREAK.LVT}else if(e===52712)return a.CLUSTER_BREAK.LV}else if(e<52768){if(e<52740){if(52713<=e&&e<=52739)return a.CLUSTER_BREAK.LVT}else if(e<52741){if(e===52740)return a.CLUSTER_BREAK.LV}else if(52741<=e&&e<=52767)return a.CLUSTER_BREAK.LVT}else if(e<52769){if(e===52768)return a.CLUSTER_BREAK.LV}else if(e<52796){if(52769<=e&&e<=52795)return a.CLUSTER_BREAK.LVT}else if(e===52796)return a.CLUSTER_BREAK.LV}else if(e<52964){if(e<52880){if(e<52825){if(e<52824){if(52797<=e&&e<=52823)return a.CLUSTER_BREAK.LVT}else if(e===52824)return a.CLUSTER_BREAK.LV}else if(e<52852){if(52825<=e&&e<=52851)return a.CLUSTER_BREAK.LVT}else if(e<52853){if(e===52852)return a.CLUSTER_BREAK.LV}else if(52853<=e&&e<=52879)return a.CLUSTER_BREAK.LVT}else if(e<52909){if(e<52881){if(e===52880)return a.CLUSTER_BREAK.LV}else if(e<52908){if(52881<=e&&e<=52907)return a.CLUSTER_BREAK.LVT}else if(e===52908)return a.CLUSTER_BREAK.LV}else if(e<52936){if(52909<=e&&e<=52935)return a.CLUSTER_BREAK.LVT}else if(e<52937){if(e===52936)return a.CLUSTER_BREAK.LV}else if(52937<=e&&e<=52963)return a.CLUSTER_BREAK.LVT}else if(e<53021){if(e<52992){if(e<52965){if(e===52964)return a.CLUSTER_BREAK.LV}else if(52965<=e&&e<=52991)return a.CLUSTER_BREAK.LVT}else if(e<52993){if(e===52992)return a.CLUSTER_BREAK.LV}else if(e<53020){if(52993<=e&&e<=53019)return a.CLUSTER_BREAK.LVT}else if(e===53020)return a.CLUSTER_BREAK.LV}else if(e<53076){if(e<53048){if(53021<=e&&e<=53047)return a.CLUSTER_BREAK.LVT}else if(e<53049){if(e===53048)return a.CLUSTER_BREAK.LV}else if(53049<=e&&e<=53075)return a.CLUSTER_BREAK.LVT}else if(e<53077){if(e===53076)return a.CLUSTER_BREAK.LV}else if(e<53104){if(53077<=e&&e<=53103)return a.CLUSTER_BREAK.LVT}else if(e===53104)return a.CLUSTER_BREAK.LV}else if(e<53412){if(e<53245){if(e<53188){if(e<53133){if(e<53132){if(53105<=e&&e<=53131)return a.CLUSTER_BREAK.LVT}else if(e===53132)return a.CLUSTER_BREAK.LV}else if(e<53160){if(53133<=e&&e<=53159)return a.CLUSTER_BREAK.LVT}else if(e<53161){if(e===53160)return a.CLUSTER_BREAK.LV}else if(53161<=e&&e<=53187)return a.CLUSTER_BREAK.LVT}else if(e<53216){if(e<53189){if(e===53188)return a.CLUSTER_BREAK.LV}else if(53189<=e&&e<=53215)return a.CLUSTER_BREAK.LVT}else if(e<53217){if(e===53216)return a.CLUSTER_BREAK.LV}else if(e<53244){if(53217<=e&&e<=53243)return a.CLUSTER_BREAK.LVT}else if(e===53244)return a.CLUSTER_BREAK.LV}else if(e<53328){if(e<53273){if(e<53272){if(53245<=e&&e<=53271)return a.CLUSTER_BREAK.LVT}else if(e===53272)return a.CLUSTER_BREAK.LV}else if(e<53300){if(53273<=e&&e<=53299)return a.CLUSTER_BREAK.LVT}else if(e<53301){if(e===53300)return a.CLUSTER_BREAK.LV}else if(53301<=e&&e<=53327)return a.CLUSTER_BREAK.LVT}else if(e<53357){if(e<53329){if(e===53328)return a.CLUSTER_BREAK.LV}else if(e<53356){if(53329<=e&&e<=53355)return a.CLUSTER_BREAK.LVT}else if(e===53356)return a.CLUSTER_BREAK.LV}else if(e<53384){if(53357<=e&&e<=53383)return a.CLUSTER_BREAK.LVT}else if(e<53385){if(e===53384)return a.CLUSTER_BREAK.LV}else if(53385<=e&&e<=53411)return a.CLUSTER_BREAK.LVT}else if(e<53553){if(e<53469){if(e<53440){if(e<53413){if(e===53412)return a.CLUSTER_BREAK.LV}else if(53413<=e&&e<=53439)return a.CLUSTER_BREAK.LVT}else if(e<53441){if(e===53440)return a.CLUSTER_BREAK.LV}else if(e<53468){if(53441<=e&&e<=53467)return a.CLUSTER_BREAK.LVT}else if(e===53468)return a.CLUSTER_BREAK.LV}else if(e<53524){if(e<53496){if(53469<=e&&e<=53495)return a.CLUSTER_BREAK.LVT}else if(e<53497){if(e===53496)return a.CLUSTER_BREAK.LV}else if(53497<=e&&e<=53523)return a.CLUSTER_BREAK.LVT}else if(e<53525){if(e===53524)return a.CLUSTER_BREAK.LV}else if(e<53552){if(53525<=e&&e<=53551)return a.CLUSTER_BREAK.LVT}else if(e===53552)return a.CLUSTER_BREAK.LV}else if(e<53636){if(e<53581){if(e<53580){if(53553<=e&&e<=53579)return a.CLUSTER_BREAK.LVT}else if(e===53580)return a.CLUSTER_BREAK.LV}else if(e<53608){if(53581<=e&&e<=53607)return a.CLUSTER_BREAK.LVT}else if(e<53609){if(e===53608)return a.CLUSTER_BREAK.LV}else if(53609<=e&&e<=53635)return a.CLUSTER_BREAK.LVT}else if(e<53665){if(e<53637){if(e===53636)return a.CLUSTER_BREAK.LV}else if(e<53664){if(53637<=e&&e<=53663)return a.CLUSTER_BREAK.LVT}else if(e===53664)return a.CLUSTER_BREAK.LV}else if(e<53692){if(53665<=e&&e<=53691)return a.CLUSTER_BREAK.LVT}else if(e<53693){if(e===53692)return a.CLUSTER_BREAK.LV}else if(53693<=e&&e<=53719)return a.CLUSTER_BREAK.LVT}else if(e<70459){if(e<54897){if(e<54308){if(e<54001){if(e<53860){if(e<53777){if(e<53748){if(e<53721){if(e===53720)return a.CLUSTER_BREAK.LV}else if(53721<=e&&e<=53747)return a.CLUSTER_BREAK.LVT}else if(e<53749){if(e===53748)return a.CLUSTER_BREAK.LV}else if(e<53776){if(53749<=e&&e<=53775)return a.CLUSTER_BREAK.LVT}else if(e===53776)return a.CLUSTER_BREAK.LV}else if(e<53805){if(e<53804){if(53777<=e&&e<=53803)return a.CLUSTER_BREAK.LVT}else if(e===53804)return a.CLUSTER_BREAK.LV}else if(e<53832){if(53805<=e&&e<=53831)return a.CLUSTER_BREAK.LVT}else if(e<53833){if(e===53832)return a.CLUSTER_BREAK.LV}else if(53833<=e&&e<=53859)return a.CLUSTER_BREAK.LVT}else if(e<53917){if(e<53888){if(e<53861){if(e===53860)return a.CLUSTER_BREAK.LV}else if(53861<=e&&e<=53887)return a.CLUSTER_BREAK.LVT}else if(e<53889){if(e===53888)return a.CLUSTER_BREAK.LV}else if(e<53916){if(53889<=e&&e<=53915)return a.CLUSTER_BREAK.LVT}else if(e===53916)return a.CLUSTER_BREAK.LV}else if(e<53972){if(e<53944){if(53917<=e&&e<=53943)return a.CLUSTER_BREAK.LVT}else if(e<53945){if(e===53944)return a.CLUSTER_BREAK.LV}else if(53945<=e&&e<=53971)return a.CLUSTER_BREAK.LVT}else if(e<53973){if(e===53972)return a.CLUSTER_BREAK.LV}else if(e<54e3){if(53973<=e&&e<=53999)return a.CLUSTER_BREAK.LVT}else if(e===54e3)return a.CLUSTER_BREAK.LV}else if(e<54141){if(e<54084){if(e<54029){if(e<54028){if(54001<=e&&e<=54027)return a.CLUSTER_BREAK.LVT}else if(e===54028)return a.CLUSTER_BREAK.LV}else if(e<54056){if(54029<=e&&e<=54055)return a.CLUSTER_BREAK.LVT}else if(e<54057){if(e===54056)return a.CLUSTER_BREAK.LV}else if(54057<=e&&e<=54083)return a.CLUSTER_BREAK.LVT}else if(e<54112){if(e<54085){if(e===54084)return a.CLUSTER_BREAK.LV}else if(54085<=e&&e<=54111)return a.CLUSTER_BREAK.LVT}else if(e<54113){if(e===54112)return a.CLUSTER_BREAK.LV}else if(e<54140){if(54113<=e&&e<=54139)return a.CLUSTER_BREAK.LVT}else if(e===54140)return a.CLUSTER_BREAK.LV}else if(e<54224){if(e<54169){if(e<54168){if(54141<=e&&e<=54167)return a.CLUSTER_BREAK.LVT}else if(e===54168)return a.CLUSTER_BREAK.LV}else if(e<54196){if(54169<=e&&e<=54195)return a.CLUSTER_BREAK.LVT}else if(e<54197){if(e===54196)return a.CLUSTER_BREAK.LV}else if(54197<=e&&e<=54223)return a.CLUSTER_BREAK.LVT}else if(e<54253){if(e<54225){if(e===54224)return a.CLUSTER_BREAK.LV}else if(e<54252){if(54225<=e&&e<=54251)return a.CLUSTER_BREAK.LVT}else if(e===54252)return a.CLUSTER_BREAK.LV}else if(e<54280){if(54253<=e&&e<=54279)return a.CLUSTER_BREAK.LVT}else if(e<54281){if(e===54280)return a.CLUSTER_BREAK.LV}else if(54281<=e&&e<=54307)return a.CLUSTER_BREAK.LVT}else if(e<54589){if(e<54448){if(e<54365){if(e<54336){if(e<54309){if(e===54308)return a.CLUSTER_BREAK.LV}else if(54309<=e&&e<=54335)return a.CLUSTER_BREAK.LVT}else if(e<54337){if(e===54336)return a.CLUSTER_BREAK.LV}else if(e<54364){if(54337<=e&&e<=54363)return a.CLUSTER_BREAK.LVT}else if(e===54364)return a.CLUSTER_BREAK.LV}else if(e<54393){if(e<54392){if(54365<=e&&e<=54391)return a.CLUSTER_BREAK.LVT}else if(e===54392)return a.CLUSTER_BREAK.LV}else if(e<54420){if(54393<=e&&e<=54419)return a.CLUSTER_BREAK.LVT}else if(e<54421){if(e===54420)return a.CLUSTER_BREAK.LV}else if(54421<=e&&e<=54447)return a.CLUSTER_BREAK.LVT}else if(e<54505){if(e<54476){if(e<54449){if(e===54448)return a.CLUSTER_BREAK.LV}else if(54449<=e&&e<=54475)return a.CLUSTER_BREAK.LVT}else if(e<54477){if(e===54476)return a.CLUSTER_BREAK.LV}else if(e<54504){if(54477<=e&&e<=54503)return a.CLUSTER_BREAK.LVT}else if(e===54504)return a.CLUSTER_BREAK.LV}else if(e<54560){if(e<54532){if(54505<=e&&e<=54531)return a.CLUSTER_BREAK.LVT}else if(e<54533){if(e===54532)return a.CLUSTER_BREAK.LV}else if(54533<=e&&e<=54559)return a.CLUSTER_BREAK.LVT}else if(e<54561){if(e===54560)return a.CLUSTER_BREAK.LV}else if(e<54588){if(54561<=e&&e<=54587)return a.CLUSTER_BREAK.LVT}else if(e===54588)return a.CLUSTER_BREAK.LV}else if(e<54756){if(e<54672){if(e<54617){if(e<54616){if(54589<=e&&e<=54615)return a.CLUSTER_BREAK.LVT}else if(e===54616)return a.CLUSTER_BREAK.LV}else if(e<54644){if(54617<=e&&e<=54643)return a.CLUSTER_BREAK.LVT}else if(e<54645){if(e===54644)return a.CLUSTER_BREAK.LV}else if(54645<=e&&e<=54671)return a.CLUSTER_BREAK.LVT}else if(e<54701){if(e<54673){if(e===54672)return a.CLUSTER_BREAK.LV}else if(e<54700){if(54673<=e&&e<=54699)return a.CLUSTER_BREAK.LVT}else if(e===54700)return a.CLUSTER_BREAK.LV}else if(e<54728){if(54701<=e&&e<=54727)return a.CLUSTER_BREAK.LVT}else if(e<54729){if(e===54728)return a.CLUSTER_BREAK.LV}else if(54729<=e&&e<=54755)return a.CLUSTER_BREAK.LVT}else if(e<54813){if(e<54784){if(e<54757){if(e===54756)return a.CLUSTER_BREAK.LV}else if(54757<=e&&e<=54783)return a.CLUSTER_BREAK.LVT}else if(e<54785){if(e===54784)return a.CLUSTER_BREAK.LV}else if(e<54812){if(54785<=e&&e<=54811)return a.CLUSTER_BREAK.LVT}else if(e===54812)return a.CLUSTER_BREAK.LV}else if(e<54868){if(e<54840){if(54813<=e&&e<=54839)return a.CLUSTER_BREAK.LVT}else if(e<54841){if(e===54840)return a.CLUSTER_BREAK.LV}else if(54841<=e&&e<=54867)return a.CLUSTER_BREAK.LVT}else if(e<54869){if(e===54868)return a.CLUSTER_BREAK.LV}else if(e<54896){if(54869<=e&&e<=54895)return a.CLUSTER_BREAK.LVT}else if(e===54896)return a.CLUSTER_BREAK.LV}else if(e<69632){if(e<55216){if(e<55037){if(e<54980){if(e<54925){if(e<54924){if(54897<=e&&e<=54923)return a.CLUSTER_BREAK.LVT}else if(e===54924)return a.CLUSTER_BREAK.LV}else if(e<54952){if(54925<=e&&e<=54951)return a.CLUSTER_BREAK.LVT}else if(e<54953){if(e===54952)return a.CLUSTER_BREAK.LV}else if(54953<=e&&e<=54979)return a.CLUSTER_BREAK.LVT}else if(e<55008){if(e<54981){if(e===54980)return a.CLUSTER_BREAK.LV}else if(54981<=e&&e<=55007)return a.CLUSTER_BREAK.LVT}else if(e<55009){if(e===55008)return a.CLUSTER_BREAK.LV}else if(e<55036){if(55009<=e&&e<=55035)return a.CLUSTER_BREAK.LVT}else if(e===55036)return a.CLUSTER_BREAK.LV}else if(e<55120){if(e<55065){if(e<55064){if(55037<=e&&e<=55063)return a.CLUSTER_BREAK.LVT}else if(e===55064)return a.CLUSTER_BREAK.LV}else if(e<55092){if(55065<=e&&e<=55091)return a.CLUSTER_BREAK.LVT}else if(e<55093){if(e===55092)return a.CLUSTER_BREAK.LV}else if(55093<=e&&e<=55119)return a.CLUSTER_BREAK.LVT}else if(e<55149){if(e<55121){if(e===55120)return a.CLUSTER_BREAK.LV}else if(e<55148){if(55121<=e&&e<=55147)return a.CLUSTER_BREAK.LVT}else if(e===55148)return a.CLUSTER_BREAK.LV}else if(e<55176){if(55149<=e&&e<=55175)return a.CLUSTER_BREAK.LVT}else if(e<55177){if(e===55176)return a.CLUSTER_BREAK.LV}else if(55177<=e&&e<=55203)return a.CLUSTER_BREAK.LVT}else if(e<68097){if(e<65279){if(e<64286){if(e<55243){if(55216<=e&&e<=55238)return a.CLUSTER_BREAK.V}else if(55243<=e&&e<=55291)return a.CLUSTER_BREAK.T}else if(e<65024){if(e===64286)return a.CLUSTER_BREAK.EXTEND}else if(e<65056){if(65024<=e&&e<=65039)return a.CLUSTER_BREAK.EXTEND}else if(65056<=e&&e<=65071)return a.CLUSTER_BREAK.EXTEND}else if(e<66045){if(e<65438){if(e===65279)return a.CLUSTER_BREAK.CONTROL}else if(e<65520){if(65438<=e&&e<=65439)return a.CLUSTER_BREAK.EXTEND}else if(65520<=e&&e<=65531)return a.CLUSTER_BREAK.CONTROL}else if(e<66272){if(e===66045)return a.CLUSTER_BREAK.EXTEND}else if(e<66422){if(e===66272)return a.CLUSTER_BREAK.EXTEND}else if(66422<=e&&e<=66426)return a.CLUSTER_BREAK.EXTEND}else if(e<68325){if(e<68108){if(e<68101){if(68097<=e&&e<=68099)return a.CLUSTER_BREAK.EXTEND}else if(68101<=e&&e<=68102)return a.CLUSTER_BREAK.EXTEND}else if(e<68152){if(68108<=e&&e<=68111)return a.CLUSTER_BREAK.EXTEND}else if(e<68159){if(68152<=e&&e<=68154)return a.CLUSTER_BREAK.EXTEND}else if(e===68159)return a.CLUSTER_BREAK.EXTEND}else if(e<69373){if(e<68900){if(68325<=e&&e<=68326)return a.CLUSTER_BREAK.EXTEND}else if(e<69291){if(68900<=e&&e<=68903)return a.CLUSTER_BREAK.EXTEND}else if(69291<=e&&e<=69292)return a.CLUSTER_BREAK.EXTEND}else if(e<69446){if(69373<=e&&e<=69375)return a.CLUSTER_BREAK.EXTEND}else if(e<69506){if(69446<=e&&e<=69456)return a.CLUSTER_BREAK.EXTEND}else if(69506<=e&&e<=69509)return a.CLUSTER_BREAK.EXTEND}else if(e<70016){if(e<69815){if(e<69747){if(e<69634){if(e===69632)return a.CLUSTER_BREAK.SPACINGMARK;if(e===69633)return a.CLUSTER_BREAK.EXTEND}else if(e<69688){if(e===69634)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<69744){if(69688<=e&&e<=69702)return a.CLUSTER_BREAK.EXTEND}else if(e===69744)return a.CLUSTER_BREAK.EXTEND}else if(e<69762){if(e<69759){if(69747<=e&&e<=69748)return a.CLUSTER_BREAK.EXTEND}else if(69759<=e&&e<=69761)return a.CLUSTER_BREAK.EXTEND}else if(e<69808){if(e===69762)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<69811){if(69808<=e&&e<=69810)return a.CLUSTER_BREAK.SPACINGMARK}else if(69811<=e&&e<=69814)return a.CLUSTER_BREAK.EXTEND}else if(e<69888)if(e<69821){if(e<69817){if(69815<=e&&e<=69816)return a.CLUSTER_BREAK.SPACINGMARK}else if(69817<=e&&e<=69818)return a.CLUSTER_BREAK.EXTEND}else if(e<69826){if(e===69821)return a.CLUSTER_BREAK.PREPEND}else{if(e===69826)return a.CLUSTER_BREAK.EXTEND;if(e===69837)return a.CLUSTER_BREAK.PREPEND}else if(e<69933){if(e<69927){if(69888<=e&&e<=69890)return a.CLUSTER_BREAK.EXTEND}else if(e<69932){if(69927<=e&&e<=69931)return a.CLUSTER_BREAK.EXTEND}else if(e===69932)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<69957){if(69933<=e&&e<=69940)return a.CLUSTER_BREAK.EXTEND}else if(e<70003){if(69957<=e&&e<=69958)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===70003)return a.CLUSTER_BREAK.EXTEND}else if(e<70194){if(e<70082){if(e<70067){if(e<70018){if(70016<=e&&e<=70017)return a.CLUSTER_BREAK.EXTEND}else if(e===70018)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70070){if(70067<=e&&e<=70069)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70079){if(70070<=e&&e<=70078)return a.CLUSTER_BREAK.EXTEND}else if(70079<=e&&e<=70080)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70095){if(e<70089){if(70082<=e&&e<=70083)return a.CLUSTER_BREAK.PREPEND}else if(e<70094){if(70089<=e&&e<=70092)return a.CLUSTER_BREAK.EXTEND}else if(e===70094)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70188){if(e===70095)return a.CLUSTER_BREAK.EXTEND}else if(e<70191){if(70188<=e&&e<=70190)return a.CLUSTER_BREAK.SPACINGMARK}else if(70191<=e&&e<=70193)return a.CLUSTER_BREAK.EXTEND}else if(e<70209){if(e<70197){if(e<70196){if(70194<=e&&e<=70195)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===70196)return a.CLUSTER_BREAK.EXTEND}else if(e<70198){if(e===70197)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70206){if(70198<=e&&e<=70199)return a.CLUSTER_BREAK.EXTEND}else if(e===70206)return a.CLUSTER_BREAK.EXTEND}else if(e<70371){if(e<70367){if(e===70209)return a.CLUSTER_BREAK.EXTEND}else if(e<70368){if(e===70367)return a.CLUSTER_BREAK.EXTEND}else if(70368<=e&&e<=70370)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70400){if(70371<=e&&e<=70378)return a.CLUSTER_BREAK.EXTEND}else if(e<70402){if(70400<=e&&e<=70401)return a.CLUSTER_BREAK.EXTEND}else if(70402<=e&&e<=70403)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<72343){if(e<71339){if(e<70841){if(e<70512){if(e<70471){if(e<70463){if(e<70462){if(70459<=e&&e<=70460)return a.CLUSTER_BREAK.EXTEND}else if(e===70462)return a.CLUSTER_BREAK.EXTEND}else if(e<70464){if(e===70463)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70465){if(e===70464)return a.CLUSTER_BREAK.EXTEND}else if(70465<=e&&e<=70468)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70487){if(e<70475){if(70471<=e&&e<=70472)return a.CLUSTER_BREAK.SPACINGMARK}else if(70475<=e&&e<=70477)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70498){if(e===70487)return a.CLUSTER_BREAK.EXTEND}else if(e<70502){if(70498<=e&&e<=70499)return a.CLUSTER_BREAK.SPACINGMARK}else if(70502<=e&&e<=70508)return a.CLUSTER_BREAK.EXTEND}else if(e<70725){if(e<70712){if(e<70709){if(70512<=e&&e<=70516)return a.CLUSTER_BREAK.EXTEND}else if(70709<=e&&e<=70711)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<70720){if(70712<=e&&e<=70719)return a.CLUSTER_BREAK.EXTEND}else if(e<70722){if(70720<=e&&e<=70721)return a.CLUSTER_BREAK.SPACINGMARK}else if(70722<=e&&e<=70724)return a.CLUSTER_BREAK.EXTEND}else if(e<70832){if(e<70726){if(e===70725)return a.CLUSTER_BREAK.SPACINGMARK}else if(e===70726||e===70750)return a.CLUSTER_BREAK.EXTEND}else if(e<70833){if(e===70832)return a.CLUSTER_BREAK.EXTEND}else if(e<70835){if(70833<=e&&e<=70834)return a.CLUSTER_BREAK.SPACINGMARK}else if(70835<=e&&e<=70840)return a.CLUSTER_BREAK.EXTEND}else if(e<71096){if(e<70847)if(e<70843){if(e===70841)return a.CLUSTER_BREAK.SPACINGMARK;if(e===70842)return a.CLUSTER_BREAK.EXTEND}else if(e<70845){if(70843<=e&&e<=70844)return a.CLUSTER_BREAK.SPACINGMARK}else{if(e===70845)return a.CLUSTER_BREAK.EXTEND;if(e===70846)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<71087){if(e<70849){if(70847<=e&&e<=70848)return a.CLUSTER_BREAK.EXTEND}else if(e<70850){if(e===70849)return a.CLUSTER_BREAK.SPACINGMARK}else if(70850<=e&&e<=70851)return a.CLUSTER_BREAK.EXTEND}else if(e<71088){if(e===71087)return a.CLUSTER_BREAK.EXTEND}else if(e<71090){if(71088<=e&&e<=71089)return a.CLUSTER_BREAK.SPACINGMARK}else if(71090<=e&&e<=71093)return a.CLUSTER_BREAK.EXTEND}else if(e<71216){if(e<71102){if(e<71100){if(71096<=e&&e<=71099)return a.CLUSTER_BREAK.SPACINGMARK}else if(71100<=e&&e<=71101)return a.CLUSTER_BREAK.EXTEND}else if(e<71103){if(e===71102)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<71132){if(71103<=e&&e<=71104)return a.CLUSTER_BREAK.EXTEND}else if(71132<=e&&e<=71133)return a.CLUSTER_BREAK.EXTEND}else if(e<71229){if(e<71219){if(71216<=e&&e<=71218)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<71227){if(71219<=e&&e<=71226)return a.CLUSTER_BREAK.EXTEND}else if(71227<=e&&e<=71228)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<71230){if(e===71229)return a.CLUSTER_BREAK.EXTEND}else if(e<71231){if(e===71230)return a.CLUSTER_BREAK.SPACINGMARK}else if(71231<=e&&e<=71232)return a.CLUSTER_BREAK.EXTEND}else if(e<71999)if(e<71463){if(e<71350){if(e<71341){if(e===71339)return a.CLUSTER_BREAK.EXTEND;if(e===71340)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<71342){if(e===71341)return a.CLUSTER_BREAK.EXTEND}else if(e<71344){if(71342<=e&&e<=71343)return a.CLUSTER_BREAK.SPACINGMARK}else if(71344<=e&&e<=71349)return a.CLUSTER_BREAK.EXTEND}else if(e<71453){if(e===71350)return a.CLUSTER_BREAK.SPACINGMARK;if(e===71351)return a.CLUSTER_BREAK.EXTEND}else if(e<71458){if(71453<=e&&e<=71455)return a.CLUSTER_BREAK.EXTEND}else if(e<71462){if(71458<=e&&e<=71461)return a.CLUSTER_BREAK.EXTEND}else if(e===71462)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<71984){if(e<71727){if(e<71724){if(71463<=e&&e<=71467)return a.CLUSTER_BREAK.EXTEND}else if(71724<=e&&e<=71726)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<71736){if(71727<=e&&e<=71735)return a.CLUSTER_BREAK.EXTEND}else if(e<71737){if(e===71736)return a.CLUSTER_BREAK.SPACINGMARK}else if(71737<=e&&e<=71738)return a.CLUSTER_BREAK.EXTEND}else if(e<71995){if(e<71985){if(e===71984)return a.CLUSTER_BREAK.EXTEND}else if(e<71991){if(71985<=e&&e<=71989)return a.CLUSTER_BREAK.SPACINGMARK}else if(71991<=e&&e<=71992)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<71997){if(71995<=e&&e<=71996)return a.CLUSTER_BREAK.EXTEND}else{if(e===71997)return a.CLUSTER_BREAK.SPACINGMARK;if(e===71998)return a.CLUSTER_BREAK.EXTEND}else if(e<72193)if(e<72145)if(e<72001){if(e===71999)return a.CLUSTER_BREAK.PREPEND;if(e===72e3)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<72002){if(e===72001)return a.CLUSTER_BREAK.PREPEND}else{if(e===72002)return a.CLUSTER_BREAK.SPACINGMARK;if(e===72003)return a.CLUSTER_BREAK.EXTEND}else if(e<72156){if(e<72148){if(72145<=e&&e<=72147)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<72154){if(72148<=e&&e<=72151)return a.CLUSTER_BREAK.EXTEND}else if(72154<=e&&e<=72155)return a.CLUSTER_BREAK.EXTEND}else if(e<72160){if(72156<=e&&e<=72159)return a.CLUSTER_BREAK.SPACINGMARK}else{if(e===72160)return a.CLUSTER_BREAK.EXTEND;if(e===72164)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<72263){if(e<72249){if(e<72243){if(72193<=e&&e<=72202)return a.CLUSTER_BREAK.EXTEND}else if(72243<=e&&e<=72248)return a.CLUSTER_BREAK.EXTEND}else if(e<72250){if(e===72249)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<72251){if(e===72250)return a.CLUSTER_BREAK.PREPEND}else if(72251<=e&&e<=72254)return a.CLUSTER_BREAK.EXTEND}else if(e<72281){if(e<72273){if(e===72263)return a.CLUSTER_BREAK.EXTEND}else if(e<72279){if(72273<=e&&e<=72278)return a.CLUSTER_BREAK.EXTEND}else if(72279<=e&&e<=72280)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<72324){if(72281<=e&&e<=72283)return a.CLUSTER_BREAK.EXTEND}else if(e<72330){if(72324<=e&&e<=72329)return a.CLUSTER_BREAK.PREPEND}else if(72330<=e&&e<=72342)return a.CLUSTER_BREAK.EXTEND}else if(e<94033){if(e<73104){if(e<72881){if(e<72766){if(e<72751){if(e<72344){if(e===72343)return a.CLUSTER_BREAK.SPACINGMARK}else if(72344<=e&&e<=72345)return a.CLUSTER_BREAK.EXTEND}else if(e<72752){if(e===72751)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<72760){if(72752<=e&&e<=72758)return a.CLUSTER_BREAK.EXTEND}else if(72760<=e&&e<=72765)return a.CLUSTER_BREAK.EXTEND}else if(e<72850){if(e===72766)return a.CLUSTER_BREAK.SPACINGMARK;if(e===72767)return a.CLUSTER_BREAK.EXTEND}else if(e<72873){if(72850<=e&&e<=72871)return a.CLUSTER_BREAK.EXTEND}else if(e<72874){if(e===72873)return a.CLUSTER_BREAK.SPACINGMARK}else if(72874<=e&&e<=72880)return a.CLUSTER_BREAK.EXTEND}else if(e<73018){if(e<72884){if(e<72882){if(e===72881)return a.CLUSTER_BREAK.SPACINGMARK}else if(72882<=e&&e<=72883)return a.CLUSTER_BREAK.EXTEND}else if(e<72885){if(e===72884)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<73009){if(72885<=e&&e<=72886)return a.CLUSTER_BREAK.EXTEND}else if(73009<=e&&e<=73014)return a.CLUSTER_BREAK.EXTEND}else if(e<73030){if(e<73020){if(e===73018)return a.CLUSTER_BREAK.EXTEND}else if(e<73023){if(73020<=e&&e<=73021)return a.CLUSTER_BREAK.EXTEND}else if(73023<=e&&e<=73029)return a.CLUSTER_BREAK.EXTEND}else if(e<73031){if(e===73030)return a.CLUSTER_BREAK.PREPEND}else if(e<73098){if(e===73031)return a.CLUSTER_BREAK.EXTEND}else if(73098<=e&&e<=73102)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<73526){if(e<73459)if(e<73109){if(e<73107){if(73104<=e&&e<=73105)return a.CLUSTER_BREAK.EXTEND}else if(73107<=e&&e<=73108)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<73110){if(e===73109)return a.CLUSTER_BREAK.EXTEND}else{if(e===73110)return a.CLUSTER_BREAK.SPACINGMARK;if(e===73111)return a.CLUSTER_BREAK.EXTEND}else if(e<73474){if(e<73461){if(73459<=e&&e<=73460)return a.CLUSTER_BREAK.EXTEND}else if(e<73472){if(73461<=e&&e<=73462)return a.CLUSTER_BREAK.SPACINGMARK}else if(73472<=e&&e<=73473)return a.CLUSTER_BREAK.EXTEND}else if(e<73475){if(e===73474)return a.CLUSTER_BREAK.PREPEND}else if(e<73524){if(e===73475)return a.CLUSTER_BREAK.SPACINGMARK}else if(73524<=e&&e<=73525)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<78896)if(e<73536){if(e<73534){if(73526<=e&&e<=73530)return a.CLUSTER_BREAK.EXTEND}else if(73534<=e&&e<=73535)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<73537){if(e===73536)return a.CLUSTER_BREAK.EXTEND}else{if(e===73537)return a.CLUSTER_BREAK.SPACINGMARK;if(e===73538)return a.CLUSTER_BREAK.EXTEND}else if(e<92912){if(e<78912){if(78896<=e&&e<=78911)return a.CLUSTER_BREAK.CONTROL}else if(e<78919){if(e===78912)return a.CLUSTER_BREAK.EXTEND}else if(78919<=e&&e<=78933)return a.CLUSTER_BREAK.EXTEND}else if(e<92976){if(92912<=e&&e<=92916)return a.CLUSTER_BREAK.EXTEND}else if(e<94031){if(92976<=e&&e<=92982)return a.CLUSTER_BREAK.EXTEND}else if(e===94031)return a.CLUSTER_BREAK.EXTEND}else if(e<121476){if(e<119143)if(e<113824){if(e<94180){if(e<94095){if(94033<=e&&e<=94087)return a.CLUSTER_BREAK.SPACINGMARK}else if(94095<=e&&e<=94098)return a.CLUSTER_BREAK.EXTEND}else if(e<94192){if(e===94180)return a.CLUSTER_BREAK.EXTEND}else if(e<113821){if(94192<=e&&e<=94193)return a.CLUSTER_BREAK.SPACINGMARK}else if(113821<=e&&e<=113822)return a.CLUSTER_BREAK.EXTEND}else if(e<118576){if(e<118528){if(113824<=e&&e<=113827)return a.CLUSTER_BREAK.CONTROL}else if(118528<=e&&e<=118573)return a.CLUSTER_BREAK.EXTEND}else if(e<119141){if(118576<=e&&e<=118598)return a.CLUSTER_BREAK.EXTEND}else{if(e===119141)return a.CLUSTER_BREAK.EXTEND;if(e===119142)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<119173){if(e<119150){if(e<119149){if(119143<=e&&e<=119145)return a.CLUSTER_BREAK.EXTEND}else if(e===119149)return a.CLUSTER_BREAK.SPACINGMARK}else if(e<119155){if(119150<=e&&e<=119154)return a.CLUSTER_BREAK.EXTEND}else if(e<119163){if(119155<=e&&e<=119162)return a.CLUSTER_BREAK.CONTROL}else if(119163<=e&&e<=119170)return a.CLUSTER_BREAK.EXTEND}else if(e<121344){if(e<119210){if(119173<=e&&e<=119179)return a.CLUSTER_BREAK.EXTEND}else if(e<119362){if(119210<=e&&e<=119213)return a.CLUSTER_BREAK.EXTEND}else if(119362<=e&&e<=119364)return a.CLUSTER_BREAK.EXTEND}else if(e<121403){if(121344<=e&&e<=121398)return a.CLUSTER_BREAK.EXTEND}else if(e<121461){if(121403<=e&&e<=121452)return a.CLUSTER_BREAK.EXTEND}else if(e===121461)return a.CLUSTER_BREAK.EXTEND}else if(e<123628){if(e<122907){if(e<121505){if(e<121499){if(e===121476)return a.CLUSTER_BREAK.EXTEND}else if(121499<=e&&e<=121503)return a.CLUSTER_BREAK.EXTEND}else if(e<122880){if(121505<=e&&e<=121519)return a.CLUSTER_BREAK.EXTEND}else if(e<122888){if(122880<=e&&e<=122886)return a.CLUSTER_BREAK.EXTEND}else if(122888<=e&&e<=122904)return a.CLUSTER_BREAK.EXTEND}else if(e<123023){if(e<122915){if(122907<=e&&e<=122913)return a.CLUSTER_BREAK.EXTEND}else if(e<122918){if(122915<=e&&e<=122916)return a.CLUSTER_BREAK.EXTEND}else if(122918<=e&&e<=122922)return a.CLUSTER_BREAK.EXTEND}else if(e<123184){if(e===123023)return a.CLUSTER_BREAK.EXTEND}else if(e<123566){if(123184<=e&&e<=123190)return a.CLUSTER_BREAK.EXTEND}else if(e===123566)return a.CLUSTER_BREAK.EXTEND}else if(e<127995){if(e<125136){if(e<124140){if(123628<=e&&e<=123631)return a.CLUSTER_BREAK.EXTEND}else if(124140<=e&&e<=124143)return a.CLUSTER_BREAK.EXTEND}else if(e<125252){if(125136<=e&&e<=125142)return a.CLUSTER_BREAK.EXTEND}else if(e<127462){if(125252<=e&&e<=125258)return a.CLUSTER_BREAK.EXTEND}else if(127462<=e&&e<=127487)return a.CLUSTER_BREAK.REGIONAL_INDICATOR}else if(e<917632){if(e<917504){if(127995<=e&&e<=127999)return a.CLUSTER_BREAK.EXTEND}else if(e<917536){if(917504<=e&&e<=917535)return a.CLUSTER_BREAK.CONTROL}else if(917536<=e&&e<=917631)return a.CLUSTER_BREAK.EXTEND}else if(e<917760){if(917632<=e&&e<=917759)return a.CLUSTER_BREAK.CONTROL}else if(e<918e3){if(917760<=e&&e<=917999)return a.CLUSTER_BREAK.EXTEND}else if(918e3<=e&&e<=921599)return a.CLUSTER_BREAK.CONTROL;return a.CLUSTER_BREAK.OTHER}static getEmojiProperty(e){if(e<10160){if(e<9728){if(e<9e3){if(e<8482){if(e<8252){if(e===169||e===174)return a.EXTENDED_PICTOGRAPHIC}else if(e===8252||e===8265)return a.EXTENDED_PICTOGRAPHIC}else if(e<8596){if(e===8482||e===8505)return a.EXTENDED_PICTOGRAPHIC}else if(e<8617){if(8596<=e&&e<=8601)return a.EXTENDED_PICTOGRAPHIC}else if(e<8986){if(8617<=e&&e<=8618)return a.EXTENDED_PICTOGRAPHIC}else if(8986<=e&&e<=8987)return a.EXTENDED_PICTOGRAPHIC}else if(e<9410){if(e<9167){if(e===9e3||e===9096)return a.EXTENDED_PICTOGRAPHIC}else if(e<9193){if(e===9167)return a.EXTENDED_PICTOGRAPHIC}else if(e<9208){if(9193<=e&&e<=9203)return a.EXTENDED_PICTOGRAPHIC}else if(9208<=e&&e<=9210)return a.EXTENDED_PICTOGRAPHIC}else if(e<9654){if(e<9642){if(e===9410)return a.EXTENDED_PICTOGRAPHIC}else if(9642<=e&&e<=9643)return a.EXTENDED_PICTOGRAPHIC}else if(e<9664){if(e===9654)return a.EXTENDED_PICTOGRAPHIC}else if(e<9723){if(e===9664)return a.EXTENDED_PICTOGRAPHIC}else if(9723<=e&&e<=9726)return a.EXTENDED_PICTOGRAPHIC}else if(e<10035){if(e<10004){if(e<9748){if(e<9735){if(9728<=e&&e<=9733)return a.EXTENDED_PICTOGRAPHIC}else if(9735<=e&&e<=9746)return a.EXTENDED_PICTOGRAPHIC}else if(e<9872){if(9748<=e&&e<=9861)return a.EXTENDED_PICTOGRAPHIC}else if(e<9992){if(9872<=e&&e<=9989)return a.EXTENDED_PICTOGRAPHIC}else if(9992<=e&&e<=10002)return a.EXTENDED_PICTOGRAPHIC}else if(e<10013){if(e===10004||e===10006)return a.EXTENDED_PICTOGRAPHIC}else if(e<10017){if(e===10013)return a.EXTENDED_PICTOGRAPHIC}else if(e===10017||e===10024)return a.EXTENDED_PICTOGRAPHIC}else if(e<10067){if(e<10055){if(e<10052){if(10035<=e&&e<=10036)return a.EXTENDED_PICTOGRAPHIC}else if(e===10052)return a.EXTENDED_PICTOGRAPHIC}else if(e<10060){if(e===10055)return a.EXTENDED_PICTOGRAPHIC}else if(e===10060||e===10062)return a.EXTENDED_PICTOGRAPHIC}else if(e<10083){if(e<10071){if(10067<=e&&e<=10069)return a.EXTENDED_PICTOGRAPHIC}else if(e===10071)return a.EXTENDED_PICTOGRAPHIC}else if(e<10133){if(10083<=e&&e<=10087)return a.EXTENDED_PICTOGRAPHIC}else if(e<10145){if(10133<=e&&e<=10135)return a.EXTENDED_PICTOGRAPHIC}else if(e===10145)return a.EXTENDED_PICTOGRAPHIC}else if(e<127489){if(e<12951){if(e<11035){if(e<10548){if(e===10160||e===10175)return a.EXTENDED_PICTOGRAPHIC}else if(e<11013){if(10548<=e&&e<=10549)return a.EXTENDED_PICTOGRAPHIC}else if(11013<=e&&e<=11015)return a.EXTENDED_PICTOGRAPHIC}else if(e<11093){if(e<11088){if(11035<=e&&e<=11036)return a.EXTENDED_PICTOGRAPHIC}else if(e===11088)return a.EXTENDED_PICTOGRAPHIC}else if(e<12336){if(e===11093)return a.EXTENDED_PICTOGRAPHIC}else if(e===12336||e===12349)return a.EXTENDED_PICTOGRAPHIC}else if(e<127340){if(e<126976){if(e===12951||e===12953)return a.EXTENDED_PICTOGRAPHIC}else if(e<127245){if(126976<=e&&e<=127231)return a.EXTENDED_PICTOGRAPHIC}else if(e<127279){if(127245<=e&&e<=127247)return a.EXTENDED_PICTOGRAPHIC}else if(e===127279)return a.EXTENDED_PICTOGRAPHIC}else if(e<127374){if(e<127358){if(127340<=e&&e<=127345)return a.EXTENDED_PICTOGRAPHIC}else if(127358<=e&&e<=127359)return a.EXTENDED_PICTOGRAPHIC}else if(e<127377){if(e===127374)return a.EXTENDED_PICTOGRAPHIC}else if(e<127405){if(127377<=e&&e<=127386)return a.EXTENDED_PICTOGRAPHIC}else if(127405<=e&&e<=127461)return a.EXTENDED_PICTOGRAPHIC}else if(e<128981){if(e<127561){if(e<127535){if(e<127514){if(127489<=e&&e<=127503)return a.EXTENDED_PICTOGRAPHIC}else if(e===127514)return a.EXTENDED_PICTOGRAPHIC}else if(e<127538){if(e===127535)return a.EXTENDED_PICTOGRAPHIC}else if(e<127548){if(127538<=e&&e<=127546)return a.EXTENDED_PICTOGRAPHIC}else if(127548<=e&&e<=127551)return a.EXTENDED_PICTOGRAPHIC}else if(e<128326){if(e<128e3){if(127561<=e&&e<=127994)return a.EXTENDED_PICTOGRAPHIC}else if(128e3<=e&&e<=128317)return a.EXTENDED_PICTOGRAPHIC}else if(e<128640){if(128326<=e&&e<=128591)return a.EXTENDED_PICTOGRAPHIC}else if(e<128884){if(128640<=e&&e<=128767)return a.EXTENDED_PICTOGRAPHIC}else if(128884<=e&&e<=128895)return a.EXTENDED_PICTOGRAPHIC}else if(e<129198){if(e<129096){if(e<129036){if(128981<=e&&e<=129023)return a.EXTENDED_PICTOGRAPHIC}else if(129036<=e&&e<=129039)return a.EXTENDED_PICTOGRAPHIC}else if(e<129114){if(129096<=e&&e<=129103)return a.EXTENDED_PICTOGRAPHIC}else if(e<129160){if(129114<=e&&e<=129119)return a.EXTENDED_PICTOGRAPHIC}else if(129160<=e&&e<=129167)return a.EXTENDED_PICTOGRAPHIC}else if(e<129340){if(e<129292){if(129198<=e&&e<=129279)return a.EXTENDED_PICTOGRAPHIC}else if(129292<=e&&e<=129338)return a.EXTENDED_PICTOGRAPHIC}else if(e<129351){if(129340<=e&&e<=129349)return a.EXTENDED_PICTOGRAPHIC}else if(e<130048){if(129351<=e&&e<=129791)return a.EXTENDED_PICTOGRAPHIC}else if(130048<=e&&e<=131069)return a.EXTENDED_PICTOGRAPHIC;return a.CLUSTER_BREAK.OTHER}}F0.default=ai;var _G=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(z0,"__esModule",{value:!0});const xG=_G(F0);z0.default=xG.default;var RG=S&&S.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),AG=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),SG=S&&S.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&RG(r,e,n[i]);return AG(r,e),r}}(),CG=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(er,"__esModule",{value:!0});er.validateLanguage=er.parseLanguage=er.b64UrlToUtf8=er.utf8ToB64Url=er.graphemeLen=er.utf8Len=void 0;const TG=CG(z0),mh=SG(dk),kG=t=>new TextEncoder().encode(t).byteLength;er.utf8Len=kG;const LG=t=>new TG.default().countGraphemes(t);er.graphemeLen=LG;const PG=t=>mh.toString(mh.fromString(t,"utf8"),"base64url");er.utf8ToB64Url=PG;const DG=t=>mh.toString(mh.fromString(t,"base64url"),"utf8");er.b64UrlToUtf8=DG;const BG=t=>{const e=t.match(gk);if(!(e!=null&&e.groups))return null;const r=e.groups;return{grandfathered:r.grandfathered,language:r.language,extlang:r.extlang,script:r.script,region:r.region,variant:r.variant,extension:r.extension,privateUse:r.privateUseA||r.privateUseB}};er.parseLanguage=BG;const IG=t=>gk.test(t);er.validateLanguage=IG;const gk=/^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUseA>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUseB>x(-[A-Za-z0-9]{1,8})+))$/;var bk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.didDocument=t.getServiceEndpoint=t.getNotifEndpoint=t.getFeedGenEndpoint=t.getPdsEndpoint=t.getSigningDidKey=t.getVerificationMaterial=t.getSigningKey=t.getHandle=t.getDid=t.isValidDidDoc=void 0;const e=G,r=y=>t.didDocument.safeParse(y).success;t.isValidDidDoc=r;const n=y=>{const m=y.id;if(typeof m!="string")throw new Error("No `id` on document");return m};t.getDid=n;const i=y=>{const m=y.alsoKnownAs;if(m)for(let E=0;E<m.length;E++){const A=m[E];if(A.startsWith("at://"))return A.slice(5)}};t.getHandle=i;const o=y=>(0,t.getVerificationMaterial)(y,"atproto");t.getSigningKey=o;const s=(y,m)=>{const E=h(y,"verificationMethod",`#${m}`);if(E&&E.publicKeyMultibase)return{type:E.type,publicKeyMultibase:E.publicKeyMultibase}};t.getVerificationMaterial=s;const l=y=>{const m=(0,t.getSigningKey)(y);if(m)return`did:key:${m.publicKeyMultibase}`};t.getSigningDidKey=l;const u=y=>(0,t.getServiceEndpoint)(y,{id:"#atproto_pds",type:"AtprotoPersonalDataServer"});t.getPdsEndpoint=u;const c=y=>(0,t.getServiceEndpoint)(y,{id:"#bsky_fg",type:"BskyFeedGenerator"});t.getFeedGenEndpoint=c;const d=y=>(0,t.getServiceEndpoint)(y,{id:"#bsky_notif",type:"BskyNotificationService"});t.getNotifEndpoint=d;const f=(y,m)=>{const E=h(y,"service",m.id);if(E&&!(m.type&&E.type!==m.type)&&typeof E.serviceEndpoint=="string")return g(E.serviceEndpoint)};t.getServiceEndpoint=f;function h(y,m,E){const A=y[m];if(A)for(let L=0;L<A.length;L++){const D=A[L],B=D.id;if(B[0]==="#"?B===E:B.length===y.id.length+E.length&&B[y.id.length]==="#"&&B.endsWith(E)&&B.startsWith(y.id))return D}}const g=y=>{if(!(!y.startsWith("http://")&&!y.startsWith("https://"))&&b(y))return y},b=URL.canParse??(y=>{try{return new URL(y),!0}catch{return!1}}),w=e.z.object({id:e.z.string(),type:e.z.string(),controller:e.z.string(),publicKeyMultibase:e.z.string().optional()}),C=e.z.object({id:e.z.string(),type:e.z.string(),serviceEndpoint:e.z.union([e.z.string(),e.z.record(e.z.unknown())])});t.didDocument=e.z.object({id:e.z.string(),alsoKnownAs:e.z.array(e.z.string()).optional(),verificationMethod:e.z.array(w).optional(),service:e.z.array(C).optional()})})(bk);(function(t){var e=S&&S.__createBinding||(Object.create?function(o,s,l,u){u===void 0&&(u=l);var c=Object.getOwnPropertyDescriptor(s,l);(!c||("get"in c?!s.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(o,u,c)}:function(o,s,l,u){u===void 0&&(u=l),o[u]=s[l]}),r=S&&S.__setModuleDefault||(Object.create?function(o,s){Object.defineProperty(o,"default",{enumerable:!0,value:s})}:function(o,s){o.default=s}),n=S&&S.__importStar||function(){var o=function(s){return o=Object.getOwnPropertyNames||function(l){var u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u[u.length]=c);return u},o(s)};return function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var u=o(s),c=0;c<u.length;c++)u[c]!=="default"&&e(l,s,u[c]);return r(l,s),l}}(),i=S&&S.__exportStar||function(o,s){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&e(s,o,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.check=void 0,t.check=n(Cn),t.util=n(ja),i(Rd,t),i(sk,t),i(ja,t),i(Oy,t),i(ak,t),i(Ad,t),i(hk,t),i(yk,t),i(er,t),i(bk,t)})(Nn);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.BlobRef=t.jsonBlobRef=t.untypedJsonBlobRef=t.typedJsonBlobRef=void 0;const e=ll,r=G,n=Nn;t.typedJsonBlobRef=r.z.object({$type:r.z.literal("blob"),ref:n.schema.cid,mimeType:r.z.string(),size:r.z.number()}).strict(),t.untypedJsonBlobRef=r.z.object({cid:r.z.string(),mimeType:r.z.string()}).strict(),t.jsonBlobRef=r.z.union([t.typedJsonBlobRef,t.untypedJsonBlobRef]);class i{constructor(s,l,u,c){Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:s}),Object.defineProperty(this,"mimeType",{enumerable:!0,configurable:!0,writable:!0,value:l}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:u}),Object.defineProperty(this,"original",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.original=c??{$type:"blob",ref:s,mimeType:l,size:u}}static asBlobRef(s){return n.check.is(s,t.jsonBlobRef)?i.fromJsonRef(s):null}static fromJsonRef(s){return n.check.is(s,t.typedJsonBlobRef)?new i(s.ref,s.mimeType,s.size):new i(e.CID.parse(s.cid),s.mimeType,-1,s)}ipld(){return{$type:"blob",ref:this.ref,mimeType:this.mimeType,size:this.size}}toJSON(){return(0,n.ipldToJson)(this.ipld())}}t.BlobRef=i})($y);Object.defineProperty(M0,"__esModule",{value:!0});M0.blob=$G;const jG=$y,UG=Uo;function $G(t,e,r,n){return!n||!(n instanceof jG.BlobRef)?{success:!1,error:new UG.ValidationError(`${e} should be a blob ref`)}:{success:!0,value:n}}var Ky={},Ar={},vk={};(function(t){(()=>{var e={d:(d,f)=>{for(var h in f)e.o(f,h)&&!e.o(d,h)&&Object.defineProperty(d,h,{enumerable:!0,get:f[h]})},o:(d,f)=>Object.prototype.hasOwnProperty.call(d,f),r:d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})}},r={};function n(d,f){return f===void 0&&(f="-"),new RegExp("^(?!0{4}"+f+"0{2}"+f+"0{2})((?=[0-9]{4}"+f+"(((0[^2])|1[0-2])|02(?="+f+"(([0-1][0-9])|2[0-8])))"+f+"[0-9]{2})|(?=((([13579][26])|([2468][048])|(0[48]))0{2})|([0-9]{2}((((0|[2468])[48])|[2468][048])|([13579][26])))"+f+"02"+f+"29))([0-9]{4})"+f+"(?!((0[469])|11)"+f+"31)((0[1,3-9]|1[0-2])|(02(?!"+f+"3)))"+f+"(0[1-9]|[1-2][0-9]|3[0-1])$").test(d)}function i(d){var f=/\D/.exec(d);return f?f[0]:""}function o(d,f,h){f===void 0&&(f=":"),h===void 0&&(h=!1);var g=new RegExp("^([0-1]|2(?=([0-3])|4"+f+"00))[0-9]"+f+"[0-5][0-9]("+f+"([0-5]|6(?=0))[0-9])?(.[0-9]{1,9})?$");if(!h||!/[Z+\-]/.test(d))return g.test(d);if(/Z$/.test(d))return g.test(d.replace("Z",""));var b=d.includes("+"),w=d.split(/[+-]/),C=w[0],y=w[1];return g.test(C)&&function(m,E,A){return A===void 0&&(A=":"),new RegExp(E?"^(0(?!(2"+A+"4)|0"+A+"3)|1(?=([0-1]|2(?="+A+"[04])|[34](?="+A+"0))))([03469](?="+A+"[03])|[17](?="+A+"0)|2(?="+A+"[04])|5(?="+A+"[034])|8(?="+A+"[04]))"+A+"([03](?=0)|4(?=5))[05]$":"^(0(?=[^0])|1(?=[0-2]))([39](?="+A+"[03])|[0-24-8](?="+A+"00))"+A+"[03]0$").test(m)}(y,b,i(y))}function s(d){var f=d.split("T"),h=f[0],g=f[1],b=n(h,i(h));if(!g)return!1;var w,C=(w=g.match(/([^Z+\-\d])(?=\d+\1)/),Array.isArray(w)?w[0]:"");return b&&o(g,C,!0)}function l(d,f){return f===void 0&&(f="-"),new RegExp("^[0-9]{4}"+f+"(0(?=[^0])|1(?=[0-2]))[0-9]$").test(d)}e.r(r),e.d(r,{isValidDate:()=>n,isValidISODateString:()=>s,isValidTime:()=>o,isValidYearMonth:()=>l});var u=t;for(var c in r)u[c]=r[c];r.__esModule&&Object.defineProperty(u,"__esModule",{value:!0})})()})(vk);Object.defineProperty(Ar,"__esModule",{value:!0});Ar.datetime=MG;Ar.uri=NG;Ar.atUri=zG;Ar.did=Ek;Ar.handle=wk;Ar.atIdentifier=FG;Ar.nsid=qG;Ar.cid=GG;Ar.language=HG;Ar.tid=XG;Ar.recordKey=WG;const OG=vk,KG=ll,VG=Nn,ul=jo,En=Uo;function MG(t,e){try{if(!(0,OG.isValidISODateString)(e))throw new Error}catch{return{success:!1,error:new En.ValidationError(`${t} must be an valid atproto datetime (both RFC-3339 and ISO-8601)`)}}return{success:!0,value:e}}function NG(t,e){return e.match(/^\w+:(?:\/\/)?[^\s/][^\s]*$/)!==null?{success:!0,value:e}:{success:!1,error:new En.ValidationError(`${t} must be a uri`)}}function zG(t,e){try{(0,ul.ensureValidAtUri)(e)}catch{return{success:!1,error:new En.ValidationError(`${t} must be a valid at-uri`)}}return{success:!0,value:e}}function Ek(t,e){try{(0,ul.ensureValidDid)(e)}catch{return{success:!1,error:new En.ValidationError(`${t} must be a valid did`)}}return{success:!0,value:e}}function wk(t,e){try{(0,ul.ensureValidHandle)(e)}catch{return{success:!1,error:new En.ValidationError(`${t} must be a valid handle`)}}return{success:!0,value:e}}function FG(t,e){if(e.startsWith("did:")){const r=Ek(t,e);if(r.success)return r}else{const r=wk(t,e);if(r.success)return r}return{success:!1,error:new En.ValidationError(`${t} must be a valid did or a handle`)}}function qG(t,e){try{(0,ul.ensureValidNsid)(e)}catch{return{success:!1,error:new En.ValidationError(`${t} must be a valid nsid`)}}return{success:!0,value:e}}function GG(t,e){try{KG.CID.parse(e)}catch{return{success:!1,error:new En.ValidationError(`${t} must be a cid string`)}}return{success:!0,value:e}}function HG(t,e){return(0,VG.validateLanguage)(e)?{success:!0,value:e}:{success:!1,error:new En.ValidationError(`${t} must be a well-formed BCP 47 language tag`)}}function XG(t,e){return(0,ul.isValidTid)(e)?{success:!0,value:e}:{success:!1,error:new En.ValidationError(`${t} must be a valid TID`)}}function WG(t,e){try{(0,ul.ensureValidRecordKey)(e)}catch{return{success:!1,error:new En.ValidationError(`${t} must be a valid Record Key`)}}return{success:!0,value:e}}var JG=S&&S.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),ZG=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QG=S&&S.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&JG(r,e,n[i]);return ZG(r,e),r}}();Object.defineProperty(Ky,"__esModule",{value:!0});Ky.validate=e6;const YG=ll,aA=Nn,Le=Uo,Zr=QG(Ar);function e6(t,e,r,n){switch(r.type){case"boolean":return t6(t,e,r,n);case"integer":return r6(t,e,r,n);case"string":return n6(t,e,r,n);case"bytes":return i6(t,e,r,n);case"cid-link":return o6(t,e,r,n);case"unknown":return s6(t,e,r,n);default:return{success:!1,error:new Le.ValidationError(`Unexpected lexicon type: ${r.type}`)}}}function t6(t,e,r,n){r=r;const i=typeof n;return i==="undefined"?typeof r.default=="boolean"?{success:!0,value:r.default}:{success:!1,error:new Le.ValidationError(`${e} must be a boolean`)}:i!=="boolean"?{success:!1,error:new Le.ValidationError(`${e} must be a boolean`)}:typeof r.const=="boolean"&&n!==r.const?{success:!1,error:new Le.ValidationError(`${e} must be ${r.const}`)}:{success:!0,value:n}}function r6(t,e,r,n){return r=r,typeof n==="undefined"?typeof r.default=="number"?{success:!0,value:r.default}:{success:!1,error:new Le.ValidationError(`${e} must be an integer`)}:Number.isInteger(n)?typeof r.const=="number"&&n!==r.const?{success:!1,error:new Le.ValidationError(`${e} must be ${r.const}`)}:Array.isArray(r.enum)&&!r.enum.includes(n)?{success:!1,error:new Le.ValidationError(`${e} must be one of (${r.enum.join("|")})`)}:typeof r.maximum=="number"&&n>r.maximum?{success:!1,error:new Le.ValidationError(`${e} can not be greater than ${r.maximum}`)}:typeof r.minimum=="number"&&n<r.minimum?{success:!1,error:new Le.ValidationError(`${e} can not be less than ${r.minimum}`)}:{success:!0,value:n}:{success:!1,error:new Le.ValidationError(`${e} must be an integer`)}}function n6(t,e,r,n){if(r=r,typeof n>"u")return typeof r.default=="string"?{success:!0,value:r.default}:{success:!1,error:new Le.ValidationError(`${e} must be a string`)};if(typeof n!="string")return{success:!1,error:new Le.ValidationError(`${e} must be a string`)};if(typeof r.const=="string"&&n!==r.const)return{success:!1,error:new Le.ValidationError(`${e} must be ${r.const}`)};if(Array.isArray(r.enum)&&!r.enum.includes(n))return{success:!1,error:new Le.ValidationError(`${e} must be one of (${r.enum.join("|")})`)};if(typeof r.minLength=="number"||typeof r.maxLength=="number"){if(typeof r.minLength=="number"&&n.length*3<r.minLength)return{success:!1,error:new Le.ValidationError(`${e} must not be shorter than ${r.minLength} characters`)};let i=!1;if(typeof r.minLength>"u"&&typeof r.maxLength=="number"&&n.length*3<=r.maxLength&&(i=!0),!i){const o=(0,aA.utf8Len)(n);if(typeof r.maxLength=="number"&&o>r.maxLength)return{success:!1,error:new Le.ValidationError(`${e} must not be longer than ${r.maxLength} characters`)};if(typeof r.minLength=="number"&&o<r.minLength)return{success:!1,error:new Le.ValidationError(`${e} must not be shorter than ${r.minLength} characters`)}}}if(typeof r.maxGraphemes=="number"||typeof r.minGraphemes=="number"){let i=!1,o=!1;if(typeof r.maxGraphemes=="number"&&(n.length<=r.maxGraphemes?i=!1:i=!0),typeof r.minGraphemes=="number"){if(n.length<r.minGraphemes)return{success:!1,error:new Le.ValidationError(`${e} must not be shorter than ${r.minGraphemes} graphemes`)};o=!0}if(i||o){const s=(0,aA.graphemeLen)(n);if(typeof r.maxGraphemes=="number"&&s>r.maxGraphemes)return{success:!1,error:new Le.ValidationError(`${e} must not be longer than ${r.maxGraphemes} graphemes`)};if(typeof r.minGraphemes=="number"&&s<r.minGraphemes)return{success:!1,error:new Le.ValidationError(`${e} must not be shorter than ${r.minGraphemes} graphemes`)}}}if(typeof r.format=="string")switch(r.format){case"datetime":return Zr.datetime(e,n);case"uri":return Zr.uri(e,n);case"at-uri":return Zr.atUri(e,n);case"did":return Zr.did(e,n);case"handle":return Zr.handle(e,n);case"at-identifier":return Zr.atIdentifier(e,n);case"nsid":return Zr.nsid(e,n);case"cid":return Zr.cid(e,n);case"language":return Zr.language(e,n);case"tid":return Zr.tid(e,n);case"record-key":return Zr.recordKey(e,n)}return{success:!0,value:n}}function i6(t,e,r,n){return r=r,!n||!(n instanceof Uint8Array)?{success:!1,error:new Le.ValidationError(`${e} must be a byte array`)}:typeof r.maxLength=="number"&&n.byteLength>r.maxLength?{success:!1,error:new Le.ValidationError(`${e} must not be larger than ${r.maxLength} bytes`)}:typeof r.minLength=="number"&&n.byteLength<r.minLength?{success:!1,error:new Le.ValidationError(`${e} must not be smaller than ${r.minLength} bytes`)}:{success:!0,value:n}}function o6(t,e,r,n){return YG.CID.asCID(n)===null?{success:!1,error:new Le.ValidationError(`${e} must be a CID`)}:{success:!0,value:n}}function s6(t,e,r,n){return!n||typeof n!="object"?{success:!1,error:new Le.ValidationError(`${e} must be an object`)}:{success:!0,value:n}}Object.defineProperty($o,"__esModule",{value:!0});$o.validate=_k;$o.array=xk;$o.object=X0;$o.validateOneOf=W0;const bi=Uo,a6=al,l6=M0,u6=Ky;function _k(t,e,r,n){switch(r.type){case"object":return X0(t,e,r,n);case"array":return xk(t,e,r,n);case"blob":return(0,l6.blob)(t,e,r,n);default:return(0,u6.validate)(t,e,r,n)}}function xk(t,e,r,n){if(!Array.isArray(n))return{success:!1,error:new bi.ValidationError(`${e} must be an array`)};if(typeof r.maxLength=="number"&&n.length>r.maxLength)return{success:!1,error:new bi.ValidationError(`${e} must not have more than ${r.maxLength} elements`)};if(typeof r.minLength=="number"&&n.length<r.minLength)return{success:!1,error:new bi.ValidationError(`${e} must not have fewer than ${r.minLength} elements`)};const i=r.items;for(let o=0;o<n.length;o++){const s=n[o],l=`${e}/${o}`,u=W0(t,l,i,s);if(!u.success)return u}return{success:!0,value:n}}function X0(t,e,r,n){var o,s,l;if(!(0,bi.isObj)(n))return{success:!1,error:new bi.ValidationError(`${e} must be an object`)};let i=n;if("properties"in r&&r.properties!=null)for(const u in r.properties){const c=n[u];if(c===null&&((o=r.nullable)!=null&&o.includes(u)))continue;const d=r.properties[u];if(c===void 0&&!((s=r.required)!=null&&s.includes(u)))if(d.type==="integer"||d.type==="boolean"||d.type==="string"){if(d.default===void 0)continue}else continue;const f=`${e}/${u}`,h=W0(t,f,d,c),g=h.success?h.value:c;if(g===void 0){if((l=r.required)!=null&&l.includes(u))return{success:!1,error:new bi.ValidationError(`${e} must have the property "${u}"`)}}else if(!h.success)return h;g!==c&&(i===n&&(i={...n}),i[u]=g)}return{success:!0,value:i}}function W0(t,e,r,n,i=!1){let o;if(r.type==="union"){if(!(0,bi.isDiscriminatedObject)(n))return{success:!1,error:new bi.ValidationError(`${e} must be an object which includes the "$type" property`)};if(c6(r.refs,n.$type))o=t.getDefOrThrow(n.$type);else return r.closed?{success:!1,error:new bi.ValidationError(`${e} $type must be one of ${r.refs.join(", ")}`)}:{success:!0,value:n}}else r.type==="ref"?o=t.getDefOrThrow(r.ref):o=r;return i?X0(t,e,o,n):_k(t,e,o,n)}const c6=(t,e)=>{const r=(0,a6.toLexUri)(e);return t.includes(r)?!0:r.endsWith("#main")?t.includes(r.slice(0,-5)):!r.includes("#")&&t.includes(`${r}#main`)};var J0={},d6=S&&S.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),p6=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),f6=S&&S.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&d6(r,e,n[i]);return p6(r,e),r}}();Object.defineProperty(J0,"__esModule",{value:!0});J0.params=g6;const h6=Uo,y6=$o,m6=f6(Ky);function g6(t,e,r,n){const i=n&&typeof n=="object"?n:{},o=new Set(r.required??[]);let s=i;if(typeof r.properties=="object")for(const l in r.properties){const u=r.properties[l],c=u.type==="array"?(0,y6.array)(t,l,u,i[l]):m6.validate(t,l,u,i[l]),d=c.success?c.value:i[l],f=typeof d>"u";if(f&&o.has(l))return{success:!1,error:new h6.ValidationError(`${e} must have the property "${l}"`)};if(!f&&!c.success)return c;d!==i[l]&&(s===i&&(s={...i}),s[l]=d)}return{success:!0,value:s}}Object.defineProperty($s,"__esModule",{value:!0});$s.assertValidRecord=v6;$s.assertValidXrpcParams=E6;$s.assertValidXrpcInput=w6;$s.assertValidXrpcOutput=_6;$s.assertValidXrpcMessage=x6;const Rk=$o,b6=J0;function v6(t,e,r){const n=(0,Rk.object)(t,"Record",e.record,r);if(!n.success)throw n.error;return n.value}function E6(t,e,r){if(e.parameters){const n=(0,b6.params)(t,"Params",e.parameters,r);if(!n.success)throw n.error;return n.value}}function w6(t,e,r){var n;if((n=e.input)!=null&&n.schema)return Z0(t,"Input",e.input.schema,r,!0)}function _6(t,e,r){var n;if((n=e.output)!=null&&n.schema)return Z0(t,"Output",e.output.schema,r,!0)}function x6(t,e,r){var n;if((n=e.message)!=null&&n.schema)return Z0(t,"Message",e.message.schema,r,!0)}function Z0(t,e,r,n,i=!1){const o=(0,Rk.validateOneOf)(t,e,r,n,i);if(!o.success)throw o.error;return o.value}Object.defineProperty(Uy,"__esModule",{value:!0});Uy.Lexicons=void 0;const _n=Uo,kt=al,Cu=$s,lA=$o;class R6{constructor(e){if(Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"defs",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),e)for(const r of e)this.add(r)}[Symbol.iterator](){return this.docs.values()}add(e){const r=(0,kt.toLexUri)(e.id);if(this.docs.has(r))throw new Error(`${r} has already been registered`);cv(e,r),this.docs.set(r,e);for(const[n,i]of uA(e))this.defs.set(n,i)}remove(e){e=(0,kt.toLexUri)(e);const r=this.docs.get(e);if(!r)throw new Error(`Unable to remove "${e}": does not exist`);for(const[n,i]of uA(r))this.defs.delete(n);this.docs.delete(e)}get(e){return e=(0,kt.toLexUri)(e),this.docs.get(e)}getDef(e){return e=(0,kt.toLexUri)(e),this.defs.get(e)}getDefOrThrow(e,r){const n=this.getDef(e);if(!n)throw new _n.LexiconDefNotFoundError(`Lexicon not found: ${e}`);if(r&&!r.includes(n.type))throw new _n.InvalidLexiconError(`Not a ${r.join(" or ")} lexicon: ${e}`);return n}validate(e,r){if(!(0,_n.isObj)(r))throw new _n.ValidationError("Value must be an object");const n=(0,kt.toLexUri)(e),i=this.getDefOrThrow(n,["record","object"]);if(i.type==="record")return(0,lA.object)(this,"Record",i.record,r);if(i.type==="object")return(0,lA.object)(this,"Object",i,r);throw new _n.InvalidLexiconError("Definition must be a record or object")}assertValidRecord(e,r){if(!(0,_n.isObj)(r))throw new _n.ValidationError("Record must be an object");if(!("$type"in r))throw new _n.ValidationError("Record/$type must be a string");const{$type:n}=r;if(typeof n!="string")throw new _n.ValidationError("Record/$type must be a string");const i=(0,kt.toLexUri)(e);if((0,kt.toLexUri)(n)!==i)throw new _n.ValidationError(`Invalid $type: must be ${i}, got ${n}`);const o=this.getDefOrThrow(i,["record"]);return(0,Cu.assertValidRecord)(this,o,r)}assertValidXrpcParams(e,r){e=(0,kt.toLexUri)(e);const n=this.getDefOrThrow(e,["query","procedure","subscription"]);return(0,Cu.assertValidXrpcParams)(this,n,r)}assertValidXrpcInput(e,r){e=(0,kt.toLexUri)(e);const n=this.getDefOrThrow(e,["procedure"]);return(0,Cu.assertValidXrpcInput)(this,n,r)}assertValidXrpcOutput(e,r){e=(0,kt.toLexUri)(e);const n=this.getDefOrThrow(e,["query","procedure"]);return(0,Cu.assertValidXrpcOutput)(this,n,r)}assertValidXrpcMessage(e,r){e=(0,kt.toLexUri)(e);const n=this.getDefOrThrow(e,["subscription"]);return(0,Cu.assertValidXrpcMessage)(this,n,r)}resolveLexUri(e,r){return e=(0,kt.toLexUri)(e),(0,kt.toLexUri)(r,e)}}Uy.Lexicons=R6;function*uA(t){for(const e in t.defs)yield[`lex:${t.id}#${e}`,t.defs[e]],e==="main"&&(yield[`lex:${t.id}`,t.defs[e]])}function cv(t,e){for(const r in t)t.type==="ref"?t.ref=(0,kt.toLexUri)(t.ref,e):t.type==="union"?t.refs=t.refs.map(n=>(0,kt.toLexUri)(n,e)):Array.isArray(t[r])?t[r]=t[r].map(n=>typeof n=="string"?n.startsWith("#")?(0,kt.toLexUri)(n,e):n:n&&typeof n=="object"?cv(n,e):n):t[r]&&typeof t[r]=="object"&&(t[r]=cv(t[r],e));return t}var Ak={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.jsonStringToLex=t.jsonToLex=t.stringifyLex=t.lexToJson=t.ipldToLex=t.lexToIpld=void 0;const e=ll,r=Nn,n=$y,i=d=>{if(Array.isArray(d))return d.map(f=>(0,t.lexToIpld)(f));if(d&&typeof d=="object"){if(d instanceof n.BlobRef)return d.original;if(e.CID.asCID(d)||d instanceof Uint8Array)return d;const f={};for(const h of Object.keys(d))f[h]=(0,t.lexToIpld)(d[h]);return f}return d};t.lexToIpld=i;const o=d=>{if(Array.isArray(d))return d.map(f=>(0,t.ipldToLex)(f));if(d&&typeof d=="object"){if((d.$type==="blob"||typeof d.cid=="string"&&typeof d.mimeType=="string")&&r.check.is(d,n.jsonBlobRef))return n.BlobRef.fromJsonRef(d);if(e.CID.asCID(d)||d instanceof Uint8Array)return d;const f={};for(const h of Object.keys(d))f[h]=(0,t.ipldToLex)(d[h]);return f}return d};t.ipldToLex=o;const s=d=>(0,r.ipldToJson)((0,t.lexToIpld)(d));t.lexToJson=s;const l=d=>JSON.stringify((0,t.lexToJson)(d));t.stringifyLex=l;const u=d=>(0,t.ipldToLex)((0,r.jsonToIpld)(d));t.jsonToLex=u;const c=d=>(0,t.jsonToLex)(JSON.parse(d));t.jsonStringToLex=c})(Ak);(function(t){var e=S&&S.__createBinding||(Object.create?function(n,i,o,s){s===void 0&&(s=o);var l=Object.getOwnPropertyDescriptor(i,o);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,s,l)}:function(n,i,o,s){s===void 0&&(s=o),n[s]=i[o]}),r=S&&S.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&e(i,n,o)};Object.defineProperty(t,"__esModule",{value:!0}),r(Uo,t),r(Uy,t),r($y,t),r(Ak,t)})(Ls);var x={},_={};Object.defineProperty(_,"__esModule",{value:!0});_.is$typed=A6;_.maybe$typed=S6;_.asPredicate=C6;function Sk(t){return t!=null&&typeof t=="object"}function Ck(t,e,r){return r==="main"?t===e:typeof t=="string"&&t.length===e.length+1+r.length&&t.charCodeAt(e.length)===35&&t.startsWith(e)&&t.endsWith(r)}function A6(t,e,r){return Sk(t)&&"$type"in t&&Ck(t.$type,e,r)}function S6(t,e,r){return Sk(t)&&("$type"in t?t.$type===void 0||Ck(t.$type,e,r):!0)}function C6(t){return function(e){return t(e).success}}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ids=t.lexicons=t.schemas=t.schemaDict=void 0,t.validate=n;const e=Ls,r=_;t.schemaDict={ComAtprotoAdminDefs:{lexicon:1,id:"com.atproto.admin.defs",defs:{statusAttr:{type:"object",required:["applied"],properties:{applied:{type:"boolean"},ref:{type:"string"}}},accountView:{type:"object",required:["did","handle","indexedAt"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invites:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}},invitesDisabled:{type:"boolean"},emailConfirmedAt:{type:"string",format:"datetime"},inviteNote:{type:"string"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoRef:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},repoBlobRef:{type:"object",required:["did","cid"],properties:{did:{type:"string",format:"did"},cid:{type:"string",format:"cid"},recordUri:{type:"string",format:"at-uri"}}},threatSignature:{type:"object",required:["property","value"],properties:{property:{type:"string"},value:{type:"string"}}}}},ComAtprotoAdminDeleteAccount:{lexicon:1,id:"com.atproto.admin.deleteAccount",defs:{main:{type:"procedure",description:"Delete a user account as an administrator.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}}}},ComAtprotoAdminDisableAccountInvites:{lexicon:1,id:"com.atproto.admin.disableAccountInvites",defs:{main:{type:"procedure",description:"Disable an account from receiving new invite codes, but does not invalidate existing codes.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"did"},note:{type:"string",description:"Optional reason for disabled invites."}}}}}}},ComAtprotoAdminDisableInviteCodes:{lexicon:1,id:"com.atproto.admin.disableInviteCodes",defs:{main:{type:"procedure",description:"Disable some set of codes and/or all codes associated with a set of users.",input:{encoding:"application/json",schema:{type:"object",properties:{codes:{type:"array",items:{type:"string"}},accounts:{type:"array",items:{type:"string"}}}}}}}},ComAtprotoAdminEnableAccountInvites:{lexicon:1,id:"com.atproto.admin.enableAccountInvites",defs:{main:{type:"procedure",description:"Re-enable an account's ability to receive invite codes.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"did"},note:{type:"string",description:"Optional reason for enabled invites."}}}}}}},ComAtprotoAdminGetAccountInfo:{lexicon:1,id:"com.atproto.admin.getAccountInfo",defs:{main:{type:"query",description:"Get details about an account.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}},ComAtprotoAdminGetAccountInfos:{lexicon:1,id:"com.atproto.admin.getAccountInfos",defs:{main:{type:"query",description:"Get details about some accounts.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["infos"],properties:{infos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ComAtprotoAdminGetInviteCodes:{lexicon:1,id:"com.atproto.admin.getInviteCodes",defs:{main:{type:"query",description:"Get an admin view of invite codes.",parameters:{type:"params",properties:{sort:{type:"string",knownValues:["recent","usage"],default:"recent"},limit:{type:"integer",minimum:1,maximum:500,default:100},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{cursor:{type:"string"},codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}}}}}}}},ComAtprotoAdminGetSubjectStatus:{lexicon:1,id:"com.atproto.admin.getSubjectStatus",defs:{main:{type:"query",description:"Get the service-specific admin status of a subject (account, record, or blob).",parameters:{type:"params",properties:{did:{type:"string",format:"did"},uri:{type:"string",format:"at-uri"},blob:{type:"string",format:"cid"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"},deactivated:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}}}}},ComAtprotoAdminSearchAccounts:{lexicon:1,id:"com.atproto.admin.searchAccounts",defs:{main:{type:"query",description:"Get list of accounts that matches your search query.",parameters:{type:"params",properties:{email:{type:"string"},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ComAtprotoAdminSendEmail:{lexicon:1,id:"com.atproto.admin.sendEmail",defs:{main:{type:"procedure",description:"Send email to a user's account email address.",input:{encoding:"application/json",schema:{type:"object",required:["recipientDid","content","senderDid"],properties:{recipientDid:{type:"string",format:"did"},content:{type:"string"},subject:{type:"string"},senderDid:{type:"string",format:"did"},comment:{type:"string",description:"Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers"}}}},output:{encoding:"application/json",schema:{type:"object",required:["sent"],properties:{sent:{type:"boolean"}}}}}}},ComAtprotoAdminUpdateAccountEmail:{lexicon:1,id:"com.atproto.admin.updateAccountEmail",defs:{main:{type:"procedure",description:"Administrative action to update an account's email.",input:{encoding:"application/json",schema:{type:"object",required:["account","email"],properties:{account:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},email:{type:"string"}}}}}}},ComAtprotoAdminUpdateAccountHandle:{lexicon:1,id:"com.atproto.admin.updateAccountHandle",defs:{main:{type:"procedure",description:"Administrative action to update an account's handle.",input:{encoding:"application/json",schema:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"}}}}}}},ComAtprotoAdminUpdateAccountPassword:{lexicon:1,id:"com.atproto.admin.updateAccountPassword",defs:{main:{type:"procedure",description:"Update the password for a user account as an administrator.",input:{encoding:"application/json",schema:{type:"object",required:["did","password"],properties:{did:{type:"string",format:"did"},password:{type:"string"}}}}}}},ComAtprotoAdminUpdateAccountSigningKey:{lexicon:1,id:"com.atproto.admin.updateAccountSigningKey",defs:{main:{type:"procedure",description:"Administrative action to update an account's signing key in their Did document.",input:{encoding:"application/json",schema:{type:"object",required:["did","signingKey"],properties:{did:{type:"string",format:"did"},signingKey:{type:"string",format:"did",description:"Did-key formatted public key"}}}}}}},ComAtprotoAdminUpdateSubjectStatus:{lexicon:1,id:"com.atproto.admin.updateSubjectStatus",defs:{main:{type:"procedure",description:"Update the service-specific admin status of a subject (account, record, or blob).",input:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"},deactivated:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}}}}},ComAtprotoIdentityDefs:{lexicon:1,id:"com.atproto.identity.defs",defs:{identityInfo:{type:"object",required:["did","handle","didDoc"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle",description:"The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document."},didDoc:{type:"unknown",description:"The complete DID document for the identity."}}}}},ComAtprotoIdentityGetRecommendedDidCredentials:{lexicon:1,id:"com.atproto.identity.getRecommendedDidCredentials",defs:{main:{type:"query",description:"Describe the credentials that should be included in the DID doc of an account that is migrating to this service.",output:{encoding:"application/json",schema:{type:"object",properties:{rotationKeys:{description:"Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.",type:"array",items:{type:"string"}},alsoKnownAs:{type:"array",items:{type:"string"}},verificationMethods:{type:"unknown"},services:{type:"unknown"}}}}}}},ComAtprotoIdentityRefreshIdentity:{lexicon:1,id:"com.atproto.identity.refreshIdentity",defs:{main:{type:"procedure",description:"Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.",input:{encoding:"application/json",schema:{type:"object",required:["identifier"],properties:{identifier:{type:"string",format:"at-identifier"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.identity.defs#identityInfo"}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."},{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentityRequestPlcOperationSignature:{lexicon:1,id:"com.atproto.identity.requestPlcOperationSignature",defs:{main:{type:"procedure",description:"Request an email with a code to in order to request a signed PLC operation. Requires Auth."}}},ComAtprotoIdentityResolveDid:{lexicon:1,id:"com.atproto.identity.resolveDid",defs:{main:{type:"query",description:"Resolves DID to DID document. Does not bi-directionally verify handle.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"DID to resolve."}}},output:{encoding:"application/json",schema:{type:"object",required:["didDoc"],properties:{didDoc:{type:"unknown",description:"The complete DID document for the identity."}}}},errors:[{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentityResolveHandle:{lexicon:1,id:"com.atproto.identity.resolveHandle",defs:{main:{type:"query",description:"Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.",parameters:{type:"params",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"The handle to resolve."}}},output:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."}]}}},ComAtprotoIdentityResolveIdentity:{lexicon:1,id:"com.atproto.identity.resolveIdentity",defs:{main:{type:"query",description:"Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).",parameters:{type:"params",required:["identifier"],properties:{identifier:{type:"string",format:"at-identifier",description:"Handle or DID to resolve."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.identity.defs#identityInfo"}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."},{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentitySignPlcOperation:{lexicon:1,id:"com.atproto.identity.signPlcOperation",defs:{main:{type:"procedure",description:"Signs a PLC operation to update some value(s) in the requesting DID's document.",input:{encoding:"application/json",schema:{type:"object",properties:{token:{description:"A token received through com.atproto.identity.requestPlcOperationSignature",type:"string"},rotationKeys:{type:"array",items:{type:"string"}},alsoKnownAs:{type:"array",items:{type:"string"}},verificationMethods:{type:"unknown"},services:{type:"unknown"}}}},output:{encoding:"application/json",schema:{type:"object",required:["operation"],properties:{operation:{type:"unknown",description:"A signed DID PLC operation."}}}}}}},ComAtprotoIdentitySubmitPlcOperation:{lexicon:1,id:"com.atproto.identity.submitPlcOperation",defs:{main:{type:"procedure",description:"Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry",input:{encoding:"application/json",schema:{type:"object",required:["operation"],properties:{operation:{type:"unknown"}}}}}}},ComAtprotoIdentityUpdateHandle:{lexicon:1,id:"com.atproto.identity.updateHandle",defs:{main:{type:"procedure",description:"Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"The new handle."}}}}}}},ComAtprotoLabelDefs:{lexicon:1,id:"com.atproto.label.defs",defs:{label:{type:"object",description:"Metadata tag on an atproto resource (eg, repo or record).",required:["src","uri","val","cts"],properties:{ver:{type:"integer",description:"The AT Protocol version of the label object."},src:{type:"string",format:"did",description:"DID of the actor who created this label."},uri:{type:"string",format:"uri",description:"AT URI of the record, repository (account), or other resource that this label applies to."},cid:{type:"string",format:"cid",description:"Optionally, CID specifying the specific version of 'uri' resource this label applies to."},val:{type:"string",maxLength:128,description:"The short string name of the value or type of this label."},neg:{type:"boolean",description:"If true, this is a negation label, overwriting a previous label."},cts:{type:"string",format:"datetime",description:"Timestamp when this label was created."},exp:{type:"string",format:"datetime",description:"Timestamp at which this label expires (no longer applies)."},sig:{type:"bytes",description:"Signature of dag-cbor encoded label."}}},selfLabels:{type:"object",description:"Metadata tags on an atproto record, published by the author within the record.",required:["values"],properties:{values:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#selfLabel"},maxLength:10}}},selfLabel:{type:"object",description:"Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.",required:["val"],properties:{val:{type:"string",maxLength:128,description:"The short string name of the value or type of this label."}}},labelValueDefinition:{type:"object",description:"Declares a label value and its expected interpretations and behaviors.",required:["identifier","severity","blurs","locales"],properties:{identifier:{type:"string",description:"The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",maxLength:100,maxGraphemes:100},severity:{type:"string",description:"How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",knownValues:["inform","alert","none"]},blurs:{type:"string",description:"What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",knownValues:["content","media","none"]},defaultSetting:{type:"string",description:"The default setting for this label.",knownValues:["ignore","warn","hide"],default:"warn"},adultOnly:{type:"boolean",description:"Does the user need to have adult content enabled in order to configure this label?"},locales:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValueDefinitionStrings"}}}},labelValueDefinitionStrings:{type:"object",description:"Strings which describe the label in the UI, localized into a specific language.",required:["lang","name","description"],properties:{lang:{type:"string",description:"The code of the language these strings are written in.",format:"language"},name:{type:"string",description:"A short human-readable name for the label.",maxGraphemes:64,maxLength:640},description:{type:"string",description:"A longer description of what the label means and why it might be applied.",maxGraphemes:1e4,maxLength:1e5}}},labelValue:{type:"string",knownValues:["!hide","!no-promote","!warn","!no-unauthenticated","dmca-violation","doxxing","porn","sexual","nudity","nsfl","gore"]}}},ComAtprotoLabelQueryLabels:{lexicon:1,id:"com.atproto.label.queryLabels",defs:{main:{type:"query",description:"Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.",parameters:{type:"params",required:["uriPatterns"],properties:{uriPatterns:{type:"array",items:{type:"string"},description:"List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI."},sources:{type:"array",items:{type:"string",format:"did"},description:"Optional list of label sources (DIDs) to filter on."},limit:{type:"integer",minimum:1,maximum:250,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["labels"],properties:{cursor:{type:"string"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}}}},ComAtprotoLabelSubscribeLabels:{lexicon:1,id:"com.atproto.label.subscribeLabels",defs:{main:{type:"subscription",description:"Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.",parameters:{type:"params",properties:{cursor:{type:"integer",description:"The last known event seq number to backfill from."}}},message:{schema:{type:"union",refs:["lex:com.atproto.label.subscribeLabels#labels","lex:com.atproto.label.subscribeLabels#info"]}},errors:[{name:"FutureCursor"}]},labels:{type:"object",required:["seq","labels"],properties:{seq:{type:"integer"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},info:{type:"object",required:["name"],properties:{name:{type:"string",knownValues:["OutdatedCursor"]},message:{type:"string"}}}}},ComAtprotoLexiconSchema:{lexicon:1,id:"com.atproto.lexicon.schema",defs:{main:{type:"record",description:"Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc).",key:"nsid",record:{type:"object",required:["lexicon"],properties:{lexicon:{type:"integer",description:"Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system."}}}}}},ComAtprotoModerationCreateReport:{lexicon:1,id:"com.atproto.moderation.createReport",defs:{main:{type:"procedure",description:"Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["reasonType","subject"],properties:{reasonType:{type:"ref",description:"Indicates the broad category of violation the report is for.",ref:"lex:com.atproto.moderation.defs#reasonType"},reason:{type:"string",maxGraphemes:2e3,maxLength:2e4,description:"Additional context about the content and violation."},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["id","reasonType","subject","reportedBy","createdAt"],properties:{id:{type:"integer"},reasonType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"},reason:{type:"string",maxGraphemes:2e3,maxLength:2e4},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},reportedBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}}}}}},ComAtprotoModerationDefs:{lexicon:1,id:"com.atproto.moderation.defs",defs:{reasonType:{type:"string",knownValues:["com.atproto.moderation.defs#reasonSpam","com.atproto.moderation.defs#reasonViolation","com.atproto.moderation.defs#reasonMisleading","com.atproto.moderation.defs#reasonSexual","com.atproto.moderation.defs#reasonRude","com.atproto.moderation.defs#reasonOther","com.atproto.moderation.defs#reasonAppeal"]},reasonSpam:{type:"token",description:"Spam: frequent unwanted promotion, replies, mentions"},reasonViolation:{type:"token",description:"Direct violation of server rules, laws, terms of service"},reasonMisleading:{type:"token",description:"Misleading identity, affiliation, or content"},reasonSexual:{type:"token",description:"Unwanted or mislabeled sexual content"},reasonRude:{type:"token",description:"Rude, harassing, explicit, or otherwise unwelcoming behavior"},reasonOther:{type:"token",description:"Other: reports not falling under another report category"},reasonAppeal:{type:"token",description:"Appeal: appeal a previously taken moderation action"},subjectType:{type:"string",description:"Tag describing a type of subject that might be reported.",knownValues:["account","record","chat"]}}},ComAtprotoRepoApplyWrites:{lexicon:1,id:"com.atproto.repo.applyWrites",defs:{main:{type:"procedure",description:"Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","writes"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons."},writes:{type:"array",items:{type:"union",refs:["lex:com.atproto.repo.applyWrites#create","lex:com.atproto.repo.applyWrites#update","lex:com.atproto.repo.applyWrites#delete"],closed:!0}},swapCommit:{type:"string",description:"If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.",format:"cid"}}}},output:{encoding:"application/json",schema:{type:"object",required:[],properties:{commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},results:{type:"array",items:{type:"union",refs:["lex:com.atproto.repo.applyWrites#createResult","lex:com.atproto.repo.applyWrites#updateResult","lex:com.atproto.repo.applyWrites#deleteResult"],closed:!0}}}}},errors:[{name:"InvalidSwap",description:"Indicates that the 'swapCommit' parameter did not match current commit."}]},create:{type:"object",description:"Operation which creates a new record.",required:["collection","value"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",maxLength:512,format:"record-key",description:"NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility."},value:{type:"unknown"}}},update:{type:"object",description:"Operation which updates an existing record.",required:["collection","rkey","value"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",format:"record-key"},value:{type:"unknown"}}},delete:{type:"object",description:"Operation which deletes an existing record.",required:["collection","rkey"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",format:"record-key"}}},createResult:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}},updateResult:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}},deleteResult:{type:"object",required:[],properties:{}}}},ComAtprotoRepoCreateRecord:{lexicon:1,id:"com.atproto.repo.createRecord",defs:{main:{type:"procedure",description:"Create a single new repository record. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","record"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key.",maxLength:512},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."},record:{type:"unknown",description:"The record itself. Must contain a $type field."},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}}},errors:[{name:"InvalidSwap",description:"Indicates that 'swapCommit' didn't match current repo commit."}]}}},ComAtprotoRepoDefs:{lexicon:1,id:"com.atproto.repo.defs",defs:{commitMeta:{type:"object",required:["cid","rev"],properties:{cid:{type:"string",format:"cid"},rev:{type:"string",format:"tid"}}}}},ComAtprotoRepoDeleteRecord:{lexicon:1,id:"com.atproto.repo.deleteRecord",defs:{main:{type:"procedure",description:"Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","rkey"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key."},swapRecord:{type:"string",format:"cid",description:"Compare and swap with the previous record by CID."},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",properties:{commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"}}}},errors:[{name:"InvalidSwap"}]}}},ComAtprotoRepoDescribeRepo:{lexicon:1,id:"com.atproto.repo.describeRepo",defs:{main:{type:"query",description:"Get information about an account and repository, including the list of collections. Does not require auth.",parameters:{type:"params",required:["repo"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["handle","did","didDoc","collections","handleIsCorrect"],properties:{handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown",description:"The complete DID document for this account."},collections:{type:"array",description:"List of all the collections (NSIDs) for which this repo contains at least one record.",items:{type:"string",format:"nsid"}},handleIsCorrect:{type:"boolean",description:"Indicates if handle is currently valid (resolves bi-directionally)"}}}}}}},ComAtprotoRepoGetRecord:{lexicon:1,id:"com.atproto.repo.getRecord",defs:{main:{type:"query",description:"Get a single record from a repository. Does not require auth.",parameters:{type:"params",required:["repo","collection","rkey"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",description:"The Record Key.",format:"record-key"},cid:{type:"string",format:"cid",description:"The CID of the version of the record. If not specified, then return the most recent version."}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","value"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"}}}},errors:[{name:"RecordNotFound"}]}}},ComAtprotoRepoImportRepo:{lexicon:1,id:"com.atproto.repo.importRepo",defs:{main:{type:"procedure",description:"Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.",input:{encoding:"application/vnd.ipld.car"}}}},ComAtprotoRepoListMissingBlobs:{lexicon:1,id:"com.atproto.repo.listMissingBlobs",defs:{main:{type:"query",description:"Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["blobs"],properties:{cursor:{type:"string"},blobs:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.listMissingBlobs#recordBlob"}}}}}},recordBlob:{type:"object",required:["cid","recordUri"],properties:{cid:{type:"string",format:"cid"},recordUri:{type:"string",format:"at-uri"}}}}},ComAtprotoRepoListRecords:{lexicon:1,id:"com.atproto.repo.listRecords",defs:{main:{type:"query",description:"List a range of records in a repository, matching a specific collection. Does not require auth.",parameters:{type:"params",required:["repo","collection"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},collection:{type:"string",format:"nsid",description:"The NSID of the record type."},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"The number of records to return."},cursor:{type:"string"},reverse:{type:"boolean",description:"Flag to reverse the order of the returned records."}}},output:{encoding:"application/json",schema:{type:"object",required:["records"],properties:{cursor:{type:"string"},records:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.listRecords#record"}}}}}},record:{type:"object",required:["uri","cid","value"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"}}}}},ComAtprotoRepoPutRecord:{lexicon:1,id:"com.atproto.repo.putRecord",defs:{main:{type:"procedure",description:"Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","rkey","record"],nullable:["swapRecord"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key.",maxLength:512},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons."},record:{type:"unknown",description:"The record to write."},swapRecord:{type:"string",format:"cid",description:"Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation"},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}}},errors:[{name:"InvalidSwap"}]}}},ComAtprotoRepoStrongRef:{lexicon:1,id:"com.atproto.repo.strongRef",description:"A URI with a content-hash fingerprint.",defs:{main:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}}}},ComAtprotoRepoUploadBlob:{lexicon:1,id:"com.atproto.repo.uploadBlob",defs:{main:{type:"procedure",description:"Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.",input:{encoding:"*/*"},output:{encoding:"application/json",schema:{type:"object",required:["blob"],properties:{blob:{type:"blob"}}}}}}},ComAtprotoServerActivateAccount:{lexicon:1,id:"com.atproto.server.activateAccount",defs:{main:{type:"procedure",description:"Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup."}}},ComAtprotoServerCheckAccountStatus:{lexicon:1,id:"com.atproto.server.checkAccountStatus",defs:{main:{type:"query",description:"Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.",output:{encoding:"application/json",schema:{type:"object",required:["activated","validDid","repoCommit","repoRev","repoBlocks","indexedRecords","privateStateValues","expectedBlobs","importedBlobs"],properties:{activated:{type:"boolean"},validDid:{type:"boolean"},repoCommit:{type:"string",format:"cid"},repoRev:{type:"string"},repoBlocks:{type:"integer"},indexedRecords:{type:"integer"},privateStateValues:{type:"integer"},expectedBlobs:{type:"integer"},importedBlobs:{type:"integer"}}}}}}},ComAtprotoServerConfirmEmail:{lexicon:1,id:"com.atproto.server.confirmEmail",defs:{main:{type:"procedure",description:"Confirm an email using a token from com.atproto.server.requestEmailConfirmation.",input:{encoding:"application/json",schema:{type:"object",required:["email","token"],properties:{email:{type:"string"},token:{type:"string"}}}},errors:[{name:"AccountNotFound"},{name:"ExpiredToken"},{name:"InvalidToken"},{name:"InvalidEmail"}]}}},ComAtprotoServerCreateAccount:{lexicon:1,id:"com.atproto.server.createAccount",defs:{main:{type:"procedure",description:"Create an account. Implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{email:{type:"string"},handle:{type:"string",format:"handle",description:"Requested handle for the account."},did:{type:"string",format:"did",description:"Pre-existing atproto DID, being imported to a new account."},inviteCode:{type:"string"},verificationCode:{type:"string"},verificationPhone:{type:"string"},password:{type:"string",description:"Initial account password. May need to meet instance-specific password strength requirements."},recoveryKey:{type:"string",description:"DID PLC rotation key (aka, recovery key) to be included in PLC creation operation."},plcOp:{type:"unknown",description:"A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented."}}}},output:{encoding:"application/json",schema:{type:"object",description:"Account login session returned on successful account creation.",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did",description:"The DID of the new account."},didDoc:{type:"unknown",description:"Complete DID document."}}}},errors:[{name:"InvalidHandle"},{name:"InvalidPassword"},{name:"InvalidInviteCode"},{name:"HandleNotAvailable"},{name:"UnsupportedDomain"},{name:"UnresolvableDid"},{name:"IncompatibleDidDoc"}]}}},ComAtprotoServerCreateAppPassword:{lexicon:1,id:"com.atproto.server.createAppPassword",defs:{main:{type:"procedure",description:"Create an App Password.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string",description:"A short name for the App Password, to help distinguish them."},privileged:{type:"boolean",description:"If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.server.createAppPassword#appPassword"}},errors:[{name:"AccountTakedown"}]},appPassword:{type:"object",required:["name","password","createdAt"],properties:{name:{type:"string"},password:{type:"string"},createdAt:{type:"string",format:"datetime"},privileged:{type:"boolean"}}}}},ComAtprotoServerCreateInviteCode:{lexicon:1,id:"com.atproto.server.createInviteCode",defs:{main:{type:"procedure",description:"Create an invite code.",input:{encoding:"application/json",schema:{type:"object",required:["useCount"],properties:{useCount:{type:"integer"},forAccount:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["code"],properties:{code:{type:"string"}}}}}}},ComAtprotoServerCreateInviteCodes:{lexicon:1,id:"com.atproto.server.createInviteCodes",defs:{main:{type:"procedure",description:"Create invite codes.",input:{encoding:"application/json",schema:{type:"object",required:["codeCount","useCount"],properties:{codeCount:{type:"integer",default:1},useCount:{type:"integer"},forAccounts:{type:"array",items:{type:"string",format:"did"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.createInviteCodes#accountCodes"}}}}}},accountCodes:{type:"object",required:["account","codes"],properties:{account:{type:"string"},codes:{type:"array",items:{type:"string"}}}}}},ComAtprotoServerCreateSession:{lexicon:1,id:"com.atproto.server.createSession",defs:{main:{type:"procedure",description:"Create an authentication session.",input:{encoding:"application/json",schema:{type:"object",required:["identifier","password"],properties:{identifier:{type:"string",description:"Handle or other identifier supported by the server for the authenticating user."},password:{type:"string"},authFactorToken:{type:"string"},allowTakendown:{type:"boolean",description:"When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned"}}}},output:{encoding:"application/json",schema:{type:"object",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deactivated"]}}}},errors:[{name:"AccountTakedown"},{name:"AuthFactorTokenRequired"}]}}},ComAtprotoServerDeactivateAccount:{lexicon:1,id:"com.atproto.server.deactivateAccount",defs:{main:{type:"procedure",description:"Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.",input:{encoding:"application/json",schema:{type:"object",properties:{deleteAfter:{type:"string",format:"datetime",description:"A recommendation to server as to how long they should hold onto the deactivated account before deleting."}}}}}}},ComAtprotoServerDefs:{lexicon:1,id:"com.atproto.server.defs",defs:{inviteCode:{type:"object",required:["code","available","disabled","forAccount","createdBy","createdAt","uses"],properties:{code:{type:"string"},available:{type:"integer"},disabled:{type:"boolean"},forAccount:{type:"string"},createdBy:{type:"string"},createdAt:{type:"string",format:"datetime"},uses:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCodeUse"}}}},inviteCodeUse:{type:"object",required:["usedBy","usedAt"],properties:{usedBy:{type:"string",format:"did"},usedAt:{type:"string",format:"datetime"}}}}},ComAtprotoServerDeleteAccount:{lexicon:1,id:"com.atproto.server.deleteAccount",defs:{main:{type:"procedure",description:"Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["did","password","token"],properties:{did:{type:"string",format:"did"},password:{type:"string"},token:{type:"string"}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"}]}}},ComAtprotoServerDeleteSession:{lexicon:1,id:"com.atproto.server.deleteSession",defs:{main:{type:"procedure",description:"Delete the current session. Requires auth."}}},ComAtprotoServerDescribeServer:{lexicon:1,id:"com.atproto.server.describeServer",defs:{main:{type:"query",description:"Describes the server's account creation requirements and capabilities. Implemented by PDS.",output:{encoding:"application/json",schema:{type:"object",required:["did","availableUserDomains"],properties:{inviteCodeRequired:{type:"boolean",description:"If true, an invite code must be supplied to create an account on this instance."},phoneVerificationRequired:{type:"boolean",description:"If true, a phone verification token must be supplied to create an account on this instance."},availableUserDomains:{type:"array",description:"List of domain suffixes that can be used in account handles.",items:{type:"string"}},links:{type:"ref",description:"URLs of service policy documents.",ref:"lex:com.atproto.server.describeServer#links"},contact:{type:"ref",description:"Contact information",ref:"lex:com.atproto.server.describeServer#contact"},did:{type:"string",format:"did"}}}}},links:{type:"object",properties:{privacyPolicy:{type:"string",format:"uri"},termsOfService:{type:"string",format:"uri"}}},contact:{type:"object",properties:{email:{type:"string"}}}}},ComAtprotoServerGetAccountInviteCodes:{lexicon:1,id:"com.atproto.server.getAccountInviteCodes",defs:{main:{type:"query",description:"Get all invite codes for the current account. Requires auth.",parameters:{type:"params",properties:{includeUsed:{type:"boolean",default:!0},createAvailable:{type:"boolean",default:!0,description:"Controls whether any new 'earned' but not 'created' invites should be created."}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}}}}},errors:[{name:"DuplicateCreate"}]}}},ComAtprotoServerGetServiceAuth:{lexicon:1,id:"com.atproto.server.getServiceAuth",defs:{main:{type:"query",description:"Get a signed token on behalf of the requesting DID for the requested service.",parameters:{type:"params",required:["aud"],properties:{aud:{type:"string",format:"did",description:"The DID of the service that the token will be used to authenticate with"},exp:{type:"integer",description:"The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope."},lxm:{type:"string",format:"nsid",description:"Lexicon (XRPC) method to bind the requested token to"}}},output:{encoding:"application/json",schema:{type:"object",required:["token"],properties:{token:{type:"string"}}}},errors:[{name:"BadExpiration",description:"Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes."}]}}},ComAtprotoServerGetSession:{lexicon:1,id:"com.atproto.server.getSession",defs:{main:{type:"query",description:"Get information about the current auth session. Requires auth.",output:{encoding:"application/json",schema:{type:"object",required:["handle","did"],properties:{handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},didDoc:{type:"unknown"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deactivated"]}}}}}}},ComAtprotoServerListAppPasswords:{lexicon:1,id:"com.atproto.server.listAppPasswords",defs:{main:{type:"query",description:"List all App Passwords.",output:{encoding:"application/json",schema:{type:"object",required:["passwords"],properties:{passwords:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.listAppPasswords#appPassword"}}}}},errors:[{name:"AccountTakedown"}]},appPassword:{type:"object",required:["name","createdAt"],properties:{name:{type:"string"},createdAt:{type:"string",format:"datetime"},privileged:{type:"boolean"}}}}},ComAtprotoServerRefreshSession:{lexicon:1,id:"com.atproto.server.refreshSession",defs:{main:{type:"procedure",description:"Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').",output:{encoding:"application/json",schema:{type:"object",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},active:{type:"boolean"},status:{type:"string",description:"Hosting status of the account. If not specified, then assume 'active'.",knownValues:["takendown","suspended","deactivated"]}}}},errors:[{name:"AccountTakedown"}]}}},ComAtprotoServerRequestAccountDelete:{lexicon:1,id:"com.atproto.server.requestAccountDelete",defs:{main:{type:"procedure",description:"Initiate a user account deletion via email."}}},ComAtprotoServerRequestEmailConfirmation:{lexicon:1,id:"com.atproto.server.requestEmailConfirmation",defs:{main:{type:"procedure",description:"Request an email with a code to confirm ownership of email."}}},ComAtprotoServerRequestEmailUpdate:{lexicon:1,id:"com.atproto.server.requestEmailUpdate",defs:{main:{type:"procedure",description:"Request a token in order to update email.",output:{encoding:"application/json",schema:{type:"object",required:["tokenRequired"],properties:{tokenRequired:{type:"boolean"}}}}}}},ComAtprotoServerRequestPasswordReset:{lexicon:1,id:"com.atproto.server.requestPasswordReset",defs:{main:{type:"procedure",description:"Initiate a user account password reset via email.",input:{encoding:"application/json",schema:{type:"object",required:["email"],properties:{email:{type:"string"}}}}}}},ComAtprotoServerReserveSigningKey:{lexicon:1,id:"com.atproto.server.reserveSigningKey",defs:{main:{type:"procedure",description:"Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.",input:{encoding:"application/json",schema:{type:"object",properties:{did:{type:"string",format:"did",description:"The DID to reserve a key for."}}}},output:{encoding:"application/json",schema:{type:"object",required:["signingKey"],properties:{signingKey:{type:"string",description:"The public key for the reserved signing key, in did:key serialization."}}}}}}},ComAtprotoServerResetPassword:{lexicon:1,id:"com.atproto.server.resetPassword",defs:{main:{type:"procedure",description:"Reset a user account password using a token.",input:{encoding:"application/json",schema:{type:"object",required:["token","password"],properties:{token:{type:"string"},password:{type:"string"}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"}]}}},ComAtprotoServerRevokeAppPassword:{lexicon:1,id:"com.atproto.server.revokeAppPassword",defs:{main:{type:"procedure",description:"Revoke an App Password by name.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string"}}}}}}},ComAtprotoServerUpdateEmail:{lexicon:1,id:"com.atproto.server.updateEmail",defs:{main:{type:"procedure",description:"Update an account's email.",input:{encoding:"application/json",schema:{type:"object",required:["email"],properties:{email:{type:"string"},emailAuthFactor:{type:"boolean"},token:{type:"string",description:"Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed."}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"},{name:"TokenRequired"}]}}},ComAtprotoSyncDefs:{lexicon:1,id:"com.atproto.sync.defs",defs:{hostStatus:{type:"string",knownValues:["active","idle","offline","throttled","banned"]}}},ComAtprotoSyncGetBlob:{lexicon:1,id:"com.atproto.sync.getBlob",defs:{main:{type:"query",description:"Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did","cid"],properties:{did:{type:"string",format:"did",description:"The DID of the account."},cid:{type:"string",format:"cid",description:"The CID of the blob to fetch"}}},output:{encoding:"*/*"},errors:[{name:"BlobNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetBlocks:{lexicon:1,id:"com.atproto.sync.getBlocks",defs:{main:{type:"query",description:"Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did","cids"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},cids:{type:"array",items:{type:"string",format:"cid"}}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"BlockNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetCheckout:{lexicon:1,id:"com.atproto.sync.getCheckout",defs:{main:{type:"query",description:"DEPRECATED - please use com.atproto.sync.getRepo instead",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/vnd.ipld.car"}}}},ComAtprotoSyncGetHead:{lexicon:1,id:"com.atproto.sync.getHead",defs:{main:{type:"query",description:"DEPRECATED - please use com.atproto.sync.getLatestCommit instead",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"cid"}}}},errors:[{name:"HeadNotFound"}]}}},ComAtprotoSyncGetHostStatus:{lexicon:1,id:"com.atproto.sync.getHostStatus",defs:{main:{type:"query",description:"Returns information about a specified upstream host, as consumed by the server. Implemented by relays.",parameters:{type:"params",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the host (eg, PDS or relay) being queried."}}},output:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string"},seq:{type:"integer",description:"Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."},accountCount:{type:"integer",description:"Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts."},status:{type:"ref",ref:"lex:com.atproto.sync.defs#hostStatus"}}}},errors:[{name:"HostNotFound"}]}}},ComAtprotoSyncGetLatestCommit:{lexicon:1,id:"com.atproto.sync.getLatestCommit",defs:{main:{type:"query",description:"Get the current commit CID & revision of the specified repo. Does not require auth.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["cid","rev"],properties:{cid:{type:"string",format:"cid"},rev:{type:"string",format:"tid"}}}},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRecord:{lexicon:1,id:"com.atproto.sync.getRecord",defs:{main:{type:"query",description:"Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.",parameters:{type:"params",required:["did","collection","rkey"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},collection:{type:"string",format:"nsid"},rkey:{type:"string",description:"Record Key",format:"record-key"}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"RecordNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRepo:{lexicon:1,id:"com.atproto.sync.getRepo",defs:{main:{type:"query",description:"Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},since:{type:"string",format:"tid",description:"The revision ('rev') of the repo to create a diff from."}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRepoStatus:{lexicon:1,id:"com.atproto.sync.getRepoStatus",defs:{main:{type:"query",description:"Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["did","active"],properties:{did:{type:"string",format:"did"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]},rev:{type:"string",format:"tid",description:"Optional field, the current rev of the repo, if active=true"}}}},errors:[{name:"RepoNotFound"}]}}},ComAtprotoSyncListBlobs:{lexicon:1,id:"com.atproto.sync.listBlobs",defs:{main:{type:"query",description:"List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},since:{type:"string",format:"tid",description:"Optional revision of the repo to list blobs since."},limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["cids"],properties:{cursor:{type:"string"},cids:{type:"array",items:{type:"string",format:"cid"}}}}},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncListHosts:{lexicon:1,id:"com.atproto.sync.listHosts",defs:{main:{type:"query",description:"Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:200},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["hosts"],properties:{cursor:{type:"string"},hosts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listHosts#host"},description:"Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first."}}}}},host:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"hostname of server; not a URL (no scheme)"},seq:{type:"integer",description:"Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."},accountCount:{type:"integer"},status:{type:"ref",ref:"lex:com.atproto.sync.defs#hostStatus"}}}}},ComAtprotoSyncListRepos:{lexicon:1,id:"com.atproto.sync.listRepos",defs:{main:{type:"query",description:"Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listRepos#repo"}}}}}},repo:{type:"object",required:["did","head","rev"],properties:{did:{type:"string",format:"did"},head:{type:"string",format:"cid",description:"Current repo commit CID"},rev:{type:"string",format:"tid"},active:{type:"boolean"},status:{type:"string",description:"If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]}}}}},ComAtprotoSyncListReposByCollection:{lexicon:1,id:"com.atproto.sync.listReposByCollection",defs:{main:{type:"query",description:"Enumerates all the DIDs which have records with the given collection NSID.",parameters:{type:"params",required:["collection"],properties:{collection:{type:"string",format:"nsid"},limit:{type:"integer",description:"Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.",minimum:1,maximum:2e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listReposByCollection#repo"}}}}}},repo:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}},ComAtprotoSyncNotifyOfUpdate:{lexicon:1,id:"com.atproto.sync.notifyOfUpdate",defs:{main:{type:"procedure",description:"Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl",input:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the current service (usually a PDS) that is notifying of update."}}}}}}},ComAtprotoSyncRequestCrawl:{lexicon:1,id:"com.atproto.sync.requestCrawl",defs:{main:{type:"procedure",description:"Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.",input:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the current service (eg, PDS) that is requesting to be crawled."}}}},errors:[{name:"HostBanned"}]}}},ComAtprotoSyncSubscribeRepos:{lexicon:1,id:"com.atproto.sync.subscribeRepos",defs:{main:{type:"subscription",description:"Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.",parameters:{type:"params",properties:{cursor:{type:"integer",description:"The last known event seq number to backfill from."}}},message:{schema:{type:"union",refs:["lex:com.atproto.sync.subscribeRepos#commit","lex:com.atproto.sync.subscribeRepos#sync","lex:com.atproto.sync.subscribeRepos#identity","lex:com.atproto.sync.subscribeRepos#account","lex:com.atproto.sync.subscribeRepos#info"]}},errors:[{name:"FutureCursor"},{name:"ConsumerTooSlow",description:"If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."}]},commit:{type:"object",description:"Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.",required:["seq","rebase","tooBig","repo","commit","rev","since","blocks","ops","blobs","time"],nullable:["since"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},rebase:{type:"boolean",description:"DEPRECATED -- unused"},tooBig:{type:"boolean",description:"DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data."},repo:{type:"string",format:"did",description:"The repo this event comes from. Note that all other message types name this field 'did'."},commit:{type:"cid-link",description:"Repo commit object CID."},rev:{type:"string",format:"tid",description:"The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event."},since:{type:"string",format:"tid",description:"The rev of the last emitted commit from this repo (if any)."},blocks:{type:"bytes",description:"CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.",maxLength:2e6},ops:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.subscribeRepos#repoOp",description:"List of repo mutation operations in this commit (eg, records created, updated, or deleted)."},maxLength:200},blobs:{type:"array",items:{type:"cid-link",description:"DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit."}},prevData:{type:"cid-link",description:"The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose."},time:{type:"string",format:"datetime",description:"Timestamp of when this message was originally broadcast."}}},sync:{type:"object",description:"Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.",required:["seq","did","blocks","rev","time"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},did:{type:"string",format:"did",description:"The account this repo event corresponds to. Must match that in the commit object."},blocks:{type:"bytes",description:"CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.",maxLength:1e4},rev:{type:"string",description:"The rev of the commit. This value must match that in the commit object."},time:{type:"string",format:"datetime",description:"Timestamp of when this message was originally broadcast."}}},identity:{type:"object",description:"Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.",required:["seq","did","time"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"},handle:{type:"string",format:"handle",description:"The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details."}}},account:{type:"object",description:"Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",required:["seq","did","time","active"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"},active:{type:"boolean",description:"Indicates that the account has a repository which can be fetched from the host that emitted this event."},status:{type:"string",description:"If active=false, this optional field indicates a reason for why the account is not active.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]}}},info:{type:"object",required:["name"],properties:{name:{type:"string",knownValues:["OutdatedCursor"]},message:{type:"string"}}},repoOp:{type:"object",description:"A repo operation, ie a mutation of a single record.",required:["action","path","cid"],nullable:["cid"],properties:{action:{type:"string",knownValues:["create","update","delete"]},path:{type:"string"},cid:{type:"cid-link",description:"For creates and updates, the new record CID. For deletions, null."},prev:{type:"cid-link",description:"For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined."}}}}},ComAtprotoTempAddReservedHandle:{lexicon:1,id:"com.atproto.temp.addReservedHandle",defs:{main:{type:"procedure",description:"Add a handle to the set of reserved handles.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{handle:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ComAtprotoTempCheckSignupQueue:{lexicon:1,id:"com.atproto.temp.checkSignupQueue",defs:{main:{type:"query",description:"Check accounts location in signup queue.",output:{encoding:"application/json",schema:{type:"object",required:["activated"],properties:{activated:{type:"boolean"},placeInQueue:{type:"integer"},estimatedTimeMs:{type:"integer"}}}}}}},ComAtprotoTempFetchLabels:{lexicon:1,id:"com.atproto.temp.fetchLabels",defs:{main:{type:"query",description:"DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.",parameters:{type:"params",properties:{since:{type:"integer"},limit:{type:"integer",minimum:1,maximum:250,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["labels"],properties:{labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}}}},ComAtprotoTempRequestPhoneVerification:{lexicon:1,id:"com.atproto.temp.requestPhoneVerification",defs:{main:{type:"procedure",description:"Request a verification code to be sent to the supplied phone number",input:{encoding:"application/json",schema:{type:"object",required:["phoneNumber"],properties:{phoneNumber:{type:"string"}}}}}}},AppBskyActorDefs:{lexicon:1,id:"app.bsky.actor.defs",defs:{profileViewBasic:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},createdAt:{type:"string",format:"datetime"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},profileView:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",maxGraphemes:256,maxLength:2560},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},profileViewDetailed:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",maxGraphemes:256,maxLength:2560},avatar:{type:"string",format:"uri"},banner:{type:"string",format:"uri"},followersCount:{type:"integer"},followsCount:{type:"integer"},postsCount:{type:"integer"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},joinedViaStarterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"},indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},pinnedPost:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"}}},profileAssociated:{type:"object",properties:{lists:{type:"integer"},feedgens:{type:"integer"},starterPacks:{type:"integer"},labeler:{type:"boolean"},chat:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociatedChat"}}},profileAssociatedChat:{type:"object",required:["allowIncoming"],properties:{allowIncoming:{type:"string",knownValues:["all","none","following"]}}},viewerState:{type:"object",description:"Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",properties:{muted:{type:"boolean"},mutedByList:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},blockedBy:{type:"boolean"},blocking:{type:"string",format:"at-uri"},blockingByList:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},following:{type:"string",format:"at-uri"},followedBy:{type:"string",format:"at-uri"},knownFollowers:{type:"ref",ref:"lex:app.bsky.actor.defs#knownFollowers"}}},knownFollowers:{type:"object",description:"The subject's followers whom you also follow",required:["count","followers"],properties:{count:{type:"integer"},followers:{type:"array",minLength:0,maxLength:5,items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}},verificationState:{type:"object",description:"Represents the verification information about the user this object is attached to.",required:["verifications","verifiedStatus","trustedVerifierStatus"],properties:{verifications:{type:"array",description:"All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.",items:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationView"}},verifiedStatus:{type:"string",description:"The user's status as a verified account.",knownValues:["valid","invalid","none"]},trustedVerifierStatus:{type:"string",description:"The user's status as a trusted verifier.",knownValues:["valid","invalid","none"]}}},verificationView:{type:"object",description:"An individual verification for an associated subject.",required:["issuer","uri","isValid","createdAt"],properties:{issuer:{type:"string",description:"The user who issued this verification.",format:"did"},uri:{type:"string",description:"The AT-URI of the verification record.",format:"at-uri"},isValid:{type:"boolean",description:"True if the verification passes validation, otherwise false."},createdAt:{type:"string",description:"Timestamp when the verification was created.",format:"datetime"}}},preferences:{type:"array",items:{type:"union",refs:["lex:app.bsky.actor.defs#adultContentPref","lex:app.bsky.actor.defs#contentLabelPref","lex:app.bsky.actor.defs#savedFeedsPref","lex:app.bsky.actor.defs#savedFeedsPrefV2","lex:app.bsky.actor.defs#personalDetailsPref","lex:app.bsky.actor.defs#feedViewPref","lex:app.bsky.actor.defs#threadViewPref","lex:app.bsky.actor.defs#interestsPref","lex:app.bsky.actor.defs#mutedWordsPref","lex:app.bsky.actor.defs#hiddenPostsPref","lex:app.bsky.actor.defs#bskyAppStatePref","lex:app.bsky.actor.defs#labelersPref","lex:app.bsky.actor.defs#postInteractionSettingsPref","lex:app.bsky.actor.defs#verificationPrefs"]}},adultContentPref:{type:"object",required:["enabled"],properties:{enabled:{type:"boolean",default:!1}}},contentLabelPref:{type:"object",required:["label","visibility"],properties:{labelerDid:{type:"string",description:"Which labeler does this preference apply to? If undefined, applies globally.",format:"did"},label:{type:"string"},visibility:{type:"string",knownValues:["ignore","show","warn","hide"]}}},savedFeed:{type:"object",required:["id","type","value","pinned"],properties:{id:{type:"string"},type:{type:"string",knownValues:["feed","list","timeline"]},value:{type:"string"},pinned:{type:"boolean"}}},savedFeedsPrefV2:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#savedFeed"}}}},savedFeedsPref:{type:"object",required:["pinned","saved"],properties:{pinned:{type:"array",items:{type:"string",format:"at-uri"}},saved:{type:"array",items:{type:"string",format:"at-uri"}},timelineIndex:{type:"integer"}}},personalDetailsPref:{type:"object",properties:{birthDate:{type:"string",format:"datetime",description:"The birth date of account owner."}}},feedViewPref:{type:"object",required:["feed"],properties:{feed:{type:"string",description:"The URI of the feed, or an identifier which describes the feed."},hideReplies:{type:"boolean",description:"Hide replies in the feed."},hideRepliesByUnfollowed:{type:"boolean",description:"Hide replies in the feed if they are not by followed users.",default:!0},hideRepliesByLikeCount:{type:"integer",description:"Hide replies in the feed if they do not have this number of likes."},hideReposts:{type:"boolean",description:"Hide reposts in the feed."},hideQuotePosts:{type:"boolean",description:"Hide quote posts in the feed."}}},threadViewPref:{type:"object",properties:{sort:{type:"string",description:"Sorting mode for threads.",knownValues:["oldest","newest","most-likes","random","hotness"]},prioritizeFollowedUsers:{type:"boolean",description:"Show followed users at the top of all replies."}}},interestsPref:{type:"object",required:["tags"],properties:{tags:{type:"array",maxLength:100,items:{type:"string",maxLength:640,maxGraphemes:64},description:"A list of tags which describe the account owner's interests gathered during onboarding."}}},mutedWordTarget:{type:"string",knownValues:["content","tag"],maxLength:640,maxGraphemes:64},mutedWord:{type:"object",description:"A word that the account owner has muted.",required:["value","targets"],properties:{id:{type:"string"},value:{type:"string",description:"The muted word itself.",maxLength:1e4,maxGraphemes:1e3},targets:{type:"array",description:"The intended targets of the muted word.",items:{type:"ref",ref:"lex:app.bsky.actor.defs#mutedWordTarget"}},actorTarget:{type:"string",description:"Groups of users to apply the muted word to. If undefined, applies to all users.",knownValues:["all","exclude-following"],default:"all"},expiresAt:{type:"string",format:"datetime",description:"The date and time at which the muted word will expire and no longer be applied."}}},mutedWordsPref:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#mutedWord"},description:"A list of words the account owner has muted."}}},hiddenPostsPref:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"string",format:"at-uri"},description:"A list of URIs of posts the account owner has hidden."}}},labelersPref:{type:"object",required:["labelers"],properties:{labelers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#labelerPrefItem"}}}},labelerPrefItem:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},bskyAppStatePref:{description:"A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",type:"object",properties:{activeProgressGuide:{type:"ref",ref:"lex:app.bsky.actor.defs#bskyAppProgressGuide"},queuedNudges:{description:"An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.",type:"array",maxLength:1e3,items:{type:"string",maxLength:100}},nuxs:{description:"Storage for NUXs the user has encountered.",type:"array",maxLength:100,items:{type:"ref",ref:"lex:app.bsky.actor.defs#nux"}}}},bskyAppProgressGuide:{description:"If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.",type:"object",required:["guide"],properties:{guide:{type:"string",maxLength:100}}},nux:{type:"object",description:"A new user experiences (NUX) storage object",required:["id","completed"],properties:{id:{type:"string",maxLength:100},completed:{type:"boolean",default:!1},data:{description:"Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.",type:"string",maxLength:3e3,maxGraphemes:300},expiresAt:{type:"string",format:"datetime",description:"The date and time at which the NUX will expire and should be considered completed."}}},verificationPrefs:{type:"object",description:"Preferences for how verified accounts appear in the app.",required:[],properties:{hideBadges:{description:"Hide the blue check badges for verified accounts and trusted verifiers.",type:"boolean",default:!1}}},postInteractionSettingsPref:{type:"object",description:"Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.",required:[],properties:{threadgateAllowRules:{description:"Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}},postgateEmbeddingRules:{description:"Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}}}},statusView:{type:"object",required:["status","record"],properties:{status:{type:"string",description:"The status for the account.",knownValues:["app.bsky.actor.status#live"]},record:{type:"unknown"},embed:{type:"union",description:"An optional embed associated with the status.",refs:["lex:app.bsky.embed.external#view"]},expiresAt:{type:"string",description:"The date when this status will expire. The application might choose to no longer return the status after expiration.",format:"datetime"},isActive:{type:"boolean",description:"True if the status is not expired, false if it is expired. Only present if expiration was set."}}}}},AppBskyActorGetPreferences:{lexicon:1,id:"app.bsky.actor.getPreferences",defs:{main:{type:"query",description:"Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.actor.defs#preferences"}}}}}}},AppBskyActorGetProfile:{lexicon:1,id:"app.bsky.actor.getProfile",defs:{main:{type:"query",description:"Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"Handle or DID of account to fetch profile of."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"}}}}},AppBskyActorGetProfiles:{lexicon:1,id:"app.bsky.actor.getProfiles",defs:{main:{type:"query",description:"Get detailed profile views of multiple actors.",parameters:{type:"params",required:["actors"],properties:{actors:{type:"array",items:{type:"string",format:"at-identifier"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["profiles"],properties:{profiles:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"}}}}}}}},AppBskyActorGetSuggestions:{lexicon:1,id:"app.bsky.actor.getSuggestions",defs:{main:{type:"query",description:"Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyActorProfile:{lexicon:1,id:"app.bsky.actor.profile",defs:{main:{type:"record",description:"A declaration of a Bluesky account profile.",key:"literal:self",record:{type:"object",properties:{displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",description:"Free-form profile description text.",maxGraphemes:256,maxLength:2560},avatar:{type:"blob",description:"Small image to be displayed next to posts from account. AKA, 'profile picture'",accept:["image/png","image/jpeg"],maxSize:1e6},banner:{type:"blob",description:"Larger horizontal image to display behind profile view.",accept:["image/png","image/jpeg"],maxSize:1e6},labels:{type:"union",description:"Self-label values, specific to the Bluesky application, on the overall account.",refs:["lex:com.atproto.label.defs#selfLabels"]},joinedViaStarterPack:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},pinnedPost:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyActorPutPreferences:{lexicon:1,id:"app.bsky.actor.putPreferences",defs:{main:{type:"procedure",description:"Set the private preferences attached to the account.",input:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.actor.defs#preferences"}}}}}}},AppBskyActorSearchActors:{lexicon:1,id:"app.bsky.actor.searchActors",defs:{main:{type:"query",description:"Find actors (profiles) matching search criteria. Does not require auth.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead."},q:{type:"string",description:"Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyActorSearchActorsTypeahead:{lexicon:1,id:"app.bsky.actor.searchActorsTypeahead",defs:{main:{type:"query",description:"Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead."},q:{type:"string",description:"Search query prefix; not a full query string."},limit:{type:"integer",minimum:1,maximum:100,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}}}}}},AppBskyActorStatus:{lexicon:1,id:"app.bsky.actor.status",defs:{main:{type:"record",description:"A declaration of a Bluesky account status.",key:"literal:self",record:{type:"object",required:["status","createdAt"],properties:{status:{type:"string",description:"The status for the account.",knownValues:["app.bsky.actor.status#live"]},embed:{type:"union",description:"An optional embed associated with the status.",refs:["lex:app.bsky.embed.external"]},durationMinutes:{type:"integer",description:"The duration of the status in minutes. Applications can choose to impose minimum and maximum limits.",minimum:1},createdAt:{type:"string",format:"datetime"}}}},live:{type:"token",description:"Advertises an account as currently offering live content."}}},AppBskyEmbedDefs:{lexicon:1,id:"app.bsky.embed.defs",defs:{aspectRatio:{type:"object",description:"width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.",required:["width","height"],properties:{width:{type:"integer",minimum:1},height:{type:"integer",minimum:1}}}}},AppBskyEmbedExternal:{lexicon:1,id:"app.bsky.embed.external",defs:{main:{type:"object",description:"A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",required:["external"],properties:{external:{type:"ref",ref:"lex:app.bsky.embed.external#external"}}},external:{type:"object",required:["uri","title","description"],properties:{uri:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},thumb:{type:"blob",accept:["image/*"],maxSize:1e6}}},view:{type:"object",required:["external"],properties:{external:{type:"ref",ref:"lex:app.bsky.embed.external#viewExternal"}}},viewExternal:{type:"object",required:["uri","title","description"],properties:{uri:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},thumb:{type:"string",format:"uri"}}}}},AppBskyEmbedImages:{lexicon:1,id:"app.bsky.embed.images",description:"A set of images embedded in a Bluesky record (eg, a post).",defs:{main:{type:"object",required:["images"],properties:{images:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.images#image"},maxLength:4}}},image:{type:"object",required:["image","alt"],properties:{image:{type:"blob",accept:["image/*"],maxSize:1e6},alt:{type:"string",description:"Alt text description of the image, for accessibility."},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}},view:{type:"object",required:["images"],properties:{images:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.images#viewImage"},maxLength:4}}},viewImage:{type:"object",required:["thumb","fullsize","alt"],properties:{thumb:{type:"string",format:"uri",description:"Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."},fullsize:{type:"string",format:"uri",description:"Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."},alt:{type:"string",description:"Alt text description of the image, for accessibility."},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}}}},AppBskyEmbedRecord:{lexicon:1,id:"app.bsky.embed.record",description:"A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.",defs:{main:{type:"object",required:["record"],properties:{record:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},view:{type:"object",required:["record"],properties:{record:{type:"union",refs:["lex:app.bsky.embed.record#viewRecord","lex:app.bsky.embed.record#viewNotFound","lex:app.bsky.embed.record#viewBlocked","lex:app.bsky.embed.record#viewDetached","lex:app.bsky.feed.defs#generatorView","lex:app.bsky.graph.defs#listView","lex:app.bsky.labeler.defs#labelerView","lex:app.bsky.graph.defs#starterPackViewBasic"]}}},viewRecord:{type:"object",required:["uri","cid","author","value","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},value:{type:"unknown",description:"The record data itself."},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},replyCount:{type:"integer"},repostCount:{type:"integer"},likeCount:{type:"integer"},quoteCount:{type:"integer"},embeds:{type:"array",items:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view","lex:app.bsky.embed.record#view","lex:app.bsky.embed.recordWithMedia#view"]}},indexedAt:{type:"string",format:"datetime"}}},viewNotFound:{type:"object",required:["uri","notFound"],properties:{uri:{type:"string",format:"at-uri"},notFound:{type:"boolean",const:!0}}},viewBlocked:{type:"object",required:["uri","blocked","author"],properties:{uri:{type:"string",format:"at-uri"},blocked:{type:"boolean",const:!0},author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},viewDetached:{type:"object",required:["uri","detached"],properties:{uri:{type:"string",format:"at-uri"},detached:{type:"boolean",const:!0}}}}},AppBskyEmbedRecordWithMedia:{lexicon:1,id:"app.bsky.embed.recordWithMedia",description:"A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.",defs:{main:{type:"object",required:["record","media"],properties:{record:{type:"ref",ref:"lex:app.bsky.embed.record"},media:{type:"union",refs:["lex:app.bsky.embed.images","lex:app.bsky.embed.video","lex:app.bsky.embed.external"]}}},view:{type:"object",required:["record","media"],properties:{record:{type:"ref",ref:"lex:app.bsky.embed.record#view"},media:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view"]}}}}},AppBskyEmbedVideo:{lexicon:1,id:"app.bsky.embed.video",description:"A video embedded in a Bluesky record (eg, a post).",defs:{main:{type:"object",required:["video"],properties:{video:{type:"blob",description:"The mp4 video file. May be up to 100mb, formerly limited to 50mb.",accept:["video/mp4"],maxSize:1e8},captions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.video#caption"},maxLength:20},alt:{type:"string",description:"Alt text description of the video, for accessibility.",maxGraphemes:1e3,maxLength:1e4},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}},caption:{type:"object",required:["lang","file"],properties:{lang:{type:"string",format:"language"},file:{type:"blob",accept:["text/vtt"],maxSize:2e4}}},view:{type:"object",required:["cid","playlist"],properties:{cid:{type:"string",format:"cid"},playlist:{type:"string",format:"uri"},thumbnail:{type:"string",format:"uri"},alt:{type:"string",maxGraphemes:1e3,maxLength:1e4},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}}}},AppBskyFeedDefs:{lexicon:1,id:"app.bsky.feed.defs",defs:{postView:{type:"object",required:["uri","cid","author","record","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},record:{type:"unknown"},embed:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view","lex:app.bsky.embed.record#view","lex:app.bsky.embed.recordWithMedia#view"]},replyCount:{type:"integer"},repostCount:{type:"integer"},likeCount:{type:"integer"},quoteCount:{type:"integer"},indexedAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.feed.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"}}},viewerState:{type:"object",description:"Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",properties:{repost:{type:"string",format:"at-uri"},like:{type:"string",format:"at-uri"},threadMuted:{type:"boolean"},replyDisabled:{type:"boolean"},embeddingDisabled:{type:"boolean"},pinned:{type:"boolean"}}},threadContext:{type:"object",description:"Metadata about this post within the context of the thread it is in.",properties:{rootAuthorLike:{type:"string",format:"at-uri"}}},feedViewPost:{type:"object",required:["post"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},reply:{type:"ref",ref:"lex:app.bsky.feed.defs#replyRef"},reason:{type:"union",refs:["lex:app.bsky.feed.defs#reasonRepost","lex:app.bsky.feed.defs#reasonPin"]},feedContext:{type:"string",description:"Context provided by feed generator that may be passed back alongside interactions.",maxLength:2e3},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}},replyRef:{type:"object",required:["root","parent"],properties:{root:{type:"union",refs:["lex:app.bsky.feed.defs#postView","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},parent:{type:"union",refs:["lex:app.bsky.feed.defs#postView","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},grandparentAuthor:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic",description:"When parent is a reply to another post, this is the author of that post."}}},reasonRepost:{type:"object",required:["by","indexedAt"],properties:{by:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},indexedAt:{type:"string",format:"datetime"}}},reasonPin:{type:"object",properties:{}},threadViewPost:{type:"object",required:["post"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},parent:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},replies:{type:"array",items:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]}},threadContext:{type:"ref",ref:"lex:app.bsky.feed.defs#threadContext"}}},notFoundPost:{type:"object",required:["uri","notFound"],properties:{uri:{type:"string",format:"at-uri"},notFound:{type:"boolean",const:!0}}},blockedPost:{type:"object",required:["uri","blocked","author"],properties:{uri:{type:"string",format:"at-uri"},blocked:{type:"boolean",const:!0},author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},blockedAuthor:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"}}},generatorView:{type:"object",required:["uri","cid","did","creator","displayName","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},did:{type:"string",format:"did"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},displayName:{type:"string"},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"string",format:"uri"},likeCount:{type:"integer",minimum:0},acceptsInteractions:{type:"boolean"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorViewerState"},contentMode:{type:"string",knownValues:["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},indexedAt:{type:"string",format:"datetime"}}},generatorViewerState:{type:"object",properties:{like:{type:"string",format:"at-uri"}}},skeletonFeedPost:{type:"object",required:["post"],properties:{post:{type:"string",format:"at-uri"},reason:{type:"union",refs:["lex:app.bsky.feed.defs#skeletonReasonRepost","lex:app.bsky.feed.defs#skeletonReasonPin"]},feedContext:{type:"string",description:"Context that will be passed through to client and may be passed to feed generator back alongside interactions.",maxLength:2e3}}},skeletonReasonRepost:{type:"object",required:["repost"],properties:{repost:{type:"string",format:"at-uri"}}},skeletonReasonPin:{type:"object",properties:{}},threadgateView:{type:"object",properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"}}}},interaction:{type:"object",properties:{item:{type:"string",format:"at-uri"},event:{type:"string",knownValues:["app.bsky.feed.defs#requestLess","app.bsky.feed.defs#requestMore","app.bsky.feed.defs#clickthroughItem","app.bsky.feed.defs#clickthroughAuthor","app.bsky.feed.defs#clickthroughReposter","app.bsky.feed.defs#clickthroughEmbed","app.bsky.feed.defs#interactionSeen","app.bsky.feed.defs#interactionLike","app.bsky.feed.defs#interactionRepost","app.bsky.feed.defs#interactionReply","app.bsky.feed.defs#interactionQuote","app.bsky.feed.defs#interactionShare"]},feedContext:{type:"string",description:"Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.",maxLength:2e3},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}},requestLess:{type:"token",description:"Request that less content like the given feed item be shown in the feed"},requestMore:{type:"token",description:"Request that more content like the given feed item be shown in the feed"},clickthroughItem:{type:"token",description:"User clicked through to the feed item"},clickthroughAuthor:{type:"token",description:"User clicked through to the author of the feed item"},clickthroughReposter:{type:"token",description:"User clicked through to the reposter of the feed item"},clickthroughEmbed:{type:"token",description:"User clicked through to the embedded content of the feed item"},contentModeUnspecified:{type:"token",description:"Declares the feed generator returns any types of posts."},contentModeVideo:{type:"token",description:"Declares the feed generator returns posts containing app.bsky.embed.video embeds."},interactionSeen:{type:"token",description:"Feed item was seen by user"},interactionLike:{type:"token",description:"User liked the feed item"},interactionRepost:{type:"token",description:"User reposted the feed item"},interactionReply:{type:"token",description:"User replied to the feed item"},interactionQuote:{type:"token",description:"User quoted the feed item"},interactionShare:{type:"token",description:"User shared the feed item"}}},AppBskyFeedDescribeFeedGenerator:{lexicon:1,id:"app.bsky.feed.describeFeedGenerator",defs:{main:{type:"query",description:"Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).",output:{encoding:"application/json",schema:{type:"object",required:["did","feeds"],properties:{did:{type:"string",format:"did"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.describeFeedGenerator#feed"}},links:{type:"ref",ref:"lex:app.bsky.feed.describeFeedGenerator#links"}}}}},feed:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},links:{type:"object",properties:{privacyPolicy:{type:"string"},termsOfService:{type:"string"}}}}},AppBskyFeedGenerator:{lexicon:1,id:"app.bsky.feed.generator",defs:{main:{type:"record",description:"Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.",key:"any",record:{type:"object",required:["did","displayName","createdAt"],properties:{did:{type:"string",format:"did"},displayName:{type:"string",maxGraphemes:24,maxLength:240},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"blob",accept:["image/png","image/jpeg"],maxSize:1e6},acceptsInteractions:{type:"boolean",description:"Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions"},labels:{type:"union",description:"Self-label values",refs:["lex:com.atproto.label.defs#selfLabels"]},contentMode:{type:"string",knownValues:["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyFeedGetActorFeeds:{lexicon:1,id:"app.bsky.feed.getActorFeeds",defs:{main:{type:"query",description:"Get a list of feeds (feed generator records) created by the actor (in the actor's repo).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetActorLikes:{lexicon:1,id:"app.bsky.feed.getActorLikes",defs:{main:{type:"query",description:"Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"BlockedActor"},{name:"BlockedByActor"}]}}},AppBskyFeedGetAuthorFeed:{lexicon:1,id:"app.bsky.feed.getAuthorFeed",defs:{main:{type:"query",description:"Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},filter:{type:"string",description:"Combinations of post/repost types to include in response.",knownValues:["posts_with_replies","posts_no_replies","posts_with_media","posts_and_author_threads","posts_with_video"],default:"posts_with_replies"},includePins:{type:"boolean",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"BlockedActor"},{name:"BlockedByActor"}]}}},AppBskyFeedGetFeed:{lexicon:1,id:"app.bsky.feed.getFeed",defs:{main:{type:"query",description:"Get a hydrated feed from an actor's selected feed generator. Implemented by App View.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"UnknownFeed"}]}}},AppBskyFeedGetFeedGenerator:{lexicon:1,id:"app.bsky.feed.getFeedGenerator",defs:{main:{type:"query",description:"Get information about a feed generator. Implemented by AppView.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri",description:"AT-URI of the feed generator record."}}},output:{encoding:"application/json",schema:{type:"object",required:["view","isOnline","isValid"],properties:{view:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"},isOnline:{type:"boolean",description:"Indicates whether the feed generator service has been online recently, or else seems to be inactive."},isValid:{type:"boolean",description:"Indicates whether the feed generator service is compatible with the record declaration."}}}}}}},AppBskyFeedGetFeedGenerators:{lexicon:1,id:"app.bsky.feed.getFeedGenerators",defs:{main:{type:"query",description:"Get information about a list of feed generators.",parameters:{type:"params",required:["feeds"],properties:{feeds:{type:"array",items:{type:"string",format:"at-uri"}}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetFeedSkeleton:{lexicon:1,id:"app.bsky.feed.getFeedSkeleton",defs:{main:{type:"query",description:"Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri",description:"Reference to feed generator record describing the specific feed being requested."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#skeletonFeedPost"}},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}}},errors:[{name:"UnknownFeed"}]}}},AppBskyFeedGetLikes:{lexicon:1,id:"app.bsky.feed.getLikes",defs:{main:{type:"query",description:"Get like records which reference a subject (by AT-URI and CID).",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"AT-URI of the subject (eg, a post record)."},cid:{type:"string",format:"cid",description:"CID of the subject record (aka, specific version of record), to filter likes."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","likes"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},likes:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.getLikes#like"}}}}}},like:{type:"object",required:["indexedAt","createdAt","actor"],properties:{indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},actor:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}},AppBskyFeedGetListFeed:{lexicon:1,id:"app.bsky.feed.getListFeed",defs:{main:{type:"query",description:"Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.",parameters:{type:"params",required:["list"],properties:{list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"UnknownList"}]}}},AppBskyFeedGetPosts:{lexicon:1,id:"app.bsky.feed.getPosts",defs:{main:{type:"query",description:"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",description:"List of post AT-URIs to return hydrated views for.",items:{type:"string",format:"at-uri"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}}}}},AppBskyFeedGetPostThread:{lexicon:1,id:"app.bsky.feed.getPostThread",defs:{main:{type:"query",description:"Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record."},depth:{type:"integer",description:"How many levels of reply depth should be included in response.",default:6,minimum:0,maximum:1e3},parentHeight:{type:"integer",description:"How many levels of parent (and grandparent, etc) post to include.",default:80,minimum:0,maximum:1e3}}},output:{encoding:"application/json",schema:{type:"object",required:["thread"],properties:{thread:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"}}}},errors:[{name:"NotFound"}]}}},AppBskyFeedGetQuotes:{lexicon:1,id:"app.bsky.feed.getQuotes",defs:{main:{type:"query",description:"Get a list of quotes for a given post.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) of post record"},cid:{type:"string",format:"cid",description:"If supplied, filters to quotes of specific version (by CID) of the post record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","posts"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}}}}},AppBskyFeedGetRepostedBy:{lexicon:1,id:"app.bsky.feed.getRepostedBy",defs:{main:{type:"query",description:"Get a list of reposts for a given post.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) of post record"},cid:{type:"string",format:"cid",description:"If supplied, filters to reposts of specific version (by CID) of the post record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","repostedBy"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},repostedBy:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyFeedGetSuggestedFeeds:{lexicon:1,id:"app.bsky.feed.getSuggestedFeeds",defs:{main:{type:"query",description:"Get a list of suggested feeds (feed generators) for the requesting account.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetTimeline:{lexicon:1,id:"app.bsky.feed.getTimeline",defs:{main:{type:"query",description:"Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.",parameters:{type:"params",properties:{algorithm:{type:"string",description:"Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}}}}},AppBskyFeedLike:{lexicon:1,id:"app.bsky.feed.like",defs:{main:{type:"record",description:"Record declaring a 'like' of a piece of subject content.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},AppBskyFeedPost:{lexicon:1,id:"app.bsky.feed.post",defs:{main:{type:"record",description:"Record containing a Bluesky post.",key:"tid",record:{type:"object",required:["text","createdAt"],properties:{text:{type:"string",maxLength:3e3,maxGraphemes:300,description:"The primary post content. May be an empty string, if there are embeds."},entities:{type:"array",description:"DEPRECATED: replaced by app.bsky.richtext.facet.",items:{type:"ref",ref:"lex:app.bsky.feed.post#entity"}},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},reply:{type:"ref",ref:"lex:app.bsky.feed.post#replyRef"},embed:{type:"union",refs:["lex:app.bsky.embed.images","lex:app.bsky.embed.video","lex:app.bsky.embed.external","lex:app.bsky.embed.record","lex:app.bsky.embed.recordWithMedia"]},langs:{type:"array",description:"Indicates human language of post primary text content.",maxLength:3,items:{type:"string",format:"language"}},labels:{type:"union",description:"Self-label values for this post. Effectively content warnings.",refs:["lex:com.atproto.label.defs#selfLabels"]},tags:{type:"array",description:"Additional hashtags, in addition to any included in post text and facets.",maxLength:8,items:{type:"string",maxLength:640,maxGraphemes:64}},createdAt:{type:"string",format:"datetime",description:"Client-declared timestamp when this post was originally created."}}}},replyRef:{type:"object",required:["root","parent"],properties:{root:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},parent:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},entity:{type:"object",description:"Deprecated: use facets instead.",required:["index","type","value"],properties:{index:{type:"ref",ref:"lex:app.bsky.feed.post#textSlice"},type:{type:"string",description:"Expected values are 'mention' and 'link'."},value:{type:"string"}}},textSlice:{type:"object",description:"Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.",required:["start","end"],properties:{start:{type:"integer",minimum:0},end:{type:"integer",minimum:0}}}}},AppBskyFeedPostgate:{lexicon:1,id:"app.bsky.feed.postgate",defs:{main:{type:"record",key:"tid",description:"Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.",record:{type:"object",required:["post","createdAt"],properties:{createdAt:{type:"string",format:"datetime"},post:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the post record."},detachedEmbeddingUris:{type:"array",maxLength:50,items:{type:"string",format:"at-uri"},description:"List of AT-URIs embedding this post that the author has detached from."},embeddingRules:{description:"List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}}}}},disableRule:{type:"object",description:"Disables embedding of this post.",properties:{}}}},AppBskyFeedRepost:{lexicon:1,id:"app.bsky.feed.repost",defs:{main:{description:"Record representing a 'repost' of an existing Bluesky post.",type:"record",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},AppBskyFeedSearchPosts:{lexicon:1,id:"app.bsky.feed.searchPosts",defs:{main:{type:"query",description:"Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},sort:{type:"string",knownValues:["top","latest"],default:"latest",description:"Specifies the ranking order of results."},since:{type:"string",description:"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."},until:{type:"string",description:"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."},mentions:{type:"string",format:"at-identifier",description:"Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."},author:{type:"string",format:"at-identifier",description:"Filter to posts by the given account. Handles are resolved to DID before query-time."},lang:{type:"string",format:"language",description:"Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."},domain:{type:"string",description:"Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."},url:{type:"string",format:"uri",description:"Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."},tag:{type:"array",items:{type:"string",maxLength:640,maxGraphemes:64},description:"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyFeedSendInteractions:{lexicon:1,id:"app.bsky.feed.sendInteractions",defs:{main:{type:"procedure",description:"Send information about interactions with feed items back to the feed generator that served them.",input:{encoding:"application/json",schema:{type:"object",required:["interactions"],properties:{interactions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#interaction"}}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},AppBskyFeedThreadgate:{lexicon:1,id:"app.bsky.feed.threadgate",defs:{main:{type:"record",key:"tid",description:"Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.",record:{type:"object",required:["post","createdAt"],properties:{post:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the post record."},allow:{description:"List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}},createdAt:{type:"string",format:"datetime"},hiddenReplies:{type:"array",maxLength:50,items:{type:"string",format:"at-uri"},description:"List of hidden reply URIs."}}}},mentionRule:{type:"object",description:"Allow replies from actors mentioned in your post.",properties:{}},followerRule:{type:"object",description:"Allow replies from actors who follow you.",properties:{}},followingRule:{type:"object",description:"Allow replies from actors you follow.",properties:{}},listRule:{type:"object",description:"Allow replies from actors on a list.",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}},AppBskyGraphBlock:{lexicon:1,id:"app.bsky.graph.block",defs:{main:{type:"record",description:"Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"did",description:"DID of the account to be blocked."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphDefs:{lexicon:1,id:"app.bsky.graph.defs",defs:{listViewBasic:{type:"object",required:["uri","cid","name","purpose"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},name:{type:"string",maxLength:64,minLength:1},purpose:{type:"ref",ref:"lex:app.bsky.graph.defs#listPurpose"},avatar:{type:"string",format:"uri"},listItemCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewerState"},indexedAt:{type:"string",format:"datetime"}}},listView:{type:"object",required:["uri","cid","creator","name","purpose","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},name:{type:"string",maxLength:64,minLength:1},purpose:{type:"ref",ref:"lex:app.bsky.graph.defs#listPurpose"},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"string",format:"uri"},listItemCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewerState"},indexedAt:{type:"string",format:"datetime"}}},listItemView:{type:"object",required:["uri","subject"],properties:{uri:{type:"string",format:"at-uri"},subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}},starterPackView:{type:"object",required:["uri","cid","record","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},list:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},listItemsSample:{type:"array",maxLength:12,items:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}},feeds:{type:"array",maxLength:3,items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}},joinedWeekCount:{type:"integer",minimum:0},joinedAllTimeCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"}}},starterPackViewBasic:{type:"object",required:["uri","cid","record","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},listItemCount:{type:"integer",minimum:0},joinedWeekCount:{type:"integer",minimum:0},joinedAllTimeCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"}}},listPurpose:{type:"string",knownValues:["app.bsky.graph.defs#modlist","app.bsky.graph.defs#curatelist","app.bsky.graph.defs#referencelist"]},modlist:{type:"token",description:"A list of actors to apply an aggregate moderation action (mute/block) on."},curatelist:{type:"token",description:"A list of actors used for curation purposes such as list feeds or interaction gating."},referencelist:{type:"token",description:"A list of actors used for only for reference purposes such as within a starter pack."},listViewerState:{type:"object",properties:{muted:{type:"boolean"},blocked:{type:"string",format:"at-uri"}}},notFoundActor:{type:"object",description:"indicates that a handle or DID could not be resolved",required:["actor","notFound"],properties:{actor:{type:"string",format:"at-identifier"},notFound:{type:"boolean",const:!0}}},relationship:{type:"object",description:"lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",required:["did"],properties:{did:{type:"string",format:"did"},following:{type:"string",format:"at-uri",description:"if the actor follows this DID, this is the AT-URI of the follow record"},followedBy:{type:"string",format:"at-uri",description:"if the actor is followed by this DID, contains the AT-URI of the follow record"}}}}},AppBskyGraphFollow:{lexicon:1,id:"app.bsky.graph.follow",defs:{main:{type:"record",description:"Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphGetActorStarterPacks:{lexicon:1,id:"app.bsky.graph.getActorStarterPacks",defs:{main:{type:"query",description:"Get a list of starter packs created by the actor.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphGetBlocks:{lexicon:1,id:"app.bsky.graph.getBlocks",defs:{main:{type:"query",description:"Enumerates which accounts the requesting account is currently blocking. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["blocks"],properties:{cursor:{type:"string"},blocks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetFollowers:{lexicon:1,id:"app.bsky.graph.getFollowers",defs:{main:{type:"query",description:"Enumerates accounts which follow a specified account (actor).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","followers"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},followers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetFollows:{lexicon:1,id:"app.bsky.graph.getFollows",defs:{main:{type:"query",description:"Enumerates accounts which a specified account (actor) follows.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","follows"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},follows:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetKnownFollowers:{lexicon:1,id:"app.bsky.graph.getKnownFollowers",defs:{main:{type:"query",description:"Enumerates accounts which follow a specified account (actor) and are followed by the viewer.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","followers"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},followers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetList:{lexicon:1,id:"app.bsky.graph.getList",defs:{main:{type:"query",description:"Gets a 'view' (with additional context) of a specified list.",parameters:{type:"params",required:["list"],properties:{list:{type:"string",format:"at-uri",description:"Reference (AT-URI) of the list record to hydrate."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["list","items"],properties:{cursor:{type:"string"},list:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"},items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}}}}}}}},AppBskyGraphGetListBlocks:{lexicon:1,id:"app.bsky.graph.getListBlocks",defs:{main:{type:"query",description:"Get mod lists that the requesting account (actor) is blocking. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetListMutes:{lexicon:1,id:"app.bsky.graph.getListMutes",defs:{main:{type:"query",description:"Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetLists:{lexicon:1,id:"app.bsky.graph.getLists",defs:{main:{type:"query",description:"Enumerates the lists created by a specified account (actor).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"The account (actor) to enumerate lists from."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetMutes:{lexicon:1,id:"app.bsky.graph.getMutes",defs:{main:{type:"query",description:"Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["mutes"],properties:{cursor:{type:"string"},mutes:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetRelationships:{lexicon:1,id:"app.bsky.graph.getRelationships",defs:{main:{type:"query",description:"Enumerates public relationships between one account, and a list of other accounts. Does not require auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"Primary account requesting relationships for."},others:{type:"array",description:"List of 'other' accounts to be related back to the primary.",maxLength:30,items:{type:"string",format:"at-identifier"}}}},output:{encoding:"application/json",schema:{type:"object",required:["relationships"],properties:{actor:{type:"string",format:"did"},relationships:{type:"array",items:{type:"union",refs:["lex:app.bsky.graph.defs#relationship","lex:app.bsky.graph.defs#notFoundActor"]}}}}},errors:[{name:"ActorNotFound",description:"the primary actor at-identifier could not be resolved"}]}}},AppBskyGraphGetStarterPack:{lexicon:1,id:"app.bsky.graph.getStarterPack",defs:{main:{type:"query",description:"Gets a view of a starter pack.",parameters:{type:"params",required:["starterPack"],properties:{starterPack:{type:"string",format:"at-uri",description:"Reference (AT-URI) of the starter pack record."}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPack"],properties:{starterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}},AppBskyGraphGetStarterPacks:{lexicon:1,id:"app.bsky.graph.getStarterPacks",defs:{main:{type:"query",description:"Get views for a list of starter packs.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",items:{type:"string",format:"at-uri"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphGetSuggestedFollowsByActor:{lexicon:1,id:"app.bsky.graph.getSuggestedFollowsByActor",defs:{main:{type:"query",description:"Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}},output:{encoding:"application/json",schema:{type:"object",required:["suggestions"],properties:{suggestions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},isFallback:{type:"boolean",description:"If true, response has fallen-back to generic results, and is not scoped using relativeToDid",default:!1},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyGraphList:{lexicon:1,id:"app.bsky.graph.list",defs:{main:{type:"record",description:"Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.",key:"tid",record:{type:"object",required:["name","purpose","createdAt"],properties:{purpose:{type:"ref",description:"Defines the purpose of the list (aka, moderation-oriented or curration-oriented)",ref:"lex:app.bsky.graph.defs#listPurpose"},name:{type:"string",maxLength:64,minLength:1,description:"Display name for list; can not be empty."},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"blob",accept:["image/png","image/jpeg"],maxSize:1e6},labels:{type:"union",refs:["lex:com.atproto.label.defs#selfLabels"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphListblock:{lexicon:1,id:"app.bsky.graph.listblock",defs:{main:{type:"record",description:"Record representing a block relationship against an entire an entire list of accounts (actors).",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the mod list record."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphListitem:{lexicon:1,id:"app.bsky.graph.listitem",defs:{main:{type:"record",description:"Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.",key:"tid",record:{type:"object",required:["subject","list","createdAt"],properties:{subject:{type:"string",format:"did",description:"The account which is included on the list."},list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record (app.bsky.graph.list)."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphMuteActor:{lexicon:1,id:"app.bsky.graph.muteActor",defs:{main:{type:"procedure",description:"Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}}}}}},AppBskyGraphMuteActorList:{lexicon:1,id:"app.bsky.graph.muteActorList",defs:{main:{type:"procedure",description:"Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphMuteThread:{lexicon:1,id:"app.bsky.graph.muteThread",defs:{main:{type:"procedure",description:"Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphSearchStarterPacks:{lexicon:1,id:"app.bsky.graph.searchStarterPacks",defs:{main:{type:"query",description:"Find starter packs matching search criteria. Does not require auth.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphStarterpack:{lexicon:1,id:"app.bsky.graph.starterpack",defs:{main:{type:"record",description:"Record defining a starter pack of actors and feeds for new users.",key:"tid",record:{type:"object",required:["name","list","createdAt"],properties:{name:{type:"string",maxGraphemes:50,maxLength:500,minLength:1,description:"Display name for starter pack; can not be empty."},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record."},feeds:{type:"array",maxLength:3,items:{type:"ref",ref:"lex:app.bsky.graph.starterpack#feedItem"}},createdAt:{type:"string",format:"datetime"}}}},feedItem:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}}}},AppBskyGraphUnmuteActor:{lexicon:1,id:"app.bsky.graph.unmuteActor",defs:{main:{type:"procedure",description:"Unmutes the specified account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}}}}}},AppBskyGraphUnmuteActorList:{lexicon:1,id:"app.bsky.graph.unmuteActorList",defs:{main:{type:"procedure",description:"Unmutes the specified list of accounts. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphUnmuteThread:{lexicon:1,id:"app.bsky.graph.unmuteThread",defs:{main:{type:"procedure",description:"Unmutes the specified thread. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphVerification:{lexicon:1,id:"app.bsky.graph.verification",defs:{main:{type:"record",description:"Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.",key:"tid",record:{type:"object",required:["subject","handle","displayName","createdAt"],properties:{subject:{description:"DID of the subject the verification applies to.",type:"string",format:"did"},handle:{description:"Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.",type:"string",format:"handle"},displayName:{description:"Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.",type:"string"},createdAt:{description:"Date of when the verification was created.",type:"string",format:"datetime"}}}}}},AppBskyLabelerDefs:{lexicon:1,id:"app.bsky.labeler.defs",defs:{labelerView:{type:"object",required:["uri","cid","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},likeCount:{type:"integer",minimum:0},viewer:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerViewerState"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},labelerViewDetailed:{type:"object",required:["uri","cid","creator","policies","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},policies:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerPolicies"},likeCount:{type:"integer",minimum:0},viewer:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerViewerState"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},reasonTypes:{description:"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}},subjectTypes:{description:"The set of subject types (account, record, etc) this service accepts reports on.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"}},subjectCollections:{type:"array",description:"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",items:{type:"string",format:"nsid"}}}},labelerViewerState:{type:"object",properties:{like:{type:"string",format:"at-uri"}}},labelerPolicies:{type:"object",required:["labelValues"],properties:{labelValues:{type:"array",description:"The label values which this labeler publishes. May include global or custom labels.",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValue"}},labelValueDefinitions:{type:"array",description:"Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValueDefinition"}}}}}},AppBskyLabelerGetServices:{lexicon:1,id:"app.bsky.labeler.getServices",defs:{main:{type:"query",description:"Get information about a list of labeler services.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},detailed:{type:"boolean",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["views"],properties:{views:{type:"array",items:{type:"union",refs:["lex:app.bsky.labeler.defs#labelerView","lex:app.bsky.labeler.defs#labelerViewDetailed"]}}}}}}}},AppBskyLabelerService:{lexicon:1,id:"app.bsky.labeler.service",defs:{main:{type:"record",description:"A declaration of the existence of labeler service.",key:"literal:self",record:{type:"object",required:["policies","createdAt"],properties:{policies:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerPolicies"},labels:{type:"union",refs:["lex:com.atproto.label.defs#selfLabels"]},createdAt:{type:"string",format:"datetime"},reasonTypes:{description:"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}},subjectTypes:{description:"The set of subject types (account, record, etc) this service accepts reports on.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"}},subjectCollections:{type:"array",description:"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",items:{type:"string",format:"nsid"}}}}}}},AppBskyNotificationDefs:{lexicon:1,id:"app.bsky.notification.defs",defs:{recordDeleted:{type:"object",properties:{}},chatPreference:{type:"object",required:["filter","push"],properties:{filter:{type:"string",knownValues:["all","accepted"]},push:{type:"boolean"}}},filterablePreference:{type:"object",required:["filter","list","push"],properties:{filter:{type:"string",knownValues:["all","follows"]},list:{type:"boolean"},push:{type:"boolean"}}},preference:{type:"object",required:["list","push"],properties:{list:{type:"boolean"},push:{type:"boolean"}}},preferences:{type:"object",required:["chat","follow","like","likeViaRepost","mention","quote","reply","repost","repostViaRepost","starterpackJoined","subscribedPost","unverified","verified"],properties:{chat:{type:"ref",ref:"lex:app.bsky.notification.defs#chatPreference"},follow:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},like:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},likeViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},mention:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},quote:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},reply:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repostViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},starterpackJoined:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},subscribedPost:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},unverified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},verified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"}}}}},AppBskyNotificationGetPreferences:{lexicon:1,id:"app.bsky.notification.getPreferences",defs:{main:{type:"query",description:"Get notification-related preferences for an account. Requires auth.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.notification.defs#preferences"}}}}}}},AppBskyNotificationGetUnreadCount:{lexicon:1,id:"app.bsky.notification.getUnreadCount",defs:{main:{type:"query",description:"Count the number of unread notifications for the requesting account. Requires auth.",parameters:{type:"params",properties:{priority:{type:"boolean"},seenAt:{type:"string",format:"datetime"}}},output:{encoding:"application/json",schema:{type:"object",required:["count"],properties:{count:{type:"integer"}}}}}}},AppBskyNotificationListNotifications:{lexicon:1,id:"app.bsky.notification.listNotifications",defs:{main:{type:"query",description:"Enumerate notifications for the requesting account. Requires auth.",parameters:{type:"params",properties:{reasons:{description:"Notification reasons to include in response.",type:"array",items:{type:"string",description:"A reason that matches the reason property of #notification."}},limit:{type:"integer",minimum:1,maximum:100,default:50},priority:{type:"boolean"},cursor:{type:"string"},seenAt:{type:"string",format:"datetime"}}},output:{encoding:"application/json",schema:{type:"object",required:["notifications"],properties:{cursor:{type:"string"},notifications:{type:"array",items:{type:"ref",ref:"lex:app.bsky.notification.listNotifications#notification"}},priority:{type:"boolean"},seenAt:{type:"string",format:"datetime"}}}}},notification:{type:"object",required:["uri","cid","author","reason","record","isRead","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},reason:{type:"string",description:"The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.",knownValues:["like","repost","follow","mention","reply","quote","starterpack-joined","verified","unverified","like-via-repost","repost-via-repost"]},reasonSubject:{type:"string",format:"at-uri"},record:{type:"unknown"},isRead:{type:"boolean"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}},AppBskyNotificationPutPreferences:{lexicon:1,id:"app.bsky.notification.putPreferences",defs:{main:{type:"procedure",description:"Set notification-related preferences for an account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["priority"],properties:{priority:{type:"boolean"}}}}}}},AppBskyNotificationPutPreferencesV2:{lexicon:1,id:"app.bsky.notification.putPreferencesV2",defs:{main:{type:"procedure",description:"Set notification-related preferences for an account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",properties:{chat:{type:"ref",ref:"lex:app.bsky.notification.defs#chatPreference"},follow:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},like:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},likeViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},mention:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},quote:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},reply:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repostViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},starterpackJoined:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},subscribedPost:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},unverified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},verified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"}}}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.notification.defs#preferences"}}}}}}},AppBskyNotificationRegisterPush:{lexicon:1,id:"app.bsky.notification.registerPush",defs:{main:{type:"procedure",description:"Register to receive push notifications, via a specified service, for the requesting account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["serviceDid","token","platform","appId"],properties:{serviceDid:{type:"string",format:"did"},token:{type:"string"},platform:{type:"string",knownValues:["ios","android","web"]},appId:{type:"string"}}}}}}},AppBskyNotificationUpdateSeen:{lexicon:1,id:"app.bsky.notification.updateSeen",defs:{main:{type:"procedure",description:"Notify server that the requesting account has seen notifications. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["seenAt"],properties:{seenAt:{type:"string",format:"datetime"}}}}}}},AppBskyRichtextFacet:{lexicon:1,id:"app.bsky.richtext.facet",defs:{main:{type:"object",description:"Annotation of a sub-string within rich text.",required:["index","features"],properties:{index:{type:"ref",ref:"lex:app.bsky.richtext.facet#byteSlice"},features:{type:"array",items:{type:"union",refs:["lex:app.bsky.richtext.facet#mention","lex:app.bsky.richtext.facet#link","lex:app.bsky.richtext.facet#tag"]}}}},mention:{type:"object",description:"Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",required:["did"],properties:{did:{type:"string",format:"did"}}},link:{type:"object",description:"Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",required:["uri"],properties:{uri:{type:"string",format:"uri"}}},tag:{type:"object",description:"Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').",required:["tag"],properties:{tag:{type:"string",maxLength:640,maxGraphemes:64}}},byteSlice:{type:"object",description:"Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.",required:["byteStart","byteEnd"],properties:{byteStart:{type:"integer",minimum:0},byteEnd:{type:"integer",minimum:0}}}}},AppBskyUnspeccedDefs:{lexicon:1,id:"app.bsky.unspecced.defs",defs:{skeletonSearchPost:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},skeletonSearchActor:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},skeletonSearchStarterPack:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},trendingTopic:{type:"object",required:["topic","link"],properties:{topic:{type:"string"},displayName:{type:"string"},description:{type:"string"},link:{type:"string"}}},skeletonTrend:{type:"object",required:["topic","displayName","link","startedAt","postCount","dids"],properties:{topic:{type:"string"},displayName:{type:"string"},link:{type:"string"},startedAt:{type:"string",format:"datetime"},postCount:{type:"integer"},status:{type:"string",knownValues:["hot"]},category:{type:"string"},dids:{type:"array",items:{type:"string",format:"did"}}}},trendView:{type:"object",required:["topic","displayName","link","startedAt","postCount","actors"],properties:{topic:{type:"string"},displayName:{type:"string"},link:{type:"string"},startedAt:{type:"string",format:"datetime"},postCount:{type:"integer"},status:{type:"string",knownValues:["hot"]},category:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}},threadItemPost:{type:"object",required:["post","moreParents","moreReplies","opThread","hiddenByThreadgate","mutedByViewer"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},moreParents:{type:"boolean",description:"This post has more parents that were not present in the response. This is just a boolean, without the number of parents."},moreReplies:{type:"integer",description:"This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate."},opThread:{type:"boolean",description:"This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread."},hiddenByThreadgate:{type:"boolean",description:"The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread."},mutedByViewer:{type:"boolean",description:"This is by an account muted by the viewer requesting it."}}},threadItemNoUnauthenticated:{type:"object",properties:{}},threadItemNotFound:{type:"object",properties:{}},threadItemBlocked:{type:"object",required:["author"],properties:{author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}}}},AppBskyUnspeccedGetConfig:{lexicon:1,id:"app.bsky.unspecced.getConfig",defs:{main:{type:"query",description:"Get miscellaneous runtime configuration.",output:{encoding:"application/json",schema:{type:"object",required:[],properties:{checkEmailConfirmed:{type:"boolean"},liveNow:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.getConfig#liveNowConfig"}}}}}},liveNowConfig:{type:"object",required:["did","domains"],properties:{did:{type:"string",format:"did"},domains:{type:"array",items:{type:"string"}}}}}},AppBskyUnspeccedGetPopularFeedGenerators:{lexicon:1,id:"app.bsky.unspecced.getPopularFeedGenerators",defs:{main:{type:"query",description:"An unspecced view of globally popular feed generators.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},query:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyUnspeccedGetPostThreadOtherV2:{lexicon:1,id:"app.bsky.unspecced.getPostThreadOtherV2",defs:{main:{type:"query",description:"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["anchor"],properties:{anchor:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record. This is the anchor post."},prioritizeFollowedUsers:{type:"boolean",description:"Whether to prioritize posts from followed users. It only has effect when the user is authenticated.",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["thread"],properties:{thread:{type:"array",description:"A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.",items:{type:"ref",ref:"lex:app.bsky.unspecced.getPostThreadOtherV2#threadItem"}}}}}},threadItem:{type:"object",required:["uri","depth","value"],properties:{uri:{type:"string",format:"at-uri"},depth:{type:"integer",description:"The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths."},value:{type:"union",refs:["lex:app.bsky.unspecced.defs#threadItemPost"]}}}}},AppBskyUnspeccedGetPostThreadV2:{lexicon:1,id:"app.bsky.unspecced.getPostThreadV2",defs:{main:{type:"query",description:"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["anchor"],properties:{anchor:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post."},above:{type:"boolean",description:"Whether to include parents above the anchor.",default:!0},below:{type:"integer",description:"How many levels of replies to include below the anchor.",default:6,minimum:0,maximum:20},branchingFactor:{type:"integer",description:"Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated).",default:10,minimum:0,maximum:100},prioritizeFollowedUsers:{type:"boolean",description:"Whether to prioritize posts from followed users. It only has effect when the user is authenticated.",default:!1},sort:{type:"string",description:"Sorting for the thread replies.",knownValues:["newest","oldest","top"],default:"oldest"}}},output:{encoding:"application/json",schema:{type:"object",required:["thread","hasOtherReplies"],properties:{thread:{type:"array",description:"A flat list of thread items. The depth of each item is indicated by the depth property inside the item.",items:{type:"ref",ref:"lex:app.bsky.unspecced.getPostThreadV2#threadItem"}},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"},hasOtherReplies:{type:"boolean",description:"Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them."}}}}},threadItem:{type:"object",required:["uri","depth","value"],properties:{uri:{type:"string",format:"at-uri"},depth:{type:"integer",description:"The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths."},value:{type:"union",refs:["lex:app.bsky.unspecced.defs#threadItemPost","lex:app.bsky.unspecced.defs#threadItemNoUnauthenticated","lex:app.bsky.unspecced.defs#threadItemNotFound","lex:app.bsky.unspecced.defs#threadItemBlocked"]}}}}},AppBskyUnspeccedGetSuggestedFeeds:{lexicon:1,id:"app.bsky.unspecced.getSuggestedFeeds",defs:{main:{type:"query",description:"Get a list of suggested feeds",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyUnspeccedGetSuggestedFeedsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedFeedsSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetSuggestedStarterPacks:{lexicon:1,id:"app.bsky.unspecced.getSuggestedStarterPacks",defs:{main:{type:"query",description:"Get a list of suggested starterpacks",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}}},AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetSuggestedUsers:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsers",defs:{main:{type:"query",description:"Get a list of suggested users",parameters:{type:"params",properties:{category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyUnspeccedGetSuggestedUsersSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}}}}}},AppBskyUnspeccedGetSuggestionsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestionsSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},relativeToDid:{type:"string",format:"did",description:"DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer."}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchActor"}},relativeToDid:{type:"string",format:"did",description:"DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer."},recId:{type:"integer",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetTaggedSuggestions:{lexicon:1,id:"app.bsky.unspecced.getTaggedSuggestions",defs:{main:{type:"query",description:"Get a list of suggestions (feeds and users) tagged with categories",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["suggestions"],properties:{suggestions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.getTaggedSuggestions#suggestion"}}}}}},suggestion:{type:"object",required:["tag","subjectType","subject"],properties:{tag:{type:"string"},subjectType:{type:"string",knownValues:["actor","feed"]},subject:{type:"string",format:"uri"}}}}},AppBskyUnspeccedGetTrendingTopics:{lexicon:1,id:"app.bsky.unspecced.getTrendingTopics",defs:{main:{type:"query",description:"Get a list of trending topics",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["topics","suggested"],properties:{topics:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendingTopic"}},suggested:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendingTopic"}}}}}}}},AppBskyUnspeccedGetTrends:{lexicon:1,id:"app.bsky.unspecced.getTrends",defs:{main:{type:"query",description:"Get the current trends on the network",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["trends"],properties:{trends:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendView"}}}}}}}},AppBskyUnspeccedGetTrendsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getTrendsSkeleton",defs:{main:{type:"query",description:"Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["trends"],properties:{trends:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonTrend"}}}}}}}},AppBskyUnspeccedSearchActorsSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchActorsSkeleton",defs:{main:{type:"query",description:"Backend Actors (profile) search, returns only skeleton.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},typeahead:{type:"boolean",description:"If true, acts as fast/simple 'typeahead' query."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchActor"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyUnspeccedSearchPostsSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchPostsSkeleton",defs:{main:{type:"query",description:"Backend Posts search, returns only skeleton",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},sort:{type:"string",knownValues:["top","latest"],default:"latest",description:"Specifies the ranking order of results."},since:{type:"string",description:"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."},until:{type:"string",description:"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."},mentions:{type:"string",format:"at-identifier",description:"Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."},author:{type:"string",format:"at-identifier",description:"Filter to posts by the given account. Handles are resolved to DID before query-time."},lang:{type:"string",format:"language",description:"Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."},domain:{type:"string",description:"Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."},url:{type:"string",format:"uri",description:"Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."},tag:{type:"array",items:{type:"string",maxLength:640,maxGraphemes:64},description:"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchPost"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyUnspeccedSearchStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchStarterPacksSkeleton",defs:{main:{type:"query",description:"Backend Starter Pack search, returns only skeleton.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchStarterPack"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyVideoDefs:{lexicon:1,id:"app.bsky.video.defs",defs:{jobStatus:{type:"object",required:["jobId","did","state"],properties:{jobId:{type:"string"},did:{type:"string",format:"did"},state:{type:"string",description:"The state of the video processing job. All values not listed as a known value indicate that the job is in process.",knownValues:["JOB_STATE_COMPLETED","JOB_STATE_FAILED"]},progress:{type:"integer",minimum:0,maximum:100,description:"Progress within the current processing state."},blob:{type:"blob"},error:{type:"string"},message:{type:"string"}}}}},AppBskyVideoGetJobStatus:{lexicon:1,id:"app.bsky.video.getJobStatus",defs:{main:{type:"query",description:"Get status details for a video processing job.",parameters:{type:"params",required:["jobId"],properties:{jobId:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["jobStatus"],properties:{jobStatus:{type:"ref",ref:"lex:app.bsky.video.defs#jobStatus"}}}}}}},AppBskyVideoGetUploadLimits:{lexicon:1,id:"app.bsky.video.getUploadLimits",defs:{main:{type:"query",description:"Get video upload limits for the authenticated user.",output:{encoding:"application/json",schema:{type:"object",required:["canUpload"],properties:{canUpload:{type:"boolean"},remainingDailyVideos:{type:"integer"},remainingDailyBytes:{type:"integer"},message:{type:"string"},error:{type:"string"}}}}}}},AppBskyVideoUploadVideo:{lexicon:1,id:"app.bsky.video.uploadVideo",defs:{main:{type:"procedure",description:"Upload a video to be processed then stored on the PDS.",input:{encoding:"video/mp4"},output:{encoding:"application/json",schema:{type:"object",required:["jobStatus"],properties:{jobStatus:{type:"ref",ref:"lex:app.bsky.video.defs#jobStatus"}}}}}}},ChatBskyActorDeclaration:{lexicon:1,id:"chat.bsky.actor.declaration",defs:{main:{type:"record",description:"A declaration of a Bluesky chat account.",key:"literal:self",record:{type:"object",required:["allowIncoming"],properties:{allowIncoming:{type:"string",knownValues:["all","none","following"]}}}}}},ChatBskyActorDefs:{lexicon:1,id:"chat.bsky.actor.defs",defs:{profileViewBasic:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},chatDisabled:{type:"boolean",description:"Set to true when the actor cannot actively participate in conversations"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"}}}}},ChatBskyActorDeleteAccount:{lexicon:1,id:"chat.bsky.actor.deleteAccount",defs:{main:{type:"procedure",output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ChatBskyActorExportAccountData:{lexicon:1,id:"chat.bsky.actor.exportAccountData",defs:{main:{type:"query",output:{encoding:"application/jsonl"}}}},ChatBskyConvoAcceptConvo:{lexicon:1,id:"chat.bsky.convo.acceptConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{rev:{description:"Rev when the convo was accepted. If not present, the convo was already accepted.",type:"string"}}}}}}},ChatBskyConvoAddReaction:{lexicon:1,id:"chat.bsky.convo.addReaction",defs:{main:{type:"procedure",description:"Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId","value"],properties:{convoId:{type:"string"},messageId:{type:"string"},value:{type:"string",minLength:1,maxLength:64,minGraphemes:1,maxGraphemes:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["message"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}},errors:[{name:"ReactionMessageDeleted",description:"Indicates that the message has been deleted and reactions can no longer be added/removed."},{name:"ReactionLimitReached",description:"Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent."},{name:"ReactionInvalidValue",description:"Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."}]}}},ChatBskyConvoDefs:{lexicon:1,id:"chat.bsky.convo.defs",defs:{messageRef:{type:"object",required:["did","messageId","convoId"],properties:{did:{type:"string",format:"did"},convoId:{type:"string"},messageId:{type:"string"}}},messageInput:{type:"object",required:["text"],properties:{text:{type:"string",maxLength:1e4,maxGraphemes:1e3},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},embed:{type:"union",refs:["lex:app.bsky.embed.record"]}}},messageView:{type:"object",required:["id","rev","text","sender","sentAt"],properties:{id:{type:"string"},rev:{type:"string"},text:{type:"string",maxLength:1e4,maxGraphemes:1e3},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},embed:{type:"union",refs:["lex:app.bsky.embed.record#view"]},reactions:{type:"array",description:"Reactions to this message, in ascending order of creation time.",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageViewSender"},sentAt:{type:"string",format:"datetime"}}},deletedMessageView:{type:"object",required:["id","rev","sender","sentAt"],properties:{id:{type:"string"},rev:{type:"string"},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageViewSender"},sentAt:{type:"string",format:"datetime"}}},messageViewSender:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},reactionView:{type:"object",required:["value","sender","createdAt"],properties:{value:{type:"string"},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionViewSender"},createdAt:{type:"string",format:"datetime"}}},reactionViewSender:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},messageAndReactionView:{type:"object",required:["message","reaction"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}},convoView:{type:"object",required:["id","rev","members","muted","unreadCount"],properties:{id:{type:"string"},rev:{type:"string"},members:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}},lastMessage:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},lastReaction:{type:"union",refs:["lex:chat.bsky.convo.defs#messageAndReactionView"]},muted:{type:"boolean"},status:{type:"string",knownValues:["request","accepted"]},unreadCount:{type:"integer"}}},logBeginConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logAcceptConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logLeaveConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logMuteConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logUnmuteConvo:{type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logCreateMessage:{type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}},logDeleteMessage:{type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}},logReadMessage:{type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}},logAddReaction:{type:"object",required:["rev","convoId","message","reaction"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}},logRemoveReaction:{type:"object",required:["rev","convoId","message","reaction"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}}}},ChatBskyConvoDeleteMessageForSelf:{lexicon:1,id:"chat.bsky.convo.deleteMessageForSelf",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId"],properties:{convoId:{type:"string"},messageId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:chat.bsky.convo.defs#deletedMessageView"}}}}},ChatBskyConvoGetConvo:{lexicon:1,id:"chat.bsky.convo.getConvo",defs:{main:{type:"query",parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetConvoAvailability:{lexicon:1,id:"chat.bsky.convo.getConvoAvailability",defs:{main:{type:"query",description:"Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.",parameters:{type:"params",required:["members"],properties:{members:{type:"array",minLength:1,maxLength:10,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["canChat"],properties:{canChat:{type:"boolean"},convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetConvoForMembers:{lexicon:1,id:"chat.bsky.convo.getConvoForMembers",defs:{main:{type:"query",parameters:{type:"params",required:["members"],properties:{members:{type:"array",minLength:1,maxLength:10,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetLog:{lexicon:1,id:"chat.bsky.convo.getLog",defs:{main:{type:"query",parameters:{type:"params",required:[],properties:{cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["logs"],properties:{cursor:{type:"string"},logs:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#logBeginConvo","lex:chat.bsky.convo.defs#logAcceptConvo","lex:chat.bsky.convo.defs#logLeaveConvo","lex:chat.bsky.convo.defs#logMuteConvo","lex:chat.bsky.convo.defs#logUnmuteConvo","lex:chat.bsky.convo.defs#logCreateMessage","lex:chat.bsky.convo.defs#logDeleteMessage","lex:chat.bsky.convo.defs#logReadMessage","lex:chat.bsky.convo.defs#logAddReaction","lex:chat.bsky.convo.defs#logRemoveReaction"]}}}}}}}},ChatBskyConvoGetMessages:{lexicon:1,id:"chat.bsky.convo.getMessages",defs:{main:{type:"query",parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["messages"],properties:{cursor:{type:"string"},messages:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}}}}}}},ChatBskyConvoLeaveConvo:{lexicon:1,id:"chat.bsky.convo.leaveConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convoId","rev"],properties:{convoId:{type:"string"},rev:{type:"string"}}}}}}},ChatBskyConvoListConvos:{lexicon:1,id:"chat.bsky.convo.listConvos",defs:{main:{type:"query",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},readState:{type:"string",knownValues:["unread"]},status:{type:"string",knownValues:["request","accepted"]}}},output:{encoding:"application/json",schema:{type:"object",required:["convos"],properties:{cursor:{type:"string"},convos:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}}},ChatBskyConvoMuteConvo:{lexicon:1,id:"chat.bsky.convo.muteConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoRemoveReaction:{lexicon:1,id:"chat.bsky.convo.removeReaction",defs:{main:{type:"procedure",description:"Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId","value"],properties:{convoId:{type:"string"},messageId:{type:"string"},value:{type:"string",minLength:1,maxLength:64,minGraphemes:1,maxGraphemes:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["message"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}},errors:[{name:"ReactionMessageDeleted",description:"Indicates that the message has been deleted and reactions can no longer be added/removed."},{name:"ReactionInvalidValue",description:"Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."}]}}},ChatBskyConvoSendMessage:{lexicon:1,id:"chat.bsky.convo.sendMessage",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId","message"],properties:{convoId:{type:"string"},message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageInput"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}}},ChatBskyConvoSendMessageBatch:{lexicon:1,id:"chat.bsky.convo.sendMessageBatch",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["items"],properties:{items:{type:"array",maxLength:100,items:{type:"ref",ref:"lex:chat.bsky.convo.sendMessageBatch#batchItem"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}}}},batchItem:{type:"object",required:["convoId","message"],properties:{convoId:{type:"string"},message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageInput"}}}}},ChatBskyConvoUnmuteConvo:{lexicon:1,id:"chat.bsky.convo.unmuteConvo",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoUpdateAllRead:{lexicon:1,id:"chat.bsky.convo.updateAllRead",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",properties:{status:{type:"string",knownValues:["request","accepted"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["updatedCount"],properties:{updatedCount:{description:"The count of updated convos.",type:"integer"}}}}}}},ChatBskyConvoUpdateRead:{lexicon:1,id:"chat.bsky.convo.updateRead",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"},messageId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyModerationGetActorMetadata:{lexicon:1,id:"chat.bsky.moderation.getActorMetadata",defs:{main:{type:"query",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"object",required:["day","month","all"],properties:{day:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"},month:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"},all:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"}}}}},metadata:{type:"object",required:["messagesSent","messagesReceived","convos","convosStarted"],properties:{messagesSent:{type:"integer"},messagesReceived:{type:"integer"},convos:{type:"integer"},convosStarted:{type:"integer"}}}}},ChatBskyModerationGetMessageContext:{lexicon:1,id:"chat.bsky.moderation.getMessageContext",defs:{main:{type:"query",parameters:{type:"params",required:["messageId"],properties:{convoId:{type:"string",description:"Conversation that the message is from. NOTE: this field will eventually be required."},messageId:{type:"string"},before:{type:"integer",default:5},after:{type:"integer",default:5}}},output:{encoding:"application/json",schema:{type:"object",required:["messages"],properties:{messages:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}}}}}}},ChatBskyModerationUpdateActorAccess:{lexicon:1,id:"chat.bsky.moderation.updateActorAccess",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["actor","allowAccess"],properties:{actor:{type:"string",format:"did"},allowAccess:{type:"boolean"},ref:{type:"string"}}}}}}},ToolsOzoneCommunicationCreateTemplate:{lexicon:1,id:"tools.ozone.communication.createTemplate",defs:{main:{type:"procedure",description:"Administrative action to create a new, re-usable communication (email for now) template.",input:{encoding:"application/json",schema:{type:"object",required:["subject","contentMarkdown","name"],properties:{name:{type:"string",description:"Name of the template."},contentMarkdown:{type:"string",description:"Content of the template, markdown supported, can contain variable placeholders."},subject:{type:"string",description:"Subject of the message, used in emails."},lang:{type:"string",format:"language",description:"Message language."},createdBy:{type:"string",format:"did",description:"DID of the user who is creating the template."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}},errors:[{name:"DuplicateTemplateName"}]}}},ToolsOzoneCommunicationDefs:{lexicon:1,id:"tools.ozone.communication.defs",defs:{templateView:{type:"object",required:["id","name","contentMarkdown","disabled","lastUpdatedBy","createdAt","updatedAt"],properties:{id:{type:"string"},name:{type:"string",description:"Name of the template."},subject:{type:"string",description:"Content of the template, can contain markdown and variable placeholders."},contentMarkdown:{type:"string",description:"Subject of the message, used in emails."},disabled:{type:"boolean"},lang:{type:"string",format:"language",description:"Message language."},lastUpdatedBy:{type:"string",format:"did",description:"DID of the user who last updated the template."},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneCommunicationDeleteTemplate:{lexicon:1,id:"tools.ozone.communication.deleteTemplate",defs:{main:{type:"procedure",description:"Delete a communication template.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string"}}}}}}},ToolsOzoneCommunicationListTemplates:{lexicon:1,id:"tools.ozone.communication.listTemplates",defs:{main:{type:"query",description:"Get list of all communication templates.",output:{encoding:"application/json",schema:{type:"object",required:["communicationTemplates"],properties:{communicationTemplates:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}}}}}}}},ToolsOzoneCommunicationUpdateTemplate:{lexicon:1,id:"tools.ozone.communication.updateTemplate",defs:{main:{type:"procedure",description:"Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string",description:"ID of the template to be updated."},name:{type:"string",description:"Name of the template."},lang:{type:"string",format:"language",description:"Message language."},contentMarkdown:{type:"string",description:"Content of the template, markdown supported, can contain variable placeholders."},subject:{type:"string",description:"Subject of the message, used in emails."},updatedBy:{type:"string",format:"did",description:"DID of the user who is updating the template."},disabled:{type:"boolean"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}},errors:[{name:"DuplicateTemplateName"}]}}},ToolsOzoneHostingGetAccountHistory:{lexicon:1,id:"tools.ozone.hosting.getAccountHistory",defs:{main:{type:"query",description:"Get account history, e.g. log of updated email addresses or other identity information.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"},events:{type:"array",items:{type:"string",knownValues:["accountCreated","emailUpdated","emailConfirmed","passwordUpdated","handleUpdated"]}},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string"},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.hosting.getAccountHistory#event"}}}}}},event:{type:"object",required:["details","createdBy","createdAt"],properties:{details:{type:"union",refs:["lex:tools.ozone.hosting.getAccountHistory#accountCreated","lex:tools.ozone.hosting.getAccountHistory#emailUpdated","lex:tools.ozone.hosting.getAccountHistory#emailConfirmed","lex:tools.ozone.hosting.getAccountHistory#passwordUpdated","lex:tools.ozone.hosting.getAccountHistory#handleUpdated"]},createdBy:{type:"string"},createdAt:{type:"string",format:"datetime"}}},accountCreated:{type:"object",required:[],properties:{email:{type:"string"},handle:{type:"string",format:"handle"}}},emailUpdated:{type:"object",required:["email"],properties:{email:{type:"string"}}},emailConfirmed:{type:"object",required:["email"],properties:{email:{type:"string"}}},passwordUpdated:{type:"object",required:[],properties:{}},handleUpdated:{type:"object",required:["handle"],properties:{handle:{type:"string",format:"handle"}}}}},ToolsOzoneModerationDefs:{lexicon:1,id:"tools.ozone.moderation.defs",defs:{modEventView:{type:"object",required:["id","event","subject","subjectBlobCids","createdBy","createdAt"],properties:{id:{type:"integer"},event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore"]},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:chat.bsky.convo.defs#messageRef"]},subjectBlobCids:{type:"array",items:{type:"string"}},createdBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"},creatorHandle:{type:"string"},subjectHandle:{type:"string"}}},modEventViewDetail:{type:"object",required:["id","event","subject","subjectBlobs","createdBy","createdAt"],properties:{id:{type:"integer"},event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore"]},subject:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoView","lex:tools.ozone.moderation.defs#repoViewNotFound","lex:tools.ozone.moderation.defs#recordView","lex:tools.ozone.moderation.defs#recordViewNotFound"]},subjectBlobs:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#blobView"}},createdBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}},subjectStatusView:{type:"object",required:["id","subject","createdAt","updatedAt","reviewState"],properties:{id:{type:"integer"},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:chat.bsky.convo.defs#messageRef"]},hosting:{type:"union",refs:["lex:tools.ozone.moderation.defs#accountHosting","lex:tools.ozone.moderation.defs#recordHosting"]},subjectBlobCids:{type:"array",items:{type:"string",format:"cid"}},subjectRepoHandle:{type:"string"},updatedAt:{type:"string",format:"datetime",description:"Timestamp referencing when the last update was made to the moderation status of the subject"},createdAt:{type:"string",format:"datetime",description:"Timestamp referencing the first moderation status impacting event was emitted on the subject"},reviewState:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectReviewState"},comment:{type:"string",description:"Sticky comment on the subject."},priorityScore:{type:"integer",description:"Numeric value representing the level of priority. Higher score means higher priority.",minimum:0,maximum:100},muteUntil:{type:"string",format:"datetime"},muteReportingUntil:{type:"string",format:"datetime"},lastReviewedBy:{type:"string",format:"did"},lastReviewedAt:{type:"string",format:"datetime"},lastReportedAt:{type:"string",format:"datetime"},lastAppealedAt:{type:"string",format:"datetime",description:"Timestamp referencing when the author of the subject appealed a moderation action"},takendown:{type:"boolean"},appealed:{type:"boolean",description:"True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators."},suspendUntil:{type:"string",format:"datetime"},tags:{type:"array",items:{type:"string"}},accountStats:{description:"Statistics related to the account subject",type:"ref",ref:"lex:tools.ozone.moderation.defs#accountStats"},recordsStats:{description:"Statistics related to the record subjects authored by the subject's account",type:"ref",ref:"lex:tools.ozone.moderation.defs#recordsStats"}}},subjectView:{description:"Detailed view of a subject. For record subjects, the author's repo and profile will be returned.",type:"object",required:["type","subject"],properties:{type:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"},subject:{type:"string"},status:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoViewDetail"},profile:{type:"union",refs:[]},record:{type:"ref",ref:"lex:tools.ozone.moderation.defs#recordViewDetail"}}},accountStats:{description:"Statistics about a particular account subject",type:"object",properties:{reportCount:{description:"Total number of reports on the account",type:"integer"},appealCount:{description:"Total number of appeals against a moderation action on the account",type:"integer"},suspendCount:{description:"Number of times the account was suspended",type:"integer"},escalateCount:{description:"Number of times the account was escalated",type:"integer"},takedownCount:{description:"Number of times the account was taken down",type:"integer"}}},recordsStats:{description:"Statistics about a set of record subject items",type:"object",properties:{totalReports:{description:"Cumulative sum of the number of reports on the items in the set",type:"integer"},reportedCount:{description:"Number of items that were reported at least once",type:"integer"},escalatedCount:{description:"Number of items that were escalated at least once",type:"integer"},appealedCount:{description:"Number of items that were appealed at least once",type:"integer"},subjectCount:{description:"Total number of item in the set",type:"integer"},pendingCount:{description:'Number of item currently in "reviewOpen" or "reviewEscalated" state',type:"integer"},processedCount:{description:'Number of item currently in "reviewNone" or "reviewClosed" state',type:"integer"},takendownCount:{description:"Number of item currently taken down",type:"integer"}}},subjectReviewState:{type:"string",knownValues:["lex:tools.ozone.moderation.defs#reviewOpen","lex:tools.ozone.moderation.defs#reviewEscalated","lex:tools.ozone.moderation.defs#reviewClosed","lex:tools.ozone.moderation.defs#reviewNone"]},reviewOpen:{type:"token",description:"Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator"},reviewEscalated:{type:"token",description:"Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator"},reviewClosed:{type:"token",description:"Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator"},reviewNone:{type:"token",description:"Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it"},modEventTakedown:{type:"object",description:"Take down a subject permanently or temporarily",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the takedown should be in effect before automatically expiring."},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."},policies:{type:"array",maxLength:5,items:{type:"string"},description:"Names/Keywords of the policies that drove the decision."}}},modEventReverseTakedown:{type:"object",description:"Revert take down action on a subject",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventResolveAppeal:{type:"object",description:"Resolve appeal on a subject",properties:{comment:{type:"string",description:"Describe resolution."}}},modEventComment:{type:"object",description:"Add a comment to a subject. An empty comment will clear any previously set sticky comment.",properties:{comment:{type:"string"},sticky:{type:"boolean",description:"Make the comment persistent on the subject"}}},modEventReport:{type:"object",description:"Report a subject",required:["reportType"],properties:{comment:{type:"string"},isReporterMuted:{type:"boolean",description:"Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject."},reportType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}}},modEventLabel:{type:"object",description:"Apply/Negate labels on a subject",required:["createLabelVals","negateLabelVals"],properties:{comment:{type:"string"},createLabelVals:{type:"array",items:{type:"string"}},negateLabelVals:{type:"array",items:{type:"string"}},durationInHours:{type:"integer",description:"Indicates how long the label will remain on the subject. Only applies on labels that are being added."}}},modEventPriorityScore:{type:"object",description:"Set priority score of the subject. Higher score means higher priority.",required:["score"],properties:{comment:{type:"string"},score:{type:"integer",minimum:0,maximum:100}}},modEventAcknowledge:{type:"object",properties:{comment:{type:"string"},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."}}},modEventEscalate:{type:"object",properties:{comment:{type:"string"}}},modEventMute:{type:"object",description:"Mute incoming reports on a subject",required:["durationInHours"],properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the subject should remain muted."}}},modEventUnmute:{type:"object",description:"Unmute action on a subject",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventMuteReporter:{type:"object",description:"Mute incoming reports from an account",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the account should remain muted. Falsy value here means a permanent mute."}}},modEventUnmuteReporter:{type:"object",description:"Unmute incoming reports from an account",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventEmail:{type:"object",description:"Keep a log of outgoing email to a user",required:["subjectLine"],properties:{subjectLine:{type:"string",description:"The subject line of the email sent to the user."},content:{type:"string",description:"The content of the email sent to the user."},comment:{type:"string",description:"Additional comment about the outgoing comm."}}},modEventDivert:{type:"object",description:"Divert a record's blobs to a 3rd party service for further scanning/tagging",properties:{comment:{type:"string"}}},modEventTag:{type:"object",description:"Add/Remove a tag on a subject",required:["add","remove"],properties:{add:{type:"array",items:{type:"string"},description:"Tags to be added to the subject. If already exists, won't be duplicated."},remove:{type:"array",items:{type:"string"},description:"Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated."},comment:{type:"string",description:"Additional comment about added/removed tags."}}},accountEvent:{type:"object",description:"Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp","active"],properties:{comment:{type:"string"},active:{type:"boolean",description:"Indicates that the account has a repository which can be fetched from the host that emitted this event."},status:{type:"string",knownValues:["unknown","deactivated","deleted","takendown","suspended","tombstoned"]},timestamp:{type:"string",format:"datetime"}}},identityEvent:{type:"object",description:"Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp"],properties:{comment:{type:"string"},handle:{type:"string",format:"handle"},pdsHost:{type:"string",format:"uri"},tombstone:{type:"boolean"},timestamp:{type:"string",format:"datetime"}}},recordEvent:{type:"object",description:"Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp","op"],properties:{comment:{type:"string"},op:{type:"string",knownValues:["create","update","delete"]},cid:{type:"string",format:"cid"},timestamp:{type:"string",format:"datetime"}}},repoView:{type:"object",required:["did","handle","relatedRecords","indexedAt","moderation"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invitesDisabled:{type:"boolean"},inviteNote:{type:"string"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoViewDetail:{type:"object",required:["did","handle","relatedRecords","indexedAt","moderation"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderationDetail"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invites:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}},invitesDisabled:{type:"boolean"},inviteNote:{type:"string"},emailConfirmedAt:{type:"string",format:"datetime"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoViewNotFound:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},recordView:{type:"object",required:["uri","cid","value","blobCids","indexedAt","moderation","repo"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"},blobCids:{type:"array",items:{type:"string",format:"cid"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}},recordViewDetail:{type:"object",required:["uri","cid","value","blobs","indexedAt","moderation","repo"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"},blobs:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#blobView"}},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderationDetail"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}},recordViewNotFound:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},moderation:{type:"object",properties:{subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}},moderationDetail:{type:"object",properties:{subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}},blobView:{type:"object",required:["cid","mimeType","size","createdAt"],properties:{cid:{type:"string",format:"cid"},mimeType:{type:"string"},size:{type:"integer"},createdAt:{type:"string",format:"datetime"},details:{type:"union",refs:["lex:tools.ozone.moderation.defs#imageDetails","lex:tools.ozone.moderation.defs#videoDetails"]},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"}}},imageDetails:{type:"object",required:["width","height"],properties:{width:{type:"integer"},height:{type:"integer"}}},videoDetails:{type:"object",required:["width","height","length"],properties:{width:{type:"integer"},height:{type:"integer"},length:{type:"integer"}}},accountHosting:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["takendown","suspended","deleted","deactivated","unknown"]},updatedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},deletedAt:{type:"string",format:"datetime"},deactivatedAt:{type:"string",format:"datetime"},reactivatedAt:{type:"string",format:"datetime"}}},recordHosting:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["deleted","unknown"]},updatedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},deletedAt:{type:"string",format:"datetime"}}},reporterStats:{type:"object",required:["did","accountReportCount","recordReportCount","reportedAccountCount","reportedRecordCount","takendownAccountCount","takendownRecordCount","labeledAccountCount","labeledRecordCount"],properties:{did:{type:"string",format:"did"},accountReportCount:{type:"integer",description:"The total number of reports made by the user on accounts."},recordReportCount:{type:"integer",description:"The total number of reports made by the user on records."},reportedAccountCount:{type:"integer",description:"The total number of accounts reported by the user."},reportedRecordCount:{type:"integer",description:"The total number of records reported by the user."},takendownAccountCount:{type:"integer",description:"The total number of accounts taken down as a result of the user's reports."},takendownRecordCount:{type:"integer",description:"The total number of records taken down as a result of the user's reports."},labeledAccountCount:{type:"integer",description:"The total number of accounts labeled as a result of the user's reports."},labeledRecordCount:{type:"integer",description:"The total number of records labeled as a result of the user's reports."}}}}},ToolsOzoneModerationEmitEvent:{lexicon:1,id:"tools.ozone.moderation.emitEvent",defs:{main:{type:"procedure",description:"Take a moderation action on an actor.",input:{encoding:"application/json",schema:{type:"object",required:["event","subject","createdBy"],properties:{event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore"]},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},subjectBlobCids:{type:"array",items:{type:"string",format:"cid"}},createdBy:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"}},errors:[{name:"SubjectHasAction"}]}}},ToolsOzoneModerationGetEvent:{lexicon:1,id:"tools.ozone.moderation.getEvent",defs:{main:{type:"query",description:"Get details about a moderation event.",parameters:{type:"params",required:["id"],properties:{id:{type:"integer"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventViewDetail"}}}}},ToolsOzoneModerationGetRecord:{lexicon:1,id:"tools.ozone.moderation.getRecord",defs:{main:{type:"query",description:"Get details about a record.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#recordViewDetail"}},errors:[{name:"RecordNotFound"}]}}},ToolsOzoneModerationGetRecords:{lexicon:1,id:"tools.ozone.moderation.getRecords",defs:{main:{type:"query",description:"Get details about some records.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",maxLength:100,items:{type:"string",format:"at-uri"}}}},output:{encoding:"application/json",schema:{type:"object",required:["records"],properties:{records:{type:"array",items:{type:"union",refs:["lex:tools.ozone.moderation.defs#recordViewDetail","lex:tools.ozone.moderation.defs#recordViewNotFound"]}}}}}}}},ToolsOzoneModerationGetRepo:{lexicon:1,id:"tools.ozone.moderation.getRepo",defs:{main:{type:"query",description:"Get details about a repository.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoViewDetail"}},errors:[{name:"RepoNotFound"}]}}},ToolsOzoneModerationGetReporterStats:{lexicon:1,id:"tools.ozone.moderation.getReporterStats",defs:{main:{type:"query",description:"Get reporter stats for a list of users.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",maxLength:100,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["stats"],properties:{stats:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#reporterStats"}}}}}}}},ToolsOzoneModerationGetRepos:{lexicon:1,id:"tools.ozone.moderation.getRepos",defs:{main:{type:"query",description:"Get details about some repositories.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",maxLength:100,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{repos:{type:"array",items:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]}}}}}}}},ToolsOzoneModerationGetSubjects:{lexicon:1,id:"tools.ozone.moderation.getSubjects",defs:{main:{type:"query",description:"Get details about subjects.",parameters:{type:"params",required:["subjects"],properties:{subjects:{type:"array",maxLength:100,minLength:1,items:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subjects"],properties:{subjects:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectView"}}}}}}}},ToolsOzoneModerationQueryEvents:{lexicon:1,id:"tools.ozone.moderation.queryEvents",defs:{main:{type:"query",description:"List moderation events related to a subject.",parameters:{type:"params",properties:{types:{type:"array",items:{type:"string"},description:"The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned."},createdBy:{type:"string",format:"did"},sortDirection:{type:"string",default:"desc",enum:["asc","desc"],description:"Sort direction for the events. Defaults to descending order of created at timestamp."},createdAfter:{type:"string",format:"datetime",description:"Retrieve events created after a given timestamp"},createdBefore:{type:"string",format:"datetime",description:"Retrieve events created before a given timestamp"},subject:{type:"string",format:"uri"},collections:{type:"array",maxLength:20,description:"If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},subjectType:{type:"string",description:"If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",knownValues:["account","record"]},includeAllUserRecords:{type:"boolean",default:!1,description:"If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned."},limit:{type:"integer",minimum:1,maximum:100,default:50},hasComment:{type:"boolean",description:"If true, only events with comments are returned"},comment:{type:"string",description:"If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition."},addedLabels:{type:"array",items:{type:"string"},description:"If specified, only events where all of these labels were added are returned"},removedLabels:{type:"array",items:{type:"string"},description:"If specified, only events where all of these labels were removed are returned"},addedTags:{type:"array",items:{type:"string"},description:"If specified, only events where all of these tags were added are returned"},removedTags:{type:"array",items:{type:"string"},description:"If specified, only events where all of these tags were removed are returned"},reportTypes:{type:"array",items:{type:"string"}},policies:{type:"array",items:{type:"string",description:"If specified, only events where the action policies match any of the given policies are returned"}},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string"},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"}}}}}}}},ToolsOzoneModerationQueryStatuses:{lexicon:1,id:"tools.ozone.moderation.queryStatuses",defs:{main:{type:"query",description:"View moderation statuses of subjects (record or repo).",parameters:{type:"params",properties:{queueCount:{type:"integer",description:"Number of queues being used by moderators. Subjects will be split among all queues."},queueIndex:{type:"integer",description:"Index of the queue to fetch subjects from. Works only when queueCount value is specified."},queueSeed:{type:"string",description:"A seeder to shuffle/balance the queue items."},includeAllUserRecords:{type:"boolean",description:"All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned."},subject:{type:"string",format:"uri",description:"The subject to get the status for."},comment:{type:"string",description:"Search subjects by keyword from comments"},reportedAfter:{type:"string",format:"datetime",description:"Search subjects reported after a given timestamp"},reportedBefore:{type:"string",format:"datetime",description:"Search subjects reported before a given timestamp"},reviewedAfter:{type:"string",format:"datetime",description:"Search subjects reviewed after a given timestamp"},hostingDeletedAfter:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was deleted after a given timestamp"},hostingDeletedBefore:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was deleted before a given timestamp"},hostingUpdatedAfter:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was updated after a given timestamp"},hostingUpdatedBefore:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was updated before a given timestamp"},hostingStatuses:{type:"array",items:{type:"string"},description:"Search subjects by the status of the associated record/account"},reviewedBefore:{type:"string",format:"datetime",description:"Search subjects reviewed before a given timestamp"},includeMuted:{type:"boolean",description:"By default, we don't include muted subjects in the results. Set this to true to include them."},onlyMuted:{type:"boolean",description:"When set to true, only muted subjects and reporters will be returned."},reviewState:{type:"string",description:"Specify when fetching subjects in a certain state"},ignoreSubjects:{type:"array",items:{type:"string",format:"uri"}},lastReviewedBy:{type:"string",format:"did",description:"Get all subject statuses that were reviewed by a specific moderator"},sortField:{type:"string",default:"lastReportedAt",enum:["lastReviewedAt","lastReportedAt","reportedRecordsCount","takendownRecordsCount","priorityScore"]},sortDirection:{type:"string",default:"desc",enum:["asc","desc"]},takendown:{type:"boolean",description:"Get subjects that were taken down"},appealed:{type:"boolean",description:"Get subjects in unresolved appealed status"},limit:{type:"integer",minimum:1,maximum:100,default:50},tags:{type:"array",maxLength:25,items:{type:"string",description:"Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters"}},excludeTags:{type:"array",items:{type:"string"}},cursor:{type:"string"},collections:{type:"array",maxLength:20,description:"If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},subjectType:{type:"string",description:"If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",knownValues:["account","record"]},minAccountSuspendCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many suspensions will be returned."},minReportedRecordsCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many reported records will be returned."},minTakendownRecordsCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many taken down records will be returned."},minPriorityScore:{minimum:0,maximum:100,type:"integer",description:"If specified, only subjects that have priority score value above the given value will be returned."}}},output:{encoding:"application/json",schema:{type:"object",required:["subjectStatuses"],properties:{cursor:{type:"string"},subjectStatuses:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}}}}}}},ToolsOzoneModerationSearchRepos:{lexicon:1,id:"tools.ozone.moderation.searchRepos",defs:{main:{type:"query",description:"Find repositories based on a search term.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead"},q:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}}}}}}},ToolsOzoneServerGetConfig:{lexicon:1,id:"tools.ozone.server.getConfig",defs:{main:{type:"query",description:"Get details about ozone's server configuration.",output:{encoding:"application/json",schema:{type:"object",properties:{appview:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},pds:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},blobDivert:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},chat:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},viewer:{type:"ref",ref:"lex:tools.ozone.server.getConfig#viewerConfig"},verifierDid:{type:"string",format:"did",description:"The did of the verifier used for verification."}}}}},serviceConfig:{type:"object",properties:{url:{type:"string",format:"uri"}}},viewerConfig:{type:"object",properties:{role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleVerifier"]}}}}},ToolsOzoneSetAddValues:{lexicon:1,id:"tools.ozone.set.addValues",defs:{main:{type:"procedure",description:"Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.",input:{encoding:"application/json",schema:{type:"object",required:["name","values"],properties:{name:{type:"string",description:"Name of the set to add values to"},values:{type:"array",minLength:1,maxLength:1e3,items:{type:"string"},description:"Array of string values to add to the set"}}}}}}},ToolsOzoneSetDefs:{lexicon:1,id:"tools.ozone.set.defs",defs:{set:{type:"object",required:["name"],properties:{name:{type:"string",minLength:3,maxLength:128},description:{type:"string",maxGraphemes:1024,maxLength:10240}}},setView:{type:"object",required:["name","setSize","createdAt","updatedAt"],properties:{name:{type:"string",minLength:3,maxLength:128},description:{type:"string",maxGraphemes:1024,maxLength:10240},setSize:{type:"integer"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneSetDeleteSet:{lexicon:1,id:"tools.ozone.set.deleteSet",defs:{main:{type:"procedure",description:"Delete an entire set. Attempting to delete a set that does not exist will result in an error.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string",description:"Name of the set to delete"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetDeleteValues:{lexicon:1,id:"tools.ozone.set.deleteValues",defs:{main:{type:"procedure",description:"Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error",input:{encoding:"application/json",schema:{type:"object",required:["name","values"],properties:{name:{type:"string",description:"Name of the set to delete values from"},values:{type:"array",minLength:1,items:{type:"string"},description:"Array of string values to delete from the set"}}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetGetValues:{lexicon:1,id:"tools.ozone.set.getValues",defs:{main:{type:"query",description:"Get a specific set and its values",parameters:{type:"params",required:["name"],properties:{name:{type:"string"},limit:{type:"integer",minimum:1,maximum:1e3,default:100},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["set","values"],properties:{set:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"},values:{type:"array",items:{type:"string"}},cursor:{type:"string"}}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetQuerySets:{lexicon:1,id:"tools.ozone.set.querySets",defs:{main:{type:"query",description:"Query available sets",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},namePrefix:{type:"string"},sortBy:{type:"string",enum:["name","createdAt","updatedAt"],default:"name"},sortDirection:{type:"string",default:"asc",enum:["asc","desc"],description:"Defaults to ascending order of name field."}}},output:{encoding:"application/json",schema:{type:"object",required:["sets"],properties:{sets:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"}},cursor:{type:"string"}}}}}}},ToolsOzoneSetUpsertSet:{lexicon:1,id:"tools.ozone.set.upsertSet",defs:{main:{type:"procedure",description:"Create or update set metadata",input:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.set.defs#set"}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"}}}}},ToolsOzoneSettingDefs:{lexicon:1,id:"tools.ozone.setting.defs",defs:{option:{type:"object",required:["key","value","did","scope","createdBy","lastUpdatedBy"],properties:{key:{type:"string",format:"nsid"},did:{type:"string",format:"did"},value:{type:"unknown"},description:{type:"string",maxGraphemes:1024,maxLength:10240},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},managerRole:{type:"string",knownValues:["tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleVerifier"]},scope:{type:"string",knownValues:["instance","personal"]},createdBy:{type:"string",format:"did"},lastUpdatedBy:{type:"string",format:"did"}}}}},ToolsOzoneSettingListOptions:{lexicon:1,id:"tools.ozone.setting.listOptions",defs:{main:{type:"query",description:"List settings with optional filtering",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},scope:{type:"string",knownValues:["instance","personal"],default:"instance"},prefix:{type:"string",description:"Filter keys by prefix"},keys:{type:"array",maxLength:100,items:{type:"string",format:"nsid"},description:"Filter for only the specified keys. Ignored if prefix is provided"}}},output:{encoding:"application/json",schema:{type:"object",required:["options"],properties:{cursor:{type:"string"},options:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.setting.defs#option"}}}}}}}},ToolsOzoneSettingRemoveOptions:{lexicon:1,id:"tools.ozone.setting.removeOptions",defs:{main:{type:"procedure",description:"Delete settings by key",input:{encoding:"application/json",schema:{type:"object",required:["keys","scope"],properties:{keys:{type:"array",minLength:1,maxLength:200,items:{type:"string",format:"nsid"}},scope:{type:"string",knownValues:["instance","personal"]}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ToolsOzoneSettingUpsertOption:{lexicon:1,id:"tools.ozone.setting.upsertOption",defs:{main:{type:"procedure",description:"Create or update setting option",input:{encoding:"application/json",schema:{type:"object",required:["key","scope","value"],properties:{key:{type:"string",format:"nsid"},scope:{type:"string",knownValues:["instance","personal"]},value:{type:"unknown"},description:{type:"string",maxLength:2e3},managerRole:{type:"string",knownValues:["tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleAdmin"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["option"],properties:{option:{type:"ref",ref:"lex:tools.ozone.setting.defs#option"}}}}}}},ToolsOzoneSignatureDefs:{lexicon:1,id:"tools.ozone.signature.defs",defs:{sigDetail:{type:"object",required:["property","value"],properties:{property:{type:"string"},value:{type:"string"}}}}},ToolsOzoneSignatureFindCorrelation:{lexicon:1,id:"tools.ozone.signature.findCorrelation",defs:{main:{type:"query",description:"Find all correlated threat signatures between 2 or more accounts.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["details"],properties:{details:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.defs#sigDetail"}}}}}}}},ToolsOzoneSignatureFindRelatedAccounts:{lexicon:1,id:"tools.ozone.signature.findRelatedAccounts",defs:{main:{type:"query",description:"Get accounts that share some matching threat signatures with the root account.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.findRelatedAccounts#relatedAccount"}}}}}},relatedAccount:{type:"object",required:["account"],properties:{account:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"},similarities:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.defs#sigDetail"}}}}}},ToolsOzoneSignatureSearchAccounts:{lexicon:1,id:"tools.ozone.signature.searchAccounts",defs:{main:{type:"query",description:"Search for accounts that match one or more threat signature values.",parameters:{type:"params",required:["values"],properties:{values:{type:"array",items:{type:"string"}},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ToolsOzoneTeamAddMember:{lexicon:1,id:"tools.ozone.team.addMember",defs:{main:{type:"procedure",description:"Add a member to the ozone team. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did","role"],properties:{did:{type:"string",format:"did"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleTriage"]}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}},errors:[{name:"MemberAlreadyExists",description:"Member already exists in the team."}]}}},ToolsOzoneTeamDefs:{lexicon:1,id:"tools.ozone.team.defs",defs:{member:{type:"object",required:["did","role"],properties:{did:{type:"string",format:"did"},disabled:{type:"boolean"},profile:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},lastUpdatedBy:{type:"string"},role:{type:"string",knownValues:["lex:tools.ozone.team.defs#roleAdmin","lex:tools.ozone.team.defs#roleModerator","lex:tools.ozone.team.defs#roleTriage","lex:tools.ozone.team.defs#roleVerifier"]}}},roleAdmin:{type:"token",description:"Admin role. Highest level of access, can perform all actions."},roleModerator:{type:"token",description:"Moderator role. Can perform most actions."},roleTriage:{type:"token",description:"Triage role. Mostly intended for monitoring and escalating issues."},roleVerifier:{type:"token",description:"Verifier role. Only allowed to issue verifications."}}},ToolsOzoneTeamDeleteMember:{lexicon:1,id:"tools.ozone.team.deleteMember",defs:{main:{type:"procedure",description:"Delete a member from ozone team. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}},errors:[{name:"MemberNotFound",description:"The member being deleted does not exist"},{name:"CannotDeleteSelf",description:"You can not delete yourself from the team"}]}}},ToolsOzoneTeamListMembers:{lexicon:1,id:"tools.ozone.team.listMembers",defs:{main:{type:"query",description:"List all members with access to the ozone service.",parameters:{type:"params",properties:{q:{type:"string"},disabled:{type:"boolean"},roles:{type:"array",items:{type:"string"}},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["members"],properties:{cursor:{type:"string"},members:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}}}}}}}},ToolsOzoneTeamUpdateMember:{lexicon:1,id:"tools.ozone.team.updateMember",defs:{main:{type:"procedure",description:"Update a member in the ozone service. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"},disabled:{type:"boolean"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleTriage"]}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}},errors:[{name:"MemberNotFound",description:"The member being updated does not exist in the team"}]}}},ToolsOzoneVerificationDefs:{lexicon:1,id:"tools.ozone.verification.defs",defs:{verificationView:{type:"object",description:"Verification data for the associated subject.",required:["issuer","uri","subject","handle","displayName","createdAt"],properties:{issuer:{type:"string",description:"The user who issued this verification.",format:"did"},uri:{type:"string",description:"The AT-URI of the verification record.",format:"at-uri"},subject:{type:"string",format:"did",description:"The subject of the verification."},handle:{type:"string",description:"Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.",format:"handle"},displayName:{type:"string",description:"Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying."},createdAt:{type:"string",description:"Timestamp when the verification was created.",format:"datetime"},revokeReason:{type:"string",description:"Describes the reason for revocation, also indicating that the verification is no longer valid."},revokedAt:{type:"string",description:"Timestamp when the verification was revoked.",format:"datetime"},revokedBy:{type:"string",description:"The user who revoked this verification.",format:"did"},subjectProfile:{type:"union",refs:[]},issuerProfile:{type:"union",refs:[]},subjectRepo:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]},issuerRepo:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]}}}}},ToolsOzoneVerificationGrantVerifications:{lexicon:1,id:"tools.ozone.verification.grantVerifications",defs:{main:{type:"procedure",description:"Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.",input:{encoding:"application/json",schema:{type:"object",required:["verifications"],properties:{verifications:{type:"array",description:"Array of verification requests to process",maxLength:100,items:{type:"ref",ref:"lex:tools.ozone.verification.grantVerifications#verificationInput"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["verifications","failedVerifications"],properties:{verifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.defs#verificationView"}},failedVerifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.grantVerifications#grantError"}}}}}},verificationInput:{type:"object",required:["subject","handle","displayName"],properties:{subject:{type:"string",description:"The did of the subject being verified",format:"did"},handle:{type:"string",description:"Handle of the subject the verification applies to at the moment of verifying.",format:"handle"},displayName:{type:"string",description:"Display name of the subject the verification applies to at the moment of verifying."},createdAt:{type:"string",format:"datetime",description:"Timestamp for verification record. Defaults to current time when not specified."}}},grantError:{type:"object",description:"Error object for failed verifications.",required:["error","subject"],properties:{error:{type:"string",description:"Error message describing the reason for failure."},subject:{type:"string",description:"The did of the subject being verified",format:"did"}}}}},ToolsOzoneVerificationListVerifications:{lexicon:1,id:"tools.ozone.verification.listVerifications",defs:{main:{type:"query",description:"List verifications",parameters:{type:"params",properties:{cursor:{type:"string",description:"Pagination cursor"},limit:{type:"integer",description:"Maximum number of results to return",minimum:1,maximum:100,default:50},createdAfter:{type:"string",format:"datetime",description:"Filter to verifications created after this timestamp"},createdBefore:{type:"string",format:"datetime",description:"Filter to verifications created before this timestamp"},issuers:{type:"array",maxLength:100,description:"Filter to verifications from specific issuers",items:{type:"string",format:"did"}},subjects:{type:"array",description:"Filter to specific verified DIDs",maxLength:100,items:{type:"string",format:"did"}},sortDirection:{type:"string",description:"Sort direction for creation date",enum:["asc","desc"],default:"desc"},isRevoked:{type:"boolean",description:"Filter to verifications that are revoked or not. By default, includes both."}}},output:{encoding:"application/json",schema:{type:"object",required:["verifications"],properties:{cursor:{type:"string"},verifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.defs#verificationView"}}}}}}}},ToolsOzoneVerificationRevokeVerifications:{lexicon:1,id:"tools.ozone.verification.revokeVerifications",defs:{main:{type:"procedure",description:"Revoke previously granted verifications in batches of up to 100.",input:{encoding:"application/json",schema:{type:"object",required:["uris"],properties:{uris:{type:"array",description:"Array of verification record uris to revoke",maxLength:100,items:{type:"string",description:"The AT-URI of the verification record to revoke.",format:"at-uri"}},revokeReason:{type:"string",description:"Reason for revoking the verification. This is optional and can be omitted if not needed.",maxLength:1e3}}}},output:{encoding:"application/json",schema:{type:"object",required:["revokedVerifications","failedRevocations"],properties:{revokedVerifications:{type:"array",description:"List of verification uris successfully revoked",items:{type:"string",format:"at-uri"}},failedRevocations:{type:"array",description:"List of verification uris that couldn't be revoked, including failure reasons",items:{type:"ref",ref:"lex:tools.ozone.verification.revokeVerifications#revokeError"}}}}}},revokeError:{type:"object",description:"Error object for failed revocations",required:["uri","error"],properties:{uri:{type:"string",description:"The AT-URI of the verification record that failed to revoke.",format:"at-uri"},error:{type:"string",description:"Description of the error that occurred during revocation."}}}}}},t.schemas=Object.values(t.schemaDict),t.lexicons=new e.Lexicons(t.schemas);function n(i,o,s,l){return(l?r.is$typed:r.maybe$typed)(i,o,s)?t.lexicons.validate(`${o}#${s}`,i):{success:!1,error:new e.ValidationError(`Must be an object with "${s==="main"?o:`${o}#${s}`}" $type property`)}}t.ids={ComAtprotoAdminDefs:"com.atproto.admin.defs",ComAtprotoAdminDeleteAccount:"com.atproto.admin.deleteAccount",ComAtprotoAdminDisableAccountInvites:"com.atproto.admin.disableAccountInvites",ComAtprotoAdminDisableInviteCodes:"com.atproto.admin.disableInviteCodes",ComAtprotoAdminEnableAccountInvites:"com.atproto.admin.enableAccountInvites",ComAtprotoAdminGetAccountInfo:"com.atproto.admin.getAccountInfo",ComAtprotoAdminGetAccountInfos:"com.atproto.admin.getAccountInfos",ComAtprotoAdminGetInviteCodes:"com.atproto.admin.getInviteCodes",ComAtprotoAdminGetSubjectStatus:"com.atproto.admin.getSubjectStatus",ComAtprotoAdminSearchAccounts:"com.atproto.admin.searchAccounts",ComAtprotoAdminSendEmail:"com.atproto.admin.sendEmail",ComAtprotoAdminUpdateAccountEmail:"com.atproto.admin.updateAccountEmail",ComAtprotoAdminUpdateAccountHandle:"com.atproto.admin.updateAccountHandle",ComAtprotoAdminUpdateAccountPassword:"com.atproto.admin.updateAccountPassword",ComAtprotoAdminUpdateAccountSigningKey:"com.atproto.admin.updateAccountSigningKey",ComAtprotoAdminUpdateSubjectStatus:"com.atproto.admin.updateSubjectStatus",ComAtprotoIdentityDefs:"com.atproto.identity.defs",ComAtprotoIdentityGetRecommendedDidCredentials:"com.atproto.identity.getRecommendedDidCredentials",ComAtprotoIdentityRefreshIdentity:"com.atproto.identity.refreshIdentity",ComAtprotoIdentityRequestPlcOperationSignature:"com.atproto.identity.requestPlcOperationSignature",ComAtprotoIdentityResolveDid:"com.atproto.identity.resolveDid",ComAtprotoIdentityResolveHandle:"com.atproto.identity.resolveHandle",ComAtprotoIdentityResolveIdentity:"com.atproto.identity.resolveIdentity",ComAtprotoIdentitySignPlcOperation:"com.atproto.identity.signPlcOperation",ComAtprotoIdentitySubmitPlcOperation:"com.atproto.identity.submitPlcOperation",ComAtprotoIdentityUpdateHandle:"com.atproto.identity.updateHandle",ComAtprotoLabelDefs:"com.atproto.label.defs",ComAtprotoLabelQueryLabels:"com.atproto.label.queryLabels",ComAtprotoLabelSubscribeLabels:"com.atproto.label.subscribeLabels",ComAtprotoLexiconSchema:"com.atproto.lexicon.schema",ComAtprotoModerationCreateReport:"com.atproto.moderation.createReport",ComAtprotoModerationDefs:"com.atproto.moderation.defs",ComAtprotoRepoApplyWrites:"com.atproto.repo.applyWrites",ComAtprotoRepoCreateRecord:"com.atproto.repo.createRecord",ComAtprotoRepoDefs:"com.atproto.repo.defs",ComAtprotoRepoDeleteRecord:"com.atproto.repo.deleteRecord",ComAtprotoRepoDescribeRepo:"com.atproto.repo.describeRepo",ComAtprotoRepoGetRecord:"com.atproto.repo.getRecord",ComAtprotoRepoImportRepo:"com.atproto.repo.importRepo",ComAtprotoRepoListMissingBlobs:"com.atproto.repo.listMissingBlobs",ComAtprotoRepoListRecords:"com.atproto.repo.listRecords",ComAtprotoRepoPutRecord:"com.atproto.repo.putRecord",ComAtprotoRepoStrongRef:"com.atproto.repo.strongRef",ComAtprotoRepoUploadBlob:"com.atproto.repo.uploadBlob",ComAtprotoServerActivateAccount:"com.atproto.server.activateAccount",ComAtprotoServerCheckAccountStatus:"com.atproto.server.checkAccountStatus",ComAtprotoServerConfirmEmail:"com.atproto.server.confirmEmail",ComAtprotoServerCreateAccount:"com.atproto.server.createAccount",ComAtprotoServerCreateAppPassword:"com.atproto.server.createAppPassword",ComAtprotoServerCreateInviteCode:"com.atproto.server.createInviteCode",ComAtprotoServerCreateInviteCodes:"com.atproto.server.createInviteCodes",ComAtprotoServerCreateSession:"com.atproto.server.createSession",ComAtprotoServerDeactivateAccount:"com.atproto.server.deactivateAccount",ComAtprotoServerDefs:"com.atproto.server.defs",ComAtprotoServerDeleteAccount:"com.atproto.server.deleteAccount",ComAtprotoServerDeleteSession:"com.atproto.server.deleteSession",ComAtprotoServerDescribeServer:"com.atproto.server.describeServer",ComAtprotoServerGetAccountInviteCodes:"com.atproto.server.getAccountInviteCodes",ComAtprotoServerGetServiceAuth:"com.atproto.server.getServiceAuth",ComAtprotoServerGetSession:"com.atproto.server.getSession",ComAtprotoServerListAppPasswords:"com.atproto.server.listAppPasswords",ComAtprotoServerRefreshSession:"com.atproto.server.refreshSession",ComAtprotoServerRequestAccountDelete:"com.atproto.server.requestAccountDelete",ComAtprotoServerRequestEmailConfirmation:"com.atproto.server.requestEmailConfirmation",ComAtprotoServerRequestEmailUpdate:"com.atproto.server.requestEmailUpdate",ComAtprotoServerRequestPasswordReset:"com.atproto.server.requestPasswordReset",ComAtprotoServerReserveSigningKey:"com.atproto.server.reserveSigningKey",ComAtprotoServerResetPassword:"com.atproto.server.resetPassword",ComAtprotoServerRevokeAppPassword:"com.atproto.server.revokeAppPassword",ComAtprotoServerUpdateEmail:"com.atproto.server.updateEmail",ComAtprotoSyncDefs:"com.atproto.sync.defs",ComAtprotoSyncGetBlob:"com.atproto.sync.getBlob",ComAtprotoSyncGetBlocks:"com.atproto.sync.getBlocks",ComAtprotoSyncGetCheckout:"com.atproto.sync.getCheckout",ComAtprotoSyncGetHead:"com.atproto.sync.getHead",ComAtprotoSyncGetHostStatus:"com.atproto.sync.getHostStatus",ComAtprotoSyncGetLatestCommit:"com.atproto.sync.getLatestCommit",ComAtprotoSyncGetRecord:"com.atproto.sync.getRecord",ComAtprotoSyncGetRepo:"com.atproto.sync.getRepo",ComAtprotoSyncGetRepoStatus:"com.atproto.sync.getRepoStatus",ComAtprotoSyncListBlobs:"com.atproto.sync.listBlobs",ComAtprotoSyncListHosts:"com.atproto.sync.listHosts",ComAtprotoSyncListRepos:"com.atproto.sync.listRepos",ComAtprotoSyncListReposByCollection:"com.atproto.sync.listReposByCollection",ComAtprotoSyncNotifyOfUpdate:"com.atproto.sync.notifyOfUpdate",ComAtprotoSyncRequestCrawl:"com.atproto.sync.requestCrawl",ComAtprotoSyncSubscribeRepos:"com.atproto.sync.subscribeRepos",ComAtprotoTempAddReservedHandle:"com.atproto.temp.addReservedHandle",ComAtprotoTempCheckSignupQueue:"com.atproto.temp.checkSignupQueue",ComAtprotoTempFetchLabels:"com.atproto.temp.fetchLabels",ComAtprotoTempRequestPhoneVerification:"com.atproto.temp.requestPhoneVerification",AppBskyActorDefs:"app.bsky.actor.defs",AppBskyActorGetPreferences:"app.bsky.actor.getPreferences",AppBskyActorGetProfile:"app.bsky.actor.getProfile",AppBskyActorGetProfiles:"app.bsky.actor.getProfiles",AppBskyActorGetSuggestions:"app.bsky.actor.getSuggestions",AppBskyActorProfile:"app.bsky.actor.profile",AppBskyActorPutPreferences:"app.bsky.actor.putPreferences",AppBskyActorSearchActors:"app.bsky.actor.searchActors",AppBskyActorSearchActorsTypeahead:"app.bsky.actor.searchActorsTypeahead",AppBskyActorStatus:"app.bsky.actor.status",AppBskyEmbedDefs:"app.bsky.embed.defs",AppBskyEmbedExternal:"app.bsky.embed.external",AppBskyEmbedImages:"app.bsky.embed.images",AppBskyEmbedRecord:"app.bsky.embed.record",AppBskyEmbedRecordWithMedia:"app.bsky.embed.recordWithMedia",AppBskyEmbedVideo:"app.bsky.embed.video",AppBskyFeedDefs:"app.bsky.feed.defs",AppBskyFeedDescribeFeedGenerator:"app.bsky.feed.describeFeedGenerator",AppBskyFeedGenerator:"app.bsky.feed.generator",AppBskyFeedGetActorFeeds:"app.bsky.feed.getActorFeeds",AppBskyFeedGetActorLikes:"app.bsky.feed.getActorLikes",AppBskyFeedGetAuthorFeed:"app.bsky.feed.getAuthorFeed",AppBskyFeedGetFeed:"app.bsky.feed.getFeed",AppBskyFeedGetFeedGenerator:"app.bsky.feed.getFeedGenerator",AppBskyFeedGetFeedGenerators:"app.bsky.feed.getFeedGenerators",AppBskyFeedGetFeedSkeleton:"app.bsky.feed.getFeedSkeleton",AppBskyFeedGetLikes:"app.bsky.feed.getLikes",AppBskyFeedGetListFeed:"app.bsky.feed.getListFeed",AppBskyFeedGetPosts:"app.bsky.feed.getPosts",AppBskyFeedGetPostThread:"app.bsky.feed.getPostThread",AppBskyFeedGetQuotes:"app.bsky.feed.getQuotes",AppBskyFeedGetRepostedBy:"app.bsky.feed.getRepostedBy",AppBskyFeedGetSuggestedFeeds:"app.bsky.feed.getSuggestedFeeds",AppBskyFeedGetTimeline:"app.bsky.feed.getTimeline",AppBskyFeedLike:"app.bsky.feed.like",AppBskyFeedPost:"app.bsky.feed.post",AppBskyFeedPostgate:"app.bsky.feed.postgate",AppBskyFeedRepost:"app.bsky.feed.repost",AppBskyFeedSearchPosts:"app.bsky.feed.searchPosts",AppBskyFeedSendInteractions:"app.bsky.feed.sendInteractions",AppBskyFeedThreadgate:"app.bsky.feed.threadgate",AppBskyGraphBlock:"app.bsky.graph.block",AppBskyGraphDefs:"app.bsky.graph.defs",AppBskyGraphFollow:"app.bsky.graph.follow",AppBskyGraphGetActorStarterPacks:"app.bsky.graph.getActorStarterPacks",AppBskyGraphGetBlocks:"app.bsky.graph.getBlocks",AppBskyGraphGetFollowers:"app.bsky.graph.getFollowers",AppBskyGraphGetFollows:"app.bsky.graph.getFollows",AppBskyGraphGetKnownFollowers:"app.bsky.graph.getKnownFollowers",AppBskyGraphGetList:"app.bsky.graph.getList",AppBskyGraphGetListBlocks:"app.bsky.graph.getListBlocks",AppBskyGraphGetListMutes:"app.bsky.graph.getListMutes",AppBskyGraphGetLists:"app.bsky.graph.getLists",AppBskyGraphGetMutes:"app.bsky.graph.getMutes",AppBskyGraphGetRelationships:"app.bsky.graph.getRelationships",AppBskyGraphGetStarterPack:"app.bsky.graph.getStarterPack",AppBskyGraphGetStarterPacks:"app.bsky.graph.getStarterPacks",AppBskyGraphGetSuggestedFollowsByActor:"app.bsky.graph.getSuggestedFollowsByActor",AppBskyGraphList:"app.bsky.graph.list",AppBskyGraphListblock:"app.bsky.graph.listblock",AppBskyGraphListitem:"app.bsky.graph.listitem",AppBskyGraphMuteActor:"app.bsky.graph.muteActor",AppBskyGraphMuteActorList:"app.bsky.graph.muteActorList",AppBskyGraphMuteThread:"app.bsky.graph.muteThread",AppBskyGraphSearchStarterPacks:"app.bsky.graph.searchStarterPacks",AppBskyGraphStarterpack:"app.bsky.graph.starterpack",AppBskyGraphUnmuteActor:"app.bsky.graph.unmuteActor",AppBskyGraphUnmuteActorList:"app.bsky.graph.unmuteActorList",AppBskyGraphUnmuteThread:"app.bsky.graph.unmuteThread",AppBskyGraphVerification:"app.bsky.graph.verification",AppBskyLabelerDefs:"app.bsky.labeler.defs",AppBskyLabelerGetServices:"app.bsky.labeler.getServices",AppBskyLabelerService:"app.bsky.labeler.service",AppBskyNotificationDefs:"app.bsky.notification.defs",AppBskyNotificationGetPreferences:"app.bsky.notification.getPreferences",AppBskyNotificationGetUnreadCount:"app.bsky.notification.getUnreadCount",AppBskyNotificationListNotifications:"app.bsky.notification.listNotifications",AppBskyNotificationPutPreferences:"app.bsky.notification.putPreferences",AppBskyNotificationPutPreferencesV2:"app.bsky.notification.putPreferencesV2",AppBskyNotificationRegisterPush:"app.bsky.notification.registerPush",AppBskyNotificationUpdateSeen:"app.bsky.notification.updateSeen",AppBskyRichtextFacet:"app.bsky.richtext.facet",AppBskyUnspeccedDefs:"app.bsky.unspecced.defs",AppBskyUnspeccedGetConfig:"app.bsky.unspecced.getConfig",AppBskyUnspeccedGetPopularFeedGenerators:"app.bsky.unspecced.getPopularFeedGenerators",AppBskyUnspeccedGetPostThreadOtherV2:"app.bsky.unspecced.getPostThreadOtherV2",AppBskyUnspeccedGetPostThreadV2:"app.bsky.unspecced.getPostThreadV2",AppBskyUnspeccedGetSuggestedFeeds:"app.bsky.unspecced.getSuggestedFeeds",AppBskyUnspeccedGetSuggestedFeedsSkeleton:"app.bsky.unspecced.getSuggestedFeedsSkeleton",AppBskyUnspeccedGetSuggestedStarterPacks:"app.bsky.unspecced.getSuggestedStarterPacks",AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton",AppBskyUnspeccedGetSuggestedUsers:"app.bsky.unspecced.getSuggestedUsers",AppBskyUnspeccedGetSuggestedUsersSkeleton:"app.bsky.unspecced.getSuggestedUsersSkeleton",AppBskyUnspeccedGetSuggestionsSkeleton:"app.bsky.unspecced.getSuggestionsSkeleton",AppBskyUnspeccedGetTaggedSuggestions:"app.bsky.unspecced.getTaggedSuggestions",AppBskyUnspeccedGetTrendingTopics:"app.bsky.unspecced.getTrendingTopics",AppBskyUnspeccedGetTrends:"app.bsky.unspecced.getTrends",AppBskyUnspeccedGetTrendsSkeleton:"app.bsky.unspecced.getTrendsSkeleton",AppBskyUnspeccedSearchActorsSkeleton:"app.bsky.unspecced.searchActorsSkeleton",AppBskyUnspeccedSearchPostsSkeleton:"app.bsky.unspecced.searchPostsSkeleton",AppBskyUnspeccedSearchStarterPacksSkeleton:"app.bsky.unspecced.searchStarterPacksSkeleton",AppBskyVideoDefs:"app.bsky.video.defs",AppBskyVideoGetJobStatus:"app.bsky.video.getJobStatus",AppBskyVideoGetUploadLimits:"app.bsky.video.getUploadLimits",AppBskyVideoUploadVideo:"app.bsky.video.uploadVideo",ChatBskyActorDeclaration:"chat.bsky.actor.declaration",ChatBskyActorDefs:"chat.bsky.actor.defs",ChatBskyActorDeleteAccount:"chat.bsky.actor.deleteAccount",ChatBskyActorExportAccountData:"chat.bsky.actor.exportAccountData",ChatBskyConvoAcceptConvo:"chat.bsky.convo.acceptConvo",ChatBskyConvoAddReaction:"chat.bsky.convo.addReaction",ChatBskyConvoDefs:"chat.bsky.convo.defs",ChatBskyConvoDeleteMessageForSelf:"chat.bsky.convo.deleteMessageForSelf",ChatBskyConvoGetConvo:"chat.bsky.convo.getConvo",ChatBskyConvoGetConvoAvailability:"chat.bsky.convo.getConvoAvailability",ChatBskyConvoGetConvoForMembers:"chat.bsky.convo.getConvoForMembers",ChatBskyConvoGetLog:"chat.bsky.convo.getLog",ChatBskyConvoGetMessages:"chat.bsky.convo.getMessages",ChatBskyConvoLeaveConvo:"chat.bsky.convo.leaveConvo",ChatBskyConvoListConvos:"chat.bsky.convo.listConvos",ChatBskyConvoMuteConvo:"chat.bsky.convo.muteConvo",ChatBskyConvoRemoveReaction:"chat.bsky.convo.removeReaction",ChatBskyConvoSendMessage:"chat.bsky.convo.sendMessage",ChatBskyConvoSendMessageBatch:"chat.bsky.convo.sendMessageBatch",ChatBskyConvoUnmuteConvo:"chat.bsky.convo.unmuteConvo",ChatBskyConvoUpdateAllRead:"chat.bsky.convo.updateAllRead",ChatBskyConvoUpdateRead:"chat.bsky.convo.updateRead",ChatBskyModerationGetActorMetadata:"chat.bsky.moderation.getActorMetadata",ChatBskyModerationGetMessageContext:"chat.bsky.moderation.getMessageContext",ChatBskyModerationUpdateActorAccess:"chat.bsky.moderation.updateActorAccess",ToolsOzoneCommunicationCreateTemplate:"tools.ozone.communication.createTemplate",ToolsOzoneCommunicationDefs:"tools.ozone.communication.defs",ToolsOzoneCommunicationDeleteTemplate:"tools.ozone.communication.deleteTemplate",ToolsOzoneCommunicationListTemplates:"tools.ozone.communication.listTemplates",ToolsOzoneCommunicationUpdateTemplate:"tools.ozone.communication.updateTemplate",ToolsOzoneHostingGetAccountHistory:"tools.ozone.hosting.getAccountHistory",ToolsOzoneModerationDefs:"tools.ozone.moderation.defs",ToolsOzoneModerationEmitEvent:"tools.ozone.moderation.emitEvent",ToolsOzoneModerationGetEvent:"tools.ozone.moderation.getEvent",ToolsOzoneModerationGetRecord:"tools.ozone.moderation.getRecord",ToolsOzoneModerationGetRecords:"tools.ozone.moderation.getRecords",ToolsOzoneModerationGetRepo:"tools.ozone.moderation.getRepo",ToolsOzoneModerationGetReporterStats:"tools.ozone.moderation.getReporterStats",ToolsOzoneModerationGetRepos:"tools.ozone.moderation.getRepos",ToolsOzoneModerationGetSubjects:"tools.ozone.moderation.getSubjects",ToolsOzoneModerationQueryEvents:"tools.ozone.moderation.queryEvents",ToolsOzoneModerationQueryStatuses:"tools.ozone.moderation.queryStatuses",ToolsOzoneModerationSearchRepos:"tools.ozone.moderation.searchRepos",ToolsOzoneServerGetConfig:"tools.ozone.server.getConfig",ToolsOzoneSetAddValues:"tools.ozone.set.addValues",ToolsOzoneSetDefs:"tools.ozone.set.defs",ToolsOzoneSetDeleteSet:"tools.ozone.set.deleteSet",ToolsOzoneSetDeleteValues:"tools.ozone.set.deleteValues",ToolsOzoneSetGetValues:"tools.ozone.set.getValues",ToolsOzoneSetQuerySets:"tools.ozone.set.querySets",ToolsOzoneSetUpsertSet:"tools.ozone.set.upsertSet",ToolsOzoneSettingDefs:"tools.ozone.setting.defs",ToolsOzoneSettingListOptions:"tools.ozone.setting.listOptions",ToolsOzoneSettingRemoveOptions:"tools.ozone.setting.removeOptions",ToolsOzoneSettingUpsertOption:"tools.ozone.setting.upsertOption",ToolsOzoneSignatureDefs:"tools.ozone.signature.defs",ToolsOzoneSignatureFindCorrelation:"tools.ozone.signature.findCorrelation",ToolsOzoneSignatureFindRelatedAccounts:"tools.ozone.signature.findRelatedAccounts",ToolsOzoneSignatureSearchAccounts:"tools.ozone.signature.searchAccounts",ToolsOzoneTeamAddMember:"tools.ozone.team.addMember",ToolsOzoneTeamDefs:"tools.ozone.team.defs",ToolsOzoneTeamDeleteMember:"tools.ozone.team.deleteMember",ToolsOzoneTeamListMembers:"tools.ozone.team.listMembers",ToolsOzoneTeamUpdateMember:"tools.ozone.team.updateMember",ToolsOzoneVerificationDefs:"tools.ozone.verification.defs",ToolsOzoneVerificationGrantVerifications:"tools.ozone.verification.grantVerifications",ToolsOzoneVerificationListVerifications:"tools.ozone.verification.listVerifications",ToolsOzoneVerificationRevokeVerifications:"tools.ozone.verification.revokeVerifications"}})(x);var Tk={};Object.defineProperty(Tk,"__esModule",{value:!0});var Sd={};Object.defineProperty(Sd,"__esModule",{value:!0});Sd.BSKY_LABELER_DID=void 0;Sd.BSKY_LABELER_DID="did:plc:ar7c4by46qjdydhdevvrndac";var Q0={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.nuxSchema=t.asDid=t.isDid=void 0,t.sanitizeMutedWordValue=i,t.savedFeedsToUriArrays=o,t.getSavedFeedType=s,t.validateSavedFeed=l,t.validateNux=d;const e=G,r=Nn,n=jo;function i(f){return f.trim().replace(/^#(?!\ufe0f)/,"").replace(/[\r\n\u00AD\u2060\u200D\u200C\u200B]+/,"")}function o(f){const h=[],g=[];for(const b of f)b.pinned&&h.push(b.value),g.push(b.value);return{pinned:h,saved:g}}function s(f){switch(new n.AtUri(f).collection){case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";default:return"unknown"}}function l(f){if(new r.TID(f.id),["feed","list"].includes(f.type)){const h=new n.AtUri(f.value),g=h.collection==="app.bsky.feed.generator",b=h.collection==="app.bsky.graph.list";if(f.type==="feed"&&!g)throw new Error(`Saved feed of type 'feed' must be a feed, got ${h.collection}`);if(f.type==="list"&&!b)throw new Error(`Saved feed of type 'list' must be a list, got ${h.collection}`)}}const u=f=>typeof f=="string"&&f.startsWith("did:")&&f.includes(":",4)&&f.length>8&&f.length<=2048;t.isDid=u;const c=f=>{if((0,t.isDid)(f))return f;throw new TypeError(`Invalid DID: ${f}`)};t.asDid=c,t.nuxSchema=e.z.object({id:e.z.string().max(64),completed:e.z.boolean(),data:e.z.string().max(300).optional(),expiresAt:e.z.string().datetime().optional()}).strict();function d(f){t.nuxSchema.parse(f)}})(Q0);var p={},W={},Ps={},$t={},Vy={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.XRPCInvalidResponseError=t.XRPCError=t.XRPCResponse=t.ResponseTypeStrings=t.ResponseType=t.errorResponseBody=void 0,t.httpResponseCodeToEnum=n,t.httpResponseCodeToName=i,t.httpResponseCodeToString=o;const e=G;t.errorResponseBody=e.z.object({error:e.z.string().optional(),message:e.z.string().optional()});var r;(function(c){c[c.Unknown=1]="Unknown",c[c.InvalidResponse=2]="InvalidResponse",c[c.Success=200]="Success",c[c.InvalidRequest=400]="InvalidRequest",c[c.AuthenticationRequired=401]="AuthenticationRequired",c[c.Forbidden=403]="Forbidden",c[c.XRPCNotSupported=404]="XRPCNotSupported",c[c.NotAcceptable=406]="NotAcceptable",c[c.PayloadTooLarge=413]="PayloadTooLarge",c[c.UnsupportedMediaType=415]="UnsupportedMediaType",c[c.RateLimitExceeded=429]="RateLimitExceeded",c[c.InternalServerError=500]="InternalServerError",c[c.MethodNotImplemented=501]="MethodNotImplemented",c[c.UpstreamFailure=502]="UpstreamFailure",c[c.NotEnoughResources=503]="NotEnoughResources",c[c.UpstreamTimeout=504]="UpstreamTimeout"})(r||(t.ResponseType=r={}));function n(c){return c in r?c:c>=100&&c<200?r.XRPCNotSupported:c>=200&&c<300?r.Success:c>=300&&c<400?r.XRPCNotSupported:c>=400&&c<500?r.InvalidRequest:r.InternalServerError}function i(c){return r[n(c)]}t.ResponseTypeStrings={[r.Unknown]:"Unknown",[r.InvalidResponse]:"Invalid Response",[r.Success]:"Success",[r.InvalidRequest]:"Invalid Request",[r.AuthenticationRequired]:"Authentication Required",[r.Forbidden]:"Forbidden",[r.XRPCNotSupported]:"XRPC Not Supported",[r.NotAcceptable]:"Not Acceptable",[r.PayloadTooLarge]:"Payload Too Large",[r.UnsupportedMediaType]:"Unsupported Media Type",[r.RateLimitExceeded]:"Rate Limit Exceeded",[r.InternalServerError]:"Internal Server Error",[r.MethodNotImplemented]:"Method Not Implemented",[r.UpstreamFailure]:"Upstream Failure",[r.NotEnoughResources]:"Not Enough Resources",[r.UpstreamTimeout]:"Upstream Timeout"};function o(c){return t.ResponseTypeStrings[n(c)]}class s{constructor(d,f){Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"success",{enumerable:!0,configurable:!0,writable:!0,value:!0})}}t.XRPCResponse=s;class l extends Error{constructor(d,f=i(d),h,g,b){super(h||f||o(d),b),Object.defineProperty(this,"error",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:g}),Object.defineProperty(this,"success",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.status=n(d);const w=b==null?void 0:b.cause;this.cause===void 0&&w!==void 0&&(this.cause=w)}static from(d,f){if(d instanceof l)return d;const h=d instanceof Error?d:void 0,g=d instanceof Response?d:(d==null?void 0:d.response)instanceof Response?d.response:void 0,b=(h==null?void 0:h.statusCode)??(h==null?void 0:h.status)??(g==null?void 0:g.status),w=typeof b=="number"?n(b):f??r.Unknown,C=(h==null?void 0:h.message)??String(d),y=g?Object.fromEntries(g.headers.entries()):void 0;return new l(w,void 0,C,y,{cause:d})}}t.XRPCError=l;class u extends l{constructor(d,f,h){super(r.InvalidResponse,t.ResponseTypeStrings[r.InvalidResponse],"The server gave an invalid response and may be out of date.",void 0,{cause:f}),Object.defineProperty(this,"lexiconNsid",{enumerable:!0,configurable:!0,writable:!0,value:d}),Object.defineProperty(this,"validationError",{enumerable:!0,configurable:!0,writable:!0,value:f}),Object.defineProperty(this,"responseBody",{enumerable:!0,configurable:!0,writable:!0,value:h})}}t.XRPCInvalidResponseError=u})(Vy);Object.defineProperty($t,"__esModule",{value:!0});$t.isErrorResponseBody=T6;$t.getMethodSchemaHTTPMethod=k6;$t.constructMethodCallUri=L6;$t.constructMethodCallUrl=Lk;$t.encodeQueryParam=dv;$t.constructMethodCallHeaders=P6;$t.combineHeaders=D6;$t.isBodyInit=Dk;$t.isIterable=Y0;$t.encodeMethodCallBody=B6;$t.httpResponseBodyParse=j6;const kk=Ls,dn=Vy,Hu=globalThis.ReadableStream||class{constructor(){throw new Error("ReadableStream is not supported in this environment")}};function T6(t){return dn.errorResponseBody.safeParse(t).success}function k6(t){return t.type==="procedure"?"post":"get"}function L6(t,e,r,n){return new URL(Lk(t,e,n),r).toString()}function Lk(t,e,r){var o,s;const n=`/xrpc/${encodeURIComponent(t)}`;if(!r)return n;const i=[];for(const[l,u]of Object.entries(r)){const c=(s=(o=e.parameters)==null?void 0:o.properties)==null?void 0:s[l];if(!c)throw new Error(`Invalid query parameter: ${l}`);if(u!==void 0)if(c.type==="array"){const d=Array.isArray(u)?u:[u];for(const f of d)i.push([l,dv(c.items.type,f)])}else i.push([l,dv(c.type,u)])}return i.length?`${n}?${new URLSearchParams(i).toString()}`:n}function dv(t,e){if(t==="string"||t==="unknown")return String(e);if(t==="float")return String(Number(e));if(t==="integer")return String(Number(e)|0);if(t==="boolean")return e?"true":"false";if(t==="datetime")return e instanceof Date?e.toISOString():String(e);throw new Error(`Unsupported query param type: ${t}`)}function P6(t,e,r){const n=new Headers;if(r!=null&&r.headers)for(const i in r.headers){if(n.has(i))throw new TypeError(`Duplicate header: ${i}`);const o=r.headers[i];o!=null&&n.set(i,o)}if(t.type==="procedure"){if(r!=null&&r.encoding)n.set("content-type",r.encoding);else if(!n.has("content-type")&&typeof e<"u")if(e instanceof ArrayBuffer||e instanceof Hu||ArrayBuffer.isView(e))n.set("content-type","application/octet-stream");else if(e instanceof FormData)n.set("content-type","multipart/form-data");else if(e instanceof URLSearchParams)n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8");else if(Pk(e))n.set("content-type",e.type||"application/octet-stream");else if(typeof e=="string")n.set("content-type","text/plain;charset=UTF-8");else if(Y0(e))n.set("content-type","application/octet-stream");else if(typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="object")n.set("content-type","application/json");else throw new dn.XRPCError(dn.ResponseType.InvalidRequest,`Unsupported data type: ${typeof e}`)}return n}function D6(t,e){if(!e)return t;let r;for(const[n,i]of e){if(i===void 0||(r??(r=new Headers(t)),r.has(n)))continue;const o=typeof i=="function"?i():i;if(typeof o=="string")r.set(n,o);else if(o===null)r.delete(n);else throw new TypeError(`Invalid "${n}" header value: ${typeof o}`)}return r??t}function Pk(t){if(t==null||typeof t!="object")return!1;if(typeof Blob=="function"&&t instanceof Blob)return!0;const e=t[Symbol.toStringTag];return e==="Blob"||e==="File"?"stream"in t&&typeof t.stream=="function":!1}function Dk(t){switch(typeof t){case"string":return!0;case"object":return t instanceof ArrayBuffer||t instanceof FormData||t instanceof URLSearchParams||t instanceof Hu||ArrayBuffer.isView(t)||Pk(t);default:return!1}}function Y0(t){return t!=null&&typeof t=="object"&&(Symbol.iterator in t||Symbol.asyncIterator in t)}function B6(t,e){var i;const r=t.get("content-type");if(!r)return;if(typeof e>"u")throw new dn.XRPCError(dn.ResponseType.InvalidRequest,"A request body is expected but none was provided");if(Dk(e))return e instanceof FormData&&r==="multipart/form-data"&&t.delete("content-type"),e;if(Y0(e))return I6(e);if(r.startsWith("text/"))return new TextEncoder().encode(String(e));if(r.startsWith("application/json")){const o=(0,kk.stringifyLex)(e);if(o===void 0)throw new dn.XRPCError(dn.ResponseType.InvalidRequest,"Failed to encode request body as JSON");return new TextEncoder().encode(o)}const n=!e||typeof e!="object"?typeof e:e.constructor!==Object&&typeof e.constructor=="function"&&typeof((i=e.constructor)==null?void 0:i.name)=="string"?e.constructor.name:"object";throw new dn.XRPCError(dn.ResponseType.InvalidRequest,`Unable to encode ${n} as ${r} data`)}function I6(t){if("from"in Hu&&typeof Hu.from=="function")return Hu.from(t);throw new TypeError("ReadableStream.from() is not supported in this environment. It is required to support using iterables as the request body. Consider using a polyfill or re-write your code to use a different body type.")}function j6(t,e){try{if(t){if(t.includes("application/json")){const r=new TextDecoder().decode(e);return(0,kk.jsonStringToLex)(r)}if(t.startsWith("text/"))return new TextDecoder().decode(e)}return e instanceof ArrayBuffer?new Uint8Array(e):e}catch(r){throw new dn.XRPCError(dn.ResponseType.InvalidResponse,void 0,`Failed to parse response body: ${String(r)}`,void 0,{cause:r})}}var Cd={},My={};Object.defineProperty(My,"__esModule",{value:!0});My.buildFetchHandler=$6;const U6=$t;function $6(t){if(typeof t=="function")return t;if(typeof t=="object"&&"fetchHandler"in t)return t.fetchHandler.bind(t);const{service:e,headers:r=void 0,fetch:n=globalThis.fetch}=typeof t=="string"||t instanceof URL?{service:t}:t;if(typeof n!="function")throw new TypeError("XrpcDispatcher requires fetch() to be available in your environment.");const i=r!=null?Object.entries(r):void 0;return async function(o,s){const l=typeof e=="function"?e():e,u=new URL(o,l),c=(0,U6.combineHeaders)(s.headers,i);return n(u,{...s,headers:c})}}Object.defineProperty(Cd,"__esModule",{value:!0});Cd.XrpcClient=void 0;const Kg=Ls,O6=My,Xs=Vy,is=$t;class K6{constructor(e,r){Object.defineProperty(this,"fetchHandler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"lex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.fetchHandler=(0,O6.buildFetchHandler)(e),this.lex=r instanceof Kg.Lexicons?r:new Kg.Lexicons(r)}setHeader(e,r){this.headers.set(e.toLowerCase(),r)}unsetHeader(e){this.headers.delete(e.toLowerCase())}clearHeaders(){this.headers.clear()}async call(e,r,n,i){const o=this.lex.getDefOrThrow(e);if(!o||o.type!=="query"&&o.type!=="procedure")throw new TypeError(`Invalid lexicon: ${e}. Must be a query or procedure.`);const s=(0,is.constructMethodCallUrl)(e,o,r),l=(0,is.getMethodSchemaHTTPMethod)(o),u=(0,is.constructMethodCallHeaders)(o,n,i),c=(0,is.encodeMethodCallBody)(u,n),d={method:l,headers:(0,is.combineHeaders)(u,this.headers),body:c,duplex:"half",signal:i==null?void 0:i.signal};try{const f=await this.fetchHandler.call(void 0,s,d),h=f.status,g=Object.fromEntries(f.headers.entries()),b=await f.arrayBuffer(),w=(0,is.httpResponseBodyParse)(f.headers.get("content-type"),b),C=(0,Xs.httpResponseCodeToEnum)(h);if(C!==Xs.ResponseType.Success){const{error:y=void 0,message:m=void 0}=w&&(0,is.isErrorResponseBody)(w)?w:{};throw new Xs.XRPCError(C,y,m,g)}try{this.lex.assertValidXrpcOutput(e,w)}catch(y){throw y instanceof Kg.ValidationError?new Xs.XRPCInvalidResponseError(e,y,w):y}return new Xs.XRPCResponse(w,g)}catch(f){throw Xs.XRPCError.from(f)}}}Cd.XrpcClient=K6;Object.defineProperty(Ps,"__esModule",{value:!0});Ps.ServiceClient=Ps.Client=void 0;const V6=Ls,M6=$t,N6=Cd;class z6{constructor(){Object.defineProperty(this,"lex",{enumerable:!0,configurable:!0,writable:!0,value:new V6.Lexicons})}get fetch(){throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.")}set fetch(e){throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.")}async call(e,r,n,i,o){return this.service(e).call(r,n,i,o)}service(e){return new Bk(this,e)}addLexicon(e){this.lex.add(e)}addLexicons(e){for(const r of e)this.addLexicon(r)}removeLexicon(e){this.lex.remove(e)}}Ps.Client=z6;class Bk extends N6.XrpcClient{constructor(e,r){super(async(n,i)=>{const o=(0,M6.combineHeaders)(i.headers,Object.entries(this.headers));return fetch(new URL(n,this.uri),{...i,headers:o})},e.lex),Object.defineProperty(this,"baseClient",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"uri",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.uri=typeof r=="string"?new URL(r):r}}Ps.ServiceClient=Bk;(function(t){var e=S&&S.__createBinding||(Object.create?function(o,s,l,u){u===void 0&&(u=l);var c=Object.getOwnPropertyDescriptor(s,l);(!c||("get"in c?!s.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(o,u,c)}:function(o,s,l,u){u===void 0&&(u=l),o[u]=s[l]}),r=S&&S.__exportStar||function(o,s){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&e(s,o,l)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ps,t),r(My,t),r(Vy,t),r($t,t),r(Cd,t);const n=Ps,i=new n.Client;t.default=i})(W);var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.DidDeactivatedError=Dn.DidNotFoundError=Dn.HandleNotFoundError=void 0;Dn.toKnownErr=G6;const Ny=W,F6=x,q6=_;q6.is$typed;F6.validate;let Ik=class extends Ny.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dn.HandleNotFoundError=Ik;let jk=class extends Ny.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dn.DidNotFoundError=jk;let Uk=class extends Ny.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dn.DidDeactivatedError=Uk;function G6(t){if(t instanceof Ny.XRPCError){if(t.error==="HandleNotFound")return new Ik(t);if(t.error==="DidNotFound")return new jk(t);if(t.error==="DidDeactivated")return new Uk(t)}return t}var vo={};Object.defineProperty(vo,"__esModule",{value:!0});vo.DidDeactivatedError=vo.DidNotFoundError=void 0;vo.toKnownErr=W6;const eE=W,H6=x,X6=_;X6.is$typed;H6.validate;let $k=class extends eE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};vo.DidNotFoundError=$k;let Ok=class extends eE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};vo.DidDeactivatedError=Ok;function W6(t){if(t instanceof eE.XRPCError){if(t.error==="DidNotFound")return new $k(t);if(t.error==="DidDeactivated")return new Ok(t)}return t}var cl={};Object.defineProperty(cl,"__esModule",{value:!0});cl.HandleNotFoundError=void 0;cl.toKnownErr=Q6;const Kk=W,J6=x,Z6=_;Z6.is$typed;J6.validate;let Vk=class extends Kk.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};cl.HandleNotFoundError=Vk;function Q6(t){return t instanceof Kk.XRPCError&&t.error==="HandleNotFound"?new Vk(t):t}var Bn={};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.DidDeactivatedError=Bn.DidNotFoundError=Bn.HandleNotFoundError=void 0;Bn.toKnownErr=t9;const zy=W,Y6=x,e9=_;e9.is$typed;Y6.validate;class Mk extends zy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Bn.HandleNotFoundError=Mk;class Nk extends zy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Bn.DidNotFoundError=Nk;class zk extends zy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Bn.DidDeactivatedError=zk;function t9(t){if(t instanceof zy.XRPCError){if(t.error==="HandleNotFound")return new Mk(t);if(t.error==="DidNotFound")return new Nk(t);if(t.error==="DidDeactivated")return new zk(t)}return t}var gt={};Object.defineProperty(gt,"__esModule",{value:!0});gt.InvalidSwapError=void 0;gt.toKnownErr=i9;gt.isCreate=o9;gt.validateCreate=s9;gt.isUpdate=a9;gt.validateUpdate=l9;gt.isDelete=u9;gt.validateDelete=c9;gt.isCreateResult=d9;gt.validateCreateResult=p9;gt.isUpdateResult=f9;gt.validateUpdateResult=h9;gt.isDeleteResult=y9;gt.validateDeleteResult=m9;const Fk=W,r9=x,n9=_,dl=n9.is$typed,pl=r9.validate,Mr="com.atproto.repo.applyWrites";let qk=class extends Fk.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};gt.InvalidSwapError=qk;function i9(t){return t instanceof Fk.XRPCError&&t.error==="InvalidSwap"?new qk(t):t}const Gk="create";function o9(t){return dl(t,Mr,Gk)}function s9(t){return pl(t,Mr,Gk)}const Hk="update";function a9(t){return dl(t,Mr,Hk)}function l9(t){return pl(t,Mr,Hk)}const Xk="delete";function u9(t){return dl(t,Mr,Xk)}function c9(t){return pl(t,Mr,Xk)}const Wk="createResult";function d9(t){return dl(t,Mr,Wk)}function p9(t){return pl(t,Mr,Wk)}const Jk="updateResult";function f9(t){return dl(t,Mr,Jk)}function h9(t){return pl(t,Mr,Jk)}const Zk="deleteResult";function y9(t){return dl(t,Mr,Zk)}function m9(t){return pl(t,Mr,Zk)}var fl={};Object.defineProperty(fl,"__esModule",{value:!0});fl.InvalidSwapError=void 0;fl.toKnownErr=v9;const Qk=W,g9=x,b9=_;b9.is$typed;g9.validate;let Yk=class extends Qk.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};fl.InvalidSwapError=Yk;function v9(t){return t instanceof Qk.XRPCError&&t.error==="InvalidSwap"?new Yk(t):t}var hl={};Object.defineProperty(hl,"__esModule",{value:!0});hl.InvalidSwapError=void 0;hl.toKnownErr=_9;const eL=W,E9=x,w9=_;w9.is$typed;E9.validate;let tL=class extends eL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};hl.InvalidSwapError=tL;function _9(t){return t instanceof eL.XRPCError&&t.error==="InvalidSwap"?new tL(t):t}var yl={};Object.defineProperty(yl,"__esModule",{value:!0});yl.RecordNotFoundError=void 0;yl.toKnownErr=A9;const rL=W,x9=x,R9=_;R9.is$typed;x9.validate;let nL=class extends rL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};yl.RecordNotFoundError=nL;function A9(t){return t instanceof rL.XRPCError&&t.error==="RecordNotFound"?new nL(t):t}var ml={};Object.defineProperty(ml,"__esModule",{value:!0});ml.InvalidSwapError=void 0;ml.toKnownErr=T9;const iL=W,S9=x,C9=_;C9.is$typed;S9.validate;class oL extends iL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ml.InvalidSwapError=oL;function T9(t){return t instanceof iL.XRPCError&&t.error==="InvalidSwap"?new oL(t):t}var Dr={};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.InvalidEmailError=Dr.InvalidTokenError=Dr.ExpiredTokenError=Dr.AccountNotFoundError=void 0;Dr.toKnownErr=P9;const Td=W,k9=x,L9=_;L9.is$typed;k9.validate;class sL extends Td.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Dr.AccountNotFoundError=sL;let aL=class extends Td.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dr.ExpiredTokenError=aL;let lL=class extends Td.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Dr.InvalidTokenError=lL;class uL extends Td.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Dr.InvalidEmailError=uL;function P9(t){if(t instanceof Td.XRPCError){if(t.error==="AccountNotFound")return new sL(t);if(t.error==="ExpiredToken")return new aL(t);if(t.error==="InvalidToken")return new lL(t);if(t.error==="InvalidEmail")return new uL(t)}return t}var ft={};Object.defineProperty(ft,"__esModule",{value:!0});ft.IncompatibleDidDocError=ft.UnresolvableDidError=ft.UnsupportedDomainError=ft.HandleNotAvailableError=ft.InvalidInviteCodeError=ft.InvalidPasswordError=ft.InvalidHandleError=void 0;ft.toKnownErr=I9;const Oo=W,D9=x,B9=_;B9.is$typed;D9.validate;class cL extends Oo.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ft.InvalidHandleError=cL;class dL extends Oo.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ft.InvalidPasswordError=dL;class pL extends Oo.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ft.InvalidInviteCodeError=pL;class fL extends Oo.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ft.HandleNotAvailableError=fL;class hL extends Oo.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ft.UnsupportedDomainError=hL;class yL extends Oo.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ft.UnresolvableDidError=yL;class mL extends Oo.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ft.IncompatibleDidDocError=mL;function I9(t){if(t instanceof Oo.XRPCError){if(t.error==="InvalidHandle")return new cL(t);if(t.error==="InvalidPassword")return new dL(t);if(t.error==="InvalidInviteCode")return new pL(t);if(t.error==="HandleNotAvailable")return new fL(t);if(t.error==="UnsupportedDomain")return new hL(t);if(t.error==="UnresolvableDid")return new yL(t);if(t.error==="IncompatibleDidDoc")return new mL(t)}return t}var Ko={};Object.defineProperty(Ko,"__esModule",{value:!0});Ko.AccountTakedownError=void 0;Ko.toKnownErr=K9;Ko.isAppPassword=V9;Ko.validateAppPassword=M9;const gL=W,j9=x,U9=_,$9=U9.is$typed,O9=j9.validate,bL="com.atproto.server.createAppPassword";let vL=class extends gL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ko.AccountTakedownError=vL;function K9(t){return t instanceof gL.XRPCError&&t.error==="AccountTakedown"?new vL(t):t}const EL="appPassword";function V9(t){return $9(t,bL,EL)}function M9(t){return O9(t,bL,EL)}var Eo={};Object.defineProperty(Eo,"__esModule",{value:!0});Eo.AuthFactorTokenRequiredError=Eo.AccountTakedownError=void 0;Eo.toKnownErr=F9;const tE=W,N9=x,z9=_;z9.is$typed;N9.validate;let wL=class extends tE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Eo.AccountTakedownError=wL;class _L extends tE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Eo.AuthFactorTokenRequiredError=_L;function F9(t){if(t instanceof tE.XRPCError){if(t.error==="AccountTakedown")return new wL(t);if(t.error==="AuthFactorTokenRequired")return new _L(t)}return t}var wo={};Object.defineProperty(wo,"__esModule",{value:!0});wo.InvalidTokenError=wo.ExpiredTokenError=void 0;wo.toKnownErr=H9;const rE=W,q9=x,G9=_;G9.is$typed;q9.validate;let xL=class extends rE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};wo.ExpiredTokenError=xL;let RL=class extends rE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};wo.InvalidTokenError=RL;function H9(t){if(t instanceof rE.XRPCError){if(t.error==="ExpiredToken")return new xL(t);if(t.error==="InvalidToken")return new RL(t)}return t}var gl={};Object.defineProperty(gl,"__esModule",{value:!0});gl.DuplicateCreateError=void 0;gl.toKnownErr=J9;const AL=W,X9=x,W9=_;W9.is$typed;X9.validate;class SL extends AL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}gl.DuplicateCreateError=SL;function J9(t){return t instanceof AL.XRPCError&&t.error==="DuplicateCreate"?new SL(t):t}var bl={};Object.defineProperty(bl,"__esModule",{value:!0});bl.BadExpirationError=void 0;bl.toKnownErr=Y9;const CL=W,Z9=x,Q9=_;Q9.is$typed;Z9.validate;class TL extends CL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}bl.BadExpirationError=TL;function Y9(t){return t instanceof CL.XRPCError&&t.error==="BadExpiration"?new TL(t):t}var Vo={};Object.defineProperty(Vo,"__esModule",{value:!0});Vo.AccountTakedownError=void 0;Vo.toKnownErr=iH;Vo.isAppPassword=oH;Vo.validateAppPassword=sH;const kL=W,eH=x,tH=_,rH=tH.is$typed,nH=eH.validate,LL="com.atproto.server.listAppPasswords";let PL=class extends kL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Vo.AccountTakedownError=PL;function iH(t){return t instanceof kL.XRPCError&&t.error==="AccountTakedown"?new PL(t):t}const DL="appPassword";function oH(t){return rH(t,LL,DL)}function sH(t){return nH(t,LL,DL)}var vl={};Object.defineProperty(vl,"__esModule",{value:!0});vl.AccountTakedownError=void 0;vl.toKnownErr=uH;const BL=W,aH=x,lH=_;lH.is$typed;aH.validate;class IL extends BL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}vl.AccountTakedownError=IL;function uH(t){return t instanceof BL.XRPCError&&t.error==="AccountTakedown"?new IL(t):t}var _o={};Object.defineProperty(_o,"__esModule",{value:!0});_o.InvalidTokenError=_o.ExpiredTokenError=void 0;_o.toKnownErr=pH;const nE=W,cH=x,dH=_;dH.is$typed;cH.validate;let jL=class extends nE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};_o.ExpiredTokenError=jL;let UL=class extends nE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};_o.InvalidTokenError=UL;function pH(t){if(t instanceof nE.XRPCError){if(t.error==="ExpiredToken")return new jL(t);if(t.error==="InvalidToken")return new UL(t)}return t}var In={};Object.defineProperty(In,"__esModule",{value:!0});In.TokenRequiredError=In.InvalidTokenError=In.ExpiredTokenError=void 0;In.toKnownErr=yH;const Fy=W,fH=x,hH=_;hH.is$typed;fH.validate;class $L extends Fy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}In.ExpiredTokenError=$L;class OL extends Fy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}In.InvalidTokenError=OL;class KL extends Fy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}In.TokenRequiredError=KL;function yH(t){if(t instanceof Fy.XRPCError){if(t.error==="ExpiredToken")return new $L(t);if(t.error==="InvalidToken")return new OL(t);if(t.error==="TokenRequired")return new KL(t)}return t}var tr={};Object.defineProperty(tr,"__esModule",{value:!0});tr.RepoDeactivatedError=tr.RepoSuspendedError=tr.RepoTakendownError=tr.RepoNotFoundError=tr.BlobNotFoundError=void 0;tr.toKnownErr=bH;const El=W,mH=x,gH=_;gH.is$typed;mH.validate;class VL extends El.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}tr.BlobNotFoundError=VL;let ML=class extends El.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};tr.RepoNotFoundError=ML;let NL=class extends El.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};tr.RepoTakendownError=NL;let zL=class extends El.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};tr.RepoSuspendedError=zL;let FL=class extends El.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};tr.RepoDeactivatedError=FL;function bH(t){if(t instanceof El.XRPCError){if(t.error==="BlobNotFound")return new VL(t);if(t.error==="RepoNotFound")return new ML(t);if(t.error==="RepoTakendown")return new NL(t);if(t.error==="RepoSuspended")return new zL(t);if(t.error==="RepoDeactivated")return new FL(t)}return t}var rr={};Object.defineProperty(rr,"__esModule",{value:!0});rr.RepoDeactivatedError=rr.RepoSuspendedError=rr.RepoTakendownError=rr.RepoNotFoundError=rr.BlockNotFoundError=void 0;rr.toKnownErr=wH;const wl=W,vH=x,EH=_;EH.is$typed;vH.validate;class qL extends wl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}rr.BlockNotFoundError=qL;let GL=class extends wl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};rr.RepoNotFoundError=GL;let HL=class extends wl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};rr.RepoTakendownError=HL;let XL=class extends wl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};rr.RepoSuspendedError=XL;let WL=class extends wl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};rr.RepoDeactivatedError=WL;function wH(t){if(t instanceof wl.XRPCError){if(t.error==="BlockNotFound")return new qL(t);if(t.error==="RepoNotFound")return new GL(t);if(t.error==="RepoTakendown")return new HL(t);if(t.error==="RepoSuspended")return new XL(t);if(t.error==="RepoDeactivated")return new WL(t)}return t}var _l={};Object.defineProperty(_l,"__esModule",{value:!0});_l.HeadNotFoundError=void 0;_l.toKnownErr=RH;const JL=W,_H=x,xH=_;xH.is$typed;_H.validate;class ZL extends JL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}_l.HeadNotFoundError=ZL;function RH(t){return t instanceof JL.XRPCError&&t.error==="HeadNotFound"?new ZL(t):t}var xl={};Object.defineProperty(xl,"__esModule",{value:!0});xl.HostNotFoundError=void 0;xl.toKnownErr=CH;const QL=W,AH=x,SH=_;SH.is$typed;AH.validate;class YL extends QL.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}xl.HostNotFoundError=YL;function CH(t){return t instanceof QL.XRPCError&&t.error==="HostNotFound"?new YL(t):t}var Br={};Object.defineProperty(Br,"__esModule",{value:!0});Br.RepoDeactivatedError=Br.RepoSuspendedError=Br.RepoTakendownError=Br.RepoNotFoundError=void 0;Br.toKnownErr=LH;const kd=W,TH=x,kH=_;kH.is$typed;TH.validate;let eP=class extends kd.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Br.RepoNotFoundError=eP;let tP=class extends kd.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Br.RepoTakendownError=tP;let rP=class extends kd.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Br.RepoSuspendedError=rP;let nP=class extends kd.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Br.RepoDeactivatedError=nP;function LH(t){if(t instanceof kd.XRPCError){if(t.error==="RepoNotFound")return new eP(t);if(t.error==="RepoTakendown")return new tP(t);if(t.error==="RepoSuspended")return new rP(t);if(t.error==="RepoDeactivated")return new nP(t)}return t}var nr={};Object.defineProperty(nr,"__esModule",{value:!0});nr.RepoDeactivatedError=nr.RepoSuspendedError=nr.RepoTakendownError=nr.RepoNotFoundError=nr.RecordNotFoundError=void 0;nr.toKnownErr=BH;const Rl=W,PH=x,DH=_;DH.is$typed;PH.validate;let iP=class extends Rl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};nr.RecordNotFoundError=iP;let oP=class extends Rl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};nr.RepoNotFoundError=oP;let sP=class extends Rl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};nr.RepoTakendownError=sP;let aP=class extends Rl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};nr.RepoSuspendedError=aP;let lP=class extends Rl.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};nr.RepoDeactivatedError=lP;function BH(t){if(t instanceof Rl.XRPCError){if(t.error==="RecordNotFound")return new iP(t);if(t.error==="RepoNotFound")return new oP(t);if(t.error==="RepoTakendown")return new sP(t);if(t.error==="RepoSuspended")return new aP(t);if(t.error==="RepoDeactivated")return new lP(t)}return t}var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.RepoDeactivatedError=Ir.RepoSuspendedError=Ir.RepoTakendownError=Ir.RepoNotFoundError=void 0;Ir.toKnownErr=UH;const Ld=W,IH=x,jH=_;jH.is$typed;IH.validate;let uP=class extends Ld.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ir.RepoNotFoundError=uP;let cP=class extends Ld.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ir.RepoTakendownError=cP;let dP=class extends Ld.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ir.RepoSuspendedError=dP;let pP=class extends Ld.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ir.RepoDeactivatedError=pP;function UH(t){if(t instanceof Ld.XRPCError){if(t.error==="RepoNotFound")return new uP(t);if(t.error==="RepoTakendown")return new cP(t);if(t.error==="RepoSuspended")return new dP(t);if(t.error==="RepoDeactivated")return new pP(t)}return t}var Al={};Object.defineProperty(Al,"__esModule",{value:!0});Al.RepoNotFoundError=void 0;Al.toKnownErr=KH;const fP=W,$H=x,OH=_;OH.is$typed;$H.validate;let hP=class extends fP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Al.RepoNotFoundError=hP;function KH(t){return t instanceof fP.XRPCError&&t.error==="RepoNotFound"?new hP(t):t}var jr={};Object.defineProperty(jr,"__esModule",{value:!0});jr.RepoDeactivatedError=jr.RepoSuspendedError=jr.RepoTakendownError=jr.RepoNotFoundError=void 0;jr.toKnownErr=NH;const Pd=W,VH=x,MH=_;MH.is$typed;VH.validate;let yP=class extends Pd.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};jr.RepoNotFoundError=yP;class mP extends Pd.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jr.RepoTakendownError=mP;class gP extends Pd.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jr.RepoSuspendedError=gP;class bP extends Pd.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jr.RepoDeactivatedError=bP;function NH(t){if(t instanceof Pd.XRPCError){if(t.error==="RepoNotFound")return new yP(t);if(t.error==="RepoTakendown")return new mP(t);if(t.error==="RepoSuspended")return new gP(t);if(t.error==="RepoDeactivated")return new bP(t)}return t}var Sl={};Object.defineProperty(Sl,"__esModule",{value:!0});Sl.HostBannedError=void 0;Sl.toKnownErr=qH;const vP=W,zH=x,FH=_;FH.is$typed;zH.validate;class EP extends vP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Sl.HostBannedError=EP;function qH(t){return t instanceof vP.XRPCError&&t.error==="HostBanned"?new EP(t):t}var xo={};Object.defineProperty(xo,"__esModule",{value:!0});xo.BlockedByActorError=xo.BlockedActorError=void 0;xo.toKnownErr=XH;const iE=W,GH=x,HH=_;HH.is$typed;GH.validate;let wP=class extends iE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};xo.BlockedActorError=wP;let _P=class extends iE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};xo.BlockedByActorError=_P;function XH(t){if(t instanceof iE.XRPCError){if(t.error==="BlockedActor")return new wP(t);if(t.error==="BlockedByActor")return new _P(t)}return t}var Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});Ro.BlockedByActorError=Ro.BlockedActorError=void 0;Ro.toKnownErr=ZH;const oE=W,WH=x,JH=_;JH.is$typed;WH.validate;class xP extends oE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Ro.BlockedActorError=xP;class RP extends oE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Ro.BlockedByActorError=RP;function ZH(t){if(t instanceof oE.XRPCError){if(t.error==="BlockedActor")return new xP(t);if(t.error==="BlockedByActor")return new RP(t)}return t}var Cl={};Object.defineProperty(Cl,"__esModule",{value:!0});Cl.UnknownFeedError=void 0;Cl.toKnownErr=e7;const AP=W,QH=x,YH=_;YH.is$typed;QH.validate;let SP=class extends AP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Cl.UnknownFeedError=SP;function e7(t){return t instanceof AP.XRPCError&&t.error==="UnknownFeed"?new SP(t):t}var Tl={};Object.defineProperty(Tl,"__esModule",{value:!0});Tl.UnknownFeedError=void 0;Tl.toKnownErr=n7;const CP=W,t7=x,r7=_;r7.is$typed;t7.validate;class TP extends CP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Tl.UnknownFeedError=TP;function n7(t){return t instanceof CP.XRPCError&&t.error==="UnknownFeed"?new TP(t):t}var kl={};Object.defineProperty(kl,"__esModule",{value:!0});kl.UnknownListError=void 0;kl.toKnownErr=s7;const kP=W,i7=x,o7=_;o7.is$typed;i7.validate;class LP extends kP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}kl.UnknownListError=LP;function s7(t){return t instanceof kP.XRPCError&&t.error==="UnknownList"?new LP(t):t}var Ll={};Object.defineProperty(Ll,"__esModule",{value:!0});Ll.NotFoundError=void 0;Ll.toKnownErr=u7;const PP=W,a7=x,l7=_;l7.is$typed;a7.validate;class DP extends PP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Ll.NotFoundError=DP;function u7(t){return t instanceof PP.XRPCError&&t.error==="NotFound"?new DP(t):t}var Pl={};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.BadQueryStringError=void 0;Pl.toKnownErr=p7;const BP=W,c7=x,d7=_;d7.is$typed;c7.validate;let IP=class extends BP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Pl.BadQueryStringError=IP;function p7(t){return t instanceof BP.XRPCError&&t.error==="BadQueryString"?new IP(t):t}var Dl={};Object.defineProperty(Dl,"__esModule",{value:!0});Dl.ActorNotFoundError=void 0;Dl.toKnownErr=y7;const jP=W,f7=x,h7=_;h7.is$typed;f7.validate;class UP extends jP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Dl.ActorNotFoundError=UP;function y7(t){return t instanceof jP.XRPCError&&t.error==="ActorNotFound"?new UP(t):t}var Bl={};Object.defineProperty(Bl,"__esModule",{value:!0});Bl.BadQueryStringError=void 0;Bl.toKnownErr=b7;const $P=W,m7=x,g7=_;g7.is$typed;m7.validate;let OP=class extends $P.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Bl.BadQueryStringError=OP;function b7(t){return t instanceof $P.XRPCError&&t.error==="BadQueryString"?new OP(t):t}var Il={};Object.defineProperty(Il,"__esModule",{value:!0});Il.BadQueryStringError=void 0;Il.toKnownErr=w7;const KP=W,v7=x,E7=_;E7.is$typed;v7.validate;let VP=class extends KP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Il.BadQueryStringError=VP;function w7(t){return t instanceof KP.XRPCError&&t.error==="BadQueryString"?new VP(t):t}var jl={};Object.defineProperty(jl,"__esModule",{value:!0});jl.BadQueryStringError=void 0;jl.toKnownErr=R7;const MP=W,_7=x,x7=_;x7.is$typed;_7.validate;class NP extends MP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jl.BadQueryStringError=NP;function R7(t){return t instanceof MP.XRPCError&&t.error==="BadQueryString"?new NP(t):t}var jn={};Object.defineProperty(jn,"__esModule",{value:!0});jn.ReactionInvalidValueError=jn.ReactionLimitReachedError=jn.ReactionMessageDeletedError=void 0;jn.toKnownErr=C7;const qy=W,A7=x,S7=_;S7.is$typed;A7.validate;let zP=class extends qy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};jn.ReactionMessageDeletedError=zP;class FP extends qy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}jn.ReactionLimitReachedError=FP;let qP=class extends qy.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};jn.ReactionInvalidValueError=qP;function C7(t){if(t instanceof qy.XRPCError){if(t.error==="ReactionMessageDeleted")return new zP(t);if(t.error==="ReactionLimitReached")return new FP(t);if(t.error==="ReactionInvalidValue")return new qP(t)}return t}var Ao={};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.ReactionInvalidValueError=Ao.ReactionMessageDeletedError=void 0;Ao.toKnownErr=L7;const sE=W,T7=x,k7=_;k7.is$typed;T7.validate;class GP extends sE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Ao.ReactionMessageDeletedError=GP;class HP extends sE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Ao.ReactionInvalidValueError=HP;function L7(t){if(t instanceof sE.XRPCError){if(t.error==="ReactionMessageDeleted")return new GP(t);if(t.error==="ReactionInvalidValue")return new HP(t)}return t}var Ul={};Object.defineProperty(Ul,"__esModule",{value:!0});Ul.DuplicateTemplateNameError=void 0;Ul.toKnownErr=B7;const XP=W,P7=x,D7=_;D7.is$typed;P7.validate;let WP=class extends XP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ul.DuplicateTemplateNameError=WP;function B7(t){return t instanceof XP.XRPCError&&t.error==="DuplicateTemplateName"?new WP(t):t}var $l={};Object.defineProperty($l,"__esModule",{value:!0});$l.DuplicateTemplateNameError=void 0;$l.toKnownErr=U7;const JP=W,I7=x,j7=_;j7.is$typed;I7.validate;class ZP extends JP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}$l.DuplicateTemplateNameError=ZP;function U7(t){return t instanceof JP.XRPCError&&t.error==="DuplicateTemplateName"?new ZP(t):t}var Ol={};Object.defineProperty(Ol,"__esModule",{value:!0});Ol.SubjectHasActionError=void 0;Ol.toKnownErr=K7;const QP=W,$7=x,O7=_;O7.is$typed;$7.validate;class YP extends QP.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Ol.SubjectHasActionError=YP;function K7(t){return t instanceof QP.XRPCError&&t.error==="SubjectHasAction"?new YP(t):t}var Kl={};Object.defineProperty(Kl,"__esModule",{value:!0});Kl.RecordNotFoundError=void 0;Kl.toKnownErr=N7;const eD=W,V7=x,M7=_;M7.is$typed;V7.validate;class tD extends eD.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Kl.RecordNotFoundError=tD;function N7(t){return t instanceof eD.XRPCError&&t.error==="RecordNotFound"?new tD(t):t}var Vl={};Object.defineProperty(Vl,"__esModule",{value:!0});Vl.RepoNotFoundError=void 0;Vl.toKnownErr=q7;const rD=W,z7=x,F7=_;F7.is$typed;z7.validate;class nD extends rD.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Vl.RepoNotFoundError=nD;function q7(t){return t instanceof rD.XRPCError&&t.error==="RepoNotFound"?new nD(t):t}var Ml={};Object.defineProperty(Ml,"__esModule",{value:!0});Ml.SetNotFoundError=void 0;Ml.toKnownErr=X7;const iD=W,G7=x,H7=_;H7.is$typed;G7.validate;let oD=class extends iD.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Ml.SetNotFoundError=oD;function X7(t){return t instanceof iD.XRPCError&&t.error==="SetNotFound"?new oD(t):t}var Nl={};Object.defineProperty(Nl,"__esModule",{value:!0});Nl.SetNotFoundError=void 0;Nl.toKnownErr=Z7;const sD=W,W7=x,J7=_;J7.is$typed;W7.validate;let aD=class extends sD.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};Nl.SetNotFoundError=aD;function Z7(t){return t instanceof sD.XRPCError&&t.error==="SetNotFound"?new aD(t):t}var zl={};Object.defineProperty(zl,"__esModule",{value:!0});zl.SetNotFoundError=void 0;zl.toKnownErr=eX;const lD=W,Q7=x,Y7=_;Y7.is$typed;Q7.validate;class uD extends lD.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}zl.SetNotFoundError=uD;function eX(t){return t instanceof lD.XRPCError&&t.error==="SetNotFound"?new uD(t):t}var Fl={};Object.defineProperty(Fl,"__esModule",{value:!0});Fl.MemberAlreadyExistsError=void 0;Fl.toKnownErr=nX;const cD=W,tX=x,rX=_;rX.is$typed;tX.validate;class dD extends cD.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}Fl.MemberAlreadyExistsError=dD;function nX(t){return t instanceof cD.XRPCError&&t.error==="MemberAlreadyExists"?new dD(t):t}var So={};Object.defineProperty(So,"__esModule",{value:!0});So.CannotDeleteSelfError=So.MemberNotFoundError=void 0;So.toKnownErr=sX;const aE=W,iX=x,oX=_;oX.is$typed;iX.validate;let pD=class extends aE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};So.MemberNotFoundError=pD;class fD extends aE.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}So.CannotDeleteSelfError=fD;function sX(t){if(t instanceof aE.XRPCError){if(t.error==="MemberNotFound")return new pD(t);if(t.error==="CannotDeleteSelf")return new fD(t)}return t}var ql={};Object.defineProperty(ql,"__esModule",{value:!0});ql.MemberNotFoundError=void 0;ql.toKnownErr=uX;const hD=W,aX=x,lX=_;lX.is$typed;aX.validate;class yD extends hD.XRPCError{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}ql.MemberNotFoundError=yD;function uX(t){return t instanceof hD.XRPCError&&t.error==="MemberNotFound"?new yD(t):t}var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.isStatusAttr=pX;Nr.validateStatusAttr=fX;Nr.isAccountView=hX;Nr.validateAccountView=yX;Nr.isRepoRef=mX;Nr.validateRepoRef=gX;Nr.isRepoBlobRef=bX;Nr.validateRepoBlobRef=vX;Nr.isThreatSignature=EX;Nr.validateThreatSignature=wX;const cX=x,dX=_,Dd=dX.is$typed,Bd=cX.validate,zn="com.atproto.admin.defs",mD="statusAttr";function pX(t){return Dd(t,zn,mD)}function fX(t){return Bd(t,zn,mD)}const gD="accountView";function hX(t){return Dd(t,zn,gD)}function yX(t){return Bd(t,zn,gD)}const bD="repoRef";function mX(t){return Dd(t,zn,bD)}function gX(t){return Bd(t,zn,bD)}const vD="repoBlobRef";function bX(t){return Dd(t,zn,vD)}function vX(t){return Bd(t,zn,vD)}const ED="threatSignature";function EX(t){return Dd(t,zn,ED)}function wX(t){return Bd(t,zn,ED)}var lE={};Object.defineProperty(lE,"__esModule",{value:!0});lE.toKnownErr=RX;const _X=x,xX=_;xX.is$typed;_X.validate;function RX(t){return t}var uE={};Object.defineProperty(uE,"__esModule",{value:!0});uE.toKnownErr=CX;const AX=x,SX=_;SX.is$typed;AX.validate;function CX(t){return t}var cE={};Object.defineProperty(cE,"__esModule",{value:!0});cE.toKnownErr=LX;const TX=x,kX=_;kX.is$typed;TX.validate;function LX(t){return t}var dE={};Object.defineProperty(dE,"__esModule",{value:!0});dE.toKnownErr=BX;const PX=x,DX=_;DX.is$typed;PX.validate;function BX(t){return t}var pE={};Object.defineProperty(pE,"__esModule",{value:!0});pE.toKnownErr=UX;const IX=x,jX=_;jX.is$typed;IX.validate;function UX(t){return t}var fE={};Object.defineProperty(fE,"__esModule",{value:!0});fE.toKnownErr=KX;const $X=x,OX=_;OX.is$typed;$X.validate;function KX(t){return t}var hE={};Object.defineProperty(hE,"__esModule",{value:!0});hE.toKnownErr=NX;const VX=x,MX=_;MX.is$typed;VX.validate;function NX(t){return t}var yE={};Object.defineProperty(yE,"__esModule",{value:!0});yE.toKnownErr=qX;const zX=x,FX=_;FX.is$typed;zX.validate;function qX(t){return t}var mE={};Object.defineProperty(mE,"__esModule",{value:!0});mE.toKnownErr=XX;const GX=x,HX=_;HX.is$typed;GX.validate;function XX(t){return t}var gE={};Object.defineProperty(gE,"__esModule",{value:!0});gE.toKnownErr=ZX;const WX=x,JX=_;JX.is$typed;WX.validate;function ZX(t){return t}var bE={};Object.defineProperty(bE,"__esModule",{value:!0});bE.toKnownErr=eW;const QX=x,YX=_;YX.is$typed;QX.validate;function eW(t){return t}var vE={};Object.defineProperty(vE,"__esModule",{value:!0});vE.toKnownErr=nW;const tW=x,rW=_;rW.is$typed;tW.validate;function nW(t){return t}var EE={};Object.defineProperty(EE,"__esModule",{value:!0});EE.toKnownErr=sW;const iW=x,oW=_;oW.is$typed;iW.validate;function sW(t){return t}var wE={};Object.defineProperty(wE,"__esModule",{value:!0});wE.toKnownErr=uW;const aW=x,lW=_;lW.is$typed;aW.validate;function uW(t){return t}var _E={};Object.defineProperty(_E,"__esModule",{value:!0});_E.toKnownErr=pW;const cW=x,dW=_;dW.is$typed;cW.validate;function pW(t){return t}var Gy={};Object.defineProperty(Gy,"__esModule",{value:!0});Gy.isIdentityInfo=gW;Gy.validateIdentityInfo=bW;const fW=x,hW=_,yW=hW.is$typed,mW=fW.validate,wD="com.atproto.identity.defs",_D="identityInfo";function gW(t){return yW(t,wD,_D)}function bW(t){return mW(t,wD,_D)}var xE={};Object.defineProperty(xE,"__esModule",{value:!0});xE.toKnownErr=wW;const vW=x,EW=_;EW.is$typed;vW.validate;function wW(t){return t}var RE={};Object.defineProperty(RE,"__esModule",{value:!0});RE.toKnownErr=RW;const _W=x,xW=_;xW.is$typed;_W.validate;function RW(t){return t}var AE={};Object.defineProperty(AE,"__esModule",{value:!0});AE.toKnownErr=CW;const AW=x,SW=_;SW.is$typed;AW.validate;function CW(t){return t}var SE={};Object.defineProperty(SE,"__esModule",{value:!0});SE.toKnownErr=LW;const TW=x,kW=_;kW.is$typed;TW.validate;function LW(t){return t}var CE={};Object.defineProperty(CE,"__esModule",{value:!0});CE.toKnownErr=BW;const PW=x,DW=_;DW.is$typed;PW.validate;function BW(t){return t}var zr={};Object.defineProperty(zr,"__esModule",{value:!0});zr.isLabel=UW;zr.validateLabel=$W;zr.isSelfLabels=OW;zr.validateSelfLabels=KW;zr.isSelfLabel=VW;zr.validateSelfLabel=MW;zr.isLabelValueDefinition=NW;zr.validateLabelValueDefinition=zW;zr.isLabelValueDefinitionStrings=FW;zr.validateLabelValueDefinitionStrings=qW;const IW=x,jW=_,Id=jW.is$typed,jd=IW.validate,Fn="com.atproto.label.defs",xD="label";function UW(t){return Id(t,Fn,xD)}function $W(t){return jd(t,Fn,xD)}const RD="selfLabels";function OW(t){return Id(t,Fn,RD)}function KW(t){return jd(t,Fn,RD)}const AD="selfLabel";function VW(t){return Id(t,Fn,AD)}function MW(t){return jd(t,Fn,AD)}const SD="labelValueDefinition";function NW(t){return Id(t,Fn,SD)}function zW(t){return jd(t,Fn,SD)}const CD="labelValueDefinitionStrings";function FW(t){return Id(t,Fn,CD)}function qW(t){return jd(t,Fn,CD)}var TE={};Object.defineProperty(TE,"__esModule",{value:!0});TE.toKnownErr=XW;const GW=x,HW=_;HW.is$typed;GW.validate;function XW(t){return t}var Gl={};Object.defineProperty(Gl,"__esModule",{value:!0});Gl.isLabels=ZW;Gl.validateLabels=QW;Gl.isInfo=YW;Gl.validateInfo=eJ;const WW=x,JW=_,TD=JW.is$typed,kD=WW.validate,Hy="com.atproto.label.subscribeLabels",LD="labels";function ZW(t){return TD(t,Hy,LD)}function QW(t){return kD(t,Hy,LD)}const PD="info";function YW(t){return TD(t,Hy,PD)}function eJ(t){return kD(t,Hy,PD)}var Xy={};Object.defineProperty(Xy,"__esModule",{value:!0});Xy.isRecord=oJ;Xy.validateRecord=sJ;const tJ=x,rJ=_,nJ=rJ.is$typed,iJ=tJ.validate,DD="com.atproto.lexicon.schema",BD="main";function oJ(t){return nJ(t,DD,BD)}function sJ(t){return iJ(t,DD,BD,!0)}var kE={};Object.defineProperty(kE,"__esModule",{value:!0});kE.toKnownErr=uJ;const aJ=x,lJ=_;lJ.is$typed;aJ.validate;function uJ(t){return t}var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.REASONAPPEAL=Pt.REASONOTHER=Pt.REASONRUDE=Pt.REASONSEXUAL=Pt.REASONMISLEADING=Pt.REASONVIOLATION=Pt.REASONSPAM=void 0;const cJ=x,dJ=_;dJ.is$typed;cJ.validate;const Os="com.atproto.moderation.defs";Pt.REASONSPAM=`${Os}#reasonSpam`;Pt.REASONVIOLATION=`${Os}#reasonViolation`;Pt.REASONMISLEADING=`${Os}#reasonMisleading`;Pt.REASONSEXUAL=`${Os}#reasonSexual`;Pt.REASONRUDE=`${Os}#reasonRude`;Pt.REASONOTHER=`${Os}#reasonOther`;Pt.REASONAPPEAL=`${Os}#reasonAppeal`;var Wy={};Object.defineProperty(Wy,"__esModule",{value:!0});Wy.isCommitMeta=mJ;Wy.validateCommitMeta=gJ;const pJ=x,fJ=_,hJ=fJ.is$typed,yJ=pJ.validate,ID="com.atproto.repo.defs",jD="commitMeta";function mJ(t){return hJ(t,ID,jD)}function gJ(t){return yJ(t,ID,jD)}var LE={};Object.defineProperty(LE,"__esModule",{value:!0});LE.toKnownErr=EJ;const bJ=x,vJ=_;vJ.is$typed;bJ.validate;function EJ(t){return t}var PE={};Object.defineProperty(PE,"__esModule",{value:!0});PE.toKnownErr=xJ;const wJ=x,_J=_;_J.is$typed;wJ.validate;function xJ(t){return t}var Ud={};Object.defineProperty(Ud,"__esModule",{value:!0});Ud.toKnownErr=TJ;Ud.isRecordBlob=kJ;Ud.validateRecordBlob=LJ;const RJ=x,AJ=_,SJ=AJ.is$typed,CJ=RJ.validate,UD="com.atproto.repo.listMissingBlobs";function TJ(t){return t}const $D="recordBlob";function kJ(t){return SJ(t,UD,$D)}function LJ(t){return CJ(t,UD,$D)}var $d={};Object.defineProperty($d,"__esModule",{value:!0});$d.toKnownErr=jJ;$d.isRecord=UJ;$d.validateRecord=$J;const PJ=x,DJ=_,BJ=DJ.is$typed,IJ=PJ.validate,OD="com.atproto.repo.listRecords";function jJ(t){return t}const KD="record";function UJ(t){return BJ(t,OD,KD)}function $J(t){return IJ(t,OD,KD)}var Jy={};Object.defineProperty(Jy,"__esModule",{value:!0});Jy.isMain=NJ;Jy.validateMain=zJ;const OJ=x,KJ=_,VJ=KJ.is$typed,MJ=OJ.validate,VD="com.atproto.repo.strongRef",MD="main";function NJ(t){return VJ(t,VD,MD)}function zJ(t){return MJ(t,VD,MD)}var DE={};Object.defineProperty(DE,"__esModule",{value:!0});DE.toKnownErr=GJ;const FJ=x,qJ=_;qJ.is$typed;FJ.validate;function GJ(t){return t}var BE={};Object.defineProperty(BE,"__esModule",{value:!0});BE.toKnownErr=WJ;const HJ=x,XJ=_;XJ.is$typed;HJ.validate;function WJ(t){return t}var IE={};Object.defineProperty(IE,"__esModule",{value:!0});IE.toKnownErr=QJ;const JJ=x,ZJ=_;ZJ.is$typed;JJ.validate;function QJ(t){return t}var jE={};Object.defineProperty(jE,"__esModule",{value:!0});jE.toKnownErr=tZ;const YJ=x,eZ=_;eZ.is$typed;YJ.validate;function tZ(t){return t}var Od={};Object.defineProperty(Od,"__esModule",{value:!0});Od.toKnownErr=sZ;Od.isAccountCodes=aZ;Od.validateAccountCodes=lZ;const rZ=x,nZ=_,iZ=nZ.is$typed,oZ=rZ.validate,ND="com.atproto.server.createInviteCodes";function sZ(t){return t}const zD="accountCodes";function aZ(t){return iZ(t,ND,zD)}function lZ(t){return oZ(t,ND,zD)}var UE={};Object.defineProperty(UE,"__esModule",{value:!0});UE.toKnownErr=dZ;const uZ=x,cZ=_;cZ.is$typed;uZ.validate;function dZ(t){return t}var Hl={};Object.defineProperty(Hl,"__esModule",{value:!0});Hl.isInviteCode=hZ;Hl.validateInviteCode=yZ;Hl.isInviteCodeUse=mZ;Hl.validateInviteCodeUse=gZ;const pZ=x,fZ=_,FD=fZ.is$typed,qD=pZ.validate,Zy="com.atproto.server.defs",GD="inviteCode";function hZ(t){return FD(t,Zy,GD)}function yZ(t){return qD(t,Zy,GD)}const HD="inviteCodeUse";function mZ(t){return FD(t,Zy,HD)}function gZ(t){return qD(t,Zy,HD)}var $E={};Object.defineProperty($E,"__esModule",{value:!0});$E.toKnownErr=EZ;const bZ=x,vZ=_;vZ.is$typed;bZ.validate;function EZ(t){return t}var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.toKnownErr=xZ;Ks.isLinks=RZ;Ks.validateLinks=AZ;Ks.isContact=SZ;Ks.validateContact=CZ;const wZ=x,_Z=_,XD=_Z.is$typed,WD=wZ.validate,Qy="com.atproto.server.describeServer";function xZ(t){return t}const JD="links";function RZ(t){return XD(t,Qy,JD)}function AZ(t){return WD(t,Qy,JD)}const ZD="contact";function SZ(t){return XD(t,Qy,ZD)}function CZ(t){return WD(t,Qy,ZD)}var OE={};Object.defineProperty(OE,"__esModule",{value:!0});OE.toKnownErr=LZ;const TZ=x,kZ=_;kZ.is$typed;TZ.validate;function LZ(t){return t}var KE={};Object.defineProperty(KE,"__esModule",{value:!0});KE.toKnownErr=BZ;const PZ=x,DZ=_;DZ.is$typed;PZ.validate;function BZ(t){return t}var VE={};Object.defineProperty(VE,"__esModule",{value:!0});VE.toKnownErr=UZ;const IZ=x,jZ=_;jZ.is$typed;IZ.validate;function UZ(t){return t}var ME={};Object.defineProperty(ME,"__esModule",{value:!0});ME.toKnownErr=KZ;const $Z=x,OZ=_;OZ.is$typed;$Z.validate;function KZ(t){return t}var NE={};Object.defineProperty(NE,"__esModule",{value:!0});NE.toKnownErr=NZ;const VZ=x,MZ=_;MZ.is$typed;VZ.validate;function NZ(t){return t}var zE={};Object.defineProperty(zE,"__esModule",{value:!0});zE.toKnownErr=qZ;const zZ=x,FZ=_;FZ.is$typed;zZ.validate;function qZ(t){return t}var FE={};Object.defineProperty(FE,"__esModule",{value:!0});FE.toKnownErr=XZ;const GZ=x,HZ=_;HZ.is$typed;GZ.validate;function XZ(t){return t}var QD={};Object.defineProperty(QD,"__esModule",{value:!0});const WZ=x,JZ=_;JZ.is$typed;WZ.validate;var qE={};Object.defineProperty(qE,"__esModule",{value:!0});qE.toKnownErr=YZ;const ZZ=x,QZ=_;QZ.is$typed;ZZ.validate;function YZ(t){return t}var Kd={};Object.defineProperty(Kd,"__esModule",{value:!0});Kd.toKnownErr=iQ;Kd.isHost=oQ;Kd.validateHost=sQ;const eQ=x,tQ=_,rQ=tQ.is$typed,nQ=eQ.validate,YD="com.atproto.sync.listHosts";function iQ(t){return t}const eB="host";function oQ(t){return rQ(t,YD,eB)}function sQ(t){return nQ(t,YD,eB)}var Vd={};Object.defineProperty(Vd,"__esModule",{value:!0});Vd.toKnownErr=dQ;Vd.isRepo=pQ;Vd.validateRepo=fQ;const aQ=x,lQ=_,uQ=lQ.is$typed,cQ=aQ.validate,tB="com.atproto.sync.listRepos";function dQ(t){return t}const rB="repo";function pQ(t){return uQ(t,tB,rB)}function fQ(t){return cQ(t,tB,rB)}var Md={};Object.defineProperty(Md,"__esModule",{value:!0});Md.toKnownErr=bQ;Md.isRepo=vQ;Md.validateRepo=EQ;const hQ=x,yQ=_,mQ=yQ.is$typed,gQ=hQ.validate,nB="com.atproto.sync.listReposByCollection";function bQ(t){return t}const iB="repo";function vQ(t){return mQ(t,nB,iB)}function EQ(t){return gQ(t,nB,iB)}var GE={};Object.defineProperty(GE,"__esModule",{value:!0});GE.toKnownErr=xQ;const wQ=x,_Q=_;_Q.is$typed;wQ.validate;function xQ(t){return t}var dr={};Object.defineProperty(dr,"__esModule",{value:!0});dr.isCommit=SQ;dr.validateCommit=CQ;dr.isSync=TQ;dr.validateSync=kQ;dr.isIdentity=LQ;dr.validateIdentity=PQ;dr.isAccount=DQ;dr.validateAccount=BQ;dr.isInfo=IQ;dr.validateInfo=jQ;dr.isRepoOp=UQ;dr.validateRepoOp=$Q;const RQ=x,AQ=_,Xl=AQ.is$typed,Wl=RQ.validate,Fr="com.atproto.sync.subscribeRepos",oB="commit";function SQ(t){return Xl(t,Fr,oB)}function CQ(t){return Wl(t,Fr,oB)}const sB="sync";function TQ(t){return Xl(t,Fr,sB)}function kQ(t){return Wl(t,Fr,sB)}const aB="identity";function LQ(t){return Xl(t,Fr,aB)}function PQ(t){return Wl(t,Fr,aB)}const lB="account";function DQ(t){return Xl(t,Fr,lB)}function BQ(t){return Wl(t,Fr,lB)}const uB="info";function IQ(t){return Xl(t,Fr,uB)}function jQ(t){return Wl(t,Fr,uB)}const cB="repoOp";function UQ(t){return Xl(t,Fr,cB)}function $Q(t){return Wl(t,Fr,cB)}var HE={};Object.defineProperty(HE,"__esModule",{value:!0});HE.toKnownErr=VQ;const OQ=x,KQ=_;KQ.is$typed;OQ.validate;function VQ(t){return t}var XE={};Object.defineProperty(XE,"__esModule",{value:!0});XE.toKnownErr=zQ;const MQ=x,NQ=_;NQ.is$typed;MQ.validate;function zQ(t){return t}var WE={};Object.defineProperty(WE,"__esModule",{value:!0});WE.toKnownErr=GQ;const FQ=x,qQ=_;qQ.is$typed;FQ.validate;function GQ(t){return t}var JE={};Object.defineProperty(JE,"__esModule",{value:!0});JE.toKnownErr=WQ;const HQ=x,XQ=_;XQ.is$typed;HQ.validate;function WQ(t){return t}var H={};Object.defineProperty(H,"__esModule",{value:!0});H.isProfileViewBasic=QQ;H.validateProfileViewBasic=YQ;H.isProfileView=eY;H.validateProfileView=tY;H.isProfileViewDetailed=rY;H.validateProfileViewDetailed=nY;H.isProfileAssociated=iY;H.validateProfileAssociated=oY;H.isProfileAssociatedChat=sY;H.validateProfileAssociatedChat=aY;H.isViewerState=lY;H.validateViewerState=uY;H.isKnownFollowers=cY;H.validateKnownFollowers=dY;H.isVerificationState=pY;H.validateVerificationState=fY;H.isVerificationView=hY;H.validateVerificationView=yY;H.isAdultContentPref=mY;H.validateAdultContentPref=gY;H.isContentLabelPref=bY;H.validateContentLabelPref=vY;H.isSavedFeed=EY;H.validateSavedFeed=wY;H.isSavedFeedsPrefV2=_Y;H.validateSavedFeedsPrefV2=xY;H.isSavedFeedsPref=RY;H.validateSavedFeedsPref=AY;H.isPersonalDetailsPref=SY;H.validatePersonalDetailsPref=CY;H.isFeedViewPref=TY;H.validateFeedViewPref=kY;H.isThreadViewPref=LY;H.validateThreadViewPref=PY;H.isInterestsPref=DY;H.validateInterestsPref=BY;H.isMutedWord=IY;H.validateMutedWord=jY;H.isMutedWordsPref=UY;H.validateMutedWordsPref=$Y;H.isHiddenPostsPref=OY;H.validateHiddenPostsPref=KY;H.isLabelersPref=VY;H.validateLabelersPref=MY;H.isLabelerPrefItem=NY;H.validateLabelerPrefItem=zY;H.isBskyAppStatePref=FY;H.validateBskyAppStatePref=qY;H.isBskyAppProgressGuide=GY;H.validateBskyAppProgressGuide=HY;H.isNux=XY;H.validateNux=WY;H.isVerificationPrefs=JY;H.validateVerificationPrefs=ZY;H.isPostInteractionSettingsPref=QY;H.validatePostInteractionSettingsPref=YY;H.isStatusView=eee;H.validateStatusView=tee;const JQ=x,ZQ=_,Re=ZQ.is$typed,Ae=JQ.validate,J="app.bsky.actor.defs",dB="profileViewBasic";function QQ(t){return Re(t,J,dB)}function YQ(t){return Ae(t,J,dB)}const pB="profileView";function eY(t){return Re(t,J,pB)}function tY(t){return Ae(t,J,pB)}const fB="profileViewDetailed";function rY(t){return Re(t,J,fB)}function nY(t){return Ae(t,J,fB)}const hB="profileAssociated";function iY(t){return Re(t,J,hB)}function oY(t){return Ae(t,J,hB)}const yB="profileAssociatedChat";function sY(t){return Re(t,J,yB)}function aY(t){return Ae(t,J,yB)}const mB="viewerState";function lY(t){return Re(t,J,mB)}function uY(t){return Ae(t,J,mB)}const gB="knownFollowers";function cY(t){return Re(t,J,gB)}function dY(t){return Ae(t,J,gB)}const bB="verificationState";function pY(t){return Re(t,J,bB)}function fY(t){return Ae(t,J,bB)}const vB="verificationView";function hY(t){return Re(t,J,vB)}function yY(t){return Ae(t,J,vB)}const EB="adultContentPref";function mY(t){return Re(t,J,EB)}function gY(t){return Ae(t,J,EB)}const wB="contentLabelPref";function bY(t){return Re(t,J,wB)}function vY(t){return Ae(t,J,wB)}const _B="savedFeed";function EY(t){return Re(t,J,_B)}function wY(t){return Ae(t,J,_B)}const xB="savedFeedsPrefV2";function _Y(t){return Re(t,J,xB)}function xY(t){return Ae(t,J,xB)}const RB="savedFeedsPref";function RY(t){return Re(t,J,RB)}function AY(t){return Ae(t,J,RB)}const AB="personalDetailsPref";function SY(t){return Re(t,J,AB)}function CY(t){return Ae(t,J,AB)}const SB="feedViewPref";function TY(t){return Re(t,J,SB)}function kY(t){return Ae(t,J,SB)}const CB="threadViewPref";function LY(t){return Re(t,J,CB)}function PY(t){return Ae(t,J,CB)}const TB="interestsPref";function DY(t){return Re(t,J,TB)}function BY(t){return Ae(t,J,TB)}const kB="mutedWord";function IY(t){return Re(t,J,kB)}function jY(t){return Ae(t,J,kB)}const LB="mutedWordsPref";function UY(t){return Re(t,J,LB)}function $Y(t){return Ae(t,J,LB)}const PB="hiddenPostsPref";function OY(t){return Re(t,J,PB)}function KY(t){return Ae(t,J,PB)}const DB="labelersPref";function VY(t){return Re(t,J,DB)}function MY(t){return Ae(t,J,DB)}const BB="labelerPrefItem";function NY(t){return Re(t,J,BB)}function zY(t){return Ae(t,J,BB)}const IB="bskyAppStatePref";function FY(t){return Re(t,J,IB)}function qY(t){return Ae(t,J,IB)}const jB="bskyAppProgressGuide";function GY(t){return Re(t,J,jB)}function HY(t){return Ae(t,J,jB)}const UB="nux";function XY(t){return Re(t,J,UB)}function WY(t){return Ae(t,J,UB)}const $B="verificationPrefs";function JY(t){return Re(t,J,$B)}function ZY(t){return Ae(t,J,$B)}const OB="postInteractionSettingsPref";function QY(t){return Re(t,J,OB)}function YY(t){return Ae(t,J,OB)}const KB="statusView";function eee(t){return Re(t,J,KB)}function tee(t){return Ae(t,J,KB)}var ZE={};Object.defineProperty(ZE,"__esModule",{value:!0});ZE.toKnownErr=iee;const ree=x,nee=_;nee.is$typed;ree.validate;function iee(t){return t}var QE={};Object.defineProperty(QE,"__esModule",{value:!0});QE.toKnownErr=aee;const oee=x,see=_;see.is$typed;oee.validate;function aee(t){return t}var YE={};Object.defineProperty(YE,"__esModule",{value:!0});YE.toKnownErr=cee;const lee=x,uee=_;uee.is$typed;lee.validate;function cee(t){return t}var ew={};Object.defineProperty(ew,"__esModule",{value:!0});ew.toKnownErr=fee;const dee=x,pee=_;pee.is$typed;dee.validate;function fee(t){return t}var Yy={};Object.defineProperty(Yy,"__esModule",{value:!0});Yy.isRecord=bee;Yy.validateRecord=vee;const hee=x,yee=_,mee=yee.is$typed,gee=hee.validate,VB="app.bsky.actor.profile",MB="main";function bee(t){return mee(t,VB,MB)}function vee(t){return gee(t,VB,MB,!0)}var tw={};Object.defineProperty(tw,"__esModule",{value:!0});tw.toKnownErr=_ee;const Eee=x,wee=_;wee.is$typed;Eee.validate;function _ee(t){return t}var rw={};Object.defineProperty(rw,"__esModule",{value:!0});rw.toKnownErr=Aee;const xee=x,Ree=_;Ree.is$typed;xee.validate;function Aee(t){return t}var nw={};Object.defineProperty(nw,"__esModule",{value:!0});nw.toKnownErr=Tee;const See=x,Cee=_;Cee.is$typed;See.validate;function Tee(t){return t}var Jl={};Object.defineProperty(Jl,"__esModule",{value:!0});Jl.LIVE=void 0;Jl.isRecord=Bee;Jl.validateRecord=Iee;const kee=x,Lee=_,Pee=Lee.is$typed,Dee=kee.validate,iw="app.bsky.actor.status",NB="main";function Bee(t){return Pee(t,iw,NB)}function Iee(t){return Dee(t,iw,NB,!0)}Jl.LIVE=`${iw}#live`;var em={};Object.defineProperty(em,"__esModule",{value:!0});em.isAspectRatio=Kee;em.validateAspectRatio=Vee;const jee=x,Uee=_,$ee=Uee.is$typed,Oee=jee.validate,zB="app.bsky.embed.defs",FB="aspectRatio";function Kee(t){return $ee(t,zB,FB)}function Vee(t){return Oee(t,zB,FB)}var qn={};Object.defineProperty(qn,"__esModule",{value:!0});qn.isMain=zee;qn.validateMain=Fee;qn.isExternal=qee;qn.validateExternal=Gee;qn.isView=Hee;qn.validateView=Xee;qn.isViewExternal=Wee;qn.validateViewExternal=Jee;const Mee=x,Nee=_,tm=Nee.is$typed,rm=Mee.validate,Mo="app.bsky.embed.external",qB="main";function zee(t){return tm(t,Mo,qB)}function Fee(t){return rm(t,Mo,qB)}const GB="external";function qee(t){return tm(t,Mo,GB)}function Gee(t){return rm(t,Mo,GB)}const HB="view";function Hee(t){return tm(t,Mo,HB)}function Xee(t){return rm(t,Mo,HB)}const XB="viewExternal";function Wee(t){return tm(t,Mo,XB)}function Jee(t){return rm(t,Mo,XB)}var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});Gn.isMain=Yee;Gn.validateMain=ete;Gn.isImage=tte;Gn.validateImage=rte;Gn.isView=nte;Gn.validateView=ite;Gn.isViewImage=ote;Gn.validateViewImage=ste;const Zee=x,Qee=_,nm=Qee.is$typed,im=Zee.validate,No="app.bsky.embed.images",WB="main";function Yee(t){return nm(t,No,WB)}function ete(t){return im(t,No,WB)}const JB="image";function tte(t){return nm(t,No,JB)}function rte(t){return im(t,No,JB)}const ZB="view";function nte(t){return nm(t,No,ZB)}function ite(t){return im(t,No,ZB)}const QB="viewImage";function ote(t){return nm(t,No,QB)}function ste(t){return im(t,No,QB)}var pr={};Object.defineProperty(pr,"__esModule",{value:!0});pr.isMain=ute;pr.validateMain=cte;pr.isView=dte;pr.validateView=pte;pr.isViewRecord=fte;pr.validateViewRecord=hte;pr.isViewNotFound=yte;pr.validateViewNotFound=mte;pr.isViewBlocked=gte;pr.validateViewBlocked=bte;pr.isViewDetached=vte;pr.validateViewDetached=Ete;const ate=x,lte=_,Zl=lte.is$typed,Ql=ate.validate,qr="app.bsky.embed.record",YB="main";function ute(t){return Zl(t,qr,YB)}function cte(t){return Ql(t,qr,YB)}const eI="view";function dte(t){return Zl(t,qr,eI)}function pte(t){return Ql(t,qr,eI)}const tI="viewRecord";function fte(t){return Zl(t,qr,tI)}function hte(t){return Ql(t,qr,tI)}const rI="viewNotFound";function yte(t){return Zl(t,qr,rI)}function mte(t){return Ql(t,qr,rI)}const nI="viewBlocked";function gte(t){return Zl(t,qr,nI)}function bte(t){return Ql(t,qr,nI)}const iI="viewDetached";function vte(t){return Zl(t,qr,iI)}function Ete(t){return Ql(t,qr,iI)}var Yl={};Object.defineProperty(Yl,"__esModule",{value:!0});Yl.isMain=xte;Yl.validateMain=Rte;Yl.isView=Ate;Yl.validateView=Ste;const wte=x,_te=_,oI=_te.is$typed,sI=wte.validate,om="app.bsky.embed.recordWithMedia",aI="main";function xte(t){return oI(t,om,aI)}function Rte(t){return sI(t,om,aI)}const lI="view";function Ate(t){return oI(t,om,lI)}function Ste(t){return sI(t,om,lI)}var zo={};Object.defineProperty(zo,"__esModule",{value:!0});zo.isMain=kte;zo.validateMain=Lte;zo.isCaption=Pte;zo.validateCaption=Dte;zo.isView=Bte;zo.validateView=Ite;const Cte=x,Tte=_,ow=Tte.is$typed,sw=Cte.validate,eu="app.bsky.embed.video",uI="main";function kte(t){return ow(t,eu,uI)}function Lte(t){return sw(t,eu,uI)}const cI="caption";function Pte(t){return ow(t,eu,cI)}function Dte(t){return sw(t,eu,cI)}const dI="view";function Bte(t){return ow(t,eu,dI)}function Ite(t){return sw(t,eu,dI)}var N={};Object.defineProperty(N,"__esModule",{value:!0});N.INTERACTIONSHARE=N.INTERACTIONQUOTE=N.INTERACTIONREPLY=N.INTERACTIONREPOST=N.INTERACTIONLIKE=N.INTERACTIONSEEN=N.CONTENTMODEVIDEO=N.CONTENTMODEUNSPECIFIED=N.CLICKTHROUGHEMBED=N.CLICKTHROUGHREPOSTER=N.CLICKTHROUGHAUTHOR=N.CLICKTHROUGHITEM=N.REQUESTMORE=N.REQUESTLESS=void 0;N.isPostView=$te;N.validatePostView=Ote;N.isViewerState=Kte;N.validateViewerState=Vte;N.isThreadContext=Mte;N.validateThreadContext=Nte;N.isFeedViewPost=zte;N.validateFeedViewPost=Fte;N.isReplyRef=qte;N.validateReplyRef=Gte;N.isReasonRepost=Hte;N.validateReasonRepost=Xte;N.isReasonPin=Wte;N.validateReasonPin=Jte;N.isThreadViewPost=Zte;N.validateThreadViewPost=Qte;N.isNotFoundPost=Yte;N.validateNotFoundPost=ere;N.isBlockedPost=tre;N.validateBlockedPost=rre;N.isBlockedAuthor=nre;N.validateBlockedAuthor=ire;N.isGeneratorView=ore;N.validateGeneratorView=sre;N.isGeneratorViewerState=are;N.validateGeneratorViewerState=lre;N.isSkeletonFeedPost=ure;N.validateSkeletonFeedPost=cre;N.isSkeletonReasonRepost=dre;N.validateSkeletonReasonRepost=pre;N.isSkeletonReasonPin=fre;N.validateSkeletonReasonPin=hre;N.isThreadgateView=yre;N.validateThreadgateView=mre;N.isInteraction=gre;N.validateInteraction=bre;const jte=x,Ute=_,bt=Ute.is$typed,vt=jte.validate,Q="app.bsky.feed.defs",pI="postView";function $te(t){return bt(t,Q,pI)}function Ote(t){return vt(t,Q,pI)}const fI="viewerState";function Kte(t){return bt(t,Q,fI)}function Vte(t){return vt(t,Q,fI)}const hI="threadContext";function Mte(t){return bt(t,Q,hI)}function Nte(t){return vt(t,Q,hI)}const yI="feedViewPost";function zte(t){return bt(t,Q,yI)}function Fte(t){return vt(t,Q,yI)}const mI="replyRef";function qte(t){return bt(t,Q,mI)}function Gte(t){return vt(t,Q,mI)}const gI="reasonRepost";function Hte(t){return bt(t,Q,gI)}function Xte(t){return vt(t,Q,gI)}const bI="reasonPin";function Wte(t){return bt(t,Q,bI)}function Jte(t){return vt(t,Q,bI)}const vI="threadViewPost";function Zte(t){return bt(t,Q,vI)}function Qte(t){return vt(t,Q,vI)}const EI="notFoundPost";function Yte(t){return bt(t,Q,EI)}function ere(t){return vt(t,Q,EI)}const wI="blockedPost";function tre(t){return bt(t,Q,wI)}function rre(t){return vt(t,Q,wI)}const _I="blockedAuthor";function nre(t){return bt(t,Q,_I)}function ire(t){return vt(t,Q,_I)}const xI="generatorView";function ore(t){return bt(t,Q,xI)}function sre(t){return vt(t,Q,xI)}const RI="generatorViewerState";function are(t){return bt(t,Q,RI)}function lre(t){return vt(t,Q,RI)}const AI="skeletonFeedPost";function ure(t){return bt(t,Q,AI)}function cre(t){return vt(t,Q,AI)}const SI="skeletonReasonRepost";function dre(t){return bt(t,Q,SI)}function pre(t){return vt(t,Q,SI)}const CI="skeletonReasonPin";function fre(t){return bt(t,Q,CI)}function hre(t){return vt(t,Q,CI)}const TI="threadgateView";function yre(t){return bt(t,Q,TI)}function mre(t){return vt(t,Q,TI)}const kI="interaction";function gre(t){return bt(t,Q,kI)}function bre(t){return vt(t,Q,kI)}N.REQUESTLESS=`${Q}#requestLess`;N.REQUESTMORE=`${Q}#requestMore`;N.CLICKTHROUGHITEM=`${Q}#clickthroughItem`;N.CLICKTHROUGHAUTHOR=`${Q}#clickthroughAuthor`;N.CLICKTHROUGHREPOSTER=`${Q}#clickthroughReposter`;N.CLICKTHROUGHEMBED=`${Q}#clickthroughEmbed`;N.CONTENTMODEUNSPECIFIED=`${Q}#contentModeUnspecified`;N.CONTENTMODEVIDEO=`${Q}#contentModeVideo`;N.INTERACTIONSEEN=`${Q}#interactionSeen`;N.INTERACTIONLIKE=`${Q}#interactionLike`;N.INTERACTIONREPOST=`${Q}#interactionRepost`;N.INTERACTIONREPLY=`${Q}#interactionReply`;N.INTERACTIONQUOTE=`${Q}#interactionQuote`;N.INTERACTIONSHARE=`${Q}#interactionShare`;var Vs={};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.toKnownErr=wre;Vs.isFeed=_re;Vs.validateFeed=xre;Vs.isLinks=Rre;Vs.validateLinks=Are;const vre=x,Ere=_,LI=Ere.is$typed,PI=vre.validate,sm="app.bsky.feed.describeFeedGenerator";function wre(t){return t}const DI="feed";function _re(t){return LI(t,sm,DI)}function xre(t){return PI(t,sm,DI)}const BI="links";function Rre(t){return LI(t,sm,BI)}function Are(t){return PI(t,sm,BI)}var am={};Object.defineProperty(am,"__esModule",{value:!0});am.isRecord=Lre;am.validateRecord=Pre;const Sre=x,Cre=_,Tre=Cre.is$typed,kre=Sre.validate,II="app.bsky.feed.generator",jI="main";function Lre(t){return Tre(t,II,jI)}function Pre(t){return kre(t,II,jI,!0)}var aw={};Object.defineProperty(aw,"__esModule",{value:!0});aw.toKnownErr=Ire;const Dre=x,Bre=_;Bre.is$typed;Dre.validate;function Ire(t){return t}var lw={};Object.defineProperty(lw,"__esModule",{value:!0});lw.toKnownErr=$re;const jre=x,Ure=_;Ure.is$typed;jre.validate;function $re(t){return t}var uw={};Object.defineProperty(uw,"__esModule",{value:!0});uw.toKnownErr=Vre;const Ore=x,Kre=_;Kre.is$typed;Ore.validate;function Vre(t){return t}var Nd={};Object.defineProperty(Nd,"__esModule",{value:!0});Nd.toKnownErr=qre;Nd.isLike=Gre;Nd.validateLike=Hre;const Mre=x,Nre=_,zre=Nre.is$typed,Fre=Mre.validate,UI="app.bsky.feed.getLikes";function qre(t){return t}const $I="like";function Gre(t){return zre(t,UI,$I)}function Hre(t){return Fre(t,UI,$I)}var cw={};Object.defineProperty(cw,"__esModule",{value:!0});cw.toKnownErr=Jre;const Xre=x,Wre=_;Wre.is$typed;Xre.validate;function Jre(t){return t}var dw={};Object.defineProperty(dw,"__esModule",{value:!0});dw.toKnownErr=Yre;const Zre=x,Qre=_;Qre.is$typed;Zre.validate;function Yre(t){return t}var pw={};Object.defineProperty(pw,"__esModule",{value:!0});pw.toKnownErr=rne;const ene=x,tne=_;tne.is$typed;ene.validate;function rne(t){return t}var fw={};Object.defineProperty(fw,"__esModule",{value:!0});fw.toKnownErr=one;const nne=x,ine=_;ine.is$typed;nne.validate;function one(t){return t}var hw={};Object.defineProperty(hw,"__esModule",{value:!0});hw.toKnownErr=lne;const sne=x,ane=_;ane.is$typed;sne.validate;function lne(t){return t}var lm={};Object.defineProperty(lm,"__esModule",{value:!0});lm.isRecord=fne;lm.validateRecord=hne;const une=x,cne=_,dne=cne.is$typed,pne=une.validate,OI="app.bsky.feed.like",KI="main";function fne(t){return dne(t,OI,KI)}function hne(t){return pne(t,OI,KI,!0)}var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.isRecord=gne;Hn.validateRecord=bne;Hn.isReplyRef=vne;Hn.validateReplyRef=Ene;Hn.isEntity=wne;Hn.validateEntity=_ne;Hn.isTextSlice=xne;Hn.validateTextSlice=Rne;const yne=x,mne=_,um=mne.is$typed,cm=yne.validate,Fo="app.bsky.feed.post",VI="main";function gne(t){return um(t,Fo,VI)}function bne(t){return cm(t,Fo,VI,!0)}const MI="replyRef";function vne(t){return um(t,Fo,MI)}function Ene(t){return cm(t,Fo,MI)}const NI="entity";function wne(t){return um(t,Fo,NI)}function _ne(t){return cm(t,Fo,NI)}const zI="textSlice";function xne(t){return um(t,Fo,zI)}function Rne(t){return cm(t,Fo,zI)}var tu={};Object.defineProperty(tu,"__esModule",{value:!0});tu.isRecord=Cne;tu.validateRecord=Tne;tu.isDisableRule=kne;tu.validateDisableRule=Lne;const Ane=x,Sne=_,FI=Sne.is$typed,qI=Ane.validate,dm="app.bsky.feed.postgate",GI="main";function Cne(t){return FI(t,dm,GI)}function Tne(t){return qI(t,dm,GI,!0)}const HI="disableRule";function kne(t){return FI(t,dm,HI)}function Lne(t){return qI(t,dm,HI)}var pm={};Object.defineProperty(pm,"__esModule",{value:!0});pm.isRecord=jne;pm.validateRecord=Une;const Pne=x,Dne=_,Bne=Dne.is$typed,Ine=Pne.validate,XI="app.bsky.feed.repost",WI="main";function jne(t){return Bne(t,XI,WI)}function Une(t){return Ine(t,XI,WI,!0)}var yw={};Object.defineProperty(yw,"__esModule",{value:!0});yw.toKnownErr=Kne;const $ne=x,One=_;One.is$typed;$ne.validate;function Kne(t){return t}var Gr={};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.isRecord=Nne;Gr.validateRecord=zne;Gr.isMentionRule=Fne;Gr.validateMentionRule=qne;Gr.isFollowerRule=Gne;Gr.validateFollowerRule=Hne;Gr.isFollowingRule=Xne;Gr.validateFollowingRule=Wne;Gr.isListRule=Jne;Gr.validateListRule=Zne;const Vne=x,Mne=_,zd=Mne.is$typed,Fd=Vne.validate,Xn="app.bsky.feed.threadgate",JI="main";function Nne(t){return zd(t,Xn,JI)}function zne(t){return Fd(t,Xn,JI,!0)}const ZI="mentionRule";function Fne(t){return zd(t,Xn,ZI)}function qne(t){return Fd(t,Xn,ZI)}const QI="followerRule";function Gne(t){return zd(t,Xn,QI)}function Hne(t){return Fd(t,Xn,QI)}const YI="followingRule";function Xne(t){return zd(t,Xn,YI)}function Wne(t){return Fd(t,Xn,YI)}const ej="listRule";function Jne(t){return zd(t,Xn,ej)}function Zne(t){return Fd(t,Xn,ej)}var fm={};Object.defineProperty(fm,"__esModule",{value:!0});fm.isRecord=rie;fm.validateRecord=nie;const Qne=x,Yne=_,eie=Yne.is$typed,tie=Qne.validate,tj="app.bsky.graph.block",rj="main";function rie(t){return eie(t,tj,rj)}function nie(t){return tie(t,tj,rj,!0)}var Ie={};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.REFERENCELIST=Ie.CURATELIST=Ie.MODLIST=void 0;Ie.isListViewBasic=sie;Ie.validateListViewBasic=aie;Ie.isListView=lie;Ie.validateListView=uie;Ie.isListItemView=cie;Ie.validateListItemView=die;Ie.isStarterPackView=pie;Ie.validateStarterPackView=fie;Ie.isStarterPackViewBasic=hie;Ie.validateStarterPackViewBasic=yie;Ie.isListViewerState=mie;Ie.validateListViewerState=gie;Ie.isNotFoundActor=bie;Ie.validateNotFoundActor=vie;Ie.isRelationship=Eie;Ie.validateRelationship=wie;const iie=x,oie=_,qo=oie.is$typed,Go=iie.validate,ot="app.bsky.graph.defs",nj="listViewBasic";function sie(t){return qo(t,ot,nj)}function aie(t){return Go(t,ot,nj)}const ij="listView";function lie(t){return qo(t,ot,ij)}function uie(t){return Go(t,ot,ij)}const oj="listItemView";function cie(t){return qo(t,ot,oj)}function die(t){return Go(t,ot,oj)}const sj="starterPackView";function pie(t){return qo(t,ot,sj)}function fie(t){return Go(t,ot,sj)}const aj="starterPackViewBasic";function hie(t){return qo(t,ot,aj)}function yie(t){return Go(t,ot,aj)}Ie.MODLIST=`${ot}#modlist`;Ie.CURATELIST=`${ot}#curatelist`;Ie.REFERENCELIST=`${ot}#referencelist`;const lj="listViewerState";function mie(t){return qo(t,ot,lj)}function gie(t){return Go(t,ot,lj)}const uj="notFoundActor";function bie(t){return qo(t,ot,uj)}function vie(t){return Go(t,ot,uj)}const cj="relationship";function Eie(t){return qo(t,ot,cj)}function wie(t){return Go(t,ot,cj)}var hm={};Object.defineProperty(hm,"__esModule",{value:!0});hm.isRecord=Sie;hm.validateRecord=Cie;const _ie=x,xie=_,Rie=xie.is$typed,Aie=_ie.validate,dj="app.bsky.graph.follow",pj="main";function Sie(t){return Rie(t,dj,pj)}function Cie(t){return Aie(t,dj,pj,!0)}var mw={};Object.defineProperty(mw,"__esModule",{value:!0});mw.toKnownErr=Lie;const Tie=x,kie=_;kie.is$typed;Tie.validate;function Lie(t){return t}var gw={};Object.defineProperty(gw,"__esModule",{value:!0});gw.toKnownErr=Bie;const Pie=x,Die=_;Die.is$typed;Pie.validate;function Bie(t){return t}var bw={};Object.defineProperty(bw,"__esModule",{value:!0});bw.toKnownErr=Uie;const Iie=x,jie=_;jie.is$typed;Iie.validate;function Uie(t){return t}var vw={};Object.defineProperty(vw,"__esModule",{value:!0});vw.toKnownErr=Kie;const $ie=x,Oie=_;Oie.is$typed;$ie.validate;function Kie(t){return t}var Ew={};Object.defineProperty(Ew,"__esModule",{value:!0});Ew.toKnownErr=Nie;const Vie=x,Mie=_;Mie.is$typed;Vie.validate;function Nie(t){return t}var ww={};Object.defineProperty(ww,"__esModule",{value:!0});ww.toKnownErr=qie;const zie=x,Fie=_;Fie.is$typed;zie.validate;function qie(t){return t}var _w={};Object.defineProperty(_w,"__esModule",{value:!0});_w.toKnownErr=Xie;const Gie=x,Hie=_;Hie.is$typed;Gie.validate;function Xie(t){return t}var xw={};Object.defineProperty(xw,"__esModule",{value:!0});xw.toKnownErr=Zie;const Wie=x,Jie=_;Jie.is$typed;Wie.validate;function Zie(t){return t}var Rw={};Object.defineProperty(Rw,"__esModule",{value:!0});Rw.toKnownErr=eoe;const Qie=x,Yie=_;Yie.is$typed;Qie.validate;function eoe(t){return t}var Aw={};Object.defineProperty(Aw,"__esModule",{value:!0});Aw.toKnownErr=noe;const toe=x,roe=_;roe.is$typed;toe.validate;function noe(t){return t}var Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});Sw.toKnownErr=soe;const ioe=x,ooe=_;ooe.is$typed;ioe.validate;function soe(t){return t}var Cw={};Object.defineProperty(Cw,"__esModule",{value:!0});Cw.toKnownErr=uoe;const aoe=x,loe=_;loe.is$typed;aoe.validate;function uoe(t){return t}var Tw={};Object.defineProperty(Tw,"__esModule",{value:!0});Tw.toKnownErr=poe;const coe=x,doe=_;doe.is$typed;coe.validate;function poe(t){return t}var ym={};Object.defineProperty(ym,"__esModule",{value:!0});ym.isRecord=goe;ym.validateRecord=boe;const foe=x,hoe=_,yoe=hoe.is$typed,moe=foe.validate,fj="app.bsky.graph.list",hj="main";function goe(t){return yoe(t,fj,hj)}function boe(t){return moe(t,fj,hj,!0)}var mm={};Object.defineProperty(mm,"__esModule",{value:!0});mm.isRecord=xoe;mm.validateRecord=Roe;const voe=x,Eoe=_,woe=Eoe.is$typed,_oe=voe.validate,yj="app.bsky.graph.listblock",mj="main";function xoe(t){return woe(t,yj,mj)}function Roe(t){return _oe(t,yj,mj,!0)}var gm={};Object.defineProperty(gm,"__esModule",{value:!0});gm.isRecord=koe;gm.validateRecord=Loe;const Aoe=x,Soe=_,Coe=Soe.is$typed,Toe=Aoe.validate,gj="app.bsky.graph.listitem",bj="main";function koe(t){return Coe(t,gj,bj)}function Loe(t){return Toe(t,gj,bj,!0)}var kw={};Object.defineProperty(kw,"__esModule",{value:!0});kw.toKnownErr=Boe;const Poe=x,Doe=_;Doe.is$typed;Poe.validate;function Boe(t){return t}var Lw={};Object.defineProperty(Lw,"__esModule",{value:!0});Lw.toKnownErr=Uoe;const Ioe=x,joe=_;joe.is$typed;Ioe.validate;function Uoe(t){return t}var Pw={};Object.defineProperty(Pw,"__esModule",{value:!0});Pw.toKnownErr=Koe;const $oe=x,Ooe=_;Ooe.is$typed;$oe.validate;function Koe(t){return t}var Dw={};Object.defineProperty(Dw,"__esModule",{value:!0});Dw.toKnownErr=Noe;const Voe=x,Moe=_;Moe.is$typed;Voe.validate;function Noe(t){return t}var ru={};Object.defineProperty(ru,"__esModule",{value:!0});ru.isRecord=qoe;ru.validateRecord=Goe;ru.isFeedItem=Hoe;ru.validateFeedItem=Xoe;const zoe=x,Foe=_,vj=Foe.is$typed,Ej=zoe.validate,bm="app.bsky.graph.starterpack",wj="main";function qoe(t){return vj(t,bm,wj)}function Goe(t){return Ej(t,bm,wj,!0)}const _j="feedItem";function Hoe(t){return vj(t,bm,_j)}function Xoe(t){return Ej(t,bm,_j)}var Bw={};Object.defineProperty(Bw,"__esModule",{value:!0});Bw.toKnownErr=Zoe;const Woe=x,Joe=_;Joe.is$typed;Woe.validate;function Zoe(t){return t}var Iw={};Object.defineProperty(Iw,"__esModule",{value:!0});Iw.toKnownErr=ese;const Qoe=x,Yoe=_;Yoe.is$typed;Qoe.validate;function ese(t){return t}var jw={};Object.defineProperty(jw,"__esModule",{value:!0});jw.toKnownErr=nse;const tse=x,rse=_;rse.is$typed;tse.validate;function nse(t){return t}var vm={};Object.defineProperty(vm,"__esModule",{value:!0});vm.isRecord=lse;vm.validateRecord=use;const ise=x,ose=_,sse=ose.is$typed,ase=ise.validate,xj="app.bsky.graph.verification",Rj="main";function lse(t){return sse(t,xj,Rj)}function use(t){return ase(t,xj,Rj,!0)}var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.isLabelerView=pse;Wn.validateLabelerView=fse;Wn.isLabelerViewDetailed=hse;Wn.validateLabelerViewDetailed=yse;Wn.isLabelerViewerState=mse;Wn.validateLabelerViewerState=gse;Wn.isLabelerPolicies=bse;Wn.validateLabelerPolicies=vse;const cse=x,dse=_,Em=dse.is$typed,wm=cse.validate,Ho="app.bsky.labeler.defs",Aj="labelerView";function pse(t){return Em(t,Ho,Aj)}function fse(t){return wm(t,Ho,Aj)}const Sj="labelerViewDetailed";function hse(t){return Em(t,Ho,Sj)}function yse(t){return wm(t,Ho,Sj)}const Cj="labelerViewerState";function mse(t){return Em(t,Ho,Cj)}function gse(t){return wm(t,Ho,Cj)}const Tj="labelerPolicies";function bse(t){return Em(t,Ho,Tj)}function vse(t){return wm(t,Ho,Tj)}var Uw={};Object.defineProperty(Uw,"__esModule",{value:!0});Uw.toKnownErr=_se;const Ese=x,wse=_;wse.is$typed;Ese.validate;function _se(t){return t}var _m={};Object.defineProperty(_m,"__esModule",{value:!0});_m.isRecord=Cse;_m.validateRecord=Tse;const xse=x,Rse=_,Ase=Rse.is$typed,Sse=xse.validate,kj="app.bsky.labeler.service",Lj="main";function Cse(t){return Ase(t,kj,Lj)}function Tse(t){return Sse(t,kj,Lj,!0)}var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.isRecordDeleted=Pse;Hr.validateRecordDeleted=Dse;Hr.isChatPreference=Bse;Hr.validateChatPreference=Ise;Hr.isFilterablePreference=jse;Hr.validateFilterablePreference=Use;Hr.isPreference=$se;Hr.validatePreference=Ose;Hr.isPreferences=Kse;Hr.validatePreferences=Vse;const kse=x,Lse=_,qd=Lse.is$typed,Gd=kse.validate,Jn="app.bsky.notification.defs",Pj="recordDeleted";function Pse(t){return qd(t,Jn,Pj)}function Dse(t){return Gd(t,Jn,Pj)}const Dj="chatPreference";function Bse(t){return qd(t,Jn,Dj)}function Ise(t){return Gd(t,Jn,Dj)}const Bj="filterablePreference";function jse(t){return qd(t,Jn,Bj)}function Use(t){return Gd(t,Jn,Bj)}const Ij="preference";function $se(t){return qd(t,Jn,Ij)}function Ose(t){return Gd(t,Jn,Ij)}const jj="preferences";function Kse(t){return qd(t,Jn,jj)}function Vse(t){return Gd(t,Jn,jj)}var $w={};Object.defineProperty($w,"__esModule",{value:!0});$w.toKnownErr=zse;const Mse=x,Nse=_;Nse.is$typed;Mse.validate;function zse(t){return t}var Ow={};Object.defineProperty(Ow,"__esModule",{value:!0});Ow.toKnownErr=Gse;const Fse=x,qse=_;qse.is$typed;Fse.validate;function Gse(t){return t}var Hd={};Object.defineProperty(Hd,"__esModule",{value:!0});Hd.toKnownErr=Zse;Hd.isNotification=Qse;Hd.validateNotification=Yse;const Hse=x,Xse=_,Wse=Xse.is$typed,Jse=Hse.validate,Uj="app.bsky.notification.listNotifications";function Zse(t){return t}const $j="notification";function Qse(t){return Wse(t,Uj,$j)}function Yse(t){return Jse(t,Uj,$j)}var Kw={};Object.defineProperty(Kw,"__esModule",{value:!0});Kw.toKnownErr=rae;const eae=x,tae=_;tae.is$typed;eae.validate;function rae(t){return t}var Vw={};Object.defineProperty(Vw,"__esModule",{value:!0});Vw.toKnownErr=oae;const nae=x,iae=_;iae.is$typed;nae.validate;function oae(t){return t}var Mw={};Object.defineProperty(Mw,"__esModule",{value:!0});Mw.toKnownErr=lae;const sae=x,aae=_;aae.is$typed;sae.validate;function lae(t){return t}var Nw={};Object.defineProperty(Nw,"__esModule",{value:!0});Nw.toKnownErr=dae;const uae=x,cae=_;cae.is$typed;uae.validate;function dae(t){return t}var Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.isMain=hae;Xr.validateMain=yae;Xr.isMention=mae;Xr.validateMention=gae;Xr.isLink=bae;Xr.validateLink=vae;Xr.isTag=Eae;Xr.validateTag=wae;Xr.isByteSlice=_ae;Xr.validateByteSlice=xae;const pae=x,fae=_,Xd=fae.is$typed,Wd=pae.validate,Zn="app.bsky.richtext.facet",Oj="main";function hae(t){return Xd(t,Zn,Oj)}function yae(t){return Wd(t,Zn,Oj)}const Kj="mention";function mae(t){return Xd(t,Zn,Kj)}function gae(t){return Wd(t,Zn,Kj)}const Vj="link";function bae(t){return Xd(t,Zn,Vj)}function vae(t){return Wd(t,Zn,Vj)}const Mj="tag";function Eae(t){return Xd(t,Zn,Mj)}function wae(t){return Wd(t,Zn,Mj)}const Nj="byteSlice";function _ae(t){return Xd(t,Zn,Nj)}function xae(t){return Wd(t,Zn,Nj)}var Ne={};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.isSkeletonSearchPost=Sae;Ne.validateSkeletonSearchPost=Cae;Ne.isSkeletonSearchActor=Tae;Ne.validateSkeletonSearchActor=kae;Ne.isSkeletonSearchStarterPack=Lae;Ne.validateSkeletonSearchStarterPack=Pae;Ne.isTrendingTopic=Dae;Ne.validateTrendingTopic=Bae;Ne.isSkeletonTrend=Iae;Ne.validateSkeletonTrend=jae;Ne.isTrendView=Uae;Ne.validateTrendView=$ae;Ne.isThreadItemPost=Oae;Ne.validateThreadItemPost=Kae;Ne.isThreadItemNoUnauthenticated=Vae;Ne.validateThreadItemNoUnauthenticated=Mae;Ne.isThreadItemNotFound=Nae;Ne.validateThreadItemNotFound=zae;Ne.isThreadItemBlocked=Fae;Ne.validateThreadItemBlocked=qae;const Rae=x,Aae=_,Qn=Aae.is$typed,Yn=Rae.validate,et="app.bsky.unspecced.defs",zj="skeletonSearchPost";function Sae(t){return Qn(t,et,zj)}function Cae(t){return Yn(t,et,zj)}const Fj="skeletonSearchActor";function Tae(t){return Qn(t,et,Fj)}function kae(t){return Yn(t,et,Fj)}const qj="skeletonSearchStarterPack";function Lae(t){return Qn(t,et,qj)}function Pae(t){return Yn(t,et,qj)}const Gj="trendingTopic";function Dae(t){return Qn(t,et,Gj)}function Bae(t){return Yn(t,et,Gj)}const Hj="skeletonTrend";function Iae(t){return Qn(t,et,Hj)}function jae(t){return Yn(t,et,Hj)}const Xj="trendView";function Uae(t){return Qn(t,et,Xj)}function $ae(t){return Yn(t,et,Xj)}const Wj="threadItemPost";function Oae(t){return Qn(t,et,Wj)}function Kae(t){return Yn(t,et,Wj)}const Jj="threadItemNoUnauthenticated";function Vae(t){return Qn(t,et,Jj)}function Mae(t){return Yn(t,et,Jj)}const Zj="threadItemNotFound";function Nae(t){return Qn(t,et,Zj)}function zae(t){return Yn(t,et,Zj)}const Qj="threadItemBlocked";function Fae(t){return Qn(t,et,Qj)}function qae(t){return Yn(t,et,Qj)}var Jd={};Object.defineProperty(Jd,"__esModule",{value:!0});Jd.toKnownErr=Jae;Jd.isLiveNowConfig=Zae;Jd.validateLiveNowConfig=Qae;const Gae=x,Hae=_,Xae=Hae.is$typed,Wae=Gae.validate,Yj="app.bsky.unspecced.getConfig";function Jae(t){return t}const eU="liveNowConfig";function Zae(t){return Xae(t,Yj,eU)}function Qae(t){return Wae(t,Yj,eU)}var zw={};Object.defineProperty(zw,"__esModule",{value:!0});zw.toKnownErr=tle;const Yae=x,ele=_;ele.is$typed;Yae.validate;function tle(t){return t}var Zd={};Object.defineProperty(Zd,"__esModule",{value:!0});Zd.toKnownErr=sle;Zd.isThreadItem=ale;Zd.validateThreadItem=lle;const rle=x,nle=_,ile=nle.is$typed,ole=rle.validate,tU="app.bsky.unspecced.getPostThreadOtherV2";function sle(t){return t}const rU="threadItem";function ale(t){return ile(t,tU,rU)}function lle(t){return ole(t,tU,rU)}var Qd={};Object.defineProperty(Qd,"__esModule",{value:!0});Qd.toKnownErr=fle;Qd.isThreadItem=hle;Qd.validateThreadItem=yle;const ule=x,cle=_,dle=cle.is$typed,ple=ule.validate,nU="app.bsky.unspecced.getPostThreadV2";function fle(t){return t}const iU="threadItem";function hle(t){return dle(t,nU,iU)}function yle(t){return ple(t,nU,iU)}var Fw={};Object.defineProperty(Fw,"__esModule",{value:!0});Fw.toKnownErr=ble;const mle=x,gle=_;gle.is$typed;mle.validate;function ble(t){return t}var qw={};Object.defineProperty(qw,"__esModule",{value:!0});qw.toKnownErr=wle;const vle=x,Ele=_;Ele.is$typed;vle.validate;function wle(t){return t}var Gw={};Object.defineProperty(Gw,"__esModule",{value:!0});Gw.toKnownErr=Rle;const _le=x,xle=_;xle.is$typed;_le.validate;function Rle(t){return t}var Hw={};Object.defineProperty(Hw,"__esModule",{value:!0});Hw.toKnownErr=Cle;const Ale=x,Sle=_;Sle.is$typed;Ale.validate;function Cle(t){return t}var Xw={};Object.defineProperty(Xw,"__esModule",{value:!0});Xw.toKnownErr=Lle;const Tle=x,kle=_;kle.is$typed;Tle.validate;function Lle(t){return t}var Ww={};Object.defineProperty(Ww,"__esModule",{value:!0});Ww.toKnownErr=Ble;const Ple=x,Dle=_;Dle.is$typed;Ple.validate;function Ble(t){return t}var Jw={};Object.defineProperty(Jw,"__esModule",{value:!0});Jw.toKnownErr=Ule;const Ile=x,jle=_;jle.is$typed;Ile.validate;function Ule(t){return t}var Yd={};Object.defineProperty(Yd,"__esModule",{value:!0});Yd.toKnownErr=Mle;Yd.isSuggestion=Nle;Yd.validateSuggestion=zle;const $le=x,Ole=_,Kle=Ole.is$typed,Vle=$le.validate,oU="app.bsky.unspecced.getTaggedSuggestions";function Mle(t){return t}const sU="suggestion";function Nle(t){return Kle(t,oU,sU)}function zle(t){return Vle(t,oU,sU)}var Zw={};Object.defineProperty(Zw,"__esModule",{value:!0});Zw.toKnownErr=Gle;const Fle=x,qle=_;qle.is$typed;Fle.validate;function Gle(t){return t}var Qw={};Object.defineProperty(Qw,"__esModule",{value:!0});Qw.toKnownErr=Wle;const Hle=x,Xle=_;Xle.is$typed;Hle.validate;function Wle(t){return t}var Yw={};Object.defineProperty(Yw,"__esModule",{value:!0});Yw.toKnownErr=Qle;const Jle=x,Zle=_;Zle.is$typed;Jle.validate;function Qle(t){return t}var xm={};Object.defineProperty(xm,"__esModule",{value:!0});xm.isJobStatus=nue;xm.validateJobStatus=iue;const Yle=x,eue=_,tue=eue.is$typed,rue=Yle.validate,aU="app.bsky.video.defs",lU="jobStatus";function nue(t){return tue(t,aU,lU)}function iue(t){return rue(t,aU,lU)}var e_={};Object.defineProperty(e_,"__esModule",{value:!0});e_.toKnownErr=aue;const oue=x,sue=_;sue.is$typed;oue.validate;function aue(t){return t}var t_={};Object.defineProperty(t_,"__esModule",{value:!0});t_.toKnownErr=cue;const lue=x,uue=_;uue.is$typed;lue.validate;function cue(t){return t}var r_={};Object.defineProperty(r_,"__esModule",{value:!0});r_.toKnownErr=fue;const due=x,pue=_;pue.is$typed;due.validate;function fue(t){return t}var Rm={};Object.defineProperty(Rm,"__esModule",{value:!0});Rm.isRecord=bue;Rm.validateRecord=vue;const hue=x,yue=_,mue=yue.is$typed,gue=hue.validate,uU="chat.bsky.actor.declaration",cU="main";function bue(t){return mue(t,uU,cU)}function vue(t){return gue(t,uU,cU,!0)}var Am={};Object.defineProperty(Am,"__esModule",{value:!0});Am.isProfileViewBasic=Rue;Am.validateProfileViewBasic=Aue;const Eue=x,wue=_,_ue=wue.is$typed,xue=Eue.validate,dU="chat.bsky.actor.defs",pU="profileViewBasic";function Rue(t){return _ue(t,dU,pU)}function Aue(t){return xue(t,dU,pU)}var n_={};Object.defineProperty(n_,"__esModule",{value:!0});n_.toKnownErr=Tue;const Sue=x,Cue=_;Cue.is$typed;Sue.validate;function Tue(t){return t}var i_={};Object.defineProperty(i_,"__esModule",{value:!0});i_.toKnownErr=Pue;const kue=x,Lue=_;Lue.is$typed;kue.validate;function Pue(t){return t}var o_={};Object.defineProperty(o_,"__esModule",{value:!0});o_.toKnownErr=Iue;const Due=x,Bue=_;Bue.is$typed;Due.validate;function Iue(t){return t}var se={};Object.defineProperty(se,"__esModule",{value:!0});se.isMessageRef=$ue;se.validateMessageRef=Oue;se.isMessageInput=Kue;se.validateMessageInput=Vue;se.isMessageView=Mue;se.validateMessageView=Nue;se.isDeletedMessageView=zue;se.validateDeletedMessageView=Fue;se.isMessageViewSender=que;se.validateMessageViewSender=Gue;se.isReactionView=Hue;se.validateReactionView=Xue;se.isReactionViewSender=Wue;se.validateReactionViewSender=Jue;se.isMessageAndReactionView=Zue;se.validateMessageAndReactionView=Que;se.isConvoView=Yue;se.validateConvoView=ece;se.isLogBeginConvo=tce;se.validateLogBeginConvo=rce;se.isLogAcceptConvo=nce;se.validateLogAcceptConvo=ice;se.isLogLeaveConvo=oce;se.validateLogLeaveConvo=sce;se.isLogMuteConvo=ace;se.validateLogMuteConvo=lce;se.isLogUnmuteConvo=uce;se.validateLogUnmuteConvo=cce;se.isLogCreateMessage=dce;se.validateLogCreateMessage=pce;se.isLogDeleteMessage=fce;se.validateLogDeleteMessage=hce;se.isLogReadMessage=yce;se.validateLogReadMessage=mce;se.isLogAddReaction=gce;se.validateLogAddReaction=bce;se.isLogRemoveReaction=vce;se.validateLogRemoveReaction=Ece;const jue=x,Uue=_,st=Uue.is$typed,at=jue.validate,de="chat.bsky.convo.defs",fU="messageRef";function $ue(t){return st(t,de,fU)}function Oue(t){return at(t,de,fU)}const hU="messageInput";function Kue(t){return st(t,de,hU)}function Vue(t){return at(t,de,hU)}const yU="messageView";function Mue(t){return st(t,de,yU)}function Nue(t){return at(t,de,yU)}const mU="deletedMessageView";function zue(t){return st(t,de,mU)}function Fue(t){return at(t,de,mU)}const gU="messageViewSender";function que(t){return st(t,de,gU)}function Gue(t){return at(t,de,gU)}const bU="reactionView";function Hue(t){return st(t,de,bU)}function Xue(t){return at(t,de,bU)}const vU="reactionViewSender";function Wue(t){return st(t,de,vU)}function Jue(t){return at(t,de,vU)}const EU="messageAndReactionView";function Zue(t){return st(t,de,EU)}function Que(t){return at(t,de,EU)}const wU="convoView";function Yue(t){return st(t,de,wU)}function ece(t){return at(t,de,wU)}const _U="logBeginConvo";function tce(t){return st(t,de,_U)}function rce(t){return at(t,de,_U)}const xU="logAcceptConvo";function nce(t){return st(t,de,xU)}function ice(t){return at(t,de,xU)}const RU="logLeaveConvo";function oce(t){return st(t,de,RU)}function sce(t){return at(t,de,RU)}const AU="logMuteConvo";function ace(t){return st(t,de,AU)}function lce(t){return at(t,de,AU)}const SU="logUnmuteConvo";function uce(t){return st(t,de,SU)}function cce(t){return at(t,de,SU)}const CU="logCreateMessage";function dce(t){return st(t,de,CU)}function pce(t){return at(t,de,CU)}const TU="logDeleteMessage";function fce(t){return st(t,de,TU)}function hce(t){return at(t,de,TU)}const kU="logReadMessage";function yce(t){return st(t,de,kU)}function mce(t){return at(t,de,kU)}const LU="logAddReaction";function gce(t){return st(t,de,LU)}function bce(t){return at(t,de,LU)}const PU="logRemoveReaction";function vce(t){return st(t,de,PU)}function Ece(t){return at(t,de,PU)}var s_={};Object.defineProperty(s_,"__esModule",{value:!0});s_.toKnownErr=xce;const wce=x,_ce=_;_ce.is$typed;wce.validate;function xce(t){return t}var a_={};Object.defineProperty(a_,"__esModule",{value:!0});a_.toKnownErr=Sce;const Rce=x,Ace=_;Ace.is$typed;Rce.validate;function Sce(t){return t}var l_={};Object.defineProperty(l_,"__esModule",{value:!0});l_.toKnownErr=kce;const Cce=x,Tce=_;Tce.is$typed;Cce.validate;function kce(t){return t}var u_={};Object.defineProperty(u_,"__esModule",{value:!0});u_.toKnownErr=Dce;const Lce=x,Pce=_;Pce.is$typed;Lce.validate;function Dce(t){return t}var c_={};Object.defineProperty(c_,"__esModule",{value:!0});c_.toKnownErr=jce;const Bce=x,Ice=_;Ice.is$typed;Bce.validate;function jce(t){return t}var d_={};Object.defineProperty(d_,"__esModule",{value:!0});d_.toKnownErr=Oce;const Uce=x,$ce=_;$ce.is$typed;Uce.validate;function Oce(t){return t}var p_={};Object.defineProperty(p_,"__esModule",{value:!0});p_.toKnownErr=Mce;const Kce=x,Vce=_;Vce.is$typed;Kce.validate;function Mce(t){return t}var f_={};Object.defineProperty(f_,"__esModule",{value:!0});f_.toKnownErr=Fce;const Nce=x,zce=_;zce.is$typed;Nce.validate;function Fce(t){return t}var h_={};Object.defineProperty(h_,"__esModule",{value:!0});h_.toKnownErr=Hce;const qce=x,Gce=_;Gce.is$typed;qce.validate;function Hce(t){return t}var y_={};Object.defineProperty(y_,"__esModule",{value:!0});y_.toKnownErr=Jce;const Xce=x,Wce=_;Wce.is$typed;Xce.validate;function Jce(t){return t}var ep={};Object.defineProperty(ep,"__esModule",{value:!0});ep.toKnownErr=tde;ep.isBatchItem=rde;ep.validateBatchItem=nde;const Zce=x,Qce=_,Yce=Qce.is$typed,ede=Zce.validate,DU="chat.bsky.convo.sendMessageBatch";function tde(t){return t}const BU="batchItem";function rde(t){return Yce(t,DU,BU)}function nde(t){return ede(t,DU,BU)}var m_={};Object.defineProperty(m_,"__esModule",{value:!0});m_.toKnownErr=sde;const ide=x,ode=_;ode.is$typed;ide.validate;function sde(t){return t}var g_={};Object.defineProperty(g_,"__esModule",{value:!0});g_.toKnownErr=ude;const ade=x,lde=_;lde.is$typed;ade.validate;function ude(t){return t}var b_={};Object.defineProperty(b_,"__esModule",{value:!0});b_.toKnownErr=pde;const cde=x,dde=_;dde.is$typed;cde.validate;function pde(t){return t}var tp={};Object.defineProperty(tp,"__esModule",{value:!0});tp.toKnownErr=gde;tp.isMetadata=bde;tp.validateMetadata=vde;const fde=x,hde=_,yde=hde.is$typed,mde=fde.validate,IU="chat.bsky.moderation.getActorMetadata";function gde(t){return t}const jU="metadata";function bde(t){return yde(t,IU,jU)}function vde(t){return mde(t,IU,jU)}var v_={};Object.defineProperty(v_,"__esModule",{value:!0});v_.toKnownErr=_de;const Ede=x,wde=_;wde.is$typed;Ede.validate;function _de(t){return t}var E_={};Object.defineProperty(E_,"__esModule",{value:!0});E_.toKnownErr=Ade;const xde=x,Rde=_;Rde.is$typed;xde.validate;function Ade(t){return t}var Sm={};Object.defineProperty(Sm,"__esModule",{value:!0});Sm.isTemplateView=Lde;Sm.validateTemplateView=Pde;const Sde=x,Cde=_,Tde=Cde.is$typed,kde=Sde.validate,UU="tools.ozone.communication.defs",$U="templateView";function Lde(t){return Tde(t,UU,$U)}function Pde(t){return kde(t,UU,$U)}var w_={};Object.defineProperty(w_,"__esModule",{value:!0});w_.toKnownErr=Ide;const Dde=x,Bde=_;Bde.is$typed;Dde.validate;function Ide(t){return t}var __={};Object.defineProperty(__,"__esModule",{value:!0});__.toKnownErr=$de;const jde=x,Ude=_;Ude.is$typed;jde.validate;function $de(t){return t}var Xt={};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.toKnownErr=Vde;Xt.isEvent=Mde;Xt.validateEvent=Nde;Xt.isAccountCreated=zde;Xt.validateAccountCreated=Fde;Xt.isEmailUpdated=qde;Xt.validateEmailUpdated=Gde;Xt.isEmailConfirmed=Hde;Xt.validateEmailConfirmed=Xde;Xt.isPasswordUpdated=Wde;Xt.validatePasswordUpdated=Jde;Xt.isHandleUpdated=Zde;Xt.validateHandleUpdated=Qde;const Ode=x,Kde=_,nu=Kde.is$typed,iu=Ode.validate,Wr="tools.ozone.hosting.getAccountHistory";function Vde(t){return t}const OU="event";function Mde(t){return nu(t,Wr,OU)}function Nde(t){return iu(t,Wr,OU)}const KU="accountCreated";function zde(t){return nu(t,Wr,KU)}function Fde(t){return iu(t,Wr,KU)}const VU="emailUpdated";function qde(t){return nu(t,Wr,VU)}function Gde(t){return iu(t,Wr,VU)}const MU="emailConfirmed";function Hde(t){return nu(t,Wr,MU)}function Xde(t){return iu(t,Wr,MU)}const NU="passwordUpdated";function Wde(t){return nu(t,Wr,NU)}function Jde(t){return iu(t,Wr,NU)}const zU="handleUpdated";function Zde(t){return nu(t,Wr,zU)}function Qde(t){return iu(t,Wr,zU)}var U={};Object.defineProperty(U,"__esModule",{value:!0});U.REVIEWNONE=U.REVIEWCLOSED=U.REVIEWESCALATED=U.REVIEWOPEN=void 0;U.isModEventView=tpe;U.validateModEventView=rpe;U.isModEventViewDetail=npe;U.validateModEventViewDetail=ipe;U.isSubjectStatusView=ope;U.validateSubjectStatusView=spe;U.isSubjectView=ape;U.validateSubjectView=lpe;U.isAccountStats=upe;U.validateAccountStats=cpe;U.isRecordsStats=dpe;U.validateRecordsStats=ppe;U.isModEventTakedown=fpe;U.validateModEventTakedown=hpe;U.isModEventReverseTakedown=ype;U.validateModEventReverseTakedown=mpe;U.isModEventResolveAppeal=gpe;U.validateModEventResolveAppeal=bpe;U.isModEventComment=vpe;U.validateModEventComment=Epe;U.isModEventReport=wpe;U.validateModEventReport=_pe;U.isModEventLabel=xpe;U.validateModEventLabel=Rpe;U.isModEventPriorityScore=Ape;U.validateModEventPriorityScore=Spe;U.isModEventAcknowledge=Cpe;U.validateModEventAcknowledge=Tpe;U.isModEventEscalate=kpe;U.validateModEventEscalate=Lpe;U.isModEventMute=Ppe;U.validateModEventMute=Dpe;U.isModEventUnmute=Bpe;U.validateModEventUnmute=Ipe;U.isModEventMuteReporter=jpe;U.validateModEventMuteReporter=Upe;U.isModEventUnmuteReporter=$pe;U.validateModEventUnmuteReporter=Ope;U.isModEventEmail=Kpe;U.validateModEventEmail=Vpe;U.isModEventDivert=Mpe;U.validateModEventDivert=Npe;U.isModEventTag=zpe;U.validateModEventTag=Fpe;U.isAccountEvent=qpe;U.validateAccountEvent=Gpe;U.isIdentityEvent=Hpe;U.validateIdentityEvent=Xpe;U.isRecordEvent=Wpe;U.validateRecordEvent=Jpe;U.isRepoView=Zpe;U.validateRepoView=Qpe;U.isRepoViewDetail=Ype;U.validateRepoViewDetail=efe;U.isRepoViewNotFound=tfe;U.validateRepoViewNotFound=rfe;U.isRecordView=nfe;U.validateRecordView=ife;U.isRecordViewDetail=ofe;U.validateRecordViewDetail=sfe;U.isRecordViewNotFound=afe;U.validateRecordViewNotFound=lfe;U.isModeration=ufe;U.validateModeration=cfe;U.isModerationDetail=dfe;U.validateModerationDetail=pfe;U.isBlobView=ffe;U.validateBlobView=hfe;U.isImageDetails=yfe;U.validateImageDetails=mfe;U.isVideoDetails=gfe;U.validateVideoDetails=bfe;U.isAccountHosting=vfe;U.validateAccountHosting=Efe;U.isRecordHosting=wfe;U.validateRecordHosting=_fe;U.isReporterStats=xfe;U.validateReporterStats=Rfe;const Yde=x,epe=_,le=epe.is$typed,ue=Yde.validate,O="tools.ozone.moderation.defs",FU="modEventView";function tpe(t){return le(t,O,FU)}function rpe(t){return ue(t,O,FU)}const qU="modEventViewDetail";function npe(t){return le(t,O,qU)}function ipe(t){return ue(t,O,qU)}const GU="subjectStatusView";function ope(t){return le(t,O,GU)}function spe(t){return ue(t,O,GU)}const HU="subjectView";function ape(t){return le(t,O,HU)}function lpe(t){return ue(t,O,HU)}const XU="accountStats";function upe(t){return le(t,O,XU)}function cpe(t){return ue(t,O,XU)}const WU="recordsStats";function dpe(t){return le(t,O,WU)}function ppe(t){return ue(t,O,WU)}U.REVIEWOPEN=`${O}#reviewOpen`;U.REVIEWESCALATED=`${O}#reviewEscalated`;U.REVIEWCLOSED=`${O}#reviewClosed`;U.REVIEWNONE=`${O}#reviewNone`;const JU="modEventTakedown";function fpe(t){return le(t,O,JU)}function hpe(t){return ue(t,O,JU)}const ZU="modEventReverseTakedown";function ype(t){return le(t,O,ZU)}function mpe(t){return ue(t,O,ZU)}const QU="modEventResolveAppeal";function gpe(t){return le(t,O,QU)}function bpe(t){return ue(t,O,QU)}const YU="modEventComment";function vpe(t){return le(t,O,YU)}function Epe(t){return ue(t,O,YU)}const e$="modEventReport";function wpe(t){return le(t,O,e$)}function _pe(t){return ue(t,O,e$)}const t$="modEventLabel";function xpe(t){return le(t,O,t$)}function Rpe(t){return ue(t,O,t$)}const r$="modEventPriorityScore";function Ape(t){return le(t,O,r$)}function Spe(t){return ue(t,O,r$)}const n$="modEventAcknowledge";function Cpe(t){return le(t,O,n$)}function Tpe(t){return ue(t,O,n$)}const i$="modEventEscalate";function kpe(t){return le(t,O,i$)}function Lpe(t){return ue(t,O,i$)}const o$="modEventMute";function Ppe(t){return le(t,O,o$)}function Dpe(t){return ue(t,O,o$)}const s$="modEventUnmute";function Bpe(t){return le(t,O,s$)}function Ipe(t){return ue(t,O,s$)}const a$="modEventMuteReporter";function jpe(t){return le(t,O,a$)}function Upe(t){return ue(t,O,a$)}const l$="modEventUnmuteReporter";function $pe(t){return le(t,O,l$)}function Ope(t){return ue(t,O,l$)}const u$="modEventEmail";function Kpe(t){return le(t,O,u$)}function Vpe(t){return ue(t,O,u$)}const c$="modEventDivert";function Mpe(t){return le(t,O,c$)}function Npe(t){return ue(t,O,c$)}const d$="modEventTag";function zpe(t){return le(t,O,d$)}function Fpe(t){return ue(t,O,d$)}const p$="accountEvent";function qpe(t){return le(t,O,p$)}function Gpe(t){return ue(t,O,p$)}const f$="identityEvent";function Hpe(t){return le(t,O,f$)}function Xpe(t){return ue(t,O,f$)}const h$="recordEvent";function Wpe(t){return le(t,O,h$)}function Jpe(t){return ue(t,O,h$)}const y$="repoView";function Zpe(t){return le(t,O,y$)}function Qpe(t){return ue(t,O,y$)}const m$="repoViewDetail";function Ype(t){return le(t,O,m$)}function efe(t){return ue(t,O,m$)}const g$="repoViewNotFound";function tfe(t){return le(t,O,g$)}function rfe(t){return ue(t,O,g$)}const b$="recordView";function nfe(t){return le(t,O,b$)}function ife(t){return ue(t,O,b$)}const v$="recordViewDetail";function ofe(t){return le(t,O,v$)}function sfe(t){return ue(t,O,v$)}const E$="recordViewNotFound";function afe(t){return le(t,O,E$)}function lfe(t){return ue(t,O,E$)}const w$="moderation";function ufe(t){return le(t,O,w$)}function cfe(t){return ue(t,O,w$)}const _$="moderationDetail";function dfe(t){return le(t,O,_$)}function pfe(t){return ue(t,O,_$)}const x$="blobView";function ffe(t){return le(t,O,x$)}function hfe(t){return ue(t,O,x$)}const R$="imageDetails";function yfe(t){return le(t,O,R$)}function mfe(t){return ue(t,O,R$)}const A$="videoDetails";function gfe(t){return le(t,O,A$)}function bfe(t){return ue(t,O,A$)}const S$="accountHosting";function vfe(t){return le(t,O,S$)}function Efe(t){return ue(t,O,S$)}const C$="recordHosting";function wfe(t){return le(t,O,C$)}function _fe(t){return ue(t,O,C$)}const T$="reporterStats";function xfe(t){return le(t,O,T$)}function Rfe(t){return ue(t,O,T$)}var x_={};Object.defineProperty(x_,"__esModule",{value:!0});x_.toKnownErr=Cfe;const Afe=x,Sfe=_;Sfe.is$typed;Afe.validate;function Cfe(t){return t}var R_={};Object.defineProperty(R_,"__esModule",{value:!0});R_.toKnownErr=Lfe;const Tfe=x,kfe=_;kfe.is$typed;Tfe.validate;function Lfe(t){return t}var A_={};Object.defineProperty(A_,"__esModule",{value:!0});A_.toKnownErr=Bfe;const Pfe=x,Dfe=_;Dfe.is$typed;Pfe.validate;function Bfe(t){return t}var S_={};Object.defineProperty(S_,"__esModule",{value:!0});S_.toKnownErr=Ufe;const Ife=x,jfe=_;jfe.is$typed;Ife.validate;function Ufe(t){return t}var C_={};Object.defineProperty(C_,"__esModule",{value:!0});C_.toKnownErr=Kfe;const $fe=x,Ofe=_;Ofe.is$typed;$fe.validate;function Kfe(t){return t}var T_={};Object.defineProperty(T_,"__esModule",{value:!0});T_.toKnownErr=Nfe;const Vfe=x,Mfe=_;Mfe.is$typed;Vfe.validate;function Nfe(t){return t}var k_={};Object.defineProperty(k_,"__esModule",{value:!0});k_.toKnownErr=qfe;const zfe=x,Ffe=_;Ffe.is$typed;zfe.validate;function qfe(t){return t}var L_={};Object.defineProperty(L_,"__esModule",{value:!0});L_.toKnownErr=Xfe;const Gfe=x,Hfe=_;Hfe.is$typed;Gfe.validate;function Xfe(t){return t}var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.toKnownErr=Zfe;Ms.isServiceConfig=Qfe;Ms.validateServiceConfig=Yfe;Ms.isViewerConfig=ehe;Ms.validateViewerConfig=the;const Wfe=x,Jfe=_,k$=Jfe.is$typed,L$=Wfe.validate,Cm="tools.ozone.server.getConfig";function Zfe(t){return t}const P$="serviceConfig";function Qfe(t){return k$(t,Cm,P$)}function Yfe(t){return L$(t,Cm,P$)}const D$="viewerConfig";function ehe(t){return k$(t,Cm,D$)}function the(t){return L$(t,Cm,D$)}var P_={};Object.defineProperty(P_,"__esModule",{value:!0});P_.toKnownErr=ihe;const rhe=x,nhe=_;nhe.is$typed;rhe.validate;function ihe(t){return t}var ou={};Object.defineProperty(ou,"__esModule",{value:!0});ou.isSet=ahe;ou.validateSet=lhe;ou.isSetView=uhe;ou.validateSetView=che;const ohe=x,she=_,B$=she.is$typed,I$=ohe.validate,Tm="tools.ozone.set.defs",j$="set";function ahe(t){return B$(t,Tm,j$)}function lhe(t){return I$(t,Tm,j$)}const U$="setView";function uhe(t){return B$(t,Tm,U$)}function che(t){return I$(t,Tm,U$)}var D_={};Object.defineProperty(D_,"__esModule",{value:!0});D_.toKnownErr=fhe;const dhe=x,phe=_;phe.is$typed;dhe.validate;function fhe(t){return t}var B_={};Object.defineProperty(B_,"__esModule",{value:!0});B_.toKnownErr=mhe;const hhe=x,yhe=_;yhe.is$typed;hhe.validate;function mhe(t){return t}var km={};Object.defineProperty(km,"__esModule",{value:!0});km.isOption=whe;km.validateOption=_he;const ghe=x,bhe=_,vhe=bhe.is$typed,Ehe=ghe.validate,$$="tools.ozone.setting.defs",O$="option";function whe(t){return vhe(t,$$,O$)}function _he(t){return Ehe(t,$$,O$)}var I_={};Object.defineProperty(I_,"__esModule",{value:!0});I_.toKnownErr=Ahe;const xhe=x,Rhe=_;Rhe.is$typed;xhe.validate;function Ahe(t){return t}var j_={};Object.defineProperty(j_,"__esModule",{value:!0});j_.toKnownErr=The;const She=x,Che=_;Che.is$typed;She.validate;function The(t){return t}var U_={};Object.defineProperty(U_,"__esModule",{value:!0});U_.toKnownErr=Phe;const khe=x,Lhe=_;Lhe.is$typed;khe.validate;function Phe(t){return t}var Lm={};Object.defineProperty(Lm,"__esModule",{value:!0});Lm.isSigDetail=Uhe;Lm.validateSigDetail=$he;const Dhe=x,Bhe=_,Ihe=Bhe.is$typed,jhe=Dhe.validate,K$="tools.ozone.signature.defs",V$="sigDetail";function Uhe(t){return Ihe(t,K$,V$)}function $he(t){return jhe(t,K$,V$)}var $_={};Object.defineProperty($_,"__esModule",{value:!0});$_.toKnownErr=Vhe;const Ohe=x,Khe=_;Khe.is$typed;Ohe.validate;function Vhe(t){return t}var rp={};Object.defineProperty(rp,"__esModule",{value:!0});rp.toKnownErr=qhe;rp.isRelatedAccount=Ghe;rp.validateRelatedAccount=Hhe;const Mhe=x,Nhe=_,zhe=Nhe.is$typed,Fhe=Mhe.validate,M$="tools.ozone.signature.findRelatedAccounts";function qhe(t){return t}const N$="relatedAccount";function Ghe(t){return zhe(t,M$,N$)}function Hhe(t){return Fhe(t,M$,N$)}var O_={};Object.defineProperty(O_,"__esModule",{value:!0});O_.toKnownErr=Jhe;const Xhe=x,Whe=_;Whe.is$typed;Xhe.validate;function Jhe(t){return t}var Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.ROLEVERIFIER=Ur.ROLETRIAGE=Ur.ROLEMODERATOR=Ur.ROLEADMIN=void 0;Ur.isMember=tye;Ur.validateMember=rye;const Zhe=x,Qhe=_,Yhe=Qhe.is$typed,eye=Zhe.validate,su="tools.ozone.team.defs",z$="member";function tye(t){return Yhe(t,su,z$)}function rye(t){return eye(t,su,z$)}Ur.ROLEADMIN=`${su}#roleAdmin`;Ur.ROLEMODERATOR=`${su}#roleModerator`;Ur.ROLETRIAGE=`${su}#roleTriage`;Ur.ROLEVERIFIER=`${su}#roleVerifier`;var K_={};Object.defineProperty(K_,"__esModule",{value:!0});K_.toKnownErr=oye;const nye=x,iye=_;iye.is$typed;nye.validate;function oye(t){return t}var Pm={};Object.defineProperty(Pm,"__esModule",{value:!0});Pm.isVerificationView=cye;Pm.validateVerificationView=dye;const sye=x,aye=_,lye=aye.is$typed,uye=sye.validate,F$="tools.ozone.verification.defs",q$="verificationView";function cye(t){return lye(t,F$,q$)}function dye(t){return uye(t,F$,q$)}var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.toKnownErr=hye;Ns.isVerificationInput=yye;Ns.validateVerificationInput=mye;Ns.isGrantError=gye;Ns.validateGrantError=bye;const pye=x,fye=_,G$=fye.is$typed,H$=pye.validate,Dm="tools.ozone.verification.grantVerifications";function hye(t){return t}const X$="verificationInput";function yye(t){return G$(t,Dm,X$)}function mye(t){return H$(t,Dm,X$)}const W$="grantError";function gye(t){return G$(t,Dm,W$)}function bye(t){return H$(t,Dm,W$)}var V_={};Object.defineProperty(V_,"__esModule",{value:!0});V_.toKnownErr=wye;const vye=x,Eye=_;Eye.is$typed;vye.validate;function wye(t){return t}var np={};Object.defineProperty(np,"__esModule",{value:!0});np.toKnownErr=Sye;np.isRevokeError=Cye;np.validateRevokeError=Tye;const _ye=x,xye=_,Rye=xye.is$typed,Aye=_ye.validate,J$="tools.ozone.verification.revokeVerifications";function Sye(t){return t}const Z$="revokeError";function Cye(t){return Rye(t,J$,Z$)}function Tye(t){return Aye(t,J$,Z$)}var kye=S&&S.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Lye=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),v=S&&S.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&kye(r,e,n[i]);return Lye(r,e),r}}();Object.defineProperty(p,"__esModule",{value:!0});p.ComAtprotoServerCreateInviteCode=p.ComAtprotoServerCreateAppPassword=p.ComAtprotoServerCreateAccount=p.ComAtprotoServerConfirmEmail=p.ComAtprotoServerCheckAccountStatus=p.ComAtprotoServerActivateAccount=p.ComAtprotoRepoUploadBlob=p.ComAtprotoRepoStrongRef=p.ComAtprotoRepoPutRecord=p.ComAtprotoRepoListRecords=p.ComAtprotoRepoListMissingBlobs=p.ComAtprotoRepoImportRepo=p.ComAtprotoRepoGetRecord=p.ComAtprotoRepoDescribeRepo=p.ComAtprotoRepoDeleteRecord=p.ComAtprotoRepoDefs=p.ComAtprotoRepoCreateRecord=p.ComAtprotoRepoApplyWrites=p.ComAtprotoModerationDefs=p.ComAtprotoModerationCreateReport=p.ComAtprotoLexiconSchema=p.ComAtprotoLabelSubscribeLabels=p.ComAtprotoLabelQueryLabels=p.ComAtprotoLabelDefs=p.ComAtprotoIdentityUpdateHandle=p.ComAtprotoIdentitySubmitPlcOperation=p.ComAtprotoIdentitySignPlcOperation=p.ComAtprotoIdentityResolveIdentity=p.ComAtprotoIdentityResolveHandle=p.ComAtprotoIdentityResolveDid=p.ComAtprotoIdentityRequestPlcOperationSignature=p.ComAtprotoIdentityRefreshIdentity=p.ComAtprotoIdentityGetRecommendedDidCredentials=p.ComAtprotoIdentityDefs=p.ComAtprotoAdminUpdateSubjectStatus=p.ComAtprotoAdminUpdateAccountSigningKey=p.ComAtprotoAdminUpdateAccountPassword=p.ComAtprotoAdminUpdateAccountHandle=p.ComAtprotoAdminUpdateAccountEmail=p.ComAtprotoAdminSendEmail=p.ComAtprotoAdminSearchAccounts=p.ComAtprotoAdminGetSubjectStatus=p.ComAtprotoAdminGetInviteCodes=p.ComAtprotoAdminGetAccountInfos=p.ComAtprotoAdminGetAccountInfo=p.ComAtprotoAdminEnableAccountInvites=p.ComAtprotoAdminDisableInviteCodes=p.ComAtprotoAdminDisableAccountInvites=p.ComAtprotoAdminDeleteAccount=p.ComAtprotoAdminDefs=void 0;p.AppBskyActorSearchActorsTypeahead=p.AppBskyActorSearchActors=p.AppBskyActorPutPreferences=p.AppBskyActorProfile=p.AppBskyActorGetSuggestions=p.AppBskyActorGetProfiles=p.AppBskyActorGetProfile=p.AppBskyActorGetPreferences=p.AppBskyActorDefs=p.ComAtprotoTempRequestPhoneVerification=p.ComAtprotoTempFetchLabels=p.ComAtprotoTempCheckSignupQueue=p.ComAtprotoTempAddReservedHandle=p.ComAtprotoSyncSubscribeRepos=p.ComAtprotoSyncRequestCrawl=p.ComAtprotoSyncNotifyOfUpdate=p.ComAtprotoSyncListReposByCollection=p.ComAtprotoSyncListRepos=p.ComAtprotoSyncListHosts=p.ComAtprotoSyncListBlobs=p.ComAtprotoSyncGetRepoStatus=p.ComAtprotoSyncGetRepo=p.ComAtprotoSyncGetRecord=p.ComAtprotoSyncGetLatestCommit=p.ComAtprotoSyncGetHostStatus=p.ComAtprotoSyncGetHead=p.ComAtprotoSyncGetCheckout=p.ComAtprotoSyncGetBlocks=p.ComAtprotoSyncGetBlob=p.ComAtprotoSyncDefs=p.ComAtprotoServerUpdateEmail=p.ComAtprotoServerRevokeAppPassword=p.ComAtprotoServerResetPassword=p.ComAtprotoServerReserveSigningKey=p.ComAtprotoServerRequestPasswordReset=p.ComAtprotoServerRequestEmailUpdate=p.ComAtprotoServerRequestEmailConfirmation=p.ComAtprotoServerRequestAccountDelete=p.ComAtprotoServerRefreshSession=p.ComAtprotoServerListAppPasswords=p.ComAtprotoServerGetSession=p.ComAtprotoServerGetServiceAuth=p.ComAtprotoServerGetAccountInviteCodes=p.ComAtprotoServerDescribeServer=p.ComAtprotoServerDeleteSession=p.ComAtprotoServerDeleteAccount=p.ComAtprotoServerDefs=p.ComAtprotoServerDeactivateAccount=p.ComAtprotoServerCreateSession=p.ComAtprotoServerCreateInviteCodes=void 0;p.AppBskyGraphList=p.AppBskyGraphGetSuggestedFollowsByActor=p.AppBskyGraphGetStarterPacks=p.AppBskyGraphGetStarterPack=p.AppBskyGraphGetRelationships=p.AppBskyGraphGetMutes=p.AppBskyGraphGetLists=p.AppBskyGraphGetListMutes=p.AppBskyGraphGetListBlocks=p.AppBskyGraphGetList=p.AppBskyGraphGetKnownFollowers=p.AppBskyGraphGetFollows=p.AppBskyGraphGetFollowers=p.AppBskyGraphGetBlocks=p.AppBskyGraphGetActorStarterPacks=p.AppBskyGraphFollow=p.AppBskyGraphDefs=p.AppBskyGraphBlock=p.AppBskyFeedThreadgate=p.AppBskyFeedSendInteractions=p.AppBskyFeedSearchPosts=p.AppBskyFeedRepost=p.AppBskyFeedPostgate=p.AppBskyFeedPost=p.AppBskyFeedLike=p.AppBskyFeedGetTimeline=p.AppBskyFeedGetSuggestedFeeds=p.AppBskyFeedGetRepostedBy=p.AppBskyFeedGetQuotes=p.AppBskyFeedGetPostThread=p.AppBskyFeedGetPosts=p.AppBskyFeedGetListFeed=p.AppBskyFeedGetLikes=p.AppBskyFeedGetFeedSkeleton=p.AppBskyFeedGetFeedGenerators=p.AppBskyFeedGetFeedGenerator=p.AppBskyFeedGetFeed=p.AppBskyFeedGetAuthorFeed=p.AppBskyFeedGetActorLikes=p.AppBskyFeedGetActorFeeds=p.AppBskyFeedGenerator=p.AppBskyFeedDescribeFeedGenerator=p.AppBskyFeedDefs=p.AppBskyEmbedVideo=p.AppBskyEmbedRecordWithMedia=p.AppBskyEmbedRecord=p.AppBskyEmbedImages=p.AppBskyEmbedExternal=p.AppBskyEmbedDefs=p.AppBskyActorStatus=void 0;p.ChatBskyActorExportAccountData=p.ChatBskyActorDeleteAccount=p.ChatBskyActorDefs=p.ChatBskyActorDeclaration=p.AppBskyVideoUploadVideo=p.AppBskyVideoGetUploadLimits=p.AppBskyVideoGetJobStatus=p.AppBskyVideoDefs=p.AppBskyUnspeccedSearchStarterPacksSkeleton=p.AppBskyUnspeccedSearchPostsSkeleton=p.AppBskyUnspeccedSearchActorsSkeleton=p.AppBskyUnspeccedGetTrendsSkeleton=p.AppBskyUnspeccedGetTrends=p.AppBskyUnspeccedGetTrendingTopics=p.AppBskyUnspeccedGetTaggedSuggestions=p.AppBskyUnspeccedGetSuggestionsSkeleton=p.AppBskyUnspeccedGetSuggestedUsersSkeleton=p.AppBskyUnspeccedGetSuggestedUsers=p.AppBskyUnspeccedGetSuggestedStarterPacksSkeleton=p.AppBskyUnspeccedGetSuggestedStarterPacks=p.AppBskyUnspeccedGetSuggestedFeedsSkeleton=p.AppBskyUnspeccedGetSuggestedFeeds=p.AppBskyUnspeccedGetPostThreadV2=p.AppBskyUnspeccedGetPostThreadOtherV2=p.AppBskyUnspeccedGetPopularFeedGenerators=p.AppBskyUnspeccedGetConfig=p.AppBskyUnspeccedDefs=p.AppBskyRichtextFacet=p.AppBskyNotificationUpdateSeen=p.AppBskyNotificationRegisterPush=p.AppBskyNotificationPutPreferencesV2=p.AppBskyNotificationPutPreferences=p.AppBskyNotificationListNotifications=p.AppBskyNotificationGetUnreadCount=p.AppBskyNotificationGetPreferences=p.AppBskyNotificationDefs=p.AppBskyLabelerService=p.AppBskyLabelerGetServices=p.AppBskyLabelerDefs=p.AppBskyGraphVerification=p.AppBskyGraphUnmuteThread=p.AppBskyGraphUnmuteActorList=p.AppBskyGraphUnmuteActor=p.AppBskyGraphStarterpack=p.AppBskyGraphSearchStarterPacks=p.AppBskyGraphMuteThread=p.AppBskyGraphMuteActorList=p.AppBskyGraphMuteActor=p.AppBskyGraphListitem=p.AppBskyGraphListblock=void 0;p.ToolsOzoneSettingRemoveOptions=p.ToolsOzoneSettingListOptions=p.ToolsOzoneSettingDefs=p.ToolsOzoneSetUpsertSet=p.ToolsOzoneSetQuerySets=p.ToolsOzoneSetGetValues=p.ToolsOzoneSetDeleteValues=p.ToolsOzoneSetDeleteSet=p.ToolsOzoneSetDefs=p.ToolsOzoneSetAddValues=p.ToolsOzoneServerGetConfig=p.ToolsOzoneModerationSearchRepos=p.ToolsOzoneModerationQueryStatuses=p.ToolsOzoneModerationQueryEvents=p.ToolsOzoneModerationGetSubjects=p.ToolsOzoneModerationGetRepos=p.ToolsOzoneModerationGetReporterStats=p.ToolsOzoneModerationGetRepo=p.ToolsOzoneModerationGetRecords=p.ToolsOzoneModerationGetRecord=p.ToolsOzoneModerationGetEvent=p.ToolsOzoneModerationEmitEvent=p.ToolsOzoneModerationDefs=p.ToolsOzoneHostingGetAccountHistory=p.ToolsOzoneCommunicationUpdateTemplate=p.ToolsOzoneCommunicationListTemplates=p.ToolsOzoneCommunicationDeleteTemplate=p.ToolsOzoneCommunicationDefs=p.ToolsOzoneCommunicationCreateTemplate=p.ChatBskyModerationUpdateActorAccess=p.ChatBskyModerationGetMessageContext=p.ChatBskyModerationGetActorMetadata=p.ChatBskyConvoUpdateRead=p.ChatBskyConvoUpdateAllRead=p.ChatBskyConvoUnmuteConvo=p.ChatBskyConvoSendMessageBatch=p.ChatBskyConvoSendMessage=p.ChatBskyConvoRemoveReaction=p.ChatBskyConvoMuteConvo=p.ChatBskyConvoListConvos=p.ChatBskyConvoLeaveConvo=p.ChatBskyConvoGetMessages=p.ChatBskyConvoGetLog=p.ChatBskyConvoGetConvoForMembers=p.ChatBskyConvoGetConvoAvailability=p.ChatBskyConvoGetConvo=p.ChatBskyConvoDeleteMessageForSelf=p.ChatBskyConvoDefs=p.ChatBskyConvoAddReaction=p.ChatBskyConvoAcceptConvo=void 0;p.AppBskyGraphListRecord=p.AppBskyGraphFollowRecord=p.AppBskyGraphBlockRecord=p.AppBskyGraphNS=p.AppBskyFeedThreadgateRecord=p.AppBskyFeedRepostRecord=p.AppBskyFeedPostgateRecord=p.AppBskyFeedPostRecord=p.AppBskyFeedLikeRecord=p.AppBskyFeedGeneratorRecord=p.AppBskyFeedNS=p.AppBskyEmbedNS=p.AppBskyActorStatusRecord=p.AppBskyActorProfileRecord=p.AppBskyActorNS=p.AppBskyNS=p.AppNS=p.ComAtprotoTempNS=p.ComAtprotoSyncNS=p.ComAtprotoServerNS=p.ComAtprotoRepoNS=p.ComAtprotoModerationNS=p.ComAtprotoLexiconSchemaRecord=p.ComAtprotoLexiconNS=p.ComAtprotoLabelNS=p.ComAtprotoIdentityNS=p.ComAtprotoAdminNS=p.ComAtprotoNS=p.ComNS=p.AtpBaseClient=p.TOOLS_OZONE_TEAM=p.TOOLS_OZONE_MODERATION=p.APP_BSKY_GRAPH=p.APP_BSKY_FEED=p.APP_BSKY_ACTOR=p.COM_ATPROTO_MODERATION=p.ToolsOzoneVerificationRevokeVerifications=p.ToolsOzoneVerificationListVerifications=p.ToolsOzoneVerificationGrantVerifications=p.ToolsOzoneVerificationDefs=p.ToolsOzoneTeamUpdateMember=p.ToolsOzoneTeamListMembers=p.ToolsOzoneTeamDeleteMember=p.ToolsOzoneTeamDefs=p.ToolsOzoneTeamAddMember=p.ToolsOzoneSignatureSearchAccounts=p.ToolsOzoneSignatureFindRelatedAccounts=p.ToolsOzoneSignatureFindCorrelation=p.ToolsOzoneSignatureDefs=p.ToolsOzoneSettingUpsertOption=void 0;p.ToolsOzoneVerificationNS=p.ToolsOzoneTeamNS=p.ToolsOzoneSignatureNS=p.ToolsOzoneSettingNS=p.ToolsOzoneSetNS=p.ToolsOzoneServerNS=p.ToolsOzoneModerationNS=p.ToolsOzoneHostingNS=p.ToolsOzoneCommunicationNS=p.ToolsOzoneNS=p.ToolsNS=p.ChatBskyModerationNS=p.ChatBskyConvoNS=p.ChatBskyActorDeclarationRecord=p.ChatBskyActorNS=p.ChatBskyNS=p.ChatNS=p.AppBskyVideoNS=p.AppBskyUnspeccedNS=p.AppBskyRichtextNS=p.AppBskyNotificationNS=p.AppBskyLabelerServiceRecord=p.AppBskyLabelerNS=p.AppBskyGraphVerificationRecord=p.AppBskyGraphStarterpackRecord=p.AppBskyGraphListitemRecord=p.AppBskyGraphListblockRecord=void 0;const Pye=W,Dye=x,Bye=v(Dn),Iye=v(vo),jye=v(cl),Uye=v(Bn),$ye=v(gt),Oye=v(fl),Kye=v(hl),Vye=v(yl),Mye=v(ml),Nye=v(Dr),zye=v(ft),Fye=v(Ko),qye=v(Eo),Gye=v(wo),Hye=v(gl),Xye=v(bl),Wye=v(Vo),Jye=v(vl),Zye=v(_o),Qye=v(In),Yye=v(tr),eme=v(rr),tme=v(_l),rme=v(xl),nme=v(Br),ime=v(nr),ome=v(Ir),sme=v(Al),ame=v(jr),lme=v(Sl),ume=v(xo),cme=v(Ro),dme=v(Cl),pme=v(Tl),fme=v(kl),hme=v(Ll),yme=v(Pl),mme=v(Dl),gme=v(Bl),bme=v(Il),vme=v(jl),Eme=v(jn),wme=v(Ao),_me=v(Ul),xme=v($l),Rme=v(Ol),Ame=v(Kl),Sme=v(Vl),Cme=v(Ml),Tme=v(Nl),kme=v(zl),Lme=v(Fl),Pme=v(So),Dme=v(ql);p.ComAtprotoAdminDefs=v(Nr);p.ComAtprotoAdminDeleteAccount=v(lE);p.ComAtprotoAdminDisableAccountInvites=v(uE);p.ComAtprotoAdminDisableInviteCodes=v(cE);p.ComAtprotoAdminEnableAccountInvites=v(dE);p.ComAtprotoAdminGetAccountInfo=v(pE);p.ComAtprotoAdminGetAccountInfos=v(fE);p.ComAtprotoAdminGetInviteCodes=v(hE);p.ComAtprotoAdminGetSubjectStatus=v(yE);p.ComAtprotoAdminSearchAccounts=v(mE);p.ComAtprotoAdminSendEmail=v(gE);p.ComAtprotoAdminUpdateAccountEmail=v(bE);p.ComAtprotoAdminUpdateAccountHandle=v(vE);p.ComAtprotoAdminUpdateAccountPassword=v(EE);p.ComAtprotoAdminUpdateAccountSigningKey=v(wE);p.ComAtprotoAdminUpdateSubjectStatus=v(_E);p.ComAtprotoIdentityDefs=v(Gy);p.ComAtprotoIdentityGetRecommendedDidCredentials=v(xE);p.ComAtprotoIdentityRefreshIdentity=v(Dn);p.ComAtprotoIdentityRequestPlcOperationSignature=v(RE);p.ComAtprotoIdentityResolveDid=v(vo);p.ComAtprotoIdentityResolveHandle=v(cl);p.ComAtprotoIdentityResolveIdentity=v(Bn);p.ComAtprotoIdentitySignPlcOperation=v(AE);p.ComAtprotoIdentitySubmitPlcOperation=v(SE);p.ComAtprotoIdentityUpdateHandle=v(CE);p.ComAtprotoLabelDefs=v(zr);p.ComAtprotoLabelQueryLabels=v(TE);p.ComAtprotoLabelSubscribeLabels=v(Gl);p.ComAtprotoLexiconSchema=v(Xy);p.ComAtprotoModerationCreateReport=v(kE);p.ComAtprotoModerationDefs=v(Pt);p.ComAtprotoRepoApplyWrites=v(gt);p.ComAtprotoRepoCreateRecord=v(fl);p.ComAtprotoRepoDefs=v(Wy);p.ComAtprotoRepoDeleteRecord=v(hl);p.ComAtprotoRepoDescribeRepo=v(LE);p.ComAtprotoRepoGetRecord=v(yl);p.ComAtprotoRepoImportRepo=v(PE);p.ComAtprotoRepoListMissingBlobs=v(Ud);p.ComAtprotoRepoListRecords=v($d);p.ComAtprotoRepoPutRecord=v(ml);p.ComAtprotoRepoStrongRef=v(Jy);p.ComAtprotoRepoUploadBlob=v(DE);p.ComAtprotoServerActivateAccount=v(BE);p.ComAtprotoServerCheckAccountStatus=v(IE);p.ComAtprotoServerConfirmEmail=v(Dr);p.ComAtprotoServerCreateAccount=v(ft);p.ComAtprotoServerCreateAppPassword=v(Ko);p.ComAtprotoServerCreateInviteCode=v(jE);p.ComAtprotoServerCreateInviteCodes=v(Od);p.ComAtprotoServerCreateSession=v(Eo);p.ComAtprotoServerDeactivateAccount=v(UE);p.ComAtprotoServerDefs=v(Hl);p.ComAtprotoServerDeleteAccount=v(wo);p.ComAtprotoServerDeleteSession=v($E);p.ComAtprotoServerDescribeServer=v(Ks);p.ComAtprotoServerGetAccountInviteCodes=v(gl);p.ComAtprotoServerGetServiceAuth=v(bl);p.ComAtprotoServerGetSession=v(OE);p.ComAtprotoServerListAppPasswords=v(Vo);p.ComAtprotoServerRefreshSession=v(vl);p.ComAtprotoServerRequestAccountDelete=v(KE);p.ComAtprotoServerRequestEmailConfirmation=v(VE);p.ComAtprotoServerRequestEmailUpdate=v(ME);p.ComAtprotoServerRequestPasswordReset=v(NE);p.ComAtprotoServerReserveSigningKey=v(zE);p.ComAtprotoServerResetPassword=v(_o);p.ComAtprotoServerRevokeAppPassword=v(FE);p.ComAtprotoServerUpdateEmail=v(In);p.ComAtprotoSyncDefs=v(QD);p.ComAtprotoSyncGetBlob=v(tr);p.ComAtprotoSyncGetBlocks=v(rr);p.ComAtprotoSyncGetCheckout=v(qE);p.ComAtprotoSyncGetHead=v(_l);p.ComAtprotoSyncGetHostStatus=v(xl);p.ComAtprotoSyncGetLatestCommit=v(Br);p.ComAtprotoSyncGetRecord=v(nr);p.ComAtprotoSyncGetRepo=v(Ir);p.ComAtprotoSyncGetRepoStatus=v(Al);p.ComAtprotoSyncListBlobs=v(jr);p.ComAtprotoSyncListHosts=v(Kd);p.ComAtprotoSyncListRepos=v(Vd);p.ComAtprotoSyncListReposByCollection=v(Md);p.ComAtprotoSyncNotifyOfUpdate=v(GE);p.ComAtprotoSyncRequestCrawl=v(Sl);p.ComAtprotoSyncSubscribeRepos=v(dr);p.ComAtprotoTempAddReservedHandle=v(HE);p.ComAtprotoTempCheckSignupQueue=v(XE);p.ComAtprotoTempFetchLabels=v(WE);p.ComAtprotoTempRequestPhoneVerification=v(JE);p.AppBskyActorDefs=v(H);p.AppBskyActorGetPreferences=v(ZE);p.AppBskyActorGetProfile=v(QE);p.AppBskyActorGetProfiles=v(YE);p.AppBskyActorGetSuggestions=v(ew);p.AppBskyActorProfile=v(Yy);p.AppBskyActorPutPreferences=v(tw);p.AppBskyActorSearchActors=v(rw);p.AppBskyActorSearchActorsTypeahead=v(nw);p.AppBskyActorStatus=v(Jl);p.AppBskyEmbedDefs=v(em);p.AppBskyEmbedExternal=v(qn);p.AppBskyEmbedImages=v(Gn);p.AppBskyEmbedRecord=v(pr);p.AppBskyEmbedRecordWithMedia=v(Yl);p.AppBskyEmbedVideo=v(zo);p.AppBskyFeedDefs=v(N);p.AppBskyFeedDescribeFeedGenerator=v(Vs);p.AppBskyFeedGenerator=v(am);p.AppBskyFeedGetActorFeeds=v(aw);p.AppBskyFeedGetActorLikes=v(xo);p.AppBskyFeedGetAuthorFeed=v(Ro);p.AppBskyFeedGetFeed=v(Cl);p.AppBskyFeedGetFeedGenerator=v(lw);p.AppBskyFeedGetFeedGenerators=v(uw);p.AppBskyFeedGetFeedSkeleton=v(Tl);p.AppBskyFeedGetLikes=v(Nd);p.AppBskyFeedGetListFeed=v(kl);p.AppBskyFeedGetPosts=v(cw);p.AppBskyFeedGetPostThread=v(Ll);p.AppBskyFeedGetQuotes=v(dw);p.AppBskyFeedGetRepostedBy=v(pw);p.AppBskyFeedGetSuggestedFeeds=v(fw);p.AppBskyFeedGetTimeline=v(hw);p.AppBskyFeedLike=v(lm);p.AppBskyFeedPost=v(Hn);p.AppBskyFeedPostgate=v(tu);p.AppBskyFeedRepost=v(pm);p.AppBskyFeedSearchPosts=v(Pl);p.AppBskyFeedSendInteractions=v(yw);p.AppBskyFeedThreadgate=v(Gr);p.AppBskyGraphBlock=v(fm);p.AppBskyGraphDefs=v(Ie);p.AppBskyGraphFollow=v(hm);p.AppBskyGraphGetActorStarterPacks=v(mw);p.AppBskyGraphGetBlocks=v(gw);p.AppBskyGraphGetFollowers=v(bw);p.AppBskyGraphGetFollows=v(vw);p.AppBskyGraphGetKnownFollowers=v(Ew);p.AppBskyGraphGetList=v(ww);p.AppBskyGraphGetListBlocks=v(_w);p.AppBskyGraphGetListMutes=v(xw);p.AppBskyGraphGetLists=v(Rw);p.AppBskyGraphGetMutes=v(Aw);p.AppBskyGraphGetRelationships=v(Dl);p.AppBskyGraphGetStarterPack=v(Sw);p.AppBskyGraphGetStarterPacks=v(Cw);p.AppBskyGraphGetSuggestedFollowsByActor=v(Tw);p.AppBskyGraphList=v(ym);p.AppBskyGraphListblock=v(mm);p.AppBskyGraphListitem=v(gm);p.AppBskyGraphMuteActor=v(kw);p.AppBskyGraphMuteActorList=v(Lw);p.AppBskyGraphMuteThread=v(Pw);p.AppBskyGraphSearchStarterPacks=v(Dw);p.AppBskyGraphStarterpack=v(ru);p.AppBskyGraphUnmuteActor=v(Bw);p.AppBskyGraphUnmuteActorList=v(Iw);p.AppBskyGraphUnmuteThread=v(jw);p.AppBskyGraphVerification=v(vm);p.AppBskyLabelerDefs=v(Wn);p.AppBskyLabelerGetServices=v(Uw);p.AppBskyLabelerService=v(_m);p.AppBskyNotificationDefs=v(Hr);p.AppBskyNotificationGetPreferences=v($w);p.AppBskyNotificationGetUnreadCount=v(Ow);p.AppBskyNotificationListNotifications=v(Hd);p.AppBskyNotificationPutPreferences=v(Kw);p.AppBskyNotificationPutPreferencesV2=v(Vw);p.AppBskyNotificationRegisterPush=v(Mw);p.AppBskyNotificationUpdateSeen=v(Nw);p.AppBskyRichtextFacet=v(Xr);p.AppBskyUnspeccedDefs=v(Ne);p.AppBskyUnspeccedGetConfig=v(Jd);p.AppBskyUnspeccedGetPopularFeedGenerators=v(zw);p.AppBskyUnspeccedGetPostThreadOtherV2=v(Zd);p.AppBskyUnspeccedGetPostThreadV2=v(Qd);p.AppBskyUnspeccedGetSuggestedFeeds=v(Fw);p.AppBskyUnspeccedGetSuggestedFeedsSkeleton=v(qw);p.AppBskyUnspeccedGetSuggestedStarterPacks=v(Gw);p.AppBskyUnspeccedGetSuggestedStarterPacksSkeleton=v(Hw);p.AppBskyUnspeccedGetSuggestedUsers=v(Xw);p.AppBskyUnspeccedGetSuggestedUsersSkeleton=v(Ww);p.AppBskyUnspeccedGetSuggestionsSkeleton=v(Jw);p.AppBskyUnspeccedGetTaggedSuggestions=v(Yd);p.AppBskyUnspeccedGetTrendingTopics=v(Zw);p.AppBskyUnspeccedGetTrends=v(Qw);p.AppBskyUnspeccedGetTrendsSkeleton=v(Yw);p.AppBskyUnspeccedSearchActorsSkeleton=v(Bl);p.AppBskyUnspeccedSearchPostsSkeleton=v(Il);p.AppBskyUnspeccedSearchStarterPacksSkeleton=v(jl);p.AppBskyVideoDefs=v(xm);p.AppBskyVideoGetJobStatus=v(e_);p.AppBskyVideoGetUploadLimits=v(t_);p.AppBskyVideoUploadVideo=v(r_);p.ChatBskyActorDeclaration=v(Rm);p.ChatBskyActorDefs=v(Am);p.ChatBskyActorDeleteAccount=v(n_);p.ChatBskyActorExportAccountData=v(i_);p.ChatBskyConvoAcceptConvo=v(o_);p.ChatBskyConvoAddReaction=v(jn);p.ChatBskyConvoDefs=v(se);p.ChatBskyConvoDeleteMessageForSelf=v(s_);p.ChatBskyConvoGetConvo=v(a_);p.ChatBskyConvoGetConvoAvailability=v(l_);p.ChatBskyConvoGetConvoForMembers=v(u_);p.ChatBskyConvoGetLog=v(c_);p.ChatBskyConvoGetMessages=v(d_);p.ChatBskyConvoLeaveConvo=v(p_);p.ChatBskyConvoListConvos=v(f_);p.ChatBskyConvoMuteConvo=v(h_);p.ChatBskyConvoRemoveReaction=v(Ao);p.ChatBskyConvoSendMessage=v(y_);p.ChatBskyConvoSendMessageBatch=v(ep);p.ChatBskyConvoUnmuteConvo=v(m_);p.ChatBskyConvoUpdateAllRead=v(g_);p.ChatBskyConvoUpdateRead=v(b_);p.ChatBskyModerationGetActorMetadata=v(tp);p.ChatBskyModerationGetMessageContext=v(v_);p.ChatBskyModerationUpdateActorAccess=v(E_);p.ToolsOzoneCommunicationCreateTemplate=v(Ul);p.ToolsOzoneCommunicationDefs=v(Sm);p.ToolsOzoneCommunicationDeleteTemplate=v(w_);p.ToolsOzoneCommunicationListTemplates=v(__);p.ToolsOzoneCommunicationUpdateTemplate=v($l);p.ToolsOzoneHostingGetAccountHistory=v(Xt);p.ToolsOzoneModerationDefs=v(U);p.ToolsOzoneModerationEmitEvent=v(Ol);p.ToolsOzoneModerationGetEvent=v(x_);p.ToolsOzoneModerationGetRecord=v(Kl);p.ToolsOzoneModerationGetRecords=v(R_);p.ToolsOzoneModerationGetRepo=v(Vl);p.ToolsOzoneModerationGetReporterStats=v(A_);p.ToolsOzoneModerationGetRepos=v(S_);p.ToolsOzoneModerationGetSubjects=v(C_);p.ToolsOzoneModerationQueryEvents=v(T_);p.ToolsOzoneModerationQueryStatuses=v(k_);p.ToolsOzoneModerationSearchRepos=v(L_);p.ToolsOzoneServerGetConfig=v(Ms);p.ToolsOzoneSetAddValues=v(P_);p.ToolsOzoneSetDefs=v(ou);p.ToolsOzoneSetDeleteSet=v(Ml);p.ToolsOzoneSetDeleteValues=v(Nl);p.ToolsOzoneSetGetValues=v(zl);p.ToolsOzoneSetQuerySets=v(D_);p.ToolsOzoneSetUpsertSet=v(B_);p.ToolsOzoneSettingDefs=v(km);p.ToolsOzoneSettingListOptions=v(I_);p.ToolsOzoneSettingRemoveOptions=v(j_);p.ToolsOzoneSettingUpsertOption=v(U_);p.ToolsOzoneSignatureDefs=v(Lm);p.ToolsOzoneSignatureFindCorrelation=v($_);p.ToolsOzoneSignatureFindRelatedAccounts=v(rp);p.ToolsOzoneSignatureSearchAccounts=v(O_);p.ToolsOzoneTeamAddMember=v(Fl);p.ToolsOzoneTeamDefs=v(Ur);p.ToolsOzoneTeamDeleteMember=v(So);p.ToolsOzoneTeamListMembers=v(K_);p.ToolsOzoneTeamUpdateMember=v(ql);p.ToolsOzoneVerificationDefs=v(Pm);p.ToolsOzoneVerificationGrantVerifications=v(Ns);p.ToolsOzoneVerificationListVerifications=v(V_);p.ToolsOzoneVerificationRevokeVerifications=v(np);p.COM_ATPROTO_MODERATION={DefsReasonSpam:"com.atproto.moderation.defs#reasonSpam",DefsReasonViolation:"com.atproto.moderation.defs#reasonViolation",DefsReasonMisleading:"com.atproto.moderation.defs#reasonMisleading",DefsReasonSexual:"com.atproto.moderation.defs#reasonSexual",DefsReasonRude:"com.atproto.moderation.defs#reasonRude",DefsReasonOther:"com.atproto.moderation.defs#reasonOther",DefsReasonAppeal:"com.atproto.moderation.defs#reasonAppeal"};p.APP_BSKY_ACTOR={StatusLive:"app.bsky.actor.status#live"};p.APP_BSKY_FEED={DefsRequestLess:"app.bsky.feed.defs#requestLess",DefsRequestMore:"app.bsky.feed.defs#requestMore",DefsClickthroughItem:"app.bsky.feed.defs#clickthroughItem",DefsClickthroughAuthor:"app.bsky.feed.defs#clickthroughAuthor",DefsClickthroughReposter:"app.bsky.feed.defs#clickthroughReposter",DefsClickthroughEmbed:"app.bsky.feed.defs#clickthroughEmbed",DefsContentModeUnspecified:"app.bsky.feed.defs#contentModeUnspecified",DefsContentModeVideo:"app.bsky.feed.defs#contentModeVideo",DefsInteractionSeen:"app.bsky.feed.defs#interactionSeen",DefsInteractionLike:"app.bsky.feed.defs#interactionLike",DefsInteractionRepost:"app.bsky.feed.defs#interactionRepost",DefsInteractionReply:"app.bsky.feed.defs#interactionReply",DefsInteractionQuote:"app.bsky.feed.defs#interactionQuote",DefsInteractionShare:"app.bsky.feed.defs#interactionShare"};p.APP_BSKY_GRAPH={DefsModlist:"app.bsky.graph.defs#modlist",DefsCuratelist:"app.bsky.graph.defs#curatelist",DefsReferencelist:"app.bsky.graph.defs#referencelist"};p.TOOLS_OZONE_MODERATION={DefsReviewOpen:"tools.ozone.moderation.defs#reviewOpen",DefsReviewEscalated:"tools.ozone.moderation.defs#reviewEscalated",DefsReviewClosed:"tools.ozone.moderation.defs#reviewClosed",DefsReviewNone:"tools.ozone.moderation.defs#reviewNone"};p.TOOLS_OZONE_TEAM={DefsRoleAdmin:"tools.ozone.team.defs#roleAdmin",DefsRoleModerator:"tools.ozone.team.defs#roleModerator",DefsRoleTriage:"tools.ozone.team.defs#roleTriage",DefsRoleVerifier:"tools.ozone.team.defs#roleVerifier"};class Bme extends Pye.XrpcClient{constructor(e){super(e,Dye.schemas),Object.defineProperty(this,"com",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"app",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.com=new Q$(this),this.app=new cO(this),this.chat=new $O(this),this.tools=new zO(this)}get xrpc(){return this}}p.AtpBaseClient=Bme;class Q${constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"atproto",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.atproto=new Y$(e)}}p.ComNS=Q$;class Y${constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"admin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"identity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"label",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lexicon",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"repo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sync",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"temp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.admin=new eO(e),this.identity=new tO(e),this.label=new rO(e),this.lexicon=new nO(e),this.moderation=new oO(e),this.repo=new sO(e),this.server=new aO(e),this.sync=new lO(e),this.temp=new uO(e)}}p.ComAtprotoNS=Y$;class eO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}deleteAccount(e,r){return this._client.call("com.atproto.admin.deleteAccount",r==null?void 0:r.qp,e,r)}disableAccountInvites(e,r){return this._client.call("com.atproto.admin.disableAccountInvites",r==null?void 0:r.qp,e,r)}disableInviteCodes(e,r){return this._client.call("com.atproto.admin.disableInviteCodes",r==null?void 0:r.qp,e,r)}enableAccountInvites(e,r){return this._client.call("com.atproto.admin.enableAccountInvites",r==null?void 0:r.qp,e,r)}getAccountInfo(e,r){return this._client.call("com.atproto.admin.getAccountInfo",e,void 0,r)}getAccountInfos(e,r){return this._client.call("com.atproto.admin.getAccountInfos",e,void 0,r)}getInviteCodes(e,r){return this._client.call("com.atproto.admin.getInviteCodes",e,void 0,r)}getSubjectStatus(e,r){return this._client.call("com.atproto.admin.getSubjectStatus",e,void 0,r)}searchAccounts(e,r){return this._client.call("com.atproto.admin.searchAccounts",e,void 0,r)}sendEmail(e,r){return this._client.call("com.atproto.admin.sendEmail",r==null?void 0:r.qp,e,r)}updateAccountEmail(e,r){return this._client.call("com.atproto.admin.updateAccountEmail",r==null?void 0:r.qp,e,r)}updateAccountHandle(e,r){return this._client.call("com.atproto.admin.updateAccountHandle",r==null?void 0:r.qp,e,r)}updateAccountPassword(e,r){return this._client.call("com.atproto.admin.updateAccountPassword",r==null?void 0:r.qp,e,r)}updateAccountSigningKey(e,r){return this._client.call("com.atproto.admin.updateAccountSigningKey",r==null?void 0:r.qp,e,r)}updateSubjectStatus(e,r){return this._client.call("com.atproto.admin.updateSubjectStatus",r==null?void 0:r.qp,e,r)}}p.ComAtprotoAdminNS=eO;class tO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getRecommendedDidCredentials(e,r){return this._client.call("com.atproto.identity.getRecommendedDidCredentials",e,void 0,r)}refreshIdentity(e,r){return this._client.call("com.atproto.identity.refreshIdentity",r==null?void 0:r.qp,e,r).catch(n=>{throw Bye.toKnownErr(n)})}requestPlcOperationSignature(e,r){return this._client.call("com.atproto.identity.requestPlcOperationSignature",r==null?void 0:r.qp,e,r)}resolveDid(e,r){return this._client.call("com.atproto.identity.resolveDid",e,void 0,r).catch(n=>{throw Iye.toKnownErr(n)})}resolveHandle(e,r){return this._client.call("com.atproto.identity.resolveHandle",e,void 0,r).catch(n=>{throw jye.toKnownErr(n)})}resolveIdentity(e,r){return this._client.call("com.atproto.identity.resolveIdentity",e,void 0,r).catch(n=>{throw Uye.toKnownErr(n)})}signPlcOperation(e,r){return this._client.call("com.atproto.identity.signPlcOperation",r==null?void 0:r.qp,e,r)}submitPlcOperation(e,r){return this._client.call("com.atproto.identity.submitPlcOperation",r==null?void 0:r.qp,e,r)}updateHandle(e,r){return this._client.call("com.atproto.identity.updateHandle",r==null?void 0:r.qp,e,r)}}p.ComAtprotoIdentityNS=tO;class rO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}queryLabels(e,r){return this._client.call("com.atproto.label.queryLabels",e,void 0,r)}}p.ComAtprotoLabelNS=rO;class nO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schema",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.schema=new iO(e)}}p.ComAtprotoLexiconNS=nO;class iO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"com.atproto.lexicon.schema",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"com.atproto.lexicon.schema",...e})).data}async create(e,r,n){const i="com.atproto.lexicon.schema";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"com.atproto.lexicon.schema",...e},{headers:r})}}p.ComAtprotoLexiconSchemaRecord=iO;class oO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}createReport(e,r){return this._client.call("com.atproto.moderation.createReport",r==null?void 0:r.qp,e,r)}}p.ComAtprotoModerationNS=oO;class sO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}applyWrites(e,r){return this._client.call("com.atproto.repo.applyWrites",r==null?void 0:r.qp,e,r).catch(n=>{throw $ye.toKnownErr(n)})}createRecord(e,r){return this._client.call("com.atproto.repo.createRecord",r==null?void 0:r.qp,e,r).catch(n=>{throw Oye.toKnownErr(n)})}deleteRecord(e,r){return this._client.call("com.atproto.repo.deleteRecord",r==null?void 0:r.qp,e,r).catch(n=>{throw Kye.toKnownErr(n)})}describeRepo(e,r){return this._client.call("com.atproto.repo.describeRepo",e,void 0,r)}getRecord(e,r){return this._client.call("com.atproto.repo.getRecord",e,void 0,r).catch(n=>{throw Vye.toKnownErr(n)})}importRepo(e,r){return this._client.call("com.atproto.repo.importRepo",r==null?void 0:r.qp,e,r)}listMissingBlobs(e,r){return this._client.call("com.atproto.repo.listMissingBlobs",e,void 0,r)}listRecords(e,r){return this._client.call("com.atproto.repo.listRecords",e,void 0,r)}putRecord(e,r){return this._client.call("com.atproto.repo.putRecord",r==null?void 0:r.qp,e,r).catch(n=>{throw Mye.toKnownErr(n)})}uploadBlob(e,r){return this._client.call("com.atproto.repo.uploadBlob",r==null?void 0:r.qp,e,r)}}p.ComAtprotoRepoNS=sO;class aO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}activateAccount(e,r){return this._client.call("com.atproto.server.activateAccount",r==null?void 0:r.qp,e,r)}checkAccountStatus(e,r){return this._client.call("com.atproto.server.checkAccountStatus",e,void 0,r)}confirmEmail(e,r){return this._client.call("com.atproto.server.confirmEmail",r==null?void 0:r.qp,e,r).catch(n=>{throw Nye.toKnownErr(n)})}createAccount(e,r){return this._client.call("com.atproto.server.createAccount",r==null?void 0:r.qp,e,r).catch(n=>{throw zye.toKnownErr(n)})}createAppPassword(e,r){return this._client.call("com.atproto.server.createAppPassword",r==null?void 0:r.qp,e,r).catch(n=>{throw Fye.toKnownErr(n)})}createInviteCode(e,r){return this._client.call("com.atproto.server.createInviteCode",r==null?void 0:r.qp,e,r)}createInviteCodes(e,r){return this._client.call("com.atproto.server.createInviteCodes",r==null?void 0:r.qp,e,r)}createSession(e,r){return this._client.call("com.atproto.server.createSession",r==null?void 0:r.qp,e,r).catch(n=>{throw qye.toKnownErr(n)})}deactivateAccount(e,r){return this._client.call("com.atproto.server.deactivateAccount",r==null?void 0:r.qp,e,r)}deleteAccount(e,r){return this._client.call("com.atproto.server.deleteAccount",r==null?void 0:r.qp,e,r).catch(n=>{throw Gye.toKnownErr(n)})}deleteSession(e,r){return this._client.call("com.atproto.server.deleteSession",r==null?void 0:r.qp,e,r)}describeServer(e,r){return this._client.call("com.atproto.server.describeServer",e,void 0,r)}getAccountInviteCodes(e,r){return this._client.call("com.atproto.server.getAccountInviteCodes",e,void 0,r).catch(n=>{throw Hye.toKnownErr(n)})}getServiceAuth(e,r){return this._client.call("com.atproto.server.getServiceAuth",e,void 0,r).catch(n=>{throw Xye.toKnownErr(n)})}getSession(e,r){return this._client.call("com.atproto.server.getSession",e,void 0,r)}listAppPasswords(e,r){return this._client.call("com.atproto.server.listAppPasswords",e,void 0,r).catch(n=>{throw Wye.toKnownErr(n)})}refreshSession(e,r){return this._client.call("com.atproto.server.refreshSession",r==null?void 0:r.qp,e,r).catch(n=>{throw Jye.toKnownErr(n)})}requestAccountDelete(e,r){return this._client.call("com.atproto.server.requestAccountDelete",r==null?void 0:r.qp,e,r)}requestEmailConfirmation(e,r){return this._client.call("com.atproto.server.requestEmailConfirmation",r==null?void 0:r.qp,e,r)}requestEmailUpdate(e,r){return this._client.call("com.atproto.server.requestEmailUpdate",r==null?void 0:r.qp,e,r)}requestPasswordReset(e,r){return this._client.call("com.atproto.server.requestPasswordReset",r==null?void 0:r.qp,e,r)}reserveSigningKey(e,r){return this._client.call("com.atproto.server.reserveSigningKey",r==null?void 0:r.qp,e,r)}resetPassword(e,r){return this._client.call("com.atproto.server.resetPassword",r==null?void 0:r.qp,e,r).catch(n=>{throw Zye.toKnownErr(n)})}revokeAppPassword(e,r){return this._client.call("com.atproto.server.revokeAppPassword",r==null?void 0:r.qp,e,r)}updateEmail(e,r){return this._client.call("com.atproto.server.updateEmail",r==null?void 0:r.qp,e,r).catch(n=>{throw Qye.toKnownErr(n)})}}p.ComAtprotoServerNS=aO;class lO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getBlob(e,r){return this._client.call("com.atproto.sync.getBlob",e,void 0,r).catch(n=>{throw Yye.toKnownErr(n)})}getBlocks(e,r){return this._client.call("com.atproto.sync.getBlocks",e,void 0,r).catch(n=>{throw eme.toKnownErr(n)})}getCheckout(e,r){return this._client.call("com.atproto.sync.getCheckout",e,void 0,r)}getHead(e,r){return this._client.call("com.atproto.sync.getHead",e,void 0,r).catch(n=>{throw tme.toKnownErr(n)})}getHostStatus(e,r){return this._client.call("com.atproto.sync.getHostStatus",e,void 0,r).catch(n=>{throw rme.toKnownErr(n)})}getLatestCommit(e,r){return this._client.call("com.atproto.sync.getLatestCommit",e,void 0,r).catch(n=>{throw nme.toKnownErr(n)})}getRecord(e,r){return this._client.call("com.atproto.sync.getRecord",e,void 0,r).catch(n=>{throw ime.toKnownErr(n)})}getRepo(e,r){return this._client.call("com.atproto.sync.getRepo",e,void 0,r).catch(n=>{throw ome.toKnownErr(n)})}getRepoStatus(e,r){return this._client.call("com.atproto.sync.getRepoStatus",e,void 0,r).catch(n=>{throw sme.toKnownErr(n)})}listBlobs(e,r){return this._client.call("com.atproto.sync.listBlobs",e,void 0,r).catch(n=>{throw ame.toKnownErr(n)})}listHosts(e,r){return this._client.call("com.atproto.sync.listHosts",e,void 0,r)}listRepos(e,r){return this._client.call("com.atproto.sync.listRepos",e,void 0,r)}listReposByCollection(e,r){return this._client.call("com.atproto.sync.listReposByCollection",e,void 0,r)}notifyOfUpdate(e,r){return this._client.call("com.atproto.sync.notifyOfUpdate",r==null?void 0:r.qp,e,r)}requestCrawl(e,r){return this._client.call("com.atproto.sync.requestCrawl",r==null?void 0:r.qp,e,r).catch(n=>{throw lme.toKnownErr(n)})}}p.ComAtprotoSyncNS=lO;class uO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addReservedHandle(e,r){return this._client.call("com.atproto.temp.addReservedHandle",r==null?void 0:r.qp,e,r)}checkSignupQueue(e,r){return this._client.call("com.atproto.temp.checkSignupQueue",e,void 0,r)}fetchLabels(e,r){return this._client.call("com.atproto.temp.fetchLabels",e,void 0,r)}requestPhoneVerification(e,r){return this._client.call("com.atproto.temp.requestPhoneVerification",r==null?void 0:r.qp,e,r)}}p.ComAtprotoTempNS=uO;class cO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bsky",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.bsky=new dO(e)}}p.AppNS=cO;class dO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"actor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"embed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"feed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"graph",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"labeler",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"notification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"richtext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unspecced",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"video",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.actor=new pO(e),this.embed=new yO(e),this.feed=new mO(e),this.graph=new xO(e),this.labeler=new PO(e),this.notification=new BO(e),this.richtext=new IO(e),this.unspecced=new jO(e),this.video=new UO(e)}}p.AppBskyNS=dO;class pO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"profile",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.profile=new fO(e),this.status=new hO(e)}getPreferences(e,r){return this._client.call("app.bsky.actor.getPreferences",e,void 0,r)}getProfile(e,r){return this._client.call("app.bsky.actor.getProfile",e,void 0,r)}getProfiles(e,r){return this._client.call("app.bsky.actor.getProfiles",e,void 0,r)}getSuggestions(e,r){return this._client.call("app.bsky.actor.getSuggestions",e,void 0,r)}putPreferences(e,r){return this._client.call("app.bsky.actor.putPreferences",r==null?void 0:r.qp,e,r)}searchActors(e,r){return this._client.call("app.bsky.actor.searchActors",e,void 0,r)}searchActorsTypeahead(e,r){return this._client.call("app.bsky.actor.searchActorsTypeahead",e,void 0,r)}}p.AppBskyActorNS=pO;class fO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.actor.profile",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.actor.profile",...e})).data}async create(e,r,n){const i="app.bsky.actor.profile";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.profile",...e},{headers:r})}}p.AppBskyActorProfileRecord=fO;class hO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.actor.status",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.actor.status",...e})).data}async create(e,r,n){const i="app.bsky.actor.status";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.status",...e},{headers:r})}}p.AppBskyActorStatusRecord=hO;class yO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}}p.AppBskyEmbedNS=yO;class mO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"generator",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"like",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"post",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"postgate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"repost",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"threadgate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.generator=new gO(e),this.like=new bO(e),this.post=new vO(e),this.postgate=new EO(e),this.repost=new wO(e),this.threadgate=new _O(e)}describeFeedGenerator(e,r){return this._client.call("app.bsky.feed.describeFeedGenerator",e,void 0,r)}getActorFeeds(e,r){return this._client.call("app.bsky.feed.getActorFeeds",e,void 0,r)}getActorLikes(e,r){return this._client.call("app.bsky.feed.getActorLikes",e,void 0,r).catch(n=>{throw ume.toKnownErr(n)})}getAuthorFeed(e,r){return this._client.call("app.bsky.feed.getAuthorFeed",e,void 0,r).catch(n=>{throw cme.toKnownErr(n)})}getFeed(e,r){return this._client.call("app.bsky.feed.getFeed",e,void 0,r).catch(n=>{throw dme.toKnownErr(n)})}getFeedGenerator(e,r){return this._client.call("app.bsky.feed.getFeedGenerator",e,void 0,r)}getFeedGenerators(e,r){return this._client.call("app.bsky.feed.getFeedGenerators",e,void 0,r)}getFeedSkeleton(e,r){return this._client.call("app.bsky.feed.getFeedSkeleton",e,void 0,r).catch(n=>{throw pme.toKnownErr(n)})}getLikes(e,r){return this._client.call("app.bsky.feed.getLikes",e,void 0,r)}getListFeed(e,r){return this._client.call("app.bsky.feed.getListFeed",e,void 0,r).catch(n=>{throw fme.toKnownErr(n)})}getPosts(e,r){return this._client.call("app.bsky.feed.getPosts",e,void 0,r)}getPostThread(e,r){return this._client.call("app.bsky.feed.getPostThread",e,void 0,r).catch(n=>{throw hme.toKnownErr(n)})}getQuotes(e,r){return this._client.call("app.bsky.feed.getQuotes",e,void 0,r)}getRepostedBy(e,r){return this._client.call("app.bsky.feed.getRepostedBy",e,void 0,r)}getSuggestedFeeds(e,r){return this._client.call("app.bsky.feed.getSuggestedFeeds",e,void 0,r)}getTimeline(e,r){return this._client.call("app.bsky.feed.getTimeline",e,void 0,r)}searchPosts(e,r){return this._client.call("app.bsky.feed.searchPosts",e,void 0,r).catch(n=>{throw yme.toKnownErr(n)})}sendInteractions(e,r){return this._client.call("app.bsky.feed.sendInteractions",r==null?void 0:r.qp,e,r)}}p.AppBskyFeedNS=mO;class gO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.generator",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.generator",...e})).data}async create(e,r,n){const i="app.bsky.feed.generator";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.generator",...e},{headers:r})}}p.AppBskyFeedGeneratorRecord=gO;class bO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.like",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.like",...e})).data}async create(e,r,n){const i="app.bsky.feed.like";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.like",...e},{headers:r})}}p.AppBskyFeedLikeRecord=bO;class vO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.post",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.post",...e})).data}async create(e,r,n){const i="app.bsky.feed.post";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.post",...e},{headers:r})}}p.AppBskyFeedPostRecord=vO;class EO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.postgate",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.postgate",...e})).data}async create(e,r,n){const i="app.bsky.feed.postgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.postgate",...e},{headers:r})}}p.AppBskyFeedPostgateRecord=EO;class wO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.repost",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.repost",...e})).data}async create(e,r,n){const i="app.bsky.feed.repost";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.repost",...e},{headers:r})}}p.AppBskyFeedRepostRecord=wO;class _O{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.threadgate",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.threadgate",...e})).data}async create(e,r,n){const i="app.bsky.feed.threadgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.threadgate",...e},{headers:r})}}p.AppBskyFeedThreadgateRecord=_O;class xO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"block",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"follow",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"listblock",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"listitem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"starterpack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"verification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.block=new RO(e),this.follow=new AO(e),this.list=new SO(e),this.listblock=new CO(e),this.listitem=new TO(e),this.starterpack=new kO(e),this.verification=new LO(e)}getActorStarterPacks(e,r){return this._client.call("app.bsky.graph.getActorStarterPacks",e,void 0,r)}getBlocks(e,r){return this._client.call("app.bsky.graph.getBlocks",e,void 0,r)}getFollowers(e,r){return this._client.call("app.bsky.graph.getFollowers",e,void 0,r)}getFollows(e,r){return this._client.call("app.bsky.graph.getFollows",e,void 0,r)}getKnownFollowers(e,r){return this._client.call("app.bsky.graph.getKnownFollowers",e,void 0,r)}getList(e,r){return this._client.call("app.bsky.graph.getList",e,void 0,r)}getListBlocks(e,r){return this._client.call("app.bsky.graph.getListBlocks",e,void 0,r)}getListMutes(e,r){return this._client.call("app.bsky.graph.getListMutes",e,void 0,r)}getLists(e,r){return this._client.call("app.bsky.graph.getLists",e,void 0,r)}getMutes(e,r){return this._client.call("app.bsky.graph.getMutes",e,void 0,r)}getRelationships(e,r){return this._client.call("app.bsky.graph.getRelationships",e,void 0,r).catch(n=>{throw mme.toKnownErr(n)})}getStarterPack(e,r){return this._client.call("app.bsky.graph.getStarterPack",e,void 0,r)}getStarterPacks(e,r){return this._client.call("app.bsky.graph.getStarterPacks",e,void 0,r)}getSuggestedFollowsByActor(e,r){return this._client.call("app.bsky.graph.getSuggestedFollowsByActor",e,void 0,r)}muteActor(e,r){return this._client.call("app.bsky.graph.muteActor",r==null?void 0:r.qp,e,r)}muteActorList(e,r){return this._client.call("app.bsky.graph.muteActorList",r==null?void 0:r.qp,e,r)}muteThread(e,r){return this._client.call("app.bsky.graph.muteThread",r==null?void 0:r.qp,e,r)}searchStarterPacks(e,r){return this._client.call("app.bsky.graph.searchStarterPacks",e,void 0,r)}unmuteActor(e,r){return this._client.call("app.bsky.graph.unmuteActor",r==null?void 0:r.qp,e,r)}unmuteActorList(e,r){return this._client.call("app.bsky.graph.unmuteActorList",r==null?void 0:r.qp,e,r)}unmuteThread(e,r){return this._client.call("app.bsky.graph.unmuteThread",r==null?void 0:r.qp,e,r)}}p.AppBskyGraphNS=xO;class RO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.block",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.block",...e})).data}async create(e,r,n){const i="app.bsky.graph.block";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.block",...e},{headers:r})}}p.AppBskyGraphBlockRecord=RO;class AO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.follow",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.follow",...e})).data}async create(e,r,n){const i="app.bsky.graph.follow";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.follow",...e},{headers:r})}}p.AppBskyGraphFollowRecord=AO;class SO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.list",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.list",...e})).data}async create(e,r,n){const i="app.bsky.graph.list";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.list",...e},{headers:r})}}p.AppBskyGraphListRecord=SO;class CO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.listblock",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.listblock",...e})).data}async create(e,r,n){const i="app.bsky.graph.listblock";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listblock",...e},{headers:r})}}p.AppBskyGraphListblockRecord=CO;class TO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.listitem",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.listitem",...e})).data}async create(e,r,n){const i="app.bsky.graph.listitem";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listitem",...e},{headers:r})}}p.AppBskyGraphListitemRecord=TO;class kO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.starterpack",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.starterpack",...e})).data}async create(e,r,n){const i="app.bsky.graph.starterpack";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.starterpack",...e},{headers:r})}}p.AppBskyGraphStarterpackRecord=kO;class LO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.verification",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.verification",...e})).data}async create(e,r,n){const i="app.bsky.graph.verification";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.verification",...e},{headers:r})}}p.AppBskyGraphVerificationRecord=LO;class PO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"service",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.service=new DO(e)}getServices(e,r){return this._client.call("app.bsky.labeler.getServices",e,void 0,r)}}p.AppBskyLabelerNS=PO;class DO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.labeler.service",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.labeler.service",...e})).data}async create(e,r,n){const i="app.bsky.labeler.service";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.labeler.service",...e},{headers:r})}}p.AppBskyLabelerServiceRecord=DO;class BO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getPreferences(e,r){return this._client.call("app.bsky.notification.getPreferences",e,void 0,r)}getUnreadCount(e,r){return this._client.call("app.bsky.notification.getUnreadCount",e,void 0,r)}listNotifications(e,r){return this._client.call("app.bsky.notification.listNotifications",e,void 0,r)}putPreferences(e,r){return this._client.call("app.bsky.notification.putPreferences",r==null?void 0:r.qp,e,r)}putPreferencesV2(e,r){return this._client.call("app.bsky.notification.putPreferencesV2",r==null?void 0:r.qp,e,r)}registerPush(e,r){return this._client.call("app.bsky.notification.registerPush",r==null?void 0:r.qp,e,r)}updateSeen(e,r){return this._client.call("app.bsky.notification.updateSeen",r==null?void 0:r.qp,e,r)}}p.AppBskyNotificationNS=BO;class IO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}}p.AppBskyRichtextNS=IO;class jO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getConfig(e,r){return this._client.call("app.bsky.unspecced.getConfig",e,void 0,r)}getPopularFeedGenerators(e,r){return this._client.call("app.bsky.unspecced.getPopularFeedGenerators",e,void 0,r)}getPostThreadOtherV2(e,r){return this._client.call("app.bsky.unspecced.getPostThreadOtherV2",e,void 0,r)}getPostThreadV2(e,r){return this._client.call("app.bsky.unspecced.getPostThreadV2",e,void 0,r)}getSuggestedFeeds(e,r){return this._client.call("app.bsky.unspecced.getSuggestedFeeds",e,void 0,r)}getSuggestedFeedsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedFeedsSkeleton",e,void 0,r)}getSuggestedStarterPacks(e,r){return this._client.call("app.bsky.unspecced.getSuggestedStarterPacks",e,void 0,r)}getSuggestedStarterPacksSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedStarterPacksSkeleton",e,void 0,r)}getSuggestedUsers(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsers",e,void 0,r)}getSuggestedUsersSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersSkeleton",e,void 0,r)}getSuggestionsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestionsSkeleton",e,void 0,r)}getTaggedSuggestions(e,r){return this._client.call("app.bsky.unspecced.getTaggedSuggestions",e,void 0,r)}getTrendingTopics(e,r){return this._client.call("app.bsky.unspecced.getTrendingTopics",e,void 0,r)}getTrends(e,r){return this._client.call("app.bsky.unspecced.getTrends",e,void 0,r)}getTrendsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getTrendsSkeleton",e,void 0,r)}searchActorsSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchActorsSkeleton",e,void 0,r).catch(n=>{throw gme.toKnownErr(n)})}searchPostsSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchPostsSkeleton",e,void 0,r).catch(n=>{throw bme.toKnownErr(n)})}searchStarterPacksSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchStarterPacksSkeleton",e,void 0,r).catch(n=>{throw vme.toKnownErr(n)})}}p.AppBskyUnspeccedNS=jO;class UO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getJobStatus(e,r){return this._client.call("app.bsky.video.getJobStatus",e,void 0,r)}getUploadLimits(e,r){return this._client.call("app.bsky.video.getUploadLimits",e,void 0,r)}uploadVideo(e,r){return this._client.call("app.bsky.video.uploadVideo",r==null?void 0:r.qp,e,r)}}p.AppBskyVideoNS=UO;class $O{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bsky",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.bsky=new OO(e)}}p.ChatNS=$O;class OO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"actor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"convo",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.actor=new KO(e),this.convo=new MO(e),this.moderation=new NO(e)}}p.ChatBskyNS=OO;class KO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"declaration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.declaration=new VO(e)}deleteAccount(e,r){return this._client.call("chat.bsky.actor.deleteAccount",r==null?void 0:r.qp,e,r)}exportAccountData(e,r){return this._client.call("chat.bsky.actor.exportAccountData",e,void 0,r)}}p.ChatBskyActorNS=KO;class VO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"chat.bsky.actor.declaration",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"chat.bsky.actor.declaration",...e})).data}async create(e,r,n){const i="chat.bsky.actor.declaration";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:n})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"chat.bsky.actor.declaration",...e},{headers:r})}}p.ChatBskyActorDeclarationRecord=VO;class MO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}acceptConvo(e,r){return this._client.call("chat.bsky.convo.acceptConvo",r==null?void 0:r.qp,e,r)}addReaction(e,r){return this._client.call("chat.bsky.convo.addReaction",r==null?void 0:r.qp,e,r).catch(n=>{throw Eme.toKnownErr(n)})}deleteMessageForSelf(e,r){return this._client.call("chat.bsky.convo.deleteMessageForSelf",r==null?void 0:r.qp,e,r)}getConvo(e,r){return this._client.call("chat.bsky.convo.getConvo",e,void 0,r)}getConvoAvailability(e,r){return this._client.call("chat.bsky.convo.getConvoAvailability",e,void 0,r)}getConvoForMembers(e,r){return this._client.call("chat.bsky.convo.getConvoForMembers",e,void 0,r)}getLog(e,r){return this._client.call("chat.bsky.convo.getLog",e,void 0,r)}getMessages(e,r){return this._client.call("chat.bsky.convo.getMessages",e,void 0,r)}leaveConvo(e,r){return this._client.call("chat.bsky.convo.leaveConvo",r==null?void 0:r.qp,e,r)}listConvos(e,r){return this._client.call("chat.bsky.convo.listConvos",e,void 0,r)}muteConvo(e,r){return this._client.call("chat.bsky.convo.muteConvo",r==null?void 0:r.qp,e,r)}removeReaction(e,r){return this._client.call("chat.bsky.convo.removeReaction",r==null?void 0:r.qp,e,r).catch(n=>{throw wme.toKnownErr(n)})}sendMessage(e,r){return this._client.call("chat.bsky.convo.sendMessage",r==null?void 0:r.qp,e,r)}sendMessageBatch(e,r){return this._client.call("chat.bsky.convo.sendMessageBatch",r==null?void 0:r.qp,e,r)}unmuteConvo(e,r){return this._client.call("chat.bsky.convo.unmuteConvo",r==null?void 0:r.qp,e,r)}updateAllRead(e,r){return this._client.call("chat.bsky.convo.updateAllRead",r==null?void 0:r.qp,e,r)}updateRead(e,r){return this._client.call("chat.bsky.convo.updateRead",r==null?void 0:r.qp,e,r)}}p.ChatBskyConvoNS=MO;class NO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getActorMetadata(e,r){return this._client.call("chat.bsky.moderation.getActorMetadata",e,void 0,r)}getMessageContext(e,r){return this._client.call("chat.bsky.moderation.getMessageContext",e,void 0,r)}updateActorAccess(e,r){return this._client.call("chat.bsky.moderation.updateActorAccess",r==null?void 0:r.qp,e,r)}}p.ChatBskyModerationNS=NO;class zO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ozone",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.ozone=new FO(e)}}p.ToolsNS=zO;class FO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"communication",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hosting",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moderation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"set",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"setting",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"team",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"verification",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e,this.communication=new qO(e),this.hosting=new GO(e),this.moderation=new HO(e),this.server=new XO(e),this.set=new WO(e),this.setting=new JO(e),this.signature=new ZO(e),this.team=new QO(e),this.verification=new YO(e)}}p.ToolsOzoneNS=FO;class qO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}createTemplate(e,r){return this._client.call("tools.ozone.communication.createTemplate",r==null?void 0:r.qp,e,r).catch(n=>{throw _me.toKnownErr(n)})}deleteTemplate(e,r){return this._client.call("tools.ozone.communication.deleteTemplate",r==null?void 0:r.qp,e,r)}listTemplates(e,r){return this._client.call("tools.ozone.communication.listTemplates",e,void 0,r)}updateTemplate(e,r){return this._client.call("tools.ozone.communication.updateTemplate",r==null?void 0:r.qp,e,r).catch(n=>{throw xme.toKnownErr(n)})}}p.ToolsOzoneCommunicationNS=qO;class GO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getAccountHistory(e,r){return this._client.call("tools.ozone.hosting.getAccountHistory",e,void 0,r)}}p.ToolsOzoneHostingNS=GO;class HO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}emitEvent(e,r){return this._client.call("tools.ozone.moderation.emitEvent",r==null?void 0:r.qp,e,r).catch(n=>{throw Rme.toKnownErr(n)})}getEvent(e,r){return this._client.call("tools.ozone.moderation.getEvent",e,void 0,r)}getRecord(e,r){return this._client.call("tools.ozone.moderation.getRecord",e,void 0,r).catch(n=>{throw Ame.toKnownErr(n)})}getRecords(e,r){return this._client.call("tools.ozone.moderation.getRecords",e,void 0,r)}getRepo(e,r){return this._client.call("tools.ozone.moderation.getRepo",e,void 0,r).catch(n=>{throw Sme.toKnownErr(n)})}getReporterStats(e,r){return this._client.call("tools.ozone.moderation.getReporterStats",e,void 0,r)}getRepos(e,r){return this._client.call("tools.ozone.moderation.getRepos",e,void 0,r)}getSubjects(e,r){return this._client.call("tools.ozone.moderation.getSubjects",e,void 0,r)}queryEvents(e,r){return this._client.call("tools.ozone.moderation.queryEvents",e,void 0,r)}queryStatuses(e,r){return this._client.call("tools.ozone.moderation.queryStatuses",e,void 0,r)}searchRepos(e,r){return this._client.call("tools.ozone.moderation.searchRepos",e,void 0,r)}}p.ToolsOzoneModerationNS=HO;class XO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}getConfig(e,r){return this._client.call("tools.ozone.server.getConfig",e,void 0,r)}}p.ToolsOzoneServerNS=XO;class WO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addValues(e,r){return this._client.call("tools.ozone.set.addValues",r==null?void 0:r.qp,e,r)}deleteSet(e,r){return this._client.call("tools.ozone.set.deleteSet",r==null?void 0:r.qp,e,r).catch(n=>{throw Cme.toKnownErr(n)})}deleteValues(e,r){return this._client.call("tools.ozone.set.deleteValues",r==null?void 0:r.qp,e,r).catch(n=>{throw Tme.toKnownErr(n)})}getValues(e,r){return this._client.call("tools.ozone.set.getValues",e,void 0,r).catch(n=>{throw kme.toKnownErr(n)})}querySets(e,r){return this._client.call("tools.ozone.set.querySets",e,void 0,r)}upsertSet(e,r){return this._client.call("tools.ozone.set.upsertSet",r==null?void 0:r.qp,e,r)}}p.ToolsOzoneSetNS=WO;class JO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}listOptions(e,r){return this._client.call("tools.ozone.setting.listOptions",e,void 0,r)}removeOptions(e,r){return this._client.call("tools.ozone.setting.removeOptions",r==null?void 0:r.qp,e,r)}upsertOption(e,r){return this._client.call("tools.ozone.setting.upsertOption",r==null?void 0:r.qp,e,r)}}p.ToolsOzoneSettingNS=JO;class ZO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}findCorrelation(e,r){return this._client.call("tools.ozone.signature.findCorrelation",e,void 0,r)}findRelatedAccounts(e,r){return this._client.call("tools.ozone.signature.findRelatedAccounts",e,void 0,r)}searchAccounts(e,r){return this._client.call("tools.ozone.signature.searchAccounts",e,void 0,r)}}p.ToolsOzoneSignatureNS=ZO;class QO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}addMember(e,r){return this._client.call("tools.ozone.team.addMember",r==null?void 0:r.qp,e,r).catch(n=>{throw Lme.toKnownErr(n)})}deleteMember(e,r){return this._client.call("tools.ozone.team.deleteMember",r==null?void 0:r.qp,e,r).catch(n=>{throw Pme.toKnownErr(n)})}listMembers(e,r){return this._client.call("tools.ozone.team.listMembers",e,void 0,r)}updateMember(e,r){return this._client.call("tools.ozone.team.updateMember",r==null?void 0:r.qp,e,r).catch(n=>{throw Dme.toKnownErr(n)})}}p.ToolsOzoneTeamNS=QO;class YO{constructor(e){Object.defineProperty(this,"_client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._client=e}grantVerifications(e,r){return this._client.call("tools.ozone.verification.grantVerifications",r==null?void 0:r.qp,e,r)}listVerifications(e,r){return this._client.call("tools.ozone.verification.listVerifications",e,void 0,r)}revokeVerifications(e,r){return this._client.call("tools.ozone.verification.revokeVerifications",r==null?void 0:r.qp,e,r)}}p.ToolsOzoneVerificationNS=YO;var Ua={},M_={};const Ime=["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shell","shia","shiksha","shoes","shop","shopping","shouji","show","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"];var fn={};Object.defineProperty(fn,"__esModule",{value:!0});fn.TAG_REGEX=fn.TRAILING_PUNCTUATION_REGEX=fn.URL_REGEX=fn.MENTION_REGEX=void 0;fn.MENTION_REGEX=/(^|\s|\()(@)([a-zA-Z0-9.-]+)(\b)/g;fn.URL_REGEX=/(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gim;fn.TRAILING_PUNCTUATION_REGEX=new RegExp("\\p{P}+$","gu");fn.TAG_REGEX=/(^|\s)[#]((?!\ufe0f)[^\s\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]*[^\d\s\p{P}\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]+[^\s\u00AD\u2060\u200A\u200B\u200C\u200D\u20e2]*)?/gu;var jme=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(M_,"__esModule",{value:!0});M_.detectFacets=$me;const Ume=jme(Ime),Hp=fn;function $me(t){var n;let e;const r=[];{const i=Hp.MENTION_REGEX;for(;e=i.exec(t.utf16);){if(!cA(e[3])&&!e[3].endsWith(".test"))continue;const o=t.utf16.indexOf(e[3],e.index)-1;r.push({$type:"app.bsky.richtext.facet",index:{byteStart:t.utf16IndexToUtf8Index(o),byteEnd:t.utf16IndexToUtf8Index(o+e[3].length+1)},features:[{$type:"app.bsky.richtext.facet#mention",did:e[3]}]})}}{const i=Hp.URL_REGEX;for(;e=i.exec(t.utf16);){let o=e[2];if(!o.startsWith("http")){const u=(n=e.groups)==null?void 0:n.domain;if(!u||!cA(u))continue;o=`https://${o}`}const s=t.utf16.indexOf(e[2],e.index),l={start:s,end:s+e[2].length};/[.,;:!?]$/.test(o)&&(o=o.slice(0,-1),l.end--),/[)]$/.test(o)&&!o.includes("(")&&(o=o.slice(0,-1),l.end--),r.push({index:{byteStart:t.utf16IndexToUtf8Index(l.start),byteEnd:t.utf16IndexToUtf8Index(l.end)},features:[{$type:"app.bsky.richtext.facet#link",uri:o}]})}}{const i=Hp.TAG_REGEX;for(;e=i.exec(t.utf16);){const o=e[1];let s=e[2];if(!s||(s=s.trim().replace(Hp.TRAILING_PUNCTUATION_REGEX,""),s.length===0||s.length>64))continue;const l=e.index+o.length;r.push({index:{byteStart:t.utf16IndexToUtf8Index(l),byteEnd:t.utf16IndexToUtf8Index(l+1+s.length)},features:[{$type:"app.bsky.richtext.facet#tag",tag:s}]})}}return r.length>0?r:void 0}function cA(t){return!!Ume.default.find(e=>{const r=t.lastIndexOf(e);return r===-1?!1:t.charAt(r-1)==="."&&r===t.length-e.length})}var Bm={},au={};Object.defineProperty(au,"__esModule",{value:!0});au.UnicodeString=void 0;const Ome=Nn,dA=new TextEncoder,Kme=new TextDecoder;class Vme{constructor(e){Object.defineProperty(this,"utf16",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"utf8",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_graphemeLen",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.utf16=e,this.utf8=dA.encode(e)}get length(){return this.utf8.byteLength}get graphemeLength(){return this._graphemeLen||(this._graphemeLen=(0,Ome.graphemeLen)(this.utf16)),this._graphemeLen}slice(e,r){return Kme.decode(this.utf8.slice(e,r))}utf16IndexToUtf8Index(e){return dA.encode(this.utf16.slice(0,e)).byteLength}toString(){return this.utf16}}au.UnicodeString=Vme;Object.defineProperty(Bm,"__esModule",{value:!0});Bm.sanitizeRichText=Fme;const Mme=au,Nme=/[\r\n]([\u00AD\u2060\u200D\u200C\u200B\s]*[\r\n]){2,}/,zme=`
`;function Fme(t,e){return e.cleanNewlines&&(t=qme(t,Nme,zme)),t}function qme(t,e,r){t=t.clone();let n=t.unicodeText.utf16.match(e);for(;n&&typeof n.index<"u";){const i=t.unicodeText,o=t.unicodeText.utf16IndexToUtf8Index(n.index),s=o+new Mme.UnicodeString(n[0]).length;if(t.delete(o,s),t.unicodeText.utf16===i.utf16)break;t.insert(o,r),n=t.unicodeText.utf16.match(e)}return t}Object.defineProperty(Ua,"__esModule",{value:!0});Ua.RichText=Ua.RichTextSegment=void 0;const wf=p,pA=M_,Gme=Bm,Vg=au;class Ys{constructor(e,r){Object.defineProperty(this,"text",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"facet",{enumerable:!0,configurable:!0,writable:!0,value:r})}get link(){var e;return(e=this.facet)==null?void 0:e.features.find(wf.AppBskyRichtextFacet.isLink)}isLink(){return!!this.link}get mention(){var e;return(e=this.facet)==null?void 0:e.features.find(wf.AppBskyRichtextFacet.isMention)}isMention(){return!!this.mention}get tag(){var e;return(e=this.facet)==null?void 0:e.features.find(wf.AppBskyRichtextFacet.isTag)}isTag(){return!!this.tag}}Ua.RichTextSegment=Ys;class N_{constructor(e,r){var n,i;Object.defineProperty(this,"unicodeText",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"facets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.unicodeText=new Vg.UnicodeString(e.text),this.facets=e.facets,!((n=this.facets)!=null&&n.length)&&((i=e.entities)!=null&&i.length)&&(this.facets=Xme(this.unicodeText,e.entities)),this.facets&&(this.facets=this.facets.filter(Hme).sort(Mg)),r!=null&&r.cleanNewlines&&(0,Gme.sanitizeRichText)(this,{cleanNewlines:!0}).copyInto(this)}get text(){return this.unicodeText.toString()}get length(){return this.unicodeText.length}get graphemeLength(){return this.unicodeText.graphemeLength}clone(){return new N_({text:this.unicodeText.utf16,facets:fA(this.facets)})}copyInto(e){e.unicodeText=this.unicodeText,e.facets=fA(this.facets)}*segments(){const e=this.facets||[];if(!e.length){yield new Ys(this.unicodeText.utf16);return}let r=0,n=0;do{const i=e[n];if(r<i.index.byteStart)yield new Ys(this.unicodeText.slice(r,i.index.byteStart));else if(r>i.index.byteStart){n++;continue}if(i.index.byteStart<i.index.byteEnd){const o=this.unicodeText.slice(i.index.byteStart,i.index.byteEnd);o.trim()?yield new Ys(o,i):yield new Ys(o)}r=i.index.byteEnd,n++}while(n<e.length);r<this.unicodeText.length&&(yield new Ys(this.unicodeText.slice(r,this.unicodeText.length)))}insert(e,r){var i;if(this.unicodeText=new Vg.UnicodeString(this.unicodeText.slice(0,e)+r+this.unicodeText.slice(e)),!((i=this.facets)!=null&&i.length))return this;const n=r.length;for(const o of this.facets)e<=o.index.byteStart?(o.index.byteStart+=n,o.index.byteEnd+=n):e>=o.index.byteStart&&e<o.index.byteEnd&&(o.index.byteEnd+=n);return this}delete(e,r){var i;if(this.unicodeText=new Vg.UnicodeString(this.unicodeText.slice(0,e)+this.unicodeText.slice(r)),!((i=this.facets)!=null&&i.length))return this;const n=r-e;for(const o of this.facets)e<=o.index.byteStart&&r>=o.index.byteEnd?(o.index.byteStart=0,o.index.byteEnd=0):e>o.index.byteEnd||(e>o.index.byteStart&&e<=o.index.byteEnd&&r>o.index.byteEnd?o.index.byteEnd=e:e>=o.index.byteStart&&r<=o.index.byteEnd?o.index.byteEnd-=n:e<o.index.byteStart&&r>=o.index.byteStart&&r<=o.index.byteEnd?(o.index.byteStart=e,o.index.byteEnd-=n):r<o.index.byteStart&&(o.index.byteStart-=n,o.index.byteEnd-=n));return this.facets=this.facets.filter(o=>o.index.byteStart<o.index.byteEnd),this}async detectFacets(e){if(this.facets=(0,pA.detectFacets)(this.unicodeText),this.facets){const r=[];for(const n of this.facets)for(const i of n.features)wf.AppBskyRichtextFacet.isMention(i)&&r.push(e.com.atproto.identity.resolveHandle({handle:i.did}).then(o=>o==null?void 0:o.data.did).catch(o=>{}).then(o=>{i.did=o||""}));await Promise.allSettled(r),this.facets.sort(Mg)}}detectFacetsWithoutResolution(){this.facets=(0,pA.detectFacets)(this.unicodeText),this.facets&&this.facets.sort(Mg)}}Ua.RichText=N_;const Mg=(t,e)=>t.index.byteStart-e.index.byteStart,Hme=t=>t.index.byteStart<=t.index.byteEnd;function Xme(t,e){const r=[];for(const n of e)n.type==="link"?r.push({$type:"app.bsky.richtext.facet",index:{byteStart:t.utf16IndexToUtf8Index(n.index.start),byteEnd:t.utf16IndexToUtf8Index(n.index.end)},features:[{$type:"app.bsky.richtext.facet#link",uri:n.value}]}):n.type==="mention"&&r.push({$type:"app.bsky.richtext.facet",index:{byteStart:t.utf16IndexToUtf8Index(n.index.start),byteEnd:t.utf16IndexToUtf8Index(n.index.end)},features:[{$type:"app.bsky.richtext.facet#mention",did:n.value}]});return r}function fA(t){return typeof t>"u"?t:JSON.parse(JSON.stringify(t))}var z_={},vn={},Co={};Object.defineProperty(Co,"__esModule",{value:!0});Co.LABELS=Co.DEFAULT_LABEL_SETTINGS=void 0;Co.DEFAULT_LABEL_SETTINGS={porn:"hide",sexual:"warn",nudity:"ignore","graphic-media":"warn"};Co.LABELS={"!hide":{identifier:"!hide",configurable:!1,defaultSetting:"hide",flags:["no-override","no-self"],severity:"alert",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",displayName:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},"!warn":{identifier:"!warn",configurable:!1,defaultSetting:"warn",flags:["no-self"],severity:"none",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},"!no-unauthenticated":{identifier:"!no-unauthenticated",configurable:!1,defaultSetting:"hide",flags:["no-override","unauthed"],severity:"none",blurs:"content",behaviors:{account:{profileList:"blur",profileView:"blur",avatar:"blur",banner:"blur",displayName:"blur",contentList:"blur",contentView:"blur"},profile:{avatar:"blur",banner:"blur",displayName:"blur"},content:{contentList:"blur",contentView:"blur"}},locales:[]},porn:{identifier:"porn",configurable:!0,defaultSetting:"hide",flags:["adult"],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},sexual:{identifier:"sexual",configurable:!0,defaultSetting:"warn",flags:["adult"],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},nudity:{identifier:"nudity",configurable:!0,defaultSetting:"ignore",flags:[],severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},"graphic-media":{identifier:"graphic-media",flags:["adult"],configurable:!0,defaultSetting:"warn",severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]},gore:{identifier:"gore",flags:["adult"],configurable:!0,defaultSetting:"warn",severity:"none",blurs:"media",behaviors:{account:{avatar:"blur",banner:"blur"},profile:{avatar:"blur",banner:"blur"},content:{contentMedia:"blur"}},locales:[]}};var Ft={};Object.defineProperty(Ft,"__esModule",{value:!0});Ft.NOOP_BEHAVIOR=Ft.HIDE_BEHAVIOR=Ft.MUTEWORD_BEHAVIOR=Ft.MUTE_BEHAVIOR=Ft.BLOCK_BEHAVIOR=Ft.CUSTOM_LABEL_VALUE_RE=void 0;Ft.CUSTOM_LABEL_VALUE_RE=/^[a-z-]+$/;Ft.BLOCK_BEHAVIOR={profileList:"blur",profileView:"alert",avatar:"blur",banner:"blur",contentList:"blur",contentView:"blur"};Ft.MUTE_BEHAVIOR={profileList:"inform",profileView:"alert",contentList:"blur",contentView:"inform"};Ft.MUTEWORD_BEHAVIOR={contentList:"blur",contentView:"blur"};Ft.HIDE_BEHAVIOR={contentList:"blur",contentView:"blur"};Ft.NOOP_BEHAVIOR={};var ip={};Object.defineProperty(ip,"__esModule",{value:!0});ip.ModerationUI=void 0;class Wme{constructor(){Object.defineProperty(this,"noOverride",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"filters",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"blurs",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"alerts",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"informs",{enumerable:!0,configurable:!0,writable:!0,value:[]})}get filter(){return this.filters.length!==0}get blur(){return this.blurs.length!==0}get alert(){return this.alerts.length!==0}get inform(){return this.informs.length!==0}}ip.ModerationUI=Wme;Object.defineProperty(vn,"__esModule",{value:!0});vn.ModerationDecision=void 0;const hA=Co,Qt=Ft,Jme=ip;var Yi;(function(t){t[t.High=0]="High",t[t.Medium=1]="Medium",t[t.Low=2]="Low"})(Yi||(Yi={}));class F_{constructor(){Object.defineProperty(this,"did",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"isMe",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"causes",{enumerable:!0,configurable:!0,writable:!0,value:[]})}static merge(...e){const r=e.filter(i=>i!=null),n=new F_;return r[0]&&(n.did=r[0].did,n.isMe=r[0].isMe),n.causes=r.flatMap(i=>i.causes),n}downgrade(){for(const e of this.causes)e.downgraded=!0;return this}get blocked(){return!!this.blockCause}get muted(){return!!this.muteCause}get blockCause(){return this.causes.find(e=>e.type==="blocking"||e.type==="blocked-by"||e.type==="block-other")}get muteCause(){return this.causes.find(e=>e.type==="muted")}get labelCauses(){return this.causes.filter(e=>e.type==="label")}ui(e){const r=new Jme.ModerationUI;for(const n of this.causes)if(n.type==="blocking"||n.type==="blocked-by"||n.type==="block-other"){if(this.isMe)continue;(e==="profileList"||e==="contentList")&&r.filters.push(n),n.downgraded||(Qt.BLOCK_BEHAVIOR[e]==="blur"?(r.noOverride=!0,r.blurs.push(n)):Qt.BLOCK_BEHAVIOR[e]==="alert"?r.alerts.push(n):Qt.BLOCK_BEHAVIOR[e]==="inform"&&r.informs.push(n))}else if(n.type==="muted"){if(this.isMe)continue;(e==="profileList"||e==="contentList")&&r.filters.push(n),n.downgraded||(Qt.MUTE_BEHAVIOR[e]==="blur"?r.blurs.push(n):Qt.MUTE_BEHAVIOR[e]==="alert"?r.alerts.push(n):Qt.MUTE_BEHAVIOR[e]==="inform"&&r.informs.push(n))}else if(n.type==="mute-word"){if(this.isMe)continue;e==="contentList"&&r.filters.push(n),n.downgraded||(Qt.MUTEWORD_BEHAVIOR[e]==="blur"?r.blurs.push(n):Qt.MUTEWORD_BEHAVIOR[e]==="alert"?r.alerts.push(n):Qt.MUTEWORD_BEHAVIOR[e]==="inform"&&r.informs.push(n))}else n.type==="hidden"?((e==="profileList"||e==="contentList")&&r.filters.push(n),n.downgraded||(Qt.HIDE_BEHAVIOR[e]==="blur"?r.blurs.push(n):Qt.HIDE_BEHAVIOR[e]==="alert"?r.alerts.push(n):Qt.HIDE_BEHAVIOR[e]==="inform"&&r.informs.push(n))):n.type==="label"&&(e==="profileList"&&n.target==="account"?n.setting==="hide"&&!this.isMe&&r.filters.push(n):e==="contentList"&&(n.target==="account"||n.target==="content")&&n.setting==="hide"&&!this.isMe&&r.filters.push(n),n.downgraded||(n.behavior[e]==="blur"?(r.blurs.push(n),n.noOverride&&!this.isMe&&(r.noOverride=!0)):n.behavior[e]==="alert"?r.alerts.push(n):n.behavior[e]==="inform"&&r.informs.push(n)));return r.filters.sort(yA),r.blurs.sort(yA),r}setDid(e){this.did=e}setIsMe(e){this.isMe=e}addHidden(e){e&&this.causes.push({type:"hidden",source:{type:"user"},priority:6})}addMutedWord(e){e!=null&&e.length&&this.causes.push({type:"mute-word",source:{type:"user"},priority:6,matches:e})}addBlocking(e){e&&this.causes.push({type:"blocking",source:{type:"user"},priority:3})}addBlockingByList(e){e&&this.causes.push({type:"blocking",source:{type:"list",list:e},priority:3})}addBlockedBy(e){e&&this.causes.push({type:"blocked-by",source:{type:"user"},priority:4})}addBlockOther(e){e&&this.causes.push({type:"block-other",source:{type:"user"},priority:4})}addLabel(e,r,n){var f,h;const i=Qt.CUSTOM_LABEL_VALUE_RE.test(r.val)&&((h=(f=n.labelDefs)==null?void 0:f[r.src])==null?void 0:h.find(g=>g.identifier===r.val))||hA.LABELS[r.val];if(!i)return;const o=r.src===this.did,s=o?void 0:n.prefs.labelers.find(g=>g.did===r.src);if(!o&&!s||o&&i.flags.includes("no-self"))return;let l=i.defaultSetting||"ignore";if(i.configurable?i.flags.includes("adult")&&!n.prefs.adultContentEnabled?l="hide":s!=null&&s.labels[i.identifier]?l=s==null?void 0:s.labels[i.identifier]:n.prefs.labels[i.identifier]&&(l=n.prefs.labels[i.identifier]):l=i.defaultSetting||"hide",l==="ignore"||i.flags.includes("unauthed")&&n.userDid)return;let u;const c=Zme(i.behaviors[e]);i.flags.includes("no-override")||i.flags.includes("adult")&&!n.prefs.adultContentEnabled?u=1:l==="hide"?u=2:c===Yi.High?u=5:c===Yi.Medium?u=7:u=8;let d=!1;(i.flags.includes("no-override")||i.flags.includes("adult")&&!n.prefs.adultContentEnabled)&&(d=!0),this.causes.push({type:"label",source:o||!s?{type:"user"}:{type:"labeler",did:s.did},label:r,labelDef:i,target:e,setting:l,behavior:i.behaviors[e]||Qt.NOOP_BEHAVIOR,noOverride:d,priority:u})}addMuted(e){e&&this.causes.push({type:"muted",source:{type:"user"},priority:6})}addMutedByList(e){e&&this.causes.push({type:"muted",source:{type:"list",list:e},priority:6})}}vn.ModerationDecision=F_;function Zme(t){return t?t.profileView==="blur"||t.contentView==="blur"?Yi.High:t.contentList==="blur"||t.contentMedia==="blur"?Yi.Medium:Yi.Low:Yi.Low}function yA(t,e){return t.priority-e.priority}var Xo={};Object.defineProperty(Xo,"__esModule",{value:!0});Xo.decideAccount=Yme;Xo.filterAccountLabels=eK;const Qme=vn;function Yme(t,e){var n,i,o,s,l,u,c,d,f;const r=new Qme.ModerationDecision;r.setDid(t.did),r.setIsMe(t.did===e.userDid),(n=t.viewer)!=null&&n.muted&&((i=t.viewer)!=null&&i.mutedByList?r.addMutedByList((o=t.viewer)==null?void 0:o.mutedByList):r.addMuted((s=t.viewer)==null?void 0:s.muted)),(l=t.viewer)!=null&&l.blocking&&((u=t.viewer)!=null&&u.blockingByList?r.addBlockingByList((c=t.viewer)==null?void 0:c.blockingByList):r.addBlocking((d=t.viewer)==null?void 0:d.blocking)),r.addBlockedBy((f=t.viewer)==null?void 0:f.blockedBy);for(const h of eK(t.labels))r.addLabel("account",h,e);return r}function eK(t){return t?t.filter(e=>!e.uri.endsWith("/app.bsky.actor.profile/self")||e.val==="!no-unauthenticated"):[]}var q_={},Wo={};Object.defineProperty(Wo,"__esModule",{value:!0});Wo.decideProfile=tge;Wo.filterProfileLabels=tK;const ege=vn;function tge(t,e){const r=new ege.ModerationDecision;r.setDid(t.did),r.setIsMe(t.did===e.userDid);for(const n of tK(t.labels))r.addLabel("profile",n,e);return r}function tK(t){return t?t.filter(e=>e.uri.endsWith("/app.bsky.actor.profile/self")):[]}Object.defineProperty(q_,"__esModule",{value:!0});q_.decideFeedGenerator=ige;const mA=vn,rge=Xo,nge=Wo;function ige(t,e){var n;const r=new mA.ModerationDecision;if(r.setDid(t.creator.did),r.setIsMe(t.creator.did===e.userDid),(n=t.labels)!=null&&n.length)for(const i of t.labels)r.addLabel("content",i,e);return mA.ModerationDecision.merge(r,(0,rge.decideAccount)(t.creator,e),(0,nge.decideProfile)(t.creator,e))}var G_={};Object.defineProperty(G_,"__esModule",{value:!0});G_.decideNotification=age;const gA=vn,oge=Xo,sge=Wo;function age(t,e){var n;const r=new gA.ModerationDecision;if(r.setDid(t.author.did),r.setIsMe(t.author.did===e.userDid),(n=t.labels)!=null&&n.length)for(const i of t.labels)r.addLabel("content",i,e);return gA.ModerationDecision.merge(r,(0,oge.decideAccount)(t.author,e),(0,sge.decideProfile)(t.author,e))}var H_={},op={};Object.defineProperty(op,"__esModule",{value:!0});op.matchMuteWords=rK;op.hasMutedWord=cge;const lge=p,bA={LEADING_TRAILING_PUNCTUATION:new RegExp("(?:^\\p{P}+|\\p{P}+$)","gu"),WORD_BOUNDARY:/[\s\n\t\r\f\v]+?/g},uge=["ja","zh","ko","th","vi"];function rK({mutedWords:t,text:e,facets:r,outlineTags:n,languages:i,actor:o}){var c;const s=uge.includes((i==null?void 0:i[0])||""),l=[].concat(n||[]).concat((r||[]).flatMap(d=>d.features.filter(lge.AppBskyRichtextFacet.isTag).map(f=>f.tag))).map(d=>d.toLowerCase()),u=[];e:for(const d of t){const f=d.value.toLowerCase(),h=e.toLowerCase();if(d.expiresAt&&d.expiresAt<new Date().toISOString()||d.actorTarget==="exclude-following"&&((c=o==null?void 0:o.viewer)!=null&&c.following))continue;if(l.includes(f)){u.push({word:d,predicate:d.value});continue}if(!d.targets.includes("content"))continue;if((f.length===1||s)&&h.includes(f)){u.push({word:d,predicate:d.value});continue}if(f.length>h.length)continue;if(f===h){u.push({word:d,predicate:d.value});continue}if(new RegExp("(?:\\s|\\p{P})+?","u").test(f)&&h.includes(f)){u.push({word:d,predicate:d.value});continue}const g=h.split(bA.WORD_BOUNDARY);for(const b of g){if(b===f){u.push({word:d,predicate:b});continue e}const w=b.replace(bA.LEADING_TRAILING_PUNCTUATION,"");if(f===w){u.push({word:d,predicate:b});continue e}if(!(f.length>w.length)&&new RegExp("\\p{P}+","u").test(w)){if(/[/]+/.test(w))continue e;const C=w.replace(new RegExp("\\p{P}+","gu")," ");if(C===f){u.push({word:d,predicate:b});continue e}if(C.replace(/\s/gu,"")===f){u.push({word:d,predicate:b});continue e}const m=w.split(new RegExp("\\p{P}+","u"));for(const E of m)if(E===f){u.push({word:d,predicate:b});continue e}}}}return u.length?u:void 0}function cge(t){return!!rK(t)}Object.defineProperty(H_,"__esModule",{value:!0});H_.decidePost=dge;const be=p,Cc=vn,Qr=op,nK=Xo,iK=Wo;function dge(t,e){var r;return Cc.ModerationDecision.merge(pge(t,e),(r=fge(t.embed,e))==null?void 0:r.downgrade(),(0,nK.decideAccount)(t.author,e),(0,iK.decideProfile)(t.author,e))}function pge(t,e){var n;const r=new Cc.ModerationDecision;if(r.setDid(t.author.did),r.setIsMe(t.author.did===e.userDid),(n=t.labels)!=null&&n.length)for(const i of t.labels)r.addLabel("content",i,e);return r.addHidden(hge(t,e.prefs.hiddenPosts)),r.isMe||r.addMutedWord(yge(t,e.prefs.mutedWords)),r}function fge(t,e){if(t){if((be.AppBskyEmbedRecord.isView(t)||be.AppBskyEmbedRecordWithMedia.isView(t))&&be.AppBskyEmbedRecord.isViewRecord(t.record))return vA(t.record,e);if(be.AppBskyEmbedRecordWithMedia.isView(t)&&be.AppBskyEmbedRecord.isViewRecord(t.record.record))return vA(t.record.record,e);if((be.AppBskyEmbedRecord.isView(t)||be.AppBskyEmbedRecordWithMedia.isView(t))&&be.AppBskyEmbedRecord.isViewBlocked(t.record))return EA(t.record,e);if(be.AppBskyEmbedRecordWithMedia.isView(t)&&be.AppBskyEmbedRecord.isViewBlocked(t.record.record))return EA(t.record.record,e)}}function vA(t,e){var n;const r=new Cc.ModerationDecision;if(r.setDid(t.author.did),r.setIsMe(t.author.did===e.userDid),(n=t.labels)!=null&&n.length)for(const i of t.labels)r.addLabel("content",i,e);return Cc.ModerationDecision.merge(r,(0,nK.decideAccount)(t.author,e),(0,iK.decideProfile)(t.author,e))}function EA(t,e){var n,i,o,s,l,u,c,d,f;const r=new Cc.ModerationDecision;return r.setDid(t.author.did),r.setIsMe(t.author.did===e.userDid),(n=t.author.viewer)!=null&&n.muted&&((i=t.author.viewer)!=null&&i.mutedByList?r.addMutedByList((o=t.author.viewer)==null?void 0:o.mutedByList):r.addMuted((s=t.author.viewer)==null?void 0:s.muted)),(l=t.author.viewer)!=null&&l.blocking&&((u=t.author.viewer)!=null&&u.blockingByList?r.addBlockingByList((c=t.author.viewer)==null?void 0:c.blockingByList):r.addBlocking((d=t.author.viewer)==null?void 0:d.blocking)),r.addBlockedBy((f=t.author.viewer)==null?void 0:f.blockedBy),r}function hge(t,e){return e!=null&&e.length?!!(e.includes(t.uri)||t.embed&&(be.AppBskyEmbedRecord.isView(t.embed)&&be.AppBskyEmbedRecord.isViewRecord(t.embed.record)&&e.includes(t.embed.record.uri)||be.AppBskyEmbedRecordWithMedia.isView(t.embed)&&be.AppBskyEmbedRecord.isViewRecord(t.embed.record.record)&&e.includes(t.embed.record.record.uri))):!1}function yge(t,e){if(!(e!=null&&e.length))return;const r=t.author;if(be.AppBskyFeedPost.isRecord(t.record)){const i=t.record,o=(0,Qr.matchMuteWords)({mutedWords:e,text:i.text,facets:i.facets,outlineTags:i.tags,languages:i.langs,actor:r});if(o)return o;if(i.embed&&be.AppBskyEmbedImages.isMain(i.embed))for(const s of i.embed.images){const l=(0,Qr.matchMuteWords)({mutedWords:e,text:s.alt,languages:i.langs,actor:r});if(l)return l}}const{embed:n}=t;if(n){if((be.AppBskyEmbedRecord.isView(n)||be.AppBskyEmbedRecordWithMedia.isView(n))&&be.AppBskyEmbedRecord.isViewRecord(n.record)){if(be.AppBskyFeedPost.isRecord(n.record.value)){const i=n.record.value,o=n.record.author,s=(0,Qr.matchMuteWords)({mutedWords:e,text:i.text,facets:i.facets,outlineTags:i.tags,languages:i.langs,actor:o});if(s)return s;if(be.AppBskyEmbedImages.isMain(i.embed))for(const l of i.embed.images){const u=(0,Qr.matchMuteWords)({mutedWords:e,text:l.alt,languages:i.langs,actor:o});if(u)return u}if(be.AppBskyEmbedExternal.isMain(i.embed)){const{external:l}=i.embed,u=(0,Qr.matchMuteWords)({mutedWords:e,text:l.title+" "+l.description,languages:[],actor:o});if(u)return u}if(be.AppBskyEmbedRecordWithMedia.isMain(i.embed)){if(be.AppBskyEmbedExternal.isMain(i.embed.media)){const{external:l}=i.embed.media,u=(0,Qr.matchMuteWords)({mutedWords:e,text:l.title+" "+l.description,languages:[],actor:o});if(u)return u}if(be.AppBskyEmbedImages.isMain(i.embed.media))for(const l of i.embed.media.images){const u=(0,Qr.matchMuteWords)({mutedWords:e,text:l.alt,languages:be.AppBskyFeedPost.isRecord(i.record)?i.langs:[],actor:o});if(u)return u}}}}else if(be.AppBskyEmbedExternal.isView(n)){const{external:i}=n,o=(0,Qr.matchMuteWords)({mutedWords:e,text:i.title+" "+i.description,languages:[],actor:r});if(o)return o}else if(be.AppBskyEmbedRecordWithMedia.isView(n)&&be.AppBskyEmbedRecord.isViewRecord(n.record.record)){const i=n.record.record.author;if(be.AppBskyFeedPost.isRecord(n.record.record.value)){const o=n.record.record.value,s=(0,Qr.matchMuteWords)({mutedWords:e,text:o.text,facets:o.facets,outlineTags:o.tags,languages:o.langs,actor:i});if(s)return s}if(be.AppBskyEmbedImages.isView(n.media))for(const o of n.media.images){const s=(0,Qr.matchMuteWords)({mutedWords:e,text:o.alt,languages:be.AppBskyFeedPost.isRecord(t.record)?t.record.langs:[],actor:i});if(s)return s}if(be.AppBskyEmbedExternal.isView(n.media)){const{external:o}=n.media,s=(0,Qr.matchMuteWords)({mutedWords:e,text:o.title+" "+o.description,languages:[],actor:i});if(s)return s}}}}var X_={};Object.defineProperty(X_,"__esModule",{value:!0});X_.decideUserList=vge;const mge=jo,wA=vn,gge=Xo,bge=Wo;function vge(t,e){var o,s;const r=new wA.ModerationDecision,n="creator"in t&&Ege(t.creator)?t.creator:void 0;if(n){if(r.setDid(n.did),r.setIsMe(n.did===e.userDid),(o=t.labels)!=null&&o.length)for(const l of t.labels)r.addLabel("content",l,e);return wA.ModerationDecision.merge(r,(0,gge.decideAccount)(n,e),(0,bge.decideProfile)(n,e))}const i=new mge.AtUri(t.uri).hostname;if(r.setDid(i),r.setIsMe(i===e.userDid),(s=t.labels)!=null&&s.length)for(const l of t.labels)r.addLabel("content",l,e);return r}function Ege(t){return t&&typeof t=="object"&&"did"in t}var lu={};Object.defineProperty(lu,"__esModule",{value:!0});lu.isQuotedPost=_ge;lu.isQuotedPostWithMedia=xge;lu.interpretLabelValueDefinition=oK;lu.interpretLabelValueDefinitions=Rge;const W_=p,wge=_;function _ge(t){return!!(t&&W_.AppBskyEmbedRecord.isView(t))}function xge(t){return!!(t&&W_.AppBskyEmbedRecordWithMedia.isView(t))}function oK(t,e){const r={account:{},profile:{},content:{}},n=t.severity==="alert"?"alert":t.severity==="inform"?"inform":void 0;t.blurs==="content"?(r.account.profileList=n,r.account.profileView=n,r.account.contentList="blur",r.account.contentView=t.adultOnly?"blur":n,r.profile.profileList=n,r.profile.profileView=n,r.content.contentList="blur",r.content.contentView=t.adultOnly?"blur":n):t.blurs==="media"?(r.account.profileList=n,r.account.profileView=n,r.account.avatar="blur",r.account.banner="blur",r.profile.profileList=n,r.profile.profileView=n,r.profile.avatar="blur",r.profile.banner="blur",r.content.contentMedia="blur"):t.blurs==="none"&&(r.account.profileList=n,r.account.profileView=n,r.account.contentList=n,r.account.contentView=n,r.profile.profileList=n,r.profile.profileView=n,r.content.contentList=n,r.content.contentView=n);let i="warn";(t.defaultSetting==="hide"||t.defaultSetting==="ignore")&&(i=t.defaultSetting);const o=["no-self"];return t.adultOnly&&o.push("adult"),{...t,definedBy:e,configurable:!0,defaultSetting:i,flags:o,behaviors:r}}function Rge(t){var e;return(((e=t.policies)==null?void 0:e.labelValueDefinitions)||[]).filter((0,wge.asPredicate)(W_.ComAtprotoLabelDefs.validateLabelValueDefinition)).map(r=>oK(r,t.creator.did))}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.interpretLabelValueDefinitions=t.interpretLabelValueDefinition=t.matchMuteWords=t.hasMutedWord=t.ModerationDecision=t.ModerationUI=void 0,t.moderateProfile=h,t.moderatePost=g,t.moderateNotification=b,t.moderateFeedGenerator=w,t.moderateUserList=C;const e=vn,r=Xo,n=q_,i=G_,o=H_,s=Wo,l=X_;var u=ip;Object.defineProperty(t,"ModerationUI",{enumerable:!0,get:function(){return u.ModerationUI}});var c=vn;Object.defineProperty(t,"ModerationDecision",{enumerable:!0,get:function(){return c.ModerationDecision}});var d=op;Object.defineProperty(t,"hasMutedWord",{enumerable:!0,get:function(){return d.hasMutedWord}}),Object.defineProperty(t,"matchMuteWords",{enumerable:!0,get:function(){return d.matchMuteWords}});var f=lu;Object.defineProperty(t,"interpretLabelValueDefinition",{enumerable:!0,get:function(){return f.interpretLabelValueDefinition}}),Object.defineProperty(t,"interpretLabelValueDefinitions",{enumerable:!0,get:function(){return f.interpretLabelValueDefinitions}});function h(y,m){return e.ModerationDecision.merge((0,r.decideAccount)(y,m),(0,s.decideProfile)(y,m))}function g(y,m){return(0,o.decidePost)(y,m)}function b(y,m){return(0,i.decideNotification)(y,m)}function w(y,m){return(0,n.decideFeedGenerator)(y,m)}function C(y,m){return(0,l.decideUserList)(y,m)}})(z_);var Im={};Object.defineProperty(Im,"__esModule",{value:!0});Im.mock=void 0;const Tu="bafyreiclp443lavogvhj3d2ob2cxbfuscni2k5jk7bebjzg7khl3esabwq";Im.mock={post({text:t,facets:e,reply:r,embed:n}){return{$type:"app.bsky.feed.post",text:t,facets:e,reply:r,embed:n,langs:["en"],createdAt:new Date().toISOString()}},postView({record:t,author:e,embed:r,replyCount:n,repostCount:i,likeCount:o,viewer:s,labels:l}){return{$type:"app.bsky.feed.defs#postView",uri:`at://${e.did}/app.bsky.feed.post/fake`,cid:Tu,author:e,record:t,embed:r,replyCount:n,repostCount:i,likeCount:o,indexedAt:new Date().toISOString(),viewer:s,labels:l}},embedRecordView({record:t,author:e,labels:r}){return{$type:"app.bsky.embed.record#view",record:{$type:"app.bsky.embed.record#viewRecord",uri:`at://${e.did}/app.bsky.feed.post/fake`,cid:Tu,author:e,value:t,labels:r,indexedAt:new Date().toISOString()}}},profileViewBasic({handle:t,displayName:e,description:r,viewer:n,labels:i}){return{did:`did:web:${t}`,handle:t,displayName:e,description:r,viewer:n,labels:i}},actorViewerState({muted:t,mutedByList:e,blockedBy:r,blocking:n,blockingByList:i,following:o,followedBy:s}){return{muted:t,mutedByList:e,blockedBy:r,blocking:n,blockingByList:i,following:o,followedBy:s}},listViewBasic({name:t}){return{uri:"at://did:plc:fake/app.bsky.graph.list/fake",cid:Tu,name:t,purpose:"app.bsky.graph.defs#modlist",indexedAt:new Date().toISOString()}},replyNotification({author:t,record:e,labels:r}){return{uri:`at://${t.did}/app.bsky.feed.post/fake`,cid:Tu,author:t,reason:"reply",reasonSubject:`at://${t.did}/app.bsky.feed.post/fake-parent`,record:e,isRead:!1,indexedAt:new Date().toISOString(),labels:r}},followNotification({author:t,subjectDid:e,labels:r}){return{uri:`at://${t.did}/app.bsky.graph.follow/fake`,cid:Tu,author:t,reason:"follow",record:{$type:"app.bsky.graph.follow",createdAt:new Date().toISOString(),subject:e},isRead:!1,indexedAt:new Date().toISOString(),labels:r}},label({val:t,uri:e,src:r}){return{src:r||"did:plc:fake-labeler",uri:e,val:t,cts:new Date().toISOString()}}};var sp={},J_={},xn=S&&S.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ng=S&&S.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ii,Fi;Object.defineProperty(J_,"__esModule",{value:!0});class Age{constructor(){ii.set(this,!1),Fi.set(this,new Set)}get acquired(){return xn(this,ii,"f")}acquireAsync({timeout:e}={}){if(!xn(this,ii,"f"))return Ng(this,ii,!0,"f"),Promise.resolve();if(e==null)return new Promise(i=>{xn(this,Fi,"f").add(i)});let r,n;return Promise.race([new Promise(i=>{r=()=>{clearTimeout(n),i()},xn(this,Fi,"f").add(r)}),new Promise((i,o)=>{n=setTimeout(()=>{xn(this,Fi,"f").delete(r),o(new Error("Timed out waiting for lock"))},e)})])}tryAcquire(){return xn(this,ii,"f")?!1:(Ng(this,ii,!0,"f"),!0)}release(){if(!xn(this,ii,"f"))throw new Error("Cannot release an unacquired lock");if(xn(this,Fi,"f").size>0){const[e]=xn(this,Fi,"f");xn(this,Fi,"f").delete(e),e()}else Ng(this,ii,!1,"f")}}J_.default=Age;ii=new WeakMap,Fi=new WeakMap;var Ee={};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.isValidVerificationPrefs=Ee.isValidThreadViewPref=Ee.isValidSavedFeedsPrefV2=Ee.isValidSavedFeedsPref=Ee.isValidPostInteractionSettingsPref=Ee.isValidPersonalDetailsPref=Ee.isValidMutedWordsPref=Ee.isValidLabelersPref=Ee.isValidInterestsPref=Ee.isValidHiddenPostsPref=Ee.isValidFeedViewPref=Ee.isValidContentLabelPref=Ee.isValidBskyAppStatePref=Ee.isValidAdultContentPref=Ee.isValidProfile=void 0;const Wt=p,Jt=_;Ee.isValidProfile=(0,Jt.asPredicate)(Wt.AppBskyActorProfile.validateRecord);Ee.isValidAdultContentPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateAdultContentPref);Ee.isValidBskyAppStatePref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateBskyAppStatePref);Ee.isValidContentLabelPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateContentLabelPref);Ee.isValidFeedViewPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateFeedViewPref);Ee.isValidHiddenPostsPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateHiddenPostsPref);Ee.isValidInterestsPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateInterestsPref);Ee.isValidLabelersPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateLabelersPref);Ee.isValidMutedWordsPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateMutedWordsPref);Ee.isValidPersonalDetailsPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validatePersonalDetailsPref);Ee.isValidPostInteractionSettingsPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validatePostInteractionSettingsPref);Ee.isValidSavedFeedsPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateSavedFeedsPref);Ee.isValidSavedFeedsPrefV2=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateSavedFeedsPrefV2);Ee.isValidThreadViewPref=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateThreadViewPref);Ee.isValidVerificationPrefs=(0,Jt.asPredicate)(Wt.AppBskyActorDefs.validateVerificationPrefs);var Sge=S&&S.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Cge=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Tge=S&&S.__importStar||function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&Sge(r,e,n[i]);return Cge(r,e),r}}(),_A=S&&S.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kge=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_f;Object.defineProperty(sp,"__esModule",{value:!0});sp.Agent=void 0;const Lge=kge(J_),oi=Nn,Ws=jo,xA=W,ge=p,Pge=x,Dge=Sd,Bge=z_,Ige=Co,ae=Tge(Ee),Ot=Q0,RA={hideReplies:!1,hideRepliesByUnfollowed:!0,hideRepliesByLikeCount:0,hideReposts:!1,hideQuotePosts:!1},jge={sort:"hotness",prioritizeFollowedUsers:!0};class jm extends xA.XrpcClient{static configure(e){e.appLabelers&&(this.appLabelers=e.appLabelers.map(Ot.asDid))}get xrpc(){return this}constructor(e){const r=typeof e=="object"&&"fetchHandler"in e?e:{did:void 0,fetchHandler:(0,xA.buildFetchHandler)(e)};super((n,i)=>{var s;const o=new Headers(i==null?void 0:i.headers);return this.proxy&&!o.has("atproto-proxy")&&o.set("atproto-proxy",this.proxy),o.set("atproto-accept-labelers",[...this.appLabelers.map(l=>`${l};redact`),...this.labelers,(s=o.get("atproto-accept-labelers"))==null?void 0:s.trim()].filter(Boolean).join(", ")),this.sessionManager.fetchHandler(n,{...i,headers:o})},Pge.schemas),Object.defineProperty(this,"com",{enumerable:!0,configurable:!0,writable:!0,value:new ge.ComNS(this)}),Object.defineProperty(this,"app",{enumerable:!0,configurable:!0,writable:!0,value:new ge.AppNS(this)}),Object.defineProperty(this,"chat",{enumerable:!0,configurable:!0,writable:!0,value:new ge.ChatNS(this)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:new ge.ToolsNS(this)}),Object.defineProperty(this,"sessionManager",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"labelers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"proxy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"uploadBlob",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.com.atproto.repo.uploadBlob(n,i)}),Object.defineProperty(this,"resolveHandle",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.com.atproto.identity.resolveHandle(n,i)}),Object.defineProperty(this,"updateHandle",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.com.atproto.identity.updateHandle(n,i)}),Object.defineProperty(this,"createModerationReport",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.com.atproto.moderation.createReport(n,i)}),Object.defineProperty(this,"getTimeline",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getTimeline(n,i)}),Object.defineProperty(this,"getAuthorFeed",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getAuthorFeed(n,i)}),Object.defineProperty(this,"getActorLikes",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getActorLikes(n,i)}),Object.defineProperty(this,"getPostThread",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getPostThread(n,i)}),Object.defineProperty(this,"getPost",{enumerable:!0,configurable:!0,writable:!0,value:n=>this.app.bsky.feed.post.get(n)}),Object.defineProperty(this,"getPosts",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getPosts(n,i)}),Object.defineProperty(this,"getLikes",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getLikes(n,i)}),Object.defineProperty(this,"getRepostedBy",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.feed.getRepostedBy(n,i)}),Object.defineProperty(this,"getFollows",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.graph.getFollows(n,i)}),Object.defineProperty(this,"getFollowers",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.graph.getFollowers(n,i)}),Object.defineProperty(this,"getProfile",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.getProfile(n,i)}),Object.defineProperty(this,"getProfiles",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.getProfiles(n,i)}),Object.defineProperty(this,"getSuggestions",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.getSuggestions(n,i)}),Object.defineProperty(this,"searchActors",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.searchActors(n,i)}),Object.defineProperty(this,"searchActorsTypeahead",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.actor.searchActorsTypeahead(n,i)}),Object.defineProperty(this,"listNotifications",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.notification.listNotifications(n,i)}),Object.defineProperty(this,"countUnreadNotifications",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.notification.getUnreadCount(n,i)}),Object.defineProperty(this,"getLabelers",{enumerable:!0,configurable:!0,writable:!0,value:(n,i)=>this.app.bsky.labeler.getServices(n,i)}),_f.set(this,new Lge.default),this.sessionManager=r}clone(){return this.copyInto(new jm(this.sessionManager))}copyInto(e){e.configureLabelers(this.labelers),e.configureProxy(this.proxy??null),e.clearHeaders();for(const[r,n]of this.headers)e.setHeader(r,n);return e}withProxy(e,r){const n=this.clone();return n.configureProxy(`${(0,Ot.asDid)(r)}#${e}`),n}get appLabelers(){return this.constructor.appLabelers}configureLabelers(e){this.labelers=e.map(Ot.asDid)}configureLabelersHeader(e){this.configureLabelers(e.filter(Ot.isDid))}configureProxy(e){if(e===null)this.proxy=void 0;else if((0,Ot.isDid)(e))this.proxy=e;else throw new TypeError("Invalid proxy DID")}configureProxyHeader(e,r){(0,Ot.isDid)(r)&&this.configureProxy(`${r}#${e}`)}get did(){return this.sessionManager.did}get accountDid(){return this.assertDid}get assertDid(){return this.assertAuthenticated(),this.did}assertAuthenticated(){if(!this.did)throw new Error("Not logged in")}get api(){return this}async getLabelDefinitions(e){const r=[...this.appLabelers];Oge(e)?r.push(...e.moderationPrefs.labelers.map(o=>o.did)):sK(e)?r.push(...e.labelers.map(o=>o.did)):r.push(...e);const n=await this.getLabelers({dids:r,detailed:!0}),i={};if(n.data)for(const o of n.data.views)i[o.creator.did]=(0,Bge.interpretLabelValueDefinitions)(o);return i}async post(e){return e.createdAt||(e.createdAt=new Date().toISOString()),this.app.bsky.feed.post.create({repo:this.accountDid},e)}async deletePost(e){this.assertAuthenticated();const r=new Ws.AtUri(e);return this.app.bsky.feed.post.delete({repo:r.hostname,rkey:r.rkey})}async like(e,r,n){return this.app.bsky.feed.like.create({repo:this.accountDid},{subject:{uri:e,cid:r},createdAt:new Date().toISOString(),via:n})}async deleteLike(e){this.assertAuthenticated();const r=new Ws.AtUri(e);return this.app.bsky.feed.like.delete({repo:r.hostname,rkey:r.rkey})}async repost(e,r,n){return this.app.bsky.feed.repost.create({repo:this.accountDid},{subject:{uri:e,cid:r},createdAt:new Date().toISOString(),via:n})}async deleteRepost(e){this.assertAuthenticated();const r=new Ws.AtUri(e);return this.app.bsky.feed.repost.delete({repo:r.hostname,rkey:r.rkey})}async follow(e){return this.app.bsky.graph.follow.create({repo:this.accountDid},{subject:e,createdAt:new Date().toISOString()})}async deleteFollow(e){this.assertAuthenticated();const r=new Ws.AtUri(e);return this.app.bsky.graph.follow.delete({repo:r.hostname,rkey:r.rkey})}async upsertProfile(e){const r=async()=>{const n=this.assertDid,i="app.bsky.actor.profile",o=await this.com.atproto.repo.getRecord({repo:n,collection:i,rkey:"self"}).catch(c=>{}),s=o&&ae.isValidProfile(o.data.value)?o.data.value:void 0,l=await e(s),u=ge.AppBskyActorProfile.validateRecord({$type:i,...l});if(!u.success)throw u.error;await this.com.atproto.repo.putRecord({repo:n,collection:i,rkey:"self",record:u.value,swapRecord:(o==null?void 0:o.data.cid)||null})};return(0,oi.retry)(r,{maxRetries:5,retryable:n=>n instanceof ge.ComAtprotoRepoPutRecord.InvalidSwapError})}async mute(e){return this.app.bsky.graph.muteActor({actor:e})}async unmute(e){return this.app.bsky.graph.unmuteActor({actor:e})}async muteModList(e){return this.app.bsky.graph.muteActorList({list:e})}async unmuteModList(e){return this.app.bsky.graph.unmuteActorList({list:e})}async blockModList(e){return this.app.bsky.graph.listblock.create({repo:this.accountDid},{subject:e,createdAt:new Date().toISOString()})}async unblockModList(e){var o;const r=this.accountDid,i=(o=(await this.app.bsky.graph.getList({list:e,limit:1})).data.list.viewer)==null?void 0:o.blocked;if(i){const{rkey:s}=new Ws.AtUri(i);return this.app.bsky.graph.listblock.delete({repo:r,rkey:s})}}async updateSeenNotifications(e=new Date().toISOString()){return this.app.bsky.notification.updateSeen({seenAt:e})}async getPreferences(){const e={feeds:{saved:void 0,pinned:void 0},savedFeeds:void 0,feedViewPrefs:{home:{...RA}},threadViewPrefs:{...jge},moderationPrefs:{adultContentEnabled:!1,labels:{...Ige.DEFAULT_LABEL_SETTINGS},labelers:this.appLabelers.map(i=>({did:i,labels:{}})),mutedWords:[],hiddenPosts:[]},birthDate:void 0,interests:{tags:[]},bskyAppState:{queuedNudges:[],activeProgressGuide:void 0,nuxs:[]},postInteractionSettings:{threadgateAllowRules:void 0,postgateEmbeddingRules:void 0},verificationPrefs:{hideBadges:!1}},r=await this.app.bsky.actor.getPreferences({}),n=[];for(const i of r.data.preferences)if(ae.isValidAdultContentPref(i))e.moderationPrefs.adultContentEnabled=i.enabled;else if(ae.isValidContentLabelPref(i)){const o=Uge(i);n.push(o)}else if(ae.isValidLabelersPref(i))e.moderationPrefs.labelers=this.appLabelers.map(o=>({did:o,labels:{}})).concat(i.labelers.map(o=>({...o,labels:{}})));else if(ae.isValidSavedFeedsPrefV2(i))e.savedFeeds=i.items;else if(ae.isValidSavedFeedsPref(i))e.feeds.saved=i.saved,e.feeds.pinned=i.pinned;else if(ae.isValidPersonalDetailsPref(i))i.birthDate&&(e.birthDate=new Date(i.birthDate));else if(ae.isValidFeedViewPref(i)){const{$type:o,feed:s,...l}=i;e.feedViewPrefs[s]={...RA,...l}}else if(ae.isValidThreadViewPref(i)){const{$type:o,...s}=i;e.threadViewPrefs={...e.threadViewPrefs,...s}}else if(ae.isValidInterestsPref(i)){const{$type:o,...s}=i;e.interests={...e.interests,...s}}else ae.isValidMutedWordsPref(i)?(e.moderationPrefs.mutedWords=i.items,e.moderationPrefs.mutedWords.length&&(e.moderationPrefs.mutedWords=e.moderationPrefs.mutedWords.map(o=>(o.actorTarget=o.actorTarget||"all",o)))):ae.isValidHiddenPostsPref(i)?e.moderationPrefs.hiddenPosts=i.items:ae.isValidBskyAppStatePref(i)?(e.bskyAppState.queuedNudges=i.queuedNudges||[],e.bskyAppState.activeProgressGuide=i.activeProgressGuide,e.bskyAppState.nuxs=i.nuxs||[]):ae.isValidPostInteractionSettingsPref(i)?(e.postInteractionSettings.threadgateAllowRules=i.threadgateAllowRules,e.postInteractionSettings.postgateEmbeddingRules=i.postgateEmbeddingRules):ae.isValidVerificationPrefs(i)&&(e.verificationPrefs={hideBadges:i.hideBadges});if(e.savedFeeds==null){const{saved:i,pinned:o}=e.feeds;if(i&&o){const s=new Map;s.set("timeline",{id:oi.TID.nextStr(),type:"timeline",value:"following",pinned:!0});for(const l of o){const u=(0,Ot.getSavedFeedType)(l);u!=="unknown"&&s.set(l,{id:oi.TID.nextStr(),type:u,value:l,pinned:!0})}for(const l of i)if(!s.has(l)){const u=(0,Ot.getSavedFeedType)(l);if(u==="unknown")continue;s.set(l,{id:oi.TID.nextStr(),type:u,value:l,pinned:!1})}e.savedFeeds=Array.from(s.values())}else e.savedFeeds=[{id:oi.TID.nextStr(),type:"timeline",value:"following",pinned:!0}];await this.overwriteSavedFeeds(e.savedFeeds)}for(const i of n)if(i.labelerDid){const o=e.moderationPrefs.labelers.find(s=>s.did===i.labelerDid);if(!o)continue;o.labels[i.label]=i.visibility}else e.moderationPrefs.labels[i.label]=i.visibility;return e.moderationPrefs.labels=$ge(e.moderationPrefs.labels),this.configureLabelers(zg(r.data.preferences)),e}async overwriteSavedFeeds(e){e.forEach(Ot.validateSavedFeed);const r=new Map;return e.forEach(n=>{r.has(n.id)&&r.delete(n.id),r.set(n.id,n)}),this.updateSavedFeedsV2Preferences(()=>Array.from(r.values()))}async updateSavedFeeds(e){return e.map(Ot.validateSavedFeed),this.updateSavedFeedsV2Preferences(r=>r.map(n=>{const i=e.find(o=>n.id===o.id);return i?{...n,pinned:i.pinned}:n}))}async addSavedFeeds(e){const r=e.map(n=>({...n,id:oi.TID.nextStr()}));return r.forEach(Ot.validateSavedFeed),this.updateSavedFeedsV2Preferences(n=>[...n,...r])}async removeSavedFeeds(e){return this.updateSavedFeedsV2Preferences(r=>[...r.filter(n=>!e.find(i=>n.id===i))])}async setSavedFeeds(e,r){return this.updateFeedPreferences(()=>({saved:e,pinned:r}))}async addSavedFeed(e){return this.updateFeedPreferences((r,n)=>({saved:[...r.filter(i=>i!==e),e],pinned:n}))}async removeSavedFeed(e){return this.updateFeedPreferences((r,n)=>({saved:r.filter(i=>i!==e),pinned:n.filter(i=>i!==e)}))}async addPinnedFeed(e){return this.updateFeedPreferences((r,n)=>({saved:[...r.filter(i=>i!==e),e],pinned:[...n.filter(i=>i!==e),e]}))}async removePinnedFeed(e){return this.updateFeedPreferences((r,n)=>({saved:r,pinned:n.filter(i=>i!==e)}))}async setAdultContentEnabled(e){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidAdultContentPref)||{$type:"app.bsky.actor.defs#adultContentPref",enabled:e};return n.enabled=e,r.filter(i=>!ge.AppBskyActorDefs.isAdultContentPref(i)).concat(n)})}async setContentLabelPref(e,r,n){n&&(0,Ws.ensureValidDid)(n),await this.updatePreferences(i=>{const o=i.filter(ae.isValidContentLabelPref).findLast(l=>l.label===e&&l.labelerDid===n)||{$type:"app.bsky.actor.defs#contentLabelPref",label:e,labelerDid:n,visibility:r};o.visibility=r;let s;if(ge.AppBskyActorDefs.isContentLabelPref(o)&&!o.labelerDid){const l={"graphic-media":"gore",porn:"nsfw",sexual:"suggestive",__proto__:null}[o.label];l&&(s=i.filter(ae.isValidContentLabelPref).findLast(u=>u.label===l&&u.labelerDid===void 0)||{$type:"app.bsky.actor.defs#contentLabelPref",label:l,labelerDid:void 0,visibility:r},s.visibility=r)}return i.filter(l=>!ge.AppBskyActorDefs.isContentLabelPref(l)||!(l.label===e&&l.labelerDid===n)).concat(o).filter(l=>s?!ge.AppBskyActorDefs.isContentLabelPref(l)||!(l.label===s.label&&l.labelerDid===void 0):!0).concat(s?[s]:[])})}async addLabeler(e){const r=await this.updatePreferences(n=>{const i=n.findLast(ae.isValidLabelersPref)||{$type:"app.bsky.actor.defs#labelersPref",labelers:[]};return i.labelers.some(o=>o.did===e)||i.labelers.push({did:e}),n.filter(o=>!ge.AppBskyActorDefs.isLabelersPref(o)).concat(i)});this.configureLabelers(zg(r))}async removeLabeler(e){const r=await this.updatePreferences(n=>{const i=n.findLast(ae.isValidLabelersPref)||{$type:"app.bsky.actor.defs#labelersPref",labelers:[]};return i.labelers=i.labelers.filter(o=>o.did!==e),n.filter(o=>!ge.AppBskyActorDefs.isLabelersPref(o)).concat(i)});this.configureLabelers(zg(r))}async setPersonalDetails({birthDate:e}){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidPersonalDetailsPref)||{$type:"app.bsky.actor.defs#personalDetailsPref"};return n.birthDate=e instanceof Date?e.toISOString():e,r.filter(i=>!ge.AppBskyActorDefs.isPersonalDetailsPref(i)).concat(n)})}async setFeedViewPrefs(e,r){await this.updatePreferences(n=>{const i=n.filter(ae.isValidFeedViewPref).findLast(o=>o.feed===e);return n.filter(o=>!ge.AppBskyActorDefs.isFeedViewPref(o)||o.feed!==e).concat({...i,...r,$type:"app.bsky.actor.defs#feedViewPref",feed:e})})}async setThreadViewPrefs(e){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidThreadViewPref);return r.filter(i=>!ge.AppBskyActorDefs.isThreadViewPref(i)).concat({...n,...e,$type:"app.bsky.actor.defs#threadViewPref"})})}async setInterestsPref(e){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidInterestsPref);return r.filter(i=>!ge.AppBskyActorDefs.isInterestsPref(i)).concat({...n,...e,$type:"app.bsky.actor.defs#interestsPref"})})}async addMutedWord(e){const r=(0,Ot.sanitizeMutedWordValue)(e.value);r&&await this.updatePreferences(n=>{let i=n.findLast(ae.isValidMutedWordsPref);const o={id:oi.TID.nextStr(),value:r,targets:e.targets||[],actorTarget:e.actorTarget||"all",expiresAt:e.expiresAt||void 0};return i?(i.items.push(o),i.items=Fg(i.items)):i={$type:"app.bsky.actor.defs#mutedWordsPref",items:[o]},n.filter(s=>!ge.AppBskyActorDefs.isMutedWordsPref(s)).concat(i)})}async addMutedWords(e){await Promise.all(e.map(r=>this.addMutedWord(r)))}async upsertMutedWords(e){await this.addMutedWords(e)}async updateMutedWord(e){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidMutedWordsPref);return n?(n.items=n.items.map(i=>{if(AA(i,e)){const s={...i,...e};return{id:i.id||oi.TID.nextStr(),value:(0,Ot.sanitizeMutedWordValue)(s.value)||i.value,targets:s.targets||[],actorTarget:s.actorTarget||"all",expiresAt:s.expiresAt||void 0}}else return i}),n.items=Fg(n.items),r.filter(i=>!ge.AppBskyActorDefs.isMutedWordsPref(i)).concat(n)):r})}async removeMutedWord(e){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidMutedWordsPref);if(n){for(let i=0;i<n.items.length;i++)if(AA(n.items[i],e)){n.items.splice(i,1);break}return n.items=Fg(n.items),r.filter(i=>!ge.AppBskyActorDefs.isMutedWordsPref(i)).concat(n)}return r})}async removeMutedWords(e){await Promise.all(e.map(r=>this.removeMutedWord(r)))}async hidePost(e){await this.updateHiddenPost(e,"hide")}async unhidePost(e){await this.updateHiddenPost(e,"unhide")}async bskyAppQueueNudges(e){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return n.queuedNudges=(n.queuedNudges||[]).concat(e),r.filter(i=>!ge.AppBskyActorDefs.isBskyAppStatePref(i)).concat(n)})}async bskyAppDismissNudges(e){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return e=Array.isArray(e)?e:[e],n.queuedNudges=(n.queuedNudges||[]).filter(i=>!e.includes(i)),r.filter(i=>!ge.AppBskyActorDefs.isBskyAppStatePref(i)).concat(n)})}async bskyAppSetActiveProgressGuide(e){if(e){const r=ge.AppBskyActorDefs.validateBskyAppProgressGuide(e);if(!r.success)throw r.error}await this.updatePreferences(r=>{const n=r.findLast(ae.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return n.activeProgressGuide=e,r.filter(i=>!ge.AppBskyActorDefs.isBskyAppStatePref(i)).concat(n)})}async bskyAppUpsertNux(e){(0,Ot.validateNux)(e),await this.updatePreferences(r=>{var s;const n=r.findLast(ae.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};n.nuxs=n.nuxs||[];const i=(s=n.nuxs)==null?void 0:s.find(l=>l.id===e.id);let o;return i?o={id:i.id,completed:e.completed,data:e.data,expiresAt:e.expiresAt}:o=e,n.nuxs=n.nuxs.filter(l=>l.id!==e.id).concat(o),r.filter(l=>!ge.AppBskyActorDefs.isBskyAppStatePref(l)).concat(n)})}async bskyAppRemoveNuxs(e){await this.updatePreferences(r=>{const n=r.findLast(ae.isValidBskyAppStatePref)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return n.nuxs=(n.nuxs||[]).filter(i=>!e.includes(i.id)),r.filter(i=>!ge.AppBskyActorDefs.isBskyAppStatePref(i)).concat(n)})}async setPostInteractionSettings(e){const r=ge.AppBskyActorDefs.validatePostInteractionSettingsPref(e);if(!r.success)throw r.error;await this.updatePreferences(n=>{const i=n.findLast(ae.isValidPostInteractionSettingsPref)||{$type:"app.bsky.actor.defs#postInteractionSettingsPref"};return i.threadgateAllowRules=e.threadgateAllowRules,i.postgateEmbeddingRules=e.postgateEmbeddingRules,n.filter(o=>!ge.AppBskyActorDefs.isPostInteractionSettingsPref(o)).concat(i)})}async setVerificationPrefs(e){const r=ge.AppBskyActorDefs.validateVerificationPrefs(e);if(!r.success)throw r.error;await this.updatePreferences(n=>{const i=n.findLast(ae.isValidVerificationPrefs)||{$type:"app.bsky.actor.defs#verificationPrefs",hideBadges:!1};return i.hideBadges=e.hideBadges,n.filter(o=>!ge.AppBskyActorDefs.isVerificationPrefs(o)).concat(i)})}async updatePreferences(e){try{await _A(this,_f,"f").acquireAsync();const r=await this.app.bsky.actor.getPreferences({}),n=e(r.data.preferences);return n===!1?r.data.preferences:(await this.app.bsky.actor.putPreferences({preferences:n}),n)}finally{_A(this,_f,"f").release()}}async updateHiddenPost(e,r){await this.updatePreferences(n=>{const i=n.findLast(ae.isValidHiddenPostsPref)||{$type:"app.bsky.actor.defs#hiddenPostsPref",items:[]},o=new Set(i.items);return r==="hide"?o.add(e):o.delete(e),i.items=[...o],n.filter(s=>!ge.AppBskyActorDefs.isHiddenPostsPref(s)).concat(i)})}async updateFeedPreferences(e){let r;return await this.updatePreferences(n=>{const i=n.findLast(ae.isValidSavedFeedsPref)||{$type:"app.bsky.actor.defs#savedFeedsPref",saved:[],pinned:[]};return r=e(i.saved,i.pinned),i.saved=r.saved,i.pinned=r.pinned,n.filter(o=>!ge.AppBskyActorDefs.isSavedFeedsPref(o)).concat(i)}),r}async updateSavedFeedsV2Preferences(e){let r=[];return await this.updatePreferences(n=>{const i=n.findLast(ae.isValidSavedFeedsPrefV2)||{$type:"app.bsky.actor.defs#savedFeedsPrefV2",items:[]},o=e(i.items);i.items=[...o].sort((u,c)=>u.pinned===c.pinned?0:u.pinned?-1:1),r=o;let s=n.filter(u=>!ge.AppBskyActorDefs.isSavedFeedsPrefV2(u)).concat(i),l=n.findLast(ae.isValidSavedFeedsPref);if(l){const{saved:u,pinned:c}=l,d=(0,Ot.savedFeedsToUriArrays)(i.items.filter(f=>["feed","list"].includes(f.type)));l={...l,saved:Array.from(new Set([...u,...d.saved])),pinned:Array.from(new Set([...c,...d.pinned]))},s=s.filter(f=>!ge.AppBskyActorDefs.isSavedFeedsPref(f)).concat(l)}return s}),r}}sp.Agent=jm;_f=new WeakMap;Object.defineProperty(jm,"appLabelers",{enumerable:!0,configurable:!0,writable:!0,value:[Dge.BSKY_LABELER_DID]});function Uge(t){let e=t.visibility;return e==="show"&&(e="ignore"),{...t,visibility:e}}function $ge(t){const e={...t},r={gore:"graphic-media",nsfw:"porn",suggestive:"sexual"};for(const n in e){const i=r[n];i&&(e[i]=e[n])}return e}function zg(t){const e=t.findLast(ae.isValidLabelersPref);let r=[];return e&&(r=e.labelers.map(n=>n.did)),r}function Oge(t){return t&&typeof t=="object"&&"moderationPrefs"in t&&sK(t.moderationPrefs)}function sK(t){return t&&typeof t=="object"&&"labelers"in t}function Fg(t){return t.map(e=>({...e,id:e.id||oi.TID.nextStr()}))}function AA(t,e){const r=t.id,n=r&&r===e.id,i=!r&&t.value===e.value;return n||i}var vi={};Object.defineProperty(vi,"__esModule",{value:!0});vi.CredentialSession=vi.AtpAgent=void 0;const SA=Nn,cs=W,Kge=sp,Vge=p,Mge=x,CA=globalThis.ReadableStream;class Z_ extends Kge.Agent{constructor(e){const r=e instanceof xf?e:new xf(new URL(e.service),e.fetch,e.persistSession);if(super(r),Object.defineProperty(this,"sessionManager",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.sessionManager=r,!(e instanceof xf)&&e.headers)for(const[n,i]of e.headers)this.setHeader(n,i)}clone(){return this.copyInto(new Z_(this.sessionManager))}get session(){return this.sessionManager.session}get hasSession(){return this.sessionManager.hasSession}get did(){return this.sessionManager.did}get serviceUrl(){return this.sessionManager.serviceUrl}get pdsUrl(){return this.sessionManager.pdsUrl}get dispatchUrl(){return this.sessionManager.dispatchUrl}get service(){return this.serviceUrl}get persistSession(){throw new Error('Cannot set persistSession directly. "persistSession" is defined through the constructor and will be invoked automatically when session data changes.')}set persistSession(e){throw new Error('Cannot set persistSession directly. "persistSession" must be defined in the constructor and can no longer be changed.')}getServiceUrl(){return this.serviceUrl}async resumeSession(e){return this.sessionManager.resumeSession(e)}async createAccount(e,r){return this.sessionManager.createAccount(e,r)}async login(e){return this.sessionManager.login(e)}async logout(){return this.sessionManager.logout()}}vi.AtpAgent=Z_;class xf{constructor(e,r=globalThis.fetch,n){Object.defineProperty(this,"serviceUrl",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"fetch",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"persistSession",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"pdsUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"session",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"refreshSessionPromise",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"server",{enumerable:!0,configurable:!0,writable:!0,value:new Vge.ComAtprotoServerNS(new cs.XrpcClient((i,o)=>(0,this.fetch)(new URL(i,this.serviceUrl),o),Mge.schemas))})}get did(){var e;return(e=this.session)==null?void 0:e.did}get dispatchUrl(){return this.pdsUrl||this.serviceUrl}get hasSession(){return!!this.session}setFetch(e=globalThis.fetch){this.fetch=e}async fetchHandler(e,r){var f,h,g,b,w;await this.refreshSessionPromise;const n=new URL(e,this.dispatchUrl),i=new Request(n,r),o=(f=this.session)==null?void 0:f.accessJwt;if(!o||i.headers.has("authorization"))return(0,this.fetch)(i);i.headers.set("authorization",`Bearer ${o}`);const s=await(0,this.fetch)(i);if(!((h=this.session)!=null&&h.refreshJwt)||!await zge(s,[400],["ExpiredToken"]))return s;try{await this.refreshSession()}catch{return s}if((g=r==null?void 0:r.signal)!=null&&g.aborted||CA&&(r==null?void 0:r.body)instanceof CA)return s;const u=(b=this.session)==null?void 0:b.accessJwt;if(!u||u===o)return s;await((w=s.body)==null?void 0:w.cancel());const c=new URL(e,this.dispatchUrl),d=new Request(c,r);return d.headers.set("authorization",`Bearer ${u}`),await(0,this.fetch)(d)}async createAccount(e,r){var n,i;try{const o=await this.server.createAccount(e,r);return this.session={accessJwt:o.data.accessJwt,refreshJwt:o.data.refreshJwt,handle:o.data.handle,did:o.data.did,email:e.email,emailConfirmed:!1,emailAuthFactor:!1,active:!0},(n=this.persistSession)==null||n.call(this,"create",this.session),this._updateApiEndpoint(o.data.didDoc),o}catch(o){throw this.session=void 0,(i=this.persistSession)==null||i.call(this,"create-failed",void 0),o}}async login(e){var r,n;try{const i=await this.server.createSession({identifier:e.identifier,password:e.password,authFactorToken:e.authFactorToken,allowTakendown:e.allowTakendown});return this.session={accessJwt:i.data.accessJwt,refreshJwt:i.data.refreshJwt,handle:i.data.handle,did:i.data.did,email:i.data.email,emailConfirmed:i.data.emailConfirmed,emailAuthFactor:i.data.emailAuthFactor,active:i.data.active??!0,status:i.data.status},this._updateApiEndpoint(i.data.didDoc),(r=this.persistSession)==null||r.call(this,"create",this.session),i}catch(i){throw this.session=void 0,(n=this.persistSession)==null||n.call(this,"create-failed",void 0),i}}async logout(){var e;if(this.session)try{await this.server.deleteSession(void 0,{headers:{authorization:`Bearer ${this.session.refreshJwt}`}})}catch{}finally{this.session=void 0,(e=this.persistSession)==null||e.call(this,"expired",void 0)}}async resumeSession(e){var r,n;this.session=e;try{const i=await this.server.getSession(void 0,{headers:{authorization:`Bearer ${e.accessJwt}`}}).catch(async o=>{if(o instanceof cs.XRPCError&&["ExpiredToken","InvalidToken"].includes(o.error)&&e.refreshJwt)try{const s=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${e.refreshJwt}`}});return e.accessJwt=s.data.accessJwt,e.refreshJwt=s.data.refreshJwt,this.server.getSession(void 0,{headers:{authorization:`Bearer ${e.accessJwt}`}})}catch{}throw o});if(i.data.did!==e.did)throw new cs.XRPCError(cs.ResponseType.InvalidRequest,"Invalid session","InvalidDID");return e.email=i.data.email,e.handle=i.data.handle,e.emailConfirmed=i.data.emailConfirmed,e.emailAuthFactor=i.data.emailAuthFactor,e.active=i.data.active??!0,e.status=i.data.status,this.session===e&&(this._updateApiEndpoint(i.data.didDoc),(r=this.persistSession)==null||r.call(this,"update",e)),i}catch(i){throw this.session===e&&(this.session=void 0,(n=this.persistSession)==null||n.call(this,i instanceof cs.XRPCError&&["ExpiredToken","InvalidToken"].includes(i.error)?"expired":"network-error",void 0)),i}}async refreshSession(){return this.refreshSessionPromise||(this.refreshSessionPromise=this._refreshSessionInner().finally(()=>{this.refreshSessionPromise=void 0}))}async _refreshSessionInner(){var e,r,n;if((e=this.session)!=null&&e.refreshJwt)try{const i=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${this.session.refreshJwt}`}});this.session={...this.session,accessJwt:i.data.accessJwt,refreshJwt:i.data.refreshJwt,handle:i.data.handle,did:i.data.did},this._updateApiEndpoint(i.data.didDoc),(r=this.persistSession)==null||r.call(this,"update",this.session)}catch(i){i instanceof cs.XRPCError&&i.error&&["ExpiredToken","InvalidToken"].includes(i.error)&&(this.session=void 0,(n=this.persistSession)==null||n.call(this,"expired",void 0))}}_updateApiEndpoint(e){if((0,SA.isValidDidDoc)(e)){const r=(0,SA.getPdsEndpoint)(e);this.pdsUrl=r?new URL(r):void 0}else this.pdsUrl=void 0}}vi.CredentialSession=xf;function Nge(t){return cs.errorResponseBody.safeParse(t).success}async function zge(t,e,r){if(!e.includes(t.status))return!1;try{const n=await Fge(t,10240);return Nge(n)&&r.includes(n.error)}catch{return!1}}async function Fge(t,e=1/0){if(Gge(t)!=="application/json")throw new Error("Not JSON");if(qge(t)>e)throw new Error("Response too large");return t.clone().json()}function qge({headers:t}){return t.get("Content-Length")?Number(t.get("Content-Length")):NaN}function Gge({headers:t}){var e,r;return(r=(e=t.get("Content-Type"))==null?void 0:e.split(";")[0])==null?void 0:r.trim()}var Um={};Object.defineProperty(Um,"__esModule",{value:!0});Um.BskyAgent=void 0;const Hge=vi;class gh extends Hge.AtpAgent{clone(){if(this.constructor===gh){const e=new gh(this.sessionManager);return this.copyInto(e)}throw new TypeError("Cannot clone a subclass of BskyAgent")}}Um.BskyAgent=gh;(function(t){var e=S&&S.__createBinding||(Object.create?function(C,y,m,E){E===void 0&&(E=m);var A=Object.getOwnPropertyDescriptor(y,m);(!A||("get"in A?!y.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(C,E,A)}:function(C,y,m,E){E===void 0&&(E=m),C[E]=y[m]}),r=S&&S.__exportStar||function(C,y){for(var m in C)m!=="default"&&!Object.prototype.hasOwnProperty.call(y,m)&&e(y,C,m)};Object.defineProperty(t,"__esModule",{value:!0}),t.lexicons=t.default=t.BskyAgent=t.CredentialSession=t.AtpAgent=t.Agent=t.LABELS=t.DEFAULT_LABEL_SETTINGS=t.asPredicate=t.schemas=t.parseLanguage=t.stringifyLex=t.lexToJson=t.jsonToLex=t.jsonStringToLex=t.BlobRef=t.AtUri=void 0;const n=Ls,i=x;var o=jo;Object.defineProperty(t,"AtUri",{enumerable:!0,get:function(){return o.AtUri}});var s=Ls;Object.defineProperty(t,"BlobRef",{enumerable:!0,get:function(){return s.BlobRef}}),Object.defineProperty(t,"jsonStringToLex",{enumerable:!0,get:function(){return s.jsonStringToLex}}),Object.defineProperty(t,"jsonToLex",{enumerable:!0,get:function(){return s.jsonToLex}}),Object.defineProperty(t,"lexToJson",{enumerable:!0,get:function(){return s.lexToJson}}),Object.defineProperty(t,"stringifyLex",{enumerable:!0,get:function(){return s.stringifyLex}});var l=Nn;Object.defineProperty(t,"parseLanguage",{enumerable:!0,get:function(){return l.parseLanguage}}),r(Tk,t),r(Sd,t),r(Q0,t),r(p,t);var u=x;Object.defineProperty(t,"schemas",{enumerable:!0,get:function(){return u.schemas}});var c=_;Object.defineProperty(t,"asPredicate",{enumerable:!0,get:function(){return c.asPredicate}}),r(Ua,t),r(Bm,t),r(au,t),r(fn,t),r(z_,t),r(Ft,t),r(Im,t);var d=Co;Object.defineProperty(t,"DEFAULT_LABEL_SETTINGS",{enumerable:!0,get:function(){return d.DEFAULT_LABEL_SETTINGS}}),Object.defineProperty(t,"LABELS",{enumerable:!0,get:function(){return d.LABELS}});var f=sp;Object.defineProperty(t,"Agent",{enumerable:!0,get:function(){return f.Agent}});var h=vi;Object.defineProperty(t,"AtpAgent",{enumerable:!0,get:function(){return h.AtpAgent}});var g=vi;Object.defineProperty(t,"CredentialSession",{enumerable:!0,get:function(){return g.CredentialSession}});var b=Um;Object.defineProperty(t,"BskyAgent",{enumerable:!0,get:function(){return b.BskyAgent}});var w=vi;Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w.AtpAgent}}),t.lexicons=new n.Lexicons(i.lexicons)})(Ef);const Oe={admin:"ai.syui.ai",pds:"syu.is",collection:"ai.syui.log",handleList:(()=>{try{return JSON.parse('["ai.syui.ai", "syui.syui.ai", "ai.ai"]')}catch{return[]}})(),oauth:{clientId:"https://syui.ai/client-metadata.json",redirectUri:"https://syui.ai/oauth/callback"}};function Xu(t){return t.includes(Oe.pds)?{pds:`https://${Oe.pds}`,bsky:`https://bsky.${Oe.pds}`,plc:`https://plc.${Oe.pds}`,web:`https://web.${Oe.pds}`}:{pds:t.startsWith("http")?t:`https://${t}`,bsky:"https://public.api.bsky.app",plc:"https://plc.directory",web:"https://bsky.app"}}function Q_(t){return Oe.handleList.includes(t)||t.endsWith(`.${Oe.pds}`)}async function aK(t){var n,i,o;const e=Q_(t)?`https://${Oe.pds}`:"https://bsky.social";return((o=(i=(n=(await fetch(`${e}/xrpc/com.atproto.repo.describeRepo?repo=${t}`).then(s=>s.json())).didDoc)==null?void 0:n.service)==null?void 0:i[0])==null?void 0:o.serviceEndpoint)||e}class Xge{constructor(){this.clientId=Oe.oauth.clientId,this.clients={bsky:null,syu:null},this.agent=null,this.sessionInfo=null,this.initPromise=null}getClientId(){const e=window.location.origin;return e.includes("localhost")||e.includes("127.0.0.1")?void 0:`${e}/client-metadata.json`}async initialize(){return this.initPromise?this.initPromise:(this.initPromise=this._initialize(),this.initPromise)}async _initialize(){try{return this.clients.bsky=await Vb.BrowserOAuthClient.load({clientId:this.clientId,handleResolver:"https://bsky.social",plcDirectoryUrl:"https://plc.directory"}),this.clients.syu=await Vb.BrowserOAuthClient.load({clientId:this.clientId,handleResolver:"https://syu.is",plcDirectoryUrl:"https://plc.syu.is"}),await this.restoreSession()}catch(e){throw console.error("OAuth initialization failed:",e),this.initPromise=null,e}}async restoreSession(){for(const e of[this.clients.bsky,this.clients.syu]){const r=await e.init();if(r!=null&&r.session)return this.agent=new Ef.Agent(r.session),this.processSession(r.session)}return null}async processSession(e){var s;const r=e.sub||e.did;let n=e.handle||"unknown",i=null,o=null;try{this.agent=new Ef.Agent(e)}catch{this.agent=new Ef.Agent({service:((s=e.server)==null?void 0:s.serviceEndpoint)||"https://bsky.social",fetch:e.dpopFetch})}if(this.agent&&r&&!r.includes("test-"))try{await new Promise(u=>setTimeout(u,300));const l=await this.agent.getProfile({actor:r});n=l.data.handle||n,i=l.data.displayName||null,o=l.data.avatar||null,console.log("Profile fetched from session:",{did:r,handle:n,displayName:i,avatar:o?"present":"none"})}catch(l){console.log("Failed to get profile from session:",l)}else r&&r.includes("test-")&&console.log("Skipping profile fetch for test DID:",r);return this.sessionInfo={did:r,handle:n,displayName:i,avatar:o},{did:r,handle:n,displayName:i,avatar:o}}async login(e){await this.initialize();const n=await(Q_(e)?this.clients.syu:this.clients.bsky).authorize(e,{scope:"atproto transition:generic"});window.location.href=n.toString()}async checkAuth(){try{return await this.initialize(),this.sessionInfo?{user:this.sessionInfo,agent:this.agent}:null}catch(e){return console.error("Auth check failed:",e),null}}async logout(){var e;try{if(this.clients.bsky){const r=await this.clients.bsky.init();(e=r==null?void 0:r.session)!=null&&e.signOut&&await r.session.signOut()}this.agent=null,this.sessionInfo=null,this.clients={bsky:null,syu:null},this.initPromise=null,localStorage.clear(),sessionStorage.clear(),window.location.reload()}catch(r){console.error("Logout failed:",r)}}getAgent(){return this.agent}getUser(){return this.sessionInfo}}const qg=new Xge;function Wge(){const[t,e]=ye.useState(null),[r,n]=ye.useState(null),[i,o]=ye.useState(!0);ye.useEffect(()=>{s()},[]);const s=async()=>{try{const c=await qg.checkAuth();if(c&&(e(c.user),n(c.agent),window.location.pathname==="/oauth/callback")){console.log("OAuth callback completed, notifying parent window");const d=sessionStorage.getItem("oauth_return_url")||document.referrer||window.location.origin;sessionStorage.removeItem("oauth_return_url"),window.parent!==window?window.parent.postMessage({type:"oauth_success",returnUrl:d,user:c.user},"*"):setTimeout(()=>{window.location.href=d},1e3)}}catch(c){console.error("Auth initialization failed:",c)}finally{o(!1)}};return{user:t,agent:r,loading:i,login:async c=>{window.location.pathname!=="/oauth/callback"&&sessionStorage.setItem("oauth_return_url",window.location.href),await qg.login(c)},logout:async()=>{await qg.logout(),e(null),n(null)},isAuthenticated:!!t}}class Jge{constructor(){this.isDev=!1,this.debugEnabled=!1,this.isEnabled=this.isDev&&this.debugEnabled}log(...e){this.isEnabled&&console.log(...e)}error(...e){this.isEnabled&&console.error(...e)}warn(...e){this.isEnabled&&console.warn(...e)}info(...e){this.isEnabled&&console.info(...e)}group(e){this.isEnabled&&console.group(e)}groupEnd(){this.isEnabled&&console.groupEnd()}table(e){this.isEnabled&&console.table(e)}time(e){this.isEnabled&&console.time(e)}timeEnd(e){this.isEnabled&&console.timeEnd(e)}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}}const Ge=new Jge;class Xp extends Error{constructor(e,r,n){super(e),this.status=r,this.context=n,this.timestamp=new Date().toISOString()}}function Zge(t){var e,r;return t?t.status===400?"アカウントまたはレコードが見つかりません":t.status===401?"認証が必要です。ログインしてください":t.status===403?"アクセス権限がありません":t.status===429?"アクセスが集中しています。しばらく待ってから再試行してください":t.status===500?"サーバーでエラーが発生しました":(e=t.message)!=null&&e.includes("fetch")?"ネットワーク接続を確認してください":(r=t.message)!=null&&r.includes("timeout")?"タイムアウトしました。再試行してください":`エラーが発生しました: ${t.message||"不明"}`:"不明なエラー"}function Rf(t,e="Unknown"){const r={context:e,message:t.message,status:t.status,timestamp:new Date().toISOString(),url:window.location.href};Ge.error(`[ATProto Error] ${e}:`,r)}class Qge{constructor(e=3e4){this.cache=new Map,this.ttl=e}generateKey(...e){return e.filter(Boolean).join(":")}get(e){const r=this.cache.get(e);return r?Date.now()-r.timestamp>this.ttl?(this.cache.delete(e),null):(Ge.log(`Cache hit: ${e}`),r.data):null}set(e,r){this.cache.set(e,{data:r,timestamp:Date.now()}),Ge.log(`Cache set: ${e}`)}clear(){this.cache.clear(),Ge.log("Cache cleared")}invalidatePattern(e){let r=0;for(const n of this.cache.keys())n.includes(e)&&(this.cache.delete(n),r++);Ge.log(`Cache invalidated: ${e} (${r} items)`)}getStats(){return{size:this.cache.size,keys:Array.from(this.cache.keys())}}}const tt=new Qge,Gg={describeRepo:"com.atproto.repo.describeRepo",getProfile:"app.bsky.actor.getProfile",listRecords:"com.atproto.repo.listRecords"};async function Wp(t,e={}){try{const r=new AbortController,n=setTimeout(()=>r.abort(),15e3),i=await fetch(t,{...e,signal:r.signal});if(clearTimeout(n),!i.ok)throw new Xp(`Request failed: ${i.statusText}`,i.status,{url:t,method:e.method||"GET"});return await i.json()}catch(r){if(r.name==="AbortError"){const i=new Xp("リクエストがタイムアウトしました",408,{url:t});throw Rf(i,"Request Timeout"),i}if(r instanceof Xp)throw Rf(r,"API Request"),r;const n=new Xp("ネットワークエラーが発生しました",0,{url:t,originalError:r.message});throw Rf(n,"Network Error"),n}}const Lr={async getDid(t,e){return(await Wp(`https://${t}/xrpc/${Gg.describeRepo}?repo=${e}`)).did},async getProfile(t,e){return e&&e.includes("test-")?(logger.log("Skipping profile fetch for test DID:",e),{did:e,handle:"test.user",displayName:"Test User",avatar:null}):await Wp(`${t}/xrpc/${Gg.getProfile}?actor=${e}`)},async getRecords(t,e,r,n=10){return(await Wp(`${t}/xrpc/${Gg.listRecords}?repo=${e}&collection=${r}&limit=${n}`)).records||[]},async searchPlc(t,e){var r,n,i,o;try{const s=await Wp(`${t}/${e}`);return{success:!0,endpoint:((n=(r=s==null?void 0:s.service)==null?void 0:r[0])==null?void 0:n.serviceEndpoint)||null,handle:((o=(i=s==null?void 0:s.alsoKnownAs)==null?void 0:i[0])==null?void 0:o.replace("at://",""))||null}}catch{return{success:!1,endpoint:null,handle:null}}},async putRecord(t,e,r){if(!r)throw new Error("Agent required for putRecord");return await r.com.atproto.repo.putRecord(e)}},eo={async getBase(t,e,r,n=10){const i=tt.generateKey("base",t,e,r,n),o=tt.get(i);if(o)return o;const s=await Lr.getRecords(t,e,r,n);return tt.set(i,s),s},async getLang(t,e,r,n=10){const i=tt.generateKey("lang",t,e,r,n),o=tt.get(i);if(o)return o;const s=await Lr.getRecords(t,e,`${r}.chat.lang`,n);return tt.set(i,s),s},async getComment(t,e,r,n=10){const i=tt.generateKey("comment",t,e,r,n),o=tt.get(i);if(o)return o;const s=await Lr.getRecords(t,e,`${r}.chat.comment`,n);return tt.set(i,s),s},async getChat(t,e,r,n=10){const i=tt.generateKey("chat",t,e,r,n),o=tt.get(i);if(o)return o;const s=await Lr.getRecords(t,e,`${r}.chat`,n);return tt.set(i,s),s},async getUserList(t,e,r,n=100){const i=tt.generateKey("userlist",t,e,r,n),o=tt.get(i);if(o)return o;const s=await Lr.getRecords(t,e,`${r}.user`,n);return tt.set(i,s),s},async getUserComments(t,e,r,n=10){const i=tt.generateKey("usercomments",t,e,r,n),o=tt.get(i);if(o)return o;const s=await Lr.getRecords(t,e,r,n);return tt.set(i,s),s},invalidateCache(t){tt.invalidatePattern(t)}};function Yge(){const[t,e]=ye.useState({did:"",profile:null,records:[],apiConfig:null}),[r,n]=ye.useState([]),[i,o]=ye.useState([]),[s,l]=ye.useState(!0),[u,c]=ye.useState(null),[d,f]=ye.useState(0);ye.useEffect(()=>{h()},[]);const h=async()=>{try{l(!0),c(null);const g=Xu(`https://${Oe.pds}`),b=await Lr.getDid(Oe.pds,Oe.admin),w=await Lr.getProfile(g.bsky,b),[C,y,m]=await Promise.all([eo.getBase(g.pds,b,Oe.collection),eo.getLang(g.pds,b,Oe.collection),eo.getComment(g.pds,b,Oe.collection)]);e({did:b,profile:w,records:C,apiConfig:g}),n(y),o(m),f(0)}catch(g){Rf(g,"useAdminData.loadAdminData"),c(Zge(g)),d<3&&setTimeout(()=>{f(b=>b+1),h()},Math.pow(2,d)*1e3)}finally{l(!1)}};return{adminData:t,langRecords:r,commentRecords:i,loading:s,error:u,retryCount:d,refresh:h}}function ebe(t){const[e,r]=ye.useState([]),[n,i]=ye.useState([]),[o,s]=ye.useState(!1),[l,u]=ye.useState(null);return ye.useEffect(()=>{if(!(t!=null&&t.did)||!(t!=null&&t.apiConfig))return;(async()=>{var f,h;s(!0),u(null);try{const g=await eo.getUserList(t.apiConfig.pds,t.did,Oe.collection),b=await eo.getChat(t.apiConfig.pds,t.did,Oe.collection);i(b);const w=await eo.getBase(t.apiConfig.pds,t.did,Oe.collection),C=[];for(const y of w)if((f=y.value)!=null&&f.comments&&Array.isArray(y.value.comments)){const m=y.value.comments.map(E=>({uri:y.uri,cid:y.cid,value:{...E,post:{url:y.value.url}}}));C.push(...m)}if(g.length>0&&((h=g[0].value)!=null&&h.users)){console.log("User list found, but skipping placeholder users for now");const y=g[0].value.users.filter(m=>m.handle&&m.did&&!m.did.includes("placeholder")&&!m.did.includes("example"));if(y.length>0){console.log(`Processing ${y.length} real users`);for(const m of y){const E=m.handle;try{let A,L,D;m.did&&m.pds?(A=m.did,L=m.pds.replace("https://",""),D=Xu(L)):Q_(E)?(L=Oe.pds,D=Xu(L),A=await Lr.getDid(L,E)):(L="bsky.social",D=Xu(L),A=await Lr.getDid(L,E));const B=await eo.getUserComments(D.pds,A,Oe.collection);if(!B||B.length===0)continue;let j=null;try{j=await Lr.getProfile(D.bsky,A)}catch(ee){console.warn(`Failed to get profile for ${E}:`,ee)}const pe=B.map(ee=>{var Zt,Li,Pi;return{...ee,value:{...ee.value,author:{did:A,handle:((Zt=j==null?void 0:j.data)==null?void 0:Zt.handle)||E,displayName:((Li=j==null?void 0:j.data)==null?void 0:Li.displayName)||E,avatar:((Pi=j==null?void 0:j.data)==null?void 0:Pi.avatar)||null}}}});C.push(...pe)}catch(A){console.warn(`Failed to fetch data for user ${E}:`,A)}}}else console.log("No real users found in user list - all appear to be placeholders")}r(C)}catch(g){u(g.message)}finally{s(!1)}})()},[t]),{userComments:e,chatRecords:n,loading:o,error:l,refresh:()=>{t!=null&&t.did&&(t!=null&&t.apiConfig)&&(r([]),i([]))}}}function tbe(){const[t,e]=ye.useState({isTopPage:!0,rkey:null,url:null});return ye.useEffect(()=>{const r=window.location.pathname,n=window.location.href,i=r.match(/\/posts\/([^/]+)\/?$/);if(i){const o=i[1].replace(/\.html$/,"");e({isTopPage:!1,rkey:o,url:n})}else e({isTopPage:!0,rkey:null,url:n})},[]),t}function rbe({user:t,onLogin:e,onLogout:r,loading:n}){const[i,o]=ye.useState(""),[s,l]=ye.useState(!1),u=async c=>{if(c.preventDefault(),!(!i.trim()||s)){l(!0);try{await e(i.trim())}catch(d){console.error("Login failed:",d),alert("ログインに失敗しました: "+d.message)}finally{l(!1)}}};return n?P.jsx("div",{children:"認証状態を確認中..."}):t?P.jsxs("div",{className:"user-section",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t.avatar&&P.jsx("img",{src:t.avatar,alt:"Profile",className:"user-avatar",style:{width:"24px",height:"24px"}}),P.jsxs("div",{children:[P.jsx("div",{className:"user-display-name",style:{fontSize:"14px",fontWeight:"700"},children:t.displayName}),P.jsxs("div",{className:"user-handle",style:{fontSize:"12px"},children:["@",t.handle]})]}),P.jsx("button",{onClick:r,className:"btn btn-danger btn-sm",children:"ログアウト"})]}):P.jsxs("div",{className:"auth-section search-bar-layout",children:[P.jsx("input",{type:"text",value:i,onChange:c=>o(c.target.value),placeholder:"your.handle.com",disabled:s,className:"handle-input",onKeyPress:c=>{c.key==="Enter"&&u(c)}}),P.jsx("button",{type:"button",onClick:u,disabled:s||!i.trim(),className:"auth-button",children:s?"認証中...":P.jsx("i",{className:"fab fa-bluesky"})})]})}const TA=new Map,nbe=30*60*1e3;async function ibe(t){if(!t)return!1;try{return(await fetch(t,{method:"HEAD"})).ok}catch(e){return Ge.warn("Avatar URL check failed:",e),!1}}async function obe(t){try{const e=await aK(t);return(await(await fetch(`${e}/xrpc/com.atproto.repo.describeRepo?repo=${t}`)).json()).did}catch(e){throw Ge.error("Failed to get DID for handle:",t,e),e}}async function sbe(t,e){if(t&&t.includes("test-"))return Ge.log("Skipping profile fetch for test DID:",t),null;try{const r=await aK(e),i=Xu(r).bsky;Ge.log("Getting profile for DID:",t,"using public API:",i);const o=await fetch(`${i}/xrpc/app.bsky.actor.getProfile?actor=${t}`);if(!o.ok)throw new Error(`Profile API error: ${o.status} ${o.statusText}`);const s=await o.json();return Ge.log("Profile data received:",s),s}catch(r){throw Ge.error("Failed to get profile for DID:",t,r),r}}async function abe(t,e){const r=`${t}:${e||"no-did"}`,n=TA.get(r);if(n&&Date.now()-n.timestamp<nbe)return Ge.log("Using cached avatar for:",t),n.avatar;try{Ge.log("Fetching fresh avatar for handle:",t,"with DID:",e);let i=e;i||(Ge.log("No DID provided, fetching from handle:",t),i=await obe(t),Ge.log("Got DID from handle:",i));const o=await sbe(i,t);if(!o)return null;const s=o.avatar||null;return TA.set(r,{avatar:s,timestamp:Date.now(),profile:{displayName:o.displayName,handle:o.handle}}),Ge.log("Fresh avatar fetched for:",t,"Avatar URL:",s),s}catch(i){return Ge.error("Failed to fetch fresh avatar for:",t,"Error:",i),null}}async function lbe(t){var o;const e=(o=t==null?void 0:t.value)==null?void 0:o.author;if(!(e!=null&&e.handle))return Ge.warn("No handle found in record author"),null;const{handle:r,did:n,avatar:i}=e;if(i){if(await ibe(i))return Ge.log("Using avatar from record:",i),i;Ge.log("Record avatar is broken, fetching fresh:",i)}return await abe(r,n)}function ube({record:t,size:e=40,className:r="avatar"}){var C,y,m;const[n,i]=ye.useState((y=(C=t==null?void 0:t.value)==null?void 0:C.author)==null?void 0:y.avatar),[o,s]=ye.useState(!1),[l,u]=ye.useState(!1),c=(m=t==null?void 0:t.value)==null?void 0:m.author,d=c==null?void 0:c.handle,f=(c==null?void 0:c.displayName)||d;ye.useEffect(()=>{(!n||l)&&h()},[t,l]);const h=async()=>{if(!(!t||o)){s(!0);try{const E=await lbe(t);i(E),u(!1)}catch(E){Ge.error("Failed to fetch valid avatar:",E),u(!0)}finally{s(!1)}}},g=()=>{u(!0),h()},b=()=>{u(!1)};if(o)return P.jsx("div",{className:`${r} avatar-loading`,style:{width:e,height:e,backgroundColor:"#f0f0f0",borderRadius:"50%",animation:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"}});if(n&&!l)return P.jsx("img",{src:n,alt:`${f} avatar`,className:r,style:{width:e,height:e,borderRadius:"50%",objectFit:"cover"},onError:g,onLoad:b});const w=f?f.charAt(0).toUpperCase():"?";return P.jsx("div",{className:`${r} avatar-fallback`,style:{width:e,height:e,borderRadius:"50%",backgroundColor:"#ddd",display:"flex",alignItems:"center",justifyContent:"center",fontSize:e*.4,fontWeight:"bold",color:"#666"},children:w})}function Jp({title:t,records:e,apiConfig:r,showTitle:n=!0,user:i=null,agent:o=null,onRecordDeleted:s=null}){const[l,u]=ye.useState(new Set),[c,d]=ye.useState(new Set),f=b=>{const w=new Set(l);w.has(b)?w.delete(b):w.add(b),u(w)},h=async(b,w)=>{if(!(!i||!o||!b.uri||!window.confirm("このレコードを削除しますか?"))){d(y=>new Set([...y,w]));try{const y=b.uri.split("/"),m=y[2],E=y[3],A=y[4];await o.com.atproto.repo.deleteRecord({repo:m,collection:E,rkey:A}),s&&s()}catch(y){alert(`削除に失敗しました: ${y.message}`)}finally{d(y=>{const m=new Set(y);return m.delete(w),m})}}},g=b=>{var w;return i&&o&&b.uri&&((w=b.value.author)==null?void 0:w.did)===i.did};return!e||e.length===0?P.jsxs("section",{children:[n&&P.jsxs("h3",{children:[t," (0)"]}),P.jsx("p",{children:"レコードがありません"})]}):P.jsxs("section",{children:[n&&P.jsxs("h3",{children:[t," (",e.length,")"]}),e.map((b,w)=>{var C,y,m,E,A;return P.jsxs("div",{className:"record-item",children:[P.jsxs("div",{className:"record-header",children:[P.jsx(ube,{record:b,size:40}),P.jsxs("div",{className:"user-info",children:[P.jsx("div",{className:"display-name",children:((C=b.value.author)==null?void 0:C.displayName)||((y=b.value.author)==null?void 0:y.handle)}),P.jsx("div",{className:"handle",children:P.jsxs("a",{href:`${(r==null?void 0:r.web)||"https://bsky.app"}/profile/${(m=b.value.author)==null?void 0:m.did}`,target:"_blank",rel:"noopener noreferrer",className:"handle-link",children:["@",(E=b.value.author)==null?void 0:E.handle]})}),P.jsx("div",{className:"timestamp",children:new Date(b.value.createdAt).toLocaleString()})]}),P.jsxs("div",{className:"record-actions",children:[P.jsx("button",{onClick:()=>f(w),className:`btn btn-sm ${l.has(w)?"btn-outline":"btn-primary"}`,title:"Show/Hide JSON",children:l.has(w)?"hide":"json"}),g(b)&&P.jsx("button",{onClick:()=>h(b,w),disabled:c.has(w),className:"btn btn-danger btn-sm",title:"Delete Record",children:c.has(w)?"deleting...":"delete"})]})]}),l.has(w)&&P.jsxs("div",{className:"json-display",children:[P.jsx("div",{className:"json-header",children:"json data"}),P.jsx("pre",{className:"json-content",children:JSON.stringify(b,null,2)})]}),P.jsx("div",{className:"record-content",children:b.value.text||b.value.content}),P.jsx("div",{className:"record-meta",children:((A=b.value.post)==null?void 0:A.url)&&P.jsx("a",{href:b.value.post.url,target:"_blank",rel:"noopener noreferrer",className:"record-url",children:b.value.post.url})})]},w)})]})}function Zp({count:t=3,showTitle:e=!1}){return P.jsxs("div",{className:"loading-skeleton",children:[e&&P.jsx("div",{className:"skeleton-title",children:P.jsx("div",{className:"skeleton-line title"})}),Array(t).fill(0).map((r,n)=>P.jsxs("div",{className:"skeleton-item",children:[P.jsx("div",{className:"skeleton-avatar"}),P.jsxs("div",{className:"skeleton-content",children:[P.jsx("div",{className:"skeleton-line name"}),P.jsx("div",{className:"skeleton-line text"}),P.jsx("div",{className:"skeleton-line text short"}),P.jsx("div",{className:"skeleton-line meta"})]})]},n)),P.jsx("style",{jsx:!0,children:`
.loading-skeleton {
padding: 10px;
}
.skeleton-title {
margin-bottom: 20px;
}
.skeleton-item {
display: flex;
padding: 15px;
border: 1px solid #eee;
margin: 10px 0;
border-radius: 8px;
background: #fafafa;
}
.skeleton-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: skeleton-loading 1.5s infinite;
margin-right: 12px;
flex-shrink: 0;
}
.skeleton-content {
flex: 1;
min-width: 0;
}
.skeleton-line {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: skeleton-loading 1.5s infinite;
margin-bottom: 8px;
border-radius: 4px;
}
.skeleton-line.title {
height: 20px;
width: 30%;
}
.skeleton-line.name {
height: 14px;
width: 25%;
}
.skeleton-line.text {
height: 12px;
width: 90%;
}
.skeleton-line.text.short {
width: 60%;
}
.skeleton-line.meta {
height: 10px;
width: 40%;
margin-bottom: 0;
}
@keyframes skeleton-loading {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
`})]})}function cbe({langRecords:t,commentRecords:e,userComments:r,chatRecords:n,baseRecords:i,apiConfig:o,pageContext:s,user:l=null,agent:u=null,onRecordDeleted:c=null}){const[d,f]=ye.useState("lang"),h=y=>s.isTopPage?y.slice(0,3):y.filter(m=>{var A,L,D;const E=(L=(A=m.value)==null?void 0:A.post)==null?void 0:L.url;if(!E)return!1;try{return((D=new URL(E).pathname.split("/").pop())==null?void 0:D.replace(/\.html$/,""))===s.rkey}catch{return!1}}),g=h(t),b=h(e),w=h(r||[]);h(n||[]);const C=h(i||[]);return P.jsxs("div",{className:"record-tabs",children:[P.jsxs("div",{className:"tab-header",children:[P.jsxs("button",{className:`tab-btn ${d==="lang"?"active":""}`,onClick:()=>f("lang"),children:["Lang (",g.length,")"]}),P.jsxs("button",{className:`tab-btn ${d==="comment"?"active":""}`,onClick:()=>f("comment"),children:["Comment (",b.length,")"]}),P.jsxs("button",{className:`tab-btn ${d==="collection"?"active":""}`,onClick:()=>f("collection"),children:["Posts (",C.length,")"]}),P.jsxs("button",{className:`tab-btn ${d==="users"?"active":""}`,onClick:()=>f("users"),children:["Users (",w.length,")"]})]}),P.jsxs("div",{className:"tab-content",children:[d==="lang"&&(t?P.jsx(Jp,{title:"",records:g,apiConfig:o,user:l,agent:u,onRecordDeleted:c,showTitle:!1}):P.jsx(Zp,{count:3,showTitle:!0})),d==="comment"&&(e?P.jsx(Jp,{title:"",records:b,apiConfig:o,user:l,agent:u,onRecordDeleted:c,showTitle:!1}):P.jsx(Zp,{count:3,showTitle:!0})),d==="collection"&&(i?P.jsx(Jp,{title:"",records:C,apiConfig:o,user:l,agent:u,onRecordDeleted:c,showTitle:!1}):P.jsx(Zp,{count:2,showTitle:!0})),d==="users"&&(r?P.jsx(Jp,{title:"",records:w,apiConfig:o,user:l,agent:u,onRecordDeleted:c,showTitle:!1}):P.jsx(Zp,{count:3,showTitle:!0}))]})]})}function dbe({user:t,agent:e,onCommentPosted:r}){const[n,i]=ye.useState(""),[o,s]=ye.useState(!1),[l,u]=ye.useState(null),c=async d=>{var f,h;if(d.preventDefault(),!!n.trim()){s(!0),u(null);try{const g=window.location.href,b=new Date().toISOString(),w={repo:t.did,collection:Oe.collection,rkey:`comment-${Date.now()}`,record:{$type:Oe.collection,url:g,post:{url:g,date:b,slug:((f=g.match(/\/posts\/([^/]+)/))==null?void 0:f[1])||((h=new URL(g).pathname.split("/").pop())==null?void 0:h.replace(/\.html$/,""))||"",tags:[],title:document.title||"Comment",language:"ja"},text:n.trim(),type:"comment",author:{did:t.did,handle:t.handle,displayName:t.displayName,avatar:t.avatar},createdAt:b}};await Lr.putRecord(null,w,e),eo.invalidateCache(Oe.collection),i(""),r&&r()}catch(g){u(g.message)}finally{s(!1)}}};return t?P.jsxs("div",{children:[P.jsx("h3",{children:"コメントを投稿"}),P.jsxs("form",{onSubmit:c,children:[P.jsxs("div",{className:"form-group",style:{marginBottom:"12px",padding:"8px",backgroundColor:"var(--background-secondary)",borderRadius:"4px",fontSize:"0.9em"},children:[P.jsx("strong",{children:"投稿先:"})," ",window.location.href]}),P.jsxs("div",{className:"form-group",children:[P.jsx("label",{htmlFor:"comment-text",children:"コメント:"}),P.jsx("textarea",{id:"comment-text",value:n,onChange:d=>i(d.target.value),placeholder:"コメントを入力してください...",rows:4,required:!0,disabled:o,className:"form-input form-textarea"})]}),l&&P.jsxs("div",{className:"error-message",children:["エラー: ",l]}),P.jsx("div",{className:"form-actions",children:P.jsx("button",{type:"submit",disabled:o||!n.trim(),className:"btn btn-primary",children:o?"投稿中...":"コメントを投稿"})})]})]}):P.jsx("div",{style:{textAlign:"center",padding:"40px",color:"var(--text-secondary)"},children:P.jsx("p",{children:"ログインしてコメントを投稿"})})}function pbe(){return P.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"50vh",padding:"40px",textAlign:"center"},children:[P.jsx("div",{style:{width:"50px",height:"50px",border:"4px solid #f3f3f3",borderTop:"4px solid #667eea",borderRadius:"50%",animation:"spin 1s linear infinite",marginBottom:"20px"}}),P.jsx("h2",{style:{color:"#333",marginBottom:"12px"},children:"OAuth認証処理中..."}),P.jsx("p",{style:{color:"#666",fontSize:"14px"},children:"認証が完了しましたら自動で元のページに戻ります"}),P.jsx("style",{jsx:!0,children:`
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
`})]})}function fbe(){const{user:t,agent:e,loading:r,login:n,logout:i}=Wge(),{adminData:o,langRecords:s,commentRecords:l,loading:u,error:c,retryCount:d,refresh:f}=Yge(),{userComments:h,chatRecords:g,loading:b,refresh:w}=ebe(o),C=tbe(),[y,m]=ye.useState(!1),[E,A]=ye.useState(!1),L=!1;return ye.useEffect(()=>{const B=pe=>{const{question:ee}=pe.detail;ee&&o&&t&&e&&m(!0)},j=()=>{o!=null&&o.profile&&window.dispatchEvent(new CustomEvent("aiProfileLoaded",{detail:{did:o.did,handle:o.profile.handle,displayName:o.profile.displayName,avatar:o.profile.avatar}}))};return window.addEventListener("postAIQuestion",B),o!=null&&o.profile&&j(),()=>{window.removeEventListener("postAIQuestion",B)}},[o,t,e]),window.location.search.includes("code=")?P.jsx(pbe,{}):r||u||b?P.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:"40px",textAlign:"center"},children:[P.jsx("div",{style:{width:"40px",height:"40px",border:"4px solid #f3f3f3",borderTop:"4px solid #667eea",borderRadius:"50%",animation:"spin 1s linear infinite",marginBottom:"16px"}}),P.jsx("p",{style:{color:"#666",margin:0},children:"読み込み中..."}),P.jsx("style",{jsx:!0,children:`
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
`})]}):c?P.jsxs("div",{style:{padding:"20px",textAlign:"center"},children:[P.jsx("h1",{children:"エラー"}),P.jsxs("div",{style:{background:"#fee",color:"#c33",padding:"15px",borderRadius:"5px",margin:"20px auto",maxWidth:"500px",border:"1px solid #fcc"},children:[P.jsxs("p",{children:[P.jsx("strong",{children:"エラー:"})," ",c]}),d>0&&P.jsx("p",{children:P.jsxs("small",{children:["自動リトライ中... (",d,"/3)"]})})]}),P.jsx("button",{onClick:f,style:{background:"#007bff",color:"white",border:"none",padding:"10px 20px",borderRadius:"5px",cursor:"pointer",fontSize:"16px"},children:"再読み込み"})]}):P.jsxs("div",{className:"app",children:[P.jsx("header",{className:"oauth-app-header",children:P.jsxs("div",{className:"oauth-header-content",children:[t&&P.jsxs("div",{className:"oauth-user-profile",children:[P.jsx("div",{className:"profile-avatar-section",children:t.avatar?P.jsx("img",{src:t.avatar,alt:t.displayName||t.handle,className:"profile-avatar"}):P.jsx("div",{className:"profile-avatar-fallback",children:(t.displayName||t.handle||"?").charAt(0).toUpperCase()})}),P.jsxs("div",{className:"profile-info",children:[P.jsx("div",{className:"profile-display-name",children:t.displayName||t.handle}),P.jsxs("div",{className:"profile-handle",children:["@",t.handle]}),P.jsx("div",{className:"profile-did",children:t.did})]})]}),P.jsx("div",{className:"oauth-header-actions",children:P.jsx(rbe,{user:t,onLogin:n,onLogout:i,loading:r})})]})}),P.jsx("div",{className:"main-content",children:P.jsxs("div",{className:"content-area",children:[P.jsx("div",{className:"comment-form",children:P.jsx(dbe,{user:t,agent:e,onCommentPosted:()=>{f==null||f(),w==null||w()}})}),P.jsx(cbe,{langRecords:s,commentRecords:l,userComments:h,chatRecords:g,baseRecords:o.records,apiConfig:o.apiConfig,pageContext:C,user:t,agent:e,onRecordDeleted:()=>{f==null||f(),w==null||w()}}),L,L]})})]})}Hg.createRoot(document.getElementById("comment-atproto")).render(P.jsx(fbe,{}));