@dolphinweex/weex-bindingx
Version:
bindingx,expression,binding,weex
22 lines • 72.8 kB
JavaScript
!function (t) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = t(); else if ("function" == typeof define) define("index", function (e, n, r) { r.exports = t() }); else { ("undefined" != typeof window ? window : "undefined" != typeof self ? self : "undefined" != typeof global ? global : this).index = t() } }(function () {
return function (t) { var e = {}; function n(r) { if (e[r]) return e[r].exports; var i = e[r] = { i: r, l: !1, exports: {} }; return t[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports } return n.m = t, n.c = e, n.d = function (t, e, r) { n.o(t, e) || Object.defineProperty(t, e, { configurable: !1, enumerable: !0, get: r }) }, n.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return n.d(e, "a", e), e }, n.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, n.p = "", n(n.s = 0) }([function (t, e, n) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t }, i = n(1), o = n(3); function a(t) { try { if (void 0 !== ("undefined" == typeof weex ? "undefined" : r(weex)) && weex.requireModule) return weex.requireModule(t) } catch (t) { } return window.require("@weex-module/" + t) } var s = !0, u = !0, c = void 0, l = {}; if (i.isWeb) l = n(4); else { try { c = a("bindingx"), s = !0 } catch (t) { s = !1 } if (!c || !c.bind) try { c = a("binding"), s = !0 } catch (t) { s = !1 } if (!(s = !!(c && c.bind && c.unbind && c.getComputedStyle))) try { c = a("expressionBinding"), u = !0 } catch (t) { u = !1 } u = !(!c || !c.bind && !c.createBinding) } function f(t) { if (void 0 !== t) { try { t = JSON.parse(t) } catch (t) { } var e = {}; if ("string" == typeof t ? e.origin = t : t && (e.origin = t.origin, e.transformed = t.transformed), e.transformed || e.origin) return e.transformed = e.transformed || (0, o.parse)(e.origin), e } } e.default = { isSupportNewBinding: s, isSupportBinding: u, _bindingInstances: [], bind: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : function () { }; if (!t) throw new Error("should pass options for binding"); if (function (t) { t && (t.exitExpression = f(t.exitExpression), t.props && t.props.forEach(function (t) { t.expression = f(t.expression) })) }(t), !i.isWeex) return l.bind(t, e); if (c && u) { if (s) return c.bind(t, t && "timing" === t.eventType ? function (t) { return function () { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; if ("function" == typeof t) return t({ state: "end" === e.state ? "exit" : e.state, t: void 0 !== e.t ? e.t : e.deltaT }) } }(e) : e); c.enableBinding(t.anchor, t.eventType), c.createBinding(t.anchor, t.eventType, "", function (t) { if (t && t.props) return t.props.map(function (t) { return { element: t.element, property: t.property, expression: t.expression.transformed } }) }(t), e) } }, unbind: function (t) { if (!t) throw new Error("should pass options for binding"); return i.isWeex ? c && u ? s ? c.unbind(t) : c.disableBinding(t.anchor, t.eventType) : void 0 : l.unbind(t) }, unbindAll: function () { return i.isWeex ? c && u ? s ? c.unbindAll() : c.disableAll() : void 0 : l.unbindAll() }, prepare: function (t) { if (i.isWeex && c && u) return s ? c.prepare(t) : c.enableBinding(t.anchor, t.eventType) }, getComputedStyle: function (t) { return i.isWeex ? s ? c.getComputedStyle(t) : {} : l.getComputedStyle(t) } }, t.exports = e.default }, function (t, e, n) { "use strict"; (function (n) { function r(t) { return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t })(t) } Object.defineProperty(e, "__esModule", { value: !0 }), e.default = e.isReactNative = e.isWeex = e.isNode = e.isWeb = void 0; var i = "object" === ("undefined" == typeof navigator ? "undefined" : r(navigator)) && ("Mozilla" === navigator.appCodeName || "Gecko" === navigator.product); e.isWeb = i; var o = void 0 !== n && !(!n.versions || !n.versions.node); e.isNode = o; var a = "function" == typeof callNative || "object" === ("undefined" == typeof WXEnvironment ? "undefined" : r(WXEnvironment)) && "Web" !== WXEnvironment.platform && "harmony" !== WXEnvironment.platform; e.isWeex = a; var s = "undefined" != typeof __fbBatchedBridgeConfig; e.isReactNative = s, e.default = t.exports; var u = t.exports; e.default = u }).call(e, n(2)) }, function (t, e) { var n, r, i = t.exports = {}; function o() { throw new Error("setTimeout has not been defined") } function a() { throw new Error("clearTimeout has not been defined") } function s(t) { if (n === setTimeout) return setTimeout(t, 0); if ((n === o || !n) && setTimeout) return n = setTimeout, setTimeout(t, 0); try { return n(t, 0) } catch (e) { try { return n.call(null, t, 0) } catch (e) { return n.call(this, t, 0) } } } !function () { try { n = "function" == typeof setTimeout ? setTimeout : o } catch (t) { n = o } try { r = "function" == typeof clearTimeout ? clearTimeout : a } catch (t) { r = a } }(); var u, c = [], l = !1, f = -1; function p() { l && u && (l = !1, u.length ? c = u.concat(c) : f = -1, c.length && h()) } function h() { if (!l) { var t = s(p); l = !0; for (var e = c.length; e;) { for (u = c, c = []; ++f < e;)u && u[f].run(); f = -1, e = c.length } u = null, l = !1, function (t) { if (r === clearTimeout) return clearTimeout(t); if ((r === a || !r) && clearTimeout) return r = clearTimeout, clearTimeout(t); try { r(t) } catch (e) { try { return r.call(null, t) } catch (e) { return r.call(this, t) } } }(t) } } function d(t, e) { this.fun = t, this.array = e } function m() { } i.nextTick = function (t) { var e = new Array(arguments.length - 1); if (arguments.length > 1) for (var n = 1; n < arguments.length; n++)e[n - 1] = arguments[n]; c.push(new d(t, e)), 1 !== c.length || l || s(h) }, d.prototype.run = function () { this.fun.apply(null, this.array) }, i.title = "browser", i.browser = !0, i.env = {}, i.argv = [], i.version = "", i.versions = {}, i.on = m, i.addListener = m, i.once = m, i.off = m, i.removeListener = m, i.removeAllListeners = m, i.emit = m, i.prependListener = m, i.prependOnceListener = m, i.listeners = function (t) { return [] }, i.binding = function (t) { throw new Error("process.binding is not supported") }, i.cwd = function () { return "/" }, i.chdir = function (t) { throw new Error("process.chdir is not supported") }, i.umask = function () { return 0 } }, function (module, exports, __webpack_require__) { !function (t, e) { module.exports = e() }("undefined" != typeof self && self, function () { return function (t) { var e = {}; function n(r) { if (e[r]) return e[r].exports; var i = e[r] = { i: r, l: !1, exports: {} }; return t[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports } return n.m = t, n.c = e, n.d = function (t, e, r) { n.o(t, e) || Object.defineProperty(t, e, { configurable: !1, enumerable: !0, get: r }) }, n.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return n.d(e, "a", e), e }, n.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, n.p = "", n(n.s = 0) }([function (module, exports, __webpack_require__) { "use strict"; var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t }, lex = { InputElementDiv: "<WhiteSpace>|<LineTerminator>|<ReservedWord>|<Identifier>|<NumericLiteral>|<Punctuator>|<StringLiteral>", InputElementRegExp: "<WhiteSpace>|<LineTerminator>|<ReservedWord>|<Identifier>|<NumericLiteral>|<Punctuator>|<StringLiteral>", ReservedWord: "<Keyword>|<NullLiteral>|<BooleanLiteral>", WhiteSpace: /[\t\v\f\u0020\u00A0\u1680\u180E\u2000-\u200A\u202F\u205f\u3000\uFEFF]/, LineTerminator: /[\n\r\u2028\u2029]/, Keyword: /new(?![_$a-zA-Z0-9])|void(?![_$a-zA-Z0-9])|delete(?![_$a-zA-Z0-9])|in(?![_$a-zA-Z0-9])|instanceof(?![_$a-zA-Z0-9])|typeof(?![_$a-zA-Z0-9])/, NullLiteral: /null(?![_$a-zA-Z0-9])/, BooleanLiteral: /(?:true|false)(?![_$a-zA-Z0-9])/, Identifier: /[_$a-zA-Z][_$a-zA-Z0-9]*/, Punctuator: /\/|=>|\*\*|>>>=|>>=|<<=|===|!==|>>>|<<|%=|\*=|-=|\+=|<=|>=|==|!=|\^=|\|=|\|\||&&|&=|>>|\+\+|--|\:|}|\*|&|\||\^|!|~|-|\+|\?|%|=|>|<|,|;|\.(?![0-9])|\]|\[|\)|\(|{/, DivPunctuator: /\/=|\//, NumericLiteral: /(?:0[xX][0-9a-fA-F]*|\.[0-9]+|(?:[1-9]+[0-9]*|0)(?:\.[0-9]*|\.)?)(?:[eE][+-]{0,1}[0-9]+)?(?![_$a-zA-Z0-9])/, StringLiteral: /"(?:[^"\n\\\r\u2028\u2029]|\\(?:['"\\bfnrtv\n\r\u2028\u2029]|\r\n)|\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\[^0-9ux'"\\bfnrtv\n\\\r\u2028\u2029])*"|'(?:[^'\n\\\r\u2028\u2029]|\\(?:['"\\bfnrtv\n\r\u2028\u2029]|\r\n)|\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\[^0-9ux'"\\bfnrtv\n\\\r\u2028\u2029])*'/, RegularExpressionLiteral: /\/(?:\[(?:\\[\s\S]|[^\]])*\]|[^*\/\\\n\r\u2028\u2029]|\\[^\n\r\u2028\u2029])(?:\[(?:\\[\s\S]|[^\]])*\]|[^\/\\\n\r\u2028\u2029]|\\[^\n\r\u2028\u2029])*\/[0-9a-zA-Z]*/ }; function XRegExp(t, e, n) { var r = [e]; var i = function e(i) { var o = new RegExp; return o.compile(i.replace(/<([^>]+)>/g, function (n, i) { return t[i] ? (r.push(i), t[i] instanceof RegExp ? "(" + t[i].source + ")" : "(" + e(t[i]).source + ")") : "" }), n), o }(t[e]); this.exec = function (t) { var e = i.exec(t); if (null == e) return null; for (var n = new String(e[0]), o = 0; o < r.length; o++)e[o] && (n[r[o]] = e[o]); return n }, Object.defineProperty(this, "lastIndex", { get: function () { return i.lastIndex }, set: function (t) { i.lastIndex = t } }) } function LexicalParser() { var t, e = new XRegExp(lex, "InputElementDiv", "g"), n = new XRegExp(lex, "InputElementRegExp", "g"); Object.defineProperty(this, "source", { get: function () { return t }, set: function (r) { t = r, e.lastIndex = 0, n.lastIndex = 0 } }), this.reset = function () { e.lastIndex = 0, n.lastIndex = 0 }, this.getNextToken = function (r) { var i, o = e.lastIndex, a = (i = r ? e : n).exec(t); if (a && i.lastIndex - o > a.length) throw new SyntaxError("Unexpected token ILLEGAL"); return e.lastIndex = i.lastIndex, n.lastIndex = i.lastIndex, a } } var rules = { IdentifierName: [["Identifier"]], Literal: [["NullLiteral"], ["BooleanLiteral"], ["NumericLiteral"], ["StringLiteral"], ["RegularExpressionLiteral"]], PrimaryExpression: [["Identifier"], ["Literal"], ["(", "Expression", ")"]], CallExpression: [["PrimaryExpression", "Arguments"], ["CallExpression", "Arguments"]], Arguments: [["(", ")"], ["(", "ArgumentList", ")"]], ArgumentList: [["ConditionalExpression"], ["ArgumentList", ",", "ConditionalExpression"]], LeftHandSideExpression: [["PrimaryExpression"], ["CallExpression"]], UnaryExpression: [["LeftHandSideExpression"], ["void", "UnaryExpression"], ["+", "UnaryExpression"], ["-", "UnaryExpression"], ["~", "UnaryExpression"], ["!", "UnaryExpression"]], ExponentiationExpression: [["UnaryExpression"], ["ExponentiationExpression", "**", "UnaryExpression"]], MultiplicativeExpression: [["MultiplicativeExpression", "/", "ExponentiationExpression"], ["ExponentiationExpression"], ["MultiplicativeExpression", "*", "ExponentiationExpression"], ["MultiplicativeExpression", "%", "ExponentiationExpression"]], AdditiveExpression: [["MultiplicativeExpression"], ["AdditiveExpression", "+", "MultiplicativeExpression"], ["AdditiveExpression", "-", "MultiplicativeExpression"]], ShiftExpression: [["AdditiveExpression"], ["ShiftExpression", "<<", "AdditiveExpression"], ["ShiftExpression", ">>", "AdditiveExpression"], ["ShiftExpression", ">>>", "AdditiveExpression"]], RelationalExpression: [["ShiftExpression"], ["RelationalExpression", "<", "ShiftExpression"], ["RelationalExpression", ">", "ShiftExpression"], ["RelationalExpression", "<=", "ShiftExpression"], ["RelationalExpression", ">=", "ShiftExpression"], ["RelationalExpression", "instanceof", "ShiftExpression"], ["RelationalExpression", "in", "ShiftExpression"]], EqualityExpression: [["RelationalExpression"], ["EqualityExpression", "==", "RelationalExpression"], ["EqualityExpression", "!=", "RelationalExpression"], ["EqualityExpression", "===", "RelationalExpression"], ["EqualityExpression", "!==", "RelationalExpression"]], BitwiseANDExpression: [["EqualityExpression"], ["BitwiseANDExpression", "&", "EqualityExpression"]], BitwiseXORExpression: [["BitwiseANDExpression"], ["BitwiseXORExpression", "^", "BitwiseANDExpression"]], BitwiseORExpression: [["BitwiseXORExpression"], ["BitwiseORExpression", "|", "BitwiseXORExpression"]], LogicalANDExpression: [["BitwiseORExpression"], ["LogicalANDExpression", "&&", "BitwiseORExpression"]], LogicalORExpression: [["LogicalANDExpression"], ["LogicalORExpression", "||", "LogicalANDExpression"]], ConditionalExpression: [["LogicalORExpression"], ["LogicalORExpression", "?", "LogicalORExpression", ":", "LogicalORExpression"]], Expression: [["ConditionalExpression"], ["Expression", ",", "ConditionalExpression"]], Program: [["Expression"]] }; function _Symbol(t, e) { this.name = t, this.token = e, this.childNodes = [], this.toString = function (t) { if (t || (t = ""), 1 == this.childNodes.length) return this.childNodes[0].toString(t); for (var e = t + this.name + (void 0 != this.token && this.name != this.token ? ":" + this.token : "") + "\n", n = 0; n < this.childNodes.length; n++)e += this.childNodes[n].toString(t + " "); return e } } function SyntacticalParser() { var t = { Program: "$" }, e = {}; !function t(n) { e[JSON.stringify(n)] = n; for (var r = Object.getOwnPropertyNames(n); r.length;) { var i = r.shift(); rules[i] && rules[i].forEach(function (t) { n[t[0]] || r.push(t[0]); var e = n; t.forEach(function (t) { e[t] || (e[t] = {}), e = e[t] }), n[i].$div && (e.$div = !0), e.$reduce = i, e.$count = t.length }) } for (var o in n) "object" != _typeof(n[o]) || "$" == o.charAt(0) || n[o].$closure || (e[JSON.stringify(n[o])] ? n[o] = e[JSON.stringify(n[o])] : t(n[o])); n.$closure = !0 }(t); var n = [], r = [t], i = t; this.insertSymbol = function (t, e) { for (; !i[t.name] && i.$reduce;) { for (var o = i.$count, a = new _Symbol(i.$reduce); o--;)a.childNodes.push(n.pop()), r.pop(); i = r[r.length - 1], this.insertSymbol(a) } if (i = i[t.name], n.push(t), r.push(i), !i) throw new Error; return i.$div }, this.reset = function () { i = t, n = [], r = [t] }, Object.defineProperty(this, "grammarTree", { get: function () { try { for (; i.$reduce;) { for (var t = i.$count, e = new _Symbol(i.$reduce); t--;)e.childNodes.push(n.pop()), r.pop(); i = r[r.length - 1], this.insertSymbol(e) } if (n.length > 0 && i[";"]) return this.insertSymbol(new _Symbol(";", ";")), this.grammarTree; if (1 != n.length || "Program" != n[0].name) throw new Error } catch (t) { throw new SyntaxError("Unexpected end of input") } return n[0] } }) } function Parser() { this.lexicalParser = new LexicalParser, this.syntacticalParser = new SyntacticalParser; var t = {};["NullLiteral", "BooleanLiteral", "NumericLiteral", "StringLiteral", "RegularExpressionLiteral", "Identifier", "**", "=>", "{", "}", "(", ")", "[", "]", ".", ";", ",", "<", ">", "<=", ">=", "==", "!=", "===", "!==", "+", "-", "*", "%", "++", "--", "<<", ">>", ">>>", "&", "|", "^", "!", "~", "&&", "||", "?", ":", "=", "+=", "-=", "*=", "%=", "<<=", ">>=", ">>>=", "&=", "|=", "^=", "/", "/=", "instanceof", "typeof", "new", "void", "debugger", "this", "delete", "in"].forEach(function (e) { Object.defineProperty(t, e, {}) }), this.reset = function () { this.lexicalParser.reset(), this.syntacticalParser.reset() }, this.parse = function (e, n) { var r, i = this, o = !1; this.lexicalParser.source = e; for (var a = !1; r = this.lexicalParser.getNextToken(a);) { n && n(r); try { if (Object.getOwnPropertyNames(r).some(function (e) { return !!t.hasOwnProperty(e) && (a = i.syntacticalParser.insertSymbol(new _Symbol(e, r), o), o = !1, !0) })) continue; (r.Keyword || r.Punctuator || r.DivPunctuator) && t.hasOwnProperty(r.toString()) && (a = this.syntacticalParser.insertSymbol(new _Symbol(r.toString(), r), o)) } catch (t) { throw new SyntaxError("Unexpected token " + r) } } return this.syntacticalParser.grammarTree } } var parser = new Parser; function JavaScriptExpression(text) { parser.reset(), this.tree = parser.parse(text), this.paths = []; var context = Object.create(null), me = this, pathIndex = Object.create(null); function checkSimple(t) { for (var e = t; e.childNodes.length <= 1 && "MemberExpression" !== e.name;)e = e.childNodes[0]; "MemberExpression" === e.name ? me.isSimple = !0 : me.isSimple = !1 } function walk(t) { if ("CallExpression" === t.name && "CallExpression" !== t.childNodes[t.childNodes.length - 1].name) { getPath(t.childNodes[1]); walk(t.childNodes[0]) } else if ("NewExpression" === t.name && 1 === t.childNodes.length) getPath(t.childNodes[0]); else if ("MemberExpression" === t.name && 1 === t.childNodes.length) getPath(t); else for (var e = 0; e < t.childNodes.length; e++)walk(t.childNodes[e]) } function getPath(t) { var e; if ("IdentifierName" === t.childNodes[0].name) return (e = getPath(t.childNodes[2])) && (e = e.concat(t.childNodes[0].childNodes[0].token.toString())), createPath(e), e; if ("PrimaryExpression" === t.childNodes[0].name) return "Identifier" === t.childNodes[0].childNodes[0].name ? (createPath(e = [t.childNodes[0].childNodes[0].token.toString()]), e) : null; if ("]" === t.childNodes[0].name) return getPath(t.childNodes[3]), walk(t.childNodes[1]), null; if ("Arguments" === t.childNodes[0].name) return walk(t.childNodes[0]), walk(t.childNodes[1]), null; for (var n = 0; n < t.childNodes.length; n++)walk(t.childNodes[n]) } function createPath(t) { for (var e = context, n = 0; n < t.length - 1; n++)e[t[n]] || (e[t[n]] = Object.create(null)), e = e[t[n]]; me.paths.push(t), pathIndex[t.join(".")] = !1 } this.isSimple, this.isConst, walk(this.tree), checkSimple(this.tree), 0 === this.paths.length && (this.isConst = !0), this.setter = function (t) { for (var e = context, n = 0; n < t.length - 1; n++)e[t[n]] || (e[t[n]] = Object.create(null)), e = e[t[n]]; return { isCompleted: function () { for (var t in pathIndex) if (!pathIndex[t]) return !1; return !0 }, set: function (r) { return pathIndex[t.join(".")] || (pathIndex[t.join(".")] = !0), e[t[n]] = r, this.isCompleted() ? me.exec() : void 0 } } }, this.valueOf = this.exec = function () { try { return function () { return eval(text) }.call(context) } catch (t) { } } } function visit(t) { var e, n = t.childNodes.slice().reverse(), r = n.filter(function (t) { return !t.token || !t.token.Punctuator }); if ("UnaryExpression" === t.name && (2 === n.length && "-" === n[0].name && 1 === r.length)) return (e = visit(r[0])).value = -e.value, e; if ("Arguments" === t.name) { for (var i = [], o = r[0]; o;)3 === o.childNodes.length && (i.unshift(o.childNodes[0]), o = o.childNodes[2]), 1 === o.childNodes.length && (i.unshift(o.childNodes[0]), o = null); return { type: "Arguments", children: i.map(function (t) { return visit(t) }) } } if (r && 1 === r.length) return e = visit(r[0]); if (t.token && ["NullLiteral", "BooleanLiteral", "NumericLiteral", "StringLiteral", "Identifier"].some(function (e) { return t.token[e] })) { var a = Object.keys(t.token).filter(function (t) { return t.match(/Literal/) || t.match(/Identifier/) })[0]; return { type: a, value: { NullLiteral: null, BooleanLiteral: Boolean(t.token), NumericLiteral: Number(t.token), StringLiteral: t.token, Identifier: t.token }[a] } } return "CallExpression" === t.name ? { type: "CallExpression", children: [visit(n[0]), visit(n[1])] } : { type: n.filter(function (t) { return t.token && t.token.Punctuator })[0].name, children: n.filter(function (t) { return !t.token || !t.token.Punctuator }).map(function (t) { return visit(t) }) } } function parse(t) { var e = new JavaScriptExpression(t); return JSON.stringify(visit(e.tree), null) } module.exports = { parse: parse } }]) }) }, function (t, e, n) {
!function (e, n) { t.exports = n() }("undefined" != typeof self && self, function () {
return function (t) { var e = {}; function n(r) { if (e[r]) return e[r].exports; var i = e[r] = { i: r, l: !1, exports: {} }; return t[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports } return n.m = t, n.c = e, n.d = function (t, e, r) { n.o(t, e) || Object.defineProperty(t, e, { configurable: !1, enumerable: !0, get: r }) }, n.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return n.d(e, "a", e), e }, n.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, n.p = "", n(n.s = 8) }([function (t, e, n) {
"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, o = Object.prototype.propertyIsEnumerable; t.exports = function () { try { if (!Object.assign) return !1; var t = new String("abc"); if (t[5] = "de", "5" === Object.getOwnPropertyNames(t)[0]) return !1; for (var e = {}, n = 0; n < 10; n++)e["_" + String.fromCharCode(n)] = n; if ("0123456789" !== Object.getOwnPropertyNames(e).map(function (t) { return e[t] }).join("")) return !1; var r = {}; return "abcdefghijklmnopqrst".split("").forEach(function (t) { r[t] = t }), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, r)).join("") } catch (t) { return !1 } }() ? Object.assign : function (t, e) { for (var n, a, s = function (t) { if (null === t || void 0 === t) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(t) }(t), u = 1; u < arguments.length; u++) { for (var c in n = Object(arguments[u])) i.call(n, c) && (s[c] = n[c]); if (r) { a = r(n); for (var l = 0; l < a.length; l++)o.call(n, a[l]) && (s[a[l]] = n[a[l]]) } } return s }
}, function (t, e, n) { !function (e, n) { t.exports = n() }("undefined" != typeof self && self, function () { return function (t) { var e = {}; function n(r) { if (e[r]) return e[r].exports; var i = e[r] = { i: r, l: !1, exports: {} }; return t[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports } return n.m = t, n.c = e, n.d = function (t, e, r) { n.o(t, e) || Object.defineProperty(t, e, { configurable: !1, enumerable: !0, get: r }) }, n.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return n.d(e, "a", e), e }, n.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, n.p = "", n(n.s = 0) }([function (t, e, n) { "use strict"; function r(t, e) { if (t instanceof Array) return Array.prototype.map.call(t, e); var n = []; return i(t, function (t, r) { n.push(e(t, r)) }), n } function i(t, e) { if (t instanceof Array) return Array.prototype.forEach.call(t, e); Object.keys(t).forEach(function (n) { e(t[n], n) }) } function o(t, e) { var n = null; return i(t, function (t, r) { if ("function" == typeof e) e(t, r) && (n = t); else { var i = Object.keys(e)[0]; i && t[i] === e[i] && (n = t) } }), n } t.exports = { find: o, forEach: i, map: r, filter: function (t, e) { var n = []; return i(t, function (t, r) { e(t, r) && n.push(t) }), n }, dropWhile: function (t, e) { var n = []; return r(t, function (t, r) { e(t, r) || n.push(t) }), n }, findIndex: function (t, e) { return t.indexOf(o(t, e)) } } }]) }) }, function (t, e, n) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var r = function () { return function (t, e) { if (Array.isArray(t)) return t; if (Symbol.iterator in Object(t)) return function (t, e) { var n = [], r = !0, i = !1, o = void 0; try { for (var a, s = t[Symbol.iterator](); !(r = (a = s.next()).done) && (n.push(a.value), !e || n.length !== e); r = !0); } catch (t) { i = !0, o = t } finally { try { !r && s.return && s.return() } finally { if (i) throw o } } return n }(t, e); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }(); function i(t) { return t / document.body.clientWidth * 750 } var o = function () { for (var t = document.createElement("div").style, e = ["t", "webkitT", "MozT", "msT", "OT"], n = 0, r = e.length; n < r; n++)if (e[n] + "ransform" in t) return e[n].substr(0, e[n].length - 1); return !1 }(); var a = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, s = /([astvzqmhlc])([^astvzqmhlc]*)/gi; e.matrixToTransformObj = function (t) { "none" === t && (t = "matrix(1,0,0,1,0,0)"); Math.atan; var e = Math.atan2, n = Math.round, o = Math.sqrt, a = (Math.PI, { skewY: 0, skewX: 0, translateX: 0, translateY: 0, scaleX: 1, scaleY: 1 }), s = t.split("(")[1]; if (!(s = (s = s && s.split(")")[0]) && s.split(",")) || !s.length) return a; var u = r(s, 6), c = u[0], l = u[1], f = u[2], p = u[3], h = u[4], d = u[5]; return a.rotate = a.rotateZ = n(e(parseFloat(l), parseFloat(c)) * (180 / Math.PI)) || 0, a.translateX = void 0 !== h ? i(h) : 0, a.translateY = void 0 !== d ? i(d) : 0, a.scaleX = o(c * c + l * l), a.scaleY = o(f * f + p * p), a }, e.pxTo750 = i, e.px = function (t) { return t / 750 * document.body.clientWidth }, e.clamp = function (t, e, n) { return t < e ? e : t > n ? n : t }, e.prefixStyle = function (t) { return !1 !== o && ("" === o ? t : o + t.charAt(0).toUpperCase() + t.substr(1)) }, e.parseSVGPath = function (t, e) { var n = []; return t.replace(s, function (t, e, r) { var i = e.toLowerCase(); for (r = function (t) { var e = t.match(/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi); return e ? e.map(Number) : [] }(r), "m" === i && r.length > 2 && (n.push([e].concat(r.splice(0, 2))), i = "l", e = "m" === e ? "l" : "L"); r.length >= 0;) { if (r.length === a[i]) return r.unshift(e), n.push(r); if (r.length < a[i]) throw new Error("malformed path data"); n.push([e].concat(r.splice(0, a[i]))) } }), "function" == typeof e ? n.map(function (t) { return t.map(function (t, n) { return n > 0 ? e(t) : t }) }) : n }, e.stringifySVGPath = function (t, e) { return "function" == typeof e && (t = t.map(function (t) { return t.map(function (t, n) { return n > 0 ? e(t) : t }) })), t.map(function (t) { return t.join(" ") }).join(" ") }, e.interceptSVGPath = function (t, e, n, r) { return t && t[e] && (n = [r = (r && r.replace(/'|"/g, "") || t[e][0]).replace(/'|"/g, "")].concat(function (t) { if (Array.isArray(t)) { for (var e = 0, n = Array(t.length); e < t.length; e++)n[e] = t[e]; return n } return Array.from(t) }(n)), t[e] = n), t } }, function (t, e, n) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var r = function () { function t(t, e) { for (var n = 0; n < e.length; n++) { var r = e[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r) } } return function (e, n, r) { return n && t(e.prototype, n), r && t(e, r), e } }(), i = function (t) { return t && t.__esModule ? t : { default: t } }(n(1)), o = n(2); var a = function () { function t(e) { !function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, t), this.binding = null, this.binding = e; var n = e.options.props; i.default.map(n, function (t) { var e = t.element, n = t.config; n && e && (n.perspective && e.parentNode && (e.parentNode.style[(0, o.prefixStyle)("transformStyle")] = "preserve-3d", e.parentNode.style[(0, o.prefixStyle)("perspective")] = n.perspective + "px", e.parentNode.style[(0, o.prefixStyle)("perspectiveOrigin")] = "0 0"), n.transformOrigin && (e.style[(0, o.prefixStyle)("transformOrigin")] = n.transformOrigin)) }) } return r(t, [{ key: "destroy", value: function () { } }]), t }(); e.default = a }, function (t, e, n) {
!function (e, n) { t.exports = n() }(0, function () {
return function (t) { var e = {}; function n(r) { if (e[r]) return e[r].exports; var i = e[r] = { i: r, l: !1, exports: {} }; return t[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports } return n.m = t, n.c = e, n.d = function (t, e, r) { n.o(t, e) || Object.defineProperty(t, e, { configurable: !1, enumerable: !0, get: r }) }, n.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return n.d(e, "a", e), e }, n.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, n.p = "", n(n.s = 3) }([function (t, e, n) { "use strict"; var r = Math.PI, i = Math.sin, o = Math.cos, a = Math.sqrt, s = Math.pow, u = 1.70158, c = 1.525 * u, l = 2 * r / 3, f = 2 * r / 4.5; function p(t) { var e = 7.5625, n = 2.75; return t < 1 / n ? e * t * t : t < 2 / n ? e * (t -= 1.5 / n) * t + .75 : t < 2.5 / n ? e * (t -= 2.25 / n) * t + .9375 : e * (t -= 2.625 / n) * t + .984375 } var h = { linear: function (t) { return t }, easeInQuad: function (t) { return t * t }, easeOutQuad: function (t) { return 1 - (1 - t) * (1 - t) }, easeInOutQuad: function (t) { return t < .5 ? 2 * t * t : 1 - s(-2 * t + 2, 2) / 2 }, easeInCubic: function (t) { return t * t * t }, easeOutCubic: function (t) { return 1 - s(1 - t, 3) }, easeInOutCubic: function (t) { return t < .5 ? 4 * t * t * t : 1 - s(-2 * t + 2, 3) / 2 }, easeInQuart: function (t) { return t * t * t * t }, easeOutQuart: function (t) { return 1 - s(1 - t, 4) }, easeInOutQuart: function (t) { return t < .5 ? 8 * t * t * t * t : 1 - s(-2 * t + 2, 4) / 2 }, easeInQuint: function (t) { return t * t * t * t * t }, easeOutQuint: function (t) { return 1 - s(1 - t, 5) }, easeInOutQuint: function (t) { return t < .5 ? 16 * t * t * t * t * t : 1 - s(-2 * t + 2, 5) / 2 }, easeInSine: function (t) { return 1 - o(t * r / 2) }, easeOutSine: function (t) { return i(t * r / 2) }, easeInOutSine: function (t) { return -(o(r * t) - 1) / 2 }, easeInExpo: function (t) { return 0 === t ? 0 : s(2, 10 * t - 10) }, easeOutExpo: function (t) { return 1 === t ? 1 : 1 - s(2, -10 * t) }, easeInOutExpo: function (t) { return 0 === t ? 0 : 1 === t ? 1 : t < .5 ? s(2, 20 * t - 10) / 2 : (2 - s(2, -20 * t + 10)) / 2 }, easeInCirc: function (t) { return 1 - a(1 - s(t, 2)) }, easeOutCirc: function (t) { return a(1 - s(t - 1, 2)) }, easeInOutCirc: function (t) { return t < .5 ? (1 - a(1 - s(2 * t, 2))) / 2 : (a(1 - s(-2 * t + 2, 2)) + 1) / 2 }, easeInElastic: function (t) { return 0 === t ? 0 : 1 === t ? 1 : -s(2, 10 * t - 10) * i((10 * t - 10.75) * l) }, easeOutElastic: function (t) { return 0 === t ? 0 : 1 === t ? 1 : s(2, -10 * t) * i((10 * t - .75) * l) + 1 }, easeInOutElastic: function (t) { return 0 === t ? 0 : 1 === t ? 1 : t < .5 ? -s(2, 20 * t - 10) * i((20 * t - 11.125) * f) / 2 : s(2, -20 * t + 10) * i((20 * t - 11.125) * f) / 2 + 1 }, easeInBack: function (t) { return 2.70158 * t * t * t - u * t * t }, easeOutBack: function (t) { return 1 + 2.70158 * s(t - 1, 3) + u * s(t - 1, 2) }, easeInOutBack: function (t) { return t < .5 ? s(2 * t, 2) * (7.189819 * t - c) / 2 : (s(2 * t - 2, 2) * ((c + 1) * (2 * t - 2) + c) + 2) / 2 }, easeInBounce: function (t) { return 1 - p(1 - t) }, easeOutBounce: p, easeInOutBounce: function (t) { return t < .5 ? (1 - p(1 - 2 * t)) / 2 : (1 + p(2 * t - 1)) / 2 }, cubicBezier: function () { } }; t.exports = h }, function (t, e, n) { "use strict"; t.exports = function (t, e, n, r, i) { var o = function (e) { var r = 1 - e; return 3 * r * r * e * t + 3 * r * e * e * n + e * e * e }, a = function (t) { var n = 1 - t; return 3 * n * n * t * e + 3 * n * t * t * r + t * t * t }, s = function (e) { var r = 1 - e; return 3 * (2 * (e - 1) * e + r * r) * t + 3 * (-e * e * e + 2 * r * e) * n }; return function (t) { var e, n, r, u, c, l, f = t; for (r = f, l = 0; l < 8; l++) { if (u = o(r) - f, Math.abs(u) < i) return a(r); if (c = s(r), Math.abs(c) < 1e-6) break; r -= u / c } if (n = 1, (r = f) < (e = 0)) return a(e); if (r > n) return a(n); for (; e < n;) { if (u = o(r), Math.abs(u - f) < i) return a(r); f > u ? e = r : n = r, r = .5 * (n - e) + e } return a(r) } } }, function (t, e, n) { "use strict"; var r = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (t) { window.setTimeout(t, 1e3 / 60) }, i = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || window.clearTimeout; t.exports = { raf: r, cancelRAF: i } }, function (t, e, n) { "use strict"; t.exports = n(4) }, function (t, e, n) { "use strict"; var r = n(0), i = n(1), o = n(2), a = o.raf, s = o.cancelRAF, u = n(5), c = "start", l = "end", f = "run", p = "stop", h = function () { }; function d(t) { this.init(t) } d.prototype = { init: function (t) { this.cfg = u({ easing: "linear", duration: 1 / 0, onStart: h, onRun: h, onStop: h, onEnd: h }, t) }, run: function () { var t = this.cfg, e = t.duration, n = t.onStart, o = t.onRun; if (e <= 1 && (this.isfinished = !0, "function" == typeof o && o({ percent: 1 }), this.stop()), !this.isfinished) { this._hasFinishedPercent = this._stop && this._stop.percent || 0, this._stop = null, this.start = Date.now(), this.percent = 0, "function" == typeof n && n({ percent: 0, type: c }); var a = 1e3 / 60 / e / 4, s = this.cfg.bezierArgs; this.easingFn = s && 4 === s.length ? i(s[0], s[1], s[2], s[3], a) : r[this.cfg.easing], this._run() } }, _run: function () { var t = this, e = this.cfg, n = e.onRun, r = e.onStop; s(this._raf), this._raf = a(function () { if (t.now = Date.now(), t.t = t.now - t.start, t.duration = t.now - t.start >= t.cfg.duration ? t.cfg.duration : t.now - t.start, t.progress = t.easingFn(t.duration / t.cfg.duration), t.percent = t.duration / t.cfg.duration + t._hasFinishedPercent, t.percent >= 1 || t._stop) return t.percent = t._stop && t._stop.percent ? t._stop.percent : 1, t.duration = t._stop && t._stop.duration ? t._stop.duration : t.duration, "function" == typeof n && n({ percent: t.progress, originPercent: t.percent, t: t.t, type: f }), "function" == typeof r && r({ percent: t.percent, t: t.t, type: p }), void (t.percent >= 1 && (t.isfinished = !0, t.stop())); "function" == typeof n && n({ percent: t.progress, originPercent: t.percent, t: t.t, type: f }), t._run() }) }, stop: function () { var t = this.cfg.onEnd; this._stop = { percent: this.percent, now: this.now }, "function" == typeof t && t({ percent: 1, t: this.t, type: l }), s(this._raf) } }, d.Easing = r, d.Bezier = i, d.raf = a, d.cancelRAF = s, t.exports = d }, function (t, e, n) {
"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, o = Object.prototype.propertyIsEnumerable; t.exports = function () { try { if (!Object.assign) return !1; var t = new String("abc"); if (t[5] = "de", "5" === Object.getOwnPropertyNames(t)[0]) return !1; for (var e = {}, n = 0; n < 10; n++)e["_" + String.fromCharCode(n)] = n; if ("0123456789" !== Object.getOwnPropertyNames(e).map(function (t) { return e[t] }).join("")) return !1; var r = {}; return "abcdefghijklmnopqrst".split("").forEach(function (t) { r[t] = t }), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, r)).join("") } catch (t) { return !1 } }() ? Object.assign : function (t, e) { for (var n, a, s = function (t) { if (null === t || void 0 === t) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(t) }(t), u = 1; u < arguments.length; u++) { for (var c in n = Object(arguments[u])) i.call(n, c) && (s[c] = n[c]); if (r) { a = r(n); for (var l = 0; l < a.length; l++)o.call(n, a[l]) && (s[a[l]] = n[a[l]]) } } return s }
}])
})
}, function (t, e, n) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var r = function (t) { return t && t.__esModule ? t : { default: t } }(n(6)); function i(t, e, n) { this.x = t || 0, this.y = e || 0, this.z = n || 0 } i.prototype = { constructor: i, isVector3: !0, set: function (t, e, n) { return this.x = t, this.y = e, this.z = n, this }, applyEuler: function () { var t; return function (e) { return !1 === (e && e.isEuler) && console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."), void 0 === t && (t = new r.default), this.applyQuaternion(t.setFromEuler(e)) } }(), applyQuaternion: function (t) { var e = this.x, n = this.y, r = this.z, i = t.x, o = t.y, a = t.z, s = t.w, u = s * e + o * r - a * n, c = s * n + a * e - i * r, l = s * r + i * n - o * e, f = -i * e - o * n - a * r; return this.x = u * s + f * -i + c * -a - l * -o, this.y = c * s + f * -o + l * -i - u * -a, this.z = l * s + f * -a + u * -o - c * -i, this } }, e.default = i }, function (t, e, n) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var r = function (t) { return t && t.__esModule ? t : { default: t } }(n(0)); function i(t, e, n, r) { this._x = t || 0, this._y = e || 0, this._z = n || 0, this._w = void 0 !== r ? r : 1 } i.prototype = { constructor: i, get x() { return this._x }, set x(t) { this._x = t, this.onChangeCallback() }, get y() { return this._y }, set y(t) { this._y = t, this.onChangeCallback() }, get z() { return this._z }, set z(t) { this._z = t, this.onChangeCallback() }, get w() { return this._w }, set w(t) { this._w = t, this.onChangeCallback() }, set: function (t, e, n, r) { return this._x = t, this._y = e, this._z = n, this._w = r, this.onChangeCallback(), this }, clone: function () { return new this.constructor(this._x, this._y, this._z, this._w) }, copy: function (t) { return this._x = t.x, this._y = t.y, this._z = t.z, this._w = t.w, this.onChangeCallback(), this }, setFromEuler: function (t, e) { if (!1 === (t && t.isEuler)) throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order."); var n = Math.cos(t._x / 2), r = Math.cos(t._y / 2), i = Math.cos(t._z / 2), o = Math.sin(t._x / 2), a = Math.sin(t._y / 2), s = Math.sin(t._z / 2), u = t.order; return "XYZ" === u ? (this._x = o * r * i + n * a * s, this._y = n * a * i - o * r * s, this._z = n * r * s + o * a * i, this._w = n * r * i - o * a * s) : "YXZ" === u ? (this._x = o * r * i + n * a * s, this._y = n * a * i - o * r * s, this._z = n * r * s - o * a * i, this._w = n * r * i + o * a * s) : "ZXY" === u ? (this._x = o * r * i - n * a * s, this._y = n * a * i + o * r * s, this._z = n * r * s + o * a * i, this._w = n * r * i - o * a * s) : "ZYX" === u ? (this._x = o * r * i - n * a * s, this._y = n * a * i + o * r * s, this._z = n * r * s - o * a * i, this._w = n * r * i + o * a * s) : "YZX" === u ? (this._x = o * r * i + n * a * s, this._y = n * a * i + o * r * s, this._z = n * r * s - o * a * i, this._w = n * r * i - o * a * s) : "XZY" === u && (this._x = o * r * i - n * a * s, this._y = n * a * i - o * r * s, this._z = n * r * s + o * a * i, this._w = n * r * i + o * a * s), !1 !== e && this.onChangeCallback(), this }, setFromAxisAngle: function (t, e) { var n = e / 2, r = Math.sin(n); return this._x = t.x * r, this._y = t.y * r, this._z = t.z * r, this._w = Math.cos(n), this.onChangeCallback(), this }, multiply: function (t, e) { return void 0 !== e ? (console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), this.multiplyQuaternions(t, e)) : this.multiplyQuaternions(this, t) }, multiplyQuaternions: function (t, e) { var n = t._x, r = t._y, i = t._z, o = t._w, a = e._x, s = e._y, u = e._z, c = e._w; return this._x = n * c + o * a + r * u - i * s, this._y = r * c + o * s + i * a - n * u, this._z = i * c + o * u + n * s - r * a, this._w = o * c - n * a - r * s - i * u, this.onChangeCallback(), this }, slerp: function (t, e) { if (0 === e) return this; if (1 === e) return this.copy(t); var n = this._x, r = this._y, i = this._z, o = this._w, a = o * t._w + n * t._x + r * t._y + i * t._z; if (a < 0 ? (this._w = -t._w, this._x = -t._x, this._y = -t._y, this._z = -t._z, a = -a) : this.copy(t), a >= 1) return this._w = o, this._x = n, this._y = r, this._z = i, this; var s = Math.sqrt(1 - a * a); if (Math.abs(s) < .001) return this._w = .5 * (o + this._w), this._x = .5 * (n + this._x), this._y = .5 * (r + this._y), this._z = .5 * (i + this._z), this; var u = Math.atan2(s, a), c = Math.sin((1 - e) * u) / s, l = Math.sin(e * u) / s; return this._w = o * c + this._w * l, this._x = n * c + this._x * l, this._y = r * c + this._y * l, this._z = i * c + this._z * l, this.onChangeCallback(), this }, onChange: function (t) { return this.onChangeCallback = t, this }, onChangeCallback: function () { } }, (0, r.default)(i, { slerp: function (t, e, n, r) { return n.copy(t).slerp(e, r) }, slerpFlat: function (t, e, n, r, i, o, a) { var s = n[r + 0], u = n[r + 1], c = n[r + 2], l = n[r + 3], f = i[o + 0], p = i[o + 1], h = i[o + 2], d = i[o + 3]; if (l !== d || s !== f || u !== p || c !== h) { var m = 1 - a, y = s * f + u * p + c * h + l * d, g = y >= 0 ? 1 : -1, v = 1 - y * y; if (v > Number.EPSILON) { var b = Math.sqrt(v), x = Math.atan2(b, y * g); m = Math.sin(m * x) / b, a = Math.sin(a * x) / b } var _ = a * g; if (s = s * m + f * _, u = u * m + p * _, c = c * m + h * _, l = l * m + d * _, m === 1 - a) { var w = 1 / Math.sqrt(s * s + u * u + c * c + l * l); s *= w, u *= w, c *= w, l *= w } } t[e] = s, t[e + 1] = u, t[e + 2] = c, t[e + 3] = l } }), e.default = i }, function (t, e, n) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var r = { DEG2RAD: Math.PI / 180, RAD2DEG: 180 / Math.PI, degToRad: function (t) { return t * r.DEG2RAD }, radToDeg: function (t) { return t * r.RAD2DEG } }; e.default = r }, function (t, e, n) { "use strict"; var r = function () { function t(t, e) { for (var n = 0; n < e.length; n++) { var r = e[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r) } } return function (e, n, r) { return n && t(e.prototype, n), r && t(e, r), e } }(), i = l(n(1)), o = l(n(9)), a = n(10), s = n(2), u = l(n(18)), c = l(n(0)); function l(t) { return t && t.__esModule ? t : { default: t } } var f = (0, s.prefixStyle)("transform"); function p(t, e, n) { t.transform[e] = n, t.shouldTransform = !0 } function h(t) { if (t instanceof HTMLElement || t instanceof SVGElement) { var e = window.getComputedStyle(t), n = (0, s.matrixToTransformObj)(e[f]); return n.opacity = Number(e.opacity), n["background-color"] = e["background-color"], n.color = e.color, n.width = (0, s.pxTo750)(e.width.replace("px", "")), n.height = (0, s.pxTo750)(e.height.replace("px", "")), n["border-top-left-radius"] = (0, s.pxTo750)(e["border-top-left-radius"].replace("px", "")), n["border-top-right-radius"] = (0, s.pxTo750)(e["border-top-right-radius"].replace("px", "")), n["border-bottom-left-radius"] = (0, s.pxTo750)(e["border-bottom-left-radius"].replace("px", "")), n["border-bottom-right-radius"] = (0, s.pxTo750)(e["border-bottom-right-radius"].replace("px", "")), n["margin-top"] = (0, s.pxTo750)(e["margin-top"].replace("px", "")), n["margin-bottom"] = (0, s.pxTo750)(e["margin-bottom"].replace("px", "")), n["margin-left"] = (0, s.pxTo750)(e["margin-left"].replace("px", "")), n["margin-right"] = (0, s.pxTo750)(e["margin-right"].replace("px", "")), n["padding-top"] = (0, s.pxTo750)(e["padding-top"].replace("px", "")), n["padding-bottom"] = (0, s.pxTo750)(e["padding-bottom"].replace("px", "")), n["padding-left"] = (0, s.pxTo750)(e["padding-left"].replace("px", "")), n["padding-right"] = (0, s.pxTo750)(e["padding-right"].replace("px", "")), n } } var d = function () { function t(e, n) { switch (function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, t), this._eventHandler = null, this.elTransforms = [], this.elPaths = [], this.token = null, this.options = e, this.callback = n, this.token = this.genToken(), this._initElTransforms(), e.eventType) { case "pan": this._eventHandler = new a.PanHandler(this); break; case "orientation": this._eventHandler = new a.OrientationHandler(this); break; case "timing": this._eventHandler = new a.TimingHandler(this); break; case "scroll": this._eventHandler = new a.ScrollHandler(this) } } return r(t, [{ key: "genToken", value: function () { return parseInt(1e7 * Math.random()) } }, { key: "_initElTransforms", value: function () { var t = this.options.props, e = void 0 === t ? [] : t, n = this.elTransforms; e.forEach(function (t) { var e = t.element; if (!i.default.find(n, function (t) { return t.element === e })) { var r = { translateX: 0, translateY: 0, translateZ: 0, scaleX: 1, scaleY: 1, scaleZ: 1, rotateX: 0, rotateY: 0, rotateZ: 0, skewX: 0, skewY: 0 }; if (e instanceof SVGElement) { var o = h(e); r.translateX = (0, s.px)(o.translateX), r.translateY = (0, s.px)(o.translateY), r.rotateZ = o.rotateZ, r.scaleX = o.scaleX, r.scaleY = o.scaleY, r.skewX = o.skewX, r.skewY = o.skewY } n.push({ element: e, transform: r }) } }) } }, { key: "getValue", value: function (t, e) { return o.default.execute(e, (0, c.default)(u.default, t)) } }, { key: "setProperty", value: function (t, e, n) { if (this.options.debug && console.log("property:", e, " value:", n), t instanceof HTMLElement) { var r = i.default.find(this.elTransforms, function (e) { return e.element === t }); switch (e) { case "scroll.contentOffsetY": t.scrollTop = (0, s.px)(n); break; case "scroll.contentOffsetX": t.scrollLeft = (0, s.px)(n); break; case "transform.translateX": p(r, "translateX", (0, s.px)(n)); break; case "transform.translateY": p(r, "translateY", (0, s.px)(n)); break; case "transform.translateZ": p(r, "translateZ", (0, s.px)(n)); break; case "transform.rotateX": p(r, "rotateX", n); break; case "transform.rotateY": p(r, "rotateY", n); break; case "transform.rotateZ": case "transform.rotate": p(r, "rotateZ", n); break; case "transform.scaleX": p(r, "scaleX", n); break; case "transform.scaleY": p(r, "scaleY", n); break; case "transform.scale": p(r, "scaleX", n), p(r, "scaleY", n); break; case "opacity": t.style.opacity = n; break; case "background-color": t.style["background-color"] = n; break; case "color": t.style.color = n; break; case "width": case "height": case "border-top-left-radius": case "border-top-right-radius": case "border-bottom-left-radius": case "border-bottom-right-radius": case "border-radius": case "margin-top": case "margin-bottom": case "margin-left": case "margin-right": case "padding-top": case "padding-bottom": case "padding-left": case "padding-right": t.style[e] = (0, s.px)(n) + "px" }r && r.shouldTransform && (t.style[f] = ["translateX(" + r.transform.translateX + "px)", "translateY(" + r.transform.translateY + "px)", "translateZ(" + r.transform.translateZ + "px)", "scaleX(" + r.transform.scaleX + ")", "scaleY(" + r.transform.scaleY + ")", "rotateX(" + r.transform.rotateX + "deg)", "rotateY(" + r.transform.rotateY + "deg)", "rotateZ(" + r.transform.rotateZ + "deg)"].join(" ")) } else if (t instanceof SVGElement) { var o = i.default.find(this.elTransforms, function (e) { return e.element === t }); switch (e) { case "svg-dashoffset": t.setAttribute("stroke-dashoffset", (0, s.px)(n)); break; case "svg-transform.translateX": p(o, "translateX", (0, s.px)(n)); break; case "svg-transform.translateY": p(o, "translateY", (0, s.px)(n)); break; case "svg-transform.translateZ": p(o, "translateZ", (0, s.px)(n)); break; case "svg-transform.rotateX": p(o, "rotateX", n); break; case "svg-transform.rotateY": p(o, "rotateY", n); break; case "svg-transform.rotateZ": case "svg-transform.rotate": p(o, "rotateZ", n); break; case "svg-transform.scaleX": p(o, "scaleX", n); break; case "svg-transform.scaleY": p(o, "scaleY", n); break; case "svg-transform.scale": p(o, "scaleX", n), p(o, "scaleY", n); break; case "svg-transform.skewX": p(o, "skewX", n); break; case "svg-transform.skewY": p(o, "skewY", n); break; case "svg-path": var a = i.default.find(this.elPaths, function (e) { return e.element === t }); if (a && a.path || (a = { element: t, path: (0, s.parseSVGPath)(t.getAttribute("d"), s.pxTo750) }, this.elPaths.push(a)), a && a.path) if (n && n.length) for (var u = 0; u < n.length; u++)a.path = (0, s.interceptSVGPath)(a.path, n[u].index, n[u].values, n[u].cmd); else a.path = (0, s.interceptSVGPath)(a.path, n.index, n.values, n.cmd) }var c = i.default.find(this.elPaths, function (e) { return e.element === t }); c && c.path && t.setAttribute("d", (0, s.stringifySVGPath)(c.path, s.px)), o.shouldTransform && (t.style[f] = ["translateX(" + o.transform.translateX + "px)", "translateY(" + o.transform.translateY + "px)", "translateZ(" + o.transform.translateZ + "px)", "scaleX(" + o.transform.scaleX + ")", "scaleY(" + o.transform.scaleY + ")", "rotateX(" + o.transform.rotateX + "deg)", "rotateY(" + o.transform.rotateY + "deg)", "rotateZ(" + o.transform.rotateZ + "deg)", "skewX(" + o.transform.skewX + "deg)", "skewY(" + o.transform.skewY + "deg)"].join(" ")) } else switch (e) { case "lottie-progress": "function" == typeof t.setProgress && t.setProgress(n) } } }, { key: "destroy", value: function () { this._eventHandler.destroy() } }]), t }(); t.exports = { _bindingInstances: [], bind: function (t) { var e = this, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : function () { }; if (!t) throw new Error("should pass options for binding"); var r = i.default.filter(this._bindingInstances, function (e) { if (t.anchor) return e.options.anchor === t.anchor && e.options.eventType === t.eventType }); r && i.default.forEach(r, function (t) { t.destroy(), e._bindingInstances = i.default.dropWhile(e._bindingInstances, function (e) { return e === t }) }); var o = new d(t, n); return this._bindingInstances.push(o), { token: o.token } }, unbind