@krapht/ork 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +7 -0
- package/dist/__build_info__-CXXMLvjt.mjs +104 -0
- package/dist/bin.mjs +859 -3037
- package/dist/context-BFGC_C02.mjs +435 -0
- package/dist/find-BcvhT6UN.mjs +47 -0
- package/dist/format-DqpObyMl.mjs +553 -0
- package/dist/in-a-run-BbLhZOFW.mjs +22 -0
- package/dist/limits-BKYAmqCR.mjs +44 -0
- package/dist/mcp-BWsdQyri.mjs +91 -0
- package/dist/output-Q2EdeVUt.mjs +856 -0
- package/dist/pause-DKACDfV1.mjs +65 -0
- package/dist/relay-CbK-Wme9.mjs +122 -0
- package/dist/report-DK4LGqwF.mjs +129 -0
- package/dist/send-C6yr04Fe.mjs +163 -0
- package/dist/{src-DAsOYtoR.mjs → src-CZOVF2yU.mjs} +496 -193
- package/dist/src-Cz1yOUTg.mjs +11841 -0
- package/dist/src-D5ruZFgD.mjs +1973 -0
- package/dist/src-DtN1k-B3.mjs +1899 -0
- package/dist/ui/THIRD_PARTY_LICENSES.txt +631 -0
- package/dist/ui/assets/app-BlDdP396.js +61 -0
- package/dist/ui/assets/app-C722xNZ3.css +1 -0
- package/dist/ui/assets/geist-mono-cyrillic-400-normal-C51Di1Mf.woff2 +0 -0
- package/dist/ui/assets/geist-mono-cyrillic-400-normal-CPJFfJgk.woff +0 -0
- package/dist/ui/assets/geist-mono-cyrillic-500-normal-D2cXvDHF.woff2 +0 -0
- package/dist/ui/assets/geist-mono-cyrillic-500-normal-DfuvdVgn.woff +0 -0
- package/dist/ui/assets/geist-mono-cyrillic-ext-400-normal-CkxHOdCb.woff +0 -0
- package/dist/ui/assets/geist-mono-cyrillic-ext-400-normal-XB2BPmDK.woff2 +0 -0
- package/dist/ui/assets/geist-mono-cyrillic-ext-500-normal-BY1KTvO5.woff +0 -0
- package/dist/ui/assets/geist-mono-cyrillic-ext-500-normal-C7aYOB1D.woff2 +0 -0
- package/dist/ui/assets/geist-mono-latin-400-normal-B2yvC1Cq.woff +0 -0
- package/dist/ui/assets/geist-mono-latin-400-normal-DTRLJnHl.woff2 +0 -0
- package/dist/ui/assets/geist-mono-latin-500-normal-D-GG86Jb.woff +0 -0
- package/dist/ui/assets/geist-mono-latin-500-normal-YINYabwD.woff2 +0 -0
- package/dist/ui/assets/geist-mono-latin-ext-400-normal-CfzLURNc.woff +0 -0
- package/dist/ui/assets/geist-mono-latin-ext-400-normal-DI-rJ0UV.woff2 +0 -0
- package/dist/ui/assets/geist-mono-latin-ext-500-normal-Buglb9-a.woff2 +0 -0
- package/dist/ui/assets/geist-mono-latin-ext-500-normal-CrWEgvU_.woff +0 -0
- package/dist/ui/assets/geist-mono-symbols2-400-normal-BS9BGVxz.woff2 +0 -0
- package/dist/ui/assets/geist-mono-symbols2-400-normal-DjbiTEEA.woff +0 -0
- package/dist/ui/assets/geist-mono-symbols2-500-normal-CmnCPGa0.woff +0 -0
- package/dist/ui/assets/geist-mono-symbols2-500-normal-Q_ksOahU.woff2 +0 -0
- package/dist/ui/assets/geist-mono-vietnamese-400-normal-CKEaXIlx.woff2 +0 -0
- package/dist/ui/assets/geist-mono-vietnamese-400-normal-CZEPLOgu.woff +0 -0
- package/dist/ui/assets/geist-mono-vietnamese-500-normal-Bs29RrUZ.woff2 +0 -0
- package/dist/ui/assets/geist-mono-vietnamese-500-normal-Dx9-epDo.woff +0 -0
- package/dist/ui/assets/geist-sans-latin-400-normal-BOaIZNA2.woff +0 -0
- package/dist/ui/assets/geist-sans-latin-400-normal-gapTbOY8.woff2 +0 -0
- package/dist/ui/assets/geist-sans-latin-500-normal-CN2lyvyL.woff +0 -0
- package/dist/ui/assets/geist-sans-latin-500-normal-uokXdC-Q.woff2 +0 -0
- package/dist/ui/assets/geist-sans-latin-600-normal-CA1yjETN.woff +0 -0
- package/dist/ui/assets/geist-sans-latin-600-normal-DFOURf8L.woff2 +0 -0
- package/dist/ui/assets/index-BiO54L90.css +1 -0
- package/dist/ui/assets/index-BoG6O-Lp.js +10 -0
- package/dist/ui/assets/theme-3xH5jxKs.js +1 -0
- package/dist/ui/favicon.ico +0 -0
- package/dist/ui/favicon.svg +4 -0
- package/dist/ui/index.html +30 -0
- package/dist/ui/ork-wordmark-small-on-light.svg +4 -0
- package/dist/ui/ork-wordmark-small.svg +4 -0
- package/dist/ui-CZS1XKla.mjs +160 -0
- package/dist/usage-BIjf9Xdt.mjs +418 -0
- package/dist/watch-B8o4Szd_.mjs +394 -0
- package/package.json +4 -2
- package/dist/src-CJ_zF0Zj.mjs +0 -5433
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var B={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=B,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),u=o(((e,t)=>{t.exports=l()})),d=c(u(),1),f=d.createContext(void 0),p={disableStyleElements:!1};function m(){return d.useContext(f)??p}var h=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),g=o(((e,t)=>{t.exports=h()})),_=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),v=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()}));function y(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function b(e,t=`|`){return e.map(e=>H(e)).join(t)}function x(e,t){return typeof t==`bigint`?t.toString():t}var S=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function C(e){return new S(e)}function w(e){return e==null}function T(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function E(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function D(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function O(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function k(e){return O(e._zod.def)??e._zod.def.shape}function A(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return D(this,t,e),e},enumerable:!0,configurable:!0})}function j(e,t,n){t in e?D(e,t,n):e[t]=n}function M(e,t,n,r){let i=k(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?A(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):j(e,a,r?r(n.value,a):n.value))}}function N(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?A(e,n,()=>t[n]):j(e,n,r.value))}}function P(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function F(e){return JSON.stringify(e)}function I(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var L=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function R(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var z=C(()=>{if(Q.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function B(e){if(R(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return R(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ee(e){return B(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var te=new Set([`string`,`number`,`symbol`]);function ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function V(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function re(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function H(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ie(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ae={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},oe={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function se(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return M(i,e,U(e,t)),V(e,P(n,{shape:i,checks:[]}))}function U(e,t){let n=k(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ce(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(U(e,t)),a={};return M(a,e,Reflect.ownKeys(k(e)).filter(e=>!i.has(e))),V(e,P(n,{shape:a,checks:[]}))}function le(e,t){if(!B(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=k(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return V(e,P(e._zod.def,{shape:W(e,t)}))}function W(e,t){let n={};return M(n,e,Reflect.ownKeys(k(e))),N(n,t),n}function ue(e,t){if(!B(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return V(e,P(e._zod.def,{shape:W(e,t)}))}function de(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return M(n,e,Reflect.ownKeys(k(e))),M(n,t,Reflect.ownKeys(k(t))),V(e,P(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function fe(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(U(t,n)):void 0,o={};return M(o,t,Reflect.ownKeys(k(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),V(t,P(t._zod.def,{shape:o,checks:[]}))}function pe(e,t,n){let r=n?new Set(U(t,n)):void 0,i={};return M(i,t,Reflect.ownKeys(k(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),V(t,P(t._zod.def,{shape:i}))}function me(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function he(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ge(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function G(e){return typeof e==`string`?e:e?.message}function _e(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function ve(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function ye(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:G(e.inst?._zod.def?.error?.(e))??G(a?.(e))??G(t?.error?.(e))??G(n.customError?.(e))??G(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var be=/[\uD800-\uDBFF]/;function xe(e){let t=e.length;if(!be.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Se(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ce(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function we(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Te(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Oe(e,n,r.value)}}function K(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ee(e,t,n){return K(e,t,n,!1)}function De(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return K(this,n,r(this))},set(e){K(this,n,e)}})}return t}function Oe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:K(this,t,n.bind(this))},set(e){K(this,t,e)}})}function ke(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var q,J=!1,Ae={configurable:!0,get(){J=!0}};function je(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&q!==e._zod?q=void 0:(q=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ae);let e=J;J=!1;try{let r=n(this);return J?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),J||=e,r}catch(n){throw delete this[t],J||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Me(e,t,n,r){let i=ke(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Ne=`~constantCatch`;function Pe(e){let t=()=>e;return t[Ne]=!0,t}var Y,X={value:void 0,enumerable:!1},Z=`captureStackTrace`in Error?Error:null;function Fe(e){let t=Z;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Z=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Ie(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){X.value=new a(r);try{Object.defineProperty(n,"_zod",X)}finally{X.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Te(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Fe(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Le=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Re=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Y=globalThis).__zod_globalConfig??(Y.__zod_globalConfig={});var Q=globalThis.__zod_globalConfig;function ze(e){return e&&Object.assign(Q,e),Q}var Be=`(prefers-color-scheme: light)`,Ve=`(prefers-contrast: more)`,He=(e,t)=>{let n=t(Be)?`light`:`dark`;return{theme:e===`system`?n:e,contrast:t(Ve)?`more`:`standard`}},Ue=(e,t)=>{e.dataset.theme=t.theme,e.dataset.contrast=t.contrast},$=(e,t)=>{Ue(e.document.documentElement,He(t,t=>e.matchMedia(t).matches))},We=(e,t)=>{let n=[Be,Ve].map(t=>e.matchMedia(t)),r=()=>{$(e,t())};r();for(let e of n)e.addEventListener(`change`,r);return()=>{for(let e of n)e.removeEventListener(`change`,r)}};export{_e as $,Ee as A,w as B,ne as C,E as D,ye as E,b as F,fe as G,ie as H,x as I,te as J,se as K,de as L,R as M,B as N,y as O,we as P,ee as Q,P as R,F as S,le as T,K as U,ce as V,Ce as W,pe as X,O as Y,ue as Z,V as _,Ie as a,m as at,je as b,oe as c,c as ct,z as d,I as et,D as f,T as g,L as h,Re as i,f as it,Me as j,Se as k,ae as l,C as m,We as n,v as nt,ze as o,u as ot,ve as p,ge as q,Le as r,g as rt,Q as s,o as st,$ as t,H as tt,me as u,xe as v,he as w,De as x,Pe as y,re as z};
|
|
Binary file
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" shape-rendering="crispEdges">
|
|
2
|
+
<rect width="16" height="16" rx="3" fill="#0a0d0b" shape-rendering="geometricPrecision"/>
|
|
3
|
+
<rect x="3" y="4" width="1" height="1" fill="#3dff8a"/><rect x="4" y="4" width="1" height="1" fill="#3dff8a"/><rect x="4" y="5" width="1" height="1" fill="#3dff8a"/><rect x="5" y="5" width="1" height="1" fill="#3dff8a"/><rect x="5" y="6" width="1" height="1" fill="#3dff8a"/><rect x="6" y="6" width="1" height="1" fill="#3dff8a"/><rect x="6" y="7" width="1" height="1" fill="#3dff8a"/><rect x="7" y="7" width="1" height="1" fill="#3dff8a"/><rect x="10" y="7" width="1" height="1" fill="#ffb000"/><rect x="11" y="7" width="1" height="1" fill="#ffb000"/><rect x="12" y="7" width="1" height="1" fill="#ffb000"/><rect x="13" y="7" width="1" height="1" fill="#ffb000"/><rect x="7" y="8" width="1" height="1" fill="#3dff8a"/><rect x="8" y="8" width="1" height="1" fill="#3dff8a"/><rect x="10" y="8" width="1" height="1" fill="#ffb000"/><rect x="11" y="8" width="1" height="1" fill="#ffb000"/><rect x="12" y="8" width="1" height="1" fill="#ffb000"/><rect x="13" y="8" width="1" height="1" fill="#ffb000"/><rect x="6" y="9" width="1" height="1" fill="#3dff8a"/><rect x="7" y="9" width="1" height="1" fill="#3dff8a"/><rect x="10" y="9" width="1" height="1" fill="#ffb000"/><rect x="11" y="9" width="1" height="1" fill="#ffb000"/><rect x="12" y="9" width="1" height="1" fill="#ffb000"/><rect x="13" y="9" width="1" height="1" fill="#ffb000"/><rect x="5" y="10" width="1" height="1" fill="#3dff8a"/><rect x="6" y="10" width="1" height="1" fill="#3dff8a"/><rect x="10" y="10" width="1" height="1" fill="#ffb000"/><rect x="11" y="10" width="1" height="1" fill="#ffb000"/><rect x="12" y="10" width="1" height="1" fill="#ffb000"/><rect x="13" y="10" width="1" height="1" fill="#ffb000"/><rect x="4" y="11" width="1" height="1" fill="#3dff8a"/><rect x="5" y="11" width="1" height="1" fill="#3dff8a"/><rect x="10" y="11" width="1" height="1" fill="#ffb000"/><rect x="11" y="11" width="1" height="1" fill="#ffb000"/><rect x="12" y="11" width="1" height="1" fill="#ffb000"/><rect x="13" y="11" width="1" height="1" fill="#ffb000"/><rect x="3" y="12" width="1" height="1" fill="#3dff8a"/><rect x="4" y="12" width="1" height="1" fill="#3dff8a"/><rect x="10" y="12" width="1" height="1" fill="#ffb000"/><rect x="11" y="12" width="1" height="1" fill="#ffb000"/><rect x="12" y="12" width="1" height="1" fill="#ffb000"/><rect x="13" y="12" width="1" height="1" fill="#ffb000"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html
|
|
3
|
+
lang="en"
|
|
4
|
+
data-theme="dark"
|
|
5
|
+
data-contrast="standard"
|
|
6
|
+
>
|
|
7
|
+
<head>
|
|
8
|
+
<meta charset="utf-8" />
|
|
9
|
+
<meta
|
|
10
|
+
name="viewport"
|
|
11
|
+
content="width=device-width, initial-scale=1"
|
|
12
|
+
/>
|
|
13
|
+
<meta
|
|
14
|
+
name="color-scheme"
|
|
15
|
+
content="dark light"
|
|
16
|
+
/>
|
|
17
|
+
<title>Ork</title>
|
|
18
|
+
<link
|
|
19
|
+
rel="icon"
|
|
20
|
+
href="/favicon.svg"
|
|
21
|
+
type="image/svg+xml"
|
|
22
|
+
/>
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-BoG6O-Lp.js"></script>
|
|
24
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-3xH5jxKs.js">
|
|
25
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BiO54L90.css">
|
|
26
|
+
</head>
|
|
27
|
+
<body>
|
|
28
|
+
<div id="root"></div>
|
|
29
|
+
</body>
|
|
30
|
+
</html>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 55 15" shape-rendering="crispEdges" role="img" aria-label="Ork">
|
|
2
|
+
<title>Ork</title>
|
|
3
|
+
<rect x="0" y="0" width="3" height="3" fill="#00753b"/><rect x="2" y="2" width="3" height="3" fill="#00753b"/><rect x="4" y="4" width="3" height="3" fill="#00753b"/><rect x="10" y="4" width="3" height="3" fill="#ffb000"/><rect x="12" y="4" width="3" height="3" fill="#ffb000"/><rect x="14" y="4" width="3" height="3" fill="#ffb000"/><rect x="6" y="6" width="3" height="3" fill="#00753b"/><rect x="10" y="6" width="3" height="3" fill="#ffb000"/><rect x="12" y="6" width="3" height="3" fill="#ffb000"/><rect x="14" y="6" width="3" height="3" fill="#ffb000"/><rect x="4" y="8" width="3" height="3" fill="#00753b"/><rect x="10" y="8" width="3" height="3" fill="#ffb000"/><rect x="12" y="8" width="3" height="3" fill="#ffb000"/><rect x="14" y="8" width="3" height="3" fill="#ffb000"/><rect x="2" y="10" width="3" height="3" fill="#00753b"/><rect x="10" y="10" width="3" height="3" fill="#ffb000"/><rect x="12" y="10" width="3" height="3" fill="#ffb000"/><rect x="14" y="10" width="3" height="3" fill="#ffb000"/><rect x="0" y="12" width="3" height="3" fill="#00753b"/><rect x="10" y="12" width="3" height="3" fill="#ffb000"/><rect x="12" y="12" width="3" height="3" fill="#ffb000"/><rect x="14" y="12" width="3" height="3" fill="#ffb000"/><rect x="22" y="4" width="3" height="3" fill="#00753b"/><rect x="24" y="4" width="3" height="3" fill="#00753b"/><rect x="26" y="4" width="3" height="3" fill="#00753b"/><rect x="20" y="6" width="3" height="3" fill="#00753b"/><rect x="28" y="6" width="3" height="3" fill="#00753b"/><rect x="20" y="8" width="3" height="3" fill="#00753b"/><rect x="28" y="8" width="3" height="3" fill="#00753b"/><rect x="20" y="10" width="3" height="3" fill="#00753b"/><rect x="28" y="10" width="3" height="3" fill="#00753b"/><rect x="22" y="12" width="3" height="3" fill="#00753b"/><rect x="24" y="12" width="3" height="3" fill="#00753b"/><rect x="26" y="12" width="3" height="3" fill="#00753b"/><rect x="32" y="4" width="3" height="3" fill="#00753b"/><rect x="36" y="4" width="3" height="3" fill="#00753b"/><rect x="38" y="4" width="3" height="3" fill="#00753b"/><rect x="32" y="6" width="3" height="3" fill="#00753b"/><rect x="34" y="6" width="3" height="3" fill="#00753b"/><rect x="40" y="6" width="3" height="3" fill="#00753b"/><rect x="32" y="8" width="3" height="3" fill="#00753b"/><rect x="32" y="10" width="3" height="3" fill="#00753b"/><rect x="32" y="12" width="3" height="3" fill="#00753b"/><rect x="44" y="0" width="3" height="3" fill="#00753b"/><rect x="44" y="2" width="3" height="3" fill="#00753b"/><rect x="44" y="4" width="3" height="3" fill="#00753b"/><rect x="50" y="4" width="3" height="3" fill="#00753b"/><rect x="44" y="6" width="3" height="3" fill="#00753b"/><rect x="48" y="6" width="3" height="3" fill="#00753b"/><rect x="44" y="8" width="3" height="3" fill="#00753b"/><rect x="46" y="8" width="3" height="3" fill="#00753b"/><rect x="44" y="10" width="3" height="3" fill="#00753b"/><rect x="48" y="10" width="3" height="3" fill="#00753b"/><rect x="44" y="12" width="3" height="3" fill="#00753b"/><rect x="50" y="12" width="3" height="3" fill="#00753b"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 55 15" shape-rendering="crispEdges" role="img" aria-label="Ork">
|
|
2
|
+
<title>Ork</title>
|
|
3
|
+
<rect x="0" y="0" width="3" height="3" fill="#3dff8a"/><rect x="2" y="2" width="3" height="3" fill="#3dff8a"/><rect x="4" y="4" width="3" height="3" fill="#3dff8a"/><rect x="10" y="4" width="3" height="3" fill="#ffb000"/><rect x="12" y="4" width="3" height="3" fill="#ffb000"/><rect x="14" y="4" width="3" height="3" fill="#ffb000"/><rect x="6" y="6" width="3" height="3" fill="#3dff8a"/><rect x="10" y="6" width="3" height="3" fill="#ffb000"/><rect x="12" y="6" width="3" height="3" fill="#ffb000"/><rect x="14" y="6" width="3" height="3" fill="#ffb000"/><rect x="4" y="8" width="3" height="3" fill="#3dff8a"/><rect x="10" y="8" width="3" height="3" fill="#ffb000"/><rect x="12" y="8" width="3" height="3" fill="#ffb000"/><rect x="14" y="8" width="3" height="3" fill="#ffb000"/><rect x="2" y="10" width="3" height="3" fill="#3dff8a"/><rect x="10" y="10" width="3" height="3" fill="#ffb000"/><rect x="12" y="10" width="3" height="3" fill="#ffb000"/><rect x="14" y="10" width="3" height="3" fill="#ffb000"/><rect x="0" y="12" width="3" height="3" fill="#3dff8a"/><rect x="10" y="12" width="3" height="3" fill="#ffb000"/><rect x="12" y="12" width="3" height="3" fill="#ffb000"/><rect x="14" y="12" width="3" height="3" fill="#ffb000"/><rect x="22" y="4" width="3" height="3" fill="#3dff8a"/><rect x="24" y="4" width="3" height="3" fill="#3dff8a"/><rect x="26" y="4" width="3" height="3" fill="#3dff8a"/><rect x="20" y="6" width="3" height="3" fill="#3dff8a"/><rect x="28" y="6" width="3" height="3" fill="#3dff8a"/><rect x="20" y="8" width="3" height="3" fill="#3dff8a"/><rect x="28" y="8" width="3" height="3" fill="#3dff8a"/><rect x="20" y="10" width="3" height="3" fill="#3dff8a"/><rect x="28" y="10" width="3" height="3" fill="#3dff8a"/><rect x="22" y="12" width="3" height="3" fill="#3dff8a"/><rect x="24" y="12" width="3" height="3" fill="#3dff8a"/><rect x="26" y="12" width="3" height="3" fill="#3dff8a"/><rect x="32" y="4" width="3" height="3" fill="#3dff8a"/><rect x="36" y="4" width="3" height="3" fill="#3dff8a"/><rect x="38" y="4" width="3" height="3" fill="#3dff8a"/><rect x="32" y="6" width="3" height="3" fill="#3dff8a"/><rect x="34" y="6" width="3" height="3" fill="#3dff8a"/><rect x="40" y="6" width="3" height="3" fill="#3dff8a"/><rect x="32" y="8" width="3" height="3" fill="#3dff8a"/><rect x="32" y="10" width="3" height="3" fill="#3dff8a"/><rect x="32" y="12" width="3" height="3" fill="#3dff8a"/><rect x="44" y="0" width="3" height="3" fill="#3dff8a"/><rect x="44" y="2" width="3" height="3" fill="#3dff8a"/><rect x="44" y="4" width="3" height="3" fill="#3dff8a"/><rect x="50" y="4" width="3" height="3" fill="#3dff8a"/><rect x="44" y="6" width="3" height="3" fill="#3dff8a"/><rect x="48" y="6" width="3" height="3" fill="#3dff8a"/><rect x="44" y="8" width="3" height="3" fill="#3dff8a"/><rect x="46" y="8" width="3" height="3" fill="#3dff8a"/><rect x="44" y="10" width="3" height="3" fill="#3dff8a"/><rect x="48" y="10" width="3" height="3" fill="#3dff8a"/><rect x="44" y="12" width="3" height="3" fill="#3dff8a"/><rect x="50" y="12" width="3" height="3" fill="#3dff8a"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { n as ORK_VERSION } from "./__build_info__-CXXMLvjt.mjs";
|
|
2
|
+
import { a as write, i as style, o as writeErr } from "./output-Q2EdeVUt.mjs";
|
|
3
|
+
import { i as uiFilePath, n as startServer, r as runningServer, t as DEFAULT_PORT } from "./src-D5ruZFgD.mjs";
|
|
4
|
+
import { a as mayShowSignIn } from "./in-a-run-BbLhZOFW.mjs";
|
|
5
|
+
import { defineCommand } from "citty";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
// src/browser/folder.ts
|
|
10
|
+
/**
|
|
11
|
+
* @file Where `ork ui` finds the built UI: `dist/ui` beside the published
|
|
12
|
+
* bundle, or, run from source, `packages/ui/dist` once it is built (`pnpm
|
|
13
|
+
* --filter @krapht/ork-ui build`). The CLI takes the UI's built files, never
|
|
14
|
+
* its source; without them the server shows its placeholder page.
|
|
15
|
+
*/
|
|
16
|
+
/** The UI package's built folder in the workspace, or null outside it. */
|
|
17
|
+
const workspaceUi = () => {
|
|
18
|
+
try {
|
|
19
|
+
const manifest = fileURLToPath(import.meta.resolve("@krapht/ork-ui/package.json"));
|
|
20
|
+
return path.join(path.dirname(manifest), "dist");
|
|
21
|
+
} catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
/** The folders that may hold the built UI, in the order they are tried. */
|
|
26
|
+
const uiFolders = () => {
|
|
27
|
+
const workspace = workspaceUi();
|
|
28
|
+
return [path.join(import.meta.dirname, "ui"), ...workspace === null ? [] : [workspace]];
|
|
29
|
+
};
|
|
30
|
+
// src/browser/open.ts
|
|
31
|
+
/**
|
|
32
|
+
* @file Opening a link in the user's browser, for `ork ui`. Each way is an
|
|
33
|
+
* opener in a registry, tried in order when it applies to this platform:
|
|
34
|
+
* `open` on macOS, `wslview` then `xdg-open` under WSL, `xdg-open` on Linux.
|
|
35
|
+
* Adding a platform is one more entry. When none starts, the caller prints
|
|
36
|
+
* the link instead.
|
|
37
|
+
*/
|
|
38
|
+
const wsl = (env) => env["WSL_DISTRO_NAME"] !== void 0;
|
|
39
|
+
const OPENERS = [
|
|
40
|
+
{
|
|
41
|
+
id: "macos",
|
|
42
|
+
applies: (platform) => platform === "darwin",
|
|
43
|
+
program: "open"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "wslview",
|
|
47
|
+
applies: (platform, env) => platform === "linux" && wsl(env),
|
|
48
|
+
program: "wslview"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "xdg-open",
|
|
52
|
+
applies: (platform) => platform === "linux" || platform === "freebsd",
|
|
53
|
+
program: "xdg-open"
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
/** Starts one program with the link; false when it cannot be started. */
|
|
57
|
+
const start = (program, url) => new Promise((resolve) => {
|
|
58
|
+
const child = spawn(program, [url], {
|
|
59
|
+
detached: true,
|
|
60
|
+
stdio: "ignore"
|
|
61
|
+
});
|
|
62
|
+
child.once("error", () => {
|
|
63
|
+
resolve(false);
|
|
64
|
+
});
|
|
65
|
+
child.once("spawn", () => {
|
|
66
|
+
child.unref();
|
|
67
|
+
resolve(true);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
/** Opens `url` with the first opener that starts; false when none did. */
|
|
71
|
+
const openInBrowser = async (url, options = {}) => {
|
|
72
|
+
const platform = options.platform ?? process.platform;
|
|
73
|
+
const env = options.env ?? process.env;
|
|
74
|
+
for (const opener of options.openers ?? OPENERS) {
|
|
75
|
+
if (!opener.applies(platform, env)) continue;
|
|
76
|
+
if (await start(opener.program, url)) return true;
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
};
|
|
80
|
+
// src/commands/ui.ts
|
|
81
|
+
/**
|
|
82
|
+
* @file `ork ui`: starts the local server (ADR-039) on loopback and opens it in
|
|
83
|
+
* the browser, signed in with the server's token; or, when one is already
|
|
84
|
+
* running (`~/.ork/ui.json`), opens that one. The server runs nothing: runs
|
|
85
|
+
* it starts keep running when it stops, and the CLI works without it.
|
|
86
|
+
*/
|
|
87
|
+
/** The link that signs the browser in; the server swaps it for a cookie. */
|
|
88
|
+
const signInLink = (port, token) => `http://127.0.0.1:${String(port)}/?token=${token}`;
|
|
89
|
+
/** `--port`: 0 to 65535 (0 picks a free port); `null` when invalid. */
|
|
90
|
+
const portArg = (value) => {
|
|
91
|
+
if (value === void 0) return DEFAULT_PORT;
|
|
92
|
+
const port = Number(value);
|
|
93
|
+
return Number.isInteger(port) && port >= 0 && port <= 65535 ? port : null;
|
|
94
|
+
};
|
|
95
|
+
/** Opens the link, or prints it when there is no browser to open. */
|
|
96
|
+
const show = async (link, open) => {
|
|
97
|
+
if (!mayShowSignIn()) {
|
|
98
|
+
writeErr("A program or an agent in a run does not get the sign-in link, which acts as you. Run `ork ui` in your own terminal.");
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!(open && process.stdout.isTTY && await openInBrowser(link))) write(`Open it with this link, which signs you in: ${link}`);
|
|
102
|
+
};
|
|
103
|
+
const stopped = () => new Promise((resolve) => {
|
|
104
|
+
process.once("SIGINT", () => {
|
|
105
|
+
resolve();
|
|
106
|
+
});
|
|
107
|
+
process.once("SIGTERM", () => {
|
|
108
|
+
resolve();
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
const ui = defineCommand({
|
|
112
|
+
meta: {
|
|
113
|
+
name: "ui",
|
|
114
|
+
description: "Start Ork's local UI and open it, or open the running one"
|
|
115
|
+
},
|
|
116
|
+
args: {
|
|
117
|
+
port: {
|
|
118
|
+
type: "string",
|
|
119
|
+
description: `The port to serve on (default ${String(DEFAULT_PORT)})`
|
|
120
|
+
},
|
|
121
|
+
open: {
|
|
122
|
+
type: "boolean",
|
|
123
|
+
description: "Open the browser (--no-open only prints the address)",
|
|
124
|
+
default: true
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
run: async ({ args }) => {
|
|
128
|
+
const port = portArg(args.port);
|
|
129
|
+
if (port === null) {
|
|
130
|
+
writeErr(`--port must be a number from 0 to 65535, not \`${args.port ?? ""}\`.`);
|
|
131
|
+
process.exitCode = 1;
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const running = runningServer(uiFilePath());
|
|
135
|
+
if (running !== null) {
|
|
136
|
+
write(`Ork's UI is already running at http://127.0.0.1:${String(running.port)} (process ${String(running.pid)}).`);
|
|
137
|
+
await show(signInLink(running.port, running.token), args.open);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
let server;
|
|
141
|
+
try {
|
|
142
|
+
server = await startServer({
|
|
143
|
+
version: ORK_VERSION,
|
|
144
|
+
port,
|
|
145
|
+
ui: uiFolders()
|
|
146
|
+
});
|
|
147
|
+
} catch (error) {
|
|
148
|
+
writeErr(error instanceof Error ? error.message : String(error));
|
|
149
|
+
process.exitCode = 1;
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
write(`Ork's UI is at ${server.url}`);
|
|
153
|
+
write(style("dim", "Runs keep running when it stops, and every ork command works without it. Ctrl-C stops it."));
|
|
154
|
+
await show(signInLink(server.port, server.token), args.open);
|
|
155
|
+
await stopped();
|
|
156
|
+
await server.close();
|
|
157
|
+
write(style("dim", "Ork's UI stopped."));
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export { ui };
|