diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..d86fe7a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "trailingComma": "es5", + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "printWidth": 120 +} \ No newline at end of file diff --git a/dist/main.js.map b/dist/main.js.map index 98dab59..afa1dd5 100644 --- a/dist/main.js.map +++ b/dist/main.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://sr-visualizer/webpack/universalModuleDefinition","webpack://sr-visualizer/webpack/bootstrap","webpack://sr-visualizer/./src/cube/constants.ts","webpack://sr-visualizer/./src/constants.ts","webpack://sr-visualizer/./src/math.ts","webpack://sr-visualizer/./src/cube/geometry.ts","webpack://sr-visualizer/./src/cube/simulation.ts","webpack://sr-visualizer/./src/index.ts","webpack://sr-visualizer/./src/cube/drawing.ts","webpack://sr-visualizer/./node_modules/svg.js/dist/svg.js","webpack://sr-visualizer/./src/cube/parsing/arrow.ts","webpack://sr-visualizer/./src/cube/parsing/color.ts","webpack://sr-visualizer/./src/cube/stickers.ts","webpack://sr-visualizer/./src/cube/masking.ts","webpack://sr-visualizer/./src/cube/parsing/algorithm.ts"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_a","_b","Face","constants_1","AllFaces","U","R","F","D","L","B","AlgorithmUnit","FaceRotationVectors","DefaultColorScheme","ColorCode","Yellow","Red","Blue","White","Orange","Green","JapaneseColorScheme","possibleMoves","M","E","S","X","Y","Z","TurnAbbreviation","Masking","ColorName","ColorAbbreviation","ColorNameToCode","Black","DarkGray","Gray","Silver","Purple","Pink","ColorAbbreviationToCode","Transparent","Axis","translate","pos","v","map","index","scale","scalar","makeMatrix","rows","cols","matrix","transScale","x","rotate","axis","radians","newPosition","slice","Math","cos","sin","project","radians2Degrees","PI","math_1","makeStickerPosition","face","cubeSize","y","Error","makeFaceStickers","options","stickers","row","_loop_1","col","sticker","centerTranslation","viewportRotations","forEach","rotation","dist","rotateFaces","faceRotations","rotations","reduce","acc","makeCubeGeometry","view","_c","_d","_e","_f","TurnType","faceIdentity","stickerNumber","counterClockwiseSticker","clockwiseSticker","doubleTurn","OppositeTurn","Clockwise","CounterClockwise","Double","AxisOrientation","CubeData","initialValues","this","faces","numStickers","clockwiseMapping","counterClockwiseMapping","doubleMapping","initValues","push","_this","currentValue","rotateFace","turn","newStickerNumber","reverse","axisRotation","offset","range","faceOrder","forward","double","originalValues","stickerIndex","j","length","nextFace","valueIndex","nextFaceValueIndex","xLayersRotation","yLayersRotation","zLayersRotation","rTurn","turnType","lTurn","uTurn","dTurn","fTurn","bTurn","mTurn","eTurn","sTurn","xTurn","yTurn","zTurn","move","JSON","stringify","__assign","assign","arguments","apply","geometry_1","drawing_1","stickers_1","constants_2","defaultOptions","width","height","colorScheme","cubeColor","cubeOpacity","stickerOpacity","outlineWidth","strokeWidth","viewbox","cubeSVG","container","extraOptions","geomety","stickerColors","makeStickerColors","renderCube","cubePNG","element","document","createElement","setTimeout","svgElement","querySelector","targetImage","appendChild","can","ctx","getContext","loader","Image","onload","drawImage","src","toDataURL","svgAsXML","XMLSerializer","serializeToString","encodeURIComponent","SVG","arrow_1","defaultFaceRotations","faceVisible","getCubeOutlineGroup","svg","cubeOutlineGroup","group","opacity","attr","stroke-width","stroke-linejoin","renderCubeOutline","outlinePoints","polygon","fill","stroke","renderFaceStickers","stoke-opacity","centerPoint","renderSticker","getStickerColor","g","p1","p2","p3","p4","stickerColor","stickerPoints","Array","isArray","faceIndex","indexOf","colorIndex","renderOLLStickers","v1","v2","renderArrow","geometry","arrow","p1y","floor","s1","p1x","p2y","s2","p2x","center","s3","p3y","p3x","influence","p_","atan","lineSvg","path","color","headSvg","transform","style","renderOrder","sort","a","b","getRenderOrder","size","hiddenFaces","filter","visibleFaces","backgroundSvg","rect","backgroundColor","renderBackground","cubeOutlineGroup_1","ollGroup_1","stroke-opacity","getOllLayerGroup","arrowGroup","stroke-linecap","getArrowGroup","arrowDefinitions","arrows","parseArrows","__WEBPACK_AMD_DEFINE_RESULT__","undefined","supported","Doc","parser","draw","prepare","xmlns","xlink","svgjs","createElementNS","createSVGRect","did","eid","capitalize","setAttribute","extend","methods","pop","Set","inherit","invent","config","initializer","constructor","construct","parent","Container","adopt","node","instance","nodeName","parentNode","SVGElement","Nested","Gradient","Element","type","namespace","defs","setData","parse","getAttribute","body","getElementsByTagName","documentElement","nested","poly","polyline","native","addEventListener","regex","numberAndUnit","hex","rgb","reference","transforms","whitespace","isHex","isRgb","isCss","isBlank","isNumber","isPercent","isImage","delimiter","hyphen","pathLetters","isPathLetter","numbersWithDots","dots","utils","array","block","il","result","degrees","filterSVGElements","nodes","el","defaults","attrs","fill-opacity","cx","cy","rx","ry","stop-opacity","stop-color","font-size","font-family","text-anchor","Color","match","test","exec","replace","parseInt","substring","join","toString","toHex","compToHex","toRgb","brightness","morph","destination","at","isColor","fallback","valueOf","lastValue","lastDestination","settle","seen","split","string","trim","parseFloat","clone","array_clone","arr","PointArray","toLine","x1","y1","x2","y2","points","len","box","bbox","isNaN","getBBox","pathHandlers","p0","H","V","C","Q","T","A","mlhvqtcsa","jl","toUpperCase","PathArray","arrayToString","equalCommands","pathArray","sourceArray","destinationArray","paramCnt","pathRegReplace","prev","curr","concat","Point","Number","unit","isFinite","toJSON","plus","number","minus","times","divide","to","relative","_stroke","_event","_events","dom","proportionalSize","writeDataToDom","assignNewId","cloneNode","add","after","remove","removeElement","addTo","put","putIn","id","inside","show","hide","visible","classes","hasClass","addClass","removeClass","toggleClass","matches","doc","parents","selector","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","well","Parent","innerHTML","firstChild","childNodes","each","lines","fn","removeAttribute","keys","is","obj","easing","-","<>",">","<","from","MorphObj","Situation","init","reversed","reversing","duration","delay","start","Date","finish","ease","loop","loops","animations","styles","once","FX","_target","situations","active","situation","paused","lastPos","absPos","_speed","animate","queue","target","timeToAbsPos","timestamp","absPosToTime","startAnimFrame","stopAnimFrame","animationFrame","requestAnimationFrame","step","cancelAnimationFrame","startCurrent","initAnimations","shift","dequeue","stop","source","initialTransformation","matrixify","clearQueue","clearCurrent","jumpToEnd","atEnd","reset","temp","atStart","isAbsPos","durDivSpd","speed","pause","last","play","progress","easeIt","on","wrapper","e","detail","off","_callStart","during","eased","afterAll","duringAll","method","args","ignoreTime","absPosInt","lastLoop","max","Boolean","min","fire","fx","eachAt","self","Matrix","multiply","undo","extract","isEased","real","G","num","Text","plot","leading","ViewBox","update","Stop","Box","left","top","fullBox","merge","xMin","Infinity","xMax","yMin","yMax","pts","BBox","contains","Exception","topParent","Shape","clientLeft","clientTop","clientWidth","clientHeight","tbox","console","warn","rbox","RBox","getBoundingClientRect","addOffset","pageXOffset","pageYOffset","screenCTM","inverse","base","arrayToMatrix","abcdef","px","deltaTransformPoint","py","skewX","atan2","f","transformedX","sqrt","transformedY","skewY","scaleX","scaleY","parseMatrix","around","flip","skew","tan","createSVGMatrix","float32String","ctm","getCTM","getScreenCTM","point","createSVGPoint","matrixTransform","attributes","nodeValue","image","pattern","setAttributeNS","rebuild","ensureCentre","Rotate","Scale","Skew","Translate","untransform","str","kv","toParent","pCtm","toDoc","Transformation","inversed","params","_undo","cssText","camelCase","children","insertBefore","has","first","deep","removeChild","clear","hasChildNodes","lastChild","_defs","ungroup","depth","Defs","flatten","we","he","wm","hm","reg","offsetWidth","offsetHeight","zoom","event","listenerId","events","listener","binding","bag","_svgjsListenerId","ev","removeEventListener","data","Event","dispatchEvent","CustomEvent","cancelable","gbox","trans","getElementById","version","spof","nextSibling","siblings","position","next","previous","backward","front","back","before","Mask","targets","unmask","mask","maskWith","masker","ClipPath","unclip","clip","clipWith","clipper","gradient","fy","Pattern","patternUnits","Bare","words","text","createTextNode","symbol","Use","file","use","Rect","Circle","circle","Ellipse","ellipse","Line","line","Polyline","Polygon","_array","morphArray","Path","load","url","img","_loaded","ratio","_error","loaded","error","_rebuild","_build","oy","nodeType","newLined","textContent","build","tspan","newLine","textPath","blankLineOffset","dy","plain","Tspan","dx","getComputedTextLength","TextPath","track","link","linkTo","Marker","ref","marker","sugar","prefix","toLowerCase","charAt","comp","w","h","abs","extension","dmove","radius","getTotalLength","pointAt","getPointAtLength","font","members","elements","splice","set","remember","k","memory","forget","_memory","idFromReference","select","query","querySelectorAll","CustomEventPoly","bubbles","createEvent","initCustomEvent","lastTime","vendors","callback","currTime","getTime","timeToCall","clearTimeout","color_1","arrowPattern","parseArrow","raw","RegExp","parseColor","part","masking_1","simulation_1","algorithm_1","makeMasking","maskAlg","maskCubeData_1","parseAlgorithm","faceMappedStickers","cubeData","algorithm","_g","_h","_j","_k","_l","_m","_o","_p","_q","_r","_s","_t","_u","_v","_w","_x","_y","maskingFunctions","FL","F2L","LL","CLL","ELL","OLL","OCLL","OELL","COLL","OCELL","WV","VH","ELS","CLS","CMLL","CROSS","F2L3","F2L2","F2LSM","F2L1","F2B","LINE","masking","faceValues","getMove","getTurnType"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,GAAAH,GACA,iBAAAC,QACAA,QAAA,iBAAAD,IAEAD,EAAA,iBAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAT,QAAA,IAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,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KAAAM,GAAA,GACAR,EAAAG,EAAAD,KAAAO,GAAA,GACAT,EAAAG,EAAAD,KAAAQ,GAAA,GACAV,GACA6E,EAAA,SAAA7G,GACA,IAAA4G,EAAAf,KAAAsL,MAAAnR,EAAAsG,GACAQ,EAAA9G,EAAAsG,EACAnE,EAAAC,SAAA8E,QAAA,SAAAb,GACA2zB,EAAA3zB,GAAA+C,KAAAovB,EAAAuB,GAAA1zB,GAAAO,EAAAE,EAAAR,OAGAtG,EAAA,EAAmBA,EAAA+I,EAAiB/I,IACpC6G,EAAA7G,GAEA,OAAAg6B,iCCnNAt5B,OAAAC,eAAAnB,EAAA,cAA8CyB,OAAA,IAC9C,IAAA61B,EAAmBh3B,EAAQ,GAC3BqC,EAAkBrC,EAAQ,GAqB1B,SAAAm6B,EAAAzuB,GACA,GAAArJ,EAAAmB,cAAAoN,QAAAlF,EAAA0oB,OAAA,MACA,UAAA1tB,MAAA,iBAAAgF,EAAA,KAGA,OAAAA,EAAA0oB,OAAA,GAEA,SAAAgG,EAAA1uB,GACA,OAAAA,EAAA0oB,OAAA,IACA,KAAA/xB,EAAA0B,iBAAA0E,UACA,OAAAuuB,EAAA9uB,SAAAO,UACA,KAAApG,EAAA0B,iBAAA2E,iBACA,OAAAsuB,EAAA9uB,SAAAQ,iBACA,KAAArG,EAAA0B,iBAAA4E,OACA,OAAAquB,EAAA9uB,SAAAS,OACA,QACA,UAAAjC,MAAA,0BAAAgF,EAAA0oB,OAAA,iBAAA1oB,EAAA,MAjBAhM,EAAA23B,eAdA,SAAAG,GACA,OAAAA,EAGAA,EAAAtc,MAAA,KAAAlW,IAAA,SAAA0G,GACA,GAAAA,EAAApB,OAAA,EACA,UAAA5D,MAAA,iBAAAgF,EAAA,mBAAA8rB,EAAA,KAEA,OACA9rB,KAAAyuB,EAAAzuB,GACAZ,SAAAsvB,EAAA1uB,MARA","file":"main.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sr-visualizer\"] = factory();\n\telse\n\t\troot[\"sr-visualizer\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a, _b;\nvar constants_1 = require(\"./../constants\");\nvar Face;\n(function (Face) {\n Face[Face[\"U\"] = 0] = \"U\";\n Face[Face[\"R\"] = 1] = \"R\";\n Face[Face[\"F\"] = 2] = \"F\";\n Face[Face[\"D\"] = 3] = \"D\";\n Face[Face[\"L\"] = 4] = \"L\";\n Face[Face[\"B\"] = 5] = \"B\";\n})(Face = exports.Face || (exports.Face = {}));\nexports.AllFaces = [\n Face.U,\n Face.R,\n Face.F,\n Face.D,\n Face.L,\n Face.B,\n];\nvar FaceRotationVectors = /** @class */ (function () {\n function FaceRotationVectors() {\n }\n FaceRotationVectors.U = [0, -1, 0];\n FaceRotationVectors.R = [1, 0, 0];\n FaceRotationVectors.F = [0, 0, -1];\n FaceRotationVectors.D = [0, 1, 0];\n FaceRotationVectors.L = [-1, 0, 0];\n FaceRotationVectors.B = [0, 0, 1];\n return FaceRotationVectors;\n}());\nexports.FaceRotationVectors = FaceRotationVectors;\nexports.DefaultColorScheme = (_a = {},\n _a[Face.U] = constants_1.ColorCode.Yellow,\n _a[Face.R] = constants_1.ColorCode.Red,\n _a[Face.F] = constants_1.ColorCode.Blue,\n _a[Face.D] = constants_1.ColorCode.White,\n _a[Face.L] = constants_1.ColorCode.Orange,\n _a[Face.B] = constants_1.ColorCode.Green,\n _a);\nexports.JapaneseColorScheme = (_b = {},\n _b[Face.U] = constants_1.ColorCode.Blue,\n _b[Face.R] = constants_1.ColorCode.Orange,\n _b[Face.F] = constants_1.ColorCode.Green,\n _b[Face.D] = constants_1.ColorCode.White,\n _b[Face.L] = constants_1.ColorCode.Red,\n _b[Face.B] = constants_1.ColorCode.Yellow,\n _b);\nvar AlgorithmUnit;\n(function (AlgorithmUnit) {\n AlgorithmUnit[\"F\"] = \"F\";\n AlgorithmUnit[\"U\"] = \"U\";\n AlgorithmUnit[\"R\"] = \"R\";\n AlgorithmUnit[\"L\"] = \"L\";\n AlgorithmUnit[\"D\"] = \"D\";\n AlgorithmUnit[\"B\"] = \"B\";\n AlgorithmUnit[\"M\"] = \"M\";\n AlgorithmUnit[\"E\"] = \"E\";\n AlgorithmUnit[\"S\"] = \"S\";\n AlgorithmUnit[\"X\"] = \"x\";\n AlgorithmUnit[\"Y\"] = \"y\";\n AlgorithmUnit[\"Z\"] = \"z\";\n})(AlgorithmUnit = exports.AlgorithmUnit || (exports.AlgorithmUnit = {}));\nexports.possibleMoves = [\n AlgorithmUnit.F,\n AlgorithmUnit.U,\n AlgorithmUnit.R,\n AlgorithmUnit.L,\n AlgorithmUnit.D,\n AlgorithmUnit.B,\n AlgorithmUnit.M,\n AlgorithmUnit.E,\n AlgorithmUnit.S,\n AlgorithmUnit.X,\n AlgorithmUnit.Y,\n AlgorithmUnit.Z,\n];\nvar TurnAbbreviation;\n(function (TurnAbbreviation) {\n TurnAbbreviation[\"Clockwise\"] = \"\";\n TurnAbbreviation[\"CounterClockwise\"] = \"'\";\n TurnAbbreviation[\"Double\"] = \"2\";\n})(TurnAbbreviation = exports.TurnAbbreviation || (exports.TurnAbbreviation = {}));\nvar Masking;\n(function (Masking) {\n Masking[\"FL\"] = \"fl\";\n Masking[\"F2L\"] = \"f2l\";\n Masking[\"LL\"] = \"ll\";\n Masking[\"CLL\"] = \"cll\";\n Masking[\"ELL\"] = \"ell\";\n Masking[\"OLL\"] = \"oll\";\n Masking[\"OCLL\"] = \"ocll\";\n Masking[\"OELL\"] = \"oell\";\n Masking[\"COLL\"] = \"coll\";\n Masking[\"OCELL\"] = \"ocell\";\n Masking[\"WV\"] = \"wv\";\n Masking[\"VH\"] = \"vh\";\n Masking[\"ELS\"] = \"els\";\n Masking[\"CLS\"] = \"cls\";\n Masking[\"CMLL\"] = \"cmll\";\n Masking[\"CROSS\"] = \"cross\";\n Masking[\"F2L3\"] = \"f2l_3\";\n Masking[\"F2L2\"] = \"f2l_2\";\n Masking[\"F2LSM\"] = \"f2l_sm\";\n Masking[\"F2L1\"] = \"f2l_1\";\n Masking[\"F2B\"] = \"f2b\";\n Masking[\"LINE\"] = \"line\";\n})(Masking = exports.Masking || (exports.Masking = {}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a, _b;\nvar ColorCode;\n(function (ColorCode) {\n ColorCode[\"Black\"] = \"#000000\";\n ColorCode[\"DarkGray\"] = \"#404040\";\n ColorCode[\"Gray\"] = \"#808080\";\n ColorCode[\"Silver\"] = \"#BFBFBF\";\n ColorCode[\"White\"] = \"#FFFFFF\";\n ColorCode[\"Yellow\"] = \"#FEFE00\";\n ColorCode[\"Red\"] = \"#EE0000\";\n ColorCode[\"Orange\"] = \"#FFA100\";\n ColorCode[\"Blue\"] = \"#0000F2\";\n ColorCode[\"Green\"] = \"#00D800\";\n ColorCode[\"Purple\"] = \"#A83DD9\";\n ColorCode[\"Pink\"] = \"#F33D7B\";\n})(ColorCode = exports.ColorCode || (exports.ColorCode = {}));\nvar ColorName;\n(function (ColorName) {\n ColorName[\"Black\"] = \"black\";\n ColorName[\"DarkGray\"] = \"darkGray\";\n ColorName[\"Gray\"] = \"gray\";\n ColorName[\"Silver\"] = \"silver\";\n ColorName[\"White\"] = \"white\";\n ColorName[\"Yellow\"] = \"yellow\";\n ColorName[\"Red\"] = \"red\";\n ColorName[\"Orange\"] = \"orange\";\n ColorName[\"Blue\"] = \"blue\";\n ColorName[\"Green\"] = \"green\";\n ColorName[\"Purple\"] = \"purple\";\n ColorName[\"Pink\"] = \"pink\";\n})(ColorName = exports.ColorName || (exports.ColorName = {}));\nvar ColorAbbreviation;\n(function (ColorAbbreviation) {\n ColorAbbreviation[\"Black\"] = \"n\";\n ColorAbbreviation[\"DarkGray\"] = \"d\";\n ColorAbbreviation[\"Gray\"] = \"l\";\n ColorAbbreviation[\"Silver\"] = \"s\";\n ColorAbbreviation[\"White\"] = \"w\";\n ColorAbbreviation[\"Yellow\"] = \"y\";\n ColorAbbreviation[\"Red\"] = \"r\";\n ColorAbbreviation[\"Orange\"] = \"o\";\n ColorAbbreviation[\"Blue\"] = \"b\";\n ColorAbbreviation[\"Green\"] = \"g\";\n ColorAbbreviation[\"Purple\"] = \"m\";\n ColorAbbreviation[\"Pink\"] = \"p\";\n ColorAbbreviation[\"Transparent\"] = \"t\";\n})(ColorAbbreviation = exports.ColorAbbreviation || (exports.ColorAbbreviation = {}));\nexports.ColorNameToCode = (_a = {},\n _a[ColorName.Black] = ColorCode.Black,\n _a[ColorName.DarkGray] = ColorCode.DarkGray,\n _a[ColorName.Gray] = ColorCode.Gray,\n _a[ColorName.Silver] = ColorCode.Silver,\n _a[ColorName.White] = ColorCode.White,\n _a[ColorName.Yellow] = ColorCode.Yellow,\n _a[ColorName.Red] = ColorCode.Red,\n _a[ColorName.Orange] = ColorCode.Orange,\n _a[ColorName.Blue] = ColorCode.Blue,\n _a[ColorName.Green] = ColorCode.Green,\n _a[ColorName.Purple] = ColorCode.Purple,\n _a[ColorName.Pink] = ColorCode.Pink,\n _a);\nexports.ColorAbbreviationToCode = (_b = {},\n _b[ColorAbbreviation.Black] = ColorCode.Black,\n _b[ColorAbbreviation.DarkGray] = ColorCode.DarkGray,\n _b[ColorAbbreviation.Gray] = ColorCode.Gray,\n _b[ColorAbbreviation.Silver] = ColorCode.Silver,\n _b[ColorAbbreviation.White] = ColorCode.White,\n _b[ColorAbbreviation.Yellow] = ColorCode.Yellow,\n _b[ColorAbbreviation.Red] = ColorCode.Red,\n _b[ColorAbbreviation.Orange] = ColorCode.Orange,\n _b[ColorAbbreviation.Blue] = ColorCode.Blue,\n _b[ColorAbbreviation.Green] = ColorCode.Green,\n _b[ColorAbbreviation.Purple] = ColorCode.Purple,\n _b[ColorAbbreviation.Pink] = ColorCode.Pink,\n _b[ColorAbbreviation.Transparent] = null,\n _b);\n","\"use strict\";\n/**\n * Methods for manipulating points in 3d space (Vec3)\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Axis;\n(function (Axis) {\n Axis[Axis[\"X\"] = 0] = \"X\";\n Axis[Axis[\"Y\"] = 1] = \"Y\";\n Axis[Axis[\"Z\"] = 2] = \"Z\";\n})(Axis = exports.Axis || (exports.Axis = {}));\nfunction makeMatrix(rows, cols) {\n var matrix = [];\n for (var r = 0; r < rows; r++) {\n matrix[r] = [];\n for (var c = 0; c < cols; c++) {\n matrix[r][c] = null;\n }\n }\n return matrix;\n}\nexports.makeMatrix = makeMatrix;\nfunction translate(pos, v) {\n return pos.map(function (value, index) { return value + v[index]; });\n}\nexports.translate = translate;\nfunction scale(pos, scalar) {\n return pos.map(function (v) { return v * scalar; });\n}\nexports.scale = scale;\n// Scale a point relative to position vector\nfunction transScale(pos, v, scalar) {\n // Translate each facelet to cf\n var iv = v.map(function (x) { return -x; });\n return translate(scale(translate(pos, iv), scalar), v);\n}\nexports.transScale = transScale;\nfunction rotate(pos, axis, radians) {\n var newPosition = pos.slice();\n switch (axis) {\n case Axis.X:\n newPosition[2] = (pos[2] * Math.cos(radians)) - (pos[1] * Math.sin(radians));\n newPosition[1] = (pos[2] * Math.sin(radians)) + (pos[1] * Math.cos(radians));\n break;\n case Axis.Y:\n newPosition[0] = (pos[0] * Math.cos(radians)) + (pos[2] * Math.sin(radians));\n newPosition[2] = -pos[0] * Math.sin(radians) + pos[2] * Math.cos(radians);\n break;\n case Axis.Z:\n newPosition[0] = (pos[0] * Math.cos(radians)) - (pos[1] * Math.sin(radians));\n newPosition[1] = (pos[0] * Math.sin(radians)) + (pos[1] * Math.cos(radians));\n break;\n }\n return newPosition;\n}\nexports.rotate = rotate;\nfunction project(pos, d) {\n return [\n pos[0] * d / pos[2],\n pos[1] * d / pos[2],\n pos[2] // Maintain z coordinate to allow use of rendering tricks\n ];\n}\nexports.project = project;\nfunction radians2Degrees(radians) {\n return radians * 180 / Math.PI;\n}\nexports.radians2Degrees = radians2Degrees;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Utlity Methods for creating 2D coodinates for svg polygons\n */\nvar constants_1 = require(\"./constants\");\nvar math_1 = require(\"../math\");\n/**\n * Applies set of rotations to all face rotation vectors.\n */\nfunction rotateFaces(faceRotations, rotations) {\n return constants_1.AllFaces.reduce(function (acc, face) {\n rotations.forEach(function (rotation) {\n if (!acc[face]) {\n acc[face] = faceRotations[face].slice();\n }\n acc[face] = math_1.rotate(acc[face], rotation[0], Math.PI * rotation[1] / 180);\n });\n return acc;\n }, {});\n}\nexports.rotateFaces = rotateFaces;\nfunction makeStickerPosition(face, cubeSize, x, y) {\n switch (face) {\n case constants_1.Face.U: return [x, 0, cubeSize - y];\n case constants_1.Face.R: return [cubeSize, y, x];\n case constants_1.Face.F: return [x, y, 0];\n case constants_1.Face.D: return [x, cubeSize, y];\n case constants_1.Face.L: return [0, y, cubeSize - x];\n case constants_1.Face.B: return [cubeSize - x, y, cubeSize];\n default: throw new Error(\"Unknown cube face: '\" + face + \"'\");\n }\n}\nexports.makeStickerPosition = makeStickerPosition;\n/**\n * Creates 2D coordinates for stickers of a given face of the cube.\n */\nfunction makeFaceStickers(face, options) {\n var stickers = math_1.makeMatrix(options.cubeSize + 1, options.cubeSize + 1);\n for (var row = 0; row <= options.cubeSize; row++) {\n var _loop_1 = function (col) {\n var sticker = makeStickerPosition(face, options.cubeSize, row, col);\n // Now scale and tranform point to ensure size/pos independent of dim\n var centerTranslation = [-options.cubeSize / 2, -options.cubeSize / 2, -options.cubeSize / 2];\n sticker = math_1.translate(sticker, centerTranslation);\n sticker = math_1.scale(sticker, 1 / options.cubeSize);\n // Rotate cube as per perameter settings\n options.viewportRotations.forEach(function (rotation) {\n sticker = math_1.rotate(sticker, rotation[0], Math.PI * rotation[1] / 180);\n });\n // Move cube away from viewer\n sticker = math_1.translate(sticker, [0, 0, options.dist]);\n // Finally project the 3D points onto 2D\n sticker = math_1.project(sticker, options.dist);\n stickers[row][col] = sticker;\n };\n for (var col = 0; col <= options.cubeSize; col++) {\n _loop_1(col);\n }\n }\n return stickers;\n}\nexports.makeFaceStickers = makeFaceStickers;\n/**\n * Creates geometry for rubiks cube stickers. Contains 2D coordinates\n * for drawing svg polygons\n */\nfunction makeCubeGeometry(options) {\n if (options.view === 'plan') {\n options.viewportRotations = [\n [math_1.Axis.X, -90]\n ];\n }\n return constants_1.AllFaces.reduce(function (acc, face) {\n acc[face] = makeFaceStickers(face, options);\n return acc;\n }, {});\n}\nexports.makeCubeGeometry = makeCubeGeometry;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a, _b, _c, _d, _e, _f;\nvar math_1 = require(\"./../math\");\nvar constants_1 = require(\"./constants\");\nvar TurnType;\n(function (TurnType) {\n TurnType[TurnType[\"Clockwise\"] = 0] = \"Clockwise\";\n TurnType[TurnType[\"CounterClockwise\"] = 1] = \"CounterClockwise\";\n TurnType[TurnType[\"Double\"] = 2] = \"Double\";\n})(TurnType = exports.TurnType || (exports.TurnType = {}));\nvar faceIdentity = function (stickerNumber, cubeSize) { return stickerNumber; };\nvar counterClockwiseSticker = function (stickerNumber, cubeSize) { return (stickerNumber * cubeSize) % ((cubeSize * cubeSize) + 1); };\nvar clockwiseSticker = function (stickerNumber, cubeSize) {\n var numStickers = cubeSize * cubeSize;\n return (numStickers + 1) - counterClockwiseSticker(stickerNumber, cubeSize);\n};\nvar doubleTurn = function (stickerNumber, cubeSize) {\n return ((cubeSize * cubeSize) - stickerNumber) + 1;\n};\nvar OppositeTurn = (_a = {},\n _a[TurnType.Clockwise] = TurnType.CounterClockwise,\n _a[TurnType.CounterClockwise] = TurnType.Clockwise,\n _a[TurnType.Double] = TurnType.Double,\n _a);\n// Faces that wrap around a given axis\nvar AxisMapping = (_b = {},\n _b[math_1.Axis.X] = [constants_1.Face.U, constants_1.Face.B, constants_1.Face.F, constants_1.Face.D],\n _b[math_1.Axis.Y] = [constants_1.Face.L, constants_1.Face.B, constants_1.Face.R, constants_1.Face.F],\n _b[math_1.Axis.Z] = [constants_1.Face.L, constants_1.Face.U, constants_1.Face.R, constants_1.Face.D],\n _b);\n// Face's orientation related to other faces on a given axis\nvar AxisOrientation = (_c = {},\n _c[math_1.Axis.X] = (_d = {},\n _d[constants_1.Face.U] = faceIdentity,\n _d[constants_1.Face.B] = doubleTurn,\n _d[constants_1.Face.F] = faceIdentity,\n _d[constants_1.Face.D] = faceIdentity,\n _d[constants_1.Face.L] = null,\n _d[constants_1.Face.R] = null,\n _d),\n _c[math_1.Axis.Y] = (_e = {},\n _e[constants_1.Face.U] = null,\n _e[constants_1.Face.B] = counterClockwiseSticker,\n _e[constants_1.Face.F] = counterClockwiseSticker,\n _e[constants_1.Face.D] = null,\n _e[constants_1.Face.L] = counterClockwiseSticker,\n _e[constants_1.Face.R] = counterClockwiseSticker,\n _e),\n _c[math_1.Axis.Z] = (_f = {},\n _f[constants_1.Face.U] = counterClockwiseSticker,\n _f[constants_1.Face.B] = null,\n _f[constants_1.Face.F] = null,\n _f[constants_1.Face.D] = clockwiseSticker,\n _f[constants_1.Face.L] = faceIdentity,\n _f[constants_1.Face.R] = doubleTurn,\n _f),\n _c);\nvar CubeData = /** @class */ (function () {\n function CubeData(cubeSize, initialValues) {\n this.cubeSize = cubeSize;\n /**\n * Data to store face value\n * data saved in flat array [1, 2, 3, 4, 5, 6, 7, 8, 9]\n * maps to cube stickers like this\n *\n * U Face\n * 1 | 2 | 3\n * ----------\n * 4 | 5 | 6\n * ----------\n * 7 | 8 | 9\n *\n * Stickers are numbered in that manner starting with the U face\n * continuing with this order U, R, F, D, L, B\n *\n * Because each face has a differen't orientation it may not be clear\n * how the back faces are numbered. Below is an example 3x3 mapping\n *\n * Example numbers of 3x3 cube. nxn cubes follow the same pattern\n *\n * B\n * L U R\n * F\n * D\n * | 54 | 53 | 52 |\n * -----------------\n * | 51 | 50 | 49 |\n * -----------------\n * | 48 | 47 | 46 |\n * ----------------- -----------------\n * 43 | 40 | 37 1 | 2 | 3 12 | 15 | 18\n * ----------------- ----------------- -----------------\n * 44 | 41 | 38 4 | 5 | 6 11 | 14 | 17\n * ----------------- ----------------- -----------------\n * 45 | 42 | 39 7 | 8 | 9 10 | 13 | 16\n * ----------------- -----------------\n * | 19 | 20 | 21 |\n * -----------------\n * | 22 | 23 | 24 |\n * -----------------\n * | 25 | 26 | 27 |\n *\n * | 28 | 29 | 30 |\n * -----------------\n * | 31 | 32 | 33 |\n * -----------------\n * | 34 | 35 | 36 |\n */\n this.faces = {};\n this.numStickers = this.cubeSize * this.cubeSize;\n this.clockwiseMapping = [];\n this.counterClockwiseMapping = [];\n this.doubleMapping = [];\n this.faces = initialValues;\n if (!this.faces) {\n this.initValues();\n }\n for (var i = 1; i <= this.numStickers; i++) {\n this.clockwiseMapping.push(clockwiseSticker(i, cubeSize));\n this.counterClockwiseMapping.push(counterClockwiseSticker(i, cubeSize));\n this.doubleMapping.push(doubleTurn(i, cubeSize));\n }\n }\n CubeData.prototype.initValues = function () {\n var _this = this;\n var currentValue = 1;\n constants_1.AllFaces.forEach(function (face) {\n _this.faces[face] = [];\n for (var i = 0; i < _this.numStickers; i++) {\n _this.faces[face].push(currentValue++);\n }\n });\n };\n /**\n * Rotates values on an outer face of the rubiks cubes\n */\n CubeData.prototype.rotateFace = function (face, turn) {\n var _this = this;\n // TODO more efficient rotation to not construct so many new arrays\n switch (turn) {\n case TurnType.Clockwise:\n this.faces[face] = this.clockwiseMapping.map(function (newStickerNumber) { return _this.faces[face][newStickerNumber - 1]; });\n break;\n case TurnType.CounterClockwise:\n this.faces[face] = this.counterClockwiseMapping.map(function (newStickerNumber) { return _this.faces[face][newStickerNumber - 1]; });\n break;\n case TurnType.Double:\n this.faces[face].reverse();\n break;\n }\n };\n /**\n * Rotates layer values around a given axis\n */\n CubeData.prototype.axisRotation = function (offset, range, axis, faceOrder, forward, double) {\n var _this = this;\n if (forward === void 0) { forward = true; }\n if (double === void 0) { double = false; }\n if (!forward) {\n faceOrder.reverse();\n }\n // Copy original values to avoid clobbering values when modifying stickers\n var originalValues = faceOrder.map(function (face) { return _this.faces[face].slice(); });\n // Copy values\n for (var i = 0; i < this.cubeSize; i++) {\n for (var r = 0; r < range; r++) {\n var stickerIndex = (this.cubeSize * i) + (offset + r);\n for (var j = 0; j < faceOrder.length; j++) {\n var face = faceOrder[j];\n var nextFace = double ? faceOrder[(j + 2) % faceOrder.length] : faceOrder[(j + 1) % faceOrder.length];\n var valueIndex = AxisOrientation[axis][face](stickerIndex + 1, this.cubeSize) - 1;\n var nextFaceValueIndex = AxisOrientation[axis][nextFace](stickerIndex + 1, this.cubeSize) - 1;\n this.faces[face][valueIndex] = originalValues[(double ? j + 2 : j + 1) % originalValues.length][nextFaceValueIndex];\n }\n }\n }\n };\n /**\n * Rotate layers around the x axis of the cube\n */\n CubeData.prototype.xLayersRotation = function (offset, forward, double, range) {\n if (forward === void 0) { forward = true; }\n if (double === void 0) { double = false; }\n if (range === void 0) { range = 1; }\n var faceOrder = [constants_1.Face.U, constants_1.Face.F, constants_1.Face.D, constants_1.Face.B];\n this.axisRotation(offset, range, math_1.Axis.X, faceOrder, forward, double);\n };\n /**\n * Rotate layers around the y axis of the cube\n */\n CubeData.prototype.yLayersRotation = function (offset, forward, double, range) {\n if (forward === void 0) { forward = true; }\n if (double === void 0) { double = false; }\n if (range === void 0) { range = 1; }\n var faceOrder = [constants_1.Face.L, constants_1.Face.F, constants_1.Face.R, constants_1.Face.B];\n this.axisRotation(offset, range, math_1.Axis.Y, faceOrder, forward, double);\n };\n /**\n * Rotate layers around the z axis of the cube\n */\n CubeData.prototype.zLayersRotation = function (offset, forward, double, range) {\n if (forward === void 0) { forward = true; }\n if (double === void 0) { double = false; }\n if (range === void 0) { range = 1; }\n var faceOrder = [constants_1.Face.U, constants_1.Face.L, constants_1.Face.D, constants_1.Face.R];\n this.axisRotation(offset, range, math_1.Axis.Z, faceOrder, forward, double);\n };\n CubeData.prototype.rTurn = function (turnType) {\n this.rotateFace(constants_1.Face.R, turnType);\n this.xLayersRotation(this.cubeSize - 1, turnType === TurnType.Clockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.lTurn = function (turnType) {\n this.rotateFace(constants_1.Face.L, turnType);\n this.xLayersRotation(0, turnType === TurnType.CounterClockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.uTurn = function (turnType) {\n this.rotateFace(constants_1.Face.U, turnType);\n this.yLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.dTurn = function (turnType) {\n this.rotateFace(constants_1.Face.D, turnType);\n this.yLayersRotation(this.cubeSize - 1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.fTurn = function (turnType) {\n this.rotateFace(constants_1.Face.F, turnType);\n this.zLayersRotation(this.cubeSize - 1, turnType === TurnType.Clockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.bTurn = function (turnType) {\n this.rotateFace(constants_1.Face.B, turnType);\n this.zLayersRotation(0, turnType === TurnType.CounterClockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.mTurn = function (turnType) {\n if (this.cubeSize < 2)\n return;\n this.xLayersRotation(1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double, this.cubeSize - 2);\n };\n CubeData.prototype.eTurn = function (turnType) {\n if (this.cubeSize < 2)\n return;\n this.yLayersRotation(1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double, this.cubeSize - 2);\n };\n CubeData.prototype.sTurn = function (turnType) {\n if (this.cubeSize < 2)\n return;\n this.zLayersRotation(1, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize - 2);\n };\n CubeData.prototype.xTurn = function (turnType) {\n this.rotateFace(constants_1.Face.R, turnType);\n this.rotateFace(constants_1.Face.L, OppositeTurn[turnType]);\n this.xLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize);\n };\n CubeData.prototype.yTurn = function (turnType) {\n this.rotateFace(constants_1.Face.U, turnType);\n this.rotateFace(constants_1.Face.D, OppositeTurn[turnType]);\n this.yLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize);\n };\n CubeData.prototype.zTurn = function (turnType) {\n this.rotateFace(constants_1.Face.F, turnType);\n this.rotateFace(constants_1.Face.B, OppositeTurn[turnType]);\n this.zLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize);\n };\n CubeData.prototype.turn = function (turn) {\n switch (turn.move) {\n case constants_1.AlgorithmUnit.F:\n this.fTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.B:\n this.bTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.U:\n this.uTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.D:\n this.dTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.R:\n this.rTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.L:\n this.lTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.M:\n this.mTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.E:\n this.eTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.S:\n this.sTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.X:\n this.xTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.Y:\n this.yTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.Z:\n this.zTurn(turn.turnType);\n break;\n default:\n throw new Error(\"Unrecognized move in turn \" + JSON.stringify(turn));\n }\n };\n return CubeData;\n}());\nexports.CubeData = CubeData;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __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 };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"./cube/geometry\");\nvar math_1 = require(\"./math\");\nvar drawing_1 = require(\"./cube/drawing\");\nvar constants_1 = require(\"./cube/constants\");\nvar stickers_1 = require(\"./cube/stickers\");\nvar constants_2 = require(\"./constants\");\nvar defaultOptions = {\n cubeSize: 3,\n width: 128,\n height: 128,\n viewportRotations: [\n [math_1.Axis.Y, 45],\n [math_1.Axis.X, -34],\n ],\n colorScheme: constants_1.DefaultColorScheme,\n cubeColor: constants_2.ColorName.Black,\n cubeOpacity: 100,\n stickerOpacity: 100,\n dist: 5,\n outlineWidth: .94,\n strokeWidth: 0,\n viewbox: {\n x: -0.9,\n y: -0.9,\n width: 1.8,\n height: 1.8,\n }\n};\nfunction cubeSVG(container, extraOptions) {\n if (extraOptions === void 0) { extraOptions = {}; }\n var options = __assign({}, defaultOptions, extraOptions);\n var geomety = geometry_1.makeCubeGeometry(options);\n options.stickerColors = stickers_1.makeStickerColors(options);\n drawing_1.renderCube(container, geomety, options);\n}\nexports.cubeSVG = cubeSVG;\nfunction cubePNG(container, extraOptions) {\n if (extraOptions === void 0) { extraOptions = {}; }\n var element = document.createElement('div');\n cubeSVG(element, extraOptions);\n setTimeout(function () {\n var svgElement = element.querySelector('svg');\n var targetImage = document.createElement('img'); // Where to draw the result\n container.appendChild(targetImage);\n var can = document.createElement('canvas'); // Not shown on page\n var ctx = can.getContext('2d');\n var loader = new Image; // Not shown on page\n loader.width = can.width = targetImage.width = extraOptions.width || 128;\n loader.height = can.height = targetImage.height = extraOptions.height || 128;\n loader.onload = function () {\n ctx.drawImage(loader, 0, 0, loader.width, loader.height);\n targetImage.src = can.toDataURL();\n };\n var svgAsXML = (new XMLSerializer).serializeToString(svgElement);\n loader.src = 'data:image/svg+xml,' + encodeURIComponent(svgAsXML);\n });\n}\nexports.cubePNG = cubePNG;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a;\nvar constants_1 = require(\"./../constants\");\nvar SVG = require(\"svg.js\");\nvar geometry_1 = require(\"./geometry\");\nvar math_1 = require(\"../math\");\nvar constants_2 = require(\"./constants\");\nvar arrow_1 = require(\"./parsing/arrow\");\n/**\n * Utility methods for rendering cube geometry using svg.js\n */\n// Rotation vectors to track visibility of each face\nvar defaultFaceRotations = (_a = {},\n _a[constants_2.Face.U] = [0, -1, 0],\n _a[constants_2.Face.R] = [1, 0, 0],\n _a[constants_2.Face.F] = [0, 0, -1],\n _a[constants_2.Face.D] = [0, 1, 1],\n _a[constants_2.Face.L] = [-1, 0, 0],\n _a[constants_2.Face.B] = [0, 0, 1],\n _a);\nfunction renderCube(container, geometry, options) {\n var faceRotations = geometry_1.rotateFaces(defaultFaceRotations, options.viewportRotations);\n var renderOrder = getRenderOrder(faceRotations);\n var svg = SVG(container).size(options.width, options.height);\n svg.viewbox(options.viewbox.x, options.viewbox.y, options.viewbox.width, options.viewbox.height);\n var hiddenFaces = renderOrder.filter(function (face) { return !faceVisible(face, faceRotations); });\n var visibleFaces = renderOrder.filter(function (face) { return faceVisible(face, faceRotations); });\n renderBackground(svg, options);\n // Render hidden faces if cube color has transparency\n if (options.cubeOpacity < 100) {\n var cubeOutlineGroup_1 = getCubeOutlineGroup(svg, options);\n hiddenFaces.forEach(function (face) {\n renderFaceStickers(svg, face, geometry[face], options);\n renderCubeOutline(cubeOutlineGroup_1, geometry[face], options);\n });\n }\n var cubeOutlineGroup = getCubeOutlineGroup(svg, options);\n visibleFaces.forEach(function (face) {\n renderCubeOutline(cubeOutlineGroup, geometry[face], options);\n renderFaceStickers(svg, face, geometry[face], options);\n });\n if (options.view === 'plan') {\n var ollGroup_1 = getOllLayerGroup(svg, options);\n [constants_2.Face.R, constants_2.Face.F, constants_2.Face.L, constants_2.Face.B].forEach(function (face) {\n renderOLLStickers(ollGroup_1, face, geometry[face], faceRotations, options);\n });\n }\n var arrowGroup = getArrowGroup(svg, geometry[0].length - 1);\n var arrowDefinitions = [];\n if (Array.isArray(options.arrows)) {\n arrowDefinitions = options.arrows;\n }\n else if (typeof options.arrows === 'string') {\n arrowDefinitions = arrow_1.parseArrows(options.arrows);\n }\n arrowDefinitions.forEach(function (arrow) {\n renderArrow(arrowGroup, geometry, arrow);\n });\n}\nexports.renderCube = renderCube;\n/**\n * Determines face render order based on z position. Faces further away\n * will render first so anything closer will be drawn on top.\n */\nfunction getRenderOrder(faceRotations) {\n var renderOrder = constants_2.AllFaces.slice().sort(function (a, b) {\n return faceRotations[b][2] - faceRotations[a][2];\n });\n return renderOrder;\n}\nfunction renderBackground(svg, options) {\n var backgroundSvg = svg.rect(options.viewbox.width, options.viewbox.height);\n backgroundSvg.x(options.viewbox.x);\n backgroundSvg.y(options.viewbox.y);\n if (!options.backgroundColor) {\n backgroundSvg.fill('none');\n backgroundSvg.opacity(0);\n }\n else {\n backgroundSvg.fill({\n color: options.backgroundColor\n });\n }\n}\nfunction faceVisible(face, rotations) {\n return rotations[face][2] < -0.105;\n}\nfunction getCubeOutlineGroup(svg, options) {\n var cubeOutlineGroup = svg.group();\n cubeOutlineGroup.opacity(options.cubeOpacity / 100);\n cubeOutlineGroup.attr({\n 'stroke-width': '0.1',\n 'stroke-linejoin': 'round',\n });\n return cubeOutlineGroup;\n}\nfunction getOllLayerGroup(svg, options) {\n var group = svg.group();\n group.opacity(options.stickerOpacity / 100);\n group.attr({\n 'stroke-opacity': '1',\n 'stroke-width': 0.02,\n 'stroke-linejoin': 'round'\n });\n return group;\n}\nfunction getArrowGroup(svg, cubeSize) {\n var arrowGroup = svg.group();\n arrowGroup.attr({\n 'opacity': 1,\n 'stroke-opacity': 1,\n 'stroke-width': (.12 / cubeSize),\n 'stroke-linecap': 'round'\n });\n return arrowGroup;\n}\nfunction renderCubeOutline(svg, face, options) {\n var cubeSize = face.length - 1;\n var width = options.outlineWidth;\n var outlinePoints = [\n [face[0][0][0] * width, face[0][0][1] * width],\n [face[cubeSize][0][0] * width, face[cubeSize][0][1] * width],\n [face[cubeSize][cubeSize][0] * width, face[cubeSize][cubeSize][1] * width],\n [face[0][cubeSize][0] * width, face[0][cubeSize][1] * width],\n ];\n var polygon = svg.polygon(outlinePoints);\n polygon.fill(options.cubeColor);\n polygon.stroke(options.cubeColor);\n return polygon;\n}\nfunction renderFaceStickers(svg, face, stickers, options) {\n var cubeSize = stickers.length - 1;\n var group = svg.group();\n group.opacity(options.stickerOpacity / 100);\n group.attr({\n 'stoke-opacity': '0.5',\n 'stroke-width': options.strokeWidth,\n 'stroke-linejoin': 'round'\n });\n for (var i = 0; i < cubeSize; i++) {\n for (var j = 0; j < cubeSize; j++) {\n var centerPoint = [\n (stickers[j][i][0] + stickers[j + 1][i + 1][0]) / 2,\n (stickers[j][i][1] + stickers[j + 1][i + 1][1]) / 2,\n 0\n ];\n // Scale points in towards centre\n var p1 = math_1.transScale(stickers[j][i], centerPoint, .85);\n var p2 = math_1.transScale(stickers[j + 1][i], centerPoint, .85);\n var p3 = math_1.transScale(stickers[j + 1][i + 1], centerPoint, .85);\n var p4 = math_1.transScale(stickers[j][i + 1], centerPoint, .85);\n var color = getStickerColor(face, i, j, options);\n renderSticker(group, p1, p2, p3, p4, color, options.cubeColor);\n }\n }\n return group;\n}\nfunction renderSticker(g, p1, p2, p3, p4, stickerColor, cubeColor) {\n var stickerPoints = [\n [p1[0], p1[1]],\n [p2[0], p2[1]],\n [p3[0], p3[1]],\n [p4[0], p4[1]],\n ];\n var polygon = g.polygon(stickerPoints);\n polygon.fill(stickerColor);\n polygon.stroke(cubeColor);\n return polygon;\n}\n/**\n * Starting with U, stickers are numbered from\n * their face starting with the top left corner\n * sticker.\n *\n * U Face\n * 1 | 2 | 3\n * ----------\n * 4 | 5 | 6\n * ----------\n * 7 | 8 | 9\n *\n * And so on for faces R, F, D, L, B.\n * So R's top left corner for a 3x3 cube would be # 10\n *\n * An individual sticker's color is obtained by indexing\n * into the array of sticker colors by the number the sticker is\n */\nfunction getStickerColor(face, row, col, options) {\n if (!Array.isArray(options.stickerColors)) {\n return options.colorScheme[face] || constants_1.ColorName.Black;\n }\n var faceIndex = constants_2.AllFaces.indexOf(face);\n var stickerNumber = (row * options.cubeSize) + col;\n var colorIndex = faceIndex * (options.cubeSize * options.cubeSize) + stickerNumber;\n if (options.stickerColors.length <= colorIndex) {\n return constants_1.ColorName.Black;\n }\n return options.stickerColors[colorIndex];\n}\n// Renders the top rim of the R U L and B faces out from side of cube\nfunction renderOLLStickers(group, face, stickers, rotations, options) {\n // Translation vector, to move faces out\n var v1 = math_1.scale(rotations[face], 0);\n var v2 = math_1.scale(rotations[face], .2);\n for (var i = 0; i < options.cubeSize; i++) {\n // find center point of sticker\n var centerPoint = [\n (stickers[i][0][0] + stickers[i + 1][1][0]) / 2,\n (stickers[i][0][1] + stickers[i + 1][1][1]) / 2,\n 0\n ];\n var p1 = math_1.translate(math_1.transScale(stickers[i][0], centerPoint, .94), v1);\n var p2 = math_1.translate(math_1.transScale(stickers[i + 1][0], centerPoint, .94), v1);\n var p3 = math_1.translate(math_1.transScale(stickers[i + 1][1], centerPoint, .94), v2);\n var p4 = math_1.translate(math_1.transScale(stickers[i][1], centerPoint, .94), v2);\n renderSticker(group, p1, p2, p3, p4, getStickerColor(face, 0, i, options), options.cubeColor);\n }\n}\nexports.renderOLLStickers = renderOLLStickers;\n/**\n * Generates svg for an arrow pointing from sticker s1 to s2\n */\nfunction renderArrow(group, geometry, arrow) {\n var cubeSize = geometry[0].length - 1;\n // Find center point for each facelet\n var p1y = Math.floor(arrow.s1.n / cubeSize);\n var p1x = arrow.s1.n % cubeSize;\n var p1 = [\n (geometry[arrow.s1.face][p1x][p1y][0] + geometry[arrow.s1.face][p1x + 1][p1y + 1][0]) / 2,\n (geometry[arrow.s1.face][p1x][p1y][1] + geometry[arrow.s1.face][p1x + 1][p1y + 1][1]) / 2,\n 0\n ];\n var p2y = Math.floor(arrow.s2.n / cubeSize);\n var p2x = arrow.s2.n % cubeSize;\n var p2 = [\n (geometry[arrow.s1.face][p2x][p2y][0] + geometry[arrow.s1.face][p2x + 1][p2y + 1][0]) / 2,\n (geometry[arrow.s1.face][p2x][p2y][1] + geometry[arrow.s1.face][p2x + 1][p2y + 1][1]) / 2,\n 0\n ];\n // Find midpoint between p1 and p2\n var center = [\n (p1[0] + p2[0]) / 2,\n (p1[1] + p2[1]) / 2,\n 0\n ];\n // Shorten arrows towards midpoint according to config\n p1 = math_1.transScale(p1, center, arrow.scale / 10);\n p2 = math_1.transScale(p2, center, arrow.scale / 10);\n var p3;\n if (arrow.s3) {\n var p3y = Math.floor(arrow.s3.n / cubeSize);\n var p3x = arrow.s3.n % cubeSize;\n p3 = [\n (geometry[arrow.s1.face][p3x][p3y][0] + geometry[arrow.s1.face][p3x + 1][p3y + 1][0]) / 2,\n (geometry[arrow.s1.face][p3x][p3y][1] + geometry[arrow.s1.face][p3x + 1][p3y + 1][1]) / 2,\n 0\n ];\n p3 = math_1.transScale(p3, center, arrow.influence / 5);\n }\n // Calculate arrow rotation\n var p_ = p3 ? p3 : p1;\n var rotation = p_[1] > p2[1] ? 270 : 90;\n if (p2[0] - p_[0] != 0) {\n rotation = math_1.radians2Degrees(Math.atan((p2[1] - p_[1]) / (p2[0] - p_[0])));\n rotation = (p_[0] > p2[0]) ? rotation + 180 : rotation;\n }\n // Draw line\n var lineSvg = group.path(\"M \" + p1[0] + \",\" + p1[1] + \" \" + (p3 ? 'Q ' + p3[0] + ',' + p3[1] : 'L') + \" \" + p2[0] + \",\" + p2[1]);\n lineSvg.fill('none');\n lineSvg.stroke({\n color: arrow.color,\n opacity: 1\n });\n // Draw arrow head\n var headSvg = group.path('M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z');\n headSvg.attr({\n transform: \"translate(\" + p2[0] + \",\" + p2[1] + \") scale(\" + .033 / cubeSize + \") rotate(\" + rotation + \")\"\n });\n headSvg.style({\n fill: arrow.color\n });\n headSvg.attr({\n 'stroke-width': 0,\n 'stroke-linejoin': 'round'\n });\n}\nexports.renderArrow = renderArrow;\n","/*!\n* svg.js - A lightweight library for manipulating and animating SVG.\n* @version 2.7.1\n* https://svgdotjs.github.io/\n*\n* @copyright Wout Fierens \n* @license MIT\n*\n* BUILT: Fri Nov 30 2018 10:01:55 GMT+0100 (GMT+01:00)\n*/;\n(function(root, factory) {\r\n /* istanbul ignore next */\r\n if (typeof define === 'function' && define.amd) {\r\n define(function(){\r\n return factory(root, root.document)\r\n })\r\n } else if (typeof exports === 'object') {\r\n module.exports = root.document ? factory(root, root.document) : function(w){ return factory(w, w.document) }\r\n } else {\r\n root.SVG = factory(root, root.document)\r\n }\r\n}(typeof window !== \"undefined\" ? window : this, function(window, document) {\r\n\r\n// Find global reference - uses 'this' by default when available,\r\n// falls back to 'window' otherwise (for bundlers like Webpack)\r\nvar globalRef = (typeof this !== \"undefined\") ? this : window;\r\n\r\n// The main wrapping element\r\nvar SVG = globalRef.SVG = function(element) {\r\n if (SVG.supported) {\r\n element = new SVG.Doc(element)\r\n\r\n if(!SVG.parser.draw)\r\n SVG.prepare()\r\n\r\n return element\r\n }\r\n}\r\n\r\n// Default namespaces\r\nSVG.ns = 'http://www.w3.org/2000/svg'\r\nSVG.xmlns = 'http://www.w3.org/2000/xmlns/'\r\nSVG.xlink = 'http://www.w3.org/1999/xlink'\r\nSVG.svgjs = 'http://svgjs.com/svgjs'\r\n\r\n// Svg support test\r\nSVG.supported = (function() {\r\n return !! document.createElementNS &&\r\n !! document.createElementNS(SVG.ns,'svg').createSVGRect\r\n})()\r\n\r\n// Don't bother to continue if SVG is not supported\r\nif (!SVG.supported) return false\r\n\r\n// Element id sequence\r\nSVG.did = 1000\r\n\r\n// Get next named element id\r\nSVG.eid = function(name) {\r\n return 'Svgjs' + capitalize(name) + (SVG.did++)\r\n}\r\n\r\n// Method for element creation\r\nSVG.create = function(name) {\r\n // create element\r\n var element = document.createElementNS(this.ns, name)\r\n\r\n // apply unique id\r\n element.setAttribute('id', this.eid(name))\r\n\r\n return element\r\n}\r\n\r\n// Method for extending objects\r\nSVG.extend = function() {\r\n var modules, methods, key, i\r\n\r\n // Get list of modules\r\n modules = [].slice.call(arguments)\r\n\r\n // Get object with extensions\r\n methods = modules.pop()\r\n\r\n for (i = modules.length - 1; i >= 0; i--)\r\n if (modules[i])\r\n for (key in methods)\r\n modules[i].prototype[key] = methods[key]\r\n\r\n // Make sure SVG.Set inherits any newly added methods\r\n if (SVG.Set && SVG.Set.inherit)\r\n SVG.Set.inherit()\r\n}\r\n\r\n// Invent new element\r\nSVG.invent = function(config) {\r\n // Create element initializer\r\n var initializer = typeof config.create == 'function' ?\r\n config.create :\r\n function() {\r\n this.constructor.call(this, SVG.create(config.create))\r\n }\r\n\r\n // Inherit prototype\r\n if (config.inherit)\r\n initializer.prototype = new config.inherit\r\n\r\n // Extend with methods\r\n if (config.extend)\r\n SVG.extend(initializer, config.extend)\r\n\r\n // Attach construct method to parent\r\n if (config.construct)\r\n SVG.extend(config.parent || SVG.Container, config.construct)\r\n\r\n return initializer\r\n}\r\n\r\n// Adopt existing svg elements\r\nSVG.adopt = function(node) {\r\n // check for presence of node\r\n if (!node) return null\r\n\r\n // make sure a node isn't already adopted\r\n if (node.instance) return node.instance\r\n\r\n // initialize variables\r\n var element\r\n\r\n // adopt with element-specific settings\r\n if (node.nodeName == 'svg')\r\n element = node.parentNode instanceof window.SVGElement ? new SVG.Nested : new SVG.Doc\r\n else if (node.nodeName == 'linearGradient')\r\n element = new SVG.Gradient('linear')\r\n else if (node.nodeName == 'radialGradient')\r\n element = new SVG.Gradient('radial')\r\n else if (SVG[capitalize(node.nodeName)])\r\n element = new SVG[capitalize(node.nodeName)]\r\n else\r\n element = new SVG.Element(node)\r\n\r\n // ensure references\r\n element.type = node.nodeName\r\n element.node = node\r\n node.instance = element\r\n\r\n // SVG.Class specific preparations\r\n if (element instanceof SVG.Doc)\r\n element.namespace().defs()\r\n\r\n // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\r\n element.setData(JSON.parse(node.getAttribute('svgjs:data')) || {})\r\n\r\n return element\r\n}\r\n\r\n// Initialize parsing element\r\nSVG.prepare = function() {\r\n // Select document body and create invisible svg element\r\n var body = document.getElementsByTagName('body')[0]\r\n , draw = (body ? new SVG.Doc(body) : SVG.adopt(document.documentElement).nested()).size(2, 0)\r\n\r\n // Create parser object\r\n SVG.parser = {\r\n body: body || document.documentElement\r\n , draw: draw.style('opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden').attr('focusable', 'false').node\r\n , poly: draw.polyline().node\r\n , path: draw.path().node\r\n , native: SVG.create('svg')\r\n }\r\n}\r\n\r\nSVG.parser = {\r\n native: SVG.create('svg')\r\n}\r\n\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n if(!SVG.parser.draw)\r\n SVG.prepare()\r\n}, false)\r\n\n// Storage for regular expressions\r\nSVG.regex = {\r\n // Parse unit value\r\n numberAndUnit: /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\r\n\r\n // Parse hex value\r\n, hex: /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\r\n\r\n // Parse rgb value\r\n, rgb: /rgb\\((\\d+),(\\d+),(\\d+)\\)/\r\n\r\n // Parse reference id\r\n, reference: /#([a-z0-9\\-_]+)/i\r\n\r\n // splits a transformation chain\r\n, transforms: /\\)\\s*,?\\s*/\r\n\r\n // Whitespace\r\n, whitespace: /\\s/g\r\n\r\n // Test hex value\r\n, isHex: /^#[a-f0-9]{3,6}$/i\r\n\r\n // Test rgb value\r\n, isRgb: /^rgb\\(/\r\n\r\n // Test css declaration\r\n, isCss: /[^:]+:[^;]+;?/\r\n\r\n // Test for blank string\r\n, isBlank: /^(\\s+)?$/\r\n\r\n // Test for numeric string\r\n, isNumber: /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\r\n\r\n // Test for percent value\r\n, isPercent: /^-?[\\d\\.]+%$/\r\n\r\n // Test for image url\r\n, isImage: /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\r\n\r\n // split at whitespace and comma\r\n, delimiter: /[\\s,]+/\r\n\r\n // The following regex are used to parse the d attribute of a path\r\n\r\n // Matches all hyphens which are not after an exponent\r\n, hyphen: /([^e])\\-/gi\r\n\r\n // Replaces and tests for all path letters\r\n, pathLetters: /[MLHVCSQTAZ]/gi\r\n\r\n // yes we need this one, too\r\n, isPathLetter: /[MLHVCSQTAZ]/i\r\n\r\n // matches 0.154.23.45\r\n, numbersWithDots: /((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi\r\n\r\n // matches .\r\n, dots: /\\./g\r\n}\r\n\nSVG.utils = {\r\n // Map function\r\n map: function(array, block) {\r\n var i\r\n , il = array.length\r\n , result = []\r\n\r\n for (i = 0; i < il; i++)\r\n result.push(block(array[i]))\r\n\r\n return result\r\n }\r\n\r\n // Filter function\r\n, filter: function(array, block) {\r\n var i\r\n , il = array.length\r\n , result = []\r\n\r\n for (i = 0; i < il; i++)\r\n if (block(array[i]))\r\n result.push(array[i])\r\n\r\n return result\r\n }\r\n\r\n // Degrees to radians\r\n, radians: function(d) {\r\n return d % 360 * Math.PI / 180\r\n }\r\n\r\n // Radians to degrees\r\n, degrees: function(r) {\r\n return r * 180 / Math.PI % 360\r\n }\r\n\r\n, filterSVGElements: function(nodes) {\r\n return this.filter( nodes, function(el) { return el instanceof window.SVGElement })\r\n }\r\n\r\n}\n\r\nSVG.defaults = {\r\n // Default attribute values\r\n attrs: {\r\n // fill and stroke\r\n 'fill-opacity': 1\r\n , 'stroke-opacity': 1\r\n , 'stroke-width': 0\r\n , 'stroke-linejoin': 'miter'\r\n , 'stroke-linecap': 'butt'\r\n , fill: '#000000'\r\n , stroke: '#000000'\r\n , opacity: 1\r\n // position\r\n , x: 0\r\n , y: 0\r\n , cx: 0\r\n , cy: 0\r\n // size\r\n , width: 0\r\n , height: 0\r\n // radius\r\n , r: 0\r\n , rx: 0\r\n , ry: 0\r\n // gradient\r\n , offset: 0\r\n , 'stop-opacity': 1\r\n , 'stop-color': '#000000'\r\n // text\r\n , 'font-size': 16\r\n , 'font-family': 'Helvetica, Arial, sans-serif'\r\n , 'text-anchor': 'start'\r\n }\r\n\r\n}\n// Module for color convertions\r\nSVG.Color = function(color) {\r\n var match\r\n\r\n // initialize defaults\r\n this.r = 0\r\n this.g = 0\r\n this.b = 0\r\n\r\n if(!color) return\r\n\r\n // parse color\r\n if (typeof color === 'string') {\r\n if (SVG.regex.isRgb.test(color)) {\r\n // get rgb values\r\n match = SVG.regex.rgb.exec(color.replace(SVG.regex.whitespace,''))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1])\r\n this.g = parseInt(match[2])\r\n this.b = parseInt(match[3])\r\n\r\n } else if (SVG.regex.isHex.test(color)) {\r\n // get hex values\r\n match = SVG.regex.hex.exec(fullHex(color))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1], 16)\r\n this.g = parseInt(match[2], 16)\r\n this.b = parseInt(match[3], 16)\r\n\r\n }\r\n\r\n } else if (typeof color === 'object') {\r\n this.r = color.r\r\n this.g = color.g\r\n this.b = color.b\r\n\r\n }\r\n\r\n}\r\n\r\nSVG.extend(SVG.Color, {\r\n // Default to hex conversion\r\n toString: function() {\r\n return this.toHex()\r\n }\r\n // Build hex value\r\n, toHex: function() {\r\n return '#'\r\n + compToHex(this.r)\r\n + compToHex(this.g)\r\n + compToHex(this.b)\r\n }\r\n // Build rgb value\r\n, toRgb: function() {\r\n return 'rgb(' + [this.r, this.g, this.b].join() + ')'\r\n }\r\n // Calculate true brightness\r\n, brightness: function() {\r\n return (this.r / 255 * 0.30)\r\n + (this.g / 255 * 0.59)\r\n + (this.b / 255 * 0.11)\r\n }\r\n // Make color morphable\r\n, morph: function(color) {\r\n this.destination = new SVG.Color(color)\r\n\r\n return this\r\n }\r\n // Get morphed color at given position\r\n, at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // normalise pos\r\n pos = pos < 0 ? 0 : pos > 1 ? 1 : pos\r\n\r\n // generate morphed color\r\n return new SVG.Color({\r\n r: ~~(this.r + (this.destination.r - this.r) * pos)\r\n , g: ~~(this.g + (this.destination.g - this.g) * pos)\r\n , b: ~~(this.b + (this.destination.b - this.b) * pos)\r\n })\r\n }\r\n\r\n})\r\n\r\n// Testers\r\n\r\n// Test if given value is a color string\r\nSVG.Color.test = function(color) {\r\n color += ''\r\n return SVG.regex.isHex.test(color)\r\n || SVG.regex.isRgb.test(color)\r\n}\r\n\r\n// Test if given value is a rgb object\r\nSVG.Color.isRgb = function(color) {\r\n return color && typeof color.r == 'number'\r\n && typeof color.g == 'number'\r\n && typeof color.b == 'number'\r\n}\r\n\r\n// Test if given value is a color\r\nSVG.Color.isColor = function(color) {\r\n return SVG.Color.isRgb(color) || SVG.Color.test(color)\r\n}\n// Module for array conversion\r\nSVG.Array = function(array, fallback) {\r\n array = (array || []).valueOf()\r\n\r\n // if array is empty and fallback is provided, use fallback\r\n if (array.length == 0 && fallback)\r\n array = fallback.valueOf()\r\n\r\n // parse array\r\n this.value = this.parse(array)\r\n}\r\n\r\nSVG.extend(SVG.Array, {\r\n // Make array morphable\r\n morph: function(array) {\r\n this.destination = this.parse(array)\r\n\r\n // normalize length of arrays\r\n if (this.value.length != this.destination.length) {\r\n var lastValue = this.value[this.value.length - 1]\r\n , lastDestination = this.destination[this.destination.length - 1]\r\n\r\n while(this.value.length > this.destination.length)\r\n this.destination.push(lastDestination)\r\n while(this.value.length < this.destination.length)\r\n this.value.push(lastValue)\r\n }\r\n\r\n return this\r\n }\r\n // Clean up any duplicate points\r\n, settle: function() {\r\n // find all unique values\r\n for (var i = 0, il = this.value.length, seen = []; i < il; i++)\r\n if (seen.indexOf(this.value[i]) == -1)\r\n seen.push(this.value[i])\r\n\r\n // set new value\r\n return this.value = seen\r\n }\r\n // Get morphed array at given position\r\n, at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed array\r\n for (var i = 0, il = this.value.length, array = []; i < il; i++)\r\n array.push(this.value[i] + (this.destination[i] - this.value[i]) * pos)\r\n\r\n return new SVG.Array(array)\r\n }\r\n // Convert array to string\r\n, toString: function() {\r\n return this.value.join(' ')\r\n }\r\n // Real value\r\n, valueOf: function() {\r\n return this.value\r\n }\r\n // Parse whitespace separated string\r\n, parse: function(array) {\r\n array = array.valueOf()\r\n\r\n // if already is an array, no need to parse it\r\n if (Array.isArray(array)) return array\r\n\r\n return this.split(array)\r\n }\r\n // Strip unnecessary whitespace\r\n, split: function(string) {\r\n return string.trim().split(SVG.regex.delimiter).map(parseFloat)\r\n }\r\n // Reverse array\r\n, reverse: function() {\r\n this.value.reverse()\r\n\r\n return this\r\n }\r\n, clone: function() {\r\n var clone = new this.constructor()\r\n clone.value = array_clone(this.value)\r\n return clone\r\n }\r\n})\n// Poly points array\r\nSVG.PointArray = function(array, fallback) {\r\n SVG.Array.call(this, array, fallback || [[0,0]])\r\n}\r\n\r\n// Inherit from SVG.Array\r\nSVG.PointArray.prototype = new SVG.Array\r\nSVG.PointArray.prototype.constructor = SVG.PointArray\r\n\r\nSVG.extend(SVG.PointArray, {\r\n // Convert array to string\r\n toString: function() {\r\n // convert to a poly point string\r\n for (var i = 0, il = this.value.length, array = []; i < il; i++)\r\n array.push(this.value[i].join(','))\r\n\r\n return array.join(' ')\r\n }\r\n // Convert array to line object\r\n, toLine: function() {\r\n return {\r\n x1: this.value[0][0]\r\n , y1: this.value[0][1]\r\n , x2: this.value[1][0]\r\n , y2: this.value[1][1]\r\n }\r\n }\r\n // Get morphed array at given position\r\n, at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed point string\r\n for (var i = 0, il = this.value.length, array = []; i < il; i++)\r\n array.push([\r\n this.value[i][0] + (this.destination[i][0] - this.value[i][0]) * pos\r\n , this.value[i][1] + (this.destination[i][1] - this.value[i][1]) * pos\r\n ])\r\n\r\n return new SVG.PointArray(array)\r\n }\r\n // Parse point string and flat array\r\n, parse: function(array) {\r\n var points = []\r\n\r\n array = array.valueOf()\r\n\r\n // if it is an array\r\n if (Array.isArray(array)) {\r\n // and it is not flat, there is no need to parse it\r\n if(Array.isArray(array[0])) {\r\n // make sure to use a clone\r\n return array.map(function (el) { return el.slice() })\r\n } else if (array[0].x != null){\r\n // allow point objects to be passed\r\n return array.map(function (el) { return [el.x, el.y] })\r\n }\r\n } else { // Else, it is considered as a string\r\n // parse points\r\n array = array.trim().split(SVG.regex.delimiter).map(parseFloat)\r\n }\r\n\r\n // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\r\n // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\r\n if (array.length % 2 !== 0) array.pop()\r\n\r\n // wrap points in two-tuples and parse points as floats\r\n for(var i = 0, len = array.length; i < len; i = i + 2)\r\n points.push([ array[i], array[i+1] ])\r\n\r\n return points\r\n }\r\n // Move point string\r\n, move: function(x, y) {\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n // move every point\r\n if (!isNaN(x) && !isNaN(y))\r\n for (var i = this.value.length - 1; i >= 0; i--)\r\n this.value[i] = [this.value[i][0] + x, this.value[i][1] + y]\r\n\r\n return this\r\n }\r\n // Resize poly string\r\n, size: function(width, height) {\r\n var i, box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.value.length - 1; i >= 0; i--) {\r\n if(box.width) this.value[i][0] = ((this.value[i][0] - box.x) * width) / box.width + box.x\r\n if(box.height) this.value[i][1] = ((this.value[i][1] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n return this\r\n }\r\n // Get bounding box of points\r\n, bbox: function() {\r\n SVG.parser.poly.setAttribute('points', this.toString())\r\n\r\n return SVG.parser.poly.getBBox()\r\n }\r\n})\r\n\nvar pathHandlers = {\r\n M: function(c, p, p0) {\r\n p.x = p0.x = c[0]\r\n p.y = p0.y = c[1]\r\n\r\n return ['M', p.x, p.y]\r\n },\r\n L: function(c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['L', c[0], c[1]]\r\n },\r\n H: function(c, p) {\r\n p.x = c[0]\r\n return ['H', c[0]]\r\n },\r\n V: function(c, p) {\r\n p.y = c[0]\r\n return ['V', c[0]]\r\n },\r\n C: function(c, p) {\r\n p.x = c[4]\r\n p.y = c[5]\r\n return ['C', c[0], c[1], c[2], c[3], c[4], c[5]]\r\n },\r\n S: function(c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['S', c[0], c[1], c[2], c[3]]\r\n },\r\n Q: function(c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['Q', c[0], c[1], c[2], c[3]]\r\n },\r\n T: function(c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['T', c[0], c[1]]\r\n },\r\n Z: function(c, p, p0) {\r\n p.x = p0.x\r\n p.y = p0.y\r\n return ['Z']\r\n },\r\n A: function(c, p) {\r\n p.x = c[5]\r\n p.y = c[6]\r\n return ['A', c[0], c[1], c[2], c[3], c[4], c[5], c[6]]\r\n }\r\n}\r\n\r\nvar mlhvqtcsa = 'mlhvqtcsaz'.split('')\r\n\r\nfor(var i = 0, il = mlhvqtcsa.length; i < il; ++i){\r\n pathHandlers[mlhvqtcsa[i]] = (function(i){\r\n return function(c, p, p0) {\r\n if(i == 'H') c[0] = c[0] + p.x\r\n else if(i == 'V') c[0] = c[0] + p.y\r\n else if(i == 'A'){\r\n c[5] = c[5] + p.x,\r\n c[6] = c[6] + p.y\r\n }\r\n else\r\n for(var j = 0, jl = c.length; j < jl; ++j) {\r\n c[j] = c[j] + (j%2 ? p.y : p.x)\r\n }\r\n\r\n return pathHandlers[i](c, p, p0)\r\n }\r\n })(mlhvqtcsa[i].toUpperCase())\r\n}\r\n\r\n// Path points array\r\nSVG.PathArray = function(array, fallback) {\r\n SVG.Array.call(this, array, fallback || [['M', 0, 0]])\r\n}\r\n\r\n// Inherit from SVG.Array\r\nSVG.PathArray.prototype = new SVG.Array\r\nSVG.PathArray.prototype.constructor = SVG.PathArray\r\n\r\nSVG.extend(SVG.PathArray, {\r\n // Convert array to string\r\n toString: function() {\r\n return arrayToString(this.value)\r\n }\r\n // Move path string\r\n, move: function(x, y) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n if (!isNaN(x) && !isNaN(y)) {\r\n // move every point\r\n for (var l, i = this.value.length - 1; i >= 0; i--) {\r\n l = this.value[i][0]\r\n\r\n if (l == 'M' || l == 'L' || l == 'T') {\r\n this.value[i][1] += x\r\n this.value[i][2] += y\r\n\r\n } else if (l == 'H') {\r\n this.value[i][1] += x\r\n\r\n } else if (l == 'V') {\r\n this.value[i][1] += y\r\n\r\n } else if (l == 'C' || l == 'S' || l == 'Q') {\r\n this.value[i][1] += x\r\n this.value[i][2] += y\r\n this.value[i][3] += x\r\n this.value[i][4] += y\r\n\r\n if (l == 'C') {\r\n this.value[i][5] += x\r\n this.value[i][6] += y\r\n }\r\n\r\n } else if (l == 'A') {\r\n this.value[i][6] += x\r\n this.value[i][7] += y\r\n }\r\n\r\n }\r\n }\r\n\r\n return this\r\n }\r\n // Resize path string\r\n, size: function(width, height) {\r\n // get bounding box of current situation\r\n var i, l, box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.value.length - 1; i >= 0; i--) {\r\n l = this.value[i][0]\r\n\r\n if (l == 'M' || l == 'L' || l == 'T') {\r\n this.value[i][1] = ((this.value[i][1] - box.x) * width) / box.width + box.x\r\n this.value[i][2] = ((this.value[i][2] - box.y) * height) / box.height + box.y\r\n\r\n } else if (l == 'H') {\r\n this.value[i][1] = ((this.value[i][1] - box.x) * width) / box.width + box.x\r\n\r\n } else if (l == 'V') {\r\n this.value[i][1] = ((this.value[i][1] - box.y) * height) / box.height + box.y\r\n\r\n } else if (l == 'C' || l == 'S' || l == 'Q') {\r\n this.value[i][1] = ((this.value[i][1] - box.x) * width) / box.width + box.x\r\n this.value[i][2] = ((this.value[i][2] - box.y) * height) / box.height + box.y\r\n this.value[i][3] = ((this.value[i][3] - box.x) * width) / box.width + box.x\r\n this.value[i][4] = ((this.value[i][4] - box.y) * height) / box.height + box.y\r\n\r\n if (l == 'C') {\r\n this.value[i][5] = ((this.value[i][5] - box.x) * width) / box.width + box.x\r\n this.value[i][6] = ((this.value[i][6] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n } else if (l == 'A') {\r\n // resize radii\r\n this.value[i][1] = (this.value[i][1] * width) / box.width\r\n this.value[i][2] = (this.value[i][2] * height) / box.height\r\n\r\n // move position values\r\n this.value[i][6] = ((this.value[i][6] - box.x) * width) / box.width + box.x\r\n this.value[i][7] = ((this.value[i][7] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n }\r\n\r\n return this\r\n }\r\n // Test if the passed path array use the same path data commands as this path array\r\n, equalCommands: function(pathArray) {\r\n var i, il, equalCommands\r\n\r\n pathArray = new SVG.PathArray(pathArray)\r\n\r\n equalCommands = this.value.length === pathArray.value.length\r\n for(i = 0, il = this.value.length; equalCommands && i < il; i++) {\r\n equalCommands = this.value[i][0] === pathArray.value[i][0]\r\n }\r\n\r\n return equalCommands\r\n }\r\n // Make path array morphable\r\n, morph: function(pathArray) {\r\n pathArray = new SVG.PathArray(pathArray)\r\n\r\n if(this.equalCommands(pathArray)) {\r\n this.destination = pathArray\r\n } else {\r\n this.destination = null\r\n }\r\n\r\n return this\r\n }\r\n // Get morphed path array at given position\r\n, at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n var sourceArray = this.value\r\n , destinationArray = this.destination.value\r\n , array = [], pathArray = new SVG.PathArray()\r\n , i, il, j, jl\r\n\r\n // Animate has specified in the SVG spec\r\n // See: https://www.w3.org/TR/SVG11/paths.html#PathElement\r\n for (i = 0, il = sourceArray.length; i < il; i++) {\r\n array[i] = [sourceArray[i][0]]\r\n for(j = 1, jl = sourceArray[i].length; j < jl; j++) {\r\n array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos\r\n }\r\n // For the two flags of the elliptical arc command, the SVG spec say:\r\n // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true\r\n // Elliptical arc command as an array followed by corresponding indexes:\r\n // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\r\n // 0 1 2 3 4 5 6 7\r\n if(array[i][0] === 'A') {\r\n array[i][4] = +(array[i][4] != 0)\r\n array[i][5] = +(array[i][5] != 0)\r\n }\r\n }\r\n\r\n // Directly modify the value of a path array, this is done this way for performance\r\n pathArray.value = array\r\n return pathArray\r\n }\r\n // Absolutize and parse path to array\r\n, parse: function(array) {\r\n // if it's already a patharray, no need to parse it\r\n if (array instanceof SVG.PathArray) return array.valueOf()\r\n\r\n // prepare for parsing\r\n var i, x0, y0, s, seg, arr\r\n , x = 0\r\n , y = 0\r\n , paramCnt = { 'M':2, 'L':2, 'H':1, 'V':1, 'C':6, 'S':4, 'Q':4, 'T':2, 'A':7, 'Z':0 }\r\n\r\n if(typeof array == 'string'){\r\n\r\n array = array\r\n .replace(SVG.regex.numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123\r\n .replace(SVG.regex.pathLetters, ' $& ') // put some room between letters and numbers\r\n .replace(SVG.regex.hyphen, '$1 -') // add space before hyphen\r\n .trim() // trim\r\n .split(SVG.regex.delimiter) // split into array\r\n\r\n }else{\r\n array = array.reduce(function(prev, curr){\r\n return [].concat.call(prev, curr)\r\n }, [])\r\n }\r\n\r\n // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...]\r\n var arr = []\r\n , p = new SVG.Point()\r\n , p0 = new SVG.Point()\r\n , index = 0\r\n , len = array.length\r\n\r\n do{\r\n // Test if we have a path letter\r\n if(SVG.regex.isPathLetter.test(array[index])){\r\n s = array[index]\r\n ++index\r\n // If last letter was a move command and we got no new, it defaults to [L]ine\r\n }else if(s == 'M'){\r\n s = 'L'\r\n }else if(s == 'm'){\r\n s = 'l'\r\n }\r\n\r\n arr.push(pathHandlers[s].call(null,\r\n array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat),\r\n p, p0\r\n )\r\n )\r\n\r\n }while(len > index)\r\n\r\n return arr\r\n\r\n }\r\n // Get bounding box of path\r\n, bbox: function() {\r\n SVG.parser.path.setAttribute('d', this.toString())\r\n\r\n return SVG.parser.path.getBBox()\r\n }\r\n\r\n})\r\n\n// Module for unit convertions\r\nSVG.Number = SVG.invent({\r\n // Initialize\r\n create: function(value, unit) {\r\n // initialize defaults\r\n this.value = 0\r\n this.unit = unit || ''\r\n\r\n // parse value\r\n if (typeof value === 'number') {\r\n // ensure a valid numeric value\r\n this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value\r\n\r\n } else if (typeof value === 'string') {\r\n unit = value.match(SVG.regex.numberAndUnit)\r\n\r\n if (unit) {\r\n // make value numeric\r\n this.value = parseFloat(unit[1])\r\n\r\n // normalize\r\n if (unit[5] == '%')\r\n this.value /= 100\r\n else if (unit[5] == 's')\r\n this.value *= 1000\r\n\r\n // store unit\r\n this.unit = unit[5]\r\n }\r\n\r\n } else {\r\n if (value instanceof SVG.Number) {\r\n this.value = value.valueOf()\r\n this.unit = value.unit\r\n }\r\n }\r\n\r\n }\r\n // Add methods\r\n, extend: {\r\n // Stringalize\r\n toString: function() {\r\n return (\r\n this.unit == '%' ?\r\n ~~(this.value * 1e8) / 1e6:\r\n this.unit == 's' ?\r\n this.value / 1e3 :\r\n this.value\r\n ) + this.unit\r\n }\r\n , toJSON: function() {\r\n return this.toString()\r\n }\r\n , // Convert to primitive\r\n valueOf: function() {\r\n return this.value\r\n }\r\n // Add number\r\n , plus: function(number) {\r\n number = new SVG.Number(number)\r\n return new SVG.Number(this + number, this.unit || number.unit)\r\n }\r\n // Subtract number\r\n , minus: function(number) {\r\n number = new SVG.Number(number)\r\n return new SVG.Number(this - number, this.unit || number.unit)\r\n }\r\n // Multiply number\r\n , times: function(number) {\r\n number = new SVG.Number(number)\r\n return new SVG.Number(this * number, this.unit || number.unit)\r\n }\r\n // Divide number\r\n , divide: function(number) {\r\n number = new SVG.Number(number)\r\n return new SVG.Number(this / number, this.unit || number.unit)\r\n }\r\n // Convert to different unit\r\n , to: function(unit) {\r\n var number = new SVG.Number(this)\r\n\r\n if (typeof unit === 'string')\r\n number.unit = unit\r\n\r\n return number\r\n }\r\n // Make number morphable\r\n , morph: function(number) {\r\n this.destination = new SVG.Number(number)\r\n\r\n if(number.relative) {\r\n this.destination.value += this.value\r\n }\r\n\r\n return this\r\n }\r\n // Get morphed number at given position\r\n , at: function(pos) {\r\n // Make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // Generate new morphed number\r\n return new SVG.Number(this.destination)\r\n .minus(this)\r\n .times(pos)\r\n .plus(this)\r\n }\r\n\r\n }\r\n})\r\n\n\r\nSVG.Element = SVG.invent({\r\n // Initialize node\r\n create: function(node) {\r\n // make stroke value accessible dynamically\r\n this._stroke = SVG.defaults.attrs.stroke\r\n this._event = null\r\n this._events = {}\r\n\r\n // initialize data object\r\n this.dom = {}\r\n\r\n // create circular reference\r\n if (this.node = node) {\r\n this.type = node.nodeName\r\n this.node.instance = this\r\n this._events = node._events || {}\r\n\r\n // store current attribute value\r\n this._stroke = node.getAttribute('stroke') || this._stroke\r\n }\r\n }\r\n\r\n // Add class methods\r\n, extend: {\r\n // Move over x-axis\r\n x: function(x) {\r\n return this.attr('x', x)\r\n }\r\n // Move over y-axis\r\n , y: function(y) {\r\n return this.attr('y', y)\r\n }\r\n // Move by center over x-axis\r\n , cx: function(x) {\r\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2)\r\n }\r\n // Move by center over y-axis\r\n , cy: function(y) {\r\n return y == null ? this.y() + this.height() / 2 : this.y(y - this.height() / 2)\r\n }\r\n // Move element to given x and y values\r\n , move: function(x, y) {\r\n return this.x(x).y(y)\r\n }\r\n // Move element by its center\r\n , center: function(x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n // Set width of element\r\n , width: function(width) {\r\n return this.attr('width', width)\r\n }\r\n // Set height of element\r\n , height: function(height) {\r\n return this.attr('height', height)\r\n }\r\n // Set element size to given width and height\r\n , size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .width(new SVG.Number(p.width))\r\n .height(new SVG.Number(p.height))\r\n }\r\n // Clone element\r\n , clone: function(parent) {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // clone element and assign new id\r\n var clone = assignNewId(this.node.cloneNode(true))\r\n\r\n // insert the clone in the given parent or after myself\r\n if(parent) parent.add(clone)\r\n else this.after(clone)\r\n\r\n return clone\r\n }\r\n // Remove element\r\n , remove: function() {\r\n if (this.parent())\r\n this.parent().removeElement(this)\r\n\r\n return this\r\n }\r\n // Replace element\r\n , replace: function(element) {\r\n this.after(element).remove()\r\n\r\n return element\r\n }\r\n // Add element to given container and return self\r\n , addTo: function(parent) {\r\n return parent.put(this)\r\n }\r\n // Add element to given container and return container\r\n , putIn: function(parent) {\r\n return parent.add(this)\r\n }\r\n // Get / set id\r\n , id: function(id) {\r\n return this.attr('id', id)\r\n }\r\n // Checks whether the given point inside the bounding box of the element\r\n , inside: function(x, y) {\r\n var box = this.bbox()\r\n\r\n return x > box.x\r\n && y > box.y\r\n && x < box.x + box.width\r\n && y < box.y + box.height\r\n }\r\n // Show element\r\n , show: function() {\r\n return this.style('display', '')\r\n }\r\n // Hide element\r\n , hide: function() {\r\n return this.style('display', 'none')\r\n }\r\n // Is element visible?\r\n , visible: function() {\r\n return this.style('display') != 'none'\r\n }\r\n // Return id on string conversion\r\n , toString: function() {\r\n return this.attr('id')\r\n }\r\n // Return array of classes on the node\r\n , classes: function() {\r\n var attr = this.attr('class')\r\n\r\n return attr == null ? [] : attr.trim().split(SVG.regex.delimiter)\r\n }\r\n // Return true if class exists on the node, false otherwise\r\n , hasClass: function(name) {\r\n return this.classes().indexOf(name) != -1\r\n }\r\n // Add class to the node\r\n , addClass: function(name) {\r\n if (!this.hasClass(name)) {\r\n var array = this.classes()\r\n array.push(name)\r\n this.attr('class', array.join(' '))\r\n }\r\n\r\n return this\r\n }\r\n // Remove class from the node\r\n , removeClass: function(name) {\r\n if (this.hasClass(name)) {\r\n this.attr('class', this.classes().filter(function(c) {\r\n return c != name\r\n }).join(' '))\r\n }\r\n\r\n return this\r\n }\r\n // Toggle the presence of a class on the node\r\n , toggleClass: function(name) {\r\n return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\r\n }\r\n // Get referenced element form attribute value\r\n , reference: function(attr) {\r\n return SVG.get(this.attr(attr))\r\n }\r\n // Returns the parent element instance\r\n , parent: function(type) {\r\n var parent = this\r\n\r\n // check for parent\r\n if(!parent.node.parentNode) return null\r\n\r\n // get parent element\r\n parent = SVG.adopt(parent.node.parentNode)\r\n\r\n if(!type) return parent\r\n\r\n // loop trough ancestors if type is given\r\n while(parent && parent.node instanceof window.SVGElement){\r\n if(typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent\r\n if(!parent.node.parentNode || parent.node.parentNode.nodeName == '#document' || parent.node.parentNode.nodeName == '#document-fragment') return null // #759, #720\r\n parent = SVG.adopt(parent.node.parentNode)\r\n }\r\n }\r\n // Get parent document\r\n , doc: function() {\r\n return this instanceof SVG.Doc ? this : this.parent(SVG.Doc)\r\n }\r\n // return array of all ancestors of given type up to the root svg\r\n , parents: function(type) {\r\n var parents = [], parent = this\r\n\r\n do{\r\n parent = parent.parent(type)\r\n if(!parent || !parent.node) break\r\n\r\n parents.push(parent)\r\n } while(parent.parent)\r\n\r\n return parents\r\n }\r\n // matches the element vs a css selector\r\n , matches: function(selector){\r\n return matches(this.node, selector)\r\n }\r\n // Returns the svg node to call native svg methods on it\r\n , native: function() {\r\n return this.node\r\n }\r\n // Import raw svg\r\n , svg: function(svg) {\r\n // create temporary holder\r\n var well = document.createElement('svg')\r\n\r\n // act as a setter if svg is given\r\n if (svg && this instanceof SVG.Parent) {\r\n // dump raw svg\r\n well.innerHTML = '' + svg.replace(/\\n/, '').replace(/<([\\w:-]+)([^<]+?)\\/>/g, '<$1$2>') + ''\r\n\r\n // transplant nodes\r\n for (var i = 0, il = well.firstChild.childNodes.length; i < il; i++)\r\n this.node.appendChild(well.firstChild.firstChild)\r\n\r\n // otherwise act as a getter\r\n } else {\r\n // create a wrapping svg element in case of partial content\r\n well.appendChild(svg = document.createElement('svg'))\r\n\r\n // write svgjs data to the dom\r\n this.writeDataToDom()\r\n\r\n // insert a copy of this node\r\n svg.appendChild(this.node.cloneNode(true))\r\n\r\n // return target element\r\n return well.innerHTML.replace(/^/, '').replace(/<\\/svg>$/, '')\r\n }\r\n\r\n return this\r\n }\r\n // write svgjs data to the dom\r\n , writeDataToDom: function() {\r\n\r\n // dump variables recursively\r\n if(this.each || this.lines){\r\n var fn = this.each ? this : this.lines();\r\n fn.each(function(){\r\n this.writeDataToDom()\r\n })\r\n }\r\n\r\n // remove previously set data\r\n this.node.removeAttribute('svgjs:data')\r\n\r\n if(Object.keys(this.dom).length)\r\n this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) // see #428\r\n\r\n return this\r\n }\r\n // set given data to the elements data property\r\n , setData: function(o){\r\n this.dom = o\r\n return this\r\n }\r\n , is: function(obj){\r\n return is(this, obj)\r\n }\r\n }\r\n})\r\n\nSVG.easing = {\r\n '-': function(pos){return pos}\r\n, '<>':function(pos){return -Math.cos(pos * Math.PI) / 2 + 0.5}\r\n, '>': function(pos){return Math.sin(pos * Math.PI / 2)}\r\n, '<': function(pos){return -Math.cos(pos * Math.PI / 2) + 1}\r\n}\r\n\r\nSVG.morph = function(pos){\r\n return function(from, to) {\r\n return new SVG.MorphObj(from, to).at(pos)\r\n }\r\n}\r\n\r\nSVG.Situation = SVG.invent({\r\n\r\n create: function(o){\r\n this.init = false\r\n this.reversed = false\r\n this.reversing = false\r\n\r\n this.duration = new SVG.Number(o.duration).valueOf()\r\n this.delay = new SVG.Number(o.delay).valueOf()\r\n\r\n this.start = +new Date() + this.delay\r\n this.finish = this.start + this.duration\r\n this.ease = o.ease\r\n\r\n // this.loop is incremented from 0 to this.loops\r\n // it is also incremented when in an infinite loop (when this.loops is true)\r\n this.loop = 0\r\n this.loops = false\r\n\r\n this.animations = {\r\n // functionToCall: [list of morphable objects]\r\n // e.g. move: [SVG.Number, SVG.Number]\r\n }\r\n\r\n this.attrs = {\r\n // holds all attributes which are not represented from a function svg.js provides\r\n // e.g. someAttr: SVG.Number\r\n }\r\n\r\n this.styles = {\r\n // holds all styles which should be animated\r\n // e.g. fill-color: SVG.Color\r\n }\r\n\r\n this.transforms = [\r\n // holds all transformations as transformation objects\r\n // e.g. [SVG.Rotate, SVG.Translate, SVG.Matrix]\r\n ]\r\n\r\n this.once = {\r\n // functions to fire at a specific position\r\n // e.g. \"0.5\": function foo(){}\r\n }\r\n\r\n }\r\n\r\n})\r\n\r\n\r\nSVG.FX = SVG.invent({\r\n\r\n create: function(element) {\r\n this._target = element\r\n this.situations = []\r\n this.active = false\r\n this.situation = null\r\n this.paused = false\r\n this.lastPos = 0\r\n this.pos = 0\r\n // The absolute position of an animation is its position in the context of its complete duration (including delay and loops)\r\n // When performing a delay, absPos is below 0 and when performing a loop, its value is above 1\r\n this.absPos = 0\r\n this._speed = 1\r\n }\r\n\r\n, extend: {\r\n\r\n /**\r\n * sets or returns the target of this animation\r\n * @param o object || number In case of Object it holds all parameters. In case of number its the duration of the animation\r\n * @param ease function || string Function which should be used for easing or easing keyword\r\n * @param delay Number indicating the delay before the animation starts\r\n * @return target || this\r\n */\r\n animate: function(o, ease, delay){\r\n\r\n if(typeof o == 'object'){\r\n ease = o.ease\r\n delay = o.delay\r\n o = o.duration\r\n }\r\n\r\n var situation = new SVG.Situation({\r\n duration: o || 1000,\r\n delay: delay || 0,\r\n ease: SVG.easing[ease || '-'] || ease\r\n })\r\n\r\n this.queue(situation)\r\n\r\n return this\r\n }\r\n\r\n /**\r\n * sets a delay before the next element of the queue is called\r\n * @param delay Duration of delay in milliseconds\r\n * @return this.target()\r\n */\r\n , delay: function(delay){\r\n // The delay is performed by an empty situation with its duration\r\n // attribute set to the duration of the delay\r\n var situation = new SVG.Situation({\r\n duration: delay,\r\n delay: 0,\r\n ease: SVG.easing['-']\r\n })\r\n\r\n return this.queue(situation)\r\n }\r\n\r\n /**\r\n * sets or returns the target of this animation\r\n * @param null || target SVG.Element which should be set as new target\r\n * @return target || this\r\n */\r\n , target: function(target){\r\n if(target && target instanceof SVG.Element){\r\n this._target = target\r\n return this\r\n }\r\n\r\n return this._target\r\n }\r\n\r\n // returns the absolute position at a given time\r\n , timeToAbsPos: function(timestamp){\r\n return (timestamp - this.situation.start) / (this.situation.duration/this._speed)\r\n }\r\n\r\n // returns the timestamp from a given absolute positon\r\n , absPosToTime: function(absPos){\r\n return this.situation.duration/this._speed * absPos + this.situation.start\r\n }\r\n\r\n // starts the animationloop\r\n , startAnimFrame: function(){\r\n this.stopAnimFrame()\r\n this.animationFrame = window.requestAnimationFrame(function(){ this.step() }.bind(this))\r\n }\r\n\r\n // cancels the animationframe\r\n , stopAnimFrame: function(){\r\n window.cancelAnimationFrame(this.animationFrame)\r\n }\r\n\r\n // kicks off the animation - only does something when the queue is currently not active and at least one situation is set\r\n , start: function(){\r\n // dont start if already started\r\n if(!this.active && this.situation){\r\n this.active = true\r\n this.startCurrent()\r\n }\r\n\r\n return this\r\n }\r\n\r\n // start the current situation\r\n , startCurrent: function(){\r\n this.situation.start = +new Date + this.situation.delay/this._speed\r\n this.situation.finish = this.situation.start + this.situation.duration/this._speed\r\n return this.initAnimations().step()\r\n }\r\n\r\n /**\r\n * adds a function / Situation to the animation queue\r\n * @param fn function / situation to add\r\n * @return this\r\n */\r\n , queue: function(fn){\r\n if(typeof fn == 'function' || fn instanceof SVG.Situation)\r\n this.situations.push(fn)\r\n\r\n if(!this.situation) this.situation = this.situations.shift()\r\n\r\n return this\r\n }\r\n\r\n /**\r\n * pulls next element from the queue and execute it\r\n * @return this\r\n */\r\n , dequeue: function(){\r\n // stop current animation\r\n this.stop()\r\n\r\n // get next animation from queue\r\n this.situation = this.situations.shift()\r\n\r\n if(this.situation){\r\n if(this.situation instanceof SVG.Situation) {\r\n this.start()\r\n } else {\r\n // If it is not a SVG.Situation, then it is a function, we execute it\r\n this.situation.call(this)\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n // updates all animations to the current state of the element\r\n // this is important when one property could be changed from another property\r\n , initAnimations: function() {\r\n var i, j, source\r\n var s = this.situation\r\n\r\n if(s.init) return this\r\n\r\n for(i in s.animations){\r\n source = this.target()[i]()\r\n\r\n if(!Array.isArray(source)) {\r\n source = [source]\r\n }\r\n\r\n if(!Array.isArray(s.animations[i])) {\r\n s.animations[i] = [s.animations[i]]\r\n }\r\n\r\n //if(s.animations[i].length > source.length) {\r\n // source.concat = source.concat(s.animations[i].slice(source.length, s.animations[i].length))\r\n //}\r\n\r\n for(j = source.length; j--;) {\r\n // The condition is because some methods return a normal number instead\r\n // of a SVG.Number\r\n if(s.animations[i][j] instanceof SVG.Number)\r\n source[j] = new SVG.Number(source[j])\r\n\r\n s.animations[i][j] = source[j].morph(s.animations[i][j])\r\n }\r\n }\r\n\r\n for(i in s.attrs){\r\n s.attrs[i] = new SVG.MorphObj(this.target().attr(i), s.attrs[i])\r\n }\r\n\r\n for(i in s.styles){\r\n s.styles[i] = new SVG.MorphObj(this.target().style(i), s.styles[i])\r\n }\r\n\r\n s.initialTransformation = this.target().matrixify()\r\n\r\n s.init = true\r\n return this\r\n }\r\n , clearQueue: function(){\r\n this.situations = []\r\n return this\r\n }\r\n , clearCurrent: function(){\r\n this.situation = null\r\n return this\r\n }\r\n /** stops the animation immediately\r\n * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately.\r\n * @param clearQueue A Boolean indicating whether to remove queued animation as well.\r\n * @return this\r\n */\r\n , stop: function(jumpToEnd, clearQueue){\r\n var active = this.active\r\n this.active = false\r\n\r\n if(clearQueue){\r\n this.clearQueue()\r\n }\r\n\r\n if(jumpToEnd && this.situation){\r\n // initialize the situation if it was not\r\n !active && this.startCurrent()\r\n this.atEnd()\r\n }\r\n\r\n this.stopAnimFrame()\r\n\r\n return this.clearCurrent()\r\n }\r\n\r\n /** resets the element to the state where the current element has started\r\n * @return this\r\n */\r\n , reset: function(){\r\n if(this.situation){\r\n var temp = this.situation\r\n this.stop()\r\n this.situation = temp\r\n this.atStart()\r\n }\r\n return this\r\n }\r\n\r\n // Stop the currently-running animation, remove all queued animations, and complete all animations for the element.\r\n , finish: function(){\r\n\r\n this.stop(true, false)\r\n\r\n while(this.dequeue().situation && this.stop(true, false));\r\n\r\n this.clearQueue().clearCurrent()\r\n\r\n return this\r\n }\r\n\r\n // set the internal animation pointer at the start position, before any loops, and updates the visualisation\r\n , atStart: function() {\r\n return this.at(0, true)\r\n }\r\n\r\n // set the internal animation pointer at the end position, after all the loops, and updates the visualisation\r\n , atEnd: function() {\r\n if (this.situation.loops === true) {\r\n // If in a infinite loop, we end the current iteration\r\n this.situation.loops = this.situation.loop + 1\r\n }\r\n\r\n if(typeof this.situation.loops == 'number') {\r\n // If performing a finite number of loops, we go after all the loops\r\n return this.at(this.situation.loops, true)\r\n } else {\r\n // If no loops, we just go at the end\r\n return this.at(1, true)\r\n }\r\n }\r\n\r\n // set the internal animation pointer to the specified position and updates the visualisation\r\n // if isAbsPos is true, pos is treated as an absolute position\r\n , at: function(pos, isAbsPos){\r\n var durDivSpd = this.situation.duration/this._speed\r\n\r\n this.absPos = pos\r\n // If pos is not an absolute position, we convert it into one\r\n if (!isAbsPos) {\r\n if (this.situation.reversed) this.absPos = 1 - this.absPos\r\n this.absPos += this.situation.loop\r\n }\r\n\r\n this.situation.start = +new Date - this.absPos * durDivSpd\r\n this.situation.finish = this.situation.start + durDivSpd\r\n\r\n return this.step(true)\r\n }\r\n\r\n /**\r\n * sets or returns the speed of the animations\r\n * @param speed null || Number The new speed of the animations\r\n * @return Number || this\r\n */\r\n , speed: function(speed){\r\n if (speed === 0) return this.pause()\r\n\r\n if (speed) {\r\n this._speed = speed\r\n // We use an absolute position here so that speed can affect the delay before the animation\r\n return this.at(this.absPos, true)\r\n } else return this._speed\r\n }\r\n\r\n // Make loopable\r\n , loop: function(times, reverse) {\r\n var c = this.last()\r\n\r\n // store total loops\r\n c.loops = (times != null) ? times : true\r\n c.loop = 0\r\n\r\n if(reverse) c.reversing = true\r\n return this\r\n }\r\n\r\n // pauses the animation\r\n , pause: function(){\r\n this.paused = true\r\n this.stopAnimFrame()\r\n\r\n return this\r\n }\r\n\r\n // unpause the animation\r\n , play: function(){\r\n if(!this.paused) return this\r\n this.paused = false\r\n // We use an absolute position here so that the delay before the animation can be paused\r\n return this.at(this.absPos, true)\r\n }\r\n\r\n /**\r\n * toggle or set the direction of the animation\r\n * true sets direction to backwards while false sets it to forwards\r\n * @param reversed Boolean indicating whether to reverse the animation or not (default: toggle the reverse status)\r\n * @return this\r\n */\r\n , reverse: function(reversed){\r\n var c = this.last()\r\n\r\n if(typeof reversed == 'undefined') c.reversed = !c.reversed\r\n else c.reversed = reversed\r\n\r\n return this\r\n }\r\n\r\n\r\n /**\r\n * returns a float from 0-1 indicating the progress of the current animation\r\n * @param eased Boolean indicating whether the returned position should be eased or not\r\n * @return number\r\n */\r\n , progress: function(easeIt){\r\n return easeIt ? this.situation.ease(this.pos) : this.pos\r\n }\r\n\r\n /**\r\n * adds a callback function which is called when the current animation is finished\r\n * @param fn Function which should be executed as callback\r\n * @return number\r\n */\r\n , after: function(fn){\r\n var c = this.last()\r\n , wrapper = function wrapper(e){\r\n if(e.detail.situation == c){\r\n fn.call(this, c)\r\n this.off('finished.fx', wrapper) // prevent memory leak\r\n }\r\n }\r\n\r\n this.target().on('finished.fx', wrapper)\r\n\r\n return this._callStart()\r\n }\r\n\r\n // adds a callback which is called whenever one animation step is performed\r\n , during: function(fn){\r\n var c = this.last()\r\n , wrapper = function(e){\r\n if(e.detail.situation == c){\r\n fn.call(this, e.detail.pos, SVG.morph(e.detail.pos), e.detail.eased, c)\r\n }\r\n }\r\n\r\n // see above\r\n this.target().off('during.fx', wrapper).on('during.fx', wrapper)\r\n\r\n this.after(function(){\r\n this.off('during.fx', wrapper)\r\n })\r\n\r\n return this._callStart()\r\n }\r\n\r\n // calls after ALL animations in the queue are finished\r\n , afterAll: function(fn){\r\n var wrapper = function wrapper(e){\r\n fn.call(this)\r\n this.off('allfinished.fx', wrapper)\r\n }\r\n\r\n // see above\r\n this.target().off('allfinished.fx', wrapper).on('allfinished.fx', wrapper)\r\n\r\n return this._callStart()\r\n }\r\n\r\n // calls on every animation step for all animations\r\n , duringAll: function(fn){\r\n var wrapper = function(e){\r\n fn.call(this, e.detail.pos, SVG.morph(e.detail.pos), e.detail.eased, e.detail.situation)\r\n }\r\n\r\n this.target().off('during.fx', wrapper).on('during.fx', wrapper)\r\n\r\n this.afterAll(function(){\r\n this.off('during.fx', wrapper)\r\n })\r\n\r\n return this._callStart()\r\n }\r\n\r\n , last: function(){\r\n return this.situations.length ? this.situations[this.situations.length-1] : this.situation\r\n }\r\n\r\n // adds one property to the animations\r\n , add: function(method, args, type){\r\n this.last()[type || 'animations'][method] = args\r\n return this._callStart()\r\n }\r\n\r\n /** perform one step of the animation\r\n * @param ignoreTime Boolean indicating whether to ignore time and use position directly or recalculate position based on time\r\n * @return this\r\n */\r\n , step: function(ignoreTime){\r\n\r\n // convert current time to an absolute position\r\n if(!ignoreTime) this.absPos = this.timeToAbsPos(+new Date)\r\n\r\n // This part convert an absolute position to a position\r\n if(this.situation.loops !== false) {\r\n var absPos, absPosInt, lastLoop\r\n\r\n // If the absolute position is below 0, we just treat it as if it was 0\r\n absPos = Math.max(this.absPos, 0)\r\n absPosInt = Math.floor(absPos)\r\n\r\n if(this.situation.loops === true || absPosInt < this.situation.loops) {\r\n this.pos = absPos - absPosInt\r\n lastLoop = this.situation.loop\r\n this.situation.loop = absPosInt\r\n } else {\r\n this.absPos = this.situation.loops\r\n this.pos = 1\r\n // The -1 here is because we don't want to toggle reversed when all the loops have been completed\r\n lastLoop = this.situation.loop - 1\r\n this.situation.loop = this.situation.loops\r\n }\r\n\r\n if(this.situation.reversing) {\r\n // Toggle reversed if an odd number of loops as occured since the last call of step\r\n this.situation.reversed = this.situation.reversed != Boolean((this.situation.loop - lastLoop) % 2)\r\n }\r\n\r\n } else {\r\n // If there are no loop, the absolute position must not be above 1\r\n this.absPos = Math.min(this.absPos, 1)\r\n this.pos = this.absPos\r\n }\r\n\r\n // while the absolute position can be below 0, the position must not be below 0\r\n if(this.pos < 0) this.pos = 0\r\n\r\n if(this.situation.reversed) this.pos = 1 - this.pos\r\n\r\n\r\n // apply easing\r\n var eased = this.situation.ease(this.pos)\r\n\r\n // call once-callbacks\r\n for(var i in this.situation.once){\r\n if(i > this.lastPos && i <= eased){\r\n this.situation.once[i].call(this.target(), this.pos, eased)\r\n delete this.situation.once[i]\r\n }\r\n }\r\n\r\n // fire during callback with position, eased position and current situation as parameter\r\n if(this.active) this.target().fire('during', {pos: this.pos, eased: eased, fx: this, situation: this.situation})\r\n\r\n // the user may call stop or finish in the during callback\r\n // so make sure that we still have a valid situation\r\n if(!this.situation){\r\n return this\r\n }\r\n\r\n // apply the actual animation to every property\r\n this.eachAt()\r\n\r\n // do final code when situation is finished\r\n if((this.pos == 1 && !this.situation.reversed) || (this.situation.reversed && this.pos == 0)){\r\n\r\n // stop animation callback\r\n this.stopAnimFrame()\r\n\r\n // fire finished callback with current situation as parameter\r\n this.target().fire('finished', {fx:this, situation: this.situation})\r\n\r\n if(!this.situations.length){\r\n this.target().fire('allfinished')\r\n\r\n // Recheck the length since the user may call animate in the afterAll callback\r\n if(!this.situations.length){\r\n this.target().off('.fx') // there shouldnt be any binding left, but to make sure...\r\n this.active = false\r\n }\r\n }\r\n\r\n // start next animation\r\n if(this.active) this.dequeue()\r\n else this.clearCurrent()\r\n\r\n }else if(!this.paused && this.active){\r\n // we continue animating when we are not at the end\r\n this.startAnimFrame()\r\n }\r\n\r\n // save last eased position for once callback triggering\r\n this.lastPos = eased\r\n return this\r\n\r\n }\r\n\r\n // calculates the step for every property and calls block with it\r\n , eachAt: function(){\r\n var i, len, at, self = this, target = this.target(), s = this.situation\r\n\r\n // apply animations which can be called trough a method\r\n for(i in s.animations){\r\n\r\n at = [].concat(s.animations[i]).map(function(el){\r\n return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el\r\n })\r\n\r\n target[i].apply(target, at)\r\n\r\n }\r\n\r\n // apply animation which has to be applied with attr()\r\n for(i in s.attrs){\r\n\r\n at = [i].concat(s.attrs[i]).map(function(el){\r\n return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el\r\n })\r\n\r\n target.attr.apply(target, at)\r\n\r\n }\r\n\r\n // apply animation which has to be applied with style()\r\n for(i in s.styles){\r\n\r\n at = [i].concat(s.styles[i]).map(function(el){\r\n return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el\r\n })\r\n\r\n target.style.apply(target, at)\r\n\r\n }\r\n\r\n // animate initialTransformation which has to be chained\r\n if(s.transforms.length){\r\n\r\n // get initial initialTransformation\r\n at = s.initialTransformation\r\n for(i = 0, len = s.transforms.length; i < len; i++){\r\n\r\n // get next transformation in chain\r\n var a = s.transforms[i]\r\n\r\n // multiply matrix directly\r\n if(a instanceof SVG.Matrix){\r\n\r\n if(a.relative){\r\n at = at.multiply(new SVG.Matrix().morph(a).at(s.ease(this.pos)))\r\n }else{\r\n at = at.morph(a).at(s.ease(this.pos))\r\n }\r\n continue\r\n }\r\n\r\n // when transformation is absolute we have to reset the needed transformation first\r\n if(!a.relative)\r\n a.undo(at.extract())\r\n\r\n // and reapply it after\r\n at = at.multiply(a.at(s.ease(this.pos)))\r\n\r\n }\r\n\r\n // set new matrix on element\r\n target.matrix(at)\r\n }\r\n\r\n return this\r\n\r\n }\r\n\r\n\r\n // adds an once-callback which is called at a specific position and never again\r\n , once: function(pos, fn, isEased){\r\n var c = this.last()\r\n if(!isEased) pos = c.ease(pos)\r\n\r\n c.once[pos] = fn\r\n\r\n return this\r\n }\r\n\r\n , _callStart: function() {\r\n setTimeout(function(){this.start()}.bind(this), 0)\r\n return this\r\n }\r\n\r\n }\r\n\r\n, parent: SVG.Element\r\n\r\n // Add method to parent elements\r\n, construct: {\r\n // Get fx module or create a new one, then animate with given duration and ease\r\n animate: function(o, ease, delay) {\r\n return (this.fx || (this.fx = new SVG.FX(this))).animate(o, ease, delay)\r\n }\r\n , delay: function(delay){\r\n return (this.fx || (this.fx = new SVG.FX(this))).delay(delay)\r\n }\r\n , stop: function(jumpToEnd, clearQueue) {\r\n if (this.fx)\r\n this.fx.stop(jumpToEnd, clearQueue)\r\n\r\n return this\r\n }\r\n , finish: function() {\r\n if (this.fx)\r\n this.fx.finish()\r\n\r\n return this\r\n }\r\n // Pause current animation\r\n , pause: function() {\r\n if (this.fx)\r\n this.fx.pause()\r\n\r\n return this\r\n }\r\n // Play paused current animation\r\n , play: function() {\r\n if (this.fx)\r\n this.fx.play()\r\n\r\n return this\r\n }\r\n // Set/Get the speed of the animations\r\n , speed: function(speed) {\r\n if (this.fx)\r\n if (speed == null)\r\n return this.fx.speed()\r\n else\r\n this.fx.speed(speed)\r\n\r\n return this\r\n }\r\n }\r\n\r\n})\r\n\r\n// MorphObj is used whenever no morphable object is given\r\nSVG.MorphObj = SVG.invent({\r\n\r\n create: function(from, to){\r\n // prepare color for morphing\r\n if(SVG.Color.isColor(to)) return new SVG.Color(from).morph(to)\r\n // check if we have a list of values\r\n if(SVG.regex.delimiter.test(from)) {\r\n // prepare path for morphing\r\n if(SVG.regex.pathLetters.test(from)) return new SVG.PathArray(from).morph(to)\r\n // prepare value list for morphing\r\n else return new SVG.Array(from).morph(to)\r\n }\r\n // prepare number for morphing\r\n if(SVG.regex.numberAndUnit.test(to)) return new SVG.Number(from).morph(to)\r\n\r\n // prepare for plain morphing\r\n this.value = from\r\n this.destination = to\r\n }\r\n\r\n, extend: {\r\n at: function(pos, real){\r\n return real < 1 ? this.value : this.destination\r\n },\r\n\r\n valueOf: function(){\r\n return this.value\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.FX, {\r\n // Add animatable attributes\r\n attr: function(a, v, relative) {\r\n // apply attributes individually\r\n if (typeof a == 'object') {\r\n for (var key in a)\r\n this.attr(key, a[key])\r\n\r\n } else {\r\n this.add(a, v, 'attrs')\r\n }\r\n\r\n return this\r\n }\r\n // Add animatable styles\r\n, style: function(s, v) {\r\n if (typeof s == 'object')\r\n for (var key in s)\r\n this.style(key, s[key])\r\n\r\n else\r\n this.add(s, v, 'styles')\r\n\r\n return this\r\n }\r\n // Animatable x-axis\r\n, x: function(x, relative) {\r\n if(this.target() instanceof SVG.G){\r\n this.transform({x:x}, relative)\r\n return this\r\n }\r\n\r\n var num = new SVG.Number(x)\r\n num.relative = relative\r\n return this.add('x', num)\r\n }\r\n // Animatable y-axis\r\n, y: function(y, relative) {\r\n if(this.target() instanceof SVG.G){\r\n this.transform({y:y}, relative)\r\n return this\r\n }\r\n\r\n var num = new SVG.Number(y)\r\n num.relative = relative\r\n return this.add('y', num)\r\n }\r\n // Animatable center x-axis\r\n, cx: function(x) {\r\n return this.add('cx', new SVG.Number(x))\r\n }\r\n // Animatable center y-axis\r\n, cy: function(y) {\r\n return this.add('cy', new SVG.Number(y))\r\n }\r\n // Add animatable move\r\n, move: function(x, y) {\r\n return this.x(x).y(y)\r\n }\r\n // Add animatable center\r\n, center: function(x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n // Add animatable size\r\n, size: function(width, height) {\r\n if (this.target() instanceof SVG.Text) {\r\n // animate font size for Text elements\r\n this.attr('font-size', width)\r\n\r\n } else {\r\n // animate bbox based size for all other elements\r\n var box\r\n\r\n if(!width || !height){\r\n box = this.target().bbox()\r\n }\r\n\r\n if(!width){\r\n width = box.width / box.height * height\r\n }\r\n\r\n if(!height){\r\n height = box.height / box.width * width\r\n }\r\n\r\n this.add('width' , new SVG.Number(width))\r\n .add('height', new SVG.Number(height))\r\n\r\n }\r\n\r\n return this\r\n }\r\n // Add animatable width\r\n, width: function(width) {\r\n return this.add('width', new SVG.Number(width))\r\n }\r\n // Add animatable height\r\n, height: function(height) {\r\n return this.add('height', new SVG.Number(height))\r\n }\r\n // Add animatable plot\r\n, plot: function(a, b, c, d) {\r\n // Lines can be plotted with 4 arguments\r\n if(arguments.length == 4) {\r\n return this.plot([a, b, c, d])\r\n }\r\n\r\n return this.add('plot', new (this.target().morphArray)(a))\r\n }\r\n // Add leading method\r\n, leading: function(value) {\r\n return this.target().leading ?\r\n this.add('leading', new SVG.Number(value)) :\r\n this\r\n }\r\n // Add animatable viewbox\r\n, viewbox: function(x, y, width, height) {\r\n if (this.target() instanceof SVG.Container) {\r\n this.add('viewbox', new SVG.ViewBox(x, y, width, height))\r\n }\r\n\r\n return this\r\n }\r\n, update: function(o) {\r\n if (this.target() instanceof SVG.Stop) {\r\n if (typeof o == 'number' || o instanceof SVG.Number) {\r\n return this.update({\r\n offset: arguments[0]\r\n , color: arguments[1]\r\n , opacity: arguments[2]\r\n })\r\n }\r\n\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', o.offset)\r\n }\r\n\r\n return this\r\n }\r\n})\r\n\nSVG.Box = SVG.invent({\r\n create: function(x, y, width, height) {\r\n if (typeof x == 'object' && !(x instanceof SVG.Element)) {\r\n // chromes getBoundingClientRect has no x and y property\r\n return SVG.Box.call(this, x.left != null ? x.left : x.x , x.top != null ? x.top : x.y, x.width, x.height)\r\n } else if (arguments.length == 4) {\r\n this.x = x\r\n this.y = y\r\n this.width = width\r\n this.height = height\r\n }\r\n\r\n // add center, right, bottom...\r\n fullBox(this)\r\n }\r\n, extend: {\r\n // Merge rect box with another, return a new instance\r\n merge: function(box) {\r\n var b = new this.constructor()\r\n\r\n // merge boxes\r\n b.x = Math.min(this.x, box.x)\r\n b.y = Math.min(this.y, box.y)\r\n b.width = Math.max(this.x + this.width, box.x + box.width) - b.x\r\n b.height = Math.max(this.y + this.height, box.y + box.height) - b.y\r\n\r\n return fullBox(b)\r\n }\r\n\r\n , transform: function(m) {\r\n var xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, p, bbox\r\n\r\n var pts = [\r\n new SVG.Point(this.x, this.y),\r\n new SVG.Point(this.x2, this.y),\r\n new SVG.Point(this.x, this.y2),\r\n new SVG.Point(this.x2, this.y2)\r\n ]\r\n\r\n pts.forEach(function(p) {\r\n p = p.transform(m)\r\n xMin = Math.min(xMin,p.x)\r\n xMax = Math.max(xMax,p.x)\r\n yMin = Math.min(yMin,p.y)\r\n yMax = Math.max(yMax,p.y)\r\n })\r\n\r\n bbox = new this.constructor()\r\n bbox.x = xMin\r\n bbox.width = xMax-xMin\r\n bbox.y = yMin\r\n bbox.height = yMax-yMin\r\n\r\n fullBox(bbox)\r\n\r\n return bbox\r\n }\r\n }\r\n})\r\n\r\nSVG.BBox = SVG.invent({\r\n // Initialize\r\n create: function(element) {\r\n SVG.Box.apply(this, [].slice.call(arguments))\r\n\r\n // get values if element is given\r\n if (element instanceof SVG.Element) {\r\n var box\r\n\r\n // yes this is ugly, but Firefox can be a pain when it comes to elements that are not yet rendered\r\n try {\r\n\r\n if (!document.documentElement.contains){\r\n // This is IE - it does not support contains() for top-level SVGs\r\n var topParent = element.node\r\n while (topParent.parentNode){\r\n topParent = topParent.parentNode\r\n }\r\n if (topParent != document) throw new Exception('Element not in the dom')\r\n } else {\r\n // the element is NOT in the dom, throw error\r\n if(!document.documentElement.contains(element.node)) throw new Exception('Element not in the dom')\r\n }\r\n\r\n // find native bbox\r\n box = element.node.getBBox()\r\n } catch(e) {\r\n if(element instanceof SVG.Shape){\r\n var clone = element.clone(SVG.parser.draw.instance).show()\r\n box = clone.node.getBBox()\r\n clone.remove()\r\n }else{\r\n box = {\r\n x: element.node.clientLeft\r\n , y: element.node.clientTop\r\n , width: element.node.clientWidth\r\n , height: element.node.clientHeight\r\n }\r\n }\r\n }\r\n\r\n SVG.Box.call(this, box)\r\n }\r\n\r\n }\r\n\r\n // Define ancestor\r\n, inherit: SVG.Box\r\n\r\n // Define Parent\r\n, parent: SVG.Element\r\n\r\n // Constructor\r\n, construct: {\r\n // Get bounding box\r\n bbox: function() {\r\n return new SVG.BBox(this)\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.BBox.prototype.constructor = SVG.BBox\r\n\r\n\r\nSVG.extend(SVG.Element, {\r\n tbox: function(){\r\n console.warn('Use of TBox is deprecated and mapped to RBox. Use .rbox() instead.')\r\n return this.rbox(this.doc())\r\n }\r\n})\r\n\r\nSVG.RBox = SVG.invent({\r\n // Initialize\r\n create: function(element) {\r\n SVG.Box.apply(this, [].slice.call(arguments))\r\n\r\n if (element instanceof SVG.Element) {\r\n SVG.Box.call(this, element.node.getBoundingClientRect())\r\n }\r\n }\r\n\r\n, inherit: SVG.Box\r\n\r\n // define Parent\r\n, parent: SVG.Element\r\n\r\n, extend: {\r\n addOffset: function() {\r\n // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\r\n this.x += window.pageXOffset\r\n this.y += window.pageYOffset\r\n return this\r\n }\r\n }\r\n\r\n // Constructor\r\n, construct: {\r\n // Get rect box\r\n rbox: function(el) {\r\n if (el) return new SVG.RBox(this).transform(el.screenCTM().inverse())\r\n return new SVG.RBox(this).addOffset()\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.RBox.prototype.constructor = SVG.RBox\r\n\nSVG.Matrix = SVG.invent({\r\n // Initialize\r\n create: function(source) {\r\n var i, base = arrayToMatrix([1, 0, 0, 1, 0, 0])\r\n\r\n // ensure source as object\r\n source = source instanceof SVG.Element ?\r\n source.matrixify() :\r\n typeof source === 'string' ?\r\n arrayToMatrix(source.split(SVG.regex.delimiter).map(parseFloat)) :\r\n arguments.length == 6 ?\r\n arrayToMatrix([].slice.call(arguments)) :\r\n Array.isArray(source) ?\r\n arrayToMatrix(source) :\r\n typeof source === 'object' ?\r\n source : base\r\n\r\n // merge source\r\n for (i = abcdef.length - 1; i >= 0; --i)\r\n this[abcdef[i]] = source[abcdef[i]] != null ?\r\n source[abcdef[i]] : base[abcdef[i]]\r\n }\r\n\r\n // Add methods\r\n, extend: {\r\n // Extract individual transformations\r\n extract: function() {\r\n // find delta transform points\r\n var px = deltaTransformPoint(this, 0, 1)\r\n , py = deltaTransformPoint(this, 1, 0)\r\n , skewX = 180 / Math.PI * Math.atan2(px.y, px.x) - 90\r\n\r\n return {\r\n // translation\r\n x: this.e\r\n , y: this.f\r\n , transformedX:(this.e * Math.cos(skewX * Math.PI / 180) + this.f * Math.sin(skewX * Math.PI / 180)) / Math.sqrt(this.a * this.a + this.b * this.b)\r\n , transformedY:(this.f * Math.cos(skewX * Math.PI / 180) + this.e * Math.sin(-skewX * Math.PI / 180)) / Math.sqrt(this.c * this.c + this.d * this.d)\r\n // skew\r\n , skewX: -skewX\r\n , skewY: 180 / Math.PI * Math.atan2(py.y, py.x)\r\n // scale\r\n , scaleX: Math.sqrt(this.a * this.a + this.b * this.b)\r\n , scaleY: Math.sqrt(this.c * this.c + this.d * this.d)\r\n // rotation\r\n , rotation: skewX\r\n , a: this.a\r\n , b: this.b\r\n , c: this.c\r\n , d: this.d\r\n , e: this.e\r\n , f: this.f\r\n , matrix: new SVG.Matrix(this)\r\n }\r\n }\r\n // Clone matrix\r\n , clone: function() {\r\n return new SVG.Matrix(this)\r\n }\r\n // Morph one matrix into another\r\n , morph: function(matrix) {\r\n // store new destination\r\n this.destination = new SVG.Matrix(matrix)\r\n\r\n return this\r\n }\r\n // Get morphed matrix at a given position\r\n , at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // calculate morphed matrix at a given position\r\n var matrix = new SVG.Matrix({\r\n a: this.a + (this.destination.a - this.a) * pos\r\n , b: this.b + (this.destination.b - this.b) * pos\r\n , c: this.c + (this.destination.c - this.c) * pos\r\n , d: this.d + (this.destination.d - this.d) * pos\r\n , e: this.e + (this.destination.e - this.e) * pos\r\n , f: this.f + (this.destination.f - this.f) * pos\r\n })\r\n\r\n return matrix\r\n }\r\n // Multiplies by given matrix\r\n , multiply: function(matrix) {\r\n return new SVG.Matrix(this.native().multiply(parseMatrix(matrix).native()))\r\n }\r\n // Inverses matrix\r\n , inverse: function() {\r\n return new SVG.Matrix(this.native().inverse())\r\n }\r\n // Translate matrix\r\n , translate: function(x, y) {\r\n return new SVG.Matrix(this.native().translate(x || 0, y || 0))\r\n }\r\n // Scale matrix\r\n , scale: function(x, y, cx, cy) {\r\n // support uniformal scale\r\n if (arguments.length == 1) {\r\n y = x\r\n } else if (arguments.length == 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n return this.around(cx, cy, new SVG.Matrix(x, 0, 0, y, 0, 0))\r\n }\r\n // Rotate matrix\r\n , rotate: function(r, cx, cy) {\r\n // convert degrees to radians\r\n r = SVG.utils.radians(r)\r\n\r\n return this.around(cx, cy, new SVG.Matrix(Math.cos(r), Math.sin(r), -Math.sin(r), Math.cos(r), 0, 0))\r\n }\r\n // Flip matrix on x or y, at a given offset\r\n , flip: function(a, o) {\r\n return a == 'x' ?\r\n this.scale(-1, 1, o, 0) :\r\n a == 'y' ?\r\n this.scale(1, -1, 0, o) :\r\n this.scale(-1, -1, a, o != null ? o : a)\r\n }\r\n // Skew\r\n , skew: function(x, y, cx, cy) {\r\n // support uniformal skew\r\n if (arguments.length == 1) {\r\n y = x\r\n } else if (arguments.length == 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n // convert degrees to radians\r\n x = SVG.utils.radians(x)\r\n y = SVG.utils.radians(y)\r\n\r\n return this.around(cx, cy, new SVG.Matrix(1, Math.tan(y), Math.tan(x), 1, 0, 0))\r\n }\r\n // SkewX\r\n , skewX: function(x, cx, cy) {\r\n return this.skew(x, 0, cx, cy)\r\n }\r\n // SkewY\r\n , skewY: function(y, cx, cy) {\r\n return this.skew(0, y, cx, cy)\r\n }\r\n // Transform around a center point\r\n , around: function(cx, cy, matrix) {\r\n return this\r\n .multiply(new SVG.Matrix(1, 0, 0, 1, cx || 0, cy || 0))\r\n .multiply(matrix)\r\n .multiply(new SVG.Matrix(1, 0, 0, 1, -cx || 0, -cy || 0))\r\n }\r\n // Convert to native SVGMatrix\r\n , native: function() {\r\n // create new matrix\r\n var matrix = SVG.parser.native.createSVGMatrix()\r\n\r\n // update with current values\r\n for (var i = abcdef.length - 1; i >= 0; i--)\r\n matrix[abcdef[i]] = this[abcdef[i]]\r\n\r\n return matrix\r\n }\r\n // Convert matrix to string\r\n , toString: function() {\r\n // Construct the matrix directly, avoid values that are too small\r\n return 'matrix(' + float32String(this.a) + ',' + float32String(this.b)\r\n + ',' + float32String(this.c) + ',' + float32String(this.d)\r\n + ',' + float32String(this.e) + ',' + float32String(this.f)\r\n + ')'\r\n }\r\n }\r\n\r\n // Define parent\r\n, parent: SVG.Element\r\n\r\n // Add parent method\r\n, construct: {\r\n // Get current matrix\r\n ctm: function() {\r\n return new SVG.Matrix(this.node.getCTM())\r\n },\r\n // Get current screen matrix\r\n screenCTM: function() {\r\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\r\n This is needed because FF does not return the transformation matrix\r\n for the inner coordinate system when getScreenCTM() is called on nested svgs.\r\n However all other Browsers do that */\r\n if(this instanceof SVG.Nested) {\r\n var rect = this.rect(1,1)\r\n var m = rect.node.getScreenCTM()\r\n rect.remove()\r\n return new SVG.Matrix(m)\r\n }\r\n return new SVG.Matrix(this.node.getScreenCTM())\r\n }\r\n\r\n }\r\n\r\n})\r\n\nSVG.Point = SVG.invent({\r\n // Initialize\r\n create: function(x,y) {\r\n var i, source, base = {x:0, y:0}\r\n\r\n // ensure source as object\r\n source = Array.isArray(x) ?\r\n {x:x[0], y:x[1]} :\r\n typeof x === 'object' ?\r\n {x:x.x, y:x.y} :\r\n x != null ?\r\n {x:x, y:(y != null ? y : x)} : base // If y has no value, then x is used has its value\r\n\r\n // merge source\r\n this.x = source.x\r\n this.y = source.y\r\n }\r\n\r\n // Add methods\r\n, extend: {\r\n // Clone point\r\n clone: function() {\r\n return new SVG.Point(this)\r\n }\r\n // Morph one point into another\r\n , morph: function(x, y) {\r\n // store new destination\r\n this.destination = new SVG.Point(x, y)\r\n\r\n return this\r\n }\r\n // Get morphed point at a given position\r\n , at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // calculate morphed matrix at a given position\r\n var point = new SVG.Point({\r\n x: this.x + (this.destination.x - this.x) * pos\r\n , y: this.y + (this.destination.y - this.y) * pos\r\n })\r\n\r\n return point\r\n }\r\n // Convert to native SVGPoint\r\n , native: function() {\r\n // create new point\r\n var point = SVG.parser.native.createSVGPoint()\r\n\r\n // update with current values\r\n point.x = this.x\r\n point.y = this.y\r\n\r\n return point\r\n }\r\n // transform point with matrix\r\n , transform: function(matrix) {\r\n return new SVG.Point(this.native().matrixTransform(matrix.native()))\r\n }\r\n\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.Element, {\r\n\r\n // Get point\r\n point: function(x, y) {\r\n return new SVG.Point(x,y).transform(this.screenCTM().inverse());\r\n }\r\n\r\n})\r\n\nSVG.extend(SVG.Element, {\r\n // Set svg element attribute\r\n attr: function(a, v, n) {\r\n // act as full getter\r\n if (a == null) {\r\n // get an object of attributes\r\n a = {}\r\n v = this.node.attributes\r\n for (n = v.length - 1; n >= 0; n--)\r\n a[v[n].nodeName] = SVG.regex.isNumber.test(v[n].nodeValue) ? parseFloat(v[n].nodeValue) : v[n].nodeValue\r\n\r\n return a\r\n\r\n } else if (typeof a == 'object') {\r\n // apply every attribute individually if an object is passed\r\n for (v in a) this.attr(v, a[v])\r\n\r\n } else if (v === null) {\r\n // remove value\r\n this.node.removeAttribute(a)\r\n\r\n } else if (v == null) {\r\n // act as a getter if the first and only argument is not an object\r\n v = this.node.getAttribute(a)\r\n return v == null ?\r\n SVG.defaults.attrs[a] :\r\n SVG.regex.isNumber.test(v) ?\r\n parseFloat(v) : v\r\n\r\n } else {\r\n // BUG FIX: some browsers will render a stroke if a color is given even though stroke width is 0\r\n if (a == 'stroke-width')\r\n this.attr('stroke', parseFloat(v) > 0 ? this._stroke : null)\r\n else if (a == 'stroke')\r\n this._stroke = v\r\n\r\n // convert image fill and stroke to patterns\r\n if (a == 'fill' || a == 'stroke') {\r\n if (SVG.regex.isImage.test(v))\r\n v = this.doc().defs().image(v, 0, 0)\r\n\r\n if (v instanceof SVG.Image)\r\n v = this.doc().defs().pattern(0, 0, function() {\r\n this.add(v)\r\n })\r\n }\r\n\r\n // ensure correct numeric values (also accepts NaN and Infinity)\r\n if (typeof v === 'number')\r\n v = new SVG.Number(v)\r\n\r\n // ensure full hex color\r\n else if (SVG.Color.isColor(v))\r\n v = new SVG.Color(v)\r\n\r\n // parse array values\r\n else if (Array.isArray(v))\r\n v = new SVG.Array(v)\r\n\r\n // if the passed attribute is leading...\r\n if (a == 'leading') {\r\n // ... call the leading method instead\r\n if (this.leading)\r\n this.leading(v)\r\n } else {\r\n // set given attribute on node\r\n typeof n === 'string' ?\r\n this.node.setAttributeNS(n, a, v.toString()) :\r\n this.node.setAttribute(a, v.toString())\r\n }\r\n\r\n // rebuild if required\r\n if (this.rebuild && (a == 'font-size' || a == 'x'))\r\n this.rebuild(a, v)\r\n }\r\n\r\n return this\r\n }\r\n})\nSVG.extend(SVG.Element, {\r\n // Add transformations\r\n transform: function(o, relative) {\r\n // get target in case of the fx module, otherwise reference this\r\n var target = this\r\n , matrix, bbox\r\n\r\n // act as a getter\r\n if (typeof o !== 'object') {\r\n // get current matrix\r\n matrix = new SVG.Matrix(target).extract()\r\n\r\n return typeof o === 'string' ? matrix[o] : matrix\r\n }\r\n\r\n // get current matrix\r\n matrix = new SVG.Matrix(target)\r\n\r\n // ensure relative flag\r\n relative = !!relative || !!o.relative\r\n\r\n // act on matrix\r\n if (o.a != null) {\r\n matrix = relative ?\r\n // relative\r\n matrix.multiply(new SVG.Matrix(o)) :\r\n // absolute\r\n new SVG.Matrix(o)\r\n\r\n // act on rotation\r\n } else if (o.rotation != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // apply transformation\r\n matrix = relative ?\r\n // relative\r\n matrix.rotate(o.rotation, o.cx, o.cy) :\r\n // absolute\r\n matrix.rotate(o.rotation - matrix.extract().rotation, o.cx, o.cy)\r\n\r\n // act on scale\r\n } else if (o.scale != null || o.scaleX != null || o.scaleY != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // ensure scale values on both axes\r\n o.scaleX = o.scale != null ? o.scale : o.scaleX != null ? o.scaleX : 1\r\n o.scaleY = o.scale != null ? o.scale : o.scaleY != null ? o.scaleY : 1\r\n\r\n if (!relative) {\r\n // absolute; multiply inversed values\r\n var e = matrix.extract()\r\n o.scaleX = o.scaleX * 1 / e.scaleX\r\n o.scaleY = o.scaleY * 1 / e.scaleY\r\n }\r\n\r\n matrix = matrix.scale(o.scaleX, o.scaleY, o.cx, o.cy)\r\n\r\n // act on skew\r\n } else if (o.skew != null || o.skewX != null || o.skewY != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // ensure skew values on both axes\r\n o.skewX = o.skew != null ? o.skew : o.skewX != null ? o.skewX : 0\r\n o.skewY = o.skew != null ? o.skew : o.skewY != null ? o.skewY : 0\r\n\r\n if (!relative) {\r\n // absolute; reset skew values\r\n var e = matrix.extract()\r\n matrix = matrix.multiply(new SVG.Matrix().skew(e.skewX, e.skewY, o.cx, o.cy).inverse())\r\n }\r\n\r\n matrix = matrix.skew(o.skewX, o.skewY, o.cx, o.cy)\r\n\r\n // act on flip\r\n } else if (o.flip) {\r\n if(o.flip == 'x' || o.flip == 'y') {\r\n o.offset = o.offset == null ? target.bbox()['c' + o.flip] : o.offset\r\n } else {\r\n if(o.offset == null) {\r\n bbox = target.bbox()\r\n o.flip = bbox.cx\r\n o.offset = bbox.cy\r\n } else {\r\n o.flip = o.offset\r\n }\r\n }\r\n\r\n matrix = new SVG.Matrix().flip(o.flip, o.offset)\r\n\r\n // act on translate\r\n } else if (o.x != null || o.y != null) {\r\n if (relative) {\r\n // relative\r\n matrix = matrix.translate(o.x, o.y)\r\n } else {\r\n // absolute\r\n if (o.x != null) matrix.e = o.x\r\n if (o.y != null) matrix.f = o.y\r\n }\r\n }\r\n\r\n return this.attr('transform', matrix)\r\n }\r\n})\r\n\r\nSVG.extend(SVG.FX, {\r\n transform: function(o, relative) {\r\n // get target in case of the fx module, otherwise reference this\r\n var target = this.target()\r\n , matrix, bbox\r\n\r\n // act as a getter\r\n if (typeof o !== 'object') {\r\n // get current matrix\r\n matrix = new SVG.Matrix(target).extract()\r\n\r\n return typeof o === 'string' ? matrix[o] : matrix\r\n }\r\n\r\n // ensure relative flag\r\n relative = !!relative || !!o.relative\r\n\r\n // act on matrix\r\n if (o.a != null) {\r\n matrix = new SVG.Matrix(o)\r\n\r\n // act on rotation\r\n } else if (o.rotation != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // apply transformation\r\n matrix = new SVG.Rotate(o.rotation, o.cx, o.cy)\r\n\r\n // act on scale\r\n } else if (o.scale != null || o.scaleX != null || o.scaleY != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // ensure scale values on both axes\r\n o.scaleX = o.scale != null ? o.scale : o.scaleX != null ? o.scaleX : 1\r\n o.scaleY = o.scale != null ? o.scale : o.scaleY != null ? o.scaleY : 1\r\n\r\n matrix = new SVG.Scale(o.scaleX, o.scaleY, o.cx, o.cy)\r\n\r\n // act on skew\r\n } else if (o.skewX != null || o.skewY != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // ensure skew values on both axes\r\n o.skewX = o.skewX != null ? o.skewX : 0\r\n o.skewY = o.skewY != null ? o.skewY : 0\r\n\r\n matrix = new SVG.Skew(o.skewX, o.skewY, o.cx, o.cy)\r\n\r\n // act on flip\r\n } else if (o.flip) {\r\n if(o.flip == 'x' || o.flip == 'y') {\r\n o.offset = o.offset == null ? target.bbox()['c' + o.flip] : o.offset\r\n } else {\r\n if(o.offset == null) {\r\n bbox = target.bbox()\r\n o.flip = bbox.cx\r\n o.offset = bbox.cy\r\n } else {\r\n o.flip = o.offset\r\n }\r\n }\r\n\r\n matrix = new SVG.Matrix().flip(o.flip, o.offset)\r\n\r\n // act on translate\r\n } else if (o.x != null || o.y != null) {\r\n matrix = new SVG.Translate(o.x, o.y)\r\n }\r\n\r\n if(!matrix) return this\r\n\r\n matrix.relative = relative\r\n\r\n this.last().transforms.push(matrix)\r\n\r\n return this._callStart()\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Element, {\r\n // Reset all transformations\r\n untransform: function() {\r\n return this.attr('transform', null)\r\n },\r\n // merge the whole transformation chain into one matrix and returns it\r\n matrixify: function() {\r\n\r\n var matrix = (this.attr('transform') || '')\r\n // split transformations\r\n .split(SVG.regex.transforms).slice(0,-1).map(function(str){\r\n // generate key => value pairs\r\n var kv = str.trim().split('(')\r\n return [kv[0], kv[1].split(SVG.regex.delimiter).map(function(str){ return parseFloat(str) })]\r\n })\r\n // merge every transformation into one matrix\r\n .reduce(function(matrix, transform){\r\n\r\n if(transform[0] == 'matrix') return matrix.multiply(arrayToMatrix(transform[1]))\r\n return matrix[transform[0]].apply(matrix, transform[1])\r\n\r\n }, new SVG.Matrix())\r\n\r\n return matrix\r\n },\r\n // add an element to another parent without changing the visual representation on the screen\r\n toParent: function(parent) {\r\n if(this == parent) return this\r\n var ctm = this.screenCTM()\r\n var pCtm = parent.screenCTM().inverse()\r\n\r\n this.addTo(parent).untransform().transform(pCtm.multiply(ctm))\r\n\r\n return this\r\n },\r\n // same as above with parent equals root-svg\r\n toDoc: function() {\r\n return this.toParent(this.doc())\r\n }\r\n\r\n})\r\n\r\nSVG.Transformation = SVG.invent({\r\n\r\n create: function(source, inversed){\r\n\r\n if(arguments.length > 1 && typeof inversed != 'boolean'){\r\n return this.constructor.call(this, [].slice.call(arguments))\r\n }\r\n\r\n if(Array.isArray(source)){\r\n for(var i = 0, len = this.arguments.length; i < len; ++i){\r\n this[this.arguments[i]] = source[i]\r\n }\r\n } else if(typeof source == 'object'){\r\n for(var i = 0, len = this.arguments.length; i < len; ++i){\r\n this[this.arguments[i]] = source[this.arguments[i]]\r\n }\r\n }\r\n\r\n this.inversed = false\r\n\r\n if(inversed === true){\r\n this.inversed = true\r\n }\r\n\r\n }\r\n\r\n, extend: {\r\n\r\n arguments: []\r\n , method: ''\r\n\r\n , at: function(pos){\r\n\r\n var params = []\r\n\r\n for(var i = 0, len = this.arguments.length; i < len; ++i){\r\n params.push(this[this.arguments[i]])\r\n }\r\n\r\n var m = this._undo || new SVG.Matrix()\r\n\r\n m = new SVG.Matrix().morph(SVG.Matrix.prototype[this.method].apply(m, params)).at(pos)\r\n\r\n return this.inversed ? m.inverse() : m\r\n\r\n }\r\n\r\n , undo: function(o){\r\n for(var i = 0, len = this.arguments.length; i < len; ++i){\r\n o[this.arguments[i]] = typeof this[this.arguments[i]] == 'undefined' ? 0 : o[this.arguments[i]]\r\n }\r\n\r\n // The method SVG.Matrix.extract which was used before calling this\r\n // method to obtain a value for the parameter o doesn't return a cx and\r\n // a cy so we use the ones that were provided to this object at its creation\r\n o.cx = this.cx\r\n o.cy = this.cy\r\n\r\n this._undo = new SVG[capitalize(this.method)](o, true).at(1)\r\n\r\n return this\r\n }\r\n\r\n }\r\n\r\n})\r\n\r\nSVG.Translate = SVG.invent({\r\n\r\n parent: SVG.Matrix\r\n, inherit: SVG.Transformation\r\n\r\n, create: function(source, inversed){\r\n this.constructor.apply(this, [].slice.call(arguments))\r\n }\r\n\r\n, extend: {\r\n arguments: ['transformedX', 'transformedY']\r\n , method: 'translate'\r\n }\r\n\r\n})\r\n\r\nSVG.Rotate = SVG.invent({\r\n\r\n parent: SVG.Matrix\r\n, inherit: SVG.Transformation\r\n\r\n, create: function(source, inversed){\r\n this.constructor.apply(this, [].slice.call(arguments))\r\n }\r\n\r\n, extend: {\r\n arguments: ['rotation', 'cx', 'cy']\r\n , method: 'rotate'\r\n , at: function(pos){\r\n var m = new SVG.Matrix().rotate(new SVG.Number().morph(this.rotation - (this._undo ? this._undo.rotation : 0)).at(pos), this.cx, this.cy)\r\n return this.inversed ? m.inverse() : m\r\n }\r\n , undo: function(o){\r\n this._undo = o\r\n return this\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.Scale = SVG.invent({\r\n\r\n parent: SVG.Matrix\r\n, inherit: SVG.Transformation\r\n\r\n, create: function(source, inversed){\r\n this.constructor.apply(this, [].slice.call(arguments))\r\n }\r\n\r\n, extend: {\r\n arguments: ['scaleX', 'scaleY', 'cx', 'cy']\r\n , method: 'scale'\r\n }\r\n\r\n})\r\n\r\nSVG.Skew = SVG.invent({\r\n\r\n parent: SVG.Matrix\r\n, inherit: SVG.Transformation\r\n\r\n, create: function(source, inversed){\r\n this.constructor.apply(this, [].slice.call(arguments))\r\n }\r\n\r\n, extend: {\r\n arguments: ['skewX', 'skewY', 'cx', 'cy']\r\n , method: 'skew'\r\n }\r\n\r\n})\r\n\nSVG.extend(SVG.Element, {\r\n // Dynamic style generator\r\n style: function(s, v) {\r\n if (arguments.length == 0) {\r\n // get full style\r\n return this.node.style.cssText || ''\r\n\r\n } else if (arguments.length < 2) {\r\n // apply every style individually if an object is passed\r\n if (typeof s == 'object') {\r\n for (v in s) this.style(v, s[v])\r\n\r\n } else if (SVG.regex.isCss.test(s)) {\r\n // parse css string\r\n s = s.split(/\\s*;\\s*/)\r\n // filter out suffix ; and stuff like ;;\r\n .filter(function(e) { return !!e })\r\n .map(function(e){ return e.split(/\\s*:\\s*/) })\r\n\r\n // apply every definition individually\r\n while (v = s.pop()) {\r\n this.style(v[0], v[1])\r\n }\r\n } else {\r\n // act as a getter if the first and only argument is not an object\r\n return this.node.style[camelCase(s)]\r\n }\r\n\r\n } else {\r\n this.node.style[camelCase(s)] = v === null || SVG.regex.isBlank.test(v) ? '' : v\r\n }\r\n\r\n return this\r\n }\r\n})\nSVG.Parent = SVG.invent({\r\n // Initialize node\r\n create: function(element) {\r\n this.constructor.call(this, element)\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Element\r\n\r\n // Add class methods\r\n, extend: {\r\n // Returns all child elements\r\n children: function() {\r\n return SVG.utils.map(SVG.utils.filterSVGElements(this.node.childNodes), function(node) {\r\n return SVG.adopt(node)\r\n })\r\n }\r\n // Add given element at a position\r\n , add: function(element, i) {\r\n if (i == null)\r\n this.node.appendChild(element.node)\r\n else if (element.node != this.node.childNodes[i])\r\n this.node.insertBefore(element.node, this.node.childNodes[i])\r\n\r\n return this\r\n }\r\n // Basically does the same as `add()` but returns the added element instead\r\n , put: function(element, i) {\r\n this.add(element, i)\r\n return element\r\n }\r\n // Checks if the given element is a child\r\n , has: function(element) {\r\n return this.index(element) >= 0\r\n }\r\n // Gets index of given element\r\n , index: function(element) {\r\n return [].slice.call(this.node.childNodes).indexOf(element.node)\r\n }\r\n // Get a element at the given index\r\n , get: function(i) {\r\n return SVG.adopt(this.node.childNodes[i])\r\n }\r\n // Get first child\r\n , first: function() {\r\n return this.get(0)\r\n }\r\n // Get the last child\r\n , last: function() {\r\n return this.get(this.node.childNodes.length - 1)\r\n }\r\n // Iterates over all children and invokes a given block\r\n , each: function(block, deep) {\r\n var i, il\r\n , children = this.children()\r\n\r\n for (i = 0, il = children.length; i < il; i++) {\r\n if (children[i] instanceof SVG.Element)\r\n block.apply(children[i], [i, children])\r\n\r\n if (deep && (children[i] instanceof SVG.Container))\r\n children[i].each(block, deep)\r\n }\r\n\r\n return this\r\n }\r\n // Remove a given child\r\n , removeElement: function(element) {\r\n this.node.removeChild(element.node)\r\n\r\n return this\r\n }\r\n // Remove all elements in this container\r\n , clear: function() {\r\n // remove children\r\n while(this.node.hasChildNodes())\r\n this.node.removeChild(this.node.lastChild)\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n return this\r\n }\r\n , // Get defs\r\n defs: function() {\r\n return this.doc().defs()\r\n }\r\n }\r\n\r\n})\r\n\nSVG.extend(SVG.Parent, {\r\n\r\n ungroup: function(parent, depth) {\r\n if(depth === 0 || this instanceof SVG.Defs || this.node == SVG.parser.draw) return this\r\n\r\n parent = parent || (this instanceof SVG.Doc ? this : this.parent(SVG.Parent))\r\n depth = depth || Infinity\r\n\r\n this.each(function(){\r\n if(this instanceof SVG.Defs) return this\r\n if(this instanceof SVG.Parent) return this.ungroup(parent, depth-1)\r\n return this.toParent(parent)\r\n })\r\n\r\n this.node.firstChild || this.remove()\r\n\r\n return this\r\n },\r\n\r\n flatten: function(parent, depth) {\r\n return this.ungroup(parent, depth)\r\n }\r\n\r\n})\nSVG.Container = SVG.invent({\r\n // Initialize node\r\n create: function(element) {\r\n this.constructor.call(this, element)\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Parent\r\n\r\n})\n\r\nSVG.ViewBox = SVG.invent({\r\n\r\n create: function(source) {\r\n var i, base = [0, 0, 0, 0]\r\n\r\n var x, y, width, height, box, view, we, he\r\n , wm = 1 // width multiplier\r\n , hm = 1 // height multiplier\r\n , reg = /[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?/gi\r\n\r\n if(source instanceof SVG.Element){\r\n\r\n we = source\r\n he = source\r\n view = (source.attr('viewBox') || '').match(reg)\r\n box = source.bbox\r\n\r\n // get dimensions of current node\r\n width = new SVG.Number(source.width())\r\n height = new SVG.Number(source.height())\r\n\r\n // find nearest non-percentual dimensions\r\n while (width.unit == '%') {\r\n wm *= width.value\r\n width = new SVG.Number(we instanceof SVG.Doc ? we.parent().offsetWidth : we.parent().width())\r\n we = we.parent()\r\n }\r\n while (height.unit == '%') {\r\n hm *= height.value\r\n height = new SVG.Number(he instanceof SVG.Doc ? he.parent().offsetHeight : he.parent().height())\r\n he = he.parent()\r\n }\r\n\r\n // ensure defaults\r\n this.x = 0\r\n this.y = 0\r\n this.width = width * wm\r\n this.height = height * hm\r\n this.zoom = 1\r\n\r\n if (view) {\r\n // get width and height from viewbox\r\n x = parseFloat(view[0])\r\n y = parseFloat(view[1])\r\n width = parseFloat(view[2])\r\n height = parseFloat(view[3])\r\n\r\n // calculate zoom accoring to viewbox\r\n this.zoom = ((this.width / this.height) > (width / height)) ?\r\n this.height / height :\r\n this.width / width\r\n\r\n // calculate real pixel dimensions on parent SVG.Doc element\r\n this.x = x\r\n this.y = y\r\n this.width = width\r\n this.height = height\r\n\r\n }\r\n\r\n }else{\r\n\r\n // ensure source as object\r\n source = typeof source === 'string' ?\r\n source.match(reg).map(function(el){ return parseFloat(el) }) :\r\n Array.isArray(source) ?\r\n source :\r\n typeof source == 'object' ?\r\n [source.x, source.y, source.width, source.height] :\r\n arguments.length == 4 ?\r\n [].slice.call(arguments) :\r\n base\r\n\r\n this.x = source[0]\r\n this.y = source[1]\r\n this.width = source[2]\r\n this.height = source[3]\r\n }\r\n\r\n\r\n }\r\n\r\n, extend: {\r\n\r\n toString: function() {\r\n return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\r\n }\r\n , morph: function(x, y, width, height){\r\n this.destination = new SVG.ViewBox(x, y, width, height)\r\n return this\r\n }\r\n\r\n , at: function(pos) {\r\n\r\n if(!this.destination) return this\r\n\r\n return new SVG.ViewBox([\r\n this.x + (this.destination.x - this.x) * pos\r\n , this.y + (this.destination.y - this.y) * pos\r\n , this.width + (this.destination.width - this.width) * pos\r\n , this.height + (this.destination.height - this.height) * pos\r\n ])\r\n\r\n }\r\n\r\n }\r\n\r\n // Define parent\r\n, parent: SVG.Container\r\n\r\n // Add parent method\r\n, construct: {\r\n\r\n // get/set viewbox\r\n viewbox: function(x, y, width, height) {\r\n if (arguments.length == 0)\r\n // act as a getter if there are no arguments\r\n return new SVG.ViewBox(this)\r\n\r\n // otherwise act as a setter\r\n return this.attr('viewBox', new SVG.ViewBox(x, y, width, height))\r\n }\r\n\r\n }\r\n\r\n})\n// Add events to elements\r\n\r\n;[ 'click',\r\n 'dblclick',\r\n 'mousedown',\r\n 'mouseup',\r\n 'mouseover',\r\n 'mouseout',\r\n 'mousemove',\r\n 'mouseenter',\r\n 'mouseleave',\r\n 'touchstart',\r\n 'touchmove',\r\n 'touchleave',\r\n 'touchend',\r\n 'touchcancel' ].forEach(function (event) {\r\n // add event to SVG.Element\r\n SVG.Element.prototype[event] = function (f) {\r\n // bind event to element rather than element node\r\n if (f == null) {\r\n SVG.off(this, event)\r\n } else {\r\n SVG.on(this, event, f)\r\n }\r\n return this\r\n }\r\n })\r\n\r\nSVG.listenerId = 0\r\n\r\n// Add event binder in the SVG namespace\r\nSVG.on = function (node, events, listener, binding, options) {\r\n var l = listener.bind(binding || node)\r\n var n = node instanceof SVG.Element ? node.node : node\r\n\r\n // ensure instance object for nodes which are not adopted\r\n n.instance = n.instance || {_events: {}}\r\n\r\n var bag = n.instance._events\r\n\r\n // add id to listener\r\n if (!listener._svgjsListenerId) { listener._svgjsListenerId = ++SVG.listenerId }\r\n\r\n events.split(SVG.regex.delimiter).forEach(function (event) {\r\n var ev = event.split('.')[0]\r\n var ns = event.split('.')[1] || '*'\r\n\r\n // ensure valid object\r\n bag[ev] = bag[ev] || {}\r\n bag[ev][ns] = bag[ev][ns] || {}\r\n\r\n // reference listener\r\n bag[ev][ns][listener._svgjsListenerId] = l\r\n\r\n // add listener\r\n n.addEventListener(ev, l, options || false)\r\n })\r\n}\r\n\r\n// Add event unbinder in the SVG namespace\r\nSVG.off = function (node, events, listener, options) {\r\n var n = node instanceof SVG.Element ? node.node : node\r\n if (!n.instance) return\r\n\r\n // listener can be a function or a number\r\n if (typeof listener === 'function') {\r\n listener = listener._svgjsListenerId\r\n if (!listener) return\r\n }\r\n\r\n var bag = n.instance._events\r\n\r\n ;(events || '').split(SVG.regex.delimiter).forEach(function (event) {\r\n var ev = event && event.split('.')[0]\r\n var ns = event && event.split('.')[1]\r\n var namespace, l\r\n\r\n if (listener) {\r\n // remove listener reference\r\n if (bag[ev] && bag[ev][ns || '*']) {\r\n // removeListener\r\n n.removeEventListener(ev, bag[ev][ns || '*'][listener], options || false)\r\n\r\n delete bag[ev][ns || '*'][listener]\r\n }\r\n } else if (ev && ns) {\r\n // remove all listeners for a namespaced event\r\n if (bag[ev] && bag[ev][ns]) {\r\n for (l in bag[ev][ns]) { SVG.off(n, [ev, ns].join('.'), l) }\r\n\r\n delete bag[ev][ns]\r\n }\r\n } else if (ns) {\r\n // remove all listeners for a specific namespace\r\n for (event in bag) {\r\n for (namespace in bag[event]) {\r\n if (ns === namespace) { SVG.off(n, [event, ns].join('.')) }\r\n }\r\n }\r\n } else if (ev) {\r\n // remove all listeners for the event\r\n if (bag[ev]) {\r\n for (namespace in bag[ev]) { SVG.off(n, [ev, namespace].join('.')) }\r\n\r\n delete bag[ev]\r\n }\r\n } else {\r\n // remove all listeners on a given node\r\n for (event in bag) { SVG.off(n, event) }\r\n\r\n n.instance._events = {}\r\n }\r\n })\r\n}\r\n\r\nSVG.extend(SVG.Element, {\r\n // Bind given event to listener\r\n on: function (event, listener, binding, options) {\r\n SVG.on(this, event, listener, binding, options)\r\n return this\r\n },\r\n // Unbind event from listener\r\n off: function (event, listener) {\r\n SVG.off(this.node, event, listener)\r\n return this\r\n },\r\n fire: function (event, data) {\r\n // Dispatch event\r\n if (event instanceof window.Event) {\r\n this.node.dispatchEvent(event)\r\n } else {\r\n this.node.dispatchEvent(event = new SVG.CustomEvent(event, {detail: data, cancelable: true}))\r\n }\r\n this._event = event\r\n return this\r\n },\r\n event: function() {\r\n return this._event\r\n }\r\n})\r\n\n\r\nSVG.Defs = SVG.invent({\r\n // Initialize node\r\n create: 'defs'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n})\nSVG.G = SVG.invent({\r\n // Initialize node\r\n create: 'g'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Move over x-axis\r\n x: function(x) {\r\n return x == null ? this.transform('x') : this.transform({ x: x - this.x() }, true)\r\n }\r\n // Move over y-axis\r\n , y: function(y) {\r\n return y == null ? this.transform('y') : this.transform({ y: y - this.y() }, true)\r\n }\r\n // Move by center over x-axis\r\n , cx: function(x) {\r\n return x == null ? this.gbox().cx : this.x(x - this.gbox().width / 2)\r\n }\r\n // Move by center over y-axis\r\n , cy: function(y) {\r\n return y == null ? this.gbox().cy : this.y(y - this.gbox().height / 2)\r\n }\r\n , gbox: function() {\r\n\r\n var bbox = this.bbox()\r\n , trans = this.transform()\r\n\r\n bbox.x += trans.x\r\n bbox.x2 += trans.x\r\n bbox.cx += trans.x\r\n\r\n bbox.y += trans.y\r\n bbox.y2 += trans.y\r\n bbox.cy += trans.y\r\n\r\n return bbox\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a group element\r\n group: function() {\r\n return this.put(new SVG.G)\r\n }\r\n }\r\n})\r\n\nSVG.Doc = SVG.invent({\r\n // Initialize node\r\n create: function(element) {\r\n if (element) {\r\n // ensure the presence of a dom element\r\n element = typeof element == 'string' ?\r\n document.getElementById(element) :\r\n element\r\n\r\n // If the target is an svg element, use that element as the main wrapper.\r\n // This allows svg.js to work with svg documents as well.\r\n if (element.nodeName == 'svg') {\r\n this.constructor.call(this, element)\r\n } else {\r\n this.constructor.call(this, SVG.create('svg'))\r\n element.appendChild(this.node)\r\n this.size('100%', '100%')\r\n }\r\n\r\n // set svg element attributes and ensure defs node\r\n this.namespace().defs()\r\n }\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Add namespaces\r\n namespace: function() {\r\n return this\r\n .attr({ xmlns: SVG.ns, version: '1.1' })\r\n .attr('xmlns:xlink', SVG.xlink, SVG.xmlns)\r\n .attr('xmlns:svgjs', SVG.svgjs, SVG.xmlns)\r\n }\r\n // Creates and returns defs element\r\n , defs: function() {\r\n if (!this._defs) {\r\n var defs\r\n\r\n // Find or create a defs element in this instance\r\n if (defs = this.node.getElementsByTagName('defs')[0])\r\n this._defs = SVG.adopt(defs)\r\n else\r\n this._defs = new SVG.Defs\r\n\r\n // Make sure the defs node is at the end of the stack\r\n this.node.appendChild(this._defs.node)\r\n }\r\n\r\n return this._defs\r\n }\r\n // custom parent method\r\n , parent: function() {\r\n if(!this.node.parentNode || this.node.parentNode.nodeName == '#document' || this.node.parentNode.nodeName == '#document-fragment') return null\r\n return this.node.parentNode\r\n }\r\n // Fix for possible sub-pixel offset. See:\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=608812\r\n , spof: function() {\r\n var pos = this.node.getScreenCTM()\r\n\r\n if (pos)\r\n this\r\n .style('left', (-pos.e % 1) + 'px')\r\n .style('top', (-pos.f % 1) + 'px')\r\n\r\n return this\r\n }\r\n\r\n // Removes the doc from the DOM\r\n , remove: function() {\r\n if(this.parent()) {\r\n this.parent().removeChild(this.node)\r\n }\r\n\r\n return this\r\n }\r\n , clear: function() {\r\n // remove children\r\n while(this.node.hasChildNodes())\r\n this.node.removeChild(this.node.lastChild)\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n // add back parser\r\n if(!SVG.parser.draw.parentNode)\r\n this.node.appendChild(SVG.parser.draw)\r\n\r\n return this\r\n }\r\n , clone: function (parent) {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // get reference to node\r\n var node = this.node\r\n\r\n // clone element and assign new id\r\n var clone = assignNewId(node.cloneNode(true))\r\n\r\n // insert the clone in the given parent or after myself\r\n if(parent) {\r\n (parent.node || parent).appendChild(clone.node)\r\n } else {\r\n node.parentNode.insertBefore(clone.node, node.nextSibling)\r\n }\r\n\r\n return clone\r\n }\r\n }\r\n\r\n})\r\n\n// ### This module adds backward / forward functionality to elements.\r\n\r\n//\r\nSVG.extend(SVG.Element, {\r\n // Get all siblings, including myself\r\n siblings: function() {\r\n return this.parent().children()\r\n }\r\n // Get the curent position siblings\r\n, position: function() {\r\n return this.parent().index(this)\r\n }\r\n // Get the next element (will return null if there is none)\r\n, next: function() {\r\n return this.siblings()[this.position() + 1]\r\n }\r\n // Get the next element (will return null if there is none)\r\n, previous: function() {\r\n return this.siblings()[this.position() - 1]\r\n }\r\n // Send given element one step forward\r\n, forward: function() {\r\n var i = this.position() + 1\r\n , p = this.parent()\r\n\r\n // move node one step forward\r\n p.removeElement(this).add(this, i)\r\n\r\n // make sure defs node is always at the top\r\n if (p instanceof SVG.Doc)\r\n p.node.appendChild(p.defs().node)\r\n\r\n return this\r\n }\r\n // Send given element one step backward\r\n, backward: function() {\r\n var i = this.position()\r\n\r\n if (i > 0)\r\n this.parent().removeElement(this).add(this, i - 1)\r\n\r\n return this\r\n }\r\n // Send given element all the way to the front\r\n, front: function() {\r\n var p = this.parent()\r\n\r\n // Move node forward\r\n p.node.appendChild(this.node)\r\n\r\n // Make sure defs node is always at the top\r\n if (p instanceof SVG.Doc)\r\n p.node.appendChild(p.defs().node)\r\n\r\n return this\r\n }\r\n // Send given element all the way to the back\r\n, back: function() {\r\n if (this.position() > 0)\r\n this.parent().removeElement(this).add(this, 0)\r\n\r\n return this\r\n }\r\n // Inserts a given element before the targeted element\r\n, before: function(element) {\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i)\r\n\r\n return this\r\n }\r\n // Insters a given element after the targeted element\r\n, after: function(element) {\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i + 1)\r\n\r\n return this\r\n }\r\n\r\n})\nSVG.Mask = SVG.invent({\r\n // Initialize node\r\n create: function() {\r\n this.constructor.call(this, SVG.create('mask'))\r\n\r\n // keep references to masked elements\r\n this.targets = []\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Unmask all masked elements and remove itself\r\n remove: function() {\r\n // unmask all targets\r\n for (var i = this.targets.length - 1; i >= 0; i--)\r\n if (this.targets[i])\r\n this.targets[i].unmask()\r\n this.targets = []\r\n\r\n // remove mask from parent\r\n SVG.Element.prototype.remove.call(this)\r\n\r\n return this\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create masking element\r\n mask: function() {\r\n return this.defs().put(new SVG.Mask)\r\n }\r\n }\r\n})\r\n\r\n\r\nSVG.extend(SVG.Element, {\r\n // Distribute mask to svg element\r\n maskWith: function(element) {\r\n // use given mask or create a new one\r\n this.masker = element instanceof SVG.Mask ? element : this.parent().mask().add(element)\r\n\r\n // store reverence on self in mask\r\n this.masker.targets.push(this)\r\n\r\n // apply mask\r\n return this.attr('mask', 'url(\"#' + this.masker.attr('id') + '\")')\r\n }\r\n // Unmask element\r\n, unmask: function() {\r\n delete this.masker\r\n return this.attr('mask', null)\r\n }\r\n\r\n})\r\n\nSVG.ClipPath = SVG.invent({\r\n // Initialize node\r\n create: function() {\r\n this.constructor.call(this, SVG.create('clipPath'))\r\n\r\n // keep references to clipped elements\r\n this.targets = []\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Unclip all clipped elements and remove itself\r\n remove: function() {\r\n // unclip all targets\r\n for (var i = this.targets.length - 1; i >= 0; i--)\r\n if (this.targets[i])\r\n this.targets[i].unclip()\r\n this.targets = []\r\n\r\n // remove clipPath from parent\r\n this.parent().removeElement(this)\r\n\r\n return this\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create clipping element\r\n clip: function() {\r\n return this.defs().put(new SVG.ClipPath)\r\n }\r\n }\r\n})\r\n\r\n//\r\nSVG.extend(SVG.Element, {\r\n // Distribute clipPath to svg element\r\n clipWith: function(element) {\r\n // use given clip or create a new one\r\n this.clipper = element instanceof SVG.ClipPath ? element : this.parent().clip().add(element)\r\n\r\n // store reverence on self in mask\r\n this.clipper.targets.push(this)\r\n\r\n // apply mask\r\n return this.attr('clip-path', 'url(\"#' + this.clipper.attr('id') + '\")')\r\n }\r\n // Unclip element\r\n, unclip: function() {\r\n delete this.clipper\r\n return this.attr('clip-path', null)\r\n }\r\n\r\n})\nSVG.Gradient = SVG.invent({\r\n // Initialize node\r\n create: function(type) {\r\n this.constructor.call(this, SVG.create(type + 'Gradient'))\r\n\r\n // store type\r\n this.type = type\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Add a color stop\r\n at: function(offset, color, opacity) {\r\n return this.put(new SVG.Stop).update(offset, color, opacity)\r\n }\r\n // Update gradient\r\n , update: function(block) {\r\n // remove all stops\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block == 'function')\r\n block.call(this, this)\r\n\r\n return this\r\n }\r\n // Return the fill id\r\n , fill: function() {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n // Alias string convertion to fill\r\n , toString: function() {\r\n return this.fill()\r\n }\r\n // custom attr to handle transform\r\n , attr: function(a, b, c) {\r\n if(a == 'transform') a = 'gradientTransform'\r\n return SVG.Container.prototype.attr.call(this, a, b, c)\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create gradient element in defs\r\n gradient: function(type, block) {\r\n return this.defs().gradient(type, block)\r\n }\r\n }\r\n})\r\n\r\n// Add animatable methods to both gradient and fx module\r\nSVG.extend(SVG.Gradient, SVG.FX, {\r\n // From position\r\n from: function(x, y) {\r\n return (this._target || this).type == 'radial' ?\r\n this.attr({ fx: new SVG.Number(x), fy: new SVG.Number(y) }) :\r\n this.attr({ x1: new SVG.Number(x), y1: new SVG.Number(y) })\r\n }\r\n // To position\r\n, to: function(x, y) {\r\n return (this._target || this).type == 'radial' ?\r\n this.attr({ cx: new SVG.Number(x), cy: new SVG.Number(y) }) :\r\n this.attr({ x2: new SVG.Number(x), y2: new SVG.Number(y) })\r\n }\r\n})\r\n\r\n// Base gradient generation\r\nSVG.extend(SVG.Defs, {\r\n // define gradient\r\n gradient: function(type, block) {\r\n return this.put(new SVG.Gradient(type)).update(block)\r\n }\r\n\r\n})\r\n\r\nSVG.Stop = SVG.invent({\r\n // Initialize node\r\n create: 'stop'\r\n\r\n // Inherit from\r\n, inherit: SVG.Element\r\n\r\n // Add class methods\r\n, extend: {\r\n // add color stops\r\n update: function(o) {\r\n if (typeof o == 'number' || o instanceof SVG.Number) {\r\n o = {\r\n offset: arguments[0]\r\n , color: arguments[1]\r\n , opacity: arguments[2]\r\n }\r\n }\r\n\r\n // set attributes\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', new SVG.Number(o.offset))\r\n\r\n return this\r\n }\r\n }\r\n\r\n})\r\n\nSVG.Pattern = SVG.invent({\r\n // Initialize node\r\n create: 'pattern'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Return the fill id\r\n fill: function() {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n // Update pattern by rebuilding\r\n , update: function(block) {\r\n // remove content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block == 'function')\r\n block.call(this, this)\r\n\r\n return this\r\n }\r\n // Alias string convertion to fill\r\n , toString: function() {\r\n return this.fill()\r\n }\r\n // custom attr to handle transform\r\n , attr: function(a, b, c) {\r\n if(a == 'transform') a = 'patternTransform'\r\n return SVG.Container.prototype.attr.call(this, a, b, c)\r\n }\r\n\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create pattern element in defs\r\n pattern: function(width, height, block) {\r\n return this.defs().pattern(width, height, block)\r\n }\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Defs, {\r\n // Define gradient\r\n pattern: function(width, height, block) {\r\n return this.put(new SVG.Pattern).update(block).attr({\r\n x: 0\r\n , y: 0\r\n , width: width\r\n , height: height\r\n , patternUnits: 'userSpaceOnUse'\r\n })\r\n }\r\n\r\n})\nSVG.Shape = SVG.invent({\r\n // Initialize node\r\n create: function(element) {\r\n this.constructor.call(this, element)\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Element\r\n\r\n})\n\r\nSVG.Bare = SVG.invent({\r\n // Initialize\r\n create: function(element, inherit) {\r\n // construct element\r\n this.constructor.call(this, SVG.create(element))\r\n\r\n // inherit custom methods\r\n if (inherit)\r\n for (var method in inherit.prototype)\r\n if (typeof inherit.prototype[method] === 'function')\r\n this[method] = inherit.prototype[method]\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Element\r\n\r\n // Add methods\r\n, extend: {\r\n // Insert some plain text\r\n words: function(text) {\r\n // remove contents\r\n while (this.node.hasChildNodes())\r\n this.node.removeChild(this.node.lastChild)\r\n\r\n // create text node\r\n this.node.appendChild(document.createTextNode(text))\r\n\r\n return this\r\n }\r\n }\r\n})\r\n\r\n\r\nSVG.extend(SVG.Parent, {\r\n // Create an element that is not described by SVG.js\r\n element: function(element, inherit) {\r\n return this.put(new SVG.Bare(element, inherit))\r\n }\r\n})\r\n\nSVG.Symbol = SVG.invent({\r\n // Initialize node\r\n create: 'symbol'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n, construct: {\r\n // create symbol\r\n symbol: function() {\r\n return this.put(new SVG.Symbol)\r\n }\r\n }\r\n})\r\n\nSVG.Use = SVG.invent({\r\n // Initialize node\r\n create: 'use'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Use element as a reference\r\n element: function(element, file) {\r\n // Set lined element\r\n return this.attr('href', (file || '') + '#' + element, SVG.xlink)\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a use element\r\n use: function(element, file) {\r\n return this.put(new SVG.Use).element(element, file)\r\n }\r\n }\r\n})\nSVG.Rect = SVG.invent({\r\n // Initialize node\r\n create: 'rect'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a rect element\r\n rect: function(width, height) {\r\n return this.put(new SVG.Rect()).size(width, height)\r\n }\r\n }\r\n})\nSVG.Circle = SVG.invent({\r\n // Initialize node\r\n create: 'circle'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create circle element, based on ellipse\r\n circle: function(size) {\r\n return this.put(new SVG.Circle).rx(new SVG.Number(size).divide(2)).move(0, 0)\r\n }\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Circle, SVG.FX, {\r\n // Radius x value\r\n rx: function(rx) {\r\n return this.attr('r', rx)\r\n }\r\n // Alias radius x value\r\n, ry: function(ry) {\r\n return this.rx(ry)\r\n }\r\n})\r\n\r\nSVG.Ellipse = SVG.invent({\r\n // Initialize node\r\n create: 'ellipse'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create an ellipse\r\n ellipse: function(width, height) {\r\n return this.put(new SVG.Ellipse).size(width, height).move(0, 0)\r\n }\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Ellipse, SVG.Rect, SVG.FX, {\r\n // Radius x value\r\n rx: function(rx) {\r\n return this.attr('rx', rx)\r\n }\r\n // Radius y value\r\n, ry: function(ry) {\r\n return this.attr('ry', ry)\r\n }\r\n})\r\n\r\n// Add common method\r\nSVG.extend(SVG.Circle, SVG.Ellipse, {\r\n // Move over x-axis\r\n x: function(x) {\r\n return x == null ? this.cx() - this.rx() : this.cx(x + this.rx())\r\n }\r\n // Move over y-axis\r\n , y: function(y) {\r\n return y == null ? this.cy() - this.ry() : this.cy(y + this.ry())\r\n }\r\n // Move by center over x-axis\r\n , cx: function(x) {\r\n return x == null ? this.attr('cx') : this.attr('cx', x)\r\n }\r\n // Move by center over y-axis\r\n , cy: function(y) {\r\n return y == null ? this.attr('cy') : this.attr('cy', y)\r\n }\r\n // Set width of element\r\n , width: function(width) {\r\n return width == null ? this.rx() * 2 : this.rx(new SVG.Number(width).divide(2))\r\n }\r\n // Set height of element\r\n , height: function(height) {\r\n return height == null ? this.ry() * 2 : this.ry(new SVG.Number(height).divide(2))\r\n }\r\n // Custom size function\r\n , size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .rx(new SVG.Number(p.width).divide(2))\r\n .ry(new SVG.Number(p.height).divide(2))\r\n }\r\n})\nSVG.Line = SVG.invent({\r\n // Initialize node\r\n create: 'line'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Get array\r\n array: function() {\r\n return new SVG.PointArray([\r\n [ this.attr('x1'), this.attr('y1') ]\r\n , [ this.attr('x2'), this.attr('y2') ]\r\n ])\r\n }\r\n // Overwrite native plot() method\r\n , plot: function(x1, y1, x2, y2) {\r\n if (x1 == null)\r\n return this.array()\r\n else if (typeof y1 !== 'undefined')\r\n x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }\r\n else\r\n x1 = new SVG.PointArray(x1).toLine()\r\n\r\n return this.attr(x1)\r\n }\r\n // Move by left top corner\r\n , move: function(x, y) {\r\n return this.attr(this.array().move(x, y).toLine())\r\n }\r\n // Set element size to given width and height\r\n , size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this.attr(this.array().size(p.width, p.height).toLine())\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a line element\r\n line: function(x1, y1, x2, y2) {\r\n // make sure plot is called as a setter\r\n // x1 is not necessarily a number, it can also be an array, a string and a SVG.PointArray\r\n return SVG.Line.prototype.plot.apply(\r\n this.put(new SVG.Line)\r\n , x1 != null ? [x1, y1, x2, y2] : [0, 0, 0, 0]\r\n )\r\n }\r\n }\r\n})\r\n\nSVG.Polyline = SVG.invent({\r\n // Initialize node\r\n create: 'polyline'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a wrapped polyline element\r\n polyline: function(p) {\r\n // make sure plot is called as a setter\r\n return this.put(new SVG.Polyline).plot(p || new SVG.PointArray)\r\n }\r\n }\r\n})\r\n\r\nSVG.Polygon = SVG.invent({\r\n // Initialize node\r\n create: 'polygon'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a wrapped polygon element\r\n polygon: function(p) {\r\n // make sure plot is called as a setter\r\n return this.put(new SVG.Polygon).plot(p || new SVG.PointArray)\r\n }\r\n }\r\n})\r\n\r\n// Add polygon-specific functions\r\nSVG.extend(SVG.Polyline, SVG.Polygon, {\r\n // Get array\r\n array: function() {\r\n return this._array || (this._array = new SVG.PointArray(this.attr('points')))\r\n }\r\n // Plot new path\r\n, plot: function(p) {\r\n return (p == null) ?\r\n this.array() :\r\n this.clear().attr('points', typeof p == 'string' ? p : (this._array = new SVG.PointArray(p)))\r\n }\r\n // Clear array cache\r\n, clear: function() {\r\n delete this._array\r\n return this\r\n }\r\n // Move by left top corner\r\n, move: function(x, y) {\r\n return this.attr('points', this.array().move(x, y))\r\n }\r\n // Set element size to given width and height\r\n, size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this.attr('points', this.array().size(p.width, p.height))\r\n }\r\n\r\n})\r\n\n// unify all point to point elements\r\nSVG.extend(SVG.Line, SVG.Polyline, SVG.Polygon, {\r\n // Define morphable array\r\n morphArray: SVG.PointArray\r\n // Move by left top corner over x-axis\r\n, x: function(x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n // Move by left top corner over y-axis\r\n, y: function(y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n // Set width of element\r\n, width: function(width) {\r\n var b = this.bbox()\r\n\r\n return width == null ? b.width : this.size(width, b.height)\r\n }\r\n // Set height of element\r\n, height: function(height) {\r\n var b = this.bbox()\r\n\r\n return height == null ? b.height : this.size(b.width, height)\r\n }\r\n})\nSVG.Path = SVG.invent({\r\n // Initialize node\r\n create: 'path'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Define morphable array\r\n morphArray: SVG.PathArray\r\n // Get array\r\n , array: function() {\r\n return this._array || (this._array = new SVG.PathArray(this.attr('d')))\r\n }\r\n // Plot new path\r\n , plot: function(d) {\r\n return (d == null) ?\r\n this.array() :\r\n this.clear().attr('d', typeof d == 'string' ? d : (this._array = new SVG.PathArray(d)))\r\n }\r\n // Clear array cache\r\n , clear: function() {\r\n delete this._array\r\n return this\r\n }\r\n // Move by left top corner\r\n , move: function(x, y) {\r\n return this.attr('d', this.array().move(x, y))\r\n }\r\n // Move by left top corner over x-axis\r\n , x: function(x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n // Move by left top corner over y-axis\r\n , y: function(y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n // Set element size to given width and height\r\n , size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this.attr('d', this.array().size(p.width, p.height))\r\n }\r\n // Set width of element\r\n , width: function(width) {\r\n return width == null ? this.bbox().width : this.size(width, this.bbox().height)\r\n }\r\n // Set height of element\r\n , height: function(height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }\r\n\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a wrapped path element\r\n path: function(d) {\r\n // make sure plot is called as a setter\r\n return this.put(new SVG.Path).plot(d || new SVG.PathArray)\r\n }\r\n }\r\n})\r\n\nSVG.Image = SVG.invent({\r\n // Initialize node\r\n create: 'image'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // (re)load image\r\n load: function(url) {\r\n if (!url) return this\r\n\r\n var self = this\r\n , img = new window.Image()\r\n\r\n // preload image\r\n SVG.on(img, 'load', function() {\r\n SVG.off(img)\r\n\r\n var p = self.parent(SVG.Pattern)\r\n\r\n if(p === null) return\r\n\r\n // ensure image size\r\n if (self.width() == 0 && self.height() == 0)\r\n self.size(img.width, img.height)\r\n\r\n // ensure pattern size if not set\r\n if (p && p.width() == 0 && p.height() == 0)\r\n p.size(self.width(), self.height())\r\n\r\n // callback\r\n if (typeof self._loaded === 'function')\r\n self._loaded.call(self, {\r\n width: img.width\r\n , height: img.height\r\n , ratio: img.width / img.height\r\n , url: url\r\n })\r\n })\r\n\r\n SVG.on(img, 'error', function(e){\r\n SVG.off(img)\r\n\r\n if (typeof self._error === 'function'){\r\n self._error.call(self, e)\r\n }\r\n })\r\n\r\n return this.attr('href', (img.src = this.src = url), SVG.xlink)\r\n }\r\n // Add loaded callback\r\n , loaded: function(loaded) {\r\n this._loaded = loaded\r\n return this\r\n }\r\n\r\n , error: function(error) {\r\n this._error = error\r\n return this\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // create image element, load image and set its size\r\n image: function(source, width, height) {\r\n return this.put(new SVG.Image).load(source).size(width || 0, height || width || 0)\r\n }\r\n }\r\n\r\n})\nSVG.Text = SVG.invent({\r\n // Initialize node\r\n create: function() {\r\n this.constructor.call(this, SVG.create('text'))\r\n\r\n this.dom.leading = new SVG.Number(1.3) // store leading value for rebuilding\r\n this._rebuild = true // enable automatic updating of dy values\r\n this._build = false // disable build mode for adding multiple lines\r\n\r\n // set default font\r\n this.attr('font-family', SVG.defaults.attrs['font-family'])\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Move over x-axis\r\n x: function(x) {\r\n // act as getter\r\n if (x == null)\r\n return this.attr('x')\r\n\r\n return this.attr('x', x)\r\n }\r\n // Move over y-axis\r\n , y: function(y) {\r\n var oy = this.attr('y')\r\n , o = typeof oy === 'number' ? oy - this.bbox().y : 0\r\n\r\n // act as getter\r\n if (y == null)\r\n return typeof oy === 'number' ? oy - o : oy\r\n\r\n return this.attr('y', typeof y.valueOf() === 'number' ? y + o : y)\r\n }\r\n // Move center over x-axis\r\n , cx: function(x) {\r\n return x == null ? this.bbox().cx : this.x(x - this.bbox().width / 2)\r\n }\r\n // Move center over y-axis\r\n , cy: function(y) {\r\n return y == null ? this.bbox().cy : this.y(y - this.bbox().height / 2)\r\n }\r\n // Set the text content\r\n , text: function(text) {\r\n // act as getter\r\n if (typeof text === 'undefined'){\r\n var text = ''\r\n var children = this.node.childNodes\r\n for(var i = 0, len = children.length; i < len; ++i){\r\n\r\n // add newline if its not the first child and newLined is set to true\r\n if(i != 0 && children[i].nodeType != 3 && SVG.adopt(children[i]).dom.newLined == true){\r\n text += '\\n'\r\n }\r\n\r\n // add content of this node\r\n text += children[i].textContent\r\n }\r\n\r\n return text\r\n }\r\n\r\n // remove existing content\r\n this.clear().build(true)\r\n\r\n if (typeof text === 'function') {\r\n // call block\r\n text.call(this, this)\r\n\r\n } else {\r\n // store text and make sure text is not blank\r\n text = text.split('\\n')\r\n\r\n // build new lines\r\n for (var i = 0, il = text.length; i < il; i++)\r\n this.tspan(text[i]).newLine()\r\n }\r\n\r\n // disable build mode and rebuild lines\r\n return this.build(false).rebuild()\r\n }\r\n // Set font size\r\n , size: function(size) {\r\n return this.attr('font-size', size).rebuild()\r\n }\r\n // Set / get leading\r\n , leading: function(value) {\r\n // act as getter\r\n if (value == null)\r\n return this.dom.leading\r\n\r\n // act as setter\r\n this.dom.leading = new SVG.Number(value)\r\n\r\n return this.rebuild()\r\n }\r\n // Get all the first level lines\r\n , lines: function() {\r\n var node = (this.textPath && this.textPath() || this).node\r\n\r\n // filter tspans and map them to SVG.js instances\r\n var lines = SVG.utils.map(SVG.utils.filterSVGElements(node.childNodes), function(el){\r\n return SVG.adopt(el)\r\n })\r\n\r\n // return an instance of SVG.set\r\n return new SVG.Set(lines)\r\n }\r\n // Rebuild appearance type\r\n , rebuild: function(rebuild) {\r\n // store new rebuild flag if given\r\n if (typeof rebuild == 'boolean')\r\n this._rebuild = rebuild\r\n\r\n // define position of all lines\r\n if (this._rebuild) {\r\n var self = this\r\n , blankLineOffset = 0\r\n , dy = this.dom.leading * new SVG.Number(this.attr('font-size'))\r\n\r\n this.lines().each(function() {\r\n if (this.dom.newLined) {\r\n if (!self.textPath())\r\n this.attr('x', self.attr('x'))\r\n if(this.text() == '\\n') {\r\n blankLineOffset += dy\r\n }else{\r\n this.attr('dy', dy + blankLineOffset)\r\n blankLineOffset = 0\r\n }\r\n }\r\n })\r\n\r\n this.fire('rebuild')\r\n }\r\n\r\n return this\r\n }\r\n // Enable / disable build mode\r\n , build: function(build) {\r\n this._build = !!build\r\n return this\r\n }\r\n // overwrite method from parent to set data properly\r\n , setData: function(o){\r\n this.dom = o\r\n this.dom.leading = new SVG.Number(o.leading || 1.3)\r\n return this\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create text element\r\n text: function(text) {\r\n return this.put(new SVG.Text).text(text)\r\n }\r\n // Create plain text element\r\n , plain: function(text) {\r\n return this.put(new SVG.Text).plain(text)\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.Tspan = SVG.invent({\r\n // Initialize node\r\n create: 'tspan'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Set text content\r\n text: function(text) {\r\n if(text == null) return this.node.textContent + (this.dom.newLined ? '\\n' : '')\r\n\r\n typeof text === 'function' ? text.call(this, this) : this.plain(text)\r\n\r\n return this\r\n }\r\n // Shortcut dx\r\n , dx: function(dx) {\r\n return this.attr('dx', dx)\r\n }\r\n // Shortcut dy\r\n , dy: function(dy) {\r\n return this.attr('dy', dy)\r\n }\r\n // Create new line\r\n , newLine: function() {\r\n // fetch text parent\r\n var t = this.parent(SVG.Text)\r\n\r\n // mark new line\r\n this.dom.newLined = true\r\n\r\n // apply new hy¡n\r\n return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x())\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.Text, SVG.Tspan, {\r\n // Create plain text node\r\n plain: function(text) {\r\n // clear if build mode is disabled\r\n if (this._build === false)\r\n this.clear()\r\n\r\n // create text node\r\n this.node.appendChild(document.createTextNode(text))\r\n\r\n return this\r\n }\r\n // Create a tspan\r\n, tspan: function(text) {\r\n var node = (this.textPath && this.textPath() || this).node\r\n , tspan = new SVG.Tspan\r\n\r\n // clear if build mode is disabled\r\n if (this._build === false)\r\n this.clear()\r\n\r\n // add new tspan\r\n node.appendChild(tspan.node)\r\n\r\n return tspan.text(text)\r\n }\r\n // Clear all lines\r\n, clear: function() {\r\n var node = (this.textPath && this.textPath() || this).node\r\n\r\n // remove existing child nodes\r\n while (node.hasChildNodes())\r\n node.removeChild(node.lastChild)\r\n\r\n return this\r\n }\r\n // Get length of text element\r\n, length: function() {\r\n return this.node.getComputedTextLength()\r\n }\r\n})\r\n\nSVG.TextPath = SVG.invent({\r\n // Initialize node\r\n create: 'textPath'\r\n\r\n // Inherit from\r\n, inherit: SVG.Parent\r\n\r\n // Define parent class\r\n, parent: SVG.Text\r\n\r\n // Add parent method\r\n, construct: {\r\n morphArray: SVG.PathArray\r\n // Create path for text to run on\r\n , path: function(d) {\r\n // create textPath element\r\n var path = new SVG.TextPath\r\n , track = this.doc().defs().path(d)\r\n\r\n // move lines to textpath\r\n while (this.node.hasChildNodes())\r\n path.node.appendChild(this.node.firstChild)\r\n\r\n // add textPath element as child node\r\n this.node.appendChild(path.node)\r\n\r\n // link textPath to path and add content\r\n path.attr('href', '#' + track, SVG.xlink)\r\n\r\n return this\r\n }\r\n // return the array of the path track element\r\n , array: function() {\r\n var track = this.track()\r\n\r\n return track ? track.array() : null\r\n }\r\n // Plot path if any\r\n , plot: function(d) {\r\n var track = this.track()\r\n , pathArray = null\r\n\r\n if (track) {\r\n pathArray = track.plot(d)\r\n }\r\n\r\n return (d == null) ? pathArray : this\r\n }\r\n // Get the path track element\r\n , track: function() {\r\n var path = this.textPath()\r\n\r\n if (path)\r\n return path.reference('href')\r\n }\r\n // Get the textPath child\r\n , textPath: function() {\r\n if (this.node.firstChild && this.node.firstChild.nodeName == 'textPath')\r\n return SVG.adopt(this.node.firstChild)\r\n }\r\n }\r\n})\r\n\nSVG.Nested = SVG.invent({\r\n // Initialize node\r\n create: function() {\r\n this.constructor.call(this, SVG.create('svg'))\r\n\r\n this.style('overflow', 'visible')\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create nested svg document\r\n nested: function() {\r\n return this.put(new SVG.Nested)\r\n }\r\n }\r\n})\nSVG.A = SVG.invent({\r\n // Initialize node\r\n create: 'a'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Link url\r\n to: function(url) {\r\n return this.attr('href', url, SVG.xlink)\r\n }\r\n // Link show attribute\r\n , show: function(target) {\r\n return this.attr('show', target, SVG.xlink)\r\n }\r\n // Link target attribute\r\n , target: function(target) {\r\n return this.attr('target', target)\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a hyperlink element\r\n link: function(url) {\r\n return this.put(new SVG.A).to(url)\r\n }\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Element, {\r\n // Create a hyperlink element\r\n linkTo: function(url) {\r\n var link = new SVG.A\r\n\r\n if (typeof url == 'function')\r\n url.call(link, link)\r\n else\r\n link.to(url)\r\n\r\n return this.parent().put(link).put(this)\r\n }\r\n\r\n})\nSVG.Marker = SVG.invent({\r\n // Initialize node\r\n create: 'marker'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Set width of element\r\n width: function(width) {\r\n return this.attr('markerWidth', width)\r\n }\r\n // Set height of element\r\n , height: function(height) {\r\n return this.attr('markerHeight', height)\r\n }\r\n // Set marker refX and refY\r\n , ref: function(x, y) {\r\n return this.attr('refX', x).attr('refY', y)\r\n }\r\n // Update marker\r\n , update: function(block) {\r\n // remove all content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block == 'function')\r\n block.call(this, this)\r\n\r\n return this\r\n }\r\n // Return the fill id\r\n , toString: function() {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n marker: function(width, height, block) {\r\n // Create marker element in defs\r\n return this.defs().marker(width, height, block)\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.Defs, {\r\n // Create marker\r\n marker: function(width, height, block) {\r\n // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\r\n return this.put(new SVG.Marker)\r\n .size(width, height)\r\n .ref(width / 2, height / 2)\r\n .viewbox(0, 0, width, height)\r\n .attr('orient', 'auto')\r\n .update(block)\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.Line, SVG.Polyline, SVG.Polygon, SVG.Path, {\r\n // Create and attach markers\r\n marker: function(marker, width, height, block) {\r\n var attr = ['marker']\r\n\r\n // Build attribute name\r\n if (marker != 'all') attr.push(marker)\r\n attr = attr.join('-')\r\n\r\n // Set marker attribute\r\n marker = arguments[1] instanceof SVG.Marker ?\r\n arguments[1] :\r\n this.doc().marker(width, height, block)\r\n\r\n return this.attr(attr, marker)\r\n }\r\n\r\n})\n// Define list of available attributes for stroke and fill\r\nvar sugar = {\r\n stroke: ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset']\r\n, fill: ['color', 'opacity', 'rule']\r\n, prefix: function(t, a) {\r\n return a == 'color' ? t : t + '-' + a\r\n }\r\n}\r\n\r\n// Add sugar for fill and stroke\r\n;['fill', 'stroke'].forEach(function(m) {\r\n var i, extension = {}\r\n\r\n extension[m] = function(o) {\r\n if (typeof o == 'undefined')\r\n return this\r\n if (typeof o == 'string' || SVG.Color.isRgb(o) || (o && typeof o.fill === 'function'))\r\n this.attr(m, o)\r\n\r\n else\r\n // set all attributes from sugar.fill and sugar.stroke list\r\n for (i = sugar[m].length - 1; i >= 0; i--)\r\n if (o[sugar[m][i]] != null)\r\n this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\r\n\r\n return this\r\n }\r\n\r\n SVG.extend(SVG.Element, SVG.FX, extension)\r\n\r\n})\r\n\r\nSVG.extend(SVG.Element, SVG.FX, {\r\n // Map rotation to transform\r\n rotate: function(d, cx, cy) {\r\n return this.transform({ rotation: d, cx: cx, cy: cy })\r\n }\r\n // Map skew to transform\r\n, skew: function(x, y, cx, cy) {\r\n return arguments.length == 1 || arguments.length == 3 ?\r\n this.transform({ skew: x, cx: y, cy: cx }) :\r\n this.transform({ skewX: x, skewY: y, cx: cx, cy: cy })\r\n }\r\n // Map scale to transform\r\n, scale: function(x, y, cx, cy) {\r\n return arguments.length == 1 || arguments.length == 3 ?\r\n this.transform({ scale: x, cx: y, cy: cx }) :\r\n this.transform({ scaleX: x, scaleY: y, cx: cx, cy: cy })\r\n }\r\n // Map translate to transform\r\n, translate: function(x, y) {\r\n return this.transform({ x: x, y: y })\r\n }\r\n // Map flip to transform\r\n, flip: function(a, o) {\r\n o = typeof a == 'number' ? a : o\r\n return this.transform({ flip: a || 'both', offset: o })\r\n }\r\n // Map matrix to transform\r\n, matrix: function(m) {\r\n return this.attr('transform', new SVG.Matrix(arguments.length == 6 ? [].slice.call(arguments) : m))\r\n }\r\n // Opacity\r\n, opacity: function(value) {\r\n return this.attr('opacity', value)\r\n }\r\n // Relative move over x axis\r\n, dx: function(x) {\r\n return this.x(new SVG.Number(x).plus(this instanceof SVG.FX ? 0 : this.x()), true)\r\n }\r\n // Relative move over y axis\r\n, dy: function(y) {\r\n return this.y(new SVG.Number(y).plus(this instanceof SVG.FX ? 0 : this.y()), true)\r\n }\r\n // Relative move over x and y axes\r\n, dmove: function(x, y) {\r\n return this.dx(x).dy(y)\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Rect, SVG.Ellipse, SVG.Circle, SVG.Gradient, SVG.FX, {\r\n // Add x and y radius\r\n radius: function(x, y) {\r\n var type = (this._target || this).type;\r\n return type == 'radial' || type == 'circle' ?\r\n this.attr('r', new SVG.Number(x)) :\r\n this.rx(x).ry(y == null ? x : y)\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Path, {\r\n // Get path length\r\n length: function() {\r\n return this.node.getTotalLength()\r\n }\r\n // Get point at length\r\n, pointAt: function(length) {\r\n return this.node.getPointAtLength(length)\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Parent, SVG.Text, SVG.Tspan, SVG.FX, {\r\n // Set font\r\n font: function(a, v) {\r\n if (typeof a == 'object') {\r\n for (v in a) this.font(v, a[v])\r\n }\r\n\r\n return a == 'leading' ?\r\n this.leading(v) :\r\n a == 'anchor' ?\r\n this.attr('text-anchor', v) :\r\n a == 'size' || a == 'family' || a == 'weight' || a == 'stretch' || a == 'variant' || a == 'style' ?\r\n this.attr('font-'+ a, v) :\r\n this.attr(a, v)\r\n }\r\n})\r\n\nSVG.Set = SVG.invent({\r\n // Initialize\r\n create: function(members) {\r\n if (members instanceof SVG.Set) {\r\n this.members = members.members.slice()\r\n } else {\r\n Array.isArray(members) ? this.members = members : this.clear()\r\n }\r\n }\r\n\r\n // Add class methods\r\n, extend: {\r\n // Add element to set\r\n add: function() {\r\n var i, il, elements = [].slice.call(arguments)\r\n\r\n for (i = 0, il = elements.length; i < il; i++)\r\n this.members.push(elements[i])\r\n\r\n return this\r\n }\r\n // Remove element from set\r\n , remove: function(element) {\r\n var i = this.index(element)\r\n\r\n // remove given child\r\n if (i > -1)\r\n this.members.splice(i, 1)\r\n\r\n return this\r\n }\r\n // Iterate over all members\r\n , each: function(block) {\r\n for (var i = 0, il = this.members.length; i < il; i++)\r\n block.apply(this.members[i], [i, this.members])\r\n\r\n return this\r\n }\r\n // Restore to defaults\r\n , clear: function() {\r\n // initialize store\r\n this.members = []\r\n\r\n return this\r\n }\r\n // Get the length of a set\r\n , length: function() {\r\n return this.members.length\r\n }\r\n // Checks if a given element is present in set\r\n , has: function(element) {\r\n return this.index(element) >= 0\r\n }\r\n // retuns index of given element in set\r\n , index: function(element) {\r\n return this.members.indexOf(element)\r\n }\r\n // Get member at given index\r\n , get: function(i) {\r\n return this.members[i]\r\n }\r\n // Get first member\r\n , first: function() {\r\n return this.get(0)\r\n }\r\n // Get last member\r\n , last: function() {\r\n return this.get(this.members.length - 1)\r\n }\r\n // Default value\r\n , valueOf: function() {\r\n return this.members\r\n }\r\n // Get the bounding box of all members included or empty box if set has no items\r\n , bbox: function(){\r\n // return an empty box of there are no members\r\n if (this.members.length == 0)\r\n return new SVG.RBox()\r\n\r\n // get the first rbox and update the target bbox\r\n var rbox = this.members[0].rbox(this.members[0].doc())\r\n\r\n this.each(function() {\r\n // user rbox for correct position and visual representation\r\n rbox = rbox.merge(this.rbox(this.doc()))\r\n })\r\n\r\n return rbox\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a new set\r\n set: function(members) {\r\n return new SVG.Set(members)\r\n }\r\n }\r\n})\r\n\r\nSVG.FX.Set = SVG.invent({\r\n // Initialize node\r\n create: function(set) {\r\n // store reference to set\r\n this.set = set\r\n }\r\n\r\n})\r\n\r\n// Alias methods\r\nSVG.Set.inherit = function() {\r\n var m\r\n , methods = []\r\n\r\n // gather shape methods\r\n for(var m in SVG.Shape.prototype)\r\n if (typeof SVG.Shape.prototype[m] == 'function' && typeof SVG.Set.prototype[m] != 'function')\r\n methods.push(m)\r\n\r\n // apply shape aliasses\r\n methods.forEach(function(method) {\r\n SVG.Set.prototype[method] = function() {\r\n for (var i = 0, il = this.members.length; i < il; i++)\r\n if (this.members[i] && typeof this.members[i][method] == 'function')\r\n this.members[i][method].apply(this.members[i], arguments)\r\n\r\n return method == 'animate' ? (this.fx || (this.fx = new SVG.FX.Set(this))) : this\r\n }\r\n })\r\n\r\n // clear methods for the next round\r\n methods = []\r\n\r\n // gather fx methods\r\n for(var m in SVG.FX.prototype)\r\n if (typeof SVG.FX.prototype[m] == 'function' && typeof SVG.FX.Set.prototype[m] != 'function')\r\n methods.push(m)\r\n\r\n // apply fx aliasses\r\n methods.forEach(function(method) {\r\n SVG.FX.Set.prototype[method] = function() {\r\n for (var i = 0, il = this.set.members.length; i < il; i++)\r\n this.set.members[i].fx[method].apply(this.set.members[i].fx, arguments)\r\n\r\n return this\r\n }\r\n })\r\n}\r\n\n\r\nSVG.extend(SVG.Element, {\r\n // Store data values on svg nodes\r\n data: function(a, v, r) {\r\n if (typeof a == 'object') {\r\n for (v in a)\r\n this.data(v, a[v])\r\n\r\n } else if (arguments.length < 2) {\r\n try {\r\n return JSON.parse(this.attr('data-' + a))\r\n } catch(e) {\r\n return this.attr('data-' + a)\r\n }\r\n\r\n } else {\r\n this.attr(\r\n 'data-' + a\r\n , v === null ?\r\n null :\r\n r === true || typeof v === 'string' || typeof v === 'number' ?\r\n v :\r\n JSON.stringify(v)\r\n )\r\n }\r\n\r\n return this\r\n }\r\n})\nSVG.extend(SVG.Element, {\r\n // Remember arbitrary data\r\n remember: function(k, v) {\r\n // remember every item in an object individually\r\n if (typeof arguments[0] == 'object')\r\n for (var v in k)\r\n this.remember(v, k[v])\r\n\r\n // retrieve memory\r\n else if (arguments.length == 1)\r\n return this.memory()[k]\r\n\r\n // store memory\r\n else\r\n this.memory()[k] = v\r\n\r\n return this\r\n }\r\n\r\n // Erase a given memory\r\n, forget: function() {\r\n if (arguments.length == 0)\r\n this._memory = {}\r\n else\r\n for (var i = arguments.length - 1; i >= 0; i--)\r\n delete this.memory()[arguments[i]]\r\n\r\n return this\r\n }\r\n\r\n // Initialize or return local memory object\r\n, memory: function() {\r\n return this._memory || (this._memory = {})\r\n }\r\n\r\n})\n// Method for getting an element by id\r\nSVG.get = function(id) {\r\n var node = document.getElementById(idFromReference(id) || id)\r\n return SVG.adopt(node)\r\n}\r\n\r\n// Select elements by query string\r\nSVG.select = function(query, parent) {\r\n return new SVG.Set(\r\n SVG.utils.map((parent || document).querySelectorAll(query), function(node) {\r\n return SVG.adopt(node)\r\n })\r\n )\r\n}\r\n\r\nSVG.extend(SVG.Parent, {\r\n // Scoped select method\r\n select: function(query) {\r\n return SVG.select(query, this.node)\r\n }\r\n\r\n})\nfunction pathRegReplace(a, b, c, d) {\r\n return c + d.replace(SVG.regex.dots, ' .')\r\n}\r\n\r\n// creates deep clone of array\r\nfunction array_clone(arr){\r\n var clone = arr.slice(0)\r\n for(var i = clone.length; i--;){\r\n if(Array.isArray(clone[i])){\r\n clone[i] = array_clone(clone[i])\r\n }\r\n }\r\n return clone\r\n}\r\n\r\n// tests if a given element is instance of an object\r\nfunction is(el, obj){\r\n return el instanceof obj\r\n}\r\n\r\n// tests if a given selector matches an element\r\nfunction matches(el, selector) {\r\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector);\r\n}\r\n\r\n// Convert dash-separated-string to camelCase\r\nfunction camelCase(s) {\r\n return s.toLowerCase().replace(/-(.)/g, function(m, g) {\r\n return g.toUpperCase()\r\n })\r\n}\r\n\r\n// Capitalize first letter of a string\r\nfunction capitalize(s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1)\r\n}\r\n\r\n// Ensure to six-based hex\r\nfunction fullHex(hex) {\r\n return hex.length == 4 ?\r\n [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2)\r\n , hex.substring(2, 3), hex.substring(2, 3)\r\n , hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('') : hex\r\n}\r\n\r\n// Component to hex value\r\nfunction compToHex(comp) {\r\n var hex = comp.toString(16)\r\n return hex.length == 1 ? '0' + hex : hex\r\n}\r\n\r\n// Calculate proportional width and height values when necessary\r\nfunction proportionalSize(element, width, height) {\r\n if (width == null || height == null) {\r\n var box = element.bbox()\r\n\r\n if (width == null)\r\n width = box.width / box.height * height\r\n else if (height == null)\r\n height = box.height / box.width * width\r\n }\r\n\r\n return {\r\n width: width\r\n , height: height\r\n }\r\n}\r\n\r\n// Delta transform point\r\nfunction deltaTransformPoint(matrix, x, y) {\r\n return {\r\n x: x * matrix.a + y * matrix.c + 0\r\n , y: x * matrix.b + y * matrix.d + 0\r\n }\r\n}\r\n\r\n// Map matrix array to object\r\nfunction arrayToMatrix(a) {\r\n return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\r\n}\r\n\r\n// Parse matrix if required\r\nfunction parseMatrix(matrix) {\r\n if (!(matrix instanceof SVG.Matrix))\r\n matrix = new SVG.Matrix(matrix)\r\n\r\n return matrix\r\n}\r\n\r\n// Add centre point to transform object\r\nfunction ensureCentre(o, target) {\r\n o.cx = o.cx == null ? target.bbox().cx : o.cx\r\n o.cy = o.cy == null ? target.bbox().cy : o.cy\r\n}\r\n\r\n// PathArray Helpers\r\nfunction arrayToString(a) {\r\n for (var i = 0, il = a.length, s = ''; i < il; i++) {\r\n s += a[i][0]\r\n\r\n if (a[i][1] != null) {\r\n s += a[i][1]\r\n\r\n if (a[i][2] != null) {\r\n s += ' '\r\n s += a[i][2]\r\n\r\n if (a[i][3] != null) {\r\n s += ' '\r\n s += a[i][3]\r\n s += ' '\r\n s += a[i][4]\r\n\r\n if (a[i][5] != null) {\r\n s += ' '\r\n s += a[i][5]\r\n s += ' '\r\n s += a[i][6]\r\n\r\n if (a[i][7] != null) {\r\n s += ' '\r\n s += a[i][7]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return s + ' '\r\n}\r\n\r\n// Deep new id assignment\r\nfunction assignNewId(node) {\r\n // do the same for SVG child nodes as well\r\n for (var i = node.childNodes.length - 1; i >= 0; i--)\r\n if (node.childNodes[i] instanceof window.SVGElement)\r\n assignNewId(node.childNodes[i])\r\n\r\n return SVG.adopt(node).id(SVG.eid(node.nodeName))\r\n}\r\n\r\n// Add more bounding box properties\r\nfunction fullBox(b) {\r\n if (b.x == null) {\r\n b.x = 0\r\n b.y = 0\r\n b.width = 0\r\n b.height = 0\r\n }\r\n\r\n b.w = b.width\r\n b.h = b.height\r\n b.x2 = b.x + b.width\r\n b.y2 = b.y + b.height\r\n b.cx = b.x + b.width / 2\r\n b.cy = b.y + b.height / 2\r\n\r\n return b\r\n}\r\n\r\n// Get id from reference string\r\nfunction idFromReference(url) {\r\n var m = (url || '').toString().match(SVG.regex.reference)\r\n\r\n if (m) return m[1]\r\n}\r\n\r\n// If values like 1e-88 are passed, this is not a valid 32 bit float,\r\n// but in those cases, we are so close to 0 that 0 works well!\r\nfunction float32String(v) {\r\n return Math.abs(v) > 1e-37 ? v : 0\r\n}\r\n\r\n// Create matrix array for looping\r\nvar abcdef = 'abcdef'.split('')\r\n\n// Add CustomEvent to IE9 and IE10\r\nif (typeof window.CustomEvent !== 'function') {\r\n // Code from: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent\r\n var CustomEventPoly = function(event, options) {\r\n options = options || { bubbles: false, cancelable: false, detail: undefined }\r\n var e = document.createEvent('CustomEvent')\r\n e.initCustomEvent(event, options.bubbles, options.cancelable, options.detail)\r\n return e\r\n }\r\n\r\n CustomEventPoly.prototype = window.Event.prototype\r\n\r\n SVG.CustomEvent = CustomEventPoly\r\n} else {\r\n SVG.CustomEvent = window.CustomEvent\r\n}\r\n\r\n// requestAnimationFrame / cancelAnimationFrame Polyfill with fallback based on Paul Irish\r\n(function(w) {\r\n var lastTime = 0\r\n var vendors = ['moz', 'webkit']\r\n\r\n for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\r\n w.requestAnimationFrame = w[vendors[x] + 'RequestAnimationFrame']\r\n w.cancelAnimationFrame = w[vendors[x] + 'CancelAnimationFrame'] ||\r\n w[vendors[x] + 'CancelRequestAnimationFrame']\r\n }\r\n\r\n w.requestAnimationFrame = w.requestAnimationFrame ||\r\n function(callback) {\r\n var currTime = new Date().getTime()\r\n var timeToCall = Math.max(0, 16 - (currTime - lastTime))\r\n\r\n var id = w.setTimeout(function() {\r\n callback(currTime + timeToCall)\r\n }, timeToCall)\r\n\r\n lastTime = currTime + timeToCall\r\n return id\r\n }\r\n\r\n w.cancelAnimationFrame = w.cancelAnimationFrame || w.clearTimeout;\r\n\r\n}(window))\r\n\r\nreturn SVG\r\n\r\n}));\r","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar constants_1 = require(\"../constants\");\nvar constants_2 = require(\"../../constants\");\nvar color_1 = require(\"./color\");\nvar stickerPattern = '([URFDLB])([0-9]+)';\nvar colorPattern = '(black|dgrey|grey|silver|white|yellow|red|orange|blue|green|purple|pink|[0-9a-fA-F]{6}|[0-9a-fA-F]{3})';\nvar arrowPattern = \"^(\" + stickerPattern + \")(\" + stickerPattern + \")(\" + stickerPattern + \")?(-s([0-9+]))?(-i([0-9+]))?(-\" + colorPattern + \")?\";\nfunction parseArrows(raw) {\n if (typeof raw !== 'string') {\n return [];\n }\n return raw.split(',')\n .map(function (part) { return parseArrow(part); })\n .filter(function (arrow) { return !!arrow; });\n}\nexports.parseArrows = parseArrows;\nfunction parseArrow(raw) {\n if (typeof raw !== 'string') {\n return null;\n }\n var arrowRegex = new RegExp(arrowPattern);\n var match = arrowRegex.exec(raw);\n if (!match) {\n return null;\n }\n return {\n s1: {\n face: constants_1.Face[match[2]],\n n: parseInt(match[3])\n },\n s2: {\n face: constants_1.Face[match[5]],\n n: parseInt(match[6])\n },\n s3: !match[7] ? undefined : {\n face: constants_1.Face[match[8]],\n n: parseInt(match[9])\n },\n color: match[15] ? color_1.parseColor(match[15]) : constants_2.ColorCode.Gray,\n scale: match[11] ? parseInt(match[11]) : 10,\n influence: match[13] ? parseInt(match[13]) : 10\n };\n}\nexports.parseArrow = parseArrow;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar constants_1 = require(\"../../constants\");\nfunction parseColor(raw) {\n var colorcodeRegex = /^[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/;\n // Append # for color codes\n if (colorcodeRegex.exec(raw)) {\n return \"#\" + raw;\n }\n if (constants_1.ColorAbbreviationToCode[raw]) {\n return constants_1.ColorAbbreviationToCode[raw];\n }\n if (constants_1.ColorNameToCode[raw]) {\n return constants_1.ColorNameToCode[raw];\n }\n // Default color\n return constants_1.ColorCode.Gray;\n}\nexports.parseColor = parseColor;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar masking_1 = require(\"./masking\");\nvar simulation_1 = require(\"./simulation\");\nvar algorithm_1 = require(\"./parsing/algorithm\");\nvar constants_1 = require(\"./constants\");\nvar constants_2 = require(\"../constants\");\nfunction makeStickerColors(options) {\n var stickerColors = options.stickerColors;\n var mask = options.mask ? masking_1.makeMasking(options.mask, options.cubeSize) : null;\n if (mask && options.maskAlg) {\n var maskCubeData_1 = new simulation_1.CubeData(options.cubeSize, mask);\n var alg_1 = algorithm_1.parseAlgorithm(options.maskAlg);\n alg_1.forEach(function (turn) {\n maskCubeData_1.turn(turn);\n });\n mask = maskCubeData_1.faces;\n }\n // Fill with color scheme if sticker colors not predefined.\n if (!stickerColors) {\n stickerColors = [].concat.apply([], constants_1.AllFaces.map(function (face) {\n return Array.apply(null, Array(options.cubeSize * options.cubeSize)).map(function () { return options.colorScheme[face]; });\n }));\n }\n var faceMappedStickers = constants_1.AllFaces.reduce(function (acc, face) {\n if (!acc[face])\n acc[face] = [];\n for (var i = 0; i < options.cubeSize; i++) {\n for (var j = 0; j < options.cubeSize; j++) {\n var faceIndex = constants_1.AllFaces.indexOf(face);\n var stickerNumber = (i * options.cubeSize) + j;\n var colorIndex = faceIndex * (options.cubeSize * options.cubeSize) + stickerNumber;\n if (stickerColors.length <= colorIndex) {\n acc[face][(options.cubeSize * i) + j] = constants_2.ColorName.Black;\n }\n else {\n acc[face][(options.cubeSize * i) + j] = stickerColors[colorIndex];\n }\n if (mask && !mask[face][(options.cubeSize * i) + j]) {\n acc[face][(options.cubeSize * i) + j] = constants_2.ColorCode.DarkGray;\n }\n }\n }\n return acc;\n }, {});\n // Apply Algorithm\n var cubeData = new simulation_1.CubeData(options.cubeSize, faceMappedStickers);\n var alg = algorithm_1.parseAlgorithm(options.algorithm);\n alg.forEach(function (move) {\n cubeData.turn(move);\n });\n return [].concat.apply([], constants_1.AllFaces.map(function (face) { return cubeData.faces[face].slice(); }));\n}\nexports.makeStickerColors = makeStickerColors;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;\nvar constants_1 = require(\"./constants\");\nvar maskingFunctions = (_a = {},\n _a[constants_1.Masking.FL] = (_b = {},\n _b[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _b[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _b[constants_1.Face.R] = function (row, col, cubeSize) { return row == (cubeSize - 1); },\n _b[constants_1.Face.L] = function (row, col, cubeSize) { return row == (cubeSize - 1); },\n _b[constants_1.Face.F] = function (row, col, cubeSize) { return row == (cubeSize - 1); },\n _b[constants_1.Face.B] = function (row, col, cubeSize) { return row == (cubeSize - 1); },\n _b),\n _a[constants_1.Masking.F2L] = (_c = {},\n _c[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _c[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _c[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _c[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _c[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0; },\n _c[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _c),\n _a[constants_1.Masking.LL] = (_d = {},\n _d[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _d[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _d[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0; },\n _d[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0; },\n _d[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0; },\n _d[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0; },\n _d),\n _a[constants_1.Masking.CLL] = (_e = {},\n _e[constants_1.Face.U] = function (row, col, cubeSize) {\n return (row > 0 && col > 0 && row < cubeSize - 1 && col < cubeSize - 1) // is center\n || ((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1)));\n },\n _e[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _e[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _e[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _e[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _e[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _e),\n _a[constants_1.Masking.ELL] = (_f = {},\n _f[constants_1.Face.U] = function (row, col, cubeSize) { return !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))); },\n _f[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _f[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _f[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _f[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _f[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _f),\n _a[constants_1.Masking.OLL] = (_g = {},\n _g[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _g[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _g[constants_1.Face.R] = function (row, col, cubeSize) { return false; },\n _g[constants_1.Face.L] = function (row, col, cubeSize) { return false; },\n _g[constants_1.Face.F] = function (row, col, cubeSize) { return false; },\n _g[constants_1.Face.B] = function (row, col, cubeSize) { return false; },\n _g),\n _a[constants_1.Masking.OCLL] = (_h = {},\n _h[constants_1.Face.U] = function (row, col, cubeSize) {\n return (row > 0 && col > 0 && row < cubeSize - 1 && col < cubeSize - 1) // is center\n || ((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1)));\n },\n _h[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _h[constants_1.Face.R] = function (row, col, cubeSize) { return false; },\n _h[constants_1.Face.L] = function (row, col, cubeSize) { return false; },\n _h[constants_1.Face.F] = function (row, col, cubeSize) { return false; },\n _h[constants_1.Face.B] = function (row, col, cubeSize) { return false; },\n _h),\n _a[constants_1.Masking.OELL] = (_j = {},\n _j[constants_1.Face.U] = function (row, col, cubeSize) { return !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))); },\n _j[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _j[constants_1.Face.R] = function (row, col, cubeSize) { return false; },\n _j[constants_1.Face.L] = function (row, col, cubeSize) { return false; },\n _j[constants_1.Face.F] = function (row, col, cubeSize) { return false; },\n _j[constants_1.Face.B] = function (row, col, cubeSize) { return false; },\n _j),\n _a[constants_1.Masking.COLL] = (_k = {},\n _k[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _k[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _k[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _k[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _k[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _k[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _k),\n _a[constants_1.Masking.OCELL] = (_l = {},\n _l[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _l[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _l[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _l[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _l[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _l[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _l),\n _a[constants_1.Masking.WV] = (_m = {},\n _m[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _m[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _m[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _m[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _m[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0; },\n _m[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _m),\n _a[constants_1.Masking.VH] = (_o = {},\n _o[constants_1.Face.U] = function (row, col, cubeSize) { return !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))); },\n _o[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _o[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _o[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _o[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0; },\n _o[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _o),\n _a[constants_1.Masking.ELS] = (_p = {},\n _p[constants_1.Face.U] = function (row, col, cubeSize) { return !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))); },\n _p[constants_1.Face.D] = function (row, col, cubeSize) { return row == 0 ? col < cubeSize - 1 : true; },\n _p[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && (row == cubeSize - 1 ? col > 0 : true); },\n _p[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _p[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && (row == cubeSize - 1 ? col < cubeSize - 1 : true); },\n _p[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _p),\n _a[constants_1.Masking.CLS] = (_q = {},\n _q[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _q[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _q[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _q[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _q[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0; },\n _q[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _q),\n _a[constants_1.Masking.CMLL] = (_r = {},\n _r[constants_1.Face.U] = function (row, col, cubeSize) { return ((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))); },\n _r[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _r[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 || col == 0 || col == cubeSize - 1; },\n _r[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 || col == 0 || col == cubeSize - 1; },\n _r[constants_1.Face.F] = function (row, col, cubeSize) { return col == 0 || col == cubeSize - 1; },\n _r[constants_1.Face.B] = function (row, col, cubeSize) { return col == 0 || col == cubeSize - 1; },\n _r),\n _a[constants_1.Masking.CROSS] = (_s = {},\n _s[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _s[constants_1.Face.D] = function (row, col, cubeSize) { return !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))); },\n _s[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _s[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _s[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _s[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _s),\n _a[constants_1.Masking.F2L3] = (_t = {},\n _t[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _t[constants_1.Face.D] = function (row, col, cubeSize) { return (row == 0 && col == cubeSize - 1) || !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))); },\n _t[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _t[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _t[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _t[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _t),\n _a[constants_1.Masking.F2L2] = (_u = {},\n _u[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _u[constants_1.Face.D] = function (row, col, cubeSize) { return row > 0 || (col > 0 && col < cubeSize - 1); },\n _u[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _u[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _u[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _u[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _u),\n _a[constants_1.Masking.F2LSM] = (_v = {},\n _v[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _v[constants_1.Face.D] = function (row, col, cubeSize) { return !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))) || (col == 0 && row == cubeSize - 1) || (row == 0 && col == cubeSize - 1); },\n _v[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _v[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _v[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _v[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _v),\n _a[constants_1.Masking.F2L1] = (_w = {},\n _w[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _w[constants_1.Face.D] = function (row, col, cubeSize) { return row !== 0 || col !== cubeSize - 1; },\n _w[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _w[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _w[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _w[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _w),\n _a[constants_1.Masking.F2B] = (_x = {},\n _x[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _x[constants_1.Face.D] = function (row, col, cubeSize) { return (col == 0 || col == cubeSize - 1); },\n _x[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _x[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _x[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && (col == 0 || col == cubeSize - 1); },\n _x[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && (col == 0 || col == cubeSize - 1); },\n _x),\n _a[constants_1.Masking.LINE] = (_y = {},\n _y[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _y[constants_1.Face.D] = function (row, col, cubeSize) { return col > 0 && col < cubeSize - 1; },\n _y[constants_1.Face.R] = function (row, col, cubeSize) { return false; },\n _y[constants_1.Face.L] = function (row, col, cubeSize) { return false; },\n _y[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _y[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _y),\n _a);\nfunction makeMasking(masking, cubeSize) {\n var _a;\n if (!maskingFunctions[masking]) {\n throw new Error(\"invalid masking \" + masking);\n }\n var numStickers = cubeSize * cubeSize;\n var faceValues = (_a = {},\n _a[constants_1.Face.U] = [],\n _a[constants_1.Face.F] = [],\n _a[constants_1.Face.R] = [],\n _a[constants_1.Face.D] = [],\n _a[constants_1.Face.L] = [],\n _a[constants_1.Face.B] = [],\n _a);\n var _loop_1 = function (i) {\n var row = Math.floor(i / cubeSize);\n var col = i % cubeSize;\n constants_1.AllFaces.forEach(function (face) {\n faceValues[face].push(maskingFunctions[masking][face](row, col, cubeSize));\n });\n };\n for (var i = 0; i < numStickers; i++) {\n _loop_1(i);\n }\n return faceValues;\n}\nexports.makeMasking = makeMasking;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar simulation_1 = require(\"../simulation\");\nvar constants_1 = require(\"../constants\");\n/**\n * Takes in an algorithm string and parses the turns from it\n * algorithm string format should be moves separated by a single space\n * (ex. \"U R2 L' x\")\n */\nfunction parseAlgorithm(algorithm) {\n if (!algorithm) {\n return [];\n }\n return algorithm.split(' ').map(function (move) {\n if (move.length > 2) {\n throw new Error(\"Invalid move (\" + move + \") in algorithm '\" + algorithm + \"'\");\n }\n return {\n move: getMove(move),\n turnType: getTurnType(move)\n };\n });\n}\nexports.parseAlgorithm = parseAlgorithm;\nfunction getMove(move) {\n if (constants_1.possibleMoves.indexOf(move.charAt(0)) < 0) {\n throw new Error(\"invalid move (\" + move + \")\");\n }\n else\n return move.charAt(0);\n}\nfunction getTurnType(move) {\n switch (move.charAt(1)) { // if string is only length 1 .charAt(1) will return empty string\n case constants_1.TurnAbbreviation.Clockwise:\n return simulation_1.TurnType.Clockwise;\n case constants_1.TurnAbbreviation.CounterClockwise:\n return simulation_1.TurnType.CounterClockwise;\n case constants_1.TurnAbbreviation.Double:\n return simulation_1.TurnType.Double;\n default:\n throw new Error(\"Invalid move modifier (\" + move.charAt(1) + \") in move '\" + move + \"'\");\n }\n ;\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://sr-visualizer/webpack/universalModuleDefinition","webpack://sr-visualizer/webpack/bootstrap","webpack://sr-visualizer/./src/cube/constants.ts","webpack://sr-visualizer/./src/constants.ts","webpack://sr-visualizer/./src/math.ts","webpack://sr-visualizer/./src/cube/geometry.ts","webpack://sr-visualizer/./src/cube/simulation.ts","webpack://sr-visualizer/./src/index.ts","webpack://sr-visualizer/./src/cube/drawing.ts","webpack://sr-visualizer/./node_modules/svg.js/dist/svg.js","webpack://sr-visualizer/./src/cube/parsing/arrow.ts","webpack://sr-visualizer/./src/cube/parsing/color.ts","webpack://sr-visualizer/./src/cube/stickers.ts","webpack://sr-visualizer/./src/cube/masking.ts","webpack://sr-visualizer/./src/cube/parsing/algorithm.ts"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_a","_b","Face","constants_1","AllFaces","U","R","F","D","L","B","AlgorithmUnit","FaceRotationVectors","DefaultColorScheme","ColorCode","Yellow","Red","Blue","White","Orange","Green","JapaneseColorScheme","possibleMoves","M","E","S","X","Y","Z","TurnAbbreviation","Masking","ColorName","ColorAbbreviation","ColorNameToCode","Black","DarkGray","Gray","Silver","Purple","Pink","ColorAbbreviationToCode","Transparent","Axis","translate","pos","v","map","index","scale","scalar","makeMatrix","rows","cols","matrix","transScale","x","rotate","axis","radians","newPosition","slice","Math","cos","sin","project","radians2Degrees","PI","math_1","makeStickerPosition","face","cubeSize","y","Error","makeFaceStickers","options","stickers","row","_loop_1","col","sticker","centerTranslation","viewportRotations","forEach","rotation","dist","rotateFaces","faceRotations","rotations","reduce","acc","makeCubeGeometry","view","_c","_d","_e","_f","TurnType","faceIdentity","stickerNumber","counterClockwiseSticker","clockwiseSticker","doubleTurn","OppositeTurn","Clockwise","CounterClockwise","Double","AxisOrientation","CubeData","initialValues","this","faces","numStickers","clockwiseMapping","counterClockwiseMapping","doubleMapping","initValues","push","_this","currentValue","rotateFace","turn","newStickerNumber","reverse","axisRotation","offset","range","faceOrder","forward","double","originalValues","stickerIndex","j","length","nextFace","valueIndex","nextFaceValueIndex","xLayersRotation","yLayersRotation","zLayersRotation","rTurn","turnType","lTurn","uTurn","dTurn","fTurn","bTurn","mTurn","eTurn","sTurn","xTurn","yTurn","zTurn","move","JSON","stringify","__assign","assign","arguments","apply","geometry_1","drawing_1","stickers_1","constants_2","defaultOptions","width","height","colorScheme","cubeColor","cubeOpacity","stickerOpacity","outlineWidth","strokeWidth","viewbox","cubeSVG","container","extraOptions","geomety","stickerColors","makeStickerColors","renderCube","cubePNG","element","document","createElement","setTimeout","svgElement","querySelector","targetImage","appendChild","can","ctx","getContext","loader","Image","onload","drawImage","src","toDataURL","svgAsXML","XMLSerializer","serializeToString","encodeURIComponent","SVG","arrow_1","defaultFaceRotations","faceVisible","getCubeOutlineGroup","svg","cubeOutlineGroup","group","opacity","attr","stroke-width","stroke-linejoin","renderCubeOutline","outlinePoints","polygon","fill","stroke","renderFaceStickers","stoke-opacity","centerPoint","renderSticker","getStickerColor","g","p1","p2","p3","p4","stickerColor","stickerPoints","Array","isArray","faceIndex","indexOf","colorIndex","renderOLLStickers","v1","v2","renderArrow","geometry","arrow","p1y","floor","s1","p1x","p2y","s2","p2x","center","s3","p3y","p3x","influence","p_","atan","lineSvg","path","color","headSvg","transform","style","renderOrder","sort","a","b","getRenderOrder","size","hiddenFaces","filter","visibleFaces","backgroundSvg","rect","backgroundColor","renderBackground","cubeOutlineGroup_1","ollGroup_1","stroke-opacity","getOllLayerGroup","arrowGroup","stroke-linecap","getArrowGroup","arrowDefinitions","arrows","parseArrows","__WEBPACK_AMD_DEFINE_RESULT__","undefined","supported","Doc","parser","draw","prepare","xmlns","xlink","svgjs","createElementNS","createSVGRect","did","eid","capitalize","setAttribute","extend","methods","pop","Set","inherit","invent","config","initializer","constructor","construct","parent","Container","adopt","node","instance","nodeName","parentNode","SVGElement","Nested","Gradient","Element","type","namespace","defs","setData","parse","getAttribute","body","getElementsByTagName","documentElement","nested","poly","polyline","native","addEventListener","regex","numberAndUnit","hex","rgb","reference","transforms","whitespace","isHex","isRgb","isCss","isBlank","isNumber","isPercent","isImage","delimiter","hyphen","pathLetters","isPathLetter","numbersWithDots","dots","utils","array","block","il","result","degrees","filterSVGElements","nodes","el","defaults","attrs","fill-opacity","cx","cy","rx","ry","stop-opacity","stop-color","font-size","font-family","text-anchor","Color","match","test","exec","replace","parseInt","substring","join","toString","toHex","compToHex","toRgb","brightness","morph","destination","at","isColor","fallback","valueOf","lastValue","lastDestination","settle","seen","split","string","trim","parseFloat","clone","array_clone","arr","PointArray","toLine","x1","y1","x2","y2","points","len","box","bbox","isNaN","getBBox","pathHandlers","p0","H","V","C","Q","T","A","mlhvqtcsa","jl","toUpperCase","PathArray","arrayToString","equalCommands","pathArray","sourceArray","destinationArray","paramCnt","pathRegReplace","prev","curr","concat","Point","Number","unit","isFinite","toJSON","plus","number","minus","times","divide","to","relative","_stroke","_event","_events","dom","proportionalSize","writeDataToDom","assignNewId","cloneNode","add","after","remove","removeElement","addTo","put","putIn","id","inside","show","hide","visible","classes","hasClass","addClass","removeClass","toggleClass","matches","doc","parents","selector","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","well","Parent","innerHTML","firstChild","childNodes","each","lines","fn","removeAttribute","keys","is","obj","easing","-","<>",">","<","from","MorphObj","Situation","init","reversed","reversing","duration","delay","start","Date","finish","ease","loop","loops","animations","styles","once","FX","_target","situations","active","situation","paused","lastPos","absPos","_speed","animate","queue","target","timeToAbsPos","timestamp","absPosToTime","startAnimFrame","stopAnimFrame","animationFrame","requestAnimationFrame","step","cancelAnimationFrame","startCurrent","initAnimations","shift","dequeue","stop","source","initialTransformation","matrixify","clearQueue","clearCurrent","jumpToEnd","atEnd","reset","temp","atStart","isAbsPos","durDivSpd","speed","pause","last","play","progress","easeIt","on","wrapper","e","detail","off","_callStart","during","eased","afterAll","duringAll","method","args","ignoreTime","absPosInt","lastLoop","max","Boolean","min","fire","fx","eachAt","self","Matrix","multiply","undo","extract","isEased","real","G","num","Text","plot","leading","ViewBox","update","Stop","Box","left","top","fullBox","merge","xMin","Infinity","xMax","yMin","yMax","pts","BBox","contains","Exception","topParent","Shape","clientLeft","clientTop","clientWidth","clientHeight","tbox","console","warn","rbox","RBox","getBoundingClientRect","addOffset","pageXOffset","pageYOffset","screenCTM","inverse","base","arrayToMatrix","abcdef","px","deltaTransformPoint","py","skewX","atan2","f","transformedX","sqrt","transformedY","skewY","scaleX","scaleY","parseMatrix","around","flip","skew","tan","createSVGMatrix","float32String","ctm","getCTM","getScreenCTM","point","createSVGPoint","matrixTransform","attributes","nodeValue","image","pattern","setAttributeNS","rebuild","ensureCentre","Rotate","Scale","Skew","Translate","untransform","str","kv","toParent","pCtm","toDoc","Transformation","inversed","params","_undo","cssText","camelCase","children","insertBefore","has","first","deep","removeChild","clear","hasChildNodes","lastChild","_defs","ungroup","depth","Defs","flatten","we","he","wm","hm","reg","offsetWidth","offsetHeight","zoom","event","listenerId","events","listener","binding","bag","_svgjsListenerId","ev","removeEventListener","data","Event","dispatchEvent","CustomEvent","cancelable","gbox","trans","getElementById","version","spof","nextSibling","siblings","position","next","previous","backward","front","back","before","Mask","targets","unmask","mask","maskWith","masker","ClipPath","unclip","clip","clipWith","clipper","gradient","fy","Pattern","patternUnits","Bare","words","text","createTextNode","symbol","Use","file","use","Rect","Circle","circle","Ellipse","ellipse","Line","line","Polyline","Polygon","_array","morphArray","Path","load","url","img","_loaded","ratio","_error","loaded","error","_rebuild","_build","oy","nodeType","newLined","textContent","build","tspan","newLine","textPath","blankLineOffset","dy","plain","Tspan","dx","getComputedTextLength","TextPath","track","link","linkTo","Marker","ref","marker","sugar","prefix","toLowerCase","charAt","comp","w","h","abs","extension","dmove","radius","getTotalLength","pointAt","getPointAtLength","font","members","elements","splice","set","remember","k","memory","forget","_memory","idFromReference","select","query","querySelectorAll","CustomEventPoly","bubbles","createEvent","initCustomEvent","lastTime","vendors","callback","currTime","getTime","timeToCall","clearTimeout","color_1","arrowPattern","parseArrow","raw","RegExp","parseColor","part","masking_1","simulation_1","algorithm_1","makeMasking","maskAlg","maskCubeData_1","parseAlgorithm","faceMappedStickers","cubeData","algorithm","_g","_h","_j","_k","_l","_m","_o","_p","_q","_r","_s","_t","_u","_v","_w","_x","_y","maskingFunctions","FL","F2L","LL","CLL","ELL","OLL","OCLL","OELL","COLL","OCELL","WV","VH","ELS","CLS","CMLL","CROSS","F2L3","F2L2","F2LSM","F2L1","F2B","LINE","masking","faceValues","getMove","getTurnType"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,GAAAH,GACA,iBAAAC,QACAA,QAAA,iBAAAD,IAEAD,EAAA,iBAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAT,QAAA,IAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CV,EAAAgB,EAAA,SAAAtB,GACA,oBAAAuB,eAAAC,aACAN,OAAAC,eAAAnB,EAAAuB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAnB,EAAA,cAAiDyB,OAAA,KAQjDnB,EAAAoB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAnB,EAAAmB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAxB,EAAAgB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,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,QAAAlF,EAAA0oB,OAAA,MACA,UAAA1tB,MAAA,iBAAAgF,EAAA,KAGA,OAAAA,EAAA0oB,OAAA,GAEA,SAAAgG,EAAA1uB,GACA,OAAAA,EAAA0oB,OAAA,IAEA,KAAA/xB,EAAA0B,iBAAA0E,UACA,OAAAuuB,EAAA9uB,SAAAO,UACA,KAAApG,EAAA0B,iBAAA2E,iBACA,OAAAsuB,EAAA9uB,SAAAQ,iBACA,KAAArG,EAAA0B,iBAAA4E,OACA,OAAAquB,EAAA9uB,SAAAS,OACA,QACA,UAAAjC,MAAA,0BAAAgF,EAAA0oB,OAAA,iBAAA1oB,EAAA,MAlBAhM,EAAA23B,eAdA,SAAAG,GACA,OAAAA,EAGAA,EAAAtc,MAAA,KAAAlW,IAAA,SAAA0G,GACA,GAAAA,EAAApB,OAAA,EACA,UAAA5D,MAAA,iBAAAgF,EAAA,mBAAA8rB,EAAA,KAEA,OACA9rB,KAAAyuB,EAAAzuB,GACAZ,SAAAsvB,EAAA1uB,MARA","file":"main.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sr-visualizer\"] = factory();\n\telse\n\t\troot[\"sr-visualizer\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a, _b;\nvar constants_1 = require(\"./../constants\");\nvar Face;\n(function (Face) {\n Face[Face[\"U\"] = 0] = \"U\";\n Face[Face[\"R\"] = 1] = \"R\";\n Face[Face[\"F\"] = 2] = \"F\";\n Face[Face[\"D\"] = 3] = \"D\";\n Face[Face[\"L\"] = 4] = \"L\";\n Face[Face[\"B\"] = 5] = \"B\";\n})(Face = exports.Face || (exports.Face = {}));\nexports.AllFaces = [Face.U, Face.R, Face.F, Face.D, Face.L, Face.B];\nvar FaceRotationVectors = /** @class */ (function () {\n function FaceRotationVectors() {\n }\n FaceRotationVectors.U = [0, -1, 0];\n FaceRotationVectors.R = [1, 0, 0];\n FaceRotationVectors.F = [0, 0, -1];\n FaceRotationVectors.D = [0, 1, 0];\n FaceRotationVectors.L = [-1, 0, 0];\n FaceRotationVectors.B = [0, 0, 1];\n return FaceRotationVectors;\n}());\nexports.FaceRotationVectors = FaceRotationVectors;\nexports.DefaultColorScheme = (_a = {},\n _a[Face.U] = constants_1.ColorCode.Yellow,\n _a[Face.R] = constants_1.ColorCode.Red,\n _a[Face.F] = constants_1.ColorCode.Blue,\n _a[Face.D] = constants_1.ColorCode.White,\n _a[Face.L] = constants_1.ColorCode.Orange,\n _a[Face.B] = constants_1.ColorCode.Green,\n _a);\nexports.JapaneseColorScheme = (_b = {},\n _b[Face.U] = constants_1.ColorCode.Blue,\n _b[Face.R] = constants_1.ColorCode.Orange,\n _b[Face.F] = constants_1.ColorCode.Green,\n _b[Face.D] = constants_1.ColorCode.White,\n _b[Face.L] = constants_1.ColorCode.Red,\n _b[Face.B] = constants_1.ColorCode.Yellow,\n _b);\nvar AlgorithmUnit;\n(function (AlgorithmUnit) {\n AlgorithmUnit[\"F\"] = \"F\";\n AlgorithmUnit[\"U\"] = \"U\";\n AlgorithmUnit[\"R\"] = \"R\";\n AlgorithmUnit[\"L\"] = \"L\";\n AlgorithmUnit[\"D\"] = \"D\";\n AlgorithmUnit[\"B\"] = \"B\";\n AlgorithmUnit[\"M\"] = \"M\";\n AlgorithmUnit[\"E\"] = \"E\";\n AlgorithmUnit[\"S\"] = \"S\";\n AlgorithmUnit[\"X\"] = \"x\";\n AlgorithmUnit[\"Y\"] = \"y\";\n AlgorithmUnit[\"Z\"] = \"z\";\n})(AlgorithmUnit = exports.AlgorithmUnit || (exports.AlgorithmUnit = {}));\nexports.possibleMoves = [\n AlgorithmUnit.F,\n AlgorithmUnit.U,\n AlgorithmUnit.R,\n AlgorithmUnit.L,\n AlgorithmUnit.D,\n AlgorithmUnit.B,\n AlgorithmUnit.M,\n AlgorithmUnit.E,\n AlgorithmUnit.S,\n AlgorithmUnit.X,\n AlgorithmUnit.Y,\n AlgorithmUnit.Z,\n];\nvar TurnAbbreviation;\n(function (TurnAbbreviation) {\n TurnAbbreviation[\"Clockwise\"] = \"\";\n TurnAbbreviation[\"CounterClockwise\"] = \"'\";\n TurnAbbreviation[\"Double\"] = \"2\";\n})(TurnAbbreviation = exports.TurnAbbreviation || (exports.TurnAbbreviation = {}));\nvar Masking;\n(function (Masking) {\n Masking[\"FL\"] = \"fl\";\n Masking[\"F2L\"] = \"f2l\";\n Masking[\"LL\"] = \"ll\";\n Masking[\"CLL\"] = \"cll\";\n Masking[\"ELL\"] = \"ell\";\n Masking[\"OLL\"] = \"oll\";\n Masking[\"OCLL\"] = \"ocll\";\n Masking[\"OELL\"] = \"oell\";\n Masking[\"COLL\"] = \"coll\";\n Masking[\"OCELL\"] = \"ocell\";\n Masking[\"WV\"] = \"wv\";\n Masking[\"VH\"] = \"vh\";\n Masking[\"ELS\"] = \"els\";\n Masking[\"CLS\"] = \"cls\";\n Masking[\"CMLL\"] = \"cmll\";\n Masking[\"CROSS\"] = \"cross\";\n Masking[\"F2L3\"] = \"f2l_3\";\n Masking[\"F2L2\"] = \"f2l_2\";\n Masking[\"F2LSM\"] = \"f2l_sm\";\n Masking[\"F2L1\"] = \"f2l_1\";\n Masking[\"F2B\"] = \"f2b\";\n Masking[\"LINE\"] = \"line\";\n})(Masking = exports.Masking || (exports.Masking = {}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a, _b;\nvar ColorCode;\n(function (ColorCode) {\n ColorCode[\"Black\"] = \"#000000\";\n ColorCode[\"DarkGray\"] = \"#404040\";\n ColorCode[\"Gray\"] = \"#808080\";\n ColorCode[\"Silver\"] = \"#BFBFBF\";\n ColorCode[\"White\"] = \"#FFFFFF\";\n ColorCode[\"Yellow\"] = \"#FEFE00\";\n ColorCode[\"Red\"] = \"#EE0000\";\n ColorCode[\"Orange\"] = \"#FFA100\";\n ColorCode[\"Blue\"] = \"#0000F2\";\n ColorCode[\"Green\"] = \"#00D800\";\n ColorCode[\"Purple\"] = \"#A83DD9\";\n ColorCode[\"Pink\"] = \"#F33D7B\";\n})(ColorCode = exports.ColorCode || (exports.ColorCode = {}));\nvar ColorName;\n(function (ColorName) {\n ColorName[\"Black\"] = \"black\";\n ColorName[\"DarkGray\"] = \"darkGray\";\n ColorName[\"Gray\"] = \"gray\";\n ColorName[\"Silver\"] = \"silver\";\n ColorName[\"White\"] = \"white\";\n ColorName[\"Yellow\"] = \"yellow\";\n ColorName[\"Red\"] = \"red\";\n ColorName[\"Orange\"] = \"orange\";\n ColorName[\"Blue\"] = \"blue\";\n ColorName[\"Green\"] = \"green\";\n ColorName[\"Purple\"] = \"purple\";\n ColorName[\"Pink\"] = \"pink\";\n})(ColorName = exports.ColorName || (exports.ColorName = {}));\nvar ColorAbbreviation;\n(function (ColorAbbreviation) {\n ColorAbbreviation[\"Black\"] = \"n\";\n ColorAbbreviation[\"DarkGray\"] = \"d\";\n ColorAbbreviation[\"Gray\"] = \"l\";\n ColorAbbreviation[\"Silver\"] = \"s\";\n ColorAbbreviation[\"White\"] = \"w\";\n ColorAbbreviation[\"Yellow\"] = \"y\";\n ColorAbbreviation[\"Red\"] = \"r\";\n ColorAbbreviation[\"Orange\"] = \"o\";\n ColorAbbreviation[\"Blue\"] = \"b\";\n ColorAbbreviation[\"Green\"] = \"g\";\n ColorAbbreviation[\"Purple\"] = \"m\";\n ColorAbbreviation[\"Pink\"] = \"p\";\n ColorAbbreviation[\"Transparent\"] = \"t\";\n})(ColorAbbreviation = exports.ColorAbbreviation || (exports.ColorAbbreviation = {}));\nexports.ColorNameToCode = (_a = {},\n _a[ColorName.Black] = ColorCode.Black,\n _a[ColorName.DarkGray] = ColorCode.DarkGray,\n _a[ColorName.Gray] = ColorCode.Gray,\n _a[ColorName.Silver] = ColorCode.Silver,\n _a[ColorName.White] = ColorCode.White,\n _a[ColorName.Yellow] = ColorCode.Yellow,\n _a[ColorName.Red] = ColorCode.Red,\n _a[ColorName.Orange] = ColorCode.Orange,\n _a[ColorName.Blue] = ColorCode.Blue,\n _a[ColorName.Green] = ColorCode.Green,\n _a[ColorName.Purple] = ColorCode.Purple,\n _a[ColorName.Pink] = ColorCode.Pink,\n _a);\nexports.ColorAbbreviationToCode = (_b = {},\n _b[ColorAbbreviation.Black] = ColorCode.Black,\n _b[ColorAbbreviation.DarkGray] = ColorCode.DarkGray,\n _b[ColorAbbreviation.Gray] = ColorCode.Gray,\n _b[ColorAbbreviation.Silver] = ColorCode.Silver,\n _b[ColorAbbreviation.White] = ColorCode.White,\n _b[ColorAbbreviation.Yellow] = ColorCode.Yellow,\n _b[ColorAbbreviation.Red] = ColorCode.Red,\n _b[ColorAbbreviation.Orange] = ColorCode.Orange,\n _b[ColorAbbreviation.Blue] = ColorCode.Blue,\n _b[ColorAbbreviation.Green] = ColorCode.Green,\n _b[ColorAbbreviation.Purple] = ColorCode.Purple,\n _b[ColorAbbreviation.Pink] = ColorCode.Pink,\n _b[ColorAbbreviation.Transparent] = null,\n _b);\n","\"use strict\";\n/**\n * Methods for manipulating points in 3d space (Vec3)\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Axis;\n(function (Axis) {\n Axis[Axis[\"X\"] = 0] = \"X\";\n Axis[Axis[\"Y\"] = 1] = \"Y\";\n Axis[Axis[\"Z\"] = 2] = \"Z\";\n})(Axis = exports.Axis || (exports.Axis = {}));\nfunction makeMatrix(rows, cols) {\n var matrix = [];\n for (var r = 0; r < rows; r++) {\n matrix[r] = [];\n for (var c = 0; c < cols; c++) {\n matrix[r][c] = null;\n }\n }\n return matrix;\n}\nexports.makeMatrix = makeMatrix;\nfunction translate(pos, v) {\n return pos.map(function (value, index) { return value + v[index]; });\n}\nexports.translate = translate;\nfunction scale(pos, scalar) {\n return pos.map(function (v) { return v * scalar; });\n}\nexports.scale = scale;\n// Scale a point relative to position vector\nfunction transScale(pos, v, scalar) {\n // Translate each facelet to cf\n var iv = v.map(function (x) { return -x; });\n return translate(scale(translate(pos, iv), scalar), v);\n}\nexports.transScale = transScale;\nfunction rotate(pos, axis, radians) {\n var newPosition = pos.slice();\n switch (axis) {\n case Axis.X:\n newPosition[2] = pos[2] * Math.cos(radians) - pos[1] * Math.sin(radians);\n newPosition[1] = pos[2] * Math.sin(radians) + pos[1] * Math.cos(radians);\n break;\n case Axis.Y:\n newPosition[0] = pos[0] * Math.cos(radians) + pos[2] * Math.sin(radians);\n newPosition[2] = -pos[0] * Math.sin(radians) + pos[2] * Math.cos(radians);\n break;\n case Axis.Z:\n newPosition[0] = pos[0] * Math.cos(radians) - pos[1] * Math.sin(radians);\n newPosition[1] = pos[0] * Math.sin(radians) + pos[1] * Math.cos(radians);\n break;\n }\n return newPosition;\n}\nexports.rotate = rotate;\nfunction project(pos, d) {\n return [\n (pos[0] * d) / pos[2],\n (pos[1] * d) / pos[2],\n pos[2],\n ];\n}\nexports.project = project;\nfunction radians2Degrees(radians) {\n return (radians * 180) / Math.PI;\n}\nexports.radians2Degrees = radians2Degrees;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Utlity Methods for creating 2D coodinates for svg polygons\n */\nvar constants_1 = require(\"./constants\");\nvar math_1 = require(\"../math\");\n/**\n * Applies set of rotations to all face rotation vectors.\n */\nfunction rotateFaces(faceRotations, rotations) {\n return constants_1.AllFaces.reduce(function (acc, face) {\n rotations.forEach(function (rotation) {\n if (!acc[face]) {\n acc[face] = faceRotations[face].slice();\n }\n acc[face] = math_1.rotate(acc[face], rotation[0], (Math.PI * rotation[1]) / 180);\n });\n return acc;\n }, {});\n}\nexports.rotateFaces = rotateFaces;\nfunction makeStickerPosition(face, cubeSize, x, y) {\n switch (face) {\n case constants_1.Face.U:\n return [x, 0, cubeSize - y];\n case constants_1.Face.R:\n return [cubeSize, y, x];\n case constants_1.Face.F:\n return [x, y, 0];\n case constants_1.Face.D:\n return [x, cubeSize, y];\n case constants_1.Face.L:\n return [0, y, cubeSize - x];\n case constants_1.Face.B:\n return [cubeSize - x, y, cubeSize];\n default:\n throw new Error(\"Unknown cube face: '\" + face + \"'\");\n }\n}\nexports.makeStickerPosition = makeStickerPosition;\n/**\n * Creates 2D coordinates for stickers of a given face of the cube.\n */\nfunction makeFaceStickers(face, options) {\n var stickers = math_1.makeMatrix(options.cubeSize + 1, options.cubeSize + 1);\n for (var row = 0; row <= options.cubeSize; row++) {\n var _loop_1 = function (col) {\n var sticker = makeStickerPosition(face, options.cubeSize, row, col);\n // Now scale and tranform point to ensure size/pos independent of dim\n var centerTranslation = [-options.cubeSize / 2, -options.cubeSize / 2, -options.cubeSize / 2];\n sticker = math_1.translate(sticker, centerTranslation);\n sticker = math_1.scale(sticker, 1 / options.cubeSize);\n // Rotate cube as per perameter settings\n options.viewportRotations.forEach(function (rotation) {\n sticker = math_1.rotate(sticker, rotation[0], (Math.PI * rotation[1]) / 180);\n });\n // Move cube away from viewer\n sticker = math_1.translate(sticker, [0, 0, options.dist]);\n // Finally project the 3D points onto 2D\n sticker = math_1.project(sticker, options.dist);\n stickers[row][col] = sticker;\n };\n for (var col = 0; col <= options.cubeSize; col++) {\n _loop_1(col);\n }\n }\n return stickers;\n}\nexports.makeFaceStickers = makeFaceStickers;\n/**\n * Creates geometry for rubiks cube stickers. Contains 2D coordinates\n * for drawing svg polygons\n */\nfunction makeCubeGeometry(options) {\n if (options.view === 'plan') {\n options.viewportRotations = [[math_1.Axis.X, -90]];\n }\n return constants_1.AllFaces.reduce(function (acc, face) {\n acc[face] = makeFaceStickers(face, options);\n return acc;\n }, {});\n}\nexports.makeCubeGeometry = makeCubeGeometry;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a, _b, _c, _d, _e, _f;\nvar math_1 = require(\"./../math\");\nvar constants_1 = require(\"./constants\");\nvar TurnType;\n(function (TurnType) {\n TurnType[TurnType[\"Clockwise\"] = 0] = \"Clockwise\";\n TurnType[TurnType[\"CounterClockwise\"] = 1] = \"CounterClockwise\";\n TurnType[TurnType[\"Double\"] = 2] = \"Double\";\n})(TurnType = exports.TurnType || (exports.TurnType = {}));\nvar faceIdentity = function (stickerNumber, cubeSize) { return stickerNumber; };\nvar counterClockwiseSticker = function (stickerNumber, cubeSize) {\n return (stickerNumber * cubeSize) % (cubeSize * cubeSize + 1);\n};\nvar clockwiseSticker = function (stickerNumber, cubeSize) {\n var numStickers = cubeSize * cubeSize;\n return numStickers + 1 - counterClockwiseSticker(stickerNumber, cubeSize);\n};\nvar doubleTurn = function (stickerNumber, cubeSize) {\n return cubeSize * cubeSize - stickerNumber + 1;\n};\nvar OppositeTurn = (_a = {},\n _a[TurnType.Clockwise] = TurnType.CounterClockwise,\n _a[TurnType.CounterClockwise] = TurnType.Clockwise,\n _a[TurnType.Double] = TurnType.Double,\n _a);\n// Faces that wrap around a given axis\nvar AxisMapping = (_b = {},\n _b[math_1.Axis.X] = [constants_1.Face.U, constants_1.Face.B, constants_1.Face.F, constants_1.Face.D],\n _b[math_1.Axis.Y] = [constants_1.Face.L, constants_1.Face.B, constants_1.Face.R, constants_1.Face.F],\n _b[math_1.Axis.Z] = [constants_1.Face.L, constants_1.Face.U, constants_1.Face.R, constants_1.Face.D],\n _b);\n// Face's orientation related to other faces on a given axis\nvar AxisOrientation = (_c = {},\n _c[math_1.Axis.X] = (_d = {},\n _d[constants_1.Face.U] = faceIdentity,\n _d[constants_1.Face.B] = doubleTurn,\n _d[constants_1.Face.F] = faceIdentity,\n _d[constants_1.Face.D] = faceIdentity,\n _d[constants_1.Face.L] = null,\n _d[constants_1.Face.R] = null,\n _d),\n _c[math_1.Axis.Y] = (_e = {},\n _e[constants_1.Face.U] = null,\n _e[constants_1.Face.B] = counterClockwiseSticker,\n _e[constants_1.Face.F] = counterClockwiseSticker,\n _e[constants_1.Face.D] = null,\n _e[constants_1.Face.L] = counterClockwiseSticker,\n _e[constants_1.Face.R] = counterClockwiseSticker,\n _e),\n _c[math_1.Axis.Z] = (_f = {},\n _f[constants_1.Face.U] = counterClockwiseSticker,\n _f[constants_1.Face.B] = null,\n _f[constants_1.Face.F] = null,\n _f[constants_1.Face.D] = clockwiseSticker,\n _f[constants_1.Face.L] = faceIdentity,\n _f[constants_1.Face.R] = doubleTurn,\n _f),\n _c);\nvar CubeData = /** @class */ (function () {\n function CubeData(cubeSize, initialValues) {\n this.cubeSize = cubeSize;\n /**\n * Data to store face value\n * data saved in flat array [1, 2, 3, 4, 5, 6, 7, 8, 9]\n * maps to cube stickers like this\n *\n * U Face\n * 1 | 2 | 3\n * ----------\n * 4 | 5 | 6\n * ----------\n * 7 | 8 | 9\n *\n * Stickers are numbered in that manner starting with the U face\n * continuing with this order U, R, F, D, L, B\n *\n * Because each face has a differen't orientation it may not be clear\n * how the back faces are numbered. Below is an example 3x3 mapping\n *\n * Example numbers of 3x3 cube. nxn cubes follow the same pattern\n *\n * B\n * L U R\n * F\n * D\n * | 54 | 53 | 52 |\n * -----------------\n * | 51 | 50 | 49 |\n * -----------------\n * | 48 | 47 | 46 |\n * ----------------- -----------------\n * 43 | 40 | 37 1 | 2 | 3 12 | 15 | 18\n * ----------------- ----------------- -----------------\n * 44 | 41 | 38 4 | 5 | 6 11 | 14 | 17\n * ----------------- ----------------- -----------------\n * 45 | 42 | 39 7 | 8 | 9 10 | 13 | 16\n * ----------------- -----------------\n * | 19 | 20 | 21 |\n * -----------------\n * | 22 | 23 | 24 |\n * -----------------\n * | 25 | 26 | 27 |\n *\n * | 28 | 29 | 30 |\n * -----------------\n * | 31 | 32 | 33 |\n * -----------------\n * | 34 | 35 | 36 |\n */\n this.faces = {};\n this.numStickers = this.cubeSize * this.cubeSize;\n this.clockwiseMapping = [];\n this.counterClockwiseMapping = [];\n this.doubleMapping = [];\n this.faces = initialValues;\n if (!this.faces) {\n this.initValues();\n }\n for (var i = 1; i <= this.numStickers; i++) {\n this.clockwiseMapping.push(clockwiseSticker(i, cubeSize));\n this.counterClockwiseMapping.push(counterClockwiseSticker(i, cubeSize));\n this.doubleMapping.push(doubleTurn(i, cubeSize));\n }\n }\n CubeData.prototype.initValues = function () {\n var _this = this;\n var currentValue = 1;\n constants_1.AllFaces.forEach(function (face) {\n _this.faces[face] = [];\n for (var i = 0; i < _this.numStickers; i++) {\n _this.faces[face].push(currentValue++);\n }\n });\n };\n /**\n * Rotates values on an outer face of the rubiks cubes\n */\n CubeData.prototype.rotateFace = function (face, turn) {\n var _this = this;\n // TODO more efficient rotation to not construct so many new arrays\n switch (turn) {\n case TurnType.Clockwise:\n this.faces[face] = this.clockwiseMapping.map(function (newStickerNumber) { return _this.faces[face][newStickerNumber - 1]; });\n break;\n case TurnType.CounterClockwise:\n this.faces[face] = this.counterClockwiseMapping.map(function (newStickerNumber) { return _this.faces[face][newStickerNumber - 1]; });\n break;\n case TurnType.Double:\n this.faces[face].reverse();\n break;\n }\n };\n /**\n * Rotates layer values around a given axis\n */\n CubeData.prototype.axisRotation = function (offset, range, axis, faceOrder, forward, double) {\n var _this = this;\n if (forward === void 0) { forward = true; }\n if (double === void 0) { double = false; }\n if (!forward) {\n faceOrder.reverse();\n }\n // Copy original values to avoid clobbering values when modifying stickers\n var originalValues = faceOrder.map(function (face) { return _this.faces[face].slice(); });\n // Copy values\n for (var i = 0; i < this.cubeSize; i++) {\n for (var r = 0; r < range; r++) {\n var stickerIndex = this.cubeSize * i + (offset + r);\n for (var j = 0; j < faceOrder.length; j++) {\n var face = faceOrder[j];\n var nextFace = double ? faceOrder[(j + 2) % faceOrder.length] : faceOrder[(j + 1) % faceOrder.length];\n var valueIndex = AxisOrientation[axis][face](stickerIndex + 1, this.cubeSize) - 1;\n var nextFaceValueIndex = AxisOrientation[axis][nextFace](stickerIndex + 1, this.cubeSize) - 1;\n this.faces[face][valueIndex] =\n originalValues[(double ? j + 2 : j + 1) % originalValues.length][nextFaceValueIndex];\n }\n }\n }\n };\n /**\n * Rotate layers around the x axis of the cube\n */\n CubeData.prototype.xLayersRotation = function (offset, forward, double, range) {\n if (forward === void 0) { forward = true; }\n if (double === void 0) { double = false; }\n if (range === void 0) { range = 1; }\n var faceOrder = [constants_1.Face.U, constants_1.Face.F, constants_1.Face.D, constants_1.Face.B];\n this.axisRotation(offset, range, math_1.Axis.X, faceOrder, forward, double);\n };\n /**\n * Rotate layers around the y axis of the cube\n */\n CubeData.prototype.yLayersRotation = function (offset, forward, double, range) {\n if (forward === void 0) { forward = true; }\n if (double === void 0) { double = false; }\n if (range === void 0) { range = 1; }\n var faceOrder = [constants_1.Face.L, constants_1.Face.F, constants_1.Face.R, constants_1.Face.B];\n this.axisRotation(offset, range, math_1.Axis.Y, faceOrder, forward, double);\n };\n /**\n * Rotate layers around the z axis of the cube\n */\n CubeData.prototype.zLayersRotation = function (offset, forward, double, range) {\n if (forward === void 0) { forward = true; }\n if (double === void 0) { double = false; }\n if (range === void 0) { range = 1; }\n var faceOrder = [constants_1.Face.U, constants_1.Face.L, constants_1.Face.D, constants_1.Face.R];\n this.axisRotation(offset, range, math_1.Axis.Z, faceOrder, forward, double);\n };\n CubeData.prototype.rTurn = function (turnType) {\n this.rotateFace(constants_1.Face.R, turnType);\n this.xLayersRotation(this.cubeSize - 1, turnType === TurnType.Clockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.lTurn = function (turnType) {\n this.rotateFace(constants_1.Face.L, turnType);\n this.xLayersRotation(0, turnType === TurnType.CounterClockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.uTurn = function (turnType) {\n this.rotateFace(constants_1.Face.U, turnType);\n this.yLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.dTurn = function (turnType) {\n this.rotateFace(constants_1.Face.D, turnType);\n this.yLayersRotation(this.cubeSize - 1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.fTurn = function (turnType) {\n this.rotateFace(constants_1.Face.F, turnType);\n this.zLayersRotation(this.cubeSize - 1, turnType === TurnType.Clockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.bTurn = function (turnType) {\n this.rotateFace(constants_1.Face.B, turnType);\n this.zLayersRotation(0, turnType === TurnType.CounterClockwise, turnType === TurnType.Double);\n };\n CubeData.prototype.mTurn = function (turnType) {\n if (this.cubeSize < 2)\n return;\n this.xLayersRotation(1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double, this.cubeSize - 2);\n };\n CubeData.prototype.eTurn = function (turnType) {\n if (this.cubeSize < 2)\n return;\n this.yLayersRotation(1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double, this.cubeSize - 2);\n };\n CubeData.prototype.sTurn = function (turnType) {\n if (this.cubeSize < 2)\n return;\n this.zLayersRotation(1, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize - 2);\n };\n CubeData.prototype.xTurn = function (turnType) {\n this.rotateFace(constants_1.Face.R, turnType);\n this.rotateFace(constants_1.Face.L, OppositeTurn[turnType]);\n this.xLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize);\n };\n CubeData.prototype.yTurn = function (turnType) {\n this.rotateFace(constants_1.Face.U, turnType);\n this.rotateFace(constants_1.Face.D, OppositeTurn[turnType]);\n this.yLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize);\n };\n CubeData.prototype.zTurn = function (turnType) {\n this.rotateFace(constants_1.Face.F, turnType);\n this.rotateFace(constants_1.Face.B, OppositeTurn[turnType]);\n this.zLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize);\n };\n CubeData.prototype.turn = function (turn) {\n switch (turn.move) {\n case constants_1.AlgorithmUnit.F:\n this.fTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.B:\n this.bTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.U:\n this.uTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.D:\n this.dTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.R:\n this.rTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.L:\n this.lTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.M:\n this.mTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.E:\n this.eTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.S:\n this.sTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.X:\n this.xTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.Y:\n this.yTurn(turn.turnType);\n break;\n case constants_1.AlgorithmUnit.Z:\n this.zTurn(turn.turnType);\n break;\n default:\n throw new Error(\"Unrecognized move in turn \" + JSON.stringify(turn));\n }\n };\n return CubeData;\n}());\nexports.CubeData = CubeData;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __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 };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geometry_1 = require(\"./cube/geometry\");\nvar math_1 = require(\"./math\");\nvar drawing_1 = require(\"./cube/drawing\");\nvar constants_1 = require(\"./cube/constants\");\nvar stickers_1 = require(\"./cube/stickers\");\nvar constants_2 = require(\"./constants\");\nvar defaultOptions = {\n cubeSize: 3,\n width: 128,\n height: 128,\n viewportRotations: [[math_1.Axis.Y, 45], [math_1.Axis.X, -34]],\n colorScheme: constants_1.DefaultColorScheme,\n cubeColor: constants_2.ColorName.Black,\n cubeOpacity: 100,\n stickerOpacity: 100,\n dist: 5,\n outlineWidth: 0.94,\n strokeWidth: 0,\n viewbox: {\n x: -0.9,\n y: -0.9,\n width: 1.8,\n height: 1.8,\n },\n};\nfunction cubeSVG(container, extraOptions) {\n if (extraOptions === void 0) { extraOptions = {}; }\n var options = __assign({}, defaultOptions, extraOptions);\n var geomety = geometry_1.makeCubeGeometry(options);\n options.stickerColors = stickers_1.makeStickerColors(options);\n drawing_1.renderCube(container, geomety, options);\n}\nexports.cubeSVG = cubeSVG;\nfunction cubePNG(container, extraOptions) {\n if (extraOptions === void 0) { extraOptions = {}; }\n var element = document.createElement('div');\n cubeSVG(element, extraOptions);\n setTimeout(function () {\n var svgElement = element.querySelector('svg');\n var targetImage = document.createElement('img'); // Where to draw the result\n container.appendChild(targetImage);\n var can = document.createElement('canvas'); // Not shown on page\n var ctx = can.getContext('2d');\n var loader = new Image(); // Not shown on page\n loader.width = can.width = targetImage.width = extraOptions.width || 128;\n loader.height = can.height = targetImage.height = extraOptions.height || 128;\n loader.onload = function () {\n ctx.drawImage(loader, 0, 0, loader.width, loader.height);\n targetImage.src = can.toDataURL();\n };\n var svgAsXML = new XMLSerializer().serializeToString(svgElement);\n loader.src = 'data:image/svg+xml,' + encodeURIComponent(svgAsXML);\n });\n}\nexports.cubePNG = cubePNG;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a;\nvar constants_1 = require(\"./../constants\");\nvar SVG = require(\"svg.js\");\nvar geometry_1 = require(\"./geometry\");\nvar math_1 = require(\"../math\");\nvar constants_2 = require(\"./constants\");\nvar arrow_1 = require(\"./parsing/arrow\");\n/**\n * Utility methods for rendering cube geometry using svg.js\n */\n// Rotation vectors to track visibility of each face\nvar defaultFaceRotations = (_a = {},\n _a[constants_2.Face.U] = [0, -1, 0],\n _a[constants_2.Face.R] = [1, 0, 0],\n _a[constants_2.Face.F] = [0, 0, -1],\n _a[constants_2.Face.D] = [0, 1, 1],\n _a[constants_2.Face.L] = [-1, 0, 0],\n _a[constants_2.Face.B] = [0, 0, 1],\n _a);\nfunction renderCube(container, geometry, options) {\n var faceRotations = geometry_1.rotateFaces(defaultFaceRotations, options.viewportRotations);\n var renderOrder = getRenderOrder(faceRotations);\n var svg = SVG(container).size(options.width, options.height);\n svg.viewbox(options.viewbox.x, options.viewbox.y, options.viewbox.width, options.viewbox.height);\n var hiddenFaces = renderOrder.filter(function (face) { return !faceVisible(face, faceRotations); });\n var visibleFaces = renderOrder.filter(function (face) { return faceVisible(face, faceRotations); });\n renderBackground(svg, options);\n // Render hidden faces if cube color has transparency\n if (options.cubeOpacity < 100) {\n var cubeOutlineGroup_1 = getCubeOutlineGroup(svg, options);\n hiddenFaces.forEach(function (face) {\n renderFaceStickers(svg, face, geometry[face], options);\n renderCubeOutline(cubeOutlineGroup_1, geometry[face], options);\n });\n }\n var cubeOutlineGroup = getCubeOutlineGroup(svg, options);\n visibleFaces.forEach(function (face) {\n renderCubeOutline(cubeOutlineGroup, geometry[face], options);\n renderFaceStickers(svg, face, geometry[face], options);\n });\n if (options.view === 'plan') {\n var ollGroup_1 = getOllLayerGroup(svg, options);\n [constants_2.Face.R, constants_2.Face.F, constants_2.Face.L, constants_2.Face.B].forEach(function (face) {\n renderOLLStickers(ollGroup_1, face, geometry[face], faceRotations, options);\n });\n }\n var arrowGroup = getArrowGroup(svg, geometry[0].length - 1);\n var arrowDefinitions = [];\n if (Array.isArray(options.arrows)) {\n arrowDefinitions = options.arrows;\n }\n else if (typeof options.arrows === 'string') {\n arrowDefinitions = arrow_1.parseArrows(options.arrows);\n }\n arrowDefinitions.forEach(function (arrow) {\n renderArrow(arrowGroup, geometry, arrow);\n });\n}\nexports.renderCube = renderCube;\n/**\n * Determines face render order based on z position. Faces further away\n * will render first so anything closer will be drawn on top.\n */\nfunction getRenderOrder(faceRotations) {\n var renderOrder = constants_2.AllFaces.slice().sort(function (a, b) {\n return faceRotations[b][2] - faceRotations[a][2];\n });\n return renderOrder;\n}\nfunction renderBackground(svg, options) {\n var backgroundSvg = svg.rect(options.viewbox.width, options.viewbox.height);\n backgroundSvg.x(options.viewbox.x);\n backgroundSvg.y(options.viewbox.y);\n if (!options.backgroundColor) {\n backgroundSvg.fill('none');\n backgroundSvg.opacity(0);\n }\n else {\n backgroundSvg.fill({\n color: options.backgroundColor,\n });\n }\n}\nfunction faceVisible(face, rotations) {\n return rotations[face][2] < -0.105;\n}\nfunction getCubeOutlineGroup(svg, options) {\n var cubeOutlineGroup = svg.group();\n cubeOutlineGroup.opacity(options.cubeOpacity / 100);\n cubeOutlineGroup.attr({\n 'stroke-width': '0.1',\n 'stroke-linejoin': 'round',\n });\n return cubeOutlineGroup;\n}\nfunction getOllLayerGroup(svg, options) {\n var group = svg.group();\n group.opacity(options.stickerOpacity / 100);\n group.attr({\n 'stroke-opacity': '1',\n 'stroke-width': 0.02,\n 'stroke-linejoin': 'round',\n });\n return group;\n}\nfunction getArrowGroup(svg, cubeSize) {\n var arrowGroup = svg.group();\n arrowGroup.attr({\n opacity: 1,\n 'stroke-opacity': 1,\n 'stroke-width': 0.12 / cubeSize,\n 'stroke-linecap': 'round',\n });\n return arrowGroup;\n}\nfunction renderCubeOutline(svg, face, options) {\n var cubeSize = face.length - 1;\n var width = options.outlineWidth;\n var outlinePoints = [\n [face[0][0][0] * width, face[0][0][1] * width],\n [face[cubeSize][0][0] * width, face[cubeSize][0][1] * width],\n [face[cubeSize][cubeSize][0] * width, face[cubeSize][cubeSize][1] * width],\n [face[0][cubeSize][0] * width, face[0][cubeSize][1] * width],\n ];\n var polygon = svg.polygon(outlinePoints);\n polygon.fill(options.cubeColor);\n polygon.stroke(options.cubeColor);\n return polygon;\n}\nfunction renderFaceStickers(svg, face, stickers, options) {\n var cubeSize = stickers.length - 1;\n var group = svg.group();\n group.opacity(options.stickerOpacity / 100);\n group.attr({\n 'stoke-opacity': '0.5',\n 'stroke-width': options.strokeWidth,\n 'stroke-linejoin': 'round',\n });\n for (var i = 0; i < cubeSize; i++) {\n for (var j = 0; j < cubeSize; j++) {\n var centerPoint = [\n (stickers[j][i][0] + stickers[j + 1][i + 1][0]) / 2,\n (stickers[j][i][1] + stickers[j + 1][i + 1][1]) / 2,\n 0,\n ];\n // Scale points in towards centre\n var p1 = math_1.transScale(stickers[j][i], centerPoint, 0.85);\n var p2 = math_1.transScale(stickers[j + 1][i], centerPoint, 0.85);\n var p3 = math_1.transScale(stickers[j + 1][i + 1], centerPoint, 0.85);\n var p4 = math_1.transScale(stickers[j][i + 1], centerPoint, 0.85);\n var color = getStickerColor(face, i, j, options);\n renderSticker(group, p1, p2, p3, p4, color, options.cubeColor);\n }\n }\n return group;\n}\nfunction renderSticker(g, p1, p2, p3, p4, stickerColor, cubeColor) {\n var stickerPoints = [[p1[0], p1[1]], [p2[0], p2[1]], [p3[0], p3[1]], [p4[0], p4[1]]];\n var polygon = g.polygon(stickerPoints);\n polygon.fill(stickerColor);\n polygon.stroke(cubeColor);\n return polygon;\n}\n/**\n * Starting with U, stickers are numbered from\n * their face starting with the top left corner\n * sticker.\n *\n * U Face\n * 1 | 2 | 3\n * ----------\n * 4 | 5 | 6\n * ----------\n * 7 | 8 | 9\n *\n * And so on for faces R, F, D, L, B.\n * So R's top left corner for a 3x3 cube would be # 10\n *\n * An individual sticker's color is obtained by indexing\n * into the array of sticker colors by the number the sticker is\n */\nfunction getStickerColor(face, row, col, options) {\n if (!Array.isArray(options.stickerColors)) {\n return options.colorScheme[face] || constants_1.ColorName.Black;\n }\n var faceIndex = constants_2.AllFaces.indexOf(face);\n var stickerNumber = row * options.cubeSize + col;\n var colorIndex = faceIndex * (options.cubeSize * options.cubeSize) + stickerNumber;\n if (options.stickerColors.length <= colorIndex) {\n return constants_1.ColorName.Black;\n }\n return options.stickerColors[colorIndex];\n}\n// Renders the top rim of the R U L and B faces out from side of cube\nfunction renderOLLStickers(group, face, stickers, rotations, options) {\n // Translation vector, to move faces out\n var v1 = math_1.scale(rotations[face], 0);\n var v2 = math_1.scale(rotations[face], 0.2);\n for (var i = 0; i < options.cubeSize; i++) {\n // find center point of sticker\n var centerPoint = [\n (stickers[i][0][0] + stickers[i + 1][1][0]) / 2,\n (stickers[i][0][1] + stickers[i + 1][1][1]) / 2,\n 0,\n ];\n var p1 = math_1.translate(math_1.transScale(stickers[i][0], centerPoint, 0.94), v1);\n var p2 = math_1.translate(math_1.transScale(stickers[i + 1][0], centerPoint, 0.94), v1);\n var p3 = math_1.translate(math_1.transScale(stickers[i + 1][1], centerPoint, 0.94), v2);\n var p4 = math_1.translate(math_1.transScale(stickers[i][1], centerPoint, 0.94), v2);\n renderSticker(group, p1, p2, p3, p4, getStickerColor(face, 0, i, options), options.cubeColor);\n }\n}\nexports.renderOLLStickers = renderOLLStickers;\n/**\n * Generates svg for an arrow pointing from sticker s1 to s2\n */\nfunction renderArrow(group, geometry, arrow) {\n var cubeSize = geometry[0].length - 1;\n // Find center point for each facelet\n var p1y = Math.floor(arrow.s1.n / cubeSize);\n var p1x = arrow.s1.n % cubeSize;\n var p1 = [\n (geometry[arrow.s1.face][p1x][p1y][0] + geometry[arrow.s1.face][p1x + 1][p1y + 1][0]) / 2,\n (geometry[arrow.s1.face][p1x][p1y][1] + geometry[arrow.s1.face][p1x + 1][p1y + 1][1]) / 2,\n 0,\n ];\n var p2y = Math.floor(arrow.s2.n / cubeSize);\n var p2x = arrow.s2.n % cubeSize;\n var p2 = [\n (geometry[arrow.s1.face][p2x][p2y][0] + geometry[arrow.s1.face][p2x + 1][p2y + 1][0]) / 2,\n (geometry[arrow.s1.face][p2x][p2y][1] + geometry[arrow.s1.face][p2x + 1][p2y + 1][1]) / 2,\n 0,\n ];\n // Find midpoint between p1 and p2\n var center = [(p1[0] + p2[0]) / 2, (p1[1] + p2[1]) / 2, 0];\n // Shorten arrows towards midpoint according to config\n p1 = math_1.transScale(p1, center, arrow.scale / 10);\n p2 = math_1.transScale(p2, center, arrow.scale / 10);\n var p3;\n if (arrow.s3) {\n var p3y = Math.floor(arrow.s3.n / cubeSize);\n var p3x = arrow.s3.n % cubeSize;\n p3 = [\n (geometry[arrow.s1.face][p3x][p3y][0] + geometry[arrow.s1.face][p3x + 1][p3y + 1][0]) / 2,\n (geometry[arrow.s1.face][p3x][p3y][1] + geometry[arrow.s1.face][p3x + 1][p3y + 1][1]) / 2,\n 0,\n ];\n p3 = math_1.transScale(p3, center, arrow.influence / 5);\n }\n // Calculate arrow rotation\n var p_ = p3 ? p3 : p1;\n var rotation = p_[1] > p2[1] ? 270 : 90;\n if (p2[0] - p_[0] != 0) {\n rotation = math_1.radians2Degrees(Math.atan((p2[1] - p_[1]) / (p2[0] - p_[0])));\n rotation = p_[0] > p2[0] ? rotation + 180 : rotation;\n }\n // Draw line\n var lineSvg = group.path(\"M \" + p1[0] + \",\" + p1[1] + \" \" + (p3 ? 'Q ' + p3[0] + ',' + p3[1] : 'L') + \" \" + p2[0] + \",\" + p2[1]);\n lineSvg.fill('none');\n lineSvg.stroke({\n color: arrow.color,\n opacity: 1,\n });\n // Draw arrow head\n var headSvg = group.path('M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z');\n headSvg.attr({\n transform: \"translate(\" + p2[0] + \",\" + p2[1] + \") scale(\" + 0.033 / cubeSize + \") rotate(\" + rotation + \")\",\n });\n headSvg.style({\n fill: arrow.color,\n });\n headSvg.attr({\n 'stroke-width': 0,\n 'stroke-linejoin': 'round',\n });\n}\nexports.renderArrow = renderArrow;\n","/*!\n* svg.js - A lightweight library for manipulating and animating SVG.\n* @version 2.7.1\n* https://svgdotjs.github.io/\n*\n* @copyright Wout Fierens \n* @license MIT\n*\n* BUILT: Fri Nov 30 2018 10:01:55 GMT+0100 (GMT+01:00)\n*/;\n(function(root, factory) {\r\n /* istanbul ignore next */\r\n if (typeof define === 'function' && define.amd) {\r\n define(function(){\r\n return factory(root, root.document)\r\n })\r\n } else if (typeof exports === 'object') {\r\n module.exports = root.document ? factory(root, root.document) : function(w){ return factory(w, w.document) }\r\n } else {\r\n root.SVG = factory(root, root.document)\r\n }\r\n}(typeof window !== \"undefined\" ? window : this, function(window, document) {\r\n\r\n// Find global reference - uses 'this' by default when available,\r\n// falls back to 'window' otherwise (for bundlers like Webpack)\r\nvar globalRef = (typeof this !== \"undefined\") ? this : window;\r\n\r\n// The main wrapping element\r\nvar SVG = globalRef.SVG = function(element) {\r\n if (SVG.supported) {\r\n element = new SVG.Doc(element)\r\n\r\n if(!SVG.parser.draw)\r\n SVG.prepare()\r\n\r\n return element\r\n }\r\n}\r\n\r\n// Default namespaces\r\nSVG.ns = 'http://www.w3.org/2000/svg'\r\nSVG.xmlns = 'http://www.w3.org/2000/xmlns/'\r\nSVG.xlink = 'http://www.w3.org/1999/xlink'\r\nSVG.svgjs = 'http://svgjs.com/svgjs'\r\n\r\n// Svg support test\r\nSVG.supported = (function() {\r\n return !! document.createElementNS &&\r\n !! document.createElementNS(SVG.ns,'svg').createSVGRect\r\n})()\r\n\r\n// Don't bother to continue if SVG is not supported\r\nif (!SVG.supported) return false\r\n\r\n// Element id sequence\r\nSVG.did = 1000\r\n\r\n// Get next named element id\r\nSVG.eid = function(name) {\r\n return 'Svgjs' + capitalize(name) + (SVG.did++)\r\n}\r\n\r\n// Method for element creation\r\nSVG.create = function(name) {\r\n // create element\r\n var element = document.createElementNS(this.ns, name)\r\n\r\n // apply unique id\r\n element.setAttribute('id', this.eid(name))\r\n\r\n return element\r\n}\r\n\r\n// Method for extending objects\r\nSVG.extend = function() {\r\n var modules, methods, key, i\r\n\r\n // Get list of modules\r\n modules = [].slice.call(arguments)\r\n\r\n // Get object with extensions\r\n methods = modules.pop()\r\n\r\n for (i = modules.length - 1; i >= 0; i--)\r\n if (modules[i])\r\n for (key in methods)\r\n modules[i].prototype[key] = methods[key]\r\n\r\n // Make sure SVG.Set inherits any newly added methods\r\n if (SVG.Set && SVG.Set.inherit)\r\n SVG.Set.inherit()\r\n}\r\n\r\n// Invent new element\r\nSVG.invent = function(config) {\r\n // Create element initializer\r\n var initializer = typeof config.create == 'function' ?\r\n config.create :\r\n function() {\r\n this.constructor.call(this, SVG.create(config.create))\r\n }\r\n\r\n // Inherit prototype\r\n if (config.inherit)\r\n initializer.prototype = new config.inherit\r\n\r\n // Extend with methods\r\n if (config.extend)\r\n SVG.extend(initializer, config.extend)\r\n\r\n // Attach construct method to parent\r\n if (config.construct)\r\n SVG.extend(config.parent || SVG.Container, config.construct)\r\n\r\n return initializer\r\n}\r\n\r\n// Adopt existing svg elements\r\nSVG.adopt = function(node) {\r\n // check for presence of node\r\n if (!node) return null\r\n\r\n // make sure a node isn't already adopted\r\n if (node.instance) return node.instance\r\n\r\n // initialize variables\r\n var element\r\n\r\n // adopt with element-specific settings\r\n if (node.nodeName == 'svg')\r\n element = node.parentNode instanceof window.SVGElement ? new SVG.Nested : new SVG.Doc\r\n else if (node.nodeName == 'linearGradient')\r\n element = new SVG.Gradient('linear')\r\n else if (node.nodeName == 'radialGradient')\r\n element = new SVG.Gradient('radial')\r\n else if (SVG[capitalize(node.nodeName)])\r\n element = new SVG[capitalize(node.nodeName)]\r\n else\r\n element = new SVG.Element(node)\r\n\r\n // ensure references\r\n element.type = node.nodeName\r\n element.node = node\r\n node.instance = element\r\n\r\n // SVG.Class specific preparations\r\n if (element instanceof SVG.Doc)\r\n element.namespace().defs()\r\n\r\n // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\r\n element.setData(JSON.parse(node.getAttribute('svgjs:data')) || {})\r\n\r\n return element\r\n}\r\n\r\n// Initialize parsing element\r\nSVG.prepare = function() {\r\n // Select document body and create invisible svg element\r\n var body = document.getElementsByTagName('body')[0]\r\n , draw = (body ? new SVG.Doc(body) : SVG.adopt(document.documentElement).nested()).size(2, 0)\r\n\r\n // Create parser object\r\n SVG.parser = {\r\n body: body || document.documentElement\r\n , draw: draw.style('opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden').attr('focusable', 'false').node\r\n , poly: draw.polyline().node\r\n , path: draw.path().node\r\n , native: SVG.create('svg')\r\n }\r\n}\r\n\r\nSVG.parser = {\r\n native: SVG.create('svg')\r\n}\r\n\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n if(!SVG.parser.draw)\r\n SVG.prepare()\r\n}, false)\r\n\n// Storage for regular expressions\r\nSVG.regex = {\r\n // Parse unit value\r\n numberAndUnit: /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\r\n\r\n // Parse hex value\r\n, hex: /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\r\n\r\n // Parse rgb value\r\n, rgb: /rgb\\((\\d+),(\\d+),(\\d+)\\)/\r\n\r\n // Parse reference id\r\n, reference: /#([a-z0-9\\-_]+)/i\r\n\r\n // splits a transformation chain\r\n, transforms: /\\)\\s*,?\\s*/\r\n\r\n // Whitespace\r\n, whitespace: /\\s/g\r\n\r\n // Test hex value\r\n, isHex: /^#[a-f0-9]{3,6}$/i\r\n\r\n // Test rgb value\r\n, isRgb: /^rgb\\(/\r\n\r\n // Test css declaration\r\n, isCss: /[^:]+:[^;]+;?/\r\n\r\n // Test for blank string\r\n, isBlank: /^(\\s+)?$/\r\n\r\n // Test for numeric string\r\n, isNumber: /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\r\n\r\n // Test for percent value\r\n, isPercent: /^-?[\\d\\.]+%$/\r\n\r\n // Test for image url\r\n, isImage: /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\r\n\r\n // split at whitespace and comma\r\n, delimiter: /[\\s,]+/\r\n\r\n // The following regex are used to parse the d attribute of a path\r\n\r\n // Matches all hyphens which are not after an exponent\r\n, hyphen: /([^e])\\-/gi\r\n\r\n // Replaces and tests for all path letters\r\n, pathLetters: /[MLHVCSQTAZ]/gi\r\n\r\n // yes we need this one, too\r\n, isPathLetter: /[MLHVCSQTAZ]/i\r\n\r\n // matches 0.154.23.45\r\n, numbersWithDots: /((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi\r\n\r\n // matches .\r\n, dots: /\\./g\r\n}\r\n\nSVG.utils = {\r\n // Map function\r\n map: function(array, block) {\r\n var i\r\n , il = array.length\r\n , result = []\r\n\r\n for (i = 0; i < il; i++)\r\n result.push(block(array[i]))\r\n\r\n return result\r\n }\r\n\r\n // Filter function\r\n, filter: function(array, block) {\r\n var i\r\n , il = array.length\r\n , result = []\r\n\r\n for (i = 0; i < il; i++)\r\n if (block(array[i]))\r\n result.push(array[i])\r\n\r\n return result\r\n }\r\n\r\n // Degrees to radians\r\n, radians: function(d) {\r\n return d % 360 * Math.PI / 180\r\n }\r\n\r\n // Radians to degrees\r\n, degrees: function(r) {\r\n return r * 180 / Math.PI % 360\r\n }\r\n\r\n, filterSVGElements: function(nodes) {\r\n return this.filter( nodes, function(el) { return el instanceof window.SVGElement })\r\n }\r\n\r\n}\n\r\nSVG.defaults = {\r\n // Default attribute values\r\n attrs: {\r\n // fill and stroke\r\n 'fill-opacity': 1\r\n , 'stroke-opacity': 1\r\n , 'stroke-width': 0\r\n , 'stroke-linejoin': 'miter'\r\n , 'stroke-linecap': 'butt'\r\n , fill: '#000000'\r\n , stroke: '#000000'\r\n , opacity: 1\r\n // position\r\n , x: 0\r\n , y: 0\r\n , cx: 0\r\n , cy: 0\r\n // size\r\n , width: 0\r\n , height: 0\r\n // radius\r\n , r: 0\r\n , rx: 0\r\n , ry: 0\r\n // gradient\r\n , offset: 0\r\n , 'stop-opacity': 1\r\n , 'stop-color': '#000000'\r\n // text\r\n , 'font-size': 16\r\n , 'font-family': 'Helvetica, Arial, sans-serif'\r\n , 'text-anchor': 'start'\r\n }\r\n\r\n}\n// Module for color convertions\r\nSVG.Color = function(color) {\r\n var match\r\n\r\n // initialize defaults\r\n this.r = 0\r\n this.g = 0\r\n this.b = 0\r\n\r\n if(!color) return\r\n\r\n // parse color\r\n if (typeof color === 'string') {\r\n if (SVG.regex.isRgb.test(color)) {\r\n // get rgb values\r\n match = SVG.regex.rgb.exec(color.replace(SVG.regex.whitespace,''))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1])\r\n this.g = parseInt(match[2])\r\n this.b = parseInt(match[3])\r\n\r\n } else if (SVG.regex.isHex.test(color)) {\r\n // get hex values\r\n match = SVG.regex.hex.exec(fullHex(color))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1], 16)\r\n this.g = parseInt(match[2], 16)\r\n this.b = parseInt(match[3], 16)\r\n\r\n }\r\n\r\n } else if (typeof color === 'object') {\r\n this.r = color.r\r\n this.g = color.g\r\n this.b = color.b\r\n\r\n }\r\n\r\n}\r\n\r\nSVG.extend(SVG.Color, {\r\n // Default to hex conversion\r\n toString: function() {\r\n return this.toHex()\r\n }\r\n // Build hex value\r\n, toHex: function() {\r\n return '#'\r\n + compToHex(this.r)\r\n + compToHex(this.g)\r\n + compToHex(this.b)\r\n }\r\n // Build rgb value\r\n, toRgb: function() {\r\n return 'rgb(' + [this.r, this.g, this.b].join() + ')'\r\n }\r\n // Calculate true brightness\r\n, brightness: function() {\r\n return (this.r / 255 * 0.30)\r\n + (this.g / 255 * 0.59)\r\n + (this.b / 255 * 0.11)\r\n }\r\n // Make color morphable\r\n, morph: function(color) {\r\n this.destination = new SVG.Color(color)\r\n\r\n return this\r\n }\r\n // Get morphed color at given position\r\n, at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // normalise pos\r\n pos = pos < 0 ? 0 : pos > 1 ? 1 : pos\r\n\r\n // generate morphed color\r\n return new SVG.Color({\r\n r: ~~(this.r + (this.destination.r - this.r) * pos)\r\n , g: ~~(this.g + (this.destination.g - this.g) * pos)\r\n , b: ~~(this.b + (this.destination.b - this.b) * pos)\r\n })\r\n }\r\n\r\n})\r\n\r\n// Testers\r\n\r\n// Test if given value is a color string\r\nSVG.Color.test = function(color) {\r\n color += ''\r\n return SVG.regex.isHex.test(color)\r\n || SVG.regex.isRgb.test(color)\r\n}\r\n\r\n// Test if given value is a rgb object\r\nSVG.Color.isRgb = function(color) {\r\n return color && typeof color.r == 'number'\r\n && typeof color.g == 'number'\r\n && typeof color.b == 'number'\r\n}\r\n\r\n// Test if given value is a color\r\nSVG.Color.isColor = function(color) {\r\n return SVG.Color.isRgb(color) || SVG.Color.test(color)\r\n}\n// Module for array conversion\r\nSVG.Array = function(array, fallback) {\r\n array = (array || []).valueOf()\r\n\r\n // if array is empty and fallback is provided, use fallback\r\n if (array.length == 0 && fallback)\r\n array = fallback.valueOf()\r\n\r\n // parse array\r\n this.value = this.parse(array)\r\n}\r\n\r\nSVG.extend(SVG.Array, {\r\n // Make array morphable\r\n morph: function(array) {\r\n this.destination = this.parse(array)\r\n\r\n // normalize length of arrays\r\n if (this.value.length != this.destination.length) {\r\n var lastValue = this.value[this.value.length - 1]\r\n , lastDestination = this.destination[this.destination.length - 1]\r\n\r\n while(this.value.length > this.destination.length)\r\n this.destination.push(lastDestination)\r\n while(this.value.length < this.destination.length)\r\n this.value.push(lastValue)\r\n }\r\n\r\n return this\r\n }\r\n // Clean up any duplicate points\r\n, settle: function() {\r\n // find all unique values\r\n for (var i = 0, il = this.value.length, seen = []; i < il; i++)\r\n if (seen.indexOf(this.value[i]) == -1)\r\n seen.push(this.value[i])\r\n\r\n // set new value\r\n return this.value = seen\r\n }\r\n // Get morphed array at given position\r\n, at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed array\r\n for (var i = 0, il = this.value.length, array = []; i < il; i++)\r\n array.push(this.value[i] + (this.destination[i] - this.value[i]) * pos)\r\n\r\n return new SVG.Array(array)\r\n }\r\n // Convert array to string\r\n, toString: function() {\r\n return this.value.join(' ')\r\n }\r\n // Real value\r\n, valueOf: function() {\r\n return this.value\r\n }\r\n // Parse whitespace separated string\r\n, parse: function(array) {\r\n array = array.valueOf()\r\n\r\n // if already is an array, no need to parse it\r\n if (Array.isArray(array)) return array\r\n\r\n return this.split(array)\r\n }\r\n // Strip unnecessary whitespace\r\n, split: function(string) {\r\n return string.trim().split(SVG.regex.delimiter).map(parseFloat)\r\n }\r\n // Reverse array\r\n, reverse: function() {\r\n this.value.reverse()\r\n\r\n return this\r\n }\r\n, clone: function() {\r\n var clone = new this.constructor()\r\n clone.value = array_clone(this.value)\r\n return clone\r\n }\r\n})\n// Poly points array\r\nSVG.PointArray = function(array, fallback) {\r\n SVG.Array.call(this, array, fallback || [[0,0]])\r\n}\r\n\r\n// Inherit from SVG.Array\r\nSVG.PointArray.prototype = new SVG.Array\r\nSVG.PointArray.prototype.constructor = SVG.PointArray\r\n\r\nSVG.extend(SVG.PointArray, {\r\n // Convert array to string\r\n toString: function() {\r\n // convert to a poly point string\r\n for (var i = 0, il = this.value.length, array = []; i < il; i++)\r\n array.push(this.value[i].join(','))\r\n\r\n return array.join(' ')\r\n }\r\n // Convert array to line object\r\n, toLine: function() {\r\n return {\r\n x1: this.value[0][0]\r\n , y1: this.value[0][1]\r\n , x2: this.value[1][0]\r\n , y2: this.value[1][1]\r\n }\r\n }\r\n // Get morphed array at given position\r\n, at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed point string\r\n for (var i = 0, il = this.value.length, array = []; i < il; i++)\r\n array.push([\r\n this.value[i][0] + (this.destination[i][0] - this.value[i][0]) * pos\r\n , this.value[i][1] + (this.destination[i][1] - this.value[i][1]) * pos\r\n ])\r\n\r\n return new SVG.PointArray(array)\r\n }\r\n // Parse point string and flat array\r\n, parse: function(array) {\r\n var points = []\r\n\r\n array = array.valueOf()\r\n\r\n // if it is an array\r\n if (Array.isArray(array)) {\r\n // and it is not flat, there is no need to parse it\r\n if(Array.isArray(array[0])) {\r\n // make sure to use a clone\r\n return array.map(function (el) { return el.slice() })\r\n } else if (array[0].x != null){\r\n // allow point objects to be passed\r\n return array.map(function (el) { return [el.x, el.y] })\r\n }\r\n } else { // Else, it is considered as a string\r\n // parse points\r\n array = array.trim().split(SVG.regex.delimiter).map(parseFloat)\r\n }\r\n\r\n // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\r\n // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\r\n if (array.length % 2 !== 0) array.pop()\r\n\r\n // wrap points in two-tuples and parse points as floats\r\n for(var i = 0, len = array.length; i < len; i = i + 2)\r\n points.push([ array[i], array[i+1] ])\r\n\r\n return points\r\n }\r\n // Move point string\r\n, move: function(x, y) {\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n // move every point\r\n if (!isNaN(x) && !isNaN(y))\r\n for (var i = this.value.length - 1; i >= 0; i--)\r\n this.value[i] = [this.value[i][0] + x, this.value[i][1] + y]\r\n\r\n return this\r\n }\r\n // Resize poly string\r\n, size: function(width, height) {\r\n var i, box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.value.length - 1; i >= 0; i--) {\r\n if(box.width) this.value[i][0] = ((this.value[i][0] - box.x) * width) / box.width + box.x\r\n if(box.height) this.value[i][1] = ((this.value[i][1] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n return this\r\n }\r\n // Get bounding box of points\r\n, bbox: function() {\r\n SVG.parser.poly.setAttribute('points', this.toString())\r\n\r\n return SVG.parser.poly.getBBox()\r\n }\r\n})\r\n\nvar pathHandlers = {\r\n M: function(c, p, p0) {\r\n p.x = p0.x = c[0]\r\n p.y = p0.y = c[1]\r\n\r\n return ['M', p.x, p.y]\r\n },\r\n L: function(c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['L', c[0], c[1]]\r\n },\r\n H: function(c, p) {\r\n p.x = c[0]\r\n return ['H', c[0]]\r\n },\r\n V: function(c, p) {\r\n p.y = c[0]\r\n return ['V', c[0]]\r\n },\r\n C: function(c, p) {\r\n p.x = c[4]\r\n p.y = c[5]\r\n return ['C', c[0], c[1], c[2], c[3], c[4], c[5]]\r\n },\r\n S: function(c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['S', c[0], c[1], c[2], c[3]]\r\n },\r\n Q: function(c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['Q', c[0], c[1], c[2], c[3]]\r\n },\r\n T: function(c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['T', c[0], c[1]]\r\n },\r\n Z: function(c, p, p0) {\r\n p.x = p0.x\r\n p.y = p0.y\r\n return ['Z']\r\n },\r\n A: function(c, p) {\r\n p.x = c[5]\r\n p.y = c[6]\r\n return ['A', c[0], c[1], c[2], c[3], c[4], c[5], c[6]]\r\n }\r\n}\r\n\r\nvar mlhvqtcsa = 'mlhvqtcsaz'.split('')\r\n\r\nfor(var i = 0, il = mlhvqtcsa.length; i < il; ++i){\r\n pathHandlers[mlhvqtcsa[i]] = (function(i){\r\n return function(c, p, p0) {\r\n if(i == 'H') c[0] = c[0] + p.x\r\n else if(i == 'V') c[0] = c[0] + p.y\r\n else if(i == 'A'){\r\n c[5] = c[5] + p.x,\r\n c[6] = c[6] + p.y\r\n }\r\n else\r\n for(var j = 0, jl = c.length; j < jl; ++j) {\r\n c[j] = c[j] + (j%2 ? p.y : p.x)\r\n }\r\n\r\n return pathHandlers[i](c, p, p0)\r\n }\r\n })(mlhvqtcsa[i].toUpperCase())\r\n}\r\n\r\n// Path points array\r\nSVG.PathArray = function(array, fallback) {\r\n SVG.Array.call(this, array, fallback || [['M', 0, 0]])\r\n}\r\n\r\n// Inherit from SVG.Array\r\nSVG.PathArray.prototype = new SVG.Array\r\nSVG.PathArray.prototype.constructor = SVG.PathArray\r\n\r\nSVG.extend(SVG.PathArray, {\r\n // Convert array to string\r\n toString: function() {\r\n return arrayToString(this.value)\r\n }\r\n // Move path string\r\n, move: function(x, y) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n if (!isNaN(x) && !isNaN(y)) {\r\n // move every point\r\n for (var l, i = this.value.length - 1; i >= 0; i--) {\r\n l = this.value[i][0]\r\n\r\n if (l == 'M' || l == 'L' || l == 'T') {\r\n this.value[i][1] += x\r\n this.value[i][2] += y\r\n\r\n } else if (l == 'H') {\r\n this.value[i][1] += x\r\n\r\n } else if (l == 'V') {\r\n this.value[i][1] += y\r\n\r\n } else if (l == 'C' || l == 'S' || l == 'Q') {\r\n this.value[i][1] += x\r\n this.value[i][2] += y\r\n this.value[i][3] += x\r\n this.value[i][4] += y\r\n\r\n if (l == 'C') {\r\n this.value[i][5] += x\r\n this.value[i][6] += y\r\n }\r\n\r\n } else if (l == 'A') {\r\n this.value[i][6] += x\r\n this.value[i][7] += y\r\n }\r\n\r\n }\r\n }\r\n\r\n return this\r\n }\r\n // Resize path string\r\n, size: function(width, height) {\r\n // get bounding box of current situation\r\n var i, l, box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.value.length - 1; i >= 0; i--) {\r\n l = this.value[i][0]\r\n\r\n if (l == 'M' || l == 'L' || l == 'T') {\r\n this.value[i][1] = ((this.value[i][1] - box.x) * width) / box.width + box.x\r\n this.value[i][2] = ((this.value[i][2] - box.y) * height) / box.height + box.y\r\n\r\n } else if (l == 'H') {\r\n this.value[i][1] = ((this.value[i][1] - box.x) * width) / box.width + box.x\r\n\r\n } else if (l == 'V') {\r\n this.value[i][1] = ((this.value[i][1] - box.y) * height) / box.height + box.y\r\n\r\n } else if (l == 'C' || l == 'S' || l == 'Q') {\r\n this.value[i][1] = ((this.value[i][1] - box.x) * width) / box.width + box.x\r\n this.value[i][2] = ((this.value[i][2] - box.y) * height) / box.height + box.y\r\n this.value[i][3] = ((this.value[i][3] - box.x) * width) / box.width + box.x\r\n this.value[i][4] = ((this.value[i][4] - box.y) * height) / box.height + box.y\r\n\r\n if (l == 'C') {\r\n this.value[i][5] = ((this.value[i][5] - box.x) * width) / box.width + box.x\r\n this.value[i][6] = ((this.value[i][6] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n } else if (l == 'A') {\r\n // resize radii\r\n this.value[i][1] = (this.value[i][1] * width) / box.width\r\n this.value[i][2] = (this.value[i][2] * height) / box.height\r\n\r\n // move position values\r\n this.value[i][6] = ((this.value[i][6] - box.x) * width) / box.width + box.x\r\n this.value[i][7] = ((this.value[i][7] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n }\r\n\r\n return this\r\n }\r\n // Test if the passed path array use the same path data commands as this path array\r\n, equalCommands: function(pathArray) {\r\n var i, il, equalCommands\r\n\r\n pathArray = new SVG.PathArray(pathArray)\r\n\r\n equalCommands = this.value.length === pathArray.value.length\r\n for(i = 0, il = this.value.length; equalCommands && i < il; i++) {\r\n equalCommands = this.value[i][0] === pathArray.value[i][0]\r\n }\r\n\r\n return equalCommands\r\n }\r\n // Make path array morphable\r\n, morph: function(pathArray) {\r\n pathArray = new SVG.PathArray(pathArray)\r\n\r\n if(this.equalCommands(pathArray)) {\r\n this.destination = pathArray\r\n } else {\r\n this.destination = null\r\n }\r\n\r\n return this\r\n }\r\n // Get morphed path array at given position\r\n, at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n var sourceArray = this.value\r\n , destinationArray = this.destination.value\r\n , array = [], pathArray = new SVG.PathArray()\r\n , i, il, j, jl\r\n\r\n // Animate has specified in the SVG spec\r\n // See: https://www.w3.org/TR/SVG11/paths.html#PathElement\r\n for (i = 0, il = sourceArray.length; i < il; i++) {\r\n array[i] = [sourceArray[i][0]]\r\n for(j = 1, jl = sourceArray[i].length; j < jl; j++) {\r\n array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos\r\n }\r\n // For the two flags of the elliptical arc command, the SVG spec say:\r\n // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true\r\n // Elliptical arc command as an array followed by corresponding indexes:\r\n // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\r\n // 0 1 2 3 4 5 6 7\r\n if(array[i][0] === 'A') {\r\n array[i][4] = +(array[i][4] != 0)\r\n array[i][5] = +(array[i][5] != 0)\r\n }\r\n }\r\n\r\n // Directly modify the value of a path array, this is done this way for performance\r\n pathArray.value = array\r\n return pathArray\r\n }\r\n // Absolutize and parse path to array\r\n, parse: function(array) {\r\n // if it's already a patharray, no need to parse it\r\n if (array instanceof SVG.PathArray) return array.valueOf()\r\n\r\n // prepare for parsing\r\n var i, x0, y0, s, seg, arr\r\n , x = 0\r\n , y = 0\r\n , paramCnt = { 'M':2, 'L':2, 'H':1, 'V':1, 'C':6, 'S':4, 'Q':4, 'T':2, 'A':7, 'Z':0 }\r\n\r\n if(typeof array == 'string'){\r\n\r\n array = array\r\n .replace(SVG.regex.numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123\r\n .replace(SVG.regex.pathLetters, ' $& ') // put some room between letters and numbers\r\n .replace(SVG.regex.hyphen, '$1 -') // add space before hyphen\r\n .trim() // trim\r\n .split(SVG.regex.delimiter) // split into array\r\n\r\n }else{\r\n array = array.reduce(function(prev, curr){\r\n return [].concat.call(prev, curr)\r\n }, [])\r\n }\r\n\r\n // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...]\r\n var arr = []\r\n , p = new SVG.Point()\r\n , p0 = new SVG.Point()\r\n , index = 0\r\n , len = array.length\r\n\r\n do{\r\n // Test if we have a path letter\r\n if(SVG.regex.isPathLetter.test(array[index])){\r\n s = array[index]\r\n ++index\r\n // If last letter was a move command and we got no new, it defaults to [L]ine\r\n }else if(s == 'M'){\r\n s = 'L'\r\n }else if(s == 'm'){\r\n s = 'l'\r\n }\r\n\r\n arr.push(pathHandlers[s].call(null,\r\n array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat),\r\n p, p0\r\n )\r\n )\r\n\r\n }while(len > index)\r\n\r\n return arr\r\n\r\n }\r\n // Get bounding box of path\r\n, bbox: function() {\r\n SVG.parser.path.setAttribute('d', this.toString())\r\n\r\n return SVG.parser.path.getBBox()\r\n }\r\n\r\n})\r\n\n// Module for unit convertions\r\nSVG.Number = SVG.invent({\r\n // Initialize\r\n create: function(value, unit) {\r\n // initialize defaults\r\n this.value = 0\r\n this.unit = unit || ''\r\n\r\n // parse value\r\n if (typeof value === 'number') {\r\n // ensure a valid numeric value\r\n this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value\r\n\r\n } else if (typeof value === 'string') {\r\n unit = value.match(SVG.regex.numberAndUnit)\r\n\r\n if (unit) {\r\n // make value numeric\r\n this.value = parseFloat(unit[1])\r\n\r\n // normalize\r\n if (unit[5] == '%')\r\n this.value /= 100\r\n else if (unit[5] == 's')\r\n this.value *= 1000\r\n\r\n // store unit\r\n this.unit = unit[5]\r\n }\r\n\r\n } else {\r\n if (value instanceof SVG.Number) {\r\n this.value = value.valueOf()\r\n this.unit = value.unit\r\n }\r\n }\r\n\r\n }\r\n // Add methods\r\n, extend: {\r\n // Stringalize\r\n toString: function() {\r\n return (\r\n this.unit == '%' ?\r\n ~~(this.value * 1e8) / 1e6:\r\n this.unit == 's' ?\r\n this.value / 1e3 :\r\n this.value\r\n ) + this.unit\r\n }\r\n , toJSON: function() {\r\n return this.toString()\r\n }\r\n , // Convert to primitive\r\n valueOf: function() {\r\n return this.value\r\n }\r\n // Add number\r\n , plus: function(number) {\r\n number = new SVG.Number(number)\r\n return new SVG.Number(this + number, this.unit || number.unit)\r\n }\r\n // Subtract number\r\n , minus: function(number) {\r\n number = new SVG.Number(number)\r\n return new SVG.Number(this - number, this.unit || number.unit)\r\n }\r\n // Multiply number\r\n , times: function(number) {\r\n number = new SVG.Number(number)\r\n return new SVG.Number(this * number, this.unit || number.unit)\r\n }\r\n // Divide number\r\n , divide: function(number) {\r\n number = new SVG.Number(number)\r\n return new SVG.Number(this / number, this.unit || number.unit)\r\n }\r\n // Convert to different unit\r\n , to: function(unit) {\r\n var number = new SVG.Number(this)\r\n\r\n if (typeof unit === 'string')\r\n number.unit = unit\r\n\r\n return number\r\n }\r\n // Make number morphable\r\n , morph: function(number) {\r\n this.destination = new SVG.Number(number)\r\n\r\n if(number.relative) {\r\n this.destination.value += this.value\r\n }\r\n\r\n return this\r\n }\r\n // Get morphed number at given position\r\n , at: function(pos) {\r\n // Make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // Generate new morphed number\r\n return new SVG.Number(this.destination)\r\n .minus(this)\r\n .times(pos)\r\n .plus(this)\r\n }\r\n\r\n }\r\n})\r\n\n\r\nSVG.Element = SVG.invent({\r\n // Initialize node\r\n create: function(node) {\r\n // make stroke value accessible dynamically\r\n this._stroke = SVG.defaults.attrs.stroke\r\n this._event = null\r\n this._events = {}\r\n\r\n // initialize data object\r\n this.dom = {}\r\n\r\n // create circular reference\r\n if (this.node = node) {\r\n this.type = node.nodeName\r\n this.node.instance = this\r\n this._events = node._events || {}\r\n\r\n // store current attribute value\r\n this._stroke = node.getAttribute('stroke') || this._stroke\r\n }\r\n }\r\n\r\n // Add class methods\r\n, extend: {\r\n // Move over x-axis\r\n x: function(x) {\r\n return this.attr('x', x)\r\n }\r\n // Move over y-axis\r\n , y: function(y) {\r\n return this.attr('y', y)\r\n }\r\n // Move by center over x-axis\r\n , cx: function(x) {\r\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2)\r\n }\r\n // Move by center over y-axis\r\n , cy: function(y) {\r\n return y == null ? this.y() + this.height() / 2 : this.y(y - this.height() / 2)\r\n }\r\n // Move element to given x and y values\r\n , move: function(x, y) {\r\n return this.x(x).y(y)\r\n }\r\n // Move element by its center\r\n , center: function(x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n // Set width of element\r\n , width: function(width) {\r\n return this.attr('width', width)\r\n }\r\n // Set height of element\r\n , height: function(height) {\r\n return this.attr('height', height)\r\n }\r\n // Set element size to given width and height\r\n , size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .width(new SVG.Number(p.width))\r\n .height(new SVG.Number(p.height))\r\n }\r\n // Clone element\r\n , clone: function(parent) {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // clone element and assign new id\r\n var clone = assignNewId(this.node.cloneNode(true))\r\n\r\n // insert the clone in the given parent or after myself\r\n if(parent) parent.add(clone)\r\n else this.after(clone)\r\n\r\n return clone\r\n }\r\n // Remove element\r\n , remove: function() {\r\n if (this.parent())\r\n this.parent().removeElement(this)\r\n\r\n return this\r\n }\r\n // Replace element\r\n , replace: function(element) {\r\n this.after(element).remove()\r\n\r\n return element\r\n }\r\n // Add element to given container and return self\r\n , addTo: function(parent) {\r\n return parent.put(this)\r\n }\r\n // Add element to given container and return container\r\n , putIn: function(parent) {\r\n return parent.add(this)\r\n }\r\n // Get / set id\r\n , id: function(id) {\r\n return this.attr('id', id)\r\n }\r\n // Checks whether the given point inside the bounding box of the element\r\n , inside: function(x, y) {\r\n var box = this.bbox()\r\n\r\n return x > box.x\r\n && y > box.y\r\n && x < box.x + box.width\r\n && y < box.y + box.height\r\n }\r\n // Show element\r\n , show: function() {\r\n return this.style('display', '')\r\n }\r\n // Hide element\r\n , hide: function() {\r\n return this.style('display', 'none')\r\n }\r\n // Is element visible?\r\n , visible: function() {\r\n return this.style('display') != 'none'\r\n }\r\n // Return id on string conversion\r\n , toString: function() {\r\n return this.attr('id')\r\n }\r\n // Return array of classes on the node\r\n , classes: function() {\r\n var attr = this.attr('class')\r\n\r\n return attr == null ? [] : attr.trim().split(SVG.regex.delimiter)\r\n }\r\n // Return true if class exists on the node, false otherwise\r\n , hasClass: function(name) {\r\n return this.classes().indexOf(name) != -1\r\n }\r\n // Add class to the node\r\n , addClass: function(name) {\r\n if (!this.hasClass(name)) {\r\n var array = this.classes()\r\n array.push(name)\r\n this.attr('class', array.join(' '))\r\n }\r\n\r\n return this\r\n }\r\n // Remove class from the node\r\n , removeClass: function(name) {\r\n if (this.hasClass(name)) {\r\n this.attr('class', this.classes().filter(function(c) {\r\n return c != name\r\n }).join(' '))\r\n }\r\n\r\n return this\r\n }\r\n // Toggle the presence of a class on the node\r\n , toggleClass: function(name) {\r\n return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\r\n }\r\n // Get referenced element form attribute value\r\n , reference: function(attr) {\r\n return SVG.get(this.attr(attr))\r\n }\r\n // Returns the parent element instance\r\n , parent: function(type) {\r\n var parent = this\r\n\r\n // check for parent\r\n if(!parent.node.parentNode) return null\r\n\r\n // get parent element\r\n parent = SVG.adopt(parent.node.parentNode)\r\n\r\n if(!type) return parent\r\n\r\n // loop trough ancestors if type is given\r\n while(parent && parent.node instanceof window.SVGElement){\r\n if(typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent\r\n if(!parent.node.parentNode || parent.node.parentNode.nodeName == '#document' || parent.node.parentNode.nodeName == '#document-fragment') return null // #759, #720\r\n parent = SVG.adopt(parent.node.parentNode)\r\n }\r\n }\r\n // Get parent document\r\n , doc: function() {\r\n return this instanceof SVG.Doc ? this : this.parent(SVG.Doc)\r\n }\r\n // return array of all ancestors of given type up to the root svg\r\n , parents: function(type) {\r\n var parents = [], parent = this\r\n\r\n do{\r\n parent = parent.parent(type)\r\n if(!parent || !parent.node) break\r\n\r\n parents.push(parent)\r\n } while(parent.parent)\r\n\r\n return parents\r\n }\r\n // matches the element vs a css selector\r\n , matches: function(selector){\r\n return matches(this.node, selector)\r\n }\r\n // Returns the svg node to call native svg methods on it\r\n , native: function() {\r\n return this.node\r\n }\r\n // Import raw svg\r\n , svg: function(svg) {\r\n // create temporary holder\r\n var well = document.createElement('svg')\r\n\r\n // act as a setter if svg is given\r\n if (svg && this instanceof SVG.Parent) {\r\n // dump raw svg\r\n well.innerHTML = '' + svg.replace(/\\n/, '').replace(/<([\\w:-]+)([^<]+?)\\/>/g, '<$1$2>') + ''\r\n\r\n // transplant nodes\r\n for (var i = 0, il = well.firstChild.childNodes.length; i < il; i++)\r\n this.node.appendChild(well.firstChild.firstChild)\r\n\r\n // otherwise act as a getter\r\n } else {\r\n // create a wrapping svg element in case of partial content\r\n well.appendChild(svg = document.createElement('svg'))\r\n\r\n // write svgjs data to the dom\r\n this.writeDataToDom()\r\n\r\n // insert a copy of this node\r\n svg.appendChild(this.node.cloneNode(true))\r\n\r\n // return target element\r\n return well.innerHTML.replace(/^/, '').replace(/<\\/svg>$/, '')\r\n }\r\n\r\n return this\r\n }\r\n // write svgjs data to the dom\r\n , writeDataToDom: function() {\r\n\r\n // dump variables recursively\r\n if(this.each || this.lines){\r\n var fn = this.each ? this : this.lines();\r\n fn.each(function(){\r\n this.writeDataToDom()\r\n })\r\n }\r\n\r\n // remove previously set data\r\n this.node.removeAttribute('svgjs:data')\r\n\r\n if(Object.keys(this.dom).length)\r\n this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) // see #428\r\n\r\n return this\r\n }\r\n // set given data to the elements data property\r\n , setData: function(o){\r\n this.dom = o\r\n return this\r\n }\r\n , is: function(obj){\r\n return is(this, obj)\r\n }\r\n }\r\n})\r\n\nSVG.easing = {\r\n '-': function(pos){return pos}\r\n, '<>':function(pos){return -Math.cos(pos * Math.PI) / 2 + 0.5}\r\n, '>': function(pos){return Math.sin(pos * Math.PI / 2)}\r\n, '<': function(pos){return -Math.cos(pos * Math.PI / 2) + 1}\r\n}\r\n\r\nSVG.morph = function(pos){\r\n return function(from, to) {\r\n return new SVG.MorphObj(from, to).at(pos)\r\n }\r\n}\r\n\r\nSVG.Situation = SVG.invent({\r\n\r\n create: function(o){\r\n this.init = false\r\n this.reversed = false\r\n this.reversing = false\r\n\r\n this.duration = new SVG.Number(o.duration).valueOf()\r\n this.delay = new SVG.Number(o.delay).valueOf()\r\n\r\n this.start = +new Date() + this.delay\r\n this.finish = this.start + this.duration\r\n this.ease = o.ease\r\n\r\n // this.loop is incremented from 0 to this.loops\r\n // it is also incremented when in an infinite loop (when this.loops is true)\r\n this.loop = 0\r\n this.loops = false\r\n\r\n this.animations = {\r\n // functionToCall: [list of morphable objects]\r\n // e.g. move: [SVG.Number, SVG.Number]\r\n }\r\n\r\n this.attrs = {\r\n // holds all attributes which are not represented from a function svg.js provides\r\n // e.g. someAttr: SVG.Number\r\n }\r\n\r\n this.styles = {\r\n // holds all styles which should be animated\r\n // e.g. fill-color: SVG.Color\r\n }\r\n\r\n this.transforms = [\r\n // holds all transformations as transformation objects\r\n // e.g. [SVG.Rotate, SVG.Translate, SVG.Matrix]\r\n ]\r\n\r\n this.once = {\r\n // functions to fire at a specific position\r\n // e.g. \"0.5\": function foo(){}\r\n }\r\n\r\n }\r\n\r\n})\r\n\r\n\r\nSVG.FX = SVG.invent({\r\n\r\n create: function(element) {\r\n this._target = element\r\n this.situations = []\r\n this.active = false\r\n this.situation = null\r\n this.paused = false\r\n this.lastPos = 0\r\n this.pos = 0\r\n // The absolute position of an animation is its position in the context of its complete duration (including delay and loops)\r\n // When performing a delay, absPos is below 0 and when performing a loop, its value is above 1\r\n this.absPos = 0\r\n this._speed = 1\r\n }\r\n\r\n, extend: {\r\n\r\n /**\r\n * sets or returns the target of this animation\r\n * @param o object || number In case of Object it holds all parameters. In case of number its the duration of the animation\r\n * @param ease function || string Function which should be used for easing or easing keyword\r\n * @param delay Number indicating the delay before the animation starts\r\n * @return target || this\r\n */\r\n animate: function(o, ease, delay){\r\n\r\n if(typeof o == 'object'){\r\n ease = o.ease\r\n delay = o.delay\r\n o = o.duration\r\n }\r\n\r\n var situation = new SVG.Situation({\r\n duration: o || 1000,\r\n delay: delay || 0,\r\n ease: SVG.easing[ease || '-'] || ease\r\n })\r\n\r\n this.queue(situation)\r\n\r\n return this\r\n }\r\n\r\n /**\r\n * sets a delay before the next element of the queue is called\r\n * @param delay Duration of delay in milliseconds\r\n * @return this.target()\r\n */\r\n , delay: function(delay){\r\n // The delay is performed by an empty situation with its duration\r\n // attribute set to the duration of the delay\r\n var situation = new SVG.Situation({\r\n duration: delay,\r\n delay: 0,\r\n ease: SVG.easing['-']\r\n })\r\n\r\n return this.queue(situation)\r\n }\r\n\r\n /**\r\n * sets or returns the target of this animation\r\n * @param null || target SVG.Element which should be set as new target\r\n * @return target || this\r\n */\r\n , target: function(target){\r\n if(target && target instanceof SVG.Element){\r\n this._target = target\r\n return this\r\n }\r\n\r\n return this._target\r\n }\r\n\r\n // returns the absolute position at a given time\r\n , timeToAbsPos: function(timestamp){\r\n return (timestamp - this.situation.start) / (this.situation.duration/this._speed)\r\n }\r\n\r\n // returns the timestamp from a given absolute positon\r\n , absPosToTime: function(absPos){\r\n return this.situation.duration/this._speed * absPos + this.situation.start\r\n }\r\n\r\n // starts the animationloop\r\n , startAnimFrame: function(){\r\n this.stopAnimFrame()\r\n this.animationFrame = window.requestAnimationFrame(function(){ this.step() }.bind(this))\r\n }\r\n\r\n // cancels the animationframe\r\n , stopAnimFrame: function(){\r\n window.cancelAnimationFrame(this.animationFrame)\r\n }\r\n\r\n // kicks off the animation - only does something when the queue is currently not active and at least one situation is set\r\n , start: function(){\r\n // dont start if already started\r\n if(!this.active && this.situation){\r\n this.active = true\r\n this.startCurrent()\r\n }\r\n\r\n return this\r\n }\r\n\r\n // start the current situation\r\n , startCurrent: function(){\r\n this.situation.start = +new Date + this.situation.delay/this._speed\r\n this.situation.finish = this.situation.start + this.situation.duration/this._speed\r\n return this.initAnimations().step()\r\n }\r\n\r\n /**\r\n * adds a function / Situation to the animation queue\r\n * @param fn function / situation to add\r\n * @return this\r\n */\r\n , queue: function(fn){\r\n if(typeof fn == 'function' || fn instanceof SVG.Situation)\r\n this.situations.push(fn)\r\n\r\n if(!this.situation) this.situation = this.situations.shift()\r\n\r\n return this\r\n }\r\n\r\n /**\r\n * pulls next element from the queue and execute it\r\n * @return this\r\n */\r\n , dequeue: function(){\r\n // stop current animation\r\n this.stop()\r\n\r\n // get next animation from queue\r\n this.situation = this.situations.shift()\r\n\r\n if(this.situation){\r\n if(this.situation instanceof SVG.Situation) {\r\n this.start()\r\n } else {\r\n // If it is not a SVG.Situation, then it is a function, we execute it\r\n this.situation.call(this)\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n // updates all animations to the current state of the element\r\n // this is important when one property could be changed from another property\r\n , initAnimations: function() {\r\n var i, j, source\r\n var s = this.situation\r\n\r\n if(s.init) return this\r\n\r\n for(i in s.animations){\r\n source = this.target()[i]()\r\n\r\n if(!Array.isArray(source)) {\r\n source = [source]\r\n }\r\n\r\n if(!Array.isArray(s.animations[i])) {\r\n s.animations[i] = [s.animations[i]]\r\n }\r\n\r\n //if(s.animations[i].length > source.length) {\r\n // source.concat = source.concat(s.animations[i].slice(source.length, s.animations[i].length))\r\n //}\r\n\r\n for(j = source.length; j--;) {\r\n // The condition is because some methods return a normal number instead\r\n // of a SVG.Number\r\n if(s.animations[i][j] instanceof SVG.Number)\r\n source[j] = new SVG.Number(source[j])\r\n\r\n s.animations[i][j] = source[j].morph(s.animations[i][j])\r\n }\r\n }\r\n\r\n for(i in s.attrs){\r\n s.attrs[i] = new SVG.MorphObj(this.target().attr(i), s.attrs[i])\r\n }\r\n\r\n for(i in s.styles){\r\n s.styles[i] = new SVG.MorphObj(this.target().style(i), s.styles[i])\r\n }\r\n\r\n s.initialTransformation = this.target().matrixify()\r\n\r\n s.init = true\r\n return this\r\n }\r\n , clearQueue: function(){\r\n this.situations = []\r\n return this\r\n }\r\n , clearCurrent: function(){\r\n this.situation = null\r\n return this\r\n }\r\n /** stops the animation immediately\r\n * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately.\r\n * @param clearQueue A Boolean indicating whether to remove queued animation as well.\r\n * @return this\r\n */\r\n , stop: function(jumpToEnd, clearQueue){\r\n var active = this.active\r\n this.active = false\r\n\r\n if(clearQueue){\r\n this.clearQueue()\r\n }\r\n\r\n if(jumpToEnd && this.situation){\r\n // initialize the situation if it was not\r\n !active && this.startCurrent()\r\n this.atEnd()\r\n }\r\n\r\n this.stopAnimFrame()\r\n\r\n return this.clearCurrent()\r\n }\r\n\r\n /** resets the element to the state where the current element has started\r\n * @return this\r\n */\r\n , reset: function(){\r\n if(this.situation){\r\n var temp = this.situation\r\n this.stop()\r\n this.situation = temp\r\n this.atStart()\r\n }\r\n return this\r\n }\r\n\r\n // Stop the currently-running animation, remove all queued animations, and complete all animations for the element.\r\n , finish: function(){\r\n\r\n this.stop(true, false)\r\n\r\n while(this.dequeue().situation && this.stop(true, false));\r\n\r\n this.clearQueue().clearCurrent()\r\n\r\n return this\r\n }\r\n\r\n // set the internal animation pointer at the start position, before any loops, and updates the visualisation\r\n , atStart: function() {\r\n return this.at(0, true)\r\n }\r\n\r\n // set the internal animation pointer at the end position, after all the loops, and updates the visualisation\r\n , atEnd: function() {\r\n if (this.situation.loops === true) {\r\n // If in a infinite loop, we end the current iteration\r\n this.situation.loops = this.situation.loop + 1\r\n }\r\n\r\n if(typeof this.situation.loops == 'number') {\r\n // If performing a finite number of loops, we go after all the loops\r\n return this.at(this.situation.loops, true)\r\n } else {\r\n // If no loops, we just go at the end\r\n return this.at(1, true)\r\n }\r\n }\r\n\r\n // set the internal animation pointer to the specified position and updates the visualisation\r\n // if isAbsPos is true, pos is treated as an absolute position\r\n , at: function(pos, isAbsPos){\r\n var durDivSpd = this.situation.duration/this._speed\r\n\r\n this.absPos = pos\r\n // If pos is not an absolute position, we convert it into one\r\n if (!isAbsPos) {\r\n if (this.situation.reversed) this.absPos = 1 - this.absPos\r\n this.absPos += this.situation.loop\r\n }\r\n\r\n this.situation.start = +new Date - this.absPos * durDivSpd\r\n this.situation.finish = this.situation.start + durDivSpd\r\n\r\n return this.step(true)\r\n }\r\n\r\n /**\r\n * sets or returns the speed of the animations\r\n * @param speed null || Number The new speed of the animations\r\n * @return Number || this\r\n */\r\n , speed: function(speed){\r\n if (speed === 0) return this.pause()\r\n\r\n if (speed) {\r\n this._speed = speed\r\n // We use an absolute position here so that speed can affect the delay before the animation\r\n return this.at(this.absPos, true)\r\n } else return this._speed\r\n }\r\n\r\n // Make loopable\r\n , loop: function(times, reverse) {\r\n var c = this.last()\r\n\r\n // store total loops\r\n c.loops = (times != null) ? times : true\r\n c.loop = 0\r\n\r\n if(reverse) c.reversing = true\r\n return this\r\n }\r\n\r\n // pauses the animation\r\n , pause: function(){\r\n this.paused = true\r\n this.stopAnimFrame()\r\n\r\n return this\r\n }\r\n\r\n // unpause the animation\r\n , play: function(){\r\n if(!this.paused) return this\r\n this.paused = false\r\n // We use an absolute position here so that the delay before the animation can be paused\r\n return this.at(this.absPos, true)\r\n }\r\n\r\n /**\r\n * toggle or set the direction of the animation\r\n * true sets direction to backwards while false sets it to forwards\r\n * @param reversed Boolean indicating whether to reverse the animation or not (default: toggle the reverse status)\r\n * @return this\r\n */\r\n , reverse: function(reversed){\r\n var c = this.last()\r\n\r\n if(typeof reversed == 'undefined') c.reversed = !c.reversed\r\n else c.reversed = reversed\r\n\r\n return this\r\n }\r\n\r\n\r\n /**\r\n * returns a float from 0-1 indicating the progress of the current animation\r\n * @param eased Boolean indicating whether the returned position should be eased or not\r\n * @return number\r\n */\r\n , progress: function(easeIt){\r\n return easeIt ? this.situation.ease(this.pos) : this.pos\r\n }\r\n\r\n /**\r\n * adds a callback function which is called when the current animation is finished\r\n * @param fn Function which should be executed as callback\r\n * @return number\r\n */\r\n , after: function(fn){\r\n var c = this.last()\r\n , wrapper = function wrapper(e){\r\n if(e.detail.situation == c){\r\n fn.call(this, c)\r\n this.off('finished.fx', wrapper) // prevent memory leak\r\n }\r\n }\r\n\r\n this.target().on('finished.fx', wrapper)\r\n\r\n return this._callStart()\r\n }\r\n\r\n // adds a callback which is called whenever one animation step is performed\r\n , during: function(fn){\r\n var c = this.last()\r\n , wrapper = function(e){\r\n if(e.detail.situation == c){\r\n fn.call(this, e.detail.pos, SVG.morph(e.detail.pos), e.detail.eased, c)\r\n }\r\n }\r\n\r\n // see above\r\n this.target().off('during.fx', wrapper).on('during.fx', wrapper)\r\n\r\n this.after(function(){\r\n this.off('during.fx', wrapper)\r\n })\r\n\r\n return this._callStart()\r\n }\r\n\r\n // calls after ALL animations in the queue are finished\r\n , afterAll: function(fn){\r\n var wrapper = function wrapper(e){\r\n fn.call(this)\r\n this.off('allfinished.fx', wrapper)\r\n }\r\n\r\n // see above\r\n this.target().off('allfinished.fx', wrapper).on('allfinished.fx', wrapper)\r\n\r\n return this._callStart()\r\n }\r\n\r\n // calls on every animation step for all animations\r\n , duringAll: function(fn){\r\n var wrapper = function(e){\r\n fn.call(this, e.detail.pos, SVG.morph(e.detail.pos), e.detail.eased, e.detail.situation)\r\n }\r\n\r\n this.target().off('during.fx', wrapper).on('during.fx', wrapper)\r\n\r\n this.afterAll(function(){\r\n this.off('during.fx', wrapper)\r\n })\r\n\r\n return this._callStart()\r\n }\r\n\r\n , last: function(){\r\n return this.situations.length ? this.situations[this.situations.length-1] : this.situation\r\n }\r\n\r\n // adds one property to the animations\r\n , add: function(method, args, type){\r\n this.last()[type || 'animations'][method] = args\r\n return this._callStart()\r\n }\r\n\r\n /** perform one step of the animation\r\n * @param ignoreTime Boolean indicating whether to ignore time and use position directly or recalculate position based on time\r\n * @return this\r\n */\r\n , step: function(ignoreTime){\r\n\r\n // convert current time to an absolute position\r\n if(!ignoreTime) this.absPos = this.timeToAbsPos(+new Date)\r\n\r\n // This part convert an absolute position to a position\r\n if(this.situation.loops !== false) {\r\n var absPos, absPosInt, lastLoop\r\n\r\n // If the absolute position is below 0, we just treat it as if it was 0\r\n absPos = Math.max(this.absPos, 0)\r\n absPosInt = Math.floor(absPos)\r\n\r\n if(this.situation.loops === true || absPosInt < this.situation.loops) {\r\n this.pos = absPos - absPosInt\r\n lastLoop = this.situation.loop\r\n this.situation.loop = absPosInt\r\n } else {\r\n this.absPos = this.situation.loops\r\n this.pos = 1\r\n // The -1 here is because we don't want to toggle reversed when all the loops have been completed\r\n lastLoop = this.situation.loop - 1\r\n this.situation.loop = this.situation.loops\r\n }\r\n\r\n if(this.situation.reversing) {\r\n // Toggle reversed if an odd number of loops as occured since the last call of step\r\n this.situation.reversed = this.situation.reversed != Boolean((this.situation.loop - lastLoop) % 2)\r\n }\r\n\r\n } else {\r\n // If there are no loop, the absolute position must not be above 1\r\n this.absPos = Math.min(this.absPos, 1)\r\n this.pos = this.absPos\r\n }\r\n\r\n // while the absolute position can be below 0, the position must not be below 0\r\n if(this.pos < 0) this.pos = 0\r\n\r\n if(this.situation.reversed) this.pos = 1 - this.pos\r\n\r\n\r\n // apply easing\r\n var eased = this.situation.ease(this.pos)\r\n\r\n // call once-callbacks\r\n for(var i in this.situation.once){\r\n if(i > this.lastPos && i <= eased){\r\n this.situation.once[i].call(this.target(), this.pos, eased)\r\n delete this.situation.once[i]\r\n }\r\n }\r\n\r\n // fire during callback with position, eased position and current situation as parameter\r\n if(this.active) this.target().fire('during', {pos: this.pos, eased: eased, fx: this, situation: this.situation})\r\n\r\n // the user may call stop or finish in the during callback\r\n // so make sure that we still have a valid situation\r\n if(!this.situation){\r\n return this\r\n }\r\n\r\n // apply the actual animation to every property\r\n this.eachAt()\r\n\r\n // do final code when situation is finished\r\n if((this.pos == 1 && !this.situation.reversed) || (this.situation.reversed && this.pos == 0)){\r\n\r\n // stop animation callback\r\n this.stopAnimFrame()\r\n\r\n // fire finished callback with current situation as parameter\r\n this.target().fire('finished', {fx:this, situation: this.situation})\r\n\r\n if(!this.situations.length){\r\n this.target().fire('allfinished')\r\n\r\n // Recheck the length since the user may call animate in the afterAll callback\r\n if(!this.situations.length){\r\n this.target().off('.fx') // there shouldnt be any binding left, but to make sure...\r\n this.active = false\r\n }\r\n }\r\n\r\n // start next animation\r\n if(this.active) this.dequeue()\r\n else this.clearCurrent()\r\n\r\n }else if(!this.paused && this.active){\r\n // we continue animating when we are not at the end\r\n this.startAnimFrame()\r\n }\r\n\r\n // save last eased position for once callback triggering\r\n this.lastPos = eased\r\n return this\r\n\r\n }\r\n\r\n // calculates the step for every property and calls block with it\r\n , eachAt: function(){\r\n var i, len, at, self = this, target = this.target(), s = this.situation\r\n\r\n // apply animations which can be called trough a method\r\n for(i in s.animations){\r\n\r\n at = [].concat(s.animations[i]).map(function(el){\r\n return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el\r\n })\r\n\r\n target[i].apply(target, at)\r\n\r\n }\r\n\r\n // apply animation which has to be applied with attr()\r\n for(i in s.attrs){\r\n\r\n at = [i].concat(s.attrs[i]).map(function(el){\r\n return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el\r\n })\r\n\r\n target.attr.apply(target, at)\r\n\r\n }\r\n\r\n // apply animation which has to be applied with style()\r\n for(i in s.styles){\r\n\r\n at = [i].concat(s.styles[i]).map(function(el){\r\n return typeof el !== 'string' && el.at ? el.at(s.ease(self.pos), self.pos) : el\r\n })\r\n\r\n target.style.apply(target, at)\r\n\r\n }\r\n\r\n // animate initialTransformation which has to be chained\r\n if(s.transforms.length){\r\n\r\n // get initial initialTransformation\r\n at = s.initialTransformation\r\n for(i = 0, len = s.transforms.length; i < len; i++){\r\n\r\n // get next transformation in chain\r\n var a = s.transforms[i]\r\n\r\n // multiply matrix directly\r\n if(a instanceof SVG.Matrix){\r\n\r\n if(a.relative){\r\n at = at.multiply(new SVG.Matrix().morph(a).at(s.ease(this.pos)))\r\n }else{\r\n at = at.morph(a).at(s.ease(this.pos))\r\n }\r\n continue\r\n }\r\n\r\n // when transformation is absolute we have to reset the needed transformation first\r\n if(!a.relative)\r\n a.undo(at.extract())\r\n\r\n // and reapply it after\r\n at = at.multiply(a.at(s.ease(this.pos)))\r\n\r\n }\r\n\r\n // set new matrix on element\r\n target.matrix(at)\r\n }\r\n\r\n return this\r\n\r\n }\r\n\r\n\r\n // adds an once-callback which is called at a specific position and never again\r\n , once: function(pos, fn, isEased){\r\n var c = this.last()\r\n if(!isEased) pos = c.ease(pos)\r\n\r\n c.once[pos] = fn\r\n\r\n return this\r\n }\r\n\r\n , _callStart: function() {\r\n setTimeout(function(){this.start()}.bind(this), 0)\r\n return this\r\n }\r\n\r\n }\r\n\r\n, parent: SVG.Element\r\n\r\n // Add method to parent elements\r\n, construct: {\r\n // Get fx module or create a new one, then animate with given duration and ease\r\n animate: function(o, ease, delay) {\r\n return (this.fx || (this.fx = new SVG.FX(this))).animate(o, ease, delay)\r\n }\r\n , delay: function(delay){\r\n return (this.fx || (this.fx = new SVG.FX(this))).delay(delay)\r\n }\r\n , stop: function(jumpToEnd, clearQueue) {\r\n if (this.fx)\r\n this.fx.stop(jumpToEnd, clearQueue)\r\n\r\n return this\r\n }\r\n , finish: function() {\r\n if (this.fx)\r\n this.fx.finish()\r\n\r\n return this\r\n }\r\n // Pause current animation\r\n , pause: function() {\r\n if (this.fx)\r\n this.fx.pause()\r\n\r\n return this\r\n }\r\n // Play paused current animation\r\n , play: function() {\r\n if (this.fx)\r\n this.fx.play()\r\n\r\n return this\r\n }\r\n // Set/Get the speed of the animations\r\n , speed: function(speed) {\r\n if (this.fx)\r\n if (speed == null)\r\n return this.fx.speed()\r\n else\r\n this.fx.speed(speed)\r\n\r\n return this\r\n }\r\n }\r\n\r\n})\r\n\r\n// MorphObj is used whenever no morphable object is given\r\nSVG.MorphObj = SVG.invent({\r\n\r\n create: function(from, to){\r\n // prepare color for morphing\r\n if(SVG.Color.isColor(to)) return new SVG.Color(from).morph(to)\r\n // check if we have a list of values\r\n if(SVG.regex.delimiter.test(from)) {\r\n // prepare path for morphing\r\n if(SVG.regex.pathLetters.test(from)) return new SVG.PathArray(from).morph(to)\r\n // prepare value list for morphing\r\n else return new SVG.Array(from).morph(to)\r\n }\r\n // prepare number for morphing\r\n if(SVG.regex.numberAndUnit.test(to)) return new SVG.Number(from).morph(to)\r\n\r\n // prepare for plain morphing\r\n this.value = from\r\n this.destination = to\r\n }\r\n\r\n, extend: {\r\n at: function(pos, real){\r\n return real < 1 ? this.value : this.destination\r\n },\r\n\r\n valueOf: function(){\r\n return this.value\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.FX, {\r\n // Add animatable attributes\r\n attr: function(a, v, relative) {\r\n // apply attributes individually\r\n if (typeof a == 'object') {\r\n for (var key in a)\r\n this.attr(key, a[key])\r\n\r\n } else {\r\n this.add(a, v, 'attrs')\r\n }\r\n\r\n return this\r\n }\r\n // Add animatable styles\r\n, style: function(s, v) {\r\n if (typeof s == 'object')\r\n for (var key in s)\r\n this.style(key, s[key])\r\n\r\n else\r\n this.add(s, v, 'styles')\r\n\r\n return this\r\n }\r\n // Animatable x-axis\r\n, x: function(x, relative) {\r\n if(this.target() instanceof SVG.G){\r\n this.transform({x:x}, relative)\r\n return this\r\n }\r\n\r\n var num = new SVG.Number(x)\r\n num.relative = relative\r\n return this.add('x', num)\r\n }\r\n // Animatable y-axis\r\n, y: function(y, relative) {\r\n if(this.target() instanceof SVG.G){\r\n this.transform({y:y}, relative)\r\n return this\r\n }\r\n\r\n var num = new SVG.Number(y)\r\n num.relative = relative\r\n return this.add('y', num)\r\n }\r\n // Animatable center x-axis\r\n, cx: function(x) {\r\n return this.add('cx', new SVG.Number(x))\r\n }\r\n // Animatable center y-axis\r\n, cy: function(y) {\r\n return this.add('cy', new SVG.Number(y))\r\n }\r\n // Add animatable move\r\n, move: function(x, y) {\r\n return this.x(x).y(y)\r\n }\r\n // Add animatable center\r\n, center: function(x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n // Add animatable size\r\n, size: function(width, height) {\r\n if (this.target() instanceof SVG.Text) {\r\n // animate font size for Text elements\r\n this.attr('font-size', width)\r\n\r\n } else {\r\n // animate bbox based size for all other elements\r\n var box\r\n\r\n if(!width || !height){\r\n box = this.target().bbox()\r\n }\r\n\r\n if(!width){\r\n width = box.width / box.height * height\r\n }\r\n\r\n if(!height){\r\n height = box.height / box.width * width\r\n }\r\n\r\n this.add('width' , new SVG.Number(width))\r\n .add('height', new SVG.Number(height))\r\n\r\n }\r\n\r\n return this\r\n }\r\n // Add animatable width\r\n, width: function(width) {\r\n return this.add('width', new SVG.Number(width))\r\n }\r\n // Add animatable height\r\n, height: function(height) {\r\n return this.add('height', new SVG.Number(height))\r\n }\r\n // Add animatable plot\r\n, plot: function(a, b, c, d) {\r\n // Lines can be plotted with 4 arguments\r\n if(arguments.length == 4) {\r\n return this.plot([a, b, c, d])\r\n }\r\n\r\n return this.add('plot', new (this.target().morphArray)(a))\r\n }\r\n // Add leading method\r\n, leading: function(value) {\r\n return this.target().leading ?\r\n this.add('leading', new SVG.Number(value)) :\r\n this\r\n }\r\n // Add animatable viewbox\r\n, viewbox: function(x, y, width, height) {\r\n if (this.target() instanceof SVG.Container) {\r\n this.add('viewbox', new SVG.ViewBox(x, y, width, height))\r\n }\r\n\r\n return this\r\n }\r\n, update: function(o) {\r\n if (this.target() instanceof SVG.Stop) {\r\n if (typeof o == 'number' || o instanceof SVG.Number) {\r\n return this.update({\r\n offset: arguments[0]\r\n , color: arguments[1]\r\n , opacity: arguments[2]\r\n })\r\n }\r\n\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', o.offset)\r\n }\r\n\r\n return this\r\n }\r\n})\r\n\nSVG.Box = SVG.invent({\r\n create: function(x, y, width, height) {\r\n if (typeof x == 'object' && !(x instanceof SVG.Element)) {\r\n // chromes getBoundingClientRect has no x and y property\r\n return SVG.Box.call(this, x.left != null ? x.left : x.x , x.top != null ? x.top : x.y, x.width, x.height)\r\n } else if (arguments.length == 4) {\r\n this.x = x\r\n this.y = y\r\n this.width = width\r\n this.height = height\r\n }\r\n\r\n // add center, right, bottom...\r\n fullBox(this)\r\n }\r\n, extend: {\r\n // Merge rect box with another, return a new instance\r\n merge: function(box) {\r\n var b = new this.constructor()\r\n\r\n // merge boxes\r\n b.x = Math.min(this.x, box.x)\r\n b.y = Math.min(this.y, box.y)\r\n b.width = Math.max(this.x + this.width, box.x + box.width) - b.x\r\n b.height = Math.max(this.y + this.height, box.y + box.height) - b.y\r\n\r\n return fullBox(b)\r\n }\r\n\r\n , transform: function(m) {\r\n var xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, p, bbox\r\n\r\n var pts = [\r\n new SVG.Point(this.x, this.y),\r\n new SVG.Point(this.x2, this.y),\r\n new SVG.Point(this.x, this.y2),\r\n new SVG.Point(this.x2, this.y2)\r\n ]\r\n\r\n pts.forEach(function(p) {\r\n p = p.transform(m)\r\n xMin = Math.min(xMin,p.x)\r\n xMax = Math.max(xMax,p.x)\r\n yMin = Math.min(yMin,p.y)\r\n yMax = Math.max(yMax,p.y)\r\n })\r\n\r\n bbox = new this.constructor()\r\n bbox.x = xMin\r\n bbox.width = xMax-xMin\r\n bbox.y = yMin\r\n bbox.height = yMax-yMin\r\n\r\n fullBox(bbox)\r\n\r\n return bbox\r\n }\r\n }\r\n})\r\n\r\nSVG.BBox = SVG.invent({\r\n // Initialize\r\n create: function(element) {\r\n SVG.Box.apply(this, [].slice.call(arguments))\r\n\r\n // get values if element is given\r\n if (element instanceof SVG.Element) {\r\n var box\r\n\r\n // yes this is ugly, but Firefox can be a pain when it comes to elements that are not yet rendered\r\n try {\r\n\r\n if (!document.documentElement.contains){\r\n // This is IE - it does not support contains() for top-level SVGs\r\n var topParent = element.node\r\n while (topParent.parentNode){\r\n topParent = topParent.parentNode\r\n }\r\n if (topParent != document) throw new Exception('Element not in the dom')\r\n } else {\r\n // the element is NOT in the dom, throw error\r\n if(!document.documentElement.contains(element.node)) throw new Exception('Element not in the dom')\r\n }\r\n\r\n // find native bbox\r\n box = element.node.getBBox()\r\n } catch(e) {\r\n if(element instanceof SVG.Shape){\r\n var clone = element.clone(SVG.parser.draw.instance).show()\r\n box = clone.node.getBBox()\r\n clone.remove()\r\n }else{\r\n box = {\r\n x: element.node.clientLeft\r\n , y: element.node.clientTop\r\n , width: element.node.clientWidth\r\n , height: element.node.clientHeight\r\n }\r\n }\r\n }\r\n\r\n SVG.Box.call(this, box)\r\n }\r\n\r\n }\r\n\r\n // Define ancestor\r\n, inherit: SVG.Box\r\n\r\n // Define Parent\r\n, parent: SVG.Element\r\n\r\n // Constructor\r\n, construct: {\r\n // Get bounding box\r\n bbox: function() {\r\n return new SVG.BBox(this)\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.BBox.prototype.constructor = SVG.BBox\r\n\r\n\r\nSVG.extend(SVG.Element, {\r\n tbox: function(){\r\n console.warn('Use of TBox is deprecated and mapped to RBox. Use .rbox() instead.')\r\n return this.rbox(this.doc())\r\n }\r\n})\r\n\r\nSVG.RBox = SVG.invent({\r\n // Initialize\r\n create: function(element) {\r\n SVG.Box.apply(this, [].slice.call(arguments))\r\n\r\n if (element instanceof SVG.Element) {\r\n SVG.Box.call(this, element.node.getBoundingClientRect())\r\n }\r\n }\r\n\r\n, inherit: SVG.Box\r\n\r\n // define Parent\r\n, parent: SVG.Element\r\n\r\n, extend: {\r\n addOffset: function() {\r\n // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\r\n this.x += window.pageXOffset\r\n this.y += window.pageYOffset\r\n return this\r\n }\r\n }\r\n\r\n // Constructor\r\n, construct: {\r\n // Get rect box\r\n rbox: function(el) {\r\n if (el) return new SVG.RBox(this).transform(el.screenCTM().inverse())\r\n return new SVG.RBox(this).addOffset()\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.RBox.prototype.constructor = SVG.RBox\r\n\nSVG.Matrix = SVG.invent({\r\n // Initialize\r\n create: function(source) {\r\n var i, base = arrayToMatrix([1, 0, 0, 1, 0, 0])\r\n\r\n // ensure source as object\r\n source = source instanceof SVG.Element ?\r\n source.matrixify() :\r\n typeof source === 'string' ?\r\n arrayToMatrix(source.split(SVG.regex.delimiter).map(parseFloat)) :\r\n arguments.length == 6 ?\r\n arrayToMatrix([].slice.call(arguments)) :\r\n Array.isArray(source) ?\r\n arrayToMatrix(source) :\r\n typeof source === 'object' ?\r\n source : base\r\n\r\n // merge source\r\n for (i = abcdef.length - 1; i >= 0; --i)\r\n this[abcdef[i]] = source[abcdef[i]] != null ?\r\n source[abcdef[i]] : base[abcdef[i]]\r\n }\r\n\r\n // Add methods\r\n, extend: {\r\n // Extract individual transformations\r\n extract: function() {\r\n // find delta transform points\r\n var px = deltaTransformPoint(this, 0, 1)\r\n , py = deltaTransformPoint(this, 1, 0)\r\n , skewX = 180 / Math.PI * Math.atan2(px.y, px.x) - 90\r\n\r\n return {\r\n // translation\r\n x: this.e\r\n , y: this.f\r\n , transformedX:(this.e * Math.cos(skewX * Math.PI / 180) + this.f * Math.sin(skewX * Math.PI / 180)) / Math.sqrt(this.a * this.a + this.b * this.b)\r\n , transformedY:(this.f * Math.cos(skewX * Math.PI / 180) + this.e * Math.sin(-skewX * Math.PI / 180)) / Math.sqrt(this.c * this.c + this.d * this.d)\r\n // skew\r\n , skewX: -skewX\r\n , skewY: 180 / Math.PI * Math.atan2(py.y, py.x)\r\n // scale\r\n , scaleX: Math.sqrt(this.a * this.a + this.b * this.b)\r\n , scaleY: Math.sqrt(this.c * this.c + this.d * this.d)\r\n // rotation\r\n , rotation: skewX\r\n , a: this.a\r\n , b: this.b\r\n , c: this.c\r\n , d: this.d\r\n , e: this.e\r\n , f: this.f\r\n , matrix: new SVG.Matrix(this)\r\n }\r\n }\r\n // Clone matrix\r\n , clone: function() {\r\n return new SVG.Matrix(this)\r\n }\r\n // Morph one matrix into another\r\n , morph: function(matrix) {\r\n // store new destination\r\n this.destination = new SVG.Matrix(matrix)\r\n\r\n return this\r\n }\r\n // Get morphed matrix at a given position\r\n , at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // calculate morphed matrix at a given position\r\n var matrix = new SVG.Matrix({\r\n a: this.a + (this.destination.a - this.a) * pos\r\n , b: this.b + (this.destination.b - this.b) * pos\r\n , c: this.c + (this.destination.c - this.c) * pos\r\n , d: this.d + (this.destination.d - this.d) * pos\r\n , e: this.e + (this.destination.e - this.e) * pos\r\n , f: this.f + (this.destination.f - this.f) * pos\r\n })\r\n\r\n return matrix\r\n }\r\n // Multiplies by given matrix\r\n , multiply: function(matrix) {\r\n return new SVG.Matrix(this.native().multiply(parseMatrix(matrix).native()))\r\n }\r\n // Inverses matrix\r\n , inverse: function() {\r\n return new SVG.Matrix(this.native().inverse())\r\n }\r\n // Translate matrix\r\n , translate: function(x, y) {\r\n return new SVG.Matrix(this.native().translate(x || 0, y || 0))\r\n }\r\n // Scale matrix\r\n , scale: function(x, y, cx, cy) {\r\n // support uniformal scale\r\n if (arguments.length == 1) {\r\n y = x\r\n } else if (arguments.length == 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n return this.around(cx, cy, new SVG.Matrix(x, 0, 0, y, 0, 0))\r\n }\r\n // Rotate matrix\r\n , rotate: function(r, cx, cy) {\r\n // convert degrees to radians\r\n r = SVG.utils.radians(r)\r\n\r\n return this.around(cx, cy, new SVG.Matrix(Math.cos(r), Math.sin(r), -Math.sin(r), Math.cos(r), 0, 0))\r\n }\r\n // Flip matrix on x or y, at a given offset\r\n , flip: function(a, o) {\r\n return a == 'x' ?\r\n this.scale(-1, 1, o, 0) :\r\n a == 'y' ?\r\n this.scale(1, -1, 0, o) :\r\n this.scale(-1, -1, a, o != null ? o : a)\r\n }\r\n // Skew\r\n , skew: function(x, y, cx, cy) {\r\n // support uniformal skew\r\n if (arguments.length == 1) {\r\n y = x\r\n } else if (arguments.length == 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n // convert degrees to radians\r\n x = SVG.utils.radians(x)\r\n y = SVG.utils.radians(y)\r\n\r\n return this.around(cx, cy, new SVG.Matrix(1, Math.tan(y), Math.tan(x), 1, 0, 0))\r\n }\r\n // SkewX\r\n , skewX: function(x, cx, cy) {\r\n return this.skew(x, 0, cx, cy)\r\n }\r\n // SkewY\r\n , skewY: function(y, cx, cy) {\r\n return this.skew(0, y, cx, cy)\r\n }\r\n // Transform around a center point\r\n , around: function(cx, cy, matrix) {\r\n return this\r\n .multiply(new SVG.Matrix(1, 0, 0, 1, cx || 0, cy || 0))\r\n .multiply(matrix)\r\n .multiply(new SVG.Matrix(1, 0, 0, 1, -cx || 0, -cy || 0))\r\n }\r\n // Convert to native SVGMatrix\r\n , native: function() {\r\n // create new matrix\r\n var matrix = SVG.parser.native.createSVGMatrix()\r\n\r\n // update with current values\r\n for (var i = abcdef.length - 1; i >= 0; i--)\r\n matrix[abcdef[i]] = this[abcdef[i]]\r\n\r\n return matrix\r\n }\r\n // Convert matrix to string\r\n , toString: function() {\r\n // Construct the matrix directly, avoid values that are too small\r\n return 'matrix(' + float32String(this.a) + ',' + float32String(this.b)\r\n + ',' + float32String(this.c) + ',' + float32String(this.d)\r\n + ',' + float32String(this.e) + ',' + float32String(this.f)\r\n + ')'\r\n }\r\n }\r\n\r\n // Define parent\r\n, parent: SVG.Element\r\n\r\n // Add parent method\r\n, construct: {\r\n // Get current matrix\r\n ctm: function() {\r\n return new SVG.Matrix(this.node.getCTM())\r\n },\r\n // Get current screen matrix\r\n screenCTM: function() {\r\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\r\n This is needed because FF does not return the transformation matrix\r\n for the inner coordinate system when getScreenCTM() is called on nested svgs.\r\n However all other Browsers do that */\r\n if(this instanceof SVG.Nested) {\r\n var rect = this.rect(1,1)\r\n var m = rect.node.getScreenCTM()\r\n rect.remove()\r\n return new SVG.Matrix(m)\r\n }\r\n return new SVG.Matrix(this.node.getScreenCTM())\r\n }\r\n\r\n }\r\n\r\n})\r\n\nSVG.Point = SVG.invent({\r\n // Initialize\r\n create: function(x,y) {\r\n var i, source, base = {x:0, y:0}\r\n\r\n // ensure source as object\r\n source = Array.isArray(x) ?\r\n {x:x[0], y:x[1]} :\r\n typeof x === 'object' ?\r\n {x:x.x, y:x.y} :\r\n x != null ?\r\n {x:x, y:(y != null ? y : x)} : base // If y has no value, then x is used has its value\r\n\r\n // merge source\r\n this.x = source.x\r\n this.y = source.y\r\n }\r\n\r\n // Add methods\r\n, extend: {\r\n // Clone point\r\n clone: function() {\r\n return new SVG.Point(this)\r\n }\r\n // Morph one point into another\r\n , morph: function(x, y) {\r\n // store new destination\r\n this.destination = new SVG.Point(x, y)\r\n\r\n return this\r\n }\r\n // Get morphed point at a given position\r\n , at: function(pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // calculate morphed matrix at a given position\r\n var point = new SVG.Point({\r\n x: this.x + (this.destination.x - this.x) * pos\r\n , y: this.y + (this.destination.y - this.y) * pos\r\n })\r\n\r\n return point\r\n }\r\n // Convert to native SVGPoint\r\n , native: function() {\r\n // create new point\r\n var point = SVG.parser.native.createSVGPoint()\r\n\r\n // update with current values\r\n point.x = this.x\r\n point.y = this.y\r\n\r\n return point\r\n }\r\n // transform point with matrix\r\n , transform: function(matrix) {\r\n return new SVG.Point(this.native().matrixTransform(matrix.native()))\r\n }\r\n\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.Element, {\r\n\r\n // Get point\r\n point: function(x, y) {\r\n return new SVG.Point(x,y).transform(this.screenCTM().inverse());\r\n }\r\n\r\n})\r\n\nSVG.extend(SVG.Element, {\r\n // Set svg element attribute\r\n attr: function(a, v, n) {\r\n // act as full getter\r\n if (a == null) {\r\n // get an object of attributes\r\n a = {}\r\n v = this.node.attributes\r\n for (n = v.length - 1; n >= 0; n--)\r\n a[v[n].nodeName] = SVG.regex.isNumber.test(v[n].nodeValue) ? parseFloat(v[n].nodeValue) : v[n].nodeValue\r\n\r\n return a\r\n\r\n } else if (typeof a == 'object') {\r\n // apply every attribute individually if an object is passed\r\n for (v in a) this.attr(v, a[v])\r\n\r\n } else if (v === null) {\r\n // remove value\r\n this.node.removeAttribute(a)\r\n\r\n } else if (v == null) {\r\n // act as a getter if the first and only argument is not an object\r\n v = this.node.getAttribute(a)\r\n return v == null ?\r\n SVG.defaults.attrs[a] :\r\n SVG.regex.isNumber.test(v) ?\r\n parseFloat(v) : v\r\n\r\n } else {\r\n // BUG FIX: some browsers will render a stroke if a color is given even though stroke width is 0\r\n if (a == 'stroke-width')\r\n this.attr('stroke', parseFloat(v) > 0 ? this._stroke : null)\r\n else if (a == 'stroke')\r\n this._stroke = v\r\n\r\n // convert image fill and stroke to patterns\r\n if (a == 'fill' || a == 'stroke') {\r\n if (SVG.regex.isImage.test(v))\r\n v = this.doc().defs().image(v, 0, 0)\r\n\r\n if (v instanceof SVG.Image)\r\n v = this.doc().defs().pattern(0, 0, function() {\r\n this.add(v)\r\n })\r\n }\r\n\r\n // ensure correct numeric values (also accepts NaN and Infinity)\r\n if (typeof v === 'number')\r\n v = new SVG.Number(v)\r\n\r\n // ensure full hex color\r\n else if (SVG.Color.isColor(v))\r\n v = new SVG.Color(v)\r\n\r\n // parse array values\r\n else if (Array.isArray(v))\r\n v = new SVG.Array(v)\r\n\r\n // if the passed attribute is leading...\r\n if (a == 'leading') {\r\n // ... call the leading method instead\r\n if (this.leading)\r\n this.leading(v)\r\n } else {\r\n // set given attribute on node\r\n typeof n === 'string' ?\r\n this.node.setAttributeNS(n, a, v.toString()) :\r\n this.node.setAttribute(a, v.toString())\r\n }\r\n\r\n // rebuild if required\r\n if (this.rebuild && (a == 'font-size' || a == 'x'))\r\n this.rebuild(a, v)\r\n }\r\n\r\n return this\r\n }\r\n})\nSVG.extend(SVG.Element, {\r\n // Add transformations\r\n transform: function(o, relative) {\r\n // get target in case of the fx module, otherwise reference this\r\n var target = this\r\n , matrix, bbox\r\n\r\n // act as a getter\r\n if (typeof o !== 'object') {\r\n // get current matrix\r\n matrix = new SVG.Matrix(target).extract()\r\n\r\n return typeof o === 'string' ? matrix[o] : matrix\r\n }\r\n\r\n // get current matrix\r\n matrix = new SVG.Matrix(target)\r\n\r\n // ensure relative flag\r\n relative = !!relative || !!o.relative\r\n\r\n // act on matrix\r\n if (o.a != null) {\r\n matrix = relative ?\r\n // relative\r\n matrix.multiply(new SVG.Matrix(o)) :\r\n // absolute\r\n new SVG.Matrix(o)\r\n\r\n // act on rotation\r\n } else if (o.rotation != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // apply transformation\r\n matrix = relative ?\r\n // relative\r\n matrix.rotate(o.rotation, o.cx, o.cy) :\r\n // absolute\r\n matrix.rotate(o.rotation - matrix.extract().rotation, o.cx, o.cy)\r\n\r\n // act on scale\r\n } else if (o.scale != null || o.scaleX != null || o.scaleY != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // ensure scale values on both axes\r\n o.scaleX = o.scale != null ? o.scale : o.scaleX != null ? o.scaleX : 1\r\n o.scaleY = o.scale != null ? o.scale : o.scaleY != null ? o.scaleY : 1\r\n\r\n if (!relative) {\r\n // absolute; multiply inversed values\r\n var e = matrix.extract()\r\n o.scaleX = o.scaleX * 1 / e.scaleX\r\n o.scaleY = o.scaleY * 1 / e.scaleY\r\n }\r\n\r\n matrix = matrix.scale(o.scaleX, o.scaleY, o.cx, o.cy)\r\n\r\n // act on skew\r\n } else if (o.skew != null || o.skewX != null || o.skewY != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // ensure skew values on both axes\r\n o.skewX = o.skew != null ? o.skew : o.skewX != null ? o.skewX : 0\r\n o.skewY = o.skew != null ? o.skew : o.skewY != null ? o.skewY : 0\r\n\r\n if (!relative) {\r\n // absolute; reset skew values\r\n var e = matrix.extract()\r\n matrix = matrix.multiply(new SVG.Matrix().skew(e.skewX, e.skewY, o.cx, o.cy).inverse())\r\n }\r\n\r\n matrix = matrix.skew(o.skewX, o.skewY, o.cx, o.cy)\r\n\r\n // act on flip\r\n } else if (o.flip) {\r\n if(o.flip == 'x' || o.flip == 'y') {\r\n o.offset = o.offset == null ? target.bbox()['c' + o.flip] : o.offset\r\n } else {\r\n if(o.offset == null) {\r\n bbox = target.bbox()\r\n o.flip = bbox.cx\r\n o.offset = bbox.cy\r\n } else {\r\n o.flip = o.offset\r\n }\r\n }\r\n\r\n matrix = new SVG.Matrix().flip(o.flip, o.offset)\r\n\r\n // act on translate\r\n } else if (o.x != null || o.y != null) {\r\n if (relative) {\r\n // relative\r\n matrix = matrix.translate(o.x, o.y)\r\n } else {\r\n // absolute\r\n if (o.x != null) matrix.e = o.x\r\n if (o.y != null) matrix.f = o.y\r\n }\r\n }\r\n\r\n return this.attr('transform', matrix)\r\n }\r\n})\r\n\r\nSVG.extend(SVG.FX, {\r\n transform: function(o, relative) {\r\n // get target in case of the fx module, otherwise reference this\r\n var target = this.target()\r\n , matrix, bbox\r\n\r\n // act as a getter\r\n if (typeof o !== 'object') {\r\n // get current matrix\r\n matrix = new SVG.Matrix(target).extract()\r\n\r\n return typeof o === 'string' ? matrix[o] : matrix\r\n }\r\n\r\n // ensure relative flag\r\n relative = !!relative || !!o.relative\r\n\r\n // act on matrix\r\n if (o.a != null) {\r\n matrix = new SVG.Matrix(o)\r\n\r\n // act on rotation\r\n } else if (o.rotation != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // apply transformation\r\n matrix = new SVG.Rotate(o.rotation, o.cx, o.cy)\r\n\r\n // act on scale\r\n } else if (o.scale != null || o.scaleX != null || o.scaleY != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // ensure scale values on both axes\r\n o.scaleX = o.scale != null ? o.scale : o.scaleX != null ? o.scaleX : 1\r\n o.scaleY = o.scale != null ? o.scale : o.scaleY != null ? o.scaleY : 1\r\n\r\n matrix = new SVG.Scale(o.scaleX, o.scaleY, o.cx, o.cy)\r\n\r\n // act on skew\r\n } else if (o.skewX != null || o.skewY != null) {\r\n // ensure centre point\r\n ensureCentre(o, target)\r\n\r\n // ensure skew values on both axes\r\n o.skewX = o.skewX != null ? o.skewX : 0\r\n o.skewY = o.skewY != null ? o.skewY : 0\r\n\r\n matrix = new SVG.Skew(o.skewX, o.skewY, o.cx, o.cy)\r\n\r\n // act on flip\r\n } else if (o.flip) {\r\n if(o.flip == 'x' || o.flip == 'y') {\r\n o.offset = o.offset == null ? target.bbox()['c' + o.flip] : o.offset\r\n } else {\r\n if(o.offset == null) {\r\n bbox = target.bbox()\r\n o.flip = bbox.cx\r\n o.offset = bbox.cy\r\n } else {\r\n o.flip = o.offset\r\n }\r\n }\r\n\r\n matrix = new SVG.Matrix().flip(o.flip, o.offset)\r\n\r\n // act on translate\r\n } else if (o.x != null || o.y != null) {\r\n matrix = new SVG.Translate(o.x, o.y)\r\n }\r\n\r\n if(!matrix) return this\r\n\r\n matrix.relative = relative\r\n\r\n this.last().transforms.push(matrix)\r\n\r\n return this._callStart()\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Element, {\r\n // Reset all transformations\r\n untransform: function() {\r\n return this.attr('transform', null)\r\n },\r\n // merge the whole transformation chain into one matrix and returns it\r\n matrixify: function() {\r\n\r\n var matrix = (this.attr('transform') || '')\r\n // split transformations\r\n .split(SVG.regex.transforms).slice(0,-1).map(function(str){\r\n // generate key => value pairs\r\n var kv = str.trim().split('(')\r\n return [kv[0], kv[1].split(SVG.regex.delimiter).map(function(str){ return parseFloat(str) })]\r\n })\r\n // merge every transformation into one matrix\r\n .reduce(function(matrix, transform){\r\n\r\n if(transform[0] == 'matrix') return matrix.multiply(arrayToMatrix(transform[1]))\r\n return matrix[transform[0]].apply(matrix, transform[1])\r\n\r\n }, new SVG.Matrix())\r\n\r\n return matrix\r\n },\r\n // add an element to another parent without changing the visual representation on the screen\r\n toParent: function(parent) {\r\n if(this == parent) return this\r\n var ctm = this.screenCTM()\r\n var pCtm = parent.screenCTM().inverse()\r\n\r\n this.addTo(parent).untransform().transform(pCtm.multiply(ctm))\r\n\r\n return this\r\n },\r\n // same as above with parent equals root-svg\r\n toDoc: function() {\r\n return this.toParent(this.doc())\r\n }\r\n\r\n})\r\n\r\nSVG.Transformation = SVG.invent({\r\n\r\n create: function(source, inversed){\r\n\r\n if(arguments.length > 1 && typeof inversed != 'boolean'){\r\n return this.constructor.call(this, [].slice.call(arguments))\r\n }\r\n\r\n if(Array.isArray(source)){\r\n for(var i = 0, len = this.arguments.length; i < len; ++i){\r\n this[this.arguments[i]] = source[i]\r\n }\r\n } else if(typeof source == 'object'){\r\n for(var i = 0, len = this.arguments.length; i < len; ++i){\r\n this[this.arguments[i]] = source[this.arguments[i]]\r\n }\r\n }\r\n\r\n this.inversed = false\r\n\r\n if(inversed === true){\r\n this.inversed = true\r\n }\r\n\r\n }\r\n\r\n, extend: {\r\n\r\n arguments: []\r\n , method: ''\r\n\r\n , at: function(pos){\r\n\r\n var params = []\r\n\r\n for(var i = 0, len = this.arguments.length; i < len; ++i){\r\n params.push(this[this.arguments[i]])\r\n }\r\n\r\n var m = this._undo || new SVG.Matrix()\r\n\r\n m = new SVG.Matrix().morph(SVG.Matrix.prototype[this.method].apply(m, params)).at(pos)\r\n\r\n return this.inversed ? m.inverse() : m\r\n\r\n }\r\n\r\n , undo: function(o){\r\n for(var i = 0, len = this.arguments.length; i < len; ++i){\r\n o[this.arguments[i]] = typeof this[this.arguments[i]] == 'undefined' ? 0 : o[this.arguments[i]]\r\n }\r\n\r\n // The method SVG.Matrix.extract which was used before calling this\r\n // method to obtain a value for the parameter o doesn't return a cx and\r\n // a cy so we use the ones that were provided to this object at its creation\r\n o.cx = this.cx\r\n o.cy = this.cy\r\n\r\n this._undo = new SVG[capitalize(this.method)](o, true).at(1)\r\n\r\n return this\r\n }\r\n\r\n }\r\n\r\n})\r\n\r\nSVG.Translate = SVG.invent({\r\n\r\n parent: SVG.Matrix\r\n, inherit: SVG.Transformation\r\n\r\n, create: function(source, inversed){\r\n this.constructor.apply(this, [].slice.call(arguments))\r\n }\r\n\r\n, extend: {\r\n arguments: ['transformedX', 'transformedY']\r\n , method: 'translate'\r\n }\r\n\r\n})\r\n\r\nSVG.Rotate = SVG.invent({\r\n\r\n parent: SVG.Matrix\r\n, inherit: SVG.Transformation\r\n\r\n, create: function(source, inversed){\r\n this.constructor.apply(this, [].slice.call(arguments))\r\n }\r\n\r\n, extend: {\r\n arguments: ['rotation', 'cx', 'cy']\r\n , method: 'rotate'\r\n , at: function(pos){\r\n var m = new SVG.Matrix().rotate(new SVG.Number().morph(this.rotation - (this._undo ? this._undo.rotation : 0)).at(pos), this.cx, this.cy)\r\n return this.inversed ? m.inverse() : m\r\n }\r\n , undo: function(o){\r\n this._undo = o\r\n return this\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.Scale = SVG.invent({\r\n\r\n parent: SVG.Matrix\r\n, inherit: SVG.Transformation\r\n\r\n, create: function(source, inversed){\r\n this.constructor.apply(this, [].slice.call(arguments))\r\n }\r\n\r\n, extend: {\r\n arguments: ['scaleX', 'scaleY', 'cx', 'cy']\r\n , method: 'scale'\r\n }\r\n\r\n})\r\n\r\nSVG.Skew = SVG.invent({\r\n\r\n parent: SVG.Matrix\r\n, inherit: SVG.Transformation\r\n\r\n, create: function(source, inversed){\r\n this.constructor.apply(this, [].slice.call(arguments))\r\n }\r\n\r\n, extend: {\r\n arguments: ['skewX', 'skewY', 'cx', 'cy']\r\n , method: 'skew'\r\n }\r\n\r\n})\r\n\nSVG.extend(SVG.Element, {\r\n // Dynamic style generator\r\n style: function(s, v) {\r\n if (arguments.length == 0) {\r\n // get full style\r\n return this.node.style.cssText || ''\r\n\r\n } else if (arguments.length < 2) {\r\n // apply every style individually if an object is passed\r\n if (typeof s == 'object') {\r\n for (v in s) this.style(v, s[v])\r\n\r\n } else if (SVG.regex.isCss.test(s)) {\r\n // parse css string\r\n s = s.split(/\\s*;\\s*/)\r\n // filter out suffix ; and stuff like ;;\r\n .filter(function(e) { return !!e })\r\n .map(function(e){ return e.split(/\\s*:\\s*/) })\r\n\r\n // apply every definition individually\r\n while (v = s.pop()) {\r\n this.style(v[0], v[1])\r\n }\r\n } else {\r\n // act as a getter if the first and only argument is not an object\r\n return this.node.style[camelCase(s)]\r\n }\r\n\r\n } else {\r\n this.node.style[camelCase(s)] = v === null || SVG.regex.isBlank.test(v) ? '' : v\r\n }\r\n\r\n return this\r\n }\r\n})\nSVG.Parent = SVG.invent({\r\n // Initialize node\r\n create: function(element) {\r\n this.constructor.call(this, element)\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Element\r\n\r\n // Add class methods\r\n, extend: {\r\n // Returns all child elements\r\n children: function() {\r\n return SVG.utils.map(SVG.utils.filterSVGElements(this.node.childNodes), function(node) {\r\n return SVG.adopt(node)\r\n })\r\n }\r\n // Add given element at a position\r\n , add: function(element, i) {\r\n if (i == null)\r\n this.node.appendChild(element.node)\r\n else if (element.node != this.node.childNodes[i])\r\n this.node.insertBefore(element.node, this.node.childNodes[i])\r\n\r\n return this\r\n }\r\n // Basically does the same as `add()` but returns the added element instead\r\n , put: function(element, i) {\r\n this.add(element, i)\r\n return element\r\n }\r\n // Checks if the given element is a child\r\n , has: function(element) {\r\n return this.index(element) >= 0\r\n }\r\n // Gets index of given element\r\n , index: function(element) {\r\n return [].slice.call(this.node.childNodes).indexOf(element.node)\r\n }\r\n // Get a element at the given index\r\n , get: function(i) {\r\n return SVG.adopt(this.node.childNodes[i])\r\n }\r\n // Get first child\r\n , first: function() {\r\n return this.get(0)\r\n }\r\n // Get the last child\r\n , last: function() {\r\n return this.get(this.node.childNodes.length - 1)\r\n }\r\n // Iterates over all children and invokes a given block\r\n , each: function(block, deep) {\r\n var i, il\r\n , children = this.children()\r\n\r\n for (i = 0, il = children.length; i < il; i++) {\r\n if (children[i] instanceof SVG.Element)\r\n block.apply(children[i], [i, children])\r\n\r\n if (deep && (children[i] instanceof SVG.Container))\r\n children[i].each(block, deep)\r\n }\r\n\r\n return this\r\n }\r\n // Remove a given child\r\n , removeElement: function(element) {\r\n this.node.removeChild(element.node)\r\n\r\n return this\r\n }\r\n // Remove all elements in this container\r\n , clear: function() {\r\n // remove children\r\n while(this.node.hasChildNodes())\r\n this.node.removeChild(this.node.lastChild)\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n return this\r\n }\r\n , // Get defs\r\n defs: function() {\r\n return this.doc().defs()\r\n }\r\n }\r\n\r\n})\r\n\nSVG.extend(SVG.Parent, {\r\n\r\n ungroup: function(parent, depth) {\r\n if(depth === 0 || this instanceof SVG.Defs || this.node == SVG.parser.draw) return this\r\n\r\n parent = parent || (this instanceof SVG.Doc ? this : this.parent(SVG.Parent))\r\n depth = depth || Infinity\r\n\r\n this.each(function(){\r\n if(this instanceof SVG.Defs) return this\r\n if(this instanceof SVG.Parent) return this.ungroup(parent, depth-1)\r\n return this.toParent(parent)\r\n })\r\n\r\n this.node.firstChild || this.remove()\r\n\r\n return this\r\n },\r\n\r\n flatten: function(parent, depth) {\r\n return this.ungroup(parent, depth)\r\n }\r\n\r\n})\nSVG.Container = SVG.invent({\r\n // Initialize node\r\n create: function(element) {\r\n this.constructor.call(this, element)\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Parent\r\n\r\n})\n\r\nSVG.ViewBox = SVG.invent({\r\n\r\n create: function(source) {\r\n var i, base = [0, 0, 0, 0]\r\n\r\n var x, y, width, height, box, view, we, he\r\n , wm = 1 // width multiplier\r\n , hm = 1 // height multiplier\r\n , reg = /[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?/gi\r\n\r\n if(source instanceof SVG.Element){\r\n\r\n we = source\r\n he = source\r\n view = (source.attr('viewBox') || '').match(reg)\r\n box = source.bbox\r\n\r\n // get dimensions of current node\r\n width = new SVG.Number(source.width())\r\n height = new SVG.Number(source.height())\r\n\r\n // find nearest non-percentual dimensions\r\n while (width.unit == '%') {\r\n wm *= width.value\r\n width = new SVG.Number(we instanceof SVG.Doc ? we.parent().offsetWidth : we.parent().width())\r\n we = we.parent()\r\n }\r\n while (height.unit == '%') {\r\n hm *= height.value\r\n height = new SVG.Number(he instanceof SVG.Doc ? he.parent().offsetHeight : he.parent().height())\r\n he = he.parent()\r\n }\r\n\r\n // ensure defaults\r\n this.x = 0\r\n this.y = 0\r\n this.width = width * wm\r\n this.height = height * hm\r\n this.zoom = 1\r\n\r\n if (view) {\r\n // get width and height from viewbox\r\n x = parseFloat(view[0])\r\n y = parseFloat(view[1])\r\n width = parseFloat(view[2])\r\n height = parseFloat(view[3])\r\n\r\n // calculate zoom accoring to viewbox\r\n this.zoom = ((this.width / this.height) > (width / height)) ?\r\n this.height / height :\r\n this.width / width\r\n\r\n // calculate real pixel dimensions on parent SVG.Doc element\r\n this.x = x\r\n this.y = y\r\n this.width = width\r\n this.height = height\r\n\r\n }\r\n\r\n }else{\r\n\r\n // ensure source as object\r\n source = typeof source === 'string' ?\r\n source.match(reg).map(function(el){ return parseFloat(el) }) :\r\n Array.isArray(source) ?\r\n source :\r\n typeof source == 'object' ?\r\n [source.x, source.y, source.width, source.height] :\r\n arguments.length == 4 ?\r\n [].slice.call(arguments) :\r\n base\r\n\r\n this.x = source[0]\r\n this.y = source[1]\r\n this.width = source[2]\r\n this.height = source[3]\r\n }\r\n\r\n\r\n }\r\n\r\n, extend: {\r\n\r\n toString: function() {\r\n return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\r\n }\r\n , morph: function(x, y, width, height){\r\n this.destination = new SVG.ViewBox(x, y, width, height)\r\n return this\r\n }\r\n\r\n , at: function(pos) {\r\n\r\n if(!this.destination) return this\r\n\r\n return new SVG.ViewBox([\r\n this.x + (this.destination.x - this.x) * pos\r\n , this.y + (this.destination.y - this.y) * pos\r\n , this.width + (this.destination.width - this.width) * pos\r\n , this.height + (this.destination.height - this.height) * pos\r\n ])\r\n\r\n }\r\n\r\n }\r\n\r\n // Define parent\r\n, parent: SVG.Container\r\n\r\n // Add parent method\r\n, construct: {\r\n\r\n // get/set viewbox\r\n viewbox: function(x, y, width, height) {\r\n if (arguments.length == 0)\r\n // act as a getter if there are no arguments\r\n return new SVG.ViewBox(this)\r\n\r\n // otherwise act as a setter\r\n return this.attr('viewBox', new SVG.ViewBox(x, y, width, height))\r\n }\r\n\r\n }\r\n\r\n})\n// Add events to elements\r\n\r\n;[ 'click',\r\n 'dblclick',\r\n 'mousedown',\r\n 'mouseup',\r\n 'mouseover',\r\n 'mouseout',\r\n 'mousemove',\r\n 'mouseenter',\r\n 'mouseleave',\r\n 'touchstart',\r\n 'touchmove',\r\n 'touchleave',\r\n 'touchend',\r\n 'touchcancel' ].forEach(function (event) {\r\n // add event to SVG.Element\r\n SVG.Element.prototype[event] = function (f) {\r\n // bind event to element rather than element node\r\n if (f == null) {\r\n SVG.off(this, event)\r\n } else {\r\n SVG.on(this, event, f)\r\n }\r\n return this\r\n }\r\n })\r\n\r\nSVG.listenerId = 0\r\n\r\n// Add event binder in the SVG namespace\r\nSVG.on = function (node, events, listener, binding, options) {\r\n var l = listener.bind(binding || node)\r\n var n = node instanceof SVG.Element ? node.node : node\r\n\r\n // ensure instance object for nodes which are not adopted\r\n n.instance = n.instance || {_events: {}}\r\n\r\n var bag = n.instance._events\r\n\r\n // add id to listener\r\n if (!listener._svgjsListenerId) { listener._svgjsListenerId = ++SVG.listenerId }\r\n\r\n events.split(SVG.regex.delimiter).forEach(function (event) {\r\n var ev = event.split('.')[0]\r\n var ns = event.split('.')[1] || '*'\r\n\r\n // ensure valid object\r\n bag[ev] = bag[ev] || {}\r\n bag[ev][ns] = bag[ev][ns] || {}\r\n\r\n // reference listener\r\n bag[ev][ns][listener._svgjsListenerId] = l\r\n\r\n // add listener\r\n n.addEventListener(ev, l, options || false)\r\n })\r\n}\r\n\r\n// Add event unbinder in the SVG namespace\r\nSVG.off = function (node, events, listener, options) {\r\n var n = node instanceof SVG.Element ? node.node : node\r\n if (!n.instance) return\r\n\r\n // listener can be a function or a number\r\n if (typeof listener === 'function') {\r\n listener = listener._svgjsListenerId\r\n if (!listener) return\r\n }\r\n\r\n var bag = n.instance._events\r\n\r\n ;(events || '').split(SVG.regex.delimiter).forEach(function (event) {\r\n var ev = event && event.split('.')[0]\r\n var ns = event && event.split('.')[1]\r\n var namespace, l\r\n\r\n if (listener) {\r\n // remove listener reference\r\n if (bag[ev] && bag[ev][ns || '*']) {\r\n // removeListener\r\n n.removeEventListener(ev, bag[ev][ns || '*'][listener], options || false)\r\n\r\n delete bag[ev][ns || '*'][listener]\r\n }\r\n } else if (ev && ns) {\r\n // remove all listeners for a namespaced event\r\n if (bag[ev] && bag[ev][ns]) {\r\n for (l in bag[ev][ns]) { SVG.off(n, [ev, ns].join('.'), l) }\r\n\r\n delete bag[ev][ns]\r\n }\r\n } else if (ns) {\r\n // remove all listeners for a specific namespace\r\n for (event in bag) {\r\n for (namespace in bag[event]) {\r\n if (ns === namespace) { SVG.off(n, [event, ns].join('.')) }\r\n }\r\n }\r\n } else if (ev) {\r\n // remove all listeners for the event\r\n if (bag[ev]) {\r\n for (namespace in bag[ev]) { SVG.off(n, [ev, namespace].join('.')) }\r\n\r\n delete bag[ev]\r\n }\r\n } else {\r\n // remove all listeners on a given node\r\n for (event in bag) { SVG.off(n, event) }\r\n\r\n n.instance._events = {}\r\n }\r\n })\r\n}\r\n\r\nSVG.extend(SVG.Element, {\r\n // Bind given event to listener\r\n on: function (event, listener, binding, options) {\r\n SVG.on(this, event, listener, binding, options)\r\n return this\r\n },\r\n // Unbind event from listener\r\n off: function (event, listener) {\r\n SVG.off(this.node, event, listener)\r\n return this\r\n },\r\n fire: function (event, data) {\r\n // Dispatch event\r\n if (event instanceof window.Event) {\r\n this.node.dispatchEvent(event)\r\n } else {\r\n this.node.dispatchEvent(event = new SVG.CustomEvent(event, {detail: data, cancelable: true}))\r\n }\r\n this._event = event\r\n return this\r\n },\r\n event: function() {\r\n return this._event\r\n }\r\n})\r\n\n\r\nSVG.Defs = SVG.invent({\r\n // Initialize node\r\n create: 'defs'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n})\nSVG.G = SVG.invent({\r\n // Initialize node\r\n create: 'g'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Move over x-axis\r\n x: function(x) {\r\n return x == null ? this.transform('x') : this.transform({ x: x - this.x() }, true)\r\n }\r\n // Move over y-axis\r\n , y: function(y) {\r\n return y == null ? this.transform('y') : this.transform({ y: y - this.y() }, true)\r\n }\r\n // Move by center over x-axis\r\n , cx: function(x) {\r\n return x == null ? this.gbox().cx : this.x(x - this.gbox().width / 2)\r\n }\r\n // Move by center over y-axis\r\n , cy: function(y) {\r\n return y == null ? this.gbox().cy : this.y(y - this.gbox().height / 2)\r\n }\r\n , gbox: function() {\r\n\r\n var bbox = this.bbox()\r\n , trans = this.transform()\r\n\r\n bbox.x += trans.x\r\n bbox.x2 += trans.x\r\n bbox.cx += trans.x\r\n\r\n bbox.y += trans.y\r\n bbox.y2 += trans.y\r\n bbox.cy += trans.y\r\n\r\n return bbox\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a group element\r\n group: function() {\r\n return this.put(new SVG.G)\r\n }\r\n }\r\n})\r\n\nSVG.Doc = SVG.invent({\r\n // Initialize node\r\n create: function(element) {\r\n if (element) {\r\n // ensure the presence of a dom element\r\n element = typeof element == 'string' ?\r\n document.getElementById(element) :\r\n element\r\n\r\n // If the target is an svg element, use that element as the main wrapper.\r\n // This allows svg.js to work with svg documents as well.\r\n if (element.nodeName == 'svg') {\r\n this.constructor.call(this, element)\r\n } else {\r\n this.constructor.call(this, SVG.create('svg'))\r\n element.appendChild(this.node)\r\n this.size('100%', '100%')\r\n }\r\n\r\n // set svg element attributes and ensure defs node\r\n this.namespace().defs()\r\n }\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Add namespaces\r\n namespace: function() {\r\n return this\r\n .attr({ xmlns: SVG.ns, version: '1.1' })\r\n .attr('xmlns:xlink', SVG.xlink, SVG.xmlns)\r\n .attr('xmlns:svgjs', SVG.svgjs, SVG.xmlns)\r\n }\r\n // Creates and returns defs element\r\n , defs: function() {\r\n if (!this._defs) {\r\n var defs\r\n\r\n // Find or create a defs element in this instance\r\n if (defs = this.node.getElementsByTagName('defs')[0])\r\n this._defs = SVG.adopt(defs)\r\n else\r\n this._defs = new SVG.Defs\r\n\r\n // Make sure the defs node is at the end of the stack\r\n this.node.appendChild(this._defs.node)\r\n }\r\n\r\n return this._defs\r\n }\r\n // custom parent method\r\n , parent: function() {\r\n if(!this.node.parentNode || this.node.parentNode.nodeName == '#document' || this.node.parentNode.nodeName == '#document-fragment') return null\r\n return this.node.parentNode\r\n }\r\n // Fix for possible sub-pixel offset. See:\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=608812\r\n , spof: function() {\r\n var pos = this.node.getScreenCTM()\r\n\r\n if (pos)\r\n this\r\n .style('left', (-pos.e % 1) + 'px')\r\n .style('top', (-pos.f % 1) + 'px')\r\n\r\n return this\r\n }\r\n\r\n // Removes the doc from the DOM\r\n , remove: function() {\r\n if(this.parent()) {\r\n this.parent().removeChild(this.node)\r\n }\r\n\r\n return this\r\n }\r\n , clear: function() {\r\n // remove children\r\n while(this.node.hasChildNodes())\r\n this.node.removeChild(this.node.lastChild)\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n // add back parser\r\n if(!SVG.parser.draw.parentNode)\r\n this.node.appendChild(SVG.parser.draw)\r\n\r\n return this\r\n }\r\n , clone: function (parent) {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // get reference to node\r\n var node = this.node\r\n\r\n // clone element and assign new id\r\n var clone = assignNewId(node.cloneNode(true))\r\n\r\n // insert the clone in the given parent or after myself\r\n if(parent) {\r\n (parent.node || parent).appendChild(clone.node)\r\n } else {\r\n node.parentNode.insertBefore(clone.node, node.nextSibling)\r\n }\r\n\r\n return clone\r\n }\r\n }\r\n\r\n})\r\n\n// ### This module adds backward / forward functionality to elements.\r\n\r\n//\r\nSVG.extend(SVG.Element, {\r\n // Get all siblings, including myself\r\n siblings: function() {\r\n return this.parent().children()\r\n }\r\n // Get the curent position siblings\r\n, position: function() {\r\n return this.parent().index(this)\r\n }\r\n // Get the next element (will return null if there is none)\r\n, next: function() {\r\n return this.siblings()[this.position() + 1]\r\n }\r\n // Get the next element (will return null if there is none)\r\n, previous: function() {\r\n return this.siblings()[this.position() - 1]\r\n }\r\n // Send given element one step forward\r\n, forward: function() {\r\n var i = this.position() + 1\r\n , p = this.parent()\r\n\r\n // move node one step forward\r\n p.removeElement(this).add(this, i)\r\n\r\n // make sure defs node is always at the top\r\n if (p instanceof SVG.Doc)\r\n p.node.appendChild(p.defs().node)\r\n\r\n return this\r\n }\r\n // Send given element one step backward\r\n, backward: function() {\r\n var i = this.position()\r\n\r\n if (i > 0)\r\n this.parent().removeElement(this).add(this, i - 1)\r\n\r\n return this\r\n }\r\n // Send given element all the way to the front\r\n, front: function() {\r\n var p = this.parent()\r\n\r\n // Move node forward\r\n p.node.appendChild(this.node)\r\n\r\n // Make sure defs node is always at the top\r\n if (p instanceof SVG.Doc)\r\n p.node.appendChild(p.defs().node)\r\n\r\n return this\r\n }\r\n // Send given element all the way to the back\r\n, back: function() {\r\n if (this.position() > 0)\r\n this.parent().removeElement(this).add(this, 0)\r\n\r\n return this\r\n }\r\n // Inserts a given element before the targeted element\r\n, before: function(element) {\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i)\r\n\r\n return this\r\n }\r\n // Insters a given element after the targeted element\r\n, after: function(element) {\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i + 1)\r\n\r\n return this\r\n }\r\n\r\n})\nSVG.Mask = SVG.invent({\r\n // Initialize node\r\n create: function() {\r\n this.constructor.call(this, SVG.create('mask'))\r\n\r\n // keep references to masked elements\r\n this.targets = []\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Unmask all masked elements and remove itself\r\n remove: function() {\r\n // unmask all targets\r\n for (var i = this.targets.length - 1; i >= 0; i--)\r\n if (this.targets[i])\r\n this.targets[i].unmask()\r\n this.targets = []\r\n\r\n // remove mask from parent\r\n SVG.Element.prototype.remove.call(this)\r\n\r\n return this\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create masking element\r\n mask: function() {\r\n return this.defs().put(new SVG.Mask)\r\n }\r\n }\r\n})\r\n\r\n\r\nSVG.extend(SVG.Element, {\r\n // Distribute mask to svg element\r\n maskWith: function(element) {\r\n // use given mask or create a new one\r\n this.masker = element instanceof SVG.Mask ? element : this.parent().mask().add(element)\r\n\r\n // store reverence on self in mask\r\n this.masker.targets.push(this)\r\n\r\n // apply mask\r\n return this.attr('mask', 'url(\"#' + this.masker.attr('id') + '\")')\r\n }\r\n // Unmask element\r\n, unmask: function() {\r\n delete this.masker\r\n return this.attr('mask', null)\r\n }\r\n\r\n})\r\n\nSVG.ClipPath = SVG.invent({\r\n // Initialize node\r\n create: function() {\r\n this.constructor.call(this, SVG.create('clipPath'))\r\n\r\n // keep references to clipped elements\r\n this.targets = []\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Unclip all clipped elements and remove itself\r\n remove: function() {\r\n // unclip all targets\r\n for (var i = this.targets.length - 1; i >= 0; i--)\r\n if (this.targets[i])\r\n this.targets[i].unclip()\r\n this.targets = []\r\n\r\n // remove clipPath from parent\r\n this.parent().removeElement(this)\r\n\r\n return this\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create clipping element\r\n clip: function() {\r\n return this.defs().put(new SVG.ClipPath)\r\n }\r\n }\r\n})\r\n\r\n//\r\nSVG.extend(SVG.Element, {\r\n // Distribute clipPath to svg element\r\n clipWith: function(element) {\r\n // use given clip or create a new one\r\n this.clipper = element instanceof SVG.ClipPath ? element : this.parent().clip().add(element)\r\n\r\n // store reverence on self in mask\r\n this.clipper.targets.push(this)\r\n\r\n // apply mask\r\n return this.attr('clip-path', 'url(\"#' + this.clipper.attr('id') + '\")')\r\n }\r\n // Unclip element\r\n, unclip: function() {\r\n delete this.clipper\r\n return this.attr('clip-path', null)\r\n }\r\n\r\n})\nSVG.Gradient = SVG.invent({\r\n // Initialize node\r\n create: function(type) {\r\n this.constructor.call(this, SVG.create(type + 'Gradient'))\r\n\r\n // store type\r\n this.type = type\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Add a color stop\r\n at: function(offset, color, opacity) {\r\n return this.put(new SVG.Stop).update(offset, color, opacity)\r\n }\r\n // Update gradient\r\n , update: function(block) {\r\n // remove all stops\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block == 'function')\r\n block.call(this, this)\r\n\r\n return this\r\n }\r\n // Return the fill id\r\n , fill: function() {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n // Alias string convertion to fill\r\n , toString: function() {\r\n return this.fill()\r\n }\r\n // custom attr to handle transform\r\n , attr: function(a, b, c) {\r\n if(a == 'transform') a = 'gradientTransform'\r\n return SVG.Container.prototype.attr.call(this, a, b, c)\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create gradient element in defs\r\n gradient: function(type, block) {\r\n return this.defs().gradient(type, block)\r\n }\r\n }\r\n})\r\n\r\n// Add animatable methods to both gradient and fx module\r\nSVG.extend(SVG.Gradient, SVG.FX, {\r\n // From position\r\n from: function(x, y) {\r\n return (this._target || this).type == 'radial' ?\r\n this.attr({ fx: new SVG.Number(x), fy: new SVG.Number(y) }) :\r\n this.attr({ x1: new SVG.Number(x), y1: new SVG.Number(y) })\r\n }\r\n // To position\r\n, to: function(x, y) {\r\n return (this._target || this).type == 'radial' ?\r\n this.attr({ cx: new SVG.Number(x), cy: new SVG.Number(y) }) :\r\n this.attr({ x2: new SVG.Number(x), y2: new SVG.Number(y) })\r\n }\r\n})\r\n\r\n// Base gradient generation\r\nSVG.extend(SVG.Defs, {\r\n // define gradient\r\n gradient: function(type, block) {\r\n return this.put(new SVG.Gradient(type)).update(block)\r\n }\r\n\r\n})\r\n\r\nSVG.Stop = SVG.invent({\r\n // Initialize node\r\n create: 'stop'\r\n\r\n // Inherit from\r\n, inherit: SVG.Element\r\n\r\n // Add class methods\r\n, extend: {\r\n // add color stops\r\n update: function(o) {\r\n if (typeof o == 'number' || o instanceof SVG.Number) {\r\n o = {\r\n offset: arguments[0]\r\n , color: arguments[1]\r\n , opacity: arguments[2]\r\n }\r\n }\r\n\r\n // set attributes\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', new SVG.Number(o.offset))\r\n\r\n return this\r\n }\r\n }\r\n\r\n})\r\n\nSVG.Pattern = SVG.invent({\r\n // Initialize node\r\n create: 'pattern'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Return the fill id\r\n fill: function() {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n // Update pattern by rebuilding\r\n , update: function(block) {\r\n // remove content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block == 'function')\r\n block.call(this, this)\r\n\r\n return this\r\n }\r\n // Alias string convertion to fill\r\n , toString: function() {\r\n return this.fill()\r\n }\r\n // custom attr to handle transform\r\n , attr: function(a, b, c) {\r\n if(a == 'transform') a = 'patternTransform'\r\n return SVG.Container.prototype.attr.call(this, a, b, c)\r\n }\r\n\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create pattern element in defs\r\n pattern: function(width, height, block) {\r\n return this.defs().pattern(width, height, block)\r\n }\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Defs, {\r\n // Define gradient\r\n pattern: function(width, height, block) {\r\n return this.put(new SVG.Pattern).update(block).attr({\r\n x: 0\r\n , y: 0\r\n , width: width\r\n , height: height\r\n , patternUnits: 'userSpaceOnUse'\r\n })\r\n }\r\n\r\n})\nSVG.Shape = SVG.invent({\r\n // Initialize node\r\n create: function(element) {\r\n this.constructor.call(this, element)\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Element\r\n\r\n})\n\r\nSVG.Bare = SVG.invent({\r\n // Initialize\r\n create: function(element, inherit) {\r\n // construct element\r\n this.constructor.call(this, SVG.create(element))\r\n\r\n // inherit custom methods\r\n if (inherit)\r\n for (var method in inherit.prototype)\r\n if (typeof inherit.prototype[method] === 'function')\r\n this[method] = inherit.prototype[method]\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Element\r\n\r\n // Add methods\r\n, extend: {\r\n // Insert some plain text\r\n words: function(text) {\r\n // remove contents\r\n while (this.node.hasChildNodes())\r\n this.node.removeChild(this.node.lastChild)\r\n\r\n // create text node\r\n this.node.appendChild(document.createTextNode(text))\r\n\r\n return this\r\n }\r\n }\r\n})\r\n\r\n\r\nSVG.extend(SVG.Parent, {\r\n // Create an element that is not described by SVG.js\r\n element: function(element, inherit) {\r\n return this.put(new SVG.Bare(element, inherit))\r\n }\r\n})\r\n\nSVG.Symbol = SVG.invent({\r\n // Initialize node\r\n create: 'symbol'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n, construct: {\r\n // create symbol\r\n symbol: function() {\r\n return this.put(new SVG.Symbol)\r\n }\r\n }\r\n})\r\n\nSVG.Use = SVG.invent({\r\n // Initialize node\r\n create: 'use'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Use element as a reference\r\n element: function(element, file) {\r\n // Set lined element\r\n return this.attr('href', (file || '') + '#' + element, SVG.xlink)\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a use element\r\n use: function(element, file) {\r\n return this.put(new SVG.Use).element(element, file)\r\n }\r\n }\r\n})\nSVG.Rect = SVG.invent({\r\n // Initialize node\r\n create: 'rect'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a rect element\r\n rect: function(width, height) {\r\n return this.put(new SVG.Rect()).size(width, height)\r\n }\r\n }\r\n})\nSVG.Circle = SVG.invent({\r\n // Initialize node\r\n create: 'circle'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create circle element, based on ellipse\r\n circle: function(size) {\r\n return this.put(new SVG.Circle).rx(new SVG.Number(size).divide(2)).move(0, 0)\r\n }\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Circle, SVG.FX, {\r\n // Radius x value\r\n rx: function(rx) {\r\n return this.attr('r', rx)\r\n }\r\n // Alias radius x value\r\n, ry: function(ry) {\r\n return this.rx(ry)\r\n }\r\n})\r\n\r\nSVG.Ellipse = SVG.invent({\r\n // Initialize node\r\n create: 'ellipse'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create an ellipse\r\n ellipse: function(width, height) {\r\n return this.put(new SVG.Ellipse).size(width, height).move(0, 0)\r\n }\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Ellipse, SVG.Rect, SVG.FX, {\r\n // Radius x value\r\n rx: function(rx) {\r\n return this.attr('rx', rx)\r\n }\r\n // Radius y value\r\n, ry: function(ry) {\r\n return this.attr('ry', ry)\r\n }\r\n})\r\n\r\n// Add common method\r\nSVG.extend(SVG.Circle, SVG.Ellipse, {\r\n // Move over x-axis\r\n x: function(x) {\r\n return x == null ? this.cx() - this.rx() : this.cx(x + this.rx())\r\n }\r\n // Move over y-axis\r\n , y: function(y) {\r\n return y == null ? this.cy() - this.ry() : this.cy(y + this.ry())\r\n }\r\n // Move by center over x-axis\r\n , cx: function(x) {\r\n return x == null ? this.attr('cx') : this.attr('cx', x)\r\n }\r\n // Move by center over y-axis\r\n , cy: function(y) {\r\n return y == null ? this.attr('cy') : this.attr('cy', y)\r\n }\r\n // Set width of element\r\n , width: function(width) {\r\n return width == null ? this.rx() * 2 : this.rx(new SVG.Number(width).divide(2))\r\n }\r\n // Set height of element\r\n , height: function(height) {\r\n return height == null ? this.ry() * 2 : this.ry(new SVG.Number(height).divide(2))\r\n }\r\n // Custom size function\r\n , size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .rx(new SVG.Number(p.width).divide(2))\r\n .ry(new SVG.Number(p.height).divide(2))\r\n }\r\n})\nSVG.Line = SVG.invent({\r\n // Initialize node\r\n create: 'line'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Get array\r\n array: function() {\r\n return new SVG.PointArray([\r\n [ this.attr('x1'), this.attr('y1') ]\r\n , [ this.attr('x2'), this.attr('y2') ]\r\n ])\r\n }\r\n // Overwrite native plot() method\r\n , plot: function(x1, y1, x2, y2) {\r\n if (x1 == null)\r\n return this.array()\r\n else if (typeof y1 !== 'undefined')\r\n x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }\r\n else\r\n x1 = new SVG.PointArray(x1).toLine()\r\n\r\n return this.attr(x1)\r\n }\r\n // Move by left top corner\r\n , move: function(x, y) {\r\n return this.attr(this.array().move(x, y).toLine())\r\n }\r\n // Set element size to given width and height\r\n , size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this.attr(this.array().size(p.width, p.height).toLine())\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a line element\r\n line: function(x1, y1, x2, y2) {\r\n // make sure plot is called as a setter\r\n // x1 is not necessarily a number, it can also be an array, a string and a SVG.PointArray\r\n return SVG.Line.prototype.plot.apply(\r\n this.put(new SVG.Line)\r\n , x1 != null ? [x1, y1, x2, y2] : [0, 0, 0, 0]\r\n )\r\n }\r\n }\r\n})\r\n\nSVG.Polyline = SVG.invent({\r\n // Initialize node\r\n create: 'polyline'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a wrapped polyline element\r\n polyline: function(p) {\r\n // make sure plot is called as a setter\r\n return this.put(new SVG.Polyline).plot(p || new SVG.PointArray)\r\n }\r\n }\r\n})\r\n\r\nSVG.Polygon = SVG.invent({\r\n // Initialize node\r\n create: 'polygon'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a wrapped polygon element\r\n polygon: function(p) {\r\n // make sure plot is called as a setter\r\n return this.put(new SVG.Polygon).plot(p || new SVG.PointArray)\r\n }\r\n }\r\n})\r\n\r\n// Add polygon-specific functions\r\nSVG.extend(SVG.Polyline, SVG.Polygon, {\r\n // Get array\r\n array: function() {\r\n return this._array || (this._array = new SVG.PointArray(this.attr('points')))\r\n }\r\n // Plot new path\r\n, plot: function(p) {\r\n return (p == null) ?\r\n this.array() :\r\n this.clear().attr('points', typeof p == 'string' ? p : (this._array = new SVG.PointArray(p)))\r\n }\r\n // Clear array cache\r\n, clear: function() {\r\n delete this._array\r\n return this\r\n }\r\n // Move by left top corner\r\n, move: function(x, y) {\r\n return this.attr('points', this.array().move(x, y))\r\n }\r\n // Set element size to given width and height\r\n, size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this.attr('points', this.array().size(p.width, p.height))\r\n }\r\n\r\n})\r\n\n// unify all point to point elements\r\nSVG.extend(SVG.Line, SVG.Polyline, SVG.Polygon, {\r\n // Define morphable array\r\n morphArray: SVG.PointArray\r\n // Move by left top corner over x-axis\r\n, x: function(x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n // Move by left top corner over y-axis\r\n, y: function(y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n // Set width of element\r\n, width: function(width) {\r\n var b = this.bbox()\r\n\r\n return width == null ? b.width : this.size(width, b.height)\r\n }\r\n // Set height of element\r\n, height: function(height) {\r\n var b = this.bbox()\r\n\r\n return height == null ? b.height : this.size(b.width, height)\r\n }\r\n})\nSVG.Path = SVG.invent({\r\n // Initialize node\r\n create: 'path'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Define morphable array\r\n morphArray: SVG.PathArray\r\n // Get array\r\n , array: function() {\r\n return this._array || (this._array = new SVG.PathArray(this.attr('d')))\r\n }\r\n // Plot new path\r\n , plot: function(d) {\r\n return (d == null) ?\r\n this.array() :\r\n this.clear().attr('d', typeof d == 'string' ? d : (this._array = new SVG.PathArray(d)))\r\n }\r\n // Clear array cache\r\n , clear: function() {\r\n delete this._array\r\n return this\r\n }\r\n // Move by left top corner\r\n , move: function(x, y) {\r\n return this.attr('d', this.array().move(x, y))\r\n }\r\n // Move by left top corner over x-axis\r\n , x: function(x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n // Move by left top corner over y-axis\r\n , y: function(y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n // Set element size to given width and height\r\n , size: function(width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this.attr('d', this.array().size(p.width, p.height))\r\n }\r\n // Set width of element\r\n , width: function(width) {\r\n return width == null ? this.bbox().width : this.size(width, this.bbox().height)\r\n }\r\n // Set height of element\r\n , height: function(height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }\r\n\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a wrapped path element\r\n path: function(d) {\r\n // make sure plot is called as a setter\r\n return this.put(new SVG.Path).plot(d || new SVG.PathArray)\r\n }\r\n }\r\n})\r\n\nSVG.Image = SVG.invent({\r\n // Initialize node\r\n create: 'image'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // (re)load image\r\n load: function(url) {\r\n if (!url) return this\r\n\r\n var self = this\r\n , img = new window.Image()\r\n\r\n // preload image\r\n SVG.on(img, 'load', function() {\r\n SVG.off(img)\r\n\r\n var p = self.parent(SVG.Pattern)\r\n\r\n if(p === null) return\r\n\r\n // ensure image size\r\n if (self.width() == 0 && self.height() == 0)\r\n self.size(img.width, img.height)\r\n\r\n // ensure pattern size if not set\r\n if (p && p.width() == 0 && p.height() == 0)\r\n p.size(self.width(), self.height())\r\n\r\n // callback\r\n if (typeof self._loaded === 'function')\r\n self._loaded.call(self, {\r\n width: img.width\r\n , height: img.height\r\n , ratio: img.width / img.height\r\n , url: url\r\n })\r\n })\r\n\r\n SVG.on(img, 'error', function(e){\r\n SVG.off(img)\r\n\r\n if (typeof self._error === 'function'){\r\n self._error.call(self, e)\r\n }\r\n })\r\n\r\n return this.attr('href', (img.src = this.src = url), SVG.xlink)\r\n }\r\n // Add loaded callback\r\n , loaded: function(loaded) {\r\n this._loaded = loaded\r\n return this\r\n }\r\n\r\n , error: function(error) {\r\n this._error = error\r\n return this\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // create image element, load image and set its size\r\n image: function(source, width, height) {\r\n return this.put(new SVG.Image).load(source).size(width || 0, height || width || 0)\r\n }\r\n }\r\n\r\n})\nSVG.Text = SVG.invent({\r\n // Initialize node\r\n create: function() {\r\n this.constructor.call(this, SVG.create('text'))\r\n\r\n this.dom.leading = new SVG.Number(1.3) // store leading value for rebuilding\r\n this._rebuild = true // enable automatic updating of dy values\r\n this._build = false // disable build mode for adding multiple lines\r\n\r\n // set default font\r\n this.attr('font-family', SVG.defaults.attrs['font-family'])\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Move over x-axis\r\n x: function(x) {\r\n // act as getter\r\n if (x == null)\r\n return this.attr('x')\r\n\r\n return this.attr('x', x)\r\n }\r\n // Move over y-axis\r\n , y: function(y) {\r\n var oy = this.attr('y')\r\n , o = typeof oy === 'number' ? oy - this.bbox().y : 0\r\n\r\n // act as getter\r\n if (y == null)\r\n return typeof oy === 'number' ? oy - o : oy\r\n\r\n return this.attr('y', typeof y.valueOf() === 'number' ? y + o : y)\r\n }\r\n // Move center over x-axis\r\n , cx: function(x) {\r\n return x == null ? this.bbox().cx : this.x(x - this.bbox().width / 2)\r\n }\r\n // Move center over y-axis\r\n , cy: function(y) {\r\n return y == null ? this.bbox().cy : this.y(y - this.bbox().height / 2)\r\n }\r\n // Set the text content\r\n , text: function(text) {\r\n // act as getter\r\n if (typeof text === 'undefined'){\r\n var text = ''\r\n var children = this.node.childNodes\r\n for(var i = 0, len = children.length; i < len; ++i){\r\n\r\n // add newline if its not the first child and newLined is set to true\r\n if(i != 0 && children[i].nodeType != 3 && SVG.adopt(children[i]).dom.newLined == true){\r\n text += '\\n'\r\n }\r\n\r\n // add content of this node\r\n text += children[i].textContent\r\n }\r\n\r\n return text\r\n }\r\n\r\n // remove existing content\r\n this.clear().build(true)\r\n\r\n if (typeof text === 'function') {\r\n // call block\r\n text.call(this, this)\r\n\r\n } else {\r\n // store text and make sure text is not blank\r\n text = text.split('\\n')\r\n\r\n // build new lines\r\n for (var i = 0, il = text.length; i < il; i++)\r\n this.tspan(text[i]).newLine()\r\n }\r\n\r\n // disable build mode and rebuild lines\r\n return this.build(false).rebuild()\r\n }\r\n // Set font size\r\n , size: function(size) {\r\n return this.attr('font-size', size).rebuild()\r\n }\r\n // Set / get leading\r\n , leading: function(value) {\r\n // act as getter\r\n if (value == null)\r\n return this.dom.leading\r\n\r\n // act as setter\r\n this.dom.leading = new SVG.Number(value)\r\n\r\n return this.rebuild()\r\n }\r\n // Get all the first level lines\r\n , lines: function() {\r\n var node = (this.textPath && this.textPath() || this).node\r\n\r\n // filter tspans and map them to SVG.js instances\r\n var lines = SVG.utils.map(SVG.utils.filterSVGElements(node.childNodes), function(el){\r\n return SVG.adopt(el)\r\n })\r\n\r\n // return an instance of SVG.set\r\n return new SVG.Set(lines)\r\n }\r\n // Rebuild appearance type\r\n , rebuild: function(rebuild) {\r\n // store new rebuild flag if given\r\n if (typeof rebuild == 'boolean')\r\n this._rebuild = rebuild\r\n\r\n // define position of all lines\r\n if (this._rebuild) {\r\n var self = this\r\n , blankLineOffset = 0\r\n , dy = this.dom.leading * new SVG.Number(this.attr('font-size'))\r\n\r\n this.lines().each(function() {\r\n if (this.dom.newLined) {\r\n if (!self.textPath())\r\n this.attr('x', self.attr('x'))\r\n if(this.text() == '\\n') {\r\n blankLineOffset += dy\r\n }else{\r\n this.attr('dy', dy + blankLineOffset)\r\n blankLineOffset = 0\r\n }\r\n }\r\n })\r\n\r\n this.fire('rebuild')\r\n }\r\n\r\n return this\r\n }\r\n // Enable / disable build mode\r\n , build: function(build) {\r\n this._build = !!build\r\n return this\r\n }\r\n // overwrite method from parent to set data properly\r\n , setData: function(o){\r\n this.dom = o\r\n this.dom.leading = new SVG.Number(o.leading || 1.3)\r\n return this\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create text element\r\n text: function(text) {\r\n return this.put(new SVG.Text).text(text)\r\n }\r\n // Create plain text element\r\n , plain: function(text) {\r\n return this.put(new SVG.Text).plain(text)\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.Tspan = SVG.invent({\r\n // Initialize node\r\n create: 'tspan'\r\n\r\n // Inherit from\r\n, inherit: SVG.Shape\r\n\r\n // Add class methods\r\n, extend: {\r\n // Set text content\r\n text: function(text) {\r\n if(text == null) return this.node.textContent + (this.dom.newLined ? '\\n' : '')\r\n\r\n typeof text === 'function' ? text.call(this, this) : this.plain(text)\r\n\r\n return this\r\n }\r\n // Shortcut dx\r\n , dx: function(dx) {\r\n return this.attr('dx', dx)\r\n }\r\n // Shortcut dy\r\n , dy: function(dy) {\r\n return this.attr('dy', dy)\r\n }\r\n // Create new line\r\n , newLine: function() {\r\n // fetch text parent\r\n var t = this.parent(SVG.Text)\r\n\r\n // mark new line\r\n this.dom.newLined = true\r\n\r\n // apply new hy¡n\r\n return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x())\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.Text, SVG.Tspan, {\r\n // Create plain text node\r\n plain: function(text) {\r\n // clear if build mode is disabled\r\n if (this._build === false)\r\n this.clear()\r\n\r\n // create text node\r\n this.node.appendChild(document.createTextNode(text))\r\n\r\n return this\r\n }\r\n // Create a tspan\r\n, tspan: function(text) {\r\n var node = (this.textPath && this.textPath() || this).node\r\n , tspan = new SVG.Tspan\r\n\r\n // clear if build mode is disabled\r\n if (this._build === false)\r\n this.clear()\r\n\r\n // add new tspan\r\n node.appendChild(tspan.node)\r\n\r\n return tspan.text(text)\r\n }\r\n // Clear all lines\r\n, clear: function() {\r\n var node = (this.textPath && this.textPath() || this).node\r\n\r\n // remove existing child nodes\r\n while (node.hasChildNodes())\r\n node.removeChild(node.lastChild)\r\n\r\n return this\r\n }\r\n // Get length of text element\r\n, length: function() {\r\n return this.node.getComputedTextLength()\r\n }\r\n})\r\n\nSVG.TextPath = SVG.invent({\r\n // Initialize node\r\n create: 'textPath'\r\n\r\n // Inherit from\r\n, inherit: SVG.Parent\r\n\r\n // Define parent class\r\n, parent: SVG.Text\r\n\r\n // Add parent method\r\n, construct: {\r\n morphArray: SVG.PathArray\r\n // Create path for text to run on\r\n , path: function(d) {\r\n // create textPath element\r\n var path = new SVG.TextPath\r\n , track = this.doc().defs().path(d)\r\n\r\n // move lines to textpath\r\n while (this.node.hasChildNodes())\r\n path.node.appendChild(this.node.firstChild)\r\n\r\n // add textPath element as child node\r\n this.node.appendChild(path.node)\r\n\r\n // link textPath to path and add content\r\n path.attr('href', '#' + track, SVG.xlink)\r\n\r\n return this\r\n }\r\n // return the array of the path track element\r\n , array: function() {\r\n var track = this.track()\r\n\r\n return track ? track.array() : null\r\n }\r\n // Plot path if any\r\n , plot: function(d) {\r\n var track = this.track()\r\n , pathArray = null\r\n\r\n if (track) {\r\n pathArray = track.plot(d)\r\n }\r\n\r\n return (d == null) ? pathArray : this\r\n }\r\n // Get the path track element\r\n , track: function() {\r\n var path = this.textPath()\r\n\r\n if (path)\r\n return path.reference('href')\r\n }\r\n // Get the textPath child\r\n , textPath: function() {\r\n if (this.node.firstChild && this.node.firstChild.nodeName == 'textPath')\r\n return SVG.adopt(this.node.firstChild)\r\n }\r\n }\r\n})\r\n\nSVG.Nested = SVG.invent({\r\n // Initialize node\r\n create: function() {\r\n this.constructor.call(this, SVG.create('svg'))\r\n\r\n this.style('overflow', 'visible')\r\n }\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create nested svg document\r\n nested: function() {\r\n return this.put(new SVG.Nested)\r\n }\r\n }\r\n})\nSVG.A = SVG.invent({\r\n // Initialize node\r\n create: 'a'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Link url\r\n to: function(url) {\r\n return this.attr('href', url, SVG.xlink)\r\n }\r\n // Link show attribute\r\n , show: function(target) {\r\n return this.attr('show', target, SVG.xlink)\r\n }\r\n // Link target attribute\r\n , target: function(target) {\r\n return this.attr('target', target)\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a hyperlink element\r\n link: function(url) {\r\n return this.put(new SVG.A).to(url)\r\n }\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Element, {\r\n // Create a hyperlink element\r\n linkTo: function(url) {\r\n var link = new SVG.A\r\n\r\n if (typeof url == 'function')\r\n url.call(link, link)\r\n else\r\n link.to(url)\r\n\r\n return this.parent().put(link).put(this)\r\n }\r\n\r\n})\nSVG.Marker = SVG.invent({\r\n // Initialize node\r\n create: 'marker'\r\n\r\n // Inherit from\r\n, inherit: SVG.Container\r\n\r\n // Add class methods\r\n, extend: {\r\n // Set width of element\r\n width: function(width) {\r\n return this.attr('markerWidth', width)\r\n }\r\n // Set height of element\r\n , height: function(height) {\r\n return this.attr('markerHeight', height)\r\n }\r\n // Set marker refX and refY\r\n , ref: function(x, y) {\r\n return this.attr('refX', x).attr('refY', y)\r\n }\r\n // Update marker\r\n , update: function(block) {\r\n // remove all content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block == 'function')\r\n block.call(this, this)\r\n\r\n return this\r\n }\r\n // Return the fill id\r\n , toString: function() {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n marker: function(width, height, block) {\r\n // Create marker element in defs\r\n return this.defs().marker(width, height, block)\r\n }\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.Defs, {\r\n // Create marker\r\n marker: function(width, height, block) {\r\n // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\r\n return this.put(new SVG.Marker)\r\n .size(width, height)\r\n .ref(width / 2, height / 2)\r\n .viewbox(0, 0, width, height)\r\n .attr('orient', 'auto')\r\n .update(block)\r\n }\r\n\r\n})\r\n\r\nSVG.extend(SVG.Line, SVG.Polyline, SVG.Polygon, SVG.Path, {\r\n // Create and attach markers\r\n marker: function(marker, width, height, block) {\r\n var attr = ['marker']\r\n\r\n // Build attribute name\r\n if (marker != 'all') attr.push(marker)\r\n attr = attr.join('-')\r\n\r\n // Set marker attribute\r\n marker = arguments[1] instanceof SVG.Marker ?\r\n arguments[1] :\r\n this.doc().marker(width, height, block)\r\n\r\n return this.attr(attr, marker)\r\n }\r\n\r\n})\n// Define list of available attributes for stroke and fill\r\nvar sugar = {\r\n stroke: ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset']\r\n, fill: ['color', 'opacity', 'rule']\r\n, prefix: function(t, a) {\r\n return a == 'color' ? t : t + '-' + a\r\n }\r\n}\r\n\r\n// Add sugar for fill and stroke\r\n;['fill', 'stroke'].forEach(function(m) {\r\n var i, extension = {}\r\n\r\n extension[m] = function(o) {\r\n if (typeof o == 'undefined')\r\n return this\r\n if (typeof o == 'string' || SVG.Color.isRgb(o) || (o && typeof o.fill === 'function'))\r\n this.attr(m, o)\r\n\r\n else\r\n // set all attributes from sugar.fill and sugar.stroke list\r\n for (i = sugar[m].length - 1; i >= 0; i--)\r\n if (o[sugar[m][i]] != null)\r\n this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\r\n\r\n return this\r\n }\r\n\r\n SVG.extend(SVG.Element, SVG.FX, extension)\r\n\r\n})\r\n\r\nSVG.extend(SVG.Element, SVG.FX, {\r\n // Map rotation to transform\r\n rotate: function(d, cx, cy) {\r\n return this.transform({ rotation: d, cx: cx, cy: cy })\r\n }\r\n // Map skew to transform\r\n, skew: function(x, y, cx, cy) {\r\n return arguments.length == 1 || arguments.length == 3 ?\r\n this.transform({ skew: x, cx: y, cy: cx }) :\r\n this.transform({ skewX: x, skewY: y, cx: cx, cy: cy })\r\n }\r\n // Map scale to transform\r\n, scale: function(x, y, cx, cy) {\r\n return arguments.length == 1 || arguments.length == 3 ?\r\n this.transform({ scale: x, cx: y, cy: cx }) :\r\n this.transform({ scaleX: x, scaleY: y, cx: cx, cy: cy })\r\n }\r\n // Map translate to transform\r\n, translate: function(x, y) {\r\n return this.transform({ x: x, y: y })\r\n }\r\n // Map flip to transform\r\n, flip: function(a, o) {\r\n o = typeof a == 'number' ? a : o\r\n return this.transform({ flip: a || 'both', offset: o })\r\n }\r\n // Map matrix to transform\r\n, matrix: function(m) {\r\n return this.attr('transform', new SVG.Matrix(arguments.length == 6 ? [].slice.call(arguments) : m))\r\n }\r\n // Opacity\r\n, opacity: function(value) {\r\n return this.attr('opacity', value)\r\n }\r\n // Relative move over x axis\r\n, dx: function(x) {\r\n return this.x(new SVG.Number(x).plus(this instanceof SVG.FX ? 0 : this.x()), true)\r\n }\r\n // Relative move over y axis\r\n, dy: function(y) {\r\n return this.y(new SVG.Number(y).plus(this instanceof SVG.FX ? 0 : this.y()), true)\r\n }\r\n // Relative move over x and y axes\r\n, dmove: function(x, y) {\r\n return this.dx(x).dy(y)\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Rect, SVG.Ellipse, SVG.Circle, SVG.Gradient, SVG.FX, {\r\n // Add x and y radius\r\n radius: function(x, y) {\r\n var type = (this._target || this).type;\r\n return type == 'radial' || type == 'circle' ?\r\n this.attr('r', new SVG.Number(x)) :\r\n this.rx(x).ry(y == null ? x : y)\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Path, {\r\n // Get path length\r\n length: function() {\r\n return this.node.getTotalLength()\r\n }\r\n // Get point at length\r\n, pointAt: function(length) {\r\n return this.node.getPointAtLength(length)\r\n }\r\n})\r\n\r\nSVG.extend(SVG.Parent, SVG.Text, SVG.Tspan, SVG.FX, {\r\n // Set font\r\n font: function(a, v) {\r\n if (typeof a == 'object') {\r\n for (v in a) this.font(v, a[v])\r\n }\r\n\r\n return a == 'leading' ?\r\n this.leading(v) :\r\n a == 'anchor' ?\r\n this.attr('text-anchor', v) :\r\n a == 'size' || a == 'family' || a == 'weight' || a == 'stretch' || a == 'variant' || a == 'style' ?\r\n this.attr('font-'+ a, v) :\r\n this.attr(a, v)\r\n }\r\n})\r\n\nSVG.Set = SVG.invent({\r\n // Initialize\r\n create: function(members) {\r\n if (members instanceof SVG.Set) {\r\n this.members = members.members.slice()\r\n } else {\r\n Array.isArray(members) ? this.members = members : this.clear()\r\n }\r\n }\r\n\r\n // Add class methods\r\n, extend: {\r\n // Add element to set\r\n add: function() {\r\n var i, il, elements = [].slice.call(arguments)\r\n\r\n for (i = 0, il = elements.length; i < il; i++)\r\n this.members.push(elements[i])\r\n\r\n return this\r\n }\r\n // Remove element from set\r\n , remove: function(element) {\r\n var i = this.index(element)\r\n\r\n // remove given child\r\n if (i > -1)\r\n this.members.splice(i, 1)\r\n\r\n return this\r\n }\r\n // Iterate over all members\r\n , each: function(block) {\r\n for (var i = 0, il = this.members.length; i < il; i++)\r\n block.apply(this.members[i], [i, this.members])\r\n\r\n return this\r\n }\r\n // Restore to defaults\r\n , clear: function() {\r\n // initialize store\r\n this.members = []\r\n\r\n return this\r\n }\r\n // Get the length of a set\r\n , length: function() {\r\n return this.members.length\r\n }\r\n // Checks if a given element is present in set\r\n , has: function(element) {\r\n return this.index(element) >= 0\r\n }\r\n // retuns index of given element in set\r\n , index: function(element) {\r\n return this.members.indexOf(element)\r\n }\r\n // Get member at given index\r\n , get: function(i) {\r\n return this.members[i]\r\n }\r\n // Get first member\r\n , first: function() {\r\n return this.get(0)\r\n }\r\n // Get last member\r\n , last: function() {\r\n return this.get(this.members.length - 1)\r\n }\r\n // Default value\r\n , valueOf: function() {\r\n return this.members\r\n }\r\n // Get the bounding box of all members included or empty box if set has no items\r\n , bbox: function(){\r\n // return an empty box of there are no members\r\n if (this.members.length == 0)\r\n return new SVG.RBox()\r\n\r\n // get the first rbox and update the target bbox\r\n var rbox = this.members[0].rbox(this.members[0].doc())\r\n\r\n this.each(function() {\r\n // user rbox for correct position and visual representation\r\n rbox = rbox.merge(this.rbox(this.doc()))\r\n })\r\n\r\n return rbox\r\n }\r\n }\r\n\r\n // Add parent method\r\n, construct: {\r\n // Create a new set\r\n set: function(members) {\r\n return new SVG.Set(members)\r\n }\r\n }\r\n})\r\n\r\nSVG.FX.Set = SVG.invent({\r\n // Initialize node\r\n create: function(set) {\r\n // store reference to set\r\n this.set = set\r\n }\r\n\r\n})\r\n\r\n// Alias methods\r\nSVG.Set.inherit = function() {\r\n var m\r\n , methods = []\r\n\r\n // gather shape methods\r\n for(var m in SVG.Shape.prototype)\r\n if (typeof SVG.Shape.prototype[m] == 'function' && typeof SVG.Set.prototype[m] != 'function')\r\n methods.push(m)\r\n\r\n // apply shape aliasses\r\n methods.forEach(function(method) {\r\n SVG.Set.prototype[method] = function() {\r\n for (var i = 0, il = this.members.length; i < il; i++)\r\n if (this.members[i] && typeof this.members[i][method] == 'function')\r\n this.members[i][method].apply(this.members[i], arguments)\r\n\r\n return method == 'animate' ? (this.fx || (this.fx = new SVG.FX.Set(this))) : this\r\n }\r\n })\r\n\r\n // clear methods for the next round\r\n methods = []\r\n\r\n // gather fx methods\r\n for(var m in SVG.FX.prototype)\r\n if (typeof SVG.FX.prototype[m] == 'function' && typeof SVG.FX.Set.prototype[m] != 'function')\r\n methods.push(m)\r\n\r\n // apply fx aliasses\r\n methods.forEach(function(method) {\r\n SVG.FX.Set.prototype[method] = function() {\r\n for (var i = 0, il = this.set.members.length; i < il; i++)\r\n this.set.members[i].fx[method].apply(this.set.members[i].fx, arguments)\r\n\r\n return this\r\n }\r\n })\r\n}\r\n\n\r\nSVG.extend(SVG.Element, {\r\n // Store data values on svg nodes\r\n data: function(a, v, r) {\r\n if (typeof a == 'object') {\r\n for (v in a)\r\n this.data(v, a[v])\r\n\r\n } else if (arguments.length < 2) {\r\n try {\r\n return JSON.parse(this.attr('data-' + a))\r\n } catch(e) {\r\n return this.attr('data-' + a)\r\n }\r\n\r\n } else {\r\n this.attr(\r\n 'data-' + a\r\n , v === null ?\r\n null :\r\n r === true || typeof v === 'string' || typeof v === 'number' ?\r\n v :\r\n JSON.stringify(v)\r\n )\r\n }\r\n\r\n return this\r\n }\r\n})\nSVG.extend(SVG.Element, {\r\n // Remember arbitrary data\r\n remember: function(k, v) {\r\n // remember every item in an object individually\r\n if (typeof arguments[0] == 'object')\r\n for (var v in k)\r\n this.remember(v, k[v])\r\n\r\n // retrieve memory\r\n else if (arguments.length == 1)\r\n return this.memory()[k]\r\n\r\n // store memory\r\n else\r\n this.memory()[k] = v\r\n\r\n return this\r\n }\r\n\r\n // Erase a given memory\r\n, forget: function() {\r\n if (arguments.length == 0)\r\n this._memory = {}\r\n else\r\n for (var i = arguments.length - 1; i >= 0; i--)\r\n delete this.memory()[arguments[i]]\r\n\r\n return this\r\n }\r\n\r\n // Initialize or return local memory object\r\n, memory: function() {\r\n return this._memory || (this._memory = {})\r\n }\r\n\r\n})\n// Method for getting an element by id\r\nSVG.get = function(id) {\r\n var node = document.getElementById(idFromReference(id) || id)\r\n return SVG.adopt(node)\r\n}\r\n\r\n// Select elements by query string\r\nSVG.select = function(query, parent) {\r\n return new SVG.Set(\r\n SVG.utils.map((parent || document).querySelectorAll(query), function(node) {\r\n return SVG.adopt(node)\r\n })\r\n )\r\n}\r\n\r\nSVG.extend(SVG.Parent, {\r\n // Scoped select method\r\n select: function(query) {\r\n return SVG.select(query, this.node)\r\n }\r\n\r\n})\nfunction pathRegReplace(a, b, c, d) {\r\n return c + d.replace(SVG.regex.dots, ' .')\r\n}\r\n\r\n// creates deep clone of array\r\nfunction array_clone(arr){\r\n var clone = arr.slice(0)\r\n for(var i = clone.length; i--;){\r\n if(Array.isArray(clone[i])){\r\n clone[i] = array_clone(clone[i])\r\n }\r\n }\r\n return clone\r\n}\r\n\r\n// tests if a given element is instance of an object\r\nfunction is(el, obj){\r\n return el instanceof obj\r\n}\r\n\r\n// tests if a given selector matches an element\r\nfunction matches(el, selector) {\r\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector);\r\n}\r\n\r\n// Convert dash-separated-string to camelCase\r\nfunction camelCase(s) {\r\n return s.toLowerCase().replace(/-(.)/g, function(m, g) {\r\n return g.toUpperCase()\r\n })\r\n}\r\n\r\n// Capitalize first letter of a string\r\nfunction capitalize(s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1)\r\n}\r\n\r\n// Ensure to six-based hex\r\nfunction fullHex(hex) {\r\n return hex.length == 4 ?\r\n [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2)\r\n , hex.substring(2, 3), hex.substring(2, 3)\r\n , hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('') : hex\r\n}\r\n\r\n// Component to hex value\r\nfunction compToHex(comp) {\r\n var hex = comp.toString(16)\r\n return hex.length == 1 ? '0' + hex : hex\r\n}\r\n\r\n// Calculate proportional width and height values when necessary\r\nfunction proportionalSize(element, width, height) {\r\n if (width == null || height == null) {\r\n var box = element.bbox()\r\n\r\n if (width == null)\r\n width = box.width / box.height * height\r\n else if (height == null)\r\n height = box.height / box.width * width\r\n }\r\n\r\n return {\r\n width: width\r\n , height: height\r\n }\r\n}\r\n\r\n// Delta transform point\r\nfunction deltaTransformPoint(matrix, x, y) {\r\n return {\r\n x: x * matrix.a + y * matrix.c + 0\r\n , y: x * matrix.b + y * matrix.d + 0\r\n }\r\n}\r\n\r\n// Map matrix array to object\r\nfunction arrayToMatrix(a) {\r\n return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\r\n}\r\n\r\n// Parse matrix if required\r\nfunction parseMatrix(matrix) {\r\n if (!(matrix instanceof SVG.Matrix))\r\n matrix = new SVG.Matrix(matrix)\r\n\r\n return matrix\r\n}\r\n\r\n// Add centre point to transform object\r\nfunction ensureCentre(o, target) {\r\n o.cx = o.cx == null ? target.bbox().cx : o.cx\r\n o.cy = o.cy == null ? target.bbox().cy : o.cy\r\n}\r\n\r\n// PathArray Helpers\r\nfunction arrayToString(a) {\r\n for (var i = 0, il = a.length, s = ''; i < il; i++) {\r\n s += a[i][0]\r\n\r\n if (a[i][1] != null) {\r\n s += a[i][1]\r\n\r\n if (a[i][2] != null) {\r\n s += ' '\r\n s += a[i][2]\r\n\r\n if (a[i][3] != null) {\r\n s += ' '\r\n s += a[i][3]\r\n s += ' '\r\n s += a[i][4]\r\n\r\n if (a[i][5] != null) {\r\n s += ' '\r\n s += a[i][5]\r\n s += ' '\r\n s += a[i][6]\r\n\r\n if (a[i][7] != null) {\r\n s += ' '\r\n s += a[i][7]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return s + ' '\r\n}\r\n\r\n// Deep new id assignment\r\nfunction assignNewId(node) {\r\n // do the same for SVG child nodes as well\r\n for (var i = node.childNodes.length - 1; i >= 0; i--)\r\n if (node.childNodes[i] instanceof window.SVGElement)\r\n assignNewId(node.childNodes[i])\r\n\r\n return SVG.adopt(node).id(SVG.eid(node.nodeName))\r\n}\r\n\r\n// Add more bounding box properties\r\nfunction fullBox(b) {\r\n if (b.x == null) {\r\n b.x = 0\r\n b.y = 0\r\n b.width = 0\r\n b.height = 0\r\n }\r\n\r\n b.w = b.width\r\n b.h = b.height\r\n b.x2 = b.x + b.width\r\n b.y2 = b.y + b.height\r\n b.cx = b.x + b.width / 2\r\n b.cy = b.y + b.height / 2\r\n\r\n return b\r\n}\r\n\r\n// Get id from reference string\r\nfunction idFromReference(url) {\r\n var m = (url || '').toString().match(SVG.regex.reference)\r\n\r\n if (m) return m[1]\r\n}\r\n\r\n// If values like 1e-88 are passed, this is not a valid 32 bit float,\r\n// but in those cases, we are so close to 0 that 0 works well!\r\nfunction float32String(v) {\r\n return Math.abs(v) > 1e-37 ? v : 0\r\n}\r\n\r\n// Create matrix array for looping\r\nvar abcdef = 'abcdef'.split('')\r\n\n// Add CustomEvent to IE9 and IE10\r\nif (typeof window.CustomEvent !== 'function') {\r\n // Code from: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent\r\n var CustomEventPoly = function(event, options) {\r\n options = options || { bubbles: false, cancelable: false, detail: undefined }\r\n var e = document.createEvent('CustomEvent')\r\n e.initCustomEvent(event, options.bubbles, options.cancelable, options.detail)\r\n return e\r\n }\r\n\r\n CustomEventPoly.prototype = window.Event.prototype\r\n\r\n SVG.CustomEvent = CustomEventPoly\r\n} else {\r\n SVG.CustomEvent = window.CustomEvent\r\n}\r\n\r\n// requestAnimationFrame / cancelAnimationFrame Polyfill with fallback based on Paul Irish\r\n(function(w) {\r\n var lastTime = 0\r\n var vendors = ['moz', 'webkit']\r\n\r\n for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\r\n w.requestAnimationFrame = w[vendors[x] + 'RequestAnimationFrame']\r\n w.cancelAnimationFrame = w[vendors[x] + 'CancelAnimationFrame'] ||\r\n w[vendors[x] + 'CancelRequestAnimationFrame']\r\n }\r\n\r\n w.requestAnimationFrame = w.requestAnimationFrame ||\r\n function(callback) {\r\n var currTime = new Date().getTime()\r\n var timeToCall = Math.max(0, 16 - (currTime - lastTime))\r\n\r\n var id = w.setTimeout(function() {\r\n callback(currTime + timeToCall)\r\n }, timeToCall)\r\n\r\n lastTime = currTime + timeToCall\r\n return id\r\n }\r\n\r\n w.cancelAnimationFrame = w.cancelAnimationFrame || w.clearTimeout;\r\n\r\n}(window))\r\n\r\nreturn SVG\r\n\r\n}));\r","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar constants_1 = require(\"../constants\");\nvar constants_2 = require(\"../../constants\");\nvar color_1 = require(\"./color\");\nvar stickerPattern = '([URFDLB])([0-9]+)';\nvar colorPattern = '(black|dgrey|grey|silver|white|yellow|red|orange|blue|green|purple|pink|[0-9a-fA-F]{6}|[0-9a-fA-F]{3})';\nvar arrowPattern = \"^(\" + stickerPattern + \")(\" + stickerPattern + \")(\" + stickerPattern + \")?(-s([0-9+]))?(-i([0-9+]))?(-\" + colorPattern + \")?\";\nfunction parseArrows(raw) {\n if (typeof raw !== 'string') {\n return [];\n }\n return raw\n .split(',')\n .map(function (part) { return parseArrow(part); })\n .filter(function (arrow) { return !!arrow; });\n}\nexports.parseArrows = parseArrows;\nfunction parseArrow(raw) {\n if (typeof raw !== 'string') {\n return null;\n }\n var arrowRegex = new RegExp(arrowPattern);\n var match = arrowRegex.exec(raw);\n if (!match) {\n return null;\n }\n return {\n s1: {\n face: constants_1.Face[match[2]],\n n: parseInt(match[3]),\n },\n s2: {\n face: constants_1.Face[match[5]],\n n: parseInt(match[6]),\n },\n s3: !match[7]\n ? undefined\n : {\n face: constants_1.Face[match[8]],\n n: parseInt(match[9]),\n },\n color: match[15] ? color_1.parseColor(match[15]) : constants_2.ColorCode.Gray,\n scale: match[11] ? parseInt(match[11]) : 10,\n influence: match[13] ? parseInt(match[13]) : 10,\n };\n}\nexports.parseArrow = parseArrow;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar constants_1 = require(\"../../constants\");\nfunction parseColor(raw) {\n var colorcodeRegex = /^[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/;\n // Append # for color codes\n if (colorcodeRegex.exec(raw)) {\n return \"#\" + raw;\n }\n if (constants_1.ColorAbbreviationToCode[raw]) {\n return constants_1.ColorAbbreviationToCode[raw];\n }\n if (constants_1.ColorNameToCode[raw]) {\n return constants_1.ColorNameToCode[raw];\n }\n // Default color\n return constants_1.ColorCode.Gray;\n}\nexports.parseColor = parseColor;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar masking_1 = require(\"./masking\");\nvar simulation_1 = require(\"./simulation\");\nvar algorithm_1 = require(\"./parsing/algorithm\");\nvar constants_1 = require(\"./constants\");\nvar constants_2 = require(\"../constants\");\nfunction makeStickerColors(options) {\n var stickerColors = options.stickerColors;\n var mask = options.mask ? masking_1.makeMasking(options.mask, options.cubeSize) : null;\n if (mask && options.maskAlg) {\n var maskCubeData_1 = new simulation_1.CubeData(options.cubeSize, mask);\n var alg_1 = algorithm_1.parseAlgorithm(options.maskAlg);\n alg_1.forEach(function (turn) {\n maskCubeData_1.turn(turn);\n });\n mask = maskCubeData_1.faces;\n }\n // Fill with color scheme if sticker colors not predefined.\n if (!stickerColors) {\n stickerColors = [].concat.apply([], constants_1.AllFaces.map(function (face) {\n return Array.apply(null, Array(options.cubeSize * options.cubeSize)).map(function () { return options.colorScheme[face]; });\n }));\n }\n var faceMappedStickers = constants_1.AllFaces.reduce(function (acc, face) {\n if (!acc[face])\n acc[face] = [];\n for (var i = 0; i < options.cubeSize; i++) {\n for (var j = 0; j < options.cubeSize; j++) {\n var faceIndex = constants_1.AllFaces.indexOf(face);\n var stickerNumber = i * options.cubeSize + j;\n var colorIndex = faceIndex * (options.cubeSize * options.cubeSize) + stickerNumber;\n if (stickerColors.length <= colorIndex) {\n acc[face][options.cubeSize * i + j] = constants_2.ColorName.Black;\n }\n else {\n acc[face][options.cubeSize * i + j] = stickerColors[colorIndex];\n }\n if (mask && !mask[face][options.cubeSize * i + j]) {\n acc[face][options.cubeSize * i + j] = constants_2.ColorCode.DarkGray;\n }\n }\n }\n return acc;\n }, {});\n // Apply Algorithm\n var cubeData = new simulation_1.CubeData(options.cubeSize, faceMappedStickers);\n var alg = algorithm_1.parseAlgorithm(options.algorithm);\n alg.forEach(function (move) {\n cubeData.turn(move);\n });\n return [].concat.apply([], constants_1.AllFaces.map(function (face) { return cubeData.faces[face].slice(); }));\n}\nexports.makeStickerColors = makeStickerColors;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;\nvar constants_1 = require(\"./constants\");\nvar maskingFunctions = (_a = {},\n _a[constants_1.Masking.FL] = (_b = {},\n _b[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _b[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _b[constants_1.Face.R] = function (row, col, cubeSize) { return row == cubeSize - 1; },\n _b[constants_1.Face.L] = function (row, col, cubeSize) { return row == cubeSize - 1; },\n _b[constants_1.Face.F] = function (row, col, cubeSize) { return row == cubeSize - 1; },\n _b[constants_1.Face.B] = function (row, col, cubeSize) { return row == cubeSize - 1; },\n _b),\n _a[constants_1.Masking.F2L] = (_c = {},\n _c[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _c[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _c[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _c[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _c[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0; },\n _c[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _c),\n _a[constants_1.Masking.LL] = (_d = {},\n _d[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _d[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _d[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0; },\n _d[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0; },\n _d[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0; },\n _d[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0; },\n _d),\n _a[constants_1.Masking.CLL] = (_e = {},\n _e[constants_1.Face.U] = function (row, col, cubeSize) {\n return (row > 0 && col > 0 && row < cubeSize - 1 && col < cubeSize - 1) || // is center\n ((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1));\n },\n _e[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _e[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _e[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _e[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _e[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _e),\n _a[constants_1.Masking.ELL] = (_f = {},\n _f[constants_1.Face.U] = function (row, col, cubeSize) { return !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)); },\n _f[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _f[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _f[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _f[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _f[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _f),\n _a[constants_1.Masking.OLL] = (_g = {},\n _g[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _g[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _g[constants_1.Face.R] = function (row, col, cubeSize) { return false; },\n _g[constants_1.Face.L] = function (row, col, cubeSize) { return false; },\n _g[constants_1.Face.F] = function (row, col, cubeSize) { return false; },\n _g[constants_1.Face.B] = function (row, col, cubeSize) { return false; },\n _g),\n _a[constants_1.Masking.OCLL] = (_h = {},\n _h[constants_1.Face.U] = function (row, col, cubeSize) {\n return (row > 0 && col > 0 && row < cubeSize - 1 && col < cubeSize - 1) || // is center\n ((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1));\n },\n _h[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _h[constants_1.Face.R] = function (row, col, cubeSize) { return false; },\n _h[constants_1.Face.L] = function (row, col, cubeSize) { return false; },\n _h[constants_1.Face.F] = function (row, col, cubeSize) { return false; },\n _h[constants_1.Face.B] = function (row, col, cubeSize) { return false; },\n _h),\n _a[constants_1.Masking.OELL] = (_j = {},\n _j[constants_1.Face.U] = function (row, col, cubeSize) { return !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)); },\n _j[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _j[constants_1.Face.R] = function (row, col, cubeSize) { return false; },\n _j[constants_1.Face.L] = function (row, col, cubeSize) { return false; },\n _j[constants_1.Face.F] = function (row, col, cubeSize) { return false; },\n _j[constants_1.Face.B] = function (row, col, cubeSize) { return false; },\n _j),\n _a[constants_1.Masking.COLL] = (_k = {},\n _k[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _k[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _k[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _k[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _k[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _k[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0 && (col == 0 || col == cubeSize - 1); },\n _k),\n _a[constants_1.Masking.OCELL] = (_l = {},\n _l[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _l[constants_1.Face.D] = function (row, col, cubeSize) { return false; },\n _l[constants_1.Face.R] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _l[constants_1.Face.L] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _l[constants_1.Face.F] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _l[constants_1.Face.B] = function (row, col, cubeSize) { return row == 0 && col > 0 && col < cubeSize - 1; },\n _l),\n _a[constants_1.Masking.WV] = (_m = {},\n _m[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _m[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _m[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _m[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _m[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0; },\n _m[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _m),\n _a[constants_1.Masking.VH] = (_o = {},\n _o[constants_1.Face.U] = function (row, col, cubeSize) { return !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)); },\n _o[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _o[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _o[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _o[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0; },\n _o[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _o),\n _a[constants_1.Masking.ELS] = (_p = {},\n _p[constants_1.Face.U] = function (row, col, cubeSize) { return !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)); },\n _p[constants_1.Face.D] = function (row, col, cubeSize) { return (row == 0 ? col < cubeSize - 1 : true); },\n _p[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && (row == cubeSize - 1 ? col > 0 : true); },\n _p[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _p[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && (row == cubeSize - 1 ? col < cubeSize - 1 : true); },\n _p[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _p),\n _a[constants_1.Masking.CLS] = (_q = {},\n _q[constants_1.Face.U] = function (row, col, cubeSize) { return true; },\n _q[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _q[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _q[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _q[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0; },\n _q[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _q),\n _a[constants_1.Masking.CMLL] = (_r = {},\n _r[constants_1.Face.U] = function (row, col, cubeSize) { return (row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1); },\n _r[constants_1.Face.D] = function (row, col, cubeSize) { return true; },\n _r[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 || col == 0 || col == cubeSize - 1; },\n _r[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 || col == 0 || col == cubeSize - 1; },\n _r[constants_1.Face.F] = function (row, col, cubeSize) { return col == 0 || col == cubeSize - 1; },\n _r[constants_1.Face.B] = function (row, col, cubeSize) { return col == 0 || col == cubeSize - 1; },\n _r),\n _a[constants_1.Masking.CROSS] = (_s = {},\n _s[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _s[constants_1.Face.D] = function (row, col, cubeSize) { return !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)); },\n _s[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _s[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _s[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _s[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _s),\n _a[constants_1.Masking.F2L3] = (_t = {},\n _t[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _t[constants_1.Face.D] = function (row, col, cubeSize) {\n return (row == 0 && col == cubeSize - 1) || !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1));\n },\n _t[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _t[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _t[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _t[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _t),\n _a[constants_1.Masking.F2L2] = (_u = {},\n _u[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _u[constants_1.Face.D] = function (row, col, cubeSize) { return row > 0 || (col > 0 && col < cubeSize - 1); },\n _u[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _u[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _u[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _u[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _u),\n _a[constants_1.Masking.F2LSM] = (_v = {},\n _v[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _v[constants_1.Face.D] = function (row, col, cubeSize) {\n return !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)) ||\n (col == 0 && row == cubeSize - 1) ||\n (row == 0 && col == cubeSize - 1);\n },\n _v[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _v[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _v[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _v[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _v),\n _a[constants_1.Masking.F2L1] = (_w = {},\n _w[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _w[constants_1.Face.D] = function (row, col, cubeSize) { return row !== 0 || col !== cubeSize - 1; },\n _w[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0 && col > 0; },\n _w[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _w[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col < cubeSize - 1; },\n _w[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0; },\n _w),\n _a[constants_1.Masking.F2B] = (_x = {},\n _x[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _x[constants_1.Face.D] = function (row, col, cubeSize) { return col == 0 || col == cubeSize - 1; },\n _x[constants_1.Face.R] = function (row, col, cubeSize) { return row > 0; },\n _x[constants_1.Face.L] = function (row, col, cubeSize) { return row > 0; },\n _x[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && (col == 0 || col == cubeSize - 1); },\n _x[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && (col == 0 || col == cubeSize - 1); },\n _x),\n _a[constants_1.Masking.LINE] = (_y = {},\n _y[constants_1.Face.U] = function (row, col, cubeSize) { return false; },\n _y[constants_1.Face.D] = function (row, col, cubeSize) { return col > 0 && col < cubeSize - 1; },\n _y[constants_1.Face.R] = function (row, col, cubeSize) { return false; },\n _y[constants_1.Face.L] = function (row, col, cubeSize) { return false; },\n _y[constants_1.Face.F] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _y[constants_1.Face.B] = function (row, col, cubeSize) { return row > 0 && col > 0 && col < cubeSize - 1; },\n _y),\n _a);\nfunction makeMasking(masking, cubeSize) {\n var _a;\n if (!maskingFunctions[masking]) {\n throw new Error(\"invalid masking \" + masking);\n }\n var numStickers = cubeSize * cubeSize;\n var faceValues = (_a = {},\n _a[constants_1.Face.U] = [],\n _a[constants_1.Face.F] = [],\n _a[constants_1.Face.R] = [],\n _a[constants_1.Face.D] = [],\n _a[constants_1.Face.L] = [],\n _a[constants_1.Face.B] = [],\n _a);\n var _loop_1 = function (i) {\n var row = Math.floor(i / cubeSize);\n var col = i % cubeSize;\n constants_1.AllFaces.forEach(function (face) {\n faceValues[face].push(maskingFunctions[masking][face](row, col, cubeSize));\n });\n };\n for (var i = 0; i < numStickers; i++) {\n _loop_1(i);\n }\n return faceValues;\n}\nexports.makeMasking = makeMasking;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar simulation_1 = require(\"../simulation\");\nvar constants_1 = require(\"../constants\");\n/**\n * Takes in an algorithm string and parses the turns from it\n * algorithm string format should be moves separated by a single space\n * (ex. \"U R2 L' x\")\n */\nfunction parseAlgorithm(algorithm) {\n if (!algorithm) {\n return [];\n }\n return algorithm.split(' ').map(function (move) {\n if (move.length > 2) {\n throw new Error(\"Invalid move (\" + move + \") in algorithm '\" + algorithm + \"'\");\n }\n return {\n move: getMove(move),\n turnType: getTurnType(move),\n };\n });\n}\nexports.parseAlgorithm = parseAlgorithm;\nfunction getMove(move) {\n if (constants_1.possibleMoves.indexOf(move.charAt(0)) < 0) {\n throw new Error(\"invalid move (\" + move + \")\");\n }\n else\n return move.charAt(0);\n}\nfunction getTurnType(move) {\n switch (move.charAt(1) // if string is only length 1 .charAt(1) will return empty string\n ) {\n case constants_1.TurnAbbreviation.Clockwise:\n return simulation_1.TurnType.Clockwise;\n case constants_1.TurnAbbreviation.CounterClockwise:\n return simulation_1.TurnType.CounterClockwise;\n case constants_1.TurnAbbreviation.Double:\n return simulation_1.TurnType.Double;\n default:\n throw new Error(\"Invalid move modifier (\" + move.charAt(1) + \") in move '\" + move + \"'\");\n }\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7bea9c7..c3d2cf2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "sr-visualizer", - "version": "1.0.0", + "version": "1.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -78,7 +78,7 @@ "integrity": "sha512-Mmqx/cS68K1tSrvRLtaV/Lp3NZWzXtOHUW2IvDvl2sihAwJh4ACE0eL6A8FvMyDG9abes3saB6dMimLOs+HMoQ==", "dev": true, "requires": { - "@xtuc/ieee754": "1.2.0" + "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { @@ -200,7 +200,7 @@ "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "dev": true, "requires": { - "acorn": "5.7.3" + "acorn": "^5.0.0" } }, "ajv": { @@ -209,10 +209,10 @@ "integrity": "sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==", "dev": true, "requires": { - "fast-deep-equal": "2.0.1", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.4.1", - "uri-js": "4.2.2" + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, "ajv-errors": { @@ -239,7 +239,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.3" + "color-convert": "^1.9.0" } }, "anymatch": { @@ -248,8 +248,8 @@ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { - "micromatch": "3.1.10", - "normalize-path": "2.1.1" + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" } }, "aproba": { @@ -288,9 +288,9 @@ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "dev": true, "requires": { - "bn.js": "4.11.8", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "assert": { @@ -349,13 +349,13 @@ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { - "cache-base": "1.0.1", - "class-utils": "0.3.6", - "component-emitter": "1.2.1", - "define-property": "1.0.0", - "isobject": "3.0.1", - "mixin-deep": "1.3.1", - "pascalcase": "0.1.1" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { @@ -364,7 +364,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -373,7 +373,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -382,7 +382,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -391,9 +391,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -434,7 +434,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -444,16 +444,16 @@ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "arr-flatten": "1.1.0", - "array-unique": "0.3.2", - "extend-shallow": "2.0.1", - "fill-range": "4.0.0", - "isobject": "3.0.1", - "repeat-element": "1.1.3", - "snapdragon": "0.8.2", - "snapdragon-node": "2.1.1", - "split-string": "3.1.0", - "to-regex": "3.0.2" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -462,7 +462,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -479,12 +479,12 @@ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "browserify-cipher": { @@ -493,9 +493,9 @@ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { - "browserify-aes": "1.2.0", - "browserify-des": "1.0.2", - "evp_bytestokey": "1.0.3" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, "browserify-des": { @@ -504,10 +504,10 @@ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "browserify-rsa": { @@ -516,8 +516,8 @@ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { - "bn.js": "4.11.8", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" } }, "browserify-sign": { @@ -526,13 +526,13 @@ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "elliptic": "6.4.1", - "inherits": "2.0.3", - "parse-asn1": "5.1.1" + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" } }, "browserify-zlib": { @@ -541,7 +541,7 @@ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "pako": "1.0.7" + "pako": "~1.0.5" } }, "buffer": { @@ -550,9 +550,9 @@ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { - "base64-js": "1.3.0", - "ieee754": "1.1.12", - "isarray": "1.0.0" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, "buffer-from": { @@ -579,20 +579,20 @@ "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", "dev": true, "requires": { - "bluebird": "3.5.3", - "chownr": "1.1.1", - "figgy-pudding": "3.5.1", - "glob": "7.1.3", - "graceful-fs": "4.1.15", - "lru-cache": "5.1.1", - "mississippi": "3.0.0", - "mkdirp": "0.5.1", - "move-concurrently": "1.0.1", - "promise-inflight": "1.0.1", - "rimraf": "2.6.2", - "ssri": "6.0.1", - "unique-filename": "1.1.1", - "y18n": "4.0.0" + "bluebird": "^3.5.3", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" } }, "cache-base": { @@ -601,15 +601,15 @@ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { - "collection-visit": "1.0.0", - "component-emitter": "1.2.1", - "get-value": "2.0.6", - "has-value": "1.0.0", - "isobject": "3.0.1", - "set-value": "2.0.0", - "to-object-path": "0.3.0", - "union-value": "1.0.0", - "unset-value": "1.0.0" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "camelcase": { @@ -624,9 +624,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.5.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "chokidar": { @@ -635,19 +635,19 @@ "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", "dev": true, "requires": { - "anymatch": "2.0.0", - "async-each": "1.0.1", - "braces": "2.3.2", - "fsevents": "1.2.4", - "glob-parent": "3.1.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "4.0.0", - "lodash.debounce": "4.0.8", - "normalize-path": "2.1.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.2.1", - "upath": "1.1.0" + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" } }, "chownr": { @@ -662,7 +662,7 @@ "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==", "dev": true, "requires": { - "tslib": "1.9.3" + "tslib": "^1.9.0" } }, "cipher-base": { @@ -671,8 +671,8 @@ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "class-utils": { @@ -681,10 +681,10 @@ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "arr-union": "3.1.0", - "define-property": "0.2.5", - "isobject": "3.0.1", - "static-extend": "0.1.2" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { "define-property": { @@ -693,7 +693,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -704,9 +704,9 @@ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "wrap-ansi": "2.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "code-point-at": { @@ -721,8 +721,8 @@ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { - "map-visit": "1.0.0", - "object-visit": "1.0.1" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "color-convert": { @@ -770,10 +770,10 @@ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "buffer-from": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "console-browserify": { @@ -782,7 +782,7 @@ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "date-now": "0.1.4" + "date-now": "^0.1.4" } }, "constants-browserify": { @@ -797,12 +797,12 @@ "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "dev": true, "requires": { - "aproba": "1.2.0", - "fs-write-stream-atomic": "1.0.10", - "iferr": "0.1.5", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" } }, "copy-descriptor": { @@ -823,8 +823,8 @@ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "dev": true, "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.1" + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" } }, "create-hash": { @@ -833,11 +833,11 @@ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.3", - "md5.js": "1.3.5", - "ripemd160": "2.0.2", - "sha.js": "2.4.11" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, "create-hmac": { @@ -846,12 +846,12 @@ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.2.0", - "inherits": "2.0.3", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "cross-spawn": { @@ -860,11 +860,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "1.0.5", - "path-key": "2.0.1", - "semver": "5.6.0", - "shebang-command": "1.2.0", - "which": "1.3.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, "crypto-browserify": { @@ -873,17 +873,17 @@ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "browserify-cipher": "1.0.1", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.3", - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "diffie-hellman": "5.0.3", - "inherits": "2.0.3", - "pbkdf2": "3.0.17", - "public-encrypt": "4.0.3", - "randombytes": "2.0.6", - "randomfill": "1.0.4" + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" } }, "cyclist": { @@ -925,8 +925,8 @@ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "requires": { - "is-descriptor": "1.0.2", - "isobject": "3.0.1" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { @@ -935,7 +935,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -944,7 +944,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -953,9 +953,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -966,8 +966,8 @@ "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "dev": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, "diffie-hellman": { @@ -976,9 +976,9 @@ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.0.6" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, "domain-browser": { @@ -993,10 +993,10 @@ "integrity": "sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==", "dev": true, "requires": { - "end-of-stream": "1.4.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "stream-shift": "1.0.0" + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" } }, "elliptic": { @@ -1005,13 +1005,13 @@ "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.7", - "hmac-drbg": "1.0.1", - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" } }, "emojis-list": { @@ -1026,7 +1026,7 @@ "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "dev": true, "requires": { - "once": "1.4.0" + "once": "^1.4.0" } }, "enhanced-resolve": { @@ -1035,9 +1035,9 @@ "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "memory-fs": "0.4.1", - "tapable": "1.1.1" + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" } }, "errno": { @@ -1046,7 +1046,7 @@ "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "dev": true, "requires": { - "prr": "1.0.1" + "prr": "~1.0.1" } }, "escape-string-regexp": { @@ -1061,8 +1061,8 @@ "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" } }, "esrecurse": { @@ -1071,7 +1071,7 @@ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0" + "estraverse": "^4.1.0" } }, "estraverse": { @@ -1092,8 +1092,8 @@ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "md5.js": "1.3.5", - "safe-buffer": "5.1.2" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, "execa": { @@ -1102,13 +1102,13 @@ "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { - "cross-spawn": "6.0.5", - "get-stream": "4.1.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, "expand-brackets": { @@ -1117,13 +1117,13 @@ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, "requires": { - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "posix-character-classes": "0.1.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -1132,7 +1132,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -1141,7 +1141,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -1152,8 +1152,8 @@ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "assign-symbols": "1.0.0", - "is-extendable": "1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -1162,7 +1162,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -1173,14 +1173,14 @@ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { - "array-unique": "0.3.2", - "define-property": "1.0.0", - "expand-brackets": "2.1.4", - "extend-shallow": "2.0.1", - "fragment-cache": "0.2.1", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { "define-property": { @@ -1189,7 +1189,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "extend-shallow": { @@ -1198,7 +1198,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { @@ -1207,7 +1207,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -1216,7 +1216,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -1225,9 +1225,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -1256,10 +1256,10 @@ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-number": "3.0.0", - "repeat-string": "1.6.1", - "to-regex-range": "2.1.1" + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { @@ -1268,7 +1268,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -1279,9 +1279,9 @@ "integrity": "sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==", "dev": true, "requires": { - "commondir": "1.0.1", - "make-dir": "1.3.0", - "pkg-dir": "3.0.0" + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" } }, "find-up": { @@ -1290,7 +1290,7 @@ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "locate-path": "3.0.0" + "locate-path": "^3.0.0" } }, "flush-write-stream": { @@ -1299,8 +1299,8 @@ "integrity": "sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" } }, "for-in": { @@ -1315,7 +1315,7 @@ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { - "map-cache": "0.2.2" + "map-cache": "^0.2.2" } }, "from2": { @@ -1324,8 +1324,8 @@ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" } }, "fs-write-stream-atomic": { @@ -1334,10 +1334,10 @@ "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "iferr": "0.1.5", - "imurmurhash": "0.1.4", - "readable-stream": "2.3.6" + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" } }, "fs.realpath": { @@ -1353,8 +1353,8 @@ "dev": true, "optional": true, "requires": { - "nan": "2.12.1", - "node-pre-gyp": "0.10.0" + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" }, "dependencies": { "abbrev": { @@ -1380,8 +1380,8 @@ "dev": true, "optional": true, "requires": { - "delegates": "1.0.0", - "readable-stream": "2.3.6" + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" } }, "balanced-match": { @@ -1394,7 +1394,7 @@ "bundled": true, "dev": true, "requires": { - "balanced-match": "1.0.0", + "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, @@ -1458,7 +1458,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "fs.realpath": { @@ -1473,14 +1473,14 @@ "dev": true, "optional": true, "requires": { - "aproba": "1.2.0", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" } }, "glob": { @@ -1489,12 +1489,12 @@ "dev": true, "optional": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "has-unicode": { @@ -1509,7 +1509,7 @@ "dev": true, "optional": true, "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": "^2.1.0" } }, "ignore-walk": { @@ -1518,7 +1518,7 @@ "dev": true, "optional": true, "requires": { - "minimatch": "3.0.4" + "minimatch": "^3.0.4" } }, "inflight": { @@ -1527,8 +1527,8 @@ "dev": true, "optional": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -1547,7 +1547,7 @@ "bundled": true, "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "isarray": { @@ -1561,7 +1561,7 @@ "bundled": true, "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -1574,8 +1574,8 @@ "bundled": true, "dev": true, "requires": { - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" } }, "minizlib": { @@ -1584,7 +1584,7 @@ "dev": true, "optional": true, "requires": { - "minipass": "2.2.4" + "minipass": "^2.2.1" } }, "mkdirp": { @@ -1607,9 +1607,9 @@ "dev": true, "optional": true, "requires": { - "debug": "2.6.9", - "iconv-lite": "0.4.21", - "sax": "1.2.4" + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" } }, "node-pre-gyp": { @@ -1618,16 +1618,16 @@ "dev": true, "optional": true, "requires": { - "detect-libc": "1.0.3", - "mkdirp": "0.5.1", - "needle": "2.2.0", - "nopt": "4.0.1", - "npm-packlist": "1.1.10", - "npmlog": "4.1.2", - "rc": "1.2.7", - "rimraf": "2.6.2", - "semver": "5.5.0", - "tar": "4.4.1" + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" } }, "nopt": { @@ -1636,8 +1636,8 @@ "dev": true, "optional": true, "requires": { - "abbrev": "1.1.1", - "osenv": "0.1.5" + "abbrev": "1", + "osenv": "^0.1.4" } }, "npm-bundled": { @@ -1652,8 +1652,8 @@ "dev": true, "optional": true, "requires": { - "ignore-walk": "3.0.1", - "npm-bundled": "1.0.3" + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" } }, "npmlog": { @@ -1662,10 +1662,10 @@ "dev": true, "optional": true, "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" } }, "number-is-nan": { @@ -1684,7 +1684,7 @@ "bundled": true, "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-homedir": { @@ -1705,8 +1705,8 @@ "dev": true, "optional": true, "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { @@ -1727,10 +1727,10 @@ "dev": true, "optional": true, "requires": { - "deep-extend": "0.5.1", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { @@ -1747,13 +1747,13 @@ "dev": true, "optional": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "rimraf": { @@ -1762,7 +1762,7 @@ "dev": true, "optional": true, "requires": { - "glob": "7.1.2" + "glob": "^7.0.5" } }, "safe-buffer": { @@ -1805,9 +1805,9 @@ "bundled": true, "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "string_decoder": { @@ -1816,7 +1816,7 @@ "dev": true, "optional": true, "requires": { - "safe-buffer": "5.1.1" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -1824,7 +1824,7 @@ "bundled": true, "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } }, "strip-json-comments": { @@ -1839,13 +1839,13 @@ "dev": true, "optional": true, "requires": { - "chownr": "1.0.1", - "fs-minipass": "1.2.5", - "minipass": "2.2.4", - "minizlib": "1.1.0", - "mkdirp": "0.5.1", - "safe-buffer": "5.1.1", - "yallist": "3.0.2" + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" } }, "util-deprecate": { @@ -1860,7 +1860,7 @@ "dev": true, "optional": true, "requires": { - "string-width": "1.0.2" + "string-width": "^1.0.2" } }, "wrappy": { @@ -1887,7 +1887,7 @@ "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, "requires": { - "pump": "3.0.0" + "pump": "^3.0.0" } }, "get-value": { @@ -1902,12 +1902,12 @@ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, "glob-parent": { @@ -1916,8 +1916,8 @@ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "is-glob": "3.1.0", - "path-dirname": "1.0.2" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { @@ -1926,7 +1926,7 @@ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.0" } } } @@ -1955,9 +1955,9 @@ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "1.0.0", - "isobject": "3.0.1" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, "has-values": { @@ -1966,8 +1966,8 @@ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { @@ -1976,7 +1976,7 @@ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -1987,8 +1987,8 @@ "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "hash.js": { @@ -1997,8 +1997,8 @@ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.1" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, "hmac-drbg": { @@ -2007,9 +2007,9 @@ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { - "hash.js": "1.1.7", - "minimalistic-assert": "1.0.1", - "minimalistic-crypto-utils": "1.0.1" + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, "https-browserify": { @@ -2036,8 +2036,8 @@ "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", "dev": true, "requires": { - "pkg-dir": "3.0.0", - "resolve-cwd": "2.0.0" + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" } }, "imurmurhash": { @@ -2058,8 +2058,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" + "once": "^1.3.0", + "wrappy": "1" } }, "inherits": { @@ -2086,7 +2086,7 @@ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -2095,7 +2095,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2106,7 +2106,7 @@ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { - "binary-extensions": "1.12.0" + "binary-extensions": "^1.0.0" } }, "is-buffer": { @@ -2121,7 +2121,7 @@ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -2130,7 +2130,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2141,9 +2141,9 @@ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { @@ -2178,7 +2178,7 @@ "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "is-extglob": "2.1.1" + "is-extglob": "^2.1.1" } }, "is-number": { @@ -2187,7 +2187,7 @@ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -2196,7 +2196,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2207,7 +2207,7 @@ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "is-stream": { @@ -2258,7 +2258,7 @@ "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { - "minimist": "1.2.0" + "minimist": "^1.2.0" } }, "kind-of": { @@ -2273,7 +2273,7 @@ "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { - "invert-kv": "2.0.0" + "invert-kv": "^2.0.0" } }, "loader-runner": { @@ -2288,9 +2288,9 @@ "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", "dev": true, "requires": { - "big.js": "5.2.2", - "emojis-list": "2.1.0", - "json5": "1.0.1" + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" } }, "locate-path": { @@ -2299,8 +2299,8 @@ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "p-locate": "3.0.0", - "path-exists": "3.0.0" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, "lodash.debounce": { @@ -2315,7 +2315,7 @@ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "yallist": "3.0.3" + "yallist": "^3.0.2" } }, "make-dir": { @@ -2324,7 +2324,7 @@ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { - "pify": "3.0.0" + "pify": "^3.0.0" } }, "map-age-cleaner": { @@ -2333,7 +2333,7 @@ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", "dev": true, "requires": { - "p-defer": "1.0.0" + "p-defer": "^1.0.0" } }, "map-cache": { @@ -2348,7 +2348,7 @@ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { - "object-visit": "1.0.1" + "object-visit": "^1.0.0" } }, "md5.js": { @@ -2357,9 +2357,9 @@ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "mem": { @@ -2368,9 +2368,9 @@ "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", "dev": true, "requires": { - "map-age-cleaner": "0.1.3", - "mimic-fn": "1.2.0", - "p-is-promise": "1.1.0" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^1.1.0" } }, "memory-fs": { @@ -2379,8 +2379,8 @@ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "dev": true, "requires": { - "errno": "0.1.7", - "readable-stream": "2.3.6" + "errno": "^0.1.3", + "readable-stream": "^2.0.1" } }, "micromatch": { @@ -2389,19 +2389,19 @@ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "braces": "2.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "extglob": "2.0.4", - "fragment-cache": "0.2.1", - "kind-of": "6.0.2", - "nanomatch": "1.2.13", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" } }, "miller-rabin": { @@ -2410,8 +2410,8 @@ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" + "bn.js": "^4.0.0", + "brorand": "^1.0.1" } }, "mimic-fn": { @@ -2438,7 +2438,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { - "brace-expansion": "1.1.11" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -2453,16 +2453,16 @@ "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", "dev": true, "requires": { - "concat-stream": "1.6.2", - "duplexify": "3.6.1", - "end-of-stream": "1.4.1", - "flush-write-stream": "1.0.3", - "from2": "2.3.0", - "parallel-transform": "1.1.0", - "pump": "3.0.0", - "pumpify": "1.5.1", - "stream-each": "1.2.3", - "through2": "2.0.5" + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" } }, "mixin-deep": { @@ -2471,8 +2471,8 @@ "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "dev": true, "requires": { - "for-in": "1.0.2", - "is-extendable": "1.0.1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { @@ -2481,7 +2481,7 @@ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "is-plain-object": "2.0.4" + "is-plain-object": "^2.0.4" } } } @@ -2509,12 +2509,12 @@ "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "dev": true, "requires": { - "aproba": "1.2.0", - "copy-concurrently": "1.0.5", - "fs-write-stream-atomic": "1.0.10", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "run-queue": "1.0.3" + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" } }, "ms": { @@ -2536,17 +2536,17 @@ "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, "requires": { - "arr-diff": "4.0.0", - "array-unique": "0.3.2", - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "fragment-cache": "0.2.1", - "is-windows": "1.0.2", - "kind-of": "6.0.2", - "object.pick": "1.3.0", - "regex-not": "1.0.2", - "snapdragon": "0.8.2", - "to-regex": "3.0.2" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" } }, "neo-async": { @@ -2567,28 +2567,28 @@ "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "dev": true, "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.2.0", - "buffer": "4.9.1", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "domain-browser": "1.2.0", - "events": "1.1.1", - "https-browserify": "1.0.0", - "os-browserify": "0.3.0", + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^1.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "1.4.1", - "querystring-es3": "0.2.1", - "readable-stream": "2.3.6", - "stream-browserify": "2.0.1", - "stream-http": "2.8.3", - "string_decoder": "1.1.1", - "timers-browserify": "2.0.10", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.4", + "url": "^0.11.0", + "util": "^0.10.3", "vm-browserify": "0.0.4" }, "dependencies": { @@ -2606,7 +2606,7 @@ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "npm-run-path": { @@ -2615,7 +2615,7 @@ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { - "path-key": "2.0.1" + "path-key": "^2.0.0" } }, "number-is-nan": { @@ -2630,9 +2630,9 @@ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { - "copy-descriptor": "0.1.1", - "define-property": "0.2.5", - "kind-of": "3.2.2" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -2641,7 +2641,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "kind-of": { @@ -2650,7 +2650,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -2661,7 +2661,7 @@ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.0" } }, "object.pick": { @@ -2670,7 +2670,7 @@ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "requires": { - "isobject": "3.0.1" + "isobject": "^3.0.1" } }, "once": { @@ -2679,7 +2679,7 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "wrappy": "1.0.2" + "wrappy": "1" } }, "os-browserify": { @@ -2694,9 +2694,9 @@ "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "dev": true, "requires": { - "execa": "1.0.0", - "lcid": "2.0.0", - "mem": "4.0.0" + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" } }, "p-defer": { @@ -2723,7 +2723,7 @@ "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", "dev": true, "requires": { - "p-try": "2.0.0" + "p-try": "^2.0.0" } }, "p-locate": { @@ -2732,7 +2732,7 @@ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "p-limit": "2.1.0" + "p-limit": "^2.0.0" } }, "p-try": { @@ -2753,9 +2753,9 @@ "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "dev": true, "requires": { - "cyclist": "0.2.2", - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" } }, "parse-asn1": { @@ -2764,11 +2764,11 @@ "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "dev": true, "requires": { - "asn1.js": "4.10.1", - "browserify-aes": "1.2.0", - "create-hash": "1.2.0", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.17" + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3" } }, "pascalcase": { @@ -2813,11 +2813,11 @@ "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "dev": true, "requires": { - "create-hash": "1.2.0", - "create-hmac": "1.1.7", - "ripemd160": "2.0.2", - "safe-buffer": "5.1.2", - "sha.js": "2.4.11" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, "pify": { @@ -2832,7 +2832,7 @@ "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, "requires": { - "find-up": "3.0.0" + "find-up": "^3.0.0" } }, "posix-character-classes": { @@ -2841,6 +2841,12 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, + "prettier": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.1.tgz", + "integrity": "sha512-XXUITwIkGb3CPJ2hforHah/zTINRyie5006Jd2HKy2qz7snEJXl0KLfsJZW/wst9g6R2rFvqba3VpNYdu1hDcA==", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2871,12 +2877,12 @@ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dev": true, "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.2.0", - "parse-asn1": "5.1.1", - "randombytes": "2.0.6", - "safe-buffer": "5.1.2" + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "pump": { @@ -2885,8 +2891,8 @@ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { - "end-of-stream": "1.4.1", - "once": "1.4.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, "pumpify": { @@ -2895,9 +2901,9 @@ "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, "requires": { - "duplexify": "3.6.1", - "inherits": "2.0.3", - "pump": "2.0.1" + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" }, "dependencies": { "pump": { @@ -2906,8 +2912,8 @@ "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "dev": true, "requires": { - "end-of-stream": "1.4.1", - "once": "1.4.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } } } @@ -2936,7 +2942,7 @@ "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "^5.1.0" } }, "randomfill": { @@ -2945,8 +2951,8 @@ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "dev": true, "requires": { - "randombytes": "2.0.6", - "safe-buffer": "5.1.2" + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" } }, "readable-stream": { @@ -2955,13 +2961,13 @@ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "readdirp": { @@ -2970,9 +2976,9 @@ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, "requires": { - "graceful-fs": "4.1.15", - "micromatch": "3.1.10", - "readable-stream": "2.3.6" + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" } }, "regex-not": { @@ -2981,8 +2987,8 @@ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "requires": { - "extend-shallow": "3.0.2", - "safe-regex": "1.1.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, "remove-trailing-separator": { @@ -3021,7 +3027,7 @@ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "resolve-from": "3.0.0" + "resolve-from": "^3.0.0" } }, "resolve-from": { @@ -3048,7 +3054,7 @@ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "requires": { - "glob": "7.1.3" + "glob": "^7.0.5" } }, "ripemd160": { @@ -3057,8 +3063,8 @@ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.3" + "hash-base": "^3.0.0", + "inherits": "^2.0.1" } }, "run-queue": { @@ -3067,7 +3073,7 @@ "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "dev": true, "requires": { - "aproba": "1.2.0" + "aproba": "^1.1.1" } }, "safe-buffer": { @@ -3082,7 +3088,7 @@ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { - "ret": "0.1.15" + "ret": "~0.1.10" } }, "schema-utils": { @@ -3091,8 +3097,8 @@ "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", "dev": true, "requires": { - "ajv": "6.6.2", - "ajv-keywords": "3.2.0" + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" } }, "semver": { @@ -3119,10 +3125,10 @@ "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "split-string": "3.1.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { @@ -3131,7 +3137,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -3148,8 +3154,8 @@ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { - "inherits": "2.0.3", - "safe-buffer": "5.1.2" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, "shebang-command": { @@ -3158,7 +3164,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "1.0.0" + "shebang-regex": "^1.0.0" } }, "shebang-regex": { @@ -3179,14 +3185,14 @@ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { - "base": "0.11.2", - "debug": "2.6.9", - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "map-cache": "0.2.2", - "source-map": "0.5.7", - "source-map-resolve": "0.5.2", - "use": "3.1.1" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { "define-property": { @@ -3195,7 +3201,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } }, "extend-shallow": { @@ -3204,7 +3210,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } } } @@ -3215,9 +3221,9 @@ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { - "define-property": "1.0.0", - "isobject": "3.0.1", - "snapdragon-util": "3.0.1" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { @@ -3226,7 +3232,7 @@ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, "requires": { - "is-descriptor": "1.0.2" + "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { @@ -3235,7 +3241,7 @@ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-data-descriptor": { @@ -3244,7 +3250,7 @@ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "kind-of": "6.0.2" + "kind-of": "^6.0.0" } }, "is-descriptor": { @@ -3253,9 +3259,9 @@ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "requires": { - "is-accessor-descriptor": "1.0.0", - "is-data-descriptor": "1.0.0", - "kind-of": "6.0.2" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } } } @@ -3266,7 +3272,7 @@ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.2.0" }, "dependencies": { "kind-of": { @@ -3275,7 +3281,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -3298,11 +3304,11 @@ "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "dev": true, "requires": { - "atob": "2.1.2", - "decode-uri-component": "0.2.0", - "resolve-url": "0.2.1", - "source-map-url": "0.4.0", - "urix": "0.1.0" + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, "source-map-support": { @@ -3311,8 +3317,8 @@ "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", "dev": true, "requires": { - "buffer-from": "1.1.1", - "source-map": "0.6.1" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" }, "dependencies": { "source-map": { @@ -3335,7 +3341,7 @@ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, "requires": { - "extend-shallow": "3.0.2" + "extend-shallow": "^3.0.0" } }, "ssri": { @@ -3344,7 +3350,7 @@ "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { - "figgy-pudding": "3.5.1" + "figgy-pudding": "^3.5.1" } }, "static-extend": { @@ -3353,8 +3359,8 @@ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { - "define-property": "0.2.5", - "object-copy": "0.1.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { "define-property": { @@ -3363,7 +3369,7 @@ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-descriptor": "0.1.6" + "is-descriptor": "^0.1.0" } } } @@ -3374,8 +3380,8 @@ "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "dev": true, "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.6" + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" } }, "stream-each": { @@ -3384,8 +3390,8 @@ "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", "dev": true, "requires": { - "end-of-stream": "1.4.1", - "stream-shift": "1.0.0" + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" } }, "stream-http": { @@ -3394,11 +3400,11 @@ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", "dev": true, "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" } }, "stream-shift": { @@ -3413,8 +3419,8 @@ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, "string_decoder": { @@ -3423,7 +3429,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "strip-ansi": { @@ -3432,7 +3438,7 @@ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "3.0.0" + "ansi-regex": "^3.0.0" } }, "strip-eof": { @@ -3447,7 +3453,7 @@ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" } }, "svg.js": { @@ -3467,9 +3473,9 @@ "integrity": "sha512-ogyZye4DFqOtMzT92Y3Nxxw8OvXmL39HOALro4fc+EUYFFF9G/kk0znkvwMz6PPYgBtdKAodh3FPR70eugdaQA==", "dev": true, "requires": { - "commander": "2.17.1", - "source-map": "0.6.1", - "source-map-support": "0.5.9" + "commander": "~2.17.1", + "source-map": "~0.6.1", + "source-map-support": "~0.5.6" }, "dependencies": { "source-map": { @@ -3486,14 +3492,14 @@ "integrity": "sha512-GGSt+gbT0oKcMDmPx4SRSfJPE1XaN3kQRWG4ghxKQw9cn5G9x6aCKSsgYdvyM0na9NJ4Drv0RG6jbBByZ5CMjw==", "dev": true, "requires": { - "cacache": "11.3.2", - "find-cache-dir": "2.0.0", - "schema-utils": "1.0.0", - "serialize-javascript": "1.6.1", - "source-map": "0.6.1", - "terser": "3.13.1", - "webpack-sources": "1.3.0", - "worker-farm": "1.6.0" + "cacache": "^11.0.2", + "find-cache-dir": "^2.0.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^1.4.0", + "source-map": "^0.6.1", + "terser": "^3.8.1", + "webpack-sources": "^1.1.0", + "worker-farm": "^1.5.2" }, "dependencies": { "schema-utils": { @@ -3502,9 +3508,9 @@ "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", "dev": true, "requires": { - "ajv": "6.6.2", - "ajv-errors": "1.0.1", - "ajv-keywords": "3.2.0" + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" } }, "source-map": { @@ -3521,8 +3527,8 @@ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { - "readable-stream": "2.3.6", - "xtend": "4.0.1" + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, "timers-browserify": { @@ -3531,7 +3537,7 @@ "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "dev": true, "requires": { - "setimmediate": "1.0.5" + "setimmediate": "^1.0.4" } }, "to-arraybuffer": { @@ -3546,7 +3552,7 @@ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { @@ -3555,7 +3561,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } } } @@ -3566,10 +3572,10 @@ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { - "define-property": "2.0.2", - "extend-shallow": "3.0.2", - "regex-not": "1.0.2", - "safe-regex": "1.1.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, "to-regex-range": { @@ -3578,8 +3584,8 @@ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { - "is-number": "3.0.0", - "repeat-string": "1.6.1" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, "ts-loader": { @@ -3588,11 +3594,11 @@ "integrity": "sha512-TPeXFkdPjOrVEawY4xUgRnzlHEmKQF1DclJghPGq67jKnroVvs6mEGHWYtbUczgeWTvTaqUjSSaMmp1k5do4vw==", "dev": true, "requires": { - "chalk": "2.4.1", - "enhanced-resolve": "4.1.0", - "loader-utils": "1.2.3", - "micromatch": "3.1.10", - "semver": "5.6.0" + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^1.0.2", + "micromatch": "^3.1.4", + "semver": "^5.0.1" } }, "tslib": { @@ -3625,10 +3631,10 @@ "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "dev": true, "requires": { - "arr-union": "3.1.0", - "get-value": "2.0.6", - "is-extendable": "0.1.1", - "set-value": "0.4.3" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { @@ -3637,7 +3643,7 @@ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "is-extendable": "0.1.1" + "is-extendable": "^0.1.0" } }, "set-value": { @@ -3646,10 +3652,10 @@ "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "dev": true, "requires": { - "extend-shallow": "2.0.1", - "is-extendable": "0.1.1", - "is-plain-object": "2.0.4", - "to-object-path": "0.3.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" } } } @@ -3660,7 +3666,7 @@ "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { - "unique-slug": "2.0.1" + "unique-slug": "^2.0.0" } }, "unique-slug": { @@ -3669,7 +3675,7 @@ "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", "dev": true, "requires": { - "imurmurhash": "0.1.4" + "imurmurhash": "^0.1.4" } }, "unset-value": { @@ -3678,8 +3684,8 @@ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { - "has-value": "0.3.1", - "isobject": "3.0.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { "has-value": { @@ -3688,9 +3694,9 @@ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { - "get-value": "2.0.6", - "has-values": "0.1.4", - "isobject": "2.1.0" + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" }, "dependencies": { "isobject": { @@ -3724,7 +3730,7 @@ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "dev": true, "requires": { - "punycode": "2.1.1" + "punycode": "^2.1.0" } }, "urix": { @@ -3793,9 +3799,9 @@ "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "dev": true, "requires": { - "chokidar": "2.0.4", - "graceful-fs": "4.1.15", - "neo-async": "2.6.0" + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" } }, "webpack": { @@ -3808,26 +3814,26 @@ "@webassemblyjs/helper-module-context": "1.7.11", "@webassemblyjs/wasm-edit": "1.7.11", "@webassemblyjs/wasm-parser": "1.7.11", - "acorn": "5.7.3", - "acorn-dynamic-import": "3.0.0", - "ajv": "6.6.2", - "ajv-keywords": "3.2.0", - "chrome-trace-event": "1.0.0", - "enhanced-resolve": "4.1.0", - "eslint-scope": "4.0.0", - "json-parse-better-errors": "1.0.2", - "loader-runner": "2.3.1", - "loader-utils": "1.2.3", - "memory-fs": "0.4.1", - "micromatch": "3.1.10", - "mkdirp": "0.5.1", - "neo-async": "2.6.0", - "node-libs-browser": "2.1.0", - "schema-utils": "0.4.7", - "tapable": "1.1.1", - "terser-webpack-plugin": "1.2.1", - "watchpack": "1.6.0", - "webpack-sources": "1.3.0" + "acorn": "^5.6.2", + "acorn-dynamic-import": "^3.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "chrome-trace-event": "^1.0.0", + "enhanced-resolve": "^4.1.0", + "eslint-scope": "^4.0.0", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "micromatch": "^3.1.8", + "mkdirp": "~0.5.0", + "neo-async": "^2.5.0", + "node-libs-browser": "^2.0.0", + "schema-utils": "^0.4.4", + "tapable": "^1.1.0", + "terser-webpack-plugin": "^1.1.0", + "watchpack": "^1.5.0", + "webpack-sources": "^1.3.0" } }, "webpack-cli": { @@ -3836,16 +3842,16 @@ "integrity": "sha512-Cnqo7CeqeSvC6PTdts+dywNi5CRlIPbLx1AoUPK2T6vC1YAugMG3IOoO9DmEscd+Dghw7uRlnzV1KwOe5IrtgQ==", "dev": true, "requires": { - "chalk": "2.4.1", - "cross-spawn": "6.0.5", - "enhanced-resolve": "4.1.0", - "global-modules-path": "2.3.1", - "import-local": "2.0.0", - "interpret": "1.2.0", - "loader-utils": "1.2.3", - "supports-color": "5.5.0", - "v8-compile-cache": "2.0.2", - "yargs": "12.0.5" + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.0", + "global-modules-path": "^2.3.0", + "import-local": "^2.0.0", + "interpret": "^1.1.0", + "loader-utils": "^1.1.0", + "supports-color": "^5.5.0", + "v8-compile-cache": "^2.0.2", + "yargs": "^12.0.2" } }, "webpack-sources": { @@ -3854,8 +3860,8 @@ "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", "dev": true, "requires": { - "source-list-map": "2.0.1", - "source-map": "0.6.1" + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" }, "dependencies": { "source-map": { @@ -3872,7 +3878,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "2.0.0" + "isexe": "^2.0.0" } }, "which-module": { @@ -3887,7 +3893,7 @@ "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==", "dev": true, "requires": { - "errno": "0.1.7" + "errno": "~0.1.7" } }, "wrap-ansi": { @@ -3896,8 +3902,8 @@ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" }, "dependencies": { "ansi-regex": { @@ -3912,7 +3918,7 @@ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "number-is-nan": "1.0.1" + "number-is-nan": "^1.0.0" } }, "string-width": { @@ -3921,9 +3927,9 @@ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" } }, "strip-ansi": { @@ -3932,7 +3938,7 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "ansi-regex": "2.1.1" + "ansi-regex": "^2.0.0" } } } @@ -3967,18 +3973,18 @@ "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "dev": true, "requires": { - "cliui": "4.1.0", - "decamelize": "1.2.0", - "find-up": "3.0.0", - "get-caller-file": "1.0.3", - "os-locale": "3.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "4.0.0", - "yargs-parser": "11.1.1" + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" } }, "yargs-parser": { @@ -3987,8 +3993,8 @@ "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "dev": true, "requires": { - "camelcase": "5.0.0", - "decamelize": "1.2.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } diff --git a/package.json b/package.json index ec7b765..c0c7cd4 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,13 @@ "main": "dist/main.js", "scripts": { "build": "webpack --mode production --config webpack.config.js --env.dist=true", - "dev": "webpack --progress --colors --watch --mode development --config webpack.config.js --env.dist=false" + "dev": "webpack --progress --colors --watch --mode development --config webpack.config.js --env.dist=false", + "pretty": "prettier --write \"src/**/*.ts\"" }, "author": "", "license": "ISC", "devDependencies": { + "prettier": "1.16.1", "ts-loader": "^5.3.2", "typescript": "^3.2.2", "webpack": "^4.28.3", diff --git a/src/constants.ts b/src/constants.ts index 161d324..705d2e6 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -25,7 +25,7 @@ export enum ColorName { Blue = 'blue', Green = 'green', Purple = 'purple', - Pink = 'pink' + Pink = 'pink', } export enum ColorAbbreviation { @@ -41,10 +41,10 @@ export enum ColorAbbreviation { Green = 'g', Purple = 'm', Pink = 'p', - Transparent = 't' + Transparent = 't', } -export const ColorNameToCode: { [name:string]: ColorCode } = { +export const ColorNameToCode: { [name: string]: ColorCode } = { [ColorName.Black]: ColorCode.Black, [ColorName.DarkGray]: ColorCode.DarkGray, [ColorName.Gray]: ColorCode.Gray, @@ -59,7 +59,7 @@ export const ColorNameToCode: { [name:string]: ColorCode } = { [ColorName.Pink]: ColorCode.Pink, } -export const ColorAbbreviationToCode: { [name:string]: ColorCode } = { +export const ColorAbbreviationToCode: { [name: string]: ColorCode } = { [ColorAbbreviation.Black]: ColorCode.Black, [ColorAbbreviation.DarkGray]: ColorCode.DarkGray, [ColorAbbreviation.Gray]: ColorCode.Gray, @@ -72,5 +72,5 @@ export const ColorAbbreviationToCode: { [name:string]: ColorCode } = { [ColorAbbreviation.Green]: ColorCode.Green, [ColorAbbreviation.Purple]: ColorCode.Purple, [ColorAbbreviation.Pink]: ColorCode.Pink, - [ColorAbbreviation.Transparent]: null -} \ No newline at end of file + [ColorAbbreviation.Transparent]: null, +} diff --git a/src/cube/constants.ts b/src/cube/constants.ts index 05dd807..000669f 100644 --- a/src/cube/constants.ts +++ b/src/cube/constants.ts @@ -1,5 +1,5 @@ -import { ColorCode } from './../constants'; -import { ICubeColorScheme } from "./models/color-scheme"; +import { ColorCode } from './../constants' +import { ICubeColorScheme } from './models/color-scheme' export enum Face { U = 0, @@ -10,22 +10,15 @@ export enum Face { B = 5, } -export const AllFaces = [ - Face.U, - Face.R, - Face.F, - Face.D, - Face.L, - Face.B, -] +export const AllFaces = [Face.U, Face.R, Face.F, Face.D, Face.L, Face.B] export class FaceRotationVectors { - static U = [0, -1, 0]; - static R = [1, 0, 0]; - static F = [0 ,0, -1]; - static D = [0, 1, 0]; - static L = [-1, 0, 0]; - static B = [0, 0, 1]; + static U = [0, -1, 0] + static R = [1, 0, 0] + static F = [0, 0, -1] + static D = [0, 1, 0] + static L = [-1, 0, 0] + static B = [0, 0, 1] } export const DefaultColorScheme: ICubeColorScheme = { @@ -34,7 +27,7 @@ export const DefaultColorScheme: ICubeColorScheme = { [Face.F]: ColorCode.Blue, [Face.D]: ColorCode.White, [Face.L]: ColorCode.Orange, - [Face.B]: ColorCode.Green + [Face.B]: ColorCode.Green, } export const JapaneseColorScheme: ICubeColorScheme = { @@ -43,7 +36,7 @@ export const JapaneseColorScheme: ICubeColorScheme = { [Face.F]: ColorCode.Green, [Face.D]: ColorCode.White, [Face.L]: ColorCode.Red, - [Face.B]: ColorCode.Yellow + [Face.B]: ColorCode.Yellow, } export enum AlgorithmUnit { @@ -58,7 +51,7 @@ export enum AlgorithmUnit { S = 'S', X = 'x', Y = 'y', - Z = 'z' + Z = 'z', } export const possibleMoves: string[] = [ @@ -78,8 +71,8 @@ export const possibleMoves: string[] = [ export enum TurnAbbreviation { Clockwise = '', - CounterClockwise = '\'', - Double = '2' + CounterClockwise = "'", + Double = '2', } export enum Masking { @@ -104,5 +97,5 @@ export enum Masking { F2LSM = 'f2l_sm', F2L1 = 'f2l_1', F2B = 'f2b', - LINE = 'line' -} \ No newline at end of file + LINE = 'line', +} diff --git a/src/cube/drawing.ts b/src/cube/drawing.ts index 74239ba..5eb5fca 100644 --- a/src/cube/drawing.ts +++ b/src/cube/drawing.ts @@ -1,11 +1,11 @@ -import { ColorName } from "./../constants"; -import * as SVG from "svg.js"; -import { CubeGeometry, FaceStickers, FaceRotations, rotateFaces } from "./geometry"; -import { Vec3, transScale, scale, translate, radians2Degrees } from "../math"; -import { Face, AllFaces } from "./constants"; -import { ICubeOptions } from "./options"; -import { Arrow } from "./models/arrow"; -import { parseArrows } from "./parsing/arrow"; +import { ColorName } from './../constants' +import * as SVG from 'svg.js' +import { CubeGeometry, FaceStickers, FaceRotations, rotateFaces } from './geometry' +import { Vec3, transScale, scale, translate, radians2Degrees } from '../math' +import { Face, AllFaces } from './constants' +import { ICubeOptions } from './options' +import { Arrow } from './models/arrow' +import { parseArrows } from './parsing/arrow' /** * Utility methods for rendering cube geometry using svg.js @@ -18,58 +18,53 @@ const defaultFaceRotations: FaceRotations = { [Face.F]: [0, 0, -1], [Face.D]: [0, 1, 1], [Face.L]: [-1, 0, 0], - [Face.B]: [0, 0, 1] -}; + [Face.B]: [0, 0, 1], +} export function renderCube(container: HTMLElement | string, geometry: CubeGeometry, options: ICubeOptions) { - let faceRotations = rotateFaces(defaultFaceRotations, options.viewportRotations); - let renderOrder = getRenderOrder(faceRotations); - let svg = SVG(container as HTMLElement).size(options.width, options.height); - svg.viewbox( - options.viewbox.x, - options.viewbox.y, - options.viewbox.width, - options.viewbox.height - ); - - let hiddenFaces = renderOrder.filter(face => !faceVisible(face, faceRotations)); - let visibleFaces = renderOrder.filter(face => faceVisible(face, faceRotations)); - - renderBackground(svg, options); + let faceRotations = rotateFaces(defaultFaceRotations, options.viewportRotations) + let renderOrder = getRenderOrder(faceRotations) + let svg = SVG(container as HTMLElement).size(options.width, options.height) + svg.viewbox(options.viewbox.x, options.viewbox.y, options.viewbox.width, options.viewbox.height) + + let hiddenFaces = renderOrder.filter(face => !faceVisible(face, faceRotations)) + let visibleFaces = renderOrder.filter(face => faceVisible(face, faceRotations)) + + renderBackground(svg, options) // Render hidden faces if cube color has transparency if (options.cubeOpacity < 100) { - let cubeOutlineGroup = getCubeOutlineGroup(svg, options); + let cubeOutlineGroup = getCubeOutlineGroup(svg, options) hiddenFaces.forEach(face => { - renderFaceStickers(svg, face, geometry[face], options); - renderCubeOutline(cubeOutlineGroup, geometry[face], options); + renderFaceStickers(svg, face, geometry[face], options) + renderCubeOutline(cubeOutlineGroup, geometry[face], options) }) } - let cubeOutlineGroup = getCubeOutlineGroup(svg, options); + let cubeOutlineGroup = getCubeOutlineGroup(svg, options) visibleFaces.forEach(face => { - renderCubeOutline(cubeOutlineGroup, geometry[face], options); - renderFaceStickers(svg, face, geometry[face], options); - }); + renderCubeOutline(cubeOutlineGroup, geometry[face], options) + renderFaceStickers(svg, face, geometry[face], options) + }) if (options.view === 'plan') { - let ollGroup = getOllLayerGroup(svg, options); - [Face.R, Face.F, Face.L, Face.B].forEach(face => { - renderOLLStickers(ollGroup,face, geometry[face], faceRotations, options); - }); + let ollGroup = getOllLayerGroup(svg, options) + ;[Face.R, Face.F, Face.L, Face.B].forEach(face => { + renderOLLStickers(ollGroup, face, geometry[face], faceRotations, options) + }) } - let arrowGroup = getArrowGroup(svg, geometry[0].length - 1); - let arrowDefinitions: Arrow[] = []; + let arrowGroup = getArrowGroup(svg, geometry[0].length - 1) + let arrowDefinitions: Arrow[] = [] if (Array.isArray(options.arrows)) { - arrowDefinitions = options.arrows; + arrowDefinitions = options.arrows } else if (typeof options.arrows === 'string') { - arrowDefinitions = parseArrows(options.arrows); + arrowDefinitions = parseArrows(options.arrows) } arrowDefinitions.forEach(arrow => { - renderArrow(arrowGroup, geometry, arrow); - }); + renderArrow(arrowGroup, geometry, arrow) + }) } /** @@ -79,31 +74,31 @@ export function renderCube(container: HTMLElement | string, geometry: CubeGeomet function getRenderOrder(faceRotations: FaceRotations): Face[] { let renderOrder = [...AllFaces].sort((a: Face, b: Face) => { return faceRotations[b][2] - faceRotations[a][2] - }); - return renderOrder; + }) + return renderOrder } function renderBackground(svg: SVG.Doc, options: ICubeOptions) { - let backgroundSvg = svg.rect(options.viewbox.width, options.viewbox.height); - backgroundSvg.x(options.viewbox.x); - backgroundSvg.y(options.viewbox.y); + let backgroundSvg = svg.rect(options.viewbox.width, options.viewbox.height) + backgroundSvg.x(options.viewbox.x) + backgroundSvg.y(options.viewbox.y) if (!options.backgroundColor) { - backgroundSvg.fill('none'); - backgroundSvg.opacity(0); + backgroundSvg.fill('none') + backgroundSvg.opacity(0) } else { backgroundSvg.fill({ - color: options.backgroundColor - }); + color: options.backgroundColor, + }) } } function faceVisible(face: Face, rotations: FaceRotations) { - return rotations[face][2] < -0.105; + return rotations[face][2] < -0.105 } function getCubeOutlineGroup(svg: SVG.Doc, options: ICubeOptions): SVG.G { - let cubeOutlineGroup = svg.group(); - cubeOutlineGroup.opacity(options.cubeOpacity/100) + let cubeOutlineGroup = svg.group() + cubeOutlineGroup.opacity(options.cubeOpacity / 100) cubeOutlineGroup.attr({ 'stroke-width': '0.1', 'stroke-linejoin': 'round', @@ -112,137 +107,146 @@ function getCubeOutlineGroup(svg: SVG.Doc, options: ICubeOptions): SVG.G { } function getOllLayerGroup(svg: SVG.Doc, options: ICubeOptions): SVG.G { - let group = svg.group(); - group.opacity(options.stickerOpacity/100); + let group = svg.group() + group.opacity(options.stickerOpacity / 100) group.attr({ 'stroke-opacity': '1', 'stroke-width': 0.02, - 'stroke-linejoin': 'round' - }); - return group; + 'stroke-linejoin': 'round', + }) + return group } function getArrowGroup(svg: SVG.Doc, cubeSize: number): SVG.G { - let arrowGroup = svg.group(); + let arrowGroup = svg.group() arrowGroup.attr({ - 'opacity': 1, + opacity: 1, 'stroke-opacity': 1, - 'stroke-width': (.12 / cubeSize), - 'stroke-linecap': 'round' - }); - return arrowGroup; + 'stroke-width': 0.12 / cubeSize, + 'stroke-linecap': 'round', + }) + return arrowGroup } function renderCubeOutline(svg: SVG.G, face: FaceStickers, options: ICubeOptions): SVG.Polygon { - const cubeSize = face.length - 1; - const width = options.outlineWidth; + const cubeSize = face.length - 1 + const width = options.outlineWidth let outlinePoints = [ [face[0][0][0] * width, face[0][0][1] * width], [face[cubeSize][0][0] * width, face[cubeSize][0][1] * width], [face[cubeSize][cubeSize][0] * width, face[cubeSize][cubeSize][1] * width], [face[0][cubeSize][0] * width, face[0][cubeSize][1] * width], - ]; - let polygon = svg.polygon(outlinePoints); - polygon.fill(options.cubeColor); - polygon.stroke(options.cubeColor); + ] + let polygon = svg.polygon(outlinePoints) + polygon.fill(options.cubeColor) + polygon.stroke(options.cubeColor) return polygon } function renderFaceStickers(svg: SVG.Doc, face: Face, stickers: FaceStickers, options: ICubeOptions): SVG.G { - const cubeSize = stickers.length -1; - let group = svg.group(); - group.opacity(options.stickerOpacity/100); + const cubeSize = stickers.length - 1 + let group = svg.group() + group.opacity(options.stickerOpacity / 100) group.attr({ 'stoke-opacity': '0.5', 'stroke-width': options.strokeWidth, - 'stroke-linejoin': 'round' + 'stroke-linejoin': 'round', }) for (let i = 0; i < cubeSize; i++) { for (let j = 0; j < cubeSize; j++) { let centerPoint: Vec3 = [ - (stickers[j][i][0] + stickers[j+1][i+1][0])/2, - (stickers[j][i][1] + stickers[j+1][i+1][1])/2, - 0 - ]; + (stickers[j][i][0] + stickers[j + 1][i + 1][0]) / 2, + (stickers[j][i][1] + stickers[j + 1][i + 1][1]) / 2, + 0, + ] // Scale points in towards centre - let p1 = transScale(stickers[j][i], centerPoint, .85); - let p2 = transScale(stickers[j+1][i], centerPoint, .85); - let p3 = transScale(stickers[j+1][i+1], centerPoint, .85); - let p4 = transScale(stickers[j][i+1], centerPoint, .85); + let p1 = transScale(stickers[j][i], centerPoint, 0.85) + let p2 = transScale(stickers[j + 1][i], centerPoint, 0.85) + let p3 = transScale(stickers[j + 1][i + 1], centerPoint, 0.85) + let p4 = transScale(stickers[j][i + 1], centerPoint, 0.85) - let color = getStickerColor(face, i, j, options); - renderSticker(group, p1, p2, p3, p4, color, options.cubeColor); + let color = getStickerColor(face, i, j, options) + renderSticker(group, p1, p2, p3, p4, color, options.cubeColor) } } - return group; + return group } -function renderSticker(g: SVG.G, p1: Vec3, p2: Vec3, p3: Vec3, p4: Vec3, stickerColor: string, cubeColor: string): SVG.Polygon { - let stickerPoints = [ - [p1[0], p1[1]], - [p2[0], p2[1]], - [p3[0], p3[1]], - [p4[0], p4[1]], - ]; - let polygon = g.polygon(stickerPoints); - polygon.fill(stickerColor); - polygon.stroke(cubeColor); - return polygon; +function renderSticker( + g: SVG.G, + p1: Vec3, + p2: Vec3, + p3: Vec3, + p4: Vec3, + stickerColor: string, + cubeColor: string +): SVG.Polygon { + let stickerPoints = [[p1[0], p1[1]], [p2[0], p2[1]], [p3[0], p3[1]], [p4[0], p4[1]]] + let polygon = g.polygon(stickerPoints) + polygon.fill(stickerColor) + polygon.stroke(cubeColor) + return polygon } /** - * Starting with U, stickers are numbered from + * Starting with U, stickers are numbered from * their face starting with the top left corner * sticker. - * + * * U Face * 1 | 2 | 3 * ---------- * 4 | 5 | 6 * ---------- * 7 | 8 | 9 - * + * * And so on for faces R, F, D, L, B. * So R's top left corner for a 3x3 cube would be # 10 - * - * An individual sticker's color is obtained by indexing + * + * An individual sticker's color is obtained by indexing * into the array of sticker colors by the number the sticker is */ function getStickerColor(face: Face, row: number, col: number, options: ICubeOptions): string { if (!Array.isArray(options.stickerColors)) { - return options.colorScheme[face] || ColorName.Black; + return options.colorScheme[face] || ColorName.Black } - const faceIndex = AllFaces.indexOf(face); - const stickerNumber = (row * options.cubeSize) + col; - const colorIndex = faceIndex * (options.cubeSize * options.cubeSize) + stickerNumber; + const faceIndex = AllFaces.indexOf(face) + const stickerNumber = row * options.cubeSize + col + const colorIndex = faceIndex * (options.cubeSize * options.cubeSize) + stickerNumber if (options.stickerColors.length <= colorIndex) { - return ColorName.Black; + return ColorName.Black } - return options.stickerColors[colorIndex]; + return options.stickerColors[colorIndex] } // Renders the top rim of the R U L and B faces out from side of cube -export function renderOLLStickers(group: SVG.G, face: Face, stickers: FaceStickers, rotations: FaceRotations, options: ICubeOptions) { +export function renderOLLStickers( + group: SVG.G, + face: Face, + stickers: FaceStickers, + rotations: FaceRotations, + options: ICubeOptions +) { // Translation vector, to move faces out - let v1 = scale(rotations[face], 0); - let v2 = scale(rotations[face], .2); + let v1 = scale(rotations[face], 0) + let v2 = scale(rotations[face], 0.2) for (let i = 0; i < options.cubeSize; i++) { // find center point of sticker const centerPoint: Vec3 = [ - (stickers[i][0][0] + stickers[i+1][1][0])/2, - (stickers[i][0][1] + stickers[i+1][1][1])/2, - 0 - ]; - let p1 = translate(transScale(stickers[i][0], centerPoint, .94), v1); - let p2 = translate(transScale(stickers[i+1][0], centerPoint, .94), v1); - let p3 = translate(transScale(stickers[i+1][1], centerPoint, .94), v2); - let p4 = translate(transScale(stickers[i][1], centerPoint, .94), v2); + (stickers[i][0][0] + stickers[i + 1][1][0]) / 2, + (stickers[i][0][1] + stickers[i + 1][1][1]) / 2, + 0, + ] + let p1 = translate(transScale(stickers[i][0], centerPoint, 0.94), v1) + let p2 = translate(transScale(stickers[i + 1][0], centerPoint, 0.94), v1) + let p3 = translate(transScale(stickers[i + 1][1], centerPoint, 0.94), v2) + let p4 = translate(transScale(stickers[i][1], centerPoint, 0.94), v2) renderSticker(group, p1, p2, p3, p4, getStickerColor(face, 0, i, options), options.cubeColor) } @@ -252,75 +256,71 @@ export function renderOLLStickers(group: SVG.G, face: Face, stickers: FaceSticke * Generates svg for an arrow pointing from sticker s1 to s2 */ export function renderArrow(group: SVG.G, geometry: CubeGeometry, arrow: Arrow) { - let cubeSize = geometry[0].length - 1; + let cubeSize = geometry[0].length - 1 // Find center point for each facelet - let p1y = Math.floor(arrow.s1.n / cubeSize); - let p1x = arrow.s1.n % cubeSize; + let p1y = Math.floor(arrow.s1.n / cubeSize) + let p1x = arrow.s1.n % cubeSize let p1: Vec3 = [ - (geometry[arrow.s1.face][p1x][p1y][0] + geometry[arrow.s1.face][p1x + 1][p1y + 1][0])/2, - (geometry[arrow.s1.face][p1x][p1y][1] + geometry[arrow.s1.face][p1x + 1][p1y + 1][1])/2, - 0 - ]; - - let p2y = Math.floor(arrow.s2.n / cubeSize); - let p2x = arrow.s2.n % cubeSize; + (geometry[arrow.s1.face][p1x][p1y][0] + geometry[arrow.s1.face][p1x + 1][p1y + 1][0]) / 2, + (geometry[arrow.s1.face][p1x][p1y][1] + geometry[arrow.s1.face][p1x + 1][p1y + 1][1]) / 2, + 0, + ] + + let p2y = Math.floor(arrow.s2.n / cubeSize) + let p2x = arrow.s2.n % cubeSize let p2: Vec3 = [ - (geometry[arrow.s1.face][p2x][p2y][0] + geometry[arrow.s1.face][p2x + 1][p2y + 1][0])/2, - (geometry[arrow.s1.face][p2x][p2y][1] + geometry[arrow.s1.face][p2x + 1][p2y + 1][1])/2, - 0 - ]; + (geometry[arrow.s1.face][p2x][p2y][0] + geometry[arrow.s1.face][p2x + 1][p2y + 1][0]) / 2, + (geometry[arrow.s1.face][p2x][p2y][1] + geometry[arrow.s1.face][p2x + 1][p2y + 1][1]) / 2, + 0, + ] // Find midpoint between p1 and p2 - let center: Vec3 = [ - (p1[0] + p2[0])/2, - (p1[1] + p2[1])/2, - 0 - ]; + let center: Vec3 = [(p1[0] + p2[0]) / 2, (p1[1] + p2[1]) / 2, 0] // Shorten arrows towards midpoint according to config - p1 = transScale(p1, center, arrow.scale/10); - p2 = transScale(p2, center, arrow.scale/10); + p1 = transScale(p1, center, arrow.scale / 10) + p2 = transScale(p2, center, arrow.scale / 10) - let p3: Vec3; + let p3: Vec3 if (arrow.s3) { - let p3y = Math.floor(arrow.s3.n / cubeSize); - let p3x = arrow.s3.n % cubeSize; + let p3y = Math.floor(arrow.s3.n / cubeSize) + let p3x = arrow.s3.n % cubeSize p3 = [ - (geometry[arrow.s1.face][p3x][p3y][0] + geometry[arrow.s1.face][p3x + 1][p3y + 1][0])/2, - (geometry[arrow.s1.face][p3x][p3y][1] + geometry[arrow.s1.face][p3x + 1][p3y + 1][1])/2, - 0 - ]; - p3 = transScale(p3, center, arrow.influence/5); + (geometry[arrow.s1.face][p3x][p3y][0] + geometry[arrow.s1.face][p3x + 1][p3y + 1][0]) / 2, + (geometry[arrow.s1.face][p3x][p3y][1] + geometry[arrow.s1.face][p3x + 1][p3y + 1][1]) / 2, + 0, + ] + p3 = transScale(p3, center, arrow.influence / 5) } // Calculate arrow rotation - let p_ = p3 ? p3 : p1; - let rotation = p_[1] > p2[1] ? 270 : 90; + let p_ = p3 ? p3 : p1 + let rotation = p_[1] > p2[1] ? 270 : 90 if (p2[0] - p_[0] != 0) { - rotation = radians2Degrees(Math.atan((p2[1]-p_[1])/(p2[0]-p_[0]))); - rotation = (p_[0] > p2[0]) ? rotation + 180 : rotation; + rotation = radians2Degrees(Math.atan((p2[1] - p_[1]) / (p2[0] - p_[0]))) + rotation = p_[0] > p2[0] ? rotation + 180 : rotation } // Draw line - let lineSvg = group.path(`M ${p1[0]},${p1[1]} ${p3 ? 'Q ' + p3[0] + ',' + p3[1] : 'L'} ${p2[0]},${p2[1]}`); - lineSvg.fill('none'); + let lineSvg = group.path(`M ${p1[0]},${p1[1]} ${p3 ? 'Q ' + p3[0] + ',' + p3[1] : 'L'} ${p2[0]},${p2[1]}`) + lineSvg.fill('none') lineSvg.stroke({ color: arrow.color, - opacity: 1 - }); + opacity: 1, + }) // Draw arrow head - let headSvg = group.path('M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z'); + let headSvg = group.path('M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z') headSvg.attr({ - transform: `translate(${p2[0]},${p2[1]}) scale(${.033/cubeSize}) rotate(${rotation})` - }); + transform: `translate(${p2[0]},${p2[1]}) scale(${0.033 / cubeSize}) rotate(${rotation})`, + }) headSvg.style({ - fill: arrow.color - }); + fill: arrow.color, + }) headSvg.attr({ 'stroke-width': 0, - 'stroke-linejoin': 'round' - }); -} \ No newline at end of file + 'stroke-linejoin': 'round', + }) +} diff --git a/src/cube/geometry.ts b/src/cube/geometry.ts index 2182ad3..b6e9a20 100644 --- a/src/cube/geometry.ts +++ b/src/cube/geometry.ts @@ -1,13 +1,13 @@ -import { ICubeOptions } from './options'; +import { ICubeOptions } from './options' /** * Utlity Methods for creating 2D coodinates for svg polygons */ -import { Face, AllFaces } from './constants'; -import { Vec3, makeMatrix, translate, scale, rotate, project, Axis } from '../math'; +import { Face, AllFaces } from './constants' +import { Vec3, makeMatrix, translate, scale, rotate, project, Axis } from '../math' -export type FaceStickers = Vec3[][]; -export type CubeGeometry = { [face: number]: Vec3[][] }; +export type FaceStickers = Vec3[][] +export type CubeGeometry = { [face: number]: Vec3[][] } /** * Rotation vectors by face @@ -19,25 +19,32 @@ export type FaceRotations = { [face: number]: Vec3 } */ export function rotateFaces(faceRotations: FaceRotations, rotations: [Axis, number][]): FaceRotations { return AllFaces.reduce((acc, face) => { - rotations.forEach((rotation) => { + rotations.forEach(rotation => { if (!acc[face]) { acc[face] = [...faceRotations[face]] } - acc[face] = rotate(acc[face], rotation[0], Math.PI * rotation[1]/180) - }); - return acc; + acc[face] = rotate(acc[face], rotation[0], (Math.PI * rotation[1]) / 180) + }) + return acc }, {}) } export function makeStickerPosition(face: Face, cubeSize: number, x: number, y: number): Vec3 { switch (face) { - case Face.U: return [x, 0, cubeSize - y]; - case Face.R: return [cubeSize, y, x]; - case Face.F: return [x, y, 0]; - case Face.D: return [x, cubeSize, y]; - case Face.L: return [0, y, cubeSize - x]; - case Face.B: return [cubeSize - x, y, cubeSize]; - default: throw new Error(`Unknown cube face: '${face}'`); + case Face.U: + return [x, 0, cubeSize - y] + case Face.R: + return [cubeSize, y, x] + case Face.F: + return [x, y, 0] + case Face.D: + return [x, cubeSize, y] + case Face.L: + return [0, y, cubeSize - x] + case Face.B: + return [cubeSize - x, y, cubeSize] + default: + throw new Error(`Unknown cube face: '${face}'`) } } @@ -45,32 +52,32 @@ export function makeStickerPosition(face: Face, cubeSize: number, x: number, y: * Creates 2D coordinates for stickers of a given face of the cube. */ export function makeFaceStickers(face: Face, options: ICubeOptions): FaceStickers { - let stickers: Vec3[][] = makeMatrix(options.cubeSize+1, options.cubeSize+1); + let stickers: Vec3[][] = makeMatrix(options.cubeSize + 1, options.cubeSize + 1) - for(let row = 0; row <= options.cubeSize; row++) { + for (let row = 0; row <= options.cubeSize; row++) { for (let col = 0; col <= options.cubeSize; col++) { - let sticker = makeStickerPosition(face, options.cubeSize, row, col); + let sticker = makeStickerPosition(face, options.cubeSize, row, col) // Now scale and tranform point to ensure size/pos independent of dim - let centerTranslation: Vec3 = [-options.cubeSize/2, -options.cubeSize/2, -options.cubeSize/2] - sticker = translate(sticker, centerTranslation); - sticker = scale(sticker, 1/options.cubeSize); + let centerTranslation: Vec3 = [-options.cubeSize / 2, -options.cubeSize / 2, -options.cubeSize / 2] + sticker = translate(sticker, centerTranslation) + sticker = scale(sticker, 1 / options.cubeSize) // Rotate cube as per perameter settings options.viewportRotations.forEach(rotation => { - sticker = rotate(sticker, rotation[0], Math.PI * rotation[1]/180); - }); + sticker = rotate(sticker, rotation[0], (Math.PI * rotation[1]) / 180) + }) // Move cube away from viewer - sticker = translate(sticker, [0, 0, options.dist]); + sticker = translate(sticker, [0, 0, options.dist]) // Finally project the 3D points onto 2D - sticker = project(sticker, options.dist); + sticker = project(sticker, options.dist) - stickers[row][col] = sticker; + stickers[row][col] = sticker } } - return stickers; + return stickers } /** @@ -79,12 +86,13 @@ export function makeFaceStickers(face: Face, options: ICubeOptions): FaceSticker */ export function makeCubeGeometry(options: ICubeOptions): CubeGeometry { if (options.view === 'plan') { - options.viewportRotations = [ - [Axis.X, -90] - ] + options.viewportRotations = [[Axis.X, -90]] } - return AllFaces.reduce((acc, face) => { - acc[face] = makeFaceStickers(face, options); - return acc; - }, {} as CubeGeometry) -} \ No newline at end of file + return AllFaces.reduce( + (acc, face) => { + acc[face] = makeFaceStickers(face, options) + return acc + }, + {} as CubeGeometry + ) +} diff --git a/src/cube/masking.ts b/src/cube/masking.ts index 9c02100..924e8eb 100644 --- a/src/cube/masking.ts +++ b/src/cube/masking.ts @@ -1,6 +1,6 @@ -import { Masking, Face, AllFaces } from './constants'; +import { Masking, Face, AllFaces } from './constants' -type FaceValues = { [face: number]: any[] }; +type FaceValues = { [face: number]: any[] } type MaskingFunctions = { [masking: string]: { [face: number]: (row: number, col: number, cubeSize: number) => boolean @@ -11,10 +11,10 @@ const maskingFunctions: MaskingFunctions = { [Masking.FL]: { [Face.U]: (row, col, cubeSize) => false, [Face.D]: (row, col, cubeSize) => true, - [Face.R]: (row, col, cubeSize) => row == (cubeSize - 1), - [Face.L]: (row, col, cubeSize) => row == (cubeSize - 1), - [Face.F]: (row, col, cubeSize) => row == (cubeSize - 1), - [Face.B]: (row, col, cubeSize) => row == (cubeSize - 1), + [Face.R]: (row, col, cubeSize) => row == cubeSize - 1, + [Face.L]: (row, col, cubeSize) => row == cubeSize - 1, + [Face.F]: (row, col, cubeSize) => row == cubeSize - 1, + [Face.B]: (row, col, cubeSize) => row == cubeSize - 1, }, [Masking.F2L]: { [Face.U]: (row, col, cubeSize) => false, @@ -33,9 +33,9 @@ const maskingFunctions: MaskingFunctions = { [Face.B]: (row, col, cubeSize) => row == 0, }, [Masking.CLL]: { - [Face.U]: (row, col, cubeSize) => - (row > 0 && col > 0 && row < cubeSize -1 && col < cubeSize - 1) // is center - || ((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), + [Face.U]: (row, col, cubeSize) => + (row > 0 && col > 0 && row < cubeSize - 1 && col < cubeSize - 1) || // is center + ((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)), [Face.D]: (row, col, cubeSize) => false, [Face.R]: (row, col, cubeSize) => row == 0 && (col == 0 || col == cubeSize - 1), [Face.L]: (row, col, cubeSize) => row == 0 && (col == 0 || col == cubeSize - 1), @@ -43,7 +43,7 @@ const maskingFunctions: MaskingFunctions = { [Face.B]: (row, col, cubeSize) => row == 0 && (col == 0 || col == cubeSize - 1), }, [Masking.ELL]: { - [Face.U]: (row, col, cubeSize) => !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), + [Face.U]: (row, col, cubeSize) => !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)), [Face.D]: (row, col, cubeSize) => false, [Face.R]: (row, col, cubeSize) => row == 0 && col > 0 && col < cubeSize - 1, [Face.L]: (row, col, cubeSize) => row == 0 && col > 0 && col < cubeSize - 1, @@ -59,9 +59,9 @@ const maskingFunctions: MaskingFunctions = { [Face.B]: (row, col, cubeSize) => false, }, [Masking.OCLL]: { - [Face.U]: (row, col, cubeSize) => - (row > 0 && col > 0 && row < cubeSize -1 && col < cubeSize - 1) // is center - || ((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), + [Face.U]: (row, col, cubeSize) => + (row > 0 && col > 0 && row < cubeSize - 1 && col < cubeSize - 1) || // is center + ((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)), [Face.D]: (row, col, cubeSize) => false, [Face.R]: (row, col, cubeSize) => false, [Face.L]: (row, col, cubeSize) => false, @@ -69,7 +69,7 @@ const maskingFunctions: MaskingFunctions = { [Face.B]: (row, col, cubeSize) => false, }, [Masking.OELL]: { - [Face.U]: (row, col, cubeSize) => !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), + [Face.U]: (row, col, cubeSize) => !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)), [Face.D]: (row, col, cubeSize) => false, [Face.R]: (row, col, cubeSize) => false, [Face.L]: (row, col, cubeSize) => false, @@ -101,7 +101,7 @@ const maskingFunctions: MaskingFunctions = { [Face.B]: (row, col, cubeSize) => row > 0, }, [Masking.VH]: { - [Face.U]: (row, col, cubeSize) => !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), + [Face.U]: (row, col, cubeSize) => !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)), [Face.D]: (row, col, cubeSize) => true, [Face.R]: (row, col, cubeSize) => row > 0, [Face.L]: (row, col, cubeSize) => row > 0, @@ -109,11 +109,11 @@ const maskingFunctions: MaskingFunctions = { [Face.B]: (row, col, cubeSize) => row > 0, }, [Masking.ELS]: { - [Face.U]: (row, col, cubeSize) => !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), - [Face.D]: (row, col, cubeSize) => row == 0 ? col < cubeSize - 1 : true, - [Face.R]: (row, col, cubeSize) => row > 0 && (row == cubeSize -1 ? col > 0: true), + [Face.U]: (row, col, cubeSize) => !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)), + [Face.D]: (row, col, cubeSize) => (row == 0 ? col < cubeSize - 1 : true), + [Face.R]: (row, col, cubeSize) => row > 0 && (row == cubeSize - 1 ? col > 0 : true), [Face.L]: (row, col, cubeSize) => row > 0, - [Face.F]: (row, col, cubeSize) => row > 0 && (row == cubeSize - 1 ? col < cubeSize - 1: true), + [Face.F]: (row, col, cubeSize) => row > 0 && (row == cubeSize - 1 ? col < cubeSize - 1 : true), [Face.B]: (row, col, cubeSize) => row > 0, }, [Masking.CLS]: { @@ -125,7 +125,7 @@ const maskingFunctions: MaskingFunctions = { [Face.B]: (row, col, cubeSize) => row > 0, }, [Masking.CMLL]: { - [Face.U]: (row, col, cubeSize) => ((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), + [Face.U]: (row, col, cubeSize) => (row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1), [Face.D]: (row, col, cubeSize) => true, [Face.R]: (row, col, cubeSize) => row > 0 || col == 0 || col == cubeSize - 1, [Face.L]: (row, col, cubeSize) => row > 0 || col == 0 || col == cubeSize - 1, @@ -134,7 +134,7 @@ const maskingFunctions: MaskingFunctions = { }, [Masking.CROSS]: { [Face.U]: (row, col, cubeSize) => false, - [Face.D]: (row, col, cubeSize) => !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), + [Face.D]: (row, col, cubeSize) => !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)), [Face.R]: (row, col, cubeSize) => row > 0 && col > 0 && col < cubeSize - 1, [Face.L]: (row, col, cubeSize) => row > 0 && col > 0 && col < cubeSize - 1, [Face.F]: (row, col, cubeSize) => row > 0 && col > 0 && col < cubeSize - 1, @@ -142,7 +142,8 @@ const maskingFunctions: MaskingFunctions = { }, [Masking.F2L3]: { [Face.U]: (row, col, cubeSize) => false, - [Face.D]: (row, col, cubeSize) => (row == 0 && col == cubeSize - 1) || !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))), + [Face.D]: (row, col, cubeSize) => + (row == 0 && col == cubeSize - 1) || !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)), [Face.R]: (row, col, cubeSize) => row > 0 && col < cubeSize - 1, [Face.L]: (row, col, cubeSize) => row > 0 && col > 0 && col < cubeSize - 1, [Face.F]: (row, col, cubeSize) => row > 0 && col > 0, @@ -158,7 +159,10 @@ const maskingFunctions: MaskingFunctions = { }, [Masking.F2LSM]: { [Face.U]: (row, col, cubeSize) => false, - [Face.D]: (row, col, cubeSize) => !((row == 0 || row == (cubeSize - 1)) && (col == 0 || col == (cubeSize - 1))) || (col == 0 && row == cubeSize - 1) || (row == 0 && col == cubeSize - 1), + [Face.D]: (row, col, cubeSize) => + !((row == 0 || row == cubeSize - 1) && (col == 0 || col == cubeSize - 1)) || + (col == 0 && row == cubeSize - 1) || + (row == 0 && col == cubeSize - 1), [Face.R]: (row, col, cubeSize) => row > 0 && col < cubeSize - 1, [Face.L]: (row, col, cubeSize) => row > 0 && col < cubeSize - 1, [Face.F]: (row, col, cubeSize) => row > 0 && col > 0, @@ -174,7 +178,7 @@ const maskingFunctions: MaskingFunctions = { }, [Masking.F2B]: { [Face.U]: (row, col, cubeSize) => false, - [Face.D]: (row, col, cubeSize) => (col == 0 || col == cubeSize - 1), + [Face.D]: (row, col, cubeSize) => col == 0 || col == cubeSize - 1, [Face.R]: (row, col, cubeSize) => row > 0, [Face.L]: (row, col, cubeSize) => row > 0, [Face.F]: (row, col, cubeSize) => row > 0 && (col == 0 || col == cubeSize - 1), @@ -192,10 +196,10 @@ const maskingFunctions: MaskingFunctions = { export function makeMasking(masking: Masking, cubeSize: number): FaceValues { if (!maskingFunctions[masking]) { - throw new Error(`invalid masking ${masking}`); + throw new Error(`invalid masking ${masking}`) } - let numStickers = cubeSize * cubeSize; + let numStickers = cubeSize * cubeSize let faceValues = { [Face.U]: [], [Face.F]: [], @@ -206,13 +210,13 @@ export function makeMasking(masking: Masking, cubeSize: number): FaceValues { } for (let i = 0; i < numStickers; i++) { - let row = Math.floor(i/cubeSize); - let col = i % cubeSize; + let row = Math.floor(i / cubeSize) + let col = i % cubeSize AllFaces.forEach(face => { - faceValues[face].push(maskingFunctions[masking][face](row, col, cubeSize)); - }); + faceValues[face].push(maskingFunctions[masking][face](row, col, cubeSize)) + }) } return faceValues -} \ No newline at end of file +} diff --git a/src/cube/models/arrow.ts b/src/cube/models/arrow.ts index 1c74035..76686ad 100644 --- a/src/cube/models/arrow.ts +++ b/src/cube/models/arrow.ts @@ -1,12 +1,12 @@ -import { StickerDefinition } from "./sticker"; +import { StickerDefinition } from './sticker' export class Arrow { - s1: StickerDefinition; - s2: StickerDefinition; - s3?: StickerDefinition; // optional third sticker if drawing curved arrow - scale: number = 10; // Var range = 0 to 20, default 10 - influence: number = 10; // Var range = 0 to 50, default 10 - color: string; + s1: StickerDefinition + s2: StickerDefinition + s3?: StickerDefinition // optional third sticker if drawing curved arrow + scale: number = 10 // Var range = 0 to 20, default 10 + influence: number = 10 // Var range = 0 to 50, default 10 + color: string constructor( s1: StickerDefinition, @@ -14,19 +14,19 @@ export class Arrow { color: string, s3?: StickerDefinition, scale?: number, - influence?: number) - { - this.s1 = s1; - this.s2 = s2; - this.color = color; + influence?: number + ) { + this.s1 = s1 + this.s2 = s2 + this.color = color if (scale) { - this.scale = scale; + this.scale = scale } if (influence) { - this.influence = influence; + this.influence = influence } if (s3) { - this.s3 = s3; + this.s3 = s3 } } -} \ No newline at end of file +} diff --git a/src/cube/models/color-scheme.ts b/src/cube/models/color-scheme.ts index df1927e..c027c63 100644 --- a/src/cube/models/color-scheme.ts +++ b/src/cube/models/color-scheme.ts @@ -1,5 +1,5 @@ -import { ColorCode } from "../../constants"; +import { ColorCode } from '../../constants' export interface ICubeColorScheme { - [face: number]: ColorCode; -} \ No newline at end of file + [face: number]: ColorCode +} diff --git a/src/cube/models/sticker.ts b/src/cube/models/sticker.ts index 4fddbf6..c503f77 100644 --- a/src/cube/models/sticker.ts +++ b/src/cube/models/sticker.ts @@ -1,6 +1,6 @@ -import { Face } from "../constants"; +import { Face } from '../constants' export class StickerDefinition { - face: Face; - n: number; -} \ No newline at end of file + face: Face + n: number +} diff --git a/src/cube/options.ts b/src/cube/options.ts index a577b94..ff9c428 100644 --- a/src/cube/options.ts +++ b/src/cube/options.ts @@ -1,31 +1,32 @@ -import { Axis } from './../math'; -import { Vec3 } from "../math"; -import { Arrow } from './models/arrow'; -import { Masking } from './constants'; +import { Axis } from './../math' +import { Vec3 } from '../math' +import { Arrow } from './models/arrow' +import { Masking } from './constants' export interface ICubeOptions { - dist: number; - algorithm?: string; - backgroundColor?: string; - cubeColor: string; - outlineWidth: number; - strokeWidth: number; - cubeSize: number; - cubeOpacity: number; - stickerOpacity: number; - colorScheme: { [face: number]: string }; - stickerColors?: string[]; - viewportRotations: [Axis, number][]; - view?: string; - width: number; - height: number; - mask?: Masking; - maskAlg?: string; - arrows?: Arrow[] | string; - viewbox: { // SVG viewbox settings - x: number; - y: number; - width: number; - height: number; + dist: number + algorithm?: string + backgroundColor?: string + cubeColor: string + outlineWidth: number + strokeWidth: number + cubeSize: number + cubeOpacity: number + stickerOpacity: number + colorScheme: { [face: number]: string } + stickerColors?: string[] + viewportRotations: [Axis, number][] + view?: string + width: number + height: number + mask?: Masking + maskAlg?: string + arrows?: Arrow[] | string + viewbox: { + // SVG viewbox settings + x: number + y: number + width: number + height: number } -} \ No newline at end of file +} diff --git a/src/cube/parsing/algorithm.ts b/src/cube/parsing/algorithm.ts index 08839bf..3336051 100644 --- a/src/cube/parsing/algorithm.ts +++ b/src/cube/parsing/algorithm.ts @@ -1,8 +1,8 @@ -import { TurnType } from "../simulation"; -import { TurnAbbreviation, AlgorithmUnit, possibleMoves } from "../constants"; +import { TurnType } from '../simulation' +import { TurnAbbreviation, AlgorithmUnit, possibleMoves } from '../constants' export interface Turn { - move: AlgorithmUnit, + move: AlgorithmUnit turnType: TurnType } @@ -13,36 +13,36 @@ export interface Turn { */ export function parseAlgorithm(algorithm: string): Turn[] { if (!algorithm) { - return []; + return [] } return algorithm.split(' ').map(move => { if (move.length > 2) { throw new Error(`Invalid move (${move}) in algorithm '${algorithm}'`) } - return { + return { move: getMove(move), - turnType: getTurnType(move) + turnType: getTurnType(move), } - }); + }) } function getMove(move: string): AlgorithmUnit { if (possibleMoves.indexOf(move.charAt(0)) < 0) { throw new Error(`invalid move (${move})`) - } - - else return move.charAt(0) as AlgorithmUnit; + } else return move.charAt(0) as AlgorithmUnit } function getTurnType(move: string): TurnType { - switch (move.charAt(1)) { // if string is only length 1 .charAt(1) will return empty string + switch ( + move.charAt(1) // if string is only length 1 .charAt(1) will return empty string + ) { case TurnAbbreviation.Clockwise: - return TurnType.Clockwise; + return TurnType.Clockwise case TurnAbbreviation.CounterClockwise: - return TurnType.CounterClockwise; + return TurnType.CounterClockwise case TurnAbbreviation.Double: - return TurnType.Double; + return TurnType.Double default: - throw new Error(`Invalid move modifier (${move.charAt(1)}) in move '${move}'`); - }; -} \ No newline at end of file + throw new Error(`Invalid move modifier (${move.charAt(1)}) in move '${move}'`) + } +} diff --git a/src/cube/parsing/arrow.ts b/src/cube/parsing/arrow.ts index e8afe0e..0807531 100644 --- a/src/cube/parsing/arrow.ts +++ b/src/cube/parsing/arrow.ts @@ -1,50 +1,54 @@ -import { StickerDefinition } from "../models/sticker"; -import { Arrow } from "../models/arrow"; -import { Face } from "../constants"; -import { ColorCode, ColorName } from "../../constants"; -import { parseColor } from "./color"; +import { StickerDefinition } from '../models/sticker' +import { Arrow } from '../models/arrow' +import { Face } from '../constants' +import { ColorCode, ColorName } from '../../constants' +import { parseColor } from './color' -const stickerPattern = '([URFDLB])([0-9]+)'; -const colorPattern = '(black|dgrey|grey|silver|white|yellow|red|orange|blue|green|purple|pink|[0-9a-fA-F]{6}|[0-9a-fA-F]{3})'; -const arrowPattern = `^(${stickerPattern})(${stickerPattern})(${stickerPattern})?(-s([0-9+]))?(-i([0-9+]))?(-${colorPattern})?`; +const stickerPattern = '([URFDLB])([0-9]+)' +const colorPattern = + '(black|dgrey|grey|silver|white|yellow|red|orange|blue|green|purple|pink|[0-9a-fA-F]{6}|[0-9a-fA-F]{3})' +const arrowPattern = `^(${stickerPattern})(${stickerPattern})(${stickerPattern})?(-s([0-9+]))?(-i([0-9+]))?(-${colorPattern})?` export function parseArrows(raw: string): Arrow[] { if (typeof raw !== 'string') { - return []; + return [] } - return raw.split(',') + return raw + .split(',') .map(part => parseArrow(part)) - .filter(arrow => !!arrow); + .filter(arrow => !!arrow) } export function parseArrow(raw: string): Arrow { if (typeof raw !== 'string') { - return null; + return null } - let arrowRegex = new RegExp(arrowPattern); - let match = arrowRegex.exec(raw); + let arrowRegex = new RegExp(arrowPattern) + let match = arrowRegex.exec(raw) if (!match) { - return null; + return null } - return { + return { s1: { face: Face[match[2]], - n: parseInt(match[3]) + n: parseInt(match[3]), }, s2: { face: Face[match[5]], - n: parseInt(match[6]) - }, - s3: !match[7] ? undefined : { - face: Face[match[8]], - n: parseInt(match[9]) + n: parseInt(match[6]), }, + s3: !match[7] + ? undefined + : { + face: Face[match[8]], + n: parseInt(match[9]), + }, color: match[15] ? parseColor(match[15]) : ColorCode.Gray, scale: match[11] ? parseInt(match[11]) : 10, - influence: match[13] ? parseInt(match[13]) : 10 - }; -} \ No newline at end of file + influence: match[13] ? parseInt(match[13]) : 10, + } +} diff --git a/src/cube/parsing/color.ts b/src/cube/parsing/color.ts index 4ad123f..747e941 100644 --- a/src/cube/parsing/color.ts +++ b/src/cube/parsing/color.ts @@ -1,21 +1,21 @@ -import { ColorAbbreviationToCode, ColorNameToCode, ColorCode } from "../../constants"; +import { ColorAbbreviationToCode, ColorNameToCode, ColorCode } from '../../constants' export function parseColor(raw: string): string | ColorCode { let colorcodeRegex = /^[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/ // Append # for color codes if (colorcodeRegex.exec(raw)) { - return `#${raw}`; + return `#${raw}` } if (ColorAbbreviationToCode[raw]) { - return ColorAbbreviationToCode[raw]; + return ColorAbbreviationToCode[raw] } if (ColorNameToCode[raw]) { - return ColorNameToCode[raw]; + return ColorNameToCode[raw] } // Default color - return ColorCode.Gray; -} \ No newline at end of file + return ColorCode.Gray +} diff --git a/src/cube/simulation.ts b/src/cube/simulation.ts index 60d215e..36f649c 100644 --- a/src/cube/simulation.ts +++ b/src/cube/simulation.ts @@ -1,24 +1,25 @@ -import { Axis } from './../math'; -import { AllFaces, Face, AlgorithmUnit } from './constants'; -import { Turn } from './parsing/algorithm'; +import { Axis } from './../math' +import { AllFaces, Face, AlgorithmUnit } from './constants' +import { Turn } from './parsing/algorithm' export enum TurnType { Clockwise, CounterClockwise, - Double + Double, } // Given sticker N return sticker number after rotation -type FaceRotation = (stickerNumber: number, cubeSize: number) => number; +type FaceRotation = (stickerNumber: number, cubeSize: number) => number -const faceIdentity: FaceRotation = (stickerNumber: number, cubeSize: number) => stickerNumber; -const counterClockwiseSticker: FaceRotation = (stickerNumber, cubeSize) => (stickerNumber * cubeSize) % ((cubeSize * cubeSize) + 1); +const faceIdentity: FaceRotation = (stickerNumber: number, cubeSize: number) => stickerNumber +const counterClockwiseSticker: FaceRotation = (stickerNumber, cubeSize) => + (stickerNumber * cubeSize) % (cubeSize * cubeSize + 1) const clockwiseSticker: FaceRotation = (stickerNumber, cubeSize) => { - let numStickers = cubeSize * cubeSize; - return (numStickers + 1) - counterClockwiseSticker(stickerNumber, cubeSize); + let numStickers = cubeSize * cubeSize + return numStickers + 1 - counterClockwiseSticker(stickerNumber, cubeSize) } const doubleTurn: FaceRotation = (stickerNumber, cubeSize) => { - return ((cubeSize * cubeSize) - stickerNumber) + 1; + return cubeSize * cubeSize - stickerNumber + 1 } const OppositeTurn = { @@ -31,18 +32,18 @@ const OppositeTurn = { const AxisMapping = { [Axis.X]: [Face.U, Face.B, Face.F, Face.D], [Axis.Y]: [Face.L, Face.B, Face.R, Face.F], - [Axis.Z]: [Face.L, Face.U, Face.R, Face.D] + [Axis.Z]: [Face.L, Face.U, Face.R, Face.D], } // Face's orientation related to other faces on a given axis -const AxisOrientation: { [axis: number]: {[face: number]: FaceRotation }} = { +const AxisOrientation: { [axis: number]: { [face: number]: FaceRotation } } = { [Axis.X]: { [Face.U]: faceIdentity, [Face.B]: doubleTurn, [Face.F]: faceIdentity, [Face.D]: faceIdentity, [Face.L]: null, - [Face.R]: null + [Face.R]: null, }, [Axis.Y]: { [Face.U]: null, @@ -50,7 +51,7 @@ const AxisOrientation: { [axis: number]: {[face: number]: FaceRotation }} = { [Face.F]: counterClockwiseSticker, [Face.D]: null, [Face.L]: counterClockwiseSticker, - [Face.R]: counterClockwiseSticker + [Face.R]: counterClockwiseSticker, }, [Axis.Z]: { [Face.U]: counterClockwiseSticker, @@ -58,32 +59,31 @@ const AxisOrientation: { [axis: number]: {[face: number]: FaceRotation }} = { [Face.F]: null, [Face.D]: clockwiseSticker, [Face.L]: faceIdentity, - [Face.R]: doubleTurn - } + [Face.R]: doubleTurn, + }, } export class CubeData { - /** * Data to store face value * data saved in flat array [1, 2, 3, 4, 5, 6, 7, 8, 9] * maps to cube stickers like this - * + * * U Face * 1 | 2 | 3 * ---------- * 4 | 5 | 6 * ---------- * 7 | 8 | 9 - * + * * Stickers are numbered in that manner starting with the U face * continuing with this order U, R, F, D, L, B - * + * * Because each face has a differen't orientation it may not be clear * how the back faces are numbered. Below is an example 3x3 mapping - * + * * Example numbers of 3x3 cube. nxn cubes follow the same pattern - * + * * B * L U R * F @@ -94,18 +94,18 @@ export class CubeData { * ----------------- * | 48 | 47 | 46 | * ----------------- ----------------- - * 43 | 40 | 37 1 | 2 | 3 12 | 15 | 18 + * 43 | 40 | 37 1 | 2 | 3 12 | 15 | 18 * ----------------- ----------------- ----------------- - * 44 | 41 | 38 4 | 5 | 6 11 | 14 | 17 + * 44 | 41 | 38 4 | 5 | 6 11 | 14 | 17 * ----------------- ----------------- ----------------- - * 45 | 42 | 39 7 | 8 | 9 10 | 13 | 16 + * 45 | 42 | 39 7 | 8 | 9 10 | 13 | 16 * ----------------- ----------------- * | 19 | 20 | 21 | * ----------------- * | 22 | 23 | 24 | * ----------------- * | 25 | 26 | 27 | - * + * * | 28 | 29 | 30 | * ----------------- * | 31 | 32 | 33 | @@ -113,41 +113,40 @@ export class CubeData { * | 34 | 35 | 36 | */ public faces: { [face: number]: any[] } = {} - private numStickers: number; + private numStickers: number // Precalculated index mapping values for face rotations - private clockwiseMapping: number[]; - private counterClockwiseMapping: number[]; - private doubleMapping: number[]; - + private clockwiseMapping: number[] + private counterClockwiseMapping: number[] + private doubleMapping: number[] constructor(private cubeSize: number, initialValues?: { [face: number]: any[] }) { - this.numStickers = this.cubeSize * this.cubeSize; - this.clockwiseMapping = []; - this.counterClockwiseMapping = []; - this.doubleMapping = []; + this.numStickers = this.cubeSize * this.cubeSize + this.clockwiseMapping = [] + this.counterClockwiseMapping = [] + this.doubleMapping = [] - this.faces = initialValues; + this.faces = initialValues if (!this.faces) { - this.initValues(); + this.initValues() } for (let i = 1; i <= this.numStickers; i++) { - this.clockwiseMapping.push(clockwiseSticker(i, cubeSize)); - this.counterClockwiseMapping.push(counterClockwiseSticker(i, cubeSize)); - this.doubleMapping.push(doubleTurn(i, cubeSize)); + this.clockwiseMapping.push(clockwiseSticker(i, cubeSize)) + this.counterClockwiseMapping.push(counterClockwiseSticker(i, cubeSize)) + this.doubleMapping.push(doubleTurn(i, cubeSize)) } } private initValues() { - let currentValue = 1; + let currentValue = 1 AllFaces.forEach(face => { - this.faces[face] = []; + this.faces[face] = [] for (let i = 0; i < this.numStickers; i++) { - this.faces[face].push(currentValue++); + this.faces[face].push(currentValue++) } - }); + }) } /** @@ -157,38 +156,46 @@ export class CubeData { // TODO more efficient rotation to not construct so many new arrays switch (turn) { case TurnType.Clockwise: - this.faces[face] = this.clockwiseMapping.map(newStickerNumber => this.faces[face][newStickerNumber - 1]); - break; + this.faces[face] = this.clockwiseMapping.map(newStickerNumber => this.faces[face][newStickerNumber - 1]) + break case TurnType.CounterClockwise: - this.faces[face] = this.counterClockwiseMapping.map(newStickerNumber => this.faces[face][newStickerNumber - 1]); - break; + this.faces[face] = this.counterClockwiseMapping.map(newStickerNumber => this.faces[face][newStickerNumber - 1]) + break case TurnType.Double: - this.faces[face].reverse(); - break; + this.faces[face].reverse() + break } } /** * Rotates layer values around a given axis */ - private axisRotation(offset: number, range: number, axis: Axis, faceOrder: Face[], forward: boolean = true, double: boolean = false) { + private axisRotation( + offset: number, + range: number, + axis: Axis, + faceOrder: Face[], + forward: boolean = true, + double: boolean = false + ) { if (!forward) { - faceOrder.reverse(); + faceOrder.reverse() } // Copy original values to avoid clobbering values when modifying stickers - let originalValues = faceOrder.map(face => this.faces[face].slice()); + let originalValues = faceOrder.map(face => this.faces[face].slice()) // Copy values for (let i = 0; i < this.cubeSize; i++) { for (let r = 0; r < range; r++) { - const stickerIndex = (this.cubeSize * i) + (offset + r); + const stickerIndex = this.cubeSize * i + (offset + r) for (let j = 0; j < faceOrder.length; j++) { - const face = faceOrder[j]; - const nextFace = double ? faceOrder[(j+2) % faceOrder.length] : faceOrder[(j+1) % faceOrder.length]; - const valueIndex = AxisOrientation[axis][face](stickerIndex+1, this.cubeSize) - 1; - const nextFaceValueIndex = AxisOrientation[axis][nextFace](stickerIndex+1, this.cubeSize) - 1; - this.faces[face][valueIndex] = originalValues[(double ? j + 2 : j + 1) % originalValues.length][nextFaceValueIndex]; + const face = faceOrder[j] + const nextFace = double ? faceOrder[(j + 2) % faceOrder.length] : faceOrder[(j + 1) % faceOrder.length] + const valueIndex = AxisOrientation[axis][face](stickerIndex + 1, this.cubeSize) - 1 + const nextFaceValueIndex = AxisOrientation[axis][nextFace](stickerIndex + 1, this.cubeSize) - 1 + this.faces[face][valueIndex] = + originalValues[(double ? j + 2 : j + 1) % originalValues.length][nextFaceValueIndex] } } } @@ -198,129 +205,129 @@ export class CubeData { * Rotate layers around the x axis of the cube */ private xLayersRotation(offset: number, forward: boolean = true, double: boolean = false, range: number = 1) { - let faceOrder = [Face.U, Face.F, Face.D, Face.B]; - this.axisRotation(offset, range, Axis.X, faceOrder, forward, double); + let faceOrder = [Face.U, Face.F, Face.D, Face.B] + this.axisRotation(offset, range, Axis.X, faceOrder, forward, double) } /** * Rotate layers around the y axis of the cube */ private yLayersRotation(offset: number, forward: boolean = true, double: boolean = false, range: number = 1) { - let faceOrder = [Face.L, Face.F, Face.R, Face.B]; - this.axisRotation(offset, range, Axis.Y, faceOrder, forward, double); + let faceOrder = [Face.L, Face.F, Face.R, Face.B] + this.axisRotation(offset, range, Axis.Y, faceOrder, forward, double) } /** * Rotate layers around the z axis of the cube */ private zLayersRotation(offset: number, forward: boolean = true, double: boolean = false, range: number = 1) { - let faceOrder = [Face.U, Face.L, Face.D, Face.R]; - this.axisRotation(offset, range, Axis.Z, faceOrder, forward, double); + let faceOrder = [Face.U, Face.L, Face.D, Face.R] + this.axisRotation(offset, range, Axis.Z, faceOrder, forward, double) } rTurn(turnType: TurnType) { - this.rotateFace(Face.R, turnType); - this.xLayersRotation(this.cubeSize - 1, turnType === TurnType.Clockwise, turnType === TurnType.Double); + this.rotateFace(Face.R, turnType) + this.xLayersRotation(this.cubeSize - 1, turnType === TurnType.Clockwise, turnType === TurnType.Double) } lTurn(turnType: TurnType) { - this.rotateFace(Face.L, turnType); - this.xLayersRotation(0, turnType === TurnType.CounterClockwise, turnType === TurnType.Double); + this.rotateFace(Face.L, turnType) + this.xLayersRotation(0, turnType === TurnType.CounterClockwise, turnType === TurnType.Double) } uTurn(turnType: TurnType) { - this.rotateFace(Face.U, turnType); - this.yLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double); + this.rotateFace(Face.U, turnType) + this.yLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double) } dTurn(turnType: TurnType) { - this.rotateFace(Face.D, turnType); - this.yLayersRotation(this.cubeSize - 1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double); + this.rotateFace(Face.D, turnType) + this.yLayersRotation(this.cubeSize - 1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double) } fTurn(turnType: TurnType) { - this.rotateFace(Face.F, turnType); - this.zLayersRotation(this.cubeSize - 1, turnType === TurnType.Clockwise, turnType === TurnType.Double); + this.rotateFace(Face.F, turnType) + this.zLayersRotation(this.cubeSize - 1, turnType === TurnType.Clockwise, turnType === TurnType.Double) } bTurn(turnType: TurnType) { - this.rotateFace(Face.B, turnType); - this.zLayersRotation(0, turnType === TurnType.CounterClockwise, turnType === TurnType.Double); + this.rotateFace(Face.B, turnType) + this.zLayersRotation(0, turnType === TurnType.CounterClockwise, turnType === TurnType.Double) } mTurn(turnType: TurnType) { - if (this.cubeSize < 2) return; - this.xLayersRotation(1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double, this.cubeSize - 2); + if (this.cubeSize < 2) return + this.xLayersRotation(1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double, this.cubeSize - 2) } eTurn(turnType: TurnType) { - if (this.cubeSize < 2) return; - this.yLayersRotation(1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double, this.cubeSize - 2); + if (this.cubeSize < 2) return + this.yLayersRotation(1, turnType === TurnType.CounterClockwise, turnType === TurnType.Double, this.cubeSize - 2) } sTurn(turnType: TurnType) { - if (this.cubeSize < 2) return; - this.zLayersRotation(1, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize - 2); + if (this.cubeSize < 2) return + this.zLayersRotation(1, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize - 2) } xTurn(turnType: TurnType) { - this.rotateFace(Face.R, turnType); - this.rotateFace(Face.L, OppositeTurn[turnType]); - this.xLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize); + this.rotateFace(Face.R, turnType) + this.rotateFace(Face.L, OppositeTurn[turnType]) + this.xLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize) } yTurn(turnType: TurnType) { - this.rotateFace(Face.U, turnType); - this.rotateFace(Face.D, OppositeTurn[turnType]); + this.rotateFace(Face.U, turnType) + this.rotateFace(Face.D, OppositeTurn[turnType]) this.yLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize) } zTurn(turnType: TurnType) { - this.rotateFace(Face.F, turnType); - this.rotateFace(Face.B, OppositeTurn[turnType]); - this.zLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize); + this.rotateFace(Face.F, turnType) + this.rotateFace(Face.B, OppositeTurn[turnType]) + this.zLayersRotation(0, turnType === TurnType.Clockwise, turnType === TurnType.Double, this.cubeSize) } turn(turn: Turn) { switch (turn.move) { case AlgorithmUnit.F: - this.fTurn(turn.turnType); - break; + this.fTurn(turn.turnType) + break case AlgorithmUnit.B: - this.bTurn(turn.turnType); - break; + this.bTurn(turn.turnType) + break case AlgorithmUnit.U: - this.uTurn(turn.turnType); - break; + this.uTurn(turn.turnType) + break case AlgorithmUnit.D: - this.dTurn(turn.turnType); - break; + this.dTurn(turn.turnType) + break case AlgorithmUnit.R: - this.rTurn(turn.turnType); - break; + this.rTurn(turn.turnType) + break case AlgorithmUnit.L: - this.lTurn(turn.turnType); - break; + this.lTurn(turn.turnType) + break case AlgorithmUnit.M: - this.mTurn(turn.turnType); - break; + this.mTurn(turn.turnType) + break case AlgorithmUnit.E: - this.eTurn(turn.turnType); - break; + this.eTurn(turn.turnType) + break case AlgorithmUnit.S: - this.sTurn(turn.turnType); - break; + this.sTurn(turn.turnType) + break case AlgorithmUnit.X: - this.xTurn(turn.turnType); - break; + this.xTurn(turn.turnType) + break case AlgorithmUnit.Y: - this.yTurn(turn.turnType); - break; + this.yTurn(turn.turnType) + break case AlgorithmUnit.Z: - this.zTurn(turn.turnType); - break; + this.zTurn(turn.turnType) + break default: - throw new Error(`Unrecognized move in turn ${JSON.stringify(turn)}`); + throw new Error(`Unrecognized move in turn ${JSON.stringify(turn)}`) } } -} \ No newline at end of file +} diff --git a/src/cube/stickers.ts b/src/cube/stickers.ts index 966931d..ae2237f 100644 --- a/src/cube/stickers.ts +++ b/src/cube/stickers.ts @@ -1,61 +1,64 @@ -import { ICubeOptions } from "./options"; -import { makeMasking } from "./masking"; -import { CubeData } from "./simulation"; -import { parseAlgorithm } from "./parsing/algorithm"; -import { AllFaces } from "./constants"; -import { ColorName, ColorCode } from "../constants"; +import { ICubeOptions } from './options' +import { makeMasking } from './masking' +import { CubeData } from './simulation' +import { parseAlgorithm } from './parsing/algorithm' +import { AllFaces } from './constants' +import { ColorName, ColorCode } from '../constants' export function makeStickerColors(options: ICubeOptions): string[] { - let stickerColors = options.stickerColors; - let mask = options.mask ? makeMasking(options.mask, options.cubeSize) : null; + let stickerColors = options.stickerColors + let mask = options.mask ? makeMasking(options.mask, options.cubeSize) : null if (mask && options.maskAlg) { - let maskCubeData = new CubeData(options.cubeSize, mask); - let alg = parseAlgorithm(options.maskAlg); + let maskCubeData = new CubeData(options.cubeSize, mask) + let alg = parseAlgorithm(options.maskAlg) alg.forEach(turn => { - maskCubeData.turn(turn); + maskCubeData.turn(turn) }) - mask = maskCubeData.faces; + mask = maskCubeData.faces } - + // Fill with color scheme if sticker colors not predefined. if (!stickerColors) { - stickerColors = [].concat.apply([], AllFaces.map(face => { - return Array.apply(null, Array(options.cubeSize * options.cubeSize)).map(() => options.colorScheme[face]) - })); + stickerColors = [].concat.apply( + [], + AllFaces.map(face => { + return Array.apply(null, Array(options.cubeSize * options.cubeSize)).map(() => options.colorScheme[face]) + }) + ) } let faceMappedStickers = AllFaces.reduce((acc, face) => { - if (!acc[face]) acc[face] = []; + if (!acc[face]) acc[face] = [] for (let i = 0; i < options.cubeSize; i++) { for (let j = 0; j < options.cubeSize; j++) { - const faceIndex = AllFaces.indexOf(face); - const stickerNumber = (i * options.cubeSize) + j; - const colorIndex = faceIndex * (options.cubeSize * options.cubeSize) + stickerNumber; + const faceIndex = AllFaces.indexOf(face) + const stickerNumber = i * options.cubeSize + j + const colorIndex = faceIndex * (options.cubeSize * options.cubeSize) + stickerNumber if (stickerColors.length <= colorIndex) { - acc[face][(options.cubeSize * i) + j] = ColorName.Black; + acc[face][options.cubeSize * i + j] = ColorName.Black } else { - acc[face][(options.cubeSize * i) + j] = stickerColors[colorIndex]; + acc[face][options.cubeSize * i + j] = stickerColors[colorIndex] } - if (mask && !mask[face][(options.cubeSize * i) + j]) { - acc[face][(options.cubeSize * i) + j] = ColorCode.DarkGray; + if (mask && !mask[face][options.cubeSize * i + j]) { + acc[face][options.cubeSize * i + j] = ColorCode.DarkGray } } } - return acc; - }, {}); + return acc + }, {}) // Apply Algorithm - let cubeData = new CubeData(options.cubeSize, faceMappedStickers); - let alg = parseAlgorithm(options.algorithm); + let cubeData = new CubeData(options.cubeSize, faceMappedStickers) + let alg = parseAlgorithm(options.algorithm) alg.forEach(move => { - cubeData.turn(move); - }); + cubeData.turn(move) + }) - return [].concat.apply([], AllFaces.map(face => cubeData.faces[face].slice())); -} \ No newline at end of file + return [].concat.apply([], AllFaces.map(face => cubeData.faces[face].slice())) +} diff --git a/src/index.ts b/src/index.ts index f1cddba..7e794aa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,62 +1,59 @@ import * as SVG from 'svg.js' -import { makeCubeGeometry } from './cube/geometry'; -import { Vec3, Axis } from './math'; -import { renderCube } from './cube/drawing'; -import { ICubeOptions } from './cube/options'; -import { DefaultColorScheme, Masking, JapaneseColorScheme } from './cube/constants'; -import { makeStickerColors } from './cube/stickers'; -import { ColorName, ColorCode } from './constants'; +import { makeCubeGeometry } from './cube/geometry' +import { Vec3, Axis } from './math' +import { renderCube } from './cube/drawing' +import { ICubeOptions } from './cube/options' +import { DefaultColorScheme, Masking, JapaneseColorScheme } from './cube/constants' +import { makeStickerColors } from './cube/stickers' +import { ColorName, ColorCode } from './constants' const defaultOptions: ICubeOptions = { cubeSize: 3, width: 128, height: 128, - viewportRotations: [ - [Axis.Y, 45], - [Axis.X, -34], - ], + viewportRotations: [[Axis.Y, 45], [Axis.X, -34]], colorScheme: DefaultColorScheme, cubeColor: ColorName.Black, cubeOpacity: 100, stickerOpacity: 100, dist: 5, - outlineWidth: .94, + outlineWidth: 0.94, strokeWidth: 0, viewbox: { x: -0.9, y: -0.9, width: 1.8, height: 1.8, - } -}; + }, +} export function cubeSVG(container: HTMLElement | string, extraOptions: any = {}) { - let options = {...defaultOptions, ...extraOptions}; - let geomety = makeCubeGeometry(options); - options.stickerColors = makeStickerColors(options); + let options = { ...defaultOptions, ...extraOptions } + let geomety = makeCubeGeometry(options) + options.stickerColors = makeStickerColors(options) - renderCube(container, geomety, options); + renderCube(container, geomety, options) } export function cubePNG(container: HTMLElement, extraOptions: any = {}) { - let element = document.createElement('div'); - cubeSVG(element, extraOptions); + let element = document.createElement('div') + cubeSVG(element, extraOptions) setTimeout(() => { - let svgElement = element.querySelector('svg'); - let targetImage = document.createElement('img'); // Where to draw the result - container.appendChild(targetImage); - let can = document.createElement('canvas'); // Not shown on page - let ctx = can.getContext('2d'); - let loader = new Image; // Not shown on page - - loader.width = can.width = targetImage.width = extraOptions.width || 128; - loader.height = can.height = targetImage.height = extraOptions.height || 128; - loader.onload = function(){ - ctx.drawImage( loader, 0, 0, loader.width, loader.height ); - targetImage.src = can.toDataURL(); - }; - var svgAsXML = (new XMLSerializer).serializeToString( svgElement ); - loader.src = 'data:image/svg+xml,' + encodeURIComponent( svgAsXML ); - }); -} \ No newline at end of file + let svgElement = element.querySelector('svg') + let targetImage = document.createElement('img') // Where to draw the result + container.appendChild(targetImage) + let can = document.createElement('canvas') // Not shown on page + let ctx = can.getContext('2d') + let loader = new Image() // Not shown on page + + loader.width = can.width = targetImage.width = extraOptions.width || 128 + loader.height = can.height = targetImage.height = extraOptions.height || 128 + loader.onload = function() { + ctx.drawImage(loader, 0, 0, loader.width, loader.height) + targetImage.src = can.toDataURL() + } + var svgAsXML = new XMLSerializer().serializeToString(svgElement) + loader.src = 'data:image/svg+xml,' + encodeURIComponent(svgAsXML) + }) +} diff --git a/src/math.ts b/src/math.ts index 2ce2985..c56289e 100644 --- a/src/math.ts +++ b/src/math.ts @@ -2,23 +2,23 @@ * Methods for manipulating points in 3d space (Vec3) */ -export type Vec3 = [number, number, number]; +export type Vec3 = [number, number, number] export enum Axis { X = 0, Y = 1, - Z = 2 + Z = 2, } export function makeMatrix(rows: number, cols: number): T[][] { - let matrix: T[][] = []; + let matrix: T[][] = [] for (let r = 0; r < rows; r++) { - matrix[r] = []; + matrix[r] = [] for (let c = 0; c < cols; c++) { - matrix[r][c] = null; + matrix[r][c] = null } } - return matrix; + return matrix } export function translate(pos: Vec3, v: Vec3): Vec3 { @@ -32,37 +32,37 @@ export function scale(pos: Vec3, scalar: number): Vec3 { // Scale a point relative to position vector export function transScale(pos: Vec3, v: Vec3, scalar: number): Vec3 { // Translate each facelet to cf - let iv: Vec3 = v.map(x => -x) as Vec3; - return translate(scale(translate(pos, iv), scalar), v); + let iv: Vec3 = v.map(x => -x) as Vec3 + return translate(scale(translate(pos, iv), scalar), v) } export function rotate(pos: Vec3, axis: Axis, radians: number): Vec3 { - let newPosition: Vec3 = [...pos] as Vec3; + let newPosition: Vec3 = [...pos] as Vec3 switch (axis) { case Axis.X: - newPosition[2] = (pos[2] * Math.cos(radians)) - (pos[1] * Math.sin(radians)); - newPosition[1] = (pos[2] * Math.sin(radians)) + (pos[1] * Math.cos(radians)); - break; + newPosition[2] = pos[2] * Math.cos(radians) - pos[1] * Math.sin(radians) + newPosition[1] = pos[2] * Math.sin(radians) + pos[1] * Math.cos(radians) + break case Axis.Y: - newPosition[0] = (pos[0] * Math.cos(radians)) + (pos[2] * Math.sin(radians)); - newPosition[2] = - pos[0] * Math.sin(radians) + pos[2] * Math.cos(radians); - break; + newPosition[0] = pos[0] * Math.cos(radians) + pos[2] * Math.sin(radians) + newPosition[2] = -pos[0] * Math.sin(radians) + pos[2] * Math.cos(radians) + break case Axis.Z: - newPosition[0] = (pos[0] * Math.cos(radians)) - (pos[1] * Math.sin(radians)); - newPosition[1] = (pos[0] * Math.sin(radians)) + (pos[1] * Math.cos(radians)); - break; + newPosition[0] = pos[0] * Math.cos(radians) - pos[1] * Math.sin(radians) + newPosition[1] = pos[0] * Math.sin(radians) + pos[1] * Math.cos(radians) + break } - return newPosition; + return newPosition } export function project(pos: Vec3, d: number): Vec3 { return [ - pos[0] * d / pos[2], - pos[1] * d / pos[2], - pos[2] // Maintain z coordinate to allow use of rendering tricks - ]; + (pos[0] * d) / pos[2], + (pos[1] * d) / pos[2], + pos[2], // Maintain z coordinate to allow use of rendering tricks + ] } export function radians2Degrees(radians: number) { - return radians * 180 / Math.PI; -} \ No newline at end of file + return (radians * 180) / Math.PI +}