react-voodoo 2.1.34 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
package/dist/react-voodoo.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"is\"","webpack:///./src/utils/css/cssUtils.js","webpack:///./src/MapOf.react_voodoo_utils_css_demux_typed_____js.gen.js","webpack:///external \"@babel/runtime/helpers/defineProperty\"","webpack:///external \"@babel/runtime/helpers/extends\"","webpack:///external \"@babel/runtime/helpers/inheritsLoose\"","webpack:///external \"fast-deep-equal\"","webpack:///external \"@babel/runtime/helpers/objectWithoutPropertiesLoose\"","webpack:///./src/utils/css/demux/typed/shadow.js","webpack:///external \"react-dom\"","webpack:///external \"@babel/runtime/helpers/assertThisInitialized\"","webpack:///./src/utils/css/demux/typed/number.js","webpack:///./src/utils/css/demux/typed/color.js","webpack:///external \"d3-ease\"","webpack:///external \"prop-types\"","webpack:///./src/.___layerPackIndexUtils.js","webpack:///./src/utils/css/demux/typed/any.js","webpack:///external \"shortid\"","webpack:///external \"color-rgba\"","webpack:///external \"tween-axis\"","webpack:///./src/utils/css/demux/filter.js","webpack:///./src/utils/css/demux/boxShadow.js","webpack:///./src/utils/css/demux/typed/int.js","webpack:///./src/utils/css/demux/typed/bool.js","webpack:///./src/utils/css/demux/typed/multi.js","webpack:///./src/utils/css/demux/typed/ratio.js","webpack:///./src/utils/css/demux/transform.js","webpack:///./src/utils/css/demux/textShadow.js","webpack:///./src/utils/css/demux/backgroundColor.js","webpack:///./src/comps/TweenerContext.js","webpack:///./src/comps/Axis.js","webpack:///./src/utils/react.js","webpack:///./src/comps/Node.js","webpack:///./src/utils/tweenTools.js","webpack:///./src/MapOf.react_voodoo_utils_css_demux_____js.gen.js","webpack:///./src/utils/css/index.js","webpack:///./src/utils/dom.js","webpack:///./src/utils/CssTweenAxis.js","webpack:///./src/utils/inertia.js","webpack:///./src/comps/Tweener.js","webpack:///./src/hooks/useVoodoo.js","webpack:///./src/comps/Draggable.js","webpack:///./src/hooks/useTweener.js","webpack:///./src/spells/asTweener.js","webpack:///./src/spells/withTweener.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","props","units","unitsRe","RegExp","join","floatCut","v","Number","toFixed","expandShorthandProperty","target","type","childProps","properties","values","split","multiple","forEach","k","length","isShorthandProperty","isValidDeclaration","_exports","walknSetExport","any","bool","color","int","multi","number","ratio","VALUES_REG","PARTS_REG","LENGTH_REG","parseValue","stringifyValue","isLength","toNum","toPx","cssShadowParser","str","parts","inset","includes","last","slice","undefined","nums","filter","map","offsetX","offsetY","blurRadius","spreadRadius","obj","trim","test","parseFloat","isNaN","parse","stringify","arr","defaultUnits","perspective","defaultBox","translateX","defaultMuxers","release","twKey","tweenableMap","cssMap","dataMap","muxerMap","keepValues","tmpKey","path","pop","keys","console","log","demuxOne","unitIndex","dkey","twVal","baseKey","data","box","unit","x","y","z","demux","tweenable","shadowMap","fkey","iValue","shadows","tmpValue","ti","substr","push","muxOne","initials","noPropLock","seenUnits","match","is","string","unitKey","indexOf","realKey","mux","reOrder","array","tFnKey","baseData","fValue","u","left","right","top","bottom","width","height","defaultValue","opacity","rKey","muxer","vect","rgba","_target","fPath","default","assign","isString","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","tmap","filters","alias","center","offset","count","nowhere","Math","min","max","translateY","translateZ","scale","scaleZ","scaleX","scaleY","rotate","skewX","skewY","rotateX","rotateY","rotateZ","transforms","transform","TweenerContext","React","createContext","children","id","axe","scrollFirst","bounds","scrollableWindow","inertia","size","defaultPosition","items","µ","useRef","current","useEffect","tweenLines","previousTweener","rmScrollableAnim","previousScrollable","Consumer","tweener","previousAxis","previousInertia","initAxis","scrollableBounds","previousTweens","deepEqual","lastTL","addScrollableAnim","Fragment","isFunctionalComponent","Component","isReactComponent","component","isClassComponent","setTarget","anims","tween","Node","state","__tweenableId","shortid","generate","componentWillUnmount","this","_tweenAxisObj","_currentTweener","rmTweenRef","setRootRef","_previousScrollable","render","style","initial","pos","noRef","reset","axes","isRoot","refProp","tweenAxis","parentTweener","error","axisItemsChange","twRef","tweenRef","_tweenAxis","scrollY","reduce","h","_updateTweenRef","RefChild","Children","only","isValidElement","_lastRef","ref","propTypes","div","className","re_cssValueWithUnit","cssAdd","val1","val2","units1","units2","remap","result","argz","cssMult","val","start","item","from","duration","withOffset","iDuration","inverseValues","reverse","apply","MultiCssProps","addCss","sources","source","shift","addAllType","v1","v2","values1","values2","parseInt","extractCss","inverse","css","shiftTransforms","unshift","cssDemux","cssDemuxers","marginTop","marginLeft","marginRight","marginBottom","paddingTop","paddingLeft","paddingRight","paddingBottom","borderRadius","borderTopColor","borderLeftColor","borderRightColor","borderBottomColor","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","transformOrigin","zIndex","clearTweenableValue","cssKey","muxToCss","demuxers","deMuxTween","deMuxedTween","fTween","excluded","deMuxLine","tweenLine","allPropsById","twAxis","line","demuxedTween","query","prefixes","recyclableTweenAxis","CssTweenAxis","cfg","scope","recyled","localLength","mount","Axis","arguments","destroy","__marks","__marksLength","__marksKeys","__processors","__config","__activeForks","__activeProcess","__outgoing","__incoming","__cPos","__cIndex","__cMaxKey","isBrowser","window","_dom","DocumentTouch","document","matchMedia","matches","prefix","navigator","appVersion","userAgent","dashedPrefix","__","onPageHided","onPageShown","dragging","dragEnabled","dragEnabledDesc","fingers","nbFingers","dragstartAnywhere","e","finger","desc","me","Dom","addEvent","dragAnywhere","dropAnywhere","dropWithoutClick","changedTouches","ln","identifier","_startPos","pageX","pageY","_startTs","timeStamp","_lastPos","dragstart","stopped","drag","preventNextClick","preventDefault","stopPropagation","stopImmediatePropagation","removeEvent","prevent","mouseDrag","dropped","getDraggable","node","touchDrag","locks","dragEnd","freeDraggable","splice","fn","bubble","addEventListener","attachEvent","related","removeEventListener","detachEvent","rmDragFn","warn","passive","elem","dims","offsetWidth","offsetHeight","offsetTop","offsetLeft","offsetParent","findReactParents","element","fiberNode","comps","startsWith","return","stateNode","parentNode","easingFn","signOf","NaN","abs","floor","round","consts","Inertia","opt","_","conf","constructor","config","active","refFPS","currentStop","lastInertiaPos","stops","disabled","wayPoints","inertiaFn","easePolyOut","targetWayPointIndex","_detectCurrentSnap","updateConf","willStop","willSnap","shouldLoop","startMove","baseTS","startTS","Date","now","lastVelocity","lastIVelocity","lastAccel","posDiff","loopsDiff","holding","hold","nextPos","loop","delta","lastHoldPos","sinceLastPos","iVel","lastBaseTs","lastBasePos","targetDist","targetWayPoint","velSign","loopsTarget","loopsVelSum","targetDuration","pow","applyInertia","snapToBounds","inertiaStartTm","inertiaLastTm","_doSnap","willEnd","update","at","nextValue","currentWayPoint","currentWayPointIndex","onInertiaEnd","setPos","setWayPoints","teleport","loopDist","dispatch","tm","forceSnap","maxDuration","mid","lPos","loopDec","gravity","maxJump","infinite","setBounds","isInbound","_live","lastTm","isBrowserSide","Function","isArray","_running","Runner","_tick","cpos","cb","setTimeout","Tweener","_scrollWatcherByAxis","_updateNodeInertia","activeInertia","_inertiaRaf","cancelAnimationFrame","scrollLeft","scrollTop","requestAnimationFrame","_swap","refs","muxByTarget","__isTweener","_rafLoop","rootRef","forwardedRef","createRef","options","maxClickTm","maxClickOffset","tweenerOptions","tweenRefCSS","tweenRefs","tweenRefMaps","iMapOrigin","tweenRefInitialData","tweenEnabled","tweenRefOrigin","tweenRefOriginCss","muxDataByTarget","tweenRefDemuxed","tweenRefTargets","runningAnims","scrollHook","onResize","_updateBox","_updateTweenRefs","windowDidResize","iStyle","iMap","noref","mapReset","resetTweenable","targets","updateRefStyle","postPone","pureCss","getTweenableRef","ReactDom","findDOMNode","getRootNode","isMountedFromHook","pushAnim","anim","then","keepResults","sl","fail","displayName","Promise","resolve","run","rkey","live","applyTweenState","_inertia","scrollableArea","_scrollableArea","_scrollableBounds","_scrollableWindow","dim","scrollPos","targetPos","nextDescr","scrollTo","ease","noEvents","_getAxis","initialScrollPos","getAxisState","getScrollPos","axis","newPos","ms","reject","oldPos","axisDidScroll","componentDidScroll","_runScrollGoTo","goTo","found","tl","to","easing","tick","getScrollableNodes","scrollable","domUtils","hookScrollableTargets","getElementById","componentShouldScroll","watchAxis","axisId","listener","byId","index","watchers","inertiaFrame","isInertiaActive","dispatchScroll","isAxisOut","_doDispatch","dx","dy","Comps","headTarget","getComputedStyle","getPropertyValue","scrollHeight","clientHeight","_activateNodeInertia","findIndex","scrollWidth","inited","force","swap","clearTimeout","componentDidMount","_static","rendered","scrollableAnim","componentDidUpdate","prevProps","prevState","BaseComponent","oProps","_parentTweener","Provider","RootNodeComp","useContext","nodeRef","lastTweener","doUseParentTweener","useMemo","pTweener","tw","ViewBox","forwardRef","Draggable","Comp","xAxis","yAxis","yBoxRef","xBoxRef","yRef","yHook","xHook","givenTweener","button","useVoodoo","root","lastStartTm","cLock","dX","parents","dY","parentsState","refWidth","refHeight","rootNode","dragList","touch","descr","MouseEvent","parent","deltaX","xDispatched","xBox","deltaY","yDispatched","yBox","dragDirectionLock","cancelable","enableMouseDrag","doRegister","scrollEnabled","SimpleObjectProto","asTweener","wheelRatio","withRef","String","fromCharCode","withTweener","opts","TweenerToProps","child","useTweener","hook","tools","Context","dom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,E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AlD,aACAnd,aACAO,OACA+f,UACAtY,OACAuY","file":"react-voodoo.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 21);\n","module.exports = require(\"react\");","module.exports = require(\"is\");","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst props = {\n \"margin\" : { \"properties\": [\"marginTop\", \"marginRight\", \"marginBottom\", \"marginLeft\"] },\n \"marginBottom\" : { \"types\": [\"length\"] },\n \"marginLeft\" : { \"types\": [\"length\"] },\n \"marginRight\" : { \"types\": [\"length\"] },\n \"marginTop\" : { \"types\": [\"length\"] },\n \"padding\" : { \"properties\": [\"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"] },\n \"paddingBottom\" : { \"types\": [\"length\"] },\n \"paddingLeft\" : { \"types\": [\"length\"] },\n \"paddingRight\" : { \"types\": [\"length\"] },\n \"paddingTop\" : { \"types\": [\"length\"] },\n \"bottom\" : { \"types\": [\"length-percentage-calc\"] },\n \"left\" : { \"types\": [\"length-percentage-calc\"] },\n \"right\" : { \"types\": [\"length-percentage-calc\"] },\n \"top\" : { \"types\": [\"length-percentage-calc\"] },\n \"zIndex\" : { \"types\": [\"integer\"] },\n \"width\" : { \"types\": [\"length-percentage-calc\"] },\n \"maxWidth\" : { \"types\": [\"length-percentage-calc\"] },\n \"minWidth\" : { \"types\": [\"length-percentage-calc\"] },\n \"height\" : { \"types\": [\"length-percentage-calc\"] },\n \"maxHeight\" : { \"types\": [\"length-percentage-calc\"] },\n \"minHeight\" : { \"types\": [\"length-percentage-calc\"] },\n \"lineHeight\" : { \"types\": [\"number\", \"length\"] },\n \"verticalAlign\" : { \"types\": [\"length\"] },\n \"visibility\" : { \"types\": [\"visibility\"] },\n \"borderSpacing\" : { \"types\": [\"length\"], \"multiple\": true },\n \"color\" : { \"types\": [\"color\"] },\n \"opacity\" : { \"types\": [\"number\"] },\n //\"background\" : { \"properties\": [\"backgroundColor\", \"backgroundPosition\", \"backgroundSize\"] },\n \"backgroundColor\" : { \"types\": [\"color\"] },\n \"backgroundPosition\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\" : true,\n \"repeatable\": true\n },\n \"backgroundSize\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\" : true,\n \"repeatable\": true\n },\n \"border\" : { \"properties\": [\"borderStyle\", \"borderWidth\", \"borderColor\"] },\n \"borderBottom\" : { \"properties\": [\"borderBottomStyle\", \"borderBottomWidth\", \"borderBottomColor\"] },\n \"borderLeft\" : { \"properties\": [\"borderLeftStyle\", \"borderLeftWidth\", \"borderLeftColor\"] },\n \"borderRight\" : { \"properties\": [\"borderRightStyle\", \"borderRightWidth\", \"borderRightColor\"] },\n \"borderTop\" : { \"properties\": [\"borderTopStyle\", \"borderTopWidth\", \"borderTopColor\"] },\n \"borderColor\" : { \"properties\": [\"borderTopColor\", \"borderRightColor\", \"borderBottomColor\", \"borderLeftColor\"] },\n \"borderWidth\" : { \"properties\": [\"borderTopWidth\", \"borderRightWidth\", \"borderBottomWidth\", \"borderLeftWidth\"] },\n \"borderBottomColor\" : { \"types\": [\"color\"] },\n \"borderLeftColor\" : { \"types\": [\"color\"] },\n \"borderRightColor\" : { \"types\": [\"color\"] },\n \"borderTopColor\" : { \"types\": [\"color\"] },\n \"borderBottomWidth\" : { \"types\": [\"length\"] },\n \"borderLeftWidth\" : { \"types\": [\"length\"] },\n \"borderRightWidth\" : { \"types\": [\"length\"] },\n \"borderTopWidth\" : { \"types\": [\"length\"] },\n \"borderRadius\" : { \"properties\": [\"borderTopLeftRadius\", \"borderTopRightRadius\", \"borderBottomRightRadius\", \"borderBottomLeftRadius\"] },\n \"borderTopLeftRadius\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"borderTopRightRadius\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"borderBottomRightRadius\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"borderBottomLeftRadius\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"boxShadow\" : { \"types\": [\"shadow-list\"] },\n \"caretColor\" : { \"types\": [\"color\"] },\n \"outline\" : { \"properties\": [\"outlineColor\", \"outlineWidth\"] },\n \"outlineColor\" : { \"types\": [\"color\"] },\n \"outlineWidth\" : { \"types\": [\"length\"] },\n \"outlineOffset\" : { \"types\": [\"length\"] },\n \"flex\" : { \"properties\": [\"flexGrow\", \"flexShrink\", \"flexBasis\"] },\n \"flexGrow\" : { \"types\": [\"number\"] },\n \"flexShrink\" : { \"types\": [\"number\"] },\n \"flexBasis\" : { \"types\": [\"length-percentage-calc\"] },\n \"order\" : { \"types\": [\"integer\"] },\n \"font\" : { \"properties\": [\"fontWeight\", \"fontStretch\", \"fontSize\", \"lineHeight\"] },\n \"fontWeight\" : { \"types\": [\"font-weight\"] },\n \"fontStretch\" : { \"types\": [\"font-stretch\"] },\n \"fontSize\" : { \"types\": [\"length\"] },\n \"fontSizeAdjust\" : { \"types\": [\"number\"] },\n \"gridTemplateColumns\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"gridTemplateRows\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"gridTemplate\" : { \"properties\": [\"gridTemplateRows\", \"gridTemplateColumns\"] },\n \"grid\" : { \"properties\": [\"gridTemplateRows\", \"gridTemplateColumns\"] },\n \"gridRowGap\" : { \"types\": [\"length-percentage-calc\"] },\n \"gridColumnGap\" : { \"types\": [\"length-percentage-calc\"] },\n \"gridGap\" : { \"properties\": [\"gridRowGap\", \"gridColumnGap\"] },\n \"clip\" : { \"types\": [\"rectangle\"] },\n \"clipPath\" : { \"types\": [\"basic-shape\"] },\n \"mask\" : { \"properties\": [\"maskPosition\", \"maskSize\"] },\n \"maskPosition\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\" : true,\n \"repeatable\": true\n },\n \"maskSize\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\" : true,\n \"repeatable\": true\n },\n \"shapeOutside\" : { \"types\": [\"basic-shape\"] },\n \"shapeMargin\" : { \"types\": [\"length-percentage-calc\"] },\n \"shapeImageThreshold\" : { \"types\": [\"number\"] },\n \"scrollPadding\" : { \"properties\": [\"scrollPaddingTop\", \"scrollPaddingRight\", \"scrollPaddingBottom\", \"scrollPaddingLeft\"] },\n \"scrollPaddingTop\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingRight\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingBottom\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingLeft\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingBlock\" : { \"properties\": [\"scrollPaddingBlockStart\", \"scrollPaddingBlockEnd\"] },\n \"scrollPaddingBlockStart\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingBlockEnd\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingInline\" : { \"properties\": [\"scrollPaddingInlineStart\", \"scrollPaddingInlineEnd\"] },\n \"scrollPaddingInlineStart\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingInlineEnd\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollSnapMargin\" : { \"properties\": [\"scrollSnapMarginTop\", \"scrollSnapMarginRight\", \"scrollSnapMarginBottom\", \"scrollSnapMarginLeft\"] },\n \"scrollSnapMarginTop\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginRight\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginBottom\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginLeft\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginBlock\" : { \"properties\": [\"scrollSnapMarginBlockStart\", \"scrollSnapMarginBlockEnd\"] },\n \"scrollSnapMarginBlockStart\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginBlockEnd\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginInline\" : { \"properties\": [\"scrollSnapMarginInlineStart\", \"scrollSnapMarginInlineEnd\"] },\n \"scrollSnapMarginInlineStart\": { \"types\": [\"length\"] },\n \"scrollSnapMarginInlineEnd\" : { \"types\": [\"length\"] },\n \"textDecoration\" : { \"properties\": [\"textDecorationColor\"] },\n \"textDecorationColor\" : { \"types\": [\"color\"] },\n \"textEmphasis\" : { \"properties\": [\"textEmphasisColor\"] },\n \"textEmphasisColor\" : { \"types\": [\"color\"] },\n \"textShadow\" : { \"types\": [\"shadow-list\"] },\n \"columns\" : { \"properties\": [\"columnWidth\", \"columnCount\"] },\n \"columnWidth\" : { \"types\": [\"length\"] },\n \"columnCount\" : { \"types\": [\"integer\"] },\n \"columnGap\" : { \"types\": [\"length-percentage-calc\"] },\n \"columnRule\" : { \"properties\": [\"columnRuleColor\", \"columnRuleWidth\"] },\n \"columnRuleColor\" : { \"types\": [\"color\"] },\n \"columnRuleWidth\" : { \"types\": [\"length\"] },\n \"letterSpacing\" : { \"types\": [\"length\"] },\n \"tabSize\" : { \"types\": [\"length\"] },\n \"textIndent\" : { \"types\": [\"length-percentage-calc\"] },\n \"wordSpacing\" : { \"types\": [\"length-percentage-calc\"] },\n \"transform\" : { \"types\": [\"transform\"] },\n \"transformOrigin\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"perspective\" : { \"types\": [\"length\"] },\n \"perspectiveOrigin\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n }\n}\n\n//\n///**\n// * List of animatable types used by properties, with descriptions of how to interpolate\n// each type. * Data taken from https://www.w3.org/TR/css3-transitions/#animatable-types\n// and some other W3C specs. * * @type {Object} */ exports.types = { 'color'\n// : { name: 'color', href: 'https://www.w3.org/TR/css3-transitions/#animtype-color'\n// }, 'length' : { name: 'length', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-length' }, 'percentage' :\n// { name: 'percentage', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-percentage' },\n// 'length-percentage-calc': { name: 'length, percentage, or calc', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-lpcalc' }, 'integer' :\n// { name: 'integer', href: 'https://www.w3.org/TR/css3-transitions/#animtype-integer' },\n// 'font-weight' : { name: 'font weight', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-font-weight' }, 'number'\n// : { name: 'number', href: 'https://www.w3.org/TR/css3-transitions/#animtype-number'\n// }, 'rectangle' : { name: 'rectangle', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-rect' }, 'visibility' : {\n// name: 'visibility', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-visibility' }, 'shadow-list'\n// : { name: 'shadow list', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-shadow-list' }, // Other specs\n// 'transform' : { name: 'transform', href: 'https://www.w3.org/TR/css3-transforms/#interpolation-of-transforms' }, 'font-stretch' : { name: 'font stretch', href: 'https://www.w3.org/TR/css3-fonts/#font-stretch-animation' }, 'basic-shape' : { name: 'basic shape', href: 'https://www.w3.org/TR/css-shapes-1/#basic-shape-interpolation' }, };\n\nexport const units = ['', 'deg', 'box', 'bz', 'bh', 'bw', 'deg', 'em', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax'];\nexport const unitsRe = new RegExp(\n \"([+-]?(?:[0-9]*[.])?[0-9]+)\\\\s*(\" +\n ['\\\\w+', 'deg', 'bz', 'bh', 'bw', 'cap', 'ch', 'deg', 'em', 'ic', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax'].join('|')\n + \")\"\n);\nexport const floatCut = ( v = 0 ) => Number(v.toFixed(3));\n\nexport function expandShorthandProperty( property, value, target = {} ) {\n let type = props[ property ],\n childProps = type && type.properties,\n values = value.split(' ');\n \n if ( type.multiple )\n childProps && childProps.forEach(\n ( k, i ) => {\n target[ k ] = values[ i % values.length ];\n }\n )\n else\n childProps && childProps.forEach(\n ( k, i ) => {\n if ( values[ i ] )\n target[ k ] = values[ i ];\n }\n )\n return target;\n};\n\nexport function isShorthandProperty( property ) {\n let type = props[ property ],\n childProps = type && type.properties;\n return childProps && !!childProps.length;\n};\n\n\nexport function isValidDeclaration( property, value ) {\n return !!props[ property ];\n};\n\n/**\n * Check if a CSS property can be animated\n * @param {string} property CSS property name\n * @return {boolean} True if the property can be animated\n */\nexport function canAnimate( property ) {\n return props.hasOwnProperty(property);\n};\n\n/**\n * Get a definition of how a CSS property can be animated\n * @param {string} property CSS property name\n * @param {boolean} expand Expand definitions for sub-properties, when available\n * @return {object} Property definition, or null if it can't be animated\n */\nexport function getProperty( property, expand ) {\n if ( !exports.canAnimate(property) ) {\n return null;\n }\n var prop = props[ property ];\n var ret = { name: property };\n Object.keys(prop).forEach(function ( key ) {\n var value = prop[ key ];\n if ( Array.isArray(value) ) {\n if ( key === 'properties' && expand ) {\n value = value.map(function ( subProp ) {\n return exports.getProperty(subProp, expand);\n });\n }\n else {\n value = value.slice(); // clone\n }\n }\n ret[ key ] = value;\n });\n return ret;\n};\n","/* This is a virtual file generated by layer-pack */\nlet req, _exports = {}, walknSetExport=require('react-voodoo/.___layerPackIndexUtils').walknSetExport;\nconst _react_voodoo_utils_css_demux_typed_any_js = require(\"react-voodoo/utils/css/demux/typed/any.js\");\nwalknSetExport(_exports, \"any\", _react_voodoo_utils_css_demux_typed_any_js);\nconst _react_voodoo_utils_css_demux_typed_int_js = require(\"react-voodoo/utils/css/demux/typed/int.js\");\nwalknSetExport(_exports, \"int\", _react_voodoo_utils_css_demux_typed_int_js);\nconst _react_voodoo_utils_css_demux_typed_bool_js = require(\"react-voodoo/utils/css/demux/typed/bool.js\");\nwalknSetExport(_exports, \"bool\", _react_voodoo_utils_css_demux_typed_bool_js);\nconst _react_voodoo_utils_css_demux_typed_color_js = require(\"react-voodoo/utils/css/demux/typed/color.js\");\nwalknSetExport(_exports, \"color\", _react_voodoo_utils_css_demux_typed_color_js);\nconst _react_voodoo_utils_css_demux_typed_multi_js = require(\"react-voodoo/utils/css/demux/typed/multi.js\");\nwalknSetExport(_exports, \"multi\", _react_voodoo_utils_css_demux_typed_multi_js);\nconst _react_voodoo_utils_css_demux_typed_ratio_js = require(\"react-voodoo/utils/css/demux/typed/ratio.js\");\nwalknSetExport(_exports, \"ratio\", _react_voodoo_utils_css_demux_typed_ratio_js);\nconst _react_voodoo_utils_css_demux_typed_number_js = require(\"react-voodoo/utils/css/demux/typed/number.js\");\nwalknSetExport(_exports, \"number\", _react_voodoo_utils_css_demux_typed_number_js);\nconst _react_voodoo_utils_css_demux_typed_shadow_js = require(\"react-voodoo/utils/css/demux/typed/shadow.js\");\nwalknSetExport(_exports, \"shadow\", _react_voodoo_utils_css_demux_typed_shadow_js);\n\nexport const any = _exports.any;\n\nexport const bool = _exports.bool;\n\nexport const color = _exports.color;\n\nexport const int = _exports.int;\n\nexport const multi = _exports.multi;\n\nexport const number = _exports.number;\n\nexport const ratio = _exports.ratio;\n\nexport const shadow = _exports.shadow;\nexport default _exports;","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/inheritsLoose\");","module.exports = require(\"fast-deep-equal\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\");","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport {floatCut, units, unitsRe} from \"../../cssUtils\";\nimport {bool, color} from \"./(*).js\";\n\n\nconst cssShadowParser = (() => {\n\tconst VALUES_REG = /,(?![^\\(]*\\))/\n\tconst PARTS_REG = /\\s(?![^(]*\\))/\n\tconst LENGTH_REG = /^[0-9]+[a-zA-Z%]+?$/\n\t\n\tconst parseValue = str => {\n\t\tconst parts = str.split(PARTS_REG)\n\t\tconst inset = parts.includes('inset')\n\t\tconst last = parts.slice(-1)[0]\n\t\tconst color = !isLength(last) ? last : undefined\n\t\t\n\t\tconst nums = parts\n\t\t\t.filter(n => n !== 'inset')\n\t\t\t.filter(n => n !== color)\n\t\t\t.map(toNum)\n\t\tconst [offsetX, offsetY, blurRadius, spreadRadius] = nums\n\t\t\n\t\treturn {\n\t\t\tinset,\n\t\t\toffsetX,\n\t\t\toffsetY,\n\t\t\tblurRadius,\n\t\t\tspreadRadius,\n\t\t\tcolor\n\t\t}\n\t}\n\t\n\tconst stringifyValue = obj => {\n\t\tconst {\n\t\t\t inset,\n\t\t\t offsetX = 0,\n\t\t\t offsetY = 0,\n\t\t\t blurRadius = 0,\n\t\t\t spreadRadius,\n\t\t\t color\n\t\t } = obj || {}\n\t\t\n\t\treturn [\n\t\t\t(inset ? 'inset' : null),\n\t\t\toffsetX,\n\t\t\toffsetY,\n\t\t\tblurRadius,\n\t\t\tspreadRadius,\n\t\t\tcolor\n\t\t].filter(v => v !== null && v !== undefined)\n\t\t .map(toPx)\n\t\t .map(s => ('' + s).trim())\n\t\t .join(' ')\n\t}\n\t\n\tconst isLength = v => v === '0' || LENGTH_REG.test(v)\n\tconst toNum = v => {\n\t\tif ( !/px$/.test(v) && v !== '0' ) return v\n\t\tconst n = parseFloat(v)\n\t\treturn !isNaN(n) ? n : v\n\t}\n\tconst toPx = n => typeof n === 'number' && n !== 0 ? (n + 'px') : n\n\t\n\tconst parse = str => str.split(VALUES_REG).map(s => s.trim()).map(parseValue)\n\tconst stringify = arr => arr.map(stringifyValue).join(', ')\n\t\n\treturn {\n\t\tparse,\n\t\tstringify\n\t}\n})()\n\n\nconst defaultUnits = {\n\t perspective: 'px',\n },\n defaultBox = {\n\t translateX: 'x',\n },\n defaultMuxers = {\n\t //blurRadius : number,\n\t inset: bool,\n\t //offsetX : number,\n\t //offsetY : number,\n\t //spreadRadius: number,\n\t color: color\n };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\tif ( path.length > 2 ) {\n\t\t// dec count on transform\n\t\t\n\t\ttmpKey = path[0] + \"_\" + path[1] + \"_\" + path[2];\n\t\tif ( defaultMuxers[path[2]] ) {\n\t\t\tdefaultMuxers[path[2]].release(twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues)\n\t\t\tif ( !dataMap[tmpKey] ) {\n\t\t\t\t//console.log(\"dec\", tmpKey, dataMap[path[0]][path[1]][path[2]])\n\t\t\t\tif ( !--dataMap[path[0]][path[1]][path[2]] && !keepValues ) {\n\t\t\t\t\tdelete dataMap[path[0]][path[1]][path[2]];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\t\tdelete dataMap[path[0]];\n\t\t\t\tdelete muxerMap[path[0]];\n\t\t\t\tdelete cssMap[path[0]];\n\t\t\t\t//console.log(\"delete color\", twKey)\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//console.log(\"dec\", twKey, dataMap[path[0]])\n\t\tif ( !--dataMap[path[0]][path[1]][path[2]] && !keepValues ) {\n\t\t\tdelete dataMap[path[0]][path[1]][path[2]];\n\t\t}\n\t\t//if ( Object.keys(dataMap[path[0]][path[1]]).length === 0 && !keepValues )\n\t\t//\tdelete dataMap[path[0]][path[1]];\n\t\t\n\t\t// free transform layers\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !dataMap[path[0]][dataMap[path[0]].length - 1] )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\t\n\t\t//tmpKey = path[0] + \"_\" + path[1] + \"_\" + path[2];\n\t\t// units\n\t\tif ( !--dataMap[tmpKey][path[3]] && !keepValues ) {\n\t\t\tdelete dataMap[tmpKey][path[3]];\n\t\t\t//dataMap[path[0]][path[3]] = undefined;\n\t\t\tdelete tweenableMap[twKey];\n\t\t\t//console.log(\"delete\", tmpKey)\n\t\t}\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[tmpKey].length && !dataMap[tmpKey][dataMap[tmpKey].length - 1] )\n\t\t\t\tdataMap[tmpKey].pop();\n\t\t\n\t\tif ( dataMap[tmpKey].length === 0 && !keepValues )\n\t\t\tdelete dataMap[tmpKey];\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !Object.keys(dataMap[path[0]][dataMap[path[0]].length - 1]).length )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\tdelete dataMap[path[0]];\n\t\t\tdelete muxerMap[path[0]];\n\t\t\tdelete cssMap[path[0]];\n\t\t\t//console.log(\"delete\", path[0])\n\t\t}\n\t}\n\telse {\n\t\tconsole.log(\"wtf\", path)\n\t}\n}\n\nexport function demuxOne( unitIndex, dkey, twVal, baseKey, data, box ) {\n\tlet value = twVal,\n\t unit = units[unitIndex] || defaultUnits[baseKey];\n\t\n\tif ( unit === 'box' ) {\n\t\tvalue = value * (box[defaultBox[baseKey]] || box.x);\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bw' ) {\n\t\tvalue = value * box.x;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'wh' ) {\n\t\tvalue = value * box.y;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bz' ) {\n\t\tvalue = value * box.z;\n\t\tunit = 'px';\n\t}\n\t\n\tif ( unit === 'deg' )\n\t\tvalue = value % 360;\n\t\n\treturn unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\t//console.log(key)\n\tlet shadows = [],\n\t tmpValue = {};\n\tlet ti = 0, shadowMap, fkey, unitKey, unitIndex, dkey, u, iValue, y = 0, value;\n\tfor ( ; ti < data[key].length; ti++ ) {\n\t\tshadowMap = data[key][ti];\n\t\ttmpValue = {};\n\t\tfor ( fkey in shadowMap )\n\t\t\tif ( shadowMap.hasOwnProperty(fkey) ) {\n\t\t\t\tdkey = key + '_' + ti + '_' + fkey;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif ( defaultMuxers[fkey] ) {\n\t\t\t\t\tvalue = defaultMuxers[fkey].demux(dkey, tweenable, undefined, data, box);\n\t\t\t\t\t//continue;\n\t\t\t\t\t//console.log(dkey, tweenable[dkey])\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalue = \"\";\n\t\t\t\t\ty = 0;\n\t\t\t\t\tfor ( unitIndex = 0; unitIndex < data[dkey].length; unitIndex++ )\n\t\t\t\t\t\tif ( data[dkey][unitIndex] ) {\n\t\t\t\t\t\t\tunitKey = dkey + \"_\" + unitIndex;\n\t\t\t\t\t\t\tiValue = demuxOne(unitIndex, dkey, tweenable[unitKey], fkey, data, box);\n\t\t\t\t\t\t\tif ( y && iValue[0] === '-' )\n\t\t\t\t\t\t\t\tiValue = \" - \" + iValue.substr(1);\n\t\t\t\t\t\t\telse if ( y )\n\t\t\t\t\t\t\t\tiValue = \" + \" + iValue;\n\t\t\t\t\t\t\tvalue += iValue;\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( y > 1 )\n\t\t\t\t\t\tvalue = \"calc(\" + value + \")\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ttmpValue[fkey] = (value || 0);\n\t\t\t}\n\t\tshadows.push(tmpValue);\n\t}\n\t\n\ttarget[key] = cssShadowParser.stringify(shadows);\n\t//console.log(key, shadows, target[key]);\n\t\n}\n\nexport function muxOne( key, baseKey, value, target, data, initials, noPropLock, seenUnits ) {\n\t\n\tlet match = is.string(value) ? value.match(unitsRe) : false,\n\t unit = match && match[2] || defaultUnits[baseKey] || \"px\",\n\t unitKey = units.indexOf(unit),\n\t realKey = unitKey !== -1 && (key + '_' + unitKey) || key;\n\t\n\tinitials[realKey] = 0;\n\tdata[key][unitKey] = data[key][unitKey] || 0;\n\t//console.log(key, ':', data[key][unitKey], value, noPropLock)\n\t\n\tif ( seenUnits && seenUnits[unitKey] ) {\n\t\t//console.warn(key, ':', data[key][unitKey], value, noPropLock)\n\t\tif ( match ) {\n\t\t\ttarget[realKey] += parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] += parseFloat(value);\n\t\t}\n\t}\n\telse {\n\t\t\n\t\t!noPropLock && data[key][unitKey]++;\n\t\tif ( match ) {\n\t\t\ttarget[realKey] = parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] = parseFloat(value);\n\t\t}\n\t\tif ( seenUnits ) seenUnits[unitKey] = true;\n\t}\n\t\n\treturn demux;\n};\nexport const mux = ( key, value, target, data, initials, noPropLock, reOrder ) => {\n\t\n\tdata[key] = data[key] || [];\n\t//initials[key] = 0;\n\t\n\tif ( !is.array(value) )\n\t\tvalue = [value];\n\tlet ti = 0, shadowMap, tFnKey, baseData, fValue, dkey, u, seenUnits;\n\tfor ( ; ti < value.length; ti++ ) {\n\t\tshadowMap = value[ti];\n\t\tif ( is.string(shadowMap) )\n\t\t\tshadowMap = cssShadowParser.parse(shadowMap)[0];\n\t\tbaseData = reOrder ? {} : { ...(data[key][ti] || {}) };\n\t\tfor ( tFnKey in shadowMap ) {\n\t\t\tif ( shadowMap.hasOwnProperty(tFnKey) ) {\n\t\t\t\tfValue = shadowMap[tFnKey];\n\t\t\t\tdkey = key + '_' + ti + '_' + tFnKey;\n\t\t\t\t\n\t\t\t\tbaseData[tFnKey] = baseData[tFnKey] || data[key][ti] && data[key][ti][tFnKey] || 0;\n\t\t\t\t!noPropLock && baseData[tFnKey]++;\n\t\t\t\tif ( defaultMuxers[tFnKey] ) {\n\t\t\t\t\tdefaultMuxers[tFnKey].mux(dkey, fValue, target, data, initials, noPropLock, reOrder);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tseenUnits = {};\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdata[dkey] = data[dkey] || [];\n\t\t\t\t\tif ( is.array(fValue) ) {\n\t\t\t\t\t\tfor ( u = 0; u < fValue.length; u++ ) {\n\t\t\t\t\t\t\tmuxOne(dkey, tFnKey, fValue[u] || 0, target, data, initials, noPropLock, seenUnits)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmuxOne(dkey, tFnKey, fValue || 0, target, data, initials, noPropLock)\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdata[key][ti] =\n\t\t\treOrder\n\t\t\t? { ...baseData, ...(data[key][ti] || {}), ...baseData }\n\t\t\t:\n\t\t\tbaseData;\n\t\t//console.log(key, reOrder, data[key][ti], baseData)\n\t}\n\treturn demux;\n}","module.exports = require(\"react-dom\");","module.exports = require(\"@babel/runtime/helpers/assertThisInitialized\");","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport {floatCut, units, unitsRe} from \"../../cssUtils\";\n\nconst defaultUnits = {\n\t left : 'px',\n\t right : 'px',\n\t top : 'px',\n\t bottom : 'px',\n\t width : 'px',\n\t height : 'px',\n\t perspective: 'px',\n },\n defaultBox = {\n\t left : 'x',\n\t right : 'x',\n\t top : 'y',\n\t bottom: 'y',\n\t width : 'x',\n\t height: 'y',\n }, defaultValue = {\n\t opacity: 0\n };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\t\n\tif ( path.length === 2 ) {\n\t\t//console.log(\"dec\", twKey, dataMap[path[0]][path[1]], keepValues)\n\t\tif ( !--dataMap[path[0]][path[1]] && !keepValues ) {\n\t\t\tdelete tweenableMap[twKey];\n\t\t\t//dataMap[path[0]][path[1]] = undefined;\n\t\t}\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !dataMap[path[0]][dataMap[path[0]].length - 1] )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\tdelete dataMap[path[0]];\n\t\t\tdelete muxerMap[path[0]];\n\t\t\tif ( cssMap ) delete cssMap[path[0]];\n\t\t\t//console.log(\"delete\", path[0])\n\t\t}\n\t}\n\telse {\n\t\tconsole.log(\"wtf\", path)\n\t}\n}\n\nexport function demuxOne( unitKey, twVal, baseKey, data, box ) {\n\tlet value = twVal,\n\t unit = units[unitKey] || defaultUnits[baseKey] || \"px\";\n\t\n\tif ( unit === 'box' ) {\n\t\tvalue = value * (box[defaultBox[baseKey]] || box.x);\n\t\tunit = 'px';\n\t\t\n\t}\n\tif ( unit === 'bw' ) {\n\t\tvalue = value * box.x;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bh' ) {\n\t\tvalue = value * box.y;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bz' ) {\n\t\tvalue = value * box.z;\n\t\tunit = 'px';\n\t}\n\treturn unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box, baseKey ) {\n\tlet value, i = 0, y, rKey;\n\t\n\tvalue = \"\";\n\t\n\t//if ( key==\"height\" )\n\t//\tdebugger;\n\t\n\tfor ( y = 0; y < data[key].length; y++ )\n\t\tif ( data[key][y] ) {\n\t\t\trKey = key + \"_\" + y;\n\t\t\tif ( tweenable[rKey] < 0 )\n\t\t\t\tvalue += (i ? \" - \" : \"-\") + demuxOne(y, -tweenable[rKey], baseKey || key, data, box);\n\t\t\telse\n\t\t\t\tvalue += (i ? \" + \" : \"\") + demuxOne(y, tweenable[rKey], baseKey || key, data, box);\n\t\t\ti++;\n\t\t}\n\tif ( i > 1 )\n\t\tvalue = \"calc(\" + value + \")\";\n\t\n\t//console.log(key, ':', value)\n\treturn target ? target[key] = value : value;\n}\n\nexport function muxer( key, value, target, data, initials, noPropLock ) {\n\t\n\tdata[key] = data[key] || [];\n\tlet seenUnits = [];\n\tif ( is.array(value) ) {\n\t\tfor ( let i = 0; i < value.length; i++ ) {\n\t\t\tmuxOne(key, value[i] || 0, target, data, initials, noPropLock, seenUnits)\n\t\t}\n\t}\n\telse {\n\t\tmuxOne(key, value || 0, target, data, initials, noPropLock)\n\t}\n\t\n\treturn demux;\n}\n\nexport function muxOne( key, value, target, data, initials, noPropLock, seenUnits ) {\n\t\n\tlet match = is.string(value) ? value.match(unitsRe) : false,\n\t unit = match && match[2] || defaultUnits[key] || \"px\",\n\t unitKey = units.indexOf(unit),\n\t realKey = unitKey !== -1 && (key + '_' + unitKey) || key;\n\t\n\tinitials[realKey] = defaultValue[key] || 0;\n\tdata[key][unitKey] = data[key][unitKey] || 0;\n\t//console.log(key, ':', data[key][unitKey], value, noPropLock)\n\t\n\tif ( seenUnits && seenUnits[unitKey] ) {\n\t\t//console.warn(key, ':', data[key][unitKey], value, noPropLock)\n\t\tif ( match ) {\n\t\t\ttarget[realKey] += parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] += parseFloat(value);\n\t\t}\n\t}\n\telse {\n\t\t\n\t\t!noPropLock && data[key][unitKey]++;\n\t\tif ( match ) {\n\t\t\ttarget[realKey] = parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] = parseFloat(value);\n\t\t}\n\t\tif ( seenUnits ) seenUnits[unitKey] = true;\n\t}\n\t\n\treturn demux;\n};\n\nexport const mux = muxer;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport rgba from \"color-rgba\";\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'),\n\t tmpKey = path.slice(0, path.length - 1).join('_');\n\t\n\t//console.log(\"dec\", tmpKey, path, dataMap[twKey])\n\tif ( !--dataMap[twKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\t//delete muxerMap[twKey];\n\t\t//delete cssMap[twKey];\n\t\t//console.log(\"delete\", twKey, path)\n\t}\n\tif ( !--dataMap[tmpKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\t//delete muxerMap[twKey];\n\t\t//delete cssMap[twKey];\n\t\t//console.log(\"delete\", tmpKey)\n\t}\n\t//}\n}\n\nexport function demux( key, tweenable, target, data ) {\n\tlet value = \"rgba(\" + tweenable[key + '_r'] + \", \" + tweenable[key + '_g'] + \", \" + tweenable[key + '_b'] + \", \" + tweenable[key + '_a'] + \")\";\n\treturn target ?\n\t target[key] = value : value;\n}\n\nexport function mux( key, value, target, data, initials, noPropLock ) {\n\tlet vect = rgba(value);\n\t\n\tdata[key] = data[key] || 0;\n\tdata[key + '_r'] = data[key + '_r'] || 0;\n\tdata[key + '_g'] = data[key + '_g'] || 0;\n\tdata[key + '_b'] = data[key + '_b'] || 0;\n\tdata[key + '_a'] = data[key + '_a'] || 0;\n\tif ( !noPropLock ) {\n\t\tdata[key] += 4;\n\t\tdata[key + '_r']++;\n\t\tdata[key + '_g']++;\n\t\tdata[key + '_b']++;\n\t\tdata[key + '_a']++;\n\t}\n\t\n\ttarget[key + '_r'] = vect[0];\n\ttarget[key + '_g'] = vect[1];\n\ttarget[key + '_b'] = vect[2];\n\ttarget[key + '_a'] = vect[3];\n\t\n\tinitials[key] = 0;\n\t\n\tinitials[key + '_r'] = 0;\n\tinitials[key + '_g'] = 0;\n\tinitials[key + '_b'] = 0;\n\tinitials[key + '_a'] = 1;\n\t\n\treturn demux;\n}\n","module.exports = require(\"d3-ease\");","module.exports = require(\"prop-types\");","/*\r\n * The MIT License (MIT)\r\n * Copyright (c) 2020. Nathanael Braun\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n *\r\n * @author : Nathanael Braun\r\n * @contact : n8tz.js@gmail.com\r\n */\r\nmodule.exports = {\r\n\t/**\r\n\t * Walk & set executables from globs requires\r\n\t * @param _target\r\n\t * @param path\r\n\t * @param value\r\n\t */\r\n\twalknSetExport( _target, path, value ) {\r\n\t\tlet fPath = path.split('/'),\r\n\t\t target = _target, i, module;\r\n\t\t\r\n\t\ti = 0;\r\n\t\twhile ( i < fPath.length - 1 ) target = target[fPath[i]] = target[fPath[i]] || {}, i++;\r\n\t\t\r\n\t\tmodule = Object.keys(value).length === 1 && value.default || value;\r\n\t\t\r\n\t\tif ( !target[fPath[i]] ) {\r\n\t\t\ttarget[fPath[i]] = module;\r\n\t\t}\r\n\t\telse if ( !target[fPath[i]].__esModule ) {// if this is simple path obj write over\r\n\t\t\tObject.assign(module, target[fPath[i]]);\r\n\t\t\ttarget[fPath[i]] = module;\r\n\t\t}\r\n\t}\r\n};","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport { floatCut, units, unitsRe } from \"../../cssUtils\";\n\nconst any = require('./any');\n\nconst defaultUnits = {\n left : 'px',\n right : 'px',\n top : 'px',\n bottom : 'px',\n width : 'px',\n height : 'px',\n perspective: 'px',\n },\n defaultBox = {\n left : 'x',\n right : 'x',\n top : 'y',\n bottom: 'y',\n width : 'x',\n height: 'y',\n }, defaultValue = {\n opacity: 0\n };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n let path = twKey.split('_'), tmpKey;// not optimal at all\n \n if ( path.length === 2 ) {\n //console.log(\"dec\", twKey, dataMap[path[0]][path[1]], keepValues)\n if ( !--dataMap[ path[ 0 ] ][ path[ 1 ] ] && !keepValues ) {\n delete tweenableMap[ twKey ];\n //dataMap[path[0]][path[1]] = undefined;\n }\n \n if ( !keepValues )\n while ( dataMap[ path[ 0 ] ].length && !dataMap[ path[ 0 ] ][ dataMap[ path[ 0 ] ].length - 1 ] )\n dataMap[ path[ 0 ] ].pop();\n \n if ( dataMap[ path[ 0 ] ].length === 0 && !keepValues ) {\n delete dataMap[ path[ 0 ] ];\n delete muxerMap[ path[ 0 ] ];\n if ( cssMap ) delete cssMap[ path[ 0 ] ];\n //console.log(\"delete\", path[0])\n }\n }\n else {\n console.log(\"wtf\", path)\n }\n}\n\nexport function demuxOne( unitKey, twVal, baseKey, data, box ) {\n let value = twVal,\n unit = units[ unitKey ] || defaultUnits[ baseKey ] || \"px\";\n \n if ( unit === 'box' ) {\n value = value * ( box[ defaultBox[ baseKey ] ] || box.x );\n unit = 'px';\n \n }\n if ( unit === 'bw' ) {\n value = value * box.x;\n unit = 'px';\n }\n if ( unit === 'bh' ) {\n value = value * box.y;\n unit = 'px';\n }\n if ( unit === 'bz' ) {\n value = value * box.z;\n unit = 'px';\n }\n return unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box, baseKey ) {\n let value, i = 0, y, rKey;\n \n value = \"\";\n \n //if ( key==\"height\" )\n //\tdebugger;\n \n if ( data[ key ].isString ) {\n target[ key ] = data[ key ].value;// + defaultUnits[key];\n return data[ key ].value;\n }\n \n for ( y = 0; y < data[ key ].length; y++ )\n if ( data[ key ][ y ] ) {\n rKey = key + \"_\" + y;\n if ( tweenable[ rKey ] < 0 )\n value += ( i\n ? \" - \"\n : \"-\" ) + demuxOne(y, -tweenable[ rKey ], baseKey || key, data, box);\n else\n value += ( i\n ? \" + \"\n : \"\" ) + demuxOne(y, tweenable[ rKey ], baseKey || key, data, box);\n i++;\n }\n if ( i > 1 )\n value = \"calc(\" + value + \")\";\n \n //console.log(key, ':', value)\n return target ? target[ key ] = value : value;\n}\n\nexport function muxer( key, value, target, data, initials, noPropLock ) {\n \n data[ key ] = data[ key ] || [];\n let seenUnits = [];\n if ( is.array(value) ) {\n for ( let i = 0; i < value.length; i++ ) {\n muxOne(key, value[ i ] || 0, target, data, initials, noPropLock, seenUnits)\n }\n }\n else {\n muxOne(key, value || 0, target, data, initials, noPropLock)\n }\n \n return demux;\n}\n\nexport function muxOne( key, value, target, data, initials, noPropLock, seenUnits ) {\n \n let match = is.string(value) ? value.match(unitsRe) : false,\n unit = match && match[ 2 ] || defaultUnits[ key ] || \"px\",\n unitKey = units.indexOf(unit),\n realKey = unitKey !== -1 && ( key + '_' + unitKey ) || key;\n \n initials[ realKey ] = defaultValue[ key ] || 0;\n data[ key ][ unitKey ] = data[ key ][ unitKey ] || 0;\n //\n if ( !match && is.string(value) ) {\n data[ key ].isString = true;\n data[ key ].value = value;\n return demux;\n }\n \n if ( seenUnits && seenUnits[ unitKey ] ) {\n //console.warn(key, ':', data[key][unitKey], value, noPropLock)\n if ( match ) {\n target[ realKey ] += parseFloat(match[ 1 ]);\n }\n else {\n target[ realKey ] += parseFloat(value);\n }\n }\n else {\n \n !noPropLock && data[ key ][ unitKey ]++;\n if ( match ) {\n target[ realKey ] = parseFloat(match[ 1 ]);\n }\n else {\n target[ realKey ] = parseFloat(value);\n }\n if ( seenUnits ) seenUnits[ unitKey ] = true;\n }\n \n return demux;\n};\n\nexport const mux = muxer;","module.exports = require(\"shortid\");","module.exports = require(\"color-rgba\");","module.exports = require(\"tween-axis\");","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport {floatCut, units, unitsRe} from \"../cssUtils\";\n\nconst\n\tdefaultUnits = {\n\t\tblur : 'px',\n\t\tbrightness: '%',\n\t\tcontrast : '%',\n\t\tdropShadow: true,\n\t\tgrayscale : '%',\n\t\thueRotate : 'deg',\n\t\tinvert : \"%\",\n\t\topacity : \"%\",\n\t\tsaturate : \"%\",\n\t\tsepia : \"%\"\n\t}, defaultValue = {};\n\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\tif ( path.length === 4 ) {\n\t\t//console.warn(\"dec\", twKey, dataMap[path[0]][path[1]][path[2]])\n\t\t// dec count on filter\n\t\tif ( !--dataMap[path[0]][path[1]][path[2]] && !keepValues ) {\n\t\t\tdelete dataMap[path[0]][path[1]][path[2]];\n\t\t}\n\t\t//if ( Object.keys(dataMap[path[0]][path[1]]).length === 0 && !keepValues )\n\t\t//\tdelete dataMap[path[0]][path[1]];\n\t\t\n\t\t// free filter layers\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !dataMap[path[0]][dataMap[path[0]].length - 1] )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\t\n\t\ttmpKey = path[0] + \"_\" + path[1] + \"_\" + path[2];\n\t\t\n\t\tif ( !--dataMap[tmpKey][path[3]] && !keepValues ) {\n\t\t\tdelete dataMap[tmpKey][path[3]];\n\t\t\t//dataMap[path[0]][path[3]] = undefined;\n\t\t\tdelete tweenableMap[twKey];\n\t\t\t//console.log(\"delete\", twKey)\n\t\t}\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[tmpKey].length && !dataMap[tmpKey][dataMap[tmpKey].length - 1] )\n\t\t\t\tdataMap[tmpKey].pop();\n\t\t\n\t\tif ( dataMap[tmpKey].length === 0 && !keepValues )\n\t\t\tdelete dataMap[tmpKey];\n\t\t\n\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\tdelete dataMap[path[0]];\n\t\t\tdelete muxerMap[path[0]];\n\t\t\tdelete cssMap[path[0]];\n\t\t}\n\t}\n\telse {\n\t\tconsole.log(\"wtf\", path)\n\t}\n}\n\nexport function demuxOne( unitIndex, dkey, twVal, baseKey, data, box ) {\n\tlet value = twVal,\n\t unit = units[unitIndex] || defaultUnits[baseKey];\n\t\n\t//if ( unit === 'box' ) {\n\t//\tvalue = value * (box[defaultBox[baseKey]] || box.x);\n\t//\tunit = 'px';\n\t//}\n\tif ( unit === 'bw' ) {\n\t\tvalue = value * box.x;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'wh' ) {\n\t\tvalue = value * box.y;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bz' ) {\n\t\tvalue = value * box.z;\n\t\tunit = 'px';\n\t}\n\t\n\tif ( unit === 'deg' )\n\t\tvalue = value % 360;\n\t\n\treturn unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\t//console.log(key)\n\tlet filters = \"\",\n\t tmpValue = {};\n\tlet ti = 0, tmap, fkey, unitKey, unitIndex, dkey, u, iValue, y = 0, value;\n\tfor ( ; ti < data[key].length; ti++ ) {\n\t\ttmap = data[key][ti];\n\t\tfor ( fkey in tmap )\n\t\t\tif ( tmap.hasOwnProperty(fkey) ) {\n\t\t\t\tdkey = key + '_' + ti + '_' + fkey;\n\t\t\t\tvalue = \"\";\n\t\t\t\ty = 0;\n\t\t\t\tfor ( unitIndex = 0; unitIndex < data[dkey].length; unitIndex++ )\n\t\t\t\t\tif ( data[dkey][unitIndex] ) {\n\t\t\t\t\t\tunitKey = dkey + \"_\" + unitIndex;\n\t\t\t\t\t\t//console.log(\"mux \", key, dkey, unitKey)\n\t\t\t\t\t\t\n\t\t\t\t\t\t//if ( !tweenable[unitKey] )\n\t\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\tiValue = demuxOne(unitIndex, dkey, tweenable[unitKey], fkey, data, box);\n\t\t\t\t\t\t//console.log(unitKey, tweenable[unitKey], iValue)\n\t\t\t\t\t\tif ( y && iValue[0] === '-' )\n\t\t\t\t\t\t\tiValue = \" - \" + iValue.substr(1);\n\t\t\t\t\t\telse if ( y )\n\t\t\t\t\t\t\tiValue = \" + \" + iValue;\n\t\t\t\t\t\tvalue += iValue;\n\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( y > 1 )\n\t\t\t\t\tvalue = \"calc(\" + value + \")\";\n\t\t\t\t\n\t\t\t\tif ( y > 0 )\n\t\t\t\t\tfilters += fkey + \"(\" + (value || \"0\") + \") \";\n\t\t\t}\n\t}\n\ttarget.filter = filters;\n\t\n}\n\nexport function muxOne( key, baseKey, value, target, data, initials, noPropLock, seenUnits ) {\n\t\n\tlet match = is.string(value) ? value.match(unitsRe) : false,\n\t unit = match && match[2] || defaultUnits[baseKey],\n\t unitKey = units.indexOf(unit),\n\t realKey = unitKey !== -1 && (key + '_' + unitKey) || key;\n\t\n\tinitials[realKey] = defaultValue[baseKey] || 0;\n\tdata[key][unitKey] = data[key][unitKey] || 0;\n\t//console.log(key, ':', realKey, data[key][unitKey], initials[realKey], noPropLock)\n\t\n\tif ( seenUnits && seenUnits[unitKey] ) {\n\t\tif ( match ) {\n\t\t\ttarget[realKey] += parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] += parseFloat(value);\n\t\t}\n\t}\n\telse {\n\t\t\n\t\t!noPropLock && data[key][unitKey]++;\n\t\tif ( match ) {\n\t\t\ttarget[realKey] = parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] = parseFloat(value);\n\t\t}\n\t\tif ( seenUnits ) seenUnits[unitKey] = true;\n\t}\n\t\n\treturn demux;\n};\nexport const mux = ( key, value, target, data, initials, noPropLock, reOrder ) => {\n\t\n\tdata[key] = data[key] || [];\n\t//initials[key] = 0;\n\t\n\tif ( !is.array(value) )\n\t\tvalue = [value];\n\tlet ti = 0, tmap, tFnKey, baseData, fValue, dkey, u, seenUnits;\n\tfor ( ; ti < value.length; ti++ ) {\n\t\ttmap = value[ti];\n\t\tbaseData = reOrder ? {} : { ...(data[key][ti] || {}) };\n\t\tfor ( tFnKey in tmap )\n\t\t\tif ( tmap.hasOwnProperty(tFnKey) ) {\n\t\t\t\tfValue = tmap[tFnKey];\n\t\t\t\tseenUnits = {};\n\t\t\t\tdkey = key + '_' + ti + '_' + tFnKey;\n\t\t\t\t\n\t\t\t\tbaseData[tFnKey] = baseData[tFnKey] || data[key][ti] && data[key][ti][tFnKey] || 0;\n\t\t\t\t!noPropLock && baseData[tFnKey]++;\n\t\t\t\t\n\t\t\t\t//console.warn(\"set \", key, dkey, noPropLock, baseData[tFnKey])\n\t\t\t\t\n\t\t\t\tdata[dkey] = data[dkey] || [];\n\t\t\t\tif ( is.array(fValue) ) {\n\t\t\t\t\tfor ( u = 0; u < fValue.length; u++ ) {\n\t\t\t\t\t\tmuxOne(dkey, tFnKey, fValue[u] || 0, target, data, initials, noPropLock, seenUnits)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmuxOne(dkey, tFnKey, fValue || 0, target, data, initials, noPropLock)\n\t\t\t\t}\n\t\t\t}\n\t\tdata[key][ti] =\n\t\t\treOrder\n\t\t\t? { ...baseData, ...(data[key][ti] || {}), ...baseData }\n\t\t\t:\n\t\t\tbaseData;\n\t\t//console.log(key, reOrder, data[key][ti], baseData)\n\t}\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\nexport * from \"./typed/shadow\";","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst defaultUnits = { opacity: 1 };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\t\n\tif ( !--dataMap[twKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\tdelete muxerMap[twKey];\n\t\tdelete cssMap[twKey];\n\t}\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\ttarget[key] = ~~(tweenable[key]);// + defaultUnits[key];\n\t\n}\n\n\nexport const mux = ( key, value, target, data, initials, noPropLock ) => {\n\t\n\t\n\tinitials[key] = 0;\n\ttarget[key] = ~~value;\n\tdata[key] = data[key] || 0;\n\t!noPropLock && data[key]++;\n\t\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst defaultUnits = { opacity: 1 };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\t\n\tif ( !--dataMap[twKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\tdelete muxerMap[twKey];\n\t\tdelete cssMap[twKey];\n\t}\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\tlet value = !!(tweenable[key]);\n\treturn target ? target[key] = value : value;\n}\n\n\nexport const mux = ( key, value, target, data, initials, noPropLock ) => {\n\t\n\tinitials[key] = defaultUnits[key] || 0;\n\ttarget[key] = value === false ? 0 : 1;\n\tdata[key] = data[key] || 0;\n\t!noPropLock && data[key]++;\n\t\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport * as number from \"./number\";\n\nconst\n alias = {\n top : '0%',\n bottom: '100%',\n center: '50%',\n left : '0%',\n right : '100%'\n };\n\nfunction demux( key, tweenable, target, data, box, offset ) {\n \n let count = data[ \"_\" + key ], v = '', nowhere = {};\n \n for ( let i = 0; i < count; i++ ) {\n number.demux(key + '_' + i, tweenable, nowhere, data, box, offset);\n v += nowhere[ key + '_' + i ] + ' ';\n }\n \n target[ key ] = v;\n}\n\n\nfunction release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n let path = twKey.split('_'), tmpKey;// not optimal at all\n \n //if ( path.length === 2 ) {\n //\tconsole.log(\"dec\", twKey, dataMap[path[0]][path[1]])\n //\tif ( !--dataMap[path[0]][path[1]] && !keepValues ) {\n //\t\tdelete tweenableMap[twKey];\n //\t\tdelete dataMap[path[0]][path[1]];\n //\t}\n //\n //\tif ( !keepValues )\n //\t\twhile ( dataMap[path[0]].length &&\n // !dataMap[path[0]][dataMap[path[0]].length - 1] ) dataMap[path[0]].pop(); if (\n // dataMap[path[0]].length === 0 && !keepValues ) { delete dataMap[path[0]]; delete\n // muxerMap[path[0]]; delete cssMap[path[0]]; console.log(\"delete\", path[0]) } } else\n // { console.log(\"wtf\", path) }\n}\n\nexport default ( count ) => ( {\n mux: ( key, value, target, data, initials, noPropLock ) => {\n let values = value.split(' '), v;\n \n data[ key ] = data[ key ] || 0;\n noPropLock && data[ key ]++;\n data[ \"_\" + key ] = count;\n \n for ( let i = 0; i < count; i++ ) {\n v = values[ i % values.length ];\n v = is.string(v) && alias[ v ] || v;\n number.mux(key + '_' + i, v, target, data, initials, noPropLock)\n }\n \n return demux;\n }, demux, release\n} )","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst defaultUnits = { opacity: 1 };\nimport {floatCut} from \"../../cssUtils\";\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\t\n\tif ( !--dataMap[twKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\tdelete muxerMap[twKey];\n\t\tdelete cssMap[twKey];\n\t}\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\ttarget[key] = Math.min(1, Math.max(0, floatCut(tweenable[key])));\n}\n\n\nexport const mux = ( key, value, target, data, initials, noPropLock ) => {\n\t\n\t\n\tinitials[key] = defaultUnits[key] || 0;\n\ttarget[key] = value;\n\tdata[key] = data[key] || 0;\n\t!noPropLock && data[key]++;\n\t\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport {floatCut, units, unitsRe} from \"../cssUtils\";\n\nconst defaultUnits = {\n\t //matrix : true,\n\t //translate : 'px',\n\t translateX : 'px',\n\t translateY : 'px',\n\t translateZ : 'px',\n\t scale : '',\n\t scaleZ : '',\n\t scaleX : '',\n\t scaleY : '',\n\t rotate : 'deg',\n\t //skew : 'deg',\n\t skewX : 'deg',\n\t skewY : 'deg',\n\t //matrix3d : true,\n\t //translate3d: true,\n\t //scale3d : true,\n\t //rotate3d : true,\n\t rotateX : 'deg',\n\t rotateY : 'deg',\n\t rotateZ : 'deg',\n\t perspective: 'px',\n },\n defaultBox = {\n\t translateX: 'x',\n\t translateY: 'y',\n\t translateZ: 'z',\n\t rotateX : 'x',\n\t rotateY : 'y',\n\t rotateZ : 'z',\n\t left : 'x',\n\t right : 'x',\n\t top : 'y',\n\t bottom : 'y',\n\t width : 'x',\n\t height : 'y',\n }, defaultValue = {\n\t //skew : 1,\n\t //skewX : 1,\n\t //skewY : 1,\n\t scale : 1,\n\t scaleX: 1,\n\t scaleY: 1,\n\t scaleZ: 1\n };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\tif ( path.length === 4 ) {\n\t\t//console.warn(\"dec\", twKey, dataMap[path[0]][path[1]][path[2]])\n\t\t// dec count on transform\n\t\tif ( !--dataMap[path[0]][path[1]][path[2]] && !keepValues ) {\n\t\t\tdelete dataMap[path[0]][path[1]][path[2]];\n\t\t}\n\t\t//if ( Object.keys(dataMap[path[0]][path[1]]).length === 0 && !keepValues )\n\t\t//\tdelete dataMap[path[0]][path[1]];\n\t\t\n\t\t// free transform layers\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !dataMap[path[0]][dataMap[path[0]].length - 1] )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\t\n\t\ttmpKey = path[0] + \"_\" + path[1] + \"_\" + path[2];\n\t\t\n\t\tif ( !--dataMap[tmpKey][path[3]] && !keepValues ) {\n\t\t\tdelete dataMap[tmpKey][path[3]];\n\t\t\t//dataMap[path[0]][path[3]] = undefined;\n\t\t\tdelete tweenableMap[twKey];\n\t\t\t//console.log(\"delete\", twKey)\n\t\t}\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[tmpKey].length && !dataMap[tmpKey][dataMap[tmpKey].length - 1] )\n\t\t\t\tdataMap[tmpKey].pop();\n\t\t\n\t\tif ( dataMap[tmpKey].length === 0 && !keepValues )\n\t\t\tdelete dataMap[tmpKey];\n\t\t\n\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\tdelete dataMap[path[0]];\n\t\t\tdelete muxerMap[path[0]];\n\t\t\tdelete cssMap[path[0]];\n\t\t}\n\t}\n\telse {\n\t\tconsole.log(\"wtf\", path)\n\t}\n}\n\nexport function demuxOne( unitIndex, dkey, twVal, baseKey, data, box ) {\n\tlet value = twVal,\n\t unit = units[unitIndex] || defaultUnits[baseKey];\n\t\n\tif ( unit === 'box' ) {\n\t\tvalue = value * (box[defaultBox[baseKey]] || box.x);\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bw' ) {\n\t\tvalue = value * box.x;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'wh' ) {\n\t\tvalue = value * box.y;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bz' ) {\n\t\tvalue = value * box.z;\n\t\tunit = 'px';\n\t}\n\t\n\tif ( unit === 'deg' )\n\t\tvalue = value % 360;\n\t\n\treturn unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\t//console.log(key)\n\tlet transforms = \"\",\n\t tmpValue = {};\n\tlet ti = 0, tmap, fkey, unitKey, unitIndex, dkey, u, iValue, y = 0, value;\n\tfor ( ; ti < data[key].length; ti++ ) {\n\t\ttmap = data[key][ti];\n\t\tfor ( fkey in tmap )\n\t\t\tif ( tmap.hasOwnProperty(fkey) ) {\n\t\t\t\tdkey = key + '_' + ti + '_' + fkey;\n\t\t\t\tvalue = \"\";\n\t\t\t\ty = 0;\n\t\t\t\tfor ( unitIndex = 0; unitIndex < data[dkey].length; unitIndex++ )\n\t\t\t\t\tif ( data[dkey][unitIndex] ) {\n\t\t\t\t\t\tunitKey = dkey + \"_\" + unitIndex;\n\t\t\t\t\t\t//console.log(\"mux \", key, dkey, unitKey)\n\t\t\t\t\t\t\n\t\t\t\t\t\t//if ( !tweenable[unitKey] )\n\t\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\tiValue = demuxOne(unitIndex, dkey, tweenable[unitKey], fkey, data, box);\n\t\t\t\t\t\t//console.log(unitKey, tweenable[unitKey], iValue)\n\t\t\t\t\t\tif ( y && iValue[0] === '-' )\n\t\t\t\t\t\t\tiValue = \" - \" + iValue.substr(1);\n\t\t\t\t\t\telse if ( y )\n\t\t\t\t\t\t\tiValue = \" + \" + iValue;\n\t\t\t\t\t\tvalue += iValue;\n\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( y > 1 )\n\t\t\t\t\tvalue = \"calc(\" + value + \")\";\n\t\t\t\t\n\t\t\t\tif ( y > 0 )\n\t\t\t\t\ttransforms += fkey + \"(\" + (value || \"0\") + \") \";\n\t\t\t}\n\t}\n\ttarget.transform = transforms;\n\t\n}\n\nexport function muxOne( key, baseKey, value, target, data, initials, noPropLock, seenUnits ) {\n\t\n\tlet match = is.string(value) ? value.match(unitsRe) : false,\n\t unit = match && match[2] || defaultUnits[baseKey],\n\t unitKey = units.indexOf(unit),\n\t realKey = unitKey !== -1 && (key + '_' + unitKey) || key;\n\t\n\tinitials[realKey] = defaultValue[baseKey] || 0;\n\tdata[key][unitKey] = data[key][unitKey] || 0;\n\t//console.log(key, ':', realKey, data[key][unitKey], initials[realKey], noPropLock)\n\t\n\tif ( seenUnits && seenUnits[unitKey] ) {\n\t\tif ( match ) {\n\t\t\ttarget[realKey] += parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] += parseFloat(value);\n\t\t}\n\t}\n\telse {\n\t\t\n\t\t!noPropLock && data[key][unitKey]++;\n\t\tif ( match ) {\n\t\t\ttarget[realKey] = parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] = parseFloat(value);\n\t\t}\n\t\tif ( seenUnits ) seenUnits[unitKey] = true;\n\t}\n\t\n\treturn demux;\n};\nexport const mux = ( key, value, target, data, initials, noPropLock, reOrder ) => {\n\t\n\tdata[key] = data[key] || [];\n\t//initials[key] = 0;\n\t\n\tif ( !is.array(value) )\n\t\tvalue = [value];\n\tlet ti = 0, tmap, tFnKey, baseData, fValue, dkey, u, seenUnits;\n\tfor ( ; ti < value.length; ti++ ) {\n\t\ttmap = value[ti];\n\t\tbaseData = reOrder ? {} : { ...(data[key][ti] || {}) };\n\t\tfor ( tFnKey in tmap )\n\t\t\tif ( tmap.hasOwnProperty(tFnKey) ) {\n\t\t\t\tfValue = tmap[tFnKey];\n\t\t\t\tseenUnits = {};\n\t\t\t\tdkey = key + '_' + ti + '_' + tFnKey;\n\t\t\t\t\n\t\t\t\tbaseData[tFnKey] = baseData[tFnKey] || data[key][ti] && data[key][ti][tFnKey] || 0;\n\t\t\t\t!noPropLock && baseData[tFnKey]++;\n\t\t\t\t\n\t\t\t\t//console.warn(\"set \", key, dkey, noPropLock, baseData[tFnKey])\n\t\t\t\t\n\t\t\t\tdata[dkey] = data[dkey] || [];\n\t\t\t\tif ( is.array(fValue) ) {\n\t\t\t\t\tfor ( u = 0; u < fValue.length; u++ ) {\n\t\t\t\t\t\tmuxOne(dkey, tFnKey, fValue[u] || 0, target, data, initials, noPropLock, seenUnits)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmuxOne(dkey, tFnKey, fValue || 0, target, data, initials, noPropLock)\n\t\t\t\t}\n\t\t\t}\n\t\tdata[key][ti] =\n\t\t\treOrder\n\t\t\t? { ...baseData, ...(data[key][ti] || {}), ...baseData }\n\t\t\t:\n\t\t\tbaseData;\n\t\t//console.log(key, reOrder, data[key][ti], baseData)\n\t}\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\nexport * from \"./typed/shadow\";","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\nexport * from \"./typed/color\";","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport React from 'react';\n\nconst TweenerContext = React.createContext(null);\nexport default TweenerContext","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of context software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and context permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport deepEqual from \"fast-deep-equal\";\nimport PropTypes from \"prop-types\";\nimport React from 'react';\n\nimport TweenerContext from \"./TweenerContext\";\n\nexport default ( {\n\t children,\n\t id,\n\t axe = id,\n\t scrollFirst, bounds,\n\t scrollableWindow, inertia, size, defaultPosition,\n\t items = [],\n } ) => {\n\tconst µ = React.useRef({}).current;\n\tReact.useEffect(\n\t\t() => {\n\t\t\treturn () => {\n\t\t\t\tif ( µ.tweenLines ) {\n\t\t\t\t\tObject.keys(µ.tweenLines)\n\t\t\t\t\t .forEach(axe => µ.previousTweener.rmScrollableAnim(µ.tweenLines[axe], axe));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tdelete µ.previousTweener;\n\t\t\t\tdelete µ.previousScrollable;\n\t\t\t}\n\t\t}\n\t)\n\treturn <TweenerContext.Consumer>\n\t\t{\n\t\t\ttweener => {\n\t\t\t\tif ( !µ.previousAxis || µ.previousAxis !== axe ) {//....\n\t\t\t\t\tµ.previousAxis = axe;\n\t\t\t\t\tµ.previousInertia = inertia;\n\t\t\t\t\ttweener.initAxis(axe, {\n\t\t\t\t\t\tinertia,\n\t\t\t\t\t\tsize,\n\t\t\t\t\t\tscrollableWindow,\n\t\t\t\t\t\tdefaultPosition,\n\t\t\t\t\t\tscrollFirst,\n\t\t\t\t\t\tscrollableBounds: bounds\n\t\t\t\t\t}, true);\n\t\t\t\t}\n\t\t\t\telse if ( !µ.previousInertia || µ.previousInertia !== inertia ) {//....\n\t\t\t\t\tµ.previousInertia = inertia;\n\t\t\t\t\tµ.previousAxis = axe;\n\t\t\t\t\ttweener.initAxis(axe, {\n\t\t\t\t\t\tinertia,\n\t\t\t\t\t\tsize,\n\t\t\t\t\t\tscrollableWindow,\n\t\t\t\t\t\tdefaultPosition,\n\t\t\t\t\t\tscrollFirst,\n\t\t\t\t\t\tscrollableBounds: bounds\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif ( !µ.previousTweener || µ.previousTweener !== tweener ) {// mk axe not modifiable\n\t\t\t\t\tµ.previousTweener && µ.lastTL && µ.previousTweener.rmScrollableAnim(µ.lastTL, µ.previousAxis);\n\t\t\t\t\tif ( items.length )\n\t\t\t\t\t\tµ.lastTL = tweener.addScrollableAnim(items, axe, size);\n\t\t\t\t\tµ.previousTweener = tweener;\n\t\t\t\t\tµ.previousTweens = items;\n\t\t\t\t}\n\t\t\t\telse if ( µ.previousTweens !== items && !(µ.previousTweens && deepEqual(items, µ.previousTweens)) ) {\n\t\t\t\t\tµ.lastTL && µ.previousTweener && µ.previousTweener.rmScrollableAnim(µ.lastTL, µ.previousAxis);\n\t\t\t\t\tµ.lastTL = null;\n\t\t\t\t\tif ( items.length )\n\t\t\t\t\t\tµ.lastTL = tweener.addScrollableAnim(items, axe, size);\n\t\t\t\t\tµ.previousTweens = items;\n\t\t\t\t}\n\t\t\t\treturn <React.Fragment/>;\n\t\t\t}\n\t\t}\n\t</TweenerContext.Consumer>;\n}\n//@todo : rewrite with hooks\n//export default class Axis extends React.Component {\n//\tstatic propTypes = {\n//\t\tid : PropTypes.string,\n//\t\taxe : PropTypes.string,\n//\t\titems : PropTypes.array,\n//\t\tbounds : PropTypes.object,\n//\t\tinertia : PropTypes.any,\n//\t\tdefaultPosition: PropTypes.number,\n//\t\tsize : PropTypes.any\n//\t};\n//\tstate = {};\n//\t\n//\tcomponentWillUnmount() {\n//\t\t\n//\t}\n//\t\n//\trender() {\n//\t\tlet {} = context.props;\n//\t}\n//}","/*\r\n * The MIT License (MIT)\r\n * Copyright (c) 2020. Nathanael Braun\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n *\r\n * @author : Nathanael Braun\r\n * @contact : n8tz.js@gmail.com\r\n */\r\n\r\n\r\nexport function isClassComponent(component) {\r\n return (\r\n typeof component === 'function' &&\r\n !!component.prototype.isReactComponent\r\n )\r\n}\r\nexport function isFunctionalComponent(Component) {\r\n return (\r\n typeof Component === 'function' // can be various things\r\n && !(\r\n Component.prototype // native arrows don't have prototypes\r\n && Component.prototype.isReactComponent // special property\r\n )\r\n );\r\n}\r\n\r\nexport function isReactComponent(component) {\r\n return (\r\n isClassComponent(component) ||\r\n isFunctionalComponent(component)\r\n )\r\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport deepEqual from \"fast-deep-equal\";\nimport is from \"is\";\nimport React from 'react';\nimport shortid from 'shortid';\n\nimport TweenerContext from \"./TweenerContext\";\n\nimport {isFunctionalComponent} from '../utils/react';\n\nfunction setTarget( anims, target ) {\n\treturn anims.map(\n\t\ttween => ({\n\t\t\t...tween,\n\t\t\ttarget\n\t\t})\n\t)\n}\n\n//@todo : rewrite with hooks & fix bug ( why does it work like that ? :D )\nexport default class Node extends React.Component {\n\t\n\tstatic propTypes = {};\n\tstate = {};\n\t__tweenableId = shortid.generate();\n\t\n\tcomponentWillUnmount() {\n\t\tif ( this._tweenAxisObj ) {\n\t\t\tObject.keys(this._tweenAxisObj)\n\t\t\t .forEach(axe => this._currentTweener.rmScrollableAnim(this._tweenAxisObj[axe], axe));\n\t\t\t\n\t\t}\n\t\tif ( this._currentTweener ) {\n\t\t\tthis._currentTweener.rmTweenRef(this.__tweenableId)\n\t\t\tthis._currentTweener.setRootRef(undefined);\n\t\t}\n\t\tdelete this._currentTweener;\n\t\tdelete this._tweenAxisObj;\n\t\tdelete this._previousScrollable;\n\t}\n\t\n\trender() {\n\t\tlet {\n\t\t\t children,\n\t\t\t id = this.__tweenableId,\n\t\t\t style, initial, pos, noRef, reset, tweener,\n\t\t\t isRoot,\n\t\t\t axes,\n\t\t\t refProp = \"nodeRef\",\n\t\t\t tweenLines = axes,\n\t\t\t tweenAxis = tweenLines,\n\t\t\t ...props\n\t\t } = this.props;\n\t\treturn <TweenerContext.Consumer>\n\t\t\t{\n\t\t\t\tparentTweener => {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tparentTweener = tweener || parentTweener;\n\t\t\t\t\t\n\t\t\t\t\tif ( !parentTweener ) {\n\t\t\t\t\t\tconsole.error(\"No voodoo tweener found in the context, is there any parent with asTweener ?\")\n\t\t\t\t\t\treturn <React.Fragment/>;\n\t\t\t\t\t}\n\t\t\t\t\t//console.warn(\"render : \", this.__tweenableId, this._currentTweener,\n\t\t\t\t\t// parentTweener, this._currentTweener !== parentTweener)\n\t\t\t\t\tlet twRef = parentTweener.tweenRef(id, children.props && children.props.style, style || initial,\n\t\t\t\t\t pos, noRef),\n\t\t\t\t\t axisItemsChange;\n\t\t\t\t\t\n\t\t\t\t\t//console.warn(\"render2 : \", this.__tweenableId,\n\t\t\t\t\t// this._currentTweener, parentTweener, this._currentTweener !==\n\t\t\t\t\t// parentTweener)\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ( this._currentTweener !== parentTweener || this._previousScrollable !== tweenAxis ) {\n\t\t\t\t\t\taxisItemsChange = this._tweenAxis !== tweenAxis && !(this._tweenAxis && deepEqual(tweenAxis, this._tweenAxis));\n\t\t\t\t\t\tif ( this._currentTweener && axisItemsChange ) {\n\t\t\t\t\t\t\tthis._tweenAxisObj && Object.keys(this._tweenAxisObj)\n\t\t\t\t\t\t\t .forEach(axe => this._currentTweener.rmScrollableAnim(this._tweenAxisObj[axe], axe));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//console.log(twRef, axisItemsChange, this._tweenAxis, tweenAxis)\n\t\t\t\t\t\tif ( this._currentTweener && this._currentTweener !== parentTweener ) {\n\t\t\t\t\t\t\tthis._currentTweener.rmTweenRef(id);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( axisItemsChange ) {\n\t\t\t\t\t\t\tthis._tweenAxis = tweenAxis;\n\t\t\t\t\t\t\tif ( tweenAxis && is.array(tweenAxis) )\n\t\t\t\t\t\t\t\tthis._tweenAxisObj = { scrollY: parentTweener.addScrollableAnim(setTarget(tweenAxis, id)) };\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tthis._tweenAxisObj = tweenAxis && Object.keys(tweenAxis)\n\t\t\t\t\t\t\t\t .reduce(( h, axe ) => (h[axe] = parentTweener.addScrollableAnim(setTarget(tweenAxis[axe], id), axe), h), {});\n\t\t\t\t\t\t\ttwRef = parentTweener.tweenRef(id, children.props && children.props.style, style || initial,\n\t\t\t\t\t\t\t pos, noRef)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttwRef.style = { ...parentTweener._updateTweenRef(id, true) };\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( this.props.hasOwnProperty(\"isRoot\") ) {\n\t\t\t\t\t\t\tthis._currentTweener && this._currentTweener.setRootRef(undefined);\n\t\t\t\t\t\t\ttweener.setRootRef(id);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis._currentTweener = parentTweener;\n\t\t\t\t\t\tthis._previousScrollable = tweenAxis;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if ( twRef ) {\n\t\t\t\t\t\ttwRef.style = { ...parentTweener._updateTweenRef(id, true) };\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlet RefChild = React.Children.only(children);\n\t\t\t\t\t\n\t\t\t\t\tif ( RefChild && React.isValidElement(RefChild) ) {//todo\n\t\t\t\t\t\tthis._lastRef = twRef;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( isFunctionalComponent(RefChild.type) )\n\t\t\t\t\t\t\treturn <RefChild.type\n\t\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t\t{...RefChild.props}\n\t\t\t\t\t\t\t\t{...twRef}\n\t\t\t\t\t\t\t\tref={undefined}\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t...{\n\t\t\t\t\t\t\t\t\t\t[refProp]: twRef.ref\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>;\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn <RefChild.type\n\t\t\t\t\t\t\t{...props}\n\t\t\t\t\t\t\t{...RefChild.props}\n\t\t\t\t\t\t\t{...twRef}/>;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconsole.error(\"Invalid voodoo Node child : \", id)\n\t\t\t\t\t}\n\t\t\t\t\treturn <div>Invalid</div>;\n\t\t\t\t}\n\t\t\t}\n\t\t</TweenerContext.Consumer>;\n\t}\n}\n\nNode.div = ( { children, className, ...props } ) => {\n\treturn <Node {...props}>\n\t\t<div className={className}>{children}</div>\n\t</Node>;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\n\nexport const re_cssValueWithUnit = new RegExp(\n\t\"([+-]?(?:[0-9]*[.])?[0-9]+)\\\\s*(\" +\n\t['box', 'bz', 'bh', 'bw', 'em', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax'].join('|')\n\t+ \")\"\n);\n\n/**\n * add any css val with it unit ( todo: optims&use objects for multi unit\n * @param val1\n * @param val2\n * @returns {Array}\n */\nexport function cssAdd( val1, val2, ...argz ) {\n\tif ( !is.array(val1) )\n\t\tval1 = [val1];\n\tif ( !is.array(val2) )\n\t\tval2 = [val2];\n\t\n\tlet units1 = val1.map(v => (v && v.match && v.match(re_cssValueWithUnit) || [, v || 0, 'px'])),\n\t units2 = val2.map(v => (v && v.match && v.match(re_cssValueWithUnit) || [, v || 0, 'px'])),\n\t remap = {}, result = [], i;\n\t\n\ti = 0;\n\twhile ( i < units1.length ) {\n\t\tremap[units1[i][2]] = remap[units1[i][2]] || 0;\n\t\tremap[units1[i][2]] += parseFloat(units1[i][1]);\n\t\ti++;\n\t}\n\ti = 0;\n\twhile ( i < units2.length ) {\n\t\tremap[units2[i][2]] = remap[units2[i][2]] || 0;\n\t\tremap[units2[i][2]] += parseFloat(units2[i][1]);\n\t\ti++;\n\t}\n\tObject.keys(remap)\n\t .forEach(\n\t\t unit => (result.push(remap[unit] + unit))\n\t );\n\treturn argz.length ? cssAdd(result, ...argz) : result;\n}\n\n/**\n * Multiply any css val with it unit ( todo: optims & use objects for multi unit\n * @param val1\n * @param val2\n * @returns {Array}\n */\nexport function cssMult( val1, val ) {\n\tif ( !is.array(val1) )\n\t\tval1 = [val1];\n\t\n\tlet units1 = val1.map(v => (v && v.match && v.match(re_cssValueWithUnit) || [, v || 0, 'px'])),\n\t remap = {}, result = [], i;\n\t\n\ti = 0;\n\twhile ( i < units1.length ) {\n\t\tremap[units1[i][2]] = remap[units1[i][2]] || 1;\n\t\tremap[units1[i][2]] = parseFloat(units1[i][1]) * val;\n\t\ti++;\n\t}\n\tObject.keys(remap)\n\t .forEach(\n\t\t unit => (result.push(remap[unit] + unit))\n\t );\n\treturn result;\n}\n\nexport function offset( items, start = 0 ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\treturn items.map(\n\t\titem => (\n\t\t\t{\n\t\t\t\t...item,\n\t\t\t\tfrom: item.from + start\n\t\t\t}\n\t\t)\n\t)\n}\n\nexport function scale( items, duration = 0, withOffset ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\t\n\t// get items current duration\n\tlet iDuration = 0;\n\titems.forEach(\n\t\titem => {\n\t\t\tiDuration = Math.max(iDuration, item.from + item.duration)\n\t\t}\n\t)\n\t\n\titems = items.map(\n\t\titem => (\n\t\t\t{\n\t\t\t\t...item,\n\t\t\t\tfrom : (item.from / iDuration) * duration,\n\t\t\t\tduration: (item.duration / iDuration) * duration\n\t\t\t}\n\t\t)\n\t)\n\treturn withOffset ? offset(items, withOffset) : items\n}\n\nfunction inverseValues( v ) {\n\tif ( is.number(v) )\n\t\treturn -v;\n\tif ( is.object(v) )\n\t\treturn Object.keys(v).reduce(( h, key ) => (h[key] = inverseValues(v[key]), h), {});\n\tif ( is.array(v) )\n\t\treturn v.map(( item ) => (inverseValues(item)));\n\t\n\tlet values = v.split(/(\\-?\\d+(?:\\.\\d+)?|\\-?\\.\\d+)/ig);\n\t\n\treturn values.map(\n\t\t( val, i ) => (i % 2 ? -parseFloat(val) : val)\n\t).join(\"\");\n}\n\nexport function reverse( items ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\t// get items current duration\n\tlet iDuration = 0;\n\titems.forEach(\n\t\titem => {\n\t\t\tiDuration = Math.max(iDuration, item.from + item.duration)\n\t\t}\n\t)\n\t\n\treturn items.map(\n\t\titem => {\n\t\t\titem =\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tfrom: iDuration - (item.from + item.duration),\n\t\t\t\t\t...(item.apply ? { apply: inverseValues(item.apply) } : undefined)\n\t\t\t\t};\n\t\t\treturn item;\n\t\t}\n\t)\n}\n\nconst MultiCssProps = { \"transform\": true, \"filter\": true, \"textShadow\": true, \"boxShadow\": true }\n\nexport function addCss( target, ...sources ) {\n\tlet source = sources.shift();\n\t\n\tfor ( const key in source ) {\n\t\tif ( !source.hasOwnProperty(key) )\n\t\t\tcontinue;\n\t\t\n\t\tif ( MultiCssProps[key] ) {\n\t\t\tif ( !target[key] ) {\n\t\t\t\ttarget[key] = [];\n\t\t\t}\n\t\t\tif ( !is.array(source[key]) ) {\n\t\t\t\taddCss(target[key], [source[key]]);\n\t\t\t}\n\t\t\telse addCss(target[key], source[key]);\n\t\t}\n\t\telse {\n\t\t\t// adding units\n\t\t\tif ( is.array(source[key]) ) {\n\t\t\t\tif ( !target[key] ) {\n\t\t\t\t\ttarget[key] = [];\n\t\t\t\t}\n\t\t\t\tif ( !is.array(target[key]) ) {\n\t\t\t\t\ttarget[key] = [...source[key], target[key]];\n\t\t\t\t}\n\t\t\t\telse target[key].push(...source[key]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( !target[key] ) {\n\t\t\t\t\tif ( !is.object(source[key]) ) {\n\t\t\t\t\t\ttarget[key] = source[key];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttarget[key] = { ...source[key] };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( is.object(target[key]) && is.object(source[key]) ) {\n\t\t\t\t\taddCss(target[key], source[key]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//else target[key].push(...source[key]);\n\t\t\t\t\ttarget[key] = addAllType(target[key], source[key])\n\t\t\t\t\t//console.log(key, target[key])\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\treturn sources.length && addCss(target, ...sources) || target;\n}\n\nfunction addAllType( v1, v2 ) {\n\tif ( !v1 )\n\t\treturn v2;\n\tif ( !v2 )\n\t\treturn v1;\n\tlet values1 = ('' + v1).split(/(\\-?\\d+(?:\\.\\d+)?|\\-?\\.\\d+)/ig),\n\t values2 = ('' + v2).split(/(\\-?\\d+(?:\\.\\d+)?|\\-?\\.\\d+)/ig),\n\t r = values1.map(\n\t\t ( val, i ) => (i % 2 ? parseFloat(val) + parseFloat(values2[i] || 0) : val)\n\t ).filter(i => (i !== ''));\n\t\n\treturn r.length === 1 ? parseInt(r[0]) : r.join(\"\")\n}\n\nexport function extractCss( items, inverse ) {\n\tlet css = {};\n\titems = is.array(items) ? items : items && [items] || items;\n\titems.forEach(\n\t\titem => {\n\t\t\taddCss(css, item.apply)\n\t\t}\n\t);\n\tif ( inverse )\n\t\tcss = inverseValues(css);\n\t\n\t\n\t//if ( inverse && css.hasOwnProperty('opacity') )\n\t//\tcss.opacity -= 1;\n\treturn css;\n}\n\nexport function target( items, target ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\treturn items.map(\n\t\titem => (\n\t\t\t{\n\t\t\t\t...item,\n\t\t\t\ttarget\n\t\t\t}\n\t\t)\n\t)\n}\n\nexport function shiftTransforms( items, shift = 1 ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\treturn items.map(\n\t\titem => {\n\t\t\tlet t = item.apply && item.apply.transform;\n\t\t\tif ( t ) {\n\t\t\t\tt = is.array(t) ? t : [t];\n\t\t\t\tfor ( let i = 0; i < shift; i++ )\n\t\t\t\t\tt.unshift({});\n\t\t\t\t\n\t\t\t\titem = { ...item, apply: { ...item.apply, transform: t } };\n\t\t\t}\n\t\t\treturn item;\n\t\t}\n\t)\n}","/* This is a virtual file generated by layer-pack */\nlet req, _exports = {}, walknSetExport=require('react-voodoo/.___layerPackIndexUtils').walknSetExport;\nconst _react_voodoo_utils_css_demux_filter_js = require(\"react-voodoo/utils/css/demux/filter.js\");\nwalknSetExport(_exports, \"filter\", _react_voodoo_utils_css_demux_filter_js);\nconst _react_voodoo_utils_css_demux_boxShadow_js = require(\"react-voodoo/utils/css/demux/boxShadow.js\");\nwalknSetExport(_exports, \"boxShadow\", _react_voodoo_utils_css_demux_boxShadow_js);\nconst _react_voodoo_utils_css_demux_transform_js = require(\"react-voodoo/utils/css/demux/transform.js\");\nwalknSetExport(_exports, \"transform\", _react_voodoo_utils_css_demux_transform_js);\nconst _react_voodoo_utils_css_demux_textShadow_js = require(\"react-voodoo/utils/css/demux/textShadow.js\");\nwalknSetExport(_exports, \"textShadow\", _react_voodoo_utils_css_demux_textShadow_js);\nconst _react_voodoo_utils_css_demux_backgroundColor_js = require(\"react-voodoo/utils/css/demux/backgroundColor.js\");\nwalknSetExport(_exports, \"backgroundColor\", _react_voodoo_utils_css_demux_backgroundColor_js);\n\nexport const backgroundColor = _exports.backgroundColor;\n\nexport const boxShadow = _exports.boxShadow;\n\nexport const filter = _exports.filter;\n\nexport const textShadow = _exports.textShadow;\n\nexport const transform = _exports.transform;\nexport default _exports;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\n\nimport {addCss} from \"../tweenTools\";\nimport {\n\texpandShorthandProperty, isShorthandProperty, isValidDeclaration\n} from \"./cssUtils\";\nimport cssDemuxers from \"./demux/(*).js\";\n\nimport {int, multi, number, ratio, color, any} from \"./demux/typed/(*).js\";\n\nconst cssDemux = {\n\t...cssDemuxers,\n\theight : number,\n\twidth : number,\n\ttop : number,\n\tleft : number,\n\tright : number,\n\tbottom : number,\n\tmarginTop : number,\n\tmarginLeft : number,\n\tmarginRight : number,\n\tmarginBottom : number,\n\tpaddingTop : number,\n\tpaddingLeft : number,\n\tpaddingRight : number,\n\tpaddingBottom : number,\n\tborderRadius : number,\n\tborderTopColor : color,\n\tborderLeftColor : color,\n\tborderRightColor : color,\n\tborderBottomColor: color,\n\tborderTopWidth : number,\n\tborderLeftWidth : number,\n\tborderRightWidth : number,\n\tborderBottomWidth: number,\n\ttransformOrigin : multi(2),\n\tzIndex : int,\n\topacity : ratio,\n};\n\n\nexport function clearTweenableValue( cssKey, twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\tcssDemux[path[0]]?.release(twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues)\n}\n\n/**\n * Interpolate float/int values to css basing the css prop type\n * @param tweenable {Object} map of tweenable values\n * @param css {Object} map of css value to be push in DOM\n * @param demuxers {Object} map of numeric to css converter\n * @param data {Object} map of converters contexts\n * @param box {Object} xyz of the parent viewbox\n */\nexport function muxToCss( tweenable, css, demuxers, data, box ) {\n\tObject.keys(demuxers)\n\t .forEach(\n\t\t ( key ) => {\n\t\t\t demuxers[key].demux(key, tweenable, css, data, box)\n\t\t }\n\t )\n}\n\n/**\n * Instanciate interpolators & init css/tweenable values basing the tween\n * @param tween\n * @param deMuxedTween\n * @param initials\n * @param data\n * @param demuxers\n * @param noPropLock\n * @param reOrder\n * @returns {{}}\n */\nexport function deMuxTween( tween, deMuxedTween, initials, data, demuxers, noPropLock, reOrder ) {\n\tlet fTween = {}, excluded = {};\n\ttween && Object.keys(tween)\n\t .forEach(\n\t\t ( key ) => {\n\t\t\t if ( cssDemux[key] )\n\t\t\t\t fTween[key] = tween[key];\n\t\t\t else if ( isValidDeclaration(key, tween[key]) ) {\n\t\t\t\t\n\t\t\t\t if ( isShorthandProperty(key) ) {\n\t\t\t\t\t expandShorthandProperty(key, tween[key], fTween);\n\t\t\t\t }\n\t\t\t\t else fTween[key] = tween[key];\n\t\t\t }\n\t\t\t else excluded[key] = tween[key];\n\t\t });\n\t\n\tfTween && Object.keys(fTween)\n\t .forEach(\n\t\t ( key ) => {\n\t\t\t if ( cssDemux[key] ) {//key, value, target, data, initials\n\t\t\t\t (demuxers[key] = cssDemux[key]).mux(key, fTween[key], deMuxedTween, data, initials, noPropLock, reOrder)\n\t\t\t }\n\t\t\t else\n\t\t\t\t (demuxers[key] = any).mux(key, fTween[key], deMuxedTween, data, initials, noPropLock, reOrder)\n\t\t }\n\t );\n\treturn excluded;\n}\n\n/**\n * Init/update muxers & initial css values of targets in a tween line / axis\n * @param tweenLine\n * @param initials\n * @param data\n * @param demuxers\n * @param noPropLock\n * @returns {*}\n */\nexport function deMuxLine( tweenLine, initials, data, demuxers, noPropLock ) {\n\tnoPropLock = noPropLock && {};\n\tlet allPropsById = {},\n\t twAxis = tweenLine.reduce(\n\t\t ( line, tween ) => {\n\t\t\t let demuxedTween = {};\n\t\t\t demuxers[tween.target] = demuxers[tween.target] || {};\n\t\t\t initials[tween.target] = initials[tween.target] || {};\n\t\t\t data[tween.target] = data[tween.target] || {};\n\t\t\t\n\t\t\t if ( !tween.type || tween.type === \"Tween\" ) {\n\t\t\t\t !noPropLock && addCss(allPropsById[tween.target] = allPropsById[tween.target] || {}, tween.apply);\n\t\t\t\t //console.log(\"merged\", tween.apply)\n\t\t\t\t deMuxTween(tween.apply, demuxedTween, initials[tween.target], data[tween.target], demuxers[tween.target], true);\n\t\t\t\t line.push(\n\t\t\t\t\t {\n\t\t\t\t\t\t ...tween,\n\t\t\t\t\t\t apply: demuxedTween\n\t\t\t\t\t });\n\t\t\t }\n\t\t\t else line.push({ ...tween });\n\t\t\t return line\n\t\t },\n\t\t []\n\t );\n\t//console.log(allPropsById)\n\t!noPropLock && Object.keys(allPropsById)\n\t .forEach(\n\t\t id => deMuxTween(allPropsById[id], {}, {}, data[id], demuxers[id])\n\t )\n\t;\n\treturn twAxis;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\n\n/**\n * Old school dom utils & events managers\n */\n\nlet\n is = require('is'),\n isBrowser = typeof window !== 'undefined',\n isTouch = isBrowser && ( function is_touch_device() {\n var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');\n var mq = function ( query ) {\n return window.matchMedia && window.matchMedia(query).matches;\n }\n \n if ( ( 'ontouchstart' in window ) || window.DocumentTouch && document instanceof DocumentTouch ) {\n return true;\n }\n \n // include the 'heartz' as a way to have a non matching MQ to help terminate the\n // join https://git.io/vznFH\n var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');\n return mq(query);\n }() ),\n _dom = isBrowser ? {\n prefix : ( /webkit/i ).test(navigator.appVersion) ? 'webkit' :\n ( /firefox/i ).test(navigator.userAgent) ? 'Moz' :\n ( /trident/i ).test(navigator.userAgent) ? 'ms' :\n 'opera' in window ? 'O' : '',\n dashedPrefix: ( /webkit/i ).test(navigator.appVersion) ? '-webkit-' :\n ( /firefox/i ).test(navigator.userAgent) ? '-moz-' :\n ( /trident/i ).test(navigator.userAgent) ? '-ms-' :\n 'opera' in window ? '-o-' : ''\n } : {\n prefix : '',\n dashedPrefix: ''\n },\n __ = {\n onPageHided : [],\n onPageShown : [],\n dragging : [],\n dragEnabled : [],\n dragEnabledDesc : [],\n fingers : {},\n nbFingers : 0,\n dragstartAnywhere: function ( e ) {\n let o,\n me = __,\n i = me.dragEnabled.indexOf(this),\n finger,\n desc, fingers = [];\n \n if ( i === -1 ) {\n return;\n }\n //e.preventDefault();\n //e.stopPropagation();\n \n if ( !me.nbFingers ) {\n Dom.addEvent(document,\n {\n 'touchmove': me.dragAnywhere,\n 'mousemove': me.dragAnywhere,\n 'touchend' : me.dropAnywhere,\n 'mouseup' : me.dropAnywhere,\n });\n Dom.addEvent(this,\n {\n 'click': me.dropWithoutClick\n }, null, null, null, true);\n }\n \n if ( e.changedTouches && e.changedTouches.length ) {\n fingers = e.changedTouches\n }\n else fingers.push(e);\n \n for ( let t = 0, ln = fingers.length; t < ln; t++ ) {\n finger = fingers[ t ];\n \n \n desc = me.dragEnabledDesc[ i ];\n \n if ( desc.nbFingers ) continue;\n \n me.nbFingers++;\n \n me.fingers[ finger.identifier ] = me.fingers[ finger.identifier ] || [];\n me.fingers[ finger.identifier ].push(desc);\n \n \n desc.nbFingers++;\n \n desc._startPos.x = _dom.prefix == 'MS' ? finger.x : finger.pageX;\n desc._startPos.y = _dom.prefix == 'MS' ? finger.y : finger.pageY;\n desc._startTs = e.timeStamp;\n \n \n desc._lastPos.x = _dom.prefix == 'MS' ? finger.x : finger.pageX;\n desc._lastPos.y = _dom.prefix == 'MS' ? finger.y : finger.pageY;\n \n for ( o = 0; o < desc.dragstart.length; o++ )\n desc.dragstart[ o ][ 0 ].call(desc.dragstart[ o ][ 1 ] ||\n this, e, finger, desc);\n }\n },\n dragAnywhere : function ( e ) {\n let o,\n me = __,\n finger, fingers = [], stopped,\n desc = __.dragging[ 0 ];\n \n \n if ( e.changedTouches && e.changedTouches.length ) {\n fingers = e.changedTouches\n }\n else fingers.push(e);\n \n for ( let i = 0, ln = fingers.length; i < ln; i++ ) {\n finger = fingers[ i ];\n desc = me.fingers[ finger.identifier ];\n me.fingers[ finger.identifier ] &&\n me.fingers[ finger.identifier ].forEach(\n desc => {\n if ( stopped ) {\n desc._lastPos.x = desc._startPos.x = _dom.prefix == 'MS'\n ? finger.x\n : finger.pageX;\n desc._lastPos.y = desc._startPos.y = _dom.prefix == 'MS'\n ? finger.y\n : finger.pageY;\n return;\n }\n desc._lastPos.x = _dom.prefix == 'MS' ? finger.x : finger.pageX;\n desc._lastPos.y = _dom.prefix == 'MS' ? finger.y : finger.pageY;\n \n for ( o = 0; o < desc.drag.length; o++ )\n stopped = desc.drag[ o ][ 0 ].call(desc.drag[ o ][ 1 ] || this, e,\n finger,\n desc) === false;\n }\n )\n \n }\n },\n dropWithoutClick : function ( e ) {\n if ( __.preventNextClick ) {\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n __.preventNextClick = false;\n }\n Dom.removeEvent(this,\n {\n 'click': this.dropWithoutClick\n });\n },\n dropAnywhere : function ( e ) {\n let o,\n me = __, finger, fingers = [],\n prevent;\n \n if ( e.changedTouches && e.changedTouches.length ) {\n fingers = e.changedTouches\n }\n else fingers.push(e);\n \n for ( let i = 0, ln = fingers.length; i < ln; i++ ) {\n finger = fingers[ i ];\n me.nbFingers--;\n me.fingers[ finger.identifier ] &&\n me.fingers[ finger.identifier ].forEach(\n desc => {\n \n \n desc.nbFingers--;\n prevent = prevent || desc.mouseDrag && ( e.timeStamp - desc._startTs > 250 );\n desc._lastPos.x = _dom.prefix == 'MS' ? finger.x : finger.pageX;\n desc._lastPos.y = _dom.prefix == 'MS' ? finger.y : finger.pageY;\n \n for ( o = 0; o < desc.dropped.length; o++ )\n desc.dropped[ o ][ 0 ].call(desc.dropped[ o ][ 1 ] ||\n this, e,\n finger, desc);\n \n \n }\n )\n me.fingers[ finger.identifier ] = null;\n }\n if ( prevent ) {\n me.preventNextClick = true;\n }\n if ( !me.nbFingers ) {\n Dom.removeEvent(document,\n {\n 'touchmove': me.dragAnywhere,\n 'mousemove': me.dragAnywhere,\n 'touchend' : me.dropAnywhere,\n 'mouseup' : me.dropAnywhere\n });\n }\n },\n getDraggable : function ( node, mouseDrag, touchDrag ) {\n let i = this.dragEnabled.indexOf(node), desc;\n if ( i === -1 ) {\n this.dragEnabled.push(node);\n this.dragEnabledDesc.push(\n desc = {\n mouseDrag,\n touchDrag,\n nbFingers: 0,\n locks : 0,\n _startPos: {\n x: 0,\n y: 0\n },\n _lastPos : {\n x: 0,\n y: 0\n },\n dragstart: [],\n drag : [],\n dragEnd : [],\n dropped : []\n }\n );\n //debugger;\n Dom.addEvent(node,\n {\n 'mousedown' : mouseDrag && this.dragstartAnywhere,\n 'touchstart': touchDrag && this.dragstartAnywhere\n }, null, null, null, true);\n }\n else desc = this.dragEnabledDesc[ i ];\n return desc;\n },\n freeDraggable : function ( node ) {\n let i = this.dragEnabled.indexOf(node), desc;\n if ( i !== -1 ) {\n this.dragEnabled.splice(i, 1);\n this.dragEnabledDesc.splice(i, 1);\n \n Dom.removeEvent(node,\n {\n 'mousedown' : this.dragstartAnywhere,\n 'touchstart': this.dragstartAnywhere\n });\n }\n },\n \n addEvent : function ( node, type, fn, bubble ) {\n if ( node.addEventListener ) {\n node.addEventListener(type, fn, bubble);\n }\n else if ( node.attachEvent ) {\n node.attachEvent('on' + type,\n fn.related = function ( e ) {\n return fn.call(node, e);\n });\n }\n },\n removeEvent: function ( node, type, fn, bubble ) {\n if ( node.removeEventListener ) {\n node.removeEventListener(type, fn, bubble);\n }\n else if ( node.attachEvent ) {\n node.detachEvent('on' + type, fn.related);\n }\n },\n rmDragFn : function ( arr, fn, scope ) {\n for ( let i = 0, ln = arr.length; i < ln; i++ ) {\n if ( arr[ i ][ 0 ] === fn )\n return arr.splice(i, 1);\n }\n \n console.warn(\"Rm event : Listener not found !!\");\n },\n },\n Dom = {\n addEvent : function ( node, type, fn, mouseDrag, touchDrag = true, bubble ) {\n if ( is.object(type) ) {\n for ( let o in type )\n if ( type.hasOwnProperty(o) && type[ o ] )\n this.addEvent(node, o, type[ o ], mouseDrag, touchDrag, bubble);\n return;\n }\n else if ( type === 'dragstart' ) {\n __.getDraggable(node, mouseDrag, touchDrag).dragstart.push([fn]);\n }\n else if ( type === 'drag' ) {\n __.getDraggable(node, mouseDrag, touchDrag).drag.push([fn]);\n }\n else if ( type === 'dropped' ) {\n __.getDraggable(node, mouseDrag, touchDrag).dropped.push([fn]);\n }\n else {\n if ( node.addEventListener ) {\n node.addEventListener(type, fn, { passive: false });\n }\n else if ( node.attachEvent ) {\n node.attachEvent('on' + type,\n fn.related = function ( e ) {\n return fn.call(node, e);\n });\n }\n }\n \n },\n removeEvent: function ( node, type, fn, scope, bubble ) {\n let i, desc;\n \n if ( is.object(type) ) {\n for ( let o in type )\n if ( type.hasOwnProperty(o) )\n this.removeEvent(node, o, type[ o ], scope);\n \n }\n else if ( /^(drag|drop)/.test(type) ) {\n desc = __.getDraggable(node);\n __.rmDragFn(desc[ type ], fn, scope);\n if ( !desc.dragstart.length\n && !desc.drag.length\n && !desc.dragEnd.length\n && !desc.dropped.length )\n __.freeDraggable(node);\n }\n else {\n if ( node.removeEventListener ) {\n node.removeEventListener(type, fn, bubble);\n }\n else if ( node.attachEvent ) {\n node.detachEvent('on' + type, fn.related);\n }\n }\n \n },\n offset : function ( elem ) {// @todo\n let dims = {\n top : 0,\n left : 0,\n width : elem.offsetWidth,\n height: elem.offsetHeight\n };\n while ( elem ) {\n dims.top = dims.top + parseInt(elem.offsetTop);\n dims.left = dims.left + parseInt(elem.offsetLeft);\n elem = elem.offsetParent;\n }\n return dims;\n },\n \n \n /**\n * Find the react component that generate element dom node\n * @param element\n * @returns {[React.Component]}\n */\n findReactParents( element ) {\n let fiberNode, comps = [element];\n for ( const key in element ) {\n \n if ( key.startsWith('__reactInternalInstance$') || key.startsWith('__reactFiber$') ) {\n fiberNode = element[ key ];\n while ( fiberNode.return ) {\n if ( fiberNode.stateNode && !comps.includes(fiberNode.stateNode) )\n comps.push(fiberNode.stateNode)\n fiberNode = fiberNode.return;\n }\n return comps;\n }\n }\n return element.parentNode && this.findReactParents(element.parentNode);\n }\n \n };\nexport default Dom;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport tweenAxis from \"tween-axis\";\n\n\nconst recyclableTweenAxis = [];\n\n/**\n * Override the TweenAxis Objects to automatically deal with recycling\n */\nexport default class CssTweenAxis extends tweenAxis {\n\t\n\tconstructor( cfg, scope ) {\n\t\tif ( recyclableTweenAxis.length ) {\n\t\t\tlet recyled = recyclableTweenAxis.pop();\n\t\t\trecyled.scope = scope;\n\t\t\tif ( is.array(cfg) ) {\n\t\t\t\trecyled.localLength = 1;\n\t\t\t\trecyled.mount(cfg, scope);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( cfg.Axis )\n\t\t\t\t\trecyled.mount(cfg.Axis, scope);\n\t\t\t}\n\t\t\treturn recyled;\n\t\t}\n\t\tsuper(...arguments)\n\t}\n\t\n\tdestroy() {\n\t\t\n\t\tthis.scope = undefined;\n\t\tthis.__marks.length = 0;\n\t\tthis.__marksLength.length = 0;\n\t\tthis.__marksKeys.length = 0;\n\t\tthis.__processors.length = 0;\n\t\tthis.__config.length = 0;\n\t\tthis.__activeForks.length = 0;\n\t\tthis.__activeProcess.length = 0;\n\t\t\n\t\tthis.__activeProcess.length = 0;\n\t\tthis.__outgoing.length = 0;\n\t\tthis.__incoming.length = 0;\n\t\tthis.__cPos = 0;\n\t\tthis.duration = 0;\n\t\tthis.__cIndex = 0;\n\t\tthis.__cMaxKey = 1;\n\t\trecyclableTweenAxis.push(this);\n\t}\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst\n\tis = require('is'),\n\teasingFn = require('d3-ease'),\n\tsignOf = function sign( x ) {\n\t\treturn typeof x === 'number' ? x ? x < 0 ? -1 : 1 : x === x ? x : NaN : NaN;\n\t},\n\tabs = Math.abs,\n\tfloor = Math.floor,\n\tround = Math.round,\n\tmin = Math.min,\n\tmax = Math.max,\n\tfloatCut = ( v = 0 ) => v.toFixed(3),\n\tconsts = {\n\t\tvelocityResetTm: .150,\n\t\tclickTm : 250\n\t};\n\n\n/**\n * Predict inertia dist & target basing velocity\n * @param _\n */\nexport function applyInertia( _ ) {\n\tlet velSign = signOf(_.lastVelocity);\n\t\n\tif ( _.disabled ) {\n\t\t_.loopsTarget = 0;\n\t\t_.loopsVelSum = 0;\n\t\t_.targetDist = 0;\n\t\t_.targetDuration = 0;\n\t}\n\telse {\n\t\t// calc momentum distance...\n\t\t// get nb loop needed to get vel < .05\n\t\t_.loopsTarget = floor(Math.log(.05 / abs(_.lastVelocity)) / Math.log(.9));\n\t\t\n\t\t// get velocity sum basing on nb loops needed\n\t\t_.loopsVelSum = (Math.pow(.9, _.loopsTarget) - abs(_.lastVelocity)) / (.9 - 1);\n\t\t\n\t\t// deduce real dist of momentum\n\t\t_.targetDist = (_.loopsVelSum * _.refFPS * velSign) / 1000 || 0;\n\t\t_.targetDuration = abs(_.loopsTarget * _.refFPS * velSign) || 0;\n\t\t//console.warn(\" _.targetDist\", _.targetDist, _.lastVelocity);\n\t}\n}\n\n/**\n * Main inertia class\n * @type {module.exports}\n */\nexport default class Inertia {\n\tstatic config = {\n\t\tbounds : true,\n\t\tsnapToBounds: true\n\t};\n\t\n\tconstructor( opt ) {\n\t\tlet _ = this._ = {};\n\t\t_.conf = {\n\t\t\t...this.constructor.config,\n\t\t\t...opt\n\t\t};\n\t\t\n\t\tthis.active = false;\n\t\t_.pos = opt.value || 0;\n\t\t_.refFPS = 16;\n\t\t_.min = opt.min || 0;\n\t\t_.max = opt.max || 0;\n\t\t_.currentStop = 0;\n\t\t_.lastInertiaPos = 0;\n\t\t_.stops = _.conf.stops;\n\t\t_.disabled = _.conf.disabled;\n\t\t_.wayPoints = _.conf.wayPoints;\n\t\t_.inertiaFn = easingFn.easePolyOut;\n\t\t_.targetWayPointIndex = 0;\n\t\t\n\t\tthis._detectCurrentSnap();\n\t}\n\t\n\tupdateConf( opt ) {\n\t\tlet _ = this._;\n\t\t_.min = opt.min || 0;\n\t\t_.max = opt.max || 0;\n\t\t_.stops = opt.stops;\n\t\t_.disabled = opt.disabled;\n\t\t_.wayPoints = opt.wayPoints;\n\t\t_.conf.willStop = opt.willStop;\n\t\t_.conf.willSnap = opt.willSnap;\n\t\t_.conf.shouldLoop = opt.shouldLoop;\n\t}\n\t\n\tstartMove() {\n\t\tlet _ = this._;\n\t\t_.baseTS = _.startTS = Date.now() / 1000;\n\t\t_.lastVelocity = _.lastIVelocity = 0;\n\t\t_.lastAccel = 0;\n\t\t_.posDiff = 0;\n\t\t_.loopsDiff = 0;\n\t\tthis.active = true;\n\t\tthis.holding = true;\n\t\t_.inertia = false;\n\t}\n\t\n\thold( nextPos ) {\n\t\tlet _ = this._,\n\t\t delta = _.lastHoldPos !== undefined ? nextPos - _.lastHoldPos : 0,\n\t\t loop,\n\t\t now = Date.now() / 1000,//e.timeStamp,\n\t\t sinceLastPos = (now - _.baseTS),\n\t\t pos = nextPos,//_.lastHoldPos + delta,\n\t\t iVel = delta / sinceLastPos;\n\t\t\n\t\t_.lastHoldPos = nextPos;\n\t\t//if (is.nan(pos))\n\t\t//\tdebugger\n\t\t\n\t\tif ( !_.lastBaseTs ) {// create base pts\n\t\t\t_.lastBasePos = nextPos;\n\t\t\t_.lastBaseTs = _.baseTS;\n\t\t}\n\t\t\n\t\tif ( sinceLastPos < .003 ) {\n\t\t\t//console.log(\"hold fast\", delta, _.baseTS, sinceLastPos);\n\t\t\t// skip/ignore\n\t\t}\n\t\telse if (// direction changed for velocityResetTm\n\t\t\t(\n\t\t\t\t(iVel <= 0 && _.lastVelocity > 0)\n\t\t\t\t||\n\t\t\t\t(iVel >= 0 && _.lastVelocity < 0)\n\t\t\t\t||\n\t\t\t\tabs(iVel) < abs(_.lastVelocity * 0.2)\n\t\t\t) &&\n\t\t\t(now - _.lastBaseTs) > consts.velocityResetTm\n\t\t) {\n\t\t\t//console.log(\"reset\", _.lastBaseTs, _.lastVelocity);\n\t\t\t_.lastBasePos = nextPos;\n\t\t\t_.lastBaseTs = now;\n\t\t\t_.lastVelocity = 0;\n\t\t\t_.lastIVelocity = 0;\n\t\t\t_.baseTS = now;\n\t\t\t_.targetDist = 0;\n\t\t\t_.lastInertiaPos = 0;\n\t\t}\n\t\telse if (// dir changed fast\n\t\t\t(iVel <= 0 && _.lastVelocity > 0)\n\t\t\t||\n\t\t\t(iVel >= 0 && _.lastVelocity < 0)\n\t\t\t||\n\t\t\tabs(iVel) < abs(_.lastVelocity * 0.2)\n\t\t) {\n\t\t\t//ignore\n\t\t}\n\t\telse {\n\t\t\t_.lastIVelocity = iVel;\n\t\t\t_.lastVelocity = ((pos) - (_.lastBasePos)) / (now - _.lastBaseTs);\n\t\t\t//if ( _.lastVelocity < -50 )\n\t\t\t//\tdebugger\n\t\t\t_.baseTS = now;\n\t\t\t_.targetDist = 0;\n\t\t\t_.lastInertiaPos = 0;\n\t\t\t// clear snap\n\t\t\t_.targetWayPoint = undefined;\n\t\t\t_.targetWayPointIndex = undefined;\n\t\t}\n\t\t\n\t\tif ( _.conf.bounds ) {\n\t\t\tif ( pos > _.max ) {\n\t\t\t\tpos = _.max// + min((pos - _.max) / 10, 10);\n\t\t\t}\n\t\t\telse if ( pos < _.min ) {\n\t\t\t\tpos = _.min// - min((_.min - pos) / 10, 10);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( _.conf.shouldLoop ) {\n\t\t\twhile ( (loop = _.conf.shouldLoop(pos, delta)) ) {\n\t\t\t\tpos += loop;\n\t\t\t}\n\t\t}\n\t\t_.pos = pos;\n\t\t\n\t}\n\t\n\trelease() {\n\t\tlet _ = this._,\n\t\t velSign = signOf(_.lastVelocity);\n\t\t\n\t\tthis.holding = false;\n\t\t\n\t\t// calc momentum distance...\n\t\tapplyInertia(_);\n\t\t\n\t\t_.lastHoldPos = undefined;\n\t\t\n\t\t_.lastBasePos = undefined;\n\t\t_.lastBaseTs = undefined;\n\t\t_.holding = false;\n\t\t\n\t\t//if ( _.conf.shouldLoop ) {\n\t\t//\tlet loop, nPos=_.pos + _.targetDist;\n\t\t//\twhile ( (loop = _.conf.shouldLoop(nPos, 0)) ) {\n\t\t//\t\tnPos += loop;\n\t\t//\t\tif ( _.inertia ) {\n\t\t//\t\t\t//_.targetDist+=loop;\n\t\t//\t\t\t//_.lastInertiaPos+=loop;\n\t\t//\t\t}\n\t\t//\t\t//this.teleport(loop);\n\t\t//\t}\n\t\t//\tif (nPos!==_.pos + _.targetDist)\n\t\t//}\n\t\tif ( _.conf.bounds && _.conf.snapToBounds ) {\n\t\t\tif ( (_.pos + _.targetDist) > _.max ) {\n\t\t\t\t_.targetDist = _.max - _.pos;\n\t\t\t\t_.targetDuration = abs(_.targetDist * 10);\n\t\t\t}\n\t\t\telse if ( (_.pos + _.targetDist) < _.min ) {\n\t\t\t\t\n\t\t\t\t_.targetDist = _.min - _.pos;\n\t\t\t\t_.targetDuration = abs(_.targetDist * 10);\n\t\t\t}\n\t\t}\n\t\t//else {\n\t\tif ( !_.targetDuration )\n\t\t\t_.targetDuration = 50;\n\t\t\n\t\t//console.log(_);\n\t\tthis.active = true;\n\t\t_.inertia = true;\n\t\t_.lastInertiaPos = 0;\n\t\t_.inertiaStartTm =\n\t\t\t_.inertiaLastTm = Date.now();\n\t\t\n\t\t\n\t\t//}\n\t\tthis._doSnap(null, 500)\n\t\t_.conf.willEnd?.(_.targetDist + _.pos, _.targetDist, _.targetDuration);\n\t}\n\t\n\tupdate( at = Date.now() ) {\n\t\tlet _ = this._, nextValue, loop;\n\t\tlet\n\t\t\tpos = _.inertiaFn((at - _.inertiaStartTm) / _.targetDuration) * _.targetDist;\n\t\t\n\t\tif ( !_.inertia ) {\n\t\t\t//if ( _.conf.shouldLoop ) {\n\t\t\t//\twhile ( (loop = _.conf.shouldLoop(_.pos, 0)) ) {\n\t\t\t//\t\tthis.teleport(loop);\n\t\t\t//\t}\n\t\t\t//}\n\t\t\treturn _.pos;\n\t\t}\n\t\tlet\n\t\t\tdelta = pos - _.lastInertiaPos;\n\t\t_.lastInertiaPos = pos;\n\t\t\n\t\tif ( (at - _.inertiaStartTm) >= _.targetDuration ) {\n\t\t\t_.inertia = this.active = false;\n\t\t\t_.lastInertiaPos = delta = 0;\n\t\t\t_.targetDist = 0;\n\t\t\tif ( _.targetWayPoint ) {\n\t\t\t\tdelta = _.targetWayPoint.at - _.pos;\n\t\t\t\t//console.log(\"snap done \", _.targetWayPoint, _.pos + delta);\n\t\t\t\t_.currentWayPoint = _.targetWayPoint;\n\t\t\t\t_.currentWayPointIndex = _.targetWayPointIndex;\n\t\t\t\t_.targetWayPoint = null;\n\t\t\t\t_.targetWayPointIndex = null;\n\t\t\t\t//_.lastSnapTm = Date.now();\n\t\t\t}\n\t\t\t\n\t\t\tif ( _.conf.onInertiaEnd ) {\n\t\t\t\t_.conf.onInertiaEnd(_.pos, _.currentWayPoint)\n\t\t\t}\n\t\t}\n\t\t\n\t\tdelta = delta || 0;\n\t\t//console.log(_.pos + delta);\n\t\tnextValue = _.pos + delta;\n\t\t\n\t\tif ( _.conf.shouldLoop ) {\n\t\t\tlet t = nextValue;\n\t\t\twhile ( (loop = _.conf.shouldLoop(nextValue, delta)) ) {\n\t\t\t\t//console.warn(\"loop update\", loop, nextValue);\n\t\t\t\tnextValue += loop;\n\t\t\t\tif ( _.inertia ) {\n\t\t\t\t\t//_.targetDist+=loop;\n\t\t\t\t\t//_.lastInertiaPos+=loop;\n\t\t\t\t}\n\t\t\t\t//this.teleport(loop);\n\t\t\t}\n\t\t}\n\t\t\n\t\t_.pos = nextValue;\n\t\t\n\t\treturn nextValue;\n\t}\n\t\n\tsetPos( pos ) {\n\t\tlet _ = this._, nextValue;\n\t\t_.inertia = false;\n\t\tthis.active = false;\n\t\t_.lastInertiaPos = 0;\n\t\t_.targetDist = 0;\n\t\t_.inertiaStartTm = 0;\n\t\t_.inertiaLastTm = 0;\n\t\t_.targetDuration = 0;\n\t\t\n\t\tif ( _.conf.shouldLoop ) {\n\t\t\tlet loop, nextValue = pos;\n\t\t\twhile ( (loop = _.conf.shouldLoop(nextValue, _.pos - pos)) ) {\n\t\t\t\tnextValue += loop;\n\t\t\t\t//this.teleport(loop);\n\t\t\t\t//console.warn(\"loop update\", nextValue, pos);\n\t\t\t}\n\t\t\tpos = nextValue;\n\t\t}\n\t\t_.pos = pos;\n\t\tif ( _.conf.bounds ) {\n\t\t\t_.pos = max(_.pos, _.min);\n\t\t\t_.pos = min(_.pos, _.max);\n\t\t}\n\t}\n\t\n\tsetWayPoints( wayPoints ) {\n\t\tlet _ = this._, nextValue;\n\t\t_.wayPoints = wayPoints;\n\t\tthis._detectCurrentSnap();\n\t}\n\t\n\tteleport( loopDist ) {\n\t\tlet _ = this._, nextValue;\n\t\tif ( !_.inertia )\n\t\t\treturn _.pos += loopDist;\n\t\t\n\t\t//_.lastInertiaPos += loopDist;\n\t\t_.pos += loopDist\n\t\t//console.log(\"setPos\", _.lastInertiaPos);\n\t}\n\t\n\tdispatch( delta, tm = 500 ) {\n\t\tlet _ = this._,\n\t\t now = Date.now(),\n\t\t pos;\n\t\t\n\t\tthis.active = true;\n\t\t\n\t\t// if no inertia has started || if direction has change\n\t\tif ( !_.inertia || signOf(delta) !== signOf(_.targetDist) ) {\n\t\t\t_.inertia = true;\n\t\t\t_.lastInertiaPos = 0;\n\t\t\t_.inertiaStartTm =\n\t\t\t\t_.inertiaLastTm = now;\n\t\t\t\n\t\t\t_.targetDist = delta;\n\t\t\t_.targetDuration = tm;\n\t\t}\n\t\telse {\n\t\t\t//_.inertiaStartTm =\n\t\t\t//_.inertiaLastTm = now;\n\t\t\t//_.lastInertiaPos = 0;\n\t\t\t_.targetDist += delta;\n\t\t\t_.targetDuration += tm / 2;\n\t\t}\n\t\t//\n\t\t//if ( _.conf.maxJump ) {\n\t\t//\n\t\t//}\n\t\t\n\t\tif ( _.conf.bounds ) {\n\t\t\tif ( (_.pos + _.targetDist) > _.max ) {\n\t\t\t\t\n\t\t\t\t_.targetDist = _.max - _.pos;\n\t\t\t\t_.targetDuration = abs(_.targetDist * 10);\n\t\t\t}\n\t\t\telse if ( (_.pos + _.targetDist) < _.min ) {\n\t\t\t\t\n\t\t\t\t_.targetDist = _.min - _.pos;\n\t\t\t\t_.targetDuration = abs(_.targetDist * 10);\n\t\t\t}\n\t\t}\n\t\tthis._doSnap(signOf(delta), 750)\n\t}\n\t\n\t\n\t_detectCurrentSnap() {\n\t\tlet _ = this._,\n\t\t pos = _.pos,\n\t\t i;\n\t\t\n\t\tif ( _.wayPoints && _.wayPoints.length ) {\n\t\t\tfor ( i = 0; i < _.wayPoints.length; i++ )\n\t\t\t\tif ( floatCut(_.wayPoints[i].at) === floatCut(pos) ) {\n\t\t\t\t\t_.currentWayPoint = _.wayPoints[i];\n\t\t\t\t\t_.currentWayPointIndex = i;\n\t\t\t\t\t//console.warn(\"snap set\", i);\n\t\t\t\t\t\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t}\n\t}\n\t\n\t_doSnap( forceSnap, maxDuration = 2000 ) {\n\t\tlet _ = this._,\n\t\t pos = _.targetDist + (_.pos - (_.lastInertiaPos || 0)),\n\t\t lPos = pos,\n\t\t loopDec = 0,\n\t\t target,\n\t\t mid,\n\t\t i,\n\t\t loop;\n\t\t\n\t\tif ( _.wayPoints && _.wayPoints.length ) {\n\t\t\t\n\t\t\t// apply loops to do to find the final wayPoint\n\t\t\tif ( _.conf.shouldLoop ) {\n\t\t\t\twhile ( (loop = _.conf.shouldLoop(lPos, 0)) ) {\n\t\t\t\t\tlPos += loop;\n\t\t\t\t\tloopDec += loop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor ( i = 0; i < _.wayPoints.length; i++ )\n\t\t\t\tif ( _.wayPoints[i].at > lPos )\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tif ( i === _.wayPoints.length ) {\n\t\t\t\ti--\n\t\t\t}\n\t\t\telse if ( i === 0 ) {\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmid = (_.wayPoints[i].at - _.wayPoints[i - 1].at) / 2;\n\t\t\t\tmid = _.wayPoints[i - 1].at + (mid * ((_.wayPoints[i].gravity || 1) / (_.wayPoints[i - 1].gravity || 1)));\n\t\t\t\t\n\t\t\t\tif ( forceSnap ) forceSnap < 0 && i--;\n\t\t\t\telse if ( lPos < mid ) i--;\n\t\t\t}\n\t\t\t\n\t\t\tif ( _.conf.maxJump && is.number(_.currentWayPointIndex) ) {\n\t\t\t\tlet d = (i - _.currentWayPointIndex);\n\t\t\t\t//console.log('Inertia::_doSnap:154: ', i, d);\n\t\t\t\tif ( abs(d) > _.conf.maxJump ) {\n\t\t\t\t\t//console.log('max: ', i, d);\n\t\t\t\t\ti = _.currentWayPointIndex + signOf(d) * _.conf.maxJump;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget = _.wayPoints[i].at;\n\t\t\t\n\t\t\tif ( _.conf.willSnap ) {\n\t\t\t\t_.conf.willSnap(i, _.wayPoints[i]);\n\t\t\t}\n\t\t\t\n\t\t\t_.lastInertiaPos = _.lastInertiaPos || 0;\n\t\t\ttarget = target - (_.pos - _.lastInertiaPos) - loopDec;\n\t\t\t_.targetDuration = max(50, min(maxDuration, abs((_.targetDuration / _.targetDist) * target))) || 0;\n\t\t\t//console.log(\"do snap\", i, target, loopDec);\n\t\t\t_.targetDist = target;\n\t\t\t_.targetWayPoint = _.wayPoints[i];\n\t\t\t_.targetWayPointIndex = i;\n\t\t}\n\t\telse {\n\t\t\ttarget = ~~(_.pos - _.lastInertiaPos);\n\t\t\t\n\t\t\tif ( !_.conf.infinite ) {\n\t\t\t\tif ( target > _.max ) {\n\t\t\t\t\ttarget = _.max - target;\n\t\t\t\t\t_.targetDuration = min(maxDuration, abs((_.targetDuration / _.targetDist) * target));\n\t\t\t\t\t_.targetDist = target;\n\t\t\t\t}\n\t\t\t\telse if ( target < _.min ) {\n\t\t\t\t\ttarget = _.min - target;\n\t\t\t\t\t_.targetDuration = min(maxDuration, abs((_.targetDuration / _.targetDist) * target));\n\t\t\t\t\t_.targetDist = target;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\tsetBounds( min, max ) {\n\t\tlet _ = this._;\n\t\t//console.log('Inertia::setBounds:245: ', min, max);\n\t\t_.min = min;\n\t\t_.max = max;\n\t}\n\t\n\tisInbound( nextPos ) {\n\t\tlet _ = this._, loop,\n\t\t delta = _.lastHoldPos !== undefined ? nextPos - _.lastHoldPos : 0,\n\t\t pos = (_.targetDist || 0) + (_.pos - (_.lastInertiaPos || 0)) + delta;\n\t\t//if ( _.conf.infinite ) return false;\n\t\t//\n\t\t//if ( _.conf.shouldLoop ) {\n\t\t//\twhile ( (loop = _.conf.shouldLoop(nextValue)) ) {\n\t\t//!(pos >= _.min && pos <= _.max) && console.warn(\"out\", _.pos, pos, delta);\n\t\t//\t\tpos += loop;\n\t\t//\t}\n\t\t//}\n\t\treturn pos >= _.min && pos <= _.max;\n\t}\n\t\n}\n","/*\r\n * The MIT License (MIT)\r\n * Copyright (c) 2020. Nathanael Braun\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n *\r\n * @author : Nathanael Braun\r\n * @contact : n8tz.js@gmail.com\r\n */\r\n\r\nimport * as easingFn from \"d3-ease\";\r\nimport deepEqual from \"fast-deep-equal\";\r\nimport is from \"is\";\r\nimport React from \"react\";\r\nimport ReactDom from \"react-dom\";\r\nimport TweenerContext\r\n from \"../comps/TweenerContext\";\r\nimport {clearTweenableValue, deMuxLine, deMuxTween, muxToCss} from \"../utils/css\";\r\nimport tweenAxis\r\n from \"../utils/CssTweenAxis\";\r\nimport domUtils from \"../utils/dom\";\r\nimport Inertia from '../utils/inertia';\r\n\r\n\r\nlet isBrowserSide = (new Function(\"try {return this===window;}catch(e){ return false;}\"))(),\r\n isArray = is.array,\r\n _live, lastTm, _running = [];\r\n\r\n\r\nconst Runner = {\r\n\trun : function ( tl, ctx, duration, cb ) {\r\n\t\tlet apply = ( pos, size ) => tl.go(pos / size, ctx);\r\n\t\t_running.push({ apply, duration, cpos: 0, cb });\r\n\t\ttl.go(0, ctx, true);//reset tl\r\n\t\t\r\n\t\tif ( !_live ) {\r\n\t\t\t_live = true;\r\n\t\t\tlastTm = Date.now();\r\n\t\t\t// console.log(\"TL runner On\");\r\n\t\t\tsetTimeout(this._tick, 16);\r\n\t\t}\r\n\t},\r\n\t_tick: function _tick() {\r\n\t\tlet i = 0, o, tm = Date.now(), delta = tm - lastTm;\r\n\t\tlastTm = tm;\r\n\t\tfor ( ; i < _running.length; i++ ) {\r\n\t\t\t_running[i].cpos = Math.min(delta + _running[i].cpos, _running[i].duration);//cpos\r\n\t\t\t_running[i].apply(\r\n\t\t\t\t_running[i].cpos, _running[i].duration\r\n\t\t\t);\r\n\t\t\t// console.log(\"TL runner \",_running[i][3]);\r\n\t\t\tif ( _running[i].cpos == _running[i].duration ) {\r\n\t\t\t\t\r\n\t\t\t\t_running[i].cb && setTimeout(_running[i].cb);\r\n\t\t\t\t_running.splice(i, 1), i--;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ( _running.length )\r\n\t\t\tsetTimeout(_tick, 16);\r\n\t\telse {\r\n\t\t\t// console.log(\"TL runner Off\");\r\n\t\t\t_live = false;\r\n\t\t}\r\n\t},\r\n};\r\n/**\r\n * The main tweener component\r\n */\r\nexport default class Tweener extends React.Component {\r\n\t\r\n\tconstructor( props ) {\r\n\t\tsuper(...arguments);\r\n\t\tlet _ = this._ = {\r\n\t\t\trefs : {},\r\n\t\t\tmuxByTarget: {},\r\n\t\t};\r\n\t\t_.box = {\r\n\t\t\tx: 100,\r\n\t\t\ty: 100,\r\n\t\t\tz: 800\r\n\t\t};\r\n\t\tthis.__isTweener = true;\r\n\t\t_._rafLoop = this._rafLoop.bind(this);\r\n\t\t_.rootRef = this.props.forwardedRef || React.createRef();\r\n\t\t_.options = {\r\n\t\t\tmaxClickTm : 200,\r\n\t\t\tmaxClickOffset: 5,\r\n\t\t\t...(props.tweenerOptions || {})\r\n\t\t};\r\n\t\t_.tweenRefCSS = {};\r\n\t\t_.tweenRefs = {};\r\n\t\t_.tweenRefMaps = {};\r\n\t\t_.iMapOrigin = {};\r\n\t\t_.tweenRefInitialData = {};\r\n\t\t_.tweenEnabled = true;\r\n\t\t_.tweenRefOrigin = {};\r\n\t\t_.tweenRefOriginCss = {};\r\n\t\t_.muxDataByTarget = _.muxDataByTarget || {};\r\n\t\t_.tweenRefDemuxed = _.tweenRefDemuxed || {};\r\n\t\t_.tweenRefTargets = _.tweenRefTargets || [];\r\n\t\t_.runningAnims = _.runningAnims || [];\r\n\t\t\r\n\t\t_.scrollHook = [];\r\n\t\t_.activeInertia = [];\r\n\t\tisBrowserSide && window.addEventListener(\r\n\t\t\t\"resize\",\r\n\t\t\tthis._.onResize = ( e ) => {//@todo\r\n\t\t\t\tthis._updateBox();\r\n\t\t\t\tthis._updateTweenRefs();\r\n\t\t\t\t_.rootRef?.current?.windowDidResize?.(e);\r\n\t\t\t});\r\n\t}\r\n\t\r\n\taxes = {};\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// -------------------- TweenRefs utils -----------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t/**\r\n\t * Register tweenable element\r\n\t * return its current style\r\n\t * @param id\r\n\t * @param iStyle\r\n\t * @param iMap\r\n\t * @param pos\r\n\t * @param noref\r\n\t * @param mapReset\r\n\t * @returns {style,ref}\r\n\t */\r\n\ttweenRef( id, iStyle = {}, iMap = {}, pos, noref, mapReset ) {// ref initial style\r\n\t\t\r\n\t\t\r\n\t\tlet _ = this._,\r\n\t\t tweenableMap = {};\r\n\t\t\r\n\t\tlet initials = {};\r\n\t\tif ( !_.tweenRefs[id] )\r\n\t\t\t_.tweenRefTargets.push(id);\r\n\t\t\r\n\t\t//debugger\r\n\t\t//console.warn('ref ', id, { ...iMap })\r\n\t\t\r\n\t\tif ( _.tweenRefs[id] && (\r\n\t\t\tmapReset\r\n\t\t\t|| (_.iMapOrigin[id] !== iMap && !deepEqual(iMap, _.iMapOrigin[id]))\r\n\t\t\t|| (_.tweenRefOriginCss[id] !== iStyle && !deepEqual(iStyle, _.tweenRefOriginCss[id]))\r\n\t\t) ) {\r\n\t\t\t// hot switch initial values\r\n\t\t\t//console.warn('ref exist & style is !==', id, iStyle,\r\n\t\t\t// _.tweenRefOriginCss[id], mapReset)\r\n\t\t\t_.iMapOrigin[id] = iMap;\r\n\t\t\t_.tweenRefOriginCss[id] = iStyle;\r\n\t\t\tiStyle = iStyle || {};\r\n\t\t\tiMap = iMap || {};\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tiStyle = { ...iStyle, ...deMuxTween(iMap, tweenableMap, initials, _.muxDataByTarget[id], _.muxByTarget[id], false, true) };\r\n\t\t\t\r\n\t\t\t//console.log(\"update ref\", id)\r\n\t\t\t\r\n\t\t\t// minus initial values\r\n\t\t\tObject.keys(_.tweenRefOrigin[id])\r\n\t\t\t .forEach(\r\n\t\t\t\t key => (_.tweenRefMaps[id][key] -= _.tweenRefOrigin[id][key])\r\n\t\t\t );\r\n\t\t\t// set defaults values in case of\r\n\t\t\tObject.keys(initials)\r\n\t\t\t .forEach(\r\n\t\t\t\t key => (_.tweenRefMaps[id][key] = is.number(_.tweenRefMaps[id][key])\r\n\t\t\t\t ? _.tweenRefMaps[id][key]\r\n\t\t\t\t : initials[key])\r\n\t\t\t );\r\n\t\t\t// add new initial values\r\n\t\t\tObject.keys(tweenableMap)\r\n\t\t\t .forEach(\r\n\t\t\t\t key => (_.tweenRefMaps[id][key] += tweenableMap[key])\r\n\t\t\t );\r\n\t\t\t\r\n\t\t\tObject.keys(_.tweenRefOrigin[id])// unset\r\n\t\t\t .forEach(\r\n\t\t\t\t key => {\r\n\t\t\t\t\t clearTweenableValue(key, key, _.tweenRefMaps[id], _.tweenRefCSS[id], _.muxDataByTarget[id], _.muxByTarget[id])\r\n\t\t\t\t }\r\n\t\t\t );\r\n\t\t\t_.tweenRefOrigin[id] = { ...tweenableMap };\r\n\t\t\t\r\n\t\t\tmuxToCss(_.tweenRefMaps[id], _.tweenRefCSS[id], _.muxByTarget[id], _.muxDataByTarget[id], _.box);\r\n\t\t\tthis._updateTweenRef(id, true);\r\n\t\t}\r\n\t\telse if ( !_.tweenRefs[id] ) {\r\n\t\t\t//console.log(\"init ref\", id)\r\n\t\t\t\r\n\t\t\t_.iMapOrigin[id] = iMap;\r\n\t\t\tiStyle = iStyle || {};\r\n\t\t\tiMap = iMap || {};\r\n\t\t\t\r\n\t\t\t_.tweenRefs[id] = true;\r\n\t\t\t_.muxByTarget[id] = _.muxByTarget[id] || {};\r\n\t\t\t_.muxDataByTarget[id] = _.muxDataByTarget[id] || {};\r\n\t\t\t\r\n\t\t\t_.tweenRefOriginCss[id] = iStyle;\r\n\t\t\t\r\n\t\t\t_.tweenRefMaps[id] = _.tweenRefMaps[id] || {};\r\n\t\t\tif ( _.tweenRefOrigin[id] ) {\r\n\t\t\t\t//debugger\r\n\t\t\t\t// minus initial values from axis pre init\r\n\t\t\t\t//Object.keys(_.tweenRefOrigin[id])\r\n\t\t\t\t// .forEach(\r\n\t\t\t\t//\t key => (_.tweenRefMaps[id][key] -= _.tweenRefOrigin[id][key])\r\n\t\t\t\t// );\r\n\t\t\t\tiStyle = { ...iStyle, ...deMuxTween(iMap, tweenableMap, initials, _.muxDataByTarget[id], _.muxByTarget[id], false, true) };\r\n\t\t\t\t\r\n\t\t\t\t//// set defaults values in case of\r\n\t\t\t\tObject.keys(initials)\r\n\t\t\t\t .forEach(\r\n\t\t\t\t\t key => (_.tweenRefMaps[id][key] = is.number(_.tweenRefMaps[id][key])\r\n\t\t\t\t\t ? _.tweenRefMaps[id][key] - initials[key]\r\n\t\t\t\t\t : 0)\r\n\t\t\t\t );\r\n\t\t\t\t//// add new initial values\r\n\t\t\t\tObject.keys(tweenableMap)\r\n\t\t\t\t .forEach(\r\n\t\t\t\t\t key => (_.tweenRefMaps[id][key] += tweenableMap[key])\r\n\t\t\t\t );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tiStyle = { ...iStyle, ...deMuxTween(iMap, tweenableMap, initials, _.muxDataByTarget[id], _.muxByTarget[id]) };\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// init / reset or get the tweenable view\r\n\t\t\t\ttweenableMap = Object.assign({}, initials, tweenableMap || {});\r\n\t\t\t\t\r\n\t\t\t\t// set defaults values in case of\r\n\t\t\t\t// add new initial values\r\n\t\t\t\tObject.keys(tweenableMap)\r\n\t\t\t\t .forEach(\r\n\t\t\t\t\t key => (_.tweenRefMaps[id][key] = (_.tweenRefMaps[id][key] || 0) + tweenableMap[key])\r\n\t\t\t\t );\r\n\t\t\t}\r\n\t\t\t_.tweenRefOrigin[id] = { ...tweenableMap };\r\n\t\t\t_.tweenRefCSS[id] = iStyle;\r\n\t\t\ttweenableMap = _.tweenRefMaps[id];\r\n\t\t\tmuxToCss(tweenableMap, iStyle, _.muxByTarget[id], _.muxDataByTarget[id], _.box);\r\n\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//console.log(\"maj ref\", id)\r\n\t\t\t\r\n\t\t\tmuxToCss(_.tweenRefMaps[id], _.tweenRefCSS[id], _.muxByTarget[id], _.muxDataByTarget[id], _.box);\r\n\t\t}\r\n\t\t//console.log('tweenRef::tweenRef:519: ', id, { ..._.muxDataByTarget[id] }, {\r\n\t\t// ..._.tweenRefCSS[id] });\r\n\t\tif ( noref )\r\n\t\t\treturn {\r\n\t\t\t\tstyle: { ..._.tweenRefCSS[id] }\r\n\t\t\t};\r\n\t\telse\r\n\t\t\treturn {\r\n\t\t\t\tstyle: { ..._.tweenRefCSS[id] },\r\n\t\t\t\tref : node => (_.refs[id] = node)\r\n\t\t\t};\r\n\t}\r\n\t\r\n\t/**\r\n\t * Delete tweenable element\r\n\t * @param id\r\n\t */\r\n\trmTweenRef( id ) {\r\n\t\tif ( this._.tweenRefs[id] ) {\r\n\t\t\tthis._.tweenRefTargets.splice(this._.tweenRefTargets.indexOf(id), 1);\r\n\t\t\tdelete this._.tweenRefs[id];\r\n\t\t\tdelete this._.muxByTarget[id];\r\n\t\t\tdelete this._.muxDataByTarget[id];\r\n\t\t\tdelete this._.iMapOrigin[id];\r\n\t\t\tdelete this._.tweenRefOrigin[id];\r\n\t\t\tdelete this._.tweenRefCSS[id];\r\n\t\t\tdelete this._.tweenRefMaps[id];\r\n\t\t\tdelete this._.refs[id];\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Reset tweenRefs\r\n\t * @param targets\r\n\t */\r\n\tresetTweenable( ...targets ) {\r\n\t\tlet _ = this._;\r\n\t\ttargets.forEach(\r\n\t\t\t( t ) => {\r\n\t\t\t\tthis.tweenRef(t, _.tweenRefOriginCss[t], _.iMapOrigin[t], null, null, true)\r\n\t\t\t}\r\n\t\t);\r\n\t\tthis._updateTweenRefs();\r\n\t}\r\n\t\r\n\t/**\r\n\t * Update tweenRefs style ( anims & axis will still update the ref )\r\n\t * @param target\r\n\t * @param style\r\n\t * @param postPone\r\n\t * @returns {*}\r\n\t */\r\n\tupdateRefStyle( target, style, postPone ) {\r\n\t\tlet _ = this._, initials = {}, pureCss;\r\n\t\t\r\n\t\t// allow batched stykes updates\r\n\t\tif ( isArray(target) && isArray(style) )\r\n\t\t\treturn target.map(( m, i ) => this.updateRefStyle(m, style[i], postPone));\r\n\t\tif ( isArray(target) )\r\n\t\t\treturn target.map(( m ) => this.updateRefStyle(m, style, postPone));\r\n\t\t\r\n\t\tif ( !_.tweenRefMaps[target] )\r\n\t\t\treturn console.warn(\"React-Voodoo : Can't update styles of an unknown Node id '\", target, \"'\");\r\n\t\t\r\n\t\tpureCss = deMuxTween(style, _.tweenRefMaps[target], initials, _.muxDataByTarget[target], _.muxByTarget[target]);\r\n\t\tObject.assign(_.tweenRefCSS[target], pureCss);\r\n\t\tObject.assign(_.tweenRefOriginCss[target], pureCss);\r\n\t\tmuxToCss(_.tweenRefMaps[target], _.tweenRefCSS[target], _.muxByTarget[target], _.muxDataByTarget[target], _.box);\r\n\t\tthis._updateTweenRef(target, true);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Retrieve the tween ref dom node\r\n\t * @param id\r\n\t * @returns {*}\r\n\t */\r\n\tgetTweenableRef( id ) {\r\n\t\ttry {\r\n\t\t\treturn this._.refs[id] && ReactDom.findDOMNode(this._.refs[id]);\r\n\t\t} catch ( e ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn this._.refs[id]._.rootRef.current\r\n\t\t\t} catch ( e ) {\r\n\t\t\t\tconsole.warn(\"react-voodoo: Can't find voodooNode \", id, e)\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get the root dom node of the tweener element\r\n\t * @returns {*}\r\n\t */\r\n\tgetRootNode() {\r\n\t\ttry {\r\n\t\t\treturn this.getTweenableRef(this._.rootRef)\r\n\t\t\t\t|| this.isMountedFromHook && this._.rootRef && this._.rootRef.current\r\n\t\t\t\t|| ReactDom.findDOMNode(this);\r\n\t\t} catch ( e ) {\r\n\t\t\treturn this._.rootRef && this._.rootRef.current;\r\n\t\t}\r\n\t}\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// -------------------- Pushable anims ------------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t/**\r\n\t * Push anims\r\n\t * @param anim\r\n\t * @param then\r\n\t * @param skipInit\r\n\t * @returns {tweenAxis}\r\n\t */\r\n\tpushAnim( anim, then, keepResults = true ) {\r\n\t\tlet sl,\r\n\t\t initial,\r\n\t\t _ = this._,\r\n\t\t initials = {},\r\n\t\t fail;\r\n\t\t\r\n\t\tif ( isArray(anim) ) {\r\n\t\t\tsl = anim;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsl = anim.anims;\r\n\t\t\tinitial = anim.initial;\r\n\t\t}\r\n\t\t\r\n\t\tif ( !(sl instanceof tweenAxis) ) {\r\n\t\t\t// tweenLine, initials, data, demuxers\r\n\t\t\tsl = deMuxLine(sl, initials, this._.muxDataByTarget, this._.muxByTarget);\r\n\t\t\tsl = new tweenAxis(sl, this._.tweenRefMaps);\r\n\t\t\tObject.keys(initials)\r\n\t\t\t .forEach(\r\n\t\t\t\t id => (\r\n\t\t\t\t\t this._.tweenRefMaps[id] &&\r\n\t\t\t\t\t Object.assign(this._.tweenRefMaps[id], {\r\n\t\t\t\t\t\t ...initials[id],\r\n\t\t\t\t\t\t ...this._.tweenRefMaps[id]\r\n\t\t\t\t\t }) || (fail = console.warn(\"react-voodoo : Can't find tween target \", id, \" in \", Tweener.displayName) || true)\r\n\t\t\t\t )\r\n\t\t\t )\r\n\t\t}\r\n\t\tif ( fail )\r\n\t\t\treturn;\r\n\t\t\r\n\t\t\r\n\t\treturn new Promise(\r\n\t\t\tresolve => {\r\n\t\t\t\t\r\n\t\t\t\t// start timer launch @todo\r\n\t\t\t\tsl.run(this._.tweenRefMaps, () => {\r\n\t\t\t\t\tlet i = this._.runningAnims.indexOf(sl);\r\n\t\t\t\t\tif ( i != -1 )\r\n\t\t\t\t\t\tthis._.runningAnims.splice(i, 1);\r\n\t\t\t\t\t//console.log( _.muxDataByTarget)\r\n\t\t\t\t\tObject.keys(initials)// unset\r\n\t\t\t\t\t .forEach(\r\n\t\t\t\t\t\t id => {\r\n\t\t\t\t\t\t\t Object.keys(initials[id])// unset\r\n\t\t\t\t\t\t\t .forEach(\r\n\t\t\t\t\t\t\t\t rkey => {\r\n\t\t\t\t\t\t\t\t\t // todo\r\n\t\t\t\t\t\t\t\t\t clearTweenableValue(rkey, rkey, _.tweenRefMaps[id], _.tweenRefCSS[id], _.muxDataByTarget[id], _.muxByTarget[id], keepResults)\r\n\t\t\t\t\t\t\t\t })\r\n\t\t\t\t\t\t });\r\n\t\t\t\t\tsl.destroy();\r\n\t\t\t\t\tresolve(sl);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._.runningAnims.push(sl);\r\n\t\t\t\t\r\n\t\t\t\tif ( !this._.live ) {\r\n\t\t\t\t\tthis._.live = true;\r\n\t\t\t\t\trequestAnimationFrame(this._._rafLoop = this._._rafLoop || this._rafLoop.bind(this));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t).then(sl => (then && then(sl)));\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t/**\r\n\t * Update tweenRef raw tweened values\r\n\t * @param id\r\n\t * @param map\r\n\t * @param reset\r\n\t */\r\n\tapplyTweenState( id, map, reset ) {\r\n\t\tlet tmap = {}, initials = {};\r\n\t\tdeMuxTween(map, tmap, initials, this._.muxDataByTarget[id], this._.muxByTarget[id], true)\r\n\t\tObject.keys(tmap).map(\r\n\t\t\t( p ) => this._.tweenRefMaps[id][p] = (!reset && this._.tweenRefMaps[id][p] || initials[p]) + tmap[p]\r\n\t\t);\r\n\t}\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// ------------------ Scrollable axes -------------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t/**\r\n\t * Will init / update a scrollable axis\r\n\t * @param axe\r\n\t * @param _inertia\r\n\t * @param _scrollableArea\r\n\t * @param _scrollableBounds\r\n\t * @param _scrollableWindow\r\n\t * @param defaultPosition\r\n\t * @param scrollFirst\r\n\t * @param reset\r\n\t */\r\n\tinitAxis( axe, {\r\n\t\tinertia : _inertia,\r\n\t\tscrollableArea : _scrollableArea = 0,\r\n\t\tscrollableBounds: _scrollableBounds,\r\n\t\tscrollableWindow: _scrollableWindow,\r\n\t\tdefaultPosition,\r\n\t\tscrollFirst\r\n\t}, reset ) {\r\n\t\t\r\n\t\t\r\n\t\tlet _ = this._,\r\n\t\t dim = this.axes[axe],\r\n\t\t scrollableBounds = _scrollableBounds,\r\n\t\t scrollPos = !reset && dim\r\n\t\t ? dim.scrollPos\r\n\t\t : defaultPosition || scrollableBounds && scrollableBounds.min || 0,\r\n\t\t scrollableArea = Math.max(dim && dim.scrollableArea || 0, _scrollableArea),\r\n\t\t scrollableWindow = Math.max(dim && dim.scrollableWindow || 0, _scrollableWindow),\r\n\t\t targetPos = dim ? dim.targetPos : scrollPos,\r\n\t\t inertia = (\r\n\t\t\t dim ? dim.inertia : new Inertia({// todo mk pure\r\n\t\t\t\t disabled: !_inertia,\r\n\t\t\t\t ...(_inertia || {}),\r\n\t\t\t\t value: scrollPos\r\n\t\t\t })),\r\n\t\t nextDescr = {\r\n\t\t\t //...(_inertia || {}),\r\n\t\t\t scrollFirst,\r\n\t\t\t tweenAxis: dim && dim.tweenAxis || [],\r\n\t\t\t scrollPos,\r\n\t\t\t targetPos,\r\n\t\t\t inertia,\r\n\t\t\t scrollableWindow,\r\n\t\t\t scrollableBounds,\r\n\t\t\t scrollableArea,\r\n\t\t\t scrollTo : ( pos, tm, ease, noEvents ) => {\r\n\t\t\t\t return this.scrollTo(pos, tm, axe, ease, noEvents)\r\n\t\t\t }\r\n\t\t };\r\n\t\t\r\n\t\tthis.axes[axe] = nextDescr;\r\n\t\t!_inertia && (inertia._.disabled = true);\r\n\t\t(_inertia) && inertia && !inertia.active && (inertia._.pos = scrollPos);\r\n\t\t(_inertia) && inertia && (inertia.updateConf(_inertia));\r\n\t\tif ( inertia && scrollableBounds )\r\n\t\t\tinertia.setBounds?.(scrollableBounds.min, scrollableBounds.max);\r\n\t\telse\r\n\t\t\tinertia && inertia.setBounds?.(0, scrollableArea)\r\n\t}\r\n\t\r\n\t_getAxis( axe = \"scrollY\" ) {\r\n\t\tlet _ = this._;\r\n\t\t\r\n\t\tthis.axes[axe] = this.axes[axe] || {\r\n\t\t\ttweenAxis : [],\r\n\t\t\tscrollPos : _.options.initialScrollPos && _.options.initialScrollPos[axe] || 0,\r\n\t\t\ttargetPos : 0,\r\n\t\t\tscrollableWindow: 0,\r\n\t\t\tscrollableArea : 0,\r\n\t\t\tinertia : new Inertia({\r\n\t\t\t\t value: _.options.initialScrollPos && _.options.initialScrollPos[axe] || 0,\r\n\t\t\t\t ...(_.options.axes && _.options.axes[axe] && _.options.axes[axe].inertia || {})\r\n\t\t\t }),\r\n\t\t\tscrollTo : ( pos, tm, ease, noEvents ) => {\r\n\t\t\t\treturn this.scrollTo(pos, tm, axe, ease, noEvents)\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\treturn this.axes[axe];\r\n\t}\r\n\t\r\n\t/**\r\n\t * Return axis infos\r\n\t */\r\n\tgetAxisState( axe ) {\r\n\t\tlet _ = this._, state = {};\r\n\t\tthis.axes && Object.keys(this.axes)\r\n\t\t .forEach(\r\n\t\t\t axe => (state[axe] = this.axes[axe].targetPos || this.axes[axe].scrollPos)\r\n\t\t );\r\n\t\treturn state;\r\n\t}\r\n\t\r\n\tgetScrollPos( axis = \"scrollY\" ) {\r\n\t\tlet _ = this._, state = {};\r\n\t\treturn this.axes[axis]\r\n\t\t ? this.axes[axis].targetPos || this.axes[axis].scrollPos\r\n\t\t : 0\r\n\t}\r\n\t\r\n\t/**\r\n\t * Do scroll an axis\r\n\t * @param newPos\r\n\t * @param ms\r\n\t * @param axe\r\n\t * @param ease\r\n\t * @returns {Promise<any | never>}\r\n\t */\r\n\tscrollTo( newPos, ms = 0, axe = \"scrollY\", ease, noEvents ) {\r\n\t\tlet _ = this._;\r\n\t\tif ( !isBrowserSide ) {\r\n\t\t\tconsole.warn(\"React-voodoo : scrollTo can't be used serverside, use Axis defaultPosition prop to set initial axes position\");\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t\treturn new Promise(\r\n\t\t\t(( resolve, reject ) => {\r\n\t\t\t\tif ( this.axes && this.axes[axe] ) {\r\n\t\t\t\t\tlet oldPos = this.axes[axe].targetPos,\r\n\t\t\t\t\t setPos = pos => {\r\n\t\t\t\t\t\t //console.log('TweenableComp::setPos:514: ', newPos,pos, ms,\r\n\t\t\t\t\t\t // axe);\r\n\t\t\t\t\t\t pos = (~~(pos * 10000)) / 10000;\r\n\t\t\t\t\t\t this.axes[axe].targetPos = this.axes[axe].scrollPos = pos;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t //this.axes[axe].inertia._doSnap()\r\n\t\t\t\t\t\t if ( ~~pos !== oldPos ) {\r\n\t\t\t\t\t\t\t this.axisDidScroll(~~pos, axe);\r\n\t\t\t\t\t\t\t _.rootRef?.current?.componentDidScroll?.(~~pos, axe);\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t this._updateTweenRefs()\r\n\t\t\t\t\t };\r\n\t\t\t\t\t\r\n\t\t\t\t\tnewPos = Math.max(0, newPos);\r\n\t\t\t\t\tnewPos = Math.min(newPos, this.axes[axe].scrollableArea || 0);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.axes[axe].targetPos = newPos;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( !ms ) {\r\n\t\t\t\t\t\tthis.axes?.[axe]?.inertia?.setPos(newPos);\r\n\t\t\t\t\t\tif ( this.axes?.[axe]?.inertia?._ ) {\r\n\t\t\t\t\t\t\tnewPos = this.axes?.[axe]?.inertia?._.pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.axes[axe].tweenAxis.forEach(\r\n\t\t\t\t\t\t\tsl => sl.goTo(newPos, _.tweenRefMaps, false, noEvents)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tsetPos(newPos);\r\n\t\t\t\t\t\tresolve()\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis._runScrollGoTo(axe, newPos, ms, easingFn[ease], noEvents, setPos, resolve)\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( !_.live ) {\r\n\t\t\t\t\t\t_.live = true;\r\n\t\t\t\t\t\trequestAnimationFrame(_._rafLoop);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})).then(\r\n\t\t\tp => {\r\n\t\t\t\tthis.axes?.[axe]?.inertia?._detectCurrentSnap();\r\n\t\t\t}\r\n\t\t)\r\n\t}\r\n\t\r\n\t/**\r\n\t * Add scrollable tween axis (scrollable anims) to a global axis\r\n\t * @param anim\r\n\t * @param axe\r\n\t * @param size\r\n\t * @returns {tweenAxis}\r\n\t */\r\n\taddScrollableAnim( anim, axe = \"scrollY\", size ) {\r\n\t\tlet sl,\r\n\t\t _ = this._,\r\n\t\t initials = {},\r\n\t\t dim = this._getAxis(axe);\r\n\t\t\r\n\t\tif ( isArray(anim) ) {\r\n\t\t\tsl = anim;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsl = anim.anims;\r\n\t\t\tsize = anim.length;\r\n\t\t}\r\n\t\t\r\n\t\t//console.warn(\"add scrollable\")\r\n\t\tif ( !(sl instanceof tweenAxis) ) {\r\n\t\t\tsl = deMuxLine(sl, initials, this._.muxDataByTarget, this._.muxByTarget);\r\n\t\t\t\r\n\t\t\tsl = new tweenAxis(sl, _.tweenRefMaps);\r\n\t\t\tsl.initials = initials;\r\n\t\t\t\r\n\t\t\tObject.keys(initials)\r\n\t\t\t .forEach(\r\n\t\t\t\t id => {\r\n\t\t\t\t\t _.tweenRefOrigin[id] = _.tweenRefOrigin[id] || {};\r\n\t\t\t\t\t\r\n\t\t\t\t\t _.tweenRefMaps[id] = _.tweenRefMaps[id] || {};\r\n\t\t\t\t\t Object.assign(this._.tweenRefMaps[id], {\r\n\t\t\t\t\t\t ...initials[id],\r\n\t\t\t\t\t\t ...this._.tweenRefMaps[id]\r\n\t\t\t\t\t })\r\n\t\t\t\t }\r\n\t\t\t );\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// init scroll\r\n\t\tdim.tweenAxis.push(sl);\r\n\t\tdim.scrollPos = dim.scrollPos || 0;\r\n\t\tdim.scrollableArea = dim.scrollableArea || 0;\r\n\t\tdim.scrollableArea = Math.max(dim.scrollableArea, sl.duration);\r\n\t\t\r\n\t\tif ( !dim.scrollableBounds )\r\n\t\t\tdim.inertia?.setBounds(0, dim.scrollableArea);\r\n\t\t\r\n\t\tsl.goTo(dim.scrollPos, this._.tweenRefMaps, false, true);\r\n\t\tthis._updateTweenRefs();\r\n\t\treturn sl;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Remove a tweenAxis object from a component scrollable axis\r\n\t * @param sl\r\n\t * @param axe\r\n\t */\r\n\trmScrollableAnim( sl, axe = \"scrollY\" ) {\r\n\t\tlet _ = this._, found,\r\n\t\t dim = this._getAxis(axe), twAxis;\r\n\t\tlet i = dim.tweenAxis.indexOf(sl);\r\n\t\tif ( i !== -1 ) {\r\n\t\t\t\r\n\t\t\t//dim.tweenAxis[i].destroy();\r\n\t\t\tdim.tweenAxis.splice(i, 1);\r\n\t\t\tdim.scrollableArea = Math.max(...dim.tweenAxis.map(tl => tl.duration), 0);\r\n\t\t\tif ( !dim.scrollableBounds )\r\n\t\t\t\tdim.inertia?.setBounds(0, dim.scrollableArea || 0);\r\n\t\t\t//console.warn(\"rm scrollable\", { ...this._.tweenRefMaps })\r\n\t\t\tsl.goTo(0, this._.tweenRefMaps, false, true);\r\n\t\t\t//console.warn(\"rm scrollable\", { ...this._.tweenRefMaps[\"card\"] })\r\n\t\t\t\r\n\t\t\tObject.keys(sl.initials)// unset\r\n\t\t\t .forEach(\r\n\t\t\t\t id => {\r\n\t\t\t\t\t Object.keys(sl.initials[id])// unset\r\n\t\t\t\t\t .forEach(\r\n\t\t\t\t\t\t rkey => {\r\n\t\t\t\t\t\t\t //debugger\r\n\t\t\t\t\t\t\t clearTweenableValue(rkey, rkey, _.tweenRefMaps[id], _.tweenRefCSS[id], _.muxDataByTarget[id], _.muxByTarget[id])\r\n\t\t\t\t\t\t\t //!_.tweenRefCSS[id] &&\r\n\t\t\t\t\t\t\t //_.refs[id] && _.refs[id].style &&\r\n\t\t\t\t\t\t\t // _.refs[id].style[rkey] &&\r\n\t\t\t\t\t\t\t // (_.refs[id].style[rkey] = null);\r\n\t\t\t\t\t\t })\r\n\t\t\t\t });\r\n\t\t\tdelete sl.initials;\r\n\t\t\tsl.destroy();\r\n\t\t\tfound = true;\r\n\t\t\tthis._updateTweenRefs();\r\n\t\t}\r\n\t\t!found && console.warn(\"react-voodoo: Axis not found : \", axe)\r\n\t}\r\n\t\r\n\t\r\n\t/**\r\n\t * @private fn to push scrollTo\r\n\t * @param axe\r\n\t * @param to\r\n\t * @param tm\r\n\t * @param easing\r\n\t * @param tick\r\n\t * @param cb\r\n\t * @private\r\n\t */\r\n\t_runScrollGoTo( axe, to, tm, easing = x => x, noEvents, tick, cb ) {\r\n\t\tlet from = this.axes[axe].scrollPos,\r\n\t\t length = to - from;\r\n\t\t\r\n\t\t_running.push(\r\n\t\t\t{\r\n\t\t\t\tapply : ( pos, max ) => {\r\n\t\t\t\t\tlet x = (from + (easing(pos / max)) * length);\r\n\t\t\t\t\tif ( this._.tweenEnabled ) {\r\n\t\t\t\t\t\t// allow shouldLoop on scrollTo\r\n\t\t\t\t\t\tthis.axes?.[axe]?.inertia?.setPos(x);\r\n\t\t\t\t\t\tif ( this.axes?.[axe]?.inertia?._ ) {\r\n\t\t\t\t\t\t\tx = this.axes?.[axe]?.inertia?._.pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.axes[axe].tweenAxis.forEach(\r\n\t\t\t\t\t\t\tsl => sl.goTo(x, this._.tweenRefMaps, false, noEvents)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\ttick && tick(x);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tduration: tm,\r\n\t\t\t\tcpos : 0,\r\n\t\t\t\tcb\r\n\t\t\t})\r\n\t\t;\r\n\t\t\r\n\t\tif ( !_live ) {\r\n\t\t\t_live = true;\r\n\t\t\tlastTm = Date.now();\r\n\t\t\t// console.log(\"TL runner On\");\r\n\t\t\tsetTimeout(Runner._tick, 16);\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Return scrollable parent node list basing a dom node\r\n\t * @param node\r\n\t * @returns {T[]}\r\n\t */\r\n\tgetScrollableNodes( node ) {\r\n\t\tlet scrollable = domUtils.findReactParents(node), _ = this._;\r\n\t\tscrollable = _.rootRef &&\r\n\t\t\t_.rootRef.current &&\r\n\t\t\t_.rootRef.current.hookScrollableTargets &&\r\n\t\t\t_.rootRef.current.hookScrollableTargets(scrollable)\r\n\t\t\t|| scrollable;\r\n\t\t\r\n\t\treturn scrollable.map(\r\n\t\t\tid => (is.string(id)\r\n\t\t\t ? this._.refs[id] && ReactDom.findDOMNode(this._.refs[id]) || this.refs[id] || document.getElementById(id)\r\n\t\t\t : id));\r\n\t}\r\n\t\r\n\t/**\r\n\t * Hook to know if the composed element allow scrolling\r\n\t * @returns {boolean}\r\n\t */\r\n\tcomponentShouldScroll() {\r\n\t\tlet _ = this._;\r\n\t\treturn _.rootRef &&\r\n\t\t _.rootRef.current &&\r\n\t\t _.rootRef.current.componentShouldScroll ?\r\n\t\t _.rootRef.current.componentShouldScroll(...arguments) : true\r\n\t}\r\n\t\r\n\t_scrollWatcherByAxis = {};\r\n\t\r\n\t/**\r\n\t * Add scroll listener to {axisId} axis, return unwatch\r\n\t * @param axisId\r\n\t * @param listener\r\n\t * @returns {function(...[*]=)}\r\n\t */\r\n\twatchAxis( axisId, listener ) {\r\n\t\tlet byId = this._scrollWatcherByAxis;\r\n\t\tbyId[axisId] = byId[axisId] || [];\r\n\t\tbyId[axisId].push(listener);\r\n\t\treturn () => {\r\n\t\t\tlet index = byId[axisId].indexOf(listener);\r\n\t\t\tbyId[axisId].splice(index, 1);\r\n\t\t}\r\n\t}\r\n\t\r\n\taxisDidScroll( pos, axisId ) {\r\n\t\tlet watchers = this._scrollWatcherByAxis[axisId],\r\n\t\t i = watchers?.length;\r\n\t\tif ( watchers )\r\n\t\t\twhile ( i ) watchers[--i](pos);\r\n\t}\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// --------------- Inertia & scroll modifiers -----------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t/**\r\n\t * Retrieve updates from an axis inertia & apply them\r\n\t * @param dim\r\n\t * @param axe\r\n\t */\r\n\tapplyInertia( dim, axe ) {\r\n\t\tlet x = dim.inertia.update(), _ = this._;\r\n\t\t\r\n\t\tthis.axes[axe].tweenAxis.forEach(\r\n\t\t\tsl => {\r\n\t\t\t\tthis.axes[axe].targetPos = this.axes[axe].scrollPos = x;\r\n\t\t\t\tsl.goTo(x, this._.tweenRefMaps)\r\n\t\t\t}\r\n\t\t);\r\n\t\t//console.log(\"scroll at \" + x, axe, dim.inertia.active || dim.inertia.holding);\r\n\t\t//this.scrollTo(x, 0, axe);\r\n\t\t_.rootRef?.current?.componentDidScroll?.(x, axe);\r\n\t\tthis.axisDidScroll(x, axe);\r\n\t\tthis._updateTweenRefs()\r\n\t\tif ( dim.inertia.active || dim.inertia.holding ) {\r\n\t\t\tdim.inertiaFrame = setTimeout(this.applyInertia.bind(this, dim, axe), 33);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdim.inertiaFrame = null;\r\n\t\t\t//console.log(\"complete\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Return true if at least 1 of this tweener axis have it's inertia active\r\n\t * @returns {boolean}\r\n\t */\r\n\tisInertiaActive() {//todo\r\n\t\tlet _ = this._, active = false;\r\n\t\tthis.axes &&\r\n\t\tObject.keys(this.axes)\r\n\t\t .forEach(\r\n\t\t\t axe => (active = active || this.axes[axe] && this.axes[axe].inertia.active)\r\n\t\t );\r\n\t\treturn active;\r\n\t}\r\n\t\r\n\tdispatchScroll( delta, axe = \"scrollY\" ) {\r\n\t\tlet prevent,\r\n\t\t dim = this.axes[axe],\r\n\t\t oldPos = dim && dim.scrollPos,\r\n\t\t newPos = oldPos + delta;\r\n\t\t\r\n\t\tif ( dim && oldPos !== newPos ) {\r\n\t\t\t\r\n\t\t\tdim.inertia.dispatch(delta, 100);\r\n\t\t\t!dim.inertiaFrame && this.applyInertia(dim, axe);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn prevent;\r\n\t}\r\n\t\r\n\tisAxisOut( axis, v, abs ) {\r\n\t\tlet _ = this._,\r\n\t\t dim = this.axes && this.axes[axis],\r\n\t\t pos = abs ? v : dim && (dim.scrollPos + v);\r\n\t\t\r\n\t\tpos = pos && Math.round(pos);\r\n\t\t\r\n\t\treturn !dim\r\n\t\t\t|| (\r\n\t\t\t\tdim.scrollableBounds\r\n\t\t\t\t?\r\n\t\t\t\t(pos <= dim.scrollableBounds.min || pos >= dim.scrollableBounds.max)\r\n\t\t\t\t:\r\n\t\t\t\t(pos <= 0 || pos >= dim.scrollableArea)\r\n\t\t\t);\r\n\t}\r\n\t\r\n\t_doDispatch( target, dx, dy, holding ) {\r\n\t\tlet style,\r\n\t\t Comps,\r\n\t\t headTarget = target,\r\n\t\t nodeInertia,\r\n\t\t i;\r\n\t\t\r\n\t\t// check if there scrollable stuff in dom targets\r\n\t\t// get all the parents components & dom node of an dom element ( from fibers )\r\n\t\t\r\n\t\tComps = this.getScrollableNodes(headTarget);\r\n\t\t//console.log(\"dispatching \", dx, dy, Comps);\r\n\t\tfor ( i = 0; i < Comps.length; i++ ) {\r\n\t\t\t// react comp with tweener support\r\n\t\t\tif ( Comps[i].__isTweener ) {\r\n\t\t\t\t//debugger\r\n\t\t\t\t//console.log(Comps[i], dx, dy, Comps[i].isAxisOut(\"scrollX\", dx),\r\n\t\t\t\t// Comps[i].isAxisOut(\"scrollY\", dy));\r\n\t\t\t\tif ( !Comps[i].isAxisOut(\"scrollX\", dx) && (!Comps[i].componentShouldScroll || Comps[i].componentShouldScroll(\"scrollX\", dx)) ) {\r\n\t\t\t\t\tComps[i].dispatchScroll(dx, \"scrollX\", holding);\r\n\t\t\t\t\tdx = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif ( !Comps[i].isAxisOut(\"scrollY\", dy) && (!Comps[i].componentShouldScroll || Comps[i].componentShouldScroll(\"scrollY\", dy)) ) {\r\n\t\t\t\t\tComps[i].dispatchScroll(dy, \"scrollY\", holding);\r\n\t\t\t\t\tdy = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// dom element\r\n\t\t\telse if ( is.element(Comps[i]) ) {\r\n\t\t\t\tstyle = getComputedStyle(Comps[i], null)\r\n\t\t\t\tif ( /(auto|scroll)/.test(\r\n\t\t\t\t\tstyle.getPropertyValue(\"overflow\")\r\n\t\t\t\t\t+ style.getPropertyValue(\"overflow-x\")\r\n\t\t\t\t\t+ style.getPropertyValue(\"overflow-y\")\r\n\t\t\t\t)\r\n\t\t\t\t) {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t(dy < 0 && Comps[i].scrollTop !== 0)\r\n\t\t\t\t\t\t||\r\n\t\t\t\t\t\t(dy > 0 && Comps[i].scrollTop !== (Comps[i].scrollHeight - Comps[i].clientHeight))\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t//nodeInertia.y.dispatch(dy * 10)\r\n\t\t\t\t\t\t//dy = 0;\r\n\t\t\t\t\t} // let the node do this scroll\r\n\t\t\t\t\t//if ( nodeInertia.x.isOutbound(dx) ) {\r\n\t\t\t\t\t//\tnodeInertia.x.dispatch(dx * 10)\r\n\t\t\t\t\t//\tdx = 0;\r\n\t\t\t\t\t//} // let the node do this scroll\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//headTarget = headTarget.parentNode;\r\n\t\t\t\t//if ( headTarget === document || headTarget === target )\r\n\t\t\t\t//\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !dx && !dy )\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tthis._updateNodeInertia();\r\n\t\tif ( !dx && !dy )\r\n\t\t\treturn true;\r\n\t}\r\n\t\r\n\t_activateNodeInertia( node ) {\r\n\t\tlet _ = this._,\r\n\t\t i = _.activeInertia.findIndex(item => (item.target === node));\r\n\t\tif ( i === -1 ) {\r\n\t\t\t_.activeInertia.push(\r\n\t\t\t\t{\r\n\t\t\t\t\tinertia: {\r\n\t\t\t\t\t\tx: new Inertia({\r\n\t\t\t\t\t\t\t max : node.scrollWidth - node.offsetLeft,\r\n\t\t\t\t\t\t\t value: node.scrollLeft\r\n\t\t\t\t\t\t }),\r\n\t\t\t\t\t\ty: new Inertia({\r\n\t\t\t\t\t\t\t max : node.scrollHeight - node.offsetHeight,\r\n\t\t\t\t\t\t\t value: node.scrollTop\r\n\t\t\t\t\t\t })\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttarget : node\r\n\t\t\t\t});\r\n\t\t\ti = _.activeInertia.length - 1;\r\n\t\t}\r\n\t\treturn _.activeInertia[i].inertia;\r\n\t\t\r\n\t}\r\n\t\r\n\t_updateNodeInertia = () => {\r\n\t\tlet _ = this._, current, ln = _.activeInertia.length;\r\n\t\t\r\n\t\tif ( this._inertiaRaf )\r\n\t\t\tcancelAnimationFrame(this._inertiaRaf);\r\n\t\t\r\n\t\tfor ( let i = 0; ln > i; i++ ) {\r\n\t\t\tcurrent = _.activeInertia[i];\r\n\t\t\tif ( current.inertia.x.active || current.inertia.x.holding ) {\r\n\t\t\t\tcurrent.target.scrollLeft = ~~current.inertia.x.update()\r\n\t\t\t}\r\n\t\t\tif ( current.inertia.y.active || current.inertia.y.holding ) {\r\n\t\t\t\tcurrent.target.scrollTop = ~~current.inertia.y.update()\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( !current.inertia.x.active && !current.inertia.y.active && !current.inertia.x.holding && !current.inertia.y.holding ) {\r\n\t\t\t\t_.activeInertia.slice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tln--;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( ln !== 0 )\r\n\t\t\tthis._inertiaRaf = requestAnimationFrame(this._updateNodeInertia)\r\n\t\telse this._inertiaRaf = null;\r\n\t}\r\n\t\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// --------------- Initialization & drawers -------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\tsetRootRef( id ) {\r\n\t\tthis._.rootRef = id;\r\n\t}\r\n\t\r\n\t_updateBox() {\r\n\t\tlet node = this.getRootNode();\r\n\t\tif ( node ) {\r\n\t\t\tthis._.box.inited = true;\r\n\t\t\tthis._.box.x = node.offsetWidth;\r\n\t\t\tthis._.box.y = node.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_rafLoop() {\r\n\t\tthis._updateTweenRefs();\r\n\t\tif ( this._.runningAnims.length ) {\r\n\t\t\trequestAnimationFrame(this._._rafLoop);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//this._.live && console.log(\"RAF off\", this.constructor.displayName);\r\n\t\t\tthis._.live = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_updateTweenRefs() {\r\n\t\tif ( this._.tweenEnabled ) {\r\n\t\t\tfor ( let i = 0, target, node, style; i < this._.tweenRefTargets.length; i++ ) {\r\n\t\t\t\ttarget = this._.tweenRefTargets[i];\r\n\t\t\t\tstyle = this._updateTweenRef(target);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_swap = {};\r\n\t\r\n\t_updateTweenRef( target, force ) {\r\n\t\tlet node, swap = this._swap, changes;\r\n\t\tthis._.tweenRefCSS[target] &&\r\n\t\tmuxToCss(this._.tweenRefMaps[target], swap, this._.muxByTarget[target], this._.muxDataByTarget[target], this._.box);\r\n\t\tnode = this.getTweenableRef(target);\r\n\t\tif ( node ) {\r\n\t\t\tfor ( let o in this._.tweenRefCSS[target] )\r\n\t\t\t\tif ( swap[o] === undefined ) {\r\n\t\t\t\t\tnode.style[o] = this._.tweenRefCSS[target][o];\r\n\t\t\t\t\t//\t\tnode.style[o] = null;\r\n\t\t\t\t\t//\t\tdelete this._.tweenRefCSS[target][o];\r\n\t\t\t\t}\r\n\t\t\tfor ( let o in swap )\r\n\t\t\t\tif ( this._.tweenRefCSS[target].hasOwnProperty(o) ) {\r\n\t\t\t\t\tif ( force || swap[o] !== this._.tweenRefCSS[target][o] ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnode.style[o] = this._.tweenRefCSS[target][o] = swap[o];\r\n\t\t\t\t\t\t//if ( target == \"card\" ) console.log(target, o, node.style[o],\r\n\t\t\t\t\t\t// swap[o]);\r\n\t\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdelete swap[o];\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t//if ( !changes )\r\n\t\t//console.log('no changes', target, this._.tweenRefCSS[target], !!node, force)\r\n\t\treturn this._.tweenRefCSS[target];\r\n\t}\r\n\t\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// --------------- React Hooks --------------------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t\r\n\tcomponentWillUnmount() {\r\n\t\tlet node = this.getRootNode();\r\n\t\tif ( this._.tweenEnabled ) {\r\n\t\t\tthis._.tweenEnabled = false;\r\n\t\t\twindow.removeEventListener(\"resize\", this._.onResize);\r\n\t\t\t\r\n\t\t\tObject.keys(this.axes).forEach(\r\n\t\t\t\taxe => {\r\n\t\t\t\t\tthis.axes[axe].inertiaFrame &&\r\n\t\t\t\t\tclearTimeout(this.axes[axe].inertiaFrame);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t\tsuper.componentWillUnmount && super.componentWillUnmount(...arguments);\r\n\t}\r\n\t\r\n\tcomponentDidMount() {\r\n\t\tlet _static = this.constructor;\r\n\t\t\r\n\t\tthis._.rendered = true;\r\n\t\tif ( this._.tweenEnabled ) {\r\n\t\t\t// debugger;\r\n\t\t\tthis._updateBox();\r\n\t\t\tthis._updateTweenRefs();\r\n\t\t}\r\n\t\tif ( _static.scrollableAnim ) {\r\n\t\t\tif ( is.array(_static.scrollableAnim) )\r\n\t\t\t\tthis.addScrollableAnim(_static.scrollableAnim);\r\n\t\t\telse\r\n\t\t\t\tObject.keys(_static.scrollableAnim)\r\n\t\t\t\t .forEach(\r\n\t\t\t\t\t axe => this.addScrollableAnim(_static.scrollableAnim[axe], axe)\r\n\t\t\t\t )\r\n\t\t}\r\n\t\t//if ( this._.doRegister || this.__isFirst ) {\r\n\t\t//\r\n\t\t//\tthis._.doRegister = false;\r\n\t\t//}\r\n\t\tsuper.componentDidMount && super.componentDidMount(...arguments);\r\n\t}\r\n\t\r\n\tcomponentDidUpdate( prevProps, prevState ) {\r\n\t\t\r\n\t\tif ( this._.tweenEnabled ) {\r\n\t\t\tthis._updateBox();\r\n\t\t\tthis._updateTweenRefs();\r\n\t\t}\r\n\t\tsuper.componentDidUpdate && super.componentDidUpdate(...arguments);\r\n\t}\r\n\t\r\n\trender() {\r\n\t\tconst { BaseComponent, oProps } = this.props;\r\n\t\treturn <TweenerContext.Consumer>\r\n\t\t\t{\r\n\t\t\t\tparentTweener => {\r\n\t\t\t\t\tthis._parentTweener = parentTweener;\r\n\t\t\t\t\treturn <TweenerContext.Provider value={this}>\r\n\t\t\t\t\t\t<BaseComponent {...oProps} ref={this._.rootRef}\r\n\t\t\t\t\t\t tweener={this}/>\r\n\t\t\t\t\t</TweenerContext.Provider>;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t</TweenerContext.Consumer>;\r\n\t}\r\n}\r\n","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\nimport React from \"react\";\nimport is from \"is\";\nimport TweenerContext from \"../comps/TweenerContext\";\nimport Tweener from \"../comps/Tweener\";\n\n/**\n * Wrap & instanciate the Tweener Comp \"virtual\"\n * @param tweenerOptions\n * @param RootNodeComp\n */\nexport default ( tweenerOptions, RootNodeComp = 'div' ) => {\n\tconst parentTweener = React.useContext(TweenerContext),\n\t nodeRef = React.useRef(),\n\t lastTweener = React.useRef(),\n\t doUseParentTweener = React.useMemo(\n\t\t () => (tweenerOptions === true || is.string(tweenerOptions)),\n\t\t []\n\t ),\n\t tweener = React.useMemo(\n\t\t () => {\n\t\t\t if ( tweenerOptions === true )// keep tweener from context ( parent )\n\t\t\t\t return parentTweener;\n\t\t\t\n\t\t\t if ( is.string(tweenerOptions) ) {// return named tweener or most root tweener\n\t\t\t\t let pTweener = parentTweener;\n\t\t\t\t\n\t\t\t\t while ( pTweener?._ && pTweener._.options.name !== tweenerOptions )\n\t\t\t\t\t if ( pTweener._parentTweener )\n\t\t\t\t\t\t pTweener = pTweener._parentTweener;\n\t\t\t\t\t else {\n\t\t\t\t\t\t console.warn('react-voodoo: No parent tweener found with option.key === \"' + tweenerOptions + '\"');\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t\n\t\t\t\t return pTweener;\n\t\t\t }\n\t\t\t\n\t\t\t let tw = new Tweener({\n\t\t\t\t forwardedRef: nodeRef,\n\t\t\t\t tweenerOptions\n\t\t\t });\n\t\t\t tw.isMountedFromHook = true;\n\t\t\t tw._parentTweener = parentTweener;\n\t\t\t return tw;\n\t\t },\n\t\t []\n\t ),\n\t ViewBox = React.useMemo(\n\t\t () => (\n\t\t\t React.forwardRef(\n\t\t\t\t ( { children, ...props }, ref ) => {\n\t\t\t\t\t return <TweenerContext.Provider value={tweener}>\n\t\t\t\t\t\t <RootNodeComp\n\t\t\t\t\t\t\t ref={!ref\n\t\t\t\t\t\t\t ? nodeRef\n\t\t\t\t\t\t\t : ( node ) => (ref.current = nodeRef.current = node)} {...props}>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t children\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t </RootNodeComp>\n\t\t\t\t\t </TweenerContext.Provider>\n\t\t\t\t }\n\t\t\t )\n\t\t ),\n\t\t []\n\t )\n\t\n\tReact.useEffect(\n\t\t() => {\n\t\t\tif ( doUseParentTweener || !lastTweener.current?._ )\n\t\t\t\treturn;\n\t\t\t//console.warn(\"didmount\", nodeRef.current, lastTweener.current === TweenerEl)\n\t\t\ttweener.componentDidMount();\n\t\t\tlastTweener.current = tweener;\n\t\t\treturn () => {\n\t\t\t\tif ( !lastTweener.current?._ )\n\t\t\t\t\treturn;\n\t\t\t\t//console.warn(\"unmount\")\n\t\t\t\tlastTweener.current.componentWillUnmount();\n\t\t\t\tlastTweener.current = null;\n\t\t\t}\n\t\t}, []\n\t)\n\tReact.useEffect(\n\t\t() => {\n\t\t\t\n\t\t\tif ( doUseParentTweener || !lastTweener.current?._ )\n\t\t\t\treturn;\n\t\t\t//console.warn(\"didupdate\", nodeRef.current)\n\t\t\tlastTweener.current._updateBox();\n\t\t\tlastTweener.current._updateTweenRefs();\n\t\t\t\n\t\t}\n\t\t,\n\t\t[nodeRef.current]\n\t)\n\tReact.useEffect(\n\t\t() => {\n\t\t\tif ( doUseParentTweener || !lastTweener.current?._ )\n\t\t\t\treturn;\n\t\t\tlastTweener.current._parentTweener = parentTweener;\n\t\t},\n\t\t[parentTweener]\n\t)\n\tReact.useEffect(\n\t\t() => {\n\t\t\tif ( doUseParentTweener || !lastTweener.current?._ )\n\t\t\t\treturn;\n\t\t\tlastTweener.current._.options = tweenerOptions;\n\t\t\tlastTweener.current._updateBox();\n\t\t\tlastTweener.current._updateTweenRefs();\n\t\t},\n\t\t[tweenerOptions]\n\t)\n\treturn React.useMemo(\n\t\t() => ([tweener, ViewBox]),\n\t\t[ViewBox, tweener]\n\t);\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport deepEqual from \"fast-deep-equal\";\nimport is from \"is\";\nimport PropTypes from \"prop-types\";\nimport React from 'react';\nimport ReactDom from \"react-dom\";\nimport useVoodoo from \"../hooks/useVoodoo\";\nimport domUtils from \"../utils/dom\";\n\n\nfunction getScrollableNodes( node, parentTweener ) {\n\tlet scrollable = [], parent = parentTweener;//domUtils.findReactParents(node),\n\t// _ = µ;\n\t\n\twhile ( parent ) {\n\t\tscrollable.push(parent);\n\t\tparent = parent._parentTweener;\n\t}\n\t\n\treturn scrollable\n}\n\nconst Draggable = ( {\n\t children,\n\t Comp = 'div',\n\t forwardedRef,\n\t items = [],\n\t xAxis, yAxis, yBoxRef,\n\t xBoxRef, yRef,\n\t yHook, xHook,\n\t tweener: givenTweener,\n\t mouseDrag = false,\n\t touchDrag = true,\n\t button = 0,\n\t ...props\n } ) => {\n\tconst µ = React.useRef({}).current,\n\t [parentTweener] = useVoodoo(true),\n\t tweener = givenTweener || parentTweener,\n\t root = React.useRef();\n\tReact.useEffect(\n\t\t() => {\n\t\t\tif ( !tweener ) {\n\t\t\t\treturn console.error(\"No tweener found draggable : \", xAxis, yAxis)\n\t\t\t}\n\t\t\t// register listeners\n\t\t\tlet rootNode = root?.current,\n\t\t\t lastStartTm,\n\t\t\t cLock, dX,\n\t\t\t parents,\n\t\t\t dY, parentsState, refWidth, refHeight,\n\t\t\t _ = tweener._;\n\t\t\t\n\t\t\tif ( rootNode ) {\n\t\t\t\tdomUtils.addEvent(\n\t\t\t\t\trootNode, µ.dragList = {\n\t\t\t\t\t\t'dragstart': ( e, touch, descr ) => {//@todo\n\t\t\t\t\t\t\tlet pTweener,\n\t\t\t\t\t\t\t x,\n\t\t\t\t\t\t\t y, i, style;\n\t\t\t\t\t\t\tif ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so this work for touch events\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tparents = getScrollableNodes(e.target, tweener);\n\t\t\t\t\t\t\tlastStartTm = Date.now();\n\t\t\t\t\t\t\tdX = 0;\n\t\t\t\t\t\t\tdY = 0;\n\t\t\t\t\t\t\tparentsState = [];\n\t\t\t\t\t\t\trefWidth = (xBoxRef?.current || rootNode)?.offsetWidth;\n\t\t\t\t\t\t\trefHeight = (yBoxRef?.current || rootNode)?.offsetHeight;\n\t\t\t\t\t\t\tfor ( i = 0; i < parents.length; i++ ) {\n\t\t\t\t\t\t\t\tpTweener = parents[i];\n\t\t\t\t\t\t\t\tpTweener._updateBox();\n\t\t\t\t\t\t\t\t// react comp with tweener support\n\t\t\t\t\t\t\t\tif ( pTweener.__isTweener ) {\n\t\t\t\t\t\t\t\t\tx = xAxis && pTweener.axes?.[xAxis];\n\t\t\t\t\t\t\t\t\ty = yAxis && pTweener.axes?.[yAxis];\n\t\t\t\t\t\t\t\t\tpTweener._updateNodeInertia()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//tweener._updateNodeInertia()\n\t\t\t\t\t\t\t//e.stopPropagation();\n\t\t\t\t\t\t\t//e.preventDefault();\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'click' : ( e, touch, descr ) => {//@todo\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so this work for touch events\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( lastStartTm &&\n\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t(lastStartTm - Date.now() > _.options.maxClickTm) ||\n\t\t\t\t\t\t\t\t\tMath.abs(dY) > _.options.maxClickOffset ||\n\t\t\t\t\t\t\t\t\tMath.abs(dX) > _.options.maxClickOffset\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\t//console.log(\"prevented click\", lastStartTm, Math.abs(dX), Math.abs(dY))\n\t\t\t\t\t\t\t\t//console.log(':o ' + (lastStartTm - Date.now()) + ' ' + dX +\n\t\t\t\t\t\t\t\t//\t ' ' + dY, _.options.maxClickTm)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//else console.log(\"click\", Math.abs(dX), Math.abs(dY))\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'drag' : ( e, touch, descr ) => {//@todo\n\t\t\t\t\t\t\tif ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so this work for touch events\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlet pTweener,\n\t\t\t\t\t\t\t x, deltaX, xDispatched, xBox,\n\t\t\t\t\t\t\t y, deltaY, yDispatched, yBox,\n\t\t\t\t\t\t\t cState, i;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdX = -(descr._lastPos.x - descr._startPos.x);\n\t\t\t\t\t\t\tdY = -(descr._lastPos.y - descr._startPos.y);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( lastStartTm && ((lastStartTm > Date.now() - _.options.maxClickTm) && Math.abs(dY) < _.options.maxClickOffset && Math.abs(dX) < _.options.maxClickOffset) )// skip tap & click\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//console.log(':u ' + (lastStartTm - Date.now()) + ' ' + dX +\n\t\t\t\t\t\t\t\t// ' ' + dY)\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\txDispatched = !dX;\n\t\t\t\t\t\t\t\tyDispatched = !dY;\n\t\t\t\t\t\t\t\tif ( _.options.dragDirectionLock ) {\n\t\t\t\t\t\t\t\t\tif ( cLock === \"Y\" || !cLock && Math.abs(dY * .5) > Math.abs(dX) ) {\n\t\t\t\t\t\t\t\t\t\tcLock = \"Y\";\n\t\t\t\t\t\t\t\t\t\tdX = 0;\n\t\t\t\t\t\t\t\t\t\t//xDispatched = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if ( cLock === \"X\" || !cLock && Math.abs(dX * .5) > Math.abs(dY) ) {\n\t\t\t\t\t\t\t\t\t\tcLock = \"X\";\n\t\t\t\t\t\t\t\t\t\tdY = 0;\n\t\t\t\t\t\t\t\t\t\t//yDispatched = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor ( i = 0; i < parents.length; i++ ) {\n\t\t\t\t\t\t\t\t\tpTweener = parents[i];\n\t\t\t\t\t\t\t\t\t// react comp with tweener support\n\t\t\t\t\t\t\t\t\tif ( pTweener.__isTweener ) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tx = xAxis && pTweener.axes?.[xAxis];\n\t\t\t\t\t\t\t\t\t\ty = yAxis && pTweener.axes?.[yAxis];\n\t\t\t\t\t\t\t\t\t\t//console.log(\"drag\", dX, dY, xAxis, yAxis,\n\t\t\t\t\t\t\t\t\t\t// pTweener.axes);\n\t\t\t\t\t\t\t\t\t\tif ( !x && !y )\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t//console.log('Draggable:::306: ', parents);\n\t\t\t\t\t\t\t\t\t\tif ( !parentsState[i] ) {\n\t\t\t\t\t\t\t\t\t\t\tparentsState[i] = {\n\t\t\t\t\t\t\t\t\t\t\t\tx: x?.scrollPos,\n\t\t\t\t\t\t\t\t\t\t\t\ty: y?.scrollPos\n\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\tx?.inertia?.startMove();\n\t\t\t\t\t\t\t\t\t\t\ty?.inertia?.startMove();\n\t\t\t\t\t\t\t\t\t\t\txAxis && x && !x?.inertiaFrame && pTweener.applyInertia(x, xAxis);\n\t\t\t\t\t\t\t\t\t\t\tyAxis && y && !y?.inertiaFrame && pTweener.applyInertia(y, yAxis);\n\t\t\t\t\t\t\t\t\t\t\t//console.warn('Draggable::drag:190: ');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif ( x ) {\n\t\t\t\t\t\t\t\t\t\t\txBox = xBoxRef?.current\n\t\t\t\t\t\t\t\t\t\t\t ? refWidth\n\t\t\t\t\t\t\t\t\t\t\t : pTweener._.box.x\n\t\t\t\t\t\t\t\t\t\t\tdeltaX = dX && (dX / xBox) * (\n\t\t\t\t\t\t\t\t\t\t\t\tx.scrollableWindow ||\n\t\t\t\t\t\t\t\t\t\t\t\tx.scrollableArea) || 0;\n\t\t\t\t\t\t\t\t\t\t\tif ( xHook )\n\t\t\t\t\t\t\t\t\t\t\t\tdeltaX = xHook(deltaX);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif ( y ) {\n\t\t\t\t\t\t\t\t\t\t\tyBox = yBoxRef?.current\n\t\t\t\t\t\t\t\t\t\t\t ? refHeight\n\t\t\t\t\t\t\t\t\t\t\t : pTweener._.box.y\n\t\t\t\t\t\t\t\t\t\t\tdeltaY = dY && (dY / yBox) * (\n\t\t\t\t\t\t\t\t\t\t\t\ty.scrollableWindow ||\n\t\t\t\t\t\t\t\t\t\t\t\ty.scrollableArea) || 0;\n\t\t\t\t\t\t\t\t\t\t\tif ( yHook )\n\t\t\t\t\t\t\t\t\t\t\t\tdeltaY = yHook(deltaY);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//console.log('scrollX ',\n\t\t\t\t\t\t\t\t\t\t// xDispatched,\n\t\t\t\t\t\t\t\t\t\t// x?.inertia?.isInbound(parentsState[ i\n\t\t\t\t\t\t\t\t\t\t// ].x + deltaX), parentsState[ i ].x + deltaX );\n\t\t\t\t\t\t\t\t\t\tif ( x && !xDispatched && deltaX && x?.inertia?.isInbound(parentsState[i].x + deltaX)\n\t\t\t\t\t\t\t\t\t\t\t&& (pTweener.componentShouldScroll(xAxis, deltaX)) ) {\n\t\t\t\t\t\t\t\t\t\t\tx.inertia.hold(parentsState[i].x + deltaX);\n\t\t\t\t\t\t\t\t\t\t\t//parentsState[i].x = x.inertia._.pos;\n\t\t\t\t\t\t\t\t\t\t\txDispatched = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//console.log(\"scrollY\", yDispatched,\n\t\t\t\t\t\t\t\t\t\t// y?.inertia?.isInbound(parentsState[ i\n\t\t\t\t\t\t\t\t\t\t// ].y + deltaY), parentsState[ i ].y + deltaY);\n\t\t\t\t\t\t\t\t\t\tif ( y && !yDispatched && deltaY && y?.inertia?.isInbound(parentsState[i].y + deltaY)\n\t\t\t\t\t\t\t\t\t\t\t&& (pTweener.componentShouldScroll(yAxis, deltaY)) ) {\n\t\t\t\t\t\t\t\t\t\t\ty.inertia.hold(parentsState[i].y + deltaY);\n\t\t\t\t\t\t\t\t\t\t\t//parentsState[i].y = y.inertia._.pos;\n\t\t\t\t\t\t\t\t\t\t\t//console.log('Draggable::drag:190: ',\n\t\t\t\t\t\t\t\t\t\t\t// parentsState[i].y,deltaY);\n\t\t\t\t\t\t\t\t\t\t\tyDispatched = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( yDispatched && xDispatched ) {\n\t\t\t\t\t\t\t\t\t//e.stopPropagation();\n\t\t\t\t\t\t\t\t\t//e.cancelable && e.preventDefault();\n\t\t\t\t\t\t\t\t\t//return;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//dX = 0;\n\t\t\t\t\t\t\t\t//dY = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'dropped' : ( e, touch, descr ) => {\n\t\t\t\t\t\t\tlet pTweener,\n\t\t\t\t\t\t\t x, deltaX, xDispatched, vX,\n\t\t\t\t\t\t\t y, deltaY, yDispatched, vY,\n\t\t\t\t\t\t\t cState, i;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so this work for touch events\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcLock = undefined;\n\t\t\t\t\t\t\t//lastStartTm = undefined;\n\t\t\t\t\t\t\t//document.body.style.userSelect = '';\n\t\t\t\t\t\t\t//document.body.style.touchAction = '';\n\t\t\t\t\t\t\tfor ( i = 0; i < parents.length; i++ ) {\n\t\t\t\t\t\t\t\tpTweener = parents[i];\n\t\t\t\t\t\t\t\t// react comp with tweener support\n\t\t\t\t\t\t\t\tif ( pTweener.__isTweener && parentsState[i] ) {\n\t\t\t\t\t\t\t\t\t//console.log('Draggable::dropped:228: ',\n\t\t\t\t\t\t\t\t\t// pTweener._getAxis(xAxis)?.inertia);\n\t\t\t\t\t\t\t\t\tpTweener.axes?.[xAxis]?.inertia?.release();\n\t\t\t\t\t\t\t\t\tpTweener.axes?.[yAxis]?.inertia?.release();\n\t\t\t\t\t\t\t\t\t//pTweener._updateNodeInertia()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//else if ( is.element(tweener) ) {\n\t\t\t\t\t\t\t\t//\tcState = parentsState[i];\n\t\t\t\t\t\t\t\t//\tif ( cState ) {\n\t\t\t\t\t\t\t\t//\t\tcState.inertia.x.release();\n\t\t\t\t\t\t\t\t//\t\tcState.inertia.y.release();\n\t\t\t\t\t\t\t\t//\t}\n\t\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( lastStartTm && !((lastStartTm > Date.now() - _.options.maxClickTm) && Math.abs(dY)\n\t\t\t\t\t\t\t\t< _.options.maxClickOffset && Math.abs(dX) < _.options.maxClickOffset) )// skip tap\n\t\t\t\t\t\t\t\t// &\n\t\t\t\t\t\t\t\t// click\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\te.cancelable && e.preventDefault();\n\t\t\t\t\t\t\t\t//console.log(\"prevented\", Math.abs(dX), Math.abs(dY))\n\t\t\t\t\t\t\t\t//return;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//else {\n\t\t\t\t\t\t\t//console.log(\"not prevented\", Math.abs(dX), Math.abs(dY))\n\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t//lastStartTm = 0;\n\t\t\t\t\t\t\tparents = parentsState = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tnull,\n\t\t\t\t\t_.options.enableMouseDrag || mouseDrag,\n\t\t\t\t\ttouchDrag\n\t\t\t\t)\n\t\t\t\tµ.doRegister = !!rootNode;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tµ.doRegister = true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn () => {\n\t\t\t\tlet node = root.current;\n\t\t\t\tif ( µ.scrollEnabled ) {\n\t\t\t\t\tµ.scrollEnabled = false;\n\t\t\t\t\t\n\t\t\t\t\t//µ.axes = undefined;\n\t\t\t\t\tnode && µ.dragList && domUtils.removeEvent(node\n\t\t\t\t\t\t, µ.dragList)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tComp,\n\t\t\tforwardedRef,\n\t\t\titems,\n\t\t\txAxis, yAxis, yBoxRef,\n\t\t\txBoxRef, yRef,\n\t\t\tyHook, xHook,\n\t\t\ttweener,\n\t\t\tmouseDrag,\n\t\t\ttouchDrag,\n\t\t\tbutton\n\t\t]\n\t)\n\t\n\treturn <Comp ref={root} {...props}>{children}</Comp>;\n}\n//\n//@withTweener\n//export default class Draggable extends React.Component {\n//\tstatic propTypes = {\n//\t\txAxis : PropTypes.string,\n//\t\tyAxis : PropTypes.string,\n//\t\txBoxRef : PropTypes.object,\n//\t\tyRef : PropTypes.object,\n//\t\txHook : PropTypes.func,\n//\t\tyHook : PropTypes.func,\n//\t\tmouseDrag: PropTypes.bool,\n//\t\ttouchDrag: PropTypes.bool,\n//\t\tbutton : PropTypes.number\n//\t};\n//\tstatic defaultProps = {\n//\t\tComp :,\n//\t\tmouseDrag: false,\n//\t\ttouchDrag: true,\n//\t\tbutton : 0\n//\t};\n//\tstate = {};\n//\t_ = {};\n//\troot = React.createRef();\n//\t\n//\tcomponentWillUnmount() {\n//\t\tlet node = this.root?.current;\n//\t\tif ( µ.scrollEnabled ) {\n//\t\t\tµ.scrollEnabled = false;\n//\t\t\t\n//\t\t\t//µ.axes = undefined;\n//\t\t\tnode && µ.dragList && domUtils.removeEvent(node\n//\t\t\t\t, µ.dragList)\n//\t\t}\n//\t}\n//\t\n//\tcomponentDidMount() {\n//\t\tµregisterScrollListeners();\n//\t}\n//\t\n//\t/**\n//\t * Return scrollable parent node list basing a dom node\n//\t * @param node\n//\t * @returns {T[]}\n//\t */\n//\t\n//\t\n//\t/**\n//\t * todo rewrite or use lib ( no minimalist lib deal with multitouch correctly )\n//\t * Init touch & scroll listeners\n//\t * Drive scroll & drag values updates\n//\t * @private\n//\t */\n//\t_registerScrollListeners() {\n//\t\tlet rootNode = this.root?.current,\n//\t\t {\n//\t\t\t xAxis, yAxis, yHook, xHook, mouseDrag, touchDrag, tweener, xBoxRef, yBoxRef, button\n//\t\t } = this.props,\n//\t\t lastStartTm,\n//\t\t cLock, dX,\n//\t\t parents,\n//\t\t dY, parentsState, refWidth, refHeight,\n//\t\t _ = tweener._;\n//\t\t\n//\t\tif ( rootNode ) {\n//\t\t\tdomUtils.addEvent(\n//\t\t\t\trootNode, µ.dragList = {\n//\t\t\t\t\t'dragstart': ( e, touch, descr ) => {//@todo\n//\t\t\t\t\t\tlet pTweener,\n//\t\t\t\t\t\t x,\n//\t\t\t\t\t\t y, i, style;\n//\t\t\t\t\t\tif ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so this work for\n// touch events return; } parents = this.getScrollableNodes(e.target); lastStartTm = Date.now(); dX =\n// 0; dY = 0; parentsState = []; refWidth = (xBoxRef?.current || rootNode)?.offsetWidth; refHeight =\n// (yBoxRef?.current || rootNode)?.offsetHeight; for ( i = 0; i < parents.length; i++ ) { pTweener = parents[i];\n// pTweener._updateBox(); // react comp with tweener support if ( pTweener.__isTweener ) { x = xAxis &&\n// pTweener.axes?.[xAxis]; y = yAxis && pTweener.axes?.[yAxis]; pTweener._updateNodeInertia() } }\n// //tweener._updateNodeInertia() //e.stopPropagation(); //e.preventDefault(); }, 'click' : ( e, touch, descr ) =>\n// {//@todo if ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so this work for touch events\n// return; } if ( lastStartTm && ( (lastStartTm - Date.now() > _.options.maxClickTm) || Math.abs(dY) >\n// _.options.maxClickOffset || Math.abs(dX) > _.options.maxClickOffset ) ) { e.preventDefault(); e.stopPropagation();\n// //console.log(\"prevented click\", lastStartTm, Math.abs(dX), Math.abs(dY)) //console.log(':o ' + (lastStartTm -\n// Date.now()) + ' ' + dX + //\t ' ' + dY, _.options.maxClickTm) } //else console.log(\"click\",\n// Math.abs(dX), Math.abs(dY)) }, 'drag' : ( e, touch, descr ) => {//@todo if ( (e) instanceof MouseEvent &&\n// e.button !== button ) {// allow undefined so this work for touch events return; } let pTweener, x, deltaX,\n// xDispatched, xBox, y, deltaY, yDispatched, yBox, cState, i; dX = -(descr._lastPos.x - descr._startPos.x); dY =\n// -(descr._lastPos.y - descr._startPos.y); if ( lastStartTm && ((lastStartTm > Date.now() - _.options.maxClickTm) &&\n// Math.abs(dY) < _.options.maxClickOffset && Math.abs(dX) < _.options.maxClickOffset) )// skip tap & click {\n// //console.log(':u ' + (lastStartTm - Date.now()) + ' ' + dX + // ' ' + dY) return; } else { xDispatched = !dX;\n// yDispatched = !dY; if ( _.options.dragDirectionLock ) { if ( cLock === \"Y\" || !cLock && Math.abs(dY * .5) >\n// Math.abs(dX) ) { cLock = \"Y\"; dX = 0; //xDispatched = true; } else if ( cLock === \"X\" || !cLock && Math.abs(dX *\n// .5) > Math.abs(dY) ) { cLock = \"X\"; dY = 0; //yDispatched = true; } } for ( i = 0; i < parents.length; i++ ) {\n// pTweener = parents[i]; // react comp with tweener support if ( pTweener.__isTweener ) { x = xAxis &&\n// pTweener.axes?.[xAxis]; y = yAxis && pTweener.axes?.[yAxis]; //console.log(\"drag\", dX, dY, xAxis, yAxis, //\n// pTweener.axes); if ( !x && !y ) continue; //console.log('Draggable:::306: ', parents); if ( !parentsState[i] ) {\n// parentsState[i] = { x: x?.scrollPos, y: y?.scrollPos }; x?.inertia?.startMove(); y?.inertia?.startMove(); xAxis && x\n// && !x?.inertiaFrame && pTweener.applyInertia(x, xAxis); yAxis && y && !y?.inertiaFrame && pTweener.applyInertia(y,\n// yAxis); //console.warn('Draggable::drag:190: '); } if ( x ) { xBox = xBoxRef?.current ? refWidth :\n// pTweener._.box.x deltaX = dX && (dX / xBox) * ( x.scrollableWindow || x.scrollableArea) || 0; if ( xHook ) deltaX =\n// xHook(deltaX); } if ( y ) { yBox = yBoxRef?.current ? refHeight : pTweener._.box.y deltaY = dY && (dY / yBox) * (\n// y.scrollableWindow || y.scrollableArea) || 0; if ( yHook ) deltaY = yHook(deltaY); } //console.log('scrollX ', //\n// xDispatched, // x?.inertia?.isInbound(parentsState[ i // ].x + deltaX), parentsState[ i ].x +\n// deltaX ); if ( x && !xDispatched && deltaX && x?.inertia?.isInbound(parentsState[i].x + deltaX) &&\n// (pTweener.componentShouldScroll(xAxis, deltaX)) ) { x.inertia.hold(parentsState[i].x + deltaX); //parentsState[i].x\n// = x.inertia._.pos; xDispatched = true; } //console.log(\"scrollY\", yDispatched, //\n// y?.inertia?.isInbound(parentsState[ i // ].y + deltaY), parentsState[ i ].y + deltaY); if ( y && !yDispatched &&\n// deltaY && y?.inertia?.isInbound(parentsState[i].y + deltaY) && (pTweener.componentShouldScroll(yAxis, deltaY)) ) {\n// y.inertia.hold(parentsState[i].y + deltaY); //parentsState[i].y = y.inertia._.pos;\n// //console.log('Draggable::drag:190: ', // parentsState[i].y,deltaY); yDispatched = true; } } } if ( yDispatched &&\n// xDispatched ) { //e.stopPropagation(); //e.cancelable && e.preventDefault(); //return; } //dX = 0; //dY = 0; } } ,\n// 'dropped': ( e, touch, descr ) => { let pTweener, x, deltaX, xDispatched, vX, y, deltaY, yDispatched, vY, cState, i;\n// if ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so this work for touch events return; }\n// cLock = undefined; //lastStartTm = undefined; //document.body.style.userSelect = '';\n// //document.body.style.touchAction = ''; for ( i = 0; i < parents.length; i++ ) { pTweener = parents[i]; // react\n// comp with tweener support if ( pTweener.__isTweener && parentsState[i] ) { //console.log('Draggable::dropped:228: ',\n// // pTweener._getAxis(xAxis)?.inertia); pTweener.axes?.[xAxis]?.inertia?.release();\n// pTweener.axes?.[yAxis]?.inertia?.release(); //pTweener._updateNodeInertia() } //else if ( is.element(tweener) ) {\n// //\tcState = parentsState[i]; //\tif ( cState ) { //\t\tcState.inertia.x.release();\n// //\t\tcState.inertia.y.release(); //\t} //} } if ( lastStartTm && !((lastStartTm > Date.now() -\n// _.options.maxClickTm) && Math.abs(dY) < _.options.maxClickOffset && Math.abs(dX) < _.options.maxClickOffset) )//\n// skip tap // & // click { e.stopPropagation(); e.cancelable && e.preventDefault(); //console.log(\"prevented\",\n// Math.abs(dX), Math.abs(dY)) //return; } //else { //console.log(\"not prevented\", Math.abs(dX), Math.abs(dY)) //}\n// //lastStartTm = 0; parents = parentsState = null; } }, null, _.options.enableMouseDrag || mouseDrag, touchDrag )\n// µ.doRegister = !!rootNode; } else { µ.doRegister = true; } } getProps() { let props = this.props; props = {\n// ...props }; delete props.Comp; delete props.xAxis; delete props.yAxis; delete props.tweener; delete\n// props.forwardedRef; return props; } render() { let { children, Comp, forwardedRef, items = [], xAxis, yAxis,\n// yBoxRef, xBoxRef, yRef, yHook, xHook, tweener, mouseDrag, touchDrag, button, ...props } = this.props; return\n// <TweenerContext.Consumer> { parentTweener => { //console.log('got ', parentTweener._.options.id, xAxis, //\n// yAxis); µparentTweener = parentTweener; return <Comp ref={this.root} {...props}>{children}</Comp>; } }\n// </TweenerContext.Consumer>; } }\nDraggable.div = ( props ) => {\n\treturn <Draggable {...props}/>;\n}\nexport default Draggable;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\nimport React from \"react\";\nimport TweenerContext from \"../comps/TweenerContext\";\n\nexport default ()=>{\n\treturn React.useContext(TweenerContext)\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport React from \"react\";\nimport Tweener from '../comps/Tweener';\nimport { isReactComponent } from '../utils/react';\n\nconst SimpleObjectProto = ( {} ).constructor;\n\n/**\n * asTweener decorator\n * @param argz\n * @returns {*}\n */\nexport default function asTweener( ...argz ) {\n \n let BaseComponent = ( !argz[ 0 ] || isReactComponent(argz[ 0 ]) ) && argz.shift(),\n options = ( !argz[ 0 ] || argz[ 0 ] instanceof SimpleObjectProto ) && argz.shift() || {};\n if ( !BaseComponent ) {\n return function ( BaseComponent ) {\n return asTweener(BaseComponent, options)\n }\n }\n \n options = {\n wheelRatio : 5,\n maxClickTm : 200,\n maxClickOffset: 20,\n ...options,\n };\n \n \n let withRef = React.forwardRef(( props, ref ) => {\n return <Tweener oProps={ props } forwardedRef={ ref }\n BaseComponent={ BaseComponent }\n tweenerOptions={ options }/>;\n });\n withRef.displayName = String.fromCharCode(0xD83E, 0xDDD9) + ( BaseComponent.displayName || BaseComponent.name );\n return withRef;\n}\n","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport React from \"react\";\nimport is from \"is\";\n\nimport { isReactComponent } from '../utils/react';\nimport TweenerContext from \"../comps/TweenerContext\";\n\n\nconst SimpleObjectProto = ( {} ).constructor;\n\n\n/**\n * asTweener decorator\n * @param argz\n * @returns {*}\n */\nexport default function withTweener( ...argz ) {\n \n let BaseComponent = ( !argz[ 0 ] || isReactComponent(argz[ 0 ]) ) && argz.shift(),\n opts = ( !argz[ 0 ] || argz[ 0 ] instanceof SimpleObjectProto ) && argz.shift() || {};\n \n if ( !( BaseComponent && ( BaseComponent.prototype instanceof React.Component || BaseComponent === React.Component ) ) ) {\n return function ( BaseComponent ) {\n return withTweener(BaseComponent, opts)\n }\n }\n \n class TweenerToProps extends React.Component {\n static displayName = ( BaseComponent.displayName || BaseComponent.name );\n \n render() {\n return <TweenerContext.Consumer>\n {\n tweener => {\n return <BaseComponent { ...this.props } tweener={ tweener }\n ref={ this.props.forwardedRef }/>;\n }\n }\n </TweenerContext.Consumer>;\n }\n }\n \n \n let withRef = React.forwardRef(( props, ref ) => {\n return <TweenerToProps { ...props } forwardedRef={ ref }/>;\n });\n withRef.displayName = TweenerToProps.displayName;\n return withRef;\n}\n","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport React from 'react';\nimport Axis from './comps/Axis';\nimport Context from './comps/TweenerContext';\nimport Node from './comps/Node';\nimport Draggable from './comps/Draggable';\nimport useVoodoo from './hooks/useVoodoo';\nimport useTweener from './hooks/useTweener';\nimport tweener from './spells/asTweener';\nimport child from './spells/withTweener';\nimport dom from './utils/dom.js';\nimport * as tools from './utils/tweenTools.js';\n\n@tweener\nclass Component extends React.Component {\n render() {\n return this.props.children;\n }\n}\n\nexport {\n tweener,\n child,\n useTweener,\n useVoodoo,\n useVoodoo as hook,\n tools,\n Draggable,\n Component,\n Node,\n Context,\n Axis,\n dom\n};\nexport default {\n tweener,\n child,\n useTweener,\n useVoodoo,\n hook: useVoodoo,\n tools,\n Draggable,\n Component,\n Node,\n Context,\n Axis,\n dom\n};"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"react-voodoo.js","mappings":";qBAOAA,EAAOC,QAAU,CAOhBC,eAPgB,SAOAC,EAASC,EAAMC,GAC9B,IACsBC,EAAGN,EADrBO,EAASH,EAAKI,MAAM,KACpBC,EAASN,EAGb,IADAG,EAAI,EACIA,EAAIC,EAAMG,OAAS,GAAID,EAASA,EAAOF,EAAMD,IAAMG,EAAOF,EAAMD,KAAO,GAAIA,IAEnFN,EAAuC,IAA9BW,OAAOC,KAAKP,GAAOK,QAAgBL,EAAMQ,SAAWR,EAEvDI,EAAOF,EAAMD,KAGRG,EAAOF,EAAMD,IAAIQ,YAC3BH,OAAOI,OAAOf,EAAQS,EAAOF,EAAMD,KAInCG,EAAOF,EAAMD,IAAMN,GAPnBS,EAAOF,EAAMD,IAAMN,wGCvBtB,IAASgB,EAAW,GAAId,EAAee,EAAAA,KAAAA,eAEvCf,EAAec,EAAU,MAD0BC,EAAQ,MAG3Df,EAAec,EAAU,MAD0BC,EAAQ,KAG3Df,EAAec,EAAU,OAD2BC,EAAQ,MAG5Df,EAAec,EAAU,QAD4BC,EAAQ,MAG7Df,EAAec,EAAU,QAD4BC,EAAQ,MAG7Df,EAAec,EAAU,QAD4BC,EAAQ,MAG7Df,EAAec,EAAU,SAD6BC,EAAQ,MAG9Df,EAAec,EAAU,SAD6BC,EAAQ,MAGvD,IAAMC,EAAMF,EAASE,IAEfC,EAAOH,EAASG,KAEhBC,EAAQJ,EAASI,MAEjBC,EAAML,EAASK,IAEfC,EAAQN,EAASM,MAEjBC,EAASP,EAASO,OAElBC,EAAQR,EAASQ,iGCL9B,IAAMC,EAAQ,CACV,OAA+B,CAAE,WAAc,CAAC,YAAa,cAAe,eAAgB,eAC5F,aAA+B,CAAE,MAAS,CAAC,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L,YAAgB2F,EAAc3F,aAAe2F,EAAcW,KAetE,IAAIgF,EAAkBthB,IAAAA,YAAiB,SAAE3K,EAAOuf,GAC5C,OAAO,kBAAC+M,EAAD,OAAqBtsB,EAArB,CAA6Byd,aAAe8B,QAGvD,OADA0M,EAAQtL,YAAc2L,EAAe3L,YAC9BsL,MCjCLjE,GADLtB,GAAAA,GAAAA,SAAAA,iFAEGL,OAAA,WACI,OAAOhW,KAAKrQ,MAAMonB,YAHzBV,CACuB/b,IAAAA,aAAAA,GAoBxB,UACI+b,QAAAA,GACA6F,MAAAA,GACAC,WAAAA,GACAlF,UAAAA,GACAmF,KAAMnF,GACNoF,MAAAA,EACAlD,UAAAA,GACAxB,UAAAA,GACAK,KAAAA,GACAsE,QAAAA,EACAzc,KAAAA,GACA0c,IAAAA","sources":["webpack://react-voodoo/./src/.___layerPackIndexUtils.js","webpack://react-voodoo/./src/MapOf.react_voodoo_utils_css_demux_typed_____js.gen.js","webpack://react-voodoo/./src/utils/css/cssUtils.js","webpack://react-voodoo/./src/utils/css/demux/filter.js","webpack://react-voodoo/./src/utils/css/demux/transform.js","webpack://react-voodoo/./src/utils/css/demux/typed/any.js","webpack://react-voodoo/./src/utils/css/demux/typed/bool.js","webpack://react-voodoo/external commonjs \"color-rgba\"","webpack://react-voodoo/./src/utils/css/demux/typed/color.js","webpack://react-voodoo/./src/utils/css/demux/typed/int.js","webpack://react-voodoo/./src/utils/css/demux/typed/multi.js","webpack://react-voodoo/./src/utils/css/demux/typed/number.js","webpack://react-voodoo/./src/utils/css/demux/typed/ratio.js","webpack://react-voodoo/./src/utils/css/demux/typed/shadow.js","webpack://react-voodoo/external commonjs \"@babel/runtime/helpers/extends\"","webpack://react-voodoo/external commonjs \"d3-ease\"","webpack://react-voodoo/external commonjs \"is\"","webpack://react-voodoo/webpack/bootstrap","webpack://react-voodoo/webpack/runtime/compat get default export","webpack://react-voodoo/webpack/runtime/define property getters","webpack://react-voodoo/webpack/runtime/hasOwnProperty shorthand","webpack://react-voodoo/webpack/runtime/make namespace object","webpack://react-voodoo/external commonjs \"@babel/runtime/helpers/inheritsLoose\"","webpack://react-voodoo/external commonjs \"react\"","webpack://react-voodoo/external commonjs \"fast-deep-equal\"","webpack://react-voodoo/external commonjs \"@babel/runtime/helpers/objectWithoutPropertiesLoose\"","webpack://react-voodoo/./src/comps/TweenerContext.js","webpack://react-voodoo/external commonjs \"@babel/runtime/helpers/assertThisInitialized\"","webpack://react-voodoo/external commonjs \"react-dom\"","webpack://react-voodoo/./src/utils/tweenTools.js","webpack://react-voodoo/./src/MapOf.react_voodoo_utils_css_demux_____js.gen.js","webpack://react-voodoo/./src/utils/css/index.js","webpack://react-voodoo/external commonjs \"tween-axis\"","webpack://react-voodoo/./src/utils/dom.js","webpack://react-voodoo/./src/utils/CssTweenAxis.js","webpack://react-voodoo/./src/utils/inertia.js","webpack://react-voodoo/./src/comps/Tweener.js","webpack://react-voodoo/./src/hooks/useVoodoo.js","webpack://react-voodoo/./src/comps/Axis.js","webpack://react-voodoo/external commonjs \"shortid\"","webpack://react-voodoo/./src/utils/react.js","webpack://react-voodoo/./src/comps/Node.js","webpack://react-voodoo/./src/comps/Draggable.js","webpack://react-voodoo/./src/hooks/useTweener.js","webpack://react-voodoo/./src/spells/asTweener.js","webpack://react-voodoo/./src/spells/withTweener.js","webpack://react-voodoo/./src/index.js"],"sourcesContent":["/*\r\n * Copyright 2021 BRAUN Nathanael\r\n *\r\n * Use of this source code is governed by an MIT-style\r\n * license that can be found in the LICENSE file or at\r\n * https://opensource.org/licenses/MIT.\r\n */\r\nmodule.exports = {\r\n\t/**\r\n\t * Walk & set executables from globs requires\r\n\t * @param _target\r\n\t * @param path\r\n\t * @param value\r\n\t */\r\n\twalknSetExport( _target, path, value ) {\r\n\t\tlet fPath = path.split('/'),\r\n\t\t target = _target, i, module;\r\n\t\t\r\n\t\ti = 0;\r\n\t\twhile ( i < fPath.length - 1 ) target = target[fPath[i]] = target[fPath[i]] || {}, i++;\r\n\t\t\r\n\t\tmodule = Object.keys(value).length === 1 && value.default || value;\r\n\t\t\r\n\t\tif ( !target[fPath[i]] ) {\r\n\t\t\ttarget[fPath[i]] = module;\r\n\t\t}\r\n\t\telse if ( !target[fPath[i]].__esModule ) {// if this is simple path obj write over\r\n\t\t\tObject.assign(module, target[fPath[i]]);\r\n\t\t\ttarget[fPath[i]] = module;\r\n\t\t}\r\n\t\telse {// when we are in hot reload this may delete some sub modules... @todo\r\n\t\t\ttarget[fPath[i]] = module;\r\n\t\t}\r\n\t}\r\n};","/* This is a virtual file generated by layer-pack */\nlet req, _exports = {}, walknSetExport=require('react-voodoo/.___layerPackIndexUtils').walknSetExport;\nconst _react_voodoo_utils_css_demux_typed_any_js = require(\"react-voodoo/utils/css/demux/typed/any.js\");\nwalknSetExport(_exports, \"any\", _react_voodoo_utils_css_demux_typed_any_js);\nconst _react_voodoo_utils_css_demux_typed_int_js = require(\"react-voodoo/utils/css/demux/typed/int.js\");\nwalknSetExport(_exports, \"int\", _react_voodoo_utils_css_demux_typed_int_js);\nconst _react_voodoo_utils_css_demux_typed_bool_js = require(\"react-voodoo/utils/css/demux/typed/bool.js\");\nwalknSetExport(_exports, \"bool\", _react_voodoo_utils_css_demux_typed_bool_js);\nconst _react_voodoo_utils_css_demux_typed_color_js = require(\"react-voodoo/utils/css/demux/typed/color.js\");\nwalknSetExport(_exports, \"color\", _react_voodoo_utils_css_demux_typed_color_js);\nconst _react_voodoo_utils_css_demux_typed_multi_js = require(\"react-voodoo/utils/css/demux/typed/multi.js\");\nwalknSetExport(_exports, \"multi\", _react_voodoo_utils_css_demux_typed_multi_js);\nconst _react_voodoo_utils_css_demux_typed_ratio_js = require(\"react-voodoo/utils/css/demux/typed/ratio.js\");\nwalknSetExport(_exports, \"ratio\", _react_voodoo_utils_css_demux_typed_ratio_js);\nconst _react_voodoo_utils_css_demux_typed_number_js = require(\"react-voodoo/utils/css/demux/typed/number.js\");\nwalknSetExport(_exports, \"number\", _react_voodoo_utils_css_demux_typed_number_js);\nconst _react_voodoo_utils_css_demux_typed_shadow_js = require(\"react-voodoo/utils/css/demux/typed/shadow.js\");\nwalknSetExport(_exports, \"shadow\", _react_voodoo_utils_css_demux_typed_shadow_js);\n\nexport const any = _exports.any;\n\nexport const bool = _exports.bool;\n\nexport const color = _exports.color;\n\nexport const int = _exports.int;\n\nexport const multi = _exports.multi;\n\nexport const number = _exports.number;\n\nexport const ratio = _exports.ratio;\n\nexport const shadow = _exports.shadow;\nexport default _exports;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst props = {\n \"margin\" : { \"properties\": [\"marginTop\", \"marginRight\", \"marginBottom\", \"marginLeft\"] },\n \"marginBottom\" : { \"types\": [\"length\"] },\n \"marginLeft\" : { \"types\": [\"length\"] },\n \"marginRight\" : { \"types\": [\"length\"] },\n \"marginTop\" : { \"types\": [\"length\"] },\n \"padding\" : { \"properties\": [\"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"] },\n \"paddingBottom\" : { \"types\": [\"length\"] },\n \"paddingLeft\" : { \"types\": [\"length\"] },\n \"paddingRight\" : { \"types\": [\"length\"] },\n \"paddingTop\" : { \"types\": [\"length\"] },\n \"bottom\" : { \"types\": [\"length-percentage-calc\"] },\n \"left\" : { \"types\": [\"length-percentage-calc\"] },\n \"right\" : { \"types\": [\"length-percentage-calc\"] },\n \"top\" : { \"types\": [\"length-percentage-calc\"] },\n \"zIndex\" : { \"types\": [\"integer\"] },\n \"width\" : { \"types\": [\"length-percentage-calc\"] },\n \"maxWidth\" : { \"types\": [\"length-percentage-calc\"] },\n \"minWidth\" : { \"types\": [\"length-percentage-calc\"] },\n \"height\" : { \"types\": [\"length-percentage-calc\"] },\n \"maxHeight\" : { \"types\": [\"length-percentage-calc\"] },\n \"minHeight\" : { \"types\": [\"length-percentage-calc\"] },\n \"lineHeight\" : { \"types\": [\"number\", \"length\"] },\n \"verticalAlign\" : { \"types\": [\"length\"] },\n \"visibility\" : { \"types\": [\"visibility\"] },\n \"borderSpacing\" : { \"types\": [\"length\"], \"multiple\": true },\n \"color\" : { \"types\": [\"color\"] },\n \"opacity\" : { \"types\": [\"number\"] },\n //\"background\" : { \"properties\": [\"backgroundColor\", \"backgroundPosition\", \"backgroundSize\"] },\n \"backgroundColor\" : { \"types\": [\"color\"] },\n \"backgroundPosition\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\" : true,\n \"repeatable\": true\n },\n \"backgroundSize\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\" : true,\n \"repeatable\": true\n },\n \"border\" : { \"properties\": [\"borderStyle\", \"borderWidth\", \"borderColor\"] },\n \"borderBottom\" : { \"properties\": [\"borderBottomStyle\", \"borderBottomWidth\", \"borderBottomColor\"] },\n \"borderLeft\" : { \"properties\": [\"borderLeftStyle\", \"borderLeftWidth\", \"borderLeftColor\"] },\n \"borderRight\" : { \"properties\": [\"borderRightStyle\", \"borderRightWidth\", \"borderRightColor\"] },\n \"borderTop\" : { \"properties\": [\"borderTopStyle\", \"borderTopWidth\", \"borderTopColor\"] },\n \"borderColor\" : { \"properties\": [\"borderTopColor\", \"borderRightColor\", \"borderBottomColor\", \"borderLeftColor\"] },\n \"borderWidth\" : { \"properties\": [\"borderTopWidth\", \"borderRightWidth\", \"borderBottomWidth\", \"borderLeftWidth\"] },\n \"borderBottomColor\" : { \"types\": [\"color\"] },\n \"borderLeftColor\" : { \"types\": [\"color\"] },\n \"borderRightColor\" : { \"types\": [\"color\"] },\n \"borderTopColor\" : { \"types\": [\"color\"] },\n \"borderBottomWidth\" : { \"types\": [\"length\"] },\n \"borderLeftWidth\" : { \"types\": [\"length\"] },\n \"borderRightWidth\" : { \"types\": [\"length\"] },\n \"borderTopWidth\" : { \"types\": [\"length\"] },\n \"borderRadius\" : { \"properties\": [\"borderTopLeftRadius\", \"borderTopRightRadius\", \"borderBottomRightRadius\", \"borderBottomLeftRadius\"] },\n \"borderTopLeftRadius\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"borderTopRightRadius\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"borderBottomRightRadius\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"borderBottomLeftRadius\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"boxShadow\" : { \"types\": [\"shadow-list\"] },\n \"caretColor\" : { \"types\": [\"color\"] },\n \"outline\" : { \"properties\": [\"outlineColor\", \"outlineWidth\"] },\n \"outlineColor\" : { \"types\": [\"color\"] },\n \"outlineWidth\" : { \"types\": [\"length\"] },\n \"outlineOffset\" : { \"types\": [\"length\"] },\n \"flex\" : { \"properties\": [\"flexGrow\", \"flexShrink\", \"flexBasis\"] },\n \"flexGrow\" : { \"types\": [\"number\"] },\n \"flexShrink\" : { \"types\": [\"number\"] },\n \"flexBasis\" : { \"types\": [\"length-percentage-calc\"] },\n \"order\" : { \"types\": [\"integer\"] },\n \"font\" : { \"properties\": [\"fontWeight\", \"fontStretch\", \"fontSize\", \"lineHeight\"] },\n \"fontWeight\" : { \"types\": [\"font-weight\"] },\n \"fontStretch\" : { \"types\": [\"font-stretch\"] },\n \"fontSize\" : { \"types\": [\"length\"] },\n \"fontSizeAdjust\" : { \"types\": [\"number\"] },\n \"gridTemplateColumns\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"gridTemplateRows\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"gridTemplate\" : { \"properties\": [\"gridTemplateRows\", \"gridTemplateColumns\"] },\n \"grid\" : { \"properties\": [\"gridTemplateRows\", \"gridTemplateColumns\"] },\n \"gridRowGap\" : { \"types\": [\"length-percentage-calc\"] },\n \"gridColumnGap\" : { \"types\": [\"length-percentage-calc\"] },\n \"gridGap\" : { \"properties\": [\"gridRowGap\", \"gridColumnGap\"] },\n \"clip\" : { \"types\": [\"rectangle\"] },\n \"clipPath\" : { \"types\": [\"basic-shape\"] },\n \"mask\" : { \"properties\": [\"maskPosition\", \"maskSize\"] },\n \"maskPosition\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\" : true,\n \"repeatable\": true\n },\n \"maskSize\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\" : true,\n \"repeatable\": true\n },\n \"shapeOutside\" : { \"types\": [\"basic-shape\"] },\n \"shapeMargin\" : { \"types\": [\"length-percentage-calc\"] },\n \"shapeImageThreshold\" : { \"types\": [\"number\"] },\n \"scrollPadding\" : { \"properties\": [\"scrollPaddingTop\", \"scrollPaddingRight\", \"scrollPaddingBottom\", \"scrollPaddingLeft\"] },\n \"scrollPaddingTop\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingRight\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingBottom\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingLeft\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingBlock\" : { \"properties\": [\"scrollPaddingBlockStart\", \"scrollPaddingBlockEnd\"] },\n \"scrollPaddingBlockStart\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingBlockEnd\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingInline\" : { \"properties\": [\"scrollPaddingInlineStart\", \"scrollPaddingInlineEnd\"] },\n \"scrollPaddingInlineStart\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollPaddingInlineEnd\" : { \"types\": [\"length-percentage-calc\"] },\n \"scrollSnapMargin\" : { \"properties\": [\"scrollSnapMarginTop\", \"scrollSnapMarginRight\", \"scrollSnapMarginBottom\", \"scrollSnapMarginLeft\"] },\n \"scrollSnapMarginTop\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginRight\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginBottom\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginLeft\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginBlock\" : { \"properties\": [\"scrollSnapMarginBlockStart\", \"scrollSnapMarginBlockEnd\"] },\n \"scrollSnapMarginBlockStart\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginBlockEnd\" : { \"types\": [\"length\"] },\n \"scrollSnapMarginInline\" : { \"properties\": [\"scrollSnapMarginInlineStart\", \"scrollSnapMarginInlineEnd\"] },\n \"scrollSnapMarginInlineStart\": { \"types\": [\"length\"] },\n \"scrollSnapMarginInlineEnd\" : { \"types\": [\"length\"] },\n \"textDecoration\" : { \"properties\": [\"textDecorationColor\"] },\n \"textDecorationColor\" : { \"types\": [\"color\"] },\n \"textEmphasis\" : { \"properties\": [\"textEmphasisColor\"] },\n \"textEmphasisColor\" : { \"types\": [\"color\"] },\n \"textShadow\" : { \"types\": [\"shadow-list\"] },\n \"columns\" : { \"properties\": [\"columnWidth\", \"columnCount\"] },\n \"columnWidth\" : { \"types\": [\"length\"] },\n \"columnCount\" : { \"types\": [\"integer\"] },\n \"columnGap\" : { \"types\": [\"length-percentage-calc\"] },\n \"columnRule\" : { \"properties\": [\"columnRuleColor\", \"columnRuleWidth\"] },\n \"columnRuleColor\" : { \"types\": [\"color\"] },\n \"columnRuleWidth\" : { \"types\": [\"length\"] },\n \"letterSpacing\" : { \"types\": [\"length\"] },\n \"tabSize\" : { \"types\": [\"length\"] },\n \"textIndent\" : { \"types\": [\"length-percentage-calc\"] },\n \"wordSpacing\" : { \"types\": [\"length-percentage-calc\"] },\n \"transform\" : { \"types\": [\"transform\"] },\n \"transformOrigin\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n },\n \"perspective\" : { \"types\": [\"length\"] },\n \"perspectiveOrigin\" : {\n \"types\" : [\"length-percentage-calc\"],\n \"multiple\": true\n }\n}\n\n//\n///**\n// * List of animatable types used by properties, with descriptions of how to interpolate\n// each type. * Data taken from https://www.w3.org/TR/css3-transitions/#animatable-types\n// and some other W3C specs. * * @type {Object} */ exports.types = { 'color'\n// : { name: 'color', href: 'https://www.w3.org/TR/css3-transitions/#animtype-color'\n// }, 'length' : { name: 'length', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-length' }, 'percentage' :\n// { name: 'percentage', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-percentage' },\n// 'length-percentage-calc': { name: 'length, percentage, or calc', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-lpcalc' }, 'integer' :\n// { name: 'integer', href: 'https://www.w3.org/TR/css3-transitions/#animtype-integer' },\n// 'font-weight' : { name: 'font weight', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-font-weight' }, 'number'\n// : { name: 'number', href: 'https://www.w3.org/TR/css3-transitions/#animtype-number'\n// }, 'rectangle' : { name: 'rectangle', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-rect' }, 'visibility' : {\n// name: 'visibility', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-visibility' }, 'shadow-list'\n// : { name: 'shadow list', href:\n// 'https://www.w3.org/TR/css3-transitions/#animtype-shadow-list' }, // Other specs\n// 'transform' : { name: 'transform', href: 'https://www.w3.org/TR/css3-transforms/#interpolation-of-transforms' }, 'font-stretch' : { name: 'font stretch', href: 'https://www.w3.org/TR/css3-fonts/#font-stretch-animation' }, 'basic-shape' : { name: 'basic shape', href: 'https://www.w3.org/TR/css-shapes-1/#basic-shape-interpolation' }, };\n\nexport const units = ['', 'deg', 'box', 'bz', 'bh', 'bw', 'deg', 'em', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax'];\nexport const unitsRe = new RegExp(\n \"([+-]?(?:[0-9]*[.])?[0-9]+)\\\\s*(\" +\n ['\\\\w+', 'deg', 'bz', 'bh', 'bw', 'cap', 'ch', 'deg', 'em', 'ic', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax'].join('|')\n + \")\"\n);\nexport const floatCut = ( v = 0 ) => Number(v.toFixed(3));\n\nexport function expandShorthandProperty( property, value, target = {} ) {\n let type = props[ property ],\n childProps = type && type.properties,\n values = value.split(' ');\n \n if ( type.multiple )\n childProps && childProps.forEach(\n ( k, i ) => {\n target[ k ] = values[ i % values.length ];\n }\n )\n else\n childProps && childProps.forEach(\n ( k, i ) => {\n if ( values[ i ] )\n target[ k ] = values[ i ];\n }\n )\n return target;\n};\n\nexport function isShorthandProperty( property ) {\n let type = props[ property ],\n childProps = type && type.properties;\n return childProps && !!childProps.length;\n};\n\n\nexport function isValidDeclaration( property, value ) {\n return !!props[ property ];\n};\n\n/**\n * Check if a CSS property can be animated\n * @param {string} property CSS property name\n * @return {boolean} True if the property can be animated\n */\nexport function canAnimate( property ) {\n return props.hasOwnProperty(property);\n};\n\n/**\n * Get a definition of how a CSS property can be animated\n * @param {string} property CSS property name\n * @param {boolean} expand Expand definitions for sub-properties, when available\n * @return {object} Property definition, or null if it can't be animated\n */\nexport function getProperty( property, expand ) {\n if ( !exports.canAnimate(property) ) {\n return null;\n }\n var prop = props[ property ];\n var ret = { name: property };\n Object.keys(prop).forEach(function ( key ) {\n var value = prop[ key ];\n if ( Array.isArray(value) ) {\n if ( key === 'properties' && expand ) {\n value = value.map(function ( subProp ) {\n return exports.getProperty(subProp, expand);\n });\n }\n else {\n value = value.slice(); // clone\n }\n }\n ret[ key ] = value;\n });\n return ret;\n};\n","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport {floatCut, units, unitsRe} from \"../cssUtils\";\n\nconst\n\tdefaultUnits = {\n\t\tblur : 'px',\n\t\tbrightness: '%',\n\t\tcontrast : '%',\n\t\tdropShadow: true,\n\t\tgrayscale : '%',\n\t\thueRotate : 'deg',\n\t\tinvert : \"%\",\n\t\topacity : \"%\",\n\t\tsaturate : \"%\",\n\t\tsepia : \"%\"\n\t}, defaultValue = {};\n\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\tif ( path.length === 4 ) {\n\t\t//console.warn(\"dec\", twKey, dataMap[path[0]][path[1]][path[2]])\n\t\t// dec count on filter\n\t\tif ( !--dataMap[path[0]][path[1]][path[2]] && !keepValues ) {\n\t\t\tdelete dataMap[path[0]][path[1]][path[2]];\n\t\t}\n\t\t//if ( Object.keys(dataMap[path[0]][path[1]]).length === 0 && !keepValues )\n\t\t//\tdelete dataMap[path[0]][path[1]];\n\t\t\n\t\t// free filter layers\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !dataMap[path[0]][dataMap[path[0]].length - 1] )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\t\n\t\ttmpKey = path[0] + \"_\" + path[1] + \"_\" + path[2];\n\t\t\n\t\tif ( !--dataMap[tmpKey][path[3]] && !keepValues ) {\n\t\t\tdelete dataMap[tmpKey][path[3]];\n\t\t\t//dataMap[path[0]][path[3]] = undefined;\n\t\t\tdelete tweenableMap[twKey];\n\t\t\t//console.log(\"delete\", twKey)\n\t\t}\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[tmpKey].length && !dataMap[tmpKey][dataMap[tmpKey].length - 1] )\n\t\t\t\tdataMap[tmpKey].pop();\n\t\t\n\t\tif ( dataMap[tmpKey].length === 0 && !keepValues )\n\t\t\tdelete dataMap[tmpKey];\n\t\t\n\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\tdelete dataMap[path[0]];\n\t\t\tdelete muxerMap[path[0]];\n\t\t\tdelete cssMap[path[0]];\n\t\t}\n\t}\n\telse {\n\t\tconsole.log(\"wtf\", path)\n\t}\n}\n\nexport function demuxOne( unitIndex, dkey, twVal, baseKey, data, box ) {\n\tlet value = twVal,\n\t unit = units[unitIndex] || defaultUnits[baseKey];\n\t\n\t//if ( unit === 'box' ) {\n\t//\tvalue = value * (box[defaultBox[baseKey]] || box.x);\n\t//\tunit = 'px';\n\t//}\n\tif ( unit === 'bw' ) {\n\t\tvalue = value * box.x;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'wh' ) {\n\t\tvalue = value * box.y;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bz' ) {\n\t\tvalue = value * box.z;\n\t\tunit = 'px';\n\t}\n\t\n\tif ( unit === 'deg' )\n\t\tvalue = value % 360;\n\t\n\treturn unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\t//console.log(key)\n\tlet filters = \"\",\n\t tmpValue = {};\n\tlet ti = 0, tmap, fkey, unitKey, unitIndex, dkey, u, iValue, y = 0, value;\n\tfor ( ; ti < data[key].length; ti++ ) {\n\t\ttmap = data[key][ti];\n\t\tfor ( fkey in tmap )\n\t\t\tif ( tmap.hasOwnProperty(fkey) ) {\n\t\t\t\tdkey = key + '_' + ti + '_' + fkey;\n\t\t\t\tvalue = \"\";\n\t\t\t\ty = 0;\n\t\t\t\tfor ( unitIndex = 0; unitIndex < data[dkey].length; unitIndex++ )\n\t\t\t\t\tif ( data[dkey][unitIndex] ) {\n\t\t\t\t\t\tunitKey = dkey + \"_\" + unitIndex;\n\t\t\t\t\t\t//console.log(\"mux \", key, dkey, unitKey)\n\t\t\t\t\t\t\n\t\t\t\t\t\t//if ( !tweenable[unitKey] )\n\t\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\tiValue = demuxOne(unitIndex, dkey, tweenable[unitKey], fkey, data, box);\n\t\t\t\t\t\t//console.log(unitKey, tweenable[unitKey], iValue)\n\t\t\t\t\t\tif ( y && iValue[0] === '-' )\n\t\t\t\t\t\t\tiValue = \" - \" + iValue.substr(1);\n\t\t\t\t\t\telse if ( y )\n\t\t\t\t\t\t\tiValue = \" + \" + iValue;\n\t\t\t\t\t\tvalue += iValue;\n\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( y > 1 )\n\t\t\t\t\tvalue = \"calc(\" + value + \")\";\n\t\t\t\t\n\t\t\t\tif ( y > 0 )\n\t\t\t\t\tfilters += fkey + \"(\" + (value || \"0\") + \") \";\n\t\t\t}\n\t}\n\ttarget.filter = filters;\n\t\n}\n\nexport function muxOne( key, baseKey, value, target, data, initials, noPropLock, seenUnits ) {\n\t\n\tlet match = is.string(value) ? value.match(unitsRe) : false,\n\t unit = match && match[2] || defaultUnits[baseKey],\n\t unitKey = units.indexOf(unit),\n\t realKey = unitKey !== -1 && (key + '_' + unitKey) || key;\n\t\n\tinitials[realKey] = defaultValue[baseKey] || 0;\n\tdata[key][unitKey] = data[key][unitKey] || 0;\n\t//console.log(key, ':', realKey, data[key][unitKey], initials[realKey], noPropLock)\n\t\n\tif ( seenUnits && seenUnits[unitKey] ) {\n\t\tif ( match ) {\n\t\t\ttarget[realKey] += parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] += parseFloat(value);\n\t\t}\n\t}\n\telse {\n\t\t\n\t\t!noPropLock && data[key][unitKey]++;\n\t\tif ( match ) {\n\t\t\ttarget[realKey] = parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] = parseFloat(value);\n\t\t}\n\t\tif ( seenUnits ) seenUnits[unitKey] = true;\n\t}\n\t\n\treturn demux;\n};\nexport const mux = ( key, value, target, data, initials, noPropLock, reOrder ) => {\n\t\n\tdata[key] = data[key] || [];\n\t//initials[key] = 0;\n\t\n\tif ( !is.array(value) )\n\t\tvalue = [value];\n\tlet ti = 0, tmap, tFnKey, baseData, fValue, dkey, u, seenUnits;\n\tfor ( ; ti < value.length; ti++ ) {\n\t\ttmap = value[ti];\n\t\tbaseData = reOrder ? {} : { ...(data[key][ti] || {}) };\n\t\tfor ( tFnKey in tmap )\n\t\t\tif ( tmap.hasOwnProperty(tFnKey) ) {\n\t\t\t\tfValue = tmap[tFnKey];\n\t\t\t\tseenUnits = {};\n\t\t\t\tdkey = key + '_' + ti + '_' + tFnKey;\n\t\t\t\t\n\t\t\t\tbaseData[tFnKey] = baseData[tFnKey] || data[key][ti] && data[key][ti][tFnKey] || 0;\n\t\t\t\t!noPropLock && baseData[tFnKey]++;\n\t\t\t\t\n\t\t\t\t//console.warn(\"set \", key, dkey, noPropLock, baseData[tFnKey])\n\t\t\t\t\n\t\t\t\tdata[dkey] = data[dkey] || [];\n\t\t\t\tif ( is.array(fValue) ) {\n\t\t\t\t\tfor ( u = 0; u < fValue.length; u++ ) {\n\t\t\t\t\t\tmuxOne(dkey, tFnKey, fValue[u] || 0, target, data, initials, noPropLock, seenUnits)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmuxOne(dkey, tFnKey, fValue || 0, target, data, initials, noPropLock)\n\t\t\t\t}\n\t\t\t}\n\t\tdata[key][ti] =\n\t\t\treOrder\n\t\t\t? { ...baseData, ...(data[key][ti] || {}), ...baseData }\n\t\t\t:\n\t\t\tbaseData;\n\t\t//console.log(key, reOrder, data[key][ti], baseData)\n\t}\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport {floatCut, units, unitsRe} from \"../cssUtils\";\n\nconst defaultUnits = {\n\t //matrix : true,\n\t //translate : 'px',\n\t translateX : 'px',\n\t translateY : 'px',\n\t translateZ : 'px',\n\t scale : '',\n\t scaleZ : '',\n\t scaleX : '',\n\t scaleY : '',\n\t rotate : 'deg',\n\t //skew : 'deg',\n\t skewX : 'deg',\n\t skewY : 'deg',\n\t //matrix3d : true,\n\t //translate3d: true,\n\t //scale3d : true,\n\t //rotate3d : true,\n\t rotateX : 'deg',\n\t rotateY : 'deg',\n\t rotateZ : 'deg',\n\t perspective: 'px',\n },\n defaultBox = {\n\t translateX: 'x',\n\t translateY: 'y',\n\t translateZ: 'z',\n\t rotateX : 'x',\n\t rotateY : 'y',\n\t rotateZ : 'z',\n\t left : 'x',\n\t right : 'x',\n\t top : 'y',\n\t bottom : 'y',\n\t width : 'x',\n\t height : 'y',\n }, defaultValue = {\n\t //skew : 1,\n\t //skewX : 1,\n\t //skewY : 1,\n\t scale : 1,\n\t scaleX: 1,\n\t scaleY: 1,\n\t scaleZ: 1\n };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\tif ( path.length === 4 ) {\n\t\t//console.warn(\"dec\", twKey, dataMap[path[0]][path[1]][path[2]])\n\t\t// dec count on transform\n\t\tif ( !--dataMap[path[0]][path[1]][path[2]] && !keepValues ) {\n\t\t\tdelete dataMap[path[0]][path[1]][path[2]];\n\t\t}\n\t\t//if ( Object.keys(dataMap[path[0]][path[1]]).length === 0 && !keepValues )\n\t\t//\tdelete dataMap[path[0]][path[1]];\n\t\t\n\t\t// free transform layers\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !dataMap[path[0]][dataMap[path[0]].length - 1] )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\t\n\t\ttmpKey = path[0] + \"_\" + path[1] + \"_\" + path[2];\n\t\t\n\t\tif ( !--dataMap[tmpKey][path[3]] && !keepValues ) {\n\t\t\tdelete dataMap[tmpKey][path[3]];\n\t\t\t//dataMap[path[0]][path[3]] = undefined;\n\t\t\tdelete tweenableMap[twKey];\n\t\t\t//console.log(\"delete\", twKey)\n\t\t}\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[tmpKey].length && !dataMap[tmpKey][dataMap[tmpKey].length - 1] )\n\t\t\t\tdataMap[tmpKey].pop();\n\t\t\n\t\tif ( dataMap[tmpKey].length === 0 && !keepValues )\n\t\t\tdelete dataMap[tmpKey];\n\t\t\n\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\tdelete dataMap[path[0]];\n\t\t\tdelete muxerMap[path[0]];\n\t\t\tdelete cssMap[path[0]];\n\t\t}\n\t}\n\telse {\n\t\tconsole.log(\"wtf\", path)\n\t}\n}\n\nexport function demuxOne( unitIndex, dkey, twVal, baseKey, data, box ) {\n\tlet value = twVal,\n\t unit = units[unitIndex] || defaultUnits[baseKey];\n\t\n\tif ( unit === 'box' ) {\n\t\tvalue = value * (box[defaultBox[baseKey]] || box.x);\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bw' ) {\n\t\tvalue = value * box.x;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'wh' ) {\n\t\tvalue = value * box.y;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bz' ) {\n\t\tvalue = value * box.z;\n\t\tunit = 'px';\n\t}\n\t\n\tif ( unit === 'deg' )\n\t\tvalue = value % 360;\n\t\n\treturn unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\t//console.log(key)\n\tlet transforms = \"\",\n\t tmpValue = {};\n\tlet ti = 0, tmap, fkey, unitKey, unitIndex, dkey, u, iValue, y = 0, value;\n\tfor ( ; ti < data[key].length; ti++ ) {\n\t\ttmap = data[key][ti];\n\t\tfor ( fkey in tmap )\n\t\t\tif ( tmap.hasOwnProperty(fkey) ) {\n\t\t\t\tdkey = key + '_' + ti + '_' + fkey;\n\t\t\t\tvalue = \"\";\n\t\t\t\ty = 0;\n\t\t\t\tfor ( unitIndex = 0; unitIndex < data[dkey].length; unitIndex++ )\n\t\t\t\t\tif ( data[dkey][unitIndex] ) {\n\t\t\t\t\t\tunitKey = dkey + \"_\" + unitIndex;\n\t\t\t\t\t\t//console.log(\"mux \", key, dkey, unitKey)\n\t\t\t\t\t\t\n\t\t\t\t\t\t//if ( !tweenable[unitKey] )\n\t\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\tiValue = demuxOne(unitIndex, dkey, tweenable[unitKey], fkey, data, box);\n\t\t\t\t\t\t//console.log(unitKey, tweenable[unitKey], iValue)\n\t\t\t\t\t\tif ( y && iValue[0] === '-' )\n\t\t\t\t\t\t\tiValue = \" - \" + iValue.substr(1);\n\t\t\t\t\t\telse if ( y )\n\t\t\t\t\t\t\tiValue = \" + \" + iValue;\n\t\t\t\t\t\tvalue += iValue;\n\t\t\t\t\t\ty++;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( y > 1 )\n\t\t\t\t\tvalue = \"calc(\" + value + \")\";\n\t\t\t\t\n\t\t\t\tif ( y > 0 )\n\t\t\t\t\ttransforms += fkey + \"(\" + (value || \"0\") + \") \";\n\t\t\t}\n\t}\n\ttarget.transform = transforms;\n\t\n}\n\nexport function muxOne( key, baseKey, value, target, data, initials, noPropLock, seenUnits ) {\n\t\n\tlet match = is.string(value) ? value.match(unitsRe) : false,\n\t unit = match && match[2] || defaultUnits[baseKey],\n\t unitKey = units.indexOf(unit),\n\t realKey = unitKey !== -1 && (key + '_' + unitKey) || key;\n\t\n\tinitials[realKey] = defaultValue[baseKey] || 0;\n\tdata[key][unitKey] = data[key][unitKey] || 0;\n\t//console.log(key, ':', realKey, data[key][unitKey], initials[realKey], noPropLock)\n\t\n\tif ( seenUnits && seenUnits[unitKey] ) {\n\t\tif ( match ) {\n\t\t\ttarget[realKey] += parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] += parseFloat(value);\n\t\t}\n\t}\n\telse {\n\t\t\n\t\t!noPropLock && data[key][unitKey]++;\n\t\tif ( match ) {\n\t\t\ttarget[realKey] = parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] = parseFloat(value);\n\t\t}\n\t\tif ( seenUnits ) seenUnits[unitKey] = true;\n\t}\n\t\n\treturn demux;\n};\nexport const mux = ( key, value, target, data, initials, noPropLock, reOrder ) => {\n\t\n\tdata[key] = data[key] || [];\n\t//initials[key] = 0;\n\t\n\tif ( !is.array(value) )\n\t\tvalue = [value];\n\tlet ti = 0, tmap, tFnKey, baseData, fValue, dkey, u, seenUnits;\n\tfor ( ; ti < value.length; ti++ ) {\n\t\ttmap = value[ti];\n\t\tbaseData = reOrder ? {} : { ...(data[key][ti] || {}) };\n\t\tfor ( tFnKey in tmap )\n\t\t\tif ( tmap.hasOwnProperty(tFnKey) ) {\n\t\t\t\tfValue = tmap[tFnKey];\n\t\t\t\tseenUnits = {};\n\t\t\t\tdkey = key + '_' + ti + '_' + tFnKey;\n\t\t\t\t\n\t\t\t\tbaseData[tFnKey] = baseData[tFnKey] || data[key][ti] && data[key][ti][tFnKey] || 0;\n\t\t\t\t!noPropLock && baseData[tFnKey]++;\n\t\t\t\t\n\t\t\t\t//console.warn(\"set \", key, dkey, noPropLock, baseData[tFnKey])\n\t\t\t\t\n\t\t\t\tdata[dkey] = data[dkey] || [];\n\t\t\t\tif ( is.array(fValue) ) {\n\t\t\t\t\tfor ( u = 0; u < fValue.length; u++ ) {\n\t\t\t\t\t\tmuxOne(dkey, tFnKey, fValue[u] || 0, target, data, initials, noPropLock, seenUnits)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmuxOne(dkey, tFnKey, fValue || 0, target, data, initials, noPropLock)\n\t\t\t\t}\n\t\t\t}\n\t\tdata[key][ti] =\n\t\t\treOrder\n\t\t\t? { ...baseData, ...(data[key][ti] || {}), ...baseData }\n\t\t\t:\n\t\t\tbaseData;\n\t\t//console.log(key, reOrder, data[key][ti], baseData)\n\t}\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport { floatCut, units, unitsRe } from \"../../cssUtils\";\n\nconst any = require('./any');\n\nconst defaultUnits = {\n left : 'px',\n right : 'px',\n top : 'px',\n bottom : 'px',\n width : 'px',\n height : 'px',\n perspective: 'px',\n },\n defaultBox = {\n left : 'x',\n right : 'x',\n top : 'y',\n bottom: 'y',\n width : 'x',\n height: 'y',\n }, defaultValue = {\n opacity: 0\n };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n let path = twKey.split('_'), tmpKey;// not optimal at all\n \n if ( path.length === 2 ) {\n //console.log(\"dec\", twKey, dataMap[path[0]][path[1]], keepValues)\n if ( !--dataMap[ path[ 0 ] ][ path[ 1 ] ] && !keepValues ) {\n delete tweenableMap[ twKey ];\n //dataMap[path[0]][path[1]] = undefined;\n }\n \n if ( !keepValues )\n while ( dataMap[ path[ 0 ] ].length && !dataMap[ path[ 0 ] ][ dataMap[ path[ 0 ] ].length - 1 ] )\n dataMap[ path[ 0 ] ].pop();\n \n if ( dataMap[ path[ 0 ] ].length === 0 && !keepValues ) {\n delete dataMap[ path[ 0 ] ];\n delete muxerMap[ path[ 0 ] ];\n if ( cssMap ) delete cssMap[ path[ 0 ] ];\n //console.log(\"delete\", path[0])\n }\n }\n else {\n console.log(\"wtf\", path)\n }\n}\n\nexport function demuxOne( unitKey, twVal, baseKey, data, box ) {\n let value = twVal,\n unit = units[ unitKey ] || defaultUnits[ baseKey ] || \"px\";\n \n if ( unit === 'box' ) {\n value = value * ( box[ defaultBox[ baseKey ] ] || box.x );\n unit = 'px';\n \n }\n if ( unit === 'bw' ) {\n value = value * box.x;\n unit = 'px';\n }\n if ( unit === 'bh' ) {\n value = value * box.y;\n unit = 'px';\n }\n if ( unit === 'bz' ) {\n value = value * box.z;\n unit = 'px';\n }\n return unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box, baseKey ) {\n let value, i = 0, y, rKey;\n \n value = \"\";\n \n //if ( key==\"height\" )\n //\tdebugger;\n \n if ( data[ key ].isString ) {\n target[ key ] = data[ key ].value;// + defaultUnits[key];\n return data[ key ].value;\n }\n \n for ( y = 0; y < data[ key ].length; y++ )\n if ( data[ key ][ y ] ) {\n rKey = key + \"_\" + y;\n if ( tweenable[ rKey ] < 0 )\n value += ( i\n ? \" - \"\n : \"-\" ) + demuxOne(y, -tweenable[ rKey ], baseKey || key, data, box);\n else\n value += ( i\n ? \" + \"\n : \"\" ) + demuxOne(y, tweenable[ rKey ], baseKey || key, data, box);\n i++;\n }\n if ( i > 1 )\n value = \"calc(\" + value + \")\";\n \n //console.log(key, ':', value)\n return target ? target[ key ] = value : value;\n}\n\nexport function muxer( key, value, target, data, initials, noPropLock ) {\n \n data[ key ] = data[ key ] || [];\n let seenUnits = [];\n if ( is.array(value) ) {\n for ( let i = 0; i < value.length; i++ ) {\n muxOne(key, value[ i ] || 0, target, data, initials, noPropLock, seenUnits)\n }\n }\n else {\n muxOne(key, value || 0, target, data, initials, noPropLock)\n }\n \n return demux;\n}\n\nexport function muxOne( key, value, target, data, initials, noPropLock, seenUnits ) {\n \n let match = is.string(value) ? value.match(unitsRe) : false,\n unit = match && match[ 2 ] || defaultUnits[ key ] || \"px\",\n unitKey = units.indexOf(unit),\n realKey = unitKey !== -1 && ( key + '_' + unitKey ) || key;\n \n initials[ realKey ] = defaultValue[ key ] || 0;\n data[ key ][ unitKey ] = data[ key ][ unitKey ] || 0;\n //\n if ( !match && is.string(value) ) {\n data[ key ].isString = true;\n data[ key ].value = value;\n return demux;\n }\n \n if ( seenUnits && seenUnits[ unitKey ] ) {\n //console.warn(key, ':', data[key][unitKey], value, noPropLock)\n if ( match ) {\n target[ realKey ] += parseFloat(match[ 1 ]);\n }\n else {\n target[ realKey ] += parseFloat(value);\n }\n }\n else {\n \n !noPropLock && data[ key ][ unitKey ]++;\n if ( match ) {\n target[ realKey ] = parseFloat(match[ 1 ]);\n }\n else {\n target[ realKey ] = parseFloat(value);\n }\n if ( seenUnits ) seenUnits[ unitKey ] = true;\n }\n \n return demux;\n};\n\nexport const mux = muxer;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst defaultUnits = { opacity: 1 };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\t\n\tif ( !--dataMap[twKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\tdelete muxerMap[twKey];\n\t\tdelete cssMap[twKey];\n\t}\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\tlet value = !!(tweenable[key]);\n\treturn target ? target[key] = value : value;\n}\n\n\nexport const mux = ( key, value, target, data, initials, noPropLock ) => {\n\t\n\tinitials[key] = defaultUnits[key] || 0;\n\ttarget[key] = value === false ? 0 : 1;\n\tdata[key] = data[key] || 0;\n\t!noPropLock && data[key]++;\n\t\n\treturn demux;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"color-rgba\");","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport rgba from \"color-rgba\";\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'),\n\t tmpKey = path.slice(0, path.length - 1).join('_');\n\t\n\t//console.log(\"dec\", tmpKey, path, dataMap[twKey])\n\tif ( !--dataMap[twKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\t//delete muxerMap[twKey];\n\t\t//delete cssMap[twKey];\n\t\t//console.log(\"delete\", twKey, path)\n\t}\n\tif ( !--dataMap[tmpKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\t//delete muxerMap[twKey];\n\t\t//delete cssMap[twKey];\n\t\t//console.log(\"delete\", tmpKey)\n\t}\n\t//}\n}\n\nexport function demux( key, tweenable, target, data ) {\n\tlet value = \"rgba(\" + tweenable[key + '_r'] + \", \" + tweenable[key + '_g'] + \", \" + tweenable[key + '_b'] + \", \" + tweenable[key + '_a'] + \")\";\n\treturn target ?\n\t target[key] = value : value;\n}\n\nexport function mux( key, value, target, data, initials, noPropLock ) {\n\tlet vect = rgba(value);\n\t\n\tdata[key] = data[key] || 0;\n\tdata[key + '_r'] = data[key + '_r'] || 0;\n\tdata[key + '_g'] = data[key + '_g'] || 0;\n\tdata[key + '_b'] = data[key + '_b'] || 0;\n\tdata[key + '_a'] = data[key + '_a'] || 0;\n\tif ( !noPropLock ) {\n\t\tdata[key] += 4;\n\t\tdata[key + '_r']++;\n\t\tdata[key + '_g']++;\n\t\tdata[key + '_b']++;\n\t\tdata[key + '_a']++;\n\t}\n\t\n\ttarget[key + '_r'] = vect[0];\n\ttarget[key + '_g'] = vect[1];\n\ttarget[key + '_b'] = vect[2];\n\ttarget[key + '_a'] = vect[3];\n\t\n\tinitials[key] = 0;\n\t\n\tinitials[key + '_r'] = 0;\n\tinitials[key + '_g'] = 0;\n\tinitials[key + '_b'] = 0;\n\tinitials[key + '_a'] = 1;\n\t\n\treturn demux;\n}\n","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst defaultUnits = { opacity: 1 };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\t\n\tif ( !--dataMap[twKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\tdelete muxerMap[twKey];\n\t\tdelete cssMap[twKey];\n\t}\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\ttarget[key] = ~~(tweenable[key]);// + defaultUnits[key];\n\t\n}\n\n\nexport const mux = ( key, value, target, data, initials, noPropLock ) => {\n\t\n\t\n\tinitials[key] = 0;\n\ttarget[key] = ~~value;\n\tdata[key] = data[key] || 0;\n\t!noPropLock && data[key]++;\n\t\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport * as number from \"./number\";\n\nconst\n alias = {\n top : '0%',\n bottom: '100%',\n center: '50%',\n left : '0%',\n right : '100%'\n };\n\nfunction demux( key, tweenable, target, data, box, offset ) {\n \n let count = data[ \"_\" + key ], v = '', nowhere = {};\n \n for ( let i = 0; i < count; i++ ) {\n number.demux(key + '_' + i, tweenable, nowhere, data, box, offset);\n v += nowhere[ key + '_' + i ] + ' ';\n }\n \n target[ key ] = v;\n}\n\n\nfunction release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n let path = twKey.split('_'), tmpKey;// not optimal at all\n \n //if ( path.length === 2 ) {\n //\tconsole.log(\"dec\", twKey, dataMap[path[0]][path[1]])\n //\tif ( !--dataMap[path[0]][path[1]] && !keepValues ) {\n //\t\tdelete tweenableMap[twKey];\n //\t\tdelete dataMap[path[0]][path[1]];\n //\t}\n //\n //\tif ( !keepValues )\n //\t\twhile ( dataMap[path[0]].length &&\n // !dataMap[path[0]][dataMap[path[0]].length - 1] ) dataMap[path[0]].pop(); if (\n // dataMap[path[0]].length === 0 && !keepValues ) { delete dataMap[path[0]]; delete\n // muxerMap[path[0]]; delete cssMap[path[0]]; console.log(\"delete\", path[0]) } } else\n // { console.log(\"wtf\", path) }\n}\n\nexport default ( count ) => ( {\n mux: ( key, value, target, data, initials, noPropLock ) => {\n let values = value.split(' '), v;\n \n data[ key ] = data[ key ] || 0;\n noPropLock && data[ key ]++;\n data[ \"_\" + key ] = count;\n \n for ( let i = 0; i < count; i++ ) {\n v = values[ i % values.length ];\n v = is.string(v) && alias[ v ] || v;\n number.mux(key + '_' + i, v, target, data, initials, noPropLock)\n }\n \n return demux;\n }, demux, release\n} )","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport {floatCut, units, unitsRe} from \"../../cssUtils\";\n\nconst defaultUnits = {\n\t left : 'px',\n\t right : 'px',\n\t top : 'px',\n\t bottom : 'px',\n\t width : 'px',\n\t height : 'px',\n\t perspective: 'px',\n },\n defaultBox = {\n\t left : 'x',\n\t right : 'x',\n\t top : 'y',\n\t bottom: 'y',\n\t width : 'x',\n\t height: 'y',\n }, defaultValue = {\n\t opacity: 0\n };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\t\n\tif ( path.length === 2 ) {\n\t\t//console.log(\"dec\", twKey, dataMap[path[0]][path[1]], keepValues)\n\t\tif ( !--dataMap[path[0]][path[1]] && !keepValues ) {\n\t\t\tdelete tweenableMap[twKey];\n\t\t\t//dataMap[path[0]][path[1]] = undefined;\n\t\t}\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !dataMap[path[0]][dataMap[path[0]].length - 1] )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\tdelete dataMap[path[0]];\n\t\t\tdelete muxerMap[path[0]];\n\t\t\tif ( cssMap ) delete cssMap[path[0]];\n\t\t\t//console.log(\"delete\", path[0])\n\t\t}\n\t}\n\telse {\n\t\tconsole.log(\"wtf\", path)\n\t}\n}\n\nexport function demuxOne( unitKey, twVal, baseKey, data, box ) {\n\tlet value = twVal,\n\t unit = units[unitKey] || defaultUnits[baseKey] || \"px\";\n\t\n\tif ( unit === 'box' ) {\n\t\tvalue = value * (box[defaultBox[baseKey]] || box.x);\n\t\tunit = 'px';\n\t\t\n\t}\n\tif ( unit === 'bw' ) {\n\t\tvalue = value * box.x;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bh' ) {\n\t\tvalue = value * box.y;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bz' ) {\n\t\tvalue = value * box.z;\n\t\tunit = 'px';\n\t}\n\treturn unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box, baseKey ) {\n\tlet value, i = 0, y, rKey;\n\t\n\tvalue = \"\";\n\t\n\t//if ( key==\"height\" )\n\t//\tdebugger;\n\t\n\tfor ( y = 0; y < data[key].length; y++ )\n\t\tif ( data[key][y] ) {\n\t\t\trKey = key + \"_\" + y;\n\t\t\tif ( tweenable[rKey] < 0 )\n\t\t\t\tvalue += (i ? \" - \" : \"-\") + demuxOne(y, -tweenable[rKey], baseKey || key, data, box);\n\t\t\telse\n\t\t\t\tvalue += (i ? \" + \" : \"\") + demuxOne(y, tweenable[rKey], baseKey || key, data, box);\n\t\t\ti++;\n\t\t}\n\tif ( i > 1 )\n\t\tvalue = \"calc(\" + value + \")\";\n\t\n\t//console.log(key, ':', value)\n\treturn target ? target[key] = value : value;\n}\n\nexport function muxer( key, value, target, data, initials, noPropLock ) {\n\t\n\tdata[key] = data[key] || [];\n\tlet seenUnits = [];\n\tif ( is.array(value) ) {\n\t\tfor ( let i = 0; i < value.length; i++ ) {\n\t\t\tmuxOne(key, value[i] || 0, target, data, initials, noPropLock, seenUnits)\n\t\t}\n\t}\n\telse {\n\t\tmuxOne(key, value || 0, target, data, initials, noPropLock)\n\t}\n\t\n\treturn demux;\n}\n\nexport function muxOne( key, value, target, data, initials, noPropLock, seenUnits ) {\n\t\n\tlet match = is.string(value) ? value.match(unitsRe) : false,\n\t unit = match && match[2] || defaultUnits[key] || \"px\",\n\t unitKey = units.indexOf(unit),\n\t realKey = unitKey !== -1 && (key + '_' + unitKey) || key;\n\t\n\tinitials[realKey] = defaultValue[key] || 0;\n\tdata[key][unitKey] = data[key][unitKey] || 0;\n\t//console.log(key, ':', data[key][unitKey], value, noPropLock)\n\t\n\tif ( seenUnits && seenUnits[unitKey] ) {\n\t\t//console.warn(key, ':', data[key][unitKey], value, noPropLock)\n\t\tif ( match ) {\n\t\t\ttarget[realKey] += parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] += parseFloat(value);\n\t\t}\n\t}\n\telse {\n\t\t\n\t\t!noPropLock && data[key][unitKey]++;\n\t\tif ( match ) {\n\t\t\ttarget[realKey] = parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] = parseFloat(value);\n\t\t}\n\t\tif ( seenUnits ) seenUnits[unitKey] = true;\n\t}\n\t\n\treturn demux;\n};\n\nexport const mux = muxer;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst defaultUnits = { opacity: 1 };\nimport {floatCut} from \"../../cssUtils\";\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\t\n\tif ( !--dataMap[twKey] && !keepValues ) {\n\t\tdelete tweenableMap[twKey];\n\t\tdelete dataMap[twKey];\n\t\tdelete muxerMap[twKey];\n\t\tdelete cssMap[twKey];\n\t}\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\ttarget[key] = Math.min(1, Math.max(0, floatCut(tweenable[key])));\n}\n\n\nexport const mux = ( key, value, target, data, initials, noPropLock ) => {\n\t\n\t\n\tinitials[key] = defaultUnits[key] || 0;\n\ttarget[key] = value;\n\tdata[key] = data[key] || 0;\n\t!noPropLock && data[key]++;\n\t\n\treturn demux;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport {floatCut, units, unitsRe} from \"../../cssUtils\";\nimport {bool, color} from \"./(*).js\";\n\n\nconst cssShadowParser = (() => {\n\tconst VALUES_REG = /,(?![^\\(]*\\))/\n\tconst PARTS_REG = /\\s(?![^(]*\\))/\n\tconst LENGTH_REG = /^[0-9]+[a-zA-Z%]+?$/\n\t\n\tconst parseValue = str => {\n\t\tconst parts = str.split(PARTS_REG)\n\t\tconst inset = parts.includes('inset')\n\t\tconst last = parts.slice(-1)[0]\n\t\tconst color = !isLength(last) ? last : undefined\n\t\t\n\t\tconst nums = parts\n\t\t\t.filter(n => n !== 'inset')\n\t\t\t.filter(n => n !== color)\n\t\t\t.map(toNum)\n\t\tconst [offsetX, offsetY, blurRadius, spreadRadius] = nums\n\t\t\n\t\treturn {\n\t\t\tinset,\n\t\t\toffsetX,\n\t\t\toffsetY,\n\t\t\tblurRadius,\n\t\t\tspreadRadius,\n\t\t\tcolor\n\t\t}\n\t}\n\t\n\tconst stringifyValue = obj => {\n\t\tconst {\n\t\t\t inset,\n\t\t\t offsetX = 0,\n\t\t\t offsetY = 0,\n\t\t\t blurRadius = 0,\n\t\t\t spreadRadius,\n\t\t\t color\n\t\t } = obj || {}\n\t\t\n\t\treturn [\n\t\t\t(inset ? 'inset' : null),\n\t\t\toffsetX,\n\t\t\toffsetY,\n\t\t\tblurRadius,\n\t\t\tspreadRadius,\n\t\t\tcolor\n\t\t].filter(v => v !== null && v !== undefined)\n\t\t .map(toPx)\n\t\t .map(s => ('' + s).trim())\n\t\t .join(' ')\n\t}\n\t\n\tconst isLength = v => v === '0' || LENGTH_REG.test(v)\n\tconst toNum = v => {\n\t\tif ( !/px$/.test(v) && v !== '0' ) return v\n\t\tconst n = parseFloat(v)\n\t\treturn !isNaN(n) ? n : v\n\t}\n\tconst toPx = n => typeof n === 'number' && n !== 0 ? (n + 'px') : n\n\t\n\tconst parse = str => str.split(VALUES_REG).map(s => s.trim()).map(parseValue)\n\tconst stringify = arr => arr.map(stringifyValue).join(', ')\n\t\n\treturn {\n\t\tparse,\n\t\tstringify\n\t}\n})()\n\n\nconst defaultUnits = {\n\t perspective: 'px',\n },\n defaultBox = {\n\t translateX: 'x',\n },\n defaultMuxers = {\n\t //blurRadius : number,\n\t inset: bool,\n\t //offsetX : number,\n\t //offsetY : number,\n\t //spreadRadius: number,\n\t color: color\n };\n\nexport function release( twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\tif ( path.length > 2 ) {\n\t\t// dec count on transform\n\t\t\n\t\ttmpKey = path[0] + \"_\" + path[1] + \"_\" + path[2];\n\t\tif ( defaultMuxers[path[2]] ) {\n\t\t\tdefaultMuxers[path[2]].release(twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues)\n\t\t\tif ( !dataMap[tmpKey] ) {\n\t\t\t\t//console.log(\"dec\", tmpKey, dataMap[path[0]][path[1]][path[2]])\n\t\t\t\tif ( !--dataMap[path[0]][path[1]][path[2]] && !keepValues ) {\n\t\t\t\t\tdelete dataMap[path[0]][path[1]][path[2]];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\t\tdelete dataMap[path[0]];\n\t\t\t\tdelete muxerMap[path[0]];\n\t\t\t\tdelete cssMap[path[0]];\n\t\t\t\t//console.log(\"delete color\", twKey)\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//console.log(\"dec\", twKey, dataMap[path[0]])\n\t\tif ( !--dataMap[path[0]][path[1]][path[2]] && !keepValues ) {\n\t\t\tdelete dataMap[path[0]][path[1]][path[2]];\n\t\t}\n\t\t//if ( Object.keys(dataMap[path[0]][path[1]]).length === 0 && !keepValues )\n\t\t//\tdelete dataMap[path[0]][path[1]];\n\t\t\n\t\t// free transform layers\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !dataMap[path[0]][dataMap[path[0]].length - 1] )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\t\n\t\t//tmpKey = path[0] + \"_\" + path[1] + \"_\" + path[2];\n\t\t// units\n\t\tif ( !--dataMap[tmpKey][path[3]] && !keepValues ) {\n\t\t\tdelete dataMap[tmpKey][path[3]];\n\t\t\t//dataMap[path[0]][path[3]] = undefined;\n\t\t\tdelete tweenableMap[twKey];\n\t\t\t//console.log(\"delete\", tmpKey)\n\t\t}\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[tmpKey].length && !dataMap[tmpKey][dataMap[tmpKey].length - 1] )\n\t\t\t\tdataMap[tmpKey].pop();\n\t\t\n\t\tif ( dataMap[tmpKey].length === 0 && !keepValues )\n\t\t\tdelete dataMap[tmpKey];\n\t\t\n\t\tif ( !keepValues )\n\t\t\twhile ( dataMap[path[0]].length && !Object.keys(dataMap[path[0]][dataMap[path[0]].length - 1]).length )\n\t\t\t\tdataMap[path[0]].pop();\n\t\t\n\t\tif ( dataMap[path[0]].length === 0 && !keepValues ) {\n\t\t\tdelete dataMap[path[0]];\n\t\t\tdelete muxerMap[path[0]];\n\t\t\tdelete cssMap[path[0]];\n\t\t\t//console.log(\"delete\", path[0])\n\t\t}\n\t}\n\telse {\n\t\tconsole.log(\"wtf\", path)\n\t}\n}\n\nexport function demuxOne( unitIndex, dkey, twVal, baseKey, data, box ) {\n\tlet value = twVal,\n\t unit = units[unitIndex] || defaultUnits[baseKey];\n\t\n\tif ( unit === 'box' ) {\n\t\tvalue = value * (box[defaultBox[baseKey]] || box.x);\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bw' ) {\n\t\tvalue = value * box.x;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'wh' ) {\n\t\tvalue = value * box.y;\n\t\tunit = 'px';\n\t}\n\tif ( unit === 'bz' ) {\n\t\tvalue = value * box.z;\n\t\tunit = 'px';\n\t}\n\t\n\tif ( unit === 'deg' )\n\t\tvalue = value % 360;\n\t\n\treturn unit ? floatCut(value) + unit : floatCut(value);\n}\n\nexport function demux( key, tweenable, target, data, box ) {\n\t//console.log(key)\n\tlet shadows = [],\n\t tmpValue = {};\n\tlet ti = 0, shadowMap, fkey, unitKey, unitIndex, dkey, u, iValue, y = 0, value;\n\tfor ( ; ti < data[key].length; ti++ ) {\n\t\tshadowMap = data[key][ti];\n\t\ttmpValue = {};\n\t\tfor ( fkey in shadowMap )\n\t\t\tif ( shadowMap.hasOwnProperty(fkey) ) {\n\t\t\t\tdkey = key + '_' + ti + '_' + fkey;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif ( defaultMuxers[fkey] ) {\n\t\t\t\t\tvalue = defaultMuxers[fkey].demux(dkey, tweenable, undefined, data, box);\n\t\t\t\t\t//continue;\n\t\t\t\t\t//console.log(dkey, tweenable[dkey])\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalue = \"\";\n\t\t\t\t\ty = 0;\n\t\t\t\t\tfor ( unitIndex = 0; unitIndex < data[dkey].length; unitIndex++ )\n\t\t\t\t\t\tif ( data[dkey][unitIndex] ) {\n\t\t\t\t\t\t\tunitKey = dkey + \"_\" + unitIndex;\n\t\t\t\t\t\t\tiValue = demuxOne(unitIndex, dkey, tweenable[unitKey], fkey, data, box);\n\t\t\t\t\t\t\tif ( y && iValue[0] === '-' )\n\t\t\t\t\t\t\t\tiValue = \" - \" + iValue.substr(1);\n\t\t\t\t\t\t\telse if ( y )\n\t\t\t\t\t\t\t\tiValue = \" + \" + iValue;\n\t\t\t\t\t\t\tvalue += iValue;\n\t\t\t\t\t\t\ty++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( y > 1 )\n\t\t\t\t\t\tvalue = \"calc(\" + value + \")\";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ttmpValue[fkey] = (value || 0);\n\t\t\t}\n\t\tshadows.push(tmpValue);\n\t}\n\t\n\ttarget[key] = cssShadowParser.stringify(shadows);\n\t//console.log(key, shadows, target[key]);\n\t\n}\n\nexport function muxOne( key, baseKey, value, target, data, initials, noPropLock, seenUnits ) {\n\t\n\tlet match = is.string(value) ? value.match(unitsRe) : false,\n\t unit = match && match[2] || defaultUnits[baseKey] || \"px\",\n\t unitKey = units.indexOf(unit),\n\t realKey = unitKey !== -1 && (key + '_' + unitKey) || key;\n\t\n\tinitials[realKey] = 0;\n\tdata[key][unitKey] = data[key][unitKey] || 0;\n\t//console.log(key, ':', data[key][unitKey], value, noPropLock)\n\t\n\tif ( seenUnits && seenUnits[unitKey] ) {\n\t\t//console.warn(key, ':', data[key][unitKey], value, noPropLock)\n\t\tif ( match ) {\n\t\t\ttarget[realKey] += parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] += parseFloat(value);\n\t\t}\n\t}\n\telse {\n\t\t\n\t\t!noPropLock && data[key][unitKey]++;\n\t\tif ( match ) {\n\t\t\ttarget[realKey] = parseFloat(match[1]);\n\t\t}\n\t\telse {\n\t\t\ttarget[realKey] = parseFloat(value);\n\t\t}\n\t\tif ( seenUnits ) seenUnits[unitKey] = true;\n\t}\n\t\n\treturn demux;\n};\nexport const mux = ( key, value, target, data, initials, noPropLock, reOrder ) => {\n\t\n\tdata[key] = data[key] || [];\n\t//initials[key] = 0;\n\t\n\tif ( !is.array(value) )\n\t\tvalue = [value];\n\tlet ti = 0, shadowMap, tFnKey, baseData, fValue, dkey, u, seenUnits;\n\tfor ( ; ti < value.length; ti++ ) {\n\t\tshadowMap = value[ti];\n\t\tif ( is.string(shadowMap) )\n\t\t\tshadowMap = cssShadowParser.parse(shadowMap)[0];\n\t\tbaseData = reOrder ? {} : { ...(data[key][ti] || {}) };\n\t\tfor ( tFnKey in shadowMap ) {\n\t\t\tif ( shadowMap.hasOwnProperty(tFnKey) ) {\n\t\t\t\tfValue = shadowMap[tFnKey];\n\t\t\t\tdkey = key + '_' + ti + '_' + tFnKey;\n\t\t\t\t\n\t\t\t\tbaseData[tFnKey] = baseData[tFnKey] || data[key][ti] && data[key][ti][tFnKey] || 0;\n\t\t\t\t!noPropLock && baseData[tFnKey]++;\n\t\t\t\tif ( defaultMuxers[tFnKey] ) {\n\t\t\t\t\tdefaultMuxers[tFnKey].mux(dkey, fValue, target, data, initials, noPropLock, reOrder);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tseenUnits = {};\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdata[dkey] = data[dkey] || [];\n\t\t\t\t\tif ( is.array(fValue) ) {\n\t\t\t\t\t\tfor ( u = 0; u < fValue.length; u++ ) {\n\t\t\t\t\t\t\tmuxOne(dkey, tFnKey, fValue[u] || 0, target, data, initials, noPropLock, seenUnits)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmuxOne(dkey, tFnKey, fValue || 0, target, data, initials, noPropLock)\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdata[key][ti] =\n\t\t\treOrder\n\t\t\t? { ...baseData, ...(data[key][ti] || {}), ...baseData }\n\t\t\t:\n\t\t\tbaseData;\n\t\t//console.log(key, reOrder, data[key][ti], baseData)\n\t}\n\treturn demux;\n}","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"d3-ease\");","module.exports = require(\"is\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@babel/runtime/helpers/inheritsLoose\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"fast-deep-equal\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\");","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport React from 'react';\n\nconst TweenerContext = React.createContext(null);\nexport default TweenerContext","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@babel/runtime/helpers/assertThisInitialized\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-dom\");","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\n\nexport const re_cssValueWithUnit = new RegExp(\n\t\"([+-]?(?:[0-9]*[.])?[0-9]+)\\\\s*(\" +\n\t['box', 'bz', 'bh', 'bw', 'em', 'ex', '%', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ch', 'rem', 'vh', 'vw', 'vmin', 'vmax'].join('|')\n\t+ \")\"\n);\n\n/**\n * add any css val with it unit ( todo: optims&use objects for multi unit\n * @param val1\n * @param val2\n * @returns {Array}\n */\nexport function cssAdd( val1, val2, ...argz ) {\n\tif ( !is.array(val1) )\n\t\tval1 = [val1];\n\tif ( !is.array(val2) )\n\t\tval2 = [val2];\n\t\n\tlet units1 = val1.map(v => (v && v.match && v.match(re_cssValueWithUnit) || [, v || 0, 'px'])),\n\t units2 = val2.map(v => (v && v.match && v.match(re_cssValueWithUnit) || [, v || 0, 'px'])),\n\t remap = {}, result = [], i;\n\t\n\ti = 0;\n\twhile ( i < units1.length ) {\n\t\tremap[units1[i][2]] = remap[units1[i][2]] || 0;\n\t\tremap[units1[i][2]] += parseFloat(units1[i][1]);\n\t\ti++;\n\t}\n\ti = 0;\n\twhile ( i < units2.length ) {\n\t\tremap[units2[i][2]] = remap[units2[i][2]] || 0;\n\t\tremap[units2[i][2]] += parseFloat(units2[i][1]);\n\t\ti++;\n\t}\n\tObject.keys(remap)\n\t .forEach(\n\t\t unit => (result.push(remap[unit] + unit))\n\t );\n\treturn argz.length ? cssAdd(result, ...argz) : result;\n}\n\n/**\n * Multiply any css val with it unit ( todo: optims & use objects for multi unit\n * @param val1\n * @param val2\n * @returns {Array}\n */\nexport function cssMult( val1, val ) {\n\tif ( !is.array(val1) )\n\t\tval1 = [val1];\n\t\n\tlet units1 = val1.map(v => (v && v.match && v.match(re_cssValueWithUnit) || [, v || 0, 'px'])),\n\t remap = {}, result = [], i;\n\t\n\ti = 0;\n\twhile ( i < units1.length ) {\n\t\tremap[units1[i][2]] = remap[units1[i][2]] || 1;\n\t\tremap[units1[i][2]] = parseFloat(units1[i][1]) * val;\n\t\ti++;\n\t}\n\tObject.keys(remap)\n\t .forEach(\n\t\t unit => (result.push(remap[unit] + unit))\n\t );\n\treturn result;\n}\n\nexport function offset( items, start = 0 ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\treturn items.map(\n\t\titem => (\n\t\t\t{\n\t\t\t\t...item,\n\t\t\t\tfrom: item.from + start\n\t\t\t}\n\t\t)\n\t)\n}\n\nexport function scale( items, duration = 0, withOffset ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\t\n\t// get items current duration\n\tlet iDuration = 0;\n\titems.forEach(\n\t\titem => {\n\t\t\tiDuration = Math.max(iDuration, item.from + item.duration)\n\t\t}\n\t)\n\t\n\titems = items.map(\n\t\titem => (\n\t\t\t{\n\t\t\t\t...item,\n\t\t\t\tfrom : (item.from / iDuration) * duration,\n\t\t\t\tduration: (item.duration / iDuration) * duration\n\t\t\t}\n\t\t)\n\t)\n\treturn withOffset ? offset(items, withOffset) : items\n}\n\nfunction inverseValues( v ) {\n\tif ( is.number(v) )\n\t\treturn -v;\n\tif ( is.object(v) )\n\t\treturn Object.keys(v).reduce(( h, key ) => (h[key] = inverseValues(v[key]), h), {});\n\tif ( is.array(v) )\n\t\treturn v.map(( item ) => (inverseValues(item)));\n\t\n\tlet values = v.split(/(\\-?\\d+(?:\\.\\d+)?|\\-?\\.\\d+)/ig);\n\t\n\treturn values.map(\n\t\t( val, i ) => (i % 2 ? -parseFloat(val) : val)\n\t).join(\"\");\n}\n\nexport function reverse( items ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\t// get items current duration\n\tlet iDuration = 0;\n\titems.forEach(\n\t\titem => {\n\t\t\tiDuration = Math.max(iDuration, item.from + item.duration)\n\t\t}\n\t)\n\t\n\treturn items.map(\n\t\titem => {\n\t\t\titem =\n\t\t\t\t{\n\t\t\t\t\t...item,\n\t\t\t\t\tfrom: iDuration - (item.from + item.duration),\n\t\t\t\t\t...(item.apply ? { apply: inverseValues(item.apply) } : undefined)\n\t\t\t\t};\n\t\t\treturn item;\n\t\t}\n\t)\n}\n\nconst MultiCssProps = { \"transform\": true, \"filter\": true, \"textShadow\": true, \"boxShadow\": true }\n\nexport function addCss( target, ...sources ) {\n\tlet source = sources.shift();\n\t\n\tfor ( const key in source ) {\n\t\tif ( !source.hasOwnProperty(key) )\n\t\t\tcontinue;\n\t\t\n\t\tif ( MultiCssProps[key] ) {\n\t\t\tif ( !target[key] ) {\n\t\t\t\ttarget[key] = [];\n\t\t\t}\n\t\t\tif ( !is.array(source[key]) ) {\n\t\t\t\taddCss(target[key], [source[key]]);\n\t\t\t}\n\t\t\telse addCss(target[key], source[key]);\n\t\t}\n\t\telse {\n\t\t\t// adding units\n\t\t\tif ( is.array(source[key]) ) {\n\t\t\t\tif ( !target[key] ) {\n\t\t\t\t\ttarget[key] = [];\n\t\t\t\t}\n\t\t\t\tif ( !is.array(target[key]) ) {\n\t\t\t\t\ttarget[key] = [...source[key], target[key]];\n\t\t\t\t}\n\t\t\t\telse target[key].push(...source[key]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( !target[key] ) {\n\t\t\t\t\tif ( !is.object(source[key]) ) {\n\t\t\t\t\t\ttarget[key] = source[key];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttarget[key] = { ...source[key] };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( is.object(target[key]) && is.object(source[key]) ) {\n\t\t\t\t\taddCss(target[key], source[key]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//else target[key].push(...source[key]);\n\t\t\t\t\ttarget[key] = addAllType(target[key], source[key])\n\t\t\t\t\t//console.log(key, target[key])\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\treturn sources.length && addCss(target, ...sources) || target;\n}\n\nfunction addAllType( v1, v2 ) {\n\tif ( !v1 )\n\t\treturn v2;\n\tif ( !v2 )\n\t\treturn v1;\n\tlet values1 = ('' + v1).split(/(\\-?\\d+(?:\\.\\d+)?|\\-?\\.\\d+)/ig),\n\t values2 = ('' + v2).split(/(\\-?\\d+(?:\\.\\d+)?|\\-?\\.\\d+)/ig),\n\t r = values1.map(\n\t\t ( val, i ) => (i % 2 ? parseFloat(val) + parseFloat(values2[i] || 0) : val)\n\t ).filter(i => (i !== ''));\n\t\n\treturn r.length === 1 ? parseInt(r[0]) : r.join(\"\")\n}\n\nexport function extractCss( items, inverse ) {\n\tlet css = {};\n\titems = is.array(items) ? items : items && [items] || items;\n\titems.forEach(\n\t\titem => {\n\t\t\taddCss(css, item.apply)\n\t\t}\n\t);\n\tif ( inverse )\n\t\tcss = inverseValues(css);\n\t\n\t\n\t//if ( inverse && css.hasOwnProperty('opacity') )\n\t//\tcss.opacity -= 1;\n\treturn css;\n}\n\nexport function target( items, target ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\treturn items.map(\n\t\titem => (\n\t\t\t{\n\t\t\t\t...item,\n\t\t\t\ttarget\n\t\t\t}\n\t\t)\n\t)\n}\n\nexport function shiftTransforms( items, shift = 1 ) {\n\titems = is.array(items) ? items : items && [items] || items;\n\treturn items.map(\n\t\titem => {\n\t\t\tlet t = item.apply && item.apply.transform;\n\t\t\tif ( t ) {\n\t\t\t\tt = is.array(t) ? t : [t];\n\t\t\t\tfor ( let i = 0; i < shift; i++ )\n\t\t\t\t\tt.unshift({});\n\t\t\t\t\n\t\t\t\titem = { ...item, apply: { ...item.apply, transform: t } };\n\t\t\t}\n\t\t\treturn item;\n\t\t}\n\t)\n}","/* This is a virtual file generated by layer-pack */\nlet req, _exports = {}, walknSetExport=require('react-voodoo/.___layerPackIndexUtils').walknSetExport;\nconst _react_voodoo_utils_css_demux_filter_js = require(\"react-voodoo/utils/css/demux/filter.js\");\nwalknSetExport(_exports, \"filter\", _react_voodoo_utils_css_demux_filter_js);\nconst _react_voodoo_utils_css_demux_boxShadow_js = require(\"react-voodoo/utils/css/demux/boxShadow.js\");\nwalknSetExport(_exports, \"boxShadow\", _react_voodoo_utils_css_demux_boxShadow_js);\nconst _react_voodoo_utils_css_demux_transform_js = require(\"react-voodoo/utils/css/demux/transform.js\");\nwalknSetExport(_exports, \"transform\", _react_voodoo_utils_css_demux_transform_js);\nconst _react_voodoo_utils_css_demux_textShadow_js = require(\"react-voodoo/utils/css/demux/textShadow.js\");\nwalknSetExport(_exports, \"textShadow\", _react_voodoo_utils_css_demux_textShadow_js);\nconst _react_voodoo_utils_css_demux_backgroundColor_js = require(\"react-voodoo/utils/css/demux/backgroundColor.js\");\nwalknSetExport(_exports, \"backgroundColor\", _react_voodoo_utils_css_demux_backgroundColor_js);\n\nexport const backgroundColor = _exports.backgroundColor;\n\nexport const boxShadow = _exports.boxShadow;\n\nexport const filter = _exports.filter;\n\nexport const textShadow = _exports.textShadow;\n\nexport const transform = _exports.transform;\nexport default _exports;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\n\nimport {addCss} from \"../tweenTools\";\nimport {\n\texpandShorthandProperty, isShorthandProperty, isValidDeclaration\n} from \"./cssUtils\";\nimport cssDemuxers from \"./demux/(*).js\";\n\nimport {int, multi, number, ratio, color, any} from \"./demux/typed/(*).js\";\n\nconst cssDemux = {\n\t...cssDemuxers,\n\theight : number,\n\twidth : number,\n\ttop : number,\n\tleft : number,\n\tright : number,\n\tbottom : number,\n\tmarginTop : number,\n\tmarginLeft : number,\n\tmarginRight : number,\n\tmarginBottom : number,\n\tpaddingTop : number,\n\tpaddingLeft : number,\n\tpaddingRight : number,\n\tpaddingBottom : number,\n\tborderRadius : number,\n\tborderTopColor : color,\n\tborderLeftColor : color,\n\tborderRightColor : color,\n\tborderBottomColor: color,\n\tborderTopWidth : number,\n\tborderLeftWidth : number,\n\tborderRightWidth : number,\n\tborderBottomWidth: number,\n\ttransformOrigin : multi(2),\n\tzIndex : int,\n\topacity : ratio,\n};\n\n\nexport function clearTweenableValue( cssKey, twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues ) {\n\tlet path = twKey.split('_'), tmpKey;// not optimal at all\n\tcssDemux[path[0]]?.release(twKey, tweenableMap, cssMap, dataMap, muxerMap, keepValues)\n}\n\n/**\n * Interpolate float/int values to css basing the css prop type\n * @param tweenable {Object} map of tweenable values\n * @param css {Object} map of css value to be push in DOM\n * @param demuxers {Object} map of numeric to css converter\n * @param data {Object} map of converters contexts\n * @param box {Object} xyz of the parent viewbox\n */\nexport function muxToCss( tweenable, css, demuxers, data, box ) {\n\tObject.keys(demuxers)\n\t .forEach(\n\t\t ( key ) => {\n\t\t\t demuxers[key].demux(key, tweenable, css, data, box)\n\t\t }\n\t )\n}\n\n/**\n * Instanciate interpolators & init css/tweenable values basing the tween\n * @param tween\n * @param deMuxedTween\n * @param initials\n * @param data\n * @param demuxers\n * @param noPropLock\n * @param reOrder\n * @returns {{}}\n */\nexport function deMuxTween( tween, deMuxedTween, initials, data, demuxers, noPropLock, reOrder ) {\n\tlet fTween = {}, excluded = {};\n\ttween && Object.keys(tween)\n\t .forEach(\n\t\t ( key ) => {\n\t\t\t if ( cssDemux[key] )\n\t\t\t\t fTween[key] = tween[key];\n\t\t\t else if ( isValidDeclaration(key, tween[key]) ) {\n\t\t\t\t\n\t\t\t\t if ( isShorthandProperty(key) ) {\n\t\t\t\t\t expandShorthandProperty(key, tween[key], fTween);\n\t\t\t\t }\n\t\t\t\t else fTween[key] = tween[key];\n\t\t\t }\n\t\t\t else excluded[key] = tween[key];\n\t\t });\n\t\n\tfTween && Object.keys(fTween)\n\t .forEach(\n\t\t ( key ) => {\n\t\t\t if ( cssDemux[key] ) {//key, value, target, data, initials\n\t\t\t\t (demuxers[key] = cssDemux[key]).mux(key, fTween[key], deMuxedTween, data, initials, noPropLock, reOrder)\n\t\t\t }\n\t\t\t else\n\t\t\t\t (demuxers[key] = any).mux(key, fTween[key], deMuxedTween, data, initials, noPropLock, reOrder)\n\t\t }\n\t );\n\treturn excluded;\n}\n\n/**\n * Init/update muxers & initial css values of targets in a tween line / axis\n * @param tweenLine\n * @param initials\n * @param data\n * @param demuxers\n * @param noPropLock\n * @returns {*}\n */\nexport function deMuxLine( tweenLine, initials, data, demuxers, noPropLock ) {\n\tnoPropLock = noPropLock && {};\n\tlet allPropsById = {},\n\t twAxis = tweenLine.reduce(\n\t\t ( line, tween ) => {\n\t\t\t let demuxedTween = {};\n\t\t\t demuxers[tween.target] = demuxers[tween.target] || {};\n\t\t\t initials[tween.target] = initials[tween.target] || {};\n\t\t\t data[tween.target] = data[tween.target] || {};\n\t\t\t\n\t\t\t if ( !tween.type || tween.type === \"Tween\" ) {\n\t\t\t\t !noPropLock && addCss(allPropsById[tween.target] = allPropsById[tween.target] || {}, tween.apply);\n\t\t\t\t //console.log(\"merged\", tween.apply)\n\t\t\t\t deMuxTween(tween.apply, demuxedTween, initials[tween.target], data[tween.target], demuxers[tween.target], true);\n\t\t\t\t line.push(\n\t\t\t\t\t {\n\t\t\t\t\t\t ...tween,\n\t\t\t\t\t\t apply: demuxedTween\n\t\t\t\t\t });\n\t\t\t }\n\t\t\t else line.push({ ...tween });\n\t\t\t return line\n\t\t },\n\t\t []\n\t );\n\t//console.log(allPropsById)\n\t!noPropLock && Object.keys(allPropsById)\n\t .forEach(\n\t\t id => deMuxTween(allPropsById[id], {}, {}, data[id], demuxers[id])\n\t )\n\t;\n\treturn twAxis;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"tween-axis\");","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\n\n/**\n * Old school dom utils & events managers\n */\n\nlet\n is = require('is'),\n isBrowser = typeof window !== 'undefined',\n isTouch = isBrowser && ( function is_touch_device() {\n var prefixes = ' -webkit- -moz- -o- -ms- '.split(' ');\n var mq = function ( query ) {\n return window.matchMedia && window.matchMedia(query).matches;\n }\n \n if ( ( 'ontouchstart' in window ) || window.DocumentTouch && document instanceof DocumentTouch ) {\n return true;\n }\n \n // include the 'heartz' as a way to have a non matching MQ to help terminate the\n // join https://git.io/vznFH\n var query = ['(', prefixes.join('touch-enabled),('), 'heartz', ')'].join('');\n return mq(query);\n }() ),\n _dom = isBrowser ? {\n prefix : ( /webkit/i ).test(navigator.appVersion) ? 'webkit' :\n ( /firefox/i ).test(navigator.userAgent) ? 'Moz' :\n ( /trident/i ).test(navigator.userAgent) ? 'ms' :\n 'opera' in window ? 'O' : '',\n dashedPrefix: ( /webkit/i ).test(navigator.appVersion) ? '-webkit-' :\n ( /firefox/i ).test(navigator.userAgent) ? '-moz-' :\n ( /trident/i ).test(navigator.userAgent) ? '-ms-' :\n 'opera' in window ? '-o-' : ''\n } : {\n prefix : '',\n dashedPrefix: ''\n },\n __ = {\n onPageHided : [],\n onPageShown : [],\n dragging : [],\n dragEnabled : [],\n dragEnabledDesc : [],\n fingers : {},\n nbFingers : 0,\n dragstartAnywhere: function ( e ) {\n let o,\n me = __,\n i = me.dragEnabled.indexOf(this),\n finger,\n desc, fingers = [];\n \n if ( i === -1 ) {\n return;\n }\n //e.preventDefault();\n //e.stopPropagation();\n \n if ( !me.nbFingers ) {\n Dom.addEvent(document,\n {\n 'touchmove': me.dragAnywhere,\n 'mousemove': me.dragAnywhere,\n 'touchend' : me.dropAnywhere,\n 'mouseup' : me.dropAnywhere,\n });\n Dom.addEvent(this,\n {\n 'click': me.dropWithoutClick\n }, null, null, null, true);\n }\n \n if ( e.changedTouches && e.changedTouches.length ) {\n fingers = e.changedTouches\n }\n else fingers.push(e);\n \n for ( let t = 0, ln = fingers.length; t < ln; t++ ) {\n finger = fingers[ t ];\n \n \n desc = me.dragEnabledDesc[ i ];\n \n if ( desc.nbFingers ) continue;\n \n me.nbFingers++;\n \n me.fingers[ finger.identifier ] = me.fingers[ finger.identifier ] || [];\n me.fingers[ finger.identifier ].push(desc);\n \n \n desc.nbFingers++;\n \n desc._startPos.x = _dom.prefix == 'MS' ? finger.x : finger.pageX;\n desc._startPos.y = _dom.prefix == 'MS' ? finger.y : finger.pageY;\n desc._startTs = e.timeStamp;\n \n \n desc._lastPos.x = _dom.prefix == 'MS' ? finger.x : finger.pageX;\n desc._lastPos.y = _dom.prefix == 'MS' ? finger.y : finger.pageY;\n \n for ( o = 0; o < desc.dragstart.length; o++ )\n desc.dragstart[ o ][ 0 ].call(desc.dragstart[ o ][ 1 ] ||\n this, e, finger, desc);\n }\n },\n dragAnywhere : function ( e ) {\n let o,\n me = __,\n finger, fingers = [], stopped,\n desc = __.dragging[ 0 ];\n \n \n if ( e.changedTouches && e.changedTouches.length ) {\n fingers = e.changedTouches\n }\n else fingers.push(e);\n \n for ( let i = 0, ln = fingers.length; i < ln; i++ ) {\n finger = fingers[ i ];\n desc = me.fingers[ finger.identifier ];\n me.fingers[ finger.identifier ] &&\n me.fingers[ finger.identifier ].forEach(\n desc => {\n if ( stopped ) {\n desc._lastPos.x = desc._startPos.x = _dom.prefix == 'MS'\n ? finger.x\n : finger.pageX;\n desc._lastPos.y = desc._startPos.y = _dom.prefix == 'MS'\n ? finger.y\n : finger.pageY;\n return;\n }\n desc._lastPos.x = _dom.prefix == 'MS' ? finger.x : finger.pageX;\n desc._lastPos.y = _dom.prefix == 'MS' ? finger.y : finger.pageY;\n \n for ( o = 0; o < desc.drag.length; o++ )\n stopped = desc.drag[ o ][ 0 ].call(desc.drag[ o ][ 1 ] || this, e,\n finger,\n desc) === false;\n }\n )\n \n }\n },\n dropWithoutClick : function ( e ) {\n if ( __.preventNextClick ) {\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n __.preventNextClick = false;\n }\n Dom.removeEvent(this,\n {\n 'click': this.dropWithoutClick\n });\n },\n dropAnywhere : function ( e ) {\n let o,\n me = __, finger, fingers = [],\n prevent;\n \n if ( e.changedTouches && e.changedTouches.length ) {\n fingers = e.changedTouches\n }\n else fingers.push(e);\n \n for ( let i = 0, ln = fingers.length; i < ln; i++ ) {\n finger = fingers[ i ];\n me.nbFingers--;\n me.fingers[ finger.identifier ] &&\n me.fingers[ finger.identifier ].forEach(\n desc => {\n \n \n desc.nbFingers--;\n prevent = prevent || desc.mouseDrag && ( e.timeStamp - desc._startTs > 250 );\n desc._lastPos.x = _dom.prefix == 'MS' ? finger.x : finger.pageX;\n desc._lastPos.y = _dom.prefix == 'MS' ? finger.y : finger.pageY;\n \n for ( o = 0; o < desc.dropped.length; o++ )\n desc.dropped[ o ][ 0 ].call(desc.dropped[ o ][ 1 ] ||\n this, e,\n finger, desc);\n \n \n }\n )\n me.fingers[ finger.identifier ] = null;\n }\n if ( prevent ) {\n me.preventNextClick = true;\n }\n if ( !me.nbFingers ) {\n Dom.removeEvent(document,\n {\n 'touchmove': me.dragAnywhere,\n 'mousemove': me.dragAnywhere,\n 'touchend' : me.dropAnywhere,\n 'mouseup' : me.dropAnywhere\n });\n }\n },\n getDraggable : function ( node, mouseDrag, touchDrag ) {\n let i = this.dragEnabled.indexOf(node), desc;\n if ( i === -1 ) {\n this.dragEnabled.push(node);\n this.dragEnabledDesc.push(\n desc = {\n mouseDrag,\n touchDrag,\n nbFingers: 0,\n locks : 0,\n _startPos: {\n x: 0,\n y: 0\n },\n _lastPos : {\n x: 0,\n y: 0\n },\n dragstart: [],\n drag : [],\n dragEnd : [],\n dropped : []\n }\n );\n //debugger;\n Dom.addEvent(node,\n {\n 'mousedown' : mouseDrag && this.dragstartAnywhere,\n 'touchstart': touchDrag && this.dragstartAnywhere\n }, null, null, null, true);\n }\n else desc = this.dragEnabledDesc[ i ];\n return desc;\n },\n freeDraggable : function ( node ) {\n let i = this.dragEnabled.indexOf(node), desc;\n if ( i !== -1 ) {\n this.dragEnabled.splice(i, 1);\n this.dragEnabledDesc.splice(i, 1);\n \n Dom.removeEvent(node,\n {\n 'mousedown' : this.dragstartAnywhere,\n 'touchstart': this.dragstartAnywhere\n });\n }\n },\n \n addEvent : function ( node, type, fn, bubble ) {\n if ( node.addEventListener ) {\n node.addEventListener(type, fn, bubble);\n }\n else if ( node.attachEvent ) {\n node.attachEvent('on' + type,\n fn.related = function ( e ) {\n return fn.call(node, e);\n });\n }\n },\n removeEvent: function ( node, type, fn, bubble ) {\n if ( node.removeEventListener ) {\n node.removeEventListener(type, fn, bubble);\n }\n else if ( node.attachEvent ) {\n node.detachEvent('on' + type, fn.related);\n }\n },\n rmDragFn : function ( arr, fn, scope ) {\n for ( let i = 0, ln = arr.length; i < ln; i++ ) {\n if ( arr[ i ][ 0 ] === fn )\n return arr.splice(i, 1);\n }\n \n console.warn(\"Rm event : Listener not found !!\");\n },\n },\n Dom = {\n addEvent : function ( node, type, fn, mouseDrag, touchDrag = true, bubble ) {\n if ( is.object(type) ) {\n for ( let o in type )\n if ( type.hasOwnProperty(o) && type[ o ] )\n this.addEvent(node, o, type[ o ], mouseDrag, touchDrag, bubble);\n return;\n }\n else if ( type === 'dragstart' ) {\n __.getDraggable(node, mouseDrag, touchDrag).dragstart.push([fn]);\n }\n else if ( type === 'drag' ) {\n __.getDraggable(node, mouseDrag, touchDrag).drag.push([fn]);\n }\n else if ( type === 'dropped' ) {\n __.getDraggable(node, mouseDrag, touchDrag).dropped.push([fn]);\n }\n else {\n if ( node.addEventListener ) {\n node.addEventListener(type, fn, { passive: false });\n }\n else if ( node.attachEvent ) {\n node.attachEvent('on' + type,\n fn.related = function ( e ) {\n return fn.call(node, e);\n });\n }\n }\n \n },\n removeEvent: function ( node, type, fn, scope, bubble ) {\n let i, desc;\n \n if ( is.object(type) ) {\n for ( let o in type )\n if ( type.hasOwnProperty(o) )\n this.removeEvent(node, o, type[ o ], scope);\n \n }\n else if ( /^(drag|drop)/.test(type) ) {\n desc = __.getDraggable(node);\n __.rmDragFn(desc[ type ], fn, scope);\n if ( !desc.dragstart.length\n && !desc.drag.length\n && !desc.dragEnd.length\n && !desc.dropped.length )\n __.freeDraggable(node);\n }\n else {\n if ( node.removeEventListener ) {\n node.removeEventListener(type, fn, bubble);\n }\n else if ( node.attachEvent ) {\n node.detachEvent('on' + type, fn.related);\n }\n }\n \n },\n offset : function ( elem ) {// @todo\n let dims = {\n top : 0,\n left : 0,\n width : elem.offsetWidth,\n height: elem.offsetHeight\n };\n while ( elem ) {\n dims.top = dims.top + parseInt(elem.offsetTop);\n dims.left = dims.left + parseInt(elem.offsetLeft);\n elem = elem.offsetParent;\n }\n return dims;\n },\n \n \n /**\n * Find the react component that generate element dom node\n * @param element\n * @returns {[React.Component]}\n */\n findReactParents( element ) {\n let fiberNode, comps = [element];\n for ( const key in element ) {\n \n if ( key.startsWith('__reactInternalInstance$') || key.startsWith('__reactFiber$') ) {\n fiberNode = element[ key ];\n while ( fiberNode.return ) {\n if ( fiberNode.stateNode && !comps.includes(fiberNode.stateNode) )\n comps.push(fiberNode.stateNode)\n fiberNode = fiberNode.return;\n }\n return comps;\n }\n }\n return element.parentNode && this.findReactParents(element.parentNode);\n }\n \n };\nexport default Dom;","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport tweenAxis from \"tween-axis\";\n\n\nconst recyclableTweenAxis = [];\n\n/**\n * Override the TweenAxis Objects to automatically deal with recycling\n */\nexport default class CssTweenAxis extends tweenAxis {\n\t\n\tconstructor( cfg, scope ) {\n\t\tif ( recyclableTweenAxis.length ) {\n\t\t\tlet recyled = recyclableTweenAxis.pop();\n\t\t\trecyled.scope = scope;\n\t\t\tif ( is.array(cfg) ) {\n\t\t\t\trecyled.localLength = 1;\n\t\t\t\trecyled.mount(cfg, scope);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( cfg.Axis )\n\t\t\t\t\trecyled.mount(cfg.Axis, scope);\n\t\t\t}\n\t\t\treturn recyled;\n\t\t}\n\t\tsuper(...arguments)\n\t}\n\t\n\tdestroy() {\n\t\t\n\t\tthis.scope = undefined;\n\t\tthis.__marks.length = 0;\n\t\tthis.__marksLength.length = 0;\n\t\tthis.__marksKeys.length = 0;\n\t\tthis.__processors.length = 0;\n\t\tthis.__config.length = 0;\n\t\tthis.__activeForks.length = 0;\n\t\tthis.__activeProcess.length = 0;\n\t\t\n\t\tthis.__activeProcess.length = 0;\n\t\tthis.__outgoing.length = 0;\n\t\tthis.__incoming.length = 0;\n\t\tthis.__cPos = 0;\n\t\tthis.duration = 0;\n\t\tthis.__cIndex = 0;\n\t\tthis.__cMaxKey = 1;\n\t\trecyclableTweenAxis.push(this);\n\t}\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nconst\n\tis = require('is'),\n\teasingFn = require('d3-ease'),\n\tsignOf = function sign( x ) {\n\t\treturn typeof x === 'number' ? x ? x < 0 ? -1 : 1 : x === x ? x : NaN : NaN;\n\t},\n\tabs = Math.abs,\n\tfloor = Math.floor,\n\tround = Math.round,\n\tmin = Math.min,\n\tmax = Math.max,\n\tfloatCut = ( v = 0 ) => v.toFixed(3),\n\tconsts = {\n\t\tvelocityResetTm: .150,\n\t\tclickTm : 250\n\t};\n\n\n/**\n * Predict inertia dist & target basing velocity\n * @param _\n */\nexport function applyInertia( _ ) {\n\tlet velSign = signOf(_.lastVelocity);\n\t\n\tif ( _.disabled ) {\n\t\t_.loopsTarget = 0;\n\t\t_.loopsVelSum = 0;\n\t\t_.targetDist = 0;\n\t\t_.targetDuration = 0;\n\t}\n\telse {\n\t\t// calc momentum distance...\n\t\t// get nb loop needed to get vel < .05\n\t\t_.loopsTarget = floor(Math.log(.05 / abs(_.lastVelocity)) / Math.log(.9));\n\t\t\n\t\t// get velocity sum basing on nb loops needed\n\t\t_.loopsVelSum = (Math.pow(.9, _.loopsTarget) - abs(_.lastVelocity)) / (.9 - 1);\n\t\t\n\t\t// deduce real dist of momentum\n\t\t_.targetDist = (_.loopsVelSum * _.refFPS * velSign) / 1000 || 0;\n\t\t_.targetDuration = abs(_.loopsTarget * _.refFPS * velSign) || 0;\n\t\t//console.warn(\" _.targetDist\", _.targetDist, _.lastVelocity);\n\t}\n}\n\n/**\n * Main inertia class\n * @type {module.exports}\n */\nexport default class Inertia {\n\tstatic config = {\n\t\tbounds : true,\n\t\tsnapToBounds: true\n\t};\n\t\n\tconstructor( opt ) {\n\t\tlet _ = this._ = {};\n\t\t_.conf = {\n\t\t\t...this.constructor.config,\n\t\t\t...opt\n\t\t};\n\t\t\n\t\tthis.active = false;\n\t\t_.pos = opt.value || 0;\n\t\t_.refFPS = 16;\n\t\t_.min = opt.min || 0;\n\t\t_.max = opt.max || 0;\n\t\t_.currentStop = 0;\n\t\t_.lastInertiaPos = 0;\n\t\t_.stops = _.conf.stops;\n\t\t_.disabled = _.conf.disabled;\n\t\t_.wayPoints = _.conf.wayPoints;\n\t\t_.inertiaFn = easingFn.easePolyOut;\n\t\t_.targetWayPointIndex = 0;\n\t\t\n\t\tthis._detectCurrentSnap();\n\t}\n\t\n\tupdateConf( opt ) {\n\t\tlet _ = this._;\n\t\t_.min = opt.min || 0;\n\t\t_.max = opt.max || 0;\n\t\t_.stops = opt.stops;\n\t\t_.disabled = opt.disabled;\n\t\t_.wayPoints = opt.wayPoints;\n\t\t_.conf.willStop = opt.willStop;\n\t\t_.conf.willSnap = opt.willSnap;\n\t\t_.conf.shouldLoop = opt.shouldLoop;\n\t}\n\t\n\tstartMove() {\n\t\tlet _ = this._;\n\t\t_.baseTS = _.startTS = Date.now() / 1000;\n\t\t_.lastVelocity = _.lastIVelocity = 0;\n\t\t_.lastAccel = 0;\n\t\t_.posDiff = 0;\n\t\t_.loopsDiff = 0;\n\t\tthis.active = true;\n\t\tthis.holding = true;\n\t\t_.inertia = false;\n\t}\n\t\n\thold( nextPos ) {\n\t\tlet _ = this._,\n\t\t delta = _.lastHoldPos !== undefined ? nextPos - _.lastHoldPos : 0,\n\t\t loop,\n\t\t now = Date.now() / 1000,//e.timeStamp,\n\t\t sinceLastPos = (now - _.baseTS),\n\t\t pos = nextPos,//_.lastHoldPos + delta,\n\t\t iVel = delta / sinceLastPos;\n\t\t\n\t\t_.lastHoldPos = nextPos;\n\t\t//if (is.nan(pos))\n\t\t//\tdebugger\n\t\t\n\t\tif ( !_.lastBaseTs ) {// create base pts\n\t\t\t_.lastBasePos = nextPos;\n\t\t\t_.lastBaseTs = _.baseTS;\n\t\t}\n\t\t\n\t\tif ( sinceLastPos < .003 ) {\n\t\t\t//console.log(\"hold fast\", delta, _.baseTS, sinceLastPos);\n\t\t\t// skip/ignore\n\t\t}\n\t\telse if (// direction changed for velocityResetTm\n\t\t\t(\n\t\t\t\t(iVel <= 0 && _.lastVelocity > 0)\n\t\t\t\t||\n\t\t\t\t(iVel >= 0 && _.lastVelocity < 0)\n\t\t\t\t||\n\t\t\t\tabs(iVel) < abs(_.lastVelocity * 0.2)\n\t\t\t) &&\n\t\t\t(now - _.lastBaseTs) > consts.velocityResetTm\n\t\t) {\n\t\t\t//console.log(\"reset\", _.lastBaseTs, _.lastVelocity);\n\t\t\t_.lastBasePos = nextPos;\n\t\t\t_.lastBaseTs = now;\n\t\t\t_.lastVelocity = 0;\n\t\t\t_.lastIVelocity = 0;\n\t\t\t_.baseTS = now;\n\t\t\t_.targetDist = 0;\n\t\t\t_.lastInertiaPos = 0;\n\t\t}\n\t\telse if (// dir changed fast\n\t\t\t(iVel <= 0 && _.lastVelocity > 0)\n\t\t\t||\n\t\t\t(iVel >= 0 && _.lastVelocity < 0)\n\t\t\t||\n\t\t\tabs(iVel) < abs(_.lastVelocity * 0.2)\n\t\t) {\n\t\t\t//ignore\n\t\t}\n\t\telse {\n\t\t\t_.lastIVelocity = iVel;\n\t\t\t_.lastVelocity = ((pos) - (_.lastBasePos)) / (now - _.lastBaseTs);\n\t\t\t//if ( _.lastVelocity < -50 )\n\t\t\t//\tdebugger\n\t\t\t_.baseTS = now;\n\t\t\t_.targetDist = 0;\n\t\t\t_.lastInertiaPos = 0;\n\t\t\t// clear snap\n\t\t\t_.targetWayPoint = undefined;\n\t\t\t_.targetWayPointIndex = undefined;\n\t\t}\n\t\t\n\t\tif ( _.conf.bounds ) {\n\t\t\tif ( pos > _.max ) {\n\t\t\t\tpos = _.max// + min((pos - _.max) / 10, 10);\n\t\t\t}\n\t\t\telse if ( pos < _.min ) {\n\t\t\t\tpos = _.min// - min((_.min - pos) / 10, 10);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( _.conf.shouldLoop ) {\n\t\t\twhile ( (loop = _.conf.shouldLoop(pos, delta)) ) {\n\t\t\t\tpos += loop;\n\t\t\t}\n\t\t}\n\t\t_.pos = pos;\n\t\t\n\t}\n\t\n\trelease() {\n\t\tlet _ = this._,\n\t\t velSign = signOf(_.lastVelocity);\n\t\t\n\t\tthis.holding = false;\n\t\t\n\t\t// calc momentum distance...\n\t\tapplyInertia(_);\n\t\t\n\t\t_.lastHoldPos = undefined;\n\t\t\n\t\t_.lastBasePos = undefined;\n\t\t_.lastBaseTs = undefined;\n\t\t_.holding = false;\n\t\t\n\t\t//if ( _.conf.shouldLoop ) {\n\t\t//\tlet loop, nPos=_.pos + _.targetDist;\n\t\t//\twhile ( (loop = _.conf.shouldLoop(nPos, 0)) ) {\n\t\t//\t\tnPos += loop;\n\t\t//\t\tif ( _.inertia ) {\n\t\t//\t\t\t//_.targetDist+=loop;\n\t\t//\t\t\t//_.lastInertiaPos+=loop;\n\t\t//\t\t}\n\t\t//\t\t//this.teleport(loop);\n\t\t//\t}\n\t\t//\tif (nPos!==_.pos + _.targetDist)\n\t\t//}\n\t\tif ( _.conf.bounds && _.conf.snapToBounds ) {\n\t\t\tif ( (_.pos + _.targetDist) > _.max ) {\n\t\t\t\t_.targetDist = _.max - _.pos;\n\t\t\t\t_.targetDuration = abs(_.targetDist * 10);\n\t\t\t}\n\t\t\telse if ( (_.pos + _.targetDist) < _.min ) {\n\t\t\t\t\n\t\t\t\t_.targetDist = _.min - _.pos;\n\t\t\t\t_.targetDuration = abs(_.targetDist * 10);\n\t\t\t}\n\t\t}\n\t\t//else {\n\t\tif ( !_.targetDuration )\n\t\t\t_.targetDuration = 50;\n\t\t\n\t\t//console.log(_);\n\t\tthis.active = true;\n\t\t_.inertia = true;\n\t\t_.lastInertiaPos = 0;\n\t\t_.inertiaStartTm =\n\t\t\t_.inertiaLastTm = Date.now();\n\t\t\n\t\t\n\t\t//}\n\t\tthis._doSnap(null, 500)\n\t\t_.conf.willEnd?.(_.targetDist + _.pos, _.targetDist, _.targetDuration);\n\t}\n\t\n\tupdate( at = Date.now() ) {\n\t\tlet _ = this._, nextValue, loop;\n\t\tlet\n\t\t\tpos = _.inertiaFn((at - _.inertiaStartTm) / _.targetDuration) * _.targetDist;\n\t\t\n\t\tif ( !_.inertia ) {\n\t\t\t//if ( _.conf.shouldLoop ) {\n\t\t\t//\twhile ( (loop = _.conf.shouldLoop(_.pos, 0)) ) {\n\t\t\t//\t\tthis.teleport(loop);\n\t\t\t//\t}\n\t\t\t//}\n\t\t\treturn _.pos;\n\t\t}\n\t\tlet\n\t\t\tdelta = pos - _.lastInertiaPos;\n\t\t_.lastInertiaPos = pos;\n\t\t\n\t\tif ( (at - _.inertiaStartTm) >= _.targetDuration ) {\n\t\t\t_.inertia = this.active = false;\n\t\t\t_.lastInertiaPos = delta = 0;\n\t\t\t_.targetDist = 0;\n\t\t\tif ( _.targetWayPoint ) {\n\t\t\t\tdelta = _.targetWayPoint.at - _.pos;\n\t\t\t\t//console.log(\"snap done \", _.targetWayPoint, _.pos + delta);\n\t\t\t\t_.currentWayPoint = _.targetWayPoint;\n\t\t\t\t_.currentWayPointIndex = _.targetWayPointIndex;\n\t\t\t\t_.targetWayPoint = null;\n\t\t\t\t_.targetWayPointIndex = null;\n\t\t\t\t//_.lastSnapTm = Date.now();\n\t\t\t}\n\t\t\t\n\t\t\tif ( _.conf.onInertiaEnd ) {\n\t\t\t\t_.conf.onInertiaEnd(_.pos, _.currentWayPoint)\n\t\t\t}\n\t\t}\n\t\t\n\t\tdelta = delta || 0;\n\t\t//console.log(_.pos + delta);\n\t\tnextValue = _.pos + delta;\n\t\t\n\t\tif ( _.conf.shouldLoop ) {\n\t\t\tlet t = nextValue;\n\t\t\twhile ( (loop = _.conf.shouldLoop(nextValue, delta)) ) {\n\t\t\t\t//console.warn(\"loop update\", loop, nextValue);\n\t\t\t\tnextValue += loop;\n\t\t\t\tif ( _.inertia ) {\n\t\t\t\t\t//_.targetDist+=loop;\n\t\t\t\t\t//_.lastInertiaPos+=loop;\n\t\t\t\t}\n\t\t\t\t//this.teleport(loop);\n\t\t\t}\n\t\t}\n\t\t\n\t\t_.pos = nextValue;\n\t\t\n\t\treturn nextValue;\n\t}\n\t\n\tsetPos( pos ) {\n\t\tlet _ = this._, nextValue;\n\t\t_.inertia = false;\n\t\tthis.active = false;\n\t\t_.lastInertiaPos = 0;\n\t\t_.targetDist = 0;\n\t\t_.inertiaStartTm = 0;\n\t\t_.inertiaLastTm = 0;\n\t\t_.targetDuration = 0;\n\t\t\n\t\tif ( _.conf.shouldLoop ) {\n\t\t\tlet loop, nextValue = pos;\n\t\t\twhile ( (loop = _.conf.shouldLoop(nextValue, _.pos - pos)) ) {\n\t\t\t\tnextValue += loop;\n\t\t\t\t//this.teleport(loop);\n\t\t\t\t//console.warn(\"loop update\", nextValue, pos);\n\t\t\t}\n\t\t\tpos = nextValue;\n\t\t}\n\t\t_.pos = pos;\n\t\tif ( _.conf.bounds ) {\n\t\t\t_.pos = max(_.pos, _.min);\n\t\t\t_.pos = min(_.pos, _.max);\n\t\t}\n\t}\n\t\n\tsetWayPoints( wayPoints ) {\n\t\tlet _ = this._, nextValue;\n\t\t_.wayPoints = wayPoints;\n\t\tthis._detectCurrentSnap();\n\t}\n\t\n\tteleport( loopDist ) {\n\t\tlet _ = this._, nextValue;\n\t\tif ( !_.inertia )\n\t\t\treturn _.pos += loopDist;\n\t\t\n\t\t//_.lastInertiaPos += loopDist;\n\t\t_.pos += loopDist\n\t\t//console.log(\"setPos\", _.lastInertiaPos);\n\t}\n\t\n\tdispatch( delta, tm = 500 ) {\n\t\tlet _ = this._,\n\t\t now = Date.now(),\n\t\t pos;\n\t\t\n\t\tthis.active = true;\n\t\t\n\t\t// if no inertia has started || if direction has change\n\t\tif ( !_.inertia || signOf(delta) !== signOf(_.targetDist) ) {\n\t\t\t_.inertia = true;\n\t\t\t_.lastInertiaPos = 0;\n\t\t\t_.inertiaStartTm =\n\t\t\t\t_.inertiaLastTm = now;\n\t\t\t\n\t\t\t_.targetDist = delta;\n\t\t\t_.targetDuration = tm;\n\t\t}\n\t\telse {\n\t\t\t//_.inertiaStartTm =\n\t\t\t//_.inertiaLastTm = now;\n\t\t\t//_.lastInertiaPos = 0;\n\t\t\t_.targetDist += delta;\n\t\t\t_.targetDuration += tm / 2;\n\t\t}\n\t\t//\n\t\t//if ( _.conf.maxJump ) {\n\t\t//\n\t\t//}\n\t\t\n\t\tif ( _.conf.bounds ) {\n\t\t\tif ( (_.pos + _.targetDist) > _.max ) {\n\t\t\t\t\n\t\t\t\t_.targetDist = _.max - _.pos;\n\t\t\t\t_.targetDuration = abs(_.targetDist * 10);\n\t\t\t}\n\t\t\telse if ( (_.pos + _.targetDist) < _.min ) {\n\t\t\t\t\n\t\t\t\t_.targetDist = _.min - _.pos;\n\t\t\t\t_.targetDuration = abs(_.targetDist * 10);\n\t\t\t}\n\t\t}\n\t\tthis._doSnap(signOf(delta), 750)\n\t}\n\t\n\t\n\t_detectCurrentSnap() {\n\t\tlet _ = this._,\n\t\t pos = _.pos,\n\t\t i;\n\t\t\n\t\tif ( _.wayPoints && _.wayPoints.length ) {\n\t\t\tfor ( i = 0; i < _.wayPoints.length; i++ )\n\t\t\t\tif ( floatCut(_.wayPoints[i].at) === floatCut(pos) ) {\n\t\t\t\t\t_.currentWayPoint = _.wayPoints[i];\n\t\t\t\t\t_.currentWayPointIndex = i;\n\t\t\t\t\t//console.warn(\"snap set\", i);\n\t\t\t\t\t\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t}\n\t}\n\t\n\t_doSnap( forceSnap, maxDuration = 2000 ) {\n\t\tlet _ = this._,\n\t\t pos = _.targetDist + (_.pos - (_.lastInertiaPos || 0)),\n\t\t lPos = pos,\n\t\t loopDec = 0,\n\t\t target,\n\t\t mid,\n\t\t i,\n\t\t loop;\n\t\t\n\t\tif ( _.wayPoints && _.wayPoints.length ) {\n\t\t\t\n\t\t\t// apply loops to do to find the final wayPoint\n\t\t\tif ( _.conf.shouldLoop ) {\n\t\t\t\twhile ( (loop = _.conf.shouldLoop(lPos, 0)) ) {\n\t\t\t\t\tlPos += loop;\n\t\t\t\t\tloopDec += loop;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor ( i = 0; i < _.wayPoints.length; i++ )\n\t\t\t\tif ( _.wayPoints[i].at > lPos )\n\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tif ( i === _.wayPoints.length ) {\n\t\t\t\ti--\n\t\t\t}\n\t\t\telse if ( i === 0 ) {\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmid = (_.wayPoints[i].at - _.wayPoints[i - 1].at) / 2;\n\t\t\t\tmid = _.wayPoints[i - 1].at + (mid * ((_.wayPoints[i].gravity || 1) / (_.wayPoints[i - 1].gravity || 1)));\n\t\t\t\t\n\t\t\t\tif ( forceSnap ) forceSnap < 0 && i--;\n\t\t\t\telse if ( lPos < mid ) i--;\n\t\t\t}\n\t\t\t\n\t\t\tif ( _.conf.maxJump && is.number(_.currentWayPointIndex) ) {\n\t\t\t\tlet d = (i - _.currentWayPointIndex);\n\t\t\t\t//console.log('Inertia::_doSnap:154: ', i, d);\n\t\t\t\tif ( abs(d) > _.conf.maxJump ) {\n\t\t\t\t\t//console.log('max: ', i, d);\n\t\t\t\t\ti = _.currentWayPointIndex + signOf(d) * _.conf.maxJump;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget = _.wayPoints[i].at;\n\t\t\t\n\t\t\tif ( _.conf.willSnap ) {\n\t\t\t\t_.conf.willSnap(i, _.wayPoints[i]);\n\t\t\t}\n\t\t\t\n\t\t\t_.lastInertiaPos = _.lastInertiaPos || 0;\n\t\t\ttarget = target - (_.pos - _.lastInertiaPos) - loopDec;\n\t\t\t_.targetDuration = max(50, min(maxDuration, abs((_.targetDuration / _.targetDist) * target))) || 0;\n\t\t\t//console.log(\"do snap\", i, target, loopDec);\n\t\t\t_.targetDist = target;\n\t\t\t_.targetWayPoint = _.wayPoints[i];\n\t\t\t_.targetWayPointIndex = i;\n\t\t}\n\t\telse {\n\t\t\ttarget = ~~(_.pos - _.lastInertiaPos);\n\t\t\t\n\t\t\tif ( !_.conf.infinite ) {\n\t\t\t\tif ( target > _.max ) {\n\t\t\t\t\ttarget = _.max - target;\n\t\t\t\t\t_.targetDuration = min(maxDuration, abs((_.targetDuration / _.targetDist) * target));\n\t\t\t\t\t_.targetDist = target;\n\t\t\t\t}\n\t\t\t\telse if ( target < _.min ) {\n\t\t\t\t\ttarget = _.min - target;\n\t\t\t\t\t_.targetDuration = min(maxDuration, abs((_.targetDuration / _.targetDist) * target));\n\t\t\t\t\t_.targetDist = target;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\tsetBounds( min, max ) {\n\t\tlet _ = this._;\n\t\t//console.log('Inertia::setBounds:245: ', min, max);\n\t\t_.min = min;\n\t\t_.max = max;\n\t}\n\t\n\tisInbound( nextPos ) {\n\t\tlet _ = this._, loop,\n\t\t delta = _.lastHoldPos !== undefined ? nextPos - _.lastHoldPos : 0,\n\t\t pos = (_.targetDist || 0) + (_.pos - (_.lastInertiaPos || 0)) + delta;\n\t\t//if ( _.conf.infinite ) return false;\n\t\t//\n\t\t//if ( _.conf.shouldLoop ) {\n\t\t//\twhile ( (loop = _.conf.shouldLoop(nextValue)) ) {\n\t\t//!(pos >= _.min && pos <= _.max) && console.warn(\"out\", _.pos, pos, delta);\n\t\t//\t\tpos += loop;\n\t\t//\t}\n\t\t//}\n\t\treturn pos >= _.min && pos <= _.max;\n\t}\n\t\n}\n","/*\r\n * The MIT License (MIT)\r\n * Copyright (c) 2020. Nathanael Braun\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n *\r\n * @author : Nathanael Braun\r\n * @contact : n8tz.js@gmail.com\r\n */\r\n\r\nimport * as easingFn from \"d3-ease\";\r\nimport deepEqual from \"fast-deep-equal\";\r\nimport is from \"is\";\r\nimport React from \"react\";\r\nimport ReactDom from \"react-dom\";\r\nimport TweenerContext\r\n from \"../comps/TweenerContext\";\r\nimport {clearTweenableValue, deMuxLine, deMuxTween, muxToCss} from \"../utils/css\";\r\nimport tweenAxis\r\n from \"../utils/CssTweenAxis\";\r\nimport domUtils from \"../utils/dom\";\r\nimport Inertia from '../utils/inertia';\r\n\r\n\r\nlet isBrowserSide = (new Function(\"try {return this===window;}catch(e){ return false;}\"))(),\r\n isArray = is.array,\r\n _live, lastTm, _running = [];\r\n\r\n// Axis Interpolation timer ( not the rendering loop ! )\r\nconst Runner = {\r\n\trun : function ( tl, ctx, duration, cb ) {\r\n\t\tlet apply = ( pos, size ) => tl.go(pos / size, ctx);\r\n\t\t_running.push({ apply, duration, cpos: 0, cb });\r\n\t\ttl.go(0, ctx, true);//reset tl\r\n\t\t\r\n\t\tif ( !_live ) {\r\n\t\t\t_live = true;\r\n\t\t\tlastTm = Date.now();\r\n\t\t\t// console.log(\"TL runner On\");\r\n\t\t\tsetTimeout(this._tick, 16);\r\n\t\t}\r\n\t},\r\n\t_tick: function _tick() {\r\n\t\tlet i = 0, o, tm = Date.now(), delta = tm - lastTm;\r\n\t\tlastTm = tm;\r\n\t\tfor ( ; i < _running.length; i++ ) {\r\n\t\t\t_running[i].cpos = Math.min(delta + _running[i].cpos, _running[i].duration);//cpos\r\n\t\t\t_running[i].apply(\r\n\t\t\t\t_running[i].cpos, _running[i].duration\r\n\t\t\t);\r\n\t\t\t// console.log(\"TL runner \",_running[i][3]);\r\n\t\t\tif ( _running[i].cpos == _running[i].duration ) {\r\n\t\t\t\t\r\n\t\t\t\t_running[i].cb && setTimeout(_running[i].cb);\r\n\t\t\t\t_running.splice(i, 1), i--;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tif ( _running.length )\r\n\t\t\tsetTimeout(_tick, 16);\r\n\t\telse {\r\n\t\t\t// console.log(\"TL runner Off\");\r\n\t\t\t_live = false;\r\n\t\t}\r\n\t},\r\n};\r\n/**\r\n * The main tweener component\r\n */\r\nexport default class Tweener extends React.Component {\r\n\t\r\n\tconstructor( props ) {\r\n\t\tsuper(...arguments);\r\n\t\tlet _ = this._ = {\r\n\t\t\trefs : {},\r\n\t\t\tmuxByTarget: {},\r\n\t\t};\r\n\t\t_.box = {\r\n\t\t\tx: 100,\r\n\t\t\ty: 100,\r\n\t\t\tz: 800\r\n\t\t};\r\n\t\tthis.__isTweener = true;\r\n\t\t_._rafLoop = this._rafLoop.bind(this);\r\n\t\t_.rootRef = this.props.forwardedRef || React.createRef();\r\n\t\t_.options = {\r\n\t\t\tmaxClickTm : 200,\r\n\t\t\tmaxClickOffset: 5,\r\n\t\t\t...(props.tweenerOptions || {})\r\n\t\t};\r\n\t\t_.tweenRefCSS = {};\r\n\t\t_.tweenRefs = {};\r\n\t\t_.tweenRefMaps = {};\r\n\t\t_.iMapOrigin = {};\r\n\t\t_.tweenRefInitialData = {};\r\n\t\t_.tweenEnabled = true;\r\n\t\t_.tweenRefOrigin = {};\r\n\t\t_.tweenRefOriginCss = {};\r\n\t\t_.muxDataByTarget = _.muxDataByTarget || {};\r\n\t\t_.tweenRefDemuxed = _.tweenRefDemuxed || {};\r\n\t\t_.tweenRefTargets = _.tweenRefTargets || [];\r\n\t\t_.runningAnims = _.runningAnims || [];\r\n\t\t\r\n\t\t_.scrollHook = [];\r\n\t\t_.activeInertia = [];\r\n\t\tisBrowserSide && window.addEventListener(\r\n\t\t\t\"resize\",\r\n\t\t\tthis._.onResize = ( e ) => {//@todo\r\n\t\t\t\tthis._updateBox();\r\n\t\t\t\tthis._updateTweenRefs();\r\n\t\t\t\t_.rootRef?.current?.windowDidResize?.(e);\r\n\t\t\t});\r\n\t}\r\n\t\r\n\taxes = {};\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// -------------------- TweenRefs utils -----------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t/**\r\n\t * Register tweenable element\r\n\t * return its current style\r\n\t * @param id\r\n\t * @param iStyle\r\n\t * @param iMap\r\n\t * @param pos\r\n\t * @param noref\r\n\t * @param mapReset\r\n\t * @returns {style,ref}\r\n\t */\r\n\ttweenRef( id, iStyle = {}, iMap = {}, pos, noref, mapReset ) {// ref initial style\r\n\t\t\r\n\t\t\r\n\t\tlet _ = this._,\r\n\t\t tweenableMap = {};\r\n\t\t\r\n\t\tlet initials = {};\r\n\t\tif ( !_.tweenRefs[id] )\r\n\t\t\t_.tweenRefTargets.push(id);\r\n\t\t\r\n\t\t//debugger\r\n\t\t//console.warn('ref ', id, { ...iMap })\r\n\t\t\r\n\t\tif ( _.tweenRefs[id] && (\r\n\t\t\tmapReset\r\n\t\t\t|| (_.iMapOrigin[id] !== iMap && !deepEqual(iMap, _.iMapOrigin[id]))\r\n\t\t\t|| (_.tweenRefOriginCss[id] !== iStyle && !deepEqual(iStyle, _.tweenRefOriginCss[id]))\r\n\t\t) ) {\r\n\t\t\t// hot switch initial values\r\n\t\t\t//console.warn('ref exist & style is !==', id, iStyle,\r\n\t\t\t// _.tweenRefOriginCss[id], mapReset)\r\n\t\t\t_.iMapOrigin[id] = iMap;\r\n\t\t\t_.tweenRefOriginCss[id] = iStyle;\r\n\t\t\tiStyle = iStyle || {};\r\n\t\t\tiMap = iMap || {};\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tiStyle = { ...iStyle, ...deMuxTween(iMap, tweenableMap, initials, _.muxDataByTarget[id], _.muxByTarget[id], false, true) };\r\n\t\t\t\r\n\t\t\t//console.log(\"update ref\", id)\r\n\t\t\t\r\n\t\t\t// minus initial values\r\n\t\t\tObject.keys(_.tweenRefOrigin[id])\r\n\t\t\t .forEach(\r\n\t\t\t\t key => (_.tweenRefMaps[id][key] -= _.tweenRefOrigin[id][key])\r\n\t\t\t );\r\n\t\t\t// set defaults values in case of\r\n\t\t\tObject.keys(initials)\r\n\t\t\t .forEach(\r\n\t\t\t\t key => (_.tweenRefMaps[id][key] = is.number(_.tweenRefMaps[id][key])\r\n\t\t\t\t ? _.tweenRefMaps[id][key]\r\n\t\t\t\t : initials[key])\r\n\t\t\t );\r\n\t\t\t// add new initial values\r\n\t\t\tObject.keys(tweenableMap)\r\n\t\t\t .forEach(\r\n\t\t\t\t key => (_.tweenRefMaps[id][key] += tweenableMap[key])\r\n\t\t\t );\r\n\t\t\t\r\n\t\t\tObject.keys(_.tweenRefOrigin[id])// unset\r\n\t\t\t .forEach(\r\n\t\t\t\t key => {\r\n\t\t\t\t\t clearTweenableValue(key, key, _.tweenRefMaps[id], _.tweenRefCSS[id], _.muxDataByTarget[id], _.muxByTarget[id])\r\n\t\t\t\t }\r\n\t\t\t );\r\n\t\t\t_.tweenRefOrigin[id] = { ...tweenableMap };\r\n\t\t\t\r\n\t\t\tmuxToCss(_.tweenRefMaps[id], _.tweenRefCSS[id], _.muxByTarget[id], _.muxDataByTarget[id], _.box);\r\n\t\t\tthis._updateTweenRef(id, true);\r\n\t\t}\r\n\t\telse if ( !_.tweenRefs[id] ) {\r\n\t\t\t//console.log(\"init ref\", id)\r\n\t\t\t\r\n\t\t\t_.iMapOrigin[id] = iMap;\r\n\t\t\tiStyle = iStyle || {};\r\n\t\t\tiMap = iMap || {};\r\n\t\t\t\r\n\t\t\t_.tweenRefs[id] = true;\r\n\t\t\t_.muxByTarget[id] = _.muxByTarget[id] || {};\r\n\t\t\t_.muxDataByTarget[id] = _.muxDataByTarget[id] || {};\r\n\t\t\t\r\n\t\t\t_.tweenRefOriginCss[id] = iStyle;\r\n\t\t\t\r\n\t\t\t_.tweenRefMaps[id] = _.tweenRefMaps[id] || {};\r\n\t\t\tif ( _.tweenRefOrigin[id] ) {\r\n\t\t\t\t//debugger\r\n\t\t\t\t// minus initial values from axis pre init\r\n\t\t\t\t//Object.keys(_.tweenRefOrigin[id])\r\n\t\t\t\t// .forEach(\r\n\t\t\t\t//\t key => (_.tweenRefMaps[id][key] -= _.tweenRefOrigin[id][key])\r\n\t\t\t\t// );\r\n\t\t\t\tiStyle = { ...iStyle, ...deMuxTween(iMap, tweenableMap, initials, _.muxDataByTarget[id], _.muxByTarget[id], false, true) };\r\n\t\t\t\t\r\n\t\t\t\t//// set defaults values in case of\r\n\t\t\t\tObject.keys(initials)\r\n\t\t\t\t .forEach(\r\n\t\t\t\t\t key => (_.tweenRefMaps[id][key] = is.number(_.tweenRefMaps[id][key])\r\n\t\t\t\t\t ? _.tweenRefMaps[id][key] - initials[key]\r\n\t\t\t\t\t : 0)\r\n\t\t\t\t );\r\n\t\t\t\t//// add new initial values\r\n\t\t\t\tObject.keys(tweenableMap)\r\n\t\t\t\t .forEach(\r\n\t\t\t\t\t key => (_.tweenRefMaps[id][key] += tweenableMap[key])\r\n\t\t\t\t );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tiStyle = { ...iStyle, ...deMuxTween(iMap, tweenableMap, initials, _.muxDataByTarget[id], _.muxByTarget[id]) };\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// init / reset or get the tweenable view\r\n\t\t\t\ttweenableMap = Object.assign({}, initials, tweenableMap || {});\r\n\t\t\t\t\r\n\t\t\t\t// set defaults values in case of\r\n\t\t\t\t// add new initial values\r\n\t\t\t\tObject.keys(tweenableMap)\r\n\t\t\t\t .forEach(\r\n\t\t\t\t\t key => (_.tweenRefMaps[id][key] = (_.tweenRefMaps[id][key] || 0) + tweenableMap[key])\r\n\t\t\t\t );\r\n\t\t\t}\r\n\t\t\t_.tweenRefOrigin[id] = { ...tweenableMap };\r\n\t\t\t_.tweenRefCSS[id] = iStyle;\r\n\t\t\ttweenableMap = _.tweenRefMaps[id];\r\n\t\t\tmuxToCss(tweenableMap, iStyle, _.muxByTarget[id], _.muxDataByTarget[id], _.box);\r\n\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//console.log(\"maj ref\", id)\r\n\t\t\t\r\n\t\t\tmuxToCss(_.tweenRefMaps[id], _.tweenRefCSS[id], _.muxByTarget[id], _.muxDataByTarget[id], _.box);\r\n\t\t}\r\n\t\t//console.log('tweenRef::tweenRef:519: ', id, { ..._.muxDataByTarget[id] }, {\r\n\t\t// ..._.tweenRefCSS[id] });\r\n\t\tif ( noref )\r\n\t\t\treturn {\r\n\t\t\t\tstyle: { ..._.tweenRefCSS[id] }\r\n\t\t\t};\r\n\t\telse\r\n\t\t\treturn {\r\n\t\t\t\tstyle: { ..._.tweenRefCSS[id] },\r\n\t\t\t\tref : node => (_.refs[id] = node)\r\n\t\t\t};\r\n\t}\r\n\t\r\n\t/**\r\n\t * Delete tweenable element\r\n\t * @param id\r\n\t */\r\n\trmTweenRef( id ) {\r\n\t\tif ( this._.tweenRefs[id] ) {\r\n\t\t\tthis._.tweenRefTargets.splice(this._.tweenRefTargets.indexOf(id), 1);\r\n\t\t\tdelete this._.tweenRefs[id];\r\n\t\t\tdelete this._.muxByTarget[id];\r\n\t\t\tdelete this._.muxDataByTarget[id];\r\n\t\t\tdelete this._.iMapOrigin[id];\r\n\t\t\tdelete this._.tweenRefOrigin[id];\r\n\t\t\tdelete this._.tweenRefCSS[id];\r\n\t\t\tdelete this._.tweenRefMaps[id];\r\n\t\t\tdelete this._.refs[id];\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Reset tweenRefs\r\n\t * @param targets\r\n\t */\r\n\tresetTweenable( ...targets ) {\r\n\t\tlet _ = this._;\r\n\t\ttargets.forEach(\r\n\t\t\t( t ) => {\r\n\t\t\t\tthis.tweenRef(t, _.tweenRefOriginCss[t], _.iMapOrigin[t], null, null, true)\r\n\t\t\t}\r\n\t\t);\r\n\t\tthis._updateTweenRefs();\r\n\t}\r\n\t\r\n\t/**\r\n\t * Update tweenRefs style ( anims & axis will still update the ref )\r\n\t * @param target\r\n\t * @param style\r\n\t * @param postPone\r\n\t * @returns {*}\r\n\t */\r\n\tupdateRefStyle( target, style, postPone ) {\r\n\t\tlet _ = this._, initials = {}, pureCss;\r\n\t\t\r\n\t\t// allow batched stykes updates\r\n\t\tif ( isArray(target) && isArray(style) )\r\n\t\t\treturn target.map(( m, i ) => this.updateRefStyle(m, style[i], postPone));\r\n\t\tif ( isArray(target) )\r\n\t\t\treturn target.map(( m ) => this.updateRefStyle(m, style, postPone));\r\n\t\t\r\n\t\tif ( !_.tweenRefMaps[target] )\r\n\t\t\treturn console.warn(\"React-Voodoo : Can't update styles of an unknown Node id '\", target, \"'\");\r\n\t\t\r\n\t\tpureCss = deMuxTween(style, _.tweenRefMaps[target], initials, _.muxDataByTarget[target], _.muxByTarget[target]);\r\n\t\tObject.assign(_.tweenRefCSS[target], pureCss);\r\n\t\tObject.assign(_.tweenRefOriginCss[target], pureCss);\r\n\t\tmuxToCss(_.tweenRefMaps[target], _.tweenRefCSS[target], _.muxByTarget[target], _.muxDataByTarget[target], _.box);\r\n\t\tthis._updateTweenRef(target, true);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Retrieve the tween ref dom node\r\n\t * @param id\r\n\t * @returns {*}\r\n\t */\r\n\tgetTweenableRef( id ) {\r\n\t\ttry {\r\n\t\t\treturn this._.refs[id] && ReactDom.findDOMNode(this._.refs[id]);\r\n\t\t} catch ( e ) {\r\n\t\t\ttry {\r\n\t\t\t\treturn this._.refs[id]._.rootRef.current\r\n\t\t\t} catch ( e ) {\r\n\t\t\t\tconsole.warn(\"react-voodoo: Can't find voodooNode \", id, e)\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get the root dom node of the tweener element\r\n\t * @returns {*}\r\n\t */\r\n\tgetRootNode() {\r\n\t\ttry {\r\n\t\t\treturn this.getTweenableRef(this._.rootRef)\r\n\t\t\t\t|| this.isMountedFromHook && this._.rootRef && this._.rootRef.current\r\n\t\t\t\t|| ReactDom.findDOMNode(this);\r\n\t\t} catch ( e ) {\r\n\t\t\treturn this._.rootRef && this._.rootRef.current;\r\n\t\t}\r\n\t}\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// -------------------- Pushable anims ------------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t/**\r\n\t * Push anims\r\n\t * @param anim\r\n\t * @param then\r\n\t * @param skipInit\r\n\t * @returns {tweenAxis}\r\n\t */\r\n\tpushAnim( anim, then, keepResults = true ) {\r\n\t\tlet sl,\r\n\t\t initial,\r\n\t\t _ = this._,\r\n\t\t initials = {},\r\n\t\t fail;\r\n\t\t\r\n\t\tif ( isArray(anim) ) {\r\n\t\t\tsl = anim;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsl = anim.anims;\r\n\t\t\tinitial = anim.initial;\r\n\t\t}\r\n\t\t\r\n\t\tif ( !(sl instanceof tweenAxis) ) {\r\n\t\t\t// tweenLine, initials, data, demuxers\r\n\t\t\tsl = deMuxLine(sl, initials, this._.muxDataByTarget, this._.muxByTarget);\r\n\t\t\tsl = new tweenAxis(sl, this._.tweenRefMaps);\r\n\t\t\tObject.keys(initials)\r\n\t\t\t .forEach(\r\n\t\t\t\t id => (\r\n\t\t\t\t\t this._.tweenRefMaps[id] &&\r\n\t\t\t\t\t Object.assign(this._.tweenRefMaps[id], {\r\n\t\t\t\t\t\t ...initials[id],\r\n\t\t\t\t\t\t ...this._.tweenRefMaps[id]\r\n\t\t\t\t\t }) || (fail = console.warn(\"react-voodoo : Can't find tween target \", id, \" in \", Tweener.displayName) || true)\r\n\t\t\t\t )\r\n\t\t\t )\r\n\t\t}\r\n\t\tif ( fail )\r\n\t\t\treturn;\r\n\t\t\r\n\t\t\r\n\t\treturn new Promise(\r\n\t\t\tresolve => {\r\n\t\t\t\t\r\n\t\t\t\t// start timer launch @todo\r\n\t\t\t\tsl.run(this._.tweenRefMaps, () => {\r\n\t\t\t\t\tlet i = this._.runningAnims.indexOf(sl);\r\n\t\t\t\t\tif ( i != -1 )\r\n\t\t\t\t\t\tthis._.runningAnims.splice(i, 1);\r\n\t\t\t\t\t//console.log( _.muxDataByTarget)\r\n\t\t\t\t\tObject.keys(initials)// unset\r\n\t\t\t\t\t .forEach(\r\n\t\t\t\t\t\t id => {\r\n\t\t\t\t\t\t\t Object.keys(initials[id])// unset\r\n\t\t\t\t\t\t\t .forEach(\r\n\t\t\t\t\t\t\t\t rkey => {\r\n\t\t\t\t\t\t\t\t\t // todo\r\n\t\t\t\t\t\t\t\t\t clearTweenableValue(rkey, rkey, _.tweenRefMaps[id], _.tweenRefCSS[id], _.muxDataByTarget[id], _.muxByTarget[id], keepResults)\r\n\t\t\t\t\t\t\t\t })\r\n\t\t\t\t\t\t });\r\n\t\t\t\t\tsl.destroy();\r\n\t\t\t\t\tresolve(sl);\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tthis._.runningAnims.push(sl);\r\n\t\t\t\t\r\n\t\t\t\tif ( !this._.live ) {\r\n\t\t\t\t\tthis._.live = true;\r\n\t\t\t\t\trequestAnimationFrame(this._._rafLoop = this._._rafLoop || this._rafLoop.bind(this));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t).then(sl => (then && then(sl)));\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n\t/**\r\n\t * Update tweenRef raw tweened values\r\n\t * @param id\r\n\t * @param map\r\n\t * @param reset\r\n\t */\r\n\tapplyTweenState( id, map, reset ) {\r\n\t\tlet tmap = {}, initials = {};\r\n\t\tdeMuxTween(map, tmap, initials, this._.muxDataByTarget[id], this._.muxByTarget[id], true)\r\n\t\tObject.keys(tmap).map(\r\n\t\t\t( p ) => this._.tweenRefMaps[id][p] = (!reset && this._.tweenRefMaps[id][p] || initials[p]) + tmap[p]\r\n\t\t);\r\n\t}\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// ------------------ Scrollable axes -------------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t/**\r\n\t * Will init / update a scrollable axis\r\n\t * @param axe\r\n\t * @param _inertia\r\n\t * @param _scrollableArea\r\n\t * @param _scrollableBounds\r\n\t * @param _scrollableWindow\r\n\t * @param defaultPosition\r\n\t * @param scrollFirst\r\n\t * @param reset\r\n\t */\r\n\tinitAxis( axe, {\r\n\t\tinertia : _inertia,\r\n\t\tscrollableArea : _scrollableArea = 0,\r\n\t\tscrollableBounds: _scrollableBounds,\r\n\t\tscrollableWindow: _scrollableWindow,\r\n\t\tdefaultPosition,\r\n\t\tscrollFirst\r\n\t}, reset ) {\r\n\t\t\r\n\t\t\r\n\t\tlet _ = this._,\r\n\t\t dim = this.axes[axe],\r\n\t\t scrollableBounds = _scrollableBounds,\r\n\t\t scrollPos = !reset && dim\r\n\t\t ? dim.scrollPos\r\n\t\t : defaultPosition || scrollableBounds && scrollableBounds.min || 0,\r\n\t\t scrollableArea = Math.max(dim && dim.scrollableArea || 0, _scrollableArea),\r\n\t\t scrollableWindow = Math.max(dim && dim.scrollableWindow || 0, _scrollableWindow),\r\n\t\t targetPos = dim ? dim.targetPos : scrollPos,\r\n\t\t inertia = (\r\n\t\t\t dim ? dim.inertia : new Inertia({// todo mk pure\r\n\t\t\t\t disabled: !_inertia,\r\n\t\t\t\t ...(_inertia || {}),\r\n\t\t\t\t value: scrollPos\r\n\t\t\t })),\r\n\t\t nextDescr = {\r\n\t\t\t //...(_inertia || {}),\r\n\t\t\t scrollFirst,\r\n\t\t\t tweenAxis: dim && dim.tweenAxis || [],\r\n\t\t\t scrollPos,\r\n\t\t\t targetPos,\r\n\t\t\t inertia,\r\n\t\t\t scrollableWindow,\r\n\t\t\t scrollableBounds,\r\n\t\t\t scrollableArea,\r\n\t\t\t scrollTo : ( pos, tm, ease, noEvents ) => {\r\n\t\t\t\t return this.scrollTo(pos, tm, axe, ease, noEvents)\r\n\t\t\t }\r\n\t\t };\r\n\t\t\r\n\t\tthis.axes[axe] = nextDescr;\r\n\t\t!_inertia && (inertia._.disabled = true);\r\n\t\t(_inertia) && inertia && !inertia.active && (inertia._.pos = scrollPos);\r\n\t\t(_inertia) && inertia && (inertia.updateConf(_inertia));\r\n\t\tif ( inertia && scrollableBounds )\r\n\t\t\tinertia.setBounds?.(scrollableBounds.min, scrollableBounds.max);\r\n\t\telse\r\n\t\t\tinertia && inertia.setBounds?.(0, scrollableArea)\r\n\t}\r\n\t\r\n\t_getAxis( axe = \"scrollY\" ) {\r\n\t\tlet _ = this._;\r\n\t\t\r\n\t\tthis.axes[axe] = this.axes[axe] || {\r\n\t\t\ttweenAxis : [],\r\n\t\t\tscrollPos : _.options.initialScrollPos && _.options.initialScrollPos[axe] || 0,\r\n\t\t\ttargetPos : 0,\r\n\t\t\tscrollableWindow: 0,\r\n\t\t\tscrollableArea : 0,\r\n\t\t\tinertia : new Inertia({\r\n\t\t\t\t value: _.options.initialScrollPos && _.options.initialScrollPos[axe] || 0,\r\n\t\t\t\t ...(_.options.axes && _.options.axes[axe] && _.options.axes[axe].inertia || {})\r\n\t\t\t }),\r\n\t\t\tscrollTo : ( pos, tm, ease, noEvents ) => {\r\n\t\t\t\treturn this.scrollTo(pos, tm, axe, ease, noEvents)\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\treturn this.axes[axe];\r\n\t}\r\n\t\r\n\t/**\r\n\t * Return axis infos\r\n\t */\r\n\tgetAxisState( axe ) {\r\n\t\tlet _ = this._, state = {};\r\n\t\tthis.axes && Object.keys(this.axes)\r\n\t\t .forEach(\r\n\t\t\t axe => (state[axe] = this.axes[axe].targetPos || this.axes[axe].scrollPos)\r\n\t\t );\r\n\t\treturn state;\r\n\t}\r\n\t\r\n\tgetScrollPos( axis = \"scrollY\" ) {\r\n\t\tlet _ = this._, state = {};\r\n\t\treturn this.axes[axis]\r\n\t\t ? this.axes[axis].targetPos || this.axes[axis].scrollPos\r\n\t\t : 0\r\n\t}\r\n\t\r\n\t/**\r\n\t * Do scroll an axis\r\n\t * @param newPos\r\n\t * @param ms\r\n\t * @param axe\r\n\t * @param ease\r\n\t * @returns {Promise<any | never>}\r\n\t */\r\n\tscrollTo( newPos, ms = 0, axe = \"scrollY\", ease, noEvents ) {\r\n\t\tlet _ = this._;\r\n\t\tif ( !isBrowserSide ) {\r\n\t\t\tconsole.warn(\"React-voodoo : scrollTo can't be used serverside, use Axis defaultPosition prop to set initial axes position\");\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t\treturn new Promise(\r\n\t\t\t(( resolve, reject ) => {\r\n\t\t\t\tif ( this.axes && this.axes[axe] ) {\r\n\t\t\t\t\tlet oldPos = this.axes[axe].targetPos,\r\n\t\t\t\t\t setPos = pos => {\r\n\t\t\t\t\t\t //console.log('TweenableComp::setPos:514: ', newPos,pos, ms,\r\n\t\t\t\t\t\t // axe);\r\n\t\t\t\t\t\t pos = (~~(pos * 10000)) / 10000;\r\n\t\t\t\t\t\t this.axes[axe].targetPos = this.axes[axe].scrollPos = pos;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t //this.axes[axe].inertia._doSnap()\r\n\t\t\t\t\t\t if ( ~~pos !== oldPos ) {\r\n\t\t\t\t\t\t\t this.axisDidScroll(~~pos, axe);\r\n\t\t\t\t\t\t\t _.rootRef?.current?.componentDidScroll?.(~~pos, axe);\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t this._updateTweenRefs()\r\n\t\t\t\t\t };\r\n\t\t\t\t\t\r\n\t\t\t\t\tnewPos = Math.max(0, newPos);\r\n\t\t\t\t\tnewPos = Math.min(newPos, this.axes[axe].scrollableArea || 0);\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.axes[axe].targetPos = newPos;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( !ms ) {\r\n\t\t\t\t\t\tthis.axes?.[axe]?.inertia?.setPos(newPos);\r\n\t\t\t\t\t\tif ( this.axes?.[axe]?.inertia?._ ) {\r\n\t\t\t\t\t\t\tnewPos = this.axes?.[axe]?.inertia?._.pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.axes[axe].tweenAxis.forEach(\r\n\t\t\t\t\t\t\tsl => sl.goTo(newPos, _.tweenRefMaps, false, noEvents)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tsetPos(newPos);\r\n\t\t\t\t\t\tresolve()\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis._runScrollGoTo(axe, newPos, ms, easingFn[ease], noEvents, setPos, resolve)\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( !_.live ) {\r\n\t\t\t\t\t\t_.live = true;\r\n\t\t\t\t\t\trequestAnimationFrame(_._rafLoop);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})).then(\r\n\t\t\tp => {\r\n\t\t\t\tthis.axes?.[axe]?.inertia?._detectCurrentSnap();\r\n\t\t\t}\r\n\t\t)\r\n\t}\r\n\t\r\n\t/**\r\n\t * Add scrollable tween axis (scrollable anims) to a global axis\r\n\t * @param anim\r\n\t * @param axe\r\n\t * @param size\r\n\t * @returns {tweenAxis}\r\n\t */\r\n\taddScrollableAnim( anim, axe = \"scrollY\", size ) {\r\n\t\tlet sl,\r\n\t\t _ = this._,\r\n\t\t initials = {},\r\n\t\t dim = this._getAxis(axe);\r\n\t\t\r\n\t\tif ( isArray(anim) ) {\r\n\t\t\tsl = anim;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsl = anim.anims;\r\n\t\t\tsize = anim.length;\r\n\t\t}\r\n\t\t\r\n\t\t//console.warn(\"add scrollable\")\r\n\t\tif ( !(sl instanceof tweenAxis) ) {\r\n\t\t\tsl = deMuxLine(sl, initials, this._.muxDataByTarget, this._.muxByTarget);\r\n\t\t\t\r\n\t\t\tsl = new tweenAxis(sl, _.tweenRefMaps);\r\n\t\t\tsl.initials = initials;\r\n\t\t\t\r\n\t\t\tObject.keys(initials)\r\n\t\t\t .forEach(\r\n\t\t\t\t id => {\r\n\t\t\t\t\t _.tweenRefOrigin[id] = _.tweenRefOrigin[id] || {};\r\n\t\t\t\t\t\r\n\t\t\t\t\t _.tweenRefMaps[id] = _.tweenRefMaps[id] || {};\r\n\t\t\t\t\t Object.assign(this._.tweenRefMaps[id], {\r\n\t\t\t\t\t\t ...initials[id],\r\n\t\t\t\t\t\t ...this._.tweenRefMaps[id]\r\n\t\t\t\t\t })\r\n\t\t\t\t }\r\n\t\t\t );\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// init scroll\r\n\t\tdim.tweenAxis.push(sl);\r\n\t\tdim.scrollPos = dim.scrollPos || 0;\r\n\t\tdim.scrollableArea = dim.scrollableArea || 0;\r\n\t\tdim.scrollableArea = Math.max(dim.scrollableArea, sl.duration);\r\n\t\t\r\n\t\tif ( !dim.scrollableBounds )\r\n\t\t\tdim.inertia?.setBounds(0, dim.scrollableArea);\r\n\t\t\r\n\t\tsl.goTo(dim.scrollPos, this._.tweenRefMaps, false, true);\r\n\t\tthis._updateTweenRefs();\r\n\t\treturn sl;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Remove a tweenAxis object from a component scrollable axis\r\n\t * @param sl\r\n\t * @param axe\r\n\t */\r\n\trmScrollableAnim( sl, axe = \"scrollY\" ) {\r\n\t\tlet _ = this._, found,\r\n\t\t dim = this._getAxis(axe), twAxis;\r\n\t\tlet i = dim.tweenAxis.indexOf(sl);\r\n\t\tif ( i !== -1 ) {\r\n\t\t\t\r\n\t\t\t//dim.tweenAxis[i].destroy();\r\n\t\t\tdim.tweenAxis.splice(i, 1);\r\n\t\t\tdim.scrollableArea = Math.max(...dim.tweenAxis.map(tl => tl.duration), 0);\r\n\t\t\tif ( !dim.scrollableBounds )\r\n\t\t\t\tdim.inertia?.setBounds(0, dim.scrollableArea || 0);\r\n\t\t\t//console.warn(\"rm scrollable\", { ...this._.tweenRefMaps })\r\n\t\t\tsl.goTo(0, this._.tweenRefMaps, false, true);\r\n\t\t\t//console.warn(\"rm scrollable\", { ...this._.tweenRefMaps[\"card\"] })\r\n\t\t\t\r\n\t\t\tObject.keys(sl.initials)// unset\r\n\t\t\t .forEach(\r\n\t\t\t\t id => {\r\n\t\t\t\t\t Object.keys(sl.initials[id])// unset\r\n\t\t\t\t\t .forEach(\r\n\t\t\t\t\t\t rkey => {\r\n\t\t\t\t\t\t\t //debugger\r\n\t\t\t\t\t\t\t clearTweenableValue(rkey, rkey, _.tweenRefMaps[id], _.tweenRefCSS[id], _.muxDataByTarget[id], _.muxByTarget[id])\r\n\t\t\t\t\t\t\t //!_.tweenRefCSS[id] &&\r\n\t\t\t\t\t\t\t //_.refs[id] && _.refs[id].style &&\r\n\t\t\t\t\t\t\t // _.refs[id].style[rkey] &&\r\n\t\t\t\t\t\t\t // (_.refs[id].style[rkey] = null);\r\n\t\t\t\t\t\t })\r\n\t\t\t\t });\r\n\t\t\tdelete sl.initials;\r\n\t\t\tsl.destroy();\r\n\t\t\tfound = true;\r\n\t\t\tthis._updateTweenRefs();\r\n\t\t}\r\n\t\t!found && console.warn(\"react-voodoo: Axis not found : \", axe)\r\n\t}\r\n\t\r\n\t\r\n\t/**\r\n\t * @private fn to push scrollTo\r\n\t * @param axe\r\n\t * @param to\r\n\t * @param tm\r\n\t * @param easing\r\n\t * @param tick\r\n\t * @param cb\r\n\t * @private\r\n\t */\r\n\t_runScrollGoTo( axe, to, tm, easing = x => x, noEvents, tick, cb ) {\r\n\t\tlet from = this.axes[axe].scrollPos,\r\n\t\t length = to - from;\r\n\t\t\r\n\t\t_running.push(\r\n\t\t\t{\r\n\t\t\t\tapply : ( pos, max ) => {\r\n\t\t\t\t\tlet x = (from + (easing(pos / max)) * length);\r\n\t\t\t\t\tif ( this._.tweenEnabled ) {\r\n\t\t\t\t\t\t// allow shouldLoop on scrollTo\r\n\t\t\t\t\t\tthis.axes?.[axe]?.inertia?.setPos(x);\r\n\t\t\t\t\t\tif ( this.axes?.[axe]?.inertia?._ ) {\r\n\t\t\t\t\t\t\tx = this.axes?.[axe]?.inertia?._.pos;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.axes[axe].tweenAxis.forEach(\r\n\t\t\t\t\t\t\tsl => sl.goTo(x, this._.tweenRefMaps, false, noEvents)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\ttick && tick(x);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tduration: tm,\r\n\t\t\t\tcpos : 0,\r\n\t\t\t\tcb\r\n\t\t\t})\r\n\t\t;\r\n\t\t\r\n\t\tif ( !_live ) {\r\n\t\t\t_live = true;\r\n\t\t\tlastTm = Date.now();\r\n\t\t\t// console.log(\"TL runner On\");\r\n\t\t\tsetTimeout(Runner._tick, 16);\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Return scrollable parent node list basing a dom node\r\n\t * @param node\r\n\t * @returns {T[]}\r\n\t */\r\n\tgetScrollableNodes( node ) {\r\n\t\tlet scrollable = domUtils.findReactParents(node), _ = this._;\r\n\t\tscrollable = _.rootRef &&\r\n\t\t\t_.rootRef.current &&\r\n\t\t\t_.rootRef.current.hookScrollableTargets &&\r\n\t\t\t_.rootRef.current.hookScrollableTargets(scrollable)\r\n\t\t\t|| scrollable;\r\n\t\t\r\n\t\treturn scrollable.map(\r\n\t\t\tid => (is.string(id)\r\n\t\t\t ? this._.refs[id] && ReactDom.findDOMNode(this._.refs[id]) || this.refs[id] || document.getElementById(id)\r\n\t\t\t : id));\r\n\t}\r\n\t\r\n\t/**\r\n\t * Hook to know if the composed element allow scrolling\r\n\t * @returns {boolean}\r\n\t */\r\n\tcomponentShouldScroll() {\r\n\t\tlet _ = this._;\r\n\t\treturn _.rootRef &&\r\n\t\t _.rootRef.current &&\r\n\t\t _.rootRef.current.componentShouldScroll ?\r\n\t\t _.rootRef.current.componentShouldScroll(...arguments) : true\r\n\t}\r\n\t\r\n\t_scrollWatcherByAxis = {};\r\n\t\r\n\t/**\r\n\t * Add scroll listener to {axisId} axis, return unwatch\r\n\t * @param axisId\r\n\t * @param listener\r\n\t * @returns {function(...[*]=)}\r\n\t */\r\n\twatchAxis( axisId, listener ) {\r\n\t\tlet byId = this._scrollWatcherByAxis;\r\n\t\tbyId[axisId] = byId[axisId] || [];\r\n\t\tbyId[axisId].push(listener);\r\n\t\treturn () => {\r\n\t\t\tlet index = byId[axisId].indexOf(listener);\r\n\t\t\tbyId[axisId].splice(index, 1);\r\n\t\t}\r\n\t}\r\n\t\r\n\taxisDidScroll( pos, axisId ) {\r\n\t\tlet watchers = this._scrollWatcherByAxis[axisId],\r\n\t\t i = watchers?.length;\r\n\t\tif ( watchers )\r\n\t\t\twhile ( i ) watchers[--i](pos);\r\n\t}\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// --------------- Inertia & scroll modifiers -----------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t/**\r\n\t * Retrieve updates from an axis inertia & apply them\r\n\t * @param dim\r\n\t * @param axe\r\n\t */\r\n\tapplyInertia( dim, axe ) {\r\n\t\tlet x = dim.inertia.update(), _ = this._;\r\n\t\t\r\n\t\tthis.axes[axe].tweenAxis.forEach(\r\n\t\t\tsl => {\r\n\t\t\t\tthis.axes[axe].targetPos = this.axes[axe].scrollPos = x;\r\n\t\t\t\tsl.goTo(x, this._.tweenRefMaps)\r\n\t\t\t}\r\n\t\t);\r\n\t\t//console.log(\"scroll at \" + x, axe, dim.inertia.active || dim.inertia.holding);\r\n\t\t//this.scrollTo(x, 0, axe);\r\n\t\t_.rootRef?.current?.componentDidScroll?.(x, axe);\r\n\t\tthis.axisDidScroll(x, axe);\r\n\t\tthis._updateTweenRefs()\r\n\t\tif ( dim.inertia.active || dim.inertia.holding ) {\r\n\t\t\tdim.inertiaFrame = setTimeout(this.applyInertia.bind(this, dim, axe), 33);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdim.inertiaFrame = null;\r\n\t\t\t//console.log(\"complete\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Return true if at least 1 of this tweener axis have it's inertia active\r\n\t * @returns {boolean}\r\n\t */\r\n\tisInertiaActive() {//todo\r\n\t\tlet _ = this._, active = false;\r\n\t\tthis.axes &&\r\n\t\tObject.keys(this.axes)\r\n\t\t .forEach(\r\n\t\t\t axe => (active = active || this.axes[axe] && this.axes[axe].inertia.active)\r\n\t\t );\r\n\t\treturn active;\r\n\t}\r\n\t\r\n\tdispatchScroll( delta, axe = \"scrollY\" ) {\r\n\t\tlet prevent,\r\n\t\t dim = this.axes[axe],\r\n\t\t oldPos = dim && dim.scrollPos,\r\n\t\t newPos = oldPos + delta;\r\n\t\t\r\n\t\tif ( dim && oldPos !== newPos ) {\r\n\t\t\t\r\n\t\t\tdim.inertia.dispatch(delta, 100);\r\n\t\t\t!dim.inertiaFrame && this.applyInertia(dim, axe);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn prevent;\r\n\t}\r\n\t\r\n\tisAxisOut( axis, v, abs ) {\r\n\t\tlet _ = this._,\r\n\t\t dim = this.axes && this.axes[axis],\r\n\t\t pos = abs ? v : dim && (dim.scrollPos + v);\r\n\t\t\r\n\t\tpos = pos && Math.round(pos);\r\n\t\t\r\n\t\treturn !dim\r\n\t\t\t|| (\r\n\t\t\t\tdim.scrollableBounds\r\n\t\t\t\t?\r\n\t\t\t\t(pos <= dim.scrollableBounds.min || pos >= dim.scrollableBounds.max)\r\n\t\t\t\t:\r\n\t\t\t\t(pos <= 0 || pos >= dim.scrollableArea)\r\n\t\t\t);\r\n\t}\r\n\t\r\n\t_doDispatch( target, dx, dy, holding ) {\r\n\t\tlet style,\r\n\t\t Comps,\r\n\t\t headTarget = target,\r\n\t\t nodeInertia,\r\n\t\t i;\r\n\t\t\r\n\t\t// check if there scrollable stuff in dom targets\r\n\t\t// get all the parents components & dom node of an dom element ( from fibers )\r\n\t\t\r\n\t\tComps = this.getScrollableNodes(headTarget);\r\n\t\t//console.log(\"dispatching \", dx, dy, Comps);\r\n\t\tfor ( i = 0; i < Comps.length; i++ ) {\r\n\t\t\t// react comp with tweener support\r\n\t\t\tif ( Comps[i].__isTweener ) {\r\n\t\t\t\t//debugger\r\n\t\t\t\t//console.log(Comps[i], dx, dy, Comps[i].isAxisOut(\"scrollX\", dx),\r\n\t\t\t\t// Comps[i].isAxisOut(\"scrollY\", dy));\r\n\t\t\t\tif ( !Comps[i].isAxisOut(\"scrollX\", dx) && (!Comps[i].componentShouldScroll || Comps[i].componentShouldScroll(\"scrollX\", dx)) ) {\r\n\t\t\t\t\tComps[i].dispatchScroll(dx, \"scrollX\", holding);\r\n\t\t\t\t\tdx = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif ( !Comps[i].isAxisOut(\"scrollY\", dy) && (!Comps[i].componentShouldScroll || Comps[i].componentShouldScroll(\"scrollY\", dy)) ) {\r\n\t\t\t\t\tComps[i].dispatchScroll(dy, \"scrollY\", holding);\r\n\t\t\t\t\tdy = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// dom element\r\n\t\t\telse if ( is.element(Comps[i]) ) {\r\n\t\t\t\tstyle = getComputedStyle(Comps[i], null)\r\n\t\t\t\tif ( /(auto|scroll)/.test(\r\n\t\t\t\t\tstyle.getPropertyValue(\"overflow\")\r\n\t\t\t\t\t+ style.getPropertyValue(\"overflow-x\")\r\n\t\t\t\t\t+ style.getPropertyValue(\"overflow-y\")\r\n\t\t\t\t)\r\n\t\t\t\t) {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t(dy < 0 && Comps[i].scrollTop !== 0)\r\n\t\t\t\t\t\t||\r\n\t\t\t\t\t\t(dy > 0 && Comps[i].scrollTop !== (Comps[i].scrollHeight - Comps[i].clientHeight))\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t//nodeInertia.y.dispatch(dy * 10)\r\n\t\t\t\t\t\t//dy = 0;\r\n\t\t\t\t\t} // let the node do this scroll\r\n\t\t\t\t\t//if ( nodeInertia.x.isOutbound(dx) ) {\r\n\t\t\t\t\t//\tnodeInertia.x.dispatch(dx * 10)\r\n\t\t\t\t\t//\tdx = 0;\r\n\t\t\t\t\t//} // let the node do this scroll\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//headTarget = headTarget.parentNode;\r\n\t\t\t\t//if ( headTarget === document || headTarget === target )\r\n\t\t\t\t//\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !dx && !dy )\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tthis._updateNodeInertia();\r\n\t\tif ( !dx && !dy )\r\n\t\t\treturn true;\r\n\t}\r\n\t\r\n\t_activateNodeInertia( node ) {\r\n\t\tlet _ = this._,\r\n\t\t i = _.activeInertia.findIndex(item => (item.target === node));\r\n\t\tif ( i === -1 ) {\r\n\t\t\t_.activeInertia.push(\r\n\t\t\t\t{\r\n\t\t\t\t\tinertia: {\r\n\t\t\t\t\t\tx: new Inertia({\r\n\t\t\t\t\t\t\t max : node.scrollWidth - node.offsetLeft,\r\n\t\t\t\t\t\t\t value: node.scrollLeft\r\n\t\t\t\t\t\t }),\r\n\t\t\t\t\t\ty: new Inertia({\r\n\t\t\t\t\t\t\t max : node.scrollHeight - node.offsetHeight,\r\n\t\t\t\t\t\t\t value: node.scrollTop\r\n\t\t\t\t\t\t })\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttarget : node\r\n\t\t\t\t});\r\n\t\t\ti = _.activeInertia.length - 1;\r\n\t\t}\r\n\t\treturn _.activeInertia[i].inertia;\r\n\t\t\r\n\t}\r\n\t\r\n\t_updateNodeInertia = () => {\r\n\t\tlet _ = this._, current, ln = _.activeInertia.length;\r\n\t\t\r\n\t\tif ( this._inertiaRaf )\r\n\t\t\tcancelAnimationFrame(this._inertiaRaf);\r\n\t\t\r\n\t\tfor ( let i = 0; ln > i; i++ ) {\r\n\t\t\tcurrent = _.activeInertia[i];\r\n\t\t\tif ( current.inertia.x.active || current.inertia.x.holding ) {\r\n\t\t\t\tcurrent.target.scrollLeft = ~~current.inertia.x.update()\r\n\t\t\t}\r\n\t\t\tif ( current.inertia.y.active || current.inertia.y.holding ) {\r\n\t\t\t\tcurrent.target.scrollTop = ~~current.inertia.y.update()\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( !current.inertia.x.active && !current.inertia.y.active && !current.inertia.x.holding && !current.inertia.y.holding ) {\r\n\t\t\t\t_.activeInertia.slice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t\tln--;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( ln !== 0 )\r\n\t\t\tthis._inertiaRaf = requestAnimationFrame(this._updateNodeInertia)\r\n\t\telse this._inertiaRaf = null;\r\n\t}\r\n\t\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// --------------- Initialization & drawers -------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\tsetRootRef( id ) {\r\n\t\tthis._.rootRef = id;\r\n\t}\r\n\t\r\n\t_updateBox() {\r\n\t\tlet node = this.getRootNode();\r\n\t\tif ( node ) {\r\n\t\t\tthis._.box.inited = true;\r\n\t\t\tthis._.box.x = node.offsetWidth;\r\n\t\t\tthis._.box.y = node.offsetHeight;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_rafLoop() {\r\n\t\tthis._updateTweenRefs();\r\n\t\tif ( this._.runningAnims.length ) {\r\n\t\t\trequestAnimationFrame(this._._rafLoop);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//this._.live && console.log(\"RAF off\", this.constructor.displayName);\r\n\t\t\tthis._.live = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\t_updateTweenRefs() {\r\n\t\tif ( this._.tweenEnabled ) {\r\n\t\t\tfor ( let i = 0, target, node, style; i < this._.tweenRefTargets.length; i++ ) {\r\n\t\t\t\ttarget = this._.tweenRefTargets[i];\r\n\t\t\t\tstyle = this._updateTweenRef(target);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t_swap = {};\r\n\t\r\n\t_updateTweenRef( target, force ) {\r\n\t\tlet node, swap = this._swap, changes;\r\n\t\tthis._.tweenRefCSS[target] &&\r\n\t\tmuxToCss(this._.tweenRefMaps[target], swap, this._.muxByTarget[target], this._.muxDataByTarget[target], this._.box);\r\n\t\tnode = this.getTweenableRef(target);\r\n\t\tif ( node ) {\r\n\t\t\tfor ( let o in this._.tweenRefCSS[target] )\r\n\t\t\t\tif ( swap[o] === undefined ) {\r\n\t\t\t\t\tnode.style[o] = this._.tweenRefCSS[target][o];\r\n\t\t\t\t\t//\t\tnode.style[o] = null;\r\n\t\t\t\t\t//\t\tdelete this._.tweenRefCSS[target][o];\r\n\t\t\t\t}\r\n\t\t\tfor ( let o in swap )\r\n\t\t\t\tif ( this._.tweenRefCSS[target].hasOwnProperty(o) ) {\r\n\t\t\t\t\tif ( force || swap[o] !== this._.tweenRefCSS[target][o] ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnode.style[o] = this._.tweenRefCSS[target][o] = swap[o];\r\n\t\t\t\t\t\t//if ( target == \"card\" ) console.log(target, o, node.style[o],\r\n\t\t\t\t\t\t// swap[o]);\r\n\t\t\t\t\t\tchanges = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdelete swap[o];\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t//if ( !changes )\r\n\t\t//console.log('no changes', target, this._.tweenRefCSS[target], !!node, force)\r\n\t\treturn this._.tweenRefCSS[target];\r\n\t}\r\n\t\r\n\t\r\n\t// ------------------------------------------------------------\r\n\t// --------------- React Hooks --------------------------------\r\n\t// ------------------------------------------------------------\r\n\t\r\n\t\r\n\tcomponentWillUnmount() {\r\n\t\tlet node = this.getRootNode();\r\n\t\tif ( this._.tweenEnabled ) {\r\n\t\t\tthis._.tweenEnabled = false;\r\n\t\t\twindow.removeEventListener(\"resize\", this._.onResize);\r\n\t\t\t\r\n\t\t\tObject.keys(this.axes).forEach(\r\n\t\t\t\taxe => {\r\n\t\t\t\t\tthis.axes[axe].inertiaFrame &&\r\n\t\t\t\t\tclearTimeout(this.axes[axe].inertiaFrame);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t\tsuper.componentWillUnmount && super.componentWillUnmount(...arguments);\r\n\t}\r\n\t\r\n\tcomponentDidMount() {\r\n\t\tlet _static = this.constructor;\r\n\t\t\r\n\t\tthis._.rendered = true;\r\n\t\tif ( this._.tweenEnabled ) {\r\n\t\t\t// debugger;\r\n\t\t\tthis._updateBox();\r\n\t\t\tthis._updateTweenRefs();\r\n\t\t}\r\n\t\tif ( _static.scrollableAnim ) {\r\n\t\t\tif ( is.array(_static.scrollableAnim) )\r\n\t\t\t\tthis.addScrollableAnim(_static.scrollableAnim);\r\n\t\t\telse\r\n\t\t\t\tObject.keys(_static.scrollableAnim)\r\n\t\t\t\t .forEach(\r\n\t\t\t\t\t axe => this.addScrollableAnim(_static.scrollableAnim[axe], axe)\r\n\t\t\t\t )\r\n\t\t}\r\n\t\t//if ( this._.doRegister || this.__isFirst ) {\r\n\t\t//\r\n\t\t//\tthis._.doRegister = false;\r\n\t\t//}\r\n\t\tsuper.componentDidMount && super.componentDidMount(...arguments);\r\n\t}\r\n\t\r\n\tcomponentDidUpdate( prevProps, prevState ) {\r\n\t\t\r\n\t\tif ( this._.tweenEnabled ) {\r\n\t\t\tthis._updateBox();\r\n\t\t\tthis._updateTweenRefs();\r\n\t\t}\r\n\t\tsuper.componentDidUpdate && super.componentDidUpdate(...arguments);\r\n\t}\r\n\t\r\n\trender() {\r\n\t\tconst { BaseComponent, oProps } = this.props;\r\n\t\treturn <TweenerContext.Consumer>\r\n\t\t\t{\r\n\t\t\t\tparentTweener => {\r\n\t\t\t\t\tthis._parentTweener = parentTweener;\r\n\t\t\t\t\treturn <TweenerContext.Provider value={this}>\r\n\t\t\t\t\t\t<BaseComponent {...oProps} ref={this._.rootRef}\r\n\t\t\t\t\t\t tweener={this}/>\r\n\t\t\t\t\t</TweenerContext.Provider>;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t</TweenerContext.Consumer>;\r\n\t}\r\n}\r\n","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\nimport React from \"react\";\nimport is from \"is\";\nimport TweenerContext from \"../comps/TweenerContext\";\nimport Tweener from \"../comps/Tweener\";\n\n/**\n * Wrap & instanciate the Tweener Comp \"virtual\"\n * @param tweenerOptions\n * @param RootNodeComp\n */\nexport default ( tweenerOptions, RootNodeComp = 'div' ) => {\n\tconst parentTweener = React.useContext(TweenerContext),\n\t nodeRef = React.useRef(),\n\t lastTweener = React.useRef(),\n\t doUseParentTweener = React.useMemo(\n\t\t () => (tweenerOptions === true || is.string(tweenerOptions)),\n\t\t []\n\t ),\n\t tweener = React.useMemo(\n\t\t () => {\n\t\t\t if ( tweenerOptions === true )// keep tweener from context ( parent )\n\t\t\t\t return parentTweener;\n\t\t\t\n\t\t\t if ( is.string(tweenerOptions) ) {// return named tweener or most root tweener\n\t\t\t\t let pTweener = parentTweener;\n\t\t\t\t\n\t\t\t\t while ( pTweener?._ && pTweener._.options.name !== tweenerOptions )\n\t\t\t\t\t if ( pTweener._parentTweener )\n\t\t\t\t\t\t pTweener = pTweener._parentTweener;\n\t\t\t\t\t else {\n\t\t\t\t\t\t console.warn('react-voodoo: No parent tweener found with option.key === \"' + tweenerOptions + '\"');\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t\n\t\t\t\t return pTweener;\n\t\t\t }\n\t\t\t\n\t\t\t let tw = new Tweener({\n\t\t\t\t forwardedRef: nodeRef,\n\t\t\t\t tweenerOptions\n\t\t\t });\n\t\t\t tw.isMountedFromHook = true;\n\t\t\t tw._parentTweener = parentTweener;\n\t\t\t return tw;\n\t\t },\n\t\t []\n\t ),\n\t ViewBox = React.useMemo(\n\t\t () => (\n\t\t\t React.forwardRef(\n\t\t\t\t ( { children, ...props }, ref ) => {\n\t\t\t\t\t return <TweenerContext.Provider value={tweener}>\n\t\t\t\t\t\t <RootNodeComp\n\t\t\t\t\t\t\t ref={!ref\n\t\t\t\t\t\t\t ? nodeRef\n\t\t\t\t\t\t\t : ( node ) => (ref.current = nodeRef.current = node)} {...props}>\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t children\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t </RootNodeComp>\n\t\t\t\t\t </TweenerContext.Provider>\n\t\t\t\t }\n\t\t\t )\n\t\t ),\n\t\t []\n\t )\n\t\n\tReact.useEffect(\n\t\t() => {\n\t\t\tif ( doUseParentTweener || !lastTweener.current?._ )\n\t\t\t\treturn;\n\t\t\t//console.warn(\"didmount\", nodeRef.current, lastTweener.current === TweenerEl)\n\t\t\ttweener.componentDidMount();\n\t\t\tlastTweener.current = tweener;\n\t\t\treturn () => {\n\t\t\t\tif ( !lastTweener.current?._ )\n\t\t\t\t\treturn;\n\t\t\t\t//console.warn(\"unmount\")\n\t\t\t\tlastTweener.current.componentWillUnmount();\n\t\t\t\tlastTweener.current = null;\n\t\t\t}\n\t\t}, []\n\t)\n\tReact.useEffect(\n\t\t() => {\n\t\t\t\n\t\t\tif ( doUseParentTweener || !lastTweener.current?._ )\n\t\t\t\treturn;\n\t\t\t//console.warn(\"didupdate\", nodeRef.current)\n\t\t\tlastTweener.current._updateBox();\n\t\t\tlastTweener.current._updateTweenRefs();\n\t\t\t\n\t\t}\n\t\t,\n\t\t[nodeRef.current]\n\t)\n\tReact.useEffect(\n\t\t() => {\n\t\t\tif ( doUseParentTweener || !lastTweener.current?._ )\n\t\t\t\treturn;\n\t\t\tlastTweener.current._parentTweener = parentTweener;\n\t\t},\n\t\t[parentTweener]\n\t)\n\tReact.useEffect(\n\t\t() => {\n\t\t\tif ( doUseParentTweener || !lastTweener.current?._ )\n\t\t\t\treturn;\n\t\t\tlastTweener.current._.options = tweenerOptions;\n\t\t\tlastTweener.current._updateBox();\n\t\t\tlastTweener.current._updateTweenRefs();\n\t\t},\n\t\t[tweenerOptions]\n\t)\n\treturn React.useMemo(\n\t\t() => ([tweener, ViewBox]),\n\t\t[ViewBox, tweener]\n\t);\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of context software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and context permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport deepEqual from \"fast-deep-equal\";\nimport React from 'react';\nimport useVoodoo from \"../hooks/useVoodoo\";\n\n\nexport default ( {\n\t children,\n\t id,\n\t axe = id,\n\t scrollFirst, bounds,\n\t scrollableWindow, inertia, size, defaultPosition,\n\t items = [],\n } ) => {\n\tconst µ = React.useRef({}).current,\n\t [tweener] = useVoodoo(true);\n\t\n\tif ( !µ.previousAxis || µ.previousAxis !== axe ) {//....\n\t\tµ.previousAxis = axe;\n\t\tµ.previousInertia = inertia;\n\t\ttweener.initAxis(axe, {\n\t\t\tinertia,\n\t\t\tsize,\n\t\t\tscrollableWindow,\n\t\t\tdefaultPosition,\n\t\t\tscrollFirst,\n\t\t\tscrollableBounds: bounds\n\t\t}, true);\n\t}\n\telse if ( !µ.previousInertia || µ.previousInertia !== inertia || µ.previousBounds !== bounds || µ.previousScrollableWindow !== scrollableWindow ) {//....\n\t\tµ.previousInertia = inertia;\n\t\tµ.previousAxis = axe;\n\t\tµ.previousBounds = bounds;\n\t\tµ.previousScrollableWindow = scrollableWindow;\n\t\ttweener.initAxis(axe, {\n\t\t\tinertia,\n\t\t\tsize,\n\t\t\tscrollableWindow,\n\t\t\tdefaultPosition,\n\t\t\tscrollFirst,\n\t\t\tscrollableBounds: bounds\n\t\t});\n\t}\n\tif ( !µ.previousTweener || µ.previousTweener !== tweener ) {// mk axe not modifiable\n\t\tµ.previousTweener && µ.lastTL && µ.previousTweener.rmScrollableAnim(µ.lastTL, µ.previousAxis);\n\t\tif ( items.length )\n\t\t\tµ.lastTL = tweener.addScrollableAnim(items, axe, size);\n\t\tµ.previousTweener = tweener;\n\t\tµ.previousTweens = items;\n\t}\n\telse if ( µ.previousTweens !== items && !(µ.previousTweens && deepEqual(items, µ.previousTweens)) ) {// is deepEq really required ?\n\t\tµ.lastTL && µ.previousTweener && µ.previousTweener.rmScrollableAnim(µ.lastTL, µ.previousAxis);\n\t\tµ.lastTL = null;\n\t\tif ( items.length )\n\t\t\tµ.lastTL = tweener.addScrollableAnim(items, axe, size);\n\t\tµ.previousTweens = items;\n\t}\n\t\n\tReact.useEffect(\n\t\t() => {\n\t\t\t\n\t\t\treturn () => {\n\t\t\t\tµ.lastTL && µ.previousTweener && µ.previousTweener.rmScrollableAnim(µ.lastTL, µ.previousAxis);\n\t\t\t\t\n\t\t\t\tdelete µ.previousTweener;\n\t\t\t\tdelete µ.previousScrollable;\n\t\t\t}\n\t\t}, [])\n\treturn <React.Fragment/>;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"shortid\");","/*\r\n * The MIT License (MIT)\r\n * Copyright (c) 2020. Nathanael Braun\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in all\r\n * copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n * SOFTWARE.\r\n *\r\n * @author : Nathanael Braun\r\n * @contact : n8tz.js@gmail.com\r\n */\r\n\r\n\r\nexport function isClassComponent(component) {\r\n return (\r\n typeof component === 'function' &&\r\n !!component.prototype.isReactComponent\r\n )\r\n}\r\nexport function isFunctionalComponent(Component) {\r\n return (\r\n typeof Component === 'function' // can be various things\r\n && !(\r\n Component.prototype // native arrows don't have prototypes\r\n && Component.prototype.isReactComponent // special property\r\n )\r\n );\r\n}\r\n\r\nexport function isReactComponent(component) {\r\n return (\r\n isClassComponent(component) ||\r\n isFunctionalComponent(component)\r\n )\r\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport deepEqual from \"fast-deep-equal\";\nimport is from \"is\";\nimport React from 'react';\nimport shortid from 'shortid';\nimport useVoodoo from \"../hooks/useVoodoo\";\n\nimport {isFunctionalComponent} from '../utils/react';\n\nfunction setTarget( anims, target ) {\n\treturn anims.map(\n\t\ttween => ({\n\t\t\t...tween,\n\t\t\ttarget\n\t\t})\n\t)\n}\n\nconst Node = ( {\n\t children,\n\t id = React.useMemo(() => shortid.generate(), []),\n\t style, initial, pos, noRef, reset, tweener,\n\t isRoot,\n\t axes,\n\t refProp = \"nodeRef\",\n\t tweenLines = axes,\n\t tweenAxis = tweenLines,\n\t ...props\n } ) => {\n\tlet µ = React.useRef({}).current,\n\t [parentTweener] = useVoodoo(true);\n\t\n\tparentTweener = tweener || parentTweener;\n\t\n\tif ( !parentTweener ) {\n\t\tconsole.error(\"No Voodoo tweener found in the context, is there any parent with asTweener ?\")\n\t\treturn <React.Fragment/>;\n\t}\n\t//console.warn(\"render : \", this.__tweenableId, this._currentTweener,\n\t// parentTweener, this._currentTweener !== parentTweener)\n\tlet twRef = parentTweener.tweenRef(id, children.props && children.props.style, style || initial,\n\t pos, noRef),\n\t axisItemsChange;\n\t\n\t//console.warn(\"render2 : \", this.__tweenableId,\n\t// this._currentTweener, parentTweener, this._currentTweener !==\n\t// parentTweener)\n\tReact.useEffect(\n\t\t() => () => {\n\t\t\tif ( µ._tweenAxisObj ) {\n\t\t\t\tObject.keys(µ._tweenAxisObj)\n\t\t\t\t .forEach(axe => µ._currentTweener.rmScrollableAnim(µ._tweenAxisObj[axe], axe));\n\t\t\t}\n\t\t\tif ( µ._currentTweener ) {\n\t\t\t\tµ._currentTweener.rmTweenRef(µ.__tweenableId)\n\t\t\t\tµ._currentTweener.setRootRef(undefined);\n\t\t\t}\n\t\t\tdelete µ._currentTweener;\n\t\t\tdelete µ._tweenAxisObj;\n\t\t\tdelete µ._previousScrollable;\n\t\t},\n\t\t[]\n\t)\n\t\n\tif ( µ._currentTweener !== parentTweener || µ._previousScrollable !== tweenAxis ) {\n\t\taxisItemsChange = µ._tweenAxis !== tweenAxis && !(µ._tweenAxis && deepEqual(tweenAxis, µ._tweenAxis));\n\t\tif ( µ._currentTweener && axisItemsChange ) {\n\t\t\tµ._tweenAxisObj && Object.keys(µ._tweenAxisObj)\n\t\t\t .forEach(axe => µ._currentTweener.rmScrollableAnim(µ._tweenAxisObj[axe], axe));\n\t\t\t\n\t\t}\n\t\t//console.log(twRef, axisItemsChange, µ._tweenAxis, tweenAxis)\n\t\tif ( µ._currentTweener && µ._currentTweener !== parentTweener ) {\n\t\t\tµ._currentTweener.rmTweenRef(id);\n\t\t}\n\t\tif ( axisItemsChange ) {\n\t\t\tµ._tweenAxis = tweenAxis;\n\t\t\tif ( tweenAxis && is.array(tweenAxis) )\n\t\t\t\tµ._tweenAxisObj = { scrollY: parentTweener.addScrollableAnim(setTarget(tweenAxis, id)) };\n\t\t\telse\n\t\t\t\tµ._tweenAxisObj = tweenAxis && Object.keys(tweenAxis)\n\t\t\t\t .reduce(( h, axe ) => (h[axe] = parentTweener.addScrollableAnim(setTarget(tweenAxis[axe], id), axe), h), {});\n\t\t\ttwRef = parentTweener.tweenRef(id, children.props && children.props.style, style || initial,\n\t\t\t pos, noRef)\n\t\t}\n\t\t\n\t\ttwRef.style = { ...parentTweener._updateTweenRef(id, true) };\n\t\t\n\t\tif ( props.hasOwnProperty(\"isRoot\") ) {\n\t\t\tµ._currentTweener && µ._currentTweener.setRootRef(undefined);\n\t\t\ttweener.setRootRef(id);\n\t\t}\n\t\t\n\t\tµ._currentTweener = parentTweener;\n\t\tµ._previousScrollable = tweenAxis;\n\t\t\n\t}\n\telse if ( twRef ) {\n\t\ttwRef.style = { ...parentTweener._updateTweenRef(id, true) };// should renew only if changed\n\t}\n\t\n\tlet RefChild = React.Children.only(children);\n\t\n\tif ( RefChild && React.isValidElement(RefChild) ) {//todo\n\t\tµ._lastRef = twRef;\n\t\t\n\t\tif ( isFunctionalComponent(RefChild.type) )\n\t\t\treturn <RefChild.type\n\t\t\t\t{...props}\n\t\t\t\t{...RefChild.props}\n\t\t\t\t{...twRef}\n\t\t\t\tref={undefined}\n\t\t\t\t{\n\t\t\t\t\t...{\n\t\t\t\t\t\t[refProp]: twRef.ref\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t/>;\n\t\t\n\t\treturn <RefChild.type\n\t\t\t{...props}\n\t\t\t{...RefChild.props}\n\t\t\t{...twRef}/>;\n\t\t\n\t}\n\telse {\n\t\tconsole.error(\"Invalid voodoo Node child : \", id)\n\t}\n\treturn <div>Invalid</div>;\n}\nexport default Node;\n\nNode.div = ( { children, className, ...props } ) => {\n\treturn <Node {...props}>\n\t\t<div className={className}>{children}</div>\n\t</Node>;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport is from \"is\";\nimport React from 'react';\nimport ReactDom from \"react-dom\";\nimport useVoodoo from \"../hooks/useVoodoo\";\nimport domUtils from \"../utils/dom\";\n\nconst Draggable = ( {\n\t children,\n\t Comp = 'div',\n\t nodeRef,\n\t items = [],\n\t xAxis, yAxis, yBoxRef,\n\t xBoxRef, yRef,\n\t yHook, xHook,\n\t tweener,\n\t mouseDrag = false,\n\t touchDrag = true,\n\t button = 0,\n\t ...props\n } ) => {\n\tlet root = React.useRef(),\n\t µ = React.useRef({ root, _: {} }).current,\n\t [parentTweener] = useVoodoo(true),\n\t api = React.useMemo(\n\t\t () => ({\n\t\t\t\n\t\t\t /**\n\t\t\t * Return scrollable parent node list basing a dom node\n\t\t\t * @param node\n\t\t\t * @returns {T[]}\n\t\t\t */\n\t\t\t getScrollableNodes( node ) {\n\t\t\t\t let scrollable = [], parent = µ._parentTweener;//domUtils.findReactParents(node),\n\t\t\t\t // _ = µ._;\n\t\t\t\t\n\t\t\t\t while ( parent ) {\n\t\t\t\t\t scrollable.push(parent);\n\t\t\t\t\t parent = parent._parentTweener;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\t return scrollable\n\t\t\t },\n\t\t\t\n\t\t\t /**\n\t\t\t * todo rewrite or use lib\n\t\t\t * Init touch & scroll listeners\n\t\t\t * Drive scroll & drag values updates\n\t\t\t * @private\n\t\t\t */\n\t\t\t _registerScrollListeners() {\n\t\t\t\t let rootNode = µ.root?.current,\n\t\t\t\t {\n\t\t\t\t\t xAxis, yAxis, yHook, xHook, mouseDrag, touchDrag, tweener, xBoxRef, yBoxRef, button\n\t\t\t\t } = µ.props,\n\t\t\t\t lastStartTm,\n\t\t\t\t cLock, dX,\n\t\t\t\t parents,\n\t\t\t\t dY, parentsState, refWidth, refHeight,\n\t\t\t\t _ = tweener._;\n\t\t\t\t\n\t\t\t\t if ( rootNode ) {\n\t\t\t\t\t domUtils.addEvent(\n\t\t\t\t\t\t rootNode, µ._.dragList = {\n\t\t\t\t\t\t\t 'dragstart': ( e, touch, descr ) => {//@todo\n\t\t\t\t\t\t\t\t let pTweener,\n\t\t\t\t\t\t\t\t x,\n\t\t\t\t\t\t\t\t y, i, style;\n\t\t\t\t\t\t\t\t if ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so µ work for touch events\n\t\t\t\t\t\t\t\t\t return;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t parents = api.getScrollableNodes(e.target);\n\t\t\t\t\t\t\t\t lastStartTm = Date.now();\n\t\t\t\t\t\t\t\t dX = 0;\n\t\t\t\t\t\t\t\t dY = 0;\n\t\t\t\t\t\t\t\t parentsState = [];\n\t\t\t\t\t\t\t\t refWidth = (xBoxRef?.current || rootNode)?.offsetWidth;\n\t\t\t\t\t\t\t\t refHeight = (yBoxRef?.current || rootNode)?.offsetHeight;\n\t\t\t\t\t\t\t\t for ( i = 0; i < parents.length; i++ ) {\n\t\t\t\t\t\t\t\t\t pTweener = parents[i];\n\t\t\t\t\t\t\t\t\t pTweener._updateBox();\n\t\t\t\t\t\t\t\t\t // react comp with tweener support\n\t\t\t\t\t\t\t\t\t if ( pTweener.__isTweener ) {\n\t\t\t\t\t\t\t\t\t\t x = xAxis && pTweener.axes?.[xAxis];\n\t\t\t\t\t\t\t\t\t\t y = yAxis && pTweener.axes?.[yAxis];\n\t\t\t\t\t\t\t\t\t\t pTweener._updateNodeInertia()\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t //tweener._updateNodeInertia()\n\t\t\t\t\t\t\t\t //e.stopPropagation();\n\t\t\t\t\t\t\t\t //e.preventDefault();\n\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t 'click' : ( e, touch, descr ) => {//@todo\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t if ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so µ work for touch events\n\t\t\t\t\t\t\t\t\t return;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t if ( lastStartTm &&\n\t\t\t\t\t\t\t\t\t (\n\t\t\t\t\t\t\t\t\t\t (lastStartTm - Date.now() > _.options.maxClickTm) ||\n\t\t\t\t\t\t\t\t\t\t Math.abs(dY) > _.options.maxClickOffset ||\n\t\t\t\t\t\t\t\t\t\t Math.abs(dX) > _.options.maxClickOffset\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t ) {\n\t\t\t\t\t\t\t\t\t e.preventDefault();\n\t\t\t\t\t\t\t\t\t e.stopPropagation();\n\t\t\t\t\t\t\t\t\t //console.log(\"prevented click\", lastStartTm, Math.abs(dX), Math.abs(dY))\n\t\t\t\t\t\t\t\t\t //console.log(':o ' + (lastStartTm - Date.now()) + ' ' + dX +\n\t\t\t\t\t\t\t\t\t //\t ' ' + dY, _.options.maxClickTm)\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t //else console.log(\"click\", Math.abs(dX), Math.abs(dY))\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t },\n\t\t\t\t\t\t\t 'drag' : ( e, touch, descr ) => {//@todo\n\t\t\t\t\t\t\t\t if ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so µ work for touch events\n\t\t\t\t\t\t\t\t\t return;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t let pTweener,\n\t\t\t\t\t\t\t\t x, deltaX, xDispatched, xBox,\n\t\t\t\t\t\t\t\t y, deltaY, yDispatched, yBox,\n\t\t\t\t\t\t\t\t cState, i;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t dX = -(descr._lastPos.x - descr._startPos.x);\n\t\t\t\t\t\t\t\t dY = -(descr._lastPos.y - descr._startPos.y);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t if ( lastStartTm && ((lastStartTm > Date.now() - _.options.maxClickTm) && Math.abs(dY) < _.options.maxClickOffset && Math.abs(dX) < _.options.maxClickOffset) )// skip tap & click\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t //console.log(':u ' + (lastStartTm - Date.now()) + ' ' + dX +\n\t\t\t\t\t\t\t\t\t // ' ' + dY)\n\t\t\t\t\t\t\t\t\t return;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t xDispatched = !dX;\n\t\t\t\t\t\t\t\t\t yDispatched = !dY;\n\t\t\t\t\t\t\t\t\t if ( _.options.dragDirectionLock ) {\n\t\t\t\t\t\t\t\t\t\t if ( cLock === \"Y\" || !cLock && Math.abs(dY * .5) > Math.abs(dX) ) {\n\t\t\t\t\t\t\t\t\t\t\t cLock = \"Y\";\n\t\t\t\t\t\t\t\t\t\t\t dX = 0;\n\t\t\t\t\t\t\t\t\t\t\t //xDispatched = true;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t else if ( cLock === \"X\" || !cLock && Math.abs(dX * .5) > Math.abs(dY) ) {\n\t\t\t\t\t\t\t\t\t\t\t cLock = \"X\";\n\t\t\t\t\t\t\t\t\t\t\t dY = 0;\n\t\t\t\t\t\t\t\t\t\t\t //yDispatched = true;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t for ( i = 0; i < parents.length; i++ ) {\n\t\t\t\t\t\t\t\t\t\t pTweener = parents[i];\n\t\t\t\t\t\t\t\t\t\t // react comp with tweener support\n\t\t\t\t\t\t\t\t\t\t if ( pTweener.__isTweener ) {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t x = xAxis && pTweener.axes?.[xAxis];\n\t\t\t\t\t\t\t\t\t\t\t y = yAxis && pTweener.axes?.[yAxis];\n\t\t\t\t\t\t\t\t\t\t\t //console.log(\"drag\", dX, dY, xAxis, yAxis,\n\t\t\t\t\t\t\t\t\t\t\t // pTweener.axes);\n\t\t\t\t\t\t\t\t\t\t\t if ( !x && !y )\n\t\t\t\t\t\t\t\t\t\t\t\t continue;\n\t\t\t\t\t\t\t\t\t\t\t //console.log('Draggable:::306: ', parents);\n\t\t\t\t\t\t\t\t\t\t\t if ( !parentsState[i] ) {\n\t\t\t\t\t\t\t\t\t\t\t\t parentsState[i] = {\n\t\t\t\t\t\t\t\t\t\t\t\t\t x: x?.scrollPos,\n\t\t\t\t\t\t\t\t\t\t\t\t\t y: y?.scrollPos\n\t\t\t\t\t\t\t\t\t\t\t\t };\n\t\t\t\t\t\t\t\t\t\t\t\t x?.inertia?.startMove();\n\t\t\t\t\t\t\t\t\t\t\t\t y?.inertia?.startMove();\n\t\t\t\t\t\t\t\t\t\t\t\t xAxis && x && !x?.inertiaFrame && pTweener.applyInertia(x, xAxis);\n\t\t\t\t\t\t\t\t\t\t\t\t yAxis && y && !y?.inertiaFrame && pTweener.applyInertia(y, yAxis);\n\t\t\t\t\t\t\t\t\t\t\t\t //console.warn('Draggable::drag:190: ');\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t if ( x ) {\n\t\t\t\t\t\t\t\t\t\t\t\t xBox = xBoxRef?.current\n\t\t\t\t\t\t\t\t\t\t\t\t ? refWidth\n\t\t\t\t\t\t\t\t\t\t\t\t : pTweener._.box.x\n\t\t\t\t\t\t\t\t\t\t\t\t deltaX = dX && (dX / xBox) * (\n\t\t\t\t\t\t\t\t\t\t\t\t\t x.scrollableWindow ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t x.scrollableArea) || 0;\n\t\t\t\t\t\t\t\t\t\t\t\t if ( xHook )\n\t\t\t\t\t\t\t\t\t\t\t\t\t deltaX = xHook(deltaX);\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t if ( y ) {\n\t\t\t\t\t\t\t\t\t\t\t\t yBox = yBoxRef?.current\n\t\t\t\t\t\t\t\t\t\t\t\t ? refHeight\n\t\t\t\t\t\t\t\t\t\t\t\t : pTweener._.box.y\n\t\t\t\t\t\t\t\t\t\t\t\t deltaY = dY && (dY / yBox) * (\n\t\t\t\t\t\t\t\t\t\t\t\t\t y.scrollableWindow ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t y.scrollableArea) || 0;\n\t\t\t\t\t\t\t\t\t\t\t\t if ( yHook )\n\t\t\t\t\t\t\t\t\t\t\t\t\t deltaY = yHook(deltaY);\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t //console.log('scrollX ',\n\t\t\t\t\t\t\t\t\t\t\t // xDispatched,\n\t\t\t\t\t\t\t\t\t\t\t // x?.inertia?.isInbound(parentsState[ i\n\t\t\t\t\t\t\t\t\t\t\t // ].x + deltaX), parentsState[ i ].x + deltaX );\n\t\t\t\t\t\t\t\t\t\t\t if ( x && !xDispatched && deltaX && x?.inertia?.isInbound(parentsState[i].x + deltaX)\n\t\t\t\t\t\t\t\t\t\t\t\t && (pTweener.componentShouldScroll(xAxis, deltaX)) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t x.inertia.hold(parentsState[i].x + deltaX);\n\t\t\t\t\t\t\t\t\t\t\t\t //parentsState[i].x = x.inertia._.pos;\n\t\t\t\t\t\t\t\t\t\t\t\t xDispatched = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t //console.log(\"scrollY\", yDispatched,\n\t\t\t\t\t\t\t\t\t\t\t // y?.inertia?.isInbound(parentsState[ i\n\t\t\t\t\t\t\t\t\t\t\t // ].y + deltaY), parentsState[ i ].y + deltaY);\n\t\t\t\t\t\t\t\t\t\t\t if ( y && !yDispatched && deltaY && y?.inertia?.isInbound(parentsState[i].y + deltaY)\n\t\t\t\t\t\t\t\t\t\t\t\t && (pTweener.componentShouldScroll(yAxis, deltaY)) ) {\n\t\t\t\t\t\t\t\t\t\t\t\t y.inertia.hold(parentsState[i].y + deltaY);\n\t\t\t\t\t\t\t\t\t\t\t\t //parentsState[i].y = y.inertia._.pos;\n\t\t\t\t\t\t\t\t\t\t\t\t //console.log('Draggable::drag:190: ',\n\t\t\t\t\t\t\t\t\t\t\t\t // parentsState[i].y,deltaY);\n\t\t\t\t\t\t\t\t\t\t\t\t yDispatched = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t if ( yDispatched && xDispatched ) {\n\t\t\t\t\t\t\t\t\t\t //e.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t //e.cancelable && e.preventDefault();\n\t\t\t\t\t\t\t\t\t\t //return;\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t //dX = 0;\n\t\t\t\t\t\t\t\t\t //dY = 0;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t ,\n\t\t\t\t\t\t\t 'dropped': ( e, touch, descr ) => {\n\t\t\t\t\t\t\t\t let pTweener,\n\t\t\t\t\t\t\t\t x, deltaX, xDispatched, vX,\n\t\t\t\t\t\t\t\t y, deltaY, yDispatched, vY,\n\t\t\t\t\t\t\t\t cState, i;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t if ( (e) instanceof MouseEvent && e.button !== button ) {// allow undefined so µ work for touch events\n\t\t\t\t\t\t\t\t\t return;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t cLock = undefined;\n\t\t\t\t\t\t\t\t //lastStartTm = undefined;\n\t\t\t\t\t\t\t\t //document.body.style.userSelect = '';\n\t\t\t\t\t\t\t\t //document.body.style.touchAction = '';\n\t\t\t\t\t\t\t\t for ( i = 0; i < parents.length; i++ ) {\n\t\t\t\t\t\t\t\t\t pTweener = parents[i];\n\t\t\t\t\t\t\t\t\t // react comp with tweener support\n\t\t\t\t\t\t\t\t\t if ( pTweener.__isTweener && parentsState[i] ) {\n\t\t\t\t\t\t\t\t\t\t //console.log('Draggable::dropped:228: ',\n\t\t\t\t\t\t\t\t\t\t // pTweener._getAxis(xAxis)?.inertia);\n\t\t\t\t\t\t\t\t\t\t pTweener.axes?.[xAxis]?.inertia?.release();\n\t\t\t\t\t\t\t\t\t\t pTweener.axes?.[yAxis]?.inertia?.release();\n\t\t\t\t\t\t\t\t\t\t //pTweener._updateNodeInertia()\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t //else if ( is.element(tweener) ) {\n\t\t\t\t\t\t\t\t\t //\tcState = parentsState[i];\n\t\t\t\t\t\t\t\t\t //\tif ( cState ) {\n\t\t\t\t\t\t\t\t\t //\t\tcState.inertia.x.release();\n\t\t\t\t\t\t\t\t\t //\t\tcState.inertia.y.release();\n\t\t\t\t\t\t\t\t\t //\t}\n\t\t\t\t\t\t\t\t\t //}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t if ( lastStartTm && !((lastStartTm > Date.now() - _.options.maxClickTm) && Math.abs(dY)\n\t\t\t\t\t\t\t\t\t < _.options.maxClickOffset && Math.abs(dX) < _.options.maxClickOffset) )// skip\n\t\t\t\t\t\t\t\t // tap\n\t\t\t\t\t\t\t\t\t // &\n\t\t\t\t\t\t\t\t\t // click\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t e.stopPropagation();\n\t\t\t\t\t\t\t\t\t e.cancelable && e.preventDefault();\n\t\t\t\t\t\t\t\t\t //console.log(\"prevented\", Math.abs(dX), Math.abs(dY))\n\t\t\t\t\t\t\t\t\t //return;\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t //else {\n\t\t\t\t\t\t\t\t //console.log(\"not prevented\", Math.abs(dX), Math.abs(dY))\n\t\t\t\t\t\t\t\t //}\n\t\t\t\t\t\t\t\t //lastStartTm = 0;\n\t\t\t\t\t\t\t\t parents = parentsState = null;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t },\n\t\t\t\t\t\t null,\n\t\t\t\t\t\t _.options.enableMouseDrag || mouseDrag,\n\t\t\t\t\t\t touchDrag\n\t\t\t\t\t )\n\t\t\t\t\t µ._.doRegister = !!rootNode;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t µ._.doRegister = true;\n\t\t\t\t }\n\t\t\t }\n\t\t\t\n\t\t }),\n\t\t []\n\t );\n\tReact.useEffect(\n\t\t() => {\n\t\t\tapi._registerScrollListeners();\n\t\t\treturn () => {\n\t\t\t\tlet node = µ.root?.current;\n\t\t\t\tif ( µ._.scrollEnabled ) {\n\t\t\t\t\tµ._.scrollEnabled = false;\n\t\t\t\t\t\n\t\t\t\t\t//µ._.axes = undefined;\n\t\t\t\t\tnode && µ._.dragList && domUtils.removeEvent(node\n\t\t\t\t\t\t, µ._.dragList)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[]\n\t)\n\tReact.useEffect(\n\t\t() => {\n\t\t\tif ( is.function(nodeRef) )\n\t\t\t\tnodeRef(root.current)\n\t\t}\n\t)\n\tµ.props = {\n\t\txAxis, yAxis, yHook, xHook, mouseDrag, touchDrag, tweener: tweener || parentTweener, xBoxRef, yBoxRef, button\n\t}\n\tµ._parentTweener = parentTweener;\n\treturn <Comp ref={root} {...props}>{children}</Comp>;\n}\nexport default Draggable;\n\nDraggable.div = ( props ) => {\n\treturn <Draggable {...props}/>;\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\nimport React from \"react\";\nimport TweenerContext from \"../comps/TweenerContext\";\n\nexport default ()=>{\n\treturn React.useContext(TweenerContext)\n}","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport React from \"react\";\nimport Tweener from '../comps/Tweener';\nimport { isReactComponent } from '../utils/react';\n\nconst SimpleObjectProto = ( {} ).constructor;\n\n/**\n * asTweener decorator\n * @param argz\n * @returns {*}\n */\nexport default function asTweener( ...argz ) {\n \n let BaseComponent = ( !argz[ 0 ] || isReactComponent(argz[ 0 ]) ) && argz.shift(),\n options = ( !argz[ 0 ] || argz[ 0 ] instanceof SimpleObjectProto ) && argz.shift() || {};\n if ( !BaseComponent ) {\n return function ( BaseComponent ) {\n return asTweener(BaseComponent, options)\n }\n }\n \n options = {\n wheelRatio : 5,\n maxClickTm : 200,\n maxClickOffset: 20,\n ...options,\n };\n \n \n let withRef = React.forwardRef(( props, ref ) => {\n return <Tweener oProps={ props } forwardedRef={ ref }\n BaseComponent={ BaseComponent }\n tweenerOptions={ options }/>;\n });\n withRef.displayName = String.fromCharCode(0xD83E, 0xDDD9) + ( BaseComponent.displayName || BaseComponent.name );\n return withRef;\n}\n","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport React from \"react\";\nimport is from \"is\";\n\nimport { isReactComponent } from '../utils/react';\nimport TweenerContext from \"../comps/TweenerContext\";\n\n\nconst SimpleObjectProto = ( {} ).constructor;\n\n\n/**\n * asTweener decorator\n * @param argz\n * @returns {*}\n */\nexport default function withTweener( ...argz ) {\n \n let BaseComponent = ( !argz[ 0 ] || isReactComponent(argz[ 0 ]) ) && argz.shift(),\n opts = ( !argz[ 0 ] || argz[ 0 ] instanceof SimpleObjectProto ) && argz.shift() || {};\n \n if ( !( BaseComponent && ( BaseComponent.prototype instanceof React.Component || BaseComponent === React.Component ) ) ) {\n return function ( BaseComponent ) {\n return withTweener(BaseComponent, opts)\n }\n }\n \n class TweenerToProps extends React.Component {\n static displayName = ( BaseComponent.displayName || BaseComponent.name );\n \n render() {\n return <TweenerContext.Consumer>\n {\n tweener => {\n return <BaseComponent { ...this.props } tweener={ tweener }\n ref={ this.props.forwardedRef }/>;\n }\n }\n </TweenerContext.Consumer>;\n }\n }\n \n \n let withRef = React.forwardRef(( props, ref ) => {\n return <TweenerToProps { ...props } forwardedRef={ ref }/>;\n });\n withRef.displayName = TweenerToProps.displayName;\n return withRef;\n}\n","/*\n * The MIT License (MIT)\n * Copyright (c) 2020. Nathanael Braun\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * @author : Nathanael Braun\n * @contact : n8tz.js@gmail.com\n */\n\nimport React from 'react';\nimport Axis from './comps/Axis';\nimport Context from './comps/TweenerContext';\nimport Node from './comps/Node';\nimport Draggable from './comps/Draggable';\nimport useVoodoo from './hooks/useVoodoo';\nimport useTweener from './hooks/useTweener';\nimport tweener from './spells/asTweener';\nimport child from './spells/withTweener';\nimport dom from './utils/dom.js';\nimport * as tools from './utils/tweenTools.js';\n\n@tweener\nclass Component extends React.Component {\n render() {\n return this.props.children;\n }\n}\n\nexport {\n tweener,\n child,\n useTweener,\n useVoodoo,\n useVoodoo as hook,\n tools,\n Draggable,\n Component,\n Node,\n Context,\n Axis,\n dom\n};\nexport default {\n tweener,\n child,\n useTweener,\n useVoodoo,\n hook: useVoodoo,\n tools,\n Draggable,\n Component,\n Node,\n Context,\n Axis,\n dom\n};"],"names":["module","exports","walknSetExport","_target","path","value","i","fPath","split","target","length","Object","keys","default","__esModule","assign","_exports","require","any","bool","color","int","multi","number","ratio","props","units","unitsRe","RegExp","join","floatCut","v","Number","toFixed","expandShorthandProperty","property","type","childProps","properties","values","multiple","forEach","k","isShorthandProperty","isValidDeclaration","defaultUnits","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","opacity","saturate","sepia","defaultValue","release","twKey","tweenableMap","cssMap","dataMap","muxerMap","keepValues","tmpKey","pop","console","log","demuxOne","unitIndex","dkey","twVal","baseKey","data","box","unit","x","y","z","demux","key","tweenable","tmap","fkey","iValue","filters","ti","hasOwnProperty","substr","filter","muxOne","initials","noPropLock","seenUnits","match","is","unitKey","realKey","parseFloat","mux","reOrder","tFnKey","baseData","fValue","u","translateX","translateY","translateZ","scale","scaleZ","scaleX","scaleY","rotate","skewX","skewY","rotateX","rotateY","rotateZ","perspective","defaultBox","left","right","top","bottom","width","height","transforms","transform","rKey","isString","muxer","slice","vect","rgba","alias","center","offset","count","nowhere","Math","min","max","VALUES_REG","PARTS_REG","LENGTH_REG","parseValue","stringifyValue","isLength","toNum","toPx","cssShadowParser","str","parts","inset","includes","last","undefined","nums","n","map","offsetX","offsetY","blurRadius","spreadRadius","obj","s","trim","test","isNaN","parse","stringify","arr","defaultMuxers","shadowMap","shadows","tmpValue","push","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","d","a","definition","o","defineProperty","enumerable","get","prop","prototype","call","r","Symbol","toStringTag","React","re_cssValueWithUnit","cssAdd","val1","val2","units1","units2","remap","result","argz","cssMult","val","items","start","item","from","duration","withOffset","iDuration","inverseValues","reduce","h","reverse","apply","MultiCssProps","addCss","sources","source","shift","addAllType","v1","v2","values1","values2","parseInt","extractCss","inverse","css","shiftTransforms","t","unshift","cssDemux","cssDemuxers","marginTop","marginLeft","marginRight","marginBottom","paddingTop","paddingLeft","paddingRight","paddingBottom","borderRadius","borderTopColor","borderLeftColor","borderRightColor","borderBottomColor","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","transformOrigin","zIndex","clearTweenableValue","cssKey","muxToCss","demuxers","deMuxTween","tween","deMuxedTween","fTween","excluded","deMuxLine","tweenLine","allPropsById","twAxis","line","demuxedTween","id","query","prefixes","recyclableTweenAxis","CssTweenAxis","cfg","scope","recyled","localLength","mount","Axis","arguments","destroy","this","__marks","__marksLength","__marksKeys","__processors","__config","__activeForks","__activeProcess","__outgoing","__incoming","__cPos","__cIndex","__cMaxKey","tweenAxis","isBrowser","window","_dom","DocumentTouch","document","matchMedia","matches","prefix","navigator","appVersion","userAgent","dashedPrefix","__","onPageHided","onPageShown","dragging","dragEnabled","dragEnabledDesc","fingers","nbFingers","dragstartAnywhere","e","finger","desc","me","indexOf","Dom","addEvent","dragAnywhere","dropAnywhere","dropWithoutClick","changedTouches","ln","identifier","_startPos","pageX","pageY","_startTs","timeStamp","_lastPos","dragstart","stopped","drag","preventNextClick","preventDefault","stopPropagation","stopImmediatePropagation","removeEvent","prevent","mouseDrag","dropped","getDraggable","node","touchDrag","locks","dragEnd","freeDraggable","splice","fn","bubble","addEventListener","attachEvent","related","removeEventListener","detachEvent","rmDragFn","warn","object","passive","elem","dims","offsetWidth","offsetHeight","offsetTop","offsetLeft","offsetParent","findReactParents","element","fiberNode","comps","startsWith","return","stateNode","parentNode","easingFn","signOf","NaN","abs","floor","round","Inertia","opt","_","conf","constructor","config","active","pos","refFPS","currentStop","lastInertiaPos","stops","disabled","wayPoints","inertiaFn","easePolyOut","targetWayPointIndex","_detectCurrentSnap","updateConf","willStop","willSnap","shouldLoop","startMove","baseTS","startTS","Date","now","lastVelocity","lastIVelocity","lastAccel","posDiff","loopsDiff","holding","inertia","hold","nextPos","loop","delta","lastHoldPos","sinceLastPos","iVel","lastBaseTs","lastBasePos","targetDist","targetWayPoint","bounds","velSign","loopsTarget","loopsVelSum","targetDuration","pow","applyInertia","snapToBounds","inertiaStartTm","inertiaLastTm","_doSnap","willEnd","update","at","nextValue","currentWayPoint","currentWayPointIndex","onInertiaEnd","setPos","setWayPoints","teleport","loopDist","dispatch","tm","forceSnap","maxDuration","mid","lPos","loopDec","gravity","maxJump","infinite","setBounds","isInbound","_live","lastTm","isBrowserSide","Function","isArray","_running","Runner","_tick","cpos","cb","setTimeout","Tweener","axes","_scrollWatcherByAxis","_updateNodeInertia","current","activeInertia","_inertiaRaf","cancelAnimationFrame","scrollLeft","scrollTop","requestAnimationFrame","_swap","refs","muxByTarget","__isTweener","_rafLoop","bind","rootRef","forwardedRef","options","maxClickTm","maxClickOffset","tweenerOptions","tweenRefCSS","tweenRefs","tweenRefMaps","iMapOrigin","tweenRefInitialData","tweenEnabled","tweenRefOrigin","tweenRefOriginCss","muxDataByTarget","tweenRefDemuxed","tweenRefTargets","runningAnims","scrollHook","onResize","_updateBox","_updateTweenRefs","windowDidResize","tweenRef","iStyle","iMap","noref","mapReset","deepEqual","_updateTweenRef","style","ref","rmTweenRef","resetTweenable","targets","updateRefStyle","postPone","pureCss","m","getTweenableRef","ReactDom","getRootNode","isMountedFromHook","pushAnim","anim","then","keepResults","sl","fail","anims","initial","displayName","Promise","resolve","run","rkey","live","applyTweenState","reset","p","initAxis","axe","_inertia","scrollableArea","_scrollableArea","_scrollableBounds","scrollableBounds","_scrollableWindow","scrollableWindow","defaultPosition","scrollFirst","dim","scrollPos","targetPos","nextDescr","scrollTo","ease","noEvents","_getAxis","initialScrollPos","getAxisState","state","getScrollPos","axis","newPos","ms","reject","oldPos","axisDidScroll","componentDidScroll","_runScrollGoTo","goTo","addScrollableAnim","size","rmScrollableAnim","found","tl","to","easing","tick","getScrollableNodes","scrollable","domUtils","hookScrollableTargets","getElementById","componentShouldScroll","watchAxis","axisId","listener","byId","index","watchers","inertiaFrame","isInertiaActive","dispatchScroll","isAxisOut","_doDispatch","dx","dy","Comps","headTarget","getComputedStyle","getPropertyValue","scrollHeight","clientHeight","_activateNodeInertia","findIndex","scrollWidth","setRootRef","inited","force","swap","componentWillUnmount","clearTimeout","componentDidMount","_static","rendered","scrollableAnim","componentDidUpdate","prevProps","prevState","render","BaseComponent","oProps","parentTweener","_parentTweener","tweener","RootNodeComp","TweenerContext","nodeRef","lastTweener","doUseParentTweener","pTweener","name","tw","ViewBox","children","µ","useVoodoo","previousAxis","previousInertia","previousBounds","previousScrollableWindow","previousTweener","previousTweens","lastTL","previousScrollable","isFunctionalComponent","Component","isReactComponent","component","isClassComponent","setTarget","Node","shortid","noRef","isRoot","refProp","tweenLines","error","axisItemsChange","twRef","_tweenAxisObj","_currentTweener","__tweenableId","_previousScrollable","_tweenAxis","scrollY","RefChild","_lastRef","div","className","Draggable","Comp","xAxis","yAxis","yBoxRef","xBoxRef","yHook","yRef","xHook","button","root","api","parent","_registerScrollListeners","lastStartTm","cLock","dX","parents","dY","parentsState","refWidth","refHeight","rootNode","dragList","touch","descr","MouseEvent","deltaX","xDispatched","xBox","deltaY","yDispatched","yBox","dragDirectionLock","cancelable","enableMouseDrag","doRegister","scrollEnabled","SimpleObjectProto","asTweener","wheelRatio","withRef","String","fromCharCode","withTweener","opts","TweenerToProps","child","useTweener","hook","tools","Context","dom"],"sourceRoot":""}
|