説明なし

index.js.map 178KB

1
  1. {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./src/board/Drawboard/index.less","webpack:///./src/board/WhitePage/index.less","webpack:///./src/board/Whiteboard/index.less","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/siema/dist/siema.min.js","webpack:///./node_modules/style-loader/lib/addStyles.js","webpack:///./node_modules/style-loader/lib/urls.js","webpack:///./node_modules/uuid/lib/bytesToUuid.js","webpack:///./node_modules/uuid/lib/rng-browser.js","webpack:///./node_modules/uuid/v1.js","webpack:///./src/assets/arrow.svg","webpack:///./src/assets/bx-left-arrow.svg","webpack:///./src/assets/bx-right-arrow.svg","webpack:///./src/assets/check.svg","webpack:///./src/assets/cover.svg","webpack:///./src/assets/eraser.svg","webpack:///./src/assets/highlight.svg","webpack:///./src/assets/line.svg","webpack:///./src/assets/mouse-pointer.svg","webpack:///./src/assets/rect.svg","webpack:///./src/assets/text.svg","webpack:///./src/assets/times.svg","webpack:///./src/board/Baseboard/index.ts","webpack:///./src/board/Drawboard/index.less?cc39","webpack:///./src/board/Drawboard/index.ts","webpack:///./src/board/WhitePage/index.less?8082","webpack:///./src/board/WhitePage/index.ts","webpack:///./src/board/Whiteboard/index.less?74a2","webpack:///./src/board/Whiteboard/index.ts","webpack:///./src/index.ts","webpack:///./src/markers/ArrowMarker/index.ts","webpack:///./src/markers/BaseMarker/ResizeGrip.ts","webpack:///./src/markers/BaseMarker/index.ts","webpack:///./src/markers/CoverMarker/index.ts","webpack:///./src/markers/HighlightMarker/index.ts","webpack:///./src/markers/LineMarker/index.ts","webpack:///./src/markers/LinearMarker/index.ts","webpack:///./src/markers/RectMarker/RectBaseMarker.ts","webpack:///./src/markers/RectMarker/index.ts","webpack:///./src/markers/RectangularMarker/RectangularMarkerGrips.ts","webpack:///./src/markers/RectangularMarker/index.ts","webpack:///./src/markers/TextMarker/index.ts","webpack:///./src/markers/types.ts","webpack:///./src/renderer/SvgHelper/index.ts","webpack:///./src/renderer/Synthetizer/index.ts","webpack:///./src/toolbar/Toolbar.ts","webpack:///./src/toolbar/ToolbarButton.ts","webpack:///./src/toolbar/ToolbarItem.ts","webpack:///./src/toolbar/toolbar-items.ts","webpack:///./src/utils/dom.ts","webpack:///./src/utils/uuid.ts","webpack:///./src/utils/validator.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA,2BAA2B,mBAAO,CAAC,2GAAsD;AACzF;AACA,cAAc,QAAS,wBAAwB,0BAA0B,gBAAgB,iBAAiB,kBAAkB,GAAG,yBAAyB,kBAAkB,2BAA2B,4BAA4B,0BAA0B,iBAAiB,gBAAgB,iBAAiB,GAAG,+BAA+B,kBAAkB,GAAG,0BAA0B,8BAA8B,qBAAqB,gBAAgB,iCAAiC,kCAAkC,kBAAkB,4CAA4C,GAAG,iEAAiE,0BAA0B,gBAAgB,iBAAiB,oBAAoB,gBAAgB,iBAAiB,uBAAuB,yCAAyC,wCAAwC,kBAAkB,kBAAkB,2BAA2B,4BAA4B,0BAA0B,GAAG,oCAAoC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B,mBAAmB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA,mBAAmB,2BAA2B;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,mBAAmB;AACnC;AACA;;AAEA;AACA;;AAEA,iBAAiB,2BAA2B;AAC5C;AACA;;AAEA,QAAQ,uBAAuB;AAC/B;AACA;AACA,GAAG;AACH;;AAEA,iBAAiB,uBAAuB;AACxC;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd,kDAAkD,sBAAsB;AACxE;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA,KAAK,KAAwC,EAAE,EAE7C;;AAEF,QAAQ,sBAAiB;AACzB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;;AAEA,6BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;;;;;;;;;;;;;AC9YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW,EAAE;AACrD,wCAAwC,WAAW,EAAE;;AAErD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,sCAAsC;AACtC,GAAG;AACH;AACA,8DAA8D;AAC9D;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;;;;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;;AAEA;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E;AAC9D,QAAI,CAAC,GAAL,EAAU;AACR;AACD;AAED,QAAI,SAAJ,GAAgB,EAAG,IAAI,SAAJ,IAAiB,EAApB,IAAsB,GAAtB,GAA0B,SAA1B,EAAsC,IAAtC,EAAhB;AACD;AAND,oC;;;;;;;;;;;;;;;AChBA;AAEa,eAAO,MAAP,C;;;;;;;;;;;;;;;ACDb,SAAgB,kBAAhB,CAAmC,GAAnC,EAA2C;AACzC,QAAI,OAAO,GAAP,KAAe,QAAf,IAA2B,eAAe,gBAA9C,EAAgE;AAC9D,eAAO,IAAP;AACD;AAED,WAAO,KAAP;AACD;AAND,gD","file":"index.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 {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\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 = \"./src/index.ts\");\n","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".fc-whiteboard-logo {\\n display: inline-block;\\n margin: 0px;\\n padding: 0px;\\n fill: #333333;\\n}\\n.fc-whiteboard-logo a {\\n display: grid;\\n -ms-flex-align: center;\\n align-items: center;\\n justify-items: center;\\n padding: 3px;\\n width: 20px;\\n height: 20px;\\n}\\n.fc-whiteboard-logo a:hover {\\n fill: #ff8080;\\n}\\n.fc-whiteboard-toolbar {\\n background-color: #cccccc;\\n padding: 0px 5px;\\n margin: 0px;\\n border-top-left-radius: 10px;\\n border-top-right-radius: 10px;\\n display: grid;\\n grid-template-columns: repeat(20, auto);\\n}\\n.fc-whiteboard-toolbar-button,\\n.fc-whiteboard-toolbar-logo a {\\n display: inline-block;\\n margin: 2px;\\n padding: 3px;\\n cursor: pointer;\\n width: 20px;\\n height: 20px;\\n border-radius: 2px;\\n border-bottom: transparent solid 1px;\\n border-right: transparent solid 1px;\\n fill: #333333;\\n display: grid;\\n -ms-flex-align: center;\\n align-items: center;\\n justify-items: center;\\n}\\n.fc-whiteboard-toolbar-separator {\\n margin: 5px 5px;\\n border: 1px solid #dddddd;\\n}\\n.fc-whiteboard-toolbar-button:hover,\\n.fc-whiteboard-toolbar-logo a:hover {\\n background-color: #eeeeee;\\n background: -webkit-radial-gradient(#eeeeee, #cccccc);\\n background: -o-radial-gradient(#eeeeee, #cccccc);\\n background: radial-gradient(#eeeeee, #cccccc);\\n fill: #ff8080;\\n}\\n.fc-whiteboard-toolbar-button svg {\\n height: 16px;\\n}\\n.fc-whiteboard-text-editor {\\n position: fixed;\\n z-index: 20000;\\n left: 0px;\\n top: 0px;\\n width: 100vw;\\n height: 100vh;\\n background-color: rgba(0, 0, 0, 0.9);\\n display: -ms-flexbox;\\n display: flex;\\n -ms-flex-direction: column;\\n flex-direction: column;\\n -ms-flex-align: center;\\n align-items: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n}\\n.fc-whiteboard-text-editor textarea {\\n width: 50%;\\n min-width: 50px;\\n max-width: 500px;\\n height: 50%;\\n min-height: 50px;\\n max-height: 500px;\\n}\\n.fc-whiteboard-text-editor .fc-whiteboard-text-editor-button-bar {\\n display: -ms-flexbox;\\n display: flex;\\n -ms-flex-direction: row;\\n flex-direction: row;\\n -ms-flex-pack: end;\\n justify-content: flex-end;\\n width: 50%;\\n min-width: 50px;\\n max-width: 500px;\\n padding-top: 10px;\\n}\\n.fc-whiteboard-text-editor .fc-whiteboard-text-editor-button {\\n display: grid;\\n -ms-flex-align: center;\\n align-items: center;\\n padding: 0px;\\n margin-left: 15px;\\n width: 20px;\\n height: 20px;\\n cursor: pointer;\\n fill: #888888;\\n}\\n.fc-whiteboard-text-editor .fc-whiteboard-text-editor-button:hover {\\n fill: #ff8080;\\n}\\n\", \"\"]);\n\n","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".fcw-page img {\\n width: 100%;\\n height: 100%;\\n}\\n\", \"\"]);\n\n","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".fcw-board-imgs,\\n.fcw-board-pages,\\n.fcw-board .fcw-page {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n}\\n.fcw-board-img {\\n width: 100%;\\n height: 100%;\\n}\\n.fcw-board-flip-arrow {\\n height: 20px;\\n width: 20px;\\n cursor: pointer;\\n}\\n.fcw-board-controller {\\n position: absolute;\\n display: -ms-flexbox;\\n display: flex;\\n width: 50px;\\n height: 30px;\\n -ms-flex-pack: justify;\\n justify-content: space-between;\\n -ms-flex-align: center;\\n align-items: center;\\n top: -30px;\\n background-color: #cccccc;\\n padding: 0px 5px;\\n margin: 0px;\\n border-top-left-radius: 10px;\\n border-top-right-radius: 10px;\\n}\\n\", \"\"]);\n\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return '@media ' + item[2] + '{' + content + '}';\n } else {\n return content;\n }\n }).join('');\n }; // import a list of modules into the list\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (i = 0; i < modules.length; i++) {\n var item = modules[i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || '';\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n return '/*# ' + data + ' */';\n}","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(\"Siema\",[],t):\"object\"==typeof exports?exports.Siema=t():e.Siema=t()}(\"undefined\"!=typeof self?self:this,function(){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,\"a\",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=0)}([function(e,t,i){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}Object.defineProperty(t,\"__esModule\",{value:!0});var n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},s=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),l=function(){function e(t){var i=this;if(r(this,e),this.config=e.mergeSettings(t),this.selector=\"string\"==typeof this.config.selector?document.querySelector(this.config.selector):this.config.selector,null===this.selector)throw new Error(\"Something wrong with your selector 😭\");this.resolveSlidesNumber(),this.selectorWidth=this.selector.offsetWidth,this.innerElements=[].slice.call(this.selector.children),this.currentSlide=this.config.loop?this.config.startIndex%this.innerElements.length:Math.max(0,Math.min(this.config.startIndex,this.innerElements.length-this.perPage)),this.transformProperty=e.webkitOrNot(),[\"resizeHandler\",\"touchstartHandler\",\"touchendHandler\",\"touchmoveHandler\",\"mousedownHandler\",\"mouseupHandler\",\"mouseleaveHandler\",\"mousemoveHandler\",\"clickHandler\"].forEach(function(e){i[e]=i[e].bind(i)}),this.init()}return s(e,[{key:\"attachEvents\",value:function(){window.addEventListener(\"resize\",this.resizeHandler),this.config.draggable&&(this.pointerDown=!1,this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:!1},this.selector.addEventListener(\"touchstart\",this.touchstartHandler),this.selector.addEventListener(\"touchend\",this.touchendHandler),this.selector.addEventListener(\"touchmove\",this.touchmoveHandler),this.selector.addEventListener(\"mousedown\",this.mousedownHandler),this.selector.addEventListener(\"mouseup\",this.mouseupHandler),this.selector.addEventListener(\"mouseleave\",this.mouseleaveHandler),this.selector.addEventListener(\"mousemove\",this.mousemoveHandler),this.selector.addEventListener(\"click\",this.clickHandler))}},{key:\"detachEvents\",value:function(){window.removeEventListener(\"resize\",this.resizeHandler),this.selector.removeEventListener(\"touchstart\",this.touchstartHandler),this.selector.removeEventListener(\"touchend\",this.touchendHandler),this.selector.removeEventListener(\"touchmove\",this.touchmoveHandler),this.selector.removeEventListener(\"mousedown\",this.mousedownHandler),this.selector.removeEventListener(\"mouseup\",this.mouseupHandler),this.selector.removeEventListener(\"mouseleave\",this.mouseleaveHandler),this.selector.removeEventListener(\"mousemove\",this.mousemoveHandler),this.selector.removeEventListener(\"click\",this.clickHandler)}},{key:\"init\",value:function(){this.attachEvents(),this.selector.style.overflow=\"hidden\",this.selector.style.direction=this.config.rtl?\"rtl\":\"ltr\",this.buildSliderFrame(),this.config.onInit.call(this)}},{key:\"buildSliderFrame\",value:function(){var e=this.selectorWidth/this.perPage,t=this.config.loop?this.innerElements.length+2*this.perPage:this.innerElements.length;this.sliderFrame=document.createElement(\"div\"),this.sliderFrame.style.width=e*t+\"px\",this.enableTransition(),this.config.draggable&&(this.selector.style.cursor=\"-webkit-grab\");var i=document.createDocumentFragment();if(this.config.loop)for(var r=this.innerElements.length-this.perPage;r<this.innerElements.length;r++){var n=this.buildSliderFrameItem(this.innerElements[r].cloneNode(!0));i.appendChild(n)}for(var s=0;s<this.innerElements.length;s++){var l=this.buildSliderFrameItem(this.innerElements[s]);i.appendChild(l)}if(this.config.loop)for(var o=0;o<this.perPage;o++){var a=this.buildSliderFrameItem(this.innerElements[o].cloneNode(!0));i.appendChild(a)}this.sliderFrame.appendChild(i),this.selector.innerHTML=\"\",this.selector.appendChild(this.sliderFrame),this.slideToCurrent()}},{key:\"buildSliderFrameItem\",value:function(e){var t=document.createElement(\"div\");return t.style.cssFloat=this.config.rtl?\"right\":\"left\",t.style.float=this.config.rtl?\"right\":\"left\",t.style.width=(this.config.loop?100/(this.innerElements.length+2*this.perPage):100/this.innerElements.length)+\"%\",t.appendChild(e),t}},{key:\"resolveSlidesNumber\",value:function(){if(\"number\"==typeof this.config.perPage)this.perPage=this.config.perPage;else if(\"object\"===n(this.config.perPage)){this.perPage=1;for(var e in this.config.perPage)window.innerWidth>=e&&(this.perPage=this.config.perPage[e])}}},{key:\"prev\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1];if(!(this.innerElements.length<=this.perPage)){var i=this.currentSlide;if(this.config.loop){if(this.currentSlide-e<0){this.disableTransition();var r=this.currentSlide+this.innerElements.length,n=this.perPage,s=r+n,l=(this.config.rtl?1:-1)*s*(this.selectorWidth/this.perPage),o=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(l+o)+\"px, 0, 0)\",this.currentSlide=r-e}else this.currentSlide=this.currentSlide-e}else this.currentSlide=Math.max(this.currentSlide-e,0);i!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),t&&t.call(this))}}},{key:\"next\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1];if(!(this.innerElements.length<=this.perPage)){var i=this.currentSlide;if(this.config.loop){if(this.currentSlide+e>this.innerElements.length-this.perPage){this.disableTransition();var r=this.currentSlide-this.innerElements.length,n=this.perPage,s=r+n,l=(this.config.rtl?1:-1)*s*(this.selectorWidth/this.perPage),o=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(l+o)+\"px, 0, 0)\",this.currentSlide=r+e}else this.currentSlide=this.currentSlide+e}else this.currentSlide=Math.min(this.currentSlide+e,this.innerElements.length-this.perPage);i!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),t&&t.call(this))}}},{key:\"disableTransition\",value:function(){this.sliderFrame.style.webkitTransition=\"all 0ms \"+this.config.easing,this.sliderFrame.style.transition=\"all 0ms \"+this.config.easing}},{key:\"enableTransition\",value:function(){this.sliderFrame.style.webkitTransition=\"all \"+this.config.duration+\"ms \"+this.config.easing,this.sliderFrame.style.transition=\"all \"+this.config.duration+\"ms \"+this.config.easing}},{key:\"goTo\",value:function(e,t){if(!(this.innerElements.length<=this.perPage)){var i=this.currentSlide;this.currentSlide=this.config.loop?e%this.innerElements.length:Math.min(Math.max(e,0),this.innerElements.length-this.perPage),i!==this.currentSlide&&(this.slideToCurrent(),this.config.onChange.call(this),t&&t.call(this))}}},{key:\"slideToCurrent\",value:function(e){var t=this,i=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,r=(this.config.rtl?1:-1)*i*(this.selectorWidth/this.perPage);e?requestAnimationFrame(function(){requestAnimationFrame(function(){t.enableTransition(),t.sliderFrame.style[t.transformProperty]=\"translate3d(\"+r+\"px, 0, 0)\"})}):this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+r+\"px, 0, 0)\"}},{key:\"updateAfterDrag\",value:function(){var e=(this.config.rtl?-1:1)*(this.drag.endX-this.drag.startX),t=Math.abs(e),i=this.config.multipleDrag?Math.ceil(t/(this.selectorWidth/this.perPage)):1,r=e>0&&this.currentSlide-i<0,n=e<0&&this.currentSlide+i>this.innerElements.length-this.perPage;e>0&&t>this.config.threshold&&this.innerElements.length>this.perPage?this.prev(i):e<0&&t>this.config.threshold&&this.innerElements.length>this.perPage&&this.next(i),this.slideToCurrent(r||n)}},{key:\"resizeHandler\",value:function(){this.resolveSlidesNumber(),this.currentSlide+this.perPage>this.innerElements.length&&(this.currentSlide=this.innerElements.length<=this.perPage?0:this.innerElements.length-this.perPage),this.selectorWidth=this.selector.offsetWidth,this.buildSliderFrame()}},{key:\"clearDrag\",value:function(){this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:this.drag.preventClick}}},{key:\"touchstartHandler\",value:function(e){-1!==[\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\"].indexOf(e.target.nodeName)||(e.stopPropagation(),this.pointerDown=!0,this.drag.startX=e.touches[0].pageX,this.drag.startY=e.touches[0].pageY)}},{key:\"touchendHandler\",value:function(e){e.stopPropagation(),this.pointerDown=!1,this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:\"touchmoveHandler\",value:function(e){if(e.stopPropagation(),null===this.drag.letItGo&&(this.drag.letItGo=Math.abs(this.drag.startY-e.touches[0].pageY)<Math.abs(this.drag.startX-e.touches[0].pageX)),this.pointerDown&&this.drag.letItGo){e.preventDefault(),this.drag.endX=e.touches[0].pageX,this.sliderFrame.style.webkitTransition=\"all 0ms \"+this.config.easing,this.sliderFrame.style.transition=\"all 0ms \"+this.config.easing;var t=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,i=t*(this.selectorWidth/this.perPage),r=this.drag.endX-this.drag.startX,n=this.config.rtl?i+r:i-r;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(this.config.rtl?1:-1)*n+\"px, 0, 0)\"}}},{key:\"mousedownHandler\",value:function(e){-1!==[\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\"].indexOf(e.target.nodeName)||(e.preventDefault(),e.stopPropagation(),this.pointerDown=!0,this.drag.startX=e.pageX)}},{key:\"mouseupHandler\",value:function(e){e.stopPropagation(),this.pointerDown=!1,this.selector.style.cursor=\"-webkit-grab\",this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:\"mousemoveHandler\",value:function(e){if(e.preventDefault(),this.pointerDown){\"A\"===e.target.nodeName&&(this.drag.preventClick=!0),this.drag.endX=e.pageX,this.selector.style.cursor=\"-webkit-grabbing\",this.sliderFrame.style.webkitTransition=\"all 0ms \"+this.config.easing,this.sliderFrame.style.transition=\"all 0ms \"+this.config.easing;var t=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,i=t*(this.selectorWidth/this.perPage),r=this.drag.endX-this.drag.startX,n=this.config.rtl?i+r:i-r;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(this.config.rtl?1:-1)*n+\"px, 0, 0)\"}}},{key:\"mouseleaveHandler\",value:function(e){this.pointerDown&&(this.pointerDown=!1,this.selector.style.cursor=\"-webkit-grab\",this.drag.endX=e.pageX,this.drag.preventClick=!1,this.enableTransition(),this.updateAfterDrag(),this.clearDrag())}},{key:\"clickHandler\",value:function(e){this.drag.preventClick&&e.preventDefault(),this.drag.preventClick=!1}},{key:\"remove\",value:function(e,t){if(e<0||e>=this.innerElements.length)throw new Error(\"Item to remove doesn't exist 😭\");var i=e<this.currentSlide,r=this.currentSlide+this.perPage-1===e;(i||r)&&this.currentSlide--,this.innerElements.splice(e,1),this.buildSliderFrame(),t&&t.call(this)}},{key:\"insert\",value:function(e,t,i){if(t<0||t>this.innerElements.length+1)throw new Error(\"Unable to inset it at this index 😭\");if(-1!==this.innerElements.indexOf(e))throw new Error(\"The same item in a carousel? Really? Nope 😭\");var r=t<=this.currentSlide>0&&this.innerElements.length;this.currentSlide=r?this.currentSlide+1:this.currentSlide,this.innerElements.splice(t,0,e),this.buildSliderFrame(),i&&i.call(this)}},{key:\"prepend\",value:function(e,t){this.insert(e,0),t&&t.call(this)}},{key:\"append\",value:function(e,t){this.insert(e,this.innerElements.length+1),t&&t.call(this)}},{key:\"destroy\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];if(this.detachEvents(),this.selector.style.cursor=\"auto\",e){for(var i=document.createDocumentFragment(),r=0;r<this.innerElements.length;r++)i.appendChild(this.innerElements[r]);this.selector.innerHTML=\"\",this.selector.appendChild(i),this.selector.removeAttribute(\"style\")}t&&t.call(this)}}],[{key:\"mergeSettings\",value:function(e){var t={selector:\".siema\",duration:200,easing:\"ease-out\",perPage:1,startIndex:0,draggable:!0,multipleDrag:!0,threshold:20,loop:!1,rtl:!1,onInit:function(){},onChange:function(){}},i=e;for(var r in i)t[r]=i[r];return t}},{key:\"webkitOrNot\",value:function(){return\"string\"==typeof document.documentElement.style.transform?\"transform\":\"WebkitTransform\"}}]),e}();t.default=l,e.exports=t.default}])});","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertAt.before, target);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\tif(options.attrs.nonce === undefined) {\n\t\tvar nonce = getNonce();\n\t\tif (nonce) {\n\t\t\toptions.attrs.nonce = nonce;\n\t\t}\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction getNonce() {\n\tif (typeof __webpack_nonce__ === 'undefined') {\n\t\treturn null;\n\t}\n\n\treturn __webpack_nonce__;\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = typeof options.transform === 'function'\n\t\t ? options.transform(obj.css) \n\t\t : options.transform.default(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don't add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n","\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== \"undefined\" && window.location;\n\n if (!location) {\n throw new Error(\"fixUrls requires window.location\");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t return css;\n }\n\n var baseUrl = location.protocol + \"//\" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word \"url\" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn't a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([bth[buf[i++]], bth[buf[i++]], \n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]]]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path d=\\\"M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg t=\\\"1553418887330\\\" class=\\\"icon\\\" style viewBox=\\\"0 0 1024 1024\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" p-id=\\\"2264\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><style type=\\\"text/css\\\"></style></defs><path d=\\\"M787.797333 90.197333a42.581333 42.581333 0 0 0-44.074666 2.688l-554.666667 384a42.794667 42.794667 0 0 0 0 70.186667l554.666667 384A42.666667 42.666667 0 0 0 810.666667 896V128a42.666667 42.666667 0 0 0-22.869334-37.802667zM725.333333 814.549333L288.298667 512 725.333333 209.450667v605.098666z\\\" p-id=\\\"2265\\\"></path></svg>\"","module.exports = \"<svg t=\\\"1553418900235\\\" class=\\\"icon\\\" style viewBox=\\\"0 0 1024 1024\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" p-id=\\\"2709\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><style type=\\\"text/css\\\"></style></defs><path d=\\\"M236.202667 933.802667a42.837333 42.837333 0 0 0 44.074666-2.730667l554.666667-384a42.666667 42.666667 0 0 0 0-70.144l-554.666667-384A42.581333 42.581333 0 0 0 213.333333 128v768a42.666667 42.666667 0 0 0 22.869334 37.802667zM298.666667 209.450667L735.701333 512 298.666667 814.549333V209.450667z\\\" p-id=\\\"2710\\\"></path></svg>\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><path d=\\\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path d=\\\"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><path d=\\\"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 544 512\\\"><path d=\\\"M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 640 512\\\"><path d=\\\"M594.53 508.63L6.18 53.9c-6.97-5.42-8.23-15.47-2.81-22.45L23.01 6.18C28.43-.8 38.49-2.06 45.47 3.37L633.82 458.1c6.97 5.42 8.23 15.47 2.81 22.45l-19.64 25.27c-5.42 6.98-15.48 8.23-22.46 2.81z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 320 512\\\"><path d=\\\"M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path d=\\\"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path d=\\\"M152 416h-24.013l26.586-80.782H292.8L319.386 416H296c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h136c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-26.739L275.495 42.746A16 16 0 0 0 260.382 32h-72.766a16 16 0 0 0-15.113 10.746L42.739 416H16c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h136c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16zm64.353-271.778c4.348-15.216 6.61-28.156 7.586-34.644.839 6.521 2.939 19.476 7.727 34.706l41.335 124.006h-98.619l41.971-124.068z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 352 512\\\"><path d=\\\"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z\\\"></path></svg><!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->\"","import { uuid } from './../../utils/uuid';\nimport { WhitePageSource } from './../types';\nimport { SvgHelper } from './../../renderer/SvgHelper/index';\n\n/** 基础的绘制版 */\nexport class Baseboard {\n id: string = uuid();\n\n /** 元素 */\n source: WhitePageSource;\n\n // 目前使用 Image 元素作为输出源\n target: HTMLImageElement;\n targetRect: ClientRect;\n\n boardCanvas: SVGSVGElement;\n boardHolder: HTMLDivElement;\n defs: SVGDefsElement;\n\n width: number;\n height: number;\n\n constructor(source: WhitePageSource) {\n this.source = source;\n\n if (source.imgEle) {\n this.target = source.imgEle!;\n\n // 如果仅传入图片地址或者 Blob,则必须为全屏模式\n this.width = this.target.clientWidth;\n this.height = this.target.clientHeight;\n }\n }\n\n protected initBoard = () => {\n // init holder\n this.boardHolder = document.createElement('div');\n this.boardHolder.id = `fcw-board-holder-${this.id}`;\n // fix for Edge's touch behavior\n this.boardHolder.style.setProperty('touch-action', 'none');\n this.boardHolder.style.setProperty('-ms-touch-action', 'none');\n document.body.appendChild(this.boardHolder);\n\n // init canvas\n this.boardCanvas = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n this.boardCanvas.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n this.boardCanvas.setAttribute('width', this.width.toString());\n this.boardCanvas.setAttribute('height', this.height.toString());\n this.boardCanvas.setAttribute(\n 'viewBox',\n '0 0 ' + this.width.toString() + ' ' + this.height.toString()\n );\n\n this.boardHolder.style.position = 'absolute';\n this.boardHolder.style.width = `${this.width}px`;\n this.boardHolder.style.height = `${this.height}px`;\n this.boardHolder.style.transformOrigin = 'top left';\n this.positionBoard();\n this.defs = SvgHelper.createDefs();\n this.boardCanvas.appendChild(this.defs);\n this.boardHolder.appendChild(this.boardCanvas);\n };\n\n protected positionBoard = () => {\n this.boardHolder.style.top = this.targetRect.top + 'px';\n this.boardHolder.style.left = this.targetRect.left + 'px';\n };\n}\n","\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\", function() {\n\t\tvar newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","import { WhitePageSource } from './../types';\nimport { Baseboard } from './../Baseboard/index';\nimport { BaseMarker } from './../../markers/BaseMarker/index';\nimport { getToolbars } from './../../toolbar/toolbar-items';\nimport { WhitePage } from './../WhitePage/index';\nimport { onSyncFunc } from './../../event/Event';\n\nimport { Synthetizer } from '../../renderer/Synthetizer';\nimport { Toolbar } from '../../toolbar/Toolbar';\nimport { ToolbarItem } from '../../toolbar/ToolbarItem';\n\nimport './index.less';\n\nexport class Drawboard extends Baseboard {\n /** Options */\n private scale = 1.0;\n\n /** 句柄 */\n page: WhitePage;\n\n private markers: BaseMarker[];\n get markerMap(): { [key: string]: BaseMarker } {\n const map = {};\n this.markers.forEach(marker => {\n map[marker.id] = marker;\n });\n return map;\n }\n private activeMarker: BaseMarker | null;\n\n private toolbar: Toolbar;\n private toolbars: ToolbarItem[];\n private toolbarUI: HTMLElement;\n\n /** 回调 */\n private onComplete: (dataUrl: string) => void = () => {};\n private onChange: onSyncFunc = () => {};\n private onCancel: () => void;\n\n constructor(\n source: WhitePageSource,\n { page, onChange }: { page?: WhitePage; onChange?: onSyncFunc } = {}\n ) {\n super(source);\n\n if (page) {\n this.page = page;\n }\n\n this.markers = [];\n this.activeMarker = null;\n this.toolbars = getToolbars(page);\n\n if (onChange) {\n this.onChange = onChange;\n }\n }\n\n /** @region LifeCycle open - hide - show - ... - close */\n /** 打开画板 */\n public open = (onComplete?: (dataUrl: string) => void, onCancel?: () => void) => {\n if (onComplete) {\n this.onComplete = onComplete;\n }\n\n if (onCancel) {\n this.onCancel = onCancel;\n }\n\n this.setTargetRect();\n\n this.initBoard();\n this.attachEvents();\n this.setStyles();\n\n window.addEventListener('resize', this.adjustUI);\n\n if (this.page.mode === 'master') {\n this.showUI();\n }\n };\n\n public hide = () => {\n if (this.source.imgSrc) {\n this.target.style.display = 'none';\n }\n // 这里不使用 display:none,是为了保证在隐藏时候仍然可以执行更新\n this.boardHolder.style.visibility = 'hidden';\n this.boardHolder.style.zIndex = '-1';\n\n if (this.toolbar) {\n this.toolbar.hide();\n }\n };\n\n public show = () => {\n if (this.source.imgSrc) {\n this.target.style.display = 'block';\n }\n\n this.boardHolder.style.visibility = 'visible';\n this.boardHolder.style.zIndex = '9999';\n\n if (this.toolbar) {\n this.toolbar.show();\n }\n };\n\n public close = () => {\n if (this.toolbarUI) {\n document.body.removeChild(this.toolbarUI);\n }\n if (this.boardCanvas) {\n document.body.removeChild(this.boardHolder);\n }\n };\n\n public render = (onComplete: (dataUrl: string) => void, onCancel?: () => void) => {\n this.onComplete = onComplete;\n\n if (onCancel) {\n this.onCancel = onCancel;\n }\n\n this.selectMarker(null);\n this.startRender(this.renderFinished);\n };\n\n public addMarker = (markerType: typeof BaseMarker, { id }: { id?: string } = {}) => {\n // 假如 Drawboard 存在 Page 引用,则传导给 Marker\n const marker = markerType.createMarker(this.page);\n\n if (id) {\n marker.id = id;\n }\n\n marker.onSelected = this.selectMarker;\n marker.onChange = this.onChange;\n\n if (marker.defs && marker.defs.length > 0) {\n for (const d of marker.defs) {\n if (d.id && !this.boardCanvas.getElementById(d.id)) {\n this.defs.appendChild(d);\n }\n }\n }\n\n // 触发事件流\n this.onChange({\n target: 'marker',\n parentId: this.page ? this.page.id : this.id,\n event: 'add',\n data: { type: marker.type, id: marker.id }\n });\n\n this.markers.push(marker);\n\n this.selectMarker(marker);\n\n this.boardCanvas.appendChild(marker.visual);\n\n const bbox = marker.visual.getBBox();\n const x = this.width / 2 / this.scale - bbox.width / 2;\n const y = this.height / 2 / this.scale - bbox.height / 2;\n\n const translate = marker.visual.transform.baseVal.getItem(0);\n translate.setMatrix(translate.matrix.translate(x, y));\n marker.visual.transform.baseVal.replaceItem(translate, 0);\n };\n\n public deleteActiveMarker = () => {\n if (this.activeMarker) {\n // 触发事件\n if (this.onChange) {\n this.onChange({\n event: 'remove',\n id: this.activeMarker.id,\n target: 'marker',\n data: { id: this.activeMarker.id }\n });\n }\n this.deleteMarker(this.activeMarker);\n }\n };\n\n private setTargetRect = () => {\n const targetRect = this.target.getBoundingClientRect() as DOMRect;\n const bodyRect = document.body.parentElement!.getBoundingClientRect();\n this.targetRect = {\n left: targetRect.left - bodyRect.left,\n top: targetRect.top - bodyRect.top\n } as ClientRect;\n };\n\n private startRender = (done: (dataUrl: string) => void) => {\n const renderer = new Synthetizer();\n renderer.rasterize(this.target, this.boardCanvas, done);\n };\n\n private attachEvents = () => {\n this.boardCanvas.addEventListener('mousedown', this.mouseDown);\n this.boardCanvas.addEventListener('mousemove', this.mouseMove);\n this.boardCanvas.addEventListener('mouseup', this.mouseUp);\n };\n\n private mouseDown = (ev: MouseEvent) => {\n /* tslint:disable:no-bitwise */\n if (this.activeMarker && (ev.buttons & 1) > 0) {\n this.activeMarker.deselect();\n this.activeMarker = null;\n }\n };\n\n private mouseMove = (ev: MouseEvent) => {\n /* tslint:disable:no-bitwise */\n if (this.activeMarker && (ev.buttons & 1) > 0) {\n this.activeMarker.manipulate(ev);\n }\n };\n\n private mouseUp = (ev: MouseEvent) => {\n if (this.activeMarker) {\n this.activeMarker.endManipulation();\n }\n };\n\n private adjustUI = (ev: UIEvent) => {\n this.adjustSize();\n this.positionUI();\n };\n\n private adjustSize = () => {\n this.width = this.target.clientWidth;\n this.height = this.target.clientHeight;\n\n const scale = this.target.clientWidth / this.boardHolder.clientWidth;\n if (scale !== 1.0) {\n this.scale *= scale;\n this.boardHolder.style.width = `${this.width}px`;\n this.boardHolder.style.height = `${this.height}px`;\n\n this.boardHolder.style.transform = `scale(${this.scale})`;\n }\n };\n\n private positionUI = () => {\n this.setTargetRect();\n this.positionBoard();\n this.positionToolbar();\n };\n\n private positionToolbar = () => {\n this.toolbarUI.style.left = `${this.targetRect.left +\n this.target.offsetWidth -\n this.toolbarUI.clientWidth}px`;\n this.toolbarUI.style.top = `${this.targetRect.top - this.toolbarUI.clientHeight}px`;\n };\n\n private showUI = () => {\n this.toolbar = new Toolbar(this.toolbars, this.toolbarClick);\n this.toolbarUI = this.toolbar.getUI();\n document.body.appendChild(this.toolbarUI);\n this.toolbarUI.style.position = 'absolute';\n this.positionToolbar();\n };\n\n private setStyles = () => {\n const editorStyleSheet = document.createElementNS('http://www.w3.org/2000/svg', 'style');\n editorStyleSheet.innerHTML = `\n .rect-marker .render-visual {\n stroke: #ff0000;\n stroke-width: 3;\n fill: transparent;\n }\n .cover-marker .render-visual {\n stroke-width: 0;\n fill: #000000;\n }\n .highlight-marker .render-visual {\n stroke: transparent;\n stroke-width: 0;\n fill: #ffff00;\n fill-opacity: 0.4;\n }\n .line-marker .render-visual {\n stroke: #ff0000;\n stroke-width: 3;\n fill: transparent;\n }\n .arrow-marker .render-visual {\n stroke: #ff0000;\n stroke-width: 3;\n fill: transparent;\n }\n .arrow-marker-tip {\n stroke-width: 0;\n fill: #ff0000;\n }\n .text-marker text {\n fill: #ff0000;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\",\n Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n }\n .fc-whiteboard-rect-control-box .fc-whiteboard-rect-control-rect {\n stroke: black;\n stroke-width: 1;\n stroke-opacity: 0.5;\n stroke-dasharray: 3, 2;\n fill: transparent;\n }\n .fc-whiteboard-control-grip {\n fill: #cccccc;\n stroke: #333333;\n stroke-width: 2;\n }\n `;\n\n this.boardCanvas.appendChild(editorStyleSheet);\n };\n\n private toolbarClick = (ev: MouseEvent, toolbarItem: ToolbarItem) => {\n if (toolbarItem.markerType) {\n this.addMarker(toolbarItem.markerType);\n } else {\n // command button\n switch (toolbarItem.name) {\n case 'delete': {\n this.deleteActiveMarker();\n break;\n }\n case 'pointer': {\n if (this.activeMarker) {\n this.selectMarker(null);\n }\n break;\n }\n case 'close': {\n this.cancel();\n break;\n }\n case 'ok': {\n this.complete();\n break;\n }\n default:\n break;\n }\n }\n };\n\n private selectMarker = (marker: BaseMarker | null) => {\n if (this.activeMarker && this.activeMarker !== marker) {\n this.activeMarker.deselect();\n }\n this.activeMarker = marker;\n };\n\n public deleteMarker = (marker: BaseMarker) => {\n this.boardCanvas.removeChild(marker.visual);\n if (this.activeMarker === marker) {\n this.activeMarker = null;\n }\n this.markers.splice(this.markers.indexOf(marker), 1);\n };\n\n private complete = () => {\n this.selectMarker(null);\n this.startRender(this.renderFinishedClose);\n };\n\n private cancel = () => {\n this.close();\n if (this.onCancel) {\n this.onCancel();\n }\n };\n\n private renderFinished = (dataUrl: string) => {\n this.onComplete(dataUrl);\n };\n\n private renderFinishedClose = (dataUrl: string) => {\n this.close();\n this.onComplete(dataUrl);\n };\n}\n","\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\", function() {\n\t\tvar newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","import { TextMarker } from './../../markers/TextMarker/index';\nimport { MarkerType } from './../../markers/types';\nimport { SyncEvent } from './../../event/Event';\nimport { EventHub } from '../../event/EventHub';\nimport { WhiteboardMode, WhitePageSource } from './../types';\nimport { Drawboard } from './../Drawboard/index';\nimport { uuid } from './../../utils/uuid';\nimport { getMarkerByType } from '../../markers/types';\n\nimport './index.less';\nimport { createDivWithClassName } from '../../utils/dom';\n\nconst prefix = 'fcw-page';\n\n/** 白板中的每一页 */\nexport class WhitePage {\n id: string = uuid();\n\n source: WhitePageSource;\n target: HTMLImageElement;\n\n /** UI Options */\n container: HTMLDivElement;\n // 父容器指针\n parentContainer?: HTMLDivElement;\n mode: WhiteboardMode = 'master';\n\n /** Handlers */\n drawboard: Drawboard;\n eventHub?: EventHub;\n\n constructor(\n source: WhitePageSource,\n {\n mode,\n eventHub,\n parentContainer\n }: { mode?: WhiteboardMode; eventHub?: EventHub; parentContainer?: HTMLDivElement } = {}\n ) {\n if (mode) {\n this.mode = mode;\n }\n this.eventHub = eventHub;\n this.parentContainer = parentContainer;\n\n this.initSource(source);\n\n if (this.mode === 'master') {\n this.initMaster();\n }\n\n if (this.mode === 'mirror') {\n this.initMirror();\n }\n }\n\n /** LifeCycle open - close */\n public open() {\n this.drawboard.open();\n }\n\n public hide() {\n this.drawboard.hide();\n }\n\n public show() {\n this.drawboard.show();\n }\n\n public close() {\n this.drawboard.close();\n }\n\n /** 初始化源 */\n private initSource(source: WhitePageSource) {\n // 判断 Source 的类型是否符合要求\n if (typeof source.imgSrc === 'string' && !this.parentContainer) {\n throw new Error('Invalid source, If you set image url, you must also set parentContainer');\n }\n\n this.source = source;\n\n // 如果传入的 imgEle,则直接使用\n if (source.imgEle) {\n this.target = source.imgEle!;\n }\n\n // 如果是图片,则需要创建 Image 元素\n if (typeof source.imgSrc === 'string') {\n this.container = createDivWithClassName(prefix, this.parentContainer!);\n this.container.id = this.id;\n\n this.target = document.createElement('img');\n this.target.src = source.imgSrc;\n this.target.alt = 'Siema image';\n\n this.container.appendChild(this.target);\n }\n }\n\n /** 以 Master 模式启动 */\n protected initMaster() {\n if (this.eventHub) {\n // 对于 WhitePage 中加载的 Drawboard,必须是传入自身可控的 Image 元素\n this.drawboard = new Drawboard(\n { imgEle: this.target },\n {\n page: this,\n onChange: ev => this.eventHub!.emit('sync', ev)\n }\n );\n } else {\n this.drawboard = new Drawboard({ imgEle: this.target }, { page: this });\n }\n }\n\n /** 以 Mirror 模式启动 */\n protected initMirror() {\n if (!this.eventHub) {\n throw new Error('Invalid eventHub');\n }\n\n this.drawboard = new Drawboard({ imgEle: this.target }, { page: this });\n\n this.eventHub.on('sync', (ev: SyncEvent) => {\n try {\n // 判断是否为 WhitePage 的同步\n if (ev.target === 'page' && ev.id === this.id) {\n this.onPageSync();\n }\n\n // 处理 Marker 的同步事件\n if (ev.target === 'marker') {\n this.onMarkerSync(ev);\n }\n } catch (e) {\n console.warn(e);\n }\n });\n }\n\n /** 处理 Page 的同步事件 */\n private onPageSync() {}\n\n /** 处理 Marker 的同步事件 */\n private onMarkerSync(ev: SyncEvent) {\n if (ev.event === 'add' && ev.parentId === this.id) {\n const data: { id: string; type: MarkerType } = ev.data as {\n id: string;\n type: MarkerType;\n };\n\n // 这里判断该 Marker 是否已经添加过;如果已经存在则忽略\n const marker = this.drawboard.markerMap[data.id];\n if (!marker) {\n this.drawboard.addMarker(getMarkerByType(data.type), { id: data.id });\n }\n }\n\n // 其余的情况,不存在 id 则直接返回空\n if (!ev.id) {\n return;\n }\n\n if (ev.event === 'remove') {\n const data: { id: string } = ev.data as {\n id: string;\n };\n\n const marker = this.drawboard.markerMap[data.id];\n if (marker) {\n this.drawboard.deleteMarker(marker);\n }\n }\n\n if (ev.event === 'move' || ev.event === 'resize') {\n const marker = this.drawboard.markerMap[ev.id];\n\n if (marker) {\n marker.reactToManipulation(ev.event, ev.data as any);\n }\n }\n\n // 响应文本变化事件\n if (ev.event === 'changeText') {\n const marker = this.drawboard.markerMap[ev.id] as TextMarker;\n if (marker) {\n marker.setText(ev.data as string);\n }\n }\n }\n}\n","\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\", function() {\n\t\tvar newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","import { SyncEvent } from './../../event/Event';\nimport * as Siema from 'siema';\n\nimport { WhiteboardMode } from '../types';\nimport { WhitePage } from '../WhitePage/index';\nimport { EventHub } from '../../event/EventHub';\nimport { uuid } from '../../utils/uuid';\nimport { addClassName, createDivWithClassName } from '../../utils/dom';\n\nimport './index.less';\n\nconst LeftArrowIcon = require('../../assets/bx-left-arrow.svg');\nconst RightArrowIcon = require('../../assets/bx-right-arrow.svg');\n\nconst prefix = 'fcw-board';\n\nexport class SerializableWhiteboard {\n id: string;\n sources: string[];\n pageIds: string[];\n visiblePageIndex: number;\n}\n\nexport class Whiteboard {\n id: string = uuid();\n sources: string[] = [];\n\n /** 元素 */\n // 如果传入的是图片地址,则需要挂载到该 Target 元素下\n target: HTMLDivElement;\n imgsContainer: HTMLDivElement;\n pagesContainer: HTMLDivElement;\n\n /** UI Options */\n // 事件中心\n eventHub?: EventHub;\n // 编辑模式\n mode: WhiteboardMode = 'master';\n // 是否为全屏模式\n isFullscreen: boolean = false;\n\n /** 句柄 */\n pages: WhitePage[] = [];\n get activePage() {\n return this.pages[this.visiblePageIndex];\n }\n siema: any;\n\n /** State | 内部状态 */\n // 是否被初始化过,如果尚未被初始化,则等待来自于 Master 的同步消息\n isInitialized: boolean = false;\n isSyncing: boolean = false;\n visiblePageIndex: number = 0;\n emitInterval: any;\n\n constructor(\n target: HTMLDivElement,\n {\n sources,\n eventHub,\n mode,\n visiblePageIndex\n }: {\n sources?: string[];\n eventHub?: EventHub;\n mode?: WhiteboardMode;\n visiblePageIndex?: number;\n } = {}\n ) {\n if (target) {\n this.target = target;\n } else {\n this.target = document.createElement('div');\n document.body.appendChild(this.target);\n }\n\n if (!this.target.id) {\n this.target.id = this.id;\n }\n\n addClassName(this.target, prefix);\n\n if (sources) {\n this.sources = sources;\n }\n\n this.eventHub = eventHub;\n\n if (mode) {\n this.mode = mode;\n }\n\n // set inner state\n if (typeof visiblePageIndex !== 'undefined') {\n this.visiblePageIndex = visiblePageIndex;\n }\n\n this.init();\n }\n\n /** LifeCycle */\n public open() {\n // 依次渲染所有的页,隐藏非当前页之外的其他页\n this.pages.forEach((page, i) => {\n page.open();\n\n if (i !== this.visiblePageIndex) {\n page.hide();\n }\n });\n }\n\n /** 关闭当前的 Whiteboard */\n public close() {\n if (this.emitInterval) {\n clearInterval(this.emitInterval);\n }\n }\n\n /** 展示当前的 WhitePage */\n public show() {\n if (this.activePage) {\n this.activePage.show();\n }\n }\n\n public hide() {\n if (this.activePage) {\n this.activePage.hide();\n }\n }\n\n /** 获取当前快照 */\n public snap(): SerializableWhiteboard {\n return {\n id: this.id,\n sources: this.sources,\n pageIds: this.pages.map(page => page.id),\n visiblePageIndex: this.visiblePageIndex\n };\n }\n\n /** 初始化操作 */\n private init() {\n // 为 target 添加子 imgs 容器\n this.imgsContainer = createDivWithClassName(`${prefix}-imgs`, this.target);\n // 为 target 添加子 pages 容器\n this.pagesContainer = createDivWithClassName(`${prefix}-pages`, this.target);\n\n if (this.mode === 'master') {\n this.initMaster();\n\n this.emitSnapshot();\n }\n\n if (this.mode === 'mirror') {\n this.initMirror();\n }\n }\n\n /** 以主模式启动 */\n private initMaster() {\n // 初始化所有的 WhitePages\n this.sources.forEach(source => {\n const page = new WhitePage(\n { imgSrc: source },\n {\n mode: this.mode,\n eventHub: this.eventHub,\n parentContainer: this.pagesContainer\n }\n );\n\n // 这里隐藏 Dashboard 的图片源,Siema 切换的是占位图片\n page.container.style.visibility = 'hidden';\n\n this.pages.push(page);\n });\n\n this.initSiema();\n\n // 初始化控制节点\n const controller = createDivWithClassName(`${prefix}-controller`, this.target);\n\n const prevEle = createDivWithClassName(`${prefix}-flip-arrow`, controller);\n prevEle.innerHTML = LeftArrowIcon;\n\n const nextEle = createDivWithClassName(`${prefix}-flip-arrow`, controller);\n nextEle.innerHTML = RightArrowIcon;\n\n nextEle!.addEventListener('click', () => {\n const nextPageIndex =\n this.visiblePageIndex + 1 > this.pages.length - 1 ? 0 : this.visiblePageIndex + 1;\n this.onPageChange(nextPageIndex);\n });\n prevEle!.addEventListener('click', () => {\n const nextPageIndex =\n this.visiblePageIndex - 1 < 0 ? this.pages.length - 1 : this.visiblePageIndex - 1;\n\n this.onPageChange(nextPageIndex);\n });\n }\n\n /** 以镜像模式启动 */\n private initMirror() {\n if (!this.eventHub) {\n throw new Error('Invalid eventHub');\n }\n\n this.eventHub.on('sync', (ev: SyncEvent) => {\n if (ev.target !== 'whiteboard') {\n return;\n }\n\n if (ev.event === 'snap') {\n // 如果已经初始化完毕,则直接跳过\n if (this.isInitialized) {\n return;\n }\n\n this.onSnapshot(ev.data as SerializableWhiteboard);\n }\n\n if (ev.event === 'changeIndex' && ev.id === this.id) {\n if (this.isInitialized) {\n this.onPageChange(ev.data as number);\n }\n }\n });\n }\n\n /** 初始化 Siema */\n private initSiema() {\n // 初始化所有的占位图片,用于给 Siema 播放使用\n this.sources.forEach(source => {\n const imgEle = document.createElement('img');\n addClassName(imgEle, `${prefix}-img`);\n imgEle.src = source;\n imgEle.alt = 'Siema image';\n\n this.imgsContainer.appendChild(imgEle);\n });\n\n // 初始化 Siema,并且添加控制节点\n this.siema = new Siema({\n selector: this.imgsContainer,\n duration: 200,\n easing: 'ease-out',\n perPage: 1,\n startIndex: 0,\n draggable: false,\n multipleDrag: true,\n threshold: 20,\n loop: false,\n rtl: false\n });\n }\n\n /** 响应页面切换的事件 */\n private onPageChange(nextPageIndex: number) {\n this.siema.goTo(nextPageIndex);\n this.visiblePageIndex = nextPageIndex;\n\n // 将所有的 Page 隐藏\n this.pages.forEach((page, i) => {\n if (nextPageIndex === i) {\n page.show();\n } else {\n page.hide();\n }\n });\n\n if (this.mode === 'master' && this.eventHub) {\n this.eventHub.emit('sync', {\n event: 'changeIndex',\n id: this.id,\n target: 'whiteboard',\n data: nextPageIndex\n });\n }\n }\n\n private emitSnapshot() {\n const innerFunc = () => {\n if (this.eventHub) {\n this.eventHub.emit('sync', {\n event: 'snap',\n id: this.id,\n target: 'whiteboard',\n data: this.snap()\n });\n }\n };\n\n // 定期触发事件\n this.emitInterval = setInterval(() => {\n innerFunc();\n }, 5 * 1000);\n\n // 首次事件,延时 500ms 发出\n setTimeout(innerFunc, 500);\n }\n\n /** 响应获取到的快照事件 */\n private onSnapshot(snap: SerializableWhiteboard) {\n const { id, sources, pageIds, visiblePageIndex } = snap;\n\n if (!this.isInitialized && !this.isSyncing) {\n this.id = id;\n this.sources = sources;\n this.isSyncing = true;\n\n // 初始化所有的 WhitePages\n this.sources.forEach((source, i) => {\n const page = new WhitePage(\n { imgSrc: source },\n {\n mode: this.mode,\n eventHub: this.eventHub,\n parentContainer: this.pagesContainer\n }\n );\n page.id = pageIds[i];\n\n // 这里隐藏 Dashboard 的图片源,Siema 切换的是占位图片\n page.container.style.opacity = 'hidden';\n\n this.pages.push(page);\n\n page.open();\n });\n\n this.initSiema();\n }\n\n this.isInitialized = true;\n this.isSyncing = false;\n this.onPageChange(visiblePageIndex);\n }\n}\n","export { Drawboard } from './board/Drawboard';\nexport { Whiteboard } from './board/Whiteboard';\nexport { WhiteboardMode } from './board/types';\n","import { MarkerType } from './../types';\nimport { LinearMarker } from '../LinearMarker';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class ArrowMarker extends LinearMarker {\n type: MarkerType = 'arrow';\n\n public static createMarker = (page?: WhitePage): LinearMarker => {\n const marker = new ArrowMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n private readonly ARROW_SIZE = 6;\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'arrow-marker']]);\n\n const tip = SvgHelper.createPolygon(\n `0,0 ${this.ARROW_SIZE},${this.ARROW_SIZE / 2} 0,${this.ARROW_SIZE}`,\n [['class', 'arrow-marker-tip']]\n );\n this.defs.push(\n SvgHelper.createMarker(\n 'arrow-marker-head',\n 'auto',\n this.ARROW_SIZE,\n this.ARROW_SIZE,\n this.ARROW_SIZE - 1,\n this.ARROW_SIZE / 2,\n tip\n )\n );\n\n this.markerLine.setAttribute('marker-end', 'url(#arrow-marker-head');\n }\n}\n","import { SvgHelper } from '../../renderer/SvgHelper';\n\nexport class ResizeGrip {\n public visual: SVGGraphicsElement;\n\n public readonly GRIP_SIZE = 10;\n\n constructor() {\n this.visual = SvgHelper.createCircle(this.GRIP_SIZE, [['class', 'fc-whiteboard-control-grip']]);\n }\n}\n","import { WhitePage } from './../../board/WhitePage/index';\nimport { PositionType } from '../../event/Event';\nimport { onSyncFunc, EventType } from '../../event/Event';\nimport { MarkerType } from '../types';\nimport * as uuid from 'uuid/v1';\nimport { SvgHelper } from '../../renderer/SvgHelper';\n\nexport class BaseMarker {\n id: string = uuid();\n type: MarkerType = 'base';\n // 归属的\n page?: WhitePage;\n // Marker 的属性发生变化后的回调\n onChange: onSyncFunc = () => {};\n\n public static createMarker = (page?: WhitePage): BaseMarker => {\n const marker = new BaseMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n public visual: SVGGElement;\n public renderVisual: SVGGElement;\n\n public onSelected: (marker: BaseMarker) => void;\n\n public defs: SVGElement[] = [];\n\n protected width: number = 200;\n protected height: number = 50;\n\n protected isActive: boolean = true;\n protected isDragging: boolean = false;\n protected isResizing: boolean = false;\n\n protected previousMouseX: number = 0;\n protected previousMouseY: number = 0;\n\n public reactToManipulation(\n type: EventType,\n { dx, dy, pos }: { dx: number; dy: number; pos: PositionType }\n ) {\n if (type === 'move') {\n this.move(dx, dy);\n }\n\n if (type === 'resize') {\n this.resizeByEvent(dx, dy, pos);\n }\n }\n\n /** 响应元素视图状态变化 */\n public manipulate = (ev: MouseEvent) => {\n const scale = this.visual.getScreenCTM()!.a;\n const dx = (ev.screenX - this.previousMouseX) / scale;\n const dy = (ev.screenY - this.previousMouseY) / scale;\n\n if (this.isDragging) {\n this.onChange({ target: 'marker', id: this.id, event: 'move', data: { dx, dy } });\n this.move(dx, dy);\n }\n\n if (this.isResizing) {\n this.resize(dx, dy, (pos: PositionType) => {\n this.onChange({ target: 'marker', id: this.id, event: 'resize', data: { dx, dy, pos } });\n });\n }\n\n this.previousMouseX = ev.screenX;\n this.previousMouseY = ev.screenY;\n };\n\n public endManipulation() {\n this.isDragging = false;\n this.isResizing = false;\n }\n\n public select() {\n this.isActive = true;\n if (this.onSelected) {\n this.onSelected(this);\n }\n return;\n }\n\n public deselect() {\n this.isActive = false;\n this.endManipulation();\n return;\n }\n\n protected setup() {\n this.visual = SvgHelper.createGroup();\n // translate\n this.visual.transform.baseVal.appendItem(SvgHelper.createTransform());\n\n this.visual.addEventListener('mousedown', this.mouseDown);\n this.visual.addEventListener('mouseup', this.mouseUp);\n this.visual.addEventListener('mousemove', this.mouseMove);\n\n this.visual.addEventListener('touchstart', this.onTouch, { passive: false });\n this.visual.addEventListener('touchend', this.onTouch, { passive: false });\n this.visual.addEventListener('touchmove', this.onTouch, { passive: false });\n\n this.renderVisual = SvgHelper.createGroup([['class', 'render-visual']]);\n this.visual.appendChild(this.renderVisual);\n }\n\n protected addToVisual = (el: SVGElement) => {\n this.visual.appendChild(el);\n };\n\n protected addToRenderVisual = (el: SVGElement) => {\n this.renderVisual.appendChild(el);\n };\n\n protected resize(x: number, y: number, cb?: Function) {\n return;\n }\n protected resizeByEvent(x: number, y: number, pos?: PositionType) {\n return;\n }\n\n /** 截获 Touch 事件,并且转发为 Mouse 事件 */\n protected onTouch(ev: TouchEvent) {\n ev.preventDefault();\n const newEvt = document.createEvent('MouseEvents');\n const touch = ev.changedTouches[0];\n let type = null;\n\n switch (ev.type) {\n case 'touchstart':\n type = 'mousedown';\n break;\n case 'touchmove':\n type = 'mousemove';\n break;\n case 'touchend':\n type = 'mouseup';\n break;\n default:\n break;\n }\n\n newEvt.initMouseEvent(\n type!,\n true,\n true,\n window,\n 0,\n touch.screenX,\n touch.screenY,\n touch.clientX,\n touch.clientY,\n ev.ctrlKey,\n ev.altKey,\n ev.shiftKey,\n ev.metaKey,\n 0,\n null\n );\n\n ev.target!.dispatchEvent(newEvt);\n }\n\n private mouseDown = (ev: MouseEvent) => {\n ev.stopPropagation();\n\n if (this.page && this.page.mode === 'mirror') {\n return;\n }\n\n this.select();\n this.isDragging = true;\n this.previousMouseX = ev.screenX;\n this.previousMouseY = ev.screenY;\n };\n\n private mouseUp = (ev: MouseEvent) => {\n ev.stopPropagation();\n this.endManipulation();\n };\n\n private mouseMove = (ev: MouseEvent) => {\n ev.stopPropagation();\n this.manipulate(ev);\n };\n\n private move = (dx: number, dy: number) => {\n const translate = this.visual.transform.baseVal.getItem(0);\n translate.setMatrix(translate.matrix.translate(dx, dy));\n this.visual.transform.baseVal.replaceItem(translate, 0);\n };\n}\n","import { MarkerType } from './../types';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { RectBaseMarker } from '../RectMarker/RectBaseMarker';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class CoverMarker extends RectBaseMarker {\n type: MarkerType = 'cover';\n\n public static createMarker = (page?: WhitePage): RectBaseMarker => {\n const marker = new CoverMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'cover-marker']]);\n }\n}\n","import { MarkerType } from './../types';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { RectBaseMarker } from '../RectMarker/RectBaseMarker';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class HighlightMarker extends RectBaseMarker {\n type: MarkerType = 'highlight';\n\n public static createMarker = (page?: WhitePage): RectBaseMarker => {\n const marker = new HighlightMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'highlight-marker']]);\n }\n}\n","import { MarkerType } from './../types';\nimport { LinearMarker } from '../LinearMarker';\nimport { SvgHelper } from './../../renderer/SvgHelper/index';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class LineMarker extends LinearMarker {\n type: MarkerType = 'line';\n\n public static createMarker = (page?: WhitePage): LinearMarker => {\n const marker = new LineMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'line-marker']]);\n }\n}\n","import { WhitePage } from './../../board/WhitePage/index';\nimport { BaseMarker } from '../BaseMarker';\nimport { ResizeGrip } from '../BaseMarker/ResizeGrip';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { PositionType } from '../../event/Event';\n\nexport class LinearMarker extends BaseMarker {\n public static createMarker = (page?: WhitePage): LinearMarker => {\n const marker = new LinearMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected markerLine: SVGLineElement;\n\n private readonly MIN_LENGTH = 20;\n\n private markerBgLine: SVGLineElement; // touch target\n\n private controlBox: SVGGElement;\n\n private controlGrips: { left: ResizeGrip; right: ResizeGrip };\n private activeGrip: ResizeGrip | null;\n\n private x1: number = 0;\n private y1: number = 0;\n private x2: number = this.width;\n private y2: number = 0;\n\n public endManipulation() {\n super.endManipulation();\n this.isResizing = false;\n this.activeGrip = null;\n }\n\n public select() {\n super.select();\n this.controlBox.style.display = '';\n }\n\n public deselect() {\n super.deselect();\n this.controlBox.style.display = 'none';\n }\n\n protected setup() {\n super.setup();\n\n this.markerBgLine = SvgHelper.createLine(0, 0, this.x2, 0, [\n ['stroke', 'transparent'],\n ['stroke-width', '30']\n ]);\n this.addToRenderVisual(this.markerBgLine);\n this.markerLine = SvgHelper.createLine(0, 0, this.x2, 0);\n this.addToRenderVisual(this.markerLine);\n\n this.addControlBox();\n\n if (this.page && this.page.mode === 'mirror') {\n this.controlBox.style.display = 'none';\n }\n }\n\n protected resize(x: number, y: number, onPosition?: (pos: PositionType) => void) {\n if (this.activeGrip) {\n if (\n this.activeGrip === this.controlGrips.left &&\n this.getLineLength(this.x1 + x, this.y1 + 1, this.x2, this.y2) >= this.MIN_LENGTH\n ) {\n this.x1 += x;\n this.y1 += y;\n this.markerBgLine.setAttribute('x1', this.x1.toString());\n this.markerBgLine.setAttribute('y1', this.y1.toString());\n this.markerLine.setAttribute('x1', this.x1.toString());\n this.markerLine.setAttribute('y1', this.y1.toString());\n if (onPosition) {\n onPosition('left');\n }\n } else if (\n this.activeGrip === this.controlGrips.right &&\n this.getLineLength(this.x1, this.y1, this.x2 + x, this.y2 + y) >= this.MIN_LENGTH\n ) {\n this.x2 += x;\n this.y2 += y;\n this.markerBgLine.setAttribute('x2', this.x2.toString());\n this.markerBgLine.setAttribute('y2', this.y2.toString());\n this.markerLine.setAttribute('x2', this.x2.toString());\n this.markerLine.setAttribute('y2', this.y2.toString());\n if (onPosition) {\n onPosition('right');\n }\n }\n }\n\n this.adjustControlBox();\n }\n\n protected resizeByEvent(x: number, y: number, pos?: PositionType) {\n if (pos === 'left') {\n this.activeGrip = this.controlGrips.left;\n } else {\n this.activeGrip = this.controlGrips.right;\n }\n\n this.resize(x, y);\n }\n\n private getLineLength = (x1: number, y1: number, x2: number, y2: number): number => {\n const dx = Math.abs(x1 - x2);\n const dy = Math.abs(y1 - y2);\n\n return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n };\n\n private addControlBox = () => {\n this.controlBox = SvgHelper.createGroup([['class', 'fc-whiteboard-line-control-box']]);\n this.addToVisual(this.controlBox);\n\n this.addControlGrips();\n };\n\n private adjustControlBox = () => {\n this.positionGrips();\n };\n\n private addControlGrips = () => {\n this.controlGrips = {\n left: this.createGrip(),\n right: this.createGrip()\n };\n\n this.positionGrips();\n };\n\n private createGrip = (): ResizeGrip => {\n const grip = new ResizeGrip();\n grip.visual.transform.baseVal.appendItem(SvgHelper.createTransform());\n this.controlBox.appendChild(grip.visual);\n\n grip.visual.addEventListener('mousedown', this.gripMouseDown);\n grip.visual.addEventListener('mousemove', this.gripMouseMove);\n grip.visual.addEventListener('mouseup', this.gripMouseUp);\n\n grip.visual.addEventListener('touchstart', this.onTouch, { passive: false });\n grip.visual.addEventListener('touchend', this.onTouch, { passive: false });\n grip.visual.addEventListener('touchmove', this.onTouch, { passive: false });\n\n return grip;\n };\n\n private positionGrips = () => {\n const gripSize = this.controlGrips.left.GRIP_SIZE;\n\n const x1 = this.x1 - gripSize / 2;\n const y1 = this.y1 - gripSize / 2;\n const x2 = this.x2 - gripSize / 2;\n const y2 = this.y2 - gripSize / 2;\n\n this.positionGrip(this.controlGrips.left.visual, x1, y1);\n this.positionGrip(this.controlGrips.right.visual, x2, y2);\n };\n\n private positionGrip = (grip: SVGGraphicsElement, x: number, y: number) => {\n const translate = grip.transform.baseVal.getItem(0);\n translate.setTranslate(x, y);\n grip.transform.baseVal.replaceItem(translate, 0);\n };\n\n private gripMouseDown = (ev: MouseEvent) => {\n this.isResizing = true;\n this.activeGrip =\n (ev.target as SVGGraphicsElement) === this.controlGrips.left.visual\n ? this.controlGrips.left\n : this.controlGrips.right;\n this.previousMouseX = ev.screenX;\n this.previousMouseY = ev.screenY;\n ev.stopPropagation();\n };\n\n private gripMouseUp = (ev: MouseEvent) => {\n this.isResizing = false;\n this.activeGrip = null;\n ev.stopPropagation();\n };\n\n private gripMouseMove = (ev: MouseEvent) => {\n if (this.isResizing) {\n this.resize(ev.movementX, ev.movementY);\n }\n };\n}\n","import { PositionType } from '../../event/Event';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { RectangularMarker } from '../RectangularMarker';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class RectBaseMarker extends RectangularMarker {\n public static createMarker = (page?: WhitePage): RectBaseMarker => {\n const marker = new RectBaseMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n private markerRect: SVGRectElement;\n\n protected setup() {\n super.setup();\n\n this.markerRect = SvgHelper.createRect(this.width, this.height);\n this.addToRenderVisual(this.markerRect);\n }\n\n protected resize(x: number, y: number, onPosition?: (pos: PositionType) => void) {\n super.resize(x, y, onPosition);\n this.markerRect.setAttribute('width', this.width.toString());\n this.markerRect.setAttribute('height', this.height.toString());\n }\n}\n","import { WhitePage } from './../../board/WhitePage/index';\nimport { MarkerType } from './../types';\nimport { RectBaseMarker } from './RectBaseMarker';\nimport { SvgHelper } from '../../renderer/SvgHelper';\n\nexport class RectMarker extends RectBaseMarker {\n type: MarkerType = 'rect';\n\n public static createMarker = (page?: WhitePage): RectBaseMarker => {\n const marker = new RectMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'rect-marker']]);\n }\n}\n","import { ResizeGrip } from '../BaseMarker/ResizeGrip';\n\nexport class RectangularMarkerGrips {\n public topLeft: ResizeGrip;\n public topCenter: ResizeGrip;\n public topRight: ResizeGrip;\n public centerLeft: ResizeGrip;\n public centerRight: ResizeGrip;\n public bottomLeft: ResizeGrip;\n public bottomCenter: ResizeGrip;\n public bottomRight: ResizeGrip;\n\n public findGripByVisual = (gripVisual: SVGGraphicsElement) => {\n switch (gripVisual) {\n case this.topLeft.visual:\n return this.topLeft;\n case this.topCenter.visual:\n return this.topCenter;\n case this.topRight.visual:\n return this.topRight;\n case this.centerLeft.visual:\n return this.centerLeft;\n case this.centerRight.visual:\n return this.centerRight;\n case this.bottomLeft.visual:\n return this.bottomLeft;\n case this.bottomCenter.visual:\n return this.bottomCenter;\n case this.bottomRight.visual:\n return this.bottomRight;\n default:\n return this.topLeft;\n }\n };\n}\n","import { RectangularMarkerGrips } from './RectangularMarkerGrips';\nimport { BaseMarker } from '../BaseMarker';\nimport { ResizeGrip } from '../BaseMarker/ResizeGrip';\nimport { PositionType } from '../../event/Event';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class RectangularMarker extends BaseMarker {\n public static createMarker = (page?: WhitePage): RectangularMarker => {\n const marker = new RectangularMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected MIN_SIZE = 5;\n\n private controlBox: SVGGElement;\n private readonly CB_DISTANCE: number = 10;\n private controlRect: SVGRectElement;\n\n private controlGrips: RectangularMarkerGrips;\n private activeGrip: ResizeGrip | null;\n\n public endManipulation() {\n super.endManipulation();\n this.isResizing = false;\n this.activeGrip = null;\n }\n\n public select() {\n super.select();\n this.controlBox.style.display = '';\n }\n\n public deselect() {\n super.deselect();\n this.controlBox.style.display = 'none';\n }\n\n protected setup() {\n super.setup();\n\n this.addControlBox();\n\n if (this.page && this.page.mode === 'mirror') {\n this.controlBox.style.display = 'none';\n }\n }\n\n protected resizeByEvent(x: number, y: number, pos: PositionType) {\n this.activeGrip = this.controlGrips[pos];\n this.resize(x, y);\n }\n\n protected resize(x: number, y: number, onPosition?: (pos: PositionType) => void) {\n let translateX = 0;\n let translateY = 0;\n\n switch (this.activeGrip) {\n case this.controlGrips.topLeft:\n this.width -= x;\n this.height -= y;\n translateX += x;\n translateY += y;\n if (onPosition) {\n onPosition('topLeft');\n }\n break;\n case this.controlGrips.bottomLeft:\n this.width -= x;\n this.height += y;\n translateX += x;\n if (onPosition) {\n onPosition('bottomLeft');\n }\n break;\n case this.controlGrips.topRight:\n this.width += x;\n this.height -= y;\n translateY += y;\n if (onPosition) {\n onPosition('topRight');\n }\n break;\n case this.controlGrips.bottomRight:\n this.width += x;\n this.height += y;\n if (onPosition) {\n onPosition('bottomRight');\n }\n break;\n case this.controlGrips.centerLeft:\n this.width -= x;\n translateX += x;\n if (onPosition) {\n onPosition('centerLeft');\n }\n break;\n case this.controlGrips.centerRight:\n this.width += x;\n if (onPosition) {\n onPosition('centerRight');\n }\n break;\n case this.controlGrips.topCenter:\n this.height -= y;\n translateY += y;\n if (onPosition) {\n onPosition('topCenter');\n }\n break;\n case this.controlGrips.bottomCenter:\n this.height += y;\n if (onPosition) {\n onPosition('bottomCenter');\n }\n break;\n default:\n break;\n }\n\n if (this.width < this.MIN_SIZE) {\n const offset = this.MIN_SIZE - this.width;\n this.width = this.MIN_SIZE;\n if (translateX !== 0) {\n translateX -= offset;\n }\n }\n if (this.height < this.MIN_SIZE) {\n const offset = this.MIN_SIZE - this.height;\n this.height = this.MIN_SIZE;\n if (translateY !== 0) {\n translateY -= offset;\n }\n }\n\n if (translateX !== 0 || translateY !== 0) {\n const translate = this.visual.transform.baseVal.getItem(0);\n translate.setMatrix(translate.matrix.translate(translateX, translateY));\n this.visual.transform.baseVal.replaceItem(translate, 0);\n }\n\n this.adjustControlBox();\n }\n\n protected onTouch(ev: TouchEvent) {\n super.onTouch(ev);\n }\n\n private addControlBox = () => {\n this.controlBox = SvgHelper.createGroup([['class', 'fc-whiteboard-rect-control-box']]);\n const translate = SvgHelper.createTransform();\n translate.setTranslate(-this.CB_DISTANCE / 2, -this.CB_DISTANCE / 2);\n this.controlBox.transform.baseVal.appendItem(translate);\n\n this.addToVisual(this.controlBox);\n\n this.controlRect = SvgHelper.createRect(\n this.width + this.CB_DISTANCE,\n this.height + this.CB_DISTANCE,\n [['class', 'fc-whiteboard-rect-control-rect']]\n );\n\n this.controlBox.appendChild(this.controlRect);\n\n this.controlGrips = new RectangularMarkerGrips();\n this.addControlGrips();\n };\n\n private adjustControlBox = () => {\n this.controlRect.setAttribute('width', (this.width + this.CB_DISTANCE).toString());\n this.controlRect.setAttribute('height', (this.height + this.CB_DISTANCE).toString());\n\n this.positionGrips();\n };\n\n private addControlGrips = () => {\n this.controlGrips.topLeft = this.createGrip();\n this.controlGrips.topCenter = this.createGrip();\n this.controlGrips.topRight = this.createGrip();\n this.controlGrips.centerLeft = this.createGrip();\n this.controlGrips.centerRight = this.createGrip();\n this.controlGrips.bottomLeft = this.createGrip();\n this.controlGrips.bottomCenter = this.createGrip();\n this.controlGrips.bottomRight = this.createGrip();\n\n this.positionGrips();\n };\n\n private createGrip = (): ResizeGrip => {\n const grip = new ResizeGrip();\n grip.visual.transform.baseVal.appendItem(SvgHelper.createTransform());\n this.controlBox.appendChild(grip.visual);\n\n grip.visual.addEventListener('mousedown', this.gripMouseDown);\n grip.visual.addEventListener('mousemove', this.gripMouseMove);\n grip.visual.addEventListener('mouseup', this.gripMouseUp);\n\n grip.visual.addEventListener('touchstart', this.onTouch, { passive: false });\n grip.visual.addEventListener('touchend', this.onTouch, { passive: false });\n grip.visual.addEventListener('touchmove', this.onTouch, { passive: false });\n\n return grip;\n };\n\n private positionGrips = () => {\n const gripSize = this.controlGrips.topLeft.GRIP_SIZE;\n\n const left = -gripSize / 2;\n const top = left;\n const cx = (this.width + this.CB_DISTANCE) / 2 - gripSize / 2;\n const cy = (this.height + this.CB_DISTANCE) / 2 - gripSize / 2;\n const bottom = this.height + this.CB_DISTANCE - gripSize / 2;\n const right = this.width + this.CB_DISTANCE - gripSize / 2;\n\n this.positionGrip(this.controlGrips.topLeft.visual, left, top);\n this.positionGrip(this.controlGrips.topCenter.visual, cx, top);\n this.positionGrip(this.controlGrips.topRight.visual, right, top);\n this.positionGrip(this.controlGrips.centerLeft.visual, left, cy);\n this.positionGrip(this.controlGrips.centerRight.visual, right, cy);\n this.positionGrip(this.controlGrips.bottomLeft.visual, left, bottom);\n this.positionGrip(this.controlGrips.bottomCenter.visual, cx, bottom);\n this.positionGrip(this.controlGrips.bottomRight.visual, right, bottom);\n };\n\n private positionGrip = (grip: SVGGraphicsElement, x: number, y: number) => {\n const translate = grip.transform.baseVal.getItem(0);\n translate.setTranslate(x, y);\n grip.transform.baseVal.replaceItem(translate, 0);\n };\n\n private gripMouseDown = (ev: MouseEvent) => {\n this.isResizing = true;\n this.activeGrip = this.controlGrips.findGripByVisual(ev.target as SVGGraphicsElement) || null;\n this.previousMouseX = ev.screenX;\n this.previousMouseY = ev.screenY;\n ev.stopPropagation();\n };\n\n private gripMouseUp = (ev: MouseEvent) => {\n this.isResizing = false;\n this.activeGrip = null;\n ev.stopPropagation();\n };\n\n private gripMouseMove = (ev: MouseEvent) => {\n if (this.isResizing) {\n this.manipulate(ev);\n }\n };\n}\n","import { MarkerType } from '../types';\nimport { RectangularMarker } from '../RectangularMarker';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { PositionType } from '../../event/Event';\nimport { WhitePage } from '../../board/WhitePage';\n\nconst OkIcon = require('../../assets/check.svg');\nconst CancelIcon = require('../../assets/times.svg');\n\nexport class TextMarker extends RectangularMarker {\n type: MarkerType = 'text';\n\n public static createMarker = (page?: WhitePage): TextMarker => {\n const marker = new TextMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n /** 设置文本 */\n public setText(text: string) {\n this.text = text;\n this.renderText();\n }\n\n protected readonly MIN_SIZE = 50;\n\n private readonly DEFAULT_TEXT = 'Double-click to edit text';\n private text: string = this.DEFAULT_TEXT;\n private textElement: SVGTextElement;\n\n private inDoubleTap = false;\n\n private editor: HTMLDivElement;\n\n private editorTextArea: HTMLTextAreaElement;\n\n protected setup() {\n super.setup();\n this.textElement = SvgHelper.createText();\n this.addToRenderVisual(this.textElement);\n SvgHelper.setAttributes(this.visual, [['class', 'text-marker']]);\n\n this.textElement.transform.baseVal.appendItem(SvgHelper.createTransform()); // translate transorm\n this.textElement.transform.baseVal.appendItem(SvgHelper.createTransform()); // scale transorm\n\n this.renderText();\n\n this.visual.addEventListener('dblclick', this.onDblClick);\n this.visual.addEventListener('touchstart', this.onTap);\n }\n\n protected resize(x: number, y: number, onPosition?: (pos: PositionType) => void) {\n super.resize(x, y, onPosition);\n\n this.sizeText();\n }\n\n private renderText = () => {\n const LINE_SIZE = '1.2em';\n\n while (this.textElement.lastChild) {\n this.textElement.removeChild(this.textElement.lastChild);\n }\n\n const lines = this.text.split(/\\r\\n|[\\n\\v\\f\\r\\x85\\u2028\\u2029]/);\n for (let line of lines) {\n if (line.trim() === '') {\n line = ' '; // workaround for swallowed empty lines\n }\n this.textElement.appendChild(SvgHelper.createTSpan(line, [['x', '0'], ['dy', LINE_SIZE]]));\n }\n\n setTimeout(this.sizeText, 10);\n };\n\n private sizeText = () => {\n const textSize = this.textElement.getBBox();\n let x = 0;\n let y = 0;\n let scale = 1.0;\n if (textSize.width > 0 && textSize.height > 0) {\n const xScale = (this.width * 1.0) / textSize.width;\n const yScale = (this.height * 1.0) / textSize.height;\n scale = Math.min(xScale, yScale);\n\n x = (this.width - textSize.width * scale) / 2;\n y = (this.height - textSize.height * scale) / 2;\n }\n\n this.textElement.transform.baseVal.getItem(0).setTranslate(x, y);\n this.textElement.transform.baseVal.getItem(1).setScale(scale, scale);\n };\n\n private onDblClick = (ev: MouseEvent) => {\n this.showEditor();\n };\n\n private onTap = (ev: TouchEvent) => {\n if (this.inDoubleTap) {\n this.inDoubleTap = false;\n this.showEditor();\n } else {\n this.inDoubleTap = true;\n setTimeout(() => {\n this.inDoubleTap = false;\n }, 300);\n }\n };\n\n private showEditor = () => {\n this.editor = document.createElement('div');\n this.editor.className = 'fc-whiteboard-text-editor';\n\n this.editorTextArea = document.createElement('textarea');\n if (this.text !== this.DEFAULT_TEXT) {\n this.editorTextArea.value = this.text;\n }\n this.editorTextArea.addEventListener('keydown', this.onEditorKeyDown);\n this.editor.appendChild(this.editorTextArea);\n\n document.body.appendChild(this.editor);\n\n const buttons = document.createElement('div');\n buttons.className = 'fc-whiteboard-text-editor-button-bar';\n this.editor.appendChild(buttons);\n\n const okButton = document.createElement('div');\n okButton.className = 'fc-whiteboard-text-editor-button';\n okButton.innerHTML = OkIcon;\n okButton.addEventListener('click', this.onEditorOkClick);\n buttons.appendChild(okButton);\n\n const cancelButton = document.createElement('div');\n cancelButton.className = 'fc-whiteboard-text-editor-button';\n cancelButton.innerHTML = CancelIcon;\n cancelButton.addEventListener('click', this.closeEditor);\n buttons.appendChild(cancelButton);\n };\n\n /** 响应文本输入的事件 */\n private onEditorOkClick = (ev: MouseEvent | null) => {\n if (this.editorTextArea.value.trim()) {\n this.text = this.editorTextArea.value;\n } else {\n this.text = this.DEFAULT_TEXT;\n }\n\n // 触发文本修改时间\n this.onChange({ target: 'marker', id: this.id, event: 'changeText', data: this.text });\n\n this.renderText();\n this.closeEditor();\n };\n\n private closeEditor = () => {\n document.body.removeChild(this.editor);\n };\n\n private onEditorKeyDown = (ev: KeyboardEvent) => {\n if (ev.key === 'Enter' && ev.ctrlKey) {\n ev.preventDefault();\n this.onEditorOkClick(null);\n }\n };\n}\n","import { HighlightMarker } from './HighlightMarker/index';\nimport { TextMarker } from './TextMarker/index';\nimport { ArrowMarker } from './ArrowMarker/index';\nimport { BaseMarker } from './BaseMarker/index';\nimport { CoverMarker } from './CoverMarker';\nimport { LineMarker } from './LineMarker';\nimport { RectMarker } from './RectMarker';\n\nexport type MarkerType = 'base' | 'arrow' | 'cover' | 'line' | 'rect' | 'text' | 'highlight';\n\nexport function getMarkerByType(type: MarkerType): typeof BaseMarker {\n switch (type) {\n case 'arrow':\n return ArrowMarker;\n case 'base':\n return BaseMarker;\n case 'cover':\n return CoverMarker;\n case 'highlight':\n return HighlightMarker;\n case 'line':\n return LineMarker;\n case 'rect':\n return RectMarker;\n case 'text':\n return TextMarker;\n default:\n return BaseMarker;\n }\n}\n","export class SvgHelper {\n public static createRect = (\n width: number | string,\n height: number | string,\n attributes?: Array<[string, string]>\n ): SVGRectElement => {\n const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n\n rect.setAttribute('width', width.toString());\n rect.setAttribute('height', height.toString());\n if (attributes) {\n SvgHelper.setAttributes(rect, attributes);\n }\n\n return rect;\n };\n\n public static createLine = (\n x1: number | string,\n y1: number | string,\n x2: number | string,\n y2: number | string,\n attributes?: Array<[string, string]>\n ): SVGLineElement => {\n const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');\n\n line.setAttribute('x1', x1.toString());\n line.setAttribute('y1', y1.toString());\n line.setAttribute('x2', x2.toString());\n line.setAttribute('y2', y2.toString());\n if (attributes) {\n SvgHelper.setAttributes(line, attributes);\n }\n\n return line;\n };\n\n public static createPolygon = (\n points: string,\n attributes?: Array<[string, string]>\n ): SVGPolygonElement => {\n const polygon = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');\n\n polygon.setAttribute('points', points);\n if (attributes) {\n SvgHelper.setAttributes(polygon, attributes);\n }\n\n return polygon;\n };\n\n public static createCircle = (\n radius: number,\n attributes?: Array<[string, string]>\n ): SVGCircleElement => {\n const circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n\n circle.setAttribute('cx', (radius / 2).toString());\n circle.setAttribute('cy', (radius / 2).toString());\n circle.setAttribute('r', radius.toString());\n if (attributes) {\n SvgHelper.setAttributes(circle, attributes);\n }\n\n return circle;\n };\n\n public static createGroup = (attributes?: Array<[string, string]>): SVGGElement => {\n const g = document.createElementNS('http://www.w3.org/2000/svg', 'g');\n if (attributes) {\n SvgHelper.setAttributes(g, attributes);\n }\n return g;\n };\n\n public static setAttributes = (el: SVGElement, attributes: Array<[string, string]>) => {\n for (const [attr, value] of attributes) {\n el.setAttribute(attr, value);\n }\n };\n\n public static createTransform = (): SVGTransform => {\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n return svg.createSVGTransform();\n };\n\n public static createDefs = (): SVGDefsElement => {\n const defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');\n\n return defs;\n };\n\n public static createMarker = (\n id: string,\n orient: string,\n markerWidth: number | string,\n markerHeight: number | string,\n refX: number | string,\n refY: number | string,\n markerElement: SVGGraphicsElement\n ): SVGMarkerElement => {\n const marker = document.createElementNS('http://www.w3.org/2000/svg', 'marker');\n SvgHelper.setAttributes(marker, [\n ['id', id],\n ['orient', orient],\n ['markerWidth', markerWidth.toString()],\n ['markerHeight', markerHeight.toString()],\n ['refX', refX.toString()],\n ['refY', refY.toString()]\n ]);\n\n marker.appendChild(markerElement);\n\n return marker;\n };\n\n public static createText = (attributes?: Array<[string, string]>): SVGTextElement => {\n const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n text.setAttribute('x', '0');\n text.setAttribute('y', '0');\n\n if (attributes) {\n SvgHelper.setAttributes(text, attributes);\n }\n\n return text;\n };\n\n public static createTSpan = (\n text: string,\n attributes?: Array<[string, string]>\n ): SVGTSpanElement => {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.textContent = text;\n\n if (attributes) {\n SvgHelper.setAttributes(tspan, attributes);\n }\n\n return tspan;\n };\n}\n","import { isHTMLImageElement } from '../../utils/validator';\n\n/** 图片导出 */\nexport class Synthetizer {\n public rasterize(\n target: HTMLImageElement | HTMLDivElement,\n markerImage: SVGSVGElement,\n done: (dataUrl: string) => void\n ) {\n if (!isHTMLImageElement(target)) {\n throw new Error('Error: only support export HTMLImageElement');\n }\n\n const canvas = document.createElement('canvas');\n canvas.width = markerImage.width.baseVal.value;\n canvas.height = markerImage.height.baseVal.value;\n\n const data = markerImage.outerHTML;\n\n const ctx = canvas.getContext('2d');\n\n if (!ctx) {\n throw new Error('Invalid ctx');\n }\n\n ctx.drawImage(target as HTMLImageElement, 0, 0, canvas.width, canvas.height);\n\n const DOMURL = window.URL; // || window.webkitURL || window;\n\n const img = new Image(canvas.width, canvas.height);\n img.setAttribute('crossOrigin', 'anonymous');\n\n const blob = new Blob([data], { type: 'image/svg+xml' });\n\n const url = DOMURL.createObjectURL(blob);\n\n img.onload = () => {\n ctx.drawImage(img, 0, 0);\n DOMURL.revokeObjectURL(url);\n\n done(canvas.toDataURL('image/png'));\n };\n\n img.src = url;\n }\n}\n","import { ToolbarButton } from './ToolbarButton';\nimport { ToolbarItem } from './ToolbarItem';\nimport { uuid } from '../utils/uuid';\n\nexport class Toolbar {\n id: string = uuid();\n\n private toolbarItems: ToolbarItem[];\n private toolbarUI: HTMLElement;\n\n private clickHandler: (ev: MouseEvent, toolbarItem: ToolbarItem) => void;\n\n constructor(\n toolbarItems: ToolbarItem[],\n clickHandler: (ev: MouseEvent, toolbarItem: ToolbarItem) => void\n ) {\n this.toolbarItems = toolbarItems;\n this.clickHandler = clickHandler;\n }\n\n /** 获取 UI 元素 */\n public getUI = (): HTMLElement => {\n this.toolbarUI = document.createElement('div');\n this.toolbarUI.id = `fcw-toolbar-${this.id}`;\n this.toolbarUI.className = 'fc-whiteboard-toolbar';\n\n for (const toolbarItem of this.toolbarItems) {\n const toolbarButton = new ToolbarButton(toolbarItem, this.clickHandler);\n this.toolbarUI.appendChild(toolbarButton.getElement());\n }\n\n return this.toolbarUI;\n };\n\n public hide() {\n this.toolbarUI.style.visibility = 'hidden';\n this.toolbarUI.style.zIndex = '-1';\n }\n\n public show() {\n this.toolbarUI.style.visibility = 'visible';\n this.toolbarUI.style.zIndex = '999';\n }\n}\n","import { ToolbarItem } from './ToolbarItem';\n\nexport class ToolbarButton {\n private toolbarItem: ToolbarItem;\n private clickHandler: (ev: MouseEvent, toolbarItem: ToolbarItem) => void;\n\n constructor(\n toolbarItem: ToolbarItem,\n clickHandler?: (ev: MouseEvent, toolbarItem: ToolbarItem) => void\n ) {\n this.toolbarItem = toolbarItem;\n\n if (clickHandler) {\n this.clickHandler = clickHandler;\n }\n }\n\n public getElement = (): HTMLElement => {\n const div = document.createElement('div');\n if (this.toolbarItem.name !== 'separator') {\n div.className = 'fc-whiteboard-toolbar-button';\n if (this.clickHandler) {\n div.addEventListener('click', (ev: MouseEvent) => {\n if (this.clickHandler) {\n this.clickHandler(ev, this.toolbarItem);\n }\n });\n }\n\n if (this.toolbarItem.icon) {\n div.title = this.toolbarItem.tooltipText;\n div.innerHTML = this.toolbarItem.icon;\n } else {\n div.innerText = this.toolbarItem.tooltipText;\n }\n } else {\n div.className = 'fc-whiteboard-toolbar-separator';\n }\n\n return div;\n };\n}\n","import { BaseMarker } from './../markers/BaseMarker/index';\nexport class ToolbarItem {\n name: string;\n tooltipText: string;\n icon?: string;\n markerType?: typeof BaseMarker;\n\n constructor({\n name,\n tooltipText,\n icon,\n markerType\n }: {\n name: string;\n tooltipText: string;\n icon?: string;\n markerType?: typeof BaseMarker;\n }) {\n this.name = name;\n this.tooltipText = tooltipText;\n this.icon = icon;\n this.markerType = markerType;\n }\n}\n","import { WhitePage } from './../board/WhitePage/index';\nimport { RectMarker } from './../markers/RectMarker/index';\nimport { CoverMarker } from './../markers/CoverMarker/index';\nimport { TextMarker } from './../markers/TextMarker/index';\nimport { ArrowMarker } from './../markers/ArrowMarker/index';\nimport { HighlightMarker } from './../markers/HighlightMarker/index';\nimport { ToolbarItem } from './ToolbarItem';\nimport { LineMarker } from '../markers/LineMarker';\n\nconst OkIcon = require('../assets/check.svg');\nconst DeleteIcon = require('../assets/eraser.svg');\nconst PointerIcon = require('../assets/mouse-pointer.svg');\nconst CloseIcon = require('../assets/times.svg');\n\nexport const highlightMarkerToolbarItem = new ToolbarItem({\n name: 'cover-marker',\n tooltipText: 'Cover',\n icon: require('../assets/highlight.svg'),\n markerType: HighlightMarker\n});\n\nexport const arrowMarkerToolbarItem = new ToolbarItem({\n name: 'arrow-marker',\n tooltipText: 'Arrow',\n icon: require('../assets/arrow.svg'),\n markerType: ArrowMarker\n});\n\nexport const textMarkerToolbarItem = new ToolbarItem({\n name: 'text-marker',\n tooltipText: 'Text',\n icon: require('../assets/text.svg'),\n markerType: TextMarker\n});\n\nexport const coverMarkerToolbarItem = new ToolbarItem({\n name: 'cover-marker',\n tooltipText: 'Cover',\n icon: require('../assets/cover.svg'),\n markerType: CoverMarker\n});\n\nexport const rectMarkerToolbarItem = new ToolbarItem({\n name: 'rect-marker',\n tooltipText: 'Rectangle',\n icon: require('../assets/rect.svg'),\n markerType: RectMarker\n});\n\nexport const lineMarkerToolbarItem = new ToolbarItem({\n name: 'line-marker',\n tooltipText: 'Line',\n icon: require('../assets/line.svg'),\n markerType: LineMarker\n});\n\nexport function getToolbars(page?: WhitePage) {\n const toolbars = [\n {\n icon: PointerIcon,\n name: 'pointer',\n tooltipText: 'Pointer'\n },\n {\n icon: DeleteIcon,\n name: 'delete',\n tooltipText: 'Delete'\n },\n {\n name: 'separator',\n tooltipText: ''\n },\n rectMarkerToolbarItem,\n coverMarkerToolbarItem,\n highlightMarkerToolbarItem,\n lineMarkerToolbarItem,\n arrowMarkerToolbarItem,\n textMarkerToolbarItem,\n {\n name: 'separator',\n tooltipText: ''\n }\n ];\n\n if (!page) {\n toolbars.push(\n ...[\n {\n icon: OkIcon,\n name: 'ok',\n tooltipText: 'OK'\n }\n ]\n );\n }\n\n toolbars.push({\n icon: CloseIcon,\n name: 'close',\n tooltipText: 'Close'\n });\n\n return toolbars;\n}\n","/** 创建包含样式类名的 Div 元素 */\nexport function createDivWithClassName(className?: string, parent?: HTMLElement) {\n const ele = document.createElement('div');\n\n if (parent) {\n parent.appendChild(ele);\n }\n\n if (className) {\n addClassName(ele, className);\n }\n\n return ele;\n}\n\n/** 添加样式类名 */\nexport function addClassName(ele: HTMLElement, className: string) {\n if (!ele) {\n return;\n }\n\n ele.className = `${ele.className || ''} ${className}`.trim();\n}\n","import * as uuidV1 from 'uuid/v1';\n\nexport const uuid = uuidV1;\n","/** 判断是否为有效的 HTMLImageElement */\nexport function isHTMLImageElement(ele: any) {\n if (typeof ele === 'object' && ele instanceof HTMLImageElement) {\n return true;\n }\n\n return false;\n}\n"],"sourceRoot":""}