{"version":3,"sources":["webpack:///./node_modules/core-js/internals/array-buffer-view-core.js","webpack:///./node_modules/core-js/internals/define-well-known-symbol.js","webpack:///./node_modules/core-js/internals/object-get-prototype-of.js","webpack:///./node_modules/core-js/internals/create-html.js","webpack:///./node_modules/core-js/internals/string-html-forced.js","webpack:///./node_modules/core-js/modules/es.array.iterator.js","webpack:///./node_modules/core-js/internals/object-set-prototype-of.js","webpack:///./node_modules/core-js/modules/es.string.iterator.js","webpack:///./node_modules/core-js/modules/web.dom-collections.iterator.js","webpack:///./node_modules/core-js/modules/es.number.constructor.js","webpack:///./node_modules/core-js/internals/string-trim.js","webpack:///./node_modules/core-js/modules/es.symbol.js","webpack:///./node_modules/core-js/modules/es.symbol.description.js","webpack:///./node_modules/core-js/modules/es.symbol.to-primitive.js","webpack:///./node_modules/core-js/modules/es.date.to-primitive.js","webpack:///./node_modules/core-js/internals/typed-array-constructor.js","webpack:///./node_modules/core-js/internals/whitespaces.js","webpack:///./node_modules/core-js/internals/inherit-if-required.js","webpack:///./node_modules/core-js/internals/define-iterator.js","webpack:///./node_modules/core-js/internals/well-known-symbol-wrapped.js","webpack:///./node_modules/core-js/internals/iterators-core.js","webpack:///./node_modules/core-js/internals/correct-prototype-getter.js","webpack:///./node_modules/core-js/internals/create-iterator-constructor.js","webpack:///./node_modules/core-js/internals/internal-metadata.js","webpack:///./node_modules/core-js/internals/a-possible-prototype.js","webpack:///./node_modules/core-js/modules/es.object.get-prototype-of.js","webpack:///./node_modules/core-js/internals/array-from.js","webpack:///./node_modules/core-js/modules/es.array.from.js","webpack:///./node_modules/core-js/internals/object-get-own-property-names-external.js","webpack:///./node_modules/core-js/modules/es.string.search.js","webpack:///./node_modules/core-js/internals/dom-iterables.js","webpack:///./node_modules/core-js/modules/web.dom-collections.for-each.js","webpack:///./node_modules/core-js/internals/freezing.js","webpack:///./node_modules/core-js/internals/string-repeat.js","webpack:///./node_modules/core-js/internals/date-to-primitive.js","webpack:///./node_modules/core-js/modules/web.url.js","webpack:///./node_modules/core-js/internals/object-prototype-accessors-forced.js","webpack:///./node_modules/core-js/internals/array-reduce.js","webpack:///./node_modules/core-js/internals/math-expm1.js","webpack:///./node_modules/core-js/internals/collection.js","webpack:///./node_modules/core-js/internals/array-buffer.js","webpack:///./node_modules/core-js/internals/not-a-regexp.js","webpack:///./node_modules/core-js/internals/correct-is-regexp-logic.js","webpack:///./node_modules/core-js/internals/string-trim-forced.js","webpack:///./node_modules/core-js/internals/array-for-each.js","webpack:///./node_modules/core-js/internals/this-number-value.js","webpack:///./node_modules/core-js/modules/es.string.small.js","webpack:///./node_modules/core-js/modules/es.number.to-fixed.js","webpack:///./node_modules/core-js/modules/es.array.slice.js","webpack:///./node_modules/core-js/internals/native-url.js","webpack:///./node_modules/core-js/modules/es.array.includes.js","webpack:///./node_modules/core-js/modules/es.string.includes.js","webpack:///./node_modules/core-js/internals/string-pad.js","webpack:///./node_modules/core-js/internals/math-sign.js","webpack:///./node_modules/core-js/internals/array-buffer-native.js","webpack:///./node_modules/core-js/internals/typed-array-constructors-require-wrappers.js","webpack:///./node_modules/core-js/internals/same-value.js","webpack:///./node_modules/core-js/modules/web.url-search-params.js","webpack:///./node_modules/core-js/modules/es.string.trim.js","webpack:///./node_modules/core-js/modules/es.string.link.js","webpack:///./node_modules/core-js/internals/object-to-array.js","webpack:///./node_modules/core-js/internals/function-bind.js","webpack:///./node_modules/core-js/internals/array-copy-within.js","webpack:///./node_modules/core-js/internals/flatten-into-array.js","webpack:///./node_modules/core-js/internals/array-last-index-of.js","webpack:///./node_modules/core-js/internals/string-pad-webkit-bug.js","webpack:///./node_modules/core-js/internals/number-parse-int.js","webpack:///./node_modules/core-js/internals/number-parse-float.js","webpack:///./node_modules/core-js/internals/is-integer.js","webpack:///./node_modules/core-js/internals/math-log1p.js","webpack:///./node_modules/core-js/internals/collection-strong.js","webpack:///./node_modules/core-js/internals/collection-weak.js","webpack:///./node_modules/core-js/internals/to-index.js","webpack:///./node_modules/core-js/internals/to-offset.js","webpack:///./node_modules/core-js/internals/typed-array-from.js","webpack:///./node_modules/core-js/internals/string-punycode-to-ascii.js","webpack:///./node_modules/core-js/internals/get-iterator.js","webpack:///./node_modules/core-js/modules/web.url.to-json.js","webpack:///./node_modules/core-js/modules/es.object.entries.js","webpack:///./node_modules/core-js/modules/es.string.match.js","webpack:///./node_modules/core-js/modules/es.object.keys.js","webpack:///./node_modules/core-js/modules/es.array.sort.js","webpack:///./node_modules/core-js/stable/index.js","webpack:///./node_modules/core-js/es/index.js","webpack:///./node_modules/core-js/modules/es.symbol.async-iterator.js","webpack:///./node_modules/core-js/modules/es.symbol.has-instance.js","webpack:///./node_modules/core-js/modules/es.symbol.is-concat-spreadable.js","webpack:///./node_modules/core-js/modules/es.symbol.iterator.js","webpack:///./node_modules/core-js/modules/es.symbol.match.js","webpack:///./node_modules/core-js/modules/es.symbol.match-all.js","webpack:///./node_modules/core-js/modules/es.symbol.replace.js","webpack:///./node_modules/core-js/modules/es.symbol.search.js","webpack:///./node_modules/core-js/modules/es.symbol.species.js","webpack:///./node_modules/core-js/modules/es.symbol.split.js","webpack:///./node_modules/core-js/modules/es.symbol.to-string-tag.js","webpack:///./node_modules/core-js/modules/es.symbol.unscopables.js","webpack:///./node_modules/core-js/modules/es.object.create.js","webpack:///./node_modules/core-js/modules/es.object.define-property.js","webpack:///./node_modules/core-js/modules/es.object.define-properties.js","webpack:///./node_modules/core-js/modules/es.object.freeze.js","webpack:///./node_modules/core-js/modules/es.object.from-entries.js","webpack:///./node_modules/core-js/modules/es.object.get-own-property-descriptor.js","webpack:///./node_modules/core-js/modules/es.object.get-own-property-descriptors.js","webpack:///./node_modules/core-js/modules/es.object.get-own-property-names.js","webpack:///./node_modules/core-js/modules/es.object.is.js","webpack:///./node_modules/core-js/modules/es.object.is-extensible.js","webpack:///./node_modules/core-js/modules/es.object.is-frozen.js","webpack:///./node_modules/core-js/modules/es.object.is-sealed.js","webpack:///./node_modules/core-js/modules/es.object.prevent-extensions.js","webpack:///./node_modules/core-js/modules/es.object.seal.js","webpack:///./node_modules/core-js/modules/es.object.set-prototype-of.js","webpack:///./node_modules/core-js/modules/es.object.values.js","webpack:///./node_modules/core-js/modules/es.object.define-getter.js","webpack:///./node_modules/core-js/modules/es.object.define-setter.js","webpack:///./node_modules/core-js/modules/es.object.lookup-getter.js","webpack:///./node_modules/core-js/modules/es.object.lookup-setter.js","webpack:///./node_modules/core-js/modules/es.function.bind.js","webpack:///./node_modules/core-js/modules/es.function.has-instance.js","webpack:///./node_modules/core-js/modules/es.global-this.js","webpack:///./node_modules/core-js/modules/es.array.is-array.js","webpack:///./node_modules/core-js/modules/es.array.of.js","webpack:///./node_modules/core-js/modules/es.array.copy-within.js","webpack:///./node_modules/core-js/modules/es.array.every.js","webpack:///./node_modules/core-js/modules/es.array.find-index.js","webpack:///./node_modules/core-js/modules/es.array.flat.js","webpack:///./node_modules/core-js/modules/es.array.flat-map.js","webpack:///./node_modules/core-js/modules/es.array.for-each.js","webpack:///./node_modules/core-js/modules/es.array.index-of.js","webpack:///./node_modules/core-js/modules/es.array.last-index-of.js","webpack:///./node_modules/core-js/modules/es.array.reduce.js","webpack:///./node_modules/core-js/modules/es.array.reduce-right.js","webpack:///./node_modules/core-js/modules/es.array.reverse.js","webpack:///./node_modules/core-js/modules/es.array.some.js","webpack:///./node_modules/core-js/modules/es.array.splice.js","webpack:///./node_modules/core-js/modules/es.array.species.js","webpack:///./node_modules/core-js/modules/es.array.unscopables.flat.js","webpack:///./node_modules/core-js/modules/es.array.unscopables.flat-map.js","webpack:///./node_modules/core-js/modules/es.string.from-code-point.js","webpack:///./node_modules/core-js/modules/es.string.raw.js","webpack:///./node_modules/core-js/modules/es.string.code-point-at.js","webpack:///./node_modules/core-js/modules/es.string.ends-with.js","webpack:///./node_modules/core-js/modules/es.string.match-all.js","webpack:///./node_modules/core-js/modules/es.string.pad-end.js","webpack:///./node_modules/core-js/modules/es.string.pad-start.js","webpack:///./node_modules/core-js/modules/es.string.repeat.js","webpack:///./node_modules/core-js/modules/es.string.starts-with.js","webpack:///./node_modules/core-js/modules/es.string.trim-start.js","webpack:///./node_modules/core-js/modules/es.string.trim-end.js","webpack:///./node_modules/core-js/modules/es.string.anchor.js","webpack:///./node_modules/core-js/modules/es.string.big.js","webpack:///./node_modules/core-js/modules/es.string.blink.js","webpack:///./node_modules/core-js/modules/es.string.bold.js","webpack:///./node_modules/core-js/modules/es.string.fixed.js","webpack:///./node_modules/core-js/modules/es.string.fontcolor.js","webpack:///./node_modules/core-js/modules/es.string.fontsize.js","webpack:///./node_modules/core-js/modules/es.string.italics.js","webpack:///./node_modules/core-js/modules/es.string.strike.js","webpack:///./node_modules/core-js/modules/es.string.sub.js","webpack:///./node_modules/core-js/modules/es.string.sup.js","webpack:///./node_modules/core-js/modules/es.regexp.constructor.js","webpack:///./node_modules/core-js/modules/es.regexp.flags.js","webpack:///./node_modules/core-js/modules/es.regexp.sticky.js","webpack:///./node_modules/core-js/modules/es.regexp.test.js","webpack:///./node_modules/core-js/modules/es.parse-int.js","webpack:///./node_modules/core-js/modules/es.parse-float.js","webpack:///./node_modules/core-js/modules/es.number.epsilon.js","webpack:///./node_modules/core-js/modules/es.number.is-finite.js","webpack:///./node_modules/core-js/internals/number-is-finite.js","webpack:///./node_modules/core-js/modules/es.number.is-integer.js","webpack:///./node_modules/core-js/modules/es.number.is-nan.js","webpack:///./node_modules/core-js/modules/es.number.is-safe-integer.js","webpack:///./node_modules/core-js/modules/es.number.max-safe-integer.js","webpack:///./node_modules/core-js/modules/es.number.min-safe-integer.js","webpack:///./node_modules/core-js/modules/es.number.parse-float.js","webpack:///./node_modules/core-js/modules/es.number.parse-int.js","webpack:///./node_modules/core-js/modules/es.number.to-precision.js","webpack:///./node_modules/core-js/modules/es.math.acosh.js","webpack:///./node_modules/core-js/modules/es.math.asinh.js","webpack:///./node_modules/core-js/modules/es.math.atanh.js","webpack:///./node_modules/core-js/modules/es.math.cbrt.js","webpack:///./node_modules/core-js/modules/es.math.clz32.js","webpack:///./node_modules/core-js/modules/es.math.cosh.js","webpack:///./node_modules/core-js/modules/es.math.expm1.js","webpack:///./node_modules/core-js/modules/es.math.fround.js","webpack:///./node_modules/core-js/internals/math-fround.js","webpack:///./node_modules/core-js/modules/es.math.hypot.js","webpack:///./node_modules/core-js/modules/es.math.imul.js","webpack:///./node_modules/core-js/modules/es.math.log10.js","webpack:///./node_modules/core-js/modules/es.math.log1p.js","webpack:///./node_modules/core-js/modules/es.math.log2.js","webpack:///./node_modules/core-js/modules/es.math.sign.js","webpack:///./node_modules/core-js/modules/es.math.sinh.js","webpack:///./node_modules/core-js/modules/es.math.tanh.js","webpack:///./node_modules/core-js/modules/es.math.to-string-tag.js","webpack:///./node_modules/core-js/modules/es.math.trunc.js","webpack:///./node_modules/core-js/modules/es.date.now.js","webpack:///./node_modules/core-js/modules/es.date.to-json.js","webpack:///./node_modules/core-js/modules/es.date.to-iso-string.js","webpack:///./node_modules/core-js/internals/date-to-iso-string.js","webpack:///./node_modules/core-js/modules/es.date.to-string.js","webpack:///./node_modules/core-js/modules/es.json.stringify.js","webpack:///./node_modules/core-js/modules/es.json.to-string-tag.js","webpack:///./node_modules/core-js/modules/es.promise.all-settled.js","webpack:///./node_modules/core-js/modules/es.promise.finally.js","webpack:///./node_modules/core-js/modules/es.map.js","webpack:///./node_modules/core-js/modules/es.set.js","webpack:///./node_modules/core-js/modules/es.weak-map.js","webpack:///./node_modules/core-js/modules/es.weak-set.js","webpack:///./node_modules/core-js/modules/es.array-buffer.constructor.js","webpack:///./node_modules/core-js/internals/ieee754.js","webpack:///./node_modules/core-js/modules/es.array-buffer.is-view.js","webpack:///./node_modules/core-js/modules/es.array-buffer.slice.js","webpack:///./node_modules/core-js/modules/es.data-view.js","webpack:///./node_modules/core-js/modules/es.typed-array.int8-array.js","webpack:///./node_modules/core-js/internals/to-positive-integer.js","webpack:///./node_modules/core-js/modules/es.typed-array.uint8-array.js","webpack:///./node_modules/core-js/modules/es.typed-array.uint8-clamped-array.js","webpack:///./node_modules/core-js/modules/es.typed-array.int16-array.js","webpack:///./node_modules/core-js/modules/es.typed-array.uint16-array.js","webpack:///./node_modules/core-js/modules/es.typed-array.int32-array.js","webpack:///./node_modules/core-js/modules/es.typed-array.uint32-array.js","webpack:///./node_modules/core-js/modules/es.typed-array.float32-array.js","webpack:///./node_modules/core-js/modules/es.typed-array.float64-array.js","webpack:///./node_modules/core-js/modules/es.typed-array.from.js","webpack:///./node_modules/core-js/modules/es.typed-array.of.js","webpack:///./node_modules/core-js/modules/es.typed-array.copy-within.js","webpack:///./node_modules/core-js/modules/es.typed-array.every.js","webpack:///./node_modules/core-js/modules/es.typed-array.fill.js","webpack:///./node_modules/core-js/modules/es.typed-array.filter.js","webpack:///./node_modules/core-js/modules/es.typed-array.find.js","webpack:///./node_modules/core-js/modules/es.typed-array.find-index.js","webpack:///./node_modules/core-js/modules/es.typed-array.for-each.js","webpack:///./node_modules/core-js/modules/es.typed-array.includes.js","webpack:///./node_modules/core-js/modules/es.typed-array.index-of.js","webpack:///./node_modules/core-js/modules/es.typed-array.iterator.js","webpack:///./node_modules/core-js/modules/es.typed-array.join.js","webpack:///./node_modules/core-js/modules/es.typed-array.last-index-of.js","webpack:///./node_modules/core-js/modules/es.typed-array.map.js","webpack:///./node_modules/core-js/modules/es.typed-array.reduce.js","webpack:///./node_modules/core-js/modules/es.typed-array.reduce-right.js","webpack:///./node_modules/core-js/modules/es.typed-array.reverse.js","webpack:///./node_modules/core-js/modules/es.typed-array.set.js","webpack:///./node_modules/core-js/modules/es.typed-array.slice.js","webpack:///./node_modules/core-js/modules/es.typed-array.some.js","webpack:///./node_modules/core-js/modules/es.typed-array.sort.js","webpack:///./node_modules/core-js/modules/es.typed-array.subarray.js","webpack:///./node_modules/core-js/modules/es.typed-array.to-locale-string.js","webpack:///./node_modules/core-js/modules/es.typed-array.to-string.js","webpack:///./node_modules/core-js/modules/es.reflect.apply.js","webpack:///./node_modules/core-js/modules/es.reflect.construct.js","webpack:///./node_modules/core-js/modules/es.reflect.define-property.js","webpack:///./node_modules/core-js/modules/es.reflect.delete-property.js","webpack:///./node_modules/core-js/modules/es.reflect.get.js","webpack:///./node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js","webpack:///./node_modules/core-js/modules/es.reflect.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es.reflect.has.js","webpack:///./node_modules/core-js/modules/es.reflect.is-extensible.js","webpack:///./node_modules/core-js/modules/es.reflect.own-keys.js","webpack:///./node_modules/core-js/modules/es.reflect.prevent-extensions.js","webpack:///./node_modules/core-js/modules/es.reflect.set.js","webpack:///./node_modules/core-js/modules/es.reflect.set-prototype-of.js","webpack:///./node_modules/core-js/web/index.js","webpack:///./node_modules/core-js/modules/web.immediate.js","webpack:///./node_modules/core-js/modules/web.queue-microtask.js","webpack:///./node_modules/core-js/modules/web.timers.js","webpack:///./node_modules/react-range/lib/types.js","webpack:///./node_modules/fontfaceobserver/fontfaceobserver.standalone.js","webpack:///./node_modules/fabric/dist/fabric.js","webpack:///./node_modules/react-range/lib/utils.js","webpack:///./node_modules/mousetrap/mousetrap.js","webpack:///./node_modules/@simonwep/pickr/dist/pickr.min.js","webpack:///./node_modules/invariant/browser.js","webpack:///./node_modules/react-range/lib/index.js","webpack:///./node_modules/react-range/lib/Range.js","webpack:///./node_modules/use-resize-observer/polyfilled.js","webpack:///./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack:///./node_modules/@babel/runtime/helpers/esm/objectSpread.js","webpack:///./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack:///./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack:///./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack:///./node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js"],"names":["NAME","NATIVE_ARRAY_BUFFER","DESCRIPTORS","global","isObject","has","classof","createNonEnumerableProperty","redefine","defineProperty","f","getPrototypeOf","setPrototypeOf","wellKnownSymbol","uid","Int8Array","Int8ArrayPrototype","prototype","Uint8ClampedArray","Uint8ClampedArrayPrototype","TypedArray","TypedArrayPrototype","ObjectPrototype","Object","isPrototypeOf","TO_STRING_TAG","TYPED_ARRAY_TAG","NATIVE_ARRAY_BUFFER_VIEWS","opera","TYPED_ARRAY_TAG_REQIRED","TypedArrayConstructorsList","Uint8Array","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","isTypedArray","it","Function","TypeError","get","this","undefined","module","exports","aTypedArray","aTypedArrayConstructor","C","call","ARRAY","TypedArrayConstructor","exportTypedArrayMethod","KEY","property","forced","exportTypedArrayStaticMethod","error","isView","klass","path","wrappedWellKnownSymbolModule","Symbol","value","toObject","sharedKey","CORRECT_PROTOTYPE_GETTER","IE_PROTO","O","constructor","requireObjectCoercible","quot","string","tag","attribute","S","String","p1","replace","fails","METHOD_NAME","test","toLowerCase","split","length","toIndexedObject","addToUnscopables","Iterators","InternalStateModule","defineIterator","ARRAY_ITERATOR","setInternalState","set","getInternalState","getterFor","Array","iterated","kind","type","target","index","state","done","Arguments","anObject","aPossiblePrototype","setter","CORRECT_SETTER","getOwnPropertyDescriptor","proto","__proto__","charAt","STRING_ITERATOR","point","DOMIterables","ArrayIteratorMethods","ITERATOR","ArrayValues","values","COLLECTION_NAME","Collection","CollectionPrototype","isForced","inheritIfRequired","toPrimitive","create","getOwnPropertyNames","trim","NUMBER","NativeNumber","NumberPrototype","BROKEN_CLASSOF","toNumber","argument","first","third","radix","maxCode","digits","code","charCodeAt","NaN","slice","parseInt","key","NumberWrapper","arguments","dummy","valueOf","keys","j","whitespace","ltrim","RegExp","rtrim","createMethod","TYPE","$this","start","end","$","getBuiltIn","IS_PURE","NATIVE_SYMBOL","USE_SYMBOL_AS_UID","isArray","createPropertyDescriptor","nativeObjectCreate","objectKeys","getOwnPropertyNamesModule","getOwnPropertyNamesExternal","getOwnPropertySymbolsModule","getOwnPropertyDescriptorModule","definePropertyModule","propertyIsEnumerableModule","shared","hiddenKeys","defineWellKnownSymbol","setToStringTag","$forEach","forEach","HIDDEN","SYMBOL","TO_PRIMITIVE","$Symbol","$stringify","nativeGetOwnPropertyDescriptor","nativeDefineProperty","nativeGetOwnPropertyNames","nativePropertyIsEnumerable","AllSymbols","ObjectPrototypeSymbols","StringToSymbolRegistry","SymbolToStringRegistry","WellKnownSymbolsStore","QObject","USE_SETTER","findChild","setSymbolDescriptor","a","P","Attributes","ObjectPrototypeDescriptor","wrap","description","symbol","isSymbol","$defineProperty","enumerable","$defineProperties","Properties","properties","concat","$getOwnPropertySymbols","$propertyIsEnumerable","V","$getOwnPropertyDescriptor","descriptor","$getOwnPropertyNames","names","result","push","IS_OBJECT_PROTOTYPE","configurable","name","unsafe","sham","stat","keyFor","sym","useSetter","useSimple","defineProperties","getOwnPropertySymbols","stringify","replacer","space","$replacer","args","apply","copyConstructorProperties","NativeSymbol","EmptyStringDescriptionStore","SymbolWrapper","symbolPrototype","symbolToString","toString","native","regexp","desc","dateToPrimitive","DatePrototype","Date","TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS","ArrayBufferViewCore","ArrayBufferModule","anInstance","toLength","toIndex","toOffset","typedArrayFrom","setSpecies","round","Math","RangeError","ArrayBuffer","DataView","BYTES_PER_ELEMENT","WRONG_LENGTH","fromList","list","addGetter","isArrayBuffer","isTypedArrayIndex","wrappedGetOwnPropertyDescriptor","wrappedDefineProperty","writable","wrapper","CLAMPED","BYTES","match","CONSTRUCTOR_NAME","GETTER","SETTER","NativeTypedArrayConstructor","TypedArrayConstructorPrototype","exported","addElement","that","data","view","byteOffset","getter","typedArrayOffset","$length","offset","buffer","byteLength","$len","Wrapper","NewTarget","NewTargetPrototype","createIteratorConstructor","IteratorsCore","IteratorPrototype","BUGGY_SAFARI_ITERATORS","KEYS","VALUES","ENTRIES","returnThis","Iterable","IteratorConstructor","next","DEFAULT","IS_SET","FORCED","CurrentIteratorPrototype","methods","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","entries","PrototypeOfArrayIteratorPrototype","arrayIterator","F","FREEZING","METADATA","id","isExtensible","setMetadata","objectID","weakData","meta","REQUIRED","fastKey","getWeakData","onFreeze","nativeGetPrototypeOf","bind","callWithSafeIterationClosing","isArrayIteratorMethod","createProperty","getIteratorMethod","arrayLike","step","iterator","argumentsLength","mapfn","mapping","iteratorMethod","from","checkCorrectnessOfIteration","iterable","windowNames","window","getWindowNames","fixRegExpWellKnownSymbolLogic","sameValue","regExpExec","SEARCH","nativeSearch","maybeCallNative","searcher","res","rx","previousLastIndex","lastIndex","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","preventExtensions","toInteger","repeat","count","str","n","Infinity","hint","EOF","USE_NATIVE_URL","assign","arrayFrom","codeAt","toASCII","URLSearchParamsModule","NativeURL","URL","URLSearchParams","getInternalSearchParamsState","getState","getInternalURLState","floor","pow","INVALID_SCHEME","INVALID_HOST","INVALID_PORT","ALPHA","ALPHANUMERIC","DIGIT","HEX_START","OCT","DEC","HEX","FORBIDDEN_HOST_CODE_POINT","FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT","LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE","TAB_AND_NEW_LINE","parseHost","url","input","codePoints","parseIPv6","host","isSpecial","parseIPv4","percentEncode","C0ControlPercentEncodeSet","partsLength","numbers","part","number","ipv4","parts","pop","numbersSeen","ipv4Piece","swaps","swap","address","pieceIndex","compress","pointer","char","serializeHost","ignore0","unshift","join","ipv6","maxIndex","maxLength","currStart","currLength","findLongestZeroSequence","fragmentPercentEncodeSet","pathPercentEncodeSet","userinfoPercentEncodeSet","encodeURIComponent","specialSchemes","ftp","file","http","https","ws","wss","scheme","includesCredentials","username","password","cannotHaveUsernamePasswordPort","cannotBeABaseURL","isWindowsDriveLetter","normalized","second","startsWithWindowsDriveLetter","shortenURLsPath","pathSize","isSingleDot","segment","SCHEME_START","SCHEME","NO_SCHEME","SPECIAL_RELATIVE_OR_AUTHORITY","PATH_OR_AUTHORITY","RELATIVE","RELATIVE_SLASH","SPECIAL_AUTHORITY_SLASHES","SPECIAL_AUTHORITY_IGNORE_SLASHES","AUTHORITY","HOST","HOSTNAME","PORT","FILE","FILE_SLASH","FILE_HOST","PATH_START","PATH","CANNOT_BE_A_BASE_URL_PATH","QUERY","FRAGMENT","parseURL","stateOverride","base","bufferCodePoints","failure","seenAt","seenBracket","seenPasswordToken","port","query","fragment","i","codePoint","encodedCodePoints","shift","URLConstructor","baseState","urlString","searchParams","searchParamsState","updateSearchParams","updateURL","href","serializeURL","origin","getOrigin","protocol","getProtocol","getUsername","getPassword","getHost","hostname","getHostname","getPort","pathname","getPathname","search","getSearch","getSearchParams","hash","getHash","URLPrototype","output","accessorDescriptor","nativeCreateObjectURL","createObjectURL","nativeRevokeObjectURL","revokeObjectURL","blob","random","__defineSetter__","aFunction","IndexedObject","IS_RIGHT","callbackfn","memo","self","left","right","nativeExpm1","expm1","exp","x","InternalMetadataModule","iterate","common","IS_MAP","indexOf","IS_WEAK","ADDER","NativeConstructor","NativePrototype","Constructor","fixMethod","nativeMethod","getConstructor","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","clear","setStrong","redefineAll","IEEE754","arrayFill","ARRAY_BUFFER","DATA_VIEW","WRONG_INDEX","NativeArrayBuffer","$ArrayBuffer","$DataView","$DataViewPrototype","packIEEE754","pack","unpackIEEE754","unpack","packInt8","packInt16","packInt32","unpackInt32","packFloat32","packFloat64","isLittleEndian","intIndex","store","bytes","reverse","conversion","ArrayBufferPrototype","testView","nativeSetInt8","setInt8","getInt8","setUint8","bufferLength","getUint8","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","isRegExp","MATCH","e","whitespaces","arrayMethodIsStrict","arrayMethodUsesToLength","STRICT_METHOD","USES_TO_LENGTH","createHTML","forcedStringHTMLMethod","small","thisNumberValue","nativeToFixed","toFixed","acc","fractionDigits","z","k","fractDigits","sign","multiply","c","c2","divide","dataToString","s","t","x2","log","toAbsoluteIndex","arrayMethodHasSpeciesSupport","HAS_SPECIES_SUPPORT","ACCESSORS","SPECIES","nativeSlice","max","fin","toJSON","sort","$includes","includes","el","notARegExp","correctIsRegExpLogic","searchString","ceil","IS_END","fillString","fillLen","stringFiller","stringLength","fillStr","intMaxLength","is","y","hasOwn","getIterator","$fetch","Headers","URL_SEARCH_PARAMS","URL_SEARCH_PARAMS_ITERATOR","getInternalParamsState","getInternalIteratorState","plus","sequences","percentSequence","percentDecode","sequence","decodeURIComponent","deserialize","find","serialize","parseSearchParams","entry","attributes","validateArgumentsLength","passed","required","URLSearchParamsIterator","params","URLSearchParamsConstructor","entryIterator","entryNext","init","URLSearchParamsPrototype","append","splice","getAll","found","val","entriesIndex","sliceIndex","callback","boundFunction","fetch","body","headers","$trim","forcedStringTrimMethod","link","propertyIsEnumerable","TO_ENTRIES","factories","construct","argsLength","fn","partArgs","min","copyWithin","len","to","inc","flattenIntoArray","original","source","sourceLen","depth","mapper","thisArg","element","targetIndex","sourceIndex","mapFn","nativeLastIndexOf","lastIndexOf","NEGATIVE_ZERO","searchElement","userAgent","$parseInt","hex","$parseFloat","parseFloat","trimmedString","isFinite","log1p","internalStateGetterFor","last","size","define","previous","getEntry","removed","prev","add","ITERATOR_NAME","getInternalCollectionState","ArrayIterationModule","$has","findIndex","uncaughtFrozenStore","frozen","UncaughtFrozenStore","findUncaughtFrozen","toPositiveInteger","maxInt","regexNonASCII","regexSeparators","OVERFLOW_ERROR","stringFromCharCode","fromCharCode","digitToBasic","digit","adapt","delta","numPoints","firstTime","baseMinusTMin","encode","currentValue","inputLength","counter","extra","ucs2decode","bias","basicLength","handledCPCount","m","handledCPCountPlusOne","q","qMinusT","baseMinusT","label","encoded","labels","$entries","advanceStringIndex","nativeMatch","matcher","fullUnicode","unicode","A","matchStr","nativeKeys","nativeSort","FAILS_ON_UNDEFINED","FAILS_ON_NULL","comparefn","nativeFreeze","freeze","fromEntries","obj","v","FAILS_ON_PRIMITIVES","ownKeys","getOwnPropertyDescriptors","object","nativeIsExtensible","nativeIsFrozen","isFrozen","nativeIsSealed","isSealed","nativePreventExtensions","nativeSeal","seal","$values","__defineGetter__","__lookupGetter__","__lookupSetter__","HAS_INSTANCE","FunctionPrototype","globalThis","of","$every","every","$findIndex","FIND_INDEX","SKIPS_HOLES","arraySpeciesCreate","flat","depthArg","flatMap","$indexOf","nativeIndexOf","$reduce","reduce","$reduceRight","reduceRight","nativeReverse","$some","some","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","deleteCount","insertCount","actualDeleteCount","actualStart","nativeFromCodePoint","fromCodePoint","elements","raw","template","rawTemplate","literalSegments","codePointAt","pos","nativeEndsWith","endsWith","CORRECT_IS_REGEXP_LOGIC","endPosition","getRegExpFlags","speciesConstructor","MATCH_ALL","REGEXP_STRING","REGEXP_STRING_ITERATOR","RegExpPrototype","regExpBuiltinExec","exec","nativeMatchAll","matchAll","WORKS_WITH_NON_GLOBAL_REGEX","$RegExpStringIterator","R","$matchAll","flagsValue","flags","$padEnd","padEnd","$padStart","padStart","nativeStartsWith","startsWith","$trimStart","trimStart","trimLeft","$trimEnd","trimEnd","trimRight","anchor","big","blink","bold","fixed","fontcolor","color","fontsize","italics","strike","sub","sup","getFlags","stickyHelpers","NativeRegExp","re1","re2","CORRECT_NEW","UNSUPPORTED_Y","RegExpWrapper","pattern","sticky","thisIsRegExp","patternIsRegExp","flagsAreUndefined","proxy","objectDefinePropertyModule","regExpFlags","execCalled","re","DELEGATES_TO_EXEC","nativeTest","Error","parseIntImplementation","parseFloatImplementation","EPSILON","globalIsFinite","Number","isInteger","isNaN","abs","isSafeInteger","MIN_SAFE_INTEGER","nativeToPrecision","toPrecision","precision","nativeAcosh","acosh","sqrt","LN2","MAX_VALUE","nativeAsinh","asinh","nativeAtanh","atanh","cbrt","LOG2E","clz32","nativeCosh","cosh","E","fround","EPSILON32","MAX32","MIN32","$abs","$sign","$hypot","hypot","value1","value2","arg","div","sum","aLen","larg","nativeImul","imul","UINT16","xn","yn","xl","yl","LOG10E","log10","log2","sinh","tanh","b","trunc","now","getTime","toISOString","pv","nativeDateToISOString","date","year","getUTCFullYear","milliseconds","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","INVALID_DATE","TO_STRING","nativeDateToString","low","hi","fix","JSON","newPromiseCapabilityModule","perform","allSettled","capability","resolve","reject","promiseResolve","remaining","promise","alreadyCalled","then","status","reason","NativePromise","real","onFinally","isFunction","collection","collectionStrong","InternalWeakMap","collectionWeak","enforceIternalState","enforce","NATIVE_WEAK_MAP","IS_IE11","ActiveXObject","$WeakMap","WeakMapPrototype","nativeDelete","nativeHas","nativeGet","nativeSet","arrayBufferModule","mantissaLength","exponent","mantissa","exponentLength","eMax","eBias","rt","nBits","nativeArrayBufferSlice","viewSource","viewTarget","createTypedArrayConstructor","$copyWithin","$fill","$filter","filter","$find","predicate","ArrayIterators","arrayValues","arrayKeys","arrayEntries","nativeTypedArrayIterator","CORRECT_ITER_NAME","typedArrayValues","$join","separator","$lastIndexOf","$map","map","middle","src","$slice","$sort","begin","beginIndex","$toLocaleString","toLocaleString","TO_LOCALE_STRING_BUG","Uint8ArrayPrototype","arrayToString","arrayJoin","IS_NOT_ARRAY_METHOD","nativeApply","functionApply","thisArgument","argumentsList","nativeConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","Reflect","propertyKey","deleteProperty","receiver","objectGetPrototypeOf","objectIsExtensible","objectPreventExtensions","existingDescriptor","ownDescriptor","objectSetPrototypeOf","task","setImmediate","clearImmediate","microtask","process","isNode","noTargetGet","queueMicrotask","domain","scheduler","handler","timeout","boundArgs","setTimeout","setInterval","Direction","_typeof","o","l","document","addEventListener","attachEvent","createElement","setAttribute","appendChild","createTextNode","h","g","style","cssText","u","offsetWidth","width","scrollLeft","scrollWidth","parentNode","B","family","weight","stretch","D","J","fonts","K","font","L","load","r","H","Promise","navigator","vendor","G","M","N","race","clearTimeout","removeEventListener","readyState","detachEvent","w","d","removeChild","p","dir","I","hidden","FontFaceObserver","atan2","PiBy180","PiBy2","couldUseAttachEvent","parseEl","supportsOpacity","supportsFilters","reOpacity","setOpacity","degreesToRadians","radiansToDegrees","clone","fabric","version","HTMLDocument","Document","implementation","createHTMLDocument","virtualWindow","JSDOM","features","FetchExternalResources","resources","jsdomImplForWrapper","implForWrapper","nodeCanvas","Canvas","DOMParser","isTouchSupported","maxTouchPoints","isLikelyNode","Buffer","DPI","reNum","rePathCommand","reNonWord","fontPaths","iMatrix","svgNS","perfLimitSizeTotal","maxCacheSideLimit","minCacheSideLimit","charWidthsCache","textureSize","disableStyleCopyPaste","enableGLFiltering","devicePixelRatio","webkitDevicePixelRatio","mozDevicePixelRatio","browserShadowBlurConstant","arcToSegmentsCache","boundsOfCurveCache","cachesBoundsOfCurve","forceGLPutImageData","initFilterBackend","isWebglSupported","console","maxTextureSize","WebglFilterBackend","tileSize","Canvas2dFilterBackend","eventjs","root","modifyEventListener","modifySelectors","configure","conf","eventListenersAgumented","augmentEventListeners","selectorsAugmented","augmentSelectors","listener","eventManager","remove","returnFalse","event","stop","stopPropagation","cancelBubble","cancelBubbleCount","prevent","preventDefault","preventManipulation","returnValue","cancel","blur","node","activeElement","nodeName","contentEditable","getEventSupport","removeAttribute","isSupported","temp","trigger","fromOverwrite","param","ret","eventjs_stallOnReady","time","ms","interval","clearInterval","querySelector","querySelectorAll","createError","events","n0","length0","createBatchCommands","n1","length1","substr","useCapture","getID","Gesture","_gestureHandlers","wrappers","useCall","tmp","gesture","eventId","eventList","getEventList","message","pointerDefs","pointerDetect","supports","msPointerEnabled","msPointer","touch","mouse","prefix","idx","types","uniqueID","createPointerEvent","preventRecord","eventName","pts","changedTouches","getCoords","pt","pointers","pageX","pageY","newEvent","createEvent","initEvent","originalEvent","oldListener","HTMLElement","augmentEventListener","recall","handle","HTMLDivElement","HTMLCanvasElement","pointerSetup","doc","ownerDocument","minFingers","fingers","maxFingers","position","enabled","env","defaultListener","onPointerDown","onPointerMove","onPointerUp","reset","pause","opt","move","up","resume","tracker","sp","isMouse","isMSPointer","isTouch","pointerStart","toUpperCase","addTouchStart","sid","bbox","track","offsetX","offsetY","x1","y1","scrollTop","rotation","scale","startTime","moveTime","isTouchStart","touches","identifier","ids","rid","getBoundingBox","pointerEnd","exists","gestureFingers","pointerId","documentElement","clientX","clientY","getCoord","pX","pY","metaKeys","agent","mac","getPropertyAsFloat","getPropertyValue","bcr","getBoundingClientRect","height","top","scaleX","scaleY","offsetHeight","getComputedStyle","bottom","border","y2","scrollBodyLeft","pageXOffset","scrollBodyTop","pageYOffset","metaTrackerReset","fnKey","metaKey","escKey","ctrlKey","shiftKey","altKey","metaTracker","isKeyDown","keyCode","MutationObserver","WebKitMutationObserver","MozMutationObserver","DOMAttrModifiedSupported","flag","container","mutations","attributeName","observe","subtree","attrName","propertyName","click","newbbox","dbltap","dblclick","time0","time1","pointer0","pointer1","ax","ay","dragElement","drag","monitor","RAD_DEG","PI","getCentroid","points","centroidx","centroidy","sids","distance","dx","dy","angle","rotate","DEG2","DEG1","pointerdown","pointermove","pointerup","isPointerEmitter","isDown","shake","acceleration","accelerationIncludingGravity","onDeviceMotion","lastShake","gravity","alpha","letter","ACCELERATION","DELTA","span","swipe","snap","threshold","velocity1","degree1","endx","endy","xdist","ydist","degree2","velocity2","velocity","longpress","tap","timestamp","delay","driftDeviance","wheelPreventElasticBounce","preventElasticBounce","wheel","wheelDelta","scrollHeight","_add","onMouseWheel","_remove","detail","Event","orientation","current","onOrientationChange","DeviceOrientationEvent","_removeEventListener","__eventListeners","eventListener","util","array","fill","prop","on","stopObserving","fire","options","listenersForEvent","Observable","off","_objects","_onObjectAdded","renderOnAddRemove","requestRenderAll","insertAt","nonSplicing","objects","somethingRemoved","_onObjectRemoved","forEachObject","context","getObjects","item","isEmpty","contains","complexity","CommonMethods","_setOptions","_initGradient","filler","colorStops","Gradient","_initPattern","Pattern","_initClipping","clipTo","functionBody","getFunctionBody","_setObject","_set","toggle","cos","sin","removeFromArray","getRandomInt","degrees","radians","rotatePoint","subtractEquals","rotateVector","Point","addEquals","vector","transformPoint","ignoreOffset","makeBoundingBoxFromPoints","transform","xPoints","minX","yPoints","minY","invertTransform","parseUnit","fontSize","unit","Text","DEFAULT_SVG_FONT_SIZE","falseFunction","getKlass","namespace","camelize","resolveNamespace","getSvgAttributes","loadImage","crossOrigin","img","createImage","onLoadCallback","onload","onerror","substring","loadImageInDom","enlivenObjects","reviver","enlivenedObjects","numLoadedObjects","numTotalObjects","onLoaded","fromObject","enlivenPatterns","patterns","numLoadedPatterns","numPatterns","enlivenedPatterns","groupSVGElements","centerPoint","Group","sourcePath","populateWithProperties","destination","drawDashedLine","ctx","da","rot","dc","di","draw","save","translate","moveTo","restore","createCanvasElement","copyCanvasElement","canvas","newCanvas","getContext","drawImage","toDataURL","canvasEl","format","quality","clipContext","beginPath","clip","multiplyTransformMatrices","is2x2","qrDecompose","denom","skewX","skewY","translateX","translateY","calcRotateMatrix","theta","calcDimensionsMatrix","scaleMatrix","flipX","flipY","tan","composeMatrix","matrix","customTransformMatrix","resetObjectTransform","saveObjectTransform","isTransparent","tolerance","_isTransparent","imageData","getImageData","parsePreserveAspectRatioAttribute","align","meetOrSlice","aspectRatioAttrs","alignX","alignY","clearFabricFontCache","fontFamily","limitDimsByArea","ar","maximumArea","roughWidth","perfLimitSizeY","capValue","findScaleToFit","findScaleToCover","matrixToSVG","NUM_FRACTION_DIGITS","_join","arcToSegments","toX","toY","ry","large","sweep","rotateX","argsString","th","sinTh","cosTh","fromX","fromY","px","py","rx2","ry2","py2","px2","pl","cx","cy","cx1","cy1","mTheta","calcVectorAngle","dtheta","segments","mDelta","mT","th3","segmentToBezier","th2","costh2","sinth2","costh3","sinth3","ux","uy","vx","vy","ta","tb","getBoundsOfCurve","x0","y0","x3","y3","t1","t2","b2ac","sqrtb2ac","tvalues","bounds","mt","jlen","drawArc","fx","fy","coords","segs","segsNorm","bezierCurveTo","getBoundsOfArc","tx","ty","bound","byProperty","condition","invoke","method","extend","deep","Element","hasOwnProperty","getWholeChar","character","capitalize","firstLetterOnly","escapeXml","graphemeSplit","textstring","chr","graphemes","emptyFunction","IS_DONTENUM_BUGGY","addMethods","parent","superclass","Subclass","callSuper","methodName","parentMethod","_this","superClassMethod","createClass","initialize","subclasses","addListener","removeListener","getPointer","scroll","getScrollLeftTop","_evt","touchProp","getTouchInfo","opacity","es","currentStyle","hasLayout","zoom","setStyle","styles","elementStyle","styleFloat","_slice","sliceCanConvertNodelists","getElementStyle","selectProp","toArray","childNodes","err","makeElement","tagName","className","htmlFor","docElement","nodeType","arr","defaultView","attr","makeElementUnselectable","onselectstart","unselectable","makeElementSelectable","getScript","headEl","getElementsByTagName","scriptEl","loading","onreadystatechange","getById","getElementById","addClass","wrapElement","replaceChild","getElementOffset","docElem","scrollLeftTop","box","offsetAttributes","borderLeftWidth","borderTopWidth","paddingLeft","paddingTop","clientLeft","clientTop","getNodeCanvas","impl","_canvas","_image","cleanUpJsdomNode","_currentSrc","_attributes","_classList","emptyFn","request","onComplete","xhr","XMLHttpRequest","parameters","addParamToUrl","open","setRequestHeader","send","warn","noop","defaultEasing","_requestAnimFrame","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","_cancelAnimFrame","cancelAnimationFrame","requestAnimFrame","animate","duration","finish","onChange","abort","easing","startValue","endValue","byValue","onStart","tick","ticktime","currentTime","timePerc","valuePerc","cancelAnimFrame","animateColor","fromColor","toColor","startColor","Color","getSource","endColor","posValue","colorEasing","scalarAdd","scalar","scalarAddEquals","subtract","scalarSubtract","scalarSubtractEquals","multiplyEquals","divideEquals","eq","lt","lte","gt","gte","lerp","distanceFrom","midPointFrom","setXY","setX","setY","setFromPoint","Intersection","appendPoint","appendPoints","intersectLineLine","a1","a2","b1","b2","uaT","ubT","uB","ua","ub","intersectLinePolygon","inter","intersectPolygonPolygon","points1","points2","intersectPolygonRectangle","r1","r2","topRight","bottomLeft","inter1","inter2","inter3","inter4","_tryParsingColor","setSource","hue2rgb","colorNameMap","sourceFromHex","sourceFromRgb","sourceFromHsl","_rgbToHsl","_source","toRgb","toRgba","toHsl","hsl","toHsla","toHex","toHexa","getAlpha","setAlpha","toGrayscale","average","currentAlpha","toBlackWhite","overlayWith","otherColor","otherSource","reRGBa","reHSLa","reHex","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","fromRgb","fromSource","fromRgba","fromHsl","fromHsla","fromHex","isShortNotation","isRGBa","oColor","Shadow","affectStroke","includeDefaultValues","nonScaling","_parseShadow","__uid","shadow","shadowStr","offsetsAndBlur","reOffsetsAndBlur","StaticCanvas","CANVAS_INIT_ERROR","renderAndResetBound","renderAndReset","requestRenderAllBound","_initStatic","backgroundColor","backgroundImage","overlayColor","overlayImage","stateful","controlsAboveOverlay","allowTouchScrolling","imageSmoothingEnabled","viewportTransform","backgroundVpt","overlayVpt","onBeforeScaleRotate","enableRetinaScaling","vptCoords","skipOffscreen","clipPath","cb","_createLowerCanvas","_initOptions","_setImageSmoothing","interactive","_initRetinaScaling","setOverlayImage","setBackgroundImage","setBackgroundColor","setOverlayColor","calcOffset","_isRetinaScaling","getRetinaScaling","scaleRatio","__initRetinaScaling","lowerCanvasEl","contextContainer","upperCanvasEl","contextTop","_offset","image","__setBgOverlayImage","__setBgOverlayColor","webkitImageSmoothingEnabled","mozImageSmoothingEnabled","msImageSmoothingEnabled","oImageSmoothingEnabled","Image","setOptions","_createCanvasElement","_applyCanvasStyle","getWidth","getHeight","setWidth","setDimensions","setHeight","dimensions","cssValue","cssOnly","_setBackstoreDimension","hasLostContext","backstoreOnly","_setCssDimension","_isCurrentlyDrawing","freeDrawingBrush","_setBrushStyles","cacheCanvasEl","wrapperEl","getZoom","setViewportTransform","vpt","activeObject","_activeObject","group","setCoords","calcViewportBoundaries","zoomToPoint","before","after","setZoom","absolutePan","relativePan","getElement","setupState","clearContext","clearRect","_hasITextHandlers","_mouseUpITextHandler","_iTextInstances","renderAll","canvasToDrawOn","renderCanvas","isRendering","iVpt","tl","br","tr","bl","cancelRequestedRender","_renderBackground","_renderObjects","drawControls","shouldCache","_transformDone","renderCache","forClipping","drawClipPathOnCanvas","_renderOverlay","globalCompositeOperation","zoomX","zoomY","_cacheCanvas","cacheTranslationX","cacheTranslationY","render","_renderBackgroundOrOverlay","needsVpt","lineTo","closePath","fillStyle","toLive","gradientTransform","patternTransform","getCenter","centerObjectH","_centerObject","getCenterPoint","centerObjectV","centerObject","center","viewportCenterObject","vpCenter","getVpCenter","viewportCenterObjectH","viewportCenterObjectV","setPositionByOrigin","toDatalessJSON","propertiesToInclude","toDatalessObject","_toObjectMethod","_toObjects","_toObject","__serializeBgOverlay","excludeFromExport","originalValue","bgImage","overlay","background","sendToBack","objs","activeSelection","bringToFront","sendBackwards","intersecting","newIdx","objsMoved","_findNewLowerIndex","intersectsWithObject","isContainedWithinObject","bringForward","_findNewUpperIndex","dispose","DataURLExporter","EMPTY_JSON","setLineDash","createPNGStream","createJPEGStream","opts","_getPointer","supportLineDash","STROKE_OFFSET","_initInteractive","_createCacheCanvas","uniScaleTransform","uniScaleKey","centeredScaling","centeredRotation","centeredKey","altActionKey","selection","selectionKey","altSelectionKey","selectionColor","selectionDashArray","selectionBorderColor","selectionLineWidth","selectionFullyContained","hoverCursor","moveCursor","defaultCursor","freeDrawingCursor","rotationCursor","notAllowedCursor","containerClass","perPixelTargetFind","targetFindTolerance","skipTargetFind","isDrawingMode","preserveObjectStacking","snapAngle","snapThreshold","stopContextMenu","fireRightClick","fireMiddleClick","targets","_hoveredTarget","_hoveredTargets","_currentTransform","_groupSelector","_initWrapperElement","_createUpperCanvas","_initEventListeners","PencilBrush","_chooseObjectsToRender","objsToRender","activeGroupObjects","activeObjects","getActiveObjects","contextTopDirty","renderTopLayer","_render","_drawSelection","renderTop","_resetCurrentTransform","_shouldCenterTransform","originX","mouseXSign","originY","mouseYSign","containsPoint","xy","_normalizePointer","_findTargetCorner","calcTransformMatrix","invertedM","vptPointer","restorePointerVpt","isTargetTransparent","normalizedPointer","targetRelativeX","targetRelativeY","_cacheContext","contextCache","originalColor","selectionBackgroundColor","_renderControls","hasBorders","transparentCorners","_isSelectionKeyPressed","_shouldClearSelection","evented","selectable","centerTransform","action","_getOriginFromCorner","corner","_getActionFromCorner","alreadySelected","_setupCurrentTransform","ex","ey","lastX","lastY","_beforeTransform","_translateObject","newLeft","newTop","moveX","moveY","_changeSkewTransformOrigin","mouseMove","by","origins","skew","originA","originB","flipSign","skewSign","_skewObject","skewed","lockSkewingX","lockSkewingY","actualMouseByOrigin","constraintPosition","actualMouseByCenter","toLocalPoint","lastMouseByCenter","dim","_getTransformedDimensions","translateToOriginPoint","_setObjectSkew","localMouse","_dim","newValue","newDim","dimNoSkew","otherBy","_otherBy","_by","newDimMouse","atan","_scaleObject","lockScalingX","lockScalingY","lockScalingFlip","scaled","_setLocalMouse","_setObjectScale","forbidScalingX","forbidScalingY","changeX","changeY","newScaleX","newScaleY","Textbox","getMinWidth","_scaleObjectEqually","_flipObject","dist","lastDist","signX","signY","padding","_rotateObject","lockRotation","lastAngle","curAngle","hasRotated","rightAngleLocked","leftAngleLocked","setCursor","cursor","groupSelector","aleft","atop","fillRect","lineWidth","strokeStyle","stroke","_setLineDash","strokeRect","findTarget","skipGroup","activeTarget","activeTargetSubs","aObjects","_searchPossibleTargets","_checkTarget","globalPointer","visible","isEditing","subTarget","objToCheck","pointerToUse","subTargetCheck","ignoreZoom","_absolutePointer","_pointer","cssScale","boundsWidth","boundsHeight","retinaScaling","lowerCanvasClass","_copyCanvasStyle","fromEl","toEl","getSelectionContext","getSelectionElement","getActiveObject","active","_discardActiveObject","_fireSelectionEvents","oldObjects","somethingChanged","added","oldObject","selected","deselected","updated","setActiveObject","currentActives","_setActiveObject","onSelect","onDeselect","discardActiveObject","removeListeners","originalProperties","_realizeGroupTransformOnObject","_unwindGroupTransformOnObject","originalValues","realizeTransform","_setSVGObject","markup","clearContextTop","cursorOffset","mr","mb","ml","addEventOptions","passive","checkClick","button","cursorMap","mainTouchId","_bindEvents","addOrRemove","_getEventPrefix","enablePointerEvents","functor","eventjsFunctor","canvasElement","eventTypePrefix","_onResize","_onMouseDown","_onMouseMove","_onMouseOut","_onMouseEnter","_onMouseWheel","_onContextMenu","_onDoubleClick","_onDragOver","_onDragEnter","_onDragLeave","_onDrop","_onTouchStart","_onGesture","_onDrag","_onOrientationChange","_onShake","_onLongPress","_onMouseUp","_onTouchEnd","eventsBound","_simpleEventHandler","__onTransformGesture","__onDrag","__onMouseWheel","_target","hiddenTextarea","focus","currentTransform","__onOrientationChange","__onShake","__onLongPress","_fireEnterLeaveEvents","_cacheTransformEventData","_handleEvent","_resetTransformEventData","getPointerId","evt","_isMainEvent","isPrimary","__onMouseDown","__onMouseUp","_willAddMouseDown","__onMouseMove","_shouldRender","shouldRender","isClick","_onMouseUpInDrawingMode","_finalizeCurrentTransform","actionPerformed","_maybeGroupObjects","isMoving","_setCursorFromEvent","__corner","eventType","subTargets","absolutePointer","_scaling","hasStateChanged","_addEventOptions","_fire","_onMouseDownInDrawingMode","onMouseDown","_onMouseMoveInDrawingMode","onMouseMove","onMouseUp","_previousPointer","shouldGroup","_shouldGroup","_handleGrouping","saveState","_transformObject","_fireOverOutEvents","fireSyntheticInOutEvents","oldTarget","evtOut","canvasEvtOut","evtIn","canvasEvtIn","_draggedoverTarget","config","inOpt","outOpt","inFires","targetChanged","previousTarget","nextTarget","_beforeScaleTransform","_performTransformAction","_onScale","_isUniscalePossible","currentAction","getCornerCursor","actionIsDisabled","_getRotatedCornerCursor","hasRotatingPoint","_updateActiveSelection","_createActiveSelection","currentActiveObjects","removeWithUpdate","addWithUpdate","_createGroup","groupObjects","exitEditing","ActiveSelection","_groupSelectedObjects","aGroup","_collectObjects","currentObject","selectionX1Y1","selectionX2Y2","allowIntersect","intersectsWithRect","isContainedWithinRect","multiplier","toCanvasElement","cropping","scaledWidth","scaledHeight","originalWidth","originalHeight","newZoom","vp","originalInteractive","newVp","originalRetina","originalContextTop","loadFromDatalessJSON","json","loadFromJSON","serialized","parse","_enlivenObjects","_setBgOverlay","enlivenedCanvasClip","__setupCanvas","loaded","cbIfLoaded","__setBgOverlay","enlivedObject","_toDataURL","_toDataURLWithMultiplier","toDataURLWithMultiplier","cloneWithoutData","backgroundImageOpacity","backgroundImageStretch","__gesturesParams","__gesturesRenderer","_scaleObjectBy","_rotateObjectByAngle","supportsLineDash","objectCaching","cornerSize","borderColor","borderDashArray","cornerColor","cornerStrokeColor","cornerStyle","cornerDashArray","fillRule","strokeWidth","strokeDashArray","strokeDashOffset","strokeLineCap","strokeLineJoin","strokeMiterLimit","borderOpacityWhenMoving","borderScaleFactor","transformMatrix","minScaleLimit","hasControls","rotatingPointOffset","lockMovementX","lockMovementY","lockUniScaling","statefullCache","noScaleCache","strokeUniform","dirty","paintFirst","stateProperties","cacheProperties","inverted","absolutePositioned","_cacheProperties","_updateCacheCanvas","_limitCacheSize","dims","limitedDims","capped","_getCacheCanvasDimensions","objectScale","getTotalObjectScaling","neededX","neededY","targetCanvas","drawingWidth","drawingHeight","minCacheSize","dimensionsChanged","cacheWidth","cacheHeight","zoomChanged","shouldRedraw","additionalWidth","additionalHeight","shouldResizeCanvas","canvasWidth","canvasHeight","sizeGrowing","setTransform","calcOwnMatrix","_removeDefaultValues","getObjectScaling","retina","getObjectOpacity","shouldConstrainValue","isChanged","groupNeedsUpdate","_constrainScale","isOnACache","setOnGroup","getViewportTransform","isNotVisible","isOnScreen","_setupCompositeOperation","drawSelectionBackground","_setOpacity","_setShadow","drawCacheOnCanvas","_removeCacheCanvas","drawObject","propertySet","isCacheDirty","hasStroke","hasFill","needsItsOwnCache","ownCaching","willDrawShadow","drawClipPathOnCache","originalFill","originalStroke","_setClippingProperties","_setStrokeStyles","_setFillStyles","_drawClipPath","skipCanvas","_getNonTransformedDimensions","_removeShadow","globalAlpha","decl","lineCap","lineDashOffset","lineJoin","miterLimit","dashArray","alternative","styleOverride","drawBorders","forActiveSelection","drawBordersInGroup","scaling","multX","multY","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","_applyPatternGradientTransform","gradientUnits","_renderPaintInOrder","_renderStroke","_renderFill","_renderDashedStroke","_applyPatternForTransformedGradient","pCtx","pCanvas","createPattern","_findCenterFromElement","_assignTransformMatrixProps","_removeTransformMatrix","preserveAspectRatioOptions","cropX","cropY","offsetLeft","offsetTop","objectForm","_fromObject","cloneAsImage","utils","origParams","originalGroup","originalShadow","withoutTransform","withoutShadow","boundingRect","getBoundingRect","shadowOffset","originalCanvas","isType","setGradient","gradient","addColorStop","forObject","setPatternFill","setShadow","setColor","shouldCenterOrigin","_setOriginToCenter","_resetOrigin","centerH","viewportCenterH","centerV","viewportCenterV","viewportCenter","getLocalPointer","pClicked","objectLeftTop","_getLeftTopCoords","createAccessors","extraParam","enlivedProps","originXOffset","originYOffset","translateToGivenOrigin","fromOriginX","fromOriginY","toOriginX","toOriginY","translateToCenterPoint","leftTop","getPointByOrigin","p2","adjustPosition","offsetFrom","offsetTo","hypotFull","getScaledWidth","xFull","yFull","_originalOriginX","_originalOriginY","originPoint","multiplyMatrices","oCoords","aCoords","ownMatrixCache","matrixCache","absolute","calculate","_getCoords","calcCoords","pointTL","pointBR","other","lines","_getImageLines","_findCrossPoints","_containsCenterOfCanvas","isPartiallyOnScreen","topline","rightline","bottomline","leftline","xi","iLine","xcount","lineKey","getScaledHeight","scaleToWidth","boundingRectFactor","scaleToHeight","rotateMatrix","_calcRotateMatrix","translateMatrix","_calcTranslateMatrix","startMatrix","finalMatrix","cosP","sinP","cosPSinP","cosPMinusSinP","mtr","skipAbsolute","_setCornerCoords","transformMatrixKey","sep","cache","tMatrix","_calcDimensionsTransformMatrix","flipping","dimX","dimY","noSkew","_finalizeDimensions","_calculateCurrentDimensions","originalSet","saveProps","props","tmpObj","_isEqual","origValue","firstPass","dashedPropertySet","_controlsVisibility","isControlVisible","newTheta","cornerHypotenuse","cosHalfOffset","sinHalfOffset","wh","drawRotatingPoint","rotateHeight","scaleOffset","_drawControl","control","arc","controlName","_getControlsVisibility","setControlVisible","setControlsVisibility","FX_DURATION","fxCenterObjectH","callbacks","empty","_onComplete","_onChange","fxCenterObjectV","_onComplete2","_onChange2","fxRemove","_onComplete3","_onChange3","skipCallbacks","propsToAnimate","_animate","propPair","valueProgress","timeProgress","coordProps","makeEdgeToOriginGetter","propertyNames","originValues","axis1","axis2","dimension","nearest","farthest","Line","_setWidthHeight","_getLeftToOriginX","_getTopToOriginY","calcLinePoints","origStrokeStyle","xMult","yMult","pi","Circle","radius","startAngle","endAngle","setRadius","getRadiusX","getRadiusY","Triangle","widthBy2","heightBy2","piBy2","Ellipse","getRx","getRy","Rect","_initRxRy","isRounded","Polyline","_setPositionDimensions","correctLeftTop","calcDim","_calcDimensions","fromSVG","pathOffset","commonRender","Polygon","_toString","commandLengths","repeatedCommands","Path","fromArray","_parsePath","_renderPathCommands","tempX","tempY","subpathStartX","subpathStartY","controlX","controlY","quadraticCurveTo","currentPath","parsed","coordsStr","coordsParsed","command","commandLength","repeatedCommand","klen","aX","aY","pathUrl","loadSVGFromURL","useSetOnGroup","isAlreadyGrouped","_updateObjectsACoords","_calcBounds","_updateObjectsCoords","_updateObjectCoords","objectLeft","objectTop","_restoreObjectsState","_includeDefaultValues","objsToObject","originalDefaults","_obj","ownCache","_restoreObjectState","destroy","toActiveSelection","ungroupOnCanvas","setObjectsCoords","onlyWidthHeight","iLen","jLen","_getBounds","minXY","maxXY","enlivedClipPath","toGroup","newGroup","childrenOverride","srcFromAttribute","_lastScaleX","_lastScaleY","_filterScalingX","_filterScalingY","minimumScaleTrigger","cacheKey","filters","_initElement","_element","setElement","removeTexture","_originalElement","_initConfig","applyFilters","resizeFilter","applyResizeFilters","backend","filterBackend","evictCachesForKey","setCrossOrigin","getOriginalSize","naturalWidth","naturalHeight","_stroke","filterObj","getSrc","hasCrop","filtered","getAttribute","setSrc","minimumScale","elementToFilter","_filteredEl","sourceWidth","sourceHeight","isNeutralState","imgElement","_needsResize","elementToDraw","sW","sH","sX","sY","_resetWidthHeight","CSS_CANVAS","_initFilters","pAR","preserveAspectRatio","rWidth","rHeight","pWidth","pHeight","parsedAttributes","getSvgSrc","_object","resizeFilters","fromURL","imgOptions","_getAngleValueForStraighten","straighten","fxStraighten","_onComplete4","_onChange4","straightenObject","fxStraightenObject","_dimensionAffectingProps","_reNewline","_reSpacesAndTabs","_reSpaceAndTab","_reWords","fontWeight","underline","overline","linethrough","textAlign","fontStyle","lineHeight","superscript","baseline","subscript","textBackgroundColor","_fontSizeFraction","offsets","_fontSizeMult","charSpacing","_measuringContext","deltaY","_styleProperties","__charBounds","CACHE_FONT_SIZE","MIN_TEXT_WIDTH","text","__skipDimension","initDimensions","getMeasuringContext","_splitText","newLines","_splitTextIntoLines","textLines","_textLines","graphemeLines","_unwrappedTextLines","_unwrappedLines","_text","graphemeText","_clearCache","calcTextWidth","cursorWidth","enlargeSpaces","calcTextHeight","diffSpace","currentLineWidth","numberOfSpaces","accumulatedSpace","line","charBound","spaces","isEndOfWrapping","getLineWidth","kernedWidth","lineIndex","missingNewlineOffset","_setTextStyles","_renderTextLinesBackground","_renderTextDecoration","_renderText","_renderTextStroke","_renderTextFill","charStyle","forMeasuring","textBaseline","_getFontDeclaration","maxWidth","_renderTextLine","_renderChars","styleHas","heightOfLine","lineLeftOffset","lastColor","charBox","currentColor","lineTopOffset","leftOffset","_getLeftOffset","topOffset","_getTopOffset","boxStart","boxWidth","getHeightOfLine","_getLineLeftOffset","getValueOfPropertyAt","getFontCache","cacheProp","_applyCharStyles","charIndex","styleDeclaration","_measureChar","_char","previousChar","prevCharStyle","coupleWidth","previousWidth","fontCache","couple","stylesAreEqual","fontMultiplier","measureText","getHeightOfChar","measureLine","lineInfo","_measureLine","_getWidthOfCharSpacing","grapheme","prevGrapheme","graphemeInfo","lineBounds","_getGraphemeBox","numOfSpaces","skipLeft","getCompleteStyleDeclaration","prevStyle","info","previousBox","__lineHeights","maxHeight","_renderTextCommon","lineHeights","isEmptyStyles","actualStyle","nextStyle","timeToRender","isJustify","charsToRender","shortCut","_renderChar","_hasStyleChanged","_getStyleDeclaration","fullDecl","shouldFill","shouldStroke","fillText","strokeText","setSuperscript","_setScript","setSubscript","schema","loc","get2DCursorLocation","setSelectionStyles","thisStyle","_hasStyleChangedForSvg","__lineWidths","_shouldClearDimensionCache","shouldClear","_forceClearCache","_size","_dy","lastDecoration","currentDecoration","currentFill","lastFill","styleObject","fontIsGeneric","genericFonts","newLine","newText","additionalProperties","needsDims","_key","p3","cleanStyle","letterCount","stylePropertyValue","stylesCount","allStyleObjectPropertiesMatch","graphemeCount","removeStyle","lineNum","charNum","_extendStyles","_getLineStyle","_setLineStyle","_setStyleDeclaration","selectionStart","skipWrapping","getSelectionStyles","startIndex","endIndex","complete","selectionEnd","getStyleAtPosition","lineStyle","_deleteStyleDeclaration","_deleteLineStyle","parseDecoration","textDecoration","IText","editable","editingBorderColor","cursorColor","cursorDelay","cursorDuration","caching","_reSpace","_currentCursorOpacity","_selectionDirection","_abortCursorAnimation","__widthOfSpace","inCompositionMode","initBehavior","setSelectionStart","_updateAndFire","setSelectionEnd","_fireSelectionChanged","_updateTextarea","initDelayedCursor","cursorOffsetCache","renderCursorOrSelection","skipRestore","_clearTextArea","boundaries","_getCursorBoundaries","renderCursor","renderSelection","_getCursorBoundariesOffsets","cursorPosition","cursorLocation","charHeight","__isMousedown","startLine","endLine","startChar","endChar","realLineHeight","lineOffset","boxEnd","compositionColor","getCurrentCharFontSize","cp","_getCurrentCharIndex","getCurrentCharColor","initAddedHandler","initRemovedHandler","initCursorSelectionHandlers","initDoubleClickSimulation","mouseMoveHandler","_initCanvasHandlers","_removeCanvasHandlers","_tick","_currentTickState","_animateCursor","targetOpacity","completeMethod","tickState","isAborted","_onTickComplete","_cursorTimeout1","_currentTickCompleteState","restart","abortCursorAnimation","_cursorTimeout2","selectAll","getSelectedText","findWordBoundaryLeft","startFrom","findWordBoundaryRight","findLineBoundaryLeft","findLineBoundaryRight","searchWordBoundary","direction","selectWord","newSelectionStart","newSelectionEnd","selectLine","enterEditing","exitEditingOnOthers","initHiddenTextarea","_saveEditingProps","_setEditingProps","_textBeforeEdit","initMouseMoveHandler","getSelectionStartFromPointer","currentStart","currentEnd","__selectionStartOnMouseDown","restartCursorIfNeeded","fromStringToGraphemeSelection","smallerTextStart","graphemeStart","smallerTextEnd","fromGraphemeToStringSelection","newSelection","updateTextareaPosition","updateFromTextArea","_calcTextareaPosition","desiredPosition","compositionStart","upperCanvas","upperCanvasWidth","upperCanvasHeight","clientWidth","clientHeight","_savedProps","_restoreEditingProps","isTextChanged","_removeExtraneousStyles","removeStyleFromTo","styleObj","cursorStart","cursorEnd","lineStart","charStart","lineEnd","charEnd","shiftLineStyles","numericChar","diff","clonedStyles","numericLine","insertNewlineStyleObject","qty","copiedStyle","currentCharStyle","newLineStyles","somethingAdded","numIndex","insertCharStyleObject","quantity","currentLineStyles","currentLineStylesCloned","numericIndex","newStyle","insertNewStyleBlock","insertedText","cursorLoc","addedLines","linesLength","setSelectionStartEndWithShift","setSelectionInBoundaries","__lastClickTime","__lastLastClickTime","__lastPointer","__newClickTime","newPointer","isTripleClick","_stopEvent","__lastIsEditing","__lastSelected","initMousedownHandler","initMouseupHandler","initClicks","doubleClickHandler","tripleClickHandler","_mouseDownHandler","setCursorByClick","_mouseDownHandlerBefore","mouseUpHandler","currentActive","mouseOffset","prevWidth","_getNewSelectionStartFromOffset","distanceBtwLastCharAndCursor","distanceBtwNextCharAndCursor","onKeyDown","onKeyUp","onInput","copy","paste","onCompositionStart","onCompositionUpdate","onCompositionEnd","_clickHandlerInitialized","onClick","keysMap","ctrlKeysMapUp","ctrlKeysMapDown","stopImmediatePropagation","_copyDone","fromPaste","removedText","nextText","charCount","nextCharCount","charDiff","textareaSelection","backDelete","copiedText","copiedTextStyle","compositionEnd","_getClipboardData","clipboardData","_getWidthBeforeCursor","widthBeforeCursor","getDownCursorOffset","isRight","selectionProp","_getSelectionForOffset","indexOnOtherLine","_getIndexOnLine","getUpCursorOffset","textBeforeCursor","charWidth","foundMatch","widthOfCharsOnLine","indexOnLine","leftEdge","rightEdge","offsetFromLeftEdge","moveCursorDown","_moveCursorUpOrDown","moveCursorUp","moveCursorWithShift","moveCursorWithoutShift","moveCursorLeft","_moveCursorLeftOrRight","_move","_moveLeft","_moveRight","moveCursorLeftWithoutShift","change","moveCursorLeftWithShift","moveCursorRight","actionName","moveCursorRightWithShift","moveCursorRightWithoutShift","changed","removeChars","insertChars","minWidth","dynamicMinWidth","__cachedLines","_wordJoiners","splitByGrapheme","_styleMap","_generateStyleMap","textInfo","realLineCount","realLineCharCount","isWrapping","nextOffset","shouldLimit","mapNextLine","_wrapText","desiredWidth","wrapped","_wrapLine","_measureWord","word","charOffset","_line","reservedSpace","words","infix","wordWidth","infixWidth","largestWordWidth","lineJustStarted","additionalSpace","linesToKeep","__spreadArrays","il","jl","react_1","types_1","getStepDecimals","decimals","isTouchEvent","isStepDivisible","normalizeValue","allowOverlap","BIG_NUM","inverter","remainder","closestBigNum","rounded","decimalPlaces","relativeValue","isVertical","Up","Down","checkBoundaries","checkInitialOverlap","getMargin","getPaddingAndBorder","translateThumbs","rtl","schd","lastArgs","frameId","_i","replaceAt","getTrackBackground","_a","colors","_b","Right","_c","Left","voidFn","assertUnreachable","getThumbWidth","thumbEl","valueToLabel","children","elWidth","innerText","childElementCount","elClone","cloneNode","innerHTML","visibility","useThumbOverlap","rangeRef","useState","labelStyle","setLabelStyle","labelValue","setLabelValue","useEffect","thumbs","getThumbs","offsets_1","getOffsets","overlaps","buildOverlaps","thumbIndex","thumbXWidth","thumbX","siblingIndex","siblingX","siblingWidth","Set","getOverlaps","labelValue_1","offsetsX","labelValues_1","thumb","lastWidth","_REVERSE_MAP","_MAP","_KEYCODE_MAP","_SHIFT_MAP","_SPECIAL_ALIASES","platform","Mousetrap","_bindMultiple","unbind","_directMap","_callbacks","stopCallback","_belongsTo","composedPath","initialEventTarget","isContentEditable","handleKey","_handleKey","addKeycodes","documentMousetrap","_addEvent","_characterFromEvent","which","_isModifier","_pickBestAction","modifiers","_getReverseMap","_getKeyInfo","combination","_keysFromString","ancestor","targetElement","_resetTimer","_sequenceLevels","_ignoreNextKeyup","_ignoreNextKeypress","_nextExpectedAction","_resetSequences","doNotReset","activeSequences","_getMatches","sequenceName","level","modifiers1","modifiers2","matches","seq","deleteCombo","combo","deleteSequence","_fireCallback","srcElement","_preventDefault","_stopPropagation","_handleKeyEvent","_eventModifiers","_bindSequence","_increaseSequence","nextAction","_callbackAndReset","wrappedCallback","_bindSingle","maxLevel","processedSequenceCallback","ignoreThisKeypress","combinations","_defineProperties","_toPropertyKey","_toPrimitive","_slicedToArray","_arrayWithHoles","return","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_toConsumableArray","_arrayLikeToArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","_createForOfIteratorHelper","_n11","toStringTag","__esModule","default","_step","_iterator","_step2","_s","_iterator2","_e","capture","firstElementChild","_Array$from","_o","_e2","_n","parentElement","shadowRoot","setSelectionRange","dispatchEvent","_","_n2","_l","toHSVA","toHSLA","toRGBA","toCMYK","toHEXA","lock","onchange","onstop","_keyboard","_o11","_r3","_s6","_c4","_a2","_n5","_i3","update","_tapstart","_tapstop","_tapmove","_e8","_e$options$wrapper$ge","classList","_ref","reference","_ref$padding","_e$split","_e$split2","_e$split2$","variant","_r4","_step3","_iterator3","_t6","_s7","_i4","_arr","_e9","_o12","_r5","_s8","_c5","innerHeight","innerWidth","_classCallCheck","hide","show","changestop","swatchselect","appClass","theme","useAsButton","disabled","comparison","closeOnScroll","outputPrecision","lockOpacity","autoReposition","components","interaction","strings","swatches","inline","sliders","defaultRepresentation","adjustableNumbers","showAlways","closeWithKey","_t7","preview","hue","palette","_preBuild","_buildComponents","_finalBuild","addSwatch","_this$_root","_root","app","_nanopop","_rePositioningPicker","_representation","setColorRepresentation","_initializingActive","_emit","_createClass","_i5","_arr2","_e10","_ref2","rgba","hsla","hsva","cmyk","_o13","nextSibling","insertBefore","disable","transition","_this2","_ref4","_color","_lastColor","picker","_s$preview","_recalc","_updateOutput","_step4","_iterator4","_swatchColors","_ref6","_e11","_o14","slider","_components","_this3","_clearColor","setHSVA","applyColor","_n7","isOpen","_e12","getColorRepresentation","_e13","_r6","_t8","_n8","_eventBindings","_n9","_j","hexa","_i2","_r","_o3","_t","_e3","_r2","_s2","_o5","_t2","_e4","_s3","_t3","_e5","_o6","_o8","_t4","_e6","_s4","_c2","_o10","_t5","_e7","_s5","_c3","_this4","_len","_eventListener","_t9","_this5","_parseLocalColor","_t10","_o15","_n10","_i6","_o16","_this$_root2","_this6","_this7","_this$_root3","_this$_components","_this$_parseLocalColo2","_t11","_i7","_r7","_step5","_iterator5","_t12","libs","HSVaColor","Moveable","Nanopop","Selectable","argIndex","framesToPop","__importDefault","mod","Range_1","Range","utils_1","_extendStatics","__extends","__","__importStar","React","INCREASE_KEYS","DECREASE_KEYS","_super","trackRef","createRef","thumbRefs","draggedThumbIndex","thumbZIndexes","trackElement","trackRect","trackPadding","thumbOffsets","thumbRect","thumbMargins","getTargetIndex","child","addTouchEvents","schdOnTouchMove","schdOnEnd","addMouseEvents","schdOnMouseMove","onMouseDownTrack","persist","nativeEvent","setState","onMove","onWindowResize","onTouchStartTrack","onMouseOrTouchStart","onTouchMove","fireOnFinalChange","trackLength","onEnd","onFinalChange","schdOnWindowResize","componentDidMount","componentDidUpdate","prevProps","componentWillUnmount","renderTrack","renderThumb","onTouchStart","ref","isDragged","zIndex","userSelect","touchAction","WebkitUserSelect","MozUserSelect","msUserSelect","tabIndex","draggable","role","defaultProps","Component","ResizeObserver","react","_extends","_temp","onResize","defaultRef","useRef","_useState","setSize","resizeObserver","newWidth","contentRect","newHeight","newSize","unobserve","useMemo","MapShim","Map","getIndex","class_1","__entries__","delete","isBrowser","global$1","requestAnimationFrame$1","transitionKeys","mutationObserverSupported","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","leadingCall","trailingCall","lastCallTime","resolvePending","timeoutCallback","timeStamp","throttle","addObserver","observer","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","childList","characterData","disconnect","getInstance","instance_","defineConfigurable","getWindowOf","emptyRect","createRectInit","toFloat","getBordersSize","positions","getHTMLElementContentRect","paddings","positions_1","getPaddings","horizPad","vertPad","boxSizing","isDocumentElement","vertScrollbar","horizScrollbar","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","getSVGContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","rect","broadcastRect","ResizeObserverEntry","rectInit","Constr","DOMRectReadOnly","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","callback_","controller_","callbackCtx_","observations","clearActive","observation","WeakMap","_objectSpread","toPropertyKey","_possibleConstructorReturn","assertThisInitialized","_getPrototypeOf","_inherits","Manager","refs","sortableInfo","sortByIndex","_ref3","omit","keysToOmit","vendorPrefix","pre","OLink","setInlineStyles","setTranslate3d","setTransitionDuration","closest","limit","getPixelValue","stringValue","getElementMargin","marginBottom","marginLeft","marginRight","marginTop","provideDisplayName","Component$$1","componentName","displayName","getScrollAdjustedBoundingClientRect","scrollDelta","boundingClientRect","getPosition","getEdgeOffset","nodeOffset","newIndex","prevIndex","oldIndex","getLockPixelOffset","lockOffset","getLockPixelOffsets","_offsets","minLockOffset","maxLockOffset","getScrollingParent","computedStyle","overflowRegex","isScrollable","getContainerGridGap","display","gridColumnGap","gridRowGap","KEYCODE","NodeType","selector","fields","clonedNode","field","sortableHandle","WrappedComponent","_class","withRef","_React$Component","WithSortableHandle","wrappedInstance","isSortableHandle","AutoScroller","onScrollCallback","minTranslate","maxTranslate","speed","_this$container","isTop","isBottom","isLeft","isAutoScrolling","propTypes","axis","oneOf","contentWindow","any","disableAutoscroll","bool","getContainer","func","getHelperDimensions","helperClass","helperContainer","oneOfType","instanceOf","hideSortableGhost","keyboardSortingTransitionDuration","lockAxis","arrayOf","lockToContainerEdges","onSortEnd","onSortMove","onSortOver","onSortStart","pressDelay","pressThreshold","keyCodes","shape","lift","drop","down","shouldCancelStart","transitionDuration","updateBeforeSortStart","useDragHandle","useWindowAsScrollContainer","defaultKeyCodes","omittedProps","validateProps","_finallyRethrows","finalizer","sortableContainer","WithSortableContainer","_this$props","touched","nodeIsChild","sorting","_node$sortableInfo","manager","handlePress","pressTimer","_this$props2","_awaitingUpdateBeforeSortStart","combinedDelta","cancelTimer","getActive","_temp6","_temp7","_node","margin","gridGap","containerBoundingRect","scrollContainer","_getHelperDimensions","_collection","marginOffset","_axis","offsetEdge","initialOffset","_isKeySorting","initialScroll","initialWindowScroll","helper","pointerEvents","_hideSortableGhost","sortableGhost","_useWindowAsScrollContainer","containerTop","containerLeft","containerWidth","containerBottom","containerRight","_helperClass","listenerNode","handleKeyEnd","handleKeyDown","handleSortMove","handleSortEnd","sortingIndex","_onSortStart","isKeySorting","nodes","getOrderedRefs","keyMove","_this$props3","_temp8","_temp9","_wasThrown","_result","updateHelperPosition","animateNodes","autoscroll","_this$props4","_this$manager","_node2","edgeOffset","autoScroller","scrollX","scrollY","_this$props5","_this$props5$keyCodes","isValidSortingTarget","keyLift","keyDrop","_node$sortableInfo2","initialFocusedNode","targetNode","containerScrollDelta","targetBoundingClientRect","targetTranslate","targetPosition","shouldAdjustForSize","sizeAdjustment","ignoreTransition","handleEnd","handleMove","handleStart","containerNode","scrollingElement","onAutoScroll","_this$props6","_this$props6$keyboard","_getLockPixelOffsets2","minOffset","maxOffset","_this$props7","windowScrollDelta","sortingOffset","_node3","mustShiftBackward","mustShiftForward","nextNode","prevNode","getWrappedInstance","isRequired","propTypes$1","omittedProps$1","sortableElement","WithSortableElement","register","unregister"],"mappings":";sKACA,IA4BIA,EA5BAC,EAAsB,EAAQ,KAC9BC,EAAc,EAAQ,GACtBC,EAAS,EAAQ,GACjBC,EAAW,EAAQ,GACnBC,EAAM,EAAQ,GACdC,EAAU,EAAQ,IAClBC,EAA8B,EAAQ,IACtCC,EAAW,EAAQ,IACnBC,EAAiB,EAAQ,IAAuCC,EAChEC,EAAiB,EAAQ,IACzBC,EAAiB,EAAQ,IACzBC,EAAkB,EAAQ,GAC1BC,EAAM,EAAQ,IAEdC,EAAYZ,EAAOY,UACnBC,EAAqBD,GAAaA,EAAUE,UAC5CC,EAAoBf,EAAOe,kBAC3BC,EAA6BD,GAAqBA,EAAkBD,UACpEG,EAAaL,GAAaJ,EAAeI,GACzCM,EAAsBL,GAAsBL,EAAeK,GAC3DM,EAAkBC,OAAON,UACzBO,EAAgBF,EAAgBE,cAEhCC,EAAgBZ,EAAgB,eAChCa,EAAkBZ,EAAI,mBAEtBa,EAA4B1B,KAAyBW,GAA4C,UAA1BN,EAAQH,EAAOyB,OACtFC,GAA0B,EAG1BC,EAA6B,CAC/Bf,UAAW,EACXgB,WAAY,EACZb,kBAAmB,EACnBc,WAAY,EACZC,YAAa,EACbC,WAAY,EACZC,YAAa,EACbC,aAAc,EACdC,aAAc,GAQZC,EAAe,SAAUC,GAC3B,OAAOnC,EAASmC,IAAOlC,EAA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AjBuG,UAAU,GAAmBA,UAAU,GAAKxG,KAAKy3F,MAAMx3D,WAChGjgC,KAAKo/C,QAAQ+qF,QAAQt8F,OAAO5N,EAAYjgC,KAAKi7H,OAE9C,CACD30H,IAAK,qBACLjF,MAAO,WAEL,OADA,IAAUsiF,EAAO0iD,QAAS,4HACnBrmI,KAAK4iI,KAAK4D,kBAElB,CACDlgI,IAAK,SACLjF,MAAO,WACL,IAAI45H,EAAMt3C,EAAO0iD,QAAU,kBAAoB,KAC/C,OAAoB,wBAAcF,EAAkB,YAAS,CAC3DlL,IAAKA,GACJ+H,EAAKhjI,KAAKy3F,MAAO44C,UAIjBE,EA/Ee,CAgFtB,aAAY,YAAgBnK,EAAQ,cAAenC,EAAmB,kBAAmBkC,IAAoB,YAAgBC,EAAQ,eAAgB,CACrJ+D,QAAS,IAAUr3G,OAAOq9G,aACxB,YAAgB/J,EAAQ,YAAagK,IAAc,YAAgBhK,EAAQ,eAAgB,CAC7FnmG,WAAY,IACVg8F","file":"js/16-70897b63c3979ab6cc45.chunk.js","sourcesContent":["'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\n\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar isPrototypeOf = ObjectPrototype.isPrototypeOf;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQIRED = false;\nvar NAME;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar isView = function isView(it) {\n var klass = classof(it);\n return klass === 'DataView' || has(TypedArrayConstructorsList, klass);\n};\n\nvar isTypedArray = function (it) {\n return isObject(it) && has(TypedArrayConstructorsList, classof(it));\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (setPrototypeOf) {\n if (isPrototypeOf.call(TypedArray, C)) return C;\n } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {\n return C;\n }\n } throw TypeError('Target is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {\n delete TypedArrayConstructor.prototype[KEY];\n }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n redefine(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {\n delete TypedArrayConstructor[KEY];\n }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n redefine(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQIRED = true;\n defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n } });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","var path = require('../internals/path');\nvar has = require('../internals/has');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar quot = /\"/g;\n\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\n// https://tc39.github.io/ecma262/#sec-createhtml\nmodule.exports = function (string, tag, attribute, value) {\n var S = String(requireObjectCoercible(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '</' + tag + '>';\n};\n","var fails = require('../internals/fails');\n\n// check the existence of a method, lowercase\n// of a tag and escaping quotes in arguments\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n var test = ''[METHOD_NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n });\n};\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n}\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.github.io/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.github.io/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar isSymbol = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.github.io/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.github.io/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.github.io/ecma262/#sec-json.stringify\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n\n $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n // eslint-disable-next-line no-unused-vars\n stringify: function stringify(it, replacer, space) {\n var args = [it];\n var index = 1;\n var $replacer;\n while (arguments.length > index) args.push(arguments[index++]);\n $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return $stringify.apply(null, args);\n }\n });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {\n createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","// `Symbol.prototype.description` getter\n// https://tc39.github.io/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.toPrimitive` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.toprimitive\ndefineWellKnownSymbol('toPrimitive');\n","var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar dateToPrimitive = require('../internals/date-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar DatePrototype = Date.prototype;\n\n// `Date.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-date.prototype-@@toprimitive\nif (!(TO_PRIMITIVE in DatePrototype)) {\n createNonEnumerableProperty(DatePrototype, TO_PRIMITIVE, dateToPrimitive);\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anInstance = require('../internals/an-instance');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar toOffset = require('../internals/to-offset');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar typedArrayFrom = require('../internals/typed-array-from');\nvar forEach = require('../internals/array-iteration').forEach;\nvar setSpecies = require('../internals/set-species');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar InternalStateModule = require('../internals/internal-state');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar round = Math.round;\nvar RangeError = global.RangeError;\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\nvar TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;\nvar TypedArray = ArrayBufferViewCore.TypedArray;\nvar TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar isTypedArray = ArrayBufferViewCore.isTypedArray;\nvar BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';\nvar WRONG_LENGTH = 'Wrong length';\n\nvar fromList = function (C, list) {\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n};\n\nvar addGetter = function (it, key) {\n nativeDefineProperty(it, key, { get: function () {\n return getInternalState(this)[key];\n } });\n};\n\nvar isArrayBuffer = function (it) {\n var klass;\n return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';\n};\n\nvar isTypedArrayIndex = function (target, key) {\n return isTypedArray(target)\n && typeof key != 'symbol'\n && key in target\n && String(+key) == String(key);\n};\n\nvar wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {\n return isTypedArrayIndex(target, key = toPrimitive(key, true))\n ? createPropertyDescriptor(2, target[key])\n : nativeGetOwnPropertyDescriptor(target, key);\n};\n\nvar wrappedDefineProperty = function defineProperty(target, key, descriptor) {\n if (isTypedArrayIndex(target, key = toPrimitive(key, true))\n && isObject(descriptor)\n && has(descriptor, 'value')\n && !has(descriptor, 'get')\n && !has(descriptor, 'set')\n // TODO: add validation descriptor w/o calling accessors\n && !descriptor.configurable\n && (!has(descriptor, 'writable') || descriptor.writable)\n && (!has(descriptor, 'enumerable') || descriptor.enumerable)\n ) {\n target[key] = descriptor.value;\n return target;\n } return nativeDefineProperty(target, key, descriptor);\n};\n\nif (DESCRIPTORS) {\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;\n definePropertyModule.f = wrappedDefineProperty;\n addGetter(TypedArrayPrototype, 'buffer');\n addGetter(TypedArrayPrototype, 'byteOffset');\n addGetter(TypedArrayPrototype, 'byteLength');\n addGetter(TypedArrayPrototype, 'length');\n }\n\n $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,\n defineProperty: wrappedDefineProperty\n });\n\n module.exports = function (TYPE, wrapper, CLAMPED) {\n var BYTES = TYPE.match(/\\d+$/)[0] / 8;\n var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';\n var GETTER = 'get' + TYPE;\n var SETTER = 'set' + TYPE;\n var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];\n var TypedArrayConstructor = NativeTypedArrayConstructor;\n var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;\n var exported = {};\n\n var getter = function (that, index) {\n var data = getInternalState(that);\n return data.view[GETTER](index * BYTES + data.byteOffset, true);\n };\n\n var setter = function (that, index, value) {\n var data = getInternalState(that);\n if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;\n data.view[SETTER](index * BYTES + data.byteOffset, value, true);\n };\n\n var addElement = function (that, index) {\n nativeDefineProperty(that, index, {\n get: function () {\n return getter(this, index);\n },\n set: function (value) {\n return setter(this, index, value);\n },\n enumerable: true\n });\n };\n\n if (!NATIVE_ARRAY_BUFFER_VIEWS) {\n TypedArrayConstructor = wrapper(function (that, data, offset, $length) {\n anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);\n var index = 0;\n var byteOffset = 0;\n var buffer, byteLength, length;\n if (!isObject(data)) {\n length = toIndex(data);\n byteLength = length * BYTES;\n buffer = new ArrayBuffer(byteLength);\n } else if (isArrayBuffer(data)) {\n buffer = data;\n byteOffset = toOffset(offset, BYTES);\n var $len = data.byteLength;\n if ($length === undefined) {\n if ($len % BYTES) throw RangeError(WRONG_LENGTH);\n byteLength = $len - byteOffset;\n if (byteLength < 0) throw RangeError(WRONG_LENGTH);\n } else {\n byteLength = toLength($length) * BYTES;\n if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);\n }\n length = byteLength / BYTES;\n } else if (isTypedArray(data)) {\n return fromList(TypedArrayConstructor, data);\n } else {\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }\n setInternalState(that, {\n buffer: buffer,\n byteOffset: byteOffset,\n byteLength: byteLength,\n length: length,\n view: new DataView(buffer)\n });\n while (index < length) addElement(that, index++);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);\n } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {\n TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {\n anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);\n return inheritIfRequired(function () {\n if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));\n if (isArrayBuffer(data)) return $length !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)\n : typedArrayOffset !== undefined\n ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))\n : new NativeTypedArrayConstructor(data);\n if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);\n return typedArrayFrom.call(TypedArrayConstructor, data);\n }(), dummy, TypedArrayConstructor);\n });\n\n if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);\n forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {\n if (!(key in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);\n }\n });\n TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;\n }\n\n if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);\n }\n\n if (TYPED_ARRAY_TAG) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);\n }\n\n exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;\n\n $({\n global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS\n }, exported);\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {\n createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);\n }\n\n if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {\n createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);\n }\n\n setSpecies(CONSTRUCTOR_NAME);\n };\n} else module.exports = function () { /* empty */ };\n","// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n","'use strict';\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","var hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar defineProperty = require('../internals/object-define-property').f;\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + ++id, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.github.io/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]'\n ? getWindowNames(it)\n : nativeGetOwnPropertyNames(toIndexedObject(it));\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n return Object.isExtensible(Object.preventExtensions({}));\n});\n","'use strict';\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.repeat` method implementation\n// https://tc39.github.io/ecma262/#sec-string.prototype.repeat\nmodule.exports = ''.repeat || function repeat(count) {\n var str = String(requireObjectCoercible(this));\n var result = '';\n var n = toInteger(count);\n if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');\n for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;\n return result;\n};\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nmodule.exports = function (hint) {\n if (hint !== 'string' && hint !== 'number' && hint !== 'default') {\n throw TypeError('Incorrect hint');\n } return toPrimitive(anObject(this), hint !== 'number');\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar global = require('../internals/global');\nvar defineProperties = require('../internals/object-define-properties');\nvar redefine = require('../internals/redefine');\nvar anInstance = require('../internals/an-instance');\nvar has = require('../internals/has');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/string-punycode-to-ascii');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar URLSearchParamsModule = require('../modules/web.url-search-params');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\nvar ALPHANUMERIC = /[\\d+\\-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^(0x|0X)/;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n// eslint-disable-next-line no-control-regex\nvar FORBIDDEN_HOST_CODE_POINT = /[\\u0000\\u0009\\u000A\\u000D #%/:?@[\\\\]]/;\n// eslint-disable-next-line no-control-regex\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\u0000\\u0009\\u000A\\u000D #/:?@[\\\\]]/;\n// eslint-disable-next-line no-control-regex\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u001F ]+|[\\u0000-\\u001F ]+$/g;\n// eslint-disable-next-line no-control-regex\nvar TAB_AND_NEW_LINE = /[\\u0009\\u000A\\u000D]/g;\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var char = function () {\n return input.charAt(pointer);\n };\n\n if (char() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (char()) {\n if (pieceIndex == 8) return;\n if (char() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(char())) {\n value = value * 16 + parseInt(char(), 16);\n pointer++;\n length++;\n }\n if (char() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (char()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (char() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(char())) return;\n while (DIGIT.test(char())) {\n number = parseInt(char(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (char() == ':') {\n pointer++;\n if (!char()) return;\n } else if (char()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (char, set) {\n var code = codeAt(char, 0);\n return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, char, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n char = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (char && ALPHA.test(char)) {\n buffer += char.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {\n buffer += char.toLowerCase();\n } else if (char == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && char == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (char == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (char == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (char == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '/' || (char == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (char == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (char == '/' || char == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (char == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (char != '/' && char != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (char == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += char;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (char == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (char == '[') seenBracket = true;\n else if (char == ']') seenBracket = false;\n buffer += char;\n } break;\n\n case PORT:\n if (DIGIT.test(char)) {\n buffer += char;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (char == '/' || char == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (char == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (char == '/' || char == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (char == EOF || char == '/' || char == '\\\\' || char == '?' || char == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += char;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (char != '/' && char != '\\\\') continue;\n } else if (!stateOverride && char == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n state = PATH;\n if (char != '/') continue;\n } break;\n\n case PATH:\n if (\n char == EOF || char == '/' ||\n (char == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (char == '?' || char == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(char, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n if (char == \"'\" && isSpecial(url)) url.query += '%27';\n else if (char == '#') url.query += '%23';\n else url.query += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = String(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, String(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URL(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = String(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, String(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = String(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, pathname + '', PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = String(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = String(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n","'use strict';\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\n\n// Forced replacement object prototype accessors methods\nmodule.exports = IS_PURE || !fails(function () {\n var key = Math.random();\n // In FF throws only define methods\n // eslint-disable-next-line no-undef, no-useless-call\n __defineSetter__.call(null, key, function () { /* empty */ });\n delete global[key];\n});\n","var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","var nativeExpm1 = Math.expm1;\nvar exp = Math.exp;\n\n// `Math.expm1` method implementation\n// https://tc39.github.io/ecma262/#sec-math.expm1\nmodule.exports = (!nativeExpm1\n // Old FF bug\n || nativeExpm1(10) > 22025.465794806719 || nativeExpm1(10) < 22025.4657948067165168\n // Tor Browser bug\n || nativeExpm1(-2e-17) != -2e-17\n) ? function expm1(x) {\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1;\n} : nativeExpm1;\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY,\n KEY == 'add' ? function add(value) {\n nativeMethod.call(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n nativeMethod.call(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n // eslint-disable-next-line max-len\n if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n })))) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.REQUIRED = true;\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1); // eslint-disable-line no-new\n }) || fails(function () {\n new NativeArrayBuffer(); // eslint-disable-line no-new\n new NativeArrayBuffer(1.5); // eslint-disable-line no-new\n new NativeArrayBuffer(NaN); // eslint-disable-line no-new\n return NativeArrayBuffer.name != ARRAY_BUFFER;\n })) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var nativeSetInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n nativeSetInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n nativeSetInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) { /* empty */ }\n } return false;\n};\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\nmodule.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n","var classof = require('../internals/classof-raw');\n\n// `thisNumberValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-thisnumbervalue\nmodule.exports = function (value) {\n if (typeof value != 'number' && classof(value) != 'Number') {\n throw TypeError('Incorrect invocation');\n }\n return +value;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.small` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.small\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {\n small: function small() {\n return createHTML(this, 'small', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar toInteger = require('../internals/to-integer');\nvar thisNumberValue = require('../internals/this-number-value');\nvar repeat = require('../internals/string-repeat');\nvar fails = require('../internals/fails');\n\nvar nativeToFixed = 1.0.toFixed;\nvar floor = Math.floor;\n\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\nvar FORCED = nativeToFixed && (\n 0.00008.toFixed(3) !== '0.000' ||\n 0.9.toFixed(0) !== '1' ||\n 1.255.toFixed(2) !== '1.25' ||\n 1000000000000000128.0.toFixed(0) !== '1000000000000000128'\n) || !fails(function () {\n // V8 ~ Android 4.3-\n nativeToFixed.call({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.github.io/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n // eslint-disable-next-line max-statements\n toFixed: function toFixed(fractionDigits) {\n var number = thisNumberValue(this);\n var fractDigits = toInteger(fractionDigits);\n var data = [0, 0, 0, 0, 0, 0];\n var sign = '';\n var result = '0';\n var e, z, j, k;\n\n var multiply = function (n, c) {\n var index = -1;\n var c2 = c;\n while (++index < 6) {\n c2 += n * data[index];\n data[index] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n };\n\n var divide = function (n) {\n var index = 6;\n var c = 0;\n while (--index >= 0) {\n c += data[index];\n data[index] = floor(c / n);\n c = (c % n) * 1e7;\n }\n };\n\n var dataToString = function () {\n var index = 6;\n var s = '';\n while (--index >= 0) {\n if (s !== '' || index === 0 || data[index] !== 0) {\n var t = String(data[index]);\n s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;\n }\n } return s;\n };\n\n if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');\n // eslint-disable-next-line no-self-compare\n if (number != number) return 'NaN';\n if (number <= -1e21 || number >= 1e21) return String(number);\n if (number < 0) {\n sign = '-';\n number = -number;\n }\n if (number > 1e-21) {\n e = log(number * pow(2, 69, 1)) - 69;\n z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(0, z);\n j = fractDigits;\n while (j >= 7) {\n multiply(1e7, 0);\n j -= 7;\n }\n multiply(pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(1 << 23);\n j -= 23;\n }\n divide(1 << j);\n multiply(1, 1);\n divide(2);\n result = dataToString();\n } else {\n multiply(0, z);\n multiply(1 << -e, 0);\n result = dataToString() + repeat.call('0', fractDigits);\n }\n }\n if (fractDigits > 0) {\n k = result.length;\n result = sign + (k <= fractDigits\n ? '0.' + repeat.call('0', fractDigits - k) + result\n : result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));\n } else {\n result = sign + result;\n } return result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://теÑÑ‚').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\n\n// `Array.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: !USES_TO_LENGTH }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('../internals/to-length');\nvar repeat = require('../internals/string-repeat');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = String(requireObjectCoercible($this));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n","// `Math.sign` method implementation\n// https://tc39.github.io/ecma262/#sec-math.sign\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n","module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n","/* eslint-disable no-new */\nvar global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;\n\nvar ArrayBuffer = global.ArrayBuffer;\nvar Int8Array = global.Int8Array;\n\nmodule.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {\n Int8Array(1);\n}) || !fails(function () {\n new Int8Array(-1);\n}) || !checkCorrectnessOfIteration(function (iterable) {\n new Int8Array();\n new Int8Array(null);\n new Int8Array(1.5);\n new Int8Array(iterable);\n}, true) || fails(function () {\n // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill\n return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;\n});\n","// `SameValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-samevalue\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar hasOwn = require('../internals/has');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $fetch = getBuiltIn('fetch');\nvar Headers = getBuiltIn('Headers');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (typeof iteratorMethod === 'function') {\n iterator = iteratorMethod.call(init);\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = entryNext.call(entryIterator)).done ||\n (second = entryNext.call(entryIterator)).done ||\n !entryNext.call(entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: first.value + '', value: second.value + '' });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });\n } else {\n parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.appent` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: name + '', value: value + '' });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = name + '';\n var val = value + '';\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` for correct work with polyfilled `URLSearchParams`\n// https://github.com/zloirock/core-js/issues/674\nif (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {\n $({ global: true, enumerable: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n var args = [input];\n var init, body, headers;\n if (arguments.length > 1) {\n init = arguments[1];\n if (isObject(init)) {\n body = init.body;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headers.has('content-type')) {\n headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n init = create(init, {\n body: createPropertyDescriptor(0, String(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n }\n args.push(init);\n } return $fetch.apply(this, args);\n }\n });\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.link` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.link\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {\n link: function link(url) {\n return createHTML(this, 'a', 'href', url);\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.github.io/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.github.io/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","'use strict';\nvar aFunction = require('../internals/a-function');\nvar isObject = require('../internals/is-object');\n\nvar slice = [].slice;\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n if (!(argsLength in factories)) {\n for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';\n // eslint-disable-next-line no-new-func\n factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');\n } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.github.io/ecma262/#sec-function.prototype.bind\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var fn = aFunction(this);\n var partArgs = slice.call(arguments, 1);\n var boundFunction = function bound(/* args... */) {\n var args = partArgs.concat(slice.call(arguments));\n return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);\n };\n if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;\n return boundFunction;\n};\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg, 3) : false;\n var element;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar min = Math.min;\nvar nativeLastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\n// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : nativeLastIndexOf;\n","// https://github.com/zloirock/core-js/issues/280\nvar userAgent = require('../internals/engine-user-agent');\n\n// eslint-disable-next-line unicorn/no-unsafe-regex\nmodule.exports = /Version\\/10\\.\\d+(\\.\\d+)?( Mobile\\/\\w+)? Safari\\//.test(userAgent);\n","var global = require('../internals/global');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseInt = global.parseInt;\nvar hex = /^[+-]?0[Xx]/;\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;\n\n// `parseInt` method\n// https://tc39.github.io/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n var S = trim(String(string));\n return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n","var global = require('../internals/global');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseFloat = global.parseFloat;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;\n\n// `parseFloat` method\n// https://tc39.github.io/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n var trimmedString = trim(String(string));\n var result = $parseFloat(trimmedString);\n return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n","var isObject = require('../internals/is-object');\n\nvar floor = Math.floor;\n\n// `Number.isInteger` method implementation\n// https://tc39.github.io/ecma262/#sec-number.isinteger\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","var log = Math.log;\n\n// `Math.log1p` method implementation\n// https://tc39.github.io/ecma262/#sec-math.log1p\nmodule.exports = Math.log1p || function log1p(x) {\n return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x);\n};\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar create = require('../internals/object-create');\nvar redefineAll = require('../internals/redefine-all');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/define-iterator');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return C;\n },\n setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return { value: undefined, done: true };\n }\n // return step by kind\n if (kind == 'keys') return { value: entry.key, done: false };\n if (kind == 'values') return { value: entry.value, done: false };\n return { value: [entry.key, entry.value], done: false };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","'use strict';\nvar redefineAll = require('../internals/redefine-all');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar $has = require('../internals/has');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (store) {\n return store.frozen || (store.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n return find(store.entries, function (it) {\n return it[0] === key;\n });\n};\n\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) this.entries.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n id: id++,\n frozen: undefined\n });\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n redefineAll(C.prototype, {\n // 23.3.3.2 WeakMap.prototype.delete(key)\n // 23.4.3.3 WeakSet.prototype.delete(value)\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && $has(data, state.id) && delete data[state.id];\n },\n // 23.3.3.4 WeakMap.prototype.has(key)\n // 23.4.3.4 WeakSet.prototype.has(value)\n has: function has(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && $has(data, state.id);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // 23.3.3.3 WeakMap.prototype.get(key)\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // 23.3.3.5 WeakMap.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // 23.4.3.1 WeakSet.prototype.add(value)\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return C;\n }\n};\n","var toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\n\n// `ToIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-toindex\nmodule.exports = function (it) {\n if (it === undefined) return 0;\n var number = toInteger(it);\n var length = toLength(number);\n if (number !== length) throw RangeError('Wrong length or index');\n return length;\n};\n","var toPositiveInteger = require('../internals/to-positive-integer');\n\nmodule.exports = function (it, BYTES) {\n var offset = toPositiveInteger(it);\n if (offset % BYTES) throw RangeError('Wrong offset');\n return offset;\n};\n","var toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar bind = require('../internals/function-bind-context');\nvar aTypedArrayConstructor = require('../internals/array-buffer-view-core').aTypedArrayConstructor;\n\nmodule.exports = function from(source /* , mapfn, thisArg */) {\n var O = toObject(source);\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var i, length, result, step, iterator, next;\n if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n O = [];\n while (!(step = next.call(iterator)).done) {\n O.push(step.value);\n }\n }\n if (mapping && argumentsLength > 2) {\n mapfn = bind(mapfn, arguments[2], 2);\n }\n length = toLength(O.length);\n result = new (aTypedArrayConstructor(this))(length);\n for (i = 0; length > i; i++) {\n result[i] = mapping ? mapfn(O[i], i) : O[i];\n }\n return result;\n};\n","'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n","var anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (it) {\n var iteratorMethod = getIteratorMethod(it);\n if (typeof iteratorMethod != 'function') {\n throw TypeError(String(it) + ' is not iterable');\n } return anObject(iteratorMethod.call(it));\n};\n","'use strict';\nvar $ = require('../internals/export');\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\n$({ target: 'URL', proto: true, enumerable: true }, {\n toJSON: function toJSON() {\n return URL.prototype.toString.call(this);\n }\n});\n","var $ = require('../internals/export');\nvar $entries = require('../internals/object-to-array').entries;\n\n// `Object.entries` method\n// https://tc39.github.io/ecma262/#sec-object.entries\n$({ target: 'Object', stat: true }, {\n entries: function entries(O) {\n return $entries(O);\n }\n});\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD;\n\n// `Array.prototype.sort` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? nativeSort.call(toObject(this))\n : nativeSort.call(toObject(this), aFunction(comparefn));\n }\n});\n","require('../es');\nrequire('../web');\nvar path = require('../internals/path');\n\nmodule.exports = path;\n","require('../modules/es.symbol');\nrequire('../modules/es.symbol.async-iterator');\nrequire('../modules/es.symbol.description');\nrequire('../modules/es.symbol.has-instance');\nrequire('../modules/es.symbol.is-concat-spreadable');\nrequire('../modules/es.symbol.iterator');\nrequire('../modules/es.symbol.match');\nrequire('../modules/es.symbol.match-all');\nrequire('../modules/es.symbol.replace');\nrequire('../modules/es.symbol.search');\nrequire('../modules/es.symbol.species');\nrequire('../modules/es.symbol.split');\nrequire('../modules/es.symbol.to-primitive');\nrequire('../modules/es.symbol.to-string-tag');\nrequire('../modules/es.symbol.unscopables');\nrequire('../modules/es.object.assign');\nrequire('../modules/es.object.create');\nrequire('../modules/es.object.define-property');\nrequire('../modules/es.object.define-properties');\nrequire('../modules/es.object.entries');\nrequire('../modules/es.object.freeze');\nrequire('../modules/es.object.from-entries');\nrequire('../modules/es.object.get-own-property-descriptor');\nrequire('../modules/es.object.get-own-property-descriptors');\nrequire('../modules/es.object.get-own-property-names');\nrequire('../modules/es.object.get-prototype-of');\nrequire('../modules/es.object.is');\nrequire('../modules/es.object.is-extensible');\nrequire('../modules/es.object.is-frozen');\nrequire('../modules/es.object.is-sealed');\nrequire('../modules/es.object.keys');\nrequire('../modules/es.object.prevent-extensions');\nrequire('../modules/es.object.seal');\nrequire('../modules/es.object.set-prototype-of');\nrequire('../modules/es.object.values');\nrequire('../modules/es.object.to-string');\nrequire('../modules/es.object.define-getter');\nrequire('../modules/es.object.define-setter');\nrequire('../modules/es.object.lookup-getter');\nrequire('../modules/es.object.lookup-setter');\nrequire('../modules/es.function.bind');\nrequire('../modules/es.function.name');\nrequire('../modules/es.function.has-instance');\nrequire('../modules/es.global-this');\nrequire('../modules/es.array.from');\nrequire('../modules/es.array.is-array');\nrequire('../modules/es.array.of');\nrequire('../modules/es.array.concat');\nrequire('../modules/es.array.copy-within');\nrequire('../modules/es.array.every');\nrequire('../modules/es.array.fill');\nrequire('../modules/es.array.filter');\nrequire('../modules/es.array.find');\nrequire('../modules/es.array.find-index');\nrequire('../modules/es.array.flat');\nrequire('../modules/es.array.flat-map');\nrequire('../modules/es.array.for-each');\nrequire('../modules/es.array.includes');\nrequire('../modules/es.array.index-of');\nrequire('../modules/es.array.join');\nrequire('../modules/es.array.last-index-of');\nrequire('../modules/es.array.map');\nrequire('../modules/es.array.reduce');\nrequire('../modules/es.array.reduce-right');\nrequire('../modules/es.array.reverse');\nrequire('../modules/es.array.slice');\nrequire('../modules/es.array.some');\nrequire('../modules/es.array.sort');\nrequire('../modules/es.array.splice');\nrequire('../modules/es.array.species');\nrequire('../modules/es.array.unscopables.flat');\nrequire('../modules/es.array.unscopables.flat-map');\nrequire('../modules/es.array.iterator');\nrequire('../modules/es.string.from-code-point');\nrequire('../modules/es.string.raw');\nrequire('../modules/es.string.code-point-at');\nrequire('../modules/es.string.ends-with');\nrequire('../modules/es.string.includes');\nrequire('../modules/es.string.match');\nrequire('../modules/es.string.match-all');\nrequire('../modules/es.string.pad-end');\nrequire('../modules/es.string.pad-start');\nrequire('../modules/es.string.repeat');\nrequire('../modules/es.string.replace');\nrequire('../modules/es.string.search');\nrequire('../modules/es.string.split');\nrequire('../modules/es.string.starts-with');\nrequire('../modules/es.string.trim');\nrequire('../modules/es.string.trim-start');\nrequire('../modules/es.string.trim-end');\nrequire('../modules/es.string.iterator');\nrequire('../modules/es.string.anchor');\nrequire('../modules/es.string.big');\nrequire('../modules/es.string.blink');\nrequire('../modules/es.string.bold');\nrequire('../modules/es.string.fixed');\nrequire('../modules/es.string.fontcolor');\nrequire('../modules/es.string.fontsize');\nrequire('../modules/es.string.italics');\nrequire('../modules/es.string.link');\nrequire('../modules/es.string.small');\nrequire('../modules/es.string.strike');\nrequire('../modules/es.string.sub');\nrequire('../modules/es.string.sup');\nrequire('../modules/es.regexp.constructor');\nrequire('../modules/es.regexp.exec');\nrequire('../modules/es.regexp.flags');\nrequire('../modules/es.regexp.sticky');\nrequire('../modules/es.regexp.test');\nrequire('../modules/es.regexp.to-string');\nrequire('../modules/es.parse-int');\nrequire('../modules/es.parse-float');\nrequire('../modules/es.number.constructor');\nrequire('../modules/es.number.epsilon');\nrequire('../modules/es.number.is-finite');\nrequire('../modules/es.number.is-integer');\nrequire('../modules/es.number.is-nan');\nrequire('../modules/es.number.is-safe-integer');\nrequire('../modules/es.number.max-safe-integer');\nrequire('../modules/es.number.min-safe-integer');\nrequire('../modules/es.number.parse-float');\nrequire('../modules/es.number.parse-int');\nrequire('../modules/es.number.to-fixed');\nrequire('../modules/es.number.to-precision');\nrequire('../modules/es.math.acosh');\nrequire('../modules/es.math.asinh');\nrequire('../modules/es.math.atanh');\nrequire('../modules/es.math.cbrt');\nrequire('../modules/es.math.clz32');\nrequire('../modules/es.math.cosh');\nrequire('../modules/es.math.expm1');\nrequire('../modules/es.math.fround');\nrequire('../modules/es.math.hypot');\nrequire('../modules/es.math.imul');\nrequire('../modules/es.math.log10');\nrequire('../modules/es.math.log1p');\nrequire('../modules/es.math.log2');\nrequire('../modules/es.math.sign');\nrequire('../modules/es.math.sinh');\nrequire('../modules/es.math.tanh');\nrequire('../modules/es.math.to-string-tag');\nrequire('../modules/es.math.trunc');\nrequire('../modules/es.date.now');\nrequire('../modules/es.date.to-json');\nrequire('../modules/es.date.to-iso-string');\nrequire('../modules/es.date.to-string');\nrequire('../modules/es.date.to-primitive');\nrequire('../modules/es.json.stringify');\nrequire('../modules/es.json.to-string-tag');\nrequire('../modules/es.promise');\nrequire('../modules/es.promise.all-settled');\nrequire('../modules/es.promise.finally');\nrequire('../modules/es.map');\nrequire('../modules/es.set');\nrequire('../modules/es.weak-map');\nrequire('../modules/es.weak-set');\nrequire('../modules/es.array-buffer.constructor');\nrequire('../modules/es.array-buffer.is-view');\nrequire('../modules/es.array-buffer.slice');\nrequire('../modules/es.data-view');\nrequire('../modules/es.typed-array.int8-array');\nrequire('../modules/es.typed-array.uint8-array');\nrequire('../modules/es.typed-array.uint8-clamped-array');\nrequire('../modules/es.typed-array.int16-array');\nrequire('../modules/es.typed-array.uint16-array');\nrequire('../modules/es.typed-array.int32-array');\nrequire('../modules/es.typed-array.uint32-array');\nrequire('../modules/es.typed-array.float32-array');\nrequire('../modules/es.typed-array.float64-array');\nrequire('../modules/es.typed-array.from');\nrequire('../modules/es.typed-array.of');\nrequire('../modules/es.typed-array.copy-within');\nrequire('../modules/es.typed-array.every');\nrequire('../modules/es.typed-array.fill');\nrequire('../modules/es.typed-array.filter');\nrequire('../modules/es.typed-array.find');\nrequire('../modules/es.typed-array.find-index');\nrequire('../modules/es.typed-array.for-each');\nrequire('../modules/es.typed-array.includes');\nrequire('../modules/es.typed-array.index-of');\nrequire('../modules/es.typed-array.iterator');\nrequire('../modules/es.typed-array.join');\nrequire('../modules/es.typed-array.last-index-of');\nrequire('../modules/es.typed-array.map');\nrequire('../modules/es.typed-array.reduce');\nrequire('../modules/es.typed-array.reduce-right');\nrequire('../modules/es.typed-array.reverse');\nrequire('../modules/es.typed-array.set');\nrequire('../modules/es.typed-array.slice');\nrequire('../modules/es.typed-array.some');\nrequire('../modules/es.typed-array.sort');\nrequire('../modules/es.typed-array.subarray');\nrequire('../modules/es.typed-array.to-locale-string');\nrequire('../modules/es.typed-array.to-string');\nrequire('../modules/es.reflect.apply');\nrequire('../modules/es.reflect.construct');\nrequire('../modules/es.reflect.define-property');\nrequire('../modules/es.reflect.delete-property');\nrequire('../modules/es.reflect.get');\nrequire('../modules/es.reflect.get-own-property-descriptor');\nrequire('../modules/es.reflect.get-prototype-of');\nrequire('../modules/es.reflect.has');\nrequire('../modules/es.reflect.is-extensible');\nrequire('../modules/es.reflect.own-keys');\nrequire('../modules/es.reflect.prevent-extensions');\nrequire('../modules/es.reflect.set');\nrequire('../modules/es.reflect.set-prototype-of');\nvar path = require('../internals/path');\n\nmodule.exports = path;\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.asyncIterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.asynciterator\ndefineWellKnownSymbol('asyncIterator');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.hasInstance` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.hasinstance\ndefineWellKnownSymbol('hasInstance');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.isConcatSpreadable` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.isconcatspreadable\ndefineWellKnownSymbol('isConcatSpreadable');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.match` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.match\ndefineWellKnownSymbol('match');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.matchAll` well-known symbol\ndefineWellKnownSymbol('matchAll');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.replace` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.replace\ndefineWellKnownSymbol('replace');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.search` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.search\ndefineWellKnownSymbol('search');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.species` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.species\ndefineWellKnownSymbol('species');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.split` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.split\ndefineWellKnownSymbol('split');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.toStringTag` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.tostringtag\ndefineWellKnownSymbol('toStringTag');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.unscopables` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.unscopables\ndefineWellKnownSymbol('unscopables');\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar create = require('../internals/object-create');\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n create: create\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar objectDefinePropertyModile = require('../internals/object-define-property');\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\n$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {\n defineProperty: objectDefinePropertyModile.f\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineProperties = require('../internals/object-define-properties');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\n$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {\n defineProperties: defineProperties\n});\n","var $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\nvar nativeFreeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); });\n\n// `Object.freeze` method\n// https://tc39.github.io/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n freeze: function freeze(it) {\n return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;\n }\n});\n","var $ = require('../internals/export');\nvar iterate = require('../internals/iterate');\nvar createProperty = require('../internals/create-property');\n\n// `Object.fromEntries` method\n// https://github.com/tc39/proposal-object-from-entries\n$({ target: 'Object', stat: true }, {\n fromEntries: function fromEntries(iterable) {\n var obj = {};\n iterate(iterable, function (k, v) {\n createProperty(obj, k, v);\n }, undefined, true);\n return obj;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });\nvar FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\n$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n }\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar ownKeys = require('../internals/own-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar createProperty = require('../internals/create-property');\n\n// `Object.getOwnPropertyDescriptors` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIndexedObject(object);\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n var keys = ownKeys(O);\n var result = {};\n var index = 0;\n var key, descriptor;\n while (keys.length > index) {\n descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n if (descriptor !== undefined) createProperty(result, key, descriptor);\n }\n return result;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names-external').f;\n\nvar FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n getOwnPropertyNames: nativeGetOwnPropertyNames\n});\n","var $ = require('../internals/export');\nvar is = require('../internals/same-value');\n\n// `Object.is` method\n// https://tc39.github.io/ecma262/#sec-object.is\n$({ target: 'Object', stat: true }, {\n is: is\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\n\nvar nativeIsExtensible = Object.isExtensible;\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeIsExtensible(1); });\n\n// `Object.isExtensible` method\n// https://tc39.github.io/ecma262/#sec-object.isextensible\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n isExtensible: function isExtensible(it) {\n return isObject(it) ? nativeIsExtensible ? nativeIsExtensible(it) : true : false;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\n\nvar nativeIsFrozen = Object.isFrozen;\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeIsFrozen(1); });\n\n// `Object.isFrozen` method\n// https://tc39.github.io/ecma262/#sec-object.isfrozen\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n isFrozen: function isFrozen(it) {\n return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true;\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\n\nvar nativeIsSealed = Object.isSealed;\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeIsSealed(1); });\n\n// `Object.isSealed` method\n// https://tc39.github.io/ecma262/#sec-object.issealed\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n isSealed: function isSealed(it) {\n return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true;\n }\n});\n","var $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\n\nvar nativePreventExtensions = Object.preventExtensions;\nvar FAILS_ON_PRIMITIVES = fails(function () { nativePreventExtensions(1); });\n\n// `Object.preventExtensions` method\n// https://tc39.github.io/ecma262/#sec-object.preventextensions\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n preventExtensions: function preventExtensions(it) {\n return nativePreventExtensions && isObject(it) ? nativePreventExtensions(onFreeze(it)) : it;\n }\n});\n","var $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\n\nvar nativeSeal = Object.seal;\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeSeal(1); });\n\n// `Object.seal` method\n// https://tc39.github.io/ecma262/#sec-object.seal\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n seal: function seal(it) {\n return nativeSeal && isObject(it) ? nativeSeal(onFreeze(it)) : it;\n }\n});\n","var $ = require('../internals/export');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n$({ target: 'Object', stat: true }, {\n setPrototypeOf: setPrototypeOf\n});\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.github.io/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar aFunction = require('../internals/a-function');\nvar definePropertyModule = require('../internals/object-define-property');\n\n// `Object.prototype.__defineGetter__` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.__defineGetter__\nif (DESCRIPTORS) {\n $({ target: 'Object', proto: true, forced: FORCED }, {\n __defineGetter__: function __defineGetter__(P, getter) {\n definePropertyModule.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar aFunction = require('../internals/a-function');\nvar definePropertyModule = require('../internals/object-define-property');\n\n// `Object.prototype.__defineSetter__` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.__defineSetter__\nif (DESCRIPTORS) {\n $({ target: 'Object', proto: true, forced: FORCED }, {\n __defineSetter__: function __defineSetter__(P, setter) {\n definePropertyModule.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Object.prototype.__lookupGetter__` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupGetter__\nif (DESCRIPTORS) {\n $({ target: 'Object', proto: true, forced: FORCED }, {\n __lookupGetter__: function __lookupGetter__(P) {\n var O = toObject(this);\n var key = toPrimitive(P, true);\n var desc;\n do {\n if (desc = getOwnPropertyDescriptor(O, key)) return desc.get;\n } while (O = getPrototypeOf(O));\n }\n });\n}\n","'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar FORCED = require('../internals/object-prototype-accessors-forced');\nvar toObject = require('../internals/to-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Object.prototype.__lookupSetter__` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupSetter__\nif (DESCRIPTORS) {\n $({ target: 'Object', proto: true, forced: FORCED }, {\n __lookupSetter__: function __lookupSetter__(P) {\n var O = toObject(this);\n var key = toPrimitive(P, true);\n var desc;\n do {\n if (desc = getOwnPropertyDescriptor(O, key)) return desc.set;\n } while (O = getPrototypeOf(O));\n }\n });\n}\n","var $ = require('../internals/export');\nvar bind = require('../internals/function-bind');\n\n// `Function.prototype.bind` method\n// https://tc39.github.io/ecma262/#sec-function.prototype.bind\n$({ target: 'Function', proto: true }, {\n bind: bind\n});\n","'use strict';\nvar isObject = require('../internals/is-object');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar HAS_INSTANCE = wellKnownSymbol('hasInstance');\nvar FunctionPrototype = Function.prototype;\n\n// `Function.prototype[@@hasInstance]` method\n// https://tc39.github.io/ecma262/#sec-function.prototype-@@hasinstance\nif (!(HAS_INSTANCE in FunctionPrototype)) {\n definePropertyModule.f(FunctionPrototype, HAS_INSTANCE, { value: function (O) {\n if (typeof this != 'function' || !isObject(O)) return false;\n if (!isObject(this.prototype)) return O instanceof this;\n // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:\n while (O = getPrototypeOf(O)) if (this.prototype === O) return true;\n return false;\n } });\n}\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\n\n// `globalThis` object\n// https://github.com/tc39/proposal-global\n$({ global: true }, {\n globalThis: global\n});\n","var $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\n\n// `Array.isArray` method\n// https://tc39.github.io/ecma262/#sec-array.isarray\n$({ target: 'Array', stat: true }, {\n isArray: isArray\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar createProperty = require('../internals/create-property');\n\nvar ISNT_GENERIC = fails(function () {\n function F() { /* empty */ }\n return !(Array.of.call(F) instanceof F);\n});\n\n// `Array.of` method\n// https://tc39.github.io/ecma262/#sec-array.of\n// WebKit Array.of isn't generic\n$({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {\n of: function of(/* ...args */) {\n var index = 0;\n var argumentsLength = arguments.length;\n var result = new (typeof this == 'function' ? this : Array)(argumentsLength);\n while (argumentsLength > index) createProperty(result, index, arguments[index++]);\n result.length = argumentsLength;\n return result;\n }\n});\n","var $ = require('../internals/export');\nvar copyWithin = require('../internals/array-copy-within');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.copyWithin` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin\n$({ target: 'Array', proto: true }, {\n copyWithin: copyWithin\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('copyWithin');\n","'use strict';\nvar $ = require('../internals/export');\nvar $every = require('../internals/array-iteration').every;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('every');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('every');\n\n// `Array.prototype.every` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.every\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {\n every: function every(callbackfn /* , thisArg */) {\n return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\nvar USES_TO_LENGTH = arrayMethodUsesToLength(FIND_INDEX);\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flat` method\n// https://github.com/tc39/proposal-flatMap\n$({ target: 'Array', proto: true }, {\n flat: function flat(/* depthArg = 1 */) {\n var depthArg = arguments.length ? arguments[0] : undefined;\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar aFunction = require('../internals/a-function');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://github.com/tc39/proposal-flatMap\n$({ target: 'Array', proto: true }, {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A;\n aFunction(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar forEach = require('../internals/array-for-each');\n\n// `Array.prototype.forEach` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n forEach: forEach\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\n\n// `Array.prototype.indexOf` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var $ = require('../internals/export');\nvar lastIndexOf = require('../internals/array-last-index-of');\n\n// `Array.prototype.lastIndexOf` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof\n$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {\n lastIndexOf: lastIndexOf\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });\n\n// `Array.prototype.reduce` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduceRight = require('../internals/array-reduce').right;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduceRight');\n// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method\nvar USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });\n\n// `Array.prototype.reduceRight` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {\n reduceRight: function reduceRight(callbackfn /* , initialValue */) {\n return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\n\nvar nativeReverse = [].reverse;\nvar test = [1, 2];\n\n// `Array.prototype.reverse` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n reverse: function reverse() {\n // eslint-disable-next-line no-self-assign\n if (isArray(this)) this.length = this.length;\n return nativeReverse.call(this);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $some = require('../internals/array-iteration').some;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('some');\n\n// `Array.prototype.some` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","var setSpecies = require('../internals/set-species');\n\n// `Array[@@species]` getter\n// https://tc39.github.io/ecma262/#sec-get-array-@@species\nsetSpecies('Array');\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\naddToUnscopables('flat');\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\naddToUnscopables('flatMap');\n","var $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\nvar fromCharCode = String.fromCharCode;\nvar nativeFromCodePoint = String.fromCodePoint;\n\n// length should be 1, old FF problem\nvar INCORRECT_LENGTH = !!nativeFromCodePoint && nativeFromCodePoint.length != 1;\n\n// `String.fromCodePoint` method\n// https://tc39.github.io/ecma262/#sec-string.fromcodepoint\n$({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {\n fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars\n var elements = [];\n var length = arguments.length;\n var i = 0;\n var code;\n while (length > i) {\n code = +arguments[i++];\n if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point');\n elements.push(code < 0x10000\n ? fromCharCode(code)\n : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00)\n );\n } return elements.join('');\n }\n});\n","var $ = require('../internals/export');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `String.raw` method\n// https://tc39.github.io/ecma262/#sec-string.raw\n$({ target: 'String', stat: true }, {\n raw: function raw(template) {\n var rawTemplate = toIndexedObject(template.raw);\n var literalSegments = toLength(rawTemplate.length);\n var argumentsLength = arguments.length;\n var elements = [];\n var i = 0;\n while (literalSegments > i) {\n elements.push(String(rawTemplate[i++]));\n if (i < argumentsLength) elements.push(String(arguments[i]));\n } return elements.join('');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar codeAt = require('../internals/string-multibyte').codeAt;\n\n// `String.prototype.codePointAt` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n$({ target: 'String', proto: true }, {\n codePointAt: function codePointAt(pos) {\n return codeAt(this, pos);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\nvar nativeEndsWith = ''.endsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.endsWith` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.endswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = String(requireObjectCoercible(this));\n notARegExp(searchString);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = toLength(that.length);\n var end = endPosition === undefined ? len : min(toLength(endPosition), len);\n var search = String(searchString);\n return nativeEndsWith\n ? nativeEndsWith.call(that, search, end)\n : that.slice(end - search.length, end) === search;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toLength = require('../internals/to-length');\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar classof = require('../internals/classof-raw');\nvar isRegExp = require('../internals/is-regexp');\nvar getRegExpFlags = require('../internals/regexp-flags');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar InternalStateModule = require('../internals/internal-state');\nvar IS_PURE = require('../internals/is-pure');\n\nvar MATCH_ALL = wellKnownSymbol('matchAll');\nvar REGEXP_STRING = 'RegExp String';\nvar REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR);\nvar RegExpPrototype = RegExp.prototype;\nvar regExpBuiltinExec = RegExpPrototype.exec;\nvar nativeMatchAll = ''.matchAll;\n\nvar WORKS_WITH_NON_GLOBAL_REGEX = !!nativeMatchAll && !fails(function () {\n 'a'.matchAll(/./);\n});\n\nvar regExpExec = function (R, S) {\n var exec = R.exec;\n var result;\n if (typeof exec == 'function') {\n result = exec.call(R, S);\n if (typeof result != 'object') throw TypeError('Incorrect exec result');\n return result;\n } return regExpBuiltinExec.call(R, S);\n};\n\n// eslint-disable-next-line max-len\nvar $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, global, fullUnicode) {\n setInternalState(this, {\n type: REGEXP_STRING_ITERATOR,\n regexp: regexp,\n string: string,\n global: global,\n unicode: fullUnicode,\n done: false\n });\n}, REGEXP_STRING, function next() {\n var state = getInternalState(this);\n if (state.done) return { value: undefined, done: true };\n var R = state.regexp;\n var S = state.string;\n var match = regExpExec(R, S);\n if (match === null) return { value: undefined, done: state.done = true };\n if (state.global) {\n if (String(match[0]) == '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode);\n return { value: match, done: false };\n }\n state.done = true;\n return { value: match, done: false };\n});\n\nvar $matchAll = function (string) {\n var R = anObject(this);\n var S = String(string);\n var C, flagsValue, flags, matcher, global, fullUnicode;\n C = speciesConstructor(R, RegExp);\n flagsValue = R.flags;\n if (flagsValue === undefined && R instanceof RegExp && !('flags' in RegExpPrototype)) {\n flagsValue = getRegExpFlags.call(R);\n }\n flags = flagsValue === undefined ? '' : String(flagsValue);\n matcher = new C(C === RegExp ? R.source : R, flags);\n global = !!~flags.indexOf('g');\n fullUnicode = !!~flags.indexOf('u');\n matcher.lastIndex = toLength(R.lastIndex);\n return new $RegExpStringIterator(matcher, S, global, fullUnicode);\n};\n\n// `String.prototype.matchAll` method\n// https://github.com/tc39/proposal-string-matchall\n$({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, {\n matchAll: function matchAll(regexp) {\n var O = requireObjectCoercible(this);\n var flags, S, matcher, rx;\n if (regexp != null) {\n if (isRegExp(regexp)) {\n flags = String(requireObjectCoercible('flags' in RegExpPrototype\n ? regexp.flags\n : getRegExpFlags.call(regexp)\n ));\n if (!~flags.indexOf('g')) throw TypeError('`.matchAll` does not allow non-global regexes');\n }\n if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll.apply(O, arguments);\n matcher = regexp[MATCH_ALL];\n if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll;\n if (matcher != null) return aFunction(matcher).call(regexp, O);\n } else if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll.apply(O, arguments);\n S = String(O);\n rx = new RegExp(regexp, 'g');\n return IS_PURE ? $matchAll.call(rx, S) : rx[MATCH_ALL](S);\n }\n});\n\nIS_PURE || MATCH_ALL in RegExpPrototype || createNonEnumerableProperty(RegExpPrototype, MATCH_ALL, $matchAll);\n","'use strict';\nvar $ = require('../internals/export');\nvar $padEnd = require('../internals/string-pad').end;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padEnd` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.padend\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padEnd: function padEnd(maxLength /* , fillString = ' ' */) {\n return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $padStart = require('../internals/string-pad').start;\nvar WEBKIT_BUG = require('../internals/string-pad-webkit-bug');\n\n// `String.prototype.padStart` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.padstart\n$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var $ = require('../internals/export');\nvar repeat = require('../internals/string-repeat');\n\n// `String.prototype.repeat` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.repeat\n$({ target: 'String', proto: true }, {\n repeat: repeat\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\nvar nativeStartsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = String(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return nativeStartsWith\n ? nativeStartsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $trimStart = require('../internals/string-trim').start;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\nvar FORCED = forcedStringTrimMethod('trimStart');\n\nvar trimStart = FORCED ? function trimStart() {\n return $trimStart(this);\n} : ''.trimStart;\n\n// `String.prototype.{ trimStart, trimLeft }` methods\n// https://github.com/tc39/ecmascript-string-left-right-trim\n$({ target: 'String', proto: true, forced: FORCED }, {\n trimStart: trimStart,\n trimLeft: trimStart\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $trimEnd = require('../internals/string-trim').end;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\nvar FORCED = forcedStringTrimMethod('trimEnd');\n\nvar trimEnd = FORCED ? function trimEnd() {\n return $trimEnd(this);\n} : ''.trimEnd;\n\n// `String.prototype.{ trimEnd, trimRight }` methods\n// https://github.com/tc39/ecmascript-string-left-right-trim\n$({ target: 'String', proto: true, forced: FORCED }, {\n trimEnd: trimEnd,\n trimRight: trimEnd\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.anchor` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.anchor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {\n anchor: function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.big` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.big\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, {\n big: function big() {\n return createHTML(this, 'big', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.blink` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.blink\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, {\n blink: function blink() {\n return createHTML(this, 'blink', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.bold` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.bold\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, {\n bold: function bold() {\n return createHTML(this, 'b', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fixed` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.fixed\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {\n fixed: function fixed() {\n return createHTML(this, 'tt', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fontcolor` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') }, {\n fontcolor: function fontcolor(color) {\n return createHTML(this, 'font', 'color', color);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fontsize` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.fontsize\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, {\n fontsize: function fontsize(size) {\n return createHTML(this, 'font', 'size', size);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.italics` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.italics\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, {\n italics: function italics() {\n return createHTML(this, 'i', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.strike` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.strike\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {\n strike: function strike() {\n return createHTML(this, 'strike', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.sub` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.sub\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {\n sub: function sub() {\n return createHTML(this, 'sub', '', '');\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.sup` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.sup\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, {\n sup: function sup() {\n return createHTML(this, 'sup', '', '');\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar setInternalState = require('../internals/internal-state').set;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.github.io/ecma262/#sec-regexp-constructor\nif (FORCED) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n var sticky;\n\n if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {\n return pattern;\n }\n\n if (CORRECT_NEW) {\n if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;\n } else if (pattern instanceof RegExpWrapper) {\n if (flagsAreUndefined) flags = getFlags.call(pattern);\n pattern = pattern.source;\n }\n\n if (UNSUPPORTED_Y) {\n sticky = !!flags && flags.indexOf('y') > -1;\n if (sticky) flags = flags.replace(/y/g, '');\n }\n\n var result = inheritIfRequired(\n CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),\n thisIsRegExp ? this : RegExpPrototype,\n RegExpWrapper\n );\n\n if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });\n\n return result;\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys = getOwnPropertyNames(NativeRegExp);\n var index = 0;\n while (keys.length > index) proxy(keys[index++]);\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.github.io/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectDefinePropertyModule = require('../internals/object-define-property');\nvar regExpFlags = require('../internals/regexp-flags');\nvar UNSUPPORTED_Y = require('../internals/regexp-sticky-helpers').UNSUPPORTED_Y;\n\n// `RegExp.prototype.flags` getter\n// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags\nif (DESCRIPTORS && (/./g.flags != 'g' || UNSUPPORTED_Y)) {\n objectDefinePropertyModule.f(RegExp.prototype, 'flags', {\n configurable: true,\n get: regExpFlags\n });\n}\n","var DESCRIPTORS = require('../internals/descriptors');\nvar UNSUPPORTED_Y = require('../internals/regexp-sticky-helpers').UNSUPPORTED_Y;\nvar defineProperty = require('../internals/object-define-property').f;\nvar getInternalState = require('../internals/internal-state').get;\nvar RegExpPrototype = RegExp.prototype;\n\n// `RegExp.prototype.sticky` getter\nif (DESCRIPTORS && UNSUPPORTED_Y) {\n defineProperty(RegExp.prototype, 'sticky', {\n configurable: true,\n get: function () {\n if (this === RegExpPrototype) return undefined;\n // We can't use InternalStateModule.getterFor because\n // we don't add metadata for regexps created by a literal.\n if (this instanceof RegExp) {\n return !!getInternalState(this).sticky;\n }\n throw TypeError('Incompatible receiver, RegExp required');\n }\n });\n}\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\n\nvar DELEGATES_TO_EXEC = function () {\n var execCalled = false;\n var re = /[ac]/;\n re.exec = function () {\n execCalled = true;\n return /./.exec.apply(this, arguments);\n };\n return re.test('abc') === true && execCalled;\n}();\n\nvar nativeTest = /./.test;\n\n$({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {\n test: function (str) {\n if (typeof this.exec !== 'function') {\n return nativeTest.call(this, str);\n }\n var result = this.exec(str);\n if (result !== null && !isObject(result)) {\n throw new Error('RegExp exec method returned something other than an Object or null');\n }\n return !!result;\n }\n});\n","var $ = require('../internals/export');\nvar parseIntImplementation = require('../internals/number-parse-int');\n\n// `parseInt` method\n// https://tc39.github.io/ecma262/#sec-parseint-string-radix\n$({ global: true, forced: parseInt != parseIntImplementation }, {\n parseInt: parseIntImplementation\n});\n","var $ = require('../internals/export');\nvar parseFloatImplementation = require('../internals/number-parse-float');\n\n// `parseFloat` method\n// https://tc39.github.io/ecma262/#sec-parsefloat-string\n$({ global: true, forced: parseFloat != parseFloatImplementation }, {\n parseFloat: parseFloatImplementation\n});\n","var $ = require('../internals/export');\n\n// `Number.EPSILON` constant\n// https://tc39.github.io/ecma262/#sec-number.epsilon\n$({ target: 'Number', stat: true }, {\n EPSILON: Math.pow(2, -52)\n});\n","var $ = require('../internals/export');\nvar numberIsFinite = require('../internals/number-is-finite');\n\n// `Number.isFinite` method\n// https://tc39.github.io/ecma262/#sec-number.isfinite\n$({ target: 'Number', stat: true }, { isFinite: numberIsFinite });\n","var global = require('../internals/global');\n\nvar globalIsFinite = global.isFinite;\n\n// `Number.isFinite` method\n// https://tc39.github.io/ecma262/#sec-number.isfinite\nmodule.exports = Number.isFinite || function isFinite(it) {\n return typeof it == 'number' && globalIsFinite(it);\n};\n","var $ = require('../internals/export');\nvar isInteger = require('../internals/is-integer');\n\n// `Number.isInteger` method\n// https://tc39.github.io/ecma262/#sec-number.isinteger\n$({ target: 'Number', stat: true }, {\n isInteger: isInteger\n});\n","var $ = require('../internals/export');\n\n// `Number.isNaN` method\n// https://tc39.github.io/ecma262/#sec-number.isnan\n$({ target: 'Number', stat: true }, {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare\n return number != number;\n }\n});\n","var $ = require('../internals/export');\nvar isInteger = require('../internals/is-integer');\n\nvar abs = Math.abs;\n\n// `Number.isSafeInteger` method\n// https://tc39.github.io/ecma262/#sec-number.issafeinteger\n$({ target: 'Number', stat: true }, {\n isSafeInteger: function isSafeInteger(number) {\n return isInteger(number) && abs(number) <= 0x1FFFFFFFFFFFFF;\n }\n});\n","var $ = require('../internals/export');\n\n// `Number.MAX_SAFE_INTEGER` constant\n// https://tc39.github.io/ecma262/#sec-number.max_safe_integer\n$({ target: 'Number', stat: true }, {\n MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF\n});\n","var $ = require('../internals/export');\n\n// `Number.MIN_SAFE_INTEGER` constant\n// https://tc39.github.io/ecma262/#sec-number.min_safe_integer\n$({ target: 'Number', stat: true }, {\n MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF\n});\n","var $ = require('../internals/export');\nvar parseFloat = require('../internals/number-parse-float');\n\n// `Number.parseFloat` method\n// https://tc39.github.io/ecma262/#sec-number.parseFloat\n$({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, {\n parseFloat: parseFloat\n});\n","var $ = require('../internals/export');\nvar parseInt = require('../internals/number-parse-int');\n\n// `Number.parseInt` method\n// https://tc39.github.io/ecma262/#sec-number.parseint\n$({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {\n parseInt: parseInt\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar thisNumberValue = require('../internals/this-number-value');\n\nvar nativeToPrecision = 1.0.toPrecision;\n\nvar FORCED = fails(function () {\n // IE7-\n return nativeToPrecision.call(1, undefined) !== '1';\n}) || !fails(function () {\n // V8 ~ Android 4.3-\n nativeToPrecision.call({});\n});\n\n// `Number.prototype.toPrecision` method\n// https://tc39.github.io/ecma262/#sec-number.prototype.toprecision\n$({ target: 'Number', proto: true, forced: FORCED }, {\n toPrecision: function toPrecision(precision) {\n return precision === undefined\n ? nativeToPrecision.call(thisNumberValue(this))\n : nativeToPrecision.call(thisNumberValue(this), precision);\n }\n});\n","var $ = require('../internals/export');\nvar log1p = require('../internals/math-log1p');\n\nvar nativeAcosh = Math.acosh;\nvar log = Math.log;\nvar sqrt = Math.sqrt;\nvar LN2 = Math.LN2;\n\nvar FORCED = !nativeAcosh\n // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509\n || Math.floor(nativeAcosh(Number.MAX_VALUE)) != 710\n // Tor Browser bug: Math.acosh(Infinity) -> NaN\n || nativeAcosh(Infinity) != Infinity;\n\n// `Math.acosh` method\n// https://tc39.github.io/ecma262/#sec-math.acosh\n$({ target: 'Math', stat: true, forced: FORCED }, {\n acosh: function acosh(x) {\n return (x = +x) < 1 ? NaN : x > 94906265.62425156\n ? log(x) + LN2\n : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));\n }\n});\n","var $ = require('../internals/export');\n\nvar nativeAsinh = Math.asinh;\nvar log = Math.log;\nvar sqrt = Math.sqrt;\n\nfunction asinh(x) {\n return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1));\n}\n\n// `Math.asinh` method\n// https://tc39.github.io/ecma262/#sec-math.asinh\n// Tor Browser bug: Math.asinh(0) -> -0\n$({ target: 'Math', stat: true, forced: !(nativeAsinh && 1 / nativeAsinh(0) > 0) }, {\n asinh: asinh\n});\n","var $ = require('../internals/export');\n\nvar nativeAtanh = Math.atanh;\nvar log = Math.log;\n\n// `Math.atanh` method\n// https://tc39.github.io/ecma262/#sec-math.atanh\n// Tor Browser bug: Math.atanh(-0) -> 0\n$({ target: 'Math', stat: true, forced: !(nativeAtanh && 1 / nativeAtanh(-0) < 0) }, {\n atanh: function atanh(x) {\n return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2;\n }\n});\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\nvar abs = Math.abs;\nvar pow = Math.pow;\n\n// `Math.cbrt` method\n// https://tc39.github.io/ecma262/#sec-math.cbrt\n$({ target: 'Math', stat: true }, {\n cbrt: function cbrt(x) {\n return sign(x = +x) * pow(abs(x), 1 / 3);\n }\n});\n","var $ = require('../internals/export');\n\nvar floor = Math.floor;\nvar log = Math.log;\nvar LOG2E = Math.LOG2E;\n\n// `Math.clz32` method\n// https://tc39.github.io/ecma262/#sec-math.clz32\n$({ target: 'Math', stat: true }, {\n clz32: function clz32(x) {\n return (x >>>= 0) ? 31 - floor(log(x + 0.5) * LOG2E) : 32;\n }\n});\n","var $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\nvar nativeCosh = Math.cosh;\nvar abs = Math.abs;\nvar E = Math.E;\n\n// `Math.cosh` method\n// https://tc39.github.io/ecma262/#sec-math.cosh\n$({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) === Infinity }, {\n cosh: function cosh(x) {\n var t = expm1(abs(x) - 1) + 1;\n return (t + 1 / (t * E * E)) * (E / 2);\n }\n});\n","var $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\n// `Math.expm1` method\n// https://tc39.github.io/ecma262/#sec-math.expm1\n$({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 });\n","var $ = require('../internals/export');\nvar fround = require('../internals/math-fround');\n\n// `Math.fround` method\n// https://tc39.github.io/ecma262/#sec-math.fround\n$({ target: 'Math', stat: true }, { fround: fround });\n","var sign = require('../internals/math-sign');\n\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar EPSILON = pow(2, -52);\nvar EPSILON32 = pow(2, -23);\nvar MAX32 = pow(2, 127) * (2 - EPSILON32);\nvar MIN32 = pow(2, -126);\n\nvar roundTiesToEven = function (n) {\n return n + 1 / EPSILON - 1 / EPSILON;\n};\n\n// `Math.fround` method implementation\n// https://tc39.github.io/ecma262/#sec-math.fround\nmodule.exports = Math.fround || function fround(x) {\n var $abs = abs(x);\n var $sign = sign(x);\n var a, result;\n if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;\n a = (1 + EPSILON32 / EPSILON) * $abs;\n result = a - (a - $abs);\n // eslint-disable-next-line no-self-compare\n if (result > MAX32 || result != result) return $sign * Infinity;\n return $sign * result;\n};\n","var $ = require('../internals/export');\n\nvar $hypot = Math.hypot;\nvar abs = Math.abs;\nvar sqrt = Math.sqrt;\n\n// Chrome 77 bug\n// https://bugs.chromium.org/p/v8/issues/detail?id=9546\nvar BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity;\n\n// `Math.hypot` method\n// https://tc39.github.io/ecma262/#sec-math.hypot\n$({ target: 'Math', stat: true, forced: BUGGY }, {\n hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars\n var sum = 0;\n var i = 0;\n var aLen = arguments.length;\n var larg = 0;\n var arg, div;\n while (i < aLen) {\n arg = abs(arguments[i++]);\n if (larg < arg) {\n div = larg / arg;\n sum = sum * div * div + 1;\n larg = arg;\n } else if (arg > 0) {\n div = arg / larg;\n sum += div * div;\n } else sum += arg;\n }\n return larg === Infinity ? Infinity : larg * sqrt(sum);\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\n\nvar nativeImul = Math.imul;\n\nvar FORCED = fails(function () {\n return nativeImul(0xFFFFFFFF, 5) != -5 || nativeImul.length != 2;\n});\n\n// `Math.imul` method\n// https://tc39.github.io/ecma262/#sec-math.imul\n// some WebKit versions fails with big numbers, some has wrong arity\n$({ target: 'Math', stat: true, forced: FORCED }, {\n imul: function imul(x, y) {\n var UINT16 = 0xFFFF;\n var xn = +x;\n var yn = +y;\n var xl = UINT16 & xn;\n var yl = UINT16 & yn;\n return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);\n }\n});\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LOG10E = Math.LOG10E;\n\n// `Math.log10` method\n// https://tc39.github.io/ecma262/#sec-math.log10\n$({ target: 'Math', stat: true }, {\n log10: function log10(x) {\n return log(x) * LOG10E;\n }\n});\n","var $ = require('../internals/export');\nvar log1p = require('../internals/math-log1p');\n\n// `Math.log1p` method\n// https://tc39.github.io/ecma262/#sec-math.log1p\n$({ target: 'Math', stat: true }, { log1p: log1p });\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\n// `Math.log2` method\n// https://tc39.github.io/ecma262/#sec-math.log2\n$({ target: 'Math', stat: true }, {\n log2: function log2(x) {\n return log(x) / LN2;\n }\n});\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.github.io/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n sign: sign\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar expm1 = require('../internals/math-expm1');\n\nvar abs = Math.abs;\nvar exp = Math.exp;\nvar E = Math.E;\n\nvar FORCED = fails(function () {\n return Math.sinh(-2e-17) != -2e-17;\n});\n\n// `Math.sinh` method\n// https://tc39.github.io/ecma262/#sec-math.sinh\n// V8 near Chromium 38 has a problem with very small numbers\n$({ target: 'Math', stat: true, forced: FORCED }, {\n sinh: function sinh(x) {\n return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2);\n }\n});\n","var $ = require('../internals/export');\nvar expm1 = require('../internals/math-expm1');\n\nvar exp = Math.exp;\n\n// `Math.tanh` method\n// https://tc39.github.io/ecma262/#sec-math.tanh\n$({ target: 'Math', stat: true }, {\n tanh: function tanh(x) {\n var a = expm1(x = +x);\n var b = expm1(-x);\n return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));\n }\n});\n","var setToStringTag = require('../internals/set-to-string-tag');\n\n// Math[@@toStringTag] property\n// https://tc39.github.io/ecma262/#sec-math-@@tostringtag\nsetToStringTag(Math, 'Math', true);\n","var $ = require('../internals/export');\n\nvar ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.github.io/ecma262/#sec-math.trunc\n$({ target: 'Math', stat: true }, {\n trunc: function trunc(it) {\n return (it > 0 ? floor : ceil)(it);\n }\n});\n","var $ = require('../internals/export');\n\n// `Date.now` method\n// https://tc39.github.io/ecma262/#sec-date.now\n$({ target: 'Date', stat: true }, {\n now: function now() {\n return new Date().getTime();\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar FORCED = fails(function () {\n return new Date(NaN).toJSON() !== null\n || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;\n});\n\n// `Date.prototype.toJSON` method\n// https://tc39.github.io/ecma262/#sec-date.prototype.tojson\n$({ target: 'Date', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars\n toJSON: function toJSON(key) {\n var O = toObject(this);\n var pv = toPrimitive(O);\n return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();\n }\n});\n","var $ = require('../internals/export');\nvar toISOString = require('../internals/date-to-iso-string');\n\n// `Date.prototype.toISOString` method\n// https://tc39.github.io/ecma262/#sec-date.prototype.toisostring\n// PhantomJS / old WebKit has a broken implementations\n$({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== toISOString }, {\n toISOString: toISOString\n});\n","'use strict';\nvar fails = require('../internals/fails');\nvar padStart = require('../internals/string-pad').start;\n\nvar abs = Math.abs;\nvar DatePrototype = Date.prototype;\nvar getTime = DatePrototype.getTime;\nvar nativeDateToISOString = DatePrototype.toISOString;\n\n// `Date.prototype.toISOString` method implementation\n// https://tc39.github.io/ecma262/#sec-date.prototype.toisostring\n// PhantomJS / old WebKit fails here:\nmodule.exports = (fails(function () {\n return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n nativeDateToISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');\n var date = this;\n var year = date.getUTCFullYear();\n var milliseconds = date.getUTCMilliseconds();\n var sign = year < 0 ? '-' : year > 9999 ? '+' : '';\n return sign + padStart(abs(year), sign ? 6 : 4, 0) +\n '-' + padStart(date.getUTCMonth() + 1, 2, 0) +\n '-' + padStart(date.getUTCDate(), 2, 0) +\n 'T' + padStart(date.getUTCHours(), 2, 0) +\n ':' + padStart(date.getUTCMinutes(), 2, 0) +\n ':' + padStart(date.getUTCSeconds(), 2, 0) +\n '.' + padStart(milliseconds, 3, 0) +\n 'Z';\n} : nativeDateToISOString;\n","var redefine = require('../internals/redefine');\n\nvar DatePrototype = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar nativeDateToString = DatePrototype[TO_STRING];\nvar getTime = DatePrototype.getTime;\n\n// `Date.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-date.prototype.tostring\nif (new Date(NaN) + '' != INVALID_DATE) {\n redefine(DatePrototype, TO_STRING, function toString() {\n var value = getTime.call(this);\n // eslint-disable-next-line no-self-compare\n return value === value ? nativeDateToString.call(this) : INVALID_DATE;\n });\n}\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar fails = require('../internals/fails');\n\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar re = /[\\uD800-\\uDFFF]/g;\nvar low = /^[\\uD800-\\uDBFF]$/;\nvar hi = /^[\\uDC00-\\uDFFF]$/;\n\nvar fix = function (match, offset, string) {\n var prev = string.charAt(offset - 1);\n var next = string.charAt(offset + 1);\n if ((low.test(match) && !hi.test(next)) || (hi.test(match) && !low.test(prev))) {\n return '\\\\u' + match.charCodeAt(0).toString(16);\n } return match;\n};\n\nvar FORCED = fails(function () {\n return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nif ($stringify) {\n // https://github.com/tc39/proposal-well-formed-stringify\n $({ target: 'JSON', stat: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars\n stringify: function stringify(it, replacer, space) {\n var result = $stringify.apply(null, arguments);\n return typeof result == 'string' ? result.replace(re, fix) : result;\n }\n });\n}\n","var global = require('../internals/global');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// JSON[@@toStringTag] property\n// https://tc39.github.io/ecma262/#sec-json-@@tostringtag\nsetToStringTag(global.JSON, 'JSON', true);\n","'use strict';\nvar $ = require('../internals/export');\nvar aFunction = require('../internals/a-function');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\n\n// `Promise.allSettled` method\n// https://github.com/tc39/proposal-promise-allSettled\n$({ target: 'Promise', stat: true }, {\n allSettled: function allSettled(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'fulfilled', value: value };\n --remaining || resolve(values);\n }, function (e) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'rejected', reason: e };\n --remaining || resolve(values);\n });\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar redefine = require('../internals/redefine');\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.github.io/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// patch native Promise.prototype for native async functions\nif (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype['finally']) {\n redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']);\n}\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.github.io/ecma262/#sec-map-objects\nmodule.exports = collection('Map', function (init) {\n return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.github.io/ecma262/#sec-set-objects\nmodule.exports = collection('Set', function (init) {\n return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","'use strict';\nvar global = require('../internals/global');\nvar redefineAll = require('../internals/redefine-all');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\nvar isObject = require('../internals/is-object');\nvar enforceIternalState = require('../internals/internal-state').enforce;\nvar NATIVE_WEAK_MAP = require('../internals/native-weak-map');\n\nvar IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;\nvar isExtensible = Object.isExtensible;\nvar InternalWeakMap;\n\nvar wrapper = function (init) {\n return function WeakMap() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n};\n\n// `WeakMap` constructor\n// https://tc39.github.io/ecma262/#sec-weakmap-constructor\nvar $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak);\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP && IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n InternalMetadataModule.REQUIRED = true;\n var WeakMapPrototype = $WeakMap.prototype;\n var nativeDelete = WeakMapPrototype['delete'];\n var nativeHas = WeakMapPrototype.has;\n var nativeGet = WeakMapPrototype.get;\n var nativeSet = WeakMapPrototype.set;\n redefineAll(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete.call(this, key) || state.frozen['delete'](key);\n } return nativeDelete.call(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas.call(this, key) || state.frozen.has(key);\n } return nativeHas.call(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);\n } return nativeGet.call(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);\n } else nativeSet.call(this, key, value);\n return this;\n }\n });\n}\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\n\n// `WeakSet` constructor\n// https://tc39.github.io/ecma262/#sec-weakset-constructor\ncollection('WeakSet', function (init) {\n return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionWeak);\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar arrayBufferModule = require('../internals/array-buffer');\nvar setSpecies = require('../internals/set-species');\n\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\n\n// `ArrayBuffer` constructor\n// https://tc39.github.io/ecma262/#sec-arraybuffer-constructor\n$({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, {\n ArrayBuffer: ArrayBuffer\n});\n\nsetSpecies(ARRAY_BUFFER);\n","// IEEE754 conversions based on https://github.com/feross/ieee754\n// eslint-disable-next-line no-shadow-restricted-names\nvar Infinity = 1 / 0;\nvar abs = Math.abs;\nvar pow = Math.pow;\nvar floor = Math.floor;\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nvar pack = function (number, mantissaLength, bytes) {\n var buffer = new Array(bytes);\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;\n var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;\n var index = 0;\n var exponent, mantissa, c;\n number = abs(number);\n // eslint-disable-next-line no-self-compare\n if (number != number || number === Infinity) {\n // eslint-disable-next-line no-self-compare\n mantissa = number != number ? 1 : 0;\n exponent = eMax;\n } else {\n exponent = floor(log(number) / LN2);\n if (number * (c = pow(2, -exponent)) < 1) {\n exponent--;\n c *= 2;\n }\n if (exponent + eBias >= 1) {\n number += rt / c;\n } else {\n number += rt * pow(2, 1 - eBias);\n }\n if (number * c >= 2) {\n exponent++;\n c /= 2;\n }\n if (exponent + eBias >= eMax) {\n mantissa = 0;\n exponent = eMax;\n } else if (exponent + eBias >= 1) {\n mantissa = (number * c - 1) * pow(2, mantissaLength);\n exponent = exponent + eBias;\n } else {\n mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);\n exponent = 0;\n }\n }\n for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);\n exponent = exponent << mantissaLength | mantissa;\n exponentLength += mantissaLength;\n for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);\n buffer[--index] |= sign * 128;\n return buffer;\n};\n\nvar unpack = function (buffer, mantissaLength) {\n var bytes = buffer.length;\n var exponentLength = bytes * 8 - mantissaLength - 1;\n var eMax = (1 << exponentLength) - 1;\n var eBias = eMax >> 1;\n var nBits = exponentLength - 7;\n var index = bytes - 1;\n var sign = buffer[index--];\n var exponent = sign & 127;\n var mantissa;\n sign >>= 7;\n for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);\n mantissa = exponent & (1 << -nBits) - 1;\n exponent >>= -nBits;\n nBits += mantissaLength;\n for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);\n if (exponent === 0) {\n exponent = 1 - eBias;\n } else if (exponent === eMax) {\n return mantissa ? NaN : sign ? -Infinity : Infinity;\n } else {\n mantissa = mantissa + pow(2, mantissaLength);\n exponent = exponent - eBias;\n } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);\n};\n\nmodule.exports = {\n pack: pack,\n unpack: unpack\n};\n","var $ = require('../internals/export');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;\n\n// `ArrayBuffer.isView` method\n// https://tc39.github.io/ecma262/#sec-arraybuffer.isview\n$({ target: 'ArrayBuffer', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {\n isView: ArrayBufferViewCore.isView\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar anObject = require('../internals/an-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar nativeArrayBufferSlice = ArrayBuffer.prototype.slice;\n\nvar INCORRECT_SLICE = fails(function () {\n return !new ArrayBuffer(2).slice(1, undefined).byteLength;\n});\n\n// `ArrayBuffer.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-arraybuffer.prototype.slice\n$({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {\n slice: function slice(start, end) {\n if (nativeArrayBufferSlice !== undefined && end === undefined) {\n return nativeArrayBufferSlice.call(anObject(this), start); // FF fix\n }\n var length = anObject(this).byteLength;\n var first = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n var result = new (speciesConstructor(this, ArrayBuffer))(toLength(fin - first));\n var viewSource = new DataView(this);\n var viewTarget = new DataView(result);\n var index = 0;\n while (first < fin) {\n viewTarget.setUint8(index++, viewSource.getUint8(first++));\n } return result;\n }\n});\n","var $ = require('../internals/export');\nvar ArrayBufferModule = require('../internals/array-buffer');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\n\n// `DataView` constructor\n// https://tc39.github.io/ecma262/#sec-dataview-constructor\n$({ global: true, forced: !NATIVE_ARRAY_BUFFER }, {\n DataView: ArrayBufferModule.DataView\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int8Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int8', function (init) {\n return function Int8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var toInteger = require('../internals/to-integer');\n\nmodule.exports = function (it) {\n var result = toInteger(it);\n if (result < 0) throw RangeError(\"The argument can't be less than 0\");\n return result;\n};\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint8ClampedArray` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint8', function (init) {\n return function Uint8ClampedArray(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n}, true);\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int16Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int16', function (init) {\n return function Int16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint16Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint16', function (init) {\n return function Uint16Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Int32Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Int32', function (init) {\n return function Int32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Uint32Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Uint32', function (init) {\n return function Uint32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Float32Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Float32', function (init) {\n return function Float32Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","var createTypedArrayConstructor = require('../internals/typed-array-constructor');\n\n// `Float64Array` constructor\n// https://tc39.github.io/ecma262/#sec-typedarray-objects\ncreateTypedArrayConstructor('Float64', function (init) {\n return function Float64Array(data, byteOffset, length) {\n return init(this, data, byteOffset, length);\n };\n});\n","'use strict';\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\nvar exportTypedArrayStaticMethod = require('../internals/array-buffer-view-core').exportTypedArrayStaticMethod;\nvar typedArrayFrom = require('../internals/typed-array-from');\n\n// `%TypedArray%.from` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.from\nexportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = require('../internals/typed-array-constructors-require-wrappers');\n\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayStaticMethod = ArrayBufferViewCore.exportTypedArrayStaticMethod;\n\n// `%TypedArray%.of` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.of\nexportTypedArrayStaticMethod('of', function of(/* ...items */) {\n var index = 0;\n var length = arguments.length;\n var result = new (aTypedArrayConstructor(this))(length);\n while (length > index) result[index] = arguments[index++];\n return result;\n}, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $copyWithin = require('../internals/array-copy-within');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.copyWithin` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.copywithin\nexportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {\n return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $every = require('../internals/array-iteration').every;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.every` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every\nexportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {\n return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $fill = require('../internals/array-fill');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.fill\n// eslint-disable-next-line no-unused-vars\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n return $fill.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $filter = require('../internals/array-iteration').filter;\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.filter` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter\nexportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {\n var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n var C = speciesConstructor(this, this.constructor);\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $find = require('../internals/array-iteration').find;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.find` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find\nexportTypedArrayMethod('find', function find(predicate /* , thisArg */) {\n return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $findIndex = require('../internals/array-iteration').findIndex;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.findIndex` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findindex\nexportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {\n return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.forEach` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.foreach\nexportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {\n $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $includes = require('../internals/array-includes').includes;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.includes\nexportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {\n return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $indexOf = require('../internals/array-includes').indexOf;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.indexOf` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.indexof\nexportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {\n return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar ArrayIterators = require('../modules/es.array.iterator');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar Uint8Array = global.Uint8Array;\nvar arrayValues = ArrayIterators.values;\nvar arrayKeys = ArrayIterators.keys;\nvar arrayEntries = ArrayIterators.entries;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];\n\nvar CORRECT_ITER_NAME = !!nativeTypedArrayIterator\n && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);\n\nvar typedArrayValues = function values() {\n return arrayValues.call(aTypedArray(this));\n};\n\n// `%TypedArray%.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.entries\nexportTypedArrayMethod('entries', function entries() {\n return arrayEntries.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.keys\nexportTypedArrayMethod('keys', function keys() {\n return arrayKeys.call(aTypedArray(this));\n});\n// `%TypedArray%.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.values\nexportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);\n// `%TypedArray%.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype-@@iterator\nexportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $join = [].join;\n\n// `%TypedArray%.prototype.join` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join\n// eslint-disable-next-line no-unused-vars\nexportTypedArrayMethod('join', function join(separator) {\n return $join.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $lastIndexOf = require('../internals/array-last-index-of');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.lastIndexOf` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.lastindexof\n// eslint-disable-next-line no-unused-vars\nexportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {\n return $lastIndexOf.apply(aTypedArray(this), arguments);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $map = require('../internals/array-iteration').map;\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.map` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.map\nexportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {\n return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {\n return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);\n });\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduce = require('../internals/array-reduce').left;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduce` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce\nexportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {\n return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $reduceRight = require('../internals/array-reduce').right;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.reduceRicht` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright\nexportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {\n return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar floor = Math.floor;\n\n// `%TypedArray%.prototype.reverse` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reverse\nexportTypedArrayMethod('reverse', function reverse() {\n var that = this;\n var length = aTypedArray(that).length;\n var middle = floor(length / 2);\n var index = 0;\n var value;\n while (index < middle) {\n value = that[index];\n that[index++] = that[--length];\n that[length] = value;\n } return that;\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toOffset = require('../internals/to-offset');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line no-undef\n new Int8Array(1).set({});\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var length = this.length;\n var src = toObject(arrayLike);\n var len = toLength(src.length);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar speciesConstructor = require('../internals/species-constructor');\nvar fails = require('../internals/fails');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $slice = [].slice;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line no-undef\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = $slice.call(aTypedArray(this), start, end);\n var C = speciesConstructor(this, this.constructor);\n var index = 0;\n var length = list.length;\n var result = new (aTypedArrayConstructor(C))(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar $some = require('../internals/array-iteration').some;\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.some` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some\nexportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {\n return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $sort = [].sort;\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n return $sort.call(aTypedArray(this), comparefn);\n});\n","'use strict';\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar speciesConstructor = require('../internals/species-constructor');\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\n// `%TypedArray%.prototype.subarray` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.subarray\nexportTypedArrayMethod('subarray', function subarray(begin, end) {\n var O = aTypedArray(this);\n var length = O.length;\n var beginIndex = toAbsoluteIndex(begin, length);\n return new (speciesConstructor(O, O.constructor))(\n O.buffer,\n O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,\n toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)\n );\n});\n","'use strict';\nvar global = require('../internals/global');\nvar ArrayBufferViewCore = require('../internals/array-buffer-view-core');\nvar fails = require('../internals/fails');\n\nvar Int8Array = global.Int8Array;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar $toLocaleString = [].toLocaleString;\nvar $slice = [].slice;\n\n// iOS Safari 6.x fails here\nvar TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {\n $toLocaleString.call(new Int8Array(1));\n});\n\nvar FORCED = fails(function () {\n return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();\n}) || !fails(function () {\n Int8Array.prototype.toLocaleString.call([1, 2]);\n});\n\n// `%TypedArray%.prototype.toLocaleString` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring\nexportTypedArrayMethod('toLocaleString', function toLocaleString() {\n return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);\n}, FORCED);\n","'use strict';\nvar exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;\nvar fails = require('../internals/fails');\nvar global = require('../internals/global');\n\nvar Uint8Array = global.Uint8Array;\nvar Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};\nvar arrayToString = [].toString;\nvar arrayJoin = [].join;\n\nif (fails(function () { arrayToString.call({}); })) {\n arrayToString = function toString() {\n return arrayJoin.call(this);\n };\n}\n\nvar IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;\n\n// `%TypedArray%.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tostring\nexportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\n\nvar nativeApply = getBuiltIn('Reflect', 'apply');\nvar functionApply = Function.apply;\n\n// MS Edge argumentsList argument is optional\nvar OPTIONAL_ARGUMENTS_LIST = !fails(function () {\n nativeApply(function () { /* empty */ });\n});\n\n// `Reflect.apply` method\n// https://tc39.github.io/ecma262/#sec-reflect.apply\n$({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {\n apply: function apply(target, thisArgument, argumentsList) {\n aFunction(target);\n anObject(argumentsList);\n return nativeApply\n ? nativeApply(target, thisArgument, argumentsList)\n : functionApply.call(target, thisArgument, argumentsList);\n }\n});\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar bind = require('../internals/function-bind');\nvar fails = require('../internals/fails');\n\nvar nativeConstruct = getBuiltIn('Reflect', 'construct');\n\n// `Reflect.construct` method\n// https://tc39.github.io/ecma262/#sec-reflect.construct\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n nativeConstruct(function () { /* empty */ });\n});\nvar FORCED = NEW_TARGET_BUG || ARGS_BUG;\n\n$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {\n construct: function construct(Target, args /* , newTarget */) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar fails = require('../internals/fails');\n\n// MS Edge has broken Reflect.defineProperty - throwing instead of returning false\nvar ERROR_INSTEAD_OF_FALSE = fails(function () {\n // eslint-disable-next-line no-undef\n Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });\n});\n\n// `Reflect.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-reflect.defineproperty\n$({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {\n defineProperty: function defineProperty(target, propertyKey, attributes) {\n anObject(target);\n var key = toPrimitive(propertyKey, true);\n anObject(attributes);\n try {\n definePropertyModule.f(target, key, attributes);\n return true;\n } catch (error) {\n return false;\n }\n }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\n\n// `Reflect.deleteProperty` method\n// https://tc39.github.io/ecma262/#sec-reflect.deleteproperty\n$({ target: 'Reflect', stat: true }, {\n deleteProperty: function deleteProperty(target, propertyKey) {\n var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);\n return descriptor && !descriptor.configurable ? false : delete target[propertyKey];\n }\n});\n","var $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar has = require('../internals/has');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\n// `Reflect.get` method\n// https://tc39.github.io/ecma262/#sec-reflect.get\nfunction get(target, propertyKey /* , receiver */) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var descriptor, prototype;\n if (anObject(target) === receiver) return target[propertyKey];\n if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value')\n ? descriptor.value\n : descriptor.get === undefined\n ? undefined\n : descriptor.get.call(receiver);\n if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);\n}\n\n$({ target: 'Reflect', stat: true }, {\n get: get\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar anObject = require('../internals/an-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\n\n// `Reflect.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-reflect.getownpropertydescriptor\n$({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {\n return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);\n }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar objectGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\n// `Reflect.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-reflect.getprototypeof\n$({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(target) {\n return objectGetPrototypeOf(anObject(target));\n }\n});\n","var $ = require('../internals/export');\n\n// `Reflect.has` method\n// https://tc39.github.io/ecma262/#sec-reflect.has\n$({ target: 'Reflect', stat: true }, {\n has: function has(target, propertyKey) {\n return propertyKey in target;\n }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\n\nvar objectIsExtensible = Object.isExtensible;\n\n// `Reflect.isExtensible` method\n// https://tc39.github.io/ecma262/#sec-reflect.isextensible\n$({ target: 'Reflect', stat: true }, {\n isExtensible: function isExtensible(target) {\n anObject(target);\n return objectIsExtensible ? objectIsExtensible(target) : true;\n }\n});\n","var $ = require('../internals/export');\nvar ownKeys = require('../internals/own-keys');\n\n// `Reflect.ownKeys` method\n// https://tc39.github.io/ecma262/#sec-reflect.ownkeys\n$({ target: 'Reflect', stat: true }, {\n ownKeys: ownKeys\n});\n","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar FREEZING = require('../internals/freezing');\n\n// `Reflect.preventExtensions` method\n// https://tc39.github.io/ecma262/#sec-reflect.preventextensions\n$({ target: 'Reflect', stat: true, sham: !FREEZING }, {\n preventExtensions: function preventExtensions(target) {\n anObject(target);\n try {\n var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');\n if (objectPreventExtensions) objectPreventExtensions(target);\n return true;\n } catch (error) {\n return false;\n }\n }\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar fails = require('../internals/fails');\nvar definePropertyModule = require('../internals/object-define-property');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\n// `Reflect.set` method\n// https://tc39.github.io/ecma262/#sec-reflect.set\nfunction set(target, propertyKey, V /* , receiver */) {\n var receiver = arguments.length < 4 ? target : arguments[3];\n var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);\n var existingDescriptor, prototype;\n if (!ownDescriptor) {\n if (isObject(prototype = getPrototypeOf(target))) {\n return set(prototype, propertyKey, V, receiver);\n }\n ownDescriptor = createPropertyDescriptor(0);\n }\n if (has(ownDescriptor, 'value')) {\n if (ownDescriptor.writable === false || !isObject(receiver)) return false;\n if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {\n if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;\n existingDescriptor.value = V;\n definePropertyModule.f(receiver, propertyKey, existingDescriptor);\n } else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));\n return true;\n }\n return ownDescriptor.set === undefined ? false : (ownDescriptor.set.call(receiver, V), true);\n}\n\n// MS Edge 17-18 Reflect.set allows setting the property to object\n// with non-writable property on the prototype\nvar MS_EDGE_BUG = fails(function () {\n var object = definePropertyModule.f({}, 'a', { configurable: true });\n // eslint-disable-next-line no-undef\n return Reflect.set(getPrototypeOf(object), 'a', 1, object) !== false;\n});\n\n$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {\n set: set\n});\n","var $ = require('../internals/export');\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\nvar objectSetPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Reflect.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-reflect.setprototypeof\nif (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, {\n setPrototypeOf: function setPrototypeOf(target, proto) {\n anObject(target);\n aPossiblePrototype(proto);\n try {\n objectSetPrototypeOf(target, proto);\n return true;\n } catch (error) {\n return false;\n }\n }\n});\n","require('../modules/web.dom-collections.for-each');\nrequire('../modules/web.dom-collections.iterator');\nrequire('../modules/web.immediate');\nrequire('../modules/web.queue-microtask');\nrequire('../modules/web.timers');\nrequire('../modules/web.url');\nrequire('../modules/web.url.to-json');\nrequire('../modules/web.url-search-params');\nvar path = require('../internals/path');\n\nmodule.exports = path;\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar task = require('../internals/task');\n\nvar FORCED = !global.setImmediate || !global.clearImmediate;\n\n// http://w3c.github.io/setImmediate/\n$({ global: true, bind: true, enumerable: true, forced: FORCED }, {\n // `setImmediate` method\n // http://w3c.github.io/setImmediate/#si-setImmediate\n setImmediate: task.set,\n // `clearImmediate` method\n // http://w3c.github.io/setImmediate/#si-clearImmediate\n clearImmediate: task.clear\n});\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar microtask = require('../internals/microtask');\nvar classof = require('../internals/classof-raw');\n\nvar process = global.process;\nvar isNode = classof(process) == 'process';\n\n// `queueMicrotask` method\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask\n$({ global: true, enumerable: true, noTargetGet: true }, {\n queueMicrotask: function queueMicrotask(fn) {\n var domain = isNode && process.domain;\n microtask(domain ? domain.bind(fn) : fn);\n }\n});\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar slice = [].slice;\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\n\nvar wrap = function (scheduler) {\n return function (handler, timeout /* , ...arguments */) {\n var boundArgs = arguments.length > 2;\n var args = boundArgs ? slice.call(arguments, 2) : undefined;\n return scheduler(boundArgs ? function () {\n // eslint-disable-next-line no-new-func\n (typeof handler == 'function' ? handler : Function(handler)).apply(this, args);\n } : handler, timeout);\n };\n};\n\n// ie9- setTimeout & setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n$({ global: true, bind: true, forced: MSIE }, {\n // `setTimeout` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n setTimeout: wrap(global.setTimeout),\n // `setInterval` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n setInterval: wrap(global.setInterval)\n});\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar Direction;\n\n(function (Direction) {\n Direction[\"Right\"] = \"to right\";\n Direction[\"Left\"] = \"to left\";\n Direction[\"Down\"] = \"to bottom\";\n Direction[\"Up\"] = \"to top\";\n})(Direction = exports.Direction || (exports.Direction = {}));","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n/* Font Face Observer v2.1.0 - © Bram Stein. License: BSD-3-Clause */\n(function () {\n function l(a, b) {\n document.addEventListener ? a.addEventListener(\"scroll\", b, !1) : a.attachEvent(\"scroll\", b);\n }\n\n function m(a) {\n document.body ? a() : document.addEventListener ? document.addEventListener(\"DOMContentLoaded\", function c() {\n document.removeEventListener(\"DOMContentLoaded\", c);\n a();\n }) : document.attachEvent(\"onreadystatechange\", function k() {\n if (\"interactive\" == document.readyState || \"complete\" == document.readyState) document.detachEvent(\"onreadystatechange\", k), a();\n });\n }\n\n ;\n\n function t(a) {\n this.a = document.createElement(\"div\");\n this.a.setAttribute(\"aria-hidden\", \"true\");\n this.a.appendChild(document.createTextNode(a));\n this.b = document.createElement(\"span\");\n this.c = document.createElement(\"span\");\n this.h = document.createElement(\"span\");\n this.f = document.createElement(\"span\");\n this.g = -1;\n this.b.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n this.c.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n this.f.style.cssText = \"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\n this.h.style.cssText = \"display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;\";\n this.b.appendChild(this.h);\n this.c.appendChild(this.f);\n this.a.appendChild(this.b);\n this.a.appendChild(this.c);\n }\n\n function u(a, b) {\n a.a.style.cssText = \"max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:\" + b + \";\";\n }\n\n function z(a) {\n var b = a.a.offsetWidth,\n c = b + 100;\n a.f.style.width = c + \"px\";\n a.c.scrollLeft = c;\n a.b.scrollLeft = a.b.scrollWidth + 100;\n return a.g !== b ? (a.g = b, !0) : !1;\n }\n\n function A(a, b) {\n function c() {\n var a = k;\n z(a) && a.a.parentNode && b(a.g);\n }\n\n var k = a;\n l(a.b, c);\n l(a.c, c);\n z(a);\n }\n\n ;\n\n function B(a, b) {\n var c = b || {};\n this.family = a;\n this.style = c.style || \"normal\";\n this.weight = c.weight || \"normal\";\n this.stretch = c.stretch || \"normal\";\n }\n\n var C = null,\n D = null,\n E = null,\n F = null;\n\n function G() {\n if (null === D) if (J() && /Apple/.test(window.navigator.vendor)) {\n var a = /AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(window.navigator.userAgent);\n D = !!a && 603 > parseInt(a[1], 10);\n } else D = !1;\n return D;\n }\n\n function J() {\n null === F && (F = !!document.fonts);\n return F;\n }\n\n function K() {\n if (null === E) {\n var a = document.createElement(\"div\");\n\n try {\n a.style.font = \"condensed 100px sans-serif\";\n } catch (b) {}\n\n E = \"\" !== a.style.font;\n }\n\n return E;\n }\n\n function L(a, b) {\n return [a.style, a.weight, K() ? a.stretch : \"\", \"100px\", b].join(\" \");\n }\n\n B.prototype.load = function (a, b) {\n var c = this,\n k = a || \"BESbswy\",\n r = 0,\n n = b || 3E3,\n H = new Date().getTime();\n return new Promise(function (a, b) {\n if (J() && !G()) {\n var M = new Promise(function (a, b) {\n function e() {\n new Date().getTime() - H >= n ? b(Error(\"\" + n + \"ms timeout exceeded\")) : document.fonts.load(L(c, '\"' + c.family + '\"'), k).then(function (c) {\n 1 <= c.length ? a() : setTimeout(e, 25);\n }, b);\n }\n\n e();\n }),\n N = new Promise(function (a, c) {\n r = setTimeout(function () {\n c(Error(\"\" + n + \"ms timeout exceeded\"));\n }, n);\n });\n Promise.race([N, M]).then(function () {\n clearTimeout(r);\n a(c);\n }, b);\n } else m(function () {\n function v() {\n var b;\n if (b = -1 != f && -1 != g || -1 != f && -1 != h || -1 != g && -1 != h) (b = f != g && f != h && g != h) || (null === C && (b = /AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent), C = !!b && (536 > parseInt(b[1], 10) || 536 === parseInt(b[1], 10) && 11 >= parseInt(b[2], 10))), b = C && (f == w && g == w && h == w || f == x && g == x && h == x || f == y && g == y && h == y)), b = !b;\n b && (d.parentNode && d.parentNode.removeChild(d), clearTimeout(r), a(c));\n }\n\n function I() {\n if (new Date().getTime() - H >= n) d.parentNode && d.parentNode.removeChild(d), b(Error(\"\" + n + \"ms timeout exceeded\"));else {\n var a = document.hidden;\n if (!0 === a || void 0 === a) f = e.a.offsetWidth, g = p.a.offsetWidth, h = q.a.offsetWidth, v();\n r = setTimeout(I, 50);\n }\n }\n\n var e = new t(k),\n p = new t(k),\n q = new t(k),\n f = -1,\n g = -1,\n h = -1,\n w = -1,\n x = -1,\n y = -1,\n d = document.createElement(\"div\");\n d.dir = \"ltr\";\n u(e, L(c, \"sans-serif\"));\n u(p, L(c, \"serif\"));\n u(q, L(c, \"monospace\"));\n d.appendChild(e.a);\n d.appendChild(p.a);\n d.appendChild(q.a);\n document.body.appendChild(d);\n w = e.a.offsetWidth;\n x = p.a.offsetWidth;\n y = q.a.offsetWidth;\n I();\n A(e, function (a) {\n f = a;\n v();\n });\n u(e, L(c, '\"' + c.family + '\",sans-serif'));\n A(p, function (a) {\n g = a;\n v();\n });\n u(p, L(c, '\"' + c.family + '\",serif'));\n A(q, function (a) {\n h = a;\n v();\n });\n u(q, L(c, '\"' + c.family + '\",monospace'));\n });\n });\n };\n\n \"object\" === (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) ? module.exports = B : (window.FontFaceObserver = B, window.FontFaceObserver.prototype.load = B.prototype.load);\n})();","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n/* build: `node build.js modules=text,itext,textbox,serialization,interaction,animation,gestures,shadow,object_straightening no-svg-export minifier=uglifyjs` */\n\n/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */\nvar fabric = fabric || {\n version: '3.6.3'\n};\n\nif (typeof exports !== 'undefined') {\n exports.fabric = fabric;\n}\n/* _AMD_START_ */\nelse if (typeof define === 'function' && define.amd) {\n define([], function () {\n return fabric;\n });\n}\n/* _AMD_END_ */\n\n\nif (typeof document !== 'undefined' && typeof window !== 'undefined') {\n if (document instanceof (typeof HTMLDocument !== 'undefined' ? HTMLDocument : Document)) {\n fabric.document = document;\n } else {\n fabric.document = document.implementation.createHTMLDocument('');\n }\n\n fabric.window = window;\n} else {\n // assume we're running under node.js when document/window are not present\n var jsdom = require('jsdom');\n\n var virtualWindow = new jsdom.JSDOM(decodeURIComponent('%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E'), {\n features: {\n FetchExternalResources: ['img']\n },\n resources: 'usable'\n }).window;\n fabric.document = virtualWindow.document;\n fabric.jsdomImplForWrapper = require('jsdom/lib/jsdom/living/generated/utils').implForWrapper;\n fabric.nodeCanvas = require('jsdom/lib/jsdom/utils').Canvas;\n fabric.window = virtualWindow;\n DOMParser = fabric.window.DOMParser;\n}\n/**\n * True when in environment that supports touch events\n * @type boolean\n */\n\n\nfabric.isTouchSupported = 'ontouchstart' in fabric.window || 'ontouchstart' in fabric.document || fabric.window && fabric.window.navigator && fabric.window.navigator.maxTouchPoints > 0;\n/**\n * True when in environment that's probably Node.js\n * @type boolean\n */\n\nfabric.isLikelyNode = typeof Buffer !== 'undefined' && typeof window === 'undefined';\n/**\n * Pixel per Inch as a default value set to 96. Can be changed for more realistic conversion.\n */\n\nfabric.DPI = 96;\nfabric.reNum = '(?:[-+]?(?:\\\\d+|\\\\d*\\\\.\\\\d+)(?:[eE][-+]?\\\\d+)?)';\nfabric.rePathCommand = /([-+]?((\\d+\\.\\d+)|((\\d+)|(\\.\\d+)))(?:[eE][-+]?\\d+)?)/ig;\nfabric.reNonWord = /[ \\n\\.,;!\\?\\-]/;\nfabric.fontPaths = {};\nfabric.iMatrix = [1, 0, 0, 1, 0, 0];\nfabric.svgNS = 'http://www.w3.org/2000/svg';\n/**\n * Pixel limit for cache canvases. 1Mpx , 4Mpx should be fine.\n * @since 1.7.14\n * @type Number\n * @default\n */\n\nfabric.perfLimitSizeTotal = 2097152;\n/**\n * Pixel limit for cache canvases width or height. IE fixes the maximum at 5000\n * @since 1.7.14\n * @type Number\n * @default\n */\n\nfabric.maxCacheSideLimit = 4096;\n/**\n * Lowest pixel limit for cache canvases, set at 256PX\n * @since 1.7.14\n * @type Number\n * @default\n */\n\nfabric.minCacheSideLimit = 256;\n/**\n * Cache Object for widths of chars in text rendering.\n */\n\nfabric.charWidthsCache = {};\n/**\n * if webgl is enabled and available, textureSize will determine the size\n * of the canvas backend\n * @since 2.0.0\n * @type Number\n * @default\n */\n\nfabric.textureSize = 2048;\n/**\n * When 'true', style information is not retained when copy/pasting text, making\n * pasted text use destination style.\n * Defaults to 'false'.\n * @type Boolean\n * @default\n */\n\nfabric.disableStyleCopyPaste = false;\n/**\n * Enable webgl for filtering picture is available\n * A filtering backend will be initialized, this will both take memory and\n * time since a default 2048x2048 canvas will be created for the gl context\n * @since 2.0.0\n * @type Boolean\n * @default\n */\n\nfabric.enableGLFiltering = true;\n/**\n * Device Pixel Ratio\n * @see https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/HTML-canvas-guide/SettingUptheCanvas/SettingUptheCanvas.html\n */\n\nfabric.devicePixelRatio = fabric.window.devicePixelRatio || fabric.window.webkitDevicePixelRatio || fabric.window.mozDevicePixelRatio || 1;\n/**\n * Browser-specific constant to adjust CanvasRenderingContext2D.shadowBlur value,\n * which is unitless and not rendered equally across browsers.\n *\n * Values that work quite well (as of October 2017) are:\n * - Chrome: 1.5\n * - Edge: 1.75\n * - Firefox: 0.9\n * - Safari: 0.95\n *\n * @since 2.0.0\n * @type Number\n * @default 1\n */\n\nfabric.browserShadowBlurConstant = 1;\n/**\n * This object contains the result of arc to beizer conversion for faster retrieving if the same arc needs to be converted again.\n * It was an internal variable, is accessible since version 2.3.4\n */\n\nfabric.arcToSegmentsCache = {};\n/**\n * This object keeps the results of the boundsOfCurve calculation mapped by the joined arguments necessary to calculate it.\n * It does speed up calculation, if you parse and add always the same paths, but in case of heavy usage of freedrawing\n * you do not get any speed benefit and you get a big object in memory.\n * The object was a private variable before, while now is appended to the lib so that you have access to it and you\n * can eventually clear it.\n * It was an internal variable, is accessible since version 2.3.4\n */\n\nfabric.boundsOfCurveCache = {};\n/**\n * If disabled boundsOfCurveCache is not used. For apps that make heavy usage of pencil drawing probably disabling it is better\n * @default true\n */\n\nfabric.cachesBoundsOfCurve = true;\n/**\n * Skip performance testing of setupGLContext and force the use of putImageData that seems to be the one that works best on\n * Chrome + old hardware. if your users are experiencing empty images after filtering you may try to force this to true\n * this has to be set before instantiating the filtering backend ( before filtering the first image )\n * @type Boolean\n * @default false\n */\n\nfabric.forceGLPutImageData = false;\n\nfabric.initFilterBackend = function () {\n if (fabric.enableGLFiltering && fabric.isWebglSupported && fabric.isWebglSupported(fabric.textureSize)) {\n console.log('max texture size: ' + fabric.maxTextureSize);\n return new fabric.WebglFilterBackend({\n tileSize: fabric.textureSize\n });\n } else if (fabric.Canvas2dFilterBackend) {\n return new fabric.Canvas2dFilterBackend();\n }\n};\n/*:\n\t----------------------------------------------------\n\tevent.js : 1.1.5 : 2014/02/12 : MIT License\n\t----------------------------------------------------\n\thttps://github.com/mudcube/Event.js\n\t----------------------------------------------------\n\t1 : click, dblclick, dbltap\n\t1+ : tap, longpress, drag, swipe\n\t2+ : pinch, rotate\n\t : mousewheel, devicemotion, shake\n\t----------------------------------------------------\n\tIdeas for the future\n\t----------------------------------------------------\n\t* GamePad, and other input abstractions.\n\t* Event batching - i.e. for every x fingers down a new gesture is created.\n\t----------------------------------------------------\n\thttp://www.w3.org/TR/2011/WD-touch-events-20110505/\n\t----------------------------------------------------\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\n\n(function (root) {\n \"use strict\"; // Add custom *EventListener commands to HTMLElements (set false to prevent funkiness).\n\n root.modifyEventListener = false; // Add bulk *EventListener commands on NodeLists from querySelectorAll and others (set false to prevent funkiness).\n\n root.modifySelectors = false;\n\n root.configure = function (conf) {\n if (isFinite(conf.modifyEventListener)) root.modifyEventListener = conf.modifyEventListener;\n if (isFinite(conf.modifySelectors)) root.modifySelectors = conf.modifySelectors; /// Augment event listeners\n\n if (eventListenersAgumented === false && root.modifyEventListener) {\n augmentEventListeners();\n }\n\n if (selectorsAugmented === false && root.modifySelectors) {\n augmentSelectors();\n }\n }; // Event maintenance.\n\n\n root.add = function (target, type, listener, configure) {\n return eventManager(target, type, listener, configure, \"add\");\n };\n\n root.remove = function (target, type, listener, configure) {\n return eventManager(target, type, listener, configure, \"remove\");\n };\n\n root.returnFalse = function (event) {\n return false;\n };\n\n root.stop = function (event) {\n if (!event) return;\n if (event.stopPropagation) event.stopPropagation();\n event.cancelBubble = true; // <= IE8\n\n event.cancelBubbleCount = 0;\n };\n\n root.prevent = function (event) {\n if (!event) return;\n\n if (event.preventDefault) {\n event.preventDefault();\n } else if (event.preventManipulation) {\n event.preventManipulation(); // MS\n } else {\n event.returnValue = false; // <= IE8\n }\n };\n\n root.cancel = function (event) {\n root.stop(event);\n root.prevent(event);\n };\n\n root.blur = function () {\n // Blurs the focused element. Useful when using eventjs.cancel as canceling will prevent focused elements from being blurred.\n var node = document.activeElement;\n if (!node) return;\n var nodeName = document.activeElement.nodeName;\n\n if (nodeName === \"INPUT\" || nodeName === \"TEXTAREA\" || node.contentEditable === \"true\") {\n if (node.blur) node.blur();\n }\n }; // Check whether event is natively supported (via @kangax)\n\n\n root.getEventSupport = function (target, type) {\n if (typeof target === \"string\") {\n type = target;\n target = window;\n }\n\n type = \"on\" + type;\n if (type in target) return true;\n if (!target.setAttribute) target = document.createElement(\"div\");\n\n if (target.setAttribute && target.removeAttribute) {\n target.setAttribute(type, \"\");\n var isSupported = typeof target[type] === \"function\";\n if (typeof target[type] !== \"undefined\") target[type] = null;\n target.removeAttribute(type);\n return isSupported;\n }\n };\n\n var clone = function clone(obj) {\n if (!obj || _typeof(obj) !== 'object') return obj;\n var temp = new obj.constructor();\n\n for (var key in obj) {\n if (!obj[key] || _typeof(obj[key]) !== 'object') {\n temp[key] = obj[key];\n } else {\n // clone sub-object\n temp[key] = clone(obj[key]);\n }\n }\n\n return temp;\n }; /// Handle custom *EventListener commands.\n\n\n var eventManager = function eventManager(target, type, listener, configure, trigger, fromOverwrite) {\n configure = configure || {}; // Check whether target is a configuration variable;\n\n if (String(target) === \"[object Object]\") {\n var data = target;\n target = data.target;\n delete data.target; ///\n\n if (data.type && data.listener) {\n type = data.type;\n delete data.type;\n listener = data.listener;\n delete data.listener;\n\n for (var key in data) {\n configure[key] = data[key];\n }\n } else {\n // specialness\n for (var param in data) {\n var value = data[param];\n if (typeof value === \"function\") continue;\n configure[param] = value;\n } ///\n\n\n var ret = {};\n\n for (var key in data) {\n var param = key.split(\",\");\n var o = data[key];\n var conf = {};\n\n for (var k in configure) {\n // clone base configuration\n conf[k] = configure[k];\n } ///\n\n\n if (typeof o === \"function\") {\n // without configuration\n var listener = o;\n } else if (typeof o.listener === \"function\") {\n // with configuration\n var listener = o.listener;\n\n for (var k in o) {\n // merge configure into base configuration\n if (typeof o[k] === \"function\") continue;\n conf[k] = o[k];\n }\n } else {\n // not a listener\n continue;\n } ///\n\n\n for (var n = 0; n < param.length; n++) {\n ret[key] = eventjs.add(target, param[n], listener, conf, trigger);\n }\n }\n\n return ret;\n }\n } ///\n\n\n if (!target || !type || !listener) return; // Check for element to load on interval (before onload).\n\n if (typeof target === \"string\" && type === \"ready\") {\n if (window.eventjs_stallOnReady) {\n /// force stall for scripts to load\n type = \"load\";\n target = window;\n } else {\n //\n var time = new Date().getTime();\n var timeout = configure.timeout;\n var ms = configure.interval || 1000 / 60;\n var interval = window.setInterval(function () {\n if (new Date().getTime() - time > timeout) {\n window.clearInterval(interval);\n }\n\n if (document.querySelector(target)) {\n window.clearInterval(interval);\n setTimeout(listener, 1);\n }\n }, ms);\n return;\n }\n } // Get DOM element from Query Selector.\n\n\n if (typeof target === \"string\") {\n target = document.querySelectorAll(target);\n if (target.length === 0) return createError(\"Missing target on listener!\", arguments); // No results.\n\n if (target.length === 1) {\n // Single target.\n target = target[0];\n }\n } /// Handle multiple targets.\n\n\n var event;\n var events = {};\n\n if (target.length > 0 && target !== window) {\n for (var n0 = 0, length0 = target.length; n0 < length0; n0++) {\n event = eventManager(target[n0], type, listener, clone(configure), trigger);\n if (event) events[n0] = event;\n }\n\n return createBatchCommands(events);\n } /// Check for multiple events in one string.\n\n\n if (typeof type === \"string\") {\n type = type.toLowerCase();\n\n if (type.indexOf(\" \") !== -1) {\n type = type.split(\" \");\n } else if (type.indexOf(\",\") !== -1) {\n type = type.split(\",\");\n }\n } /// Attach or remove multiple events associated with a target.\n\n\n if (typeof type !== \"string\") {\n // Has multiple events.\n if (typeof type.length === \"number\") {\n // Handle multiple listeners glued together.\n for (var n1 = 0, length1 = type.length; n1 < length1; n1++) {\n // Array [type]\n event = eventManager(target, type[n1], listener, clone(configure), trigger);\n if (event) events[type[n1]] = event;\n }\n } else {\n // Handle multiple listeners.\n for (var key in type) {\n // Object {type}\n if (typeof type[key] === \"function\") {\n // without configuration.\n event = eventManager(target, key, type[key], clone(configure), trigger);\n } else {\n // with configuration.\n event = eventManager(target, key, type[key].listener, clone(type[key]), trigger);\n }\n\n if (event) events[key] = event;\n }\n }\n\n return createBatchCommands(events);\n } else if (type.indexOf(\"on\") === 0) {\n // to support things like \"onclick\" instead of \"click\"\n type = type.substr(2);\n } // Ensure listener is a function.\n\n\n if (_typeof(target) !== \"object\") return createError(\"Target is not defined!\", arguments);\n if (typeof listener !== \"function\") return createError(\"Listener is not a function!\", arguments); // Generate a unique wrapper identifier.\n\n var useCapture = configure.useCapture || false;\n var id = getID(target) + \".\" + getID(listener) + \".\" + (useCapture ? 1 : 0); // Handle the event.\n\n if (root.Gesture && root.Gesture._gestureHandlers[type]) {\n // Fire custom event.\n id = type + id;\n\n if (trigger === \"remove\") {\n // Remove event listener.\n if (!wrappers[id]) return; // Already removed.\n\n wrappers[id].remove();\n delete wrappers[id];\n } else if (trigger === \"add\") {\n // Attach event listener.\n if (wrappers[id]) {\n wrappers[id].add();\n return wrappers[id]; // Already attached.\n } // Retains \"this\" orientation.\n\n\n if (configure.useCall && !root.modifyEventListener) {\n var tmp = listener;\n\n listener = function listener(event, self) {\n for (var key in self) {\n event[key] = self[key];\n }\n\n return tmp.call(target, event);\n };\n } // Create listener proxy.\n\n\n configure.gesture = type;\n configure.target = target;\n configure.listener = listener;\n configure.fromOverwrite = fromOverwrite; // Record wrapper.\n\n wrappers[id] = root.proxy[type](configure);\n }\n\n return wrappers[id];\n } else {\n // Fire native event.\n var eventList = getEventList(type);\n\n for (var n = 0, eventId; n < eventList.length; n++) {\n type = eventList[n];\n eventId = type + \".\" + id;\n\n if (trigger === \"remove\") {\n // Remove event listener.\n if (!wrappers[eventId]) continue; // Already removed.\n\n target[remove](type, listener, useCapture);\n delete wrappers[eventId];\n } else if (trigger === \"add\") {\n // Attach event listener.\n if (wrappers[eventId]) return wrappers[eventId]; // Already attached.\n\n target[add](type, listener, useCapture); // Record wrapper.\n\n wrappers[eventId] = {\n id: eventId,\n type: type,\n target: target,\n listener: listener,\n remove: function remove() {\n for (var n = 0; n < eventList.length; n++) {\n root.remove(target, eventList[n], listener, configure);\n }\n }\n };\n }\n }\n\n return wrappers[eventId];\n }\n }; /// Perform batch actions on multiple events.\n\n\n var createBatchCommands = function createBatchCommands(events) {\n return {\n remove: function remove() {\n // Remove multiple events.\n for (var key in events) {\n events[key].remove();\n }\n },\n add: function add() {\n // Add multiple events.\n for (var key in events) {\n events[key].add();\n }\n }\n };\n }; /// Display error message in console.\n\n\n var createError = function createError(message, data) {\n if (typeof console === \"undefined\") return;\n if (typeof console.error === \"undefined\") return;\n console.error(message, data);\n }; /// Handle naming discrepancies between platforms.\n\n\n var pointerDefs = {\n \"msPointer\": [\"MSPointerDown\", \"MSPointerMove\", \"MSPointerUp\"],\n \"touch\": [\"touchstart\", \"touchmove\", \"touchend\"],\n \"mouse\": [\"mousedown\", \"mousemove\", \"mouseup\"]\n };\n var pointerDetect = {\n // MSPointer\n \"MSPointerDown\": 0,\n \"MSPointerMove\": 1,\n \"MSPointerUp\": 2,\n // Touch\n \"touchstart\": 0,\n \"touchmove\": 1,\n \"touchend\": 2,\n // Mouse\n \"mousedown\": 0,\n \"mousemove\": 1,\n \"mouseup\": 2\n };\n\n var getEventSupport = function () {\n root.supports = {};\n\n if (window.navigator.msPointerEnabled) {\n root.supports.msPointer = true;\n }\n\n if (root.getEventSupport(\"touchstart\")) {\n root.supports.touch = true;\n }\n\n if (root.getEventSupport(\"mousedown\")) {\n root.supports.mouse = true;\n }\n }();\n\n var getEventList = function () {\n return function (type) {\n var prefix = document.addEventListener ? \"\" : \"on\"; // IE\n\n var idx = pointerDetect[type];\n\n if (isFinite(idx)) {\n var types = [];\n\n for (var key in root.supports) {\n types.push(prefix + pointerDefs[key][idx]);\n }\n\n return types;\n } else {\n return [prefix + type];\n }\n };\n }(); /// Event wrappers to keep track of all events placed in the window.\n\n\n var wrappers = {};\n var counter = 0;\n\n var getID = function getID(object) {\n if (object === window) return \"#window\";\n if (object === document) return \"#document\";\n if (!object.uniqueID) object.uniqueID = \"e\" + counter++;\n return object.uniqueID;\n }; /// Detect platforms native *EventListener command.\n\n\n var add = document.addEventListener ? \"addEventListener\" : \"attachEvent\";\n var remove = document.removeEventListener ? \"removeEventListener\" : \"detachEvent\";\n /*\n \tPointer.js\n \t----------------------------------------\n \tModified from; https://github.com/borismus/pointer.js\n */\n\n root.createPointerEvent = function (event, self, preventRecord) {\n var eventName = self.gesture;\n var target = self.target;\n var pts = event.changedTouches || root.proxy.getCoords(event);\n\n if (pts.length) {\n var pt = pts[0];\n self.pointers = preventRecord ? [] : pts;\n self.pageX = pt.pageX;\n self.pageY = pt.pageY;\n self.x = self.pageX;\n self.y = self.pageY;\n } ///\n\n\n var newEvent = document.createEvent(\"Event\");\n newEvent.initEvent(eventName, true, true);\n newEvent.originalEvent = event;\n\n for (var k in self) {\n if (k === \"target\") continue;\n newEvent[k] = self[k];\n } ///\n\n\n var type = newEvent.type;\n\n if (root.Gesture && root.Gesture._gestureHandlers[type]) {\n // capture custom events.\n //\t\ttarget.dispatchEvent(newEvent);\n self.oldListener.call(target, newEvent, self, false);\n }\n };\n\n var eventListenersAgumented = false;\n\n var augmentEventListeners = function augmentEventListeners() {\n /// Allows *EventListener to use custom event proxies.\n if (!window.HTMLElement) return;\n\n var augmentEventListener = function augmentEventListener(proto) {\n var recall = function recall(trigger) {\n // overwrite native *EventListener's\n var handle = trigger + \"EventListener\";\n var handler = proto[handle];\n\n proto[handle] = function (type, listener, useCapture) {\n if (root.Gesture && root.Gesture._gestureHandlers[type]) {\n // capture custom events.\n var configure = useCapture;\n\n if (_typeof(useCapture) === \"object\") {\n configure.useCall = true;\n } else {\n // convert to configuration object.\n configure = {\n useCall: true,\n useCapture: useCapture\n };\n }\n\n eventManager(this, type, listener, configure, trigger, true); //\t\t\t\t\thandler.call(this, type, listener, useCapture);\n } else {\n // use native function.\n var types = getEventList(type);\n\n for (var n = 0; n < types.length; n++) {\n handler.call(this, types[n], listener, useCapture);\n }\n }\n };\n };\n\n recall(\"add\");\n recall(\"remove\");\n }; // NOTE: overwriting HTMLElement doesn't do anything in Firefox.\n\n\n if (navigator.userAgent.match(/Firefox/)) {\n // TODO: fix Firefox for the general case.\n augmentEventListener(HTMLDivElement.prototype);\n augmentEventListener(HTMLCanvasElement.prototype);\n } else {\n augmentEventListener(HTMLElement.prototype);\n }\n\n augmentEventListener(document);\n augmentEventListener(window);\n };\n\n var selectorsAugmented = false;\n\n var augmentSelectors = function augmentSelectors() {\n /// Allows querySelectorAll and other NodeLists to perform *EventListener commands in bulk.\n var proto = NodeList.prototype;\n\n proto.removeEventListener = function (type, listener, useCapture) {\n for (var n = 0, length = this.length; n < length; n++) {\n this[n].removeEventListener(type, listener, useCapture);\n }\n };\n\n proto.addEventListener = function (type, listener, useCapture) {\n for (var n = 0, length = this.length; n < length; n++) {\n this[n].addEventListener(type, listener, useCapture);\n }\n };\n };\n\n return root;\n})(eventjs);\n/*:\n\t----------------------------------------------------\n\teventjs.proxy : 0.4.2 : 2013/07/17 : MIT License\n\t----------------------------------------------------\n\thttps://github.com/mudcube/eventjs.js\n\t----------------------------------------------------\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n /*\n \tCreate a new pointer gesture instance.\n */\n\n root.pointerSetup = function (conf, self) {\n /// Configure.\n conf.target = conf.target || window;\n conf.doc = conf.target.ownerDocument || conf.target; // Associated document.\n\n conf.minFingers = conf.minFingers || conf.fingers || 1; // Minimum required fingers.\n\n conf.maxFingers = conf.maxFingers || conf.fingers || Infinity; // Maximum allowed fingers.\n\n conf.position = conf.position || \"relative\"; // Determines what coordinate system points are returned.\n\n delete conf.fingers; //-\n /// Convenience data.\n\n self = self || {};\n self.enabled = true;\n self.gesture = conf.gesture;\n self.target = conf.target;\n self.env = conf.env; ///\n\n if (eventjs.modifyEventListener && conf.fromOverwrite) {\n conf.oldListener = conf.listener;\n conf.listener = eventjs.createPointerEvent;\n } /// Convenience commands.\n\n\n var fingers = 0;\n var type = self.gesture.indexOf(\"pointer\") === 0 && eventjs.modifyEventListener ? \"pointer\" : \"mouse\";\n if (conf.oldListener) self.oldListener = conf.oldListener; ///\n\n self.listener = conf.listener;\n\n self.proxy = function (listener) {\n self.defaultListener = conf.listener;\n conf.listener = listener;\n listener(conf.event, self);\n };\n\n self.add = function () {\n if (self.enabled === true) return;\n if (conf.onPointerDown) eventjs.add(conf.target, type + \"down\", conf.onPointerDown);\n if (conf.onPointerMove) eventjs.add(conf.doc, type + \"move\", conf.onPointerMove);\n if (conf.onPointerUp) eventjs.add(conf.doc, type + \"up\", conf.onPointerUp);\n self.enabled = true;\n };\n\n self.remove = function () {\n if (self.enabled === false) return;\n if (conf.onPointerDown) eventjs.remove(conf.target, type + \"down\", conf.onPointerDown);\n if (conf.onPointerMove) eventjs.remove(conf.doc, type + \"move\", conf.onPointerMove);\n if (conf.onPointerUp) eventjs.remove(conf.doc, type + \"up\", conf.onPointerUp);\n self.reset();\n self.enabled = false;\n };\n\n self.pause = function (opt) {\n if (conf.onPointerMove && (!opt || opt.move)) eventjs.remove(conf.doc, type + \"move\", conf.onPointerMove);\n if (conf.onPointerUp && (!opt || opt.up)) eventjs.remove(conf.doc, type + \"up\", conf.onPointerUp);\n fingers = conf.fingers;\n conf.fingers = 0;\n };\n\n self.resume = function (opt) {\n if (conf.onPointerMove && (!opt || opt.move)) eventjs.add(conf.doc, type + \"move\", conf.onPointerMove);\n if (conf.onPointerUp && (!opt || opt.up)) eventjs.add(conf.doc, type + \"up\", conf.onPointerUp);\n conf.fingers = fingers;\n };\n\n self.reset = function () {\n conf.tracker = {};\n conf.fingers = 0;\n }; ///\n\n\n return self;\n };\n /*\n \tBegin proxied pointer command.\n */\n\n\n var sp = eventjs.supports; // Default pointerType\n ///\n\n eventjs.isMouse = !!sp.mouse;\n eventjs.isMSPointer = !!sp.touch;\n eventjs.isTouch = !!sp.msPointer; ///\n\n root.pointerStart = function (event, self, conf) {\n /// tracks multiple inputs\n var type = (event.type || \"mousedown\").toUpperCase();\n\n if (type.indexOf(\"MOUSE\") === 0) {\n eventjs.isMouse = true;\n eventjs.isTouch = false;\n eventjs.isMSPointer = false;\n } else if (type.indexOf(\"TOUCH\") === 0) {\n eventjs.isMouse = false;\n eventjs.isTouch = true;\n eventjs.isMSPointer = false;\n } else if (type.indexOf(\"MSPOINTER\") === 0) {\n eventjs.isMouse = false;\n eventjs.isTouch = false;\n eventjs.isMSPointer = true;\n } ///\n\n\n var addTouchStart = function addTouchStart(touch, sid) {\n var bbox = conf.bbox;\n var pt = track[sid] = {}; ///\n\n switch (conf.position) {\n case \"absolute\":\n // Absolute from within window.\n pt.offsetX = 0;\n pt.offsetY = 0;\n break;\n\n case \"differenceFromLast\":\n // Since last coordinate recorded.\n pt.offsetX = touch.pageX;\n pt.offsetY = touch.pageY;\n break;\n\n case \"difference\":\n // Relative from origin.\n pt.offsetX = touch.pageX;\n pt.offsetY = touch.pageY;\n break;\n\n case \"move\":\n // Move target element.\n pt.offsetX = touch.pageX - bbox.x1;\n pt.offsetY = touch.pageY - bbox.y1;\n break;\n\n default:\n // Relative from within target.\n pt.offsetX = bbox.x1 - bbox.scrollLeft;\n pt.offsetY = bbox.y1 - bbox.scrollTop;\n break;\n } ///\n\n\n var x = touch.pageX - pt.offsetX;\n var y = touch.pageY - pt.offsetY; ///\n\n pt.rotation = 0;\n pt.scale = 1;\n pt.startTime = pt.moveTime = new Date().getTime();\n pt.move = {\n x: x,\n y: y\n };\n pt.start = {\n x: x,\n y: y\n }; ///\n\n conf.fingers++;\n }; ///\n\n\n conf.event = event;\n\n if (self.defaultListener) {\n conf.listener = self.defaultListener;\n delete self.defaultListener;\n } ///\n\n\n var isTouchStart = !conf.fingers;\n var track = conf.tracker;\n var touches = event.changedTouches || root.getCoords(event);\n var length = touches.length; // Adding touch events to tracking.\n\n for (var i = 0; i < length; i++) {\n var touch = touches[i];\n var sid = touch.identifier || Infinity; // Touch ID.\n // Track the current state of the touches.\n\n if (conf.fingers) {\n if (conf.fingers >= conf.maxFingers) {\n var ids = [];\n\n for (var sid in conf.tracker) {\n ids.push(sid);\n }\n\n self.identifier = ids.join(\",\");\n return isTouchStart;\n }\n\n var fingers = 0; // Finger ID.\n\n for (var rid in track) {\n // Replace removed finger.\n if (track[rid].up) {\n delete track[rid];\n addTouchStart(touch, sid);\n conf.cancel = true;\n break;\n }\n\n fingers++;\n } // Add additional finger.\n\n\n if (track[sid]) continue;\n addTouchStart(touch, sid);\n } else {\n // Start tracking fingers.\n track = conf.tracker = {};\n self.bbox = conf.bbox = root.getBoundingBox(conf.target);\n conf.fingers = 0;\n conf.cancel = false;\n addTouchStart(touch, sid);\n }\n } ///\n\n\n var ids = [];\n\n for (var sid in conf.tracker) {\n ids.push(sid);\n }\n\n self.identifier = ids.join(\",\"); ///\n\n return isTouchStart;\n };\n /*\n \tEnd proxied pointer command.\n */\n\n\n root.pointerEnd = function (event, self, conf, onPointerUp) {\n // Record changed touches have ended (iOS changedTouches is not reliable).\n var touches = event.touches || [];\n var length = touches.length;\n var exists = {};\n\n for (var i = 0; i < length; i++) {\n var touch = touches[i];\n var sid = touch.identifier;\n exists[sid || Infinity] = true;\n }\n\n for (var sid in conf.tracker) {\n var track = conf.tracker[sid];\n if (exists[sid] || track.up) continue;\n\n if (onPointerUp) {\n // add changedTouches to mouse.\n onPointerUp({\n pageX: track.pageX,\n pageY: track.pageY,\n changedTouches: [{\n pageX: track.pageX,\n pageY: track.pageY,\n identifier: sid === \"Infinity\" ? Infinity : sid\n }]\n }, \"up\");\n }\n\n track.up = true;\n conf.fingers--;\n }\n /*\t// This should work but fails in Safari on iOS4 so not using it.\n \tvar touches = event.changedTouches || root.getCoords(event);\n \tvar length = touches.length;\n \t// Record changed touches have ended (this should work).\n \tfor (var i = 0; i < length; i ++) {\n \t\tvar touch = touches[i];\n \t\tvar sid = touch.identifier || Infinity;\n \t\tvar track = conf.tracker[sid];\n \t\tif (track && !track.up) {\n \t\t\tif (onPointerUp) { // add changedTouches to mouse.\n \t\t\t\tonPointerUp({\n \t\t\t\t\tchangedTouches: [{\n \t\t\t\t\t\tpageX: track.pageX,\n \t\t\t\t\t\tpageY: track.pageY,\n \t\t\t\t\t\tidentifier: sid === \"Infinity\" ? Infinity : sid\n \t\t\t\t\t}]\n \t\t\t\t}, \"up\");\n \t\t\t}\n \t\t\ttrack.up = true;\n \t\t\tconf.fingers --;\n \t\t}\n \t} */\n // Wait for all fingers to be released.\n\n\n if (conf.fingers !== 0) return false; // Record total number of fingers gesture used.\n\n var ids = [];\n conf.gestureFingers = 0;\n\n for (var sid in conf.tracker) {\n conf.gestureFingers++;\n ids.push(sid);\n }\n\n self.identifier = ids.join(\",\"); // Our pointer gesture has ended.\n\n return true;\n };\n /*\n \tReturns mouse coords in an array to match event.*Touches\n \t------------------------------------------------------------\n \tvar touch = event.changedTouches || root.getCoords(event);\n */\n\n\n root.getCoords = function (event) {\n if (typeof event.pageX !== \"undefined\") {\n // Desktop browsers.\n root.getCoords = function (event) {\n return Array({\n type: \"mouse\",\n x: event.pageX,\n y: event.pageY,\n pageX: event.pageX,\n pageY: event.pageY,\n identifier: event.pointerId || Infinity // pointerId is MS\n\n });\n };\n } else {\n // Internet Explorer <= 8.0\n root.getCoords = function (event) {\n var doc = document.documentElement;\n event = event || window.event;\n return Array({\n type: \"mouse\",\n x: event.clientX + doc.scrollLeft,\n y: event.clientY + doc.scrollTop,\n pageX: event.clientX + doc.scrollLeft,\n pageY: event.clientY + doc.scrollTop,\n identifier: Infinity\n });\n };\n }\n\n return root.getCoords(event);\n };\n /*\n \tReturns single coords in an object.\n \t------------------------------------------------------------\n \tvar mouse = root.getCoord(event);\n */\n\n\n root.getCoord = function (event) {\n if (\"ontouchstart\" in window) {\n // Mobile browsers.\n var pX = 0;\n var pY = 0;\n\n root.getCoord = function (event) {\n var touches = event.changedTouches;\n\n if (touches && touches.length) {\n // ontouchstart + ontouchmove\n return {\n x: pX = touches[0].pageX,\n y: pY = touches[0].pageY\n };\n } else {\n // ontouchend\n return {\n x: pX,\n y: pY\n };\n }\n };\n } else if (typeof event.pageX !== \"undefined\" && typeof event.pageY !== \"undefined\") {\n // Desktop browsers.\n root.getCoord = function (event) {\n return {\n x: event.pageX,\n y: event.pageY\n };\n };\n } else {\n // Internet Explorer <=8.0\n root.getCoord = function (event) {\n var doc = document.documentElement;\n event = event || window.event;\n return {\n x: event.clientX + doc.scrollLeft,\n y: event.clientY + doc.scrollTop\n };\n };\n }\n\n return root.getCoord(event);\n };\n /*\n \tGet target scale and position in space.\n */\n\n\n var getPropertyAsFloat = function getPropertyAsFloat(o, type) {\n var n = parseFloat(o.getPropertyValue(type), 10);\n return isFinite(n) ? n : 0;\n };\n\n root.getBoundingBox = function (o) {\n if (o === window || o === document) o = document.body; ///\n\n var bbox = {};\n var bcr = o.getBoundingClientRect();\n bbox.width = bcr.width;\n bbox.height = bcr.height;\n bbox.x1 = bcr.left;\n bbox.y1 = bcr.top;\n bbox.scaleX = bcr.width / o.offsetWidth || 1;\n bbox.scaleY = bcr.height / o.offsetHeight || 1;\n bbox.scrollLeft = 0;\n bbox.scrollTop = 0; ///\n\n var style = window.getComputedStyle(o);\n var borderBox = style.getPropertyValue(\"box-sizing\") === \"border-box\"; ///\n\n if (borderBox === false) {\n var left = getPropertyAsFloat(style, \"border-left-width\");\n var right = getPropertyAsFloat(style, \"border-right-width\");\n var bottom = getPropertyAsFloat(style, \"border-bottom-width\");\n var top = getPropertyAsFloat(style, \"border-top-width\");\n bbox.border = [left, right, top, bottom];\n bbox.x1 += left;\n bbox.y1 += top;\n bbox.width -= right + left;\n bbox.height -= bottom + top;\n }\n /*\tvar left = getPropertyAsFloat(style, \"padding-left\");\n \tvar right = getPropertyAsFloat(style, \"padding-right\");\n \tvar bottom = getPropertyAsFloat(style, \"padding-bottom\");\n \tvar top = getPropertyAsFloat(style, \"padding-top\");\n \tbbox.padding = [ left, right, top, bottom ];*/\n ///\n\n\n bbox.x2 = bbox.x1 + bbox.width;\n bbox.y2 = bbox.y1 + bbox.height; /// Get the scroll of container element.\n\n var position = style.getPropertyValue(\"position\");\n var tmp = position === \"fixed\" ? o : o.parentNode;\n\n while (tmp !== null) {\n if (tmp === document.body) break;\n if (tmp.scrollTop === undefined) break;\n var style = window.getComputedStyle(tmp);\n var position = style.getPropertyValue(\"position\");\n\n if (position === \"absolute\") {} else if (position === \"fixed\") {\n //\t\t\tbbox.scrollTop += document.body.scrollTop;\n //\t\t\tbbox.scrollLeft += document.body.scrollLeft;\n bbox.scrollTop -= tmp.parentNode.scrollTop;\n bbox.scrollLeft -= tmp.parentNode.scrollLeft;\n break;\n } else {\n bbox.scrollLeft += tmp.scrollLeft;\n bbox.scrollTop += tmp.scrollTop;\n } ///\n\n\n tmp = tmp.parentNode;\n }\n\n ; ///\n\n bbox.scrollBodyLeft = window.pageXOffset !== undefined ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft;\n bbox.scrollBodyTop = window.pageYOffset !== undefined ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop; ///\n\n bbox.scrollLeft -= bbox.scrollBodyLeft;\n bbox.scrollTop -= bbox.scrollBodyTop; ///\n\n return bbox;\n };\n /*\n \tKeep track of metaKey, the proper ctrlKey for users platform.\n \t----------------------------------------------------\n \thttp://www.quirksmode.org/js/keys.html\n \t-----------------------------------\n \thttp://unixpapa.com/js/key.html\n */\n\n\n (function () {\n var agent = navigator.userAgent.toLowerCase();\n var mac = agent.indexOf(\"macintosh\") !== -1;\n var metaKeys;\n\n if (mac && agent.indexOf(\"khtml\") !== -1) {\n // chrome, safari.\n metaKeys = {\n 91: true,\n 93: true\n };\n } else if (mac && agent.indexOf(\"firefox\") !== -1) {\n // mac firefox.\n metaKeys = {\n 224: true\n };\n } else {\n // windows, linux, or mac opera.\n metaKeys = {\n 17: true\n };\n }\n\n (root.metaTrackerReset = function () {\n eventjs.fnKey = root.fnKey = false;\n eventjs.metaKey = root.metaKey = false;\n eventjs.escKey = root.escKey = false;\n eventjs.ctrlKey = root.ctrlKey = false;\n eventjs.shiftKey = root.shiftKey = false;\n eventjs.altKey = root.altKey = false;\n })();\n\n root.metaTracker = function (event) {\n var isKeyDown = event.type === \"keydown\";\n if (event.keyCode === 27) eventjs.escKey = root.escKey = isKeyDown;\n if (metaKeys[event.keyCode]) eventjs.metaKey = root.metaKey = isKeyDown;\n eventjs.ctrlKey = root.ctrlKey = event.ctrlKey;\n eventjs.shiftKey = root.shiftKey = event.shiftKey;\n eventjs.altKey = root.altKey = event.altKey;\n };\n })();\n\n return root;\n}(eventjs.proxy);\n/*:\n\t----------------------------------------------------\n\t\"MutationObserver\" event proxy.\n\t----------------------------------------------------\n\tauthor: Selvakumar Arumugam - MIT LICENSE\n\t src: http://stackoverflow.com/questions/10868104/can-you-have-a-javascript-hook-trigger-after-a-dom-elements-style-object-change\n\t----------------------------------------------------\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\n\neventjs.MutationObserver = function () {\n var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;\n\n var DOMAttrModifiedSupported = !MutationObserver && function () {\n var p = document.createElement(\"p\");\n var flag = false;\n\n var fn = function fn() {\n flag = true;\n };\n\n if (p.addEventListener) {\n p.addEventListener(\"DOMAttrModified\", fn, false);\n } else if (p.attachEvent) {\n p.attachEvent(\"onDOMAttrModified\", fn);\n } else {\n return false;\n } ///\n\n\n p.setAttribute(\"id\", \"target\"); ///\n\n return flag;\n }(); ///\n\n\n return function (container, callback) {\n if (MutationObserver) {\n var options = {\n subtree: false,\n attributes: true\n };\n var observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (e) {\n callback.call(e.target, e.attributeName);\n });\n });\n observer.observe(container, options);\n } else if (DOMAttrModifiedSupported) {\n eventjs.add(container, \"DOMAttrModified\", function (e) {\n callback.call(container, e.attrName);\n });\n } else if (\"onpropertychange\" in document.body) {\n eventjs.add(container, \"propertychange\", function (e) {\n callback.call(container, window.event.propertyName);\n });\n }\n };\n}();\n/*:\n\t\"Click\" event proxy.\n\t----------------------------------------------------\n\teventjs.add(window, \"click\", function(event, self) {});\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n root.click = function (conf) {\n conf.gesture = conf.gesture || \"click\";\n conf.maxFingers = conf.maxFingers || conf.fingers || 1; /// Tracking the events.\n\n conf.onPointerDown = function (event) {\n if (root.pointerStart(event, self, conf)) {\n eventjs.add(conf.target, \"mouseup\", conf.onPointerUp);\n }\n };\n\n conf.onPointerUp = function (event) {\n if (root.pointerEnd(event, self, conf)) {\n eventjs.remove(conf.target, \"mouseup\", conf.onPointerUp);\n var pointers = event.changedTouches || root.getCoords(event);\n var pointer = pointers[0];\n var bbox = conf.bbox;\n var newbbox = root.getBoundingBox(conf.target);\n var y = pointer.pageY - newbbox.scrollBodyTop;\n var x = pointer.pageX - newbbox.scrollBodyLeft; ////\n\n if (x > bbox.x1 && y > bbox.y1 && x < bbox.x2 && y < bbox.y2 && bbox.scrollTop === newbbox.scrollTop) {\n // has not been scrolled\n ///\n for (var key in conf.tracker) {\n break;\n } //- should be modularized? in dblclick too\n\n\n var point = conf.tracker[key];\n self.x = point.start.x;\n self.y = point.start.y; ///\n\n conf.listener(event, self);\n }\n }\n }; // Generate maintenance commands, and other configurations.\n\n\n var self = root.pointerSetup(conf);\n self.state = \"click\"; // Attach events.\n\n eventjs.add(conf.target, \"mousedown\", conf.onPointerDown); // Return this object.\n\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.click = root.click;\n return root;\n}(eventjs.proxy);\n/*:\n\t\"Double-Click\" aka \"Double-Tap\" event proxy.\n\t----------------------------------------------------\n\teventjs.add(window, \"dblclick\", function(event, self) {});\n\t----------------------------------------------------\n\tTouch an target twice for <= 700ms, with less than 25 pixel drift.\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n root.dbltap = root.dblclick = function (conf) {\n conf.gesture = conf.gesture || \"dbltap\";\n conf.maxFingers = conf.maxFingers || conf.fingers || 1; // Setting up local variables.\n\n var delay = 700; // in milliseconds\n\n var time0, time1, timeout;\n var pointer0, pointer1; // Tracking the events.\n\n conf.onPointerDown = function (event) {\n var pointers = event.changedTouches || root.getCoords(event);\n\n if (time0 && !time1) {\n // Click #2\n pointer1 = pointers[0];\n time1 = new Date().getTime() - time0;\n } else {\n // Click #1\n pointer0 = pointers[0];\n time0 = new Date().getTime();\n time1 = 0;\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n time0 = 0;\n }, delay);\n }\n\n if (root.pointerStart(event, self, conf)) {\n eventjs.add(conf.target, \"mousemove\", conf.onPointerMove).listener(event);\n eventjs.add(conf.target, \"mouseup\", conf.onPointerUp);\n }\n };\n\n conf.onPointerMove = function (event) {\n if (time0 && !time1) {\n var pointers = event.changedTouches || root.getCoords(event);\n pointer1 = pointers[0];\n }\n\n var bbox = conf.bbox;\n var ax = pointer1.pageX - bbox.x1;\n var ay = pointer1.pageY - bbox.y1;\n\n if (!(ax > 0 && ax < bbox.width && // Within target coordinates..\n ay > 0 && ay < bbox.height && Math.abs(pointer1.pageX - pointer0.pageX) <= 25 && // Within drift deviance.\n Math.abs(pointer1.pageY - pointer0.pageY) <= 25)) {\n // Cancel out this listener.\n eventjs.remove(conf.target, \"mousemove\", conf.onPointerMove);\n clearTimeout(timeout);\n time0 = time1 = 0;\n }\n };\n\n conf.onPointerUp = function (event) {\n if (root.pointerEnd(event, self, conf)) {\n eventjs.remove(conf.target, \"mousemove\", conf.onPointerMove);\n eventjs.remove(conf.target, \"mouseup\", conf.onPointerUp);\n }\n\n if (time0 && time1) {\n if (time1 <= delay) {\n // && !(event.cancelBubble && ++event.cancelBubbleCount > 1)) {\n self.state = conf.gesture;\n\n for (var key in conf.tracker) {\n break;\n }\n\n var point = conf.tracker[key];\n self.x = point.start.x;\n self.y = point.start.y;\n conf.listener(event, self);\n }\n\n clearTimeout(timeout);\n time0 = time1 = 0;\n }\n }; // Generate maintenance commands, and other configurations.\n\n\n var self = root.pointerSetup(conf);\n self.state = \"dblclick\"; // Attach events.\n\n eventjs.add(conf.target, \"mousedown\", conf.onPointerDown); // Return this object.\n\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.dbltap = root.dbltap;\n eventjs.Gesture._gestureHandlers.dblclick = root.dblclick;\n return root;\n}(eventjs.proxy);\n/*:\n\t\"Drag\" event proxy (1+ fingers).\n\t----------------------------------------------------\n\tCONFIGURE: maxFingers, position.\n\t----------------------------------------------------\n\teventjs.add(window, \"drag\", function(event, self) {\n\t\tconsole.log(self.gesture, self.state, self.start, self.x, self.y, self.bbox);\n\t});\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n root.dragElement = function (that, event) {\n root.drag({\n event: event,\n target: that,\n position: \"move\",\n listener: function listener(event, self) {\n that.style.left = self.x + \"px\";\n that.style.top = self.y + \"px\";\n eventjs.prevent(event);\n }\n });\n };\n\n root.drag = function (conf) {\n conf.gesture = \"drag\";\n\n conf.onPointerDown = function (event) {\n if (root.pointerStart(event, self, conf)) {\n if (!conf.monitor) {\n eventjs.add(conf.doc, \"mousemove\", conf.onPointerMove);\n eventjs.add(conf.doc, \"mouseup\", conf.onPointerUp);\n }\n } // Process event listener.\n\n\n conf.onPointerMove(event, \"down\");\n };\n\n conf.onPointerMove = function (event, state) {\n if (!conf.tracker) return conf.onPointerDown(event);\n var bbox = conf.bbox;\n var touches = event.changedTouches || root.getCoords(event);\n var length = touches.length;\n\n for (var i = 0; i < length; i++) {\n var touch = touches[i];\n var identifier = touch.identifier || Infinity;\n var pt = conf.tracker[identifier]; // Identifier defined outside of listener.\n\n if (!pt) continue;\n pt.pageX = touch.pageX;\n pt.pageY = touch.pageY; // Record data.\n\n self.state = state || \"move\";\n self.identifier = identifier;\n self.start = pt.start;\n self.fingers = conf.fingers;\n\n if (conf.position === \"differenceFromLast\") {\n self.x = pt.pageX - pt.offsetX;\n self.y = pt.pageY - pt.offsetY;\n pt.offsetX = pt.pageX;\n pt.offsetY = pt.pageY;\n } else {\n self.x = pt.pageX - pt.offsetX;\n self.y = pt.pageY - pt.offsetY;\n } ///\n\n\n conf.listener(event, self);\n }\n };\n\n conf.onPointerUp = function (event) {\n // Remove tracking for touch.\n if (root.pointerEnd(event, self, conf, conf.onPointerMove)) {\n if (!conf.monitor) {\n eventjs.remove(conf.doc, \"mousemove\", conf.onPointerMove);\n eventjs.remove(conf.doc, \"mouseup\", conf.onPointerUp);\n }\n }\n }; // Generate maintenance commands, and other configurations.\n\n\n var self = root.pointerSetup(conf); // Attach events.\n\n if (conf.event) {\n conf.onPointerDown(conf.event);\n } else {\n //\n eventjs.add(conf.target, \"mousedown\", conf.onPointerDown);\n\n if (conf.monitor) {\n eventjs.add(conf.doc, \"mousemove\", conf.onPointerMove);\n eventjs.add(conf.doc, \"mouseup\", conf.onPointerUp);\n }\n } // Return this object.\n\n\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.drag = root.drag;\n return root;\n}(eventjs.proxy);\n/*:\n\t\"Gesture\" event proxy (2+ fingers).\n\t----------------------------------------------------\n\tCONFIGURE: minFingers, maxFingers.\n\t----------------------------------------------------\n\teventjs.add(window, \"gesture\", function(event, self) {\n\t\tconsole.log(\n\t\t\tself.x, // centroid\n\t\t\tself.y,\n\t\t\tself.rotation,\n\t\t\tself.scale,\n\t\t\tself.fingers,\n\t\t\tself.state\n\t\t);\n\t});\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n var RAD_DEG = Math.PI / 180;\n\n var getCentroid = function getCentroid(self, points) {\n var centroidx = 0;\n var centroidy = 0;\n var length = 0;\n\n for (var sid in points) {\n var touch = points[sid];\n if (touch.up) continue;\n centroidx += touch.move.x;\n centroidy += touch.move.y;\n length++;\n }\n\n self.x = centroidx /= length;\n self.y = centroidy /= length;\n return self;\n };\n\n root.gesture = function (conf) {\n conf.gesture = conf.gesture || \"gesture\";\n conf.minFingers = conf.minFingers || conf.fingers || 2; // Tracking the events.\n\n conf.onPointerDown = function (event) {\n var fingers = conf.fingers;\n\n if (root.pointerStart(event, self, conf)) {\n eventjs.add(conf.doc, \"mousemove\", conf.onPointerMove);\n eventjs.add(conf.doc, \"mouseup\", conf.onPointerUp);\n } // Record gesture start.\n\n\n if (conf.fingers === conf.minFingers && fingers !== conf.fingers) {\n self.fingers = conf.minFingers;\n self.scale = 1;\n self.rotation = 0;\n self.state = \"start\";\n var sids = \"\"; //- FIXME(mud): can generate duplicate IDs.\n\n for (var key in conf.tracker) {\n sids += key;\n }\n\n self.identifier = parseInt(sids);\n getCentroid(self, conf.tracker);\n conf.listener(event, self);\n }\n }; ///\n\n\n conf.onPointerMove = function (event, state) {\n var bbox = conf.bbox;\n var points = conf.tracker;\n var touches = event.changedTouches || root.getCoords(event);\n var length = touches.length; // Update tracker coordinates.\n\n for (var i = 0; i < length; i++) {\n var touch = touches[i];\n var sid = touch.identifier || Infinity;\n var pt = points[sid]; // Check whether \"pt\" is used by another gesture.\n\n if (!pt) continue; // Find the actual coordinates.\n\n pt.move.x = touch.pageX - bbox.x1;\n pt.move.y = touch.pageY - bbox.y1;\n } ///\n\n\n if (conf.fingers < conf.minFingers) return; ///\n\n var touches = [];\n var scale = 0;\n var rotation = 0; /// Calculate centroid of gesture.\n\n getCentroid(self, points); ///\n\n for (var sid in points) {\n var touch = points[sid];\n if (touch.up) continue;\n var start = touch.start;\n\n if (!start.distance) {\n var dx = start.x - self.x;\n var dy = start.y - self.y;\n start.distance = Math.sqrt(dx * dx + dy * dy);\n start.angle = Math.atan2(dx, dy) / RAD_DEG;\n } // Calculate scale.\n\n\n var dx = touch.move.x - self.x;\n var dy = touch.move.y - self.y;\n var distance = Math.sqrt(dx * dx + dy * dy);\n scale += distance / start.distance; // Calculate rotation.\n\n var angle = Math.atan2(dx, dy) / RAD_DEG;\n var rotate = (start.angle - angle + 360) % 360 - 180;\n touch.DEG2 = touch.DEG1; // Previous degree.\n\n touch.DEG1 = rotate > 0 ? rotate : -rotate; // Current degree.\n\n if (typeof touch.DEG2 !== \"undefined\") {\n if (rotate > 0) {\n touch.rotation += touch.DEG1 - touch.DEG2;\n } else {\n touch.rotation -= touch.DEG1 - touch.DEG2;\n }\n\n rotation += touch.rotation;\n } // Attach current points to self.\n\n\n touches.push(touch.move);\n } ///\n\n\n self.touches = touches;\n self.fingers = conf.fingers;\n self.scale = scale / conf.fingers;\n self.rotation = rotation / conf.fingers;\n self.state = \"change\";\n conf.listener(event, self);\n };\n\n conf.onPointerUp = function (event) {\n // Remove tracking for touch.\n var fingers = conf.fingers;\n\n if (root.pointerEnd(event, self, conf)) {\n eventjs.remove(conf.doc, \"mousemove\", conf.onPointerMove);\n eventjs.remove(conf.doc, \"mouseup\", conf.onPointerUp);\n } // Check whether fingers has dropped below minFingers.\n\n\n if (fingers === conf.minFingers && conf.fingers < conf.minFingers) {\n self.fingers = conf.fingers;\n self.state = \"end\";\n conf.listener(event, self);\n }\n }; // Generate maintenance commands, and other configurations.\n\n\n var self = root.pointerSetup(conf); // Attach events.\n\n eventjs.add(conf.target, \"mousedown\", conf.onPointerDown); // Return this object.\n\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.gesture = root.gesture;\n return root;\n}(eventjs.proxy);\n/*:\n\t\"Pointer\" event proxy (1+ fingers).\n\t----------------------------------------------------\n\tCONFIGURE: minFingers, maxFingers.\n\t----------------------------------------------------\n\teventjs.add(window, \"gesture\", function(event, self) {\n\t\tconsole.log(self.rotation, self.scale, self.fingers, self.state);\n\t});\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n root.pointerdown = root.pointermove = root.pointerup = function (conf) {\n conf.gesture = conf.gesture || \"pointer\";\n if (conf.target.isPointerEmitter) return; // Tracking the events.\n\n var isDown = true;\n\n conf.onPointerDown = function (event) {\n isDown = false;\n self.gesture = \"pointerdown\";\n conf.listener(event, self);\n };\n\n conf.onPointerMove = function (event) {\n self.gesture = \"pointermove\";\n conf.listener(event, self, isDown);\n };\n\n conf.onPointerUp = function (event) {\n isDown = true;\n self.gesture = \"pointerup\";\n conf.listener(event, self, true);\n }; // Generate maintenance commands, and other configurations.\n\n\n var self = root.pointerSetup(conf); // Attach events.\n\n eventjs.add(conf.target, \"mousedown\", conf.onPointerDown);\n eventjs.add(conf.target, \"mousemove\", conf.onPointerMove);\n eventjs.add(conf.doc, \"mouseup\", conf.onPointerUp); // Return this object.\n\n conf.target.isPointerEmitter = true;\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.pointerdown = root.pointerdown;\n eventjs.Gesture._gestureHandlers.pointermove = root.pointermove;\n eventjs.Gesture._gestureHandlers.pointerup = root.pointerup;\n return root;\n}(eventjs.proxy);\n/*:\n\t\"Device Motion\" and \"Shake\" event proxy.\n\t----------------------------------------------------\n\thttp://developer.android.com/reference/android/hardware/Sensoreventjs.html#values\n\t----------------------------------------------------\n\teventjs.add(window, \"shake\", function(event, self) {});\n\teventjs.add(window, \"devicemotion\", function(event, self) {\n\t\tconsole.log(self.acceleration, self.accelerationIncludingGravity);\n\t});\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n root.shake = function (conf) {\n // Externally accessible data.\n var self = {\n gesture: \"devicemotion\",\n acceleration: {},\n accelerationIncludingGravity: {},\n target: conf.target,\n listener: conf.listener,\n remove: function remove() {\n window.removeEventListener('devicemotion', onDeviceMotion, false);\n }\n }; // Setting up local variables.\n\n var threshold = 4; // Gravitational threshold.\n\n var timeout = 1000; // Timeout between shake events.\n\n var timeframe = 200; // Time between shakes.\n\n var shakes = 3; // Minimum shakes to trigger event.\n\n var lastShake = new Date().getTime();\n var gravity = {\n x: 0,\n y: 0,\n z: 0\n };\n var delta = {\n x: {\n count: 0,\n value: 0\n },\n y: {\n count: 0,\n value: 0\n },\n z: {\n count: 0,\n value: 0\n }\n }; // Tracking the events.\n\n var onDeviceMotion = function onDeviceMotion(e) {\n var alpha = 0.8; // Low pass filter.\n\n var o = e.accelerationIncludingGravity;\n gravity.x = alpha * gravity.x + (1 - alpha) * o.x;\n gravity.y = alpha * gravity.y + (1 - alpha) * o.y;\n gravity.z = alpha * gravity.z + (1 - alpha) * o.z;\n self.accelerationIncludingGravity = gravity;\n self.acceleration.x = o.x - gravity.x;\n self.acceleration.y = o.y - gravity.y;\n self.acceleration.z = o.z - gravity.z; ///\n\n if (conf.gesture === \"devicemotion\") {\n conf.listener(e, self);\n return;\n }\n\n var data = \"xyz\";\n var now = new Date().getTime();\n\n for (var n = 0, length = data.length; n < length; n++) {\n var letter = data[n];\n var ACCELERATION = self.acceleration[letter];\n var DELTA = delta[letter];\n var abs = Math.abs(ACCELERATION); /// Check whether another shake event was recently registered.\n\n if (now - lastShake < timeout) continue; /// Check whether delta surpasses threshold.\n\n if (abs > threshold) {\n var idx = now * ACCELERATION / abs;\n var span = Math.abs(idx + DELTA.value); // Check whether last delta was registered within timeframe.\n\n if (DELTA.value && span < timeframe) {\n DELTA.value = idx;\n DELTA.count++; // Check whether delta count has enough shakes.\n\n if (DELTA.count === shakes) {\n conf.listener(e, self); // Reset tracking.\n\n lastShake = now;\n DELTA.value = 0;\n DELTA.count = 0;\n }\n } else {\n // Track first shake.\n DELTA.value = idx;\n DELTA.count = 1;\n }\n }\n }\n }; // Attach events.\n\n\n if (!window.addEventListener) return;\n window.addEventListener('devicemotion', onDeviceMotion, false); // Return this object.\n\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.shake = root.shake;\n return root;\n}(eventjs.proxy);\n/*:\n\t\"Swipe\" event proxy (1+ fingers).\n\t----------------------------------------------------\n\tCONFIGURE: snap, threshold, maxFingers.\n\t----------------------------------------------------\n\teventjs.add(window, \"swipe\", function(event, self) {\n\t\tconsole.log(self.velocity, self.angle);\n\t});\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n var RAD_DEG = Math.PI / 180;\n\n root.swipe = function (conf) {\n conf.snap = conf.snap || 90; // angle snap.\n\n conf.threshold = conf.threshold || 1; // velocity threshold.\n\n conf.gesture = conf.gesture || \"swipe\"; // Tracking the events.\n\n conf.onPointerDown = function (event) {\n if (root.pointerStart(event, self, conf)) {\n eventjs.add(conf.doc, \"mousemove\", conf.onPointerMove).listener(event);\n eventjs.add(conf.doc, \"mouseup\", conf.onPointerUp);\n }\n };\n\n conf.onPointerMove = function (event) {\n var touches = event.changedTouches || root.getCoords(event);\n var length = touches.length;\n\n for (var i = 0; i < length; i++) {\n var touch = touches[i];\n var sid = touch.identifier || Infinity;\n var o = conf.tracker[sid]; // Identifier defined outside of listener.\n\n if (!o) continue;\n o.move.x = touch.pageX;\n o.move.y = touch.pageY;\n o.moveTime = new Date().getTime();\n }\n };\n\n conf.onPointerUp = function (event) {\n if (root.pointerEnd(event, self, conf)) {\n eventjs.remove(conf.doc, \"mousemove\", conf.onPointerMove);\n eventjs.remove(conf.doc, \"mouseup\", conf.onPointerUp); ///\n\n var velocity1;\n var velocity2;\n var degree1;\n var degree2; /// Calculate centroid of gesture.\n\n var start = {\n x: 0,\n y: 0\n };\n var endx = 0;\n var endy = 0;\n var length = 0; ///\n\n for (var sid in conf.tracker) {\n var touch = conf.tracker[sid];\n var xdist = touch.move.x - touch.start.x;\n var ydist = touch.move.y - touch.start.y; ///\n\n endx += touch.move.x;\n endy += touch.move.y;\n start.x += touch.start.x;\n start.y += touch.start.y;\n length++; ///\n\n var distance = Math.sqrt(xdist * xdist + ydist * ydist);\n var ms = touch.moveTime - touch.startTime;\n var degree2 = Math.atan2(xdist, ydist) / RAD_DEG + 180;\n var velocity2 = ms ? distance / ms : 0;\n\n if (typeof degree1 === \"undefined\") {\n degree1 = degree2;\n velocity1 = velocity2;\n } else if (Math.abs(degree2 - degree1) <= 20) {\n degree1 = (degree1 + degree2) / 2;\n velocity1 = (velocity1 + velocity2) / 2;\n } else {\n return;\n }\n } ///\n\n\n var fingers = conf.gestureFingers;\n\n if (conf.minFingers <= fingers && conf.maxFingers >= fingers) {\n if (velocity1 > conf.threshold) {\n start.x /= length;\n start.y /= length;\n self.start = start;\n self.x = endx / length;\n self.y = endy / length;\n self.angle = -(((degree1 / conf.snap + 0.5 >> 0) * conf.snap || 360) - 360);\n self.velocity = velocity1;\n self.fingers = fingers;\n self.state = \"swipe\";\n conf.listener(event, self);\n }\n }\n }\n }; // Generate maintenance commands, and other configurations.\n\n\n var self = root.pointerSetup(conf); // Attach events.\n\n eventjs.add(conf.target, \"mousedown\", conf.onPointerDown); // Return this object.\n\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.swipe = root.swipe;\n return root;\n}(eventjs.proxy);\n/*:\n\t\"Tap\" and \"Longpress\" event proxy.\n\t----------------------------------------------------\n\tCONFIGURE: delay (longpress), timeout (tap).\n\t----------------------------------------------------\n\teventjs.add(window, \"tap\", function(event, self) {\n\t\tconsole.log(self.fingers);\n\t});\n\t----------------------------------------------------\n\tmulti-finger tap // touch an target for <= 250ms.\n\tmulti-finger longpress // touch an target for >= 500ms\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n root.longpress = function (conf) {\n conf.gesture = \"longpress\";\n return root.tap(conf);\n };\n\n root.tap = function (conf) {\n conf.delay = conf.delay || 500;\n conf.timeout = conf.timeout || 250;\n conf.driftDeviance = conf.driftDeviance || 10;\n conf.gesture = conf.gesture || \"tap\"; // Setting up local variables.\n\n var timestamp, timeout; // Tracking the events.\n\n conf.onPointerDown = function (event) {\n if (root.pointerStart(event, self, conf)) {\n timestamp = new Date().getTime(); // Initialize event listeners.\n\n eventjs.add(conf.doc, \"mousemove\", conf.onPointerMove).listener(event);\n eventjs.add(conf.doc, \"mouseup\", conf.onPointerUp); // Make sure this is a \"longpress\" event.\n\n if (conf.gesture !== \"longpress\") return;\n timeout = setTimeout(function () {\n if (event.cancelBubble && ++event.cancelBubbleCount > 1) return; // Make sure no fingers have been changed.\n\n var fingers = 0;\n\n for (var key in conf.tracker) {\n var point = conf.tracker[key];\n if (point.end === true) return;\n if (conf.cancel) return;\n fingers++;\n } // Send callback.\n\n\n if (conf.minFingers <= fingers && conf.maxFingers >= fingers) {\n self.state = \"start\";\n self.fingers = fingers;\n self.x = point.start.x;\n self.y = point.start.y;\n conf.listener(event, self);\n }\n }, conf.delay);\n }\n };\n\n conf.onPointerMove = function (event) {\n var bbox = conf.bbox;\n var touches = event.changedTouches || root.getCoords(event);\n var length = touches.length;\n\n for (var i = 0; i < length; i++) {\n var touch = touches[i];\n var identifier = touch.identifier || Infinity;\n var pt = conf.tracker[identifier];\n if (!pt) continue;\n var x = touch.pageX - bbox.x1;\n var y = touch.pageY - bbox.y1; ///\n\n var dx = x - pt.start.x;\n var dy = y - pt.start.y;\n var distance = Math.sqrt(dx * dx + dy * dy);\n\n if (!(x > 0 && x < bbox.width && // Within target coordinates..\n y > 0 && y < bbox.height && distance <= conf.driftDeviance)) {\n // Within drift deviance.\n // Cancel out this listener.\n eventjs.remove(conf.doc, \"mousemove\", conf.onPointerMove);\n conf.cancel = true;\n return;\n }\n }\n };\n\n conf.onPointerUp = function (event) {\n if (root.pointerEnd(event, self, conf)) {\n clearTimeout(timeout);\n eventjs.remove(conf.doc, \"mousemove\", conf.onPointerMove);\n eventjs.remove(conf.doc, \"mouseup\", conf.onPointerUp);\n if (event.cancelBubble && ++event.cancelBubbleCount > 1) return; // Callback release on longpress.\n\n if (conf.gesture === \"longpress\") {\n if (self.state === \"start\") {\n self.state = \"end\";\n conf.listener(event, self);\n }\n\n return;\n } // Cancel event due to movement.\n\n\n if (conf.cancel) return; // Ensure delay is within margins.\n\n if (new Date().getTime() - timestamp > conf.timeout) return; // Send callback.\n\n var fingers = conf.gestureFingers;\n\n if (conf.minFingers <= fingers && conf.maxFingers >= fingers) {\n self.state = \"tap\";\n self.fingers = conf.gestureFingers;\n conf.listener(event, self);\n }\n }\n }; // Generate maintenance commands, and other configurations.\n\n\n var self = root.pointerSetup(conf); // Attach events.\n\n eventjs.add(conf.target, \"mousedown\", conf.onPointerDown); // Return this object.\n\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.tap = root.tap;\n eventjs.Gesture._gestureHandlers.longpress = root.longpress;\n return root;\n}(eventjs.proxy);\n/*:\n\t\"Mouse Wheel\" event proxy.\n\t----------------------------------------------------\n\teventjs.add(window, \"wheel\", function(event, self) {\n\t\tconsole.log(self.state, self.wheelDelta);\n\t});\n*/\n\n\nif (typeof eventjs === \"undefined\") var eventjs = {};\nif (typeof eventjs.proxy === \"undefined\") eventjs.proxy = {};\n\neventjs.proxy = function (root) {\n \"use strict\";\n\n root.wheelPreventElasticBounce = function (el) {\n if (!el) return;\n if (typeof el === \"string\") el = document.querySelector(el);\n eventjs.add(el, \"wheel\", function (event, self) {\n self.preventElasticBounce();\n eventjs.stop(event);\n });\n };\n\n root.wheel = function (conf) {\n // Configure event listener.\n var interval;\n var timeout = conf.timeout || 150;\n var count = 0; // Externally accessible data.\n\n var self = {\n gesture: \"wheel\",\n state: \"start\",\n wheelDelta: 0,\n target: conf.target,\n listener: conf.listener,\n preventElasticBounce: function preventElasticBounce(event) {\n var target = this.target;\n var scrollTop = target.scrollTop;\n var top = scrollTop + target.offsetHeight;\n var height = target.scrollHeight;\n if (top === height && this.wheelDelta <= 0) eventjs.cancel(event);else if (scrollTop === 0 && this.wheelDelta >= 0) eventjs.cancel(event);\n eventjs.stop(event);\n },\n add: function add() {\n conf.target[_add](type, onMouseWheel, false);\n },\n remove: function remove() {\n conf.target[_remove](type, onMouseWheel, false);\n }\n }; // Tracking the events.\n\n var onMouseWheel = function onMouseWheel(event) {\n event = event || window.event;\n self.state = count++ ? \"change\" : \"start\";\n self.wheelDelta = event.detail ? event.detail * -20 : event.wheelDelta;\n conf.listener(event, self);\n clearTimeout(interval);\n interval = setTimeout(function () {\n count = 0;\n self.state = \"end\";\n self.wheelDelta = 0;\n conf.listener(event, self);\n }, timeout);\n }; // Attach events.\n\n\n var _add = document.addEventListener ? \"addEventListener\" : \"attachEvent\";\n\n var _remove = document.removeEventListener ? \"removeEventListener\" : \"detachEvent\";\n\n var type = eventjs.getEventSupport(\"mousewheel\") ? \"mousewheel\" : \"DOMMouseScroll\";\n\n conf.target[_add](type, onMouseWheel, false); // Return this object.\n\n\n return self;\n };\n\n eventjs.Gesture = eventjs.Gesture || {};\n eventjs.Gesture._gestureHandlers = eventjs.Gesture._gestureHandlers || {};\n eventjs.Gesture._gestureHandlers.wheel = root.wheel;\n return root;\n}(eventjs.proxy);\n/*\n\t\"Orientation Change\"\n\t----------------------------------------------------\n\thttps://developer.apple.com/library/safari/documentation/SafariDOMAdditions/Reference/DeviceOrientationEventClassRef/DeviceOrientationEvent/DeviceOrientationEvent.html#//apple_ref/doc/uid/TP40010526\n\t----------------------------------------------------\n\tEvent.add(window, \"deviceorientation\", function(event, self) {});\n*/\n\n\nif (typeof Event === \"undefined\") var Event = {};\nif (typeof Event.proxy === \"undefined\") Event.proxy = {};\n\nEvent.proxy = function (root) {\n \"use strict\";\n\n root.orientation = function (conf) {\n // Externally accessible data.\n var self = {\n gesture: \"orientationchange\",\n previous: null,\n\n /* Report the previous orientation */\n current: window.orientation,\n target: conf.target,\n listener: conf.listener,\n remove: function remove() {\n window.removeEventListener('orientationchange', onOrientationChange, false);\n }\n }; // Tracking the events.\n\n var onOrientationChange = function onOrientationChange(e) {\n self.previous = self.current;\n self.current = window.orientation;\n\n if (self.previous !== null && self.previous != self.current) {\n conf.listener(e, self);\n return;\n }\n }; // Attach events.\n\n\n if (window.DeviceOrientationEvent) {\n window.addEventListener(\"orientationchange\", onOrientationChange, false);\n } // Return this object.\n\n\n return self;\n };\n\n Event.Gesture = Event.Gesture || {};\n Event.Gesture._gestureHandlers = Event.Gesture._gestureHandlers || {};\n Event.Gesture._gestureHandlers.orientation = root.orientation;\n return root;\n}(Event.proxy);\n\n(function () {\n /**\n * @private\n * @param {String} eventName\n * @param {Function} handler\n */\n function _removeEventListener(eventName, handler) {\n if (!this.__eventListeners[eventName]) {\n return;\n }\n\n var eventListener = this.__eventListeners[eventName];\n\n if (handler) {\n eventListener[eventListener.indexOf(handler)] = false;\n } else {\n fabric.util.array.fill(eventListener, false);\n }\n }\n /**\n * Observes specified event\n * @deprecated `observe` deprecated since 0.8.34 (use `on` instead)\n * @memberOf fabric.Observable\n * @alias on\n * @param {String|Object} eventName Event name (eg. 'after:render') or object with key/value pairs (eg. {'after:render': handler, 'selection:cleared': handler})\n * @param {Function} handler Function that receives a notification when an event of the specified type occurs\n * @return {Self} thisArg\n * @chainable\n */\n\n\n function observe(eventName, handler) {\n if (!this.__eventListeners) {\n this.__eventListeners = {};\n } // one object with key/value pairs was passed\n\n\n if (arguments.length === 1) {\n for (var prop in eventName) {\n this.on(prop, eventName[prop]);\n }\n } else {\n if (!this.__eventListeners[eventName]) {\n this.__eventListeners[eventName] = [];\n }\n\n this.__eventListeners[eventName].push(handler);\n }\n\n return this;\n }\n /**\n * Stops event observing for a particular event handler. Calling this method\n * without arguments removes all handlers for all events\n * @deprecated `stopObserving` deprecated since 0.8.34 (use `off` instead)\n * @memberOf fabric.Observable\n * @alias off\n * @param {String|Object} eventName Event name (eg. 'after:render') or object with key/value pairs (eg. {'after:render': handler, 'selection:cleared': handler})\n * @param {Function} handler Function to be deleted from EventListeners\n * @return {Self} thisArg\n * @chainable\n */\n\n\n function stopObserving(eventName, handler) {\n if (!this.__eventListeners) {\n return this;\n } // remove all key/value pairs (event name -> event handler)\n\n\n if (arguments.length === 0) {\n for (eventName in this.__eventListeners) {\n _removeEventListener.call(this, eventName);\n }\n } // one object with key/value pairs was passed\n else if (arguments.length === 1 && _typeof(arguments[0]) === 'object') {\n for (var prop in eventName) {\n _removeEventListener.call(this, prop, eventName[prop]);\n }\n } else {\n _removeEventListener.call(this, eventName, handler);\n }\n\n return this;\n }\n /**\n * Fires event with an optional options object\n * @deprecated `fire` deprecated since 1.0.7 (use `trigger` instead)\n * @memberOf fabric.Observable\n * @alias trigger\n * @param {String} eventName Event name to fire\n * @param {Object} [options] Options object\n * @return {Self} thisArg\n * @chainable\n */\n\n\n function fire(eventName, options) {\n if (!this.__eventListeners) {\n return this;\n }\n\n var listenersForEvent = this.__eventListeners[eventName];\n\n if (!listenersForEvent) {\n return this;\n }\n\n for (var i = 0, len = listenersForEvent.length; i < len; i++) {\n listenersForEvent[i] && listenersForEvent[i].call(this, options || {});\n }\n\n this.__eventListeners[eventName] = listenersForEvent.filter(function (value) {\n return value !== false;\n });\n return this;\n }\n /**\n * @namespace fabric.Observable\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-2#events}\n * @see {@link http://fabricjs.com/events|Events demo}\n */\n\n\n fabric.Observable = {\n observe: observe,\n stopObserving: stopObserving,\n fire: fire,\n on: observe,\n off: stopObserving,\n trigger: fire\n };\n})();\n/**\n * @namespace fabric.Collection\n */\n\n\nfabric.Collection = {\n _objects: [],\n\n /**\n * Adds objects to collection, Canvas or Group, then renders canvas\n * (if `renderOnAddRemove` is not `false`).\n * in case of Group no changes to bounding box are made.\n * Objects should be instances of (or inherit from) fabric.Object\n * Use of this function is highly discouraged for groups.\n * you can add a bunch of objects with the add method but then you NEED\n * to run a addWithUpdate call for the Group class or position/bbox will be wrong.\n * @param {...fabric.Object} object Zero or more fabric instances\n * @return {Self} thisArg\n * @chainable\n */\n add: function add() {\n this._objects.push.apply(this._objects, arguments);\n\n if (this._onObjectAdded) {\n for (var i = 0, length = arguments.length; i < length; i++) {\n this._onObjectAdded(arguments[i]);\n }\n }\n\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * Inserts an object into collection at specified index, then renders canvas (if `renderOnAddRemove` is not `false`)\n * An object should be an instance of (or inherit from) fabric.Object\n * Use of this function is highly discouraged for groups.\n * you can add a bunch of objects with the insertAt method but then you NEED\n * to run a addWithUpdate call for the Group class or position/bbox will be wrong.\n * @param {Object} object Object to insert\n * @param {Number} index Index to insert object at\n * @param {Boolean} nonSplicing When `true`, no splicing (shifting) of objects occurs\n * @return {Self} thisArg\n * @chainable\n */\n insertAt: function insertAt(object, index, nonSplicing) {\n var objects = this._objects;\n\n if (nonSplicing) {\n objects[index] = object;\n } else {\n objects.splice(index, 0, object);\n }\n\n this._onObjectAdded && this._onObjectAdded(object);\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * Removes objects from a collection, then renders canvas (if `renderOnAddRemove` is not `false`)\n * @param {...fabric.Object} object Zero or more fabric instances\n * @return {Self} thisArg\n * @chainable\n */\n remove: function remove() {\n var objects = this._objects,\n index,\n somethingRemoved = false;\n\n for (var i = 0, length = arguments.length; i < length; i++) {\n index = objects.indexOf(arguments[i]); // only call onObjectRemoved if an object was actually removed\n\n if (index !== -1) {\n somethingRemoved = true;\n objects.splice(index, 1);\n this._onObjectRemoved && this._onObjectRemoved(arguments[i]);\n }\n }\n\n this.renderOnAddRemove && somethingRemoved && this.requestRenderAll();\n return this;\n },\n\n /**\n * Executes given function for each object in this group\n * @param {Function} callback\n * Callback invoked with current object as first argument,\n * index - as second and an array of all objects - as third.\n * Callback is invoked in a context of Global Object (e.g. `window`)\n * when no `context` argument is given\n *\n * @param {Object} context Context (aka thisObject)\n * @return {Self} thisArg\n * @chainable\n */\n forEachObject: function forEachObject(callback, context) {\n var objects = this.getObjects();\n\n for (var i = 0, len = objects.length; i < len; i++) {\n callback.call(context, objects[i], i, objects);\n }\n\n return this;\n },\n\n /**\n * Returns an array of children objects of this instance\n * Type parameter introduced in 1.3.10\n * since 2.3.5 this method return always a COPY of the array;\n * @param {String} [type] When specified, only objects of this type are returned\n * @return {Array}\n */\n getObjects: function getObjects(type) {\n if (typeof type === 'undefined') {\n return this._objects.concat();\n }\n\n return this._objects.filter(function (o) {\n return o.type === type;\n });\n },\n\n /**\n * Returns object at specified index\n * @param {Number} index\n * @return {Self} thisArg\n */\n item: function item(index) {\n return this._objects[index];\n },\n\n /**\n * Returns true if collection contains no objects\n * @return {Boolean} true if collection is empty\n */\n isEmpty: function isEmpty() {\n return this._objects.length === 0;\n },\n\n /**\n * Returns a size of a collection (i.e: length of an array containing its objects)\n * @return {Number} Collection size\n */\n size: function size() {\n return this._objects.length;\n },\n\n /**\n * Returns true if collection contains an object\n * @param {Object} object Object to check against\n * @return {Boolean} `true` if collection contains an object\n */\n contains: function contains(object) {\n return this._objects.indexOf(object) > -1;\n },\n\n /**\n * Returns number representation of a collection complexity\n * @return {Number} complexity\n */\n complexity: function complexity() {\n return this._objects.reduce(function (memo, current) {\n memo += current.complexity ? current.complexity() : 0;\n return memo;\n }, 0);\n }\n};\n/**\n * @namespace fabric.CommonMethods\n */\n\nfabric.CommonMethods = {\n /**\n * Sets object's properties from options\n * @param {Object} [options] Options object\n */\n _setOptions: function _setOptions(options) {\n for (var prop in options) {\n this.set(prop, options[prop]);\n }\n },\n\n /**\n * @private\n * @param {Object} [filler] Options object\n * @param {String} [property] property to set the Gradient to\n */\n _initGradient: function _initGradient(filler, property) {\n if (filler && filler.colorStops && !(filler instanceof fabric.Gradient)) {\n this.set(property, new fabric.Gradient(filler));\n }\n },\n\n /**\n * @private\n * @param {Object} [filler] Options object\n * @param {String} [property] property to set the Pattern to\n * @param {Function} [callback] callback to invoke after pattern load\n */\n _initPattern: function _initPattern(filler, property, callback) {\n if (filler && filler.source && !(filler instanceof fabric.Pattern)) {\n this.set(property, new fabric.Pattern(filler, callback));\n } else {\n callback && callback();\n }\n },\n\n /**\n * @private\n * @param {Object} [options] Options object\n */\n _initClipping: function _initClipping(options) {\n if (!options.clipTo || typeof options.clipTo !== 'string') {\n return;\n }\n\n var functionBody = fabric.util.getFunctionBody(options.clipTo);\n\n if (typeof functionBody !== 'undefined') {\n this.clipTo = new Function('ctx', functionBody);\n }\n },\n\n /**\n * @private\n */\n _setObject: function _setObject(obj) {\n for (var prop in obj) {\n this._set(prop, obj[prop]);\n }\n },\n\n /**\n * Sets property to a given value. When changing position/dimension -related properties (left, top, scale, angle, etc.) `set` does not update position of object's borders/controls. If you need to update those, call `setCoords()`.\n * @param {String|Object} key Property name or object (if object, iterate over the object properties)\n * @param {Object|Function} value Property value (if function, the value is passed into it and its return value is used as a new one)\n * @return {fabric.Object} thisArg\n * @chainable\n */\n set: function set(key, value) {\n if (_typeof(key) === 'object') {\n this._setObject(key);\n } else {\n if (typeof value === 'function' && key !== 'clipTo') {\n this._set(key, value(this.get(key)));\n } else {\n this._set(key, value);\n }\n }\n\n return this;\n },\n _set: function _set(key, value) {\n this[key] = value;\n },\n\n /**\n * Toggles specified property from `true` to `false` or from `false` to `true`\n * @param {String} property Property to toggle\n * @return {fabric.Object} thisArg\n * @chainable\n */\n toggle: function toggle(property) {\n var value = this.get(property);\n\n if (typeof value === 'boolean') {\n this.set(property, !value);\n }\n\n return this;\n },\n\n /**\n * Basic getter\n * @param {String} property Property name\n * @return {*} value of a property\n */\n get: function get(property) {\n return this[property];\n }\n};\n\n(function (global) {\n var sqrt = Math.sqrt,\n atan2 = Math.atan2,\n pow = Math.pow,\n PiBy180 = Math.PI / 180,\n PiBy2 = Math.PI / 2;\n /**\n * @namespace fabric.util\n */\n\n fabric.util = {\n /**\n * Calculate the cos of an angle, avoiding returning floats for known results\n * @static\n * @memberOf fabric.util\n * @param {Number} angle the angle in radians or in degree\n * @return {Number}\n */\n cos: function cos(angle) {\n if (angle === 0) {\n return 1;\n }\n\n if (angle < 0) {\n // cos(a) = cos(-a)\n angle = -angle;\n }\n\n var angleSlice = angle / PiBy2;\n\n switch (angleSlice) {\n case 1:\n case 3:\n return 0;\n\n case 2:\n return -1;\n }\n\n return Math.cos(angle);\n },\n\n /**\n * Calculate the sin of an angle, avoiding returning floats for known results\n * @static\n * @memberOf fabric.util\n * @param {Number} angle the angle in radians or in degree\n * @return {Number}\n */\n sin: function sin(angle) {\n if (angle === 0) {\n return 0;\n }\n\n var angleSlice = angle / PiBy2,\n sign = 1;\n\n if (angle < 0) {\n // sin(-a) = -sin(a)\n sign = -1;\n }\n\n switch (angleSlice) {\n case 1:\n return sign;\n\n case 2:\n return 0;\n\n case 3:\n return -sign;\n }\n\n return Math.sin(angle);\n },\n\n /**\n * Removes value from an array.\n * Presence of value (and its position in an array) is determined via `Array.prototype.indexOf`\n * @static\n * @memberOf fabric.util\n * @param {Array} array\n * @param {*} value\n * @return {Array} original array\n */\n removeFromArray: function removeFromArray(array, value) {\n var idx = array.indexOf(value);\n\n if (idx !== -1) {\n array.splice(idx, 1);\n }\n\n return array;\n },\n\n /**\n * Returns random number between 2 specified ones.\n * @static\n * @memberOf fabric.util\n * @param {Number} min lower limit\n * @param {Number} max upper limit\n * @return {Number} random value (between min and max)\n */\n getRandomInt: function getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n },\n\n /**\n * Transforms degrees to radians.\n * @static\n * @memberOf fabric.util\n * @param {Number} degrees value in degrees\n * @return {Number} value in radians\n */\n degreesToRadians: function degreesToRadians(degrees) {\n return degrees * PiBy180;\n },\n\n /**\n * Transforms radians to degrees.\n * @static\n * @memberOf fabric.util\n * @param {Number} radians value in radians\n * @return {Number} value in degrees\n */\n radiansToDegrees: function radiansToDegrees(radians) {\n return radians / PiBy180;\n },\n\n /**\n * Rotates `point` around `origin` with `radians`\n * @static\n * @memberOf fabric.util\n * @param {fabric.Point} point The point to rotate\n * @param {fabric.Point} origin The origin of the rotation\n * @param {Number} radians The radians of the angle for the rotation\n * @return {fabric.Point} The new rotated point\n */\n rotatePoint: function rotatePoint(point, origin, radians) {\n point.subtractEquals(origin);\n var v = fabric.util.rotateVector(point, radians);\n return new fabric.Point(v.x, v.y).addEquals(origin);\n },\n\n /**\n * Rotates `vector` with `radians`\n * @static\n * @memberOf fabric.util\n * @param {Object} vector The vector to rotate (x and y)\n * @param {Number} radians The radians of the angle for the rotation\n * @return {Object} The new rotated point\n */\n rotateVector: function rotateVector(vector, radians) {\n var sin = fabric.util.sin(radians),\n cos = fabric.util.cos(radians),\n rx = vector.x * cos - vector.y * sin,\n ry = vector.x * sin + vector.y * cos;\n return {\n x: rx,\n y: ry\n };\n },\n\n /**\n * Apply transform t to point p\n * @static\n * @memberOf fabric.util\n * @param {fabric.Point} p The point to transform\n * @param {Array} t The transform\n * @param {Boolean} [ignoreOffset] Indicates that the offset should not be applied\n * @return {fabric.Point} The transformed point\n */\n transformPoint: function transformPoint(p, t, ignoreOffset) {\n if (ignoreOffset) {\n return new fabric.Point(t[0] * p.x + t[2] * p.y, t[1] * p.x + t[3] * p.y);\n }\n\n return new fabric.Point(t[0] * p.x + t[2] * p.y + t[4], t[1] * p.x + t[3] * p.y + t[5]);\n },\n\n /**\n * Returns coordinates of points's bounding rectangle (left, top, width, height)\n * @param {Array} points 4 points array\n * @param {Array} [transform] an array of 6 numbers representing a 2x3 transform matrix\n * @return {Object} Object with left, top, width, height properties\n */\n makeBoundingBoxFromPoints: function makeBoundingBoxFromPoints(points, transform) {\n if (transform) {\n for (var i = 0; i < points.length; i++) {\n points[i] = fabric.util.transformPoint(points[i], transform);\n }\n }\n\n var xPoints = [points[0].x, points[1].x, points[2].x, points[3].x],\n minX = fabric.util.array.min(xPoints),\n maxX = fabric.util.array.max(xPoints),\n width = maxX - minX,\n yPoints = [points[0].y, points[1].y, points[2].y, points[3].y],\n minY = fabric.util.array.min(yPoints),\n maxY = fabric.util.array.max(yPoints),\n height = maxY - minY;\n return {\n left: minX,\n top: minY,\n width: width,\n height: height\n };\n },\n\n /**\n * Invert transformation t\n * @static\n * @memberOf fabric.util\n * @param {Array} t The transform\n * @return {Array} The inverted transform\n */\n invertTransform: function invertTransform(t) {\n var a = 1 / (t[0] * t[3] - t[1] * t[2]),\n r = [a * t[3], -a * t[1], -a * t[2], a * t[0]],\n o = fabric.util.transformPoint({\n x: t[4],\n y: t[5]\n }, r, true);\n r[4] = -o.x;\n r[5] = -o.y;\n return r;\n },\n\n /**\n * A wrapper around Number#toFixed, which contrary to native method returns number, not string.\n * @static\n * @memberOf fabric.util\n * @param {Number|String} number number to operate on\n * @param {Number} fractionDigits number of fraction digits to \"leave\"\n * @return {Number}\n */\n toFixed: function toFixed(number, fractionDigits) {\n return parseFloat(Number(number).toFixed(fractionDigits));\n },\n\n /**\n * Converts from attribute value to pixel value if applicable.\n * Returns converted pixels or original value not converted.\n * @param {Number|String} value number to operate on\n * @param {Number} fontSize\n * @return {Number|String}\n */\n parseUnit: function parseUnit(value, fontSize) {\n var unit = /\\D{0,2}$/.exec(value),\n number = parseFloat(value);\n\n if (!fontSize) {\n fontSize = fabric.Text.DEFAULT_SVG_FONT_SIZE;\n }\n\n switch (unit[0]) {\n case 'mm':\n return number * fabric.DPI / 25.4;\n\n case 'cm':\n return number * fabric.DPI / 2.54;\n\n case 'in':\n return number * fabric.DPI;\n\n case 'pt':\n return number * fabric.DPI / 72;\n // or * 4 / 3\n\n case 'pc':\n return number * fabric.DPI / 72 * 12;\n // or * 16\n\n case 'em':\n return number * fontSize;\n\n default:\n return number;\n }\n },\n\n /**\n * Function which always returns `false`.\n * @static\n * @memberOf fabric.util\n * @return {Boolean}\n */\n falseFunction: function falseFunction() {\n return false;\n },\n\n /**\n * Returns klass \"Class\" object of given namespace\n * @memberOf fabric.util\n * @param {String} type Type of object (eg. 'circle')\n * @param {String} namespace Namespace to get klass \"Class\" object from\n * @return {Object} klass \"Class\"\n */\n getKlass: function getKlass(type, namespace) {\n // capitalize first letter only\n type = fabric.util.string.camelize(type.charAt(0).toUpperCase() + type.slice(1));\n return fabric.util.resolveNamespace(namespace)[type];\n },\n\n /**\n * Returns array of attributes for given svg that fabric parses\n * @memberOf fabric.util\n * @param {String} type Type of svg element (eg. 'circle')\n * @return {Array} string names of supported attributes\n */\n getSvgAttributes: function getSvgAttributes(type) {\n var attributes = ['instantiated_by_use', 'style', 'id', 'class'];\n\n switch (type) {\n case 'linearGradient':\n attributes = attributes.concat(['x1', 'y1', 'x2', 'y2', 'gradientUnits', 'gradientTransform']);\n break;\n\n case 'radialGradient':\n attributes = attributes.concat(['gradientUnits', 'gradientTransform', 'cx', 'cy', 'r', 'fx', 'fy', 'fr']);\n break;\n\n case 'stop':\n attributes = attributes.concat(['offset', 'stop-color', 'stop-opacity']);\n break;\n }\n\n return attributes;\n },\n\n /**\n * Returns object of given namespace\n * @memberOf fabric.util\n * @param {String} namespace Namespace string e.g. 'fabric.Image.filter' or 'fabric'\n * @return {Object} Object for given namespace (default fabric)\n */\n resolveNamespace: function resolveNamespace(namespace) {\n if (!namespace) {\n return fabric;\n }\n\n var parts = namespace.split('.'),\n len = parts.length,\n i,\n obj = global || fabric.window;\n\n for (i = 0; i < len; ++i) {\n obj = obj[parts[i]];\n }\n\n return obj;\n },\n\n /**\n * Loads image element from given url and passes it to a callback\n * @memberOf fabric.util\n * @param {String} url URL representing an image\n * @param {Function} callback Callback; invoked with loaded image\n * @param {*} [context] Context to invoke callback in\n * @param {Object} [crossOrigin] crossOrigin value to set image element to\n */\n loadImage: function loadImage(url, callback, context, crossOrigin) {\n if (!url) {\n callback && callback.call(context, url);\n return;\n }\n\n var img = fabric.util.createImage();\n /** @ignore */\n\n var onLoadCallback = function onLoadCallback() {\n callback && callback.call(context, img);\n img = img.onload = img.onerror = null;\n };\n\n img.onload = onLoadCallback;\n /** @ignore */\n\n img.onerror = function () {\n fabric.log('Error loading ' + img.src);\n callback && callback.call(context, null, true);\n img = img.onload = img.onerror = null;\n }; // data-urls appear to be buggy with crossOrigin\n // https://github.com/kangax/fabric.js/commit/d0abb90f1cd5c5ef9d2a94d3fb21a22330da3e0a#commitcomment-4513767\n // see https://code.google.com/p/chromium/issues/detail?id=315152\n // https://bugzilla.mozilla.org/show_bug.cgi?id=935069\n\n\n if (url.indexOf('data') !== 0 && crossOrigin) {\n img.crossOrigin = crossOrigin; // Bust cache, otherwise Chrome will run into a crossorigin error\n\n url = new URL(url);\n url.searchParams.set(\"t\", Date.now());\n url = url.toString();\n } // IE10 / IE11-Fix: SVG contents from data: URI\n // will only be available if the IMG is present\n // in the DOM (and visible)\n\n\n if (url.substring(0, 14) === 'data:image/svg') {\n img.onload = null;\n fabric.util.loadImageInDom(img, onLoadCallback);\n }\n\n img.src = url;\n },\n\n /**\n * Attaches SVG image with data: URL to the dom\n * @memberOf fabric.util\n * @param {Object} img Image object with data:image/svg src\n * @param {Function} callback Callback; invoked with loaded image\n * @return {Object} DOM element (div containing the SVG image)\n */\n loadImageInDom: function loadImageInDom(img, onLoadCallback) {\n var div = fabric.document.createElement('div');\n div.style.width = div.style.height = '1px';\n div.style.left = div.style.top = '-100%';\n div.style.position = 'absolute';\n div.appendChild(img);\n fabric.document.querySelector('body').appendChild(div);\n /**\n * Wrap in function to:\n * 1. Call existing callback\n * 2. Cleanup DOM\n */\n\n img.onload = function () {\n onLoadCallback();\n div.parentNode.removeChild(div);\n div = null;\n };\n },\n\n /**\n * Creates corresponding fabric instances from their object representations\n * @static\n * @memberOf fabric.util\n * @param {Array} objects Objects to enliven\n * @param {Function} callback Callback to invoke when all objects are created\n * @param {String} namespace Namespace to get klass \"Class\" object from\n * @param {Function} reviver Method for further parsing of object elements,\n * called after each fabric object created.\n */\n enlivenObjects: function enlivenObjects(objects, callback, namespace, reviver) {\n objects = objects || [];\n var enlivenedObjects = [],\n numLoadedObjects = 0,\n numTotalObjects = objects.length;\n\n function onLoaded() {\n if (++numLoadedObjects === numTotalObjects) {\n callback && callback(enlivenedObjects.filter(function (obj) {\n // filter out undefined objects (objects that gave error)\n return obj;\n }));\n }\n }\n\n if (!numTotalObjects) {\n callback && callback(enlivenedObjects);\n return;\n }\n\n objects.forEach(function (o, index) {\n // if sparse array\n if (!o || !o.type) {\n onLoaded();\n return;\n }\n\n var klass = fabric.util.getKlass(o.type, namespace);\n klass.fromObject(o, function (obj, error) {\n error || (enlivenedObjects[index] = obj);\n reviver && reviver(o, obj, error);\n onLoaded();\n });\n });\n },\n\n /**\n * Create and wait for loading of patterns\n * @static\n * @memberOf fabric.util\n * @param {Array} patterns Objects to enliven\n * @param {Function} callback Callback to invoke when all objects are created\n * called after each fabric object created.\n */\n enlivenPatterns: function enlivenPatterns(patterns, callback) {\n patterns = patterns || [];\n\n function onLoaded() {\n if (++numLoadedPatterns === numPatterns) {\n callback && callback(enlivenedPatterns);\n }\n }\n\n var enlivenedPatterns = [],\n numLoadedPatterns = 0,\n numPatterns = patterns.length;\n\n if (!numPatterns) {\n callback && callback(enlivenedPatterns);\n return;\n }\n\n patterns.forEach(function (p, index) {\n if (p && p.source) {\n new fabric.Pattern(p, function (pattern) {\n enlivenedPatterns[index] = pattern;\n onLoaded();\n });\n } else {\n enlivenedPatterns[index] = p;\n onLoaded();\n }\n });\n },\n\n /**\n * Groups SVG elements (usually those retrieved from SVG document)\n * @static\n * @memberOf fabric.util\n * @param {Array} elements SVG elements to group\n * @param {Object} [options] Options object\n * @param {String} path Value to set sourcePath to\n * @return {fabric.Object|fabric.Group}\n */\n groupSVGElements: function groupSVGElements(elements, options, path) {\n var object;\n\n if (elements && elements.length === 1) {\n return elements[0];\n }\n\n if (options) {\n if (options.width && options.height) {\n options.centerPoint = {\n x: options.width / 2,\n y: options.height / 2\n };\n } else {\n delete options.width;\n delete options.height;\n }\n }\n\n object = new fabric.Group(elements, options);\n\n if (typeof path !== 'undefined') {\n object.sourcePath = path;\n }\n\n return object;\n },\n\n /**\n * Populates an object with properties of another object\n * @static\n * @memberOf fabric.util\n * @param {Object} source Source object\n * @param {Object} destination Destination object\n * @return {Array} properties Properties names to include\n */\n populateWithProperties: function populateWithProperties(source, destination, properties) {\n if (properties && Object.prototype.toString.call(properties) === '[object Array]') {\n for (var i = 0, len = properties.length; i < len; i++) {\n if (properties[i] in source) {\n destination[properties[i]] = source[properties[i]];\n }\n }\n }\n },\n\n /**\n * Draws a dashed line between two points\n *\n * This method is used to draw dashed line around selection area.\n * See <a href=\"http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas\">dotted stroke in canvas</a>\n *\n * @param {CanvasRenderingContext2D} ctx context\n * @param {Number} x start x coordinate\n * @param {Number} y start y coordinate\n * @param {Number} x2 end x coordinate\n * @param {Number} y2 end y coordinate\n * @param {Array} da dash array pattern\n */\n drawDashedLine: function drawDashedLine(ctx, x, y, x2, y2, da) {\n var dx = x2 - x,\n dy = y2 - y,\n len = sqrt(dx * dx + dy * dy),\n rot = atan2(dy, dx),\n dc = da.length,\n di = 0,\n draw = true;\n ctx.save();\n ctx.translate(x, y);\n ctx.moveTo(0, 0);\n ctx.rotate(rot);\n x = 0;\n\n while (len > x) {\n x += da[di++ % dc];\n\n if (x > len) {\n x = len;\n }\n\n ctx[draw ? 'lineTo' : 'moveTo'](x, 0);\n draw = !draw;\n }\n\n ctx.restore();\n },\n\n /**\n * Creates canvas element\n * @static\n * @memberOf fabric.util\n * @return {CanvasElement} initialized canvas element\n */\n createCanvasElement: function createCanvasElement() {\n return fabric.document.createElement('canvas');\n },\n\n /**\n * Creates a canvas element that is a copy of another and is also painted\n * @param {CanvasElement} canvas to copy size and content of\n * @static\n * @memberOf fabric.util\n * @return {CanvasElement} initialized canvas element\n */\n copyCanvasElement: function copyCanvasElement(canvas) {\n var newCanvas = fabric.util.createCanvasElement();\n newCanvas.width = canvas.width;\n newCanvas.height = canvas.height;\n newCanvas.getContext('2d').drawImage(canvas, 0, 0);\n return newCanvas;\n },\n\n /**\n * since 2.6.0 moved from canvas instance to utility.\n * @param {CanvasElement} canvasEl to copy size and content of\n * @param {String} format 'jpeg' or 'png', in some browsers 'webp' is ok too\n * @param {Number} quality <= 1 and > 0\n * @static\n * @memberOf fabric.util\n * @return {String} data url\n */\n toDataURL: function toDataURL(canvasEl, format, quality) {\n return canvasEl.toDataURL('image/' + format, quality);\n },\n\n /**\n * Creates image element (works on client and node)\n * @static\n * @memberOf fabric.util\n * @return {HTMLImageElement} HTML image element\n */\n createImage: function createImage() {\n return fabric.document.createElement('img');\n },\n\n /**\n * @static\n * @memberOf fabric.util\n * @deprecated since 2.0.0\n * @param {fabric.Object} receiver Object implementing `clipTo` method\n * @param {CanvasRenderingContext2D} ctx Context to clip\n */\n clipContext: function clipContext(receiver, ctx) {\n ctx.save();\n ctx.beginPath();\n receiver.clipTo(ctx);\n ctx.clip();\n },\n\n /**\n * Multiply matrix A by matrix B to nest transformations\n * @static\n * @memberOf fabric.util\n * @param {Array} a First transformMatrix\n * @param {Array} b Second transformMatrix\n * @param {Boolean} is2x2 flag to multiply matrices as 2x2 matrices\n * @return {Array} The product of the two transform matrices\n */\n multiplyTransformMatrices: function multiplyTransformMatrices(a, b, is2x2) {\n // Matrix multiply a * b\n return [a[0] * b[0] + a[2] * b[1], a[1] * b[0] + a[3] * b[1], a[0] * b[2] + a[2] * b[3], a[1] * b[2] + a[3] * b[3], is2x2 ? 0 : a[0] * b[4] + a[2] * b[5] + a[4], is2x2 ? 0 : a[1] * b[4] + a[3] * b[5] + a[5]];\n },\n\n /**\n * Decomposes standard 2x3 matrix into transform components\n * @static\n * @memberOf fabric.util\n * @param {Array} a transformMatrix\n * @return {Object} Components of transform\n */\n qrDecompose: function qrDecompose(a) {\n var angle = atan2(a[1], a[0]),\n denom = pow(a[0], 2) + pow(a[1], 2),\n scaleX = sqrt(denom),\n scaleY = (a[0] * a[3] - a[2] * a[1]) / scaleX,\n skewX = atan2(a[0] * a[2] + a[1] * a[3], denom);\n return {\n angle: angle / PiBy180,\n scaleX: scaleX,\n scaleY: scaleY,\n skewX: skewX / PiBy180,\n skewY: 0,\n translateX: a[4],\n translateY: a[5]\n };\n },\n\n /**\n * Returns a transform matrix starting from an object of the same kind of\n * the one returned from qrDecompose, useful also if you want to calculate some\n * transformations from an object that is not enlived yet\n * @static\n * @memberOf fabric.util\n * @param {Object} options\n * @param {Number} [options.angle] angle in degrees\n * @return {Number[]} transform matrix\n */\n calcRotateMatrix: function calcRotateMatrix(options) {\n if (!options.angle) {\n return fabric.iMatrix.concat();\n }\n\n var theta = fabric.util.degreesToRadians(options.angle),\n cos = fabric.util.cos(theta),\n sin = fabric.util.sin(theta);\n return [cos, sin, -sin, cos, 0, 0];\n },\n\n /**\n * Returns a transform matrix starting from an object of the same kind of\n * the one returned from qrDecompose, useful also if you want to calculate some\n * transformations from an object that is not enlived yet.\n * is called DimensionsTransformMatrix because those properties are the one that influence\n * the size of the resulting box of the object.\n * @static\n * @memberOf fabric.util\n * @param {Object} options\n * @param {Number} [options.scaleX]\n * @param {Number} [options.scaleY]\n * @param {Boolean} [options.flipX]\n * @param {Boolean} [options.flipY]\n * @param {Number} [options.skewX]\n * @param {Number} [options.skewX]\n * @return {Number[]} transform matrix\n */\n calcDimensionsMatrix: function calcDimensionsMatrix(options) {\n var scaleX = typeof options.scaleX === 'undefined' ? 1 : options.scaleX,\n scaleY = typeof options.scaleY === 'undefined' ? 1 : options.scaleY,\n scaleMatrix = [options.flipX ? -scaleX : scaleX, 0, 0, options.flipY ? -scaleY : scaleY, 0, 0],\n multiply = fabric.util.multiplyTransformMatrices,\n degreesToRadians = fabric.util.degreesToRadians;\n\n if (options.skewX) {\n scaleMatrix = multiply(scaleMatrix, [1, 0, Math.tan(degreesToRadians(options.skewX)), 1], true);\n }\n\n if (options.skewY) {\n scaleMatrix = multiply(scaleMatrix, [1, Math.tan(degreesToRadians(options.skewY)), 0, 1], true);\n }\n\n return scaleMatrix;\n },\n\n /**\n * Returns a transform matrix starting from an object of the same kind of\n * the one returned from qrDecompose, useful also if you want to calculate some\n * transformations from an object that is not enlived yet\n * @static\n * @memberOf fabric.util\n * @param {Object} options\n * @param {Number} [options.angle]\n * @param {Number} [options.scaleX]\n * @param {Number} [options.scaleY]\n * @param {Boolean} [options.flipX]\n * @param {Boolean} [options.flipY]\n * @param {Number} [options.skewX]\n * @param {Number} [options.skewX]\n * @param {Number} [options.translateX]\n * @param {Number} [options.translateY]\n * @return {Number[]} transform matrix\n */\n composeMatrix: function composeMatrix(options) {\n var matrix = [1, 0, 0, 1, options.translateX || 0, options.translateY || 0],\n multiply = fabric.util.multiplyTransformMatrices;\n\n if (options.angle) {\n matrix = multiply(matrix, fabric.util.calcRotateMatrix(options));\n }\n\n if (options.scaleX || options.scaleY || options.skewX || options.skewY || options.flipX || options.flipY) {\n matrix = multiply(matrix, fabric.util.calcDimensionsMatrix(options));\n }\n\n return matrix;\n },\n\n /**\n * Returns a transform matrix that has the same effect of scaleX, scaleY and skewX.\n * Is deprecated for composeMatrix. Please do not use it.\n * @static\n * @deprecated since 3.4.0\n * @memberOf fabric.util\n * @param {Number} scaleX\n * @param {Number} scaleY\n * @param {Number} skewX\n * @return {Number[]} transform matrix\n */\n customTransformMatrix: function customTransformMatrix(scaleX, scaleY, skewX) {\n return fabric.util.composeMatrix({\n scaleX: scaleX,\n scaleY: scaleY,\n skewX: skewX\n });\n },\n\n /**\n * reset an object transform state to neutral. Top and left are not accounted for\n * @static\n * @memberOf fabric.util\n * @param {fabric.Object} target object to transform\n */\n resetObjectTransform: function resetObjectTransform(target) {\n target.scaleX = 1;\n target.scaleY = 1;\n target.skewX = 0;\n target.skewY = 0;\n target.flipX = false;\n target.flipY = false;\n target.rotate(0);\n },\n\n /**\n * Extract Object transform values\n * @static\n * @memberOf fabric.util\n * @param {fabric.Object} target object to read from\n * @return {Object} Components of transform\n */\n saveObjectTransform: function saveObjectTransform(target) {\n return {\n scaleX: target.scaleX,\n scaleY: target.scaleY,\n skewX: target.skewX,\n skewY: target.skewY,\n angle: target.angle,\n left: target.left,\n flipX: target.flipX,\n flipY: target.flipY,\n top: target.top\n };\n },\n\n /**\n * Returns string representation of function body\n * @param {Function} fn Function to get body of\n * @return {String} Function body\n */\n getFunctionBody: function getFunctionBody(fn) {\n return (String(fn).match(/function[^{]*\\{([\\s\\S]*)\\}/) || {})[1];\n },\n\n /**\n * Returns true if context has transparent pixel\n * at specified location (taking tolerance into account)\n * @param {CanvasRenderingContext2D} ctx context\n * @param {Number} x x coordinate\n * @param {Number} y y coordinate\n * @param {Number} tolerance Tolerance\n */\n isTransparent: function isTransparent(ctx, x, y, tolerance) {\n // If tolerance is > 0 adjust start coords to take into account.\n // If moves off Canvas fix to 0\n if (tolerance > 0) {\n if (x > tolerance) {\n x -= tolerance;\n } else {\n x = 0;\n }\n\n if (y > tolerance) {\n y -= tolerance;\n } else {\n y = 0;\n }\n }\n\n var _isTransparent = true,\n i,\n temp,\n imageData = ctx.getImageData(x, y, tolerance * 2 || 1, tolerance * 2 || 1),\n l = imageData.data.length; // Split image data - for tolerance > 1, pixelDataSize = 4;\n\n for (i = 3; i < l; i += 4) {\n temp = imageData.data[i];\n _isTransparent = temp <= 0;\n\n if (_isTransparent === false) {\n break; // Stop if colour found\n }\n }\n\n imageData = null;\n return _isTransparent;\n },\n\n /**\n * Parse preserveAspectRatio attribute from element\n * @param {string} attribute to be parsed\n * @return {Object} an object containing align and meetOrSlice attribute\n */\n parsePreserveAspectRatioAttribute: function parsePreserveAspectRatioAttribute(attribute) {\n var meetOrSlice = 'meet',\n alignX = 'Mid',\n alignY = 'Mid',\n aspectRatioAttrs = attribute.split(' '),\n align;\n\n if (aspectRatioAttrs && aspectRatioAttrs.length) {\n meetOrSlice = aspectRatioAttrs.pop();\n\n if (meetOrSlice !== 'meet' && meetOrSlice !== 'slice') {\n align = meetOrSlice;\n meetOrSlice = 'meet';\n } else if (aspectRatioAttrs.length) {\n align = aspectRatioAttrs.pop();\n }\n } //divide align in alignX and alignY\n\n\n alignX = align !== 'none' ? align.slice(1, 4) : 'none';\n alignY = align !== 'none' ? align.slice(5, 8) : 'none';\n return {\n meetOrSlice: meetOrSlice,\n alignX: alignX,\n alignY: alignY\n };\n },\n\n /**\n * Clear char widths cache for the given font family or all the cache if no\n * fontFamily is specified.\n * Use it if you know you are loading fonts in a lazy way and you are not waiting\n * for custom fonts to load properly when adding text objects to the canvas.\n * If a text object is added when its own font is not loaded yet, you will get wrong\n * measurement and so wrong bounding boxes.\n * After the font cache is cleared, either change the textObject text content or call\n * initDimensions() to trigger a recalculation\n * @memberOf fabric.util\n * @param {String} [fontFamily] font family to clear\n */\n clearFabricFontCache: function clearFabricFontCache(fontFamily) {\n fontFamily = (fontFamily || '').toLowerCase();\n\n if (!fontFamily) {\n fabric.charWidthsCache = {};\n } else if (fabric.charWidthsCache[fontFamily]) {\n delete fabric.charWidthsCache[fontFamily];\n }\n },\n\n /**\n * Given current aspect ratio, determines the max width and height that can\n * respect the total allowed area for the cache.\n * @memberOf fabric.util\n * @param {Number} ar aspect ratio\n * @param {Number} maximumArea Maximum area you want to achieve\n * @return {Object.x} Limited dimensions by X\n * @return {Object.y} Limited dimensions by Y\n */\n limitDimsByArea: function limitDimsByArea(ar, maximumArea) {\n var roughWidth = Math.sqrt(maximumArea * ar),\n perfLimitSizeY = Math.floor(maximumArea / roughWidth);\n return {\n x: Math.floor(roughWidth),\n y: perfLimitSizeY\n };\n },\n capValue: function capValue(min, value, max) {\n return Math.max(min, Math.min(value, max));\n },\n\n /**\n * Finds the scale for the object source to fit inside the object destination,\n * keeping aspect ratio intact.\n * respect the total allowed area for the cache.\n * @memberOf fabric.util\n * @param {Object | fabric.Object} source\n * @param {Number} source.height natural unscaled height of the object\n * @param {Number} source.width natural unscaled width of the object\n * @param {Object | fabric.Object} destination\n * @param {Number} destination.height natural unscaled height of the object\n * @param {Number} destination.width natural unscaled width of the object\n * @return {Number} scale factor to apply to source to fit into destination\n */\n findScaleToFit: function findScaleToFit(source, destination) {\n return Math.min(destination.width / source.width, destination.height / source.height);\n },\n\n /**\n * Finds the scale for the object source to cover entirely the object destination,\n * keeping aspect ratio intact.\n * respect the total allowed area for the cache.\n * @memberOf fabric.util\n * @param {Object | fabric.Object} source\n * @param {Number} source.height natural unscaled height of the object\n * @param {Number} source.width natural unscaled width of the object\n * @param {Object | fabric.Object} destination\n * @param {Number} destination.height natural unscaled height of the object\n * @param {Number} destination.width natural unscaled width of the object\n * @return {Number} scale factor to apply to source to cover destination\n */\n findScaleToCover: function findScaleToCover(source, destination) {\n return Math.max(destination.width / source.width, destination.height / source.height);\n },\n\n /**\n * given an array of 6 number returns something like `\"matrix(...numbers)\"`\n * @memberOf fabric.util\n * @param {Array} trasnform an array with 6 numbers\n * @return {String} transform matrix for svg\n * @return {Object.y} Limited dimensions by Y\n */\n matrixToSVG: function matrixToSVG(transform) {\n return 'matrix(' + transform.map(function (value) {\n return fabric.util.toFixed(value, fabric.Object.NUM_FRACTION_DIGITS);\n }).join(' ') + ')';\n }\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function () {\n var _join = Array.prototype.join;\n /* Adapted from http://dxr.mozilla.org/mozilla-central/source/content/svg/content/src/nsSVGPathDataParser.cpp\n * by Andrea Bogazzi code is under MPL. if you don't have a copy of the license you can take it here\n * http://mozilla.org/MPL/2.0/\n */\n\n function arcToSegments(toX, toY, rx, ry, large, sweep, rotateX) {\n var argsString = _join.call(arguments);\n\n if (fabric.arcToSegmentsCache[argsString]) {\n return fabric.arcToSegmentsCache[argsString];\n }\n\n var PI = Math.PI,\n th = rotateX * PI / 180,\n sinTh = fabric.util.sin(th),\n cosTh = fabric.util.cos(th),\n fromX = 0,\n fromY = 0;\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n var px = -cosTh * toX * 0.5 - sinTh * toY * 0.5,\n py = -cosTh * toY * 0.5 + sinTh * toX * 0.5,\n rx2 = rx * rx,\n ry2 = ry * ry,\n py2 = py * py,\n px2 = px * px,\n pl = rx2 * ry2 - rx2 * py2 - ry2 * px2,\n root = 0;\n\n if (pl < 0) {\n var s = Math.sqrt(1 - pl / (rx2 * ry2));\n rx *= s;\n ry *= s;\n } else {\n root = (large === sweep ? -1.0 : 1.0) * Math.sqrt(pl / (rx2 * py2 + ry2 * px2));\n }\n\n var cx = root * rx * py / ry,\n cy = -root * ry * px / rx,\n cx1 = cosTh * cx - sinTh * cy + toX * 0.5,\n cy1 = sinTh * cx + cosTh * cy + toY * 0.5,\n mTheta = calcVectorAngle(1, 0, (px - cx) / rx, (py - cy) / ry),\n dtheta = calcVectorAngle((px - cx) / rx, (py - cy) / ry, (-px - cx) / rx, (-py - cy) / ry);\n\n if (sweep === 0 && dtheta > 0) {\n dtheta -= 2 * PI;\n } else if (sweep === 1 && dtheta < 0) {\n dtheta += 2 * PI;\n } // Convert into cubic bezier segments <= 90deg\n\n\n var segments = Math.ceil(Math.abs(dtheta / PI * 2)),\n result = [],\n mDelta = dtheta / segments,\n mT = 8 / 3 * Math.sin(mDelta / 4) * Math.sin(mDelta / 4) / Math.sin(mDelta / 2),\n th3 = mTheta + mDelta;\n\n for (var i = 0; i < segments; i++) {\n result[i] = segmentToBezier(mTheta, th3, cosTh, sinTh, rx, ry, cx1, cy1, mT, fromX, fromY);\n fromX = result[i][4];\n fromY = result[i][5];\n mTheta = th3;\n th3 += mDelta;\n }\n\n fabric.arcToSegmentsCache[argsString] = result;\n return result;\n }\n\n function segmentToBezier(th2, th3, cosTh, sinTh, rx, ry, cx1, cy1, mT, fromX, fromY) {\n var costh2 = fabric.util.cos(th2),\n sinth2 = fabric.util.sin(th2),\n costh3 = fabric.util.cos(th3),\n sinth3 = fabric.util.sin(th3),\n toX = cosTh * rx * costh3 - sinTh * ry * sinth3 + cx1,\n toY = sinTh * rx * costh3 + cosTh * ry * sinth3 + cy1,\n cp1X = fromX + mT * (-cosTh * rx * sinth2 - sinTh * ry * costh2),\n cp1Y = fromY + mT * (-sinTh * rx * sinth2 + cosTh * ry * costh2),\n cp2X = toX + mT * (cosTh * rx * sinth3 + sinTh * ry * costh3),\n cp2Y = toY + mT * (sinTh * rx * sinth3 - cosTh * ry * costh3);\n return [cp1X, cp1Y, cp2X, cp2Y, toX, toY];\n }\n /*\n * Private\n */\n\n\n function calcVectorAngle(ux, uy, vx, vy) {\n var ta = Math.atan2(uy, ux),\n tb = Math.atan2(vy, vx);\n\n if (tb >= ta) {\n return tb - ta;\n } else {\n return 2 * Math.PI - (ta - tb);\n }\n }\n /**\n * Draws arc\n * @param {CanvasRenderingContext2D} ctx\n * @param {Number} fx\n * @param {Number} fy\n * @param {Array} coords\n */\n\n\n fabric.util.drawArc = function (ctx, fx, fy, coords) {\n var rx = coords[0],\n ry = coords[1],\n rot = coords[2],\n large = coords[3],\n sweep = coords[4],\n tx = coords[5],\n ty = coords[6],\n segs = [[], [], [], []],\n segsNorm = arcToSegments(tx - fx, ty - fy, rx, ry, large, sweep, rot);\n\n for (var i = 0, len = segsNorm.length; i < len; i++) {\n segs[i][0] = segsNorm[i][0] + fx;\n segs[i][1] = segsNorm[i][1] + fy;\n segs[i][2] = segsNorm[i][2] + fx;\n segs[i][3] = segsNorm[i][3] + fy;\n segs[i][4] = segsNorm[i][4] + fx;\n segs[i][5] = segsNorm[i][5] + fy;\n ctx.bezierCurveTo.apply(ctx, segs[i]);\n }\n };\n /**\n * Calculate bounding box of a elliptic-arc\n * @param {Number} fx start point of arc\n * @param {Number} fy\n * @param {Number} rx horizontal radius\n * @param {Number} ry vertical radius\n * @param {Number} rot angle of horizontal axe\n * @param {Number} large 1 or 0, whatever the arc is the big or the small on the 2 points\n * @param {Number} sweep 1 or 0, 1 clockwise or counterclockwise direction\n * @param {Number} tx end point of arc\n * @param {Number} ty\n */\n\n\n fabric.util.getBoundsOfArc = function (fx, fy, rx, ry, rot, large, sweep, tx, ty) {\n var fromX = 0,\n fromY = 0,\n bound,\n bounds = [],\n segs = arcToSegments(tx - fx, ty - fy, rx, ry, large, sweep, rot);\n\n for (var i = 0, len = segs.length; i < len; i++) {\n bound = getBoundsOfCurve(fromX, fromY, segs[i][0], segs[i][1], segs[i][2], segs[i][3], segs[i][4], segs[i][5]);\n bounds.push({\n x: bound[0].x + fx,\n y: bound[0].y + fy\n });\n bounds.push({\n x: bound[1].x + fx,\n y: bound[1].y + fy\n });\n fromX = segs[i][4];\n fromY = segs[i][5];\n }\n\n return bounds;\n };\n /**\n * Calculate bounding box of a beziercurve\n * @param {Number} x0 starting point\n * @param {Number} y0\n * @param {Number} x1 first control point\n * @param {Number} y1\n * @param {Number} x2 secondo control point\n * @param {Number} y2\n * @param {Number} x3 end of beizer\n * @param {Number} y3\n */\n // taken from http://jsbin.com/ivomiq/56/edit no credits available for that.\n\n\n function getBoundsOfCurve(x0, y0, x1, y1, x2, y2, x3, y3) {\n var argsString;\n\n if (fabric.cachesBoundsOfCurve) {\n argsString = _join.call(arguments);\n\n if (fabric.boundsOfCurveCache[argsString]) {\n return fabric.boundsOfCurveCache[argsString];\n }\n }\n\n var sqrt = Math.sqrt,\n min = Math.min,\n max = Math.max,\n abs = Math.abs,\n tvalues = [],\n bounds = [[], []],\n a,\n b,\n c,\n t,\n t1,\n t2,\n b2ac,\n sqrtb2ac;\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n\n for (var i = 0; i < 2; ++i) {\n if (i > 0) {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n\n if (abs(a) < 1e-12) {\n if (abs(b) < 1e-12) {\n continue;\n }\n\n t = -c / b;\n\n if (0 < t && t < 1) {\n tvalues.push(t);\n }\n\n continue;\n }\n\n b2ac = b * b - 4 * c * a;\n\n if (b2ac < 0) {\n continue;\n }\n\n sqrtb2ac = sqrt(b2ac);\n t1 = (-b + sqrtb2ac) / (2 * a);\n\n if (0 < t1 && t1 < 1) {\n tvalues.push(t1);\n }\n\n t2 = (-b - sqrtb2ac) / (2 * a);\n\n if (0 < t2 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n\n var x,\n y,\n j = tvalues.length,\n jlen = j,\n mt;\n\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n x = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n bounds[0][j] = x;\n y = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n bounds[1][j] = y;\n }\n\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n var result = [{\n x: min.apply(null, bounds[0]),\n y: min.apply(null, bounds[1])\n }, {\n x: max.apply(null, bounds[0]),\n y: max.apply(null, bounds[1])\n }];\n\n if (fabric.cachesBoundsOfCurve) {\n fabric.boundsOfCurveCache[argsString] = result;\n }\n\n return result;\n }\n\n fabric.util.getBoundsOfCurve = getBoundsOfCurve;\n})();\n\n(function () {\n var slice = Array.prototype.slice;\n /**\n * Invokes method on all items in a given array\n * @memberOf fabric.util.array\n * @param {Array} array Array to iterate over\n * @param {String} method Name of a method to invoke\n * @return {Array}\n */\n\n function invoke(array, method) {\n var args = slice.call(arguments, 2),\n result = [];\n\n for (var i = 0, len = array.length; i < len; i++) {\n result[i] = args.length ? array[i][method].apply(array[i], args) : array[i][method].call(array[i]);\n }\n\n return result;\n }\n /**\n * Finds maximum value in array (not necessarily \"first\" one)\n * @memberOf fabric.util.array\n * @param {Array} array Array to iterate over\n * @param {String} byProperty\n * @return {*}\n */\n\n\n function max(array, byProperty) {\n return find(array, byProperty, function (value1, value2) {\n return value1 >= value2;\n });\n }\n /**\n * Finds minimum value in array (not necessarily \"first\" one)\n * @memberOf fabric.util.array\n * @param {Array} array Array to iterate over\n * @param {String} byProperty\n * @return {*}\n */\n\n\n function min(array, byProperty) {\n return find(array, byProperty, function (value1, value2) {\n return value1 < value2;\n });\n }\n /**\n * @private\n */\n\n\n function fill(array, value) {\n var k = array.length;\n\n while (k--) {\n array[k] = value;\n }\n\n return array;\n }\n /**\n * @private\n */\n\n\n function find(array, byProperty, condition) {\n if (!array || array.length === 0) {\n return;\n }\n\n var i = array.length - 1,\n result = byProperty ? array[i][byProperty] : array[i];\n\n if (byProperty) {\n while (i--) {\n if (condition(array[i][byProperty], result)) {\n result = array[i][byProperty];\n }\n }\n } else {\n while (i--) {\n if (condition(array[i], result)) {\n result = array[i];\n }\n }\n }\n\n return result;\n }\n /**\n * @namespace fabric.util.array\n */\n\n\n fabric.util.array = {\n fill: fill,\n invoke: invoke,\n min: min,\n max: max\n };\n})();\n\n(function () {\n /**\n * Copies all enumerable properties of one js object to another\n * this does not and cannot compete with generic utils.\n * Does not clone or extend fabric.Object subclasses.\n * This is mostly for internal use and has extra handling for fabricJS objects\n * it skips the canvas property in deep cloning.\n * @memberOf fabric.util.object\n * @param {Object} destination Where to copy to\n * @param {Object} source Where to copy from\n * @return {Object}\n */\n function extend(destination, source, deep) {\n // JScript DontEnum bug is not taken care of\n // the deep clone is for internal use, is not meant to avoid\n // javascript traps or cloning html element or self referenced objects.\n if (deep) {\n if (!fabric.isLikelyNode && source instanceof Element) {\n // avoid cloning deep images, canvases,\n destination = source;\n } else if (source instanceof Array) {\n destination = [];\n\n for (var i = 0, len = source.length; i < len; i++) {\n destination[i] = extend({}, source[i], deep);\n }\n } else if (source && _typeof(source) === 'object') {\n for (var property in source) {\n if (property === 'canvas') {\n destination[property] = extend({}, source[property]);\n } else if (source.hasOwnProperty(property)) {\n destination[property] = extend({}, source[property], deep);\n }\n }\n } else {\n // this sounds odd for an extend but is ok for recursive use\n destination = source;\n }\n } else {\n for (var property in source) {\n destination[property] = source[property];\n }\n }\n\n return destination;\n }\n /**\n * Creates an empty object and copies all enumerable properties of another object to it\n * @memberOf fabric.util.object\n * TODO: this function return an empty object if you try to clone null\n * @param {Object} object Object to clone\n * @return {Object}\n */\n\n\n function clone(object, deep) {\n return extend({}, object, deep);\n }\n /** @namespace fabric.util.object */\n\n\n fabric.util.object = {\n extend: extend,\n clone: clone\n };\n fabric.util.object.extend(fabric.util, fabric.Observable);\n})();\n\n(function () {\n /**\n * Camelizes a string\n * @memberOf fabric.util.string\n * @param {String} string String to camelize\n * @return {String} Camelized version of a string\n */\n function camelize(string) {\n return string.replace(/-+(.)?/g, function (match, character) {\n return character ? character.toUpperCase() : '';\n });\n }\n /**\n * Capitalizes a string\n * @memberOf fabric.util.string\n * @param {String} string String to capitalize\n * @param {Boolean} [firstLetterOnly] If true only first letter is capitalized\n * and other letters stay untouched, if false first letter is capitalized\n * and other letters are converted to lowercase.\n * @return {String} Capitalized version of a string\n */\n\n\n function capitalize(string, firstLetterOnly) {\n return string.charAt(0).toUpperCase() + (firstLetterOnly ? string.slice(1) : string.slice(1).toLowerCase());\n }\n /**\n * Escapes XML in a string\n * @memberOf fabric.util.string\n * @param {String} string String to escape\n * @return {String} Escaped version of a string\n */\n\n\n function escapeXml(string) {\n return string.replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>');\n }\n /**\n * Divide a string in the user perceived single units\n * @memberOf fabric.util.string\n * @param {String} textstring String to escape\n * @return {Array} array containing the graphemes\n */\n\n\n function graphemeSplit(textstring) {\n var i = 0,\n chr,\n graphemes = [];\n\n for (i = 0, chr; i < textstring.length; i++) {\n if ((chr = getWholeChar(textstring, i)) === false) {\n continue;\n }\n\n graphemes.push(chr);\n }\n\n return graphemes;\n } // taken from mdn in the charAt doc page.\n\n\n function getWholeChar(str, i) {\n var code = str.charCodeAt(i);\n\n if (isNaN(code)) {\n return ''; // Position not found\n }\n\n if (code < 0xD800 || code > 0xDFFF) {\n return str.charAt(i);\n } // High surrogate (could change last hex to 0xDB7F to treat high private\n // surrogates as single characters)\n\n\n if (0xD800 <= code && code <= 0xDBFF) {\n if (str.length <= i + 1) {\n throw 'High surrogate without following low surrogate';\n }\n\n var next = str.charCodeAt(i + 1);\n\n if (0xDC00 > next || next > 0xDFFF) {\n throw 'High surrogate without following low surrogate';\n }\n\n return str.charAt(i) + str.charAt(i + 1);\n } // Low surrogate (0xDC00 <= code && code <= 0xDFFF)\n\n\n if (i === 0) {\n throw 'Low surrogate without preceding high surrogate';\n }\n\n var prev = str.charCodeAt(i - 1); // (could change last hex to 0xDB7F to treat high private\n // surrogates as single characters)\n\n if (0xD800 > prev || prev > 0xDBFF) {\n throw 'Low surrogate without preceding high surrogate';\n } // We can pass over low surrogates now as the second component\n // in a pair which we have already processed\n\n\n return false;\n }\n /**\n * String utilities\n * @namespace fabric.util.string\n */\n\n\n fabric.util.string = {\n camelize: camelize,\n capitalize: capitalize,\n escapeXml: escapeXml,\n graphemeSplit: graphemeSplit\n };\n})();\n\n(function () {\n var slice = Array.prototype.slice,\n emptyFunction = function emptyFunction() {},\n IS_DONTENUM_BUGGY = function () {\n for (var p in {\n toString: 1\n }) {\n if (p === 'toString') {\n return false;\n }\n }\n\n return true;\n }(),\n\n /** @ignore */\n addMethods = function addMethods(klass, source, parent) {\n for (var property in source) {\n if (property in klass.prototype && typeof klass.prototype[property] === 'function' && (source[property] + '').indexOf('callSuper') > -1) {\n klass.prototype[property] = function (property) {\n return function () {\n var superclass = this.constructor.superclass;\n this.constructor.superclass = parent;\n var returnValue = source[property].apply(this, arguments);\n this.constructor.superclass = superclass;\n\n if (property !== 'initialize') {\n return returnValue;\n }\n };\n }(property);\n } else {\n klass.prototype[property] = source[property];\n }\n\n if (IS_DONTENUM_BUGGY) {\n if (source.toString !== Object.prototype.toString) {\n klass.prototype.toString = source.toString;\n }\n\n if (source.valueOf !== Object.prototype.valueOf) {\n klass.prototype.valueOf = source.valueOf;\n }\n }\n }\n };\n\n function Subclass() {}\n\n function callSuper(methodName) {\n var parentMethod = null,\n _this = this; // climb prototype chain to find method not equal to callee's method\n\n\n while (_this.constructor.superclass) {\n var superClassMethod = _this.constructor.superclass.prototype[methodName];\n\n if (_this[methodName] !== superClassMethod) {\n parentMethod = superClassMethod;\n break;\n } // eslint-disable-next-line\n\n\n _this = _this.constructor.superclass.prototype;\n }\n\n if (!parentMethod) {\n return console.log('tried to callSuper ' + methodName + ', method not found in prototype chain', this);\n }\n\n return arguments.length > 1 ? parentMethod.apply(this, slice.call(arguments, 1)) : parentMethod.call(this);\n }\n /**\n * Helper for creation of \"classes\".\n * @memberOf fabric.util\n * @param {Function} [parent] optional \"Class\" to inherit from\n * @param {Object} [properties] Properties shared by all instances of this class\n * (be careful modifying objects defined here as this would affect all instances)\n */\n\n\n function createClass() {\n var parent = null,\n properties = slice.call(arguments, 0);\n\n if (typeof properties[0] === 'function') {\n parent = properties.shift();\n }\n\n function klass() {\n this.initialize.apply(this, arguments);\n }\n\n klass.superclass = parent;\n klass.subclasses = [];\n\n if (parent) {\n Subclass.prototype = parent.prototype;\n klass.prototype = new Subclass();\n parent.subclasses.push(klass);\n }\n\n for (var i = 0, length = properties.length; i < length; i++) {\n addMethods(klass, properties[i], parent);\n }\n\n if (!klass.prototype.initialize) {\n klass.prototype.initialize = emptyFunction;\n }\n\n klass.prototype.constructor = klass;\n klass.prototype.callSuper = callSuper;\n return klass;\n }\n\n fabric.util.createClass = createClass;\n})();\n\n(function () {\n // since ie10 or ie9 can use addEventListener but they do not support options, i need to check\n var couldUseAttachEvent = !!fabric.document.createElement('div').attachEvent;\n /**\n * Adds an event listener to an element\n * @function\n * @memberOf fabric.util\n * @param {HTMLElement} element\n * @param {String} eventName\n * @param {Function} handler\n */\n\n fabric.util.addListener = function (element, eventName, handler, options) {\n element && element.addEventListener(eventName, handler, couldUseAttachEvent ? false : options);\n };\n /**\n * Removes an event listener from an element\n * @function\n * @memberOf fabric.util\n * @param {HTMLElement} element\n * @param {String} eventName\n * @param {Function} handler\n */\n\n\n fabric.util.removeListener = function (element, eventName, handler, options) {\n element && element.removeEventListener(eventName, handler, couldUseAttachEvent ? false : options);\n };\n\n function getTouchInfo(event) {\n var touchProp = event.changedTouches;\n\n if (touchProp && touchProp[0]) {\n return touchProp[0];\n }\n\n return event;\n }\n\n fabric.util.getPointer = function (event) {\n var element = event.target,\n scroll = fabric.util.getScrollLeftTop(element),\n _evt = getTouchInfo(event);\n\n return {\n x: _evt.clientX + scroll.left,\n y: _evt.clientY + scroll.top\n };\n };\n})();\n\n(function () {\n /**\n * Cross-browser wrapper for setting element's style\n * @memberOf fabric.util\n * @param {HTMLElement} element\n * @param {Object} styles\n * @return {HTMLElement} Element that was passed as a first argument\n */\n function setStyle(element, styles) {\n var elementStyle = element.style;\n\n if (!elementStyle) {\n return element;\n }\n\n if (typeof styles === 'string') {\n element.style.cssText += ';' + styles;\n return styles.indexOf('opacity') > -1 ? setOpacity(element, styles.match(/opacity:\\s*(\\d?\\.?\\d*)/)[1]) : element;\n }\n\n for (var property in styles) {\n if (property === 'opacity') {\n setOpacity(element, styles[property]);\n } else {\n var normalizedProperty = property === 'float' || property === 'cssFloat' ? typeof elementStyle.styleFloat === 'undefined' ? 'cssFloat' : 'styleFloat' : property;\n elementStyle[normalizedProperty] = styles[property];\n }\n }\n\n return element;\n }\n\n var parseEl = fabric.document.createElement('div'),\n supportsOpacity = typeof parseEl.style.opacity === 'string',\n supportsFilters = typeof parseEl.style.filter === 'string',\n reOpacity = /alpha\\s*\\(\\s*opacity\\s*=\\s*([^\\)]+)\\)/,\n\n /** @ignore */\n setOpacity = function setOpacity(element) {\n return element;\n };\n\n if (supportsOpacity) {\n /** @ignore */\n setOpacity = function setOpacity(element, value) {\n element.style.opacity = value;\n return element;\n };\n } else if (supportsFilters) {\n /** @ignore */\n setOpacity = function setOpacity(element, value) {\n var es = element.style;\n\n if (element.currentStyle && !element.currentStyle.hasLayout) {\n es.zoom = 1;\n }\n\n if (reOpacity.test(es.filter)) {\n value = value >= 0.9999 ? '' : 'alpha(opacity=' + value * 100 + ')';\n es.filter = es.filter.replace(reOpacity, value);\n } else {\n es.filter += ' alpha(opacity=' + value * 100 + ')';\n }\n\n return element;\n };\n }\n\n fabric.util.setStyle = setStyle;\n})();\n\n(function () {\n var _slice = Array.prototype.slice;\n /**\n * Takes id and returns an element with that id (if one exists in a document)\n * @memberOf fabric.util\n * @param {String|HTMLElement} id\n * @return {HTMLElement|null}\n */\n\n function getById(id) {\n return typeof id === 'string' ? fabric.document.getElementById(id) : id;\n }\n\n var sliceCanConvertNodelists,\n\n /**\n * Converts an array-like object (e.g. arguments or NodeList) to an array\n * @memberOf fabric.util\n * @param {Object} arrayLike\n * @return {Array}\n */\n toArray = function toArray(arrayLike) {\n return _slice.call(arrayLike, 0);\n };\n\n try {\n sliceCanConvertNodelists = toArray(fabric.document.childNodes) instanceof Array;\n } catch (err) {}\n\n if (!sliceCanConvertNodelists) {\n toArray = function toArray(arrayLike) {\n var arr = new Array(arrayLike.length),\n i = arrayLike.length;\n\n while (i--) {\n arr[i] = arrayLike[i];\n }\n\n return arr;\n };\n }\n /**\n * Creates specified element with specified attributes\n * @memberOf fabric.util\n * @param {String} tagName Type of an element to create\n * @param {Object} [attributes] Attributes to set on an element\n * @return {HTMLElement} Newly created element\n */\n\n\n function makeElement(tagName, attributes) {\n var el = fabric.document.createElement(tagName);\n\n for (var prop in attributes) {\n if (prop === 'class') {\n el.className = attributes[prop];\n } else if (prop === 'for') {\n el.htmlFor = attributes[prop];\n } else {\n el.setAttribute(prop, attributes[prop]);\n }\n }\n\n return el;\n }\n /**\n * Adds class to an element\n * @memberOf fabric.util\n * @param {HTMLElement} element Element to add class to\n * @param {String} className Class to add to an element\n */\n\n\n function addClass(element, className) {\n if (element && (' ' + element.className + ' ').indexOf(' ' + className + ' ') === -1) {\n element.className += (element.className ? ' ' : '') + className;\n }\n }\n /**\n * Wraps element with another element\n * @memberOf fabric.util\n * @param {HTMLElement} element Element to wrap\n * @param {HTMLElement|String} wrapper Element to wrap with\n * @param {Object} [attributes] Attributes to set on a wrapper\n * @return {HTMLElement} wrapper\n */\n\n\n function wrapElement(element, wrapper, attributes) {\n if (typeof wrapper === 'string') {\n wrapper = makeElement(wrapper, attributes);\n }\n\n if (element.parentNode) {\n element.parentNode.replaceChild(wrapper, element);\n }\n\n wrapper.appendChild(element);\n return wrapper;\n }\n /**\n * Returns element scroll offsets\n * @memberOf fabric.util\n * @param {HTMLElement} element Element to operate on\n * @return {Object} Object with left/top values\n */\n\n\n function getScrollLeftTop(element) {\n var left = 0,\n top = 0,\n docElement = fabric.document.documentElement,\n body = fabric.document.body || {\n scrollLeft: 0,\n scrollTop: 0\n }; // While loop checks (and then sets element to) .parentNode OR .host\n // to account for ShadowDOM. We still want to traverse up out of ShadowDOM,\n // but the .parentNode of a root ShadowDOM node will always be null, instead\n // it should be accessed through .host. See http://stackoverflow.com/a/24765528/4383938\n\n while (element && (element.parentNode || element.host)) {\n // Set element to element parent, or 'host' in case of ShadowDOM\n element = element.parentNode || element.host;\n\n if (element === fabric.document) {\n left = body.scrollLeft || docElement.scrollLeft || 0;\n top = body.scrollTop || docElement.scrollTop || 0;\n } else {\n left += element.scrollLeft || 0;\n top += element.scrollTop || 0;\n }\n\n if (element.nodeType === 1 && element.style.position === 'fixed') {\n break;\n }\n }\n\n return {\n left: left,\n top: top\n };\n }\n /**\n * Returns offset for a given element\n * @function\n * @memberOf fabric.util\n * @param {HTMLElement} element Element to get offset for\n * @return {Object} Object with \"left\" and \"top\" properties\n */\n\n\n function getElementOffset(element) {\n var docElem,\n doc = element && element.ownerDocument,\n box = {\n left: 0,\n top: 0\n },\n offset = {\n left: 0,\n top: 0\n },\n scrollLeftTop,\n offsetAttributes = {\n borderLeftWidth: 'left',\n borderTopWidth: 'top',\n paddingLeft: 'left',\n paddingTop: 'top'\n };\n\n if (!doc) {\n return offset;\n }\n\n for (var attr in offsetAttributes) {\n offset[offsetAttributes[attr]] += parseInt(getElementStyle(element, attr), 10) || 0;\n }\n\n docElem = doc.documentElement;\n\n if (typeof element.getBoundingClientRect !== 'undefined') {\n box = element.getBoundingClientRect();\n }\n\n scrollLeftTop = getScrollLeftTop(element);\n return {\n left: box.left + scrollLeftTop.left - (docElem.clientLeft || 0) + offset.left,\n top: box.top + scrollLeftTop.top - (docElem.clientTop || 0) + offset.top\n };\n }\n /**\n * Returns style attribute value of a given element\n * @memberOf fabric.util\n * @param {HTMLElement} element Element to get style attribute for\n * @param {String} attr Style attribute to get for element\n * @return {String} Style attribute value of the given element.\n */\n\n\n var getElementStyle;\n\n if (fabric.document.defaultView && fabric.document.defaultView.getComputedStyle) {\n getElementStyle = function getElementStyle(element, attr) {\n var style = fabric.document.defaultView.getComputedStyle(element, null);\n return style ? style[attr] : undefined;\n };\n } else {\n getElementStyle = function getElementStyle(element, attr) {\n var value = element.style[attr];\n\n if (!value && element.currentStyle) {\n value = element.currentStyle[attr];\n }\n\n return value;\n };\n }\n\n (function () {\n var style = fabric.document.documentElement.style,\n selectProp = 'userSelect' in style ? 'userSelect' : 'MozUserSelect' in style ? 'MozUserSelect' : 'WebkitUserSelect' in style ? 'WebkitUserSelect' : 'KhtmlUserSelect' in style ? 'KhtmlUserSelect' : '';\n /**\n * Makes element unselectable\n * @memberOf fabric.util\n * @param {HTMLElement} element Element to make unselectable\n * @return {HTMLElement} Element that was passed in\n */\n\n function makeElementUnselectable(element) {\n if (typeof element.onselectstart !== 'undefined') {\n element.onselectstart = fabric.util.falseFunction;\n }\n\n if (selectProp) {\n element.style[selectProp] = 'none';\n } else if (typeof element.unselectable === 'string') {\n element.unselectable = 'on';\n }\n\n return element;\n }\n /**\n * Makes element selectable\n * @memberOf fabric.util\n * @param {HTMLElement} element Element to make selectable\n * @return {HTMLElement} Element that was passed in\n */\n\n\n function makeElementSelectable(element) {\n if (typeof element.onselectstart !== 'undefined') {\n element.onselectstart = null;\n }\n\n if (selectProp) {\n element.style[selectProp] = '';\n } else if (typeof element.unselectable === 'string') {\n element.unselectable = '';\n }\n\n return element;\n }\n\n fabric.util.makeElementUnselectable = makeElementUnselectable;\n fabric.util.makeElementSelectable = makeElementSelectable;\n })();\n\n (function () {\n /**\n * Inserts a script element with a given url into a document; invokes callback, when that script is finished loading\n * @memberOf fabric.util\n * @param {String} url URL of a script to load\n * @param {Function} callback Callback to execute when script is finished loading\n */\n function getScript(url, callback) {\n var headEl = fabric.document.getElementsByTagName('head')[0],\n scriptEl = fabric.document.createElement('script'),\n loading = true;\n /** @ignore */\n\n scriptEl.onload =\n /** @ignore */\n scriptEl.onreadystatechange = function (e) {\n if (loading) {\n if (typeof this.readyState === 'string' && this.readyState !== 'loaded' && this.readyState !== 'complete') {\n return;\n }\n\n loading = false;\n callback(e || fabric.window.event);\n scriptEl = scriptEl.onload = scriptEl.onreadystatechange = null;\n }\n };\n\n scriptEl.src = url;\n headEl.appendChild(scriptEl); // causes issue in Opera\n // headEl.removeChild(scriptEl);\n }\n\n fabric.util.getScript = getScript;\n })();\n\n function getNodeCanvas(element) {\n var impl = fabric.jsdomImplForWrapper(element);\n return impl._canvas || impl._image;\n }\n\n ;\n\n function cleanUpJsdomNode(element) {\n if (!fabric.isLikelyNode) {\n return;\n }\n\n var impl = fabric.jsdomImplForWrapper(element);\n\n if (impl) {\n impl._image = null;\n impl._canvas = null; // unsure if necessary\n\n impl._currentSrc = null;\n impl._attributes = null;\n impl._classList = null;\n }\n }\n\n fabric.util.getById = getById;\n fabric.util.toArray = toArray;\n fabric.util.makeElement = makeElement;\n fabric.util.addClass = addClass;\n fabric.util.wrapElement = wrapElement;\n fabric.util.getScrollLeftTop = getScrollLeftTop;\n fabric.util.getElementOffset = getElementOffset;\n fabric.util.getElementStyle = getElementStyle;\n fabric.util.getNodeCanvas = getNodeCanvas;\n fabric.util.cleanUpJsdomNode = cleanUpJsdomNode;\n})();\n\n(function () {\n function addParamToUrl(url, param) {\n return url + (/\\?/.test(url) ? '&' : '?') + param;\n }\n\n function emptyFn() {}\n /**\n * Cross-browser abstraction for sending XMLHttpRequest\n * @memberOf fabric.util\n * @param {String} url URL to send XMLHttpRequest to\n * @param {Object} [options] Options object\n * @param {String} [options.method=\"GET\"]\n * @param {String} [options.parameters] parameters to append to url in GET or in body\n * @param {String} [options.body] body to send with POST or PUT request\n * @param {Function} options.onComplete Callback to invoke when request is completed\n * @return {XMLHttpRequest} request\n */\n\n\n function request(url, options) {\n options || (options = {});\n\n var method = options.method ? options.method.toUpperCase() : 'GET',\n onComplete = options.onComplete || function () {},\n xhr = new fabric.window.XMLHttpRequest(),\n body = options.body || options.parameters;\n /** @ignore */\n\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n onComplete(xhr);\n xhr.onreadystatechange = emptyFn;\n }\n };\n\n if (method === 'GET') {\n body = null;\n\n if (typeof options.parameters === 'string') {\n url = addParamToUrl(url, options.parameters);\n }\n }\n\n xhr.open(method, url, true);\n\n if (method === 'POST' || method === 'PUT') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n }\n\n xhr.send(body);\n return xhr;\n }\n\n fabric.util.request = request;\n})();\n/**\n * Wrapper around `console.log` (when available)\n * @param {*} [values] Values to log\n */\n\n\nfabric.log = console.log;\n/**\n * Wrapper around `console.warn` (when available)\n * @param {*} [values] Values to log as a warning\n */\n\nfabric.warn = console.warn;\n\n(function () {\n function noop() {\n return false;\n }\n\n function defaultEasing(t, b, c, d) {\n return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;\n }\n /**\n * Changes value from one to another within certain period of time, invoking callbacks as value is being changed.\n * @memberOf fabric.util\n * @param {Object} [options] Animation options\n * @param {Function} [options.onChange] Callback; invoked on every value change\n * @param {Function} [options.onComplete] Callback; invoked when value change is completed\n * @param {Number} [options.startValue=0] Starting value\n * @param {Number} [options.endValue=100] Ending value\n * @param {Number} [options.byValue=100] Value to modify the property by\n * @param {Function} [options.easing] Easing function\n * @param {Number} [options.duration=500] Duration of change (in ms)\n * @param {Function} [options.abort] Additional function with logic. If returns true, onComplete is called.\n */\n\n\n function animate(options) {\n requestAnimFrame(function (timestamp) {\n options || (options = {});\n var start = timestamp || +new Date(),\n duration = options.duration || 500,\n finish = start + duration,\n time,\n onChange = options.onChange || noop,\n abort = options.abort || noop,\n onComplete = options.onComplete || noop,\n easing = options.easing || defaultEasing,\n startValue = 'startValue' in options ? options.startValue : 0,\n endValue = 'endValue' in options ? options.endValue : 100,\n byValue = options.byValue || endValue - startValue;\n options.onStart && options.onStart();\n\n (function tick(ticktime) {\n // TODO: move abort call after calculation\n // and pass (current,valuePerc, timePerc) as arguments\n time = ticktime || +new Date();\n var currentTime = time > finish ? duration : time - start,\n timePerc = currentTime / duration,\n current = easing(currentTime, startValue, byValue, duration),\n valuePerc = Math.abs((current - startValue) / byValue);\n\n if (abort()) {\n onComplete(endValue, 1, 1);\n return;\n }\n\n if (time > finish) {\n onChange(endValue, 1, 1);\n onComplete(endValue, 1, 1);\n return;\n } else {\n onChange(current, valuePerc, timePerc);\n requestAnimFrame(tick);\n }\n })(start);\n });\n }\n\n var _requestAnimFrame = fabric.window.requestAnimationFrame || fabric.window.webkitRequestAnimationFrame || fabric.window.mozRequestAnimationFrame || fabric.window.oRequestAnimationFrame || fabric.window.msRequestAnimationFrame || function (callback) {\n return fabric.window.setTimeout(callback, 1000 / 60);\n };\n\n var _cancelAnimFrame = fabric.window.cancelAnimationFrame || fabric.window.clearTimeout;\n /**\n * requestAnimationFrame polyfill based on http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n * In order to get a precise start time, `requestAnimFrame` should be called as an entry into the method\n * @memberOf fabric.util\n * @param {Function} callback Callback to invoke\n * @param {DOMElement} element optional Element to associate with animation\n */\n\n\n function requestAnimFrame() {\n return _requestAnimFrame.apply(fabric.window, arguments);\n }\n\n function cancelAnimFrame() {\n return _cancelAnimFrame.apply(fabric.window, arguments);\n }\n\n fabric.util.animate = animate;\n fabric.util.requestAnimFrame = requestAnimFrame;\n fabric.util.cancelAnimFrame = cancelAnimFrame;\n})();\n\n(function () {\n // Calculate an in-between color. Returns a \"rgba()\" string.\n // Credit: Edwin Martin <edwin@bitstorm.org>\n // http://www.bitstorm.org/jquery/color-animation/jquery.animate-colors.js\n function calculateColor(begin, end, pos) {\n var color = 'rgba(' + parseInt(begin[0] + pos * (end[0] - begin[0]), 10) + ',' + parseInt(begin[1] + pos * (end[1] - begin[1]), 10) + ',' + parseInt(begin[2] + pos * (end[2] - begin[2]), 10);\n color += ',' + (begin && end ? parseFloat(begin[3] + pos * (end[3] - begin[3])) : 1);\n color += ')';\n return color;\n }\n /**\n * Changes the color from one to another within certain period of time, invoking callbacks as value is being changed.\n * @memberOf fabric.util\n * @param {String} fromColor The starting color in hex or rgb(a) format.\n * @param {String} toColor The starting color in hex or rgb(a) format.\n * @param {Number} [duration] Duration of change (in ms).\n * @param {Object} [options] Animation options\n * @param {Function} [options.onChange] Callback; invoked on every value change\n * @param {Function} [options.onComplete] Callback; invoked when value change is completed\n * @param {Function} [options.colorEasing] Easing function. Note that this function only take two arguments (currentTime, duration). Thus the regular animation easing functions cannot be used.\n * @param {Function} [options.abort] Additional function with logic. If returns true, onComplete is called.\n */\n\n\n function animateColor(fromColor, toColor, duration, options) {\n var startColor = new fabric.Color(fromColor).getSource(),\n endColor = new fabric.Color(toColor).getSource();\n options = options || {};\n fabric.util.animate(fabric.util.object.extend(options, {\n duration: duration || 500,\n startValue: startColor,\n endValue: endColor,\n byValue: endColor,\n easing: function easing(currentTime, startValue, byValue, duration) {\n var posValue = options.colorEasing ? options.colorEasing(currentTime, duration) : 1 - Math.cos(currentTime / duration * (Math.PI / 2));\n return calculateColor(startValue, byValue, posValue);\n }\n }));\n }\n\n fabric.util.animateColor = animateColor;\n})();\n\n(function (global) {\n 'use strict';\n /* Adaptation of work of Kevin Lindsey (kevin@kevlindev.com) */\n\n var fabric = global.fabric || (global.fabric = {});\n\n if (fabric.Point) {\n fabric.warn('fabric.Point is already defined');\n return;\n }\n\n fabric.Point = Point;\n /**\n * Point class\n * @class fabric.Point\n * @memberOf fabric\n * @constructor\n * @param {Number} x\n * @param {Number} y\n * @return {fabric.Point} thisArg\n */\n\n function Point(x, y) {\n this.x = x;\n this.y = y;\n }\n\n Point.prototype =\n /** @lends fabric.Point.prototype */\n {\n type: 'point',\n constructor: Point,\n\n /**\n * Adds another point to this one and returns another one\n * @param {fabric.Point} that\n * @return {fabric.Point} new Point instance with added values\n */\n add: function add(that) {\n return new Point(this.x + that.x, this.y + that.y);\n },\n\n /**\n * Adds another point to this one\n * @param {fabric.Point} that\n * @return {fabric.Point} thisArg\n * @chainable\n */\n addEquals: function addEquals(that) {\n this.x += that.x;\n this.y += that.y;\n return this;\n },\n\n /**\n * Adds value to this point and returns a new one\n * @param {Number} scalar\n * @return {fabric.Point} new Point with added value\n */\n scalarAdd: function scalarAdd(scalar) {\n return new Point(this.x + scalar, this.y + scalar);\n },\n\n /**\n * Adds value to this point\n * @param {Number} scalar\n * @return {fabric.Point} thisArg\n * @chainable\n */\n scalarAddEquals: function scalarAddEquals(scalar) {\n this.x += scalar;\n this.y += scalar;\n return this;\n },\n\n /**\n * Subtracts another point from this point and returns a new one\n * @param {fabric.Point} that\n * @return {fabric.Point} new Point object with subtracted values\n */\n subtract: function subtract(that) {\n return new Point(this.x - that.x, this.y - that.y);\n },\n\n /**\n * Subtracts another point from this point\n * @param {fabric.Point} that\n * @return {fabric.Point} thisArg\n * @chainable\n */\n subtractEquals: function subtractEquals(that) {\n this.x -= that.x;\n this.y -= that.y;\n return this;\n },\n\n /**\n * Subtracts value from this point and returns a new one\n * @param {Number} scalar\n * @return {fabric.Point}\n */\n scalarSubtract: function scalarSubtract(scalar) {\n return new Point(this.x - scalar, this.y - scalar);\n },\n\n /**\n * Subtracts value from this point\n * @param {Number} scalar\n * @return {fabric.Point} thisArg\n * @chainable\n */\n scalarSubtractEquals: function scalarSubtractEquals(scalar) {\n this.x -= scalar;\n this.y -= scalar;\n return this;\n },\n\n /**\n * Multiplies this point by a value and returns a new one\n * TODO: rename in scalarMultiply in 2.0\n * @param {Number} scalar\n * @return {fabric.Point}\n */\n multiply: function multiply(scalar) {\n return new Point(this.x * scalar, this.y * scalar);\n },\n\n /**\n * Multiplies this point by a value\n * TODO: rename in scalarMultiplyEquals in 2.0\n * @param {Number} scalar\n * @return {fabric.Point} thisArg\n * @chainable\n */\n multiplyEquals: function multiplyEquals(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n return this;\n },\n\n /**\n * Divides this point by a value and returns a new one\n * TODO: rename in scalarDivide in 2.0\n * @param {Number} scalar\n * @return {fabric.Point}\n */\n divide: function divide(scalar) {\n return new Point(this.x / scalar, this.y / scalar);\n },\n\n /**\n * Divides this point by a value\n * TODO: rename in scalarDivideEquals in 2.0\n * @param {Number} scalar\n * @return {fabric.Point} thisArg\n * @chainable\n */\n divideEquals: function divideEquals(scalar) {\n this.x /= scalar;\n this.y /= scalar;\n return this;\n },\n\n /**\n * Returns true if this point is equal to another one\n * @param {fabric.Point} that\n * @return {Boolean}\n */\n eq: function eq(that) {\n return this.x === that.x && this.y === that.y;\n },\n\n /**\n * Returns true if this point is less than another one\n * @param {fabric.Point} that\n * @return {Boolean}\n */\n lt: function lt(that) {\n return this.x < that.x && this.y < that.y;\n },\n\n /**\n * Returns true if this point is less than or equal to another one\n * @param {fabric.Point} that\n * @return {Boolean}\n */\n lte: function lte(that) {\n return this.x <= that.x && this.y <= that.y;\n },\n\n /**\n * Returns true if this point is greater another one\n * @param {fabric.Point} that\n * @return {Boolean}\n */\n gt: function gt(that) {\n return this.x > that.x && this.y > that.y;\n },\n\n /**\n * Returns true if this point is greater than or equal to another one\n * @param {fabric.Point} that\n * @return {Boolean}\n */\n gte: function gte(that) {\n return this.x >= that.x && this.y >= that.y;\n },\n\n /**\n * Returns new point which is the result of linear interpolation with this one and another one\n * @param {fabric.Point} that\n * @param {Number} t , position of interpolation, between 0 and 1 default 0.5\n * @return {fabric.Point}\n */\n lerp: function lerp(that, t) {\n if (typeof t === 'undefined') {\n t = 0.5;\n }\n\n t = Math.max(Math.min(1, t), 0);\n return new Point(this.x + (that.x - this.x) * t, this.y + (that.y - this.y) * t);\n },\n\n /**\n * Returns distance from this point and another one\n * @param {fabric.Point} that\n * @return {Number}\n */\n distanceFrom: function distanceFrom(that) {\n var dx = this.x - that.x,\n dy = this.y - that.y;\n return Math.sqrt(dx * dx + dy * dy);\n },\n\n /**\n * Returns the point between this point and another one\n * @param {fabric.Point} that\n * @return {fabric.Point}\n */\n midPointFrom: function midPointFrom(that) {\n return this.lerp(that);\n },\n\n /**\n * Returns a new point which is the min of this and another one\n * @param {fabric.Point} that\n * @return {fabric.Point}\n */\n min: function min(that) {\n return new Point(Math.min(this.x, that.x), Math.min(this.y, that.y));\n },\n\n /**\n * Returns a new point which is the max of this and another one\n * @param {fabric.Point} that\n * @return {fabric.Point}\n */\n max: function max(that) {\n return new Point(Math.max(this.x, that.x), Math.max(this.y, that.y));\n },\n\n /**\n * Returns string representation of this point\n * @return {String}\n */\n toString: function toString() {\n return this.x + ',' + this.y;\n },\n\n /**\n * Sets x/y of this point\n * @param {Number} x\n * @param {Number} y\n * @chainable\n */\n setXY: function setXY(x, y) {\n this.x = x;\n this.y = y;\n return this;\n },\n\n /**\n * Sets x of this point\n * @param {Number} x\n * @chainable\n */\n setX: function setX(x) {\n this.x = x;\n return this;\n },\n\n /**\n * Sets y of this point\n * @param {Number} y\n * @chainable\n */\n setY: function setY(y) {\n this.y = y;\n return this;\n },\n\n /**\n * Sets x/y of this point from another point\n * @param {fabric.Point} that\n * @chainable\n */\n setFromPoint: function setFromPoint(that) {\n this.x = that.x;\n this.y = that.y;\n return this;\n },\n\n /**\n * Swaps x/y of this point and another point\n * @param {fabric.Point} that\n */\n swap: function swap(that) {\n var x = this.x,\n y = this.y;\n this.x = that.x;\n this.y = that.y;\n that.x = x;\n that.y = y;\n },\n\n /**\n * return a cloned instance of the point\n * @return {fabric.Point}\n */\n clone: function clone() {\n return new Point(this.x, this.y);\n }\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n /* Adaptation of work of Kevin Lindsey (kevin@kevlindev.com) */\n\n var fabric = global.fabric || (global.fabric = {});\n\n if (fabric.Intersection) {\n fabric.warn('fabric.Intersection is already defined');\n return;\n }\n /**\n * Intersection class\n * @class fabric.Intersection\n * @memberOf fabric\n * @constructor\n */\n\n\n function Intersection(status) {\n this.status = status;\n this.points = [];\n }\n\n fabric.Intersection = Intersection;\n fabric.Intersection.prototype =\n /** @lends fabric.Intersection.prototype */\n {\n constructor: Intersection,\n\n /**\n * Appends a point to intersection\n * @param {fabric.Point} point\n * @return {fabric.Intersection} thisArg\n * @chainable\n */\n appendPoint: function appendPoint(point) {\n this.points.push(point);\n return this;\n },\n\n /**\n * Appends points to intersection\n * @param {Array} points\n * @return {fabric.Intersection} thisArg\n * @chainable\n */\n appendPoints: function appendPoints(points) {\n this.points = this.points.concat(points);\n return this;\n }\n };\n /**\n * Checks if one line intersects another\n * TODO: rename in intersectSegmentSegment\n * @static\n * @param {fabric.Point} a1\n * @param {fabric.Point} a2\n * @param {fabric.Point} b1\n * @param {fabric.Point} b2\n * @return {fabric.Intersection}\n */\n\n fabric.Intersection.intersectLineLine = function (a1, a2, b1, b2) {\n var result,\n uaT = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x),\n ubT = (a2.x - a1.x) * (a1.y - b1.y) - (a2.y - a1.y) * (a1.x - b1.x),\n uB = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y);\n\n if (uB !== 0) {\n var ua = uaT / uB,\n ub = ubT / uB;\n\n if (0 <= ua && ua <= 1 && 0 <= ub && ub <= 1) {\n result = new Intersection('Intersection');\n result.appendPoint(new fabric.Point(a1.x + ua * (a2.x - a1.x), a1.y + ua * (a2.y - a1.y)));\n } else {\n result = new Intersection();\n }\n } else {\n if (uaT === 0 || ubT === 0) {\n result = new Intersection('Coincident');\n } else {\n result = new Intersection('Parallel');\n }\n }\n\n return result;\n };\n /**\n * Checks if line intersects polygon\n * TODO: rename in intersectSegmentPolygon\n * fix detection of coincident\n * @static\n * @param {fabric.Point} a1\n * @param {fabric.Point} a2\n * @param {Array} points\n * @return {fabric.Intersection}\n */\n\n\n fabric.Intersection.intersectLinePolygon = function (a1, a2, points) {\n var result = new Intersection(),\n length = points.length,\n b1,\n b2,\n inter,\n i;\n\n for (i = 0; i < length; i++) {\n b1 = points[i];\n b2 = points[(i + 1) % length];\n inter = Intersection.intersectLineLine(a1, a2, b1, b2);\n result.appendPoints(inter.points);\n }\n\n if (result.points.length > 0) {\n result.status = 'Intersection';\n }\n\n return result;\n };\n /**\n * Checks if polygon intersects another polygon\n * @static\n * @param {Array} points1\n * @param {Array} points2\n * @return {fabric.Intersection}\n */\n\n\n fabric.Intersection.intersectPolygonPolygon = function (points1, points2) {\n var result = new Intersection(),\n length = points1.length,\n i;\n\n for (i = 0; i < length; i++) {\n var a1 = points1[i],\n a2 = points1[(i + 1) % length],\n inter = Intersection.intersectLinePolygon(a1, a2, points2);\n result.appendPoints(inter.points);\n }\n\n if (result.points.length > 0) {\n result.status = 'Intersection';\n }\n\n return result;\n };\n /**\n * Checks if polygon intersects rectangle\n * @static\n * @param {Array} points\n * @param {fabric.Point} r1\n * @param {fabric.Point} r2\n * @return {fabric.Intersection}\n */\n\n\n fabric.Intersection.intersectPolygonRectangle = function (points, r1, r2) {\n var min = r1.min(r2),\n max = r1.max(r2),\n topRight = new fabric.Point(max.x, min.y),\n bottomLeft = new fabric.Point(min.x, max.y),\n inter1 = Intersection.intersectLinePolygon(min, topRight, points),\n inter2 = Intersection.intersectLinePolygon(topRight, max, points),\n inter3 = Intersection.intersectLinePolygon(max, bottomLeft, points),\n inter4 = Intersection.intersectLinePolygon(bottomLeft, min, points),\n result = new Intersection();\n result.appendPoints(inter1.points);\n result.appendPoints(inter2.points);\n result.appendPoints(inter3.points);\n result.appendPoints(inter4.points);\n\n if (result.points.length > 0) {\n result.status = 'Intersection';\n }\n\n return result;\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {});\n\n if (fabric.Color) {\n fabric.warn('fabric.Color is already defined.');\n return;\n }\n /**\n * Color class\n * The purpose of {@link fabric.Color} is to abstract and encapsulate common color operations;\n * {@link fabric.Color} is a constructor and creates instances of {@link fabric.Color} objects.\n *\n * @class fabric.Color\n * @param {String} color optional in hex or rgb(a) or hsl format or from known color list\n * @return {fabric.Color} thisArg\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-2/#colors}\n */\n\n\n function Color(color) {\n if (!color) {\n this.setSource([0, 0, 0, 1]);\n } else {\n this._tryParsingColor(color);\n }\n }\n\n fabric.Color = Color;\n fabric.Color.prototype =\n /** @lends fabric.Color.prototype */\n {\n /**\n * @private\n * @param {String|Array} color Color value to parse\n */\n _tryParsingColor: function _tryParsingColor(color) {\n var source;\n\n if (color in Color.colorNameMap) {\n color = Color.colorNameMap[color];\n }\n\n if (color === 'transparent') {\n source = [255, 255, 255, 0];\n }\n\n if (!source) {\n source = Color.sourceFromHex(color);\n }\n\n if (!source) {\n source = Color.sourceFromRgb(color);\n }\n\n if (!source) {\n source = Color.sourceFromHsl(color);\n }\n\n if (!source) {\n //if color is not recognize let's make black as canvas does\n source = [0, 0, 0, 1];\n }\n\n if (source) {\n this.setSource(source);\n }\n },\n\n /**\n * Adapted from <a href=\"https://rawgithub.com/mjijackson/mjijackson.github.com/master/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript.html\">https://github.com/mjijackson</a>\n * @private\n * @param {Number} r Red color value\n * @param {Number} g Green color value\n * @param {Number} b Blue color value\n * @return {Array} Hsl color\n */\n _rgbToHsl: function _rgbToHsl(r, g, b) {\n r /= 255;\n g /= 255;\n b /= 255;\n var h,\n s,\n l,\n max = fabric.util.array.max([r, g, b]),\n min = fabric.util.array.min([r, g, b]);\n l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n\n case g:\n h = (b - r) / d + 2;\n break;\n\n case b:\n h = (r - g) / d + 4;\n break;\n }\n\n h /= 6;\n }\n\n return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];\n },\n\n /**\n * Returns source of this color (where source is an array representation; ex: [200, 200, 100, 1])\n * @return {Array}\n */\n getSource: function getSource() {\n return this._source;\n },\n\n /**\n * Sets source of this color (where source is an array representation; ex: [200, 200, 100, 1])\n * @param {Array} source\n */\n setSource: function setSource(source) {\n this._source = source;\n },\n\n /**\n * Returns color representation in RGB format\n * @return {String} ex: rgb(0-255,0-255,0-255)\n */\n toRgb: function toRgb() {\n var source = this.getSource();\n return 'rgb(' + source[0] + ',' + source[1] + ',' + source[2] + ')';\n },\n\n /**\n * Returns color representation in RGBA format\n * @return {String} ex: rgba(0-255,0-255,0-255,0-1)\n */\n toRgba: function toRgba() {\n var source = this.getSource();\n return 'rgba(' + source[0] + ',' + source[1] + ',' + source[2] + ',' + source[3] + ')';\n },\n\n /**\n * Returns color representation in HSL format\n * @return {String} ex: hsl(0-360,0%-100%,0%-100%)\n */\n toHsl: function toHsl() {\n var source = this.getSource(),\n hsl = this._rgbToHsl(source[0], source[1], source[2]);\n\n return 'hsl(' + hsl[0] + ',' + hsl[1] + '%,' + hsl[2] + '%)';\n },\n\n /**\n * Returns color representation in HSLA format\n * @return {String} ex: hsla(0-360,0%-100%,0%-100%,0-1)\n */\n toHsla: function toHsla() {\n var source = this.getSource(),\n hsl = this._rgbToHsl(source[0], source[1], source[2]);\n\n return 'hsla(' + hsl[0] + ',' + hsl[1] + '%,' + hsl[2] + '%,' + source[3] + ')';\n },\n\n /**\n * Returns color representation in HEX format\n * @return {String} ex: FF5555\n */\n toHex: function toHex() {\n var source = this.getSource(),\n r,\n g,\n b;\n r = source[0].toString(16);\n r = r.length === 1 ? '0' + r : r;\n g = source[1].toString(16);\n g = g.length === 1 ? '0' + g : g;\n b = source[2].toString(16);\n b = b.length === 1 ? '0' + b : b;\n return r.toUpperCase() + g.toUpperCase() + b.toUpperCase();\n },\n\n /**\n * Returns color representation in HEXA format\n * @return {String} ex: FF5555CC\n */\n toHexa: function toHexa() {\n var source = this.getSource(),\n a;\n a = Math.round(source[3] * 255);\n a = a.toString(16);\n a = a.length === 1 ? '0' + a : a;\n return this.toHex() + a.toUpperCase();\n },\n\n /**\n * Gets value of alpha channel for this color\n * @return {Number} 0-1\n */\n getAlpha: function getAlpha() {\n return this.getSource()[3];\n },\n\n /**\n * Sets value of alpha channel for this color\n * @param {Number} alpha Alpha value 0-1\n * @return {fabric.Color} thisArg\n */\n setAlpha: function setAlpha(alpha) {\n var source = this.getSource();\n source[3] = alpha;\n this.setSource(source);\n return this;\n },\n\n /**\n * Transforms color to its grayscale representation\n * @return {fabric.Color} thisArg\n */\n toGrayscale: function toGrayscale() {\n var source = this.getSource(),\n average = parseInt((source[0] * 0.3 + source[1] * 0.59 + source[2] * 0.11).toFixed(0), 10),\n currentAlpha = source[3];\n this.setSource([average, average, average, currentAlpha]);\n return this;\n },\n\n /**\n * Transforms color to its black and white representation\n * @param {Number} threshold\n * @return {fabric.Color} thisArg\n */\n toBlackWhite: function toBlackWhite(threshold) {\n var source = this.getSource(),\n average = (source[0] * 0.3 + source[1] * 0.59 + source[2] * 0.11).toFixed(0),\n currentAlpha = source[3];\n threshold = threshold || 127;\n average = Number(average) < Number(threshold) ? 0 : 255;\n this.setSource([average, average, average, currentAlpha]);\n return this;\n },\n\n /**\n * Overlays color with another color\n * @param {String|fabric.Color} otherColor\n * @return {fabric.Color} thisArg\n */\n overlayWith: function overlayWith(otherColor) {\n if (!(otherColor instanceof Color)) {\n otherColor = new Color(otherColor);\n }\n\n var result = [],\n alpha = this.getAlpha(),\n otherAlpha = 0.5,\n source = this.getSource(),\n otherSource = otherColor.getSource(),\n i;\n\n for (i = 0; i < 3; i++) {\n result.push(Math.round(source[i] * (1 - otherAlpha) + otherSource[i] * otherAlpha));\n }\n\n result[3] = alpha;\n this.setSource(result);\n return this;\n }\n };\n /**\n * Regex matching color in RGB or RGBA formats (ex: rgb(0, 0, 0), rgba(255, 100, 10, 0.5), rgba( 255 , 100 , 10 , 0.5 ), rgb(1,1,1), rgba(100%, 60%, 10%, 0.5))\n * @static\n * @field\n * @memberOf fabric.Color\n */\n // eslint-disable-next-line max-len\n\n fabric.Color.reRGBa = /^rgba?\\(\\s*(\\d{1,3}(?:\\.\\d+)?\\%?)\\s*,\\s*(\\d{1,3}(?:\\.\\d+)?\\%?)\\s*,\\s*(\\d{1,3}(?:\\.\\d+)?\\%?)\\s*(?:\\s*,\\s*((?:\\d*\\.?\\d+)?)\\s*)?\\)$/i;\n /**\n * Regex matching color in HSL or HSLA formats (ex: hsl(200, 80%, 10%), hsla(300, 50%, 80%, 0.5), hsla( 300 , 50% , 80% , 0.5 ))\n * @static\n * @field\n * @memberOf fabric.Color\n */\n\n fabric.Color.reHSLa = /^hsla?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3}\\%)\\s*,\\s*(\\d{1,3}\\%)\\s*(?:\\s*,\\s*(\\d+(?:\\.\\d+)?)\\s*)?\\)$/i;\n /**\n * Regex matching color in HEX format (ex: #FF5544CC, #FF5555, 010155, aff)\n * @static\n * @field\n * @memberOf fabric.Color\n */\n\n fabric.Color.reHex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;\n /**\n * Map of the 148 color names with HEX code\n * @static\n * @field\n * @memberOf fabric.Color\n * @see: https://www.w3.org/TR/css3-color/#svg-color\n */\n\n fabric.Color.colorNameMap = {\n aliceblue: '#F0F8FF',\n antiquewhite: '#FAEBD7',\n aqua: '#00FFFF',\n aquamarine: '#7FFFD4',\n azure: '#F0FFFF',\n beige: '#F5F5DC',\n bisque: '#FFE4C4',\n black: '#000000',\n blanchedalmond: '#FFEBCD',\n blue: '#0000FF',\n blueviolet: '#8A2BE2',\n brown: '#A52A2A',\n burlywood: '#DEB887',\n cadetblue: '#5F9EA0',\n chartreuse: '#7FFF00',\n chocolate: '#D2691E',\n coral: '#FF7F50',\n cornflowerblue: '#6495ED',\n cornsilk: '#FFF8DC',\n crimson: '#DC143C',\n cyan: '#00FFFF',\n darkblue: '#00008B',\n darkcyan: '#008B8B',\n darkgoldenrod: '#B8860B',\n darkgray: '#A9A9A9',\n darkgrey: '#A9A9A9',\n darkgreen: '#006400',\n darkkhaki: '#BDB76B',\n darkmagenta: '#8B008B',\n darkolivegreen: '#556B2F',\n darkorange: '#FF8C00',\n darkorchid: '#9932CC',\n darkred: '#8B0000',\n darksalmon: '#E9967A',\n darkseagreen: '#8FBC8F',\n darkslateblue: '#483D8B',\n darkslategray: '#2F4F4F',\n darkslategrey: '#2F4F4F',\n darkturquoise: '#00CED1',\n darkviolet: '#9400D3',\n deeppink: '#FF1493',\n deepskyblue: '#00BFFF',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1E90FF',\n firebrick: '#B22222',\n floralwhite: '#FFFAF0',\n forestgreen: '#228B22',\n fuchsia: '#FF00FF',\n gainsboro: '#DCDCDC',\n ghostwhite: '#F8F8FF',\n gold: '#FFD700',\n goldenrod: '#DAA520',\n gray: '#808080',\n grey: '#808080',\n green: '#008000',\n greenyellow: '#ADFF2F',\n honeydew: '#F0FFF0',\n hotpink: '#FF69B4',\n indianred: '#CD5C5C',\n indigo: '#4B0082',\n ivory: '#FFFFF0',\n khaki: '#F0E68C',\n lavender: '#E6E6FA',\n lavenderblush: '#FFF0F5',\n lawngreen: '#7CFC00',\n lemonchiffon: '#FFFACD',\n lightblue: '#ADD8E6',\n lightcoral: '#F08080',\n lightcyan: '#E0FFFF',\n lightgoldenrodyellow: '#FAFAD2',\n lightgray: '#D3D3D3',\n lightgrey: '#D3D3D3',\n lightgreen: '#90EE90',\n lightpink: '#FFB6C1',\n lightsalmon: '#FFA07A',\n lightseagreen: '#20B2AA',\n lightskyblue: '#87CEFA',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#B0C4DE',\n lightyellow: '#FFFFE0',\n lime: '#00FF00',\n limegreen: '#32CD32',\n linen: '#FAF0E6',\n magenta: '#FF00FF',\n maroon: '#800000',\n mediumaquamarine: '#66CDAA',\n mediumblue: '#0000CD',\n mediumorchid: '#BA55D3',\n mediumpurple: '#9370DB',\n mediumseagreen: '#3CB371',\n mediumslateblue: '#7B68EE',\n mediumspringgreen: '#00FA9A',\n mediumturquoise: '#48D1CC',\n mediumvioletred: '#C71585',\n midnightblue: '#191970',\n mintcream: '#F5FFFA',\n mistyrose: '#FFE4E1',\n moccasin: '#FFE4B5',\n navajowhite: '#FFDEAD',\n navy: '#000080',\n oldlace: '#FDF5E6',\n olive: '#808000',\n olivedrab: '#6B8E23',\n orange: '#FFA500',\n orangered: '#FF4500',\n orchid: '#DA70D6',\n palegoldenrod: '#EEE8AA',\n palegreen: '#98FB98',\n paleturquoise: '#AFEEEE',\n palevioletred: '#DB7093',\n papayawhip: '#FFEFD5',\n peachpuff: '#FFDAB9',\n peru: '#CD853F',\n pink: '#FFC0CB',\n plum: '#DDA0DD',\n powderblue: '#B0E0E6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#FF0000',\n rosybrown: '#BC8F8F',\n royalblue: '#4169E1',\n saddlebrown: '#8B4513',\n salmon: '#FA8072',\n sandybrown: '#F4A460',\n seagreen: '#2E8B57',\n seashell: '#FFF5EE',\n sienna: '#A0522D',\n silver: '#C0C0C0',\n skyblue: '#87CEEB',\n slateblue: '#6A5ACD',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#FFFAFA',\n springgreen: '#00FF7F',\n steelblue: '#4682B4',\n tan: '#D2B48C',\n teal: '#008080',\n thistle: '#D8BFD8',\n tomato: '#FF6347',\n turquoise: '#40E0D0',\n violet: '#EE82EE',\n wheat: '#F5DEB3',\n white: '#FFFFFF',\n whitesmoke: '#F5F5F5',\n yellow: '#FFFF00',\n yellowgreen: '#9ACD32'\n };\n /**\n * @private\n * @param {Number} p\n * @param {Number} q\n * @param {Number} t\n * @return {Number}\n */\n\n function hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n\n if (t > 1) {\n t -= 1;\n }\n\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n\n if (t < 1 / 2) {\n return q;\n }\n\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n\n return p;\n }\n /**\n * Returns new color object, when given a color in RGB format\n * @memberOf fabric.Color\n * @param {String} color Color value ex: rgb(0-255,0-255,0-255)\n * @return {fabric.Color}\n */\n\n\n fabric.Color.fromRgb = function (color) {\n return Color.fromSource(Color.sourceFromRgb(color));\n };\n /**\n * Returns array representation (ex: [100, 100, 200, 1]) of a color that's in RGB or RGBA format\n * @memberOf fabric.Color\n * @param {String} color Color value ex: rgb(0-255,0-255,0-255), rgb(0%-100%,0%-100%,0%-100%)\n * @return {Array} source\n */\n\n\n fabric.Color.sourceFromRgb = function (color) {\n var match = color.match(Color.reRGBa);\n\n if (match) {\n var r = parseInt(match[1], 10) / (/%$/.test(match[1]) ? 100 : 1) * (/%$/.test(match[1]) ? 255 : 1),\n g = parseInt(match[2], 10) / (/%$/.test(match[2]) ? 100 : 1) * (/%$/.test(match[2]) ? 255 : 1),\n b = parseInt(match[3], 10) / (/%$/.test(match[3]) ? 100 : 1) * (/%$/.test(match[3]) ? 255 : 1);\n return [parseInt(r, 10), parseInt(g, 10), parseInt(b, 10), match[4] ? parseFloat(match[4]) : 1];\n }\n };\n /**\n * Returns new color object, when given a color in RGBA format\n * @static\n * @function\n * @memberOf fabric.Color\n * @param {String} color\n * @return {fabric.Color}\n */\n\n\n fabric.Color.fromRgba = Color.fromRgb;\n /**\n * Returns new color object, when given a color in HSL format\n * @param {String} color Color value ex: hsl(0-260,0%-100%,0%-100%)\n * @memberOf fabric.Color\n * @return {fabric.Color}\n */\n\n fabric.Color.fromHsl = function (color) {\n return Color.fromSource(Color.sourceFromHsl(color));\n };\n /**\n * Returns array representation (ex: [100, 100, 200, 1]) of a color that's in HSL or HSLA format.\n * Adapted from <a href=\"https://rawgithub.com/mjijackson/mjijackson.github.com/master/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript.html\">https://github.com/mjijackson</a>\n * @memberOf fabric.Color\n * @param {String} color Color value ex: hsl(0-360,0%-100%,0%-100%) or hsla(0-360,0%-100%,0%-100%, 0-1)\n * @return {Array} source\n * @see http://http://www.w3.org/TR/css3-color/#hsl-color\n */\n\n\n fabric.Color.sourceFromHsl = function (color) {\n var match = color.match(Color.reHSLa);\n\n if (!match) {\n return;\n }\n\n var h = (parseFloat(match[1]) % 360 + 360) % 360 / 360,\n s = parseFloat(match[2]) / (/%$/.test(match[2]) ? 100 : 1),\n l = parseFloat(match[3]) / (/%$/.test(match[3]) ? 100 : 1),\n r,\n g,\n b;\n\n if (s === 0) {\n r = g = b = l;\n } else {\n var q = l <= 0.5 ? l * (s + 1) : l + s - l * s,\n p = l * 2 - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), match[4] ? parseFloat(match[4]) : 1];\n };\n /**\n * Returns new color object, when given a color in HSLA format\n * @static\n * @function\n * @memberOf fabric.Color\n * @param {String} color\n * @return {fabric.Color}\n */\n\n\n fabric.Color.fromHsla = Color.fromHsl;\n /**\n * Returns new color object, when given a color in HEX format\n * @static\n * @memberOf fabric.Color\n * @param {String} color Color value ex: FF5555\n * @return {fabric.Color}\n */\n\n fabric.Color.fromHex = function (color) {\n return Color.fromSource(Color.sourceFromHex(color));\n };\n /**\n * Returns array representation (ex: [100, 100, 200, 1]) of a color that's in HEX format\n * @static\n * @memberOf fabric.Color\n * @param {String} color ex: FF5555 or FF5544CC (RGBa)\n * @return {Array} source\n */\n\n\n fabric.Color.sourceFromHex = function (color) {\n if (color.match(Color.reHex)) {\n var value = color.slice(color.indexOf('#') + 1),\n isShortNotation = value.length === 3 || value.length === 4,\n isRGBa = value.length === 8 || value.length === 4,\n r = isShortNotation ? value.charAt(0) + value.charAt(0) : value.substring(0, 2),\n g = isShortNotation ? value.charAt(1) + value.charAt(1) : value.substring(2, 4),\n b = isShortNotation ? value.charAt(2) + value.charAt(2) : value.substring(4, 6),\n a = isRGBa ? isShortNotation ? value.charAt(3) + value.charAt(3) : value.substring(6, 8) : 'FF';\n return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), parseFloat((parseInt(a, 16) / 255).toFixed(2))];\n }\n };\n /**\n * Returns new color object, when given color in array representation (ex: [200, 100, 100, 0.5])\n * @static\n * @memberOf fabric.Color\n * @param {Array} source\n * @return {fabric.Color}\n */\n\n\n fabric.Color.fromSource = function (source) {\n var oColor = new Color();\n oColor.setSource(source);\n return oColor;\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n toFixed = fabric.util.toFixed;\n\n if (fabric.Shadow) {\n fabric.warn('fabric.Shadow is already defined.');\n return;\n }\n /**\n * Shadow class\n * @class fabric.Shadow\n * @see {@link http://fabricjs.com/shadows|Shadow demo}\n * @see {@link fabric.Shadow#initialize} for constructor definition\n */\n\n\n fabric.Shadow = fabric.util.createClass(\n /** @lends fabric.Shadow.prototype */\n {\n /**\n * Shadow color\n * @type String\n * @default\n */\n color: 'rgb(0,0,0)',\n\n /**\n * Shadow blur\n * @type Number\n */\n blur: 0,\n\n /**\n * Shadow horizontal offset\n * @type Number\n * @default\n */\n offsetX: 0,\n\n /**\n * Shadow vertical offset\n * @type Number\n * @default\n */\n offsetY: 0,\n\n /**\n * Whether the shadow should affect stroke operations\n * @type Boolean\n * @default\n */\n affectStroke: false,\n\n /**\n * Indicates whether toObject should include default values\n * @type Boolean\n * @default\n */\n includeDefaultValues: true,\n\n /**\n * When `false`, the shadow will scale with the object.\n * When `true`, the shadow's offsetX, offsetY, and blur will not be affected by the object's scale.\n * default to false\n * @type Boolean\n * @default\n */\n nonScaling: false,\n\n /**\n * Constructor\n * @param {Object|String} [options] Options object with any of color, blur, offsetX, offsetY properties or string (e.g. \"rgba(0,0,0,0.2) 2px 2px 10px\")\n * @return {fabric.Shadow} thisArg\n */\n initialize: function initialize(options) {\n if (typeof options === 'string') {\n options = this._parseShadow(options);\n }\n\n for (var prop in options) {\n this[prop] = options[prop];\n }\n\n this.id = fabric.Object.__uid++;\n },\n\n /**\n * @private\n * @param {String} shadow Shadow value to parse\n * @return {Object} Shadow object with color, offsetX, offsetY and blur\n */\n _parseShadow: function _parseShadow(shadow) {\n var shadowStr = shadow.trim(),\n offsetsAndBlur = fabric.Shadow.reOffsetsAndBlur.exec(shadowStr) || [],\n color = shadowStr.replace(fabric.Shadow.reOffsetsAndBlur, '') || 'rgb(0,0,0)';\n return {\n color: color.trim(),\n offsetX: parseInt(offsetsAndBlur[1], 10) || 0,\n offsetY: parseInt(offsetsAndBlur[2], 10) || 0,\n blur: parseInt(offsetsAndBlur[3], 10) || 0\n };\n },\n\n /**\n * Returns a string representation of an instance\n * @see http://www.w3.org/TR/css-text-decor-3/#text-shadow\n * @return {String} Returns CSS3 text-shadow declaration\n */\n toString: function toString() {\n return [this.offsetX, this.offsetY, this.blur, this.color].join('px ');\n },\n\n /**\n * Returns object representation of a shadow\n * @return {Object} Object representation of a shadow instance\n */\n toObject: function toObject() {\n if (this.includeDefaultValues) {\n return {\n color: this.color,\n blur: this.blur,\n offsetX: this.offsetX,\n offsetY: this.offsetY,\n affectStroke: this.affectStroke,\n nonScaling: this.nonScaling\n };\n }\n\n var obj = {},\n proto = fabric.Shadow.prototype;\n ['color', 'blur', 'offsetX', 'offsetY', 'affectStroke', 'nonScaling'].forEach(function (prop) {\n if (this[prop] !== proto[prop]) {\n obj[prop] = this[prop];\n }\n }, this);\n return obj;\n }\n });\n /**\n * Regex matching shadow offsetX, offsetY and blur (ex: \"2px 2px 10px rgba(0,0,0,0.2)\", \"rgb(0,255,0) 2px 2px\")\n * @static\n * @field\n * @memberOf fabric.Shadow\n */\n // eslint-disable-next-line max-len\n\n fabric.Shadow.reOffsetsAndBlur = /(?:\\s|^)(-?\\d+(?:px)?(?:\\s?|$))?(-?\\d+(?:px)?(?:\\s?|$))?(\\d+(?:px)?)?(?:\\s?|$)(?:$|\\s)/;\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function () {\n 'use strict';\n\n if (fabric.StaticCanvas) {\n fabric.warn('fabric.StaticCanvas is already defined.');\n return;\n } // aliases for faster resolution\n\n\n var extend = fabric.util.object.extend,\n getElementOffset = fabric.util.getElementOffset,\n removeFromArray = fabric.util.removeFromArray,\n toFixed = fabric.util.toFixed,\n transformPoint = fabric.util.transformPoint,\n invertTransform = fabric.util.invertTransform,\n getNodeCanvas = fabric.util.getNodeCanvas,\n createCanvasElement = fabric.util.createCanvasElement,\n CANVAS_INIT_ERROR = new Error('Could not initialize `canvas` element');\n /**\n * Static canvas class\n * @class fabric.StaticCanvas\n * @mixes fabric.Collection\n * @mixes fabric.Observable\n * @see {@link http://fabricjs.com/static_canvas|StaticCanvas demo}\n * @see {@link fabric.StaticCanvas#initialize} for constructor definition\n * @fires before:render\n * @fires after:render\n * @fires canvas:cleared\n * @fires object:added\n * @fires object:removed\n */\n\n fabric.StaticCanvas = fabric.util.createClass(fabric.CommonMethods,\n /** @lends fabric.StaticCanvas.prototype */\n {\n /**\n * Constructor\n * @param {HTMLElement | String} el <canvas> element to initialize instance on\n * @param {Object} [options] Options object\n * @return {Object} thisArg\n */\n initialize: function initialize(el, options) {\n options || (options = {});\n this.renderAndResetBound = this.renderAndReset.bind(this);\n this.requestRenderAllBound = this.requestRenderAll.bind(this);\n\n this._initStatic(el, options);\n },\n\n /**\n * Background color of canvas instance.\n * Should be set via {@link fabric.StaticCanvas#setBackgroundColor}.\n * @type {(String|fabric.Pattern)}\n * @default\n */\n backgroundColor: '',\n\n /**\n * Background image of canvas instance.\n * Should be set via {@link fabric.StaticCanvas#setBackgroundImage}.\n * <b>Backwards incompatibility note:</b> The \"backgroundImageOpacity\"\n * and \"backgroundImageStretch\" properties are deprecated since 1.3.9.\n * Use {@link fabric.Image#opacity}, {@link fabric.Image#width} and {@link fabric.Image#height}.\n * since 2.4.0 image caching is active, please when putting an image as background, add to the\n * canvas property a reference to the canvas it is on. Otherwise the image cannot detect the zoom\n * vale. As an alternative you can disable image objectCaching\n * @type fabric.Image\n * @default\n */\n backgroundImage: null,\n\n /**\n * Overlay color of canvas instance.\n * Should be set via {@link fabric.StaticCanvas#setOverlayColor}\n * @since 1.3.9\n * @type {(String|fabric.Pattern)}\n * @default\n */\n overlayColor: '',\n\n /**\n * Overlay image of canvas instance.\n * Should be set via {@link fabric.StaticCanvas#setOverlayImage}.\n * <b>Backwards incompatibility note:</b> The \"overlayImageLeft\"\n * and \"overlayImageTop\" properties are deprecated since 1.3.9.\n * Use {@link fabric.Image#left} and {@link fabric.Image#top}.\n * since 2.4.0 image caching is active, please when putting an image as overlay, add to the\n * canvas property a reference to the canvas it is on. Otherwise the image cannot detect the zoom\n * vale. As an alternative you can disable image objectCaching\n * @type fabric.Image\n * @default\n */\n overlayImage: null,\n\n /**\n * Indicates whether toObject/toDatalessObject should include default values\n * if set to false, takes precedence over the object value.\n * @type Boolean\n * @default\n */\n includeDefaultValues: true,\n\n /**\n * Indicates whether objects' state should be saved\n * @type Boolean\n * @default\n */\n stateful: false,\n\n /**\n * Indicates whether {@link fabric.Collection.add}, {@link fabric.Collection.insertAt} and {@link fabric.Collection.remove},\n * {@link fabric.StaticCanvas.moveTo}, {@link fabric.StaticCanvas.clear} and many more, should also re-render canvas.\n * Disabling this option will not give a performance boost when adding/removing a lot of objects to/from canvas at once\n * since the renders are quequed and executed one per frame.\n * Disabling is suggested anyway and managing the renders of the app manually is not a big effort ( canvas.requestRenderAll() )\n * Left default to true to do not break documentation and old app, fiddles.\n * @type Boolean\n * @default\n */\n renderOnAddRemove: true,\n\n /**\n * Function that determines clipping of entire canvas area\n * Being passed context as first argument.\n * If you are using code minification, ctx argument can be minified/manglied you should use\n * as a workaround `var ctx = arguments[0];` in the function;\n * See clipping canvas area in {@link https://github.com/kangax/fabric.js/wiki/FAQ}\n * @deprecated since 2.0.0\n * @type Function\n * @default\n */\n clipTo: null,\n\n /**\n * Indicates whether object controls (borders/controls) are rendered above overlay image\n * @type Boolean\n * @default\n */\n controlsAboveOverlay: false,\n\n /**\n * Indicates whether the browser can be scrolled when using a touchscreen and dragging on the canvas\n * @type Boolean\n * @default\n */\n allowTouchScrolling: false,\n\n /**\n * Indicates whether this canvas will use image smoothing, this is on by default in browsers\n * @type Boolean\n * @default\n */\n imageSmoothingEnabled: true,\n\n /**\n * The transformation (in the format of Canvas transform) which focuses the viewport\n * @type Array\n * @default\n */\n viewportTransform: fabric.iMatrix.concat(),\n\n /**\n * if set to false background image is not affected by viewport transform\n * @since 1.6.3\n * @type Boolean\n * @default\n */\n backgroundVpt: true,\n\n /**\n * if set to false overlya image is not affected by viewport transform\n * @since 1.6.3\n * @type Boolean\n * @default\n */\n overlayVpt: true,\n\n /**\n * Callback; invoked right before object is about to be scaled/rotated\n * @deprecated since 2.3.0\n * Use before:transform event\n */\n onBeforeScaleRotate: function onBeforeScaleRotate() {\n /* NOOP */\n },\n\n /**\n * When true, canvas is scaled by devicePixelRatio for better rendering on retina screens\n * @type Boolean\n * @default\n */\n enableRetinaScaling: true,\n\n /**\n * Describe canvas element extension over design\n * properties are tl,tr,bl,br.\n * if canvas is not zoomed/panned those points are the four corner of canvas\n * if canvas is viewportTransformed you those points indicate the extension\n * of canvas element in plain untrasformed coordinates\n * The coordinates get updated with @method calcViewportBoundaries.\n * @memberOf fabric.StaticCanvas.prototype\n */\n vptCoords: {},\n\n /**\n * Based on vptCoords and object.aCoords, skip rendering of objects that\n * are not included in current viewport.\n * May greatly help in applications with crowded canvas and use of zoom/pan\n * If One of the corner of the bounding box of the object is on the canvas\n * the objects get rendered.\n * @memberOf fabric.StaticCanvas.prototype\n * @type Boolean\n * @default\n */\n skipOffscreen: true,\n\n /**\n * a fabricObject that, without stroke define a clipping area with their shape. filled in black\n * the clipPath object gets used when the canvas has rendered, and the context is placed in the\n * top left corner of the canvas.\n * clipPath will clip away controls, if you do not want this to happen use controlsAboveOverlay = true\n * @type fabric.Object\n */\n clipPath: undefined,\n\n /**\n * @private\n * @param {HTMLElement | String} el <canvas> element to initialize instance on\n * @param {Object} [options] Options object\n */\n _initStatic: function _initStatic(el, options) {\n var cb = this.requestRenderAllBound;\n this._objects = [];\n\n this._createLowerCanvas(el);\n\n this._initOptions(options);\n\n this._setImageSmoothing(); // only initialize retina scaling once\n\n\n if (!this.interactive) {\n this._initRetinaScaling();\n }\n\n if (options.overlayImage) {\n this.setOverlayImage(options.overlayImage, cb);\n }\n\n if (options.backgroundImage) {\n this.setBackgroundImage(options.backgroundImage, cb);\n }\n\n if (options.backgroundColor) {\n this.setBackgroundColor(options.backgroundColor, cb);\n }\n\n if (options.overlayColor) {\n this.setOverlayColor(options.overlayColor, cb);\n }\n\n this.calcOffset();\n },\n\n /**\n * @private\n */\n _isRetinaScaling: function _isRetinaScaling() {\n return fabric.devicePixelRatio !== 1 && this.enableRetinaScaling;\n },\n\n /**\n * @private\n * @return {Number} retinaScaling if applied, otherwise 1;\n */\n getRetinaScaling: function getRetinaScaling() {\n return this._isRetinaScaling() ? fabric.devicePixelRatio : 1;\n },\n\n /**\n * @private\n */\n _initRetinaScaling: function _initRetinaScaling() {\n if (!this._isRetinaScaling()) {\n return;\n }\n\n var scaleRatio = fabric.devicePixelRatio;\n\n this.__initRetinaScaling(scaleRatio, this.lowerCanvasEl, this.contextContainer);\n\n if (this.upperCanvasEl) {\n this.__initRetinaScaling(scaleRatio, this.upperCanvasEl, this.contextTop);\n }\n },\n __initRetinaScaling: function __initRetinaScaling(scaleRatio, canvas, context) {\n canvas.setAttribute('width', this.width * scaleRatio);\n canvas.setAttribute('height', this.height * scaleRatio);\n context.scale(scaleRatio, scaleRatio);\n },\n\n /**\n * Calculates canvas element offset relative to the document\n * This method is also attached as \"resize\" event handler of window\n * @return {fabric.Canvas} instance\n * @chainable\n */\n calcOffset: function calcOffset() {\n this._offset = getElementOffset(this.lowerCanvasEl);\n return this;\n },\n\n /**\n * Sets {@link fabric.StaticCanvas#overlayImage|overlay image} for this canvas\n * @param {(fabric.Image|String)} image fabric.Image instance or URL of an image to set overlay to\n * @param {Function} callback callback to invoke when image is loaded and set as an overlay\n * @param {Object} [options] Optional options to set for the {@link fabric.Image|overlay image}.\n * @return {fabric.Canvas} thisArg\n * @chainable\n * @see {@link http://jsfiddle.net/fabricjs/MnzHT/|jsFiddle demo}\n * @example <caption>Normal overlayImage with left/top = 0</caption>\n * canvas.setOverlayImage('http://fabricjs.com/assets/jail_cell_bars.png', canvas.renderAll.bind(canvas), {\n * // Needed to position overlayImage at 0/0\n * originX: 'left',\n * originY: 'top'\n * });\n * @example <caption>overlayImage with different properties</caption>\n * canvas.setOverlayImage('http://fabricjs.com/assets/jail_cell_bars.png', canvas.renderAll.bind(canvas), {\n * opacity: 0.5,\n * angle: 45,\n * left: 400,\n * top: 400,\n * originX: 'left',\n * originY: 'top'\n * });\n * @example <caption>Stretched overlayImage #1 - width/height correspond to canvas width/height</caption>\n * fabric.Image.fromURL('http://fabricjs.com/assets/jail_cell_bars.png', function(img) {\n * img.set({width: canvas.width, height: canvas.height, originX: 'left', originY: 'top'});\n * canvas.setOverlayImage(img, canvas.renderAll.bind(canvas));\n * });\n * @example <caption>Stretched overlayImage #2 - width/height correspond to canvas width/height</caption>\n * canvas.setOverlayImage('http://fabricjs.com/assets/jail_cell_bars.png', canvas.renderAll.bind(canvas), {\n * width: canvas.width,\n * height: canvas.height,\n * // Needed to position overlayImage at 0/0\n * originX: 'left',\n * originY: 'top'\n * });\n * @example <caption>overlayImage loaded from cross-origin</caption>\n * canvas.setOverlayImage('http://fabricjs.com/assets/jail_cell_bars.png', canvas.renderAll.bind(canvas), {\n * opacity: 0.5,\n * angle: 45,\n * left: 400,\n * top: 400,\n * originX: 'left',\n * originY: 'top',\n * crossOrigin: 'anonymous'\n * });\n */\n setOverlayImage: function setOverlayImage(image, callback, options) {\n return this.__setBgOverlayImage('overlayImage', image, callback, options);\n },\n\n /**\n * Sets {@link fabric.StaticCanvas#backgroundImage|background image} for this canvas\n * @param {(fabric.Image|String)} image fabric.Image instance or URL of an image to set background to\n * @param {Function} callback Callback to invoke when image is loaded and set as background\n * @param {Object} [options] Optional options to set for the {@link fabric.Image|background image}.\n * @return {fabric.Canvas} thisArg\n * @chainable\n * @see {@link http://jsfiddle.net/djnr8o7a/28/|jsFiddle demo}\n * @example <caption>Normal backgroundImage with left/top = 0</caption>\n * canvas.setBackgroundImage('http://fabricjs.com/assets/honey_im_subtle.png', canvas.renderAll.bind(canvas), {\n * // Needed to position backgroundImage at 0/0\n * originX: 'left',\n * originY: 'top'\n * });\n * @example <caption>backgroundImage with different properties</caption>\n * canvas.setBackgroundImage('http://fabricjs.com/assets/honey_im_subtle.png', canvas.renderAll.bind(canvas), {\n * opacity: 0.5,\n * angle: 45,\n * left: 400,\n * top: 400,\n * originX: 'left',\n * originY: 'top'\n * });\n * @example <caption>Stretched backgroundImage #1 - width/height correspond to canvas width/height</caption>\n * fabric.Image.fromURL('http://fabricjs.com/assets/honey_im_subtle.png', function(img) {\n * img.set({width: canvas.width, height: canvas.height, originX: 'left', originY: 'top'});\n * canvas.setBackgroundImage(img, canvas.renderAll.bind(canvas));\n * });\n * @example <caption>Stretched backgroundImage #2 - width/height correspond to canvas width/height</caption>\n * canvas.setBackgroundImage('http://fabricjs.com/assets/honey_im_subtle.png', canvas.renderAll.bind(canvas), {\n * width: canvas.width,\n * height: canvas.height,\n * // Needed to position backgroundImage at 0/0\n * originX: 'left',\n * originY: 'top'\n * });\n * @example <caption>backgroundImage loaded from cross-origin</caption>\n * canvas.setBackgroundImage('http://fabricjs.com/assets/honey_im_subtle.png', canvas.renderAll.bind(canvas), {\n * opacity: 0.5,\n * angle: 45,\n * left: 400,\n * top: 400,\n * originX: 'left',\n * originY: 'top',\n * crossOrigin: 'anonymous'\n * });\n */\n // TODO: fix stretched examples\n setBackgroundImage: function setBackgroundImage(image, callback, options) {\n return this.__setBgOverlayImage('backgroundImage', image, callback, options);\n },\n\n /**\n * Sets {@link fabric.StaticCanvas#overlayColor|foreground color} for this canvas\n * @param {(String|fabric.Pattern)} overlayColor Color or pattern to set foreground color to\n * @param {Function} callback Callback to invoke when foreground color is set\n * @return {fabric.Canvas} thisArg\n * @chainable\n * @see {@link http://jsfiddle.net/fabricjs/pB55h/|jsFiddle demo}\n * @example <caption>Normal overlayColor - color value</caption>\n * canvas.setOverlayColor('rgba(255, 73, 64, 0.6)', canvas.renderAll.bind(canvas));\n * @example <caption>fabric.Pattern used as overlayColor</caption>\n * canvas.setOverlayColor({\n * source: 'http://fabricjs.com/assets/escheresque_ste.png'\n * }, canvas.renderAll.bind(canvas));\n * @example <caption>fabric.Pattern used as overlayColor with repeat and offset</caption>\n * canvas.setOverlayColor({\n * source: 'http://fabricjs.com/assets/escheresque_ste.png',\n * repeat: 'repeat',\n * offsetX: 200,\n * offsetY: 100\n * }, canvas.renderAll.bind(canvas));\n */\n setOverlayColor: function setOverlayColor(overlayColor, callback) {\n return this.__setBgOverlayColor('overlayColor', overlayColor, callback);\n },\n\n /**\n * Sets {@link fabric.StaticCanvas#backgroundColor|background color} for this canvas\n * @param {(String|fabric.Pattern)} backgroundColor Color or pattern to set background color to\n * @param {Function} callback Callback to invoke when background color is set\n * @return {fabric.Canvas} thisArg\n * @chainable\n * @see {@link http://jsfiddle.net/fabricjs/hXzvk/|jsFiddle demo}\n * @example <caption>Normal backgroundColor - color value</caption>\n * canvas.setBackgroundColor('rgba(255, 73, 64, 0.6)', canvas.renderAll.bind(canvas));\n * @example <caption>fabric.Pattern used as backgroundColor</caption>\n * canvas.setBackgroundColor({\n * source: 'http://fabricjs.com/assets/escheresque_ste.png'\n * }, canvas.renderAll.bind(canvas));\n * @example <caption>fabric.Pattern used as backgroundColor with repeat and offset</caption>\n * canvas.setBackgroundColor({\n * source: 'http://fabricjs.com/assets/escheresque_ste.png',\n * repeat: 'repeat',\n * offsetX: 200,\n * offsetY: 100\n * }, canvas.renderAll.bind(canvas));\n */\n setBackgroundColor: function setBackgroundColor(backgroundColor, callback) {\n return this.__setBgOverlayColor('backgroundColor', backgroundColor, callback);\n },\n\n /**\n * @private\n * @see {@link http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-imagesmoothingenabled|WhatWG Canvas Standard}\n */\n _setImageSmoothing: function _setImageSmoothing() {\n var ctx = this.getContext();\n ctx.imageSmoothingEnabled = ctx.imageSmoothingEnabled || ctx.webkitImageSmoothingEnabled || ctx.mozImageSmoothingEnabled || ctx.msImageSmoothingEnabled || ctx.oImageSmoothingEnabled;\n ctx.imageSmoothingEnabled = this.imageSmoothingEnabled;\n },\n\n /**\n * @private\n * @param {String} property Property to set ({@link fabric.StaticCanvas#backgroundImage|backgroundImage}\n * or {@link fabric.StaticCanvas#overlayImage|overlayImage})\n * @param {(fabric.Image|String|null)} image fabric.Image instance, URL of an image or null to set background or overlay to\n * @param {Function} callback Callback to invoke when image is loaded and set as background or overlay\n * @param {Object} [options] Optional options to set for the {@link fabric.Image|image}.\n */\n __setBgOverlayImage: function __setBgOverlayImage(property, image, callback, options) {\n if (typeof image === 'string') {\n fabric.util.loadImage(image, function (img) {\n if (img) {\n var instance = new fabric.Image(img, options);\n this[property] = instance;\n instance.canvas = this;\n }\n\n callback && callback(img);\n }, this, options && options.crossOrigin);\n } else {\n options && image.setOptions(options);\n this[property] = image;\n image && (image.canvas = this);\n callback && callback(image);\n }\n\n return this;\n },\n\n /**\n * @private\n * @param {String} property Property to set ({@link fabric.StaticCanvas#backgroundColor|backgroundColor}\n * or {@link fabric.StaticCanvas#overlayColor|overlayColor})\n * @param {(Object|String|null)} color Object with pattern information, color value or null\n * @param {Function} [callback] Callback is invoked when color is set\n */\n __setBgOverlayColor: function __setBgOverlayColor(property, color, callback) {\n this[property] = color;\n\n this._initGradient(color, property);\n\n this._initPattern(color, property, callback);\n\n return this;\n },\n\n /**\n * @private\n */\n _createCanvasElement: function _createCanvasElement() {\n var element = createCanvasElement();\n\n if (!element) {\n throw CANVAS_INIT_ERROR;\n }\n\n if (!element.style) {\n element.style = {};\n }\n\n if (typeof element.getContext === 'undefined') {\n throw CANVAS_INIT_ERROR;\n }\n\n return element;\n },\n\n /**\n * @private\n * @param {Object} [options] Options object\n */\n _initOptions: function _initOptions(options) {\n var lowerCanvasEl = this.lowerCanvasEl;\n\n this._setOptions(options);\n\n this.width = this.width || parseInt(lowerCanvasEl.width, 10) || 0;\n this.height = this.height || parseInt(lowerCanvasEl.height, 10) || 0;\n\n if (!this.lowerCanvasEl.style) {\n return;\n }\n\n lowerCanvasEl.width = this.width;\n lowerCanvasEl.height = this.height;\n lowerCanvasEl.style.width = this.width + 'px';\n lowerCanvasEl.style.height = this.height + 'px';\n this.viewportTransform = this.viewportTransform.slice();\n },\n\n /**\n * Creates a bottom canvas\n * @private\n * @param {HTMLElement} [canvasEl]\n */\n _createLowerCanvas: function _createLowerCanvas(canvasEl) {\n // canvasEl === 'HTMLCanvasElement' does not work on jsdom/node\n if (canvasEl && canvasEl.getContext) {\n this.lowerCanvasEl = canvasEl;\n } else {\n this.lowerCanvasEl = fabric.util.getById(canvasEl) || this._createCanvasElement();\n }\n\n fabric.util.addClass(this.lowerCanvasEl, 'lower-canvas');\n\n if (this.interactive) {\n this._applyCanvasStyle(this.lowerCanvasEl);\n }\n\n this.contextContainer = this.lowerCanvasEl.getContext('2d');\n },\n\n /**\n * Returns canvas width (in px)\n * @return {Number}\n */\n getWidth: function getWidth() {\n return this.width;\n },\n\n /**\n * Returns canvas height (in px)\n * @return {Number}\n */\n getHeight: function getHeight() {\n return this.height;\n },\n\n /**\n * Sets width of this canvas instance\n * @param {Number|String} value Value to set width to\n * @param {Object} [options] Options object\n * @param {Boolean} [options.backstoreOnly=false] Set the given dimensions only as canvas backstore dimensions\n * @param {Boolean} [options.cssOnly=false] Set the given dimensions only as css dimensions\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n setWidth: function setWidth(value, options) {\n return this.setDimensions({\n width: value\n }, options);\n },\n\n /**\n * Sets height of this canvas instance\n * @param {Number|String} value Value to set height to\n * @param {Object} [options] Options object\n * @param {Boolean} [options.backstoreOnly=false] Set the given dimensions only as canvas backstore dimensions\n * @param {Boolean} [options.cssOnly=false] Set the given dimensions only as css dimensions\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n setHeight: function setHeight(value, options) {\n return this.setDimensions({\n height: value\n }, options);\n },\n\n /**\n * Sets dimensions (width, height) of this canvas instance. when options.cssOnly flag active you should also supply the unit of measure (px/%/em)\n * @param {Object} dimensions Object with width/height properties\n * @param {Number|String} [dimensions.width] Width of canvas element\n * @param {Number|String} [dimensions.height] Height of canvas element\n * @param {Object} [options] Options object\n * @param {Boolean} [options.backstoreOnly=false] Set the given dimensions only as canvas backstore dimensions\n * @param {Boolean} [options.cssOnly=false] Set the given dimensions only as css dimensions\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n setDimensions: function setDimensions(dimensions, options) {\n var cssValue;\n options = options || {};\n\n for (var prop in dimensions) {\n cssValue = dimensions[prop];\n\n if (!options.cssOnly) {\n this._setBackstoreDimension(prop, dimensions[prop]);\n\n cssValue += 'px';\n this.hasLostContext = true;\n }\n\n if (!options.backstoreOnly) {\n this._setCssDimension(prop, cssValue);\n }\n }\n\n if (this._isCurrentlyDrawing) {\n this.freeDrawingBrush && this.freeDrawingBrush._setBrushStyles();\n }\n\n this._initRetinaScaling();\n\n this._setImageSmoothing();\n\n this.calcOffset();\n\n if (!options.cssOnly) {\n this.requestRenderAll();\n }\n\n return this;\n },\n\n /**\n * Helper for setting width/height\n * @private\n * @param {String} prop property (width|height)\n * @param {Number} value value to set property to\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n _setBackstoreDimension: function _setBackstoreDimension(prop, value) {\n this.lowerCanvasEl[prop] = value;\n\n if (this.upperCanvasEl) {\n this.upperCanvasEl[prop] = value;\n }\n\n if (this.cacheCanvasEl) {\n this.cacheCanvasEl[prop] = value;\n }\n\n this[prop] = value;\n return this;\n },\n\n /**\n * Helper for setting css width/height\n * @private\n * @param {String} prop property (width|height)\n * @param {String} value value to set property to\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n _setCssDimension: function _setCssDimension(prop, value) {\n this.lowerCanvasEl.style[prop] = value;\n\n if (this.upperCanvasEl) {\n this.upperCanvasEl.style[prop] = value;\n }\n\n if (this.wrapperEl) {\n this.wrapperEl.style[prop] = value;\n }\n\n return this;\n },\n\n /**\n * Returns canvas zoom level\n * @return {Number}\n */\n getZoom: function getZoom() {\n return this.viewportTransform[0];\n },\n\n /**\n * Sets viewport transform of this canvas instance\n * @param {Array} vpt the transform in the form of context.transform\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n setViewportTransform: function setViewportTransform(vpt) {\n var activeObject = this._activeObject,\n object,\n ignoreVpt = false,\n skipAbsolute = true,\n i,\n len;\n this.viewportTransform = vpt;\n\n for (i = 0, len = this._objects.length; i < len; i++) {\n object = this._objects[i];\n object.group || object.setCoords(ignoreVpt, skipAbsolute);\n }\n\n if (activeObject && activeObject.type === 'activeSelection') {\n activeObject.setCoords(ignoreVpt, skipAbsolute);\n }\n\n this.calcViewportBoundaries();\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * Sets zoom level of this canvas instance, zoom centered around point\n * @param {fabric.Point} point to zoom with respect to\n * @param {Number} value to set zoom to, less than 1 zooms out\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n zoomToPoint: function zoomToPoint(point, value) {\n // TODO: just change the scale, preserve other transformations\n var before = point,\n vpt = this.viewportTransform.slice(0);\n point = transformPoint(point, invertTransform(this.viewportTransform));\n vpt[0] = value;\n vpt[3] = value;\n var after = transformPoint(point, vpt);\n vpt[4] += before.x - after.x;\n vpt[5] += before.y - after.y;\n return this.setViewportTransform(vpt);\n },\n\n /**\n * Sets zoom level of this canvas instance\n * @param {Number} value to set zoom to, less than 1 zooms out\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n setZoom: function setZoom(value) {\n this.zoomToPoint(new fabric.Point(0, 0), value);\n return this;\n },\n\n /**\n * Pan viewport so as to place point at top left corner of canvas\n * @param {fabric.Point} point to move to\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n absolutePan: function absolutePan(point) {\n var vpt = this.viewportTransform.slice(0);\n vpt[4] = -point.x;\n vpt[5] = -point.y;\n return this.setViewportTransform(vpt);\n },\n\n /**\n * Pans viewpoint relatively\n * @param {fabric.Point} point (position vector) to move by\n * @return {fabric.Canvas} instance\n * @chainable true\n */\n relativePan: function relativePan(point) {\n return this.absolutePan(new fabric.Point(-point.x - this.viewportTransform[4], -point.y - this.viewportTransform[5]));\n },\n\n /**\n * Returns <canvas> element corresponding to this instance\n * @return {HTMLCanvasElement}\n */\n getElement: function getElement() {\n return this.lowerCanvasEl;\n },\n\n /**\n * @private\n * @param {fabric.Object} obj Object that was added\n */\n _onObjectAdded: function _onObjectAdded(obj) {\n this.stateful && obj.setupState();\n\n obj._set('canvas', this);\n\n obj.setCoords();\n this.fire('object:added', {\n target: obj\n });\n obj.fire('added');\n },\n\n /**\n * @private\n * @param {fabric.Object} obj Object that was removed\n */\n _onObjectRemoved: function _onObjectRemoved(obj) {\n this.fire('object:removed', {\n target: obj\n });\n obj.fire('removed');\n delete obj.canvas;\n },\n\n /**\n * Clears specified context of canvas element\n * @param {CanvasRenderingContext2D} ctx Context to clear\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n clearContext: function clearContext(ctx) {\n ctx.clearRect(0, 0, this.width, this.height);\n return this;\n },\n\n /**\n * Returns context of canvas where objects are drawn\n * @return {CanvasRenderingContext2D}\n */\n getContext: function getContext() {\n return this.contextContainer;\n },\n\n /**\n * Clears all contexts (background, main, top) of an instance\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n clear: function clear() {\n this._objects.length = 0;\n this.backgroundImage = null;\n this.overlayImage = null;\n this.backgroundColor = '';\n this.overlayColor = '';\n\n if (this._hasITextHandlers) {\n this.off('mouse:up', this._mouseUpITextHandler);\n this._iTextInstances = null;\n this._hasITextHandlers = false;\n }\n\n this.clearContext(this.contextContainer);\n this.fire('canvas:cleared');\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * Renders the canvas\n * @return {fabric.Canvas} instance\n * @chainable\n */\n renderAll: function renderAll() {\n var canvasToDrawOn = this.contextContainer;\n this.renderCanvas(canvasToDrawOn, this._objects);\n return this;\n },\n\n /**\n * Function created to be instance bound at initialization\n * used in requestAnimationFrame rendering\n * Let the fabricJS call it. If you call it manually you could have more\n * animationFrame stacking on to of each other\n * for an imperative rendering, use canvas.renderAll\n * @private\n * @return {fabric.Canvas} instance\n * @chainable\n */\n renderAndReset: function renderAndReset() {\n this.isRendering = 0;\n this.renderAll();\n },\n\n /**\n * Append a renderAll request to next animation frame.\n * unless one is already in progress, in that case nothing is done\n * a boolean flag will avoid appending more.\n * @return {fabric.Canvas} instance\n * @chainable\n */\n requestRenderAll: function requestRenderAll() {\n if (!this.isRendering) {\n this.isRendering = fabric.util.requestAnimFrame(this.renderAndResetBound);\n }\n\n return this;\n },\n\n /**\n * Calculate the position of the 4 corner of canvas with current viewportTransform.\n * helps to determinate when an object is in the current rendering viewport using\n * object absolute coordinates ( aCoords )\n * @return {Object} points.tl\n * @chainable\n */\n calcViewportBoundaries: function calcViewportBoundaries() {\n var points = {},\n width = this.width,\n height = this.height,\n iVpt = invertTransform(this.viewportTransform);\n points.tl = transformPoint({\n x: 0,\n y: 0\n }, iVpt);\n points.br = transformPoint({\n x: width,\n y: height\n }, iVpt);\n points.tr = new fabric.Point(points.br.x, points.tl.y);\n points.bl = new fabric.Point(points.tl.x, points.br.y);\n this.vptCoords = points;\n return points;\n },\n cancelRequestedRender: function cancelRequestedRender() {\n if (this.isRendering) {\n fabric.util.cancelAnimFrame(this.isRendering);\n this.isRendering = 0;\n }\n },\n\n /**\n * Renders background, objects, overlay and controls.\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array} objects to render\n * @return {fabric.Canvas} instance\n * @chainable\n */\n renderCanvas: function renderCanvas(ctx, objects) {\n var v = this.viewportTransform,\n path = this.clipPath;\n this.cancelRequestedRender();\n this.calcViewportBoundaries();\n this.clearContext(ctx);\n this.fire('before:render', {\n ctx: ctx\n });\n\n if (this.clipTo) {\n fabric.util.clipContext(this, ctx);\n }\n\n this._renderBackground(ctx);\n\n ctx.save(); //apply viewport transform once for all rendering process\n\n ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);\n\n this._renderObjects(ctx, objects);\n\n ctx.restore();\n\n if (!this.controlsAboveOverlay && this.interactive) {\n this.drawControls(ctx);\n }\n\n if (this.clipTo) {\n ctx.restore();\n }\n\n if (path) {\n path.canvas = this; // needed to setup a couple of variables\n\n path.shouldCache();\n path._transformDone = true;\n path.renderCache({\n forClipping: true\n });\n this.drawClipPathOnCanvas(ctx);\n }\n\n this._renderOverlay(ctx);\n\n if (this.controlsAboveOverlay && this.interactive) {\n this.drawControls(ctx);\n }\n\n this.fire('after:render', {\n ctx: ctx\n });\n },\n\n /**\n * Paint the cached clipPath on the lowerCanvasEl\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n drawClipPathOnCanvas: function drawClipPathOnCanvas(ctx) {\n var v = this.viewportTransform,\n path = this.clipPath;\n ctx.save();\n ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]); // DEBUG: uncomment this line, comment the following\n // ctx.globalAlpha = 0.4;\n\n ctx.globalCompositeOperation = 'destination-in';\n path.transform(ctx);\n ctx.scale(1 / path.zoomX, 1 / path.zoomY);\n ctx.drawImage(path._cacheCanvas, -path.cacheTranslationX, -path.cacheTranslationY);\n ctx.restore();\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {Array} objects to render\n */\n _renderObjects: function _renderObjects(ctx, objects) {\n var i, len;\n\n for (i = 0, len = objects.length; i < len; ++i) {\n objects[i] && objects[i].render(ctx);\n }\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {string} property 'background' or 'overlay'\n */\n _renderBackgroundOrOverlay: function _renderBackgroundOrOverlay(ctx, property) {\n var fill = this[property + 'Color'],\n object = this[property + 'Image'],\n v = this.viewportTransform,\n needsVpt = this[property + 'Vpt'];\n\n if (!fill && !object) {\n return;\n }\n\n if (fill) {\n ctx.save();\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(this.width, 0);\n ctx.lineTo(this.width, this.height);\n ctx.lineTo(0, this.height);\n ctx.closePath();\n ctx.fillStyle = fill.toLive ? fill.toLive(ctx, this) : fill;\n\n if (needsVpt) {\n ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);\n }\n\n ctx.transform(1, 0, 0, 1, fill.offsetX || 0, fill.offsetY || 0);\n var m = fill.gradientTransform || fill.patternTransform;\n m && ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n ctx.fill();\n ctx.restore();\n }\n\n if (object) {\n ctx.save();\n\n if (needsVpt) {\n ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);\n }\n\n object.render(ctx);\n ctx.restore();\n }\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderBackground: function _renderBackground(ctx) {\n this._renderBackgroundOrOverlay(ctx, 'background');\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderOverlay: function _renderOverlay(ctx) {\n this._renderBackgroundOrOverlay(ctx, 'overlay');\n },\n\n /**\n * Returns coordinates of a center of canvas.\n * Returned value is an object with top and left properties\n * @return {Object} object with \"top\" and \"left\" number values\n */\n getCenter: function getCenter() {\n return {\n top: this.height / 2,\n left: this.width / 2\n };\n },\n\n /**\n * Centers object horizontally in the canvas\n * @param {fabric.Object} object Object to center horizontally\n * @return {fabric.Canvas} thisArg\n */\n centerObjectH: function centerObjectH(object) {\n return this._centerObject(object, new fabric.Point(this.getCenter().left, object.getCenterPoint().y));\n },\n\n /**\n * Centers object vertically in the canvas\n * @param {fabric.Object} object Object to center vertically\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n centerObjectV: function centerObjectV(object) {\n return this._centerObject(object, new fabric.Point(object.getCenterPoint().x, this.getCenter().top));\n },\n\n /**\n * Centers object vertically and horizontally in the canvas\n * @param {fabric.Object} object Object to center vertically and horizontally\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n centerObject: function centerObject(object) {\n var center = this.getCenter();\n return this._centerObject(object, new fabric.Point(center.left, center.top));\n },\n\n /**\n * Centers object vertically and horizontally in the viewport\n * @param {fabric.Object} object Object to center vertically and horizontally\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n viewportCenterObject: function viewportCenterObject(object) {\n var vpCenter = this.getVpCenter();\n return this._centerObject(object, vpCenter);\n },\n\n /**\n * Centers object horizontally in the viewport, object.top is unchanged\n * @param {fabric.Object} object Object to center vertically and horizontally\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n viewportCenterObjectH: function viewportCenterObjectH(object) {\n var vpCenter = this.getVpCenter();\n\n this._centerObject(object, new fabric.Point(vpCenter.x, object.getCenterPoint().y));\n\n return this;\n },\n\n /**\n * Centers object Vertically in the viewport, object.top is unchanged\n * @param {fabric.Object} object Object to center vertically and horizontally\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n viewportCenterObjectV: function viewportCenterObjectV(object) {\n var vpCenter = this.getVpCenter();\n return this._centerObject(object, new fabric.Point(object.getCenterPoint().x, vpCenter.y));\n },\n\n /**\n * Calculate the point in canvas that correspond to the center of actual viewport.\n * @return {fabric.Point} vpCenter, viewport center\n * @chainable\n */\n getVpCenter: function getVpCenter() {\n var center = this.getCenter(),\n iVpt = invertTransform(this.viewportTransform);\n return transformPoint({\n x: center.left,\n y: center.top\n }, iVpt);\n },\n\n /**\n * @private\n * @param {fabric.Object} object Object to center\n * @param {fabric.Point} center Center point\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n _centerObject: function _centerObject(object, center) {\n object.setPositionByOrigin(center, 'center', 'center');\n object.setCoords();\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * Returs dataless JSON representation of canvas\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {String} json string\n */\n toDatalessJSON: function toDatalessJSON(propertiesToInclude) {\n return this.toDatalessObject(propertiesToInclude);\n },\n\n /**\n * Returns object representation of canvas\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n return this._toObjectMethod('toObject', propertiesToInclude);\n },\n\n /**\n * Returns dataless object representation of canvas\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toDatalessObject: function toDatalessObject(propertiesToInclude) {\n return this._toObjectMethod('toDatalessObject', propertiesToInclude);\n },\n\n /**\n * @private\n */\n _toObjectMethod: function _toObjectMethod(methodName, propertiesToInclude) {\n var clipPath = this.clipPath,\n data = {\n version: fabric.version,\n objects: this._toObjects(methodName, propertiesToInclude)\n };\n\n if (clipPath) {\n data.clipPath = this._toObject(this.clipPath, methodName, propertiesToInclude);\n }\n\n extend(data, this.__serializeBgOverlay(methodName, propertiesToInclude));\n fabric.util.populateWithProperties(this, data, propertiesToInclude);\n return data;\n },\n\n /**\n * @private\n */\n _toObjects: function _toObjects(methodName, propertiesToInclude) {\n return this._objects.filter(function (object) {\n return !object.excludeFromExport;\n }).map(function (instance) {\n return this._toObject(instance, methodName, propertiesToInclude);\n }, this);\n },\n\n /**\n * @private\n */\n _toObject: function _toObject(instance, methodName, propertiesToInclude) {\n var originalValue;\n\n if (!this.includeDefaultValues) {\n originalValue = instance.includeDefaultValues;\n instance.includeDefaultValues = false;\n }\n\n var object = instance[methodName](propertiesToInclude);\n\n if (!this.includeDefaultValues) {\n instance.includeDefaultValues = originalValue;\n }\n\n return object;\n },\n\n /**\n * @private\n */\n __serializeBgOverlay: function __serializeBgOverlay(methodName, propertiesToInclude) {\n var data = {},\n bgImage = this.backgroundImage,\n overlay = this.overlayImage;\n\n if (this.backgroundColor) {\n data.background = this.backgroundColor.toObject ? this.backgroundColor.toObject(propertiesToInclude) : this.backgroundColor;\n }\n\n if (this.overlayColor) {\n data.overlay = this.overlayColor.toObject ? this.overlayColor.toObject(propertiesToInclude) : this.overlayColor;\n }\n\n if (bgImage && !bgImage.excludeFromExport) {\n data.backgroundImage = this._toObject(bgImage, methodName, propertiesToInclude);\n }\n\n if (overlay && !overlay.excludeFromExport) {\n data.overlayImage = this._toObject(overlay, methodName, propertiesToInclude);\n }\n\n return data;\n },\n\n /**\n * Moves an object or the objects of a multiple selection\n * to the bottom of the stack of drawn objects\n * @param {fabric.Object} object Object to send to back\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n sendToBack: function sendToBack(object) {\n if (!object) {\n return this;\n }\n\n var activeSelection = this._activeObject,\n i,\n obj,\n objs;\n\n if (object === activeSelection && object.type === 'activeSelection') {\n objs = activeSelection._objects;\n\n for (i = objs.length; i--;) {\n obj = objs[i];\n removeFromArray(this._objects, obj);\n\n this._objects.unshift(obj);\n }\n } else {\n removeFromArray(this._objects, object);\n\n this._objects.unshift(object);\n }\n\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * Moves an object or the objects of a multiple selection\n * to the top of the stack of drawn objects\n * @param {fabric.Object} object Object to send\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n bringToFront: function bringToFront(object) {\n if (!object) {\n return this;\n }\n\n var activeSelection = this._activeObject,\n i,\n obj,\n objs;\n\n if (object === activeSelection && object.type === 'activeSelection') {\n objs = activeSelection._objects;\n\n for (i = 0; i < objs.length; i++) {\n obj = objs[i];\n removeFromArray(this._objects, obj);\n\n this._objects.push(obj);\n }\n } else {\n removeFromArray(this._objects, object);\n\n this._objects.push(object);\n }\n\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * Moves an object or a selection down in stack of drawn objects\n * An optional paramter, intersecting allowes to move the object in behind\n * the first intersecting object. Where intersection is calculated with\n * bounding box. If no intersection is found, there will not be change in the\n * stack.\n * @param {fabric.Object} object Object to send\n * @param {Boolean} [intersecting] If `true`, send object behind next lower intersecting object\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n sendBackwards: function sendBackwards(object, intersecting) {\n if (!object) {\n return this;\n }\n\n var activeSelection = this._activeObject,\n i,\n obj,\n idx,\n newIdx,\n objs,\n objsMoved = 0;\n\n if (object === activeSelection && object.type === 'activeSelection') {\n objs = activeSelection._objects;\n\n for (i = 0; i < objs.length; i++) {\n obj = objs[i];\n idx = this._objects.indexOf(obj);\n\n if (idx > 0 + objsMoved) {\n newIdx = idx - 1;\n removeFromArray(this._objects, obj);\n\n this._objects.splice(newIdx, 0, obj);\n }\n\n objsMoved++;\n }\n } else {\n idx = this._objects.indexOf(object);\n\n if (idx !== 0) {\n // if object is not on the bottom of stack\n newIdx = this._findNewLowerIndex(object, idx, intersecting);\n removeFromArray(this._objects, object);\n\n this._objects.splice(newIdx, 0, object);\n }\n }\n\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * @private\n */\n _findNewLowerIndex: function _findNewLowerIndex(object, idx, intersecting) {\n var newIdx, i;\n\n if (intersecting) {\n newIdx = idx; // traverse down the stack looking for the nearest intersecting object\n\n for (i = idx - 1; i >= 0; --i) {\n var isIntersecting = object.intersectsWithObject(this._objects[i]) || object.isContainedWithinObject(this._objects[i]) || this._objects[i].isContainedWithinObject(object);\n\n if (isIntersecting) {\n newIdx = i;\n break;\n }\n }\n } else {\n newIdx = idx - 1;\n }\n\n return newIdx;\n },\n\n /**\n * Moves an object or a selection up in stack of drawn objects\n * An optional paramter, intersecting allowes to move the object in front\n * of the first intersecting object. Where intersection is calculated with\n * bounding box. If no intersection is found, there will not be change in the\n * stack.\n * @param {fabric.Object} object Object to send\n * @param {Boolean} [intersecting] If `true`, send object in front of next upper intersecting object\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n bringForward: function bringForward(object, intersecting) {\n if (!object) {\n return this;\n }\n\n var activeSelection = this._activeObject,\n i,\n obj,\n idx,\n newIdx,\n objs,\n objsMoved = 0;\n\n if (object === activeSelection && object.type === 'activeSelection') {\n objs = activeSelection._objects;\n\n for (i = objs.length; i--;) {\n obj = objs[i];\n idx = this._objects.indexOf(obj);\n\n if (idx < this._objects.length - 1 - objsMoved) {\n newIdx = idx + 1;\n removeFromArray(this._objects, obj);\n\n this._objects.splice(newIdx, 0, obj);\n }\n\n objsMoved++;\n }\n } else {\n idx = this._objects.indexOf(object);\n\n if (idx !== this._objects.length - 1) {\n // if object is not on top of stack (last item in an array)\n newIdx = this._findNewUpperIndex(object, idx, intersecting);\n removeFromArray(this._objects, object);\n\n this._objects.splice(newIdx, 0, object);\n }\n }\n\n this.renderOnAddRemove && this.requestRenderAll();\n return this;\n },\n\n /**\n * @private\n */\n _findNewUpperIndex: function _findNewUpperIndex(object, idx, intersecting) {\n var newIdx, i, len;\n\n if (intersecting) {\n newIdx = idx; // traverse up the stack looking for the nearest intersecting object\n\n for (i = idx + 1, len = this._objects.length; i < len; ++i) {\n var isIntersecting = object.intersectsWithObject(this._objects[i]) || object.isContainedWithinObject(this._objects[i]) || this._objects[i].isContainedWithinObject(object);\n\n if (isIntersecting) {\n newIdx = i;\n break;\n }\n }\n } else {\n newIdx = idx + 1;\n }\n\n return newIdx;\n },\n\n /**\n * Moves an object to specified level in stack of drawn objects\n * @param {fabric.Object} object Object to send\n * @param {Number} index Position to move to\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n moveTo: function moveTo(object, index) {\n removeFromArray(this._objects, object);\n\n this._objects.splice(index, 0, object);\n\n return this.renderOnAddRemove && this.requestRenderAll();\n },\n\n /**\n * Clears a canvas element and dispose objects\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n dispose: function dispose() {\n // cancel eventually ongoing renders\n if (this.isRendering) {\n fabric.util.cancelAnimFrame(this.isRendering);\n this.isRendering = 0;\n }\n\n this.forEachObject(function (object) {\n object.dispose && object.dispose();\n });\n this._objects = [];\n\n if (this.backgroundImage && this.backgroundImage.dispose) {\n this.backgroundImage.dispose();\n }\n\n this.backgroundImage = null;\n\n if (this.overlayImage && this.overlayImage.dispose) {\n this.overlayImage.dispose();\n }\n\n this.overlayImage = null;\n this._iTextInstances = null;\n this.contextContainer = null;\n fabric.util.cleanUpJsdomNode(this.lowerCanvasEl);\n this.lowerCanvasEl = undefined;\n return this;\n },\n\n /**\n * Returns a string representation of an instance\n * @return {String} string representation of an instance\n */\n toString: function toString() {\n return '#<fabric.Canvas (' + this.complexity() + '): ' + '{ objects: ' + this._objects.length + ' }>';\n }\n });\n extend(fabric.StaticCanvas.prototype, fabric.Observable);\n extend(fabric.StaticCanvas.prototype, fabric.Collection);\n extend(fabric.StaticCanvas.prototype, fabric.DataURLExporter);\n extend(fabric.StaticCanvas,\n /** @lends fabric.StaticCanvas */\n {\n /**\n * @static\n * @type String\n * @default\n */\n EMPTY_JSON: '{\"objects\": [], \"background\": \"white\"}',\n\n /**\n * Provides a way to check support of some of the canvas methods\n * (either those of HTMLCanvasElement itself, or rendering context)\n *\n * @param {String} methodName Method to check support for;\n * Could be one of \"setLineDash\"\n * @return {Boolean | null} `true` if method is supported (or at least exists),\n * `null` if canvas element or context can not be initialized\n */\n supports: function supports(methodName) {\n var el = createCanvasElement();\n\n if (!el || !el.getContext) {\n return null;\n }\n\n var ctx = el.getContext('2d');\n\n if (!ctx) {\n return null;\n }\n\n switch (methodName) {\n case 'setLineDash':\n return typeof ctx.setLineDash !== 'undefined';\n\n default:\n return null;\n }\n }\n });\n /**\n * Returns JSON representation of canvas\n * @function\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {String} JSON string\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-3#serialization}\n * @see {@link http://jsfiddle.net/fabricjs/pec86/|jsFiddle demo}\n * @example <caption>JSON without additional properties</caption>\n * var json = canvas.toJSON();\n * @example <caption>JSON with additional properties included</caption>\n * var json = canvas.toJSON(['lockMovementX', 'lockMovementY', 'lockRotation', 'lockScalingX', 'lockScalingY', 'lockUniScaling']);\n * @example <caption>JSON without default values</caption>\n * canvas.includeDefaultValues = false;\n * var json = canvas.toJSON();\n */\n\n fabric.StaticCanvas.prototype.toJSON = fabric.StaticCanvas.prototype.toObject;\n\n if (fabric.isLikelyNode) {\n fabric.StaticCanvas.prototype.createPNGStream = function () {\n var impl = getNodeCanvas(this.lowerCanvasEl);\n return impl && impl.createPNGStream();\n };\n\n fabric.StaticCanvas.prototype.createJPEGStream = function (opts) {\n var impl = getNodeCanvas(this.lowerCanvasEl);\n return impl && impl.createJPEGStream(opts);\n };\n }\n})();\n\n(function () {\n var _getPointer = fabric.util.getPointer,\n degreesToRadians = fabric.util.degreesToRadians,\n radiansToDegrees = fabric.util.radiansToDegrees,\n atan2 = Math.atan2,\n abs = Math.abs,\n supportLineDash = fabric.StaticCanvas.supports('setLineDash'),\n STROKE_OFFSET = 0.5;\n /**\n * Canvas class\n * @class fabric.Canvas\n * @extends fabric.StaticCanvas\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-1#canvas}\n * @see {@link fabric.Canvas#initialize} for constructor definition\n *\n * @fires object:modified at the end of a transform or any change when statefull is true\n * @fires object:rotated at the end of a rotation transform\n * @fires object:scaled at the end of a scale transform\n * @fires object:moved at the end of translation transform\n * @fires object:skewed at the end of a skew transform\n * @fires object:rotating while an object is being rotated from the control\n * @fires object:scaling while an object is being scaled by controls\n * @fires object:moving while an object is being dragged\n * @fires object:skewing while an object is being skewed from the controls\n * @fires object:selected this event is deprecated. use selection:created\n *\n * @fires before:transform before a transform is is started\n * @fires before:selection:cleared\n * @fires selection:cleared\n * @fires selection:updated\n * @fires selection:created\n *\n * @fires path:created after a drawing operation ends and the path is added\n * @fires mouse:down\n * @fires mouse:move\n * @fires mouse:up\n * @fires mouse:down:before on mouse down, before the inner fabric logic runs\n * @fires mouse:move:before on mouse move, before the inner fabric logic runs\n * @fires mouse:up:before on mouse up, before the inner fabric logic runs\n * @fires mouse:over\n * @fires mouse:out\n * @fires mouse:dblclick whenever a native dbl click event fires on the canvas.\n *\n * @fires dragover\n * @fires dragenter\n * @fires dragleave\n * @fires drop\n * @fires after:render at the end of the render process, receives the context in the callback\n * @fires before:render at start the render process, receives the context in the callback\n *\n */\n\n fabric.Canvas = fabric.util.createClass(fabric.StaticCanvas,\n /** @lends fabric.Canvas.prototype */\n {\n /**\n * Constructor\n * @param {HTMLElement | String} el <canvas> element to initialize instance on\n * @param {Object} [options] Options object\n * @return {Object} thisArg\n */\n initialize: function initialize(el, options) {\n options || (options = {});\n this.renderAndResetBound = this.renderAndReset.bind(this);\n this.requestRenderAllBound = this.requestRenderAll.bind(this);\n\n this._initStatic(el, options);\n\n this._initInteractive();\n\n this._createCacheCanvas();\n },\n\n /**\n * When true, objects can be transformed by one side (unproportionally)\n * @type Boolean\n * @default\n */\n uniScaleTransform: false,\n\n /**\n * Indicates which key enable unproportional scaling\n * values: 'altKey', 'shiftKey', 'ctrlKey'.\n * If `null` or 'none' or any other string that is not a modifier key\n * feature is disabled feature disabled.\n * @since 1.6.2\n * @type String\n * @default\n */\n uniScaleKey: 'shiftKey',\n\n /**\n * When true, objects use center point as the origin of scale transformation.\n * <b>Backwards incompatibility note:</b> This property replaces \"centerTransform\" (Boolean).\n * @since 1.3.4\n * @type Boolean\n * @default\n */\n centeredScaling: false,\n\n /**\n * When true, objects use center point as the origin of rotate transformation.\n * <b>Backwards incompatibility note:</b> This property replaces \"centerTransform\" (Boolean).\n * @since 1.3.4\n * @type Boolean\n * @default\n */\n centeredRotation: false,\n\n /**\n * Indicates which key enable centered Transform\n * values: 'altKey', 'shiftKey', 'ctrlKey'.\n * If `null` or 'none' or any other string that is not a modifier key\n * feature is disabled feature disabled.\n * @since 1.6.2\n * @type String\n * @default\n */\n centeredKey: 'altKey',\n\n /**\n * Indicates which key enable alternate action on corner\n * values: 'altKey', 'shiftKey', 'ctrlKey'.\n * If `null` or 'none' or any other string that is not a modifier key\n * feature is disabled feature disabled.\n * @since 1.6.2\n * @type String\n * @default\n */\n altActionKey: 'shiftKey',\n\n /**\n * Indicates that canvas is interactive. This property should not be changed.\n * @type Boolean\n * @default\n */\n interactive: true,\n\n /**\n * Indicates whether group selection should be enabled\n * @type Boolean\n * @default\n */\n selection: true,\n\n /**\n * Indicates which key or keys enable multiple click selection\n * Pass value as a string or array of strings\n * values: 'altKey', 'shiftKey', 'ctrlKey'.\n * If `null` or empty or containing any other string that is not a modifier key\n * feature is disabled.\n * @since 1.6.2\n * @type String|Array\n * @default\n */\n selectionKey: 'shiftKey',\n\n /**\n * Indicates which key enable alternative selection\n * in case of target overlapping with active object\n * values: 'altKey', 'shiftKey', 'ctrlKey'.\n * For a series of reason that come from the general expectations on how\n * things should work, this feature works only for preserveObjectStacking true.\n * If `null` or 'none' or any other string that is not a modifier key\n * feature is disabled.\n * @since 1.6.5\n * @type null|String\n * @default\n */\n altSelectionKey: null,\n\n /**\n * Color of selection\n * @type String\n * @default\n */\n selectionColor: 'rgba(100, 100, 255, 0.3)',\n // blue\n\n /**\n * Default dash array pattern\n * If not empty the selection border is dashed\n * @type Array\n */\n selectionDashArray: [],\n\n /**\n * Color of the border of selection (usually slightly darker than color of selection itself)\n * @type String\n * @default\n */\n selectionBorderColor: 'rgba(255, 255, 255, 0.3)',\n\n /**\n * Width of a line used in object/group selection\n * @type Number\n * @default\n */\n selectionLineWidth: 1,\n\n /**\n * Select only shapes that are fully contained in the dragged selection rectangle.\n * @type Boolean\n * @default\n */\n selectionFullyContained: false,\n\n /**\n * Default cursor value used when hovering over an object on canvas\n * @type String\n * @default\n */\n hoverCursor: 'move',\n\n /**\n * Default cursor value used when moving an object on canvas\n * @type String\n * @default\n */\n moveCursor: 'move',\n\n /**\n * Default cursor value used for the entire canvas\n * @type String\n * @default\n */\n defaultCursor: 'default',\n\n /**\n * Cursor value used during free drawing\n * @type String\n * @default\n */\n freeDrawingCursor: 'crosshair',\n\n /**\n * Cursor value used for rotation point\n * @type String\n * @default\n */\n rotationCursor: 'crosshair',\n\n /**\n * Cursor value used for disabled elements ( corners with disabled action )\n * @type String\n * @since 2.0.0\n * @default\n */\n notAllowedCursor: 'not-allowed',\n\n /**\n * Default element class that's given to wrapper (div) element of canvas\n * @type String\n * @default\n */\n containerClass: 'canvas-container',\n\n /**\n * When true, object detection happens on per-pixel basis rather than on per-bounding-box\n * @type Boolean\n * @default\n */\n perPixelTargetFind: false,\n\n /**\n * Number of pixels around target pixel to tolerate (consider active) during object detection\n * @type Number\n * @default\n */\n targetFindTolerance: 0,\n\n /**\n * When true, target detection is skipped when hovering over canvas. This can be used to improve performance.\n * @type Boolean\n * @default\n */\n skipTargetFind: false,\n\n /**\n * When true, mouse events on canvas (mousedown/mousemove/mouseup) result in free drawing.\n * After mousedown, mousemove creates a shape,\n * and then mouseup finalizes it and adds an instance of `fabric.Path` onto canvas.\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-4#free_drawing}\n * @type Boolean\n * @default\n */\n isDrawingMode: false,\n\n /**\n * Indicates whether objects should remain in current stack position when selected.\n * When false objects are brought to top and rendered as part of the selection group\n * @type Boolean\n * @default\n */\n preserveObjectStacking: false,\n\n /**\n * Indicates the angle that an object will lock to while rotating.\n * @type Number\n * @since 1.6.7\n * @default\n */\n snapAngle: 0,\n\n /**\n * Indicates the distance from the snapAngle the rotation will lock to the snapAngle.\n * When `null`, the snapThreshold will default to the snapAngle.\n * @type null|Number\n * @since 1.6.7\n * @default\n */\n snapThreshold: null,\n\n /**\n * Indicates if the right click on canvas can output the context menu or not\n * @type Boolean\n * @since 1.6.5\n * @default\n */\n stopContextMenu: false,\n\n /**\n * Indicates if the canvas can fire right click events\n * @type Boolean\n * @since 1.6.5\n * @default\n */\n fireRightClick: false,\n\n /**\n * Indicates if the canvas can fire middle click events\n * @type Boolean\n * @since 1.7.8\n * @default\n */\n fireMiddleClick: false,\n\n /**\n * Keep track of the subTargets for Mouse Events\n * @type fabric.Object[]\n */\n targets: [],\n\n /**\n * Keep track of the hovered target\n * @type fabric.Object\n * @private\n */\n _hoveredTarget: null,\n\n /**\n * hold the list of nested targets hovered\n * @type fabric.Object[]\n * @private\n */\n _hoveredTargets: [],\n\n /**\n * @private\n */\n _initInteractive: function _initInteractive() {\n this._currentTransform = null;\n this._groupSelector = null;\n\n this._initWrapperElement();\n\n this._createUpperCanvas();\n\n this._initEventListeners();\n\n this._initRetinaScaling();\n\n this.freeDrawingBrush = fabric.PencilBrush && new fabric.PencilBrush(this);\n this.calcOffset();\n },\n\n /**\n * Divides objects in two groups, one to render immediately\n * and one to render as activeGroup.\n * @return {Array} objects to render immediately and pushes the other in the activeGroup.\n */\n _chooseObjectsToRender: function _chooseObjectsToRender() {\n var activeObjects = this.getActiveObjects(),\n object,\n objsToRender,\n activeGroupObjects;\n\n if (activeObjects.length > 0 && !this.preserveObjectStacking) {\n objsToRender = [];\n activeGroupObjects = [];\n\n for (var i = 0, length = this._objects.length; i < length; i++) {\n object = this._objects[i];\n\n if (activeObjects.indexOf(object) === -1) {\n objsToRender.push(object);\n } else {\n activeGroupObjects.push(object);\n }\n }\n\n if (activeObjects.length > 1) {\n this._activeObject._objects = activeGroupObjects;\n }\n\n objsToRender.push.apply(objsToRender, activeGroupObjects);\n } else {\n objsToRender = this._objects;\n }\n\n return objsToRender;\n },\n\n /**\n * Renders both the top canvas and the secondary container canvas.\n * @return {fabric.Canvas} instance\n * @chainable\n */\n renderAll: function renderAll() {\n if (this.contextTopDirty && !this._groupSelector && !this.isDrawingMode) {\n this.clearContext(this.contextTop);\n this.contextTopDirty = false;\n }\n\n if (this.hasLostContext) {\n this.renderTopLayer(this.contextTop);\n }\n\n var canvasToDrawOn = this.contextContainer;\n this.renderCanvas(canvasToDrawOn, this._chooseObjectsToRender());\n return this;\n },\n renderTopLayer: function renderTopLayer(ctx) {\n ctx.save();\n\n if (this.isDrawingMode && this._isCurrentlyDrawing) {\n this.freeDrawingBrush && this.freeDrawingBrush._render();\n this.contextTopDirty = true;\n } // we render the top context - last object\n\n\n if (this.selection && this._groupSelector) {\n this._drawSelection(ctx);\n\n this.contextTopDirty = true;\n }\n\n ctx.restore();\n },\n\n /**\n * Method to render only the top canvas.\n * Also used to render the group selection box.\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n renderTop: function renderTop() {\n var ctx = this.contextTop;\n this.clearContext(ctx);\n this.renderTopLayer(ctx);\n this.fire('after:render');\n return this;\n },\n\n /**\n * Resets the current transform to its original values and chooses the type of resizing based on the event\n * @private\n */\n _resetCurrentTransform: function _resetCurrentTransform() {\n var t = this._currentTransform;\n t.target.set({\n scaleX: t.original.scaleX,\n scaleY: t.original.scaleY,\n skewX: t.original.skewX,\n skewY: t.original.skewY,\n left: t.original.left,\n top: t.original.top\n });\n\n if (this._shouldCenterTransform(t.target)) {\n if (t.originX !== 'center') {\n if (t.originX === 'right') {\n t.mouseXSign = -1;\n } else {\n t.mouseXSign = 1;\n }\n }\n\n if (t.originY !== 'center') {\n if (t.originY === 'bottom') {\n t.mouseYSign = -1;\n } else {\n t.mouseYSign = 1;\n }\n }\n\n t.originX = 'center';\n t.originY = 'center';\n } else {\n t.originX = t.original.originX;\n t.originY = t.original.originY;\n }\n },\n\n /**\n * Checks if point is contained within an area of given object\n * @param {Event} e Event object\n * @param {fabric.Object} target Object to test against\n * @param {Object} [point] x,y object of point coordinates we want to check.\n * @return {Boolean} true if point is contained within an area of given object\n */\n containsPoint: function containsPoint(e, target, point) {\n var ignoreZoom = true,\n pointer = point || this.getPointer(e, ignoreZoom),\n xy;\n\n if (target.group && target.group === this._activeObject && target.group.type === 'activeSelection') {\n xy = this._normalizePointer(target.group, pointer);\n } else {\n xy = {\n x: pointer.x,\n y: pointer.y\n };\n } // http://www.geog.ubc.ca/courses/klink/gis.notes/ncgia/u32.html\n // http://idav.ucdavis.edu/~okreylos/TAship/Spring2000/PointInPolygon.html\n\n\n return target.containsPoint(xy) || target._findTargetCorner(pointer);\n },\n\n /**\n * @private\n */\n _normalizePointer: function _normalizePointer(object, pointer) {\n var m = object.calcTransformMatrix(),\n invertedM = fabric.util.invertTransform(m),\n vptPointer = this.restorePointerVpt(pointer);\n return fabric.util.transformPoint(vptPointer, invertedM);\n },\n\n /**\n * Returns true if object is transparent at a certain location\n * @param {fabric.Object} target Object to check\n * @param {Number} x Left coordinate\n * @param {Number} y Top coordinate\n * @return {Boolean}\n */\n isTargetTransparent: function isTargetTransparent(target, x, y) {\n // in case the target is the activeObject, we cannot execute this optimization\n // because we need to draw controls too.\n if (target.shouldCache() && target._cacheCanvas && target !== this._activeObject) {\n var normalizedPointer = this._normalizePointer(target, {\n x: x,\n y: y\n }),\n targetRelativeX = Math.max(target.cacheTranslationX + normalizedPointer.x * target.zoomX, 0),\n targetRelativeY = Math.max(target.cacheTranslationY + normalizedPointer.y * target.zoomY, 0);\n\n var isTransparent = fabric.util.isTransparent(target._cacheContext, Math.round(targetRelativeX), Math.round(targetRelativeY), this.targetFindTolerance);\n return isTransparent;\n }\n\n var ctx = this.contextCache,\n originalColor = target.selectionBackgroundColor,\n v = this.viewportTransform;\n target.selectionBackgroundColor = '';\n this.clearContext(ctx);\n ctx.save();\n ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);\n target.render(ctx);\n ctx.restore();\n target === this._activeObject && target._renderControls(ctx, {\n hasBorders: false,\n transparentCorners: false\n }, {\n hasBorders: false\n });\n target.selectionBackgroundColor = originalColor;\n var isTransparent = fabric.util.isTransparent(ctx, x, y, this.targetFindTolerance);\n return isTransparent;\n },\n\n /**\n * takes an event and determins if selection key has been pressed\n * @private\n * @param {Event} e Event object\n */\n _isSelectionKeyPressed: function _isSelectionKeyPressed(e) {\n var selectionKeyPressed = false;\n\n if (Object.prototype.toString.call(this.selectionKey) === '[object Array]') {\n selectionKeyPressed = !!this.selectionKey.find(function (key) {\n return e[key] === true;\n });\n } else {\n selectionKeyPressed = e[this.selectionKey];\n }\n\n return selectionKeyPressed;\n },\n\n /**\n * @private\n * @param {Event} e Event object\n * @param {fabric.Object} target\n */\n _shouldClearSelection: function _shouldClearSelection(e, target) {\n var activeObjects = this.getActiveObjects(),\n activeObject = this._activeObject;\n return !target || target && activeObject && activeObjects.length > 1 && activeObjects.indexOf(target) === -1 && activeObject !== target && !this._isSelectionKeyPressed(e) || target && !target.evented || target && !target.selectable && activeObject && activeObject !== target;\n },\n\n /**\n * centeredScaling from object can't override centeredScaling from canvas.\n * this should be fixed, since object setting should take precedence over canvas.\n * @private\n * @param {fabric.Object} target\n */\n _shouldCenterTransform: function _shouldCenterTransform(target) {\n if (!target) {\n return;\n }\n\n var t = this._currentTransform,\n centerTransform;\n\n if (t.action === 'scale' || t.action === 'scaleX' || t.action === 'scaleY') {\n centerTransform = this.centeredScaling || target.centeredScaling;\n } else if (t.action === 'rotate') {\n centerTransform = this.centeredRotation || target.centeredRotation;\n }\n\n return centerTransform ? !t.altKey : t.altKey;\n },\n\n /**\n * @private\n */\n _getOriginFromCorner: function _getOriginFromCorner(target, corner) {\n var origin = {\n x: target.originX,\n y: target.originY\n };\n\n if (corner === 'ml' || corner === 'tl' || corner === 'bl') {\n origin.x = 'right';\n } else if (corner === 'mr' || corner === 'tr' || corner === 'br') {\n origin.x = 'left';\n }\n\n if (corner === 'tl' || corner === 'mt' || corner === 'tr') {\n origin.y = 'bottom';\n } else if (corner === 'bl' || corner === 'mb' || corner === 'br') {\n origin.y = 'top';\n }\n\n return origin;\n },\n\n /**\n * @private\n * @param {Boolean} alreadySelected true if target is already selected\n * @param {String} corner a string representing the corner ml, mr, tl ...\n * @param {Event} e Event object\n * @param {fabric.Object} [target] inserted back to help overriding. Unused\n */\n _getActionFromCorner: function _getActionFromCorner(alreadySelected, corner, e\n /* target */\n ) {\n if (!corner || !alreadySelected) {\n return 'drag';\n }\n\n switch (corner) {\n case 'mtr':\n return 'rotate';\n\n case 'ml':\n case 'mr':\n return e[this.altActionKey] ? 'skewY' : 'scaleX';\n\n case 'mt':\n case 'mb':\n return e[this.altActionKey] ? 'skewX' : 'scaleY';\n\n default:\n return 'scale';\n }\n },\n\n /**\n * @private\n * @param {Event} e Event object\n * @param {fabric.Object} target\n */\n _setupCurrentTransform: function _setupCurrentTransform(e, target, alreadySelected) {\n if (!target) {\n return;\n }\n\n var pointer = this.getPointer(e),\n corner = target._findTargetCorner(this.getPointer(e, true)),\n action = this._getActionFromCorner(alreadySelected, corner, e, target),\n origin = this._getOriginFromCorner(target, corner);\n\n this._currentTransform = {\n target: target,\n action: action,\n corner: corner,\n scaleX: target.scaleX,\n scaleY: target.scaleY,\n skewX: target.skewX,\n skewY: target.skewY,\n // used by transation\n offsetX: pointer.x - target.left,\n offsetY: pointer.y - target.top,\n originX: origin.x,\n originY: origin.y,\n ex: pointer.x,\n ey: pointer.y,\n lastX: pointer.x,\n lastY: pointer.y,\n // unsure they are usefull anymore.\n // left: target.left,\n // top: target.top,\n theta: degreesToRadians(target.angle),\n // end of unsure\n width: target.width * target.scaleX,\n mouseXSign: 1,\n mouseYSign: 1,\n shiftKey: e.shiftKey,\n altKey: e[this.centeredKey],\n original: fabric.util.saveObjectTransform(target)\n };\n this._currentTransform.original.originX = origin.x;\n this._currentTransform.original.originY = origin.y;\n\n this._resetCurrentTransform();\n\n this._beforeTransform(e);\n },\n\n /**\n * Translates object by \"setting\" its left/top\n * @private\n * @param {Number} x pointer's x coordinate\n * @param {Number} y pointer's y coordinate\n * @return {Boolean} true if the translation occurred\n */\n _translateObject: function _translateObject(x, y) {\n var transform = this._currentTransform,\n target = transform.target,\n newLeft = x - transform.offsetX,\n newTop = y - transform.offsetY,\n moveX = !target.get('lockMovementX') && target.left !== newLeft,\n moveY = !target.get('lockMovementY') && target.top !== newTop;\n moveX && target.set('left', newLeft);\n moveY && target.set('top', newTop);\n return moveX || moveY;\n },\n\n /**\n * Check if we are increasing a positive skew or lower it,\n * checking mouse direction and pressed corner.\n * @private\n */\n _changeSkewTransformOrigin: function _changeSkewTransformOrigin(mouseMove, t, by) {\n var property = 'originX',\n origins = {\n 0: 'center'\n },\n skew = t.target.skewX,\n originA = 'left',\n originB = 'right',\n corner = t.corner === 'mt' || t.corner === 'ml' ? 1 : -1,\n flipSign = 1;\n mouseMove = mouseMove > 0 ? 1 : -1;\n\n if (by === 'y') {\n skew = t.target.skewY;\n originA = 'top';\n originB = 'bottom';\n property = 'originY';\n }\n\n origins[-1] = originA;\n origins[1] = originB;\n t.target.flipX && (flipSign *= -1);\n t.target.flipY && (flipSign *= -1);\n\n if (skew === 0) {\n t.skewSign = -corner * mouseMove * flipSign;\n t[property] = origins[-mouseMove];\n } else {\n skew = skew > 0 ? 1 : -1;\n t.skewSign = skew;\n t[property] = origins[skew * corner * flipSign];\n }\n },\n\n /**\n * Skew object by mouse events\n * @private\n * @param {Number} x pointer's x coordinate\n * @param {Number} y pointer's y coordinate\n * @param {String} by Either 'x' or 'y'\n * @return {Boolean} true if the skewing occurred\n */\n _skewObject: function _skewObject(x, y, by) {\n var t = this._currentTransform,\n target = t.target,\n skewed = false,\n lockSkewingX = target.get('lockSkewingX'),\n lockSkewingY = target.get('lockSkewingY');\n\n if (lockSkewingX && by === 'x' || lockSkewingY && by === 'y') {\n return false;\n } // Get the constraint point\n\n\n var center = target.getCenterPoint(),\n actualMouseByCenter = target.toLocalPoint(new fabric.Point(x, y), 'center', 'center')[by],\n lastMouseByCenter = target.toLocalPoint(new fabric.Point(t.lastX, t.lastY), 'center', 'center')[by],\n actualMouseByOrigin,\n constraintPosition,\n dim = target._getTransformedDimensions();\n\n this._changeSkewTransformOrigin(actualMouseByCenter - lastMouseByCenter, t, by);\n\n actualMouseByOrigin = target.toLocalPoint(new fabric.Point(x, y), t.originX, t.originY)[by];\n constraintPosition = target.translateToOriginPoint(center, t.originX, t.originY); // Actually skew the object\n\n skewed = this._setObjectSkew(actualMouseByOrigin, t, by, dim);\n t.lastX = x;\n t.lastY = y; // Make sure the constraints apply\n\n target.setPositionByOrigin(constraintPosition, t.originX, t.originY);\n return skewed;\n },\n\n /**\n * Set object skew\n * @private\n * @return {Boolean} true if the skewing occurred\n */\n _setObjectSkew: function _setObjectSkew(localMouse, transform, by, _dim) {\n var target = transform.target,\n newValue,\n skewed = false,\n skewSign = transform.skewSign,\n newDim,\n dimNoSkew,\n otherBy,\n _otherBy,\n _by,\n newDimMouse,\n skewX,\n skewY;\n\n if (by === 'x') {\n otherBy = 'y';\n _otherBy = 'Y';\n _by = 'X';\n skewX = 0;\n skewY = target.skewY;\n } else {\n otherBy = 'x';\n _otherBy = 'X';\n _by = 'Y';\n skewX = target.skewX;\n skewY = 0;\n }\n\n dimNoSkew = target._getTransformedDimensions(skewX, skewY);\n newDimMouse = 2 * Math.abs(localMouse) - dimNoSkew[by];\n\n if (newDimMouse <= 2) {\n newValue = 0;\n } else {\n newValue = skewSign * Math.atan(newDimMouse / target['scale' + _by] / (dimNoSkew[otherBy] / target['scale' + _otherBy]));\n newValue = fabric.util.radiansToDegrees(newValue);\n }\n\n skewed = target['skew' + _by] !== newValue;\n target.set('skew' + _by, newValue);\n\n if (target['skew' + _otherBy] !== 0) {\n newDim = target._getTransformedDimensions();\n newValue = _dim[otherBy] / newDim[otherBy] * target['scale' + _otherBy];\n target.set('scale' + _otherBy, newValue);\n }\n\n return skewed;\n },\n\n /**\n * Scales object by invoking its scaleX/scaleY methods\n * @private\n * @param {Number} x pointer's x coordinate\n * @param {Number} y pointer's y coordinate\n * @param {String} by Either 'x' or 'y' - specifies dimension constraint by which to scale an object.\n * When not provided, an object is scaled by both dimensions equally\n * @return {Boolean} true if the scaling occurred\n */\n _scaleObject: function _scaleObject(x, y, by) {\n var t = this._currentTransform,\n target = t.target,\n lockScalingX = target.lockScalingX,\n lockScalingY = target.lockScalingY,\n lockScalingFlip = target.lockScalingFlip;\n\n if (lockScalingX && lockScalingY) {\n return false;\n } // Get the constraint point\n\n\n var constraintPosition = target.translateToOriginPoint(target.getCenterPoint(), t.originX, t.originY),\n localMouse = target.toLocalPoint(new fabric.Point(x, y), t.originX, t.originY),\n dim = target._getTransformedDimensions(),\n scaled = false;\n\n this._setLocalMouse(localMouse, t); // Actually scale the object\n\n\n scaled = this._setObjectScale(localMouse, t, lockScalingX, lockScalingY, by, lockScalingFlip, dim); // Make sure the constraints apply\n\n target.setPositionByOrigin(constraintPosition, t.originX, t.originY);\n return scaled;\n },\n\n /**\n * @private\n * @return {Boolean} true if the scaling occurred\n */\n _setObjectScale: function _setObjectScale(localMouse, transform, lockScalingX, lockScalingY, by, lockScalingFlip, _dim) {\n var target = transform.target,\n forbidScalingX = false,\n forbidScalingY = false,\n scaled = false,\n scaleX = localMouse.x * target.scaleX / _dim.x,\n scaleY = localMouse.y * target.scaleY / _dim.y,\n changeX = target.scaleX !== scaleX,\n changeY = target.scaleY !== scaleY;\n transform.newScaleX = scaleX;\n transform.newScaleY = scaleY;\n\n if (fabric.Textbox && by === 'x' && target instanceof fabric.Textbox) {\n var w = target.width * (localMouse.x / _dim.x);\n\n if (w >= target.getMinWidth()) {\n scaled = w !== target.width;\n target.set('width', w);\n return scaled;\n }\n\n return false;\n }\n\n if (lockScalingFlip && scaleX <= 0 && scaleX < target.scaleX) {\n forbidScalingX = true;\n localMouse.x = 0;\n }\n\n if (lockScalingFlip && scaleY <= 0 && scaleY < target.scaleY) {\n forbidScalingY = true;\n localMouse.y = 0;\n }\n\n if (by === 'equally' && !lockScalingX && !lockScalingY) {\n scaled = this._scaleObjectEqually(localMouse, target, transform, _dim);\n } else if (!by) {\n forbidScalingX || lockScalingX || target.set('scaleX', scaleX) && (scaled = scaled || changeX);\n forbidScalingY || lockScalingY || target.set('scaleY', scaleY) && (scaled = scaled || changeY);\n } else if (by === 'x' && !target.get('lockUniScaling')) {\n forbidScalingX || lockScalingX || target.set('scaleX', scaleX) && (scaled = changeX);\n } else if (by === 'y' && !target.get('lockUniScaling')) {\n forbidScalingY || lockScalingY || target.set('scaleY', scaleY) && (scaled = changeY);\n }\n\n forbidScalingX || forbidScalingY || this._flipObject(transform, by);\n return scaled;\n },\n\n /**\n * @private\n * @return {Boolean} true if the scaling occurred\n */\n _scaleObjectEqually: function _scaleObjectEqually(localMouse, target, transform, _dim) {\n var dist = localMouse.y + localMouse.x,\n lastDist = _dim.y * transform.original.scaleY / target.scaleY + _dim.x * transform.original.scaleX / target.scaleX,\n scaled,\n signX = localMouse.x < 0 ? -1 : 1,\n signY = localMouse.y < 0 ? -1 : 1,\n newScaleX,\n newScaleY; // We use transform.scaleX/Y instead of target.scaleX/Y\n // because the object may have a min scale and we'll loose the proportions\n\n newScaleX = signX * Math.abs(transform.original.scaleX * dist / lastDist);\n newScaleY = signY * Math.abs(transform.original.scaleY * dist / lastDist);\n scaled = newScaleX !== target.scaleX || newScaleY !== target.scaleY;\n target.set('scaleX', newScaleX);\n target.set('scaleY', newScaleY);\n return scaled;\n },\n\n /**\n * @private\n */\n _flipObject: function _flipObject(transform, by) {\n if (transform.newScaleX < 0 && by !== 'y') {\n if (transform.originX === 'left') {\n transform.originX = 'right';\n } else if (transform.originX === 'right') {\n transform.originX = 'left';\n }\n }\n\n if (transform.newScaleY < 0 && by !== 'x') {\n if (transform.originY === 'top') {\n transform.originY = 'bottom';\n } else if (transform.originY === 'bottom') {\n transform.originY = 'top';\n }\n }\n },\n\n /**\n * @private\n */\n _setLocalMouse: function _setLocalMouse(localMouse, t) {\n var target = t.target,\n zoom = this.getZoom(),\n padding = target.padding / zoom;\n\n if (t.originX === 'right') {\n localMouse.x *= -1;\n } else if (t.originX === 'center') {\n localMouse.x *= t.mouseXSign * 2;\n\n if (localMouse.x < 0) {\n t.mouseXSign = -t.mouseXSign;\n }\n }\n\n if (t.originY === 'bottom') {\n localMouse.y *= -1;\n } else if (t.originY === 'center') {\n localMouse.y *= t.mouseYSign * 2;\n\n if (localMouse.y < 0) {\n t.mouseYSign = -t.mouseYSign;\n }\n } // adjust the mouse coordinates when dealing with padding\n\n\n if (abs(localMouse.x) > padding) {\n if (localMouse.x < 0) {\n localMouse.x += padding;\n } else {\n localMouse.x -= padding;\n }\n } else {\n // mouse is within the padding, set to 0\n localMouse.x = 0;\n }\n\n if (abs(localMouse.y) > padding) {\n if (localMouse.y < 0) {\n localMouse.y += padding;\n } else {\n localMouse.y -= padding;\n }\n } else {\n localMouse.y = 0;\n }\n },\n\n /**\n * Rotates object by invoking its rotate method\n * @private\n * @param {Number} x pointer's x coordinate\n * @param {Number} y pointer's y coordinate\n * @return {Boolean} true if the rotation occurred\n */\n _rotateObject: function _rotateObject(x, y) {\n var t = this._currentTransform,\n target = t.target,\n constraintPosition,\n constraintPosition = target.translateToOriginPoint(target.getCenterPoint(), t.originX, t.originY);\n\n if (target.lockRotation) {\n return false;\n }\n\n var lastAngle = atan2(t.ey - constraintPosition.y, t.ex - constraintPosition.x),\n curAngle = atan2(y - constraintPosition.y, x - constraintPosition.x),\n angle = radiansToDegrees(curAngle - lastAngle + t.theta),\n hasRotated = true;\n\n if (target.snapAngle > 0) {\n var snapAngle = target.snapAngle,\n snapThreshold = target.snapThreshold || snapAngle,\n rightAngleLocked = Math.ceil(angle / snapAngle) * snapAngle,\n leftAngleLocked = Math.floor(angle / snapAngle) * snapAngle;\n\n if (Math.abs(angle - leftAngleLocked) < snapThreshold) {\n angle = leftAngleLocked;\n } else if (Math.abs(angle - rightAngleLocked) < snapThreshold) {\n angle = rightAngleLocked;\n }\n } // normalize angle to positive value\n\n\n if (angle < 0) {\n angle = 360 + angle;\n }\n\n angle %= 360;\n\n if (target.angle === angle) {\n hasRotated = false;\n } else {\n // rotation only happen here\n target.angle = angle; // Make sure the constraints apply\n\n target.setPositionByOrigin(constraintPosition, t.originX, t.originY);\n }\n\n return hasRotated;\n },\n\n /**\n * Set the cursor type of the canvas element\n * @param {String} value Cursor type of the canvas element.\n * @see http://www.w3.org/TR/css3-ui/#cursor\n */\n setCursor: function setCursor(value) {\n this.upperCanvasEl.style.cursor = value;\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx to draw the selection on\n */\n _drawSelection: function _drawSelection(ctx) {\n var groupSelector = this._groupSelector,\n left = groupSelector.left,\n top = groupSelector.top,\n aleft = abs(left),\n atop = abs(top);\n\n if (this.selectionColor) {\n ctx.fillStyle = this.selectionColor;\n ctx.fillRect(groupSelector.ex - (left > 0 ? 0 : -left), groupSelector.ey - (top > 0 ? 0 : -top), aleft, atop);\n }\n\n if (!this.selectionLineWidth || !this.selectionBorderColor) {\n return;\n }\n\n ctx.lineWidth = this.selectionLineWidth;\n ctx.strokeStyle = this.selectionBorderColor; // selection border\n\n if (this.selectionDashArray.length > 1 && !supportLineDash) {\n var px = groupSelector.ex + STROKE_OFFSET - (left > 0 ? 0 : aleft),\n py = groupSelector.ey + STROKE_OFFSET - (top > 0 ? 0 : atop);\n ctx.beginPath();\n fabric.util.drawDashedLine(ctx, px, py, px + aleft, py, this.selectionDashArray);\n fabric.util.drawDashedLine(ctx, px, py + atop - 1, px + aleft, py + atop - 1, this.selectionDashArray);\n fabric.util.drawDashedLine(ctx, px, py, px, py + atop, this.selectionDashArray);\n fabric.util.drawDashedLine(ctx, px + aleft - 1, py, px + aleft - 1, py + atop, this.selectionDashArray);\n ctx.closePath();\n ctx.stroke();\n } else {\n fabric.Object.prototype._setLineDash.call(this, ctx, this.selectionDashArray);\n\n ctx.strokeRect(groupSelector.ex + STROKE_OFFSET - (left > 0 ? 0 : aleft), groupSelector.ey + STROKE_OFFSET - (top > 0 ? 0 : atop), aleft, atop);\n }\n },\n\n /**\n * Method that determines what object we are clicking on\n * the skipGroup parameter is for internal use, is needed for shift+click action\n * 11/09/2018 TODO: would be cool if findTarget could discern between being a full target\n * or the outside part of the corner.\n * @param {Event} e mouse event\n * @param {Boolean} skipGroup when true, activeGroup is skipped and only objects are traversed through\n * @return {fabric.Object} the target found\n */\n findTarget: function findTarget(e, skipGroup) {\n if (this.skipTargetFind) {\n return;\n }\n\n var ignoreZoom = true,\n pointer = this.getPointer(e, ignoreZoom),\n activeObject = this._activeObject,\n aObjects = this.getActiveObjects(),\n activeTarget,\n activeTargetSubs; // first check current group (if one exists)\n // active group does not check sub targets like normal groups.\n // if active group just exits.\n\n this.targets = [];\n\n if (aObjects.length > 1 && !skipGroup && activeObject === this._searchPossibleTargets([activeObject], pointer)) {\n return activeObject;\n } // if we hit the corner of an activeObject, let's return that.\n\n\n if (aObjects.length === 1 && activeObject._findTargetCorner(pointer)) {\n return activeObject;\n }\n\n if (aObjects.length === 1 && activeObject === this._searchPossibleTargets([activeObject], pointer)) {\n if (!this.preserveObjectStacking) {\n return activeObject;\n } else {\n activeTarget = activeObject;\n activeTargetSubs = this.targets;\n this.targets = [];\n }\n }\n\n var target = this._searchPossibleTargets(this._objects, pointer);\n\n if (e[this.altSelectionKey] && target && activeTarget && target !== activeTarget) {\n target = activeTarget;\n this.targets = activeTargetSubs;\n }\n\n return target;\n },\n\n /**\n * Checks point is inside the object.\n * @param {Object} [pointer] x,y object of point coordinates we want to check.\n * @param {fabric.Object} obj Object to test against\n * @param {Object} [globalPointer] x,y object of point coordinates relative to canvas used to search per pixel target.\n * @return {Boolean} true if point is contained within an area of given object\n * @private\n */\n _checkTarget: function _checkTarget(pointer, obj, globalPointer) {\n if (obj && obj.visible && obj.evented && this.containsPoint(null, obj, pointer)) {\n if ((this.perPixelTargetFind || obj.perPixelTargetFind) && !obj.isEditing) {\n var isTransparent = this.isTargetTransparent(obj, globalPointer.x, globalPointer.y);\n\n if (!isTransparent) {\n return true;\n }\n } else {\n return true;\n }\n }\n },\n\n /**\n * Function used to search inside objects an object that contains pointer in bounding box or that contains pointerOnCanvas when painted\n * @param {Array} [objects] objects array to look into\n * @param {Object} [pointer] x,y object of point coordinates we want to check.\n * @return {fabric.Object} object that contains pointer\n * @private\n */\n _searchPossibleTargets: function _searchPossibleTargets(objects, pointer) {\n // Cache all targets where their bounding box contains point.\n var target,\n i = objects.length,\n subTarget; // Do not check for currently grouped objects, since we check the parent group itself.\n // until we call this function specifically to search inside the activeGroup\n\n while (i--) {\n var objToCheck = objects[i];\n var pointerToUse = objToCheck.group && objToCheck.group.type !== 'activeSelection' ? this._normalizePointer(objToCheck.group, pointer) : pointer;\n\n if (this._checkTarget(pointerToUse, objToCheck, pointer)) {\n target = objects[i];\n\n if (target.subTargetCheck && target instanceof fabric.Group) {\n subTarget = this._searchPossibleTargets(target._objects, pointer);\n subTarget && this.targets.push(subTarget);\n }\n\n break;\n }\n }\n\n return target;\n },\n\n /**\n * Returns pointer coordinates without the effect of the viewport\n * @param {Object} pointer with \"x\" and \"y\" number values\n * @return {Object} object with \"x\" and \"y\" number values\n */\n restorePointerVpt: function restorePointerVpt(pointer) {\n return fabric.util.transformPoint(pointer, fabric.util.invertTransform(this.viewportTransform));\n },\n\n /**\n * Returns pointer coordinates relative to canvas.\n * Can return coordinates with or without viewportTransform.\n * ignoreZoom false gives back coordinates that represent\n * the point clicked on canvas element.\n * ignoreZoom true gives back coordinates after being processed\n * by the viewportTransform ( sort of coordinates of what is displayed\n * on the canvas where you are clicking.\n * ignoreZoom true = HTMLElement coordinates relative to top,left\n * ignoreZoom false, default = fabric space coordinates, the same used for shape position\n * To interact with your shapes top and left you want to use ignoreZoom true\n * most of the time, while ignoreZoom false will give you coordinates\n * compatible with the object.oCoords system.\n * of the time.\n * @param {Event} e\n * @param {Boolean} ignoreZoom\n * @return {Object} object with \"x\" and \"y\" number values\n */\n getPointer: function getPointer(e, ignoreZoom) {\n // return cached values if we are in the event processing chain\n if (this._absolutePointer && !ignoreZoom) {\n return this._absolutePointer;\n }\n\n if (this._pointer && ignoreZoom) {\n return this._pointer;\n }\n\n var pointer = _getPointer(e),\n upperCanvasEl = this.upperCanvasEl,\n bounds = upperCanvasEl.getBoundingClientRect(),\n boundsWidth = bounds.width || 0,\n boundsHeight = bounds.height || 0,\n cssScale;\n\n if (!boundsWidth || !boundsHeight) {\n if ('top' in bounds && 'bottom' in bounds) {\n boundsHeight = Math.abs(bounds.top - bounds.bottom);\n }\n\n if ('right' in bounds && 'left' in bounds) {\n boundsWidth = Math.abs(bounds.right - bounds.left);\n }\n }\n\n this.calcOffset();\n pointer.x = pointer.x - this._offset.left;\n pointer.y = pointer.y - this._offset.top;\n\n if (!ignoreZoom) {\n pointer = this.restorePointerVpt(pointer);\n }\n\n var retinaScaling = this.getRetinaScaling();\n\n if (retinaScaling !== 1) {\n pointer.x /= retinaScaling;\n pointer.y /= retinaScaling;\n }\n\n if (boundsWidth === 0 || boundsHeight === 0) {\n // If bounds are not available (i.e. not visible), do not apply scale.\n cssScale = {\n width: 1,\n height: 1\n };\n } else {\n cssScale = {\n width: upperCanvasEl.width / boundsWidth,\n height: upperCanvasEl.height / boundsHeight\n };\n }\n\n return {\n x: pointer.x * cssScale.width,\n y: pointer.y * cssScale.height\n };\n },\n\n /**\n * @private\n * @throws {CANVAS_INIT_ERROR} If canvas can not be initialized\n */\n _createUpperCanvas: function _createUpperCanvas() {\n var lowerCanvasClass = this.lowerCanvasEl.className.replace(/\\s*lower-canvas\\s*/, ''),\n lowerCanvasEl = this.lowerCanvasEl,\n upperCanvasEl = this.upperCanvasEl; // there is no need to create a new upperCanvas element if we have already one.\n\n if (upperCanvasEl) {\n upperCanvasEl.className = '';\n } else {\n upperCanvasEl = this._createCanvasElement();\n this.upperCanvasEl = upperCanvasEl;\n }\n\n fabric.util.addClass(upperCanvasEl, 'upper-canvas ' + lowerCanvasClass);\n this.wrapperEl.appendChild(upperCanvasEl);\n\n this._copyCanvasStyle(lowerCanvasEl, upperCanvasEl);\n\n this._applyCanvasStyle(upperCanvasEl);\n\n this.contextTop = upperCanvasEl.getContext('2d');\n },\n\n /**\n * @private\n */\n _createCacheCanvas: function _createCacheCanvas() {\n this.cacheCanvasEl = this._createCanvasElement();\n this.cacheCanvasEl.setAttribute('width', this.width);\n this.cacheCanvasEl.setAttribute('height', this.height);\n this.contextCache = this.cacheCanvasEl.getContext('2d');\n },\n\n /**\n * @private\n */\n _initWrapperElement: function _initWrapperElement() {\n this.wrapperEl = fabric.util.wrapElement(this.lowerCanvasEl, 'div', {\n 'class': this.containerClass\n });\n fabric.util.setStyle(this.wrapperEl, {\n width: this.width + 'px',\n height: this.height + 'px',\n position: 'relative'\n });\n fabric.util.makeElementUnselectable(this.wrapperEl);\n },\n\n /**\n * @private\n * @param {HTMLElement} element canvas element to apply styles on\n */\n _applyCanvasStyle: function _applyCanvasStyle(element) {\n var width = this.width || element.width,\n height = this.height || element.height;\n fabric.util.setStyle(element, {\n position: 'absolute',\n width: width + 'px',\n height: height + 'px',\n left: 0,\n top: 0,\n 'touch-action': this.allowTouchScrolling ? 'manipulation' : 'none',\n '-ms-touch-action': this.allowTouchScrolling ? 'manipulation' : 'none'\n });\n element.width = width;\n element.height = height;\n fabric.util.makeElementUnselectable(element);\n },\n\n /**\n * Copy the entire inline style from one element (fromEl) to another (toEl)\n * @private\n * @param {Element} fromEl Element style is copied from\n * @param {Element} toEl Element copied style is applied to\n */\n _copyCanvasStyle: function _copyCanvasStyle(fromEl, toEl) {\n toEl.style.cssText = fromEl.style.cssText;\n },\n\n /**\n * Returns context of canvas where object selection is drawn\n * @return {CanvasRenderingContext2D}\n */\n getSelectionContext: function getSelectionContext() {\n return this.contextTop;\n },\n\n /**\n * Returns <canvas> element on which object selection is drawn\n * @return {HTMLCanvasElement}\n */\n getSelectionElement: function getSelectionElement() {\n return this.upperCanvasEl;\n },\n\n /**\n * Returns currently active object\n * @return {fabric.Object} active object\n */\n getActiveObject: function getActiveObject() {\n return this._activeObject;\n },\n\n /**\n * Returns an array with the current selected objects\n * @return {fabric.Object} active object\n */\n getActiveObjects: function getActiveObjects() {\n var active = this._activeObject;\n\n if (active) {\n if (active.type === 'activeSelection' && active._objects) {\n return active._objects.slice(0);\n } else {\n return [active];\n }\n }\n\n return [];\n },\n\n /**\n * @private\n * @param {fabric.Object} obj Object that was removed\n */\n _onObjectRemoved: function _onObjectRemoved(obj) {\n // removing active object should fire \"selection:cleared\" events\n if (obj === this._activeObject) {\n this.fire('before:selection:cleared', {\n target: obj\n });\n\n this._discardActiveObject();\n\n this.fire('selection:cleared', {\n target: obj\n });\n obj.fire('deselected');\n }\n\n if (obj === this._hoveredTarget) {\n this._hoveredTarget = null;\n this._hoveredTargets = [];\n }\n\n this.callSuper('_onObjectRemoved', obj);\n },\n\n /**\n * @private\n * Compares the old activeObject with the current one and fires correct events\n * @param {fabric.Object} obj old activeObject\n */\n _fireSelectionEvents: function _fireSelectionEvents(oldObjects, e) {\n var somethingChanged = false,\n objects = this.getActiveObjects(),\n added = [],\n removed = [],\n opt = {\n e: e\n };\n oldObjects.forEach(function (oldObject) {\n if (objects.indexOf(oldObject) === -1) {\n somethingChanged = true;\n oldObject.fire('deselected', opt);\n removed.push(oldObject);\n }\n });\n objects.forEach(function (object) {\n if (oldObjects.indexOf(object) === -1) {\n somethingChanged = true;\n object.fire('selected', opt);\n added.push(object);\n }\n });\n\n if (oldObjects.length > 0 && objects.length > 0) {\n opt.selected = added;\n opt.deselected = removed; // added for backward compatibility\n\n opt.updated = added[0] || removed[0];\n opt.target = this._activeObject;\n somethingChanged && this.fire('selection:updated', opt);\n } else if (objects.length > 0) {\n // deprecated event\n if (objects.length === 1) {\n opt.target = added[0];\n this.fire('object:selected', opt);\n }\n\n opt.selected = added; // added for backward compatibility\n\n opt.target = this._activeObject;\n this.fire('selection:created', opt);\n } else if (oldObjects.length > 0) {\n opt.deselected = removed;\n this.fire('selection:cleared', opt);\n }\n },\n\n /**\n * Sets given object as the only active object on canvas\n * @param {fabric.Object} object Object to set as an active one\n * @param {Event} [e] Event (passed along when firing \"object:selected\")\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n setActiveObject: function setActiveObject(object, e) {\n var currentActives = this.getActiveObjects();\n\n this._setActiveObject(object, e);\n\n this._fireSelectionEvents(currentActives, e);\n\n return this;\n },\n\n /**\n * @private\n * @param {Object} object to set as active\n * @param {Event} [e] Event (passed along when firing \"object:selected\")\n * @return {Boolean} true if the selection happened\n */\n _setActiveObject: function _setActiveObject(object, e) {\n if (this._activeObject === object) {\n return false;\n }\n\n if (!this._discardActiveObject(e, object)) {\n return false;\n }\n\n if (object.onSelect({\n e: e\n })) {\n return false;\n }\n\n this._activeObject = object;\n return true;\n },\n\n /**\n * @private\n */\n _discardActiveObject: function _discardActiveObject(e, object) {\n var obj = this._activeObject;\n\n if (obj) {\n // onDeselect return TRUE to cancel selection;\n if (obj.onDeselect({\n e: e,\n object: object\n })) {\n return false;\n }\n\n this._activeObject = null;\n }\n\n return true;\n },\n\n /**\n * Discards currently active object and fire events. If the function is called by fabric\n * as a consequence of a mouse event, the event is passed as a parameter and\n * sent to the fire function for the custom events. When used as a method the\n * e param does not have any application.\n * @param {event} e\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n discardActiveObject: function discardActiveObject(e) {\n var currentActives = this.getActiveObjects(),\n activeObject = this.getActiveObject();\n\n if (currentActives.length) {\n this.fire('before:selection:cleared', {\n target: activeObject,\n e: e\n });\n }\n\n this._discardActiveObject(e);\n\n this._fireSelectionEvents(currentActives, e);\n\n return this;\n },\n\n /**\n * Clears a canvas element and removes all event listeners\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n dispose: function dispose() {\n var wrapper = this.wrapperEl;\n this.removeListeners();\n wrapper.removeChild(this.upperCanvasEl);\n wrapper.removeChild(this.lowerCanvasEl);\n this.contextCache = null;\n this.contextTop = null;\n ['upperCanvasEl', 'cacheCanvasEl'].forEach(function (element) {\n fabric.util.cleanUpJsdomNode(this[element]);\n this[element] = undefined;\n }.bind(this));\n\n if (wrapper.parentNode) {\n wrapper.parentNode.replaceChild(this.lowerCanvasEl, this.wrapperEl);\n }\n\n delete this.wrapperEl;\n fabric.StaticCanvas.prototype.dispose.call(this);\n return this;\n },\n\n /**\n * Clears all contexts (background, main, top) of an instance\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n clear: function clear() {\n // this.discardActiveGroup();\n this.discardActiveObject();\n this.clearContext(this.contextTop);\n return this.callSuper('clear');\n },\n\n /**\n * Draws objects' controls (borders/controls)\n * @param {CanvasRenderingContext2D} ctx Context to render controls on\n */\n drawControls: function drawControls(ctx) {\n var activeObject = this._activeObject;\n\n if (activeObject) {\n activeObject._renderControls(ctx);\n }\n },\n\n /**\n * @private\n */\n _toObject: function _toObject(instance, methodName, propertiesToInclude) {\n //If the object is part of the current selection group, it should\n //be transformed appropriately\n //i.e. it should be serialised as it would appear if the selection group\n //were to be destroyed.\n var originalProperties = this._realizeGroupTransformOnObject(instance),\n object = this.callSuper('_toObject', instance, methodName, propertiesToInclude); //Undo the damage we did by changing all of its properties\n\n\n this._unwindGroupTransformOnObject(instance, originalProperties);\n\n return object;\n },\n\n /**\n * Realises an object's group transformation on it\n * @private\n * @param {fabric.Object} [instance] the object to transform (gets mutated)\n * @returns the original values of instance which were changed\n */\n _realizeGroupTransformOnObject: function _realizeGroupTransformOnObject(instance) {\n if (instance.group && instance.group.type === 'activeSelection' && this._activeObject === instance.group) {\n var layoutProps = ['angle', 'flipX', 'flipY', 'left', 'scaleX', 'scaleY', 'skewX', 'skewY', 'top']; //Copy all the positionally relevant properties across now\n\n var originalValues = {};\n layoutProps.forEach(function (prop) {\n originalValues[prop] = instance[prop];\n });\n\n this._activeObject.realizeTransform(instance);\n\n return originalValues;\n } else {\n return null;\n }\n },\n\n /**\n * Restores the changed properties of instance\n * @private\n * @param {fabric.Object} [instance] the object to un-transform (gets mutated)\n * @param {Object} [originalValues] the original values of instance, as returned by _realizeGroupTransformOnObject\n */\n _unwindGroupTransformOnObject: function _unwindGroupTransformOnObject(instance, originalValues) {\n if (originalValues) {\n instance.set(originalValues);\n }\n },\n\n /**\n * @private\n */\n _setSVGObject: function _setSVGObject(markup, instance, reviver) {\n //If the object is in a selection group, simulate what would happen to that\n //object when the group is deselected\n var originalProperties = this._realizeGroupTransformOnObject(instance);\n\n this.callSuper('_setSVGObject', markup, instance, reviver);\n\n this._unwindGroupTransformOnObject(instance, originalProperties);\n },\n setViewportTransform: function setViewportTransform(vpt) {\n if (this.renderOnAddRemove && this._activeObject && this._activeObject.isEditing) {\n this._activeObject.clearContextTop();\n }\n\n fabric.StaticCanvas.prototype.setViewportTransform.call(this, vpt);\n }\n }); // copying static properties manually to work around Opera's bug,\n // where \"prototype\" property is enumerable and overrides existing prototype\n\n for (var prop in fabric.StaticCanvas) {\n if (prop !== 'prototype') {\n fabric.Canvas[prop] = fabric.StaticCanvas[prop];\n }\n }\n})();\n\n(function () {\n var cursorOffset = {\n mt: 0,\n // n\n tr: 1,\n // ne\n mr: 2,\n // e\n br: 3,\n // se\n mb: 4,\n // s\n bl: 5,\n // sw\n ml: 6,\n // w\n tl: 7 // nw\n\n },\n addListener = fabric.util.addListener,\n removeListener = fabric.util.removeListener,\n RIGHT_CLICK = 3,\n MIDDLE_CLICK = 2,\n LEFT_CLICK = 1,\n addEventOptions = {\n passive: false\n };\n\n function checkClick(e, value) {\n return e.button && e.button === value - 1;\n }\n\n fabric.util.object.extend(fabric.Canvas.prototype,\n /** @lends fabric.Canvas.prototype */\n {\n /**\n * Map of cursor style values for each of the object controls\n * @private\n */\n cursorMap: ['n-resize', 'ne-resize', 'e-resize', 'se-resize', 's-resize', 'sw-resize', 'w-resize', 'nw-resize'],\n\n /**\n * Contains the id of the touch event that owns the fabric transform\n * @type Number\n * @private\n */\n mainTouchId: null,\n\n /**\n * Adds mouse listeners to canvas\n * @private\n */\n _initEventListeners: function _initEventListeners() {\n // in case we initialized the class twice. This should not happen normally\n // but in some kind of applications where the canvas element may be changed\n // this is a workaround to having double listeners.\n this.removeListeners();\n\n this._bindEvents();\n\n this.addOrRemove(addListener, 'add');\n },\n\n /**\n * return an event prefix pointer or mouse.\n * @private\n */\n _getEventPrefix: function _getEventPrefix() {\n return this.enablePointerEvents ? 'pointer' : 'mouse';\n },\n addOrRemove: function addOrRemove(functor, eventjsFunctor) {\n var canvasElement = this.upperCanvasEl,\n eventTypePrefix = this._getEventPrefix();\n\n functor(fabric.window, 'resize', this._onResize);\n functor(canvasElement, eventTypePrefix + 'down', this._onMouseDown);\n functor(canvasElement, eventTypePrefix + 'move', this._onMouseMove, addEventOptions);\n functor(canvasElement, eventTypePrefix + 'out', this._onMouseOut);\n functor(canvasElement, eventTypePrefix + 'enter', this._onMouseEnter);\n functor(canvasElement, 'wheel', this._onMouseWheel);\n functor(canvasElement, 'contextmenu', this._onContextMenu);\n functor(canvasElement, 'dblclick', this._onDoubleClick);\n functor(canvasElement, 'dragover', this._onDragOver);\n functor(canvasElement, 'dragenter', this._onDragEnter);\n functor(canvasElement, 'dragleave', this._onDragLeave);\n functor(canvasElement, 'drop', this._onDrop);\n\n if (!this.enablePointerEvents) {\n functor(canvasElement, 'touchstart', this._onTouchStart, addEventOptions);\n }\n\n if (typeof eventjs !== 'undefined' && eventjsFunctor in eventjs) {\n eventjs[eventjsFunctor](canvasElement, 'gesture', this._onGesture);\n eventjs[eventjsFunctor](canvasElement, 'drag', this._onDrag);\n eventjs[eventjsFunctor](canvasElement, 'orientation', this._onOrientationChange);\n eventjs[eventjsFunctor](canvasElement, 'shake', this._onShake);\n eventjs[eventjsFunctor](canvasElement, 'longpress', this._onLongPress);\n }\n },\n\n /**\n * Removes all event listeners\n */\n removeListeners: function removeListeners() {\n this.addOrRemove(removeListener, 'remove'); // if you dispose on a mouseDown, before mouse up, you need to clean document to...\n\n var eventTypePrefix = this._getEventPrefix();\n\n removeListener(fabric.document, eventTypePrefix + 'up', this._onMouseUp);\n removeListener(fabric.document, 'touchend', this._onTouchEnd, addEventOptions);\n removeListener(fabric.document, eventTypePrefix + 'move', this._onMouseMove, addEventOptions);\n removeListener(fabric.document, 'touchmove', this._onMouseMove, addEventOptions);\n },\n\n /**\n * @private\n */\n _bindEvents: function _bindEvents() {\n if (this.eventsBound) {\n // for any reason we pass here twice we do not want to bind events twice.\n return;\n }\n\n this._onMouseDown = this._onMouseDown.bind(this);\n this._onTouchStart = this._onTouchStart.bind(this);\n this._onMouseMove = this._onMouseMove.bind(this);\n this._onMouseUp = this._onMouseUp.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this._onResize = this._onResize.bind(this);\n this._onGesture = this._onGesture.bind(this);\n this._onDrag = this._onDrag.bind(this);\n this._onShake = this._onShake.bind(this);\n this._onLongPress = this._onLongPress.bind(this);\n this._onOrientationChange = this._onOrientationChange.bind(this);\n this._onMouseWheel = this._onMouseWheel.bind(this);\n this._onMouseOut = this._onMouseOut.bind(this);\n this._onMouseEnter = this._onMouseEnter.bind(this);\n this._onContextMenu = this._onContextMenu.bind(this);\n this._onDoubleClick = this._onDoubleClick.bind(this);\n this._onDragOver = this._onDragOver.bind(this);\n this._onDragEnter = this._simpleEventHandler.bind(this, 'dragenter');\n this._onDragLeave = this._simpleEventHandler.bind(this, 'dragleave');\n this._onDrop = this._simpleEventHandler.bind(this, 'drop');\n this.eventsBound = true;\n },\n\n /**\n * @private\n * @param {Event} [e] Event object fired on Event.js gesture\n * @param {Event} [self] Inner Event object\n */\n _onGesture: function _onGesture(e, self) {\n this.__onTransformGesture && this.__onTransformGesture(e, self);\n },\n\n /**\n * @private\n * @param {Event} [e] Event object fired on Event.js drag\n * @param {Event} [self] Inner Event object\n */\n _onDrag: function _onDrag(e, self) {\n this.__onDrag && this.__onDrag(e, self);\n },\n\n /**\n * @private\n * @param {Event} [e] Event object fired on wheel event\n */\n _onMouseWheel: function _onMouseWheel(e) {\n this.__onMouseWheel(e);\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousedown\n */\n _onMouseOut: function _onMouseOut(e) {\n var target = this._hoveredTarget;\n this.fire('mouse:out', {\n target: target,\n e: e\n });\n this._hoveredTarget = null;\n target && target.fire('mouseout', {\n e: e\n });\n\n var _this = this;\n\n this._hoveredTargets.forEach(function (_target) {\n _this.fire('mouse:out', {\n target: target,\n e: e\n });\n\n _target && target.fire('mouseout', {\n e: e\n });\n });\n\n this._hoveredTargets = [];\n\n if (this._iTextInstances) {\n this._iTextInstances.forEach(function (obj) {\n if (obj.isEditing) {\n obj.hiddenTextarea.focus();\n }\n });\n }\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mouseenter\n */\n _onMouseEnter: function _onMouseEnter(e) {\n // This find target and consequent 'mouse:over' is used to\n // clear old instances on hovered target.\n // calling findTarget has the side effect of killing target.__corner.\n // as a short term fix we are not firing this if we are currently transforming.\n // as a long term fix we need to separate the action of finding a target with the\n // side effects we added to it.\n if (!this.currentTransform && !this.findTarget(e)) {\n this.fire('mouse:over', {\n target: null,\n e: e\n });\n this._hoveredTarget = null;\n this._hoveredTargets = [];\n }\n },\n\n /**\n * @private\n * @param {Event} [e] Event object fired on Event.js orientation change\n * @param {Event} [self] Inner Event object\n */\n _onOrientationChange: function _onOrientationChange(e, self) {\n this.__onOrientationChange && this.__onOrientationChange(e, self);\n },\n\n /**\n * @private\n * @param {Event} [e] Event object fired on Event.js shake\n * @param {Event} [self] Inner Event object\n */\n _onShake: function _onShake(e, self) {\n this.__onShake && this.__onShake(e, self);\n },\n\n /**\n * @private\n * @param {Event} [e] Event object fired on Event.js shake\n * @param {Event} [self] Inner Event object\n */\n _onLongPress: function _onLongPress(e, self) {\n this.__onLongPress && this.__onLongPress(e, self);\n },\n\n /**\n * prevent default to allow drop event to be fired\n * @private\n * @param {Event} [e] Event object fired on Event.js shake\n */\n _onDragOver: function _onDragOver(e) {\n e.preventDefault();\n\n var target = this._simpleEventHandler('dragover', e);\n\n this._fireEnterLeaveEvents(target, e);\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousedown\n */\n _onContextMenu: function _onContextMenu(e) {\n if (this.stopContextMenu) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n return false;\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousedown\n */\n _onDoubleClick: function _onDoubleClick(e) {\n this._cacheTransformEventData(e);\n\n this._handleEvent(e, 'dblclick');\n\n this._resetTransformEventData(e);\n },\n\n /**\n * Return a the id of an event.\n * returns either the pointerId or the identifier or 0 for the mouse event\n * @private\n * @param {Event} evt Event object\n */\n getPointerId: function getPointerId(evt) {\n var changedTouches = evt.changedTouches;\n\n if (changedTouches) {\n return changedTouches[0] && changedTouches[0].identifier;\n }\n\n if (this.enablePointerEvents) {\n return evt.pointerId;\n }\n\n return -1;\n },\n\n /**\n * Determines if an event has the id of the event that is considered main\n * @private\n * @param {evt} event Event object\n */\n _isMainEvent: function _isMainEvent(evt) {\n if (evt.isPrimary === true) {\n return true;\n }\n\n if (evt.isPrimary === false) {\n return false;\n }\n\n if (evt.type === 'touchend' && evt.touches.length === 0) {\n return true;\n }\n\n if (evt.changedTouches) {\n return evt.changedTouches[0].identifier === this.mainTouchId;\n }\n\n return true;\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousedown\n */\n _onTouchStart: function _onTouchStart(e) {\n e.preventDefault();\n\n if (this.mainTouchId === null) {\n this.mainTouchId = this.getPointerId(e);\n }\n\n this.__onMouseDown(e);\n\n this._resetTransformEventData();\n\n var canvasElement = this.upperCanvasEl,\n eventTypePrefix = this._getEventPrefix();\n\n addListener(fabric.document, 'touchend', this._onTouchEnd, addEventOptions);\n addListener(fabric.document, 'touchmove', this._onMouseMove, addEventOptions); // Unbind mousedown to prevent double triggers from touch devices\n\n removeListener(canvasElement, eventTypePrefix + 'down', this._onMouseDown);\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousedown\n */\n _onMouseDown: function _onMouseDown(e) {\n this.__onMouseDown(e);\n\n this._resetTransformEventData();\n\n var canvasElement = this.upperCanvasEl,\n eventTypePrefix = this._getEventPrefix();\n\n removeListener(canvasElement, eventTypePrefix + 'move', this._onMouseMove, addEventOptions);\n addListener(fabric.document, eventTypePrefix + 'up', this._onMouseUp);\n addListener(fabric.document, eventTypePrefix + 'move', this._onMouseMove, addEventOptions);\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousedown\n */\n _onTouchEnd: function _onTouchEnd(e) {\n if (e.touches.length > 0) {\n // if there are still touches stop here\n return;\n }\n\n this.__onMouseUp(e);\n\n this._resetTransformEventData();\n\n this.mainTouchId = null;\n\n var eventTypePrefix = this._getEventPrefix();\n\n removeListener(fabric.document, 'touchend', this._onTouchEnd, addEventOptions);\n removeListener(fabric.document, 'touchmove', this._onMouseMove, addEventOptions);\n\n var _this = this;\n\n if (this._willAddMouseDown) {\n clearTimeout(this._willAddMouseDown);\n }\n\n this._willAddMouseDown = setTimeout(function () {\n // Wait 400ms before rebinding mousedown to prevent double triggers\n // from touch devices\n addListener(_this.upperCanvasEl, eventTypePrefix + 'down', _this._onMouseDown);\n _this._willAddMouseDown = 0;\n }, 400);\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mouseup\n */\n _onMouseUp: function _onMouseUp(e) {\n this.__onMouseUp(e);\n\n this._resetTransformEventData();\n\n var canvasElement = this.upperCanvasEl,\n eventTypePrefix = this._getEventPrefix();\n\n if (this._isMainEvent(e)) {\n removeListener(fabric.document, eventTypePrefix + 'up', this._onMouseUp);\n removeListener(fabric.document, eventTypePrefix + 'move', this._onMouseMove, addEventOptions);\n addListener(canvasElement, eventTypePrefix + 'move', this._onMouseMove, addEventOptions);\n }\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousemove\n */\n _onMouseMove: function _onMouseMove(e) {\n !this.allowTouchScrolling && e.preventDefault && e.preventDefault();\n\n this.__onMouseMove(e);\n },\n\n /**\n * @private\n */\n _onResize: function _onResize() {\n this.calcOffset();\n },\n\n /**\n * Decides whether the canvas should be redrawn in mouseup and mousedown events.\n * @private\n * @param {Object} target\n */\n _shouldRender: function _shouldRender(target) {\n var activeObject = this._activeObject;\n\n if (!!activeObject !== !!target || activeObject && target && activeObject !== target) {\n // this covers: switch of target, from target to no target, selection of target\n // multiSelection with key and mouse\n return true;\n } else if (activeObject && activeObject.isEditing) {\n // if we mouse up/down over a editing textbox a cursor change,\n // there is no need to re render\n return false;\n }\n\n return false;\n },\n\n /**\n * Method that defines the actions when mouse is released on canvas.\n * The method resets the currentTransform parameters, store the image corner\n * position in the image object and render the canvas on top.\n * @private\n * @param {Event} e Event object fired on mouseup\n */\n __onMouseUp: function __onMouseUp(e) {\n var target,\n transform = this._currentTransform,\n groupSelector = this._groupSelector,\n shouldRender = false,\n isClick = !groupSelector || groupSelector.left === 0 && groupSelector.top === 0;\n\n this._cacheTransformEventData(e);\n\n target = this._target;\n\n this._handleEvent(e, 'up:before'); // if right/middle click just fire events and return\n // target undefined will make the _handleEvent search the target\n\n\n if (checkClick(e, RIGHT_CLICK)) {\n if (this.fireRightClick) {\n this._handleEvent(e, 'up', RIGHT_CLICK, isClick);\n }\n\n return;\n }\n\n if (checkClick(e, MIDDLE_CLICK)) {\n if (this.fireMiddleClick) {\n this._handleEvent(e, 'up', MIDDLE_CLICK, isClick);\n }\n\n this._resetTransformEventData();\n\n return;\n }\n\n if (this.isDrawingMode && this._isCurrentlyDrawing) {\n this._onMouseUpInDrawingMode(e);\n\n return;\n }\n\n if (!this._isMainEvent(e)) {\n return;\n }\n\n if (transform) {\n this._finalizeCurrentTransform(e);\n\n shouldRender = transform.actionPerformed;\n }\n\n if (!isClick) {\n this._maybeGroupObjects(e);\n\n shouldRender || (shouldRender = this._shouldRender(target));\n }\n\n if (target) {\n target.isMoving = false;\n }\n\n this._setCursorFromEvent(e, target);\n\n this._handleEvent(e, 'up', LEFT_CLICK, isClick);\n\n this._groupSelector = null;\n this._currentTransform = null; // reset the target information about which corner is selected\n\n target && (target.__corner = 0);\n\n if (shouldRender) {\n this.requestRenderAll();\n } else if (!isClick) {\n this.renderTop();\n }\n },\n\n /**\n * @private\n * Handle event firing for target and subtargets\n * @param {Event} e event from mouse\n * @param {String} eventType event to fire (up, down or move)\n * @return {Fabric.Object} target return the the target found, for internal reasons.\n */\n _simpleEventHandler: function _simpleEventHandler(eventType, e) {\n var target = this.findTarget(e),\n targets = this.targets,\n options = {\n e: e,\n target: target,\n subTargets: targets\n };\n this.fire(eventType, options);\n target && target.fire(eventType, options);\n\n if (!targets) {\n return target;\n }\n\n for (var i = 0; i < targets.length; i++) {\n targets[i].fire(eventType, options);\n }\n\n return target;\n },\n\n /**\n * @private\n * Handle event firing for target and subtargets\n * @param {Event} e event from mouse\n * @param {String} eventType event to fire (up, down or move)\n * @param {fabric.Object} targetObj receiving event\n * @param {Number} [button] button used in the event 1 = left, 2 = middle, 3 = right\n * @param {Boolean} isClick for left button only, indicates that the mouse up happened without move.\n */\n _handleEvent: function _handleEvent(e, eventType, button, isClick) {\n var target = this._target,\n targets = this.targets || [],\n options = {\n e: e,\n target: target,\n subTargets: targets,\n button: button || LEFT_CLICK,\n isClick: isClick || false,\n pointer: this._pointer,\n absolutePointer: this._absolutePointer,\n transform: this._currentTransform\n };\n this.fire('mouse:' + eventType, options);\n target && target.fire('mouse' + eventType, options);\n\n for (var i = 0; i < targets.length; i++) {\n targets[i].fire('mouse' + eventType, options);\n }\n },\n\n /**\n * @private\n * @param {Event} e send the mouse event that generate the finalize down, so it can be used in the event\n */\n _finalizeCurrentTransform: function _finalizeCurrentTransform(e) {\n var transform = this._currentTransform,\n target = transform.target,\n eventName,\n options = {\n e: e,\n target: target,\n transform: transform\n };\n\n if (target._scaling) {\n target._scaling = false;\n }\n\n target.setCoords();\n\n if (transform.actionPerformed || this.stateful && target.hasStateChanged()) {\n if (transform.actionPerformed) {\n eventName = this._addEventOptions(options, transform);\n\n this._fire(eventName, options);\n }\n\n this._fire('modified', options);\n }\n },\n\n /**\n * Mutate option object in order to add by property and give back the event name.\n * @private\n * @param {Object} options to mutate\n * @param {Object} transform to inspect action from\n */\n _addEventOptions: function _addEventOptions(options, transform) {\n // we can probably add more details at low cost\n // scale change, rotation changes, translation changes\n var eventName, by;\n\n switch (transform.action) {\n case 'scaleX':\n eventName = 'scaled';\n by = 'x';\n break;\n\n case 'scaleY':\n eventName = 'scaled';\n by = 'y';\n break;\n\n case 'skewX':\n eventName = 'skewed';\n by = 'x';\n break;\n\n case 'skewY':\n eventName = 'skewed';\n by = 'y';\n break;\n\n case 'scale':\n eventName = 'scaled';\n by = 'equally';\n break;\n\n case 'rotate':\n eventName = 'rotated';\n break;\n\n case 'drag':\n eventName = 'moved';\n break;\n }\n\n options.by = by;\n return eventName;\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousedown\n */\n _onMouseDownInDrawingMode: function _onMouseDownInDrawingMode(e) {\n this._isCurrentlyDrawing = true;\n\n if (this.getActiveObject()) {\n this.discardActiveObject(e).requestRenderAll();\n }\n\n if (this.clipTo) {\n fabric.util.clipContext(this, this.contextTop);\n }\n\n var pointer = this.getPointer(e);\n this.freeDrawingBrush.onMouseDown(pointer, {\n e: e,\n pointer: pointer\n });\n\n this._handleEvent(e, 'down');\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mousemove\n */\n _onMouseMoveInDrawingMode: function _onMouseMoveInDrawingMode(e) {\n if (this._isCurrentlyDrawing) {\n var pointer = this.getPointer(e);\n this.freeDrawingBrush.onMouseMove(pointer, {\n e: e,\n pointer: pointer\n });\n }\n\n this.setCursor(this.freeDrawingCursor);\n\n this._handleEvent(e, 'move');\n },\n\n /**\n * @private\n * @param {Event} e Event object fired on mouseup\n */\n _onMouseUpInDrawingMode: function _onMouseUpInDrawingMode(e) {\n if (this.clipTo) {\n this.contextTop.restore();\n }\n\n var pointer = this.getPointer(e);\n this._isCurrentlyDrawing = this.freeDrawingBrush.onMouseUp({\n e: e,\n pointer: pointer\n });\n\n this._handleEvent(e, 'up');\n },\n\n /**\n * Method that defines the actions when mouse is clicked on canvas.\n * The method inits the currentTransform parameters and renders all the\n * canvas so the current image can be placed on the top canvas and the rest\n * in on the container one.\n * @private\n * @param {Event} e Event object fired on mousedown\n */\n __onMouseDown: function __onMouseDown(e) {\n this._cacheTransformEventData(e);\n\n this._handleEvent(e, 'down:before');\n\n var target = this._target; // if right click just fire events\n\n if (checkClick(e, RIGHT_CLICK)) {\n if (this.fireRightClick) {\n this._handleEvent(e, 'down', RIGHT_CLICK);\n }\n\n return;\n }\n\n if (checkClick(e, MIDDLE_CLICK)) {\n if (this.fireMiddleClick) {\n this._handleEvent(e, 'down', MIDDLE_CLICK);\n }\n\n return;\n }\n\n if (this.isDrawingMode) {\n this._onMouseDownInDrawingMode(e);\n\n return;\n }\n\n if (!this._isMainEvent(e)) {\n return;\n } // ignore if some object is being transformed at this moment\n\n\n if (this._currentTransform) {\n return;\n }\n\n var pointer = this._pointer; // save pointer for check in __onMouseUp event\n\n this._previousPointer = pointer;\n\n var shouldRender = this._shouldRender(target),\n shouldGroup = this._shouldGroup(e, target);\n\n if (this._shouldClearSelection(e, target)) {\n this.discardActiveObject(e);\n } else if (shouldGroup) {\n this._handleGrouping(e, target);\n\n target = this._activeObject;\n }\n\n if (this.selection && (!target || !target.selectable && !target.isEditing && target !== this._activeObject)) {\n this._groupSelector = {\n ex: pointer.x,\n ey: pointer.y,\n top: 0,\n left: 0\n };\n }\n\n if (target) {\n var alreadySelected = target === this._activeObject;\n\n if (target.selectable) {\n this.setActiveObject(target, e);\n }\n\n if (target === this._activeObject && (target.__corner || !shouldGroup)) {\n this._setupCurrentTransform(e, target, alreadySelected);\n }\n }\n\n this._handleEvent(e, 'down'); // we must renderAll so that we update the visuals\n\n\n (shouldRender || shouldGroup) && this.requestRenderAll();\n },\n\n /**\n * reset cache form common information needed during event processing\n * @private\n */\n _resetTransformEventData: function _resetTransformEventData() {\n this._target = null;\n this._pointer = null;\n this._absolutePointer = null;\n },\n\n /**\n * Cache common information needed during event processing\n * @private\n * @param {Event} e Event object fired on event\n */\n _cacheTransformEventData: function _cacheTransformEventData(e) {\n // reset in order to avoid stale caching\n this._resetTransformEventData();\n\n this._pointer = this.getPointer(e, true);\n this._absolutePointer = this.restorePointerVpt(this._pointer);\n this._target = this._currentTransform ? this._currentTransform.target : this.findTarget(e) || null;\n },\n\n /**\n * @private\n */\n _beforeTransform: function _beforeTransform(e) {\n var t = this._currentTransform;\n this.stateful && t.target.saveState();\n this.fire('before:transform', {\n e: e,\n transform: t\n }); // determine if it's a drag or rotate case\n\n if (t.corner) {\n this.onBeforeScaleRotate(t.target);\n }\n },\n\n /**\n * Method that defines the actions when mouse is hovering the canvas.\n * The currentTransform parameter will define whether the user is rotating/scaling/translating\n * an image or neither of them (only hovering). A group selection is also possible and would cancel\n * all any other type of action.\n * In case of an image transformation only the top canvas will be rendered.\n * @private\n * @param {Event} e Event object fired on mousemove\n */\n __onMouseMove: function __onMouseMove(e) {\n this._handleEvent(e, 'move:before');\n\n this._cacheTransformEventData(e);\n\n var target, pointer;\n\n if (this.isDrawingMode) {\n this._onMouseMoveInDrawingMode(e);\n\n return;\n }\n\n if (!this._isMainEvent(e)) {\n return;\n }\n\n var groupSelector = this._groupSelector; // We initially clicked in an empty area, so we draw a box for multiple selection\n\n if (groupSelector) {\n pointer = this._pointer;\n groupSelector.left = pointer.x - groupSelector.ex;\n groupSelector.top = pointer.y - groupSelector.ey;\n this.renderTop();\n } else if (!this._currentTransform) {\n target = this.findTarget(e) || null;\n\n this._setCursorFromEvent(e, target);\n\n this._fireOverOutEvents(target, e);\n } else {\n this._transformObject(e);\n }\n\n this._handleEvent(e, 'move');\n\n this._resetTransformEventData();\n },\n\n /**\n * Manage the mouseout, mouseover events for the fabric object on the canvas\n * @param {Fabric.Object} target the target where the target from the mousemove event\n * @param {Event} e Event object fired on mousemove\n * @private\n */\n _fireOverOutEvents: function _fireOverOutEvents(target, e) {\n var _hoveredTarget = this._hoveredTarget,\n _hoveredTargets = this._hoveredTargets,\n targets = this.targets,\n length = Math.max(_hoveredTargets.length, targets.length);\n this.fireSyntheticInOutEvents(target, e, {\n oldTarget: _hoveredTarget,\n evtOut: 'mouseout',\n canvasEvtOut: 'mouse:out',\n evtIn: 'mouseover',\n canvasEvtIn: 'mouse:over'\n });\n\n for (var i = 0; i < length; i++) {\n this.fireSyntheticInOutEvents(targets[i], e, {\n oldTarget: _hoveredTargets[i],\n evtOut: 'mouseout',\n evtIn: 'mouseover'\n });\n }\n\n this._hoveredTarget = target;\n this._hoveredTargets = this.targets.concat();\n },\n\n /**\n * Manage the dragEnter, dragLeave events for the fabric objects on the canvas\n * @param {Fabric.Object} target the target where the target from the onDrag event\n * @param {Event} e Event object fired on ondrag\n * @private\n */\n _fireEnterLeaveEvents: function _fireEnterLeaveEvents(target, e) {\n var _draggedoverTarget = this._draggedoverTarget,\n _hoveredTargets = this._hoveredTargets,\n targets = this.targets,\n length = Math.max(_hoveredTargets.length, targets.length);\n this.fireSyntheticInOutEvents(target, e, {\n oldTarget: _draggedoverTarget,\n evtOut: 'dragleave',\n evtIn: 'dragenter'\n });\n\n for (var i = 0; i < length; i++) {\n this.fireSyntheticInOutEvents(targets[i], e, {\n oldTarget: _hoveredTargets[i],\n evtOut: 'dragleave',\n evtIn: 'dragenter'\n });\n }\n\n this._draggedoverTarget = target;\n },\n\n /**\n * Manage the synthetic in/out events for the fabric objects on the canvas\n * @param {Fabric.Object} target the target where the target from the supported events\n * @param {Event} e Event object fired\n * @param {Object} config configuration for the function to work\n * @param {String} config.targetName property on the canvas where the old target is stored\n * @param {String} [config.canvasEvtOut] name of the event to fire at canvas level for out\n * @param {String} config.evtOut name of the event to fire for out\n * @param {String} [config.canvasEvtIn] name of the event to fire at canvas level for in\n * @param {String} config.evtIn name of the event to fire for in\n * @private\n */\n fireSyntheticInOutEvents: function fireSyntheticInOutEvents(target, e, config) {\n var inOpt,\n outOpt,\n oldTarget = config.oldTarget,\n outFires,\n inFires,\n targetChanged = oldTarget !== target,\n canvasEvtIn = config.canvasEvtIn,\n canvasEvtOut = config.canvasEvtOut;\n\n if (targetChanged) {\n inOpt = {\n e: e,\n target: target,\n previousTarget: oldTarget\n };\n outOpt = {\n e: e,\n target: oldTarget,\n nextTarget: target\n };\n }\n\n inFires = target && targetChanged;\n outFires = oldTarget && targetChanged;\n\n if (outFires) {\n canvasEvtOut && this.fire(canvasEvtOut, outOpt);\n oldTarget.fire(config.evtOut, outOpt);\n }\n\n if (inFires) {\n canvasEvtIn && this.fire(canvasEvtIn, inOpt);\n target.fire(config.evtIn, inOpt);\n }\n },\n\n /**\n * Method that defines actions when an Event Mouse Wheel\n * @param {Event} e Event object fired on mouseup\n */\n __onMouseWheel: function __onMouseWheel(e) {\n this._cacheTransformEventData(e);\n\n this._handleEvent(e, 'wheel');\n\n this._resetTransformEventData();\n },\n\n /**\n * @private\n * @param {Event} e Event fired on mousemove\n */\n _transformObject: function _transformObject(e) {\n var pointer = this.getPointer(e),\n transform = this._currentTransform;\n transform.reset = false;\n transform.target.isMoving = true;\n transform.shiftKey = e.shiftKey;\n transform.altKey = e[this.centeredKey];\n\n this._beforeScaleTransform(e, transform);\n\n this._performTransformAction(e, transform, pointer);\n\n transform.actionPerformed && this.requestRenderAll();\n },\n\n /**\n * @private\n */\n _performTransformAction: function _performTransformAction(e, transform, pointer) {\n var x = pointer.x,\n y = pointer.y,\n action = transform.action,\n actionPerformed = false,\n options = {\n target: transform.target,\n e: e,\n transform: transform,\n pointer: pointer\n };\n\n if (action === 'rotate') {\n (actionPerformed = this._rotateObject(x, y)) && this._fire('rotating', options);\n } else if (action === 'scale') {\n (actionPerformed = this._onScale(e, transform, x, y)) && this._fire('scaling', options);\n } else if (action === 'scaleX') {\n (actionPerformed = this._scaleObject(x, y, 'x')) && this._fire('scaling', options);\n } else if (action === 'scaleY') {\n (actionPerformed = this._scaleObject(x, y, 'y')) && this._fire('scaling', options);\n } else if (action === 'skewX') {\n (actionPerformed = this._skewObject(x, y, 'x')) && this._fire('skewing', options);\n } else if (action === 'skewY') {\n (actionPerformed = this._skewObject(x, y, 'y')) && this._fire('skewing', options);\n } else {\n actionPerformed = this._translateObject(x, y);\n\n if (actionPerformed) {\n this._fire('moving', options);\n\n this.setCursor(options.target.moveCursor || this.moveCursor);\n }\n }\n\n transform.actionPerformed = transform.actionPerformed || actionPerformed;\n },\n\n /**\n * @private\n */\n _fire: function _fire(eventName, options) {\n this.fire('object:' + eventName, options);\n options.target.fire(eventName, options);\n },\n\n /**\n * @private\n */\n _beforeScaleTransform: function _beforeScaleTransform(e, transform) {\n if (transform.action === 'scale' || transform.action === 'scaleX' || transform.action === 'scaleY') {\n var centerTransform = this._shouldCenterTransform(transform.target); // Switch from a normal resize to center-based\n\n\n if (centerTransform && (transform.originX !== 'center' || transform.originY !== 'center') || !centerTransform && transform.originX === 'center' && transform.originY === 'center') {\n this._resetCurrentTransform();\n\n transform.reset = true;\n }\n }\n },\n\n /**\n * @private\n * @param {Event} e Event object\n * @param {Object} transform current transform\n * @param {Number} x mouse position x from origin\n * @param {Number} y mouse position y from origin\n * @return {Boolean} true if the scaling occurred\n */\n _onScale: function _onScale(e, transform, x, y) {\n if (this._isUniscalePossible(e, transform.target)) {\n transform.currentAction = 'scale';\n return this._scaleObject(x, y);\n } else {\n // Switch from a normal resize to proportional\n if (!transform.reset && transform.currentAction === 'scale') {\n this._resetCurrentTransform();\n }\n\n transform.currentAction = 'scaleEqually';\n return this._scaleObject(x, y, 'equally');\n }\n },\n\n /**\n * @private\n * @param {Event} e Event object\n * @param {fabric.Object} target current target\n * @return {Boolean} true if unproportional scaling is possible\n */\n _isUniscalePossible: function _isUniscalePossible(e, target) {\n return (e[this.uniScaleKey] || this.uniScaleTransform) && !target.get('lockUniScaling');\n },\n\n /**\n * Sets the cursor depending on where the canvas is being hovered.\n * Note: very buggy in Opera\n * @param {Event} e Event object\n * @param {Object} target Object that the mouse is hovering, if so.\n */\n _setCursorFromEvent: function _setCursorFromEvent(e, target) {\n if (!target) {\n this.setCursor(this.defaultCursor);\n return false;\n }\n\n var hoverCursor = target.hoverCursor || this.hoverCursor,\n activeSelection = this._activeObject && this._activeObject.type === 'activeSelection' ? this._activeObject : null,\n // only show proper corner when group selection is not active\n corner = (!activeSelection || !activeSelection.contains(target)) && target._findTargetCorner(this.getPointer(e, true));\n\n if (!corner) {\n if (target.subTargetCheck) {\n // hoverCursor should come from top-most subTarget,\n // so we walk the array backwards\n this.targets.concat().reverse().map(function (_target) {\n hoverCursor = _target.hoverCursor || hoverCursor;\n });\n }\n\n this.setCursor(hoverCursor);\n } else {\n this.setCursor(this.getCornerCursor(corner, target, e));\n }\n },\n\n /**\n * @private\n */\n getCornerCursor: function getCornerCursor(corner, target, e) {\n if (this.actionIsDisabled(corner, target, e)) {\n return this.notAllowedCursor;\n } else if (corner in cursorOffset) {\n return this._getRotatedCornerCursor(corner, target, e);\n } else if (corner === 'mtr' && target.hasRotatingPoint) {\n return this.rotationCursor;\n } else {\n return this.defaultCursor;\n }\n },\n actionIsDisabled: function actionIsDisabled(corner, target, e) {\n if (corner === 'mt' || corner === 'mb') {\n return e[this.altActionKey] ? target.lockSkewingX : target.lockScalingY;\n } else if (corner === 'ml' || corner === 'mr') {\n return e[this.altActionKey] ? target.lockSkewingY : target.lockScalingX;\n } else if (corner === 'mtr') {\n return target.lockRotation;\n } else {\n return this._isUniscalePossible(e, target) ? target.lockScalingX && target.lockScalingY : target.lockScalingX || target.lockScalingY;\n }\n },\n\n /**\n * @private\n */\n _getRotatedCornerCursor: function _getRotatedCornerCursor(corner, target, e) {\n var n = Math.round(target.angle % 360 / 45);\n\n if (n < 0) {\n n += 8; // full circle ahead\n }\n\n n += cursorOffset[corner];\n\n if (e[this.altActionKey] && cursorOffset[corner] % 2 === 0) {\n //if we are holding shift and we are on a mx corner...\n n += 2;\n } // normalize n to be from 0 to 7\n\n\n n %= 8;\n return this.cursorMap[n];\n }\n });\n})();\n\n(function () {\n var min = Math.min,\n max = Math.max;\n fabric.util.object.extend(fabric.Canvas.prototype,\n /** @lends fabric.Canvas.prototype */\n {\n /**\n * @private\n * @param {Event} e Event object\n * @param {fabric.Object} target\n * @return {Boolean}\n */\n _shouldGroup: function _shouldGroup(e, target) {\n var activeObject = this._activeObject;\n return activeObject && this._isSelectionKeyPressed(e) && target && target.selectable && this.selection && (activeObject !== target || activeObject.type === 'activeSelection') && !target.onSelect({\n e: e\n });\n },\n\n /**\n * @private\n * @param {Event} e Event object\n * @param {fabric.Object} target\n */\n _handleGrouping: function _handleGrouping(e, target) {\n var activeObject = this._activeObject; // avoid multi select when shift click on a corner\n\n if (activeObject.__corner) {\n return;\n }\n\n if (target === activeObject) {\n // if it's a group, find target again, using activeGroup objects\n target = this.findTarget(e, true); // if even object is not found or we are on activeObjectCorner, bail out\n\n if (!target || !target.selectable) {\n return;\n }\n }\n\n if (activeObject && activeObject.type === 'activeSelection') {\n this._updateActiveSelection(target, e);\n } else {\n this._createActiveSelection(target, e);\n }\n },\n\n /**\n * @private\n */\n _updateActiveSelection: function _updateActiveSelection(target, e) {\n var activeSelection = this._activeObject,\n currentActiveObjects = activeSelection._objects.slice(0);\n\n if (activeSelection.contains(target)) {\n activeSelection.removeWithUpdate(target);\n this._hoveredTarget = target;\n this._hoveredTargets = this.targets.concat();\n\n if (activeSelection.size() === 1) {\n // activate last remaining object\n this._setActiveObject(activeSelection.item(0), e);\n }\n } else {\n activeSelection.addWithUpdate(target);\n this._hoveredTarget = activeSelection;\n this._hoveredTargets = this.targets.concat();\n }\n\n this._fireSelectionEvents(currentActiveObjects, e);\n },\n\n /**\n * @private\n */\n _createActiveSelection: function _createActiveSelection(target, e) {\n var currentActives = this.getActiveObjects(),\n group = this._createGroup(target);\n\n this._hoveredTarget = group; // ISSUE 4115: should we consider subTargets here?\n // this._hoveredTargets = [];\n // this._hoveredTargets = this.targets.concat();\n\n this._setActiveObject(group, e);\n\n this._fireSelectionEvents(currentActives, e);\n },\n\n /**\n * @private\n * @param {Object} target\n */\n _createGroup: function _createGroup(target) {\n var objects = this._objects,\n isActiveLower = objects.indexOf(this._activeObject) < objects.indexOf(target),\n groupObjects = isActiveLower ? [this._activeObject, target] : [target, this._activeObject];\n this._activeObject.isEditing && this._activeObject.exitEditing();\n return new fabric.ActiveSelection(groupObjects, {\n canvas: this\n });\n },\n\n /**\n * @private\n * @param {Event} e mouse event\n */\n _groupSelectedObjects: function _groupSelectedObjects(e) {\n var group = this._collectObjects(e),\n aGroup; // do not create group for 1 element only\n\n\n if (group.length === 1) {\n this.setActiveObject(group[0], e);\n } else if (group.length > 1) {\n aGroup = new fabric.ActiveSelection(group.reverse(), {\n canvas: this\n });\n this.setActiveObject(aGroup, e);\n }\n },\n\n /**\n * @private\n */\n _collectObjects: function _collectObjects(e) {\n var group = [],\n currentObject,\n x1 = this._groupSelector.ex,\n y1 = this._groupSelector.ey,\n x2 = x1 + this._groupSelector.left,\n y2 = y1 + this._groupSelector.top,\n selectionX1Y1 = new fabric.Point(min(x1, x2), min(y1, y2)),\n selectionX2Y2 = new fabric.Point(max(x1, x2), max(y1, y2)),\n allowIntersect = !this.selectionFullyContained,\n isClick = x1 === x2 && y1 === y2; // we iterate reverse order to collect top first in case of click.\n\n for (var i = this._objects.length; i--;) {\n currentObject = this._objects[i];\n\n if (!currentObject || !currentObject.selectable || !currentObject.visible) {\n continue;\n }\n\n if (allowIntersect && currentObject.intersectsWithRect(selectionX1Y1, selectionX2Y2) || currentObject.isContainedWithinRect(selectionX1Y1, selectionX2Y2) || allowIntersect && currentObject.containsPoint(selectionX1Y1) || allowIntersect && currentObject.containsPoint(selectionX2Y2)) {\n group.push(currentObject); // only add one object if it's a click\n\n if (isClick) {\n break;\n }\n }\n }\n\n if (group.length > 1) {\n group = group.filter(function (object) {\n return !object.onSelect({\n e: e\n });\n });\n }\n\n return group;\n },\n\n /**\n * @private\n */\n _maybeGroupObjects: function _maybeGroupObjects(e) {\n if (this.selection && this._groupSelector) {\n this._groupSelectedObjects(e);\n }\n\n this.setCursor(this.defaultCursor); // clear selection and current transformation\n\n this._groupSelector = null;\n }\n });\n})();\n\n(function () {\n fabric.util.object.extend(fabric.StaticCanvas.prototype,\n /** @lends fabric.StaticCanvas.prototype */\n {\n /**\n * Exports canvas element to a dataurl image. Note that when multiplier is used, cropping is scaled appropriately\n * @param {Object} [options] Options object\n * @param {String} [options.format=png] The format of the output image. Either \"jpeg\" or \"png\"\n * @param {Number} [options.quality=1] Quality level (0..1). Only used for jpeg.\n * @param {Number} [options.multiplier=1] Multiplier to scale by, to have consistent\n * @param {Number} [options.left] Cropping left offset. Introduced in v1.2.14\n * @param {Number} [options.top] Cropping top offset. Introduced in v1.2.14\n * @param {Number} [options.width] Cropping width. Introduced in v1.2.14\n * @param {Number} [options.height] Cropping height. Introduced in v1.2.14\n * @param {Boolean} [options.enableRetinaScaling] Enable retina scaling for clone image. Introduce in 2.0.0\n * @return {String} Returns a data: URL containing a representation of the object in the format specified by options.format\n * @see {@link http://jsfiddle.net/fabricjs/NfZVb/|jsFiddle demo}\n * @example <caption>Generate jpeg dataURL with lower quality</caption>\n * var dataURL = canvas.toDataURL({\n * format: 'jpeg',\n * quality: 0.8\n * });\n * @example <caption>Generate cropped png dataURL (clipping of canvas)</caption>\n * var dataURL = canvas.toDataURL({\n * format: 'png',\n * left: 100,\n * top: 100,\n * width: 200,\n * height: 200\n * });\n * @example <caption>Generate double scaled png dataURL</caption>\n * var dataURL = canvas.toDataURL({\n * format: 'png',\n * multiplier: 2\n * });\n */\n toDataURL: function toDataURL(options) {\n options || (options = {});\n var format = options.format || 'png',\n quality = options.quality || 1,\n multiplier = (options.multiplier || 1) * (options.enableRetinaScaling ? this.getRetinaScaling() : 1),\n canvasEl = this.toCanvasElement(multiplier, options);\n return fabric.util.toDataURL(canvasEl, format, quality);\n },\n\n /**\n * Create a new HTMLCanvas element painted with the current canvas content.\n * No need to resize the actual one or repaint it.\n * Will transfer object ownership to a new canvas, paint it, and set everything back.\n * This is an intermediary step used to get to a dataUrl but also it is useful to\n * create quick image copies of a canvas without passing for the dataUrl string\n * @param {Number} [multiplier] a zoom factor.\n * @param {Object} [cropping] Cropping informations\n * @param {Number} [cropping.left] Cropping left offset.\n * @param {Number} [cropping.top] Cropping top offset.\n * @param {Number} [cropping.width] Cropping width.\n * @param {Number} [cropping.height] Cropping height.\n */\n toCanvasElement: function toCanvasElement(multiplier, cropping) {\n multiplier = multiplier || 1;\n cropping = cropping || {};\n var scaledWidth = (cropping.width || this.width) * multiplier,\n scaledHeight = (cropping.height || this.height) * multiplier,\n zoom = this.getZoom(),\n originalWidth = this.width,\n originalHeight = this.height,\n newZoom = zoom * multiplier,\n vp = this.viewportTransform,\n translateX = (vp[4] - (cropping.left || 0)) * multiplier,\n translateY = (vp[5] - (cropping.top || 0)) * multiplier,\n originalInteractive = this.interactive,\n newVp = [newZoom, 0, 0, newZoom, translateX, translateY],\n originalRetina = this.enableRetinaScaling,\n canvasEl = fabric.util.createCanvasElement(),\n originalContextTop = this.contextTop;\n canvasEl.width = scaledWidth;\n canvasEl.height = scaledHeight;\n this.contextTop = null;\n this.enableRetinaScaling = false;\n this.interactive = false;\n this.viewportTransform = newVp;\n this.width = scaledWidth;\n this.height = scaledHeight;\n this.calcViewportBoundaries();\n this.renderCanvas(canvasEl.getContext('2d'), this._objects);\n this.viewportTransform = vp;\n this.width = originalWidth;\n this.height = originalHeight;\n this.calcViewportBoundaries();\n this.interactive = originalInteractive;\n this.enableRetinaScaling = originalRetina;\n this.contextTop = originalContextTop;\n return canvasEl;\n }\n });\n})();\n\nfabric.util.object.extend(fabric.StaticCanvas.prototype,\n/** @lends fabric.StaticCanvas.prototype */\n{\n /**\n * Populates canvas with data from the specified dataless JSON.\n * JSON format must conform to the one of {@link fabric.Canvas#toDatalessJSON}\n * @deprecated since 1.2.2\n * @param {String|Object} json JSON string or object\n * @param {Function} callback Callback, invoked when json is parsed\n * and corresponding objects (e.g: {@link fabric.Image})\n * are initialized\n * @param {Function} [reviver] Method for further parsing of JSON elements, called after each fabric object created.\n * @return {fabric.Canvas} instance\n * @chainable\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-3#deserialization}\n */\n loadFromDatalessJSON: function loadFromDatalessJSON(json, callback, reviver) {\n return this.loadFromJSON(json, callback, reviver);\n },\n\n /**\n * Populates canvas with data from the specified JSON.\n * JSON format must conform to the one of {@link fabric.Canvas#toJSON}\n * @param {String|Object} json JSON string or object\n * @param {Function} callback Callback, invoked when json is parsed\n * and corresponding objects (e.g: {@link fabric.Image})\n * are initialized\n * @param {Function} [reviver] Method for further parsing of JSON elements, called after each fabric object created.\n * @return {fabric.Canvas} instance\n * @chainable\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-3#deserialization}\n * @see {@link http://jsfiddle.net/fabricjs/fmgXt/|jsFiddle demo}\n * @example <caption>loadFromJSON</caption>\n * canvas.loadFromJSON(json, canvas.renderAll.bind(canvas));\n * @example <caption>loadFromJSON with reviver</caption>\n * canvas.loadFromJSON(json, canvas.renderAll.bind(canvas), function(o, object) {\n * // `o` = json object\n * // `object` = fabric.Object instance\n * // ... do some stuff ...\n * });\n */\n loadFromJSON: function loadFromJSON(json, callback, reviver) {\n if (!json) {\n return;\n } // serialize if it wasn't already\n\n\n var serialized = typeof json === 'string' ? JSON.parse(json) : fabric.util.object.clone(json);\n\n var _this = this,\n clipPath = serialized.clipPath,\n renderOnAddRemove = this.renderOnAddRemove;\n\n this.renderOnAddRemove = false;\n delete serialized.clipPath;\n\n this._enlivenObjects(serialized.objects, function (enlivenedObjects) {\n _this.clear();\n\n _this._setBgOverlay(serialized, function () {\n if (clipPath) {\n _this._enlivenObjects([clipPath], function (enlivenedCanvasClip) {\n _this.clipPath = enlivenedCanvasClip[0];\n\n _this.__setupCanvas.call(_this, serialized, enlivenedObjects, renderOnAddRemove, callback);\n });\n } else {\n _this.__setupCanvas.call(_this, serialized, enlivenedObjects, renderOnAddRemove, callback);\n }\n });\n }, reviver);\n\n return this;\n },\n\n /**\n * @private\n * @param {Object} serialized Object with background and overlay information\n * @param {Array} restored canvas objects\n * @param {Function} cached renderOnAddRemove callback\n * @param {Function} callback Invoked after all background and overlay images/patterns loaded\n */\n __setupCanvas: function __setupCanvas(serialized, enlivenedObjects, renderOnAddRemove, callback) {\n var _this = this;\n\n enlivenedObjects.forEach(function (obj, index) {\n // we splice the array just in case some custom classes restored from JSON\n // will add more object to canvas at canvas init.\n _this.insertAt(obj, index);\n });\n this.renderOnAddRemove = renderOnAddRemove; // remove parts i cannot set as options\n\n delete serialized.objects;\n delete serialized.backgroundImage;\n delete serialized.overlayImage;\n delete serialized.background;\n delete serialized.overlay; // this._initOptions does too many things to just\n // call it. Normally loading an Object from JSON\n // create the Object instance. Here the Canvas is\n // already an instance and we are just loading things over it\n\n this._setOptions(serialized);\n\n this.renderAll();\n callback && callback();\n },\n\n /**\n * @private\n * @param {Object} serialized Object with background and overlay information\n * @param {Function} callback Invoked after all background and overlay images/patterns loaded\n */\n _setBgOverlay: function _setBgOverlay(serialized, callback) {\n var loaded = {\n backgroundColor: false,\n overlayColor: false,\n backgroundImage: false,\n overlayImage: false\n };\n\n if (!serialized.backgroundImage && !serialized.overlayImage && !serialized.background && !serialized.overlay) {\n callback && callback();\n return;\n }\n\n var cbIfLoaded = function cbIfLoaded() {\n if (loaded.backgroundImage && loaded.overlayImage && loaded.backgroundColor && loaded.overlayColor) {\n callback && callback();\n }\n };\n\n this.__setBgOverlay('backgroundImage', serialized.backgroundImage, loaded, cbIfLoaded);\n\n this.__setBgOverlay('overlayImage', serialized.overlayImage, loaded, cbIfLoaded);\n\n this.__setBgOverlay('backgroundColor', serialized.background, loaded, cbIfLoaded);\n\n this.__setBgOverlay('overlayColor', serialized.overlay, loaded, cbIfLoaded);\n },\n\n /**\n * @private\n * @param {String} property Property to set (backgroundImage, overlayImage, backgroundColor, overlayColor)\n * @param {(Object|String)} value Value to set\n * @param {Object} loaded Set loaded property to true if property is set\n * @param {Object} callback Callback function to invoke after property is set\n */\n __setBgOverlay: function __setBgOverlay(property, value, loaded, callback) {\n var _this = this;\n\n if (!value) {\n loaded[property] = true;\n callback && callback();\n return;\n }\n\n if (property === 'backgroundImage' || property === 'overlayImage') {\n fabric.util.enlivenObjects([value], function (enlivedObject) {\n _this[property] = enlivedObject[0];\n loaded[property] = true;\n callback && callback();\n });\n } else {\n this['set' + fabric.util.string.capitalize(property, true)](value, function () {\n loaded[property] = true;\n callback && callback();\n });\n }\n },\n\n /**\n * @private\n * @param {Array} objects\n * @param {Function} callback\n * @param {Function} [reviver]\n */\n _enlivenObjects: function _enlivenObjects(objects, callback, reviver) {\n if (!objects || objects.length === 0) {\n callback && callback([]);\n return;\n }\n\n fabric.util.enlivenObjects(objects, function (enlivenedObjects) {\n callback && callback(enlivenedObjects);\n }, null, reviver);\n },\n\n /**\n * @private\n * @param {String} format\n * @param {Function} callback\n */\n _toDataURL: function _toDataURL(format, callback) {\n this.clone(function (clone) {\n callback(clone.toDataURL(format));\n });\n },\n\n /**\n * @private\n * @param {String} format\n * @param {Number} multiplier\n * @param {Function} callback\n */\n _toDataURLWithMultiplier: function _toDataURLWithMultiplier(format, multiplier, callback) {\n this.clone(function (clone) {\n callback(clone.toDataURLWithMultiplier(format, multiplier));\n });\n },\n\n /**\n * Clones canvas instance\n * @param {Object} [callback] Receives cloned instance as a first argument\n * @param {Array} [properties] Array of properties to include in the cloned canvas and children\n */\n clone: function clone(callback, properties) {\n var data = JSON.stringify(this.toJSON(properties));\n this.cloneWithoutData(function (clone) {\n clone.loadFromJSON(data, function () {\n callback && callback(clone);\n });\n });\n },\n\n /**\n * Clones canvas instance without cloning existing data.\n * This essentially copies canvas dimensions, clipping properties, etc.\n * but leaves data empty (so that you can populate it with your own)\n * @param {Object} [callback] Receives cloned instance as a first argument\n */\n cloneWithoutData: function cloneWithoutData(callback) {\n var el = fabric.util.createCanvasElement();\n el.width = this.width;\n el.height = this.height;\n var clone = new fabric.Canvas(el);\n clone.clipTo = this.clipTo;\n\n if (this.backgroundImage) {\n clone.setBackgroundImage(this.backgroundImage.src, function () {\n clone.renderAll();\n callback && callback(clone);\n });\n clone.backgroundImageOpacity = this.backgroundImageOpacity;\n clone.backgroundImageStretch = this.backgroundImageStretch;\n } else {\n callback && callback(clone);\n }\n }\n});\n/**\n * Adds support for multi-touch gestures using the Event.js library.\n * Fires the following custom events:\n * - touch:gesture\n * - touch:drag\n * - touch:orientation\n * - touch:shake\n * - touch:longpress\n */\n\n(function () {\n var degreesToRadians = fabric.util.degreesToRadians,\n radiansToDegrees = fabric.util.radiansToDegrees;\n fabric.util.object.extend(fabric.Canvas.prototype,\n /** @lends fabric.Canvas.prototype */\n {\n /**\n * Method that defines actions when an Event.js gesture is detected on an object. Currently only supports\n * 2 finger gestures.\n * @param {Event} e Event object by Event.js\n * @param {Event} self Event proxy object by Event.js\n */\n __onTransformGesture: function __onTransformGesture(e, self) {\n if (this.isDrawingMode || !e.touches || e.touches.length !== 2 || 'gesture' !== self.gesture) {\n return;\n }\n\n var target = this.findTarget(e);\n\n if ('undefined' !== typeof target) {\n this.__gesturesParams = {\n e: e,\n self: self,\n target: target\n };\n\n this.__gesturesRenderer();\n }\n\n this.fire('touch:gesture', {\n target: target,\n e: e,\n self: self\n });\n },\n __gesturesParams: null,\n __gesturesRenderer: function __gesturesRenderer() {\n if (this.__gesturesParams === null || this._currentTransform === null) {\n return;\n }\n\n var self = this.__gesturesParams.self,\n t = this._currentTransform,\n e = this.__gesturesParams.e;\n t.action = 'scale';\n t.originX = t.originY = 'center';\n\n this._scaleObjectBy(self.scale, e);\n\n if (self.rotation !== 0) {\n t.action = 'rotate';\n\n this._rotateObjectByAngle(self.rotation, e);\n }\n\n this.requestRenderAll();\n t.action = 'drag';\n },\n\n /**\n * Method that defines actions when an Event.js drag is detected.\n *\n * @param {Event} e Event object by Event.js\n * @param {Event} self Event proxy object by Event.js\n */\n __onDrag: function __onDrag(e, self) {\n this.fire('touch:drag', {\n e: e,\n self: self\n });\n },\n\n /**\n * Method that defines actions when an Event.js orientation event is detected.\n *\n * @param {Event} e Event object by Event.js\n * @param {Event} self Event proxy object by Event.js\n */\n __onOrientationChange: function __onOrientationChange(e, self) {\n this.fire('touch:orientation', {\n e: e,\n self: self\n });\n },\n\n /**\n * Method that defines actions when an Event.js shake event is detected.\n *\n * @param {Event} e Event object by Event.js\n * @param {Event} self Event proxy object by Event.js\n */\n __onShake: function __onShake(e, self) {\n this.fire('touch:shake', {\n e: e,\n self: self\n });\n },\n\n /**\n * Method that defines actions when an Event.js longpress event is detected.\n *\n * @param {Event} e Event object by Event.js\n * @param {Event} self Event proxy object by Event.js\n */\n __onLongPress: function __onLongPress(e, self) {\n this.fire('touch:longpress', {\n e: e,\n self: self\n });\n },\n\n /**\n * Scales an object by a factor\n * @param {Number} s The scale factor to apply to the current scale level\n * @param {Event} e Event object by Event.js\n */\n _scaleObjectBy: function _scaleObjectBy(s, e) {\n var t = this._currentTransform,\n target = t.target,\n lockScalingX = target.get('lockScalingX'),\n lockScalingY = target.get('lockScalingY');\n\n if (lockScalingX && lockScalingY) {\n return;\n }\n\n target._scaling = true;\n\n var constraintPosition = target.translateToOriginPoint(target.getCenterPoint(), t.originX, t.originY),\n dim = target._getTransformedDimensions();\n\n this._setObjectScale(new fabric.Point(t.scaleX * dim.x * s / target.scaleX, t.scaleY * dim.y * s / target.scaleY), t, lockScalingX, lockScalingY, null, target.get('lockScalingFlip'), dim);\n\n target.setPositionByOrigin(constraintPosition, t.originX, t.originY);\n\n this._fire('scaling', {\n target: target,\n e: e,\n transform: t\n });\n },\n\n /**\n * Rotates object by an angle\n * @param {Number} curAngle The angle of rotation in degrees\n * @param {Event} e Event object by Event.js\n */\n _rotateObjectByAngle: function _rotateObjectByAngle(curAngle, e) {\n var t = this._currentTransform;\n\n if (t.target.get('lockRotation')) {\n return;\n }\n\n t.target.rotate(radiansToDegrees(degreesToRadians(curAngle) + t.theta));\n\n this._fire('rotating', {\n target: t.target,\n e: e,\n transform: t\n });\n }\n });\n})();\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n extend = fabric.util.object.extend,\n clone = fabric.util.object.clone,\n toFixed = fabric.util.toFixed,\n capitalize = fabric.util.string.capitalize,\n degreesToRadians = fabric.util.degreesToRadians,\n supportsLineDash = fabric.StaticCanvas.supports('setLineDash'),\n objectCaching = !fabric.isLikelyNode,\n ALIASING_LIMIT = 2;\n\n if (fabric.Object) {\n return;\n }\n /**\n * Root object class from which all 2d shape classes inherit from\n * @class fabric.Object\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-1#objects}\n * @see {@link fabric.Object#initialize} for constructor definition\n *\n * @fires added\n * @fires removed\n *\n * @fires selected\n * @fires deselected\n * @fires modified\n * @fires modified\n * @fires moved\n * @fires scaled\n * @fires rotated\n * @fires skewed\n *\n * @fires rotating\n * @fires scaling\n * @fires moving\n * @fires skewing\n *\n * @fires mousedown\n * @fires mouseup\n * @fires mouseover\n * @fires mouseout\n * @fires mousewheel\n * @fires mousedblclick\n *\n * @fires dragover\n * @fires dragenter\n * @fires dragleave\n * @fires drop\n */\n\n\n fabric.Object = fabric.util.createClass(fabric.CommonMethods,\n /** @lends fabric.Object.prototype */\n {\n /**\n * Type of an object (rect, circle, path, etc.).\n * Note that this property is meant to be read-only and not meant to be modified.\n * If you modify, certain parts of Fabric (such as JSON loading) won't work correctly.\n * @type String\n * @default\n */\n type: 'object',\n\n /**\n * Horizontal origin of transformation of an object (one of \"left\", \"right\", \"center\")\n * See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups\n * @type String\n * @default\n */\n originX: 'left',\n\n /**\n * Vertical origin of transformation of an object (one of \"top\", \"bottom\", \"center\")\n * See http://jsfiddle.net/1ow02gea/244/ on how originX/originY affect objects in groups\n * @type String\n * @default\n */\n originY: 'top',\n\n /**\n * Top position of an object. Note that by default it's relative to object top. You can change this by setting originY={top/center/bottom}\n * @type Number\n * @default\n */\n top: 0,\n\n /**\n * Left position of an object. Note that by default it's relative to object left. You can change this by setting originX={left/center/right}\n * @type Number\n * @default\n */\n left: 0,\n\n /**\n * Object width\n * @type Number\n * @default\n */\n width: 0,\n\n /**\n * Object height\n * @type Number\n * @default\n */\n height: 0,\n\n /**\n * Object scale factor (horizontal)\n * @type Number\n * @default\n */\n scaleX: 1,\n\n /**\n * Object scale factor (vertical)\n * @type Number\n * @default\n */\n scaleY: 1,\n\n /**\n * When true, an object is rendered as flipped horizontally\n * @type Boolean\n * @default\n */\n flipX: false,\n\n /**\n * When true, an object is rendered as flipped vertically\n * @type Boolean\n * @default\n */\n flipY: false,\n\n /**\n * Opacity of an object\n * @type Number\n * @default\n */\n opacity: 1,\n\n /**\n * Angle of rotation of an object (in degrees)\n * @type Number\n * @default\n */\n angle: 0,\n\n /**\n * Angle of skew on x axes of an object (in degrees)\n * @type Number\n * @default\n */\n skewX: 0,\n\n /**\n * Angle of skew on y axes of an object (in degrees)\n * @type Number\n * @default\n */\n skewY: 0,\n\n /**\n * Size of object's controlling corners (in pixels)\n * @type Number\n * @default\n */\n cornerSize: 13,\n\n /**\n * When true, object's controlling corners are rendered as transparent inside (i.e. stroke instead of fill)\n * @type Boolean\n * @default\n */\n transparentCorners: true,\n\n /**\n * Default cursor value used when hovering over this object on canvas\n * @type String\n * @default\n */\n hoverCursor: null,\n\n /**\n * Default cursor value used when moving this object on canvas\n * @type String\n * @default\n */\n moveCursor: null,\n\n /**\n * Padding between object and its controlling borders (in pixels)\n * @type Number\n * @default\n */\n padding: 0,\n\n /**\n * Color of controlling borders of an object (when it's active)\n * @type String\n * @default\n */\n borderColor: 'rgba(102,153,255,0.75)',\n\n /**\n * Array specifying dash pattern of an object's borders (hasBorder must be true)\n * @since 1.6.2\n * @type Array\n */\n borderDashArray: null,\n\n /**\n * Color of controlling corners of an object (when it's active)\n * @type String\n * @default\n */\n cornerColor: 'rgba(102,153,255,0.5)',\n\n /**\n * Color of controlling corners of an object (when it's active and transparentCorners false)\n * @since 1.6.2\n * @type String\n * @default\n */\n cornerStrokeColor: null,\n\n /**\n * Specify style of control, 'rect' or 'circle'\n * @since 1.6.2\n * @type String\n */\n cornerStyle: 'rect',\n\n /**\n * Array specifying dash pattern of an object's control (hasBorder must be true)\n * @since 1.6.2\n * @type Array\n */\n cornerDashArray: null,\n\n /**\n * When true, this object will use center point as the origin of transformation\n * when being scaled via the controls.\n * <b>Backwards incompatibility note:</b> This property replaces \"centerTransform\" (Boolean).\n * @since 1.3.4\n * @type Boolean\n * @default\n */\n centeredScaling: false,\n\n /**\n * When true, this object will use center point as the origin of transformation\n * when being rotated via the controls.\n * <b>Backwards incompatibility note:</b> This property replaces \"centerTransform\" (Boolean).\n * @since 1.3.4\n * @type Boolean\n * @default\n */\n centeredRotation: true,\n\n /**\n * Color of object's fill\n * takes css colors https://www.w3.org/TR/css-color-3/\n * @type String\n * @default\n */\n fill: 'rgb(0,0,0)',\n\n /**\n * Fill rule used to fill an object\n * accepted values are nonzero, evenodd\n * <b>Backwards incompatibility note:</b> This property was used for setting globalCompositeOperation until v1.4.12 (use `fabric.Object#globalCompositeOperation` instead)\n * @type String\n * @default\n */\n fillRule: 'nonzero',\n\n /**\n * Composite rule used for canvas globalCompositeOperation\n * @type String\n * @default\n */\n globalCompositeOperation: 'source-over',\n\n /**\n * Background color of an object.\n * takes css colors https://www.w3.org/TR/css-color-3/\n * @type String\n * @default\n */\n backgroundColor: '',\n\n /**\n * Selection Background color of an object. colored layer behind the object when it is active.\n * does not mix good with globalCompositeOperation methods.\n * @type String\n * @default\n */\n selectionBackgroundColor: '',\n\n /**\n * When defined, an object is rendered via stroke and this property specifies its color\n * takes css colors https://www.w3.org/TR/css-color-3/\n * @type String\n * @default\n */\n stroke: null,\n\n /**\n * Width of a stroke used to render this object\n * @type Number\n * @default\n */\n strokeWidth: 1,\n\n /**\n * Array specifying dash pattern of an object's stroke (stroke must be defined)\n * @type Array\n */\n strokeDashArray: null,\n\n /**\n * Line offset of an object's stroke\n * @type Number\n * @default\n */\n strokeDashOffset: 0,\n\n /**\n * Line endings style of an object's stroke (one of \"butt\", \"round\", \"square\")\n * @type String\n * @default\n */\n strokeLineCap: 'butt',\n\n /**\n * Corner style of an object's stroke (one of \"bevil\", \"round\", \"miter\")\n * @type String\n * @default\n */\n strokeLineJoin: 'miter',\n\n /**\n * Maximum miter length (used for strokeLineJoin = \"miter\") of an object's stroke\n * @type Number\n * @default\n */\n strokeMiterLimit: 4,\n\n /**\n * Shadow object representing shadow of this shape\n * @type fabric.Shadow\n * @default\n */\n shadow: null,\n\n /**\n * Opacity of object's controlling borders when object is active and moving\n * @type Number\n * @default\n */\n borderOpacityWhenMoving: 0.4,\n\n /**\n * Scale factor of object's controlling borders\n * bigger number will make a thicker border\n * border is 1, so this is basically a border tickness\n * since there is no way to change the border itself.\n * @type Number\n * @default\n */\n borderScaleFactor: 1,\n\n /**\n * Transform matrix (similar to SVG's transform matrix)\n * This property has been depreacted. Since caching and and qrDecompose this\n * property can be handled with the standard top,left,scaleX,scaleY,angle and skewX.\n * A documentation example on how to parse and merge a transformMatrix will be provided before\n * completely removing it in fabric 4.0\n * If you are starting a project now, DO NOT use it.\n * @deprecated since 3.2.0\n * @type Array\n */\n transformMatrix: null,\n\n /**\n * Minimum allowed scale value of an object\n * @type Number\n * @default\n */\n minScaleLimit: 0,\n\n /**\n * When set to `false`, an object can not be selected for modification (using either point-click-based or group-based selection).\n * But events still fire on it.\n * @type Boolean\n * @default\n */\n selectable: true,\n\n /**\n * When set to `false`, an object can not be a target of events. All events propagate through it. Introduced in v1.3.4\n * @type Boolean\n * @default\n */\n evented: true,\n\n /**\n * When set to `false`, an object is not rendered on canvas\n * @type Boolean\n * @default\n */\n visible: true,\n\n /**\n * When set to `false`, object's controls are not displayed and can not be used to manipulate object\n * @type Boolean\n * @default\n */\n hasControls: true,\n\n /**\n * When set to `false`, object's controlling borders are not rendered\n * @type Boolean\n * @default\n */\n hasBorders: true,\n\n /**\n * When set to `false`, object's controlling rotating point will not be visible or selectable\n * @type Boolean\n * @default\n */\n hasRotatingPoint: true,\n\n /**\n * Offset for object's controlling rotating point (when enabled via `hasRotatingPoint`)\n * @type Number\n * @default\n */\n rotatingPointOffset: 40,\n\n /**\n * When set to `true`, objects are \"found\" on canvas on per-pixel basis rather than according to bounding box\n * @type Boolean\n * @default\n */\n perPixelTargetFind: false,\n\n /**\n * When `false`, default object's values are not included in its serialization\n * @type Boolean\n * @default\n */\n includeDefaultValues: true,\n\n /**\n * Function that determines clipping of an object (context is passed as a first argument).\n * If you are using code minification, ctx argument can be minified/manglied you should use\n * as a workaround `var ctx = arguments[0];` in the function;\n * Note that context origin is at the object's center point (not left/top corner)\n * @deprecated since 2.0.0\n * @type Function\n */\n clipTo: null,\n\n /**\n * When `true`, object horizontal movement is locked\n * @type Boolean\n * @default\n */\n lockMovementX: false,\n\n /**\n * When `true`, object vertical movement is locked\n * @type Boolean\n * @default\n */\n lockMovementY: false,\n\n /**\n * When `true`, object rotation is locked\n * @type Boolean\n * @default\n */\n lockRotation: false,\n\n /**\n * When `true`, object horizontal scaling is locked\n * @type Boolean\n * @default\n */\n lockScalingX: false,\n\n /**\n * When `true`, object vertical scaling is locked\n * @type Boolean\n * @default\n */\n lockScalingY: false,\n\n /**\n * When `true`, object non-uniform scaling is locked\n * @type Boolean\n * @default\n */\n lockUniScaling: false,\n\n /**\n * When `true`, object horizontal skewing is locked\n * @type Boolean\n * @default\n */\n lockSkewingX: false,\n\n /**\n * When `true`, object vertical skewing is locked\n * @type Boolean\n * @default\n */\n lockSkewingY: false,\n\n /**\n * When `true`, object cannot be flipped by scaling into negative values\n * @type Boolean\n * @default\n */\n lockScalingFlip: false,\n\n /**\n * When `true`, object is not exported in OBJECT/JSON\n * @since 1.6.3\n * @type Boolean\n * @default\n */\n excludeFromExport: false,\n\n /**\n * When `true`, object is cached on an additional canvas.\n * When `false`, object is not cached unless necessary ( clipPath )\n * default to true\n * @since 1.7.0\n * @type Boolean\n * @default true\n */\n objectCaching: objectCaching,\n\n /**\n * When `true`, object properties are checked for cache invalidation. In some particular\n * situation you may want this to be disabled ( spray brush, very big, groups)\n * or if your application does not allow you to modify properties for groups child you want\n * to disable it for groups.\n * default to false\n * since 1.7.0\n * @type Boolean\n * @default false\n */\n statefullCache: false,\n\n /**\n * When `true`, cache does not get updated during scaling. The picture will get blocky if scaled\n * too much and will be redrawn with correct details at the end of scaling.\n * this setting is performance and application dependant.\n * default to true\n * since 1.7.0\n * @type Boolean\n * @default true\n */\n noScaleCache: true,\n\n /**\n * When `false`, the stoke width will scale with the object.\n * When `true`, the stroke will always match the exact pixel size entered for stroke width.\n * default to false\n * @since 2.6.0\n * @type Boolean\n * @default false\n * @type Boolean\n * @default false\n */\n strokeUniform: false,\n\n /**\n * When set to `true`, object's cache will be rerendered next render call.\n * since 1.7.0\n * @type Boolean\n * @default true\n */\n dirty: true,\n\n /**\n * keeps the value of the last hovered corner during mouse move.\n * 0 is no corner, or 'mt', 'ml', 'mtr' etc..\n * It should be private, but there is no harm in using it as\n * a read-only property.\n * @type number|string|any\n * @default 0\n */\n __corner: 0,\n\n /**\n * Determines if the fill or the stroke is drawn first (one of \"fill\" or \"stroke\")\n * @type String\n * @default\n */\n paintFirst: 'fill',\n\n /**\n * List of properties to consider when checking if state\n * of an object is changed (fabric.Object#hasStateChanged)\n * as well as for history (undo/redo) purposes\n * @type Array\n */\n stateProperties: ('top left width height scaleX scaleY flipX flipY originX originY transformMatrix ' + 'stroke strokeWidth strokeDashArray strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit ' + 'angle opacity fill globalCompositeOperation shadow clipTo visible backgroundColor ' + 'skewX skewY fillRule paintFirst clipPath strokeUniform').split(' '),\n\n /**\n * List of properties to consider when checking if cache needs refresh\n * Those properties are checked by statefullCache ON ( or lazy mode if we want ) or from single\n * calls to Object.set(key, value). If the key is in this list, the object is marked as dirty\n * and refreshed at the next render\n * @type Array\n */\n cacheProperties: ('fill stroke strokeWidth strokeDashArray width height paintFirst strokeUniform' + ' strokeLineCap strokeDashOffset strokeLineJoin strokeMiterLimit backgroundColor clipPath').split(' '),\n\n /**\n * a fabricObject that, without stroke define a clipping area with their shape. filled in black\n * the clipPath object gets used when the object has rendered, and the context is placed in the center\n * of the object cacheCanvas.\n * If you want 0,0 of a clipPath to align with an object center, use clipPath.originX/Y to 'center'\n * @type fabric.Object\n */\n clipPath: undefined,\n\n /**\n * Meaningful ONLY when the object is used as clipPath.\n * if true, the clipPath will make the object clip to the outside of the clipPath\n * since 2.4.0\n * @type boolean\n * @default false\n */\n inverted: false,\n\n /**\n * Meaningful ONLY when the object is used as clipPath.\n * if true, the clipPath will have its top and left relative to canvas, and will\n * not be influenced by the object transform. This will make the clipPath relative\n * to the canvas, but clipping just a particular object.\n * WARNING this is beta, this feature may change or be renamed.\n * since 2.4.0\n * @type boolean\n * @default false\n */\n absolutePositioned: false,\n\n /**\n * Constructor\n * @param {Object} [options] Options object\n */\n initialize: function initialize(options) {\n if (options) {\n this.setOptions(options);\n }\n },\n\n /**\n * Create a the canvas used to keep the cached copy of the object\n * @private\n */\n _createCacheCanvas: function _createCacheCanvas() {\n this._cacheProperties = {};\n this._cacheCanvas = fabric.util.createCanvasElement();\n this._cacheContext = this._cacheCanvas.getContext('2d');\n\n this._updateCacheCanvas(); // if canvas gets created, is empty, so dirty.\n\n\n this.dirty = true;\n },\n\n /**\n * Limit the cache dimensions so that X * Y do not cross fabric.perfLimitSizeTotal\n * and each side do not cross fabric.cacheSideLimit\n * those numbers are configurable so that you can get as much detail as you want\n * making bargain with performances.\n * @param {Object} dims\n * @param {Object} dims.width width of canvas\n * @param {Object} dims.height height of canvas\n * @param {Object} dims.zoomX zoomX zoom value to unscale the canvas before drawing cache\n * @param {Object} dims.zoomY zoomY zoom value to unscale the canvas before drawing cache\n * @return {Object}.width width of canvas\n * @return {Object}.height height of canvas\n * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache\n * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache\n */\n _limitCacheSize: function _limitCacheSize(dims) {\n var perfLimitSizeTotal = fabric.perfLimitSizeTotal,\n width = dims.width,\n height = dims.height,\n max = fabric.maxCacheSideLimit,\n min = fabric.minCacheSideLimit;\n\n if (width <= max && height <= max && width * height <= perfLimitSizeTotal) {\n if (width < min) {\n dims.width = min;\n }\n\n if (height < min) {\n dims.height = min;\n }\n\n return dims;\n }\n\n var ar = width / height,\n limitedDims = fabric.util.limitDimsByArea(ar, perfLimitSizeTotal),\n capValue = fabric.util.capValue,\n x = capValue(min, limitedDims.x, max),\n y = capValue(min, limitedDims.y, max);\n\n if (width > x) {\n dims.zoomX /= width / x;\n dims.width = x;\n dims.capped = true;\n }\n\n if (height > y) {\n dims.zoomY /= height / y;\n dims.height = y;\n dims.capped = true;\n }\n\n return dims;\n },\n\n /**\n * Return the dimension and the zoom level needed to create a cache canvas\n * big enough to host the object to be cached.\n * @private\n * @return {Object}.x width of object to be cached\n * @return {Object}.y height of object to be cached\n * @return {Object}.width width of canvas\n * @return {Object}.height height of canvas\n * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache\n * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache\n */\n _getCacheCanvasDimensions: function _getCacheCanvasDimensions() {\n var objectScale = this.getTotalObjectScaling(),\n // caculate dimensions without skewing\n dim = this._getTransformedDimensions(0, 0),\n neededX = dim.x * objectScale.scaleX / this.scaleX,\n neededY = dim.y * objectScale.scaleY / this.scaleY;\n\n return {\n // for sure this ALIASING_LIMIT is slightly creating problem\n // in situation in which the cache canvas gets an upper limit\n // also objectScale contains already scaleX and scaleY\n width: neededX + ALIASING_LIMIT,\n height: neededY + ALIASING_LIMIT,\n zoomX: objectScale.scaleX,\n zoomY: objectScale.scaleY,\n x: neededX,\n y: neededY\n };\n },\n\n /**\n * Update width and height of the canvas for cache\n * returns true or false if canvas needed resize.\n * @private\n * @return {Boolean} true if the canvas has been resized\n */\n _updateCacheCanvas: function _updateCacheCanvas() {\n var targetCanvas = this.canvas;\n\n if (this.noScaleCache && targetCanvas && targetCanvas._currentTransform) {\n var target = targetCanvas._currentTransform.target,\n action = targetCanvas._currentTransform.action;\n\n if (this === target && action.slice && action.slice(0, 5) === 'scale') {\n return false;\n }\n }\n\n var canvas = this._cacheCanvas,\n dims = this._limitCacheSize(this._getCacheCanvasDimensions()),\n minCacheSize = fabric.minCacheSideLimit,\n width = dims.width,\n height = dims.height,\n drawingWidth,\n drawingHeight,\n zoomX = dims.zoomX,\n zoomY = dims.zoomY,\n dimensionsChanged = width !== this.cacheWidth || height !== this.cacheHeight,\n zoomChanged = this.zoomX !== zoomX || this.zoomY !== zoomY,\n shouldRedraw = dimensionsChanged || zoomChanged,\n additionalWidth = 0,\n additionalHeight = 0,\n shouldResizeCanvas = false;\n\n if (dimensionsChanged) {\n var canvasWidth = this._cacheCanvas.width,\n canvasHeight = this._cacheCanvas.height,\n sizeGrowing = width > canvasWidth || height > canvasHeight,\n sizeShrinking = (width < canvasWidth * 0.9 || height < canvasHeight * 0.9) && canvasWidth > minCacheSize && canvasHeight > minCacheSize;\n shouldResizeCanvas = sizeGrowing || sizeShrinking;\n\n if (sizeGrowing && !dims.capped && (width > minCacheSize || height > minCacheSize)) {\n additionalWidth = width * 0.1;\n additionalHeight = height * 0.1;\n }\n }\n\n if (shouldRedraw) {\n if (shouldResizeCanvas) {\n canvas.width = Math.ceil(width + additionalWidth);\n canvas.height = Math.ceil(height + additionalHeight);\n } else {\n this._cacheContext.setTransform(1, 0, 0, 1, 0, 0);\n\n this._cacheContext.clearRect(0, 0, canvas.width, canvas.height);\n }\n\n drawingWidth = dims.x / 2;\n drawingHeight = dims.y / 2;\n this.cacheTranslationX = Math.round(canvas.width / 2 - drawingWidth) + drawingWidth;\n this.cacheTranslationY = Math.round(canvas.height / 2 - drawingHeight) + drawingHeight;\n this.cacheWidth = width;\n this.cacheHeight = height;\n\n this._cacheContext.translate(this.cacheTranslationX, this.cacheTranslationY);\n\n this._cacheContext.scale(zoomX, zoomY);\n\n this.zoomX = zoomX;\n this.zoomY = zoomY;\n return true;\n }\n\n return false;\n },\n\n /**\n * Sets object's properties from options\n * @param {Object} [options] Options object\n */\n setOptions: function setOptions(options) {\n this._setOptions(options);\n\n this._initGradient(options.fill, 'fill');\n\n this._initGradient(options.stroke, 'stroke');\n\n this._initClipping(options);\n\n this._initPattern(options.fill, 'fill');\n\n this._initPattern(options.stroke, 'stroke');\n },\n\n /**\n * Transforms context when rendering an object\n * @param {CanvasRenderingContext2D} ctx Context\n */\n transform: function transform(ctx) {\n var m;\n\n if (this.group && !this.group._transformDone) {\n m = this.calcTransformMatrix();\n } else {\n m = this.calcOwnMatrix();\n }\n\n ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n },\n\n /**\n * Returns an object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} Object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n var NUM_FRACTION_DIGITS = fabric.Object.NUM_FRACTION_DIGITS,\n object = {\n type: this.type,\n version: fabric.version,\n originX: this.originX,\n originY: this.originY,\n left: toFixed(this.left, NUM_FRACTION_DIGITS),\n top: toFixed(this.top, NUM_FRACTION_DIGITS),\n width: toFixed(this.width, NUM_FRACTION_DIGITS),\n height: toFixed(this.height, NUM_FRACTION_DIGITS),\n fill: this.fill && this.fill.toObject ? this.fill.toObject() : this.fill,\n stroke: this.stroke && this.stroke.toObject ? this.stroke.toObject() : this.stroke,\n strokeWidth: toFixed(this.strokeWidth, NUM_FRACTION_DIGITS),\n strokeDashArray: this.strokeDashArray ? this.strokeDashArray.concat() : this.strokeDashArray,\n strokeLineCap: this.strokeLineCap,\n strokeDashOffset: this.strokeDashOffset,\n strokeLineJoin: this.strokeLineJoin,\n // TODO: add this before release\n // strokeUniform: this.strokeUniform,\n strokeMiterLimit: toFixed(this.strokeMiterLimit, NUM_FRACTION_DIGITS),\n scaleX: toFixed(this.scaleX, NUM_FRACTION_DIGITS),\n scaleY: toFixed(this.scaleY, NUM_FRACTION_DIGITS),\n angle: toFixed(this.angle, NUM_FRACTION_DIGITS),\n flipX: this.flipX,\n flipY: this.flipY,\n opacity: toFixed(this.opacity, NUM_FRACTION_DIGITS),\n shadow: this.shadow && this.shadow.toObject ? this.shadow.toObject() : this.shadow,\n visible: this.visible,\n clipTo: this.clipTo && String(this.clipTo),\n backgroundColor: this.backgroundColor,\n fillRule: this.fillRule,\n paintFirst: this.paintFirst,\n globalCompositeOperation: this.globalCompositeOperation,\n transformMatrix: this.transformMatrix ? this.transformMatrix.concat() : null,\n skewX: toFixed(this.skewX, NUM_FRACTION_DIGITS),\n skewY: toFixed(this.skewY, NUM_FRACTION_DIGITS)\n };\n\n if (this.clipPath) {\n object.clipPath = this.clipPath.toObject(propertiesToInclude);\n object.clipPath.inverted = this.clipPath.inverted;\n object.clipPath.absolutePositioned = this.clipPath.absolutePositioned;\n }\n\n fabric.util.populateWithProperties(this, object, propertiesToInclude);\n\n if (!this.includeDefaultValues) {\n object = this._removeDefaultValues(object);\n }\n\n return object;\n },\n\n /**\n * Returns (dataless) object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} Object representation of an instance\n */\n toDatalessObject: function toDatalessObject(propertiesToInclude) {\n // will be overwritten by subclasses\n return this.toObject(propertiesToInclude);\n },\n\n /**\n * @private\n * @param {Object} object\n */\n _removeDefaultValues: function _removeDefaultValues(object) {\n var prototype = fabric.util.getKlass(object.type).prototype,\n stateProperties = prototype.stateProperties;\n stateProperties.forEach(function (prop) {\n if (prop === 'left' || prop === 'top') {\n return;\n }\n\n if (object[prop] === prototype[prop]) {\n delete object[prop];\n }\n\n var isArray = Object.prototype.toString.call(object[prop]) === '[object Array]' && Object.prototype.toString.call(prototype[prop]) === '[object Array]'; // basically a check for [] === []\n\n if (isArray && object[prop].length === 0 && prototype[prop].length === 0) {\n delete object[prop];\n }\n });\n return object;\n },\n\n /**\n * Returns a string representation of an instance\n * @return {String}\n */\n toString: function toString() {\n return '#<fabric.' + capitalize(this.type) + '>';\n },\n\n /**\n * Return the object scale factor counting also the group scaling\n * @return {Object} object with scaleX and scaleY properties\n */\n getObjectScaling: function getObjectScaling() {\n var options = fabric.util.qrDecompose(this.calcTransformMatrix());\n return {\n scaleX: Math.abs(options.scaleX),\n scaleY: Math.abs(options.scaleY)\n };\n },\n\n /**\n * Return the object scale factor counting also the group scaling, zoom and retina\n * @return {Object} object with scaleX and scaleY properties\n */\n getTotalObjectScaling: function getTotalObjectScaling() {\n var scale = this.getObjectScaling(),\n scaleX = scale.scaleX,\n scaleY = scale.scaleY;\n\n if (this.canvas) {\n var zoom = this.canvas.getZoom();\n var retina = this.canvas.getRetinaScaling();\n scaleX *= zoom * retina;\n scaleY *= zoom * retina;\n }\n\n return {\n scaleX: scaleX,\n scaleY: scaleY\n };\n },\n\n /**\n * Return the object opacity counting also the group property\n * @return {Number}\n */\n getObjectOpacity: function getObjectOpacity() {\n var opacity = this.opacity;\n\n if (this.group) {\n opacity *= this.group.getObjectOpacity();\n }\n\n return opacity;\n },\n\n /**\n * @private\n * @param {String} key\n * @param {*} value\n * @return {fabric.Object} thisArg\n */\n _set: function _set(key, value) {\n var shouldConstrainValue = key === 'scaleX' || key === 'scaleY',\n isChanged = this[key] !== value,\n groupNeedsUpdate = false;\n\n if (shouldConstrainValue) {\n value = this._constrainScale(value);\n }\n\n if (key === 'scaleX' && value < 0) {\n this.flipX = !this.flipX;\n value *= -1;\n } else if (key === 'scaleY' && value < 0) {\n this.flipY = !this.flipY;\n value *= -1;\n } else if (key === 'shadow' && value && !(value instanceof fabric.Shadow)) {\n value = new fabric.Shadow(value);\n } else if (key === 'dirty' && this.group) {\n this.group.set('dirty', value);\n }\n\n this[key] = value;\n\n if (isChanged) {\n groupNeedsUpdate = this.group && this.group.isOnACache();\n\n if (this.cacheProperties.indexOf(key) > -1) {\n this.dirty = true;\n groupNeedsUpdate && this.group.set('dirty', true);\n } else if (groupNeedsUpdate && this.stateProperties.indexOf(key) > -1) {\n this.group.set('dirty', true);\n }\n }\n\n return this;\n },\n\n /**\n * This callback function is called by the parent group of an object every\n * time a non-delegated property changes on the group. It is passed the key\n * and value as parameters. Not adding in this function's signature to avoid\n * Travis build error about unused variables.\n */\n setOnGroup: function setOnGroup() {// implemented by sub-classes, as needed.\n },\n\n /**\n * Retrieves viewportTransform from Object's canvas if possible\n * @method getViewportTransform\n * @memberOf fabric.Object.prototype\n * @return {Array}\n */\n getViewportTransform: function getViewportTransform() {\n if (this.canvas && this.canvas.viewportTransform) {\n return this.canvas.viewportTransform;\n }\n\n return fabric.iMatrix.concat();\n },\n\n /*\n * @private\n * return if the object would be visible in rendering\n * @memberOf fabric.Object.prototype\n * @return {Boolean}\n */\n isNotVisible: function isNotVisible() {\n return this.opacity === 0 || this.width === 0 && this.height === 0 && this.strokeWidth === 0 || !this.visible;\n },\n\n /**\n * Renders an object on a specified context\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n render: function render(ctx) {\n // do not render if width/height are zeros or object is not visible\n if (this.isNotVisible()) {\n return;\n }\n\n if (this.canvas && this.canvas.skipOffscreen && !this.group && !this.isOnScreen()) {\n return;\n }\n\n ctx.save();\n\n this._setupCompositeOperation(ctx);\n\n this.drawSelectionBackground(ctx);\n this.transform(ctx);\n\n this._setOpacity(ctx);\n\n this._setShadow(ctx, this);\n\n if (this.transformMatrix) {\n ctx.transform.apply(ctx, this.transformMatrix);\n }\n\n this.clipTo && fabric.util.clipContext(this, ctx);\n\n if (this.shouldCache()) {\n this.renderCache();\n this.drawCacheOnCanvas(ctx);\n } else {\n this._removeCacheCanvas();\n\n this.dirty = false;\n this.drawObject(ctx);\n\n if (this.objectCaching && this.statefullCache) {\n this.saveState({\n propertySet: 'cacheProperties'\n });\n }\n }\n\n this.clipTo && ctx.restore();\n ctx.restore();\n },\n renderCache: function renderCache(options) {\n options = options || {};\n\n if (!this._cacheCanvas) {\n this._createCacheCanvas();\n }\n\n if (this.isCacheDirty()) {\n this.statefullCache && this.saveState({\n propertySet: 'cacheProperties'\n });\n this.drawObject(this._cacheContext, options.forClipping);\n this.dirty = false;\n }\n },\n\n /**\n * Remove cacheCanvas and its dimensions from the objects\n */\n _removeCacheCanvas: function _removeCacheCanvas() {\n this._cacheCanvas = null;\n this.cacheWidth = 0;\n this.cacheHeight = 0;\n },\n\n /**\n * return true if the object will draw a stroke\n * Does not consider text styles. This is just a shortcut used at rendering time\n * We want it to be an aproximation and be fast.\n * wrote to avoid extra caching, it has to return true when stroke happens,\n * can guess when it will not happen at 100% chance, does not matter if it misses\n * some use case where the stroke is invisible.\n * @since 3.0.0\n * @returns Boolean\n */\n hasStroke: function hasStroke() {\n return this.stroke && this.stroke !== 'transparent' && this.strokeWidth !== 0;\n },\n\n /**\n * return true if the object will draw a fill\n * Does not consider text styles. This is just a shortcut used at rendering time\n * We want it to be an aproximation and be fast.\n * wrote to avoid extra caching, it has to return true when fill happens,\n * can guess when it will not happen at 100% chance, does not matter if it misses\n * some use case where the fill is invisible.\n * @since 3.0.0\n * @returns Boolean\n */\n hasFill: function hasFill() {\n return this.fill && this.fill !== 'transparent';\n },\n\n /**\n * When set to `true`, force the object to have its own cache, even if it is inside a group\n * it may be needed when your object behave in a particular way on the cache and always needs\n * its own isolated canvas to render correctly.\n * Created to be overridden\n * since 1.7.12\n * @returns Boolean\n */\n needsItsOwnCache: function needsItsOwnCache() {\n if (this.paintFirst === 'stroke' && this.hasFill() && this.hasStroke() && _typeof(this.shadow) === 'object') {\n return true;\n }\n\n if (this.clipPath) {\n return true;\n }\n\n return false;\n },\n\n /**\n * Decide if the object should cache or not. Create its own cache level\n * objectCaching is a global flag, wins over everything\n * needsItsOwnCache should be used when the object drawing method requires\n * a cache step. None of the fabric classes requires it.\n * Generally you do not cache objects in groups because the group outside is cached.\n * Read as: cache if is needed, or if the feature is enabled but we are not already caching.\n * @return {Boolean}\n */\n shouldCache: function shouldCache() {\n this.ownCaching = this.needsItsOwnCache() || this.objectCaching && (!this.group || !this.group.isOnACache());\n return this.ownCaching;\n },\n\n /**\n * Check if this object or a child object will cast a shadow\n * used by Group.shouldCache to know if child has a shadow recursively\n * @return {Boolean}\n */\n willDrawShadow: function willDrawShadow() {\n return !!this.shadow && (this.shadow.offsetX !== 0 || this.shadow.offsetY !== 0);\n },\n\n /**\n * Execute the drawing operation for an object clipPath\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n drawClipPathOnCache: function drawClipPathOnCache(ctx) {\n var path = this.clipPath;\n ctx.save(); // DEBUG: uncomment this line, comment the following\n // ctx.globalAlpha = 0.4\n\n if (path.inverted) {\n ctx.globalCompositeOperation = 'destination-out';\n } else {\n ctx.globalCompositeOperation = 'destination-in';\n } //ctx.scale(1 / 2, 1 / 2);\n\n\n if (path.absolutePositioned) {\n var m = fabric.util.invertTransform(this.calcTransformMatrix());\n ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n }\n\n path.transform(ctx);\n ctx.scale(1 / path.zoomX, 1 / path.zoomY);\n ctx.drawImage(path._cacheCanvas, -path.cacheTranslationX, -path.cacheTranslationY);\n ctx.restore();\n },\n\n /**\n * Execute the drawing operation for an object on a specified context\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n drawObject: function drawObject(ctx, forClipping) {\n var originalFill = this.fill,\n originalStroke = this.stroke;\n\n if (forClipping) {\n this.fill = 'black';\n this.stroke = '';\n\n this._setClippingProperties(ctx);\n } else {\n this._renderBackground(ctx);\n\n this._setStrokeStyles(ctx, this);\n\n this._setFillStyles(ctx, this);\n }\n\n this._render(ctx);\n\n this._drawClipPath(ctx);\n\n this.fill = originalFill;\n this.stroke = originalStroke;\n },\n _drawClipPath: function _drawClipPath(ctx) {\n var path = this.clipPath;\n\n if (!path) {\n return;\n } // needed to setup a couple of variables\n // path canvas gets overridden with this one.\n // TODO find a better solution?\n\n\n path.canvas = this.canvas;\n path.shouldCache();\n path._transformDone = true;\n path.renderCache({\n forClipping: true\n });\n this.drawClipPathOnCache(ctx);\n },\n\n /**\n * Paint the cached copy of the object on the target context.\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n drawCacheOnCanvas: function drawCacheOnCanvas(ctx) {\n ctx.scale(1 / this.zoomX, 1 / this.zoomY);\n ctx.drawImage(this._cacheCanvas, -this.cacheTranslationX, -this.cacheTranslationY);\n },\n\n /**\n * Check if cache is dirty\n * @param {Boolean} skipCanvas skip canvas checks because this object is painted\n * on parent canvas.\n */\n isCacheDirty: function isCacheDirty(skipCanvas) {\n if (this.isNotVisible()) {\n return false;\n }\n\n if (this._cacheCanvas && !skipCanvas && this._updateCacheCanvas()) {\n // in this case the context is already cleared.\n return true;\n } else {\n if (this.dirty || this.clipPath && this.clipPath.absolutePositioned || this.statefullCache && this.hasStateChanged('cacheProperties')) {\n if (this._cacheCanvas && !skipCanvas) {\n var width = this.cacheWidth / this.zoomX;\n var height = this.cacheHeight / this.zoomY;\n\n this._cacheContext.clearRect(-width / 2, -height / 2, width, height);\n }\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Draws a background for the object big as its untransformed dimensions\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderBackground: function _renderBackground(ctx) {\n if (!this.backgroundColor) {\n return;\n }\n\n var dim = this._getNonTransformedDimensions();\n\n ctx.fillStyle = this.backgroundColor;\n ctx.fillRect(-dim.x / 2, -dim.y / 2, dim.x, dim.y); // if there is background color no other shadows\n // should be casted\n\n this._removeShadow(ctx);\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _setOpacity: function _setOpacity(ctx) {\n if (this.group && !this.group._transformDone) {\n ctx.globalAlpha = this.getObjectOpacity();\n } else {\n ctx.globalAlpha *= this.opacity;\n }\n },\n _setStrokeStyles: function _setStrokeStyles(ctx, decl) {\n if (decl.stroke) {\n ctx.lineWidth = decl.strokeWidth;\n ctx.lineCap = decl.strokeLineCap;\n ctx.lineDashOffset = decl.strokeDashOffset;\n ctx.lineJoin = decl.strokeLineJoin;\n ctx.miterLimit = decl.strokeMiterLimit;\n ctx.strokeStyle = decl.stroke.toLive ? decl.stroke.toLive(ctx, this) : decl.stroke;\n }\n },\n _setFillStyles: function _setFillStyles(ctx, decl) {\n if (decl.fill) {\n ctx.fillStyle = decl.fill.toLive ? decl.fill.toLive(ctx, this) : decl.fill;\n }\n },\n _setClippingProperties: function _setClippingProperties(ctx) {\n ctx.globalAlpha = 1;\n ctx.strokeStyle = 'transparent';\n ctx.fillStyle = '#000000';\n },\n\n /**\n * @private\n * Sets line dash\n * @param {CanvasRenderingContext2D} ctx Context to set the dash line on\n * @param {Array} dashArray array representing dashes\n * @param {Function} alternative function to call if browser does not support lineDash\n */\n _setLineDash: function _setLineDash(ctx, dashArray, alternative) {\n if (!dashArray || dashArray.length === 0) {\n return;\n } // Spec requires the concatenation of two copies the dash list when the number of elements is odd\n\n\n if (1 & dashArray.length) {\n dashArray.push.apply(dashArray, dashArray);\n }\n\n if (supportsLineDash) {\n ctx.setLineDash(dashArray);\n } else {\n alternative && alternative(ctx);\n }\n },\n\n /**\n * Renders controls and borders for the object\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {Object} [styleOverride] properties to override the object style\n */\n _renderControls: function _renderControls(ctx, styleOverride) {\n var vpt = this.getViewportTransform(),\n matrix = this.calcTransformMatrix(),\n options,\n drawBorders,\n drawControls;\n styleOverride = styleOverride || {};\n drawBorders = typeof styleOverride.hasBorders !== 'undefined' ? styleOverride.hasBorders : this.hasBorders;\n drawControls = typeof styleOverride.hasControls !== 'undefined' ? styleOverride.hasControls : this.hasControls;\n matrix = fabric.util.multiplyTransformMatrices(vpt, matrix);\n options = fabric.util.qrDecompose(matrix);\n ctx.save();\n ctx.translate(options.translateX, options.translateY);\n ctx.lineWidth = 1 * this.borderScaleFactor;\n\n if (!this.group) {\n ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1;\n }\n\n if (styleOverride.forActiveSelection) {\n ctx.rotate(degreesToRadians(options.angle));\n drawBorders && this.drawBordersInGroup(ctx, options, styleOverride);\n } else {\n ctx.rotate(degreesToRadians(this.angle));\n drawBorders && this.drawBorders(ctx, styleOverride);\n }\n\n drawControls && this.drawControls(ctx, styleOverride);\n ctx.restore();\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _setShadow: function _setShadow(ctx) {\n if (!this.shadow) {\n return;\n }\n\n var shadow = this.shadow,\n canvas = this.canvas,\n scaling,\n multX = canvas && canvas.viewportTransform[0] || 1,\n multY = canvas && canvas.viewportTransform[3] || 1;\n\n if (shadow.nonScaling) {\n scaling = {\n scaleX: 1,\n scaleY: 1\n };\n } else {\n scaling = this.getObjectScaling();\n }\n\n if (canvas && canvas._isRetinaScaling()) {\n multX *= fabric.devicePixelRatio;\n multY *= fabric.devicePixelRatio;\n }\n\n ctx.shadowColor = shadow.color;\n ctx.shadowBlur = shadow.blur * fabric.browserShadowBlurConstant * (multX + multY) * (scaling.scaleX + scaling.scaleY) / 4;\n ctx.shadowOffsetX = shadow.offsetX * multX * scaling.scaleX;\n ctx.shadowOffsetY = shadow.offsetY * multY * scaling.scaleY;\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _removeShadow: function _removeShadow(ctx) {\n if (!this.shadow) {\n return;\n }\n\n ctx.shadowColor = '';\n ctx.shadowBlur = ctx.shadowOffsetX = ctx.shadowOffsetY = 0;\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {Object} filler fabric.Pattern or fabric.Gradient\n * @return {Object} offset.offsetX offset for text rendering\n * @return {Object} offset.offsetY offset for text rendering\n */\n _applyPatternGradientTransform: function _applyPatternGradientTransform(ctx, filler) {\n if (!filler || !filler.toLive) {\n return {\n offsetX: 0,\n offsetY: 0\n };\n }\n\n var t = filler.gradientTransform || filler.patternTransform;\n var offsetX = -this.width / 2 + filler.offsetX || 0,\n offsetY = -this.height / 2 + filler.offsetY || 0;\n\n if (filler.gradientUnits === 'percentage') {\n ctx.transform(this.width, 0, 0, this.height, offsetX, offsetY);\n } else {\n ctx.transform(1, 0, 0, 1, offsetX, offsetY);\n }\n\n if (t) {\n ctx.transform(t[0], t[1], t[2], t[3], t[4], t[5]);\n }\n\n return {\n offsetX: offsetX,\n offsetY: offsetY\n };\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderPaintInOrder: function _renderPaintInOrder(ctx) {\n if (this.paintFirst === 'stroke') {\n this._renderStroke(ctx);\n\n this._renderFill(ctx);\n } else {\n this._renderFill(ctx);\n\n this._renderStroke(ctx);\n }\n },\n\n /**\n * @private\n * function that actually render something on the context.\n * empty here to allow Obects to work on tests to benchmark fabric functionalites\n * not related to rendering\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render() {},\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderFill: function _renderFill(ctx) {\n if (!this.fill) {\n return;\n }\n\n ctx.save();\n\n this._applyPatternGradientTransform(ctx, this.fill);\n\n if (this.fillRule === 'evenodd') {\n ctx.fill('evenodd');\n } else {\n ctx.fill();\n }\n\n ctx.restore();\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderStroke: function _renderStroke(ctx) {\n if (!this.stroke || this.strokeWidth === 0) {\n return;\n }\n\n if (this.shadow && !this.shadow.affectStroke) {\n this._removeShadow(ctx);\n }\n\n ctx.save();\n\n if (this.strokeUniform && this.group) {\n var scaling = this.getObjectScaling();\n ctx.scale(1 / scaling.scaleX, 1 / scaling.scaleY);\n } else if (this.strokeUniform) {\n ctx.scale(1 / this.scaleX, 1 / this.scaleY);\n }\n\n this._setLineDash(ctx, this.strokeDashArray, this._renderDashedStroke);\n\n if (this.stroke.toLive && this.stroke.gradientUnits === 'percentage') {\n // need to transform gradient in a pattern.\n // this is a slow process. If you are hitting this codepath, and the object\n // is not using caching, you should consider switching it on.\n // we need a canvas as big as the current object caching canvas.\n this._applyPatternForTransformedGradient(ctx, this.stroke);\n } else {\n this._applyPatternGradientTransform(ctx, this.stroke);\n }\n\n ctx.stroke();\n ctx.restore();\n },\n\n /**\n * This function try to patch the missing gradientTransform on canvas gradients.\n * transforming a context to transform the gradient, is going to transform the stroke too.\n * we want to transform the gradient but not the stroke operation, so we create\n * a transformed gradient on a pattern and then we use the pattern instead of the gradient.\n * this method has drwabacks: is slow, is in low resolution, needs a patch for when the size\n * is limited.\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {fabric.Gradient} filler a fabric gradient instance\n */\n _applyPatternForTransformedGradient: function _applyPatternForTransformedGradient(ctx, filler) {\n var dims = this._limitCacheSize(this._getCacheCanvasDimensions()),\n pCanvas = fabric.util.createCanvasElement(),\n pCtx,\n retinaScaling = this.canvas.getRetinaScaling(),\n width = dims.x / this.scaleX / retinaScaling,\n height = dims.y / this.scaleY / retinaScaling;\n\n pCanvas.width = width;\n pCanvas.height = height;\n pCtx = pCanvas.getContext('2d');\n pCtx.beginPath();\n pCtx.moveTo(0, 0);\n pCtx.lineTo(width, 0);\n pCtx.lineTo(width, height);\n pCtx.lineTo(0, height);\n pCtx.closePath();\n pCtx.translate(width / 2, height / 2);\n pCtx.scale(dims.zoomX / this.scaleX / retinaScaling, dims.zoomY / this.scaleY / retinaScaling);\n\n this._applyPatternGradientTransform(pCtx, filler);\n\n pCtx.fillStyle = filler.toLive(ctx);\n pCtx.fill();\n ctx.translate(-this.width / 2 - this.strokeWidth / 2, -this.height / 2 - this.strokeWidth / 2);\n ctx.scale(retinaScaling * this.scaleX / dims.zoomX, retinaScaling * this.scaleY / dims.zoomY);\n ctx.strokeStyle = pCtx.createPattern(pCanvas, 'no-repeat');\n },\n\n /**\n * This function is an helper for svg import. it returns the center of the object in the svg\n * untransformed coordinates\n * @private\n * @return {Object} center point from element coordinates\n */\n _findCenterFromElement: function _findCenterFromElement() {\n return {\n x: this.left + this.width / 2,\n y: this.top + this.height / 2\n };\n },\n\n /**\n * This function is an helper for svg import. it decompose the transformMatrix\n * and assign properties to object.\n * untransformed coordinates\n * @private\n * @chainable\n */\n _assignTransformMatrixProps: function _assignTransformMatrixProps() {\n if (this.transformMatrix) {\n var options = fabric.util.qrDecompose(this.transformMatrix);\n this.flipX = false;\n this.flipY = false;\n this.set('scaleX', options.scaleX);\n this.set('scaleY', options.scaleY);\n this.angle = options.angle;\n this.skewX = options.skewX;\n this.skewY = 0;\n }\n },\n\n /**\n * This function is an helper for svg import. it removes the transform matrix\n * and set to object properties that fabricjs can handle\n * @private\n * @param {Object} preserveAspectRatioOptions\n * @return {thisArg}\n */\n _removeTransformMatrix: function _removeTransformMatrix(preserveAspectRatioOptions) {\n var center = this._findCenterFromElement();\n\n if (this.transformMatrix) {\n this._assignTransformMatrixProps();\n\n center = fabric.util.transformPoint(center, this.transformMatrix);\n }\n\n this.transformMatrix = null;\n\n if (preserveAspectRatioOptions) {\n this.scaleX *= preserveAspectRatioOptions.scaleX;\n this.scaleY *= preserveAspectRatioOptions.scaleY;\n this.cropX = preserveAspectRatioOptions.cropX;\n this.cropY = preserveAspectRatioOptions.cropY;\n center.x += preserveAspectRatioOptions.offsetLeft;\n center.y += preserveAspectRatioOptions.offsetTop;\n this.width = preserveAspectRatioOptions.width;\n this.height = preserveAspectRatioOptions.height;\n }\n\n this.setPositionByOrigin(center, 'center', 'center');\n },\n\n /**\n * Clones an instance, using a callback method will work for every object.\n * @param {Function} callback Callback is invoked with a clone as a first argument\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n */\n clone: function clone(callback, propertiesToInclude) {\n var objectForm = this.toObject(propertiesToInclude);\n\n if (this.constructor.fromObject) {\n this.constructor.fromObject(objectForm, callback);\n } else {\n fabric.Object._fromObject('Object', objectForm, callback);\n }\n },\n\n /**\n * Creates an instance of fabric.Image out of an object\n * could make use of both toDataUrl or toCanvasElement.\n * @param {Function} callback callback, invoked with an instance as a first argument\n * @param {Object} [options] for clone as image, passed to toDataURL\n * @param {String} [options.format=png] The format of the output image. Either \"jpeg\" or \"png\"\n * @param {Number} [options.quality=1] Quality level (0..1). Only used for jpeg.\n * @param {Number} [options.multiplier=1] Multiplier to scale by\n * @param {Number} [options.left] Cropping left offset. Introduced in v1.2.14\n * @param {Number} [options.top] Cropping top offset. Introduced in v1.2.14\n * @param {Number} [options.width] Cropping width. Introduced in v1.2.14\n * @param {Number} [options.height] Cropping height. Introduced in v1.2.14\n * @param {Boolean} [options.enableRetinaScaling] Enable retina scaling for clone image. Introduce in 1.6.4\n * @param {Boolean} [options.withoutTransform] Remove current object transform ( no scale , no angle, no flip, no skew ). Introduced in 2.3.4\n * @param {Boolean} [options.withoutShadow] Remove current object shadow. Introduced in 2.4.2\n * @return {fabric.Object} thisArg\n */\n cloneAsImage: function cloneAsImage(callback, options) {\n var canvasEl = this.toCanvasElement(options);\n\n if (callback) {\n callback(new fabric.Image(canvasEl));\n }\n\n return this;\n },\n\n /**\n * Converts an object into a HTMLCanvas element\n * @param {Object} options Options object\n * @param {Number} [options.multiplier=1] Multiplier to scale by\n * @param {Number} [options.left] Cropping left offset. Introduced in v1.2.14\n * @param {Number} [options.top] Cropping top offset. Introduced in v1.2.14\n * @param {Number} [options.width] Cropping width. Introduced in v1.2.14\n * @param {Number} [options.height] Cropping height. Introduced in v1.2.14\n * @param {Boolean} [options.enableRetinaScaling] Enable retina scaling for clone image. Introduce in 1.6.4\n * @param {Boolean} [options.withoutTransform] Remove current object transform ( no scale , no angle, no flip, no skew ). Introduced in 2.3.4\n * @param {Boolean} [options.withoutShadow] Remove current object shadow. Introduced in 2.4.2\n * @return {HTMLCanvasElement} Returns DOM element <canvas> with the fabric.Object\n */\n toCanvasElement: function toCanvasElement(options) {\n options || (options = {});\n var utils = fabric.util,\n origParams = utils.saveObjectTransform(this),\n originalGroup = this.group,\n originalShadow = this.shadow,\n abs = Math.abs,\n multiplier = (options.multiplier || 1) * (options.enableRetinaScaling ? fabric.devicePixelRatio : 1);\n delete this.group;\n\n if (options.withoutTransform) {\n utils.resetObjectTransform(this);\n }\n\n if (options.withoutShadow) {\n this.shadow = null;\n }\n\n var el = fabric.util.createCanvasElement(),\n // skip canvas zoom and calculate with setCoords now.\n boundingRect = this.getBoundingRect(true, true),\n shadow = this.shadow,\n scaling,\n shadowOffset = {\n x: 0,\n y: 0\n },\n shadowBlur,\n width,\n height;\n\n if (shadow) {\n shadowBlur = shadow.blur;\n\n if (shadow.nonScaling) {\n scaling = {\n scaleX: 1,\n scaleY: 1\n };\n } else {\n scaling = this.getObjectScaling();\n } // consider non scaling shadow.\n\n\n shadowOffset.x = 2 * Math.round(abs(shadow.offsetX) + shadowBlur) * abs(scaling.scaleX);\n shadowOffset.y = 2 * Math.round(abs(shadow.offsetY) + shadowBlur) * abs(scaling.scaleY);\n }\n\n width = boundingRect.width + shadowOffset.x;\n height = boundingRect.height + shadowOffset.y; // if the current width/height is not an integer\n // we need to make it so.\n\n el.width = Math.ceil(width);\n el.height = Math.ceil(height);\n var canvas = new fabric.StaticCanvas(el, {\n enableRetinaScaling: false,\n renderOnAddRemove: false,\n skipOffscreen: false\n });\n\n if (options.format === 'jpeg') {\n canvas.backgroundColor = '#fff';\n }\n\n this.setPositionByOrigin(new fabric.Point(canvas.width / 2, canvas.height / 2), 'center', 'center');\n var originalCanvas = this.canvas;\n canvas.add(this);\n var canvasEl = canvas.toCanvasElement(multiplier || 1, options);\n this.shadow = originalShadow;\n this.set('canvas', originalCanvas);\n\n if (originalGroup) {\n this.group = originalGroup;\n }\n\n this.set(origParams).setCoords(); // canvas.dispose will call image.dispose that will nullify the elements\n // since this canvas is a simple element for the process, we remove references\n // to objects in this way in order to avoid object trashing.\n\n canvas._objects = [];\n canvas.dispose();\n canvas = null;\n return canvasEl;\n },\n\n /**\n * Converts an object into a data-url-like string\n * @param {Object} options Options object\n * @param {String} [options.format=png] The format of the output image. Either \"jpeg\" or \"png\"\n * @param {Number} [options.quality=1] Quality level (0..1). Only used for jpeg.\n * @param {Number} [options.multiplier=1] Multiplier to scale by\n * @param {Number} [options.left] Cropping left offset. Introduced in v1.2.14\n * @param {Number} [options.top] Cropping top offset. Introduced in v1.2.14\n * @param {Number} [options.width] Cropping width. Introduced in v1.2.14\n * @param {Number} [options.height] Cropping height. Introduced in v1.2.14\n * @param {Boolean} [options.enableRetinaScaling] Enable retina scaling for clone image. Introduce in 1.6.4\n * @param {Boolean} [options.withoutTransform] Remove current object transform ( no scale , no angle, no flip, no skew ). Introduced in 2.3.4\n * @param {Boolean} [options.withoutShadow] Remove current object shadow. Introduced in 2.4.2\n * @return {String} Returns a data: URL containing a representation of the object in the format specified by options.format\n */\n toDataURL: function toDataURL(options) {\n options || (options = {});\n return fabric.util.toDataURL(this.toCanvasElement(options), options.format || 'png', options.quality || 1);\n },\n\n /**\n * Returns true if specified type is identical to the type of an instance\n * @param {String} type Type to check against\n * @return {Boolean}\n */\n isType: function isType(type) {\n return this.type === type;\n },\n\n /**\n * Returns complexity of an instance\n * @return {Number} complexity of this instance (is 1 unless subclassed)\n */\n complexity: function complexity() {\n return 1;\n },\n\n /**\n * Returns a JSON representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} JSON\n */\n toJSON: function toJSON(propertiesToInclude) {\n // delegate, not alias\n return this.toObject(propertiesToInclude);\n },\n\n /**\n * Sets gradient (fill or stroke) of an object\n * percentages for x1,x2,y1,y2,r1,r2 together with gradientUnits 'pixels', are not supported.\n * <b>Backwards incompatibility note:</b> This method was named \"setGradientFill\" until v1.1.0\n * @param {String} property Property name 'stroke' or 'fill'\n * @param {Object} [options] Options object\n * @param {String} [options.type] Type of gradient 'radial' or 'linear'\n * @param {Number} [options.x1=0] x-coordinate of start point\n * @param {Number} [options.y1=0] y-coordinate of start point\n * @param {Number} [options.x2=0] x-coordinate of end point\n * @param {Number} [options.y2=0] y-coordinate of end point\n * @param {Number} [options.r1=0] Radius of start point (only for radial gradients)\n * @param {Number} [options.r2=0] Radius of end point (only for radial gradients)\n * @param {Object} [options.colorStops] Color stops object eg. {0: 'ff0000', 1: '000000'}\n * @param {Object} [options.gradientTransform] transformMatrix for gradient\n * @return {fabric.Object} thisArg\n * @chainable\n * @deprecated since 3.4.0\n * @see {@link http://jsfiddle.net/fabricjs/58y8b/|jsFiddle demo}\n * @example <caption>Set linear gradient</caption>\n * object.setGradient('fill', {\n * type: 'linear',\n * x1: -object.width / 2,\n * y1: 0,\n * x2: object.width / 2,\n * y2: 0,\n * colorStops: {\n * 0: 'red',\n * 0.5: '#005555',\n * 1: 'rgba(0,0,255,0.5)'\n * }\n * });\n * canvas.renderAll();\n * @example <caption>Set radial gradient</caption>\n * object.setGradient('fill', {\n * type: 'radial',\n * x1: 0,\n * y1: 0,\n * x2: 0,\n * y2: 0,\n * r1: object.width / 2,\n * r2: 10,\n * colorStops: {\n * 0: 'red',\n * 0.5: '#005555',\n * 1: 'rgba(0,0,255,0.5)'\n * }\n * });\n * canvas.renderAll();\n */\n setGradient: function setGradient(property, options) {\n options || (options = {});\n var gradient = {\n colorStops: []\n };\n gradient.type = options.type || (options.r1 || options.r2 ? 'radial' : 'linear');\n gradient.coords = {\n x1: options.x1,\n y1: options.y1,\n x2: options.x2,\n y2: options.y2\n };\n gradient.gradientUnits = options.gradientUnits || 'pixels';\n\n if (options.r1 || options.r2) {\n gradient.coords.r1 = options.r1;\n gradient.coords.r2 = options.r2;\n }\n\n gradient.gradientTransform = options.gradientTransform;\n fabric.Gradient.prototype.addColorStop.call(gradient, options.colorStops);\n return this.set(property, fabric.Gradient.forObject(this, gradient));\n },\n\n /**\n * Sets pattern fill of an object\n * @param {Object} options Options object\n * @param {(String|HTMLImageElement)} options.source Pattern source\n * @param {String} [options.repeat=repeat] Repeat property of a pattern (one of repeat, repeat-x, repeat-y or no-repeat)\n * @param {Number} [options.offsetX=0] Pattern horizontal offset from object's left/top corner\n * @param {Number} [options.offsetY=0] Pattern vertical offset from object's left/top corner\n * @param {Function} [callback] Callback to invoke when image set as a pattern\n * @return {fabric.Object} thisArg\n * @chainable\n * @deprecated since 3.5.0\n * @see {@link http://jsfiddle.net/fabricjs/QT3pa/|jsFiddle demo}\n * @example <caption>Set pattern</caption>\n * object.setPatternFill({\n * source: 'http://fabricjs.com/assets/escheresque_ste.png',\n * repeat: 'repeat'\n * },canvas.renderAll.bind(canvas));\n */\n setPatternFill: function setPatternFill(options, callback) {\n return this.set('fill', new fabric.Pattern(options, callback));\n },\n\n /**\n * Sets {@link fabric.Object#shadow|shadow} of an object\n * @param {Object|String} [options] Options object or string (e.g. \"2px 2px 10px rgba(0,0,0,0.2)\")\n * @param {String} [options.color=rgb(0,0,0)] Shadow color\n * @param {Number} [options.blur=0] Shadow blur\n * @param {Number} [options.offsetX=0] Shadow horizontal offset\n * @param {Number} [options.offsetY=0] Shadow vertical offset\n * @return {fabric.Object} thisArg\n * @chainable\n * @deprecated since 3.5.0\n * @see {@link http://jsfiddle.net/fabricjs/7gvJG/|jsFiddle demo}\n * @example <caption>Set shadow with string notation</caption>\n * object.setShadow('2px 2px 10px rgba(0,0,0,0.2)');\n * canvas.renderAll();\n * @example <caption>Set shadow with object notation</caption>\n * object.setShadow({\n * color: 'red',\n * blur: 10,\n * offsetX: 20,\n * offsetY: 20\n * });\n * canvas.renderAll();\n */\n setShadow: function setShadow(options) {\n return this.set('shadow', options ? new fabric.Shadow(options) : null);\n },\n\n /**\n * Sets \"color\" of an instance (alias of `set('fill', …)`)\n * @param {String} color Color value\n * @return {fabric.Object} thisArg\n * @deprecated since 3.5.0\n * @chainable\n */\n setColor: function setColor(color) {\n this.set('fill', color);\n return this;\n },\n\n /**\n * Sets \"angle\" of an instance with centered rotation\n * @param {Number} angle Angle value (in degrees)\n * @return {fabric.Object} thisArg\n * @chainable\n */\n rotate: function rotate(angle) {\n var shouldCenterOrigin = (this.originX !== 'center' || this.originY !== 'center') && this.centeredRotation;\n\n if (shouldCenterOrigin) {\n this._setOriginToCenter();\n }\n\n this.set('angle', angle);\n\n if (shouldCenterOrigin) {\n this._resetOrigin();\n }\n\n return this;\n },\n\n /**\n * Centers object horizontally on canvas to which it was added last.\n * You might need to call `setCoords` on an object after centering, to update controls area.\n * @return {fabric.Object} thisArg\n * @chainable\n */\n centerH: function centerH() {\n this.canvas && this.canvas.centerObjectH(this);\n return this;\n },\n\n /**\n * Centers object horizontally on current viewport of canvas to which it was added last.\n * You might need to call `setCoords` on an object after centering, to update controls area.\n * @return {fabric.Object} thisArg\n * @chainable\n */\n viewportCenterH: function viewportCenterH() {\n this.canvas && this.canvas.viewportCenterObjectH(this);\n return this;\n },\n\n /**\n * Centers object vertically on canvas to which it was added last.\n * You might need to call `setCoords` on an object after centering, to update controls area.\n * @return {fabric.Object} thisArg\n * @chainable\n */\n centerV: function centerV() {\n this.canvas && this.canvas.centerObjectV(this);\n return this;\n },\n\n /**\n * Centers object vertically on current viewport of canvas to which it was added last.\n * You might need to call `setCoords` on an object after centering, to update controls area.\n * @return {fabric.Object} thisArg\n * @chainable\n */\n viewportCenterV: function viewportCenterV() {\n this.canvas && this.canvas.viewportCenterObjectV(this);\n return this;\n },\n\n /**\n * Centers object vertically and horizontally on canvas to which is was added last\n * You might need to call `setCoords` on an object after centering, to update controls area.\n * @return {fabric.Object} thisArg\n * @chainable\n */\n center: function center() {\n this.canvas && this.canvas.centerObject(this);\n return this;\n },\n\n /**\n * Centers object on current viewport of canvas to which it was added last.\n * You might need to call `setCoords` on an object after centering, to update controls area.\n * @return {fabric.Object} thisArg\n * @chainable\n */\n viewportCenter: function viewportCenter() {\n this.canvas && this.canvas.viewportCenterObject(this);\n return this;\n },\n\n /**\n * Returns coordinates of a pointer relative to an object\n * @param {Event} e Event to operate upon\n * @param {Object} [pointer] Pointer to operate upon (instead of event)\n * @return {Object} Coordinates of a pointer (x, y)\n */\n getLocalPointer: function getLocalPointer(e, pointer) {\n pointer = pointer || this.canvas.getPointer(e);\n\n var pClicked = new fabric.Point(pointer.x, pointer.y),\n objectLeftTop = this._getLeftTopCoords();\n\n if (this.angle) {\n pClicked = fabric.util.rotatePoint(pClicked, objectLeftTop, degreesToRadians(-this.angle));\n }\n\n return {\n x: pClicked.x - objectLeftTop.x,\n y: pClicked.y - objectLeftTop.y\n };\n },\n\n /**\n * Sets canvas globalCompositeOperation for specific object\n * custom composition operation for the particular object can be specified using globalCompositeOperation property\n * @param {CanvasRenderingContext2D} ctx Rendering canvas context\n */\n _setupCompositeOperation: function _setupCompositeOperation(ctx) {\n if (this.globalCompositeOperation) {\n ctx.globalCompositeOperation = this.globalCompositeOperation;\n }\n }\n });\n fabric.util.createAccessors && fabric.util.createAccessors(fabric.Object);\n extend(fabric.Object.prototype, fabric.Observable);\n /**\n * Defines the number of fraction digits to use when serializing object values.\n * You can use it to increase/decrease precision of such values like left, top, scaleX, scaleY, etc.\n * @static\n * @memberOf fabric.Object\n * @constant\n * @type Number\n */\n\n fabric.Object.NUM_FRACTION_DIGITS = 2;\n\n fabric.Object._fromObject = function (className, object, callback, extraParam) {\n var klass = fabric[className];\n object = clone(object, true);\n fabric.util.enlivenPatterns([object.fill, object.stroke], function (patterns) {\n if (typeof patterns[0] !== 'undefined') {\n object.fill = patterns[0];\n }\n\n if (typeof patterns[1] !== 'undefined') {\n object.stroke = patterns[1];\n }\n\n fabric.util.enlivenObjects([object.clipPath], function (enlivedProps) {\n object.clipPath = enlivedProps[0];\n var instance = extraParam ? new klass(object[extraParam], object) : new klass(object);\n callback && callback(instance);\n });\n });\n };\n /**\n * Unique id used internally when creating SVG elements\n * @static\n * @memberOf fabric.Object\n * @type Number\n */\n\n\n fabric.Object.__uid = 0;\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function () {\n var degreesToRadians = fabric.util.degreesToRadians,\n originXOffset = {\n left: -0.5,\n center: 0,\n right: 0.5\n },\n originYOffset = {\n top: -0.5,\n center: 0,\n bottom: 0.5\n };\n fabric.util.object.extend(fabric.Object.prototype,\n /** @lends fabric.Object.prototype */\n {\n /**\n * Translates the coordinates from a set of origin to another (based on the object's dimensions)\n * @param {fabric.Point} point The point which corresponds to the originX and originY params\n * @param {String} fromOriginX Horizontal origin: 'left', 'center' or 'right'\n * @param {String} fromOriginY Vertical origin: 'top', 'center' or 'bottom'\n * @param {String} toOriginX Horizontal origin: 'left', 'center' or 'right'\n * @param {String} toOriginY Vertical origin: 'top', 'center' or 'bottom'\n * @return {fabric.Point}\n */\n translateToGivenOrigin: function translateToGivenOrigin(point, fromOriginX, fromOriginY, toOriginX, toOriginY) {\n var x = point.x,\n y = point.y,\n offsetX,\n offsetY,\n dim;\n\n if (typeof fromOriginX === 'string') {\n fromOriginX = originXOffset[fromOriginX];\n } else {\n fromOriginX -= 0.5;\n }\n\n if (typeof toOriginX === 'string') {\n toOriginX = originXOffset[toOriginX];\n } else {\n toOriginX -= 0.5;\n }\n\n offsetX = toOriginX - fromOriginX;\n\n if (typeof fromOriginY === 'string') {\n fromOriginY = originYOffset[fromOriginY];\n } else {\n fromOriginY -= 0.5;\n }\n\n if (typeof toOriginY === 'string') {\n toOriginY = originYOffset[toOriginY];\n } else {\n toOriginY -= 0.5;\n }\n\n offsetY = toOriginY - fromOriginY;\n\n if (offsetX || offsetY) {\n dim = this._getTransformedDimensions();\n x = point.x + offsetX * dim.x;\n y = point.y + offsetY * dim.y;\n }\n\n return new fabric.Point(x, y);\n },\n\n /**\n * Translates the coordinates from origin to center coordinates (based on the object's dimensions)\n * @param {fabric.Point} point The point which corresponds to the originX and originY params\n * @param {String} originX Horizontal origin: 'left', 'center' or 'right'\n * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'\n * @return {fabric.Point}\n */\n translateToCenterPoint: function translateToCenterPoint(point, originX, originY) {\n var p = this.translateToGivenOrigin(point, originX, originY, 'center', 'center');\n\n if (this.angle) {\n return fabric.util.rotatePoint(p, point, degreesToRadians(this.angle));\n }\n\n return p;\n },\n\n /**\n * Translates the coordinates from center to origin coordinates (based on the object's dimensions)\n * @param {fabric.Point} center The point which corresponds to center of the object\n * @param {String} originX Horizontal origin: 'left', 'center' or 'right'\n * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'\n * @return {fabric.Point}\n */\n translateToOriginPoint: function translateToOriginPoint(center, originX, originY) {\n var p = this.translateToGivenOrigin(center, 'center', 'center', originX, originY);\n\n if (this.angle) {\n return fabric.util.rotatePoint(p, center, degreesToRadians(this.angle));\n }\n\n return p;\n },\n\n /**\n * Returns the real center coordinates of the object\n * @return {fabric.Point}\n */\n getCenterPoint: function getCenterPoint() {\n var leftTop = new fabric.Point(this.left, this.top);\n return this.translateToCenterPoint(leftTop, this.originX, this.originY);\n },\n\n /**\n * Returns the coordinates of the object based on center coordinates\n * @param {fabric.Point} point The point which corresponds to the originX and originY params\n * @return {fabric.Point}\n */\n // getOriginPoint: function(center) {\n // return this.translateToOriginPoint(center, this.originX, this.originY);\n // },\n\n /**\n * Returns the coordinates of the object as if it has a different origin\n * @param {String} originX Horizontal origin: 'left', 'center' or 'right'\n * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'\n * @return {fabric.Point}\n */\n getPointByOrigin: function getPointByOrigin(originX, originY) {\n var center = this.getCenterPoint();\n return this.translateToOriginPoint(center, originX, originY);\n },\n\n /**\n * Returns the point in local coordinates\n * @param {fabric.Point} point The point relative to the global coordinate system\n * @param {String} originX Horizontal origin: 'left', 'center' or 'right'\n * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'\n * @return {fabric.Point}\n */\n toLocalPoint: function toLocalPoint(point, originX, originY) {\n var center = this.getCenterPoint(),\n p,\n p2;\n\n if (typeof originX !== 'undefined' && typeof originY !== 'undefined') {\n p = this.translateToGivenOrigin(center, 'center', 'center', originX, originY);\n } else {\n p = new fabric.Point(this.left, this.top);\n }\n\n p2 = new fabric.Point(point.x, point.y);\n\n if (this.angle) {\n p2 = fabric.util.rotatePoint(p2, center, -degreesToRadians(this.angle));\n }\n\n return p2.subtractEquals(p);\n },\n\n /**\n * Returns the point in global coordinates\n * @param {fabric.Point} The point relative to the local coordinate system\n * @return {fabric.Point}\n */\n // toGlobalPoint: function(point) {\n // return fabric.util.rotatePoint(point, this.getCenterPoint(), degreesToRadians(this.angle)).addEquals(new fabric.Point(this.left, this.top));\n // },\n\n /**\n * Sets the position of the object taking into consideration the object's origin\n * @param {fabric.Point} pos The new position of the object\n * @param {String} originX Horizontal origin: 'left', 'center' or 'right'\n * @param {String} originY Vertical origin: 'top', 'center' or 'bottom'\n * @return {void}\n */\n setPositionByOrigin: function setPositionByOrigin(pos, originX, originY) {\n var center = this.translateToCenterPoint(pos, originX, originY),\n position = this.translateToOriginPoint(center, this.originX, this.originY);\n this.set('left', position.x);\n this.set('top', position.y);\n },\n\n /**\n * @param {String} to One of 'left', 'center', 'right'\n */\n adjustPosition: function adjustPosition(to) {\n var angle = degreesToRadians(this.angle),\n hypotFull = this.getScaledWidth(),\n xFull = fabric.util.cos(angle) * hypotFull,\n yFull = fabric.util.sin(angle) * hypotFull,\n offsetFrom,\n offsetTo; //TODO: this function does not consider mixed situation like top, center.\n\n if (typeof this.originX === 'string') {\n offsetFrom = originXOffset[this.originX];\n } else {\n offsetFrom = this.originX - 0.5;\n }\n\n if (typeof to === 'string') {\n offsetTo = originXOffset[to];\n } else {\n offsetTo = to - 0.5;\n }\n\n this.left += xFull * (offsetTo - offsetFrom);\n this.top += yFull * (offsetTo - offsetFrom);\n this.setCoords();\n this.originX = to;\n },\n\n /**\n * Sets the origin/position of the object to it's center point\n * @private\n * @return {void}\n */\n _setOriginToCenter: function _setOriginToCenter() {\n this._originalOriginX = this.originX;\n this._originalOriginY = this.originY;\n var center = this.getCenterPoint();\n this.originX = 'center';\n this.originY = 'center';\n this.left = center.x;\n this.top = center.y;\n },\n\n /**\n * Resets the origin/position of the object to it's original origin\n * @private\n * @return {void}\n */\n _resetOrigin: function _resetOrigin() {\n var originPoint = this.translateToOriginPoint(this.getCenterPoint(), this._originalOriginX, this._originalOriginY);\n this.originX = this._originalOriginX;\n this.originY = this._originalOriginY;\n this.left = originPoint.x;\n this.top = originPoint.y;\n this._originalOriginX = null;\n this._originalOriginY = null;\n },\n\n /**\n * @private\n */\n _getLeftTopCoords: function _getLeftTopCoords() {\n return this.translateToOriginPoint(this.getCenterPoint(), 'left', 'top');\n }\n });\n})();\n\n(function () {\n function _getCoords(coords) {\n return [new fabric.Point(coords.tl.x, coords.tl.y), new fabric.Point(coords.tr.x, coords.tr.y), new fabric.Point(coords.br.x, coords.br.y), new fabric.Point(coords.bl.x, coords.bl.y)];\n }\n\n var degreesToRadians = fabric.util.degreesToRadians,\n multiplyMatrices = fabric.util.multiplyTransformMatrices,\n transformPoint = fabric.util.transformPoint;\n fabric.util.object.extend(fabric.Object.prototype,\n /** @lends fabric.Object.prototype */\n {\n /**\n * Describe object's corner position in canvas element coordinates.\n * properties are tl,mt,tr,ml,mr,bl,mb,br,mtr for the main controls.\n * each property is an object with x, y and corner.\n * The `corner` property contains in a similar manner the 4 points of the\n * interactive area of the corner.\n * The coordinates depends from this properties: width, height, scaleX, scaleY\n * skewX, skewY, angle, strokeWidth, viewportTransform, top, left, padding.\n * The coordinates get updated with @method setCoords.\n * You can calculate them without updating with @method calcCoords;\n * @memberOf fabric.Object.prototype\n */\n oCoords: null,\n\n /**\n * Describe object's corner position in canvas object absolute coordinates\n * properties are tl,tr,bl,br and describe the four main corner.\n * each property is an object with x, y, instance of Fabric.Point.\n * The coordinates depends from this properties: width, height, scaleX, scaleY\n * skewX, skewY, angle, strokeWidth, top, left.\n * Those coordinates are useful to understand where an object is. They get updated\n * with oCoords but they do not need to be updated when zoom or panning change.\n * The coordinates get updated with @method setCoords.\n * You can calculate them without updating with @method calcCoords(true);\n * @memberOf fabric.Object.prototype\n */\n aCoords: null,\n\n /**\n * storage for object transform matrix\n */\n ownMatrixCache: null,\n\n /**\n * storage for object full transform matrix\n */\n matrixCache: null,\n\n /**\n * return correct set of coordinates for intersection\n */\n getCoords: function getCoords(absolute, calculate) {\n if (!this.oCoords) {\n this.setCoords();\n }\n\n var coords = absolute ? this.aCoords : this.oCoords;\n return _getCoords(calculate ? this.calcCoords(absolute) : coords);\n },\n\n /**\n * Checks if object intersects with an area formed by 2 points\n * @param {Object} pointTL top-left point of area\n * @param {Object} pointBR bottom-right point of area\n * @param {Boolean} [absolute] use coordinates without viewportTransform\n * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords\n * @return {Boolean} true if object intersects with an area formed by 2 points\n */\n intersectsWithRect: function intersectsWithRect(pointTL, pointBR, absolute, calculate) {\n var coords = this.getCoords(absolute, calculate),\n intersection = fabric.Intersection.intersectPolygonRectangle(coords, pointTL, pointBR);\n return intersection.status === 'Intersection';\n },\n\n /**\n * Checks if object intersects with another object\n * @param {Object} other Object to test\n * @param {Boolean} [absolute] use coordinates without viewportTransform\n * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords\n * @return {Boolean} true if object intersects with another object\n */\n intersectsWithObject: function intersectsWithObject(other, absolute, calculate) {\n var intersection = fabric.Intersection.intersectPolygonPolygon(this.getCoords(absolute, calculate), other.getCoords(absolute, calculate));\n return intersection.status === 'Intersection' || other.isContainedWithinObject(this, absolute, calculate) || this.isContainedWithinObject(other, absolute, calculate);\n },\n\n /**\n * Checks if object is fully contained within area of another object\n * @param {Object} other Object to test\n * @param {Boolean} [absolute] use coordinates without viewportTransform\n * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords\n * @return {Boolean} true if object is fully contained within area of another object\n */\n isContainedWithinObject: function isContainedWithinObject(other, absolute, calculate) {\n var points = this.getCoords(absolute, calculate),\n i = 0,\n lines = other._getImageLines(calculate ? other.calcCoords(absolute) : absolute ? other.aCoords : other.oCoords);\n\n for (; i < 4; i++) {\n if (!other.containsPoint(points[i], lines)) {\n return false;\n }\n }\n\n return true;\n },\n\n /**\n * Checks if object is fully contained within area formed by 2 points\n * @param {Object} pointTL top-left point of area\n * @param {Object} pointBR bottom-right point of area\n * @param {Boolean} [absolute] use coordinates without viewportTransform\n * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords\n * @return {Boolean} true if object is fully contained within area formed by 2 points\n */\n isContainedWithinRect: function isContainedWithinRect(pointTL, pointBR, absolute, calculate) {\n var boundingRect = this.getBoundingRect(absolute, calculate);\n return boundingRect.left >= pointTL.x && boundingRect.left + boundingRect.width <= pointBR.x && boundingRect.top >= pointTL.y && boundingRect.top + boundingRect.height <= pointBR.y;\n },\n\n /**\n * Checks if point is inside the object\n * @param {fabric.Point} point Point to check against\n * @param {Object} [lines] object returned from @method _getImageLines\n * @param {Boolean} [absolute] use coordinates without viewportTransform\n * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords\n * @return {Boolean} true if point is inside the object\n */\n containsPoint: function containsPoint(point, lines, absolute, calculate) {\n var lines = lines || this._getImageLines(calculate ? this.calcCoords(absolute) : absolute ? this.aCoords : this.oCoords),\n xPoints = this._findCrossPoints(point, lines); // if xPoints is odd then point is inside the object\n\n\n return xPoints !== 0 && xPoints % 2 === 1;\n },\n\n /**\n * Checks if object is contained within the canvas with current viewportTransform\n * the check is done stopping at first point that appears on screen\n * @param {Boolean} [calculate] use coordinates of current position instead of .aCoords\n * @return {Boolean} true if object is fully or partially contained within canvas\n */\n isOnScreen: function isOnScreen(calculate) {\n if (!this.canvas) {\n return false;\n }\n\n var pointTL = this.canvas.vptCoords.tl,\n pointBR = this.canvas.vptCoords.br;\n var points = this.getCoords(true, calculate),\n point;\n\n for (var i = 0; i < 4; i++) {\n point = points[i];\n\n if (point.x <= pointBR.x && point.x >= pointTL.x && point.y <= pointBR.y && point.y >= pointTL.y) {\n return true;\n }\n } // no points on screen, check intersection with absolute coordinates\n\n\n if (this.intersectsWithRect(pointTL, pointBR, true, calculate)) {\n return true;\n }\n\n return this._containsCenterOfCanvas(pointTL, pointBR, calculate);\n },\n\n /**\n * Checks if the object contains the midpoint between canvas extremities\n * Does not make sense outside the context of isOnScreen and isPartiallyOnScreen\n * @private\n * @param {Fabric.Point} pointTL Top Left point\n * @param {Fabric.Point} pointBR Top Right point\n * @param {Boolean} calculate use coordinates of current position instead of .oCoords\n * @return {Boolean} true if the object contains the point\n */\n _containsCenterOfCanvas: function _containsCenterOfCanvas(pointTL, pointBR, calculate) {\n // worst case scenario the object is so big that contains the screen\n var centerPoint = {\n x: (pointTL.x + pointBR.x) / 2,\n y: (pointTL.y + pointBR.y) / 2\n };\n\n if (this.containsPoint(centerPoint, null, true, calculate)) {\n return true;\n }\n\n return false;\n },\n\n /**\n * Checks if object is partially contained within the canvas with current viewportTransform\n * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords\n * @return {Boolean} true if object is partially contained within canvas\n */\n isPartiallyOnScreen: function isPartiallyOnScreen(calculate) {\n if (!this.canvas) {\n return false;\n }\n\n var pointTL = this.canvas.vptCoords.tl,\n pointBR = this.canvas.vptCoords.br;\n\n if (this.intersectsWithRect(pointTL, pointBR, true, calculate)) {\n return true;\n }\n\n return this._containsCenterOfCanvas(pointTL, pointBR, calculate);\n },\n\n /**\n * Method that returns an object with the object edges in it, given the coordinates of the corners\n * @private\n * @param {Object} oCoords Coordinates of the object corners\n */\n _getImageLines: function _getImageLines(oCoords) {\n return {\n topline: {\n o: oCoords.tl,\n d: oCoords.tr\n },\n rightline: {\n o: oCoords.tr,\n d: oCoords.br\n },\n bottomline: {\n o: oCoords.br,\n d: oCoords.bl\n },\n leftline: {\n o: oCoords.bl,\n d: oCoords.tl\n }\n };\n },\n\n /**\n * Helper method to determine how many cross points are between the 4 object edges\n * and the horizontal line determined by a point on canvas\n * @private\n * @param {fabric.Point} point Point to check\n * @param {Object} lines Coordinates of the object being evaluated\n */\n // remove yi, not used but left code here just in case.\n _findCrossPoints: function _findCrossPoints(point, lines) {\n var b1,\n b2,\n a1,\n a2,\n xi,\n // yi,\n xcount = 0,\n iLine;\n\n for (var lineKey in lines) {\n iLine = lines[lineKey]; // optimisation 1: line below point. no cross\n\n if (iLine.o.y < point.y && iLine.d.y < point.y) {\n continue;\n } // optimisation 2: line above point. no cross\n\n\n if (iLine.o.y >= point.y && iLine.d.y >= point.y) {\n continue;\n } // optimisation 3: vertical line case\n\n\n if (iLine.o.x === iLine.d.x && iLine.o.x >= point.x) {\n xi = iLine.o.x; // yi = point.y;\n } // calculate the intersection point\n else {\n b1 = 0;\n b2 = (iLine.d.y - iLine.o.y) / (iLine.d.x - iLine.o.x);\n a1 = point.y - b1 * point.x;\n a2 = iLine.o.y - b2 * iLine.o.x;\n xi = -(a1 - a2) / (b1 - b2); // yi = a1 + b1 * xi;\n } // dont count xi < point.x cases\n\n\n if (xi >= point.x) {\n xcount += 1;\n } // optimisation 4: specific for square images\n\n\n if (xcount === 2) {\n break;\n }\n }\n\n return xcount;\n },\n\n /**\n * Returns coordinates of object's bounding rectangle (left, top, width, height)\n * the box is intended as aligned to axis of canvas.\n * @param {Boolean} [absolute] use coordinates without viewportTransform\n * @param {Boolean} [calculate] use coordinates of current position instead of .oCoords / .aCoords\n * @return {Object} Object with left, top, width, height properties\n */\n getBoundingRect: function getBoundingRect(absolute, calculate) {\n var coords = this.getCoords(absolute, calculate);\n return fabric.util.makeBoundingBoxFromPoints(coords);\n },\n\n /**\n * Returns width of an object's bounding box counting transformations\n * before 2.0 it was named getWidth();\n * @return {Number} width value\n */\n getScaledWidth: function getScaledWidth() {\n return this._getTransformedDimensions().x;\n },\n\n /**\n * Returns height of an object bounding box counting transformations\n * before 2.0 it was named getHeight();\n * @return {Number} height value\n */\n getScaledHeight: function getScaledHeight() {\n return this._getTransformedDimensions().y;\n },\n\n /**\n * Makes sure the scale is valid and modifies it if necessary\n * @private\n * @param {Number} value\n * @return {Number}\n */\n _constrainScale: function _constrainScale(value) {\n if (Math.abs(value) < this.minScaleLimit) {\n if (value < 0) {\n return -this.minScaleLimit;\n } else {\n return this.minScaleLimit;\n }\n } else if (value === 0) {\n return 0.0001;\n }\n\n return value;\n },\n\n /**\n * Scales an object (equally by x and y)\n * @param {Number} value Scale factor\n * @return {fabric.Object} thisArg\n * @chainable\n */\n scale: function scale(value) {\n this._set('scaleX', value);\n\n this._set('scaleY', value);\n\n return this.setCoords();\n },\n\n /**\n * Scales an object to a given width, with respect to bounding box (scaling by x/y equally)\n * @param {Number} value New width value\n * @param {Boolean} absolute ignore viewport\n * @return {fabric.Object} thisArg\n * @chainable\n */\n scaleToWidth: function scaleToWidth(value, absolute) {\n // adjust to bounding rect factor so that rotated shapes would fit as well\n var boundingRectFactor = this.getBoundingRect(absolute).width / this.getScaledWidth();\n return this.scale(value / this.width / boundingRectFactor);\n },\n\n /**\n * Scales an object to a given height, with respect to bounding box (scaling by x/y equally)\n * @param {Number} value New height value\n * @param {Boolean} absolute ignore viewport\n * @return {fabric.Object} thisArg\n * @chainable\n */\n scaleToHeight: function scaleToHeight(value, absolute) {\n // adjust to bounding rect factor so that rotated shapes would fit as well\n var boundingRectFactor = this.getBoundingRect(absolute).height / this.getScaledHeight();\n return this.scale(value / this.height / boundingRectFactor);\n },\n\n /**\n * Calculates and returns the .coords of an object.\n * @return {Object} Object with tl, tr, br, bl ....\n * @chainable\n */\n calcCoords: function calcCoords(absolute) {\n var rotateMatrix = this._calcRotateMatrix(),\n translateMatrix = this._calcTranslateMatrix(),\n startMatrix = multiplyMatrices(translateMatrix, rotateMatrix),\n vpt = this.getViewportTransform(),\n finalMatrix = absolute ? startMatrix : multiplyMatrices(vpt, startMatrix),\n dim = this._getTransformedDimensions(),\n w = dim.x / 2,\n h = dim.y / 2,\n tl = transformPoint({\n x: -w,\n y: -h\n }, finalMatrix),\n tr = transformPoint({\n x: w,\n y: -h\n }, finalMatrix),\n bl = transformPoint({\n x: -w,\n y: h\n }, finalMatrix),\n br = transformPoint({\n x: w,\n y: h\n }, finalMatrix);\n\n if (!absolute) {\n var padding = this.padding,\n angle = degreesToRadians(this.angle),\n cos = fabric.util.cos(angle),\n sin = fabric.util.sin(angle),\n cosP = cos * padding,\n sinP = sin * padding,\n cosPSinP = cosP + sinP,\n cosPMinusSinP = cosP - sinP;\n\n if (padding) {\n tl.x -= cosPMinusSinP;\n tl.y -= cosPSinP;\n tr.x += cosPSinP;\n tr.y -= cosPMinusSinP;\n bl.x -= cosPSinP;\n bl.y += cosPMinusSinP;\n br.x += cosPMinusSinP;\n br.y += cosPSinP;\n }\n\n var ml = new fabric.Point((tl.x + bl.x) / 2, (tl.y + bl.y) / 2),\n mt = new fabric.Point((tr.x + tl.x) / 2, (tr.y + tl.y) / 2),\n mr = new fabric.Point((br.x + tr.x) / 2, (br.y + tr.y) / 2),\n mb = new fabric.Point((br.x + bl.x) / 2, (br.y + bl.y) / 2),\n mtr = new fabric.Point(mt.x + sin * this.rotatingPointOffset, mt.y - cos * this.rotatingPointOffset);\n } // if (!absolute) {\n // var canvas = this.canvas;\n // setTimeout(function() {\n // canvas.contextTop.clearRect(0, 0, 700, 700);\n // canvas.contextTop.fillStyle = 'green';\n // canvas.contextTop.fillRect(mb.x, mb.y, 3, 3);\n // canvas.contextTop.fillRect(bl.x, bl.y, 3, 3);\n // canvas.contextTop.fillRect(br.x, br.y, 3, 3);\n // canvas.contextTop.fillRect(tl.x, tl.y, 3, 3);\n // canvas.contextTop.fillRect(tr.x, tr.y, 3, 3);\n // canvas.contextTop.fillRect(ml.x, ml.y, 3, 3);\n // canvas.contextTop.fillRect(mr.x, mr.y, 3, 3);\n // canvas.contextTop.fillRect(mt.x, mt.y, 3, 3);\n // canvas.contextTop.fillRect(mtr.x, mtr.y, 3, 3);\n // }, 50);\n // }\n\n\n var coords = {\n // corners\n tl: tl,\n tr: tr,\n br: br,\n bl: bl\n };\n\n if (!absolute) {\n // middle\n coords.ml = ml;\n coords.mt = mt;\n coords.mr = mr;\n coords.mb = mb; // rotating point\n\n coords.mtr = mtr;\n }\n\n return coords;\n },\n\n /**\n * Sets corner position coordinates based on current angle, width and height.\n * See {@link https://github.com/kangax/fabric.js/wiki/When-to-call-setCoords|When-to-call-setCoords}\n * @param {Boolean} [ignoreZoom] set oCoords with or without the viewport transform.\n * @param {Boolean} [skipAbsolute] skip calculation of aCoords, useful in setViewportTransform\n * @return {fabric.Object} thisArg\n * @chainable\n */\n setCoords: function setCoords(ignoreZoom, skipAbsolute) {\n this.oCoords = this.calcCoords(ignoreZoom);\n\n if (!skipAbsolute) {\n this.aCoords = this.calcCoords(true);\n } // set coordinates of the draggable boxes in the corners used to scale/rotate the image\n\n\n ignoreZoom || this._setCornerCoords && this._setCornerCoords();\n return this;\n },\n\n /**\n * calculate rotation matrix of an object\n * @return {Array} rotation matrix for the object\n */\n _calcRotateMatrix: function _calcRotateMatrix() {\n return fabric.util.calcRotateMatrix(this);\n },\n\n /**\n * calculate the translation matrix for an object transform\n * @return {Array} rotation matrix for the object\n */\n _calcTranslateMatrix: function _calcTranslateMatrix() {\n var center = this.getCenterPoint();\n return [1, 0, 0, 1, center.x, center.y];\n },\n transformMatrixKey: function transformMatrixKey(skipGroup) {\n var sep = '_',\n prefix = '';\n\n if (!skipGroup && this.group) {\n prefix = this.group.transformMatrixKey(skipGroup) + sep;\n }\n\n ;\n return prefix + this.top + sep + this.left + sep + this.scaleX + sep + this.scaleY + sep + this.skewX + sep + this.skewY + sep + this.angle + sep + this.originX + sep + this.originY + sep + this.width + sep + this.height + sep + this.strokeWidth + this.flipX + this.flipY;\n },\n\n /**\n * calculate transform matrix that represents the current transformations from the\n * object's properties.\n * @param {Boolean} [skipGroup] return transform matrix for object not counting parent transformations\n * @return {Array} transform matrix for the object\n */\n calcTransformMatrix: function calcTransformMatrix(skipGroup) {\n if (skipGroup) {\n return this.calcOwnMatrix();\n }\n\n var key = this.transformMatrixKey(),\n cache = this.matrixCache || (this.matrixCache = {});\n\n if (cache.key === key) {\n return cache.value;\n }\n\n var matrix = this.calcOwnMatrix();\n\n if (this.group) {\n matrix = multiplyMatrices(this.group.calcTransformMatrix(), matrix);\n }\n\n cache.key = key;\n cache.value = matrix;\n return matrix;\n },\n\n /**\n * calculate transform matrix that represents the current transformations from the\n * object's properties, this matrix does not include the group transformation\n * @return {Array} transform matrix for the object\n */\n calcOwnMatrix: function calcOwnMatrix() {\n var key = this.transformMatrixKey(true),\n cache = this.ownMatrixCache || (this.ownMatrixCache = {});\n\n if (cache.key === key) {\n return cache.value;\n }\n\n var tMatrix = this._calcTranslateMatrix();\n\n this.translateX = tMatrix[4];\n this.translateY = tMatrix[5];\n cache.key = key;\n cache.value = fabric.util.composeMatrix(this);\n return cache.value;\n },\n\n /*\n * Calculate object dimensions from its properties\n * @private\n * @deprecated since 3.4.0, please use fabric.util._calcDimensionsTransformMatrix\n * not including or including flipX, flipY to emulate the flipping boolean\n * @return {Object} .x width dimension\n * @return {Object} .y height dimension\n */\n _calcDimensionsTransformMatrix: function _calcDimensionsTransformMatrix(skewX, skewY, flipping) {\n return fabric.util.calcDimensionsMatrix({\n skewX: skewX,\n skewY: skewY,\n scaleX: this.scaleX * (flipping && this.flipX ? -1 : 1),\n scaleY: this.scaleY * (flipping && this.flipY ? -1 : 1)\n });\n },\n\n /*\n * Calculate object dimensions from its properties\n * @private\n * @return {Object} .x width dimension\n * @return {Object} .y height dimension\n */\n _getNonTransformedDimensions: function _getNonTransformedDimensions() {\n var strokeWidth = this.strokeWidth,\n w = this.width + strokeWidth,\n h = this.height + strokeWidth;\n return {\n x: w,\n y: h\n };\n },\n\n /*\n * Calculate object bounding box dimensions from its properties scale, skew.\n * The skewX and skewY parameters are used in the skewing logic path and\n * do not provide something useful to common use cases.\n * @param {Number} [skewX], a value to override current skewX\n * @param {Number} [skewY], a value to override current skewY\n * @private\n * @return {Object} .x width dimension\n * @return {Object} .y height dimension\n */\n _getTransformedDimensions: function _getTransformedDimensions(skewX, skewY) {\n if (typeof skewX === 'undefined') {\n skewX = this.skewX;\n }\n\n if (typeof skewY === 'undefined') {\n skewY = this.skewY;\n }\n\n var dimensions = this._getNonTransformedDimensions(),\n dimX,\n dimY,\n noSkew = skewX === 0 && skewY === 0;\n\n if (this.strokeUniform) {\n dimX = this.width;\n dimY = this.height;\n } else {\n dimX = dimensions.x;\n dimY = dimensions.y;\n }\n\n if (noSkew) {\n return this._finalizeDimensions(dimX * this.scaleX, dimY * this.scaleY);\n } else {\n dimX /= 2;\n dimY /= 2;\n }\n\n var points = [{\n x: -dimX,\n y: -dimY\n }, {\n x: dimX,\n y: -dimY\n }, {\n x: -dimX,\n y: dimY\n }, {\n x: dimX,\n y: dimY\n }],\n transformMatrix = fabric.util.calcDimensionsMatrix({\n scaleX: this.scaleX,\n scaleY: this.scaleY,\n skewX: skewX,\n skewY: skewY\n }),\n bbox = fabric.util.makeBoundingBoxFromPoints(points, transformMatrix);\n return this._finalizeDimensions(bbox.width, bbox.height);\n },\n\n /*\n * Calculate object bounding box dimensions from its properties scale, skew.\n * @param Number width width of the bbox\n * @param Number height height of the bbox\n * @private\n * @return {Object} .x finalized width dimension\n * @return {Object} .y finalized height dimension\n */\n _finalizeDimensions: function _finalizeDimensions(width, height) {\n return this.strokeUniform ? {\n x: width + this.strokeWidth,\n y: height + this.strokeWidth\n } : {\n x: width,\n y: height\n };\n },\n\n /*\n * Calculate object dimensions for controls, including padding and canvas zoom.\n * private\n */\n _calculateCurrentDimensions: function _calculateCurrentDimensions() {\n var vpt = this.getViewportTransform(),\n dim = this._getTransformedDimensions(),\n p = fabric.util.transformPoint(dim, vpt, true);\n\n return p.scalarAdd(2 * this.padding);\n }\n });\n})();\n\nfabric.util.object.extend(fabric.Object.prototype,\n/** @lends fabric.Object.prototype */\n{\n /**\n * Moves an object to the bottom of the stack of drawn objects\n * @return {fabric.Object} thisArg\n * @chainable\n */\n sendToBack: function sendToBack() {\n if (this.group) {\n fabric.StaticCanvas.prototype.sendToBack.call(this.group, this);\n } else if (this.canvas) {\n this.canvas.sendToBack(this);\n }\n\n return this;\n },\n\n /**\n * Moves an object to the top of the stack of drawn objects\n * @return {fabric.Object} thisArg\n * @chainable\n */\n bringToFront: function bringToFront() {\n if (this.group) {\n fabric.StaticCanvas.prototype.bringToFront.call(this.group, this);\n } else if (this.canvas) {\n this.canvas.bringToFront(this);\n }\n\n return this;\n },\n\n /**\n * Moves an object down in stack of drawn objects\n * @param {Boolean} [intersecting] If `true`, send object behind next lower intersecting object\n * @return {fabric.Object} thisArg\n * @chainable\n */\n sendBackwards: function sendBackwards(intersecting) {\n if (this.group) {\n fabric.StaticCanvas.prototype.sendBackwards.call(this.group, this, intersecting);\n } else if (this.canvas) {\n this.canvas.sendBackwards(this, intersecting);\n }\n\n return this;\n },\n\n /**\n * Moves an object up in stack of drawn objects\n * @param {Boolean} [intersecting] If `true`, send object in front of next upper intersecting object\n * @return {fabric.Object} thisArg\n * @chainable\n */\n bringForward: function bringForward(intersecting) {\n if (this.group) {\n fabric.StaticCanvas.prototype.bringForward.call(this.group, this, intersecting);\n } else if (this.canvas) {\n this.canvas.bringForward(this, intersecting);\n }\n\n return this;\n },\n\n /**\n * Moves an object to specified level in stack of drawn objects\n * @param {Number} index New position of object\n * @return {fabric.Object} thisArg\n * @chainable\n */\n moveTo: function moveTo(index) {\n if (this.group && this.group.type !== 'activeSelection') {\n fabric.StaticCanvas.prototype.moveTo.call(this.group, this, index);\n } else if (this.canvas) {\n this.canvas.moveTo(this, index);\n }\n\n return this;\n }\n});\n\n(function () {\n var extend = fabric.util.object.extend,\n originalSet = 'stateProperties';\n /*\n Depends on `stateProperties`\n */\n\n function saveProps(origin, destination, props) {\n var tmpObj = {},\n deep = true;\n props.forEach(function (prop) {\n tmpObj[prop] = origin[prop];\n });\n extend(origin[destination], tmpObj, deep);\n }\n\n function _isEqual(origValue, currentValue, firstPass) {\n if (origValue === currentValue) {\n // if the objects are identical, return\n return true;\n } else if (Array.isArray(origValue)) {\n if (!Array.isArray(currentValue) || origValue.length !== currentValue.length) {\n return false;\n }\n\n for (var i = 0, len = origValue.length; i < len; i++) {\n if (!_isEqual(origValue[i], currentValue[i])) {\n return false;\n }\n }\n\n return true;\n } else if (origValue && _typeof(origValue) === 'object') {\n var keys = Object.keys(origValue),\n key;\n\n if (!currentValue || _typeof(currentValue) !== 'object' || !firstPass && keys.length !== Object.keys(currentValue).length) {\n return false;\n }\n\n for (var i = 0, len = keys.length; i < len; i++) {\n key = keys[i]; // since clipPath is in the statefull cache list and the clipPath objects\n // would be iterated as an object, this would lead to possible infinite recursion\n\n if (key === 'canvas') {\n continue;\n }\n\n if (!_isEqual(origValue[key], currentValue[key])) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n fabric.util.object.extend(fabric.Object.prototype,\n /** @lends fabric.Object.prototype */\n {\n /**\n * Returns true if object state (one of its state properties) was changed\n * @param {String} [propertySet] optional name for the set of property we want to save\n * @return {Boolean} true if instance' state has changed since `{@link fabric.Object#saveState}` was called\n */\n hasStateChanged: function hasStateChanged(propertySet) {\n propertySet = propertySet || originalSet;\n var dashedPropertySet = '_' + propertySet;\n\n if (Object.keys(this[dashedPropertySet]).length < this[propertySet].length) {\n return true;\n }\n\n return !_isEqual(this[dashedPropertySet], this, true);\n },\n\n /**\n * Saves state of an object\n * @param {Object} [options] Object with additional `stateProperties` array to include when saving state\n * @return {fabric.Object} thisArg\n */\n saveState: function saveState(options) {\n var propertySet = options && options.propertySet || originalSet,\n destination = '_' + propertySet;\n\n if (!this[destination]) {\n return this.setupState(options);\n }\n\n saveProps(this, destination, this[propertySet]);\n\n if (options && options.stateProperties) {\n saveProps(this, destination, options.stateProperties);\n }\n\n return this;\n },\n\n /**\n * Setups state of an object\n * @param {Object} [options] Object with additional `stateProperties` array to include when saving state\n * @return {fabric.Object} thisArg\n */\n setupState: function setupState(options) {\n options = options || {};\n var propertySet = options.propertySet || originalSet;\n options.propertySet = propertySet;\n this['_' + propertySet] = {};\n this.saveState(options);\n return this;\n }\n });\n})();\n\n(function () {\n var degreesToRadians = fabric.util.degreesToRadians;\n fabric.util.object.extend(fabric.Object.prototype,\n /** @lends fabric.Object.prototype */\n {\n /**\n * The object interactivity controls.\n * @private\n */\n _controlsVisibility: null,\n\n /**\n * Determines which corner has been clicked\n * @private\n * @param {Object} pointer The pointer indicating the mouse position\n * @return {String|Boolean} corner code (tl, tr, bl, br, etc.), or false if nothing is found\n */\n _findTargetCorner: function _findTargetCorner(pointer) {\n // objects in group, anykind, are not self modificable,\n // must not return an hovered corner.\n if (!this.hasControls || this.group || !this.canvas || this.canvas._activeObject !== this) {\n return false;\n }\n\n var ex = pointer.x,\n ey = pointer.y,\n xPoints,\n lines;\n this.__corner = 0;\n\n for (var i in this.oCoords) {\n if (!this.isControlVisible(i)) {\n continue;\n }\n\n if (i === 'mtr' && !this.hasRotatingPoint) {\n continue;\n }\n\n if (this.get('lockUniScaling') && (i === 'mt' || i === 'mr' || i === 'mb' || i === 'ml')) {\n continue;\n }\n\n lines = this._getImageLines(this.oCoords[i].corner); // debugging\n // canvas.contextTop.fillRect(lines.bottomline.d.x, lines.bottomline.d.y, 2, 2);\n // canvas.contextTop.fillRect(lines.bottomline.o.x, lines.bottomline.o.y, 2, 2);\n // canvas.contextTop.fillRect(lines.leftline.d.x, lines.leftline.d.y, 2, 2);\n // canvas.contextTop.fillRect(lines.leftline.o.x, lines.leftline.o.y, 2, 2);\n // canvas.contextTop.fillRect(lines.topline.d.x, lines.topline.d.y, 2, 2);\n // canvas.contextTop.fillRect(lines.topline.o.x, lines.topline.o.y, 2, 2);\n // canvas.contextTop.fillRect(lines.rightline.d.x, lines.rightline.d.y, 2, 2);\n // canvas.contextTop.fillRect(lines.rightline.o.x, lines.rightline.o.y, 2, 2);\n\n xPoints = this._findCrossPoints({\n x: ex,\n y: ey\n }, lines);\n\n if (xPoints !== 0 && xPoints % 2 === 1) {\n this.__corner = i;\n return i;\n }\n }\n\n return false;\n },\n\n /**\n * Sets the coordinates of the draggable boxes in the corners of\n * the image used to scale/rotate it.\n * @private\n */\n _setCornerCoords: function _setCornerCoords() {\n var coords = this.oCoords,\n newTheta = degreesToRadians(45 - this.angle),\n\n /* Math.sqrt(2 * Math.pow(this.cornerSize, 2)) / 2, */\n\n /* 0.707106 stands for sqrt(2)/2 */\n cornerHypotenuse = this.cornerSize * 0.707106,\n cosHalfOffset = cornerHypotenuse * fabric.util.cos(newTheta),\n sinHalfOffset = cornerHypotenuse * fabric.util.sin(newTheta),\n x,\n y;\n\n for (var point in coords) {\n x = coords[point].x;\n y = coords[point].y;\n coords[point].corner = {\n tl: {\n x: x - sinHalfOffset,\n y: y - cosHalfOffset\n },\n tr: {\n x: x + cosHalfOffset,\n y: y - sinHalfOffset\n },\n bl: {\n x: x - cosHalfOffset,\n y: y + sinHalfOffset\n },\n br: {\n x: x + sinHalfOffset,\n y: y + cosHalfOffset\n }\n };\n }\n },\n\n /**\n * Draws a colored layer behind the object, inside its selection borders.\n * Requires public options: padding, selectionBackgroundColor\n * this function is called when the context is transformed\n * has checks to be skipped when the object is on a staticCanvas\n * @param {CanvasRenderingContext2D} ctx Context to draw on\n * @return {fabric.Object} thisArg\n * @chainable\n */\n drawSelectionBackground: function drawSelectionBackground(ctx) {\n if (!this.selectionBackgroundColor || this.canvas && !this.canvas.interactive || this.canvas && this.canvas._activeObject !== this) {\n return this;\n }\n\n ctx.save();\n\n var center = this.getCenterPoint(),\n wh = this._calculateCurrentDimensions(),\n vpt = this.canvas.viewportTransform;\n\n ctx.translate(center.x, center.y);\n ctx.scale(1 / vpt[0], 1 / vpt[3]);\n ctx.rotate(degreesToRadians(this.angle));\n ctx.fillStyle = this.selectionBackgroundColor;\n ctx.fillRect(-wh.x / 2, -wh.y / 2, wh.x, wh.y);\n ctx.restore();\n return this;\n },\n\n /**\n * Draws borders of an object's bounding box.\n * Requires public properties: width, height\n * Requires public options: padding, borderColor\n * @param {CanvasRenderingContext2D} ctx Context to draw on\n * @param {Object} styleOverride object to override the object style\n * @return {fabric.Object} thisArg\n * @chainable\n */\n drawBorders: function drawBorders(ctx, styleOverride) {\n styleOverride = styleOverride || {};\n\n var wh = this._calculateCurrentDimensions(),\n strokeWidth = this.borderScaleFactor,\n width = wh.x + strokeWidth,\n height = wh.y + strokeWidth,\n drawRotatingPoint = typeof styleOverride.hasRotatingPoint !== 'undefined' ? styleOverride.hasRotatingPoint : this.hasRotatingPoint,\n hasControls = typeof styleOverride.hasControls !== 'undefined' ? styleOverride.hasControls : this.hasControls,\n rotatingPointOffset = typeof styleOverride.rotatingPointOffset !== 'undefined' ? styleOverride.rotatingPointOffset : this.rotatingPointOffset;\n\n ctx.save();\n ctx.strokeStyle = styleOverride.borderColor || this.borderColor;\n\n this._setLineDash(ctx, styleOverride.borderDashArray || this.borderDashArray, null);\n\n ctx.strokeRect(-width / 2, -height / 2, width, height);\n\n if (drawRotatingPoint && this.isControlVisible('mtr') && hasControls) {\n var rotateHeight = -height / 2;\n ctx.beginPath();\n ctx.moveTo(0, rotateHeight);\n ctx.lineTo(0, rotateHeight - rotatingPointOffset);\n ctx.stroke();\n }\n\n ctx.restore();\n return this;\n },\n\n /**\n * Draws borders of an object's bounding box when it is inside a group.\n * Requires public properties: width, height\n * Requires public options: padding, borderColor\n * @param {CanvasRenderingContext2D} ctx Context to draw on\n * @param {object} options object representing current object parameters\n * @param {Object} styleOverride object to override the object style\n * @return {fabric.Object} thisArg\n * @chainable\n */\n drawBordersInGroup: function drawBordersInGroup(ctx, options, styleOverride) {\n styleOverride = styleOverride || {};\n var p = {\n x: this.width,\n y: this.height\n },\n matrix = fabric.util.composeMatrix({\n scaleX: options.scaleX,\n scaleY: options.scaleY,\n skewX: options.skewX\n }),\n wh = fabric.util.transformPoint(p, matrix),\n strokeWidth = this.strokeWidth,\n borderScaleFactor = this.borderScaleFactor,\n width = wh.x + strokeWidth * (this.strokeUniform ? this.canvas.getZoom() : options.scaleX) + borderScaleFactor,\n height = wh.y + strokeWidth * (this.strokeUniform ? this.canvas.getZoom() : options.scaleY) + borderScaleFactor;\n ctx.save();\n\n this._setLineDash(ctx, styleOverride.borderDashArray || this.borderDashArray, null);\n\n ctx.strokeStyle = styleOverride.borderColor || this.borderColor;\n ctx.strokeRect(-width / 2, -height / 2, width, height);\n ctx.restore();\n return this;\n },\n\n /**\n * Draws corners of an object's bounding box.\n * Requires public properties: width, height\n * Requires public options: cornerSize, padding\n * @param {CanvasRenderingContext2D} ctx Context to draw on\n * @param {Object} styleOverride object to override the object style\n * @return {fabric.Object} thisArg\n * @chainable\n */\n drawControls: function drawControls(ctx, styleOverride) {\n styleOverride = styleOverride || {};\n\n var wh = this._calculateCurrentDimensions(),\n width = wh.x,\n height = wh.y,\n scaleOffset = styleOverride.cornerSize || this.cornerSize,\n left = -(width + scaleOffset) / 2,\n top = -(height + scaleOffset) / 2,\n transparentCorners = typeof styleOverride.transparentCorners !== 'undefined' ? styleOverride.transparentCorners : this.transparentCorners,\n hasRotatingPoint = typeof styleOverride.hasRotatingPoint !== 'undefined' ? styleOverride.hasRotatingPoint : this.hasRotatingPoint,\n methodName = transparentCorners ? 'stroke' : 'fill';\n\n ctx.save();\n ctx.strokeStyle = ctx.fillStyle = styleOverride.cornerColor || this.cornerColor;\n\n if (!this.transparentCorners) {\n ctx.strokeStyle = styleOverride.cornerStrokeColor || this.cornerStrokeColor;\n }\n\n this._setLineDash(ctx, styleOverride.cornerDashArray || this.cornerDashArray, null); // top-left\n\n\n this._drawControl('tl', ctx, methodName, left, top, styleOverride); // top-right\n\n\n this._drawControl('tr', ctx, methodName, left + width, top, styleOverride); // bottom-left\n\n\n this._drawControl('bl', ctx, methodName, left, top + height, styleOverride); // bottom-right\n\n\n this._drawControl('br', ctx, methodName, left + width, top + height, styleOverride);\n\n if (!this.get('lockUniScaling')) {\n // middle-top\n this._drawControl('mt', ctx, methodName, left + width / 2, top, styleOverride); // middle-bottom\n\n\n this._drawControl('mb', ctx, methodName, left + width / 2, top + height, styleOverride); // middle-right\n\n\n this._drawControl('mr', ctx, methodName, left + width, top + height / 2, styleOverride); // middle-left\n\n\n this._drawControl('ml', ctx, methodName, left, top + height / 2, styleOverride);\n } // middle-top-rotate\n\n\n if (hasRotatingPoint) {\n this._drawControl('mtr', ctx, methodName, left + width / 2, top - this.rotatingPointOffset, styleOverride);\n }\n\n ctx.restore();\n return this;\n },\n\n /**\n * @private\n */\n _drawControl: function _drawControl(control, ctx, methodName, left, top, styleOverride) {\n styleOverride = styleOverride || {};\n\n if (!this.isControlVisible(control)) {\n return;\n }\n\n var size = this.cornerSize,\n stroke = !this.transparentCorners && this.cornerStrokeColor;\n\n switch (styleOverride.cornerStyle || this.cornerStyle) {\n case 'circle':\n ctx.beginPath();\n ctx.arc(left + size / 2, top + size / 2, size / 2, 0, 2 * Math.PI, false);\n ctx[methodName]();\n\n if (stroke) {\n ctx.stroke();\n }\n\n break;\n\n default:\n this.transparentCorners || ctx.clearRect(left, top, size, size);\n ctx[methodName + 'Rect'](left, top, size, size);\n\n if (stroke) {\n ctx.strokeRect(left, top, size, size);\n }\n\n }\n },\n\n /**\n * Returns true if the specified control is visible, false otherwise.\n * @param {String} controlName The name of the control. Possible values are 'tl', 'tr', 'br', 'bl', 'ml', 'mt', 'mr', 'mb', 'mtr'.\n * @returns {Boolean} true if the specified control is visible, false otherwise\n */\n isControlVisible: function isControlVisible(controlName) {\n return this._getControlsVisibility()[controlName];\n },\n\n /**\n * Sets the visibility of the specified control.\n * @param {String} controlName The name of the control. Possible values are 'tl', 'tr', 'br', 'bl', 'ml', 'mt', 'mr', 'mb', 'mtr'.\n * @param {Boolean} visible true to set the specified control visible, false otherwise\n * @return {fabric.Object} thisArg\n * @chainable\n */\n setControlVisible: function setControlVisible(controlName, visible) {\n this._getControlsVisibility()[controlName] = visible;\n return this;\n },\n\n /**\n * Sets the visibility state of object controls.\n * @param {Object} [options] Options object\n * @param {Boolean} [options.bl] true to enable the bottom-left control, false to disable it\n * @param {Boolean} [options.br] true to enable the bottom-right control, false to disable it\n * @param {Boolean} [options.mb] true to enable the middle-bottom control, false to disable it\n * @param {Boolean} [options.ml] true to enable the middle-left control, false to disable it\n * @param {Boolean} [options.mr] true to enable the middle-right control, false to disable it\n * @param {Boolean} [options.mt] true to enable the middle-top control, false to disable it\n * @param {Boolean} [options.tl] true to enable the top-left control, false to disable it\n * @param {Boolean} [options.tr] true to enable the top-right control, false to disable it\n * @param {Boolean} [options.mtr] true to enable the middle-top-rotate control, false to disable it\n * @return {fabric.Object} thisArg\n * @chainable\n */\n setControlsVisibility: function setControlsVisibility(options) {\n options || (options = {});\n\n for (var p in options) {\n this.setControlVisible(p, options[p]);\n }\n\n return this;\n },\n\n /**\n * Returns the instance of the control visibility set for this object.\n * @private\n * @returns {Object}\n */\n _getControlsVisibility: function _getControlsVisibility() {\n if (!this._controlsVisibility) {\n this._controlsVisibility = {\n tl: true,\n tr: true,\n br: true,\n bl: true,\n ml: true,\n mt: true,\n mr: true,\n mb: true,\n mtr: true\n };\n }\n\n return this._controlsVisibility;\n },\n\n /**\n * This callback function is called every time _discardActiveObject or _setActiveObject\n * try to to deselect this object. If the function returns true, the process is cancelled\n * @param {Object} [options] options sent from the upper functions\n * @param {Event} [options.e] event if the process is generated by an event\n */\n onDeselect: function onDeselect() {// implemented by sub-classes, as needed.\n },\n\n /**\n * This callback function is called every time _discardActiveObject or _setActiveObject\n * try to to select this object. If the function returns true, the process is cancelled\n * @param {Object} [options] options sent from the upper functions\n * @param {Event} [options.e] event if the process is generated by an event\n */\n onSelect: function onSelect() {// implemented by sub-classes, as needed.\n }\n });\n})();\n\nfabric.util.object.extend(fabric.StaticCanvas.prototype,\n/** @lends fabric.StaticCanvas.prototype */\n{\n /**\n * Animation duration (in ms) for fx* methods\n * @type Number\n * @default\n */\n FX_DURATION: 500,\n\n /**\n * Centers object horizontally with animation.\n * @param {fabric.Object} object Object to center\n * @param {Object} [callbacks] Callbacks object with optional \"onComplete\" and/or \"onChange\" properties\n * @param {Function} [callbacks.onComplete] Invoked on completion\n * @param {Function} [callbacks.onChange] Invoked on every step of animation\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n fxCenterObjectH: function fxCenterObjectH(object, callbacks) {\n callbacks = callbacks || {};\n\n var empty = function empty() {},\n _onComplete = callbacks.onComplete || empty,\n _onChange = callbacks.onChange || empty,\n _this = this;\n\n fabric.util.animate({\n startValue: object.left,\n endValue: this.getCenter().left,\n duration: this.FX_DURATION,\n onChange: function onChange(value) {\n object.set('left', value);\n\n _this.requestRenderAll();\n\n _onChange();\n },\n onComplete: function onComplete() {\n object.setCoords();\n\n _onComplete();\n }\n });\n return this;\n },\n\n /**\n * Centers object vertically with animation.\n * @param {fabric.Object} object Object to center\n * @param {Object} [callbacks] Callbacks object with optional \"onComplete\" and/or \"onChange\" properties\n * @param {Function} [callbacks.onComplete] Invoked on completion\n * @param {Function} [callbacks.onChange] Invoked on every step of animation\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n fxCenterObjectV: function fxCenterObjectV(object, callbacks) {\n callbacks = callbacks || {};\n\n var empty = function empty() {},\n _onComplete2 = callbacks.onComplete || empty,\n _onChange2 = callbacks.onChange || empty,\n _this = this;\n\n fabric.util.animate({\n startValue: object.top,\n endValue: this.getCenter().top,\n duration: this.FX_DURATION,\n onChange: function onChange(value) {\n object.set('top', value);\n\n _this.requestRenderAll();\n\n _onChange2();\n },\n onComplete: function onComplete() {\n object.setCoords();\n\n _onComplete2();\n }\n });\n return this;\n },\n\n /**\n * Same as `fabric.Canvas#remove` but animated\n * @param {fabric.Object} object Object to remove\n * @param {Object} [callbacks] Callbacks object with optional \"onComplete\" and/or \"onChange\" properties\n * @param {Function} [callbacks.onComplete] Invoked on completion\n * @param {Function} [callbacks.onChange] Invoked on every step of animation\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n fxRemove: function fxRemove(object, callbacks) {\n callbacks = callbacks || {};\n\n var empty = function empty() {},\n _onComplete3 = callbacks.onComplete || empty,\n _onChange3 = callbacks.onChange || empty,\n _this = this;\n\n fabric.util.animate({\n startValue: object.opacity,\n endValue: 0,\n duration: this.FX_DURATION,\n onChange: function onChange(value) {\n object.set('opacity', value);\n\n _this.requestRenderAll();\n\n _onChange3();\n },\n onComplete: function onComplete() {\n _this.remove(object);\n\n _onComplete3();\n }\n });\n return this;\n }\n});\nfabric.util.object.extend(fabric.Object.prototype,\n/** @lends fabric.Object.prototype */\n{\n /**\n * Animates object's properties\n * @param {String|Object} property Property to animate (if string) or properties to animate (if object)\n * @param {Number|Object} value Value to animate property to (if string was given first) or options object\n * @return {fabric.Object} thisArg\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-2#animation}\n * @chainable\n *\n * As object — multiple properties\n *\n * object.animate({ left: ..., top: ... });\n * object.animate({ left: ..., top: ... }, { duration: ... });\n *\n * As string — one property\n *\n * object.animate('left', ...);\n * object.animate('left', { duration: ... });\n *\n */\n animate: function animate() {\n if (arguments[0] && _typeof(arguments[0]) === 'object') {\n var propsToAnimate = [],\n prop,\n skipCallbacks;\n\n for (prop in arguments[0]) {\n propsToAnimate.push(prop);\n }\n\n for (var i = 0, len = propsToAnimate.length; i < len; i++) {\n prop = propsToAnimate[i];\n skipCallbacks = i !== len - 1;\n\n this._animate(prop, arguments[0][prop], arguments[1], skipCallbacks);\n }\n } else {\n this._animate.apply(this, arguments);\n }\n\n return this;\n },\n\n /**\n * @private\n * @param {String} property Property to animate\n * @param {String} to Value to animate to\n * @param {Object} [options] Options object\n * @param {Boolean} [skipCallbacks] When true, callbacks like onchange and oncomplete are not invoked\n */\n _animate: function _animate(property, to, options, skipCallbacks) {\n var _this = this,\n propPair;\n\n to = to.toString();\n\n if (!options) {\n options = {};\n } else {\n options = fabric.util.object.clone(options);\n }\n\n if (~property.indexOf('.')) {\n propPair = property.split('.');\n }\n\n var currentValue = propPair ? this.get(propPair[0])[propPair[1]] : this.get(property);\n\n if (!('from' in options)) {\n options.from = currentValue;\n }\n\n if (~to.indexOf('=')) {\n to = currentValue + parseFloat(to.replace('=', ''));\n } else {\n to = parseFloat(to);\n }\n\n fabric.util.animate({\n startValue: options.from,\n endValue: to,\n byValue: options.by,\n easing: options.easing,\n duration: options.duration,\n abort: options.abort && function () {\n return options.abort.call(_this);\n },\n onChange: function onChange(value, valueProgress, timeProgress) {\n if (propPair) {\n _this[propPair[0]][propPair[1]] = value;\n } else {\n _this.set(property, value);\n }\n\n if (skipCallbacks) {\n return;\n }\n\n options.onChange && options.onChange(value, valueProgress, timeProgress);\n },\n onComplete: function onComplete(value, valueProgress, timeProgress) {\n if (skipCallbacks) {\n return;\n }\n\n _this.setCoords();\n\n options.onComplete && options.onComplete(value, valueProgress, timeProgress);\n }\n });\n }\n});\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n extend = fabric.util.object.extend,\n clone = fabric.util.object.clone,\n coordProps = {\n x1: 1,\n x2: 1,\n y1: 1,\n y2: 1\n },\n supportsLineDash = fabric.StaticCanvas.supports('setLineDash');\n\n if (fabric.Line) {\n fabric.warn('fabric.Line is already defined');\n return;\n }\n /**\n * Line class\n * @class fabric.Line\n * @extends fabric.Object\n * @see {@link fabric.Line#initialize} for constructor definition\n */\n\n\n fabric.Line = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Line.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'line',\n\n /**\n * x value or first line edge\n * @type Number\n * @default\n */\n x1: 0,\n\n /**\n * y value or first line edge\n * @type Number\n * @default\n */\n y1: 0,\n\n /**\n * x value or second line edge\n * @type Number\n * @default\n */\n x2: 0,\n\n /**\n * y value or second line edge\n * @type Number\n * @default\n */\n y2: 0,\n cacheProperties: fabric.Object.prototype.cacheProperties.concat('x1', 'x2', 'y1', 'y2'),\n\n /**\n * Constructor\n * @param {Array} [points] Array of points\n * @param {Object} [options] Options object\n * @return {fabric.Line} thisArg\n */\n initialize: function initialize(points, options) {\n if (!points) {\n points = [0, 0, 0, 0];\n }\n\n this.callSuper('initialize', options);\n this.set('x1', points[0]);\n this.set('y1', points[1]);\n this.set('x2', points[2]);\n this.set('y2', points[3]);\n\n this._setWidthHeight(options);\n },\n\n /**\n * @private\n * @param {Object} [options] Options\n */\n _setWidthHeight: function _setWidthHeight(options) {\n options || (options = {});\n this.width = Math.abs(this.x2 - this.x1);\n this.height = Math.abs(this.y2 - this.y1);\n this.left = 'left' in options ? options.left : this._getLeftToOriginX();\n this.top = 'top' in options ? options.top : this._getTopToOriginY();\n },\n\n /**\n * @private\n * @param {String} key\n * @param {*} value\n */\n _set: function _set(key, value) {\n this.callSuper('_set', key, value);\n\n if (typeof coordProps[key] !== 'undefined') {\n this._setWidthHeight();\n }\n\n return this;\n },\n\n /**\n * @private\n * @return {Number} leftToOriginX Distance from left edge of canvas to originX of Line.\n */\n _getLeftToOriginX: makeEdgeToOriginGetter({\n // property names\n origin: 'originX',\n axis1: 'x1',\n axis2: 'x2',\n dimension: 'width'\n }, {\n // possible values of origin\n nearest: 'left',\n center: 'center',\n farthest: 'right'\n }),\n\n /**\n * @private\n * @return {Number} topToOriginY Distance from top edge of canvas to originY of Line.\n */\n _getTopToOriginY: makeEdgeToOriginGetter({\n // property names\n origin: 'originY',\n axis1: 'y1',\n axis2: 'y2',\n dimension: 'height'\n }, {\n // possible values of origin\n nearest: 'top',\n center: 'center',\n farthest: 'bottom'\n }),\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render(ctx) {\n ctx.beginPath();\n\n if (!this.strokeDashArray || this.strokeDashArray && supportsLineDash) {\n // move from center (of virtual box) to its left/top corner\n // we can't assume x1, y1 is top left and x2, y2 is bottom right\n var p = this.calcLinePoints();\n ctx.moveTo(p.x1, p.y1);\n ctx.lineTo(p.x2, p.y2);\n }\n\n ctx.lineWidth = this.strokeWidth; // TODO: test this\n // make sure setting \"fill\" changes color of a line\n // (by copying fillStyle to strokeStyle, since line is stroked, not filled)\n\n var origStrokeStyle = ctx.strokeStyle;\n ctx.strokeStyle = this.stroke || ctx.fillStyle;\n this.stroke && this._renderStroke(ctx);\n ctx.strokeStyle = origStrokeStyle;\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderDashedStroke: function _renderDashedStroke(ctx) {\n var p = this.calcLinePoints();\n ctx.beginPath();\n fabric.util.drawDashedLine(ctx, p.x1, p.y1, p.x2, p.y2, this.strokeDashArray);\n ctx.closePath();\n },\n\n /**\n * This function is an helper for svg import. it returns the center of the object in the svg\n * untransformed coordinates\n * @private\n * @return {Object} center point from element coordinates\n */\n _findCenterFromElement: function _findCenterFromElement() {\n return {\n x: (this.x1 + this.x2) / 2,\n y: (this.y1 + this.y2) / 2\n };\n },\n\n /**\n * Returns object representation of an instance\n * @methd toObject\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n return extend(this.callSuper('toObject', propertiesToInclude), this.calcLinePoints());\n },\n\n /*\n * Calculate object dimensions from its properties\n * @private\n */\n _getNonTransformedDimensions: function _getNonTransformedDimensions() {\n var dim = this.callSuper('_getNonTransformedDimensions');\n\n if (this.strokeLineCap === 'butt') {\n if (this.width === 0) {\n dim.y -= this.strokeWidth;\n }\n\n if (this.height === 0) {\n dim.x -= this.strokeWidth;\n }\n }\n\n return dim;\n },\n\n /**\n * Recalculates line points given width and height\n * @private\n */\n calcLinePoints: function calcLinePoints() {\n var xMult = this.x1 <= this.x2 ? -1 : 1,\n yMult = this.y1 <= this.y2 ? -1 : 1,\n x1 = xMult * this.width * 0.5,\n y1 = yMult * this.height * 0.5,\n x2 = xMult * this.width * -0.5,\n y2 = yMult * this.height * -0.5;\n return {\n x1: x1,\n x2: x2,\n y1: y1,\n y2: y2\n };\n }\n });\n /**\n * Returns fabric.Line instance from an object representation\n * @static\n * @memberOf fabric.Line\n * @param {Object} object Object to create an instance from\n * @param {function} [callback] invoked with new instance as first argument\n */\n\n fabric.Line.fromObject = function (object, callback) {\n function _callback(instance) {\n delete instance.points;\n callback && callback(instance);\n }\n\n ;\n var options = clone(object, true);\n options.points = [object.x1, object.y1, object.x2, object.y2];\n\n fabric.Object._fromObject('Line', options, _callback, 'points');\n };\n /**\n * Produces a function that calculates distance from canvas edge to Line origin.\n */\n\n\n function makeEdgeToOriginGetter(propertyNames, originValues) {\n var origin = propertyNames.origin,\n axis1 = propertyNames.axis1,\n axis2 = propertyNames.axis2,\n dimension = propertyNames.dimension,\n nearest = originValues.nearest,\n center = originValues.center,\n farthest = originValues.farthest;\n return function () {\n switch (this.get(origin)) {\n case nearest:\n return Math.min(this.get(axis1), this.get(axis2));\n\n case center:\n return Math.min(this.get(axis1), this.get(axis2)) + 0.5 * this.get(dimension);\n\n case farthest:\n return Math.max(this.get(axis1), this.get(axis2));\n }\n };\n }\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n pi = Math.PI;\n\n if (fabric.Circle) {\n fabric.warn('fabric.Circle is already defined.');\n return;\n }\n /**\n * Circle class\n * @class fabric.Circle\n * @extends fabric.Object\n * @see {@link fabric.Circle#initialize} for constructor definition\n */\n\n\n fabric.Circle = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Circle.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'circle',\n\n /**\n * Radius of this circle\n * @type Number\n * @default\n */\n radius: 0,\n\n /**\n * Start angle of the circle, moving clockwise\n * deprectated type, this should be in degree, this was an oversight.\n * probably will change to degrees in next major version\n * @type Number\n * @default 0\n */\n startAngle: 0,\n\n /**\n * End angle of the circle\n * deprectated type, this should be in degree, this was an oversight.\n * probably will change to degrees in next major version\n * @type Number\n * @default 2Pi\n */\n endAngle: pi * 2,\n cacheProperties: fabric.Object.prototype.cacheProperties.concat('radius', 'startAngle', 'endAngle'),\n\n /**\n * @private\n * @param {String} key\n * @param {*} value\n * @return {fabric.Circle} thisArg\n */\n _set: function _set(key, value) {\n this.callSuper('_set', key, value);\n\n if (key === 'radius') {\n this.setRadius(value);\n }\n\n return this;\n },\n\n /**\n * Returns object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n return this.callSuper('toObject', ['radius', 'startAngle', 'endAngle'].concat(propertiesToInclude));\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx context to render on\n */\n _render: function _render(ctx) {\n ctx.beginPath();\n ctx.arc(0, 0, this.radius, this.startAngle, this.endAngle, false);\n\n this._renderPaintInOrder(ctx);\n },\n\n /**\n * Returns horizontal radius of an object (according to how an object is scaled)\n * @return {Number}\n */\n getRadiusX: function getRadiusX() {\n return this.get('radius') * this.get('scaleX');\n },\n\n /**\n * Returns vertical radius of an object (according to how an object is scaled)\n * @return {Number}\n */\n getRadiusY: function getRadiusY() {\n return this.get('radius') * this.get('scaleY');\n },\n\n /**\n * Sets radius of an object (and updates width accordingly)\n * @return {fabric.Circle} thisArg\n */\n setRadius: function setRadius(value) {\n this.radius = value;\n return this.set('width', value * 2).set('height', value * 2);\n }\n });\n /**\n * Returns {@link fabric.Circle} instance from an object representation\n * @static\n * @memberOf fabric.Circle\n * @param {Object} object Object to create an instance from\n * @param {function} [callback] invoked with new instance as first argument\n * @return {Object} Instance of fabric.Circle\n */\n\n fabric.Circle.fromObject = function (object, callback) {\n return fabric.Object._fromObject('Circle', object, callback);\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {});\n\n if (fabric.Triangle) {\n fabric.warn('fabric.Triangle is already defined');\n return;\n }\n /**\n * Triangle class\n * @class fabric.Triangle\n * @extends fabric.Object\n * @return {fabric.Triangle} thisArg\n * @see {@link fabric.Triangle#initialize} for constructor definition\n */\n\n\n fabric.Triangle = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Triangle.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'triangle',\n\n /**\n * Width is set to 100 to compensate the old initialize code that was setting it to 100\n * @type Number\n * @default\n */\n width: 100,\n\n /**\n * Height is set to 100 to compensate the old initialize code that was setting it to 100\n * @type Number\n * @default\n */\n height: 100,\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render(ctx) {\n var widthBy2 = this.width / 2,\n heightBy2 = this.height / 2;\n ctx.beginPath();\n ctx.moveTo(-widthBy2, heightBy2);\n ctx.lineTo(0, -heightBy2);\n ctx.lineTo(widthBy2, heightBy2);\n ctx.closePath();\n\n this._renderPaintInOrder(ctx);\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderDashedStroke: function _renderDashedStroke(ctx) {\n var widthBy2 = this.width / 2,\n heightBy2 = this.height / 2;\n ctx.beginPath();\n fabric.util.drawDashedLine(ctx, -widthBy2, heightBy2, 0, -heightBy2, this.strokeDashArray);\n fabric.util.drawDashedLine(ctx, 0, -heightBy2, widthBy2, heightBy2, this.strokeDashArray);\n fabric.util.drawDashedLine(ctx, widthBy2, heightBy2, -widthBy2, heightBy2, this.strokeDashArray);\n ctx.closePath();\n }\n });\n /**\n * Returns {@link fabric.Triangle} instance from an object representation\n * @static\n * @memberOf fabric.Triangle\n * @param {Object} object Object to create an instance from\n * @param {function} [callback] invoked with new instance as first argument\n */\n\n fabric.Triangle.fromObject = function (object, callback) {\n return fabric.Object._fromObject('Triangle', object, callback);\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n piBy2 = Math.PI * 2;\n\n if (fabric.Ellipse) {\n fabric.warn('fabric.Ellipse is already defined.');\n return;\n }\n /**\n * Ellipse class\n * @class fabric.Ellipse\n * @extends fabric.Object\n * @return {fabric.Ellipse} thisArg\n * @see {@link fabric.Ellipse#initialize} for constructor definition\n */\n\n\n fabric.Ellipse = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Ellipse.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'ellipse',\n\n /**\n * Horizontal radius\n * @type Number\n * @default\n */\n rx: 0,\n\n /**\n * Vertical radius\n * @type Number\n * @default\n */\n ry: 0,\n cacheProperties: fabric.Object.prototype.cacheProperties.concat('rx', 'ry'),\n\n /**\n * Constructor\n * @param {Object} [options] Options object\n * @return {fabric.Ellipse} thisArg\n */\n initialize: function initialize(options) {\n this.callSuper('initialize', options);\n this.set('rx', options && options.rx || 0);\n this.set('ry', options && options.ry || 0);\n },\n\n /**\n * @private\n * @param {String} key\n * @param {*} value\n * @return {fabric.Ellipse} thisArg\n */\n _set: function _set(key, value) {\n this.callSuper('_set', key, value);\n\n switch (key) {\n case 'rx':\n this.rx = value;\n this.set('width', value * 2);\n break;\n\n case 'ry':\n this.ry = value;\n this.set('height', value * 2);\n break;\n }\n\n return this;\n },\n\n /**\n * Returns horizontal radius of an object (according to how an object is scaled)\n * @return {Number}\n */\n getRx: function getRx() {\n return this.get('rx') * this.get('scaleX');\n },\n\n /**\n * Returns Vertical radius of an object (according to how an object is scaled)\n * @return {Number}\n */\n getRy: function getRy() {\n return this.get('ry') * this.get('scaleY');\n },\n\n /**\n * Returns object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n return this.callSuper('toObject', ['rx', 'ry'].concat(propertiesToInclude));\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx context to render on\n */\n _render: function _render(ctx) {\n ctx.beginPath();\n ctx.save();\n ctx.transform(1, 0, 0, this.ry / this.rx, 0, 0);\n ctx.arc(0, 0, this.rx, 0, piBy2, false);\n ctx.restore();\n\n this._renderPaintInOrder(ctx);\n }\n });\n /**\n * Returns {@link fabric.Ellipse} instance from an object representation\n * @static\n * @memberOf fabric.Ellipse\n * @param {Object} object Object to create an instance from\n * @param {function} [callback] invoked with new instance as first argument\n * @return {fabric.Ellipse}\n */\n\n fabric.Ellipse.fromObject = function (object, callback) {\n return fabric.Object._fromObject('Ellipse', object, callback);\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n extend = fabric.util.object.extend;\n\n if (fabric.Rect) {\n fabric.warn('fabric.Rect is already defined');\n return;\n }\n /**\n * Rectangle class\n * @class fabric.Rect\n * @extends fabric.Object\n * @return {fabric.Rect} thisArg\n * @see {@link fabric.Rect#initialize} for constructor definition\n */\n\n\n fabric.Rect = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Rect.prototype */\n {\n /**\n * List of properties to consider when checking if state of an object is changed ({@link fabric.Object#hasStateChanged})\n * as well as for history (undo/redo) purposes\n * @type Array\n */\n stateProperties: fabric.Object.prototype.stateProperties.concat('rx', 'ry'),\n\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'rect',\n\n /**\n * Horizontal border radius\n * @type Number\n * @default\n */\n rx: 0,\n\n /**\n * Vertical border radius\n * @type Number\n * @default\n */\n ry: 0,\n cacheProperties: fabric.Object.prototype.cacheProperties.concat('rx', 'ry'),\n\n /**\n * Constructor\n * @param {Object} [options] Options object\n * @return {Object} thisArg\n */\n initialize: function initialize(options) {\n this.callSuper('initialize', options);\n\n this._initRxRy();\n },\n\n /**\n * Initializes rx/ry attributes\n * @private\n */\n _initRxRy: function _initRxRy() {\n if (this.rx && !this.ry) {\n this.ry = this.rx;\n } else if (this.ry && !this.rx) {\n this.rx = this.ry;\n }\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render(ctx) {\n // 1x1 case (used in spray brush) optimization was removed because\n // with caching and higher zoom level this makes more damage than help\n var rx = this.rx ? Math.min(this.rx, this.width / 2) : 0,\n ry = this.ry ? Math.min(this.ry, this.height / 2) : 0,\n w = this.width,\n h = this.height,\n x = -this.width / 2,\n y = -this.height / 2,\n isRounded = rx !== 0 || ry !== 0,\n\n /* \"magic number\" for bezier approximations of arcs (http://itc.ktu.lt/itc354/Riskus354.pdf) */\n k = 1 - 0.5522847498;\n ctx.beginPath();\n ctx.moveTo(x + rx, y);\n ctx.lineTo(x + w - rx, y);\n isRounded && ctx.bezierCurveTo(x + w - k * rx, y, x + w, y + k * ry, x + w, y + ry);\n ctx.lineTo(x + w, y + h - ry);\n isRounded && ctx.bezierCurveTo(x + w, y + h - k * ry, x + w - k * rx, y + h, x + w - rx, y + h);\n ctx.lineTo(x + rx, y + h);\n isRounded && ctx.bezierCurveTo(x + k * rx, y + h, x, y + h - k * ry, x, y + h - ry);\n ctx.lineTo(x, y + ry);\n isRounded && ctx.bezierCurveTo(x, y + k * ry, x + k * rx, y, x + rx, y);\n ctx.closePath();\n\n this._renderPaintInOrder(ctx);\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderDashedStroke: function _renderDashedStroke(ctx) {\n var x = -this.width / 2,\n y = -this.height / 2,\n w = this.width,\n h = this.height;\n ctx.beginPath();\n fabric.util.drawDashedLine(ctx, x, y, x + w, y, this.strokeDashArray);\n fabric.util.drawDashedLine(ctx, x + w, y, x + w, y + h, this.strokeDashArray);\n fabric.util.drawDashedLine(ctx, x + w, y + h, x, y + h, this.strokeDashArray);\n fabric.util.drawDashedLine(ctx, x, y + h, x, y, this.strokeDashArray);\n ctx.closePath();\n },\n\n /**\n * Returns object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n return this.callSuper('toObject', ['rx', 'ry'].concat(propertiesToInclude));\n }\n });\n /**\n * Returns {@link fabric.Rect} instance from an object representation\n * @static\n * @memberOf fabric.Rect\n * @param {Object} object Object to create an instance from\n * @param {Function} [callback] Callback to invoke when an fabric.Rect instance is created\n */\n\n fabric.Rect.fromObject = function (object, callback) {\n return fabric.Object._fromObject('Rect', object, callback);\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n extend = fabric.util.object.extend,\n min = fabric.util.array.min,\n max = fabric.util.array.max,\n toFixed = fabric.util.toFixed;\n\n if (fabric.Polyline) {\n fabric.warn('fabric.Polyline is already defined');\n return;\n }\n /**\n * Polyline class\n * @class fabric.Polyline\n * @extends fabric.Object\n * @see {@link fabric.Polyline#initialize} for constructor definition\n */\n\n\n fabric.Polyline = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Polyline.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'polyline',\n\n /**\n * Points array\n * @type Array\n * @default\n */\n points: null,\n cacheProperties: fabric.Object.prototype.cacheProperties.concat('points'),\n\n /**\n * Constructor\n * @param {Array} points Array of points (where each point is an object with x and y)\n * @param {Object} [options] Options object\n * @return {fabric.Polyline} thisArg\n * @example\n * var poly = new fabric.Polyline([\n * { x: 10, y: 10 },\n * { x: 50, y: 30 },\n * { x: 40, y: 70 },\n * { x: 60, y: 50 },\n * { x: 100, y: 150 },\n * { x: 40, y: 100 }\n * ], {\n * stroke: 'red',\n * left: 100,\n * top: 100\n * });\n */\n initialize: function initialize(points, options) {\n options = options || {};\n this.points = points || [];\n this.callSuper('initialize', options);\n\n this._setPositionDimensions(options);\n },\n _setPositionDimensions: function _setPositionDimensions(options) {\n var calcDim = this._calcDimensions(options),\n correctLeftTop;\n\n this.width = calcDim.width;\n this.height = calcDim.height;\n\n if (!options.fromSVG) {\n correctLeftTop = this.translateToGivenOrigin({\n x: calcDim.left - this.strokeWidth / 2,\n y: calcDim.top - this.strokeWidth / 2\n }, 'left', 'top', this.originX, this.originY);\n }\n\n if (typeof options.left === 'undefined') {\n this.left = options.fromSVG ? calcDim.left : correctLeftTop.x;\n }\n\n if (typeof options.top === 'undefined') {\n this.top = options.fromSVG ? calcDim.top : correctLeftTop.y;\n }\n\n this.pathOffset = {\n x: calcDim.left + this.width / 2,\n y: calcDim.top + this.height / 2\n };\n },\n\n /**\n * Calculate the polygon min and max point from points array,\n * returning an object with left, top, widht, height to measure the\n * polygon size\n * @return {Object} object.left X coordinate of the polygon leftmost point\n * @return {Object} object.top Y coordinate of the polygon topmost point\n * @return {Object} object.width distance between X coordinates of the polygon leftmost and rightmost point\n * @return {Object} object.height distance between Y coordinates of the polygon topmost and bottommost point\n * @private\n */\n _calcDimensions: function _calcDimensions() {\n var points = this.points,\n minX = min(points, 'x') || 0,\n minY = min(points, 'y') || 0,\n maxX = max(points, 'x') || 0,\n maxY = max(points, 'y') || 0,\n width = maxX - minX,\n height = maxY - minY;\n return {\n left: minX,\n top: minY,\n width: width,\n height: height\n };\n },\n\n /**\n * Returns object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} Object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n return extend(this.callSuper('toObject', propertiesToInclude), {\n points: this.points.concat()\n });\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n commonRender: function commonRender(ctx) {\n var point,\n len = this.points.length,\n x = this.pathOffset.x,\n y = this.pathOffset.y;\n\n if (!len || isNaN(this.points[len - 1].y)) {\n // do not draw if no points or odd points\n // NaN comes from parseFloat of a empty string in parser\n return false;\n }\n\n ctx.beginPath();\n ctx.moveTo(this.points[0].x - x, this.points[0].y - y);\n\n for (var i = 0; i < len; i++) {\n point = this.points[i];\n ctx.lineTo(point.x - x, point.y - y);\n }\n\n return true;\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render(ctx) {\n if (!this.commonRender(ctx)) {\n return;\n }\n\n this._renderPaintInOrder(ctx);\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderDashedStroke: function _renderDashedStroke(ctx) {\n var p1, p2;\n ctx.beginPath();\n\n for (var i = 0, len = this.points.length; i < len; i++) {\n p1 = this.points[i];\n p2 = this.points[i + 1] || p1;\n fabric.util.drawDashedLine(ctx, p1.x, p1.y, p2.x, p2.y, this.strokeDashArray);\n }\n },\n\n /**\n * Returns complexity of an instance\n * @return {Number} complexity of this instance\n */\n complexity: function complexity() {\n return this.get('points').length;\n }\n });\n /**\n * Returns fabric.Polyline instance from an object representation\n * @static\n * @memberOf fabric.Polyline\n * @param {Object} object Object to create an instance from\n * @param {Function} [callback] Callback to invoke when an fabric.Path instance is created\n */\n\n fabric.Polyline.fromObject = function (object, callback) {\n return fabric.Object._fromObject('Polyline', object, callback, 'points');\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {});\n\n if (fabric.Polygon) {\n fabric.warn('fabric.Polygon is already defined');\n return;\n }\n /**\n * Polygon class\n * @class fabric.Polygon\n * @extends fabric.Polyline\n * @see {@link fabric.Polygon#initialize} for constructor definition\n */\n\n\n fabric.Polygon = fabric.util.createClass(fabric.Polyline,\n /** @lends fabric.Polygon.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'polygon',\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render(ctx) {\n if (!this.commonRender(ctx)) {\n return;\n }\n\n ctx.closePath();\n\n this._renderPaintInOrder(ctx);\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderDashedStroke: function _renderDashedStroke(ctx) {\n this.callSuper('_renderDashedStroke', ctx);\n ctx.closePath();\n }\n });\n /**\n * Returns fabric.Polygon instance from an object representation\n * @static\n * @memberOf fabric.Polygon\n * @param {Object} object Object to create an instance from\n * @param {Function} [callback] Callback to invoke when an fabric.Path instance is created\n */\n\n fabric.Polygon.fromObject = function (object, callback) {\n return fabric.Object._fromObject('Polygon', object, callback, 'points');\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n min = fabric.util.array.min,\n max = fabric.util.array.max,\n extend = fabric.util.object.extend,\n _toString = Object.prototype.toString,\n drawArc = fabric.util.drawArc,\n toFixed = fabric.util.toFixed,\n commandLengths = {\n m: 2,\n l: 2,\n h: 1,\n v: 1,\n c: 6,\n s: 4,\n q: 4,\n t: 2,\n a: 7\n },\n repeatedCommands = {\n m: 'l',\n M: 'L'\n };\n\n if (fabric.Path) {\n fabric.warn('fabric.Path is already defined');\n return;\n }\n /**\n * Path class\n * @class fabric.Path\n * @extends fabric.Object\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-1#path_and_pathgroup}\n * @see {@link fabric.Path#initialize} for constructor definition\n */\n\n\n fabric.Path = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Path.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'path',\n\n /**\n * Array of path points\n * @type Array\n * @default\n */\n path: null,\n cacheProperties: fabric.Object.prototype.cacheProperties.concat('path', 'fillRule'),\n stateProperties: fabric.Object.prototype.stateProperties.concat('path'),\n\n /**\n * Constructor\n * @param {Array|String} path Path data (sequence of coordinates and corresponding \"command\" tokens)\n * @param {Object} [options] Options object\n * @return {fabric.Path} thisArg\n */\n initialize: function initialize(path, options) {\n options = options || {};\n this.callSuper('initialize', options);\n\n if (!path) {\n path = [];\n }\n\n var fromArray = _toString.call(path) === '[object Array]';\n this.path = fromArray ? path // one of commands (m,M,l,L,q,Q,c,C,etc.) followed by non-command characters (i.e. command values)\n : path.match && path.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);\n\n if (!this.path) {\n return;\n }\n\n if (!fromArray) {\n this.path = this._parsePath();\n }\n\n fabric.Polyline.prototype._setPositionDimensions.call(this, options);\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx context to render path on\n */\n _renderPathCommands: function _renderPathCommands(ctx) {\n var current,\n // current instruction\n previous = null,\n subpathStartX = 0,\n subpathStartY = 0,\n x = 0,\n // current x\n y = 0,\n // current y\n controlX = 0,\n // current control point x\n controlY = 0,\n // current control point y\n tempX,\n tempY,\n l = -this.pathOffset.x,\n t = -this.pathOffset.y;\n ctx.beginPath();\n\n for (var i = 0, len = this.path.length; i < len; ++i) {\n current = this.path[i];\n\n switch (current[0]) {\n // first letter\n case 'l':\n // lineto, relative\n x += current[1];\n y += current[2];\n ctx.lineTo(x + l, y + t);\n break;\n\n case 'L':\n // lineto, absolute\n x = current[1];\n y = current[2];\n ctx.lineTo(x + l, y + t);\n break;\n\n case 'h':\n // horizontal lineto, relative\n x += current[1];\n ctx.lineTo(x + l, y + t);\n break;\n\n case 'H':\n // horizontal lineto, absolute\n x = current[1];\n ctx.lineTo(x + l, y + t);\n break;\n\n case 'v':\n // vertical lineto, relative\n y += current[1];\n ctx.lineTo(x + l, y + t);\n break;\n\n case 'V':\n // verical lineto, absolute\n y = current[1];\n ctx.lineTo(x + l, y + t);\n break;\n\n case 'm':\n // moveTo, relative\n x += current[1];\n y += current[2];\n subpathStartX = x;\n subpathStartY = y;\n ctx.moveTo(x + l, y + t);\n break;\n\n case 'M':\n // moveTo, absolute\n x = current[1];\n y = current[2];\n subpathStartX = x;\n subpathStartY = y;\n ctx.moveTo(x + l, y + t);\n break;\n\n case 'c':\n // bezierCurveTo, relative\n tempX = x + current[5];\n tempY = y + current[6];\n controlX = x + current[3];\n controlY = y + current[4];\n ctx.bezierCurveTo(x + current[1] + l, // x1\n y + current[2] + t, // y1\n controlX + l, // x2\n controlY + t, // y2\n tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'C':\n // bezierCurveTo, absolute\n x = current[5];\n y = current[6];\n controlX = current[3];\n controlY = current[4];\n ctx.bezierCurveTo(current[1] + l, current[2] + t, controlX + l, controlY + t, x + l, y + t);\n break;\n\n case 's':\n // shorthand cubic bezierCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[3];\n tempY = y + current[4];\n\n if (previous[0].match(/[CcSs]/) === null) {\n // If there is no previous command or if the previous command was not a C, c, S, or s,\n // the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else {\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n ctx.bezierCurveTo(controlX + l, controlY + t, x + current[1] + l, y + current[2] + t, tempX + l, tempY + t); // set control point to 2nd one of this command\n // \"... the first control point is assumed to be\n // the reflection of the second control point on\n // the previous command relative to the current point.\"\n\n controlX = x + current[1];\n controlY = y + current[2];\n x = tempX;\n y = tempY;\n break;\n\n case 'S':\n // shorthand cubic bezierCurveTo, absolute\n tempX = current[3];\n tempY = current[4];\n\n if (previous[0].match(/[CcSs]/) === null) {\n // If there is no previous command or if the previous command was not a C, c, S, or s,\n // the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else {\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n ctx.bezierCurveTo(controlX + l, controlY + t, current[1] + l, current[2] + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY; // set control point to 2nd one of this command\n // \"... the first control point is assumed to be\n // the reflection of the second control point on\n // the previous command relative to the current point.\"\n\n controlX = current[1];\n controlY = current[2];\n break;\n\n case 'q':\n // quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[3];\n tempY = y + current[4];\n controlX = x + current[1];\n controlY = y + current[2];\n ctx.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'Q':\n // quadraticCurveTo, absolute\n tempX = current[3];\n tempY = current[4];\n ctx.quadraticCurveTo(current[1] + l, current[2] + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n controlX = current[1];\n controlY = current[2];\n break;\n\n case 't':\n // shorthand quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[1];\n tempY = y + current[2];\n\n if (previous[0].match(/[QqTt]/) === null) {\n // If there is no previous command or if the previous command was not a Q, q, T or t,\n // assume the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else {\n // calculate reflection of previous control point\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n ctx.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'T':\n tempX = current[1];\n tempY = current[2];\n\n if (previous[0].match(/[QqTt]/) === null) {\n // If there is no previous command or if the previous command was not a Q, q, T or t,\n // assume the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else {\n // calculate reflection of previous control point\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n ctx.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'a':\n // TODO: optimize this\n drawArc(ctx, x + l, y + t, [current[1], current[2], current[3], current[4], current[5], current[6] + x + l, current[7] + y + t]);\n x += current[6];\n y += current[7];\n break;\n\n case 'A':\n // TODO: optimize this\n drawArc(ctx, x + l, y + t, [current[1], current[2], current[3], current[4], current[5], current[6] + l, current[7] + t]);\n x = current[6];\n y = current[7];\n break;\n\n case 'z':\n case 'Z':\n x = subpathStartX;\n y = subpathStartY;\n ctx.closePath();\n break;\n }\n\n previous = current;\n }\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx context to render path on\n */\n _render: function _render(ctx) {\n this._renderPathCommands(ctx);\n\n this._renderPaintInOrder(ctx);\n },\n\n /**\n * Returns string representation of an instance\n * @return {String} string representation of an instance\n */\n toString: function toString() {\n return '#<fabric.Path (' + this.complexity() + '): { \"top\": ' + this.top + ', \"left\": ' + this.left + ' }>';\n },\n\n /**\n * Returns object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n return extend(this.callSuper('toObject', propertiesToInclude), {\n path: this.path.map(function (item) {\n return item.slice();\n })\n });\n },\n\n /**\n * Returns dataless object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toDatalessObject: function toDatalessObject(propertiesToInclude) {\n var o = this.toObject(['sourcePath'].concat(propertiesToInclude));\n\n if (o.sourcePath) {\n delete o.path;\n }\n\n return o;\n },\n\n /**\n * Returns number representation of an instance complexity\n * @return {Number} complexity of this instance\n */\n complexity: function complexity() {\n return this.path.length;\n },\n\n /**\n * @private\n */\n _parsePath: function _parsePath() {\n var result = [],\n coords = [],\n currentPath,\n parsed,\n re = fabric.rePathCommand,\n match,\n coordsStr;\n\n for (var i = 0, coordsParsed, len = this.path.length; i < len; i++) {\n currentPath = this.path[i];\n coordsStr = currentPath.slice(1).trim();\n coords.length = 0;\n\n while (match = re.exec(coordsStr)) {\n coords.push(match[0]);\n }\n\n coordsParsed = [currentPath.charAt(0)];\n\n for (var j = 0, jlen = coords.length; j < jlen; j++) {\n parsed = parseFloat(coords[j]);\n\n if (!isNaN(parsed)) {\n coordsParsed.push(parsed);\n }\n }\n\n var command = coordsParsed[0],\n commandLength = commandLengths[command.toLowerCase()],\n repeatedCommand = repeatedCommands[command] || command;\n\n if (coordsParsed.length - 1 > commandLength) {\n for (var k = 1, klen = coordsParsed.length; k < klen; k += commandLength) {\n result.push([command].concat(coordsParsed.slice(k, k + commandLength)));\n command = repeatedCommand;\n }\n } else {\n result.push(coordsParsed);\n }\n }\n\n return result;\n },\n\n /**\n * @private\n */\n _calcDimensions: function _calcDimensions() {\n var aX = [],\n aY = [],\n current,\n // current instruction\n previous = null,\n subpathStartX = 0,\n subpathStartY = 0,\n x = 0,\n // current x\n y = 0,\n // current y\n controlX = 0,\n // current control point x\n controlY = 0,\n // current control point y\n tempX,\n tempY,\n bounds;\n\n for (var i = 0, len = this.path.length; i < len; ++i) {\n current = this.path[i];\n\n switch (current[0]) {\n // first letter\n case 'l':\n // lineto, relative\n x += current[1];\n y += current[2];\n bounds = [];\n break;\n\n case 'L':\n // lineto, absolute\n x = current[1];\n y = current[2];\n bounds = [];\n break;\n\n case 'h':\n // horizontal lineto, relative\n x += current[1];\n bounds = [];\n break;\n\n case 'H':\n // horizontal lineto, absolute\n x = current[1];\n bounds = [];\n break;\n\n case 'v':\n // vertical lineto, relative\n y += current[1];\n bounds = [];\n break;\n\n case 'V':\n // verical lineto, absolute\n y = current[1];\n bounds = [];\n break;\n\n case 'm':\n // moveTo, relative\n x += current[1];\n y += current[2];\n subpathStartX = x;\n subpathStartY = y;\n bounds = [];\n break;\n\n case 'M':\n // moveTo, absolute\n x = current[1];\n y = current[2];\n subpathStartX = x;\n subpathStartY = y;\n bounds = [];\n break;\n\n case 'c':\n // bezierCurveTo, relative\n tempX = x + current[5];\n tempY = y + current[6];\n controlX = x + current[3];\n controlY = y + current[4];\n bounds = fabric.util.getBoundsOfCurve(x, y, x + current[1], // x1\n y + current[2], // y1\n controlX, // x2\n controlY, // y2\n tempX, tempY);\n x = tempX;\n y = tempY;\n break;\n\n case 'C':\n // bezierCurveTo, absolute\n controlX = current[3];\n controlY = current[4];\n bounds = fabric.util.getBoundsOfCurve(x, y, current[1], current[2], controlX, controlY, current[5], current[6]);\n x = current[5];\n y = current[6];\n break;\n\n case 's':\n // shorthand cubic bezierCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[3];\n tempY = y + current[4];\n\n if (previous[0].match(/[CcSs]/) === null) {\n // If there is no previous command or if the previous command was not a C, c, S, or s,\n // the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else {\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n bounds = fabric.util.getBoundsOfCurve(x, y, controlX, controlY, x + current[1], y + current[2], tempX, tempY); // set control point to 2nd one of this command\n // \"... the first control point is assumed to be\n // the reflection of the second control point on\n // the previous command relative to the current point.\"\n\n controlX = x + current[1];\n controlY = y + current[2];\n x = tempX;\n y = tempY;\n break;\n\n case 'S':\n // shorthand cubic bezierCurveTo, absolute\n tempX = current[3];\n tempY = current[4];\n\n if (previous[0].match(/[CcSs]/) === null) {\n // If there is no previous command or if the previous command was not a C, c, S, or s,\n // the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else {\n // calculate reflection of previous control points\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n bounds = fabric.util.getBoundsOfCurve(x, y, controlX, controlY, current[1], current[2], tempX, tempY);\n x = tempX;\n y = tempY; // set control point to 2nd one of this command\n // \"... the first control point is assumed to be\n // the reflection of the second control point on\n // the previous command relative to the current point.\"\n\n controlX = current[1];\n controlY = current[2];\n break;\n\n case 'q':\n // quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[3];\n tempY = y + current[4];\n controlX = x + current[1];\n controlY = y + current[2];\n bounds = fabric.util.getBoundsOfCurve(x, y, controlX, controlY, controlX, controlY, tempX, tempY);\n x = tempX;\n y = tempY;\n break;\n\n case 'Q':\n // quadraticCurveTo, absolute\n controlX = current[1];\n controlY = current[2];\n bounds = fabric.util.getBoundsOfCurve(x, y, controlX, controlY, controlX, controlY, current[3], current[4]);\n x = current[3];\n y = current[4];\n break;\n\n case 't':\n // shorthand quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[1];\n tempY = y + current[2];\n\n if (previous[0].match(/[QqTt]/) === null) {\n // If there is no previous command or if the previous command was not a Q, q, T or t,\n // assume the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else {\n // calculate reflection of previous control point\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n bounds = fabric.util.getBoundsOfCurve(x, y, controlX, controlY, controlX, controlY, tempX, tempY);\n x = tempX;\n y = tempY;\n break;\n\n case 'T':\n tempX = current[1];\n tempY = current[2];\n\n if (previous[0].match(/[QqTt]/) === null) {\n // If there is no previous command or if the previous command was not a Q, q, T or t,\n // assume the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else {\n // calculate reflection of previous control point\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n bounds = fabric.util.getBoundsOfCurve(x, y, controlX, controlY, controlX, controlY, tempX, tempY);\n x = tempX;\n y = tempY;\n break;\n\n case 'a':\n // TODO: optimize this\n bounds = fabric.util.getBoundsOfArc(x, y, current[1], current[2], current[3], current[4], current[5], current[6] + x, current[7] + y);\n x += current[6];\n y += current[7];\n break;\n\n case 'A':\n // TODO: optimize this\n bounds = fabric.util.getBoundsOfArc(x, y, current[1], current[2], current[3], current[4], current[5], current[6], current[7]);\n x = current[6];\n y = current[7];\n break;\n\n case 'z':\n case 'Z':\n x = subpathStartX;\n y = subpathStartY;\n break;\n }\n\n previous = current;\n bounds.forEach(function (point) {\n aX.push(point.x);\n aY.push(point.y);\n });\n aX.push(x);\n aY.push(y);\n }\n\n var minX = min(aX) || 0,\n minY = min(aY) || 0,\n maxX = max(aX) || 0,\n maxY = max(aY) || 0,\n deltaX = maxX - minX,\n deltaY = maxY - minY;\n return {\n left: minX,\n top: minY,\n width: deltaX,\n height: deltaY\n };\n }\n });\n /**\n * Creates an instance of fabric.Path from an object\n * @static\n * @memberOf fabric.Path\n * @param {Object} object\n * @param {Function} [callback] Callback to invoke when an fabric.Path instance is created\n */\n\n fabric.Path.fromObject = function (object, callback) {\n if (typeof object.sourcePath === 'string') {\n var pathUrl = object.sourcePath;\n fabric.loadSVGFromURL(pathUrl, function (elements) {\n var path = elements[0];\n path.setOptions(object);\n callback && callback(path);\n });\n } else {\n fabric.Object._fromObject('Path', object, callback, 'path');\n }\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n min = fabric.util.array.min,\n max = fabric.util.array.max;\n\n if (fabric.Group) {\n return;\n }\n /**\n * Group class\n * @class fabric.Group\n * @extends fabric.Object\n * @mixes fabric.Collection\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-3#groups}\n * @see {@link fabric.Group#initialize} for constructor definition\n */\n\n\n fabric.Group = fabric.util.createClass(fabric.Object, fabric.Collection,\n /** @lends fabric.Group.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'group',\n\n /**\n * Width of stroke\n * @type Number\n * @default\n */\n strokeWidth: 0,\n\n /**\n * Indicates if click, mouseover, mouseout events & hoverCursor should also check for subtargets\n * @type Boolean\n * @default\n */\n subTargetCheck: false,\n\n /**\n * Groups are container, do not render anything on theyr own, ence no cache properties\n * @type Array\n * @default\n */\n cacheProperties: [],\n\n /**\n * setOnGroup is a method used for TextBox that is no more used since 2.0.0 The behavior is still\n * available setting this boolean to true.\n * @type Boolean\n * @since 2.0.0\n * @default\n */\n useSetOnGroup: false,\n\n /**\n * Constructor\n * @param {Object} objects Group objects\n * @param {Object} [options] Options object\n * @param {Boolean} [isAlreadyGrouped] if true, objects have been grouped already.\n * @return {Object} thisArg\n */\n initialize: function initialize(objects, options, isAlreadyGrouped) {\n options = options || {};\n this._objects = []; // if objects enclosed in a group have been grouped already,\n // we cannot change properties of objects.\n // Thus we need to set options to group without objects,\n\n isAlreadyGrouped && this.callSuper('initialize', options);\n this._objects = objects || [];\n\n for (var i = this._objects.length; i--;) {\n this._objects[i].group = this;\n }\n\n if (!isAlreadyGrouped) {\n var center = options && options.centerPoint; // we want to set origins before calculating the bounding box.\n // so that the topleft can be set with that in mind.\n // if specific top and left are passed, are overwritten later\n // with the callSuper('initialize', options)\n\n if (options.originX !== undefined) {\n this.originX = options.originX;\n }\n\n if (options.originY !== undefined) {\n this.originY = options.originY;\n } // if coming from svg i do not want to calc bounds.\n // i assume width and height are passed along options\n\n\n center || this._calcBounds();\n\n this._updateObjectsCoords(center);\n\n delete options.centerPoint;\n this.callSuper('initialize', options);\n } else {\n this._updateObjectsACoords();\n }\n\n this.setCoords();\n },\n\n /**\n * @private\n * @param {Boolean} [skipCoordsChange] if true, coordinates of objects enclosed in a group do not change\n */\n _updateObjectsACoords: function _updateObjectsACoords() {\n var ignoreZoom = true,\n skipAbsolute = true;\n\n for (var i = this._objects.length; i--;) {\n this._objects[i].setCoords(ignoreZoom, skipAbsolute);\n }\n },\n\n /**\n * @private\n * @param {Boolean} [skipCoordsChange] if true, coordinates of objects enclosed in a group do not change\n */\n _updateObjectsCoords: function _updateObjectsCoords(center) {\n var center = center || this.getCenterPoint();\n\n for (var i = this._objects.length; i--;) {\n this._updateObjectCoords(this._objects[i], center);\n }\n },\n\n /**\n * @private\n * @param {Object} object\n * @param {fabric.Point} center, current center of group.\n */\n _updateObjectCoords: function _updateObjectCoords(object, center) {\n var objectLeft = object.left,\n objectTop = object.top,\n ignoreZoom = true,\n skipAbsolute = true;\n object.set({\n left: objectLeft - center.x,\n top: objectTop - center.y\n });\n object.group = this;\n object.setCoords(ignoreZoom, skipAbsolute);\n },\n\n /**\n * Returns string represenation of a group\n * @return {String}\n */\n toString: function toString() {\n return '#<fabric.Group: (' + this.complexity() + ')>';\n },\n\n /**\n * Adds an object to a group; Then recalculates group's dimension, position.\n * @param {Object} object\n * @return {fabric.Group} thisArg\n * @chainable\n */\n addWithUpdate: function addWithUpdate(object) {\n this._restoreObjectsState();\n\n fabric.util.resetObjectTransform(this);\n\n if (object) {\n this._objects.push(object);\n\n object.group = this;\n\n object._set('canvas', this.canvas);\n }\n\n this._calcBounds();\n\n this._updateObjectsCoords();\n\n this.setCoords();\n this.dirty = true;\n return this;\n },\n\n /**\n * Removes an object from a group; Then recalculates group's dimension, position.\n * @param {Object} object\n * @return {fabric.Group} thisArg\n * @chainable\n */\n removeWithUpdate: function removeWithUpdate(object) {\n this._restoreObjectsState();\n\n fabric.util.resetObjectTransform(this);\n this.remove(object);\n\n this._calcBounds();\n\n this._updateObjectsCoords();\n\n this.setCoords();\n this.dirty = true;\n return this;\n },\n\n /**\n * @private\n */\n _onObjectAdded: function _onObjectAdded(object) {\n this.dirty = true;\n object.group = this;\n\n object._set('canvas', this.canvas);\n },\n\n /**\n * @private\n */\n _onObjectRemoved: function _onObjectRemoved(object) {\n this.dirty = true;\n delete object.group;\n },\n\n /**\n * @private\n */\n _set: function _set(key, value) {\n var i = this._objects.length;\n\n if (this.useSetOnGroup) {\n while (i--) {\n this._objects[i].setOnGroup(key, value);\n }\n }\n\n if (key === 'canvas') {\n while (i--) {\n this._objects[i]._set(key, value);\n }\n }\n\n fabric.Object.prototype._set.call(this, key, value);\n },\n\n /**\n * Returns object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n var _includeDefaultValues = this.includeDefaultValues;\n\n var objsToObject = this._objects.map(function (obj) {\n var originalDefaults = obj.includeDefaultValues;\n obj.includeDefaultValues = _includeDefaultValues;\n\n var _obj = obj.toObject(propertiesToInclude);\n\n obj.includeDefaultValues = originalDefaults;\n return _obj;\n });\n\n var obj = fabric.Object.prototype.toObject.call(this, propertiesToInclude);\n obj.objects = objsToObject;\n return obj;\n },\n\n /**\n * Returns object representation of an instance, in dataless mode.\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toDatalessObject: function toDatalessObject(propertiesToInclude) {\n var objsToObject,\n sourcePath = this.sourcePath;\n\n if (sourcePath) {\n objsToObject = sourcePath;\n } else {\n var _includeDefaultValues = this.includeDefaultValues;\n objsToObject = this._objects.map(function (obj) {\n var originalDefaults = obj.includeDefaultValues;\n obj.includeDefaultValues = _includeDefaultValues;\n\n var _obj = obj.toDatalessObject(propertiesToInclude);\n\n obj.includeDefaultValues = originalDefaults;\n return _obj;\n });\n }\n\n var obj = fabric.Object.prototype.toDatalessObject.call(this, propertiesToInclude);\n obj.objects = objsToObject;\n return obj;\n },\n\n /**\n * Renders instance on a given context\n * @param {CanvasRenderingContext2D} ctx context to render instance on\n */\n render: function render(ctx) {\n this._transformDone = true;\n this.callSuper('render', ctx);\n this._transformDone = false;\n },\n\n /**\n * Decide if the object should cache or not. Create its own cache level\n * needsItsOwnCache should be used when the object drawing method requires\n * a cache step. None of the fabric classes requires it.\n * Generally you do not cache objects in groups because the group is already cached.\n * @return {Boolean}\n */\n shouldCache: function shouldCache() {\n var ownCache = fabric.Object.prototype.shouldCache.call(this);\n\n if (ownCache) {\n for (var i = 0, len = this._objects.length; i < len; i++) {\n if (this._objects[i].willDrawShadow()) {\n this.ownCaching = false;\n return false;\n }\n }\n }\n\n return ownCache;\n },\n\n /**\n * Check if this object or a child object will cast a shadow\n * @return {Boolean}\n */\n willDrawShadow: function willDrawShadow() {\n if (fabric.Object.prototype.willDrawShadow.call(this)) {\n return true;\n }\n\n for (var i = 0, len = this._objects.length; i < len; i++) {\n if (this._objects[i].willDrawShadow()) {\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Check if this group or its parent group are caching, recursively up\n * @return {Boolean}\n */\n isOnACache: function isOnACache() {\n return this.ownCaching || this.group && this.group.isOnACache();\n },\n\n /**\n * Execute the drawing operation for an object on a specified context\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n drawObject: function drawObject(ctx) {\n for (var i = 0, len = this._objects.length; i < len; i++) {\n this._objects[i].render(ctx);\n }\n\n this._drawClipPath(ctx);\n },\n\n /**\n * Check if cache is dirty\n */\n isCacheDirty: function isCacheDirty(skipCanvas) {\n if (this.callSuper('isCacheDirty', skipCanvas)) {\n return true;\n }\n\n if (!this.statefullCache) {\n return false;\n }\n\n for (var i = 0, len = this._objects.length; i < len; i++) {\n if (this._objects[i].isCacheDirty(true)) {\n if (this._cacheCanvas) {\n // if this group has not a cache canvas there is nothing to clean\n var x = this.cacheWidth / this.zoomX,\n y = this.cacheHeight / this.zoomY;\n\n this._cacheContext.clearRect(-x / 2, -y / 2, x, y);\n }\n\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * Retores original state of each of group objects (original state is that which was before group was created).\n * @private\n * @return {fabric.Group} thisArg\n * @chainable\n */\n _restoreObjectsState: function _restoreObjectsState() {\n this._objects.forEach(this._restoreObjectState, this);\n\n return this;\n },\n\n /**\n * Realises the transform from this group onto the supplied object\n * i.e. it tells you what would happen if the supplied object was in\n * the group, and then the group was destroyed. It mutates the supplied\n * object.\n * @param {fabric.Object} object\n * @return {fabric.Object} transformedObject\n */\n realizeTransform: function realizeTransform(object) {\n var matrix = object.calcTransformMatrix(),\n options = fabric.util.qrDecompose(matrix),\n center = new fabric.Point(options.translateX, options.translateY);\n object.flipX = false;\n object.flipY = false;\n object.set('scaleX', options.scaleX);\n object.set('scaleY', options.scaleY);\n object.skewX = options.skewX;\n object.skewY = options.skewY;\n object.angle = options.angle;\n object.setPositionByOrigin(center, 'center', 'center');\n return object;\n },\n\n /**\n * Restores original state of a specified object in group\n * @private\n * @param {fabric.Object} object\n * @return {fabric.Group} thisArg\n */\n _restoreObjectState: function _restoreObjectState(object) {\n this.realizeTransform(object);\n object.setCoords();\n delete object.group;\n return this;\n },\n\n /**\n * Destroys a group (restoring state of its objects)\n * @return {fabric.Group} thisArg\n * @chainable\n */\n destroy: function destroy() {\n // when group is destroyed objects needs to get a repaint to be eventually\n // displayed on canvas.\n this._objects.forEach(function (object) {\n object.set('dirty', true);\n });\n\n return this._restoreObjectsState();\n },\n\n /**\n * make a group an active selection, remove the group from canvas\n * the group has to be on canvas for this to work.\n * @return {fabric.ActiveSelection} thisArg\n * @chainable\n */\n toActiveSelection: function toActiveSelection() {\n if (!this.canvas) {\n return;\n }\n\n var objects = this._objects,\n canvas = this.canvas;\n this._objects = [];\n var options = this.toObject();\n delete options.objects;\n var activeSelection = new fabric.ActiveSelection([]);\n activeSelection.set(options);\n activeSelection.type = 'activeSelection';\n canvas.remove(this);\n objects.forEach(function (object) {\n object.group = activeSelection;\n object.dirty = true;\n canvas.add(object);\n });\n activeSelection.canvas = canvas;\n activeSelection._objects = objects;\n canvas._activeObject = activeSelection;\n activeSelection.setCoords();\n return activeSelection;\n },\n\n /**\n * Destroys a group (restoring state of its objects)\n * @return {fabric.Group} thisArg\n * @chainable\n */\n ungroupOnCanvas: function ungroupOnCanvas() {\n return this._restoreObjectsState();\n },\n\n /**\n * Sets coordinates of all objects inside group\n * @return {fabric.Group} thisArg\n * @chainable\n */\n setObjectsCoords: function setObjectsCoords() {\n var ignoreZoom = true,\n skipAbsolute = true;\n this.forEachObject(function (object) {\n object.setCoords(ignoreZoom, skipAbsolute);\n });\n return this;\n },\n\n /**\n * @private\n */\n _calcBounds: function _calcBounds(onlyWidthHeight) {\n var aX = [],\n aY = [],\n o,\n prop,\n props = ['tr', 'br', 'bl', 'tl'],\n i = 0,\n iLen = this._objects.length,\n j,\n jLen = props.length,\n ignoreZoom = true;\n\n for (; i < iLen; ++i) {\n o = this._objects[i];\n o.setCoords(ignoreZoom);\n\n for (j = 0; j < jLen; j++) {\n prop = props[j];\n aX.push(o.oCoords[prop].x);\n aY.push(o.oCoords[prop].y);\n }\n }\n\n this._getBounds(aX, aY, onlyWidthHeight);\n },\n\n /**\n * @private\n */\n _getBounds: function _getBounds(aX, aY, onlyWidthHeight) {\n var minXY = new fabric.Point(min(aX), min(aY)),\n maxXY = new fabric.Point(max(aX), max(aY)),\n top = minXY.y || 0,\n left = minXY.x || 0,\n width = maxXY.x - minXY.x || 0,\n height = maxXY.y - minXY.y || 0;\n this.width = width;\n this.height = height;\n\n if (!onlyWidthHeight) {\n // the bounding box always finds the topleft most corner.\n // whatever is the group origin, we set up here the left/top position.\n this.setPositionByOrigin({\n x: left,\n y: top\n }, 'left', 'top');\n }\n }\n });\n /**\n * Returns {@link fabric.Group} instance from an object representation\n * @static\n * @memberOf fabric.Group\n * @param {Object} object Object to create a group from\n * @param {Function} [callback] Callback to invoke when an group instance is created\n */\n\n fabric.Group.fromObject = function (object, callback) {\n var objects = object.objects,\n options = fabric.util.object.clone(object, true);\n delete options.objects;\n\n if (typeof objects === 'string') {\n // it has to be an url or something went wrong.\n fabric.loadSVGFromURL(objects, function (elements) {\n var group = fabric.util.groupSVGElements(elements, object, objects);\n group.set(options);\n callback && callback(group);\n });\n return;\n }\n\n fabric.util.enlivenObjects(objects, function (enlivenedObjects) {\n fabric.util.enlivenObjects([object.clipPath], function (enlivedClipPath) {\n var options = fabric.util.object.clone(object, true);\n options.clipPath = enlivedClipPath[0];\n delete options.objects;\n callback && callback(new fabric.Group(enlivenedObjects, options, true));\n });\n });\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {});\n\n if (fabric.ActiveSelection) {\n return;\n }\n /**\n * Group class\n * @class fabric.ActiveSelection\n * @extends fabric.Group\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-3#groups}\n * @see {@link fabric.ActiveSelection#initialize} for constructor definition\n */\n\n\n fabric.ActiveSelection = fabric.util.createClass(fabric.Group,\n /** @lends fabric.ActiveSelection.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'activeSelection',\n\n /**\n * Constructor\n * @param {Object} objects ActiveSelection objects\n * @param {Object} [options] Options object\n * @return {Object} thisArg\n */\n initialize: function initialize(objects, options) {\n options = options || {};\n this._objects = objects || [];\n\n for (var i = this._objects.length; i--;) {\n this._objects[i].group = this;\n }\n\n if (options.originX) {\n this.originX = options.originX;\n }\n\n if (options.originY) {\n this.originY = options.originY;\n }\n\n this._calcBounds();\n\n this._updateObjectsCoords();\n\n fabric.Object.prototype.initialize.call(this, options);\n this.setCoords();\n },\n\n /**\n * Change te activeSelection to a normal group,\n * High level function that automatically adds it to canvas as\n * active object. no events fired.\n * @since 2.0.0\n * @return {fabric.Group}\n */\n toGroup: function toGroup() {\n var objects = this._objects.concat();\n\n this._objects = [];\n var options = fabric.Object.prototype.toObject.call(this);\n var newGroup = new fabric.Group([]);\n delete options.type;\n newGroup.set(options);\n objects.forEach(function (object) {\n object.canvas.remove(object);\n object.group = newGroup;\n });\n newGroup._objects = objects;\n\n if (!this.canvas) {\n return newGroup;\n }\n\n var canvas = this.canvas;\n canvas.add(newGroup);\n canvas._activeObject = newGroup;\n newGroup.setCoords();\n return newGroup;\n },\n\n /**\n * If returns true, deselection is cancelled.\n * @since 2.0.0\n * @return {Boolean} [cancel]\n */\n onDeselect: function onDeselect() {\n this.destroy();\n return false;\n },\n\n /**\n * Returns string representation of a group\n * @return {String}\n */\n toString: function toString() {\n return '#<fabric.ActiveSelection: (' + this.complexity() + ')>';\n },\n\n /**\n * Decide if the object should cache or not. Create its own cache level\n * objectCaching is a global flag, wins over everything\n * needsItsOwnCache should be used when the object drawing method requires\n * a cache step. None of the fabric classes requires it.\n * Generally you do not cache objects in groups because the group outside is cached.\n * @return {Boolean}\n */\n shouldCache: function shouldCache() {\n return false;\n },\n\n /**\n * Check if this group or its parent group are caching, recursively up\n * @return {Boolean}\n */\n isOnACache: function isOnACache() {\n return false;\n },\n\n /**\n * Renders controls and borders for the object\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {Object} [styleOverride] properties to override the object style\n * @param {Object} [childrenOverride] properties to override the children overrides\n */\n _renderControls: function _renderControls(ctx, styleOverride, childrenOverride) {\n ctx.save();\n ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1;\n this.callSuper('_renderControls', ctx, styleOverride);\n childrenOverride = childrenOverride || {};\n\n if (typeof childrenOverride.hasControls === 'undefined') {\n childrenOverride.hasControls = false;\n }\n\n if (typeof childrenOverride.hasRotatingPoint === 'undefined') {\n childrenOverride.hasRotatingPoint = false;\n }\n\n childrenOverride.forActiveSelection = true;\n\n for (var i = 0, len = this._objects.length; i < len; i++) {\n this._objects[i]._renderControls(ctx, childrenOverride);\n }\n\n ctx.restore();\n }\n });\n /**\n * Returns {@link fabric.ActiveSelection} instance from an object representation\n * @static\n * @memberOf fabric.ActiveSelection\n * @param {Object} object Object to create a group from\n * @param {Function} [callback] Callback to invoke when an ActiveSelection instance is created\n */\n\n fabric.ActiveSelection.fromObject = function (object, callback) {\n fabric.util.enlivenObjects(object.objects, function (enlivenedObjects) {\n delete object.objects;\n callback && callback(new fabric.ActiveSelection(enlivenedObjects, object, true));\n });\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function (global) {\n 'use strict';\n\n var extend = fabric.util.object.extend;\n\n if (!global.fabric) {\n global.fabric = {};\n }\n\n if (global.fabric.Image) {\n fabric.warn('fabric.Image is already defined.');\n return;\n }\n /**\n * Image class\n * @class fabric.Image\n * @extends fabric.Object\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-1#images}\n * @see {@link fabric.Image#initialize} for constructor definition\n */\n\n\n fabric.Image = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Image.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'image',\n\n /**\n * crossOrigin value (one of \"\", \"anonymous\", \"use-credentials\")\n * @see https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes\n * @type String\n * @default\n */\n crossOrigin: '',\n\n /**\n * Width of a stroke.\n * For image quality a stroke multiple of 2 gives better results.\n * @type Number\n * @default\n */\n strokeWidth: 0,\n\n /**\n * When calling {@link fabric.Image.getSrc}, return value from element src with `element.getAttribute('src')`.\n * This allows for relative urls as image src.\n * @since 2.7.0\n * @type Boolean\n * @default\n */\n srcFromAttribute: false,\n\n /**\n * private\n * contains last value of scaleX to detect\n * if the Image got resized after the last Render\n * @type Number\n */\n _lastScaleX: 1,\n\n /**\n * private\n * contains last value of scaleY to detect\n * if the Image got resized after the last Render\n * @type Number\n */\n _lastScaleY: 1,\n\n /**\n * private\n * contains last value of scaling applied by the apply filter chain\n * @type Number\n */\n _filterScalingX: 1,\n\n /**\n * private\n * contains last value of scaling applied by the apply filter chain\n * @type Number\n */\n _filterScalingY: 1,\n\n /**\n * minimum scale factor under which any resizeFilter is triggered to resize the image\n * 0 will disable the automatic resize. 1 will trigger automatically always.\n * number bigger than 1 are not implemented yet.\n * @type Number\n */\n minimumScaleTrigger: 0.5,\n\n /**\n * List of properties to consider when checking if\n * state of an object is changed ({@link fabric.Object#hasStateChanged})\n * as well as for history (undo/redo) purposes\n * @type Array\n */\n stateProperties: fabric.Object.prototype.stateProperties.concat('cropX', 'cropY'),\n\n /**\n * key used to retrieve the texture representing this image\n * @since 2.0.0\n * @type String\n * @default\n */\n cacheKey: '',\n\n /**\n * Image crop in pixels from original image size.\n * @since 2.0.0\n * @type Number\n * @default\n */\n cropX: 0,\n\n /**\n * Image crop in pixels from original image size.\n * @since 2.0.0\n * @type Number\n * @default\n */\n cropY: 0,\n\n /**\n * Constructor\n * @param {HTMLImageElement | String} element Image element\n * @param {Object} [options] Options object\n * @param {function} [callback] callback function to call after eventual filters applied.\n * @return {fabric.Image} thisArg\n */\n initialize: function initialize(element, options) {\n options || (options = {});\n this.filters = [];\n this.cacheKey = 'texture' + fabric.Object.__uid++;\n this.callSuper('initialize', options);\n\n this._initElement(element, options);\n },\n\n /**\n * Returns image element which this instance if based on\n * @return {HTMLImageElement} Image element\n */\n getElement: function getElement() {\n return this._element || {};\n },\n\n /**\n * Sets image element for this instance to a specified one.\n * If filters defined they are applied to new image.\n * You might need to call `canvas.renderAll` and `object.setCoords` after replacing, to render new image and update controls area.\n * @param {HTMLImageElement} element\n * @param {Object} [options] Options object\n * @return {fabric.Image} thisArg\n * @chainable\n */\n setElement: function setElement(element, options) {\n this.removeTexture(this.cacheKey);\n this.removeTexture(this.cacheKey + '_filtered');\n this._element = element;\n this._originalElement = element;\n\n this._initConfig(options);\n\n if (this.filters.length !== 0) {\n this.applyFilters();\n } // resizeFilters work on the already filtered copy.\n // we need to apply resizeFilters AFTER normal filters.\n // applyResizeFilters is run more often than normal fiters\n // and is triggered by user interactions rather than dev code\n\n\n if (this.resizeFilter) {\n this.applyResizeFilters();\n }\n\n return this;\n },\n\n /**\n * Delete a single texture if in webgl mode\n */\n removeTexture: function removeTexture(key) {\n var backend = fabric.filterBackend;\n\n if (backend && backend.evictCachesForKey) {\n backend.evictCachesForKey(key);\n }\n },\n\n /**\n * Delete textures, reference to elements and eventually JSDOM cleanup\n */\n dispose: function dispose() {\n this.removeTexture(this.cacheKey);\n this.removeTexture(this.cacheKey + '_filtered');\n this._cacheContext = undefined;\n ['_originalElement', '_element', '_filteredEl', '_cacheCanvas'].forEach(function (element) {\n fabric.util.cleanUpJsdomNode(this[element]);\n this[element] = undefined;\n }.bind(this));\n },\n\n /**\n * Sets crossOrigin value (on an instance and corresponding image element)\n * @return {fabric.Image} thisArg\n * @chainable\n */\n setCrossOrigin: function setCrossOrigin(value) {\n this.crossOrigin = value;\n this._element.crossOrigin = value;\n return this;\n },\n\n /**\n * Returns original size of an image\n * @return {Object} Object with \"width\" and \"height\" properties\n */\n getOriginalSize: function getOriginalSize() {\n var element = this.getElement();\n return {\n width: element.naturalWidth || element.width,\n height: element.naturalHeight || element.height\n };\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _stroke: function _stroke(ctx) {\n if (!this.stroke || this.strokeWidth === 0) {\n return;\n }\n\n var w = this.width / 2,\n h = this.height / 2;\n ctx.beginPath();\n ctx.moveTo(-w, -h);\n ctx.lineTo(w, -h);\n ctx.lineTo(w, h);\n ctx.lineTo(-w, h);\n ctx.lineTo(-w, -h);\n ctx.closePath();\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderDashedStroke: function _renderDashedStroke(ctx) {\n var x = -this.width / 2,\n y = -this.height / 2,\n w = this.width,\n h = this.height;\n ctx.save();\n\n this._setStrokeStyles(ctx, this);\n\n ctx.beginPath();\n fabric.util.drawDashedLine(ctx, x, y, x + w, y, this.strokeDashArray);\n fabric.util.drawDashedLine(ctx, x + w, y, x + w, y + h, this.strokeDashArray);\n fabric.util.drawDashedLine(ctx, x + w, y + h, x, y + h, this.strokeDashArray);\n fabric.util.drawDashedLine(ctx, x, y + h, x, y, this.strokeDashArray);\n ctx.closePath();\n ctx.restore();\n },\n\n /**\n * Returns object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} Object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n var filters = [];\n this.filters.forEach(function (filterObj) {\n if (filterObj) {\n filters.push(filterObj.toObject());\n }\n });\n var object = extend(this.callSuper('toObject', ['crossOrigin', 'cropX', 'cropY'].concat(propertiesToInclude)), {\n src: this.getSrc(),\n filters: filters\n });\n\n if (this.resizeFilter) {\n object.resizeFilter = this.resizeFilter.toObject();\n }\n\n return object;\n },\n\n /**\n * Returns true if an image has crop applied, inspecting values of cropX,cropY,width,hight.\n * @return {Boolean}\n */\n hasCrop: function hasCrop() {\n return this.cropX || this.cropY || this.width < this._element.width || this.height < this._element.height;\n },\n\n /**\n * Returns source of an image\n * @param {Boolean} filtered indicates if the src is needed for svg\n * @return {String} Source of an image\n */\n getSrc: function getSrc(filtered) {\n var element = filtered ? this._element : this._originalElement;\n\n if (element) {\n if (element.toDataURL) {\n return element.toDataURL();\n }\n\n if (this.srcFromAttribute) {\n return element.getAttribute('src');\n } else {\n return element.src;\n }\n } else {\n return this.src || '';\n }\n },\n\n /**\n * Sets source of an image\n * @param {String} src Source string (URL)\n * @param {Function} [callback] Callback is invoked when image has been loaded (and all filters have been applied)\n * @param {Object} [options] Options object\n * @return {fabric.Image} thisArg\n * @chainable\n */\n setSrc: function setSrc(src, callback, options) {\n fabric.util.loadImage(src, function (img) {\n this.setElement(img, options);\n\n this._setWidthHeight();\n\n callback && callback(this);\n }, this, options && options.crossOrigin);\n return this;\n },\n\n /**\n * Returns string representation of an instance\n * @return {String} String representation of an instance\n */\n toString: function toString() {\n return '#<fabric.Image: { src: \"' + this.getSrc() + '\" }>';\n },\n applyResizeFilters: function applyResizeFilters() {\n var filter = this.resizeFilter,\n minimumScale = this.minimumScaleTrigger,\n objectScale = this.getTotalObjectScaling(),\n scaleX = objectScale.scaleX,\n scaleY = objectScale.scaleY,\n elementToFilter = this._filteredEl || this._originalElement;\n\n if (this.group) {\n this.set('dirty', true);\n }\n\n if (!filter || scaleX > minimumScale && scaleY > minimumScale) {\n this._element = elementToFilter;\n this._filterScalingX = 1;\n this._filterScalingY = 1;\n this._lastScaleX = scaleX;\n this._lastScaleY = scaleY;\n return;\n }\n\n if (!fabric.filterBackend) {\n fabric.filterBackend = fabric.initFilterBackend();\n }\n\n var canvasEl = fabric.util.createCanvasElement(),\n cacheKey = this._filteredEl ? this.cacheKey + '_filtered' : this.cacheKey,\n sourceWidth = elementToFilter.width,\n sourceHeight = elementToFilter.height;\n canvasEl.width = sourceWidth;\n canvasEl.height = sourceHeight;\n this._element = canvasEl;\n this._lastScaleX = filter.scaleX = scaleX;\n this._lastScaleY = filter.scaleY = scaleY;\n fabric.filterBackend.applyFilters([filter], elementToFilter, sourceWidth, sourceHeight, this._element, cacheKey);\n this._filterScalingX = canvasEl.width / this._originalElement.width;\n this._filterScalingY = canvasEl.height / this._originalElement.height;\n },\n\n /**\n * Applies filters assigned to this image (from \"filters\" array) or from filter param\n * @method applyFilters\n * @param {Array} filters to be applied\n * @param {Boolean} forResizing specify if the filter operation is a resize operation\n * @return {thisArg} return the fabric.Image object\n * @chainable\n */\n applyFilters: function applyFilters(filters) {\n filters = filters || this.filters || [];\n filters = filters.filter(function (filter) {\n return filter && !filter.isNeutralState();\n });\n this.set('dirty', true); // needs to clear out or WEBGL will not resize correctly\n\n this.removeTexture(this.cacheKey + '_filtered');\n\n if (filters.length === 0) {\n this._element = this._originalElement;\n this._filteredEl = null;\n this._filterScalingX = 1;\n this._filterScalingY = 1;\n return this;\n }\n\n var imgElement = this._originalElement,\n sourceWidth = imgElement.naturalWidth || imgElement.width,\n sourceHeight = imgElement.naturalHeight || imgElement.height;\n\n if (this._element === this._originalElement) {\n // if the element is the same we need to create a new element\n var canvasEl = fabric.util.createCanvasElement();\n canvasEl.width = sourceWidth;\n canvasEl.height = sourceHeight;\n this._element = canvasEl;\n this._filteredEl = canvasEl;\n } else {\n // clear the existing element to get new filter data\n // also dereference the eventual resized _element\n this._element = this._filteredEl;\n\n this._filteredEl.getContext('2d').clearRect(0, 0, sourceWidth, sourceHeight); // we also need to resize again at next renderAll, so remove saved _lastScaleX/Y\n\n\n this._lastScaleX = 1;\n this._lastScaleY = 1;\n }\n\n if (!fabric.filterBackend) {\n fabric.filterBackend = fabric.initFilterBackend();\n }\n\n fabric.filterBackend.applyFilters(filters, this._originalElement, sourceWidth, sourceHeight, this._element, this.cacheKey);\n\n if (this._originalElement.width !== this._element.width || this._originalElement.height !== this._element.height) {\n this._filterScalingX = this._element.width / this._originalElement.width;\n this._filterScalingY = this._element.height / this._originalElement.height;\n }\n\n return this;\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render(ctx) {\n if (this.isMoving !== true && this.resizeFilter && this._needsResize()) {\n this.applyResizeFilters();\n }\n\n this._stroke(ctx);\n\n this._renderPaintInOrder(ctx);\n },\n\n /**\n * Decide if the object should cache or not. Create its own cache level\n * needsItsOwnCache should be used when the object drawing method requires\n * a cache step. None of the fabric classes requires it.\n * Generally you do not cache objects in groups because the group outside is cached.\n * This is the special image version where we would like to avoid caching where possible.\n * Essentially images do not benefit from caching. They may require caching, and in that\n * case we do it. Also caching an image usually ends in a loss of details.\n * A full performance audit should be done.\n * @return {Boolean}\n */\n shouldCache: function shouldCache() {\n return this.needsItsOwnCache();\n },\n _renderFill: function _renderFill(ctx) {\n var elementToDraw = this._element,\n w = this.width,\n h = this.height,\n sW = Math.min(elementToDraw.naturalWidth || elementToDraw.width, w * this._filterScalingX),\n sH = Math.min(elementToDraw.naturalHeight || elementToDraw.height, h * this._filterScalingY),\n x = -w / 2,\n y = -h / 2,\n sX = Math.max(0, this.cropX * this._filterScalingX),\n sY = Math.max(0, this.cropY * this._filterScalingY);\n elementToDraw && ctx.drawImage(elementToDraw, sX, sY, sW, sH, x, y, w, h);\n },\n\n /**\n * needed to check if image needs resize\n * @private\n */\n _needsResize: function _needsResize() {\n var scale = this.getTotalObjectScaling();\n return scale.scaleX !== this._lastScaleX || scale.scaleY !== this._lastScaleY;\n },\n\n /**\n * @private\n */\n _resetWidthHeight: function _resetWidthHeight() {\n this.set(this.getOriginalSize());\n },\n\n /**\n * The Image class's initialization method. This method is automatically\n * called by the constructor.\n * @private\n * @param {HTMLImageElement|String} element The element representing the image\n * @param {Object} [options] Options object\n */\n _initElement: function _initElement(element, options) {\n this.setElement(fabric.util.getById(element), options);\n fabric.util.addClass(this.getElement(), fabric.Image.CSS_CANVAS);\n },\n\n /**\n * @private\n * @param {Object} [options] Options object\n */\n _initConfig: function _initConfig(options) {\n options || (options = {});\n this.setOptions(options);\n\n this._setWidthHeight(options);\n\n if (this._element && this.crossOrigin) {\n this._element.crossOrigin = this.crossOrigin;\n }\n },\n\n /**\n * @private\n * @param {Array} filters to be initialized\n * @param {Function} callback Callback to invoke when all fabric.Image.filters instances are created\n */\n _initFilters: function _initFilters(filters, callback) {\n if (filters && filters.length) {\n fabric.util.enlivenObjects(filters, function (enlivenedObjects) {\n callback && callback(enlivenedObjects);\n }, 'fabric.Image.filters');\n } else {\n callback && callback();\n }\n },\n\n /**\n * @private\n * Set the width and the height of the image object, using the element or the\n * options.\n * @param {Object} [options] Object with width/height properties\n */\n _setWidthHeight: function _setWidthHeight(options) {\n options || (options = {});\n var el = this.getElement();\n this.width = options.width || el.naturalWidth || el.width || 0;\n this.height = options.height || el.naturalHeight || el.height || 0;\n },\n\n /**\n * Calculate offset for center and scale factor for the image in order to respect\n * the preserveAspectRatio attribute\n * @private\n * @return {Object}\n */\n parsePreserveAspectRatioAttribute: function parsePreserveAspectRatioAttribute() {\n var pAR = fabric.util.parsePreserveAspectRatioAttribute(this.preserveAspectRatio || ''),\n rWidth = this._element.width,\n rHeight = this._element.height,\n scaleX = 1,\n scaleY = 1,\n offsetLeft = 0,\n offsetTop = 0,\n cropX = 0,\n cropY = 0,\n offset,\n pWidth = this.width,\n pHeight = this.height,\n parsedAttributes = {\n width: pWidth,\n height: pHeight\n };\n\n if (pAR && (pAR.alignX !== 'none' || pAR.alignY !== 'none')) {\n if (pAR.meetOrSlice === 'meet') {\n scaleX = scaleY = fabric.util.findScaleToFit(this._element, parsedAttributes);\n offset = (pWidth - rWidth * scaleX) / 2;\n\n if (pAR.alignX === 'Min') {\n offsetLeft = -offset;\n }\n\n if (pAR.alignX === 'Max') {\n offsetLeft = offset;\n }\n\n offset = (pHeight - rHeight * scaleY) / 2;\n\n if (pAR.alignY === 'Min') {\n offsetTop = -offset;\n }\n\n if (pAR.alignY === 'Max') {\n offsetTop = offset;\n }\n }\n\n if (pAR.meetOrSlice === 'slice') {\n scaleX = scaleY = fabric.util.findScaleToCover(this._element, parsedAttributes);\n offset = rWidth - pWidth / scaleX;\n\n if (pAR.alignX === 'Mid') {\n cropX = offset / 2;\n }\n\n if (pAR.alignX === 'Max') {\n cropX = offset;\n }\n\n offset = rHeight - pHeight / scaleY;\n\n if (pAR.alignY === 'Mid') {\n cropY = offset / 2;\n }\n\n if (pAR.alignY === 'Max') {\n cropY = offset;\n }\n\n rWidth = pWidth / scaleX;\n rHeight = pHeight / scaleY;\n }\n } else {\n scaleX = pWidth / rWidth;\n scaleY = pHeight / rHeight;\n }\n\n return {\n width: rWidth,\n height: rHeight,\n scaleX: scaleX,\n scaleY: scaleY,\n offsetLeft: offsetLeft,\n offsetTop: offsetTop,\n cropX: cropX,\n cropY: cropY\n };\n }\n });\n /**\n * Default CSS class name for canvas\n * @static\n * @type String\n * @default\n */\n\n fabric.Image.CSS_CANVAS = 'canvas-img';\n /**\n * Alias for getSrc\n * @static\n */\n\n fabric.Image.prototype.getSvgSrc = fabric.Image.prototype.getSrc;\n /**\n * Creates an instance of fabric.Image from its object representation\n * @static\n * @param {Object} object Object to create an instance from\n * @param {Function} callback Callback to invoke when an image instance is created\n */\n\n fabric.Image.fromObject = function (_object, callback) {\n var object = fabric.util.object.clone(_object);\n fabric.util.loadImage(object.src, function (img, error) {\n if (error) {\n callback && callback(null, error);\n return;\n }\n\n fabric.Image.prototype._initFilters.call(object, object.filters, function (filters) {\n object.filters = filters || [];\n\n fabric.Image.prototype._initFilters.call(object, [object.resizeFilter], function (resizeFilters) {\n object.resizeFilter = resizeFilters[0];\n fabric.util.enlivenObjects([object.clipPath], function (enlivedProps) {\n object.clipPath = enlivedProps[0];\n var image = new fabric.Image(img, object);\n callback(image);\n });\n });\n });\n }, null, object.crossOrigin);\n };\n /**\n * Creates an instance of fabric.Image from an URL string\n * @static\n * @param {String} url URL to create an image from\n * @param {Function} [callback] Callback to invoke when image is created (newly created image is passed as a first argument)\n * @param {Object} [imgOptions] Options object\n */\n\n\n fabric.Image.fromURL = function (url, callback, imgOptions) {\n fabric.util.loadImage(url, function (img) {\n callback && callback(new fabric.Image(img, imgOptions));\n }, null, imgOptions && imgOptions.crossOrigin);\n };\n})(typeof exports !== 'undefined' ? exports : this);\n\nfabric.util.object.extend(fabric.Object.prototype,\n/** @lends fabric.Object.prototype */\n{\n /**\n * @private\n * @return {Number} angle value\n */\n _getAngleValueForStraighten: function _getAngleValueForStraighten() {\n var angle = this.angle % 360;\n\n if (angle > 0) {\n return Math.round((angle - 1) / 90) * 90;\n }\n\n return Math.round(angle / 90) * 90;\n },\n\n /**\n * Straightens an object (rotating it from current angle to one of 0, 90, 180, 270, etc. depending on which is closer)\n * @return {fabric.Object} thisArg\n * @chainable\n */\n straighten: function straighten() {\n this.rotate(this._getAngleValueForStraighten());\n return this;\n },\n\n /**\n * Same as {@link fabric.Object.prototype.straighten} but with animation\n * @param {Object} callbacks Object with callback functions\n * @param {Function} [callbacks.onComplete] Invoked on completion\n * @param {Function} [callbacks.onChange] Invoked on every step of animation\n * @return {fabric.Object} thisArg\n * @chainable\n */\n fxStraighten: function fxStraighten(callbacks) {\n callbacks = callbacks || {};\n\n var empty = function empty() {},\n _onComplete4 = callbacks.onComplete || empty,\n _onChange4 = callbacks.onChange || empty,\n _this = this;\n\n fabric.util.animate({\n startValue: this.get('angle'),\n endValue: this._getAngleValueForStraighten(),\n duration: this.FX_DURATION,\n onChange: function onChange(value) {\n _this.rotate(value);\n\n _onChange4();\n },\n onComplete: function onComplete() {\n _this.setCoords();\n\n _onComplete4();\n }\n });\n return this;\n }\n});\nfabric.util.object.extend(fabric.StaticCanvas.prototype,\n/** @lends fabric.StaticCanvas.prototype */\n{\n /**\n * Straightens object, then rerenders canvas\n * @param {fabric.Object} object Object to straighten\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n straightenObject: function straightenObject(object) {\n object.straighten();\n this.requestRenderAll();\n return this;\n },\n\n /**\n * Same as {@link fabric.Canvas.prototype.straightenObject}, but animated\n * @param {fabric.Object} object Object to straighten\n * @return {fabric.Canvas} thisArg\n * @chainable\n */\n fxStraightenObject: function fxStraightenObject(object) {\n object.fxStraighten({\n onChange: this.requestRenderAllBound\n });\n return this;\n }\n});\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {}),\n clone = fabric.util.object.clone;\n\n if (fabric.Text) {\n fabric.warn('fabric.Text is already defined');\n return;\n }\n /**\n * Text class\n * @class fabric.Text\n * @extends fabric.Object\n * @return {fabric.Text} thisArg\n * @tutorial {@link http://fabricjs.com/fabric-intro-part-2#text}\n * @see {@link fabric.Text#initialize} for constructor definition\n */\n\n\n fabric.Text = fabric.util.createClass(fabric.Object,\n /** @lends fabric.Text.prototype */\n {\n /**\n * Properties which when set cause object to change dimensions\n * @type Array\n * @private\n */\n _dimensionAffectingProps: ['fontSize', 'fontWeight', 'fontFamily', 'fontStyle', 'lineHeight', 'text', 'charSpacing', 'textAlign', 'styles'],\n\n /**\n * @private\n */\n _reNewline: /\\r?\\n/,\n\n /**\n * Use this regular expression to filter for whitespaces that is not a new line.\n * Mostly used when text is 'justify' aligned.\n * @private\n */\n _reSpacesAndTabs: /[ \\t\\r]/g,\n\n /**\n * Use this regular expression to filter for whitespace that is not a new line.\n * Mostly used when text is 'justify' aligned.\n * @private\n */\n _reSpaceAndTab: /[ \\t\\r]/,\n\n /**\n * Use this regular expression to filter consecutive groups of non spaces.\n * Mostly used when text is 'justify' aligned.\n * @private\n */\n _reWords: /\\S+/g,\n\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'text',\n\n /**\n * Font size (in pixels)\n * @type Number\n * @default\n */\n fontSize: 40,\n\n /**\n * Font weight (e.g. bold, normal, 400, 600, 800)\n * @type {(Number|String)}\n * @default\n */\n fontWeight: 'normal',\n\n /**\n * Font family\n * @type String\n * @default\n */\n fontFamily: 'Times New Roman',\n\n /**\n * Text decoration underline.\n * @type Boolean\n * @default\n */\n underline: false,\n\n /**\n * Text decoration overline.\n * @type Boolean\n * @default\n */\n overline: false,\n\n /**\n * Text decoration linethrough.\n * @type Boolean\n * @default\n */\n linethrough: false,\n\n /**\n * Text alignment. Possible values: \"left\", \"center\", \"right\", \"justify\",\n * \"justify-left\", \"justify-center\" or \"justify-right\".\n * @type String\n * @default\n */\n textAlign: 'left',\n\n /**\n * Font style . Possible values: \"\", \"normal\", \"italic\" or \"oblique\".\n * @type String\n * @default\n */\n fontStyle: 'normal',\n\n /**\n * Line height\n * @type Number\n * @default\n */\n lineHeight: 1.16,\n\n /**\n * Superscript schema object (minimum overlap)\n * @type {Object}\n * @default\n */\n superscript: {\n size: 0.60,\n // fontSize factor\n baseline: -0.35 // baseline-shift factor (upwards)\n\n },\n\n /**\n * Subscript schema object (minimum overlap)\n * @type {Object}\n * @default\n */\n subscript: {\n size: 0.60,\n // fontSize factor\n baseline: 0.11 // baseline-shift factor (downwards)\n\n },\n\n /**\n * Background color of text lines\n * @type String\n * @default\n */\n textBackgroundColor: '',\n\n /**\n * List of properties to consider when checking if\n * state of an object is changed ({@link fabric.Object#hasStateChanged})\n * as well as for history (undo/redo) purposes\n * @type Array\n */\n stateProperties: fabric.Object.prototype.stateProperties.concat('fontFamily', 'fontWeight', 'fontSize', 'text', 'underline', 'overline', 'linethrough', 'textAlign', 'fontStyle', 'lineHeight', 'textBackgroundColor', 'charSpacing', 'styles'),\n\n /**\n * List of properties to consider when checking if cache needs refresh\n * @type Array\n */\n cacheProperties: fabric.Object.prototype.cacheProperties.concat('fontFamily', 'fontWeight', 'fontSize', 'text', 'underline', 'overline', 'linethrough', 'textAlign', 'fontStyle', 'lineHeight', 'textBackgroundColor', 'charSpacing', 'styles'),\n\n /**\n * When defined, an object is rendered via stroke and this property specifies its color.\n * <b>Backwards incompatibility note:</b> This property was named \"strokeStyle\" until v1.1.6\n * @type String\n * @default\n */\n stroke: null,\n\n /**\n * Shadow object representing shadow of this shape.\n * <b>Backwards incompatibility note:</b> This property was named \"textShadow\" (String) until v1.2.11\n * @type fabric.Shadow\n * @default\n */\n shadow: null,\n\n /**\n * @private\n */\n _fontSizeFraction: 0.222,\n\n /**\n * @private\n */\n offsets: {\n underline: 0.10,\n linethrough: -0.315,\n overline: -0.88\n },\n\n /**\n * Text Line proportion to font Size (in pixels)\n * @type Number\n * @default\n */\n _fontSizeMult: 1.13,\n\n /**\n * additional space between characters\n * expressed in thousands of em unit\n * @type Number\n * @default\n */\n charSpacing: 0,\n\n /**\n * Object containing character styles - top-level properties -> line numbers,\n * 2nd-level properties - charater numbers\n * @type Object\n * @default\n */\n styles: null,\n\n /**\n * Reference to a context to measure text char or couple of chars\n * the cacheContext of the canvas will be used or a freshly created one if the object is not on canvas\n * once created it will be referenced on fabric._measuringContext to avoide creating a canvas for every\n * text object created.\n * @type {CanvasRenderingContext2D}\n * @default\n */\n _measuringContext: null,\n\n /**\n * Baseline shift, stlyes only, keep at 0 for the main text object\n * @type {Number}\n * @default\n */\n deltaY: 0,\n\n /**\n * Array of properties that define a style unit (of 'styles').\n * @type {Array}\n * @default\n */\n _styleProperties: ['stroke', 'strokeWidth', 'fill', 'fontFamily', 'fontSize', 'fontWeight', 'fontStyle', 'underline', 'overline', 'linethrough', 'deltaY', 'textBackgroundColor'],\n\n /**\n * contains characters bounding boxes\n */\n __charBounds: [],\n\n /**\n * use this size when measuring text. To avoid IE11 rounding errors\n * @type {Number}\n * @default\n * @readonly\n * @private\n */\n CACHE_FONT_SIZE: 400,\n\n /**\n * contains the min text width to avoid getting 0\n * @type {Number}\n * @default\n */\n MIN_TEXT_WIDTH: 2,\n\n /**\n * Constructor\n * @param {String} text Text string\n * @param {Object} [options] Options object\n * @return {fabric.Text} thisArg\n */\n initialize: function initialize(text, options) {\n this.styles = options ? options.styles || {} : {};\n this.text = text;\n this.__skipDimension = true;\n this.callSuper('initialize', options);\n this.__skipDimension = false;\n this.initDimensions();\n this.setCoords();\n this.setupState({\n propertySet: '_dimensionAffectingProps'\n });\n },\n\n /**\n * Return a contex for measurement of text string.\n * if created it gets stored for reuse\n * @param {String} text Text string\n * @param {Object} [options] Options object\n * @return {fabric.Text} thisArg\n */\n getMeasuringContext: function getMeasuringContext() {\n // if we did not return we have to measure something.\n if (!fabric._measuringContext) {\n fabric._measuringContext = this.canvas && this.canvas.contextCache || fabric.util.createCanvasElement().getContext('2d');\n }\n\n return fabric._measuringContext;\n },\n\n /**\n * @private\n * Divides text into lines of text and lines of graphemes.\n */\n _splitText: function _splitText() {\n var newLines = this._splitTextIntoLines(this.text);\n\n this.textLines = newLines.lines;\n this._textLines = newLines.graphemeLines;\n this._unwrappedTextLines = newLines._unwrappedLines;\n this._text = newLines.graphemeText;\n return newLines;\n },\n\n /**\n * Initialize or update text dimensions.\n * Updates this.width and this.height with the proper values.\n * Does not return dimensions.\n */\n initDimensions: function initDimensions() {\n if (this.__skipDimension) {\n return;\n }\n\n this._splitText();\n\n this._clearCache();\n\n this.width = this.calcTextWidth() || this.cursorWidth || this.MIN_TEXT_WIDTH;\n\n if (this.textAlign.indexOf('justify') !== -1) {\n // once text is measured we need to make space fatter to make justified text.\n this.enlargeSpaces();\n }\n\n this.height = this.calcTextHeight();\n this.saveState({\n propertySet: '_dimensionAffectingProps'\n });\n },\n\n /**\n * Enlarge space boxes and shift the others\n */\n enlargeSpaces: function enlargeSpaces() {\n var diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;\n\n for (var i = 0, len = this._textLines.length; i < len; i++) {\n if (this.textAlign !== 'justify' && (i === len - 1 || this.isEndOfWrapping(i))) {\n continue;\n }\n\n accumulatedSpace = 0;\n line = this._textLines[i];\n currentLineWidth = this.getLineWidth(i);\n\n if (currentLineWidth < this.width && (spaces = this.textLines[i].match(this._reSpacesAndTabs))) {\n numberOfSpaces = spaces.length;\n diffSpace = (this.width - currentLineWidth) / numberOfSpaces;\n\n for (var j = 0, jlen = line.length; j <= jlen; j++) {\n charBound = this.__charBounds[i][j];\n\n if (this._reSpaceAndTab.test(line[j])) {\n charBound.width += diffSpace;\n charBound.kernedWidth += diffSpace;\n charBound.left += accumulatedSpace;\n accumulatedSpace += diffSpace;\n } else {\n charBound.left += accumulatedSpace;\n }\n }\n }\n }\n },\n\n /**\n * Detect if the text line is ended with an hard break\n * text and itext do not have wrapping, return false\n * @return {Boolean}\n */\n isEndOfWrapping: function isEndOfWrapping(lineIndex) {\n return lineIndex === this._textLines.length - 1;\n },\n\n /**\n * Detect if a line has a linebreak and so we need to account for it when moving\n * and counting style.\n * It return always for text and Itext.\n * @return Number\n */\n missingNewlineOffset: function missingNewlineOffset() {\n return 1;\n },\n\n /**\n * Returns string representation of an instance\n * @return {String} String representation of text object\n */\n toString: function toString() {\n return '#<fabric.Text (' + this.complexity() + '): { \"text\": \"' + this.text + '\", \"fontFamily\": \"' + this.fontFamily + '\" }>';\n },\n\n /**\n * Return the dimension and the zoom level needed to create a cache canvas\n * big enough to host the object to be cached.\n * @private\n * @param {Object} dim.x width of object to be cached\n * @param {Object} dim.y height of object to be cached\n * @return {Object}.width width of canvas\n * @return {Object}.height height of canvas\n * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache\n * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache\n */\n _getCacheCanvasDimensions: function _getCacheCanvasDimensions() {\n var dims = this.callSuper('_getCacheCanvasDimensions');\n var fontSize = this.fontSize;\n dims.width += fontSize * dims.zoomX;\n dims.height += fontSize * dims.zoomY;\n return dims;\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render(ctx) {\n this._setTextStyles(ctx);\n\n this._renderTextLinesBackground(ctx);\n\n this._renderTextDecoration(ctx, 'underline');\n\n this._renderText(ctx);\n\n this._renderTextDecoration(ctx, 'overline');\n\n this._renderTextDecoration(ctx, 'linethrough');\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderText: function _renderText(ctx) {\n if (this.paintFirst === 'stroke') {\n this._renderTextStroke(ctx);\n\n this._renderTextFill(ctx);\n } else {\n this._renderTextFill(ctx);\n\n this._renderTextStroke(ctx);\n }\n },\n\n /**\n * Set the font parameter of the context with the object properties or with charStyle\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {Object} [charStyle] object with font style properties\n * @param {String} [charStyle.fontFamily] Font Family\n * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )\n * @param {String} [charStyle.fontWeight] Font weight\n * @param {String} [charStyle.fontStyle] Font style (italic|normal)\n */\n _setTextStyles: function _setTextStyles(ctx, charStyle, forMeasuring) {\n ctx.textBaseline = 'alphabetic';\n ctx.font = this._getFontDeclaration(charStyle, forMeasuring);\n },\n\n /**\n * calculate and return the text Width measuring each line.\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @return {Number} Maximum width of fabric.Text object\n */\n calcTextWidth: function calcTextWidth() {\n var maxWidth = this.getLineWidth(0);\n\n for (var i = 1, len = this._textLines.length; i < len; i++) {\n var currentLineWidth = this.getLineWidth(i);\n\n if (currentLineWidth > maxWidth) {\n maxWidth = currentLineWidth;\n }\n }\n\n return maxWidth;\n },\n\n /**\n * @private\n * @param {String} method Method name (\"fillText\" or \"strokeText\")\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {String} line Text to render\n * @param {Number} left Left position of text\n * @param {Number} top Top position of text\n * @param {Number} lineIndex Index of a line in a text\n */\n _renderTextLine: function _renderTextLine(method, ctx, line, left, top, lineIndex) {\n this._renderChars(method, ctx, line, left, top, lineIndex);\n },\n\n /**\n * Renders the text background for lines, taking care of style\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderTextLinesBackground: function _renderTextLinesBackground(ctx) {\n if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {\n return;\n }\n\n var lineTopOffset = 0,\n heightOfLine,\n lineLeftOffset,\n originalFill = ctx.fillStyle,\n line,\n lastColor,\n leftOffset = this._getLeftOffset(),\n topOffset = this._getTopOffset(),\n boxStart = 0,\n boxWidth = 0,\n charBox,\n currentColor;\n\n for (var i = 0, len = this._textLines.length; i < len; i++) {\n heightOfLine = this.getHeightOfLine(i);\n\n if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor', i)) {\n lineTopOffset += heightOfLine;\n continue;\n }\n\n line = this._textLines[i];\n lineLeftOffset = this._getLineLeftOffset(i);\n boxWidth = 0;\n boxStart = 0;\n lastColor = this.getValueOfPropertyAt(i, 0, 'textBackgroundColor');\n\n for (var j = 0, jlen = line.length; j < jlen; j++) {\n charBox = this.__charBounds[i][j];\n currentColor = this.getValueOfPropertyAt(i, j, 'textBackgroundColor');\n\n if (currentColor !== lastColor) {\n ctx.fillStyle = lastColor;\n lastColor && ctx.fillRect(leftOffset + lineLeftOffset + boxStart, topOffset + lineTopOffset, boxWidth, heightOfLine / this.lineHeight);\n boxStart = charBox.left;\n boxWidth = charBox.width;\n lastColor = currentColor;\n } else {\n boxWidth += charBox.kernedWidth;\n }\n }\n\n if (currentColor) {\n ctx.fillStyle = currentColor;\n ctx.fillRect(leftOffset + lineLeftOffset + boxStart, topOffset + lineTopOffset, boxWidth, heightOfLine / this.lineHeight);\n }\n\n lineTopOffset += heightOfLine;\n }\n\n ctx.fillStyle = originalFill; // if there is text background color no\n // other shadows should be casted\n\n this._removeShadow(ctx);\n },\n\n /**\n * @private\n * @param {Object} decl style declaration for cache\n * @param {String} decl.fontFamily fontFamily\n * @param {String} decl.fontStyle fontStyle\n * @param {String} decl.fontWeight fontWeight\n * @return {Object} reference to cache\n */\n getFontCache: function getFontCache(decl) {\n var fontFamily = decl.fontFamily.toLowerCase();\n\n if (!fabric.charWidthsCache[fontFamily]) {\n fabric.charWidthsCache[fontFamily] = {};\n }\n\n var cache = fabric.charWidthsCache[fontFamily],\n cacheProp = decl.fontStyle.toLowerCase() + '_' + (decl.fontWeight + '').toLowerCase();\n\n if (!cache[cacheProp]) {\n cache[cacheProp] = {};\n }\n\n return cache[cacheProp];\n },\n\n /**\n * apply all the character style to canvas for rendering\n * @private\n * @param {String} _char\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @param {Object} [decl]\n */\n _applyCharStyles: function _applyCharStyles(method, ctx, lineIndex, charIndex, styleDeclaration) {\n this._setFillStyles(ctx, styleDeclaration);\n\n this._setStrokeStyles(ctx, styleDeclaration);\n\n ctx.font = this._getFontDeclaration(styleDeclaration);\n },\n\n /**\n * measure and return the width of a single character.\n * possibly overridden to accommodate different measure logic or\n * to hook some external lib for character measurement\n * @private\n * @param {String} _char, char to be measured\n * @param {Object} charStyle style of char to be measured\n * @param {String} [previousChar] previous char\n * @param {Object} [prevCharStyle] style of previous char\n */\n _measureChar: function _measureChar(_char, charStyle, previousChar, prevCharStyle) {\n // first i try to return from cache\n var fontCache = this.getFontCache(charStyle),\n fontDeclaration = this._getFontDeclaration(charStyle),\n previousFontDeclaration = this._getFontDeclaration(prevCharStyle),\n couple = previousChar + _char,\n stylesAreEqual = fontDeclaration === previousFontDeclaration,\n width,\n coupleWidth,\n previousWidth,\n fontMultiplier = charStyle.fontSize / this.CACHE_FONT_SIZE,\n kernedWidth;\n\n if (previousChar && fontCache[previousChar] !== undefined) {\n previousWidth = fontCache[previousChar];\n }\n\n if (fontCache[_char] !== undefined) {\n kernedWidth = width = fontCache[_char];\n }\n\n if (stylesAreEqual && fontCache[couple] !== undefined) {\n coupleWidth = fontCache[couple];\n kernedWidth = coupleWidth - previousWidth;\n }\n\n if (width === undefined || previousWidth === undefined || coupleWidth === undefined) {\n var ctx = this.getMeasuringContext(); // send a TRUE to specify measuring font size CACHE_FONT_SIZE\n\n this._setTextStyles(ctx, charStyle, true);\n }\n\n if (width === undefined) {\n kernedWidth = width = ctx.measureText(_char).width;\n fontCache[_char] = width;\n }\n\n if (previousWidth === undefined && stylesAreEqual && previousChar) {\n previousWidth = ctx.measureText(previousChar).width;\n fontCache[previousChar] = previousWidth;\n }\n\n if (stylesAreEqual && coupleWidth === undefined) {\n // we can measure the kerning couple and subtract the width of the previous character\n coupleWidth = ctx.measureText(couple).width;\n fontCache[couple] = coupleWidth;\n kernedWidth = coupleWidth - previousWidth;\n }\n\n return {\n width: width * fontMultiplier,\n kernedWidth: kernedWidth * fontMultiplier\n };\n },\n\n /**\n * Computes height of character at given position\n * @param {Number} line the line index number\n * @param {Number} _char the character index number\n * @return {Number} fontSize of the character\n */\n getHeightOfChar: function getHeightOfChar(line, _char) {\n return this.getValueOfPropertyAt(line, _char, 'fontSize');\n },\n\n /**\n * measure a text line measuring all characters.\n * @param {Number} lineIndex line number\n * @return {Number} Line width\n */\n measureLine: function measureLine(lineIndex) {\n var lineInfo = this._measureLine(lineIndex);\n\n if (this.charSpacing !== 0) {\n lineInfo.width -= this._getWidthOfCharSpacing();\n }\n\n if (lineInfo.width < 0) {\n lineInfo.width = 0;\n }\n\n return lineInfo;\n },\n\n /**\n * measure every grapheme of a line, populating __charBounds\n * @param {Number} lineIndex\n * @return {Object} object.width total width of characters\n * @return {Object} object.widthOfSpaces length of chars that match this._reSpacesAndTabs\n */\n _measureLine: function _measureLine(lineIndex) {\n var width = 0,\n i,\n grapheme,\n line = this._textLines[lineIndex],\n prevGrapheme,\n graphemeInfo,\n numOfSpaces = 0,\n lineBounds = new Array(line.length);\n this.__charBounds[lineIndex] = lineBounds;\n\n for (i = 0; i < line.length; i++) {\n grapheme = line[i];\n graphemeInfo = this._getGraphemeBox(grapheme, lineIndex, i, prevGrapheme);\n lineBounds[i] = graphemeInfo;\n width += graphemeInfo.kernedWidth;\n prevGrapheme = grapheme;\n } // this latest bound box represent the last character of the line\n // to simplify cursor handling in interactive mode.\n\n\n lineBounds[i] = {\n left: graphemeInfo ? graphemeInfo.left + graphemeInfo.width : 0,\n width: 0,\n kernedWidth: 0,\n height: this.fontSize\n };\n return {\n width: width,\n numOfSpaces: numOfSpaces\n };\n },\n\n /**\n * Measure and return the info of a single grapheme.\n * needs the the info of previous graphemes already filled\n * @private\n * @param {String} grapheme to be measured\n * @param {Number} lineIndex index of the line where the char is\n * @param {Number} charIndex position in the line\n * @param {String} [prevGrapheme] character preceding the one to be measured\n */\n _getGraphemeBox: function _getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {\n var style = this.getCompleteStyleDeclaration(lineIndex, charIndex),\n prevStyle = prevGrapheme ? this.getCompleteStyleDeclaration(lineIndex, charIndex - 1) : {},\n info = this._measureChar(grapheme, style, prevGrapheme, prevStyle),\n kernedWidth = info.kernedWidth,\n width = info.width,\n charSpacing;\n\n if (this.charSpacing !== 0) {\n charSpacing = this._getWidthOfCharSpacing();\n width += charSpacing;\n kernedWidth += charSpacing;\n }\n\n var box = {\n width: width,\n left: 0,\n height: style.fontSize,\n kernedWidth: kernedWidth,\n deltaY: style.deltaY\n };\n\n if (charIndex > 0 && !skipLeft) {\n var previousBox = this.__charBounds[lineIndex][charIndex - 1];\n box.left = previousBox.left + previousBox.width + info.kernedWidth - info.width;\n }\n\n return box;\n },\n\n /**\n * Calculate height of line at 'lineIndex'\n * @param {Number} lineIndex index of line to calculate\n * @return {Number}\n */\n getHeightOfLine: function getHeightOfLine(lineIndex) {\n if (this.__lineHeights[lineIndex]) {\n return this.__lineHeights[lineIndex];\n }\n\n var line = this._textLines[lineIndex],\n // char 0 is measured before the line cycle because it nneds to char\n // emptylines\n maxHeight = this.getHeightOfChar(lineIndex, 0);\n\n for (var i = 1, len = line.length; i < len; i++) {\n maxHeight = Math.max(this.getHeightOfChar(lineIndex, i), maxHeight);\n }\n\n return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;\n },\n\n /**\n * Calculate text box height\n */\n calcTextHeight: function calcTextHeight() {\n var lineHeight,\n height = 0;\n\n for (var i = 0, len = this._textLines.length; i < len; i++) {\n lineHeight = this.getHeightOfLine(i);\n height += i === len - 1 ? lineHeight / this.lineHeight : lineHeight;\n }\n\n return height;\n },\n\n /**\n * @private\n * @return {Number} Left offset\n */\n _getLeftOffset: function _getLeftOffset() {\n return -this.width / 2;\n },\n\n /**\n * @private\n * @return {Number} Top offset\n */\n _getTopOffset: function _getTopOffset() {\n return -this.height / 2;\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {Object} filler fabric.Pattern or fabric.Gradient\n * @return {Object} offset.offsetX offset for text rendering\n * @return {Object} offset.offsetY offset for text rendering\n */\n _applyPatternGradientTransform: function _applyPatternGradientTransform(ctx, filler) {\n if (!filler || !filler.toLive) {\n return {\n offsetX: 0,\n offsetY: 0\n };\n }\n\n var offsetX = -this.width / 2 + filler.offsetX || 0,\n offsetY = -this.height / 2 + filler.offsetY || 0;\n ctx.transform(1, 0, 0, 1, offsetX, offsetY);\n return {\n offsetX: offsetX,\n offsetY: offsetY\n };\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {String} method Method name (\"fillText\" or \"strokeText\")\n */\n _renderTextCommon: function _renderTextCommon(ctx, method) {\n ctx.save();\n\n var lineHeights = 0,\n left = this._getLeftOffset(),\n top = this._getTopOffset(),\n offsets = this._applyPatternGradientTransform(ctx, method === 'fillText' ? this.fill : this.stroke);\n\n for (var i = 0, len = this._textLines.length; i < len; i++) {\n var heightOfLine = this.getHeightOfLine(i),\n maxHeight = heightOfLine / this.lineHeight,\n leftOffset = this._getLineLeftOffset(i);\n\n this._renderTextLine(method, ctx, this._textLines[i], left + leftOffset - offsets.offsetX, top + lineHeights + maxHeight - offsets.offsetY, i);\n\n lineHeights += heightOfLine;\n }\n\n ctx.restore();\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderTextFill: function _renderTextFill(ctx) {\n if (!this.fill && !this.styleHas('fill')) {\n return;\n }\n\n this._renderTextCommon(ctx, 'fillText');\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderTextStroke: function _renderTextStroke(ctx) {\n if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {\n return;\n }\n\n if (this.shadow && !this.shadow.affectStroke) {\n this._removeShadow(ctx);\n }\n\n ctx.save();\n\n this._setLineDash(ctx, this.strokeDashArray);\n\n ctx.beginPath();\n\n this._renderTextCommon(ctx, 'strokeText');\n\n ctx.closePath();\n ctx.restore();\n },\n\n /**\n * @private\n * @param {String} method\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {String} line Content of the line\n * @param {Number} left\n * @param {Number} top\n * @param {Number} lineIndex\n * @param {Number} charOffset\n */\n _renderChars: function _renderChars(method, ctx, line, left, top, lineIndex) {\n // set proper line offset\n var lineHeight = this.getHeightOfLine(lineIndex),\n isJustify = this.textAlign.indexOf('justify') !== -1,\n actualStyle,\n nextStyle,\n charsToRender = '',\n charBox,\n boxWidth = 0,\n timeToRender,\n shortCut = !isJustify && this.charSpacing === 0 && this.isEmptyStyles(lineIndex);\n ctx.save();\n top -= lineHeight * this._fontSizeFraction / this.lineHeight;\n\n if (shortCut) {\n // render all the line in one pass without checking\n this._renderChar(method, ctx, lineIndex, 0, this.textLines[lineIndex], left, top, lineHeight);\n\n ctx.restore();\n return;\n }\n\n for (var i = 0, len = line.length - 1; i <= len; i++) {\n timeToRender = i === len || this.charSpacing;\n charsToRender += line[i];\n charBox = this.__charBounds[lineIndex][i];\n\n if (boxWidth === 0) {\n left += charBox.kernedWidth - charBox.width;\n boxWidth += charBox.width;\n } else {\n boxWidth += charBox.kernedWidth;\n }\n\n if (isJustify && !timeToRender) {\n if (this._reSpaceAndTab.test(line[i])) {\n timeToRender = true;\n }\n }\n\n if (!timeToRender) {\n // if we have charSpacing, we render char by char\n actualStyle = actualStyle || this.getCompleteStyleDeclaration(lineIndex, i);\n nextStyle = this.getCompleteStyleDeclaration(lineIndex, i + 1);\n timeToRender = this._hasStyleChanged(actualStyle, nextStyle);\n }\n\n if (timeToRender) {\n this._renderChar(method, ctx, lineIndex, i, charsToRender, left, top, lineHeight);\n\n charsToRender = '';\n actualStyle = nextStyle;\n left += boxWidth;\n boxWidth = 0;\n }\n }\n\n ctx.restore();\n },\n\n /**\n * @private\n * @param {String} method\n * @param {CanvasRenderingContext2D} ctx Context to render on\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @param {String} _char\n * @param {Number} left Left coordinate\n * @param {Number} top Top coordinate\n * @param {Number} lineHeight Height of the line\n */\n _renderChar: function _renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {\n var decl = this._getStyleDeclaration(lineIndex, charIndex),\n fullDecl = this.getCompleteStyleDeclaration(lineIndex, charIndex),\n shouldFill = method === 'fillText' && fullDecl.fill,\n shouldStroke = method === 'strokeText' && fullDecl.stroke && fullDecl.strokeWidth;\n\n if (!shouldStroke && !shouldFill) {\n return;\n }\n\n decl && ctx.save();\n\n this._applyCharStyles(method, ctx, lineIndex, charIndex, fullDecl);\n\n if (decl && decl.textBackgroundColor) {\n this._removeShadow(ctx);\n }\n\n if (decl && decl.deltaY) {\n top += decl.deltaY;\n }\n\n shouldFill && ctx.fillText(_char, left, top);\n shouldStroke && ctx.strokeText(_char, left, top);\n decl && ctx.restore();\n },\n\n /**\n * Turns the character into a 'superior figure' (i.e. 'superscript')\n * @param {Number} start selection start\n * @param {Number} end selection end\n * @returns {fabric.Text} thisArg\n * @chainable\n */\n setSuperscript: function setSuperscript(start, end) {\n return this._setScript(start, end, this.superscript);\n },\n\n /**\n * Turns the character into an 'inferior figure' (i.e. 'subscript')\n * @param {Number} start selection start\n * @param {Number} end selection end\n * @returns {fabric.Text} thisArg\n * @chainable\n */\n setSubscript: function setSubscript(start, end) {\n return this._setScript(start, end, this.subscript);\n },\n\n /**\n * Applies 'schema' at given position\n * @private\n * @param {Number} start selection start\n * @param {Number} end selection end\n * @param {Number} schema\n * @returns {fabric.Text} thisArg\n * @chainable\n */\n _setScript: function _setScript(start, end, schema) {\n var loc = this.get2DCursorLocation(start, true),\n fontSize = this.getValueOfPropertyAt(loc.lineIndex, loc.charIndex, 'fontSize'),\n dy = this.getValueOfPropertyAt(loc.lineIndex, loc.charIndex, 'deltaY'),\n style = {\n fontSize: fontSize * schema.size,\n deltaY: dy + fontSize * schema.baseline\n };\n this.setSelectionStyles(style, start, end);\n return this;\n },\n\n /**\n * @private\n * @param {Object} prevStyle\n * @param {Object} thisStyle\n */\n _hasStyleChanged: function _hasStyleChanged(prevStyle, thisStyle) {\n return prevStyle.fill !== thisStyle.fill || prevStyle.stroke !== thisStyle.stroke || prevStyle.strokeWidth !== thisStyle.strokeWidth || prevStyle.fontSize !== thisStyle.fontSize || prevStyle.fontFamily !== thisStyle.fontFamily || prevStyle.fontWeight !== thisStyle.fontWeight || prevStyle.fontStyle !== thisStyle.fontStyle || prevStyle.deltaY !== thisStyle.deltaY;\n },\n\n /**\n * @private\n * @param {Object} prevStyle\n * @param {Object} thisStyle\n */\n _hasStyleChangedForSvg: function _hasStyleChangedForSvg(prevStyle, thisStyle) {\n return this._hasStyleChanged(prevStyle, thisStyle) || prevStyle.overline !== thisStyle.overline || prevStyle.underline !== thisStyle.underline || prevStyle.linethrough !== thisStyle.linethrough;\n },\n\n /**\n * @private\n * @param {Number} lineIndex index text line\n * @return {Number} Line left offset\n */\n _getLineLeftOffset: function _getLineLeftOffset(lineIndex) {\n var lineWidth = this.getLineWidth(lineIndex);\n\n if (this.textAlign === 'center') {\n return (this.width - lineWidth) / 2;\n }\n\n if (this.textAlign === 'right') {\n return this.width - lineWidth;\n }\n\n if (this.textAlign === 'justify-center' && this.isEndOfWrapping(lineIndex)) {\n return (this.width - lineWidth) / 2;\n }\n\n if (this.textAlign === 'justify-right' && this.isEndOfWrapping(lineIndex)) {\n return this.width - lineWidth;\n }\n\n return 0;\n },\n\n /**\n * @private\n */\n _clearCache: function _clearCache() {\n this.__lineWidths = [];\n this.__lineHeights = [];\n this.__charBounds = [];\n },\n\n /**\n * @private\n */\n _shouldClearDimensionCache: function _shouldClearDimensionCache() {\n var shouldClear = this._forceClearCache;\n shouldClear || (shouldClear = this.hasStateChanged('_dimensionAffectingProps'));\n\n if (shouldClear) {\n this.dirty = true;\n this._forceClearCache = false;\n }\n\n return shouldClear;\n },\n\n /**\n * Measure a single line given its index. Used to calculate the initial\n * text bounding box. The values are calculated and stored in __lineWidths cache.\n * @private\n * @param {Number} lineIndex line number\n * @return {Number} Line width\n */\n getLineWidth: function getLineWidth(lineIndex) {\n if (this.__lineWidths[lineIndex]) {\n return this.__lineWidths[lineIndex];\n }\n\n var width,\n line = this._textLines[lineIndex],\n lineInfo;\n\n if (line === '') {\n width = 0;\n } else {\n lineInfo = this.measureLine(lineIndex);\n width = lineInfo.width;\n }\n\n this.__lineWidths[lineIndex] = width;\n return width;\n },\n _getWidthOfCharSpacing: function _getWidthOfCharSpacing() {\n if (this.charSpacing !== 0) {\n return this.fontSize * this.charSpacing / 1000;\n }\n\n return 0;\n },\n\n /**\n * Retrieves the value of property at given character position\n * @param {Number} lineIndex the line number\n * @param {Number} charIndex the charater number\n * @param {String} property the property name\n * @returns the value of 'property'\n */\n getValueOfPropertyAt: function getValueOfPropertyAt(lineIndex, charIndex, property) {\n var charStyle = this._getStyleDeclaration(lineIndex, charIndex);\n\n if (charStyle && typeof charStyle[property] !== 'undefined') {\n return charStyle[property];\n }\n\n return this[property];\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _renderTextDecoration: function _renderTextDecoration(ctx, type) {\n if (!this[type] && !this.styleHas(type)) {\n return;\n }\n\n var heightOfLine,\n size,\n _size,\n lineLeftOffset,\n dy,\n _dy,\n line,\n lastDecoration,\n leftOffset = this._getLeftOffset(),\n topOffset = this._getTopOffset(),\n top,\n boxStart,\n boxWidth,\n charBox,\n currentDecoration,\n maxHeight,\n currentFill,\n lastFill,\n charSpacing = this._getWidthOfCharSpacing();\n\n for (var i = 0, len = this._textLines.length; i < len; i++) {\n heightOfLine = this.getHeightOfLine(i);\n\n if (!this[type] && !this.styleHas(type, i)) {\n topOffset += heightOfLine;\n continue;\n }\n\n line = this._textLines[i];\n maxHeight = heightOfLine / this.lineHeight;\n lineLeftOffset = this._getLineLeftOffset(i);\n boxStart = 0;\n boxWidth = 0;\n lastDecoration = this.getValueOfPropertyAt(i, 0, type);\n lastFill = this.getValueOfPropertyAt(i, 0, 'fill');\n top = topOffset + maxHeight * (1 - this._fontSizeFraction);\n size = this.getHeightOfChar(i, 0);\n dy = this.getValueOfPropertyAt(i, 0, 'deltaY');\n\n for (var j = 0, jlen = line.length; j < jlen; j++) {\n charBox = this.__charBounds[i][j];\n currentDecoration = this.getValueOfPropertyAt(i, j, type);\n currentFill = this.getValueOfPropertyAt(i, j, 'fill');\n _size = this.getHeightOfChar(i, j);\n _dy = this.getValueOfPropertyAt(i, j, 'deltaY');\n\n if ((currentDecoration !== lastDecoration || currentFill !== lastFill || _size !== size || _dy !== dy) && boxWidth > 0) {\n ctx.fillStyle = lastFill;\n lastDecoration && lastFill && ctx.fillRect(leftOffset + lineLeftOffset + boxStart, top + this.offsets[type] * size + dy, boxWidth, this.fontSize / 15);\n boxStart = charBox.left;\n boxWidth = charBox.width;\n lastDecoration = currentDecoration;\n lastFill = currentFill;\n size = _size;\n dy = _dy;\n } else {\n boxWidth += charBox.kernedWidth;\n }\n }\n\n ctx.fillStyle = currentFill;\n currentDecoration && currentFill && ctx.fillRect(leftOffset + lineLeftOffset + boxStart, top + this.offsets[type] * size + dy, boxWidth - charSpacing, this.fontSize / 15);\n topOffset += heightOfLine;\n } // if there is text background color no\n // other shadows should be casted\n\n\n this._removeShadow(ctx);\n },\n\n /**\n * return font declaration string for canvas context\n * @param {Object} [styleObject] object\n * @returns {String} font declaration formatted for canvas context.\n */\n _getFontDeclaration: function _getFontDeclaration(styleObject, forMeasuring) {\n var style = styleObject || this,\n family = this.fontFamily,\n fontIsGeneric = fabric.Text.genericFonts.indexOf(family.toLowerCase()) > -1;\n var fontFamily = family === undefined || family.indexOf('\\'') > -1 || family.indexOf(',') > -1 || family.indexOf('\"') > -1 || fontIsGeneric ? style.fontFamily : '\"' + style.fontFamily + '\"';\n return [// node-canvas needs \"weight style\", while browsers need \"style weight\"\n // verify if this can be fixed in JSDOM\n fabric.isLikelyNode ? style.fontWeight : style.fontStyle, fabric.isLikelyNode ? style.fontStyle : style.fontWeight, forMeasuring ? this.CACHE_FONT_SIZE + 'px' : style.fontSize + 'px', fontFamily].join(' ');\n },\n\n /**\n * Renders text instance on a specified context\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n render: function render(ctx) {\n // do not render if object is not visible\n if (!this.visible) {\n return;\n }\n\n if (this.canvas && this.canvas.skipOffscreen && !this.group && !this.isOnScreen()) {\n return;\n }\n\n if (this._shouldClearDimensionCache()) {\n this.initDimensions();\n }\n\n this.callSuper('render', ctx);\n },\n\n /**\n * Returns the text as an array of lines.\n * @param {String} text text to split\n * @returns {Array} Lines in the text\n */\n _splitTextIntoLines: function _splitTextIntoLines(text) {\n var lines = text.split(this._reNewline),\n newLines = new Array(lines.length),\n newLine = ['\\n'],\n newText = [];\n\n for (var i = 0; i < lines.length; i++) {\n newLines[i] = fabric.util.string.graphemeSplit(lines[i]);\n newText = newText.concat(newLines[i], newLine);\n }\n\n newText.pop();\n return {\n _unwrappedLines: newLines,\n lines: lines,\n graphemeText: newText,\n graphemeLines: newLines\n };\n },\n\n /**\n * Returns object representation of an instance\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} Object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n var additionalProperties = ['text', 'fontSize', 'fontWeight', 'fontFamily', 'fontStyle', 'lineHeight', 'underline', 'overline', 'linethrough', 'textAlign', 'textBackgroundColor', 'charSpacing'].concat(propertiesToInclude);\n var obj = this.callSuper('toObject', additionalProperties);\n obj.styles = clone(this.styles, true);\n return obj;\n },\n\n /**\n * Sets property to a given value. When changing position/dimension -related properties (left, top, scale, angle, etc.) `set` does not update position of object's borders/controls. If you need to update those, call `setCoords()`.\n * @param {String|Object} key Property name or object (if object, iterate over the object properties)\n * @param {Object|Function} value Property value (if function, the value is passed into it and its return value is used as a new one)\n * @return {fabric.Object} thisArg\n * @chainable\n */\n set: function set(key, value) {\n this.callSuper('set', key, value);\n var needsDims = false;\n\n if (_typeof(key) === 'object') {\n for (var _key in key) {\n needsDims = needsDims || this._dimensionAffectingProps.indexOf(_key) !== -1;\n }\n } else {\n needsDims = this._dimensionAffectingProps.indexOf(key) !== -1;\n }\n\n if (needsDims) {\n this.initDimensions();\n this.setCoords();\n }\n\n return this;\n },\n\n /**\n * Returns complexity of an instance\n * @return {Number} complexity\n */\n complexity: function complexity() {\n return 1;\n }\n });\n /**\n * Returns fabric.Text instance from an object representation\n * @static\n * @memberOf fabric.Text\n * @param {Object} object Object to create an instance from\n * @param {Function} [callback] Callback to invoke when an fabric.Text instance is created\n */\n\n fabric.Text.fromObject = function (object, callback) {\n return fabric.Object._fromObject('Text', object, callback, 'text');\n };\n\n fabric.Text.genericFonts = ['sans-serif', 'serif', 'cursive', 'fantasy', 'monospace'];\n fabric.util.createAccessors && fabric.util.createAccessors(fabric.Text);\n})(typeof exports !== 'undefined' ? exports : this);\n\n(function () {\n fabric.util.object.extend(fabric.Text.prototype,\n /** @lends fabric.Text.prototype */\n {\n /**\n * Returns true if object has no styling or no styling in a line\n * @param {Number} lineIndex , lineIndex is on wrapped lines.\n * @return {Boolean}\n */\n isEmptyStyles: function isEmptyStyles(lineIndex) {\n if (!this.styles) {\n return true;\n }\n\n if (typeof lineIndex !== 'undefined' && !this.styles[lineIndex]) {\n return true;\n }\n\n var obj = typeof lineIndex === 'undefined' ? this.styles : {\n line: this.styles[lineIndex]\n };\n\n for (var p1 in obj) {\n for (var p2 in obj[p1]) {\n // eslint-disable-next-line no-unused-vars\n for (var p3 in obj[p1][p2]) {\n return false;\n }\n }\n }\n\n return true;\n },\n\n /**\n * Returns true if object has a style property or has it ina specified line\n * This function is used to detect if a text will use a particular property or not.\n * @param {String} property to check for\n * @param {Number} lineIndex to check the style on\n * @return {Boolean}\n */\n styleHas: function styleHas(property, lineIndex) {\n if (!this.styles || !property || property === '') {\n return false;\n }\n\n if (typeof lineIndex !== 'undefined' && !this.styles[lineIndex]) {\n return false;\n }\n\n var obj = typeof lineIndex === 'undefined' ? this.styles : {\n 0: this.styles[lineIndex]\n }; // eslint-disable-next-line\n\n for (var p1 in obj) {\n // eslint-disable-next-line\n for (var p2 in obj[p1]) {\n if (typeof obj[p1][p2][property] !== 'undefined') {\n return true;\n }\n }\n }\n\n return false;\n },\n\n /**\n * Check if characters in a text have a value for a property\n * whose value matches the textbox's value for that property. If so,\n * the character-level property is deleted. If the character\n * has no other properties, then it is also deleted. Finally,\n * if the line containing that character has no other characters\n * then it also is deleted.\n *\n * @param {string} property The property to compare between characters and text.\n */\n cleanStyle: function cleanStyle(property) {\n if (!this.styles || !property || property === '') {\n return false;\n }\n\n var obj = this.styles,\n stylesCount = 0,\n letterCount,\n stylePropertyValue,\n allStyleObjectPropertiesMatch = true,\n graphemeCount = 0,\n styleObject; // eslint-disable-next-line\n\n for (var p1 in obj) {\n letterCount = 0; // eslint-disable-next-line\n\n for (var p2 in obj[p1]) {\n var styleObject = obj[p1][p2],\n stylePropertyHasBeenSet = styleObject.hasOwnProperty(property);\n stylesCount++;\n\n if (stylePropertyHasBeenSet) {\n if (!stylePropertyValue) {\n stylePropertyValue = styleObject[property];\n } else if (styleObject[property] !== stylePropertyValue) {\n allStyleObjectPropertiesMatch = false;\n }\n\n if (styleObject[property] === this[property]) {\n delete styleObject[property];\n }\n } else {\n allStyleObjectPropertiesMatch = false;\n }\n\n if (Object.keys(styleObject).length !== 0) {\n letterCount++;\n } else {\n delete obj[p1][p2];\n }\n }\n\n if (letterCount === 0) {\n delete obj[p1];\n }\n } // if every grapheme has the same style set then\n // delete those styles and set it on the parent\n\n\n for (var i = 0; i < this._textLines.length; i++) {\n graphemeCount += this._textLines[i].length;\n }\n\n if (allStyleObjectPropertiesMatch && stylesCount === graphemeCount) {\n this[property] = stylePropertyValue;\n this.removeStyle(property);\n }\n },\n\n /**\n * Remove a style property or properties from all individual character styles\n * in a text object. Deletes the character style object if it contains no other style\n * props. Deletes a line style object if it contains no other character styles.\n *\n * @param {String} props The property to remove from character styles.\n */\n removeStyle: function removeStyle(property) {\n if (!this.styles || !property || property === '') {\n return;\n }\n\n var obj = this.styles,\n line,\n lineNum,\n charNum;\n\n for (lineNum in obj) {\n line = obj[lineNum];\n\n for (charNum in line) {\n delete line[charNum][property];\n\n if (Object.keys(line[charNum]).length === 0) {\n delete line[charNum];\n }\n }\n\n if (Object.keys(line).length === 0) {\n delete obj[lineNum];\n }\n }\n },\n\n /**\n * @private\n */\n _extendStyles: function _extendStyles(index, styles) {\n var loc = this.get2DCursorLocation(index);\n\n if (!this._getLineStyle(loc.lineIndex)) {\n this._setLineStyle(loc.lineIndex);\n }\n\n if (!this._getStyleDeclaration(loc.lineIndex, loc.charIndex)) {\n this._setStyleDeclaration(loc.lineIndex, loc.charIndex, {});\n }\n\n fabric.util.object.extend(this._getStyleDeclaration(loc.lineIndex, loc.charIndex), styles);\n },\n\n /**\n * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)\n * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.\n * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. usefull to manage styles.\n */\n get2DCursorLocation: function get2DCursorLocation(selectionStart, skipWrapping) {\n if (typeof selectionStart === 'undefined') {\n selectionStart = this.selectionStart;\n }\n\n var lines = skipWrapping ? this._unwrappedTextLines : this._textLines,\n len = lines.length;\n\n for (var i = 0; i < len; i++) {\n if (selectionStart <= lines[i].length) {\n return {\n lineIndex: i,\n charIndex: selectionStart\n };\n }\n\n selectionStart -= lines[i].length + this.missingNewlineOffset(i);\n }\n\n return {\n lineIndex: i - 1,\n charIndex: lines[i - 1].length < selectionStart ? lines[i - 1].length : selectionStart\n };\n },\n\n /**\n * Gets style of a current selection/cursor (at the start position)\n * if startIndex or endIndex are not provided, slectionStart or selectionEnd will be used.\n * @param {Number} [startIndex] Start index to get styles at\n * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1\n * @param {Boolean} [complete] get full style or not\n * @return {Array} styles an array with one, zero or more Style objects\n */\n getSelectionStyles: function getSelectionStyles(startIndex, endIndex, complete) {\n if (typeof startIndex === 'undefined') {\n startIndex = this.selectionStart || 0;\n }\n\n if (typeof endIndex === 'undefined') {\n endIndex = this.selectionEnd || startIndex;\n }\n\n var styles = [];\n\n for (var i = startIndex; i < endIndex; i++) {\n styles.push(this.getStyleAtPosition(i, complete));\n }\n\n return styles;\n },\n\n /**\n * Gets style of a current selection/cursor position\n * @param {Number} position to get styles at\n * @param {Boolean} [complete] full style if true\n * @return {Object} style Style object at a specified index\n * @private\n */\n getStyleAtPosition: function getStyleAtPosition(position, complete) {\n var loc = this.get2DCursorLocation(position),\n style = complete ? this.getCompleteStyleDeclaration(loc.lineIndex, loc.charIndex) : this._getStyleDeclaration(loc.lineIndex, loc.charIndex);\n return style || {};\n },\n\n /**\n * Sets style of a current selection, if no selection exist, do not set anything.\n * @param {Object} [styles] Styles object\n * @param {Number} [startIndex] Start index to get styles at\n * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1\n * @return {fabric.IText} thisArg\n * @chainable\n */\n setSelectionStyles: function setSelectionStyles(styles, startIndex, endIndex) {\n if (typeof startIndex === 'undefined') {\n startIndex = this.selectionStart || 0;\n }\n\n if (typeof endIndex === 'undefined') {\n endIndex = this.selectionEnd || startIndex;\n }\n\n for (var i = startIndex; i < endIndex; i++) {\n this._extendStyles(i, styles);\n }\n /* not included in _extendStyles to avoid clearing cache more than once */\n\n\n this._forceClearCache = true;\n return this;\n },\n\n /**\n * get the reference, not a clone, of the style object for a given character\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @return {Object} style object\n */\n _getStyleDeclaration: function _getStyleDeclaration(lineIndex, charIndex) {\n var lineStyle = this.styles && this.styles[lineIndex];\n\n if (!lineStyle) {\n return null;\n }\n\n return lineStyle[charIndex];\n },\n\n /**\n * return a new object that contains all the style property for a character\n * the object returned is newly created\n * @param {Number} lineIndex of the line where the character is\n * @param {Number} charIndex position of the character on the line\n * @return {Object} style object\n */\n getCompleteStyleDeclaration: function getCompleteStyleDeclaration(lineIndex, charIndex) {\n var style = this._getStyleDeclaration(lineIndex, charIndex) || {},\n styleObject = {},\n prop;\n\n for (var i = 0; i < this._styleProperties.length; i++) {\n prop = this._styleProperties[i];\n styleObject[prop] = typeof style[prop] === 'undefined' ? this[prop] : style[prop];\n }\n\n return styleObject;\n },\n\n /**\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @param {Object} style\n * @private\n */\n _setStyleDeclaration: function _setStyleDeclaration(lineIndex, charIndex, style) {\n this.styles[lineIndex][charIndex] = style;\n },\n\n /**\n *\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @private\n */\n _deleteStyleDeclaration: function _deleteStyleDeclaration(lineIndex, charIndex) {\n delete this.styles[lineIndex][charIndex];\n },\n\n /**\n * @param {Number} lineIndex\n * @return {Boolean} if the line exists or not\n * @private\n */\n _getLineStyle: function _getLineStyle(lineIndex) {\n return !!this.styles[lineIndex];\n },\n\n /**\n * Set the line style to an empty object so that is initialized\n * @param {Number} lineIndex\n * @private\n */\n _setLineStyle: function _setLineStyle(lineIndex) {\n this.styles[lineIndex] = {};\n },\n\n /**\n * @param {Number} lineIndex\n * @private\n */\n _deleteLineStyle: function _deleteLineStyle(lineIndex) {\n delete this.styles[lineIndex];\n }\n });\n})();\n\n(function () {\n function parseDecoration(object) {\n if (object.textDecoration) {\n object.textDecoration.indexOf('underline') > -1 && (object.underline = true);\n object.textDecoration.indexOf('line-through') > -1 && (object.linethrough = true);\n object.textDecoration.indexOf('overline') > -1 && (object.overline = true);\n delete object.textDecoration;\n }\n }\n /**\n * IText class (introduced in <b>v1.4</b>) Events are also fired with \"text:\"\n * prefix when observing canvas.\n * @class fabric.IText\n * @extends fabric.Text\n * @mixes fabric.Observable\n *\n * @fires changed\n * @fires selection:changed\n * @fires editing:entered\n * @fires editing:exited\n *\n * @return {fabric.IText} thisArg\n * @see {@link fabric.IText#initialize} for constructor definition\n *\n * <p>Supported key combinations:</p>\n * <pre>\n * Move cursor: left, right, up, down\n * Select character: shift + left, shift + right\n * Select text vertically: shift + up, shift + down\n * Move cursor by word: alt + left, alt + right\n * Select words: shift + alt + left, shift + alt + right\n * Move cursor to line start/end: cmd + left, cmd + right or home, end\n * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end\n * Jump to start/end of text: cmd + up, cmd + down\n * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown\n * Delete character: backspace\n * Delete word: alt + backspace\n * Delete line: cmd + backspace\n * Forward delete: delete\n * Copy text: ctrl/cmd + c\n * Paste text: ctrl/cmd + v\n * Cut text: ctrl/cmd + x\n * Select entire text: ctrl/cmd + a\n * Quit editing tab or esc\n * </pre>\n *\n * <p>Supported mouse/touch combination</p>\n * <pre>\n * Position cursor: click/touch\n * Create selection: click/touch & drag\n * Create selection: click & shift + click\n * Select word: double click\n * Select line: triple click\n * </pre>\n */\n\n\n fabric.IText = fabric.util.createClass(fabric.Text, fabric.Observable,\n /** @lends fabric.IText.prototype */\n {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'i-text',\n\n /**\n * Index where text selection starts (or where cursor is when there is no selection)\n * @type Number\n * @default\n */\n selectionStart: 0,\n\n /**\n * Index where text selection ends\n * @type Number\n * @default\n */\n selectionEnd: 0,\n\n /**\n * Color of text selection\n * @type String\n * @default\n */\n selectionColor: 'rgba(17,119,255,0.3)',\n\n /**\n * Indicates whether text is in editing mode\n * @type Boolean\n * @default\n */\n isEditing: false,\n\n /**\n * Indicates whether a text can be edited\n * @type Boolean\n * @default\n */\n editable: true,\n\n /**\n * Border color of text object while it's in editing mode\n * @type String\n * @default\n */\n editingBorderColor: 'rgba(102,153,255,0.25)',\n\n /**\n * Width of cursor (in px)\n * @type Number\n * @default\n */\n cursorWidth: 2,\n\n /**\n * Color of default cursor (when not overwritten by character style)\n * @type String\n * @default\n */\n cursorColor: '#333',\n\n /**\n * Delay between cursor blink (in ms)\n * @type Number\n * @default\n */\n cursorDelay: 1000,\n\n /**\n * Duration of cursor fadein (in ms)\n * @type Number\n * @default\n */\n cursorDuration: 600,\n\n /**\n * Indicates whether internal text char widths can be cached\n * @type Boolean\n * @default\n */\n caching: true,\n\n /**\n * @private\n */\n _reSpace: /\\s|\\n/,\n\n /**\n * @private\n */\n _currentCursorOpacity: 0,\n\n /**\n * @private\n */\n _selectionDirection: null,\n\n /**\n * @private\n */\n _abortCursorAnimation: false,\n\n /**\n * @private\n */\n __widthOfSpace: [],\n\n /**\n * Helps determining when the text is in composition, so that the cursor\n * rendering is altered.\n */\n inCompositionMode: false,\n\n /**\n * Constructor\n * @param {String} text Text string\n * @param {Object} [options] Options object\n * @return {fabric.IText} thisArg\n */\n initialize: function initialize(text, options) {\n this.callSuper('initialize', text, options);\n this.initBehavior();\n },\n\n /**\n * Sets selection start (left boundary of a selection)\n * @param {Number} index Index to set selection start to\n */\n setSelectionStart: function setSelectionStart(index) {\n index = Math.max(index, 0);\n\n this._updateAndFire('selectionStart', index);\n },\n\n /**\n * Sets selection end (right boundary of a selection)\n * @param {Number} index Index to set selection end to\n */\n setSelectionEnd: function setSelectionEnd(index) {\n index = Math.min(index, this.text.length);\n\n this._updateAndFire('selectionEnd', index);\n },\n\n /**\n * @private\n * @param {String} property 'selectionStart' or 'selectionEnd'\n * @param {Number} index new position of property\n */\n _updateAndFire: function _updateAndFire(property, index) {\n if (this[property] !== index) {\n this._fireSelectionChanged();\n\n this[property] = index;\n }\n\n this._updateTextarea();\n },\n\n /**\n * Fires the even of selection changed\n * @private\n */\n _fireSelectionChanged: function _fireSelectionChanged() {\n this.fire('selection:changed');\n this.canvas && this.canvas.fire('text:selection:changed', {\n target: this\n });\n },\n\n /**\n * Initialize text dimensions. Render all text on given context\n * or on a offscreen canvas to get the text width with measureText.\n * Updates this.width and this.height with the proper values.\n * Does not return dimensions.\n * @private\n */\n initDimensions: function initDimensions() {\n this.isEditing && this.initDelayedCursor();\n this.clearContextTop();\n this.callSuper('initDimensions');\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n render: function render(ctx) {\n this.clearContextTop();\n this.callSuper('render', ctx); // clear the cursorOffsetCache, so we ensure to calculate once per renderCursor\n // the correct position but not at every cursor animation.\n\n this.cursorOffsetCache = {};\n this.renderCursorOrSelection();\n },\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} ctx Context to render on\n */\n _render: function _render(ctx) {\n this.callSuper('_render', ctx);\n },\n\n /**\n * Prepare and clean the contextTop\n */\n clearContextTop: function clearContextTop(skipRestore) {\n if (!this.isEditing || !this.canvas || !this.canvas.contextTop) {\n return;\n }\n\n var ctx = this.canvas.contextTop,\n v = this.canvas.viewportTransform;\n ctx.save();\n ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);\n this.transform(ctx);\n this.transformMatrix && ctx.transform.apply(ctx, this.transformMatrix);\n\n this._clearTextArea(ctx);\n\n skipRestore || ctx.restore();\n },\n\n /**\n * Renders cursor or selection (depending on what exists)\n * it does on the contextTop. If contextTop is not available, do nothing.\n */\n renderCursorOrSelection: function renderCursorOrSelection() {\n if (!this.isEditing || !this.canvas || !this.canvas.contextTop) {\n return;\n }\n\n var boundaries = this._getCursorBoundaries(),\n ctx = this.canvas.contextTop;\n\n this.clearContextTop(true);\n\n if (this.selectionStart === this.selectionEnd) {\n this.renderCursor(boundaries, ctx);\n } else {\n this.renderSelection(boundaries, ctx);\n }\n\n ctx.restore();\n },\n _clearTextArea: function _clearTextArea(ctx) {\n // we add 4 pixel, to be sure to do not leave any pixel out\n var width = this.width + 4,\n height = this.height + 4;\n ctx.clearRect(-width / 2, -height / 2, width, height);\n },\n\n /**\n * Returns cursor boundaries (left, top, leftOffset, topOffset)\n * @private\n * @param {Array} chars Array of characters\n * @param {String} typeOfBoundaries\n */\n _getCursorBoundaries: function _getCursorBoundaries(position) {\n // left/top are left/top of entire text box\n // leftOffset/topOffset are offset from that left/top point of a text box\n if (typeof position === 'undefined') {\n position = this.selectionStart;\n }\n\n var left = this._getLeftOffset(),\n top = this._getTopOffset(),\n offsets = this._getCursorBoundariesOffsets(position);\n\n return {\n left: left,\n top: top,\n leftOffset: offsets.left,\n topOffset: offsets.top\n };\n },\n\n /**\n * @private\n */\n _getCursorBoundariesOffsets: function _getCursorBoundariesOffsets(position) {\n if (this.cursorOffsetCache && 'top' in this.cursorOffsetCache) {\n return this.cursorOffsetCache;\n }\n\n var lineLeftOffset,\n lineIndex,\n charIndex,\n topOffset = 0,\n leftOffset = 0,\n boundaries,\n cursorPosition = this.get2DCursorLocation(position);\n charIndex = cursorPosition.charIndex;\n lineIndex = cursorPosition.lineIndex;\n\n for (var i = 0; i < lineIndex; i++) {\n topOffset += this.getHeightOfLine(i);\n }\n\n lineLeftOffset = this._getLineLeftOffset(lineIndex);\n var bound = this.__charBounds[lineIndex][charIndex];\n bound && (leftOffset = bound.left);\n\n if (this.charSpacing !== 0 && charIndex === this._textLines[lineIndex].length) {\n leftOffset -= this._getWidthOfCharSpacing();\n }\n\n boundaries = {\n top: topOffset,\n left: lineLeftOffset + (leftOffset > 0 ? leftOffset : 0)\n };\n this.cursorOffsetCache = boundaries;\n return this.cursorOffsetCache;\n },\n\n /**\n * Renders cursor\n * @param {Object} boundaries\n * @param {CanvasRenderingContext2D} ctx transformed context to draw on\n */\n renderCursor: function renderCursor(boundaries, ctx) {\n var cursorLocation = this.get2DCursorLocation(),\n lineIndex = cursorLocation.lineIndex,\n charIndex = cursorLocation.charIndex > 0 ? cursorLocation.charIndex - 1 : 0,\n charHeight = this.getValueOfPropertyAt(lineIndex, charIndex, 'fontSize'),\n multiplier = this.scaleX * this.canvas.getZoom(),\n cursorWidth = this.cursorWidth / multiplier,\n topOffset = boundaries.topOffset,\n dy = this.getValueOfPropertyAt(lineIndex, charIndex, 'deltaY');\n topOffset += (1 - this._fontSizeFraction) * this.getHeightOfLine(lineIndex) / this.lineHeight - charHeight * (1 - this._fontSizeFraction);\n\n if (this.inCompositionMode) {\n this.renderSelection(boundaries, ctx);\n }\n\n ctx.fillStyle = this.getValueOfPropertyAt(lineIndex, charIndex, 'fill');\n ctx.globalAlpha = this.__isMousedown ? 1 : this._currentCursorOpacity;\n ctx.fillRect(boundaries.left + boundaries.leftOffset - cursorWidth / 2, topOffset + boundaries.top + dy, cursorWidth, charHeight);\n },\n\n /**\n * Renders text selection\n * @param {Object} boundaries Object with left/top/leftOffset/topOffset\n * @param {CanvasRenderingContext2D} ctx transformed context to draw on\n */\n renderSelection: function renderSelection(boundaries, ctx) {\n var selectionStart = this.inCompositionMode ? this.hiddenTextarea.selectionStart : this.selectionStart,\n selectionEnd = this.inCompositionMode ? this.hiddenTextarea.selectionEnd : this.selectionEnd,\n isJustify = this.textAlign.indexOf('justify') !== -1,\n start = this.get2DCursorLocation(selectionStart),\n end = this.get2DCursorLocation(selectionEnd),\n startLine = start.lineIndex,\n endLine = end.lineIndex,\n startChar = start.charIndex < 0 ? 0 : start.charIndex,\n endChar = end.charIndex < 0 ? 0 : end.charIndex;\n\n for (var i = startLine; i <= endLine; i++) {\n var lineOffset = this._getLineLeftOffset(i) || 0,\n lineHeight = this.getHeightOfLine(i),\n realLineHeight = 0,\n boxStart = 0,\n boxEnd = 0;\n\n if (i === startLine) {\n boxStart = this.__charBounds[startLine][startChar].left;\n }\n\n if (i >= startLine && i < endLine) {\n boxEnd = isJustify && !this.isEndOfWrapping(i) ? this.width : this.getLineWidth(i) || 5; // WTF is this 5?\n } else if (i === endLine) {\n if (endChar === 0) {\n boxEnd = this.__charBounds[endLine][endChar].left;\n } else {\n var charSpacing = this._getWidthOfCharSpacing();\n\n boxEnd = this.__charBounds[endLine][endChar - 1].left + this.__charBounds[endLine][endChar - 1].width - charSpacing;\n }\n }\n\n realLineHeight = lineHeight;\n\n if (this.lineHeight < 1 || i === endLine && this.lineHeight > 1) {\n lineHeight /= this.lineHeight;\n }\n\n if (this.inCompositionMode) {\n ctx.fillStyle = this.compositionColor || 'black';\n ctx.fillRect(boundaries.left + lineOffset + boxStart, boundaries.top + boundaries.topOffset + lineHeight, boxEnd - boxStart, 1);\n } else {\n ctx.fillStyle = this.selectionColor;\n ctx.fillRect(boundaries.left + lineOffset + boxStart, boundaries.top + boundaries.topOffset, boxEnd - boxStart, lineHeight);\n }\n\n boundaries.topOffset += realLineHeight;\n }\n },\n\n /**\n * High level function to know the height of the cursor.\n * the currentChar is the one that precedes the cursor\n * Returns fontSize of char at the current cursor\n * @return {Number} Character font size\n */\n getCurrentCharFontSize: function getCurrentCharFontSize() {\n var cp = this._getCurrentCharIndex();\n\n return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');\n },\n\n /**\n * High level function to know the color of the cursor.\n * the currentChar is the one that precedes the cursor\n * Returns color (fill) of char at the current cursor\n * @return {String} Character color (fill)\n */\n getCurrentCharColor: function getCurrentCharColor() {\n var cp = this._getCurrentCharIndex();\n\n return this.getValueOfPropertyAt(cp.l, cp.c, 'fill');\n },\n\n /**\n * Returns the cursor position for the getCurrent.. functions\n * @private\n */\n _getCurrentCharIndex: function _getCurrentCharIndex() {\n var cursorPosition = this.get2DCursorLocation(this.selectionStart, true),\n charIndex = cursorPosition.charIndex > 0 ? cursorPosition.charIndex - 1 : 0;\n return {\n l: cursorPosition.lineIndex,\n c: charIndex\n };\n }\n });\n /**\n * Returns fabric.IText instance from an object representation\n * @static\n * @memberOf fabric.IText\n * @param {Object} object Object to create an instance from\n * @param {function} [callback] invoked with new instance as argument\n */\n\n fabric.IText.fromObject = function (object, callback) {\n parseDecoration(object);\n\n if (object.styles) {\n for (var i in object.styles) {\n for (var j in object.styles[i]) {\n parseDecoration(object.styles[i][j]);\n }\n }\n }\n\n fabric.Object._fromObject('IText', object, callback, 'text');\n };\n})();\n\n(function () {\n var clone = fabric.util.object.clone;\n fabric.util.object.extend(fabric.IText.prototype,\n /** @lends fabric.IText.prototype */\n {\n /**\n * Initializes all the interactive behavior of IText\n */\n initBehavior: function initBehavior() {\n this.initAddedHandler();\n this.initRemovedHandler();\n this.initCursorSelectionHandlers();\n this.initDoubleClickSimulation();\n this.mouseMoveHandler = this.mouseMoveHandler.bind(this);\n },\n onDeselect: function onDeselect() {\n this.isEditing && this.exitEditing();\n this.selected = false;\n },\n\n /**\n * Initializes \"added\" event handler\n */\n initAddedHandler: function initAddedHandler() {\n var _this = this;\n\n this.on('added', function () {\n var canvas = _this.canvas;\n\n if (canvas) {\n if (!canvas._hasITextHandlers) {\n canvas._hasITextHandlers = true;\n\n _this._initCanvasHandlers(canvas);\n }\n\n canvas._iTextInstances = canvas._iTextInstances || [];\n\n canvas._iTextInstances.push(_this);\n }\n });\n },\n initRemovedHandler: function initRemovedHandler() {\n var _this = this;\n\n this.on('removed', function () {\n var canvas = _this.canvas;\n\n if (canvas) {\n canvas._iTextInstances = canvas._iTextInstances || [];\n fabric.util.removeFromArray(canvas._iTextInstances, _this);\n\n if (canvas._iTextInstances.length === 0) {\n canvas._hasITextHandlers = false;\n\n _this._removeCanvasHandlers(canvas);\n }\n }\n });\n },\n\n /**\n * register canvas event to manage exiting on other instances\n * @private\n */\n _initCanvasHandlers: function _initCanvasHandlers(canvas) {\n canvas._mouseUpITextHandler = function () {\n if (canvas._iTextInstances) {\n canvas._iTextInstances.forEach(function (obj) {\n obj.__isMousedown = false;\n });\n }\n };\n\n canvas.on('mouse:up', canvas._mouseUpITextHandler);\n },\n\n /**\n * remove canvas event to manage exiting on other instances\n * @private\n */\n _removeCanvasHandlers: function _removeCanvasHandlers(canvas) {\n canvas.off('mouse:up', canvas._mouseUpITextHandler);\n },\n\n /**\n * @private\n */\n _tick: function _tick() {\n this._currentTickState = this._animateCursor(this, 1, this.cursorDuration, '_onTickComplete');\n },\n\n /**\n * @private\n */\n _animateCursor: function _animateCursor(obj, targetOpacity, duration, completeMethod) {\n var tickState;\n tickState = {\n isAborted: false,\n abort: function abort() {\n this.isAborted = true;\n }\n };\n obj.animate('_currentCursorOpacity', targetOpacity, {\n duration: duration,\n onComplete: function onComplete() {\n if (!tickState.isAborted) {\n obj[completeMethod]();\n }\n },\n onChange: function onChange() {\n // we do not want to animate a selection, only cursor\n if (obj.canvas && obj.selectionStart === obj.selectionEnd) {\n obj.renderCursorOrSelection();\n }\n },\n abort: function abort() {\n return tickState.isAborted;\n }\n });\n return tickState;\n },\n\n /**\n * @private\n */\n _onTickComplete: function _onTickComplete() {\n var _this = this;\n\n if (this._cursorTimeout1) {\n clearTimeout(this._cursorTimeout1);\n }\n\n this._cursorTimeout1 = setTimeout(function () {\n _this._currentTickCompleteState = _this._animateCursor(_this, 0, this.cursorDuration / 2, '_tick');\n }, 100);\n },\n\n /**\n * Initializes delayed cursor\n */\n initDelayedCursor: function initDelayedCursor(restart) {\n var _this = this,\n delay = restart ? 0 : this.cursorDelay;\n\n this.abortCursorAnimation();\n this._currentCursorOpacity = 1;\n this._cursorTimeout2 = setTimeout(function () {\n _this._tick();\n }, delay);\n },\n\n /**\n * Aborts cursor animation and clears all timeouts\n */\n abortCursorAnimation: function abortCursorAnimation() {\n var shouldClear = this._currentTickState || this._currentTickCompleteState,\n canvas = this.canvas;\n this._currentTickState && this._currentTickState.abort();\n this._currentTickCompleteState && this._currentTickCompleteState.abort();\n clearTimeout(this._cursorTimeout1);\n clearTimeout(this._cursorTimeout2);\n this._currentCursorOpacity = 0; // to clear just itext area we need to transform the context\n // it may not be worth it\n\n if (shouldClear && canvas) {\n canvas.clearContext(canvas.contextTop || canvas.contextContainer);\n }\n },\n\n /**\n * Selects entire text\n * @return {fabric.IText} thisArg\n * @chainable\n */\n selectAll: function selectAll() {\n this.selectionStart = 0;\n this.selectionEnd = this._text.length;\n\n this._fireSelectionChanged();\n\n this._updateTextarea();\n\n return this;\n },\n\n /**\n * Returns selected text\n * @return {String}\n */\n getSelectedText: function getSelectedText() {\n return this._text.slice(this.selectionStart, this.selectionEnd).join('');\n },\n\n /**\n * Find new selection index representing start of current word according to current selection index\n * @param {Number} startFrom Current selection index\n * @return {Number} New selection index\n */\n findWordBoundaryLeft: function findWordBoundaryLeft(startFrom) {\n var offset = 0,\n index = startFrom - 1; // remove space before cursor first\n\n if (this._reSpace.test(this._text[index])) {\n while (this._reSpace.test(this._text[index])) {\n offset++;\n index--;\n }\n }\n\n while (/\\S/.test(this._text[index]) && index > -1) {\n offset++;\n index--;\n }\n\n return startFrom - offset;\n },\n\n /**\n * Find new selection index representing end of current word according to current selection index\n * @param {Number} startFrom Current selection index\n * @return {Number} New selection index\n */\n findWordBoundaryRight: function findWordBoundaryRight(startFrom) {\n var offset = 0,\n index = startFrom; // remove space after cursor first\n\n if (this._reSpace.test(this._text[index])) {\n while (this._reSpace.test(this._text[index])) {\n offset++;\n index++;\n }\n }\n\n while (/\\S/.test(this._text[index]) && index < this._text.length) {\n offset++;\n index++;\n }\n\n return startFrom + offset;\n },\n\n /**\n * Find new selection index representing start of current line according to current selection index\n * @param {Number} startFrom Current selection index\n * @return {Number} New selection index\n */\n findLineBoundaryLeft: function findLineBoundaryLeft(startFrom) {\n var offset = 0,\n index = startFrom - 1;\n\n while (!/\\n/.test(this._text[index]) && index > -1) {\n offset++;\n index--;\n }\n\n return startFrom - offset;\n },\n\n /**\n * Find new selection index representing end of current line according to current selection index\n * @param {Number} startFrom Current selection index\n * @return {Number} New selection index\n */\n findLineBoundaryRight: function findLineBoundaryRight(startFrom) {\n var offset = 0,\n index = startFrom;\n\n while (!/\\n/.test(this._text[index]) && index < this._text.length) {\n offset++;\n index++;\n }\n\n return startFrom + offset;\n },\n\n /**\n * Finds index corresponding to beginning or end of a word\n * @param {Number} selectionStart Index of a character\n * @param {Number} direction 1 or -1\n * @return {Number} Index of the beginning or end of a word\n */\n searchWordBoundary: function searchWordBoundary(selectionStart, direction) {\n var text = this._text,\n index = this._reSpace.test(text[selectionStart]) ? selectionStart - 1 : selectionStart,\n _char = text[index],\n // wrong\n reNonWord = fabric.reNonWord;\n\n while (!reNonWord.test(_char) && index > 0 && index < text.length) {\n index += direction;\n _char = text[index];\n }\n\n if (reNonWord.test(_char)) {\n index += direction === 1 ? 0 : 1;\n }\n\n return index;\n },\n\n /**\n * Selects a word based on the index\n * @param {Number} selectionStart Index of a character\n */\n selectWord: function selectWord(selectionStart) {\n selectionStart = selectionStart || this.selectionStart;\n var newSelectionStart = this.searchWordBoundary(selectionStart, -1),\n\n /* search backwards */\n newSelectionEnd = this.searchWordBoundary(selectionStart, 1);\n /* search forward */\n\n this.selectionStart = newSelectionStart;\n this.selectionEnd = newSelectionEnd;\n\n this._fireSelectionChanged();\n\n this._updateTextarea();\n\n this.renderCursorOrSelection();\n },\n\n /**\n * Selects a line based on the index\n * @param {Number} selectionStart Index of a character\n * @return {fabric.IText} thisArg\n * @chainable\n */\n selectLine: function selectLine(selectionStart) {\n selectionStart = selectionStart || this.selectionStart;\n var newSelectionStart = this.findLineBoundaryLeft(selectionStart),\n newSelectionEnd = this.findLineBoundaryRight(selectionStart);\n this.selectionStart = newSelectionStart;\n this.selectionEnd = newSelectionEnd;\n\n this._fireSelectionChanged();\n\n this._updateTextarea();\n\n return this;\n },\n\n /**\n * Enters editing state\n * @return {fabric.IText} thisArg\n * @chainable\n */\n enterEditing: function enterEditing(e) {\n if (this.isEditing || !this.editable) {\n return;\n }\n\n if (this.canvas) {\n this.canvas.calcOffset();\n this.exitEditingOnOthers(this.canvas);\n }\n\n this.isEditing = true;\n this.initHiddenTextarea(e);\n this.hiddenTextarea.focus();\n this.hiddenTextarea.value = this.text;\n\n this._updateTextarea();\n\n this._saveEditingProps();\n\n this._setEditingProps();\n\n this._textBeforeEdit = this.text;\n\n this._tick();\n\n this.fire('editing:entered');\n\n this._fireSelectionChanged();\n\n if (!this.canvas) {\n return this;\n }\n\n this.canvas.fire('text:editing:entered', {\n target: this\n });\n this.initMouseMoveHandler();\n this.canvas.requestRenderAll();\n return this;\n },\n exitEditingOnOthers: function exitEditingOnOthers(canvas) {\n if (canvas._iTextInstances) {\n canvas._iTextInstances.forEach(function (obj) {\n obj.selected = false;\n\n if (obj.isEditing) {\n obj.exitEditing();\n }\n });\n }\n },\n\n /**\n * Initializes \"mousemove\" event handler\n */\n initMouseMoveHandler: function initMouseMoveHandler() {\n this.canvas.on('mouse:move', this.mouseMoveHandler);\n },\n\n /**\n * @private\n */\n mouseMoveHandler: function mouseMoveHandler(options) {\n if (!this.__isMousedown || !this.isEditing) {\n return;\n }\n\n var newSelectionStart = this.getSelectionStartFromPointer(options.e),\n currentStart = this.selectionStart,\n currentEnd = this.selectionEnd;\n\n if ((newSelectionStart !== this.__selectionStartOnMouseDown || currentStart === currentEnd) && (currentStart === newSelectionStart || currentEnd === newSelectionStart)) {\n return;\n }\n\n if (newSelectionStart > this.__selectionStartOnMouseDown) {\n this.selectionStart = this.__selectionStartOnMouseDown;\n this.selectionEnd = newSelectionStart;\n } else {\n this.selectionStart = newSelectionStart;\n this.selectionEnd = this.__selectionStartOnMouseDown;\n }\n\n if (this.selectionStart !== currentStart || this.selectionEnd !== currentEnd) {\n this.restartCursorIfNeeded();\n\n this._fireSelectionChanged();\n\n this._updateTextarea();\n\n this.renderCursorOrSelection();\n }\n },\n\n /**\n * @private\n */\n _setEditingProps: function _setEditingProps() {\n this.hoverCursor = 'text';\n\n if (this.canvas) {\n this.canvas.defaultCursor = this.canvas.moveCursor = 'text';\n }\n\n this.borderColor = this.editingBorderColor;\n this.hasControls = this.selectable = false;\n this.lockMovementX = this.lockMovementY = true;\n },\n\n /**\n * convert from textarea to grapheme indexes\n */\n fromStringToGraphemeSelection: function fromStringToGraphemeSelection(start, end, text) {\n var smallerTextStart = text.slice(0, start),\n graphemeStart = fabric.util.string.graphemeSplit(smallerTextStart).length;\n\n if (start === end) {\n return {\n selectionStart: graphemeStart,\n selectionEnd: graphemeStart\n };\n }\n\n var smallerTextEnd = text.slice(start, end),\n graphemeEnd = fabric.util.string.graphemeSplit(smallerTextEnd).length;\n return {\n selectionStart: graphemeStart,\n selectionEnd: graphemeStart + graphemeEnd\n };\n },\n\n /**\n * convert from fabric to textarea values\n */\n fromGraphemeToStringSelection: function fromGraphemeToStringSelection(start, end, _text) {\n var smallerTextStart = _text.slice(0, start),\n graphemeStart = smallerTextStart.join('').length;\n\n if (start === end) {\n return {\n selectionStart: graphemeStart,\n selectionEnd: graphemeStart\n };\n }\n\n var smallerTextEnd = _text.slice(start, end),\n graphemeEnd = smallerTextEnd.join('').length;\n\n return {\n selectionStart: graphemeStart,\n selectionEnd: graphemeStart + graphemeEnd\n };\n },\n\n /**\n * @private\n */\n _updateTextarea: function _updateTextarea() {\n this.cursorOffsetCache = {};\n\n if (!this.hiddenTextarea) {\n return;\n }\n\n if (!this.inCompositionMode) {\n var newSelection = this.fromGraphemeToStringSelection(this.selectionStart, this.selectionEnd, this._text);\n this.hiddenTextarea.selectionStart = newSelection.selectionStart;\n this.hiddenTextarea.selectionEnd = newSelection.selectionEnd;\n }\n\n this.updateTextareaPosition();\n },\n\n /**\n * @private\n */\n updateFromTextArea: function updateFromTextArea() {\n if (!this.hiddenTextarea) {\n return;\n }\n\n this.cursorOffsetCache = {};\n this.text = this.hiddenTextarea.value;\n\n if (this._shouldClearDimensionCache()) {\n this.initDimensions();\n this.setCoords();\n }\n\n var newSelection = this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart, this.hiddenTextarea.selectionEnd, this.hiddenTextarea.value);\n this.selectionEnd = this.selectionStart = newSelection.selectionEnd;\n\n if (!this.inCompositionMode) {\n this.selectionStart = newSelection.selectionStart;\n }\n\n this.updateTextareaPosition();\n },\n\n /**\n * @private\n */\n updateTextareaPosition: function updateTextareaPosition() {\n if (this.selectionStart === this.selectionEnd) {\n var style = this._calcTextareaPosition();\n\n this.hiddenTextarea.style.left = style.left;\n this.hiddenTextarea.style.top = style.top;\n }\n },\n\n /**\n * @private\n * @return {Object} style contains style for hiddenTextarea\n */\n _calcTextareaPosition: function _calcTextareaPosition() {\n if (!this.canvas) {\n return {\n x: 1,\n y: 1\n };\n }\n\n var desiredPosition = this.inCompositionMode ? this.compositionStart : this.selectionStart,\n boundaries = this._getCursorBoundaries(desiredPosition),\n cursorLocation = this.get2DCursorLocation(desiredPosition),\n lineIndex = cursorLocation.lineIndex,\n charIndex = cursorLocation.charIndex,\n charHeight = this.getValueOfPropertyAt(lineIndex, charIndex, 'fontSize') * this.lineHeight,\n leftOffset = boundaries.leftOffset,\n m = this.calcTransformMatrix(),\n p = {\n x: boundaries.left + leftOffset,\n y: boundaries.top + boundaries.topOffset + charHeight\n },\n retinaScaling = this.canvas.getRetinaScaling(),\n upperCanvas = this.canvas.upperCanvasEl,\n upperCanvasWidth = upperCanvas.width / retinaScaling,\n upperCanvasHeight = upperCanvas.height / retinaScaling,\n maxWidth = upperCanvasWidth - charHeight,\n maxHeight = upperCanvasHeight - charHeight,\n scaleX = upperCanvas.clientWidth / upperCanvasWidth,\n scaleY = upperCanvas.clientHeight / upperCanvasHeight;\n\n p = fabric.util.transformPoint(p, m);\n p = fabric.util.transformPoint(p, this.canvas.viewportTransform);\n p.x *= scaleX;\n p.y *= scaleY;\n\n if (p.x < 0) {\n p.x = 0;\n }\n\n if (p.x > maxWidth) {\n p.x = maxWidth;\n }\n\n if (p.y < 0) {\n p.y = 0;\n }\n\n if (p.y > maxHeight) {\n p.y = maxHeight;\n } // Don't add canvas offset to the document since we are overriding standard behavior\n // and placing the textrea within the container rather than at the end of the document\n // p.x += this.canvas._offset.left;\n // p.y += this.canvas._offset.top;\n\n\n return {\n left: p.x + 'px',\n top: p.y + 'px',\n fontSize: charHeight + 'px',\n charHeight: charHeight\n };\n },\n\n /**\n * @private\n */\n _saveEditingProps: function _saveEditingProps() {\n this._savedProps = {\n hasControls: this.hasControls,\n borderColor: this.borderColor,\n lockMovementX: this.lockMovementX,\n lockMovementY: this.lockMovementY,\n hoverCursor: this.hoverCursor,\n selectable: this.selectable,\n defaultCursor: this.canvas && this.canvas.defaultCursor,\n moveCursor: this.canvas && this.canvas.moveCursor\n };\n },\n\n /**\n * @private\n */\n _restoreEditingProps: function _restoreEditingProps() {\n if (!this._savedProps) {\n return;\n }\n\n this.hoverCursor = this._savedProps.hoverCursor;\n this.hasControls = this._savedProps.hasControls;\n this.borderColor = this._savedProps.borderColor;\n this.selectable = this._savedProps.selectable;\n this.lockMovementX = this._savedProps.lockMovementX;\n this.lockMovementY = this._savedProps.lockMovementY;\n\n if (this.canvas) {\n this.canvas.defaultCursor = this._savedProps.defaultCursor;\n this.canvas.moveCursor = this._savedProps.moveCursor;\n }\n },\n\n /**\n * Exits from editing state\n * @return {fabric.IText} thisArg\n * @chainable\n */\n exitEditing: function exitEditing() {\n var isTextChanged = this._textBeforeEdit !== this.text;\n var hiddenTextarea = this.hiddenTextarea;\n this.selected = false;\n this.isEditing = false;\n this.selectionEnd = this.selectionStart;\n\n if (hiddenTextarea) {\n hiddenTextarea.blur && hiddenTextarea.blur();\n hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);\n }\n\n this.hiddenTextarea = null;\n this.abortCursorAnimation();\n\n this._restoreEditingProps();\n\n this._currentCursorOpacity = 0;\n\n if (this._shouldClearDimensionCache()) {\n this.initDimensions();\n this.setCoords();\n }\n\n this.fire('editing:exited');\n isTextChanged && this.fire('modified');\n\n if (this.canvas) {\n this.canvas.off('mouse:move', this.mouseMoveHandler);\n this.canvas.fire('text:editing:exited', {\n target: this\n });\n isTextChanged && this.canvas.fire('object:modified', {\n target: this\n });\n }\n\n return this;\n },\n\n /**\n * @private\n */\n _removeExtraneousStyles: function _removeExtraneousStyles() {\n for (var prop in this.styles) {\n if (!this._textLines[prop]) {\n delete this.styles[prop];\n }\n }\n },\n\n /**\n * remove and reflow a style block from start to end.\n * @param {Number} start linear start position for removal (included in removal)\n * @param {Number} end linear end position for removal ( excluded from removal )\n */\n removeStyleFromTo: function removeStyleFromTo(start, end) {\n var cursorStart = this.get2DCursorLocation(start, true),\n cursorEnd = this.get2DCursorLocation(end, true),\n lineStart = cursorStart.lineIndex,\n charStart = cursorStart.charIndex,\n lineEnd = cursorEnd.lineIndex,\n charEnd = cursorEnd.charIndex,\n i,\n styleObj;\n\n if (lineStart !== lineEnd) {\n // step1 remove the trailing of lineStart\n if (this.styles[lineStart]) {\n for (i = charStart; i < this._unwrappedTextLines[lineStart].length; i++) {\n delete this.styles[lineStart][i];\n }\n } // step2 move the trailing of lineEnd to lineStart if needed\n\n\n if (this.styles[lineEnd]) {\n for (i = charEnd; i < this._unwrappedTextLines[lineEnd].length; i++) {\n styleObj = this.styles[lineEnd][i];\n\n if (styleObj) {\n this.styles[lineStart] || (this.styles[lineStart] = {});\n this.styles[lineStart][charStart + i - charEnd] = styleObj;\n }\n }\n } // step3 detects lines will be completely removed.\n\n\n for (i = lineStart + 1; i <= lineEnd; i++) {\n delete this.styles[i];\n } // step4 shift remaining lines.\n\n\n this.shiftLineStyles(lineEnd, lineStart - lineEnd);\n } else {\n // remove and shift left on the same line\n if (this.styles[lineStart]) {\n styleObj = this.styles[lineStart];\n\n var diff = charEnd - charStart,\n numericChar,\n _char;\n\n for (i = charStart; i < charEnd; i++) {\n delete styleObj[i];\n }\n\n for (_char in this.styles[lineStart]) {\n numericChar = parseInt(_char, 10);\n\n if (numericChar >= charEnd) {\n styleObj[numericChar - diff] = styleObj[_char];\n delete styleObj[_char];\n }\n }\n }\n }\n },\n\n /**\n * Shifts line styles up or down\n * @param {Number} lineIndex Index of a line\n * @param {Number} offset Can any number?\n */\n shiftLineStyles: function shiftLineStyles(lineIndex, offset) {\n // shift all line styles by offset upward or downward\n // do not clone deep. we need new array, not new style objects\n var clonedStyles = clone(this.styles);\n\n for (var line in this.styles) {\n var numericLine = parseInt(line, 10);\n\n if (numericLine > lineIndex) {\n this.styles[numericLine + offset] = clonedStyles[numericLine];\n\n if (!clonedStyles[numericLine - offset]) {\n delete this.styles[numericLine];\n }\n }\n }\n },\n restartCursorIfNeeded: function restartCursorIfNeeded() {\n if (!this._currentTickState || this._currentTickState.isAborted || !this._currentTickCompleteState || this._currentTickCompleteState.isAborted) {\n this.initDelayedCursor();\n }\n },\n\n /**\n * Inserts new style object\n * @param {Number} lineIndex Index of a line\n * @param {Number} charIndex Index of a char\n * @param {Number} qty number of lines to add\n * @param {Array} copiedStyle Array of objects styles\n */\n insertNewlineStyleObject: function insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {\n var currentCharStyle,\n newLineStyles = {},\n somethingAdded = false;\n qty || (qty = 1);\n this.shiftLineStyles(lineIndex, qty);\n\n if (this.styles[lineIndex]) {\n currentCharStyle = this.styles[lineIndex][charIndex === 0 ? charIndex : charIndex - 1];\n } // we clone styles of all chars\n // after cursor onto the current line\n\n\n for (var index in this.styles[lineIndex]) {\n var numIndex = parseInt(index, 10);\n\n if (numIndex >= charIndex) {\n somethingAdded = true;\n newLineStyles[numIndex - charIndex] = this.styles[lineIndex][index]; // remove lines from the previous line since they're on a new line now\n\n delete this.styles[lineIndex][index];\n }\n }\n\n if (somethingAdded) {\n this.styles[lineIndex + qty] = newLineStyles;\n } else {\n delete this.styles[lineIndex + qty];\n } // for the other lines\n // we clone current char style onto the next (otherwise empty) line\n\n\n while (qty > 1) {\n qty--;\n\n if (copiedStyle && copiedStyle[qty]) {\n this.styles[lineIndex + qty] = {\n 0: clone(copiedStyle[qty])\n };\n } else if (currentCharStyle) {\n this.styles[lineIndex + qty] = {\n 0: clone(currentCharStyle)\n };\n } else {\n delete this.styles[lineIndex + qty];\n }\n }\n\n this._forceClearCache = true;\n },\n\n /**\n * Inserts style object for a given line/char index\n * @param {Number} lineIndex Index of a line\n * @param {Number} charIndex Index of a char\n * @param {Number} quantity number Style object to insert, if given\n * @param {Array} copiedStyle array of style objects\n */\n insertCharStyleObject: function insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {\n if (!this.styles) {\n this.styles = {};\n }\n\n var currentLineStyles = this.styles[lineIndex],\n currentLineStylesCloned = currentLineStyles ? clone(currentLineStyles) : {};\n quantity || (quantity = 1); // shift all char styles by quantity forward\n // 0,1,2,3 -> (charIndex=2) -> 0,1,3,4 -> (insert 2) -> 0,1,2,3,4\n\n for (var index in currentLineStylesCloned) {\n var numericIndex = parseInt(index, 10);\n\n if (numericIndex >= charIndex) {\n currentLineStyles[numericIndex + quantity] = currentLineStylesCloned[numericIndex]; // only delete the style if there was nothing moved there\n\n if (!currentLineStylesCloned[numericIndex - quantity]) {\n delete currentLineStyles[numericIndex];\n }\n }\n }\n\n this._forceClearCache = true;\n\n if (copiedStyle) {\n while (quantity--) {\n if (!Object.keys(copiedStyle[quantity]).length) {\n continue;\n }\n\n if (!this.styles[lineIndex]) {\n this.styles[lineIndex] = {};\n }\n\n this.styles[lineIndex][charIndex + quantity] = clone(copiedStyle[quantity]);\n }\n\n return;\n }\n\n if (!currentLineStyles) {\n return;\n }\n\n var newStyle = currentLineStyles[charIndex ? charIndex - 1 : 1];\n\n while (newStyle && quantity--) {\n this.styles[lineIndex][charIndex + quantity] = clone(newStyle);\n }\n },\n\n /**\n * Inserts style object(s)\n * @param {Array} insertedText Characters at the location where style is inserted\n * @param {Number} start cursor index for inserting style\n * @param {Array} [copiedStyle] array of style objects to insert.\n */\n insertNewStyleBlock: function insertNewStyleBlock(insertedText, start, copiedStyle) {\n var cursorLoc = this.get2DCursorLocation(start, true),\n addedLines = [0],\n linesLength = 0;\n\n for (var i = 0; i < insertedText.length; i++) {\n if (insertedText[i] === '\\n') {\n linesLength++;\n addedLines[linesLength] = 0;\n } else {\n addedLines[linesLength]++;\n }\n }\n\n if (addedLines[0] > 0) {\n this.insertCharStyleObject(cursorLoc.lineIndex, cursorLoc.charIndex, addedLines[0], copiedStyle);\n copiedStyle = copiedStyle && copiedStyle.slice(addedLines[0] + 1);\n }\n\n linesLength && this.insertNewlineStyleObject(cursorLoc.lineIndex, cursorLoc.charIndex + addedLines[0], linesLength);\n\n for (var i = 1; i < linesLength; i++) {\n if (addedLines[i] > 0) {\n this.insertCharStyleObject(cursorLoc.lineIndex + i, 0, addedLines[i], copiedStyle);\n } else if (copiedStyle) {\n this.styles[cursorLoc.lineIndex + i][0] = copiedStyle[0];\n }\n\n copiedStyle = copiedStyle && copiedStyle.slice(addedLines[i] + 1);\n } // we use i outside the loop to get it like linesLength\n\n\n if (addedLines[i] > 0) {\n this.insertCharStyleObject(cursorLoc.lineIndex + i, 0, addedLines[i], copiedStyle);\n }\n },\n\n /**\n * Set the selectionStart and selectionEnd according to the new position of cursor\n * mimic the key - mouse navigation when shift is pressed.\n */\n setSelectionStartEndWithShift: function setSelectionStartEndWithShift(start, end, newSelection) {\n if (newSelection <= start) {\n if (end === start) {\n this._selectionDirection = 'left';\n } else if (this._selectionDirection === 'right') {\n this._selectionDirection = 'left';\n this.selectionEnd = start;\n }\n\n this.selectionStart = newSelection;\n } else if (newSelection > start && newSelection < end) {\n if (this._selectionDirection === 'right') {\n this.selectionEnd = newSelection;\n } else {\n this.selectionStart = newSelection;\n }\n } else {\n // newSelection is > selection start and end\n if (end === start) {\n this._selectionDirection = 'right';\n } else if (this._selectionDirection === 'left') {\n this._selectionDirection = 'right';\n this.selectionStart = end;\n }\n\n this.selectionEnd = newSelection;\n }\n },\n setSelectionInBoundaries: function setSelectionInBoundaries() {\n var length = this.text.length;\n\n if (this.selectionStart > length) {\n this.selectionStart = length;\n } else if (this.selectionStart < 0) {\n this.selectionStart = 0;\n }\n\n if (this.selectionEnd > length) {\n this.selectionEnd = length;\n } else if (this.selectionEnd < 0) {\n this.selectionEnd = 0;\n }\n }\n });\n})();\n\nfabric.util.object.extend(fabric.IText.prototype,\n/** @lends fabric.IText.prototype */\n{\n /**\n * Initializes \"dbclick\" event handler\n */\n initDoubleClickSimulation: function initDoubleClickSimulation() {\n // for double click\n this.__lastClickTime = +new Date(); // for triple click\n\n this.__lastLastClickTime = +new Date();\n this.__lastPointer = {};\n this.on('mousedown', this.onMouseDown);\n },\n\n /**\n * Default event handler to simulate triple click\n * @private\n */\n onMouseDown: function onMouseDown(options) {\n if (!this.canvas) {\n return;\n }\n\n this.__newClickTime = +new Date();\n var newPointer = options.pointer;\n\n if (this.isTripleClick(newPointer)) {\n this.fire('tripleclick', options);\n\n this._stopEvent(options.e);\n }\n\n this.__lastLastClickTime = this.__lastClickTime;\n this.__lastClickTime = this.__newClickTime;\n this.__lastPointer = newPointer;\n this.__lastIsEditing = this.isEditing;\n this.__lastSelected = this.selected;\n },\n isTripleClick: function isTripleClick(newPointer) {\n return this.__newClickTime - this.__lastClickTime < 500 && this.__lastClickTime - this.__lastLastClickTime < 500 && this.__lastPointer.x === newPointer.x && this.__lastPointer.y === newPointer.y;\n },\n\n /**\n * @private\n */\n _stopEvent: function _stopEvent(e) {\n e.preventDefault && e.preventDefault();\n e.stopPropagation && e.stopPropagation();\n },\n\n /**\n * Initializes event handlers related to cursor or selection\n */\n initCursorSelectionHandlers: function initCursorSelectionHandlers() {\n this.initMousedownHandler();\n this.initMouseupHandler();\n this.initClicks();\n },\n\n /**\n * Default handler for double click, select a word\n */\n doubleClickHandler: function doubleClickHandler(options) {\n if (!this.isEditing) {\n return;\n }\n\n this.selectWord(this.getSelectionStartFromPointer(options.e));\n },\n\n /**\n * Default handler for triple click, select a line\n */\n tripleClickHandler: function tripleClickHandler(options) {\n if (!this.isEditing) {\n return;\n }\n\n this.selectLine(this.getSelectionStartFromPointer(options.e));\n },\n\n /**\n * Initializes double and triple click event handlers\n */\n initClicks: function initClicks() {\n this.on('mousedblclick', this.doubleClickHandler);\n this.on('tripleclick', this.tripleClickHandler);\n },\n\n /**\n * Default event handler for the basic functionalities needed on _mouseDown\n * can be overridden to do something different.\n * Scope of this implementation is: find the click position, set selectionStart\n * find selectionEnd, initialize the drawing of either cursor or selection area\n * initializing a mousedDown on a text area will cancel fabricjs knowledge of\n * current compositionMode. It will be set to false.\n */\n _mouseDownHandler: function _mouseDownHandler(options) {\n if (!this.canvas || !this.editable || options.e.button && options.e.button !== 1) {\n return;\n }\n\n this.__isMousedown = true;\n\n if (this.selected) {\n this.inCompositionMode = false;\n this.setCursorByClick(options.e);\n }\n\n if (this.isEditing) {\n this.__selectionStartOnMouseDown = this.selectionStart;\n\n if (this.selectionStart === this.selectionEnd) {\n this.abortCursorAnimation();\n }\n\n this.renderCursorOrSelection();\n }\n },\n\n /**\n * Default event handler for the basic functionalities needed on mousedown:before\n * can be overridden to do something different.\n * Scope of this implementation is: verify the object is already selected when mousing down\n */\n _mouseDownHandlerBefore: function _mouseDownHandlerBefore(options) {\n if (!this.canvas || !this.editable || options.e.button && options.e.button !== 1) {\n return;\n } // we want to avoid that an object that was selected and then becomes unselectable,\n // may trigger editing mode in some way.\n\n\n this.selected = this === this.canvas._activeObject;\n },\n\n /**\n * Initializes \"mousedown\" event handler\n */\n initMousedownHandler: function initMousedownHandler() {\n this.on('mousedown', this._mouseDownHandler);\n this.on('mousedown:before', this._mouseDownHandlerBefore);\n },\n\n /**\n * Initializes \"mouseup\" event handler\n */\n initMouseupHandler: function initMouseupHandler() {\n this.on('mouseup', this.mouseUpHandler);\n },\n\n /**\n * standard hander for mouse up, overridable\n * @private\n */\n mouseUpHandler: function mouseUpHandler(options) {\n this.__isMousedown = false;\n\n if (!this.editable || this.group || options.transform && options.transform.actionPerformed || options.e.button && options.e.button !== 1) {\n return;\n }\n\n if (this.canvas) {\n var currentActive = this.canvas._activeObject;\n\n if (currentActive && currentActive !== this) {\n // avoid running this logic when there is an active object\n // this because is possible with shift click and fast clicks,\n // to rapidly deselect and reselect this object and trigger an enterEdit\n return;\n }\n }\n\n if (this.__lastSelected && !this.__corner) {\n this.selected = false;\n this.__lastSelected = false;\n this.enterEditing(options.e);\n\n if (this.selectionStart === this.selectionEnd) {\n this.initDelayedCursor(true);\n } else {\n this.renderCursorOrSelection();\n }\n } else {\n this.selected = true;\n }\n },\n\n /**\n * Changes cursor location in a text depending on passed pointer (x/y) object\n * @param {Event} e Event object\n */\n setCursorByClick: function setCursorByClick(e) {\n var newSelection = this.getSelectionStartFromPointer(e),\n start = this.selectionStart,\n end = this.selectionEnd;\n\n if (e.shiftKey) {\n this.setSelectionStartEndWithShift(start, end, newSelection);\n } else {\n this.selectionStart = newSelection;\n this.selectionEnd = newSelection;\n }\n\n if (this.isEditing) {\n this._fireSelectionChanged();\n\n this._updateTextarea();\n }\n },\n\n /**\n * Returns index of a character corresponding to where an object was clicked\n * @param {Event} e Event object\n * @return {Number} Index of a character\n */\n getSelectionStartFromPointer: function getSelectionStartFromPointer(e) {\n var mouseOffset = this.getLocalPointer(e),\n prevWidth = 0,\n width = 0,\n height = 0,\n charIndex = 0,\n lineIndex = 0,\n lineLeftOffset,\n line;\n\n for (var i = 0, len = this._textLines.length; i < len; i++) {\n if (height <= mouseOffset.y) {\n height += this.getHeightOfLine(i) * this.scaleY;\n lineIndex = i;\n\n if (i > 0) {\n charIndex += this._textLines[i - 1].length + this.missingNewlineOffset(i - 1);\n }\n } else {\n break;\n }\n }\n\n lineLeftOffset = this._getLineLeftOffset(lineIndex);\n width = lineLeftOffset * this.scaleX;\n line = this._textLines[lineIndex];\n\n for (var j = 0, jlen = line.length; j < jlen; j++) {\n prevWidth = width; // i removed something about flipX here, check.\n\n width += this.__charBounds[lineIndex][j].kernedWidth * this.scaleX;\n\n if (width <= mouseOffset.x) {\n charIndex++;\n } else {\n break;\n }\n }\n\n return this._getNewSelectionStartFromOffset(mouseOffset, prevWidth, width, charIndex, jlen);\n },\n\n /**\n * @private\n */\n _getNewSelectionStartFromOffset: function _getNewSelectionStartFromOffset(mouseOffset, prevWidth, width, index, jlen) {\n // we need Math.abs because when width is after the last char, the offset is given as 1, while is 0\n var distanceBtwLastCharAndCursor = mouseOffset.x - prevWidth,\n distanceBtwNextCharAndCursor = width - mouseOffset.x,\n offset = distanceBtwNextCharAndCursor > distanceBtwLastCharAndCursor || distanceBtwNextCharAndCursor < 0 ? 0 : 1,\n newSelectionStart = index + offset; // if object is horizontally flipped, mirror cursor location from the end\n\n if (this.flipX) {\n newSelectionStart = jlen - newSelectionStart;\n }\n\n if (newSelectionStart > this._text.length) {\n newSelectionStart = this._text.length;\n }\n\n return newSelectionStart;\n }\n});\nfabric.util.object.extend(fabric.IText.prototype,\n/** @lends fabric.IText.prototype */\n{\n /**\n * Initializes hidden textarea (needed to bring up keyboard in iOS)\n */\n initHiddenTextarea: function initHiddenTextarea() {\n this.hiddenTextarea = fabric.document.createElement('textarea');\n this.hiddenTextarea.setAttribute('autocapitalize', 'off');\n this.hiddenTextarea.setAttribute('autocorrect', 'off');\n this.hiddenTextarea.setAttribute('autocomplete', 'off');\n this.hiddenTextarea.setAttribute('spellcheck', 'false');\n this.hiddenTextarea.setAttribute('data-fabric-hiddentextarea', '');\n this.hiddenTextarea.setAttribute('wrap', 'off');\n\n var style = this._calcTextareaPosition(); // line-height: 1px; was removed from the style to fix this:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=870966\n\n\n this.hiddenTextarea.style.cssText = 'position: absolute; top: ' + style.top + '; left: ' + style.left + '; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px;' + ' paddingï½°top: ' + style.fontSize + ';'; // Append hiddenTextarea to the canvas wrapperEl. This change from the standard\n // behavior of appending to the document body was done so that the textarea will\n // be placed within the focus locked area where the canvas is rendered.\n\n this.canvas.wrapperEl.appendChild(this.hiddenTextarea);\n fabric.util.addListener(this.hiddenTextarea, 'keydown', this.onKeyDown.bind(this));\n fabric.util.addListener(this.hiddenTextarea, 'keyup', this.onKeyUp.bind(this));\n fabric.util.addListener(this.hiddenTextarea, 'input', this.onInput.bind(this));\n fabric.util.addListener(this.hiddenTextarea, 'copy', this.copy.bind(this));\n fabric.util.addListener(this.hiddenTextarea, 'cut', this.copy.bind(this));\n fabric.util.addListener(this.hiddenTextarea, 'paste', this.paste.bind(this));\n fabric.util.addListener(this.hiddenTextarea, 'compositionstart', this.onCompositionStart.bind(this));\n fabric.util.addListener(this.hiddenTextarea, 'compositionupdate', this.onCompositionUpdate.bind(this));\n fabric.util.addListener(this.hiddenTextarea, 'compositionend', this.onCompositionEnd.bind(this));\n\n if (!this._clickHandlerInitialized && this.canvas) {\n fabric.util.addListener(this.canvas.upperCanvasEl, 'click', this.onClick.bind(this));\n this._clickHandlerInitialized = true;\n }\n },\n\n /**\n * For functionalities on keyDown\n * Map a special key to a function of the instance/prototype\n * If you need different behaviour for ESC or TAB or arrows, you have to change\n * this map setting the name of a function that you build on the fabric.Itext or\n * your prototype.\n * the map change will affect all Instances unless you need for only some text Instances\n * in that case you have to clone this object and assign your Instance.\n * this.keysMap = fabric.util.object.clone(this.keysMap);\n * The function must be in fabric.Itext.prototype.myFunction And will receive event as args[0]\n */\n keysMap: {\n 9: 'exitEditing',\n 27: 'exitEditing',\n 33: 'moveCursorUp',\n 34: 'moveCursorDown',\n 35: 'moveCursorRight',\n 36: 'moveCursorLeft',\n 37: 'moveCursorLeft',\n 38: 'moveCursorUp',\n 39: 'moveCursorRight',\n 40: 'moveCursorDown'\n },\n\n /**\n * For functionalities on keyUp + ctrl || cmd\n */\n ctrlKeysMapUp: {\n 67: 'copy',\n 88: 'cut'\n },\n\n /**\n * For functionalities on keyDown + ctrl || cmd\n */\n ctrlKeysMapDown: {\n 65: 'selectAll'\n },\n onClick: function onClick() {\n // No need to trigger click event here, focus is enough to have the keyboard appear on Android\n this.hiddenTextarea && this.hiddenTextarea.focus();\n },\n\n /**\n * Handles keydown event\n * only used for arrows and combination of modifier keys.\n * @param {Event} e Event object\n */\n onKeyDown: function onKeyDown(e) {\n if (!this.isEditing) {\n return;\n }\n\n if (e.keyCode in this.keysMap) {\n this[this.keysMap[e.keyCode]](e);\n } else if (e.keyCode in this.ctrlKeysMapDown && (e.ctrlKey || e.metaKey)) {\n this[this.ctrlKeysMapDown[e.keyCode]](e);\n } else {\n return;\n }\n\n e.stopImmediatePropagation();\n e.preventDefault();\n\n if (e.keyCode >= 33 && e.keyCode <= 40) {\n // if i press an arrow key just update selection\n this.inCompositionMode = false;\n this.clearContextTop();\n this.renderCursorOrSelection();\n } else {\n this.canvas && this.canvas.requestRenderAll();\n }\n },\n\n /**\n * Handles keyup event\n * We handle KeyUp because ie11 and edge have difficulties copy/pasting\n * if a copy/cut event fired, keyup is dismissed\n * @param {Event} e Event object\n */\n onKeyUp: function onKeyUp(e) {\n if (!this.isEditing || this._copyDone || this.inCompositionMode) {\n this._copyDone = false;\n return;\n }\n\n if (e.keyCode in this.ctrlKeysMapUp && (e.ctrlKey || e.metaKey)) {\n this[this.ctrlKeysMapUp[e.keyCode]](e);\n } else {\n return;\n }\n\n e.stopImmediatePropagation();\n e.preventDefault();\n this.canvas && this.canvas.requestRenderAll();\n },\n\n /**\n * Handles onInput event\n * @param {Event} e Event object\n */\n onInput: function onInput(e) {\n var fromPaste = this.fromPaste;\n this.fromPaste = false;\n e && e.stopPropagation();\n\n if (!this.isEditing) {\n return;\n } // decisions about style changes.\n\n\n var nextText = this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,\n charCount = this._text.length,\n nextCharCount = nextText.length,\n removedText,\n insertedText,\n charDiff = nextCharCount - charCount;\n\n if (this.hiddenTextarea.value === '') {\n this.styles = {};\n this.updateFromTextArea();\n this.fire('changed');\n\n if (this.canvas) {\n this.canvas.fire('text:changed', {\n target: this\n });\n this.canvas.requestRenderAll();\n }\n\n return;\n }\n\n var textareaSelection = this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart, this.hiddenTextarea.selectionEnd, this.hiddenTextarea.value);\n var backDelete = this.selectionStart > textareaSelection.selectionStart;\n\n if (this.selectionStart !== this.selectionEnd) {\n removedText = this._text.slice(this.selectionStart, this.selectionEnd);\n charDiff += this.selectionEnd - this.selectionStart;\n } else if (nextCharCount < charCount) {\n if (backDelete) {\n removedText = this._text.slice(this.selectionEnd + charDiff, this.selectionEnd);\n } else {\n removedText = this._text.slice(this.selectionStart, this.selectionStart - charDiff);\n }\n }\n\n insertedText = nextText.slice(textareaSelection.selectionEnd - charDiff, textareaSelection.selectionEnd);\n\n if (removedText && removedText.length) {\n if (this.selectionStart !== this.selectionEnd) {\n this.removeStyleFromTo(this.selectionStart, this.selectionEnd);\n } else if (backDelete) {\n // detect differencies between forwardDelete and backDelete\n this.removeStyleFromTo(this.selectionEnd - removedText.length, this.selectionEnd);\n } else {\n this.removeStyleFromTo(this.selectionEnd, this.selectionEnd + removedText.length);\n }\n }\n\n if (insertedText.length) {\n if (fromPaste && insertedText.join('') === fabric.copiedText && !fabric.disableStyleCopyPaste) {\n this.insertNewStyleBlock(insertedText, this.selectionStart, fabric.copiedTextStyle);\n } else {\n this.insertNewStyleBlock(insertedText, this.selectionStart);\n }\n }\n\n this.updateFromTextArea();\n this.fire('changed');\n\n if (this.canvas) {\n this.canvas.fire('text:changed', {\n target: this\n });\n this.canvas.requestRenderAll();\n }\n },\n\n /**\n * Composition start\n */\n onCompositionStart: function onCompositionStart() {\n this.inCompositionMode = true;\n },\n\n /**\n * Composition end\n */\n onCompositionEnd: function onCompositionEnd() {\n this.inCompositionMode = false;\n },\n // /**\n // * Composition update\n // */\n onCompositionUpdate: function onCompositionUpdate(e) {\n this.compositionStart = e.target.selectionStart;\n this.compositionEnd = e.target.selectionEnd;\n this.updateTextareaPosition();\n },\n\n /**\n * Copies selected text\n * @param {Event} e Event object\n */\n copy: function copy() {\n if (this.selectionStart === this.selectionEnd) {\n //do not cut-copy if no selection\n return;\n }\n\n fabric.copiedText = this.getSelectedText();\n\n if (!fabric.disableStyleCopyPaste) {\n fabric.copiedTextStyle = this.getSelectionStyles(this.selectionStart, this.selectionEnd, true);\n } else {\n fabric.copiedTextStyle = null;\n }\n\n this._copyDone = true;\n },\n\n /**\n * Pastes text\n * @param {Event} e Event object\n */\n paste: function paste() {\n this.fromPaste = true;\n },\n\n /**\n * @private\n * @param {Event} e Event object\n * @return {Object} Clipboard data object\n */\n _getClipboardData: function _getClipboardData(e) {\n return e && e.clipboardData || fabric.window.clipboardData;\n },\n\n /**\n * Finds the width in pixels before the cursor on the same line\n * @private\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @return {Number} widthBeforeCursor width before cursor\n */\n _getWidthBeforeCursor: function _getWidthBeforeCursor(lineIndex, charIndex) {\n var widthBeforeCursor = this._getLineLeftOffset(lineIndex),\n bound;\n\n if (charIndex > 0) {\n bound = this.__charBounds[lineIndex][charIndex - 1];\n widthBeforeCursor += bound.left + bound.width;\n }\n\n return widthBeforeCursor;\n },\n\n /**\n * Gets start offset of a selection\n * @param {Event} e Event object\n * @param {Boolean} isRight\n * @return {Number}\n */\n getDownCursorOffset: function getDownCursorOffset(e, isRight) {\n var selectionProp = this._getSelectionForOffset(e, isRight),\n cursorLocation = this.get2DCursorLocation(selectionProp),\n lineIndex = cursorLocation.lineIndex; // if on last line, down cursor goes to end of line\n\n\n if (lineIndex === this._textLines.length - 1 || e.metaKey || e.keyCode === 34) {\n // move to the end of a text\n return this._text.length - selectionProp;\n }\n\n var charIndex = cursorLocation.charIndex,\n widthBeforeCursor = this._getWidthBeforeCursor(lineIndex, charIndex),\n indexOnOtherLine = this._getIndexOnLine(lineIndex + 1, widthBeforeCursor),\n textAfterCursor = this._textLines[lineIndex].slice(charIndex);\n\n return textAfterCursor.length + indexOnOtherLine + 1 + this.missingNewlineOffset(lineIndex);\n },\n\n /**\n * private\n * Helps finding if the offset should be counted from Start or End\n * @param {Event} e Event object\n * @param {Boolean} isRight\n * @return {Number}\n */\n _getSelectionForOffset: function _getSelectionForOffset(e, isRight) {\n if (e.shiftKey && this.selectionStart !== this.selectionEnd && isRight) {\n return this.selectionEnd;\n } else {\n return this.selectionStart;\n }\n },\n\n /**\n * @param {Event} e Event object\n * @param {Boolean} isRight\n * @return {Number}\n */\n getUpCursorOffset: function getUpCursorOffset(e, isRight) {\n var selectionProp = this._getSelectionForOffset(e, isRight),\n cursorLocation = this.get2DCursorLocation(selectionProp),\n lineIndex = cursorLocation.lineIndex;\n\n if (lineIndex === 0 || e.metaKey || e.keyCode === 33) {\n // if on first line, up cursor goes to start of line\n return -selectionProp;\n }\n\n var charIndex = cursorLocation.charIndex,\n widthBeforeCursor = this._getWidthBeforeCursor(lineIndex, charIndex),\n indexOnOtherLine = this._getIndexOnLine(lineIndex - 1, widthBeforeCursor),\n textBeforeCursor = this._textLines[lineIndex].slice(0, charIndex),\n missingNewlineOffset = this.missingNewlineOffset(lineIndex - 1); // return a negative offset\n\n\n return -this._textLines[lineIndex - 1].length + indexOnOtherLine - textBeforeCursor.length + (1 - missingNewlineOffset);\n },\n\n /**\n * for a given width it founds the matching character.\n * @private\n */\n _getIndexOnLine: function _getIndexOnLine(lineIndex, width) {\n var line = this._textLines[lineIndex],\n lineLeftOffset = this._getLineLeftOffset(lineIndex),\n widthOfCharsOnLine = lineLeftOffset,\n indexOnLine = 0,\n charWidth,\n foundMatch;\n\n for (var j = 0, jlen = line.length; j < jlen; j++) {\n charWidth = this.__charBounds[lineIndex][j].width;\n widthOfCharsOnLine += charWidth;\n\n if (widthOfCharsOnLine > width) {\n foundMatch = true;\n var leftEdge = widthOfCharsOnLine - charWidth,\n rightEdge = widthOfCharsOnLine,\n offsetFromLeftEdge = Math.abs(leftEdge - width),\n offsetFromRightEdge = Math.abs(rightEdge - width);\n indexOnLine = offsetFromRightEdge < offsetFromLeftEdge ? j : j - 1;\n break;\n }\n } // reached end\n\n\n if (!foundMatch) {\n indexOnLine = line.length - 1;\n }\n\n return indexOnLine;\n },\n\n /**\n * Moves cursor down\n * @param {Event} e Event object\n */\n moveCursorDown: function moveCursorDown(e) {\n if (this.selectionStart >= this._text.length && this.selectionEnd >= this._text.length) {\n return;\n }\n\n this._moveCursorUpOrDown('Down', e);\n },\n\n /**\n * Moves cursor up\n * @param {Event} e Event object\n */\n moveCursorUp: function moveCursorUp(e) {\n if (this.selectionStart === 0 && this.selectionEnd === 0) {\n return;\n }\n\n this._moveCursorUpOrDown('Up', e);\n },\n\n /**\n * Moves cursor up or down, fires the events\n * @param {String} direction 'Up' or 'Down'\n * @param {Event} e Event object\n */\n _moveCursorUpOrDown: function _moveCursorUpOrDown(direction, e) {\n // getUpCursorOffset\n // getDownCursorOffset\n var action = 'get' + direction + 'CursorOffset',\n offset = this[action](e, this._selectionDirection === 'right');\n\n if (e.shiftKey) {\n this.moveCursorWithShift(offset);\n } else {\n this.moveCursorWithoutShift(offset);\n }\n\n if (offset !== 0) {\n this.setSelectionInBoundaries();\n this.abortCursorAnimation();\n this._currentCursorOpacity = 1;\n this.initDelayedCursor();\n\n this._fireSelectionChanged();\n\n this._updateTextarea();\n }\n },\n\n /**\n * Moves cursor with shift\n * @param {Number} offset\n */\n moveCursorWithShift: function moveCursorWithShift(offset) {\n var newSelection = this._selectionDirection === 'left' ? this.selectionStart + offset : this.selectionEnd + offset;\n this.setSelectionStartEndWithShift(this.selectionStart, this.selectionEnd, newSelection);\n return offset !== 0;\n },\n\n /**\n * Moves cursor up without shift\n * @param {Number} offset\n */\n moveCursorWithoutShift: function moveCursorWithoutShift(offset) {\n if (offset < 0) {\n this.selectionStart += offset;\n this.selectionEnd = this.selectionStart;\n } else {\n this.selectionEnd += offset;\n this.selectionStart = this.selectionEnd;\n }\n\n return offset !== 0;\n },\n\n /**\n * Moves cursor left\n * @param {Event} e Event object\n */\n moveCursorLeft: function moveCursorLeft(e) {\n if (this.selectionStart === 0 && this.selectionEnd === 0) {\n return;\n }\n\n this._moveCursorLeftOrRight('Left', e);\n },\n\n /**\n * @private\n * @return {Boolean} true if a change happened\n */\n _move: function _move(e, prop, direction) {\n var newValue;\n\n if (e.altKey) {\n newValue = this['findWordBoundary' + direction](this[prop]);\n } else if (e.metaKey || e.keyCode === 35 || e.keyCode === 36) {\n newValue = this['findLineBoundary' + direction](this[prop]);\n } else {\n this[prop] += direction === 'Left' ? -1 : 1;\n return true;\n }\n\n if (_typeof(newValue) !== undefined && this[prop] !== newValue) {\n this[prop] = newValue;\n return true;\n }\n },\n\n /**\n * @private\n */\n _moveLeft: function _moveLeft(e, prop) {\n return this._move(e, prop, 'Left');\n },\n\n /**\n * @private\n */\n _moveRight: function _moveRight(e, prop) {\n return this._move(e, prop, 'Right');\n },\n\n /**\n * Moves cursor left without keeping selection\n * @param {Event} e\n */\n moveCursorLeftWithoutShift: function moveCursorLeftWithoutShift(e) {\n var change = true;\n this._selectionDirection = 'left'; // only move cursor when there is no selection,\n // otherwise we discard it, and leave cursor on same place\n\n if (this.selectionEnd === this.selectionStart && this.selectionStart !== 0) {\n change = this._moveLeft(e, 'selectionStart');\n }\n\n this.selectionEnd = this.selectionStart;\n return change;\n },\n\n /**\n * Moves cursor left while keeping selection\n * @param {Event} e\n */\n moveCursorLeftWithShift: function moveCursorLeftWithShift(e) {\n if (this._selectionDirection === 'right' && this.selectionStart !== this.selectionEnd) {\n return this._moveLeft(e, 'selectionEnd');\n } else if (this.selectionStart !== 0) {\n this._selectionDirection = 'left';\n return this._moveLeft(e, 'selectionStart');\n }\n },\n\n /**\n * Moves cursor right\n * @param {Event} e Event object\n */\n moveCursorRight: function moveCursorRight(e) {\n if (this.selectionStart >= this._text.length && this.selectionEnd >= this._text.length) {\n return;\n }\n\n this._moveCursorLeftOrRight('Right', e);\n },\n\n /**\n * Moves cursor right or Left, fires event\n * @param {String} direction 'Left', 'Right'\n * @param {Event} e Event object\n */\n _moveCursorLeftOrRight: function _moveCursorLeftOrRight(direction, e) {\n var actionName = 'moveCursor' + direction + 'With';\n this._currentCursorOpacity = 1;\n\n if (e.shiftKey) {\n actionName += 'Shift';\n } else {\n actionName += 'outShift';\n }\n\n if (this[actionName](e)) {\n this.abortCursorAnimation();\n this.initDelayedCursor();\n\n this._fireSelectionChanged();\n\n this._updateTextarea();\n }\n },\n\n /**\n * Moves cursor right while keeping selection\n * @param {Event} e\n */\n moveCursorRightWithShift: function moveCursorRightWithShift(e) {\n if (this._selectionDirection === 'left' && this.selectionStart !== this.selectionEnd) {\n return this._moveRight(e, 'selectionStart');\n } else if (this.selectionEnd !== this._text.length) {\n this._selectionDirection = 'right';\n return this._moveRight(e, 'selectionEnd');\n }\n },\n\n /**\n * Moves cursor right without keeping selection\n * @param {Event} e Event object\n */\n moveCursorRightWithoutShift: function moveCursorRightWithoutShift(e) {\n var changed = true;\n this._selectionDirection = 'right';\n\n if (this.selectionStart === this.selectionEnd) {\n changed = this._moveRight(e, 'selectionStart');\n this.selectionEnd = this.selectionStart;\n } else {\n this.selectionStart = this.selectionEnd;\n }\n\n return changed;\n },\n\n /**\n * Removes characters from start/end\n * start/end ar per grapheme position in _text array.\n *\n * @param {Number} start\n * @param {Number} end default to start + 1\n */\n removeChars: function removeChars(start, end) {\n if (typeof end === 'undefined') {\n end = start + 1;\n }\n\n this.removeStyleFromTo(start, end);\n\n this._text.splice(start, end - start);\n\n this.text = this._text.join('');\n this.set('dirty', true);\n\n if (this._shouldClearDimensionCache()) {\n this.initDimensions();\n this.setCoords();\n }\n\n this._removeExtraneousStyles();\n },\n\n /**\n * insert characters at start position, before start position.\n * start equal 1 it means the text get inserted between actual grapheme 0 and 1\n * if style array is provided, it must be as the same length of text in graphemes\n * if end is provided and is bigger than start, old text is replaced.\n * start/end ar per grapheme position in _text array.\n *\n * @param {String} text text to insert\n * @param {Array} style array of style objects\n * @param {Number} start\n * @param {Number} end default to start + 1\n */\n insertChars: function insertChars(text, style, start, end) {\n if (typeof end === 'undefined') {\n end = start;\n }\n\n if (end > start) {\n this.removeStyleFromTo(start, end);\n }\n\n var graphemes = fabric.util.string.graphemeSplit(text);\n this.insertNewStyleBlock(graphemes, start, style);\n this._text = [].concat(this._text.slice(0, start), graphemes, this._text.slice(end));\n this.text = this._text.join('');\n this.set('dirty', true);\n\n if (this._shouldClearDimensionCache()) {\n this.initDimensions();\n this.setCoords();\n }\n\n this._removeExtraneousStyles();\n }\n});\n\n(function (global) {\n 'use strict';\n\n var fabric = global.fabric || (global.fabric = {});\n /**\n * Textbox class, based on IText, allows the user to resize the text rectangle\n * and wraps lines automatically. Textboxes have their Y scaling locked, the\n * user can only change width. Height is adjusted automatically based on the\n * wrapping of lines.\n * @class fabric.Textbox\n * @extends fabric.IText\n * @mixes fabric.Observable\n * @return {fabric.Textbox} thisArg\n * @see {@link fabric.Textbox#initialize} for constructor definition\n */\n\n fabric.Textbox = fabric.util.createClass(fabric.IText, fabric.Observable, {\n /**\n * Type of an object\n * @type String\n * @default\n */\n type: 'textbox',\n\n /**\n * Minimum width of textbox, in pixels.\n * @type Number\n * @default\n */\n minWidth: 20,\n\n /**\n * Minimum calculated width of a textbox, in pixels.\n * fixed to 2 so that an empty textbox cannot go to 0\n * and is still selectable without text.\n * @type Number\n * @default\n */\n dynamicMinWidth: 2,\n\n /**\n * Cached array of text wrapping.\n * @type Array\n */\n __cachedLines: null,\n\n /**\n * Override standard Object class values\n */\n lockScalingFlip: true,\n\n /**\n * Override standard Object class values\n * Textbox needs this on false\n */\n noScaleCache: false,\n\n /**\n * Properties which when set cause object to change dimensions\n * @type Object\n * @private\n */\n _dimensionAffectingProps: fabric.Text.prototype._dimensionAffectingProps.concat('width'),\n\n /**\n * Use this regular expression to split strings in breakable lines\n * @private\n */\n _wordJoiners: /[ \\t\\r]/,\n\n /**\n * Use this boolean property in order to split strings that have no white space concept.\n * this is a cheap way to help with chinese/japaense\n * @type Boolean\n * @since 2.6.0\n */\n splitByGrapheme: false,\n\n /**\n * Unlike superclass's version of this function, Textbox does not update\n * its width.\n * @private\n * @override\n */\n initDimensions: function initDimensions() {\n if (this.__skipDimension) {\n return;\n }\n\n this.isEditing && this.initDelayedCursor();\n this.clearContextTop();\n\n this._clearCache(); // clear dynamicMinWidth as it will be different after we re-wrap line\n\n\n this.dynamicMinWidth = 0; // wrap lines\n\n this._styleMap = this._generateStyleMap(this._splitText()); // if after wrapping, the width is smaller than dynamicMinWidth, change the width and re-wrap\n\n if (this.dynamicMinWidth > this.width) {\n this._set('width', this.dynamicMinWidth);\n }\n\n if (this.textAlign.indexOf('justify') !== -1) {\n // once text is measured we need to make space fatter to make justified text.\n this.enlargeSpaces();\n } // clear cache and re-calculate height\n\n\n this.height = this.calcTextHeight();\n this.saveState({\n propertySet: '_dimensionAffectingProps'\n });\n },\n\n /**\n * Generate an object that translates the style object so that it is\n * broken up by visual lines (new lines and automatic wrapping).\n * The original text styles object is broken up by actual lines (new lines only),\n * which is only sufficient for Text / IText\n * @private\n */\n _generateStyleMap: function _generateStyleMap(textInfo) {\n var realLineCount = 0,\n realLineCharCount = 0,\n charCount = 0,\n map = {};\n\n for (var i = 0; i < textInfo.graphemeLines.length; i++) {\n if (textInfo.graphemeText[charCount] === '\\n' && i > 0) {\n realLineCharCount = 0;\n charCount++;\n realLineCount++;\n } else if (!this.splitByGrapheme && this._reSpaceAndTab.test(textInfo.graphemeText[charCount]) && i > 0) {\n // this case deals with space's that are removed from end of lines when wrapping\n realLineCharCount++;\n charCount++;\n }\n\n map[i] = {\n line: realLineCount,\n offset: realLineCharCount\n };\n charCount += textInfo.graphemeLines[i].length;\n realLineCharCount += textInfo.graphemeLines[i].length;\n }\n\n return map;\n },\n\n /**\n * Returns true if object has a style property or has it on a specified line\n * @param {Number} lineIndex\n * @return {Boolean}\n */\n styleHas: function styleHas(property, lineIndex) {\n if (this._styleMap && !this.isWrapping) {\n var map = this._styleMap[lineIndex];\n\n if (map) {\n lineIndex = map.line;\n }\n }\n\n return fabric.Text.prototype.styleHas.call(this, property, lineIndex);\n },\n\n /**\n * Returns true if object has no styling or no styling in a line\n * @param {Number} lineIndex , lineIndex is on wrapped lines.\n * @return {Boolean}\n */\n isEmptyStyles: function isEmptyStyles(lineIndex) {\n if (!this.styles) {\n return true;\n }\n\n var offset = 0,\n nextLineIndex = lineIndex + 1,\n nextOffset,\n obj,\n shouldLimit = false,\n map = this._styleMap[lineIndex],\n mapNextLine = this._styleMap[lineIndex + 1];\n\n if (map) {\n lineIndex = map.line;\n offset = map.offset;\n }\n\n if (mapNextLine) {\n nextLineIndex = mapNextLine.line;\n shouldLimit = nextLineIndex === lineIndex;\n nextOffset = mapNextLine.offset;\n }\n\n obj = typeof lineIndex === 'undefined' ? this.styles : {\n line: this.styles[lineIndex]\n };\n\n for (var p1 in obj) {\n for (var p2 in obj[p1]) {\n if (p2 >= offset && (!shouldLimit || p2 < nextOffset)) {\n // eslint-disable-next-line no-unused-vars\n for (var p3 in obj[p1][p2]) {\n return false;\n }\n }\n }\n }\n\n return true;\n },\n\n /**\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @private\n */\n _getStyleDeclaration: function _getStyleDeclaration(lineIndex, charIndex) {\n if (this._styleMap && !this.isWrapping) {\n var map = this._styleMap[lineIndex];\n\n if (!map) {\n return null;\n }\n\n lineIndex = map.line;\n charIndex = map.offset + charIndex;\n }\n\n return this.callSuper('_getStyleDeclaration', lineIndex, charIndex);\n },\n\n /**\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @param {Object} style\n * @private\n */\n _setStyleDeclaration: function _setStyleDeclaration(lineIndex, charIndex, style) {\n var map = this._styleMap[lineIndex];\n lineIndex = map.line;\n charIndex = map.offset + charIndex;\n this.styles[lineIndex][charIndex] = style;\n },\n\n /**\n * @param {Number} lineIndex\n * @param {Number} charIndex\n * @private\n */\n _deleteStyleDeclaration: function _deleteStyleDeclaration(lineIndex, charIndex) {\n var map = this._styleMap[lineIndex];\n lineIndex = map.line;\n charIndex = map.offset + charIndex;\n delete this.styles[lineIndex][charIndex];\n },\n\n /**\n * probably broken need a fix\n * Returns the real style line that correspond to the wrapped lineIndex line\n * Used just to verify if the line does exist or not.\n * @param {Number} lineIndex\n * @returns {Boolean} if the line exists or not\n * @private\n */\n _getLineStyle: function _getLineStyle(lineIndex) {\n var map = this._styleMap[lineIndex];\n return !!this.styles[map.line];\n },\n\n /**\n * Set the line style to an empty object so that is initialized\n * @param {Number} lineIndex\n * @param {Object} style\n * @private\n */\n _setLineStyle: function _setLineStyle(lineIndex) {\n var map = this._styleMap[lineIndex];\n this.styles[map.line] = {};\n },\n\n /**\n * Wraps text using the 'width' property of Textbox. First this function\n * splits text on newlines, so we preserve newlines entered by the user.\n * Then it wraps each line using the width of the Textbox by calling\n * _wrapLine().\n * @param {Array} lines The string array of text that is split into lines\n * @param {Number} desiredWidth width you want to wrap to\n * @returns {Array} Array of lines\n */\n _wrapText: function _wrapText(lines, desiredWidth) {\n var wrapped = [],\n i;\n this.isWrapping = true;\n\n for (i = 0; i < lines.length; i++) {\n wrapped = wrapped.concat(this._wrapLine(lines[i], i, desiredWidth));\n }\n\n this.isWrapping = false;\n return wrapped;\n },\n\n /**\n * Helper function to measure a string of text, given its lineIndex and charIndex offset\n * it gets called when charBounds are not available yet.\n * @param {CanvasRenderingContext2D} ctx\n * @param {String} text\n * @param {number} lineIndex\n * @param {number} charOffset\n * @returns {number}\n * @private\n */\n _measureWord: function _measureWord(word, lineIndex, charOffset) {\n var width = 0,\n prevGrapheme,\n skipLeft = true;\n charOffset = charOffset || 0;\n\n for (var i = 0, len = word.length; i < len; i++) {\n var box = this._getGraphemeBox(word[i], lineIndex, i + charOffset, prevGrapheme, skipLeft);\n\n width += box.kernedWidth;\n prevGrapheme = word[i];\n }\n\n return width;\n },\n\n /**\n * Wraps a line of text using the width of the Textbox and a context.\n * @param {Array} line The grapheme array that represent the line\n * @param {Number} lineIndex\n * @param {Number} desiredWidth width you want to wrap the line to\n * @param {Number} reservedSpace space to remove from wrapping for custom functionalities\n * @returns {Array} Array of line(s) into which the given text is wrapped\n * to.\n */\n _wrapLine: function _wrapLine(_line, lineIndex, desiredWidth, reservedSpace) {\n var lineWidth = 0,\n splitByGrapheme = this.splitByGrapheme,\n graphemeLines = [],\n line = [],\n // spaces in different languges?\n words = splitByGrapheme ? fabric.util.string.graphemeSplit(_line) : _line.split(this._wordJoiners),\n word = '',\n offset = 0,\n infix = splitByGrapheme ? '' : ' ',\n wordWidth = 0,\n infixWidth = 0,\n largestWordWidth = 0,\n lineJustStarted = true,\n additionalSpace = splitByGrapheme ? 0 : this._getWidthOfCharSpacing(),\n reservedSpace = reservedSpace || 0; // fix a difference between split and graphemeSplit\n\n if (words.length === 0) {\n words.push([]);\n }\n\n desiredWidth -= reservedSpace;\n\n for (var i = 0; i < words.length; i++) {\n // if using splitByGrapheme words are already in graphemes.\n word = splitByGrapheme ? words[i] : fabric.util.string.graphemeSplit(words[i]);\n wordWidth = this._measureWord(word, lineIndex, offset);\n offset += word.length;\n lineWidth += infixWidth + wordWidth - additionalSpace;\n\n if (lineWidth >= desiredWidth && !lineJustStarted) {\n graphemeLines.push(line);\n line = [];\n lineWidth = wordWidth;\n lineJustStarted = true;\n } else {\n lineWidth += additionalSpace;\n }\n\n if (!lineJustStarted && !splitByGrapheme) {\n line.push(infix);\n }\n\n line = line.concat(word);\n infixWidth = this._measureWord([infix], lineIndex, offset);\n offset++;\n lineJustStarted = false; // keep track of largest word\n\n if (wordWidth > largestWordWidth) {\n largestWordWidth = wordWidth;\n }\n }\n\n i && graphemeLines.push(line);\n\n if (largestWordWidth + reservedSpace > this.dynamicMinWidth) {\n this.dynamicMinWidth = largestWordWidth - additionalSpace + reservedSpace;\n }\n\n return graphemeLines;\n },\n\n /**\n * Detect if the text line is ended with an hard break\n * text and itext do not have wrapping, return false\n * @param {Number} lineIndex text to split\n * @return {Boolean}\n */\n isEndOfWrapping: function isEndOfWrapping(lineIndex) {\n if (!this._styleMap[lineIndex + 1]) {\n // is last line, return true;\n return true;\n }\n\n if (this._styleMap[lineIndex + 1].line !== this._styleMap[lineIndex].line) {\n // this is last line before a line break, return true;\n return true;\n }\n\n return false;\n },\n\n /**\n * Detect if a line has a linebreak and so we need to account for it when moving\n * and counting style.\n * @return Number\n */\n missingNewlineOffset: function missingNewlineOffset(lineIndex) {\n if (this.splitByGrapheme) {\n return this.isEndOfWrapping(lineIndex) ? 1 : 0;\n }\n\n return 1;\n },\n\n /**\n * Gets lines of text to render in the Textbox. This function calculates\n * text wrapping on the fly every time it is called.\n * @param {String} text text to split\n * @returns {Array} Array of lines in the Textbox.\n * @override\n */\n _splitTextIntoLines: function _splitTextIntoLines(text) {\n var newText = fabric.Text.prototype._splitTextIntoLines.call(this, text),\n graphemeLines = this._wrapText(newText.lines, this.width),\n lines = new Array(graphemeLines.length);\n\n for (var i = 0; i < graphemeLines.length; i++) {\n lines[i] = graphemeLines[i].join('');\n }\n\n newText.lines = lines;\n newText.graphemeLines = graphemeLines;\n return newText;\n },\n getMinWidth: function getMinWidth() {\n return Math.max(this.minWidth, this.dynamicMinWidth);\n },\n _removeExtraneousStyles: function _removeExtraneousStyles() {\n var linesToKeep = {};\n\n for (var prop in this._styleMap) {\n if (this._textLines[prop]) {\n linesToKeep[this._styleMap[prop].line] = 1;\n }\n }\n\n for (var prop in this.styles) {\n if (!linesToKeep[prop]) {\n delete this.styles[prop];\n }\n }\n },\n\n /**\n * Returns object representation of an instance\n * @method toObject\n * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output\n * @return {Object} object representation of an instance\n */\n toObject: function toObject(propertiesToInclude) {\n return this.callSuper('toObject', ['minWidth', 'splitByGrapheme'].concat(propertiesToInclude));\n }\n });\n /**\n * Returns fabric.Textbox instance from an object representation\n * @static\n * @memberOf fabric.Textbox\n * @param {Object} object Object to create an instance from\n * @param {Function} [callback] Callback to invoke when an fabric.Textbox instance is created\n */\n\n fabric.Textbox.fromObject = function (object, callback) {\n return fabric.Object._fromObject('Textbox', object, callback, 'text');\n };\n})(typeof exports !== 'undefined' ? exports : this);","\"use strict\";\n\nvar __spreadArrays = this && this.__spreadArrays || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar react_1 = require(\"react\");\n\nvar types_1 = require(\"./types\");\n\nexports.getStepDecimals = function (step) {\n var decimals = step.toString().split('.')[1];\n return decimals ? decimals.length : 0;\n};\n\nfunction isTouchEvent(event) {\n return event.touches && event.touches.length || event.changedTouches && event.changedTouches.length;\n}\n\nexports.isTouchEvent = isTouchEvent;\n\nfunction isStepDivisible(min, max, step) {\n var res = (max - min) / step;\n return parseInt(res.toString(), 10) === res;\n}\n\nexports.isStepDivisible = isStepDivisible;\n\nfunction normalizeValue(value, index, min, max, step, allowOverlap, values) {\n var BIG_NUM = 10e10;\n value = Math.round(value * BIG_NUM) / BIG_NUM;\n\n if (!allowOverlap) {\n var prev = values[index - 1];\n var next = values[index + 1];\n if (prev && prev > value) return prev;\n if (next && next < value) return next;\n }\n\n if (value > max) return max;\n if (value < min) return min;\n var inverter = min < 0 ? -1 : 1;\n var remainder = Math.round(value * BIG_NUM - inverter * min * BIG_NUM) % Math.round(step * BIG_NUM);\n var closestBigNum = Math.round(value * BIG_NUM - remainder);\n var rounded = remainder === 0 ? value : closestBigNum / BIG_NUM;\n var res = Math.abs(remainder / BIG_NUM) < step / 2 ? rounded : rounded + step * ((value > 0 ? 1 : 0) + (value < 0 ? -1 : 0) || +value);\n var decimalPlaces = exports.getStepDecimals(step);\n return parseFloat(res.toFixed(decimalPlaces));\n}\n\nexports.normalizeValue = normalizeValue;\n\nfunction relativeValue(value, min, max) {\n return (value - min) / (max - min);\n}\n\nexports.relativeValue = relativeValue;\n\nfunction isVertical(direction) {\n return direction === types_1.Direction.Up || direction === types_1.Direction.Down;\n}\n\nexports.isVertical = isVertical;\n\nfunction checkBoundaries(value, min, max) {\n if (min >= max) {\n throw new RangeError(\"min (\" + min + \") is equal/bigger than max (\" + max + \")\");\n }\n\n if (value < min) {\n throw new RangeError(\"value (\" + value + \") is smaller than min (\" + min + \")\");\n }\n\n if (value > max) {\n throw new RangeError(\"value (\" + value + \") is bigger than max (\" + max + \")\");\n }\n}\n\nexports.checkBoundaries = checkBoundaries;\n\nfunction checkInitialOverlap(values) {\n if (values.length < 2) return;\n\n if (!values.slice(1).every(function (item, i) {\n return values[i] <= item;\n })) {\n throw new RangeError(\"values={[\" + values + \"]} needs to be sorted when allowOverlap={false}\");\n }\n}\n\nexports.checkInitialOverlap = checkInitialOverlap;\n\nfunction getMargin(element) {\n var style = window.getComputedStyle(element);\n return {\n top: parseInt(style['margin-top'], 10),\n bottom: parseInt(style['margin-bottom'], 10),\n left: parseInt(style['margin-left'], 10),\n right: parseInt(style['margin-right'], 10)\n };\n}\n\nexports.getMargin = getMargin;\n\nfunction getPaddingAndBorder(element) {\n var style = window.getComputedStyle(element);\n return {\n top: parseInt(style['padding-top'], 10) + parseInt(style['border-top-width'], 10),\n bottom: parseInt(style['padding-bottom'], 10) + parseInt(style['border-bottom-width'], 10),\n left: parseInt(style['padding-left'], 10) + parseInt(style['border-left-width'], 10),\n right: parseInt(style['padding-right'], 10) + parseInt(style['border-right-width'], 10)\n };\n}\n\nexports.getPaddingAndBorder = getPaddingAndBorder;\n\nfunction translateThumbs(elements, offsets, rtl) {\n var inverter = rtl ? -1 : 1;\n elements.forEach(function (element, index) {\n return translate(element, inverter * offsets[index].x, offsets[index].y);\n });\n}\n\nexports.translateThumbs = translateThumbs;\n\nfunction translate(element, x, y) {\n element.style.transform = \"translate(\" + x + \"px, \" + y + \"px)\";\n}\n\nexports.translate = translate; // adapted from https://github.com/alexreardon/raf-schd\n\nexports.schd = function (fn) {\n var lastArgs = [];\n var frameId = null;\n\n var wrapperFn = function wrapperFn() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n lastArgs = args;\n\n if (frameId) {\n return;\n }\n\n frameId = requestAnimationFrame(function () {\n frameId = null;\n fn.apply(void 0, lastArgs);\n });\n };\n\n return wrapperFn;\n};\n\nfunction replaceAt(values, index, value) {\n var ret = values.slice(0);\n ret[index] = value;\n return ret;\n}\n\nexports.replaceAt = replaceAt;\n\nfunction getTrackBackground(_a) {\n var values = _a.values,\n colors = _a.colors,\n min = _a.min,\n max = _a.max,\n _b = _a.direction,\n direction = _b === void 0 ? types_1.Direction.Right : _b,\n _c = _a.rtl,\n rtl = _c === void 0 ? false : _c;\n\n if (rtl && direction === types_1.Direction.Right) {\n direction = types_1.Direction.Left;\n } else if (rtl && types_1.Direction.Left) {\n direction = types_1.Direction.Right;\n }\n\n var progress = values.map(function (value) {\n return (value - min) / (max - min) * 100;\n });\n var middle = progress.reduce(function (acc, point, index) {\n return acc + \", \" + colors[index] + \" \" + point + \"%, \" + colors[index + 1] + \" \" + point + \"%\";\n }, '');\n return \"linear-gradient(\" + direction + \", \" + colors[0] + \" 0%\" + middle + \", \" + colors[colors.length - 1] + \" 100%)\";\n}\n\nexports.getTrackBackground = getTrackBackground;\n\nfunction voidFn() {}\n\nexports.voidFn = voidFn;\n\nfunction assertUnreachable(x) {\n throw new Error(\"Didn't expect to get here\");\n}\n\nexports.assertUnreachable = assertUnreachable;\n/**\n * Util function for grabbing the true largest width of a thumb\n * including the label\n * @param thumbEl - Thumb element to grab the largest width from\n * @param value - Thumb value, not label value\n * @param separator - Label separator value\n */\n\nvar getThumbWidth = function getThumbWidth(thumbEl, value, separator, decimalPlaces, valueToLabel) {\n if (valueToLabel === void 0) {\n valueToLabel = function valueToLabel(value) {\n return value;\n };\n }\n\n var width = Math.ceil(__spreadArrays([thumbEl], Array.from(thumbEl.children)).reduce(function (width, el) {\n var elWidth = Math.ceil(el.getBoundingClientRect().width);\n /**\n * If a label contains a merged label value, it won't return the true\n * label width for that Thumb. Clone the label and change the value\n * to that individual Thumb value in order to grab the true width.\n */\n\n if (el.innerText && el.innerText.includes(separator) && el.childElementCount === 0) {\n var elClone = el.cloneNode(true);\n elClone.innerHTML = valueToLabel(value.toFixed(decimalPlaces));\n elClone.style.visibility = 'hidden';\n document.body.append(elClone);\n elWidth = Math.ceil(elClone.getBoundingClientRect().width);\n elClone.remove();\n }\n\n return elWidth > width ? elWidth : width;\n }, thumbEl.getBoundingClientRect().width));\n return width;\n};\n/**\n * Bulk of logic for thumb overlaps\n * Consider a scenario with 5 thumbs;\n * Thumb 1 overlaps with thumb 0 and thumb 2\n * Thumb 2 overlaps with thumb 3\n * We need an array that contains [0, 1, 2, 3]\n * The function needs to return the directly overlapping thumbs\n * and all thumbs overlapping linked to those and so on\n * @param index - Thumb index calculating overlaps for\n * @param offsets - Current Array of Thumb offsets for Range\n * @param thumbs - Array of Thumb elements\n * @param values - Array of Thumb values\n * @param separator - String separator for merged label values\n * @returns overlaps - Array of all overlapping thumbs from the index\n */\n\n\nvar getOverlaps = function getOverlaps(index, offsets, thumbs, values, separator, decimalPlaces, valueToLabel) {\n if (valueToLabel === void 0) {\n valueToLabel = function valueToLabel(value) {\n return value;\n };\n }\n\n var overlaps = [];\n /**\n * Recursive function for building the overlaps Array\n * If an overlap is found, find the overlaps for that overlap\n * @param thumbIndex current Thumb index to find overlaps from\n */\n\n var buildOverlaps = function buildOverlaps(thumbIndex) {\n var thumbXWidth = getThumbWidth(thumbs[thumbIndex], values[thumbIndex], separator, decimalPlaces, valueToLabel);\n var thumbX = offsets[thumbIndex].x;\n /**\n * Iterate through the Thumb offsets, if there is a match\n * add the thumbIndex and siblingIndex to the overlaps Array\n *\n * Then build overlaps from the overlapping siblingIndex\n */\n\n offsets.forEach(function (_a, siblingIndex) {\n var siblingX = _a.x;\n var siblingWidth = getThumbWidth(thumbs[siblingIndex], values[siblingIndex], separator, decimalPlaces, valueToLabel);\n\n if (thumbIndex !== siblingIndex && (thumbX >= siblingX && thumbX <= siblingX + siblingWidth || thumbX + thumbXWidth >= siblingX && thumbX + thumbXWidth <= siblingX + siblingWidth)) {\n if (!overlaps.includes(siblingIndex)) {\n overlaps.push(thumbIndex);\n overlaps.push(siblingIndex);\n overlaps = __spreadArrays(overlaps, [thumbIndex, siblingIndex]);\n buildOverlaps(siblingIndex);\n }\n }\n });\n };\n\n buildOverlaps(index); // Sort and remove duplicates from the built overlaps\n\n return Array.from(new Set(overlaps.sort()));\n};\n/**\n * A custom React Hook for calculating whether a thumb overlaps\n * another and whether labels could/should merge.\n * @param rangeRef - React ref value of Range component\n * @param values - current Range values Array\n * @param index - thumb index\n * @param step - step value, used to calculate the number of decimal places\n * @param separator - string to separate thumb values\n * @returns label value + styling for thumb label\n */\n\n\nexports.useThumbOverlap = function (rangeRef, values, index, step, separator, valueToLabel) {\n if (step === void 0) {\n step = 0.1;\n }\n\n if (separator === void 0) {\n separator = ' - ';\n }\n\n if (valueToLabel === void 0) {\n valueToLabel = function valueToLabel(value) {\n return value;\n };\n }\n\n var decimalPlaces = exports.getStepDecimals(step); // Create initial label style and value. Label value defaults to thumb value\n\n var _a = react_1.useState({}),\n labelStyle = _a[0],\n setLabelStyle = _a[1];\n\n var _b = react_1.useState(valueToLabel(values[index].toFixed(decimalPlaces))),\n labelValue = _b[0],\n setLabelValue = _b[1]; // When the rangeRef or values change, update the Thumb label values and styling\n\n\n react_1.useEffect(function () {\n if (rangeRef) {\n var thumbs = rangeRef.getThumbs();\n if (thumbs.length < 1) return;\n var newStyle = {};\n var offsets_1 = rangeRef.getOffsets();\n /**\n * Get any overlaps for the given Thumb index. This must return all linked\n * Thumbs. So if there are 4 Thumbs and Thumbs 2, 3 and 4 overlap. If we are\n * getting the overlaps for Thumb 1 and it overlaps only Thumb 2, we must get\n * 2, 3 and 4 also.\n */\n\n var overlaps = getOverlaps(index, offsets_1, thumbs, values, separator, decimalPlaces, valueToLabel); // Set a default label value of the Thumb value\n\n var labelValue_1 = valueToLabel(values[index].toFixed(decimalPlaces));\n /**\n * If there are overlaps for the Thumb, we need to calculate the correct\n * Label value along with the relevant styling. We only want to show a Label\n * for the left most Thumb in an overlapping set.\n * All other Thumbs will be set to display: none.\n */\n\n if (overlaps.length) {\n /**\n * Get an Array of the offsets for the overlapping Thumbs\n * This is so we can determine if the Thumb we are looking at\n * is the left most thumb in an overlapping set\n */\n var offsetsX = overlaps.reduce(function (a, c, i, s) {\n return a.length ? __spreadArrays(a, [offsets_1[s[i]].x]) : [offsets_1[s[i]].x];\n }, []);\n /**\n * If our Thumb is the left most Thumb, we can build a Label value\n * and set the style for that Label\n */\n\n if (Math.min.apply(Math, offsetsX) === offsets_1[index].x) {\n /**\n * First calculate the Label value. To do this,\n * grab all the values for the Thumbs in our overlaps.\n * Then convert that to a Set and sort it whilst removing duplicates.\n */\n var labelValues_1 = [];\n overlaps.forEach(function (thumb) {\n labelValues_1.push(values[thumb].toFixed(decimalPlaces));\n });\n /**\n * Update the labelValue with the resulting Array\n * joined by our defined separator\n */\n\n labelValue_1 = Array.from(new Set(labelValues_1.sort(function (a, b) {\n return parseFloat(a) - parseFloat(b);\n }))).map(valueToLabel).join(separator);\n /**\n * Lastly, build the label styling. The label styling will\n * position the label and apply a transform so that it's centered.\n * We want the center point between the left edge of the left most Thumb\n * and the right edge of the right most Thumb.\n */\n\n var first = Math.min.apply(Math, offsetsX);\n var last = Math.max.apply(Math, offsetsX);\n var lastWidth = thumbs[overlaps[offsetsX.indexOf(last)]].getBoundingClientRect().width;\n newStyle.left = Math.abs(first - (last + lastWidth)) / 2 + \"px\";\n newStyle.transform = 'translate(-50%, 0)';\n } else {\n // If the Thumb isn't the left most Thumb, hide the Label!\n newStyle.visibility = 'hidden';\n }\n } // Update the label value and style\n\n\n setLabelValue(labelValue_1);\n setLabelStyle(newStyle);\n }\n }, [rangeRef, values]);\n return [labelValue, labelStyle];\n};","/*global define:false */\n\n/**\n * Copyright 2012-2017 Craig Campbell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * Mousetrap is a simple keyboard shortcut library for Javascript with\n * no external dependencies\n *\n * @version 1.6.5\n * @url craig.is/killing/mice\n */\n(function (window, document, undefined) {\n // Check if mousetrap is used inside browser, if not, return\n if (!window) {\n return;\n }\n /**\n * mapping of special keycodes to their corresponding keys\n *\n * everything in this dictionary cannot use keypress events\n * so it has to be here to map to the correct keycodes for\n * keyup/keydown events\n *\n * @type {Object}\n */\n\n\n var _MAP = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 16: 'shift',\n 17: 'ctrl',\n 18: 'alt',\n 20: 'capslock',\n 27: 'esc',\n 32: 'space',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 45: 'ins',\n 46: 'del',\n 91: 'meta',\n 93: 'meta',\n 224: 'meta'\n };\n /**\n * mapping for special characters so they can support\n *\n * this dictionary is only used incase you want to bind a\n * keyup or keydown event to one of these keys\n *\n * @type {Object}\n */\n\n var _KEYCODE_MAP = {\n 106: '*',\n 107: '+',\n 109: '-',\n 110: '.',\n 111: '/',\n 186: ';',\n 187: '=',\n 188: ',',\n 189: '-',\n 190: '.',\n 191: '/',\n 192: '`',\n 219: '[',\n 220: '\\\\',\n 221: ']',\n 222: '\\''\n };\n /**\n * this is a mapping of keys that require shift on a US keypad\n * back to the non shift equivelents\n *\n * this is so you can use keyup events with these keys\n *\n * note that this will only work reliably on US keyboards\n *\n * @type {Object}\n */\n\n var _SHIFT_MAP = {\n '~': '`',\n '!': '1',\n '@': '2',\n '#': '3',\n '$': '4',\n '%': '5',\n '^': '6',\n '&': '7',\n '*': '8',\n '(': '9',\n ')': '0',\n '_': '-',\n '+': '=',\n ':': ';',\n '\\\"': '\\'',\n '<': ',',\n '>': '.',\n '?': '/',\n '|': '\\\\'\n };\n /**\n * this is a list of special strings you can use to map\n * to modifier keys when you specify your keyboard shortcuts\n *\n * @type {Object}\n */\n\n var _SPECIAL_ALIASES = {\n 'option': 'alt',\n 'command': 'meta',\n 'return': 'enter',\n 'escape': 'esc',\n 'plus': '+',\n 'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n };\n /**\n * variable to store the flipped version of _MAP from above\n * needed to check if we should use keypress or not when no action\n * is specified\n *\n * @type {Object|undefined}\n */\n\n var _REVERSE_MAP;\n /**\n * loop through the f keys, f1 to f19 and add them to the map\n * programatically\n */\n\n\n for (var i = 1; i < 20; ++i) {\n _MAP[111 + i] = 'f' + i;\n }\n /**\n * loop through to map numbers on the numeric keypad\n */\n\n\n for (i = 0; i <= 9; ++i) {\n // This needs to use a string cause otherwise since 0 is falsey\n // mousetrap will never fire for numpad 0 pressed as part of a keydown\n // event.\n //\n // @see https://github.com/ccampbell/mousetrap/pull/258\n _MAP[i + 96] = i.toString();\n }\n /**\n * cross browser add event method\n *\n * @param {Element|HTMLDocument} object\n * @param {string} type\n * @param {Function} callback\n * @returns void\n */\n\n\n function _addEvent(object, type, callback) {\n if (object.addEventListener) {\n object.addEventListener(type, callback, false);\n return;\n }\n\n object.attachEvent('on' + type, callback);\n }\n /**\n * takes the event and returns the key character\n *\n * @param {Event} e\n * @return {string}\n */\n\n\n function _characterFromEvent(e) {\n // for keypress events we should return the character as is\n if (e.type == 'keypress') {\n var character = String.fromCharCode(e.which); // if the shift key is not pressed then it is safe to assume\n // that we want the character to be lowercase. this means if\n // you accidentally have caps lock on then your key bindings\n // will continue to work\n //\n // the only side effect that might not be desired is if you\n // bind something like 'A' cause you want to trigger an\n // event when capital A is pressed caps lock will no longer\n // trigger the event. shift+a will though.\n\n if (!e.shiftKey) {\n character = character.toLowerCase();\n }\n\n return character;\n } // for non keypress events the special maps are needed\n\n\n if (_MAP[e.which]) {\n return _MAP[e.which];\n }\n\n if (_KEYCODE_MAP[e.which]) {\n return _KEYCODE_MAP[e.which];\n } // if it is not in the special map\n // with keydown and keyup events the character seems to always\n // come in as an uppercase character whether you are pressing shift\n // or not. we should make sure it is always lowercase for comparisons\n\n\n return String.fromCharCode(e.which).toLowerCase();\n }\n /**\n * checks if two arrays are equal\n *\n * @param {Array} modifiers1\n * @param {Array} modifiers2\n * @returns {boolean}\n */\n\n\n function _modifiersMatch(modifiers1, modifiers2) {\n return modifiers1.sort().join(',') === modifiers2.sort().join(',');\n }\n /**\n * takes a key event and figures out what the modifiers are\n *\n * @param {Event} e\n * @returns {Array}\n */\n\n\n function _eventModifiers(e) {\n var modifiers = [];\n\n if (e.shiftKey) {\n modifiers.push('shift');\n }\n\n if (e.altKey) {\n modifiers.push('alt');\n }\n\n if (e.ctrlKey) {\n modifiers.push('ctrl');\n }\n\n if (e.metaKey) {\n modifiers.push('meta');\n }\n\n return modifiers;\n }\n /**\n * prevents default for this event\n *\n * @param {Event} e\n * @returns void\n */\n\n\n function _preventDefault(e) {\n if (e.preventDefault) {\n e.preventDefault();\n return;\n }\n\n e.returnValue = false;\n }\n /**\n * stops propogation for this event\n *\n * @param {Event} e\n * @returns void\n */\n\n\n function _stopPropagation(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n return;\n }\n\n e.cancelBubble = true;\n }\n /**\n * determines if the keycode specified is a modifier key or not\n *\n * @param {string} key\n * @returns {boolean}\n */\n\n\n function _isModifier(key) {\n return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';\n }\n /**\n * reverses the map lookup so that we can look for specific keys\n * to see what can and can't use keypress\n *\n * @return {Object}\n */\n\n\n function _getReverseMap() {\n if (!_REVERSE_MAP) {\n _REVERSE_MAP = {};\n\n for (var key in _MAP) {\n // pull out the numeric keypad from here cause keypress should\n // be able to detect the keys from the character\n if (key > 95 && key < 112) {\n continue;\n }\n\n if (_MAP.hasOwnProperty(key)) {\n _REVERSE_MAP[_MAP[key]] = key;\n }\n }\n }\n\n return _REVERSE_MAP;\n }\n /**\n * picks the best action based on the key combination\n *\n * @param {string} key - character for key\n * @param {Array} modifiers\n * @param {string=} action passed in\n */\n\n\n function _pickBestAction(key, modifiers, action) {\n // if no action was picked in we should try to pick the one\n // that we think would work best for this key\n if (!action) {\n action = _getReverseMap()[key] ? 'keydown' : 'keypress';\n } // modifier keys don't work as expected with keypress,\n // switch to keydown\n\n\n if (action == 'keypress' && modifiers.length) {\n action = 'keydown';\n }\n\n return action;\n }\n /**\n * Converts from a string key combination to an array\n *\n * @param {string} combination like \"command+shift+l\"\n * @return {Array}\n */\n\n\n function _keysFromString(combination) {\n if (combination === '+') {\n return ['+'];\n }\n\n combination = combination.replace(/\\+{2}/g, '+plus');\n return combination.split('+');\n }\n /**\n * Gets info for a specific key combination\n *\n * @param {string} combination key combination (\"command+s\" or \"a\" or \"*\")\n * @param {string=} action\n * @returns {Object}\n */\n\n\n function _getKeyInfo(combination, action) {\n var keys;\n var key;\n var i;\n var modifiers = []; // take the keys from this pattern and figure out what the actual\n // pattern is all about\n\n keys = _keysFromString(combination);\n\n for (i = 0; i < keys.length; ++i) {\n key = keys[i]; // normalize key names\n\n if (_SPECIAL_ALIASES[key]) {\n key = _SPECIAL_ALIASES[key];\n } // if this is not a keypress event then we should\n // be smart about using shift keys\n // this will only work for US keyboards however\n\n\n if (action && action != 'keypress' && _SHIFT_MAP[key]) {\n key = _SHIFT_MAP[key];\n modifiers.push('shift');\n } // if this key is a modifier then add it to the list of modifiers\n\n\n if (_isModifier(key)) {\n modifiers.push(key);\n }\n } // depending on what the key combination is\n // we will try to pick the best event for it\n\n\n action = _pickBestAction(key, modifiers, action);\n return {\n key: key,\n modifiers: modifiers,\n action: action\n };\n }\n\n function _belongsTo(element, ancestor) {\n if (element === null || element === document) {\n return false;\n }\n\n if (element === ancestor) {\n return true;\n }\n\n return _belongsTo(element.parentNode, ancestor);\n }\n\n function Mousetrap(targetElement) {\n var self = this;\n targetElement = targetElement || document;\n\n if (!(self instanceof Mousetrap)) {\n return new Mousetrap(targetElement);\n }\n /**\n * element to attach key events to\n *\n * @type {Element}\n */\n\n\n self.target = targetElement;\n /**\n * a list of all the callbacks setup via Mousetrap.bind()\n *\n * @type {Object}\n */\n\n self._callbacks = {};\n /**\n * direct map of string combinations to callbacks used for trigger()\n *\n * @type {Object}\n */\n\n self._directMap = {};\n /**\n * keeps track of what level each sequence is at since multiple\n * sequences can start out with the same sequence\n *\n * @type {Object}\n */\n\n var _sequenceLevels = {};\n /**\n * variable to store the setTimeout call\n *\n * @type {null|number}\n */\n\n var _resetTimer;\n /**\n * temporary state where we will ignore the next keyup\n *\n * @type {boolean|string}\n */\n\n\n var _ignoreNextKeyup = false;\n /**\n * temporary state where we will ignore the next keypress\n *\n * @type {boolean}\n */\n\n var _ignoreNextKeypress = false;\n /**\n * are we currently inside of a sequence?\n * type of action (\"keyup\" or \"keydown\" or \"keypress\") or false\n *\n * @type {boolean|string}\n */\n\n var _nextExpectedAction = false;\n /**\n * resets all sequence counters except for the ones passed in\n *\n * @param {Object} doNotReset\n * @returns void\n */\n\n function _resetSequences(doNotReset) {\n doNotReset = doNotReset || {};\n var activeSequences = false,\n key;\n\n for (key in _sequenceLevels) {\n if (doNotReset[key]) {\n activeSequences = true;\n continue;\n }\n\n _sequenceLevels[key] = 0;\n }\n\n if (!activeSequences) {\n _nextExpectedAction = false;\n }\n }\n /**\n * finds all callbacks that match based on the keycode, modifiers,\n * and action\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event|Object} e\n * @param {string=} sequenceName - name of the sequence we are looking for\n * @param {string=} combination\n * @param {number=} level\n * @returns {Array}\n */\n\n\n function _getMatches(character, modifiers, e, sequenceName, combination, level) {\n var i;\n var callback;\n var matches = [];\n var action = e.type; // if there are no events related to this keycode\n\n if (!self._callbacks[character]) {\n return [];\n } // if a modifier key is coming up on its own we should allow it\n\n\n if (action == 'keyup' && _isModifier(character)) {\n modifiers = [character];\n } // loop through all callbacks for the key that was pressed\n // and see if any of them match\n\n\n for (i = 0; i < self._callbacks[character].length; ++i) {\n callback = self._callbacks[character][i]; // if a sequence name is not specified, but this is a sequence at\n // the wrong level then move onto the next match\n\n if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {\n continue;\n } // if the action we are looking for doesn't match the action we got\n // then we should keep going\n\n\n if (action != callback.action) {\n continue;\n } // if this is a keypress event and the meta key and control key\n // are not pressed that means that we need to only look at the\n // character, otherwise check the modifiers as well\n //\n // chrome will not fire a keypress if meta or control is down\n // safari will fire a keypress if meta or meta+shift is down\n // firefox will fire a keypress if meta or control is down\n\n\n if (action == 'keypress' && !e.metaKey && !e.ctrlKey || _modifiersMatch(modifiers, callback.modifiers)) {\n // when you bind a combination or sequence a second time it\n // should overwrite the first one. if a sequenceName or\n // combination is specified in this call it does just that\n //\n // @todo make deleting its own method?\n var deleteCombo = !sequenceName && callback.combo == combination;\n var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;\n\n if (deleteCombo || deleteSequence) {\n self._callbacks[character].splice(i, 1);\n }\n\n matches.push(callback);\n }\n }\n\n return matches;\n }\n /**\n * actually calls the callback function\n *\n * if your callback function returns false this will use the jquery\n * convention - prevent default and stop propogation on the event\n *\n * @param {Function} callback\n * @param {Event} e\n * @returns void\n */\n\n\n function _fireCallback(callback, e, combo, sequence) {\n // if this event should not happen stop here\n if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {\n return;\n }\n\n if (callback(e, combo) === false) {\n _preventDefault(e);\n\n _stopPropagation(e);\n }\n }\n /**\n * handles a character key event\n *\n * @param {string} character\n * @param {Array} modifiers\n * @param {Event} e\n * @returns void\n */\n\n\n self._handleKey = function (character, modifiers, e) {\n var callbacks = _getMatches(character, modifiers, e);\n\n var i;\n var doNotReset = {};\n var maxLevel = 0;\n var processedSequenceCallback = false; // Calculate the maxLevel for sequences so we can only execute the longest callback sequence\n\n for (i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].seq) {\n maxLevel = Math.max(maxLevel, callbacks[i].level);\n }\n } // loop through matching callbacks for this key event\n\n\n for (i = 0; i < callbacks.length; ++i) {\n // fire for all sequence callbacks\n // this is because if for example you have multiple sequences\n // bound such as \"g i\" and \"g t\" they both need to fire the\n // callback for matching g cause otherwise you can only ever\n // match the first one\n if (callbacks[i].seq) {\n // only fire callbacks for the maxLevel to prevent\n // subsequences from also firing\n //\n // for example 'a option b' should not cause 'option b' to fire\n // even though 'option b' is part of the other sequence\n //\n // any sequences that do not match here will be discarded\n // below by the _resetSequences call\n if (callbacks[i].level != maxLevel) {\n continue;\n }\n\n processedSequenceCallback = true; // keep a list of which sequences were matches for later\n\n doNotReset[callbacks[i].seq] = 1;\n\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);\n\n continue;\n } // if there were no sequence matches but we are still here\n // that means this is a regular match so we should fire that\n\n\n if (!processedSequenceCallback) {\n _fireCallback(callbacks[i].callback, e, callbacks[i].combo);\n }\n } // if the key you pressed matches the type of sequence without\n // being a modifier (ie \"keyup\" or \"keypress\") then we should\n // reset all sequences that were not matched by this event\n //\n // this is so, for example, if you have the sequence \"h a t\" and you\n // type \"h e a r t\" it does not match. in this case the \"e\" will\n // cause the sequence to reset\n //\n // modifier keys are ignored because you can have a sequence\n // that contains modifiers such as \"enter ctrl+space\" and in most\n // cases the modifier key will be pressed before the next key\n //\n // also if you have a sequence such as \"ctrl+b a\" then pressing the\n // \"b\" key will trigger a \"keypress\" and a \"keydown\"\n //\n // the \"keydown\" is expected when there is a modifier, but the\n // \"keypress\" ends up matching the _nextExpectedAction since it occurs\n // after and that causes the sequence to reset\n //\n // we ignore keypresses in a sequence that directly follow a keydown\n // for the same character\n\n\n var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;\n\n if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {\n _resetSequences(doNotReset);\n }\n\n _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';\n };\n /**\n * handles a keydown event\n *\n * @param {Event} e\n * @returns void\n */\n\n\n function _handleKeyEvent(e) {\n // normalize e.which for key events\n // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion\n if (typeof e.which !== 'number') {\n e.which = e.keyCode;\n }\n\n var character = _characterFromEvent(e); // no character found then stop\n\n\n if (!character) {\n return;\n } // need to use === for the character check because the character can be 0\n\n\n if (e.type == 'keyup' && _ignoreNextKeyup === character) {\n _ignoreNextKeyup = false;\n return;\n }\n\n self.handleKey(character, _eventModifiers(e), e);\n }\n /**\n * called to set a 1 second timeout on the specified sequence\n *\n * this is so after each key press in the sequence you have 1 second\n * to press the next key before you have to start over\n *\n * @returns void\n */\n\n\n function _resetSequenceTimer() {\n clearTimeout(_resetTimer);\n _resetTimer = setTimeout(_resetSequences, 1000);\n }\n /**\n * binds a key sequence to an event\n *\n * @param {string} combo - combo specified in bind call\n * @param {Array} keys\n * @param {Function} callback\n * @param {string=} action\n * @returns void\n */\n\n\n function _bindSequence(combo, keys, callback, action) {\n // start off by adding a sequence level record for this combination\n // and setting the level to 0\n _sequenceLevels[combo] = 0;\n /**\n * callback to increase the sequence level for this sequence and reset\n * all other sequences that were active\n *\n * @param {string} nextAction\n * @returns {Function}\n */\n\n function _increaseSequence(nextAction) {\n return function () {\n _nextExpectedAction = nextAction;\n ++_sequenceLevels[combo];\n\n _resetSequenceTimer();\n };\n }\n /**\n * wraps the specified callback inside of another function in order\n * to reset all sequence counters as soon as this sequence is done\n *\n * @param {Event} e\n * @returns void\n */\n\n\n function _callbackAndReset(e) {\n _fireCallback(callback, e, combo); // we should ignore the next key up if the action is key down\n // or keypress. this is so if you finish a sequence and\n // release the key the final key will not trigger a keyup\n\n\n if (action !== 'keyup') {\n _ignoreNextKeyup = _characterFromEvent(e);\n } // weird race condition if a sequence ends with the key\n // another sequence begins with\n\n\n setTimeout(_resetSequences, 10);\n } // loop through keys one at a time and bind the appropriate callback\n // function. for any key leading up to the final one it should\n // increase the sequence. after the final, it should reset all sequences\n //\n // if an action is specified in the original bind call then that will\n // be used throughout. otherwise we will pass the action that the\n // next key in the sequence should match. this allows a sequence\n // to mix and match keypress and keydown events depending on which\n // ones are better suited to the key provided\n\n\n for (var i = 0; i < keys.length; ++i) {\n var isFinal = i + 1 === keys.length;\n var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);\n\n _bindSingle(keys[i], wrappedCallback, action, combo, i);\n }\n }\n /**\n * binds a single keyboard combination\n *\n * @param {string} combination\n * @param {Function} callback\n * @param {string=} action\n * @param {string=} sequenceName - name of sequence if part of sequence\n * @param {number=} level - what part of the sequence the command is\n * @returns void\n */\n\n\n function _bindSingle(combination, callback, action, sequenceName, level) {\n // store a direct mapped reference for use with Mousetrap.trigger\n self._directMap[combination + ':' + action] = callback; // make sure multiple spaces in a row become a single space\n\n combination = combination.replace(/\\s+/g, ' ');\n var sequence = combination.split(' ');\n var info; // if this pattern is a sequence of keys then run through this method\n // to reprocess each pattern one key at a time\n\n if (sequence.length > 1) {\n _bindSequence(combination, sequence, callback, action);\n\n return;\n }\n\n info = _getKeyInfo(combination, action); // make sure to initialize array if this is the first time\n // a callback is added for this key\n\n self._callbacks[info.key] = self._callbacks[info.key] || []; // remove an existing match if there is one\n\n _getMatches(info.key, info.modifiers, {\n type: info.action\n }, sequenceName, combination, level); // add this call back to the array\n // if it is a sequence put it at the beginning\n // if not put it at the end\n //\n // this is important because the way these are processed expects\n // the sequence ones to come first\n\n\n self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({\n callback: callback,\n modifiers: info.modifiers,\n action: info.action,\n seq: sequenceName,\n level: level,\n combo: combination\n });\n }\n /**\n * binds multiple combinations to the same callback\n *\n * @param {Array} combinations\n * @param {Function} callback\n * @param {string|undefined} action\n * @returns void\n */\n\n\n self._bindMultiple = function (combinations, callback, action) {\n for (var i = 0; i < combinations.length; ++i) {\n _bindSingle(combinations[i], callback, action);\n }\n }; // start!\n\n\n _addEvent(targetElement, 'keypress', _handleKeyEvent);\n\n _addEvent(targetElement, 'keydown', _handleKeyEvent);\n\n _addEvent(targetElement, 'keyup', _handleKeyEvent);\n }\n /**\n * binds an event to mousetrap\n *\n * can be a single key, a combination of keys separated with +,\n * an array of keys, or a sequence of keys separated by spaces\n *\n * be sure to list the modifier keys first to make sure that the\n * correct key ends up getting bound (the last key in the pattern)\n *\n * @param {string|Array} keys\n * @param {Function} callback\n * @param {string=} action - 'keypress', 'keydown', or 'keyup'\n * @returns void\n */\n\n\n Mousetrap.prototype.bind = function (keys, callback, action) {\n var self = this;\n keys = keys instanceof Array ? keys : [keys];\n\n self._bindMultiple.call(self, keys, callback, action);\n\n return self;\n };\n /**\n * unbinds an event to mousetrap\n *\n * the unbinding sets the callback function of the specified key combo\n * to an empty function and deletes the corresponding key in the\n * _directMap dict.\n *\n * TODO: actually remove this from the _callbacks dictionary instead\n * of binding an empty function\n *\n * the keycombo+action has to be exactly the same as\n * it was defined in the bind method\n *\n * @param {string|Array} keys\n * @param {string} action\n * @returns void\n */\n\n\n Mousetrap.prototype.unbind = function (keys, action) {\n var self = this;\n return self.bind.call(self, keys, function () {}, action);\n };\n /**\n * triggers an event that has already been bound\n *\n * @param {string} keys\n * @param {string=} action\n * @returns void\n */\n\n\n Mousetrap.prototype.trigger = function (keys, action) {\n var self = this;\n\n if (self._directMap[keys + ':' + action]) {\n self._directMap[keys + ':' + action]({}, keys);\n }\n\n return self;\n };\n /**\n * resets the library back to its initial state. this is useful\n * if you want to clear out the current keyboard shortcuts and bind\n * new ones - for example if you switch to another page\n *\n * @returns void\n */\n\n\n Mousetrap.prototype.reset = function () {\n var self = this;\n self._callbacks = {};\n self._directMap = {};\n return self;\n };\n /**\n * should we stop this event before firing off callbacks\n *\n * @param {Event} e\n * @param {Element} element\n * @return {boolean}\n */\n\n\n Mousetrap.prototype.stopCallback = function (e, element) {\n var self = this; // if the element has the class \"mousetrap\" then no need to stop\n\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n if (_belongsTo(element, self.target)) {\n return false;\n } // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,\n // not the initial event target in the shadow tree. Note that not all events cross the\n // shadow boundary.\n // For shadow trees with `mode: 'open'`, the initial event target is the first element in\n // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event\n // target cannot be obtained.\n\n\n if ('composedPath' in e && typeof e.composedPath === 'function') {\n // For open shadow trees, update `element` so that the following check works.\n var initialEventTarget = e.composedPath()[0];\n\n if (initialEventTarget !== e.target) {\n element = initialEventTarget;\n }\n } // stop for input, select, and textarea\n\n\n return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;\n };\n /**\n * exposes _handleKey publicly so it can be overwritten by extensions\n */\n\n\n Mousetrap.prototype.handleKey = function () {\n var self = this;\n return self._handleKey.apply(self, arguments);\n };\n /**\n * allow custom key mappings\n */\n\n\n Mousetrap.addKeycodes = function (object) {\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n _MAP[key] = object[key];\n }\n }\n\n _REVERSE_MAP = null;\n };\n /**\n * Init the global mousetrap functions\n *\n * This method is needed to allow the global mousetrap functions to work\n * now that mousetrap is a constructor function.\n */\n\n\n Mousetrap.init = function () {\n var documentMousetrap = Mousetrap(document);\n\n for (var method in documentMousetrap) {\n if (method.charAt(0) !== '_') {\n Mousetrap[method] = function (method) {\n return function () {\n return documentMousetrap[method].apply(documentMousetrap, arguments);\n };\n }(method);\n }\n }\n };\n\n Mousetrap.init(); // expose mousetrap to the global object\n\n window.Mousetrap = Mousetrap; // expose as a common js module\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = Mousetrap;\n } // expose mousetrap as an AMD module\n\n\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return Mousetrap;\n });\n }\n})(typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);","function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\n\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\n\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\n\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\n\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) { ; } } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\n\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\n\nfunction _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(r) { if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r); }\n\nfunction _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }\n\nfunction _createForOfIteratorHelper(r, e) { var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) { t && (r = t); var _n11 = 0, F = function F() {}; return { s: F, n: function n() { return _n11 >= r.length ? { done: !0 } : { done: !1, value: r[_n11++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }\n\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\n\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\n/*! Pickr 1.5.1 MIT | https://github.com/Simonwep/pickr */\n!function (t, e) {\n \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) && \"object\" == (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) ? module.exports = e() : \"function\" == typeof define && define.amd ? define([], e) : \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) ? exports.Pickr = e() : t.Pickr = e();\n}(window, function () {\n return function (t) {\n var e = {};\n\n function o(n) {\n if (e[n]) return e[n].exports;\n var i = e[n] = {\n i: n,\n l: !1,\n exports: {}\n };\n return t[n].call(i.exports, i, i.exports, o), i.l = !0, i.exports;\n }\n\n return o.m = t, o.c = e, o.d = function (t, e, n) {\n o.o(t, e) || Object.defineProperty(t, e, {\n enumerable: !0,\n get: n\n });\n }, o.r = function (t) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n }, o.t = function (t, e) {\n if (1 & e && (t = o(t)), 8 & e) return t;\n if (4 & e && \"object\" == _typeof(t) && t && t.__esModule) return t;\n var n = Object.create(null);\n if (o.r(n), Object.defineProperty(n, \"default\", {\n enumerable: !0,\n value: t\n }), 2 & e && \"string\" != typeof t) for (var i in t) {\n o.d(n, i, function (e) {\n return t[e];\n }.bind(null, i));\n }\n return n;\n }, o.n = function (t) {\n var e = t && t.__esModule ? function () {\n return t.default;\n } : function () {\n return t;\n };\n return o.d(e, \"a\", e), e;\n }, o.o = function (t, e) {\n return Object.prototype.hasOwnProperty.call(t, e);\n }, o.p = \"\", o(o.s = 1);\n }([function (t) {\n t.exports = JSON.parse('{\"a\":\"1.5.1\"}');\n }, function (t, e, o) {\n \"use strict\";\n\n o.r(e);\n var n = {};\n\n function i(t, e) {\n var o = Object.keys(t);\n\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(t);\n e && (n = n.filter(function (e) {\n return Object.getOwnPropertyDescriptor(t, e).enumerable;\n })), o.push.apply(o, n);\n }\n\n return o;\n }\n\n function r(t) {\n for (var e = 1; e < arguments.length; e++) {\n var o = null != arguments[e] ? arguments[e] : {};\n e % 2 ? i(Object(o), !0).forEach(function (e) {\n s(t, e, o[e]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : i(Object(o)).forEach(function (e) {\n Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(o, e));\n });\n }\n\n return t;\n }\n\n function s(t, e, o) {\n return e in t ? Object.defineProperty(t, e, {\n value: o,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = o, t;\n }\n\n function c(t, e, o, n) {\n var i = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n e instanceof HTMLCollection || e instanceof NodeList ? e = Array.from(e) : Array.isArray(e) || (e = [e]), Array.isArray(o) || (o = [o]);\n\n var _iterator = _createForOfIteratorHelper(e),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _s = _step.value;\n\n var _iterator2 = _createForOfIteratorHelper(o),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var _e = _step2.value;\n\n _s[t](_e, n, r({\n capture: !1\n }, i));\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return Array.prototype.slice.call(arguments, 1);\n }\n\n o.r(n), o.d(n, \"on\", function () {\n return a;\n }), o.d(n, \"off\", function () {\n return l;\n }), o.d(n, \"createElementFromString\", function () {\n return p;\n }), o.d(n, \"removeAttribute\", function () {\n return u;\n }), o.d(n, \"createFromTemplate\", function () {\n return h;\n }), o.d(n, \"eventPath\", function () {\n return d;\n }), o.d(n, \"resolveElement\", function () {\n return f;\n }), o.d(n, \"adjustableInputNumbers\", function () {\n return m;\n });\n var a = c.bind(null, \"addEventListener\"),\n l = c.bind(null, \"removeEventListener\");\n\n function p(t) {\n var e = document.createElement(\"div\");\n return e.innerHTML = t.trim(), e.firstElementChild;\n }\n\n function u(t, e) {\n var o = t.getAttribute(e);\n return t.removeAttribute(e), o;\n }\n\n function h(t) {\n return function t(e) {\n var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var n = u(e, \":obj\"),\n i = u(e, \":ref\"),\n r = n ? o[n] = {} : o;\n i && (o[i] = e);\n\n for (var _i = 0, _Array$from = Array.from(e.children); _i < _Array$from.length; _i++) {\n var _o = _Array$from[_i];\n\n var _e2 = u(_o, \":arr\"),\n _n = t(_o, _e2 ? {} : r);\n\n _e2 && (r[_e2] || (r[_e2] = [])).push(Object.keys(_n).length ? _n : _o);\n }\n\n return o;\n }(p(t));\n }\n\n function d(t) {\n var e = t.path || t.composedPath && t.composedPath();\n if (e) return e;\n var o = t.target.parentElement;\n\n for (e = [t.target, o]; o = o.parentElement;) {\n e.push(o);\n }\n\n return e.push(document, window), e;\n }\n\n function f(t) {\n return t instanceof Element ? t : \"string\" == typeof t ? t.split(/>>/g).reduce(function (t, e, o, n) {\n return t = t.querySelector(e), o < n.length - 1 ? t.shadowRoot : t;\n }, document) : null;\n }\n\n function m(t) {\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (t) {\n return t;\n };\n\n function o(o) {\n var n = [.001, .01, .1][Number(o.shiftKey || 2 * o.ctrlKey)] * (o.deltaY < 0 ? 1 : -1);\n var i = 0,\n r = t.selectionStart;\n t.value = t.value.replace(/[\\d.]+/g, function (t, o) {\n return o <= r && o + t.length >= r ? (r = o, e(Number(t), n, i)) : (i++, t);\n }), t.focus(), t.setSelectionRange(r, r), o.preventDefault(), t.dispatchEvent(new Event(\"input\"));\n }\n\n a(t, \"focus\", function () {\n return a(window, \"wheel\", o, {\n passive: !1\n });\n }), a(t, \"blur\", function () {\n return l(window, \"wheel\", o);\n });\n }\n\n var v = o(0);\n var b = Math.min,\n y = Math.max,\n g = Math.floor,\n _ = Math.round;\n\n function w(t, e, o) {\n e /= 100, o /= 100;\n var n = g(t = t / 360 * 6),\n i = t - n,\n r = o * (1 - e),\n s = o * (1 - i * e),\n c = o * (1 - (1 - i) * e),\n a = n % 6;\n return [255 * [o, s, r, r, c, o][a], 255 * [c, o, o, s, r, r][a], 255 * [r, r, c, o, o, s][a]];\n }\n\n function A(t, e, o) {\n var n = (2 - (e /= 100)) * (o /= 100) / 2;\n return 0 !== n && (e = 1 === n ? 0 : n < .5 ? e * o / (2 * n) : e * o / (2 - 2 * n)), [t, 100 * e, 100 * n];\n }\n\n function C(t, e, o) {\n var n = b(t /= 255, e /= 255, o /= 255),\n i = y(t, e, o),\n r = i - n;\n var s, c;\n if (0 === r) s = c = 0;else {\n c = r / i;\n\n var _n2 = ((i - t) / 6 + r / 2) / r,\n _a = ((i - e) / 6 + r / 2) / r,\n _l = ((i - o) / 6 + r / 2) / r;\n\n t === i ? s = _l - _a : e === i ? s = 1 / 3 + _n2 - _l : o === i && (s = 2 / 3 + _a - _n2), s < 0 ? s += 1 : s > 1 && (s -= 1);\n }\n return [360 * s, 100 * c, 100 * i];\n }\n\n function k(t, e, o, n) {\n return e /= 100, o /= 100, _toConsumableArray(C(255 * (1 - b(1, (t /= 100) * (1 - (n /= 100)) + n)), 255 * (1 - b(1, e * (1 - n) + n)), 255 * (1 - b(1, o * (1 - n) + n))));\n }\n\n function S(t, e, o) {\n return e /= 100, [t, 2 * (e *= (o /= 100) < .5 ? o : 1 - o) / (o + e) * 100, 100 * (o + e)];\n }\n\n function O(t) {\n return C.apply(void 0, _toConsumableArray(t.match(/.{2}/g).map(function (t) {\n return parseInt(t, 16);\n })));\n }\n\n function j(t) {\n t = t.match(/^[a-zA-Z]+$/) ? function (t) {\n if (\"black\" === t.toLowerCase()) return \"#000\";\n var e = document.createElement(\"canvas\").getContext(\"2d\");\n return e.fillStyle = t, \"#000\" === e.fillStyle ? null : e.fillStyle;\n }(t) : t;\n\n var e = {\n cmyk: /^cmyk[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)/i,\n rgba: /^((rgba)|rgb)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hsla: /^((hsla)|hsl)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hsva: /^((hsva)|hsv)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]+([\\d.]+)[\\D]*?([\\d.]+|$)/i,\n hexa: /^#?(([\\dA-Fa-f]{3,4})|([\\dA-Fa-f]{6})|([\\dA-Fa-f]{8}))$/i\n },\n o = function o(t) {\n return t.map(function (t) {\n return /^(|\\d+)\\.\\d+|\\d+$/.test(t) ? Number(t) : void 0;\n });\n };\n\n var n;\n\n t: for (var _i2 in e) {\n if (!(n = e[_i2].exec(t))) continue;\n\n var _r = function _r(t) {\n return !!n[2] == (\"number\" == typeof t);\n };\n\n switch (_i2) {\n case \"cmyk\":\n {\n var _o2 = o(n),\n _o3 = _slicedToArray(_o2, 5),\n _t = _o3[1],\n _e3 = _o3[2],\n _r2 = _o3[3],\n _s2 = _o3[4];\n\n if (_t > 100 || _e3 > 100 || _r2 > 100 || _s2 > 100) break t;\n return {\n values: k(_t, _e3, _r2, _s2),\n type: _i2\n };\n }\n\n case \"rgba\":\n {\n var _o4 = o(n),\n _o5 = _slicedToArray(_o4, 7),\n _t2 = _o5[3],\n _e4 = _o5[4],\n _s3 = _o5[5],\n _c = _o5[6];\n\n if (_t2 > 255 || _e4 > 255 || _s3 > 255 || _c < 0 || _c > 1 || !_r(_c)) break t;\n return {\n values: [].concat(_toConsumableArray(C(_t2, _e4, _s3)), [_c]),\n a: _c,\n type: _i2\n };\n }\n\n case \"hexa\":\n {\n var _n3 = n,\n _n4 = _slicedToArray(_n3, 2),\n _t3 = _n4[1];\n\n 4 !== _t3.length && 3 !== _t3.length || (_t3 = _t3.split(\"\").map(function (t) {\n return t + t;\n }).join(\"\"));\n\n var _e5 = _t3.substring(0, 6);\n\n var _o6 = _t3.substring(6);\n\n return _o6 = _o6 ? parseInt(_o6, 16) / 255 : void 0, {\n values: [].concat(_toConsumableArray(O(_e5)), [_o6]),\n a: _o6,\n type: _i2\n };\n }\n\n case \"hsla\":\n {\n var _o7 = o(n),\n _o8 = _slicedToArray(_o7, 7),\n _t4 = _o8[3],\n _e6 = _o8[4],\n _s4 = _o8[5],\n _c2 = _o8[6];\n\n if (_t4 > 360 || _e6 > 100 || _s4 > 100 || _c2 < 0 || _c2 > 1 || !_r(_c2)) break t;\n return {\n values: [].concat(_toConsumableArray(S(_t4, _e6, _s4)), [_c2]),\n a: _c2,\n type: _i2\n };\n }\n\n case \"hsva\":\n {\n var _o9 = o(n),\n _o10 = _slicedToArray(_o9, 7),\n _t5 = _o10[3],\n _e7 = _o10[4],\n _s5 = _o10[5],\n _c3 = _o10[6];\n\n if (_t5 > 360 || _e7 > 100 || _s5 > 100 || _c3 < 0 || _c3 > 1 || !_r(_c3)) break t;\n return {\n values: [_t5, _e7, _s5, _c3],\n a: _c3,\n type: _i2\n };\n }\n }\n }\n\n return {\n values: null,\n type: null\n };\n }\n\n function x() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var o = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n\n var i = function i(t, e) {\n return function () {\n var o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;\n return e(~o ? t.map(function (t) {\n return Number(t.toFixed(o));\n }) : t);\n };\n },\n r = {\n h: t,\n s: e,\n v: o,\n a: n,\n toHSVA: function toHSVA() {\n var t = [r.h, r.s, r.v, r.a];\n return t.toString = i(t, function (t) {\n return \"hsva(\".concat(t[0], \", \").concat(t[1], \"%, \").concat(t[2], \"%, \").concat(r.a, \")\");\n }), t;\n },\n toHSLA: function toHSLA() {\n var t = [].concat(_toConsumableArray(A(r.h, r.s, r.v)), [r.a]);\n return t.toString = i(t, function (t) {\n return \"hsla(\".concat(t[0], \", \").concat(t[1], \"%, \").concat(t[2], \"%, \").concat(r.a, \")\");\n }), t;\n },\n toRGBA: function toRGBA() {\n var t = [].concat(_toConsumableArray(w(r.h, r.s, r.v)), [r.a]);\n return t.toString = i(t, function (t) {\n return \"rgba(\".concat(t[0], \", \").concat(t[1], \", \").concat(t[2], \", \").concat(r.a, \")\");\n }), t;\n },\n toCMYK: function toCMYK() {\n var t = function (t, e, o) {\n var n = w(t, e, o),\n i = n[0] / 255,\n r = n[1] / 255,\n s = n[2] / 255,\n c = b(1 - i, 1 - r, 1 - s);\n return [100 * (1 === c ? 0 : (1 - i - c) / (1 - c)), 100 * (1 === c ? 0 : (1 - r - c) / (1 - c)), 100 * (1 === c ? 0 : (1 - s - c) / (1 - c)), 100 * c];\n }(r.h, r.s, r.v);\n\n return t.toString = i(t, function (t) {\n return \"cmyk(\".concat(t[0], \"%, \").concat(t[1], \"%, \").concat(t[2], \"%, \").concat(t[3], \"%)\");\n }), t;\n },\n toHEXA: function toHEXA() {\n var t = function (t, e, o) {\n return w(t, e, o).map(function (t) {\n return _(t).toString(16).padStart(2, \"0\");\n });\n }(r.h, r.s, r.v),\n e = r.a >= 1 ? \"\" : Number((255 * r.a).toFixed(0)).toString(16).toUpperCase().padStart(2, \"0\");\n\n return e && t.push(e), t.toString = function () {\n return \"#\".concat(t.join(\"\").toUpperCase());\n }, t;\n },\n clone: function clone() {\n return x(r.h, r.s, r.v, r.a);\n }\n };\n\n return r;\n }\n\n var E = function E(t) {\n return Math.max(Math.min(t, 1), 0);\n };\n\n function L(t) {\n var e = {\n options: Object.assign({\n lock: null,\n onchange: function onchange() {\n return 0;\n },\n onstop: function onstop() {\n return 0;\n }\n }, t),\n _keyboard: function _keyboard(t) {\n var o = e.options,\n n = t.type,\n i = t.key;\n\n if (document.activeElement === o.wrapper) {\n var _o11 = e.options.lock,\n _r3 = \"ArrowUp\" === i,\n _s6 = \"ArrowRight\" === i,\n _c4 = \"ArrowDown\" === i,\n _a2 = \"ArrowLeft\" === i;\n\n if (\"keydown\" === n && (_r3 || _s6 || _c4 || _a2)) {\n var _n5 = 0,\n _i3 = 0;\n \"v\" === _o11 ? _n5 = _r3 || _s6 ? 1 : -1 : \"h\" === _o11 ? _n5 = _r3 || _s6 ? -1 : 1 : (_i3 = _r3 ? -1 : _c4 ? 1 : 0, _n5 = _a2 ? -1 : _s6 ? 1 : 0), e.update(E(e.cache.x + .01 * _n5), E(e.cache.y + .01 * _i3)), t.preventDefault();\n } else i.startsWith(\"Arrow\") && (e.options.onstop(), t.preventDefault());\n }\n },\n _tapstart: function _tapstart(t) {\n a(document, [\"mouseup\", \"touchend\", \"touchcancel\"], e._tapstop), a(document, [\"mousemove\", \"touchmove\"], e._tapmove), t.preventDefault(), e._tapmove(t);\n },\n _tapmove: function _tapmove(t) {\n var o = e.options,\n n = e.cache,\n i = o.lock,\n r = o.element,\n s = o.wrapper,\n c = s.getBoundingClientRect();\n var a = 0,\n l = 0;\n\n if (t) {\n var _e8 = t && t.touches && t.touches[0];\n\n a = t ? (_e8 || t).clientX : 0, l = t ? (_e8 || t).clientY : 0, a < c.left ? a = c.left : a > c.left + c.width && (a = c.left + c.width), l < c.top ? l = c.top : l > c.top + c.height && (l = c.top + c.height), a -= c.left, l -= c.top;\n } else n && (a = n.x * c.width, l = n.y * c.height);\n\n \"h\" !== i && (r.style.left = \"calc(\".concat(a / c.width * 100, \"% - \").concat(r.offsetWidth / 2, \"px)\")), \"v\" !== i && (r.style.top = \"calc(\".concat(l / c.height * 100, \"% - \").concat(r.offsetHeight / 2, \"px)\")), e.cache = {\n x: a / c.width,\n y: l / c.height\n };\n var p = E(a / c.width),\n u = E(l / c.height);\n\n switch (i) {\n case \"v\":\n return o.onchange(p);\n\n case \"h\":\n return o.onchange(u);\n\n default:\n return o.onchange(p, u);\n }\n },\n _tapstop: function _tapstop() {\n e.options.onstop(), l(document, [\"mouseup\", \"touchend\", \"touchcancel\"], e._tapstop), l(document, [\"mousemove\", \"touchmove\"], e._tapmove);\n },\n trigger: function trigger() {\n e._tapmove();\n },\n update: function update() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n var _e$options$wrapper$ge = e.options.wrapper.getBoundingClientRect(),\n n = _e$options$wrapper$ge.left,\n i = _e$options$wrapper$ge.top,\n r = _e$options$wrapper$ge.width,\n s = _e$options$wrapper$ge.height;\n\n \"h\" === e.options.lock && (o = t), e._tapmove({\n clientX: n + r * t,\n clientY: i + s * o\n });\n },\n destroy: function destroy() {\n var t = e.options,\n o = e._tapstart,\n n = e._keyboard;\n l(document, [\"keydown\", \"keyup\"], n), l([t.wrapper, t.element], \"mousedown\", o), l([t.wrapper, t.element], \"touchstart\", o, {\n passive: !1\n });\n }\n },\n o = e.options,\n n = e._tapstart,\n i = e._keyboard;\n return a([o.wrapper, o.element], \"mousedown\", n), a([o.wrapper, o.element], \"touchstart\", n, {\n passive: !1\n }), a(document, [\"keydown\", \"keyup\"], i), e;\n }\n\n function P() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n t = Object.assign({\n onchange: function onchange() {\n return 0;\n },\n className: \"\",\n elements: []\n }, t);\n var e = a(t.elements, \"click\", function (e) {\n t.elements.forEach(function (o) {\n return o.classList[e.target === o ? \"add\" : \"remove\"](t.className);\n }), t.onchange(e);\n });\n return {\n destroy: function destroy() {\n return l.apply(void 0, _toConsumableArray(e));\n }\n };\n }\n\n function B(_ref) {\n var t = _ref.el,\n e = _ref.reference,\n _ref$padding = _ref.padding,\n o = _ref$padding === void 0 ? 8 : _ref$padding;\n\n var n = {\n start: \"sme\",\n middle: \"mse\",\n end: \"ems\"\n },\n i = {\n top: \"tbrl\",\n right: \"rltb\",\n bottom: \"btrl\",\n left: \"lrbt\"\n },\n r = function () {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (e) {\n var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : t[e];\n if (o) return o;\n\n var _e$split = e.split(\"-\"),\n _e$split2 = _slicedToArray(_e$split, 2),\n n = _e$split2[0],\n _e$split2$ = _e$split2[1],\n i = _e$split2$ === void 0 ? \"middle\" : _e$split2$,\n r = \"top\" === n || \"bottom\" === n;\n\n return t[e] = {\n position: n,\n variant: i,\n isVertical: r\n };\n };\n }();\n\n return {\n update: function update(s) {\n var c = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;\n\n var _r4 = r(s),\n a = _r4.position,\n l = _r4.variant,\n p = _r4.isVertical,\n u = e.getBoundingClientRect(),\n h = t.getBoundingClientRect(),\n d = function d(t) {\n return t ? {\n t: u.top - h.height - o,\n b: u.bottom + o\n } : {\n r: u.right + o,\n l: u.left - h.width - o\n };\n },\n f = function f(t) {\n return t ? {\n s: u.left + u.width - h.width,\n m: -h.width / 2 + (u.left + u.width / 2),\n e: u.left\n } : {\n s: u.bottom - h.height,\n m: u.bottom - u.height / 2 - h.height / 2,\n e: u.bottom - u.height\n };\n },\n m = {},\n v = function v(t, e, o) {\n var n = \"top\" === o,\n i = n ? h.height : h.width,\n r = window[n ? \"innerHeight\" : \"innerWidth\"];\n\n var _iterator3 = _createForOfIteratorHelper(t),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var _n6 = _step3.value;\n\n var _t6 = e[_n6],\n _s7 = m[o] = \"\".concat(_t6, \"px\");\n\n if (_t6 > 0 && _t6 + i < r) return _s7;\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n return null;\n };\n\n for (var _i4 = 0, _arr = [p, !p]; _i4 < _arr.length; _i4++) {\n var _e9 = _arr[_i4];\n\n var _o12 = _e9 ? \"top\" : \"left\",\n _r5 = _e9 ? \"left\" : \"top\",\n _s8 = v(i[a], d(_e9), _o12),\n _c5 = v(n[l], f(_e9), _r5);\n\n if (_s8 && _c5) return t.style[_r5] = _c5, void (t.style[_o12] = _s8);\n }\n\n c ? (t.style.top = \"\".concat((window.innerHeight - h.height) / 2, \"px\"), t.style.left = \"\".concat((window.innerWidth - h.width) / 2, \"px\")) : (t.style.left = m.left, t.style.top = m.top);\n }\n };\n }\n\n function H(t, e, o) {\n return e in t ? Object.defineProperty(t, e, {\n value: o,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = o, t;\n }\n\n var R = /*#__PURE__*/function () {\n function R(t) {\n var _this = this;\n\n _classCallCheck(this, R);\n\n H(this, \"_initializingActive\", !0), H(this, \"_recalc\", !0), H(this, \"_nanopop\", null), H(this, \"_root\", null), H(this, \"_color\", x()), H(this, \"_lastColor\", x()), H(this, \"_swatchColors\", []), H(this, \"_eventListener\", {\n init: [],\n save: [],\n hide: [],\n show: [],\n clear: [],\n change: [],\n changestop: [],\n cancel: [],\n swatchselect: []\n }), this.options = t = Object.assign({\n appClass: null,\n theme: \"classic\",\n useAsButton: !1,\n padding: 8,\n disabled: !1,\n comparison: !0,\n closeOnScroll: !1,\n outputPrecision: 0,\n lockOpacity: !1,\n autoReposition: !0,\n container: \"body\",\n components: {\n interaction: {}\n },\n strings: {},\n swatches: null,\n inline: !1,\n sliders: null,\n default: \"#42445a\",\n defaultRepresentation: null,\n position: \"bottom-middle\",\n adjustableNumbers: !0,\n showAlways: !1,\n closeWithKey: \"Escape\"\n }, t);\n var _t7 = t,\n e = _t7.swatches,\n o = _t7.components,\n n = _t7.theme,\n i = _t7.sliders,\n r = _t7.lockOpacity,\n s = _t7.padding;\n [\"nano\", \"monolith\"].includes(n) && !i && (t.sliders = \"h\"), o.interaction || (o.interaction = {});\n var c = o.preview,\n a = o.opacity,\n l = o.hue,\n p = o.palette;\n o.opacity = !r && a, o.palette = p || c || a || l, this._preBuild(), this._buildComponents(), this._bindEvents(), this._finalBuild(), e && e.length && e.forEach(function (t) {\n return _this.addSwatch(t);\n });\n var _this$_root = this._root,\n u = _this$_root.button,\n h = _this$_root.app;\n this._nanopop = B({\n reference: u,\n padding: s,\n el: h\n }), u.setAttribute(\"role\", \"button\"), u.setAttribute(\"aria-label\", \"toggle color picker dialog\");\n var d = this;\n requestAnimationFrame(function e() {\n if (!h.offsetWidth && h.parentElement !== t.container) return requestAnimationFrame(e);\n d.setColor(t.default), d._rePositioningPicker(), t.defaultRepresentation && (d._representation = t.defaultRepresentation, d.setColorRepresentation(d._representation)), t.showAlways && d.show(), d._initializingActive = !1, d._emit(\"init\");\n });\n }\n\n _createClass(R, [{\n key: \"_preBuild\",\n value: function _preBuild() {\n var t = this.options;\n\n for (var _i5 = 0, _arr2 = [\"el\", \"container\"]; _i5 < _arr2.length; _i5++) {\n var _e10 = _arr2[_i5];\n t[_e10] = f(t[_e10]);\n }\n\n this._root = function (_ref2) {\n var t = _ref2.components,\n e = _ref2.strings,\n o = _ref2.useAsButton,\n n = _ref2.inline,\n i = _ref2.appClass,\n r = _ref2.theme,\n s = _ref2.lockOpacity;\n\n var c = function c(t) {\n return t ? \"\" : 'style=\"display:none\" hidden';\n },\n a = h('\\n <div :ref=\"root\" class=\"pickr\">\\n\\n '.concat(o ? \"\" : '<button type=\"button\" :ref=\"button\" class=\"pcr-button\"></button>', '\\n\\n <div :ref=\"app\" class=\"pcr-app ').concat(i || \"\", '\" data-theme=\"').concat(r, '\" ').concat(n ? 'style=\"position: unset\"' : \"\", ' aria-label=\"color picker dialog\" role=\"form\">\\n <div class=\"pcr-selection\" ').concat(c(t.palette), '>\\n <div :obj=\"preview\" class=\"pcr-color-preview\" ').concat(c(t.preview), '>\\n <button type=\"button\" :ref=\"lastColor\" class=\"pcr-last-color\" aria-label=\"use previous color\"></button>\\n <div :ref=\"currentColor\" class=\"pcr-current-color\"></div>\\n </div>\\n\\n <div :obj=\"palette\" class=\"pcr-color-palette\">\\n <div :ref=\"picker\" class=\"pcr-picker\"></div>\\n <div :ref=\"palette\" class=\"pcr-palette\" tabindex=\"0\" aria-label=\"color selection area\" role=\"listbox\"></div>\\n </div>\\n\\n <div :obj=\"hue\" class=\"pcr-color-chooser\" ').concat(c(t.hue), '>\\n <div :ref=\"picker\" class=\"pcr-picker\"></div>\\n <div :ref=\"slider\" class=\"pcr-hue pcr-slider\" tabindex=\"0\" aria-label=\"hue selection slider\" role=\"slider\"></div>\\n </div>\\n\\n <div :obj=\"opacity\" class=\"pcr-color-opacity\" ').concat(c(t.opacity), '>\\n <div :ref=\"picker\" class=\"pcr-picker\"></div>\\n <div :ref=\"slider\" class=\"pcr-opacity pcr-slider\" tabindex=\"0\" aria-label=\"opacity selection slider\" role=\"slider\"></div>\\n </div>\\n </div>\\n\\n <div class=\"pcr-swatches ').concat(t.palette ? \"\" : \"pcr-last\", '\" :ref=\"swatches\"></div> \\n\\n <div :obj=\"interaction\" class=\"pcr-interaction\" ').concat(c(Object.keys(t.interaction).length), '>\\n <input :ref=\"result\" class=\"pcr-result\" type=\"text\" spellcheck=\"false\" ').concat(c(t.interaction.input), '>\\n\\n <input :arr=\"options\" class=\"pcr-type\" data-type=\"HEXA\" value=\"').concat(s ? \"HEX\" : \"HEXA\", '\" type=\"button\" ').concat(c(t.interaction.hex), '>\\n <input :arr=\"options\" class=\"pcr-type\" data-type=\"RGBA\" value=\"').concat(s ? \"RGB\" : \"RGBA\", '\" type=\"button\" ').concat(c(t.interaction.rgba), '>\\n <input :arr=\"options\" class=\"pcr-type\" data-type=\"HSLA\" value=\"').concat(s ? \"HSL\" : \"HSLA\", '\" type=\"button\" ').concat(c(t.interaction.hsla), '>\\n <input :arr=\"options\" class=\"pcr-type\" data-type=\"HSVA\" value=\"').concat(s ? \"HSV\" : \"HSVA\", '\" type=\"button\" ').concat(c(t.interaction.hsva), '>\\n <input :arr=\"options\" class=\"pcr-type\" data-type=\"CMYK\" value=\"CMYK\" type=\"button\" ').concat(c(t.interaction.cmyk), '>\\n\\n <input :ref=\"save\" class=\"pcr-save\" value=\"').concat(e.save || \"Save\", '\" type=\"button\" ').concat(c(t.interaction.save), ' aria-label=\"save and exit\">\\n <input :ref=\"cancel\" class=\"pcr-cancel\" value=\"').concat(e.cancel || \"Cancel\", '\" type=\"button\" ').concat(c(t.interaction.cancel), ' aria-label=\"cancel and exit\">\\n <input :ref=\"clear\" class=\"pcr-clear\" value=\"').concat(e.clear || \"Clear\", '\" type=\"button\" ').concat(c(t.interaction.clear), ' aria-label=\"clear and exit\">\\n </div>\\n </div>\\n </div>\\n ')),\n l = a.interaction;\n\n return l.options.find(function (t) {\n return !t.hidden && !t.classList.add(\"active\");\n }), l.type = function () {\n return l.options.find(function (t) {\n return t.classList.contains(\"active\");\n });\n }, a;\n }(t), t.useAsButton && (this._root.button = t.el), t.container.appendChild(this._root.root);\n }\n }, {\n key: \"_finalBuild\",\n value: function _finalBuild() {\n var t = this.options,\n e = this._root;\n\n if (t.container.removeChild(e.root), t.inline) {\n var _o13 = t.el.parentElement;\n t.el.nextSibling ? _o13.insertBefore(e.app, t.el.nextSibling) : _o13.appendChild(e.app);\n } else t.container.appendChild(e.app);\n\n t.useAsButton ? t.inline && t.el.remove() : t.el.parentNode.replaceChild(e.root, t.el), t.disabled && this.disable(), t.comparison || (e.button.style.transition = \"none\", t.useAsButton || (e.preview.lastColor.style.transition = \"none\")), this.hide();\n }\n }, {\n key: \"_buildComponents\",\n value: function _buildComponents() {\n var _this2 = this;\n\n var t = this,\n e = this.options.components,\n o = (t.options.sliders || \"v\").repeat(2),\n _ref3 = o.match(/^[vh]+$/g) ? o : [],\n _ref4 = _slicedToArray(_ref3, 2),\n n = _ref4[0],\n i = _ref4[1],\n r = function r() {\n return _this2._color || (_this2._color = _this2._lastColor.clone());\n },\n s = {\n palette: L({\n element: t._root.palette.picker,\n wrapper: t._root.palette.palette,\n onstop: function onstop() {\n return t._emit(\"changestop\", t);\n },\n onchange: function onchange(o, n) {\n if (!e.palette) return;\n var i = r(),\n s = t._root,\n c = t.options,\n _s$preview = s.preview,\n a = _s$preview.lastColor,\n l = _s$preview.currentColor;\n t._recalc && (i.s = 100 * o, i.v = 100 - 100 * n, i.v < 0 && (i.v = 0), t._updateOutput());\n var p = i.toRGBA().toString(0);\n this.element.style.background = p, this.wrapper.style.background = \"\\n linear-gradient(to top, rgba(0, 0, 0, \".concat(i.a, \"), transparent),\\n linear-gradient(to left, hsla(\").concat(i.h, \", 100%, 50%, \").concat(i.a, \"), rgba(255, 255, 255, \").concat(i.a, \"))\\n \"), c.comparison ? c.useAsButton || t._lastColor || (a.style.color = p) : (s.button.style.color = p, s.button.classList.remove(\"clear\"));\n var u = i.toHEXA().toString();\n\n var _iterator4 = _createForOfIteratorHelper(t._swatchColors),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var _ref6 = _step4.value;\n var _e11 = _ref6.el;\n var _o14 = _ref6.color;\n\n _e11.classList[u === _o14.toHEXA().toString() ? \"add\" : \"remove\"](\"pcr-active\");\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n\n l.style.color = p;\n }\n }),\n hue: L({\n lock: \"v\" === i ? \"h\" : \"v\",\n element: t._root.hue.picker,\n wrapper: t._root.hue.slider,\n onstop: function onstop() {\n return t._emit(\"changestop\", t);\n },\n onchange: function onchange(o) {\n if (!e.hue || !e.palette) return;\n var n = r();\n t._recalc && (n.h = 360 * o), this.element.style.backgroundColor = \"hsl(\".concat(n.h, \", 100%, 50%)\"), s.palette.trigger();\n }\n }),\n opacity: L({\n lock: \"v\" === n ? \"h\" : \"v\",\n element: t._root.opacity.picker,\n wrapper: t._root.opacity.slider,\n onstop: function onstop() {\n return t._emit(\"changestop\", t);\n },\n onchange: function onchange(o) {\n if (!e.opacity || !e.palette) return;\n var n = r();\n t._recalc && (n.a = Math.round(100 * o) / 100), this.element.style.background = \"rgba(0, 0, 0, \".concat(n.a, \")\"), s.palette.trigger();\n }\n }),\n selectable: P({\n elements: t._root.interaction.options,\n className: \"active\",\n onchange: function onchange(e) {\n t._representation = e.target.getAttribute(\"data-type\").toUpperCase(), t._recalc && t._updateOutput();\n }\n })\n };\n\n this._components = s;\n }\n }, {\n key: \"_bindEvents\",\n value: function _bindEvents() {\n var _this3 = this;\n\n var t = this._root,\n e = this.options,\n o = [a(t.interaction.clear, \"click\", function () {\n return _this3._clearColor();\n }), a([t.interaction.cancel, t.preview.lastColor], \"click\", function () {\n _this3._emit(\"cancel\", _this3), _this3.setHSVA.apply(_this3, _toConsumableArray((_this3._lastColor || _this3._color).toHSVA()).concat([!0]));\n }), a(t.interaction.save, \"click\", function () {\n !_this3.applyColor() && !e.showAlways && _this3.hide();\n }), a(t.interaction.result, [\"keyup\", \"input\"], function (t) {\n _this3.setColor(t.target.value, !0) && !_this3._initializingActive && _this3._emit(\"change\", _this3._color), t.stopImmediatePropagation();\n }), a(t.interaction.result, [\"focus\", \"blur\"], function (t) {\n _this3._recalc = \"blur\" === t.type, _this3._recalc && _this3._updateOutput();\n }), a([t.palette.palette, t.palette.picker, t.hue.slider, t.hue.picker, t.opacity.slider, t.opacity.picker], [\"mousedown\", \"touchstart\"], function () {\n return _this3._recalc = !0;\n })];\n\n if (!e.showAlways) {\n var _n7 = e.closeWithKey;\n o.push(a(t.button, \"click\", function () {\n return _this3.isOpen() ? _this3.hide() : _this3.show();\n }), a(document, \"keyup\", function (t) {\n return _this3.isOpen() && (t.key === _n7 || t.code === _n7) && _this3.hide();\n }), a(document, [\"touchstart\", \"mousedown\"], function (e) {\n _this3.isOpen() && !d(e).some(function (e) {\n return e === t.app || e === t.button;\n }) && _this3.hide();\n }, {\n capture: !0\n }));\n }\n\n if (e.adjustableNumbers) {\n var _e12 = {\n rgba: [255, 255, 255, 1],\n hsva: [360, 100, 100, 1],\n hsla: [360, 100, 100, 1],\n cmyk: [100, 100, 100, 100]\n };\n m(t.interaction.result, function (t, o, n) {\n var i = _e12[_this3.getColorRepresentation().toLowerCase()];\n\n if (i) {\n var _e13 = i[n],\n _r6 = t + (_e13 >= 100 ? 1e3 * o : o);\n\n return _r6 <= 0 ? 0 : Number((_r6 < _e13 ? _r6 : _e13).toPrecision(3));\n }\n\n return t;\n });\n }\n\n if (e.autoReposition && !e.inline) {\n var _t8 = null;\n\n var _n8 = this;\n\n o.push(a(window, [\"scroll\", \"resize\"], function () {\n _n8.isOpen() && (e.closeOnScroll && _n8.hide(), null === _t8 ? (_t8 = setTimeout(function () {\n return _t8 = null;\n }, 100), requestAnimationFrame(function e() {\n _n8._rePositioningPicker(), null !== _t8 && requestAnimationFrame(e);\n })) : (clearTimeout(_t8), _t8 = setTimeout(function () {\n return _t8 = null;\n }, 100)));\n }, {\n capture: !0\n }));\n }\n\n this._eventBindings = o;\n }\n }, {\n key: \"_rePositioningPicker\",\n value: function _rePositioningPicker() {\n var t = this.options;\n t.inline || this._nanopop.update(t.position, !this._recalc);\n }\n }, {\n key: \"_updateOutput\",\n value: function _updateOutput() {\n var t = this._root,\n e = this._color,\n o = this.options;\n\n if (t.interaction.type()) {\n var _n9 = \"to\".concat(t.interaction.type().getAttribute(\"data-type\"));\n\n t.interaction.result.value = \"function\" == typeof e[_n9] ? e[_n9]().toString(o.outputPrecision) : \"\";\n }\n\n !this._initializingActive && this._recalc && this._emit(\"change\", e);\n }\n }, {\n key: \"_clearColor\",\n value: function _clearColor() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;\n var e = this._root,\n o = this.options;\n o.useAsButton || (e.button.style.color = \"rgba(0, 0, 0, 0.15)\"), e.button.classList.add(\"clear\"), o.showAlways || this.hide(), this._lastColor = null, this._initializingActive || t || (this._emit(\"save\", null), this._emit(\"clear\", this));\n }\n }, {\n key: \"_parseLocalColor\",\n value: function _parseLocalColor(t) {\n var _j = j(t),\n e = _j.values,\n o = _j.type,\n n = _j.a,\n i = this.options.lockOpacity,\n r = void 0 !== n && 1 !== n;\n\n return e && 3 === e.length && (e[3] = void 0), {\n values: !e || i && r ? null : e,\n type: o\n };\n }\n }, {\n key: \"_emit\",\n value: function _emit(t) {\n var _this4 = this;\n\n for (var _len = arguments.length, e = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n e[_key - 1] = arguments[_key];\n }\n\n this._eventListener[t].forEach(function (t) {\n return t.apply(void 0, e.concat([_this4]));\n });\n }\n }, {\n key: \"on\",\n value: function on(t, e) {\n return \"function\" == typeof e && \"string\" == typeof t && t in this._eventListener && this._eventListener[t].push(e), this;\n }\n }, {\n key: \"off\",\n value: function off(t, e) {\n var o = this._eventListener[t];\n\n if (o) {\n var _t9 = o.indexOf(e);\n\n ~_t9 && o.splice(_t9, 1);\n }\n\n return this;\n }\n }, {\n key: \"addSwatch\",\n value: function addSwatch(t) {\n var _this5 = this;\n\n var _this$_parseLocalColo = this._parseLocalColor(t),\n e = _this$_parseLocalColo.values;\n\n if (e) {\n var _t10 = this._swatchColors,\n _o15 = this._root,\n _n10 = x.apply(void 0, _toConsumableArray(e)),\n _i6 = p('<button type=\"button\" style=\"color: '.concat(_n10.toRGBA().toString(0), '\" aria-label=\"color swatch\"/>'));\n\n return _o15.swatches.appendChild(_i6), _t10.push({\n el: _i6,\n color: _n10\n }), this._eventBindings.push(a(_i6, \"click\", function () {\n _this5.setHSVA.apply(_this5, _toConsumableArray(_n10.toHSVA()).concat([!0])), _this5._emit(\"swatchselect\", _n10), _this5._emit(\"change\", _n10);\n })), !0;\n }\n\n return !1;\n }\n }, {\n key: \"removeSwatch\",\n value: function removeSwatch(t) {\n var e = this._swatchColors[t];\n\n if (e) {\n var _o16 = e.el;\n return this._root.swatches.removeChild(_o16), this._swatchColors.splice(t, 1), !0;\n }\n\n return !1;\n }\n }, {\n key: \"applyColor\",\n value: function applyColor() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;\n\n var _this$_root2 = this._root,\n e = _this$_root2.preview,\n o = _this$_root2.button,\n n = this._color.toRGBA().toString(0);\n\n return e.lastColor.style.color = n, this.options.useAsButton || (o.style.color = n), o.classList.remove(\"clear\"), this._lastColor = this._color.clone(), this._initializingActive || t || this._emit(\"save\", this._color), this;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this6 = this;\n\n this._eventBindings.forEach(function (t) {\n return l.apply(void 0, _toConsumableArray(t));\n }), Object.keys(this._components).forEach(function (t) {\n return _this6._components[t].destroy();\n });\n }\n }, {\n key: \"destroyAndRemove\",\n value: function destroyAndRemove() {\n var _this7 = this;\n\n this.destroy();\n var _this$_root3 = this._root,\n t = _this$_root3.root,\n e = _this$_root3.app;\n t.parentElement && t.parentElement.removeChild(t), e.parentElement.removeChild(e), Object.keys(this).forEach(function (t) {\n return _this7[t] = null;\n });\n }\n }, {\n key: \"hide\",\n value: function hide() {\n return this._root.app.classList.remove(\"visible\"), this._emit(\"hide\", this), this;\n }\n }, {\n key: \"show\",\n value: function show() {\n return this.options.disabled || (this._root.app.classList.add(\"visible\"), this._rePositioningPicker(), this._emit(\"show\", this)), this;\n }\n }, {\n key: \"isOpen\",\n value: function isOpen() {\n return this._root.app.classList.contains(\"visible\");\n }\n }, {\n key: \"setHSVA\",\n value: function setHSVA() {\n var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 360;\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var o = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n var i = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;\n var r = this._recalc;\n if (this._recalc = !1, t < 0 || t > 360 || e < 0 || e > 100 || o < 0 || o > 100 || n < 0 || n > 1) return !1;\n this._color = x(t, e, o, n);\n var _this$_components = this._components,\n s = _this$_components.hue,\n c = _this$_components.opacity,\n a = _this$_components.palette;\n return s.update(t / 360), c.update(n), a.update(e / 100, 1 - o / 100), i || this.applyColor(), r && this._updateOutput(), this._recalc = r, !0;\n }\n }, {\n key: \"setColor\",\n value: function setColor(t) {\n var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;\n if (null === t) return this._clearColor(e), !0;\n\n var _this$_parseLocalColo2 = this._parseLocalColor(t),\n o = _this$_parseLocalColo2.values,\n n = _this$_parseLocalColo2.type;\n\n if (o) {\n var _t11 = n.toUpperCase(),\n _i7 = this._root.interaction.options,\n _r7 = _i7.find(function (e) {\n return e.getAttribute(\"data-type\") === _t11;\n });\n\n if (_r7 && !_r7.hidden) {\n var _iterator5 = _createForOfIteratorHelper(_i7),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var _t12 = _step5.value;\n\n _t12.classList[_t12 === _r7 ? \"add\" : \"remove\"](\"active\");\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n }\n\n return !!this.setHSVA.apply(this, _toConsumableArray(o).concat([e])) && this.setColorRepresentation(_t11);\n }\n\n return !1;\n }\n }, {\n key: \"setColorRepresentation\",\n value: function setColorRepresentation(t) {\n return t = t.toUpperCase(), !!this._root.interaction.options.find(function (e) {\n return e.getAttribute(\"data-type\").startsWith(t) && !e.click();\n });\n }\n }, {\n key: \"getColorRepresentation\",\n value: function getColorRepresentation() {\n return this._representation;\n }\n }, {\n key: \"getColor\",\n value: function getColor() {\n return this._color;\n }\n }, {\n key: \"getSelectedColor\",\n value: function getSelectedColor() {\n return this._lastColor;\n }\n }, {\n key: \"getRoot\",\n value: function getRoot() {\n return this._root;\n }\n }, {\n key: \"disable\",\n value: function disable() {\n return this.hide(), this.options.disabled = !0, this._root.button.classList.add(\"disabled\"), this;\n }\n }, {\n key: \"enable\",\n value: function enable() {\n return this.options.disabled = !1, this._root.button.classList.remove(\"disabled\"), this;\n }\n }]);\n\n return R;\n }();\n\n R.utils = n, R.libs = {\n HSVaColor: x,\n Moveable: L,\n Nanopop: B,\n Selectable: P\n }, R.create = function (t) {\n return new R(t);\n }, R.version = v.a;\n e.default = R;\n }]).default;\n});","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function invariant(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n\n throw error;\n }\n};\n\nmodule.exports = invariant;","\"use strict\";\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar Range_1 = __importDefault(require(\"./Range\"));\n\nexports.Range = Range_1.default;\n\nvar utils_1 = require(\"./utils\");\n\nexports.getTrackBackground = utils_1.getTrackBackground;\nexports.useThumbOverlap = utils_1.useThumbOverlap;\nexports.relativeValue = utils_1.relativeValue;\n\nvar types_1 = require(\"./types\");\n\nexports.Direction = types_1.Direction;","\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n }\n result[\"default\"] = mod;\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar React = __importStar(require(\"react\"));\n\nvar utils_1 = require(\"./utils\");\n\nvar types_1 = require(\"./types\");\n\nvar INCREASE_KEYS = ['ArrowRight', 'ArrowUp', 'k', 'PageUp'];\nvar DECREASE_KEYS = ['ArrowLeft', 'ArrowDown', 'j', 'PageDown'];\n\nvar Range = function (_super) {\n __extends(Range, _super);\n\n function Range(props) {\n var _this = _super.call(this, props) || this;\n\n _this.trackRef = React.createRef();\n _this.thumbRefs = [];\n _this.state = {\n draggedThumbIndex: -1,\n thumbZIndexes: new Array(_this.props.values.length).fill(0).map(function (t, i) {\n return i;\n }),\n isChanged: false\n };\n\n _this.getOffsets = function () {\n var _a = _this.props,\n direction = _a.direction,\n values = _a.values,\n min = _a.min,\n max = _a.max;\n var trackElement = _this.trackRef.current;\n var trackRect = trackElement.getBoundingClientRect();\n var trackPadding = utils_1.getPaddingAndBorder(trackElement);\n return _this.getThumbs().map(function (thumb, index) {\n var thumbOffsets = {\n x: 0,\n y: 0\n };\n var thumbRect = thumb.getBoundingClientRect();\n var thumbMargins = utils_1.getMargin(thumb);\n\n switch (direction) {\n case types_1.Direction.Right:\n thumbOffsets.x = (thumbMargins.left + trackPadding.left) * -1;\n thumbOffsets.y = ((thumbRect.height - trackRect.height) / 2 + trackPadding.top) * -1;\n thumbOffsets.x += trackRect.width * utils_1.relativeValue(values[index], min, max) - thumbRect.width / 2;\n return thumbOffsets;\n\n case types_1.Direction.Left:\n thumbOffsets.x = (thumbMargins.right + trackPadding.right) * -1;\n thumbOffsets.y = ((thumbRect.height - trackRect.height) / 2 + trackPadding.top) * -1;\n thumbOffsets.x += trackRect.width - trackRect.width * utils_1.relativeValue(values[index], min, max) - thumbRect.width / 2;\n return thumbOffsets;\n\n case types_1.Direction.Up:\n thumbOffsets.x = ((thumbRect.width - trackRect.width) / 2 + thumbMargins.left + trackPadding.left) * -1;\n thumbOffsets.y = -trackPadding.left;\n thumbOffsets.y += trackRect.height - trackRect.height * utils_1.relativeValue(values[index], min, max) - thumbRect.height / 2;\n return thumbOffsets;\n\n case types_1.Direction.Down:\n thumbOffsets.x = ((thumbRect.width - trackRect.width) / 2 + thumbMargins.left + trackPadding.left) * -1;\n thumbOffsets.y = -trackPadding.left;\n thumbOffsets.y += trackRect.height * utils_1.relativeValue(values[index], min, max) - thumbRect.height / 2;\n return thumbOffsets;\n\n default:\n return utils_1.assertUnreachable(direction);\n }\n });\n };\n\n _this.getThumbs = function () {\n if (_this.trackRef && _this.trackRef.current) {\n return Array.from(_this.trackRef.current.children);\n }\n\n console.warn('No thumbs found in the track container. Did you forget to pass & spread the `props` param in renderTrack?');\n return [];\n };\n\n _this.getTargetIndex = function (e) {\n return _this.getThumbs().findIndex(function (child) {\n return child === e.target || child.contains(e.target);\n });\n };\n\n _this.addTouchEvents = function (e) {\n document.addEventListener('touchmove', _this.schdOnTouchMove, {\n passive: false\n });\n document.addEventListener('touchend', _this.schdOnEnd, {\n passive: false\n });\n document.addEventListener('touchcancel', _this.schdOnEnd, {\n passive: false\n });\n };\n\n _this.addMouseEvents = function (e) {\n document.addEventListener('mousemove', _this.schdOnMouseMove);\n document.addEventListener('mouseup', _this.schdOnEnd);\n };\n\n _this.onMouseDownTrack = function (e) {\n var _a; // in case there is a single thumb, we want to support\n // moving the thumb to a place where the track is clicked\n\n\n if (e.button !== 0 || _this.props.values.length > 1) return;\n (_a = _this.thumbRefs[0].current) === null || _a === void 0 ? void 0 : _a.focus();\n e.persist();\n e.preventDefault();\n\n _this.addMouseEvents(e.nativeEvent);\n\n _this.setState({\n draggedThumbIndex: 0\n }, function () {\n return _this.onMove(e.clientX, e.clientY);\n });\n };\n\n _this.onWindowResize = function () {\n utils_1.translateThumbs(_this.getThumbs(), _this.getOffsets(), _this.props.rtl);\n };\n\n _this.onTouchStartTrack = function (e) {\n // in case there is a single thumb, we want to support\n // moving the thumb to a place where the track is clicked\n if (_this.props.values.length > 1) return;\n e.persist();\n\n _this.addTouchEvents(e.nativeEvent);\n\n _this.setState({\n draggedThumbIndex: 0\n }, function () {\n return _this.onMove(e.touches[0].clientX, e.touches[0].clientY);\n });\n };\n\n _this.onMouseOrTouchStart = function (e) {\n if (_this.props.disabled) return;\n var isTouch = utils_1.isTouchEvent(e);\n if (!isTouch && e.button !== 0) return;\n\n var index = _this.getTargetIndex(e);\n\n if (index === -1) return;\n\n if (isTouch) {\n _this.addTouchEvents(e);\n } else {\n _this.addMouseEvents(e);\n }\n\n _this.setState({\n draggedThumbIndex: index,\n thumbZIndexes: _this.state.thumbZIndexes.map(function (t, i) {\n if (i === index) {\n return Math.max.apply(Math, _this.state.thumbZIndexes);\n }\n\n return t <= _this.state.thumbZIndexes[index] ? t : t - 1;\n })\n });\n };\n\n _this.onMouseMove = function (e) {\n e.preventDefault();\n\n _this.onMove(e.clientX, e.clientY);\n };\n\n _this.onTouchMove = function (e) {\n e.preventDefault();\n\n _this.onMove(e.touches[0].clientX, e.touches[0].clientY);\n };\n\n _this.onKeyDown = function (e) {\n var _a = _this.props,\n values = _a.values,\n onChange = _a.onChange,\n step = _a.step,\n rtl = _a.rtl;\n var isChanged = _this.state.isChanged;\n\n var index = _this.getTargetIndex(e.nativeEvent);\n\n var inverter = rtl ? -1 : 1;\n if (index === -1) return;\n\n if (INCREASE_KEYS.includes(e.key)) {\n e.preventDefault();\n\n _this.setState({\n draggedThumbIndex: index,\n isChanged: true\n });\n\n onChange(utils_1.replaceAt(values, index, _this.normalizeValue(values[index] + inverter * (e.key === 'PageUp' ? step * 10 : step), index)));\n } else if (DECREASE_KEYS.includes(e.key)) {\n e.preventDefault();\n\n _this.setState({\n draggedThumbIndex: index,\n isChanged: true\n });\n\n onChange(utils_1.replaceAt(values, index, _this.normalizeValue(values[index] - inverter * (e.key === 'PageDown' ? step * 10 : step), index)));\n } else if (e.key === 'Tab') {\n _this.setState({\n draggedThumbIndex: -1\n }, function () {\n // If key pressed when thumb was moving, fire onFinalChange\n if (isChanged) {\n _this.fireOnFinalChange();\n }\n });\n } else {\n if (isChanged) {\n _this.fireOnFinalChange();\n }\n }\n };\n\n _this.onKeyUp = function (e) {\n var isChanged = _this.state.isChanged;\n\n _this.setState({\n draggedThumbIndex: -1\n }, function () {\n if (isChanged) {\n _this.fireOnFinalChange();\n }\n });\n };\n\n _this.onMove = function (clientX, clientY) {\n var draggedThumbIndex = _this.state.draggedThumbIndex;\n var _a = _this.props,\n direction = _a.direction,\n min = _a.min,\n max = _a.max,\n onChange = _a.onChange,\n values = _a.values,\n step = _a.step,\n rtl = _a.rtl;\n if (draggedThumbIndex === -1) return null;\n var trackElement = _this.trackRef.current;\n var trackRect = trackElement.getBoundingClientRect();\n var trackLength = utils_1.isVertical(direction) ? trackRect.height : trackRect.width;\n var newValue = 0;\n\n switch (direction) {\n case types_1.Direction.Right:\n newValue = (clientX - trackRect.left) / trackLength * (max - min) + min;\n break;\n\n case types_1.Direction.Left:\n newValue = (trackLength - (clientX - trackRect.left)) / trackLength * (max - min) + min;\n break;\n\n case types_1.Direction.Down:\n newValue = (clientY - trackRect.top) / trackLength * (max - min) + min;\n break;\n\n case types_1.Direction.Up:\n newValue = (trackLength - (clientY - trackRect.top)) / trackLength * (max - min) + min;\n break;\n\n default:\n utils_1.assertUnreachable(direction);\n } // invert for RTL\n\n\n if (rtl) {\n newValue = max + min - newValue;\n }\n\n if (Math.abs(values[draggedThumbIndex] - newValue) >= step) {\n onChange(utils_1.replaceAt(values, draggedThumbIndex, _this.normalizeValue(newValue, draggedThumbIndex)));\n }\n };\n\n _this.normalizeValue = function (value, index) {\n var _a = _this.props,\n min = _a.min,\n max = _a.max,\n step = _a.step,\n allowOverlap = _a.allowOverlap,\n values = _a.values;\n return utils_1.normalizeValue(value, index, min, max, step, allowOverlap, values);\n };\n\n _this.onEnd = function (e) {\n e.preventDefault();\n document.removeEventListener('mousemove', _this.schdOnMouseMove);\n document.removeEventListener('touchmove', _this.schdOnTouchMove);\n document.removeEventListener('mouseup', _this.schdOnEnd);\n document.removeEventListener('touchup', _this.schdOnEnd);\n document.removeEventListener('touchcancel', _this.schdOnEnd);\n if (_this.state.draggedThumbIndex === -1) return;\n\n _this.setState({\n draggedThumbIndex: -1\n }, function () {\n _this.fireOnFinalChange();\n });\n };\n\n _this.fireOnFinalChange = function () {\n _this.setState({\n isChanged: false\n });\n\n var _a = _this.props,\n onFinalChange = _a.onFinalChange,\n values = _a.values;\n\n if (onFinalChange) {\n onFinalChange(values);\n }\n };\n\n _this.schdOnMouseMove = utils_1.schd(_this.onMouseMove);\n _this.schdOnTouchMove = utils_1.schd(_this.onTouchMove);\n _this.schdOnEnd = utils_1.schd(_this.onEnd);\n _this.schdOnWindowResize = utils_1.schd(_this.onWindowResize);\n _this.thumbRefs = props.values.map(function () {\n return React.createRef();\n });\n\n if (!utils_1.isStepDivisible(props.min, props.max, props.step)) {\n console.warn('The difference of `max` and `min` must be divisible by `step`');\n }\n\n return _this;\n }\n\n Range.prototype.componentDidMount = function () {\n var _this = this;\n\n var _a = this.props,\n values = _a.values,\n min = _a.min,\n step = _a.step;\n window.addEventListener('resize', this.schdOnWindowResize);\n document.addEventListener('touchstart', this.onMouseOrTouchStart, {\n passive: false\n });\n document.addEventListener('mousedown', this.onMouseOrTouchStart, {\n passive: false\n });\n !this.props.allowOverlap && utils_1.checkInitialOverlap(this.props.values);\n this.props.values.forEach(function (value) {\n return utils_1.checkBoundaries(value, _this.props.min, _this.props.max);\n });\n utils_1.translateThumbs(this.getThumbs(), this.getOffsets(), this.props.rtl);\n values.forEach(function (value) {\n if (!utils_1.isStepDivisible(min, value, step)) {\n console.warn('The `values` property is in conflict with the current `step`, `min` and `max` properties. Please provide values that are accessible using the min, max an step values');\n }\n });\n };\n\n Range.prototype.componentDidUpdate = function (prevProps) {\n utils_1.translateThumbs(this.getThumbs(), this.getOffsets(), this.props.rtl);\n };\n\n Range.prototype.componentWillUnmount = function () {\n var options = {\n passive: false\n };\n window.removeEventListener('resize', this.schdOnWindowResize);\n document.removeEventListener('mousedown', this.onMouseOrTouchStart, options);\n document.removeEventListener('touchstart', this.onMouseOrTouchStart);\n document.removeEventListener('touchend', this.schdOnEnd);\n };\n\n Range.prototype.render = function () {\n var _this = this;\n\n var _a = this.props,\n renderTrack = _a.renderTrack,\n renderThumb = _a.renderThumb,\n values = _a.values,\n min = _a.min,\n max = _a.max,\n allowOverlap = _a.allowOverlap,\n disabled = _a.disabled;\n var _b = this.state,\n draggedThumbIndex = _b.draggedThumbIndex,\n thumbZIndexes = _b.thumbZIndexes;\n return renderTrack({\n props: {\n style: {\n // creates stacking context that prevents z-index applied to thumbs\n // interfere with other elements\n transform: 'scale(1)',\n cursor: draggedThumbIndex > -1 ? 'grabbing' : values.length === 1 && !disabled ? 'pointer' : 'inherit'\n },\n onMouseDown: disabled ? utils_1.voidFn : this.onMouseDownTrack,\n onTouchStart: disabled ? utils_1.voidFn : this.onTouchStartTrack,\n ref: this.trackRef\n },\n isDragged: this.state.draggedThumbIndex > -1,\n disabled: disabled,\n children: values.map(function (value, index) {\n var isDragged = _this.state.draggedThumbIndex === index;\n return renderThumb({\n index: index,\n value: value,\n isDragged: isDragged,\n props: {\n style: {\n position: 'absolute',\n zIndex: thumbZIndexes[index],\n cursor: disabled ? 'inherit' : isDragged ? 'grabbing' : 'grab',\n userSelect: 'none',\n touchAction: 'none',\n WebkitUserSelect: 'none',\n MozUserSelect: 'none',\n msUserSelect: 'none'\n },\n key: index,\n tabIndex: disabled ? undefined : 0,\n 'aria-valuemax': allowOverlap ? max : values[index + 1] || max,\n 'aria-valuemin': allowOverlap ? min : values[index - 1] || min,\n 'aria-valuenow': value,\n draggable: false,\n ref: _this.thumbRefs[index],\n role: 'slider',\n onKeyDown: disabled ? utils_1.voidFn : _this.onKeyDown,\n onKeyUp: disabled ? utils_1.voidFn : _this.onKeyUp\n }\n });\n })\n });\n };\n\n Range.defaultProps = {\n step: 1,\n direction: types_1.Direction.Right,\n rtl: false,\n disabled: false,\n allowOverlap: false,\n min: 0,\n max: 100\n };\n return Range;\n}(React.Component);\n\nexports.default = Range;","'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n\nfunction _interopDefault(ex) {\n return ex && _typeof(ex) === 'object' && 'default' in ex ? ex['default'] : ex;\n}\n\nvar ResizeObserver = _interopDefault(require('resize-observer-polyfill'));\n\nvar react = require('react');\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction index(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n ref = _ref.ref,\n onResize = _ref.onResize; // `defaultRef` Has to be non-conditionally declared here whether or not it'll\n // be used as that's how hooks work.\n // @see https://reactjs.org/docs/hooks-rules.html#explanation\n\n\n var defaultRef = react.useRef(null);\n ref = ref || defaultRef;\n\n var _useState = react.useState({\n width: undefined,\n height: undefined\n }),\n size = _useState[0],\n setSize = _useState[1]; // Using a ref to track the previous width / height to avoid unnecessary renders\n\n\n var previous = react.useRef({\n width: undefined,\n height: undefined\n });\n react.useEffect(function () {\n if (_typeof(ref) !== \"object\" || ref === null || !(ref.current instanceof Element)) {\n return;\n }\n\n var element = ref.current;\n var resizeObserver = new ResizeObserver(function (entries) {\n if (!Array.isArray(entries)) {\n return;\n } // Since we only observe the one element, we don't need to loop over the\n // array\n\n\n if (!entries.length) {\n return;\n }\n\n var entry = entries[0]; // `Math.round` is in line with how CSS resolves sub-pixel values\n\n var newWidth = Math.round(entry.contentRect.width);\n var newHeight = Math.round(entry.contentRect.height);\n\n if (previous.current.width !== newWidth || previous.current.height !== newHeight) {\n var newSize = {\n width: newWidth,\n height: newHeight\n };\n\n if (onResize) {\n onResize(newSize);\n } else {\n previous.current.width = newWidth;\n previous.current.height = newHeight;\n setSize(newSize);\n }\n }\n });\n resizeObserver.observe(element);\n return function () {\n return resizeObserver.unobserve(element);\n };\n }, [ref, onResize]);\n return react.useMemo(function () {\n return _extends({\n ref: ref\n }, size);\n }, [ref, size ? size.width : null, size ? size.height : null]);\n}\n\nmodule.exports = index;","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\n\n/* eslint-disable require-jsdoc, valid-jsdoc */\nvar MapShim = function () {\n if (typeof Map !== 'undefined') {\n return Map;\n }\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\n\n\n function getIndex(arr, key) {\n var result = -1;\n arr.some(function (entry, index) {\n if (entry[0] === key) {\n result = index;\n return true;\n }\n\n return false;\n });\n return result;\n }\n\n return function () {\n function class_1() {\n this.__entries__ = [];\n }\n\n Object.defineProperty(class_1.prototype, \"size\", {\n /**\r\n * @returns {boolean}\r\n */\n get: function get() {\n return this.__entries__.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\n\n class_1.prototype.get = function (key) {\n var index = getIndex(this.__entries__, key);\n var entry = this.__entries__[index];\n return entry && entry[1];\n };\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.set = function (key, value) {\n var index = getIndex(this.__entries__, key);\n\n if (~index) {\n this.__entries__[index][1] = value;\n } else {\n this.__entries__.push([key, value]);\n }\n };\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.delete = function (key) {\n var entries = this.__entries__;\n var index = getIndex(entries, key);\n\n if (~index) {\n entries.splice(index, 1);\n }\n };\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.has = function (key) {\n return !!~getIndex(this.__entries__, key);\n };\n /**\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.clear = function () {\n this.__entries__.splice(0);\n };\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.forEach = function (callback, ctx) {\n if (ctx === void 0) {\n ctx = null;\n }\n\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\n var entry = _a[_i];\n callback.call(ctx, entry[1], entry[0]);\n }\n };\n\n return class_1;\n }();\n}();\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\n\n\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document; // Returns global object of a current environment.\n\nvar global$1 = function () {\n if (typeof global !== 'undefined' && global.Math === Math) {\n return global;\n }\n\n if (typeof self !== 'undefined' && self.Math === Math) {\n return self;\n }\n\n if (typeof window !== 'undefined' && window.Math === Math) {\n return window;\n } // eslint-disable-next-line no-new-func\n\n\n return Function('return this')();\n}();\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\n\n\nvar requestAnimationFrame$1 = function () {\n if (typeof requestAnimationFrame === 'function') {\n // It's required to use a bounded function because IE sometimes throws\n // an \"Invalid calling object\" error if rAF is invoked without the global\n // object on the left hand side.\n return requestAnimationFrame.bind(global$1);\n }\n\n return function (callback) {\n return setTimeout(function () {\n return callback(Date.now());\n }, 1000 / 60);\n };\n}(); // Defines minimum timeout before adding a trailing call.\n\n\nvar trailingTimeout = 2;\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\n\nfunction throttle(callback, delay) {\n var leadingCall = false,\n trailingCall = false,\n lastCallTime = 0;\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\n\n function resolvePending() {\n if (leadingCall) {\n leadingCall = false;\n callback();\n }\n\n if (trailingCall) {\n proxy();\n }\n }\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\n\n\n function timeoutCallback() {\n requestAnimationFrame$1(resolvePending);\n }\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\n\n\n function proxy() {\n var timeStamp = Date.now();\n\n if (leadingCall) {\n // Reject immediately following calls.\n if (timeStamp - lastCallTime < trailingTimeout) {\n return;\n } // Schedule new call to be in invoked when the pending one is resolved.\n // This is important for \"transitions\" which never actually start\n // immediately so there is a chance that we might miss one if change\n // happens amids the pending invocation.\n\n\n trailingCall = true;\n } else {\n leadingCall = true;\n trailingCall = false;\n setTimeout(timeoutCallback, delay);\n }\n\n lastCallTime = timeStamp;\n }\n\n return proxy;\n} // Minimum delay before invoking the update of observers.\n\n\nvar REFRESH_DELAY = 20; // A list of substrings of CSS properties used to find transition events that\n// might affect dimensions of observed elements.\n\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight']; // Check if MutationObserver is available.\n\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\n\nvar ResizeObserverController = function () {\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\n function ResizeObserverController() {\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\n this.connected_ = false;\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\n\n this.mutationEventsAdded_ = false;\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\n\n this.mutationsObserver_ = null;\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\n\n this.observers_ = [];\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\n }\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.addObserver = function (observer) {\n if (!~this.observers_.indexOf(observer)) {\n this.observers_.push(observer);\n } // Add listeners if they haven't been added yet.\n\n\n if (!this.connected_) {\n this.connect_();\n }\n };\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.removeObserver = function (observer) {\n var observers = this.observers_;\n var index = observers.indexOf(observer); // Remove observer if it's present in registry.\n\n if (~index) {\n observers.splice(index, 1);\n } // Remove listeners if controller has no connected observers.\n\n\n if (!observers.length && this.connected_) {\n this.disconnect_();\n }\n };\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.refresh = function () {\n var changesDetected = this.updateObservers_(); // Continue running updates if changes have been detected as there might\n // be future ones caused by CSS transitions.\n\n if (changesDetected) {\n this.refresh();\n }\n };\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\n\n\n ResizeObserverController.prototype.updateObservers_ = function () {\n // Collect observers that have active observations.\n var activeObservers = this.observers_.filter(function (observer) {\n return observer.gatherActive(), observer.hasActive();\n }); // Deliver notifications in a separate cycle in order to avoid any\n // collisions between observers, e.g. when multiple instances of\n // ResizeObserver are tracking the same element and the callback of one\n // of them changes content dimensions of the observed target. Sometimes\n // this may result in notifications being blocked for the rest of observers.\n\n activeObservers.forEach(function (observer) {\n return observer.broadcastActive();\n });\n return activeObservers.length > 0;\n };\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.connect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already added.\n if (!isBrowser || this.connected_) {\n return;\n } // Subscription to the \"Transitionend\" event is used as a workaround for\n // delayed transitions. This way it's possible to capture at least the\n // final state of an element.\n\n\n document.addEventListener('transitionend', this.onTransitionEnd_);\n window.addEventListener('resize', this.refresh);\n\n if (mutationObserverSupported) {\n this.mutationsObserver_ = new MutationObserver(this.refresh);\n this.mutationsObserver_.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n } else {\n document.addEventListener('DOMSubtreeModified', this.refresh);\n this.mutationEventsAdded_ = true;\n }\n\n this.connected_ = true;\n };\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.disconnect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already removed.\n if (!isBrowser || !this.connected_) {\n return;\n }\n\n document.removeEventListener('transitionend', this.onTransitionEnd_);\n window.removeEventListener('resize', this.refresh);\n\n if (this.mutationsObserver_) {\n this.mutationsObserver_.disconnect();\n }\n\n if (this.mutationEventsAdded_) {\n document.removeEventListener('DOMSubtreeModified', this.refresh);\n }\n\n this.mutationsObserver_ = null;\n this.mutationEventsAdded_ = false;\n this.connected_ = false;\n };\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\n var _b = _a.propertyName,\n propertyName = _b === void 0 ? '' : _b; // Detect whether transition may affect dimensions of an element.\n\n var isReflowProperty = transitionKeys.some(function (key) {\n return !!~propertyName.indexOf(key);\n });\n\n if (isReflowProperty) {\n this.refresh();\n }\n };\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\n\n\n ResizeObserverController.getInstance = function () {\n if (!this.instance_) {\n this.instance_ = new ResizeObserverController();\n }\n\n return this.instance_;\n };\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\n\n\n ResizeObserverController.instance_ = null;\n return ResizeObserverController;\n}();\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\n\n\nvar defineConfigurable = function defineConfigurable(target, props) {\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\n var key = _a[_i];\n Object.defineProperty(target, key, {\n value: props[key],\n enumerable: false,\n writable: false,\n configurable: true\n });\n }\n\n return target;\n};\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\n\n\nvar getWindowOf = function getWindowOf(target) {\n // Assume that the element is an instance of Node, which means that it\n // has the \"ownerDocument\" property from which we can retrieve a\n // corresponding global object.\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView; // Return the local global object if it's not possible extract one from\n // provided element.\n\n return ownerGlobal || global$1;\n}; // Placeholder of an empty content rectangle.\n\n\nvar emptyRect = createRectInit(0, 0, 0, 0);\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\n\nfunction toFloat(value) {\n return parseFloat(value) || 0;\n}\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\n\n\nfunction getBordersSize(styles) {\n var positions = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n positions[_i - 1] = arguments[_i];\n }\n\n return positions.reduce(function (size, position) {\n var value = styles['border-' + position + '-width'];\n return size + toFloat(value);\n }, 0);\n}\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\n\n\nfunction getPaddings(styles) {\n var positions = ['top', 'right', 'bottom', 'left'];\n var paddings = {};\n\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\n var position = positions_1[_i];\n var value = styles['padding-' + position];\n paddings[position] = toFloat(value);\n }\n\n return paddings;\n}\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\n\n\nfunction getSVGContentRect(target) {\n var bbox = target.getBBox();\n return createRectInit(0, 0, bbox.width, bbox.height);\n}\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\n\n\nfunction getHTMLElementContentRect(target) {\n // Client width & height properties can't be\n // used exclusively as they provide rounded values.\n var clientWidth = target.clientWidth,\n clientHeight = target.clientHeight; // By this condition we can catch all non-replaced inline, hidden and\n // detached elements. Though elements with width & height properties less\n // than 0.5 will be discarded as well.\n //\n // Without it we would need to implement separate methods for each of\n // those cases and it's not possible to perform a precise and performance\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\n // gives wrong results for elements with width & height less than 0.5.\n\n if (!clientWidth && !clientHeight) {\n return emptyRect;\n }\n\n var styles = getWindowOf(target).getComputedStyle(target);\n var paddings = getPaddings(styles);\n var horizPad = paddings.left + paddings.right;\n var vertPad = paddings.top + paddings.bottom; // Computed styles of width & height are being used because they are the\n // only dimensions available to JS that contain non-rounded values. It could\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\n // affected by CSS transformations let alone paddings, borders and scroll bars.\n\n var width = toFloat(styles.width),\n height = toFloat(styles.height); // Width & height include paddings and borders when the 'border-box' box\n // model is applied (except for IE).\n\n if (styles.boxSizing === 'border-box') {\n // Following conditions are required to handle Internet Explorer which\n // doesn't include paddings and borders to computed CSS dimensions.\n //\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\n // properties then it's either IE, and thus we don't need to subtract\n // anything, or an element merely doesn't have paddings/borders styles.\n if (Math.round(width + horizPad) !== clientWidth) {\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\n }\n\n if (Math.round(height + vertPad) !== clientHeight) {\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n }\n } // Following steps can't be applied to the document's root element as its\n // client[Width/Height] properties represent viewport area of the window.\n // Besides, it's as well not necessary as the <html> itself neither has\n // rendered scroll bars nor it can be clipped.\n\n\n if (!isDocumentElement(target)) {\n // In some browsers (only in Firefox, actually) CSS width & height\n // include scroll bars size which can be removed at this step as scroll\n // bars are the only difference between rounded dimensions + paddings\n // and \"client\" properties, though that is not always true in Chrome.\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n var horizScrollbar = Math.round(height + vertPad) - clientHeight; // Chrome has a rather weird rounding of \"client\" properties.\n // E.g. for an element with content width of 314.2px it sometimes gives\n // the client width of 315px and for the width of 314.7px it may give\n // 314px. And it doesn't happen all the time. So just ignore this delta\n // as a non-relevant.\n\n if (Math.abs(vertScrollbar) !== 1) {\n width -= vertScrollbar;\n }\n\n if (Math.abs(horizScrollbar) !== 1) {\n height -= horizScrollbar;\n }\n }\n\n return createRectInit(paddings.left, paddings.top, width, height);\n}\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\n\n\nvar isSVGGraphicsElement = function () {\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\n // interface.\n if (typeof SVGGraphicsElement !== 'undefined') {\n return function (target) {\n return target instanceof getWindowOf(target).SVGGraphicsElement;\n };\n } // If it's so, then check that element is at least an instance of the\n // SVGElement and that it has the \"getBBox\" method.\n // eslint-disable-next-line no-extra-parens\n\n\n return function (target) {\n return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function';\n };\n}();\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\n\n\nfunction isDocumentElement(target) {\n return target === getWindowOf(target).document.documentElement;\n}\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\n\n\nfunction getContentRect(target) {\n if (!isBrowser) {\n return emptyRect;\n }\n\n if (isSVGGraphicsElement(target)) {\n return getSVGContentRect(target);\n }\n\n return getHTMLElementContentRect(target);\n}\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\n\n\nfunction createReadOnlyRect(_a) {\n var x = _a.x,\n y = _a.y,\n width = _a.width,\n height = _a.height; // If DOMRectReadOnly is available use it as a prototype for the rectangle.\n\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\n var rect = Object.create(Constr.prototype); // Rectangle's properties are not writable and non-enumerable.\n\n defineConfigurable(rect, {\n x: x,\n y: y,\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: height + y,\n left: x\n });\n return rect;\n}\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\n\n\nfunction createRectInit(x, y, width, height) {\n return {\n x: x,\n y: y,\n width: width,\n height: height\n };\n}\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\n\n\nvar ResizeObservation = function () {\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\n function ResizeObservation(target) {\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\n this.broadcastWidth = 0;\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\n\n this.broadcastHeight = 0;\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\n\n this.contentRect_ = createRectInit(0, 0, 0, 0);\n this.target = target;\n }\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\n\n\n ResizeObservation.prototype.isActive = function () {\n var rect = getContentRect(this.target);\n this.contentRect_ = rect;\n return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\n };\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\n\n\n ResizeObservation.prototype.broadcastRect = function () {\n var rect = this.contentRect_;\n this.broadcastWidth = rect.width;\n this.broadcastHeight = rect.height;\n return rect;\n };\n\n return ResizeObservation;\n}();\n\nvar ResizeObserverEntry = function () {\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\n function ResizeObserverEntry(target, rectInit) {\n var contentRect = createReadOnlyRect(rectInit); // According to the specification following properties are not writable\n // and are also not enumerable in the native implementation.\n //\n // Property accessors are not being used as they'd require to define a\n // private WeakMap storage which may cause memory leaks in browsers that\n // don't support this type of collections.\n\n defineConfigurable(this, {\n target: target,\n contentRect: contentRect\n });\n }\n\n return ResizeObserverEntry;\n}();\n\nvar ResizeObserverSPI = function () {\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\n function ResizeObserverSPI(callback, controller, callbackCtx) {\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\n this.activeObservations_ = [];\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\n\n this.observations_ = new MapShim();\n\n if (typeof callback !== 'function') {\n throw new TypeError('The callback provided as parameter 1 is not a function.');\n }\n\n this.callback_ = callback;\n this.controller_ = controller;\n this.callbackCtx_ = callbackCtx;\n }\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.observe = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n } // Do nothing if current environment doesn't have the Element interface.\n\n\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var observations = this.observations_; // Do nothing if element is already being observed.\n\n if (observations.has(target)) {\n return;\n }\n\n observations.set(target, new ResizeObservation(target));\n this.controller_.addObserver(this); // Force the update of observations.\n\n this.controller_.refresh();\n };\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.unobserve = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n } // Do nothing if current environment doesn't have the Element interface.\n\n\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var observations = this.observations_; // Do nothing if element is not being observed.\n\n if (!observations.has(target)) {\n return;\n }\n\n observations.delete(target);\n\n if (!observations.size) {\n this.controller_.removeObserver(this);\n }\n };\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.disconnect = function () {\n this.clearActive();\n this.observations_.clear();\n this.controller_.removeObserver(this);\n };\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.gatherActive = function () {\n var _this = this;\n\n this.clearActive();\n this.observations_.forEach(function (observation) {\n if (observation.isActive()) {\n _this.activeObservations_.push(observation);\n }\n });\n };\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.broadcastActive = function () {\n // Do nothing if observer doesn't have active observations.\n if (!this.hasActive()) {\n return;\n }\n\n var ctx = this.callbackCtx_; // Create ResizeObserverEntry instance for every active observation.\n\n var entries = this.activeObservations_.map(function (observation) {\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\n });\n this.callback_.call(ctx, entries, ctx);\n this.clearActive();\n };\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.clearActive = function () {\n this.activeObservations_.splice(0);\n };\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\n\n\n ResizeObserverSPI.prototype.hasActive = function () {\n return this.activeObservations_.length > 0;\n };\n\n return ResizeObserverSPI;\n}(); // Registry of internal observers. If WeakMap is not available use current shim\n// for the Map collection as it has all required methods and because WeakMap\n// can't be fully polyfilled anyway.\n\n\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\n\nvar ResizeObserver = function () {\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\n function ResizeObserver(callback) {\n if (!(this instanceof ResizeObserver)) {\n throw new TypeError('Cannot call a class as a function.');\n }\n\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n var controller = ResizeObserverController.getInstance();\n var observer = new ResizeObserverSPI(callback, controller, this);\n observers.set(this, observer);\n }\n\n return ResizeObserver;\n}(); // Expose public methods of ResizeObserver.\n\n\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\n ResizeObserver.prototype[method] = function () {\n var _a;\n\n return (_a = observers.get(this))[method].apply(_a, arguments);\n };\n});\n\nvar index = function () {\n // Export existing implementation if available.\n if (typeof global$1.ResizeObserver !== 'undefined') {\n return global$1.ResizeObserver;\n }\n\n return ResizeObserver;\n}();\n\nexport default index;","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nexport { _arrayLikeToArray as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nexport { _unsupportedIterableToArray as default };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nexport { _slicedToArray as default };","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nexport { _arrayWithHoles as default };","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nexport { _iterableToArrayLimit as default };","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableRest as default };","import defineProperty from \"./defineProperty.js\";\nfunction _objectSpread(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? Object(arguments[r]) : {},\n o = Object.keys(t);\n \"function\" == typeof Object.getOwnPropertySymbols && o.push.apply(o, Object.getOwnPropertySymbols(t).filter(function (e) {\n return Object.getOwnPropertyDescriptor(t, e).enumerable;\n })), o.forEach(function (r) {\n defineProperty(e, r, t[r]);\n });\n }\n return e;\n}\nexport { _objectSpread as default };","function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nexport { _classCallCheck as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nexport { _createClass as default };","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return assertThisInitialized(t);\n}\nexport { _possibleConstructorReturn as default };","function _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nexport { _getPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && setPrototypeOf(t, e);\n}\nexport { _inherits as default };","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nfunction _toConsumableArray(r) {\n return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();\n}\nexport { _toConsumableArray as default };","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return arrayLikeToArray(r);\n}\nexport { _arrayWithoutHoles as default };","function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nexport { _iterableToArray as default };","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nexport { _nonIterableSpread as default };","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';\nimport _objectSpread from '@babel/runtime/helpers/esm/objectSpread';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';\nimport _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport { createElement, Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { findDOMNode } from 'react-dom';\nimport invariant from 'invariant';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\n\nvar Manager = function () {\n function Manager() {\n _classCallCheck(this, Manager);\n\n _defineProperty(this, \"refs\", {});\n }\n\n _createClass(Manager, [{\n key: \"add\",\n value: function add(collection, ref) {\n if (!this.refs[collection]) {\n this.refs[collection] = [];\n }\n\n this.refs[collection].push(ref);\n }\n }, {\n key: \"remove\",\n value: function remove(collection, ref) {\n var index = this.getIndex(collection, ref);\n\n if (index !== -1) {\n this.refs[collection].splice(index, 1);\n }\n }\n }, {\n key: \"isActive\",\n value: function isActive() {\n return this.active;\n }\n }, {\n key: \"getActive\",\n value: function getActive() {\n var _this = this;\n\n return this.refs[this.active.collection].find(function (_ref) {\n var node = _ref.node;\n return node.sortableInfo.index == _this.active.index;\n });\n }\n }, {\n key: \"getIndex\",\n value: function getIndex(collection, ref) {\n return this.refs[collection].indexOf(ref);\n }\n }, {\n key: \"getOrderedRefs\",\n value: function getOrderedRefs() {\n var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.active.collection;\n return this.refs[collection].sort(sortByIndex);\n }\n }]);\n\n return Manager;\n}();\n\nfunction sortByIndex(_ref2, _ref3) {\n var index1 = _ref2.node.sortableInfo.index;\n var index2 = _ref3.node.sortableInfo.index;\n return index1 - index2;\n}\n\nfunction arrayMove(array, from, to) {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof console !== 'undefined') {\n console.warn(\"Deprecation warning: arrayMove will no longer be exported by 'react-sortable-hoc' in the next major release. Please install the `array-move` package locally instead. https://www.npmjs.com/package/array-move\");\n }\n }\n\n array = array.slice();\n array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);\n return array;\n}\n\nfunction omit(obj, keysToOmit) {\n return Object.keys(obj).reduce(function (acc, key) {\n if (keysToOmit.indexOf(key) === -1) {\n acc[key] = obj[key];\n }\n\n return acc;\n }, {});\n}\n\nvar events = {\n end: ['touchend', 'touchcancel', 'mouseup'],\n move: ['touchmove', 'mousemove'],\n start: ['touchstart', 'mousedown']\n};\n\nvar vendorPrefix = function () {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n return '';\n }\n\n var styles = window.getComputedStyle(document.documentElement, '') || ['-moz-hidden-iframe'];\n var pre = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || styles.OLink === '' && ['', 'o'])[1];\n\n switch (pre) {\n case 'ms':\n return 'ms';\n\n default:\n return pre && pre.length ? pre[0].toUpperCase() + pre.substr(1) : '';\n }\n}();\n\nfunction setInlineStyles(node, styles) {\n Object.keys(styles).forEach(function (key) {\n node.style[key] = styles[key];\n });\n}\n\nfunction setTranslate3d(node, translate) {\n node.style[\"\".concat(vendorPrefix, \"Transform\")] = translate == null ? '' : \"translate3d(\".concat(translate.x, \"px,\").concat(translate.y, \"px,0)\");\n}\n\nfunction setTransitionDuration(node, duration) {\n node.style[\"\".concat(vendorPrefix, \"TransitionDuration\")] = duration == null ? '' : \"\".concat(duration, \"ms\");\n}\n\nfunction closest(el, fn) {\n while (el) {\n if (fn(el)) {\n return el;\n }\n\n el = el.parentNode;\n }\n\n return null;\n}\n\nfunction limit(min, max, value) {\n return Math.max(min, Math.min(value, max));\n}\n\nfunction getPixelValue(stringValue) {\n if (stringValue.substr(-2) === 'px') {\n return parseFloat(stringValue);\n }\n\n return 0;\n}\n\nfunction getElementMargin(element) {\n var style = window.getComputedStyle(element);\n return {\n bottom: getPixelValue(style.marginBottom),\n left: getPixelValue(style.marginLeft),\n right: getPixelValue(style.marginRight),\n top: getPixelValue(style.marginTop)\n };\n}\n\nfunction provideDisplayName(prefix, Component$$1) {\n var componentName = Component$$1.displayName || Component$$1.name;\n return componentName ? \"\".concat(prefix, \"(\").concat(componentName, \")\") : prefix;\n}\n\nfunction getScrollAdjustedBoundingClientRect(node, scrollDelta) {\n var boundingClientRect = node.getBoundingClientRect();\n return {\n top: boundingClientRect.top + scrollDelta.top,\n left: boundingClientRect.left + scrollDelta.left\n };\n}\n\nfunction getPosition(event) {\n if (event.touches && event.touches.length) {\n return {\n x: event.touches[0].pageX,\n y: event.touches[0].pageY\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n return {\n x: event.changedTouches[0].pageX,\n y: event.changedTouches[0].pageY\n };\n } else {\n return {\n x: event.pageX,\n y: event.pageY\n };\n }\n}\n\nfunction isTouchEvent(event) {\n return event.touches && event.touches.length || event.changedTouches && event.changedTouches.length;\n}\n\nfunction getEdgeOffset(node, parent) {\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n left: 0,\n top: 0\n };\n\n if (!node) {\n return undefined;\n }\n\n var nodeOffset = {\n left: offset.left + node.offsetLeft,\n top: offset.top + node.offsetTop\n };\n\n if (node.parentNode === parent) {\n return nodeOffset;\n }\n\n return getEdgeOffset(node.parentNode, parent, nodeOffset);\n}\n\nfunction getTargetIndex(newIndex, prevIndex, oldIndex) {\n if (newIndex < oldIndex && newIndex > prevIndex) {\n return newIndex - 1;\n } else if (newIndex > oldIndex && newIndex < prevIndex) {\n return newIndex + 1;\n } else {\n return newIndex;\n }\n}\n\nfunction getLockPixelOffset(_ref) {\n var lockOffset = _ref.lockOffset,\n width = _ref.width,\n height = _ref.height;\n var offsetX = lockOffset;\n var offsetY = lockOffset;\n var unit = 'px';\n\n if (typeof lockOffset === 'string') {\n var match = /^[+-]?\\d*(?:\\.\\d*)?(px|%)$/.exec(lockOffset);\n invariant(match !== null, 'lockOffset value should be a number or a string of a ' + 'number followed by \"px\" or \"%\". Given %s', lockOffset);\n offsetX = parseFloat(lockOffset);\n offsetY = parseFloat(lockOffset);\n unit = match[1];\n }\n\n invariant(isFinite(offsetX) && isFinite(offsetY), 'lockOffset value should be a finite. Given %s', lockOffset);\n\n if (unit === '%') {\n offsetX = offsetX * width / 100;\n offsetY = offsetY * height / 100;\n }\n\n return {\n x: offsetX,\n y: offsetY\n };\n}\n\nfunction getLockPixelOffsets(_ref2) {\n var height = _ref2.height,\n width = _ref2.width,\n lockOffset = _ref2.lockOffset;\n var offsets = Array.isArray(lockOffset) ? lockOffset : [lockOffset, lockOffset];\n invariant(offsets.length === 2, 'lockOffset prop of SortableContainer should be a single ' + 'value or an array of exactly two values. Given %s', lockOffset);\n\n var _offsets = _slicedToArray(offsets, 2),\n minLockOffset = _offsets[0],\n maxLockOffset = _offsets[1];\n\n return [getLockPixelOffset({\n height: height,\n lockOffset: minLockOffset,\n width: width\n }), getLockPixelOffset({\n height: height,\n lockOffset: maxLockOffset,\n width: width\n })];\n}\n\nfunction isScrollable(el) {\n var computedStyle = window.getComputedStyle(el);\n var overflowRegex = /(auto|scroll)/;\n var properties = ['overflow', 'overflowX', 'overflowY'];\n return properties.find(function (property) {\n return overflowRegex.test(computedStyle[property]);\n });\n}\n\nfunction getScrollingParent(el) {\n if (!(el instanceof HTMLElement)) {\n return null;\n } else if (isScrollable(el)) {\n return el;\n } else {\n return getScrollingParent(el.parentNode);\n }\n}\n\nfunction getContainerGridGap(element) {\n var style = window.getComputedStyle(element);\n\n if (style.display === 'grid') {\n return {\n x: getPixelValue(style.gridColumnGap),\n y: getPixelValue(style.gridRowGap)\n };\n }\n\n return {\n x: 0,\n y: 0\n };\n}\n\nvar KEYCODE = {\n TAB: 9,\n ESC: 27,\n SPACE: 32,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n};\nvar NodeType = {\n Anchor: 'A',\n Button: 'BUTTON',\n Canvas: 'CANVAS',\n Input: 'INPUT',\n Option: 'OPTION',\n Textarea: 'TEXTAREA',\n Select: 'SELECT'\n};\n\nfunction cloneNode(node) {\n var selector = 'input, textarea, select, canvas, [contenteditable]';\n var fields = node.querySelectorAll(selector);\n var clonedNode = node.cloneNode(true);\n\n var clonedFields = _toConsumableArray(clonedNode.querySelectorAll(selector));\n\n clonedFields.forEach(function (field, i) {\n if (field.type !== 'file') {\n field.value = fields[i].value;\n }\n\n if (field.type === 'radio' && field.name) {\n field.name = \"__sortableClone__\".concat(field.name);\n }\n\n if (field.tagName === NodeType.Canvas && fields[i].width > 0 && fields[i].height > 0) {\n var destCtx = field.getContext('2d');\n destCtx.drawImage(fields[i], 0, 0);\n }\n });\n return clonedNode;\n}\n\nfunction sortableHandle(WrappedComponent) {\n var _class, _temp;\n\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n withRef: false\n };\n return _temp = _class = function (_React$Component) {\n _inherits(WithSortableHandle, _React$Component);\n\n function WithSortableHandle() {\n _classCallCheck(this, WithSortableHandle);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(WithSortableHandle).apply(this, arguments));\n }\n\n _createClass(WithSortableHandle, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var node = findDOMNode(this);\n node.sortableHandle = true;\n }\n }, {\n key: \"getWrappedInstance\",\n value: function getWrappedInstance() {\n invariant(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call');\n return this.refs.wrappedInstance;\n }\n }, {\n key: \"render\",\n value: function render() {\n var ref = config.withRef ? 'wrappedInstance' : null;\n return /*#__PURE__*/createElement(WrappedComponent, _extends({\n ref: ref\n }, this.props));\n }\n }]);\n\n return WithSortableHandle;\n }(Component), _defineProperty(_class, \"displayName\", provideDisplayName('sortableHandle', WrappedComponent)), _temp;\n}\n\nfunction isSortableHandle(node) {\n return node.sortableHandle != null;\n}\n\nvar AutoScroller = function () {\n function AutoScroller(container, onScrollCallback) {\n _classCallCheck(this, AutoScroller);\n\n this.container = container;\n this.onScrollCallback = onScrollCallback;\n }\n\n _createClass(AutoScroller, [{\n key: \"clear\",\n value: function clear() {\n if (this.interval == null) {\n return;\n }\n\n clearInterval(this.interval);\n this.interval = null;\n }\n }, {\n key: \"update\",\n value: function update(_ref) {\n var _this = this;\n\n var translate = _ref.translate,\n minTranslate = _ref.minTranslate,\n maxTranslate = _ref.maxTranslate,\n width = _ref.width,\n height = _ref.height;\n var direction = {\n x: 0,\n y: 0\n };\n var speed = {\n x: 1,\n y: 1\n };\n var acceleration = {\n x: 10,\n y: 10\n };\n var _this$container = this.container,\n scrollTop = _this$container.scrollTop,\n scrollLeft = _this$container.scrollLeft,\n scrollHeight = _this$container.scrollHeight,\n scrollWidth = _this$container.scrollWidth,\n clientHeight = _this$container.clientHeight,\n clientWidth = _this$container.clientWidth;\n var isTop = scrollTop === 0;\n var isBottom = scrollHeight - scrollTop - clientHeight === 0;\n var isLeft = scrollLeft === 0;\n var isRight = scrollWidth - scrollLeft - clientWidth === 0;\n\n if (translate.y >= maxTranslate.y - height / 2 && !isBottom) {\n direction.y = 1;\n speed.y = acceleration.y * Math.abs((maxTranslate.y - height / 2 - translate.y) / height);\n } else if (translate.x >= maxTranslate.x - width / 2 && !isRight) {\n direction.x = 1;\n speed.x = acceleration.x * Math.abs((maxTranslate.x - width / 2 - translate.x) / width);\n } else if (translate.y <= minTranslate.y + height / 2 && !isTop) {\n direction.y = -1;\n speed.y = acceleration.y * Math.abs((translate.y - height / 2 - minTranslate.y) / height);\n } else if (translate.x <= minTranslate.x + width / 2 && !isLeft) {\n direction.x = -1;\n speed.x = acceleration.x * Math.abs((translate.x - width / 2 - minTranslate.x) / width);\n }\n\n if (this.interval) {\n this.clear();\n this.isAutoScrolling = false;\n }\n\n if (direction.x !== 0 || direction.y !== 0) {\n this.interval = setInterval(function () {\n _this.isAutoScrolling = true;\n var offset = {\n left: speed.x * direction.x,\n top: speed.y * direction.y\n };\n _this.container.scrollTop += offset.top;\n _this.container.scrollLeft += offset.left;\n\n _this.onScrollCallback(offset);\n }, 5);\n }\n }\n }]);\n\n return AutoScroller;\n}();\n\nfunction defaultGetHelperDimensions(_ref) {\n var node = _ref.node;\n return {\n height: node.offsetHeight,\n width: node.offsetWidth\n };\n}\n\nfunction defaultShouldCancelStart(event) {\n var interactiveElements = [NodeType.Input, NodeType.Textarea, NodeType.Select, NodeType.Option, NodeType.Button];\n\n if (interactiveElements.indexOf(event.target.tagName) !== -1) {\n return true;\n }\n\n if (closest(event.target, function (el) {\n return el.contentEditable === 'true';\n })) {\n return true;\n }\n\n return false;\n}\n\nvar propTypes = {\n axis: PropTypes.oneOf(['x', 'y', 'xy']),\n contentWindow: PropTypes.any,\n disableAutoscroll: PropTypes.bool,\n distance: PropTypes.number,\n getContainer: PropTypes.func,\n getHelperDimensions: PropTypes.func,\n helperClass: PropTypes.string,\n helperContainer: PropTypes.oneOfType([PropTypes.func, typeof HTMLElement === 'undefined' ? PropTypes.any : PropTypes.instanceOf(HTMLElement)]),\n hideSortableGhost: PropTypes.bool,\n keyboardSortingTransitionDuration: PropTypes.number,\n lockAxis: PropTypes.string,\n lockOffset: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]))]),\n lockToContainerEdges: PropTypes.bool,\n onSortEnd: PropTypes.func,\n onSortMove: PropTypes.func,\n onSortOver: PropTypes.func,\n onSortStart: PropTypes.func,\n pressDelay: PropTypes.number,\n pressThreshold: PropTypes.number,\n keyCodes: PropTypes.shape({\n lift: PropTypes.arrayOf(PropTypes.number),\n drop: PropTypes.arrayOf(PropTypes.number),\n cancel: PropTypes.arrayOf(PropTypes.number),\n up: PropTypes.arrayOf(PropTypes.number),\n down: PropTypes.arrayOf(PropTypes.number)\n }),\n shouldCancelStart: PropTypes.func,\n transitionDuration: PropTypes.number,\n updateBeforeSortStart: PropTypes.func,\n useDragHandle: PropTypes.bool,\n useWindowAsScrollContainer: PropTypes.bool\n};\nvar defaultKeyCodes = {\n lift: [KEYCODE.SPACE],\n drop: [KEYCODE.SPACE],\n cancel: [KEYCODE.ESC],\n up: [KEYCODE.UP, KEYCODE.LEFT],\n down: [KEYCODE.DOWN, KEYCODE.RIGHT]\n};\nvar defaultProps = {\n axis: 'y',\n disableAutoscroll: false,\n distance: 0,\n getHelperDimensions: defaultGetHelperDimensions,\n hideSortableGhost: true,\n lockOffset: '50%',\n lockToContainerEdges: false,\n pressDelay: 0,\n pressThreshold: 5,\n keyCodes: defaultKeyCodes,\n shouldCancelStart: defaultShouldCancelStart,\n transitionDuration: 300,\n useWindowAsScrollContainer: false\n};\nvar omittedProps = Object.keys(propTypes);\n\nfunction validateProps(props) {\n invariant(!(props.distance && props.pressDelay), 'Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.');\n}\n\nfunction _finallyRethrows(body, finalizer) {\n try {\n var result = body();\n } catch (e) {\n return finalizer(true, e);\n }\n\n if (result && result.then) {\n return result.then(finalizer.bind(null, false), finalizer.bind(null, true));\n }\n\n return finalizer(false, value);\n}\n\nfunction sortableContainer(WrappedComponent) {\n var _class, _temp;\n\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n withRef: false\n };\n return _temp = _class = function (_React$Component) {\n _inherits(WithSortableContainer, _React$Component);\n\n function WithSortableContainer(props) {\n var _this;\n\n _classCallCheck(this, WithSortableContainer);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(WithSortableContainer).call(this, props));\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"state\", {});\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleStart\", function (event) {\n var _this$props = _this.props,\n distance = _this$props.distance,\n shouldCancelStart = _this$props.shouldCancelStart;\n\n if (event.button === 2 || shouldCancelStart(event)) {\n return;\n }\n\n _this.touched = true;\n _this.position = getPosition(event);\n var node = closest(event.target, function (el) {\n return el.sortableInfo != null;\n });\n\n if (node && node.sortableInfo && _this.nodeIsChild(node) && !_this.state.sorting) {\n var useDragHandle = _this.props.useDragHandle;\n var _node$sortableInfo = node.sortableInfo,\n index = _node$sortableInfo.index,\n collection = _node$sortableInfo.collection,\n disabled = _node$sortableInfo.disabled;\n\n if (disabled) {\n return;\n }\n\n if (useDragHandle && !closest(event.target, isSortableHandle)) {\n return;\n }\n\n _this.manager.active = {\n collection: collection,\n index: index\n };\n\n if (!isTouchEvent(event) && event.target.tagName === NodeType.Anchor) {\n event.preventDefault();\n }\n\n if (!distance) {\n if (_this.props.pressDelay === 0) {\n _this.handlePress(event);\n } else {\n _this.pressTimer = setTimeout(function () {\n return _this.handlePress(event);\n }, _this.props.pressDelay);\n }\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"nodeIsChild\", function (node) {\n return node.sortableInfo.manager === _this.manager;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleMove\", function (event) {\n var _this$props2 = _this.props,\n distance = _this$props2.distance,\n pressThreshold = _this$props2.pressThreshold;\n\n if (!_this.state.sorting && _this.touched && !_this._awaitingUpdateBeforeSortStart) {\n var position = getPosition(event);\n var delta = {\n x: _this.position.x - position.x,\n y: _this.position.y - position.y\n };\n var combinedDelta = Math.abs(delta.x) + Math.abs(delta.y);\n _this.delta = delta;\n\n if (!distance && (!pressThreshold || combinedDelta >= pressThreshold)) {\n clearTimeout(_this.cancelTimer);\n _this.cancelTimer = setTimeout(_this.cancel, 0);\n } else if (distance && combinedDelta >= distance && _this.manager.isActive()) {\n _this.handlePress(event);\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleEnd\", function () {\n _this.touched = false;\n\n _this.cancel();\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"cancel\", function () {\n var distance = _this.props.distance;\n var sorting = _this.state.sorting;\n\n if (!sorting) {\n if (!distance) {\n clearTimeout(_this.pressTimer);\n }\n\n _this.manager.active = null;\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handlePress\", function (event) {\n try {\n var active = _this.manager.getActive();\n\n var _temp6 = function () {\n if (active) {\n var _temp7 = function _temp7() {\n var index = _node.sortableInfo.index;\n var margin = getElementMargin(_node);\n var gridGap = getContainerGridGap(_this.container);\n\n var containerBoundingRect = _this.scrollContainer.getBoundingClientRect();\n\n var dimensions = _getHelperDimensions({\n index: index,\n node: _node,\n collection: _collection\n });\n\n _this.node = _node;\n _this.margin = margin;\n _this.gridGap = gridGap;\n _this.width = dimensions.width;\n _this.height = dimensions.height;\n _this.marginOffset = {\n x: _this.margin.left + _this.margin.right + _this.gridGap.x,\n y: Math.max(_this.margin.top, _this.margin.bottom, _this.gridGap.y)\n };\n _this.boundingClientRect = _node.getBoundingClientRect();\n _this.containerBoundingRect = containerBoundingRect;\n _this.index = index;\n _this.newIndex = index;\n _this.axis = {\n x: _axis.indexOf('x') >= 0,\n y: _axis.indexOf('y') >= 0\n };\n _this.offsetEdge = getEdgeOffset(_node, _this.container);\n\n if (_isKeySorting) {\n _this.initialOffset = getPosition(_objectSpread({}, event, {\n pageX: _this.boundingClientRect.left,\n pageY: _this.boundingClientRect.top\n }));\n } else {\n _this.initialOffset = getPosition(event);\n }\n\n _this.initialScroll = {\n left: _this.scrollContainer.scrollLeft,\n top: _this.scrollContainer.scrollTop\n };\n _this.initialWindowScroll = {\n left: window.pageXOffset,\n top: window.pageYOffset\n };\n _this.helper = _this.helperContainer.appendChild(cloneNode(_node));\n setInlineStyles(_this.helper, {\n boxSizing: 'border-box',\n height: \"\".concat(_this.height, \"px\"),\n left: \"\".concat(_this.boundingClientRect.left - margin.left, \"px\"),\n pointerEvents: 'none',\n position: 'fixed',\n top: \"\".concat(_this.boundingClientRect.top - margin.top, \"px\"),\n width: \"\".concat(_this.width, \"px\")\n });\n\n if (_isKeySorting) {\n _this.helper.focus();\n }\n\n if (_hideSortableGhost) {\n _this.sortableGhost = _node;\n setInlineStyles(_node, {\n opacity: 0,\n visibility: 'hidden'\n });\n }\n\n _this.minTranslate = {};\n _this.maxTranslate = {};\n\n if (_isKeySorting) {\n var _ref = _useWindowAsScrollContainer ? {\n top: 0,\n left: 0,\n width: _this.contentWindow.innerWidth,\n height: _this.contentWindow.innerHeight\n } : _this.containerBoundingRect,\n containerTop = _ref.top,\n containerLeft = _ref.left,\n containerWidth = _ref.width,\n containerHeight = _ref.height;\n\n var containerBottom = containerTop + containerHeight;\n var containerRight = containerLeft + containerWidth;\n\n if (_this.axis.x) {\n _this.minTranslate.x = containerLeft - _this.boundingClientRect.left;\n _this.maxTranslate.x = containerRight - (_this.boundingClientRect.left + _this.width);\n }\n\n if (_this.axis.y) {\n _this.minTranslate.y = containerTop - _this.boundingClientRect.top;\n _this.maxTranslate.y = containerBottom - (_this.boundingClientRect.top + _this.height);\n }\n } else {\n if (_this.axis.x) {\n _this.minTranslate.x = (_useWindowAsScrollContainer ? 0 : containerBoundingRect.left) - _this.boundingClientRect.left - _this.width / 2;\n _this.maxTranslate.x = (_useWindowAsScrollContainer ? _this.contentWindow.innerWidth : containerBoundingRect.left + containerBoundingRect.width) - _this.boundingClientRect.left - _this.width / 2;\n }\n\n if (_this.axis.y) {\n _this.minTranslate.y = (_useWindowAsScrollContainer ? 0 : containerBoundingRect.top) - _this.boundingClientRect.top - _this.height / 2;\n _this.maxTranslate.y = (_useWindowAsScrollContainer ? _this.contentWindow.innerHeight : containerBoundingRect.top + containerBoundingRect.height) - _this.boundingClientRect.top - _this.height / 2;\n }\n }\n\n if (_helperClass) {\n _helperClass.split(' ').forEach(function (className) {\n return _this.helper.classList.add(className);\n });\n }\n\n _this.listenerNode = event.touches ? _node : _this.contentWindow;\n\n if (_isKeySorting) {\n _this.listenerNode.addEventListener('wheel', _this.handleKeyEnd, true);\n\n _this.listenerNode.addEventListener('mousedown', _this.handleKeyEnd, true);\n\n _this.listenerNode.addEventListener('keydown', _this.handleKeyDown);\n } else {\n events.move.forEach(function (eventName) {\n return _this.listenerNode.addEventListener(eventName, _this.handleSortMove, false);\n });\n events.end.forEach(function (eventName) {\n return _this.listenerNode.addEventListener(eventName, _this.handleSortEnd, false);\n });\n }\n\n _this.setState({\n sorting: true,\n sortingIndex: index\n });\n\n if (_onSortStart) {\n _onSortStart({\n node: _node,\n index: index,\n collection: _collection,\n isKeySorting: _isKeySorting,\n nodes: _this.manager.getOrderedRefs(),\n helper: _this.helper\n }, event);\n }\n\n if (_isKeySorting) {\n _this.keyMove(0);\n }\n };\n\n var _this$props3 = _this.props,\n _axis = _this$props3.axis,\n _getHelperDimensions = _this$props3.getHelperDimensions,\n _helperClass = _this$props3.helperClass,\n _hideSortableGhost = _this$props3.hideSortableGhost,\n updateBeforeSortStart = _this$props3.updateBeforeSortStart,\n _onSortStart = _this$props3.onSortStart,\n _useWindowAsScrollContainer = _this$props3.useWindowAsScrollContainer;\n var _node = active.node,\n _collection = active.collection;\n var _isKeySorting = _this.manager.isKeySorting;\n\n var _temp8 = function () {\n if (typeof updateBeforeSortStart === 'function') {\n _this._awaitingUpdateBeforeSortStart = true;\n\n var _temp9 = _finallyRethrows(function () {\n var index = _node.sortableInfo.index;\n return Promise.resolve(updateBeforeSortStart({\n collection: _collection,\n index: index,\n node: _node,\n isKeySorting: _isKeySorting\n }, event)).then(function () {});\n }, function (_wasThrown, _result) {\n _this._awaitingUpdateBeforeSortStart = false;\n if (_wasThrown) throw _result;\n return _result;\n });\n\n if (_temp9 && _temp9.then) return _temp9.then(function () {});\n }\n }();\n\n return _temp8 && _temp8.then ? _temp8.then(_temp7) : _temp7(_temp8);\n }\n }();\n\n return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);\n } catch (e) {\n return Promise.reject(e);\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleSortMove\", function (event) {\n var onSortMove = _this.props.onSortMove;\n\n if (typeof event.preventDefault === 'function') {\n event.preventDefault();\n }\n\n _this.updateHelperPosition(event);\n\n _this.animateNodes();\n\n _this.autoscroll();\n\n if (onSortMove) {\n onSortMove(event);\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleSortEnd\", function (event) {\n var _this$props4 = _this.props,\n hideSortableGhost = _this$props4.hideSortableGhost,\n onSortEnd = _this$props4.onSortEnd;\n var _this$manager = _this.manager,\n collection = _this$manager.active.collection,\n isKeySorting = _this$manager.isKeySorting;\n\n var nodes = _this.manager.getOrderedRefs();\n\n if (_this.listenerNode) {\n if (isKeySorting) {\n _this.listenerNode.removeEventListener('wheel', _this.handleKeyEnd, true);\n\n _this.listenerNode.removeEventListener('mousedown', _this.handleKeyEnd, true);\n\n _this.listenerNode.removeEventListener('keydown', _this.handleKeyDown);\n } else {\n events.move.forEach(function (eventName) {\n return _this.listenerNode.removeEventListener(eventName, _this.handleSortMove);\n });\n events.end.forEach(function (eventName) {\n return _this.listenerNode.removeEventListener(eventName, _this.handleSortEnd);\n });\n }\n }\n\n _this.helper.parentNode.removeChild(_this.helper);\n\n if (hideSortableGhost && _this.sortableGhost) {\n setInlineStyles(_this.sortableGhost, {\n opacity: '',\n visibility: ''\n });\n }\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n var _node2 = nodes[i];\n var el = _node2.node;\n _node2.edgeOffset = null;\n _node2.boundingClientRect = null;\n setTranslate3d(el, null);\n setTransitionDuration(el, null);\n _node2.translate = null;\n }\n\n _this.autoScroller.clear();\n\n _this.manager.active = null;\n _this.manager.isKeySorting = false;\n\n _this.setState({\n sorting: false,\n sortingIndex: null\n });\n\n if (typeof onSortEnd === 'function') {\n onSortEnd({\n collection: collection,\n newIndex: _this.newIndex,\n oldIndex: _this.index,\n isKeySorting: isKeySorting,\n nodes: nodes\n }, event);\n }\n\n _this.touched = false;\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"autoscroll\", function () {\n var disableAutoscroll = _this.props.disableAutoscroll;\n var isKeySorting = _this.manager.isKeySorting;\n\n if (disableAutoscroll) {\n _this.autoScroller.clear();\n\n return;\n }\n\n if (isKeySorting) {\n var translate = _objectSpread({}, _this.translate);\n\n var scrollX = 0;\n var scrollY = 0;\n\n if (_this.axis.x) {\n translate.x = Math.min(_this.maxTranslate.x, Math.max(_this.minTranslate.x, _this.translate.x));\n scrollX = _this.translate.x - translate.x;\n }\n\n if (_this.axis.y) {\n translate.y = Math.min(_this.maxTranslate.y, Math.max(_this.minTranslate.y, _this.translate.y));\n scrollY = _this.translate.y - translate.y;\n }\n\n _this.translate = translate;\n setTranslate3d(_this.helper, _this.translate);\n _this.scrollContainer.scrollLeft += scrollX;\n _this.scrollContainer.scrollTop += scrollY;\n return;\n }\n\n _this.autoScroller.update({\n height: _this.height,\n maxTranslate: _this.maxTranslate,\n minTranslate: _this.minTranslate,\n translate: _this.translate,\n width: _this.width\n });\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"onAutoScroll\", function (offset) {\n _this.translate.x += offset.left;\n _this.translate.y += offset.top;\n\n _this.animateNodes();\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleKeyDown\", function (event) {\n var keyCode = event.keyCode;\n var _this$props5 = _this.props,\n shouldCancelStart = _this$props5.shouldCancelStart,\n _this$props5$keyCodes = _this$props5.keyCodes,\n customKeyCodes = _this$props5$keyCodes === void 0 ? {} : _this$props5$keyCodes;\n\n var keyCodes = _objectSpread({}, defaultKeyCodes, customKeyCodes);\n\n if (_this.manager.active && !_this.manager.isKeySorting || !_this.manager.active && (!keyCodes.lift.includes(keyCode) || shouldCancelStart(event) || !_this.isValidSortingTarget(event))) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n if (keyCodes.lift.includes(keyCode) && !_this.manager.active) {\n _this.keyLift(event);\n } else if (keyCodes.drop.includes(keyCode) && _this.manager.active) {\n _this.keyDrop(event);\n } else if (keyCodes.cancel.includes(keyCode)) {\n _this.newIndex = _this.manager.active.index;\n\n _this.keyDrop(event);\n } else if (keyCodes.up.includes(keyCode)) {\n _this.keyMove(-1);\n } else if (keyCodes.down.includes(keyCode)) {\n _this.keyMove(1);\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"keyLift\", function (event) {\n var target = event.target;\n var node = closest(target, function (el) {\n return el.sortableInfo != null;\n });\n var _node$sortableInfo2 = node.sortableInfo,\n index = _node$sortableInfo2.index,\n collection = _node$sortableInfo2.collection;\n _this.initialFocusedNode = target;\n _this.manager.isKeySorting = true;\n _this.manager.active = {\n index: index,\n collection: collection\n };\n\n _this.handlePress(event);\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"keyMove\", function (shift) {\n var nodes = _this.manager.getOrderedRefs();\n\n var lastIndex = nodes[nodes.length - 1].node.sortableInfo.index;\n var newIndex = _this.newIndex + shift;\n var prevIndex = _this.newIndex;\n\n if (newIndex < 0 || newIndex > lastIndex) {\n return;\n }\n\n _this.prevIndex = prevIndex;\n _this.newIndex = newIndex;\n var targetIndex = getTargetIndex(_this.newIndex, _this.prevIndex, _this.index);\n var target = nodes.find(function (_ref2) {\n var node = _ref2.node;\n return node.sortableInfo.index === targetIndex;\n });\n var targetNode = target.node;\n var scrollDelta = _this.containerScrollDelta;\n var targetBoundingClientRect = target.boundingClientRect || getScrollAdjustedBoundingClientRect(targetNode, scrollDelta);\n var targetTranslate = target.translate || {\n x: 0,\n y: 0\n };\n var targetPosition = {\n top: targetBoundingClientRect.top + targetTranslate.y - scrollDelta.top,\n left: targetBoundingClientRect.left + targetTranslate.x - scrollDelta.left\n };\n var shouldAdjustForSize = prevIndex < newIndex;\n var sizeAdjustment = {\n x: shouldAdjustForSize && _this.axis.x ? targetNode.offsetWidth - _this.width : 0,\n y: shouldAdjustForSize && _this.axis.y ? targetNode.offsetHeight - _this.height : 0\n };\n\n _this.handleSortMove({\n pageX: targetPosition.left + sizeAdjustment.x,\n pageY: targetPosition.top + sizeAdjustment.y,\n ignoreTransition: shift === 0\n });\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"keyDrop\", function (event) {\n _this.handleSortEnd(event);\n\n if (_this.initialFocusedNode) {\n _this.initialFocusedNode.focus();\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"handleKeyEnd\", function (event) {\n if (_this.manager.active) {\n _this.keyDrop(event);\n }\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"isValidSortingTarget\", function (event) {\n var useDragHandle = _this.props.useDragHandle;\n var target = event.target;\n var node = closest(target, function (el) {\n return el.sortableInfo != null;\n });\n return node && node.sortableInfo && !node.sortableInfo.disabled && (useDragHandle ? isSortableHandle(target) : target.sortableInfo);\n });\n\n validateProps(props);\n _this.manager = new Manager();\n _this.events = {\n end: _this.handleEnd,\n move: _this.handleMove,\n start: _this.handleStart\n };\n return _this;\n }\n\n _createClass(WithSortableContainer, [{\n key: \"getChildContext\",\n value: function getChildContext() {\n return {\n manager: this.manager\n };\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n var useWindowAsScrollContainer = this.props.useWindowAsScrollContainer;\n var container = this.getContainer();\n Promise.resolve(container).then(function (containerNode) {\n _this2.container = containerNode;\n _this2.document = _this2.container.ownerDocument || document;\n var contentWindow = _this2.props.contentWindow || _this2.document.defaultView || window;\n _this2.contentWindow = typeof contentWindow === 'function' ? contentWindow() : contentWindow;\n _this2.scrollContainer = useWindowAsScrollContainer ? _this2.document.scrollingElement || _this2.document.documentElement : getScrollingParent(_this2.container) || _this2.container;\n _this2.autoScroller = new AutoScroller(_this2.scrollContainer, _this2.onAutoScroll);\n Object.keys(_this2.events).forEach(function (key) {\n return events[key].forEach(function (eventName) {\n return _this2.container.addEventListener(eventName, _this2.events[key], false);\n });\n });\n\n _this2.container.addEventListener('keydown', _this2.handleKeyDown);\n });\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var _this3 = this;\n\n if (this.helper && this.helper.parentNode) {\n this.helper.parentNode.removeChild(this.helper);\n }\n\n if (!this.container) {\n return;\n }\n\n Object.keys(this.events).forEach(function (key) {\n return events[key].forEach(function (eventName) {\n return _this3.container.removeEventListener(eventName, _this3.events[key]);\n });\n });\n this.container.removeEventListener('keydown', this.handleKeyDown);\n }\n }, {\n key: \"updateHelperPosition\",\n value: function updateHelperPosition(event) {\n var _this$props6 = this.props,\n lockAxis = _this$props6.lockAxis,\n lockOffset = _this$props6.lockOffset,\n lockToContainerEdges = _this$props6.lockToContainerEdges,\n transitionDuration = _this$props6.transitionDuration,\n _this$props6$keyboard = _this$props6.keyboardSortingTransitionDuration,\n keyboardSortingTransitionDuration = _this$props6$keyboard === void 0 ? transitionDuration : _this$props6$keyboard;\n var isKeySorting = this.manager.isKeySorting;\n var ignoreTransition = event.ignoreTransition;\n var offset = getPosition(event);\n var translate = {\n x: offset.x - this.initialOffset.x,\n y: offset.y - this.initialOffset.y\n };\n translate.y -= window.pageYOffset - this.initialWindowScroll.top;\n translate.x -= window.pageXOffset - this.initialWindowScroll.left;\n this.translate = translate;\n\n if (lockToContainerEdges) {\n var _getLockPixelOffsets = getLockPixelOffsets({\n height: this.height,\n lockOffset: lockOffset,\n width: this.width\n }),\n _getLockPixelOffsets2 = _slicedToArray(_getLockPixelOffsets, 2),\n minLockOffset = _getLockPixelOffsets2[0],\n maxLockOffset = _getLockPixelOffsets2[1];\n\n var minOffset = {\n x: this.width / 2 - minLockOffset.x,\n y: this.height / 2 - minLockOffset.y\n };\n var maxOffset = {\n x: this.width / 2 - maxLockOffset.x,\n y: this.height / 2 - maxLockOffset.y\n };\n translate.x = limit(this.minTranslate.x + minOffset.x, this.maxTranslate.x - maxOffset.x, translate.x);\n translate.y = limit(this.minTranslate.y + minOffset.y, this.maxTranslate.y - maxOffset.y, translate.y);\n }\n\n if (lockAxis === 'x') {\n translate.y = 0;\n } else if (lockAxis === 'y') {\n translate.x = 0;\n }\n\n if (isKeySorting && keyboardSortingTransitionDuration && !ignoreTransition) {\n setTransitionDuration(this.helper, keyboardSortingTransitionDuration);\n }\n\n setTranslate3d(this.helper, translate);\n }\n }, {\n key: \"animateNodes\",\n value: function animateNodes() {\n var _this$props7 = this.props,\n transitionDuration = _this$props7.transitionDuration,\n hideSortableGhost = _this$props7.hideSortableGhost,\n onSortOver = _this$props7.onSortOver;\n var containerScrollDelta = this.containerScrollDelta,\n windowScrollDelta = this.windowScrollDelta;\n var nodes = this.manager.getOrderedRefs();\n var sortingOffset = {\n left: this.offsetEdge.left + this.translate.x + containerScrollDelta.left,\n top: this.offsetEdge.top + this.translate.y + containerScrollDelta.top\n };\n var isKeySorting = this.manager.isKeySorting;\n var prevIndex = this.newIndex;\n this.newIndex = null;\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n var _node3 = nodes[i].node;\n var index = _node3.sortableInfo.index;\n var width = _node3.offsetWidth;\n var height = _node3.offsetHeight;\n var offset = {\n height: this.height > height ? height / 2 : this.height / 2,\n width: this.width > width ? width / 2 : this.width / 2\n };\n var mustShiftBackward = isKeySorting && index > this.index && index <= prevIndex;\n var mustShiftForward = isKeySorting && index < this.index && index >= prevIndex;\n var translate = {\n x: 0,\n y: 0\n };\n var edgeOffset = nodes[i].edgeOffset;\n\n if (!edgeOffset) {\n edgeOffset = getEdgeOffset(_node3, this.container);\n nodes[i].edgeOffset = edgeOffset;\n\n if (isKeySorting) {\n nodes[i].boundingClientRect = getScrollAdjustedBoundingClientRect(_node3, containerScrollDelta);\n }\n }\n\n var nextNode = i < nodes.length - 1 && nodes[i + 1];\n var prevNode = i > 0 && nodes[i - 1];\n\n if (nextNode && !nextNode.edgeOffset) {\n nextNode.edgeOffset = getEdgeOffset(nextNode.node, this.container);\n\n if (isKeySorting) {\n nextNode.boundingClientRect = getScrollAdjustedBoundingClientRect(nextNode.node, containerScrollDelta);\n }\n }\n\n if (index === this.index) {\n if (hideSortableGhost) {\n this.sortableGhost = _node3;\n setInlineStyles(_node3, {\n opacity: 0,\n visibility: 'hidden'\n });\n }\n\n continue;\n }\n\n if (transitionDuration) {\n setTransitionDuration(_node3, transitionDuration);\n }\n\n if (this.axis.x) {\n if (this.axis.y) {\n if (mustShiftForward || index < this.index && (sortingOffset.left + windowScrollDelta.left - offset.width <= edgeOffset.left && sortingOffset.top + windowScrollDelta.top <= edgeOffset.top + offset.height || sortingOffset.top + windowScrollDelta.top + offset.height <= edgeOffset.top)) {\n translate.x = this.width + this.marginOffset.x;\n\n if (edgeOffset.left + translate.x > this.containerBoundingRect.width - offset.width) {\n if (nextNode) {\n translate.x = nextNode.edgeOffset.left - edgeOffset.left;\n translate.y = nextNode.edgeOffset.top - edgeOffset.top;\n }\n }\n\n if (this.newIndex === null) {\n this.newIndex = index;\n }\n } else if (mustShiftBackward || index > this.index && (sortingOffset.left + windowScrollDelta.left + offset.width >= edgeOffset.left && sortingOffset.top + windowScrollDelta.top + offset.height >= edgeOffset.top || sortingOffset.top + windowScrollDelta.top + offset.height >= edgeOffset.top + height)) {\n translate.x = -(this.width + this.marginOffset.x);\n\n if (edgeOffset.left + translate.x < this.containerBoundingRect.left + offset.width) {\n if (prevNode) {\n translate.x = prevNode.edgeOffset.left - edgeOffset.left;\n translate.y = prevNode.edgeOffset.top - edgeOffset.top;\n }\n }\n\n this.newIndex = index;\n }\n } else {\n if (mustShiftBackward || index > this.index && sortingOffset.left + windowScrollDelta.left + offset.width >= edgeOffset.left) {\n translate.x = -(this.width + this.marginOffset.x);\n this.newIndex = index;\n } else if (mustShiftForward || index < this.index && sortingOffset.left + windowScrollDelta.left <= edgeOffset.left + offset.width) {\n translate.x = this.width + this.marginOffset.x;\n\n if (this.newIndex == null) {\n this.newIndex = index;\n }\n }\n }\n } else if (this.axis.y) {\n if (mustShiftBackward || index > this.index && sortingOffset.top + windowScrollDelta.top + offset.height >= edgeOffset.top) {\n translate.y = -(this.height + this.marginOffset.y);\n this.newIndex = index;\n } else if (mustShiftForward || index < this.index && sortingOffset.top + windowScrollDelta.top <= edgeOffset.top + offset.height) {\n translate.y = this.height + this.marginOffset.y;\n\n if (this.newIndex == null) {\n this.newIndex = index;\n }\n }\n }\n\n setTranslate3d(_node3, translate);\n nodes[i].translate = translate;\n }\n\n if (this.newIndex == null) {\n this.newIndex = this.index;\n }\n\n if (isKeySorting) {\n this.newIndex = prevIndex;\n }\n\n var oldIndex = isKeySorting ? this.prevIndex : prevIndex;\n\n if (onSortOver && this.newIndex !== oldIndex) {\n onSortOver({\n collection: this.manager.active.collection,\n index: this.index,\n newIndex: this.newIndex,\n oldIndex: oldIndex,\n isKeySorting: isKeySorting,\n nodes: nodes,\n helper: this.helper\n });\n }\n }\n }, {\n key: \"getWrappedInstance\",\n value: function getWrappedInstance() {\n invariant(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call');\n return this.refs.wrappedInstance;\n }\n }, {\n key: \"getContainer\",\n value: function getContainer() {\n var getContainer = this.props.getContainer;\n\n if (typeof getContainer !== 'function') {\n return findDOMNode(this);\n }\n\n return getContainer(config.withRef ? this.getWrappedInstance() : undefined);\n }\n }, {\n key: \"render\",\n value: function render() {\n var ref = config.withRef ? 'wrappedInstance' : null;\n return /*#__PURE__*/createElement(WrappedComponent, _extends({\n ref: ref\n }, omit(this.props, omittedProps)));\n }\n }, {\n key: \"helperContainer\",\n get: function get() {\n var helperContainer = this.props.helperContainer;\n\n if (typeof helperContainer === 'function') {\n return helperContainer();\n }\n\n return this.props.helperContainer || this.document.body;\n }\n }, {\n key: \"containerScrollDelta\",\n get: function get() {\n var useWindowAsScrollContainer = this.props.useWindowAsScrollContainer;\n\n if (useWindowAsScrollContainer) {\n return {\n left: 0,\n top: 0\n };\n }\n\n return {\n left: this.scrollContainer.scrollLeft - this.initialScroll.left,\n top: this.scrollContainer.scrollTop - this.initialScroll.top\n };\n }\n }, {\n key: \"windowScrollDelta\",\n get: function get() {\n return {\n left: this.contentWindow.pageXOffset - this.initialWindowScroll.left,\n top: this.contentWindow.pageYOffset - this.initialWindowScroll.top\n };\n }\n }]);\n\n return WithSortableContainer;\n }(Component), _defineProperty(_class, \"displayName\", provideDisplayName('sortableList', WrappedComponent)), _defineProperty(_class, \"defaultProps\", defaultProps), _defineProperty(_class, \"propTypes\", propTypes), _defineProperty(_class, \"childContextTypes\", {\n manager: PropTypes.object.isRequired\n }), _temp;\n}\n\nvar propTypes$1 = {\n index: PropTypes.number.isRequired,\n collection: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n disabled: PropTypes.bool\n};\nvar omittedProps$1 = Object.keys(propTypes$1);\n\nfunction sortableElement(WrappedComponent) {\n var _class, _temp;\n\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n withRef: false\n };\n return _temp = _class = function (_React$Component) {\n _inherits(WithSortableElement, _React$Component);\n\n function WithSortableElement() {\n _classCallCheck(this, WithSortableElement);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(WithSortableElement).apply(this, arguments));\n }\n\n _createClass(WithSortableElement, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.register();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.node) {\n if (prevProps.index !== this.props.index) {\n this.node.sortableInfo.index = this.props.index;\n }\n\n if (prevProps.disabled !== this.props.disabled) {\n this.node.sortableInfo.disabled = this.props.disabled;\n }\n }\n\n if (prevProps.collection !== this.props.collection) {\n this.unregister(prevProps.collection);\n this.register();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.unregister();\n }\n }, {\n key: \"register\",\n value: function register() {\n var _this$props = this.props,\n collection = _this$props.collection,\n disabled = _this$props.disabled,\n index = _this$props.index;\n var node = findDOMNode(this);\n node.sortableInfo = {\n collection: collection,\n disabled: disabled,\n index: index,\n manager: this.context.manager\n };\n this.node = node;\n this.ref = {\n node: node\n };\n this.context.manager.add(collection, this.ref);\n }\n }, {\n key: \"unregister\",\n value: function unregister() {\n var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.collection;\n this.context.manager.remove(collection, this.ref);\n }\n }, {\n key: \"getWrappedInstance\",\n value: function getWrappedInstance() {\n invariant(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call');\n return this.refs.wrappedInstance;\n }\n }, {\n key: \"render\",\n value: function render() {\n var ref = config.withRef ? 'wrappedInstance' : null;\n return /*#__PURE__*/createElement(WrappedComponent, _extends({\n ref: ref\n }, omit(this.props, omittedProps$1)));\n }\n }]);\n\n return WithSortableElement;\n }(Component), _defineProperty(_class, \"displayName\", provideDisplayName('sortableElement', WrappedComponent)), _defineProperty(_class, \"contextTypes\", {\n manager: PropTypes.object.isRequired\n }), _defineProperty(_class, \"propTypes\", propTypes$1), _defineProperty(_class, \"defaultProps\", {\n collection: 0\n }), _temp;\n}\n\nexport { sortableContainer as SortableContainer, sortableContainer, sortableElement as SortableElement, sortableElement, sortableHandle as SortableHandle, sortableHandle, arrayMove };"],"sourceRoot":""}