!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:{};e.setTimeout,e.clearTimeout;var t=e.performance||{};t.now||t.mozNow||t.msNow||t.oNow||t.webkitNow;function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var i=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,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;s2?n-2:0),o=2;o1?t-1:0),r=1;r2?n-2:0),o=2;o8)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){}}},P={};function R(e,t){var n=e.constructor,r=n&&(n.displayName||n.name)||"ReactClass",o=r+"."+t;P[o]||(k(!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),P[o]=!0)}var j={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){R(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,r){R(e,"replaceState")},enqueueSetState:function(e,t,n,r){R(e,"setState")}},S={};function O(e,t,n){this.props=e,this.context=t,this.refs=S,this.updater=n||j}Object.freeze(S),O.prototype.isReactComponent={},O.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&C(!1,"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 E={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)."]},$=function(e,t){Object.defineProperty(O.prototype,e,{get:function(){x(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})};for(var T in E)E.hasOwnProperty(T)&&$(T,E[T]);function I(){}function N(e,t,n){this.props=e,this.context=t,this.refs=S,this.updater=n||j}I.prototype=O.prototype;var A=N.prototype=new I;A.constructor=N,t(A,O.prototype),A.isPureReactComponent=!0;var M={current:null},D={current:null},q=/^(.*)[\\\/]/,F=1;function U(e){if(null==e)return null;if("number"==typeof e.tag&&k(!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 p:return"ConcurrentMode";case u:return"Fragment";case a:return"Portal";case c:return"Profiler";case s:return"StrictMode";case y:return"Suspense"}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,i="ForwardRef",v=o.displayName||o.name||"",r.displayName||(""!==v?i+"("+v+")":i);case h:return U(e.type);case m:var t=(n=e)._status===F?n._result:null;if(t)return U(t)}var n,r,o,i,v;return null}var H={},L=null;function W(e){L=e}H.getCurrentStack=null,H.getStackAddendum=function(){var e="";if(L){var t=U(L.type),n=L._owner;e+=function(e,t,n){var r="";if(t){var o=t.fileName,a=o.replace(q,"");if(/^index\./.test(a)){var i=o.match(q);if(i){var u=i[1];u&&(a=u.replace(q,"")+"/"+a)}}r=" (at "+a+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(t,L._source,n&&U(n.type))}var r=H.getCurrentStack;return r&&(e+=r()||""),e};var z={ReactCurrentDispatcher:M,ReactCurrentOwner:D,assign:t};t(z,{ReactDebugCurrentFrame:H,ReactComponentTreeHook:{}});var V=function(e,t){if(!e){for(var n=z.ReactDebugCurrentFrame.getStackAddendum(),r=arguments.length,o=Array(r>2?r-2:0),a=2;a1){for(var l=Array(c),f=0;f.")}return t}(t);if(!be[n]){be[n]=!0;var r="";e&&e._owner&&e._owner!==D.current&&(r=" It was passed a child from "+U(e._owner.type)+"."),W(e),V(!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),W(null)}}}function _e(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,V(!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,a)}var c=Q.apply(this,arguments);if(null==c)return c;if(r)for(var l=2;l 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,V(!1,"Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),n.Consumer}}}),n.Consumer=a,n._currentRenderer=null,n._currentRenderer2=null,n},forwardRef:function(e){return null!=e&&e.$$typeof===h?k(!1,"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?k(!1,"forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&k(!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)&&k(!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={$$typeof:m,_ctor:e,_status:-1,_result:null},n=void 0,r=void 0;return Object.defineProperties(t,{defaultProps:{configurable:!0,get:function(){return n},set:function(e){V(!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."),n=e,Object.defineProperty(t,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){V(!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."),r=e,Object.defineProperty(t,"propTypes",{enumerable:!0})}}}),t},memo:function(e,t){return he(e)||k(!1,"memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:h,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return me().useCallback(e,t)},useContext:function(e,t){var n=me();if(void 0!==t&&V(!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?V(!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&&V(!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 me().useEffect(e,t)},useImperativeHandle:function(e,t,n){return me().useImperativeHandle(e,t,n)},useDebugValue:function(e,t){return me().useDebugValue(e,t)},useLayoutEffect:function(e,t){return me().useLayoutEffect(e,t)},useMemo:function(e,t){return me().useMemo(e,t)},useReducer:function(e,t,n){return me().useReducer(e,t,n)},useRef:function(e){return me().useRef(e)},useState:function(e){return me().useState(e)},Fragment:u,StrictMode:s,Suspense:y,createElement:xe,cloneElement:function(e,n,r){for(var o=function(e,n,r){null==e&&C(!1,"React.cloneElement(...): The argument must be a React element, but you passed %s.",e);var o=void 0,a=t({},e.props),i=e.key,u=e.ref,s=e._self,c=e._source,l=e._owner;if(null!=n){Z(n)&&(u=n.ref,l=D.current),G(n)&&(i=""+n.key);var f=void 0;for(o in e.type&&e.type.defaultProps&&(f=e.type.defaultProps),n)Y.call(n,o)&&!B.hasOwnProperty(o)&&(void 0===n[o]&&void 0!==f?a[o]=f[o]:a[o]=n[o])}var p=arguments.length-2;if(1===p)a.children=r;else if(p>1){for(var d=Array(p),y=0;ythis.canvasRef=e,id:"clock-canvas",__self:this,__source:{fileName:x,lineNumber:137}}))}}class S extends C{constructor(e){super(e)}renderWrapper(e){return _.createElement("div",{className:"pa2",style:{width:k,height:k,background:"rgba(0,0,0,1)"},__self:this,__source:{fileName:x,lineNumber:153}},e)}render(){this.props.data&&this.props.data;return this.renderWrapper(_.createElement(j,{__self:this,__source:{fileName:x,lineNumber:167}}))}}const O=(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=S,S});