diff --git a/bin/solid.pill b/bin/solid.pill index c357cdb53..e4e73943a 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77d4ecd2ce1d5fc68297f16ac2030dfc8a072f51978363dd88a96239e4f5ac7d -size 6310667 +oid sha256:38435a0a23fb4f09d55505915cd8e772b8096fd846c2c8ff3481a5b231deedf6 +size 6331042 diff --git a/pkg/arvo/app/chat-cli.hoon b/pkg/arvo/app/chat-cli.hoon index 6ff7667a5..1b98786d4 100644 --- a/pkg/arvo/app/chat-cli.hoon +++ b/pkg/arvo/app/chat-cli.hoon @@ -10,7 +10,7 @@ :: and trust it to take care of the rest. :: /- view=chat-view, hook=chat-hook, *group, - *permission-store, *group-store, *invite-store, + *permission-store, *group-store, inv=invite-store, sole /+ shoe, default-agent, verb, dbug, store=chat-store, group-store, grpl=group, resource @@ -27,7 +27,7 @@ +$ state-2 $: %2 grams=(list mail) :: all messages - known=(set [target serial]) :: known message lookup + known=(set [target serial:store]) :: known message lookup count=@ud :: (lent grams) bound=(map target glyph) :: bound circle glyphs binds=(jug glyph target) :: circle glyph lookup @@ -54,7 +54,7 @@ :: +$ state-0 $: grams=(list [[=ship =path] envelope:store]) :: all messages - known=(set [[=ship =path] serial]) :: known message lookup + known=(set [[=ship =path] serial:store]) :: known message lookup count=@ud :: (lent grams) bound=(map [=ship =path] glyph) :: bound circle glyphs binds=(jug glyph [=ship =path]) :: circle glyph lookup @@ -161,7 +161,7 @@ %fact ?+ p.cage.sign ~|([%chat-cli-bad-sub-mark wire p.cage.sign] !!) %chat-update (diff-chat-update:tc wire !<(update:store q.cage.sign)) - %invite-update (handle-invite-update:tc !<(invite-update q.cage.sign)) + %invite-update (handle-invite-update:tc !<(update:inv q.cage.sign)) == == [cards this] @@ -224,9 +224,9 @@ grams ~ ::NOTE this only impacts historic message lookup in chat-cli :: known - ^- (set [target serial]) + ^- (set [target serial:store]) %- ~(run in known.u.old) - |= [t=[ship path] s=serial] + |= [t=[ship path] s=serial:store] [`target`[| t] s] :: bound @@ -324,7 +324,7 @@ :: +handle-invite-update: get new invites :: ++ handle-invite-update - |= upd=invite-update + |= upd=update:inv ^- (quip card _state) ?+ -.upd [~ state] %invite [[(show-invite:sh-out invite.upd) ~] state] @@ -722,12 +722,11 @@ %poke %invite-action :: - !> - ^- invite-action - :^ %invite /chat + !> ^- action:inv + :^ %invite %chat (shax (jam [our-self where] who)) - ^- invite - [our-self %chat-hook where who ''] + ^- invite:inv + [our-self %chat-hook (de-path:resource where) who ''] == :: +set-target: set audience, update prompt :: @@ -865,7 +864,7 @@ |= =letter:store ^- (quip card _state) ~! bowl - =/ =serial (shaf %msg-uid eny.bowl) + =/ =serial:store (shaf %msg-uid eny.bowl) :_ state ^- (list card) %+ turn ~(tap in audience) @@ -1132,11 +1131,9 @@ :: +show-invite: print incoming invite notification :: ++ show-invite - |= invite + |= invite:inv ^- card - %- note - %+ weld "invited to: " - ~(phat tr (path-to-target path)) + (note "invited to: {(scow %p entity.resource)} {(trip name.resource)}") -- :: :: +tr: render targets diff --git a/pkg/arvo/app/chat-hook.hoon b/pkg/arvo/app/chat-hook.hoon index 3dff6c5d6..340d1e6c1 100644 --- a/pkg/arvo/app/chat-hook.hoon +++ b/pkg/arvo/app/chat-hook.hoon @@ -2,7 +2,7 @@ :: mirror chat data from foreign to local based on read permissions :: allow sending chat messages to foreign paths based on write perms :: -/- *permission-store, *invite-store, *metadata-store, +/- *permission-store, inv=invite-store, *metadata-store, *permission-hook, *group-store, *permission-group-hook, ::TMP for upgrade hook=chat-hook, view=chat-view, @@ -52,7 +52,7 @@ +$ poke $% [%chat-action action:store] [%permission-action permission-action] - [%invite-action invite-action] + [%invite-action action:inv] [%chat-view-action action:view] == :: @@ -77,7 +77,7 @@ ++ on-init ^- (quip card _this) :_ this(invite-created %.y) - :~ (invite-poke:cc [%create /chat]) + :~ (invite-poke:cc [%create %chat]) [%pass /invites %agent [our.bol %invite-store] %watch /invitatory/chat] watch-groups:cc == @@ -406,7 +406,7 @@ :: %invite-update =^ cards state - (fact-invite-update:cc wire !<(invite-update q.cage.sign)) + (fact-invite-update:cc wire !<(update:inv q.cage.sign)) [cards this] :: %group-update @@ -719,15 +719,18 @@ == :: ++ fact-invite-update - |= [wir=wire fact=invite-update] + |= [wir=wire fact=update:inv] ^- (quip card _state) :_ state ?+ -.fact ~ %accepted - =/ ask-history ?~((chat-scry path.invite.fact) %.y %.n) - =* shp ship.invite.fact - =* app-path path.invite.fact - ~[(chat-view-poke [%join shp app-path ask-history])] + =* resource resource.invite.fact + =/ =path [(scot %p entity.resource) name.resource ~] + :_ ~ + %- chat-view-poke + :^ %join ship.invite.fact + path + ?=(~ (chat-scry path)) == :: ++ fact-group-update @@ -919,9 +922,9 @@ [%pass / %agent [our.bol %chat-view] %poke %chat-view-action !>(act)] :: ++ invite-poke - |= act=invite-action + |= =action:inv ^- card - [%pass / %agent [our.bol %invite-store] %poke %invite-action !>(act)] + [%pass / %agent [our.bol %invite-store] %poke %invite-action !>(action)] :: ++ sec-to-perm |= [pax=path =kind] @@ -936,9 +939,9 @@ [%mailbox pax] :: ++ invite-scry - |= uid=serial - ^- (unit invite) - %^ scry (unit invite) + |= uid=serial:inv + ^- (unit invite:inv) + %^ scry (unit invite:inv) %invite-store /invite/chat/(scot %uv uid) :: diff --git a/pkg/arvo/app/chat-view.hoon b/pkg/arvo/app/chat-view.hoon index f12a64edb..168e7c6c0 100644 --- a/pkg/arvo/app/chat-view.hoon +++ b/pkg/arvo/app/chat-view.hoon @@ -6,7 +6,7 @@ /- *permission-store, *permission-hook, *group, - *invite-store, + inv=invite-store, *metadata-store, group-hook, *permission-group-hook, @@ -407,13 +407,14 @@ ^- card =/ managed=? !=(ship+app-path group-path) - =/ =invite + =/ =invite:inv :* our.bol ?:(managed %contact-hook %chat-hook) - ?:(managed group-path app-path) + (de-path:resource ?:(managed group-path ship+app-path)) ship '' == - =/ act=invite-action [%invite ?:(managed /contacts /chat) (shaf %msg-uid eny.bol) invite] + =/ act=action:inv + [%invite ?:(managed %contacts %chat) (shaf %msg-uid eny.bol) invite] [%pass / %agent [our.bol %invite-hook] %poke %invite-action !>(act)] :: ++ chat-scry diff --git a/pkg/arvo/app/contact-hook.hoon b/pkg/arvo/app/contact-hook.hoon index ccdb41010..087120183 100644 --- a/pkg/arvo/app/contact-hook.hoon +++ b/pkg/arvo/app/contact-hook.hoon @@ -4,7 +4,7 @@ /- group-hook, *contact-hook, *contact-view, - *invite-store, + inv=invite-store, *metadata-hook, *metadata-store, *group @@ -44,7 +44,7 @@ ++ on-init ^- (quip card _this) :_ this(invite-created %.y) - :~ (invite-poke:cc [%create /contacts]) + :~ (invite-poke:cc [%create %contacts]) [%pass /inv %agent [our.bol %invite-store] %watch /invitatory/contacts] [%pass /group %agent [our.bol %group-store] %watch /groups] == @@ -467,20 +467,10 @@ (contact-poke [%delete path]) (contact-poke [%remove path ship]) == - :: - ++ send-invite-poke - |= [=path =ship] - ^- card - =/ =invite - :* our.bol %contact-hook - path ship '' - == - =/ act=invite-action [%invite /contacts (shaf %msg-uid eny.bol) invite] - [%pass / %agent [our.bol %invite-hook] %poke %invite-action !>(act)] -- :: ++ invite-poke - |= act=invite-action + |= act=action:inv ^- card [%pass / %agent [our.bol %invite-store] %poke %invite-action !>(act)] :: diff --git a/pkg/arvo/app/contact-view.hoon b/pkg/arvo/app/contact-view.hoon index 9fab4648c..2abbbb0f6 100644 --- a/pkg/arvo/app/contact-view.hoon +++ b/pkg/arvo/app/contact-view.hoon @@ -5,7 +5,7 @@ :: /- group-hook, - *invite-store, + inv=invite-store, *contact-hook, *metadata-store, *metadata-hook, @@ -161,27 +161,22 @@ %+ turn ~(tap in pending.policy.act) |= =ship - (send-invite our.bol %contacts path ship '') + (send-invite our.bol %contacts rid ship '') == :: %join - =/ =path - (en-path:resource resource.act) =/ =cage :- %group-update !> ^- update:group-store [%add-members resource.act (sy our.bol ~)] =/ =wire - [%join-group path] + [%join-group (en-path:resource resource.act)] [%pass wire %agent [entity.resource.act %group-push-hook] %poke cage]~ :: %invite =* rid resource.act - =/ =path - (en-path:resource rid) - =/ =group - (need (scry-group:grp rid)) - :- (send-invite entity.rid %contacts path ship.act text.act) + =/ =group (need (scry-group:grp rid)) + :- (send-invite entity.rid %contacts rid ship.act text.act) ?. ?=(%invite -.policy.group) ~ ~[(add-pending rid ship.act)] :: @@ -276,12 +271,12 @@ [%pass / %agent [entity.rid app] %poke cage] :: ++ send-invite - |= =invite + |= =invite:inv ^- card =/ =cage :- %invite-action - !> ^- invite-action - [%invite /contacts (shaf %invite-uid eny.bol) invite] + !> ^- action:inv + [%invite %contacts (shaf %invite-uid eny.bol) invite] [%pass / %agent [recipient.invite %invite-hook] %poke cage] :: ++ contact-poke diff --git a/pkg/arvo/app/dbug.hoon b/pkg/arvo/app/dbug.hoon index 80c5fc140..dd4372c3f 100644 --- a/pkg/arvo/app/dbug.hoon +++ b/pkg/arvo/app/dbug.hoon @@ -380,17 +380,19 @@ 'connected'^b+!-.state 'expiry'^?-(-.state %& (time date.p.state), %| ~) 'next-id'^(numb next-id) + 'last-ack'^(time last-ack) 'unacked'^a+(turn (sort (turn ~(tap in events) head) dor) numb) :: :- 'subscriptions' :- %a %+ turn ~(tap by subscriptions) - |= [=wire [=^ship app=term =^path *]] + |= [id=@ud [=^ship app=term =^path *]] %- pairs - :~ 'wire'^(^path wire) + :~ 'id'^(numb id) 'ship'^(^ship ship) 'app'^s+app 'path'^(^path path) + 'unacked'^(numb (~(gut by unacked) id 0)) == == == diff --git a/pkg/arvo/app/debug/js/index.js b/pkg/arvo/app/debug/js/index.js index 1e59fe83c..1d5335d21 100644 --- a/pkg/arvo/app/debug/js/index.js +++ b/pkg/arvo/app/debug/js/index.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("buffer")):"function"==typeof define&&define.amd?define("index",["buffer"],t):t((e=e||self).buffer)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},n=t.performance||{},r=(n.now||n.mozNow||n.msNow||n.oNow||n.webkitNow,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function i(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t){return e(t={exports:{}},t.exports),t.exports}var l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var c=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),o=1;o2?n-2:0),i=2;i1?t-1:0),r=1;r2?n-2:0),i=2;i8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var o=r.map(function(e){return""+e});o.unshift("Warning: "+t),Function.prototype.apply.call(console.error,console,o)}try{var a=0,l="Warning: "+t.replace(/%s/g,function(){return r[a++]});throw new Error(l)}catch(e){}}},M={};function P(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",i=r+"."+t;M[i]||(C(!1,"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,r),M[i]=!0)}var N={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){P(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){P(e,"replaceState")},enqueueSetState:function(e,t,n,r){P(e,"setState")}},R={};function O(e,t,n){this.props=e,this.context=t,this.refs=R,this.updater=n||N}Object.freeze(R),O.prototype.isReactComponent={},O.prototype.setState=function(e,t){!function(){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw T(Error("setState(...): 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")},O.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var D={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},A=function(e,t){Object.defineProperty(O.prototype,e,{get:function(){S(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var I in D)D.hasOwnProperty(I)&&A(I,D[I]);function U(){}function j(e,t,n){this.props=e,this.context=t,this.refs=R,this.updater=n||N}U.prototype=O.prototype;var z=j.prototype=new U;z.constructor=j,t(z,O.prototype),z.isPureReactComponent=!0;var L={current:null},F={suspense:null},W={current:null},B=/^(.*)[\\\/]/,Y=1;function H(e){if(null==e)return null;if("number"==typeof e.tag&&C(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case a:return"Fragment";case o:return"Portal";case u:return"Profiler";case l:return"StrictMode";case p:return"Suspense";case m:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return"Context.Consumer";case s:return"Context.Provider";case h:return r=e,i=e.render,c="ForwardRef",d=i.displayName||i.name||"",r.displayName||(""!==d?c+"("+d+")":c);case g:return H(e.type);case v:var t=(n=e)._status===Y?n._result:null;if(t)return H(t)}var n,r,i,c,d;return null}var $={},V=null;function q(e){V=e}$.getCurrentStack=null,$.getStackAddendum=function(){var e="";if(V){var t=H(V.type),n=V._owner;e+=function(e,t,n){var r="";if(t){var i=t.fileName,o=i.replace(B,"");if(/^index\./.test(o)){var a=i.match(B);if(a){var l=a[1];l&&(o=l.replace(B,"")+"/"+o)}}r=" (at "+o+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(t,V._source,n&&H(n.type))}var r=$.getCurrentStack;return r&&(e+=r()||""),e};var G={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:F,ReactCurrentOwner:W,IsSomeRendererActing:{current:!1},assign:t};t(G,{ReactDebugCurrentFrame:$,ReactComponentTreeHook:{}});var Q,K,Z=function(e,t){if(!e){for(var n=G.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,i=new Array(r>2?r-2:0),o=2;o1){for(var c=Array(s),f=0;f.")}return t}(t);if(!xe[n]){xe[n]=!0;var r="";e&&e._owner&&e._owner!==W.current&&(r=" It was passed a child from "+H(e._owner.type)+"."),q(e),Z(!1,'Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',n,r),q(null)}}}function Te(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n",u=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,Z(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,u)}var f=re.apply(this,arguments);if(null==f)return f;if(l)for(var d=2;d is not supported and will be removed in a future major release. Did you mean to render instead?")),n.Provider},set:function(e){n.Provider=e}},_currentValue:{get:function(){return n._currentValue},set:function(e){n._currentValue=e}},_currentValue2:{get:function(){return n._currentValue2},set:function(e){n._currentValue2=e}},_threadCount:{get:function(){return n._threadCount},set:function(e){n._threadCount=e}},Consumer:{get:function(){return r||(r=!0,Z(!1,"Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),n.Consumer}}}),n.Consumer=o,n._currentRenderer=null,n._currentRenderer2=null,n},forwardRef:function(e){return null!=e&&e.$$typeof===g?C(!1,"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?C(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&C(!1,"forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null!=e.defaultProps||null!=e.propTypes)&&C(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:h,render:e}},lazy:function(e){var t,n,r={$$typeof:v,_ctor:e,_status:-1,_result:null};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){Z(!1,"React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){Z(!1,"React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},memo:function(e,t){return _e(e)||C(!1,"memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:g,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return we().useCallback(e,t)},useContext:function(e,t){var n=we();if(void 0!==t&&Z(!1,"useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context){var r=e._context;r.Consumer===e?Z(!1,"Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&Z(!1,"Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return n.useContext(e,t)},useEffect:function(e,t){return we().useEffect(e,t)},useImperativeHandle:function(e,t,n){return we().useImperativeHandle(e,t,n)},useDebugValue:function(e,t){return we().useDebugValue(e,t)},useLayoutEffect:function(e,t){return we().useLayoutEffect(e,t)},useMemo:function(e,t){return we().useMemo(e,t)},useReducer:function(e,t,n){return we().useReducer(e,t,n)},useRef:function(e){return we().useRef(e)},useState:function(e){return we().useState(e)},Fragment:a,Profiler:u,StrictMode:l,Suspense:p,unstable_SuspenseList:m,createElement:Ce,cloneElement:function(e,n,r){for(var i=function(e,n,r){var i;!function(){if(null==e)throw T(Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+"."))}();var o,a=t({},e.props),l=e.key,u=e.ref,s=e._self,c=e._source,f=e._owner;if(null!=n)for(i in ee(n)&&(u=n.ref,f=W.current),te(n)&&(l=""+n.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps),n)X.call(n,i)&&!J.hasOwnProperty(i)&&(void 0===n[i]&&void 0!==o?a[i]=o[i]:a[i]=n[i]);var d=arguments.length-2;if(1===d)a.children=r;else if(d>1){for(var h=Array(d),p=0;p=k},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125M(a,n))void 0!==u&&0>M(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>M(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],N=[],R=1,O=null,D=3,A=!1,I=!1,U=!1;function j(e){for(var t=S(N);null!==t;){if(null===t.callback)C(N);else{if(!(t.startTime<=e))break;C(N),t.sortIndex=t.expirationTime,T(P,t)}t=S(N)}}function z(e){if(U=!1,j(e),!I)if(null!==S(P))I=!0,n(L);else{var t=S(N);null!==t&&r(z,t.startTime-e)}}function L(e,n){I=!1,U&&(U=!1,i()),A=!0;var a=D;try{for(j(n),O=S(P);null!==O&&(!(O.expirationTime>n)||e&&!o());){var l=O.callback;if(null!==l){O.callback=null,D=O.priorityLevel;var u=l(O.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?O.callback=u:O===S(P)&&C(P),j(n)}else C(P);O=S(P)}if(null!==O)var s=!0;else{var c=S(N);null!==c&&r(z,c.startTime-n),s=!1}return s}finally{O=null,D=a,A=!1}}function F(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var W=a;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=D;D=e;try{return t()}finally{D=n}},t.unstable_next=function(e){switch(D){case 1:case 2:case 3:var t=3;break;default:t=D}var n=D;D=t;try{return e()}finally{D=n}},t.unstable_scheduleCallback=function(e,o,a){var l=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0l?(e.sortIndex=u,T(N,e),null===S(P)&&e===S(N)&&(U?i():U=!0,r(z,u-l))):(e.sortIndex=a,T(P,e),I||A||(I=!0,n(L))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=D;return function(){var n=D;D=t;try{return e.apply(this,arguments)}finally{D=n}}},t.unstable_getCurrentPriorityLevel=function(){return D},t.unstable_shouldYield=function(){var e=t.unstable_now();j(e);var n=S(P);return n!==O&&null!==O&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime=x},o=function(){},t.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):k=e>0?Math.floor(1e3/e):33.33};var E=new MessageChannel,T=E.port2;E.port1.onmessage=function(){if(null!==_){var e=t.unstable_now();x=e+k;try{_(!0,e)?T.postMessage(null):(b=!1,_=null)}catch(e){throw T.postMessage(null),e}}else b=!1},e=function(e){_=e,b||(b=!0,T.postMessage(null))},n=function(e,n){w=p(function(){e(t.unstable_now())},n)},r=function(){m(w),w=-1}}function S(e,t){var n=e.length;e.push(t),function(e,t,n){var r=n;for(;;){var i=Math.floor((r-1)/2),o=e[i];if(!(void 0!==o&&P(o,t)>0))return;e[i]=t,e[r]=o,r=i}}(e,t,n)}function C(e){var t=e[0];return void 0===t?null:t}function M(e){var t=e[0];if(void 0!==t){var n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){var r=n,i=e.length;for(;rV){if((V*=2)>$)return console.error("Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."),void oe();var n=new Int32Array(4*V);n.set(G),q=n.buffer,G=n}G.set(e,t)}}function oe(){var e=q;return V=0,q=null,G=null,Q=0,e}function ae(e,t){L[Y]++,null!==G&&ie([K,t,e.id,e.priorityLevel])}function le(e,t){L[F]=N,L[W]=0,L[Y]--,null!==G&&ie([Z,t,e.id])}function ue(e,t){L[F]=N,L[W]=0,L[B]=0,null!==G&&ie([te,t,e.id,U])}var se=-1,ce=250,fe=5e3,de=1e4,he=1073741823,pe=[],me=[],ge=1,ve=null,ye=D,be=!1,_e=!1,we=!1;function ke(e){for(var t=C(me);null!==t;){if(null===t.callback)M(me);else{if(!(t.startTime<=e))return;M(me),t.sortIndex=t.expirationTime,S(pe,t),ae(t,e),t.isQueued=!0}t=C(me)}}function xe(t){if(we=!1,ke(t),!_e)if(null!==C(pe))_e=!0,e(Ee);else{var r=C(me);null!==r&&n(xe,r.startTime-t)}}function Ee(e,n){var i;i=n,null!==G&&ie([re,i,j]),_e=!1,we&&(we=!1,r()),be=!0;var o=ye;try{if(!l)return Te(e,n);try{return Te(e,n)}catch(e){if(null!==ve){var a=t.unstable_now();!function(e,t){L[F]=N,L[W]=0,L[Y]--,null!==G&&ie([X,t,e.id])}(ve,a),ve.isQueued=!1}throw e}}finally{ve=null,ye=o,be=!1,function(e){j++,null!==G&&ie([ne,e,j])}(t.unstable_now())}}function Te(e,r){var o,l,u=r;for(ke(u),ve=C(pe);null!==ve&&!a&&(!(ve.expirationTime>u)||e&&!i());){var s=ve.callback;if(null!==s){ve.callback=null,ye=ve.priorityLevel;var c=ve.expirationTime<=u;o=ve,l=u,U++,L[F]=o.priorityLevel,L[W]=o.id,L[B]=U,null!==G&&ie([ee,l,o.id,U]);var f=s(c);u=t.unstable_now(),"function"==typeof f?(ve.callback=f,ue(ve,u)):(le(ve,u),ve.isQueued=!1,ve===C(pe)&&M(pe)),ke(u)}else M(pe);ve=C(pe)}if(null!==ve)return!0;var d=C(me);return null!==d&&n(xe,d.startTime-u),!1}function Se(e){switch(e){case R:return se;case O:return ce;case I:return he;case A:return de;case D:default:return fe}}var Ce=o,Me={startLoggingProfilingEvents:function(){V=H,q=new ArrayBuffer(4*V),G=new Int32Array(q),Q=0},stopLoggingProfilingEvents:oe,sharedProfilingBuffer:z};t.unstable_ImmediatePriority=R,t.unstable_UserBlockingPriority=O,t.unstable_NormalPriority=D,t.unstable_IdlePriority=I,t.unstable_LowPriority=A,t.unstable_runWithPriority=function(e,t){switch(e){case R:case O:case D:case A:case I:break;default:e=D}var n=ye;ye=e;try{return t()}finally{ye=n}},t.unstable_next=function(e){var t;switch(ye){case R:case O:case D:t=D;break;default:t=ye}var n=ye;ye=t;try{return e()}finally{ye=n}},t.unstable_scheduleCallback=function(i,o,a){var l,u,s=t.unstable_now();if("object"==typeof a&&null!==a){var c=a.delay;l="number"==typeof c&&c>0?s+c:s,u="number"==typeof a.timeout?a.timeout:Se(i)}else u=Se(i),l=s;var f=l+u,d={id:ge++,callback:o,priorityLevel:i,startTime:l,expirationTime:f,sortIndex:-1,isQueued:!1};return l>s?(d.sortIndex=l,S(me,d),null===C(pe)&&d===C(me)&&(we?r():we=!0,n(xe,l-s))):(d.sortIndex=f,S(pe,d),ae(d,s),d.isQueued=!0,_e||be||(_e=!0,e(Ee))),d},t.unstable_cancelCallback=function(e){e.isQueued&&(function(e,t){L[Y]--,null!==G&&ie([J,t,e.id])}(e,t.unstable_now()),e.isQueued=!1),e.callback=null},t.unstable_wrapCallback=function(e){var t=ye;return function(){var n=ye;ye=t;try{return e.apply(this,arguments)}finally{ye=n}}},t.unstable_getCurrentPriorityLevel=function(){return ye},t.unstable_shouldYield=function(){var e=t.unstable_now();ke(e);var n=C(pe);return n!==ve&&null!==ve&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime