urbit/pkg/arvo/app/clock/js/tile.js
Jared Tobin d310cb68bd
release: v0.10.0.rc-1
* Remove testnet configuration from %zuse
* Bump URBIT_VERSION
* Update Landscape builds
* Update all pills
2019-12-04 19:41:43 +08:00

1 line
26 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("tile",t):(e=e||self).tile=t()}(this,function(){"use strict";var e=("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}).performance||{};e.now||e.mozNow||e.msNow||e.oNow||e.webkitNow;function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;var a=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 a,i,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in a=Object(arguments[s]))r.call(a,c)&&(u[c]=a[c]);if(n){i=n(a);for(var l=0;l<i.length;l++)o.call(a,i[l])&&(u[i[l]]=a[i[l]])}}return u};var i={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},u={};function s(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||i}function c(){}function l(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||i}s.prototype.isReactComponent={},s.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw function(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},s.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},c.prototype=s.prototype;var f=l.prototype=new c;f.constructor=l,a(f,s.prototype),f.isPureReactComponent=!0;var p=function(){},d="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",y={},h=Function.call.bind(Object.prototype.hasOwnProperty);function m(e,t,n,r,o){for(var a in e)if(h(e,a)){var i;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](t,a,r,n,null,d)}catch(e){i=e}if(!i||i instanceof Error||p((r||"React class")+": type specification of "+n+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in y)){y[i.message]=!0;var s=o?o():"";p("Failed "+n+" type: "+i.message+(null!=s?s:""))}}}p=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},m.resetWarningCache=function(){y={}};var v=m,g=t(function(e){!function(){var t=a,n=v,r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,u=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,f=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,y=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119,C="function"==typeof Symbol&&Symbol.iterator,k="@@iterator";function x(e){if(null===e||"object"!=typeof e)return null;var t=C&&e[C]||e[k];return"function"==typeof t?t:null}function S(e){return e.name="Invariant Violation",e}var P=function(e,t){if(void 0===t)throw new Error("`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning message argument");if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,a="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.warn(a);try{throw new Error(a)}catch(e){}}).apply(void 0,[t].concat(r))}},R=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(void 0===t)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(r.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!e){if("undefined"!=typeof console){var a=r.map(function(e){return""+e});a.unshift("Warning: "+t),Function.prototype.apply.call(console.error,console,a)}try{var i=0,u="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(u)}catch(e){}}},j={};function O(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",o=r+"."+t;j[o]||(R(!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),j[o]=!0)}var E={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){O(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){O(e,"replaceState")},enqueueSetState:function(e,t,n,r){O(e,"setState")}},$={};function I(e,t,n){this.props=e,this.context=t,this.refs=$,this.updater=n||E}Object.freeze($),I.prototype.isReactComponent={},I.prototype.setState=function(e,t){!function(){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw S(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")},I.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var N={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)."]},T=function(e,t){Object.defineProperty(I.prototype,e,{get:function(){P(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var A in N)N.hasOwnProperty(A)&&T(A,N[A]);function D(){}function M(e,t,n){this.props=e,this.context=t,this.refs=$,this.updater=n||E}D.prototype=I.prototype;var L=M.prototype=new D;L.constructor=M,t(L,I.prototype),L.isPureReactComponent=!0;var q={current:null},F={suspense:null},U={current:null},H=/^(.*)[\\\/]/,W=1;function z(e){if(null==e)return null;if("number"==typeof e.tag&&R(!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 u:return"Fragment";case i:return"Portal";case c:return"Profiler";case s:return"StrictMode";case y:return"Suspense";case h:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return"Context.Consumer";case l:return"Context.Provider";case d:return r=e,o=e.render,a="ForwardRef",p=o.displayName||o.name||"",r.displayName||(""!==p?a+"("+p+")":a);case m:return z(e.type);case g:var t=(n=e)._status===W?n._result:null;if(t)return z(t)}var n,r,o,a,p;return null}var V={},Y=null;function B(e){Y=e}V.getCurrentStack=null,V.getStackAddendum=function(){var e="";if(Y){var t=z(Y.type),n=Y._owner;e+=function(e,t,n){var r="";if(t){var o=t.fileName,a=o.replace(H,"");if(/^index\./.test(a)){var i=o.match(H);if(i){var u=i[1];u&&(a=u.replace(H,"")+"/"+a)}}r=" (at "+a+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(t,Y._source,n&&z(n.type))}var r=V.getCurrentStack;return r&&(e+=r()||""),e};var J={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:F,ReactCurrentOwner:U,IsSomeRendererActing:{current:!1},assign:t};t(J,{ReactDebugCurrentFrame:V,ReactComponentTreeHook:{}});var X,Z,G=function(e,t){if(!e){for(var n=J.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];R.apply(void 0,[!1,t+"%s"].concat(o,[n]))}},K=Object.prototype.hasOwnProperty,Q={key:!0,ref:!0,__self:!0,__source:!0};function ee(e){if(K.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}function te(e){if(K.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}var ne=function(e,t,n,r,a,i,u){var s={$$typeof:o,type:e,key:t,ref:n,props:u,_owner:i,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function re(e,t,n){var r,o={},a=null,i=null,u=null,s=null;if(null!=t)for(r in ee(t)&&(i=t.ref),te(t)&&(a=""+t.key),u=void 0===t.__self?null:t.__self,s=void 0===t.__source?null:t.__source,t)K.call(t,r)&&!Q.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(c>1){for(var l=Array(c),f=0;f<c;f++)l[f]=arguments[f+2];Object.freeze&&Object.freeze(l),o.children=l}if(e&&e.defaultProps){var p=e.defaultProps;for(r in p)void 0===o[r]&&(o[r]=p[r])}if(a||i){var d="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var n=function(){X||(X=!0,R(!1,"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,d),i&&function(e,t){var n=function(){Z||(Z=!0,R(!1,"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(o,d)}return ne(e,a,i,u,s,U.current,o)}function oe(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var ae=".",ie=":";var ue=!1,se=/\/+/g;function ce(e){return(""+e).replace(se,"$&/")}var le,fe=10,pe=[];function de(e,t,n,r){if(pe.length){var o=pe.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function ye(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,pe.length<fe&&pe.push(e)}function he(e,t,n){return null==e?0:function e(t,n,r,a){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var s,c=!1;if(null===t)c=!0;else switch(u){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case o:case i:c=!0}}if(c)return r(a,t,""===n?ae+me(t,0):n),1;var l=0,f=""===n?ae:n+ie;if(Array.isArray(t))for(var p=0;p<t.length;p++)l+=e(s=t[p],f+me(s,p),r,a);else{var d=x(t);if("function"==typeof d){d===t.entries&&(ue||G(!1,"Using Maps as children is unsupported and will likely yield unexpected results. Convert it to a sequence/iterable of keyed ReactElements instead."),ue=!0);for(var y,h=d.call(t),m=0;!(y=h.next()).done;)l+=e(s=y.value,f+me(s,m++),r,a)}else if("object"===u){var v;v=" If you meant to render a collection of children, use an array instead."+V.getStackAddendum();var g=""+t;!function(){throw S(Error("Objects are not valid as a React child (found: "+("[object Object]"===g?"object with keys {"+Object.keys(t).join(", ")+"}":g)+")."+v))}()}}return l}(e,"",t,n)}function me(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=e.key,r={"=":"=0",":":"=2"},"$"+(""+n).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function ve(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function ge(e,t,n){var r,o,a=e.result,i=e.keyPrefix,u=e.func,s=e.context,c=u.call(s,t,e.count++);Array.isArray(c)?be(c,a,n,function(e){return e}):null!=c&&(oe(c)&&(r=c,o=i+(!c.key||t&&t.key===c.key?"":ce(c.key)+"/")+n,c=ne(r.type,o,r.ref,r._self,r._source,r._owner,r.props)),a.push(c))}function be(e,t,n,r,o){var a="";null!=n&&(a=ce(n)+"/");var i=de(t,a,r,o);he(e,ge,i),ye(i)}function we(e){return"string"==typeof e||"function"==typeof e||e===u||e===p||e===c||e===s||e===y||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===f||e.$$typeof===d||e.$$typeof===b||e.$$typeof===w||e.$$typeof===_)}function _e(){var e=q.current;return function(){if(null===e)throw S(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."))}(),e}function Ce(){if(U.current){var e=z(U.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}le=!1;var ke={};function xe(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=Ce();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ke[n]){ke[n]=!0;var r="";e&&e._owner&&e._owner!==U.current&&(r=" It was passed a child from "+z(e._owner.type)+"."),B(e),G(!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),B(null)}}}function Se(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];oe(r)&&xe(r,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var o=x(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)oe(a.value)&&xe(a.value,t)}}function Pe(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,o=z(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==d&&t.$$typeof!==m)return;r=t.propTypes}r?(B(e),n(r,e.props,"prop",o,V.getStackAddendum),B(null)):void 0===t.PropTypes||le||(le=!0,R(!1,"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")),"function"==typeof t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved||R(!1,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."))}}function Re(e,t,n){var r,a,i=we(e);if(!i){var s="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var c,l=null!=(r=t)&&void 0!==(a=r.__source)?"\n\nCheck your code at "+a.fileName.replace(/^.*[\\\/]/,"")+":"+a.lineNumber+".":"";s+=l||Ce(),null===e?c="null":Array.isArray(e)?c="array":void 0!==e&&e.$$typeof===o?(c="<"+(z(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,G(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,s)}var f=re.apply(this,arguments);if(null==f)return f;if(i)for(var p=2;p<arguments.length;p++)Se(arguments[p],e);return e===u?function(e){B(e);for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){G(!1,"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r);break}}null!==e.ref&&G(!1,"Invalid attribute `ref` supplied to `React.Fragment`."),B(null)}(f):Pe(f),f}try{var je=Object.freeze({}),Oe=new Map([[je,null]]),Ee=new Set([je]);Oe.set(0,0),Ee.add(0)}catch(e){}var $e={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return be(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;var r=de(null,null,t,n);he(e,ve,r),ye(r)},count:function(e){return he(e,function(){return null},null)},toArray:function(e){var t=[];return be(e,t,null,function(e){return e}),t},only:function(e){return function(){if(!oe(e))throw S(Error("React.Children.only expected to receive a single React element child."))}(),e}},createRef:function(){var e={current:null};return Object.seal(e),e},Component:I,PureComponent:M,createContext:function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&R(!1,"createContext: Expected the optional second argument to be a function. Instead received: %s",t);var n={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};n.Provider={$$typeof:l,_context:n};var r=!1,o=!1,a={$$typeof:f,_context:n,_calculateChangedBits:n._calculateChangedBits};return Object.defineProperties(a,{Provider:{get:function(){return o||(o=!0,G(!1,"Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> 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,G(!1,"Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),n.Consumer}}}),n.Consumer=a,n._currentRenderer=null,n._currentRenderer2=null,n},forwardRef:function(e){return null!=e&&e.$$typeof===m?R(!1,"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?R(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&R(!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)&&R(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:d,render:e}},lazy:function(e){var t,n,r={$$typeof:g,_ctor:e,_status:-1,_result:null};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){G(!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){G(!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 we(e)||R(!1,"memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:m,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return _e().useCallback(e,t)},useContext:function(e,t){var n=_e();if(void 0!==t&&G(!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?G(!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&&G(!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 _e().useEffect(e,t)},useImperativeHandle:function(e,t,n){return _e().useImperativeHandle(e,t,n)},useDebugValue:function(e,t){return _e().useDebugValue(e,t)},useLayoutEffect:function(e,t){return _e().useLayoutEffect(e,t)},useMemo:function(e,t){return _e().useMemo(e,t)},useReducer:function(e,t,n){return _e().useReducer(e,t,n)},useRef:function(e){return _e().useRef(e)},useState:function(e){return _e().useState(e)},Fragment:u,Profiler:c,StrictMode:s,Suspense:y,unstable_SuspenseList:h,createElement:Re,cloneElement:function(e,n,r){for(var o=function(e,n,r){var o;!function(){if(null==e)throw S(Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+"."))}();var a,i=t({},e.props),u=e.key,s=e.ref,c=e._self,l=e._source,f=e._owner;if(null!=n)for(o in ee(n)&&(s=n.ref,f=U.current),te(n)&&(u=""+n.key),e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)K.call(n,o)&&!Q.hasOwnProperty(o)&&(void 0===n[o]&&void 0!==a?i[o]=a[o]:i[o]=n[o]);var p=arguments.length-2;if(1===p)i.children=r;else if(p>1){for(var d=Array(p),y=0;y<p;y++)d[y]=arguments[y+2];i.children=d}return ne(e.type,u,s,c,l,f,i)}.apply(this,arguments),a=2;a<arguments.length;a++)Se(arguments[a],o.type);return Pe(o),o},createFactory:function(e){var t=Re.bind(null,e);return t.type=e,Object.defineProperty(t,"type",{enumerable:!1,get:function(){return P(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t},isValidElement:oe,version:"16.10.1",unstable_withSuspenseConfig:function(e,t){var n=F.suspense;F.suspense=void 0===t?null:t;try{e()}finally{F.suspense=n}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:J},Ie=Object.freeze({default:$e}),Ne=Ie&&$e||Ie,Te=Ne.default||Ne;e.exports=Te}()}),b=t(function(e){e.exports=g}),w=b.Component;t(function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var i=n.apply(null,o);i&&e.push(i)}else if("object"===a)for(var u in o)t.call(o,u)&&o[u]&&e.push(u)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()});const _="/Users/jtobin/src/urbit/pkg/interface/clock/tile/tile.js",C=234,k=218;var x=function(e,t){return{x:e*Math.cos(t),y:e*Math.sin(t)}};class S extends w{constructor(e){super(e),this.animate=this.animate.bind(this),this.hourHand=this.hourHand.bind(this),this.minuteHand=this.minuteHand.bind(this),this.secondHand=this.secondHand.bind(this),this.canvasRef=b.createRef(),this.dodecagonImg=null,this.canvas=null}componentDidMount(){this.canvas=R(this.canvasRef,{x:k,y:k},4),this.animate()}hourHand(e,t){var n=t.getMinutes()+60*t.getHours();e.fillStyle="black",e.beginPath(),e.arc(k/2,k/2,5,0,2*Math.PI),e.fill(),e.strokeStyle="black",e.beginPath(),e.moveTo(k/2,k/2);var r=Math.PI/-2+2*Math.PI/720*n,o=x(.22*k,r);o.x+=k/2,o.y+=k/2,e.lineTo(o.x,o.y),e.stroke()}minuteHand(e,t){var n=t.getSeconds()+60*t.getMinutes();e.strokeStyle="black",e.beginPath(),e.moveTo(k/2,k/2);var r=Math.PI/-2+2*Math.PI/3600*n,o=x(.35*k,r);o.x+=k/2,o.y+=k/2,e.lineTo(o.x,o.y),e.stroke()}secondHand(e,t){var n=t.getSeconds();let r={x:k/2,y:.75*k};e.fillStyle="red",e.beginPath(),e.arc(r.x,r.y,5,0,2*Math.PI),e.fill(),e.strokeStyle="red",e.beginPath();var o=Math.PI/-2+2*Math.PI/60*n,a=x(30,o),i=x(-10,o);a.x+=r.x,a.y+=r.y,i.x+=r.x,i.y+=r.y,e.moveTo(i.x,i.y),e.lineTo(a.x,a.y),e.stroke()}animate(){var e=new Date,t=this.canvas,n=t.getContext("2d");n.clearRect(0,0,t.width,t.height),n.save(),n.translate(.5,.5),this.secondHand(n,e),this.hourHand(n,e),this.minuteHand(n,e),n.restore(),window.requestAnimationFrame(this.animate)}render(){return b.createElement("div",{style:{position:"relative"},__self:this,__source:{fileName:_,lineNumber:130}},b.createElement("svg",{style:{position:"absolute"},width:"218",height:"218",viewBox:"0 0 234 234",fill:"none",xmlns:"http://www.w3.org/2000/svg",__self:this,__source:{fileName:_,lineNumber:132}},b.createElement("path",{d:"M112.859 1.10961C115.572 0.38269 118.428 0.38269 121.141 1.10961L171.359 14.5654C174.072 15.2923 176.546 16.7206 178.531 18.7065L215.293 55.4685C217.279 57.4545 218.708 59.9282 219.435 62.6411L232.89 112.859C233.617 115.572 233.617 118.428 232.89 121.141L219.435 171.359C218.708 174.072 217.279 176.546 215.293 178.531L178.531 215.293C176.546 217.279 174.072 218.708 171.359 219.435L121.141 232.89C118.428 233.617 115.572 233.617 112.859 232.89L62.6411 219.435C59.9282 218.708 57.4545 217.279 55.4685 215.293L18.7065 178.531C16.7206 176.546 15.2923 174.072 14.5654 171.359L1.10961 121.141C0.38269 118.428 0.38269 115.572 1.10961 112.859L14.5654 62.6411C15.2923 59.9282 16.7206 57.4545 18.7065 55.4685L55.4685 18.7065C57.4545 16.7206 59.9282 15.2923 62.6411 14.5654L112.859 1.10961Z",fill:"white",__self:this,__source:{fileName:_,lineNumber:133}})),b.createElement("canvas",{style:{position:"absolute"},ref:e=>this.canvasRef=e,id:"clock-canvas",__self:this,__source:{fileName:_,lineNumber:136}}))}}class P extends w{constructor(e){super(e)}renderWrapper(e){return b.createElement("div",{className:"pa2",style:{width:C,height:C,background:"rgba(0,0,0,1)"},__self:this,__source:{fileName:_,lineNumber:152}},e)}render(){this.props.data&&this.props.data;return this.renderWrapper(b.createElement(S,{__self:this,__source:{fileName:_,lineNumber:166}}))}}const R=(e,t,n)=>{const{x:r,y:o}=t;e.getContext("2d");return e.width=r*n,e.height=o*n,e.style.width=r+"px",e.style.height=o+"px",e.getContext("2d").scale(n,n),e};return window.clockTile=P,P});