-
Notifications
You must be signed in to change notification settings - Fork 67
/
jeri.min.js.map
1 lines (1 loc) · 658 KB
/
jeri.min.js.map
1
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///jeri.min.js","webpack:///webpack/bootstrap 6ec150b375d80a80225c","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\",\"umd\":\"react\"}","webpack:///./src/utils/linalg.ts","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/styled-components/dist/styled-components.es.js","webpack:///./src/layers/Layer.ts","webpack:///./src/utils/image-loading.ts","webpack:///./node_modules/prop-types/node_modules/fbjs/lib/emptyFunction.js","webpack:///./node_modules/prop-types/node_modules/fbjs/lib/invariant.js","webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack:///./src/components/ImageFrame.tsx","webpack:///./src/layers/ImageLayer.ts","webpack:///./src/layers/TextLayer.ts","webpack:///./src/layers/MouseLayer.ts","webpack:///./node_modules/prop-types/node_modules/fbjs/lib/warning.js","webpack:///./src/jeri.tsx","webpack:///external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\",\"umd\":\"react-dom\"}","webpack:///./src/utils/cached-function.ts","webpack:///./build_npm/utils/exr-parser.worker.js","webpack:///./node_modules/normalize-wheel/index.js","webpack:///./node_modules/normalize-wheel/src/normalizeWheel.js","webpack:///./node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js","webpack:///./node_modules/normalize-wheel/src/isEventSupported.js","webpack:///./node_modules/normalize-wheel/src/ExecutionEnvironment.js","webpack:///./node_modules/is-plain-object/index.js","webpack:///./node_modules/isobject/index.js","webpack:///./node_modules/stylis/stylis.js","webpack:///./node_modules/prop-types/index.js","webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js","webpack:///./node_modules/object-assign/index.js","webpack:///./node_modules/prop-types/checkPropTypes.js","webpack:///./node_modules/prop-types/factoryWithThrowingShims.js","webpack:///./node_modules/is-function/index.js","webpack:///./node_modules/hoist-non-react-statics/index.js","webpack:///./src/components/ImageViewer/index.tsx","webpack:///./src/utils/number-aware-compare.ts","webpack:///./src/utils/fullscreen.ts","webpack:///./src/components/ImageViewer/HelpScreen.tsx","webpack:///./src/components/ImageFrameWithLoading.tsx","webpack:///./src/components/ImageViewer/navigation.tsx","webpack:///./node_modules/common-prefix/index.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_0__","__WEBPACK_EXTERNAL_MODULE_15__","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","value","IDENTITY4x4","Float32Array","Matrix4x4","buffer","data","create","fromScaling","matrix","scaling","length","Error","forEach","scale","multiply","output","a","b","j","k","translate","translation","clone","invert","determinant","inverseDeterminant","Vector4","set","x","y","z","w","fromValues","vector","transformMat4","v","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","setTimeout","e","runClearTimeout","marker","cachedClearTimeout","clearTimeout","cleanUpNextTick","draining","currentQueue","queue","concat","queueIndex","drainQueue","timeout","len","run","Item","array","noop","process","nextTick","args","Array","arguments","push","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","__webpack_exports__","hyphenate$2","string","replace","_uppercasePattern","toLowerCase","hyphenateStyleName","hyphenate","msPattern","isTag","target","isStyledComponent","styledComponentId","getComponentName","displayName","doHash","str","seed","h","currentIndex","UInt32","Umul32","UInt16","charCodeAt","pos","css","keyframes","injectGlobal","ThemeProvider","wrapWithTheme","ServerStyleSheet","StyleSheetManager","_StyleSheetManager$ch","__WEBPACK_IMPORTED_MODULE_0_is_plain_object__","__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default","__WEBPACK_IMPORTED_MODULE_1_stylis__","__WEBPACK_IMPORTED_MODULE_1_stylis___default","__WEBPACK_IMPORTED_MODULE_2_react__","__WEBPACK_IMPORTED_MODULE_2_react___default","__WEBPACK_IMPORTED_MODULE_3_prop_types__","__WEBPACK_IMPORTED_MODULE_3_prop_types___default","__WEBPACK_IMPORTED_MODULE_4_is_function__","__WEBPACK_IMPORTED_MODULE_4_is_function___default","__WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics__","__WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics___default","hyphenate_1","hyphenateStyleName_1","objToCss","obj","prevKey","keys","filter","key","chunk","undefined","map","join","flatten","chunks","executionContext","reduce","ruleSet","isArray","toString","stylis","global","cascade","keyframe","prefix","compress","semicolon","stringifyRules","rules","selector","flatCSS","cssStr","chars","split","charsLength","generateAlphabeticName","code","Math","floor","interleave","strings","interpolations","interp","_len","_key","SC_COMPONENT_ID","extractCompsFromCSS","maybeCSS","existingComponents","match","componentId","matchIndex","_ref","nextComp","cssFromDOM","slice","getNonce","nc","classCallCheck","instance","Constructor","TypeError","createClass","defineProperties","props","descriptor","writable","protoProps","staticProps","_extends","assign","source","inherits","subClass","superClass","constructor","setPrototypeOf","__proto__","objectWithoutProperties","indexOf","possibleConstructorReturn","self","ReferenceError","BrowserTag","el","isLocal","existingSource","ready","extractedComps","size","components","acc","isFull","addComponent","replaceElement","comp","textNode","document","createTextNode","appendChild","inject","appendData","existingNames","getAttribute","SC_ATTR","setAttribute","nonce","toHTML","outerHTML","toReactElement","_this","newEl","cloneNode","parentNode","replaceChild","BrowserStyleSheet","tags","names","nodes","querySelectorAll","nodesLength","LOCAL_ATTR","innerHTML","attr","trim","StyleSheet","createElement","type","head","CONTEXT_KEY","clones","tagConstructor","hashes","deferredInjections","stylesCacheable","constructComponentTagMap","componentTags","tag","getName","hash","alreadyInjected","hasInjectedComponent","deferredInject","getOrCreateTag","deferredInjection","toReactElements","existingTag","lastTag","componentTag","createNewTag","newTag","reset","isServer","oldSheet","newSheet","_Component","getChildContext","sheet","render","Children","only","children","childContextTypes","oneOfType","instanceOf","isRequired","propTypes","_ThemeProvider$childC","_ThemeProvider$contex","ServerTag","concatenateCSS","styles","attrs","_attrs","dangerouslySetInnerHTML","__html","_this2","copy","collectStyles","closed","getStyleTags","splice","getStyleElement","createWarnTooManyClasses","generatedClasses","warningSeen","className","console","warn","reactProps","ref","autoFocus","defaultValue","valueLink","defaultChecked","checkedLink","suppressContentEditableWarning","onFocusIn","onFocusOut","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onReset","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onLoad","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd","onCopyCapture","onCutCapture","onPasteCapture","onCompositionEndCapture","onCompositionStartCapture","onCompositionUpdateCapture","onKeyDownCapture","onKeyPressCapture","onKeyUpCapture","onFocusCapture","onBlurCapture","onChangeCapture","onInputCapture","onSubmitCapture","onResetCapture","onClickCapture","onContextMenuCapture","onDoubleClickCapture","onDragCapture","onDragEndCapture","onDragEnterCapture","onDragExitCapture","onDragLeaveCapture","onDragOverCapture","onDragStartCapture","onDropCapture","onMouseDownCapture","onMouseEnterCapture","onMouseLeaveCapture","onMouseMoveCapture","onMouseOutCapture","onMouseOverCapture","onMouseUpCapture","onSelectCapture","onTouchCancelCapture","onTouchEndCapture","onTouchMoveCapture","onTouchStartCapture","onScrollCapture","onWheelCapture","onAbortCapture","onCanPlayCapture","onCanPlayThroughCapture","onDurationChangeCapture","onEmptiedCapture","onEncryptedCapture","onEndedCapture","onErrorCapture","onLoadedDataCapture","onLoadedMetadataCapture","onLoadStartCapture","onPauseCapture","onPlayCapture","onPlayingCapture","onProgressCapture","onRateChangeCapture","onSeekedCapture","onSeekingCapture","onStalledCapture","onSuspendCapture","onTimeUpdateCapture","onVolumeChangeCapture","onWaitingCapture","onLoadCapture","onAnimationStartCapture","onAnimationEndCapture","onAnimationIterationCapture","onTransitionEndCapture","htmlProps","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","as","async","autoComplete","autoPlay","capture","cellPadding","cellSpacing","charSet","challenge","checked","cite","classID","cols","colSpan","content","contentEditable","contextMenu","controls","coords","crossOrigin","dateTime","default","defer","disabled","download","draggable","encType","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","height","hidden","high","href","hrefLang","htmlFor","httpEquiv","icon","id","inputMode","integrity","is","keyParams","keyType","kind","label","lang","list","loop","low","manifest","marginHeight","marginWidth","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","noValidate","open","optimum","pattern","placeholder","playsInline","poster","preload","profile","radioGroup","readOnly","referrerPolicy","rel","required","reversed","role","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","sizes","span","spellCheck","src","srcDoc","srcLang","srcSet","start","step","style","summary","tabIndex","useMap","width","wmode","wrap","about","datatype","inlist","resource","typeof","vocab","autoCapitalize","autoCorrect","autoSave","color","itemProp","itemScope","itemType","itemID","itemRef","results","security","unselectable","svgProps","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseProfile","baselineShift","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipRule","clipPathUnits","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","ideographic","imageRendering","in","in2","intercept","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerMid","markerStart","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textRendering","textLength","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","values","vectorEffect","vertAdvY","vertOriginX","vertOriginY","viewBox","viewTarget","visibility","widths","wordSpacing","writingMode","xHeight","x1","x2","xChannelSelector","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlns","xmlnsXlink","xmlLang","xmlSpace","y1","y2","yChannelSelector","zoomAndPan","isCustomAttribute","RegExp","test","bind","validAttr","determineTheme","fallbackTheme","defaultProps","isDefaultTheme","theme","createBroadcast","initialState","publish","nextState","state","listener","subscribe","currentId","unsubscribe","unsubID","CHANNEL","CHANNEL_NEXT","CONTEXT_CHANNEL_SHAPE","getTheme","func","warnChannelDeprecated","cb","called","error","unsubscribeToOuterId","componentWillMount","outerContext","context","outerTheme","broadcast","_babelHelpers$extends","_this3","subscriber","unsubscribeId","componentWillReceiveProps","nextProps","componentWillUnmount","passedTheme","mergedTheme","contextTypes","escapeRegex","multiDashRegex","STATIC_EXECUTION_CONTEXT","isStaticRules","rule","domElements","replaceWhitespace","Component$$1","_WithTheme$contextTyp","componentName","isStyledComponent$$1","WithTheme","_React$Component","_temp","_ret","styledContext","themeProp","NODE_ENV","setState","nextTheme","oldState","innerRef","Component","ComponentStyle","nameGenerator","isStatic","generateAndInjectStyles","styleSheet","lastClassName","existingName","generateName","constructWithOptions","componentConstructor","options","templateFunction","withConfig","config","StyledComponent","identifiers","generateId","_displayName","parentComponentId","nr","BaseStyledComponent","generatedClassName","unsubscribeFromContext","buildExecutionContext","_constructor","componentStyle","warnTooManyClasses","_generatedClassName","_this4","_constructor2","isTargetTag","Boolean","baseProps","propsForElement","propName","createStyledComponent","_StyledComponent$cont","_options$displayName","_options$componentId","_options$ParentCompon","ParentComponent","extendingRules","_ParentComponent","withComponent","previousComponentId","optionsToCopy","newComponentId","newOptions","rulesFromOptions","newRules","JSON","stringify","generatedCSS","styled","styledComponent","domElement","lossFunctionFromString","lossFunctions","linalg_1","Layer","canvas","image","transformation","aspectMatrixBuffer","viewMatrixBuffer","resize","clientWidth","window","devicePixelRatio","clientHeight","getAspect","viewAspect","textAspect","getViewMatrix","aspect","LossFunction","L1","L2","MAPE","MRSE","SMAPE","SSIM","parseExr","url","pool","parse","loadImage","suffix","pop","toLocaleLowerCase","loadExr","loadLdr","time","fetch","then","timeEnd","arrayBuffer","Promise","resolve","reject","Image","onerror","onload","ctx","getContext","drawImage","nChannels","getPixelColor","getColorFnc","pixelColorCache","ctx_1","X","Y","C","getImageData","__assign","t","ExrParserWorker","ExrParserPool","nWorkers","nextWorkerId","jobId","returnHandlers","workers","worker","onmessage","handleResult","nextWorker","event","success","message","postMessage","callback","Map","ImageCache","images","downloading","contains","currentlyDownloading","load","store","imagePromise","makeEmptyFunction","arg","emptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","invariant","condition","f","validateFormat","argIndex","framesToPop","__extends","extendStatics","__","React","ImageLayer_1","TextLayer_1","MouseLayer_1","styled_components_1","StretchingCanvas","_a","raw","StretchingDiv","_b","div","ImageFrame","_super","defaultTransformation","handleTransformationChange","componentDidMount","imageLayer","imageLayerElement","textLayer","textLayerElement","mouseLayer","mouseLayerElement","enableMouseEvents","onTransformationChange","updateCanvasProps","componentDidUpdate","prevProps","setEnableMouseEvents","onPointAt","destruct","setDefaultTransformation","setTransformation","getTransformation","allowMovement","onTransform","previousProps","viewTransform","exposure","gamma","setTonemapping","setImage","onPoint","compileShader","gl","shader","createShader","shaderSource","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","DrawMode","cached_function_1","Layer_1","ViewTransform","fragmentShaderSource","None","Gamma22","K1S1","LDR","HDR","imageVertices","colorMapTexels","Uint8Array","defaultTonemapping","ImageLayer","tonemappingSettings","needsRerender","checkRender","invalidate","initWebGl","getTexture","createTexture","requestAnimationFrame","tonemapping","draw","cmapTexture","viewport","drawingBufferWidth","drawingBufferHeight","uniform1i","glUniforms","uniform1f","clear","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","bindBuffer","ARRAY_BUFFER","quadVertexBuffer","vertexAttribPointer","glAttributes","vertexPosition","FLOAT","BYTES_PER_ELEMENT","vertexTextureCoordinate","imageHeight","imageWidth","drawMode","ColorMap","lossFunction","activeTexture","TEXTURE0","bindTexture","TEXTURE_2D","imageA","imASampler","TEXTURE1","imageB","imBSampler","TEXTURE2","cmapSampler","viewMatrix","uniformMatrix4fv","drawArrays","TRIANGLE_STRIP","getExtension","clearColor","enable","DEPTH_TEST","program","initShaders","initQuadVertexBuffer","initAttributes","initUniforms","initCmapTexture","vertexShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","createProgram","attachShader","linkProgram","getProgramParameter","LINK_STATUS","useProgram","texImage2D","RGBA","UNSIGNED_BYTE","texParameteri","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","createBuffer","bufferData","STATIC_DRAW","attributes","getAttribLocation","enableVertexAttribArray","getUniformLocation","location","texture","LUMINANCE","RGB","NEAREST","image_loading_1","TextLayer","leftTop","rightBottom","mvMatrix","invMvMatrix","convertClipToRaster","px","py","qx","qy","lineHeight","nx","ny","clearRect","font","convertRasterToClip","g","fillStyle","fillText","toFixed","out","xres","yres","normalizeWheel","MouseLayer","panningState","unsubscribeFunctions","handleMouseMove","handleMouseDown","handleMouseUp","handleScroll","handlePointReporting","addEventListener","removeEventListener","transformationCallback","pointCallback","fn","relativeMousePosition","clientX","clientY","previousMouse","mousePosition","transformationAtStart","preventDefault","pixelY","mouse","deltaMatrix","scaleFactor","pow","imageCoordinates","canvasToImage","getBoundingClientRect","left","top","point","inverseViewMatrix","warning","printWarning","_len2","_key2","renderViewer","elem","baseUrl","component","ImageViewer_1","sortMenu","removeCommonPrefix","ReactDOM","ImageFrame_1","ImageViewer","cachedFunction","cachedValues","input","cachedResult","Worker","sX","sY","pX","pY","detail","wheelDelta","wheelDeltaY","wheelDeltaX","axis","HORIZONTAL_AXIS","PIXEL_STEP","deltaY","deltaX","deltaMode","LINE_HEIGHT","PAGE_HEIGHT","spinX","spinY","pixelX","UserAgent_DEPRECATED","isEventSupported","getEventType","firefox","_populate","_populated","uas","navigator","userAgent","agent","exec","os","_iphone","_ipad","_android","_native","_mobile","_win64","_ie","parseFloat","NaN","documentMode","trident","_ie_real_version","_firefox","_opera","_webkit","_chrome","ver","_osx","_windows","_linux","ie","ieCompatibilityMode","ie64","opera","webkit","safari","chrome","windows","osx","linux","iphone","mobile","nativeApp","android","ipad","eventNameSuffix","ExecutionEnvironment","canUseDOM","eventName","isSupported","element","useHasFeature","implementation","hasFeature","canUseWorkers","canUseEventListeners","attachEvent","canUseViewport","screen","isInWorker","isObjectObject","isObject","ctor","prot","val","compile","parent","current","body","bracket","comment","parentheses","quote","first","second","tail","trail","peak","counter","atrule","pseudo","caret","insert","eof","eol","char","child","flat","formatptn","SPACE","TAB","SEMICOLON","CARRIAGE","NEWLINE","charAt","OPENBRACES","COMMA","CLOSEBRACES","NULL","nullptn","AT","DOCUMENT","MEDIA","SUPPORTS","preserve","plugged","select","proxy","ATRUL","line","column","KEYFRAME","keyframeptn","keyed","vendor","DASH","PROPS","IMPORT","CHARSET","TILDE","GREATERTHAN","STAR","PLUS","FOWARDSLASH","COLON","unkwn","UNKWN","FORMFEED","VERTICALTAB","AND","PLACEHOLDER","READONLY","DOUBLEQUOTE","SINGLEQUOTE","OPENBRACKET","CLOSEBRACKET","CLOSEPARENTHESES","OPENPARENTHESES","nscopealt","nscope","isolate","BLCKS","readonlyptn","moz","plcholdrptn","ms","selectors","selectorptn","level","andptn","escape","escapeptn","third","cache","index","animation","substring","cursorptn","colonptn","transformptn","writingptn","declare","animationptn","items","propertiesptn","UNDERSCORE","isNaN","padding","elements","elementptn","pseudoptn","parents","next","plugins","minify","beforeptn","afterptn","tailptn","whiteptn","use","plugin","Function","ns","invalidptn","PREPS","POSTS","REACT_ELEMENT_TYPE","Symbol","for","isValidElement","$$typeof","ReactPropTypesSecret","checkPropTypes","throwOnDirectAccess","getIteratorFn","maybeIterable","iteratorFn","ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","PropTypeError","stack","createChainableTypeChecker","validate","checkType","propFullName","secret","ANONYMOUS","cacheKey","manualPropTypeCallCache","manualPropTypeWarningCount","chainedCheckType","createPrimitiveTypeChecker","expectedType","propValue","getPropType","getPreciseType","createArrayOfTypeChecker","typeChecker","createInstanceTypeChecker","expectedClass","expectedClassName","getClassName","createEnumTypeChecker","expectedValues","createObjectOfTypeChecker","propType","createUnionTypeChecker","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","createShapeTypeChecker","shapeTypes","createStrictShapeTypeChecker","allKeys","isNode","every","iterator","entries","done","entry","isSymbol","Date","ReactPropTypes","bool","number","symbol","any","arrayOf","node","objectOf","oneOf","exact","PropTypes","toObject","getOwnPropertySymbols","propIsEnumerable","propertyIsEnumerable","test1","String","getOwnPropertyNames","test2","fromCharCode","test3","letter","err","symbols","typeSpecs","getStack","typeSpecName","ex","loggedTypeFailures","shim","getShim","isFunction","alert","confirm","prompt","REACT_STATICS","getDefaultProps","mixins","KNOWN_STATICS","caller","arity","isGetOwnPropertySymbolsAvailable","targetComponent","sourceComponent","customStatics","number_aware_compare_1","fullscreen_1","HelpScreen_1","ImageFrameWithLoading_1","navigation_1","MainDiv","ImageArea","SHIFT_IS_DOWN","ev","menuData","sortMenuRows","activeRow","selection","getDefaultSelection","helpIsOpen","transformationNeedsUpdate","hasFocus","keyboardHandler","setFocus","unsetFocus","mainContainer","imageFrame","validateSelection","activeRows","imageSpec","row","NavRow","handleClick","navigateTo","active","tonemapGroup","frame","tree","res","find","sort","currentImage","currentSelection","shift","item","img","lossMap","function","urlA","urlB","rowIndex","wishes","candidate","dumpTransformation","log","actions","actionsUnderShift","goToNumber","goTo","moveInLine","currentTitle","findIndex","nextIndex","ArrowLeft","ArrowRight","moveUpDown","nextRow","ArrowUp","ArrowDown","abs","changeExposure","multiplier","E","Escape","metaKey","altKey","ctrlKey","shiftKey","numberAwareCompare","aComponents","splitPartsPattern","bComponents","currentA","currentB","aAsInteger","parseInt","bAsInteger","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","Element","ALLOW_KEYBOARD_INPUT","HelpScreenDiv","LoadingOverlay","ImageFrameWithLoading","requestId","currentRequest","isLoading","errorMsg","handleImageChange","shouldSetLoadingState","handledRequest","downloadImage","catch","spec","all","commonPrefix","reverse","NavLink","NavRowDiv","NavLinkNumber","_c","trimmedTitles","titlesInRow","prefix_1","suffix_1","lastIndexOf","common","commonLength"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,SAAAA,QAAA,cACA,kBAAAC,gBAAAC,IACAD,OAAA,6BAAAJ,GACA,gBAAAC,SACAA,QAAA,KAAAD,EAAAG,QAAA,SAAAA,QAAA,cAEAJ,EAAA,KAAAC,EAAAD,EAAA,MAAAA,EAAA,WACCO,KAAA,SAAAC,EAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAV,OAGA,IAAAC,GAAAU,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAb,WAUA,OANAQ,GAAAE,GAAAI,KAAAb,EAAAD,QAAAC,IAAAD,QAAAS,GAGAR,EAAAY,GAAA,EAGAZ,EAAAD,QAvBA,GAAAW,KA4DA,OAhCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAAAjB,EAAAkB,EAAAC,GACAV,EAAAW,EAAApB,EAAAkB,IACAG,OAAAC,eAAAtB,EAAAkB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAAzB,GACA,GAAAkB,GAAAlB,KAAA0B,WACA,WAA2B,MAAA1B,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAQ,GAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAjB,KAAAc,EAAAC,IAGtDpB,EAAAuB,EAAA,IAGAvB,IAAAwB,EAAA,MDgBM,SAAUhC,EAAQD,GE7ExBC,EAAAD,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OAAA52C,GAAA,CACA8pD,EAAA9pD,CACA,OAKA,MAAAu1C,GAAA9qC,MAAA,EAAAq/C,GAnBAjtD,EAAAD,QAAAitD","file":"jeri.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Jeri\", [\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Jeri\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"Jeri\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_15__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Jeri\", [\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Jeri\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"Jeri\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_15__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \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, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\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/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 14);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Prototype identity matrix\nvar IDENTITY4x4 = new Float32Array(16);\nfor (var i = 0; i < 4; ++i) {\n IDENTITY4x4[i + 4 * i] = 1.0;\n}\nvar Matrix4x4 = /** @class */ (function () {\n function Matrix4x4(buffer) {\n if (buffer === void 0) { buffer = IDENTITY4x4; }\n this.data = new Float32Array(buffer);\n }\n Matrix4x4.create = function () {\n return new Matrix4x4;\n };\n Matrix4x4.fromScaling = function (matrix, scaling) {\n if (scaling.length !== 3) {\n throw new Error('Matrix4x4.fromScaling requires a 3-dimentional vector as input');\n }\n scaling.forEach(function (scale, i) {\n matrix.data[i + 4 * i] = scale;\n });\n };\n Matrix4x4.multiply = function (output, a, b) {\n var data = new Float32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);\n for (var i = 0; i < 4; ++i) {\n for (var j = 0; j < 4; ++j) {\n for (var k = 0; k < 4; ++k) {\n data[4 * j + i] += a.data[4 * k + i] * b.data[4 * j + k];\n }\n }\n }\n output.data = data;\n };\n Matrix4x4.scale = function (output, a, scale) {\n if (scale.length !== 3) {\n throw new Error('Matrix4x4.scale expects the third argument to have 3 numbers');\n }\n var data = new Float32Array(a.data);\n for (var i = 0; i < 3; ++i) {\n for (var j = 0; j < 4; ++j) {\n data[4 * i + j] *= scale[i];\n }\n }\n output.data = data;\n };\n Matrix4x4.translate = function (output, a, translation) {\n if (translation.length !== 3) {\n throw new Error('Matrix4x4.translate expects the third argument to have 3 numbers');\n }\n var data = new Float32Array(a.data);\n for (var i = 0; i < 4; ++i) {\n for (var j = 0; j < 3; ++j) {\n data[12 + i] += a.data[4 * j + i] * translation[j];\n }\n }\n output.data = data;\n };\n Matrix4x4.clone = function (a) {\n return new Matrix4x4(a.data);\n };\n Matrix4x4.invert = function (output, matrix) {\n var m = matrix.data;\n var o = output.data;\n // tslint:disable:whitespace\n // tslint:disable:max-line-length\n o[0] = -m[7] * m[10] * m[13] + m[6] * m[11] * m[13] + m[7] * m[9] * m[14] - m[5] * m[11] * m[14] - m[6] * m[9] * m[15] + m[5] * m[10] * m[15];\n o[1] = m[3] * m[10] * m[13] - m[2] * m[11] * m[13] - m[3] * m[9] * m[14] + m[1] * m[11] * m[14] + m[2] * m[9] * m[15] - m[1] * m[10] * m[15];\n o[2] = -m[3] * m[6] * m[13] + m[2] * m[7] * m[13] + m[3] * m[5] * m[14] - m[1] * m[7] * m[14] - m[2] * m[5] * m[15] + m[1] * m[6] * m[15];\n o[3] = m[3] * m[6] * m[9] - m[2] * m[7] * m[9] - m[3] * m[5] * m[10] + m[1] * m[7] * m[10] + m[2] * m[5] * m[11] - m[1] * m[6] * m[11];\n o[4] = m[7] * m[10] * m[12] - m[6] * m[11] * m[12] - m[7] * m[8] * m[14] + m[4] * m[11] * m[14] + m[6] * m[8] * m[15] - m[4] * m[10] * m[15];\n o[5] = -m[3] * m[10] * m[12] + m[2] * m[11] * m[12] + m[3] * m[8] * m[14] - m[0] * m[11] * m[14] - m[2] * m[8] * m[15] + m[0] * m[10] * m[15];\n o[6] = m[3] * m[6] * m[12] - m[2] * m[7] * m[12] - m[3] * m[4] * m[14] + m[0] * m[7] * m[14] + m[2] * m[4] * m[15] - m[0] * m[6] * m[15];\n o[7] = -m[3] * m[6] * m[8] + m[2] * m[7] * m[8] + m[3] * m[4] * m[10] - m[0] * m[7] * m[10] - m[2] * m[4] * m[11] + m[0] * m[6] * m[11];\n o[8] = -m[7] * m[9] * m[12] + m[5] * m[11] * m[12] + m[7] * m[8] * m[13] - m[4] * m[11] * m[13] - m[5] * m[8] * m[15] + m[4] * m[9] * m[15];\n o[9] = m[3] * m[9] * m[12] - m[1] * m[11] * m[12] - m[3] * m[8] * m[13] + m[0] * m[11] * m[13] + m[1] * m[8] * m[15] - m[0] * m[9] * m[15];\n o[10] = -m[3] * m[5] * m[12] + m[1] * m[7] * m[12] + m[3] * m[4] * m[13] - m[0] * m[7] * m[13] - m[1] * m[4] * m[15] + m[0] * m[5] * m[15];\n o[11] = m[3] * m[5] * m[8] - m[1] * m[7] * m[8] - m[3] * m[4] * m[9] + m[0] * m[7] * m[9] + m[1] * m[4] * m[11] - m[0] * m[5] * m[11];\n o[12] = m[6] * m[9] * m[12] - m[5] * m[10] * m[12] - m[6] * m[8] * m[13] + m[4] * m[10] * m[13] + m[5] * m[8] * m[14] - m[4] * m[9] * m[14];\n o[13] = -m[2] * m[9] * m[12] + m[1] * m[10] * m[12] + m[2] * m[8] * m[13] - m[0] * m[10] * m[13] - m[1] * m[8] * m[14] + m[0] * m[9] * m[14];\n o[14] = m[2] * m[5] * m[12] - m[1] * m[6] * m[12] - m[2] * m[4] * m[13] + m[0] * m[6] * m[13] + m[1] * m[4] * m[14] - m[0] * m[5] * m[14];\n o[15] = -m[2] * m[5] * m[8] + m[1] * m[6] * m[8] + m[2] * m[4] * m[9] - m[0] * m[6] * m[9] - m[1] * m[4] * m[10] + m[0] * m[5] * m[10];\n // tslint:enable:whitespace\n // tslint:enable:max-line-length\n var determinant = m[0] * o[0] + m[1] * o[4] + m[2] * o[8] + m[3] * o[12];\n if (determinant === 0.0) {\n throw new Error('Matrix is not invertible.');\n }\n var inverseDeterminant = 1.0 / determinant;\n for (var i = 0; i < 16; ++i) {\n o[i] *= inverseDeterminant;\n }\n };\n return Matrix4x4;\n}());\nexports.Matrix4x4 = Matrix4x4;\nvar Vector4 = /** @class */ (function () {\n function Vector4() {\n this.data = new Float32Array([0, 0, 0, 0]);\n }\n Vector4.create = function () {\n return new Vector4;\n };\n Vector4.set = function (output, x, y, z, w) {\n output.data[0] = x;\n output.data[1] = y;\n output.data[2] = z;\n output.data[3] = w;\n };\n Vector4.fromValues = function (x, y, z, w) {\n var vector = new Vector4;\n Vector4.set(vector, x, y, z, w);\n return vector;\n };\n Vector4.transformMat4 = function (output, vector, matrix) {\n var v = vector.data;\n var m = matrix.data;\n var data = new Float32Array([0, 0, 0, 0]);\n for (var i = 0; i < 4; ++i) {\n for (var j = 0; j < 4; ++j) {\n data[i] += v[j] * m[4 * j + i];\n }\n }\n output.data = data;\n };\n return Vector4;\n}());\nexports.Vector4 = Vector4;\n// function assertEqual(a: mat4 | vec4, b: Matrix4x4 | Vector4, message: string): void {\n// for (let i = 0; i < a.length; ++i) {\n// if (Math.abs(a[i] - b.data[i]) > 0.001) {\n// throw new Error('Failed:' + message + '\\n' + a + '\\n' + b.data);\n// }\n// }\n// }\n// function test() {\n// const a = mat4.create();\n// const b = Matrix4x4.create();\n// assertEqual(a, b, 'after creation');\n// for (let ii = 0; ii < 16; ++ii) {\n// a[ii] = b.data[ii] = Math.random();\n// }\n// const c = mat4.create();\n// const d = Matrix4x4.create();\n// mat4.fromScaling(c, [4, 3, 2]);\n// Matrix4x4.fromScaling(d, [4, 3, 2]);\n// assertEqual(c, d, 'fromScaling');\n// mat4.translate(c, a, [2, 3, 4]);\n// Matrix4x4.translate(d, b, [2, 3, 4]);\n// // assertEqual(a, b, 'after translation ab');\n// assertEqual(c, d, 'after translation cd');\n// mat4.scale(a, c, [2, 3, 4]);\n// Matrix4x4.scale(b, d, [2, 3, 4]);\n// assertEqual(a, b, 'after scaling ab');\n// // assertEqual(c, d, 'after scaling cd');\n// mat4.translate(c, a, [2, 3, 4]);\n// Matrix4x4.translate(d, b, [2, 3, 4]);\n// // assertEqual(a, b, 'after translation again ab');\n// assertEqual(c, d, 'after translation again cd');\n// mat4.invert(a, c);\n// Matrix4x4.invert(b, d);\n// assertEqual(a, b, 'after invert ab');\n// assertEqual(c, d, 'after invert cd');\n// const e = mat4.create();\n// const f = Matrix4x4.create();\n// mat4.multiply(e, c, a);\n// Matrix4x4.multiply(f, d, b);\n// assertEqual(e, f, 'after multiply ef');\n// assertEqual(c, d, 'after multiply cd');\n// assertEqual(a, b, 'after multiply ab');\n// mat4.scale(a, c, [5, -3, 4]);\n// Matrix4x4.scale(b, d, [5, -3, 4]);\n// assertEqual(a, b, 'after scaling again ab');\n// assertEqual(c, d, 'after scaling again cd');\n// // assertEqual(c, d, 'after scaling cd');\n// const q = mat4.clone(a);\n// const i = Matrix4x4.clone(b);\n// assertEqual(q, i, 'after cloning');\n// const v1 = vec4.create();\n// const w1 = Vector4.create();\n// assertEqual(v1, w1, 'vectors after init');\n// vec4.set(v1, 3, 4, 5, 6);\n// Vector4.set(w1, 3, 4, 5, 6);\n// assertEqual(v1, w1, 'vectors after set');\n// const v2 = vec4.fromValues(6, 5, 4, 3);\n// const w2 = Vector4.fromValues(6, 5, 4, 3);\n// assertEqual(v2, w2, 'vectors after fromValues');\n// vec4.transformMat4(v1, v2, a);\n// Vector4.transformMat4(w1, w2, b);\n// assertEqual(v1, w1, 'vectors after tranformMat4');\n// }\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"css\", function() { return css; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keyframes\", function() { return keyframes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"injectGlobal\", function() { return injectGlobal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ThemeProvider\", function() { return ThemeProvider; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withTheme\", function() { return wrapWithTheme; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ServerStyleSheet\", function() { return ServerStyleSheet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StyleSheetManager\", function() { return StyleSheetManager; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_plain_object__ = __webpack_require__(23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_plain_object___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_plain_object__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_stylis__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_stylis___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_stylis__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_is_function__ = __webpack_require__(31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_is_function___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_is_function__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics__);\n\n\n\n\n\n\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar _uppercasePattern = /([A-Z])/g;\n\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenate$2(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\n\nvar hyphenate_1 = hyphenate$2;\n\nvar hyphenate = hyphenate_1;\n\nvar msPattern = /^ms-/;\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}\n\nvar hyphenateStyleName_1 = hyphenateStyleName;\n\n// \nvar objToCss = function objToCss(obj, prevKey) {\n var css = Object.keys(obj).filter(function (key) {\n var chunk = obj[key];\n return chunk !== undefined && chunk !== null && chunk !== false && chunk !== '';\n }).map(function (key) {\n if (__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(obj[key])) return objToCss(obj[key], key);\n return hyphenateStyleName_1(key) + ': ' + obj[key] + ';';\n }).join(' ');\n return prevKey ? prevKey + ' {\\n ' + css + '\\n}' : css;\n};\n\nvar flatten = function flatten(chunks, executionContext) {\n return chunks.reduce(function (ruleSet, chunk) {\n /* Remove falsey values */\n if (chunk === undefined || chunk === null || chunk === false || chunk === '') return ruleSet;\n /* Flatten ruleSet */\n if (Array.isArray(chunk)) return [].concat(ruleSet, flatten(chunk, executionContext));\n\n /* Handle other components */\n // $FlowFixMe not sure how to make this pass\n if (chunk.hasOwnProperty('styledComponentId')) return [].concat(ruleSet, ['.' + chunk.styledComponentId]);\n\n /* Either execute or defer the function */\n if (typeof chunk === 'function') {\n return executionContext ? ruleSet.concat.apply(ruleSet, flatten([chunk(executionContext)], executionContext)) : ruleSet.concat(chunk);\n }\n\n /* Handle objects */\n // $FlowFixMe have to add %checks somehow to isPlainObject\n return ruleSet.concat(__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(chunk) ? objToCss(chunk) : chunk.toString());\n }, []);\n};\n\n// \nvar stylis = new __WEBPACK_IMPORTED_MODULE_1_stylis___default.a({\n global: false,\n cascade: true,\n keyframe: false,\n prefix: true,\n compress: false,\n semicolon: true\n});\n\nvar stringifyRules = function stringifyRules(rules, selector, prefix) {\n var flatCSS = rules.join('').replace(/^\\s*\\/\\/.*$/gm, ''); // replace JS comments\n\n var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;\n\n return stylis(prefix || !selector ? '' : selector, cssStr);\n};\n\n// \nvar chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\nvar charsLength = chars.length;\n\n/* Some high number, usually 9-digit base-10. Map it to base-😎 */\nvar generateAlphabeticName = function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = chars[x % charsLength] + name;\n }\n\n return chars[x % charsLength] + name;\n};\n\n// \n\n\nvar interleave = (function (strings, interpolations) {\n return interpolations.reduce(function (array, interp, i) {\n return array.concat(interp, strings[i + 1]);\n }, [strings[0]]);\n});\n\n// \nvar css = (function (strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n return flatten(interleave(strings, interpolations));\n});\n\n// \nvar SC_COMPONENT_ID = /^[^\\S\\n]*?\\/\\* sc-component-id:\\s+(\\S+)\\s+\\*\\//mg;\n\nvar extractCompsFromCSS = (function (maybeCSS) {\n var css = '' + (maybeCSS || ''); // Definitely a string, and a clone\n var existingComponents = [];\n css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {\n existingComponents.push({ componentId: componentId, matchIndex: matchIndex });\n return match;\n });\n return existingComponents.map(function (_ref, i) {\n var componentId = _ref.componentId,\n matchIndex = _ref.matchIndex;\n\n var nextComp = existingComponents[i + 1];\n var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);\n return { componentId: componentId, cssFromDOM: cssFromDOM };\n });\n});\n\n// \n/* eslint-disable camelcase, no-undef */\n\nvar getNonce = (function () {\n return true ? __webpack_require__.nc : null;\n});\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\n\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n// \n/* eslint-disable no-underscore-dangle */\n/*\n * Browser Style Sheet with Rehydration\n *\n * <style data-styled-components=\"x y z\"\n * data-styled-components-is-local=\"true\">\n * /· sc-component-id: a ·/\n * .sc-a { ... }\n * .x { ... }\n * /· sc-component-id: b ·/\n * .sc-b { ... }\n * .y { ... }\n * .z { ... }\n * </style>\n *\n * Note: replace · with * in the above snippet.\n * */\nvar COMPONENTS_PER_TAG = 40;\n\nvar BrowserTag = function () {\n function BrowserTag(el, isLocal) {\n var existingSource = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n classCallCheck(this, BrowserTag);\n\n this.el = el;\n this.isLocal = isLocal;\n this.ready = false;\n\n var extractedComps = extractCompsFromCSS(existingSource);\n\n this.size = extractedComps.length;\n this.components = extractedComps.reduce(function (acc, obj) {\n acc[obj.componentId] = obj; // eslint-disable-line no-param-reassign\n return acc;\n }, {});\n }\n\n BrowserTag.prototype.isFull = function isFull() {\n return this.size >= COMPONENTS_PER_TAG;\n };\n\n BrowserTag.prototype.addComponent = function addComponent(componentId) {\n if (!this.ready) this.replaceElement();\n if (this.components[componentId]) throw new Error('Trying to add Component \\'' + componentId + '\\' twice!');\n\n var comp = { componentId: componentId, textNode: document.createTextNode('') };\n this.el.appendChild(comp.textNode);\n\n this.size += 1;\n this.components[componentId] = comp;\n };\n\n BrowserTag.prototype.inject = function inject(componentId, css, name) {\n if (!this.ready) this.replaceElement();\n var comp = this.components[componentId];\n\n if (!comp) throw new Error('Must add a new component before you can inject css into it');\n if (comp.textNode.data === '') comp.textNode.appendData('\\n/* sc-component-id: ' + componentId + ' */\\n');\n\n comp.textNode.appendData(css);\n if (name) {\n var existingNames = this.el.getAttribute(SC_ATTR);\n this.el.setAttribute(SC_ATTR, existingNames ? existingNames + ' ' + name : name);\n }\n\n var nonce = getNonce();\n\n if (nonce) {\n this.el.setAttribute('nonce', nonce);\n }\n };\n\n BrowserTag.prototype.toHTML = function toHTML() {\n return this.el.outerHTML;\n };\n\n BrowserTag.prototype.toReactElement = function toReactElement() {\n throw new Error('BrowserTag doesn\\'t implement toReactElement!');\n };\n\n BrowserTag.prototype.clone = function clone() {\n throw new Error('BrowserTag cannot be cloned!');\n };\n\n /* Because we care about source order, before we can inject anything we need to\n * create a text node for each component and replace the existing CSS. */\n\n\n BrowserTag.prototype.replaceElement = function replaceElement() {\n var _this = this;\n\n this.ready = true;\n // We have nothing to inject. Use the current el.\n if (this.size === 0) return;\n\n // Build up our replacement style tag\n var newEl = this.el.cloneNode();\n newEl.appendChild(document.createTextNode('\\n'));\n\n Object.keys(this.components).forEach(function (key) {\n var comp = _this.components[key];\n\n // eslint-disable-next-line no-param-reassign\n comp.textNode = document.createTextNode(comp.cssFromDOM);\n newEl.appendChild(comp.textNode);\n });\n\n if (!this.el.parentNode) throw new Error(\"Trying to replace an element that wasn't mounted!\");\n\n // The ol' switcheroo\n this.el.parentNode.replaceChild(newEl, this.el);\n this.el = newEl;\n };\n\n return BrowserTag;\n}();\n\n/* Factory function to separate DOM operations from logical ones*/\n\n\nvar BrowserStyleSheet = {\n create: function create() {\n var tags = [];\n var names = {};\n\n /* Construct existing state from DOM */\n var nodes = document.querySelectorAll('[' + SC_ATTR + ']');\n var nodesLength = nodes.length;\n\n for (var i = 0; i < nodesLength; i += 1) {\n var el = nodes[i];\n\n tags.push(new BrowserTag(el, el.getAttribute(LOCAL_ATTR) === 'true', el.innerHTML));\n\n var attr = el.getAttribute(SC_ATTR);\n if (attr) {\n attr.trim().split(/\\s+/).forEach(function (name) {\n names[name] = true;\n });\n }\n }\n\n /* Factory for making more tags */\n var tagConstructor = function tagConstructor(isLocal) {\n var el = document.createElement('style');\n el.type = 'text/css';\n el.setAttribute(SC_ATTR, '');\n el.setAttribute(LOCAL_ATTR, isLocal ? 'true' : 'false');\n if (!document.head) throw new Error('Missing document <head>');\n document.head.appendChild(el);\n return new BrowserTag(el, isLocal);\n };\n\n return new StyleSheet(tagConstructor, tags, names);\n }\n};\n\n// \nvar SC_ATTR = 'data-styled-components';\nvar LOCAL_ATTR = 'data-styled-components-is-local';\nvar CONTEXT_KEY = '__styled-components-stylesheet__';\n\nvar instance = null;\n// eslint-disable-next-line no-use-before-define\nvar clones = [];\n\nvar StyleSheet = function () {\n function StyleSheet(tagConstructor) {\n var tags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var names = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, StyleSheet);\n this.hashes = {};\n this.deferredInjections = {};\n this.stylesCacheable = typeof document !== 'undefined';\n\n this.tagConstructor = tagConstructor;\n this.tags = tags;\n this.names = names;\n this.constructComponentTagMap();\n }\n\n // helper for `ComponentStyle` to know when it cache static styles.\n // staticly styled-component can not safely cache styles on the server\n // without all `ComponentStyle` instances saving a reference to the\n // the styleSheet instance they last rendered with,\n // or listening to creation / reset events. otherwise you might create\n // a component with one stylesheet and render it another api response\n // with another, losing styles on from your server-side render.\n\n\n StyleSheet.prototype.constructComponentTagMap = function constructComponentTagMap() {\n var _this = this;\n\n this.componentTags = {};\n\n this.tags.forEach(function (tag) {\n Object.keys(tag.components).forEach(function (componentId) {\n _this.componentTags[componentId] = tag;\n });\n });\n };\n\n /* Best level of caching—get the name from the hash straight away. */\n\n\n StyleSheet.prototype.getName = function getName(hash) {\n return this.hashes[hash.toString()];\n };\n\n /* Second level of caching—if the name is already in the dom, don't\n * inject anything and record the hash for getName next time. */\n\n\n StyleSheet.prototype.alreadyInjected = function alreadyInjected(hash, name) {\n if (!this.names[name]) return false;\n\n this.hashes[hash.toString()] = name;\n return true;\n };\n\n /* Third type of caching—don't inject components' componentId twice. */\n\n\n StyleSheet.prototype.hasInjectedComponent = function hasInjectedComponent(componentId) {\n return !!this.componentTags[componentId];\n };\n\n StyleSheet.prototype.deferredInject = function deferredInject(componentId, isLocal, css) {\n if (this === instance) {\n clones.forEach(function (clone) {\n clone.deferredInject(componentId, isLocal, css);\n });\n }\n\n this.getOrCreateTag(componentId, isLocal);\n this.deferredInjections[componentId] = css;\n };\n\n StyleSheet.prototype.inject = function inject(componentId, isLocal, css, hash, name) {\n if (this === instance) {\n clones.forEach(function (clone) {\n clone.inject(componentId, isLocal, css);\n });\n }\n\n var tag = this.getOrCreateTag(componentId, isLocal);\n\n var deferredInjection = this.deferredInjections[componentId];\n if (deferredInjection) {\n tag.inject(componentId, deferredInjection);\n delete this.deferredInjections[componentId];\n }\n\n tag.inject(componentId, css, name);\n\n if (hash && name) {\n this.hashes[hash.toString()] = name;\n }\n };\n\n StyleSheet.prototype.toHTML = function toHTML() {\n return this.tags.map(function (tag) {\n return tag.toHTML();\n }).join('');\n };\n\n StyleSheet.prototype.toReactElements = function toReactElements() {\n return this.tags.map(function (tag, i) {\n return tag.toReactElement('sc-' + i);\n });\n };\n\n StyleSheet.prototype.getOrCreateTag = function getOrCreateTag(componentId, isLocal) {\n var existingTag = this.componentTags[componentId];\n if (existingTag) {\n return existingTag;\n }\n\n var lastTag = this.tags[this.tags.length - 1];\n var componentTag = !lastTag || lastTag.isFull() || lastTag.isLocal !== isLocal ? this.createNewTag(isLocal) : lastTag;\n this.componentTags[componentId] = componentTag;\n componentTag.addComponent(componentId);\n return componentTag;\n };\n\n StyleSheet.prototype.createNewTag = function createNewTag(isLocal) {\n var newTag = this.tagConstructor(isLocal);\n this.tags.push(newTag);\n return newTag;\n };\n\n StyleSheet.reset = function reset(isServer) {\n instance = StyleSheet.create(isServer);\n };\n\n /* We can make isServer totally implicit once Jest 20 drops and we\n * can change environment on a per-test basis. */\n\n\n StyleSheet.create = function create() {\n var isServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : typeof document === 'undefined';\n\n return (isServer ? ServerStyleSheet : BrowserStyleSheet).create();\n };\n\n StyleSheet.clone = function clone(oldSheet) {\n var newSheet = new StyleSheet(oldSheet.tagConstructor, oldSheet.tags.map(function (tag) {\n return tag.clone();\n }), _extends({}, oldSheet.names));\n\n newSheet.hashes = _extends({}, oldSheet.hashes);\n newSheet.deferredInjections = _extends({}, oldSheet.deferredInjections);\n clones.push(newSheet);\n\n return newSheet;\n };\n\n createClass(StyleSheet, null, [{\n key: 'instance',\n get: function get$$1() {\n return instance || (instance = StyleSheet.create());\n }\n }]);\n return StyleSheet;\n}();\n\nvar _StyleSheetManager$ch;\n\n// \nvar StyleSheetManager = function (_Component) {\n inherits(StyleSheetManager, _Component);\n\n function StyleSheetManager() {\n classCallCheck(this, StyleSheetManager);\n return possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n StyleSheetManager.prototype.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[CONTEXT_KEY] = this.props.sheet, _ref;\n };\n\n StyleSheetManager.prototype.render = function render() {\n /* eslint-disable react/prop-types */\n // Flow v0.43.1 will report an error accessing the `children` property,\n // but v0.47.0 will not. It is necessary to use a type cast instead of\n // a \"fixme\" comment to satisfy both Flow versions.\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children);\n };\n\n return StyleSheetManager;\n}(__WEBPACK_IMPORTED_MODULE_2_react__[\"Component\"]);\n\nStyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired, _StyleSheetManager$ch);\n\nStyleSheetManager.propTypes = {\n sheet: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired\n};\n\n// \n/* eslint-disable no-underscore-dangle */\nvar ServerTag = function () {\n function ServerTag(isLocal) {\n classCallCheck(this, ServerTag);\n\n this.isLocal = isLocal;\n this.components = {};\n this.size = 0;\n this.names = [];\n }\n\n ServerTag.prototype.isFull = function isFull() {\n return false;\n };\n\n ServerTag.prototype.addComponent = function addComponent(componentId) {\n if (this.components[componentId]) throw new Error('Trying to add Component \\'' + componentId + '\\' twice!');\n this.components[componentId] = { componentId: componentId, css: '' };\n this.size += 1;\n };\n\n ServerTag.prototype.concatenateCSS = function concatenateCSS() {\n var _this = this;\n\n return Object.keys(this.components).reduce(function (styles, k) {\n return styles + _this.components[k].css;\n }, '');\n };\n\n ServerTag.prototype.inject = function inject(componentId, css, name) {\n var comp = this.components[componentId];\n\n if (!comp) throw new Error('Must add a new component before you can inject css into it');\n if (comp.css === '') comp.css = '/* sc-component-id: ' + componentId + ' */\\n';\n\n comp.css += css.replace(/\\n*$/, '\\n');\n\n if (name) this.names.push(name);\n };\n\n ServerTag.prototype.toHTML = function toHTML() {\n var attrs = ['type=\"text/css\"', SC_ATTR + '=\"' + this.names.join(' ') + '\"', LOCAL_ATTR + '=\"' + (this.isLocal ? 'true' : 'false') + '\"'];\n\n var nonce = getNonce();\n\n if (nonce) {\n attrs.push('nonce=\"' + nonce + '\"');\n }\n\n return '<style ' + attrs.join(' ') + '>' + this.concatenateCSS() + '</style>';\n };\n\n ServerTag.prototype.toReactElement = function toReactElement(key) {\n var _attrs;\n\n var attrs = (_attrs = {}, _attrs[SC_ATTR] = this.names.join(' '), _attrs[LOCAL_ATTR] = this.isLocal.toString(), _attrs);\n\n var nonce = getNonce();\n\n if (nonce) {\n attrs.nonce = nonce;\n }\n\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('style', _extends({\n key: key, type: 'text/css' }, attrs, {\n dangerouslySetInnerHTML: { __html: this.concatenateCSS() }\n }));\n };\n\n ServerTag.prototype.clone = function clone() {\n var _this2 = this;\n\n var copy = new ServerTag(this.isLocal);\n copy.names = [].concat(this.names);\n copy.size = this.size;\n copy.components = Object.keys(this.components).reduce(function (acc, key) {\n acc[key] = _extends({}, _this2.components[key]); // eslint-disable-line no-param-reassign\n return acc;\n }, {});\n\n return copy;\n };\n\n return ServerTag;\n}();\n\nvar ServerStyleSheet = function () {\n function ServerStyleSheet() {\n classCallCheck(this, ServerStyleSheet);\n\n this.instance = StyleSheet.clone(StyleSheet.instance);\n }\n\n ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {\n if (this.closed) throw new Error(\"Can't collect styles once you've called getStyleTags!\");\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(\n StyleSheetManager,\n { sheet: this.instance },\n children\n );\n };\n\n ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {\n if (!this.closed) {\n clones.splice(clones.indexOf(this.instance), 1);\n this.closed = true;\n }\n\n return this.instance.toHTML();\n };\n\n ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {\n if (!this.closed) {\n clones.splice(clones.indexOf(this.instance), 1);\n this.closed = true;\n }\n\n return this.instance.toReactElements();\n };\n\n ServerStyleSheet.create = function create() {\n return new StyleSheet(function (isLocal) {\n return new ServerTag(isLocal);\n });\n };\n\n return ServerStyleSheet;\n}();\n\n// \n\nvar LIMIT = 200;\n\nvar createWarnTooManyClasses = (function (displayName) {\n var generatedClasses = {};\n var warningSeen = false;\n\n return function (className) {\n if (!warningSeen) {\n generatedClasses[className] = true;\n if (Object.keys(generatedClasses).length >= LIMIT) {\n // Unable to find latestRule in test environment.\n /* eslint-disable no-console, prefer-template */\n console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \\n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\\n' + 'Example:\\n' + ' const Component = styled.div.attrs({\\n' + ' style: ({ background }) => ({\\n' + ' background,\\n' + ' }),\\n' + ' })`width: 100%;`\\n\\n' + ' <Component />');\n warningSeen = true;\n generatedClasses = {};\n }\n }\n };\n});\n\n// \n/* Trying to avoid the unknown-prop errors on styled components\n by filtering by React's attribute whitelist.\n */\n\n/* Logic copied from ReactDOMUnknownPropertyHook */\nvar reactProps = {\n children: true,\n dangerouslySetInnerHTML: true,\n key: true,\n ref: true,\n autoFocus: true,\n defaultValue: true,\n valueLink: true,\n defaultChecked: true,\n checkedLink: true,\n innerHTML: true,\n suppressContentEditableWarning: true,\n onFocusIn: true,\n onFocusOut: true,\n className: true,\n\n /* List copied from https://facebook.github.io/react/docs/events.html */\n onCopy: true,\n onCut: true,\n onPaste: true,\n onCompositionEnd: true,\n onCompositionStart: true,\n onCompositionUpdate: true,\n onKeyDown: true,\n onKeyPress: true,\n onKeyUp: true,\n onFocus: true,\n onBlur: true,\n onChange: true,\n onInput: true,\n onSubmit: true,\n onReset: true,\n onClick: true,\n onContextMenu: true,\n onDoubleClick: true,\n onDrag: true,\n onDragEnd: true,\n onDragEnter: true,\n onDragExit: true,\n onDragLeave: true,\n onDragOver: true,\n onDragStart: true,\n onDrop: true,\n onMouseDown: true,\n onMouseEnter: true,\n onMouseLeave: true,\n onMouseMove: true,\n onMouseOut: true,\n onMouseOver: true,\n onMouseUp: true,\n onSelect: true,\n onTouchCancel: true,\n onTouchEnd: true,\n onTouchMove: true,\n onTouchStart: true,\n onScroll: true,\n onWheel: true,\n onAbort: true,\n onCanPlay: true,\n onCanPlayThrough: true,\n onDurationChange: true,\n onEmptied: true,\n onEncrypted: true,\n onEnded: true,\n onError: true,\n onLoadedData: true,\n onLoadedMetadata: true,\n onLoadStart: true,\n onPause: true,\n onPlay: true,\n onPlaying: true,\n onProgress: true,\n onRateChange: true,\n onSeeked: true,\n onSeeking: true,\n onStalled: true,\n onSuspend: true,\n onTimeUpdate: true,\n onVolumeChange: true,\n onWaiting: true,\n onLoad: true,\n onAnimationStart: true,\n onAnimationEnd: true,\n onAnimationIteration: true,\n onTransitionEnd: true,\n\n onCopyCapture: true,\n onCutCapture: true,\n onPasteCapture: true,\n onCompositionEndCapture: true,\n onCompositionStartCapture: true,\n onCompositionUpdateCapture: true,\n onKeyDownCapture: true,\n onKeyPressCapture: true,\n onKeyUpCapture: true,\n onFocusCapture: true,\n onBlurCapture: true,\n onChangeCapture: true,\n onInputCapture: true,\n onSubmitCapture: true,\n onResetCapture: true,\n onClickCapture: true,\n onContextMenuCapture: true,\n onDoubleClickCapture: true,\n onDragCapture: true,\n onDragEndCapture: true,\n onDragEnterCapture: true,\n onDragExitCapture: true,\n onDragLeaveCapture: true,\n onDragOverCapture: true,\n onDragStartCapture: true,\n onDropCapture: true,\n onMouseDownCapture: true,\n onMouseEnterCapture: true,\n onMouseLeaveCapture: true,\n onMouseMoveCapture: true,\n onMouseOutCapture: true,\n onMouseOverCapture: true,\n onMouseUpCapture: true,\n onSelectCapture: true,\n onTouchCancelCapture: true,\n onTouchEndCapture: true,\n onTouchMoveCapture: true,\n onTouchStartCapture: true,\n onScrollCapture: true,\n onWheelCapture: true,\n onAbortCapture: true,\n onCanPlayCapture: true,\n onCanPlayThroughCapture: true,\n onDurationChangeCapture: true,\n onEmptiedCapture: true,\n onEncryptedCapture: true,\n onEndedCapture: true,\n onErrorCapture: true,\n onLoadedDataCapture: true,\n onLoadedMetadataCapture: true,\n onLoadStartCapture: true,\n onPauseCapture: true,\n onPlayCapture: true,\n onPlayingCapture: true,\n onProgressCapture: true,\n onRateChangeCapture: true,\n onSeekedCapture: true,\n onSeekingCapture: true,\n onStalledCapture: true,\n onSuspendCapture: true,\n onTimeUpdateCapture: true,\n onVolumeChangeCapture: true,\n onWaitingCapture: true,\n onLoadCapture: true,\n onAnimationStartCapture: true,\n onAnimationEndCapture: true,\n onAnimationIterationCapture: true,\n onTransitionEndCapture: true\n};\n\n/* From HTMLDOMPropertyConfig */\nvar htmlProps = {\n /**\n * Standard Properties\n */\n accept: true,\n acceptCharset: true,\n accessKey: true,\n action: true,\n allowFullScreen: true,\n allowTransparency: true,\n alt: true,\n // specifies target context for links with `preload` type\n as: true,\n async: true,\n autoComplete: true,\n // autoFocus is polyfilled/normalized by AutoFocusUtils\n // autoFocus: true,\n autoPlay: true,\n capture: true,\n cellPadding: true,\n cellSpacing: true,\n charSet: true,\n challenge: true,\n checked: true,\n cite: true,\n classID: true,\n className: true,\n cols: true,\n colSpan: true,\n content: true,\n contentEditable: true,\n contextMenu: true,\n controls: true,\n coords: true,\n crossOrigin: true,\n data: true, // For `<object />` acts as `src`.\n dateTime: true,\n default: true,\n defer: true,\n dir: true,\n disabled: true,\n download: true,\n draggable: true,\n encType: true,\n form: true,\n formAction: true,\n formEncType: true,\n formMethod: true,\n formNoValidate: true,\n formTarget: true,\n frameBorder: true,\n headers: true,\n height: true,\n hidden: true,\n high: true,\n href: true,\n hrefLang: true,\n htmlFor: true,\n httpEquiv: true,\n icon: true,\n id: true,\n inputMode: true,\n integrity: true,\n is: true,\n keyParams: true,\n keyType: true,\n kind: true,\n label: true,\n lang: true,\n list: true,\n loop: true,\n low: true,\n manifest: true,\n marginHeight: true,\n marginWidth: true,\n max: true,\n maxLength: true,\n media: true,\n mediaGroup: true,\n method: true,\n min: true,\n minLength: true,\n // Caution; `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`.\n multiple: true,\n muted: true,\n name: true,\n nonce: true,\n noValidate: true,\n open: true,\n optimum: true,\n pattern: true,\n placeholder: true,\n playsInline: true,\n poster: true,\n preload: true,\n profile: true,\n radioGroup: true,\n readOnly: true,\n referrerPolicy: true,\n rel: true,\n required: true,\n reversed: true,\n role: true,\n rows: true,\n rowSpan: true,\n sandbox: true,\n scope: true,\n scoped: true,\n scrolling: true,\n seamless: true,\n selected: true,\n shape: true,\n size: true,\n sizes: true,\n span: true,\n spellCheck: true,\n src: true,\n srcDoc: true,\n srcLang: true,\n srcSet: true,\n start: true,\n step: true,\n style: true,\n summary: true,\n tabIndex: true,\n target: true,\n title: true,\n // Setting .type throws on non-<input> tags\n type: true,\n useMap: true,\n value: true,\n width: true,\n wmode: true,\n wrap: true,\n\n /**\n * RDFa Properties\n */\n about: true,\n datatype: true,\n inlist: true,\n prefix: true,\n // property is also supported for OpenGraph in meta tags.\n property: true,\n resource: true,\n typeof: true,\n vocab: true,\n\n /**\n * Non-standard Properties\n */\n // autoCapitalize and autoCorrect are supported in Mobile Safari for\n // keyboard hints.\n autoCapitalize: true,\n autoCorrect: true,\n // autoSave allows WebKit/Blink to persist values of input fields on page reloads\n autoSave: true,\n // color is for Safari mask-icon link\n color: true,\n // itemProp, itemScope, itemType are for\n // Microdata support. See http://schema.org/docs/gs.html\n itemProp: true,\n itemScope: true,\n itemType: true,\n // itemID and itemRef are for Microdata support as well but\n // only specified in the WHATWG spec document. See\n // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api\n itemID: true,\n itemRef: true,\n // results show looking glass icon and recent searches on input\n // search fields in WebKit/Blink\n results: true,\n // IE-only attribute that specifies security restrictions on an iframe\n // as an alternative to the sandbox attribute on IE<10\n security: true,\n // IE-only attribute that controls focus behavior\n unselectable: 0\n};\n\nvar svgProps = {\n accentHeight: true,\n accumulate: true,\n additive: true,\n alignmentBaseline: true,\n allowReorder: true,\n alphabetic: true,\n amplitude: true,\n arabicForm: true,\n ascent: true,\n attributeName: true,\n attributeType: true,\n autoReverse: true,\n azimuth: true,\n baseFrequency: true,\n baseProfile: true,\n baselineShift: true,\n bbox: true,\n begin: true,\n bias: true,\n by: true,\n calcMode: true,\n capHeight: true,\n clip: true,\n clipPath: true,\n clipRule: true,\n clipPathUnits: true,\n colorInterpolation: true,\n colorInterpolationFilters: true,\n colorProfile: true,\n colorRendering: true,\n contentScriptType: true,\n contentStyleType: true,\n cursor: true,\n cx: true,\n cy: true,\n d: true,\n decelerate: true,\n descent: true,\n diffuseConstant: true,\n direction: true,\n display: true,\n divisor: true,\n dominantBaseline: true,\n dur: true,\n dx: true,\n dy: true,\n edgeMode: true,\n elevation: true,\n enableBackground: true,\n end: true,\n exponent: true,\n externalResourcesRequired: true,\n fill: true,\n fillOpacity: true,\n fillRule: true,\n filter: true,\n filterRes: true,\n filterUnits: true,\n floodColor: true,\n floodOpacity: true,\n focusable: true,\n fontFamily: true,\n fontSize: true,\n fontSizeAdjust: true,\n fontStretch: true,\n fontStyle: true,\n fontVariant: true,\n fontWeight: true,\n format: true,\n from: true,\n fx: true,\n fy: true,\n g1: true,\n g2: true,\n glyphName: true,\n glyphOrientationHorizontal: true,\n glyphOrientationVertical: true,\n glyphRef: true,\n gradientTransform: true,\n gradientUnits: true,\n hanging: true,\n horizAdvX: true,\n horizOriginX: true,\n ideographic: true,\n imageRendering: true,\n in: true,\n in2: true,\n intercept: true,\n k: true,\n k1: true,\n k2: true,\n k3: true,\n k4: true,\n kernelMatrix: true,\n kernelUnitLength: true,\n kerning: true,\n keyPoints: true,\n keySplines: true,\n keyTimes: true,\n lengthAdjust: true,\n letterSpacing: true,\n lightingColor: true,\n limitingConeAngle: true,\n local: true,\n markerEnd: true,\n markerMid: true,\n markerStart: true,\n markerHeight: true,\n markerUnits: true,\n markerWidth: true,\n mask: true,\n maskContentUnits: true,\n maskUnits: true,\n mathematical: true,\n mode: true,\n numOctaves: true,\n offset: true,\n opacity: true,\n operator: true,\n order: true,\n orient: true,\n orientation: true,\n origin: true,\n overflow: true,\n overlinePosition: true,\n overlineThickness: true,\n paintOrder: true,\n panose1: true,\n pathLength: true,\n patternContentUnits: true,\n patternTransform: true,\n patternUnits: true,\n pointerEvents: true,\n points: true,\n pointsAtX: true,\n pointsAtY: true,\n pointsAtZ: true,\n preserveAlpha: true,\n preserveAspectRatio: true,\n primitiveUnits: true,\n r: true,\n radius: true,\n refX: true,\n refY: true,\n renderingIntent: true,\n repeatCount: true,\n repeatDur: true,\n requiredExtensions: true,\n requiredFeatures: true,\n restart: true,\n result: true,\n rotate: true,\n rx: true,\n ry: true,\n scale: true,\n seed: true,\n shapeRendering: true,\n slope: true,\n spacing: true,\n specularConstant: true,\n specularExponent: true,\n speed: true,\n spreadMethod: true,\n startOffset: true,\n stdDeviation: true,\n stemh: true,\n stemv: true,\n stitchTiles: true,\n stopColor: true,\n stopOpacity: true,\n strikethroughPosition: true,\n strikethroughThickness: true,\n string: true,\n stroke: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeLinecap: true,\n strokeLinejoin: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n surfaceScale: true,\n systemLanguage: true,\n tableValues: true,\n targetX: true,\n targetY: true,\n textAnchor: true,\n textDecoration: true,\n textRendering: true,\n textLength: true,\n to: true,\n transform: true,\n u1: true,\n u2: true,\n underlinePosition: true,\n underlineThickness: true,\n unicode: true,\n unicodeBidi: true,\n unicodeRange: true,\n unitsPerEm: true,\n vAlphabetic: true,\n vHanging: true,\n vIdeographic: true,\n vMathematical: true,\n values: true,\n vectorEffect: true,\n version: true,\n vertAdvY: true,\n vertOriginX: true,\n vertOriginY: true,\n viewBox: true,\n viewTarget: true,\n visibility: true,\n widths: true,\n wordSpacing: true,\n writingMode: true,\n x: true,\n xHeight: true,\n x1: true,\n x2: true,\n xChannelSelector: true,\n xlinkActuate: true,\n xlinkArcrole: true,\n xlinkHref: true,\n xlinkRole: true,\n xlinkShow: true,\n xlinkTitle: true,\n xlinkType: true,\n xmlBase: true,\n xmlns: true,\n xmlnsXlink: true,\n xmlLang: true,\n xmlSpace: true,\n y: true,\n y1: true,\n y2: true,\n yChannelSelector: true,\n z: true,\n zoomAndPan: true\n};\n\n/* From DOMProperty */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nvar isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'));\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar validAttr = (function (name) {\n return hasOwnProperty.call(htmlProps, name) || hasOwnProperty.call(svgProps, name) || isCustomAttribute(name.toLowerCase()) || hasOwnProperty.call(reactProps, name);\n});\n\n// \n\n\nfunction isTag(target) /* : %checks */{\n return typeof target === 'string';\n}\n\n// \n\n\nfunction isStyledComponent(target) /* : %checks */{\n return typeof target === 'function' && typeof target.styledComponentId === 'string';\n}\n\n// \n\n/* eslint-disable no-undef */\nfunction getComponentName(target) {\n return target.displayName || target.name || 'Component';\n}\n\n// \n\n\nvar determineTheme = (function (props, fallbackTheme, defaultProps) {\n // Props should take precedence over ThemeProvider, which should take precedence over\n // defaultProps, but React automatically puts defaultProps on props.\n\n /* eslint-disable react/prop-types */\n var isDefaultTheme = defaultProps && props.theme === defaultProps.theme;\n var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme;\n /* eslint-enable */\n\n return theme;\n});\n\n// \n/**\n * Creates a broadcast that can be listened to, i.e. simple event emitter\n *\n * @see https://github.com/ReactTraining/react-broadcast\n */\n\nvar createBroadcast = function createBroadcast(initialState) {\n var listeners = {};\n var id = 0;\n var state = initialState;\n\n function publish(nextState) {\n state = nextState;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (var key in listeners) {\n var listener = listeners[key];\n if (listener === undefined) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n listener(state);\n }\n }\n\n function subscribe(listener) {\n var currentId = id;\n listeners[currentId] = listener;\n id += 1;\n listener(state);\n return currentId;\n }\n\n function unsubscribe(unsubID) {\n listeners[unsubID] = undefined;\n }\n\n return { publish: publish, subscribe: subscribe, unsubscribe: unsubscribe };\n};\n\n// \n// Helper to call a given function, only once\nvar once = (function (cb) {\n var called = false;\n\n return function () {\n if (!called) {\n called = true;\n cb();\n }\n };\n});\n\nvar _ThemeProvider$childC;\nvar _ThemeProvider$contex;\n\n// \n/* globals React$Element */\n// NOTE: DO NOT CHANGE, changing this is a semver major change!\nvar CHANNEL = '__styled-components__';\nvar CHANNEL_NEXT = CHANNEL + 'next__';\n\nvar CONTEXT_CHANNEL_SHAPE = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({\n getTheme: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n subscribe: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n unsubscribe: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func\n});\n\nvar warnChannelDeprecated = once(function () {\n // eslint-disable-next-line no-console\n console.error('Warning: Usage of `context.' + CHANNEL + '` as a function is deprecated. It will be replaced with the object on `.context.' + CHANNEL_NEXT + '` in a future version.');\n});\n/**\n * Provide a theme to an entire react component tree via context and event listeners (have to do\n * both context and event emitter as pure components block context updates)\n */\n\nvar ThemeProvider = function (_Component) {\n inherits(ThemeProvider, _Component);\n\n function ThemeProvider() {\n classCallCheck(this, ThemeProvider);\n\n var _this = possibleConstructorReturn(this, _Component.call(this));\n\n _this.unsubscribeToOuterId = -1;\n\n _this.getTheme = _this.getTheme.bind(_this);\n return _this;\n }\n\n ThemeProvider.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme\n // with the outer theme\n var outerContext = this.context[CHANNEL_NEXT];\n if (outerContext !== undefined) {\n this.unsubscribeToOuterId = outerContext.subscribe(function (theme) {\n _this2.outerTheme = theme;\n });\n }\n this.broadcast = createBroadcast(this.getTheme());\n };\n\n ThemeProvider.prototype.getChildContext = function getChildContext() {\n var _this3 = this,\n _babelHelpers$extends;\n\n return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL_NEXT] = {\n getTheme: this.getTheme,\n subscribe: this.broadcast.subscribe,\n unsubscribe: this.broadcast.unsubscribe\n }, _babelHelpers$extends[CHANNEL] = function (subscriber) {\n warnChannelDeprecated();\n\n // Patch the old `subscribe` provide via `CHANNEL` for older clients.\n var unsubscribeId = _this3.broadcast.subscribe(subscriber);\n return function () {\n return _this3.broadcast.unsubscribe(unsubscribeId);\n };\n }, _babelHelpers$extends));\n };\n\n ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) this.broadcast.publish(this.getTheme(nextProps.theme));\n };\n\n ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribeToOuterId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId);\n }\n };\n\n // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation\n\n\n ThemeProvider.prototype.getTheme = function getTheme(passedTheme) {\n var theme = passedTheme || this.props.theme;\n if (__WEBPACK_IMPORTED_MODULE_4_is_function___default()(theme)) {\n var mergedTheme = theme(this.outerTheme);\n if (!__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(mergedTheme)) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n return mergedTheme;\n }\n if (!__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(theme)) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n return _extends({}, this.outerTheme, theme);\n };\n\n ThemeProvider.prototype.render = function render() {\n if (!this.props.children) {\n return null;\n }\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children);\n };\n\n return ThemeProvider;\n}(__WEBPACK_IMPORTED_MODULE_2_react__[\"Component\"]);\n\nThemeProvider.childContextTypes = (_ThemeProvider$childC = {}, _ThemeProvider$childC[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _ThemeProvider$childC[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$childC);\nThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$contex);\n\n// \n\nvar escapeRegex = /[[\\].#*$><+~=|^:(),\"'`]/g;\nvar multiDashRegex = /--+/g;\n\n// HACK for generating all static styles without needing to allocate\n// an empty execution context every single time...\nvar STATIC_EXECUTION_CONTEXT = {};\n\nvar _StyledComponent = (function (ComponentStyle, constructWithOptions) {\n /* We depend on components having unique IDs */\n var identifiers = {};\n var generateId = function generateId(_displayName, parentComponentId) {\n var displayName = typeof _displayName !== 'string' ? 'sc' : _displayName.replace(escapeRegex, '-') // Replace all possible CSS selectors\n .replace(multiDashRegex, '-'); // Replace multiple -- with single -\n\n var nr = (identifiers[displayName] || 0) + 1;\n identifiers[displayName] = nr;\n\n var hash = ComponentStyle.generateName(displayName + nr);\n var componentId = displayName + '-' + hash;\n return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId;\n };\n\n var BaseStyledComponent = function (_Component) {\n inherits(BaseStyledComponent, _Component);\n\n function BaseStyledComponent() {\n var _temp, _this, _ret;\n\n classCallCheck(this, BaseStyledComponent);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.attrs = {}, _this.state = {\n theme: null,\n generatedClassName: ''\n }, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n BaseStyledComponent.prototype.unsubscribeFromContext = function unsubscribeFromContext() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);\n }\n };\n\n BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) {\n var attrs = this.constructor.attrs;\n\n var context = _extends({}, props, { theme: theme });\n if (attrs === undefined) {\n return context;\n }\n\n this.attrs = Object.keys(attrs).reduce(function (acc, key) {\n var attr = attrs[key];\n // eslint-disable-next-line no-param-reassign\n acc[key] = typeof attr === 'function' ? attr(context) : attr;\n return acc;\n }, {});\n\n return _extends({}, context, this.attrs);\n };\n\n BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {\n var _constructor = this.constructor,\n attrs = _constructor.attrs,\n componentStyle = _constructor.componentStyle,\n warnTooManyClasses = _constructor.warnTooManyClasses;\n\n var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance;\n\n // staticaly styled-components don't need to build an execution context object,\n // and shouldn't be increasing the number of class names\n if (componentStyle.isStatic && attrs === undefined) {\n return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet);\n } else {\n var executionContext = this.buildExecutionContext(theme, props);\n var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet);\n\n if (warnTooManyClasses !== undefined) warnTooManyClasses(className);\n\n return className;\n }\n };\n\n BaseStyledComponent.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var componentStyle = this.constructor.componentStyle;\n\n var styledContext = this.context[CHANNEL_NEXT];\n\n // If this is a staticaly-styled component, we don't need to the theme\n // to generate or build styles.\n if (componentStyle.isStatic) {\n var generatedClassName = this.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, this.props);\n this.setState({ generatedClassName: generatedClassName });\n // If there is a theme in the context, subscribe to the event emitter. This\n // is necessary due to pure components blocking context updates, this circumvents\n // that by updating when an event is emitted\n } else if (styledContext !== undefined) {\n var subscribe = styledContext.subscribe;\n\n this.unsubscribeId = subscribe(function (nextTheme) {\n // This will be called once immediately\n var theme = determineTheme(_this2.props, nextTheme, _this2.constructor.defaultProps);\n var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props);\n\n _this2.setState({ theme: theme, generatedClassName: generatedClassName });\n });\n } else {\n // eslint-disable-next-line react/prop-types\n var theme = this.props.theme || {};\n var _generatedClassName = this.generateAndInjectStyles(theme, this.props);\n this.setState({ theme: theme, generatedClassName: _generatedClassName });\n }\n };\n\n BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _this3 = this;\n\n // If this is a staticaly-styled component, we don't need to listen to\n // props changes to update styles\n var componentStyle = this.constructor.componentStyle;\n\n if (componentStyle.isStatic) {\n return;\n }\n\n this.setState(function (oldState) {\n var theme = determineTheme(nextProps, oldState.theme, _this3.constructor.defaultProps);\n var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps);\n\n return { theme: theme, generatedClassName: generatedClassName };\n });\n };\n\n BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unsubscribeFromContext();\n };\n\n BaseStyledComponent.prototype.render = function render() {\n var _this4 = this;\n\n // eslint-disable-next-line react/prop-types\n var innerRef = this.props.innerRef;\n var generatedClassName = this.state.generatedClassName;\n var _constructor2 = this.constructor,\n styledComponentId = _constructor2.styledComponentId,\n target = _constructor2.target;\n\n\n var isTargetTag = isTag(target);\n\n var className = [\n // eslint-disable-next-line react/prop-types\n this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' ');\n\n var baseProps = _extends({}, this.attrs, {\n className: className\n });\n\n if (isStyledComponent(target)) {\n baseProps.innerRef = innerRef;\n } else {\n baseProps.ref = innerRef;\n }\n\n var propsForElement = Object.keys(this.props).reduce(function (acc, propName) {\n // Don't pass through non HTML tags through to HTML elements\n // always omit innerRef\n if (propName !== 'innerRef' && propName !== 'className' && (!isTargetTag || validAttr(propName))) {\n // eslint-disable-next-line no-param-reassign\n acc[propName] = _this4.props[propName];\n }\n\n return acc;\n }, baseProps);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2_react__[\"createElement\"])(target, propsForElement);\n };\n\n return BaseStyledComponent;\n }(__WEBPACK_IMPORTED_MODULE_2_react__[\"Component\"]);\n\n var createStyledComponent = function createStyledComponent(target, options, rules) {\n var _StyledComponent$cont;\n\n var _options$displayName = options.displayName,\n displayName = _options$displayName === undefined ? isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')' : _options$displayName,\n _options$componentId = options.componentId,\n componentId = _options$componentId === undefined ? generateId(options.displayName, options.parentComponentId) : _options$componentId,\n _options$ParentCompon = options.ParentComponent,\n ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon,\n extendingRules = options.rules,\n attrs = options.attrs;\n\n\n var styledComponentId = options.displayName && options.componentId ? options.displayName + '-' + options.componentId : componentId;\n\n var warnTooManyClasses = void 0;\n if (process.env.NODE_ENV !== 'production') {\n warnTooManyClasses = createWarnTooManyClasses(displayName);\n }\n\n var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), attrs, styledComponentId);\n\n var StyledComponent = function (_ParentComponent) {\n inherits(StyledComponent, _ParentComponent);\n\n function StyledComponent() {\n classCallCheck(this, StyledComponent);\n return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments));\n }\n\n StyledComponent.withComponent = function withComponent(tag) {\n var previousComponentId = options.componentId,\n optionsToCopy = objectWithoutProperties(options, ['componentId']);\n\n\n var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : getComponentName(tag));\n\n var newOptions = _extends({}, optionsToCopy, {\n componentId: newComponentId,\n ParentComponent: StyledComponent\n });\n\n return createStyledComponent(tag, newOptions, rules);\n };\n\n createClass(StyledComponent, null, [{\n key: 'extend',\n get: function get$$1() {\n var rulesFromOptions = options.rules,\n parentComponentId = options.componentId,\n optionsToCopy = objectWithoutProperties(options, ['rules', 'componentId']);\n\n\n var newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules);\n\n var newOptions = _extends({}, optionsToCopy, {\n rules: newRules,\n parentComponentId: parentComponentId,\n ParentComponent: StyledComponent\n });\n\n return constructWithOptions(createStyledComponent, target, newOptions);\n }\n }]);\n return StyledComponent;\n }(ParentComponent);\n\n StyledComponent.contextTypes = (_StyledComponent$cont = {}, _StyledComponent$cont[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _StyledComponent$cont[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _StyledComponent$cont[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]), _StyledComponent$cont);\n StyledComponent.displayName = displayName;\n StyledComponent.styledComponentId = styledComponentId;\n StyledComponent.attrs = attrs;\n StyledComponent.componentStyle = componentStyle;\n StyledComponent.warnTooManyClasses = warnTooManyClasses;\n StyledComponent.target = target;\n\n\n return StyledComponent;\n };\n\n return createStyledComponent;\n});\n\n// murmurhash2 via https://gist.github.com/raycmorgan/588423\n\nfunction doHash(str, seed) {\n var m = 0x5bd1e995;\n var r = 24;\n var h = seed ^ str.length;\n var length = str.length;\n var currentIndex = 0;\n\n while (length >= 4) {\n var k = UInt32(str, currentIndex);\n\n k = Umul32(k, m);\n k ^= k >>> r;\n k = Umul32(k, m);\n\n h = Umul32(h, m);\n h ^= k;\n\n currentIndex += 4;\n length -= 4;\n }\n\n switch (length) {\n case 3:\n h ^= UInt16(str, currentIndex);\n h ^= str.charCodeAt(currentIndex + 2) << 16;\n h = Umul32(h, m);\n break;\n\n case 2:\n h ^= UInt16(str, currentIndex);\n h = Umul32(h, m);\n break;\n\n case 1:\n h ^= str.charCodeAt(currentIndex);\n h = Umul32(h, m);\n break;\n }\n\n h ^= h >>> 13;\n h = Umul32(h, m);\n h ^= h >>> 15;\n\n return h >>> 0;\n}\n\nfunction UInt32(str, pos) {\n return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8) + (str.charCodeAt(pos++) << 16) + (str.charCodeAt(pos) << 24);\n}\n\nfunction UInt16(str, pos) {\n return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8);\n}\n\nfunction Umul32(n, m) {\n n = n | 0;\n m = m | 0;\n var nlo = n & 0xffff;\n var nhi = n >>> 16;\n var res = nlo * m + ((nhi * m & 0xffff) << 16) | 0;\n return res;\n}\n\n// \nvar isStaticRules = function isStaticRules(rules, attrs) {\n for (var i = 0; i < rules.length; i += 1) {\n var rule = rules[i];\n\n // recursive case\n if (Array.isArray(rule) && !isStaticRules(rule)) {\n return false;\n } else if (typeof rule === 'function' && !isStyledComponent(rule)) {\n // functions are allowed to be static if they're just being\n // used to get the classname of a nested styled copmonent\n return false;\n }\n }\n\n if (attrs !== undefined) {\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (var key in attrs) {\n var value = attrs[key];\n if (typeof value === 'function') {\n return false;\n }\n }\n }\n\n return true;\n};\n\n/*\n ComponentStyle is all the CSS-specific stuff, not\n the React-specific stuff.\n */\nvar _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) {\n var ComponentStyle = function () {\n function ComponentStyle(rules, attrs, componentId) {\n classCallCheck(this, ComponentStyle);\n\n this.rules = rules;\n this.isStatic = isStaticRules(rules, attrs);\n this.componentId = componentId;\n if (!StyleSheet.instance.hasInjectedComponent(this.componentId)) {\n var placeholder = process.env.NODE_ENV !== 'production' ? '.' + componentId + ' {}' : '';\n StyleSheet.instance.deferredInject(componentId, true, placeholder);\n }\n }\n\n /*\n * Flattens a rule set into valid CSS\n * Hashes it, wraps the whole chunk in a .hash1234 {}\n * Returns the hash to be injected on render()\n * */\n\n\n ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {\n var isStatic = this.isStatic,\n lastClassName = this.lastClassName;\n\n if (isStatic && lastClassName !== undefined) {\n return lastClassName;\n }\n\n var flatCSS = flatten(this.rules, executionContext);\n var hash = doHash(this.componentId + flatCSS.join(''));\n\n var existingName = styleSheet.getName(hash);\n if (existingName !== undefined) {\n if (styleSheet.stylesCacheable) {\n this.lastClassName = existingName;\n }\n return existingName;\n }\n\n var name = nameGenerator(hash);\n if (styleSheet.stylesCacheable) {\n this.lastClassName = existingName;\n }\n if (styleSheet.alreadyInjected(hash, name)) {\n return name;\n }\n\n var css = '\\n' + stringifyRules(flatCSS, '.' + name);\n // NOTE: this can only be set when we inject the class-name.\n // For some reason, presumably due to how css is stringifyRules behaves in\n // differently between client and server, styles break.\n styleSheet.inject(this.componentId, true, css, hash, name);\n return name;\n };\n\n ComponentStyle.generateName = function generateName(str) {\n return nameGenerator(doHash(str));\n };\n\n return ComponentStyle;\n }();\n\n return ComponentStyle;\n});\n\n// \n// Thanks to ReactDOMFactories for this handy list!\n\nvar domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',\n\n// SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// \n\nvar _styled = (function (styledComponent, constructWithOptions) {\n var styled = function styled(tag) {\n return constructWithOptions(styledComponent, tag);\n };\n\n // Shorthands for all valid HTML Elements\n domElements.forEach(function (domElement) {\n styled[domElement] = styled(domElement);\n });\n\n return styled;\n});\n\n// \nvar replaceWhitespace = function replaceWhitespace(str) {\n return str.replace(/\\s|\\\\n/g, '');\n};\n\nvar _keyframes = (function (nameGenerator, stringifyRules, css) {\n return function (strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n var rules = css.apply(undefined, [strings].concat(interpolations));\n var hash = doHash(replaceWhitespace(JSON.stringify(rules)));\n\n var existingName = StyleSheet.instance.getName(hash);\n if (existingName) return existingName;\n\n var name = nameGenerator(hash);\n if (StyleSheet.instance.alreadyInjected(hash, name)) return name;\n\n var generatedCSS = stringifyRules(rules, name, '@keyframes');\n StyleSheet.instance.inject('sc-keyframes-' + name, true, generatedCSS, hash, name);\n return name;\n };\n});\n\n// \nvar _injectGlobal = (function (stringifyRules, css) {\n var injectGlobal = function injectGlobal(strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n var rules = css.apply(undefined, [strings].concat(interpolations));\n var hash = doHash(JSON.stringify(rules));\n\n var componentId = 'sc-global-' + hash;\n if (StyleSheet.instance.hasInjectedComponent(componentId)) return;\n\n StyleSheet.instance.inject(componentId, false, stringifyRules(rules));\n };\n\n return injectGlobal;\n});\n\n// \n\n\nvar _constructWithOptions = (function (css) {\n var constructWithOptions = function constructWithOptions(componentConstructor, tag) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (typeof tag !== 'string' && typeof tag !== 'function') {\n // $FlowInvalidInputTest\n throw new Error('Cannot create styled-component for component: ' + tag);\n }\n\n /* This is callable directly as a template function */\n var templateFunction = function templateFunction(strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n return componentConstructor(tag, options, css.apply(undefined, [strings].concat(interpolations)));\n };\n\n /* If config methods are called, wrap up a new template function and merge options */\n templateFunction.withConfig = function (config) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, config));\n };\n templateFunction.attrs = function (attrs) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, {\n attrs: _extends({}, options.attrs || {}, attrs) }));\n };\n\n return templateFunction;\n };\n\n return constructWithOptions;\n});\n\n// \n/* globals ReactClass */\n\nvar wrapWithTheme = function wrapWithTheme(Component$$1) {\n var _WithTheme$contextTyp;\n\n var componentName = Component$$1.displayName || Component$$1.name || 'Component';\n\n var isStyledComponent$$1 = isStyledComponent(Component$$1);\n\n var WithTheme = function (_React$Component) {\n inherits(WithTheme, _React$Component);\n\n function WithTheme() {\n var _temp, _this, _ret;\n\n classCallCheck(this, WithTheme);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {}, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping\n\n\n WithTheme.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var defaultProps = this.constructor.defaultProps;\n\n var styledContext = this.context[CHANNEL_NEXT];\n var themeProp = determineTheme(this.props, undefined, defaultProps);\n if (styledContext === undefined && themeProp === undefined && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps');\n } else if (styledContext === undefined && themeProp !== undefined) {\n this.setState({ theme: themeProp });\n } else {\n var subscribe = styledContext.subscribe;\n\n this.unsubscribeId = subscribe(function (nextTheme) {\n var theme = determineTheme(_this2.props, nextTheme, defaultProps);\n _this2.setState({ theme: theme });\n });\n }\n };\n\n WithTheme.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var defaultProps = this.constructor.defaultProps;\n\n this.setState(function (oldState) {\n var theme = determineTheme(nextProps, oldState.theme, defaultProps);\n\n return { theme: theme };\n });\n };\n\n WithTheme.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);\n }\n };\n\n WithTheme.prototype.render = function render() {\n // eslint-disable-next-line react/prop-types\n var innerRef = this.props.innerRef;\n var theme = this.state.theme;\n\n\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(Component$$1, _extends({\n theme: theme\n }, this.props, {\n innerRef: isStyledComponent$$1 ? innerRef : undefined,\n ref: isStyledComponent$$1 ? undefined : innerRef\n }));\n };\n\n return WithTheme;\n }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\n WithTheme.displayName = 'WithTheme(' + componentName + ')';\n WithTheme.styledComponentId = 'withTheme';\n WithTheme.contextTypes = (_WithTheme$contextTyp = {}, _WithTheme$contextTyp[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _WithTheme$contextTyp[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _WithTheme$contextTyp);\n\n\n return __WEBPACK_IMPORTED_MODULE_5_hoist_non_react_statics___default()(WithTheme, Component$$1);\n};\n\n// \n\n/* Import singletons */\n/* Import singleton constructors */\n/* Import components */\n/* Import Higher Order Components */\n/* Instantiate singletons */\nvar ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules);\nvar constructWithOptions = _constructWithOptions(css);\nvar StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions);\n\n/* Instantiate exported singletons */\nvar keyframes = _keyframes(generateAlphabeticName, stringifyRules, css);\nvar injectGlobal = _injectGlobal(stringifyRules, css);\nvar styled = _styled(StyledComponent, constructWithOptions);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (styled);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(2)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar linalg_1 = __webpack_require__(1);\nvar Layer = /** @class */ (function () {\n function Layer(canvas, image) {\n this.canvas = canvas;\n this.image = image;\n this.transformation = linalg_1.Matrix4x4.create();\n this.aspectMatrixBuffer = linalg_1.Matrix4x4.create(); // To prevent memory allocation in the render loop\n this.viewMatrixBuffer = linalg_1.Matrix4x4.create(); // To prevent memory allocation in the render loop\n this.image = image;\n this.resize();\n }\n /**\n * Resize the canvas size if its elements size in the browser changed\n * @return whether anything changed\n */\n Layer.prototype.resize = function () {\n var width = Math.floor(this.canvas.clientWidth * window.devicePixelRatio);\n var height = Math.floor(this.canvas.clientHeight * window.devicePixelRatio);\n if (this.canvas.width !== width || this.canvas.height !== height) {\n this.canvas.width = width;\n this.canvas.height = height;\n return true;\n }\n return false;\n };\n /**\n * Compute the scalings in X and Y make sure the (-1,1) x (-1,1) box has the aspect ratio of the image\n * and is positioned centerally in the canvas\n */\n Layer.prototype.getAspect = function () {\n var viewAspect = this.canvas.clientWidth / this.canvas.clientHeight;\n var textAspect = this.image.width / this.image.height;\n var aspect;\n if (viewAspect > textAspect) {\n aspect = { x: textAspect / viewAspect, y: 1.0 };\n }\n else {\n aspect = { x: 1.0, y: viewAspect / textAspect };\n }\n return aspect;\n };\n /**\n * Compute the view matrix from the current transformation and the shape of the window\n */\n Layer.prototype.getViewMatrix = function () {\n var aspect = this.getAspect();\n linalg_1.Matrix4x4.fromScaling(this.aspectMatrixBuffer, [aspect.x, aspect.y, 1.0]);\n linalg_1.Matrix4x4.multiply(this.viewMatrixBuffer, this.aspectMatrixBuffer, this.transformation);\n return this.viewMatrixBuffer;\n };\n return Layer;\n}());\nexports.default = Layer;\nvar LossFunction;\n(function (LossFunction) {\n LossFunction[LossFunction[\"L1\"] = 1] = \"L1\";\n LossFunction[LossFunction[\"L2\"] = 2] = \"L2\";\n LossFunction[LossFunction[\"MAPE\"] = 3] = \"MAPE\";\n LossFunction[LossFunction[\"MRSE\"] = 4] = \"MRSE\";\n LossFunction[LossFunction[\"SMAPE\"] = 5] = \"SMAPE\";\n LossFunction[LossFunction[\"SSIM\"] = 6] = \"SSIM\";\n})(LossFunction = exports.LossFunction || (exports.LossFunction = {}));\nvar lossFunctions = {\n 'L1': LossFunction.L1,\n 'L2': LossFunction.L2,\n 'MAPE': LossFunction.MAPE,\n 'MRSE': LossFunction.MRSE,\n 'SMAPE': LossFunction.SMAPE,\n 'SSIM': LossFunction.SSIM,\n};\nfunction lossFunctionFromString(name) {\n if (lossFunctions.hasOwnProperty(name)) {\n return lossFunctions[name];\n }\n else {\n throw Error(\"Loss function \" + name + \" is invalid. Available options: \" + Object.keys(lossFunctions));\n }\n}\nexports.lossFunctionFromString = lossFunctionFromString;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ExrParserWorker = __webpack_require__(17);\n/**\n * A pool of exr parsing webworkers that get assigned tasks in a round-robin fashion.\n */\nvar ExrParserPool = /** @class */ (function () {\n function ExrParserPool(nWorkers) {\n this.nWorkers = nWorkers;\n /** To divide the work equally, keep track of the worker that got the previous job. */\n this.nextWorkerId = 0;\n /** Each job that is sent to a worker gets a unique jobId. */\n this.jobId = 0;\n /** After sending a job to a web worker, we register a return handler for when data comes back */\n this.returnHandlers = {};\n this.workers = [];\n for (var i = 0; i < nWorkers; ++i) {\n var worker = new ExrParserWorker();\n this.workers.push(worker);\n worker.onmessage = this.handleResult.bind(this);\n }\n }\n /**\n * Parse raw EXR data using by assigning the task to a web worker in the pool\n */\n ExrParserPool.prototype.parse = function (url, data) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var worker = _this.nextWorker();\n var jobId = _this.jobId++;\n _this.returnHandlers[jobId] = function (event) {\n if (event.data.success) {\n resolve(__assign({ url: url }, event.data.image));\n }\n else {\n reject(new Error(event.data.message));\n }\n };\n worker.postMessage({ jobId: jobId, data: data }, [data]);\n });\n };\n /**\n * Handler that gets called whenever a result comes back from the webworkers\n * It looks up the corresponding handler by the jobId.\n */\n ExrParserPool.prototype.handleResult = function (event) {\n if (event.data.jobId != null) {\n var callback = this.returnHandlers[event.data.jobId];\n delete this.returnHandlers[event.data.jobId];\n callback(event);\n }\n else {\n throw new Error(\"Got a message from the webworker without job id.\");\n }\n };\n /**\n * Get the web worker whose turn it is\n */\n ExrParserPool.prototype.nextWorker = function () {\n var worker = this.workers[this.nextWorkerId];\n this.nextWorkerId = (this.nextWorkerId + 1) % this.nWorkers;\n return worker;\n };\n return ExrParserPool;\n}());\nvar pool = new ExrParserPool(2);\nfunction parseExr(url, data) {\n return pool.parse(url, data);\n}\nfunction loadImage(url) {\n var suffix = url.split('.').pop();\n if (suffix && suffix.toLocaleLowerCase() === 'exr') {\n return loadExr(url);\n }\n else {\n return loadLdr(url);\n }\n}\nexports.loadImage = loadImage;\nfunction loadExr(url) {\n console.time(\"Downloading '\" + url + \"'\"); // tslint:disable-line\n return fetch(url)\n .then(function (result) {\n console.timeEnd(\"Downloading '\" + url + \"'\"); // tslint:disable-line\n return result;\n })\n .then(function (result) { return result.arrayBuffer(); })\n .then(function (data) { return parseExr(url, data); });\n}\nexports.loadExr = loadExr;\nfunction loadLdr(url) {\n console.time(\"Downloading '\" + url + \"'\"); // tslint:disable-line\n return new Promise(function (resolve, reject) {\n var image = new Image();\n image.onerror = function (error) { return reject(new Error(\"Failed to load '\" + url + \"'.\")); };\n image.onload = function () {\n console.timeEnd(\"Downloading '\" + url + \"'\"); // tslint:disable-line\n try {\n var canvas = document.createElement('canvas');\n canvas.width = image.width;\n canvas.height = image.height;\n var ctx = canvas.getContext('2d');\n if (!ctx) {\n reject(new Error('Failed to get 2d canvas context.'));\n return;\n }\n ctx.drawImage(image, 0, 0);\n resolve({\n url: url,\n width: image.width,\n height: image.height,\n nChannels: 4,\n data: image,\n type: 'LdrImage',\n });\n }\n catch (error) {\n reject(new Error(\"Failed to load image '\" + url + \"': \" + error));\n }\n };\n image.src = url;\n });\n}\nexports.loadLdr = loadLdr;\nvar pixelColorCache = new Map();\n/**\n * Extract a pixel's color\n * Caches data for LDR images\n * @param image image\n * @param x pixel's x coordinate\n * @param y pixel's y coordinate\n * @param c color channel (r=0, g=1, b=2)\n */\nfunction getPixelColor(image, x, y, c) {\n if (image.type === 'HdrImage') {\n return image.data[(x + y * image.width) * image.nChannels + c];\n }\n else {\n var getColorFnc = pixelColorCache.get(image);\n if (getColorFnc == null) {\n var canvas = document.createElement('canvas');\n canvas.width = image.width;\n canvas.height = image.height;\n var ctx_1 = canvas.getContext('2d');\n if (!ctx_1) {\n throw new Error('Failed to create 2d context to retrieve LDR image data');\n }\n ctx_1.drawImage(image.data, 0, 0, image.width, image.height);\n getColorFnc = function (X, Y, C) { return ctx_1.getImageData(X, Y, 1, 1).data[C] / 256; };\n pixelColorCache.set(image, getColorFnc);\n }\n return getColorFnc(x, y, c);\n }\n}\nexports.getPixelColor = getPixelColor;\nvar ImageCache = /** @class */ (function () {\n function ImageCache() {\n this.images = {};\n this.downloading = {};\n }\n ImageCache.prototype.contains = function (url) {\n return this.images.hasOwnProperty(url);\n };\n ImageCache.prototype.currentlyDownloading = function (url) {\n return this.downloading.hasOwnProperty(url);\n };\n ImageCache.prototype.size = function () {\n return Object.keys(this.images).length;\n };\n ImageCache.prototype.get = function (url) {\n if (this.contains(url)) {\n // console.log(`Image ${url} was in cache.`); // tslint:disable-line\n return Promise.resolve(this.images[url]);\n }\n else if (this.currentlyDownloading(url)) {\n return this.downloading[url];\n }\n else {\n // console.log(`Image ${url} is downloaded.`); // tslint:disable-line\n return this.load(url);\n }\n };\n ImageCache.prototype.store = function (url, image) {\n if (this.currentlyDownloading(url)) {\n delete this.currentlyDownloading[url];\n }\n this.images[url] = image;\n return image;\n };\n ImageCache.prototype.load = function (url) {\n var _this = this;\n var imagePromise = loadImage(url);\n this.downloading[url] = imagePromise;\n return imagePromise\n .then(function (image) { return _this.store(url, image); });\n };\n return ImageCache;\n}());\nexports.ImageCache = ImageCache;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __webpack_require__(0);\nvar linalg_1 = __webpack_require__(1);\nvar ImageLayer_1 = __webpack_require__(10);\nvar TextLayer_1 = __webpack_require__(11);\nvar MouseLayer_1 = __webpack_require__(12);\nvar styled_components_1 = __webpack_require__(3);\nvar StretchingCanvas = (_a = [\"\\n position: absolute;\\n top: 0; bottom: 0;\\n left: 0; right: 0;\\n width: 100%; height: 100%;\\n\"], _a.raw = [\"\\n position: absolute;\\n top: 0; bottom: 0;\\n left: 0; right: 0;\\n width: 100%; height: 100%;\\n\"], styled_components_1.default.canvas(_a));\nvar StretchingDiv = (_b = [\"\\n position: absolute;\\n top: 0; bottom: 0;\\n left: 0; right: 0;\\n width: 100%; height: 100%;\\n\"], _b.raw = [\"\\n position: absolute;\\n top: 0; bottom: 0;\\n left: 0; right: 0;\\n width: 100%; height: 100%;\\n\"], styled_components_1.default.div(_b));\n/**\n * An image frame that deals with mouse movement for padding and zooming\n */\nvar ImageFrame = /** @class */ (function (_super) {\n __extends(ImageFrame, _super);\n function ImageFrame(props) {\n var _this = _super.call(this, props) || this;\n _this.transformation = linalg_1.Matrix4x4.create();\n /** Where to go back when reset() is called */\n _this.defaultTransformation = linalg_1.Matrix4x4.create();\n _this.handleTransformationChange = _this.handleTransformationChange.bind(_this);\n return _this;\n }\n ImageFrame.prototype.componentDidMount = function () {\n this.imageLayer = new ImageLayer_1.default(this.imageLayerElement, this.props.image);\n this.textLayer = new TextLayer_1.default(this.textLayerElement, this.props.image);\n this.mouseLayer = new MouseLayer_1.default(this.mouseLayerElement, this.props.image, this.props.enableMouseEvents);\n this.mouseLayer.onTransformationChange(this.handleTransformationChange);\n this.updateCanvasProps();\n this.handleTransformationChange(this.transformation);\n };\n ImageFrame.prototype.componentDidUpdate = function (prevProps) {\n this.updateCanvasProps(prevProps);\n this.mouseLayer.setEnableMouseEvents(this.props.enableMouseEvents);\n };\n ImageFrame.prototype.componentWillUnmount = function () {\n this.mouseLayer.onPointAt(undefined);\n this.mouseLayer.onTransformationChange(undefined);\n this.mouseLayer.destruct();\n };\n /** Set the default transformation that calling reset() will result in */\n ImageFrame.prototype.setDefaultTransformation = function (transformation) {\n this.defaultTransformation = transformation;\n };\n ImageFrame.prototype.reset = function () {\n this.handleTransformationChange(this.defaultTransformation);\n };\n ImageFrame.prototype.setTransformation = function (transformation) {\n this.handleTransformationChange(transformation);\n };\n ImageFrame.prototype.getTransformation = function () {\n return this.transformation;\n };\n ImageFrame.prototype.render = function () {\n var _this = this;\n return (React.createElement(StretchingDiv, null,\n React.createElement(StretchingCanvas, { innerRef: function (x) { return _this.imageLayerElement = x; } }),\n React.createElement(StretchingCanvas, { innerRef: function (x) { return _this.textLayerElement = x; } }),\n React.createElement(StretchingCanvas, { innerRef: function (x) { return _this.mouseLayerElement = x; } })));\n };\n ImageFrame.prototype.handleTransformationChange = function (transformation) {\n if (this.props.allowMovement) {\n this.transformation = transformation;\n this.imageLayer.setTransformation(transformation);\n this.textLayer.setTransformation(transformation);\n this.mouseLayer.setTransformation(transformation);\n if (this.props.onTransform != null) {\n this.props.onTransform(transformation);\n }\n }\n };\n ImageFrame.prototype.updateCanvasProps = function (previousProps) {\n if (previousProps === void 0) { previousProps = null; }\n if (!previousProps ||\n previousProps.viewTransform !== this.props.viewTransform ||\n previousProps.exposure !== this.props.exposure ||\n previousProps.gamma !== this.props.gamma ||\n previousProps.offset !== this.props.offset) {\n this.imageLayer.setTonemapping({\n viewTransform: this.props.viewTransform,\n exposure: this.props.exposure,\n offset: this.props.offset,\n gamma: this.props.gamma\n });\n }\n if (!previousProps || previousProps.image !== this.props.image) {\n this.imageLayer.setImage(this.props.image);\n this.textLayer.setImage(this.props.image);\n this.mouseLayer.setImage(this.props.image);\n }\n this.mouseLayer.onPointAt(this.props.onPoint);\n };\n return ImageFrame;\n}(React.Component));\nexports.default = ImageFrame;\nvar _a, _b;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar cached_function_1 = __webpack_require__(16);\nvar Layer_1 = __webpack_require__(4);\nvar DrawMode;\n(function (DrawMode) {\n DrawMode[DrawMode[\"LDR\"] = 0] = \"LDR\";\n DrawMode[DrawMode[\"HDR\"] = 1] = \"HDR\";\n DrawMode[DrawMode[\"ColorMap\"] = 2] = \"ColorMap\";\n})(DrawMode || (DrawMode = {}));\nvar ViewTransform;\n(function (ViewTransform) {\n ViewTransform[ViewTransform[\"None\"] = -1] = \"None\";\n ViewTransform[ViewTransform[\"Gamma22\"] = 0] = \"Gamma22\";\n ViewTransform[ViewTransform[\"K1S1\"] = 1] = \"K1S1\";\n})(ViewTransform || (ViewTransform = {}));\nvar vertexShaderSource = \"\\nattribute vec3 aVertexPosition;\\nattribute vec2 aTextureCoord;\\nvarying vec2 vTextureCoord;\\nuniform mat4 viewMatrix;\\nvoid main(void) {\\n gl_Position = viewMatrix * vec4(aVertexPosition, 1.0);\\n vTextureCoord = aTextureCoord;\\n}\";\nvar fragmentShaderSource = \"\\nprecision mediump float;\\nuniform int viewTransform;\\nuniform float exposure;\\nuniform float offset;\\nuniform float gamma;\\nuniform int mode;\\nuniform int nChannels;\\nuniform int lossFunction;\\nuniform int imageHeight; // Height and width are used to access neighboring pixels\\nuniform int imageWidth;\\nvarying vec2 vTextureCoord;\\nuniform sampler2D imASampler;\\nuniform sampler2D imBSampler;\\nuniform sampler2D cmapSampler;\\n\\nvec3 lookupOffset(sampler2D sampler, vec2 position, vec2 offset) {\\n // Read neighbouring pixels from an image texture\\n // Takes 'position' (range 0 - 1) and an integer pixel offset 'offset'\\n vec2 imageSize = vec2(imageWidth, imageHeight);\\n return texture2D(sampler, position + offset / imageSize).rgb;\\n}\\n\\nfloat log10(float a) {\\n const float logBase10 = 1.0 / log2( 10.0 );\\n\\n return log2(a) * logBase10;\\n}\\n\\nfloat luminance(vec3 rgb) {\\n return dot(vec3(0.2126, 0.7152, 0.0722), rgb);\\n}\\n\\nvec3 GOG(vec3 rgb, float gain, float offset, float gamma) {\\n return pow(gain * rgb + offset, vec3(1.0 / gamma));\\n}\\n\\nfloat logEncodingLogC(float a) {\\n float LogC = a >= 0.01059106816664 ? 0.385537 + 0.2471896 * log10(a * 5.555556 + 0.052272) : a * 5.367655 + 0.092809;\\n\\n return LogC;\\n}\\n\\nfloat sigmoidK1S1(float a) {\\n float sigmoid = 1.0 / (1.0 + pow(2.718281828459045, -8.9 * (a - 0.435)));\\n\\n return sigmoid;\\n}\\n\\nvec3 viewTransformNone(vec3 rgb) {\\n return rgb;\\n}\\n\\nvec3 viewTransformGamma22(vec3 rgb) {\\n const float exponent = 1.0 / 2.2;\\n\\n return pow(max(rgb, 0.0), vec3(exponent, exponent, exponent));\\n}\\n\\nvec3 viewTransformK1S1(vec3 rgb) {\\n vec3 LogC = vec3(logEncodingLogC(rgb.x), logEncodingLogC(rgb.y), logEncodingLogC(rgb.z));\\n\\n return vec3(sigmoidK1S1(LogC.x), sigmoidK1S1(LogC.y), sigmoidK1S1(LogC.z));\\n}\\n\\nvec3 applyViewTransform(vec3 rgb, int which) {\\n if (which == \" + ViewTransform.None + \") {\\n return viewTransformNone(rgb);\\n } else if (which == \" + ViewTransform.Gamma22 + \") {\\n return viewTransformGamma22(rgb);\\n } else if (which == \" + ViewTransform.K1S1 + \") {\\n return viewTransformK1S1(rgb);\\n }\\n}\\n\\nvoid main(void) {\\n vec3 col;\\n vec2 position = vec2(vTextureCoord.s, vTextureCoord.t);\\n if (lossFunction == \" + Layer_1.LossFunction.L1 + \") {\\n col = texture2D(imASampler, position).rgb;\\n col = col - texture2D(imBSampler, position).rgb;\\n col = abs(col);\\n } else if (lossFunction == \" + Layer_1.LossFunction.MAPE + \") {\\n vec3 img = texture2D(imASampler, position).rgb;\\n vec3 ref = texture2D(imBSampler, position).rgb;\\n vec3 diff = img - ref;\\n col = abs(diff) / (abs(ref) + 1e-2);\\n } else if (lossFunction == \" + Layer_1.LossFunction.SMAPE + \") {\\n vec3 img = texture2D(imASampler, position).rgb;\\n vec3 ref = texture2D(imBSampler, position).rgb;\\n vec3 diff = img - ref;\\n col = 2.0 * abs(diff) / (abs(ref) + abs(img) + 2e-2);\\n } else if (lossFunction == \" + Layer_1.LossFunction.MRSE + \") {\\n vec3 img = texture2D(imASampler, position).rgb;\\n vec3 ref = texture2D(imBSampler, position).rgb;\\n vec3 diff = img - ref;\\n col = diff * diff / (ref * ref + 1e-4);\\n } else if (lossFunction == \" + Layer_1.LossFunction.L2 + \") {\\n vec3 img = texture2D(imASampler, position).rgb;\\n vec3 ref = texture2D(imBSampler, position).rgb;\\n vec3 diff = img - ref;\\n col = diff * diff;\\n } else if (lossFunction == \" + Layer_1.LossFunction.SSIM + \") {\\n const int windowRadius = 2; // We use a symmetric 5x5 window as opposed to the customary 8x8 (wiki)\\n const float L = 1.; // The dynamic range\\n const float k1 = 0.01, k2 = 0.03; // Default constants\\n const float c1 = (k1*L)*(k1*L), c2 = (k2*L)*(k2*L);\\n const float n = float((2 * windowRadius + 1) * (2 * windowRadius + 1));\\n\\n // Compute means and standard deviations of both images\\n float aSum, aaSum, bSum, bbSum, abSum;\\n for (int x = 0; x <= 2 * windowRadius; ++x) {\\n for (int y = 0; y <= 2 * windowRadius; ++y) {\\n vec2 offset = vec2(float(x - windowRadius), float(y - windowRadius));\\n float a = luminance(applyViewTransform(lookupOffset(imASampler, position, offset), viewTransform));\\n float b = luminance(applyViewTransform(lookupOffset(imBSampler, position, offset), viewTransform));\\n aSum += a; bSum += b;\\n aaSum += a * a; bbSum += b * b;\\n abSum += a * b;\\n }\\n }\\n float aMean = aSum / n, bMean = bSum / n;\\n float aVar = (aaSum - n * aMean * aMean) / (n + 1.);\\n float bVar = (bbSum - n * bMean * bMean) / (n + 1.);\\n float abCovar = (abSum - n * aMean * bMean) / (n + 1.);\\n\\n float numerator = (2. * aMean * bMean + c1) * (2. * abCovar + c2);\\n float denominator = (aMean * aMean + bMean * bMean + c1) * (aVar + bVar + c2);\\n float ssim = numerator / denominator;\\n col = vec3(1. - ssim, 1. - ssim, 1. - ssim);\\n } else {\\n col = texture2D(imASampler, position).rgb;\\n if (nChannels == 1) {\\n col = vec3(col.r, col.r, col.r);\\n }\\n }\\n\\n if (mode == \" + DrawMode.LDR + \") {\\n col = pow(col, vec3(2.2));\\n col = GOG(col, exposure, offset, gamma);\\n col = applyViewTransform(col, viewTransform);\\n } else if (mode == \" + DrawMode.HDR + \") {\\n col = GOG(col, exposure, offset, gamma);\\n col = applyViewTransform(col, viewTransform);\\n } else {\\n float avg = (col.r + col.g + col.b) * 0.3333333333 * exposure;\\n col = texture2D(cmapSampler, vec2(avg, 0.0)).rgb;\\n }\\n\\n gl_FragColor = vec4(col, 1.0);\\n}\";\nvar imageVertices = new Float32Array([\n // X Y Z U V\n -1.0, -1.0, 0.0, 0.0, 1.0,\n -1.0, 1.0, 0.0, 0.0, 0.0,\n 1.0, -1.0, 0.0, 1.0, 1.0,\n 1.0, 1.0, 0.0, 1.0, 0.0,\n]);\nvar colorMapTexels = new Uint8Array([\n 0, 0, 3, 255,\n 23, 15, 60, 255,\n 67, 15, 117, 255,\n 113, 31, 129, 255,\n 158, 46, 126, 255,\n 205, 63, 112, 255,\n 240, 96, 93, 255,\n 253, 149, 103, 255,\n 254, 201, 141, 255,\n 251, 252, 191, 255,\n]);\nfunction compileShader(code, type, gl) {\n var shader = gl.createShader(type);\n gl.shaderSource(shader, code);\n gl.compileShader(shader);\n if (!shader || !gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n throw new Error(\"Compiling shader failed with error '\" + gl.getShaderInfoLog(shader) + \"'.\");\n }\n return shader;\n}\nvar defaultTonemapping = { viewTransform: 0.0, exposure: 1.0, gamma: 1.0, offset: 0.0 };\n/**\n * Image Layer\n */\nvar ImageLayer = /** @class */ (function (_super) {\n __extends(ImageLayer, _super);\n function ImageLayer(canvas, image) {\n var _this = _super.call(this, canvas, image) || this;\n _this.tonemappingSettings = defaultTonemapping;\n _this.needsRerender = true;\n // Make sure 'this' is available even when these methods are passed as a callback\n _this.checkRender = _this.checkRender.bind(_this);\n _this.invalidate = _this.invalidate.bind(_this);\n _this.initWebGl(canvas);\n // Create a texture cache and load the image texture\n _this.getTexture = cached_function_1.default(_this.createTexture.bind(_this));\n // Draw for the first time\n _this.needsRerender = true;\n requestAnimationFrame(_this.checkRender);\n return _this;\n }\n ImageLayer.prototype.setTransformation = function (transformation) {\n this.transformation = transformation;\n this.invalidate();\n };\n ImageLayer.prototype.setTonemapping = function (tonemapping) {\n this.tonemappingSettings = tonemapping;\n this.invalidate();\n };\n ImageLayer.prototype.setImage = function (image) {\n this.image = image;\n this.invalidate();\n };\n /**\n * Force a new draw the next frame\n */\n ImageLayer.prototype.invalidate = function () {\n this.needsRerender = true;\n };\n /**\n * Render loop, will draw when this component is invalidated with\n * this.needsRerender = true;\n * or when the size of the container changed\n */\n ImageLayer.prototype.checkRender = function () {\n if (this.resize() || this.needsRerender) {\n this.needsRerender = false;\n this.draw();\n }\n requestAnimationFrame(this.checkRender);\n };\n /**\n * Paint a new image\n */\n ImageLayer.prototype.draw = function () {\n if (!this.cmapTexture) {\n throw new Error('Textures need to be initialized before calling draw()');\n }\n this.gl.viewport(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight);\n this.gl.uniform1i(this.glUniforms.viewTransform, this.tonemappingSettings.viewTransform);\n this.gl.uniform1f(this.glUniforms.exposure, this.tonemappingSettings.exposure);\n this.gl.uniform1f(this.glUniforms.offset, this.tonemappingSettings.offset);\n this.gl.uniform1f(this.glUniforms.gamma, this.tonemappingSettings.gamma);\n this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT); // tslint:disable-line\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.quadVertexBuffer);\n this.gl.vertexAttribPointer(this.glAttributes.vertexPosition, 3, this.gl.FLOAT, false, 5 * imageVertices.BYTES_PER_ELEMENT, 0);\n this.gl.vertexAttribPointer(this.glAttributes.vertexTextureCoordinate, 2, this.gl.FLOAT, false, 5 * imageVertices.BYTES_PER_ELEMENT, // stride\n 3 * imageVertices.BYTES_PER_ELEMENT // offset\n );\n this.gl.uniform1i(this.glUniforms.imageHeight, this.image.height);\n this.gl.uniform1i(this.glUniforms.imageWidth, this.image.width);\n if (this.image.type === 'Difference') {\n this.gl.uniform1i(this.glUniforms.drawMode, DrawMode.ColorMap);\n this.gl.uniform1i(this.glUniforms.lossFunction, this.image.lossFunction);\n this.gl.activeTexture(this.gl.TEXTURE0);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.getTexture(this.image.imageA));\n this.gl.uniform1i(this.glUniforms.imASampler, 0);\n this.gl.activeTexture(this.gl.TEXTURE1);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.getTexture(this.image.imageB));\n this.gl.uniform1i(this.glUniforms.imBSampler, 1);\n }\n else {\n if (this.image.nChannels === 1) {\n this.gl.uniform1i(this.glUniforms.drawMode, DrawMode.ColorMap);\n }\n else if (this.image.type === 'HdrImage') {\n this.gl.uniform1i(this.glUniforms.drawMode, DrawMode.HDR);\n }\n else {\n this.gl.uniform1i(this.glUniforms.drawMode, DrawMode.LDR);\n }\n this.gl.uniform1i(this.glUniforms.lossFunction, 0);\n this.gl.activeTexture(this.gl.TEXTURE0);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.getTexture(this.image));\n this.gl.uniform1i(this.glUniforms.imASampler, 0);\n this.gl.activeTexture(this.gl.TEXTURE1);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.getTexture(this.image));\n this.gl.uniform1i(this.glUniforms.imBSampler, 1);\n }\n this.gl.activeTexture(this.gl.TEXTURE2);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.cmapTexture);\n this.gl.uniform1i(this.glUniforms.cmapSampler, 2);\n this.gl.uniform1i(this.glUniforms.nChannels, this.image.nChannels);\n var viewMatrix = this.getViewMatrix();\n this.gl.uniformMatrix4fv(this.glUniforms.viewMatrix, false, viewMatrix.data);\n this.gl.drawArrays(this.gl.TRIANGLE_STRIP, 0, 4);\n };\n ImageLayer.prototype.initWebGl = function (canvas) {\n this.gl = canvas.getContext('webgl');\n if (!this.gl) {\n throw new Error('Please upgrade your browser to one that supports WebGL.');\n }\n if (!this.gl.getExtension('OES_texture_float')) {\n throw new Error('Your browser does not supports WebGL FLoating Point Textures.');\n }\n this.gl.clearColor(0.25, 0.25, 0.25, 1.0);\n this.gl.enable(this.gl.DEPTH_TEST);\n var program = this.initShaders();\n this.quadVertexBuffer = this.initQuadVertexBuffer();\n this.glAttributes = this.initAttributes(program);\n this.glUniforms = this.initUniforms(program);\n this.cmapTexture = this.initCmapTexture();\n };\n ImageLayer.prototype.initShaders = function () {\n var vertexShader = compileShader(vertexShaderSource, this.gl.VERTEX_SHADER, this.gl);\n var fragmentShader = compileShader(fragmentShaderSource, this.gl.FRAGMENT_SHADER, this.gl);\n var program = this.gl.createProgram();\n this.gl.attachShader(program, vertexShader);\n this.gl.attachShader(program, fragmentShader);\n this.gl.linkProgram(program);\n if (!program || !this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {\n throw new Error('Failed to link the program.');\n }\n this.gl.useProgram(program);\n return program;\n };\n ImageLayer.prototype.initCmapTexture = function () {\n var cmapTexture = this.gl.createTexture();\n this.gl.bindTexture(this.gl.TEXTURE_2D, cmapTexture);\n this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, colorMapTexels.length / 4, 1, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, colorMapTexels);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);\n if (!cmapTexture) {\n throw new Error('Failed to initialize color map texture.');\n }\n return cmapTexture;\n };\n ImageLayer.prototype.initQuadVertexBuffer = function () {\n var buffer = this.gl.createBuffer();\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, buffer);\n this.gl.bufferData(this.gl.ARRAY_BUFFER, imageVertices, this.gl.STATIC_DRAW);\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, null);\n if (!buffer) {\n throw new Error('Failed to initialize quad vertex buffer.');\n }\n return buffer;\n };\n ImageLayer.prototype.initAttributes = function (program) {\n var attributes = {\n vertexPosition: this.gl.getAttribLocation(program, 'aVertexPosition'),\n vertexTextureCoordinate: this.gl.getAttribLocation(program, 'aTextureCoord'),\n };\n this.gl.enableVertexAttribArray(attributes.vertexPosition);\n this.gl.enableVertexAttribArray(attributes.vertexTextureCoordinate);\n return attributes;\n };\n ImageLayer.prototype.initUniforms = function (program) {\n var _this = this;\n var getUniformLocation = function (name) {\n var location = _this.gl.getUniformLocation(program, name);\n if (!location) {\n throw new Error(\"Failed to get uniform location for '\" + name + \"'.\");\n }\n return location;\n };\n return {\n drawMode: getUniformLocation('mode'),\n lossFunction: getUniformLocation('lossFunction'),\n nChannels: getUniformLocation('nChannels'),\n viewMatrix: getUniformLocation('viewMatrix'),\n imASampler: getUniformLocation('imASampler'),\n imBSampler: getUniformLocation('imBSampler'),\n cmapSampler: getUniformLocation('cmapSampler'),\n viewTransform: getUniformLocation('viewTransform'),\n exposure: getUniformLocation('exposure'),\n offset: getUniformLocation('offset'),\n gamma: getUniformLocation('gamma'),\n imageWidth: getUniformLocation('imageWidth'),\n imageHeight: getUniformLocation('imageHeight'),\n };\n };\n ImageLayer.prototype.createTexture = function (image) {\n var texture = this.gl.createTexture();\n if (!texture) {\n throw new Error('Failed to initialize image texture');\n }\n this.gl.bindTexture(this.gl.TEXTURE_2D, texture);\n if (image.type === 'HdrImage') {\n if (image.nChannels === 1) {\n this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.LUMINANCE, image.width, image.height, 0, this.gl.LUMINANCE, this.gl.FLOAT, image.data);\n }\n else if (image.nChannels === 3) {\n this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGB, image.width, image.height, 0, this.gl.RGB, this.gl.FLOAT, image.data);\n }\n else {\n throw new Error(\"Don't know what to do with \" + image.nChannels + \" image channels.\");\n }\n }\n else {\n this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.gl.RGBA, this.gl.UNSIGNED_BYTE, image.data);\n }\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);\n this.gl.bindTexture(this.gl.TEXTURE_2D, null);\n return texture;\n };\n return ImageLayer;\n}(Layer_1.default));\nexports.default = ImageLayer;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar linalg_1 = __webpack_require__(1);\nvar Layer_1 = __webpack_require__(4);\nvar image_loading_1 = __webpack_require__(5);\nvar TextLayer = /** @class */ (function (_super) {\n __extends(TextLayer, _super);\n function TextLayer(canvas, image) {\n var _this = _super.call(this, canvas, image) || this;\n _this.needsRerender = true;\n // Create canvas 2d drawing context\n var context = canvas.getContext('2d');\n if (context == null) {\n throw new Error('Failed to create 2D context for TextOverlay');\n }\n _this.context = context;\n // Make sure 'this' is available even when these methods are passed as callbacks\n _this.checkRender = _this.checkRender.bind(_this);\n _this.invalidate = _this.invalidate.bind(_this);\n // Draw for the first time\n _this.needsRerender = true;\n requestAnimationFrame(_this.checkRender);\n return _this;\n }\n TextLayer.prototype.setTransformation = function (transformation) {\n this.transformation = transformation;\n this.invalidate();\n };\n TextLayer.prototype.setImage = function (image) {\n this.image = image;\n this.invalidate();\n };\n /**\n * Force a new draw\n */\n TextLayer.prototype.invalidate = function () {\n this.needsRerender = true;\n };\n /**\n * Render loop, will draw when this component is invalidated with\n * this.needsRerender = true;\n * or when the size of the container changed\n */\n TextLayer.prototype.checkRender = function () {\n if (this.resize() || this.needsRerender) {\n this.needsRerender = false;\n this.draw();\n }\n requestAnimationFrame(this.checkRender);\n };\n /**\n * Paint a new overlay\n */\n TextLayer.prototype.draw = function () {\n var canvas = this.context.canvas;\n var leftTop = linalg_1.Vector4.fromValues(-1, 1, 0.0, 1.0);\n var rightBottom = linalg_1.Vector4.fromValues(1, -1, 0.0, 1.0);\n var mvMatrix = this.getViewMatrix();\n var invMvMatrix = linalg_1.Matrix4x4.create();\n linalg_1.Matrix4x4.invert(invMvMatrix, mvMatrix);\n var image = this.image;\n linalg_1.Vector4.transformMat4(leftTop, leftTop, invMvMatrix);\n linalg_1.Vector4.transformMat4(rightBottom, rightBottom, invMvMatrix);\n this.convertClipToRaster(leftTop, leftTop, image.width, image.height);\n this.convertClipToRaster(rightBottom, rightBottom, image.width, image.height);\n var px = Math.floor(leftTop.data[0]);\n var py = Math.floor(leftTop.data[1]);\n var qx = Math.floor(rightBottom.data[0]);\n var qy = Math.floor(rightBottom.data[1]);\n var lineHeight = Math.floor(20 * window.devicePixelRatio);\n var fontSize = Math.floor(16 * window.devicePixelRatio);\n var nx = canvas.width / (lineHeight * 3 + 2);\n var ny = canvas.height / (lineHeight * 3 + 2);\n this.context.clearRect(0, 0, canvas.width, canvas.height);\n if (image.type === 'Difference') {\n // We don't have access to computed values, so won't show the HUD\n return;\n }\n var zoomedInEnough = rightBottom.data[0] - leftTop.data[0] < nx && rightBottom.data[1] - leftTop.data[1] < ny;\n if (zoomedInEnough) {\n this.context.font = fontSize + \"px sans-serif\";\n for (var y = Math.max(0, py); y <= Math.min(image.height - 1, qy); y++) {\n for (var x = Math.max(0, px); x <= Math.min(image.width - 1, qx); x++) {\n linalg_1.Vector4.set(leftTop, x, y, 0.0, 1.0);\n this.convertRasterToClip(leftTop, leftTop, image.width, image.height);\n linalg_1.Vector4.transformMat4(leftTop, leftTop, mvMatrix);\n this.convertClipToRaster(leftTop, leftTop, canvas.width, canvas.height);\n var r = void 0, g = void 0, b = void 0;\n if (image.nChannels === 1) {\n r = image_loading_1.getPixelColor(image, x, y, 0);\n this.context.fillStyle = '#888888';\n this.context.fillText(r.toFixed(4), leftTop.data[0], leftTop.data[1] + fontSize);\n }\n else {\n r = image_loading_1.getPixelColor(image, x, y, 0);\n g = image_loading_1.getPixelColor(image, x, y, 1);\n b = image_loading_1.getPixelColor(image, x, y, 2);\n this.context.fillStyle = '#990000';\n this.context.fillText(r.toFixed(4), leftTop.data[0], leftTop.data[1] + fontSize);\n this.context.fillStyle = '#009900';\n this.context.fillText(g.toFixed(4), leftTop.data[0], leftTop.data[1] + fontSize + lineHeight);\n this.context.fillStyle = '#0000FF';\n this.context.fillText(b.toFixed(4), leftTop.data[0], leftTop.data[1] + fontSize + 2 * lineHeight);\n }\n }\n }\n }\n };\n /**\n * Convert coordinates from clip space to raster space\n * @param out coordinates in raster space (0, xres) x (0, yres)\n * @param a coordinates in clip space (-1,1) x (-1,1)\n * @param xres\n * @param yres\n */\n TextLayer.prototype.convertClipToRaster = function (out, a, xres, yres) {\n out.data[0] = (a.data[0] + 1.0) * 0.5 * xres;\n out.data[1] = (1.0 - a.data[1]) * 0.5 * yres;\n return out;\n };\n /**\n * Convert coordinates from raster space to clip space\n * @param out coordinates in raster space (0, xres) x (0, yres)\n * @param a coordinates in clip space (-1,1) x (-1,1)\n * @param xres\n * @param yres\n */\n TextLayer.prototype.convertRasterToClip = function (out, a, xres, yres) {\n out.data[0] = a.data[0] * 2.0 / xres - 1.0;\n out.data[1] = 1.0 - (a.data[1] * 2.0 / yres);\n return out;\n };\n return TextLayer;\n}(Layer_1.default));\nexports.default = TextLayer;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar linalg_1 = __webpack_require__(1);\nvar Layer_1 = __webpack_require__(4);\nvar normalizeWheel = __webpack_require__(18);\nvar SCROLL_FACTOR = 1.001;\n/**\n * Mouse Layer\n * @todo add some proper documentation\n */\nvar MouseLayer = /** @class */ (function (_super) {\n __extends(MouseLayer, _super);\n function MouseLayer(canvas, image, enableMouseEvents) {\n var _this = _super.call(this, canvas, image) || this;\n _this.panningState = null;\n _this.unsubscribeFunctions = []; /** To be called on destruct */\n _this.handleMouseMove = _this.handleMouseMove.bind(_this);\n _this.handleMouseDown = _this.handleMouseDown.bind(_this);\n _this.handleMouseUp = _this.handleMouseUp.bind(_this);\n _this.handleScroll = _this.handleScroll.bind(_this);\n _this.handlePointReporting = _this.handlePointReporting.bind(_this);\n _this.enableMouseEvents = enableMouseEvents;\n // Subscribe to changes in the layers reactive inputs and window size\n var unsubscribe;\n document.addEventListener('mouseup', _this.handleMouseUp);\n unsubscribe = document.removeEventListener.bind(document, 'mouseup', _this.handleMouseUp);\n _this.unsubscribeFunctions.push(unsubscribe);\n document.addEventListener('mousemove', _this.handleMouseMove);\n unsubscribe = document.removeEventListener.bind(document, 'mousemove', _this.handleMouseMove);\n _this.unsubscribeFunctions.push(unsubscribe);\n canvas.addEventListener('wheel', _this.handleScroll);\n unsubscribe = canvas.removeEventListener.bind(canvas, 'wheel', _this.handleScroll);\n _this.unsubscribeFunctions.push(unsubscribe);\n canvas.addEventListener('mousedown', _this.handleMouseDown);\n unsubscribe = canvas.removeEventListener.bind(canvas, 'mousedown', _this.handleMouseDown);\n _this.unsubscribeFunctions.push(unsubscribe);\n canvas.addEventListener('mousemove', _this.handlePointReporting);\n unsubscribe = canvas.removeEventListener.bind(canvas, 'mousemove', _this.handlePointReporting);\n _this.unsubscribeFunctions.push(unsubscribe);\n return _this;\n }\n MouseLayer.prototype.setTransformation = function (transformation, broadcast) {\n if (broadcast === void 0) { broadcast = false; }\n this.transformation = transformation;\n if (broadcast && this.transformationCallback != null) {\n this.transformationCallback(transformation);\n }\n };\n MouseLayer.prototype.setEnableMouseEvents = function (enable) {\n this.enableMouseEvents = enable;\n };\n MouseLayer.prototype.onTransformationChange = function (callback) {\n this.transformationCallback = callback;\n };\n MouseLayer.prototype.setImage = function (image) {\n this.image = image;\n };\n MouseLayer.prototype.onPointAt = function (callback) {\n this.pointCallback = callback;\n };\n MouseLayer.prototype.destruct = function () {\n this.unsubscribeFunctions.forEach(function (fn) { return fn(); });\n };\n MouseLayer.prototype.handleMouseMove = function (event) {\n if (!this.enableMouseEvents) {\n return;\n }\n if (this.panningState) {\n var _a = this.relativeMousePosition(event.clientX, event.clientY), x = _a.x, y = _a.y;\n var dx = x - this.panningState.previousMouse.x;\n var dy = y - this.panningState.previousMouse.y;\n var transformation = linalg_1.Matrix4x4.create();\n var aspect = this.getAspect();\n linalg_1.Matrix4x4.translate(transformation, transformation, [dx / aspect.x, dy / aspect.y, 0.0]);\n linalg_1.Matrix4x4.multiply(transformation, transformation, this.transformation);\n this.setTransformation(transformation, true);\n this.panningState.previousMouse = { x: x, y: y };\n }\n };\n MouseLayer.prototype.handleMouseUp = function (event) {\n if (this.panningState) {\n this.panningState = null;\n }\n };\n MouseLayer.prototype.handleMouseDown = function (event) {\n var mousePosition = this.relativeMousePosition(event.clientX, event.clientY);\n this.panningState = {\n transformationAtStart: linalg_1.Matrix4x4.clone(this.transformation),\n previousMouse: mousePosition,\n };\n };\n MouseLayer.prototype.handleScroll = function (event) {\n if (!this.enableMouseEvents) {\n return;\n }\n event.preventDefault();\n var pixelY = normalizeWheel(event).pixelY;\n var mouse = this.relativeMousePosition(event.clientX, event.clientY);\n var transformation = linalg_1.Matrix4x4.create();\n var deltaMatrix = linalg_1.Matrix4x4.create();\n var aspect = this.getAspect();\n linalg_1.Matrix4x4.translate(deltaMatrix, deltaMatrix, [mouse.x / aspect.x, mouse.y / aspect.y, 0.0]);\n var scaleFactor = Math.pow(SCROLL_FACTOR, pixelY);\n linalg_1.Matrix4x4.scale(deltaMatrix, deltaMatrix, [scaleFactor, scaleFactor, 1.0]);\n linalg_1.Matrix4x4.translate(deltaMatrix, deltaMatrix, [-mouse.x / aspect.x, -mouse.y / aspect.y, 0.0]);\n linalg_1.Matrix4x4.multiply(transformation, deltaMatrix, this.transformation);\n this.setTransformation(transformation, true);\n };\n /**\n * Event handler for reporting mouse movement.\n *\n * Only applicable when the options 'onPoint' property is set on this component.\n */\n MouseLayer.prototype.handlePointReporting = function (event) {\n if (this.pointCallback) {\n if (!this.panningState) {\n var _a = this.relativeMousePosition(event.clientX, event.clientY), x = _a.x, y = _a.y;\n var imageCoordinates = this.canvasToImage(x, y);\n this.pointCallback(imageCoordinates.x, imageCoordinates.y);\n }\n }\n };\n /**\n * Translate clientX and clientY values to relative positions within the bounding box\n * of the viewer.\n */\n MouseLayer.prototype.relativeMousePosition = function (clientX, clientY) {\n var _a = this.canvas, clientWidth = _a.clientWidth, clientHeight = _a.clientHeight;\n var _b = this.canvas.getBoundingClientRect(), left = _b.left, top = _b.top;\n return {\n x: -1.0 + 2.0 * (clientX - left) / clientWidth,\n y: 1.0 - 2.0 * (clientY - top) / clientHeight,\n };\n };\n /**\n * Translate canvas coordinates to image coodrinates\n */\n MouseLayer.prototype.canvasToImage = function (x, y) {\n var point = linalg_1.Vector4.create();\n linalg_1.Vector4.set(point, x, y, 1.0, 1.0);\n var inverseViewMatrix = linalg_1.Matrix4x4.create();\n var viewMatrix = this.getViewMatrix();\n linalg_1.Matrix4x4.invert(inverseViewMatrix, viewMatrix);\n linalg_1.Vector4.transformMat4(point, point, inverseViewMatrix);\n return { x: point.data[0], y: point.data[1] };\n };\n return MouseLayer;\n}(Layer_1.default));\nexports.default = MouseLayer;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n\n\nvar emptyFunction = __webpack_require__(6);\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __webpack_require__(0);\nvar ReactDOM = __webpack_require__(15);\nvar ImageFrame_1 = __webpack_require__(9);\nexports.ImageFrame = ImageFrame_1.default;\nvar ImageViewer_1 = __webpack_require__(33);\nexports.ImageViewer = ImageViewer_1.default;\nvar ImageLayer_1 = __webpack_require__(10);\nexports.ImageLayer = ImageLayer_1.default;\nvar TextLayer_1 = __webpack_require__(11);\nexports.TextLayer = TextLayer_1.default;\nvar MouseLayer_1 = __webpack_require__(12);\nexports.MouseLayer = MouseLayer_1.default;\nvar image_loading_1 = __webpack_require__(5);\nexports.loadImage = image_loading_1.loadImage;\nexports.ImageCache = image_loading_1.ImageCache;\nvar linalg_1 = __webpack_require__(1);\nexports.Matrix4x4 = linalg_1.Matrix4x4;\nexports.Vector4 = linalg_1.Vector4;\nfunction renderViewer(elem, data, baseUrl) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var component = (React.createElement(ImageViewer_1.default, { data: data, baseUrl: baseUrl, sortMenu: false, removeCommonPrefix: false }));\n return ReactDOM.render(component, elem);\n}\nexports.renderViewer = renderViewer;\nexports.default = ImageViewer_1.default;\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_15__;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction cachedFunction(f) {\n var cachedValues = new Map();\n return function (input) {\n var cachedResult = cachedValues.get(input);\n if (cachedResult) {\n return cachedResult;\n }\n else {\n var output = f(input);\n cachedValues.set(input, output);\n return output;\n }\n };\n}\nexports.default = cachedFunction;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = function() {\n return new Worker(__webpack_require__.p + \"exr.worker.js\");\n};\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(19);\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\n\n\nvar UserAgent_DEPRECATED = __webpack_require__(20);\n\nvar isEventSupported = __webpack_require__(21);\n\n\n// Reasonable defaults\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) { sY = event.detail; }\n if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }\n if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }\n if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }\n\n // side scrolling on FF with DOMMouseScroll\n if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) { pY = event.deltaY; }\n if ('deltaX' in event) { pX = event.deltaX; }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }\n if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }\n\n return { spinX : sX,\n spinY : sY,\n pixelX : pX,\n pixelY : pY };\n}\n\n\n/**\n * The best combination if you prefer spinX + spinY normalization. It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function() /*string*/ {\n return (UserAgent_DEPRECATED.firefox())\n ? 'DOMMouseScroll'\n : (isEventSupported('wheel'))\n ? 'wheel'\n : 'mousewheel';\n};\n\nmodule.exports = normalizeWheel;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\n/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n * Provides entirely client-side User Agent and OS detection. You should prefer\n * the non-deprecated UserAgent module when possible, which exposes our\n * authoritative server-side PHP-based detection to the client.\n *\n * Usage is straightforward:\n *\n * if (UserAgent_DEPRECATED.ie()) {\n * // IE\n * }\n *\n * You can also do version checks:\n *\n * if (UserAgent_DEPRECATED.ie() >= 7) {\n * // IE7 or better\n * }\n *\n * The browser functions will return NaN if the browser does not match, so\n * you can also do version compares the other way:\n *\n * if (UserAgent_DEPRECATED.ie() < 7) {\n * // IE6 or worse\n * }\n *\n * Note that the version is a float and may include a minor version number,\n * so you should always use range operators to perform comparisons, not\n * strict equality.\n *\n * **Note:** You should **strongly** prefer capability detection to browser\n * version detection where it's reasonable:\n *\n * http://www.quirksmode.org/js/support.html\n *\n * Further, we have a large number of mature wrapper functions and classes\n * which abstract away many browser irregularities. Check the documentation,\n * grep for things, or ask on [email protected] before writing yet\n * another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n if (_populated) {\n return;\n }\n\n _populated = true;\n\n // To work around buggy JS libraries that can't handle multi-digit\n // version numbers, Opera 10's user agent string claims it's Opera\n // 9, then later includes a Version/X.Y field:\n //\n // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n var uas = navigator.userAgent;\n var agent = /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(uas);\n var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n _ipad = /\\b(iP[ao]d)/.exec(uas);\n _android = /Android/i.exec(uas);\n _native = /FBAN\\/\\w+;/i.exec(uas);\n _mobile = /Mobile/i.exec(uas);\n\n // Note that the IE team blog would have you believe you should be checking\n // for 'Win64; x64'. But MSDN then reveals that you can actually be coming\n // from either x64 or ia64; so ultimately, you should just check for Win64\n // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit\n // Windows will send 'WOW64' instead.\n _win64 = !!(/Win64/.exec(uas));\n\n if (agent) {\n _ie = agent[1] ? parseFloat(agent[1]) : (\n agent[5] ? parseFloat(agent[5]) : NaN);\n // IE compatibility mode\n if (_ie && document && document.documentMode) {\n _ie = document.documentMode;\n }\n // grab the \"true\" ie version from the trident token if available\n var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n _opera = agent[3] ? parseFloat(agent[3]) : NaN;\n _webkit = agent[4] ? parseFloat(agent[4]) : NaN;\n if (_webkit) {\n // We do not add the regexp to the above test, because it will always\n // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n // the userAgent string.\n agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n } else {\n _chrome = NaN;\n }\n } else {\n _ie = _firefox = _opera = _chrome = _webkit = NaN;\n }\n\n if (os) {\n if (os[1]) {\n // Detect OS X version. If no version number matches, set _osx to true.\n // Version examples: 10, 10_6_1, 10.7\n // Parses version number as a float, taking only first two sets of\n // digits. If only one set of digits is found, returns just the major\n // version number.\n var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n } else {\n _osx = false;\n }\n _windows = !!os[2];\n _linux = !!os[3];\n } else {\n _osx = _windows = _linux = false;\n }\n}\n\nvar UserAgent_DEPRECATED = {\n\n /**\n * Check if the UA is Internet Explorer.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n ie: function() {\n return _populate() || _ie;\n },\n\n /**\n * Check if we're in Internet Explorer compatibility mode.\n *\n * @return bool true if in compatibility mode, false if\n * not compatibility mode or not ie\n */\n ieCompatibilityMode: function() {\n return _populate() || (_ie_real_version > _ie);\n },\n\n\n /**\n * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we\n * only need this because Skype can't handle 64-bit IE yet. We need to remove\n * this when we don't need it -- tracked by #601957.\n */\n ie64: function() {\n return UserAgent_DEPRECATED.ie() && _win64;\n },\n\n /**\n * Check if the UA is Firefox.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n firefox: function() {\n return _populate() || _firefox;\n },\n\n\n /**\n * Check if the UA is Opera.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n opera: function() {\n return _populate() || _opera;\n },\n\n\n /**\n * Check if the UA is WebKit.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n webkit: function() {\n return _populate() || _webkit;\n },\n\n /**\n * For Push\n * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n */\n safari: function() {\n return UserAgent_DEPRECATED.webkit();\n },\n\n /**\n * Check if the UA is a Chrome browser.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n chrome : function() {\n return _populate() || _chrome;\n },\n\n\n /**\n * Check if the user is running Windows.\n *\n * @return bool `true' if the user's OS is Windows.\n */\n windows: function() {\n return _populate() || _windows;\n },\n\n\n /**\n * Check if the user is running Mac OS X.\n *\n * @return float|bool Returns a float if a version number is detected,\n * otherwise true/false.\n */\n osx: function() {\n return _populate() || _osx;\n },\n\n /**\n * Check if the user is running Linux.\n *\n * @return bool `true' if the user's OS is some flavor of Linux.\n */\n linux: function() {\n return _populate() || _linux;\n },\n\n /**\n * Check if the user is running on an iPhone or iPod platform.\n *\n * @return bool `true' if the user is running some flavor of the\n * iPhone OS.\n */\n iphone: function() {\n return _populate() || _iphone;\n },\n\n mobile: function() {\n return _populate() || (_iphone || _ipad || _android || _mobile);\n },\n\n nativeApp: function() {\n // webviews inside of the native apps\n return _populate() || _native;\n },\n\n android: function() {\n return _populate() || _android;\n },\n\n ipad: function() {\n return _populate() || _ipad;\n }\n};\n\nmodule.exports = UserAgent_DEPRECATED;\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\n\n\nvar ExecutionEnvironment = __webpack_require__(22);\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature =\n document.implementation &&\n document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM ||\n capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nmodule.exports = isEventSupported;\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\n\n\nvar canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners:\n canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n\n\nvar isObject = __webpack_require__(24);\n\nfunction isObjectObject(o) {\n return isObject(o) === true\n && Object.prototype.toString.call(o) === '[object Object]';\n}\n\nmodule.exports = function isPlainObject(o) {\n var ctor,prot;\n\n if (isObjectObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (typeof ctor !== 'function') return false;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObjectObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n\n\nmodule.exports = function isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n};\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*\n * __ ___\n * _____/ /___ __/ (_)____\n * / ___/ __/ / / / / / ___/\n * (__ ) /_/ /_/ / / (__ )\n * /____/\\__/\\__, /_/_/____/\n * /____/\n *\n * light - weight css preprocessor @licence MIT\n */\n/* eslint-disable */\n(function (factory) {\n\t true ? (module['exports'] = factory(null)) :\n\t\ttypeof define === 'function' && define['amd'] ? define(factory(null)) :\n\t\t\t(window['stylis'] = factory(null))\n}(/** @param {*=} options */function factory (options) {\n\n\t'use strict'\n\n\t/**\n\t * Notes\n\t *\n\t * The ['<method name>'] pattern is used to support closure compiler\n\t * the jsdoc signatures are also used to the same effect\n\t *\n\t * ---- \n\t *\n\t * int + int + int === n4 [faster]\n\t *\n\t * vs\n\t *\n\t * int === n1 && int === n2 && int === n3\n\t *\n\t * ----\n\t *\n\t * switch (int) { case ints...} [faster]\n\t *\n\t * vs\n\t *\n\t * if (int == 1 && int === 2 ...)\n\t *\n\t * ----\n\t *\n\t * The (first*n1 + second*n2 + third*n3) format used in the property parser\n\t * is a simple way to hash the sequence of characters\n\t * taking into account the index they occur in\n\t * since any number of 3 character sequences could produce duplicates.\n\t *\n\t * On the other hand sequences that are directly tied to the index of the character\n\t * resolve a far more accurate measure, it's also faster\n\t * to evaluate one condition in a switch statement\n\t * than three in an if statement regardless of the added math.\n\t *\n\t * This allows the vendor prefixer to be both small and fast.\n\t */\n\n\tvar nullptn = /^\\0+/g /* matches leading null characters */\n\tvar formatptn = /[\\0\\r\\f]/g /* matches new line, null and formfeed characters */\n\tvar colonptn = /: */g /* splits animation rules */\n\tvar cursorptn = /zoo|gra/ /* assert cursor varient */\n\tvar transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */\n\tvar animationptn = /,+\\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */\n\tvar propertiesptn = / +\\s*(?![^(]*[)])/g /* animation properties */\n\tvar elementptn = / *[\\0] */g /* selector elements */\n\tvar selectorptn = /,\\r+?/g /* splits selectors */\n\tvar andptn = /([\\t\\r\\n ])*\\f?&/g /* match & */\n\tvar escapeptn = /:global\\(((?:[^\\(\\)\\[\\]]*|\\[.*\\]|\\([^\\(\\)]*\\))*)\\)/g /* matches :global(.*) */\n\tvar invalidptn = /\\W+/g /* removes invalid characters from keyframes */\n\tvar keyframeptn = /@(k\\w+)\\s*(\\S*)\\s*/ /* matches @keyframes $1 */\n\tvar plcholdrptn = /::(place)/g /* match ::placeholder varient */\n\tvar readonlyptn = /:(read-only)/g /* match :read-only varient */\n\tvar beforeptn = /\\s+(?=[{\\];=:>])/g /* matches \\s before ] ; = : */\n\tvar afterptn = /([[}=:>])\\s+/g /* matches \\s after characters [ } = : */\n\tvar tailptn = /(\\{[^{]+?);(?=\\})/g /* matches tail semi-colons ;} */\n\tvar whiteptn = /\\s{2,}/g /* matches repeating whitespace */\n\tvar pseudoptn = /([^\\(])(:+) */g /* pseudo element */\n\tvar writingptn = /[svh]\\w+-[tblr]{2}/ /* match writing mode property values */\n\n\t/* vendors */\n\tvar webkit = '-webkit-'\n\tvar moz = '-moz-'\n\tvar ms = '-ms-'\n\n\t/* character codes */\n\tvar SEMICOLON = 59 /* ; */\n\tvar CLOSEBRACES = 125 /* } */\n\tvar OPENBRACES = 123 /* { */\n\tvar OPENPARENTHESES = 40 /* ( */\n\tvar CLOSEPARENTHESES = 41 /* ) */\n\tvar OPENBRACKET = 91 /* [ */\n\tvar CLOSEBRACKET = 93 /* ] */\n\tvar NEWLINE = 10 /* \\n */\n\tvar CARRIAGE = 13 /* \\r */\n\tvar TAB = 9 /* \\t */\n\tvar AT = 64 /* @ */\n\tvar SPACE = 32 /* */\n\tvar AND = 38 /* & */\n\tvar DASH = 45 /* - */\n\tvar UNDERSCORE = 95 /* _ */\n\tvar STAR = 42 /* * */\n\tvar COMMA = 44 /* , */\n\tvar COLON = 58 /* : */\n\tvar SINGLEQUOTE = 39 /* ' */\n\tvar DOUBLEQUOTE = 34 /* \" */\n\tvar FOWARDSLASH = 47 /* / */\n\tvar GREATERTHAN = 62 /* > */\n\tvar PLUS = 43 /* + */\n\tvar TILDE = 126 /* ~ */\n\tvar NULL = 0 /* \\0 */\n\tvar FORMFEED = 12 /* \\f */\n\tvar VERTICALTAB = 11 /* \\v */\n\n\t/* special identifiers */\n\tvar KEYFRAME = 107 /* k */\n\tvar MEDIA = 109 /* m */\n\tvar SUPPORTS = 115 /* s */\n\tvar PLACEHOLDER = 112 /* p */\n\tvar READONLY = 111 /* o */\n\tvar IMPORT = 169 /* <at>i */\n\tvar CHARSET = 163 /* <at>c */\n\tvar DOCUMENT = 100 /* <at>d */\n\n\tvar column = 1 /* current column */\n\tvar line = 1 /* current line numebr */\n\tvar pattern = 0 /* :pattern */\n\n\tvar cascade = 1 /* #id h1 h2 vs h1#id h2#id */\n\tvar vendor = 1 /* vendor prefix */\n\tvar escape = 1 /* escape :global() pattern */\n\tvar compress = 0 /* compress output */\n\tvar semicolon = 0 /* no/semicolon option */\n\tvar preserve = 0 /* preserve empty selectors */\n\n\t/* empty reference */\n\tvar array = []\n\n\t/* plugins */\n\tvar plugins = []\n\tvar plugged = 0\n\n\t/* plugin context */\n\tvar POSTS = -2\n\tvar PREPS = -1\n\tvar UNKWN = 0\n\tvar PROPS = 1\n\tvar BLCKS = 2\n\tvar ATRUL = 3\n\n\t/* plugin newline context */\n\tvar unkwn = 0\n\n\t/* keyframe animation */\n\tvar keyed = 1\n\tvar key = ''\n\n\t/* selector namespace */\n\tvar nscopealt = ''\n\tvar nscope = ''\n\n\t/**\n\t * Compile\n\t *\n\t * @param {Array<string>} parent\n\t * @param {Array<string>} current\n\t * @param {string} body\n\t * @param {number} id\n\t * @return {string}\n\t */\n\tfunction compile (parent, current, body, id) {\n\t\tvar bracket = 0 /* brackets [] */\n\t\tvar comment = 0 /* comments /* // or /* */\n\t\tvar parentheses = 0 /* functions () */\n\t\tvar quote = 0 /* quotes '', \"\" */\n\n\t\tvar first = 0 /* first character code */\n\t\tvar second = 0 /* second character code */\n\t\tvar code = 0 /* current character code */\n\t\tvar tail = 0 /* previous character code */\n\t\tvar trail = 0 /* character before previous code */\n\t\tvar peak = 0 /* previous non-whitespace code */\n\t\t\n\t\tvar counter = 0 /* count sequence termination */\n\t\tvar context = 0 /* track current context */\n\t\tvar atrule = 0 /* track @at-rule context */\n\t\tvar pseudo = 0 /* track pseudo token index */\n\t\tvar caret = 0 /* current character index */\n\t\tvar format = 0 /* control character formating context */\n\t\tvar insert = 0 /* auto semicolon insertion */\n\t\tvar invert = 0 /* inverted selector pattern */\n\t\tvar length = 0 /* generic length address */\n\t\tvar eof = body.length /* end of file(length) */\n\t\tvar eol = eof - 1 /* end of file(characters) */\n\n\t\tvar char = '' /* current character */\n\t\tvar chars = '' /* current buffer of characters */\n\t\tvar child = '' /* next buffer of characters */\n\t\tvar out = '' /* compiled body */\n\t\tvar children = '' /* compiled children */\n\t\tvar flat = '' /* compiled leafs */\n\t\tvar selector /* generic selector address */\n\t\tvar result /* generic address */\n\n\t\t// ...build body\n\t\twhile (caret < eof) {\n\t\t\tcode = body.charCodeAt(caret)\n\n\t\t\tif (comment + quote + parentheses + bracket === 0) {\n\t\t\t\t// eof varient\n\t\t\t\tif (caret === eol) {\n\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\tchars = chars.replace(formatptn, '')\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((chars = chars.trim()).length > 0) {\n\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\t\tcase NEWLINE: {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchars += body.charAt(caret)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcode = SEMICOLON\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// auto semicolon insertion\n\t\t\t\tif (insert === 1) {\n\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t// false flags\n\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// valid\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tcaret--\n\t\t\t\t\t\t\tcode = SEMICOLON\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// token varient\n\t\t\t\tswitch (code) {\n\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\tchars = chars.trim()\n\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\t\t\t\t\t\tcounter = 1\n\t\t\t\t\t\tcaret++\n\n\t\t\t\t\t\twhile (caret < eof) {\n\t\t\t\t\t\t\tcode = body.charCodeAt(caret)\n\n\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\t\t\t\tcounter++\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\t\t\t\t\tcounter--\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (counter === 0) {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tchild += body.charAt(caret++)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (first === NULL) {\n\t\t\t\t\t\t\tfirst = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (first) {\n\t\t\t\t\t\t\t// @at-rule\n\t\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\t\t\t\tchars = chars.replace(formatptn, '')\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsecond = chars.charCodeAt(1)\n\n\t\t\t\t\t\t\t\tswitch (second) {\n\t\t\t\t\t\t\t\t\tcase DOCUMENT:\n\t\t\t\t\t\t\t\t\tcase MEDIA:\n\t\t\t\t\t\t\t\t\tcase SUPPORTS: {\n\t\t\t\t\t\t\t\t\t\tselector = current\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\tselector = array\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tchild = compile(current, selector, child, second)\n\t\t\t\t\t\t\t\tlength = child.length\n\n\t\t\t\t\t\t\t\t// preserve empty @at-rule\n\t\t\t\t\t\t\t\tif (preserve > 0 && length === 0) {\n\t\t\t\t\t\t\t\t\tlength = chars.length\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// execute plugins, @at-rule context\n\t\t\t\t\t\t\t\tif (plugged > 0) {\n\t\t\t\t\t\t\t\t\tselector = select(array, chars, invert)\n\t\t\t\t\t\t\t\t\tresult = proxy(ATRUL, child, selector, current, line, column, length, second)\n\t\t\t\t\t\t\t\t\tchars = selector.join('')\n\n\t\t\t\t\t\t\t\t\tif (result !== void 0) {\n\t\t\t\t\t\t\t\t\t\tif ((length = (child = result.trim()).length) === 0) {\n\t\t\t\t\t\t\t\t\t\t\tsecond = 0\n\t\t\t\t\t\t\t\t\t\t\tchild = ''\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}\n\n\t\t\t\t\t\t\t\tif (length > 0) {\n\t\t\t\t\t\t\t\t\tswitch (second) {\n\t\t\t\t\t\t\t\t\t\tcase DOCUMENT:\n\t\t\t\t\t\t\t\t\t\tcase MEDIA:\n\t\t\t\t\t\t\t\t\t\tcase SUPPORTS: {\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + '{' + child + '}'\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase KEYFRAME: {\n\t\t\t\t\t\t\t\t\t\t\tchars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : ''))\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + '{' + child + '}'\n\t\t\t\t\t\t\t\t\t\t\tchild = '@' + (vendor > 0 ? webkit + child + '@' + child : child)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + child\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} else {\n\t\t\t\t\t\t\t\t\tchild = ''\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// selector\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchild = compile(current, select(current, chars, invert), child, id)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tchildren += child\n\n\t\t\t\t\t\t// reset\n\t\t\t\t\t\tcontext = 0\n\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\tformat = 0\n\t\t\t\t\t\tinvert = 0\n\t\t\t\t\t\tatrule = 0\n\t\t\t\t\t\tchars = ''\n\t\t\t\t\t\tchild = ''\n\n\t\t\t\t\t\tcode = body.charCodeAt(++caret)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\tcase SEMICOLON: {\n\t\t\t\t\t\tchars = (format > 0 ? chars.replace(formatptn, '') : chars).trim()\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (code !== CLOSEBRACES || chars.length > 0) {\n\t\t\t\t\t\t\t// monkey-patch missing colon\n\t\t\t\t\t\t\tif (pseudo === 0) {\n\t\t\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\n\t\t\t\t\t\t\t\t// first character is a letter or dash, buffer has a space character\n\t\t\t\t\t\t\t\tif ((first === DASH || first > 96 && first < 123) && chars.indexOf(' ')) {\n\t\t\t\t\t\t\t\t\tchars = chars.replace(' ', ': ')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// execute plugins, property context\n\t\t\t\t\t\t\tif (plugged > 0) {\n\t\t\t\t\t\t\t\tif ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id)) !== void 0) {\n\t\t\t\t\t\t\t\t\tif ((chars = result.trim()).length === 0) {\n\t\t\t\t\t\t\t\t\t\tchars = '\\0\\0'\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\n\t\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\t\t\t\t\t\t\tsecond = chars.charCodeAt(1)\n\n\t\t\t\t\t\t\tswitch (first + second) {\n\t\t\t\t\t\t\t\tcase NULL: {\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase IMPORT:\n\t\t\t\t\t\t\t\tcase CHARSET: {\n\t\t\t\t\t\t\t\t\tflat += chars + body.charAt(caret)\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\tout += pseudo > 0 ? property(chars, first, second, chars.charCodeAt(2)) : chars + ';'\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\n\t\t\t\t\t\t// reset\n\t\t\t\t\t\tcontext = 0\n\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\tformat = 0\n\t\t\t\t\t\tinvert = 0\n\t\t\t\t\t\tchars = ''\n\n\t\t\t\t\t\tcaret++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// parse characters\n\t\t\tswitch (code) {\n\t\t\t\tcase CARRIAGE:\n\t\t\t\tcase NEWLINE: {\n\t\t\t\t\t// auto insert semicolon\n\t\t\t\t\tif (comment + quote + parentheses + bracket + semicolon === 0) {\n\t\t\t\t\t\t// valid non-whitespace characters that\n\t\t\t\t\t\t// may precede a newline\n\t\t\t\t\t\tswitch (peak) {\n\t\t\t\t\t\t\tcase AT:\n\t\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t\tcase FOWARDSLASH:\n\t\t\t\t\t\t\tcase DASH:\n\t\t\t\t\t\t\tcase COLON:\n\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t// current buffer has a colon\n\t\t\t\t\t\t\t\tif (pseudo > 0) {\n\t\t\t\t\t\t\t\t\tinsert = 1\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}\n\n\t\t\t\t\t// terminate line comment\n\t\t\t\t\tif (comment === FOWARDSLASH) {\n\t\t\t\t\t\tcomment = 0\n\t\t\t\t\t}\n\n\t\t\t\t\t// execute plugins, newline context\n\t\t\t\t\tif (plugged * unkwn > 0) {\n\t\t\t\t\t\tproxy(UNKWN, chars, current, parent, line, column, out.length, id)\n\t\t\t\t\t}\n\n\t\t\t\t\t// next line, reset column position\n\t\t\t\t\tcolumn = 1\n\t\t\t\t\tline++\n\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\t// increment column position\n\t\t\t\t\tcolumn++\n\n\t\t\t\t\t// current character\n\t\t\t\t\tchar = body.charAt(caret)\n\n\t\t\t\t\tif (code === TAB && quote === 0) {\n\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\t\tchar = ''\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchar = parentheses === 0 ? '' : ' '\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t// remove comments, escape functions, strings, attributes and prepare selectors\n\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t// escape breaking control characters\n\t\t\t\t\t\tcase NULL: {\n\t\t\t\t\t\t\tchar = '\\\\0'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase FORMFEED: {\n\t\t\t\t\t\t\tchar = '\\\\f'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase VERTICALTAB: {\n\t\t\t\t\t\t\tchar = '\\\\v'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// &\n\t\t\t\t\t\tcase AND: {\n\t\t\t\t\t\t\t// inverted selector pattern i.e html &\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0 && cascade > 0) {\n\t\t\t\t\t\t\t\tinvert = 1\n\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\tchar = '\\f' + char\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ::p<l>aceholder, l\n\t\t\t\t\t\t// :read-on<l>y, l\n\t\t\t\t\t\tcase 108: {\n\t\t\t\t\t\t\tif (quote + comment + bracket + pattern === 0 && pseudo > 0) {\n\t\t\t\t\t\t\t\tswitch (caret - pseudo) {\n\t\t\t\t\t\t\t\t\t// ::placeholder\n\t\t\t\t\t\t\t\t\tcase 2: {\n\t\t\t\t\t\t\t\t\t\tif (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) {\n\t\t\t\t\t\t\t\t\t\t\tpattern = tail\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// :read-only\n\t\t\t\t\t\t\t\t\tcase 8: {\n\t\t\t\t\t\t\t\t\t\tif (trail === READONLY) {\n\t\t\t\t\t\t\t\t\t\t\tpattern = trail\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}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// :<pattern>\n\t\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tpseudo = caret\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// selectors\n\t\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\t\tif (comment + parentheses + quote + bracket === 0) {\n\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\tchar += '\\r'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// quotes\n\t\t\t\t\t\tcase DOUBLEQUOTE: {\n\t\t\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t\t\tquote = quote === code ? 0 : (quote === 0 ? code : quote)\n\t\t\t\t\t\t\t\t// \" last character, add synthetic padding\n\t\t\t\t\t\t\t\tif (caret === eol) {\n\t\t\t\t\t\t\t\t\teol++\n\t\t\t\t\t\t\t\t\teof++\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase SINGLEQUOTE: {\n\t\t\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t\t\tquote = quote === code ? 0 : (quote === 0 ? code : quote)\n\t\t\t\t\t\t\t\t// ' last character, add synthetic padding\n\t\t\t\t\t\t\t\tif (caret === eol) {\n\t\t\t\t\t\t\t\t\teol++\n\t\t\t\t\t\t\t\t\teof++\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// attributes\n\t\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\t\tif (quote + comment + parentheses === 0) {\n\t\t\t\t\t\t\t\tbracket++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase CLOSEBRACKET: {\n\t\t\t\t\t\t\tif (quote + comment + parentheses === 0) {\n\t\t\t\t\t\t\t\tbracket--\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// functions\n\t\t\t\t\t\tcase CLOSEPARENTHESES: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\t// ) last character, add synthetic padding\n\t\t\t\t\t\t\t\tif (caret === eol) {\n\t\t\t\t\t\t\t\t\teol++\n\t\t\t\t\t\t\t\t\teof++\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tparentheses--\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\tswitch (tail*2 + trail*3) {\n\t\t\t\t\t\t\t\t\t\t// :matches\n\t\t\t\t\t\t\t\t\t\tcase 533: {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// :global, :not, :nth-child etc...\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tcounter = 0\n\t\t\t\t\t\t\t\t\t\t\tcontext = 1\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}\n\n\t\t\t\t\t\t\t\tparentheses++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\tif (comment + parentheses + quote + bracket + pseudo + atrule === 0) {\n\t\t\t\t\t\t\t\tatrule = 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// block/line comments\n\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\tcase FOWARDSLASH: {\n\t\t\t\t\t\t\tif (quote + bracket + parentheses > 0) {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch (comment) {\n\t\t\t\t\t\t\t\t// initialize line/block comment context\n\t\t\t\t\t\t\t\tcase 0: {\n\t\t\t\t\t\t\t\t\tswitch (code*2 + body.charCodeAt(caret+1)*3) {\n\t\t\t\t\t\t\t\t\t\t// //\n\t\t\t\t\t\t\t\t\t\tcase 235: {\n\t\t\t\t\t\t\t\t\t\t\tcomment = FOWARDSLASH\n\t\t\t\t\t\t\t\t\t\t\tbreak\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\tcase 220: {\n\t\t\t\t\t\t\t\t\t\t\tcomment = STAR\n\t\t\t\t\t\t\t\t\t\t\tbreak\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\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// end block comment context\n\t\t\t\t\t\t\t\tcase STAR: {\n\t\t\t\t\t\t\t\t\tif (code === FOWARDSLASH && tail === STAR) {\n\t\t\t\t\t\t\t\t\t\tchar = ''\n\t\t\t\t\t\t\t\t\t\tcomment = 0\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}\n\n\t\t\t\t\t// ignore comment blocks\n\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t// aggressive isolation mode, divide each individual selector\n\t\t\t\t\t\t// including selectors in :not function but excluding selectors in :global function\n\t\t\t\t\t\tif (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) {\n\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\t\t// outside of an isolated context i.e nth-child(<...>)\n\t\t\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\t\t\tcase CARRIAGE: {\n\t\t\t\t\t\t\t\t\t\t\t\tchar = char + '\\0'\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\t\tchar = '\\0' + char + (code === COMMA ? '' : '\\0')\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\tformat = 1\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// within an isolated context, sleep untill it's terminated\n\t\t\t\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\t\t\t\tcontext = ++counter\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcase CLOSEPARENTHESES: {\n\t\t\t\t\t\t\t\t\t\t\t\tif ((context = --counter) === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t\t\t\t\tchar += '\\0'\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\tbreak\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}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\t\tcase NULL:\n\t\t\t\t\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\t\t\tcase FORMFEED:\n\t\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\t\tcase CARRIAGE: {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\t// ignore in isolated contexts\n\t\t\t\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t\t\t\tchar += '\\0'\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}\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\n\t\t\t\t\t\t// concat buffer of characters\n\t\t\t\t\t\tchars += char\n\n\t\t\t\t\t\t// previous non-whitespace character code\n\t\t\t\t\t\tif (code !== SPACE) {\n\t\t\t\t\t\t\tpeak = code\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// tail character codes\n\t\t\ttrail = tail\n\t\t\ttail = code\n\n\t\t\t// visit every character\n\t\t\tcaret++\n\t\t}\n\n\t\tlength = out.length\n\n\t\t// preserve empty selector\n \t\tif (preserve > 0) {\n \t\t\tif (length === 0 && children.length === 0 && (current[0].length === 0) === false) {\n \t\t\t\tif (id !== MEDIA || (current.length === 1 && (cascade > 0 ? nscopealt : nscope) === current[0])) {\n\t\t\t\t\tlength = current.join(',').length + 2 \t\t\t\t\t\n \t\t\t\t}\n \t\t\t}\n\t\t}\n\n\t\tif (length > 0) {\n\t\t\t// cascade isolation mode\n\t\t\tif (cascade === 0 && id !== KEYFRAME) {\n\t\t\t\tisolate(current)\n\t\t\t}\n\n\t\t\t// execute plugins, block context\n\t\t\tif (plugged > 0) {\n\t\t\t\tresult = proxy(BLCKS, out, current, parent, line, column, length, id)\n\n\t\t\t\tif (result !== void 0 && (out = result).length === 0) {\n\t\t\t\t\treturn flat + out + children\n\t\t\t\t}\n\t\t\t}\t\t\n\n\t\t\tout = current.join(',') + '{' + out + '}'\n\n\t\t\tif (vendor*pattern > 0) {\n\t\t\t\tswitch (pattern) {\n\t\t\t\t\t// ::read-only\n\t\t\t\t\tcase READONLY: {\n\t\t\t\t\t\tout = out.replace(readonlyptn, ':'+moz+'$1')+out\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// ::placeholder\n\t\t\t\t\tcase PLACEHOLDER: {\n\t\t\t\t\t\tout = (\n\t\t\t\t\t\t\tout.replace(plcholdrptn, '::' + webkit + 'input-$1') +\n\t\t\t\t\t\t\tout.replace(plcholdrptn, '::' + moz + '$1') +\n\t\t\t\t\t\t\tout.replace(plcholdrptn, ':' + ms + 'input-$1') + out\n\t\t\t\t\t\t)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpattern = 0\n\t\t\t}\n\t\t}\n\n\t\treturn flat + out + children\n\t}\n\n\t/**\n\t * Select\n\t *\n\t * @param {Array<string>} parent\n\t * @param {string} current\n\t * @param {number} invert\n\t * @return {Array<string>}\n\t */\n\tfunction select (parent, current, invert) {\n\t\tvar selectors = current.trim().split(selectorptn)\n\t\tvar out = selectors\n\n\t\tvar length = selectors.length\n\t\tvar l = parent.length\n\n\t\tswitch (l) {\n\t\t\t// 0-1 parent selectors\n\t\t\tcase 0:\n\t\t\tcase 1: {\n\t\t\t\tfor (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; i++) {\n\t\t\t\t\tout[i] = scope(selector, out[i], invert, l).trim()\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// >2 parent selectors, nested\n\t\t\tdefault: {\n\t\t\t\tfor (var i = 0, j = 0, out = []; i < length; i++) {\n\t\t\t\t\tfor (var k = 0; k < l; k++) {\n\t\t\t\t\t\tout[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Scope\n\t *\n\t * @param {string} parent\n\t * @param {string} current\n\t * @param {number} invert\n\t * @param {number} level\n\t * @return {string}\n\t */\n\tfunction scope (parent, current, invert, level) {\n\t\tvar selector = current\n\t\tvar code = selector.charCodeAt(0)\n\n\t\t// trim leading whitespace\n\t\tif (code < 33) {\n\t\t\tcode = (selector = selector.trim()).charCodeAt(0)\n\t\t}\n\n\t\tswitch (code) {\n\t\t\t// &\n\t\t\tcase AND: {\n\t\t\t\tswitch (cascade + level) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1: {\n\t\t\t\t\t\tif (parent.trim().length === 0) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn selector.replace(andptn, '$1'+parent.trim())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// :\n\t\t\tcase COLON: {\n\t\t\t\tswitch (selector.charCodeAt(1)) {\n\t\t\t\t\t// g in :global\n\t\t\t\t\tcase 103: {\n\t\t\t\t\t\tif (escape > 0 && cascade > 0) {\n\t\t\t\t\t\t\treturn selector.replace(escapeptn, '$1').replace(andptn, '$1'+nscope)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\t// :hover\n\t\t\t\t\t\treturn parent.trim() + selector\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\t// html &\n\t\t\t\tif (invert*cascade > 0 && selector.indexOf('\\f') > 0) {\n\t\t\t\t\treturn selector.replace(andptn, (parent.charCodeAt(0) === COLON ? '' : '$1')+parent.trim())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn parent + selector\n\t}\n\n\t/**\n\t * Property\n\t *\n\t * @param {string} input\n\t * @param {number} first\n\t * @param {number} second\n\t * @param {number} third\n\t * @return {string}\n\t */\n\tfunction property (input, first, second, third) {\n\t\tvar out = input + ';'\n\t\tvar index = 0\n\t\tvar hash = (first*2) + (second*3) + (third*4)\n\t\tvar cache\n\n\t\t// animation: a, n, i characters\n\t\tif (hash === 944) {\n\t\t\tout = animation(out)\n\t\t} else if (vendor > 0) {\n\t\t\t// vendor prefix\n\t\t\tswitch (hash) {\n\t\t\t\t// color/column, c, o, l\n\t\t\t\tcase 963: {\n\t\t\t\t\t// column\n\t\t\t\t\tif (out.charCodeAt(5) === 110) {\n\t\t\t\t\t\tout = webkit + out + out\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// appearance: a, p, p\n\t\t\t\tcase 978: {\n\t\t\t\t\tout = webkit + out + moz + out + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// hyphens: h, y, p\n\t\t\t\t// user-select: u, s, e\n\t\t\t\tcase 1019:\n\t\t\t\tcase 983: {\n\t\t\t\t\tout = webkit + out + moz + out + ms + out + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// background/backface-visibility, b, a, c\n\t\t\t\tcase 883: {\n\t\t\t\t\t// backface-visibility, -\n\t\t\t\t\tif (out.charCodeAt(8) === DASH) {\n\t\t\t\t\t\tout = webkit + out + out\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// flex: f, l, e\n\t\t\t\tcase 932: {\n\t\t\t\t\tout = webkit + out + ms + out + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// order: o, r, d\n\t\t\t\tcase 964: {\n\t\t\t\t\tout = webkit + out + ms + 'flex' + '-' + out + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// justify-content, j, u, s\n\t\t\t\tcase 1023: {\n\t\t\t\t\tcache = out.substring(out.indexOf(':', 15)).replace('flex-', '')\n\t\t\t\t\tout = webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// display(flex/inline-flex/inline-box): d, i, s\n\t\t\t\tcase 975: {\n\t\t\t\t\tindex = (out = input).length-10\n\t\t\t\t\tcache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(8).trim()\n\n\t\t\t\t\tswitch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) {\n\t\t\t\t\t\t// inline-\n\t\t\t\t\t\tcase 203: {\n\t\t\t\t\t\t\t// inline-box\n\t\t\t\t\t\t\tif (cache.charCodeAt(8) > 110) {\n\t\t\t\t\t\t\t\tout = out.replace(cache, webkit+cache)+';'+out\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// inline-flex\n\t\t\t\t\t\t// flex\n\t\t\t\t\t\tcase 207:\n\t\t\t\t\t\tcase 102: {\n\t\t\t\t\t\t\tout = (\n\t\t\t\t\t\t\t\tout.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+\n\t\t\t\t\t\t\t\tout.replace(cache, webkit+cache)+';'+\n\t\t\t\t\t\t\t\tout.replace(cache, ms+cache+'box')+';'+\n\t\t\t\t\t\t\t\tout\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tout += ';'\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// align-items, align-center, align-self: a, l, i, -\n\t\t\t\tcase 938: {\n\t\t\t\t\tif (out.charCodeAt(5) === DASH) {\n\t\t\t\t\t\tswitch (out.charCodeAt(6)) {\n\t\t\t\t\t\t\t// align-items, i\n\t\t\t\t\t\t\tcase 105: {\n\t\t\t\t\t\t\t\tcache = out.replace('-items', '')\n\t\t\t\t\t\t\t\tout = webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// align-self, s\n\t\t\t\t\t\t\tcase 115: {\n\t\t\t\t\t\t\t\tout = webkit + out + ms + 'flex-item-' + out.replace('-self', '') + out\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// align-content\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tout = webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '') + out\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// cursor, c, u, r\n\t\t\t\tcase 1005: {\n\t\t\t\t\tif (cursorptn.test(out)) {\n\t\t\t\t\t\tout = out.replace(colonptn, ': ' + webkit) + out.replace(colonptn, ': ' + moz) + out\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// width: min-content / width: max-content\n\t\t\t\tcase 953: {\n\t\t\t\t\tif ((index = out.indexOf('-content', 9)) > 0) {\n\t\t\t\t\t\t// width: min-content / width: max-content\n\t\t\t\t\t\tcache = out.substring(index - 3)\n\t\t\t\t\t\tout = 'width:' + webkit + cache + 'width:' + moz + cache + 'width:' + cache\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// text-size-adjust: t, e, x\n\t\t\t\tcase 1015: {\n\t\t\t\t\tif (input.charCodeAt(9) !== DASH) {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// transform, transition: t, r, a\n\t\t\t\tcase 962: {\n\t\t\t\t\tout = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out\n\n\t\t\t\t\t// transitions\n\t\t\t\t\tif (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) {\n\t\t\t\t\t\tout = out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// writing-mode, w, r, i\n\t\t\t\tcase 1000: {\n\t\t\t\t\tcache = out.substring(13).trim()\n\t\t\t\t\tindex = cache.indexOf('-')+1\n\n\t\t\t\t\tswitch (cache.charCodeAt(0)+cache.charCodeAt(index)) {\n\t\t\t\t\t\t// vertical-lr\n\t\t\t\t\t\tcase 226: {\n\t\t\t\t\t\t\tcache = out.replace(writingptn, 'tb')\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// vertical-rl\n\t\t\t\t\t\tcase 232: {\n\t\t\t\t\t\t\tcache = out.replace(writingptn, 'tb-rl')\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// horizontal-tb\n\t\t\t\t\t\tcase 220: {\n\t\t\t\t\t\t\tcache = out.replace(writingptn, 'lr')\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\treturn out\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tout = webkit+out+ms+cache+out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Animation\n\t *\n\t * @param {string} input\n\t * @return {string}\n\t */\n\tfunction animation (input) {\n\t\tvar length = input.length\n\t\tvar index = input.indexOf(':', 9) + 1\n\t\tvar declare = input.substring(0, index).trim()\n\t\tvar body = input.substring(index, length-1).trim()\n\t\tvar out = ''\n\n\t\t// shorthand\n\t\tif (input.charCodeAt(9) !== DASH) {\n\t\t\t// split in case of multiple animations\n\t\t\tvar list = body.split(animationptn)\n\n\t\t\tfor (var i = 0, index = 0, length = list.length; i < length; index = 0, i++) {\n\t\t\t\tvar value = list[i]\n\t\t\t\tvar items = value.split(propertiesptn)\n\n\t\t\t\twhile (value = items[index]) {\n\t\t\t\t\tvar peak = value.charCodeAt(0)\n\n\t\t\t\t\tif (keyed === 1 && (\n\t\t\t\t\t\t// letters\n\t\t\t\t\t\t(peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE ||\n\t\t\t\t\t\t// dash but not in sequence i.e --\n\t\t\t\t\t\t(peak === DASH && value.charCodeAt(1) !== DASH)\n\t\t\t\t\t)) {\n\t\t\t\t\t\t// not a number/function\n\t\t\t\t\t\tswitch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) {\n\t\t\t\t\t\t\tcase 1: {\n\t\t\t\t\t\t\t\tswitch (value) {\n\t\t\t\t\t\t\t\t\t// not a valid reserved keyword\n\t\t\t\t\t\t\t\t\tcase 'infinite': case 'alternate': case 'backwards': case 'running':\n\t\t\t\t\t\t\t\t\tcase 'normal': case 'forwards': case 'both': case 'none': case 'linear':\n\t\t\t\t\t\t\t\t\tcase 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out':\n\t\t\t\t\t\t\t\t\tcase 'paused': case 'reverse': case 'alternate-reverse': case 'inherit':\n\t\t\t\t\t\t\t\t\tcase 'initial': case 'unset': case 'step-start': case 'step-end': {\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\tvalue += key\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}\n\n\t\t\t\t\titems[index++] = value\n\t\t\t\t}\n\n\t\t\t\tout += (i === 0 ? '' : ',') + items.join(' ')\n\t\t\t}\n\t\t} else {\n\t\t\t// animation-name, n\n\t\t\tout += input.charCodeAt(10) === 110 ? body + (keyed === 1 ? key : '') : body\n\t\t}\n\n\t\tout = declare + out + ';'\n\n\t\treturn vendor > 0 ? webkit + out + out : out\n\t}\n\n\t/**\n\t * Isolate\n\t *\n\t * @param {Array<string>} selectors\n\t */\n\tfunction isolate (selectors) {\n\t\tfor (var i = 0, length = selectors.length, padding, element; i < length; i++) {\n\t\t\t// split individual elements in a selector i.e h1 h2 === [h1, h2]\n\t\t\tvar elements = selectors[i].split(elementptn)\n\t\t\tvar out = ''\n\n\t\t\tfor (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; j++) {\n\t\t\t\t// empty element\n\t\t\t\tif ((size = (element = elements[j]).length) === 0 && l > 1) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\ttail = out.charCodeAt(out.length-1)\n\t\t\t\tcode = element.charCodeAt(0)\n\t\t\t\tpadding = ''\n\n\t\t\t\tif (j !== 0) {\n\t\t\t\t\t// determine if we need padding\n\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tpadding = ' '\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tswitch (code) {\n\t\t\t\t\tcase AND: {\n\t\t\t\t\t\telement = padding + nscopealt\n\t\t\t\t\t}\n\t\t\t\t\tcase TILDE:\n\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\tcase PLUS:\n\t\t\t\t\tcase SPACE:\n\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\telement = padding + element + nscopealt\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\tswitch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) {\n\t\t\t\t\t\t\t// :global\n\t\t\t\t\t\t\tcase 530: {\n\t\t\t\t\t\t\t\tif (escape > 0) {\n\t\t\t\t\t\t\t\t\telement = padding + element.substring(8, size - 1)\n\t\t\t\t\t\t\t\t\tbreak\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// :hover, :nth-child(), ...\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tif (j < 1 || elements[j-1].length < 1) {\n\t\t\t\t\t\t\t\t\telement = padding + nscopealt + element\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\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\tpadding = ''\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tif (size > 1 && element.indexOf(':') > 0) {\n\t\t\t\t\t\t\telement = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2')\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telement = padding + element + nscopealt\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tout += element\n\t\t\t}\n\n\t\t\tselectors[i] = out.replace(formatptn, '').trim()\n\t\t}\n\t}\n\n\t/**\n\t * Proxy\n\t *\n\t * @param {number} context\n\t * @param {string} content\n\t * @param {Array<string>} selectors\n\t * @param {Array<string>} parents\n\t * @param {number} line\n\t * @param {number} column\n\t * @param {number} length\n\t * @param {number} id\n\t * @return {(string|void|*)}\n\t */\n\tfunction proxy (context, content, selectors, parents, line, column, length, id) {\n\t\tfor (var i = 0, out = content, next; i < plugged; i++) {\n\t\t\tswitch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id)) {\n\t\t\t\tcase void 0:\n\t\t\t\tcase false:\n\t\t\t\tcase true:\n\t\t\t\tcase null: {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tout = next\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch (out) {\n\t\t\tcase void 0:\n\t\t\tcase false:\n\t\t\tcase true:\n\t\t\tcase null:\n\t\t\tcase content: {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\treturn out\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Minify\n\t *\n\t * @param {(string|*)} output\n\t * @return {string}\n\t */\n\tfunction minify (output) {\n\t\treturn output\n\t\t\t.replace(formatptn, '')\n\t\t\t.replace(beforeptn, '')\n\t\t\t.replace(afterptn, '$1')\n\t\t\t.replace(tailptn, '$1')\n\t\t\t.replace(whiteptn, ' ')\n\t}\n\n\t/**\n\t * Use\n\t *\n\t * @param {(Array<function(...?)>|function(...?)|number|void)?} plugin\n\t */\n\tfunction use (plugin) {\n\t\tswitch (plugin) {\n\t\t\tcase void 0:\n\t\t\tcase null: {\n\t\t\t\tplugged = plugins.length = 0\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tswitch (plugin.constructor) {\n\t\t\t\t\tcase Array: {\n\t\t\t\t\t\tfor (var i = 0, length = plugin.length; i < length; i++) {\n\t\t\t\t\t\t\tuse(plugin[i])\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase Function: {\n\t\t\t\t\t\tplugins[plugged++] = plugin\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase Boolean: {\n\t\t\t\t\t\tunkwn = !!plugin|0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t\t}\n\n \t\treturn use\n\t}\n\n\t/**\n\t * Set\n\t *\n\t * @param {*} options\n\t */\n\tfunction set (options) {\t\t\n\t\tfor (var name in options) {\n\t\t\tvar value = options[name]\n\t\t\tswitch (name) {\n\t\t\t\tcase 'keyframe': keyed = value|0; break\n\t\t\t\tcase 'global': escape = value|0; break\n\t\t\t\tcase 'cascade': cascade = value|0; break\n\t\t\t\tcase 'compress': compress = value|0; break\n\t\t\t\tcase 'prefix': vendor = value|0; break\n\t\t\t\tcase 'semicolon': semicolon = value|0; break\n\t\t\t\tcase 'preserve': preserve = value|0; break\n\t\t\t}\n\t\t}\n\n\t\treturn set\n\t}\n\n\t/**\n\t * Stylis\n\t *\n\t * @param {string} selector\n\t * @param {string} input\n\t * @return {*}\n\t */\n\tfunction stylis (selector, input) {\n\t\tif (this !== void 0 && this.constructor === stylis) {\n\t\t\treturn factory(selector)\n\t\t}\n\n\t\t// setup\n\t\tvar ns = selector\n\t\tvar code = ns.charCodeAt(0)\n\n\t\t// trim leading whitespace\n\t\tif (code < 33) {\n\t\t\tcode = (ns = ns.trim()).charCodeAt(0)\n\t\t}\n\n\t\t// keyframe/animation namespace\n\t\tif (keyed > 0) {\n\t\t\tkey = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-')\n\t\t}\n\n\t\t// reset, used to assert if a plugin is moneky-patching the return value\n\t\tcode = 1\n\n\t\t// cascade/isolate\n\t\tif (cascade === 1) {\n\t\t\tnscope = ns\n\t\t} else {\n\t\t\tnscopealt = ns\n\t\t}\n\n\t\tvar selectors = [nscope]\n\t\tvar result\n\n\t\t// execute plugins, pre-process context\n\t\tif (plugged > 0) {\n\t\t\tresult = proxy(PREPS, input, selectors, selectors, line, column, 0, 0)\n\n\t\t\tif (result !== void 0 && typeof result === 'string') {\n\t\t\t\tinput = result\n\t\t\t}\n\t\t}\n\n\t\t// build\n\t\tvar output = compile(array, selectors, input, 0)\n\n\t\t// execute plugins, post-process context\n\t\tif (plugged > 0) {\n\t\t\tresult = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0)\n\t\n\t\t\t// bypass minification\n\t\t\tif (result !== void 0 && typeof(output = result) !== 'string') {\n\t\t\t\tcode = 0\n\t\t\t}\n\t\t}\n\n\t\t// reset\n\t\tkey = ''\n\t\tnscope = ''\n\t\tnscopealt = ''\n\t\tpattern = 0\n\t\tline = 1\n\t\tcolumn = 1\n\n\t\treturn compress*code === 0 ? output : minify(output)\n\t}\n\n\tstylis['use'] = use\n\tstylis['set'] = set\n\n\tif (options !== void 0) {\n\t\tset(options)\n\t}\n\n\treturn stylis\n}));\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(27)(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(30)();\n}\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar emptyFunction = __webpack_require__(6);\nvar invariant = __webpack_require__(7);\nvar warning = __webpack_require__(13);\nvar assign = __webpack_require__(28);\n\nvar ReactPropTypesSecret = __webpack_require__(8);\nvar checkPropTypes = __webpack_require__(29);\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning(\n false,\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = __webpack_require__(7);\n var warning = __webpack_require__(13);\n var ReactPropTypesSecret = __webpack_require__(8);\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar emptyFunction = __webpack_require__(6);\nvar invariant = __webpack_require__(7);\nvar ReactPropTypesSecret = __webpack_require__(8);\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports) {\n\nmodule.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n arguments: true,\n arity: true\n};\n\nvar isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function';\n\nmodule.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n var keys = Object.getOwnPropertyNames(sourceComponent);\n\n /* istanbul ignore else */\n if (isGetOwnPropertySymbolsAvailable) {\n keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) {\n try {\n targetComponent[keys[i]] = sourceComponent[keys[i]];\n } catch (error) {\n\n }\n }\n }\n }\n\n return targetComponent;\n};\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __webpack_require__(0);\nvar styled_components_1 = __webpack_require__(3);\nvar linalg_1 = __webpack_require__(1);\nvar number_aware_compare_1 = __webpack_require__(34);\nvar fullscreen_1 = __webpack_require__(35);\nvar HelpScreen_1 = __webpack_require__(36);\nvar Layer_1 = __webpack_require__(4);\nvar ImageFrameWithLoading_1 = __webpack_require__(37);\nvar navigation_1 = __webpack_require__(38);\nvar MainDiv = (_a = [\"\\n background-color: #fff;\\n font-size: .9em;\\n position: absolute;\\n top: 0; bottom: 0; left: 0; right: 0;\\n display: flex;\\n flex-direction: column;\\n color: #AAA;\\n\"], _a.raw = [\"\\n background-color: #fff;\\n font-size: .9em;\\n position: absolute;\\n top: 0; bottom: 0; left: 0; right: 0;\\n display: flex;\\n flex-direction: column;\\n color: #AAA;\\n\"], styled_components_1.default.div(_a));\nvar ImageArea = (_b = [\"\\n flex-grow: 1;\\n position: relative;\\n\"], _b.raw = [\"\\n flex-grow: 1;\\n position: relative;\\n\"], styled_components_1.default.div(_b));\n// A little hack to allow detecting shift click\nvar SHIFT_IS_DOWN = false;\ndocument.addEventListener('keydown', function (ev) {\n if (ev.key === 'Shift') {\n SHIFT_IS_DOWN = true;\n }\n});\ndocument.addEventListener('keyup', function (ev) {\n if (ev.key === 'Shift') {\n SHIFT_IS_DOWN = false;\n }\n});\nvar ImageViewer = /** @class */ (function (_super) {\n __extends(ImageViewer, _super);\n function ImageViewer(props) {\n var _this = _super.call(this, props) || this;\n _this.menuData = _this.props.data;\n if (props.sortMenu) {\n _this.menuData = _this.sortMenuRows(_this.menuData);\n }\n // Set the initial state\n _this.state = {\n activeRow: 0,\n selection: _this.getDefaultSelection(_this.menuData).slice(1),\n viewTransform: { default: 0.0 },\n exposure: { default: 1.0 },\n helpIsOpen: false,\n defaultTransformation: linalg_1.Matrix4x4.create(),\n transformationNeedsUpdate: true,\n hasFocus: false,\n };\n // Make sure 'this' is available in the keyboard handler when assigned to the keyup event\n _this.keyboardHandler = _this.keyboardHandler.bind(_this);\n _this.setFocus = _this.setFocus.bind(_this);\n _this.unsetFocus = _this.unsetFocus.bind(_this);\n return _this;\n }\n ImageViewer.prototype.componentDidMount = function () {\n this.mainContainer.setAttribute('tabindex', '1');\n this.mainContainer.addEventListener('keydown', this.keyboardHandler);\n this.mainContainer.addEventListener('focus', this.setFocus);\n this.mainContainer.addEventListener('focusout', this.unsetFocus);\n };\n ImageViewer.prototype.componentDidUpdate = function () {\n if (this.imageFrame && this.state.transformationNeedsUpdate) {\n this.imageFrame.setTransformation(this.state.defaultTransformation);\n this.setState({ transformationNeedsUpdate: false });\n }\n };\n ImageViewer.prototype.componentWillReceiveProps = function (nextProps) {\n this.menuData = nextProps.data;\n if (this.props.sortMenu) {\n this.menuData = this.sortMenuRows(this.menuData);\n }\n this.validateSelection(this.state.selection, this.state.activeRow);\n };\n ImageViewer.prototype.componentWillUnmount = function () {\n this.mainContainer.removeEventListener('keydown', this.keyboardHandler);\n };\n ImageViewer.prototype.setTransformation = function (transformation) {\n if (this.imageFrame != null) {\n this.imageFrame.setTransformation(transformation);\n }\n this.setState({ defaultTransformation: transformation });\n };\n ImageViewer.prototype.render = function () {\n var _this = this;\n var rows = this.activeRows(this.menuData, this.state.selection);\n var imageSpec = this.imageSpec();\n return (React.createElement(MainDiv, { innerRef: function (div) { return _this.mainContainer = div; } },\n React.createElement(\"div\", null, rows.map(function (row, i) { return (React.createElement(navigation_1.NavRow, { key: row.title, row: row, selection: _this.state.selection[i], handleClick: _this.navigateTo.bind(_this, rows, i), removeCommonPrefix: _this.props.removeCommonPrefix, active: _this.state.activeRow === i })); })),\n React.createElement(ImageArea, null,\n React.createElement(ImageFrameWithLoading_1.default, { viewTransform: this.state.viewTransform[imageSpec.tonemapGroup], exposure: this.state.exposure[imageSpec.tonemapGroup] || 1.0, gamma: 1.0, offset: 0.0, imageSpec: imageSpec, ref: function (frame) { return _this.imageFrame = (frame != null) ? frame.imageFrame : null; }, allowMovement: true, enableMouseEvents: this.state.hasFocus }),\n this.state.helpIsOpen ? React.createElement(HelpScreen_1.default, null) : null)));\n };\n /**\n * Select the active rows from the navigation data tree, according to the given selection\n *\n * @param tree navigation datastructure\n * @param selection array of the titles of selected items from top to bottom\n */\n ImageViewer.prototype.activeRows = function (tree, selection) {\n if (selection.length === 0) {\n // Base case of the recursion\n return [];\n }\n else {\n // Find the child with this name\n if (!tree.hasOwnProperty('children')) {\n throw new Error(\"Can't find match for \" + selection);\n }\n var node = tree;\n var res = node.children.find(function (child) { return child.title === selection[0]; });\n if (res == null) {\n throw new Error(\"Failed to find a match for \" + selection);\n }\n else {\n return [node].concat(this.activeRows(res, selection.slice(1)));\n }\n }\n };\n /**\n * Recursively sort the input data\n *\n * It's a bit smart, for example bathroom-32 will come before bathroom-128,\n * and the word Color always goes first.\n * @param tree to be sored\n */\n ImageViewer.prototype.sortMenuRows = function (tree) {\n var _this = this;\n if (tree.hasOwnProperty('children')) {\n var node = tree;\n var children = node.children.map(function (child) { return _this.sortMenuRows(child); });\n children.sort(function (a, b) {\n if (a.title === b.title) {\n return 0;\n }\n else if (a.title === 'Color') {\n return -1;\n }\n else if (b.title === 'Color') {\n return 1;\n }\n else {\n return number_aware_compare_1.default(a.title, b.title);\n }\n });\n return {\n title: node.title,\n children: children,\n };\n }\n else {\n return tree;\n }\n };\n /**\n * Find the image to be shown based on the current selection\n */\n ImageViewer.prototype.currentImage = function (currentSelection) {\n if (currentSelection === void 0) { currentSelection = this.state.selection; }\n var selection = currentSelection.slice();\n var tree = this.menuData;\n var _loop_1 = function () {\n var entry = selection.shift();\n tree = tree.children.find(function (item) { return item.title === entry; });\n };\n while (selection.length > 0) {\n _loop_1();\n }\n return tree; // tslint:disable-line\n };\n /**\n * Specification for the current image to load\n */\n ImageViewer.prototype.imageSpec = function (currentSelection) {\n if (currentSelection === void 0) { currentSelection = this.state.selection; }\n var img = this.currentImage(currentSelection);\n if (img.hasOwnProperty('lossMap')) {\n var config = img;\n return {\n type: 'Difference',\n lossFunction: Layer_1.lossFunctionFromString(config.lossMap.function),\n urlA: this.props.baseUrl + config.lossMap.imageA,\n urlB: this.props.baseUrl + config.lossMap.imageB,\n tonemapGroup: config.tonemapGroup || 'default',\n };\n }\n else {\n return {\n type: 'Url',\n url: this.props.baseUrl + img.image,\n tonemapGroup: img.tonemapGroup || 'default',\n };\n }\n };\n /**\n * Navigate to a particular image\n *\n * @param rows: a list of the rows currently visible\n * @param rowIndex: the index of the row in which to switch tabs\n * @param title: the title of the requested node\n *\n * For rows > rowIndex, we select children matching the current selection titles\n * if they exist. Otherwise, we resort to the default selection (first elements).\n */\n ImageViewer.prototype.navigateTo = function (rows, rowIndex, title) {\n var selection = this.state.selection.slice();\n selection[rowIndex] = title;\n var activeRow = this.state.activeRow;\n if (SHIFT_IS_DOWN) {\n // Set active row on shift click\n activeRow = rowIndex;\n }\n this.validateSelection(selection, activeRow);\n };\n /**\n * Make sure that the current selection is valid given the current menuData\n *\n * If a title in the selection does not exist in the respective row, take the default\n * (first) element of the row.\n * @param wishes the desired selection, which might not be valid given the selected menu items\n */\n ImageViewer.prototype.validateSelection = function (wishes, activeRow) {\n var selection = [];\n var i = 0;\n var root = this.menuData;\n while (root.hasOwnProperty('children')) {\n var candidate = root.children.find(function (row) { return row.title === wishes[i]; });\n if (candidate) {\n root = candidate;\n selection.push(candidate.title);\n }\n else {\n root = root.children[0]; // resort to the first\n selection.push(root.title);\n }\n i++;\n }\n this.setState({\n selection: selection,\n activeRow: Math.min(activeRow, selection.length - 1),\n });\n };\n /**\n * Return the titles of the first items of a sorted tree\n * @param tree a sorted navigation data structure\n */\n ImageViewer.prototype.getDefaultSelection = function (tree) {\n if (tree.hasOwnProperty('children')) {\n var node = tree;\n if (node.children.length > 0) {\n return [node.title].concat(this.getDefaultSelection(node.children[0]));\n }\n else {\n return [node.title];\n }\n }\n else {\n return [tree.title];\n }\n };\n ImageViewer.prototype.dumpTransformation = function () {\n if (this.imageFrame != null) {\n var transformation = this.imageFrame.getTransformation();\n console.log(transformation.data);\n }\n };\n ImageViewer.prototype.keyboardHandler = function (event) {\n var _this = this;\n var key = event.key;\n var actions = {};\n var actionsUnderShift = {};\n // Number keys\n var goToNumber = function (i) { return function () {\n var rows = _this.activeRows(_this.menuData, _this.state.selection);\n var activeRow = _this.state.activeRow;\n var goTo = rows[activeRow].children[i];\n if (goTo != null) {\n _this.navigateTo(rows, activeRow, goTo.title);\n }\n }; };\n actions['0'] = goToNumber(9);\n for (var i = 1; i <= 9; ++i) {\n actions[i.toString()] = goToNumber(i - 1);\n }\n // Arrows\n var moveInLine = function (offset) { return function () {\n var rows = _this.activeRows(_this.menuData, _this.state.selection);\n var activeRow = _this.state.activeRow;\n var currentTitle = _this.state.selection[activeRow];\n var currentIndex = rows[activeRow].children.findIndex(function (n) { return n.title === currentTitle; });\n var nextIndex = (currentIndex + offset + rows[activeRow].children.length) % rows[activeRow].children.length;\n var goTo = rows[activeRow].children[nextIndex];\n _this.navigateTo(rows, activeRow, goTo.title);\n }; };\n actionsUnderShift.ArrowLeft = moveInLine(-1);\n actionsUnderShift.ArrowRight = moveInLine(1);\n actions['-'] = moveInLine(-1);\n actions['='] = moveInLine(1);\n var moveUpDown = function (offset) { return function () {\n var nextRow = _this.state.activeRow + offset;\n if (nextRow < 0) {\n nextRow = 0;\n }\n if (nextRow >= _this.state.selection.length - 1) {\n nextRow = _this.state.selection.length - 1;\n }\n _this.setState({ activeRow: nextRow });\n }; };\n actionsUnderShift.ArrowUp = moveUpDown(-1);\n actionsUnderShift.ArrowDown = moveUpDown(1);\n actions['['] = moveUpDown(-1);\n actions[']'] = moveUpDown(1);\n // ViewTransform controls\n var changeViewTransform = function () { return function () {\n var tonemapGroup = _this.imageSpec().tonemapGroup;\n var viewTransform = __assign({}, _this.state.viewTransform, (_a = {}, _a[tonemapGroup] = (Math.abs(_this.state.viewTransform[tonemapGroup] - 1)), _a));\n _this.setState({ viewTransform: viewTransform });\n var _a;\n }; };\n actions.t = changeViewTransform();\n // Exposure controls\n var changeExposure = function (multiplier) { return function () {\n var tonemapGroup = _this.imageSpec().tonemapGroup;\n var exposure = __assign({}, _this.state.exposure, (_a = {}, _a[tonemapGroup] = multiplier * (_this.state.exposure[tonemapGroup] || 1.0), _a));\n _this.setState({ exposure: exposure });\n var _a;\n }; };\n actions.e = changeExposure(1.1);\n actions.E = changeExposure(1.0 / 1.1);\n // Reset\n actions.r = function () {\n _this.setState({ viewTransform: { default: 0.0 } });\n _this.setState({ exposure: { default: 1.0 } });\n if (_this.imageFrame) {\n _this.imageFrame.reset();\n }\n };\n // Toggle help\n actions['/'] = actions['?'] = function () {\n _this.setState({ helpIsOpen: !_this.state.helpIsOpen });\n };\n actions.Escape = function () {\n _this.setState({ helpIsOpen: false });\n };\n // Go fullscreen\n actions.f = function () { return fullscreen_1.default(_this.mainContainer); };\n // Dump the current transformation\n actions.d = function () { return _this.dumpTransformation(); };\n if (actions.hasOwnProperty(key) && !event.metaKey && !event.altKey && !event.ctrlKey) {\n event.preventDefault();\n actions[key]();\n return;\n }\n if (actionsUnderShift.hasOwnProperty(key) && event.shiftKey) {\n event.preventDefault();\n actionsUnderShift[key]();\n return;\n }\n };\n ImageViewer.prototype.setFocus = function () {\n this.setState({ hasFocus: true });\n };\n ImageViewer.prototype.unsetFocus = function () {\n this.setState({ hasFocus: false });\n };\n ImageViewer.defaultProps = {\n baseUrl: '',\n sortMenu: false,\n removeCommonPrefix: false,\n };\n return ImageViewer;\n}(React.Component));\nexports.default = ImageViewer;\nvar _a, _b;\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar splitPartsPattern = /\\d+|\\D+/g;\nfunction numberAwareCompare(a, b) {\n var aComponents = a.match(splitPartsPattern) || [];\n var bComponents = b.match(splitPartsPattern) || [];\n while (aComponents.length > 0 && bComponents.length > 0) {\n var currentA = aComponents.shift();\n var currentB = bComponents.shift();\n var aAsInteger = parseInt(currentA, 10);\n var bAsInteger = parseInt(currentB, 10);\n if (!isNaN(aAsInteger) && !isNaN(bAsInteger)) {\n // Compare integers\n if (aAsInteger < bAsInteger) {\n return -1;\n }\n else if (aAsInteger > bAsInteger) {\n return 1;\n }\n }\n else if (isNaN(aAsInteger) && isNaN(bAsInteger)) {\n // Compare non-integer strings\n if (currentA < currentB) {\n return -1;\n }\n else if (currentA > currentB) {\n return 1;\n }\n }\n else {\n // If one block is an integer and the other a string,\n // the number is smaller\n if (isNaN(bAsInteger)) {\n return -1;\n }\n else {\n return 1;\n }\n }\n }\n if (aComponents.length === 0 && bComponents.length === 0) {\n return 0;\n }\n else if (aComponents.length === 0) {\n return -1;\n }\n else {\n return 1;\n }\n}\nexports.default = numberAwareCompare;\n// console.log(numberAwareCompare(\"bathroom10\", \"bathroom2\"), 1)\n// console.log(numberAwareCompare(\"bathroom2\", \"bathroom10\"), -1)\n// console.log(numberAwareCompare(\"2bathroom\", \"10bathroom\"), -1)\n// console.log(numberAwareCompare(\"10bathroom\", \"2bathroom\"), 1)\n// console.log(numberAwareCompare(\"1bathroom\", \"bathroom1\"), -1)\n// console.log(numberAwareCompare(\"bathroom1\", \"1bathroom\"), 1)\n// console.log(numberAwareCompare(\"bla\", \"bla\"), 0)\n// console.log(numberAwareCompare(\"bla1\", \"bla1\"), 0)\n// console.log(numberAwareCompare(\"bla1a4\", \"bla1a4\"), 0)\n// console.log(numberAwareCompare(\"\", \"\"), 0)\n// console.log(numberAwareCompare(\"a\", \"\"), 1)\n// console.log(numberAwareCompare(\"\", \"a\"), -1)\n// console.log(numberAwareCompare(\"2017.07.14\", \"2017.07.13\"), 1)\n// console.log(numberAwareCompare(\"bathroom-1\", \"bathroom1\"), 1)\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction requestFullscreen(element) {\n if (element.requestFullscreen) {\n element.requestFullscreen();\n }\n else if (element.mozRequestFullScreen) {\n element.mozRequestFullScreen();\n }\n else if (element.webkitRequestFullScreen) {\n element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); //tslint:disable-line\n }\n}\nexports.default = requestFullscreen;\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __webpack_require__(0);\nvar styled_components_1 = __webpack_require__(3);\nvar HelpScreenDiv = (_a = [\"\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n padding: 2em 0;\\n background-color: rgba(0, 0, 0, 0.8);\\n line-height: 1.4em;\\n color: white;\\n table {\\n width: 40em;\\n margin: 0 auto;\\n }\\n h1 {\\n font-size: 1em;\\n margin: 0;\\n padding: 0;\\n line-height: 2em;\\n text-align: center;\\n padding-bottom: .5em;\\n }\\n th, td {\\n text-align: left;\\n padding: .4em 1em;\\n vertical-align: top;\\n }\\n th {\\n width: 10em;\\n }\\n\"], _a.raw = [\"\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n padding: 2em 0;\\n background-color: rgba(0, 0, 0, 0.8);\\n line-height: 1.4em;\\n color: white;\\n table {\\n width: 40em;\\n margin: 0 auto;\\n }\\n h1 {\\n font-size: 1em;\\n margin: 0;\\n padding: 0;\\n line-height: 2em;\\n text-align: center;\\n padding-bottom: .5em;\\n }\\n th, td {\\n text-align: left;\\n padding: .4em 1em;\\n vertical-align: top;\\n }\\n th {\\n width: 10em;\\n }\\n\"], styled_components_1.default.div(_a));\nexports.default = function () {\n return (React.createElement(HelpScreenDiv, null,\n React.createElement(\"h1\", null, \"Shortcuts\"),\n React.createElement(\"table\", null,\n React.createElement(\"tbody\", null,\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"0-9\"),\n React.createElement(\"td\", null, \"Switch images\")),\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"Shift + 0-9\"),\n React.createElement(\"td\", null, \"Switch comparison (to for example reference or input)\")),\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"Shift + Arrows\"),\n React.createElement(\"td\", null, \"Navigate through the menu\")),\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"Shift + click\"),\n React.createElement(\"td\", null, \"Open a tab, and activate keyboard shortcuts for the row clicked\")),\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"e / E\"),\n React.createElement(\"td\", null,\n \"Increase / decrease \",\n React.createElement(\"strong\", null, \"e\"),\n \"xposure\")),\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"r\"),\n React.createElement(\"td\", null, \"Reset exposure, view transform, positioning and zooming\")),\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"t\"),\n React.createElement(\"td\", null, \"Toggle between the Gamma 2.2 and the Pseudo ARRI K1S1 view transforms\")),\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"f\"),\n React.createElement(\"td\", null,\n \"Enter \",\n React.createElement(\"strong\", null, \"f\"),\n \"ullscreen mode\")),\n React.createElement(\"tr\", null,\n React.createElement(\"th\", null, \"?\"),\n React.createElement(\"td\", null, \"Toggle this help screen\"))))));\n};\nvar _a;\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __webpack_require__(0);\nvar styled_components_1 = __webpack_require__(3);\nvar ImageFrame_1 = __webpack_require__(9);\nvar image_loading_1 = __webpack_require__(5);\nvar StretchingDiv = (_a = [\"\\n position: absolute;\\n top: 0; bottom: 0;\\n left: 0; right: 0;\\n width: 100%; height: 100%;\\n\"], _a.raw = [\"\\n position: absolute;\\n top: 0; bottom: 0;\\n left: 0; right: 0;\\n width: 100%; height: 100%;\\n\"], styled_components_1.default.div(_a));\nvar LoadingOverlay = (_b = [\"\\n display: block;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n text-align: left;\\n padding: .6em;\\n background-color: rgb(64, 64, 64);\\n\"], _b.raw = [\"\\n display: block;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n text-align: left;\\n padding: .6em;\\n background-color: rgb(64, 64, 64);\\n\"], styled_components_1.default.div(_b));\n/**\n * A wrapper around ImageFrame that deals with the loading of images\n * It takes an `ImageSpec` instead of an `InputImage`.\n */\nvar ImageFrameWithLoading = /** @class */ (function (_super) {\n __extends(ImageFrameWithLoading, _super);\n function ImageFrameWithLoading(props) {\n var _this = _super.call(this, props) || this;\n _this.cache = new image_loading_1.ImageCache();\n _this.requestId = 0;\n // Counter to ensure that returning downloads are still relevant to the current app state.\n _this.currentRequest = 0;\n _this.state = {\n isLoading: false,\n errorMsg: null,\n image: null,\n };\n _this.handleImageChange(props, false);\n return _this;\n }\n ImageFrameWithLoading.prototype.componentWillReceiveProps = function (nextProps) {\n if (nextProps.imageSpec !== this.props.imageSpec) {\n this.handleImageChange(nextProps);\n }\n };\n ImageFrameWithLoading.prototype.componentWillUnmount = function () {\n // Don't handle any returning downloads anymore after unmount.\n this.requestId = -1;\n };\n ImageFrameWithLoading.prototype.render = function () {\n var _this = this;\n return (React.createElement(StretchingDiv, null,\n this.state.image != null ?\n React.createElement(ImageFrame_1.default, { viewTransform: this.props.viewTransform, exposure: this.props.exposure, gamma: this.props.gamma, offset: this.props.offset, image: this.state.image, ref: function (frame) { return _this.imageFrame = frame; }, allowMovement: this.props.allowMovement, enableMouseEvents: this.props.enableMouseEvents })\n : null,\n this.state.isLoading ? React.createElement(LoadingOverlay, null, \"Downloading ...\") : null,\n this.state.errorMsg ? React.createElement(LoadingOverlay, null, this.state.errorMsg) : null));\n };\n /**\n * Initiate the download of the current spec.\n * Sets the state in case of correct or incorrect loads.\n */\n ImageFrameWithLoading.prototype.handleImageChange = function (props, shouldSetLoadingState) {\n var _this = this;\n if (shouldSetLoadingState === void 0) { shouldSetLoadingState = true; }\n this.currentRequest++;\n var handledRequest = this.currentRequest;\n if (shouldSetLoadingState) {\n this.setState({\n isLoading: true,\n errorMsg: null,\n });\n }\n this.downloadImage(props.imageSpec)\n .then(function (image) {\n if (handledRequest !== _this.currentRequest) {\n // This download does not correspond to the latest request, so should not be shown.\n return;\n }\n _this.setState({\n errorMsg: null,\n isLoading: false,\n image: image,\n });\n })\n .catch(function (error) {\n if (handledRequest !== _this.requestId) {\n // This download does not correspond to the latest request, so should not be shown.\n return;\n }\n _this.setState({\n errorMsg: error.message,\n isLoading: false,\n });\n });\n };\n /**\n * Download an image\n * @param image specification of the image to download (url or difference of two images)\n * @return Promise of a loaded image\n */\n ImageFrameWithLoading.prototype.downloadImage = function (spec) {\n var _this = this;\n if (spec.type === 'Url') {\n return this.cache.get(spec.url);\n }\n else if (spec.type === 'Difference') {\n return Promise.all([spec.urlA, spec.urlB].map(function (url) { return _this.cache.get(url); }))\n .then(function (_a) {\n var imageA = _a[0], imageB = _a[1];\n // Make sure images have the same size and number of channels;\n var height = imageA.height;\n var width = imageA.width;\n var nChannels = imageA.nChannels;\n if (height !== imageB.height) {\n throw Error(spec.urlA + \" & \" + spec.urlB + \" with heights \" + height + \" & \" + imageB.height + \" cannot be compared.\");\n }\n if (width !== imageB.width) {\n throw Error(spec.urlA + \" & \" + spec.urlB + \" with widths \" + width + \" & \" + imageB.width + \" cannot be compared.\");\n }\n if (nChannels !== imageB.nChannels) {\n throw Error(spec.urlA + \" & \" + spec.urlB + \" with unequal nChannels \" + nChannels + \" & \" + imageB.nChannels + \".\");\n }\n return {\n type: spec.type,\n imageA: imageA,\n imageB: imageB,\n width: width,\n height: height,\n nChannels: nChannels,\n lossFunction: spec.lossFunction,\n };\n });\n }\n else {\n throw Error(\"Unkonwn imageSpec type for \" + spec + \".\");\n }\n };\n return ImageFrameWithLoading;\n}(React.Component));\nexports.default = ImageFrameWithLoading;\nvar _a, _b;\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = __webpack_require__(0);\nvar styled_components_1 = __webpack_require__(3);\nvar commonPrefix = __webpack_require__(39);\n/** Helper to reverse string */\nvar reverse = function (x) { return x.split('').reverse().join(''); };\n// tslint:disable\nvar NavLink = (_a = [\"\\n cursor: pointer;\\n display: inline-block;\\n margin: 0;\\n flex-grow: 0;\\n flex-shrink: \", \";\\n padding: .4em .7em;\\n overflow: hidden;\\n text-decoration: none;\\n white-space: nowrap;\\n position: relative;\\n background-color: \", \";\\n color: \", \";\\n &:active {\\n background-color: \", \";\\n }\\n &:hover {\\n flex-shrink: 0;\\n }\\n user-select: none;\\n -moz-user-select: none;\\n\"], _a.raw = [\"\\n cursor: pointer;\\n display: inline-block;\\n margin: 0;\\n flex-grow: 0;\\n flex-shrink: \", \";\\n padding: .4em .7em;\\n overflow: hidden;\\n text-decoration: none;\\n white-space: nowrap;\\n position: relative;\\n background-color: \", \";\\n color: \", \";\\n &:active {\\n background-color: \", \";\\n }\\n &:hover {\\n flex-shrink: 0;\\n }\\n user-select: none;\\n -moz-user-select: none;\\n\"], styled_components_1.default.a(_a, function (props) { return props.active ? '0' : '1'; }, function (props) { return props.active ? '#238' : 'inherit'; }, function (props) { return props.active ? '#FFFFFF !important' : '#AAA !important'; }, function (props) { return props.active ? '#666' : '#fff'; }));\n// tslint:enable\nvar NavRowDiv = (_b = [\"\\n display: block;\\n padding: 0;\\n border-bottom: 1px solid #aaa;\\n background: #fff;\\n color: #111;\\n display: flex;\\n &:first-child {\\n// border-top: 1px solid #aaa;\\n }\\n &:hover \", \" {\\n flex-shrink: 1;\\n }\\n &:hover \", \":hover {\\n flex-shrink: 0;\\n }\\n\"], _b.raw = [\"\\n display: block;\\n padding: 0;\\n border-bottom: 1px solid #aaa;\\n background: #fff;\\n color: #111;\\n display: flex;\\n &:first-child {\\n// border-top: 1px solid #aaa;\\n }\\n &:hover \", \" {\\n flex-shrink: 1;\\n }\\n &:hover \", \":hover {\\n flex-shrink: 0;\\n }\\n\"], styled_components_1.default.div(_b, NavLink, NavLink));\nvar NavLinkNumber = (_c = [\"\\n color: white;\\n font-size: .6em;\\n position: absolute;\\n top: .3em;\\n right: .4em;\\n\"], _c.raw = [\"\\n color: white;\\n font-size: .6em;\\n position: absolute;\\n top: .3em;\\n right: .4em;\\n\"], styled_components_1.default.span(_c));\nexports.NavRow = function (_a) {\n var row = _a.row, active = _a.active, selection = _a.selection, handleClick = _a.handleClick, removeCommonPrefix = _a.removeCommonPrefix;\n var titlesInRow = row.children.map(function (child) { return child.title; });\n // Trim common prefices and suffices from the row's entries\n var trimmedTitles;\n if (removeCommonPrefix) {\n var prefix_1 = commonPrefix(titlesInRow);\n var suffix_1 = reverse(commonPrefix(titlesInRow.map(reverse)));\n trimmedTitles = titlesInRow.map(function (t) { return t.slice(prefix_1.lastIndexOf('/') + 1, t.length - suffix_1.length); });\n }\n else {\n trimmedTitles = titlesInRow;\n }\n return (React.createElement(NavRowDiv, null, row.children.map(function (child, i) { return (React.createElement(NavLink, { onClick: function () { return handleClick(child.title); }, key: child.title, active: child.title === selection },\n i === 0 ? titlesInRow[i] : trimmedTitles[i],\n active && i < 10 ? React.createElement(NavLinkNumber, null, (i + 1) % 10) : null)); })));\n};\nvar _a, _b, _c;\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports) {\n\nmodule.exports = common\n\nfunction common (strings) {\n if (!Array.isArray(strings)) {\n throw new Error('common-prefix expects an array of strings')\n }\n\n var first = strings[0] || ''\n var commonLength = first.length\n\n for (var i = 1; i < strings.length; ++i) {\n for (var j = 0; j < commonLength; ++j) {\n if (strings[i].charAt(j) !== first.charAt(j)) {\n commonLength = j\n break\n }\n }\n }\n\n return first.slice(0, commonLength)\n}\n\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// jeri.min.js"," \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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6ec150b375d80a80225c","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\",\"umd\":\"react\"}\n// module id = 0\n// module chunks = 0 1","// Prototype identity matrix\nconst IDENTITY4x4 = new Float32Array(16);\nfor (let i = 0; i < 4; ++i) {\n IDENTITY4x4[i + 4 * i] = 1.0;\n}\n\nexport class Matrix4x4 {\n\n data: Float32Array;\n\n static create(): Matrix4x4 {\n return new Matrix4x4;\n }\n\n static fromScaling(matrix: Matrix4x4, scaling: number[]): void {\n if (scaling.length !== 3) {\n throw new Error('Matrix4x4.fromScaling requires a 3-dimentional vector as input');\n }\n scaling.forEach((scale, i) => {\n matrix.data[i + 4 * i] = scale;\n });\n }\n\n static multiply(output: Matrix4x4, a: Matrix4x4, b: Matrix4x4): void {\n const data = new Float32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);\n for (let i = 0; i < 4; ++i) {\n for (let j = 0; j < 4; ++j) {\n for (let k = 0; k < 4; ++k) {\n data[4 * j + i] += a.data[4 * k + i] * b.data[4 * j + k];\n }\n }\n }\n output.data = data;\n }\n\n static scale(output: Matrix4x4, a: Matrix4x4, scale: number[]) {\n if (scale.length !== 3) {\n throw new Error('Matrix4x4.scale expects the third argument to have 3 numbers');\n }\n const data = new Float32Array(a.data);\n for (let i = 0; i < 3; ++i) {\n for (let j = 0; j < 4; ++j) {\n data[4 * i + j] *= scale[i];\n }\n }\n output.data = data;\n }\n\n static translate(output: Matrix4x4, a: Matrix4x4, translation: number[]) {\n if (translation.length !== 3) {\n throw new Error('Matrix4x4.translate expects the third argument to have 3 numbers');\n }\n const data = new Float32Array(a.data);\n for (let i = 0; i < 4; ++i) {\n for (let j = 0; j < 3; ++j) {\n data[12 + i] += a.data[4 * j + i] * translation[j];\n }\n }\n output.data = data;\n }\n\n static clone(a: Matrix4x4): Matrix4x4 {\n return new Matrix4x4(a.data);\n }\n\n static invert(output: Matrix4x4, matrix: Matrix4x4): void {\n const m = matrix.data;\n const o = output.data;\n // tslint:disable:whitespace\n // tslint:disable:max-line-length\n o[0] = -m[7]*m[10]*m[13] + m[6]*m[11]*m[13] + m[7]*m[9]*m[14] - m[5]*m[11]*m[14] - m[6]*m[9]*m[15] + m[5]*m[10]*m[15];\n o[1] = m[3]*m[10]*m[13] - m[2]*m[11]*m[13] - m[3]*m[9]*m[14] + m[1]*m[11]*m[14] + m[2]*m[9]*m[15] - m[1]*m[10]*m[15];\n o[2] = -m[3]*m[6]*m[13] + m[2]*m[7]*m[13] + m[3]*m[5]*m[14] - m[1]*m[7]*m[14] - m[2]*m[5]*m[15] + m[1]*m[6]*m[15];\n o[3] = m[3]*m[6]*m[9] - m[2]*m[7]*m[9] - m[3]*m[5]*m[10] + m[1]*m[7]*m[10] + m[2]*m[5]*m[11] - m[1]*m[6]*m[11];\n o[4] = m[7]*m[10]*m[12] - m[6]*m[11]*m[12] - m[7]*m[8]*m[14] + m[4]*m[11]*m[14] + m[6]*m[8]*m[15] - m[4]*m[10]*m[15];\n o[5] = -m[3]*m[10]*m[12] + m[2]*m[11]*m[12] + m[3]*m[8]*m[14] - m[0]*m[11]*m[14] - m[2]*m[8]*m[15] + m[0]*m[10]*m[15];\n o[6] = m[3]*m[6]*m[12] - m[2]*m[7]*m[12] - m[3]*m[4]*m[14] + m[0]*m[7]*m[14] + m[2]*m[4]*m[15] - m[0]*m[6]*m[15];\n o[7] = -m[3]*m[6]*m[8] + m[2]*m[7]*m[8] + m[3]*m[4]*m[10] - m[0]*m[7]*m[10] - m[2]*m[4]*m[11] + m[0]*m[6]*m[11];\n o[8] = -m[7]*m[9]*m[12] + m[5]*m[11]*m[12] + m[7]*m[8]*m[13] - m[4]*m[11]*m[13] - m[5]*m[8]*m[15] + m[4]*m[9]*m[15];\n o[9] = m[3]*m[9]*m[12] - m[1]*m[11]*m[12] - m[3]*m[8]*m[13] + m[0]*m[11]*m[13] + m[1]*m[8]*m[15] - m[0]*m[9]*m[15];\n o[10] = -m[3]*m[5]*m[12] + m[1]*m[7]*m[12] + m[3]*m[4]*m[13] - m[0]*m[7]*m[13] - m[1]*m[4]*m[15] + m[0]*m[5]*m[15];\n o[11] = m[3]*m[5]*m[8] - m[1]*m[7]*m[8] - m[3]*m[4]*m[9] + m[0]*m[7]*m[9] + m[1]*m[4]*m[11] - m[0]*m[5]*m[11];\n o[12] = m[6]*m[9]*m[12] - m[5]*m[10]*m[12] - m[6]*m[8]*m[13] + m[4]*m[10]*m[13] + m[5]*m[8]*m[14] - m[4]*m[9]*m[14];\n o[13] = -m[2]*m[9]*m[12] + m[1]*m[10]*m[12] + m[2]*m[8]*m[13] - m[0]*m[10]*m[13] - m[1]*m[8]*m[14] + m[0]*m[9]*m[14];\n o[14] = m[2]*m[5]*m[12] - m[1]*m[6]*m[12] - m[2]*m[4]*m[13] + m[0]*m[6]*m[13] + m[1]*m[4]*m[14] - m[0]*m[5]*m[14];\n o[15] = -m[2]*m[5]*m[8] + m[1]*m[6]*m[8] + m[2]*m[4]*m[9] - m[0]*m[6]*m[9] - m[1]*m[4]*m[10] + m[0]*m[5]*m[10];\n // tslint:enable:whitespace\n // tslint:enable:max-line-length\n\n const determinant = m[0] * o[0] + m[1] * o[4] + m[2] * o[8] + m[3] * o[12];\n\n if (determinant === 0.0) {\n throw new Error('Matrix is not invertible.');\n }\n\n const inverseDeterminant = 1.0 / determinant;\n\n for (let i = 0; i < 16; ++i) {\n o[i] *= inverseDeterminant;\n }\n }\n\n constructor(buffer: Float32Array = IDENTITY4x4) {\n this.data = new Float32Array(buffer);\n }\n\n}\n\nexport class Vector4 {\n\n data: Float32Array;\n\n static create(): Vector4 {\n return new Vector4;\n }\n\n static set(output: Vector4, x: number, y: number, z: number, w: number): void {\n output.data[0] = x;\n output.data[1] = y;\n output.data[2] = z;\n output.data[3] = w;\n }\n\n static fromValues(x: number, y: number, z: number, w: number): Vector4 {\n const vector = new Vector4;\n Vector4.set(vector, x, y, z, w);\n return vector;\n }\n\n static transformMat4(output: Vector4, vector: Vector4, matrix: Matrix4x4) {\n const v = vector.data;\n const m = matrix.data;\n const data = new Float32Array([0, 0, 0, 0]);\n for (let i = 0; i < 4; ++i) {\n for (let j = 0; j < 4; ++j) {\n data[i] += v[j] * m[4 * j + i];\n }\n }\n output.data = data;\n }\n\n constructor() {\n this.data = new Float32Array([0, 0, 0, 0]);\n }\n}\n\n// function assertEqual(a: mat4 | vec4, b: Matrix4x4 | Vector4, message: string): void {\n// for (let i = 0; i < a.length; ++i) {\n// if (Math.abs(a[i] - b.data[i]) > 0.001) {\n// throw new Error('Failed:' + message + '\\n' + a + '\\n' + b.data);\n// }\n// }\n// }\n\n// function test() {\n// const a = mat4.create();\n// const b = Matrix4x4.create();\n\n// assertEqual(a, b, 'after creation');\n\n// for (let ii = 0; ii < 16; ++ii) {\n// a[ii] = b.data[ii] = Math.random();\n// }\n\n// const c = mat4.create();\n// const d = Matrix4x4.create();\n\n// mat4.fromScaling(c, [4, 3, 2]);\n// Matrix4x4.fromScaling(d, [4, 3, 2]);\n\n// assertEqual(c, d, 'fromScaling');\n\n// mat4.translate(c, a, [2, 3, 4]);\n// Matrix4x4.translate(d, b, [2, 3, 4]);\n// // assertEqual(a, b, 'after translation ab');\n// assertEqual(c, d, 'after translation cd');\n\n// mat4.scale(a, c, [2, 3, 4]);\n// Matrix4x4.scale(b, d, [2, 3, 4]);\n// assertEqual(a, b, 'after scaling ab');\n// // assertEqual(c, d, 'after scaling cd');\n\n// mat4.translate(c, a, [2, 3, 4]);\n// Matrix4x4.translate(d, b, [2, 3, 4]);\n// // assertEqual(a, b, 'after translation again ab');\n// assertEqual(c, d, 'after translation again cd');\n\n// mat4.invert(a, c);\n// Matrix4x4.invert(b, d);\n// assertEqual(a, b, 'after invert ab');\n// assertEqual(c, d, 'after invert cd');\n\n// const e = mat4.create();\n// const f = Matrix4x4.create();\n\n// mat4.multiply(e, c, a);\n// Matrix4x4.multiply(f, d, b);\n// assertEqual(e, f, 'after multiply ef');\n// assertEqual(c, d, 'after multiply cd');\n// assertEqual(a, b, 'after multiply ab');\n\n// mat4.scale(a, c, [5, -3, 4]);\n// Matrix4x4.scale(b, d, [5, -3, 4]);\n// assertEqual(a, b, 'after scaling again ab');\n// assertEqual(c, d, 'after scaling again cd');\n// // assertEqual(c, d, 'after scaling cd');\n\n// const q = mat4.clone(a);\n// const i = Matrix4x4.clone(b);\n// assertEqual(q, i, 'after cloning');\n\n// const v1 = vec4.create();\n// const w1 = Vector4.create();\n// assertEqual(v1, w1, 'vectors after init');\n\n// vec4.set(v1, 3, 4, 5, 6);\n// Vector4.set(w1, 3, 4, 5, 6);\n// assertEqual(v1, w1, 'vectors after set');\n\n// const v2 = vec4.fromValues(6, 5, 4, 3);\n// const w2 = Vector4.fromValues(6, 5, 4, 3);\n// assertEqual(v2, w2, 'vectors after fromValues');\n\n// vec4.transformMat4(v1, v2, a);\n// Vector4.transformMat4(w1, w2, b);\n// assertEqual(v1, w1, 'vectors after tranformMat4');\n// }\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/linalg.ts","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/process/browser.js\n// module id = 2\n// module chunks = 0 1","import isPlainObject from 'is-plain-object';\nimport Stylis from 'stylis';\nimport React, { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport isFunction from 'is-function';\nimport hoistStatics from 'hoist-non-react-statics';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks\n */\n\nvar _uppercasePattern = /([A-Z])/g;\n\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenate$2(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\n\nvar hyphenate_1 = hyphenate$2;\n\nvar hyphenate = hyphenate_1;\n\nvar msPattern = /^ms-/;\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}\n\nvar hyphenateStyleName_1 = hyphenateStyleName;\n\n// \nvar objToCss = function objToCss(obj, prevKey) {\n var css = Object.keys(obj).filter(function (key) {\n var chunk = obj[key];\n return chunk !== undefined && chunk !== null && chunk !== false && chunk !== '';\n }).map(function (key) {\n if (isPlainObject(obj[key])) return objToCss(obj[key], key);\n return hyphenateStyleName_1(key) + ': ' + obj[key] + ';';\n }).join(' ');\n return prevKey ? prevKey + ' {\\n ' + css + '\\n}' : css;\n};\n\nvar flatten = function flatten(chunks, executionContext) {\n return chunks.reduce(function (ruleSet, chunk) {\n /* Remove falsey values */\n if (chunk === undefined || chunk === null || chunk === false || chunk === '') return ruleSet;\n /* Flatten ruleSet */\n if (Array.isArray(chunk)) return [].concat(ruleSet, flatten(chunk, executionContext));\n\n /* Handle other components */\n // $FlowFixMe not sure how to make this pass\n if (chunk.hasOwnProperty('styledComponentId')) return [].concat(ruleSet, ['.' + chunk.styledComponentId]);\n\n /* Either execute or defer the function */\n if (typeof chunk === 'function') {\n return executionContext ? ruleSet.concat.apply(ruleSet, flatten([chunk(executionContext)], executionContext)) : ruleSet.concat(chunk);\n }\n\n /* Handle objects */\n // $FlowFixMe have to add %checks somehow to isPlainObject\n return ruleSet.concat(isPlainObject(chunk) ? objToCss(chunk) : chunk.toString());\n }, []);\n};\n\n// \nvar stylis = new Stylis({\n global: false,\n cascade: true,\n keyframe: false,\n prefix: true,\n compress: false,\n semicolon: true\n});\n\nvar stringifyRules = function stringifyRules(rules, selector, prefix) {\n var flatCSS = rules.join('').replace(/^\\s*\\/\\/.*$/gm, ''); // replace JS comments\n\n var cssStr = selector && prefix ? prefix + ' ' + selector + ' { ' + flatCSS + ' }' : flatCSS;\n\n return stylis(prefix || !selector ? '' : selector, cssStr);\n};\n\n// \nvar chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\nvar charsLength = chars.length;\n\n/* Some high number, usually 9-digit base-10. Map it to base-😎 */\nvar generateAlphabeticName = function generateAlphabeticName(code) {\n var name = '';\n var x = void 0;\n\n for (x = code; x > charsLength; x = Math.floor(x / charsLength)) {\n name = chars[x % charsLength] + name;\n }\n\n return chars[x % charsLength] + name;\n};\n\n// \n\n\nvar interleave = (function (strings, interpolations) {\n return interpolations.reduce(function (array, interp, i) {\n return array.concat(interp, strings[i + 1]);\n }, [strings[0]]);\n});\n\n// \nvar css = (function (strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n return flatten(interleave(strings, interpolations));\n});\n\n// \nvar SC_COMPONENT_ID = /^[^\\S\\n]*?\\/\\* sc-component-id:\\s+(\\S+)\\s+\\*\\//mg;\n\nvar extractCompsFromCSS = (function (maybeCSS) {\n var css = '' + (maybeCSS || ''); // Definitely a string, and a clone\n var existingComponents = [];\n css.replace(SC_COMPONENT_ID, function (match, componentId, matchIndex) {\n existingComponents.push({ componentId: componentId, matchIndex: matchIndex });\n return match;\n });\n return existingComponents.map(function (_ref, i) {\n var componentId = _ref.componentId,\n matchIndex = _ref.matchIndex;\n\n var nextComp = existingComponents[i + 1];\n var cssFromDOM = nextComp ? css.slice(matchIndex, nextComp.matchIndex) : css.slice(matchIndex);\n return { componentId: componentId, cssFromDOM: cssFromDOM };\n });\n});\n\n// \n/* eslint-disable camelcase, no-undef */\n\nvar getNonce = (function () {\n return typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n});\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\n\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n// \n/* eslint-disable no-underscore-dangle */\n/*\n * Browser Style Sheet with Rehydration\n *\n * <style data-styled-components=\"x y z\"\n * data-styled-components-is-local=\"true\">\n * /· sc-component-id: a ·/\n * .sc-a { ... }\n * .x { ... }\n * /· sc-component-id: b ·/\n * .sc-b { ... }\n * .y { ... }\n * .z { ... }\n * </style>\n *\n * Note: replace · with * in the above snippet.\n * */\nvar COMPONENTS_PER_TAG = 40;\n\nvar BrowserTag = function () {\n function BrowserTag(el, isLocal) {\n var existingSource = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n classCallCheck(this, BrowserTag);\n\n this.el = el;\n this.isLocal = isLocal;\n this.ready = false;\n\n var extractedComps = extractCompsFromCSS(existingSource);\n\n this.size = extractedComps.length;\n this.components = extractedComps.reduce(function (acc, obj) {\n acc[obj.componentId] = obj; // eslint-disable-line no-param-reassign\n return acc;\n }, {});\n }\n\n BrowserTag.prototype.isFull = function isFull() {\n return this.size >= COMPONENTS_PER_TAG;\n };\n\n BrowserTag.prototype.addComponent = function addComponent(componentId) {\n if (!this.ready) this.replaceElement();\n if (this.components[componentId]) throw new Error('Trying to add Component \\'' + componentId + '\\' twice!');\n\n var comp = { componentId: componentId, textNode: document.createTextNode('') };\n this.el.appendChild(comp.textNode);\n\n this.size += 1;\n this.components[componentId] = comp;\n };\n\n BrowserTag.prototype.inject = function inject(componentId, css, name) {\n if (!this.ready) this.replaceElement();\n var comp = this.components[componentId];\n\n if (!comp) throw new Error('Must add a new component before you can inject css into it');\n if (comp.textNode.data === '') comp.textNode.appendData('\\n/* sc-component-id: ' + componentId + ' */\\n');\n\n comp.textNode.appendData(css);\n if (name) {\n var existingNames = this.el.getAttribute(SC_ATTR);\n this.el.setAttribute(SC_ATTR, existingNames ? existingNames + ' ' + name : name);\n }\n\n var nonce = getNonce();\n\n if (nonce) {\n this.el.setAttribute('nonce', nonce);\n }\n };\n\n BrowserTag.prototype.toHTML = function toHTML() {\n return this.el.outerHTML;\n };\n\n BrowserTag.prototype.toReactElement = function toReactElement() {\n throw new Error('BrowserTag doesn\\'t implement toReactElement!');\n };\n\n BrowserTag.prototype.clone = function clone() {\n throw new Error('BrowserTag cannot be cloned!');\n };\n\n /* Because we care about source order, before we can inject anything we need to\n * create a text node for each component and replace the existing CSS. */\n\n\n BrowserTag.prototype.replaceElement = function replaceElement() {\n var _this = this;\n\n this.ready = true;\n // We have nothing to inject. Use the current el.\n if (this.size === 0) return;\n\n // Build up our replacement style tag\n var newEl = this.el.cloneNode();\n newEl.appendChild(document.createTextNode('\\n'));\n\n Object.keys(this.components).forEach(function (key) {\n var comp = _this.components[key];\n\n // eslint-disable-next-line no-param-reassign\n comp.textNode = document.createTextNode(comp.cssFromDOM);\n newEl.appendChild(comp.textNode);\n });\n\n if (!this.el.parentNode) throw new Error(\"Trying to replace an element that wasn't mounted!\");\n\n // The ol' switcheroo\n this.el.parentNode.replaceChild(newEl, this.el);\n this.el = newEl;\n };\n\n return BrowserTag;\n}();\n\n/* Factory function to separate DOM operations from logical ones*/\n\n\nvar BrowserStyleSheet = {\n create: function create() {\n var tags = [];\n var names = {};\n\n /* Construct existing state from DOM */\n var nodes = document.querySelectorAll('[' + SC_ATTR + ']');\n var nodesLength = nodes.length;\n\n for (var i = 0; i < nodesLength; i += 1) {\n var el = nodes[i];\n\n tags.push(new BrowserTag(el, el.getAttribute(LOCAL_ATTR) === 'true', el.innerHTML));\n\n var attr = el.getAttribute(SC_ATTR);\n if (attr) {\n attr.trim().split(/\\s+/).forEach(function (name) {\n names[name] = true;\n });\n }\n }\n\n /* Factory for making more tags */\n var tagConstructor = function tagConstructor(isLocal) {\n var el = document.createElement('style');\n el.type = 'text/css';\n el.setAttribute(SC_ATTR, '');\n el.setAttribute(LOCAL_ATTR, isLocal ? 'true' : 'false');\n if (!document.head) throw new Error('Missing document <head>');\n document.head.appendChild(el);\n return new BrowserTag(el, isLocal);\n };\n\n return new StyleSheet(tagConstructor, tags, names);\n }\n};\n\n// \nvar SC_ATTR = 'data-styled-components';\nvar LOCAL_ATTR = 'data-styled-components-is-local';\nvar CONTEXT_KEY = '__styled-components-stylesheet__';\n\nvar instance = null;\n// eslint-disable-next-line no-use-before-define\nvar clones = [];\n\nvar StyleSheet = function () {\n function StyleSheet(tagConstructor) {\n var tags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var names = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, StyleSheet);\n this.hashes = {};\n this.deferredInjections = {};\n this.stylesCacheable = typeof document !== 'undefined';\n\n this.tagConstructor = tagConstructor;\n this.tags = tags;\n this.names = names;\n this.constructComponentTagMap();\n }\n\n // helper for `ComponentStyle` to know when it cache static styles.\n // staticly styled-component can not safely cache styles on the server\n // without all `ComponentStyle` instances saving a reference to the\n // the styleSheet instance they last rendered with,\n // or listening to creation / reset events. otherwise you might create\n // a component with one stylesheet and render it another api response\n // with another, losing styles on from your server-side render.\n\n\n StyleSheet.prototype.constructComponentTagMap = function constructComponentTagMap() {\n var _this = this;\n\n this.componentTags = {};\n\n this.tags.forEach(function (tag) {\n Object.keys(tag.components).forEach(function (componentId) {\n _this.componentTags[componentId] = tag;\n });\n });\n };\n\n /* Best level of caching—get the name from the hash straight away. */\n\n\n StyleSheet.prototype.getName = function getName(hash) {\n return this.hashes[hash.toString()];\n };\n\n /* Second level of caching—if the name is already in the dom, don't\n * inject anything and record the hash for getName next time. */\n\n\n StyleSheet.prototype.alreadyInjected = function alreadyInjected(hash, name) {\n if (!this.names[name]) return false;\n\n this.hashes[hash.toString()] = name;\n return true;\n };\n\n /* Third type of caching—don't inject components' componentId twice. */\n\n\n StyleSheet.prototype.hasInjectedComponent = function hasInjectedComponent(componentId) {\n return !!this.componentTags[componentId];\n };\n\n StyleSheet.prototype.deferredInject = function deferredInject(componentId, isLocal, css) {\n if (this === instance) {\n clones.forEach(function (clone) {\n clone.deferredInject(componentId, isLocal, css);\n });\n }\n\n this.getOrCreateTag(componentId, isLocal);\n this.deferredInjections[componentId] = css;\n };\n\n StyleSheet.prototype.inject = function inject(componentId, isLocal, css, hash, name) {\n if (this === instance) {\n clones.forEach(function (clone) {\n clone.inject(componentId, isLocal, css);\n });\n }\n\n var tag = this.getOrCreateTag(componentId, isLocal);\n\n var deferredInjection = this.deferredInjections[componentId];\n if (deferredInjection) {\n tag.inject(componentId, deferredInjection);\n delete this.deferredInjections[componentId];\n }\n\n tag.inject(componentId, css, name);\n\n if (hash && name) {\n this.hashes[hash.toString()] = name;\n }\n };\n\n StyleSheet.prototype.toHTML = function toHTML() {\n return this.tags.map(function (tag) {\n return tag.toHTML();\n }).join('');\n };\n\n StyleSheet.prototype.toReactElements = function toReactElements() {\n return this.tags.map(function (tag, i) {\n return tag.toReactElement('sc-' + i);\n });\n };\n\n StyleSheet.prototype.getOrCreateTag = function getOrCreateTag(componentId, isLocal) {\n var existingTag = this.componentTags[componentId];\n if (existingTag) {\n return existingTag;\n }\n\n var lastTag = this.tags[this.tags.length - 1];\n var componentTag = !lastTag || lastTag.isFull() || lastTag.isLocal !== isLocal ? this.createNewTag(isLocal) : lastTag;\n this.componentTags[componentId] = componentTag;\n componentTag.addComponent(componentId);\n return componentTag;\n };\n\n StyleSheet.prototype.createNewTag = function createNewTag(isLocal) {\n var newTag = this.tagConstructor(isLocal);\n this.tags.push(newTag);\n return newTag;\n };\n\n StyleSheet.reset = function reset(isServer) {\n instance = StyleSheet.create(isServer);\n };\n\n /* We can make isServer totally implicit once Jest 20 drops and we\n * can change environment on a per-test basis. */\n\n\n StyleSheet.create = function create() {\n var isServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : typeof document === 'undefined';\n\n return (isServer ? ServerStyleSheet : BrowserStyleSheet).create();\n };\n\n StyleSheet.clone = function clone(oldSheet) {\n var newSheet = new StyleSheet(oldSheet.tagConstructor, oldSheet.tags.map(function (tag) {\n return tag.clone();\n }), _extends({}, oldSheet.names));\n\n newSheet.hashes = _extends({}, oldSheet.hashes);\n newSheet.deferredInjections = _extends({}, oldSheet.deferredInjections);\n clones.push(newSheet);\n\n return newSheet;\n };\n\n createClass(StyleSheet, null, [{\n key: 'instance',\n get: function get$$1() {\n return instance || (instance = StyleSheet.create());\n }\n }]);\n return StyleSheet;\n}();\n\nvar _StyleSheetManager$ch;\n\n// \nvar StyleSheetManager = function (_Component) {\n inherits(StyleSheetManager, _Component);\n\n function StyleSheetManager() {\n classCallCheck(this, StyleSheetManager);\n return possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n StyleSheetManager.prototype.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[CONTEXT_KEY] = this.props.sheet, _ref;\n };\n\n StyleSheetManager.prototype.render = function render() {\n /* eslint-disable react/prop-types */\n // Flow v0.43.1 will report an error accessing the `children` property,\n // but v0.47.0 will not. It is necessary to use a type cast instead of\n // a \"fixme\" comment to satisfy both Flow versions.\n return React.Children.only(this.props.children);\n };\n\n return StyleSheetManager;\n}(Component);\n\nStyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]).isRequired, _StyleSheetManager$ch);\n\nStyleSheetManager.propTypes = {\n sheet: PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]).isRequired\n};\n\n// \n/* eslint-disable no-underscore-dangle */\nvar ServerTag = function () {\n function ServerTag(isLocal) {\n classCallCheck(this, ServerTag);\n\n this.isLocal = isLocal;\n this.components = {};\n this.size = 0;\n this.names = [];\n }\n\n ServerTag.prototype.isFull = function isFull() {\n return false;\n };\n\n ServerTag.prototype.addComponent = function addComponent(componentId) {\n if (this.components[componentId]) throw new Error('Trying to add Component \\'' + componentId + '\\' twice!');\n this.components[componentId] = { componentId: componentId, css: '' };\n this.size += 1;\n };\n\n ServerTag.prototype.concatenateCSS = function concatenateCSS() {\n var _this = this;\n\n return Object.keys(this.components).reduce(function (styles, k) {\n return styles + _this.components[k].css;\n }, '');\n };\n\n ServerTag.prototype.inject = function inject(componentId, css, name) {\n var comp = this.components[componentId];\n\n if (!comp) throw new Error('Must add a new component before you can inject css into it');\n if (comp.css === '') comp.css = '/* sc-component-id: ' + componentId + ' */\\n';\n\n comp.css += css.replace(/\\n*$/, '\\n');\n\n if (name) this.names.push(name);\n };\n\n ServerTag.prototype.toHTML = function toHTML() {\n var attrs = ['type=\"text/css\"', SC_ATTR + '=\"' + this.names.join(' ') + '\"', LOCAL_ATTR + '=\"' + (this.isLocal ? 'true' : 'false') + '\"'];\n\n var nonce = getNonce();\n\n if (nonce) {\n attrs.push('nonce=\"' + nonce + '\"');\n }\n\n return '<style ' + attrs.join(' ') + '>' + this.concatenateCSS() + '</style>';\n };\n\n ServerTag.prototype.toReactElement = function toReactElement(key) {\n var _attrs;\n\n var attrs = (_attrs = {}, _attrs[SC_ATTR] = this.names.join(' '), _attrs[LOCAL_ATTR] = this.isLocal.toString(), _attrs);\n\n var nonce = getNonce();\n\n if (nonce) {\n attrs.nonce = nonce;\n }\n\n return React.createElement('style', _extends({\n key: key, type: 'text/css' }, attrs, {\n dangerouslySetInnerHTML: { __html: this.concatenateCSS() }\n }));\n };\n\n ServerTag.prototype.clone = function clone() {\n var _this2 = this;\n\n var copy = new ServerTag(this.isLocal);\n copy.names = [].concat(this.names);\n copy.size = this.size;\n copy.components = Object.keys(this.components).reduce(function (acc, key) {\n acc[key] = _extends({}, _this2.components[key]); // eslint-disable-line no-param-reassign\n return acc;\n }, {});\n\n return copy;\n };\n\n return ServerTag;\n}();\n\nvar ServerStyleSheet = function () {\n function ServerStyleSheet() {\n classCallCheck(this, ServerStyleSheet);\n\n this.instance = StyleSheet.clone(StyleSheet.instance);\n }\n\n ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {\n if (this.closed) throw new Error(\"Can't collect styles once you've called getStyleTags!\");\n return React.createElement(\n StyleSheetManager,\n { sheet: this.instance },\n children\n );\n };\n\n ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {\n if (!this.closed) {\n clones.splice(clones.indexOf(this.instance), 1);\n this.closed = true;\n }\n\n return this.instance.toHTML();\n };\n\n ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {\n if (!this.closed) {\n clones.splice(clones.indexOf(this.instance), 1);\n this.closed = true;\n }\n\n return this.instance.toReactElements();\n };\n\n ServerStyleSheet.create = function create() {\n return new StyleSheet(function (isLocal) {\n return new ServerTag(isLocal);\n });\n };\n\n return ServerStyleSheet;\n}();\n\n// \n\nvar LIMIT = 200;\n\nvar createWarnTooManyClasses = (function (displayName) {\n var generatedClasses = {};\n var warningSeen = false;\n\n return function (className) {\n if (!warningSeen) {\n generatedClasses[className] = true;\n if (Object.keys(generatedClasses).length >= LIMIT) {\n // Unable to find latestRule in test environment.\n /* eslint-disable no-console, prefer-template */\n console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \\n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\\n' + 'Example:\\n' + ' const Component = styled.div.attrs({\\n' + ' style: ({ background }) => ({\\n' + ' background,\\n' + ' }),\\n' + ' })`width: 100%;`\\n\\n' + ' <Component />');\n warningSeen = true;\n generatedClasses = {};\n }\n }\n };\n});\n\n// \n/* Trying to avoid the unknown-prop errors on styled components\n by filtering by React's attribute whitelist.\n */\n\n/* Logic copied from ReactDOMUnknownPropertyHook */\nvar reactProps = {\n children: true,\n dangerouslySetInnerHTML: true,\n key: true,\n ref: true,\n autoFocus: true,\n defaultValue: true,\n valueLink: true,\n defaultChecked: true,\n checkedLink: true,\n innerHTML: true,\n suppressContentEditableWarning: true,\n onFocusIn: true,\n onFocusOut: true,\n className: true,\n\n /* List copied from https://facebook.github.io/react/docs/events.html */\n onCopy: true,\n onCut: true,\n onPaste: true,\n onCompositionEnd: true,\n onCompositionStart: true,\n onCompositionUpdate: true,\n onKeyDown: true,\n onKeyPress: true,\n onKeyUp: true,\n onFocus: true,\n onBlur: true,\n onChange: true,\n onInput: true,\n onSubmit: true,\n onReset: true,\n onClick: true,\n onContextMenu: true,\n onDoubleClick: true,\n onDrag: true,\n onDragEnd: true,\n onDragEnter: true,\n onDragExit: true,\n onDragLeave: true,\n onDragOver: true,\n onDragStart: true,\n onDrop: true,\n onMouseDown: true,\n onMouseEnter: true,\n onMouseLeave: true,\n onMouseMove: true,\n onMouseOut: true,\n onMouseOver: true,\n onMouseUp: true,\n onSelect: true,\n onTouchCancel: true,\n onTouchEnd: true,\n onTouchMove: true,\n onTouchStart: true,\n onScroll: true,\n onWheel: true,\n onAbort: true,\n onCanPlay: true,\n onCanPlayThrough: true,\n onDurationChange: true,\n onEmptied: true,\n onEncrypted: true,\n onEnded: true,\n onError: true,\n onLoadedData: true,\n onLoadedMetadata: true,\n onLoadStart: true,\n onPause: true,\n onPlay: true,\n onPlaying: true,\n onProgress: true,\n onRateChange: true,\n onSeeked: true,\n onSeeking: true,\n onStalled: true,\n onSuspend: true,\n onTimeUpdate: true,\n onVolumeChange: true,\n onWaiting: true,\n onLoad: true,\n onAnimationStart: true,\n onAnimationEnd: true,\n onAnimationIteration: true,\n onTransitionEnd: true,\n\n onCopyCapture: true,\n onCutCapture: true,\n onPasteCapture: true,\n onCompositionEndCapture: true,\n onCompositionStartCapture: true,\n onCompositionUpdateCapture: true,\n onKeyDownCapture: true,\n onKeyPressCapture: true,\n onKeyUpCapture: true,\n onFocusCapture: true,\n onBlurCapture: true,\n onChangeCapture: true,\n onInputCapture: true,\n onSubmitCapture: true,\n onResetCapture: true,\n onClickCapture: true,\n onContextMenuCapture: true,\n onDoubleClickCapture: true,\n onDragCapture: true,\n onDragEndCapture: true,\n onDragEnterCapture: true,\n onDragExitCapture: true,\n onDragLeaveCapture: true,\n onDragOverCapture: true,\n onDragStartCapture: true,\n onDropCapture: true,\n onMouseDownCapture: true,\n onMouseEnterCapture: true,\n onMouseLeaveCapture: true,\n onMouseMoveCapture: true,\n onMouseOutCapture: true,\n onMouseOverCapture: true,\n onMouseUpCapture: true,\n onSelectCapture: true,\n onTouchCancelCapture: true,\n onTouchEndCapture: true,\n onTouchMoveCapture: true,\n onTouchStartCapture: true,\n onScrollCapture: true,\n onWheelCapture: true,\n onAbortCapture: true,\n onCanPlayCapture: true,\n onCanPlayThroughCapture: true,\n onDurationChangeCapture: true,\n onEmptiedCapture: true,\n onEncryptedCapture: true,\n onEndedCapture: true,\n onErrorCapture: true,\n onLoadedDataCapture: true,\n onLoadedMetadataCapture: true,\n onLoadStartCapture: true,\n onPauseCapture: true,\n onPlayCapture: true,\n onPlayingCapture: true,\n onProgressCapture: true,\n onRateChangeCapture: true,\n onSeekedCapture: true,\n onSeekingCapture: true,\n onStalledCapture: true,\n onSuspendCapture: true,\n onTimeUpdateCapture: true,\n onVolumeChangeCapture: true,\n onWaitingCapture: true,\n onLoadCapture: true,\n onAnimationStartCapture: true,\n onAnimationEndCapture: true,\n onAnimationIterationCapture: true,\n onTransitionEndCapture: true\n};\n\n/* From HTMLDOMPropertyConfig */\nvar htmlProps = {\n /**\n * Standard Properties\n */\n accept: true,\n acceptCharset: true,\n accessKey: true,\n action: true,\n allowFullScreen: true,\n allowTransparency: true,\n alt: true,\n // specifies target context for links with `preload` type\n as: true,\n async: true,\n autoComplete: true,\n // autoFocus is polyfilled/normalized by AutoFocusUtils\n // autoFocus: true,\n autoPlay: true,\n capture: true,\n cellPadding: true,\n cellSpacing: true,\n charSet: true,\n challenge: true,\n checked: true,\n cite: true,\n classID: true,\n className: true,\n cols: true,\n colSpan: true,\n content: true,\n contentEditable: true,\n contextMenu: true,\n controls: true,\n coords: true,\n crossOrigin: true,\n data: true, // For `<object />` acts as `src`.\n dateTime: true,\n default: true,\n defer: true,\n dir: true,\n disabled: true,\n download: true,\n draggable: true,\n encType: true,\n form: true,\n formAction: true,\n formEncType: true,\n formMethod: true,\n formNoValidate: true,\n formTarget: true,\n frameBorder: true,\n headers: true,\n height: true,\n hidden: true,\n high: true,\n href: true,\n hrefLang: true,\n htmlFor: true,\n httpEquiv: true,\n icon: true,\n id: true,\n inputMode: true,\n integrity: true,\n is: true,\n keyParams: true,\n keyType: true,\n kind: true,\n label: true,\n lang: true,\n list: true,\n loop: true,\n low: true,\n manifest: true,\n marginHeight: true,\n marginWidth: true,\n max: true,\n maxLength: true,\n media: true,\n mediaGroup: true,\n method: true,\n min: true,\n minLength: true,\n // Caution; `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`.\n multiple: true,\n muted: true,\n name: true,\n nonce: true,\n noValidate: true,\n open: true,\n optimum: true,\n pattern: true,\n placeholder: true,\n playsInline: true,\n poster: true,\n preload: true,\n profile: true,\n radioGroup: true,\n readOnly: true,\n referrerPolicy: true,\n rel: true,\n required: true,\n reversed: true,\n role: true,\n rows: true,\n rowSpan: true,\n sandbox: true,\n scope: true,\n scoped: true,\n scrolling: true,\n seamless: true,\n selected: true,\n shape: true,\n size: true,\n sizes: true,\n span: true,\n spellCheck: true,\n src: true,\n srcDoc: true,\n srcLang: true,\n srcSet: true,\n start: true,\n step: true,\n style: true,\n summary: true,\n tabIndex: true,\n target: true,\n title: true,\n // Setting .type throws on non-<input> tags\n type: true,\n useMap: true,\n value: true,\n width: true,\n wmode: true,\n wrap: true,\n\n /**\n * RDFa Properties\n */\n about: true,\n datatype: true,\n inlist: true,\n prefix: true,\n // property is also supported for OpenGraph in meta tags.\n property: true,\n resource: true,\n typeof: true,\n vocab: true,\n\n /**\n * Non-standard Properties\n */\n // autoCapitalize and autoCorrect are supported in Mobile Safari for\n // keyboard hints.\n autoCapitalize: true,\n autoCorrect: true,\n // autoSave allows WebKit/Blink to persist values of input fields on page reloads\n autoSave: true,\n // color is for Safari mask-icon link\n color: true,\n // itemProp, itemScope, itemType are for\n // Microdata support. See http://schema.org/docs/gs.html\n itemProp: true,\n itemScope: true,\n itemType: true,\n // itemID and itemRef are for Microdata support as well but\n // only specified in the WHATWG spec document. See\n // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api\n itemID: true,\n itemRef: true,\n // results show looking glass icon and recent searches on input\n // search fields in WebKit/Blink\n results: true,\n // IE-only attribute that specifies security restrictions on an iframe\n // as an alternative to the sandbox attribute on IE<10\n security: true,\n // IE-only attribute that controls focus behavior\n unselectable: 0\n};\n\nvar svgProps = {\n accentHeight: true,\n accumulate: true,\n additive: true,\n alignmentBaseline: true,\n allowReorder: true,\n alphabetic: true,\n amplitude: true,\n arabicForm: true,\n ascent: true,\n attributeName: true,\n attributeType: true,\n autoReverse: true,\n azimuth: true,\n baseFrequency: true,\n baseProfile: true,\n baselineShift: true,\n bbox: true,\n begin: true,\n bias: true,\n by: true,\n calcMode: true,\n capHeight: true,\n clip: true,\n clipPath: true,\n clipRule: true,\n clipPathUnits: true,\n colorInterpolation: true,\n colorInterpolationFilters: true,\n colorProfile: true,\n colorRendering: true,\n contentScriptType: true,\n contentStyleType: true,\n cursor: true,\n cx: true,\n cy: true,\n d: true,\n decelerate: true,\n descent: true,\n diffuseConstant: true,\n direction: true,\n display: true,\n divisor: true,\n dominantBaseline: true,\n dur: true,\n dx: true,\n dy: true,\n edgeMode: true,\n elevation: true,\n enableBackground: true,\n end: true,\n exponent: true,\n externalResourcesRequired: true,\n fill: true,\n fillOpacity: true,\n fillRule: true,\n filter: true,\n filterRes: true,\n filterUnits: true,\n floodColor: true,\n floodOpacity: true,\n focusable: true,\n fontFamily: true,\n fontSize: true,\n fontSizeAdjust: true,\n fontStretch: true,\n fontStyle: true,\n fontVariant: true,\n fontWeight: true,\n format: true,\n from: true,\n fx: true,\n fy: true,\n g1: true,\n g2: true,\n glyphName: true,\n glyphOrientationHorizontal: true,\n glyphOrientationVertical: true,\n glyphRef: true,\n gradientTransform: true,\n gradientUnits: true,\n hanging: true,\n horizAdvX: true,\n horizOriginX: true,\n ideographic: true,\n imageRendering: true,\n in: true,\n in2: true,\n intercept: true,\n k: true,\n k1: true,\n k2: true,\n k3: true,\n k4: true,\n kernelMatrix: true,\n kernelUnitLength: true,\n kerning: true,\n keyPoints: true,\n keySplines: true,\n keyTimes: true,\n lengthAdjust: true,\n letterSpacing: true,\n lightingColor: true,\n limitingConeAngle: true,\n local: true,\n markerEnd: true,\n markerMid: true,\n markerStart: true,\n markerHeight: true,\n markerUnits: true,\n markerWidth: true,\n mask: true,\n maskContentUnits: true,\n maskUnits: true,\n mathematical: true,\n mode: true,\n numOctaves: true,\n offset: true,\n opacity: true,\n operator: true,\n order: true,\n orient: true,\n orientation: true,\n origin: true,\n overflow: true,\n overlinePosition: true,\n overlineThickness: true,\n paintOrder: true,\n panose1: true,\n pathLength: true,\n patternContentUnits: true,\n patternTransform: true,\n patternUnits: true,\n pointerEvents: true,\n points: true,\n pointsAtX: true,\n pointsAtY: true,\n pointsAtZ: true,\n preserveAlpha: true,\n preserveAspectRatio: true,\n primitiveUnits: true,\n r: true,\n radius: true,\n refX: true,\n refY: true,\n renderingIntent: true,\n repeatCount: true,\n repeatDur: true,\n requiredExtensions: true,\n requiredFeatures: true,\n restart: true,\n result: true,\n rotate: true,\n rx: true,\n ry: true,\n scale: true,\n seed: true,\n shapeRendering: true,\n slope: true,\n spacing: true,\n specularConstant: true,\n specularExponent: true,\n speed: true,\n spreadMethod: true,\n startOffset: true,\n stdDeviation: true,\n stemh: true,\n stemv: true,\n stitchTiles: true,\n stopColor: true,\n stopOpacity: true,\n strikethroughPosition: true,\n strikethroughThickness: true,\n string: true,\n stroke: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeLinecap: true,\n strokeLinejoin: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n surfaceScale: true,\n systemLanguage: true,\n tableValues: true,\n targetX: true,\n targetY: true,\n textAnchor: true,\n textDecoration: true,\n textRendering: true,\n textLength: true,\n to: true,\n transform: true,\n u1: true,\n u2: true,\n underlinePosition: true,\n underlineThickness: true,\n unicode: true,\n unicodeBidi: true,\n unicodeRange: true,\n unitsPerEm: true,\n vAlphabetic: true,\n vHanging: true,\n vIdeographic: true,\n vMathematical: true,\n values: true,\n vectorEffect: true,\n version: true,\n vertAdvY: true,\n vertOriginX: true,\n vertOriginY: true,\n viewBox: true,\n viewTarget: true,\n visibility: true,\n widths: true,\n wordSpacing: true,\n writingMode: true,\n x: true,\n xHeight: true,\n x1: true,\n x2: true,\n xChannelSelector: true,\n xlinkActuate: true,\n xlinkArcrole: true,\n xlinkHref: true,\n xlinkRole: true,\n xlinkShow: true,\n xlinkTitle: true,\n xlinkType: true,\n xmlBase: true,\n xmlns: true,\n xmlnsXlink: true,\n xmlLang: true,\n xmlSpace: true,\n y: true,\n y1: true,\n y2: true,\n yChannelSelector: true,\n z: true,\n zoomAndPan: true\n};\n\n/* From DOMProperty */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nvar isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'));\n\nvar hasOwnProperty = {}.hasOwnProperty;\nvar validAttr = (function (name) {\n return hasOwnProperty.call(htmlProps, name) || hasOwnProperty.call(svgProps, name) || isCustomAttribute(name.toLowerCase()) || hasOwnProperty.call(reactProps, name);\n});\n\n// \n\n\nfunction isTag(target) /* : %checks */{\n return typeof target === 'string';\n}\n\n// \n\n\nfunction isStyledComponent(target) /* : %checks */{\n return typeof target === 'function' && typeof target.styledComponentId === 'string';\n}\n\n// \n\n/* eslint-disable no-undef */\nfunction getComponentName(target) {\n return target.displayName || target.name || 'Component';\n}\n\n// \n\n\nvar determineTheme = (function (props, fallbackTheme, defaultProps) {\n // Props should take precedence over ThemeProvider, which should take precedence over\n // defaultProps, but React automatically puts defaultProps on props.\n\n /* eslint-disable react/prop-types */\n var isDefaultTheme = defaultProps && props.theme === defaultProps.theme;\n var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme;\n /* eslint-enable */\n\n return theme;\n});\n\n// \n/**\n * Creates a broadcast that can be listened to, i.e. simple event emitter\n *\n * @see https://github.com/ReactTraining/react-broadcast\n */\n\nvar createBroadcast = function createBroadcast(initialState) {\n var listeners = {};\n var id = 0;\n var state = initialState;\n\n function publish(nextState) {\n state = nextState;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (var key in listeners) {\n var listener = listeners[key];\n if (listener === undefined) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n listener(state);\n }\n }\n\n function subscribe(listener) {\n var currentId = id;\n listeners[currentId] = listener;\n id += 1;\n listener(state);\n return currentId;\n }\n\n function unsubscribe(unsubID) {\n listeners[unsubID] = undefined;\n }\n\n return { publish: publish, subscribe: subscribe, unsubscribe: unsubscribe };\n};\n\n// \n// Helper to call a given function, only once\nvar once = (function (cb) {\n var called = false;\n\n return function () {\n if (!called) {\n called = true;\n cb();\n }\n };\n});\n\nvar _ThemeProvider$childC;\nvar _ThemeProvider$contex;\n\n// \n/* globals React$Element */\n// NOTE: DO NOT CHANGE, changing this is a semver major change!\nvar CHANNEL = '__styled-components__';\nvar CHANNEL_NEXT = CHANNEL + 'next__';\n\nvar CONTEXT_CHANNEL_SHAPE = PropTypes.shape({\n getTheme: PropTypes.func,\n subscribe: PropTypes.func,\n unsubscribe: PropTypes.func\n});\n\nvar warnChannelDeprecated = once(function () {\n // eslint-disable-next-line no-console\n console.error('Warning: Usage of `context.' + CHANNEL + '` as a function is deprecated. It will be replaced with the object on `.context.' + CHANNEL_NEXT + '` in a future version.');\n});\n/**\n * Provide a theme to an entire react component tree via context and event listeners (have to do\n * both context and event emitter as pure components block context updates)\n */\n\nvar ThemeProvider = function (_Component) {\n inherits(ThemeProvider, _Component);\n\n function ThemeProvider() {\n classCallCheck(this, ThemeProvider);\n\n var _this = possibleConstructorReturn(this, _Component.call(this));\n\n _this.unsubscribeToOuterId = -1;\n\n _this.getTheme = _this.getTheme.bind(_this);\n return _this;\n }\n\n ThemeProvider.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme\n // with the outer theme\n var outerContext = this.context[CHANNEL_NEXT];\n if (outerContext !== undefined) {\n this.unsubscribeToOuterId = outerContext.subscribe(function (theme) {\n _this2.outerTheme = theme;\n });\n }\n this.broadcast = createBroadcast(this.getTheme());\n };\n\n ThemeProvider.prototype.getChildContext = function getChildContext() {\n var _this3 = this,\n _babelHelpers$extends;\n\n return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL_NEXT] = {\n getTheme: this.getTheme,\n subscribe: this.broadcast.subscribe,\n unsubscribe: this.broadcast.unsubscribe\n }, _babelHelpers$extends[CHANNEL] = function (subscriber) {\n warnChannelDeprecated();\n\n // Patch the old `subscribe` provide via `CHANNEL` for older clients.\n var unsubscribeId = _this3.broadcast.subscribe(subscriber);\n return function () {\n return _this3.broadcast.unsubscribe(unsubscribeId);\n };\n }, _babelHelpers$extends));\n };\n\n ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) this.broadcast.publish(this.getTheme(nextProps.theme));\n };\n\n ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribeToOuterId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId);\n }\n };\n\n // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation\n\n\n ThemeProvider.prototype.getTheme = function getTheme(passedTheme) {\n var theme = passedTheme || this.props.theme;\n if (isFunction(theme)) {\n var mergedTheme = theme(this.outerTheme);\n if (!isPlainObject(mergedTheme)) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n return mergedTheme;\n }\n if (!isPlainObject(theme)) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n return _extends({}, this.outerTheme, theme);\n };\n\n ThemeProvider.prototype.render = function render() {\n if (!this.props.children) {\n return null;\n }\n return React.Children.only(this.props.children);\n };\n\n return ThemeProvider;\n}(Component);\n\nThemeProvider.childContextTypes = (_ThemeProvider$childC = {}, _ThemeProvider$childC[CHANNEL] = PropTypes.func, _ThemeProvider$childC[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$childC);\nThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$contex);\n\n// \n\nvar escapeRegex = /[[\\].#*$><+~=|^:(),\"'`]/g;\nvar multiDashRegex = /--+/g;\n\n// HACK for generating all static styles without needing to allocate\n// an empty execution context every single time...\nvar STATIC_EXECUTION_CONTEXT = {};\n\nvar _StyledComponent = (function (ComponentStyle, constructWithOptions) {\n /* We depend on components having unique IDs */\n var identifiers = {};\n var generateId = function generateId(_displayName, parentComponentId) {\n var displayName = typeof _displayName !== 'string' ? 'sc' : _displayName.replace(escapeRegex, '-') // Replace all possible CSS selectors\n .replace(multiDashRegex, '-'); // Replace multiple -- with single -\n\n var nr = (identifiers[displayName] || 0) + 1;\n identifiers[displayName] = nr;\n\n var hash = ComponentStyle.generateName(displayName + nr);\n var componentId = displayName + '-' + hash;\n return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId;\n };\n\n var BaseStyledComponent = function (_Component) {\n inherits(BaseStyledComponent, _Component);\n\n function BaseStyledComponent() {\n var _temp, _this, _ret;\n\n classCallCheck(this, BaseStyledComponent);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.attrs = {}, _this.state = {\n theme: null,\n generatedClassName: ''\n }, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n BaseStyledComponent.prototype.unsubscribeFromContext = function unsubscribeFromContext() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);\n }\n };\n\n BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) {\n var attrs = this.constructor.attrs;\n\n var context = _extends({}, props, { theme: theme });\n if (attrs === undefined) {\n return context;\n }\n\n this.attrs = Object.keys(attrs).reduce(function (acc, key) {\n var attr = attrs[key];\n // eslint-disable-next-line no-param-reassign\n acc[key] = typeof attr === 'function' ? attr(context) : attr;\n return acc;\n }, {});\n\n return _extends({}, context, this.attrs);\n };\n\n BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {\n var _constructor = this.constructor,\n attrs = _constructor.attrs,\n componentStyle = _constructor.componentStyle,\n warnTooManyClasses = _constructor.warnTooManyClasses;\n\n var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance;\n\n // staticaly styled-components don't need to build an execution context object,\n // and shouldn't be increasing the number of class names\n if (componentStyle.isStatic && attrs === undefined) {\n return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet);\n } else {\n var executionContext = this.buildExecutionContext(theme, props);\n var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet);\n\n if (warnTooManyClasses !== undefined) warnTooManyClasses(className);\n\n return className;\n }\n };\n\n BaseStyledComponent.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var componentStyle = this.constructor.componentStyle;\n\n var styledContext = this.context[CHANNEL_NEXT];\n\n // If this is a staticaly-styled component, we don't need to the theme\n // to generate or build styles.\n if (componentStyle.isStatic) {\n var generatedClassName = this.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, this.props);\n this.setState({ generatedClassName: generatedClassName });\n // If there is a theme in the context, subscribe to the event emitter. This\n // is necessary due to pure components blocking context updates, this circumvents\n // that by updating when an event is emitted\n } else if (styledContext !== undefined) {\n var subscribe = styledContext.subscribe;\n\n this.unsubscribeId = subscribe(function (nextTheme) {\n // This will be called once immediately\n var theme = determineTheme(_this2.props, nextTheme, _this2.constructor.defaultProps);\n var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props);\n\n _this2.setState({ theme: theme, generatedClassName: generatedClassName });\n });\n } else {\n // eslint-disable-next-line react/prop-types\n var theme = this.props.theme || {};\n var _generatedClassName = this.generateAndInjectStyles(theme, this.props);\n this.setState({ theme: theme, generatedClassName: _generatedClassName });\n }\n };\n\n BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _this3 = this;\n\n // If this is a staticaly-styled component, we don't need to listen to\n // props changes to update styles\n var componentStyle = this.constructor.componentStyle;\n\n if (componentStyle.isStatic) {\n return;\n }\n\n this.setState(function (oldState) {\n var theme = determineTheme(nextProps, oldState.theme, _this3.constructor.defaultProps);\n var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps);\n\n return { theme: theme, generatedClassName: generatedClassName };\n });\n };\n\n BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unsubscribeFromContext();\n };\n\n BaseStyledComponent.prototype.render = function render() {\n var _this4 = this;\n\n // eslint-disable-next-line react/prop-types\n var innerRef = this.props.innerRef;\n var generatedClassName = this.state.generatedClassName;\n var _constructor2 = this.constructor,\n styledComponentId = _constructor2.styledComponentId,\n target = _constructor2.target;\n\n\n var isTargetTag = isTag(target);\n\n var className = [\n // eslint-disable-next-line react/prop-types\n this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' ');\n\n var baseProps = _extends({}, this.attrs, {\n className: className\n });\n\n if (isStyledComponent(target)) {\n baseProps.innerRef = innerRef;\n } else {\n baseProps.ref = innerRef;\n }\n\n var propsForElement = Object.keys(this.props).reduce(function (acc, propName) {\n // Don't pass through non HTML tags through to HTML elements\n // always omit innerRef\n if (propName !== 'innerRef' && propName !== 'className' && (!isTargetTag || validAttr(propName))) {\n // eslint-disable-next-line no-param-reassign\n acc[propName] = _this4.props[propName];\n }\n\n return acc;\n }, baseProps);\n\n return createElement(target, propsForElement);\n };\n\n return BaseStyledComponent;\n }(Component);\n\n var createStyledComponent = function createStyledComponent(target, options, rules) {\n var _StyledComponent$cont;\n\n var _options$displayName = options.displayName,\n displayName = _options$displayName === undefined ? isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')' : _options$displayName,\n _options$componentId = options.componentId,\n componentId = _options$componentId === undefined ? generateId(options.displayName, options.parentComponentId) : _options$componentId,\n _options$ParentCompon = options.ParentComponent,\n ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon,\n extendingRules = options.rules,\n attrs = options.attrs;\n\n\n var styledComponentId = options.displayName && options.componentId ? options.displayName + '-' + options.componentId : componentId;\n\n var warnTooManyClasses = void 0;\n if (process.env.NODE_ENV !== 'production') {\n warnTooManyClasses = createWarnTooManyClasses(displayName);\n }\n\n var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), attrs, styledComponentId);\n\n var StyledComponent = function (_ParentComponent) {\n inherits(StyledComponent, _ParentComponent);\n\n function StyledComponent() {\n classCallCheck(this, StyledComponent);\n return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments));\n }\n\n StyledComponent.withComponent = function withComponent(tag) {\n var previousComponentId = options.componentId,\n optionsToCopy = objectWithoutProperties(options, ['componentId']);\n\n\n var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : getComponentName(tag));\n\n var newOptions = _extends({}, optionsToCopy, {\n componentId: newComponentId,\n ParentComponent: StyledComponent\n });\n\n return createStyledComponent(tag, newOptions, rules);\n };\n\n createClass(StyledComponent, null, [{\n key: 'extend',\n get: function get$$1() {\n var rulesFromOptions = options.rules,\n parentComponentId = options.componentId,\n optionsToCopy = objectWithoutProperties(options, ['rules', 'componentId']);\n\n\n var newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules);\n\n var newOptions = _extends({}, optionsToCopy, {\n rules: newRules,\n parentComponentId: parentComponentId,\n ParentComponent: StyledComponent\n });\n\n return constructWithOptions(createStyledComponent, target, newOptions);\n }\n }]);\n return StyledComponent;\n }(ParentComponent);\n\n StyledComponent.contextTypes = (_StyledComponent$cont = {}, _StyledComponent$cont[CHANNEL] = PropTypes.func, _StyledComponent$cont[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _StyledComponent$cont[CONTEXT_KEY] = PropTypes.oneOfType([PropTypes.instanceOf(StyleSheet), PropTypes.instanceOf(ServerStyleSheet)]), _StyledComponent$cont);\n StyledComponent.displayName = displayName;\n StyledComponent.styledComponentId = styledComponentId;\n StyledComponent.attrs = attrs;\n StyledComponent.componentStyle = componentStyle;\n StyledComponent.warnTooManyClasses = warnTooManyClasses;\n StyledComponent.target = target;\n\n\n return StyledComponent;\n };\n\n return createStyledComponent;\n});\n\n// murmurhash2 via https://gist.github.com/raycmorgan/588423\n\nfunction doHash(str, seed) {\n var m = 0x5bd1e995;\n var r = 24;\n var h = seed ^ str.length;\n var length = str.length;\n var currentIndex = 0;\n\n while (length >= 4) {\n var k = UInt32(str, currentIndex);\n\n k = Umul32(k, m);\n k ^= k >>> r;\n k = Umul32(k, m);\n\n h = Umul32(h, m);\n h ^= k;\n\n currentIndex += 4;\n length -= 4;\n }\n\n switch (length) {\n case 3:\n h ^= UInt16(str, currentIndex);\n h ^= str.charCodeAt(currentIndex + 2) << 16;\n h = Umul32(h, m);\n break;\n\n case 2:\n h ^= UInt16(str, currentIndex);\n h = Umul32(h, m);\n break;\n\n case 1:\n h ^= str.charCodeAt(currentIndex);\n h = Umul32(h, m);\n break;\n }\n\n h ^= h >>> 13;\n h = Umul32(h, m);\n h ^= h >>> 15;\n\n return h >>> 0;\n}\n\nfunction UInt32(str, pos) {\n return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8) + (str.charCodeAt(pos++) << 16) + (str.charCodeAt(pos) << 24);\n}\n\nfunction UInt16(str, pos) {\n return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8);\n}\n\nfunction Umul32(n, m) {\n n = n | 0;\n m = m | 0;\n var nlo = n & 0xffff;\n var nhi = n >>> 16;\n var res = nlo * m + ((nhi * m & 0xffff) << 16) | 0;\n return res;\n}\n\n// \nvar isStaticRules = function isStaticRules(rules, attrs) {\n for (var i = 0; i < rules.length; i += 1) {\n var rule = rules[i];\n\n // recursive case\n if (Array.isArray(rule) && !isStaticRules(rule)) {\n return false;\n } else if (typeof rule === 'function' && !isStyledComponent(rule)) {\n // functions are allowed to be static if they're just being\n // used to get the classname of a nested styled copmonent\n return false;\n }\n }\n\n if (attrs !== undefined) {\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (var key in attrs) {\n var value = attrs[key];\n if (typeof value === 'function') {\n return false;\n }\n }\n }\n\n return true;\n};\n\n/*\n ComponentStyle is all the CSS-specific stuff, not\n the React-specific stuff.\n */\nvar _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) {\n var ComponentStyle = function () {\n function ComponentStyle(rules, attrs, componentId) {\n classCallCheck(this, ComponentStyle);\n\n this.rules = rules;\n this.isStatic = isStaticRules(rules, attrs);\n this.componentId = componentId;\n if (!StyleSheet.instance.hasInjectedComponent(this.componentId)) {\n var placeholder = process.env.NODE_ENV !== 'production' ? '.' + componentId + ' {}' : '';\n StyleSheet.instance.deferredInject(componentId, true, placeholder);\n }\n }\n\n /*\n * Flattens a rule set into valid CSS\n * Hashes it, wraps the whole chunk in a .hash1234 {}\n * Returns the hash to be injected on render()\n * */\n\n\n ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {\n var isStatic = this.isStatic,\n lastClassName = this.lastClassName;\n\n if (isStatic && lastClassName !== undefined) {\n return lastClassName;\n }\n\n var flatCSS = flatten(this.rules, executionContext);\n var hash = doHash(this.componentId + flatCSS.join(''));\n\n var existingName = styleSheet.getName(hash);\n if (existingName !== undefined) {\n if (styleSheet.stylesCacheable) {\n this.lastClassName = existingName;\n }\n return existingName;\n }\n\n var name = nameGenerator(hash);\n if (styleSheet.stylesCacheable) {\n this.lastClassName = existingName;\n }\n if (styleSheet.alreadyInjected(hash, name)) {\n return name;\n }\n\n var css = '\\n' + stringifyRules(flatCSS, '.' + name);\n // NOTE: this can only be set when we inject the class-name.\n // For some reason, presumably due to how css is stringifyRules behaves in\n // differently between client and server, styles break.\n styleSheet.inject(this.componentId, true, css, hash, name);\n return name;\n };\n\n ComponentStyle.generateName = function generateName(str) {\n return nameGenerator(doHash(str));\n };\n\n return ComponentStyle;\n }();\n\n return ComponentStyle;\n});\n\n// \n// Thanks to ReactDOMFactories for this handy list!\n\nvar domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',\n\n// SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// \n\nvar _styled = (function (styledComponent, constructWithOptions) {\n var styled = function styled(tag) {\n return constructWithOptions(styledComponent, tag);\n };\n\n // Shorthands for all valid HTML Elements\n domElements.forEach(function (domElement) {\n styled[domElement] = styled(domElement);\n });\n\n return styled;\n});\n\n// \nvar replaceWhitespace = function replaceWhitespace(str) {\n return str.replace(/\\s|\\\\n/g, '');\n};\n\nvar _keyframes = (function (nameGenerator, stringifyRules, css) {\n return function (strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n var rules = css.apply(undefined, [strings].concat(interpolations));\n var hash = doHash(replaceWhitespace(JSON.stringify(rules)));\n\n var existingName = StyleSheet.instance.getName(hash);\n if (existingName) return existingName;\n\n var name = nameGenerator(hash);\n if (StyleSheet.instance.alreadyInjected(hash, name)) return name;\n\n var generatedCSS = stringifyRules(rules, name, '@keyframes');\n StyleSheet.instance.inject('sc-keyframes-' + name, true, generatedCSS, hash, name);\n return name;\n };\n});\n\n// \nvar _injectGlobal = (function (stringifyRules, css) {\n var injectGlobal = function injectGlobal(strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n var rules = css.apply(undefined, [strings].concat(interpolations));\n var hash = doHash(JSON.stringify(rules));\n\n var componentId = 'sc-global-' + hash;\n if (StyleSheet.instance.hasInjectedComponent(componentId)) return;\n\n StyleSheet.instance.inject(componentId, false, stringifyRules(rules));\n };\n\n return injectGlobal;\n});\n\n// \n\n\nvar _constructWithOptions = (function (css) {\n var constructWithOptions = function constructWithOptions(componentConstructor, tag) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (typeof tag !== 'string' && typeof tag !== 'function') {\n // $FlowInvalidInputTest\n throw new Error('Cannot create styled-component for component: ' + tag);\n }\n\n /* This is callable directly as a template function */\n var templateFunction = function templateFunction(strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n return componentConstructor(tag, options, css.apply(undefined, [strings].concat(interpolations)));\n };\n\n /* If config methods are called, wrap up a new template function and merge options */\n templateFunction.withConfig = function (config) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, config));\n };\n templateFunction.attrs = function (attrs) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, {\n attrs: _extends({}, options.attrs || {}, attrs) }));\n };\n\n return templateFunction;\n };\n\n return constructWithOptions;\n});\n\n// \n/* globals ReactClass */\n\nvar wrapWithTheme = function wrapWithTheme(Component$$1) {\n var _WithTheme$contextTyp;\n\n var componentName = Component$$1.displayName || Component$$1.name || 'Component';\n\n var isStyledComponent$$1 = isStyledComponent(Component$$1);\n\n var WithTheme = function (_React$Component) {\n inherits(WithTheme, _React$Component);\n\n function WithTheme() {\n var _temp, _this, _ret;\n\n classCallCheck(this, WithTheme);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {}, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping\n\n\n WithTheme.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var defaultProps = this.constructor.defaultProps;\n\n var styledContext = this.context[CHANNEL_NEXT];\n var themeProp = determineTheme(this.props, undefined, defaultProps);\n if (styledContext === undefined && themeProp === undefined && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps');\n } else if (styledContext === undefined && themeProp !== undefined) {\n this.setState({ theme: themeProp });\n } else {\n var subscribe = styledContext.subscribe;\n\n this.unsubscribeId = subscribe(function (nextTheme) {\n var theme = determineTheme(_this2.props, nextTheme, defaultProps);\n _this2.setState({ theme: theme });\n });\n }\n };\n\n WithTheme.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var defaultProps = this.constructor.defaultProps;\n\n this.setState(function (oldState) {\n var theme = determineTheme(nextProps, oldState.theme, defaultProps);\n\n return { theme: theme };\n });\n };\n\n WithTheme.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);\n }\n };\n\n WithTheme.prototype.render = function render() {\n // eslint-disable-next-line react/prop-types\n var innerRef = this.props.innerRef;\n var theme = this.state.theme;\n\n\n return React.createElement(Component$$1, _extends({\n theme: theme\n }, this.props, {\n innerRef: isStyledComponent$$1 ? innerRef : undefined,\n ref: isStyledComponent$$1 ? undefined : innerRef\n }));\n };\n\n return WithTheme;\n }(React.Component);\n\n WithTheme.displayName = 'WithTheme(' + componentName + ')';\n WithTheme.styledComponentId = 'withTheme';\n WithTheme.contextTypes = (_WithTheme$contextTyp = {}, _WithTheme$contextTyp[CHANNEL] = PropTypes.func, _WithTheme$contextTyp[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _WithTheme$contextTyp);\n\n\n return hoistStatics(WithTheme, Component$$1);\n};\n\n// \n\n/* Import singletons */\n/* Import singleton constructors */\n/* Import components */\n/* Import Higher Order Components */\n/* Instantiate singletons */\nvar ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules);\nvar constructWithOptions = _constructWithOptions(css);\nvar StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions);\n\n/* Instantiate exported singletons */\nvar keyframes = _keyframes(generateAlphabeticName, stringifyRules, css);\nvar injectGlobal = _injectGlobal(stringifyRules, css);\nvar styled = _styled(StyledComponent, constructWithOptions);\n\nexport { css, keyframes, injectGlobal, ThemeProvider, wrapWithTheme as withTheme, ServerStyleSheet, StyleSheetManager };export default styled;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/styled-components/dist/styled-components.es.js\n// module id = 3\n// module chunks = 0 1","import { Matrix4x4 } from '../utils/linalg';\nimport { Image } from '../utils/image-loading';\n\nexport interface ImageDifference {\n type: 'Difference';\n imageA: Image;\n imageB: Image;\n width: number;\n height: number;\n nChannels: number;\n lossFunction: LossFunction;\n}\n\nexport type Input = Image | ImageDifference;\n\nexport default class Layer {\n protected transformation: Matrix4x4 = Matrix4x4.create();\n\n private aspectMatrixBuffer: Matrix4x4 = Matrix4x4.create(); // To prevent memory allocation in the render loop\n private viewMatrixBuffer: Matrix4x4 = Matrix4x4.create(); // To prevent memory allocation in the render loop\n\n constructor(protected canvas: HTMLCanvasElement, protected image: Input) {\n this.image = image;\n this.resize();\n }\n\n /**\n * Resize the canvas size if its elements size in the browser changed\n * @return whether anything changed\n */\n protected resize(): boolean {\n const width = Math.floor(this.canvas.clientWidth * window.devicePixelRatio);\n const height = Math.floor(this.canvas.clientHeight * window.devicePixelRatio);\n if (this.canvas.width !== width || this.canvas.height !== height) {\n this.canvas.width = width;\n this.canvas.height = height;\n return true;\n }\n return false;\n }\n\n /**\n * Compute the scalings in X and Y make sure the (-1,1) x (-1,1) box has the aspect ratio of the image\n * and is positioned centerally in the canvas\n */\n protected getAspect(): {x: number, y: number} {\n const viewAspect = this.canvas.clientWidth / this.canvas.clientHeight;\n const textAspect = this.image.width / this.image.height;\n let aspect: { x: number, y: number };\n if (viewAspect > textAspect) {\n aspect = { x: textAspect / viewAspect, y: 1.0 };\n } else {\n aspect = { x: 1.0, y: viewAspect / textAspect };\n }\n return aspect;\n }\n\n /**\n * Compute the view matrix from the current transformation and the shape of the window\n */\n protected getViewMatrix(): Matrix4x4 {\n const aspect = this.getAspect();\n Matrix4x4.fromScaling(this.aspectMatrixBuffer, [aspect.x, aspect.y, 1.0]);\n Matrix4x4.multiply(this.viewMatrixBuffer, this.aspectMatrixBuffer, this.transformation);\n return this.viewMatrixBuffer;\n }\n}\n\nexport enum LossFunction {\n L1 = 1,\n L2 = 2,\n MAPE = 3,\n MRSE = 4,\n SMAPE = 5,\n SSIM = 6,\n}\n\nconst lossFunctions = {\n 'L1': LossFunction.L1,\n 'L2': LossFunction.L2,\n 'MAPE': LossFunction.MAPE,\n 'MRSE': LossFunction.MRSE,\n 'SMAPE': LossFunction.SMAPE,\n 'SSIM': LossFunction.SSIM,\n};\n\nexport function lossFunctionFromString(name: string): LossFunction {\n if (lossFunctions.hasOwnProperty(name)) {\n return lossFunctions[name];\n } else {\n throw Error(`Loss function ${name} is invalid. Available options: ${Object.keys(lossFunctions)}`);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/Layer.ts","export type Image = LdrImage | HdrImage;\n\nexport interface HdrImage {\n type: 'HdrImage';\n url: string;\n width: number;\n height: number;\n nChannels: number;\n data: Float32Array;\n}\n\nexport interface LdrImage {\n type: 'LdrImage';\n url: string;\n width: number;\n height: number;\n nChannels: number;\n data: HTMLImageElement;\n}\n\nimport ExrParserWorker = require('worker-loader?name=exr.worker.js!./exr-parser.worker.js');\n\n/**\n * A pool of exr parsing webworkers that get assigned tasks in a round-robin fashion.\n */\nclass ExrParserPool {\n private workers: Worker[];\n /** To divide the work equally, keep track of the worker that got the previous job. */\n private nextWorkerId: number = 0;\n /** Each job that is sent to a worker gets a unique jobId. */\n private jobId: number = 0;\n /** After sending a job to a web worker, we register a return handler for when data comes back */\n private returnHandlers: {[x: string]: Function } = {};\n\n constructor(private nWorkers: number) {\n this.workers = [];\n for (let i = 0; i < nWorkers; ++i) {\n const worker = new ExrParserWorker();\n this.workers.push(worker);\n worker.onmessage = this.handleResult.bind(this);\n }\n }\n\n /**\n * Parse raw EXR data using by assigning the task to a web worker in the pool\n */\n parse(url: string, data: ArrayBuffer): Promise<HdrImage> {\n return new Promise((resolve, reject) => {\n const worker = this.nextWorker();\n const jobId = this.jobId++;\n this.returnHandlers[jobId] = (event: MessageEvent) => {\n if (event.data.success) {\n resolve({ url, ...event.data.image } as HdrImage);\n } else {\n reject(new Error(event.data.message as string));\n }\n };\n worker.postMessage({ jobId, data }, [data]);\n });\n }\n\n /**\n * Handler that gets called whenever a result comes back from the webworkers\n * It looks up the corresponding handler by the jobId.\n */\n handleResult(event: MessageEvent) {\n if (event.data.jobId != null) {\n const callback = this.returnHandlers[event.data.jobId];\n delete this.returnHandlers[event.data.jobId];\n callback(event);\n } else {\n throw new Error(`Got a message from the webworker without job id.`);\n }\n }\n\n /**\n * Get the web worker whose turn it is\n */\n private nextWorker(): Worker {\n const worker = this.workers[this.nextWorkerId];\n this.nextWorkerId = (this.nextWorkerId + 1) % this.nWorkers;\n return worker;\n }\n}\n\nconst pool = new ExrParserPool(2);\nfunction parseExr(url: string, data: ArrayBuffer): Promise<HdrImage> {\n return pool.parse(url, data);\n}\n\nexport function loadImage(url: string): Promise<Image> {\n const suffix = url.split('.').pop();\n if (suffix && suffix.toLocaleLowerCase() === 'exr') {\n return loadExr(url);\n } else {\n return loadLdr(url);\n }\n}\n\nexport function loadExr(url: string): Promise<HdrImage> {\n console.time(`Downloading '${url}'`); // tslint:disable-line\n return fetch(url)\n .then(result => {\n console.timeEnd(`Downloading '${url}'`); // tslint:disable-line\n return result;\n })\n .then(result => result.arrayBuffer())\n .then(data => parseExr(url, data));\n}\n\nexport function loadLdr(url: string): Promise<LdrImage> {\n console.time(`Downloading '${url}'`); // tslint:disable-line\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.onerror = (error) => reject(new Error(`Failed to load '${url}'.`));\n image.onload = () => {\n console.timeEnd(`Downloading '${url}'`); // tslint:disable-line\n try {\n const canvas = document.createElement('canvas');\n canvas.width = image.width;\n canvas.height = image.height;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n reject(new Error('Failed to get 2d canvas context.'));\n return;\n }\n ctx.drawImage(image, 0, 0);\n resolve({\n url: url,\n width: image.width,\n height: image.height,\n nChannels: 4,\n data: image,\n type: 'LdrImage',\n } as LdrImage);\n } catch (error) {\n reject(new Error(`Failed to load image '${url}': ${error}`));\n }\n };\n image.src = url;\n });\n}\n\nconst pixelColorCache: Map<Image, Function> = new Map();\n/**\n * Extract a pixel's color\n * Caches data for LDR images\n * @param image image\n * @param x pixel's x coordinate\n * @param y pixel's y coordinate\n * @param c color channel (r=0, g=1, b=2)\n */\nexport function getPixelColor(image: Image, x: number, y: number, c: number) {\n if (image.type === 'HdrImage') {\n return image.data[(x + y * image.width) * image.nChannels + c];\n } else {\n let getColorFnc = pixelColorCache.get(image);\n if (getColorFnc == null) {\n const canvas = document.createElement('canvas');\n canvas.width = image.width;\n canvas.height = image.height;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n throw new Error('Failed to create 2d context to retrieve LDR image data');\n }\n ctx.drawImage(image.data, 0, 0, image.width, image.height);\n getColorFnc = (X: number, Y: number, C: number) => ctx.getImageData(X, Y, 1, 1).data[C] / 256;\n pixelColorCache.set(image, getColorFnc);\n }\n return getColorFnc(x, y, c);\n }\n}\n\nexport class ImageCache {\n\n private images: { [x: string]: Image } = {};\n private downloading: { [x: string]: Promise<Image> } = {};\n\n contains(url: string): boolean {\n return this.images.hasOwnProperty(url);\n }\n\n currentlyDownloading(url: string): boolean {\n return this.downloading.hasOwnProperty(url);\n }\n\n size(): number {\n return Object.keys(this.images).length;\n }\n\n get(url: string): Promise<Image> {\n if (this.contains(url)) {\n // console.log(`Image ${url} was in cache.`); // tslint:disable-line\n return Promise.resolve(this.images[url]);\n } else if (this.currentlyDownloading(url)) {\n return this.downloading[url];\n } else {\n // console.log(`Image ${url} is downloaded.`); // tslint:disable-line\n return this.load(url);\n }\n }\n\n private store(url: string, image: Image): Image {\n if (this.currentlyDownloading(url)) {\n delete this.currentlyDownloading[url];\n }\n this.images[url] = image;\n return image;\n }\n\n private load(url: string) {\n const imagePromise = loadImage(url);\n this.downloading[url] = imagePromise;\n return imagePromise\n .then((image: Image) => this.store(url, image));\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/image-loading.ts","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/node_modules/fbjs/lib/emptyFunction.js\n// module id = 6\n// module chunks = 0 1","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/node_modules/fbjs/lib/invariant.js\n// module id = 7\n// module chunks = 0 1","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module id = 8\n// module chunks = 0 1","import * as React from 'react';\nimport { Matrix4x4 } from '../utils/linalg';\n\nimport ImageLayer from '../layers/ImageLayer';\nimport TextLayer from '../layers/TextLayer';\nimport MouseLayer from '../layers/MouseLayer';\nimport { Input as ImageInput } from '../layers/Layer';\n\nimport styled from 'styled-components';\n\nconst StretchingCanvas = styled.canvas`\n position: absolute;\n top: 0; bottom: 0;\n left: 0; right: 0;\n width: 100%; height: 100%;\n`;\nconst StretchingDiv = styled.div`\n position: absolute;\n top: 0; bottom: 0;\n left: 0; right: 0;\n width: 100%; height: 100%;\n`;\n\nexport interface ImageFrameProps {\n image: ImageInput;\n viewTransform: number;\n exposure: number;\n gamma: number;\n offset: number;\n allowMovement: boolean;\n /** Optional callback to be called when the mouse moves */\n onPoint?: (x: number, y: number) => void;\n /** Optional callback to be called when the canvas is panned or zoomed */\n onTransform?: (transformation: Matrix4x4) => void;\n enableMouseEvents: boolean;\n}\n\n/**\n * An image frame that deals with mouse movement for padding and zooming\n */\nexport default class ImageFrame extends React.Component<ImageFrameProps, {}> {\n private imageLayerElement: HTMLCanvasElement;\n private textLayerElement: HTMLCanvasElement;\n private mouseLayerElement: HTMLCanvasElement;\n\n private imageLayer: ImageLayer;\n private textLayer: TextLayer;\n private mouseLayer: MouseLayer;\n\n private transformation: Matrix4x4 = Matrix4x4.create();\n\n /** Where to go back when reset() is called */\n private defaultTransformation: Matrix4x4 = Matrix4x4.create();\n\n constructor(props: ImageFrameProps) {\n super(props);\n this.handleTransformationChange = this.handleTransformationChange.bind(this);\n }\n\n componentDidMount() {\n this.imageLayer = new ImageLayer(this.imageLayerElement, this.props.image);\n this.textLayer = new TextLayer(this.textLayerElement, this.props.image);\n this.mouseLayer = new MouseLayer(this.mouseLayerElement, this.props.image, this.props.enableMouseEvents);\n\n this.mouseLayer.onTransformationChange(this.handleTransformationChange);\n\n this.updateCanvasProps();\n this.handleTransformationChange(this.transformation);\n }\n\n componentDidUpdate(prevProps: ImageFrameProps) {\n this.updateCanvasProps(prevProps);\n this.mouseLayer.setEnableMouseEvents(this.props.enableMouseEvents);\n }\n\n componentWillUnmount() {\n this.mouseLayer.onPointAt(undefined);\n this.mouseLayer.onTransformationChange(undefined);\n this.mouseLayer.destruct();\n }\n\n /** Set the default transformation that calling reset() will result in */\n setDefaultTransformation(transformation: Matrix4x4) {\n this.defaultTransformation = transformation;\n }\n\n reset() {\n this.handleTransformationChange(this.defaultTransformation);\n }\n\n setTransformation(transformation: Matrix4x4) {\n this.handleTransformationChange(transformation);\n }\n\n getTransformation(): Matrix4x4 {\n return this.transformation;\n }\n\n render() {\n return (\n <StretchingDiv>\n <StretchingCanvas innerRef={(x) => this.imageLayerElement = x} />\n <StretchingCanvas innerRef={(x) => this.textLayerElement = x} />\n <StretchingCanvas innerRef={(x) => this.mouseLayerElement = x} />\n </StretchingDiv>\n );\n }\n\n private handleTransformationChange(transformation: Matrix4x4) {\n if (this.props.allowMovement) {\n this.transformation = transformation;\n this.imageLayer.setTransformation(transformation);\n this.textLayer.setTransformation(transformation);\n this.mouseLayer.setTransformation(transformation);\n if (this.props.onTransform != null) {\n this.props.onTransform(transformation);\n }\n }\n }\n\n private updateCanvasProps(previousProps: ImageFrameProps | null = null) {\n if (!previousProps ||\n previousProps.viewTransform !== this.props.viewTransform ||\n previousProps.exposure !== this.props.exposure ||\n previousProps.gamma !== this.props.gamma ||\n previousProps.offset !== this.props.offset) {\n this.imageLayer.setTonemapping({\n viewTransform: this.props.viewTransform,\n exposure: this.props.exposure,\n offset: this.props.offset,\n gamma: this.props.gamma\n });\n }\n if (!previousProps || previousProps.image !== this.props.image) {\n this.imageLayer.setImage(this.props.image);\n this.textLayer.setImage(this.props.image);\n this.mouseLayer.setImage(this.props.image);\n }\n this.mouseLayer.onPointAt(this.props.onPoint);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ImageFrame.tsx","import { Matrix4x4 } from '../utils/linalg';\nimport cachedFunction from '../utils/cached-function';\nimport { Image } from '../utils/image-loading';\nimport Layer, { Input, LossFunction } from './Layer';\n\nenum DrawMode {\n LDR = 0,\n HDR = 1,\n ColorMap = 2,\n}\n\nenum ViewTransform {\n None = -1,\n Gamma22 = 0,\n K1S1 = 1,\n}\n\nconst vertexShaderSource = `\nattribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec2 vTextureCoord;\nuniform mat4 viewMatrix;\nvoid main(void) {\n gl_Position = viewMatrix * vec4(aVertexPosition, 1.0);\n vTextureCoord = aTextureCoord;\n}`;\n\nconst fragmentShaderSource = `\nprecision mediump float;\nuniform int viewTransform;\nuniform float exposure;\nuniform float offset;\nuniform float gamma;\nuniform int mode;\nuniform int nChannels;\nuniform int lossFunction;\nuniform int imageHeight; // Height and width are used to access neighboring pixels\nuniform int imageWidth;\nvarying vec2 vTextureCoord;\nuniform sampler2D imASampler;\nuniform sampler2D imBSampler;\nuniform sampler2D cmapSampler;\n\nvec3 lookupOffset(sampler2D sampler, vec2 position, vec2 offset) {\n // Read neighbouring pixels from an image texture\n // Takes 'position' (range 0 - 1) and an integer pixel offset 'offset'\n vec2 imageSize = vec2(imageWidth, imageHeight);\n return texture2D(sampler, position + offset / imageSize).rgb;\n}\n\nfloat log10(float a) {\n const float logBase10 = 1.0 / log2( 10.0 );\n\n return log2(a) * logBase10;\n}\n\nfloat luminance(vec3 rgb) {\n return dot(vec3(0.2126, 0.7152, 0.0722), rgb);\n}\n\nvec3 GOG(vec3 rgb, float gain, float offset, float gamma) {\n return pow(gain * rgb + offset, vec3(1.0 / gamma));\n}\n\nfloat logEncodingLogC(float a) {\n float LogC = a >= 0.01059106816664 ? 0.385537 + 0.2471896 * log10(a * 5.555556 + 0.052272) : a * 5.367655 + 0.092809;\n\n return LogC;\n}\n\nfloat sigmoidK1S1(float a) {\n float sigmoid = 1.0 / (1.0 + pow(2.718281828459045, -8.9 * (a - 0.435)));\n\n return sigmoid;\n}\n\nvec3 viewTransformNone(vec3 rgb) {\n return rgb;\n}\n\nvec3 viewTransformGamma22(vec3 rgb) {\n const float exponent = 1.0 / 2.2;\n\n return pow(max(rgb, 0.0), vec3(exponent, exponent, exponent));\n}\n\nvec3 viewTransformK1S1(vec3 rgb) {\n vec3 LogC = vec3(logEncodingLogC(rgb.x), logEncodingLogC(rgb.y), logEncodingLogC(rgb.z));\n\n return vec3(sigmoidK1S1(LogC.x), sigmoidK1S1(LogC.y), sigmoidK1S1(LogC.z));\n}\n\nvec3 applyViewTransform(vec3 rgb, int which) {\n if (which == ${ViewTransform.None}) {\n return viewTransformNone(rgb);\n } else if (which == ${ViewTransform.Gamma22}) {\n return viewTransformGamma22(rgb);\n } else if (which == ${ViewTransform.K1S1}) {\n return viewTransformK1S1(rgb);\n }\n}\n\nvoid main(void) {\n vec3 col;\n vec2 position = vec2(vTextureCoord.s, vTextureCoord.t);\n if (lossFunction == ${LossFunction.L1}) {\n col = texture2D(imASampler, position).rgb;\n col = col - texture2D(imBSampler, position).rgb;\n col = abs(col);\n } else if (lossFunction == ${LossFunction.MAPE}) {\n vec3 img = texture2D(imASampler, position).rgb;\n vec3 ref = texture2D(imBSampler, position).rgb;\n vec3 diff = img - ref;\n col = abs(diff) / (abs(ref) + 1e-2);\n } else if (lossFunction == ${LossFunction.SMAPE}) {\n vec3 img = texture2D(imASampler, position).rgb;\n vec3 ref = texture2D(imBSampler, position).rgb;\n vec3 diff = img - ref;\n col = 2.0 * abs(diff) / (abs(ref) + abs(img) + 2e-2);\n } else if (lossFunction == ${LossFunction.MRSE}) {\n vec3 img = texture2D(imASampler, position).rgb;\n vec3 ref = texture2D(imBSampler, position).rgb;\n vec3 diff = img - ref;\n col = diff * diff / (ref * ref + 1e-4);\n } else if (lossFunction == ${LossFunction.L2}) {\n vec3 img = texture2D(imASampler, position).rgb;\n vec3 ref = texture2D(imBSampler, position).rgb;\n vec3 diff = img - ref;\n col = diff * diff;\n } else if (lossFunction == ${LossFunction.SSIM}) {\n const int windowRadius = 2; // We use a symmetric 5x5 window as opposed to the customary 8x8 (wiki)\n const float L = 1.; // The dynamic range\n const float k1 = 0.01, k2 = 0.03; // Default constants\n const float c1 = (k1*L)*(k1*L), c2 = (k2*L)*(k2*L);\n const float n = float((2 * windowRadius + 1) * (2 * windowRadius + 1));\n\n // Compute means and standard deviations of both images\n float aSum, aaSum, bSum, bbSum, abSum;\n for (int x = 0; x <= 2 * windowRadius; ++x) {\n for (int y = 0; y <= 2 * windowRadius; ++y) {\n vec2 offset = vec2(float(x - windowRadius), float(y - windowRadius));\n float a = luminance(applyViewTransform(lookupOffset(imASampler, position, offset), viewTransform));\n float b = luminance(applyViewTransform(lookupOffset(imBSampler, position, offset), viewTransform));\n aSum += a; bSum += b;\n aaSum += a * a; bbSum += b * b;\n abSum += a * b;\n }\n }\n float aMean = aSum / n, bMean = bSum / n;\n float aVar = (aaSum - n * aMean * aMean) / (n + 1.);\n float bVar = (bbSum - n * bMean * bMean) / (n + 1.);\n float abCovar = (abSum - n * aMean * bMean) / (n + 1.);\n\n float numerator = (2. * aMean * bMean + c1) * (2. * abCovar + c2);\n float denominator = (aMean * aMean + bMean * bMean + c1) * (aVar + bVar + c2);\n float ssim = numerator / denominator;\n col = vec3(1. - ssim, 1. - ssim, 1. - ssim);\n } else {\n col = texture2D(imASampler, position).rgb;\n if (nChannels == 1) {\n col = vec3(col.r, col.r, col.r);\n }\n }\n\n if (mode == ${DrawMode.LDR}) {\n col = pow(col, vec3(2.2));\n col = GOG(col, exposure, offset, gamma);\n col = applyViewTransform(col, viewTransform);\n } else if (mode == ${DrawMode.HDR}) {\n col = GOG(col, exposure, offset, gamma);\n col = applyViewTransform(col, viewTransform);\n } else {\n float avg = (col.r + col.g + col.b) * 0.3333333333 * exposure;\n col = texture2D(cmapSampler, vec2(avg, 0.0)).rgb;\n }\n\n gl_FragColor = vec4(col, 1.0);\n}`;\n\nconst imageVertices = new Float32Array([\n // X Y Z U V\n -1.0, -1.0, 0.0, 0.0, 1.0,\n -1.0, 1.0, 0.0, 0.0, 0.0,\n 1.0, -1.0, 0.0, 1.0, 1.0,\n 1.0, 1.0, 0.0, 1.0, 0.0,\n]);\n\nconst colorMapTexels = new Uint8Array([\n 0, 0, 3, 255,\n 23, 15, 60, 255,\n 67, 15, 117, 255,\n 113, 31, 129, 255,\n 158, 46, 126, 255,\n 205, 63, 112, 255,\n 240, 96, 93, 255,\n 253, 149, 103, 255,\n 254, 201, 141, 255,\n 251, 252, 191, 255,\n]);\n\nfunction compileShader(code: string, type: number, gl: WebGLRenderingContext): WebGLShader {\n var shader = gl.createShader(type);\n gl.shaderSource(shader, code);\n gl.compileShader(shader);\n if (!shader || !gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n throw new Error(`Compiling shader failed with error '${gl.getShaderInfoLog(shader)}'.`);\n }\n return shader;\n}\n\ninterface WebGlAttributes {\n vertexPosition: number;\n vertexTextureCoordinate: number;\n}\n\ninterface WebGlUniforms {\n drawMode: WebGLUniformLocation;\n lossFunction: WebGLUniformLocation;\n nChannels: WebGLUniformLocation;\n viewMatrix: WebGLUniformLocation;\n imASampler: WebGLUniformLocation;\n imBSampler: WebGLUniformLocation;\n cmapSampler: WebGLUniformLocation;\n viewTransform: WebGLUniformLocation;\n exposure: WebGLUniformLocation;\n offset: WebGLUniformLocation;\n gamma: WebGLUniformLocation;\n imageWidth: WebGLUniformLocation;\n imageHeight: WebGLUniformLocation;\n}\n\nexport interface TonemappingSettings {\n viewTransform: number;\n offset: number;\n gamma: number;\n exposure: number;\n}\nconst defaultTonemapping: TonemappingSettings = { viewTransform:0.0, exposure: 1.0, gamma: 1.0, offset: 0.0 };\n\nexport type TextureCache = (image: Image) => WebGLTexture;\n\n/**\n * Image Layer\n */\nexport default class ImageLayer extends Layer {\n private tonemappingSettings: TonemappingSettings = defaultTonemapping;\n\n private needsRerender: boolean = true;\n private getTexture: TextureCache;\n\n private gl: WebGLRenderingContext;\n private glAttributes: WebGlAttributes;\n private glUniforms: WebGlUniforms;\n private quadVertexBuffer: WebGLBuffer;\n private cmapTexture: WebGLTexture;\n\n constructor(canvas: HTMLCanvasElement, image: Input) {\n super(canvas, image);\n\n // Make sure 'this' is available even when these methods are passed as a callback\n this.checkRender = this.checkRender.bind(this);\n this.invalidate = this.invalidate.bind(this);\n\n this.initWebGl(canvas);\n\n // Create a texture cache and load the image texture\n this.getTexture = cachedFunction(this.createTexture.bind(this));\n\n // Draw for the first time\n this.needsRerender = true;\n requestAnimationFrame(this.checkRender);\n }\n\n setTransformation(transformation: Matrix4x4) {\n this.transformation = transformation;\n this.invalidate();\n }\n\n setTonemapping(tonemapping: TonemappingSettings) {\n this.tonemappingSettings = tonemapping;\n this.invalidate();\n }\n\n setImage(image: Input) {\n this.image = image;\n this.invalidate();\n }\n\n /**\n * Force a new draw the next frame\n */\n invalidate() {\n this.needsRerender = true;\n }\n\n /**\n * Render loop, will draw when this component is invalidated with\n * this.needsRerender = true;\n * or when the size of the container changed\n */\n private checkRender() {\n if (this.resize() || this.needsRerender) {\n this.needsRerender = false;\n this.draw();\n }\n requestAnimationFrame(this.checkRender);\n }\n\n /**\n * Paint a new image\n */\n private draw() {\n if (!this.cmapTexture) {\n throw new Error('Textures need to be initialized before calling draw()');\n }\n this.gl.viewport(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight);\n\n this.gl.uniform1i(this.glUniforms.viewTransform, this.tonemappingSettings.viewTransform);\n this.gl.uniform1f(this.glUniforms.exposure, this.tonemappingSettings.exposure);\n this.gl.uniform1f(this.glUniforms.offset, this.tonemappingSettings.offset);\n this.gl.uniform1f(this.glUniforms.gamma, this.tonemappingSettings.gamma);\n\n this.gl.clear(this.gl.COLOR_BUFFER_BIT | this.gl.DEPTH_BUFFER_BIT); // tslint:disable-line\n\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.quadVertexBuffer);\n this.gl.vertexAttribPointer(\n this.glAttributes.vertexPosition,\n 3,\n this.gl.FLOAT,\n false,\n 5 * imageVertices.BYTES_PER_ELEMENT,\n 0\n );\n this.gl.vertexAttribPointer(\n this.glAttributes.vertexTextureCoordinate,\n 2,\n this.gl.FLOAT,\n false,\n 5 * imageVertices.BYTES_PER_ELEMENT, // stride\n 3 * imageVertices.BYTES_PER_ELEMENT // offset\n );\n\n this.gl.uniform1i(this.glUniforms.imageHeight, this.image.height);\n this.gl.uniform1i(this.glUniforms.imageWidth, this.image.width);\n\n if (this.image.type === 'Difference') {\n this.gl.uniform1i(this.glUniforms.drawMode, DrawMode.ColorMap);\n this.gl.uniform1i(this.glUniforms.lossFunction, this.image.lossFunction);\n this.gl.activeTexture(this.gl.TEXTURE0);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.getTexture(this.image.imageA));\n this.gl.uniform1i(this.glUniforms.imASampler, 0);\n this.gl.activeTexture(this.gl.TEXTURE1);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.getTexture(this.image.imageB));\n this.gl.uniform1i(this.glUniforms.imBSampler, 1);\n } else {\n if (this.image.nChannels === 1) {\n this.gl.uniform1i(this.glUniforms.drawMode, DrawMode.ColorMap);\n } else if (this.image.type === 'HdrImage') {\n this.gl.uniform1i(this.glUniforms.drawMode, DrawMode.HDR);\n } else {\n this.gl.uniform1i(this.glUniforms.drawMode, DrawMode.LDR);\n }\n this.gl.uniform1i(this.glUniforms.lossFunction, 0);\n this.gl.activeTexture(this.gl.TEXTURE0);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.getTexture(this.image));\n this.gl.uniform1i(this.glUniforms.imASampler, 0);\n this.gl.activeTexture(this.gl.TEXTURE1);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.getTexture(this.image));\n this.gl.uniform1i(this.glUniforms.imBSampler, 1);\n }\n\n this.gl.activeTexture(this.gl.TEXTURE2);\n this.gl.bindTexture(this.gl.TEXTURE_2D, this.cmapTexture);\n this.gl.uniform1i(this.glUniforms.cmapSampler, 2);\n\n this.gl.uniform1i(this.glUniforms.nChannels, this.image.nChannels);\n\n const viewMatrix = this.getViewMatrix();\n this.gl.uniformMatrix4fv(this.glUniforms.viewMatrix, false, viewMatrix.data);\n this.gl.drawArrays(this.gl.TRIANGLE_STRIP, 0, 4);\n }\n\n private initWebGl(canvas: HTMLCanvasElement) {\n this.gl = canvas.getContext('webgl') as WebGLRenderingContext;\n\n if (!this.gl) {\n throw new Error('Please upgrade your browser to one that supports WebGL.');\n }\n\n if (!this.gl.getExtension('OES_texture_float')) {\n throw new Error('Your browser does not supports WebGL FLoating Point Textures.');\n }\n\n this.gl.clearColor(0.25, 0.25, 0.25, 1.0);\n this.gl.enable(this.gl.DEPTH_TEST);\n\n const program = this.initShaders();\n this.quadVertexBuffer = this.initQuadVertexBuffer();\n this.glAttributes = this.initAttributes(program);\n this.glUniforms = this.initUniforms(program);\n this.cmapTexture = this.initCmapTexture();\n }\n\n private initShaders(): WebGLProgram {\n const vertexShader = compileShader(vertexShaderSource, this.gl.VERTEX_SHADER, this.gl);\n const fragmentShader = compileShader(fragmentShaderSource, this.gl.FRAGMENT_SHADER, this.gl);\n\n const program = this.gl.createProgram();\n this.gl.attachShader(program, vertexShader);\n this.gl.attachShader(program, fragmentShader);\n this.gl.linkProgram(program);\n if (!program || !this.gl.getProgramParameter(program, this.gl.LINK_STATUS)) {\n throw new Error('Failed to link the program.');\n }\n this.gl.useProgram(program);\n return program;\n }\n\n private initCmapTexture(): WebGLTexture {\n const cmapTexture = this.gl.createTexture();\n this.gl.bindTexture(this.gl.TEXTURE_2D, cmapTexture);\n this.gl.texImage2D(\n this.gl.TEXTURE_2D,\n 0,\n this.gl.RGBA,\n colorMapTexels.length / 4,\n 1,\n 0,\n this.gl.RGBA,\n this.gl.UNSIGNED_BYTE,\n colorMapTexels\n );\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);\n if (!cmapTexture) {\n throw new Error('Failed to initialize color map texture.');\n }\n return cmapTexture;\n }\n\n private initQuadVertexBuffer(): WebGLBuffer {\n const buffer = this.gl.createBuffer();\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, buffer);\n this.gl.bufferData(this.gl.ARRAY_BUFFER, imageVertices, this.gl.STATIC_DRAW);\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, null);\n if (!buffer) {\n throw new Error('Failed to initialize quad vertex buffer.');\n }\n return buffer;\n }\n\n private initAttributes(program: WebGLProgram): WebGlAttributes {\n const attributes = {\n vertexPosition: this.gl.getAttribLocation(program, 'aVertexPosition'),\n vertexTextureCoordinate: this.gl.getAttribLocation(program, 'aTextureCoord'),\n };\n this.gl.enableVertexAttribArray(attributes.vertexPosition);\n this.gl.enableVertexAttribArray(attributes.vertexTextureCoordinate);\n return attributes;\n }\n\n private initUniforms(program: WebGLProgram) {\n let getUniformLocation = (name: string) => {\n let location = this.gl.getUniformLocation(program, name);\n if (!location) {\n throw new Error(`Failed to get uniform location for '${name}'.`);\n }\n return location;\n };\n return {\n drawMode: getUniformLocation('mode'),\n lossFunction: getUniformLocation('lossFunction'),\n nChannels: getUniformLocation('nChannels'),\n viewMatrix: getUniformLocation('viewMatrix'),\n imASampler: getUniformLocation('imASampler'),\n imBSampler: getUniformLocation('imBSampler'),\n cmapSampler: getUniformLocation('cmapSampler'),\n viewTransform: getUniformLocation('viewTransform'),\n exposure: getUniformLocation('exposure'),\n offset: getUniformLocation('offset'),\n gamma: getUniformLocation('gamma'),\n imageWidth: getUniformLocation('imageWidth'),\n imageHeight: getUniformLocation('imageHeight'),\n };\n }\n\n private createTexture(image: Image): WebGLTexture {\n const texture = this.gl.createTexture();\n if (!texture) {\n throw new Error('Failed to initialize image texture');\n }\n this.gl.bindTexture(this.gl.TEXTURE_2D, texture);\n if (image.type === 'HdrImage') {\n if (image.nChannels === 1) {\n this.gl.texImage2D(\n this.gl.TEXTURE_2D,\n 0,\n this.gl.LUMINANCE,\n image.width,\n image.height,\n 0,\n this.gl.LUMINANCE,\n this.gl.FLOAT,\n image.data\n );\n } else if (image.nChannels === 3) {\n this.gl.texImage2D(\n this.gl.TEXTURE_2D,\n 0,\n this.gl.RGB,\n image.width,\n image.height,\n 0,\n this.gl.RGB,\n this.gl.FLOAT,\n image.data\n );\n } else {\n throw new Error(`Don't know what to do with ${image.nChannels} image channels.`);\n }\n } else {\n this.gl.texImage2D(\n this.gl.TEXTURE_2D,\n 0,\n this.gl.RGBA,\n this.gl.RGBA,\n this.gl.UNSIGNED_BYTE,\n image.data\n );\n }\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.NEAREST);\n this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.NEAREST);\n this.gl.bindTexture(this.gl.TEXTURE_2D, null);\n return texture;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/ImageLayer.ts","import { Matrix4x4, Vector4 } from '../utils/linalg';\nimport Layer, { Input } from './Layer';\nimport { getPixelColor } from '../utils/image-loading';\n\nexport default class TextLayer extends Layer {\n protected image: Input;\n\n private context: CanvasRenderingContext2D;\n private needsRerender: boolean = true;\n\n constructor(canvas: HTMLCanvasElement, image: Input) {\n super(canvas, image);\n // Create canvas 2d drawing context\n const context = canvas.getContext('2d');\n if (context == null) {\n throw new Error('Failed to create 2D context for TextOverlay');\n }\n this.context = context;\n\n // Make sure 'this' is available even when these methods are passed as callbacks\n this.checkRender = this.checkRender.bind(this);\n this.invalidate = this.invalidate.bind(this);\n\n // Draw for the first time\n this.needsRerender = true;\n requestAnimationFrame(this.checkRender);\n }\n\n setTransformation(transformation: Matrix4x4) {\n this.transformation = transformation;\n this.invalidate();\n }\n\n setImage(image: Input) {\n this.image = image;\n this.invalidate();\n }\n\n /**\n * Force a new draw\n */\n invalidate() {\n this.needsRerender = true;\n }\n\n /**\n * Render loop, will draw when this component is invalidated with\n * this.needsRerender = true;\n * or when the size of the container changed\n */\n private checkRender() {\n if (this.resize() || this.needsRerender) {\n this.needsRerender = false;\n this.draw();\n }\n requestAnimationFrame(this.checkRender);\n }\n\n /**\n * Paint a new overlay\n */\n private draw() {\n const canvas = this.context.canvas;\n let leftTop = Vector4.fromValues(-1, 1, 0.0, 1.0);\n let rightBottom = Vector4.fromValues(1, -1, 0.0, 1.0);\n\n const mvMatrix = this.getViewMatrix();\n let invMvMatrix = Matrix4x4.create();\n Matrix4x4.invert(invMvMatrix, mvMatrix);\n\n const image = this.image;\n\n Vector4.transformMat4(leftTop, leftTop, invMvMatrix);\n Vector4.transformMat4(rightBottom, rightBottom, invMvMatrix);\n this.convertClipToRaster(leftTop, leftTop, image.width, image.height);\n this.convertClipToRaster(rightBottom, rightBottom, image.width, image.height);\n\n const px = Math.floor(leftTop.data[0]);\n const py = Math.floor(leftTop.data[1]);\n const qx = Math.floor(rightBottom.data[0]);\n const qy = Math.floor(rightBottom.data[1]);\n const lineHeight = Math.floor(20 * window.devicePixelRatio);\n const fontSize = Math.floor(16 * window.devicePixelRatio);\n const nx = canvas.width / (lineHeight * 3 + 2);\n const ny = canvas.height / (lineHeight * 3 + 2);\n\n this.context.clearRect(0, 0, canvas.width, canvas.height);\n\n if (image.type === 'Difference') {\n // We don't have access to computed values, so won't show the HUD\n return;\n }\n const zoomedInEnough = rightBottom.data[0] - leftTop.data[0] < nx && rightBottom.data[1] - leftTop.data[1] < ny;\n if (zoomedInEnough) {\n this.context.font = `${fontSize}px sans-serif`;\n for (let y = Math.max(0, py); y <= Math.min(image.height - 1, qy); y++) {\n for (let x = Math.max(0, px); x <= Math.min(image.width - 1, qx); x++) {\n Vector4.set(leftTop, x, y, 0.0, 1.0);\n this.convertRasterToClip(leftTop, leftTop, image.width, image.height);\n Vector4.transformMat4(leftTop, leftTop, mvMatrix);\n this.convertClipToRaster(leftTop, leftTop, canvas.width, canvas.height);\n let r, g, b;\n if (image.nChannels === 1) {\n r = getPixelColor(image, x, y, 0);\n this.context.fillStyle = '#888888';\n this.context.fillText(r.toFixed(4), leftTop.data[0], leftTop.data[1] + fontSize);\n } else {\n r = getPixelColor(image, x, y, 0);\n g = getPixelColor(image, x, y, 1);\n b = getPixelColor(image, x, y, 2);\n this.context.fillStyle = '#990000';\n this.context.fillText(r.toFixed(4), leftTop.data[0], leftTop.data[1] + fontSize);\n this.context.fillStyle = '#009900';\n this.context.fillText(g.toFixed(4), leftTop.data[0], leftTop.data[1] + fontSize + lineHeight);\n this.context.fillStyle = '#0000FF';\n this.context.fillText(b.toFixed(4), leftTop.data[0], leftTop.data[1] + fontSize + 2 * lineHeight);\n }\n }\n }\n }\n }\n\n /**\n * Convert coordinates from clip space to raster space\n * @param out coordinates in raster space (0, xres) x (0, yres)\n * @param a coordinates in clip space (-1,1) x (-1,1)\n * @param xres\n * @param yres\n */\n private convertClipToRaster(out: Vector4, a: Vector4, xres: number, yres: number) {\n out.data[0] = (a.data[0] + 1.0) * 0.5 * xres;\n out.data[1] = (1.0 - a.data[1]) * 0.5 * yres;\n return out;\n }\n\n /**\n * Convert coordinates from raster space to clip space\n * @param out coordinates in raster space (0, xres) x (0, yres)\n * @param a coordinates in clip space (-1,1) x (-1,1)\n * @param xres\n * @param yres\n */\n private convertRasterToClip(out: Vector4, a: Vector4, xres: number, yres: number) {\n out.data[0] = a.data[0] * 2.0 / xres - 1.0;\n out.data[1] = 1.0 - (a.data[1] * 2.0 / yres);\n return out;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/TextLayer.ts","import { Matrix4x4, Vector4 } from '../utils/linalg';\nimport Layer, { Input } from './Layer';\nconst normalizeWheel = require('normalize-wheel');\n\nconst SCROLL_FACTOR = 1.001;\n\n/**\n * Mouse Layer\n * @todo add some proper documentation\n */\nexport default class MouseLayer extends Layer {\n private pointCallback?: Function;\n private transformationCallback?: (t: Matrix4x4) => void;\n private panningState: null | { transformationAtStart: Matrix4x4, previousMouse: { x: number, y: number } } = null;\n private unsubscribeFunctions: Function[] = []; /** To be called on destruct */\n\n private enableMouseEvents: boolean;\n\n constructor(canvas: HTMLCanvasElement, image: Input, enableMouseEvents: boolean) {\n super(canvas, image);\n this.handleMouseMove = this.handleMouseMove.bind(this);\n this.handleMouseDown = this.handleMouseDown.bind(this);\n this.handleMouseUp = this.handleMouseUp.bind(this);\n this.handleScroll = this.handleScroll.bind(this);\n this.handlePointReporting = this.handlePointReporting.bind(this);\n\n this.enableMouseEvents = enableMouseEvents;\n\n // Subscribe to changes in the layers reactive inputs and window size\n let unsubscribe;\n document.addEventListener('mouseup', this.handleMouseUp);\n unsubscribe = document.removeEventListener.bind(document, 'mouseup', this.handleMouseUp);\n this.unsubscribeFunctions.push(unsubscribe);\n\n document.addEventListener('mousemove', this.handleMouseMove);\n unsubscribe = document.removeEventListener.bind(document, 'mousemove', this.handleMouseMove);\n this.unsubscribeFunctions.push(unsubscribe);\n\n canvas.addEventListener('wheel', this.handleScroll);\n unsubscribe = canvas.removeEventListener.bind(canvas, 'wheel', this.handleScroll);\n this.unsubscribeFunctions.push(unsubscribe);\n\n canvas.addEventListener('mousedown', this.handleMouseDown);\n unsubscribe = canvas.removeEventListener.bind(canvas, 'mousedown', this.handleMouseDown);\n this.unsubscribeFunctions.push(unsubscribe);\n\n canvas.addEventListener('mousemove', this.handlePointReporting);\n unsubscribe = canvas.removeEventListener.bind(canvas, 'mousemove', this.handlePointReporting);\n this.unsubscribeFunctions.push(unsubscribe);\n }\n\n setTransformation(transformation: Matrix4x4, broadcast: boolean = false) {\n this.transformation = transformation;\n if (broadcast && this.transformationCallback != null) {\n this.transformationCallback(transformation);\n }\n }\n\n setEnableMouseEvents(enable: boolean) {\n this.enableMouseEvents = enable;\n }\n\n onTransformationChange(callback?: (t: Matrix4x4) => void) {\n this.transformationCallback = callback;\n }\n\n setImage(image: Input) {\n this.image = image;\n }\n\n onPointAt(callback?: Function) {\n this.pointCallback = callback;\n }\n\n destruct() {\n this.unsubscribeFunctions.forEach(fn => fn());\n }\n\n private handleMouseMove(event: MouseEvent) {\n if (!this.enableMouseEvents) {\n return;\n }\n if (this.panningState) {\n const { x, y } = this.relativeMousePosition(event.clientX, event.clientY);\n const dx = x - this.panningState.previousMouse.x;\n const dy = y - this.panningState.previousMouse.y;\n const transformation = Matrix4x4.create();\n const aspect = this.getAspect();\n Matrix4x4.translate(transformation, transformation, [dx / aspect.x, dy / aspect.y, 0.0]);\n Matrix4x4.multiply(transformation, transformation, this.transformation);\n this.setTransformation(transformation, true);\n this.panningState.previousMouse = { x, y };\n }\n }\n\n private handleMouseUp(event: MouseEvent) {\n if (this.panningState) {\n this.panningState = null;\n }\n }\n\n private handleMouseDown(event: MouseEvent) {\n const mousePosition = this.relativeMousePosition(event.clientX, event.clientY);\n this.panningState = {\n transformationAtStart: Matrix4x4.clone(this.transformation),\n previousMouse: mousePosition,\n };\n }\n\n private handleScroll(event: WheelEvent) {\n if (!this.enableMouseEvents) {\n return;\n }\n event.preventDefault();\n const {pixelY} = normalizeWheel(event);\n const mouse = this.relativeMousePosition(event.clientX, event.clientY);\n const transformation = Matrix4x4.create();\n const deltaMatrix = Matrix4x4.create();\n const aspect = this.getAspect();\n Matrix4x4.translate(deltaMatrix, deltaMatrix, [mouse.x / aspect.x, mouse.y / aspect.y, 0.0]);\n const scaleFactor = Math.pow(SCROLL_FACTOR, pixelY);\n Matrix4x4.scale(deltaMatrix, deltaMatrix, [scaleFactor, scaleFactor, 1.0]);\n Matrix4x4.translate(deltaMatrix, deltaMatrix, [-mouse.x / aspect.x, -mouse.y / aspect.y, 0.0]);\n Matrix4x4.multiply(transformation, deltaMatrix, this.transformation);\n this.setTransformation(transformation, true);\n }\n\n /**\n * Event handler for reporting mouse movement.\n *\n * Only applicable when the options 'onPoint' property is set on this component.\n */\n private handlePointReporting(event: MouseEvent): void {\n if (this.pointCallback) {\n if (!this.panningState) {\n const { x, y } = this.relativeMousePosition(event.clientX, event.clientY);\n const imageCoordinates = this.canvasToImage(x, y);\n this.pointCallback(imageCoordinates.x, imageCoordinates.y);\n }\n }\n }\n\n /**\n * Translate clientX and clientY values to relative positions within the bounding box\n * of the viewer.\n */\n private relativeMousePosition(clientX: number, clientY: number): { x: number, y: number } {\n const { clientWidth, clientHeight } = this.canvas;\n const { left, top } = this.canvas.getBoundingClientRect();\n return {\n x: -1.0 + 2.0 * (clientX - left) / clientWidth,\n y: 1.0 - 2.0 * (clientY - top) / clientHeight,\n };\n }\n\n /**\n * Translate canvas coordinates to image coodrinates\n */\n private canvasToImage(x: number, y: number): { x: number, y: number } {\n const point = Vector4.create();\n Vector4.set(point, x, y, 1.0, 1.0);\n const inverseViewMatrix = Matrix4x4.create();\n const viewMatrix = this.getViewMatrix();\n Matrix4x4.invert(inverseViewMatrix, viewMatrix);\n Vector4.transformMat4(point, point, inverseViewMatrix);\n return { x: point.data[0], y: point.data[1] };\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/MouseLayer.ts","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/node_modules/fbjs/lib/warning.js\n// module id = 13\n// module chunks = 0 1","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport ImageFrame from './components/ImageFrame';\nimport ImageViewer, { InputTree } from './components/ImageViewer';\nimport ImageLayer from './layers/ImageLayer';\nimport TextLayer from './layers/TextLayer';\nimport MouseLayer from './layers/MouseLayer';\nimport { loadImage, ImageCache } from './utils/image-loading';\nimport { Matrix4x4, Vector4 } from './utils/linalg';\n\nexport {\n loadImage,\n ImageCache,\n ImageFrame,\n ImageLayer,\n ImageViewer,\n TextLayer,\n MouseLayer,\n Matrix4x4,\n Vector4\n};\n\nexport function renderViewer(\n elem: HTMLElement,\n data: InputTree,\n baseUrl: string = ''\n) {\n const component = (\n <ImageViewer\n data={data}\n baseUrl={baseUrl}\n sortMenu={false}\n removeCommonPrefix={false}\n />\n );\n return ReactDOM.render(component, elem);\n}\n\nexport default ImageViewer;\n\n\n\n// WEBPACK FOOTER //\n// ./src/jeri.tsx","module.exports = __WEBPACK_EXTERNAL_MODULE_15__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\",\"umd\":\"react-dom\"}\n// module id = 15\n// module chunks = 0 1","export type FunctionType<I, O> = (input: I) => O;\n\nexport default function cachedFunction<I, O>(f: FunctionType<I, O>): FunctionType<I, O> {\n const cachedValues: Map<I, O> = new Map();\n\n return (input: I) => {\n const cachedResult = cachedValues.get(input);\n if (cachedResult) {\n return cachedResult;\n } else {\n const output = f(input);\n cachedValues.set(input, output);\n return output;\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/cached-function.ts","module.exports = function() {\n return new Worker(__webpack_public_path__ + \"exr.worker.js\");\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/worker-loader/dist/cjs.js?name=exr.worker.js!./build_npm/utils/exr-parser.worker.js\n// module id = 17\n// module chunks = 0 1","module.exports = require('./src/normalizeWheel.js');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/normalize-wheel/index.js\n// module id = 18\n// module chunks = 0 1","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\n'use strict';\n\nvar UserAgent_DEPRECATED = require('./UserAgent_DEPRECATED');\n\nvar isEventSupported = require('./isEventSupported');\n\n\n// Reasonable defaults\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) { sY = event.detail; }\n if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }\n if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }\n if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }\n\n // side scrolling on FF with DOMMouseScroll\n if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) { pY = event.deltaY; }\n if ('deltaX' in event) { pX = event.deltaX; }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }\n if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }\n\n return { spinX : sX,\n spinY : sY,\n pixelX : pX,\n pixelY : pY };\n}\n\n\n/**\n * The best combination if you prefer spinX + spinY normalization. It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function() /*string*/ {\n return (UserAgent_DEPRECATED.firefox())\n ? 'DOMMouseScroll'\n : (isEventSupported('wheel'))\n ? 'wheel'\n : 'mousewheel';\n};\n\nmodule.exports = normalizeWheel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/normalize-wheel/src/normalizeWheel.js\n// module id = 19\n// module chunks = 0 1","/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n * Provides entirely client-side User Agent and OS detection. You should prefer\n * the non-deprecated UserAgent module when possible, which exposes our\n * authoritative server-side PHP-based detection to the client.\n *\n * Usage is straightforward:\n *\n * if (UserAgent_DEPRECATED.ie()) {\n * // IE\n * }\n *\n * You can also do version checks:\n *\n * if (UserAgent_DEPRECATED.ie() >= 7) {\n * // IE7 or better\n * }\n *\n * The browser functions will return NaN if the browser does not match, so\n * you can also do version compares the other way:\n *\n * if (UserAgent_DEPRECATED.ie() < 7) {\n * // IE6 or worse\n * }\n *\n * Note that the version is a float and may include a minor version number,\n * so you should always use range operators to perform comparisons, not\n * strict equality.\n *\n * **Note:** You should **strongly** prefer capability detection to browser\n * version detection where it's reasonable:\n *\n * http://www.quirksmode.org/js/support.html\n *\n * Further, we have a large number of mature wrapper functions and classes\n * which abstract away many browser irregularities. Check the documentation,\n * grep for things, or ask on [email protected] before writing yet\n * another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n if (_populated) {\n return;\n }\n\n _populated = true;\n\n // To work around buggy JS libraries that can't handle multi-digit\n // version numbers, Opera 10's user agent string claims it's Opera\n // 9, then later includes a Version/X.Y field:\n //\n // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n var uas = navigator.userAgent;\n var agent = /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(uas);\n var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n _ipad = /\\b(iP[ao]d)/.exec(uas);\n _android = /Android/i.exec(uas);\n _native = /FBAN\\/\\w+;/i.exec(uas);\n _mobile = /Mobile/i.exec(uas);\n\n // Note that the IE team blog would have you believe you should be checking\n // for 'Win64; x64'. But MSDN then reveals that you can actually be coming\n // from either x64 or ia64; so ultimately, you should just check for Win64\n // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit\n // Windows will send 'WOW64' instead.\n _win64 = !!(/Win64/.exec(uas));\n\n if (agent) {\n _ie = agent[1] ? parseFloat(agent[1]) : (\n agent[5] ? parseFloat(agent[5]) : NaN);\n // IE compatibility mode\n if (_ie && document && document.documentMode) {\n _ie = document.documentMode;\n }\n // grab the \"true\" ie version from the trident token if available\n var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n _opera = agent[3] ? parseFloat(agent[3]) : NaN;\n _webkit = agent[4] ? parseFloat(agent[4]) : NaN;\n if (_webkit) {\n // We do not add the regexp to the above test, because it will always\n // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n // the userAgent string.\n agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n } else {\n _chrome = NaN;\n }\n } else {\n _ie = _firefox = _opera = _chrome = _webkit = NaN;\n }\n\n if (os) {\n if (os[1]) {\n // Detect OS X version. If no version number matches, set _osx to true.\n // Version examples: 10, 10_6_1, 10.7\n // Parses version number as a float, taking only first two sets of\n // digits. If only one set of digits is found, returns just the major\n // version number.\n var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n } else {\n _osx = false;\n }\n _windows = !!os[2];\n _linux = !!os[3];\n } else {\n _osx = _windows = _linux = false;\n }\n}\n\nvar UserAgent_DEPRECATED = {\n\n /**\n * Check if the UA is Internet Explorer.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n ie: function() {\n return _populate() || _ie;\n },\n\n /**\n * Check if we're in Internet Explorer compatibility mode.\n *\n * @return bool true if in compatibility mode, false if\n * not compatibility mode or not ie\n */\n ieCompatibilityMode: function() {\n return _populate() || (_ie_real_version > _ie);\n },\n\n\n /**\n * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we\n * only need this because Skype can't handle 64-bit IE yet. We need to remove\n * this when we don't need it -- tracked by #601957.\n */\n ie64: function() {\n return UserAgent_DEPRECATED.ie() && _win64;\n },\n\n /**\n * Check if the UA is Firefox.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n firefox: function() {\n return _populate() || _firefox;\n },\n\n\n /**\n * Check if the UA is Opera.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n opera: function() {\n return _populate() || _opera;\n },\n\n\n /**\n * Check if the UA is WebKit.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n webkit: function() {\n return _populate() || _webkit;\n },\n\n /**\n * For Push\n * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n */\n safari: function() {\n return UserAgent_DEPRECATED.webkit();\n },\n\n /**\n * Check if the UA is a Chrome browser.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n chrome : function() {\n return _populate() || _chrome;\n },\n\n\n /**\n * Check if the user is running Windows.\n *\n * @return bool `true' if the user's OS is Windows.\n */\n windows: function() {\n return _populate() || _windows;\n },\n\n\n /**\n * Check if the user is running Mac OS X.\n *\n * @return float|bool Returns a float if a version number is detected,\n * otherwise true/false.\n */\n osx: function() {\n return _populate() || _osx;\n },\n\n /**\n * Check if the user is running Linux.\n *\n * @return bool `true' if the user's OS is some flavor of Linux.\n */\n linux: function() {\n return _populate() || _linux;\n },\n\n /**\n * Check if the user is running on an iPhone or iPod platform.\n *\n * @return bool `true' if the user is running some flavor of the\n * iPhone OS.\n */\n iphone: function() {\n return _populate() || _iphone;\n },\n\n mobile: function() {\n return _populate() || (_iphone || _ipad || _android || _mobile);\n },\n\n nativeApp: function() {\n // webviews inside of the native apps\n return _populate() || _native;\n },\n\n android: function() {\n return _populate() || _android;\n },\n\n ipad: function() {\n return _populate() || _ipad;\n }\n};\n\nmodule.exports = UserAgent_DEPRECATED;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js\n// module id = 20\n// module chunks = 0 1","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature =\n document.implementation &&\n document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM ||\n capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nmodule.exports = isEventSupported;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/normalize-wheel/src/isEventSupported.js\n// module id = 21\n// module chunks = 0 1","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\n'use strict';\n\nvar canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners:\n canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/normalize-wheel/src/ExecutionEnvironment.js\n// module id = 22\n// module chunks = 0 1","/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar isObject = require('isobject');\n\nfunction isObjectObject(o) {\n return isObject(o) === true\n && Object.prototype.toString.call(o) === '[object Object]';\n}\n\nmodule.exports = function isPlainObject(o) {\n var ctor,prot;\n\n if (isObjectObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (typeof ctor !== 'function') return false;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObjectObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/is-plain-object/index.js\n// module id = 23\n// module chunks = 0 1","/*!\n * isobject <https://github.com/jonschlinkert/isobject>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/isobject/index.js\n// module id = 24\n// module chunks = 0 1","/*\n * __ ___\n * _____/ /___ __/ (_)____\n * / ___/ __/ / / / / / ___/\n * (__ ) /_/ /_/ / / (__ )\n * /____/\\__/\\__, /_/_/____/\n * /____/\n *\n * light - weight css preprocessor @licence MIT\n */\n/* eslint-disable */\n(function (factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? (module['exports'] = factory(null)) :\n\t\ttypeof define === 'function' && define['amd'] ? define(factory(null)) :\n\t\t\t(window['stylis'] = factory(null))\n}(/** @param {*=} options */function factory (options) {\n\n\t'use strict'\n\n\t/**\n\t * Notes\n\t *\n\t * The ['<method name>'] pattern is used to support closure compiler\n\t * the jsdoc signatures are also used to the same effect\n\t *\n\t * ---- \n\t *\n\t * int + int + int === n4 [faster]\n\t *\n\t * vs\n\t *\n\t * int === n1 && int === n2 && int === n3\n\t *\n\t * ----\n\t *\n\t * switch (int) { case ints...} [faster]\n\t *\n\t * vs\n\t *\n\t * if (int == 1 && int === 2 ...)\n\t *\n\t * ----\n\t *\n\t * The (first*n1 + second*n2 + third*n3) format used in the property parser\n\t * is a simple way to hash the sequence of characters\n\t * taking into account the index they occur in\n\t * since any number of 3 character sequences could produce duplicates.\n\t *\n\t * On the other hand sequences that are directly tied to the index of the character\n\t * resolve a far more accurate measure, it's also faster\n\t * to evaluate one condition in a switch statement\n\t * than three in an if statement regardless of the added math.\n\t *\n\t * This allows the vendor prefixer to be both small and fast.\n\t */\n\n\tvar nullptn = /^\\0+/g /* matches leading null characters */\n\tvar formatptn = /[\\0\\r\\f]/g /* matches new line, null and formfeed characters */\n\tvar colonptn = /: */g /* splits animation rules */\n\tvar cursorptn = /zoo|gra/ /* assert cursor varient */\n\tvar transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */\n\tvar animationptn = /,+\\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */\n\tvar propertiesptn = / +\\s*(?![^(]*[)])/g /* animation properties */\n\tvar elementptn = / *[\\0] */g /* selector elements */\n\tvar selectorptn = /,\\r+?/g /* splits selectors */\n\tvar andptn = /([\\t\\r\\n ])*\\f?&/g /* match & */\n\tvar escapeptn = /:global\\(((?:[^\\(\\)\\[\\]]*|\\[.*\\]|\\([^\\(\\)]*\\))*)\\)/g /* matches :global(.*) */\n\tvar invalidptn = /\\W+/g /* removes invalid characters from keyframes */\n\tvar keyframeptn = /@(k\\w+)\\s*(\\S*)\\s*/ /* matches @keyframes $1 */\n\tvar plcholdrptn = /::(place)/g /* match ::placeholder varient */\n\tvar readonlyptn = /:(read-only)/g /* match :read-only varient */\n\tvar beforeptn = /\\s+(?=[{\\];=:>])/g /* matches \\s before ] ; = : */\n\tvar afterptn = /([[}=:>])\\s+/g /* matches \\s after characters [ } = : */\n\tvar tailptn = /(\\{[^{]+?);(?=\\})/g /* matches tail semi-colons ;} */\n\tvar whiteptn = /\\s{2,}/g /* matches repeating whitespace */\n\tvar pseudoptn = /([^\\(])(:+) */g /* pseudo element */\n\tvar writingptn = /[svh]\\w+-[tblr]{2}/ /* match writing mode property values */\n\n\t/* vendors */\n\tvar webkit = '-webkit-'\n\tvar moz = '-moz-'\n\tvar ms = '-ms-'\n\n\t/* character codes */\n\tvar SEMICOLON = 59 /* ; */\n\tvar CLOSEBRACES = 125 /* } */\n\tvar OPENBRACES = 123 /* { */\n\tvar OPENPARENTHESES = 40 /* ( */\n\tvar CLOSEPARENTHESES = 41 /* ) */\n\tvar OPENBRACKET = 91 /* [ */\n\tvar CLOSEBRACKET = 93 /* ] */\n\tvar NEWLINE = 10 /* \\n */\n\tvar CARRIAGE = 13 /* \\r */\n\tvar TAB = 9 /* \\t */\n\tvar AT = 64 /* @ */\n\tvar SPACE = 32 /* */\n\tvar AND = 38 /* & */\n\tvar DASH = 45 /* - */\n\tvar UNDERSCORE = 95 /* _ */\n\tvar STAR = 42 /* * */\n\tvar COMMA = 44 /* , */\n\tvar COLON = 58 /* : */\n\tvar SINGLEQUOTE = 39 /* ' */\n\tvar DOUBLEQUOTE = 34 /* \" */\n\tvar FOWARDSLASH = 47 /* / */\n\tvar GREATERTHAN = 62 /* > */\n\tvar PLUS = 43 /* + */\n\tvar TILDE = 126 /* ~ */\n\tvar NULL = 0 /* \\0 */\n\tvar FORMFEED = 12 /* \\f */\n\tvar VERTICALTAB = 11 /* \\v */\n\n\t/* special identifiers */\n\tvar KEYFRAME = 107 /* k */\n\tvar MEDIA = 109 /* m */\n\tvar SUPPORTS = 115 /* s */\n\tvar PLACEHOLDER = 112 /* p */\n\tvar READONLY = 111 /* o */\n\tvar IMPORT = 169 /* <at>i */\n\tvar CHARSET = 163 /* <at>c */\n\tvar DOCUMENT = 100 /* <at>d */\n\n\tvar column = 1 /* current column */\n\tvar line = 1 /* current line numebr */\n\tvar pattern = 0 /* :pattern */\n\n\tvar cascade = 1 /* #id h1 h2 vs h1#id h2#id */\n\tvar vendor = 1 /* vendor prefix */\n\tvar escape = 1 /* escape :global() pattern */\n\tvar compress = 0 /* compress output */\n\tvar semicolon = 0 /* no/semicolon option */\n\tvar preserve = 0 /* preserve empty selectors */\n\n\t/* empty reference */\n\tvar array = []\n\n\t/* plugins */\n\tvar plugins = []\n\tvar plugged = 0\n\n\t/* plugin context */\n\tvar POSTS = -2\n\tvar PREPS = -1\n\tvar UNKWN = 0\n\tvar PROPS = 1\n\tvar BLCKS = 2\n\tvar ATRUL = 3\n\n\t/* plugin newline context */\n\tvar unkwn = 0\n\n\t/* keyframe animation */\n\tvar keyed = 1\n\tvar key = ''\n\n\t/* selector namespace */\n\tvar nscopealt = ''\n\tvar nscope = ''\n\n\t/**\n\t * Compile\n\t *\n\t * @param {Array<string>} parent\n\t * @param {Array<string>} current\n\t * @param {string} body\n\t * @param {number} id\n\t * @return {string}\n\t */\n\tfunction compile (parent, current, body, id) {\n\t\tvar bracket = 0 /* brackets [] */\n\t\tvar comment = 0 /* comments /* // or /* */\n\t\tvar parentheses = 0 /* functions () */\n\t\tvar quote = 0 /* quotes '', \"\" */\n\n\t\tvar first = 0 /* first character code */\n\t\tvar second = 0 /* second character code */\n\t\tvar code = 0 /* current character code */\n\t\tvar tail = 0 /* previous character code */\n\t\tvar trail = 0 /* character before previous code */\n\t\tvar peak = 0 /* previous non-whitespace code */\n\t\t\n\t\tvar counter = 0 /* count sequence termination */\n\t\tvar context = 0 /* track current context */\n\t\tvar atrule = 0 /* track @at-rule context */\n\t\tvar pseudo = 0 /* track pseudo token index */\n\t\tvar caret = 0 /* current character index */\n\t\tvar format = 0 /* control character formating context */\n\t\tvar insert = 0 /* auto semicolon insertion */\n\t\tvar invert = 0 /* inverted selector pattern */\n\t\tvar length = 0 /* generic length address */\n\t\tvar eof = body.length /* end of file(length) */\n\t\tvar eol = eof - 1 /* end of file(characters) */\n\n\t\tvar char = '' /* current character */\n\t\tvar chars = '' /* current buffer of characters */\n\t\tvar child = '' /* next buffer of characters */\n\t\tvar out = '' /* compiled body */\n\t\tvar children = '' /* compiled children */\n\t\tvar flat = '' /* compiled leafs */\n\t\tvar selector /* generic selector address */\n\t\tvar result /* generic address */\n\n\t\t// ...build body\n\t\twhile (caret < eof) {\n\t\t\tcode = body.charCodeAt(caret)\n\n\t\t\tif (comment + quote + parentheses + bracket === 0) {\n\t\t\t\t// eof varient\n\t\t\t\tif (caret === eol) {\n\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\tchars = chars.replace(formatptn, '')\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((chars = chars.trim()).length > 0) {\n\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\t\tcase NEWLINE: {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchars += body.charAt(caret)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcode = SEMICOLON\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// auto semicolon insertion\n\t\t\t\tif (insert === 1) {\n\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t// false flags\n\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// valid\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tcaret--\n\t\t\t\t\t\t\tcode = SEMICOLON\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// token varient\n\t\t\t\tswitch (code) {\n\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\tchars = chars.trim()\n\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\t\t\t\t\t\tcounter = 1\n\t\t\t\t\t\tcaret++\n\n\t\t\t\t\t\twhile (caret < eof) {\n\t\t\t\t\t\t\tcode = body.charCodeAt(caret)\n\n\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\t\t\t\tcounter++\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\t\t\t\t\tcounter--\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (counter === 0) {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tchild += body.charAt(caret++)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (first === NULL) {\n\t\t\t\t\t\t\tfirst = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (first) {\n\t\t\t\t\t\t\t// @at-rule\n\t\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\t\t\t\tchars = chars.replace(formatptn, '')\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsecond = chars.charCodeAt(1)\n\n\t\t\t\t\t\t\t\tswitch (second) {\n\t\t\t\t\t\t\t\t\tcase DOCUMENT:\n\t\t\t\t\t\t\t\t\tcase MEDIA:\n\t\t\t\t\t\t\t\t\tcase SUPPORTS: {\n\t\t\t\t\t\t\t\t\t\tselector = current\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\tselector = array\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tchild = compile(current, selector, child, second)\n\t\t\t\t\t\t\t\tlength = child.length\n\n\t\t\t\t\t\t\t\t// preserve empty @at-rule\n\t\t\t\t\t\t\t\tif (preserve > 0 && length === 0) {\n\t\t\t\t\t\t\t\t\tlength = chars.length\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// execute plugins, @at-rule context\n\t\t\t\t\t\t\t\tif (plugged > 0) {\n\t\t\t\t\t\t\t\t\tselector = select(array, chars, invert)\n\t\t\t\t\t\t\t\t\tresult = proxy(ATRUL, child, selector, current, line, column, length, second)\n\t\t\t\t\t\t\t\t\tchars = selector.join('')\n\n\t\t\t\t\t\t\t\t\tif (result !== void 0) {\n\t\t\t\t\t\t\t\t\t\tif ((length = (child = result.trim()).length) === 0) {\n\t\t\t\t\t\t\t\t\t\t\tsecond = 0\n\t\t\t\t\t\t\t\t\t\t\tchild = ''\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}\n\n\t\t\t\t\t\t\t\tif (length > 0) {\n\t\t\t\t\t\t\t\t\tswitch (second) {\n\t\t\t\t\t\t\t\t\t\tcase DOCUMENT:\n\t\t\t\t\t\t\t\t\t\tcase MEDIA:\n\t\t\t\t\t\t\t\t\t\tcase SUPPORTS: {\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + '{' + child + '}'\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase KEYFRAME: {\n\t\t\t\t\t\t\t\t\t\t\tchars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : ''))\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + '{' + child + '}'\n\t\t\t\t\t\t\t\t\t\t\tchild = '@' + (vendor > 0 ? webkit + child + '@' + child : child)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + child\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} else {\n\t\t\t\t\t\t\t\t\tchild = ''\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// selector\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchild = compile(current, select(current, chars, invert), child, id)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tchildren += child\n\n\t\t\t\t\t\t// reset\n\t\t\t\t\t\tcontext = 0\n\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\tformat = 0\n\t\t\t\t\t\tinvert = 0\n\t\t\t\t\t\tatrule = 0\n\t\t\t\t\t\tchars = ''\n\t\t\t\t\t\tchild = ''\n\n\t\t\t\t\t\tcode = body.charCodeAt(++caret)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\tcase SEMICOLON: {\n\t\t\t\t\t\tchars = (format > 0 ? chars.replace(formatptn, '') : chars).trim()\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (code !== CLOSEBRACES || chars.length > 0) {\n\t\t\t\t\t\t\t// monkey-patch missing colon\n\t\t\t\t\t\t\tif (pseudo === 0) {\n\t\t\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\n\t\t\t\t\t\t\t\t// first character is a letter or dash, buffer has a space character\n\t\t\t\t\t\t\t\tif ((first === DASH || first > 96 && first < 123) && chars.indexOf(' ')) {\n\t\t\t\t\t\t\t\t\tchars = chars.replace(' ', ': ')\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// execute plugins, property context\n\t\t\t\t\t\t\tif (plugged > 0) {\n\t\t\t\t\t\t\t\tif ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id)) !== void 0) {\n\t\t\t\t\t\t\t\t\tif ((chars = result.trim()).length === 0) {\n\t\t\t\t\t\t\t\t\t\tchars = '\\0\\0'\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\n\t\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\t\t\t\t\t\t\tsecond = chars.charCodeAt(1)\n\n\t\t\t\t\t\t\tswitch (first + second) {\n\t\t\t\t\t\t\t\tcase NULL: {\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase IMPORT:\n\t\t\t\t\t\t\t\tcase CHARSET: {\n\t\t\t\t\t\t\t\t\tflat += chars + body.charAt(caret)\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\tout += pseudo > 0 ? property(chars, first, second, chars.charCodeAt(2)) : chars + ';'\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\n\t\t\t\t\t\t// reset\n\t\t\t\t\t\tcontext = 0\n\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\tformat = 0\n\t\t\t\t\t\tinvert = 0\n\t\t\t\t\t\tchars = ''\n\n\t\t\t\t\t\tcaret++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// parse characters\n\t\t\tswitch (code) {\n\t\t\t\tcase CARRIAGE:\n\t\t\t\tcase NEWLINE: {\n\t\t\t\t\t// auto insert semicolon\n\t\t\t\t\tif (comment + quote + parentheses + bracket + semicolon === 0) {\n\t\t\t\t\t\t// valid non-whitespace characters that\n\t\t\t\t\t\t// may precede a newline\n\t\t\t\t\t\tswitch (peak) {\n\t\t\t\t\t\t\tcase AT:\n\t\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t\tcase FOWARDSLASH:\n\t\t\t\t\t\t\tcase DASH:\n\t\t\t\t\t\t\tcase COLON:\n\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t// current buffer has a colon\n\t\t\t\t\t\t\t\tif (pseudo > 0) {\n\t\t\t\t\t\t\t\t\tinsert = 1\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}\n\n\t\t\t\t\t// terminate line comment\n\t\t\t\t\tif (comment === FOWARDSLASH) {\n\t\t\t\t\t\tcomment = 0\n\t\t\t\t\t}\n\n\t\t\t\t\t// execute plugins, newline context\n\t\t\t\t\tif (plugged * unkwn > 0) {\n\t\t\t\t\t\tproxy(UNKWN, chars, current, parent, line, column, out.length, id)\n\t\t\t\t\t}\n\n\t\t\t\t\t// next line, reset column position\n\t\t\t\t\tcolumn = 1\n\t\t\t\t\tline++\n\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\t// increment column position\n\t\t\t\t\tcolumn++\n\n\t\t\t\t\t// current character\n\t\t\t\t\tchar = body.charAt(caret)\n\n\t\t\t\t\tif (code === TAB && quote === 0) {\n\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\t\tchar = ''\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchar = parentheses === 0 ? '' : ' '\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t// remove comments, escape functions, strings, attributes and prepare selectors\n\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t// escape breaking control characters\n\t\t\t\t\t\tcase NULL: {\n\t\t\t\t\t\t\tchar = '\\\\0'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase FORMFEED: {\n\t\t\t\t\t\t\tchar = '\\\\f'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase VERTICALTAB: {\n\t\t\t\t\t\t\tchar = '\\\\v'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// &\n\t\t\t\t\t\tcase AND: {\n\t\t\t\t\t\t\t// inverted selector pattern i.e html &\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0 && cascade > 0) {\n\t\t\t\t\t\t\t\tinvert = 1\n\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\tchar = '\\f' + char\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ::p<l>aceholder, l\n\t\t\t\t\t\t// :read-on<l>y, l\n\t\t\t\t\t\tcase 108: {\n\t\t\t\t\t\t\tif (quote + comment + bracket + pattern === 0 && pseudo > 0) {\n\t\t\t\t\t\t\t\tswitch (caret - pseudo) {\n\t\t\t\t\t\t\t\t\t// ::placeholder\n\t\t\t\t\t\t\t\t\tcase 2: {\n\t\t\t\t\t\t\t\t\t\tif (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) {\n\t\t\t\t\t\t\t\t\t\t\tpattern = tail\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// :read-only\n\t\t\t\t\t\t\t\t\tcase 8: {\n\t\t\t\t\t\t\t\t\t\tif (trail === READONLY) {\n\t\t\t\t\t\t\t\t\t\t\tpattern = trail\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}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// :<pattern>\n\t\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tpseudo = caret\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// selectors\n\t\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\t\tif (comment + parentheses + quote + bracket === 0) {\n\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\tchar += '\\r'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// quotes\n\t\t\t\t\t\tcase DOUBLEQUOTE: {\n\t\t\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t\t\tquote = quote === code ? 0 : (quote === 0 ? code : quote)\n\t\t\t\t\t\t\t\t// \" last character, add synthetic padding\n\t\t\t\t\t\t\t\tif (caret === eol) {\n\t\t\t\t\t\t\t\t\teol++\n\t\t\t\t\t\t\t\t\teof++\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase SINGLEQUOTE: {\n\t\t\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t\t\tquote = quote === code ? 0 : (quote === 0 ? code : quote)\n\t\t\t\t\t\t\t\t// ' last character, add synthetic padding\n\t\t\t\t\t\t\t\tif (caret === eol) {\n\t\t\t\t\t\t\t\t\teol++\n\t\t\t\t\t\t\t\t\teof++\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// attributes\n\t\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\t\tif (quote + comment + parentheses === 0) {\n\t\t\t\t\t\t\t\tbracket++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase CLOSEBRACKET: {\n\t\t\t\t\t\t\tif (quote + comment + parentheses === 0) {\n\t\t\t\t\t\t\t\tbracket--\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// functions\n\t\t\t\t\t\tcase CLOSEPARENTHESES: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\t// ) last character, add synthetic padding\n\t\t\t\t\t\t\t\tif (caret === eol) {\n\t\t\t\t\t\t\t\t\teol++\n\t\t\t\t\t\t\t\t\teof++\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tparentheses--\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\tswitch (tail*2 + trail*3) {\n\t\t\t\t\t\t\t\t\t\t// :matches\n\t\t\t\t\t\t\t\t\t\tcase 533: {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// :global, :not, :nth-child etc...\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tcounter = 0\n\t\t\t\t\t\t\t\t\t\t\tcontext = 1\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}\n\n\t\t\t\t\t\t\t\tparentheses++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\tif (comment + parentheses + quote + bracket + pseudo + atrule === 0) {\n\t\t\t\t\t\t\t\tatrule = 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// block/line comments\n\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\tcase FOWARDSLASH: {\n\t\t\t\t\t\t\tif (quote + bracket + parentheses > 0) {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch (comment) {\n\t\t\t\t\t\t\t\t// initialize line/block comment context\n\t\t\t\t\t\t\t\tcase 0: {\n\t\t\t\t\t\t\t\t\tswitch (code*2 + body.charCodeAt(caret+1)*3) {\n\t\t\t\t\t\t\t\t\t\t// //\n\t\t\t\t\t\t\t\t\t\tcase 235: {\n\t\t\t\t\t\t\t\t\t\t\tcomment = FOWARDSLASH\n\t\t\t\t\t\t\t\t\t\t\tbreak\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\tcase 220: {\n\t\t\t\t\t\t\t\t\t\t\tcomment = STAR\n\t\t\t\t\t\t\t\t\t\t\tbreak\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\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// end block comment context\n\t\t\t\t\t\t\t\tcase STAR: {\n\t\t\t\t\t\t\t\t\tif (code === FOWARDSLASH && tail === STAR) {\n\t\t\t\t\t\t\t\t\t\tchar = ''\n\t\t\t\t\t\t\t\t\t\tcomment = 0\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}\n\n\t\t\t\t\t// ignore comment blocks\n\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t// aggressive isolation mode, divide each individual selector\n\t\t\t\t\t\t// including selectors in :not function but excluding selectors in :global function\n\t\t\t\t\t\tif (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) {\n\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\t\t// outside of an isolated context i.e nth-child(<...>)\n\t\t\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\t\t\tcase CARRIAGE: {\n\t\t\t\t\t\t\t\t\t\t\t\tchar = char + '\\0'\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\t\tchar = '\\0' + char + (code === COMMA ? '' : '\\0')\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\tformat = 1\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// within an isolated context, sleep untill it's terminated\n\t\t\t\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\t\t\t\tcontext = ++counter\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcase CLOSEPARENTHESES: {\n\t\t\t\t\t\t\t\t\t\t\t\tif ((context = --counter) === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t\t\t\t\tchar += '\\0'\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\tbreak\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}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\t\tcase NULL:\n\t\t\t\t\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\t\t\tcase FORMFEED:\n\t\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\t\tcase CARRIAGE: {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\t// ignore in isolated contexts\n\t\t\t\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t\t\t\tchar += '\\0'\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}\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\n\t\t\t\t\t\t// concat buffer of characters\n\t\t\t\t\t\tchars += char\n\n\t\t\t\t\t\t// previous non-whitespace character code\n\t\t\t\t\t\tif (code !== SPACE) {\n\t\t\t\t\t\t\tpeak = code\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// tail character codes\n\t\t\ttrail = tail\n\t\t\ttail = code\n\n\t\t\t// visit every character\n\t\t\tcaret++\n\t\t}\n\n\t\tlength = out.length\n\n\t\t// preserve empty selector\n \t\tif (preserve > 0) {\n \t\t\tif (length === 0 && children.length === 0 && (current[0].length === 0) === false) {\n \t\t\t\tif (id !== MEDIA || (current.length === 1 && (cascade > 0 ? nscopealt : nscope) === current[0])) {\n\t\t\t\t\tlength = current.join(',').length + 2 \t\t\t\t\t\n \t\t\t\t}\n \t\t\t}\n\t\t}\n\n\t\tif (length > 0) {\n\t\t\t// cascade isolation mode\n\t\t\tif (cascade === 0 && id !== KEYFRAME) {\n\t\t\t\tisolate(current)\n\t\t\t}\n\n\t\t\t// execute plugins, block context\n\t\t\tif (plugged > 0) {\n\t\t\t\tresult = proxy(BLCKS, out, current, parent, line, column, length, id)\n\n\t\t\t\tif (result !== void 0 && (out = result).length === 0) {\n\t\t\t\t\treturn flat + out + children\n\t\t\t\t}\n\t\t\t}\t\t\n\n\t\t\tout = current.join(',') + '{' + out + '}'\n\n\t\t\tif (vendor*pattern > 0) {\n\t\t\t\tswitch (pattern) {\n\t\t\t\t\t// ::read-only\n\t\t\t\t\tcase READONLY: {\n\t\t\t\t\t\tout = out.replace(readonlyptn, ':'+moz+'$1')+out\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// ::placeholder\n\t\t\t\t\tcase PLACEHOLDER: {\n\t\t\t\t\t\tout = (\n\t\t\t\t\t\t\tout.replace(plcholdrptn, '::' + webkit + 'input-$1') +\n\t\t\t\t\t\t\tout.replace(plcholdrptn, '::' + moz + '$1') +\n\t\t\t\t\t\t\tout.replace(plcholdrptn, ':' + ms + 'input-$1') + out\n\t\t\t\t\t\t)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpattern = 0\n\t\t\t}\n\t\t}\n\n\t\treturn flat + out + children\n\t}\n\n\t/**\n\t * Select\n\t *\n\t * @param {Array<string>} parent\n\t * @param {string} current\n\t * @param {number} invert\n\t * @return {Array<string>}\n\t */\n\tfunction select (parent, current, invert) {\n\t\tvar selectors = current.trim().split(selectorptn)\n\t\tvar out = selectors\n\n\t\tvar length = selectors.length\n\t\tvar l = parent.length\n\n\t\tswitch (l) {\n\t\t\t// 0-1 parent selectors\n\t\t\tcase 0:\n\t\t\tcase 1: {\n\t\t\t\tfor (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; i++) {\n\t\t\t\t\tout[i] = scope(selector, out[i], invert, l).trim()\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// >2 parent selectors, nested\n\t\t\tdefault: {\n\t\t\t\tfor (var i = 0, j = 0, out = []; i < length; i++) {\n\t\t\t\t\tfor (var k = 0; k < l; k++) {\n\t\t\t\t\t\tout[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Scope\n\t *\n\t * @param {string} parent\n\t * @param {string} current\n\t * @param {number} invert\n\t * @param {number} level\n\t * @return {string}\n\t */\n\tfunction scope (parent, current, invert, level) {\n\t\tvar selector = current\n\t\tvar code = selector.charCodeAt(0)\n\n\t\t// trim leading whitespace\n\t\tif (code < 33) {\n\t\t\tcode = (selector = selector.trim()).charCodeAt(0)\n\t\t}\n\n\t\tswitch (code) {\n\t\t\t// &\n\t\t\tcase AND: {\n\t\t\t\tswitch (cascade + level) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1: {\n\t\t\t\t\t\tif (parent.trim().length === 0) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn selector.replace(andptn, '$1'+parent.trim())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// :\n\t\t\tcase COLON: {\n\t\t\t\tswitch (selector.charCodeAt(1)) {\n\t\t\t\t\t// g in :global\n\t\t\t\t\tcase 103: {\n\t\t\t\t\t\tif (escape > 0 && cascade > 0) {\n\t\t\t\t\t\t\treturn selector.replace(escapeptn, '$1').replace(andptn, '$1'+nscope)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\t// :hover\n\t\t\t\t\t\treturn parent.trim() + selector\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\t// html &\n\t\t\t\tif (invert*cascade > 0 && selector.indexOf('\\f') > 0) {\n\t\t\t\t\treturn selector.replace(andptn, (parent.charCodeAt(0) === COLON ? '' : '$1')+parent.trim())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn parent + selector\n\t}\n\n\t/**\n\t * Property\n\t *\n\t * @param {string} input\n\t * @param {number} first\n\t * @param {number} second\n\t * @param {number} third\n\t * @return {string}\n\t */\n\tfunction property (input, first, second, third) {\n\t\tvar out = input + ';'\n\t\tvar index = 0\n\t\tvar hash = (first*2) + (second*3) + (third*4)\n\t\tvar cache\n\n\t\t// animation: a, n, i characters\n\t\tif (hash === 944) {\n\t\t\tout = animation(out)\n\t\t} else if (vendor > 0) {\n\t\t\t// vendor prefix\n\t\t\tswitch (hash) {\n\t\t\t\t// color/column, c, o, l\n\t\t\t\tcase 963: {\n\t\t\t\t\t// column\n\t\t\t\t\tif (out.charCodeAt(5) === 110) {\n\t\t\t\t\t\tout = webkit + out + out\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// appearance: a, p, p\n\t\t\t\tcase 978: {\n\t\t\t\t\tout = webkit + out + moz + out + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// hyphens: h, y, p\n\t\t\t\t// user-select: u, s, e\n\t\t\t\tcase 1019:\n\t\t\t\tcase 983: {\n\t\t\t\t\tout = webkit + out + moz + out + ms + out + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// background/backface-visibility, b, a, c\n\t\t\t\tcase 883: {\n\t\t\t\t\t// backface-visibility, -\n\t\t\t\t\tif (out.charCodeAt(8) === DASH) {\n\t\t\t\t\t\tout = webkit + out + out\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// flex: f, l, e\n\t\t\t\tcase 932: {\n\t\t\t\t\tout = webkit + out + ms + out + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// order: o, r, d\n\t\t\t\tcase 964: {\n\t\t\t\t\tout = webkit + out + ms + 'flex' + '-' + out + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// justify-content, j, u, s\n\t\t\t\tcase 1023: {\n\t\t\t\t\tcache = out.substring(out.indexOf(':', 15)).replace('flex-', '')\n\t\t\t\t\tout = webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// display(flex/inline-flex/inline-box): d, i, s\n\t\t\t\tcase 975: {\n\t\t\t\t\tindex = (out = input).length-10\n\t\t\t\t\tcache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(8).trim()\n\n\t\t\t\t\tswitch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) {\n\t\t\t\t\t\t// inline-\n\t\t\t\t\t\tcase 203: {\n\t\t\t\t\t\t\t// inline-box\n\t\t\t\t\t\t\tif (cache.charCodeAt(8) > 110) {\n\t\t\t\t\t\t\t\tout = out.replace(cache, webkit+cache)+';'+out\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// inline-flex\n\t\t\t\t\t\t// flex\n\t\t\t\t\t\tcase 207:\n\t\t\t\t\t\tcase 102: {\n\t\t\t\t\t\t\tout = (\n\t\t\t\t\t\t\t\tout.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+\n\t\t\t\t\t\t\t\tout.replace(cache, webkit+cache)+';'+\n\t\t\t\t\t\t\t\tout.replace(cache, ms+cache+'box')+';'+\n\t\t\t\t\t\t\t\tout\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tout += ';'\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// align-items, align-center, align-self: a, l, i, -\n\t\t\t\tcase 938: {\n\t\t\t\t\tif (out.charCodeAt(5) === DASH) {\n\t\t\t\t\t\tswitch (out.charCodeAt(6)) {\n\t\t\t\t\t\t\t// align-items, i\n\t\t\t\t\t\t\tcase 105: {\n\t\t\t\t\t\t\t\tcache = out.replace('-items', '')\n\t\t\t\t\t\t\t\tout = webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// align-self, s\n\t\t\t\t\t\t\tcase 115: {\n\t\t\t\t\t\t\t\tout = webkit + out + ms + 'flex-item-' + out.replace('-self', '') + out\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// align-content\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tout = webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '') + out\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// cursor, c, u, r\n\t\t\t\tcase 1005: {\n\t\t\t\t\tif (cursorptn.test(out)) {\n\t\t\t\t\t\tout = out.replace(colonptn, ': ' + webkit) + out.replace(colonptn, ': ' + moz) + out\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// width: min-content / width: max-content\n\t\t\t\tcase 953: {\n\t\t\t\t\tif ((index = out.indexOf('-content', 9)) > 0) {\n\t\t\t\t\t\t// width: min-content / width: max-content\n\t\t\t\t\t\tcache = out.substring(index - 3)\n\t\t\t\t\t\tout = 'width:' + webkit + cache + 'width:' + moz + cache + 'width:' + cache\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// text-size-adjust: t, e, x\n\t\t\t\tcase 1015: {\n\t\t\t\t\tif (input.charCodeAt(9) !== DASH) {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// transform, transition: t, r, a\n\t\t\t\tcase 962: {\n\t\t\t\t\tout = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out\n\n\t\t\t\t\t// transitions\n\t\t\t\t\tif (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) {\n\t\t\t\t\t\tout = out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\t// writing-mode, w, r, i\n\t\t\t\tcase 1000: {\n\t\t\t\t\tcache = out.substring(13).trim()\n\t\t\t\t\tindex = cache.indexOf('-')+1\n\n\t\t\t\t\tswitch (cache.charCodeAt(0)+cache.charCodeAt(index)) {\n\t\t\t\t\t\t// vertical-lr\n\t\t\t\t\t\tcase 226: {\n\t\t\t\t\t\t\tcache = out.replace(writingptn, 'tb')\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// vertical-rl\n\t\t\t\t\t\tcase 232: {\n\t\t\t\t\t\t\tcache = out.replace(writingptn, 'tb-rl')\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// horizontal-tb\n\t\t\t\t\t\tcase 220: {\n\t\t\t\t\t\t\tcache = out.replace(writingptn, 'lr')\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\treturn out\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tout = webkit+out+ms+cache+out\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Animation\n\t *\n\t * @param {string} input\n\t * @return {string}\n\t */\n\tfunction animation (input) {\n\t\tvar length = input.length\n\t\tvar index = input.indexOf(':', 9) + 1\n\t\tvar declare = input.substring(0, index).trim()\n\t\tvar body = input.substring(index, length-1).trim()\n\t\tvar out = ''\n\n\t\t// shorthand\n\t\tif (input.charCodeAt(9) !== DASH) {\n\t\t\t// split in case of multiple animations\n\t\t\tvar list = body.split(animationptn)\n\n\t\t\tfor (var i = 0, index = 0, length = list.length; i < length; index = 0, i++) {\n\t\t\t\tvar value = list[i]\n\t\t\t\tvar items = value.split(propertiesptn)\n\n\t\t\t\twhile (value = items[index]) {\n\t\t\t\t\tvar peak = value.charCodeAt(0)\n\n\t\t\t\t\tif (keyed === 1 && (\n\t\t\t\t\t\t// letters\n\t\t\t\t\t\t(peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE ||\n\t\t\t\t\t\t// dash but not in sequence i.e --\n\t\t\t\t\t\t(peak === DASH && value.charCodeAt(1) !== DASH)\n\t\t\t\t\t)) {\n\t\t\t\t\t\t// not a number/function\n\t\t\t\t\t\tswitch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) {\n\t\t\t\t\t\t\tcase 1: {\n\t\t\t\t\t\t\t\tswitch (value) {\n\t\t\t\t\t\t\t\t\t// not a valid reserved keyword\n\t\t\t\t\t\t\t\t\tcase 'infinite': case 'alternate': case 'backwards': case 'running':\n\t\t\t\t\t\t\t\t\tcase 'normal': case 'forwards': case 'both': case 'none': case 'linear':\n\t\t\t\t\t\t\t\t\tcase 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out':\n\t\t\t\t\t\t\t\t\tcase 'paused': case 'reverse': case 'alternate-reverse': case 'inherit':\n\t\t\t\t\t\t\t\t\tcase 'initial': case 'unset': case 'step-start': case 'step-end': {\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\tvalue += key\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}\n\n\t\t\t\t\titems[index++] = value\n\t\t\t\t}\n\n\t\t\t\tout += (i === 0 ? '' : ',') + items.join(' ')\n\t\t\t}\n\t\t} else {\n\t\t\t// animation-name, n\n\t\t\tout += input.charCodeAt(10) === 110 ? body + (keyed === 1 ? key : '') : body\n\t\t}\n\n\t\tout = declare + out + ';'\n\n\t\treturn vendor > 0 ? webkit + out + out : out\n\t}\n\n\t/**\n\t * Isolate\n\t *\n\t * @param {Array<string>} selectors\n\t */\n\tfunction isolate (selectors) {\n\t\tfor (var i = 0, length = selectors.length, padding, element; i < length; i++) {\n\t\t\t// split individual elements in a selector i.e h1 h2 === [h1, h2]\n\t\t\tvar elements = selectors[i].split(elementptn)\n\t\t\tvar out = ''\n\n\t\t\tfor (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; j++) {\n\t\t\t\t// empty element\n\t\t\t\tif ((size = (element = elements[j]).length) === 0 && l > 1) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\ttail = out.charCodeAt(out.length-1)\n\t\t\t\tcode = element.charCodeAt(0)\n\t\t\t\tpadding = ''\n\n\t\t\t\tif (j !== 0) {\n\t\t\t\t\t// determine if we need padding\n\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tpadding = ' '\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tswitch (code) {\n\t\t\t\t\tcase AND: {\n\t\t\t\t\t\telement = padding + nscopealt\n\t\t\t\t\t}\n\t\t\t\t\tcase TILDE:\n\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\tcase PLUS:\n\t\t\t\t\tcase SPACE:\n\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\telement = padding + element + nscopealt\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\tswitch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) {\n\t\t\t\t\t\t\t// :global\n\t\t\t\t\t\t\tcase 530: {\n\t\t\t\t\t\t\t\tif (escape > 0) {\n\t\t\t\t\t\t\t\t\telement = padding + element.substring(8, size - 1)\n\t\t\t\t\t\t\t\t\tbreak\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// :hover, :nth-child(), ...\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tif (j < 1 || elements[j-1].length < 1) {\n\t\t\t\t\t\t\t\t\telement = padding + nscopealt + element\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\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\tpadding = ''\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tif (size > 1 && element.indexOf(':') > 0) {\n\t\t\t\t\t\t\telement = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2')\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telement = padding + element + nscopealt\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tout += element\n\t\t\t}\n\n\t\t\tselectors[i] = out.replace(formatptn, '').trim()\n\t\t}\n\t}\n\n\t/**\n\t * Proxy\n\t *\n\t * @param {number} context\n\t * @param {string} content\n\t * @param {Array<string>} selectors\n\t * @param {Array<string>} parents\n\t * @param {number} line\n\t * @param {number} column\n\t * @param {number} length\n\t * @param {number} id\n\t * @return {(string|void|*)}\n\t */\n\tfunction proxy (context, content, selectors, parents, line, column, length, id) {\n\t\tfor (var i = 0, out = content, next; i < plugged; i++) {\n\t\t\tswitch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id)) {\n\t\t\t\tcase void 0:\n\t\t\t\tcase false:\n\t\t\t\tcase true:\n\t\t\t\tcase null: {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tout = next\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch (out) {\n\t\t\tcase void 0:\n\t\t\tcase false:\n\t\t\tcase true:\n\t\t\tcase null:\n\t\t\tcase content: {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\treturn out\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Minify\n\t *\n\t * @param {(string|*)} output\n\t * @return {string}\n\t */\n\tfunction minify (output) {\n\t\treturn output\n\t\t\t.replace(formatptn, '')\n\t\t\t.replace(beforeptn, '')\n\t\t\t.replace(afterptn, '$1')\n\t\t\t.replace(tailptn, '$1')\n\t\t\t.replace(whiteptn, ' ')\n\t}\n\n\t/**\n\t * Use\n\t *\n\t * @param {(Array<function(...?)>|function(...?)|number|void)?} plugin\n\t */\n\tfunction use (plugin) {\n\t\tswitch (plugin) {\n\t\t\tcase void 0:\n\t\t\tcase null: {\n\t\t\t\tplugged = plugins.length = 0\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tswitch (plugin.constructor) {\n\t\t\t\t\tcase Array: {\n\t\t\t\t\t\tfor (var i = 0, length = plugin.length; i < length; i++) {\n\t\t\t\t\t\t\tuse(plugin[i])\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase Function: {\n\t\t\t\t\t\tplugins[plugged++] = plugin\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase Boolean: {\n\t\t\t\t\t\tunkwn = !!plugin|0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t\t}\n\n \t\treturn use\n\t}\n\n\t/**\n\t * Set\n\t *\n\t * @param {*} options\n\t */\n\tfunction set (options) {\t\t\n\t\tfor (var name in options) {\n\t\t\tvar value = options[name]\n\t\t\tswitch (name) {\n\t\t\t\tcase 'keyframe': keyed = value|0; break\n\t\t\t\tcase 'global': escape = value|0; break\n\t\t\t\tcase 'cascade': cascade = value|0; break\n\t\t\t\tcase 'compress': compress = value|0; break\n\t\t\t\tcase 'prefix': vendor = value|0; break\n\t\t\t\tcase 'semicolon': semicolon = value|0; break\n\t\t\t\tcase 'preserve': preserve = value|0; break\n\t\t\t}\n\t\t}\n\n\t\treturn set\n\t}\n\n\t/**\n\t * Stylis\n\t *\n\t * @param {string} selector\n\t * @param {string} input\n\t * @return {*}\n\t */\n\tfunction stylis (selector, input) {\n\t\tif (this !== void 0 && this.constructor === stylis) {\n\t\t\treturn factory(selector)\n\t\t}\n\n\t\t// setup\n\t\tvar ns = selector\n\t\tvar code = ns.charCodeAt(0)\n\n\t\t// trim leading whitespace\n\t\tif (code < 33) {\n\t\t\tcode = (ns = ns.trim()).charCodeAt(0)\n\t\t}\n\n\t\t// keyframe/animation namespace\n\t\tif (keyed > 0) {\n\t\t\tkey = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-')\n\t\t}\n\n\t\t// reset, used to assert if a plugin is moneky-patching the return value\n\t\tcode = 1\n\n\t\t// cascade/isolate\n\t\tif (cascade === 1) {\n\t\t\tnscope = ns\n\t\t} else {\n\t\t\tnscopealt = ns\n\t\t}\n\n\t\tvar selectors = [nscope]\n\t\tvar result\n\n\t\t// execute plugins, pre-process context\n\t\tif (plugged > 0) {\n\t\t\tresult = proxy(PREPS, input, selectors, selectors, line, column, 0, 0)\n\n\t\t\tif (result !== void 0 && typeof result === 'string') {\n\t\t\t\tinput = result\n\t\t\t}\n\t\t}\n\n\t\t// build\n\t\tvar output = compile(array, selectors, input, 0)\n\n\t\t// execute plugins, post-process context\n\t\tif (plugged > 0) {\n\t\t\tresult = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0)\n\t\n\t\t\t// bypass minification\n\t\t\tif (result !== void 0 && typeof(output = result) !== 'string') {\n\t\t\t\tcode = 0\n\t\t\t}\n\t\t}\n\n\t\t// reset\n\t\tkey = ''\n\t\tnscope = ''\n\t\tnscopealt = ''\n\t\tpattern = 0\n\t\tline = 1\n\t\tcolumn = 1\n\n\t\treturn compress*code === 0 ? output : minify(output)\n\t}\n\n\tstylis['use'] = use\n\tstylis['set'] = set\n\n\tif (options !== void 0) {\n\t\tset(options)\n\t}\n\n\treturn stylis\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/stylis/stylis.js\n// module id = 25\n// module chunks = 0 1","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/index.js\n// module id = 26\n// module chunks = 0 1","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning(\n false,\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/factoryWithTypeCheckers.js\n// module id = 27\n// module chunks = 0 1","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/object-assign/index.js\n// module id = 28\n// module chunks = 0 1","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = require('fbjs/lib/invariant');\n var warning = require('fbjs/lib/warning');\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/checkPropTypes.js\n// module id = 29\n// module chunks = 0 1","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/factoryWithThrowingShims.js\n// module id = 30\n// module chunks = 0 1","module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/is-function/index.js\n// module id = 31\n// module chunks = 0 1","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n arguments: true,\n arity: true\n};\n\nvar isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function';\n\nmodule.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n var keys = Object.getOwnPropertyNames(sourceComponent);\n\n /* istanbul ignore else */\n if (isGetOwnPropertySymbolsAvailable) {\n keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) {\n try {\n targetComponent[keys[i]] = sourceComponent[keys[i]];\n } catch (error) {\n\n }\n }\n }\n }\n\n return targetComponent;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/hoist-non-react-statics/index.js\n// module id = 32\n// module chunks = 0 1","import * as React from 'react';\nimport styled from 'styled-components';\nimport { Matrix4x4 } from '../../utils/linalg';\n\nimport numberAwareCompare from '../../utils/number-aware-compare';\nimport requestFullscreen from '../../utils/fullscreen';\n\nimport HelpScreen from './HelpScreen';\nimport ImageFrame from '../ImageFrame';\nimport { lossFunctionFromString } from '../../layers/Layer';\nimport ImageFrameWithLoading, { ImageSpec } from '../ImageFrameWithLoading';\nimport { NavRow } from './navigation';\n\nconst MainDiv = styled.div`\n background-color: #fff;\n font-size: .9em;\n position: absolute;\n top: 0; bottom: 0; left: 0; right: 0;\n display: flex;\n flex-direction: column;\n color: #AAA;\n`;\n\nconst ImageArea = styled.div`\n flex-grow: 1;\n position: relative;\n`;\n\nexport type InputTree = InputNode | InputLeaf;\n\nexport interface InputNode {\n title: string;\n children: InputTree[];\n}\n\nexport type InputLeaf = InputLeafImage | InputLeafLossMap;\n\nexport interface InputLeafImage {\n title: string;\n image: string;\n}\nexport interface InputLeafLossMap {\n title: string;\n lossMap: {\n function: string;\n imageA: string;\n imageB: string;\n };\n}\n\nexport interface ImageViewerState {\n activeRow: number; /** The number of the row that is currently active for keyboard toggling */\n selection: string[]; /** List of item titles that are selected */\n viewTransform: {[tonemapGroup: string]: number}; /** Image view transform, a number between 0 and 1 for each tonemapGroup (string) */\n exposure: {[tonemapGroup: string]: number}; /** Image exposure, a number > 0 for each tonemapGroup (string) */\n helpIsOpen: boolean; /** Whether the help screen overlay is currently open */\n defaultTransformation: Matrix4x4;\n transformationNeedsUpdate: boolean;\n hasFocus: boolean; /** The viewer has 'focus', i.e. the user clicked on it */\n}\n\nexport interface ImageViewerProps {\n data: InputTree; /** Unsorted input tree, use the sorted this.menuData instead */\n baseUrl: string; /** Prefix for all images */\n sortMenu: boolean; /** Whether to sort the menu-items automatically */\n removeCommonPrefix: boolean; /** Should common prefices of menu names be shortened. */\n}\n\n\n// A little hack to allow detecting shift click\nlet SHIFT_IS_DOWN: boolean = false;\ndocument.addEventListener('keydown', (ev) => {\n if (ev.key === 'Shift') {\n SHIFT_IS_DOWN = true;\n }\n});\ndocument.addEventListener('keyup', (ev) => {\n if (ev.key === 'Shift') {\n SHIFT_IS_DOWN = false;\n }\n});\n\nexport default class ImageViewer extends React.Component<ImageViewerProps, ImageViewerState> {\n\n static defaultProps = {\n baseUrl: '',\n sortMenu: false,\n removeCommonPrefix: false,\n };\n\n /** A sorted version of props.data, cached for efficiency and recomputed when props change */\n private menuData: InputTree;\n /** A reference the the imageFrame element, ready once the ImageViewer is loaded */\n private imageFrame: ImageFrame | null;\n /** A reference to the div element of the containing div */\n private mainContainer: HTMLDivElement;\n\n constructor(props: ImageViewerProps) {\n super(props);\n this.menuData = this.props.data;\n if (props.sortMenu) {\n this.menuData = this.sortMenuRows(this.menuData);\n }\n // Set the initial state\n this.state = {\n activeRow: 0,\n selection: this.getDefaultSelection(this.menuData).slice(1),\n viewTransform: { default: 0.0 },\n exposure: { default: 1.0 },\n helpIsOpen: false,\n defaultTransformation: Matrix4x4.create(),\n transformationNeedsUpdate: true,\n hasFocus: false,\n };\n // Make sure 'this' is available in the keyboard handler when assigned to the keyup event\n this.keyboardHandler = this.keyboardHandler.bind(this);\n this.setFocus = this.setFocus.bind(this);\n this.unsetFocus = this.unsetFocus.bind(this);\n }\n\n componentDidMount() {\n this.mainContainer.setAttribute('tabindex', '1');\n this.mainContainer.addEventListener('keydown', this.keyboardHandler);\n this.mainContainer.addEventListener('focus', this.setFocus);\n this.mainContainer.addEventListener('focusout', this.unsetFocus);\n }\n\n componentDidUpdate() {\n if (this.imageFrame && this.state.transformationNeedsUpdate) {\n this.imageFrame.setTransformation(this.state.defaultTransformation);\n this.setState({ transformationNeedsUpdate: false });\n }\n }\n\n componentWillReceiveProps(nextProps: ImageViewerProps) {\n this.menuData = nextProps.data;\n if (this.props.sortMenu) {\n this.menuData = this.sortMenuRows(this.menuData);\n }\n this.validateSelection(this.state.selection, this.state.activeRow);\n }\n\n componentWillUnmount() {\n this.mainContainer.removeEventListener('keydown', this.keyboardHandler);\n }\n\n setTransformation(transformation: Matrix4x4) {\n if (this.imageFrame != null) {\n this.imageFrame.setTransformation(transformation);\n }\n this.setState({ defaultTransformation: transformation });\n }\n\n render() {\n const rows = this.activeRows(this.menuData, this.state.selection);\n const imageSpec = this.imageSpec();\n return (\n <MainDiv innerRef={(div: HTMLDivElement) => this.mainContainer = div}>\n <div>\n {rows.map((row, i) => (\n <NavRow\n key={row.title}\n row={row}\n selection={this.state.selection[i]}\n handleClick={this.navigateTo.bind(this, rows, i)}\n removeCommonPrefix={this.props.removeCommonPrefix}\n active={this.state.activeRow === i}\n />\n ))}\n </div>\n <ImageArea>\n <ImageFrameWithLoading\n viewTransform={this.state.viewTransform[imageSpec.tonemapGroup]}\n exposure={this.state.exposure[imageSpec.tonemapGroup] || 1.0}\n gamma={1.0}\n offset={0.0}\n imageSpec={imageSpec}\n ref={(frame) => this.imageFrame = (frame != null) ? frame.imageFrame : null}\n allowMovement={true}\n enableMouseEvents={this.state.hasFocus}\n />\n {this.state.helpIsOpen ? <HelpScreen /> : null}\n </ImageArea>\n </MainDiv>\n );\n }\n\n /**\n * Select the active rows from the navigation data tree, according to the given selection\n *\n * @param tree navigation datastructure\n * @param selection array of the titles of selected items from top to bottom\n */\n private activeRows(tree: InputTree, selection: string[]): InputNode[] {\n if (selection.length === 0) {\n // Base case of the recursion\n return [];\n } else {\n // Find the child with this name\n if (!tree.hasOwnProperty('children')) {\n throw new Error(`Can't find match for ${selection}`);\n }\n const node = (tree as InputNode);\n const res = node.children.find(child => child.title === selection[0]);\n if (res == null) {\n throw new Error(`Failed to find a match for ${selection}`);\n } else {\n return [node].concat(this.activeRows(res, selection.slice(1)));\n }\n }\n }\n\n /**\n * Recursively sort the input data\n *\n * It's a bit smart, for example bathroom-32 will come before bathroom-128,\n * and the word Color always goes first.\n * @param tree to be sored\n */\n private sortMenuRows(tree: InputTree): InputTree {\n if (tree.hasOwnProperty('children')) {\n const node = tree as InputNode;\n const children = node.children.map(child => this.sortMenuRows(child));\n children.sort((a, b) => {\n if (a.title === b.title) {\n return 0;\n } else if (a.title === 'Color') {\n return -1;\n } else if (b.title === 'Color') {\n return 1;\n } else {\n return numberAwareCompare(a.title, b.title);\n }\n });\n return {\n title: node.title,\n children: children,\n };\n } else {\n return tree;\n }\n }\n\n /**\n * Find the image to be shown based on the current selection\n */\n private currentImage(currentSelection: string[] = this.state.selection): InputLeaf {\n let selection = [...currentSelection];\n let tree: InputNode = this.menuData as InputNode;\n while (selection.length > 0) {\n let entry = selection.shift();\n tree = tree.children.find(item => item.title === entry) as InputNode;\n }\n return tree as any; // tslint:disable-line\n }\n\n /**\n * Specification for the current image to load\n */\n private imageSpec(currentSelection: string[] = this.state.selection): ImageSpec {\n const img = this.currentImage(currentSelection);\n if (img.hasOwnProperty('lossMap')) {\n const config = img as InputLeafLossMap;\n return {\n type: 'Difference',\n lossFunction: lossFunctionFromString(config.lossMap.function),\n urlA: this.props.baseUrl + config.lossMap.imageA,\n urlB: this.props.baseUrl + config.lossMap.imageB,\n tonemapGroup: (config as any).tonemapGroup || 'default', // tslint:disable-line\n };\n } else {\n return {\n type: 'Url',\n url: this.props.baseUrl + (img as InputLeafImage).image,\n tonemapGroup: (img as any).tonemapGroup || 'default', // tslint:disable-line\n };\n }\n }\n\n /**\n * Navigate to a particular image\n *\n * @param rows: a list of the rows currently visible\n * @param rowIndex: the index of the row in which to switch tabs\n * @param title: the title of the requested node\n *\n * For rows > rowIndex, we select children matching the current selection titles\n * if they exist. Otherwise, we resort to the default selection (first elements).\n */\n private navigateTo(rows: InputNode[], rowIndex: number, title: string) {\n let selection = [...this.state.selection];\n selection[rowIndex] = title;\n let activeRow = this.state.activeRow;\n if (SHIFT_IS_DOWN) {\n // Set active row on shift click\n activeRow = rowIndex;\n }\n this.validateSelection(selection, activeRow);\n }\n\n /**\n * Make sure that the current selection is valid given the current menuData\n *\n * If a title in the selection does not exist in the respective row, take the default\n * (first) element of the row.\n * @param wishes the desired selection, which might not be valid given the selected menu items\n */\n private validateSelection(wishes: string[], activeRow: number) {\n let selection = [];\n let i = 0;\n let root = this.menuData as InputNode;\n while (root.hasOwnProperty('children')) {\n let candidate = root.children.find(row => row.title === wishes[i]);\n if (candidate) {\n root = candidate as InputNode;\n selection.push(candidate.title);\n } else {\n root = root.children[0] as InputNode; // resort to the first\n selection.push(root.title);\n }\n i++;\n }\n this.setState({\n selection: selection,\n activeRow: Math.min(activeRow, selection.length - 1),\n });\n }\n\n /**\n * Return the titles of the first items of a sorted tree\n * @param tree a sorted navigation data structure\n */\n private getDefaultSelection(tree: InputTree): string[] {\n if (tree.hasOwnProperty('children')) {\n const node = tree as InputNode;\n if (node.children.length > 0) {\n return [node.title].concat(this.getDefaultSelection(node.children[0]));\n } else {\n return [node.title];\n }\n } else {\n return [tree.title];\n }\n }\n\n private dumpTransformation(): void {\n if (this.imageFrame != null) {\n const transformation = this.imageFrame.getTransformation();\n console.log(transformation.data);\n }\n }\n\n private keyboardHandler(event: KeyboardEvent) {\n const { key } = event;\n\n const actions: {[x: string]: Function} = {};\n const actionsUnderShift: {[x: string]: Function} = {};\n\n // Number keys\n const goToNumber = (i: number) => () => {\n const rows = this.activeRows(this.menuData, this.state.selection);\n const activeRow = this.state.activeRow;\n const goTo = rows[activeRow].children[i];\n if (goTo != null) {\n this.navigateTo(rows, activeRow, goTo.title);\n }\n };\n actions['0'] = goToNumber(9);\n for (let i = 1; i <= 9; ++i) {\n actions[i.toString()] = goToNumber(i - 1);\n }\n\n // Arrows\n const moveInLine = (offset: number) => () => {\n const rows = this.activeRows(this.menuData, this.state.selection);\n const activeRow = this.state.activeRow;\n const currentTitle = this.state.selection[activeRow];\n const currentIndex = rows[activeRow].children.findIndex(n => n.title === currentTitle);\n const nextIndex = (currentIndex + offset + rows[activeRow].children.length) % rows[activeRow].children.length;\n const goTo = rows[activeRow].children[nextIndex];\n this.navigateTo(rows, activeRow, goTo.title);\n };\n actionsUnderShift.ArrowLeft = moveInLine(-1);\n actionsUnderShift.ArrowRight = moveInLine(1);\n actions['-'] = moveInLine(-1);\n actions['='] = moveInLine(1);\n const moveUpDown = (offset: number) => () => {\n let nextRow = this.state.activeRow + offset;\n if (nextRow < 0) {\n nextRow = 0;\n }\n if (nextRow >= this.state.selection.length - 1) {\n nextRow = this.state.selection.length - 1;\n }\n this.setState({ activeRow: nextRow });\n };\n actionsUnderShift.ArrowUp = moveUpDown(-1);\n actionsUnderShift.ArrowDown = moveUpDown(1);\n actions['['] = moveUpDown(-1);\n actions[']'] = moveUpDown(1);\n\n // ViewTransform controls\n const changeViewTransform = () => () => {\n const tonemapGroup = this.imageSpec().tonemapGroup;\n const viewTransform = {\n ...this.state.viewTransform,\n [tonemapGroup]: (Math.abs(this.state.viewTransform[tonemapGroup] - 1))\n };\n this.setState({ viewTransform });\n };\n actions.t = changeViewTransform();\n\n // Exposure controls\n const changeExposure = (multiplier: number) => () => {\n const tonemapGroup = this.imageSpec().tonemapGroup;\n const exposure = {\n ...this.state.exposure,\n [tonemapGroup]: multiplier * (this.state.exposure[tonemapGroup] || 1.0)\n };\n this.setState({ exposure });\n };\n actions.e = changeExposure(1.1);\n actions.E = changeExposure(1.0 / 1.1);\n\n // Reset\n actions.r = () => {\n this.setState({ viewTransform: { default: 0.0 } });\n this.setState({ exposure: { default: 1.0 } });\n if (this.imageFrame) {\n this.imageFrame.reset();\n }\n };\n\n // Toggle help\n actions['/'] = actions['?'] = () => {\n this.setState({ helpIsOpen: !this.state.helpIsOpen });\n };\n actions.Escape = () => {\n this.setState({ helpIsOpen: false });\n };\n\n // Go fullscreen\n actions.f = () => requestFullscreen(this.mainContainer);\n\n // Dump the current transformation\n actions.d = () => this.dumpTransformation();\n\n if (actions.hasOwnProperty(key) && !event.metaKey && !event.altKey && !event.ctrlKey) {\n event.preventDefault();\n actions[key]();\n return;\n }\n if (actionsUnderShift.hasOwnProperty(key) && event.shiftKey) {\n event.preventDefault();\n actionsUnderShift[key]();\n return;\n }\n }\n\n private setFocus() {\n this.setState({ hasFocus: true });\n }\n\n private unsetFocus() {\n this.setState({ hasFocus: false });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ImageViewer/index.tsx","const splitPartsPattern = /\\d+|\\D+/g;\n\nexport default function numberAwareCompare(a: string, b: string): number {\n const aComponents = a.match(splitPartsPattern) || [];\n const bComponents = b.match(splitPartsPattern) || [];\n\n while (aComponents.length > 0 && bComponents.length > 0) {\n const currentA = aComponents.shift() as string;\n const currentB = bComponents.shift() as string;\n const aAsInteger = parseInt(currentA, 10);\n const bAsInteger = parseInt(currentB, 10);\n\n if (!isNaN(aAsInteger) && !isNaN(bAsInteger)) {\n // Compare integers\n if (aAsInteger < bAsInteger) {\n return -1;\n } else if (aAsInteger > bAsInteger) {\n return 1;\n }\n } else if (isNaN(aAsInteger) && isNaN(bAsInteger)) {\n // Compare non-integer strings\n if (currentA < currentB) {\n return -1;\n } else if (currentA > currentB) {\n return 1;\n }\n } else {\n // If one block is an integer and the other a string,\n // the number is smaller\n if (isNaN(bAsInteger)) {\n return -1;\n } else {\n return 1;\n }\n }\n }\n\n if (aComponents.length === 0 && bComponents.length === 0) {\n return 0;\n } else if (aComponents.length === 0) {\n return -1;\n } else {\n return 1;\n }\n}\n\n// console.log(numberAwareCompare(\"bathroom10\", \"bathroom2\"), 1)\n// console.log(numberAwareCompare(\"bathroom2\", \"bathroom10\"), -1)\n// console.log(numberAwareCompare(\"2bathroom\", \"10bathroom\"), -1)\n// console.log(numberAwareCompare(\"10bathroom\", \"2bathroom\"), 1)\n// console.log(numberAwareCompare(\"1bathroom\", \"bathroom1\"), -1)\n// console.log(numberAwareCompare(\"bathroom1\", \"1bathroom\"), 1)\n// console.log(numberAwareCompare(\"bla\", \"bla\"), 0)\n// console.log(numberAwareCompare(\"bla1\", \"bla1\"), 0)\n// console.log(numberAwareCompare(\"bla1a4\", \"bla1a4\"), 0)\n// console.log(numberAwareCompare(\"\", \"\"), 0)\n// console.log(numberAwareCompare(\"a\", \"\"), 1)\n// console.log(numberAwareCompare(\"\", \"a\"), -1)\n// console.log(numberAwareCompare(\"2017.07.14\", \"2017.07.13\"), 1)\n// console.log(numberAwareCompare(\"bathroom-1\", \"bathroom1\"), 1)\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/number-aware-compare.ts","export default function requestFullscreen(element: any) { //tslint:disable-line\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element.mozRequestFullScreen) {\n element.mozRequestFullScreen();\n } else if (element.webkitRequestFullScreen) {\n element.webkitRequestFullScreen((Element as any).ALLOW_KEYBOARD_INPUT); //tslint:disable-line\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/fullscreen.ts","import * as React from 'react';\nimport styled from 'styled-components';\n\nconst HelpScreenDiv = styled.div`\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 2em 0;\n background-color: rgba(0, 0, 0, 0.8);\n line-height: 1.4em;\n color: white;\n table {\n width: 40em;\n margin: 0 auto;\n }\n h1 {\n font-size: 1em;\n margin: 0;\n padding: 0;\n line-height: 2em;\n text-align: center;\n padding-bottom: .5em;\n }\n th, td {\n text-align: left;\n padding: .4em 1em;\n vertical-align: top;\n }\n th {\n width: 10em;\n }\n`;\n\nexport default () => {\n return (\n <HelpScreenDiv>\n <h1>Shortcuts</h1>\n <table>\n <tbody>\n <tr>\n <th>0-9</th>\n <td>Switch images</td>\n </tr>\n <tr>\n <th>Shift + 0-9</th>\n <td>Switch comparison (to for example reference or input)</td>\n </tr>\n <tr>\n <th>Shift + Arrows</th>\n <td>Navigate through the menu</td>\n </tr>\n <tr>\n <th>Shift + click</th>\n <td>Open a tab, and activate keyboard shortcuts for the row clicked</td>\n </tr>\n <tr>\n <th>e / E</th>\n <td>Increase / decrease <strong>e</strong>xposure</td>\n </tr>\n <tr>\n <th>r</th>\n <td>Reset exposure, view transform, positioning and zooming</td>\n </tr>\n <tr>\n <th>t</th>\n <td>Toggle between the Gamma 2.2 and the Pseudo ARRI K1S1 view transforms</td>\n </tr>\n <tr>\n <th>f</th>\n <td>Enter <strong>f</strong>ullscreen mode</td>\n </tr>\n <tr>\n <th>?</th>\n <td>Toggle this help screen</td>\n </tr>\n </tbody>\n </table>\n </HelpScreenDiv>\n );\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ImageViewer/HelpScreen.tsx","import * as React from 'react';\nimport { Matrix4x4 } from '../utils/linalg';\nimport styled from 'styled-components';\n\nimport ImageFrame from './ImageFrame';\nimport { LossFunction, Input as ImageInput } from '../layers/Layer';\nimport { ImageCache } from '../utils/image-loading';\n\nconst StretchingDiv = styled.div`\n position: absolute;\n top: 0; bottom: 0;\n left: 0; right: 0;\n width: 100%; height: 100%;\n`;\n\nconst LoadingOverlay = styled.div`\n display: block;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n text-align: left;\n padding: .6em;\n background-color: rgb(64, 64, 64);\n`;\n\nexport interface ImageSpecUrl {\n type: 'Url';\n url: string;\n tonemapGroup: string;\n}\n\nexport interface ImageSpecLossMap {\n type: 'Difference';\n lossFunction: LossFunction;\n urlA: string;\n urlB: string;\n tonemapGroup: string;\n}\n\nexport type ImageSpec = ImageSpecUrl | ImageSpecLossMap;\n\nexport interface ImageFrameWithLoadingProps {\n imageSpec: ImageSpec;\n viewTransform: number;\n exposure: number;\n gamma: number;\n offset: number;\n allowMovement: boolean;\n /** Optional callback to be called when the mouse moves */\n onPoint?: (x: number, y: number) => void;\n /** Optional callback to be called when the canvas is panned or zoomed */\n onTransform?: (transformation: Matrix4x4) => void;\n enableMouseEvents: boolean;\n}\n\nexport interface ImageFrameWithLoadingState {\n isLoading: boolean;\n errorMsg: string | null;\n image: ImageInput | null;\n}\n\n/**\n * A wrapper around ImageFrame that deals with the loading of images\n * It takes an `ImageSpec` instead of an `InputImage`.\n */\nexport default class ImageFrameWithLoading extends\n React.Component<ImageFrameWithLoadingProps, ImageFrameWithLoadingState> {\n\n public imageFrame: ImageFrame | null;\n\n private cache: ImageCache = new ImageCache();\n private requestId: number = 0;\n\n // Counter to ensure that returning downloads are still relevant to the current app state.\n private currentRequest: number = 0;\n\n constructor(props: ImageFrameWithLoadingProps) {\n super(props);\n this.state = {\n isLoading: false,\n errorMsg: null,\n image: null,\n };\n this.handleImageChange(props, false);\n }\n\n componentWillReceiveProps(nextProps: ImageFrameWithLoadingProps) {\n if (nextProps.imageSpec !== this.props.imageSpec) { // Assumes imageSpec to be immutable\n this.handleImageChange(nextProps);\n }\n }\n\n componentWillUnmount() {\n // Don't handle any returning downloads anymore after unmount.\n this.requestId = -1;\n }\n\n render() {\n return (\n <StretchingDiv>\n {this.state.image != null ?\n <ImageFrame\n viewTransform={this.props.viewTransform}\n exposure={this.props.exposure}\n gamma={this.props.gamma}\n offset={this.props.offset}\n image={this.state.image}\n ref={(frame) => this.imageFrame = frame}\n allowMovement={this.props.allowMovement}\n enableMouseEvents={this.props.enableMouseEvents}\n />\n : null}\n {this.state.isLoading ? <LoadingOverlay>Downloading ...</LoadingOverlay> : null}\n {this.state.errorMsg ? <LoadingOverlay>{this.state.errorMsg}</LoadingOverlay> : null}\n </StretchingDiv>\n );\n }\n\n /**\n * Initiate the download of the current spec.\n * Sets the state in case of correct or incorrect loads.\n */\n private handleImageChange(props: ImageFrameWithLoadingProps, shouldSetLoadingState: boolean = true) {\n this.currentRequest++;\n const handledRequest = this.currentRequest;\n\n if (shouldSetLoadingState) {\n this.setState({\n isLoading: true,\n errorMsg: null,\n });\n }\n\n this.downloadImage(props.imageSpec)\n .then(image => {\n if (handledRequest !== this.currentRequest) {\n // This download does not correspond to the latest request, so should not be shown.\n return;\n }\n this.setState({\n errorMsg: null,\n isLoading: false,\n image: image,\n });\n })\n .catch(error => {\n if (handledRequest !== this.requestId) {\n // This download does not correspond to the latest request, so should not be shown.\n return;\n }\n this.setState({\n errorMsg: error.message,\n isLoading: false,\n });\n });\n }\n\n /**\n * Download an image\n * @param image specification of the image to download (url or difference of two images)\n * @return Promise of a loaded image\n */\n private downloadImage(spec: ImageSpec): Promise<ImageInput> {\n if (spec.type === 'Url') {\n return this.cache.get(spec.url);\n } else if (spec.type === 'Difference') {\n return Promise.all([spec.urlA, spec.urlB].map(url => this.cache.get(url)))\n .then(([imageA, imageB]) => {\n // Make sure images have the same size and number of channels;\n const height = imageA.height;\n const width = imageA.width;\n const nChannels = imageA.nChannels;\n if (height !== imageB.height) {\n throw Error(`${spec.urlA} & ${spec.urlB} with heights ${height} & ${imageB.height} cannot be compared.`);\n }\n if (width !== imageB.width) {\n throw Error(`${spec.urlA} & ${spec.urlB} with widths ${width} & ${imageB.width} cannot be compared.`);\n }\n if (nChannels !== imageB.nChannels) {\n throw Error(`${spec.urlA} & ${spec.urlB} with unequal nChannels ${nChannels} & ${imageB.nChannels}.`);\n }\n return {\n type: spec.type,\n imageA,\n imageB,\n width,\n height,\n nChannels,\n lossFunction: spec.lossFunction,\n };\n });\n } else {\n throw Error(`Unkonwn imageSpec type for ${spec}.`);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ImageFrameWithLoading.tsx","import * as React from 'react';\nimport styled from 'styled-components';\nimport { InputNode } from './index';\n\nconst commonPrefix = require('common-prefix');\n\n/** Helper to reverse string */\nconst reverse = (x: string) => x.split('').reverse().join('');\n\n// tslint:disable\nconst NavLink = styled.a`\n cursor: pointer;\n display: inline-block;\n margin: 0;\n flex-grow: 0;\n flex-shrink: ${(props: any) => props.active ? '0' : '1'};\n padding: .4em .7em;\n overflow: hidden;\n text-decoration: none;\n white-space: nowrap;\n position: relative;\n background-color: ${(props: any) => props.active ? '#238' : 'inherit'};\n color: ${(props: any) => props.active ? '#FFFFFF !important' : '#AAA !important'};\n &:active {\n background-color: ${(props: any) => props.active ? '#666' : '#fff'};\n }\n &:hover {\n flex-shrink: 0;\n }\n user-select: none;\n -moz-user-select: none;\n` as any;\n// tslint:enable\n\nconst NavRowDiv = styled.div`\n display: block;\n padding: 0;\n border-bottom: 1px solid #aaa;\n background: #fff;\n color: #111;\n display: flex;\n &:first-child {\n// border-top: 1px solid #aaa;\n }\n &:hover ${NavLink} {\n flex-shrink: 1;\n }\n &:hover ${NavLink}:hover {\n flex-shrink: 0;\n }\n`;\n\nconst NavLinkNumber = styled.span`\n color: white;\n font-size: .6em;\n position: absolute;\n top: .3em;\n right: .4em;\n`;\n\nexport interface NavRowProps {\n row: InputNode;\n active: boolean; // Is this row currently active for mouse events\n selection: string; // Title of the selected button\n handleClick: Function;\n removeCommonPrefix: boolean;\n}\n\nexport const NavRow = ({ row, active, selection, handleClick, removeCommonPrefix }: NavRowProps) => {\n const titlesInRow = row.children.map(child => child.title);\n\n // Trim common prefices and suffices from the row's entries\n let trimmedTitles: string[];\n if (removeCommonPrefix) {\n const prefix: string = commonPrefix(titlesInRow);\n const suffix: string = reverse(commonPrefix(titlesInRow.map(reverse)));\n trimmedTitles = titlesInRow.map(t => t.slice(prefix.lastIndexOf('/') + 1, t.length - suffix.length));\n } else {\n trimmedTitles = titlesInRow;\n }\n\n return (\n <NavRowDiv>\n {row.children.map((child, i) => (\n <NavLink\n onClick={() => handleClick(child.title)}\n key={child.title}\n active={child.title === selection}\n >\n {i === 0 ? titlesInRow[i] : trimmedTitles[i]}\n {active && i < 10 ? <NavLinkNumber>{(i + 1) % 10}</NavLinkNumber> : null}\n </NavLink>\n ))}\n </NavRowDiv>\n );\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/ImageViewer/navigation.tsx","module.exports = common\n\nfunction common (strings) {\n if (!Array.isArray(strings)) {\n throw new Error('common-prefix expects an array of strings')\n }\n\n var first = strings[0] || ''\n var commonLength = first.length\n\n for (var i = 1; i < strings.length; ++i) {\n for (var j = 0; j < commonLength; ++j) {\n if (strings[i].charAt(j) !== first.charAt(j)) {\n commonLength = j\n break\n }\n }\n }\n\n return first.slice(0, commonLength)\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/common-prefix/index.js\n// module id = 39\n// module chunks = 0 1"],"sourceRoot":""}